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Q,MAAM,4BAA4B,EAC1C,MACJ,CAEI,IACM,MAAC,KAAAJ,GAAQpB,GACX,oCACA,IAAM,CAAC,EACP,CAAC,MAAO,CAAC,eAAgBwB,CAAO,EAAG,OAAQ,EAAI,GAEnD,MAAMJ,EAAK,EACXM,EAAQ,MAAO,QACP,CACR,QAAQ,MAAM,wBAAwB,CAC1C,EACH,EAEM,CAAC,KAAAE,EAAM,UAAAH,EAAW,QAAAC,EAC7B,sEChDI,MAAMrQ,EAAQuE,EACR,CAAC,KAAAgM,EAAM,UAAAH,EAAW,QAAAC,CAAW,EAAAH,GAAWlQ,EAAM,OAAO,EAErD0Q,EAAO,GAAG1L,EAAe,wfCP7B2L,GAAqC,CACvC,UAAW,CACP,CACI,IAAK,kCACL,MAAO,EACX,EACA,CACI,IAAK,oBACL,MAAO,EACX,CACJ,EACA,aAAc,CACV,OACA,UACA,UACA,YACA,aACA,iBACA,oBACA,MACA,MACA,UACA,WACA,MACA,WACA,cACA,cACA,eACA,SACA,SACA,OACJ,EACA,SAAU,CACN,cACA,WACA,YACA,aACA,eACA,aACA,eACA,WACA,eACA,WACA,WACA,kBACA,UACA,OACJ,EACA,aAAc,CACV,0BACA,6BACA,6BACA,wBACA,iCACA,yBACA,iCACA,2BACA,2BACJ,EACA,MAAO,CACH,CACI,IAAK,gBACL,MAAO,GACX,EACA,CACI,IAAK,OACL,MAAO,GACX,EACA,CACI,IAAK,OACL,MAAO,GACX,EACA,CACI,IAAK,YACL,MAAO,GACX,EACA,CACI,IAAK,MACL,MAAO,GACX,EACA,CACI,IAAK,UACL,MAAO,GACX,EACA,CACI,IAAK,oBACL,MAAO,GACX,EACA,CACI,IAAK,eACL,MAAO,GACX,EACA,CACI,IAAK,UACL,MAAO,IACX,CACJ,EACA,OAAQ,CACJ,CACI,IAAK,SACL,MAAO,GACX,EACA,CACI,IAAK,OACL,MAAO,GACX,EACA,CACI,IAAK,gBACL,MAAO,GACX,CACJ,EACA,MAAO,CACH,CACI,IAAK,QACL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AAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,IACV,EAAU,KACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,KACV,IAAU,GAGV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,IACV,EAAU,IAEV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,I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IACV,EAAU,IACV,EAAU,KACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,GACV,EAAU,IACV,EAAU,GACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,KACV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,KACV,EAAU,GACV,EAAU,IACV,EAAU,GACV,EAAU,IACV,EAAU,KACV,EAAU,KAEV,EAAU,KACV,EAAU,IAGV,EAAU,IACV,EAAU,KACV,EAAU,KACV,EAAU,IAGV,EAAU,IACV,EAAU,KAEV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IAEV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IAOV,EAAU,IACV,EAAU,IAEV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IAGV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,EAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,KACV,IAAU,IACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,KACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IAAU,IACV,IA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GAAI,IAAI4xB,GAAW,CAAE,EACrB5xB,GAAI,MAAMxQ,CAAE,CAChB,EAEAmpF,GAAS","names":["isAxiosError","error","isSongfinchError","isValidEmail","email","baseFindIndex","array","predicate","fromIndex","fromRight","length","index","baseIsNaN","value","strictIndexOf","baseIndexOf","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsZWJ","reHasUnicode","hasUnicode","string","baseFilter","collection","result","baseEach","filter","func","isArray","arrayFilter","baseIteratee","createFind","findIndexFunc","iterable","isArrayLike","iteratee","keys","key","nativeMax","findIndex","toInteger","find","find$2","baseMap","map","arrayMap","stringTag","isString","isObjectLike","baseGetTag","indexOf","mapTag","setTag","objectProto","hasOwnProperty","isEmpty","isBuffer","isTypedArray","isArguments","tag","getTag","isPrototype","baseKeys","mapValues","object","baseForOwn","baseAssignValue","pickBy","props","getAllKeysIn","prop","basePickBy","path","baseSortBy","comparer","compareAscending","other","valIsDefined","valIsNull","valIsReflexive","valIsSymbol","isSymbol","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","compareMultiple","orders","objCriteria","othCriteria","ordersLength","order","baseOrderBy","iteratees","baseGet","identity","baseUnary","criteria","asciiSize","baseProperty","asciiSize$1","rsAstral","rsCombo","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","reOptMod","rsOptVar","rsOptJoin","rsSeq","rsSymbol","reUnicode","unicodeSize","stringSize","size","sortBy","baseRest","isIterateeCall","baseFlatten","sortBy$1","normalizeCMSMedia","rawCMSMedia","normalizeCMSCta","rawCMSCta","normalziedCTA","normalizeSiteNavigationItem","item","normalizedItem","_a","subMenu","subItem","normalizeSiteNavigation","data","normalizeSiteFooterNavigation","normalizeFaqs","faqs","faq","__props","imgSrc","ref","setImageSrc","activeImgSrc","imageOptions","queryString","onImageError","onMounted","s3AssetBasePath","tryOnScopeDispose","fn","getCurrentScope","onScopeDispose","toValue","r","unref","isClient","toString","isObject","val","noop","createFilterWrapper","wrapper","args","resolve","reject","bypassFilter","invoke","throttleFilter","lastExec","timer","isLeading","lastRejector","lastValue","ms","trailing","leading","rejectOnCancel","isRef","clear","_invoke","duration","elapsed","pausableFilter","extendFilter","isActive","pause","resume","eventFilter","readonly","getLifeCycleTarget","target","getCurrentInstance","useThrottleFn","refThrottled","delay","throttled","updater","watch","watchWithFilter","source","cb","options","watchOptions","watchPausable","toRefs","objectRef","toRefs$1","customRef","v","copy","newObject","tryOnMounted","sync","nextTick","tryOnUnmounted","onUnmounted","unrefElement","elRef","plain","defaultWindow","defaultDocument","useEventListener","events","listeners","cleanups","cleanup","register","el","event","listener","options2","stopWatch","optionsClone","stop","_global","globalKey","handlers","getHandlers","getSSRHandler","fallback","guessSerializerType","rawInit","StorageSerializers","customStorageEventName","useStorage","defaults","storage","flush","deep","listenToStorageChanges","writeDefaults","mergeDefaults","shallow","window","onError","e","initOnMounted","shallowRef","_a2","type","serializer","pauseWatch","resumeWatch","pausableWatch","write","update","updateFromCustomEvent","dispatchWriteEvent","oldValue","newValue","serialized","read","rawValue","useDraggable","_b","pointerTypes","preventDefault","stopPropagation","exact","onMove","onEnd","onStart","initialValue","axis","draggingElement","containerElement","draggingHandle","position","pressedDelta","filterEvent","handleEvent","start","container","containerRect","targetRect","pos","move","x","y","end","config","computed","useScriptTag","src","onLoaded","immediate","manual","async","crossOrigin","referrerPolicy","noModule","defer","document","attrs","scriptTag","_promise","loadScript","waitForScriptLoad","resolveWithElement","el2","shouldAppend","name","load","unload","useSessionStorage","useUserway","account","isLoading","isReady","hideUserway","open","onBeforeUnmount","onBeforeMount","icon","staticOptions","getFormInputStaticOptions","staticOptionsId","useFormItemRender","formComponents","defineAsyncComponent","__vitePreload","isFormType","typename","__create","__defProp","__getOwnPropDesc","__getOwnPropNames","__getProtoOf","__hasOwnProp","__esm","res","__commonJS","mod","__copyProps","to","from","except","desc","__toESM","isNodeMode","target2","init_esm_shims","require_rfdc","exports","module","rfdc2","copyBuffer","cur","opts","rfdcCircles","constructorHandlers","o","cloneArray","handler2","handler","cloneProto","clone","a","a2","i","k","o2","refs","refsNew","isBrowser","import_rfdc","classifyRE","toUpper","_","c","classify","str","basename","filename","ext","normalizedFilename","lastSlashIndex","baseNameWithExt","extIndex","deepClone","DEBOUNCE_DEFAULTS","debounce","wait","leadingValue","timeout","resolveList","currentPromise","trailingArgs","applyFn","_this","_applyPromised","promise","shouldCallNow","_resolve","flatHooks","configHooks","hooks","parentName","subHook","defaultTask","function_","_createTask","createTask","serialTaskCaller","task","hookFunction","parallelTaskCaller","hook","callEachWith","callbacks","arg0","callback","Hookable","originalName","dep","message","_unreg","_function","arguments_","deprecated","_hooks","deprecatedHooks","removeFns","unreg","caller","createHooks","target22","require_speakingurl","root","charMap","lookAheadCharArray","diatricMap","langCharMap","symbolMap","uricChars","uricNoSlashChars","markChars","getSlug","input","separator","diatricString","convertSymbols","customReplacements","maintainCase","titleCase","truncate","uricFlag","uricNoSlashFlag","markFlag","symbol","langChar","lucky","ch","l","lastCharWasSymbol","lastCharWasDiatric","allowedChars","escapeChars","isReplacedCustomChar","i2","j","createSlug","require_speakingurl2","getComponentTypeName","_a25","getComponentFileName","file","saveComponentGussedName","instance","getAppRecord","getComponentId","app","uid","appRecord","isRoot","isFragment","_b25","subTreeType","getInstanceName","_c","fileName","getComponentInstance","instanceId","createRect","rect","range","getTextRect","node","getFragmentRect","vnode","childVnode","childRect","getComponentBoundingRect","mergeRects","b","DEFAULT_RECT","getRootElementsFromComponentInstance","getFragmentRootElements","list","CONTAINER_ELEMENT_ID","CARD_ELEMENT_ID","COMPONENT_NAME_ELEMENT_ID","INDICATOR_ELEMENT_ID","containerStyles","cardStyles","indicatorStyles","getContainerElement","getCardElement","getIndicatorElement","getNameElement","getStyles","bounds","create","containerEl","cardEl","nameEl","indicatorEl","highlight","unhighlight","inspectInstance","inspectFn","selectComponentFn","activeAppRecord","id","inspectComponentHighLighterSelectFn","cancelInspectComponentHighLighter","inspectComponentHighLighter","onSelect","scrollToComponent","scrollTarget","styles","waitForInspectorInit","total","setupInspector","inspector","_openInEditor","params","getComponentInspector","setup","isReadonly","isReactive","toRaw","observed","raw","StateEditor","RefStateEditor","sections","section","field","parent","state","currentKeys","previousKeysSet2","previousKeysSet","TIMELINE_LAYERS_STATE_STORAGE_ID","getTimelineLayersStateFromStorage","_b2","target3","devtoolsTimelineLayers","receiver","addTimelineLayer","descriptor","devtoolsState","_a3","_b3","target4","devtoolsInspector","callInspectorUpdatedHook","devtoolsContext","getActiveInspectors","addInspector","getInspector","createDevToolsCtxHooks","hooks2","plugin","debounceSendInspectorTree","debounce2","inspectorId","_payload","debounceSendInspectorState","ctx","nodeId","internalLayerIds","appId","_a4","_b4","global","_a5","_b5","_a6","_b6","_a7","_b7","_a8","_b8","STATE_KEY","initStateFactory","_a9","_b9","callStateUpdatedHook","debounce3","oldState","devtoolsAppRecords","_target","updateAllStates","setActiveAppRecord","setActiveAppRecordId","property","openInEditor","host","baseUrl","line","column","_baseUrl","response","msg","target5","_a10","_b10","target6","devtoolsPluginBuffer","_getSettings","settings","_settings","getPluginLocalKey","pluginId","getPluginSettingsOptions","item2","_a26","getPluginSettings","fallbackValue","localKey","localSettings","initPluginSettings","setPluginSettings","parsedLocalSettings","updated","_a11","_b11","devtoolsHooks","target7","createHooks2","on","pluginDescriptor","setupFn","DevToolsV6PluginAPI","payload","DevToolsPluginAPI","UNDEFINED","INFINITY","NEGATIVE_INFINITY","NAN","tokenMap","acc","_a12","_b12","target8","callDevToolsPluginSetupFn","api","registerDevToolsPlugin","ROUTER_KEY","ROUTER_INFO_KEY","_a13","_b13","global2","_a14","_b14","getRoutes","router","routesMap","filterRoutes","routes","children","meta","filterCurrentRoute","route","fullPath","hash","href","matched","query","normalizeRouterInfo","activeAppRecord2","init","currentRoute","global3","debounce5","createDevToolsApi","stateEditor2","obj","record","target9","_a15","_b15","target10","_a16","_b16","target11","_a17","_b17","target12","toggleHighPerfMode","updateDevToolsClientDetected","devtoolsClientVisible","_a18","_b18","target15","DoubleIndexedKV","Registry","generateIdentifier","identifier","ClassRegistry","valuesOfObj","values","valuesNotNever","forEach","run","includes","arr","findArr","CustomTransformerRegistry","transformer","getType","isUndefined","isNull","isPlainObject2","isEmptyObject","isNumber","isBoolean","isRegExp","isMap","isSet","isDate","isError","isNaNValue","isPrimitive2","isBigint","isInfinite","isURL","escapeKey","stringifyPath","parsePath","segment","char","lastSegment","simpleTransformation","isApplicable","annotation","transform","untransform","simpleRules","superJson","baseError","regex","body","flags","compositeTransformation","symbolRule","s","constructorToName","ctor","typedArrayRule","isInstanceOfRegisteredClass","potentialClass","classRule","clazz","allowedProps","customRule","compositeRules","transformValue","applicableCompositeRule","rule","applicableSimpleRule","simpleRulesByAnnotation","untransformValue","json","transformation","getNthKey","n","validatePath","getDeep","row","keyOfRow","setDeep","mapper","lastKey","keyToRow","newKey","traverse","tree","walker2","origin","subtree","nodeValue","child","applyValueAnnotations","annotations","applyReferentialEqualityAnnotations","apply","identicalPaths","identicalObjectPath","identicalPath","isDeep","addIdentity","identities","existingSet","generateReferentialEqualityAnnotations","identitites","dedupe","rootEqualityPaths","paths","representativePath","walker","objectsInThisPath","seenObjects","primitive","seen","transformed2","result2","transformationResult","transformed","transformedValue","innerAnnotations","recursiveResult","getType2","isArray2","isPlainObject3","prototype","assignProp","carry","newVal","originalObject","includeNonenumerable","propType","symbols","SuperJSON","output","equalityAnnotations","_a19","_b19","target21","_a20","_b20","_a21","_b21","_a22","_b22","_a23","_b23","_a24","_b24","isCallable","isNullOrUndefined","isIndex","toNumber","isPlainObject","proto","merge","normalizeFormPath","pathArr","RULES","resolveRule","set","klona","tmp","FormContextKey","PublicFormContextKey","FieldContextKey","IS_ABSENT","isLocator","isTypedSchema","isYupValidator","hasCheckedAttr","isContainerValue","isEmptyContainer","isNotNestedPath","isNativeMultiSelect","isNativeSelect","isFormSubmitEvent","evt","isEvent","isEqual","isFile","countUndefinedValues","cleanupNonNestedPath","getFromPath","propKey","setInPath","unset","unsetPath","pathValues","idx","keysOf","injectWithSelf","def","vm","inject","resolveNextCheckboxValue","currentValue","checkedValue","uncheckedValue","debounceAsync","inner","resolves","applyModelModifiers","modifiers","withLatest","onDone","latestRun","pending","normalizeErrorItem","omit","debounceNextTick","lastTick","thisTick","getBoundValue","hasValueBinding","parseInputValue","normalizeEventValue","files","opt","selectedOption","normalizeRules","rules","prev","curr","normalizeParams","buildParams","parsedRule","parseRule","provided","mapValueToLocator","createLocator","locator","crossTable","extractLocators","DEFAULT_CONFIG","currentConfig","getConfig","validate","shouldBail","_validate","validateFieldWithTypedSchema","pipeline","errors","_generateFieldError","normalizedContext","rulesKeys","_test","isYupError","err","yupToTypedSchema","yupSchema","context","messages","validator","fillTargetValues","fieldCtx","normalize","param","validateTypedSchema","schema","validationResult","results","m","validateObjectSchema","validations","strings","fieldResult","isAllValid","validationResults","ID_COUNTER","useFieldState","setInitialValue","_useFieldValue","setState","setErrors","createFieldErrors","createFieldMeta","modelValue","form","modelRef","resolveInitialValue","resolveModelValue","isRequired","reactive","useField","useFieldWithChecked","_useField","validateOnMount","bails","label","validateOnValueUpdate","controlled","keepValueOnUnmount","syncVModel","controlForm","normalizeOptions","injectedForm","rulesValue","isTyped","validate$1","errorMessage","useVModel","handleChange","handleBlur","shouldValidate","validateWithStateMutation","validateCurrentValue","mode","validateValidStateOnly","setValue","setTouched","isTouched","resetField","valueProxy","provide","dependencies","rulesVal","deps","depAcc","depName","depValue","oldDeps","shouldKeepValue","pathState","valueIdx","isVModelSynced","modelPropName","getCurrentModelValue","patchCheckedApi","checked","checkedVal","handleCheckboxChange","propName","emitName","propValue","FORM_COUNTER","PRIVATE_PATH_STATE_KEYS","resolveInitialValues","givenInitial","providedValues","useForm","formId","FIELD_ID_COUNTER","isSubmitting","isValidating","submitCount","fieldArrays","formValues","pathStates","extraErrorsBag","pathStateLookup","rebuildPathLookup","names","setFieldError","findPathState","normalizedPath","errorBag","pathErrors","fieldNames","fieldBailsMap","initialErrors","keepValuesOnUnmount","initialValues","originalInitialValues","setInitialValues","useFormInitialValues","useFormMeta","controlledValues","createPathState","pathStateExists","isCheckboxOrRadio","pathValue","unsetBatchIndex","UNSET_BATCH","_path","_d","schemaValue","configSchemaValue","validateField","newPath","nextValue","debouncedSilentValidation","_validateSchema","debouncedValidation","validateSchema","formResult","currentErrorsPaths","formCtx","p","validation","expectedPath","findHoistedPath","mergeValidationResults","mutateAllPathState","mutation","bestCandidate","candidate","PENDING_UNSET","unsetPathValue","makeSubmissionFactory","onlyControlled","onValidationError","submittedValues","setFieldTouched","setValues","setFieldValue","resetForm","returnVal","handleSubmit","removePathState","idIndex","unsetInitialValue","destroyPath","useFieldModel","defineInputBinds","defineComponentBinds","defineField","stageInitialValue","setFieldInitialValue","isFieldTouched","isFieldDirty","isFieldValid","clonedValue","forceSetValues","fields","f","createModel","resetState","newValues","updateOriginal","submitForm","evalConfig","onBlur","onInput","onChange","base","pathOrPaths","model","onUpdateModelValue","conf","pathsState","currentValues","MERGE_STRATEGIES","isDirty","calculateFlags","states","flag","mergeMethod","watchEffect","useFieldValidator","hasError","resolveFormItem","computedProps","computedPropsObject","toRef","currentYear","notification","useNotification","normalizeNotification","newNotification","normalizeError","store","useStore","setNotification","navigation","navigationSocial","socialLinks","emailRequired","sendEmail","axios","analyticsEvent","userwayAccount","_hoisted_1","_sfc_render","_ctx","_cache","_openBlock","_createElementBlock","_createElementVNode","logoImage","shade","getComponentShade","tagColor","emit","__emit","activeNavItem","toggleNavItem","accountButtonLabel","handleAuthButtonClick","scrollLock","scrollUnlock","smoothScrollTo","targetPosition","startPosition","distance","startTime","animation","currentTime","timeElapsed","progress","easeInOutQuad","useModal","trackingProperties","modalOpenTrackEvent","modalActive","getAccountNav","user","menuItems","logoType","useSetNavigationLogo","newLogoType","userAuthed","accountNav","topOfDocument","navigationContainer","isScrolledPast","openModal","closeModal","theme","handleScroll","top","useRoute","isAdmin","cartLength","removeClearfix","baseTheme","t","this","d","g","$","u","h","dayjs","utc","timezone","_sfc_main$4","defineComponent","now","diff","timeLeft","days","hours","minutes","formattedTime","onPageLoaded","isBetween","activeDatedMessage","counter","isComponent","showTopBanner","bannerColor","url","components","part","CountdownTimer","getActiveCountDown","startDate","endDate","newPayload","activePinia","setActivePinia","pinia","piniaSymbol","MutationType","createPinia","scope","effectScope","_p","toBeInstalled","markRaw","addSubscription","subscriptions","detached","onCleanup","removeSubscription","triggerSubscriptions","fallbackRunWithContext","ACTION_MARKER","ACTION_NAME","mergeReactiveObjects","patchToApply","subPatch","targetValue","skipHydrateSymbol","shouldHydrate","assign","isComputed","createOptionsStore","hot","actions","getters","initialState","localState","computedGetters","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","isSyncListening","actionSubscriptions","debuggerEvents","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","$reset","newState","$state","$dispose","action","wrappedAction","afterCallbackList","onErrorCallbackList","after","ret","partialStore","stopWatcher","setupStore","actionValue","extender","defineStore","setupOptions","isSetupStore","hasContext","hasInjectionContext","createSongBuilder","fetchSongBuilder","slug","fetchSongBuilderByEmail","updateSongBuilder","storeSongBuilder","useSongBuilderStore","q","progressStats","valid","steps","useSongBuilderProgress","Home2024","ArtistCommunity","SongRevisions","PrivacyPolicy","Terms","EventReminder","Careers","ContactUs","HowItWorks","static_pages","setMetaToAllChildren","beforeEnter","skipRouteToNext","skip","shared$1","temp","modal","CancelToken","cms","navs","arrKeys","group","commit","currentPath","logError","dispatch","setProductForAdditionalInfo","mainProduct","dontShowDetailModal","component","swalSettings","submitted","productsWithBunles","bp","product","submittedProduct","resolve2","submittedModalProduct","loadSingleProduct","productSlug","getWithParent","loadProductOrDefault","defaultSlug","isInstantProduct","isOriginalSongProduct","excludedInstantAddons","defaultParams","captureException","catchError","handleError","lastReferralPage","setLastReferralPage","pick","goToReferalPage","page","defaultRoutePage","getCmsData","goToNextPage","goToPrevPage","prevName","selectedName","setCurentName","resetNamesData","useInstantNames","selectedNameKey","DEFAULT_INSTANT_PRODUCT","selectedInstantProduct","vitamixCollectionId","vitamixCollectionTitle","answersStorage","currentPreviewIndexStorage","previewsListStorage","previewTaskID","songRemaningTemp","songRemaning","collectionData","setSelectedInstantProduct","setVitamixCollection","resetInstantData","setVitamixCollectionData","loadInstantCollection","isIpCollectionCmsDataSubCategory","categories","prefix","vitamixApiClient","collectionDataRes","$toastMsg","get_error","setAnswer","answersUpdated","setAnswersUpdated","setCurrentSelectedPreview","throwAndRedirectToStep","getAllAnswers","answers","questions","allCollectionQuestionsIds","step","hasGeneral","answer","answerPicked","isRedirectError","submitPreview","previewIndex","answersForSubmission","getTaskData","taskId","answers_data","parseAnswersForKeyVal","nextPreview","lockSong","previewSong","task_id","submitFullSong","preview","lastStepVisited","questionsAnswers","questionHash","answerHash","setLastPageVisited","exportData","nth","useInstantProductBuilder","cart$1","saveCart","savedCart","findDiscountableProductByName","hasAllProductsForCoupon","hasAnyProductsForCoupon","calcTotals","hasType","requireShippingAddress","isInternationalShippingAllowed","generateData","frontendValidation","findProductByName","findProductIndexByName","isDiscountable","rushFee","skipToast","ignoreSegmenetEvent","applyTemporaryCoupon","skipAdditionalInfo","isOriginalSong","isInstantSong","isSong","uuid","insertIndex","toast","promoAddon","isPromoAddonValid","loadedProduct","cart","reservedCoupon","coupon","products","cpn","ids","hasUpdated","dbProduct","sp","dp","valuesToCompare","checkoutErrorHandler","paypal_info","removed_product","discountLeft","subtotal","discount","totalWithExclusions","creditApplied","productsWithDiscountApplied","userCredit","promoAddons","allProductPromos","_e","isMinimumCartExceeded","_f","totalProductPrice","promoAddonIndex","productDiscount","isServiceFeeDiscountable","isCouponApplicableToProduct","discountAlreadyAppliedToProduct","isProductDiscountable","isProductExcludedFromCoupon","_g","_i","_h","_j","_k","_m","_l","_n","productCredits","taxCredits","songData","cloneDeep","songBuilderSlug","rushFeeInfo","allowedAttributes","productData","productsOriginalLength","callsResult","calls","cdnUrl","pushToCart","resData","inCart","setTemporaryEmail","Cookies","getTemporaryEmail","auth","savedData","totalCredits","registration","error_handler","savedAddresses","code","apply_query_filters","filters","filtersParams","get_query_filters","queryFilters","artist","lastPage","destination","lastPageRoute","artistSelectionPageRoute","showProductPaperActive","showProductPaperId","useShowProductPaper","store$1","rootState","showProductPaper","productsNames","sortByName","storyId","productsProps","excludes","playlist","createStore","shared","core_cms","SongBuilder","BsOccasionRecipient","BsGifterEmail2","BsSongArtist","BsSongOptions","BsSongArtistSelection","BsStoryDetailsCombined","BsArtistsRecommendation","BsArtistConfirmation","BsReview","BsPreCart","BsChangeArtist","songbuilderGuard","skipSongBuilderRoute","next","isPrevPage","nextPage","bsPageRedirectionGuard","isLastBuilderPage","checkForOriginalSongBundler","checkOriginalInCartGuard","gifterEmailGuard","songBuilderRoutes","userSelectedAnArtistSwitch","song_builder_pages","loadedScripts","useLoadScript","stripe","loadStripe","processStripePayment","stripeElements","returnUrl","shipping","stripeClientSecret","submitError","useStripe","Cart","Checkout","CompleteCheckout","NonStoryConfirmation","checkoutGuard","stripePreloadGuard","checkout_pages","Dashboard","Profile","OrderHistory","CreditBalance","ReferralProgram","dashboard_pages","Story","AgECard","EditOriginalSongBuilder","story_pages","useStoryImport","loadCurrentStory","Products","ProductSingle","productPages","LandingSingle","templates","Error","ArtistSingle","Artists","OpportunityConfirmation","artists_pages","EmailMePassword","StudioFaqPopup","OTPSinginPopup","SignupPopup","EventReminderPopup","authPopupHelper","direction","loadedComponent","popups","Songs","PlaylistSingle","songPages","redirects","ReferralsSignup","referrals","InstantProductBuilder","IpBuilderSteps","IpBuilderStep","IpLoadingPreview","IpRecipientNames","IpPreview","IpConfirm","IpAddons","IpCustomerGreeting","IpCollections","collectionGuard","stepsGuard","namesGuard","addonsGuard","skipAddons","previewGuard","previewsList","productInCartGuard","customerGreetingGuard","queryCollectionId","isDifferentCollection","hash_scroll","element","reloadCalled","tryReload","fiveMinutes","MAX_REDIRECTS","redirectsList","RedirectsError","instant","findDuplicateRouteNames","routesList","uniqueNames","createRouter","createWebHistory","failure","cmsGroup","redirecTo","router$1","storeGetUserIdentifier","SONGBUILDER_STORAGE_SLUG","FIELDS_LIMITS","remoteData","selected","artistData","video","redirect","toPage","showWarning","invalidPage","startLength","add_days","_sfc_main","$event","$options","_withModifiers","$props","_createCommentVNode","Limit","rootDocument","finder","findRootDocument","bottomUpSearch","optimized","sort","optimize","selector","rootNode","limit","stack","current","level","maybe","attr","classNames","tagName","any","dispensableNth","nthChild","findUniquePath","combinations","unique","penalty","elementId","cssesc","notEmpty","newPathKey","same","regexAnySingleEscape","regexSingleEscape","regexExcessiveSpaces","defaultOptions","quote","isIdentifier","firstChar","character","codePoint","extra","$0","$1","$2","generateElementSelector","ctaHandler","binding","clickEventHandler","onlyEvents","eventElement","sfCtaAtributes","attribute","dateTimeInSeconds","isExternalReplace","altKey","ctrlKey","metaKey","shiftKey","button","defaultPrevented","linkTarget","domain","removeExistingAdCookies","cookieName","checkUrlQueryForAdIds","gclid","cookieExpirationDays","Event$1","eventName","clearOnRoute","eventBus","Event","EventBus","globalTopBannerPayload","setTopBanner","useTopBanner","fetchCheckUserForOTP","fetchAccessPasscode","submitAccessPasscode","passcode","sign_in_origin","postToExpressSignup","authExpressModalOpen","authModalSecondaryText","useAuthExpress","trackEvent","userName","userEmail","otpCode","authShowNameField","useOtpCodeFlow","authFormIsValid","isEmailValid","otpCodeIsValid","setAuthModalSecondaryText","songTitle","openExpressAuthModal","cleanAuthExpressModal","closeAuthExpressModal","handleOTPInitiatition","handleTrackEvent","handleOTPAuthentication","normalizedError","resendOTPCode","dbVals","gtmSongData","gtm_song_data_helper","new_array","filtered_pronunciations","initGtmData","setSessionUser","userData","getSessionUser","saved","SONG_BUILDER_QUIZ_NAME","SONG_BUILDER_QUIZ_NUMBER","NON_ADDON_PRODUCTS","mapBackendProductToEventProductModel","getProducts","mapAndEnrichSongbuilderDataForSegment","gtmSongDataCloned","segmentData","keysToRemap","fm","reduce","getCartStage","song","firstAddonParentStoryId","status","getUserTraitsForSegmentRequest","first_name","last_name","em","sha256","ln","traits","flipperValues","getSessionDataForSegmentRequest","getSegmentTrackingContextData","eventId","event_id_nonce","tracking_event_id","requestId","gtmData","eventProductModel","cart_stage","purchased_song_revision_product","song_purchase_event_id","order_fb_event_id","order_event_id","rev","lineRef","discountTotal","segmentOrderData","nonSongReportedProducts","segmentSongsData","songProduct","song_type","baseSegmentSongData","segmentItemData","segmentSongData","item_purchase_event_id","lead_form_event_id","user_email","recommended_list","artist_list","user_id","trackingContext","baseSegmentData","story","instant_product","instantProductData","player","baseProps","generalProps","quizProps","isMultiple","eventData","indexKey","selectedAnswer","DPaper","SingleProductDetails","DAuthExpressModal","removeProductPaper","setLogoType","clearNotification","appClass","animationName","animationDuration","visibility","previousRouteAnimation","showNavigation","showFooter","showStartButton","transitionKey","prevAnimation","pageLoaded","welcomScreen","createApp","App","sfHelpers","CdnPlugin","js_hash","sentryBaseConfig","browserTracingIntegration","hint","gtm","dataLayer","frames","isOwnError","frame","setAttentiveScript","script","useDoWhileWithDelay","conditionFunc","repeats","count","onBrowserInteraction","functionHelper","flipper","js","widgetName","dataVersion","pack","factory","require$$0","__WEBPACK_EXTERNAL_MODULE_axios__","modules","installedModules","__webpack_require__","moduleId","getter","ns","__webpack_exports__","CacheControl","parse","format","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","minLen","_arrayLikeToArray","len","arr2","_arr","_s","_classCallCheck","Constructor","_defineProperties","_createClass","protoProps","staticProps","HEADER_REGEXP","STRINGS","parseBooleanOnly","parseDuration","header","matches","match","tokens","_tokens","cc","charenc","bytes","it","UNSCOPABLES","ArrayProto","at","S","unicode","toIObject","toLength","toAbsoluteIndex","IS_INCLUDES","$this","O","cof","TAG","ARG","tryGet","T","B","core","$defineProperty","createDesc","aFunction","that","is","getKeys","gOPS","pIE","getSymbols","isEnum","hide","redefine","PROTOTYPE","$export","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","expProto","own","out","exp","MATCH","KEY","re","exec","fails","defined","wks","regexpExec","SPECIES","REPLACE_SUPPORTS_NAMED_GROUPS","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","fns","nativeMethod","regexp","arg2","forceStringMethod","strfn","rxfn","arg","anObject","dP","Iterators","ITERATOR","iterator","entries","setToStringTag","IteratorPrototype","NAME","LIBRARY","$iterCreate","getPrototypeOf","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Base","DEFAULT","IS_SET","FORCED","getMethod","kind","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","methods","SAFE_CLOSING","riter","skipClosing","safe","iter","done","META","has","setDesc","isExtensible","FREEZE","setMeta","fastKey","getWeak","onFreeze","dPs","enumBugKeys","IE_PROTO","Empty","createDict","iframe","lt","gt","iframeDocument","Properties","IE8_DOM_DEFINE","toPrimitive","P","Attributes","gOPD","gOPN","windowNames","getWindowNames","$keys","hiddenKeys","toObject","ObjectProto","arrayIndexOf","Reflect","bitmap","SRC","$toString","TO_STRING","TPL","isFunction","classof","builtinExec","R","regexpFlags","nativeExec","nativeReplace","patchedExec","LAST_INDEX","UPDATES_LAST_INDEX_WRONG","re1","re2","NPCG_INCLUDED","PATCH","lastIndex","reCopy","stat","SHARED","D","C","searchString","max","min","ceil","floor","IObject","px","wksExt","defineProperty","$Symbol","Symbol","USE_SYMBOL","$exports","call","isArrayIter","createProperty","getIterFn","arrayLike","aLen","mapfn","mapping","iterFn","addToUnscopables","iterated","FProto","nameRE","_isFinite","test","speciesConstructor","advanceStringIndex","callRegExpExec","$min","$push","$SPLIT","LENGTH","MAX_UINT32","SUPPORTS_Y","SPLIT","$split","maybeCallNative","internalSplit","lastLastIndex","splitLimit","separatorCopy","lastLength","splitter","rx","unicodeMatching","lim","A","z","INCLUDES","DESCRIPTORS","$fails","wksDefine","enumKeys","_create","gOPNExt","$GOPD","$GOPS","$DP","$JSON","_stringify","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","USE_NATIVE","QObject","setter","setSymbolDesc","protoDesc","wrap","sym","$defineProperties","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","es6Symbols","wellKnownSymbols","FAILS_ON_PRIMITIVES","replacer","$replacer","$includes","ownKeys","getDesc","$iterators","TO_STRING_TAG","ArrayValues","DOMIterables","collections","explicit","Collection","base64map","crypt","words","hex","base64","triplet","imod4","isSlowBuffer","utf8","bin","md5","FF","GG","HH","II","aa","bb","dd","digestbytes","runtime","Op","hasOwn","undefined","iteratorSymbol","asyncIteratorSymbol","toStringTagSymbol","define","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","Context","makeInvokeMethod","tryCatch","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","method","genFun","AsyncIterator","PromiseImpl","unwrapped","previousPromise","enqueue","callInvokeWithMethodAndArg","doneResult","delegate","delegateResult","maybeInvokeDelegate","info","pushTryEntry","locs","entry","resetTryEntry","iteratorMethod","skipTempReset","rootEntry","rootRecord","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","afterLoc","finallyLoc","tryLoc","thrown","resultName","nextLoc","setupCache","axios__WEBPACK_IMPORTED_MODULE_5__","axios__WEBPACK_IMPORTED_MODULE_5___default","_request__WEBPACK_IMPORTED_MODULE_6__","_cache__WEBPACK_IMPORTED_MODULE_7__","_config__WEBPACK_IMPORTED_MODULE_8__","_utilities__WEBPACK_IMPORTED_MODULE_9__","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","sourceSymbolKeys","sourceKeys","enumerableOnly","_objectSpread","_defineProperty","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","adapter","_x","_adapter","_callee","req","reqConfig","networkError","readOnError","_context","instanceConfig","cache","axiosConfig","invalidate","serializeQuery","_utilities__WEBPACK_IMPORTED_MODULE_5__","md5__WEBPACK_IMPORTED_MODULE_6__","md5__WEBPACK_IMPORTED_MODULE_6___default","_serialize__WEBPACK_IMPORTED_MODULE_7__","_x2","_x3","_write","_x4","_x5","_read","_callee2","ignoreCache","expires","offline","_error","_context2","cacheKey","defaultInvalidate","_x6","_x7","_defaultInvalidate","_callee3","_context3","isInstanceOfURLSearchParams","makeConfig","mergeRequestConfig","axios__WEBPACK_IMPORTED_MODULE_4__","axios__WEBPACK_IMPORTED_MODULE_4___default","_memory__WEBPACK_IMPORTED_MODULE_5__","_cache__WEBPACK_IMPORTED_MODULE_6__","debug","_console","_len","_key","disallowedPerRequestKeys","override","requestConfig","mergedConfig","_utilities__WEBPACK_IMPORTED_MODULE_4__","exclude","_config$exclude","hasQueryParams","found","_api__WEBPACK_IMPORTED_MODULE_0__","_limit","firstItem","_utilities__WEBPACK_IMPORTED_MODULE_3__","MemoryStore","_getItem","getItem","_setItem","setItem","_removeItem","removeItem","_clear","_callee4","_context4","_length","_callee5","_context5","_response__WEBPACK_IMPORTED_MODULE_2__","_exclude__WEBPACK_IMPORTED_MODULE_3__","_cache__WEBPACK_IMPORTED_MODULE_4__","request","_request","excludeFromCache","_limit__WEBPACK_IMPORTED_MODULE_2__","_cache__WEBPACK_IMPORTED_MODULE_3__","cache_control_esm__WEBPACK_IMPORTED_MODULE_4__","_response","_res$request","_res$headers","headers","cacheControl","serialize","mapObject","_typeof","skipRefreshError","clearData","FlagsPlugin","Slider","AudioPlayerPlugin","Flags","PrimeVue","Modal","pixels","submission_id","inBrowser","hasSymbol","makeSymbol","generateFormatCacheKey","locale","friendlyJSONstringify","toTypeString","warn","escapeHtml","rawText","objectToString","toDisplayString","CompileErrorCodes","createCompileError","defaultOnError","createPosition","offset","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","location","_scnr","currentOffset","currentPosition","_initLoc","_initOffset","emitError","getToken","token","getEndToken","eat","scnr","peekSpaces","buf","skipSpaces","isIdentifierStart","isNumberStart","isNamedIdentifierStart","currentType","isListIdentifierStart","isLiteralStart","isLinkedDotStart","isLinkedModifierStart","isLinkedDelimiterStart","isLinkedReferStart","isPluralStart","detectModuloStart","spaces","isTextStart","hasSpace","detectModulo","takeChar","takeIdentifierChar","takeDigit","takeHexDigit","getDigits","num","readModulo","readText","readNamedIdentifier","readListIdentifier","readLiteral","literal","readEscapeSequence","readUnicodeEscapeSequence","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","createParser","tokenzer","startNode","endNode","parseText","tokenizer","parseList","parseNamed","parseLiteral","parseLinkedModifier","getTokenCaption","parseLinkedKey","parseLinked","linkedNode","parsed","nextContext","emptyLinkedKeyNode","parseMessage","startOffset","endOffset","parsePlural","msgNode","hasEmptyMessage","parseResource","createTransformer","ast","traverseNodes","nodes","traverseNode","createCodeGenerator","sourceMap","breakLineCode","_needIndent","push","_newline","withBreakLine","_breakLineCode","indent","withNewLine","deindent","newline","generateLinkedNode","helper","generateNode","generateMessageNode","needIndent","generatePluralNode","generateResource","generate","helpers","baseCompile","assignedOptions","pathStateMachine","literalValueRE","isLiteral","stripQuotes","getPathCharType","formatSubPath","trimmed","subPathDepth","newChar","transition","typeMap","maybeUnescapeQuote","nextChar","resolveWithKeyValue","resolveValue","hit","last","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","arg1","modifier","fallbackWithSimple","fallbackWithLocaleChain","startLocale","DEFAULT_LOCALE","chain","block","appendBlockToChain","blocks","follow","appendLocaleToChain","appendItemToChain","VERSION","NOT_REOSLVED","MISSING_RESOLVE_VALUE","capitalize","getDefaultLinkedModifiers","_compiler","registerMessageCompiler","compiler","_resolver","registerMessageResolver","resolver","_fallbacker","registerLocaleFallbacker","fallbacker","_cid","createCoreContext","version","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","inc","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","arg3","datetime","overrides","parseDateTimeArgs","datetimeFormat","formatter","DATETIME_FORMAT_OPTIONS_KEYS","arg4","dateTime","clearDateTimeFormat","number","parseNumberArgs","numberFormat","NUMBER_FORMAT_OPTIONS_KEYS","clearNumberFormat","I18nErrorCodes","createI18nError","TransrateVNodeSymbol","DatetimePartsSymbol","NumberPartsSymbol","SetPluralRulesSymbol","InejctWithOption","handleFlatJson","subKeys","currentObj","getLocaleMessages","__i18n","flatJson","custom","resource","deepCopy","isNotObjectOrIsArray","des","getComponentOptions","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","rt","transrateVNode","numberParts","datetimeParts","setPluralRules","te","getLocaleMessage","resolveMessages","targetLocaleMessages","messageValue","tm","setLocaleMessage","mergeLocaleMessage","getDateTimeFormat","setDateTimeFormat","mergeDateTimeFormat","getNumberFormat","setNumberFormat","mergeNumberFormat","composer","convertComposerOptions","fallbackRoot","pluralizationRules","inheritLocale","sharedMessages","__injectWithOption","createVueI18n","vueI18n","componentInstanceCreatedListener","baseFormatProps","getInterpolateArg","slots","slot","getFragmentableTag","Fragment","Translation","i18n","useI18n","assignedAttrs","isVNode","renderFormatter","slotKeys","partFormatter","parts","NumberFormat","DatetimeFormat","getComposer$2","i18nInternal","vTDirective","_process","parsedValue","parseValue","makeParams","textContent","pluginOptions","useI18nComponentName","defineMixin","vuei18n","optionsI18n","mergeToRoot","I18nInjectionKey","createI18n","__legacyMode","__globalInjection","__allowComposition","__instances","globalScope","__global","createGlobal","__getInstance","__setInstance","__deleteInstance","injectGlobalFields","unmountApp","getI18nInstance","getGlobalComposer","getScope","useI18nForLegacy","getComposer","composerOptions","setupLifeCycle","legacyMode","useComponent","isLocale","_composer","warpWithDeps","globalExportProps","globalExportMethods","checkout","songbuilder","playlists","home","orderHistory","instantBuilder","preCart","en","loadLocales","__variableDynamicImportRuntimeHelper","page_loaded","initVue","initUUID"],"sources":["../../client/packages/utils/src/validators/error.ts","../../client/packages/utils/src/validators/form.ts","../../node_modules/lodash-es/_baseFindIndex.js","../../node_modules/lodash-es/_baseIsNaN.js","../../node_modules/lodash-es/_strictIndexOf.js","../../node_modules/lodash-es/_baseIndexOf.js","../../node_modules/lodash-es/_hasUnicode.js","../../node_modules/lodash-es/_baseFilter.js","../../node_modules/lodash-es/filter.js","../../node_modules/lodash-es/_createFind.js","../../node_modules/lodash-es/findIndex.js","../../node_modules/lodash-es/find.js","../../node_modules/lodash-es/_baseMap.js","../../node_modules/lodash-es/map.js","../../node_modules/lodash-es/isString.js","../../node_modules/lodash-es/indexOf.js","../../node_modules/lodash-es/isEmpty.js","../../node_modules/lodash-es/mapValues.js","../../node_modules/lodash-es/pickBy.js","../../node_modules/lodash-es/_baseSortBy.js","../../node_modules/lodash-es/_compareAscending.js","../../node_modules/lodash-es/_compareMultiple.js","../../node_modules/lodash-es/_baseOrderBy.js","../../node_modules/lodash-es/_asciiSize.js","../../node_modules/lodash-es/_unicodeSize.js","../../node_modules/lodash-es/_stringSize.js","../../node_modules/lodash-es/size.js","../../node_modules/lodash-es/sortBy.js","../../client/packages/utils/src/normalizers/cms.ts","../../client/packages/design-system/src/atoms/DImg.vue","../../client/packages/design-system/src/assets/config.ts","../../node_modules/@vueuse/shared/index.mjs","../../node_modules/@vueuse/core/index.mjs","../../client/packages/design-system/src/composables/useUserway.ts","../../client/packages/design-system/src/molecules/DUserWayLinkFooter.vue","../../client/packages/design-system/src/assets/staticOptions.ts","../../client/packages/design-system/src/composables/forms/useFormItemRender.ts","../../node_modules/@vue/devtools-shared/dist/index.js","../../node_modules/perfect-debounce/dist/index.mjs","../../node_modules/hookable/dist/index.mjs","../../node_modules/@vue/devtools-kit/dist/index.js","../../node_modules/vee-validate/dist/vee-validate.mjs","../../client/packages/design-system/src/composables/forms/useFieldValidator.ts","../../client/packages/design-system/src/forms/DFormItem.vue","../../client/packages/design-system/src/navigation/DSiteFooter.vue","../../client/packages/design-system/src/composables/useNotification.ts","../../client/apps/customer/components/navigation/SiteFooter.vue","../../client/packages/design-system/src/atoms/DSongfinchLogo.vue","../../client/packages/design-system/src/atoms/DLogoLink.vue","../../client/packages/design-system/src/atoms/DTag.vue","../../client/packages/design-system/src/molecules/DMobileMenuDropDown.vue","../../client/packages/utils/src/dom/body.ts","../../client/packages/design-system/src/composables/useModal.ts","../../client/packages/design-system/src/navigation/SiteNavigation.ts","../../client/packages/design-system/src/composables/useSetNavigationLogo.ts","../../client/packages/design-system/src/navigation/DSiteNavigation.vue","../../client/apps/customer/components/navigation/SiteNavigation.vue","../../node_modules/dayjs/plugin/duration.js","../../client/apps/customer/components/shared/CountdownTimer.vue","../../node_modules/dayjs/plugin/isBetween.js","../../client/apps/customer/composables/onPageLoaded.ts","../../client/apps/customer/components/shared/TopBanner.vue","../../node_modules/pinia/dist/pinia.mjs","../../client/packages/data-source/songbuilder/index.ts","../../client/apps/customer/composables/useSongBuilderProgress.ts","../../client/apps/customer/router/pages.js","../../client/apps/customer/helpers/routes_helper.js","../../client/apps/customer/store/shared.js","../../client/apps/customer/store/cms.js","../../client/apps/customer/composables/useProduct.ts","../../client/packages/utils/src/catchError/index.ts","../../client/apps/customer/composables/useReferralPage.ts","../../client/apps/customer/helpers/instantStepsHelpers.ts","../../client/apps/customer/composables/useInstantNames.ts","../../client/apps/customer/composables/useInstantProductBuilder.ts","../../client/apps/customer/store/cart.ts","../../client/apps/customer/helpers/temporaryEmail.ts","../../client/apps/customer/store/auth.js","../../client/apps/customer/helpers/apply_query_filters.js","../../client/apps/customer/store/artist.js","../../client/apps/customer/composables/product/useShowProductPaper.ts","../../client/apps/customer/store/store.js","../../client/apps/customer/store/playlist.js","../../client/apps/customer/store/index.js","../../client/apps/customer/router/song_builder_pages.js","../../client/apps/customer/composables/useLoadScript.ts","../../client/apps/customer/composables/useStripe.ts","../../client/apps/customer/router/checkout_pages.js","../../client/apps/customer/router/dashboard_pages.js","../../client/apps/customer/router/story_pages.js","../../client/apps/customer/router/ProductPages.js","../../client/apps/customer/router/templates.js","../../client/apps/customer/router/errors.js","../../client/apps/customer/router/artists_pages.js","../../client/apps/customer/router/popups.js","../../client/apps/customer/router/SongPages.js","../../client/apps/customer/router/redirects.js","../../client/apps/customer/router/referrals.js","../../client/apps/customer/router/instant.js","../../client/apps/customer/helpers/hash_scroll.js","../../client/apps/customer/helpers/tryReload.ts","../../client/apps/customer/router/index.js","../../client/apps/customer/store_v2/storeGetUserIdentifier.ts","../../client/apps/customer/store_v2/useSongBuilderStore.ts","../../client/apps/customer/components/global/StartSongButton.vue","../../node_modules/@medv/finder/finder.js","../../client/apps/customer/helpers/html_helpers.js","../../client/apps/customer/directives/cta_handler_directive.js","../../client/apps/customer/helpers/query_ad_id_handler.js","../../client/packages/shared/plugins/event_bus/index.js","../../client/apps/customer/composables/useTopBanner.ts","../../client/packages/data-source/auth/index.ts","../../client/packages/data-source/users/index.ts","../../client/apps/customer/composables/auth/useAuthExpress.ts","../../client/apps/customer/helpers/gtm_song_data_helper.js","../../client/apps/customer/store_v2/storeTempUser.ts","../../client/apps/customer/listeners/events.ts","../../client/apps/customer/app.vue","../../client/apps/customer/app.js","../../client/apps/customer/helpers/init_core.js","../../client/apps/customer/helpers/sentry.ts","../../client/apps/customer/helpers/attentive.ts","../../client/packages/shared/composables/useDoWhileWithDelay.ts","../../client/apps/customer/composables/onBrowserInteraction.ts","../../client/apps/customer/helpers/zendesk.ts","../../client/apps/customer/helpers/check_version.js","../../node_modules/axios-cache-adapter/dist/cache.js","../../client/apps/customer/helpers/axios_api_init.js","../../client/packages/shared/plugins/flags/index.ts","../../client/apps/customer/helpers/plugins_init.js","../../client/apps/customer/helpers/global_vars.js","../../client/apps/customer/helpers/check_submission.js","../../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","../../client/apps/customer/locales/en/shared.js","../../client/apps/customer/locales/en/checkout.js","../../client/apps/customer/locales/en/story.js","../../client/apps/customer/locales/en/songbuilder.js","../../client/apps/customer/locales/en/playlists.js","../../client/apps/customer/locales/en/home.js","../../client/apps/customer/locales/en/orderHistory.js","../../client/apps/customer/locales/en/instantBuilder.js","../../client/apps/customer/locales/en/cart.js","../../client/apps/customer/locales/en/preCart.js","../../client/apps/customer/locales/en/index.js","../../client/apps/customer/locales/index.js","../../client/apps/customer/mixins/page_loaded.js","../../client/apps/customer/main.js"],"sourcesContent":["import type {AxiosError} from \"axios\";\nimport type {SongFinchError} from \"@songfinch/types\";\n\nexport const isAxiosError = (error: unknown): error is AxiosError => {\n return !!(error as AxiosError)?.isAxiosError;\n};\n\nexport const isSongfinchError = (error: unknown): error is SongFinchError => {\n return !!error && typeof error === \"object\" && (\"_sfErrorIgnore\" in error || \"redirectsList\" in error);\n};\n","import {isObject} from \"./primitives\";\nimport type {OptionKeyValueType, OptionType} from \"@songfinch/types\";\n\n\nexport const isOptionKeyValue = (option: OptionType): option is OptionKeyValueType => {\n return (\n isObject(option) && \n typeof (option as OptionKeyValueType).label === \"string\" && \n \"value\" in option\n );\n};\n\nexport const isValidEmail = (email: string): boolean => {\n const emailRegex = /^[a-zA-Z\\d._%+-]+@[a-zA-Z\\d.-]+\\.[a-zA-Z]{2,}$/;\n return emailRegex.test(email);\n};","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nexport default baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nexport default strictIndexOf;\n","import baseFindIndex from './_baseFindIndex.js';\nimport baseIsNaN from './_baseIsNaN.js';\nimport strictIndexOf from './_strictIndexOf.js';\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nexport default baseIndexOf;\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\nexport default hasUnicode;\n","import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n}\n\nexport default baseFilter;\n","import arrayFilter from './_arrayFilter.js';\nimport baseFilter from './_baseFilter.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\nfunction filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default filter;\n","import baseIteratee from './_baseIteratee.js';\nimport isArrayLike from './isArrayLike.js';\nimport keys from './keys.js';\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nexport default createFind;\n","import baseFindIndex from './_baseFindIndex.js';\nimport baseIteratee from './_baseIteratee.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nexport default findIndex;\n","import createFind from './_createFind.js';\nimport findIndex from './findIndex.js';\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nexport default find;\n","import baseEach from './_baseEach.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nexport default baseMap;\n","import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nexport default map;\n","import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n","import baseIndexOf from './_baseIndexOf.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\nfunction indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n}\n\nexport default indexOf;\n","import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLike from './isArrayLike.js';\nimport isBuffer from './isBuffer.js';\nimport isPrototype from './_isPrototype.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\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 * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\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 empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nexport default isEmpty;\n","import baseAssignValue from './_baseAssignValue.js';\nimport baseForOwn from './_baseForOwn.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nexport default mapValues;\n","import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport basePickBy from './_basePickBy.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\n\n/**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\nfunction pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = baseIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n}\n\nexport default pickBy;\n","/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}\n\nexport default baseSortBy;\n","import isSymbol from './isSymbol.js';\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n}\n\nexport default compareAscending;\n","import compareAscending from './_compareAscending.js';\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n}\n\nexport default compareMultiple;\n","import arrayMap from './_arrayMap.js';\nimport baseGet from './_baseGet.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport baseSortBy from './_baseSortBy.js';\nimport baseUnary from './_baseUnary.js';\nimport compareMultiple from './_compareMultiple.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n}\n\nexport default baseOrderBy;\n","import baseProperty from './_baseProperty.js';\n\n/**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nvar asciiSize = baseProperty('length');\n\nexport default asciiSize;\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 * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nfunction unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n}\n\nexport default unicodeSize;\n","import asciiSize from './_asciiSize.js';\nimport hasUnicode from './_hasUnicode.js';\nimport unicodeSize from './_unicodeSize.js';\n\n/**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\nfunction stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n}\n\nexport default stringSize;\n","import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArrayLike from './isArrayLike.js';\nimport isString from './isString.js';\nimport stringSize from './_stringSize.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\nfunction size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n}\n\nexport default size;\n","import baseFlatten from './_baseFlatten.js';\nimport baseOrderBy from './_baseOrderBy.js';\nimport baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nexport default sortBy;\n","import type {NormalizedCTA, NormalizedAsset} from \"@songfinch/types\";\nimport type {Navigation, NormalizedNavigationItem, RawCMSMedia, RawCMSCta, RawCMSFaq} from \"@songfinch/types\";\n\nexport const normalizeCMSMedia = (rawCMSMedia?: RawCMSMedia): NormalizedAsset | undefined => {\n if (!rawCMSMedia) return undefined;\n const normalizedMedia: NormalizedAsset = {\n contentType: rawCMSMedia.asset.resource_type,\n title: rawCMSMedia.title,\n url: rawCMSMedia.asset.url\n };\n\n return normalizedMedia;\n};\n\n\nexport const normalizeCMSCta = (rawCMSCta?: RawCMSCta): NormalizedCTA | undefined => {\n if (!rawCMSCta) return undefined;\n const normalziedCTA: NormalizedCTA = {\n type: rawCMSCta.type,\n text: rawCMSCta.text,\n variant: rawCMSCta.variant\n };\n\n if (rawCMSCta.slug && (rawCMSCta.type === \"link\")) {\n normalziedCTA.link = {\n title: rawCMSCta.text,\n slug: rawCMSCta.slug,\n };\n }\n return normalziedCTA;\n};\n\nexport const normalizeCMSPageData = (data: unknown) => {\n if (!data) return undefined;\n return data;\n};\n\ntype RawBasNavigationItem = {\n label: \"Learn\"\n link: \"#\"\n external?: [\"external\"]\n badge?: \"new\" | \"premium\" | \"undefined\"\n}\n\ntype RawNavigationItem = RawBasNavigationItem & {\n sub_nav?: RawBasNavigationItem[]\n}\n\ntype RawFooterNavigationItem = RawBasNavigationItem & { \n title: string;\n links?: RawBasNavigationItem[]\n name?: string;\n external?: [\"external\"]\n}\n\nexport const normalizeSiteNavigationItem = (item: RawNavigationItem | RawFooterNavigationItem): NormalizedNavigationItem => {\n const normalizedItem: NormalizedNavigationItem = {\n title: item.label || (item as RawFooterNavigationItem).title,\n };\n\n if (item.external?.length) {\n normalizedItem.externalLink = item.link;\n } else {\n normalizedItem.slug = item.link;\n }\n\n if (item.badge && item.badge !== \"undefined\") {\n normalizedItem.tag = item.badge;\n }\n\n const subMenu = (item as RawNavigationItem).sub_nav || (item as RawFooterNavigationItem).links || undefined;\n \n if (subMenu) {\n normalizedItem.subNavItems = Object.values(subMenu).map(subItem => normalizeSiteNavigationItem(subItem));\n }\n \n return normalizedItem;\n};\n\n\nexport const normalizeSiteNavigation = (data: RawNavigationItem[]): Navigation => {\n if (!data) return [];\n return Object.values(data).map(item => normalizeSiteNavigationItem(item));\n};\n\nexport const normalizeSiteFooterNavigation = (data: RawFooterNavigationItem[]): Navigation => {\n if (!data) return [];\n return Object.values(data).map(item => normalizeSiteNavigationItem(item));\n};\n\nexport const normalizeFaqs = (faqs: RawCMSFaq[]) => {\n return faqs.map(\n (faq: {\n question: string;\n answer: string;\n }) => {\n return {\n title: faq.question,\n content: faq.answer\n };\n }\n );\n};","\n\n\n\n\n","export const s3AssetBasePath = \"https://media.songfinch.com\";","import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n const defaultValue = options == null ? void 0 : options.defaultValue;\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key, defaultValue);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a, _b;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(...args) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n let ms;\n let trailing;\n let leading;\n let rejectOnCancel;\n if (!isRef(args[0]) && typeof args[0] === \"object\")\n ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]);\n else\n [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?\\d+\\.?\\d*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\nfunction getLifeCycleTarget(target) {\n return target || getCurrentInstance();\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue(defaultValue);\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options || {};\n const watchers = [];\n const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeMount(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeUnmount(fn, target);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n const instance = getLifeCycleTarget();\n if (instance)\n onMounted(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onUnmounted(fn, target);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue(\n !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n toValue(element),\n toValue(value),\n index,\n toValue(array)\n )));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)\\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n const v = num % 100;\n return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n Yo: () => formatOrdinal(years),\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n Mo: () => formatOrdinal(month + 1),\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n Do: () => formatOrdinal(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n Ho: () => formatOrdinal(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n ho: () => formatOrdinal(hours % 12 || 12),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mo: () => formatOrdinal(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n so: () => formatOrdinal(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter,\n reset,\n ...controls\n };\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n const stop = watch(\n source,\n (v, ov, onInvalidate) => {\n if (v) {\n if (options == null ? void 0 : options.once)\n nextTick(() => stop());\n cb(v, ov, onInvalidate);\n }\n },\n {\n ...options,\n once: false\n }\n );\n return stop;\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, makeDestructurable, camelize, toValue, isClient, isObject, tryOnScopeDispose, isIOS, tryOnMounted, notNullish, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, createSingletonPromise, useTimeoutFn, pausableWatch, toRef, createEventHook, computedWithControl, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, toRefs, useIntervalFn, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, tryOnBeforeUnmount, identity, isDef, isWorker } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, isVue2, readonly, nextTick, reactive, markRaw, unref, getCurrentScope, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nfunction createReusableTemplate(options = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n return;\n }\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /* #__PURE__ */ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /* #__PURE__ */ defineComponent({\n inheritAttrs,\n setup(_, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots });\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n if (!isVue3) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n return;\n }\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n const optionsClone = isObject(options2) ? { ...options2 } : options2;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, optionsClone));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return noop;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n window.document.documentElement.addEventListener(\"click\", noop);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement))) {\n handler(event);\n }\n }, 0);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keydown\" });\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keypress\" });\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keyup\" });\n}\n\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n let posStart;\n let startTimestamp;\n let hasLongPressed = false;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n posStart = void 0;\n startTimestamp = void 0;\n hasLongPressed = false;\n }\n function onRelease(ev) {\n var _a2, _b2, _c;\n const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed];\n clear();\n if (!(options == null ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp)\n return;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - _posStart.x;\n const dy = ev.y - _posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed);\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n posStart = {\n x: ev.x,\n y: ev.y\n };\n startTimestamp = ev.timeStamp;\n timeout = setTimeout(\n () => {\n hasLongPressed = true;\n handler(ev);\n },\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n function onMove(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - posStart.x;\n const dy = ev.y - posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD))\n clear();\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n const cleanup = [\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n useEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], onRelease, listenerOptions)\n ];\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n if (keyCode >= 97 && keyCode <= 122)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n const instance = getCurrentInstance();\n if (instance) {\n onMounted(() => {\n isMounted.value = true;\n }, isVue2 ? void 0 : instance);\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useMutationObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...mutationOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => {\n const value = toValue(target);\n const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish);\n return new Set(items);\n });\n const stopWatch = watch(\n () => targets.value,\n (targets2) => {\n cleanup();\n if (isSupported.value && targets2.size) {\n observer = new MutationObserver(callback);\n targets2.forEach((el) => observer.observe(el, mutationOptions));\n }\n },\n { immediate: true, flush: \"post\" }\n );\n const takeRecords = () => {\n return observer == null ? void 0 : observer.takeRecords();\n };\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop,\n takeRecords\n };\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true,\n triggerOnRemoval = false\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = ref();\n const trigger = () => {\n activeElement.value = getDeepActiveElement();\n };\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n trigger();\n }, true);\n useEventListener(window, \"focus\", trigger, true);\n }\n if (triggerOnRemoval) {\n useMutationObserver(document, (mutations) => {\n mutations.filter((m) => m.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => {\n if (node === activeElement.value)\n trigger();\n });\n }, {\n childList: true,\n subtree: true\n });\n }\n trigger();\n return activeElement;\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n fpsLimit = void 0,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null;\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n if (!previousFrameTimestamp)\n previousFrameTimestamp = timestamp;\n const delta = timestamp - previousFrameTimestamp;\n if (intervalLimit && delta < intervalLimit) {\n rafId = window.requestAnimationFrame(loop);\n return;\n }\n previousFrameTimestamp = timestamp;\n fn({ delta, timestamp });\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n previousFrameTimestamp = 0;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n !animate.value && update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n el && update();\n });\n watch(() => keyframes, (value) => {\n !animate.value && update();\n if (!unrefElement(target) && animate.value) {\n animate.value.effect = new KeyframeEffect(\n unrefElement(target),\n toValue(value),\n animateOptions\n );\n }\n }, { deep: true });\n tryOnMounted(() => {\n nextTick(() => update(true));\n });\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n if (!animate.value)\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n useEventListener(animate, \"finish\", () => {\n var _a;\n if (commitStyles)\n (_a = animate.value) == null ? void 0 : _a.commitStyles();\n });\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options || {};\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery(options = {}) {\n const { navigator = defaultNavigator } = options;\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator && typeof navigator.getBattery === \"function\");\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", handler);\n else\n mediaQuery.removeListener(handler);\n };\n const stopWatch = watchEffect(() => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(toValue(query));\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", handler);\n else\n mediaQuery.addListener(handler);\n matches.value = mediaQuery.matches;\n });\n tryOnScopeDispose(() => {\n stopWatch();\n cleanup();\n mediaQuery = void 0;\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetifyV2 = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1264,\n xl: 1904\n};\nconst breakpointsVuetifyV3 = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n xxl: 2560\n};\nconst breakpointsVuetify = breakpointsVuetifyV2;\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 0,\n sm: 600,\n md: 1024,\n lg: 1440,\n xl: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\nconst breakpointsPrimeFlex = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = toValue(breakpoints[toValue(k)]);\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow, strategy = \"min-width\" } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(() => `(min-width: ${getValue(k)})`, options);\n };\n const smallerOrEqual = (k) => {\n return useMediaQuery(() => `(max-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => strategy === \"min-width\" ? greaterOrEqual(k) : smallerOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n function current() {\n const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n return Object.assign(shortcutMethods, {\n greaterOrEqual,\n smallerOrEqual,\n greater(k) {\n return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options);\n },\n smaller(k) {\n return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options);\n },\n between(a, b) {\n return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n },\n current,\n active() {\n const bps = current();\n return computed(() => bps.value.length === 0 ? \"\" : bps.value.at(-1));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation(options = {}) {\n const { window = defaultWindow } = options;\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref2] of objectEntries(refs)) {\n watch(ref2, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive({\n trigger,\n state: state2,\n length,\n origin,\n ...refs\n });\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const permissionRead = usePermission(\"clipboard-read\");\n const permissionWrite = usePermission(\"clipboard-write\");\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value && isAllowed(permissionRead.value)) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value && isAllowed(permissionWrite.value))\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n function isAllowed(status) {\n return status === \"granted\" || status === \"prompt\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nfunction useClipboardItems(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500\n } = options;\n const isSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const content = ref([]);\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateContent() {\n if (isSupported.value) {\n navigator.clipboard.read().then((items) => {\n content.value = items;\n });\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateContent);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n await navigator.clipboard.write(value);\n content.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n return {\n isSupported,\n content,\n copied,\n copy\n };\n}\n\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, {\n ...options,\n deep,\n immediate\n });\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n },\n initOnMounted\n } = options;\n const data = (shallow ? shallowRef : ref)(typeof defaults === \"function\" ? defaults() : defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n if (window && listenToStorageChanges) {\n tryOnMounted(() => {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n if (initOnMounted)\n update();\n });\n }\n if (!initOnMounted)\n update();\n function dispatchWriteEvent(oldValue, newValue) {\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue,\n storageArea: storage\n }\n }));\n }\n }\n function write(v) {\n try {\n const oldValue = storage.getItem(key);\n if (v == null) {\n dispatchWriteEvent(oldValue, null);\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n dispatchWriteEvent(oldValue, serialized);\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit != null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return { ...rawInit, ...value };\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n return data;\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = {\n auto: \"\",\n light: \"light\",\n dark: \"dark\",\n ...options.modes || {}\n };\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(() => store.value === \"auto\" ? system.value : store.value);\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n const styleString = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n style.appendChild(document.createTextNode(styleString));\n window.document.head.appendChild(style);\n }\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n try {\n return Object.assign(auto, { store, system, state });\n } catch (e) {\n return auto;\n }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue = \"\", observe = false } = options;\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n updateCssVar,\n { immediate: true }\n );\n watch(\n variable,\n (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(toValue(prop), val);\n }\n );\n return variable;\n}\n\nfunction useCurrentElement(rootComponent) {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev,\n go: set\n };\n}\n\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode({\n ...options,\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n });\n const system = computed(() => {\n if (mode.system) {\n return mode.system.value;\n } else {\n const preferredDark = usePreferredDark({ window });\n return preferredDark.value ? \"dark\" : \"light\";\n }\n });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource });\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return {\n ...manualHistory,\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n };\n}\n\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const pixelRatio = ref(1);\n if (window) {\n let observe2 = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup2();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe2, { once: true });\n }, cleanup2 = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe2);\n };\n let media;\n observe2();\n tryOnScopeDispose(cleanup2);\n }\n return { pixelRatio };\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n var _a2;\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.addEventListener(\"ended\", stop));\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility(options = {}) {\n const { document = defaultDocument } = options;\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n containerElement,\n handle: draggingHandle = target\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (e.button !== 0)\n return;\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const container = toValue(containerElement);\n const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n const targetRect = toValue(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n const container = toValue(containerElement);\n const targetRect = toValue(target).getBoundingClientRect();\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\") {\n x = e.clientX - pressedDelta.value.x;\n if (container)\n x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);\n }\n if (axis === \"y\" || axis === \"both\") {\n y = e.clientY - pressedDelta.value.y;\n if (container)\n y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);\n }\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = { capture: (_b = options.capture) != null ? _b : true };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return {\n ...toRefs(position),\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n };\n}\n\nfunction useDropZone(target, options = {}) {\n const isOverDropZone = ref(false);\n const files = shallowRef(null);\n let counter = 0;\n let isDataTypeIncluded = true;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const getFiles = (event) => {\n var _a, _b;\n const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n return files.value = list.length === 0 ? null : list;\n };\n useEventListener(target, \"dragenter\", (event) => {\n var _a, _b;\n const types = Array.from(((_a = event == null ? void 0 : event.dataTransfer) == null ? void 0 : _a.items) || []).map((i) => i.kind === \"file\" ? i.type : null).filter(notNullish);\n if (_options.dataTypes && event.dataTransfer) {\n const dataTypes = unref(_options.dataTypes);\n isDataTypeIncluded = typeof dataTypes === \"function\" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true;\n if (!isDataTypeIncluded)\n return;\n }\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n (_b = _options.onEnter) == null ? void 0 : _b.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragover\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragleave\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"drop\", (event) => {\n var _a;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nfunction useResizeObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...observerOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els)\n _el && observer.observe(_el, observerOptions);\n }\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n useMutationObserver(target, update, {\n attributeFilter: [\"style\", \"class\"]\n });\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = ref(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return {\n isSupported,\n element,\n ...controls\n };\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n window = defaultWindow\n } = options;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n const { stop: stop1 } = useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const rect = $elem.getBoundingClientRect();\n width.value = rect.width;\n height.value = rect.height;\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n tryOnMounted(() => {\n const ele = unrefElement(target);\n if (ele) {\n width.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n height.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n }\n });\n const stop2 = watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n function stop() {\n stop1();\n stop2();\n }\n return {\n width,\n height,\n stop\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = ref(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, options = {}) {\n const { window = defaultWindow, scrollTarget, threshold = 0 } = options;\n const elementIsVisible = ref(false);\n useIntersectionObserver(\n element,\n (intersectionObserverEntries) => {\n let isIntersecting = elementIsVisible.value;\n let latestTime = 0;\n for (const entry of intersectionObserverEntries) {\n if (entry.time >= latestTime) {\n latestTime = entry.time;\n isIntersecting = entry.isIntersecting;\n }\n }\n elementIsVisible.value = isIntersecting;\n },\n {\n root: scrollTarget,\n window,\n threshold\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction resolveNestedOptions$1(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const urlRef = toRef(url);\n const lastEventId = shallowRef(null);\n let explicitlyClosed = false;\n let retried = 0;\n const {\n withCredentials = false,\n immediate = true\n } = options;\n const close = () => {\n if (isClient && eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n explicitlyClosed = true;\n }\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const es = new EventSource(urlRef.value, { withCredentials });\n status.value = \"CONNECTING\";\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n if (es.readyState === 2 && !explicitlyClosed && options.autoReconnect) {\n es.close();\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions$1(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n lastEventId.value = e.lastEventId;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n };\n const open = () => {\n if (!isClient)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n tryOnScopeDispose(close);\n return {\n eventSource,\n event,\n data,\n status,\n error,\n open,\n close,\n lastEventId\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n if (!elements || elements.length === 0) {\n const link = document == null ? void 0 : document.createElement(\"link\");\n if (link) {\n link.rel = rel;\n link.href = `${baseUrl}${icon}`;\n link.type = `image/${icon.split(\".\").pop()}`;\n document == null ? void 0 : document.head.append(link);\n }\n return;\n }\n elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nconst reAbsolute = /^(?:[a-z][a-z\\d+\\-.]*:)?\\/\\//i;\nfunction isAbsoluteURL(url) {\n return reAbsolute.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries(headers.entries());\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback)\n return { ...ctx, ...await callback(ctx) };\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = { ...ctx, ...await callback(ctx) };\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = {\n ...options,\n ...args[0],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n };\n } else {\n fetchOptions = {\n ...fetchOptions,\n ...args[0],\n headers: {\n ...headersToObject(fetchOptions.headers) || {},\n ...headersToObject(args[0].headers) || {}\n }\n };\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = {\n ...options,\n ...args[1],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n };\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = {\n immediate: true,\n refetch: false,\n timeout: 0,\n updateDataOnError: false\n };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = { ...options, ...args[0] };\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = { ...options, ...args[1] };\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = {\n ...fetchOptions,\n signal: controller.signal\n };\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n let executeCounter = 0;\n const execute = async (throwOnFailed = false) => {\n var _a2, _b;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n executeCounter += 1;\n const currentExecuteCounter = executeCounter;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const payload = toValue(config.payload);\n if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: {\n ...defaultFetchOptions,\n ...fetchOptions\n },\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return fetch(\n context.url,\n {\n ...defaultFetchOptions,\n ...context.options,\n headers: {\n ...headersToObject(defaultFetchOptions.headers),\n ...headersToObject((_b = context.options) == null ? void 0 : _b.headers)\n }\n }\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse.clone()[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch) {\n ({ data: responseData } = await options.afterFetch({\n data: responseData,\n response: fetchResponse\n }));\n }\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return fetchResponse;\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError) {\n ({ error: errorData, data: responseData } = await options.onFetchError({\n data: responseData,\n error: fetchError,\n response: response.value\n }));\n }\n error.value = errorData;\n if (options.updateDataOnError)\n data.value = responseData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n throw fetchError;\n return null;\n }).finally(() => {\n if (currentExecuteCounter === executeCounter)\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished: readonly(isFinished),\n isFetching: readonly(isFetching),\n statusCode,\n response,\n error,\n data,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false,\n directory: false\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n const { on: onChange, trigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n trigger(files.value);\n };\n }\n const reset = () => {\n files.value = null;\n if (input && input.value) {\n input.value = \"\";\n trigger(null);\n }\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n ...localOptions\n };\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n input.webkitdirectory = _options.directory;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onChange\n };\n}\n\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker({ ...toValue(options), ..._options });\n fileHandle.value = handle;\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n data.value = void 0;\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n await updateFile();\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false, preventScroll = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n });\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus({ preventScroll });\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n });\n const isFullscreen = ref(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n useEventListener(document, eventHandlers, handlerCallback, false);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n index: gamepad.index,\n connected: gamepad.connected,\n mapping: gamepad.mapping,\n timestamp: gamepad.timestamp,\n vibrationActuator: gamepad.vibrationActuator,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (const gamepad of _gamepads) {\n if (gamepad && gamepads.value[gamepad.index])\n gamepads.value[gamepad.index] = stateFromGamepad(gamepad);\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (const gamepad of _gamepads) {\n if (gamepad && gamepads.value[gamepad.index])\n onGamepadConnected(gamepad);\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n if (clazz)\n img.className = clazz;\n if (loading)\n img.loading = loading;\n if (crossorigin)\n img.crossOrigin = crossorigin;\n if (referrerPolicy)\n img.referrerPolicy = referrerPolicy;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n {\n resetOnExecute: true,\n ...asyncStateOptions\n }\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c, _d;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n const scrollContainer = ((_d = _element == null ? void 0 : _element.document) == null ? void 0 : _d.documentElement) || (_element == null ? void 0 : _element.documentElement) || _element;\n if (x != null)\n internalX.value = scrollContainer.scrollLeft;\n if (y != null)\n internalY.value = scrollContainer.scrollTop;\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n var _a;\n if (!window)\n return;\n const el = ((_a = target == null ? void 0 : target.document) == null ? void 0 : _a.documentElement) || (target == null ? void 0 : target.documentElement) || unrefElement(target);\n const { display, flexDirection } = getComputedStyle(el);\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft) <= (offset.left || 0);\n const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n var _a;\n if (!window)\n return;\n const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n tryOnMounted(() => {\n try {\n const _element = toValue(element);\n if (!_element)\n return;\n setArrivedState(_element);\n } catch (e) {\n onError(e);\n }\n });\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nfunction resolveElement(el) {\n if (typeof Window !== \"undefined\" && el instanceof Window)\n return el.document.documentElement;\n if (typeof Document !== \"undefined\" && el instanceof Document)\n return el.documentElement;\n return el;\n}\n\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100,\n canLoadMore = () => true\n } = options;\n const state = reactive(useScroll(\n element,\n {\n ...options,\n offset: {\n [direction]: (_a = options.distance) != null ? _a : 0,\n ...options.offset\n }\n }\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n return resolveElement(toValue(element));\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value))\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n return {\n isLoading\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n target = toRef(target);\n options = {\n ...defaultOptions,\n ...options\n };\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = toValue(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n });\n useEventListener(target, \"loadeddata\", () => waiting.value = false);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n });\n useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on\n };\n}\n\nfunction getMapVue2Compat() {\n const data = shallowReactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n}\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return shallowReactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return shallowReactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst UseMouseBuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n scroll = true,\n eventFilter\n } = options;\n let _prevMouseEvent = null;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n _prevMouseEvent = event;\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const scrollHandler = () => {\n if (!_prevMouseEvent || !window)\n return;\n const pos = extractor(_prevMouseEvent);\n if (_prevMouseEvent instanceof MouseEvent && pos) {\n x.value = pos[0] + window.scrollX;\n y.value = pos[1] + window.scrollY;\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n if (scroll && type === \"page\")\n useEventListener(window, \"scroll\", scrollHandlerWrapper, { passive: true });\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const type = options.type || \"page\";\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + (type === \"page\" ? window.pageXOffset : 0);\n elementPositionY.value = top + (type === \"page\" ? window.pageYOffset : 0);\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n capture = false,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true, capture });\n useEventListener(window, \"mouseup\", onReleased, { passive: true, capture });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"drop\", onReleased, { passive: true, capture });\n useEventListener(window, \"dragend\", onReleased, { passive: true, capture });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true, capture });\n useEventListener(window, \"touchend\", onReleased, { passive: true, capture });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true, capture });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return {\n now,\n ...controls\n };\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page)) {\n syncRef(page, currentPage, {\n direction: isReadonly(page) ? \"ltr\" : \"both\"\n });\n }\n if (isRef(pageSize)) {\n syncRef(pageSize, currentPageSize, {\n direction: isReadonly(pageSize) ? \"ltr\" : \"both\"\n });\n }\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (isSupported.value && typeof screenOrientation.lock === \"function\")\n return screenOrientation.lock(type);\n return Promise.reject(new Error(\"Not supported\"));\n };\n const unlockOrientation = () => {\n if (isSupported.value && typeof screenOrientation.unlock === \"function\")\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const screenOrientation = reactive(useScreenOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) {\n return \"deviceOrientation\";\n }\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n let value;\n switch (screenOrientation.orientation) {\n case \"landscape-primary\":\n value = orientation.gamma / 90;\n break;\n case \"landscape-secondary\":\n value = -orientation.gamma / 90;\n break;\n case \"portrait-primary\":\n value = -orientation.beta / 90;\n break;\n case \"portrait-secondary\":\n value = orientation.beta / 90;\n break;\n default:\n value = -orientation.beta / 90;\n }\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n let value;\n switch (screenOrientation.orientation) {\n case \"landscape-primary\":\n value = orientation.beta / 90;\n break;\n case \"landscape-secondary\":\n value = -orientation.beta / 90;\n break;\n case \"portrait-primary\":\n value = orientation.gamma / 90;\n break;\n case \"portrait-secondary\":\n value = -orientation.gamma / 90;\n break;\n default:\n value = orientation.gamma / 90;\n }\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nfunction usePerformanceObserver(options, callback) {\n const {\n window = defaultWindow,\n immediate = true,\n ...performanceOptions\n } = options;\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return {\n ...toRefs(state),\n isInside\n };\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock();\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n disableTextSelect = false\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n })\n ];\n tryOnMounted(() => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n if (disableTextSelect) {\n (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty(\"-webkit-user-select\", \"none\");\n (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty(\"-ms-user-select\", \"none\");\n (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty(\"user-select\", \"none\");\n }\n });\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow = \"\";\n watch(toRef(element), (el) => {\n const target = resolveElement(toValue(el));\n if (target) {\n const ele = target;\n if (!elInitialOverflow.get(ele))\n elInitialOverflow.set(ele, ele.style.overflow);\n if (ele.style.overflow !== \"hidden\")\n initialOverflow = ele.style.overflow;\n if (ele.style.overflow === \"hidden\")\n return isLocked.value = true;\n if (isLocked.value)\n return ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const el = resolveElement(toValue(element));\n if (!el || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n el,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n el.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const el = resolveElement(toValue(element));\n if (!el || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n el.style.overflow = initialOverflow;\n elInitialOverflow.delete(el);\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = {\n ...toValue(shareOptions),\n ...toValue(overrideOptions)\n };\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const currentResult = event.results[event.resultIndex];\n const { transcript } = currentResult[0];\n isFinal.value = currentResult.isFinal;\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorageAsync\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = { ...rawInit, ...value };\n else data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n var _a;\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n const styleProp = (_a = options == null ? void 0 : options.styleProp) != null ? _a : \"height\";\n const textareaScrollHeight = ref(1);\n function triggerResize() {\n var _a2;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style[styleProp] = \"1px\";\n textareaScrollHeight.value = (_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight;\n if (options == null ? void 0 : options.styleTarget)\n toValue(options.styleTarget).style[styleProp] = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style[styleProp] = height;\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n watch(textareaScrollHeight, () => {\n var _a2;\n return (_a2 = options == null ? void 0 : options.onResize) == null ? void 0 : _a2.call(options);\n });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const { now, ...controls } = useNow({ interval: updateInterval, controls: true });\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return {\n timeAgo,\n ...controls\n };\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval, { immediate: false });\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return {\n timestamp: ts,\n ...controls\n };\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b, _c;\n const {\n document = defaultDocument,\n restoreOnUnmount = (t) => t\n } = options;\n const originalTitle = (_a = document == null ? void 0 : document.title) != null ? _a : \"\";\n const title = toRef((_b = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _b : null);\n const isReadonly = newTitle && typeof newTitle === \"function\";\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (t, o) => {\n if (t !== o && document)\n document.title = format(typeof t === \"string\" ? t : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_c = document.head) == null ? void 0 : _c.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n tryOnBeforeUnmount(() => {\n if (restoreOnUnmount) {\n const restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n if (restoredTitle != null && document)\n document.title = restoredTitle;\n }\n });\n return title;\n}\n\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, {\n ...options,\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n });\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n tryOnScopeDispose(() => {\n stop();\n });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n let isUpdating = false;\n watch(\n () => props[key],\n (v) => {\n if (!isUpdating) {\n isUpdating = true;\n proxy.value = cloneFn(v);\n nextTick(() => isUpdating = false);\n }\n }\n );\n watch(\n proxy,\n (v) => {\n if (!isUpdating && (v !== props[key] || deep))\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props) {\n ret[key] = useVModel(\n props,\n key,\n emit,\n options\n );\n }\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, containerRef, calculateRange) {\n watch([size.width, size.height, list, containerRef], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, containerRef, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, containerRef, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n}\n\nfunction useWebNotification(options = {}) {\n const {\n window = defaultWindow,\n requestPermissions: _requestForPermissions = true\n } = options;\n const defaultWebNotificationOptions = options;\n const isSupported = useSupported(() => {\n if (!window || !(\"Notification\" in window))\n return false;\n try {\n new Notification(\"\");\n } catch (e) {\n return false;\n }\n return true;\n });\n const permissionGranted = ref(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n const notification = ref(null);\n const ensurePermissions = async () => {\n if (!isSupported.value)\n return;\n if (!permissionGranted.value && Notification.permission !== \"denied\") {\n const result = await Notification.requestPermission();\n if (result === \"granted\")\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value || !permissionGranted.value)\n return;\n const options2 = Object.assign({}, defaultWebNotificationOptions, overrides);\n notification.value = new Notification(options2.title || \"\", options2);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n if (_requestForPermissions)\n tryOnMounted(ensurePermissions);\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n ensurePermissions,\n permissionGranted,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const close = (code = 1e3, reason) => {\n if (!isClient || !wsRef.value)\n return;\n explicitlyClosed = true;\n resetHeartbeat();\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n wsRef.value = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n explicitlyClosed = false;\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n if (isClient)\n useEventListener(\"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n if (!isClient && !isWorker)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n open();\n watch(urlRef, open);\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction depsParser(deps, localDeps) {\n if (deps.length === 0 && localDeps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n const depsFunctionString = localDeps.filter((dep) => typeof dep === \"function\").map((fn) => {\n const str = fn.toString();\n if (str.trim().startsWith(\"function\")) {\n return str;\n } else {\n const name = fn.name;\n return `const ${name} = ${str}`;\n }\n }).join(\";\");\n const importString = `importScripts(${depsString});`;\n return `${depsString.trim() === \"\" ? \"\" : importString} ${depsFunctionString}`;\n}\n\nfunction createWorkerBlobUrl(fn, deps, localDeps) {\n const blobCode = `${depsParser(deps, localDeps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n localDependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies, localDependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n e.preventDefault();\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll(options = {}) {\n const { window = defaultWindow, behavior = \"auto\" } = options;\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const internalX = ref(window.scrollX);\n const internalY = ref(window.scrollY);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo({ left: x2, behavior });\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo({ top: y2, behavior });\n }\n });\n useEventListener(\n window,\n \"scroll\",\n () => {\n internalX.value = window.scrollX;\n internalY.value = window.scrollY;\n },\n {\n capture: false,\n passive: true\n }\n );\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, breakpointsVuetifyV2, breakpointsVuetifyV3, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","import {useScriptTag} from \"@vueuse/core\";\nimport {onBeforeUnmount, onBeforeMount, ref} from \"vue\";\n\ninterface UserWayEventDetail {\n userWayInstance: {\n iconVisibilityOff: () => void;\n };\n}\n\ndeclare global {\n interface Window {\n UserWay?: {\n widgetOpen: () => void;\n };\n }\n}\n\nexport default function useUserway(account: string) {\n const isLoading = ref(false);\n const isReady = ref(false);\n\n const hideUserway = (event: CustomEvent) => {\n const instance = event.detail.userWayInstance;\n instance.iconVisibilityOff();\n };\n\n const open = () => {\n isLoading.value = true;\n window.UserWay?.widgetOpen();\n setTimeout(() => isLoading.value = false, 3000); // I didn't find the way to check if userway is opened\n };\n\n onBeforeUnmount(() => {\n document.removeEventListener(\"userway:init_completed\", hideUserway as EventListener);\n });\n\n document.addEventListener(\"userway:init_completed\", hideUserway as EventListener);\n\n onBeforeMount(async () => {\n if (!account && import.meta.env.PROD) {\n console.error(\"Userway missing account id\");\n return;\n } \n\n try {\n const {load} = useScriptTag(\n \"https://cdn.userway.org/widget.js\",\n () => {},\n {attrs: {\"data-account\": account}, manual: true}\n );\n await load();\n isReady.value= true;\n } catch (e) {\n console.error(\"Userway failed to load\");\n }\n });\n\n return {open, isLoading, isReady};\n}\n","\n\n\n\n\n","import type {StaticOptionsIdType, FormOptionsType} from \"@songfinch/types\";\n\ntype StaticOptionsObject = {\n [k: string]: FormOptionsType[];\n};\n\nconst staticOptions: StaticOptionsObject = {\n pickForMe: [\n {\n key: \"Help me find the perfect artist\",\n value: true,\n },\n {\n key: \"I know who I want\",\n value: false,\n },\n ],\n relationship: [\n \"Wife\",\n \"Husband\",\n \"Partner\",\n \"Boyfriend\",\n \"Girlfriend\",\n \"Fiancé/Fiancée\",\n \"Significant Other\",\n \"Mom\",\n \"Dad\",\n \"Parents\",\n \"Daughter\",\n \"Son\",\n \"Children\",\n \"Grandmother\",\n \"Grandfather\",\n \"Grandparents\",\n \"Family\",\n \"Friend\",\n \"Other\",\n ],\n occasion: [\n \"Anniversary\",\n \"Birthday\",\n \"Christmas\",\n \"Engagement\",\n \"Father's Day\",\n \"Graduation\",\n \"Just Because\",\n \"Memorial\",\n \"Mother's Day\",\n \"New Baby\",\n \"Proposal\",\n \"Valentine's Day\",\n \"Wedding\",\n \"Other\",\n ],\n promptChoice: [\n \"Your relationship story\",\n \"Favorite memories together\",\n \"Favorite things about them\",\n \"What they mean to you\",\n \"Favorite things to do together\",\n \"How they’ve shaped you\",\n \"Inside jokes and funny stories\",\n \"Advice you have for them\",\n \"Other stories or memories\",\n ],\n genre: [\n {\n key: \"Rap / Hip-Hop\",\n value: \"3\",\n },\n {\n key: \"Folk\",\n value: \"4\",\n },\n {\n key: \"Rock\",\n value: \"8\",\n },\n {\n key: \"Christian\",\n value: \"9\",\n },\n {\n key: \"R\\u0026B\",\n value: \"6\",\n },\n {\n key: \"Country\",\n value: \"1\",\n },\n {\n key: \"Singer Songwriter\",\n value: \"2\",\n },\n {\n key: \"Acoustic Pop\",\n value: \"5\",\n },\n {\n key: \"Spanish\",\n value: \"10\",\n },\n ],\n gender: [\n {\n key: \"Female\",\n value: \"2\",\n },\n {\n key: \"Male\",\n value: \"1\",\n },\n {\n key: \"No Preference\",\n value: \"3\",\n },\n ],\n moods: [\n {\n key: \"happy\",\n value: \"4\",\n },\n {\n key: \"lighthearted\",\n value: \"5\",\n },\n {\n key: \"comical\",\n value: \"2\",\n },\n {\n key: \"heartfelt\",\n value: \"43\",\n },\n {\n key: \"uplifting\",\n value: \"9\",\n },\n\n {\n key: \"romantic\",\n value: \"7\",\n },\n {\n key: \"reflective\",\n value: \"6\",\n },\n {\n key: \"somber\",\n value: \"8\",\n },\n ],\n tempo: [\n {\n key: \"Slow\",\n value: \"2\",\n },\n {\n key: \"Medium\",\n value: \"4\",\n },\n {\n key: \"Up-tempo\",\n value: \"3\",\n },\n ],\n};\n\nexport const getFormInputStaticOptions = (\n staticOptionsId: StaticOptionsIdType,\n): FormOptionsType[] => {\n return staticOptions[staticOptionsId];\n};\n","import {defineAsyncComponent} from \"vue\";\nimport type {FormItemTypes} from \"@songfinch/types\";\n\nexport function useFormItemRender() {\n const formComponents = {\n text: defineAsyncComponent(() => import(\"../../forms/DInput.vue\")),\n email: defineAsyncComponent(() => import(\"../../forms/DInput.vue\")),\n url: defineAsyncComponent(() => import(\"../../forms/DInput.vue\")),\n password: defineAsyncComponent(() => import(\"../../forms/DInput.vue\")),\n phone: defineAsyncComponent(() => import(\"../../forms/DPhone.vue\")),\n textarea: defineAsyncComponent(() => import(\"../../forms/DTextarea.vue\")),\n checkbox: defineAsyncComponent(() => import(\"../../forms/DCheckbox.vue\")),\n select: defineAsyncComponent(() => import(\"../../forms/DSelect.vue\")),\n singleselect: defineAsyncComponent(\n () => import(\"../../forms/DSingleSelect.vue\"),\n ),\n multiselect: defineAsyncComponent(\n () => import(\"../../forms/DMultiSelect.vue\"),\n ),\n button: defineAsyncComponent(() => import(\"../../forms/DInput.vue\")),\n inputWithSubmit: defineAsyncComponent(\n () => import(\"../../forms/DInputWithSubmit.vue\"),\n ),\n };\n\n const isFormType = (typename: string): typename is FormItemTypes =>\n Object.keys(formComponents).includes(typename);\n\n const resolveFormItem = (typename: FormItemTypes) => {\n if (isFormType(typename)) {\n return formComponents[typename];\n }\n // Todo log error somewhere if not defined\n };\n\n return {\n resolveFormItem,\n formComponents,\n };\n}\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target2, \"default\", { value: mod, enumerable: true }) : target2,\n mod\n));\n\n// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.0_@types+node@22.10.1__@swc+core@1.5.29_jiti@2.0.0_p_swvvp2d4pgn6xuiiec4l4x2i7a/node_modules/tsup/assets/esm_shims.js\nvar init_esm_shims = __esm({\n \"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.0_@types+node@22.10.1__@swc+core@1.5.29_jiti@2.0.0_p_swvvp2d4pgn6xuiiec4l4x2i7a/node_modules/tsup/assets/esm_shims.js\"() {\n \"use strict\";\n }\n});\n\n// ../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js\nvar require_rfdc = __commonJS({\n \"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js\"(exports, module) {\n \"use strict\";\n init_esm_shims();\n module.exports = rfdc2;\n function copyBuffer(cur) {\n if (cur instanceof Buffer) {\n return Buffer.from(cur);\n }\n return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);\n }\n function rfdc2(opts) {\n opts = opts || {};\n if (opts.circles) return rfdcCircles(opts);\n const constructorHandlers = /* @__PURE__ */ new Map();\n constructorHandlers.set(Date, (o) => new Date(o));\n constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));\n constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));\n if (opts.constructorHandlers) {\n for (const handler2 of opts.constructorHandlers) {\n constructorHandlers.set(handler2[0], handler2[1]);\n }\n }\n let handler = null;\n return opts.proto ? cloneProto : clone;\n function cloneArray(a, fn) {\n const keys = Object.keys(a);\n const a2 = new Array(keys.length);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n const cur = a[k];\n if (typeof cur !== \"object\" || cur === null) {\n a2[k] = cur;\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n a2[k] = handler(cur, fn);\n } else if (ArrayBuffer.isView(cur)) {\n a2[k] = copyBuffer(cur);\n } else {\n a2[k] = fn(cur);\n }\n }\n return a2;\n }\n function clone(o) {\n if (typeof o !== \"object\" || o === null) return o;\n if (Array.isArray(o)) return cloneArray(o, clone);\n if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n return handler(o, clone);\n }\n const o2 = {};\n for (const k in o) {\n if (Object.hasOwnProperty.call(o, k) === false) continue;\n const cur = o[k];\n if (typeof cur !== \"object\" || cur === null) {\n o2[k] = cur;\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n o2[k] = handler(cur, clone);\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur);\n } else {\n o2[k] = clone(cur);\n }\n }\n return o2;\n }\n function cloneProto(o) {\n if (typeof o !== \"object\" || o === null) return o;\n if (Array.isArray(o)) return cloneArray(o, cloneProto);\n if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n return handler(o, cloneProto);\n }\n const o2 = {};\n for (const k in o) {\n const cur = o[k];\n if (typeof cur !== \"object\" || cur === null) {\n o2[k] = cur;\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n o2[k] = handler(cur, cloneProto);\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur);\n } else {\n o2[k] = cloneProto(cur);\n }\n }\n return o2;\n }\n }\n function rfdcCircles(opts) {\n const refs = [];\n const refsNew = [];\n const constructorHandlers = /* @__PURE__ */ new Map();\n constructorHandlers.set(Date, (o) => new Date(o));\n constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));\n constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));\n if (opts.constructorHandlers) {\n for (const handler2 of opts.constructorHandlers) {\n constructorHandlers.set(handler2[0], handler2[1]);\n }\n }\n let handler = null;\n return opts.proto ? cloneProto : clone;\n function cloneArray(a, fn) {\n const keys = Object.keys(a);\n const a2 = new Array(keys.length);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n const cur = a[k];\n if (typeof cur !== \"object\" || cur === null) {\n a2[k] = cur;\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n a2[k] = handler(cur, fn);\n } else if (ArrayBuffer.isView(cur)) {\n a2[k] = copyBuffer(cur);\n } else {\n const index = refs.indexOf(cur);\n if (index !== -1) {\n a2[k] = refsNew[index];\n } else {\n a2[k] = fn(cur);\n }\n }\n }\n return a2;\n }\n function clone(o) {\n if (typeof o !== \"object\" || o === null) return o;\n if (Array.isArray(o)) return cloneArray(o, clone);\n if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n return handler(o, clone);\n }\n const o2 = {};\n refs.push(o);\n refsNew.push(o2);\n for (const k in o) {\n if (Object.hasOwnProperty.call(o, k) === false) continue;\n const cur = o[k];\n if (typeof cur !== \"object\" || cur === null) {\n o2[k] = cur;\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n o2[k] = handler(cur, clone);\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur);\n } else {\n const i = refs.indexOf(cur);\n if (i !== -1) {\n o2[k] = refsNew[i];\n } else {\n o2[k] = clone(cur);\n }\n }\n }\n refs.pop();\n refsNew.pop();\n return o2;\n }\n function cloneProto(o) {\n if (typeof o !== \"object\" || o === null) return o;\n if (Array.isArray(o)) return cloneArray(o, cloneProto);\n if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n return handler(o, cloneProto);\n }\n const o2 = {};\n refs.push(o);\n refsNew.push(o2);\n for (const k in o) {\n const cur = o[k];\n if (typeof cur !== \"object\" || cur === null) {\n o2[k] = cur;\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n o2[k] = handler(cur, cloneProto);\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur);\n } else {\n const i = refs.indexOf(cur);\n if (i !== -1) {\n o2[k] = refsNew[i];\n } else {\n o2[k] = cloneProto(cur);\n }\n }\n }\n refs.pop();\n refsNew.pop();\n return o2;\n }\n }\n }\n});\n\n// src/index.ts\ninit_esm_shims();\n\n// src/constants.ts\ninit_esm_shims();\nvar VIEW_MODE_STORAGE_KEY = \"__vue-devtools-view-mode__\";\nvar VITE_PLUGIN_DETECTED_STORAGE_KEY = \"__vue-devtools-vite-plugin-detected__\";\nvar VITE_PLUGIN_CLIENT_URL_STORAGE_KEY = \"__vue-devtools-vite-plugin-client-url__\";\nvar BROADCAST_CHANNEL_NAME = \"__vue-devtools-broadcast-channel__\";\n\n// src/env.ts\ninit_esm_shims();\nvar isBrowser = typeof navigator !== \"undefined\";\nvar target = typeof window !== \"undefined\" ? window : typeof globalThis !== \"undefined\" ? globalThis : typeof global !== \"undefined\" ? global : {};\nvar isInChromePanel = typeof target.chrome !== \"undefined\" && !!target.chrome.devtools;\nvar isInIframe = isBrowser && target.self !== target.top;\nvar _a;\nvar isInElectron = typeof navigator !== \"undefined\" && ((_a = navigator.userAgent) == null ? void 0 : _a.toLowerCase().includes(\"electron\"));\nvar isNuxtApp = typeof window !== \"undefined\" && !!window.__NUXT__;\nvar isInSeparateWindow = !isInIframe && !isInChromePanel && !isInElectron;\n\n// src/general.ts\ninit_esm_shims();\nvar import_rfdc = __toESM(require_rfdc(), 1);\nfunction NOOP() {\n}\nvar isNumeric = (str) => `${+str}` === str;\nvar isMacOS = () => (navigator == null ? void 0 : navigator.platform) ? navigator == null ? void 0 : navigator.platform.toLowerCase().includes(\"mac\") : /Macintosh/.test(navigator.userAgent);\nvar classifyRE = /(?:^|[-_/])(\\w)/g;\nvar camelizeRE = /-(\\w)/g;\nvar kebabizeRE = /([a-z0-9])([A-Z])/g;\nfunction toUpper(_, c) {\n return c ? c.toUpperCase() : \"\";\n}\nfunction classify(str) {\n return str && `${str}`.replace(classifyRE, toUpper);\n}\nfunction camelize(str) {\n return str && str.replace(camelizeRE, toUpper);\n}\nfunction kebabize(str) {\n return str && str.replace(kebabizeRE, (_, lowerCaseCharacter, upperCaseLetter) => {\n return `${lowerCaseCharacter}-${upperCaseLetter}`;\n }).toLowerCase();\n}\nfunction basename(filename, ext) {\n let normalizedFilename = filename.replace(/^[a-z]:/i, \"\").replace(/\\\\/g, \"/\");\n if (normalizedFilename.endsWith(`index${ext}`)) {\n normalizedFilename = normalizedFilename.replace(`/index${ext}`, ext);\n }\n const lastSlashIndex = normalizedFilename.lastIndexOf(\"/\");\n const baseNameWithExt = normalizedFilename.substring(lastSlashIndex + 1);\n if (ext) {\n const extIndex = baseNameWithExt.lastIndexOf(ext);\n return baseNameWithExt.substring(0, extIndex);\n }\n return \"\";\n}\nfunction sortByKey(state) {\n return state && state.slice().sort((a, b) => {\n if (a.key < b.key)\n return -1;\n if (a.key > b.key)\n return 1;\n return 0;\n });\n}\nvar HTTP_URL_RE = /^https?:\\/\\//;\nfunction isUrlString(str) {\n return str.startsWith(\"/\") || HTTP_URL_RE.test(str);\n}\nvar deepClone = (0, import_rfdc.default)({ circles: true });\nfunction randomStr() {\n return Math.random().toString(36).slice(2);\n}\nfunction isObject(value) {\n return typeof value === \"object\" && !Array.isArray(value) && value !== null;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isSet(value) {\n return value instanceof Set;\n}\nfunction isMap(value) {\n return value instanceof Map;\n}\nexport {\n BROADCAST_CHANNEL_NAME,\n NOOP,\n VIEW_MODE_STORAGE_KEY,\n VITE_PLUGIN_CLIENT_URL_STORAGE_KEY,\n VITE_PLUGIN_DETECTED_STORAGE_KEY,\n basename,\n camelize,\n classify,\n deepClone,\n isArray,\n isBrowser,\n isInChromePanel,\n isInElectron,\n isInIframe,\n isInSeparateWindow,\n isMacOS,\n isMap,\n isNumeric,\n isNuxtApp,\n isObject,\n isSet,\n isUrlString,\n kebabize,\n randomStr,\n sortByKey,\n target\n};\n","const DEBOUNCE_DEFAULTS = {\n trailing: true\n};\nfunction debounce(fn, wait = 25, options = {}) {\n options = { ...DEBOUNCE_DEFAULTS, ...options };\n if (!Number.isFinite(wait)) {\n throw new TypeError(\"Expected `wait` to be a finite number\");\n }\n let leadingValue;\n let timeout;\n let resolveList = [];\n let currentPromise;\n let trailingArgs;\n const applyFn = (_this, args) => {\n currentPromise = _applyPromised(fn, _this, args);\n currentPromise.finally(() => {\n currentPromise = null;\n if (options.trailing && trailingArgs && !timeout) {\n const promise = applyFn(_this, trailingArgs);\n trailingArgs = null;\n return promise;\n }\n });\n return currentPromise;\n };\n return function(...args) {\n if (currentPromise) {\n if (options.trailing) {\n trailingArgs = args;\n }\n return currentPromise;\n }\n return new Promise((resolve) => {\n const shouldCallNow = !timeout && options.leading;\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n timeout = null;\n const promise = options.leading ? leadingValue : applyFn(this, args);\n for (const _resolve of resolveList) {\n _resolve(promise);\n }\n resolveList = [];\n }, wait);\n if (shouldCallNow) {\n leadingValue = applyFn(this, args);\n resolve(leadingValue);\n } else {\n resolveList.push(resolve);\n }\n });\n };\n}\nasync function _applyPromised(fn, _this, args) {\n return await fn.apply(_this, args);\n}\n\nexport { debounce };\n","function flatHooks(configHooks, hooks = {}, parentName) {\n for (const key in configHooks) {\n const subHook = configHooks[key];\n const name = parentName ? `${parentName}:${key}` : key;\n if (typeof subHook === \"object\" && subHook !== null) {\n flatHooks(subHook, hooks, name);\n } else if (typeof subHook === \"function\") {\n hooks[name] = subHook;\n }\n }\n return hooks;\n}\nfunction mergeHooks(...hooks) {\n const finalHooks = {};\n for (const hook of hooks) {\n const flatenHook = flatHooks(hook);\n for (const key in flatenHook) {\n if (finalHooks[key]) {\n finalHooks[key].push(flatenHook[key]);\n } else {\n finalHooks[key] = [flatenHook[key]];\n }\n }\n }\n for (const key in finalHooks) {\n if (finalHooks[key].length > 1) {\n const array = finalHooks[key];\n finalHooks[key] = (...arguments_) => serial(array, (function_) => function_(...arguments_));\n } else {\n finalHooks[key] = finalHooks[key][0];\n }\n }\n return finalHooks;\n}\nfunction serial(tasks, function_) {\n return tasks.reduce(\n (promise, task) => promise.then(() => function_(task)),\n Promise.resolve()\n );\n}\nconst defaultTask = { run: (function_) => function_() };\nconst _createTask = () => defaultTask;\nconst createTask = typeof console.createTask !== \"undefined\" ? console.createTask : _createTask;\nfunction serialTaskCaller(hooks, args) {\n const name = args.shift();\n const task = createTask(name);\n return hooks.reduce(\n (promise, hookFunction) => promise.then(() => task.run(() => hookFunction(...args))),\n Promise.resolve()\n );\n}\nfunction parallelTaskCaller(hooks, args) {\n const name = args.shift();\n const task = createTask(name);\n return Promise.all(hooks.map((hook) => task.run(() => hook(...args))));\n}\nfunction serialCaller(hooks, arguments_) {\n return hooks.reduce(\n (promise, hookFunction) => promise.then(() => hookFunction(...arguments_ || [])),\n Promise.resolve()\n );\n}\nfunction parallelCaller(hooks, args) {\n return Promise.all(hooks.map((hook) => hook(...args || [])));\n}\nfunction callEachWith(callbacks, arg0) {\n for (const callback of [...callbacks]) {\n callback(arg0);\n }\n}\n\nclass Hookable {\n constructor() {\n this._hooks = {};\n this._before = void 0;\n this._after = void 0;\n this._deprecatedMessages = void 0;\n this._deprecatedHooks = {};\n this.hook = this.hook.bind(this);\n this.callHook = this.callHook.bind(this);\n this.callHookWith = this.callHookWith.bind(this);\n }\n hook(name, function_, options = {}) {\n if (!name || typeof function_ !== \"function\") {\n return () => {\n };\n }\n const originalName = name;\n let dep;\n while (this._deprecatedHooks[name]) {\n dep = this._deprecatedHooks[name];\n name = dep.to;\n }\n if (dep && !options.allowDeprecated) {\n let message = dep.message;\n if (!message) {\n message = `${originalName} hook has been deprecated` + (dep.to ? `, please use ${dep.to}` : \"\");\n }\n if (!this._deprecatedMessages) {\n this._deprecatedMessages = /* @__PURE__ */ new Set();\n }\n if (!this._deprecatedMessages.has(message)) {\n console.warn(message);\n this._deprecatedMessages.add(message);\n }\n }\n if (!function_.name) {\n try {\n Object.defineProperty(function_, \"name\", {\n get: () => \"_\" + name.replace(/\\W+/g, \"_\") + \"_hook_cb\",\n configurable: true\n });\n } catch {\n }\n }\n this._hooks[name] = this._hooks[name] || [];\n this._hooks[name].push(function_);\n return () => {\n if (function_) {\n this.removeHook(name, function_);\n function_ = void 0;\n }\n };\n }\n hookOnce(name, function_) {\n let _unreg;\n let _function = (...arguments_) => {\n if (typeof _unreg === \"function\") {\n _unreg();\n }\n _unreg = void 0;\n _function = void 0;\n return function_(...arguments_);\n };\n _unreg = this.hook(name, _function);\n return _unreg;\n }\n removeHook(name, function_) {\n if (this._hooks[name]) {\n const index = this._hooks[name].indexOf(function_);\n if (index !== -1) {\n this._hooks[name].splice(index, 1);\n }\n if (this._hooks[name].length === 0) {\n delete this._hooks[name];\n }\n }\n }\n deprecateHook(name, deprecated) {\n this._deprecatedHooks[name] = typeof deprecated === \"string\" ? { to: deprecated } : deprecated;\n const _hooks = this._hooks[name] || [];\n delete this._hooks[name];\n for (const hook of _hooks) {\n this.hook(name, hook);\n }\n }\n deprecateHooks(deprecatedHooks) {\n Object.assign(this._deprecatedHooks, deprecatedHooks);\n for (const name in deprecatedHooks) {\n this.deprecateHook(name, deprecatedHooks[name]);\n }\n }\n addHooks(configHooks) {\n const hooks = flatHooks(configHooks);\n const removeFns = Object.keys(hooks).map(\n (key) => this.hook(key, hooks[key])\n );\n return () => {\n for (const unreg of removeFns.splice(0, removeFns.length)) {\n unreg();\n }\n };\n }\n removeHooks(configHooks) {\n const hooks = flatHooks(configHooks);\n for (const key in hooks) {\n this.removeHook(key, hooks[key]);\n }\n }\n removeAllHooks() {\n for (const key in this._hooks) {\n delete this._hooks[key];\n }\n }\n callHook(name, ...arguments_) {\n arguments_.unshift(name);\n return this.callHookWith(serialTaskCaller, name, ...arguments_);\n }\n callHookParallel(name, ...arguments_) {\n arguments_.unshift(name);\n return this.callHookWith(parallelTaskCaller, name, ...arguments_);\n }\n callHookWith(caller, name, ...arguments_) {\n const event = this._before || this._after ? { name, args: arguments_, context: {} } : void 0;\n if (this._before) {\n callEachWith(this._before, event);\n }\n const result = caller(\n name in this._hooks ? [...this._hooks[name]] : [],\n arguments_\n );\n if (result instanceof Promise) {\n return result.finally(() => {\n if (this._after && event) {\n callEachWith(this._after, event);\n }\n });\n }\n if (this._after && event) {\n callEachWith(this._after, event);\n }\n return result;\n }\n beforeEach(function_) {\n this._before = this._before || [];\n this._before.push(function_);\n return () => {\n if (this._before !== void 0) {\n const index = this._before.indexOf(function_);\n if (index !== -1) {\n this._before.splice(index, 1);\n }\n }\n };\n }\n afterEach(function_) {\n this._after = this._after || [];\n this._after.push(function_);\n return () => {\n if (this._after !== void 0) {\n const index = this._after.indexOf(function_);\n if (index !== -1) {\n this._after.splice(index, 1);\n }\n }\n };\n }\n}\nfunction createHooks() {\n return new Hookable();\n}\n\nconst isBrowser = typeof window !== \"undefined\";\nfunction createDebugger(hooks, _options = {}) {\n const options = {\n inspect: isBrowser,\n group: isBrowser,\n filter: () => true,\n ..._options\n };\n const _filter = options.filter;\n const filter = typeof _filter === \"string\" ? (name) => name.startsWith(_filter) : _filter;\n const _tag = options.tag ? `[${options.tag}] ` : \"\";\n const logPrefix = (event) => _tag + event.name + \"\".padEnd(event._id, \"\\0\");\n const _idCtr = {};\n const unsubscribeBefore = hooks.beforeEach((event) => {\n if (filter !== void 0 && !filter(event.name)) {\n return;\n }\n _idCtr[event.name] = _idCtr[event.name] || 0;\n event._id = _idCtr[event.name]++;\n console.time(logPrefix(event));\n });\n const unsubscribeAfter = hooks.afterEach((event) => {\n if (filter !== void 0 && !filter(event.name)) {\n return;\n }\n if (options.group) {\n console.groupCollapsed(event.name);\n }\n if (options.inspect) {\n console.timeLog(logPrefix(event), event.args);\n } else {\n console.timeEnd(logPrefix(event));\n }\n if (options.group) {\n console.groupEnd();\n }\n _idCtr[event.name]--;\n });\n return {\n /** Stop debugging and remove listeners */\n close: () => {\n unsubscribeBefore();\n unsubscribeAfter();\n }\n };\n}\n\nexport { Hookable, createDebugger, createHooks, flatHooks, mergeHooks, parallelCaller, serial, serialCaller };\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target22) => (target22 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target22, \"default\", { value: mod, enumerable: true }) : target22,\n mod\n));\n\n// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.0_@types+node@22.10.1__@swc+core@1.5.29_jiti@2.0.0_p_swvvp2d4pgn6xuiiec4l4x2i7a/node_modules/tsup/assets/esm_shims.js\nvar init_esm_shims = __esm({\n \"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.0_@types+node@22.10.1__@swc+core@1.5.29_jiti@2.0.0_p_swvvp2d4pgn6xuiiec4l4x2i7a/node_modules/tsup/assets/esm_shims.js\"() {\n \"use strict\";\n }\n});\n\n// ../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js\nvar require_speakingurl = __commonJS({\n \"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js\"(exports, module) {\n \"use strict\";\n init_esm_shims();\n (function(root) {\n \"use strict\";\n var charMap = {\n // latin\n \"\\xC0\": \"A\",\n \"\\xC1\": \"A\",\n \"\\xC2\": \"A\",\n \"\\xC3\": \"A\",\n \"\\xC4\": \"Ae\",\n \"\\xC5\": \"A\",\n \"\\xC6\": \"AE\",\n \"\\xC7\": \"C\",\n \"\\xC8\": \"E\",\n \"\\xC9\": \"E\",\n \"\\xCA\": \"E\",\n \"\\xCB\": \"E\",\n \"\\xCC\": \"I\",\n \"\\xCD\": \"I\",\n \"\\xCE\": \"I\",\n \"\\xCF\": \"I\",\n \"\\xD0\": \"D\",\n \"\\xD1\": \"N\",\n \"\\xD2\": \"O\",\n \"\\xD3\": \"O\",\n \"\\xD4\": \"O\",\n \"\\xD5\": \"O\",\n \"\\xD6\": \"Oe\",\n \"\\u0150\": \"O\",\n \"\\xD8\": \"O\",\n \"\\xD9\": \"U\",\n \"\\xDA\": \"U\",\n \"\\xDB\": \"U\",\n \"\\xDC\": \"Ue\",\n \"\\u0170\": \"U\",\n \"\\xDD\": \"Y\",\n \"\\xDE\": \"TH\",\n \"\\xDF\": \"ss\",\n \"\\xE0\": \"a\",\n \"\\xE1\": \"a\",\n \"\\xE2\": \"a\",\n \"\\xE3\": \"a\",\n \"\\xE4\": \"ae\",\n \"\\xE5\": \"a\",\n \"\\xE6\": \"ae\",\n \"\\xE7\": \"c\",\n \"\\xE8\": \"e\",\n \"\\xE9\": \"e\",\n \"\\xEA\": \"e\",\n \"\\xEB\": \"e\",\n \"\\xEC\": \"i\",\n \"\\xED\": \"i\",\n \"\\xEE\": \"i\",\n \"\\xEF\": \"i\",\n \"\\xF0\": \"d\",\n \"\\xF1\": \"n\",\n \"\\xF2\": \"o\",\n \"\\xF3\": \"o\",\n \"\\xF4\": \"o\",\n \"\\xF5\": \"o\",\n \"\\xF6\": \"oe\",\n \"\\u0151\": \"o\",\n \"\\xF8\": \"o\",\n \"\\xF9\": \"u\",\n \"\\xFA\": \"u\",\n \"\\xFB\": \"u\",\n \"\\xFC\": \"ue\",\n \"\\u0171\": \"u\",\n \"\\xFD\": \"y\",\n \"\\xFE\": \"th\",\n \"\\xFF\": \"y\",\n \"\\u1E9E\": \"SS\",\n // language specific\n // Arabic\n \"\\u0627\": \"a\",\n \"\\u0623\": \"a\",\n \"\\u0625\": \"i\",\n \"\\u0622\": \"aa\",\n \"\\u0624\": \"u\",\n \"\\u0626\": \"e\",\n \"\\u0621\": \"a\",\n \"\\u0628\": \"b\",\n \"\\u062A\": \"t\",\n \"\\u062B\": \"th\",\n \"\\u062C\": \"j\",\n \"\\u062D\": \"h\",\n \"\\u062E\": \"kh\",\n \"\\u062F\": \"d\",\n \"\\u0630\": \"th\",\n \"\\u0631\": \"r\",\n \"\\u0632\": \"z\",\n \"\\u0633\": \"s\",\n \"\\u0634\": \"sh\",\n \"\\u0635\": \"s\",\n \"\\u0636\": \"dh\",\n \"\\u0637\": \"t\",\n \"\\u0638\": \"z\",\n \"\\u0639\": \"a\",\n \"\\u063A\": \"gh\",\n \"\\u0641\": \"f\",\n \"\\u0642\": \"q\",\n \"\\u0643\": \"k\",\n \"\\u0644\": \"l\",\n \"\\u0645\": \"m\",\n \"\\u0646\": \"n\",\n \"\\u0647\": \"h\",\n \"\\u0648\": \"w\",\n \"\\u064A\": \"y\",\n \"\\u0649\": \"a\",\n \"\\u0629\": \"h\",\n \"\\uFEFB\": \"la\",\n \"\\uFEF7\": \"laa\",\n \"\\uFEF9\": \"lai\",\n \"\\uFEF5\": \"laa\",\n // Persian additional characters than Arabic\n \"\\u06AF\": \"g\",\n \"\\u0686\": \"ch\",\n \"\\u067E\": \"p\",\n \"\\u0698\": \"zh\",\n \"\\u06A9\": \"k\",\n \"\\u06CC\": \"y\",\n // Arabic diactrics\n \"\\u064E\": \"a\",\n \"\\u064B\": \"an\",\n \"\\u0650\": \"e\",\n \"\\u064D\": \"en\",\n \"\\u064F\": \"u\",\n \"\\u064C\": \"on\",\n \"\\u0652\": \"\",\n // Arabic numbers\n \"\\u0660\": \"0\",\n \"\\u0661\": \"1\",\n \"\\u0662\": \"2\",\n \"\\u0663\": \"3\",\n \"\\u0664\": \"4\",\n \"\\u0665\": \"5\",\n \"\\u0666\": \"6\",\n \"\\u0667\": \"7\",\n \"\\u0668\": \"8\",\n \"\\u0669\": \"9\",\n // Persian numbers\n \"\\u06F0\": \"0\",\n \"\\u06F1\": \"1\",\n \"\\u06F2\": \"2\",\n \"\\u06F3\": \"3\",\n \"\\u06F4\": \"4\",\n \"\\u06F5\": \"5\",\n \"\\u06F6\": \"6\",\n \"\\u06F7\": \"7\",\n \"\\u06F8\": \"8\",\n \"\\u06F9\": \"9\",\n // Burmese consonants\n \"\\u1000\": \"k\",\n \"\\u1001\": \"kh\",\n \"\\u1002\": \"g\",\n \"\\u1003\": \"ga\",\n \"\\u1004\": \"ng\",\n \"\\u1005\": \"s\",\n \"\\u1006\": \"sa\",\n \"\\u1007\": \"z\",\n \"\\u1005\\u103B\": \"za\",\n \"\\u100A\": \"ny\",\n \"\\u100B\": \"t\",\n \"\\u100C\": \"ta\",\n \"\\u100D\": \"d\",\n \"\\u100E\": \"da\",\n \"\\u100F\": \"na\",\n \"\\u1010\": \"t\",\n \"\\u1011\": \"ta\",\n \"\\u1012\": \"d\",\n \"\\u1013\": \"da\",\n \"\\u1014\": \"n\",\n \"\\u1015\": \"p\",\n \"\\u1016\": \"pa\",\n \"\\u1017\": \"b\",\n \"\\u1018\": \"ba\",\n \"\\u1019\": \"m\",\n \"\\u101A\": \"y\",\n \"\\u101B\": \"ya\",\n \"\\u101C\": \"l\",\n \"\\u101D\": \"w\",\n \"\\u101E\": \"th\",\n \"\\u101F\": \"h\",\n \"\\u1020\": \"la\",\n \"\\u1021\": \"a\",\n // consonant character combos\n \"\\u103C\": \"y\",\n \"\\u103B\": \"ya\",\n \"\\u103D\": \"w\",\n \"\\u103C\\u103D\": \"yw\",\n \"\\u103B\\u103D\": \"ywa\",\n \"\\u103E\": \"h\",\n // independent vowels\n \"\\u1027\": \"e\",\n \"\\u104F\": \"-e\",\n \"\\u1023\": \"i\",\n \"\\u1024\": \"-i\",\n \"\\u1009\": \"u\",\n \"\\u1026\": \"-u\",\n \"\\u1029\": \"aw\",\n \"\\u101E\\u103C\\u1031\\u102C\": \"aw\",\n \"\\u102A\": \"aw\",\n // numbers\n \"\\u1040\": \"0\",\n \"\\u1041\": \"1\",\n \"\\u1042\": \"2\",\n \"\\u1043\": \"3\",\n \"\\u1044\": \"4\",\n \"\\u1045\": \"5\",\n \"\\u1046\": \"6\",\n \"\\u1047\": \"7\",\n \"\\u1048\": \"8\",\n \"\\u1049\": \"9\",\n // virama and tone marks which are silent in transliteration\n \"\\u1039\": \"\",\n \"\\u1037\": \"\",\n \"\\u1038\": \"\",\n // Czech\n \"\\u010D\": \"c\",\n \"\\u010F\": \"d\",\n \"\\u011B\": \"e\",\n \"\\u0148\": \"n\",\n \"\\u0159\": \"r\",\n \"\\u0161\": \"s\",\n \"\\u0165\": \"t\",\n \"\\u016F\": \"u\",\n \"\\u017E\": \"z\",\n \"\\u010C\": \"C\",\n \"\\u010E\": \"D\",\n \"\\u011A\": \"E\",\n \"\\u0147\": \"N\",\n \"\\u0158\": \"R\",\n \"\\u0160\": \"S\",\n \"\\u0164\": \"T\",\n \"\\u016E\": \"U\",\n \"\\u017D\": \"Z\",\n // Dhivehi\n \"\\u0780\": \"h\",\n \"\\u0781\": \"sh\",\n \"\\u0782\": \"n\",\n \"\\u0783\": \"r\",\n \"\\u0784\": \"b\",\n \"\\u0785\": \"lh\",\n \"\\u0786\": \"k\",\n \"\\u0787\": \"a\",\n \"\\u0788\": \"v\",\n \"\\u0789\": \"m\",\n \"\\u078A\": \"f\",\n \"\\u078B\": \"dh\",\n \"\\u078C\": \"th\",\n \"\\u078D\": \"l\",\n \"\\u078E\": \"g\",\n \"\\u078F\": \"gn\",\n \"\\u0790\": \"s\",\n \"\\u0791\": \"d\",\n \"\\u0792\": \"z\",\n \"\\u0793\": \"t\",\n \"\\u0794\": \"y\",\n \"\\u0795\": \"p\",\n \"\\u0796\": \"j\",\n \"\\u0797\": \"ch\",\n \"\\u0798\": \"tt\",\n \"\\u0799\": \"hh\",\n \"\\u079A\": \"kh\",\n \"\\u079B\": \"th\",\n \"\\u079C\": \"z\",\n \"\\u079D\": \"sh\",\n \"\\u079E\": \"s\",\n \"\\u079F\": \"d\",\n \"\\u07A0\": \"t\",\n \"\\u07A1\": \"z\",\n \"\\u07A2\": \"a\",\n \"\\u07A3\": \"gh\",\n \"\\u07A4\": \"q\",\n \"\\u07A5\": \"w\",\n \"\\u07A6\": \"a\",\n \"\\u07A7\": \"aa\",\n \"\\u07A8\": \"i\",\n \"\\u07A9\": \"ee\",\n \"\\u07AA\": \"u\",\n \"\\u07AB\": \"oo\",\n \"\\u07AC\": \"e\",\n \"\\u07AD\": \"ey\",\n \"\\u07AE\": \"o\",\n \"\\u07AF\": \"oa\",\n \"\\u07B0\": \"\",\n // Georgian https://en.wikipedia.org/wiki/Romanization_of_Georgian\n // National system (2002)\n \"\\u10D0\": \"a\",\n \"\\u10D1\": \"b\",\n \"\\u10D2\": \"g\",\n \"\\u10D3\": \"d\",\n \"\\u10D4\": \"e\",\n \"\\u10D5\": \"v\",\n \"\\u10D6\": \"z\",\n \"\\u10D7\": \"t\",\n \"\\u10D8\": \"i\",\n \"\\u10D9\": \"k\",\n \"\\u10DA\": \"l\",\n \"\\u10DB\": \"m\",\n \"\\u10DC\": \"n\",\n \"\\u10DD\": \"o\",\n \"\\u10DE\": \"p\",\n \"\\u10DF\": \"zh\",\n \"\\u10E0\": \"r\",\n \"\\u10E1\": \"s\",\n \"\\u10E2\": \"t\",\n \"\\u10E3\": \"u\",\n \"\\u10E4\": \"p\",\n \"\\u10E5\": \"k\",\n \"\\u10E6\": \"gh\",\n \"\\u10E7\": \"q\",\n \"\\u10E8\": \"sh\",\n \"\\u10E9\": \"ch\",\n \"\\u10EA\": \"ts\",\n \"\\u10EB\": \"dz\",\n \"\\u10EC\": \"ts\",\n \"\\u10ED\": \"ch\",\n \"\\u10EE\": \"kh\",\n \"\\u10EF\": \"j\",\n \"\\u10F0\": \"h\",\n // Greek\n \"\\u03B1\": \"a\",\n \"\\u03B2\": \"v\",\n \"\\u03B3\": \"g\",\n \"\\u03B4\": \"d\",\n \"\\u03B5\": \"e\",\n \"\\u03B6\": \"z\",\n \"\\u03B7\": \"i\",\n \"\\u03B8\": \"th\",\n \"\\u03B9\": \"i\",\n \"\\u03BA\": \"k\",\n \"\\u03BB\": \"l\",\n \"\\u03BC\": \"m\",\n \"\\u03BD\": \"n\",\n \"\\u03BE\": \"ks\",\n \"\\u03BF\": \"o\",\n \"\\u03C0\": \"p\",\n \"\\u03C1\": \"r\",\n \"\\u03C3\": \"s\",\n \"\\u03C4\": \"t\",\n \"\\u03C5\": \"y\",\n \"\\u03C6\": \"f\",\n \"\\u03C7\": \"x\",\n \"\\u03C8\": \"ps\",\n \"\\u03C9\": \"o\",\n \"\\u03AC\": \"a\",\n \"\\u03AD\": \"e\",\n \"\\u03AF\": \"i\",\n \"\\u03CC\": \"o\",\n \"\\u03CD\": \"y\",\n \"\\u03AE\": \"i\",\n \"\\u03CE\": \"o\",\n \"\\u03C2\": \"s\",\n \"\\u03CA\": \"i\",\n \"\\u03B0\": \"y\",\n \"\\u03CB\": \"y\",\n \"\\u0390\": \"i\",\n \"\\u0391\": \"A\",\n \"\\u0392\": \"B\",\n \"\\u0393\": \"G\",\n \"\\u0394\": \"D\",\n \"\\u0395\": \"E\",\n \"\\u0396\": \"Z\",\n \"\\u0397\": \"I\",\n \"\\u0398\": \"TH\",\n \"\\u0399\": \"I\",\n \"\\u039A\": \"K\",\n \"\\u039B\": \"L\",\n \"\\u039C\": \"M\",\n \"\\u039D\": \"N\",\n \"\\u039E\": \"KS\",\n \"\\u039F\": \"O\",\n \"\\u03A0\": \"P\",\n \"\\u03A1\": \"R\",\n \"\\u03A3\": \"S\",\n \"\\u03A4\": \"T\",\n \"\\u03A5\": \"Y\",\n \"\\u03A6\": \"F\",\n \"\\u03A7\": \"X\",\n \"\\u03A8\": \"PS\",\n \"\\u03A9\": \"O\",\n \"\\u0386\": \"A\",\n \"\\u0388\": \"E\",\n \"\\u038A\": \"I\",\n \"\\u038C\": \"O\",\n \"\\u038E\": \"Y\",\n \"\\u0389\": \"I\",\n \"\\u038F\": \"O\",\n \"\\u03AA\": \"I\",\n \"\\u03AB\": \"Y\",\n // Latvian\n \"\\u0101\": \"a\",\n // 'č': 'c', // duplicate\n \"\\u0113\": \"e\",\n \"\\u0123\": \"g\",\n \"\\u012B\": \"i\",\n \"\\u0137\": \"k\",\n \"\\u013C\": \"l\",\n \"\\u0146\": \"n\",\n // 'š': 's', // duplicate\n \"\\u016B\": \"u\",\n // 'ž': 'z', // duplicate\n \"\\u0100\": \"A\",\n // 'Č': 'C', // duplicate\n \"\\u0112\": \"E\",\n \"\\u0122\": \"G\",\n \"\\u012A\": \"I\",\n \"\\u0136\": \"k\",\n \"\\u013B\": \"L\",\n \"\\u0145\": \"N\",\n // 'Š': 'S', // duplicate\n \"\\u016A\": \"U\",\n // 'Ž': 'Z', // duplicate\n // Macedonian\n \"\\u040C\": \"Kj\",\n \"\\u045C\": \"kj\",\n \"\\u0409\": \"Lj\",\n \"\\u0459\": \"lj\",\n \"\\u040A\": \"Nj\",\n \"\\u045A\": \"nj\",\n \"\\u0422\\u0441\": \"Ts\",\n \"\\u0442\\u0441\": \"ts\",\n // Polish\n \"\\u0105\": \"a\",\n \"\\u0107\": \"c\",\n \"\\u0119\": \"e\",\n \"\\u0142\": \"l\",\n \"\\u0144\": \"n\",\n // 'ó': 'o', // duplicate\n \"\\u015B\": \"s\",\n \"\\u017A\": \"z\",\n \"\\u017C\": \"z\",\n \"\\u0104\": \"A\",\n \"\\u0106\": \"C\",\n \"\\u0118\": \"E\",\n \"\\u0141\": \"L\",\n \"\\u0143\": \"N\",\n \"\\u015A\": \"S\",\n \"\\u0179\": \"Z\",\n \"\\u017B\": \"Z\",\n // Ukranian\n \"\\u0404\": \"Ye\",\n \"\\u0406\": \"I\",\n \"\\u0407\": \"Yi\",\n \"\\u0490\": \"G\",\n \"\\u0454\": \"ye\",\n \"\\u0456\": \"i\",\n \"\\u0457\": \"yi\",\n \"\\u0491\": \"g\",\n // Romanian\n \"\\u0103\": \"a\",\n \"\\u0102\": \"A\",\n \"\\u0219\": \"s\",\n \"\\u0218\": \"S\",\n // 'ş': 's', // duplicate\n // 'Ş': 'S', // duplicate\n \"\\u021B\": \"t\",\n \"\\u021A\": \"T\",\n \"\\u0163\": \"t\",\n \"\\u0162\": \"T\",\n // Russian https://en.wikipedia.org/wiki/Romanization_of_Russian\n // ICAO\n \"\\u0430\": \"a\",\n \"\\u0431\": \"b\",\n \"\\u0432\": \"v\",\n \"\\u0433\": \"g\",\n \"\\u0434\": \"d\",\n \"\\u0435\": \"e\",\n \"\\u0451\": \"yo\",\n \"\\u0436\": \"zh\",\n \"\\u0437\": \"z\",\n \"\\u0438\": \"i\",\n \"\\u0439\": \"i\",\n \"\\u043A\": \"k\",\n \"\\u043B\": \"l\",\n \"\\u043C\": \"m\",\n \"\\u043D\": \"n\",\n \"\\u043E\": \"o\",\n \"\\u043F\": \"p\",\n \"\\u0440\": \"r\",\n \"\\u0441\": \"s\",\n \"\\u0442\": \"t\",\n \"\\u0443\": \"u\",\n \"\\u0444\": \"f\",\n \"\\u0445\": \"kh\",\n \"\\u0446\": \"c\",\n \"\\u0447\": \"ch\",\n \"\\u0448\": \"sh\",\n \"\\u0449\": \"sh\",\n \"\\u044A\": \"\",\n \"\\u044B\": \"y\",\n \"\\u044C\": \"\",\n \"\\u044D\": \"e\",\n \"\\u044E\": \"yu\",\n \"\\u044F\": \"ya\",\n \"\\u0410\": \"A\",\n \"\\u0411\": \"B\",\n \"\\u0412\": \"V\",\n \"\\u0413\": \"G\",\n \"\\u0414\": \"D\",\n \"\\u0415\": \"E\",\n \"\\u0401\": \"Yo\",\n \"\\u0416\": \"Zh\",\n \"\\u0417\": \"Z\",\n \"\\u0418\": \"I\",\n \"\\u0419\": \"I\",\n \"\\u041A\": \"K\",\n \"\\u041B\": \"L\",\n \"\\u041C\": \"M\",\n \"\\u041D\": \"N\",\n \"\\u041E\": \"O\",\n \"\\u041F\": \"P\",\n \"\\u0420\": \"R\",\n \"\\u0421\": \"S\",\n \"\\u0422\": \"T\",\n \"\\u0423\": \"U\",\n \"\\u0424\": \"F\",\n \"\\u0425\": \"Kh\",\n \"\\u0426\": \"C\",\n \"\\u0427\": \"Ch\",\n \"\\u0428\": \"Sh\",\n \"\\u0429\": \"Sh\",\n \"\\u042A\": \"\",\n \"\\u042B\": \"Y\",\n \"\\u042C\": \"\",\n \"\\u042D\": \"E\",\n \"\\u042E\": \"Yu\",\n \"\\u042F\": \"Ya\",\n // Serbian\n \"\\u0452\": \"dj\",\n \"\\u0458\": \"j\",\n // 'љ': 'lj', // duplicate\n // 'њ': 'nj', // duplicate\n \"\\u045B\": \"c\",\n \"\\u045F\": \"dz\",\n \"\\u0402\": \"Dj\",\n \"\\u0408\": \"j\",\n // 'Љ': 'Lj', // duplicate\n // 'Њ': 'Nj', // duplicate\n \"\\u040B\": \"C\",\n \"\\u040F\": \"Dz\",\n // Slovak\n \"\\u013E\": \"l\",\n \"\\u013A\": \"l\",\n \"\\u0155\": \"r\",\n \"\\u013D\": \"L\",\n \"\\u0139\": \"L\",\n \"\\u0154\": \"R\",\n // Turkish\n \"\\u015F\": \"s\",\n \"\\u015E\": \"S\",\n \"\\u0131\": \"i\",\n \"\\u0130\": \"I\",\n // 'ç': 'c', // duplicate\n // 'Ç': 'C', // duplicate\n // 'ü': 'u', // duplicate, see langCharMap\n // 'Ü': 'U', // duplicate, see langCharMap\n // 'ö': 'o', // duplicate, see langCharMap\n // 'Ö': 'O', // duplicate, see langCharMap\n \"\\u011F\": \"g\",\n \"\\u011E\": \"G\",\n // Vietnamese\n \"\\u1EA3\": \"a\",\n \"\\u1EA2\": \"A\",\n \"\\u1EB3\": \"a\",\n \"\\u1EB2\": \"A\",\n \"\\u1EA9\": \"a\",\n \"\\u1EA8\": \"A\",\n \"\\u0111\": \"d\",\n \"\\u0110\": \"D\",\n \"\\u1EB9\": \"e\",\n \"\\u1EB8\": \"E\",\n \"\\u1EBD\": \"e\",\n \"\\u1EBC\": \"E\",\n \"\\u1EBB\": \"e\",\n \"\\u1EBA\": \"E\",\n \"\\u1EBF\": \"e\",\n \"\\u1EBE\": \"E\",\n \"\\u1EC1\": \"e\",\n \"\\u1EC0\": \"E\",\n \"\\u1EC7\": \"e\",\n \"\\u1EC6\": \"E\",\n \"\\u1EC5\": \"e\",\n \"\\u1EC4\": \"E\",\n \"\\u1EC3\": \"e\",\n \"\\u1EC2\": \"E\",\n \"\\u1ECF\": \"o\",\n \"\\u1ECD\": \"o\",\n \"\\u1ECC\": \"o\",\n \"\\u1ED1\": \"o\",\n \"\\u1ED0\": \"O\",\n \"\\u1ED3\": \"o\",\n \"\\u1ED2\": \"O\",\n \"\\u1ED5\": \"o\",\n \"\\u1ED4\": \"O\",\n \"\\u1ED9\": \"o\",\n \"\\u1ED8\": \"O\",\n \"\\u1ED7\": \"o\",\n \"\\u1ED6\": \"O\",\n \"\\u01A1\": \"o\",\n \"\\u01A0\": \"O\",\n \"\\u1EDB\": \"o\",\n \"\\u1EDA\": \"O\",\n \"\\u1EDD\": \"o\",\n \"\\u1EDC\": \"O\",\n \"\\u1EE3\": \"o\",\n \"\\u1EE2\": \"O\",\n \"\\u1EE1\": \"o\",\n \"\\u1EE0\": \"O\",\n \"\\u1EDE\": \"o\",\n \"\\u1EDF\": \"o\",\n \"\\u1ECB\": \"i\",\n \"\\u1ECA\": \"I\",\n \"\\u0129\": \"i\",\n \"\\u0128\": \"I\",\n \"\\u1EC9\": \"i\",\n \"\\u1EC8\": \"i\",\n \"\\u1EE7\": \"u\",\n \"\\u1EE6\": \"U\",\n \"\\u1EE5\": \"u\",\n \"\\u1EE4\": \"U\",\n \"\\u0169\": \"u\",\n \"\\u0168\": \"U\",\n \"\\u01B0\": \"u\",\n \"\\u01AF\": \"U\",\n \"\\u1EE9\": \"u\",\n \"\\u1EE8\": \"U\",\n \"\\u1EEB\": \"u\",\n \"\\u1EEA\": \"U\",\n \"\\u1EF1\": \"u\",\n \"\\u1EF0\": \"U\",\n \"\\u1EEF\": \"u\",\n \"\\u1EEE\": \"U\",\n \"\\u1EED\": \"u\",\n \"\\u1EEC\": \"\\u01B0\",\n \"\\u1EF7\": \"y\",\n \"\\u1EF6\": \"y\",\n \"\\u1EF3\": \"y\",\n \"\\u1EF2\": \"Y\",\n \"\\u1EF5\": \"y\",\n \"\\u1EF4\": \"Y\",\n \"\\u1EF9\": \"y\",\n \"\\u1EF8\": \"Y\",\n \"\\u1EA1\": \"a\",\n \"\\u1EA0\": \"A\",\n \"\\u1EA5\": \"a\",\n \"\\u1EA4\": \"A\",\n \"\\u1EA7\": \"a\",\n \"\\u1EA6\": \"A\",\n \"\\u1EAD\": \"a\",\n \"\\u1EAC\": \"A\",\n \"\\u1EAB\": \"a\",\n \"\\u1EAA\": \"A\",\n // 'ă': 'a', // duplicate\n // 'Ă': 'A', // duplicate\n \"\\u1EAF\": \"a\",\n \"\\u1EAE\": \"A\",\n \"\\u1EB1\": \"a\",\n \"\\u1EB0\": \"A\",\n \"\\u1EB7\": \"a\",\n \"\\u1EB6\": \"A\",\n \"\\u1EB5\": \"a\",\n \"\\u1EB4\": \"A\",\n \"\\u24EA\": \"0\",\n \"\\u2460\": \"1\",\n \"\\u2461\": \"2\",\n \"\\u2462\": \"3\",\n \"\\u2463\": \"4\",\n \"\\u2464\": \"5\",\n \"\\u2465\": \"6\",\n \"\\u2466\": \"7\",\n \"\\u2467\": \"8\",\n \"\\u2468\": \"9\",\n \"\\u2469\": \"10\",\n \"\\u246A\": \"11\",\n \"\\u246B\": \"12\",\n \"\\u246C\": \"13\",\n \"\\u246D\": \"14\",\n \"\\u246E\": \"15\",\n \"\\u246F\": \"16\",\n \"\\u2470\": \"17\",\n \"\\u2471\": \"18\",\n \"\\u2472\": \"18\",\n \"\\u2473\": \"18\",\n \"\\u24F5\": \"1\",\n \"\\u24F6\": \"2\",\n \"\\u24F7\": \"3\",\n \"\\u24F8\": \"4\",\n \"\\u24F9\": \"5\",\n \"\\u24FA\": \"6\",\n \"\\u24FB\": \"7\",\n \"\\u24FC\": \"8\",\n \"\\u24FD\": \"9\",\n \"\\u24FE\": \"10\",\n \"\\u24FF\": \"0\",\n \"\\u24EB\": \"11\",\n \"\\u24EC\": \"12\",\n \"\\u24ED\": \"13\",\n \"\\u24EE\": \"14\",\n \"\\u24EF\": \"15\",\n \"\\u24F0\": \"16\",\n \"\\u24F1\": \"17\",\n \"\\u24F2\": \"18\",\n \"\\u24F3\": \"19\",\n \"\\u24F4\": \"20\",\n \"\\u24B6\": \"A\",\n \"\\u24B7\": \"B\",\n \"\\u24B8\": \"C\",\n \"\\u24B9\": \"D\",\n \"\\u24BA\": \"E\",\n \"\\u24BB\": \"F\",\n \"\\u24BC\": \"G\",\n \"\\u24BD\": \"H\",\n \"\\u24BE\": \"I\",\n \"\\u24BF\": \"J\",\n \"\\u24C0\": \"K\",\n \"\\u24C1\": \"L\",\n \"\\u24C2\": \"M\",\n \"\\u24C3\": \"N\",\n \"\\u24C4\": \"O\",\n \"\\u24C5\": \"P\",\n \"\\u24C6\": \"Q\",\n \"\\u24C7\": \"R\",\n \"\\u24C8\": \"S\",\n \"\\u24C9\": \"T\",\n \"\\u24CA\": \"U\",\n \"\\u24CB\": \"V\",\n \"\\u24CC\": \"W\",\n \"\\u24CD\": \"X\",\n \"\\u24CE\": \"Y\",\n \"\\u24CF\": \"Z\",\n \"\\u24D0\": \"a\",\n \"\\u24D1\": \"b\",\n \"\\u24D2\": \"c\",\n \"\\u24D3\": \"d\",\n \"\\u24D4\": \"e\",\n \"\\u24D5\": \"f\",\n \"\\u24D6\": \"g\",\n \"\\u24D7\": \"h\",\n \"\\u24D8\": \"i\",\n \"\\u24D9\": \"j\",\n \"\\u24DA\": \"k\",\n \"\\u24DB\": \"l\",\n \"\\u24DC\": \"m\",\n \"\\u24DD\": \"n\",\n \"\\u24DE\": \"o\",\n \"\\u24DF\": \"p\",\n \"\\u24E0\": \"q\",\n \"\\u24E1\": \"r\",\n \"\\u24E2\": \"s\",\n \"\\u24E3\": \"t\",\n \"\\u24E4\": \"u\",\n \"\\u24E6\": \"v\",\n \"\\u24E5\": \"w\",\n \"\\u24E7\": \"x\",\n \"\\u24E8\": \"y\",\n \"\\u24E9\": \"z\",\n // symbols\n \"\\u201C\": '\"',\n \"\\u201D\": '\"',\n \"\\u2018\": \"'\",\n \"\\u2019\": \"'\",\n \"\\u2202\": \"d\",\n \"\\u0192\": \"f\",\n \"\\u2122\": \"(TM)\",\n \"\\xA9\": \"(C)\",\n \"\\u0153\": \"oe\",\n \"\\u0152\": \"OE\",\n \"\\xAE\": \"(R)\",\n \"\\u2020\": \"+\",\n \"\\u2120\": \"(SM)\",\n \"\\u2026\": \"...\",\n \"\\u02DA\": \"o\",\n \"\\xBA\": \"o\",\n \"\\xAA\": \"a\",\n \"\\u2022\": \"*\",\n \"\\u104A\": \",\",\n \"\\u104B\": \".\",\n // currency\n \"$\": \"USD\",\n \"\\u20AC\": \"EUR\",\n \"\\u20A2\": \"BRN\",\n \"\\u20A3\": \"FRF\",\n \"\\xA3\": \"GBP\",\n \"\\u20A4\": \"ITL\",\n \"\\u20A6\": \"NGN\",\n \"\\u20A7\": \"ESP\",\n \"\\u20A9\": \"KRW\",\n \"\\u20AA\": \"ILS\",\n \"\\u20AB\": \"VND\",\n \"\\u20AD\": \"LAK\",\n \"\\u20AE\": \"MNT\",\n \"\\u20AF\": \"GRD\",\n \"\\u20B1\": \"ARS\",\n \"\\u20B2\": \"PYG\",\n \"\\u20B3\": \"ARA\",\n \"\\u20B4\": \"UAH\",\n \"\\u20B5\": \"GHS\",\n \"\\xA2\": \"cent\",\n \"\\xA5\": \"CNY\",\n \"\\u5143\": \"CNY\",\n \"\\u5186\": \"YEN\",\n \"\\uFDFC\": \"IRR\",\n \"\\u20A0\": \"EWE\",\n \"\\u0E3F\": \"THB\",\n \"\\u20A8\": \"INR\",\n \"\\u20B9\": \"INR\",\n \"\\u20B0\": \"PF\",\n \"\\u20BA\": \"TRY\",\n \"\\u060B\": \"AFN\",\n \"\\u20BC\": \"AZN\",\n \"\\u043B\\u0432\": \"BGN\",\n \"\\u17DB\": \"KHR\",\n \"\\u20A1\": \"CRC\",\n \"\\u20B8\": \"KZT\",\n \"\\u0434\\u0435\\u043D\": \"MKD\",\n \"z\\u0142\": \"PLN\",\n \"\\u20BD\": \"RUB\",\n \"\\u20BE\": \"GEL\"\n };\n var lookAheadCharArray = [\n // burmese\n \"\\u103A\",\n // Dhivehi\n \"\\u07B0\"\n ];\n var diatricMap = {\n // Burmese\n // dependent vowels\n \"\\u102C\": \"a\",\n \"\\u102B\": \"a\",\n \"\\u1031\": \"e\",\n \"\\u1032\": \"e\",\n \"\\u102D\": \"i\",\n \"\\u102E\": \"i\",\n \"\\u102D\\u102F\": \"o\",\n \"\\u102F\": \"u\",\n \"\\u1030\": \"u\",\n \"\\u1031\\u102B\\u1004\\u103A\": \"aung\",\n \"\\u1031\\u102C\": \"aw\",\n \"\\u1031\\u102C\\u103A\": \"aw\",\n \"\\u1031\\u102B\": \"aw\",\n \"\\u1031\\u102B\\u103A\": \"aw\",\n \"\\u103A\": \"\\u103A\",\n // this is special case but the character will be converted to latin in the code\n \"\\u1000\\u103A\": \"et\",\n \"\\u102D\\u102F\\u1000\\u103A\": \"aik\",\n \"\\u1031\\u102C\\u1000\\u103A\": \"auk\",\n \"\\u1004\\u103A\": \"in\",\n \"\\u102D\\u102F\\u1004\\u103A\": \"aing\",\n \"\\u1031\\u102C\\u1004\\u103A\": \"aung\",\n \"\\u1005\\u103A\": \"it\",\n \"\\u100A\\u103A\": \"i\",\n \"\\u1010\\u103A\": \"at\",\n \"\\u102D\\u1010\\u103A\": \"eik\",\n \"\\u102F\\u1010\\u103A\": \"ok\",\n \"\\u103D\\u1010\\u103A\": \"ut\",\n \"\\u1031\\u1010\\u103A\": \"it\",\n \"\\u1012\\u103A\": \"d\",\n \"\\u102D\\u102F\\u1012\\u103A\": \"ok\",\n \"\\u102F\\u1012\\u103A\": \"ait\",\n \"\\u1014\\u103A\": \"an\",\n \"\\u102C\\u1014\\u103A\": \"an\",\n \"\\u102D\\u1014\\u103A\": \"ein\",\n \"\\u102F\\u1014\\u103A\": \"on\",\n \"\\u103D\\u1014\\u103A\": \"un\",\n \"\\u1015\\u103A\": \"at\",\n \"\\u102D\\u1015\\u103A\": \"eik\",\n \"\\u102F\\u1015\\u103A\": \"ok\",\n \"\\u103D\\u1015\\u103A\": \"ut\",\n \"\\u1014\\u103A\\u102F\\u1015\\u103A\": \"nub\",\n \"\\u1019\\u103A\": \"an\",\n \"\\u102D\\u1019\\u103A\": \"ein\",\n \"\\u102F\\u1019\\u103A\": \"on\",\n \"\\u103D\\u1019\\u103A\": \"un\",\n \"\\u101A\\u103A\": \"e\",\n \"\\u102D\\u102F\\u101C\\u103A\": \"ol\",\n \"\\u1009\\u103A\": \"in\",\n \"\\u1036\": \"an\",\n \"\\u102D\\u1036\": \"ein\",\n \"\\u102F\\u1036\": \"on\",\n // Dhivehi\n \"\\u07A6\\u0787\\u07B0\": \"ah\",\n \"\\u07A6\\u0781\\u07B0\": \"ah\"\n };\n var langCharMap = {\n \"en\": {},\n // default language\n \"az\": {\n // Azerbaijani\n \"\\xE7\": \"c\",\n \"\\u0259\": \"e\",\n \"\\u011F\": \"g\",\n \"\\u0131\": \"i\",\n \"\\xF6\": \"o\",\n \"\\u015F\": \"s\",\n \"\\xFC\": \"u\",\n \"\\xC7\": \"C\",\n \"\\u018F\": \"E\",\n \"\\u011E\": \"G\",\n \"\\u0130\": \"I\",\n \"\\xD6\": \"O\",\n \"\\u015E\": \"S\",\n \"\\xDC\": \"U\"\n },\n \"cs\": {\n // Czech\n \"\\u010D\": \"c\",\n \"\\u010F\": \"d\",\n \"\\u011B\": \"e\",\n \"\\u0148\": \"n\",\n \"\\u0159\": \"r\",\n \"\\u0161\": \"s\",\n \"\\u0165\": \"t\",\n \"\\u016F\": \"u\",\n \"\\u017E\": \"z\",\n \"\\u010C\": \"C\",\n \"\\u010E\": \"D\",\n \"\\u011A\": \"E\",\n \"\\u0147\": \"N\",\n \"\\u0158\": \"R\",\n \"\\u0160\": \"S\",\n \"\\u0164\": \"T\",\n \"\\u016E\": \"U\",\n \"\\u017D\": \"Z\"\n },\n \"fi\": {\n // Finnish\n // 'å': 'a', duplicate see charMap/latin\n // 'Å': 'A', duplicate see charMap/latin\n \"\\xE4\": \"a\",\n // ok\n \"\\xC4\": \"A\",\n // ok\n \"\\xF6\": \"o\",\n // ok\n \"\\xD6\": \"O\"\n // ok\n },\n \"hu\": {\n // Hungarian\n \"\\xE4\": \"a\",\n // ok\n \"\\xC4\": \"A\",\n // ok\n // 'á': 'a', duplicate see charMap/latin\n // 'Á': 'A', duplicate see charMap/latin\n \"\\xF6\": \"o\",\n // ok\n \"\\xD6\": \"O\",\n // ok\n // 'ő': 'o', duplicate see charMap/latin\n // 'Ő': 'O', duplicate see charMap/latin\n \"\\xFC\": \"u\",\n \"\\xDC\": \"U\",\n \"\\u0171\": \"u\",\n \"\\u0170\": \"U\"\n },\n \"lt\": {\n // Lithuanian\n \"\\u0105\": \"a\",\n \"\\u010D\": \"c\",\n \"\\u0119\": \"e\",\n \"\\u0117\": \"e\",\n \"\\u012F\": \"i\",\n \"\\u0161\": \"s\",\n \"\\u0173\": \"u\",\n \"\\u016B\": \"u\",\n \"\\u017E\": \"z\",\n \"\\u0104\": \"A\",\n \"\\u010C\": \"C\",\n \"\\u0118\": \"E\",\n \"\\u0116\": \"E\",\n \"\\u012E\": \"I\",\n \"\\u0160\": \"S\",\n \"\\u0172\": \"U\",\n \"\\u016A\": \"U\"\n },\n \"lv\": {\n // Latvian\n \"\\u0101\": \"a\",\n \"\\u010D\": \"c\",\n \"\\u0113\": \"e\",\n \"\\u0123\": \"g\",\n \"\\u012B\": \"i\",\n \"\\u0137\": \"k\",\n \"\\u013C\": \"l\",\n \"\\u0146\": \"n\",\n \"\\u0161\": \"s\",\n \"\\u016B\": \"u\",\n \"\\u017E\": \"z\",\n \"\\u0100\": \"A\",\n \"\\u010C\": \"C\",\n \"\\u0112\": \"E\",\n \"\\u0122\": \"G\",\n \"\\u012A\": \"i\",\n \"\\u0136\": \"k\",\n \"\\u013B\": \"L\",\n \"\\u0145\": \"N\",\n \"\\u0160\": \"S\",\n \"\\u016A\": \"u\",\n \"\\u017D\": \"Z\"\n },\n \"pl\": {\n // Polish\n \"\\u0105\": \"a\",\n \"\\u0107\": \"c\",\n \"\\u0119\": \"e\",\n \"\\u0142\": \"l\",\n \"\\u0144\": \"n\",\n \"\\xF3\": \"o\",\n \"\\u015B\": \"s\",\n \"\\u017A\": \"z\",\n \"\\u017C\": \"z\",\n \"\\u0104\": \"A\",\n \"\\u0106\": \"C\",\n \"\\u0118\": \"e\",\n \"\\u0141\": \"L\",\n \"\\u0143\": \"N\",\n \"\\xD3\": \"O\",\n \"\\u015A\": \"S\",\n \"\\u0179\": \"Z\",\n \"\\u017B\": \"Z\"\n },\n \"sv\": {\n // Swedish\n // 'å': 'a', duplicate see charMap/latin\n // 'Å': 'A', duplicate see charMap/latin\n \"\\xE4\": \"a\",\n // ok\n \"\\xC4\": \"A\",\n // ok\n \"\\xF6\": \"o\",\n // ok\n \"\\xD6\": \"O\"\n // ok\n },\n \"sk\": {\n // Slovak\n \"\\xE4\": \"a\",\n \"\\xC4\": \"A\"\n },\n \"sr\": {\n // Serbian\n \"\\u0459\": \"lj\",\n \"\\u045A\": \"nj\",\n \"\\u0409\": \"Lj\",\n \"\\u040A\": \"Nj\",\n \"\\u0111\": \"dj\",\n \"\\u0110\": \"Dj\"\n },\n \"tr\": {\n // Turkish\n \"\\xDC\": \"U\",\n \"\\xD6\": \"O\",\n \"\\xFC\": \"u\",\n \"\\xF6\": \"o\"\n }\n };\n var symbolMap = {\n \"ar\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"la-nihaya\",\n \"\\u2665\": \"hob\",\n \"&\": \"wa\",\n \"|\": \"aw\",\n \"<\": \"aqal-men\",\n \">\": \"akbar-men\",\n \"\\u2211\": \"majmou\",\n \"\\xA4\": \"omla\"\n },\n \"az\": {},\n \"ca\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"infinit\",\n \"\\u2665\": \"amor\",\n \"&\": \"i\",\n \"|\": \"o\",\n \"<\": \"menys que\",\n \">\": \"mes que\",\n \"\\u2211\": \"suma dels\",\n \"\\xA4\": \"moneda\"\n },\n \"cs\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"nekonecno\",\n \"\\u2665\": \"laska\",\n \"&\": \"a\",\n \"|\": \"nebo\",\n \"<\": \"mensi nez\",\n \">\": \"vetsi nez\",\n \"\\u2211\": \"soucet\",\n \"\\xA4\": \"mena\"\n },\n \"de\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"unendlich\",\n \"\\u2665\": \"Liebe\",\n \"&\": \"und\",\n \"|\": \"oder\",\n \"<\": \"kleiner als\",\n \">\": \"groesser als\",\n \"\\u2211\": \"Summe von\",\n \"\\xA4\": \"Waehrung\"\n },\n \"dv\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"kolunulaa\",\n \"\\u2665\": \"loabi\",\n \"&\": \"aai\",\n \"|\": \"noonee\",\n \"<\": \"ah vure kuda\",\n \">\": \"ah vure bodu\",\n \"\\u2211\": \"jumula\",\n \"\\xA4\": \"faisaa\"\n },\n \"en\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"infinity\",\n \"\\u2665\": \"love\",\n \"&\": \"and\",\n \"|\": \"or\",\n \"<\": \"less than\",\n \">\": \"greater than\",\n \"\\u2211\": \"sum\",\n \"\\xA4\": \"currency\"\n },\n \"es\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"infinito\",\n \"\\u2665\": \"amor\",\n \"&\": \"y\",\n \"|\": \"u\",\n \"<\": \"menos que\",\n \">\": \"mas que\",\n \"\\u2211\": \"suma de los\",\n \"\\xA4\": \"moneda\"\n },\n \"fa\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"bi-nahayat\",\n \"\\u2665\": \"eshgh\",\n \"&\": \"va\",\n \"|\": \"ya\",\n \"<\": \"kamtar-az\",\n \">\": \"bishtar-az\",\n \"\\u2211\": \"majmooe\",\n \"\\xA4\": \"vahed\"\n },\n \"fi\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"aarettomyys\",\n \"\\u2665\": \"rakkaus\",\n \"&\": \"ja\",\n \"|\": \"tai\",\n \"<\": \"pienempi kuin\",\n \">\": \"suurempi kuin\",\n \"\\u2211\": \"summa\",\n \"\\xA4\": \"valuutta\"\n },\n \"fr\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"infiniment\",\n \"\\u2665\": \"Amour\",\n \"&\": \"et\",\n \"|\": \"ou\",\n \"<\": \"moins que\",\n \">\": \"superieure a\",\n \"\\u2211\": \"somme des\",\n \"\\xA4\": \"monnaie\"\n },\n \"ge\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"usasruloba\",\n \"\\u2665\": \"siqvaruli\",\n \"&\": \"da\",\n \"|\": \"an\",\n \"<\": \"naklebi\",\n \">\": \"meti\",\n \"\\u2211\": \"jami\",\n \"\\xA4\": \"valuta\"\n },\n \"gr\": {},\n \"hu\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"vegtelen\",\n \"\\u2665\": \"szerelem\",\n \"&\": \"es\",\n \"|\": \"vagy\",\n \"<\": \"kisebb mint\",\n \">\": \"nagyobb mint\",\n \"\\u2211\": \"szumma\",\n \"\\xA4\": \"penznem\"\n },\n \"it\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"infinito\",\n \"\\u2665\": \"amore\",\n \"&\": \"e\",\n \"|\": \"o\",\n \"<\": \"minore di\",\n \">\": \"maggiore di\",\n \"\\u2211\": \"somma\",\n \"\\xA4\": \"moneta\"\n },\n \"lt\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"begalybe\",\n \"\\u2665\": \"meile\",\n \"&\": \"ir\",\n \"|\": \"ar\",\n \"<\": \"maziau nei\",\n \">\": \"daugiau nei\",\n \"\\u2211\": \"suma\",\n \"\\xA4\": \"valiuta\"\n },\n \"lv\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"bezgaliba\",\n \"\\u2665\": \"milestiba\",\n \"&\": \"un\",\n \"|\": \"vai\",\n \"<\": \"mazak neka\",\n \">\": \"lielaks neka\",\n \"\\u2211\": \"summa\",\n \"\\xA4\": \"valuta\"\n },\n \"my\": {\n \"\\u2206\": \"kwahkhyaet\",\n \"\\u221E\": \"asaonasme\",\n \"\\u2665\": \"akhyait\",\n \"&\": \"nhin\",\n \"|\": \"tho\",\n \"<\": \"ngethaw\",\n \">\": \"kyithaw\",\n \"\\u2211\": \"paungld\",\n \"\\xA4\": \"ngwekye\"\n },\n \"mk\": {},\n \"nl\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"oneindig\",\n \"\\u2665\": \"liefde\",\n \"&\": \"en\",\n \"|\": \"of\",\n \"<\": \"kleiner dan\",\n \">\": \"groter dan\",\n \"\\u2211\": \"som\",\n \"\\xA4\": \"valuta\"\n },\n \"pl\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"nieskonczonosc\",\n \"\\u2665\": \"milosc\",\n \"&\": \"i\",\n \"|\": \"lub\",\n \"<\": \"mniejsze niz\",\n \">\": \"wieksze niz\",\n \"\\u2211\": \"suma\",\n \"\\xA4\": \"waluta\"\n },\n \"pt\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"infinito\",\n \"\\u2665\": \"amor\",\n \"&\": \"e\",\n \"|\": \"ou\",\n \"<\": \"menor que\",\n \">\": \"maior que\",\n \"\\u2211\": \"soma\",\n \"\\xA4\": \"moeda\"\n },\n \"ro\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"infinit\",\n \"\\u2665\": \"dragoste\",\n \"&\": \"si\",\n \"|\": \"sau\",\n \"<\": \"mai mic ca\",\n \">\": \"mai mare ca\",\n \"\\u2211\": \"suma\",\n \"\\xA4\": \"valuta\"\n },\n \"ru\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"beskonechno\",\n \"\\u2665\": \"lubov\",\n \"&\": \"i\",\n \"|\": \"ili\",\n \"<\": \"menshe\",\n \">\": \"bolshe\",\n \"\\u2211\": \"summa\",\n \"\\xA4\": \"valjuta\"\n },\n \"sk\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"nekonecno\",\n \"\\u2665\": \"laska\",\n \"&\": \"a\",\n \"|\": \"alebo\",\n \"<\": \"menej ako\",\n \">\": \"viac ako\",\n \"\\u2211\": \"sucet\",\n \"\\xA4\": \"mena\"\n },\n \"sr\": {},\n \"tr\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"sonsuzluk\",\n \"\\u2665\": \"ask\",\n \"&\": \"ve\",\n \"|\": \"veya\",\n \"<\": \"kucuktur\",\n \">\": \"buyuktur\",\n \"\\u2211\": \"toplam\",\n \"\\xA4\": \"para birimi\"\n },\n \"uk\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"bezkinechnist\",\n \"\\u2665\": \"lubov\",\n \"&\": \"i\",\n \"|\": \"abo\",\n \"<\": \"menshe\",\n \">\": \"bilshe\",\n \"\\u2211\": \"suma\",\n \"\\xA4\": \"valjuta\"\n },\n \"vn\": {\n \"\\u2206\": \"delta\",\n \"\\u221E\": \"vo cuc\",\n \"\\u2665\": \"yeu\",\n \"&\": \"va\",\n \"|\": \"hoac\",\n \"<\": \"nho hon\",\n \">\": \"lon hon\",\n \"\\u2211\": \"tong\",\n \"\\xA4\": \"tien te\"\n }\n };\n var uricChars = [\";\", \"?\", \":\", \"@\", \"&\", \"=\", \"+\", \"$\", \",\", \"/\"].join(\"\");\n var uricNoSlashChars = [\";\", \"?\", \":\", \"@\", \"&\", \"=\", \"+\", \"$\", \",\"].join(\"\");\n var markChars = [\".\", \"!\", \"~\", \"*\", \"'\", \"(\", \")\"].join(\"\");\n var getSlug = function getSlug2(input, opts) {\n var separator = \"-\";\n var result = \"\";\n var diatricString = \"\";\n var convertSymbols = true;\n var customReplacements = {};\n var maintainCase;\n var titleCase;\n var truncate;\n var uricFlag;\n var uricNoSlashFlag;\n var markFlag;\n var symbol;\n var langChar;\n var lucky;\n var i;\n var ch;\n var l;\n var lastCharWasSymbol;\n var lastCharWasDiatric;\n var allowedChars = \"\";\n if (typeof input !== \"string\") {\n return \"\";\n }\n if (typeof opts === \"string\") {\n separator = opts;\n }\n symbol = symbolMap.en;\n langChar = langCharMap.en;\n if (typeof opts === \"object\") {\n maintainCase = opts.maintainCase || false;\n customReplacements = opts.custom && typeof opts.custom === \"object\" ? opts.custom : customReplacements;\n truncate = +opts.truncate > 1 && opts.truncate || false;\n uricFlag = opts.uric || false;\n uricNoSlashFlag = opts.uricNoSlash || false;\n markFlag = opts.mark || false;\n convertSymbols = opts.symbols === false || opts.lang === false ? false : true;\n separator = opts.separator || separator;\n if (uricFlag) {\n allowedChars += uricChars;\n }\n if (uricNoSlashFlag) {\n allowedChars += uricNoSlashChars;\n }\n if (markFlag) {\n allowedChars += markChars;\n }\n symbol = opts.lang && symbolMap[opts.lang] && convertSymbols ? symbolMap[opts.lang] : convertSymbols ? symbolMap.en : {};\n langChar = opts.lang && langCharMap[opts.lang] ? langCharMap[opts.lang] : opts.lang === false || opts.lang === true ? {} : langCharMap.en;\n if (opts.titleCase && typeof opts.titleCase.length === \"number\" && Array.prototype.toString.call(opts.titleCase)) {\n opts.titleCase.forEach(function(v) {\n customReplacements[v + \"\"] = v + \"\";\n });\n titleCase = true;\n } else {\n titleCase = !!opts.titleCase;\n }\n if (opts.custom && typeof opts.custom.length === \"number\" && Array.prototype.toString.call(opts.custom)) {\n opts.custom.forEach(function(v) {\n customReplacements[v + \"\"] = v + \"\";\n });\n }\n Object.keys(customReplacements).forEach(function(v) {\n var r;\n if (v.length > 1) {\n r = new RegExp(\"\\\\b\" + escapeChars(v) + \"\\\\b\", \"gi\");\n } else {\n r = new RegExp(escapeChars(v), \"gi\");\n }\n input = input.replace(r, customReplacements[v]);\n });\n for (ch in customReplacements) {\n allowedChars += ch;\n }\n }\n allowedChars += separator;\n allowedChars = escapeChars(allowedChars);\n input = input.replace(/(^\\s+|\\s+$)/g, \"\");\n lastCharWasSymbol = false;\n lastCharWasDiatric = false;\n for (i = 0, l = input.length; i < l; i++) {\n ch = input[i];\n if (isReplacedCustomChar(ch, customReplacements)) {\n lastCharWasSymbol = false;\n } else if (langChar[ch]) {\n ch = lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/) ? \" \" + langChar[ch] : langChar[ch];\n lastCharWasSymbol = false;\n } else if (ch in charMap) {\n if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) {\n diatricString += ch;\n ch = \"\";\n } else if (lastCharWasDiatric === true) {\n ch = diatricMap[diatricString] + charMap[ch];\n diatricString = \"\";\n } else {\n ch = lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/) ? \" \" + charMap[ch] : charMap[ch];\n }\n lastCharWasSymbol = false;\n lastCharWasDiatric = false;\n } else if (ch in diatricMap) {\n diatricString += ch;\n ch = \"\";\n if (i === l - 1) {\n ch = diatricMap[diatricString];\n }\n lastCharWasDiatric = true;\n } else if (\n // process symbol chars\n symbol[ch] && !(uricFlag && uricChars.indexOf(ch) !== -1) && !(uricNoSlashFlag && uricNoSlashChars.indexOf(ch) !== -1)\n ) {\n ch = lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/) ? separator + symbol[ch] : symbol[ch];\n ch += input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/) ? separator : \"\";\n lastCharWasSymbol = true;\n } else {\n if (lastCharWasDiatric === true) {\n ch = diatricMap[diatricString] + ch;\n diatricString = \"\";\n lastCharWasDiatric = false;\n } else if (lastCharWasSymbol && (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))) {\n ch = \" \" + ch;\n }\n lastCharWasSymbol = false;\n }\n result += ch.replace(new RegExp(\"[^\\\\w\\\\s\" + allowedChars + \"_-]\", \"g\"), separator);\n }\n if (titleCase) {\n result = result.replace(/(\\w)(\\S*)/g, function(_, i2, r) {\n var j = i2.toUpperCase() + (r !== null ? r : \"\");\n return Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0 ? j : j.toLowerCase();\n });\n }\n result = result.replace(/\\s+/g, separator).replace(new RegExp(\"\\\\\" + separator + \"+\", \"g\"), separator).replace(new RegExp(\"(^\\\\\" + separator + \"+|\\\\\" + separator + \"+$)\", \"g\"), \"\");\n if (truncate && result.length > truncate) {\n lucky = result.charAt(truncate) === separator;\n result = result.slice(0, truncate);\n if (!lucky) {\n result = result.slice(0, result.lastIndexOf(separator));\n }\n }\n if (!maintainCase && !titleCase) {\n result = result.toLowerCase();\n }\n return result;\n };\n var createSlug = function createSlug2(opts) {\n return function getSlugWithConfig(input) {\n return getSlug(input, opts);\n };\n };\n var escapeChars = function escapeChars2(input) {\n return input.replace(/[-\\\\^$*+?.()|[\\]{}\\/]/g, \"\\\\$&\");\n };\n var isReplacedCustomChar = function(ch, customReplacements) {\n for (var c in customReplacements) {\n if (customReplacements[c] === ch) {\n return true;\n }\n }\n };\n if (typeof module !== \"undefined\" && module.exports) {\n module.exports = getSlug;\n module.exports.createSlug = createSlug;\n } else if (typeof define !== \"undefined\" && define.amd) {\n define([], function() {\n return getSlug;\n });\n } else {\n try {\n if (root.getSlug || root.createSlug) {\n throw \"speakingurl: globals exists /(getSlug|createSlug)/\";\n } else {\n root.getSlug = getSlug;\n root.createSlug = createSlug;\n }\n } catch (e) {\n }\n }\n })(exports);\n }\n});\n\n// ../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js\nvar require_speakingurl2 = __commonJS({\n \"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js\"(exports, module) {\n \"use strict\";\n init_esm_shims();\n module.exports = require_speakingurl();\n }\n});\n\n// src/index.ts\ninit_esm_shims();\n\n// src/core/index.ts\ninit_esm_shims();\nimport { isNuxtApp, target as target13 } from \"@vue/devtools-shared\";\n\n// src/compat/index.ts\ninit_esm_shims();\nimport { target } from \"@vue/devtools-shared\";\nfunction onLegacyDevToolsPluginApiAvailable(cb) {\n if (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__) {\n cb();\n return;\n }\n Object.defineProperty(target, \"__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__\", {\n set(value) {\n if (value)\n cb();\n },\n configurable: true\n });\n}\n\n// src/ctx/index.ts\ninit_esm_shims();\nimport { target as target11 } from \"@vue/devtools-shared\";\n\n// src/ctx/api.ts\ninit_esm_shims();\nimport { target as target9 } from \"@vue/devtools-shared\";\n\n// src/core/component-highlighter/index.ts\ninit_esm_shims();\n\n// src/core/component/state/bounding-rect.ts\ninit_esm_shims();\n\n// src/core/component/utils/index.ts\ninit_esm_shims();\nimport { basename, classify } from \"@vue/devtools-shared\";\nfunction getComponentTypeName(options) {\n var _a25;\n const name = options.name || options._componentTag || options.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || options.__name;\n if (name === \"index\" && ((_a25 = options.__file) == null ? void 0 : _a25.endsWith(\"index.vue\"))) {\n return \"\";\n }\n return name;\n}\nfunction getComponentFileName(options) {\n const file = options.__file;\n if (file)\n return classify(basename(file, \".vue\"));\n}\nfunction getComponentName(options) {\n const name = options.displayName || options.name || options._componentTag;\n if (name)\n return name;\n return getComponentFileName(options);\n}\nfunction saveComponentGussedName(instance, name) {\n instance.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ = name;\n return name;\n}\nfunction getAppRecord(instance) {\n if (instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__)\n return instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__;\n else if (instance.root)\n return instance.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;\n}\nasync function getComponentId(options) {\n const { app, uid, instance } = options;\n try {\n if (instance.__VUE_DEVTOOLS_NEXT_UID__)\n return instance.__VUE_DEVTOOLS_NEXT_UID__;\n const appRecord = await getAppRecord(app);\n if (!appRecord)\n return null;\n const isRoot = appRecord.rootInstance === instance;\n return `${appRecord.id}:${isRoot ? \"root\" : uid}`;\n } catch (e) {\n }\n}\nfunction isFragment(instance) {\n var _a25, _b25;\n const subTreeType = (_a25 = instance.subTree) == null ? void 0 : _a25.type;\n const appRecord = getAppRecord(instance);\n if (appRecord) {\n return ((_b25 = appRecord == null ? void 0 : appRecord.types) == null ? void 0 : _b25.Fragment) === subTreeType;\n }\n return false;\n}\nfunction isBeingDestroyed(instance) {\n return instance._isBeingDestroyed || instance.isUnmounted;\n}\nfunction getInstanceName(instance) {\n var _a25, _b25, _c;\n const name = getComponentTypeName((instance == null ? void 0 : instance.type) || {});\n if (name)\n return name;\n if ((instance == null ? void 0 : instance.root) === instance)\n return \"Root\";\n for (const key in (_b25 = (_a25 = instance.parent) == null ? void 0 : _a25.type) == null ? void 0 : _b25.components) {\n if (instance.parent.type.components[key] === (instance == null ? void 0 : instance.type))\n return saveComponentGussedName(instance, key);\n }\n for (const key in (_c = instance.appContext) == null ? void 0 : _c.components) {\n if (instance.appContext.components[key] === (instance == null ? void 0 : instance.type))\n return saveComponentGussedName(instance, key);\n }\n const fileName = getComponentFileName((instance == null ? void 0 : instance.type) || {});\n if (fileName)\n return fileName;\n return \"Anonymous Component\";\n}\nfunction getUniqueComponentId(instance) {\n var _a25, _b25, _c;\n const appId = (_c = (_b25 = (_a25 = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a25.app) == null ? void 0 : _b25.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__) != null ? _c : 0;\n const instanceId = instance === (instance == null ? void 0 : instance.root) ? \"root\" : instance.uid;\n return `${appId}:${instanceId}`;\n}\nfunction getRenderKey(value) {\n if (value == null)\n return \"\";\n if (typeof value === \"number\")\n return value;\n else if (typeof value === \"string\")\n return `'${value}'`;\n else if (Array.isArray(value))\n return \"Array\";\n else\n return \"Object\";\n}\nfunction returnError(cb) {\n try {\n return cb();\n } catch (e) {\n return e;\n }\n}\nfunction getComponentInstance(appRecord, instanceId) {\n instanceId = instanceId || `${appRecord.id}:root`;\n const instance = appRecord.instanceMap.get(instanceId);\n return instance || appRecord.instanceMap.get(\":root\");\n}\nfunction ensurePropertyExists(obj, key, skipObjCheck = false) {\n return skipObjCheck ? key in obj : typeof obj === \"object\" && obj !== null ? key in obj : false;\n}\n\n// src/core/component/state/bounding-rect.ts\nfunction createRect() {\n const rect = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n get width() {\n return rect.right - rect.left;\n },\n get height() {\n return rect.bottom - rect.top;\n }\n };\n return rect;\n}\nvar range;\nfunction getTextRect(node) {\n if (!range)\n range = document.createRange();\n range.selectNode(node);\n return range.getBoundingClientRect();\n}\nfunction getFragmentRect(vnode) {\n const rect = createRect();\n if (!vnode.children)\n return rect;\n for (let i = 0, l = vnode.children.length; i < l; i++) {\n const childVnode = vnode.children[i];\n let childRect;\n if (childVnode.component) {\n childRect = getComponentBoundingRect(childVnode.component);\n } else if (childVnode.el) {\n const el = childVnode.el;\n if (el.nodeType === 1 || el.getBoundingClientRect)\n childRect = el.getBoundingClientRect();\n else if (el.nodeType === 3 && el.data.trim())\n childRect = getTextRect(el);\n }\n if (childRect)\n mergeRects(rect, childRect);\n }\n return rect;\n}\nfunction mergeRects(a, b) {\n if (!a.top || b.top < a.top)\n a.top = b.top;\n if (!a.bottom || b.bottom > a.bottom)\n a.bottom = b.bottom;\n if (!a.left || b.left < a.left)\n a.left = b.left;\n if (!a.right || b.right > a.right)\n a.right = b.right;\n return a;\n}\nvar DEFAULT_RECT = {\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: 0,\n height: 0\n};\nfunction getComponentBoundingRect(instance) {\n const el = instance.subTree.el;\n if (typeof window === \"undefined\") {\n return DEFAULT_RECT;\n }\n if (isFragment(instance))\n return getFragmentRect(instance.subTree);\n else if ((el == null ? void 0 : el.nodeType) === 1)\n return el == null ? void 0 : el.getBoundingClientRect();\n else if (instance.subTree.component)\n return getComponentBoundingRect(instance.subTree.component);\n else\n return DEFAULT_RECT;\n}\n\n// src/core/component/tree/el.ts\ninit_esm_shims();\nfunction getRootElementsFromComponentInstance(instance) {\n if (isFragment(instance))\n return getFragmentRootElements(instance.subTree);\n if (!instance.subTree)\n return [];\n return [instance.subTree.el];\n}\nfunction getFragmentRootElements(vnode) {\n if (!vnode.children)\n return [];\n const list = [];\n vnode.children.forEach((childVnode) => {\n if (childVnode.component)\n list.push(...getRootElementsFromComponentInstance(childVnode.component));\n else if (childVnode == null ? void 0 : childVnode.el)\n list.push(childVnode.el);\n });\n return list;\n}\n\n// src/core/component-highlighter/index.ts\nvar CONTAINER_ELEMENT_ID = \"__vue-devtools-component-inspector__\";\nvar CARD_ELEMENT_ID = \"__vue-devtools-component-inspector__card__\";\nvar COMPONENT_NAME_ELEMENT_ID = \"__vue-devtools-component-inspector__name__\";\nvar INDICATOR_ELEMENT_ID = \"__vue-devtools-component-inspector__indicator__\";\nvar containerStyles = {\n display: \"block\",\n zIndex: 2147483640,\n position: \"fixed\",\n backgroundColor: \"#42b88325\",\n border: \"1px solid #42b88350\",\n borderRadius: \"5px\",\n transition: \"all 0.1s ease-in\",\n pointerEvents: \"none\"\n};\nvar cardStyles = {\n fontFamily: \"Arial, Helvetica, sans-serif\",\n padding: \"5px 8px\",\n borderRadius: \"4px\",\n textAlign: \"left\",\n position: \"absolute\",\n left: 0,\n color: \"#e9e9e9\",\n fontSize: \"14px\",\n fontWeight: 600,\n lineHeight: \"24px\",\n backgroundColor: \"#42b883\",\n boxShadow: \"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)\"\n};\nvar indicatorStyles = {\n display: \"inline-block\",\n fontWeight: 400,\n fontStyle: \"normal\",\n fontSize: \"12px\",\n opacity: 0.7\n};\nfunction getContainerElement() {\n return document.getElementById(CONTAINER_ELEMENT_ID);\n}\nfunction getCardElement() {\n return document.getElementById(CARD_ELEMENT_ID);\n}\nfunction getIndicatorElement() {\n return document.getElementById(INDICATOR_ELEMENT_ID);\n}\nfunction getNameElement() {\n return document.getElementById(COMPONENT_NAME_ELEMENT_ID);\n}\nfunction getStyles(bounds) {\n return {\n left: `${Math.round(bounds.left * 100) / 100}px`,\n top: `${Math.round(bounds.top * 100) / 100}px`,\n width: `${Math.round(bounds.width * 100) / 100}px`,\n height: `${Math.round(bounds.height * 100) / 100}px`\n };\n}\nfunction create(options) {\n var _a25;\n const containerEl = document.createElement(\"div\");\n containerEl.id = (_a25 = options.elementId) != null ? _a25 : CONTAINER_ELEMENT_ID;\n Object.assign(containerEl.style, {\n ...containerStyles,\n ...getStyles(options.bounds),\n ...options.style\n });\n const cardEl = document.createElement(\"span\");\n cardEl.id = CARD_ELEMENT_ID;\n Object.assign(cardEl.style, {\n ...cardStyles,\n top: options.bounds.top < 35 ? 0 : \"-35px\"\n });\n const nameEl = document.createElement(\"span\");\n nameEl.id = COMPONENT_NAME_ELEMENT_ID;\n nameEl.innerHTML = `<${options.name}>  `;\n const indicatorEl = document.createElement(\"i\");\n indicatorEl.id = INDICATOR_ELEMENT_ID;\n indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;\n Object.assign(indicatorEl.style, indicatorStyles);\n cardEl.appendChild(nameEl);\n cardEl.appendChild(indicatorEl);\n containerEl.appendChild(cardEl);\n document.body.appendChild(containerEl);\n return containerEl;\n}\nfunction update(options) {\n const containerEl = getContainerElement();\n const cardEl = getCardElement();\n const nameEl = getNameElement();\n const indicatorEl = getIndicatorElement();\n if (containerEl) {\n Object.assign(containerEl.style, {\n ...containerStyles,\n ...getStyles(options.bounds)\n });\n Object.assign(cardEl.style, {\n top: options.bounds.top < 35 ? 0 : \"-35px\"\n });\n nameEl.innerHTML = `<${options.name}>  `;\n indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;\n }\n}\nfunction highlight(instance) {\n const bounds = getComponentBoundingRect(instance);\n if (!bounds.width && !bounds.height)\n return;\n const name = getInstanceName(instance);\n const container = getContainerElement();\n container ? update({ bounds, name }) : create({ bounds, name });\n}\nfunction unhighlight() {\n const el = getContainerElement();\n if (el)\n el.style.display = \"none\";\n}\nvar inspectInstance = null;\nfunction inspectFn(e) {\n const target22 = e.target;\n if (target22) {\n const instance = target22.__vueParentComponent;\n if (instance) {\n inspectInstance = instance;\n const el = instance.vnode.el;\n if (el) {\n const bounds = getComponentBoundingRect(instance);\n const name = getInstanceName(instance);\n const container = getContainerElement();\n container ? update({ bounds, name }) : create({ bounds, name });\n }\n }\n }\n}\nfunction selectComponentFn(e, cb) {\n var _a25;\n e.preventDefault();\n e.stopPropagation();\n if (inspectInstance) {\n const app = (_a25 = activeAppRecord.value) == null ? void 0 : _a25.app;\n getComponentId({\n app,\n uid: app.uid,\n instance: inspectInstance\n }).then((id) => {\n cb(id);\n });\n }\n}\nvar inspectComponentHighLighterSelectFn = null;\nfunction cancelInspectComponentHighLighter() {\n unhighlight();\n window.removeEventListener(\"mouseover\", inspectFn);\n window.removeEventListener(\"click\", inspectComponentHighLighterSelectFn, true);\n inspectComponentHighLighterSelectFn = null;\n}\nfunction inspectComponentHighLighter() {\n window.addEventListener(\"mouseover\", inspectFn);\n return new Promise((resolve) => {\n function onSelect(e) {\n e.preventDefault();\n e.stopPropagation();\n selectComponentFn(e, (id) => {\n window.removeEventListener(\"click\", onSelect, true);\n inspectComponentHighLighterSelectFn = null;\n window.removeEventListener(\"mouseover\", inspectFn);\n const el = getContainerElement();\n if (el)\n el.style.display = \"none\";\n resolve(JSON.stringify({ id }));\n });\n }\n inspectComponentHighLighterSelectFn = onSelect;\n window.addEventListener(\"click\", onSelect, true);\n });\n}\nfunction scrollToComponent(options) {\n const instance = getComponentInstance(activeAppRecord.value, options.id);\n if (instance) {\n const [el] = getRootElementsFromComponentInstance(instance);\n if (typeof el.scrollIntoView === \"function\") {\n el.scrollIntoView({\n behavior: \"smooth\"\n });\n } else {\n const bounds = getComponentBoundingRect(instance);\n const scrollTarget = document.createElement(\"div\");\n const styles = {\n ...getStyles(bounds),\n position: \"absolute\"\n };\n Object.assign(scrollTarget.style, styles);\n document.body.appendChild(scrollTarget);\n scrollTarget.scrollIntoView({\n behavior: \"smooth\"\n });\n setTimeout(() => {\n document.body.removeChild(scrollTarget);\n }, 2e3);\n }\n setTimeout(() => {\n const bounds = getComponentBoundingRect(instance);\n if (bounds.width || bounds.height) {\n const name = getInstanceName(instance);\n const el2 = getContainerElement();\n el2 ? update({ ...options, name, bounds }) : create({ ...options, name, bounds });\n setTimeout(() => {\n if (el2)\n el2.style.display = \"none\";\n }, 1500);\n }\n }, 1200);\n }\n}\n\n// src/core/component-inspector/index.ts\ninit_esm_shims();\nimport { target as target2 } from \"@vue/devtools-shared\";\nvar _a, _b;\n(_b = (_a = target2).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null ? _b : _a.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = true;\nfunction toggleComponentInspectorEnabled(enabled) {\n target2.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = enabled;\n}\nfunction waitForInspectorInit(cb) {\n let total = 0;\n const timer = setInterval(() => {\n if (target2.__VUE_INSPECTOR__) {\n clearInterval(timer);\n total += 30;\n cb();\n }\n if (total >= /* 5s */\n 5e3)\n clearInterval(timer);\n }, 30);\n}\nfunction setupInspector() {\n const inspector = target2.__VUE_INSPECTOR__;\n const _openInEditor = inspector.openInEditor;\n inspector.openInEditor = async (...params) => {\n inspector.disable();\n _openInEditor(...params);\n };\n}\nfunction getComponentInspector() {\n return new Promise((resolve) => {\n function setup() {\n setupInspector();\n resolve(target2.__VUE_INSPECTOR__);\n }\n if (!target2.__VUE_INSPECTOR__) {\n waitForInspectorInit(() => {\n setup();\n });\n } else {\n setup();\n }\n });\n}\n\n// src/core/component/state/editor.ts\ninit_esm_shims();\n\n// src/shared/stub-vue.ts\ninit_esm_shims();\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\" /* IS_READONLY */]);\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\" /* RAW */]);\n }\n return !!(value && value[\"__v_isReactive\" /* IS_REACTIVE */]);\n}\nfunction isRef(r) {\n return !!(r && r.__v_isRef === true);\n}\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\" /* RAW */];\n return raw ? toRaw(raw) : observed;\n}\nvar Fragment = Symbol.for(\"v-fgt\");\n\n// src/core/component/state/editor.ts\nvar StateEditor = class {\n constructor() {\n this.refEditor = new RefStateEditor();\n }\n set(object, path, value, cb) {\n const sections = Array.isArray(path) ? path : path.split(\".\");\n const markRef = false;\n while (sections.length > 1) {\n const section = sections.shift();\n if (object instanceof Map)\n object = object.get(section);\n if (object instanceof Set)\n object = Array.from(object.values())[section];\n else object = object[section];\n if (this.refEditor.isRef(object))\n object = this.refEditor.get(object);\n }\n const field = sections[0];\n const item = this.refEditor.get(object)[field];\n if (cb) {\n cb(object, field, value);\n } else {\n if (this.refEditor.isRef(item))\n this.refEditor.set(item, value);\n else if (markRef)\n object[field] = value;\n else\n object[field] = value;\n }\n }\n get(object, path) {\n const sections = Array.isArray(path) ? path : path.split(\".\");\n for (let i = 0; i < sections.length; i++) {\n if (object instanceof Map)\n object = object.get(sections[i]);\n else\n object = object[sections[i]];\n if (this.refEditor.isRef(object))\n object = this.refEditor.get(object);\n if (!object)\n return void 0;\n }\n return object;\n }\n has(object, path, parent = false) {\n if (typeof object === \"undefined\")\n return false;\n const sections = Array.isArray(path) ? path.slice() : path.split(\".\");\n const size = !parent ? 1 : 2;\n while (object && sections.length > size) {\n const section = sections.shift();\n object = object[section];\n if (this.refEditor.isRef(object))\n object = this.refEditor.get(object);\n }\n return object != null && Object.prototype.hasOwnProperty.call(object, sections[0]);\n }\n createDefaultSetCallback(state) {\n return (object, field, value) => {\n if (state.remove || state.newKey) {\n if (Array.isArray(object))\n object.splice(field, 1);\n else if (toRaw(object) instanceof Map)\n object.delete(field);\n else if (toRaw(object) instanceof Set)\n object.delete(Array.from(object.values())[field]);\n else Reflect.deleteProperty(object, field);\n }\n if (!state.remove) {\n const target22 = object[state.newKey || field];\n if (this.refEditor.isRef(target22))\n this.refEditor.set(target22, value);\n else if (toRaw(object) instanceof Map)\n object.set(state.newKey || field, value);\n else if (toRaw(object) instanceof Set)\n object.add(value);\n else\n object[state.newKey || field] = value;\n }\n };\n }\n};\nvar RefStateEditor = class {\n set(ref, value) {\n if (isRef(ref)) {\n ref.value = value;\n } else {\n if (ref instanceof Set && Array.isArray(value)) {\n ref.clear();\n value.forEach((v) => ref.add(v));\n return;\n }\n const currentKeys = Object.keys(value);\n if (ref instanceof Map) {\n const previousKeysSet2 = new Set(ref.keys());\n currentKeys.forEach((key) => {\n ref.set(key, Reflect.get(value, key));\n previousKeysSet2.delete(key);\n });\n previousKeysSet2.forEach((key) => ref.delete(key));\n return;\n }\n const previousKeysSet = new Set(Object.keys(ref));\n currentKeys.forEach((key) => {\n Reflect.set(ref, key, Reflect.get(value, key));\n previousKeysSet.delete(key);\n });\n previousKeysSet.forEach((key) => Reflect.deleteProperty(ref, key));\n }\n }\n get(ref) {\n return isRef(ref) ? ref.value : ref;\n }\n isRef(ref) {\n return isRef(ref) || isReactive(ref);\n }\n};\nasync function editComponentState(payload, stateEditor2) {\n const { path, nodeId, state, type } = payload;\n const instance = getComponentInstance(activeAppRecord.value, nodeId);\n if (!instance)\n return;\n const targetPath = path.slice();\n let target22;\n if (Object.keys(instance.props).includes(path[0])) {\n target22 = instance.props;\n } else if (instance.devtoolsRawSetupState && Object.keys(instance.devtoolsRawSetupState).includes(path[0])) {\n target22 = instance.devtoolsRawSetupState;\n } else if (instance.data && Object.keys(instance.data).includes(path[0])) {\n target22 = instance.data;\n } else {\n target22 = instance.proxy;\n }\n if (target22 && targetPath) {\n if (state.type === \"object\" && type === \"reactive\") {\n }\n stateEditor2.set(target22, targetPath, state.value, stateEditor2.createDefaultSetCallback(state));\n }\n}\nvar stateEditor = new StateEditor();\nasync function editState(payload) {\n editComponentState(payload, stateEditor);\n}\n\n// src/core/open-in-editor/index.ts\ninit_esm_shims();\nimport { target as target5 } from \"@vue/devtools-shared\";\n\n// src/ctx/state.ts\ninit_esm_shims();\nimport { target as global, isUrlString } from \"@vue/devtools-shared\";\nimport { debounce as debounce3 } from \"perfect-debounce\";\n\n// src/core/timeline/storage.ts\ninit_esm_shims();\nimport { isBrowser } from \"@vue/devtools-shared\";\nvar TIMELINE_LAYERS_STATE_STORAGE_ID = \"__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__\";\nfunction addTimelineLayersStateToStorage(state) {\n if (!isBrowser || typeof localStorage === \"undefined\" || localStorage === null) {\n return;\n }\n localStorage.setItem(TIMELINE_LAYERS_STATE_STORAGE_ID, JSON.stringify(state));\n}\nfunction getTimelineLayersStateFromStorage() {\n if (!isBrowser || typeof localStorage === \"undefined\" || localStorage === null) {\n return {\n recordingState: false,\n mouseEventEnabled: false,\n keyboardEventEnabled: false,\n componentEventEnabled: false,\n performanceEventEnabled: false,\n selected: \"\"\n };\n }\n const state = localStorage.getItem(TIMELINE_LAYERS_STATE_STORAGE_ID);\n return state ? JSON.parse(state) : {\n recordingState: false,\n mouseEventEnabled: false,\n keyboardEventEnabled: false,\n componentEventEnabled: false,\n performanceEventEnabled: false,\n selected: \"\"\n };\n}\n\n// src/ctx/hook.ts\ninit_esm_shims();\nimport { createHooks } from \"hookable\";\nimport { debounce as debounce2 } from \"perfect-debounce\";\n\n// src/ctx/inspector.ts\ninit_esm_shims();\nimport { target as target4 } from \"@vue/devtools-shared\";\nimport { debounce } from \"perfect-debounce\";\n\n// src/ctx/timeline.ts\ninit_esm_shims();\nimport { target as target3 } from \"@vue/devtools-shared\";\nvar _a2, _b2;\n(_b2 = (_a2 = target3).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS) != null ? _b2 : _a2.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS = [];\nvar devtoolsTimelineLayers = new Proxy(target3.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, {\n get(target22, prop, receiver) {\n return Reflect.get(target22, prop, receiver);\n }\n});\nfunction addTimelineLayer(options, descriptor) {\n devtoolsState.timelineLayersState[descriptor.id] = false;\n devtoolsTimelineLayers.push({\n ...options,\n descriptorId: descriptor.id,\n appRecord: getAppRecord(descriptor.app)\n });\n}\nfunction updateTimelineLayersState(state) {\n const updatedState = {\n ...devtoolsState.timelineLayersState,\n ...state\n };\n addTimelineLayersStateToStorage(updatedState);\n updateDevToolsState({\n timelineLayersState: updatedState\n });\n}\n\n// src/ctx/inspector.ts\nvar _a3, _b3;\n(_b3 = (_a3 = target4).__VUE_DEVTOOLS_KIT_INSPECTOR__) != null ? _b3 : _a3.__VUE_DEVTOOLS_KIT_INSPECTOR__ = [];\nvar devtoolsInspector = new Proxy(target4.__VUE_DEVTOOLS_KIT_INSPECTOR__, {\n get(target22, prop, receiver) {\n return Reflect.get(target22, prop, receiver);\n }\n});\nvar callInspectorUpdatedHook = debounce(() => {\n devtoolsContext.hooks.callHook(\"sendInspectorToClient\" /* SEND_INSPECTOR_TO_CLIENT */, getActiveInspectors());\n});\nfunction addInspector(inspector, descriptor) {\n var _a25, _b25;\n devtoolsInspector.push({\n options: inspector,\n descriptor,\n treeFilterPlaceholder: (_a25 = inspector.treeFilterPlaceholder) != null ? _a25 : \"Search tree...\",\n stateFilterPlaceholder: (_b25 = inspector.stateFilterPlaceholder) != null ? _b25 : \"Search state...\",\n treeFilter: \"\",\n selectedNodeId: \"\",\n appRecord: getAppRecord(descriptor.app)\n });\n callInspectorUpdatedHook();\n}\nfunction getActiveInspectors() {\n return devtoolsInspector.filter((inspector) => inspector.descriptor.app === activeAppRecord.value.app).filter((inspector) => inspector.descriptor.id !== \"components\").map((inspector) => {\n var _a25;\n const descriptor = inspector.descriptor;\n const options = inspector.options;\n return {\n id: options.id,\n label: options.label,\n logo: descriptor.logo,\n icon: `custom-ic-baseline-${(_a25 = options == null ? void 0 : options.icon) == null ? void 0 : _a25.replace(/_/g, \"-\")}`,\n packageName: descriptor.packageName,\n homepage: descriptor.homepage,\n pluginId: descriptor.id\n };\n });\n}\nfunction getInspectorInfo(id) {\n const inspector = getInspector(id, activeAppRecord.value.app);\n if (!inspector)\n return;\n const descriptor = inspector.descriptor;\n const options = inspector.options;\n const timelineLayers = devtoolsTimelineLayers.filter((layer) => layer.descriptorId === descriptor.id).map((item) => ({\n id: item.id,\n label: item.label,\n color: item.color\n }));\n return {\n id: options.id,\n label: options.label,\n logo: descriptor.logo,\n packageName: descriptor.packageName,\n homepage: descriptor.homepage,\n timelineLayers,\n treeFilterPlaceholder: inspector.treeFilterPlaceholder,\n stateFilterPlaceholder: inspector.stateFilterPlaceholder\n };\n}\nfunction getInspector(id, app) {\n return devtoolsInspector.find((inspector) => inspector.options.id === id && (app ? inspector.descriptor.app === app : true));\n}\nfunction getInspectorActions(id) {\n const inspector = getInspector(id);\n return inspector == null ? void 0 : inspector.options.actions;\n}\nfunction getInspectorNodeActions(id) {\n const inspector = getInspector(id);\n return inspector == null ? void 0 : inspector.options.nodeActions;\n}\n\n// src/ctx/hook.ts\nvar DevToolsV6PluginAPIHookKeys = /* @__PURE__ */ ((DevToolsV6PluginAPIHookKeys2) => {\n DevToolsV6PluginAPIHookKeys2[\"VISIT_COMPONENT_TREE\"] = \"visitComponentTree\";\n DevToolsV6PluginAPIHookKeys2[\"INSPECT_COMPONENT\"] = \"inspectComponent\";\n DevToolsV6PluginAPIHookKeys2[\"EDIT_COMPONENT_STATE\"] = \"editComponentState\";\n DevToolsV6PluginAPIHookKeys2[\"GET_INSPECTOR_TREE\"] = \"getInspectorTree\";\n DevToolsV6PluginAPIHookKeys2[\"GET_INSPECTOR_STATE\"] = \"getInspectorState\";\n DevToolsV6PluginAPIHookKeys2[\"EDIT_INSPECTOR_STATE\"] = \"editInspectorState\";\n DevToolsV6PluginAPIHookKeys2[\"INSPECT_TIMELINE_EVENT\"] = \"inspectTimelineEvent\";\n DevToolsV6PluginAPIHookKeys2[\"TIMELINE_CLEARED\"] = \"timelineCleared\";\n DevToolsV6PluginAPIHookKeys2[\"SET_PLUGIN_SETTINGS\"] = \"setPluginSettings\";\n return DevToolsV6PluginAPIHookKeys2;\n})(DevToolsV6PluginAPIHookKeys || {});\nvar DevToolsContextHookKeys = /* @__PURE__ */ ((DevToolsContextHookKeys2) => {\n DevToolsContextHookKeys2[\"ADD_INSPECTOR\"] = \"addInspector\";\n DevToolsContextHookKeys2[\"SEND_INSPECTOR_TREE\"] = \"sendInspectorTree\";\n DevToolsContextHookKeys2[\"SEND_INSPECTOR_STATE\"] = \"sendInspectorState\";\n DevToolsContextHookKeys2[\"CUSTOM_INSPECTOR_SELECT_NODE\"] = \"customInspectorSelectNode\";\n DevToolsContextHookKeys2[\"TIMELINE_LAYER_ADDED\"] = \"timelineLayerAdded\";\n DevToolsContextHookKeys2[\"TIMELINE_EVENT_ADDED\"] = \"timelineEventAdded\";\n DevToolsContextHookKeys2[\"GET_COMPONENT_INSTANCES\"] = \"getComponentInstances\";\n DevToolsContextHookKeys2[\"GET_COMPONENT_BOUNDS\"] = \"getComponentBounds\";\n DevToolsContextHookKeys2[\"GET_COMPONENT_NAME\"] = \"getComponentName\";\n DevToolsContextHookKeys2[\"COMPONENT_HIGHLIGHT\"] = \"componentHighlight\";\n DevToolsContextHookKeys2[\"COMPONENT_UNHIGHLIGHT\"] = \"componentUnhighlight\";\n return DevToolsContextHookKeys2;\n})(DevToolsContextHookKeys || {});\nvar DevToolsMessagingHookKeys = /* @__PURE__ */ ((DevToolsMessagingHookKeys2) => {\n DevToolsMessagingHookKeys2[\"SEND_INSPECTOR_TREE_TO_CLIENT\"] = \"sendInspectorTreeToClient\";\n DevToolsMessagingHookKeys2[\"SEND_INSPECTOR_STATE_TO_CLIENT\"] = \"sendInspectorStateToClient\";\n DevToolsMessagingHookKeys2[\"SEND_TIMELINE_EVENT_TO_CLIENT\"] = \"sendTimelineEventToClient\";\n DevToolsMessagingHookKeys2[\"SEND_INSPECTOR_TO_CLIENT\"] = \"sendInspectorToClient\";\n DevToolsMessagingHookKeys2[\"SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT\"] = \"sendActiveAppUpdatedToClient\";\n DevToolsMessagingHookKeys2[\"DEVTOOLS_STATE_UPDATED\"] = \"devtoolsStateUpdated\";\n DevToolsMessagingHookKeys2[\"DEVTOOLS_CONNECTED_UPDATED\"] = \"devtoolsConnectedUpdated\";\n DevToolsMessagingHookKeys2[\"ROUTER_INFO_UPDATED\"] = \"routerInfoUpdated\";\n return DevToolsMessagingHookKeys2;\n})(DevToolsMessagingHookKeys || {});\nfunction createDevToolsCtxHooks() {\n const hooks2 = createHooks();\n hooks2.hook(\"addInspector\" /* ADD_INSPECTOR */, ({ inspector, plugin }) => {\n addInspector(inspector, plugin.descriptor);\n });\n const debounceSendInspectorTree = debounce2(async ({ inspectorId, plugin }) => {\n var _a25;\n if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)\n return;\n const inspector = getInspector(inspectorId, plugin.descriptor.app);\n const _payload = {\n app: plugin.descriptor.app,\n inspectorId,\n filter: (inspector == null ? void 0 : inspector.treeFilter) || \"\",\n rootNodes: []\n };\n await new Promise((resolve) => {\n hooks2.callHookWith(async (callbacks) => {\n await Promise.all(callbacks.map((cb) => cb(_payload)));\n resolve();\n }, \"getInspectorTree\" /* GET_INSPECTOR_TREE */);\n });\n hooks2.callHookWith(async (callbacks) => {\n await Promise.all(callbacks.map((cb) => cb({\n inspectorId,\n rootNodes: _payload.rootNodes\n })));\n }, \"sendInspectorTreeToClient\" /* SEND_INSPECTOR_TREE_TO_CLIENT */);\n }, 120);\n hooks2.hook(\"sendInspectorTree\" /* SEND_INSPECTOR_TREE */, debounceSendInspectorTree);\n const debounceSendInspectorState = debounce2(async ({ inspectorId, plugin }) => {\n var _a25;\n if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)\n return;\n const inspector = getInspector(inspectorId, plugin.descriptor.app);\n const _payload = {\n app: plugin.descriptor.app,\n inspectorId,\n nodeId: (inspector == null ? void 0 : inspector.selectedNodeId) || \"\",\n state: null\n };\n const ctx = {\n currentTab: `custom-inspector:${inspectorId}`\n };\n if (_payload.nodeId) {\n await new Promise((resolve) => {\n hooks2.callHookWith(async (callbacks) => {\n await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));\n resolve();\n }, \"getInspectorState\" /* GET_INSPECTOR_STATE */);\n });\n }\n hooks2.callHookWith(async (callbacks) => {\n await Promise.all(callbacks.map((cb) => cb({\n inspectorId,\n nodeId: _payload.nodeId,\n state: _payload.state\n })));\n }, \"sendInspectorStateToClient\" /* SEND_INSPECTOR_STATE_TO_CLIENT */);\n }, 120);\n hooks2.hook(\"sendInspectorState\" /* SEND_INSPECTOR_STATE */, debounceSendInspectorState);\n hooks2.hook(\"customInspectorSelectNode\" /* CUSTOM_INSPECTOR_SELECT_NODE */, ({ inspectorId, nodeId, plugin }) => {\n const inspector = getInspector(inspectorId, plugin.descriptor.app);\n if (!inspector)\n return;\n inspector.selectedNodeId = nodeId;\n });\n hooks2.hook(\"timelineLayerAdded\" /* TIMELINE_LAYER_ADDED */, ({ options, plugin }) => {\n addTimelineLayer(options, plugin.descriptor);\n });\n hooks2.hook(\"timelineEventAdded\" /* TIMELINE_EVENT_ADDED */, ({ options, plugin }) => {\n var _a25;\n const internalLayerIds = [\"performance\", \"component-event\", \"keyboard\", \"mouse\"];\n if (devtoolsState.highPerfModeEnabled || !((_a25 = devtoolsState.timelineLayersState) == null ? void 0 : _a25[plugin.descriptor.id]) && !internalLayerIds.includes(options.layerId))\n return;\n hooks2.callHookWith(async (callbacks) => {\n await Promise.all(callbacks.map((cb) => cb(options)));\n }, \"sendTimelineEventToClient\" /* SEND_TIMELINE_EVENT_TO_CLIENT */);\n });\n hooks2.hook(\"getComponentInstances\" /* GET_COMPONENT_INSTANCES */, async ({ app }) => {\n const appRecord = app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;\n if (!appRecord)\n return null;\n const appId = appRecord.id.toString();\n const instances = [...appRecord.instanceMap].filter(([key]) => key.split(\":\")[0] === appId).map(([, instance]) => instance);\n return instances;\n });\n hooks2.hook(\"getComponentBounds\" /* GET_COMPONENT_BOUNDS */, async ({ instance }) => {\n const bounds = getComponentBoundingRect(instance);\n return bounds;\n });\n hooks2.hook(\"getComponentName\" /* GET_COMPONENT_NAME */, ({ instance }) => {\n const name = getInstanceName(instance);\n return name;\n });\n hooks2.hook(\"componentHighlight\" /* COMPONENT_HIGHLIGHT */, ({ uid }) => {\n const instance = activeAppRecord.value.instanceMap.get(uid);\n if (instance) {\n highlight(instance);\n }\n });\n hooks2.hook(\"componentUnhighlight\" /* COMPONENT_UNHIGHLIGHT */, () => {\n unhighlight();\n });\n return hooks2;\n}\n\n// src/ctx/state.ts\nvar _a4, _b4;\n(_b4 = (_a4 = global).__VUE_DEVTOOLS_KIT_APP_RECORDS__) != null ? _b4 : _a4.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = [];\nvar _a5, _b5;\n(_b5 = (_a5 = global).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__) != null ? _b5 : _a5.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = {};\nvar _a6, _b6;\n(_b6 = (_a6 = global).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__) != null ? _b6 : _a6.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = \"\";\nvar _a7, _b7;\n(_b7 = (_a7 = global).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__) != null ? _b7 : _a7.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ = [];\nvar _a8, _b8;\n(_b8 = (_a8 = global).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__) != null ? _b8 : _a8.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ = [];\nvar STATE_KEY = \"__VUE_DEVTOOLS_KIT_GLOBAL_STATE__\";\nfunction initStateFactory() {\n return {\n connected: false,\n clientConnected: false,\n vitePluginDetected: true,\n appRecords: [],\n activeAppRecordId: \"\",\n tabs: [],\n commands: [],\n highPerfModeEnabled: true,\n devtoolsClientDetected: {},\n perfUniqueGroupId: 0,\n timelineLayersState: getTimelineLayersStateFromStorage()\n };\n}\nvar _a9, _b9;\n(_b9 = (_a9 = global)[STATE_KEY]) != null ? _b9 : _a9[STATE_KEY] = initStateFactory();\nvar callStateUpdatedHook = debounce3((state) => {\n devtoolsContext.hooks.callHook(\"devtoolsStateUpdated\" /* DEVTOOLS_STATE_UPDATED */, { state });\n});\nvar callConnectedUpdatedHook = debounce3((state, oldState) => {\n devtoolsContext.hooks.callHook(\"devtoolsConnectedUpdated\" /* DEVTOOLS_CONNECTED_UPDATED */, { state, oldState });\n});\nvar devtoolsAppRecords = new Proxy(global.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {\n get(_target, prop, receiver) {\n if (prop === \"value\")\n return global.__VUE_DEVTOOLS_KIT_APP_RECORDS__;\n return global.__VUE_DEVTOOLS_KIT_APP_RECORDS__[prop];\n }\n});\nvar addDevToolsAppRecord = (app) => {\n global.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = [\n ...global.__VUE_DEVTOOLS_KIT_APP_RECORDS__,\n app\n ];\n};\nvar removeDevToolsAppRecord = (app) => {\n global.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = devtoolsAppRecords.value.filter((record) => record.app !== app);\n};\nvar activeAppRecord = new Proxy(global.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__, {\n get(_target, prop, receiver) {\n if (prop === \"value\")\n return global.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__;\n else if (prop === \"id\")\n return global.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__;\n return global.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[prop];\n }\n});\nfunction updateAllStates() {\n callStateUpdatedHook({\n ...global[STATE_KEY],\n appRecords: devtoolsAppRecords.value,\n activeAppRecordId: activeAppRecord.id,\n tabs: global.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,\n commands: global.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__\n });\n}\nfunction setActiveAppRecord(app) {\n global.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = app;\n updateAllStates();\n}\nfunction setActiveAppRecordId(id) {\n global.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = id;\n updateAllStates();\n}\nvar devtoolsState = new Proxy(global[STATE_KEY], {\n get(target22, property) {\n if (property === \"appRecords\") {\n return devtoolsAppRecords;\n } else if (property === \"activeAppRecordId\") {\n return activeAppRecord.id;\n } else if (property === \"tabs\") {\n return global.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;\n } else if (property === \"commands\") {\n return global.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;\n }\n return global[STATE_KEY][property];\n },\n deleteProperty(target22, property) {\n delete target22[property];\n return true;\n },\n set(target22, property, value) {\n const oldState = { ...global[STATE_KEY] };\n target22[property] = value;\n global[STATE_KEY][property] = value;\n return true;\n }\n});\nfunction resetDevToolsState() {\n Object.assign(global[STATE_KEY], initStateFactory());\n}\nfunction updateDevToolsState(state) {\n const oldState = {\n ...global[STATE_KEY],\n appRecords: devtoolsAppRecords.value,\n activeAppRecordId: activeAppRecord.id\n };\n if (oldState.connected !== state.connected && state.connected || oldState.clientConnected !== state.clientConnected && state.clientConnected) {\n callConnectedUpdatedHook(global[STATE_KEY], oldState);\n }\n Object.assign(global[STATE_KEY], state);\n updateAllStates();\n}\nfunction onDevToolsConnected(fn) {\n return new Promise((resolve) => {\n if (devtoolsState.connected) {\n fn();\n resolve();\n }\n devtoolsContext.hooks.hook(\"devtoolsConnectedUpdated\" /* DEVTOOLS_CONNECTED_UPDATED */, ({ state }) => {\n if (state.connected) {\n fn();\n resolve();\n }\n });\n });\n}\nvar resolveIcon = (icon) => {\n if (!icon)\n return;\n if (icon.startsWith(\"baseline-\")) {\n return `custom-ic-${icon}`;\n }\n if (icon.startsWith(\"i-\") || isUrlString(icon))\n return icon;\n return `custom-ic-baseline-${icon}`;\n};\nfunction addCustomTab(tab) {\n const tabs = global.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;\n if (tabs.some((t) => t.name === tab.name))\n return;\n tabs.push({\n ...tab,\n icon: resolveIcon(tab.icon)\n });\n updateAllStates();\n}\nfunction addCustomCommand(action) {\n const commands = global.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;\n if (commands.some((t) => t.id === action.id))\n return;\n commands.push({\n ...action,\n icon: resolveIcon(action.icon),\n children: action.children ? action.children.map((child) => ({\n ...child,\n icon: resolveIcon(child.icon)\n })) : void 0\n });\n updateAllStates();\n}\nfunction removeCustomCommand(actionId) {\n const commands = global.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;\n const index = commands.findIndex((t) => t.id === actionId);\n if (index === -1)\n return;\n commands.splice(index, 1);\n updateAllStates();\n}\nfunction toggleClientConnected(state) {\n updateDevToolsState({ clientConnected: state });\n}\n\n// src/core/open-in-editor/index.ts\nfunction setOpenInEditorBaseUrl(url) {\n target5.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__ = url;\n}\nfunction openInEditor(options = {}) {\n var _a25, _b25, _c;\n const { file, host, baseUrl = window.location.origin, line = 0, column = 0 } = options;\n if (file) {\n if (host === \"chrome-extension\") {\n const fileName = file.replace(/\\\\/g, \"\\\\\\\\\");\n const _baseUrl = (_b25 = (_a25 = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : _a25.openInEditorHost) != null ? _b25 : \"/\";\n fetch(`${_baseUrl}__open-in-editor?file=${encodeURI(file)}`).then((response) => {\n if (!response.ok) {\n const msg = `Opening component ${fileName} failed`;\n console.log(`%c${msg}`, \"color:red\");\n }\n });\n } else if (devtoolsState.vitePluginDetected) {\n const _baseUrl = (_c = target5.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? _c : baseUrl;\n target5.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);\n }\n }\n}\n\n// src/core/plugin/index.ts\ninit_esm_shims();\nimport { target as target8 } from \"@vue/devtools-shared\";\n\n// src/api/index.ts\ninit_esm_shims();\n\n// src/api/v6/index.ts\ninit_esm_shims();\n\n// src/core/plugin/plugin-settings.ts\ninit_esm_shims();\n\n// src/ctx/plugin.ts\ninit_esm_shims();\nimport { target as target6 } from \"@vue/devtools-shared\";\nvar _a10, _b10;\n(_b10 = (_a10 = target6).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__) != null ? _b10 : _a10.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ = [];\nvar devtoolsPluginBuffer = new Proxy(target6.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, {\n get(target22, prop, receiver) {\n return Reflect.get(target22, prop, receiver);\n }\n});\nfunction addDevToolsPluginToBuffer(pluginDescriptor, setupFn) {\n devtoolsPluginBuffer.push([pluginDescriptor, setupFn]);\n}\n\n// src/core/plugin/plugin-settings.ts\nfunction _getSettings(settings) {\n const _settings = {};\n Object.keys(settings).forEach((key) => {\n _settings[key] = settings[key].defaultValue;\n });\n return _settings;\n}\nfunction getPluginLocalKey(pluginId) {\n return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${pluginId}__`;\n}\nfunction getPluginSettingsOptions(pluginId) {\n var _a25, _b25, _c;\n const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => {\n var _a26;\n return item2[0].id === pluginId && !!((_a26 = item2[0]) == null ? void 0 : _a26.settings);\n })) == null ? void 0 : _a25[0]) != null ? _b25 : null;\n return (_c = item == null ? void 0 : item.settings) != null ? _c : null;\n}\nfunction getPluginSettings(pluginId, fallbackValue) {\n var _a25, _b25, _c;\n const localKey = getPluginLocalKey(pluginId);\n if (localKey) {\n const localSettings = localStorage.getItem(localKey);\n if (localSettings) {\n return JSON.parse(localSettings);\n }\n }\n if (pluginId) {\n const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => item2[0].id === pluginId)) == null ? void 0 : _a25[0]) != null ? _b25 : null;\n return _getSettings((_c = item == null ? void 0 : item.settings) != null ? _c : {});\n }\n return _getSettings(fallbackValue);\n}\nfunction initPluginSettings(pluginId, settings) {\n const localKey = getPluginLocalKey(pluginId);\n const localSettings = localStorage.getItem(localKey);\n if (!localSettings) {\n localStorage.setItem(localKey, JSON.stringify(_getSettings(settings)));\n }\n}\nfunction setPluginSettings(pluginId, key, value) {\n const localKey = getPluginLocalKey(pluginId);\n const localSettings = localStorage.getItem(localKey);\n const parsedLocalSettings = JSON.parse(localSettings || \"{}\");\n const updated = {\n ...parsedLocalSettings,\n [key]: value\n };\n localStorage.setItem(localKey, JSON.stringify(updated));\n devtoolsContext.hooks.callHookWith((callbacks) => {\n callbacks.forEach((cb) => cb({\n pluginId,\n key,\n oldValue: parsedLocalSettings[key],\n newValue: value,\n settings: updated\n }));\n }, \"setPluginSettings\" /* SET_PLUGIN_SETTINGS */);\n}\n\n// src/hook/index.ts\ninit_esm_shims();\nimport { target as target7 } from \"@vue/devtools-shared\";\nimport { createHooks as createHooks2 } from \"hookable\";\n\n// src/types/index.ts\ninit_esm_shims();\n\n// src/types/app.ts\ninit_esm_shims();\n\n// src/types/command.ts\ninit_esm_shims();\n\n// src/types/component.ts\ninit_esm_shims();\n\n// src/types/hook.ts\ninit_esm_shims();\n\n// src/types/inspector.ts\ninit_esm_shims();\n\n// src/types/plugin.ts\ninit_esm_shims();\n\n// src/types/router.ts\ninit_esm_shims();\n\n// src/types/tab.ts\ninit_esm_shims();\n\n// src/types/timeline.ts\ninit_esm_shims();\n\n// src/hook/index.ts\nvar _a11, _b11;\nvar devtoolsHooks = (_b11 = (_a11 = target7).__VUE_DEVTOOLS_HOOK) != null ? _b11 : _a11.__VUE_DEVTOOLS_HOOK = createHooks2();\nvar on = {\n vueAppInit(fn) {\n devtoolsHooks.hook(\"app:init\" /* APP_INIT */, fn);\n },\n vueAppUnmount(fn) {\n devtoolsHooks.hook(\"app:unmount\" /* APP_UNMOUNT */, fn);\n },\n vueAppConnected(fn) {\n devtoolsHooks.hook(\"app:connected\" /* APP_CONNECTED */, fn);\n },\n componentAdded(fn) {\n return devtoolsHooks.hook(\"component:added\" /* COMPONENT_ADDED */, fn);\n },\n componentEmit(fn) {\n return devtoolsHooks.hook(\"component:emit\" /* COMPONENT_EMIT */, fn);\n },\n componentUpdated(fn) {\n return devtoolsHooks.hook(\"component:updated\" /* COMPONENT_UPDATED */, fn);\n },\n componentRemoved(fn) {\n return devtoolsHooks.hook(\"component:removed\" /* COMPONENT_REMOVED */, fn);\n },\n setupDevtoolsPlugin(fn) {\n devtoolsHooks.hook(\"devtools-plugin:setup\" /* SETUP_DEVTOOLS_PLUGIN */, fn);\n },\n perfStart(fn) {\n return devtoolsHooks.hook(\"perf:start\" /* PERFORMANCE_START */, fn);\n },\n perfEnd(fn) {\n return devtoolsHooks.hook(\"perf:end\" /* PERFORMANCE_END */, fn);\n }\n};\nfunction createDevToolsHook() {\n return {\n id: \"vue-devtools-next\",\n devtoolsVersion: \"7.0\",\n enabled: false,\n appRecords: [],\n apps: [],\n events: /* @__PURE__ */ new Map(),\n on(event, fn) {\n var _a25;\n if (!this.events.has(event))\n this.events.set(event, []);\n (_a25 = this.events.get(event)) == null ? void 0 : _a25.push(fn);\n return () => this.off(event, fn);\n },\n once(event, fn) {\n const onceFn = (...args) => {\n this.off(event, onceFn);\n fn(...args);\n };\n this.on(event, onceFn);\n return [event, onceFn];\n },\n off(event, fn) {\n if (this.events.has(event)) {\n const eventCallbacks = this.events.get(event);\n const index = eventCallbacks.indexOf(fn);\n if (index !== -1)\n eventCallbacks.splice(index, 1);\n }\n },\n emit(event, ...payload) {\n if (this.events.has(event))\n this.events.get(event).forEach((fn) => fn(...payload));\n }\n };\n}\nfunction subscribeDevToolsHook(hook2) {\n hook2.on(\"app:init\" /* APP_INIT */, (app, version, types) => {\n var _a25, _b25, _c;\n if ((_c = (_b25 = (_a25 = app == null ? void 0 : app._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)\n return;\n devtoolsHooks.callHook(\"app:init\" /* APP_INIT */, app, version, types);\n });\n hook2.on(\"app:unmount\" /* APP_UNMOUNT */, (app) => {\n devtoolsHooks.callHook(\"app:unmount\" /* APP_UNMOUNT */, app);\n });\n hook2.on(\"component:added\" /* COMPONENT_ADDED */, async (app, uid, parentUid, component) => {\n var _a25, _b25, _c;\n if (((_c = (_b25 = (_a25 = app == null ? void 0 : app._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide) || devtoolsState.highPerfModeEnabled)\n return;\n if (!app || typeof uid !== \"number\" && !uid || !component)\n return;\n devtoolsHooks.callHook(\"component:added\" /* COMPONENT_ADDED */, app, uid, parentUid, component);\n });\n hook2.on(\"component:updated\" /* COMPONENT_UPDATED */, (app, uid, parentUid, component) => {\n if (!app || typeof uid !== \"number\" && !uid || !component || devtoolsState.highPerfModeEnabled)\n return;\n devtoolsHooks.callHook(\"component:updated\" /* COMPONENT_UPDATED */, app, uid, parentUid, component);\n });\n hook2.on(\"component:removed\" /* COMPONENT_REMOVED */, async (app, uid, parentUid, component) => {\n if (!app || typeof uid !== \"number\" && !uid || !component || devtoolsState.highPerfModeEnabled)\n return;\n devtoolsHooks.callHook(\"component:removed\" /* COMPONENT_REMOVED */, app, uid, parentUid, component);\n });\n hook2.on(\"component:emit\" /* COMPONENT_EMIT */, async (app, instance, event, params) => {\n if (!app || !instance || devtoolsState.highPerfModeEnabled)\n return;\n devtoolsHooks.callHook(\"component:emit\" /* COMPONENT_EMIT */, app, instance, event, params);\n });\n hook2.on(\"perf:start\" /* PERFORMANCE_START */, (app, uid, vm, type, time) => {\n if (!app || devtoolsState.highPerfModeEnabled)\n return;\n devtoolsHooks.callHook(\"perf:start\" /* PERFORMANCE_START */, app, uid, vm, type, time);\n });\n hook2.on(\"perf:end\" /* PERFORMANCE_END */, (app, uid, vm, type, time) => {\n if (!app || devtoolsState.highPerfModeEnabled)\n return;\n devtoolsHooks.callHook(\"perf:end\" /* PERFORMANCE_END */, app, uid, vm, type, time);\n });\n hook2.on(\"devtools-plugin:setup\" /* SETUP_DEVTOOLS_PLUGIN */, (pluginDescriptor, setupFn, options) => {\n if ((options == null ? void 0 : options.target) === \"legacy\")\n return;\n devtoolsHooks.callHook(\"devtools-plugin:setup\" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);\n });\n}\nvar hook = {\n on,\n setupDevToolsPlugin(pluginDescriptor, setupFn) {\n return devtoolsHooks.callHook(\"devtools-plugin:setup\" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);\n }\n};\n\n// src/api/v6/index.ts\nvar DevToolsV6PluginAPI = class {\n constructor({ plugin, ctx }) {\n this.hooks = ctx.hooks;\n this.plugin = plugin;\n }\n get on() {\n return {\n // component inspector\n visitComponentTree: (handler) => {\n this.hooks.hook(\"visitComponentTree\" /* VISIT_COMPONENT_TREE */, handler);\n },\n inspectComponent: (handler) => {\n this.hooks.hook(\"inspectComponent\" /* INSPECT_COMPONENT */, handler);\n },\n editComponentState: (handler) => {\n this.hooks.hook(\"editComponentState\" /* EDIT_COMPONENT_STATE */, handler);\n },\n // custom inspector\n getInspectorTree: (handler) => {\n this.hooks.hook(\"getInspectorTree\" /* GET_INSPECTOR_TREE */, handler);\n },\n getInspectorState: (handler) => {\n this.hooks.hook(\"getInspectorState\" /* GET_INSPECTOR_STATE */, handler);\n },\n editInspectorState: (handler) => {\n this.hooks.hook(\"editInspectorState\" /* EDIT_INSPECTOR_STATE */, handler);\n },\n // timeline\n inspectTimelineEvent: (handler) => {\n this.hooks.hook(\"inspectTimelineEvent\" /* INSPECT_TIMELINE_EVENT */, handler);\n },\n timelineCleared: (handler) => {\n this.hooks.hook(\"timelineCleared\" /* TIMELINE_CLEARED */, handler);\n },\n // settings\n setPluginSettings: (handler) => {\n this.hooks.hook(\"setPluginSettings\" /* SET_PLUGIN_SETTINGS */, handler);\n }\n };\n }\n // component inspector\n notifyComponentUpdate(instance) {\n var _a25;\n if (devtoolsState.highPerfModeEnabled) {\n return;\n }\n const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);\n if (inspector == null ? void 0 : inspector.id) {\n if (instance) {\n const args = [\n instance.appContext.app,\n instance.uid,\n (_a25 = instance.parent) == null ? void 0 : _a25.uid,\n instance\n ];\n devtoolsHooks.callHook(\"component:updated\" /* COMPONENT_UPDATED */, ...args);\n } else {\n devtoolsHooks.callHook(\"component:updated\" /* COMPONENT_UPDATED */);\n }\n this.hooks.callHook(\"sendInspectorState\" /* SEND_INSPECTOR_STATE */, { inspectorId: inspector.id, plugin: this.plugin });\n }\n }\n // custom inspector\n addInspector(options) {\n this.hooks.callHook(\"addInspector\" /* ADD_INSPECTOR */, { inspector: options, plugin: this.plugin });\n if (this.plugin.descriptor.settings) {\n initPluginSettings(options.id, this.plugin.descriptor.settings);\n }\n }\n sendInspectorTree(inspectorId) {\n if (devtoolsState.highPerfModeEnabled) {\n return;\n }\n this.hooks.callHook(\"sendInspectorTree\" /* SEND_INSPECTOR_TREE */, { inspectorId, plugin: this.plugin });\n }\n sendInspectorState(inspectorId) {\n if (devtoolsState.highPerfModeEnabled) {\n return;\n }\n this.hooks.callHook(\"sendInspectorState\" /* SEND_INSPECTOR_STATE */, { inspectorId, plugin: this.plugin });\n }\n selectInspectorNode(inspectorId, nodeId) {\n this.hooks.callHook(\"customInspectorSelectNode\" /* CUSTOM_INSPECTOR_SELECT_NODE */, { inspectorId, nodeId, plugin: this.plugin });\n }\n visitComponentTree(payload) {\n return this.hooks.callHook(\"visitComponentTree\" /* VISIT_COMPONENT_TREE */, payload);\n }\n // timeline\n now() {\n if (devtoolsState.highPerfModeEnabled) {\n return 0;\n }\n return Date.now();\n }\n addTimelineLayer(options) {\n this.hooks.callHook(\"timelineLayerAdded\" /* TIMELINE_LAYER_ADDED */, { options, plugin: this.plugin });\n }\n addTimelineEvent(options) {\n if (devtoolsState.highPerfModeEnabled) {\n return;\n }\n this.hooks.callHook(\"timelineEventAdded\" /* TIMELINE_EVENT_ADDED */, { options, plugin: this.plugin });\n }\n // settings\n getSettings(pluginId) {\n return getPluginSettings(pluginId != null ? pluginId : this.plugin.descriptor.id, this.plugin.descriptor.settings);\n }\n // utilities\n getComponentInstances(app) {\n return this.hooks.callHook(\"getComponentInstances\" /* GET_COMPONENT_INSTANCES */, { app });\n }\n getComponentBounds(instance) {\n return this.hooks.callHook(\"getComponentBounds\" /* GET_COMPONENT_BOUNDS */, { instance });\n }\n getComponentName(instance) {\n return this.hooks.callHook(\"getComponentName\" /* GET_COMPONENT_NAME */, { instance });\n }\n highlightElement(instance) {\n const uid = instance.__VUE_DEVTOOLS_NEXT_UID__;\n return this.hooks.callHook(\"componentHighlight\" /* COMPONENT_HIGHLIGHT */, { uid });\n }\n unhighlightElement() {\n return this.hooks.callHook(\"componentUnhighlight\" /* COMPONENT_UNHIGHLIGHT */);\n }\n};\n\n// src/api/index.ts\nvar DevToolsPluginAPI = DevToolsV6PluginAPI;\n\n// src/core/plugin/components.ts\ninit_esm_shims();\nimport { debounce as debounce4 } from \"perfect-debounce\";\n\n// src/core/component/state/index.ts\ninit_esm_shims();\n\n// src/core/component/state/process.ts\ninit_esm_shims();\nimport { camelize } from \"@vue/devtools-shared\";\n\n// src/core/component/state/constants.ts\ninit_esm_shims();\nvar vueBuiltins = /* @__PURE__ */ new Set([\n \"nextTick\",\n \"defineComponent\",\n \"defineAsyncComponent\",\n \"defineCustomElement\",\n \"ref\",\n \"computed\",\n \"reactive\",\n \"readonly\",\n \"watchEffect\",\n \"watchPostEffect\",\n \"watchSyncEffect\",\n \"watch\",\n \"isRef\",\n \"unref\",\n \"toRef\",\n \"toRefs\",\n \"isProxy\",\n \"isReactive\",\n \"isReadonly\",\n \"shallowRef\",\n \"triggerRef\",\n \"customRef\",\n \"shallowReactive\",\n \"shallowReadonly\",\n \"toRaw\",\n \"markRaw\",\n \"effectScope\",\n \"getCurrentScope\",\n \"onScopeDispose\",\n \"onMounted\",\n \"onUpdated\",\n \"onUnmounted\",\n \"onBeforeMount\",\n \"onBeforeUpdate\",\n \"onBeforeUnmount\",\n \"onErrorCaptured\",\n \"onRenderTracked\",\n \"onRenderTriggered\",\n \"onActivated\",\n \"onDeactivated\",\n \"onServerPrefetch\",\n \"provide\",\n \"inject\",\n \"h\",\n \"mergeProps\",\n \"cloneVNode\",\n \"isVNode\",\n \"resolveComponent\",\n \"resolveDirective\",\n \"withDirectives\",\n \"withModifiers\"\n]);\nvar symbolRE = /^\\[native Symbol Symbol\\((.*)\\)\\]$/;\nvar rawTypeRE = /^\\[object (\\w+)\\]$/;\nvar specialTypeRE = /^\\[native (\\w+) (.*?)(<>(([\\s\\S])*))?\\]$/;\nvar fnTypeRE = /^(?:function|class) (\\w+)/;\nvar MAX_STRING_SIZE = 1e4;\nvar MAX_ARRAY_SIZE = 5e3;\nvar UNDEFINED = \"__vue_devtool_undefined__\";\nvar INFINITY = \"__vue_devtool_infinity__\";\nvar NEGATIVE_INFINITY = \"__vue_devtool_negative_infinity__\";\nvar NAN = \"__vue_devtool_nan__\";\nvar ESC = {\n \"<\": \"<\",\n \">\": \">\",\n '\"': \""\",\n \"&\": \"&\"\n};\n\n// src/core/component/state/util.ts\ninit_esm_shims();\n\n// src/core/component/state/is.ts\ninit_esm_shims();\nfunction isVueInstance(value) {\n if (!ensurePropertyExists(value, \"_\")) {\n return false;\n }\n if (!isPlainObject(value._)) {\n return false;\n }\n return Object.keys(value._).includes(\"vnode\");\n}\nfunction isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === \"[object Object]\";\n}\nfunction isPrimitive(data) {\n if (data == null)\n return true;\n const type = typeof data;\n return type === \"string\" || type === \"number\" || type === \"boolean\";\n}\nfunction isRef2(raw) {\n return !!raw.__v_isRef;\n}\nfunction isComputed(raw) {\n return isRef2(raw) && !!raw.effect;\n}\nfunction isReactive2(raw) {\n return !!raw.__v_isReactive;\n}\nfunction isReadOnly(raw) {\n return !!raw.__v_isReadonly;\n}\n\n// src/core/component/state/util.ts\nvar tokenMap = {\n [UNDEFINED]: \"undefined\",\n [NAN]: \"NaN\",\n [INFINITY]: \"Infinity\",\n [NEGATIVE_INFINITY]: \"-Infinity\"\n};\nvar reversedTokenMap = Object.entries(tokenMap).reduce((acc, [key, value]) => {\n acc[value] = key;\n return acc;\n}, {});\nfunction internalStateTokenToString(value) {\n if (value === null)\n return \"null\";\n return typeof value === \"string\" && tokenMap[value] || false;\n}\nfunction replaceTokenToString(value) {\n const replaceRegex = new RegExp(`\"(${Object.keys(tokenMap).join(\"|\")})\"`, \"g\");\n return value.replace(replaceRegex, (_, g1) => tokenMap[g1]);\n}\nfunction replaceStringToToken(value) {\n const literalValue = reversedTokenMap[value.trim()];\n if (literalValue)\n return `\"${literalValue}\"`;\n const replaceRegex = new RegExp(`:\\\\s*(${Object.keys(reversedTokenMap).join(\"|\")})`, \"g\");\n return value.replace(replaceRegex, (_, g1) => `:\"${reversedTokenMap[g1]}\"`);\n}\nfunction getPropType(type) {\n if (Array.isArray(type))\n return type.map((t) => getPropType(t)).join(\" or \");\n if (type == null)\n return \"null\";\n const match = type.toString().match(fnTypeRE);\n return typeof type === \"function\" ? match && match[1] || \"any\" : \"any\";\n}\nfunction sanitize(data) {\n if (!isPrimitive(data) && !Array.isArray(data) && !isPlainObject(data)) {\n return Object.prototype.toString.call(data);\n } else {\n return data;\n }\n}\nfunction getSetupStateType(raw) {\n try {\n return {\n ref: isRef2(raw),\n computed: isComputed(raw),\n reactive: isReactive2(raw),\n readonly: isReadOnly(raw)\n };\n } catch (e) {\n return {\n ref: false,\n computed: false,\n reactive: false,\n readonly: false\n };\n }\n}\nfunction toRaw2(value) {\n if (value == null ? void 0 : value.__v_raw)\n return value.__v_raw;\n return value;\n}\nfunction escape(s) {\n return s.replace(/[<>\"&]/g, (s2) => {\n return ESC[s2] || s2;\n });\n}\n\n// src/core/component/state/process.ts\nfunction mergeOptions(to, from, instance) {\n if (typeof from === \"function\")\n from = from.options;\n if (!from)\n return to;\n const { mixins, extends: extendsOptions } = from;\n extendsOptions && mergeOptions(to, extendsOptions, instance);\n mixins && mixins.forEach(\n (m) => mergeOptions(to, m, instance)\n );\n for (const key of [\"computed\", \"inject\"]) {\n if (Object.prototype.hasOwnProperty.call(from, key)) {\n if (!to[key])\n to[key] = from[key];\n else\n Object.assign(to[key], from[key]);\n }\n }\n return to;\n}\nfunction resolveMergedOptions(instance) {\n const raw = instance == null ? void 0 : instance.type;\n if (!raw)\n return {};\n const { mixins, extends: extendsOptions } = raw;\n const globalMixins = instance.appContext.mixins;\n if (!globalMixins.length && !mixins && !extendsOptions)\n return raw;\n const options = {};\n globalMixins.forEach((m) => mergeOptions(options, m, instance));\n mergeOptions(options, raw, instance);\n return options;\n}\nfunction processProps(instance) {\n var _a25;\n const props = [];\n const propDefinitions = (_a25 = instance == null ? void 0 : instance.type) == null ? void 0 : _a25.props;\n for (const key in instance == null ? void 0 : instance.props) {\n const propDefinition = propDefinitions ? propDefinitions[key] : null;\n const camelizeKey = camelize(key);\n props.push({\n type: \"props\",\n key: camelizeKey,\n value: returnError(() => instance.props[key]),\n editable: true,\n meta: propDefinition ? {\n type: propDefinition.type ? getPropType(propDefinition.type) : \"any\",\n required: !!propDefinition.required,\n ...propDefinition.default ? {\n default: propDefinition.default.toString()\n } : {}\n } : { type: \"invalid\" }\n });\n }\n return props;\n}\nfunction processState(instance) {\n const type = instance.type;\n const props = type == null ? void 0 : type.props;\n const getters = type.vuex && type.vuex.getters;\n const computedDefs = type.computed;\n const data = {\n ...instance.data,\n ...instance.renderContext\n };\n return Object.keys(data).filter((key) => !(props && key in props) && !(getters && key in getters) && !(computedDefs && key in computedDefs)).map((key) => ({\n key,\n type: \"data\",\n value: returnError(() => data[key]),\n editable: true\n }));\n}\nfunction getStateTypeAndName(info) {\n const stateType = info.computed ? \"computed\" : info.ref ? \"ref\" : info.reactive ? \"reactive\" : null;\n const stateTypeName = stateType ? `${stateType.charAt(0).toUpperCase()}${stateType.slice(1)}` : null;\n return {\n stateType,\n stateTypeName\n };\n}\nfunction processSetupState(instance) {\n const raw = instance.devtoolsRawSetupState || {};\n return Object.keys(instance.setupState).filter((key) => !vueBuiltins.has(key) && key.split(/(?=[A-Z])/)[0] !== \"use\").map((key) => {\n var _a25, _b25, _c, _d;\n const value = returnError(() => toRaw2(instance.setupState[key]));\n const accessError = value instanceof Error;\n const rawData = raw[key];\n let result;\n let isOtherType = accessError || typeof value === \"function\" || ensurePropertyExists(value, \"render\") && typeof value.render === \"function\" || ensurePropertyExists(value, \"__asyncLoader\") && typeof value.__asyncLoader === \"function\" || typeof value === \"object\" && value && (\"setup\" in value || \"props\" in value) || /^v[A-Z]/.test(key);\n if (rawData && !accessError) {\n const info = getSetupStateType(rawData);\n const { stateType, stateTypeName } = getStateTypeAndName(info);\n const isState = info.ref || info.computed || info.reactive;\n const raw2 = ensurePropertyExists(rawData, \"effect\") ? ((_b25 = (_a25 = rawData.effect) == null ? void 0 : _a25.raw) == null ? void 0 : _b25.toString()) || ((_d = (_c = rawData.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;\n if (stateType)\n isOtherType = false;\n result = {\n ...stateType ? { stateType, stateTypeName } : {},\n ...raw2 ? { raw: raw2 } : {},\n editable: isState && !info.readonly\n };\n }\n const type = isOtherType ? \"setup (other)\" : \"setup\";\n return {\n key,\n value,\n type,\n // @ts-expect-error ignore\n ...result\n };\n });\n}\nfunction processComputed(instance, mergedType) {\n const type = mergedType;\n const computed = [];\n const defs = type.computed || {};\n for (const key in defs) {\n const def = defs[key];\n const type2 = typeof def === \"function\" && def.vuex ? \"vuex bindings\" : \"computed\";\n computed.push({\n type: type2,\n key,\n value: returnError(() => {\n var _a25;\n return (_a25 = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a25[key];\n }),\n editable: typeof def.set === \"function\"\n });\n }\n return computed;\n}\nfunction processAttrs(instance) {\n return Object.keys(instance.attrs).map((key) => ({\n type: \"attrs\",\n key,\n value: returnError(() => instance.attrs[key])\n }));\n}\nfunction processProvide(instance) {\n return Reflect.ownKeys(instance.provides).map((key) => ({\n type: \"provided\",\n key: key.toString(),\n value: returnError(() => instance.provides[key])\n }));\n}\nfunction processInject(instance, mergedType) {\n if (!(mergedType == null ? void 0 : mergedType.inject))\n return [];\n let keys = [];\n let defaultValue;\n if (Array.isArray(mergedType.inject)) {\n keys = mergedType.inject.map((key) => ({\n key,\n originalKey: key\n }));\n } else {\n keys = Reflect.ownKeys(mergedType.inject).map((key) => {\n const value = mergedType.inject[key];\n let originalKey;\n if (typeof value === \"string\" || typeof value === \"symbol\") {\n originalKey = value;\n } else {\n originalKey = value.from;\n defaultValue = value.default;\n }\n return {\n key,\n originalKey\n };\n });\n }\n return keys.map(({ key, originalKey }) => ({\n type: \"injected\",\n key: originalKey && key !== originalKey ? `${originalKey.toString()} \\u279E ${key.toString()}` : key.toString(),\n // eslint-disable-next-line no-prototype-builtins\n value: returnError(() => instance.ctx.hasOwnProperty(key) ? instance.ctx[key] : instance.provides.hasOwnProperty(originalKey) ? instance.provides[originalKey] : defaultValue)\n }));\n}\nfunction processRefs(instance) {\n return Object.keys(instance.refs).map((key) => ({\n type: \"template refs\",\n key,\n value: returnError(() => instance.refs[key])\n }));\n}\nfunction processEventListeners(instance) {\n var _a25, _b25;\n const emitsDefinition = instance.type.emits;\n const declaredEmits = Array.isArray(emitsDefinition) ? emitsDefinition : Object.keys(emitsDefinition != null ? emitsDefinition : {});\n const keys = Object.keys((_b25 = (_a25 = instance == null ? void 0 : instance.vnode) == null ? void 0 : _a25.props) != null ? _b25 : {});\n const result = [];\n for (const key of keys) {\n const [prefix, ...eventNameParts] = key.split(/(?=[A-Z])/);\n if (prefix === \"on\") {\n const eventName = eventNameParts.join(\"-\").toLowerCase();\n const isDeclared = declaredEmits.includes(eventName);\n result.push({\n type: \"event listeners\",\n key: eventName,\n value: {\n _custom: {\n displayText: isDeclared ? \"\\u2705 Declared\" : \"\\u26A0\\uFE0F Not declared\",\n key: isDeclared ? \"\\u2705 Declared\" : \"\\u26A0\\uFE0F Not declared\",\n value: isDeclared ? \"\\u2705 Declared\" : \"\\u26A0\\uFE0F Not declared\",\n tooltipText: !isDeclared ? `The event ${eventName} is not declared in the emits option. It will leak into the component's attributes ($attrs).` : null\n }\n }\n });\n }\n }\n return result;\n}\nfunction processInstanceState(instance) {\n const mergedType = resolveMergedOptions(instance);\n return processProps(instance).concat(\n processState(instance),\n processSetupState(instance),\n processComputed(instance, mergedType),\n processAttrs(instance),\n processProvide(instance),\n processInject(instance, mergedType),\n processRefs(instance),\n processEventListeners(instance)\n );\n}\n\n// src/core/component/state/index.ts\nfunction getInstanceState(params) {\n var _a25;\n const instance = getComponentInstance(activeAppRecord.value, params.instanceId);\n const id = getUniqueComponentId(instance);\n const name = getInstanceName(instance);\n const file = (_a25 = instance == null ? void 0 : instance.type) == null ? void 0 : _a25.__file;\n const state = processInstanceState(instance);\n return {\n id,\n name,\n file,\n state,\n instance\n };\n}\n\n// src/core/component/tree/walker.ts\ninit_esm_shims();\n\n// src/core/component/tree/filter.ts\ninit_esm_shims();\nimport { classify as classify2, kebabize } from \"@vue/devtools-shared\";\nvar ComponentFilter = class {\n constructor(filter) {\n this.filter = filter || \"\";\n }\n /**\n * Check if an instance is qualified.\n *\n * @param {Vue|Vnode} instance\n * @return {boolean}\n */\n isQualified(instance) {\n const name = getInstanceName(instance);\n return classify2(name).toLowerCase().includes(this.filter) || kebabize(name).toLowerCase().includes(this.filter);\n }\n};\nfunction createComponentFilter(filterText) {\n return new ComponentFilter(filterText);\n}\n\n// src/core/component/tree/walker.ts\nvar ComponentWalker = class {\n constructor(options) {\n // Dedupe instances (Some instances may be both on a component and on a child abstract/functional component)\n this.captureIds = /* @__PURE__ */ new Map();\n const { filterText = \"\", maxDepth, recursively, api } = options;\n this.componentFilter = createComponentFilter(filterText);\n this.maxDepth = maxDepth;\n this.recursively = recursively;\n this.api = api;\n }\n getComponentTree(instance) {\n this.captureIds = /* @__PURE__ */ new Map();\n return this.findQualifiedChildren(instance, 0);\n }\n getComponentParents(instance) {\n this.captureIds = /* @__PURE__ */ new Map();\n const parents = [];\n this.captureId(instance);\n let parent = instance;\n while (parent = parent.parent) {\n this.captureId(parent);\n parents.push(parent);\n }\n return parents;\n }\n captureId(instance) {\n if (!instance)\n return null;\n const id = instance.__VUE_DEVTOOLS_NEXT_UID__ != null ? instance.__VUE_DEVTOOLS_NEXT_UID__ : getUniqueComponentId(instance);\n instance.__VUE_DEVTOOLS_NEXT_UID__ = id;\n if (this.captureIds.has(id))\n return null;\n else\n this.captureIds.set(id, void 0);\n this.mark(instance);\n return id;\n }\n /**\n * Capture the meta information of an instance. (recursive)\n *\n * @param {Vue} instance\n * @return {object}\n */\n async capture(instance, depth) {\n var _a25;\n if (!instance)\n return null;\n const id = this.captureId(instance);\n const name = getInstanceName(instance);\n const children = this.getInternalInstanceChildren(instance.subTree).filter((child) => !isBeingDestroyed(child));\n const parents = this.getComponentParents(instance) || [];\n const inactive = !!instance.isDeactivated || parents.some((parent) => parent.isDeactivated);\n const treeNode = {\n uid: instance.uid,\n id,\n name,\n renderKey: getRenderKey(instance.vnode ? instance.vnode.key : null),\n inactive,\n children: [],\n isFragment: isFragment(instance),\n tags: typeof instance.type !== \"function\" ? [] : [\n {\n label: \"functional\",\n textColor: 5592405,\n backgroundColor: 15658734\n }\n ],\n autoOpen: this.recursively,\n file: instance.type.__file || \"\"\n };\n if (depth < this.maxDepth || instance.type.__isKeepAlive || parents.some((parent) => parent.type.__isKeepAlive)) {\n treeNode.children = await Promise.all(children.map((child) => this.capture(child, depth + 1)).filter(Boolean));\n }\n if (this.isKeepAlive(instance)) {\n const cachedComponents = this.getKeepAliveCachedInstances(instance);\n const childrenIds = children.map((child) => child.__VUE_DEVTOOLS_NEXT_UID__);\n for (const cachedChild of cachedComponents) {\n if (!childrenIds.includes(cachedChild.__VUE_DEVTOOLS_NEXT_UID__)) {\n const node = await this.capture({ ...cachedChild, isDeactivated: true }, depth + 1);\n if (node)\n treeNode.children.push(node);\n }\n }\n }\n const rootElements = getRootElementsFromComponentInstance(instance);\n const firstElement = rootElements[0];\n if (firstElement == null ? void 0 : firstElement.parentElement) {\n const parentInstance = instance.parent;\n const parentRootElements = parentInstance ? getRootElementsFromComponentInstance(parentInstance) : [];\n let el = firstElement;\n const indexList = [];\n do {\n indexList.push(Array.from(el.parentElement.childNodes).indexOf(el));\n el = el.parentElement;\n } while (el.parentElement && parentRootElements.length && !parentRootElements.includes(el));\n treeNode.domOrder = indexList.reverse();\n } else {\n treeNode.domOrder = [-1];\n }\n if ((_a25 = instance.suspense) == null ? void 0 : _a25.suspenseKey) {\n treeNode.tags.push({\n label: instance.suspense.suspenseKey,\n backgroundColor: 14979812,\n textColor: 16777215\n });\n this.mark(instance, true);\n }\n this.api.visitComponentTree({\n treeNode,\n componentInstance: instance,\n app: instance.appContext.app,\n filter: this.componentFilter.filter\n });\n return treeNode;\n }\n /**\n * Find qualified children from a single instance.\n * If the instance itself is qualified, just return itself.\n * This is ok because [].concat works in both cases.\n *\n * @param {Vue|Vnode} instance\n * @return {Vue|Array}\n */\n async findQualifiedChildren(instance, depth) {\n var _a25;\n if (this.componentFilter.isQualified(instance) && !((_a25 = instance.type.devtools) == null ? void 0 : _a25.hide)) {\n return [await this.capture(instance, depth)];\n } else if (instance.subTree) {\n const list = this.isKeepAlive(instance) ? this.getKeepAliveCachedInstances(instance) : this.getInternalInstanceChildren(instance.subTree);\n return this.findQualifiedChildrenFromList(list, depth);\n } else {\n return [];\n }\n }\n /**\n * Iterate through an array of instances and flatten it into\n * an array of qualified instances. This is a depth-first\n * traversal - e.g. if an instance is not matched, we will\n * recursively go deeper until a qualified child is found.\n *\n * @param {Array} instances\n * @return {Array}\n */\n async findQualifiedChildrenFromList(instances, depth) {\n instances = instances.filter((child) => {\n var _a25;\n return !isBeingDestroyed(child) && !((_a25 = child.type.devtools) == null ? void 0 : _a25.hide);\n });\n if (!this.componentFilter.filter)\n return Promise.all(instances.map((child) => this.capture(child, depth)));\n else\n return Array.prototype.concat.apply([], await Promise.all(instances.map((i) => this.findQualifiedChildren(i, depth))));\n }\n /**\n * Get children from a component instance.\n */\n getInternalInstanceChildren(subTree, suspense = null) {\n const list = [];\n if (subTree) {\n if (subTree.component) {\n !suspense ? list.push(subTree.component) : list.push({ ...subTree.component, suspense });\n } else if (subTree.suspense) {\n const suspenseKey = !subTree.suspense.isInFallback ? \"suspense default\" : \"suspense fallback\";\n list.push(...this.getInternalInstanceChildren(subTree.suspense.activeBranch, { ...subTree.suspense, suspenseKey }));\n } else if (Array.isArray(subTree.children)) {\n subTree.children.forEach((childSubTree) => {\n if (childSubTree.component)\n !suspense ? list.push(childSubTree.component) : list.push({ ...childSubTree.component, suspense });\n else\n list.push(...this.getInternalInstanceChildren(childSubTree, suspense));\n });\n }\n }\n return list.filter((child) => {\n var _a25;\n return !isBeingDestroyed(child) && !((_a25 = child.type.devtools) == null ? void 0 : _a25.hide);\n });\n }\n /**\n * Mark an instance as captured and store it in the instance map.\n *\n * @param {Vue} instance\n */\n mark(instance, force = false) {\n const instanceMap = getAppRecord(instance).instanceMap;\n if (force || !instanceMap.has(instance.__VUE_DEVTOOLS_NEXT_UID__)) {\n instanceMap.set(instance.__VUE_DEVTOOLS_NEXT_UID__, instance);\n activeAppRecord.value.instanceMap = instanceMap;\n }\n }\n isKeepAlive(instance) {\n return instance.type.__isKeepAlive && instance.__v_cache;\n }\n getKeepAliveCachedInstances(instance) {\n return Array.from(instance.__v_cache.values()).map((vnode) => vnode.component).filter(Boolean);\n }\n};\n\n// src/core/timeline/index.ts\ninit_esm_shims();\nimport { isBrowser as isBrowser2 } from \"@vue/devtools-shared\";\n\n// src/core/timeline/perf.ts\ninit_esm_shims();\nvar markEndQueue = /* @__PURE__ */ new Map();\nvar PERFORMANCE_EVENT_LAYER_ID = \"performance\";\nasync function performanceMarkStart(api, app, uid, vm, type, time) {\n const appRecord = await getAppRecord(app);\n if (!appRecord) {\n return;\n }\n const componentName = getInstanceName(vm) || \"Unknown Component\";\n const groupId = devtoolsState.perfUniqueGroupId++;\n const groupKey = `${uid}-${type}`;\n appRecord.perfGroupIds.set(groupKey, { groupId, time });\n await api.addTimelineEvent({\n layerId: PERFORMANCE_EVENT_LAYER_ID,\n event: {\n time: Date.now(),\n data: {\n component: componentName,\n type,\n measure: \"start\"\n },\n title: componentName,\n subtitle: type,\n groupId\n }\n });\n if (markEndQueue.has(groupKey)) {\n const {\n app: app2,\n uid: uid2,\n instance,\n type: type2,\n time: time2\n } = markEndQueue.get(groupKey);\n markEndQueue.delete(groupKey);\n await performanceMarkEnd(\n api,\n app2,\n uid2,\n instance,\n type2,\n time2\n );\n }\n}\nfunction performanceMarkEnd(api, app, uid, vm, type, time) {\n const appRecord = getAppRecord(app);\n if (!appRecord)\n return;\n const componentName = getInstanceName(vm) || \"Unknown Component\";\n const groupKey = `${uid}-${type}`;\n const groupInfo = appRecord.perfGroupIds.get(groupKey);\n if (groupInfo) {\n const groupId = groupInfo.groupId;\n const startTime = groupInfo.time;\n const duration = time - startTime;\n api.addTimelineEvent({\n layerId: PERFORMANCE_EVENT_LAYER_ID,\n event: {\n time: Date.now(),\n data: {\n component: componentName,\n type,\n measure: \"end\",\n duration: {\n _custom: {\n type: \"Duration\",\n value: duration,\n display: `${duration} ms`\n }\n }\n },\n title: componentName,\n subtitle: type,\n groupId\n }\n });\n } else {\n markEndQueue.set(groupKey, { app, uid, instance: vm, type, time });\n }\n}\n\n// src/core/timeline/index.ts\nvar COMPONENT_EVENT_LAYER_ID = \"component-event\";\nfunction setupBuiltinTimelineLayers(api) {\n if (!isBrowser2)\n return;\n api.addTimelineLayer({\n id: \"mouse\",\n label: \"Mouse\",\n color: 10768815\n });\n [\"mousedown\", \"mouseup\", \"click\", \"dblclick\"].forEach((eventType) => {\n if (!devtoolsState.timelineLayersState.recordingState || !devtoolsState.timelineLayersState.mouseEventEnabled)\n return;\n window.addEventListener(eventType, async (event) => {\n await api.addTimelineEvent({\n layerId: \"mouse\",\n event: {\n time: Date.now(),\n data: {\n type: eventType,\n x: event.clientX,\n y: event.clientY\n },\n title: eventType\n }\n });\n }, {\n capture: true,\n passive: true\n });\n });\n api.addTimelineLayer({\n id: \"keyboard\",\n label: \"Keyboard\",\n color: 8475055\n });\n [\"keyup\", \"keydown\", \"keypress\"].forEach((eventType) => {\n window.addEventListener(eventType, async (event) => {\n if (!devtoolsState.timelineLayersState.recordingState || !devtoolsState.timelineLayersState.keyboardEventEnabled)\n return;\n await api.addTimelineEvent({\n layerId: \"keyboard\",\n event: {\n time: Date.now(),\n data: {\n type: eventType,\n key: event.key,\n ctrlKey: event.ctrlKey,\n shiftKey: event.shiftKey,\n altKey: event.altKey,\n metaKey: event.metaKey\n },\n title: event.key\n }\n });\n }, {\n capture: true,\n passive: true\n });\n });\n api.addTimelineLayer({\n id: COMPONENT_EVENT_LAYER_ID,\n label: \"Component events\",\n color: 5226637\n });\n hook.on.componentEmit(async (app, instance, event, params) => {\n if (!devtoolsState.timelineLayersState.recordingState || !devtoolsState.timelineLayersState.componentEventEnabled)\n return;\n const appRecord = await getAppRecord(app);\n if (!appRecord)\n return;\n const componentId = `${appRecord.id}:${instance.uid}`;\n const componentName = getInstanceName(instance) || \"Unknown Component\";\n api.addTimelineEvent({\n layerId: COMPONENT_EVENT_LAYER_ID,\n event: {\n time: Date.now(),\n data: {\n component: {\n _custom: {\n type: \"component-definition\",\n display: componentName\n }\n },\n event,\n params\n },\n title: event,\n subtitle: `by ${componentName}`,\n meta: {\n componentId\n }\n }\n });\n });\n api.addTimelineLayer({\n id: \"performance\",\n label: PERFORMANCE_EVENT_LAYER_ID,\n color: 4307050\n });\n hook.on.perfStart((app, uid, vm, type, time) => {\n if (!devtoolsState.timelineLayersState.recordingState || !devtoolsState.timelineLayersState.performanceEventEnabled)\n return;\n performanceMarkStart(api, app, uid, vm, type, time);\n });\n hook.on.perfEnd((app, uid, vm, type, time) => {\n if (!devtoolsState.timelineLayersState.recordingState || !devtoolsState.timelineLayersState.performanceEventEnabled)\n return;\n performanceMarkEnd(api, app, uid, vm, type, time);\n });\n}\n\n// src/core/vm/index.ts\ninit_esm_shims();\nvar MAX_$VM = 10;\nvar $vmQueue = [];\nfunction exposeInstanceToWindow(componentInstance) {\n if (typeof window === \"undefined\")\n return;\n const win = window;\n if (!componentInstance)\n return;\n win.$vm = componentInstance;\n if ($vmQueue[0] !== componentInstance) {\n if ($vmQueue.length >= MAX_$VM) {\n $vmQueue.pop();\n }\n for (let i = $vmQueue.length; i > 0; i--) {\n win[`$vm${i}`] = $vmQueue[i] = $vmQueue[i - 1];\n }\n win.$vm0 = $vmQueue[0] = componentInstance;\n }\n}\n\n// src/core/plugin/components.ts\nvar INSPECTOR_ID = \"components\";\nfunction createComponentsDevToolsPlugin(app) {\n const descriptor = {\n id: INSPECTOR_ID,\n label: \"Components\",\n app\n };\n const setupFn = (api) => {\n api.addInspector({\n id: INSPECTOR_ID,\n label: \"Components\",\n treeFilterPlaceholder: \"Search components\"\n });\n setupBuiltinTimelineLayers(api);\n api.on.getInspectorTree(async (payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const instance = getComponentInstance(activeAppRecord.value, payload.instanceId);\n if (instance) {\n const walker2 = new ComponentWalker({\n filterText: payload.filter,\n // @TODO: should make this configurable?\n maxDepth: 100,\n recursively: false,\n api\n });\n payload.rootNodes = await walker2.getComponentTree(instance);\n }\n }\n });\n api.on.getInspectorState(async (payload) => {\n var _a25;\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const result = getInstanceState({\n instanceId: payload.nodeId\n });\n const componentInstance = result.instance;\n const app2 = (_a25 = result.instance) == null ? void 0 : _a25.appContext.app;\n const _payload = {\n componentInstance,\n app: app2,\n instanceData: result\n };\n devtoolsContext.hooks.callHookWith((callbacks) => {\n callbacks.forEach((cb) => cb(_payload));\n }, \"inspectComponent\" /* INSPECT_COMPONENT */);\n payload.state = result;\n exposeInstanceToWindow(componentInstance);\n }\n });\n api.on.editInspectorState(async (payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n editState(payload);\n await api.sendInspectorState(\"components\");\n }\n });\n const debounceSendInspectorTree = debounce4(() => {\n api.sendInspectorTree(INSPECTOR_ID);\n }, 120);\n const debounceSendInspectorState = debounce4(() => {\n api.sendInspectorState(INSPECTOR_ID);\n }, 120);\n const componentAddedCleanup = hook.on.componentAdded(async (app2, uid, parentUid, component) => {\n var _a25, _b25, _c;\n if (devtoolsState.highPerfModeEnabled)\n return;\n if ((_c = (_b25 = (_a25 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)\n return;\n if (!app2 || typeof uid !== \"number\" && !uid || !component)\n return;\n const id = await getComponentId({\n app: app2,\n uid,\n instance: component\n });\n const appRecord = await getAppRecord(app2);\n if (component) {\n if (component.__VUE_DEVTOOLS_NEXT_UID__ == null)\n component.__VUE_DEVTOOLS_NEXT_UID__ = id;\n if (!(appRecord == null ? void 0 : appRecord.instanceMap.has(id))) {\n appRecord == null ? void 0 : appRecord.instanceMap.set(id, component);\n if (activeAppRecord.value.id === (appRecord == null ? void 0 : appRecord.id))\n activeAppRecord.value.instanceMap = appRecord.instanceMap;\n }\n }\n if (!appRecord)\n return;\n debounceSendInspectorTree();\n });\n const componentUpdatedCleanup = hook.on.componentUpdated(async (app2, uid, parentUid, component) => {\n var _a25, _b25, _c;\n if (devtoolsState.highPerfModeEnabled)\n return;\n if ((_c = (_b25 = (_a25 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)\n return;\n if (!app2 || typeof uid !== \"number\" && !uid || !component)\n return;\n const id = await getComponentId({\n app: app2,\n uid,\n instance: component\n });\n const appRecord = await getAppRecord(app2);\n if (component) {\n if (component.__VUE_DEVTOOLS_NEXT_UID__ == null)\n component.__VUE_DEVTOOLS_NEXT_UID__ = id;\n if (!(appRecord == null ? void 0 : appRecord.instanceMap.has(id))) {\n appRecord == null ? void 0 : appRecord.instanceMap.set(id, component);\n if (activeAppRecord.value.id === (appRecord == null ? void 0 : appRecord.id))\n activeAppRecord.value.instanceMap = appRecord.instanceMap;\n }\n }\n if (!appRecord)\n return;\n debounceSendInspectorTree();\n debounceSendInspectorState();\n });\n const componentRemovedCleanup = hook.on.componentRemoved(async (app2, uid, parentUid, component) => {\n var _a25, _b25, _c;\n if (devtoolsState.highPerfModeEnabled)\n return;\n if ((_c = (_b25 = (_a25 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)\n return;\n if (!app2 || typeof uid !== \"number\" && !uid || !component)\n return;\n const appRecord = await getAppRecord(app2);\n if (!appRecord)\n return;\n const id = await getComponentId({\n app: app2,\n uid,\n instance: component\n });\n appRecord == null ? void 0 : appRecord.instanceMap.delete(id);\n if (activeAppRecord.value.id === (appRecord == null ? void 0 : appRecord.id))\n activeAppRecord.value.instanceMap = appRecord.instanceMap;\n debounceSendInspectorTree();\n });\n };\n return [descriptor, setupFn];\n}\n\n// src/core/plugin/index.ts\nvar _a12, _b12;\n(_b12 = (_a12 = target8).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__) != null ? _b12 : _a12.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ = /* @__PURE__ */ new Set();\nfunction setupDevToolsPlugin(pluginDescriptor, setupFn) {\n return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);\n}\nfunction callDevToolsPluginSetupFn(plugin, app) {\n const [pluginDescriptor, setupFn] = plugin;\n if (pluginDescriptor.app !== app)\n return;\n const api = new DevToolsPluginAPI({\n plugin: {\n setupFn,\n descriptor: pluginDescriptor\n },\n ctx: devtoolsContext\n });\n if (pluginDescriptor.packageName === \"vuex\") {\n api.on.editInspectorState((payload) => {\n api.sendInspectorState(payload.inspectorId);\n });\n }\n setupFn(api);\n}\nfunction removeRegisteredPluginApp(app) {\n target8.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.delete(app);\n}\nfunction registerDevToolsPlugin(app) {\n if (target8.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app) || devtoolsState.highPerfModeEnabled)\n return;\n target8.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);\n devtoolsPluginBuffer.forEach((plugin) => {\n callDevToolsPluginSetupFn(plugin, app);\n });\n}\n\n// src/core/router/index.ts\ninit_esm_shims();\nimport { deepClone, target as global3 } from \"@vue/devtools-shared\";\nimport { debounce as debounce5 } from \"perfect-debounce\";\n\n// src/ctx/router.ts\ninit_esm_shims();\nimport { target as global2 } from \"@vue/devtools-shared\";\nvar ROUTER_KEY = \"__VUE_DEVTOOLS_ROUTER__\";\nvar ROUTER_INFO_KEY = \"__VUE_DEVTOOLS_ROUTER_INFO__\";\nvar _a13, _b13;\n(_b13 = (_a13 = global2)[ROUTER_INFO_KEY]) != null ? _b13 : _a13[ROUTER_INFO_KEY] = {\n currentRoute: null,\n routes: []\n};\nvar _a14, _b14;\n(_b14 = (_a14 = global2)[ROUTER_KEY]) != null ? _b14 : _a14[ROUTER_KEY] = {};\nvar devtoolsRouterInfo = new Proxy(global2[ROUTER_INFO_KEY], {\n get(target22, property) {\n return global2[ROUTER_INFO_KEY][property];\n }\n});\nvar devtoolsRouter = new Proxy(global2[ROUTER_KEY], {\n get(target22, property) {\n if (property === \"value\") {\n return global2[ROUTER_KEY];\n }\n }\n});\n\n// src/core/router/index.ts\nfunction getRoutes(router) {\n const routesMap = /* @__PURE__ */ new Map();\n return ((router == null ? void 0 : router.getRoutes()) || []).filter((i) => !routesMap.has(i.path) && routesMap.set(i.path, 1));\n}\nfunction filterRoutes(routes) {\n return routes.map((item) => {\n let { path, name, children, meta } = item;\n if (children == null ? void 0 : children.length)\n children = filterRoutes(children);\n return {\n path,\n name,\n children,\n meta\n };\n });\n}\nfunction filterCurrentRoute(route) {\n if (route) {\n const { fullPath, hash, href, path, name, matched, params, query } = route;\n return {\n fullPath,\n hash,\n href,\n path,\n name,\n params,\n query,\n matched: filterRoutes(matched)\n };\n }\n return route;\n}\nfunction normalizeRouterInfo(appRecord, activeAppRecord2) {\n function init() {\n var _a25;\n const router = (_a25 = appRecord.app) == null ? void 0 : _a25.config.globalProperties.$router;\n const currentRoute = filterCurrentRoute(router == null ? void 0 : router.currentRoute.value);\n const routes = filterRoutes(getRoutes(router));\n const c = console.warn;\n console.warn = () => {\n };\n global3[ROUTER_INFO_KEY] = {\n currentRoute: currentRoute ? deepClone(currentRoute) : {},\n routes: deepClone(routes)\n };\n global3[ROUTER_KEY] = router;\n console.warn = c;\n }\n init();\n hook.on.componentUpdated(debounce5(() => {\n var _a25;\n if (((_a25 = activeAppRecord2.value) == null ? void 0 : _a25.app) !== appRecord.app)\n return;\n init();\n if (devtoolsState.highPerfModeEnabled)\n return;\n devtoolsContext.hooks.callHook(\"routerInfoUpdated\" /* ROUTER_INFO_UPDATED */, { state: global3[ROUTER_INFO_KEY] });\n }, 200));\n}\n\n// src/ctx/api.ts\nfunction createDevToolsApi(hooks2) {\n return {\n // get inspector tree\n async getInspectorTree(payload) {\n const _payload = {\n ...payload,\n app: activeAppRecord.value.app,\n rootNodes: []\n };\n await new Promise((resolve) => {\n hooks2.callHookWith(async (callbacks) => {\n await Promise.all(callbacks.map((cb) => cb(_payload)));\n resolve();\n }, \"getInspectorTree\" /* GET_INSPECTOR_TREE */);\n });\n return _payload.rootNodes;\n },\n // get inspector state\n async getInspectorState(payload) {\n const _payload = {\n ...payload,\n app: activeAppRecord.value.app,\n state: null\n };\n const ctx = {\n currentTab: `custom-inspector:${payload.inspectorId}`\n };\n await new Promise((resolve) => {\n hooks2.callHookWith(async (callbacks) => {\n await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));\n resolve();\n }, \"getInspectorState\" /* GET_INSPECTOR_STATE */);\n });\n return _payload.state;\n },\n // edit inspector state\n editInspectorState(payload) {\n const stateEditor2 = new StateEditor();\n const _payload = {\n ...payload,\n app: activeAppRecord.value.app,\n set: (obj, path = payload.path, value = payload.state.value, cb) => {\n stateEditor2.set(obj, path, value, cb || stateEditor2.createDefaultSetCallback(payload.state));\n }\n };\n hooks2.callHookWith((callbacks) => {\n callbacks.forEach((cb) => cb(_payload));\n }, \"editInspectorState\" /* EDIT_INSPECTOR_STATE */);\n },\n // send inspector state\n sendInspectorState(inspectorId) {\n const inspector = getInspector(inspectorId);\n hooks2.callHook(\"sendInspectorState\" /* SEND_INSPECTOR_STATE */, { inspectorId, plugin: {\n descriptor: inspector.descriptor,\n setupFn: () => ({})\n } });\n },\n // inspect component inspector\n inspectComponentInspector() {\n return inspectComponentHighLighter();\n },\n // cancel inspect component inspector\n cancelInspectComponentInspector() {\n return cancelInspectComponentHighLighter();\n },\n // get component render code\n getComponentRenderCode(id) {\n const instance = getComponentInstance(activeAppRecord.value, id);\n if (instance)\n return !((instance == null ? void 0 : instance.type) instanceof Function) ? instance.render.toString() : instance.type.toString();\n },\n // scroll to component\n scrollToComponent(id) {\n return scrollToComponent({ id });\n },\n // open in editor\n openInEditor,\n // get vue inspector\n getVueInspector: getComponentInspector,\n // toggle app\n toggleApp(id) {\n const appRecord = devtoolsAppRecords.value.find((record) => record.id === id);\n if (appRecord) {\n setActiveAppRecordId(id);\n setActiveAppRecord(appRecord);\n normalizeRouterInfo(appRecord, activeAppRecord);\n callInspectorUpdatedHook();\n registerDevToolsPlugin(appRecord.app);\n }\n },\n // inspect dom\n inspectDOM(instanceId) {\n const instance = getComponentInstance(activeAppRecord.value, instanceId);\n if (instance) {\n const [el] = getRootElementsFromComponentInstance(instance);\n if (el) {\n target9.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = el;\n }\n }\n },\n updatePluginSettings(pluginId, key, value) {\n setPluginSettings(pluginId, key, value);\n },\n getPluginSettings(pluginId) {\n return {\n options: getPluginSettingsOptions(pluginId),\n values: getPluginSettings(pluginId)\n };\n }\n };\n}\n\n// src/ctx/env.ts\ninit_esm_shims();\nimport { target as target10 } from \"@vue/devtools-shared\";\nvar _a15, _b15;\n(_b15 = (_a15 = target10).__VUE_DEVTOOLS_ENV__) != null ? _b15 : _a15.__VUE_DEVTOOLS_ENV__ = {\n vitePluginDetected: false\n};\nfunction getDevToolsEnv() {\n return target10.__VUE_DEVTOOLS_ENV__;\n}\nfunction setDevToolsEnv(env) {\n target10.__VUE_DEVTOOLS_ENV__ = {\n ...target10.__VUE_DEVTOOLS_ENV__,\n ...env\n };\n}\n\n// src/ctx/index.ts\nvar hooks = createDevToolsCtxHooks();\nvar _a16, _b16;\n(_b16 = (_a16 = target11).__VUE_DEVTOOLS_KIT_CONTEXT__) != null ? _b16 : _a16.__VUE_DEVTOOLS_KIT_CONTEXT__ = {\n hooks,\n get state() {\n return {\n ...devtoolsState,\n activeAppRecordId: activeAppRecord.id,\n activeAppRecord: activeAppRecord.value,\n appRecords: devtoolsAppRecords.value\n };\n },\n api: createDevToolsApi(hooks)\n};\nvar devtoolsContext = target11.__VUE_DEVTOOLS_KIT_CONTEXT__;\n\n// src/core/app/index.ts\ninit_esm_shims();\nvar import_speakingurl = __toESM(require_speakingurl2(), 1);\nimport { target as target12 } from \"@vue/devtools-shared\";\nvar _a17, _b17;\nvar appRecordInfo = (_b17 = (_a17 = target12).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__) != null ? _b17 : _a17.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ = {\n id: 0,\n appIds: /* @__PURE__ */ new Set()\n};\nfunction getAppRecordName(app, fallbackName) {\n var _a25;\n return ((_a25 = app == null ? void 0 : app._component) == null ? void 0 : _a25.name) || `App ${fallbackName}`;\n}\nfunction getAppRootInstance(app) {\n var _a25, _b25, _c, _d;\n if (app._instance)\n return app._instance;\n else if ((_b25 = (_a25 = app._container) == null ? void 0 : _a25._vnode) == null ? void 0 : _b25.component)\n return (_d = (_c = app._container) == null ? void 0 : _c._vnode) == null ? void 0 : _d.component;\n}\nfunction removeAppRecordId(app) {\n const id = app.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__;\n if (id != null) {\n appRecordInfo.appIds.delete(id);\n appRecordInfo.id--;\n }\n}\nfunction getAppRecordId(app, defaultId) {\n if (app.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__ != null)\n return app.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__;\n let id = defaultId != null ? defaultId : (appRecordInfo.id++).toString();\n if (defaultId && appRecordInfo.appIds.has(id)) {\n let count = 1;\n while (appRecordInfo.appIds.has(`${defaultId}_${count}`))\n count++;\n id = `${defaultId}_${count}`;\n }\n appRecordInfo.appIds.add(id);\n app.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__ = id;\n return id;\n}\nfunction createAppRecord(app, types) {\n const rootInstance = getAppRootInstance(app);\n if (rootInstance) {\n appRecordInfo.id++;\n const name = getAppRecordName(app, appRecordInfo.id.toString());\n const id = getAppRecordId(app, (0, import_speakingurl.default)(name));\n const record = {\n id,\n name,\n types,\n instanceMap: /* @__PURE__ */ new Map(),\n perfGroupIds: /* @__PURE__ */ new Map(),\n rootInstance\n };\n app.__VUE_DEVTOOLS_NEXT_APP_RECORD__ = record;\n const rootId = `${record.id}:root`;\n record.instanceMap.set(rootId, record.rootInstance);\n record.rootInstance.__VUE_DEVTOOLS_NEXT_UID__ = rootId;\n return record;\n } else {\n return {};\n }\n}\n\n// src/core/index.ts\nfunction initDevTools() {\n var _a25;\n updateDevToolsState({\n vitePluginDetected: getDevToolsEnv().vitePluginDetected\n });\n const isDevToolsNext = ((_a25 = target13.__VUE_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : _a25.id) === \"vue-devtools-next\";\n if (target13.__VUE_DEVTOOLS_GLOBAL_HOOK__ && isDevToolsNext)\n return;\n const _devtoolsHook = createDevToolsHook();\n if (target13.__VUE_DEVTOOLS_HOOK_REPLAY__) {\n try {\n target13.__VUE_DEVTOOLS_HOOK_REPLAY__.forEach((cb) => cb(_devtoolsHook));\n target13.__VUE_DEVTOOLS_HOOK_REPLAY__ = [];\n } catch (e) {\n console.error(\"[vue-devtools] Error during hook replay\", e);\n }\n }\n _devtoolsHook.once(\"init\", (Vue) => {\n target13.__VUE_DEVTOOLS_VUE2_APP_DETECTED__ = true;\n console.log(\"%c[_____Vue DevTools v7 log_____]\", \"color: red; font-bold: 600; font-size: 16px;\");\n console.log(\"%cVue DevTools v7 detected in your Vue2 project. v7 only supports Vue3 and will not work.\", \"font-bold: 500; font-size: 14px;\");\n const url = \"https://chromewebstore.google.com/detail/vuejs-devtools/iaajmlceplecbljialhhkmedjlpdblhp\";\n console.log(`%cThe legacy version that supports both Vue 2 and Vue 3 has been moved to %c ${url}`, \"font-size: 14px;\", \"text-decoration: underline; cursor: pointer;font-size: 14px;\");\n console.log(\"%cPlease install and enable only the legacy version for your Vue2 app.\", \"font-bold: 500; font-size: 14px;\");\n console.log(\"%c[_____Vue DevTools v7 log_____]\", \"color: red; font-bold: 600; font-size: 16px;\");\n });\n hook.on.setupDevtoolsPlugin((pluginDescriptor, setupFn) => {\n var _a26;\n addDevToolsPluginToBuffer(pluginDescriptor, setupFn);\n const { app } = (_a26 = activeAppRecord) != null ? _a26 : {};\n if (pluginDescriptor.settings) {\n initPluginSettings(pluginDescriptor.id, pluginDescriptor.settings);\n }\n if (!app)\n return;\n callDevToolsPluginSetupFn([pluginDescriptor, setupFn], app);\n });\n onLegacyDevToolsPluginApiAvailable(() => {\n const normalizedPluginBuffer = devtoolsPluginBuffer.filter(([item]) => item.id !== \"components\");\n normalizedPluginBuffer.forEach(([pluginDescriptor, setupFn]) => {\n _devtoolsHook.emit(\"devtools-plugin:setup\" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn, { target: \"legacy\" });\n });\n });\n hook.on.vueAppInit(async (app, version, types) => {\n const appRecord = createAppRecord(app, types);\n const normalizedAppRecord = {\n ...appRecord,\n app,\n version\n };\n addDevToolsAppRecord(normalizedAppRecord);\n if (devtoolsAppRecords.value.length === 1) {\n setActiveAppRecord(normalizedAppRecord);\n setActiveAppRecordId(normalizedAppRecord.id);\n normalizeRouterInfo(normalizedAppRecord, activeAppRecord);\n registerDevToolsPlugin(normalizedAppRecord.app);\n }\n setupDevToolsPlugin(...createComponentsDevToolsPlugin(normalizedAppRecord.app));\n updateDevToolsState({\n connected: true\n });\n _devtoolsHook.apps.push(app);\n });\n hook.on.vueAppUnmount(async (app) => {\n const activeRecords = devtoolsAppRecords.value.filter((appRecord) => appRecord.app !== app);\n if (activeRecords.length === 0) {\n updateDevToolsState({\n connected: false\n });\n }\n removeDevToolsAppRecord(app);\n removeAppRecordId(app);\n if (activeAppRecord.value.app === app) {\n setActiveAppRecord(activeRecords[0]);\n devtoolsContext.hooks.callHook(\"sendActiveAppUpdatedToClient\" /* SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT */);\n }\n target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.splice(target13.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.indexOf(app), 1);\n removeRegisteredPluginApp(app);\n });\n subscribeDevToolsHook(_devtoolsHook);\n if (!target13.__VUE_DEVTOOLS_GLOBAL_HOOK__) {\n Object.defineProperty(target13, \"__VUE_DEVTOOLS_GLOBAL_HOOK__\", {\n get() {\n return _devtoolsHook;\n }\n });\n } else {\n if (!isNuxtApp) {\n Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, _devtoolsHook);\n }\n }\n}\nfunction onDevToolsClientConnected(fn) {\n return new Promise((resolve) => {\n if (devtoolsState.connected && devtoolsState.clientConnected) {\n fn();\n resolve();\n return;\n }\n devtoolsContext.hooks.hook(\"devtoolsConnectedUpdated\" /* DEVTOOLS_CONNECTED_UPDATED */, ({ state }) => {\n if (state.connected && state.clientConnected) {\n fn();\n resolve();\n }\n });\n });\n}\n\n// src/core/high-perf-mode/index.ts\ninit_esm_shims();\nfunction toggleHighPerfMode(state) {\n devtoolsState.highPerfModeEnabled = state != null ? state : !devtoolsState.highPerfModeEnabled;\n if (!state && activeAppRecord.value) {\n registerDevToolsPlugin(activeAppRecord.value.app);\n }\n}\n\n// src/core/component/state/format.ts\ninit_esm_shims();\n\n// src/core/component/state/reviver.ts\ninit_esm_shims();\nimport { target as target14 } from \"@vue/devtools-shared\";\nfunction reviveSet(val) {\n const result = /* @__PURE__ */ new Set();\n const list = val._custom.value;\n for (let i = 0; i < list.length; i++) {\n const value = list[i];\n result.add(revive(value));\n }\n return result;\n}\nfunction reviveMap(val) {\n const result = /* @__PURE__ */ new Map();\n const list = val._custom.value;\n for (let i = 0; i < list.length; i++) {\n const { key, value } = list[i];\n result.set(key, revive(value));\n }\n return result;\n}\nfunction revive(val) {\n if (val === UNDEFINED) {\n return void 0;\n } else if (val === INFINITY) {\n return Number.POSITIVE_INFINITY;\n } else if (val === NEGATIVE_INFINITY) {\n return Number.NEGATIVE_INFINITY;\n } else if (val === NAN) {\n return Number.NaN;\n } else if (val && val._custom) {\n const { _custom: custom } = val;\n if (custom.type === \"component\")\n return activeAppRecord.value.instanceMap.get(custom.id);\n else if (custom.type === \"map\")\n return reviveMap(val);\n else if (custom.type === \"set\")\n return reviveSet(val);\n else if (custom.type === \"bigint\")\n return BigInt(custom.value);\n else\n return revive(custom.value);\n } else if (symbolRE.test(val)) {\n const [, string] = symbolRE.exec(val);\n return Symbol.for(string);\n } else if (specialTypeRE.test(val)) {\n const [, type, string, , details] = specialTypeRE.exec(val);\n const result = new target14[type](string);\n if (type === \"Error\" && details)\n result.stack = details;\n return result;\n } else {\n return val;\n }\n}\nfunction reviver(key, value) {\n return revive(value);\n}\n\n// src/core/component/state/format.ts\nfunction getInspectorStateValueType(value, raw = true) {\n const type = typeof value;\n if (value == null || value === UNDEFINED || value === \"undefined\") {\n return \"null\";\n } else if (type === \"boolean\" || type === \"number\" || value === INFINITY || value === NEGATIVE_INFINITY || value === NAN) {\n return \"literal\";\n } else if (value == null ? void 0 : value._custom) {\n if (raw || value._custom.display != null || value._custom.displayText != null)\n return \"custom\";\n else\n return getInspectorStateValueType(value._custom.value);\n } else if (typeof value === \"string\") {\n const typeMatch = specialTypeRE.exec(value);\n if (typeMatch) {\n const [, type2] = typeMatch;\n return `native ${type2}`;\n } else {\n return \"string\";\n }\n } else if (Array.isArray(value) || (value == null ? void 0 : value._isArray)) {\n return \"array\";\n } else if (isPlainObject(value)) {\n return \"plain-object\";\n } else {\n return \"unknown\";\n }\n}\nfunction formatInspectorStateValue(value, quotes = false, options) {\n var _a25, _b25, _c;\n const { customClass } = options != null ? options : {};\n let result;\n const type = getInspectorStateValueType(value, false);\n if (type !== \"custom\" && (value == null ? void 0 : value._custom))\n value = value._custom.value;\n if (result = internalStateTokenToString(value)) {\n return result;\n } else if (type === \"custom\") {\n const nestedName = ((_a25 = value._custom.value) == null ? void 0 : _a25._custom) && formatInspectorStateValue(value._custom.value, quotes, options);\n return nestedName || value._custom.displayText || value._custom.display;\n } else if (type === \"array\") {\n return `Array[${value.length}]`;\n } else if (type === \"plain-object\") {\n return `Object${Object.keys(value).length ? \"\" : \" (empty)\"}`;\n } else if (type == null ? void 0 : type.includes(\"native\")) {\n return escape((_b25 = specialTypeRE.exec(value)) == null ? void 0 : _b25[2]);\n } else if (typeof value === \"string\") {\n const typeMatch = value.match(rawTypeRE);\n if (typeMatch) {\n value = escapeString(typeMatch[1]);\n } else if (quotes) {\n value = `\"${(customClass == null ? void 0 : customClass.string) ? `${escapeString(value)}` : escapeString(value)}\"`;\n } else {\n value = (customClass == null ? void 0 : customClass.string) ? `${escapeString(value)}` : escapeString(value);\n }\n }\n return value;\n}\nfunction escapeString(value) {\n return escape(value).replace(/ /g, \" \").replace(/\\n/g, \"\\\\n\");\n}\nfunction getRaw(value) {\n var _a25, _b25, _c;\n let customType;\n const isCustom = getInspectorStateValueType(value) === \"custom\";\n let inherit = {};\n if (isCustom) {\n const data = value;\n const customValue = (_a25 = data._custom) == null ? void 0 : _a25.value;\n const currentCustomType = (_b25 = data._custom) == null ? void 0 : _b25.type;\n const nestedCustom = typeof customValue === \"object\" && customValue !== null && \"_custom\" in customValue ? getRaw(customValue) : { inherit: void 0, value: void 0, customType: void 0 };\n inherit = nestedCustom.inherit || ((_c = data._custom) == null ? void 0 : _c.fields) || {};\n value = nestedCustom.value || customValue;\n customType = nestedCustom.customType || currentCustomType;\n }\n if (value && value._isArray)\n value = value.items;\n return { value, inherit, customType };\n}\nfunction toEdit(value, customType) {\n if (customType === \"bigint\")\n return value;\n if (customType === \"date\")\n return value;\n return replaceTokenToString(JSON.stringify(value));\n}\nfunction toSubmit(value, customType) {\n if (customType === \"bigint\")\n return BigInt(value);\n if (customType === \"date\")\n return new Date(value);\n return JSON.parse(replaceStringToToken(value), reviver);\n}\n\n// src/core/devtools-client/detected.ts\ninit_esm_shims();\nimport { target as target15 } from \"@vue/devtools-shared\";\nfunction updateDevToolsClientDetected(params) {\n devtoolsState.devtoolsClientDetected = {\n ...devtoolsState.devtoolsClientDetected,\n ...params\n };\n const devtoolsClientVisible = Object.values(devtoolsState.devtoolsClientDetected).some(Boolean);\n toggleHighPerfMode(!devtoolsClientVisible);\n}\nvar _a18, _b18;\n(_b18 = (_a18 = target15).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__) != null ? _b18 : _a18.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ = updateDevToolsClientDetected;\n\n// src/messaging/index.ts\ninit_esm_shims();\nimport { target as target21 } from \"@vue/devtools-shared\";\nimport { createBirpc, createBirpcGroup } from \"birpc\";\n\n// src/messaging/presets/index.ts\ninit_esm_shims();\n\n// src/messaging/presets/broadcast-channel/index.ts\ninit_esm_shims();\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/index.js\ninit_esm_shims();\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/class-registry.js\ninit_esm_shims();\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/registry.js\ninit_esm_shims();\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/double-indexed-kv.js\ninit_esm_shims();\nvar DoubleIndexedKV = class {\n constructor() {\n this.keyToValue = /* @__PURE__ */ new Map();\n this.valueToKey = /* @__PURE__ */ new Map();\n }\n set(key, value) {\n this.keyToValue.set(key, value);\n this.valueToKey.set(value, key);\n }\n getByKey(key) {\n return this.keyToValue.get(key);\n }\n getByValue(value) {\n return this.valueToKey.get(value);\n }\n clear() {\n this.keyToValue.clear();\n this.valueToKey.clear();\n }\n};\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/registry.js\nvar Registry = class {\n constructor(generateIdentifier) {\n this.generateIdentifier = generateIdentifier;\n this.kv = new DoubleIndexedKV();\n }\n register(value, identifier) {\n if (this.kv.getByValue(value)) {\n return;\n }\n if (!identifier) {\n identifier = this.generateIdentifier(value);\n }\n this.kv.set(identifier, value);\n }\n clear() {\n this.kv.clear();\n }\n getIdentifier(value) {\n return this.kv.getByValue(value);\n }\n getValue(identifier) {\n return this.kv.getByKey(identifier);\n }\n};\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/class-registry.js\nvar ClassRegistry = class extends Registry {\n constructor() {\n super((c) => c.name);\n this.classToAllowedProps = /* @__PURE__ */ new Map();\n }\n register(value, options) {\n if (typeof options === \"object\") {\n if (options.allowProps) {\n this.classToAllowedProps.set(value, options.allowProps);\n }\n super.register(value, options.identifier);\n } else {\n super.register(value, options);\n }\n }\n getAllowedProps(value) {\n return this.classToAllowedProps.get(value);\n }\n};\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/custom-transformer-registry.js\ninit_esm_shims();\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/util.js\ninit_esm_shims();\nfunction valuesOfObj(record) {\n if (\"values\" in Object) {\n return Object.values(record);\n }\n const values = [];\n for (const key in record) {\n if (record.hasOwnProperty(key)) {\n values.push(record[key]);\n }\n }\n return values;\n}\nfunction find(record, predicate) {\n const values = valuesOfObj(record);\n if (\"find\" in values) {\n return values.find(predicate);\n }\n const valuesNotNever = values;\n for (let i = 0; i < valuesNotNever.length; i++) {\n const value = valuesNotNever[i];\n if (predicate(value)) {\n return value;\n }\n }\n return void 0;\n}\nfunction forEach(record, run) {\n Object.entries(record).forEach(([key, value]) => run(value, key));\n}\nfunction includes(arr, value) {\n return arr.indexOf(value) !== -1;\n}\nfunction findArr(record, predicate) {\n for (let i = 0; i < record.length; i++) {\n const value = record[i];\n if (predicate(value)) {\n return value;\n }\n }\n return void 0;\n}\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/custom-transformer-registry.js\nvar CustomTransformerRegistry = class {\n constructor() {\n this.transfomers = {};\n }\n register(transformer) {\n this.transfomers[transformer.name] = transformer;\n }\n findApplicable(v) {\n return find(this.transfomers, (transformer) => transformer.isApplicable(v));\n }\n findByName(name) {\n return this.transfomers[name];\n }\n};\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/plainer.js\ninit_esm_shims();\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/is.js\ninit_esm_shims();\nvar getType = (payload) => Object.prototype.toString.call(payload).slice(8, -1);\nvar isUndefined = (payload) => typeof payload === \"undefined\";\nvar isNull = (payload) => payload === null;\nvar isPlainObject2 = (payload) => {\n if (typeof payload !== \"object\" || payload === null)\n return false;\n if (payload === Object.prototype)\n return false;\n if (Object.getPrototypeOf(payload) === null)\n return true;\n return Object.getPrototypeOf(payload) === Object.prototype;\n};\nvar isEmptyObject = (payload) => isPlainObject2(payload) && Object.keys(payload).length === 0;\nvar isArray = (payload) => Array.isArray(payload);\nvar isString = (payload) => typeof payload === \"string\";\nvar isNumber = (payload) => typeof payload === \"number\" && !isNaN(payload);\nvar isBoolean = (payload) => typeof payload === \"boolean\";\nvar isRegExp = (payload) => payload instanceof RegExp;\nvar isMap = (payload) => payload instanceof Map;\nvar isSet = (payload) => payload instanceof Set;\nvar isSymbol = (payload) => getType(payload) === \"Symbol\";\nvar isDate = (payload) => payload instanceof Date && !isNaN(payload.valueOf());\nvar isError = (payload) => payload instanceof Error;\nvar isNaNValue = (payload) => typeof payload === \"number\" && isNaN(payload);\nvar isPrimitive2 = (payload) => isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);\nvar isBigint = (payload) => typeof payload === \"bigint\";\nvar isInfinite = (payload) => payload === Infinity || payload === -Infinity;\nvar isTypedArray = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);\nvar isURL = (payload) => payload instanceof URL;\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/pathstringifier.js\ninit_esm_shims();\nvar escapeKey = (key) => key.replace(/\\./g, \"\\\\.\");\nvar stringifyPath = (path) => path.map(String).map(escapeKey).join(\".\");\nvar parsePath = (string) => {\n const result = [];\n let segment = \"\";\n for (let i = 0; i < string.length; i++) {\n let char = string.charAt(i);\n const isEscapedDot = char === \"\\\\\" && string.charAt(i + 1) === \".\";\n if (isEscapedDot) {\n segment += \".\";\n i++;\n continue;\n }\n const isEndOfSegment = char === \".\";\n if (isEndOfSegment) {\n result.push(segment);\n segment = \"\";\n continue;\n }\n segment += char;\n }\n const lastSegment = segment;\n result.push(lastSegment);\n return result;\n};\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/transformer.js\ninit_esm_shims();\nfunction simpleTransformation(isApplicable, annotation, transform, untransform) {\n return {\n isApplicable,\n annotation,\n transform,\n untransform\n };\n}\nvar simpleRules = [\n simpleTransformation(isUndefined, \"undefined\", () => null, () => void 0),\n simpleTransformation(isBigint, \"bigint\", (v) => v.toString(), (v) => {\n if (typeof BigInt !== \"undefined\") {\n return BigInt(v);\n }\n console.error(\"Please add a BigInt polyfill.\");\n return v;\n }),\n simpleTransformation(isDate, \"Date\", (v) => v.toISOString(), (v) => new Date(v)),\n simpleTransformation(isError, \"Error\", (v, superJson) => {\n const baseError = {\n name: v.name,\n message: v.message\n };\n superJson.allowedErrorProps.forEach((prop) => {\n baseError[prop] = v[prop];\n });\n return baseError;\n }, (v, superJson) => {\n const e = new Error(v.message);\n e.name = v.name;\n e.stack = v.stack;\n superJson.allowedErrorProps.forEach((prop) => {\n e[prop] = v[prop];\n });\n return e;\n }),\n simpleTransformation(isRegExp, \"regexp\", (v) => \"\" + v, (regex) => {\n const body = regex.slice(1, regex.lastIndexOf(\"/\"));\n const flags = regex.slice(regex.lastIndexOf(\"/\") + 1);\n return new RegExp(body, flags);\n }),\n simpleTransformation(\n isSet,\n \"set\",\n // (sets only exist in es6+)\n // eslint-disable-next-line es5/no-es6-methods\n (v) => [...v.values()],\n (v) => new Set(v)\n ),\n simpleTransformation(isMap, \"map\", (v) => [...v.entries()], (v) => new Map(v)),\n simpleTransformation((v) => isNaNValue(v) || isInfinite(v), \"number\", (v) => {\n if (isNaNValue(v)) {\n return \"NaN\";\n }\n if (v > 0) {\n return \"Infinity\";\n } else {\n return \"-Infinity\";\n }\n }, Number),\n simpleTransformation((v) => v === 0 && 1 / v === -Infinity, \"number\", () => {\n return \"-0\";\n }, Number),\n simpleTransformation(isURL, \"URL\", (v) => v.toString(), (v) => new URL(v))\n];\nfunction compositeTransformation(isApplicable, annotation, transform, untransform) {\n return {\n isApplicable,\n annotation,\n transform,\n untransform\n };\n}\nvar symbolRule = compositeTransformation((s, superJson) => {\n if (isSymbol(s)) {\n const isRegistered = !!superJson.symbolRegistry.getIdentifier(s);\n return isRegistered;\n }\n return false;\n}, (s, superJson) => {\n const identifier = superJson.symbolRegistry.getIdentifier(s);\n return [\"symbol\", identifier];\n}, (v) => v.description, (_, a, superJson) => {\n const value = superJson.symbolRegistry.getValue(a[1]);\n if (!value) {\n throw new Error(\"Trying to deserialize unknown symbol\");\n }\n return value;\n});\nvar constructorToName = [\n Int8Array,\n Uint8Array,\n Int16Array,\n Uint16Array,\n Int32Array,\n Uint32Array,\n Float32Array,\n Float64Array,\n Uint8ClampedArray\n].reduce((obj, ctor) => {\n obj[ctor.name] = ctor;\n return obj;\n}, {});\nvar typedArrayRule = compositeTransformation(isTypedArray, (v) => [\"typed-array\", v.constructor.name], (v) => [...v], (v, a) => {\n const ctor = constructorToName[a[1]];\n if (!ctor) {\n throw new Error(\"Trying to deserialize unknown typed array\");\n }\n return new ctor(v);\n});\nfunction isInstanceOfRegisteredClass(potentialClass, superJson) {\n if (potentialClass == null ? void 0 : potentialClass.constructor) {\n const isRegistered = !!superJson.classRegistry.getIdentifier(potentialClass.constructor);\n return isRegistered;\n }\n return false;\n}\nvar classRule = compositeTransformation(isInstanceOfRegisteredClass, (clazz, superJson) => {\n const identifier = superJson.classRegistry.getIdentifier(clazz.constructor);\n return [\"class\", identifier];\n}, (clazz, superJson) => {\n const allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);\n if (!allowedProps) {\n return { ...clazz };\n }\n const result = {};\n allowedProps.forEach((prop) => {\n result[prop] = clazz[prop];\n });\n return result;\n}, (v, a, superJson) => {\n const clazz = superJson.classRegistry.getValue(a[1]);\n if (!clazz) {\n throw new Error(\"Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564\");\n }\n return Object.assign(Object.create(clazz.prototype), v);\n});\nvar customRule = compositeTransformation((value, superJson) => {\n return !!superJson.customTransformerRegistry.findApplicable(value);\n}, (value, superJson) => {\n const transformer = superJson.customTransformerRegistry.findApplicable(value);\n return [\"custom\", transformer.name];\n}, (value, superJson) => {\n const transformer = superJson.customTransformerRegistry.findApplicable(value);\n return transformer.serialize(value);\n}, (v, a, superJson) => {\n const transformer = superJson.customTransformerRegistry.findByName(a[1]);\n if (!transformer) {\n throw new Error(\"Trying to deserialize unknown custom value\");\n }\n return transformer.deserialize(v);\n});\nvar compositeRules = [classRule, symbolRule, customRule, typedArrayRule];\nvar transformValue = (value, superJson) => {\n const applicableCompositeRule = findArr(compositeRules, (rule) => rule.isApplicable(value, superJson));\n if (applicableCompositeRule) {\n return {\n value: applicableCompositeRule.transform(value, superJson),\n type: applicableCompositeRule.annotation(value, superJson)\n };\n }\n const applicableSimpleRule = findArr(simpleRules, (rule) => rule.isApplicable(value, superJson));\n if (applicableSimpleRule) {\n return {\n value: applicableSimpleRule.transform(value, superJson),\n type: applicableSimpleRule.annotation\n };\n }\n return void 0;\n};\nvar simpleRulesByAnnotation = {};\nsimpleRules.forEach((rule) => {\n simpleRulesByAnnotation[rule.annotation] = rule;\n});\nvar untransformValue = (json, type, superJson) => {\n if (isArray(type)) {\n switch (type[0]) {\n case \"symbol\":\n return symbolRule.untransform(json, type, superJson);\n case \"class\":\n return classRule.untransform(json, type, superJson);\n case \"custom\":\n return customRule.untransform(json, type, superJson);\n case \"typed-array\":\n return typedArrayRule.untransform(json, type, superJson);\n default:\n throw new Error(\"Unknown transformation: \" + type);\n }\n } else {\n const transformation = simpleRulesByAnnotation[type];\n if (!transformation) {\n throw new Error(\"Unknown transformation: \" + type);\n }\n return transformation.untransform(json, superJson);\n }\n};\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/accessDeep.js\ninit_esm_shims();\nvar getNthKey = (value, n) => {\n const keys = value.keys();\n while (n > 0) {\n keys.next();\n n--;\n }\n return keys.next().value;\n};\nfunction validatePath(path) {\n if (includes(path, \"__proto__\")) {\n throw new Error(\"__proto__ is not allowed as a property\");\n }\n if (includes(path, \"prototype\")) {\n throw new Error(\"prototype is not allowed as a property\");\n }\n if (includes(path, \"constructor\")) {\n throw new Error(\"constructor is not allowed as a property\");\n }\n}\nvar getDeep = (object, path) => {\n validatePath(path);\n for (let i = 0; i < path.length; i++) {\n const key = path[i];\n if (isSet(object)) {\n object = getNthKey(object, +key);\n } else if (isMap(object)) {\n const row = +key;\n const type = +path[++i] === 0 ? \"key\" : \"value\";\n const keyOfRow = getNthKey(object, row);\n switch (type) {\n case \"key\":\n object = keyOfRow;\n break;\n case \"value\":\n object = object.get(keyOfRow);\n break;\n }\n } else {\n object = object[key];\n }\n }\n return object;\n};\nvar setDeep = (object, path, mapper) => {\n validatePath(path);\n if (path.length === 0) {\n return mapper(object);\n }\n let parent = object;\n for (let i = 0; i < path.length - 1; i++) {\n const key = path[i];\n if (isArray(parent)) {\n const index = +key;\n parent = parent[index];\n } else if (isPlainObject2(parent)) {\n parent = parent[key];\n } else if (isSet(parent)) {\n const row = +key;\n parent = getNthKey(parent, row);\n } else if (isMap(parent)) {\n const isEnd = i === path.length - 2;\n if (isEnd) {\n break;\n }\n const row = +key;\n const type = +path[++i] === 0 ? \"key\" : \"value\";\n const keyOfRow = getNthKey(parent, row);\n switch (type) {\n case \"key\":\n parent = keyOfRow;\n break;\n case \"value\":\n parent = parent.get(keyOfRow);\n break;\n }\n }\n }\n const lastKey = path[path.length - 1];\n if (isArray(parent)) {\n parent[+lastKey] = mapper(parent[+lastKey]);\n } else if (isPlainObject2(parent)) {\n parent[lastKey] = mapper(parent[lastKey]);\n }\n if (isSet(parent)) {\n const oldValue = getNthKey(parent, +lastKey);\n const newValue = mapper(oldValue);\n if (oldValue !== newValue) {\n parent.delete(oldValue);\n parent.add(newValue);\n }\n }\n if (isMap(parent)) {\n const row = +path[path.length - 2];\n const keyToRow = getNthKey(parent, row);\n const type = +lastKey === 0 ? \"key\" : \"value\";\n switch (type) {\n case \"key\": {\n const newKey = mapper(keyToRow);\n parent.set(newKey, parent.get(keyToRow));\n if (newKey !== keyToRow) {\n parent.delete(keyToRow);\n }\n break;\n }\n case \"value\": {\n parent.set(keyToRow, mapper(parent.get(keyToRow)));\n break;\n }\n }\n }\n return object;\n};\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/plainer.js\nfunction traverse(tree, walker2, origin = []) {\n if (!tree) {\n return;\n }\n if (!isArray(tree)) {\n forEach(tree, (subtree, key) => traverse(subtree, walker2, [...origin, ...parsePath(key)]));\n return;\n }\n const [nodeValue, children] = tree;\n if (children) {\n forEach(children, (child, key) => {\n traverse(child, walker2, [...origin, ...parsePath(key)]);\n });\n }\n walker2(nodeValue, origin);\n}\nfunction applyValueAnnotations(plain, annotations, superJson) {\n traverse(annotations, (type, path) => {\n plain = setDeep(plain, path, (v) => untransformValue(v, type, superJson));\n });\n return plain;\n}\nfunction applyReferentialEqualityAnnotations(plain, annotations) {\n function apply(identicalPaths, path) {\n const object = getDeep(plain, parsePath(path));\n identicalPaths.map(parsePath).forEach((identicalObjectPath) => {\n plain = setDeep(plain, identicalObjectPath, () => object);\n });\n }\n if (isArray(annotations)) {\n const [root, other] = annotations;\n root.forEach((identicalPath) => {\n plain = setDeep(plain, parsePath(identicalPath), () => plain);\n });\n if (other) {\n forEach(other, apply);\n }\n } else {\n forEach(annotations, apply);\n }\n return plain;\n}\nvar isDeep = (object, superJson) => isPlainObject2(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);\nfunction addIdentity(object, path, identities) {\n const existingSet = identities.get(object);\n if (existingSet) {\n existingSet.push(path);\n } else {\n identities.set(object, [path]);\n }\n}\nfunction generateReferentialEqualityAnnotations(identitites, dedupe) {\n const result = {};\n let rootEqualityPaths = void 0;\n identitites.forEach((paths) => {\n if (paths.length <= 1) {\n return;\n }\n if (!dedupe) {\n paths = paths.map((path) => path.map(String)).sort((a, b) => a.length - b.length);\n }\n const [representativePath, ...identicalPaths] = paths;\n if (representativePath.length === 0) {\n rootEqualityPaths = identicalPaths.map(stringifyPath);\n } else {\n result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);\n }\n });\n if (rootEqualityPaths) {\n if (isEmptyObject(result)) {\n return [rootEqualityPaths];\n } else {\n return [rootEqualityPaths, result];\n }\n } else {\n return isEmptyObject(result) ? void 0 : result;\n }\n}\nvar walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {\n var _a25;\n const primitive = isPrimitive2(object);\n if (!primitive) {\n addIdentity(object, path, identities);\n const seen = seenObjects.get(object);\n if (seen) {\n return dedupe ? {\n transformedValue: null\n } : seen;\n }\n }\n if (!isDeep(object, superJson)) {\n const transformed2 = transformValue(object, superJson);\n const result2 = transformed2 ? {\n transformedValue: transformed2.value,\n annotations: [transformed2.type]\n } : {\n transformedValue: object\n };\n if (!primitive) {\n seenObjects.set(object, result2);\n }\n return result2;\n }\n if (includes(objectsInThisPath, object)) {\n return {\n transformedValue: null\n };\n }\n const transformationResult = transformValue(object, superJson);\n const transformed = (_a25 = transformationResult == null ? void 0 : transformationResult.value) != null ? _a25 : object;\n const transformedValue = isArray(transformed) ? [] : {};\n const innerAnnotations = {};\n forEach(transformed, (value, index) => {\n if (index === \"__proto__\" || index === \"constructor\" || index === \"prototype\") {\n throw new Error(`Detected property ${index}. This is a prototype pollution risk, please remove it from your object.`);\n }\n const recursiveResult = walker(value, identities, superJson, dedupe, [...path, index], [...objectsInThisPath, object], seenObjects);\n transformedValue[index] = recursiveResult.transformedValue;\n if (isArray(recursiveResult.annotations)) {\n innerAnnotations[index] = recursiveResult.annotations;\n } else if (isPlainObject2(recursiveResult.annotations)) {\n forEach(recursiveResult.annotations, (tree, key) => {\n innerAnnotations[escapeKey(index) + \".\" + key] = tree;\n });\n }\n });\n const result = isEmptyObject(innerAnnotations) ? {\n transformedValue,\n annotations: !!transformationResult ? [transformationResult.type] : void 0\n } : {\n transformedValue,\n annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations\n };\n if (!primitive) {\n seenObjects.set(object, result);\n }\n return result;\n};\n\n// ../../node_modules/.pnpm/copy-anything@3.0.5/node_modules/copy-anything/dist/index.js\ninit_esm_shims();\n\n// ../../node_modules/.pnpm/is-what@4.1.16/node_modules/is-what/dist/index.js\ninit_esm_shims();\nfunction getType2(payload) {\n return Object.prototype.toString.call(payload).slice(8, -1);\n}\nfunction isArray2(payload) {\n return getType2(payload) === \"Array\";\n}\nfunction isPlainObject3(payload) {\n if (getType2(payload) !== \"Object\")\n return false;\n const prototype = Object.getPrototypeOf(payload);\n return !!prototype && prototype.constructor === Object && prototype === Object.prototype;\n}\nfunction isNull2(payload) {\n return getType2(payload) === \"Null\";\n}\nfunction isOneOf(a, b, c, d, e) {\n return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);\n}\nfunction isUndefined2(payload) {\n return getType2(payload) === \"Undefined\";\n}\nvar isNullOrUndefined = isOneOf(isNull2, isUndefined2);\n\n// ../../node_modules/.pnpm/copy-anything@3.0.5/node_modules/copy-anything/dist/index.js\nfunction assignProp(carry, key, newVal, originalObject, includeNonenumerable) {\n const propType = {}.propertyIsEnumerable.call(originalObject, key) ? \"enumerable\" : \"nonenumerable\";\n if (propType === \"enumerable\")\n carry[key] = newVal;\n if (includeNonenumerable && propType === \"nonenumerable\") {\n Object.defineProperty(carry, key, {\n value: newVal,\n enumerable: false,\n writable: true,\n configurable: true\n });\n }\n}\nfunction copy(target22, options = {}) {\n if (isArray2(target22)) {\n return target22.map((item) => copy(item, options));\n }\n if (!isPlainObject3(target22)) {\n return target22;\n }\n const props = Object.getOwnPropertyNames(target22);\n const symbols = Object.getOwnPropertySymbols(target22);\n return [...props, ...symbols].reduce((carry, key) => {\n if (isArray2(options.props) && !options.props.includes(key)) {\n return carry;\n }\n const val = target22[key];\n const newVal = copy(val, options);\n assignProp(carry, key, newVal, target22, options.nonenumerable);\n return carry;\n }, {});\n}\n\n// ../../node_modules/.pnpm/superjson@2.2.1/node_modules/superjson/dist/index.js\nvar SuperJSON = class {\n /**\n * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.\n */\n constructor({ dedupe = false } = {}) {\n this.classRegistry = new ClassRegistry();\n this.symbolRegistry = new Registry((s) => {\n var _a25;\n return (_a25 = s.description) != null ? _a25 : \"\";\n });\n this.customTransformerRegistry = new CustomTransformerRegistry();\n this.allowedErrorProps = [];\n this.dedupe = dedupe;\n }\n serialize(object) {\n const identities = /* @__PURE__ */ new Map();\n const output = walker(object, identities, this, this.dedupe);\n const res = {\n json: output.transformedValue\n };\n if (output.annotations) {\n res.meta = {\n ...res.meta,\n values: output.annotations\n };\n }\n const equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);\n if (equalityAnnotations) {\n res.meta = {\n ...res.meta,\n referentialEqualities: equalityAnnotations\n };\n }\n return res;\n }\n deserialize(payload) {\n const { json, meta } = payload;\n let result = copy(json);\n if (meta == null ? void 0 : meta.values) {\n result = applyValueAnnotations(result, meta.values, this);\n }\n if (meta == null ? void 0 : meta.referentialEqualities) {\n result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);\n }\n return result;\n }\n stringify(object) {\n return JSON.stringify(this.serialize(object));\n }\n parse(string) {\n return this.deserialize(JSON.parse(string));\n }\n registerClass(v, options) {\n this.classRegistry.register(v, options);\n }\n registerSymbol(v, identifier) {\n this.symbolRegistry.register(v, identifier);\n }\n registerCustom(transformer, name) {\n this.customTransformerRegistry.register({\n name,\n ...transformer\n });\n }\n allowErrorProps(...props) {\n this.allowedErrorProps.push(...props);\n }\n};\nSuperJSON.defaultInstance = new SuperJSON();\nSuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);\nSuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);\nSuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);\nSuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);\nSuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);\nSuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);\nSuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);\nSuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);\nvar serialize = SuperJSON.serialize;\nvar deserialize = SuperJSON.deserialize;\nvar stringify = SuperJSON.stringify;\nvar parse = SuperJSON.parse;\nvar registerClass = SuperJSON.registerClass;\nvar registerCustom = SuperJSON.registerCustom;\nvar registerSymbol = SuperJSON.registerSymbol;\nvar allowErrorProps = SuperJSON.allowErrorProps;\n\n// src/messaging/presets/broadcast-channel/context.ts\ninit_esm_shims();\nvar __DEVTOOLS_KIT_BROADCAST_MESSAGING_EVENT_KEY = \"__devtools-kit-broadcast-messaging-event-key__\";\n\n// src/messaging/presets/broadcast-channel/index.ts\nvar BROADCAST_CHANNEL_NAME = \"__devtools-kit:broadcast-channel__\";\nfunction createBroadcastChannel() {\n const channel = new BroadcastChannel(BROADCAST_CHANNEL_NAME);\n return {\n post: (data) => {\n channel.postMessage(SuperJSON.stringify({\n event: __DEVTOOLS_KIT_BROADCAST_MESSAGING_EVENT_KEY,\n data\n }));\n },\n on: (handler) => {\n channel.onmessage = (event) => {\n const parsed = SuperJSON.parse(event.data);\n if (parsed.event === __DEVTOOLS_KIT_BROADCAST_MESSAGING_EVENT_KEY) {\n handler(parsed.data);\n }\n };\n }\n };\n}\n\n// src/messaging/presets/electron/index.ts\ninit_esm_shims();\n\n// src/messaging/presets/electron/client.ts\ninit_esm_shims();\n\n// src/messaging/presets/electron/context.ts\ninit_esm_shims();\nimport { target as target16 } from \"@vue/devtools-shared\";\nvar __ELECTRON_CLIENT_CONTEXT__ = \"electron:client-context\";\nvar __ELECTRON_RPOXY_CONTEXT__ = \"electron:proxy-context\";\nvar __ELECTRON_SERVER_CONTEXT__ = \"electron:server-context\";\nvar __DEVTOOLS_KIT_ELECTRON_MESSAGING_EVENT_KEY__ = {\n // client\n CLIENT_TO_PROXY: \"client->proxy\",\n // on: proxy->client\n // proxy\n PROXY_TO_CLIENT: \"proxy->client\",\n // on: server->proxy\n PROXY_TO_SERVER: \"proxy->server\",\n // on: client->proxy\n // server\n SERVER_TO_PROXY: \"server->proxy\"\n // on: proxy->server\n};\nfunction getElectronClientContext() {\n return target16[__ELECTRON_CLIENT_CONTEXT__];\n}\nfunction setElectronClientContext(context) {\n target16[__ELECTRON_CLIENT_CONTEXT__] = context;\n}\nfunction getElectronProxyContext() {\n return target16[__ELECTRON_RPOXY_CONTEXT__];\n}\nfunction setElectronProxyContext(context) {\n target16[__ELECTRON_RPOXY_CONTEXT__] = context;\n}\nfunction getElectronServerContext() {\n return target16[__ELECTRON_SERVER_CONTEXT__];\n}\nfunction setElectronServerContext(context) {\n target16[__ELECTRON_SERVER_CONTEXT__] = context;\n}\n\n// src/messaging/presets/electron/client.ts\nfunction createElectronClientChannel() {\n const socket = getElectronClientContext();\n return {\n post: (data) => {\n socket.emit(__DEVTOOLS_KIT_ELECTRON_MESSAGING_EVENT_KEY__.CLIENT_TO_PROXY, SuperJSON.stringify(data));\n },\n on: (handler) => {\n socket.on(__DEVTOOLS_KIT_ELECTRON_MESSAGING_EVENT_KEY__.PROXY_TO_CLIENT, (e) => {\n handler(SuperJSON.parse(e));\n });\n }\n };\n}\n\n// src/messaging/presets/electron/proxy.ts\ninit_esm_shims();\nfunction createElectronProxyChannel() {\n const socket = getElectronProxyContext();\n return {\n post: (data) => {\n },\n on: (handler) => {\n socket.on(__DEVTOOLS_KIT_ELECTRON_MESSAGING_EVENT_KEY__.SERVER_TO_PROXY, (data) => {\n socket.broadcast.emit(__DEVTOOLS_KIT_ELECTRON_MESSAGING_EVENT_KEY__.PROXY_TO_CLIENT, data);\n });\n socket.on(__DEVTOOLS_KIT_ELECTRON_MESSAGING_EVENT_KEY__.CLIENT_TO_PROXY, (data) => {\n socket.broadcast.emit(__DEVTOOLS_KIT_ELECTRON_MESSAGING_EVENT_KEY__.PROXY_TO_SERVER, data);\n });\n }\n };\n}\n\n// src/messaging/presets/electron/server.ts\ninit_esm_shims();\nfunction createElectronServerChannel() {\n const socket = getElectronServerContext();\n return {\n post: (data) => {\n socket.emit(__DEVTOOLS_KIT_ELECTRON_MESSAGING_EVENT_KEY__.SERVER_TO_PROXY, SuperJSON.stringify(data));\n },\n on: (handler) => {\n socket.on(__DEVTOOLS_KIT_ELECTRON_MESSAGING_EVENT_KEY__.PROXY_TO_SERVER, (data) => {\n handler(SuperJSON.parse(data));\n });\n }\n };\n}\n\n// src/messaging/presets/extension/index.ts\ninit_esm_shims();\n\n// src/messaging/presets/extension/client.ts\ninit_esm_shims();\n\n// src/messaging/presets/extension/context.ts\ninit_esm_shims();\nimport { target as target17 } from \"@vue/devtools-shared\";\nvar __EXTENSION_CLIENT_CONTEXT__ = \"electron:client-context\";\nvar __DEVTOOLS_KIT_EXTENSION_MESSAGING_EVENT_KEY__ = {\n // client\n CLIENT_TO_PROXY: \"client->proxy\",\n // on: proxy->client\n // proxy\n PROXY_TO_CLIENT: \"proxy->client\",\n // on: server->proxy\n PROXY_TO_SERVER: \"proxy->server\",\n // on: client->proxy\n // server\n SERVER_TO_PROXY: \"server->proxy\"\n // on: proxy->server\n};\nfunction getExtensionClientContext() {\n return target17[__EXTENSION_CLIENT_CONTEXT__];\n}\nfunction setExtensionClientContext(context) {\n target17[__EXTENSION_CLIENT_CONTEXT__] = context;\n}\n\n// src/messaging/presets/extension/client.ts\nfunction createExtensionClientChannel() {\n let disconnected = false;\n let port = null;\n let reconnectTimer = null;\n let onMessageHandler = null;\n function connect() {\n try {\n clearTimeout(reconnectTimer);\n port = chrome.runtime.connect({\n name: `${chrome.devtools.inspectedWindow.tabId}`\n });\n setExtensionClientContext(port);\n disconnected = false;\n port == null ? void 0 : port.onMessage.addListener(onMessageHandler);\n port.onDisconnect.addListener(() => {\n disconnected = true;\n port == null ? void 0 : port.onMessage.removeListener(onMessageHandler);\n reconnectTimer = setTimeout(connect, 1e3);\n });\n } catch (e) {\n disconnected = true;\n }\n }\n connect();\n return {\n post: (data) => {\n if (disconnected) {\n return;\n }\n port == null ? void 0 : port.postMessage(SuperJSON.stringify(data));\n },\n on: (handler) => {\n onMessageHandler = (data) => {\n if (disconnected) {\n return;\n }\n handler(SuperJSON.parse(data));\n };\n port == null ? void 0 : port.onMessage.addListener(onMessageHandler);\n }\n };\n}\n\n// src/messaging/presets/extension/proxy.ts\ninit_esm_shims();\nfunction createExtensionProxyChannel() {\n const port = chrome.runtime.connect({\n name: \"content-script\"\n });\n function sendMessageToUserApp(payload) {\n window.postMessage({\n source: __DEVTOOLS_KIT_EXTENSION_MESSAGING_EVENT_KEY__.PROXY_TO_SERVER,\n payload\n }, \"*\");\n }\n function sendMessageToDevToolsClient(e) {\n if (e.data && e.data.source === __DEVTOOLS_KIT_EXTENSION_MESSAGING_EVENT_KEY__.SERVER_TO_PROXY) {\n try {\n port.postMessage(e.data.payload);\n } catch (e2) {\n }\n }\n }\n port.onMessage.addListener(sendMessageToUserApp);\n window.addEventListener(\"message\", sendMessageToDevToolsClient);\n port.onDisconnect.addListener(() => {\n window.removeEventListener(\"message\", sendMessageToDevToolsClient);\n sendMessageToUserApp(SuperJSON.stringify({\n event: \"shutdown\"\n }));\n });\n sendMessageToUserApp(SuperJSON.stringify({\n event: \"init\"\n }));\n return {\n post: (data) => {\n },\n on: (handler) => {\n }\n };\n}\n\n// src/messaging/presets/extension/server.ts\ninit_esm_shims();\nfunction createExtensionServerChannel() {\n return {\n post: (data) => {\n window.postMessage({\n source: __DEVTOOLS_KIT_EXTENSION_MESSAGING_EVENT_KEY__.SERVER_TO_PROXY,\n payload: SuperJSON.stringify(data)\n }, \"*\");\n },\n on: (handler) => {\n const listener = (event) => {\n if (event.data.source === __DEVTOOLS_KIT_EXTENSION_MESSAGING_EVENT_KEY__.PROXY_TO_SERVER && event.data.payload) {\n handler(SuperJSON.parse(event.data.payload));\n }\n };\n window.addEventListener(\"message\", listener);\n return () => {\n window.removeEventListener(\"message\", listener);\n };\n }\n };\n}\n\n// src/messaging/presets/iframe/index.ts\ninit_esm_shims();\n\n// src/messaging/presets/iframe/client.ts\ninit_esm_shims();\nimport { isBrowser as isBrowser3 } from \"@vue/devtools-shared\";\n\n// src/messaging/presets/iframe/context.ts\ninit_esm_shims();\nimport { target as target18 } from \"@vue/devtools-shared\";\nvar __DEVTOOLS_KIT_IFRAME_MESSAGING_EVENT_KEY = \"__devtools-kit-iframe-messaging-event-key__\";\nvar __IFRAME_SERVER_CONTEXT__ = \"iframe:server-context\";\nfunction getIframeServerContext() {\n return target18[__IFRAME_SERVER_CONTEXT__];\n}\nfunction setIframeServerContext(context) {\n target18[__IFRAME_SERVER_CONTEXT__] = context;\n}\n\n// src/messaging/presets/iframe/client.ts\nfunction createIframeClientChannel() {\n if (!isBrowser3) {\n return {\n post: (data) => {\n },\n on: (handler) => {\n }\n };\n }\n return {\n post: (data) => window.parent.postMessage(SuperJSON.stringify({\n event: __DEVTOOLS_KIT_IFRAME_MESSAGING_EVENT_KEY,\n data\n }), \"*\"),\n on: (handler) => window.addEventListener(\"message\", (event) => {\n try {\n const parsed = SuperJSON.parse(event.data);\n if (event.source === window.parent && parsed.event === __DEVTOOLS_KIT_IFRAME_MESSAGING_EVENT_KEY) {\n handler(parsed.data);\n }\n } catch (e) {\n }\n })\n };\n}\n\n// src/messaging/presets/iframe/server.ts\ninit_esm_shims();\nimport { isBrowser as isBrowser4 } from \"@vue/devtools-shared\";\nfunction createIframeServerChannel() {\n if (!isBrowser4) {\n return {\n post: (data) => {\n },\n on: (handler) => {\n }\n };\n }\n return {\n post: (data) => {\n var _a25;\n const iframe = getIframeServerContext();\n (_a25 = iframe == null ? void 0 : iframe.contentWindow) == null ? void 0 : _a25.postMessage(SuperJSON.stringify({\n event: __DEVTOOLS_KIT_IFRAME_MESSAGING_EVENT_KEY,\n data\n }), \"*\");\n },\n on: (handler) => {\n window.addEventListener(\"message\", (event) => {\n const iframe = getIframeServerContext();\n try {\n const parsed = SuperJSON.parse(event.data);\n if (event.source === (iframe == null ? void 0 : iframe.contentWindow) && parsed.event === __DEVTOOLS_KIT_IFRAME_MESSAGING_EVENT_KEY) {\n handler(parsed.data);\n }\n } catch (e) {\n }\n });\n }\n };\n}\n\n// src/messaging/presets/vite/index.ts\ninit_esm_shims();\n\n// src/messaging/presets/vite/client.ts\ninit_esm_shims();\n\n// src/messaging/presets/vite/context.ts\ninit_esm_shims();\nimport { target as target19 } from \"@vue/devtools-shared\";\nvar __DEVTOOLS_KIT_VITE_MESSAGING_EVENT_KEY = \"__devtools-kit-vite-messaging-event-key__\";\nvar __VITE_CLIENT_CONTEXT__ = \"vite:client-context\";\nvar __VITE_SERVER_CONTEXT__ = \"vite:server-context\";\nfunction getViteClientContext() {\n return target19[__VITE_CLIENT_CONTEXT__];\n}\nfunction setViteClientContext(context) {\n target19[__VITE_CLIENT_CONTEXT__] = context;\n}\nfunction getViteServerContext() {\n return target19[__VITE_SERVER_CONTEXT__];\n}\nfunction setViteServerContext(context) {\n target19[__VITE_SERVER_CONTEXT__] = context;\n}\n\n// src/messaging/presets/vite/client.ts\nfunction createViteClientChannel() {\n const client = getViteClientContext();\n return {\n post: (data) => {\n client == null ? void 0 : client.send(__DEVTOOLS_KIT_VITE_MESSAGING_EVENT_KEY, SuperJSON.stringify(data));\n },\n on: (handler) => {\n client == null ? void 0 : client.on(__DEVTOOLS_KIT_VITE_MESSAGING_EVENT_KEY, (event) => {\n handler(SuperJSON.parse(event));\n });\n }\n };\n}\n\n// src/messaging/presets/vite/server.ts\ninit_esm_shims();\nfunction createViteServerChannel() {\n var _a25;\n const viteServer = getViteServerContext();\n const ws = (_a25 = viteServer.hot) != null ? _a25 : viteServer.ws;\n return {\n post: (data) => ws == null ? void 0 : ws.send(__DEVTOOLS_KIT_VITE_MESSAGING_EVENT_KEY, SuperJSON.stringify(data)),\n on: (handler) => ws == null ? void 0 : ws.on(__DEVTOOLS_KIT_VITE_MESSAGING_EVENT_KEY, (event) => {\n handler(SuperJSON.parse(event));\n })\n };\n}\n\n// src/messaging/presets/ws/index.ts\ninit_esm_shims();\n\n// src/messaging/presets/ws/client.ts\ninit_esm_shims();\n\n// src/messaging/presets/ws/context.ts\ninit_esm_shims();\nimport { target as target20 } from \"@vue/devtools-shared\";\n\n// src/messaging/presets/ws/server.ts\ninit_esm_shims();\n\n// src/messaging/index.ts\nvar _a19, _b19;\n(_b19 = (_a19 = target21).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__) != null ? _b19 : _a19.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__ = [];\nvar _a20, _b20;\n(_b20 = (_a20 = target21).__VUE_DEVTOOLS_KIT_RPC_CLIENT__) != null ? _b20 : _a20.__VUE_DEVTOOLS_KIT_RPC_CLIENT__ = null;\nvar _a21, _b21;\n(_b21 = (_a21 = target21).__VUE_DEVTOOLS_KIT_RPC_SERVER__) != null ? _b21 : _a21.__VUE_DEVTOOLS_KIT_RPC_SERVER__ = null;\nvar _a22, _b22;\n(_b22 = (_a22 = target21).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__) != null ? _b22 : _a22.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ = null;\nvar _a23, _b23;\n(_b23 = (_a23 = target21).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__) != null ? _b23 : _a23.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ = null;\nvar _a24, _b24;\n(_b24 = (_a24 = target21).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__) != null ? _b24 : _a24.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ = null;\nfunction setRpcClientToGlobal(rpc) {\n target21.__VUE_DEVTOOLS_KIT_RPC_CLIENT__ = rpc;\n}\nfunction setRpcServerToGlobal(rpc) {\n target21.__VUE_DEVTOOLS_KIT_RPC_SERVER__ = rpc;\n}\nfunction getRpcClient() {\n return target21.__VUE_DEVTOOLS_KIT_RPC_CLIENT__;\n}\nfunction getRpcServer() {\n return target21.__VUE_DEVTOOLS_KIT_RPC_SERVER__;\n}\nfunction setViteRpcClientToGlobal(rpc) {\n target21.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ = rpc;\n}\nfunction setViteRpcServerToGlobal(rpc) {\n target21.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ = rpc;\n}\nfunction getViteRpcClient() {\n return target21.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__;\n}\nfunction getViteRpcServer() {\n return target21.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__;\n}\nfunction getChannel(preset, host = \"client\") {\n const channel = {\n iframe: {\n client: createIframeClientChannel,\n server: createIframeServerChannel\n }[host],\n electron: {\n client: createElectronClientChannel,\n proxy: createElectronProxyChannel,\n server: createElectronServerChannel\n }[host],\n vite: {\n client: createViteClientChannel,\n server: createViteServerChannel\n }[host],\n broadcast: {\n client: createBroadcastChannel,\n server: createBroadcastChannel\n }[host],\n extension: {\n client: createExtensionClientChannel,\n proxy: createExtensionProxyChannel,\n server: createExtensionServerChannel\n }[host]\n }[preset];\n return channel();\n}\nfunction createRpcClient(functions, options = {}) {\n const { channel: _channel, options: _options, preset } = options;\n const channel = preset ? getChannel(preset) : _channel;\n const rpc = createBirpc(functions, {\n ..._options,\n ...channel,\n timeout: -1\n });\n if (preset === \"vite\") {\n setViteRpcClientToGlobal(rpc);\n return;\n }\n setRpcClientToGlobal(rpc);\n return rpc;\n}\nfunction createRpcServer(functions, options = {}) {\n const { channel: _channel, options: _options, preset } = options;\n const channel = preset ? getChannel(preset, \"server\") : _channel;\n const rpcServer = getRpcServer();\n if (!rpcServer) {\n const group = createBirpcGroup(functions, [channel], {\n ..._options,\n timeout: -1\n });\n if (preset === \"vite\") {\n setViteRpcServerToGlobal(group);\n return;\n }\n setRpcServerToGlobal(group);\n } else {\n rpcServer.updateChannels((channels) => {\n channels.push(channel);\n });\n }\n}\nfunction createRpcProxy(options = {}) {\n const { channel: _channel, options: _options, preset } = options;\n const channel = preset ? getChannel(preset, \"proxy\") : _channel;\n return createBirpc({}, {\n ..._options,\n ...channel,\n timeout: -1\n });\n}\n\n// src/shared/index.ts\ninit_esm_shims();\n\n// src/shared/env.ts\ninit_esm_shims();\n\n// src/shared/time.ts\ninit_esm_shims();\n\n// src/shared/util.ts\ninit_esm_shims();\n\n// src/core/component/state/replacer.ts\ninit_esm_shims();\n\n// src/core/component/state/custom.ts\ninit_esm_shims();\nfunction getFunctionDetails(func) {\n let string = \"\";\n let matches = null;\n try {\n string = Function.prototype.toString.call(func);\n matches = String.prototype.match.call(string, /\\([\\s\\S]*?\\)/);\n } catch (e) {\n }\n const match = matches && matches[0];\n const args = typeof match === \"string\" ? match : \"(?)\";\n const name = typeof func.name === \"string\" ? func.name : \"\";\n return {\n _custom: {\n type: \"function\",\n displayText: `function ${escape(name)}${args}`,\n tooltipText: string.trim() ? `
${string}
` : null\n }\n };\n}\nfunction getBigIntDetails(val) {\n const stringifiedBigInt = BigInt.prototype.toString.call(val);\n return {\n _custom: {\n type: \"bigint\",\n displayText: `BigInt(${stringifiedBigInt})`,\n value: stringifiedBigInt\n }\n };\n}\nfunction getDateDetails(val) {\n const date = new Date(val.getTime());\n date.setMinutes(date.getMinutes() - date.getTimezoneOffset());\n return {\n _custom: {\n type: \"date\",\n displayText: Date.prototype.toString.call(val),\n value: date.toISOString().slice(0, -1)\n }\n };\n}\nfunction getMapDetails(val) {\n const list = Object.fromEntries(val);\n return {\n _custom: {\n type: \"map\",\n displayText: \"Map\",\n value: list,\n readOnly: true,\n fields: {\n abstract: true\n }\n }\n };\n}\nfunction getSetDetails(val) {\n const list = Array.from(val);\n return {\n _custom: {\n type: \"set\",\n displayText: `Set[${list.length}]`,\n value: list,\n readOnly: true\n }\n };\n}\nfunction getCaughtGetters(store) {\n const getters = {};\n const origGetters = store.getters || {};\n const keys = Object.keys(origGetters);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n Object.defineProperty(getters, key, {\n enumerable: true,\n get: () => {\n try {\n return origGetters[key];\n } catch (e) {\n return e;\n }\n }\n });\n }\n return getters;\n}\nfunction reduceStateList(list) {\n if (!list.length)\n return void 0;\n return list.reduce((map, item) => {\n const key = item.type || \"data\";\n const obj = map[key] = map[key] || {};\n obj[item.key] = item.value;\n return map;\n }, {});\n}\nfunction namedNodeMapToObject(map) {\n const result = {};\n const l = map.length;\n for (let i = 0; i < l; i++) {\n const node = map.item(i);\n result[node.name] = node.value;\n }\n return result;\n}\nfunction getStoreDetails(store) {\n return {\n _custom: {\n type: \"store\",\n displayText: \"Store\",\n value: {\n state: store.state,\n getters: getCaughtGetters(store)\n },\n fields: {\n abstract: true\n }\n }\n };\n}\nfunction getRouterDetails(router) {\n return {\n _custom: {\n type: \"router\",\n displayText: \"VueRouter\",\n value: {\n options: router.options,\n currentRoute: router.currentRoute\n },\n fields: {\n abstract: true\n }\n }\n };\n}\nfunction getInstanceDetails(instance) {\n if (instance._)\n instance = instance._;\n const state = processInstanceState(instance);\n return {\n _custom: {\n type: \"component\",\n id: instance.__VUE_DEVTOOLS_NEXT_UID__,\n displayText: getInstanceName(instance),\n tooltipText: \"Component instance\",\n value: reduceStateList(state),\n fields: {\n abstract: true\n }\n }\n };\n}\nfunction getComponentDefinitionDetails(definition) {\n let display = getComponentName(definition);\n if (display) {\n if (definition.name && definition.__file)\n display += ` (${definition.__file})`;\n } else {\n display = \"Unknown Component\";\n }\n return {\n _custom: {\n type: \"component-definition\",\n displayText: display,\n tooltipText: \"Component definition\",\n ...definition.__file ? {\n file: definition.__file\n } : {}\n }\n };\n}\nfunction getHTMLElementDetails(value) {\n try {\n return {\n _custom: {\n type: \"HTMLElement\",\n displayText: `<${value.tagName.toLowerCase()}>`,\n value: namedNodeMapToObject(value.attributes)\n }\n };\n } catch (e) {\n return {\n _custom: {\n type: \"HTMLElement\",\n displayText: `${String(value)}`\n }\n };\n }\n}\nfunction tryGetRefValue(ref) {\n if (ensurePropertyExists(ref, \"_value\", true)) {\n return ref._value;\n }\n if (ensurePropertyExists(ref, \"value\", true)) {\n return ref.value;\n }\n}\nfunction getObjectDetails(object) {\n var _a25, _b25, _c, _d;\n const info = getSetupStateType(object);\n const isState = info.ref || info.computed || info.reactive;\n if (isState) {\n const stateTypeName = info.computed ? \"Computed\" : info.ref ? \"Ref\" : info.reactive ? \"Reactive\" : null;\n const value = toRaw2(info.reactive ? object : tryGetRefValue(object));\n const raw = ensurePropertyExists(object, \"effect\") ? ((_b25 = (_a25 = object.effect) == null ? void 0 : _a25.raw) == null ? void 0 : _b25.toString()) || ((_d = (_c = object.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;\n return {\n _custom: {\n type: stateTypeName == null ? void 0 : stateTypeName.toLowerCase(),\n stateTypeName,\n value,\n ...raw ? { tooltipText: `${raw}` } : {}\n }\n };\n }\n if (ensurePropertyExists(object, \"__asyncLoader\") && typeof object.__asyncLoader === \"function\") {\n return {\n _custom: {\n type: \"component-definition\",\n display: \"Async component definition\"\n }\n };\n }\n}\n\n// src/core/component/state/replacer.ts\nfunction stringifyReplacer(key, _value, depth, seenInstance) {\n var _a25;\n if (key === \"compilerOptions\")\n return;\n const val = this[key];\n const type = typeof val;\n if (Array.isArray(val)) {\n const l = val.length;\n if (l > MAX_ARRAY_SIZE) {\n return {\n _isArray: true,\n length: l,\n items: val.slice(0, MAX_ARRAY_SIZE)\n };\n }\n return val;\n } else if (typeof val === \"string\") {\n if (val.length > MAX_STRING_SIZE)\n return `${val.substring(0, MAX_STRING_SIZE)}... (${val.length} total length)`;\n else\n return val;\n } else if (type === \"undefined\") {\n return UNDEFINED;\n } else if (val === Number.POSITIVE_INFINITY) {\n return INFINITY;\n } else if (val === Number.NEGATIVE_INFINITY) {\n return NEGATIVE_INFINITY;\n } else if (typeof val === \"function\") {\n return getFunctionDetails(val);\n } else if (type === \"symbol\") {\n return `[native Symbol ${Symbol.prototype.toString.call(val)}]`;\n } else if (typeof val === \"bigint\") {\n return getBigIntDetails(val);\n } else if (val !== null && typeof val === \"object\") {\n const proto = Object.prototype.toString.call(val);\n if (proto === \"[object Map]\") {\n return getMapDetails(val);\n } else if (proto === \"[object Set]\") {\n return getSetDetails(val);\n } else if (proto === \"[object RegExp]\") {\n return `[native RegExp ${RegExp.prototype.toString.call(val)}]`;\n } else if (proto === \"[object Date]\") {\n return getDateDetails(val);\n } else if (proto === \"[object Error]\") {\n return `[native Error ${val.message}<>${val.stack}]`;\n } else if (ensurePropertyExists(val, \"state\", true) && ensurePropertyExists(val, \"_vm\", true)) {\n return getStoreDetails(val);\n } else if (val.constructor && val.constructor.name === \"VueRouter\") {\n return getRouterDetails(val);\n } else if (isVueInstance(val)) {\n const componentVal = getInstanceDetails(val);\n const parentInstanceDepth = seenInstance == null ? void 0 : seenInstance.get(val);\n if (parentInstanceDepth && parentInstanceDepth < depth) {\n return `[[CircularRef]] <${componentVal._custom.displayText}>`;\n }\n seenInstance == null ? void 0 : seenInstance.set(val, depth);\n return componentVal;\n } else if (ensurePropertyExists(val, \"render\", true) && typeof val.render === \"function\") {\n return getComponentDefinitionDetails(val);\n } else if (val.constructor && val.constructor.name === \"VNode\") {\n return `[native VNode <${val.tag}>]`;\n } else if (typeof HTMLElement !== \"undefined\" && val instanceof HTMLElement) {\n return getHTMLElementDetails(val);\n } else if (((_a25 = val.constructor) == null ? void 0 : _a25.name) === \"Store\" && \"_wrappedGetters\" in val) {\n return \"[object Store]\";\n } else if (ensurePropertyExists(val, \"currentRoute\", true)) {\n return \"[object Router]\";\n }\n const customDetails = getObjectDetails(val);\n if (customDetails != null)\n return customDetails;\n } else if (Number.isNaN(val)) {\n return NAN;\n }\n return sanitize(val);\n}\n\n// src/shared/transfer.ts\ninit_esm_shims();\nvar MAX_SERIALIZED_SIZE = 2 * 1024 * 1024;\nfunction isObject(_data, proto) {\n return proto === \"[object Object]\";\n}\nfunction isArray3(_data, proto) {\n return proto === \"[object Array]\";\n}\nfunction isVueReactiveLinkNode(node) {\n var _a25;\n const constructorName = (_a25 = node == null ? void 0 : node.constructor) == null ? void 0 : _a25.name;\n return constructorName === \"Dep\" && \"activeLink\" in node || constructorName === \"Link\" && \"dep\" in node;\n}\nfunction encode(data, replacer, list, seen, depth = 0, seenVueInstance = /* @__PURE__ */ new Map()) {\n let stored;\n let key;\n let value;\n let i;\n let l;\n const seenIndex = seen.get(data);\n if (seenIndex != null)\n return seenIndex;\n const index = list.length;\n const proto = Object.prototype.toString.call(data);\n if (isObject(data, proto)) {\n if (isVueReactiveLinkNode(data)) {\n return index;\n }\n stored = {};\n seen.set(data, index);\n list.push(stored);\n const keys = Object.keys(data);\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n if (key === \"compilerOptions\")\n return index;\n value = data[key];\n const isVm = value != null && isObject(value, Object.prototype.toString.call(data)) && isVueInstance(value);\n try {\n if (replacer) {\n value = replacer.call(data, key, value, depth, seenVueInstance);\n }\n } catch (e) {\n value = e;\n }\n stored[key] = encode(value, replacer, list, seen, depth + 1, seenVueInstance);\n if (isVm) {\n seenVueInstance.delete(value);\n }\n }\n } else if (isArray3(data, proto)) {\n stored = [];\n seen.set(data, index);\n list.push(stored);\n for (i = 0, l = data.length; i < l; i++) {\n try {\n value = data[i];\n if (replacer)\n value = replacer.call(data, i, value, depth, seenVueInstance);\n } catch (e) {\n value = e;\n }\n stored[i] = encode(value, replacer, list, seen, depth + 1, seenVueInstance);\n }\n } else {\n list.push(data);\n }\n return index;\n}\nfunction decode(list, reviver2 = null) {\n let i = list.length;\n let j, k, data, key, value, proto;\n while (i--) {\n data = list[i];\n proto = Object.prototype.toString.call(data);\n if (proto === \"[object Object]\") {\n const keys = Object.keys(data);\n for (j = 0, k = keys.length; j < k; j++) {\n key = keys[j];\n value = list[data[key]];\n if (reviver2)\n value = reviver2.call(data, key, value);\n data[key] = value;\n }\n } else if (proto === \"[object Array]\") {\n for (j = 0, k = data.length; j < k; j++) {\n value = list[data[j]];\n if (reviver2)\n value = reviver2.call(data, j, value);\n data[j] = value;\n }\n }\n }\n}\nfunction stringifyCircularAutoChunks(data, replacer = null, space = null) {\n let result;\n try {\n result = arguments.length === 1 ? JSON.stringify(data) : JSON.stringify(data, (k, v) => {\n var _a25;\n return (_a25 = replacer == null ? void 0 : replacer(k, v)) == null ? void 0 : _a25.call(this);\n }, space);\n } catch (e) {\n result = stringifyStrictCircularAutoChunks(data, replacer, space);\n }\n if (result.length > MAX_SERIALIZED_SIZE) {\n const chunkCount = Math.ceil(result.length / MAX_SERIALIZED_SIZE);\n const chunks = [];\n for (let i = 0; i < chunkCount; i++)\n chunks.push(result.slice(i * MAX_SERIALIZED_SIZE, (i + 1) * MAX_SERIALIZED_SIZE));\n return chunks;\n }\n return result;\n}\nfunction stringifyStrictCircularAutoChunks(data, replacer = null, space = null) {\n const list = [];\n encode(data, replacer, list, /* @__PURE__ */ new Map());\n return space ? ` ${JSON.stringify(list, null, space)}` : ` ${JSON.stringify(list)}`;\n}\nfunction parseCircularAutoChunks(data, reviver2 = null) {\n if (Array.isArray(data))\n data = data.join(\"\");\n const hasCircular = /^\\s/.test(data);\n if (!hasCircular) {\n return arguments.length === 1 ? JSON.parse(data) : JSON.parse(data, reviver2);\n } else {\n const list = JSON.parse(data);\n decode(list, reviver2);\n return list[0];\n }\n}\n\n// src/shared/util.ts\nfunction stringify2(data) {\n return stringifyCircularAutoChunks(data, stringifyReplacer);\n}\nfunction parse2(data, revive2 = false) {\n if (data == void 0)\n return {};\n return revive2 ? parseCircularAutoChunks(data, reviver) : parseCircularAutoChunks(data);\n}\n\n// src/index.ts\nvar devtools = {\n hook,\n init: () => {\n initDevTools();\n },\n get ctx() {\n return devtoolsContext;\n },\n get api() {\n return devtoolsContext.api;\n }\n};\nexport {\n DevToolsContextHookKeys,\n DevToolsMessagingHookKeys,\n DevToolsV6PluginAPIHookKeys,\n INFINITY,\n NAN,\n NEGATIVE_INFINITY,\n ROUTER_INFO_KEY,\n ROUTER_KEY,\n UNDEFINED,\n activeAppRecord,\n addCustomCommand,\n addCustomTab,\n addDevToolsAppRecord,\n addDevToolsPluginToBuffer,\n addInspector,\n callConnectedUpdatedHook,\n callDevToolsPluginSetupFn,\n callInspectorUpdatedHook,\n callStateUpdatedHook,\n createComponentsDevToolsPlugin,\n createDevToolsApi,\n createDevToolsCtxHooks,\n createRpcClient,\n createRpcProxy,\n createRpcServer,\n devtools,\n devtoolsAppRecords,\n devtoolsContext,\n devtoolsInspector,\n devtoolsPluginBuffer,\n devtoolsRouter,\n devtoolsRouterInfo,\n devtoolsState,\n formatInspectorStateValue,\n getActiveInspectors,\n getDevToolsEnv,\n getExtensionClientContext,\n getInspector,\n getInspectorActions,\n getInspectorInfo,\n getInspectorNodeActions,\n getInspectorStateValueType,\n getRaw,\n getRpcClient,\n getRpcServer,\n getViteRpcClient,\n getViteRpcServer,\n initDevTools,\n isPlainObject,\n onDevToolsClientConnected,\n onDevToolsConnected,\n parse2 as parse,\n registerDevToolsPlugin,\n removeCustomCommand,\n removeDevToolsAppRecord,\n removeRegisteredPluginApp,\n resetDevToolsState,\n setActiveAppRecord,\n setActiveAppRecordId,\n setDevToolsEnv,\n setElectronClientContext,\n setElectronProxyContext,\n setElectronServerContext,\n setExtensionClientContext,\n setIframeServerContext,\n setOpenInEditorBaseUrl,\n setRpcServerToGlobal,\n setViteClientContext,\n setViteRpcClientToGlobal,\n setViteRpcServerToGlobal,\n setViteServerContext,\n setupDevToolsPlugin,\n stringify2 as stringify,\n toEdit,\n toSubmit,\n toggleClientConnected,\n toggleComponentInspectorEnabled,\n toggleHighPerfMode,\n updateDevToolsClientDetected,\n updateDevToolsState,\n updateTimelineLayersState\n};\n","/**\n * vee-validate v4.14.7\n * (c) 2024 Abdelrahman Awad\n * @license MIT\n */\nimport { getCurrentInstance, inject, warn as warn$1, computed, toValue, ref, watch, nextTick, unref, isRef, reactive, onUnmounted, onMounted, provide, onBeforeUnmount, defineComponent, toRef, resolveDynamicComponent, h, readonly, watchEffect, shallowRef } 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}\nfunction isObjectLike(value) {\n return typeof value === 'object' && value !== null;\n}\nfunction getTag(value) {\n if (value == null) {\n return value === undefined ? '[object Undefined]' : '[object Null]';\n }\n return Object.prototype.toString.call(value);\n}\n// Reference: https://github.com/lodash/lodash/blob/master/isPlainObject.js\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || getTag(value) !== '[object Object]') {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n let proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n}\nfunction merge(target, source) {\n Object.keys(source).forEach(key => {\n if (isPlainObject(source[key]) && isPlainObject(target[key])) {\n if (!target[key]) {\n target[key] = {};\n }\n merge(target[key], source[key]);\n return;\n }\n target[key] = source[key];\n });\n return target;\n}\n/**\n * Constructs a path with dot paths for arrays to use brackets to be compatible with vee-validate path syntax\n */\nfunction normalizeFormPath(path) {\n const pathArr = path.split('.');\n if (!pathArr.length) {\n return '';\n }\n let fullPath = String(pathArr[0]);\n for (let i = 1; i < pathArr.length; i++) {\n if (isIndex(pathArr[i])) {\n fullPath += `[${pathArr[i]}]`;\n continue;\n }\n fullPath += `.${pathArr[i]}`;\n }\n return fullPath;\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\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\nconst FormContextKey = Symbol('vee-validate-form');\nconst PublicFormContextKey = Symbol('vee-validate-form-context');\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 *\n * NB: keys with the value undefined are ignored in the evaluation and considered equal to missing keys.\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 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 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 - countUndefinedValues(a, keys);\n if (length !== Object.keys(b).length - countUndefinedValues(b, Object.keys(b)))\n return false;\n for (i = length; i-- !== 0;) {\n if (!Object.prototype.hasOwnProperty.call(b, keys[i]))\n return false;\n }\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 return a !== a && b !== b;\n}\nfunction countUndefinedValues(a, keys) {\n let result = 0;\n for (let i = keys.length; i-- !== 0;) {\n // eslint-disable-next-line no-var\n var key = keys[i];\n if (a[key] === undefined)\n result++;\n }\n return result;\n}\nfunction isFile(a) {\n if (!isClient) {\n return false;\n }\n return a instanceof File;\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}\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 clearTimeout(timer);\n }\n // @ts-expect-error timer is a number\n timer = 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 return onDone(result, args);\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 normalizeErrorItem(message) {\n return Array.isArray(message) ? message : message ? [message] : [];\n}\nfunction resolveFieldOrPathState(path) {\n const form = injectWithSelf(FormContextKey);\n const state = path ? computed(() => form === null || form === void 0 ? void 0 : form.getPathState(toValue(path))) : undefined;\n const field = path ? undefined : inject(FieldContextKey);\n if (!field && !(state === null || state === void 0 ? void 0 : state.value)) {\n if ((process.env.NODE_ENV !== 'production')) {\n warn(`field with name ${toValue(path)} was not found`);\n }\n }\n return state || field;\n}\nfunction omit(obj, keys) {\n const target = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n target[key] = obj[key];\n }\n }\n return target;\n}\nfunction debounceNextTick(inner) {\n let lastTick = null;\n let resolves = [];\n return function (...args) {\n // Run the function after a certain amount of time\n const thisTick = nextTick(() => {\n if (lastTick !== thisTick) {\n return;\n }\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 lastTick = null;\n });\n lastTick = thisTick;\n return new Promise(resolve => resolves.push(resolve));\n };\n}\n\nfunction 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 parseInputValue(el) {\n if (el.type === 'number') {\n return Number.isNaN(el.valueAsNumber) ? el.value : el.valueAsNumber;\n }\n if (el.type === 'range') {\n return Number.isNaN(el.valueAsNumber) ? el.value : el.valueAsNumber;\n }\n return el.value;\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 parseInputValue(input);\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 var _a;\n const val = (_a = getFromPath(crossTable, value)) !== null && _a !== void 0 ? _a : 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 return Object.assign(Object.assign({}, result), { valid: !result.errors.length });\n}\n/**\n * Starts the validation process.\n */\nasync function _validate(field, value) {\n const rules = field.rules;\n if (isTypedSchema(rules) || isYupValidator(rules)) {\n return validateFieldWithTypedSchema(value, Object.assign(Object.assign({}, field), { rules }));\n }\n // if a generic function or chain of generic functions\n if (isCallable(rules) || Array.isArray(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(rules) ? rules : [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' && !Array.isArray(result) && result;\n if (isValid) {\n continue;\n }\n if (Array.isArray(result)) {\n errors.push(...result);\n }\n else {\n const message = typeof result === 'string' ? result : _generateFieldError(ctx);\n errors.push(message);\n }\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(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, context) {\n var _a;\n try {\n const output = await yupSchema.validate(values, { abortEarly: false, context: (context === null || context === void 0 ? void 0 : context.formData) || {} });\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, context) {\n const typedSchema = isTypedSchema(context.rules) ? context.rules : yupToTypedSchema(context.rules);\n const result = await typedSchema.parse(value, { formData: context.formData });\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 value: result.value,\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(klona(values), { formData: klona(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 source: 'schema',\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 source: 'schema',\n };\n}\n\nlet ID_COUNTER = 0;\nfunction useFieldState(path, init) {\n const { value, initialValue, setInitialValue } = _useFieldValue(path, init.modelValue, init.form);\n if (!init.form) {\n const { errors, setErrors } = createFieldErrors();\n const id = ID_COUNTER >= Number.MAX_SAFE_INTEGER ? 0 : ++ID_COUNTER;\n const meta = createFieldMeta(value, initialValue, errors, init.schema);\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 flags: { pendingUnmount: { [id]: false }, pendingReset: false },\n errors,\n setState,\n };\n }\n const state = init.form.createPathState(path, {\n bails: init.bails,\n label: init.label,\n type: init.type,\n validate: init.validate,\n schema: init.schema,\n });\n const errors = computed(() => state.errors);\n function setState(state) {\n var _a, _b, _c;\n if ('value' in state) {\n value.value = state.value;\n }\n if ('errors' in state) {\n (_a = init.form) === null || _a === void 0 ? void 0 : _a.setFieldError(unref(path), state.errors);\n }\n if ('touched' in state) {\n (_b = init.form) === null || _b === void 0 ? void 0 : _b.setFieldTouched(unref(path), (_c = state.touched) !== null && _c !== void 0 ? _c : false);\n }\n if ('initialValue' in state) {\n setInitialValue(state.initialValue);\n }\n }\n return {\n id: Array.isArray(state.id) ? state.id[state.id.length - 1] : state.id,\n path,\n value,\n errors,\n meta: state,\n initialValue,\n flags: state.__flags,\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.initialValues.value, unref(path), unref(modelRef));\n }\n function setInitialValue(value) {\n if (!form) {\n modelRef.value = value;\n return;\n }\n form.setFieldInitialValue(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, false);\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 createFieldMeta(currentValue, initialValue, errors, schema) {\n const isRequired = computed(() => { var _a, _b, _c; return (_c = (_b = (_a = toValue(schema)) === null || _a === void 0 ? void 0 : _a.describe) === null || _b === void 0 ? void 0 : _b.call(_a).required) !== null && _c !== void 0 ? _c : false; });\n const meta = reactive({\n touched: false,\n pending: false,\n valid: true,\n required: isRequired,\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 createFieldErrors() {\n const errors = ref([]);\n return {\n errors,\n setErrors: (messages) => {\n errors.value = normalizeErrorItem(messages);\n },\n };\n}\n\nconst DEVTOOLS_FORMS = {};\nconst DEVTOOLS_FIELDS = {};\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;\n/**\n * Plugin API\n */\nlet API;\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 }, 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 // eslint-disable-next-line no-console\n console.error('There is not a valid selected vee-validate node or component');\n return;\n }\n if (SELECTED_NODE.type === 'field') {\n await SELECTED_NODE.field.validate();\n return;\n }\n if (SELECTED_NODE.type === 'form') {\n await SELECTED_NODE.form.validate();\n return;\n }\n if (SELECTED_NODE.type === 'pathState') {\n await SELECTED_NODE.form.validateField(SELECTED_NODE.state.path);\n }\n },\n },\n {\n icon: 'delete_sweep',\n tooltip: 'Clear validation state of the selected item',\n action: () => {\n if (!SELECTED_NODE) {\n // eslint-disable-next-line no-console\n console.error('There is not a valid selected vee-validate node or component');\n return;\n }\n if (SELECTED_NODE.type === 'field') {\n SELECTED_NODE.field.resetField();\n return;\n }\n if (SELECTED_NODE.type === 'form') {\n SELECTED_NODE.form.resetForm();\n }\n if (SELECTED_NODE.type === 'pathState') {\n SELECTED_NODE.form.resetField(SELECTED_NODE.state.path);\n }\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 => {\n if (payload.inspectorId !== INSPECTOR_ID) {\n return;\n }\n const { form, field, state, type } = decodeNodeId(payload.nodeId);\n api.unhighlightElement();\n if (form && type === 'form') {\n payload.state = buildFormState(form);\n SELECTED_NODE = { type: 'form', form };\n api.highlightElement(form._vm);\n return;\n }\n if (state && type === 'pathState' && form) {\n payload.state = buildFieldState(state);\n SELECTED_NODE = { type: 'pathState', state, form };\n return;\n }\n if (field && type === 'field') {\n payload.state = buildFieldState({\n errors: field.errors.value,\n dirty: field.meta.dirty,\n valid: field.meta.valid,\n touched: field.meta.touched,\n value: field.value.value,\n initialValue: field.meta.initialValue,\n });\n SELECTED_NODE = { field, type: 'field' };\n api.highlightElement(field._vm);\n return;\n }\n SELECTED_NODE = null;\n api.unhighlightElement();\n });\n });\n }\n}\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}\nfunction mapFormForDevtoolsInspector(form) {\n const { textColor, bgColor } = getValidityColors(form.meta.value.valid);\n const formTreeNodes = {};\n Object.values(form.getAllPathStates()).forEach(state => {\n setInPath(formTreeNodes, toValue(state.path), mapPathForDevtoolsInspector(state, 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.name,\n children,\n tags: [\n {\n label: 'Form',\n textColor,\n backgroundColor: bgColor,\n },\n {\n label: `${form.getAllPathStates().length} fields`,\n textColor: COLORS.white,\n backgroundColor: COLORS.unknown,\n },\n ],\n };\n}\nfunction mapPathForDevtoolsInspector(state, form) {\n return {\n id: encodeNodeId(form, state),\n label: toValue(state.path),\n tags: getFieldNodeTags(state.multiple, state.fieldsCount, state.type, state.valid, form),\n };\n}\nfunction mapFieldForDevtoolsInspector(field, form) {\n return {\n id: encodeNodeId(form, field),\n label: unref(field.name),\n tags: getFieldNodeTags(false, 1, field.type, field.meta.valid, form),\n };\n}\nfunction getFieldNodeTags(multiple, fieldsCount, type, valid, form) {\n const { textColor, bgColor } = getValidityColors(valid);\n return [\n multiple\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 type === 'checkbox'\n ? {\n label: 'Checkbox',\n textColor: COLORS.white,\n backgroundColor: COLORS.blue,\n }\n : undefined,\n type === 'radio'\n ? {\n label: 'Radio',\n textColor: COLORS.white,\n backgroundColor: COLORS.purple,\n }\n : undefined,\n multiple\n ? {\n label: 'Multiple',\n textColor: COLORS.black,\n backgroundColor: COLORS.orange,\n }\n : undefined,\n ].filter(Boolean);\n}\nfunction encodeNodeId(form, stateOrField) {\n const type = stateOrField ? ('path' in stateOrField ? 'pathState' : 'field') : 'form';\n const fieldPath = stateOrField ? ('path' in stateOrField ? stateOrField === null || stateOrField === void 0 ? void 0 : stateOrField.path : toValue(stateOrField === null || stateOrField === void 0 ? void 0 : stateOrField.name)) : '';\n const idObject = { f: form === null || form === void 0 ? void 0 : form.formId, ff: (stateOrField === null || stateOrField === void 0 ? void 0 : stateOrField.id) || fieldPath, type };\n return btoa(encodeURIComponent(JSON.stringify(idObject)));\n}\nfunction decodeNodeId(nodeId) {\n try {\n const idObject = JSON.parse(decodeURIComponent(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 state = form.getPathState(idObject.ff);\n return {\n type: idObject.type,\n form,\n state,\n };\n }\n catch (err) {\n // console.error(`Devtools: [vee-validate] Failed to parse node id ${nodeId}`);\n }\n return {};\n}\nfunction buildFieldState(state) {\n return {\n 'Field state': [\n { key: 'errors', value: state.errors },\n {\n key: 'initialValue',\n value: state.initialValue,\n },\n {\n key: 'currentValue',\n value: state.value,\n },\n {\n key: 'touched',\n value: state.touched,\n },\n {\n key: 'dirty',\n value: state.dirty,\n },\n {\n key: 'valid',\n value: state.valid,\n },\n ],\n };\n}\nfunction buildFormState(form) {\n const { errorBag, meta, values, isSubmitting, isValidating, 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: 'isValidating',\n value: isValidating.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 getValidityColors(valid) {\n return {\n bgColor: valid ? COLORS.success : COLORS.error,\n textColor: valid ? 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 useFieldWithChecked(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, syncVModel, form: controlForm, } = normalizeOptions(opts);\n const injectedForm = controlled ? injectWithSelf(FormContextKey) : undefined;\n const form = controlForm || injectedForm;\n const name = computed(() => normalizeFormPath(toValue(path)));\n const validator = computed(() => {\n const schema = toValue(form === null || form === void 0 ? void 0 : form.schema);\n if (schema) {\n return undefined;\n }\n const rulesValue = unref(rules);\n if (isYupValidator(rulesValue) ||\n isTypedSchema(rulesValue) ||\n isCallable(rulesValue) ||\n Array.isArray(rulesValue)) {\n return rulesValue;\n }\n return normalizeRules(rulesValue);\n });\n const isTyped = !isCallable(validator.value) && isTypedSchema(toValue(rules));\n const { id, value, initialValue, meta, setState, errors, flags } = useFieldState(name, {\n modelValue,\n form,\n bails,\n label,\n type,\n validate: validator.value ? validate$1 : undefined,\n schema: isTyped ? rules : undefined,\n });\n const errorMessage = computed(() => errors.value[0]);\n if (syncVModel) {\n useVModel({\n value,\n prop: syncVModel,\n handleChange,\n shouldValidate: () => validateOnValueUpdate && !flags.pendingReset,\n });\n }\n /**\n * Handles common onBlur meta update\n */\n const handleBlur = (evt, shouldValidate = false) => {\n meta.touched = true;\n if (shouldValidate) {\n validateWithStateMutation();\n }\n };\n async function validateCurrentValue(mode) {\n var _a, _b;\n if (form === null || form === void 0 ? void 0 : form.validateSchema) {\n const { results } = await form.validateSchema(mode);\n return (_a = results[toValue(name)]) !== null && _a !== void 0 ? _a : { valid: true, errors: [] };\n }\n if (validator.value) {\n return validate(value.value, validator.value, {\n name: toValue(name),\n label: toValue(label),\n values: (_b = form === null || form === void 0 ? void 0 : form.values) !== null && _b !== void 0 ? _b : {},\n bails,\n });\n }\n return { valid: true, errors: [] };\n }\n const validateWithStateMutation = withLatest(async () => {\n meta.pending = true;\n meta.validated = true;\n return validateCurrentValue('validated-only');\n }, result => {\n if (flags.pendingUnmount[field.id]) {\n return result;\n }\n setState({ errors: result.errors });\n meta.pending = false;\n meta.valid = result.valid;\n return result;\n });\n const validateValidStateOnly = withLatest(async () => {\n return validateCurrentValue('silent');\n }, result => {\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 setValue(newValue, shouldValidate);\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 function resetField(state) {\n var _a;\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 }\n const vm = getCurrentInstance();\n function setValue(newValue, shouldValidate = true) {\n value.value = vm && syncVModel ? applyModelModifiers(newValue, vm.props.modelModifiers) : newValue;\n const validateFn = shouldValidate ? validateWithStateMutation : validateValidStateOnly;\n validateFn();\n }\n function setErrors(errors) {\n setState({ errors: Array.isArray(errors) ? errors : [errors] });\n }\n const valueProxy = computed({\n get() {\n return value.value;\n },\n set(newValue) {\n setValue(newValue, validateOnValueUpdate);\n },\n });\n const field = {\n id,\n name,\n label,\n value: valueProxy,\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 // extract cross-field dependencies in a computed prop\n const dependencies = computed(() => {\n const rulesVal = validator.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 onBeforeUnmount(() => {\n var _a;\n const shouldKeepValue = (_a = toValue(field.keepValueOnUnmount)) !== null && _a !== void 0 ? _a : toValue(form.keepValuesOnUnmount);\n const path = toValue(name);\n if (shouldKeepValue || !form || flags.pendingUnmount[field.id]) {\n form === null || form === void 0 ? void 0 : form.removePathState(path, id);\n return;\n }\n flags.pendingUnmount[field.id] = true;\n const pathState = form.getPathState(path);\n const matchesId = Array.isArray(pathState === null || pathState === void 0 ? void 0 : pathState.id) && (pathState === null || pathState === void 0 ? void 0 : pathState.multiple)\n ? pathState === null || pathState === void 0 ? void 0 : pathState.id.includes(field.id)\n : (pathState === null || pathState === void 0 ? void 0 : pathState.id) === field.id;\n if (!matchesId) {\n return;\n }\n if ((pathState === null || pathState === void 0 ? void 0 : pathState.multiple) && Array.isArray(pathState.value)) {\n const valueIdx = pathState.value.findIndex(i => isEqual(i, toValue(field.checkedValue)));\n if (valueIdx > -1) {\n const newVal = [...pathState.value];\n newVal.splice(valueIdx, 1);\n form.setFieldValue(path, newVal);\n }\n if (Array.isArray(pathState.id)) {\n pathState.id.splice(pathState.id.indexOf(field.id), 1);\n }\n }\n else {\n form.unsetPathValue(toValue(name));\n }\n form.removePathState(path, id);\n });\n return field;\n}\n/**\n * Normalizes partial field options to include the full options\n */\nfunction normalizeOptions(opts) {\n const defaults = () => ({\n initialValue: undefined,\n validateOnMount: false,\n bails: true,\n label: undefined,\n validateOnValueUpdate: true,\n keepValueOnUnmount: undefined,\n syncVModel: false,\n controlled: true,\n });\n const isVModelSynced = !!(opts === null || opts === void 0 ? void 0 : opts.syncVModel);\n const modelPropName = typeof (opts === null || opts === void 0 ? void 0 : opts.syncVModel) === 'string' ? opts.syncVModel : (opts === null || opts === void 0 ? void 0 : opts.modelPropName) || 'modelValue';\n const initialValue = isVModelSynced && !('initialValue' in (opts || {}))\n ? getCurrentModelValue(getCurrentInstance(), modelPropName)\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 const syncVModel = (opts === null || opts === void 0 ? void 0 : opts.modelPropName) || (opts === null || opts === void 0 ? void 0 : opts.syncVModel) || false;\n return Object.assign(Object.assign(Object.assign({}, defaults()), (opts || {})), { initialValue, controlled: controlled !== null && controlled !== void 0 ? controlled : true, checkedValue,\n syncVModel });\n}\nfunction useFieldWithChecked(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 patchCheckedApi(field) {\n const handleChange = field.handleChange;\n const checked = computed(() => {\n const currentValue = toValue(field.value);\n const checkedVal = toValue(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, _b;\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 const path = toValue(name);\n const pathState = form === null || form === void 0 ? void 0 : form.getPathState(path);\n const value = normalizeEventValue(e);\n let newValue = (_b = toValue(checkedValue)) !== null && _b !== void 0 ? _b : value;\n if (form && (pathState === null || pathState === void 0 ? void 0 : pathState.multiple) && pathState.type === 'checkbox') {\n newValue = resolveNextCheckboxValue(getFromPath(form.values, path) || [], newValue, undefined);\n }\n else if ((opts === null || opts === void 0 ? void 0 : opts.type) === 'checkbox') {\n newValue = resolveNextCheckboxValue(toValue(field.value), newValue, toValue(uncheckedValue));\n }\n handleChange(newValue, shouldValidate);\n }\n return Object.assign(Object.assign({}, field), { checked,\n checkedValue,\n uncheckedValue, handleChange: handleCheckboxChange });\n }\n return patchCheckedApi(_useField(name, rules, opts));\n}\nfunction useVModel({ prop, value, handleChange, shouldValidate }) {\n const vm = getCurrentInstance();\n /* istanbul ignore next */\n if (!vm || !prop) {\n if ((process.env.NODE_ENV !== 'production')) {\n // eslint-disable-next-line no-console\n console.warn('Failed to setup model events because `useField` was not called in setup.');\n }\n return;\n }\n const propName = typeof prop === 'string' ? 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, value.value)) {\n return;\n }\n handleChange(newValue, shouldValidate());\n });\n}\nfunction getCurrentModelValue(vm, propName) {\n if (!vm) {\n return undefined;\n }\n return vm.props[propName];\n}\n\nconst FieldImpl = /** #__PURE__ */ 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, setValue, } = 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: props.validateOnModelUpdate,\n keepValueOnUnmount: keepValue,\n syncVModel: true,\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 };\n const sharedProps = computed(() => {\n const { validateOnInput, validateOnChange, validateOnBlur, validateOnModelUpdate } = resolveValidationTriggers(props);\n function baseOnBlur(e) {\n handleBlur(e, validateOnBlur);\n if (isCallable(ctx.attrs.onBlur)) {\n ctx.attrs.onBlur(e);\n }\n }\n function baseOnInput(e) {\n onChangeHandler(e, validateOnInput);\n if (isCallable(ctx.attrs.onInput)) {\n ctx.attrs.onInput(e);\n }\n }\n function baseOnChange(e) {\n onChangeHandler(e, validateOnChange);\n if (isCallable(ctx.attrs.onChange)) {\n ctx.attrs.onChange(e);\n }\n }\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 return attrs;\n });\n const fieldProps = computed(() => {\n const attrs = Object.assign({}, sharedProps.value);\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 const componentProps = computed(() => {\n return Object.assign(Object.assign({}, sharedProps.value), { modelValue: value.value });\n });\n function slotProps() {\n return {\n field: fieldProps.value,\n componentField: componentProps.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: e => onChangeHandler(e, false),\n handleReset,\n handleBlur: sharedProps.value.onBlur,\n setTouched,\n setErrors,\n setValue,\n };\n }\n ctx.expose({\n value,\n meta,\n errors,\n errorMessage,\n setErrors,\n setTouched,\n setValue,\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;\nconst PRIVATE_PATH_STATE_KEYS = ['bails', 'fieldsCount', 'id', 'multiple', 'type', 'validate'];\nfunction resolveInitialValues(opts) {\n const givenInitial = (opts === null || opts === void 0 ? void 0 : opts.initialValues) || {};\n const providedValues = Object.assign({}, toValue(givenInitial));\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 name = (opts === null || opts === void 0 ? void 0 : opts.name) || 'Form';\n // Prevents fields from double resetting their values, which causes checkboxes to toggle their initial value\n let FIELD_ID_COUNTER = 0;\n // If the form is currently submitting\n const isSubmitting = ref(false);\n // If the form is currently validating\n const isValidating = 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 const pathStates = ref([]);\n const extraErrorsBag = ref({});\n const pathStateLookup = ref({});\n const rebuildPathLookup = debounceNextTick(() => {\n pathStateLookup.value = pathStates.value.reduce((names, state) => {\n names[normalizeFormPath(toValue(state.path))] = state;\n return names;\n }, {});\n });\n /**\n * Manually sets an error message on a specific field\n */\n function setFieldError(field, message) {\n const state = findPathState(field);\n if (!state) {\n if (typeof field === 'string') {\n extraErrorsBag.value[normalizeFormPath(field)] = normalizeErrorItem(message);\n }\n return;\n }\n // Move the error from the extras path if exists\n if (typeof field === 'string') {\n const normalizedPath = normalizeFormPath(field);\n if (extraErrorsBag.value[normalizedPath]) {\n delete extraErrorsBag.value[normalizedPath];\n }\n }\n state.errors = normalizeErrorItem(message);\n state.valid = !state.errors.length;\n }\n /**\n * Sets errors for the fields specified in the object\n */\n function setErrors(paths) {\n keysOf(paths).forEach(path => {\n setFieldError(path, paths[path]);\n });\n }\n if (opts === null || opts === void 0 ? void 0 : opts.initialErrors) {\n setErrors(opts.initialErrors);\n }\n const errorBag = computed(() => {\n const pathErrors = pathStates.value.reduce((acc, state) => {\n if (state.errors.length) {\n acc[toValue(state.path)] = state.errors;\n }\n return acc;\n }, {});\n return Object.assign(Object.assign({}, extraErrorsBag.value), pathErrors);\n });\n // Gets the first error of each field\n const errors = computed(() => {\n return keysOf(errorBag.value).reduce((acc, key) => {\n const errors = errorBag.value[key];\n if (errors === null || errors === void 0 ? void 0 : errors.length) {\n acc[key] = errors[0];\n }\n return acc;\n }, {});\n });\n /**\n * Holds a computed reference to all fields names and labels\n */\n const fieldNames = computed(() => {\n return pathStates.value.reduce((names, state) => {\n names[toValue(state.path)] = { name: toValue(state.path) || '', label: state.label || '' };\n return names;\n }, {});\n });\n const fieldBailsMap = computed(() => {\n return pathStates.value.reduce((map, state) => {\n var _a;\n map[toValue(state.path)] = (_a = state.bails) !== null && _a !== void 0 ? _a : true;\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(pathStates, formValues, opts);\n // form meta aggregations\n const meta = useFormMeta(pathStates, formValues, originalInitialValues, errors);\n const controlledValues = computed(() => {\n return pathStates.value.reduce((acc, state) => {\n const value = getFromPath(formValues, toValue(state.path));\n setInPath(acc, toValue(state.path), value);\n return acc;\n }, {});\n });\n const schema = opts === null || opts === void 0 ? void 0 : opts.validationSchema;\n function createPathState(path, config) {\n var _a, _b;\n const initialValue = computed(() => getFromPath(initialValues.value, toValue(path)));\n const pathStateExists = pathStateLookup.value[toValue(path)];\n const isCheckboxOrRadio = (config === null || config === void 0 ? void 0 : config.type) === 'checkbox' || (config === null || config === void 0 ? void 0 : config.type) === 'radio';\n if (pathStateExists && isCheckboxOrRadio) {\n pathStateExists.multiple = true;\n const id = FIELD_ID_COUNTER++;\n if (Array.isArray(pathStateExists.id)) {\n pathStateExists.id.push(id);\n }\n else {\n pathStateExists.id = [pathStateExists.id, id];\n }\n pathStateExists.fieldsCount++;\n pathStateExists.__flags.pendingUnmount[id] = false;\n return pathStateExists;\n }\n const currentValue = computed(() => getFromPath(formValues, toValue(path)));\n const pathValue = toValue(path);\n const unsetBatchIndex = UNSET_BATCH.findIndex(_path => _path === pathValue);\n if (unsetBatchIndex !== -1) {\n UNSET_BATCH.splice(unsetBatchIndex, 1);\n }\n const isRequired = computed(() => {\n var _a, _b, _c, _d;\n const schemaValue = toValue(schema);\n if (isTypedSchema(schemaValue)) {\n return (_b = (_a = schemaValue.describe) === null || _a === void 0 ? void 0 : _a.call(schemaValue, toValue(path)).required) !== null && _b !== void 0 ? _b : false;\n }\n // Path own schema\n const configSchemaValue = toValue(config === null || config === void 0 ? void 0 : config.schema);\n if (isTypedSchema(configSchemaValue)) {\n return (_d = (_c = configSchemaValue.describe) === null || _c === void 0 ? void 0 : _c.call(configSchemaValue).required) !== null && _d !== void 0 ? _d : false;\n }\n return false;\n });\n const id = FIELD_ID_COUNTER++;\n const state = reactive({\n id,\n path,\n touched: false,\n pending: false,\n valid: true,\n validated: !!((_a = initialErrors[pathValue]) === null || _a === void 0 ? void 0 : _a.length),\n required: isRequired,\n initialValue,\n errors: shallowRef([]),\n bails: (_b = config === null || config === void 0 ? void 0 : config.bails) !== null && _b !== void 0 ? _b : false,\n label: config === null || config === void 0 ? void 0 : config.label,\n type: (config === null || config === void 0 ? void 0 : config.type) || 'default',\n value: currentValue,\n multiple: false,\n __flags: {\n pendingUnmount: { [id]: false },\n pendingReset: false,\n },\n fieldsCount: 1,\n validate: config === null || config === void 0 ? void 0 : config.validate,\n dirty: computed(() => {\n return !isEqual(unref(currentValue), unref(initialValue));\n }),\n });\n pathStates.value.push(state);\n pathStateLookup.value[pathValue] = state;\n rebuildPathLookup();\n if (errors.value[pathValue] && !initialErrors[pathValue]) {\n nextTick(() => {\n validateField(pathValue, { mode: 'silent' });\n });\n }\n // Handles when a path changes\n if (isRef(path)) {\n watch(path, newPath => {\n rebuildPathLookup();\n const nextValue = klona(currentValue.value);\n pathStateLookup.value[newPath] = state;\n nextTick(() => {\n setInPath(formValues, newPath, nextValue);\n });\n });\n }\n return state;\n }\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'\n ? debouncedSilentValidation()\n : debouncedValidation()));\n }, (formResult, [mode]) => {\n // fields by id lookup\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 key map of all the fields\n const paths = [\n ...new Set([...keysOf(formResult.results), ...pathStates.value.map(p => p.path), ...currentErrorsPaths]),\n ].sort();\n // aggregates the paths into a single result object while applying the results on the fields\n const results = paths.reduce((validation, _path) => {\n var _a;\n const expectedPath = _path;\n const pathState = findPathState(expectedPath) || findHoistedPath(expectedPath);\n const messages = ((_a = formResult.results[expectedPath]) === null || _a === void 0 ? void 0 : _a.errors) || [];\n // This is the real path of the field, because it might've been a hoisted field\n const path = (toValue(pathState === null || pathState === void 0 ? void 0 : pathState.path) || expectedPath);\n // It is possible that multiple paths are collected across loops\n // We want to merge them to avoid overriding any iteration's results\n const fieldResult = mergeValidationResults({ errors: messages, valid: !messages.length }, validation.results[path]);\n validation.results[path] = fieldResult;\n if (!fieldResult.valid) {\n validation.errors[path] = fieldResult.errors[0];\n }\n // clean up extra errors if path state exists\n if (pathState && extraErrorsBag.value[path]) {\n delete extraErrorsBag.value[path];\n }\n // field not rendered\n if (!pathState) {\n setFieldError(path, messages);\n return validation;\n }\n // always update the valid flag regardless of the mode\n pathState.valid = fieldResult.valid;\n if (mode === 'silent') {\n return validation;\n }\n if (mode === 'validated-only' && !pathState.validated) {\n return validation;\n }\n setFieldError(pathState, fieldResult.errors);\n return validation;\n }, {\n valid: formResult.valid,\n results: {},\n errors: {},\n source: formResult.source,\n });\n if (formResult.values) {\n results.values = formResult.values;\n results.source = formResult.source;\n }\n keysOf(results.results).forEach(path => {\n var _a;\n const pathState = findPathState(path);\n if (!pathState) {\n return;\n }\n if (mode === 'silent') {\n return;\n }\n if (mode === 'validated-only' && !pathState.validated) {\n return;\n }\n setFieldError(pathState, (_a = results.results[path]) === null || _a === void 0 ? void 0 : _a.errors);\n });\n return results;\n });\n function mutateAllPathState(mutation) {\n pathStates.value.forEach(mutation);\n }\n function findPathState(path) {\n const normalizedPath = typeof path === 'string' ? normalizeFormPath(path) : path;\n const pathState = typeof normalizedPath === 'string' ? pathStateLookup.value[normalizedPath] : normalizedPath;\n return pathState;\n }\n function findHoistedPath(path) {\n const candidates = pathStates.value.filter(state => path.startsWith(toValue(state.path)));\n return candidates.reduce((bestCandidate, candidate) => {\n if (!bestCandidate) {\n return candidate;\n }\n return (candidate.path.length > bestCandidate.path.length ? candidate : bestCandidate);\n }, undefined);\n }\n let UNSET_BATCH = [];\n let PENDING_UNSET;\n function unsetPathValue(path) {\n UNSET_BATCH.push(path);\n if (!PENDING_UNSET) {\n PENDING_UNSET = nextTick(() => {\n const sortedPaths = [...UNSET_BATCH].sort().reverse();\n sortedPaths.forEach(p => {\n unsetPath(formValues, p);\n });\n UNSET_BATCH = [];\n PENDING_UNSET = null;\n });\n }\n return PENDING_UNSET;\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 mutateAllPathState(s => (s.touched = true));\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 =\n result.source === 'schema'\n ? result.values\n : Object.assign({}, 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 function removePathState(path, id) {\n const idx = pathStates.value.findIndex(s => {\n return s.path === path && (Array.isArray(s.id) ? s.id.includes(id) : s.id === id);\n });\n const pathState = pathStates.value[idx];\n if (idx === -1 || !pathState) {\n return;\n }\n nextTick(() => {\n validateField(path, { mode: 'silent', warn: false });\n });\n if (pathState.multiple && pathState.fieldsCount) {\n pathState.fieldsCount--;\n }\n if (Array.isArray(pathState.id)) {\n const idIndex = pathState.id.indexOf(id);\n if (idIndex >= 0) {\n pathState.id.splice(idIndex, 1);\n }\n delete pathState.__flags.pendingUnmount[id];\n }\n if (!pathState.multiple || pathState.fieldsCount <= 0) {\n pathStates.value.splice(idx, 1);\n unsetInitialValue(path);\n rebuildPathLookup();\n delete pathStateLookup.value[path];\n }\n }\n function destroyPath(path) {\n keysOf(pathStateLookup.value).forEach(key => {\n if (key.startsWith(path)) {\n delete pathStateLookup.value[key];\n }\n });\n pathStates.value = pathStates.value.filter(s => !s.path.startsWith(path));\n nextTick(() => {\n rebuildPathLookup();\n });\n }\n const formCtx = {\n name,\n formId,\n values: formValues,\n controlledValues,\n errorBag,\n errors,\n schema,\n submitCount,\n meta,\n isSubmitting,\n isValidating,\n fieldArrays,\n keepValuesOnUnmount,\n validateSchema: unref(schema) ? validateSchema : undefined,\n validate,\n setFieldError,\n validateField,\n setFieldValue,\n setValues,\n setErrors,\n setFieldTouched,\n setTouched,\n resetForm,\n resetField,\n handleSubmit,\n useFieldModel,\n defineInputBinds,\n defineComponentBinds: defineComponentBinds,\n defineField,\n stageInitialValue,\n unsetInitialValue,\n setFieldInitialValue,\n createPathState,\n getPathState: findPathState,\n unsetPathValue,\n removePathState,\n initialValues: initialValues,\n getAllPathStates: () => pathStates.value,\n destroyPath,\n isFieldTouched,\n isFieldDirty,\n isFieldValid,\n };\n /**\n * Sets a single field value\n */\n function setFieldValue(field, value, shouldValidate = true) {\n const clonedValue = klona(value);\n const path = typeof field === 'string' ? field : field.path;\n const pathState = findPathState(path);\n if (!pathState) {\n createPathState(path);\n }\n setInPath(formValues, path, clonedValue);\n if (shouldValidate) {\n validateField(path);\n }\n }\n function forceSetValues(fields, shouldValidate = true) {\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], false);\n });\n if (shouldValidate) {\n validate();\n }\n }\n /**\n * Sets multiple fields values\n */\n function setValues(fields, shouldValidate = true) {\n merge(formValues, fields);\n // regenerate the arrays when the form values change\n fieldArrays.forEach(f => f && f.reset());\n if (shouldValidate) {\n validate();\n }\n }\n function createModel(path, shouldValidate) {\n const pathState = findPathState(toValue(path)) || createPathState(path);\n return computed({\n get() {\n return pathState.value;\n },\n set(value) {\n var _a;\n const pathValue = toValue(path);\n setFieldValue(pathValue, value, (_a = toValue(shouldValidate)) !== null && _a !== void 0 ? _a : false);\n },\n });\n }\n /**\n * Sets the touched meta state on a field\n */\n function setFieldTouched(field, isTouched) {\n const pathState = findPathState(field);\n if (pathState) {\n pathState.touched = isTouched;\n }\n }\n function isFieldTouched(field) {\n const pathState = findPathState(field);\n if (pathState) {\n return pathState.touched;\n }\n // Find all nested paths and consider their touched state\n return pathStates.value.filter(s => s.path.startsWith(field)).some(s => s.touched);\n }\n function isFieldDirty(field) {\n const pathState = findPathState(field);\n if (pathState) {\n return pathState.dirty;\n }\n return pathStates.value.filter(s => s.path.startsWith(field)).some(s => s.dirty);\n }\n function isFieldValid(field) {\n const pathState = findPathState(field);\n if (pathState) {\n return pathState.valid;\n }\n return pathStates.value.filter(s => s.path.startsWith(field)).every(s => s.valid);\n }\n /**\n * Sets the touched meta state on multiple fields\n */\n function setTouched(fields) {\n if (typeof fields === 'boolean') {\n mutateAllPathState(state => {\n state.touched = fields;\n });\n return;\n }\n keysOf(fields).forEach(field => {\n setFieldTouched(field, !!fields[field]);\n });\n }\n function resetField(field, state) {\n var _a;\n const newValue = state && 'value' in state ? state.value : getFromPath(initialValues.value, field);\n const pathState = findPathState(field);\n if (pathState) {\n pathState.__flags.pendingReset = true;\n }\n setFieldInitialValue(field, klona(newValue), true);\n setFieldValue(field, newValue, false);\n setFieldTouched(field, (_a = state === null || state === void 0 ? void 0 : state.touched) !== null && _a !== void 0 ? _a : false);\n setFieldError(field, (state === null || state === void 0 ? void 0 : state.errors) || []);\n nextTick(() => {\n if (pathState) {\n pathState.__flags.pendingReset = false;\n }\n });\n }\n /**\n * Resets all fields\n */\n function resetForm(resetState, opts) {\n let newValues = klona((resetState === null || resetState === void 0 ? void 0 : resetState.values) ? resetState.values : originalInitialValues.value);\n newValues = (opts === null || opts === void 0 ? void 0 : opts.force) ? newValues : merge(originalInitialValues.value, newValues);\n newValues = isTypedSchema(schema) && isCallable(schema.cast) ? schema.cast(newValues) : newValues;\n setInitialValues(newValues, { force: opts === null || opts === void 0 ? void 0 : opts.force });\n mutateAllPathState(state => {\n var _a;\n state.__flags.pendingReset = true;\n state.validated = false;\n state.touched = ((_a = resetState === null || resetState === void 0 ? void 0 : resetState.touched) === null || _a === void 0 ? void 0 : _a[toValue(state.path)]) || false;\n setFieldValue(toValue(state.path), getFromPath(newValues, toValue(state.path)), false);\n setFieldError(toValue(state.path), undefined);\n });\n (opts === null || opts === void 0 ? void 0 : opts.force) ? forceSetValues(newValues, false) : setValues(newValues, false);\n setErrors((resetState === null || resetState === void 0 ? void 0 : resetState.errors) || {});\n submitCount.value = (resetState === null || resetState === void 0 ? void 0 : resetState.submitCount) || 0;\n nextTick(() => {\n validate({ mode: 'silent' });\n mutateAllPathState(state => {\n state.__flags.pendingReset = false;\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 mutateAllPathState(f => (f.validated = true));\n }\n if (formCtx.validateSchema) {\n return formCtx.validateSchema(mode);\n }\n isValidating.value = true;\n // No schema, each field is responsible to validate itself\n const validations = await Promise.all(pathStates.value.map(state => {\n if (!state.validate) {\n return Promise.resolve({\n key: toValue(state.path),\n valid: true,\n errors: [],\n value: undefined,\n });\n }\n return state.validate(opts).then(result => {\n return {\n key: toValue(state.path),\n valid: result.valid,\n errors: result.errors,\n value: result.value,\n };\n });\n }));\n isValidating.value = false;\n const results = {};\n const errors = {};\n const values = {};\n for (const validation of validations) {\n results[validation.key] = {\n valid: validation.valid,\n errors: validation.errors,\n };\n if (validation.value) {\n setInPath(values, validation.key, validation.value);\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 values,\n source: 'fields',\n };\n }\n async function validateField(path, opts) {\n var _a;\n const state = findPathState(path);\n if (state && (opts === null || opts === void 0 ? void 0 : opts.mode) !== 'silent') {\n state.validated = true;\n }\n if (schema) {\n const { results } = await validateSchema((opts === null || opts === void 0 ? void 0 : opts.mode) || 'validated-only');\n return results[path] || { errors: [], valid: true };\n }\n if (state === null || state === void 0 ? void 0 : state.validate) {\n return state.validate(opts);\n }\n const shouldWarn = !state && ((_a = opts === null || opts === void 0 ? void 0 : opts.warn) !== null && _a !== void 0 ? _a : true);\n if (shouldWarn) {\n if ((process.env.NODE_ENV !== 'production')) {\n warn$1(`field with path ${path} was not found`);\n }\n }\n return Promise.resolve({ errors: [], valid: true });\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 setFieldInitialValue(path, value);\n setInPath(formValues, 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, updateOriginal = false) {\n setInPath(initialValues.value, path, klona(value));\n if (updateOriginal) {\n setInPath(originalInitialValues.value, path, klona(value));\n }\n }\n async function _validateSchema() {\n const schemaValue = unref(schema);\n if (!schemaValue) {\n return { valid: true, results: {}, errors: {}, source: 'none' };\n }\n isValidating.value = true;\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 isValidating.value = false;\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, isValidating: isValidating.value, submitCount: submitCount.value })), refreshInspector, {\n deep: true,\n });\n }\n function defineField(path, config) {\n const label = isCallable(config) ? undefined : config === null || config === void 0 ? void 0 : config.label;\n const pathState = (findPathState(toValue(path)) || createPathState(path, { label }));\n const evalConfig = () => (isCallable(config) ? config(omit(pathState, PRIVATE_PATH_STATE_KEYS)) : config || {});\n function onBlur() {\n var _a;\n pathState.touched = true;\n const validateOnBlur = (_a = evalConfig().validateOnBlur) !== null && _a !== void 0 ? _a : getConfig().validateOnBlur;\n if (validateOnBlur) {\n validateField(toValue(pathState.path));\n }\n }\n function onInput() {\n var _a;\n const validateOnInput = (_a = evalConfig().validateOnInput) !== null && _a !== void 0 ? _a : getConfig().validateOnInput;\n if (validateOnInput) {\n nextTick(() => {\n validateField(toValue(pathState.path));\n });\n }\n }\n function onChange() {\n var _a;\n const validateOnChange = (_a = evalConfig().validateOnChange) !== null && _a !== void 0 ? _a : getConfig().validateOnChange;\n if (validateOnChange) {\n nextTick(() => {\n validateField(toValue(pathState.path));\n });\n }\n }\n const props = computed(() => {\n const base = {\n onChange,\n onInput,\n onBlur,\n };\n if (isCallable(config)) {\n return Object.assign(Object.assign({}, base), (config(omit(pathState, PRIVATE_PATH_STATE_KEYS)).props || {}));\n }\n if (config === null || config === void 0 ? void 0 : config.props) {\n return Object.assign(Object.assign({}, base), config.props(omit(pathState, PRIVATE_PATH_STATE_KEYS)));\n }\n return base;\n });\n const model = createModel(path, () => { var _a, _b, _c; return (_c = (_a = evalConfig().validateOnModelUpdate) !== null && _a !== void 0 ? _a : (_b = getConfig()) === null || _b === void 0 ? void 0 : _b.validateOnModelUpdate) !== null && _c !== void 0 ? _c : true; });\n return [model, props];\n }\n function useFieldModel(pathOrPaths) {\n if (!Array.isArray(pathOrPaths)) {\n return createModel(pathOrPaths);\n }\n return pathOrPaths.map(p => createModel(p, true));\n }\n /**\n * @deprecated use defineField instead\n */\n function defineInputBinds(path, config) {\n const [model, props] = defineField(path, config);\n function onBlur() {\n props.value.onBlur();\n }\n function onInput(e) {\n const value = normalizeEventValue(e);\n setFieldValue(toValue(path), value, false);\n props.value.onInput();\n }\n function onChange(e) {\n const value = normalizeEventValue(e);\n setFieldValue(toValue(path), value, false);\n props.value.onChange();\n }\n return computed(() => {\n return Object.assign(Object.assign({}, props.value), { onBlur,\n onInput,\n onChange, value: model.value });\n });\n }\n /**\n * @deprecated use defineField instead\n */\n function defineComponentBinds(path, config) {\n const [model, props] = defineField(path, config);\n const pathState = findPathState(toValue(path));\n function onUpdateModelValue(value) {\n model.value = value;\n }\n return computed(() => {\n const conf = isCallable(config) ? config(omit(pathState, PRIVATE_PATH_STATE_KEYS)) : config || {};\n return Object.assign({ [conf.model || 'modelValue']: model.value, [`onUpdate:${conf.model || 'modelValue'}`]: onUpdateModelValue }, props.value);\n });\n }\n const ctx = Object.assign(Object.assign({}, formCtx), { values: readonly(formValues), handleReset: () => resetForm(), submitForm });\n provide(PublicFormContextKey, ctx);\n return ctx;\n}\n/**\n * Manages form meta aggregation\n */\nfunction useFormMeta(pathsState, 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 states = pathsState.value;\n return keysOf(MERGE_STRATEGIES).reduce((acc, flag) => {\n const mergeMethod = MERGE_STRATEGIES[flag];\n acc[flag] = states[mergeMethod](s => s[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(pathsState, formValues, opts) {\n const values = resolveInitialValues(opts);\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, opts) {\n if (opts === null || opts === void 0 ? void 0 : opts.force) {\n initialValues.value = klona(values);\n originalInitialValues.value = klona(values);\n }\n else {\n initialValues.value = merge(klona(initialValues.value) || {}, klona(values));\n originalInitialValues.value = merge(klona(originalInitialValues.value) || {}, klona(values));\n }\n if (!(opts === null || opts === void 0 ? void 0 : opts.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 pathsState.value.forEach(state => {\n const wasTouched = state.touched;\n if (wasTouched) {\n return;\n }\n const newValue = getFromPath(initialValues.value, toValue(state.path));\n setInPath(formValues, toValue(state.path), klona(newValue));\n });\n }\n return {\n initialValues,\n originalInitialValues,\n setInitialValues,\n };\n}\nfunction mergeValidationResults(a, b) {\n if (!b) {\n return a;\n }\n return {\n valid: a.valid && b.valid,\n errors: [...a.errors, ...b.errors],\n };\n}\nfunction useFormContext() {\n return inject(PublicFormContextKey);\n}\n\nconst FormImpl = /** #__PURE__ */ defineComponent({\n name: 'Form',\n inheritAttrs: false,\n props: {\n as: {\n type: null,\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 name: {\n type: String,\n default: 'Form',\n },\n },\n setup(props, ctx) {\n const validationSchema = toRef(props, 'validationSchema');\n const keepValues = toRef(props, 'keepValues');\n const { errors, errorBag, values, meta, isSubmitting, isValidating, submitCount, controlledValues, validate, validateField, handleReset, resetForm, handleSubmit, setErrors, setFieldError, setFieldValue, setValues, setFieldTouched, setTouched, resetField, } = useForm({\n validationSchema: validationSchema.value ? validationSchema : undefined,\n initialValues: props.initialValues,\n initialErrors: props.initialErrors,\n initialTouched: props.initialTouched,\n validateOnMount: props.validateOnMount,\n keepValuesOnUnmount: keepValues,\n name: props.name,\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 isValidating: isValidating.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 values,\n meta,\n errors,\n });\n return function renderForm() {\n // avoid resolving the form component as itself\n const tag = props.as === 'form' ? props.as : !props.as ? null : resolveDynamicComponent(props.as);\n const children = normalizeChildren(tag, ctx, slotProps);\n if (!tag) {\n return children;\n }\n // Attributes to add on a native `form` tag\n const formAttrs = tag === '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 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 if ((process.env.NODE_ENV !== 'production')) {\n warn('FieldArray requires being a child of `
` or `useForm` being called before it. Array fields may not work correctly');\n }\n return noOpApi;\n }\n if (!unref(arrayPath)) {\n if ((process.env.NODE_ENV !== 'production')) {\n warn('FieldArray requires a field path to be provided, did you forget to pass the `name` prop?');\n }\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, toValue(arrayPath), []) || [];\n }\n function initFields() {\n const currentValues = getCurrentValues();\n if (!Array.isArray(currentValues)) {\n return;\n }\n fields.value = currentValues.map((v, idx) => createEntry(v, idx, fields.value));\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, idx, currentFields) {\n // Skips the work by returning the current entry if it already exists\n // This should make the `key` prop stable and doesn't cause more re-renders than needed\n // The value is computed and should update anyways\n if (currentFields && !isNullOrUndefined(idx) && currentFields[idx]) {\n return currentFields[idx];\n }\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, toValue(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 if ((process.env.NODE_ENV !== 'production')) {\n warn(`Attempting to update a non-existent array item`);\n }\n return;\n }\n update(idx, value);\n },\n }), // will be auto unwrapped\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 = toValue(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 const fieldPath = pathName + `[${idx}]`;\n form.destroyPath(fieldPath);\n form.unsetInitialValue(fieldPath);\n setInPath(form.values, pathName, newValue);\n fields.value.splice(idx, 1);\n afterMutation();\n }\n function push(initialValue) {\n const value = klona(initialValue);\n const pathName = toValue(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.stageInitialValue(pathName + `[${newValue.length - 1}]`, value);\n setInPath(form.values, pathName, newValue);\n fields.value.push(createEntry(value));\n afterMutation();\n }\n function swap(indexA, indexB) {\n const pathName = toValue(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 setInPath(form.values, pathName, newValue);\n fields.value = newFields;\n updateEntryFlags();\n }\n function insert(idx, initialValue) {\n const value = klona(initialValue);\n const pathName = toValue(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 setInPath(form.values, pathName, newValue);\n fields.value = newFields;\n afterMutation();\n }\n function replace(arr) {\n const pathName = toValue(arrayPath);\n form.stageInitialValue(pathName, arr);\n setInPath(form.values, pathName, arr);\n initFields();\n afterMutation();\n }\n function update(idx, value) {\n const pathName = toValue(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 setInPath(form.values, `${pathName}[${idx}]`, value);\n form === null || form === void 0 ? void 0 : form.validate({ mode: 'validated-only' });\n }\n function prepend(initialValue) {\n const value = klona(initialValue);\n const pathName = toValue(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 setInPath(form.values, pathName, newValue);\n form.stageInitialValue(pathName + `[0]`, value);\n fields.value.unshift(createEntry(value));\n afterMutation();\n }\n function move(oldIdx, newIdx) {\n const pathName = toValue(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 setInPath(form.values, 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 => toValue(i.path) === toValue(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 = /** #__PURE__ */ 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(() => 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 = /** #__PURE__ */ 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 if ((process.env.NODE_ENV !== 'production')) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n }\n return function resetForm(state, opts) {\n if (!form) {\n return;\n }\n return form.resetForm(state, opts);\n };\n}\n\n/**\n * If a field is dirty or not\n */\nfunction useIsFieldDirty(path) {\n const fieldOrPath = resolveFieldOrPathState(path);\n return computed(() => {\n var _a, _b;\n if (!fieldOrPath) {\n return false;\n }\n return (_b = ('meta' in fieldOrPath ? fieldOrPath.meta.dirty : (_a = fieldOrPath === null || fieldOrPath === void 0 ? void 0 : fieldOrPath.value) === null || _a === void 0 ? void 0 : _a.dirty)) !== null && _b !== void 0 ? _b : false;\n });\n}\n\n/**\n * If a field is touched or not\n */\nfunction useIsFieldTouched(path) {\n const fieldOrPath = resolveFieldOrPathState(path);\n return computed(() => {\n var _a, _b;\n if (!fieldOrPath) {\n return false;\n }\n return (_b = ('meta' in fieldOrPath ? fieldOrPath.meta.touched : (_a = fieldOrPath === null || fieldOrPath === void 0 ? void 0 : fieldOrPath.value) === null || _a === void 0 ? void 0 : _a.touched)) !== null && _b !== void 0 ? _b : false;\n });\n}\n\n/**\n * If a field is validated and is valid\n */\nfunction useIsFieldValid(path) {\n const fieldOrPath = resolveFieldOrPathState(path);\n return computed(() => {\n var _a, _b;\n if (!fieldOrPath) {\n return false;\n }\n return (_b = ('meta' in fieldOrPath ? fieldOrPath.meta.valid : (_a = fieldOrPath === null || fieldOrPath === void 0 ? void 0 : fieldOrPath.value) === null || _a === void 0 ? void 0 : _a.valid)) !== null && _b !== void 0 ? _b : false;\n });\n}\n\n/**\n * If the form is submitting or not\n */\nfunction useIsSubmitting() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n if ((process.env.NODE_ENV !== 'production')) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\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 * If the form is validating or not\n */\nfunction useIsValidating() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n if ((process.env.NODE_ENV !== 'production')) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n }\n return computed(() => {\n var _a;\n return (_a = form === null || form === void 0 ? void 0 : form.isValidating.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 const field = path ? undefined : inject(FieldContextKey);\n return function validateField() {\n if (field) {\n return field.validate();\n }\n if (form && path) {\n return form === null || form === void 0 ? void 0 : form.validateField(toValue(path));\n }\n if ((process.env.NODE_ENV !== 'production')) {\n warn(`field with name ${unref(path)} was not found`);\n }\n return Promise.resolve({\n errors: [],\n valid: true,\n });\n };\n}\n\n/**\n * If the form is dirty or not\n */\nfunction useIsFormDirty() {\n const form = injectWithSelf(FormContextKey);\n if (!form) {\n if ((process.env.NODE_ENV !== 'production')) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\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 if ((process.env.NODE_ENV !== 'production')) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\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 if ((process.env.NODE_ENV !== 'production')) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\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 if ((process.env.NODE_ENV !== 'production')) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\n }\n return function validateField() {\n if (!form) {\n return Promise.resolve({ results: {}, errors: {}, valid: true, source: 'none' });\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 if ((process.env.NODE_ENV !== 'production')) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\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, toValue(path));\n }\n return toValue(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 if ((process.env.NODE_ENV !== 'production')) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\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 if ((process.env.NODE_ENV !== 'production')) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\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[toValue(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 if ((process.env.NODE_ENV !== 'production')) {\n warn('No vee-validate or `useForm` was detected in the component tree');\n }\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\n/**\n * Sets a field's error message\n */\nfunction useSetFieldError(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 function setFieldError(message) {\n if (path && form) {\n form.setFieldError(toValue(path), message);\n return;\n }\n if (field) {\n field.setErrors(message || []);\n return;\n }\n if ((process.env.NODE_ENV !== 'production')) {\n warn(`Could not set error message since there is no form context or a field named \"${toValue(path)}\", did you forget to call \"useField\" or \"useForm\"?`);\n }\n };\n}\n\n/**\n * Sets a field's touched meta state\n */\nfunction useSetFieldTouched(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 function setFieldTouched(touched) {\n if (path && form) {\n form.setFieldTouched(toValue(path), touched);\n return;\n }\n if (field) {\n field.setTouched(touched);\n return;\n }\n if ((process.env.NODE_ENV !== 'production')) {\n warn(`Could not set touched state since there is no form context or a field named \"${toValue(path)}\", did you forget to call \"useField\" or \"useForm\"?`);\n }\n };\n}\n\n/**\n * Sets a field's value\n */\nfunction useSetFieldValue(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 function setFieldValue(value, shouldValidate = true) {\n if (path && form) {\n form.setFieldValue(toValue(path), value, shouldValidate);\n return;\n }\n if (field) {\n field.setValue(value, shouldValidate);\n return;\n }\n if ((process.env.NODE_ENV !== 'production')) {\n warn(`Could not set value since there is no form context or a field named \"${toValue(path)}\", did you forget to call \"useField\" or \"useForm\"?`);\n }\n };\n}\n\n/**\n * Sets multiple fields errors\n */\nfunction useSetFormErrors() {\n const form = injectWithSelf(FormContextKey);\n function setFormErrors(fields) {\n if (form) {\n form.setErrors(fields);\n return;\n }\n if ((process.env.NODE_ENV !== 'production')) {\n warn(`Could not set errors because a form was not detected, did you forget to use \"useForm\" in a parent component?`);\n }\n }\n return setFormErrors;\n}\n\n/**\n * Sets multiple fields touched or all fields in the form\n */\nfunction useSetFormTouched() {\n const form = injectWithSelf(FormContextKey);\n function setFormTouched(fields) {\n if (form) {\n form.setTouched(fields);\n return;\n }\n if ((process.env.NODE_ENV !== 'production')) {\n warn(`Could not set touched state because a form was not detected, did you forget to use \"useForm\" in a parent component?`);\n }\n }\n return setFormTouched;\n}\n\n/**\n * Sets multiple fields values\n */\nfunction useSetFormValues() {\n const form = injectWithSelf(FormContextKey);\n function setFormValues(fields, shouldValidate = true) {\n if (form) {\n form.setValues(fields, shouldValidate);\n return;\n }\n if ((process.env.NODE_ENV !== 'production')) {\n warn(`Could not set form values because a form was not detected, did you forget to use \"useForm\" in a parent component?`);\n }\n }\n return setFormValues;\n}\n\nexport { ErrorMessage, Field, FieldArray, FieldContextKey, Form, FormContextKey, IS_ABSENT, PublicFormContextKey, cleanupNonNestedPath, configure, defineRule, isNotNestedPath, normalizeRules, useField, useFieldArray, useFieldError, useFieldValue, useForm, useFormContext, useFormErrors, useFormValues, useIsFieldDirty, useIsFieldTouched, useIsFieldValid, useIsFormDirty, useIsFormTouched, useIsFormValid, useIsSubmitting, useIsValidating, useResetForm, useSetFieldError, useSetFieldTouched, useSetFieldValue, useSetFormErrors, useSetFormTouched, useSetFormValues, useSubmitCount, useSubmitForm, useValidateField, useValidateForm, validate, validateObjectSchema as validateObject };\n","import {computed} from \"vue\";\nimport type {Ref} from \"vue\";\n\nimport {useField} from \"vee-validate\";\n\nexport function useFieldValidator(id: Ref) {\n const {\n value: model,\n errorMessage,\n meta,\n resetField,\n handleBlur,\n } = useField(id.value as string, {\n syncVModel: true,\n });\n\n const hasError = computed(() => {\n return !meta.valid && meta.dirty && meta.touched;\n });\n\n return {\n model,\n hasError,\n errorMessage,\n resetField,\n handleBlur,\n };\n}\n","\n\n\n\n\n","\n\n\n\n\n","import {ref} from \"vue\";\n\nimport type {NotificationType} from \"@songfinch/types\";\n\nimport {normalizeError} from \"@songfinch/utils/src/error\";\n\nconst notification = ref(null);\n\ntype RawNotificationType =\n | { text: string; error?: never; heading?: string }\n | { error: unknown; text?: never; heading?: string };\n\n\nexport function useNotification() {\n const normalizeNotification = (newNotification: RawNotificationType) => {\n // Type is inerpolated from if notification has error or not\n const notification: NotificationType = {\n type: \"success\",\n heading: newNotification.heading,\n text: newNotification.text || \"\",\n };\n\n if (newNotification.error) {\n notification.type = \"error\";\n notification.text = normalizeError(newNotification.error);\n }\n\n return notification;\n };\n\n const setNotification = (newNotification: RawNotificationType) => {\n notification.value = normalizeNotification(newNotification);\n\n setTimeout(() => {\n notification.value = null;\n }, 10000);\n };\n\n const clearNotification = () => {\n notification.value = null;\n };\n\n return {\n notification,\n setNotification,\n clearNotification,\n };\n}\n","\n\n\n","\n","\n\n\n\n\n","\r\n\r\n\r\n\r\n\r\n\r\n","\n\n\n\n\n","export const scrollLock = () => {\n if (!document?.body && document?.documentElement) return;\n document.body.classList.add(\"scroll-lock\");\n document.documentElement.classList.add(\"scroll-lock\");\n};\n\nexport const scrollUnlock = () => {\n if (!document?.body) return;\n document.body.classList.remove(\"scroll-lock\");\n document.documentElement.classList.remove(\"scroll-lock\");\n};\n\nexport const smoothScrollTo = (targetPosition: number, duration = 1000) => {\n const startPosition = window.scrollY;\n const distance = targetPosition - startPosition;\n let startTime: number | null = null;\n\n const animation = (currentTime: number) => {\n if (startTime === null) startTime = currentTime;\n const timeElapsed = currentTime - startTime;\n const progress = Math.min(timeElapsed / duration, 1);\n\n const easeInOutQuad = progress < 0.5 \n ? 2 * progress * progress \n : 1 - Math.pow(-2 * progress + 2, 2) / 2;\n\n window.scrollTo(0, startPosition + distance * easeInOutQuad);\n\n if (timeElapsed < duration) {\n requestAnimationFrame(animation);\n }\n };\n\n requestAnimationFrame(animation);\n};\n","import {inject, ref} from \"vue\";\n\nimport {scrollLock, scrollUnlock} from \"@songfinch/utils/src/dom\";\n\nimport type {InjectedModalTrackEvent} from \"@songfinch/types\";\n\ntype UseModalTrackingProperties =\n | {\n type: \"modal_opened\";\n payload?: { [k: string]: string };\n }\n | {\n type: \"video_opened\";\n payload: { video_title: string };\n };\n\ntype UseModalParams = { trackingProperties: UseModalTrackingProperties };\n\nexport function useModal({trackingProperties}: UseModalParams) {\n const modalOpenTrackEvent = inject(\"modalOpenTrackEvent\", null);\n\n const modalActive = ref(false);\n\n const openModal = (e?: MouseEvent) => {\n modalActive.value = true;\n scrollLock();\n\n // Don't do tracking if no event occures\n if (!e) return;\n\n if (modalOpenTrackEvent) {\n modalOpenTrackEvent(\n e,\n trackingProperties.type,\n trackingProperties.payload || {},\n );\n }\n };\n\n const closeModal = () => {\n modalActive.value = false;\n scrollUnlock();\n };\n\n return {\n modalActive,\n openModal,\n closeModal,\n };\n}\n","import type {NormalizedNavigationItemBase, User} from \"@songfinch/types\";\n\nexport const getAccountNav = (user?: User) => {\n const menuItems: NormalizedNavigationItemBase[] = [\n {\n title: \"My account\",\n slug: \"/dashboard/profile\",\n },\n {\n title: \"Orders\",\n slug: \"/dashboard/order-history\",\n },\n {\n title: \"Credit balance\",\n slug: \"/dashboard/credit-balance\",\n },\n {\n title: \"Referrals\",\n slug: \"/dashboard/referral-program\",\n },\n ];\n\n if (user?.role === \"admin\") { \n menuItems.unshift({\n title: \"Admin\",\n externalLink: \"/admin/stories\",\n skipVueRouting: true\n });\n }\n\n if (user?.role === \"artist\" && user.id) { \n menuItems.unshift({\n title: \"Artist Dashboard\",\n externalLink: \"/artist-admin\",\n skipVueRouting: true\n });\n }\n\n return {\n title: \"Account\",\n subNavItems: menuItems\n };\n\n};","import {ref} from \"vue\";\nimport type {SiteNavigationlogoType} from \"@songfinch/types/types\";\n\nconst logoType = ref(\"default\");\n\nexport function useSetNavigationLogo() {\n const setLogoType = (newLogoType: SiteNavigationlogoType) => {\n logoType.value = newLogoType;\n };\n\n return {\n logoType,\n setLogoType,\n };\n}\n","\n\n\n\n\n","\n\n","!function(t,s){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=s():\"function\"==typeof define&&define.amd?define(s):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_duration=s()}(this,(function(){\"use strict\";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,d=2628e6,a=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:d,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof g},f=function(t,s,n){return new g(t,n,s.$l)},m=function(t){return s.p(t)+\"s\"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},v=function(t,s){return t?l(t)?{negative:!0,format:\"\"+y(t)+s}:{negative:!1,format:\"\"+t+s}:{negative:!1,format:\"\"}},g=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*h[m(s)],this);if(\"number\"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if(\"object\"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if(\"string\"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*h[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/d),t%=d,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=v(this.$d.years,\"Y\"),s=v(this.$d.months,\"M\"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,\"D\"),e=v(this.$d.hours,\"H\"),r=v(this.$d.minutes,\"M\"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var u=v(o,\"S\"),d=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?\"T\":\"\",h=(d?\"-\":\"\")+\"P\"+t.format+s.format+i.format+a+e.format+r.format+u.format;return\"P\"===h||\"-P\"===h?\"P0D\":h},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||\"YYYY-MM-DDTHH:mm:ss\",i={Y:this.$d.years,YY:s.s(this.$d.years,2,\"0\"),YYYY:s.s(this.$d.years,4,\"0\"),M:this.$d.months,MM:s.s(this.$d.months,2,\"0\"),D:this.$d.days,DD:s.s(this.$d.days,2,\"0\"),H:this.$d.hours,HH:s.s(this.$d.hours,2,\"0\"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,\"0\"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,\"0\"),SSS:s.s(this.$d.milliseconds,3,\"0\")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/h[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return\"milliseconds\"===n?s%=1e3:s=\"weeks\"===n?$(s/h[n]):this.$d[n],s||0},y.add=function(t,s,n){var i;return i=s?t*h[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,\"ms\").locale(this.$l).fromNow(!s)},y.valueOf=function(){return this.asMilliseconds()},y.milliseconds=function(){return this.get(\"milliseconds\")},y.asMilliseconds=function(){return this.as(\"milliseconds\")},y.seconds=function(){return this.get(\"seconds\")},y.asSeconds=function(){return this.as(\"seconds\")},y.minutes=function(){return this.get(\"minutes\")},y.asMinutes=function(){return this.as(\"minutes\")},y.hours=function(){return this.get(\"hours\")},y.asHours=function(){return this.as(\"hours\")},y.days=function(){return this.get(\"days\")},y.asDays=function(){return this.as(\"days\")},y.weeks=function(){return this.get(\"weeks\")},y.asWeeks=function(){return this.as(\"weeks\")},y.months=function(){return this.get(\"months\")},y.asMonths=function(){return this.as(\"months\")},y.years=function(){return this.get(\"years\")},y.asYears=function(){return this.as(\"years\")},l}(),p=function(t,s,n){return t.add(s.years()*n,\"y\").add(s.months()*n,\"M\").add(s.days()*n,\"d\").add(s.hours()*n,\"h\").add(s.minutes()*n,\"m\").add(s.seconds()*n,\"s\").add(s.milliseconds()*n,\"ms\")};return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)?p(this,t,1):r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)?p(this,t,-1):o.bind(this)(t,s)}}}));","\n\n\n\n\n","!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isBetween=i()}(this,(function(){\"use strict\";return function(e,i,t){i.prototype.isBetween=function(e,i,s,f){var n=t(e),o=t(i),r=\"(\"===(f=f||\"()\")[0],u=\")\"===f[1];return(r?this.isAfter(n,s):!this.isBefore(n,s))&&(u?this.isBefore(o,s):!this.isAfter(o,s))||(r?this.isBefore(n,s):!this.isAfter(n,s))&&(u?this.isAfter(o,s):!this.isBefore(o,s))}}}));","import app from \"@songfinch/customer/app\";\n\nexport default function onPageLoaded(callback: T) {\n if (callback) {\n app.config.globalProperties.$bus.on(\"pageLoaded\", callback);\n }\n}\n","\n\n\n\n\n","/*!\n * pinia v3.0.1\n * (c) 2025 Eduardo San Martin Morote\n * @license MIT\n */\nimport { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope, ref, isRef, isReactive, getCurrentScope, onScopeDispose, getCurrentInstance, reactive, toRef, nextTick, computed, toRefs } from 'vue';\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/*\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 = 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) => {\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 // Expose pinia instance as $pinia to window\n globalThis.$pinia = pinia;\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 // Expose selected store as $store to window\n if (payload.nodeId !== PINIA_ROOT_ID)\n globalThis.$store = toRaw(inspectedStore);\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((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 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 // Do not overwrite actions mocked by @pinia/testing (#2298)\n if (!store._p._testing) {\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 }\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 pinia._a = app;\n app.provide(piniaSymbol, pinia);\n app.config.globalProperties.$pinia = pinia;\n /* istanbul ignore else */\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n registerPiniaDevtools(app, pinia);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n },\n use(plugin) {\n if (!this._a) {\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 ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT && typeof Proxy !== 'undefined') {\n pinia.use(devtoolsPlugin);\n }\n return pinia;\n}\n/**\n * Dispose a Pinia instance by stopping its effectScope and removing the state, plugins and stores. This is mostly\n * useful in tests, with both a testing pinia or a regular pinia and in applications that use multiple pinia instances.\n * Once disposed, the pinia instance cannot be used anymore.\n *\n * @param pinia - pinia instance\n */\nfunction disposePinia(pinia) {\n pinia._e.stop();\n pinia._s.clear();\n pinia._p.splice(0);\n pinia.state.value = {};\n // @ts-expect-error: non valid\n pinia._a = null;\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 newState[key] = subPatch;\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();\n/**\n * Marks a function as an action for `$onAction`\n * @internal\n */\nconst ACTION_MARKER = Symbol();\n/**\n * Action name symbol. Allows to add a name to an action after defining it\n * @internal\n */\nconst ACTION_NAME = Symbol();\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 else if (target instanceof Set && patchToApply instanceof Set) {\n // Handle Set instances\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();\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 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 !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 pinia.state.value[id] = state ? state() : {};\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 // @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 = { deep: true };\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\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 pinia.state.value[$id] = {};\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 // @ts-expect-error: FIXME: shouldn't error?\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 * Helper that wraps function so it can be tracked with $onAction\n * @param fn - action to wrap\n * @param name - name of the action\n */\n const action = (fn, name = '') => {\n if (ACTION_MARKER in fn) {\n fn[ACTION_NAME] = name;\n return fn;\n }\n const wrappedAction = 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: wrappedAction[ACTION_NAME],\n store,\n after,\n onError,\n });\n let ret;\n try {\n ret = fn.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 wrappedAction[ACTION_MARKER] = true;\n wrappedAction[ACTION_NAME] = name; // will be set later\n // @ts-expect-error: we are intentionally limiting the returned type to just Fn\n // because all the added properties are internals that are exposed through `$onAction()` only\n return wrappedAction;\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 const store = reactive((process.env.NODE_ENV !== 'production') || ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT)\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({ action }))));\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 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 pinia.state.value[$id][key] = prop;\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 const actionValue = (process.env.NODE_ENV !== 'production') && hot ? prop : action(prop, key);\n // this a hot module replacement store because the hotUpdate method needs\n // to do it with the right context\n // @ts-expect-error\n setupStore[key] = actionValue;\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 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 // 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 // @ts-expect-error: FIXME: shouldn't error?\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 // @ts-expect-error: any type\n 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 // @ts-expect-error: noop if doesn't exist\n delete 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 actionFn = newStore[actionName];\n // @ts-expect-error: actionName is a string\n store[actionName] =\n //\n action(actionFn, actionName);\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 // @ts-expect-error: getterName is a string\n store[getterName] =\n //\n getterValue;\n }\n // remove deleted getters\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[key];\n }\n });\n // remove old actions\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n // @ts-expect-error: noop if doesn't exist\n delete 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 ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\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 // apply all plugins\n pinia._p.forEach((extender) => {\n /* istanbul ignore else */\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n const extensions = scope.run(() => extender({\n store: 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: 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}\n// allows unused stores to be tree shaken\n/*! #__NO_SIDE_EFFECTS__ */\nfunction defineStore(\n// TODO: add proper types from above\nid, setup, setupOptions) {\n let options;\n const isSetupStore = typeof setup === 'function';\n // the option store setup will contain the actual options in this case\n options = isSetupStore ? setupOptions : setup;\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 // @ts-expect-error: FIXME: should work?\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 : // @ts-expect-error: FIXME: should work?\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 // @ts-expect-error: FIXME: should work?\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 // @ts-expect-error: FIXME: should work?\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 reduced[key] = {\n get() {\n return useStore(this.$pinia)[key];\n },\n set(value) {\n return (useStore(this.$pinia)[key] = value);\n },\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[keysOrMapper[key]];\n },\n set(value) {\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 const rawStore = toRaw(store);\n const refs = {};\n for (const key in rawStore) {\n const value = rawStore[key];\n // There is no native method to check for a computed\n // https://github.com/vuejs/core/pull/4165\n if (value.effect) {\n // @ts-expect-error: too hard to type correctly\n refs[key] =\n // ...\n computed({\n get: () => store[key],\n set(value) {\n store[key] = value;\n },\n });\n }\n else 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\nexport { MutationType, acceptHMRUpdate, createPinia, defineStore, disposePinia, getActivePinia, mapActions, mapGetters, mapState, mapStores, mapWritableState, setActivePinia, setMapStoreSuffix, shouldHydrate, skipHydrate, storeToRefs };\n","import axios from \"axios\";\nimport {SongBuilderPayloadType} from \"@songfinch/types\";\n\nexport async function createSongBuilder(payload: SongBuilderPayloadType): SongBuilderResponseType {\n const res = await axios.post(\"songbuilders\", payload);\n return res.data;\n}\n\nexport async function fetchSongBuilder(slug: string): SongBuilderResponseType {\n const res = await axios.get(\"songbuilders/\" + slug);\n return res.data;\n}\n\nexport async function fetchSongBuilderByEmail(email: string): SongBuilderResponseType {\n const res = await axios.get(\"songbuilders/by_email/\", {params: {email}});\n return res.data;\n}\n\nexport async function fetchSongBuilderByExternalId(external_user_id: string): SongBuilderResponseType {\n const res = await axios.get(\"songbuilders/by_external_user_id\", {params: {external_user_id}});\n return res.data;\n}\n\nexport async function updateSongBuilder(slug, payload: SongBuilderPayloadType): SongBuilderResponseType {\n const res = await axios.patch(\"songbuilders/\" + slug, payload);\n return res.data;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n computed,\n reactive,\n readonly,\n type DeepReadonly,\n type Reactive,\n type ComputedRef\n} from \"vue\";\nimport {useSongBuilderStore} from \"@songfinch/customer/store_v2/useSongBuilderStore\";\n\n\n//##################################\nexport interface ProgressNavItem {\n id: ComputedRef | string;\n allIds?: string[];\n stepIndex: number;\n isCompleted: ComputedRef | boolean;\n isOptional?: ComputedRef | boolean;\n isSkipped?: ComputedRef | boolean;\n}\n\nexport type ComputedProgressStats = ComputedRef<{\n total: number,\n valid: boolean\n}>\n\nexport interface SongBuilderProgress {\n sections: DeepReadonly>;\n progressStats: DeepReadonly;\n}\n\n//##################################\nconst storeSongBuilder = computed(() => useSongBuilderStore());\n\nconst sections = reactive([\n {\n id: \"BsOccasionRecipient\",\n isCompleted: computed(() => !!(storeSongBuilder.value.recipient && storeSongBuilder.value.relationship)),\n stepIndex: 1,\n },\n {\n id: \"BsSongArtist\",\n isCompleted: computed(() => storeSongBuilder.value.preferred_artist_switch !== undefined),\n stepIndex: 2,\n },\n {\n id: \"BsSongCharacteristics\",\n isSkipped: computed(() => storeSongBuilder.value.preferred_artist_switch === undefined),\n isCompleted: computed(() => !!(storeSongBuilder.value.genre && storeSongBuilder.value.gender && storeSongBuilder.value.moods?.length && storeSongBuilder.value.tempo)),\n stepIndex: 2,\n },\n {\n id: computed(() => {\n if (storeSongBuilder.value.selected_recommended_artist || storeSongBuilder.value.selected_artists?.length){\n return \"BsArtistConfirmation\";\n }\n return storeSongBuilder.value.preferred_artist_switch ? \"BsSongArtistSelection\" : \"BsSongArtistsList\";\n }),\n allIds: [\"BsArtistConfirmation\", \"BsSongArtistSelection\", \"BsSongArtistsList\"],\n isCompleted: computed(() => !!(\n storeSongBuilder.value.selected_recommended_artist ||\n storeSongBuilder.value.selected_artists?.length\n )),\n isSkipped: computed(() => {\n if (storeSongBuilder.value.preferred_artist_switch === undefined) {\n return true;\n }\n return !storeSongBuilder.value.preferred_artist_switch && !(storeSongBuilder.value.genre && storeSongBuilder.value.gender);\n }),\n stepIndex: 2,\n },\n {\n id: \"BsStoryDetailsCombined\",\n isCompleted: computed(() => storeSongBuilder.value.questions?.length === 2 && storeSongBuilder.value.questions.every((q: any) => q && q.answer && q.question)),\n stepIndex: 3,\n }\n]);\n\n\n//Progress Stats\nconst progressStats: ComputedProgressStats = computed(() => {\n let valid = true;\n const steps = new Set();\n sections.forEach(item => {\n steps.add(item.stepIndex);\n if (!item.isCompleted && !item.isOptional && !item.isSkipped) valid = false;\n });\n return {total: steps.size, valid};\n});\n\nexport const useSongBuilderProgress = (): SongBuilderProgress => {\n return {\n sections: readonly(sections),\n progressStats: readonly(progressStats)\n };\n};\n","// const Home = () => import(\"@songfinch/customer/views/pages/Home.vue\");\nconst Home2024 = () => import(\"@songfinch/customer/views/home/Home2024.vue\");\nconst ArtistCommunity = () => import(\"@songfinch/customer/views/pages/ArtistCommunity.vue\");\nconst SongRevisions = () => import(\"@songfinch/customer/views/pages/SongRevisions.vue\");\nconst PrivacyPolicy = () => import(\"@songfinch/customer/views/pages/PrivacyPolicy.vue\");\nconst Terms = () => import(\"@songfinch/customer/views/templates/Terms.vue\");\nconst EventReminder = () => import(\"@songfinch/customer/views/pages/EventReminder.vue\");\nconst Careers = () => import(\"@songfinch/customer/views/pages/Careers.vue\");\nconst ContactUs = () => import(\"@songfinch/customer/views/pages/ContactUs.vue\");\n// const WorryFree = () => import(\"@songfinch/customer/views/pages/WorryFree.vue\");\nconst HowItWorks = () => import(\"@songfinch/customer/views/pages/HowItWorks.vue\");\n\nexport default [\n {\n path: \"/\",\n name: \"Home\",\n component: Home2024,\n meta: {\n CMSData: \"homepage2024\",\n removeClearfix: true,\n baseTheme: \"dark\",\n },\n },\n {\n path: \"/artist-community\",\n name: \"ArtistCommunity\",\n component: ArtistCommunity,\n },\n {\n path: \"/song-revisions\",\n name: \"SongRevisions\",\n component: SongRevisions,\n },\n {\n path: \"/privacy\",\n name: \"PrivacyPolicy\",\n component: PrivacyPolicy,\n },\n {\n path: \"/terms\",\n name: \"Terms\",\n component: Terms,\n },\n {\n path: \"/event-reminder\",\n name: \"EventReminder\",\n component: EventReminder,\n },\n {\n path: \"/careers\",\n name: \"Careers\",\n component: Careers,\n },\n {\n path: \"/contact-us\",\n name: \"ContactUs\",\n component: ContactUs,\n },\n {\n path: \"/how-it-works\",\n name: \"HowItWorks\",\n component: HowItWorks,\n },\n];\n","//Meta for all and beforeEnter only for chidless routes\nconst setMetaToAllChildren = (route, meta, beforeEnter = null, index = 0) => {\n if (!index) window.sfLastChild = null;\n route.children.forEach((child, i) => {\n child.meta = {...meta, ...child.meta, index: index++};\n if (child.children?.length) {\n index = setMetaToAllChildren(child, meta, beforeEnter, index);\n } else {\n if (beforeEnter) {\n if (!Array.isArray(child.beforeEnter)) {\n child.beforeEnter = child.beforeEnter ? [child.beforeEnter] : [];\n }\n if (Array.isArray(beforeEnter)) {\n child.beforeEnter = child.beforeEnter.concat(beforeEnter);\n } else {\n child.beforeEnter.push(beforeEnter);\n }\n }\n child.meta.total_children = route.children.length;\n child.meta.child_index = i;\n if (window.sfLastChild) {\n child.meta.prevPage ??= window.sfLastChild.name;\n window.sfLastChild.meta.nextPage ??= child.name;\n }\n window.sfLastChild = child;\n }\n });\n if (!index) delete window.sfLastChild;\n return index;\n};\n\nfunction skipRouteToNext(to, from, skip) {\n if (skip) {\n const isPrevPage = (from.meta.index === undefined && to.index) || from.meta.index > to.meta.index;\n const nextPage = {name: isPrevPage ? to.meta.prevPage : to.meta.nextPage, params: to.params, query: to.query};\n return nextPage;\n }\n}\n\nexport {setMetaToAllChildren, skipRouteToNext};\n","import axios from \"axios\";\nimport {sortBy, map} from \"lodash-es\";\nimport modal from \"@songfinch/shared/plugins/modal/index\";\n\nexport default {\n namespaced: true,\n state: {\n geoData: null,\n isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),\n isIOS: (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream),\n isMobileResolution: false,\n cloudanoryWidgetSettings: {\n sources: [\n \"local\",\n \"url\",\n \"camera\"\n ],\n styles: {\n palette: {\n window: \"#FFFFFF\",\n windowBorder: \"#54524C\",\n tabIcon: \"#83817B\",\n menuIcons: \"#83817B\",\n textDark: \"#83817B\",\n textLight: \"#FFFFFF\",\n link: \"#F64D1C\",\n action: \"#F64D1C\",\n inactiveTabIcon: \"#A7A5A3\",\n error: \"#F64D1C\",\n inProgress: \"#F64D1C\",\n complete: \"#F64D1C\",\n sourceBg: \"#F3F1EB\",\n },\n fonts: {\n default: null,\n \"National-Book, sans-serif\": {\n url: \"https://content.songfinch.com/res/songfinch/raw/upload/fonts/National-Book.otf/1630661869\",\n active: true,\n },\n }\n }\n }\n },\n getters: {\n countriesOptions(state) {\n const temp = map(state.geoData?.countries, (v, k) => ({id: k, text: v}));\n return sortBy(temp, o => o.id === \"US\" ? \"A\" : o.text);\n },\n statesOptions: state => map(state.geoData?.states, (v, k) => ({id: k, text: v})),\n },\n mutations: {\n setResolutionsFlags(state) {\n state.isMobileResolution = window.innerWidth < 768;\n },\n clearLocalStorage() {\n localStorage.removeItem(\"sf_song_data\");\n localStorage.removeItem(\"sf_cart\");\n localStorage.removeItem(\"sf_fe_data_version\");\n localStorage.removeItem(\"sf_addresses\");\n },\n showModal(state, payload) {\n modal.sfModal(payload);\n },\n showSlideModal(state, payload) { //slide center-end for desktop and bottom for tablet and mobile\n payload.swalSettings = {\n ...payload.swalSettings,\n width: payload.swalSettings?.width ?? 775\n };\n payload.slide = \"center-end\";\n payload.responsive = {\n 1199: {\n swalSettings: {width: \"100%\"},\n slide: \"bottom\"\n },\n };\n this.commit(\"shared/showModal\", payload);\n },\n warningMsg(state, msg) {\n let settings = {\n icon: \"warning\",\n };\n if (typeof msg === \"object\") {\n settings = {...settings, ...msg};\n } else {\n settings.html = msg ? `
${msg}
` : \"Error!\";\n }\n modal.swal(settings);\n },\n setHasInteractedWithSongfinch() {\n localStorage.setItem(\"hasInteractedWithSongfinch\", \"true\");\n },\n },\n actions: {\n async confirmationModal(state, payload) {\n let settings = {\n width: 375,\n showCloseButton: false,\n showCancelButton: true,\n customClass: {\n container: \"small confirmation\",\n confirmButton: \"mkButton short noLoading\",\n cancelButton: \"mkButton short beige noLoading\",\n actions: \"@mb-8 @mt-0 @px-2 @flex @w-full @gap-4 @max-w-300 @flex-row-reverse\"\n },\n confirmButtonText: \"Yes, I'm sure!\",\n cancelButtonText: \"cancel\",\n };\n if (typeof payload === \"object\") {\n settings = {...settings, ...payload};\n } else {\n settings.html = \"
\" + payload + \"
\";\n }\n const res = await modal.swal(settings);\n return res.isConfirmed;\n },\n async loadGeoData({state}) {\n const res = await axios.get(\"/settings/geo_data\");\n delete (res.data.countries.COUNTRY_ISO_CODE);\n state.geoData = res.data;\n },\n\n }\n};\n","import axios from \"axios\";\nimport {logError} from \"@songfinch/utils/src/error\";\n\nconst CancelToken = axios.CancelToken;\nlet source;\n\nexport default {\n namespaced: true,\n state: {\n allCMSValues: null,\n pageData: null,\n navigation: null,\n footer: null,\n pagePrevGroup: null,\n },\n mutations: {\n initNavs(state) {\n const navs = window.appSettings.navs ?? [];\n Object.keys(navs).map(k => {\n const arrKeys = k.split(\".\");\n if ([\"footer\", \"navigation\"].includes(arrKeys[0])) {\n state[arrKeys[0]] ??= {};\n state[arrKeys[0]][arrKeys[1]] = navs[k];\n }\n });\n },\n setCMSData (state, {data, group}) {\n data = Object.keys(data).reduce((val, k) => {\n const arrKeys = k.split(\".\");\n if (group === arrKeys[0]) {\n state.pageData ??= {};\n state.pageData[arrKeys[1]] = data[k];\n switch (arrKeys[1]) {\n case \"seo_title\":\n document.title = data[k];\n break;\n }\n } else {\n val[arrKeys[0]] = {};\n val[arrKeys[0]][arrKeys[1]] = data[k];\n }\n return val;\n }, {});\n state.allCMSValues = data;\n }\n },\n actions: {\n async loadData({state, commit}, payload) {\n const currentPath = location.pathname;\n const group = payload?.group ? payload.group : currentPath;\n if (source) {\n source.cancel();\n }\n source = CancelToken.source();\n\n //Don't reset data for the same pages so we don't have blink on children or custom pages\n\n if (state.pagePrevGroup && state.pagePrevGroup !== group) {\n state.pageData = null;\n }\n state.pagePrevGroup = group;\n\n let data;\n try {\n data = await this.dispatch(\"core_cms/loadCMSData\", {\n queryParams: {group, current_path: currentPath},\n axiosParams: {\n cancelToken: source.token,\n cmsCall: true,\n ...payload?.axiosParams\n }\n });\n } catch (e) {\n if (!axios.isCancel(error)) {\n logError(e.message || \"failed to load CMS Data\");\n }\n return;\n }\n commit(\"setCMSData\", {data, group});\n return state.pageData;\n },\n async getFields({dispatch}, payload) {\n try {\n return await dispatch(\"core_cms/loadCMSData\", {\n queryParams: payload.queryParams,\n onlySlug: true,\n axiosParams: {\n cache: {\n ignoreCache: false\n },\n ...payload?.axiosParams\n }\n }, {root: true});\n } catch (error) {\n logError(error);\n }\n },\n async getField({dispatch}, query) {\n try {\n const fields = await dispatch(\"getFields\", {queryParams: query});\n return fields?.[query?.slug];\n } catch (error) {\n logError(error);\n }\n }\n }\n};\n","import store from \"@songfinch/customer/store\";\nimport router from \"@songfinch/customer/router\";\nimport type {BundledProduct, Product} from \"@songfinch/customer/types/product\";\nimport axios from \"axios\";\nimport modal from \"@songfinch/shared/plugins/modal\";\n\nexport function setProductForAdditionalInfo(mainProduct: Product, dontShowDetailModal = false) {\n // eslint no-async-promise-executor: off\n return new Promise(async (resolve) => {\n if (!mainProduct) return resolve(false);\n\n let component;\n let swalSettings;\n let submitted = false;\n\n const productsWithBunles: Array = [mainProduct];\n\n mainProduct.bundled_products?.forEach(bp => productsWithBunles.push(bp));\n\n for (const product: Product | BundledProduct of productsWithBunles) {\n const submittedProduct = await new Promise(resolve2 => {\n if (product.name === \"small-business-rights-upgrade\") {\n component = () => import(\"@songfinch/customer/components/store/SongRightsPopup.vue\");\n } else if (product.name === \"extra-verse\" && mainProduct.parent_story_id) {\n component = () => import(\"@songfinch/customer/components/store/ExtraVersePopup.vue\");\n } else if (product.name === \"customer-greeting\") {\n component = () => import(\"@songfinch/customer/components/store/CustomerGreetingPopup.vue\");\n swalSettings = {width: 573};\n } else if (product.extra_info?.has_image_uploader) {\n component = () => import(\"@songfinch/customer/components/store/ImageUploaderPopup2.vue\");\n swalSettings = {width: 1250};\n } else {\n return resolve2(product);\n }\n\n store.commit(\"shared/showSlideModal\", {\n component,\n props: {\n product\n },\n events: {\n submit: submittedModalProduct => {\n submitted = true;\n resolve2(submittedModalProduct);\n modal.swal.close();\n }\n },\n swalSettings: {\n afterClose: () => {\n if (product && !dontShowDetailModal && !submitted && router.currentRoute.value.name !== \"ProductSingle\") {\n store.commit(\"store/showProductDetailModal\", mainProduct.name);\n }\n if (!submitted) resolve2(false);\n },\n ...swalSettings\n }\n });\n });\n\n if (!submittedProduct) {\n resolve(false);\n break;\n }\n Object.assign(product, submittedProduct);\n }\n\n resolve(mainProduct);\n });\n}\n\ntype SingleProductPayload = {productSlug:string, getWithParent?: boolean};\n\nexport async function loadSingleProduct({productSlug, getWithParent}: SingleProductPayload) {\n const res = await axios.get(\"store/single_product/\" + productSlug, {params: {get_with_parent: getWithParent}});\n return res.data;\n}\n\nexport async function loadProductOrDefault(payload: SingleProductPayload, defaultSlug: string) {\n try {\n return await loadSingleProduct(payload);\n } catch (e) {\n if (e.response?.data?.error === \"Not Found\") {\n payload.productSlug = defaultSlug;\n return await loadSingleProduct(payload);\n } else {\n throw e;\n }\n }\n}\n\nexport function isInstantProduct(product: Product) {\n return product.extra_info?.instant_product || product.bundled_products?.find(bp => bp.extra_info?.instant_product);\n}\n\nexport function isOriginalSongProduct(product: Product) {\n return product.name === \"personalized-song\" || product.bundled_products?.find(bp => bp?.name === \"personalized-song\");\n}\n\n// TODO: Temp const, need to replace and make all dynamics\nexport const excludedInstantAddons = [\n \"free-song-streaming\",\n \"extra-verse\",\n \"song-streaming\",\n \"bundle-slideshow-video-card\",\n \"artist-gratuity\" // Temp\n];\n","import {captureException} from \"@sentry/vue\";\n\ntype ErrorHandler = (e: unknown) => void | null\n\ntype Params = {\n errorHandler?: ErrorHandler ;\n};\n\nlet defaultParams: Params = {\n errorHandler: (e) => {\n if (typeof e !== \"object\" || e === null) {\n e = new Error(e);\n }\n captureException(e);\n }\n};\n\nexport function setDefaultParams(params: Params) {\n defaultParams = params;\n}\n\nexport default async function catchError(\n callback: Promise | T,\n params?: Params\n): Promise<[T, undefined] | [undefined, E]> {\n try {\n let res;\n if (callback instanceof Promise) {\n res = await callback;\n } else if (typeof callback === \"function\") {\n res = await callback();\n }\n return [res, undefined];\n } catch (error) {\n return handleError(error, params);\n }\n}\n\nfunction handleError(error: unknown, params: Params) {\n params = {\n ...defaultParams,\n ...params\n };\n params.errorHandler(error);\n\n return [undefined, error];\n}\n","import {useStorage} from \"@vueuse/core\";\nimport router from \"@songfinch/customer/router\";\nimport {pick} from \"lodash-es\";\n\ntype LastReferralPageRoute = {\n name: string,\n query?: {[key: string]: string},\n params?: {[key: string]: string},\n}\n\ntype LastReferralPageOrigin = {\n sfRedirectTo: string,\n}\n\nconst lastReferralPage: LastReferralPageRoute | LastReferralPageOrigin = useStorage(\"sf_last_referral_page\", {});\n\nexport function setLastReferralPage(to, from) {\n if (from.matched[0] && from.matched[0]?.name !== to.matched[0].name) {\n lastReferralPage.value = pick(from, [\"name\", \"params\", \"query\"]);\n } else if (to.query.sfRedirectTo) {\n lastReferralPage.value = {sfRedirectTo: to.query.sfRedirectTo};\n }\n}\n\nexport function goToReferalPage () {\n if (lastReferralPage.value?.sfRedirectTo) {\n location.href = lastReferralPage.value.sfRedirectTo;\n } else {\n let page: LastReferralPageRoute;\n try {\n if (lastReferralPage.value?.name) {\n router.resolve(lastReferralPage.value);\n page = lastReferralPage.value;\n }\n } catch (e) {\n page = undefined;\n }\n if (!page) {\n const defaultRoutePage = router.currentRoute.value.matched[0].meta.defaultReferralPage;\n page = defaultRoutePage ? {name: defaultRoutePage} : {name: \"Home\"};\n }\n router.push(page);\n }\n}\n","import router from \"@songfinch/customer/router\";\nimport store from \"@songfinch/customer/store\";\nimport {goToReferalPage} from \"@songfinch/customer/composables/useReferralPage\";\n\nexport function getCmsData(name?: string): T {\n const key = name || router.currentRoute.value.name as string;\n return store.state.cms.pageData?.[key] || {};\n}\n\nexport function goToNextPage() {\n return router.push({name: router.currentRoute.value.meta.nextPage as string});\n}\n\nexport function goToPrevPage() {\n if (router.currentRoute.value.meta.prevPage) {\n let prevName = router.currentRoute.value.meta.prevPage as string;\n if (prevName === \"IpLoadingPreview\") {\n prevName = router.resolve({name: prevName}).meta.prevPage as string;\n }\n return router.push({name: prevName});\n }\n return goToReferalPage();\n}\n","import {computed} from \"vue\";\nimport {StorageSerializers, useStorage} from \"@vueuse/core\";\nimport {find} from \"lodash-es\";\n\ninterface NameElement {\n name_key: string;\n spelling: string;\n audio_path: string;\n active?: boolean;\n customSpelling?: string;\n}\n\nconst selectedName = useStorage(\"sf_selected_name\", null, undefined, {serializer: StorageSerializers.object});\n\nexport function setCurentName(val: NameElement[]) {\n selectedName.value = val;\n}\n\nexport function resetNamesData() {\n selectedName.value = null;\n}\n\n\n//##########################################\nexport default function useInstantNames() {\n return {\n selectedName: computed(() => selectedName.value),\n selectedNameKey: computed(() => find(selectedName.value, {active: true})?.name_key),\n };\n}\n","import axios, {type AxiosError} from \"axios\";\nimport {computed, readonly, ref} from \"vue\";\nimport {useSessionStorage, StorageSerializers} from \"@vueuse/core\";\nimport store from \"@songfinch/customer/store\";\nimport router from \"@songfinch/customer/router\";\nimport get_error from \"@songfinch/shared/helpers/get_error\";\nimport {nth, pick} from \"lodash-es\";\nimport {loadProductOrDefault} from \"@songfinch/customer/composables/useProduct\";\nimport {$toastMsg} from \"@songfinch/shared/plugins/toast_msg\";\nimport catchError from \"@songfinch/utils/src/catchError\";\n\nimport {getCmsData} from \"@songfinch/customer/helpers/instantStepsHelpers\";\n\nimport useInstantNames, {resetNamesData} from \"@songfinch/customer/composables/useInstantNames\";\n\nimport type {\n IpCollectionCmsData,\n IpCollectionCmsDataCategory,\n IpCollectionCmsDataSubCategory\n} from \"@songfinch/customer/types/instant/IpCmsData\";\n\nimport {\n InstantProductAnswersObject,\n InstantSubmissionData,\n ProductInstantData,\n PreviewTaskID,\n PreviewListItem,\n CustomAxiosRequestConfig, PreviewSubmitResponse\n} from \"@songfinch/customer/types/instant/InstantBuilder\";\n\nimport type {InstantProductCollectionData} from \"@songfinch/customer/types/instant/IpCollectionsData\";\n\n//\n// Composables\n//\nconst {selectedName, selectedNameKey} = useInstantNames();\n\n//\n// CONFIG\n//\nconst DEFAULT_INSTANT_PRODUCT = \"instant-product\";\n\n//\n// STORAGE\n//\nconst selectedInstantProduct = useSessionStorage(\n \"sf_selected_instant_product\",\n DEFAULT_INSTANT_PRODUCT,\n {writeDefaults: false}\n);\n\n// Collection\nconst vitamixCollectionId = useSessionStorage(\n \"sf_instant_vitamix_collection_id\",\n null,\n {serializer: StorageSerializers.number}\n);\n\nconst vitamixCollectionTitle = useSessionStorage(\n \"sf_instant_vitamix_collection_title\",\n null\n);\n\n// Answers\nconst answersStorage = useSessionStorage(\n \"sf_instant_answers\",\n {}\n);\n\n// Previews\nconst currentPreviewIndexStorage = useSessionStorage(\"sf_current_selected_preview\", -1);\nconst previewsListStorage = useSessionStorage(\"sf_instant_previews_list\", []);\nconst previewTaskID = useSessionStorage(\"sf_instant_preview_task_id\", undefined);\nlet songRemaningTemp: number;\nconst songRemaning = useSessionStorage(\"sf_instant_song_remaning\", -1);\n\n\n//\n// Refs\n//\nconst collectionData = ref();\n\n//\n// Methods\n//\n\nexport function setSelectedInstantProduct(slug: string) {\n selectedInstantProduct.value = slug;\n}\n\nexport async function setVitamixCollection(val: string | number) {\n val = parseInt(val as string);\n if (!val || (vitamixCollectionId.value && vitamixCollectionId.value !== val)) {\n resetInstantData();\n }\n vitamixCollectionId.value = val || null;\n await Promise.all([\n setVitamixCollectionData(val),\n loadInstantCollection()\n ]);\n selectedInstantProduct.value = collectionData.value?.product_slug || DEFAULT_INSTANT_PRODUCT;\n}\n\n\n\n//Title used from CMS that why we saving int separately\nconst isIpCollectionCmsDataSubCategory = (value: unknown): value is IpCollectionCmsDataCategory => {\n return !!value && value.hasOwnProperty(\"subcategories\");\n};\n\nasync function setVitamixCollectionData(\n val: number,\n categories: IpCollectionCmsDataCategory[] | IpCollectionCmsDataSubCategory[] | undefined = undefined,\n prefix = \"\"\n) {\n if (!val) {\n vitamixCollectionTitle.value = null;\n return;\n }\n\n if (!categories) {\n let data = getCmsData(\"IpCollections\");\n if (!data.categories) {\n data = await store.dispatch(\"cms/getField\", {group: \"instantBuilder\", slug: \"IpCollections\"});\n }\n categories = data.categories;\n }\n\n categories?.find(async(item) => {\n if (+item.cat_id === val) {\n vitamixCollectionTitle.value = prefix + item.title;\n return true;\n }\n if (\n isIpCollectionCmsDataSubCategory(item) &&\n await setVitamixCollectionData(val, item.subcategories, `${item.title}: `)\n ){\n return true;\n }\n });\n}\n\n\nexport async function loadInstantCollection() {\n const res = await vitamixApiClient.get(`/collections/${vitamixCollectionId.value}`);\n const collectionDataRes = {id: vitamixCollectionId.value, ...res.data} as InstantProductCollectionData;\n collectionData.value = collectionDataRes;\n return collectionDataRes;\n}\n\n//########################\n//Vitamix Api\nexport const vitamixApiClient = axios.create({\n baseURL: window.location.origin + \"/vitamix/api/v2/\",\n headers: {\n \"Accept\": \"application/json\",\n \"X-CSRF-Token\": (document.querySelector('meta[name=\"csrf-token\"]') as HTMLMetaElement)?.content\n }\n});\n\nvitamixApiClient.interceptors.response.use(\n response => response,\n (error: AxiosError) => {\n const config = error.config as CustomAxiosRequestConfig;\n if (!config?.skipToast) $toastMsg(get_error(error));\n if (error?.response?.data?.reset_data) {\n resetInstantData();\n router.push({name: \"IpCollections\"}).then();\n }\n return Promise.reject(error);\n }\n);\n//########################\n\n//########################\n// Answers\nexport function setAnswer(key: number, value: string) {\n if (answersStorage.value[key]) {\n const index = answersStorage.value[key].indexOf(value);\n\n if (index === -1) {\n answersStorage.value[key].push(value);\n } else {\n answersStorage.value[key].splice(index, 1);\n }\n } else {\n answersStorage.value[key] = [value];\n }\n}\n\nconst answersUpdated = ref(false);\n\nexport function setAnswersUpdated(val: boolean) {\n answersUpdated.value = val;\n}\n\n//########################\n// Preview\n\nexport function setCurrentSelectedPreview(val: number) {\n currentPreviewIndexStorage.value = val;\n}\n\nfunction throwAndRedirectToStep(message: string, index: number) {\n throw ({error: message, redirectObj: {name: \"IpBuilderStep\", params: {step: +index + 1}}});\n}\n\nasync function getAllAnswers(data: InstantProductAnswersObject) {\n const answers = {...data};\n let questions = collectionData.value?.questions;\n\n if (!questions?.length) {\n const collectionDataRes = await loadInstantCollection();\n if (collectionDataRes.questions) {\n throw new Error(\"No questions found\");\n }\n questions = collectionDataRes.questions;\n }\n\n //Remove answer that not in collection\n const allCollectionQuestionsIds: number[] = questions.map(step => step.id);\n Object.keys(answers).forEach(k => {\n if (!allCollectionQuestionsIds.includes(+k)) delete answers[k];\n });\n\n questions.forEach((step, index) => {\n // If answer key without value exist, check if we have GENERAL key in asnwers list and max answer allowed ansers 2 or more\n // Then set unasnwered key with GENERAL\n const hasGeneral = step.max_answer_count > 1 && step.answers.find(answer => answer.answer_key === \"GENERAL\");\n if (answers[step.id].length !== step.max_answer_count) {\n if (!hasGeneral) throwAndRedirectToStep(\"Missing selection\", index);\n answers[step.id].push(\"GENERAL\");\n } else {\n answers[step.id].forEach((answerPicked) => {\n const answerExistInList = step.answers.some((answer) => answer.answer_key === answerPicked);\n\n if (!answerExistInList) {\n setAnswer(step.id, answerPicked); // remove not existing answer\n setAnswersUpdated(true);\n throwAndRedirectToStep(\"Unable to find answer\", index);\n }\n });\n }\n });\n\n return answers;\n}\n\ntype RedirectErrorObjectType = {\n name: string,\n params: {step: number}\n}\n\ntype RedirectErrorType = {\n error: string\n redirectObj: RedirectErrorObjectType\n}\n\nconst isRedirectError = (error: unknown): error is RedirectErrorType => {\n return !!error && !!(error as RedirectErrorType)?.redirectObj;\n};\n\nexport async function submitPreview(previewIndex?: number) {\n previewIndex ??= currentPreviewIndexStorage.value;\n let answersForSubmission;\n try {\n answersForSubmission = await getAllAnswers(answersStorage.value);\n } catch (e) {\n $toastMsg(get_error(e));\n if (isRedirectError(e)) return router.push(e.redirectObj);\n return router.push({name: \"InstantProductBuilder\"});\n }\n const data: InstantSubmissionData = {\n answers: answersForSubmission,\n name_key: selectedNameKey.value,\n spelling: selectedName.value?.[0].customSpelling,\n count: 1,\n };\n\n if (previewIndex === -1) {\n data.exclude_artists = previewsListStorage.value.map(p => p.artist_id);\n } else {\n data.artist_id = previewsListStorage.value[previewIndex].artist_id;\n }\n const [res, error] = await catchError(vitamixApiClient.post(\n `/collections/${vitamixCollectionId.value}/previews`,\n data\n ));\n\n if (error) {\n $toastMsg(get_error(error));\n } else {\n previewTaskID.value = res.data.task_ids[0];\n songRemaningTemp = res.data.songs_remaining;\n }\n\n return router.push({name: \"IpLoadingPreview\"});\n}\n\ntype GetTaskDataParams = {\n taskId?: string,\n skipToast?: boolean\n}\n\nexport async function getTaskData({taskId}: GetTaskDataParams = {}) {\n taskId ||= previewTaskID.value;\n if (!taskId) return;\n const res = await vitamixApiClient.get(\n `/collections/${vitamixCollectionId.value}/previews?task_ids[]=${taskId}`);\n const data = res.data.previews[`${taskId}`];\n\n if (data.status === \"completed\") {\n const answers_data = parseAnswersForKeyVal(answersStorage.value);\n data.data.ip_builder_data = {\n answers: {...answers_data},\n name_key: selectedNameKey.value,\n spelling: selectedName.value?.[0].customSpelling\n };\n data.data.preview_count = 0;\n if (currentPreviewIndexStorage.value === -1) {\n const nextPreview = previewsListStorage.value.length;\n previewsListStorage.value.push(data.data);\n setCurrentSelectedPreview(nextPreview);\n } else {\n previewsListStorage.value[currentPreviewIndexStorage.value] = data.data;\n }\n\n songRemaning.value = songRemaningTemp;\n\n data.progress = 100;\n previewTaskID.value = undefined;\n }\n return data;\n}\n\nexport async function lockSong(previewSong: PreviewListItem) {\n const name = selectedInstantProduct.value;\n const product = await loadProductOrDefault({productSlug: name}, DEFAULT_INSTANT_PRODUCT);\n if (selectedInstantProduct.value !== product.name) selectedInstantProduct.value = product.name;\n\n let answers;\n let task_id;\n try {\n answers = await getAllAnswers(answersStorage.value);\n task_id = await submitFullSong(previewSong, answers);\n } catch (e) {\n store.commit(\"shared/warningMsg\", get_error(e));\n return router.push({name: \"InstantProductBuilder\"});\n }\n\n // Not sure which collection do we need\n product.instant_data = {\n collection_id: vitamixCollectionId.value,\n artist_id: previewSong.artist_id,\n artist_display_name: previewSong.artist,\n task_id: task_id,\n title: previewSong.title,\n lyrics: previewSong.lyrics,\n template_song_id: previewSong.template_song_id,\n answers,\n previews_generated: previewsListStorage.value.map(preview => pick(preview, [\"title\", \"artist\"])),\n selected_name: selectedName.value ? pick(selectedName.value[0], [\"name_key\", \"spelling\"]) : undefined,\n } as ProductInstantData;\n\n const cartIndex = store.state.cart.cart.findProductIndexByName(name);\n if (cartIndex !== -1) store.commit(\"cart/resetCart\");\n\n if (!await store.dispatch(\"cart/addProduct\", {product, skipToast: true, dontShowDetailModal: true})) return false;\n await router.push({name: \"IpConfirm\"});\n}\n\nasync function submitFullSong(previewSong: PreviewListItem, answers: InstantProductAnswersObject) {\n const data: InstantSubmissionData = {\n answers,\n template_song_id: previewSong.template_song_id,\n name_key: selectedNameKey.value,\n spelling: selectedName.value?.[0].customSpelling\n };\n const res = await vitamixApiClient.post(`/collections/${vitamixCollectionId.value}/full_songs`, data);\n return res.data.task_id;\n}\n\nexport function resetInstantData() {\n previewsListStorage.value = [];\n answersStorage.value = {};\n currentPreviewIndexStorage.value = -1;\n lastStepVisited.value = \"\";\n previewTaskID.value = undefined;\n vitamixCollectionId.value = null;\n vitamixCollectionTitle.value = \"\";\n selectedInstantProduct.value = DEFAULT_INSTANT_PRODUCT;\n songRemaning.value = -1;\n resetNamesData();\n}\n\ntype NormalizedAnswer = {[k: string]: string}\ntype NormalizedAnswers = {[k: string]: NormalizedAnswer}\n\nexport function parseAnswersForKeyVal(questionsAnswers: InstantProductAnswersObject) {\n // KeyVal store does not allow array data inside a key. Converting answers per question to {index: value} for each question\n // { questionId: { index0: first_answer, index1: second_answer } }\n const result = Object.entries(questionsAnswers).reduce((questionHash: NormalizedAnswers, [key, answers]) => {\n questionHash[key] = (answers as string[]).reduce((answerHash: NormalizedAnswer, answer: string, index: number) => {\n answerHash[index] = answer;\n return answerHash;\n }, {});\n return questionHash;\n }, {});\n\n return result;\n}\n//##########################################\n// Instant bundler page\n\nconst lastStepVisited = useSessionStorage(\"sf_instant_last_step_v2\", \"\");\nexport function setLastPageVisited(fullPath: string) {\n lastStepVisited.value = fullPath;\n}\n\n//##########################################\nconst exportData = {\n collectionData: readonly(collectionData),\n answers: readonly(answersStorage),\n vitamixCollectionId: readonly(vitamixCollectionId),\n vitamixCollectionTitle: readonly(vitamixCollectionTitle),\n previewsList: readonly(previewsListStorage),\n currentPreviewIndex: readonly(currentPreviewIndexStorage),\n currentPreview: readonly(computed(() => nth(previewsListStorage.value, currentPreviewIndexStorage.value) as PreviewListItem)),\n answersUpdated: readonly(answersUpdated),\n selectedInstantProduct: readonly(selectedInstantProduct),\n lastStepVisited: readonly(lastStepVisited),\n songRemaning: readonly(songRemaning)\n};\n\nexport default function useInstantProductBuilder() {\n return exportData;\n}\n","import axios from \"axios\";\nimport {omit, pick, cloneDeep, isEqual} from \"lodash-es\";\nimport dayjs from \"dayjs\";\nimport utc from \"dayjs/plugin/utc\";\nimport timezone from \"dayjs/plugin/timezone\";\nimport isBetween from \"dayjs/plugin/isBetween\";\nimport {resetInstantData} from \"../composables/useInstantProductBuilder\";\n\nimport store from \"@songfinch/customer/store\";\nimport router from \"@songfinch/customer/router\";\nimport {computed} from \"vue\";\nimport {setProductForAdditionalInfo, loadSingleProduct, isInstantProduct, isOriginalSongProduct} from \"@songfinch/customer/composables/useProduct\";\nimport uuid from \"@songfinch/utils/src/uuid\";\nimport {$toastMsg} from \"@songfinch/shared/plugins/toast_msg\";\nimport get_error from \"@songfinch/shared/helpers/get_error\";\nimport analyticsEvent from \"@songfinch/shared/helpers/analyticsEvent\";\nimport modal from \"@songfinch/shared/plugins/modal/index\";\nimport {cdnUrl} from \"@songfinch/shared/plugins/cdn/index\";\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isBetween);\nimport {useSongBuilderStore, songBuilderSlug} from \"@songfinch/customer/store_v2/useSongBuilderStore\";\n\nexport default {\n namespaced: true,\n state: {\n cart: {},\n },\n mutations: {\n setStandardDeliveryDays(state, val) {\n if (!isEqual(state.cart.standardDeliveryDays, val)) {\n state.cart.standardDeliveryDays = val;\n this.commit(\"cart/saveCart\");\n }\n },\n setTaxes(state, val) {\n state.cart.taxes = val;\n this.commit(\"cart/saveCart\");\n },\n setReservedCoupon(state, val) {\n if (val) {\n state.cart.reservedCoupon = {\n code: val.code,\n products: val.only_with,\n products_any: val.only_with_any\n };\n } else {\n state.cart.reservedCoupon = null;\n }\n\n this.commit(\"cart/saveCart\");\n },\n setCoupon(state, val) {\n state.cart.coupon = val;\n this.commit(\"cart/saveCart\");\n },\n setStripeClientSecret(state, val) {\n state.cart.stripe_client_secret = val?.stripe_client_secret;\n state.cart.stripe_intent_id = val?.stripe_intent_id;\n this.commit(\"cart/saveCart\");\n },\n setAddress(state, val) {\n const key = val.shipping ? \"shipping\" : \"billing\";\n if (!isEqual(state.cart.addresses[key], val.address)) {\n state.cart.addresses[key] = val.address;\n this.commit(\"cart/saveCart\");\n }\n },\n resetAddresses(state) {\n state.cart.addresses = {shipping: null, billing: null};\n this.commit(\"cart/saveCart\");\n },\n saveCart(state) {\n state.cart.calcTotals();\n localStorage.setItem(\"sf_cart\", JSON.stringify(\n omit(state.cart, [\"cartProductsArray\"])\n ));\n },\n resetCart(state, saveCart) {\n state.cart.products = [];\n state.cart.standardDeliveryDays = null;\n state.cart.coupon = null;\n state.cart.payment_type = null;\n state.cart.addresses = {shipping: null, billing: null};\n state.cart.taxes = 0;\n state.cart.subtotal = 0;\n state.cart.discount = 0;\n state.cart.credit_applied = 0;\n state.cart.total = 0;\n state.cart.reservedCoupon = null; //Coupon from URL query\n state.cart.affiliate = null;\n state.cart.stripe_client_secret = \"\";\n state.cart.payment_type = \"card\";\n saveCart && this.commit(\"cart/saveCart\");\n },\n initCart(state) {\n const savedCart = localStorage.getItem(\"sf_cart\");\n this.commit(\"cart/resetCart\");\n if (savedCart) {\n state.cart = {...state.cart, ...JSON.parse(savedCart)};\n }\n state.cart.findDiscountableProductByName = findDiscountableProductByName.bind(state.cart);\n state.cart.hasAllProductsForCoupon = hasAllProductsForCoupon.bind(state.cart);\n state.cart.hasAnyProductsForCoupon = hasAnyProductsForCoupon.bind(state.cart);\n state.cart.calcTotals = calcTotals.bind(state.cart);\n state.cart.length = length.bind(state.cart);\n state.cart.hasType = hasType.bind(state.cart);\n state.cart.requireShippingAddress = requireShippingAddress.bind(state.cart);\n state.cart.isInternationalShippingAllowed = isInternationalShippingAllowed.bind(state.cart);\n state.cart.generateData = generateData.bind(state.cart);\n state.cart.frontendValidation = frontendValidation.bind(state.cart);\n state.cart.findProductByName = findProductByName.bind(state.cart);\n state.cart.findProductIndexByName = findProductIndexByName.bind(state.cart);\n state.cart.isDiscountable = isDiscountable.bind(state.cart);\n\n state.cart.rushFeeProduct = computed(() => state.cart.findProductByName(\"personalized-song-rush-fee-v2\"));\n state.cart.deliveryDayInfo = computed(() => {\n const rushFee = state.cart.rushFeeProduct?.rushFeeInfo || state.cart.standardDeliveryDays;\n if (rushFee) return {\n ...rushFee,\n date: dayjs().add(+rushFee.add_days, \"days\").format(\"MM/DD/YYYY\")\n };\n return undefined;\n });\n state.cart.hasOriginalSongRevision = computed(() => state.cart.findProductByName(\"revision-request\"));\n state.cart.hasOriginalSong = computed(() => state.cart.products.find(isOriginalSongProduct));\n state.cart.hasInstantSong = computed(() => state.cart.products.find(isInstantProduct));\n state.cart.cartProductsArray = computed(() => state.cart.products.filter(p => p.name !== \"service-fee\"));\n },\n setPaymentType(state, val) {\n state.cart.payment_type = val;\n this.commit(\"cart/saveCart\");\n },\n updateCart(state, {product, index}) {\n state.cart.products[index] = product;\n this.commit(\"cart/saveCart\");\n },\n setTemporaryCoupon(state, val) {\n state.cart.temporaryCoupon = val;\n this.commit(\"cart/saveCart\");\n }\n },\n actions: {\n async addProduct({state, commit}, {product, skipToast, dontShowDetailModal, ignoreSegmenetEvent, applyTemporaryCoupon, skipAdditionalInfo} = {}) {\n\n if (!product) {\n $toastMsg(\"Error product is missing. Please contact us at support@songfinch.com\");\n return false;\n }\n\n if (!skipAdditionalInfo) {\n product = await setProductForAdditionalInfo(product, dontShowDetailModal);\n if (!product) return;\n }\n product.added_at = dayjs();\n\n product.quantity ||= 1;\n const isOriginalSong = isOriginalSongProduct(product);\n const isInstantSong = isInstantProduct(product);\n const isSong = isOriginalSong || isInstantSong;\n\n product.cart_uuid = uuid();\n\n if (isSong) {\n if (state.cart.hasOriginalSong || state.cart.hasInstantSong) {\n const res = await this.dispatch(\"shared/confirmationModal\", \"You already have a song in your cart. Adding a new one will reset your current cart. Are you sure you want to proceed?\");\n if (!res) return false;\n // Remove instant data if replacing cart with original song\n if (isOriginalSong) {\n resetInstantData();\n } else {\n const storeSongBuilder = useSongBuilderStore();\n storeSongBuilder.resetData();\n }\n commit(\"resetCart\");\n }\n //If it song it goes first\n state.cart.products.unshift(product);\n } else {\n //if it's addon insert right after song else next availabe\n const insertIndex = product.underSong ? 1 : state.cart.products.length;\n state.cart.products.splice(insertIndex, 0, product);\n }\n\n this.commit(\"cart/saveCart\");\n if (!ignoreSegmenetEvent) {\n analyticsEvent(\"_sf_add_to_cart\", {\n product: pick(product, [\"id\", \"name\", \"title\", \"sku\", \"price\", \"quantity\", \"product_type\", \"cta_clicked\"])\n });\n }\n\n this.dispatch(\"cart/checkReservedCoupon\");\n\n if (applyTemporaryCoupon && state.cart.temporaryCoupon) {\n await this.dispatch(\"cart/loadCoupon\", state.cart.temporaryCoupon).catch(() => null);\n }\n\n if (!skipToast) {\n const toast = `${product.title} added to cart
go to cart
`;\n $toastMsg(toast);\n }\n\n await this.dispatch(\"cart/checkForAutoPromoAddons\", product);\n return true;\n },\n async checkForAutoPromoAddons(_, product) {\n if (!product.extra_info?.promo_addons?.length) return;\n for (const promoAddon of product.extra_info.promo_addons) {\n if (promoAddon.auto_add_to_cart === \"1\" && isPromoAddonValid(promoAddon)) {\n const loadedProduct = await loadSingleProduct({productSlug: promoAddon.product_name});\n loadedProduct.parent_story_id = product.parent_story_id;\n loadedProduct.owner_id = product.owner_id;\n if (!loadedProduct) continue;\n await this.dispatch(\"cart/addProduct\", {product: loadedProduct, dontShowDetailModal: true, skipToast: true});\n }\n }\n },\n async checkReservedCoupon({dispatch, state}) {\n const cart = state.cart;\n const reservedCoupon = cart.reservedCoupon;\n if (!reservedCoupon || cart.coupon || !cart.products.length) return;\n if (!cart.hasAllProductsForCoupon(reservedCoupon.products)) return;\n if (!cart.hasAnyProductsForCoupon(reservedCoupon.products_any)) return;\n dispatch(\"loadCoupon\", reservedCoupon.code).catch(() => null);\n },\n async loadCoupon({commit, state}, coupon) {\n const products = state.cart.products.map(p => {\n return {name: p.name, price: p.cartPrice};\n });\n const res = await axios.get(\"store/apply_coupon\", {params: {coupon, products}});\n const cpn = res.data.coupon;\n if (!state.cart.hasAllProductsForCoupon(cpn.only_with) || !state.cart.hasAnyProductsForCoupon(cpn.only_with_any) || !state.cart.isDiscountable()) {\n commit(\"setReservedCoupon\", cpn);\n throw new Error(\"Sorry, this coupon is not applicable to the products.\");\n }\n commit(\"setCoupon\", cpn);\n return cpn;\n },\n async validateProducts({state, commit}) {\n if (!state.cart.length()) return;\n const ids = [...new Set(state.cart.products.map(p => p.id))]; //unique\n const res = await axios.get(\"store/products\", {params: {ids}});\n let hasUpdated = false;\n state.cart.products = state.cart.products.filter(p => {\n const dbProduct = res.data.find(sp => sp.id === p.id);\n if (!dbProduct) {\n hasUpdated = true;\n return false;\n }\n\n // All bundled has the same products bundled_products\n if (p.product_type === \"bundle\"\n && (dbProduct.bundled_products.length !== p.bundled_products?.length\n || !p.bundled_products?.every(i => dbProduct.bundled_products.find(dp => dp.name === i.name)))\n ) {\n hasUpdated = true;\n return false;\n }\n\n const valuesToCompare = [\"price\", \"extra_info\"];\n const a = pick(p, valuesToCompare);\n const b = pick(dbProduct, valuesToCompare);\n\n const productsToSkipValidation = [\"artist-gratuity\", \"personalized-song-rush-fee-v2\", \"revision-request\"];\n\n if (!productsToSkipValidation.includes(p.name) && !isEqual(a, b)) {\n hasUpdated = true;\n valuesToCompare.forEach(k => p[k] = dbProduct[k]);\n }\n return true;\n });\n if (hasUpdated) commit(\"saveCart\");\n },\n async validateAndGetPaymentSettings({state, commit}) {\n try {\n commit(\"setTaxes\", 0);\n const data = await state.cart.generateData();\n commit(\"setStripeClientSecret\", null);\n const res = await axios.post(\"checkout/payment_settings\", data);\n commit(\"setTaxes\", res.data.taxes);\n commit(\"setStripeClientSecret\", {\n stripe_intent_id: res.data.stripe_intent_id,\n stripe_client_secret: res.data.stripe_client_secret\n });\n return res.data;\n } catch (e) {\n return checkoutErrorHandler(e, true);\n }\n },\n async validateCoupon({state}) {\n try {\n const data = await state.cart.generateData();\n await axios.post(\"checkout/coupon_validation\", data);\n } catch (e) {\n return checkoutErrorHandler(e, true);\n }\n },\n async submit({state}, {paypal_info} = {}) {\n if (!store.state.auth.user) {\n return router.push({name: \"Login\"});\n }\n\n if (!await state.cart.frontendValidation()) return; //If validation failed redirect to cart\n\n try {\n const data = await state.cart.generateData();\n data.submission_id = localStorage.getItem(\"sf_submission_id\") || null;\n data.paypal_info = paypal_info;\n if (data.submission_id === \"undefined\") data.submission_id = null;\n const res = await axios.post(\"checkout/submit\", data);\n localStorage.setItem(\"sf_submission_id\", res.data.submission_id);\n return res.data;\n } catch (e) {\n return checkoutErrorHandler(e);\n }\n },\n async initAffiliate({state}) {\n await router.isReady();\n if (router.currentRoute.value.query.affiliate) {\n state.cart.affiliate = router.currentRoute.value.query.affiliate;\n this.commit(\"cart/saveCart\");\n }\n },\n removeRushFee({state, dispatch}) {\n const index = state.cart.products.findIndex(p => p.name.startsWith(\"personalized-song-rush-fee-v2\"));\n if (index !== -1) {\n return dispatch(\"removeProduct\", index);\n }\n },\n removeProduct({state, commit}, i) {\n const cart = state.cart;\n const [removed_product] = cart.products.splice(i, 1);\n if (removed_product.name === \"american-greetings-e-card\") {\n const storeSongBuilder = useSongBuilderStore();\n storeSongBuilder.deliveryType = \"standard\";\n } else if (isOriginalSongProduct(removed_product)) {\n commit(\"resetCart\", true);\n const storeSongBuilder = useSongBuilderStore();\n storeSongBuilder.resetData();\n } else if (isInstantProduct(removed_product)) {\n commit(\"resetCart\", true);\n resetInstantData();\n }\n\n analyticsEvent(\"_sf_remove_from_cart\", {\n product: pick(removed_product, [\"id\", \"price\", \"title\", \"quantity\", \"sku\"])\n });\n\n if (cart.coupon && (!cart.hasAllProductsForCoupon(cart.coupon?.only_with) || !cart.hasAnyProductsForCoupon(cart.coupon?.only_with_any) || !state.cart.isDiscountable())) {\n commit(\"setReservedCoupon\", cart.coupon);\n commit(\"setCoupon\", null);\n }\n commit(\"saveCart\");\n }\n }\n};\n\n\nconst findProductByName = function (name) {\n if (name.startsWith(\"personalized-song-rush-fee-v2\")) {\n return this.products.find(p => p.name.startsWith(name));\n } else {\n return this.products.find(p => p.name === name);\n }\n};\n\nconst findProductIndexByName = function (name) {\n return this.products.findIndex(p => p.name === name);\n};\n\nconst findDiscountableProductByName = function (name) {\n return this.products.find(p => p.name === name && !p.exclude_from_discounts);\n};\n\nconst hasAllProductsForCoupon = function (products) {\n if (!products?.length) return true;\n return products.every(this.findDiscountableProductByName);\n};\n\nconst hasAnyProductsForCoupon = function (products) {\n if (!products?.length) return true;\n return products.some(this.findDiscountableProductByName);\n};\n\nconst hasType = function (type) {\n return this.products.some(p => p.product_type === type);\n};\n\nconst requireShippingAddress = function () {\n return this.products.some(p => p.requires_shipping_address);\n};\n\nconst isInternationalShippingAllowed = function () {\n return !this.products.some(p => p.product_type === \"physical\" && !p.extra_info?.international_shipping);\n};\n\nconst isDiscountable = function () {\n return !this.products.every(p => p.extra_info?.exclude_from_discounts);\n};\n\nconst calcTotals = function () {\n const user = store.state.auth.user;\n let discountLeft = this.coupon?.discount_fixed || 0;\n let subtotal = 0;\n let discount = 0;\n let totalWithExclusions = 0;\n\n if (this.coupon?.only_for_products?.length) {\n this.coupon.only_for_products = this.coupon.only_for_products.filter(v => v);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let promoAddonsDiscount = 0;\n let creditApplied = 0;\n let total = 0;\n const productsWithDiscountApplied = [];\n const userCredit = {\n nonTaxable: +user?.credit_amount || 0, // Non taxable should be first, but we have array below\n taxable: (+user?.credit_amount_taxable || 0)\n };\n\n const promoAddons = this.products.reduce((allProductPromos, p) => {\n if (p.extra_info?.promo_addons?.length) {\n p.extra_info.promo_addons.forEach(promoAddon => {\n if (isPromoAddonValid(promoAddon)) {\n allProductPromos.push(promoAddon);\n }\n });\n }\n return allProductPromos;\n }, []);\n\n // Calculate Total exluding products from Coupon to compare with Coupon MinimumCartSize\n this.products?.filter(p => !this.coupon?.excluded_for?.includes(p.name))?.forEach(p => totalWithExclusions += +p.cartPrice);\n const isMinimumCartExceeded = totalWithExclusions >= this?.coupon?.minimum_cart_size;\n\n this.products.forEach(p => {\n let totalProductPrice = +p.price;\n\n if (promoAddons.length) {\n const promoAddonIndex = promoAddons.findIndex(b => b.product_name === p.name);\n if (promoAddonIndex !== -1) {\n let productDiscount = 0;\n const promoAddon = promoAddons[promoAddonIndex];\n if (+promoAddon.discount_percent) {\n productDiscount = Math.ceil(totalProductPrice * +promoAddon.discount_percent / 100);\n } else {\n productDiscount = Math.min(totalProductPrice, +promoAddon.discount_fixed);\n }\n productDiscount = Math.min(productDiscount, totalProductPrice);\n totalProductPrice -= productDiscount;\n promoAddonsDiscount += productDiscount;\n promoAddons.splice(promoAddonIndex, 1);\n }\n }\n\n p.cartPrice = totalProductPrice;\n\n // substract discount(coupon) from product price\n const isServiceFeeDiscountable = p.name === \"service-fee\" && this.coupon?.include_service_fee;\n\n const isCouponApplicableToProduct = !this.coupon?.only_for_products?.length || this.coupon?.only_for_products?.includes(p.name);\n const discountAlreadyAppliedToProduct = isCouponApplicableToProduct && productsWithDiscountApplied?.includes(p.name);\n const isProductDiscountable = !p.extra_info?.exclude_from_discounts && isCouponApplicableToProduct && !discountAlreadyAppliedToProduct;\n const isProductExcludedFromCoupon = this.coupon?.excluded_for ? this.coupon?.excluded_for?.includes(p.name) : false;\n\n if (this.coupon && isMinimumCartExceeded && !isProductExcludedFromCoupon && (isProductDiscountable || isServiceFeeDiscountable)) {\n let productDiscount = 0;\n if (this.coupon?.discount_percent) {\n productDiscount = Math.ceil(totalProductPrice * this.coupon?.discount_percent / 100);\n } else {\n productDiscount = Math.min(totalProductPrice, discountLeft);\n discountLeft -= productDiscount;\n }\n if (productDiscount && this.coupon?.only_for_products?.length && isCouponApplicableToProduct) productsWithDiscountApplied.push(p.name);\n totalProductPrice -= productDiscount;\n discount += productDiscount;\n }\n\n\n // substract credit from price credit if not exclude_from_account_credits and the same owner\n if (!p.extra_info?.exclude_from_account_credits && (!p.owner_id || p.owner_id === user?.id)) {\n [\"nonTaxable\", \"taxable\"].forEach(k => {\n if (!userCredit[k] && !totalProductPrice) return;\n const productCredits = Math.min(totalProductPrice, userCredit[k]);\n userCredit[k] -= productCredits;\n totalProductPrice -= productCredits;\n creditApplied += productCredits;\n });\n }\n\n total += totalProductPrice;\n });\n\n this.cartProductsArray?.forEach(p => subtotal += +p.cartPrice);\n\n // Adding taxes\n total += this.taxes;\n\n // apply taxable credits to tax if any left\n if (this.taxes && userCredit.taxable) {\n const taxCredits = Math.min(total, userCredit.taxable);\n userCredit.taxable -= taxCredits;\n total -= taxCredits;\n creditApplied += taxCredits;\n }\n\n this.credit_applied = creditApplied;\n this.discount = discount;\n this.subtotal = subtotal;\n this.totalWithExclusions = totalWithExclusions;\n this.total = total < 50 ? 0 : total;\n};\n\n\nconst length = function () {\n return this.cartProductsArray.length;\n};\n\nconst generateData = async function () {\n const storeSongBuilder = useSongBuilderStore();\n const songData = cloneDeep(storeSongBuilder.$state);\n songData.slug = songBuilderSlug.value;\n songData.questions = songData.questions?.map(q => pick(q, [\"answer\", \"key\", \"question\"]));\n songData.must_have_questions = songData.must_have_questions?.map(q => {\n q.answer += \"\\r\\n\" + q.description;\n return q;\n });\n songData.gifter_email ||= store.state.auth.user?.email;\n songData.selected_artists = songData.selected_artists?.filter(a => a).map(q => omit(q, [\"genresOptions\"]));\n const rushFeeInfo = this.deliveryDayInfo;\n return {\n sf_song_data: songData,\n sf_cart: {\n addresses: cloneDeep(this.addresses),\n cart_total: this.total,\n rush_fee: pick(rushFeeInfo, [\"add_days\", \"cost\", \"holiday_skip\"]),\n coupon_code: this.coupon?.code,\n affiliate: this.affiliate,\n products: this.products.map(p => {\n const allowedAttributes = [\"id\", \"price\", \"name\", \"parent_story_id\", \"product_type\", \"additional_info\", \"cover_public_id\",\n \"checkout_id\", \"instant_data\", \"bundled_products\", \"customer_greeting_data\", \"customer_greeting_placement\",\n \"pod_inputs\", \"added_at\", \"expire\"];\n if (p.name === \"revision-request\" || p.extra_info.instant_product) {\n allowedAttributes.push(\"extra_info\");\n } else if (p.name.startsWith(\"personalized-song-rush-fee-v2\")) {\n allowedAttributes.push(\"extra_info\");\n p = {...p, extra_info: pick(p.rushFeeInfo, [\"add_days\", \"cost\", \"holiday_skip\"])};\n }\n const productData = pick(p, allowedAttributes);\n productData.price = p.cartPrice;\n return productData;\n }),\n user_agent: navigator?.userAgent,\n user_id: store.state.auth.user?.id,\n payment_type: this.payment_type,\n stripe_intent_id: this.stripe_intent_id,\n },\n };\n};\n\nconst frontendValidation = async function() {\n const storeSongBuilder = useSongBuilderStore();\n if (this.hasOriginalSong && !await storeSongBuilder.validateSongData()) {\n return false;\n }\n\n const productsOriginalLength = this.products.length;\n let callsResult = [];\n\n const calls = this.products.map(p => {\n if (p.cover_public_id) {\n try {\n return axios.head(cdnUrl(p.cover_public_id.metadata.url)); // if it's not null Promise.allSettled return fulfilled\n } catch (e) {\n return null;\n }\n }\n return null;\n });\n callsResult = await Promise.allSettled(calls);\n\n this.products = this.products.filter((p, i) => {\n if (callsResult[i]?.status === \"rejected\") return false; // remove product if async check return rejected\n\n // remove product if expired or it's bundle\n if (p.bundled_products?.find(bp => bp.expire && dayjs().isAfter(bp.expire))) return false;\n return !(p.expire && dayjs().isAfter(p.expire));\n });\n\n if (productsOriginalLength !== this.products.length) {\n store.commit(\"cart/saveCart\");\n checkoutErrorHandler({error: \"Some items have expired and have been removed from the cart.\"}, true);\n return false;\n }\n return true;\n};\n\nfunction isPromoAddonValid(promoAddon) {\n if (!promoAddon.end_datetime && !promoAddon.start_datetime) return true;\n const startDate = promoAddon.start_datetime ? dayjs.tz(promoAddon.start_datetime, \"America/Chicago\") : dayjs.tz(new Date(), \"America/Chicago\").subtract(1, \"day\");\n const endDate = promoAddon.end_datetime ? dayjs.tz(promoAddon.end_datetime, \"America/Chicago\") : dayjs.tz(new Date(), \"America/Chicago\").add(1, \"day\");\n return dayjs.tz(new Date(), \"America/Chicago\").isBetween(startDate, endDate);\n}\n\nexport async function checkoutErrorHandler(error, pushToCart = false) {\n const errorMessage = get_error(error);\n const resData = error?.response?.data || {};\n\n if (resData.reset_stripe_key) {\n store.commit(\"cart/setStripeClientSecret\", null);\n pushToCart = true;\n }\n\n if (resData.reset_addresses) {\n store.commit(\"cart/resetAddresses\");\n pushToCart = true;\n }\n\n if (resData.reset_submittion_id) {\n localStorage.removeItem(\"sf_submission_id\");\n }\n\n if (resData.reset_selected_artists) {\n router.push({name: \"BsSongArtist\", query: {artist_unavailabe: 1}});\n if (!pushToCart) throw new Error(errorMessage);\n return;\n }\n\n if (resData.reset_coupon) {\n store.commit(\"cart/setCoupon\", null);\n store.commit(\"cart/setReservedCoupon\", null);\n }\n\n if (resData.reset_rush_fee) {\n store.dispatch(\"cart/removeRushFee\");\n }\n\n if (pushToCart) {\n const inCart = router.currentRoute.value.name === \"Cart\";\n modal.swal({\n icon: \"warning\",\n html: `

${errorMessage}

`,\n }).then(() => inCart && location.reload());\n return router.push({name: \"Cart\"});\n } else {\n throw new Error(errorMessage);\n }\n}\n\n\n\n","import Cookies from \"js-cookie\";\nimport analyticsEvent from \"@songfinch/shared/helpers/analyticsEvent\";\n\nexport function setTemporaryEmail(email: string) {\n Cookies.set(\"sf_temporary_email\", email, {expires: 360});\n if (email) {\n analyticsEvent(\"_sf_identify_user\", {email});\n }\n}\n\nexport function getTemporaryEmail() {\n return Cookies.get(\"sf_temporary_email\");\n}\n","import router from \"@songfinch/customer/router\";\nimport axios from \"axios\";\nimport error_handler from \"@songfinch/shared/helpers/axios_error_handler\";\nimport {$toastMsg} from \"@songfinch/shared/plugins/toast_msg\";\nimport {setTemporaryEmail} from \"@songfinch/customer/helpers/temporaryEmail\";\nimport analyticsEvent from \"@songfinch/shared/helpers/analyticsEvent\";\nimport modal from \"@songfinch/shared/plugins/modal/index\";\nimport {useSongBuilderStore} from \"@songfinch/customer/store_v2/useSongBuilderStore\";\n\nexport default {\n namespaced: true,\n state: {\n user: null,\n redirectQuery: {},\n referralCode: null,\n },\n mutations: {\n setUser(state, val) {\n state.user = val || null;\n if (state.user) {\n this.commit(\"auth/calcCreditsTotal\");\n }\n },\n redirectToUserPage(state) {\n if (!state.user) return;\n if (\n router.currentRoute.value.meta.skipAuthRedirect ||\n state.redirectQuery.skipRedirect\n ) {\n return false;\n }\n if (state.redirectQuery?.forward_to) {\n return (window.location.href = state.redirectQuery.forward_to);\n }\n if (state.redirectQuery?.push_to) {\n return router.push({\n name: state.redirectQuery.push_to,\n ...JSON.parse(state.redirectQuery.settings || \"{}\"),\n });\n }\n if (state.redirectQuery?.push_to_path) {\n return router.push(state.redirectQuery?.push_to_path);\n }\n switch (state.user.role) {\n case \"admin\":\n window.location.href = \"/admin\";\n break;\n case \"artist\":\n window.location.href = \"/artist-admin\";\n break;\n default:\n return router.push({name: \"Dashboard\"});\n }\n },\n setRedirectQuery(state, val) {\n state.redirectQuery = val;\n },\n storeAddresses(state, val) {\n const savedData = localStorage.getItem(\"sf_addresses\");\n const data = savedData ? JSON.parse(savedData) : {};\n const type = val.shipping ? \"shipping\" : \"billing\";\n data[`${type}_id`] = val?.address?.id;\n localStorage.setItem(\"sf_addresses\", JSON.stringify(data));\n },\n setReferralCode(state, val) {\n state.referralCode = val;\n if (val) {\n localStorage.setItem(\"sf_customer_referral_code\", val);\n } else {\n localStorage.removeItem(\"sf_customer_referral_code\");\n }\n },\n checkForReferralCode(state) {\n state.referralCode =\n localStorage.getItem(\"sf_customer_referral_code\") || null;\n },\n calcCreditsTotal(state, val) {\n if (!state.user) return;\n if (val) {\n state.user.credit_amount = val.credit_amount;\n state.user.credit_amount_taxable = val.credit_amount_taxable;\n }\n const totalCredits = +state.user.credit_amount + +state.user.credit_amount_taxable;\n\n state.user.total_credits ??= 0;\n if (totalCredits !== state.user?.total_credits) {\n state.user.total_credits = totalCredits;\n this.commit(\"cart/saveCart\");\n }\n },\n },\n actions: {\n async afterLogin({state}, {user, registration = false}) {\n this.commit(\"auth/setUser\", user);\n const storeSongBuilder = useSongBuilderStore();\n await storeSongBuilder.loadUserData(user.email);\n if (storeSongBuilder.isInProgress()) {\n storeSongBuilder.gifter_email = user.email;\n }\n analyticsEvent(\"_sf_user_login\", {\n registration,\n user: user\n });\n this.commit(\"auth/redirectToUserPage\");\n setTemporaryEmail(\"\");\n if (typeof state.redirectQuery?.afterLoginCallback === \"function\") {\n state.redirectQuery.afterLoginCallback();\n } else if (router.currentRoute.value.name !== \"Checkout\") {\n modal.swal({\n html: `

Success

`,\n showConfirmButton: false,\n timer: 1500,\n icon: \"success\",\n });\n } else {\n modal.swal.close();\n }\n },\n async register({state, dispatch}, payload) {\n if (payload.email_confirmation !== payload.email) {\n throw new Error(\"Email and confirmation do not match\");\n }\n const res = await axios.post(\"/user\", {\n user: payload,\n referral_code: state.referralCode,\n }, {meta: {updateCSRFToken: true}});\n await dispatch(\"afterLogin\", {user: res.data.user, registration: true});\n return res;\n },\n\n async login({dispatch}, payload) {\n const res = await axios.post(\"/users/sign_in\", {user: payload}, {meta: {updateCSRFToken: true}});\n await dispatch(\"afterLogin\", {user: res.data.user, registration: false});\n return res.data;\n },\n\n async getUserData({commit}) {\n try {\n const params = {user_id: router.currentRoute.value.query?.id};\n const res = await axios.get(\"/user\", {params});\n commit(\"setUser\", res.data.user);\n return res.data.user;\n } catch (e) {\n $toastMsg(error_handler(e).error);\n return router.push({name: \"Home\"});\n }\n },\n\n async logout({commit}, params) {\n analyticsEvent(\"_sf_user_logout\");\n await axios.get(\"/users/sign_out\", {meta: {updateCSRFToken: true}});\n commit(\"setUser\", null);\n setTemporaryEmail(\"\");\n if (!params?.checkout) {\n const storeSongBuilder = useSongBuilderStore();\n storeSongBuilder.resetData();\n this.commit(\"cart/resetCart\", true);\n localStorage.removeItem(\"sf_addresses\");\n if (\n router.currentRoute.value.matched.find(\n (r) => r.meta?.requireAuth\n )\n ) {\n return router.push({name: \"Home\"});\n }\n }\n return true;\n },\n\n async updateAccountInformation({commit}, payload) {\n const res = await axios.put(\"/user\", {user: payload});\n commit(\"setUser\", res.data.user);\n if (!payload.skipToastMsg) $toastMsg(\"Updated!\");\n return res.data;\n },\n\n async updatePassword(store, payload) {\n if (payload.new_password !== payload.new_password_confirm) {\n return {error: \"Passwords Don't Match.\"};\n }\n const res = await axios.put(\"/users/password\", {user: payload});\n $toastMsg(\"Password Updated!\");\n return res.data;\n },\n\n async loadAddresses(store, payload) {\n let savedAddresses = localStorage.getItem(\"sf_addresses\");\n savedAddresses &&= JSON.parse(savedAddresses);\n const res = await axios.get(\"/addresses\", {\n params: {...savedAddresses, ...payload},\n });\n return res.data;\n },\n\n async saveAddress(store, payload) {\n const res = await axios.post(\"/addresses\", payload);\n return res.data;\n },\n\n async validateReferralCode({commit, state}) {\n const code =\n router.currentRoute.value.params.code || state.referralCode;\n if (!code) return;\n try {\n const res = await axios.get(\"/user/referral_user\", {\n params: {referral_code: code},\n });\n commit(\"setReferralCode\", code);\n return res.data;\n } catch (e) {\n const error = error_handler(e).error;\n modal.swal({\n icon: \"warning\",\n html: error,\n });\n commit(\"setReferralCode\", null);\n return router.push({name: \"Home\"});\n }\n },\n\n async loadCreditBalance({commit}, params) {\n try {\n const res = await axios.get(\"/dashboard/credit_balance\", {\n params,\n });\n commit(\"calcCreditsTotal\", res.data);\n return res.data;\n } catch (e) {\n const res = error_handler(e);\n $toastMsg(res.error);\n return error_handler(e);\n }\n },\n\n async addGiftCard({commit}, params) {\n const res = await axios.post(\"/dashboard/apply_gift_card\", params);\n commit(\"calcCreditsTotal\", res.data);\n return res.data;\n },\n }\n};\n","import {omit, pickBy, isEmpty, size} from \"lodash-es\";\nimport router from \"../router\";\n\nexport const apply_query_filters = (filters) => {\n const params = {...router.currentRoute.value.query};\n\n let filtersParams = omit(filters, [\"per_page\", \"show_at_capacity\"]);\n filtersParams = pickBy(filtersParams, p => !isEmpty(p));\n if (size(filtersParams)) {\n params.filters = encodeURIComponent(JSON.stringify(filtersParams));\n } else {\n delete params.filters;\n }\n\n let queryString = \"\";\n if (size(params)) {\n queryString += \"?\" + Object.keys(params).map(key => key + \"=\" + params[key]).join(\"&\");\n }\n\n history.replaceState(history.state, null, router.currentRoute.value.path + queryString);\n};\n\nexport const get_query_filters = () => {\n const queryFilters = router.currentRoute.value.query.filters;\n try {\n return queryFilters ? JSON.parse(queryFilters) : null;\n } catch (e) {\n return null;\n }\n};\n","import axios from \"axios\";\nimport {apply_query_filters, get_query_filters} from \"../helpers/apply_query_filters\";\nimport router from \"../router\";\nimport {useSongBuilderStore} from \"@songfinch/customer/store_v2/useSongBuilderStore\";\n\nimport {isAxiosError} from \"@songfinch/utils/src/validators\";\nimport {logError} from \"@songfinch/utils/src/error\";\nimport {useNotification} from \"@songfinch/design-system/src/composables/useNotification\";\n\nconst CancelToken = axios.CancelToken;\nlet source;\n\nexport default {\n namespaced: true,\n state: {\n artistsList: null,\n filters: null,\n page: 1,\n endOfPages: false,\n total: false,\n },\n mutations: {\n nextPage(state) {\n state.page++;\n },\n setEndOfPages(state, val) {\n state.endOfPages = val;\n },\n setArtistsList(state, val) {\n if (val?.artists) {\n const list = val.artists.map( a => ({\n image: a.photo,\n name: a.artist_name,\n available_delivery_days: a.available_delivery_days,\n exclusivity: a.exclusivity,\n audio: a.songs[0]?.audio_url,\n link: router.resolve({name: \"ArtistSingle\", params: {id: a.id}}).href,\n status: a.status,\n genres: a.songs[0]?.genres,\n occasions: a.songs[0]?.occasions,\n song_subtitle: a.songs[0]?.genres.concat(a.songs[0]?.occasions, a.songs[0]?.moods).join(\", \"),\n song_title: a.songs[0]?.title\n }));\n state.artistsList = state.artistsList.concat(list);\n setTimeout(() => { //Prevent to trigger it right away\n state.total = val?.total;\n state.endOfPages = state.artistsList.length === state.total;\n }, 100);\n }\n },\n resetList(state) {\n state.artistsList = [];\n state.page = 1;\n },\n clearLabels(state) {\n state.filters.genres = [];\n state.filters.genders = [];\n state.filters.artist_exclusivity_only = [];\n state.filters.artist_one_day_delivery = [];\n },\n initFilters(state) {\n this.commit(\"artist/resetList\");\n state.filters = {\n genders: [],\n genres: [],\n artist_exclusivity_only: [],\n artist_one_day_delivery: [],\n keyword: \"\",\n show_at_capacity: true,\n per_page: 12,\n ...get_query_filters()\n };\n }\n },\n actions: {\n async loadArtists({commit, state}, payload) {\n this.commit(\"artist/setEndOfPages\", true);\n if (source) {\n source.cancel(\"Operation canceled by the user.\");\n }\n source = CancelToken.source();\n\n apply_query_filters(state.filters);\n let res;\n try {\n res = await axios.get(\"/artists\", {\n params: (payload || {page: state.page, ...state.filters}),\n cancelToken: source.token,\n cache: {ignoreCache: false},\n });\n } catch (e) {\n // Don't do anything with canceled error because it is due to user action \n // And not really a error or bug.\n if (axios.isCancel(e)) return undefined;\n if (!isAxiosError(e)) {\n logError(e);\n }\n return useNotification({type: \"error\", message: \"Something went wrong. Please try again.\"});\n }\n if (!payload) {\n commit(\"setArtistsList\", res.data);\n }\n return res.data;\n },\n startSongWithArtist(store, artist){\n artist.fromSinglePage = true;\n const storeSongBuilder = useSongBuilderStore();\n storeSongBuilder.selectArtist({artist, index: 0});\n storeSongBuilder.selectRecommendedArtist(null);\n const lastPage = storeSongBuilder.lastSongBuildPage;\n let destination;\n if (lastPage) {\n const lastPageRoute = router.resolve(lastPage);\n destination = lastPageRoute.path;\n const artistSelectionPageRoute = router.resolve({name: \"BsSongArtistSelection\"});\n if (lastPageRoute.meta?.index > artistSelectionPageRoute.meta?.index) {\n storeSongBuilder.setLastSongBuildPage({name: artistSelectionPageRoute.name, params: lastPage.params});\n destination = artistSelectionPageRoute.path;\n }\n } else {\n destination = \"/song-builder\";\n }\n return destination;\n }\n }\n};\n","import {ref} from \"vue\";\n\nconst showProductPaperActive = ref(false);\nconst showProductPaperId = ref(undefined);\n\nexport default function useShowProductPaper() {\n const showProductPaper = (id: string) => { \n\n showProductPaperActive.value = true;\n showProductPaperId.value = id;\n };\n\n const removeProductPaper = () => { \n showProductPaperActive.value = false;\n showProductPaperId.value = undefined;\n };\n\n\n return {\n showProductPaperActive,\n showProductPaperId,\n showProductPaper,\n removeProductPaper\n };\n}\n","import axios from \"axios\";\nimport {indexOf, sortBy} from \"lodash-es\";\nimport router from \"../router\";\nimport useShowProductPaper from \"../composables/product/useShowProductPaper\";\n\n\nexport default {\n namespaced: true,\n state: {\n products: null,\n selectedStory: null\n },\n getters: {\n getAvailableProducts(state, val, rootState) {\n return state.products?.filter(p => {\n if (p.extra_info?.one_per_story) {\n return !rootState.cart.cart.findProductByName(p.name);\n }\n return true;\n });\n },\n },\n mutations: {\n selectStory(state, val) {\n state.selectedStory = val;\n },\n setProducts(state, val) {\n state.products = val;\n },\n showProductDetailModal(state, payload) {\n const {showProductPaper} = useShowProductPaper();\n showProductPaper(payload);\n }\n },\n actions: {\n async loadProducts({commit}, {productsNames, sortByName, storyId, productsProps, includes, excludes} = {}) {\n commit(\"setProducts\", null);\n let res;\n try {\n res = await axios.get(\"store/products\", {\n params: {\n name: productsNames,\n story_id: storyId,\n includes,\n excludes\n }\n });\n } catch (e) {\n return router.push({name: \"404\"});\n }\n let result = res.data;\n if (sortByName?.length) {\n result = sortBy(res.data, (p) => {\n const index = indexOf(sortByName, p.name);\n return index === -1 ? sortByName.length : index;\n });\n }\n\n if (productsProps) {\n result = result.map(p => ({...p, ...productsProps}));\n }\n\n commit(\"setProducts\", result);\n return result;\n },\n }\n};\n","import axios from \"axios\";\nimport {apply_query_filters, get_query_filters} from \"../helpers/apply_query_filters\";\n\nconst CancelToken = axios.CancelToken;\nlet source;\n\nexport default {\n namespaced: true,\n state: {\n playlists: null,\n filters: null,\n page: 1,\n endOfPages: false,\n total: 0,\n },\n mutations: {\n nextPage(state) {\n state.page++;\n },\n setEndOfPages(state, val) {\n state.endOfPages = val;\n },\n setPlaylists(state, val) {\n if (val?.playlists) {\n state.playlists = state.playlists.concat(val.playlists);\n setTimeout(() => { //Prevent to trigger it right away\n state.total = val?.total;\n state.endOfPages = state.playlists.length === state.total;\n }, 100);\n }\n },\n resetList(state) {\n state.playlists = [];\n state.page = 1;\n },\n initFilters(state) {\n this.commit(\"playlist/resetList\");\n state.filters = {\n kinds: [],\n keyword: \"\",\n per_page: 9,\n ...get_query_filters()\n };\n }\n },\n actions: {\n async loadPlaylists({commit, state}, payload) {\n this.commit(\"playlist/setEndOfPages\", true);\n if (source) {\n source.cancel();\n }\n source = CancelToken.source();\n\n apply_query_filters(state.filters);\n\n let res;\n try {\n res = await axios.get(\"/playlists\", {\n params: (payload || {page: state.page, ...state.filters}),\n cancelToken: source.token,\n cache: {ignoreCache: false},\n });\n } catch (e) {\n if (!axios.isCancel(e)) throw new Error(e.message || \"failed to load Playlist\");\n return;\n }\n\n if (!payload) {\n commit(\"setPlaylists\", res.data);\n }\n return res.data;\n }\n }\n};\n","import {createStore} from \"vuex\";\n\nimport shared from \"./shared\";\nimport cms from \"./cms\";\nimport core_cms from \"@songfinch/shared/store/cms_core\";\nimport cart from \"./cart\";\nimport auth from \"./auth\";\nimport artist from \"./artist\";\nimport store from \"./store\";\nimport playlist from \"./playlist\";\n\nexport default createStore({\n modules: {\n shared,\n core_cms,\n cms,\n cart,\n auth,\n artist,\n store,\n playlist\n }\n});\n","import {setMetaToAllChildren} from \"../helpers/routes_helper\";\nimport router from \"./index\";\nimport store from \"../store\";\nimport {goToReferalPage, setLastReferralPage} from \"@songfinch/customer/composables/useReferralPage\";\n\nconst SongBuilder = () => import(\"@songfinch/customer/views/build_song/SongBuilder\");\nconst BsOccasionRecipient = () => import(\"@songfinch/customer/views/build_song/chapters/pre_purchase/BsOccasionRecipient\");\nconst BsGifterEmail2 = () => import(\"@songfinch/customer/views/build_song/chapters/pre_purchase/BsGifterEmail2\");\nconst BsSongArtist = () => import(\"@songfinch/customer/views/build_song/chapters/pre_purchase/BsSongArtist\");\nconst BsSongOptions = () => import(\"@songfinch/customer/views/build_song/chapters/pre_purchase/BsSongOptions\");\nconst BsSongArtistSelection = () => import(\"@songfinch/customer/views/build_song/chapters/pre_purchase/BsSongArtistSelection\");\nconst BsStoryDetailsCombined = () => import(\"@songfinch/customer/views/build_song/chapters/pre_purchase/BsStoryDetailsCombined\");\nconst BsArtistsRecommendation = () => import(\"@songfinch/customer/views/build_song/chapters/pre_purchase/BsArtistsRecommendation\");\nconst BsArtistConfirmation = () => import(\"@songfinch/customer/views/build_song/chapters/pre_purchase/BsArtistConfirmation\");\nconst BsReview = () => import(\"@songfinch/customer/views/build_song/chapters/pre_purchase/BsReview\");\nconst BsPreCart = () => import(\"@songfinch/customer/views/build_song/chapters/pre_purchase/BsPreCart\");\nconst BsChangeArtist = () => import(\"@songfinch/customer/views/build_song/chapters/pre_purchase/BsChangeArtist.vue\");\nimport {useSongBuilderStore, songBuilderSlug} from \"@songfinch/customer/store_v2/useSongBuilderStore\";\n\nasync function songbuilderGuard(to) {\n if (to.query.slug) songBuilderSlug.value = to.query.slug;\n const storeSongBuilder = useSongBuilderStore();\n await storeSongBuilder.init();\n}\n\nasync function skipSongBuilderRoute(to, from, next, skip) {\n if (skip) {\n const storeSongBuilder = useSongBuilderStore();\n const isPrevPage = (from.meta.index === undefined && to.meta.index > 0) || from.meta.index > to.meta.index;\n if (isPrevPage && !to.meta.prevPage) {\n goToReferalPage();\n return next(false);\n }\n const nextPage = {name: isPrevPage ? to.meta.prevPage : to.meta.nextPage, params: to.params, query: to.query};\n storeSongBuilder.setLastSongBuildPage(nextPage);\n await storeSongBuilder.saveData();\n return next(nextPage);\n }\n next();\n}\n\nfunction bsPageRedirectionGuard(to, from, next) {\n const storeSongBuilder = useSongBuilderStore();\n const isLastBuilderPage = from.matched[0]?.name === \"SongBuilder\";\n const lastPage = storeSongBuilder.lastSongBuildPage;\n if (!isLastBuilderPage && lastPage?.name && lastPage.name !== to.name) {\n try {\n lastPage.query = {...lastPage.query, ...to.query};\n router.resolve(lastPage);\n return next(lastPage);\n } catch (e) {\n storeSongBuilder.setLastSongBuildPage(undefined);\n return next({name: \"SongBuilder\"});\n }\n }\n return next();\n}\n\nfunction checkForOriginalSongBundler(to) {\n if (to.query.original_song_product) {\n const storeSongBuilder = useSongBuilderStore();\n storeSongBuilder.song_product_name = to.query.original_song_product;\n }\n}\n\nfunction checkOriginalInCartGuard() {\n return store.state.cart.cart.hasOriginalSong ? true : {name: \"BsReview\"};\n}\n\nasync function gifterEmailGuard(to, from, next) {\n const storeSongBuilder = useSongBuilderStore();\n if (store.state.auth.user || storeSongBuilder.gifter_email) {\n if (store.state.auth.user?.email) {\n storeSongBuilder.gifter_email = store.state.auth.user.email;\n }\n return await skipSongBuilderRoute(to, from, next, true);\n }\n return next();\n}\n\nconst songBuilderRoutes = {\n path: \"/song-builder\",\n alias: \"/build-your-song\",\n name: \"SongBuilder\",\n component: SongBuilder,\n redirect: to => ({name: to.matched[0].children[0].name}), // Redirect always to first child\n meta: {\n CMSData: \"songBuilderPrePurchase\",\n animation: \"pageSlide\",\n hideTopBar: true,\n hideNavgiation: true,\n hideFooter: true,\n hideStartButton: true,\n defaultReferralPage: \"Home\"\n },\n beforeEnter: [songbuilderGuard, setLastReferralPage, checkForOriginalSongBundler],\n children: [\n {\n path: \"recipient\",\n name: \"BsOccasionRecipient\",\n component: BsOccasionRecipient,\n beforeEnter: [bsPageRedirectionGuard]\n },\n {\n path: \"gifter-email\",\n name: \"BsGifterEmail2\",\n component: BsGifterEmail2,\n meta: {hideSongbuilderHeader: true},\n beforeEnter: [gifterEmailGuard]\n },\n {\n path: \"artist\",\n name: \"BsSongArtist\",\n component: BsSongArtist,\n async beforeEnter(to, from, next) {\n const storeSongBuilder = useSongBuilderStore();\n const skip = storeSongBuilder.selected_artists?.find(a => a.fromSinglePage);\n await skipSongBuilderRoute(to, from, next, skip);\n }\n },\n {\n path: \"artist-selection\",\n name: \"BsSongArtistSelection\",\n component: BsSongArtistSelection,\n async beforeEnter(to, from, next) {\n const storeSongBuilder = useSongBuilderStore();\n await skipSongBuilderRoute(to, from, next, !storeSongBuilder.preferred_artist_switch);\n }\n },\n {\n path: \"song-options\",\n name: \"BsSongCharacteristics\",\n component: BsSongOptions,\n async beforeEnter(to, from, next) {\n const storeSongBuilder = useSongBuilderStore();\n const userSelectedAnArtistSwitch = storeSongBuilder.preferred_artist_switch === undefined;\n await skipSongBuilderRoute(to, from, next, userSelectedAnArtistSwitch);\n }\n },\n {\n path: \"recommended-artists\",\n name: \"BsSongArtistsList\",\n component: BsArtistsRecommendation,\n async beforeEnter(to, from, next) {\n const storeSongBuilder = useSongBuilderStore();\n if (!storeSongBuilder.genre || !storeSongBuilder.gender) {\n return await skipSongBuilderRoute(to, from, next, true);\n }\n await skipSongBuilderRoute(to, from, next, storeSongBuilder.preferred_artist_switch);\n }\n },\n {\n path: \"artist-confirmation\",\n name: \"BsArtistConfirmation\",\n component: BsArtistConfirmation,\n async beforeEnter(to, from, next) {\n const storeSongBuilder = useSongBuilderStore();\n if (!(storeSongBuilder.selected_artists?.length || storeSongBuilder.selected_recommended_artist)) {\n return await skipSongBuilderRoute(to, from, next, true);\n }\n return next();\n }\n },\n {\n path: \"details\",\n name: \"BsStoryDetailsCombined\",\n component: BsStoryDetailsCombined\n },\n {\n path: \"review\",\n name: \"BsReview\",\n component: BsReview,\n meta: {hideProgressNav: true},\n beforeEnter: async () => {\n const storeSongBuilder = useSongBuilderStore();\n return await storeSongBuilder.validateSongData({toPage: \"BsReview\"});\n }\n },\n {\n path: \"pre-cart\",\n name: \"BsPreCart\",\n component: BsPreCart,\n meta: {hideProgressNav: true, customPageViewedAnalyticsTrigger: true, nextPage: \"Cart\"},\n beforeEnter: [checkOriginalInCartGuard]\n },\n {\n path: \"change-artist\",\n name: \"BsChangeArtist\",\n component: BsChangeArtist,\n meta: {hideProgressNav: true},\n beforeEnter: [checkOriginalInCartGuard]\n },\n {\n path: \"artist-confirmation-changed\",\n name: \"BsArtistConfirmationChanged\",\n component: BsArtistConfirmation,\n meta: {hideProgressNav: true, nextPage: \"BsPreCart\"},\n beforeEnter: [checkOriginalInCartGuard]\n }\n ]\n};\n\n\nsetMetaToAllChildren(\n songBuilderRoutes,\n {CMSData: \"songBuilderPrePurchase\"}\n);\n\nexport default [songBuilderRoutes];\n","import {useScriptTag} from \"@vueuse/core\";\nimport {$toastMsg} from \"@songfinch/shared/plugins/toast_msg\";\n\nconst loadedScripts: Record = {};\n\nexport default async function useLoadScript(url: string) {\n if (loadedScripts[url]) return;\n try {\n const {load} = useScriptTag(url, () => {}, {manual: true});\n await load();\n loadedScripts[url] = true;\n } catch (e) {\n $toastMsg(\"Failed to load: \" + url);\n }\n return;\n}\n","import {readonly, ref} from \"vue\";\nimport useLoadScript from \"@songfinch/customer/composables/useLoadScript\";\nimport store from \"@songfinch/customer/store\";\nimport {StripeAddressInfo} from \"@songfinch/data-source/checkout/express/express\";\n\nconst stripe = ref();\n\nexport async function loadStripe() {\n if (stripe.value) return;\n await useLoadScript(\"https://js.stripe.com/v3\");\n if (!window.Stripe) return;\n stripe.value = window.Stripe(window.appSettings.stripe);\n}\n\ntype ProcessStripePaymentParams = {\n stripeElements: unknown,\n shipping?: StripeAddressInfo,\n returnUrl: string,\n stripeClientSecret?: string\n}\n\nexport async function processStripePayment({stripeElements, returnUrl, shipping, stripeClientSecret}: ProcessStripePaymentParams) {\n stripeClientSecret ||= store.state.cart.cart.stripe_client_secret;\n if (!stripeClientSecret) throw Error(\"missing stripe stripe client secret\");\n if (!stripeElements) throw Error(\"missing stripe elements\");\n if (!returnUrl) throw Error(\"missing returnUrl\");\n const {error: submitError} = await stripeElements.submit();\n\n if (submitError) {\n throw submitError;\n }\n\n const payment = await stripe.value.confirmPayment({\n elements: stripeElements,\n clientSecret: stripeClientSecret,\n confirmParams: {\n shipping,\n return_url: returnUrl,\n },\n });\n\n return payment;\n}\n\nconst data = {\n stripe: readonly(stripe),\n};\n\nexport default function useStripe() {\n return data;\n}\n","import store from \"@songfinch/customer/store\";\nimport useStripe, {loadStripe} from \"@songfinch/customer/composables/useStripe\";\nimport modal from \"@songfinch/shared/plugins/modal/index\";\nimport {useSongBuilderStore} from \"@songfinch/customer/store_v2/useSongBuilderStore\";\n\nconst Cart = () => import(\"@songfinch/customer/views/checkout/Cart\");\nconst Checkout = () => import(\"@songfinch/customer/views/checkout/Checkout\");\nconst CompleteCheckout = () => import(\"@songfinch/customer/views/checkout/CompleteCheckout\");\nconst NonStoryConfirmation = () => import(\"@songfinch/customer/views/checkout/NonStoryConfirmation\");\n\nconst checkoutGuard = async () => {\n await loadStripe();\n const {stripe} = useStripe();\n if (!stripe) {\n modal.swal({\n icon: \"warning\",\n html: `Unable to load the payment system. If the error persists, please try a different browser or \n contact us.`,\n });\n return {name: \"Cart\"};\n }\n if (!store.state.cart.cart.length()) {\n return {name: \"Cart\"};\n }\n if (!await store.state.cart.cart.frontendValidation()) {\n return false;\n }\n};\n\nasync function songbuilderGuard() {\n const storeSongBuilder = useSongBuilderStore();\n await storeSongBuilder.init();\n}\n\nasync function stripePreloadGuard() {\n loadStripe().then();\n}\n\nexport default [\n {\n path: \"/cart\",\n name: \"Cart\",\n component: Cart,\n beforeEnter: [songbuilderGuard, stripePreloadGuard],\n meta: {\n skipAuthRedirect: true,\n hideTopBar: true,\n hideFooter: true,\n hideStartButton: true\n },\n },\n {\n path: \"/checkout\",\n name: \"Checkout\",\n meta: {\n skipAuthRedirect: true,\n hideTopBar: true,\n CMSData: \"/cart\",\n },\n component: Checkout,\n beforeEnter: [songbuilderGuard, checkoutGuard],\n },\n {\n path: \"/complete-checkout\",\n name: \"CompleteCheckout\",\n meta: {hideTopBar: true},\n component: CompleteCheckout,\n beforeEnter: [songbuilderGuard]\n },\n {\n path: \"/thank-you\",\n name: \"NonStoryConfirmation\",\n meta: {hideTopBar: true},\n component: NonStoryConfirmation,\n },\n];\n","const Dashboard = () => import(\"@songfinch/customer/views/dashboard/Dashboard\");\nconst Profile = () => import(\"@songfinch/customer/views/dashboard/subpages/Profile\");\nconst OrderHistory = () => import(\"@songfinch/customer/views/dashboard/subpages/OrderHistory\");\nconst CreditBalance = () => import(\"@songfinch/customer/views/dashboard/subpages/CreditBalance\");\nconst ReferralProgram = () => import(\"@songfinch/customer/views/dashboard/subpages/ReferralProgram\");\n\nexport default [\n {\n path: \"/dashboard\",\n name: \"Dashboard\",\n component: Dashboard,\n meta: {requireAuth: true},\n redirect: to => ({name: \"Profile\", query: to.query}),\n children: [\n {\n path: \"profile\",\n name: \"Profile\",\n component: Profile,\n },\n {\n path: \"order-history\",\n name: \"OrderHistory\",\n component: OrderHistory,\n },\n {\n path: \"credit-balance\",\n name: \"CreditBalance\",\n component: CreditBalance,\n },\n {\n path: \"referral-program\",\n name: \"ReferralProgram\",\n component: ReferralProgram,\n },\n ]\n }\n];\n","import router from \"./index\";\n\nconst Story = () => import(\"@songfinch/customer/views/stories/StoryV2\");\nconst AgECard = () => import(\"@songfinch/customer/views/pages/AgECard\");\nconst EditOriginalSongBuilder = () => import(\"@songfinch/customer/views/edit_original_song/EditOriginalSongBuilder\");\n\nexport default [\n {\n path: \"/stories/:slug\",\n name: \"Story\",\n component: Story,\n meta: {\n skipAuthRedirect: true,\n disableZenDesk: true,\n CMSData: \"storyPage\",\n hideTopBar: true,\n },\n beforeEnter: async (to) => {\n const useStoryImport = await import(\"@songfinch/customer/composables/story/useStory\");\n const {loadCurrentStory} = useStoryImport.default();\n if (!await loadCurrentStory(to.params.slug)) {\n return router.push({name: \"404\"});\n }\n },\n },\n {\n path: \"/stories/:slug/ag-ecard\",\n name: \"AgECard\",\n component: AgECard,\n meta: {\n disableZenDesk: true,\n requireAuth: true,\n CMSData: \"agECard\",\n animation: \"pageSlide\",\n hideTopBar: true,\n }\n },\n {\n path: \"/stories/:slug/edit-your-song\",\n name: \"OriginalSongBuilderEdit\",\n component: EditOriginalSongBuilder,\n meta: {\n CMSData: \"songBuilderPrePurchase\",\n animation: \"pageSlide\",\n hideTopBar: true,\n hideNavgiation: true,\n hideFooter: true,\n hideStartButton: true,\n requireAuth: true,\n }\n }\n];\n","const Products = () => import(\"@songfinch/customer/views/products/Products.vue\");\nconst ProductSingle = () => import(\"@songfinch/customer/views/products/ProductSingle.vue\");\n\nexport default [\n {\n path: \"/products/:product_id\",\n name: \"ProductSingle\",\n component: ProductSingle,\n meta: {CMSData: \"productSingle\", skipAuthRedirect: true},\n },\n {\n path: \"/store\",\n name: \"Store\",\n component: Products,\n }\n];\n","const LandingSingle = () => import(\"@songfinch/customer/views/templates/LandingSingle\");\n\nexport default [\n {\n path: \"/custom-gift/:slug\",\n name: \"LandingSingle\",\n component: LandingSingle\n },\n];\n","const Error = () => import(\"@songfinch/customer/views/pages/Error\");\n\nexport default [\n {\n path: \"/500\",\n name: \"500\",\n component: Error,\n },\n {\n path: \"/404\",\n name: \"404\",\n component: Error,\n },\n {\n path: \"/:pathMatch(.*)*\",\n redirect: {name: \"404\"},\n }\n];\n","const ArtistSingle = () => import(\"@songfinch/customer/views/artists/ArtistSingle\");\nconst Artists = () => import(\"@songfinch/customer/views/artists/Artists\");\nconst OpportunityConfirmation = () => import(\"@songfinch/customer/views/artists/OpportunityConfirmation\");\n\n\nexport default [\n {\n path: \"/artists\",\n name: \"ArtistsList\",\n component: Artists,\n },\n {\n path: \"/artists/:id\",\n name: \"ArtistSingle\",\n meta: {CMSData: \"artistSingle\", customPageViewedAnalyticsTrigger: true},\n component: ArtistSingle\n },\n {\n path: \"/opportunity-confirmation\",\n name: \"OpportunityConfirmation\",\n component: OpportunityConfirmation,\n }\n];\n","import store from \"../store\";\nconst EmailMePassword = () => import(\"@songfinch/customer/components/auth/EmailMePassword\");\nconst StudioFaqPopup = () => import(\"@songfinch/customer/components/song_builder/StudioFaqPopup\");\nconst OTPSinginPopup = () => import(\"@songfinch/customer/components/auth/otp/OTPSinginPopup.vue\");\nconst SignupPopup = () => import(\"@songfinch/customer/components/auth/SignupPopup\");\nconst EventReminderPopup = () => import(\"@songfinch/customer/components/event_reminder/EventReminderPopup\");\n\nasync function authPopupHelper(direction, component, swalSettings) {\n if (store.state.auth.user) {\n store.commit(\"auth/redirectToUserPage\");\n return false;\n } else {\n const loadedComponent = (await component()).default;\n setTimeout(() =>\n store.commit(\"shared/showModal\", {\n component: loadedComponent,\n swalSettings: swalSettings,\n responsive: {\n 767: {\n slide: \"bottom\"\n },\n }\n })\n );\n return direction.from.name ? false : {name: \"Home\"};\n }\n}\n\nexport default [\n {\n path: \"/set-reminder\",\n alias: \"/occasion-reminder\",\n name: \"SetRemider\",\n beforeEnter: async (to, from) => {\n const component = (await EventReminderPopup()).default;\n setTimeout(() =>\n store.commit(\"shared/showModal\", {\n component,\n swalSettings: {width: 770},\n })\n );\n return from.name ? false : {name: \"Home\"};\n },\n },\n {\n path: \"/songwriting-101\",\n name: \"Songwriting101\",\n beforeEnter: async (to, from) => {\n const component = (await StudioFaqPopup()).default;\n setTimeout(() =>\n store.commit(\"shared/showModal\", {\n component,\n props: {activeFAQ: to.query.question_id},\n swalSettings: {width: 850},\n })\n );\n return from.name ? false : {name: \"Home\"};\n },\n },\n {\n path: \"/reset-password\",\n name: \"EmailMePassword\",\n beforeEnter: (to, from) => {\n return authPopupHelper({to, from}, EmailMePassword);\n },\n },\n {\n path: \"/login\",\n name: \"Login\",\n alias: \"/users/sign_in\",\n beforeEnter: (to, from) => {\n store.commit(\"auth/setRedirectQuery\", to.query);\n return authPopupHelper({to, from}, OTPSinginPopup);\n },\n },\n {\n path: \"/signup\",\n name: \"Signup\",\n alias: \"/users/sign_up\",\n beforeEnter: (to, from) => {\n store.commit(\"auth/setRedirectQuery\", to.query);\n return authPopupHelper({to, from}, SignupPopup, {width: 770});\n },\n }\n];\n","const Songs = () => import(\"@songfinch/customer/views/songs/Songs.vue\");\nconst PlaylistSingle = () => import(\"@songfinch/customer/views/songs/PlaylistSingle\");\n\nexport default [\n {\n path: \"/playlists\",\n name: \"Playlists\",\n component: Songs,\n },\n {\n path: \"/playlists/:id\",\n name: \"PlaylistSingle\",\n meta: {customPageViewedAnalyticsTrigger: true},\n component: PlaylistSingle,\n }\n];\n","const redirects = [\n {path: \"/testimonials\", redirect: \"/\"},\n {\n path: \"/examples/inspiring-stories\",\n redirect: \"/playlists\",\n },\n {\n path: \"/songwriter-community\",\n redirect: {name: \"ArtistCommunity\"},\n alias: \"/songwriter\",\n },\n {\n path: \"/personalized-song-revisions\",\n redirect: {name: \"SongRevisions\"},\n },\n {\n path: \"/song-builder/song/:path?\",\n redirect: (to) => `/song-builder/${to.params.path}`,\n },\n {\n path: \"/song-builder/occasion/:path?\",\n redirect: (to) => `/song-builder/${to.params.path}`,\n },\n {\n path: \"/song-builder/story/:path?\",\n redirect: \"/song-builder\",\n },\n {\n path: \"/worry-free\",\n redirect: \"/song-revisions\",\n },\n {\n path: \"/worry-free-guarantee\",\n redirect: \"/song-revisions\",\n },\n {\n path: \"/instant\",\n alias: \"/jukebox\",\n name: \"InstantProductBundle\",\n beforeEnter: (to) => {\n const url = new URL(window.appSettings.instantLandingURL);\n url.search = new URLSearchParams(to.query);\n location.href = url;\n return false;\n },\n },\n {\n path: \"/instant-builder/intro\",\n redirect: {name: \"IpCollections\"},\n },\n {\n path: \"/song-builder/intro\",\n name: \"IpIntroPage\",\n redirect: {name: \"BsOccasionRecipient\"},\n },\n {\n path: \"/song-builder/genre\",\n name: \"BsSongGenre\",\n redirect: {name: \"BsSongCharacteristics\"},\n },\n {\n path: \"/song-builder/vocals\",\n name: \"BsSongVocals\",\n redirect: {name: \"BsSongCharacteristics\"},\n },\n {\n path: \"/song-builder/mood\",\n name: \"BsSongMood\",\n redirect: {name: \"BsSongCharacteristics\"},\n },\n {\n path: \"/song-builder/tempo\",\n name: \"BsSongTempo\",\n redirect: {name: \"BsSongCharacteristics\"},\n },\n {\n path: \"/song-builder/gifter\",\n name: \"BsOccasionGifter\",\n redirect: {name: \"BsOccasionRecipient\"},\n },\n {\n path: \"/song-builder/subject\",\n name: \"BsStorySubject\",\n redirect: {name: \"BsStoryDetailsCombined\"},\n },\n];\n\nexport default redirects;\n","import store from \"@songfinch/customer/store\";\nimport {$toastMsg} from \"@songfinch/shared/plugins/toast_msg\";\nconst ReferralsSignup = () => import(\"@songfinch/customer/views/referrals/ReferralsSignup\");\n\nexport default [\n {\n path: \"/r/:code\",\n name: \"ReferralsSignup\",\n component: ReferralsSignup,\n meta: {CMSData: \"/r/:code\"},\n beforeEnter: (to, from, next) => {\n if (store.state.auth.user) {\n $toastMsg(\"You already have an existing account.\");\n return next({name: \"Dashboard\"});\n }\n return next();\n }\n }\n];\n","import useInstantProductBuilder, {\n loadInstantCollection,\n setLastPageVisited,\n setVitamixCollection,\n setSelectedInstantProduct\n} from \"@songfinch/customer/composables/useInstantProductBuilder\";\nimport {setMetaToAllChildren, skipRouteToNext} from \"@songfinch/customer/helpers/routes_helper\";\nimport store from \"@songfinch/customer/store\";\nimport router from \"@songfinch/customer/router\";\nimport {setLastReferralPage} from \"@songfinch/customer/composables/useReferralPage\";\n\nconst InstantProductBuilder = () => import(\"@songfinch/customer/views/instant/builder/InstantProductBuilder.vue\");\nconst IpBuilderSteps = () => import(\"@songfinch/customer/views/instant/builder/subpages/IpBuilderSteps.vue\");\nconst IpBuilderStep = () => import(\"@songfinch/customer/views/instant/builder/subpages/IpBuilderStep.vue\");\nconst IpLoadingPreview = () => import(\"@songfinch/customer/views/instant/builder/subpages/IpLoadingPreview.vue\");\nconst IpRecipientNames = () => import(\"@songfinch/customer/views/instant/builder/subpages/IpRecipientNames.vue\");\nconst IpPreview = () => import(\"@songfinch/customer/views/instant/builder/subpages/IpPreview.vue\");\nconst IpConfirm = () => import(\"@songfinch/customer/views/instant/builder/subpages/IpConfirm.vue\");\nconst IpAddons = () => import(\"@songfinch/customer/views/instant/builder/subpages/IpAddons.vue\");\nconst IpCustomerGreeting = () => import(\"@songfinch/customer/views/instant/builder/subpages/IpCustomerGreeting.vue\");\nconst IpCollections = () => import(\"@songfinch/customer/views/instant/builder/subpages/IpCollections.vue\");\n\nfunction collectionGuard(to) {\n const {vitamixCollectionId} = useInstantProductBuilder();\n if (!vitamixCollectionId.value) return {name: \"IpCollections\", query: to.query};\n}\n\nfunction stepsGuard(to, from) {\n const {collectionData} = useInstantProductBuilder();\n if (!to.params.step) {\n const step = from.meta.index > to.meta.index ? -1 : 1;\n return {name: \"IpBuilderStep\", params: {step}, query: to.query};\n }\n if (to.params?.step === \"-1\") {\n return {name: \"IpBuilderStep\", params: {step: collectionData.value.questions.length}, query: to.query};\n }\n if (!collectionData.value.questions[to.params.step - 1]) return {name: \"IpBuilderStep\", params: {step: 1}, query: to.query};\n}\n\nasync function namesGuard (to, from) {\n const {collectionData} = useInstantProductBuilder();\n return skipRouteToNext(to, from, !collectionData.value.choices[\"name\"]);\n}\n\nasync function addonsGuard (to, from) {\n const {collectionData} = useInstantProductBuilder();\n const skipAddons = collectionData.value?.skip_addon_page ?? false;\n return skipRouteToNext(to, from, skipAddons);\n}\n\nasync function previewGuard () {\n const {previewsList} = useInstantProductBuilder();\n if (!previewsList.value.length) return {name: \"IpBuilderStep\", params: {step: 1}};\n}\n\nfunction productInCartGuard () {\n const {selectedInstantProduct} = useInstantProductBuilder();\n if (!store.state.cart.cart.findProductByName(selectedInstantProduct.value)) return {name: \"IpPreview\"};\n}\n\nasync function customerGreetingGuard(to, from) {\n try {\n const {collectionData} = useInstantProductBuilder();\n const {loadSingleProduct} = await import(\"@songfinch/customer/composables/useProduct\");\n const product = await loadSingleProduct({productSlug: \"customer-greeting-for-instant-product\"});\n to.meta.product = product;\n return skipRouteToNext(to, from, !collectionData.value.pam_enabled || !product);\n } catch (error) {\n return skipRouteToNext(to, from, true);\n }\n}\n\nconst routes = [\n {\n path: \"/instant-builder\",\n name: \"InstantProductBuilder\",\n component: InstantProductBuilder,\n meta: {\n animation: \"pageSlide\",\n hideTopBar: true,\n hideNavgiation: true,\n hideFooter: true,\n hideStartButton: true,\n defaultReferralPage: \"InstantProductBundle\"\n },\n redirect: {name: \"IpCollections\"},\n async beforeEnter(to, from) {\n setLastReferralPage(to, from);\n\n const {vitamixCollectionId} = useInstantProductBuilder();\n const queryCollectionId = +to.query.collection_id;\n if (queryCollectionId) {\n const isDifferentCollection = queryCollectionId !== vitamixCollectionId.value;\n await setVitamixCollection(to.query.collection_id);\n // set Vitamix Collection will set selectedInstantProduct but if query exist we overwriting it\n if (to.query.instant_product) setSelectedInstantProduct(to.query.instant_product);\n if (isDifferentCollection) return true;\n } else if (vitamixCollectionId.value) {\n await loadInstantCollection();\n }\n\n const {lastStepVisited} = useInstantProductBuilder();\n if (lastStepVisited.value) {\n try {\n const lastPageRoute = router.resolve({path: lastStepVisited.value});\n lastPageRoute.query = {...lastPageRoute.query, ...to.query};\n if (to.path !== lastPageRoute.path) return lastPageRoute;\n } catch (e) {\n return console.error(e);\n }\n }\n },\n children: [\n {\n path: \"collections\",\n name: \"IpCollections\",\n component: IpCollections,\n },\n {\n path: \"step\",\n component: IpBuilderSteps,\n meta: {skipLastPage: true},\n beforeEnter: [collectionGuard, stepsGuard],\n children: [\n {\n path: \":step?\",\n name: \"IpBuilderStep\",\n component: IpBuilderStep\n }\n ]\n },\n {\n path: \"recipient\",\n name: \"IpRecipientNames\",\n component: IpRecipientNames,\n beforeEnter: [collectionGuard, namesGuard]\n },\n {\n path: \"loading\",\n name: \"IpLoadingPreview\",\n component: IpLoadingPreview,\n },\n {\n path: \"preview\",\n name: \"IpPreview\",\n component: IpPreview,\n beforeEnter: [collectionGuard, previewGuard]\n },\n {\n path: \"confirm\",\n name: \"IpConfirm\",\n component: IpConfirm,\n beforeEnter: [collectionGuard, previewGuard, productInCartGuard]\n },\n {\n path: \"customer-greeting\",\n name: \"IpCustomerGreeting\",\n component: IpCustomerGreeting,\n beforeEnter: [collectionGuard, customerGreetingGuard, addonsGuard, previewGuard, productInCartGuard]\n },\n {\n path: \"addons\",\n name: \"IpAddons\",\n component: IpAddons,\n meta: {\n nextPage: \"Cart\"\n },\n beforeEnter: [collectionGuard, addonsGuard, previewGuard, productInCartGuard]\n }\n ],\n }\n];\n\nsetMetaToAllChildren(\n routes.find(r => r.name === \"InstantProductBuilder\"),\n {CMSData: \"instantBuilder\"},\n to => {\n if (to.meta.skipLastPage) return;\n setLastPageVisited(to.fullPath);\n }\n);\n\nexport default routes;\n","export default (hash, delay = 100) => {\n if (hash) {\n const element = document.getElementById(hash.substring(1));\n if (element) {\n setTimeout(() => {\n element?.scrollIntoView({\n block: \"start\",\n behavior: \"smooth\"\n });\n }, delay);\n return true;\n }\n }\n return false;\n};\n","import {$toastMsg} from \"@songfinch/shared/plugins/toast_msg\";\nimport {useStorage} from \"@vueuse/core\";\nimport {captureException} from \"@sentry/vue\";\n\ntype SfReloadStorageData = {\n timestamp: number,\n count: number\n}\nlet reloadCalled = false;\n\nexport default function tryReload(error: unknown, from: string, path?: string): boolean {\n if (reloadCalled) return true;\n if (!error?.message?.match(/(Failed to fetch dynamically imported module|Importing a module script failed)/)?.length) return false;\n const storage = useStorage(\"sf_reload\", {count: 0, timestamp: 0}, null, {writeDefaults: false});\n const fiveMinutes = 5 * 60 * 1000;\n const timestampDiff = Date.now() - storage.value.timestamp;\n if (timestampDiff > fiveMinutes) storage.value.count = 0;\n if (storage.value.count <= 3 ) {\n reloadCalled = true;\n storage.value.count++;\n storage.value.timestamp = Date.now();\n window.appSettings.sentry_dns = null; // Clearing to stop any sentry errors\n path ? (location.href = path) : window.location.reload();\n return true;\n }\n error._sfErrorIgnore = false;\n captureException(error, {\n extra: {fromReload: from}\n });\n $toastMsg(\"Unable to refresh the page automatically. Please refresh the page to apply the latest changes.\");\n return false;\n}\n","import app from \"@songfinch/customer/app.js\";\nimport {createRouter, createWebHistory} from \"vue-router\";\nimport static_pages from \"./pages\";\nimport song_builder_pages from \"./song_builder_pages\";\nimport checkout_pages from \"./checkout_pages\";\nimport dashboard_pages from \"./dashboard_pages\";\nimport story_pages from \"./story_pages\";\nimport productPages from \"./ProductPages\";\nimport templates from \"./templates\";\nimport errors from \"./errors\";\nimport artists_pages from \"./artists_pages\";\nimport popups from \"./popups\";\nimport songPages from \"./SongPages\";\nimport redirects from \"./redirects\";\nimport referrals from \"./referrals\";\nimport instant from \"./instant\";\n\nimport store from \"../store\";\nimport hash_scroll from \"../helpers/hash_scroll\";\nimport {nth} from \"lodash-es\";\nimport {$toastMsg} from \"@songfinch/shared/plugins/toast_msg\";\nimport {setLastPageVisited} from \"@songfinch/customer/composables/useInstantProductBuilder\";\nimport tryReload from \"@songfinch/customer/helpers/tryReload\";\nimport analyticsEvent from \"@songfinch/shared/helpers/analyticsEvent\";\nimport {useSongBuilderStore} from \"@songfinch/customer/store_v2/useSongBuilderStore\";\n\nconst MAX_REDIRECTS = 10;\nconst redirectsList = [];\nclass RedirectsError extends Error {\n constructor(message, redirectsList) {\n super(message);\n this.name = this.constructor.name;\n this.redirectsList = redirectsList;\n Error.captureStackTrace(this, this.constructor);\n }\n}\n\nconst routes = [\n ...redirects,\n ...static_pages,\n ...song_builder_pages,\n ...checkout_pages,\n ...dashboard_pages,\n ...story_pages,\n ...templates,\n ...productPages,\n ...artists_pages,\n ...popups,\n ...songPages,\n ...referrals,\n ...instant,\n ...errors, //should be last in list\n];\n\nfunction findDuplicateRouteNames(routesList, uniqueNames) {\n routesList.forEach(route => {\n if (route.name){\n if (uniqueNames[route.name]) {\n console.error(\"Duplicated routes:\", uniqueNames[route.name], route);\n throw new Error(`Error! Route name '${route.name}' is already exist.`);\n }\n uniqueNames[route.name] = route;\n if (route.children) {\n findDuplicateRouteNames(route.children, uniqueNames);\n }\n }\n });\n}\n\nif (window.appSettings.node_env === \"development\") {\n findDuplicateRouteNames(routes, {});\n}\n\nconst router = createRouter({\n history: createWebHistory(),\n routes,\n scrollBehavior(to, from) {\n // Scroll to top when navigating to a new page, but not when changing query params\n if (to.path === from.path && to.query !== from.query) {\n return false;\n }\n if (to.hash) return;\n return {top: 0};\n }\n});\n\nrouter.isReady().then(() => {\n app.config.globalProperties.$bus.on(\n \"pageLoaded\",\n () => {\n if (!router.currentRoute.value.meta?.customPageViewedAnalyticsTrigger) {\n analyticsEvent(\"_sf_pageview\");\n }\n hash_scroll(location.hash);\n },\n false\n );\n});\n\n\n\n\nrouter.onError((error, to) => {\n if (tryReload(error, \"router.onError\", to?.fullPath)) return true;\n return {name: \"Home\"};\n});\n\nrouter.afterEach(async (to, from, failure) => {\n if (failure) return;\n //Always remove slash from the end\n history.replaceState(history.state, document.title, location.href.replace(/\\/?(\\?|#|$)/, \"$1\"));\n\n const cmsGroup = to.meta?.CMSData;\n await store.dispatch(\"cms/loadData\", cmsGroup ? {group: cmsGroup} : null);\n\n app.config.globalProperties.$flushGTMScripts();\n setTimeout(() => app.config.globalProperties.$bus.trigger(\"pageLoaded\"), 2); // Min transaction 1 second\n});\n\nrouter.beforeEach(async (to, from, next) => {\n if (from.name) {\n app.config.globalProperties.$bus.clearRouteEvents();\n }\n\n //URL Coupon on init\n if (to.query.coupon) {\n const code = Array.isArray(to.query.coupon) ? nth(to.query.coupon, -1) : to.query.coupon;\n store.commit(\"cart/setReservedCoupon\", {code});\n }\n\n //Auth\n const isRequireAuth = to.matched.find(r => r.meta.requireAuth);\n if (isRequireAuth && !store.state.auth.user) {\n const redirecTo = to.name === \"Checkout\" ? \"Signup\" : \"Login\";\n const settings = {params: to.params, query: to.query};\n return next({name: redirecTo, query: {push_to: to.name, settings: JSON.stringify(settings)}});\n }\n if (to.redirectedFrom) {\n redirectsList.push({to, from});\n if (redirectsList.length > MAX_REDIRECTS) {\n const redirects = [...redirectsList];\n redirectsList.splice(0, redirectsList.length);\n let nextPage = \"Home\";\n if (to.matched[0]?.name === \"SongBuilder\") {\n const storeSongBuilder = useSongBuilderStore();\n storeSongBuilder.setLastSongBuildPage(undefined);\n await storeSongBuilder.saveData();\n nextPage = \"SongBuilder\";\n } else if (to.matched[0]?.name === \"InstantProductBuilder\") {\n setLastPageVisited(\"\");\n nextPage = \"InstantProductBuilder\";\n }\n $toastMsg(\"Sorry, something went wrong. Please try again or contact us at support@songfinch.com.\");\n setTimeout(() => {\n throw new RedirectsError(`The maximum number of redirects has been exceeded (${MAX_REDIRECTS}).`, redirects);\n });\n next({name: nextPage});\n }\n } else {\n redirectsList.splice(0, redirectsList.length);\n }\n next();\n});\n\nwindow.sfPushToPage = (url) => {\n return router.push(url);\n};\n\nexport default router;\n","import Cookies from \"js-cookie\";\n\nexport default function storeGetUserIdentifier(): string {\n return Cookies.get(\"ajs_user_id\") ||\n Cookies.get(\"ajs_anonymous_id\") ||\n Cookies.get(\"_cioanonid\");\n}\n","import {defineStore} from \"pinia\";\nimport {createSongBuilder, fetchSongBuilder, fetchSongBuilderByEmail, updateSongBuilder} from \"@songfinch/data-source/songbuilder\";\nimport type {ArtistListType, ArtistType, SongBuilderState} from \"@songfinch/types/types\";\nimport {map, pick, size} from \"lodash-es\";\nimport {RouteParamsRaw} from \"vue-router\";\nimport {useSongBuilderProgress} from \"@songfinch/customer/composables/useSongBuilderProgress\";\nimport dayjs from \"dayjs\";\nimport modal from \"@songfinch/shared/plugins/modal\";\nimport router from \"@songfinch/customer/router\";\nimport {useStorage} from \"@vueuse/core\";\nimport storeGetUserIdentifier from \"@songfinch/customer/store_v2/storeGetUserIdentifier\";\n\nconst SONGBUILDER_STORAGE_SLUG = \"sf_songbuilder_slug\";\nexport const songBuilderSlug = useStorage(SONGBUILDER_STORAGE_SLUG, null);\n\nexport const FIELDS_LIMITS = Object.freeze({\n question: {maxlength: 10000},\n mustIncTitle: {maxlength: 100},\n mustIncDesc: {maxlength: 200},\n});\n\nexport const useSongBuilderStore = defineStore(\"songBuilder\", {\n state: (): SongBuilderState => ({\n recipient: undefined,\n mention_recipient: undefined,\n relationship: undefined,\n occasion: undefined,\n mention_occasion: undefined,\n preferred_artist_switch: undefined,\n preferred_artist: undefined,\n require_update_artist: undefined,\n gifter_email: undefined,\n selected_artists: undefined,\n genre: undefined,\n gender: undefined,\n tempo: undefined,\n moods: undefined,\n selected_recommended_artist: undefined,\n recommended_artists: undefined,\n lastSongBuildPage: undefined,\n song_product_name: undefined,\n pronunciations: undefined,\n questions: undefined,\n must_have_questions: undefined,\n deliveryType: undefined,\n selectedDeliveryMethod: undefined,\n }),\n\n getters: {\n getSongProduct: (state): string => state.song_product_name || \"personalized-song\",\n getArtistData: (state): ArtistType | ArtistListType | undefined => {\n if (state.selected_artists?.[0]) {\n return state.selected_artists[0];\n }\n return state.selected_recommended_artist;\n },\n },\n actions: {\n async migrateLocalStorageData() { // Can be removed later\n let data = localStorage.getItem(\"sf_song_data\");\n data &&= JSON.parse(data);\n if (data?.lastSongBuildPage) {\n this.setData(data);\n await this.saveData();\n localStorage.removeItem(\"sf_song_data\");\n }\n },\n async init() {\n await this.migrateLocalStorageData();\n\n if (songBuilderSlug.value) {\n try {\n const remoteData = await fetchSongBuilder(songBuilderSlug.value);\n this.setData(remoteData.song_data);\n } catch (e) {\n songBuilderSlug.value = null;\n }\n }\n },\n setData(data: SongBuilderState) {\n this.$reset();\n this.$patch(data);\n },\n async saveData() {\n const data = {\n song_data: this.$state,\n email: this.gifter_email,\n external_user_id: storeGetUserIdentifier()\n };\n\n if (songBuilderSlug.value) {\n await updateSongBuilder(songBuilderSlug.value, data);\n } else {\n const resData = await createSongBuilder(data);\n songBuilderSlug.value = resData.slug;\n }\n },\n updateSelectedArtistsData() {\n this.selected_artists ||= [];\n const selected = this.selected_artists.filter((a) => a);\n if (!selected.length) {\n this.preferred_artist = \"\";\n return;\n }\n this.preferred_artist = selected.map((a) => a.artist_name).join(\", \");\n\n const artist = selected[0];\n this.gender = \"3\";\n this.genre = artist.selected_genre; // Object.keys can be removed later\n },\n selectArtist(data: {artist: ArtistListType, index?: number }) {\n const artist = data.artist;\n if (!artist) return;\n this.selected_artists ||= [];\n\n this.preferred_artist_switch = true;\n\n if (!this.selected_artists?.find((a) => a?.id === artist.id)) {\n const artistData = pick(artist, [\n \"id\",\n \"artist_name\",\n \"photo\",\n \"genres\",\n \"gender\",\n \"fromSinglePage\",\n \"available_delivery_days\",\n \"artist_power_user\",\n \"artist_verified\",\n \"exclusivity\",\n \"videos\",\n ]);\n artistData.genresOptions = map(artistData.genres, (g, i) => ({id: i, text: g}));\n artistData.videos = artistData.videos ? artistData.videos.find((video) => video?.video_type === \"Artist Intro\") || null : null;\n if (size(artistData.genres) === 1) artistData.selected_genre = artistData.genresOptions[0].id;\n this.selected_artists[0] = artistData;\n this.updateSelectedArtistsData();\n }\n },\n removeSelectedArtist(index: number) {\n this.selected_artists?.splice(index, 1);\n this.updateSelectedArtistsData();\n },\n clearSelectedArtists() {\n this.selected_artists = undefined;\n this.preferred_artist = \"\";\n },\n\n setRecommendedArtists(val?: ArtistType[]) {\n this.recommended_artists = val;\n },\n selectRecommendedArtist(val?: ArtistType) {\n this.selected_recommended_artist = val;\n },\n setLastSongBuildPage(route?: RouteParamsRaw) {\n this.lastSongBuildPage = route;\n },\n addPronunciation() {\n this.pronunciations.push({subject: \"\", pronounce: \"\", audio: null, saved: false});\n },\n removePronunciation(index) {\n this.pronunciations.splice(index, 1);\n },\n async validateSongData({redirect, toPage}?: {redirect?: boolean, toPage?: string} = {}) {\n redirect ??= true;\n const error = \"\";\n const query = {};\n let showWarning = true;\n let invalidPage = \"\";\n\n const {progressStats, sections} = useSongBuilderProgress();\n\n if (!progressStats.value.valid) {\n sections.find(item => {\n if (item.isCompleted) return false;\n invalidPage = item.id;\n return true;\n });\n }\n\n if (!invalidPage && this.pronunciations?.length) {\n const startLength = this.pronunciations.length;\n this.pronunciations = this.pronunciations.filter(p => !(p.expire && dayjs().isAfter(p.expire)));\n if (startLength !== this.pronunciations.length) {\n invalidPage ||= \"BsReview\";\n showWarning = false;\n redirect = toPage !== \"BsReview\";\n modal.swal({\n icon: \"warning\",\n html: error || \"Your pronunciation audio file has expired. Please add a new one.\"\n });\n }\n }\n\n if (!invalidPage && this.require_update_artist) {\n invalidPage = \"BsSongArtist\";\n showWarning = false;\n }\n\n if (this.selected_artists?.some(a => !a.selected_genre)) {\n invalidPage = \"BsSongArtistSelection\";\n }\n\n if (invalidPage) {\n if (showWarning) {\n modal.swal({\n icon: \"warning\",\n html: error || \"Please fill out all required fields before proceeding.\"\n });\n }\n this.setLastSongBuildPage({name: invalidPage, query});\n if (redirect && router.currentRoute.value.name !== invalidPage) {\n await router.push({name: invalidPage, query});\n }\n return false;\n }\n return true;\n },\n isArtistAvailableForDayRush(add_days) {\n if (+add_days > 3) return true;\n const artistData = this.getArtistData;\n if (!artistData || !(artistData?.artist_verified || artistData?.artist_power_user || artistData?.exclusivity)) return false;\n return artistData.available_delivery_days?.includes(String(add_days));\n },\n resetData() {\n this.$reset();\n songBuilderSlug.value = null;\n // TODO: Do we need to reset in DB?\n },\n isInProgress() {\n return !!songBuilderSlug.value;\n },\n async loadUserData(email) {\n if (!songBuilderSlug.value) {\n try {\n const data = await fetchSongBuilderByEmail(email);\n if (data) {\n this.setData(data[0]?.song_data);\n songBuilderSlug.value = data[0]?.slug;\n }\n } catch (e) {}\n }\n }\n },\n});\n","\n\n\n","var Limit;\n(function (Limit) {\n Limit[Limit[\"All\"] = 0] = \"All\";\n Limit[Limit[\"Two\"] = 1] = \"Two\";\n Limit[Limit[\"One\"] = 2] = \"One\";\n})(Limit || (Limit = {}));\nlet config;\nlet rootDocument;\nexport function finder(input, options) {\n if (input.nodeType !== Node.ELEMENT_NODE) {\n throw new Error(`Can't generate CSS selector for non-element node type.`);\n }\n if (\"html\" === input.tagName.toLowerCase()) {\n return \"html\";\n }\n const defaults = {\n root: document.body,\n idName: (name) => true,\n className: (name) => true,\n tagName: (name) => true,\n attr: (name, value) => false,\n seedMinLength: 1,\n optimizedMinLength: 2,\n threshold: 1000,\n maxNumberOfTries: 10000,\n };\n config = Object.assign(Object.assign({}, defaults), options);\n rootDocument = findRootDocument(config.root, defaults);\n let path = bottomUpSearch(input, Limit.All, () => bottomUpSearch(input, Limit.Two, () => bottomUpSearch(input, Limit.One)));\n if (path) {\n const optimized = sort(optimize(path, input));\n if (optimized.length > 0) {\n path = optimized[0];\n }\n return selector(path);\n }\n else {\n throw new Error(`Selector was not found.`);\n }\n}\nfunction findRootDocument(rootNode, defaults) {\n if (rootNode.nodeType === Node.DOCUMENT_NODE) {\n return rootNode;\n }\n if (rootNode === defaults.root) {\n return rootNode.ownerDocument;\n }\n return rootNode;\n}\nfunction bottomUpSearch(input, limit, fallback) {\n let path = null;\n let stack = [];\n let current = input;\n let i = 0;\n while (current && current !== config.root.parentElement) {\n let level = maybe(id(current)) ||\n maybe(...attr(current)) ||\n maybe(...classNames(current)) ||\n maybe(tagName(current)) || [any()];\n const nth = index(current);\n if (limit === Limit.All) {\n if (nth) {\n level = level.concat(level.filter(dispensableNth).map((node) => nthChild(node, nth)));\n }\n }\n else if (limit === Limit.Two) {\n level = level.slice(0, 1);\n if (nth) {\n level = level.concat(level.filter(dispensableNth).map((node) => nthChild(node, nth)));\n }\n }\n else if (limit === Limit.One) {\n const [node] = (level = level.slice(0, 1));\n if (nth && dispensableNth(node)) {\n level = [nthChild(node, nth)];\n }\n }\n for (let node of level) {\n node.level = i;\n }\n stack.push(level);\n if (stack.length >= config.seedMinLength) {\n path = findUniquePath(stack, fallback);\n if (path) {\n break;\n }\n }\n current = current.parentElement;\n i++;\n }\n if (!path) {\n path = findUniquePath(stack, fallback);\n }\n return path;\n}\nfunction findUniquePath(stack, fallback) {\n const paths = sort(combinations(stack));\n if (paths.length > config.threshold) {\n return fallback ? fallback() : null;\n }\n for (let candidate of paths) {\n if (unique(candidate)) {\n return candidate;\n }\n }\n return null;\n}\nfunction selector(path) {\n let node = path[0];\n let query = node.name;\n for (let i = 1; i < path.length; i++) {\n const level = path[i].level || 0;\n if (node.level === level - 1) {\n query = `${path[i].name} > ${query}`;\n }\n else {\n query = `${path[i].name} ${query}`;\n }\n node = path[i];\n }\n return query;\n}\nfunction penalty(path) {\n return path.map((node) => node.penalty).reduce((acc, i) => acc + i, 0);\n}\nfunction unique(path) {\n switch (rootDocument.querySelectorAll(selector(path)).length) {\n case 0:\n throw new Error(`Can't select any node with this selector: ${selector(path)}`);\n case 1:\n return true;\n default:\n return false;\n }\n}\nfunction id(input) {\n const elementId = input.getAttribute(\"id\");\n if (elementId && config.idName(elementId)) {\n return {\n name: \"#\" + cssesc(elementId, { isIdentifier: true }),\n penalty: 0,\n };\n }\n return null;\n}\nfunction attr(input) {\n const attrs = Array.from(input.attributes).filter((attr) => config.attr(attr.name, attr.value));\n return attrs.map((attr) => ({\n name: \"[\" +\n cssesc(attr.name, { isIdentifier: true }) +\n '=\"' +\n cssesc(attr.value) +\n '\"]',\n penalty: 0.5,\n }));\n}\nfunction classNames(input) {\n const names = Array.from(input.classList).filter(config.className);\n return names.map((name) => ({\n name: \".\" + cssesc(name, { isIdentifier: true }),\n penalty: 1,\n }));\n}\nfunction tagName(input) {\n const name = input.tagName.toLowerCase();\n if (config.tagName(name)) {\n return {\n name,\n penalty: 2,\n };\n }\n return null;\n}\nfunction any() {\n return {\n name: \"*\",\n penalty: 3,\n };\n}\nfunction index(input) {\n const parent = input.parentNode;\n if (!parent) {\n return null;\n }\n let child = parent.firstChild;\n if (!child) {\n return null;\n }\n let i = 0;\n while (child) {\n if (child.nodeType === Node.ELEMENT_NODE) {\n i++;\n }\n if (child === input) {\n break;\n }\n child = child.nextSibling;\n }\n return i;\n}\nfunction nthChild(node, i) {\n return {\n name: node.name + `:nth-child(${i})`,\n penalty: node.penalty + 1,\n };\n}\nfunction dispensableNth(node) {\n return node.name !== \"html\" && !node.name.startsWith(\"#\");\n}\nfunction maybe(...level) {\n const list = level.filter(notEmpty);\n if (list.length > 0) {\n return list;\n }\n return null;\n}\nfunction notEmpty(value) {\n return value !== null && value !== undefined;\n}\nfunction* combinations(stack, path = []) {\n if (stack.length > 0) {\n for (let node of stack[0]) {\n yield* combinations(stack.slice(1, stack.length), path.concat(node));\n }\n }\n else {\n yield path;\n }\n}\nfunction sort(paths) {\n return Array.from(paths).sort((a, b) => penalty(a) - penalty(b));\n}\nfunction* optimize(path, input, scope = {\n counter: 0,\n visited: new Map(),\n}) {\n if (path.length > 2 && path.length > config.optimizedMinLength) {\n for (let i = 1; i < path.length - 1; i++) {\n if (scope.counter > config.maxNumberOfTries) {\n return; // Okay At least I tried!\n }\n scope.counter += 1;\n const newPath = [...path];\n newPath.splice(i, 1);\n const newPathKey = selector(newPath);\n if (scope.visited.has(newPathKey)) {\n return;\n }\n if (unique(newPath) && same(newPath, input)) {\n yield newPath;\n scope.visited.set(newPathKey, true);\n yield* optimize(newPath, input, scope);\n }\n }\n }\n}\nfunction same(path, input) {\n return rootDocument.querySelector(selector(path)) === input;\n}\nconst regexAnySingleEscape = /[ -,\\.\\/:-@\\[-\\^`\\{-~]/;\nconst regexSingleEscape = /[ -,\\.\\/:-@\\[\\]\\^`\\{-~]/;\nconst regexExcessiveSpaces = /(^|\\\\+)?(\\\\[A-F0-9]{1,6})\\x20(?![a-fA-F0-9\\x20])/g;\nconst defaultOptions = {\n escapeEverything: false,\n isIdentifier: false,\n quotes: \"single\",\n wrap: false,\n};\nfunction cssesc(string, opt = {}) {\n const options = Object.assign(Object.assign({}, defaultOptions), opt);\n if (options.quotes != \"single\" && options.quotes != \"double\") {\n options.quotes = \"single\";\n }\n const quote = options.quotes == \"double\" ? '\"' : \"'\";\n const isIdentifier = options.isIdentifier;\n const firstChar = string.charAt(0);\n let output = \"\";\n let counter = 0;\n const length = string.length;\n while (counter < length) {\n const character = string.charAt(counter++);\n let codePoint = character.charCodeAt(0);\n let value = void 0;\n // If it’s not a printable ASCII character…\n if (codePoint < 0x20 || codePoint > 0x7e) {\n if (codePoint >= 0xd800 && codePoint <= 0xdbff && counter < length) {\n // It’s a high surrogate, and there is a next character.\n const extra = string.charCodeAt(counter++);\n if ((extra & 0xfc00) == 0xdc00) {\n // next character is low surrogate\n codePoint = ((codePoint & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;\n }\n else {\n // It’s an unmatched surrogate; only append this code unit, in case\n // the next code unit is the high surrogate of a surrogate pair.\n counter--;\n }\n }\n value = \"\\\\\" + codePoint.toString(16).toUpperCase() + \" \";\n }\n else {\n if (options.escapeEverything) {\n if (regexAnySingleEscape.test(character)) {\n value = \"\\\\\" + character;\n }\n else {\n value = \"\\\\\" + codePoint.toString(16).toUpperCase() + \" \";\n }\n }\n else if (/[\\t\\n\\f\\r\\x0B]/.test(character)) {\n value = \"\\\\\" + codePoint.toString(16).toUpperCase() + \" \";\n }\n else if (character == \"\\\\\" ||\n (!isIdentifier &&\n ((character == '\"' && quote == character) ||\n (character == \"'\" && quote == character))) ||\n (isIdentifier && regexSingleEscape.test(character))) {\n value = \"\\\\\" + character;\n }\n else {\n value = character;\n }\n }\n output += value;\n }\n if (isIdentifier) {\n if (/^-[-\\d]/.test(output)) {\n output = \"\\\\-\" + output.slice(1);\n }\n else if (/\\d/.test(firstChar)) {\n output = \"\\\\3\" + firstChar + \" \" + output.slice(1);\n }\n }\n // Remove spaces after `\\HEX` escapes that are not followed by a hex digit,\n // since they’re redundant. Note that this is only possible if the escape\n // sequence isn’t preceded by an odd number of backslashes.\n output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) {\n if ($1 && $1.length % 2) {\n // It’s not safe to remove the space, so don’t.\n return $0;\n }\n // Strip the space.\n return ($1 || \"\") + $2;\n });\n if (!isIdentifier && options.wrap) {\n return quote + output + quote;\n }\n return output;\n}\n","import {finder} from \"@medv/finder\";\n\n\nexport function generateElementSelector(el) {\n return finder(el, {\n seedMinLength: 5,\n optimizedMinLength: 3,\n });\n}\n","import app from \"@songfinch/customer/app.js\";\nimport hash_scroll from \"@songfinch/customer/helpers/hash_scroll\";\nimport {generateElementSelector} from \"@songfinch/customer/helpers/html_helpers\";\nimport analyticsEvent from \"@songfinch/shared/helpers/analyticsEvent\";\nimport modal from \"@songfinch/shared/plugins/modal/index\";\n\n//This directive can be assigned to root or any element that has stopPropagation in case we want to track links\nconst ctaHandler = {\n mounted(el, binding) {\n el.addEventListener(\"click\", (e) => clickEventHandler(e, {onlyEvents: false, ...binding.value}));\n }\n};\n\n// 2 main logic here:\n// 1) Send CTA event\n// 2) handle regular links that managed through CMS. if link start with http(s) then do regular redirect with reload\n// Otherwise it will be handler by vue router\n\nexport function clickEventHandler (event, {onlyEvents} = {onlyEvents: false}) {\n // ensure we use the link, in case the click has been received by a subelement\n let {target} = event;\n\n while (target && ![\"A\", \"BUTTON\"].includes(target.tagName)) target = target.parentNode;\n\n if (!target) return;\n\n // Fire tracking event\n let eventElement;\n try {\n eventElement = generateElementSelector(target);\n } catch (e) {\n eventElement = `unknown`;\n }\n\n const sfCtaAtributes = {};\n //Array.from(target.attributes).forEach((attribute) => {\n for (const attribute of target.attributes) {\n if (attribute.name.indexOf(\"sfcta-\") === 0) {\n sfCtaAtributes[attribute.name.replace(\"sfcta-\", \"\")] = attribute.value;\n }\n }\n setTimeout(() => {\n analyticsEvent(\"_sf_cta_clicked\", {\n location: eventElement,\n destination: target.href,\n text: target.textContent?.trim(),\n type: target.tagName === \"A\" ? \"link\" : \"button\",\n timestamp: dateTimeInSeconds(),\n ...sfCtaAtributes\n });\n }, 10);\n\n // handle only links that do not reference external song_page_access\n if (!onlyEvents && target.href && !target.classList.contains(\"skipVueRouting\")) {\n if (!isExternalReplace(target.href) && !target.href.startsWith(\"mailto:\")) {\n\n if (target?.getAttribute(\"close-swal\") !== null) {\n modal.swal.close();\n }\n // some sanity checks taken from vue-router:\n // https://github.com/vuejs/vue-router/blob/dev/src/components/link.js#L106\n const {altKey, ctrlKey, metaKey, shiftKey, button, defaultPrevented} = event;\n // don't handle with control keys\n if (metaKey || altKey || ctrlKey || shiftKey) return;\n // don't handle right clicks\n if (button !== undefined && button !== 0) return;\n // don't handle when preventDefault called\n if (defaultPrevented) return;\n // don't handle if `target=\"_blank\"`\n if (target && target.getAttribute) {\n const linkTarget = target.getAttribute(\"target\");\n if (/\\b_blank\\b/i.test(linkTarget)) return;\n }\n event.preventDefault();\n const url = new URL(target.href);\n if (hash_scroll(url.hash)) return;\n const to = url.pathname + url.search + url.hash;\n if (window.location.pathname !== to && event.preventDefault) {\n return app.config.globalProperties.$router.push(to);\n }\n } else {\n target.setAttribute(\"target\", \"_blank\");\n }\n }\n}\n\nfunction isExternalReplace(url) {\n const domain = (url) => url.replace(\"http://\", \"\").replace(\"https://\", \"\").split(\"/\")[0];\n return domain(location.href) !== domain(url);\n}\n\nfunction dateTimeInSeconds() {\n return Math.round(Date.now() / 1000);\n}\n\n\nexport default ctaHandler;\n","import Cookies from \"js-cookie\";\n\nexport const removeExistingAdCookies = (cookieName) => {\n Cookies.remove(cookieName, {path: \"/\", secure: false});\n};\n\nexport const checkUrlQueryForAdIds = async (query) => {\n if (!Cookies) return;\n const {gclid} = query;\n const cookieExpirationDays = 7;\n if (gclid) {\n const cookieName = \"gclid\";\n removeExistingAdCookies(cookieName);\n Cookies.set(cookieName, gclid, {expires: cookieExpirationDays});\n }\n};","class Event {\n constructor() {\n this.events = {};\n }\n\n on(eventName, fn, clearOnRoute = true) {\n this.events[eventName] = this.events[eventName] || [];\n fn.clearOnRoute = clearOnRoute;\n this.events[eventName].push(fn);\n }\n\n off(eventName, fn) {\n if (this.events[eventName]) {\n for (let i = 0; i < this.events[eventName].length; i++) {\n if (this.events[eventName][i] === fn) {\n this.events[eventName].splice(i, 1);\n break;\n }\n }\n }\n }\n\n trigger(eventName, data) {\n if (this.events[eventName]) {\n this.events[eventName].forEach(function (fn) {\n fn(data);\n });\n }\n }\n\n clearRouteEvents() {\n Object.values(this.events).forEach(event => {\n for (let i = event.length - 1; i > -1; i--) {\n if (event[i].clearOnRoute) event.splice(i, 1);\n }\n });\n }\n}\n\nexport const eventBus = new Event();\n\nexport default {\n install(app) {\n app.config.globalProperties.$bus = eventBus;\n }\n};\n","import {ref, Ref, shallowRef, readonly} from \"vue\";\nimport {TopBannerParams} from \"@songfinch/customer/types/top_banner\";\n\nexport const globalTopBannerPayload: Ref = ref();\n\nexport const setTopBanner = (payload?: TopBannerParams) => {\n if (payload?.component) {\n payload.component = shallowRef(payload.component);\n }\n globalTopBannerPayload.value = payload;\n};\n\nexport default function useTopBanner() {\n return {\n setTopBanner,\n globalTopBannerPayload: readonly(globalTopBannerPayload)\n };\n}\n","import axios, {type AxiosRequestConfig} from \"axios\";\nimport type {\n SignInOrigin, \n CheckForPasswordResponse, \n FetchAccessPasscodeOptions, \n AccessPasscodeResponse,\n SubmitAccessPasscodeResponse,\n FetchCheckUserForOTPResponseType\n} from \"@songfinch/types\";\n\n\nexport async function fetchCheckUserForOTP(email: string): Promise {\n const res = await axios.post(\"/access_passcodes/check_user_password/\", {email});\n return res.data;\n}\n\nexport async function fetchAccessPasscode(payload: FetchAccessPasscodeOptions): Promise {\n const res = await axios.post(\"/access_passcodes/\", payload);\n return res.data;\n\n}\n\nexport async function submitAccessPasscode(passcode: string, sign_in_origin?: SignInOrigin): Promise {\n const res = await axios.post(\"/access_passcodes/create_session\", {passcode, sign_in_origin}, {meta: {updateCSRFToken: true}} as AxiosRequestConfig);\n return res.data;\n}\n","import axios from \"axios\";\nimport type {User, PostToExpressSignupResponseType} from \"@songfinch/types/types\";\n\nexport const fetchUser = async (user_id: number): Promise => {\n try {\n const res = await axios.get(\"/user\", {\n params: {\n user_id\n }\n });\n return res.data.user;\n } catch (error) {\n return undefined;\n }\n};\n\nexport const postToExpressSignup = async (email: string, name?: string): Promise => {\n try {\n await axios.post(\"/user/express_signup\", {\n email,\n name\n });\n return {success: true};\n } catch (error) {\n if (axios.isAxiosError(error)) {\n if (error.response?.data.error === \"Name is required\") {\n return {success: false, nameRequired: true};\n }\n }\n throw error;\n }\n};","import {ref, computed} from \"vue\";\nimport {useStore} from \"vuex\";\n\nimport {StorySong} from \"@songfinch/types/types\";\nimport {isValidEmail} from \"@songfinch/utils/src/validators\";\n\ntype AuthModalTypes = \"default\" | \"story\"\n\nconst authExpressModalOpen = ref(false);\nconst authModalSecondaryText = ref(\"Access your Songfinch account\");\n\nimport {submitAccessPasscode, fetchAccessPasscode} from \"@songfinch/data-source/auth\";\nimport {postToExpressSignup} from \"@songfinch/data-source/users\";\nimport {useNotification} from \"@songfinch/design-system/src/composables/useNotification\";\nimport {normalizeError} from \"@songfinch/utils/src/error\";\n\nimport type {TrackEventHandler} from \"@songfinch/types\";\n\nexport default function useAuthExpress(trackEvent?: TrackEventHandler) {\n const store = useStore();\n const {setNotification} = useNotification();\n const userName = ref(\"\");\n const userEmail = ref(\"\");\n const otpCode = ref(\"\");\n const authShowNameField = ref(false);\n const useOtpCodeFlow = ref(false);\n\n const authFormIsValid = computed(() => {\n const isEmailValid = isValidEmail(userEmail.value);\n\n if (authShowNameField.value === false) {\n return isEmailValid;\n }\n return isEmailValid && userName.value.length > 0;\n });\n\n const otpCodeIsValid = computed(() => {\n return !!(otpCode.value && otpCode.value.length === 6);\n });\n\n const setAuthModalSecondaryText = (type: AuthModalTypes, data?: StorySong) => {\n if (type === \"story\" && data) {\n const songTitle = data.title;\n authModalSecondaryText.value = `For privacy, participation on ${songTitle} is only allowed if you’re a verified user. Please verify your email and join the conversation!`;\n } else {\n authModalSecondaryText.value = \"Access your Songfinch account\";\n }\n };\n\n const openExpressAuthModal = (type: AuthModalTypes = \"default\", data?: StorySong) => {\n cleanAuthExpressModal();\n setAuthModalSecondaryText(type, data);\n authExpressModalOpen.value = true;\n };\n\n const closeAuthExpressModal = () => {\n cleanAuthExpressModal();\n authExpressModalOpen.value = false;\n };\n\n const cleanAuthExpressModal = () => {\n userName.value = \"\";\n userEmail.value = \"\"; \n useOtpCodeFlow.value = false;\n authShowNameField.value = false;\n };\n\n const handleOTPInitiatition = async () => {\n if (!authFormIsValid.value) {\n // todo throw error maybe?\n return;\n }\n try {\n const res = await postToExpressSignup(userEmail.value, userName.value);\n if (res.success) {\n useOtpCodeFlow.value = true;\n if (authShowNameField.value) {\n handleTrackEvent(\"Express Auth Modal New User Signup Submitted\");\n } else {\n handleTrackEvent(\"Express Auth Modal Sign-in Pressed\");\n }\n handleTrackEvent(\"Express Auth OTP Form Shown\");\n return;\n }\n userName.value = \"\";\n authShowNameField.value = true;\n handleTrackEvent(\"Express Auth Modal Sign-in Pressed\");\n handleTrackEvent(\"Express Auth Modal New User Signup Shown\");\n } catch (error: unknown) {\n setNotification({\n error\n });\n }\n };\n\n const handleOTPAuthentication = async () => {\n handleTrackEvent(\"Express Auth OTP Submitted\");\n\n if (!otpCodeIsValid.value) {\n setNotification({\n error: \"Please enter the 5-digit code sent to your email.\"\n });\n }\n try {\n const res = await submitAccessPasscode(otpCode.value, \"story_page\");\n if (res.user) {\n cleanAuthExpressModal();\n authExpressModalOpen.value = false;\n store.dispatch(\"auth/afterLogin\", {user: res.user});\n handleTrackEvent(\"Express Auth OTP Success\");\n }\n } catch (error) {\n const normalizedError = normalizeError(error);\n\n if (normalizedError === \"Passcode expired\") {\n handleTrackEvent(\"Express Auth OTP Expired\");\n }\n\n setNotification({\n heading: \"Error\",\n error: normalizedError,\n });\n }\n };\n\n const resendOTPCode = async () => {\n try {\n await fetchAccessPasscode({\n email: userEmail.value,\n method: \"email\",\n sign_in_origin: \"story_page\",\n resent: true\n });\n setNotification({\n text: \"New code sent!\"\n });\n handleTrackEvent(\"Express Auth OTP Code Resend Pressed\");\n } catch (error) {\n setNotification({\n heading: \"Error\",\n error: normalizeError(error)\n });\n }\n };\n\n const handleTrackEvent = (eventName: string) => {\n if (trackEvent) {\n trackEvent(eventName);\n }\n };\n\n\n return {\n userName,\n userEmail,\n otpCode,\n authExpressModalOpen,\n authShowNameField,\n authFormIsValid,\n authModalSecondaryText,\n useOtpCodeFlow,\n otpCodeIsValid,\n openExpressAuthModal,\n closeAuthExpressModal,\n handleOTPInitiatition,\n handleOTPAuthentication,\n resendOTPCode\n };\n}\n","import {forEach, filter} from \"lodash-es\";\nimport {useSongBuilderStore} from \"@songfinch/customer/store_v2/useSongBuilderStore\";\nconst dbVals = window.appSettings.events_value;\nconst gtmSongData = {};\n\nconst gtm_song_data_helper = {\n BsOccasionRecipient: () => {\n const storeSongBuilder = useSongBuilderStore();\n if (!storeSongBuilder.recipient || !storeSongBuilder.relationship) return;\n gtmSongData.recipient = storeSongBuilder.recipient;\n gtmSongData.relationship = storeSongBuilder.relationship;\n gtmSongData.mention_recipient = storeSongBuilder.mention_recipient;\n\n gtmSongData.occasion = storeSongBuilder.occasion;\n gtmSongData.mention_occasion = storeSongBuilder.mention_occasion;\n gtmSongData.step_name = \"BsOccasionRecipient\";\n gtmSongData.step_number = 1;\n },\n BsGifterEmail2: () => {\n const storeSongBuilder = useSongBuilderStore();\n if (!storeSongBuilder.gifter_email ) return;\n gtmSongData.gifter_email = storeSongBuilder.gifter_email;\n gtmSongData.step_name = \"BsGifterEmail2\";\n gtmSongData.step_number = 2;\n },\n BsSongArtist: () => {\n const storeSongBuilder = useSongBuilderStore();\n if (storeSongBuilder.preferred_artist_switch === undefined) return;\n gtmSongData.preferred_artist_switch = storeSongBuilder.preferred_artist_switch;\n gtmSongData.step_name = \"BsSongArtist\";\n gtmSongData.step_number = 5;\n },\n BsSongCharacteristics: () => {\n const storeSongBuilder = useSongBuilderStore();\n if (!storeSongBuilder.gender || !storeSongBuilder.genre || !storeSongBuilder.moods?.length || !storeSongBuilder.tempo) return;\n gtmSongData.gender = dbVals.genders[storeSongBuilder.gender];\n gtmSongData.genre = dbVals.genres[storeSongBuilder.genre];\n gtmSongData.moods = storeSongBuilder?.moods.map(m => dbVals.moods[m]).join(\", \") ;\n gtmSongData.tempo = dbVals.tempos[storeSongBuilder.tempo];\n gtmSongData.step_name = \"BsSongCharacteristics\";\n gtmSongData.step_number = 6;\n },\n BsSongArtistsList: () => {\n const storeSongBuilder = useSongBuilderStore();\n if (!storeSongBuilder.selected_recommended_artist) return;\n gtmSongData.recommended_artist_name = storeSongBuilder.selected_recommended_artist.artist_name;\n gtmSongData.recommended_artist_id = storeSongBuilder.selected_recommended_artist.id;\n gtmSongData.recommended_artists = storeSongBuilder.recommended_artists;\n\n gtmSongData.step_name = \"BsSongArtistsList\";\n // This step is skipped in the selected artist flow\n gtmSongData.step_number = 7;\n\n // TODO: Note this is for backwards compatibility, we are updating the field name for a misspelling and need to update GTM after this\n gtmSongData.submited_artists = null;\n gtmSongData.submitted_artists = null;\n },\n BsSongArtistSelection: () => {\n const storeSongBuilder = useSongBuilderStore();\n if (!storeSongBuilder.selected_artists?.length) return;\n // TODO: Note this is for backwards compatibility, we are updating the field name for a misspelling and need to update GTM after this\n gtmSongData.submited_artists = storeSongBuilder.selected_artists;\n gtmSongData.submitted_artists = gtmSongData.submited_artists;\n gtmSongData.step_name = \"BsSongArtistSelection\";\n gtmSongData.step_number = 5.1;\n\n gtmSongData.recommended_artist_name = null;\n gtmSongData.recommended_artist_id = null;\n gtmSongData.recommended_artists = null;\n },\n BsStoryDetailsCombined: () => {\n const storeSongBuilder = useSongBuilderStore();\n if (!storeSongBuilder.questions?.[0] || !storeSongBuilder.questions?.[1]) return;\n gtmSongData.story_details = `**${storeSongBuilder.questions[0].question}**\\r\\n${storeSongBuilder.questions[0].answer}`;\n gtmSongData.story_additional_details = `**${storeSongBuilder.questions[1].question}**\\r\\n\\r\\n${storeSongBuilder.questions[1].answer}`;\n\n if (storeSongBuilder.must_have_questions) {\n const new_array = {};\n forEach(storeSongBuilder.must_have_questions, (el, index) => {\n if (el.answer) {\n new_array[`musthave_${index + 1}`] = `**${el.answer}** - ${el.description}`;\n }\n });\n gtmSongData.gtm_m_h_questions = JSON.stringify(new_array);\n }\n gtmSongData.step_name = \"BsStoryDetails\";\n gtmSongData.step_number = 10;\n },\n BsStoryPronunciation: () => {\n const storeSongBuilder = useSongBuilderStore();\n if (!storeSongBuilder.pronunciations?.length) return;\n const filtered_pronunciations = filter(storeSongBuilder.pronunciations, (p) => {\n return p.pronounce || p.subject;\n });\n gtmSongData.pronunciations = filtered_pronunciations;\n gtmSongData.step_name = \"BsStoryPronunciation\";\n gtmSongData.step_number = 14;\n },\n BsReview: () => {\n gtmSongData.step_name = \"BsReview\";\n gtmSongData.step_number = 12;\n }\n};\n\nconst initGtmData = () => {\n Object.values(gtm_song_data_helper).forEach(v => v());\n};\n\nexport default gtm_song_data_helper;\n\nexport {initGtmData, gtmSongData};\n","export function setSessionUser(userData: unknown) {\n if (userData) {\n sessionStorage.setItem(\"sf_temp_user\", JSON.stringify({sessioned: true, ...userData}));\n }\n}\n\nexport function getSessionUser() {\n const saved = sessionStorage.getItem(\"sf_temp_user\");\n if (saved) return JSON.parse(saved);\n}\n","import axios from \"axios\";\nimport Cookies from \"js-cookie\";\nimport {map, omit, reduce, cloneDeep} from \"lodash-es\";\nimport uuid from \"@songfinch/utils/src/uuid\";\nimport sha256 from \"@songfinch/shared/helpers/sha256\";\nimport analyticsEvent from \"@songfinch/shared/helpers/analyticsEvent\";\n\nimport app from \"@songfinch/customer/app.js\";\nimport router from \"@songfinch/customer/router\";\nimport store from \"@songfinch/customer/store\";\n\n\nimport gtm_song_data_helper, {\n initGtmData, gtmSongData\n} from \"../helpers/gtm_song_data_helper\";\nimport useInstantProductBuilder from \"@songfinch/customer/composables/useInstantProductBuilder\";\nimport {getSessionUser} from \"@songfinch/customer/store_v2/storeTempUser\";\nimport {flipperValues} from \"@songfinch/shared/plugins/flipper\";\nimport storeGetUserIdentifier from \"@songfinch/customer/store_v2/storeGetUserIdentifier\";\nimport {useSongBuilderStore} from \"@songfinch/customer/store_v2/useSongBuilderStore\";\n\nimport {TrackEventHandler} from \"@songfinch/types\";\n\nconst {vitamixCollectionTitle} = useInstantProductBuilder();\n\nconst SONG_BUILDER_QUIZ_NAME = \"purchase_last\";\nconst SONG_BUILDER_QUIZ_NUMBER = \"3\";\n\nconst NON_ADDON_PRODUCTS = [\"song\", \"gift-card\"];\n\nfunction mapBackendProductToEventProductModel(p) {\n // Note we are remapping Product.title => TrackedProduct.name for using the \"human readable name when forwarding\n // Product.name => TrackedProduct.code\n return {\n id: p.sku,\n product_id: p.sku,\n content_id: p.sku,\n content_type: \"product\",\n name: p.title,\n code: p.name,\n quantity: p.quantity,\n cta_clicked: p.cta_clicked,\n brand: \"songfinch\",\n category: p.product_type,\n price: (p.cartPrice ?? p.price) / 100,\n currency: \"USD\",\n product_type: p.product_type,\n add_on: !NON_ADDON_PRODUCTS.includes(p.product_type),\n image_url: app.config.globalProperties.$cld.url(p.photo) || \"\",\n variant_name: p.extra_info?.variant_name,\n instant_product: p.extra_info?.instant_product\n };\n}\n\nfunction getProducts() {\n const cart = store.state.cart.cart;\n\n //Filter products that has price\n //Submitted song will be free product we need to exclude it\n const products = cart.products\n .filter((p) => +p.price)\n .map(mapBackendProductToEventProductModel);\n\n return products;\n}\n\nfunction dateTimeInSeconds() {\n return Math.round(Date.now() / 1000);\n}\n\nfunction mapAndEnrichSongbuilderDataForSegment() {\n const storeSongBuilder = useSongBuilderStore();\n const gtmSongDataCloned = cloneDeep(gtmSongData);\n const segmentData = {};\n const keysToRemap = [\n \"gender\", // song_artist_gender\n \"genre\", // song_genre\n \"gifter_email\", // song_customer_email\n \"gtm_m_h_questions\", // map to dict and rename to song_must_have_questions\n \"pronunciations\", // boolean map and rename to song_pronunciations\n \"for_someone_else\", // boolean map and rename to song_for_someone_else\n \"for_occasion\", // boolean map and rename to song_for_occasion\n \"mention_occasion\", // boolean map and rename to song_mention_occasion\n \"mention_recipient\", // boolean map and rename to song_mention_recipient\n \"moods\", // song_moods\n \"occasion\", // song_occasion\n \"recipient\", // rename to song_recipient_name\n \"recommended_artist_id\", // prefix w/ song\n \"recommended_artist_name\", // prefix w/ song\n \"recommended_artists\", // prefix w/ song\n \"relationship\", // prefix w/ song\n \"submitted_artists\", // prefix w/ song\n \"story_details\", // map to dict and then rename to song_story_details\n \"story_additional_details\", // map to dict and then rename to song_story_additional_details\n \"tempo\", // song_tempo\n \"delivery_type\", // with or without purchasing an ecard\n \"ag_ecard\" // e-card product object\n ];\n //Remap Known Keys Fields\n keysToRemap.forEach((fm) => {\n // Skipp remapping if we dont have the field in GTM data\n if (gtmSongDataCloned[fm] === undefined) return;\n // Business logic to map fields to updated values\n switch (fm) {\n case \"gender\":\n segmentData.song_vocals = gtmSongDataCloned.gender;\n break;\n case \"genre\":\n segmentData.song_genre = gtmSongDataCloned.genre;\n break;\n case \"gifter_email\":\n segmentData.song_customer_email = gtmSongDataCloned.gifter_email;\n break;\n case \"gtm_m_h_questions\":\n segmentData.song_must_have_questions = reduce(\n storeSongBuilder.must_have_questions,\n (acc, el, idx) => {\n if (el.answer) {\n acc[`must_have_${idx}`] = {\n title: el.answer,\n answer: el.description,\n };\n }\n return acc;\n },\n {}\n );\n break;\n case \"mention_occasion\":\n segmentData.song_mention_occasion =\n gtmSongDataCloned.mention_occasion.toLowerCase() === \"yes\";\n break;\n case \"mention_recipient\":\n segmentData.song_mention_recipient =\n gtmSongDataCloned.mention_recipient.toLowerCase() === \"yes\";\n break;\n case \"for_someone_else\":\n segmentData.song_for_someone_else =\n gtmSongDataCloned.for_someone_else.toLowerCase() === \"yes\";\n break;\n case \"for_occasion\":\n segmentData.song_for_occasion =\n gtmSongDataCloned.for_occasion.toLowerCase() === \"yes\";\n break;\n case \"moods\":\n segmentData.song_moods = gtmSongDataCloned.moods;\n break;\n case \"occasion\":\n segmentData.song_occasion = gtmSongDataCloned.occasion;\n break;\n case \"recipient\":\n segmentData.song_recipient = gtmSongDataCloned.recipient;\n break;\n case \"recommended_artist_id\":\n segmentData.song_recommended_artist_id =\n gtmSongDataCloned.recommended_artist_id;\n break;\n case \"recommended_artist_name\":\n segmentData.song_recommended_artist_name =\n gtmSongDataCloned.recommended_artist_name;\n break;\n case \"recommended_artists\":\n segmentData.song_recommended_artists =\n gtmSongDataCloned.recommended_artists;\n break;\n case \"relationship\":\n segmentData.song_relationship = gtmSongDataCloned.relationship;\n break;\n case \"submitted_artists\":\n segmentData.song_submitted_artists =\n gtmSongDataCloned.submitted_artists;\n break;\n case \"story_details\":\n //Ensure we have the response before remapping\n if (!storeSongBuilder.questions?.[0]) break;\n segmentData.song_story_details = {\n question: storeSongBuilder.questions[0].question,\n answer: storeSongBuilder.questions[0].answer,\n };\n break;\n case \"story_additional_details\":\n //Ensure we have the response before remapping\n if (!storeSongBuilder.questions?.[1]) break;\n segmentData.song_story_additional_details = {\n question: storeSongBuilder.questions[1].question,\n answer: storeSongBuilder.questions[1].answer,\n };\n break;\n case \"tempo\":\n segmentData.song_tempo = gtmSongDataCloned.tempo;\n break;\n case \"pronunciations\":\n segmentData.song_pronunciations = gtmSongDataCloned.pronunciations;\n break;\n case \"delivery_type\":\n segmentData.deliveryType = gtmSongDataCloned.deliveryType;\n break;\n case \"ag_ecard\":\n segmentData.ag_ecard = gtmSongDataCloned.ag_ecard;\n break;\n default:\n console.warn(`Missing case for field mapping: ${fm}`);\n break;\n }\n });\n //Copy remaining keys into segmentData\n Object.keys(gtmSongDataCloned).forEach((k) => {\n // Ignore keys we've already mapped\n if (keysToRemap.indexOf(k) >= 0) return;\n segmentData[k] = gtmSongDataCloned[k];\n });\n return segmentData;\n}\n\nasync function getCartStage() {\n const cart = store.state.cart.cart;\n const song = cart.hasOriginalSong;\n\n //If we have song in cart\n if (song) {\n //If song for submission\n if (song.parent_story_id) {\n return \"Story Submission\";\n } else {\n //else New Song Purchase\n return \"Song Purchase\";\n }\n }\n\n //If no song in cart find first addon that we buying song for\n const firstAddonParentStoryId = cart.products.find(\n (p) => p.parent_story_id\n )?.parent_story_id;\n if (firstAddonParentStoryId) {\n try {\n //Geting song status of first addon\n const res = await axios.get(\n \"/stories/get_status_by_id/\" + firstAddonParentStoryId,\n {\n cache: {\n ignoreCache: false,\n maxAge: 60000, // 1 min cache\n },\n }\n );\n const status = res.data.status;\n if ([\"shipped\", \"canceled\"].includes(status)) {\n return \"Song Delivered\";\n } else if ([\"created\"].includes(status)) {\n return \"Story Submission\";\n } else {\n return \"Song Production\";\n }\n } catch (e) {\n //Not sure if we need to handle error\n }\n }\n\n return \"Merchandise Purchase\";\n}\n\nfunction getUserTraitsForSegmentRequest() {\n const user = store.state?.auth?.user;\n const storeSongBuilder = useSongBuilderStore();\n let email = user?.email;\n if (!email) {\n //Attempt to get the email from the songbuilder state store captured from the gifter step\n email = storeSongBuilder.gifter_email;\n }\n const first_name = user?.first_name;\n const last_name = user?.last_name;\n const em = sha256(email);\n const fn = sha256(first_name);\n const ln = sha256(last_name);\n const timezone = Intl?.DateTimeFormat().resolvedOptions().timeZone;\n const features = flipperValues;\n\n let traits = {\n features,\n timezone\n };\n\n if (email) {\n //Only return account data if we have information about the user's email\n traits = {\n email,\n em,\n first_name,\n fn,\n last_name,\n ln,\n ...traits,\n };\n }\n\n\n return traits;\n}\n\nfunction getSessionDataForSegmentRequest() {\n return {\n gclid: Cookies.get(\"gclid\"),\n fbc: Cookies.get(\"_fbc\"),\n fbp: Cookies.get(\"_fbp\"),\n user_id: storeGetUserIdentifier(),\n };\n}\n\nfunction getSegmentTrackingContextData(eventId = null, eventName = null) {\n // If we don't have an eventId passed in, generate one with UUID\n const event_id_nonce = eventId ? eventId : uuid().replace(\"-\", \"\");\n //Construct a tracking event_id based on if we passed on an eventName\n const tracking_event_id = eventName\n ? `${eventName}-${event_id_nonce}`\n : event_id_nonce;\n return {\n traits: getUserTraitsForSegmentRequest(),\n session: getSessionDataForSegmentRequest(),\n event_id: tracking_event_id\n };\n}\n\n/*PAGEVIEW*/\ndocument.addEventListener(\"_sf_pageview\", () => {\n const requestId = store.state.core_cms?.__headers?.[\"x-request-id\"] || uuid();\n const eventId = \"PageView-\" + requestId;\n window.dataLayer?.push({ecommerce: null});\n window.dataLayer?.push({\n event: \"pageview\",\n page: {\n name: router.currentRoute.value.name,\n path: location.pathname,\n pageTitle: document.title,\n },\n fbEventID: eventId,\n });\n\n window.analytics?.page(router.currentRoute.value.name, {\n affiliate: store.state.cart.cart.affiliate,\n fbEventID: eventId,\n event_id: eventId,\n requestId: requestId,\n timestamp: dateTimeInSeconds(),\n ...getSegmentTrackingContextData(requestId, \"PageView\"),\n });\n});\n\n/* Product Page View - only on build your song page when you start */\n/* Trigger: product page load */\ndocument.addEventListener(\"_sf_viewcontent\", async (e) => {\n const gtmData = {\n event: \"viewcontent\",\n page: {\n path: \"/song-builder\",\n pageTitle: \"Song Builder\",\n },\n ecommerce: e.detail.ecommerce,\n };\n window.dataLayer?.push({ecommerce: null});\n window.dataLayer?.push(gtmData);\n window.analytics?.track(\n \"Songbuilder Viewed\",\n {\n affiliate: store.state.cart.cart.affiliate,\n quiz_name: SONG_BUILDER_QUIZ_NAME,\n quiz_version: SONG_BUILDER_QUIZ_NUMBER,\n timestamp: dateTimeInSeconds()\n },\n getSegmentTrackingContextData()\n );\n});\n\n/* Add to cart - all products */\n/* Trigger: Add to cart button */\ndocument.addEventListener(\"_sf_add_to_cart\", async (e) => {\n const product = {...e.detail?.product};\n //excluding products that doesn't have a price\n if (!product.price) return;\n const eventProductModel = mapBackendProductToEventProductModel(product);\n product.price /= 100;\n const page = {\n path: location.pathname,\n pageTitle: document.title,\n name: router.currentRoute.value.name,\n };\n const gtmData = {\n event: \"addtocart\",\n page,\n ecommerce: {\n content_id: product.sku,\n content_type: \"product\",\n content_name: product.title,\n quantity: product.quantity,\n price: product.price,\n currency: \"USD\",\n add: {\n products: [\n {\n name: product.title, // Name or ID is required.\n id: product.sku,\n price: product.price,\n brand: product.brand,\n category: product.category,\n variant: \"\",\n quantity: product.quantity,\n },\n ],\n },\n },\n };\n const calls = [];\n calls.push(\n axios.get(\"store/fb_add_to_cart\", {\n params: {...product, current_path: page.path},\n })\n );\n calls.push(getCartStage());\n const [res, cart_stage] = await Promise.all(calls);\n const eventId = \"AddToCart-\" + res.headers[\"x-request-id\"];\n window.dataLayer?.push({ecommerce: null});\n window.dataLayer?.push({\n ...gtmData,\n fbEventID: eventId,\n cart_stage,\n });\n\n window.analytics?.track(\n \"Product Added\",\n {\n affiliate: store.state.cart.cart.affiliate,\n cart_stage,\n value: product.price, // ENG-1112 - Adding tracking for segment pixel usage\n timestamp: dateTimeInSeconds(),\n ...eventProductModel,\n },\n getSegmentTrackingContextData(eventId)\n );\n});\n\ndocument.addEventListener(\"_sf_remove_from_cart\", () => {\n //TODO: Add Event Handler\n});\n\n/* Select Payment Method Event */\ndocument.addEventListener(\"_sf_payment_type\", async () => {\n const cart = store.state.cart.cart;\n const products = getProducts();\n\n const gtmData = {\n event: \"selected_payment_type\",\n ecommerce: {\n currency: \"USD\",\n coupon: cart.coupon?.code || null,\n value: cart.total / 100,\n checkout: {\n actionField: {step: 2, option: cart.payment_type},\n products,\n },\n },\n };\n\n window.dataLayer?.push({ecommerce: null});\n window.dataLayer?.push(gtmData);\n const cart_stage = await getCartStage();\n\n window.analytics?.track(\n \"Checkout Step Completed\",\n {\n affiliate: store.state.cart.cart.affiliate,\n cart_stage,\n checkout_step_name: \"payment\",\n checkout_step_number: 3,\n value: cart.total / 100,\n timestamp: dateTimeInSeconds()\n },\n getSegmentTrackingContextData(null, \"Checkout Step Completed\")\n );\n});\n\n/* Add to cart - all products */\n/* Trigger: Complete purchase, payment successful + order created in db, order confirmation */\ndocument.addEventListener(\"_sf_purchase\", async (e) => {\n const cart = store.state.cart.cart;\n const products = getProducts();\n const purchased_song_revision_product = cart.hasOriginalSongRevision;\n\n const song_purchase_event_id = \"SongPurchased-\" + e.detail.order_id;\n const order_fb_event_id = \"Purchase-\" + e.detail.order_id;\n const order_event_id = \"OrderCompleted-\" + e.detail.order_id;\n\n if (purchased_song_revision_product) {\n window.analytics?.track(\n \"Song Revision Completed\",\n {\n affiliate: store.state.cart.cart.affiliate,\n story_id: purchased_song_revision_product.parent_story_id,\n song_revisions:\n purchased_song_revision_product.extra_info.revision_requests.map(\n (rev) => {\n const lineRef =\n rev.type === \"update\"\n ? rev.edits?.[0].line\n : rev.line;\n return {\n revision_type: rev.type,\n revision_lyric_reference: \"Line \" + lineRef,\n };\n }\n ),\n quiz_name: \"revisions\",\n },\n getSegmentTrackingContextData(\n purchased_song_revision_product.parent_story_id,\n \"SongRevisionCompleted\"\n )\n );\n }\n\n const discountTotal = cart.discount;\n\n // Can only purchase one song at the moment\n const purchased_song_product = cart.hasOriginalSong || cart.hasInstantSong;\n\n // Segment\n const segmentOrderData = {\n song_included: !!purchased_song_product,\n checkout_id: \"T\" + e.detail.order_id,\n coupon: cart.coupon?.code || null,\n currency: \"USD\",\n credit_applied: cart.credit_applied,\n discount: discountTotal ? discountTotal / 100 : 0,\n order_id: e.detail.order_id,\n payment_method: e.detail.payment_type,\n shipping: cart.shipping / 100,\n subtotal: cart.subtotal / 100,\n tax: cart.taxes / 100,\n total: cart.total / 100,\n value: cart.total / 100, // ENG-1112 - Adding tracking for segment pixel usage\n fbEventID: order_fb_event_id,\n products,\n };\n\n if (!products.length) return;\n //Map products in response object from API to product event product model\n const nonSongReportedProducts = e.detail.non_song_product_data?.map(\n mapBackendProductToEventProductModel\n ) || [];\n const user = store.state.auth.user || getSessionUser();\n\n const gtmData = {\n event: \"purchase\",\n page: {\n path: \"/checkout\",\n pageTitle: \"Checkout\",\n },\n ecommerce: {\n contents: products,\n value: cart.total / 100,\n coupon: cart.coupon?.code || null,\n coupon_total: discountTotal ? discountTotal / 100 : null,\n currency: \"USD\",\n subtotal: cart.subtotal / 100,\n credit_applied: cart.credit_applied,\n user_id: storeGetUserIdentifier(),\n user: {\n email: user.email,\n first_name: user.first_name,\n last_name: user.last_name,\n },\n transactionID: e.detail.order_id,\n chargeID: e.detail.charge_id,\n purchase: {\n actionField: {\n id: \"T\" + e.detail.order_id, // Transaction ID. Required for purchases and refunds.\n affiliation: \"Songfinch Store\",\n revenue: cart.total / 100, // Total transaction value (incl. tax and shipping)\n tax: cart.taxes / 100,\n shipping: cart.shipping / 100,\n coupon: cart.coupon?.code || null,\n currency: \"USD\",\n },\n products,\n },\n },\n fbEventID: order_fb_event_id,\n };\n\n if (cart.addresses.shipping) {\n gtmData.home_address = {\n street:\n cart.addresses.shipping.line1 +\n \" \" +\n (cart.addresses.shipping.line2 || \"\"),\n city: cart.addresses.shipping.city,\n region: cart.addresses.shipping.state,\n postal_code: cart.addresses.shipping.postal_code,\n country: cart.addresses.shipping.country,\n };\n }\n\n const songProducts = products.filter(p => p.instant_product || p.code === \"personalized-song\");\n\n const segmentSongsData = songProducts.map((songProduct) => {\n const song_type = songProduct.instant_product ? \"InstantProduct\": \"Song\";\n const baseSegmentSongData = {\n // Order Ecomm Attributes\n billing_address_city: cart.addresses.billing?.city,\n billing_address_country_code: cart.addresses.billing?.country_code,\n billing_address_postal_code: cart.addresses.billing?.postal_code,\n billing_address_state_code: cart.addresses.billing?.state_code,\n checkout_id: \"T\" + e.detail.order_id,\n coupon: cart.coupon?.code || null,\n currency: \"USD\",\n credit_applied: cart.credit_applied,\n discount: discountTotal ? discountTotal / 100 : 0,\n order_id: e.detail.order_id,\n payment_method: e.detail.payment_type,\n shipping: cart.shipping / 100,\n subtotal: cart.subtotal / 100,\n tax: cart.taxes / 100,\n total: cart.total / 100,\n value: cart.total / 100, // ENG-1112 - Adding tracking for segment pixel usage\n products,\n // Song Ecomm Attributes\n story_id: e.detail.slug,\n price: songProduct.price,\n core_product_type: song_type,\n add_on: false,\n };\n\n //Refresh GTM songbuilder data from each step\n initGtmData();\n\n if (songProduct.instant_product) {\n return baseSegmentSongData;\n }\n\n return {\n ...baseSegmentSongData,\n // SongBuilder Attributes\n ...omit(\n mapAndEnrichSongbuilderDataForSegment(),\n [\"step_number\", \"step_name\"]\n ),\n };\n });\n\n //Enrich the product event model w/ order info to associate w/ the order/story\n const segmentItemData = nonSongReportedProducts.map((p) => {\n return {\n order_id: e.detail.order_id,\n checkout_id: \"T\" + e.detail.order_id,\n story_id: e.detail.slug,\n coupon: cart.coupon?.code || null,\n ...p,\n };\n });\n\n const cart_stage = await getCartStage();\n\n window.dataLayer?.push({ecommerce: null});\n window.dataLayer?.push({\n ...gtmData,\n cart_stage,\n });\n\n window.analytics?.track(\n \"Order Completed\",\n {\n affiliate: store.state.cart.cart.affiliate,\n cart_stage,\n timestamp: dateTimeInSeconds(),\n ...segmentOrderData,\n },\n getSegmentTrackingContextData(order_event_id)\n );\n\n segmentSongsData.forEach((segmentSongData) => {\n window.dataLayer?.push({ecommerce: null});\n window.dataLayer?.push({\n event: \"song_purchase\",\n page: gtmData.page,\n ecommerce: gtmData.ecommerce,\n segment: {\n ...segmentSongData,\n cart_stage,\n },\n fbEventID: song_purchase_event_id,\n });\n window.analytics?.track(\n \"Song Purchased\",\n {\n affiliate: store.state.cart.cart.affiliate,\n cart_stage,\n ...segmentSongData,\n },\n getSegmentTrackingContextData(song_purchase_event_id)\n );\n });\n\n //Only report purchased products\n segmentItemData.forEach((p) => {\n const item_purchase_event_id = `ItemPurchased-${e.detail.order_id}-${p.id}`;\n window.analytics?.track(\n \"Item Purchased\",\n {\n affiliate: store.state.cart.cart.affiliate,\n cart_stage,\n value: p.price, // ENG-1112 - Adding tracking for segment pixel usage\n timestamp: dateTimeInSeconds(),\n ...p,\n },\n getSegmentTrackingContextData(item_purchase_event_id)\n );\n });\n});\n\n//View Event Reminder Or Artist Application Form\ndocument.addEventListener(\"_sf_viewform\", () => {\n window.dataLayer?.push({\n event: \"viewform\",\n page: {\n path: location.pathname,\n pageTitle: document.title,\n },\n });\n // window.analytics?.track(\"viewform\", {\n // page: {\n // path: location.pathname,\n // pageTitle: document.title,\n // }\n // });\n});\n\n//Cart page view\ndocument.addEventListener(\"_sf_cart_viewed\", async () => {\n const products = getProducts();\n const cart = store.state.cart.cart;\n const gtmData = {\n event: \"cart_viewed\",\n page: {\n path: location.pathname,\n pageTitle: \"Cart\",\n },\n ecommerce: {\n currency: \"USD\",\n subtotal: cart.subtotal / 100,\n value: cart.total / 100,\n credit_applied: cart.credit_applied / 100,\n products,\n },\n };\n const cart_stage = await getCartStage();\n window.dataLayer?.push({\n ...gtmData,\n cart_stage,\n });\n});\n\n//Start Checkout\ndocument.addEventListener(\"_sf_startcheckout\", async () => {\n const products = getProducts();\n const cart = store.state.cart.cart;\n const gtmData = {\n event: \"startcheckout\",\n page: {\n path: location.pathname,\n pageTitle: \"Checkout\",\n },\n ecommerce: {\n subtotal: cart.subtotal / 100,\n value: cart.total / 100,\n credit_applied: cart.credit_applied / 100,\n products,\n },\n };\n const segmentData = {\n subtotal: cart.subtotal / 100,\n total: cart.total / 100,\n value: cart.total / 100, // ENG-1112 - Adding tracking for segment pixel usage\n credit_applied: cart.credit_applied / 100,\n currency: \"USD\",\n products,\n };\n const cart_stage = await getCartStage();\n window.dataLayer?.push({\n ...gtmData,\n cart_stage,\n });\n window.analytics?.track(\n \"Checkout Started\",\n {\n affiliate: store.state.cart.cart.affiliate,\n cart_stage,\n timestamp: dateTimeInSeconds(),\n ...segmentData,\n },\n getSegmentTrackingContextData(null, \"Checkout Started\")\n );\n});\n\n//Forms Submission\ndocument.addEventListener(\"_sf_submitform\", (e) => {\n const lead_form_event_id = `LeadFormCompleted-${e.detail.request_id}`;\n window.dataLayer?.push({\n event: \"submitform\",\n page: {\n path: location.pathname,\n pageTitle: document.title,\n },\n form: {\n ...e.detail.form,\n },\n formName: e.detail.formName,\n request_id: e.detail.request_id,\n });\n const user_email = e.detail.form.email;\n window.analytics?.track(\n \"Lead Form Completed\",\n {\n email: user_email,\n form_type: e.detail.formName,\n request_id: e.detail.request_id,\n // quiz_name: SONG_BUILDER_QUIZ_NAME,\n // quiz_version: SONG_BUILDER_QUIZ_NUMBER,\n },\n getSegmentTrackingContextData(lead_form_event_id)\n );\n});\n\ndocument.addEventListener(\"_sf_identify_user\", (e) => {\n if (document.cookie.indexOf(\"ajs_user_id=\") === -1) {\n window.analytics?.identify({\n email: e.detail.email,\n timezone: Intl?.DateTimeFormat().resolvedOptions().timeZone,\n features: flipperValues\n }, getSegmentTrackingContextData(null, null));\n }\n});\n\n//Song Builder Forms Submissions\ndocument.addEventListener(\"_sf_songbuildersubmit\", (e) => {\n const step = e.detail?.step || router.currentRoute.value.name;\n\n gtm_song_data_helper[step]?.();\n window.dataLayer?.push({\n event: e.detail?.event || \"songbuildersubmit\",\n page: router.currentRoute.value.name,\n ...gtmSongData,\n });\n const segmentData = mapAndEnrichSongbuilderDataForSegment();\n //Filter out erroneous SB complete events we are publishing at the wrong time. I think this is due to not having\n // Handlers for certain events. We still want to filter these out but if this doesn't work we can add specific\n // empty handlers for each step\n // This occurs w/ BsStoryMustIncludesIntro\n\n if (gtm_song_data_helper[step]) {\n window.analytics?.track(\n \"Songbuilder Step Completed\",\n {\n affiliate: store.state.cart.cart.affiliate,\n song_customer_category: \"lead\",\n quiz_name: SONG_BUILDER_QUIZ_NAME,\n quiz_version: SONG_BUILDER_QUIZ_NUMBER,\n timestamp: dateTimeInSeconds(),\n ...segmentData,\n },\n getSegmentTrackingContextData(null, \"Songbuilder Step Completed\")\n );\n }\n});\n\n//Song Builder Review Submission\ndocument.addEventListener(\"_sf_songbuildersumit_review\", (e) => {\n gtm_song_data_helper[router.currentRoute.value.name]?.();\n //Legacy behavior for GTM\n window.dataLayer?.push({\n event: e.detail?.event || \"songbuildersubmit\",\n page: router.currentRoute.value.name,\n ...gtmSongData,\n });\n const segmentData = mapAndEnrichSongbuilderDataForSegment();\n window.analytics?.track(\n \"Songbuilder Completed\",\n {\n affiliate: store.state.cart.cart.affiliate,\n song_customer_category: \"lead\",\n quiz_name: SONG_BUILDER_QUIZ_NAME,\n quiz_version: SONG_BUILDER_QUIZ_NUMBER,\n ...segmentData,\n },\n getSegmentTrackingContextData(null, \"Songbuilder Completed\")\n );\n});\n\n//Artist view list page after song builder\ndocument.addEventListener(\"_sf_songbuilder_recommended_artist_list\", (e) => {\n const recommended_list = map(e.detail, (el) => el.artist_name).join(\", \");\n //Turn into list, letting marketing determine which style they want\n const artist_list = map(e.detail, (el) => el);\n const gtmData = {\n event: \"bs_recommended_artist_list\",\n recommended_list,\n };\n window.dataLayer?.push(gtmData);\n window.analytics?.track(\n \"Songbuilder Artist Selection Received\",\n {\n affiliate: store.state.cart.cart.affiliate,\n artist_list,\n recommended_list,\n quiz_name: SONG_BUILDER_QUIZ_NAME,\n quiz_version: SONG_BUILDER_QUIZ_NUMBER,\n timestamp: dateTimeInSeconds()\n },\n getSegmentTrackingContextData(\n null,\n \"Songbuilder Artist Selection Received\"\n )\n );\n});\n\n//Artist view list page after song builder\n// document.addEventListener('_sf_search_artist_from_bs', (e) => {\n// window.dataLayer?.push({\n// event: 'search_artist_from_bs',\n// });\n// // if(window.analytics) {\n// // analytics.track('search_artist_from_bs');\n// // }\n// })\n\n//Apply Coupon\ndocument.addEventListener(\"_sf_apply_coupon\", () => {\n if (!store.state.cart.cart.coupon) return;\n window.dataLayer?.push({\n event: \"apply_coupon\",\n ecommerce: {\n coupon: store.state.cart.cart.coupon.code,\n },\n });\n const discountTotal = store.state.cart.cart.discount;\n window.analytics?.track(\n \"Checkout Apply Coupon\",\n {\n affiliate: store.state.cart.cart.affiliate,\n coupon: store.state.cart.cart.coupon?.code,\n coupon_total: discountTotal ? discountTotal / 100 : null,\n },\n getSegmentTrackingContextData(\n store.state.cart.cart.coupon.code,\n \"Checkout Apply Coupon\"\n )\n );\n});\n\n//Start song with artist\ndocument.addEventListener(\"_sf_start_song_with_artist\", (e) => {\n const artist = e.detail.artist;\n window.dataLayer?.push({\n event: \"start_song_with_artist\",\n artist_id: artist.id,\n artist_name: artist.artist_name,\n });\n window.analytics?.track(\n \"CTA Clicked\",\n {\n destination: e.detail.destination,\n location: e.detail.location,\n text: e.detail.text,\n type: e.detail.type,\n artist_id: artist.id,\n artist_name: artist.artist_name,\n },\n getSegmentTrackingContextData(null, \"CTA Clicked\")\n );\n});\n\n//Link Clicked\ndocument.addEventListener(\"_sf_cta_clicked\", (e) => {\n window.analytics?.track(\n \"CTA Clicked\",\n {timestamp: dateTimeInSeconds(), ...e?.detail},\n getSegmentTrackingContextData(null, \"CTA Clicked\")\n );\n});\n\n//Share Clip Generator Clicked\ndocument.addEventListener(\"_sf_clip_generator_clicked\", (e) => {\n window.analytics?.track(\n \"Share Clip Generator Button Clicked\",\n {timestamp: dateTimeInSeconds(), ...e?.detail},\n getSegmentTrackingContextData(null, \"Share Clip Generator Button Clicked\")\n );\n});\n\n\n//Share Clip Generator Clicked\ndocument.addEventListener(\"_sf_clip_generator_shared_clicked\", (e) => {\n window.analytics?.track(\n \"Share Generated Clip Button Clicked\",\n {timestamp: dateTimeInSeconds(), ...e?.detail},\n getSegmentTrackingContextData(null, \"Share Generated Clip Button Clicked\")\n );\n});\n\n\n//user login event\ndocument.addEventListener(\"_sf_user_login\", (e) => {\n const user = store.state.auth.user;\n const user_id = storeGetUserIdentifier();\n window.dataLayer?.push({\n event: \"UserInit\",\n user_id: user_id,\n user_email: user.email,\n user_first_name: user.first_name,\n user_last_name: user.last_name,\n user_role: user.role,\n });\n\n if (store.state.auth.redirectQuery?.push_to === \"Checkout\") {\n const data = e.detail.registration\n ? {\n ga_action: \"User created an account from /checkout\",\n ga_tag: \"CreateAccountCheckout\",\n }\n : {\n ga_action: \"User logged in from /checkout\",\n ga_tag: \"LoginCheckout\",\n };\n analyticsEvent(\"_sf_custom_ga_event\", data);\n }\n\n if (e.detail.registration) {\n window.dataLayer?.push({\n event: \"signup\",\n page: {\n path: location.pathname,\n pageTitle: document.title,\n },\n user,\n });\n\n window.analytics?.track(\n \"Account Created\",\n {\n email: user.email,\n firstName: user.first_name,\n lastName: user.last_name,\n referral_source: user.heard_about_from + (user.heard_about_from_other ? ` - ${user.heard_about_from_other}` : \"\"),\n referral_code: store.state.auth.referralCode || \"\",\n },\n getSegmentTrackingContextData(user_id, \"Account Created\")\n );\n } else {\n window.analytics?.track(\n \"Signed In\",\n {\n email: user.email,\n },\n getSegmentTrackingContextData(null, \"Signed In\")\n );\n }\n\n if (store.state.auth.referralCode && e.detail.registration) {\n analyticsEvent(\"_sf_custom_ga_event\", {\n ga_action:\n \"Referred user creates an account from the unique referral landing page\",\n ga_tag: \"ReferralSignup\",\n });\n }\n\n window.analytics?.identify(user?.external_user_id, {\n email: user.email,\n firstName: user.first_name,\n lastName: user.last_name,\n guest: user.guest,\n role: user.role || null,\n timezone: Intl?.DateTimeFormat().resolvedOptions().timeZone,\n features: flipperValues\n }, getSegmentTrackingContextData(null, null));\n});\n\n//user logout event\ndocument.addEventListener(\"_sf_user_logout\", () => {\n const user = store.state.auth.user;\n window.dataLayer?.push({\n event: \"user_logout\",\n });\n window.analytics?.track(\n \"Signed Out\",\n {\n email: user.email,\n },\n getSegmentTrackingContextData(null, \"Signed Out\")\n );\n});\n\n//TODO: redo events above\n//Custom Event\n//e.detail should contain {ga_category: \"\", ga_action: \"\", ga_tag: \"\", ga_label:\"\"} label - optional\ndocument.addEventListener(\"_sf_custom_ga_event\", async (e) => {\n window.dataLayer?.push({\n event: \"custom_ga_event\",\n ...e.detail,\n });\n\n let segmentData = {};\n let trackingContext = {};\n let baseSegmentData = {};\n let cart_stage;\n const cart = store.state?.cart?.cart;\n const story = e.detail?.story;\n\n switch (e.detail.ga_tag) {\n case \"SubmitAccount\":\n segmentData = {\n checkout_step_name: \"account\",\n checkout_step_number: 0,\n value: (cart?.total || 0) / 100, // ENG-1112 - Adding tracking for segment pixel usage\n };\n cart_stage = await getCartStage();\n window.analytics?.track(\n \"Checkout Step Completed\",\n {\n affiliate: store.state.cart.cart.affiliate,\n cart_stage,\n timestamp: dateTimeInSeconds(),\n ...segmentData,\n },\n getSegmentTrackingContextData(null, \"Checkout Step Completed\")\n );\n break;\n case \"SubmitBilling\":\n segmentData = {\n checkout_step_name: \"billing_address\",\n checkout_step_number: 1,\n value: (cart?.total || 0) / 100, // ENG-1112 - Adding tracking for segment pixel usage\n };\n cart_stage = await getCartStage();\n window.analytics?.track(\n \"Checkout Step Completed\",\n {\n affiliate: store.state.cart.cart.affiliate,\n cart_stage,\n timestamp: dateTimeInSeconds(),\n ...segmentData,\n },\n getSegmentTrackingContextData(null, \"Checkout Step Completed\")\n );\n break;\n case \"SubmitShipping\":\n segmentData = {\n checkout_step_name: \"shipping_address\",\n checkout_step_number: 2,\n value: (cart?.total || 0) / 100, // ENG-1112 - Adding tracking for segment pixel usage\n };\n cart_stage = await getCartStage();\n window.analytics?.track(\n \"Checkout Step Completed\",\n {\n affiliate: store.state.cart.cart.affiliate,\n cart_stage,\n timestamp: dateTimeInSeconds(),\n ...segmentData,\n },\n getSegmentTrackingContextData(null, \"Checkout Step Completed\")\n );\n break;\n case \"DownloadSong\":\n baseSegmentData = {\n email: e.detail.email,\n story_id: story.slug,\n song_genre: story.genre,\n core_product_type: story.song ? \"Song\" : \"instantProduct\"\n };\n\n if (story.song) {\n const song = story.song;\n const songData = {\n song_title: song.title,\n song_artist: song.artist?.fullName || \"\",\n song_artist_id: song.artist?.id || \"\",\n };\n segmentData = {...baseSegmentData, ...songData};\n } else {\n const instant_product = story.instant_product;\n const instantProductData = {\n song_title: instant_product?.title || \"\",\n song_artist: instant_product?.artist_display_name || \"\",\n song_artist_id: instant_product?.artist?.id || \"\",\n };\n segmentData = {...baseSegmentData, ...instantProductData};\n }\n\n window.analytics?.track(\n \"Song Downloaded\",\n segmentData,\n getSegmentTrackingContextData(null, \"Song Downloaded\")\n );\n break;\n case \"SongPageListened\":\n segmentData = {\n email: e.detail.email,\n story_id: e.detail.story.story_id,\n story_slug: e.detail.story.slug,\n song_genre: e.detail.story.song.genre,\n song_title: e.detail.story.song.title,\n song_artist: e.detail.story.song.artist.fullName,\n song_artist_id: e.detail.story.song.artist.id\n };\n trackingContext = getSegmentTrackingContextData(null, \"Song Page Listened\");\n trackingContext.traits.email = e.detail.email; // using email from event to identify user\n window.analytics?.track(\n \"Song Page Listened\",\n segmentData,\n trackingContext\n );\n break;\n case \"SongPageVIPGiveaway\":\n segmentData = {\n email: e.detail.email,\n story_id: e.detail.story.story_id,\n story_slug: e.detail.story.slug,\n song_genre: e.detail.story.song.genre,\n song_title: e.detail.story.song.title,\n song_artist: e.detail.story.song.artist.fullName,\n song_artist_id: e.detail.story.song.artist.id\n };\n trackingContext = getSegmentTrackingContextData(null, \"Song Page VIP giveaway\");\n trackingContext.traits.email = e.detail.email;\n window.analytics?.track(\n \"Song Page VIP giveaway\",\n segmentData,\n trackingContext\n );\n break;\n case \"InstantSongPreviewLead\":\n segmentData = {\n email: e.detail.email,\n };\n trackingContext = getSegmentTrackingContextData(null, \"Instant Song Preview Lead\");\n trackingContext.traits.email = e.detail.email;\n window.analytics?.track(\n \"Instant Song Preview Lead\",\n segmentData,\n trackingContext\n );\n break;\n }\n});\n\ndocument.addEventListener(\"_sf_song_page_viewed\", (e) => {\n const story = e.detail.story;\n const baseSegmentData = {\n story_id: story.slug,\n song_genre: story.genre,\n core_product_type: story.song ? \"Song\" : \"InstantProduct\"\n };\n let segmentData;\n\n if (story.song) {\n const song = story.song;\n const songData = {\n song_title: song.title,\n song_artist: song.artist?.fullName || \"\",\n song_artist_id: song.artist?.id || \"\",\n song_link: song.audioUrl,\n is_gifter: story.is_owner\n };\n segmentData = {...baseSegmentData, ...songData};\n } else {\n const instant_product = story.instant_product;\n const instantProductData = {\n song_title: instant_product?.title || \"\",\n song_artist: instant_product?.artist_display_name || \"\",\n song_artist_id: instant_product?.artist?.id || \"\",\n song_link: instant_product?.audioUrl || \"\",\n is_gifter: story.is_owner\n };\n segmentData = {...baseSegmentData, ...instantProductData};\n }\n\n window.analytics?.track(\n \"Song Page Viewed\",\n segmentData,\n getSegmentTrackingContextData(null, \"Song Page Viewed\")\n );\n});\n\ndocument.addEventListener(\"_sf_song_started\", (e) => {\n const song = e.detail.song;\n const player = e.detail.player;\n const segmentData = {\n story_id: song.slug,\n song_title: song.song_title,\n song_artist: song.name,\n song_artist_id: song.song_artist_id,\n song_genres: song.genres,\n song_occasions: song.occasions,\n song_duration: player.duration,\n song_duration_sec: player.maxRange,\n media_type: song.media_type,\n player_type: song.player_type,\n };\n window.analytics?.track(\n \"Song Started\",\n segmentData,\n getSegmentTrackingContextData(null, \"Song Started\")\n );\n});\n\ndocument.addEventListener(\"_sf_song_listened\", (e) => {\n const song = e.detail.song;\n const player = e.detail.player;\n const segmentData = {\n story_id: song.slug,\n song_title: song.song_title,\n song_artist: song.name,\n song_artist_id: song.song_artist_id,\n song_genres: song.genres,\n song_occasions: song.occasions,\n song_duration: player.duration,\n song_duration_sec: player.maxRange,\n elapsed_time: player.currentTime,\n elapsed_time_sec: player.currentRange,\n elapsed_percentage: Math.min(\n Math.floor((player.currentRange / player.maxRange) * 100),\n 100\n ),\n media_type: song.media_type,\n player_type: song.player_type,\n };\n window.analytics?.track(\n \"Song Listened\",\n segmentData,\n getSegmentTrackingContextData(null, \"Song Listened\")\n );\n});\n\ndocument.addEventListener(\"_sf_checkout_sign_in_viewed\", () => {\n window.analytics?.track(\n \"Checkout Sign In Viewed\",\n {},\n getSegmentTrackingContextData(null, \"Checkout Sign In Viewed\")\n );\n});\n\ndocument.addEventListener(\"_sf_account_email_viewed\", () => {\n window.analytics?.track(\n \"Account Email Viewed\",\n {},\n getSegmentTrackingContextData(null, \"Account Email Viewed\")\n );\n});\n\n\ndocument.addEventListener(\"_sf_get_started_slide_viewed\", e => {\n window.analytics?.track(\n \"Get Started Mobile Slide Viewed\",\n e.detail,\n getSegmentTrackingContextData(null, \"Get Started Mobile Slide Viewed\")\n );\n});\n\ndocument.addEventListener(\"_sf_song_info_viewed\", e => {\n window.analytics?.track(\n \"Song Information Viewed\",\n e.detail,\n getSegmentTrackingContextData(null, \"Song Info Viewed\")\n );\n});\n\ndocument.addEventListener(\"_sf_song_shared\", e => {\n window.analytics?.track(\n \"Song Shared\",\n e.detail,\n getSegmentTrackingContextData(null, \"Song Shared\")\n );\n});\n\ndocument.addEventListener(\"_sf_email_triggered\", e => {\n window.analytics?.track(\n \"Email Triggered\",\n e.detail,\n getSegmentTrackingContextData(null, \"Email Triggered\")\n );\n});\n\ndocument.addEventListener(\"_sf_song_conversion\", e => {\n window.analytics?.track(\n \"Song Conversion\",\n e.detail,\n getSegmentTrackingContextData(null, \"Song Conversion\")\n );\n});\n\ndocument.addEventListener(\"_sf_song_engage\", e => {\n window.analytics?.track(\n \"Song Engage\",\n e.detail,\n getSegmentTrackingContextData(null, \"Song Engage\")\n );\n});\n\ndocument.addEventListener(\"_sf_footer_conversion\", () => {\n window.analytics?.track(\n \"Footer Conversion\",\n {},\n getSegmentTrackingContextData(null, \"Footer Conversion\")\n );\n});\n\ndocument.addEventListener(\"_sf_segment_event\", e => {\n let baseProps = {};\n const generalProps = {timestamp: dateTimeInSeconds()};\n const quizProps = {\n quiz_name: SONG_BUILDER_QUIZ_NAME,\n quiz_version: SONG_BUILDER_QUIZ_NUMBER,\n };\n\n if (e?.detail?.props?.includeQuizInfo) {\n baseProps = {...generalProps, ...quizProps};\n delete e.detail.props.includeQuizInfo;\n }\n\n window.analytics?.track(\n e.detail.name,\n {...baseProps, ...e?.detail?.props},\n getSegmentTrackingContextData(null, e.detail.name)\n );\n});\n\n//Instant EVENTS\ndocument.addEventListener(\"_sf_ISBStepLoad\", e => {\n window.analytics?.track(\n \"ISBQuizQuestion\",\n {\n ...e.detail,\n template: vitamixCollectionTitle.value,\n affiliate: store.state.cart.cart.affiliate,\n timestamp: dateTimeInSeconds(),\n },\n getSegmentTrackingContextData(null, \"ISBQuizQuestion\")\n );\n});\n\ndocument.addEventListener(\"_sf_ISBPreviewLoad\", e => {\n window.analytics?.track(\n \"ISBSongPreview\",\n {\n ...e.detail,\n template: vitamixCollectionTitle.value,\n affiliate: store.state.cart.cart.affiliate,\n timestamp: dateTimeInSeconds(),\n },\n getSegmentTrackingContextData(null, \"ISBSongPreview\")\n );\n});\n\ndocument.addEventListener(\"_sf_ISBPreviousSongsLoad\", () => {\n window.analytics?.track(\n \"ISBPreviousSongs\",\n {\n template: vitamixCollectionTitle.value,\n affiliate: store.state.cart.cart.affiliate,\n timestamp: dateTimeInSeconds(),\n },\n getSegmentTrackingContextData(null, \"ISBPreviousSongs\")\n );\n});\n\ndocument.addEventListener(\"_sf_ISBQuizAnswerSelected\", e => {\n const data = e.detail;\n const isMultiple = data.isMultiple;\n const eventData = {\n question: e.detail.currentQuestion.question,\n type: isMultiple ? \"multi-select\" : \"select\",\n step: e.detail.step,\n template: vitamixCollectionTitle.value\n };\n if (isMultiple) eventData.answers = [];\n data.answers[data.questionId].forEach((answer, i) => {\n const indexKey = i ? (i + 1) : \"\";\n const selectedAnswer = answer || null;\n\n eventData[`answer${indexKey}`] = e.detail.currentQuestion.answers.find(el => el.answer_key === selectedAnswer)?.answer;\n eventData[`previous_answer${indexKey}`] = e.detail.currentQuestion.answers.find(el => el.answer_key === data.previousAnswers[i])?.answer || null;\n\n if (isMultiple) eventData.answers.push(answer);\n });\n\n window.analytics?.track(\n \"ISBQuizAnswerSelected\",\n eventData,\n getSegmentTrackingContextData(null, \"ISBQuizAnswerSelected\")\n );\n});\n\ndocument.addEventListener(\"_sf_ISBPreviewEvents\", e => {\n const eventData = {\n is_playing_preview: app.config.globalProperties.$sfPlayer.isPlaying,\n template: vitamixCollectionTitle.value,\n ...e.detail,\n timestamp: dateTimeInSeconds(),\n };\n const eventName = eventData.event;\n delete eventData.event;\n window.analytics?.track(\n eventName,\n eventData,\n getSegmentTrackingContextData(null, \"eventData\")\n );\n});\n\ndocument.addEventListener(\"_sf_ISBPreviousSongsClose\", () => {\n window.analytics?.track(\n \"ISBPreviousSongsBack\",\n {\n template: vitamixCollectionTitle.value,\n timestamp: dateTimeInSeconds(),\n is_playing_preview: app.config.globalProperties.$sfPlayer.isPlaying,\n },\n getSegmentTrackingContextData(null, \"ISBPreviousSongsBack\")\n );\n});\n\n\nexport const trackEvent: TrackEventHandler = (eventName, meta) => {\n window.analytics?.track(\n eventName,\n {\n ...meta,\n },\n getSegmentTrackingContextData(null)\n );\n};","\n\n\n\n\n\n\n","import \"./stylesheets/index.pcss\";\nimport \"@songfinch/design-system/src/assets/main.scss\";\nimport {createApp} from \"vue\";\nimport App from \"./app.vue\";\nexport default createApp(App);\n","import app from \"@songfinch/customer/app.js\";\n\n/*\nPut here only the stuff that has to go first\nand doesn't have dependencies on other files/components.\nAlso stuff that gonna be used outside of vue in app init\n*/\n\nwindow.appSettings = window.appSettings || {};\nwindow.appSettings.features = window.appSettings.features || {};\n\nimport EventBus from \"@songfinch/shared/plugins/event_bus\";\napp.use(EventBus);\n\nimport sfHelpers from \"@songfinch/shared/plugins/sf_helpers\";\napp.use(sfHelpers);\n\nimport CdnPlugin from \"@songfinch/shared/plugins/cdn\";\napp.use(CdnPlugin);\n","import app from \"@songfinch/customer/app\";\nimport {init, setTag, browserTracingIntegration} from \"@sentry/vue\";\nimport store from \"@songfinch/customer/store\";\nimport Cookies from \"js-cookie\";\nimport {merge, mapValues} from \"lodash-es\";\nimport useInstantProductBuilder from \"@songfinch/customer/composables/useInstantProductBuilder\";\nimport {toValue} from \"vue\";\nimport tryReload from \"@songfinch/customer/helpers/tryReload\";\n\nimport {sentryBaseConfig} from \"@songfinch/config/sentryConfig\";\n\nimport {isAxiosError, isSongfinchError} from \"@songfinch/utils/src/validators\";\n\nimport router from \"../router\";\n\nimport type {AxiosError} from \"axios\";\nimport type {SongFinchError} from \"@songfinch/types\";\nimport {useSongBuilderStore} from \"@songfinch/customer/store_v2/useSongBuilderStore\";\n\nif (window.appSettings.sentry_dns) {\n const js_hash = window.appSettings.version;\n init({\n ...sentryBaseConfig,\n app,\n integrations: [\n ...sentryBaseConfig.integrations,\n browserTracingIntegration({router}),\n ],\n beforeSend(event, hint) {\n if (!window.appSettings.sentry_dns) { //We can clear this value if we want to stop error tracking\n return null;\n }\n\n const error = hint.originalException as SongFinchError | AxiosError;\n if (!event.extra?.fromReload) {\n if (tryReload(error, \"sentry\")) return null;\n }\n\n //TODO: add better error handling\n if (isSongfinchError(error) && error._sfErrorIgnore) {\n return null;\n }\n\n\n //GTM\n if (error?.stack) {\n const gtm = error?.stack?.indexOf(\"googletagmanager.com/gtm.js?id=\") > -1;\n const dataLayer = window.dataLayer || [];\n\n if (gtm) {\n event.tags ||= {};\n event.tags.logger = \"gtm\";\n event.extra ||= {};\n event.extra.dataLayer = dataLayer.map((i) => {\n try {\n return JSON.stringify(i, null, \" \");\n } catch (error) {\n return \"[cannot be serialized]: \" + (error as {message: string})?.message;\n }\n });\n }\n }\n\n if (isAxiosError(error)) {\n event.extra ||= {};\n event.extra.errorInfo = {\n message: error?.message,\n url: error?.request?.responseURL,\n method: error?.config?.method,\n status: error?.response?.status,\n requestPayload: error?.config?.data, // Request payload\n responsePayload: error?.response?.data, // Response error payload\n };\n }\n\n // UserID Resolution\n // * User (external user id)\n // * Cookie (segment user id)\n // * Cookie (segment anonymous user id)\n // * Cookie (CIO anonymous user id)\n const id = store.state.auth.user?.external_user_id ||\n Cookies.get(\"ajs_user_id\") ||\n Cookies.get(\"ajs_anonymous_id\") ||\n Cookies.get(\"_cioanonid\");\n\n const storeSongBuilder = useSongBuilderStore();\n\n const extra = {\n cart: store.state.cart,\n song_builder: storeSongBuilder.$state,\n instant_builder: mapValues(useInstantProductBuilder(), v => (v ? toValue(v.value) : v)),\n js_hash,\n redirectsList: undefined as string[] | undefined,\n };\n\n if (isSongfinchError(error) && error?.redirectsList?.length) {\n extra.redirectsList = error?.redirectsList;\n }\n\n merge(event, {extra});\n event.user = {id};\n\n if (event.exception) {\n const frames = event.exception.values?.[0]?.stacktrace?.frames;\n const isOwnError = !frames || frames.some(frame => frame.filename && frame.filename.includes(window.location.hostname));\n event.tags ||= {};\n if (isOwnError) event.tags.sf_error_source = \"internal_error\";\n else event.tags.sf_error_source = \"external_error\";\n }\n\n return event;\n }\n });\n setTag(\"sf_pack\", \"customer\");\n setTag(\"sf_origin\", \"frontend\");\n setTag(\"js_hash\", js_hash);\n}\n","import router from \"@songfinch/customer/router\";\nimport onPageLoaded from \"@songfinch/customer/composables/onPageLoaded\";\n\ndeclare global {\n interface Window { __attentive: unknown; }\n}\n\nconst setAttentiveScript = () => {\n const script = document.createElement(\"script\");\n script.src = \"https://cdn.attn.tv/songfinch/dtag.js\";\n script.id = \"attentive\";\n script.defer = true;\n document.head.appendChild(script);\n};\n\nonPageLoaded(async () => {\n if (window.Cypress) return;\n if (router.currentRoute.value.matched[0]?.name !== \"Story\") {\n setAttentiveScript();\n } else {\n const useStoryImport = await import(\"@songfinch/customer/composables/story/useStory\");\n const {story} = useStoryImport.default();\n if (story.value?.show_attentive_modal) {\n setAttentiveScript();\n }\n }\n});\n","export default async function useDoWhileWithDelay(func: () => unknown, conditionFunc: () => boolean, delay: number, repeats?: number) {\n let count = 0;\n const timer = ms => new Promise(res => setTimeout(res, ms));\n do {\n func();\n count++;\n await timer(delay);\n } while (conditionFunc() && (!repeats || count < repeats));\n}\n","export default function onBrowserInteraction(callback) {\n const functionHelper = () => {\n callback();\n window.removeEventListener(\"click\", functionHelper);\n window.removeEventListener(\"scroll\", functionHelper);\n };\n\n window.addEventListener(\"click\", functionHelper);\n window.addEventListener(\"scroll\", functionHelper);\n}\n","import {watchEffect} from \"vue\";\nimport router from \"@songfinch/customer/router\";\nimport useDoWhileWithDelay from \"@songfinch/shared/composables/useDoWhileWithDelay\";\nimport onBrowserInteraction from \"@songfinch/customer/composables/onBrowserInteraction\";\nimport flipper from \"@songfinch/shared/plugins/flipper\";\n\ndeclare global {\n interface Window {\n zE: unknown;\n }\n}\n\ndeclare module \"vue-router\" {\n interface RouteMeta {\n disableZenDesk?: boolean;\n }\n}\n\nif (!flipper.disable_zendesk) {\n onBrowserInteraction(() => {\n const js = document.createElement(\"script\");\n js.id = \"ze-snippet\";\n js.src = \"https://static.zdassets.com/ekr/snippet.js?key=6f3774bc-7fec-43af-9027-d9d2c210697c\";\n document.body.appendChild(js);\n\n let widgetName;\n js.onload = () => useDoWhileWithDelay(\n () => {\n if (window.zE.widget) {\n widgetName = window.zE.widget === \"messenger\" ? \"messenger\" : \"webWidget\";\n watchEffect(() => window.zE?.(widgetName, !router.currentRoute?.value.meta?.disableZenDesk ? \"show\" : \"hide\"));\n }\n },\n () => !widgetName,\n 1000,\n 10\n );\n });\n}\n\n","import store from \"../store\";\nimport Cookies from \"js-cookie\";\n\nconst dataVersion = localStorage.getItem(\"sf_fe_data_version\");\n\nconst pack = Cookies.get(\"sf_pack\");\n\nif (!pack || pack !== \"customer\") {\n //If we have any old data saved clear it\n if (dataVersion) {\n localStorage.clear();\n }\n Cookies.set(\"sf_pack\", \"customer\", {expires: 100000});\n}\n\nif (dataVersion && dataVersion !== window.appSettings.data_version) {\n store.commit(\"shared/clearLocalStorage\");\n location.reload();\n throw new Error(\"Ignore: Needs to reload\");\n} else if (!dataVersion) {\n localStorage.setItem(\"sf_fe_data_version\", window.appSettings.data_version);\n}\n","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"axios\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"axios\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axiosCacheAdapter\"] = factory(require(\"axios\"));\n\telse\n\t\troot[\"axiosCacheAdapter\"] = factory(root[undefined]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE_axios__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./node_modules/cache-control-esm/index.js\":\n/*!*************************************************!*\\\n !*** ./node_modules/cache-control-esm/index.js ***!\n \\*************************************************/\n/*! exports provided: CacheControl, parse, format, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CacheControl\", function() { return CacheControl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parse\", function() { return parse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"format\", function() { return format; });\n/* harmony import */ var core_js_modules_es6_array_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.array.from */ \"./node_modules/core-js/modules/es6.array.from.js\");\n/* harmony import */ var core_js_modules_es6_array_from__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_from__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.function.name */ \"./node_modules/core-js/modules/es6.function.name.js\");\n/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/web.dom.iterable */ \"./node_modules/core-js/modules/web.dom.iterable.js\");\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es7.symbol.async-iterator */ \"./node_modules/core-js/modules/es7.symbol.async-iterator.js\");\n/* harmony import */ var core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es6.symbol */ \"./node_modules/core-js/modules/es6.symbol.js\");\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es6.regexp.split */ \"./node_modules/core-js/modules/es6.regexp.split.js\");\n/* harmony import */ var core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var core_js_modules_es6_number_is_finite__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es6.number.is-finite */ \"./node_modules/core-js/modules/es6.number.is-finite.js\");\n/* harmony import */ var core_js_modules_es6_number_is_finite__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_number_is_finite__WEBPACK_IMPORTED_MODULE_7__);\n\n\n\n\n\n\n\n\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar HEADER_REGEXP = /([a-zA-Z][a-zA-Z_-]*)\\s*(?:=(?:\"([^\"]*)\"|([^ \\t\",;]*)))?/g;\nvar STRINGS = {\n maxAge: 'max-age',\n sharedMaxAge: 's-maxage',\n maxStale: 'max-stale',\n minFresh: 'min-fresh',\n immutable: 'immutable',\n mustRevalidate: 'must-revalidate',\n noCache: 'no-cache',\n noStore: 'no-store',\n noTransform: 'no-transform',\n onlyIfCached: 'only-if-cached',\n \"private\": 'private',\n proxyRevalidate: 'proxy-revalidate',\n \"public\": 'public'\n};\n\nfunction parseBooleanOnly(value) {\n return value === null;\n}\n\nfunction parseDuration(value) {\n if (!value) {\n return null;\n }\n\n var duration = parseInt(value, 10);\n\n if (!Number.isFinite(duration) || duration < 0) {\n return null;\n }\n\n return duration;\n}\n\nvar CacheControl = /*#__PURE__*/function () {\n function CacheControl() {\n _classCallCheck(this, CacheControl);\n\n this.maxAge = null;\n this.sharedMaxAge = null;\n this.maxStale = null;\n this.maxStaleDuration = null;\n this.minFresh = null;\n this.immutable = null;\n this.mustRevalidate = null;\n this.noCache = null;\n this.noStore = null;\n this.noTransform = null;\n this.onlyIfCached = null;\n this[\"private\"] = null;\n this.proxyRevalidate = null;\n this[\"public\"] = null;\n }\n\n _createClass(CacheControl, [{\n key: \"parse\",\n value: function parse(header) {\n if (!header || header.length === 0) {\n return this;\n }\n\n var values = {};\n var matches = header.match(HEADER_REGEXP) || [];\n Array.prototype.forEach.call(matches, function (match) {\n var tokens = match.split('=', 2);\n\n var _tokens = _slicedToArray(tokens, 1),\n key = _tokens[0];\n\n var value = null;\n\n if (tokens.length > 1) {\n value = tokens[1].trim();\n }\n\n values[key.toLowerCase()] = value;\n });\n this.maxAge = parseDuration(values[STRINGS.maxAge]);\n this.sharedMaxAge = parseDuration(values[STRINGS.sharedMaxAge]);\n this.maxStale = parseBooleanOnly(values[STRINGS.maxStale]);\n this.maxStaleDuration = parseDuration(values[STRINGS.maxStale]);\n\n if (this.maxStaleDuration) {\n this.maxStale = true;\n }\n\n this.minFresh = parseDuration(values[STRINGS.minFresh]);\n this.immutable = parseBooleanOnly(values[STRINGS.immutable]);\n this.mustRevalidate = parseBooleanOnly(values[STRINGS.mustRevalidate]);\n this.noCache = parseBooleanOnly(values[STRINGS.noCache]);\n this.noStore = parseBooleanOnly(values[STRINGS.noStore]);\n this.noTransform = parseBooleanOnly(values[STRINGS.noTransform]);\n this.onlyIfCached = parseBooleanOnly(values[STRINGS.onlyIfCached]);\n this[\"private\"] = parseBooleanOnly(values[STRINGS[\"private\"]]);\n this.proxyRevalidate = parseBooleanOnly(values[STRINGS.proxyRevalidate]);\n this[\"public\"] = parseBooleanOnly(values[STRINGS[\"public\"]]);\n return this;\n }\n }, {\n key: \"format\",\n value: function format() {\n var tokens = [];\n\n if (this.maxAge) {\n tokens.push(\"\".concat(STRINGS.maxAge, \"=\").concat(this.maxAge));\n }\n\n if (this.sharedMaxAge) {\n tokens.push(\"\".concat(STRINGS.sharedMaxAge, \"=\").concat(this.sharedMaxAge));\n }\n\n if (this.maxStale) {\n if (this.maxStaleDuration) {\n tokens.push(\"\".concat(STRINGS.maxStale, \"=\").concat(this.maxStaleDuration));\n } else {\n tokens.push(STRINGS.maxStale);\n }\n }\n\n if (this.minFresh) {\n tokens.push(\"\".concat(STRINGS.minFresh, \"=\").concat(this.minFresh));\n }\n\n if (this.immutable) {\n tokens.push(STRINGS.immutable);\n }\n\n if (this.mustRevalidate) {\n tokens.push(STRINGS.mustRevalidate);\n }\n\n if (this.noCache) {\n tokens.push(STRINGS.noCache);\n }\n\n if (this.noStore) {\n tokens.push(STRINGS.noStore);\n }\n\n if (this.noTransform) {\n tokens.push(STRINGS.noTransform);\n }\n\n if (this.onlyIfCached) {\n tokens.push(STRINGS.onlyIfCached);\n }\n\n if (this[\"private\"]) {\n tokens.push(STRINGS[\"private\"]);\n }\n\n if (this.proxyRevalidate) {\n tokens.push(STRINGS.proxyRevalidate);\n }\n\n if (this[\"public\"]) {\n tokens.push(STRINGS[\"public\"]);\n }\n\n return tokens.join(', ');\n }\n }]);\n\n return CacheControl;\n}();\n\nfunction parse(header) {\n var cc = new CacheControl();\n return cc.parse(header);\n}\n\nfunction format(cc) {\n if (!(cc instanceof CacheControl)) {\n return CacheControl.prototype.format.call(cc);\n }\n\n return cc.format();\n}\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n CacheControl: CacheControl,\n parse: parse,\n format: format\n});\n\n/***/ }),\n\n/***/ \"./node_modules/charenc/charenc.js\":\n/*!*****************************************!*\\\n !*** ./node_modules/charenc/charenc.js ***!\n \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nvar charenc = {\n // UTF-8 encoding\n utf8: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));\n }\n },\n\n // Binary encoding\n bin: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n for (var bytes = [], i = 0; i < str.length; i++)\n bytes.push(str.charCodeAt(i) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n for (var str = [], i = 0; i < bytes.length; i++)\n str.push(String.fromCharCode(bytes[i]));\n return str.join('');\n }\n }\n};\n\nmodule.exports = charenc;\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_a-function.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/core-js/modules/_a-function.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_add-to-unscopables.js\":\n/*!*************************************************************!*\\\n !*** ./node_modules/core-js/modules/_add-to-unscopables.js ***!\n \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(/*! ./_hide */ \"./node_modules/core-js/modules/_hide.js\")(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_advance-string-index.js\":\n/*!***************************************************************!*\\\n !*** ./node_modules/core-js/modules/_advance-string-index.js ***!\n \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar at = __webpack_require__(/*! ./_string-at */ \"./node_modules/core-js/modules/_string-at.js\")(true);\n\n // `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? at(S, index).length : 1);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_an-object.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/_an-object.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(/*! ./_is-object */ \"./node_modules/core-js/modules/_is-object.js\");\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_array-includes.js\":\n/*!*********************************************************!*\\\n !*** ./node_modules/core-js/modules/_array-includes.js ***!\n \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(/*! ./_to-iobject */ \"./node_modules/core-js/modules/_to-iobject.js\");\nvar toLength = __webpack_require__(/*! ./_to-length */ \"./node_modules/core-js/modules/_to-length.js\");\nvar toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ \"./node_modules/core-js/modules/_to-absolute-index.js\");\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_classof.js\":\n/*!**************************************************!*\\\n !*** ./node_modules/core-js/modules/_classof.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = __webpack_require__(/*! ./_cof */ \"./node_modules/core-js/modules/_cof.js\");\nvar TAG = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_cof.js\":\n/*!**********************************************!*\\\n !*** ./node_modules/core-js/modules/_cof.js ***!\n \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nvar toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_core.js\":\n/*!***********************************************!*\\\n !*** ./node_modules/core-js/modules/_core.js ***!\n \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nvar core = module.exports = { version: '2.6.12' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_create-property.js\":\n/*!**********************************************************!*\\\n !*** ./node_modules/core-js/modules/_create-property.js ***!\n \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $defineProperty = __webpack_require__(/*! ./_object-dp */ \"./node_modules/core-js/modules/_object-dp.js\");\nvar createDesc = __webpack_require__(/*! ./_property-desc */ \"./node_modules/core-js/modules/_property-desc.js\");\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_ctx.js\":\n/*!**********************************************!*\\\n !*** ./node_modules/core-js/modules/_ctx.js ***!\n \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// optional / simple context binding\nvar aFunction = __webpack_require__(/*! ./_a-function */ \"./node_modules/core-js/modules/_a-function.js\");\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_defined.js\":\n/*!**************************************************!*\\\n !*** ./node_modules/core-js/modules/_defined.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_descriptors.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/core-js/modules/_descriptors.js ***!\n \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(/*! ./_fails */ \"./node_modules/core-js/modules/_fails.js\")(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_dom-create.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/core-js/modules/_dom-create.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(/*! ./_is-object */ \"./node_modules/core-js/modules/_is-object.js\");\nvar document = __webpack_require__(/*! ./_global */ \"./node_modules/core-js/modules/_global.js\").document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_enum-bug-keys.js\":\n/*!********************************************************!*\\\n !*** ./node_modules/core-js/modules/_enum-bug-keys.js ***!\n \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_enum-keys.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/_enum-keys.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// all enumerable object keys, includes symbols\nvar getKeys = __webpack_require__(/*! ./_object-keys */ \"./node_modules/core-js/modules/_object-keys.js\");\nvar gOPS = __webpack_require__(/*! ./_object-gops */ \"./node_modules/core-js/modules/_object-gops.js\");\nvar pIE = __webpack_require__(/*! ./_object-pie */ \"./node_modules/core-js/modules/_object-pie.js\");\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_export.js\":\n/*!*************************************************!*\\\n !*** ./node_modules/core-js/modules/_export.js ***!\n \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(/*! ./_global */ \"./node_modules/core-js/modules/_global.js\");\nvar core = __webpack_require__(/*! ./_core */ \"./node_modules/core-js/modules/_core.js\");\nvar hide = __webpack_require__(/*! ./_hide */ \"./node_modules/core-js/modules/_hide.js\");\nvar redefine = __webpack_require__(/*! ./_redefine */ \"./node_modules/core-js/modules/_redefine.js\");\nvar ctx = __webpack_require__(/*! ./_ctx */ \"./node_modules/core-js/modules/_ctx.js\");\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_fails-is-regexp.js\":\n/*!**********************************************************!*\\\n !*** ./node_modules/core-js/modules/_fails-is-regexp.js ***!\n \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar MATCH = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('match');\nmodule.exports = function (KEY) {\n var re = /./;\n try {\n '/./'[KEY](re);\n } catch (e) {\n try {\n re[MATCH] = false;\n return !'/./'[KEY](re);\n } catch (f) { /* empty */ }\n } return true;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_fails.js\":\n/*!************************************************!*\\\n !*** ./node_modules/core-js/modules/_fails.js ***!\n \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_fix-re-wks.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/core-js/modules/_fix-re-wks.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n__webpack_require__(/*! ./es6.regexp.exec */ \"./node_modules/core-js/modules/es6.regexp.exec.js\");\nvar redefine = __webpack_require__(/*! ./_redefine */ \"./node_modules/core-js/modules/_redefine.js\");\nvar hide = __webpack_require__(/*! ./_hide */ \"./node_modules/core-js/modules/_hide.js\");\nvar fails = __webpack_require__(/*! ./_fails */ \"./node_modules/core-js/modules/_fails.js\");\nvar defined = __webpack_require__(/*! ./_defined */ \"./node_modules/core-js/modules/_defined.js\");\nvar wks = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\");\nvar regexpExec = __webpack_require__(/*! ./_regexp-exec */ \"./node_modules/core-js/modules/_regexp-exec.js\");\n\nvar SPECIES = wks('species');\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$') !== '7';\n});\n\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {\n // Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length === 2 && result[0] === 'a' && result[1] === 'b';\n})();\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n re.exec = function () { execCalled = true; return null; };\n if (KEY === 'split') {\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n }\n re[SYMBOL]('');\n return !execCalled;\n }) : undefined;\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var fns = exec(\n defined,\n SYMBOL,\n ''[KEY],\n function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n }\n );\n var strfn = fns[0];\n var rxfn = fns[1];\n\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_flags.js\":\n/*!************************************************!*\\\n !*** ./node_modules/core-js/modules/_flags.js ***!\n \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = __webpack_require__(/*! ./_an-object */ \"./node_modules/core-js/modules/_an-object.js\");\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_function-to-string.js\":\n/*!*************************************************************!*\\\n !*** ./node_modules/core-js/modules/_function-to-string.js ***!\n \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(/*! ./_shared */ \"./node_modules/core-js/modules/_shared.js\")('native-function-to-string', Function.toString);\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_global.js\":\n/*!*************************************************!*\\\n !*** ./node_modules/core-js/modules/_global.js ***!\n \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_has.js\":\n/*!**********************************************!*\\\n !*** ./node_modules/core-js/modules/_has.js ***!\n \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nvar hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_hide.js\":\n/*!***********************************************!*\\\n !*** ./node_modules/core-js/modules/_hide.js ***!\n \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dP = __webpack_require__(/*! ./_object-dp */ \"./node_modules/core-js/modules/_object-dp.js\");\nvar createDesc = __webpack_require__(/*! ./_property-desc */ \"./node_modules/core-js/modules/_property-desc.js\");\nmodule.exports = __webpack_require__(/*! ./_descriptors */ \"./node_modules/core-js/modules/_descriptors.js\") ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_html.js\":\n/*!***********************************************!*\\\n !*** ./node_modules/core-js/modules/_html.js ***!\n \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar document = __webpack_require__(/*! ./_global */ \"./node_modules/core-js/modules/_global.js\").document;\nmodule.exports = document && document.documentElement;\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_ie8-dom-define.js\":\n/*!*********************************************************!*\\\n !*** ./node_modules/core-js/modules/_ie8-dom-define.js ***!\n \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = !__webpack_require__(/*! ./_descriptors */ \"./node_modules/core-js/modules/_descriptors.js\") && !__webpack_require__(/*! ./_fails */ \"./node_modules/core-js/modules/_fails.js\")(function () {\n return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ \"./node_modules/core-js/modules/_dom-create.js\")('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_iobject.js\":\n/*!**************************************************!*\\\n !*** ./node_modules/core-js/modules/_iobject.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = __webpack_require__(/*! ./_cof */ \"./node_modules/core-js/modules/_cof.js\");\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_is-array-iter.js\":\n/*!********************************************************!*\\\n !*** ./node_modules/core-js/modules/_is-array-iter.js ***!\n \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// check on default Array iterator\nvar Iterators = __webpack_require__(/*! ./_iterators */ \"./node_modules/core-js/modules/_iterators.js\");\nvar ITERATOR = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_is-array.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/core-js/modules/_is-array.js ***!\n \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.2.2 IsArray(argument)\nvar cof = __webpack_require__(/*! ./_cof */ \"./node_modules/core-js/modules/_cof.js\");\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_is-object.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/_is-object.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_is-regexp.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/_is-regexp.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.2.8 IsRegExp(argument)\nvar isObject = __webpack_require__(/*! ./_is-object */ \"./node_modules/core-js/modules/_is-object.js\");\nvar cof = __webpack_require__(/*! ./_cof */ \"./node_modules/core-js/modules/_cof.js\");\nvar MATCH = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_iter-call.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/_iter-call.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// call something on iterator step with safe closing on error\nvar anObject = __webpack_require__(/*! ./_an-object */ \"./node_modules/core-js/modules/_an-object.js\");\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_iter-create.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/core-js/modules/_iter-create.js ***!\n \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar create = __webpack_require__(/*! ./_object-create */ \"./node_modules/core-js/modules/_object-create.js\");\nvar descriptor = __webpack_require__(/*! ./_property-desc */ \"./node_modules/core-js/modules/_property-desc.js\");\nvar setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ \"./node_modules/core-js/modules/_set-to-string-tag.js\");\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(/*! ./_hide */ \"./node_modules/core-js/modules/_hide.js\")(IteratorPrototype, __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_iter-define.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/core-js/modules/_iter-define.js ***!\n \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar LIBRARY = __webpack_require__(/*! ./_library */ \"./node_modules/core-js/modules/_library.js\");\nvar $export = __webpack_require__(/*! ./_export */ \"./node_modules/core-js/modules/_export.js\");\nvar redefine = __webpack_require__(/*! ./_redefine */ \"./node_modules/core-js/modules/_redefine.js\");\nvar hide = __webpack_require__(/*! ./_hide */ \"./node_modules/core-js/modules/_hide.js\");\nvar Iterators = __webpack_require__(/*! ./_iterators */ \"./node_modules/core-js/modules/_iterators.js\");\nvar $iterCreate = __webpack_require__(/*! ./_iter-create */ \"./node_modules/core-js/modules/_iter-create.js\");\nvar setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ \"./node_modules/core-js/modules/_set-to-string-tag.js\");\nvar getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ \"./node_modules/core-js/modules/_object-gpo.js\");\nvar ITERATOR = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_iter-detect.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/core-js/modules/_iter-detect.js ***!\n \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar ITERATOR = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_iter-step.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/_iter-step.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_iterators.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/_iterators.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = {};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_library.js\":\n/*!**************************************************!*\\\n !*** ./node_modules/core-js/modules/_library.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = false;\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_meta.js\":\n/*!***********************************************!*\\\n !*** ./node_modules/core-js/modules/_meta.js ***!\n \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar META = __webpack_require__(/*! ./_uid */ \"./node_modules/core-js/modules/_uid.js\")('meta');\nvar isObject = __webpack_require__(/*! ./_is-object */ \"./node_modules/core-js/modules/_is-object.js\");\nvar has = __webpack_require__(/*! ./_has */ \"./node_modules/core-js/modules/_has.js\");\nvar setDesc = __webpack_require__(/*! ./_object-dp */ \"./node_modules/core-js/modules/_object-dp.js\").f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !__webpack_require__(/*! ./_fails */ \"./node_modules/core-js/modules/_fails.js\")(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_object-create.js\":\n/*!********************************************************!*\\\n !*** ./node_modules/core-js/modules/_object-create.js ***!\n \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = __webpack_require__(/*! ./_an-object */ \"./node_modules/core-js/modules/_an-object.js\");\nvar dPs = __webpack_require__(/*! ./_object-dps */ \"./node_modules/core-js/modules/_object-dps.js\");\nvar enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ \"./node_modules/core-js/modules/_enum-bug-keys.js\");\nvar IE_PROTO = __webpack_require__(/*! ./_shared-key */ \"./node_modules/core-js/modules/_shared-key.js\")('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(/*! ./_dom-create */ \"./node_modules/core-js/modules/_dom-create.js\")('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n __webpack_require__(/*! ./_html */ \"./node_modules/core-js/modules/_html.js\").appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_object-dp.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/_object-dp.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(/*! ./_an-object */ \"./node_modules/core-js/modules/_an-object.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ \"./node_modules/core-js/modules/_ie8-dom-define.js\");\nvar toPrimitive = __webpack_require__(/*! ./_to-primitive */ \"./node_modules/core-js/modules/_to-primitive.js\");\nvar dP = Object.defineProperty;\n\nexports.f = __webpack_require__(/*! ./_descriptors */ \"./node_modules/core-js/modules/_descriptors.js\") ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_object-dps.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/core-js/modules/_object-dps.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dP = __webpack_require__(/*! ./_object-dp */ \"./node_modules/core-js/modules/_object-dp.js\");\nvar anObject = __webpack_require__(/*! ./_an-object */ \"./node_modules/core-js/modules/_an-object.js\");\nvar getKeys = __webpack_require__(/*! ./_object-keys */ \"./node_modules/core-js/modules/_object-keys.js\");\n\nmodule.exports = __webpack_require__(/*! ./_descriptors */ \"./node_modules/core-js/modules/_descriptors.js\") ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_object-gopd.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/core-js/modules/_object-gopd.js ***!\n \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar pIE = __webpack_require__(/*! ./_object-pie */ \"./node_modules/core-js/modules/_object-pie.js\");\nvar createDesc = __webpack_require__(/*! ./_property-desc */ \"./node_modules/core-js/modules/_property-desc.js\");\nvar toIObject = __webpack_require__(/*! ./_to-iobject */ \"./node_modules/core-js/modules/_to-iobject.js\");\nvar toPrimitive = __webpack_require__(/*! ./_to-primitive */ \"./node_modules/core-js/modules/_to-primitive.js\");\nvar has = __webpack_require__(/*! ./_has */ \"./node_modules/core-js/modules/_has.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ \"./node_modules/core-js/modules/_ie8-dom-define.js\");\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = __webpack_require__(/*! ./_descriptors */ \"./node_modules/core-js/modules/_descriptors.js\") ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_object-gopn-ext.js\":\n/*!**********************************************************!*\\\n !*** ./node_modules/core-js/modules/_object-gopn-ext.js ***!\n \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(/*! ./_to-iobject */ \"./node_modules/core-js/modules/_to-iobject.js\");\nvar gOPN = __webpack_require__(/*! ./_object-gopn */ \"./node_modules/core-js/modules/_object-gopn.js\").f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_object-gopn.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/core-js/modules/_object-gopn.js ***!\n \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = __webpack_require__(/*! ./_object-keys-internal */ \"./node_modules/core-js/modules/_object-keys-internal.js\");\nvar hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ \"./node_modules/core-js/modules/_enum-bug-keys.js\").concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_object-gops.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/core-js/modules/_object-gops.js ***!\n \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nexports.f = Object.getOwnPropertySymbols;\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_object-gpo.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/core-js/modules/_object-gpo.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = __webpack_require__(/*! ./_has */ \"./node_modules/core-js/modules/_has.js\");\nvar toObject = __webpack_require__(/*! ./_to-object */ \"./node_modules/core-js/modules/_to-object.js\");\nvar IE_PROTO = __webpack_require__(/*! ./_shared-key */ \"./node_modules/core-js/modules/_shared-key.js\")('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_object-keys-internal.js\":\n/*!***************************************************************!*\\\n !*** ./node_modules/core-js/modules/_object-keys-internal.js ***!\n \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar has = __webpack_require__(/*! ./_has */ \"./node_modules/core-js/modules/_has.js\");\nvar toIObject = __webpack_require__(/*! ./_to-iobject */ \"./node_modules/core-js/modules/_to-iobject.js\");\nvar arrayIndexOf = __webpack_require__(/*! ./_array-includes */ \"./node_modules/core-js/modules/_array-includes.js\")(false);\nvar IE_PROTO = __webpack_require__(/*! ./_shared-key */ \"./node_modules/core-js/modules/_shared-key.js\")('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_object-keys.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/core-js/modules/_object-keys.js ***!\n \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = __webpack_require__(/*! ./_object-keys-internal */ \"./node_modules/core-js/modules/_object-keys-internal.js\");\nvar enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ \"./node_modules/core-js/modules/_enum-bug-keys.js\");\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_object-pie.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/core-js/modules/_object-pie.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nexports.f = {}.propertyIsEnumerable;\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_own-keys.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/core-js/modules/_own-keys.js ***!\n \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// all object keys, includes non-enumerable and symbols\nvar gOPN = __webpack_require__(/*! ./_object-gopn */ \"./node_modules/core-js/modules/_object-gopn.js\");\nvar gOPS = __webpack_require__(/*! ./_object-gops */ \"./node_modules/core-js/modules/_object-gops.js\");\nvar anObject = __webpack_require__(/*! ./_an-object */ \"./node_modules/core-js/modules/_an-object.js\");\nvar Reflect = __webpack_require__(/*! ./_global */ \"./node_modules/core-js/modules/_global.js\").Reflect;\nmodule.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {\n var keys = gOPN.f(anObject(it));\n var getSymbols = gOPS.f;\n return getSymbols ? keys.concat(getSymbols(it)) : keys;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_property-desc.js\":\n/*!********************************************************!*\\\n !*** ./node_modules/core-js/modules/_property-desc.js ***!\n \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_redefine.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/core-js/modules/_redefine.js ***!\n \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(/*! ./_global */ \"./node_modules/core-js/modules/_global.js\");\nvar hide = __webpack_require__(/*! ./_hide */ \"./node_modules/core-js/modules/_hide.js\");\nvar has = __webpack_require__(/*! ./_has */ \"./node_modules/core-js/modules/_has.js\");\nvar SRC = __webpack_require__(/*! ./_uid */ \"./node_modules/core-js/modules/_uid.js\")('src');\nvar $toString = __webpack_require__(/*! ./_function-to-string */ \"./node_modules/core-js/modules/_function-to-string.js\");\nvar TO_STRING = 'toString';\nvar TPL = ('' + $toString).split(TO_STRING);\n\n__webpack_require__(/*! ./_core */ \"./node_modules/core-js/modules/_core.js\").inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_regexp-exec-abstract.js\":\n/*!***************************************************************!*\\\n !*** ./node_modules/core-js/modules/_regexp-exec-abstract.js ***!\n \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar classof = __webpack_require__(/*! ./_classof */ \"./node_modules/core-js/modules/_classof.js\");\nvar builtinExec = RegExp.prototype.exec;\n\n // `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw new TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n if (classof(R) !== 'RegExp') {\n throw new TypeError('RegExp#exec called on incompatible receiver');\n }\n return builtinExec.call(R, S);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_regexp-exec.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/core-js/modules/_regexp-exec.js ***!\n \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar regexpFlags = __webpack_require__(/*! ./_flags */ \"./node_modules/core-js/modules/_flags.js\");\n\nvar nativeExec = RegExp.prototype.exec;\n// This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\nvar nativeReplace = String.prototype.replace;\n\nvar patchedExec = nativeExec;\n\nvar LAST_INDEX = 'lastIndex';\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/,\n re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;\n})();\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + re.source + '$(?!\\\\s)', regexpFlags.call(re));\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];\n\n match = nativeExec.call(re, str);\n\n if (UPDATES_LAST_INDEX_WRONG && match) {\n re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n // eslint-disable-next-line no-loop-func\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_set-to-string-tag.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/core-js/modules/_set-to-string-tag.js ***!\n \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar def = __webpack_require__(/*! ./_object-dp */ \"./node_modules/core-js/modules/_object-dp.js\").f;\nvar has = __webpack_require__(/*! ./_has */ \"./node_modules/core-js/modules/_has.js\");\nvar TAG = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_shared-key.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/core-js/modules/_shared-key.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar shared = __webpack_require__(/*! ./_shared */ \"./node_modules/core-js/modules/_shared.js\")('keys');\nvar uid = __webpack_require__(/*! ./_uid */ \"./node_modules/core-js/modules/_uid.js\");\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_shared.js\":\n/*!*************************************************!*\\\n !*** ./node_modules/core-js/modules/_shared.js ***!\n \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar core = __webpack_require__(/*! ./_core */ \"./node_modules/core-js/modules/_core.js\");\nvar global = __webpack_require__(/*! ./_global */ \"./node_modules/core-js/modules/_global.js\");\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: __webpack_require__(/*! ./_library */ \"./node_modules/core-js/modules/_library.js\") ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_species-constructor.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/core-js/modules/_species-constructor.js ***!\n \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = __webpack_require__(/*! ./_an-object */ \"./node_modules/core-js/modules/_an-object.js\");\nvar aFunction = __webpack_require__(/*! ./_a-function */ \"./node_modules/core-js/modules/_a-function.js\");\nvar SPECIES = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_string-at.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/_string-at.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(/*! ./_to-integer */ \"./node_modules/core-js/modules/_to-integer.js\");\nvar defined = __webpack_require__(/*! ./_defined */ \"./node_modules/core-js/modules/_defined.js\");\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_string-context.js\":\n/*!*********************************************************!*\\\n !*** ./node_modules/core-js/modules/_string-context.js ***!\n \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// helper for String#{startsWith, endsWith, includes}\nvar isRegExp = __webpack_require__(/*! ./_is-regexp */ \"./node_modules/core-js/modules/_is-regexp.js\");\nvar defined = __webpack_require__(/*! ./_defined */ \"./node_modules/core-js/modules/_defined.js\");\n\nmodule.exports = function (that, searchString, NAME) {\n if (isRegExp(searchString)) throw TypeError('String#' + NAME + \" doesn't accept regex!\");\n return String(defined(that));\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_to-absolute-index.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/core-js/modules/_to-absolute-index.js ***!\n \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(/*! ./_to-integer */ \"./node_modules/core-js/modules/_to-integer.js\");\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_to-integer.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/core-js/modules/_to-integer.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_to-iobject.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/core-js/modules/_to-iobject.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = __webpack_require__(/*! ./_iobject */ \"./node_modules/core-js/modules/_iobject.js\");\nvar defined = __webpack_require__(/*! ./_defined */ \"./node_modules/core-js/modules/_defined.js\");\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_to-length.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/_to-length.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.15 ToLength\nvar toInteger = __webpack_require__(/*! ./_to-integer */ \"./node_modules/core-js/modules/_to-integer.js\");\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_to-object.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/_to-object.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.13 ToObject(argument)\nvar defined = __webpack_require__(/*! ./_defined */ \"./node_modules/core-js/modules/_defined.js\");\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_to-primitive.js\":\n/*!*******************************************************!*\\\n !*** ./node_modules/core-js/modules/_to-primitive.js ***!\n \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = __webpack_require__(/*! ./_is-object */ \"./node_modules/core-js/modules/_is-object.js\");\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_uid.js\":\n/*!**********************************************!*\\\n !*** ./node_modules/core-js/modules/_uid.js ***!\n \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nvar id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_wks-define.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/core-js/modules/_wks-define.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar global = __webpack_require__(/*! ./_global */ \"./node_modules/core-js/modules/_global.js\");\nvar core = __webpack_require__(/*! ./_core */ \"./node_modules/core-js/modules/_core.js\");\nvar LIBRARY = __webpack_require__(/*! ./_library */ \"./node_modules/core-js/modules/_library.js\");\nvar wksExt = __webpack_require__(/*! ./_wks-ext */ \"./node_modules/core-js/modules/_wks-ext.js\");\nvar defineProperty = __webpack_require__(/*! ./_object-dp */ \"./node_modules/core-js/modules/_object-dp.js\").f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_wks-ext.js\":\n/*!**************************************************!*\\\n !*** ./node_modules/core-js/modules/_wks-ext.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports.f = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\");\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/_wks.js\":\n/*!**********************************************!*\\\n !*** ./node_modules/core-js/modules/_wks.js ***!\n \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar store = __webpack_require__(/*! ./_shared */ \"./node_modules/core-js/modules/_shared.js\")('wks');\nvar uid = __webpack_require__(/*! ./_uid */ \"./node_modules/core-js/modules/_uid.js\");\nvar Symbol = __webpack_require__(/*! ./_global */ \"./node_modules/core-js/modules/_global.js\").Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/core.get-iterator-method.js\":\n/*!******************************************************************!*\\\n !*** ./node_modules/core-js/modules/core.get-iterator-method.js ***!\n \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar classof = __webpack_require__(/*! ./_classof */ \"./node_modules/core-js/modules/_classof.js\");\nvar ITERATOR = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('iterator');\nvar Iterators = __webpack_require__(/*! ./_iterators */ \"./node_modules/core-js/modules/_iterators.js\");\nmodule.exports = __webpack_require__(/*! ./_core */ \"./node_modules/core-js/modules/_core.js\").getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es6.array.from.js\":\n/*!********************************************************!*\\\n !*** ./node_modules/core-js/modules/es6.array.from.js ***!\n \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ctx = __webpack_require__(/*! ./_ctx */ \"./node_modules/core-js/modules/_ctx.js\");\nvar $export = __webpack_require__(/*! ./_export */ \"./node_modules/core-js/modules/_export.js\");\nvar toObject = __webpack_require__(/*! ./_to-object */ \"./node_modules/core-js/modules/_to-object.js\");\nvar call = __webpack_require__(/*! ./_iter-call */ \"./node_modules/core-js/modules/_iter-call.js\");\nvar isArrayIter = __webpack_require__(/*! ./_is-array-iter */ \"./node_modules/core-js/modules/_is-array-iter.js\");\nvar toLength = __webpack_require__(/*! ./_to-length */ \"./node_modules/core-js/modules/_to-length.js\");\nvar createProperty = __webpack_require__(/*! ./_create-property */ \"./node_modules/core-js/modules/_create-property.js\");\nvar getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ \"./node_modules/core-js/modules/core.get-iterator-method.js\");\n\n$export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ \"./node_modules/core-js/modules/_iter-detect.js\")(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es6.array.iterator.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/core-js/modules/es6.array.iterator.js ***!\n \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ \"./node_modules/core-js/modules/_add-to-unscopables.js\");\nvar step = __webpack_require__(/*! ./_iter-step */ \"./node_modules/core-js/modules/_iter-step.js\");\nvar Iterators = __webpack_require__(/*! ./_iterators */ \"./node_modules/core-js/modules/_iterators.js\");\nvar toIObject = __webpack_require__(/*! ./_to-iobject */ \"./node_modules/core-js/modules/_to-iobject.js\");\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(/*! ./_iter-define */ \"./node_modules/core-js/modules/_iter-define.js\")(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es6.function.name.js\":\n/*!***********************************************************!*\\\n !*** ./node_modules/core-js/modules/es6.function.name.js ***!\n \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar dP = __webpack_require__(/*! ./_object-dp */ \"./node_modules/core-js/modules/_object-dp.js\").f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || __webpack_require__(/*! ./_descriptors */ \"./node_modules/core-js/modules/_descriptors.js\") && dP(FProto, NAME, {\n configurable: true,\n get: function () {\n try {\n return ('' + this).match(nameRE)[1];\n } catch (e) {\n return '';\n }\n }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es6.number.is-finite.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/core-js/modules/es6.number.is-finite.js ***!\n \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// 20.1.2.2 Number.isFinite(number)\nvar $export = __webpack_require__(/*! ./_export */ \"./node_modules/core-js/modules/_export.js\");\nvar _isFinite = __webpack_require__(/*! ./_global */ \"./node_modules/core-js/modules/_global.js\").isFinite;\n\n$export($export.S, 'Number', {\n isFinite: function isFinite(it) {\n return typeof it == 'number' && _isFinite(it);\n }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es6.object.to-string.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/core-js/modules/es6.object.to-string.js ***!\n \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// 19.1.3.6 Object.prototype.toString()\nvar classof = __webpack_require__(/*! ./_classof */ \"./node_modules/core-js/modules/_classof.js\");\nvar test = {};\ntest[__webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('toStringTag')] = 'z';\nif (test + '' != '[object z]') {\n __webpack_require__(/*! ./_redefine */ \"./node_modules/core-js/modules/_redefine.js\")(Object.prototype, 'toString', function toString() {\n return '[object ' + classof(this) + ']';\n }, true);\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es6.regexp.exec.js\":\n/*!*********************************************************!*\\\n !*** ./node_modules/core-js/modules/es6.regexp.exec.js ***!\n \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar regexpExec = __webpack_require__(/*! ./_regexp-exec */ \"./node_modules/core-js/modules/_regexp-exec.js\");\n__webpack_require__(/*! ./_export */ \"./node_modules/core-js/modules/_export.js\")({\n target: 'RegExp',\n proto: true,\n forced: regexpExec !== /./.exec\n}, {\n exec: regexpExec\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es6.regexp.split.js\":\n/*!**********************************************************!*\\\n !*** ./node_modules/core-js/modules/es6.regexp.split.js ***!\n \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar isRegExp = __webpack_require__(/*! ./_is-regexp */ \"./node_modules/core-js/modules/_is-regexp.js\");\nvar anObject = __webpack_require__(/*! ./_an-object */ \"./node_modules/core-js/modules/_an-object.js\");\nvar speciesConstructor = __webpack_require__(/*! ./_species-constructor */ \"./node_modules/core-js/modules/_species-constructor.js\");\nvar advanceStringIndex = __webpack_require__(/*! ./_advance-string-index */ \"./node_modules/core-js/modules/_advance-string-index.js\");\nvar toLength = __webpack_require__(/*! ./_to-length */ \"./node_modules/core-js/modules/_to-length.js\");\nvar callRegExpExec = __webpack_require__(/*! ./_regexp-exec-abstract */ \"./node_modules/core-js/modules/_regexp-exec-abstract.js\");\nvar regexpExec = __webpack_require__(/*! ./_regexp-exec */ \"./node_modules/core-js/modules/_regexp-exec.js\");\nvar fails = __webpack_require__(/*! ./_fails */ \"./node_modules/core-js/modules/_fails.js\");\nvar $min = Math.min;\nvar $push = [].push;\nvar $SPLIT = 'split';\nvar LENGTH = 'length';\nvar LAST_INDEX = 'lastIndex';\nvar MAX_UINT32 = 0xffffffff;\n\n// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\nvar SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });\n\n// @@split logic\n__webpack_require__(/*! ./_fix-re-wks */ \"./node_modules/core-js/modules/_fix-re-wks.js\")('split', 2, function (defined, SPLIT, $split, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return $split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy[LAST_INDEX];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);\n };\n } else {\n internalSplit = $split;\n }\n\n return [\n // `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = defined(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined\n ? splitter.call(separator, O, limit)\n : internalSplit.call(String(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (SUPPORTS_Y ? 'y' : 'g');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n if (\n z === null ||\n (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es6.string.includes.js\":\n/*!*************************************************************!*\\\n !*** ./node_modules/core-js/modules/es6.string.includes.js ***!\n \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n// 21.1.3.7 String.prototype.includes(searchString, position = 0)\n\nvar $export = __webpack_require__(/*! ./_export */ \"./node_modules/core-js/modules/_export.js\");\nvar context = __webpack_require__(/*! ./_string-context */ \"./node_modules/core-js/modules/_string-context.js\");\nvar INCLUDES = 'includes';\n\n$export($export.P + $export.F * __webpack_require__(/*! ./_fails-is-regexp */ \"./node_modules/core-js/modules/_fails-is-regexp.js\")(INCLUDES), 'String', {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~context(this, searchString, INCLUDES)\n .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es6.symbol.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/core-js/modules/es6.symbol.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// ECMAScript 6 symbols shim\nvar global = __webpack_require__(/*! ./_global */ \"./node_modules/core-js/modules/_global.js\");\nvar has = __webpack_require__(/*! ./_has */ \"./node_modules/core-js/modules/_has.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ \"./node_modules/core-js/modules/_descriptors.js\");\nvar $export = __webpack_require__(/*! ./_export */ \"./node_modules/core-js/modules/_export.js\");\nvar redefine = __webpack_require__(/*! ./_redefine */ \"./node_modules/core-js/modules/_redefine.js\");\nvar META = __webpack_require__(/*! ./_meta */ \"./node_modules/core-js/modules/_meta.js\").KEY;\nvar $fails = __webpack_require__(/*! ./_fails */ \"./node_modules/core-js/modules/_fails.js\");\nvar shared = __webpack_require__(/*! ./_shared */ \"./node_modules/core-js/modules/_shared.js\");\nvar setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ \"./node_modules/core-js/modules/_set-to-string-tag.js\");\nvar uid = __webpack_require__(/*! ./_uid */ \"./node_modules/core-js/modules/_uid.js\");\nvar wks = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\");\nvar wksExt = __webpack_require__(/*! ./_wks-ext */ \"./node_modules/core-js/modules/_wks-ext.js\");\nvar wksDefine = __webpack_require__(/*! ./_wks-define */ \"./node_modules/core-js/modules/_wks-define.js\");\nvar enumKeys = __webpack_require__(/*! ./_enum-keys */ \"./node_modules/core-js/modules/_enum-keys.js\");\nvar isArray = __webpack_require__(/*! ./_is-array */ \"./node_modules/core-js/modules/_is-array.js\");\nvar anObject = __webpack_require__(/*! ./_an-object */ \"./node_modules/core-js/modules/_an-object.js\");\nvar isObject = __webpack_require__(/*! ./_is-object */ \"./node_modules/core-js/modules/_is-object.js\");\nvar toObject = __webpack_require__(/*! ./_to-object */ \"./node_modules/core-js/modules/_to-object.js\");\nvar toIObject = __webpack_require__(/*! ./_to-iobject */ \"./node_modules/core-js/modules/_to-iobject.js\");\nvar toPrimitive = __webpack_require__(/*! ./_to-primitive */ \"./node_modules/core-js/modules/_to-primitive.js\");\nvar createDesc = __webpack_require__(/*! ./_property-desc */ \"./node_modules/core-js/modules/_property-desc.js\");\nvar _create = __webpack_require__(/*! ./_object-create */ \"./node_modules/core-js/modules/_object-create.js\");\nvar gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ \"./node_modules/core-js/modules/_object-gopn-ext.js\");\nvar $GOPD = __webpack_require__(/*! ./_object-gopd */ \"./node_modules/core-js/modules/_object-gopd.js\");\nvar $GOPS = __webpack_require__(/*! ./_object-gops */ \"./node_modules/core-js/modules/_object-gops.js\");\nvar $DP = __webpack_require__(/*! ./_object-dp */ \"./node_modules/core-js/modules/_object-dp.js\");\nvar $keys = __webpack_require__(/*! ./_object-keys */ \"./node_modules/core-js/modules/_object-keys.js\");\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(/*! ./_object-gopn */ \"./node_modules/core-js/modules/_object-gopn.js\").f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(/*! ./_object-pie */ \"./node_modules/core-js/modules/_object-pie.js\").f = $propertyIsEnumerable;\n $GOPS.f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !__webpack_require__(/*! ./_library */ \"./node_modules/core-js/modules/_library.js\")) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\nvar FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });\n\n$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return $GOPS.f(toObject(it));\n }\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ \"./node_modules/core-js/modules/_hide.js\")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es7.array.includes.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/core-js/modules/es7.array.includes.js ***!\n \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// https://github.com/tc39/Array.prototype.includes\nvar $export = __webpack_require__(/*! ./_export */ \"./node_modules/core-js/modules/_export.js\");\nvar $includes = __webpack_require__(/*! ./_array-includes */ \"./node_modules/core-js/modules/_array-includes.js\")(true);\n\n$export($export.P, 'Array', {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n__webpack_require__(/*! ./_add-to-unscopables */ \"./node_modules/core-js/modules/_add-to-unscopables.js\")('includes');\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js\":\n/*!*********************************************************************************!*\\\n !*** ./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js ***!\n \\*********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n// https://github.com/tc39/proposal-object-getownpropertydescriptors\nvar $export = __webpack_require__(/*! ./_export */ \"./node_modules/core-js/modules/_export.js\");\nvar ownKeys = __webpack_require__(/*! ./_own-keys */ \"./node_modules/core-js/modules/_own-keys.js\");\nvar toIObject = __webpack_require__(/*! ./_to-iobject */ \"./node_modules/core-js/modules/_to-iobject.js\");\nvar gOPD = __webpack_require__(/*! ./_object-gopd */ \"./node_modules/core-js/modules/_object-gopd.js\");\nvar createProperty = __webpack_require__(/*! ./_create-property */ \"./node_modules/core-js/modules/_create-property.js\");\n\n$export($export.S, 'Object', {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIObject(object);\n var getDesc = gOPD.f;\n var keys = ownKeys(O);\n var result = {};\n var i = 0;\n var key, desc;\n while (keys.length > i) {\n desc = getDesc(O, key = keys[i++]);\n if (desc !== undefined) createProperty(result, key, desc);\n }\n return result;\n }\n});\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/es7.symbol.async-iterator.js\":\n/*!*******************************************************************!*\\\n !*** ./node_modules/core-js/modules/es7.symbol.async-iterator.js ***!\n \\*******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(/*! ./_wks-define */ \"./node_modules/core-js/modules/_wks-define.js\")('asyncIterator');\n\n\n/***/ }),\n\n/***/ \"./node_modules/core-js/modules/web.dom.iterable.js\":\n/*!**********************************************************!*\\\n !*** ./node_modules/core-js/modules/web.dom.iterable.js ***!\n \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $iterators = __webpack_require__(/*! ./es6.array.iterator */ \"./node_modules/core-js/modules/es6.array.iterator.js\");\nvar getKeys = __webpack_require__(/*! ./_object-keys */ \"./node_modules/core-js/modules/_object-keys.js\");\nvar redefine = __webpack_require__(/*! ./_redefine */ \"./node_modules/core-js/modules/_redefine.js\");\nvar global = __webpack_require__(/*! ./_global */ \"./node_modules/core-js/modules/_global.js\");\nvar hide = __webpack_require__(/*! ./_hide */ \"./node_modules/core-js/modules/_hide.js\");\nvar Iterators = __webpack_require__(/*! ./_iterators */ \"./node_modules/core-js/modules/_iterators.js\");\nvar wks = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\");\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/crypt/crypt.js\":\n/*!*************************************!*\\\n !*** ./node_modules/crypt/crypt.js ***!\n \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n(function() {\n var base64map\n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n\n crypt = {\n // Bit-wise rotation left\n rotl: function(n, b) {\n return (n << b) | (n >>> (32 - b));\n },\n\n // Bit-wise rotation right\n rotr: function(n, b) {\n return (n << (32 - b)) | (n >>> b);\n },\n\n // Swap big-endian to little-endian and vice versa\n endian: function(n) {\n // If number given, swap endian\n if (n.constructor == Number) {\n return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;\n }\n\n // Else, assume array and swap all items\n for (var i = 0; i < n.length; i++)\n n[i] = crypt.endian(n[i]);\n return n;\n },\n\n // Generate an array of any length of random bytes\n randomBytes: function(n) {\n for (var bytes = []; n > 0; n--)\n bytes.push(Math.floor(Math.random() * 256));\n return bytes;\n },\n\n // Convert a byte array to big-endian 32-bit words\n bytesToWords: function(bytes) {\n for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)\n words[b >>> 5] |= bytes[i] << (24 - b % 32);\n return words;\n },\n\n // Convert big-endian 32-bit words to a byte array\n wordsToBytes: function(words) {\n for (var bytes = [], b = 0; b < words.length * 32; b += 8)\n bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a hex string\n bytesToHex: function(bytes) {\n for (var hex = [], i = 0; i < bytes.length; i++) {\n hex.push((bytes[i] >>> 4).toString(16));\n hex.push((bytes[i] & 0xF).toString(16));\n }\n return hex.join('');\n },\n\n // Convert a hex string to a byte array\n hexToBytes: function(hex) {\n for (var bytes = [], c = 0; c < hex.length; c += 2)\n bytes.push(parseInt(hex.substr(c, 2), 16));\n return bytes;\n },\n\n // Convert a byte array to a base-64 string\n bytesToBase64: function(bytes) {\n for (var base64 = [], i = 0; i < bytes.length; i += 3) {\n var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n for (var j = 0; j < 4; j++)\n if (i * 8 + j * 6 <= bytes.length * 8)\n base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));\n else\n base64.push('=');\n }\n return base64.join('');\n },\n\n // Convert a base-64 string to a byte array\n base64ToBytes: function(base64) {\n // Remove non-base-64 characters\n base64 = base64.replace(/[^A-Z0-9+\\/]/ig, '');\n\n for (var bytes = [], i = 0, imod4 = 0; i < base64.length;\n imod4 = ++i % 4) {\n if (imod4 == 0) continue;\n bytes.push(((base64map.indexOf(base64.charAt(i - 1))\n & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))\n | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));\n }\n return bytes;\n }\n };\n\n module.exports = crypt;\n})();\n\n\n/***/ }),\n\n/***/ \"./node_modules/is-buffer/index.js\":\n/*!*****************************************!*\\\n !*** ./node_modules/is-buffer/index.js ***!\n \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\n/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/md5/md5.js\":\n/*!*********************************!*\\\n !*** ./node_modules/md5/md5.js ***!\n \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n(function(){\r\n var crypt = __webpack_require__(/*! crypt */ \"./node_modules/crypt/crypt.js\"),\r\n utf8 = __webpack_require__(/*! charenc */ \"./node_modules/charenc/charenc.js\").utf8,\r\n isBuffer = __webpack_require__(/*! is-buffer */ \"./node_modules/is-buffer/index.js\"),\r\n bin = __webpack_require__(/*! charenc */ \"./node_modules/charenc/charenc.js\").bin,\r\n\r\n // The core\r\n md5 = function (message, options) {\r\n // Convert to byte array\r\n if (message.constructor == String)\r\n if (options && options.encoding === 'binary')\r\n message = bin.stringToBytes(message);\r\n else\r\n message = utf8.stringToBytes(message);\r\n else if (isBuffer(message))\r\n message = Array.prototype.slice.call(message, 0);\r\n else if (!Array.isArray(message) && message.constructor !== Uint8Array)\r\n message = message.toString();\r\n // else, assume byte array already\r\n\r\n var m = crypt.bytesToWords(message),\r\n l = message.length * 8,\r\n a = 1732584193,\r\n b = -271733879,\r\n c = -1732584194,\r\n d = 271733878;\r\n\r\n // Swap endian\r\n for (var i = 0; i < m.length; i++) {\r\n m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |\r\n ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;\r\n }\r\n\r\n // Padding\r\n m[l >>> 5] |= 0x80 << (l % 32);\r\n m[(((l + 64) >>> 9) << 4) + 14] = l;\r\n\r\n // Method shortcuts\r\n var FF = md5._ff,\r\n GG = md5._gg,\r\n HH = md5._hh,\r\n II = md5._ii;\r\n\r\n for (var i = 0; i < m.length; i += 16) {\r\n\r\n var aa = a,\r\n bb = b,\r\n cc = c,\r\n dd = d;\r\n\r\n a = FF(a, b, c, d, m[i+ 0], 7, -680876936);\r\n d = FF(d, a, b, c, m[i+ 1], 12, -389564586);\r\n c = FF(c, d, a, b, m[i+ 2], 17, 606105819);\r\n b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);\r\n a = FF(a, b, c, d, m[i+ 4], 7, -176418897);\r\n d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);\r\n c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);\r\n b = FF(b, c, d, a, m[i+ 7], 22, -45705983);\r\n a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);\r\n d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);\r\n c = FF(c, d, a, b, m[i+10], 17, -42063);\r\n b = FF(b, c, d, a, m[i+11], 22, -1990404162);\r\n a = FF(a, b, c, d, m[i+12], 7, 1804603682);\r\n d = FF(d, a, b, c, m[i+13], 12, -40341101);\r\n c = FF(c, d, a, b, m[i+14], 17, -1502002290);\r\n b = FF(b, c, d, a, m[i+15], 22, 1236535329);\r\n\r\n a = GG(a, b, c, d, m[i+ 1], 5, -165796510);\r\n d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);\r\n c = GG(c, d, a, b, m[i+11], 14, 643717713);\r\n b = GG(b, c, d, a, m[i+ 0], 20, -373897302);\r\n a = GG(a, b, c, d, m[i+ 5], 5, -701558691);\r\n d = GG(d, a, b, c, m[i+10], 9, 38016083);\r\n c = GG(c, d, a, b, m[i+15], 14, -660478335);\r\n b = GG(b, c, d, a, m[i+ 4], 20, -405537848);\r\n a = GG(a, b, c, d, m[i+ 9], 5, 568446438);\r\n d = GG(d, a, b, c, m[i+14], 9, -1019803690);\r\n c = GG(c, d, a, b, m[i+ 3], 14, -187363961);\r\n b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);\r\n a = GG(a, b, c, d, m[i+13], 5, -1444681467);\r\n d = GG(d, a, b, c, m[i+ 2], 9, -51403784);\r\n c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);\r\n b = GG(b, c, d, a, m[i+12], 20, -1926607734);\r\n\r\n a = HH(a, b, c, d, m[i+ 5], 4, -378558);\r\n d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);\r\n c = HH(c, d, a, b, m[i+11], 16, 1839030562);\r\n b = HH(b, c, d, a, m[i+14], 23, -35309556);\r\n a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);\r\n d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);\r\n c = HH(c, d, a, b, m[i+ 7], 16, -155497632);\r\n b = HH(b, c, d, a, m[i+10], 23, -1094730640);\r\n a = HH(a, b, c, d, m[i+13], 4, 681279174);\r\n d = HH(d, a, b, c, m[i+ 0], 11, -358537222);\r\n c = HH(c, d, a, b, m[i+ 3], 16, -722521979);\r\n b = HH(b, c, d, a, m[i+ 6], 23, 76029189);\r\n a = HH(a, b, c, d, m[i+ 9], 4, -640364487);\r\n d = HH(d, a, b, c, m[i+12], 11, -421815835);\r\n c = HH(c, d, a, b, m[i+15], 16, 530742520);\r\n b = HH(b, c, d, a, m[i+ 2], 23, -995338651);\r\n\r\n a = II(a, b, c, d, m[i+ 0], 6, -198630844);\r\n d = II(d, a, b, c, m[i+ 7], 10, 1126891415);\r\n c = II(c, d, a, b, m[i+14], 15, -1416354905);\r\n b = II(b, c, d, a, m[i+ 5], 21, -57434055);\r\n a = II(a, b, c, d, m[i+12], 6, 1700485571);\r\n d = II(d, a, b, c, m[i+ 3], 10, -1894986606);\r\n c = II(c, d, a, b, m[i+10], 15, -1051523);\r\n b = II(b, c, d, a, m[i+ 1], 21, -2054922799);\r\n a = II(a, b, c, d, m[i+ 8], 6, 1873313359);\r\n d = II(d, a, b, c, m[i+15], 10, -30611744);\r\n c = II(c, d, a, b, m[i+ 6], 15, -1560198380);\r\n b = II(b, c, d, a, m[i+13], 21, 1309151649);\r\n a = II(a, b, c, d, m[i+ 4], 6, -145523070);\r\n d = II(d, a, b, c, m[i+11], 10, -1120210379);\r\n c = II(c, d, a, b, m[i+ 2], 15, 718787259);\r\n b = II(b, c, d, a, m[i+ 9], 21, -343485551);\r\n\r\n a = (a + aa) >>> 0;\r\n b = (b + bb) >>> 0;\r\n c = (c + cc) >>> 0;\r\n d = (d + dd) >>> 0;\r\n }\r\n\r\n return crypt.endian([a, b, c, d]);\r\n };\r\n\r\n // Auxiliary functions\r\n md5._ff = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & c | ~b & d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._gg = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & d | c & ~d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._hh = function (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._ii = function (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n\r\n // Package private blocksize\r\n md5._blocksize = 16;\r\n md5._digestsize = 16;\r\n\r\n module.exports = function (message, options) {\r\n if (message === undefined || message === null)\r\n throw new Error('Illegal argument ' + message);\r\n\r\n var digestbytes = crypt.wordsToBytes(md5(message, options));\r\n return options && options.asBytes ? digestbytes :\r\n options && options.asString ? bin.bytesToString(digestbytes) :\r\n crypt.bytesToHex(digestbytes);\r\n };\r\n\r\n})();\r\n\n\n/***/ }),\n\n/***/ \"./node_modules/regenerator-runtime/runtime.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/regenerator-runtime/runtime.js ***!\n \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n true ? module.exports : undefined\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n\n\n/***/ }),\n\n/***/ \"./src/api.js\":\n/*!********************!*\\\n !*** ./src/api.js ***!\n \\********************/\n/*! exports provided: setup, setupCache, serializeQuery, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setup\", function() { return setup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setupCache\", function() { return setupCache; });\n/* harmony import */ var core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es7.object.get-own-property-descriptors */ \"./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js\");\n/* harmony import */ var core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.symbol */ \"./node_modules/core-js/modules/es6.symbol.js\");\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es6.array.iterator */ \"./node_modules/core-js/modules/es6.array.iterator.js\");\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! regenerator-runtime/runtime */ \"./node_modules/regenerator-runtime/runtime.js\");\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! axios */ \"axios\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _request__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./request */ \"./src/request.js\");\n/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cache */ \"./src/cache.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"serializeQuery\", function() { return _cache__WEBPACK_IMPORTED_MODULE_7__[\"serializeQuery\"]; });\n\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./config */ \"./src/config.js\");\n/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utilities */ \"./src/utilities.js\");\n\n\n\n\n\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\n\n\n\n\n\n/**\n * Configure cache adapter\n *\n * @param {object} [config={}] Cache adapter options\n * @returns {object} Object containing cache `adapter` and `store`\n */\n\nfunction setupCache() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Extend default configuration\n config = Object(_config__WEBPACK_IMPORTED_MODULE_8__[\"makeConfig\"])(config); // Axios adapter. Receives the axios request configuration as only parameter\n\n function adapter(_x) {\n return _adapter.apply(this, arguments);\n } // Return adapter and store instance\n\n\n function _adapter() {\n _adapter = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(req) {\n var reqConfig, res, next, networkError, readOnError;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // Merge the per-request config with the instance config.\n reqConfig = Object(_config__WEBPACK_IMPORTED_MODULE_8__[\"mergeRequestConfig\"])(config, req); // Execute request against local cache\n\n _context.next = 3;\n return Object(_request__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(reqConfig, req);\n\n case 3:\n res = _context.sent;\n next = res.next; // Response is not function, something was in cache, return it\n\n if (Object(_utilities__WEBPACK_IMPORTED_MODULE_9__[\"isFunction\"])(next)) {\n _context.next = 7;\n break;\n }\n\n return _context.abrupt(\"return\", next);\n\n case 7:\n _context.prev = 7;\n _context.next = 10;\n return reqConfig.adapter(req);\n\n case 10:\n res = _context.sent;\n _context.next = 16;\n break;\n\n case 13:\n _context.prev = 13;\n _context.t0 = _context[\"catch\"](7);\n networkError = _context.t0;\n\n case 16:\n if (!networkError) {\n _context.next = 31;\n break;\n }\n\n // Check if we should attempt reading stale cache data\n readOnError = Object(_utilities__WEBPACK_IMPORTED_MODULE_9__[\"isFunction\"])(reqConfig.readOnError) ? reqConfig.readOnError(networkError, req) : reqConfig.readOnError;\n\n if (!readOnError) {\n _context.next = 30;\n break;\n }\n\n _context.prev = 19;\n // Force cache tu return stale data\n reqConfig.acceptStale = true; // Try to read from cache again\n\n _context.next = 23;\n return Object(_request__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(reqConfig, req);\n\n case 23:\n res = _context.sent;\n // Signal that data is from stale cache\n res.next.request.stale = true; // No need to check if `next` is a function just return cache data\n\n return _context.abrupt(\"return\", res.next);\n\n case 28:\n _context.prev = 28;\n _context.t1 = _context[\"catch\"](19);\n\n case 30:\n throw networkError;\n\n case 31:\n return _context.abrupt(\"return\", next(res));\n\n case 32:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[7, 13], [19, 28]]);\n }));\n return _adapter.apply(this, arguments);\n }\n\n return {\n adapter: adapter,\n config: config,\n store: config.store\n };\n} // ---------------------\n// Easy API Setup\n// ---------------------\n\n/**\n * Setup an axios instance with the cache adapter pre-configured\n *\n * @param {object} [options={}] Axios and cache adapter options\n * @returns {object} Instance of Axios\n */\n\n\nfunction setup() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var instanceConfig = _objectSpread(_objectSpread(_objectSpread({}, _config__WEBPACK_IMPORTED_MODULE_8__[\"defaults\"].axios), config), {}, {\n cache: _objectSpread(_objectSpread({}, _config__WEBPACK_IMPORTED_MODULE_8__[\"defaults\"].axios.cache), config.cache)\n });\n\n var cache = setupCache(instanceConfig.cache);\n\n var _ = instanceConfig.cache,\n axiosConfig = _objectWithoutProperties(instanceConfig, [\"cache\"]);\n\n var api = axios__WEBPACK_IMPORTED_MODULE_5___default.a.create(_objectSpread(_objectSpread({}, axiosConfig), {}, {\n adapter: cache.adapter\n }));\n api.cache = cache.store;\n return api;\n}\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n setup: setup,\n setupCache: setupCache,\n serializeQuery: _cache__WEBPACK_IMPORTED_MODULE_7__[\"serializeQuery\"]\n});\n\n/***/ }),\n\n/***/ \"./src/cache.js\":\n/*!**********************!*\\\n !*** ./src/cache.js ***!\n \\**********************/\n/*! exports provided: read, write, key, invalidate, serializeQuery, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"read\", function() { return read; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"write\", function() { return write; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"key\", function() { return key; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"invalidate\", function() { return invalidate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"serializeQuery\", function() { return serializeQuery; });\n/* harmony import */ var core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es7.array.includes */ \"./node_modules/core-js/modules/es7.array.includes.js\");\n/* harmony import */ var core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.string.includes */ \"./node_modules/core-js/modules/es6.string.includes.js\");\n/* harmony import */ var core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! regenerator-runtime/runtime */ \"./node_modules/regenerator-runtime/runtime.js\");\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es6.array.iterator */ \"./node_modules/core-js/modules/es6.array.iterator.js\");\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utilities */ \"./src/utilities.js\");\n/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! md5 */ \"./node_modules/md5/md5.js\");\n/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(md5__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _serialize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./serialize */ \"./src/serialize.js\");\n\n\n\n\n\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\n\n\n\n\nfunction write(_x, _x2, _x3) {\n return _write.apply(this, arguments);\n}\n\nfunction _write() {\n _write = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(config, req, res) {\n var entry;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.prev = 0;\n entry = {\n expires: config.expires,\n data: Object(_serialize__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(config, req, res)\n };\n _context.next = 4;\n return config.store.setItem(config.uuid, entry);\n\n case 4:\n _context.next = 19;\n break;\n\n case 6:\n _context.prev = 6;\n _context.t0 = _context[\"catch\"](0);\n config.debug('Could not store response', _context.t0);\n\n if (!config.clearOnError) {\n _context.next = 18;\n break;\n }\n\n _context.prev = 10;\n _context.next = 13;\n return config.store.clear();\n\n case 13:\n _context.next = 18;\n break;\n\n case 15:\n _context.prev = 15;\n _context.t1 = _context[\"catch\"](10);\n config.debug('Could not clear store', _context.t1);\n\n case 18:\n return _context.abrupt(\"return\", false);\n\n case 19:\n return _context.abrupt(\"return\", true);\n\n case 20:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[0, 6], [10, 15]]);\n }));\n return _write.apply(this, arguments);\n}\n\nfunction read(_x4, _x5) {\n return _read.apply(this, arguments);\n}\n\nfunction _read() {\n _read = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(config, req) {\n var uuid, ignoreCache, entry, error, expires, data, offline, _error;\n\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n uuid = config.uuid, ignoreCache = config.ignoreCache;\n _context2.next = 3;\n return config.store.getItem(uuid);\n\n case 3:\n entry = _context2.sent;\n\n if (!(ignoreCache || !entry || !entry.data)) {\n _context2.next = 10;\n break;\n }\n\n config.debug('cache-miss', req.url);\n error = new Error();\n error.reason = 'cache-miss';\n error.message = 'Entry not found from cache';\n throw error;\n\n case 10:\n expires = entry.expires, data = entry.data; // Do not check for stale cache if offline on client-side\n\n offline = typeof navigator !== 'undefined' && 'onLine' in navigator && !navigator.onLine;\n\n if (!(!offline && !config.acceptStale && expires !== 0 && expires < Date.now())) {\n _context2.next = 18;\n break;\n }\n\n config.debug('cache-stale', req.url);\n _error = new Error();\n _error.reason = 'cache-stale';\n _error.message = 'Entry is stale';\n throw _error;\n\n case 18:\n config.debug(config.acceptStale ? 'cache-hit-stale' : 'cache-hit', req.url);\n return _context2.abrupt(\"return\", data);\n\n case 20:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return _read.apply(this, arguments);\n}\n\nfunction key(config) {\n if (Object(_utilities__WEBPACK_IMPORTED_MODULE_5__[\"isFunction\"])(config.key)) return config.key;\n var cacheKey;\n\n if (Object(_utilities__WEBPACK_IMPORTED_MODULE_5__[\"isString\"])(config.key)) {\n cacheKey = function cacheKey(req) {\n var url = \"\".concat(req.baseURL ? req.baseURL : '').concat(req.url);\n var key = \"\".concat(config.key, \"/\").concat(url).concat(serializeQuery(req));\n return req.data ? key + md5__WEBPACK_IMPORTED_MODULE_6___default()(req.data) : key;\n };\n } else {\n cacheKey = function cacheKey(req) {\n var url = \"\".concat(req.baseURL ? req.baseURL : '').concat(req.url);\n var key = url + serializeQuery(req);\n return req.data ? key + md5__WEBPACK_IMPORTED_MODULE_6___default()(req.data) : key;\n };\n }\n\n return cacheKey;\n}\n\nfunction defaultInvalidate(_x6, _x7) {\n return _defaultInvalidate.apply(this, arguments);\n}\n\nfunction _defaultInvalidate() {\n _defaultInvalidate = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(config, req) {\n var method;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n method = req.method.toLowerCase();\n\n if (!config.exclude.methods.includes(method)) {\n _context3.next = 4;\n break;\n }\n\n _context3.next = 4;\n return config.store.removeItem(config.uuid);\n\n case 4:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n return _defaultInvalidate.apply(this, arguments);\n}\n\nfunction invalidate() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (Object(_utilities__WEBPACK_IMPORTED_MODULE_5__[\"isFunction\"])(config.invalidate)) return config.invalidate;\n return defaultInvalidate;\n}\n\nfunction serializeQuery(req) {\n if (!req.params) return ''; // Probably server-side, just stringify the object\n\n if (typeof URLSearchParams === 'undefined') return JSON.stringify(req.params);\n var params = req.params;\n var isInstanceOfURLSearchParams = req.params instanceof URLSearchParams; // Convert to an instance of URLSearchParams so it get serialized the same way\n\n if (!isInstanceOfURLSearchParams) {\n params = new URLSearchParams();\n Object.keys(req.params).forEach(function (key) {\n return params.append(key, req.params[key]);\n });\n }\n\n return \"?\".concat(params.toString());\n}\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n read: read,\n write: write,\n key: key,\n invalidate: invalidate,\n serializeQuery: serializeQuery\n});\n\n/***/ }),\n\n/***/ \"./src/config.js\":\n/*!***********************!*\\\n !*** ./src/config.js ***!\n \\***********************/\n/*! exports provided: defaults, makeConfig, mergeRequestConfig, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaults\", function() { return defaults; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"makeConfig\", function() { return makeConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mergeRequestConfig\", function() { return mergeRequestConfig; });\n/* harmony import */ var core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es7.object.get-own-property-descriptors */ \"./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js\");\n/* harmony import */ var core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.symbol */ \"./node_modules/core-js/modules/es6.symbol.js\");\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es6.array.iterator */ \"./node_modules/core-js/modules/es6.array.iterator.js\");\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! axios */ \"axios\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _memory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./memory */ \"./src/memory.js\");\n/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cache */ \"./src/cache.js\");\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\nvar noop = function noop() {};\n\nvar debug = function debug() {\n var _console;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (_console = console).log.apply(_console, ['[axios-cache-adapter]'].concat(args));\n};\n\nvar defaults = {\n // Default settings when solely creating the cache adapter with setupCache.\n cache: {\n maxAge: 0,\n limit: false,\n store: null,\n key: null,\n invalidate: null,\n exclude: {\n paths: [],\n query: true,\n filter: null,\n methods: ['post', 'patch', 'put', 'delete']\n },\n adapter: axios__WEBPACK_IMPORTED_MODULE_4___default.a.defaults.adapter,\n clearOnStale: true,\n clearOnError: true,\n readOnError: false,\n readHeaders: false,\n debug: false,\n ignoreCache: false\n },\n // Additional defaults when creating the axios instance with the cache adapter.\n axios: {\n cache: {\n maxAge: 15 * 60 * 1000\n }\n }\n}; // List of disallowed in the per-request config.\n\nvar disallowedPerRequestKeys = ['limit', 'store', 'adapter', 'uuid', 'acceptStale'];\n/**\n * Make a global config object.\n *\n * @param {Object} [override={}] Optional config override.\n * @return {Object}\n */\n\nvar makeConfig = function makeConfig() {\n var override = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var config = _objectSpread(_objectSpread(_objectSpread({}, defaults.cache), override), {}, {\n exclude: _objectSpread(_objectSpread({}, defaults.cache.exclude), override.exclude)\n }); // Create a cache key method\n\n\n config.key = Object(_cache__WEBPACK_IMPORTED_MODULE_6__[\"key\"])(config);\n config.invalidate = Object(_cache__WEBPACK_IMPORTED_MODULE_6__[\"invalidate\"])(config); // If debug mode is on, create a simple logger method\n\n if (config.debug !== false) {\n config.debug = typeof config.debug === 'function' ? config.debug : debug;\n } else {\n config.debug = noop;\n } // Create an in memory store if none was given\n\n\n if (!config.store) config.store = new _memory__WEBPACK_IMPORTED_MODULE_5__[\"default\"]();\n config.debug('Global cache config', config);\n return config;\n};\n/**\n * Merge the per-request config in another config.\n *\n * This method exists because not all keys should be allowed as it\n * may lead to unexpected behaviours. For instance, setting another\n * store or adapter per request is wrong, instead another instance\n * axios, or the adapter, should be used.\n *\n * @param {Object} config Config object.\n * @param {Object} req The current axios request\n * @return {Object}\n */\n\n\nvar mergeRequestConfig = function mergeRequestConfig(config, req) {\n var requestConfig = req.cache || {};\n\n if (requestConfig) {\n disallowedPerRequestKeys.forEach(function (key) {\n return requestConfig[key] ? delete requestConfig[key] : undefined;\n });\n }\n\n var mergedConfig = _objectSpread(_objectSpread(_objectSpread({}, config), requestConfig), {}, {\n exclude: _objectSpread(_objectSpread({}, config.exclude), requestConfig.exclude)\n });\n\n if (mergedConfig.debug === true) {\n mergedConfig.debug = debug;\n } // Create a cache key method\n\n\n if (requestConfig.key) {\n mergedConfig.key = Object(_cache__WEBPACK_IMPORTED_MODULE_6__[\"key\"])(requestConfig);\n } // Generate request UUID\n\n\n mergedConfig.uuid = mergedConfig.key(req);\n config.debug(\"Request config for \".concat(req.url), mergedConfig);\n return mergedConfig;\n};\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n defaults: defaults,\n makeConfig: makeConfig,\n mergeRequestConfig: mergeRequestConfig\n});\n\n/***/ }),\n\n/***/ \"./src/exclude.js\":\n/*!************************!*\\\n !*** ./src/exclude.js ***!\n \\************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.array.iterator */ \"./node_modules/core-js/modules/es6.array.iterator.js\");\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es7.array.includes */ \"./node_modules/core-js/modules/es7.array.includes.js\");\n/* harmony import */ var core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es6.string.includes */ \"./node_modules/core-js/modules/es6.string.includes.js\");\n/* harmony import */ var core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utilities */ \"./src/utilities.js\");\n\n\n\n\n\n\nfunction exclude() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var req = arguments.length > 1 ? arguments[1] : undefined;\n var _config$exclude = config.exclude,\n exclude = _config$exclude === void 0 ? {} : _config$exclude,\n debug = config.debug;\n var method = req.method.toLowerCase();\n\n if (method === 'head' || exclude.methods.includes(method)) {\n debug(\"Excluding request by HTTP method \".concat(req.url));\n return true;\n }\n\n if (typeof exclude.filter === 'function' && exclude.filter(req)) {\n debug(\"Excluding request by filter \".concat(req.url));\n return true;\n } // do not cache request with query\n\n\n var hasQueryParams = /\\?.*$/.test(req.url) || Object(_utilities__WEBPACK_IMPORTED_MODULE_4__[\"isObject\"])(req.params) && Object.keys(req.params).length !== 0 || typeof URLSearchParams !== 'undefined' && req.params instanceof URLSearchParams;\n\n if (exclude.query && hasQueryParams) {\n debug(\"Excluding request by query \".concat(req.url));\n return true;\n }\n\n var paths = exclude.paths || [];\n var found = paths.some(function (regexp) {\n return req.url.match(regexp);\n });\n\n if (found) {\n debug(\"Excluding request by url match \".concat(req.url));\n return true;\n }\n\n return false;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (exclude);\n\n/***/ }),\n\n/***/ \"./src/index.js\":\n/*!**********************!*\\\n !*** ./src/index.js ***!\n \\**********************/\n/*! exports provided: setup, setupCache, serializeQuery, default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./api */ \"./src/api.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"setup\", function() { return _api__WEBPACK_IMPORTED_MODULE_0__[\"setup\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"setupCache\", function() { return _api__WEBPACK_IMPORTED_MODULE_0__[\"setupCache\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"serializeQuery\", function() { return _api__WEBPACK_IMPORTED_MODULE_0__[\"serializeQuery\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _api__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n\n/***/ }),\n\n/***/ \"./src/limit.js\":\n/*!**********************!*\\\n !*** ./src/limit.js ***!\n \\**********************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! regenerator-runtime/runtime */ \"./node_modules/regenerator-runtime/runtime.js\");\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction limit(_x) {\n return _limit.apply(this, arguments);\n}\n\nfunction _limit() {\n _limit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(config) {\n var length, firstItem;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return config.store.length();\n\n case 2:\n length = _context.sent;\n\n if (!(length < config.limit)) {\n _context.next = 5;\n break;\n }\n\n return _context.abrupt(\"return\");\n\n case 5:\n config.debug(\"Current store size: \".concat(length));\n _context.next = 8;\n return config.store.iterate(function (value, key) {\n if (!firstItem) firstItem = {\n value: value,\n key: key\n };\n if (value.expires < firstItem.value.expires) firstItem = {\n value: value,\n key: key\n };\n });\n\n case 8:\n if (!firstItem) {\n _context.next = 12;\n break;\n }\n\n config.debug(\"Removing item: \".concat(firstItem.key));\n _context.next = 12;\n return config.store.removeItem(firstItem.key);\n\n case 12:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _limit.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (limit);\n\n/***/ }),\n\n/***/ \"./src/memory.js\":\n/*!***********************!*\\\n !*** ./src/memory.js ***!\n \\***********************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.array.iterator */ \"./node_modules/core-js/modules/es6.array.iterator.js\");\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! regenerator-runtime/runtime */ \"./node_modules/regenerator-runtime/runtime.js\");\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utilities */ \"./src/utilities.js\");\n\n\n\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\nvar MemoryStore = /*#__PURE__*/function () {\n function MemoryStore() {\n _classCallCheck(this, MemoryStore);\n\n this.store = {};\n }\n\n _createClass(MemoryStore, [{\n key: \"getItem\",\n value: function () {\n var _getItem = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(key) {\n var item;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n item = this.store[key] || null;\n return _context.abrupt(\"return\", JSON.parse(item));\n\n case 2:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function getItem(_x) {\n return _getItem.apply(this, arguments);\n }\n\n return getItem;\n }()\n }, {\n key: \"setItem\",\n value: function () {\n var _setItem = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(key, value) {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n this.store[key] = JSON.stringify(value);\n return _context2.abrupt(\"return\", value);\n\n case 2:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function setItem(_x2, _x3) {\n return _setItem.apply(this, arguments);\n }\n\n return setItem;\n }()\n }, {\n key: \"removeItem\",\n value: function () {\n var _removeItem = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(key) {\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n delete this.store[key];\n\n case 1:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function removeItem(_x4) {\n return _removeItem.apply(this, arguments);\n }\n\n return removeItem;\n }()\n }, {\n key: \"clear\",\n value: function () {\n var _clear = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n this.store = {};\n\n case 1:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function clear() {\n return _clear.apply(this, arguments);\n }\n\n return clear;\n }()\n }, {\n key: \"length\",\n value: function () {\n var _length = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n return _context5.abrupt(\"return\", Object.keys(this.store).length);\n\n case 1:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n\n function length() {\n return _length.apply(this, arguments);\n }\n\n return length;\n }()\n }, {\n key: \"iterate\",\n value: function iterate(fn) {\n return Promise.all(Object(_utilities__WEBPACK_IMPORTED_MODULE_3__[\"mapObject\"])(this.store, fn));\n }\n }]);\n\n return MemoryStore;\n}();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (MemoryStore);\n\n/***/ }),\n\n/***/ \"./src/request.js\":\n/*!************************!*\\\n !*** ./src/request.js ***!\n \\************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! regenerator-runtime/runtime */ \"./node_modules/regenerator-runtime/runtime.js\");\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _response__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./response */ \"./src/response.js\");\n/* harmony import */ var _exclude__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./exclude */ \"./src/exclude.js\");\n/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cache */ \"./src/cache.js\");\n\n\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\n\n\n\n\nfunction request(_x, _x2) {\n return _request.apply(this, arguments);\n}\n\nfunction _request() {\n _request = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(config, req) {\n var next, res, excludeFromCache;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n excludeFromCache = function _excludeFromCache() {\n config.excludeFromCache = true;\n return {\n config: config,\n next: next\n };\n };\n\n config.debug('uuid', config.uuid);\n\n next = function next() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _response__WEBPACK_IMPORTED_MODULE_2__[\"default\"].apply(void 0, [config, req].concat(args));\n }; // run invalidate function to check if any cache items need to be invalidated.\n\n\n _context.next = 5;\n return config.invalidate(config, req);\n\n case 5:\n if (!Object(_exclude__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(config, req)) {\n _context.next = 7;\n break;\n }\n\n return _context.abrupt(\"return\", excludeFromCache());\n\n case 7:\n _context.prev = 7;\n _context.next = 10;\n return Object(_cache__WEBPACK_IMPORTED_MODULE_4__[\"read\"])(config, req);\n\n case 10:\n res = _context.sent;\n res.config = req;\n res.request = {\n fromCache: true\n };\n return _context.abrupt(\"return\", {\n config: config,\n next: res\n });\n\n case 16:\n _context.prev = 16;\n _context.t0 = _context[\"catch\"](7);\n\n if (!(config.clearOnStale && _context.t0.reason === 'cache-stale')) {\n _context.next = 21;\n break;\n }\n\n _context.next = 21;\n return config.store.removeItem(config.uuid);\n\n case 21:\n return _context.abrupt(\"return\", {\n config: config,\n next: next\n });\n\n case 22:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[7, 16]]);\n }));\n return _request.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (request);\n\n/***/ }),\n\n/***/ \"./src/response.js\":\n/*!*************************!*\\\n !*** ./src/response.js ***!\n \\*************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! regenerator-runtime/runtime */ \"./node_modules/regenerator-runtime/runtime.js\");\n/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _limit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./limit */ \"./src/limit.js\");\n/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cache */ \"./src/cache.js\");\n/* harmony import */ var cache_control_esm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! cache-control-esm */ \"./node_modules/cache-control-esm/index.js\");\n\n\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\n\n\n\n\nfunction response(_x, _x2, _x3) {\n return _response.apply(this, arguments);\n}\n\nfunction _response() {\n _response = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(config, req, res) {\n var _res$request, request, _res$headers, headers, cacheControl;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _res$request = res.request, request = _res$request === void 0 ? {} : _res$request, _res$headers = res.headers, headers = _res$headers === void 0 ? {} : _res$headers; // exclude binary response from cache\n\n if (!(['arraybuffer', 'blob'].indexOf(request.responseType) > -1)) {\n _context.next = 3;\n break;\n }\n\n return _context.abrupt(\"return\", res);\n\n case 3:\n cacheControl = {}; // Should we try to determine request cache expiration from headers or not\n\n if (config.readHeaders) {\n if (headers['cache-control']) {\n // Try parsing `cache-control` header from response\n cacheControl = Object(cache_control_esm__WEBPACK_IMPORTED_MODULE_4__[\"parse\"])(headers['cache-control']); // Force cache exlcusion for `cache-control: no-cache` and `cache-control: no-store`\n\n if (cacheControl.noCache || cacheControl.noStore) {\n config.excludeFromCache = true;\n }\n } else if (headers.expires) {\n // Else try reading `expires` header\n config.expires = new Date(headers.expires).getTime();\n } else {\n config.expires = new Date().getTime();\n }\n }\n\n if (config.excludeFromCache) {\n _context.next = 15;\n break;\n }\n\n if (cacheControl.maxAge || cacheControl.maxAge === 0) {\n // Use `cache-control` header `max-age` value and convert to milliseconds\n config.expires = Date.now() + cacheControl.maxAge * 1000;\n } else if (!config.readHeaders) {\n // Use fixed `maxAge` defined in the global or per-request config\n config.expires = config.maxAge === 0 ? Date.now() : Date.now() + config.maxAge;\n } // Check if a cache limit has been configured\n\n\n if (!config.limit) {\n _context.next = 11;\n break;\n }\n\n config.debug(\"Detected limit: \".concat(config.limit));\n _context.next = 11;\n return Object(_limit__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(config);\n\n case 11:\n _context.next = 13;\n return Object(_cache__WEBPACK_IMPORTED_MODULE_3__[\"write\"])(config, req, res);\n\n case 13:\n _context.next = 16;\n break;\n\n case 15:\n // Mark request as excluded from cache\n res.request.excludedFromCache = true;\n\n case 16:\n return _context.abrupt(\"return\", res);\n\n case 17:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _response.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (response);\n\n/***/ }),\n\n/***/ \"./src/serialize.js\":\n/*!**************************!*\\\n !*** ./src/serialize.js ***!\n \\**************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.symbol */ \"./node_modules/core-js/modules/es6.symbol.js\");\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.array.iterator */ \"./node_modules/core-js/modules/es6.array.iterator.js\");\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction serialize(config, req, res) {\n if (res.data) {\n // FIXME: May be useless as localForage and axios already parse automatically\n try {\n res.data = JSON.parse(res.data);\n } catch (err) {\n config.debug('Could not parse data as JSON', err);\n }\n }\n\n var request = res.request,\n _ = res.config,\n serialized = _objectWithoutProperties(res, [\"request\", \"config\"]);\n\n return serialized;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (serialize);\n\n/***/ }),\n\n/***/ \"./src/utilities.js\":\n/*!**************************!*\\\n !*** ./src/utilities.js ***!\n \\**************************/\n/*! exports provided: isObject, getTag, isFunction, isString, mapObject */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isObject\", function() { return isObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTag\", function() { return getTag; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isFunction\", function() { return isFunction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isString\", function() { return isString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mapObject\", function() { return mapObject; });\n/* harmony import */ var core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es7.symbol.async-iterator */ \"./node_modules/core-js/modules/es7.symbol.async-iterator.js\");\n/* harmony import */ var core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.symbol */ \"./node_modules/core-js/modules/es6.symbol.js\");\n/* harmony import */ var core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es6.array.iterator */ \"./node_modules/core-js/modules/es6.array.iterator.js\");\n/* harmony import */ var core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_array_iterator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n/* harmony import */ var core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n// https://github.com/lodash/lodash/blob/master/isObject.js\nfunction isObject(value) {\n var type = _typeof(value);\n\n return value != null && (type === 'object' || type === 'function');\n} // https://github.com/lodash/lodash/blob/master/.internal/getTag.js\n\nfunction getTag(value) {\n if (value === null) {\n return value === undefined ? '[object Undefined]' : '[object Null]';\n }\n\n return Object.prototype.toString.call(value);\n} // https://github.com/lodash/lodash/blob/master/isFunction.js\n\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n\n var tag = getTag(value);\n return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object Proxy]';\n} // https://github.com/lodash/lodash/blob/master/isString.js\n\nfunction isString(value) {\n var type = _typeof(value);\n\n return type === 'string' || type === 'object' && value != null && !Array.isArray(value) && getTag(value) === '[object String]';\n}\nfunction mapObject(value, fn) {\n if (!isObject(value)) {\n return [];\n }\n\n return Object.keys(value).map(function (key) {\n return fn(value[key], key);\n });\n}\n\n/***/ }),\n\n/***/ \"axios\":\n/*!*************************************************************************************!*\\\n !*** external {\"umd\":\"axios\",\"amd\":\"axios\",\"commonjs\":\"axios\",\"commonjs2\":\"axios\"} ***!\n \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_axios__;\n\n/***/ })\n\n/******/ });\n});\n//# sourceMappingURL=cache.js.map","import axios from \"axios\";\nimport store from \"../store\";\nimport router from \"../router\";\n\n//Cache\nimport {setupCache} from \"axios-cache-adapter\";\nimport tryReload from \"@songfinch/customer/helpers/tryReload\";\n\n//Default for Api\naxios.defaults.baseURL = window.location.origin + \"/v3/api\";\naxios.defaults.headers.common[\"X-CSRF-Token\"] = document.querySelector('meta[name=\"csrf-token\"]')?.content;\naxios.defaults.headers.common[\"Accept\"] = \"application/json\";\naxios.defaults.headers.common[\"SF-FE-App-Name\"] = \"customer\";\naxios.defaults.headers.common[\"SF-FE-App-V\"] = window.appSettings.version;\naxios.defaults.headers.common[\"SF-FE-Data-V\"] = window.appSettings.data_version;\n\nconst cache = setupCache({\n maxAge: 15 * 60 * 1000,\n exclude: {\n query: false,\n },\n ignoreCache: true,\n});\naxios.defaults.adapter = cache.adapter;\n\nlet skipRefreshError = false;\n\n//After each response\naxios.interceptors.response.use(function (response) {\n if (response.config.meta?.updateCSRFToken) {\n axios.defaults.headers.common[\"X-CSRF-Token\"] = response.headers[\"x-csrf-token\"];\n }\n return response;\n}, function (error) {\n const res = error?.response;\n //503 Error maintenance (Heroku on maintaince)\n if (res?.status === 503) {\n location.reload();\n //426 Error Outdated App\n } else if (res?.status === 426 && res?.data?.sf_refresh) {\n if (skipRefreshError) return Promise.reject(error);\n window.appSettings.sentry_dns = null; // Clearing to stop any sentry errors\n const clearData = res.data.sf_clear_data;\n //Regular reload when switching pages && we don't need to clear data\n if (res.config.cmsCall && !clearData) {\n if (!tryReload(error, \"axios 426 auto\")) {\n return Promise.reject(error);\n }\n } else {\n store.commit(\"shared/showModal\", {\n component: () => import(\"../components/popups/RefreshPopup\"),\n props: {showClearMessage: !!clearData},\n swalSettings: {showCloseButton: false},\n });\n }\n skipRefreshError = true;\n return Promise.reject(error);\n //422 Error invalid token we also returning user with that\n } else if (res?.status === 422 && res.data.invalid_token && !res.config.sf_repeat) {\n res.config.headers[\"X-CSRF-Token\"] = res.headers[\"x-csrf-token\"];\n res.config.sf_repeat = true;\n store.commit(\"auth/setUser\", res.data.user);\n axios.defaults.headers.common[\"X-CSRF-Token\"] = res.headers[\"x-csrf-token\"];\n return axios.request(res.config);\n } else if (res?.status === 401 && store.state.auth.user) {\n location.href = `/login?push_to_path=${router.currentRoute.value.path}`;\n }\n\n return Promise.reject(error);\n});\n\n","import {App, Plugin} from \"vue\";\n\ninterface FlagsPluginInterface {\n set(key: string, value: boolean): void\n get(key: string): boolean\n}\n\ndeclare module \"@vue/runtime-core\" {\n interface ComponentCustomProperties {\n $flags: FlagsPluginInterface\n }\n}\n\nconst FlagsPlugin: Plugin = {\n install(app: App) {\n app.config.globalProperties.$flags = {\n set(key, value) {\n const flags = JSON.parse(localStorage.getItem(\"sf_flags\")) || {};\n flags[key] = +value;\n localStorage.setItem(\"sf_flags\", JSON.stringify(flags));\n },\n get(key) {\n const flags = JSON.parse(localStorage.getItem(\"sf_flags\")) || {};\n return !!flags[key];\n }\n };\n }\n};\n\nexport default FlagsPlugin;\n","import app from \"@songfinch/customer/app.js\";\n\nimport Slider from \"@songfinch/shared/plugins/slider\";\napp.use(Slider);\n\nimport AudioPlayerPlugin from \"@songfinch/shared/plugins/audio_player\";\napp.use(AudioPlayerPlugin);\n\nimport Flags from \"@songfinch/shared/plugins/flags\";\napp.use(Flags);\n\nimport PrimeVue from \"primevue/config\";\napp.use(PrimeVue);\n\nimport Modal from \"@songfinch/shared/plugins/modal/plugin\";\napp.use(Modal, {\n customClass: {\n confirmButton: \"mkButton @mx-2.5 @mb-5 noLoading\",\n cancelButton: \"mkButton @mx-2.5 dark @mb-5 noLoading\",\n },\n showClass: {\n popup: \"fadeIn\"\n },\n hideClass: {\n popup: \"fadeOut\",\n },\n width: 575,\n background: \"var(--sfc-beige)\",\n iconColor: \"var(--cherry)\",\n buttonsStyling: false\n});\n","import {debounce} from \"lodash-es\";\nimport app from \"@songfinch/customer/app\";\nimport store from \"@songfinch/customer/store\";\n\napp.config.globalProperties.$env = window.appSettings.env;\napp.config.globalProperties.$digitalTagTypes = [\"digital\", \"streaming\"];\n\nstore.commit(\"shared/setResolutionsFlags\");\nwindow.addEventListener(\"resize\", debounce(() => {\n store.commit(\"shared/setResolutionsFlags\");\n}, 500));\n\napp.config.globalProperties.$flushGTMScripts = () => {\n const pixels = document.body.querySelectorAll(':scope > [id^=\"sf_gtm_script\"]');\n for (const p of pixels) document.body.removeChild(p);\n};\n","import axios from \"axios\";\nimport router from \"../router\";\n\nconst submission_id = localStorage.getItem(\"sf_submission_id\");\n\nif (submission_id) {\n axios.post(\"checkout/confirm_order\", {submission_id, check_processed: true})\n .then(res => {\n if (res.data.is_processed) {\n router.push({name: \"CompleteCheckout\"});\n }\n });\n}\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}\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 * \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: `ƒ ${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 default {\n start_your_song: \"Start your song\",\n continue_your_song: \"Continue your song\",\n occasion: \"Occasion\",\n genre: \"Genre\",\n vibe: \"Vibe\",\n tempo: \"Tempo\",\n edit: \"Edit\",\n add: \"Add\",\n learn_more: \"Learn more\",\n buy_now_song: \"buy now\",\n get_started: \"Get started\"\n};\n","export default {\n errors: {\n sections_not_complete: \"Complete all sections above before proceeding.\",\n payment_failed: \"The payment failed. Please try again or use a different payment method\"\n },\n buttons: {\n continue_to: \"continue to\",\n complete_purchase: \"complete purchase\",\n },\n sections: {\n account: \"Account email\",\n otp_account: \"Contact information\",\n billing: \"Billing address\",\n shipping: \"Shipping address\",\n payments: \"Payment\",\n }\n};\n","export default {\n button: {\n lyrics: \"Lyrics\",\n song_details: \"Song Details\",\n },\n label: {\n basic_detail: \"The basic details\"\n },\n applauseArtistButton: {\n button: \"Love this song\"\n },\n applauseSlideModal: {\n header: \"Leave a Review\",\n subheader: \"Did you love this song? Let the world know! Select as many compliments as you like from the sections below, write your own – or both!\",\n button: {\n category: {\n lyrics: {\n title: \"Amazing lyrics\",\n compliments: {\n rich_storytelling: \"rich storytelling\",\n highly_detailed: \"highly detailed\",\n catchy_chorus: \"catchy chorus\",\n poetic: \"poetic\",\n touching: \"touching\",\n resonated_with_me: \"resonated with me\"\n },\n },\n voice: {\n title: \"Love the vocals\",\n compliments: {\n angelic: \"angelic\",\n soulful: \"soulful\",\n warm: \"warm\",\n enchanting: \"enchanting\",\n velvety: \"velvety\",\n sick_flow: \"sick flow\",\n heartfelt: \"heartfelt\",\n effortless: \"effortless\",\n captivating: \"captivating\",\n cool_grit: \"cool grit\",\n clear: \"clear\"\n },\n },\n feels: {\n title: \"Captivating Vibe\",\n compliments: {\n \"soul-stirring\": \"soul-stirring\",\n slaps: \"slaps\",\n powerful: \"powerful\",\n heartwarming: \"heartwarming\",\n intense: \"intense\",\n fierce: \"fierce\",\n touching: \"touching\",\n just_wow: \"just wow\",\n poignant: \"poignant\",\n raw: \"raw\",\n timeless: \"timeless\",\n moving: \"moving\",\n fire: \"fire\",\n },\n },\n sound: {\n title: \"Great Sound\",\n compliments: {\n dope_beat: \"dope beat\",\n infectious_melody: \"infectious melody\",\n \"radio-ready\": \"radio-ready\",\n great_style: \"great style\",\n catchy: \"catchy\",\n nailed_the_mood: \"nailed the mood\",\n great_energy: \"great energy\",\n hauntingly_beautiful: \"hauntingly beautiful\",\n }\n },\n delivery: {\n title: \"Vocal delivery\",\n compliments: {\n sick_flow: \"sick flow\",\n heartfelt: \"heartfelt\",\n effortless: \"effortless\",\n captivating: \"captivating\",\n cool_grit: \"cool grit\",\n clear: \"clear\",\n }\n },\n makes_feel: {\n title: \"Makes me feel\",\n compliments: {\n invigorated: \"Invigorated\",\n serene: \"Serene\",\n happy: \"Happy\",\n heartbroken: \"Heartbroken\",\n fired_up: \"Fired-up\",\n introspective: \"Introspective\",\n sentimental: \"Sentimental\",\n immersed: \"Immersed\",\n inspired: \"Inspired\",\n vulnerable: \"Vulnerable\",\n captivated: \"Captivated\"\n }\n }\n }\n },\n label: {\n comment: \"Tell {artist_name} More\",\n email: \"Email address\",\n name: \"Screen Name\",\n tooltipName: \"Will be shown next to your comment.\",\n tooltipEmail: \"Required for moderation.\"\n },\n\n input: {\n comment: {\n placeholder: \"Share any specific thoughts and details you enjoyed about the song (optional)\"\n },\n },\n form: {\n success: \"Your applause has been sent!\"\n },\n submitForm: \"Send\",\n closeSlide: \"Cancel\"\n },\n emailCapturePopup: {\n songPlayed: {\n header: \"Love this custom song?\",\n subheader: \"We’d love to help you create one of your own!\",\n button: {\n submit: \"Learn more\"\n }\n },\n freeSong: {\n header: \"Songfinch VIP Exclusive: Free Custom Song Bundle\",\n subheader: \"We've got a winner! Here's your chance to win a free original song bundled with streaming and your very own framed poster.\",\n button: {\n submit: \"Sign me up\"\n }\n }\n },\n topBarFreeSongContent: {\n details: \"win an original song and more\"\n },\n spotifyBanner: {\n purchased: {\n title: \"Listen on spotify\",\n sub_title: \"Listen & share anytime, anywhere\"\n },\n notPurchased: {\n title: \"Stream it on spotify\",\n sub_title: \"Share this song with the world\"\n }\n },\n tooltipLearn: {\n button_label: \"Got it\"\n },\n heardAbout: {\n mainSection: {\n submitMessage: \"Thanks so much for your feedback!\"\n },\n firstScreen: {\n header: \"How’d you hear about Songfinch?\",\n submitButton: \"Submit\"\n },\n secondscreen: {\n header: \"How’d you hear about Songfinch?\",\n subheader: \"Based on your previous selections, please answer the following.\",\n backButton: \"Back\",\n submitButton: \"Submit\"\n }\n },\n comments: {\n main: {\n title: \"Comments (%{count})\",\n button_more: \"Load More\",\n },\n single: {\n person: \"You\",\n edit_btn: \"Edit your comment\",\n delete_btn: \"Delete\",\n read_more_btn: \"Read More\",\n },\n edit_field: {\n title: \"Editing your response\",\n button: \"Cancel\",\n },\n sort: {\n title: \"Sort by\",\n asc: \"Newest to Oldest\",\n desc: \"Oldest to Newest\"\n }\n }\n};\n","export default {\n pronunciation: {\n bannerTitle: \"Say that again?\",\n bannerMessage: \"If you mentioned any people, places or things that might be tricky to pronounce, help out your artist by adding the pronunciation below\",\n },\n errors: {\n agMissingCard: \"Please personalize your card.\",\n agMissingKey: \"Missing AG ecard key. Please contact us at support@songfinch.com\"\n },\n buttons: {\n agResetButton: \"delete and start over\"\n },\n bsSongArtistsList: {\n buttons: {\n moreArtists: \"View more artists\",\n pickForMe: \"Pick for me! I can't decide\",\n changeArtist: \"change artist\"\n }\n }\n};\n","export default {\n song_examples: \"Song examples\",\n search_examples_placeholder: \"Search examples\",\n};\n","export default {\n artists: {\n artsts_btn: \"EXPLORE OUR ARTISTS\"\n }\n};\n","export default {\n instantProduct: {\n button: \"Complete your Instant Product\",\n magicLinkMissing: \"Your link to create a magic song will be ready soon\",\n songIsBeingEncoded: \"Your song is almost ready. Please refresh this page in a few seconds to start your slideshow.\"\n }\n};\n","export default {\n preview: {\n title: \"song history\",\n buttons: {\n generate: \"New song\",\n select: \"Pick this song\",\n },\n modal: {\n title: \"Song history\"\n }\n },\n loading: {\n firstLine: \"Generating song preview...\",\n secondLine: \"This could take up to 30 seconds\"\n },\n steps: {\n changeWarning: \"Changing answers will overwrite this song’s lyrics.\",\n notSelect: \"Please make a selection.\",\n pleaseSelectTwo: \"Oops! Please select two.\"\n },\n names: {\n title: \"Include their name\",\n button: \"Looks good\",\n skipButton: \"Skip and continue to song\",\n confirmName: {\n editSpelling: \"Edit spelling\",\n findPronunciationButton: \"Find pronunciation\"\n },\n findPronunciationModal: {\n button: \"This is how it sounds\",\n skipButton: \"None of these sound right\"\n },\n multyModal: {\n button: \"This is how it sounds\",\n skipButton: \"None of these sound right\"\n },\n findModal: {\n AddPronunciation: \"Add your pronunciation\",\n },\n sorryModal: {\n button: \"Sure!\",\n skipButton: \"Skip and continue to song\"\n },\n newPronunciationModal: {\n button: \"Submit\",\n skipButton: \"Skip and continue to song\"\n }\n },\n emailCaptureModal: {\n title: \"We’re mixing your song\",\n subtitle: \"Provide your email address to hear what our artists created for you. No quarters necessary!\",\n button: \"Preview your song options\",\n label: \"Email address\"\n },\n confirm: {\n pickLabel: \"Your pick\",\n button: \"Continue\",\n },\n slideshow: {\n button: \"Continue\",\n },\n addons: {\n pageTitle: \"Customize your song\",\n buttons: {\n continue_to_cart: \"Continue to cart\",\n add: \"add\"\n }\n },\n customerGreeting: {\n pageTitle: \"Record an intro\",\n buttons: {\n continue_to_cart: \"Continue\",\n skip: \"skip\"\n }\n }\n};\n","export default {\n remove_song_modal: {\n title: \"Are you sure?\",\n content: \"Deleting your song will lose your memories and story details about {recipient}. Are you sure?\",\n buttons: {\n cancel: \"Cancel\",\n remove: \"I want to delete my song\",\n new_artist: \"Find a new artist\"\n }\n }\n};\n","export default {\n extra_verses: {\n one_verse: \"One Verse\",\n extra_count: \"{count} Verses\",\n add_more: \"Add more extra verses\",\n clear: \"Clear selection\",\n extra_fee: \"Extra verse fee: {price}\",\n extra_fee_number: \"{count} extra verses ({price})\"\n }\n};\n","import shared from \"./shared\";\nimport checkout from \"./checkout\";\nimport story from \"./story\";\nimport songbuilder from \"./songbuilder\";\nimport playlists from \"./playlists\";\nimport home from \"./home\";\nimport orderHistory from \"./orderHistory\";\nimport instantBuilder from \"./instantBuilder\";\nimport cart from \"./cart\";\nimport preCart from \"./preCart\";\n\nexport default {\n shared,\n checkout,\n story,\n playlists,\n songbuilder,\n home,\n orderHistory,\n instantBuilder,\n cart,\n preCart\n};\n","import {createI18n} from \"vue-i18n\";\nimport en from \"./en\";\n\nexport default async () => {\n const locale = window.appSettings.locale;\n const messages = {en};\n\n if (locale && locale !== \"en\") {\n const module = await import(`./${locale}/index.js`);\n messages[locale] = module?.default;\n }\n\n return createI18n({\n legacy: false,\n locale,\n messages,\n fallbackLocale: \"en\", // Use english if other language lacks of translation\n });\n};\n","export default {\n created() {\n if (this.$options.pageLoaded) {\n this.$bus.on(\"pageLoaded\", this.$options.pageLoaded.bind(this));\n }\n }\n};\n","import app from \"@songfinch/customer/app.js\";\nimport \"./helpers/init_core\";\nimport {createPinia} from \"pinia\";\n\nimport router from \"./router\";\nimport store from \"./store\";\n\nimport \"./helpers/sentry\";\nimport \"./listeners/events\";\nimport \"./helpers/attentive\";\nimport \"./helpers/zendesk\";\n\nimport \"./helpers/check_version\";\nimport \"./helpers/axios_api_init\";\nimport \"./helpers/plugins_init\";\n//import \"./helpers/contest_init\";\nimport \"./helpers/global_vars\";\nimport \"./helpers/check_submission\";\nimport {initUUID} from \"@songfinch/utils/src/uuid\";\n\nimport loadLocales from \"./locales\";\n\nimport \"vue2-animate/dist/vue2-animate.min.css\";\n\nimport page_loaded from \"./mixins/page_loaded\";\napp.mixin(page_loaded);\n\n// We want it keep it here for pagespeed increase\nstore.commit(\"cms/initNavs\");\nstore.commit(\"cart/initCart\");\nstore.dispatch(\"cart/initAffiliate\");\nstore.commit(\"auth/setUser\", window.appSettings.user);\nstore.commit(\"auth/checkForReferralCode\");\n\nconst initVue = async () => {\n const el = document.body.appendChild(document.createElement(\"app\"));\n await initUUID();\n app.use(await loadLocales());\n app.use(router); //all async/awaits should be before router, otherwise modals routes won't showup on load\n app.use(store);\n app.use(createPinia());\n app.mount(el);\n};\n\ninitVue();\n"],"file":"main-21404bc0.js"}