{"version":3,"file":"index.js","sources":["../../node_modules/@vue/shared/dist/shared.esm-bundler.js","../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","../../node_modules/vue/dist/vue.runtime.esm-bundler.js","../../node_modules/pinia/node_modules/vue-demi/lib/index.mjs","../../node_modules/@vue/devtools-api/lib/esm/env.js","../../node_modules/@vue/devtools-api/lib/esm/const.js","../../node_modules/@vue/devtools-api/lib/esm/time.js","../../node_modules/@vue/devtools-api/lib/esm/proxy.js","../../node_modules/@vue/devtools-api/lib/esm/index.js","../../node_modules/pinia/dist/pinia.mjs","../../node_modules/@firebase/util/dist/index.esm2017.js","../../node_modules/@firebase/component/dist/esm/index.esm2017.js","../../node_modules/@firebase/logger/dist/esm/index.esm2017.js","../../node_modules/idb/build/wrap-idb-value.js","../../node_modules/idb/build/index.js","../../node_modules/@firebase/app/dist/esm/index.esm2017.js","../../node_modules/firebase/app/dist/esm/index.esm.js","../../node_modules/@firebase/installations/dist/esm/index.esm2017.js","../../node_modules/@firebase/messaging/dist/esm/index.esm2017.js","../../src/push-notifications.ts","../../node_modules/vue-router/dist/vue-router.mjs","../../src/views/HomeView.vue","../../src/assets/images/flavor-facts/belgian-chocolate.png","../../src/assets/images/flavor-facts/butter-pecan.png","../../src/assets/images/flavor-facts/dulce-de-leche.png","../../src/assets/images/flavor-facts/coffee.png","../../src/assets/images/flavor-facts/chocolate.png","../../src/assets/images/flavor-facts/mint-chip.png","../../src/assets/images/flavor-facts/vanilla.png","../../src/assets/images/flavor-facts/cookies-and-cream.png","../../src/assets/images/flavor-facts/chocolate-chip-cookie-dough.png","../../src/assets/images/flavor-facts/strawberry.png","../../src/stores/learning.ts","../../src/views/learning/components/LearningNavigation.vue","../../src/views/learning/components/LearningNavigation.vue","../../src/views/learning/Learning.vue","../../node_modules/@heroicons/vue/24/outline/esm/ArrowPathIcon.js","../../node_modules/@heroicons/vue/24/outline/esm/CheckIcon.js","../../node_modules/@heroicons/vue/24/outline/esm/ChevronLeftIcon.js","../../node_modules/@heroicons/vue/24/outline/esm/ChevronRightIcon.js","../../node_modules/@heroicons/vue/24/outline/esm/ClipboardDocumentListIcon.js","../../node_modules/@heroicons/vue/24/outline/esm/DocumentCheckIcon.js","../../node_modules/@heroicons/vue/24/outline/esm/LightBulbIcon.js","../../node_modules/@heroicons/vue/24/outline/esm/PlayIcon.js","../../node_modules/@vimeo/player/dist/player.es.js","../../src/components/VimeoEmbed.vue","../../node_modules/@headlessui/vue/dist/hooks/use-controllable.js","../../node_modules/@headlessui/vue/dist/utils/micro-task.js","../../node_modules/@headlessui/vue/dist/utils/disposables.js","../../node_modules/@headlessui/vue/dist/hooks/use-id.js","../../node_modules/@headlessui/vue/dist/utils/dom.js","../../node_modules/@headlessui/vue/dist/utils/match.js","../../node_modules/@headlessui/vue/dist/utils/env.js","../../node_modules/@headlessui/vue/dist/utils/owner.js","../../node_modules/@headlessui/vue/dist/utils/focus-management.js","../../node_modules/@headlessui/vue/dist/utils/platform.js","../../node_modules/@headlessui/vue/dist/hooks/use-document-event.js","../../node_modules/@headlessui/vue/dist/hooks/use-window-event.js","../../node_modules/@headlessui/vue/dist/hooks/use-outside-click.js","../../node_modules/@headlessui/vue/dist/hooks/use-tree-walker.js","../../node_modules/@headlessui/vue/dist/utils/render.js","../../node_modules/@headlessui/vue/dist/internal/hidden.js","../../node_modules/@headlessui/vue/dist/internal/open-closed.js","../../node_modules/@headlessui/vue/dist/keyboard.js","../../node_modules/@headlessui/vue/dist/utils/document-ready.js","../../node_modules/@headlessui/vue/dist/utils/active-element-history.js","../../node_modules/@headlessui/vue/dist/utils/form.js","../../node_modules/@headlessui/vue/dist/hooks/use-event-listener.js","../../node_modules/@headlessui/vue/dist/hooks/use-tab-direction.js","../../node_modules/@headlessui/vue/dist/components/focus-trap/focus-trap.js","../../node_modules/@headlessui/vue/dist/hooks/use-store.js","../../node_modules/@headlessui/vue/dist/utils/store.js","../../node_modules/@headlessui/vue/dist/hooks/document-overflow/adjust-scrollbar-padding.js","../../node_modules/@headlessui/vue/dist/hooks/document-overflow/handle-ios-locking.js","../../node_modules/@headlessui/vue/dist/hooks/document-overflow/prevent-scroll.js","../../node_modules/@headlessui/vue/dist/hooks/document-overflow/overflow-store.js","../../node_modules/@headlessui/vue/dist/hooks/document-overflow/use-document-overflow.js","../../node_modules/@headlessui/vue/dist/hooks/use-inert.js","../../node_modules/@headlessui/vue/dist/hooks/use-root-containers.js","../../node_modules/@headlessui/vue/dist/internal/portal-force-root.js","../../node_modules/@headlessui/vue/dist/internal/stack-context.js","../../node_modules/@headlessui/vue/dist/components/description/description.js","../../node_modules/@headlessui/vue/dist/components/portal/portal.js","../../node_modules/@headlessui/vue/dist/components/dialog/dialog.js","../../node_modules/@headlessui/vue/dist/components/label/label.js","../../node_modules/@headlessui/vue/dist/components/radio-group/radio-group.js","../../node_modules/@headlessui/vue/dist/utils/once.js","../../node_modules/@headlessui/vue/dist/components/transitions/utils/transition.js","../../node_modules/@headlessui/vue/dist/components/transitions/transition.js","../../src/components/Modal.vue","../../src/components/Modal.vue","../../src/views/learning/courses/components/CourseVideoModal.vue","../../src/views/learning/courses/CourseListing.vue","../../src/assets/images/sweetness_icon.png","../../src/views/learning/courses/components/CourseComplete.vue","../../src/views/learning/courses/CourseQuiz.vue","../../src/views/learning/recipes/GroupListing.vue","../../src/views/learning/recipes/GroupRecipeListing.vue","../../src/views/learning/recipes/components/StandardRecipe.vue","../../src/views/learning/recipes/components/Rewards.vue","../../src/views/learning/recipes/components/FlavorFacts.vue","../../src/views/learning/recipes/components/Basics.vue","../../src/views/learning/recipes/RecipeDetail.vue","../../src/router/index.ts","../../src/main.ts"],"sourcesContent":["/**\n* @vue/shared v3.4.27\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction makeMap(str, expectsLowerCase) {\n const set = new Set(str.split(\",\"));\n return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst 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 camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction((str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n});\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](arg);\n }\n};\nconst def = (obj, key, value, writable = false) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n writable,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",\n \"NEED_PATCH\": 512,\n \"512\": \"NEED_PATCH\",\n \"DYNAMIC_SLOTS\": 1024,\n \"1024\": \"DYNAMIC_SLOTS\",\n \"DEV_ROOT_FRAGMENT\": 2048,\n \"2048\": \"DEV_ROOT_FRAGMENT\",\n \"HOISTED\": -1,\n \"-1\": \"HOISTED\",\n \"BAIL\": -2,\n \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `NEED_HYDRATION`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\n\nconst ShapeFlags = {\n \"ELEMENT\": 1,\n \"1\": \"ELEMENT\",\n \"FUNCTIONAL_COMPONENT\": 2,\n \"2\": \"FUNCTIONAL_COMPONENT\",\n \"STATEFUL_COMPONENT\": 4,\n \"4\": \"STATEFUL_COMPONENT\",\n \"TEXT_CHILDREN\": 8,\n \"8\": \"TEXT_CHILDREN\",\n \"ARRAY_CHILDREN\": 16,\n \"16\": \"ARRAY_CHILDREN\",\n \"SLOTS_CHILDREN\": 32,\n \"32\": \"SLOTS_CHILDREN\",\n \"TELEPORT\": 64,\n \"64\": \"TELEPORT\",\n \"SUSPENSE\": 128,\n \"128\": \"SUSPENSE\",\n \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\n \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\n \"COMPONENT_KEPT_ALIVE\": 512,\n \"512\": \"COMPONENT_KEPT_ALIVE\",\n \"COMPONENT\": 6,\n \"6\": \"COMPONENT\"\n};\n\nconst SlotFlags = {\n \"STABLE\": 1,\n \"1\": \"STABLE\",\n \"DYNAMIC\": 2,\n \"2\": \"DYNAMIC\",\n \"FORWARDED\": 3,\n \"3\": \"FORWARDED\"\n};\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value) || isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = \"\";\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n if (isString(value) || typeof value === \"number\") {\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\nfunction isRenderableAttrValue(value) {\n if (value == null) {\n return false;\n }\n const type = typeof value;\n return type === \"string\" || type === \"number\" || type === \"boolean\";\n}\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>||--!>| looseEqual(item, val));\n}\n\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (val && val.__v_isRef) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce(\n (entries, [key, val2], i) => {\n entries[stringifySymbol(key, i) + \" =>\"] = val2;\n return entries;\n },\n {}\n )\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\n };\n } else if (isSymbol(val)) {\n return stringifySymbol(val);\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\nconst stringifySymbol = (v, i = \"\") => {\n var _a;\n return (\n // Symbol.description in es2019+ so we need to cast here to pass\n // the lib: es2016 check\n isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v\n );\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","/**\n* @vue/reactivity v3.4.27\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { NOOP, extend, isArray, isSymbol, isMap, isIntegerKey, hasOwn, hasChanged, isObject, makeMap, capitalize, toRawType, def, isFunction } from '@vue/shared';\n\nfunction warn(msg, ...args) {\n console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n constructor(detached = false) {\n this.detached = detached;\n /**\n * @internal\n */\n this._active = true;\n /**\n * @internal\n */\n this.effects = [];\n /**\n * @internal\n */\n this.cleanups = [];\n this.parent = activeEffectScope;\n if (!detached && activeEffectScope) {\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n this\n ) - 1;\n }\n }\n get active() {\n return this._active;\n }\n run(fn) {\n if (this._active) {\n const currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n } finally {\n activeEffectScope = currentEffectScope;\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`cannot run an inactive effect scope.`);\n }\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n on() {\n activeEffectScope = this;\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n off() {\n activeEffectScope = this.parent;\n }\n stop(fromParent) {\n if (this._active) {\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n }\n if (!this.detached && this.parent && !fromParent) {\n const last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = void 0;\n this._active = false;\n }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n if (scope && scope.active) {\n scope.effects.push(effect);\n }\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nlet activeEffect;\nclass ReactiveEffect {\n constructor(fn, trigger, scheduler, scope) {\n this.fn = fn;\n this.trigger = trigger;\n this.scheduler = scheduler;\n this.active = true;\n this.deps = [];\n /**\n * @internal\n */\n this._dirtyLevel = 4;\n /**\n * @internal\n */\n this._trackId = 0;\n /**\n * @internal\n */\n this._runnings = 0;\n /**\n * @internal\n */\n this._shouldSchedule = false;\n /**\n * @internal\n */\n this._depsLength = 0;\n recordEffectScope(this, scope);\n }\n get dirty() {\n if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {\n this._dirtyLevel = 1;\n pauseTracking();\n for (let i = 0; i < this._depsLength; i++) {\n const dep = this.deps[i];\n if (dep.computed) {\n triggerComputed(dep.computed);\n if (this._dirtyLevel >= 4) {\n break;\n }\n }\n }\n if (this._dirtyLevel === 1) {\n this._dirtyLevel = 0;\n }\n resetTracking();\n }\n return this._dirtyLevel >= 4;\n }\n set dirty(v) {\n this._dirtyLevel = v ? 4 : 0;\n }\n run() {\n this._dirtyLevel = 0;\n if (!this.active) {\n return this.fn();\n }\n let lastShouldTrack = shouldTrack;\n let lastEffect = activeEffect;\n try {\n shouldTrack = true;\n activeEffect = this;\n this._runnings++;\n preCleanupEffect(this);\n return this.fn();\n } finally {\n postCleanupEffect(this);\n this._runnings--;\n activeEffect = lastEffect;\n shouldTrack = lastShouldTrack;\n }\n }\n stop() {\n if (this.active) {\n preCleanupEffect(this);\n postCleanupEffect(this);\n this.onStop && this.onStop();\n this.active = false;\n }\n }\n}\nfunction triggerComputed(computed) {\n return computed.value;\n}\nfunction preCleanupEffect(effect2) {\n effect2._trackId++;\n effect2._depsLength = 0;\n}\nfunction postCleanupEffect(effect2) {\n if (effect2.deps.length > effect2._depsLength) {\n for (let i = effect2._depsLength; i < effect2.deps.length; i++) {\n cleanupDepEffect(effect2.deps[i], effect2);\n }\n effect2.deps.length = effect2._depsLength;\n }\n}\nfunction cleanupDepEffect(dep, effect2) {\n const trackId = dep.get(effect2);\n if (trackId !== void 0 && effect2._trackId !== trackId) {\n dep.delete(effect2);\n if (dep.size === 0) {\n dep.cleanup();\n }\n }\n}\nfunction effect(fn, options) {\n if (fn.effect instanceof ReactiveEffect) {\n fn = fn.effect.fn;\n }\n const _effect = new ReactiveEffect(fn, NOOP, () => {\n if (_effect.dirty) {\n _effect.run();\n }\n });\n if (options) {\n extend(_effect, options);\n if (options.scope)\n recordEffectScope(_effect, options.scope);\n }\n if (!options || !options.lazy) {\n _effect.run();\n }\n const runner = _effect.run.bind(_effect);\n runner.effect = _effect;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\nlet pauseScheduleStack = 0;\nconst trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction pauseScheduling() {\n pauseScheduleStack++;\n}\nfunction resetScheduling() {\n pauseScheduleStack--;\n while (!pauseScheduleStack && queueEffectSchedulers.length) {\n queueEffectSchedulers.shift()();\n }\n}\nfunction trackEffect(effect2, dep, debuggerEventExtraInfo) {\n var _a;\n if (dep.get(effect2) !== effect2._trackId) {\n dep.set(effect2, effect2._trackId);\n const oldDep = effect2.deps[effect2._depsLength];\n if (oldDep !== dep) {\n if (oldDep) {\n cleanupDepEffect(oldDep, effect2);\n }\n effect2.deps[effect2._depsLength++] = dep;\n } else {\n effect2._depsLength++;\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n }\n}\nconst queueEffectSchedulers = [];\nfunction triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {\n var _a;\n pauseScheduling();\n for (const effect2 of dep.keys()) {\n let tracking;\n if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {\n effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);\n effect2._dirtyLevel = dirtyLevel;\n }\n if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n effect2.trigger();\n if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {\n effect2._shouldSchedule = false;\n if (effect2.scheduler) {\n queueEffectSchedulers.push(effect2.scheduler);\n }\n }\n }\n }\n resetScheduling();\n}\n\nconst createDep = (cleanup, computed) => {\n const dep = /* @__PURE__ */ new Map();\n dep.cleanup = cleanup;\n dep.computed = computed;\n return dep;\n};\n\nconst targetMap = /* @__PURE__ */ new WeakMap();\nconst ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"iterate\" : \"\");\nconst MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"Map key iterate\" : \"\");\nfunction track(target, type, key) {\n if (shouldTrack && activeEffect) {\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = createDep(() => depsMap.delete(key)));\n }\n trackEffect(\n activeEffect,\n dep,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target,\n type,\n key\n } : void 0\n );\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n return;\n }\n let deps = [];\n if (type === \"clear\") {\n deps = [...depsMap.values()];\n } else if (key === \"length\" && isArray(target)) {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || !isSymbol(key2) && key2 >= newLength) {\n deps.push(dep);\n }\n });\n } else {\n if (key !== void 0) {\n deps.push(depsMap.get(key));\n }\n switch (type) {\n case \"add\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isIntegerKey(key)) {\n deps.push(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n pauseScheduling();\n for (const dep of deps) {\n if (dep) {\n triggerEffects(\n dep,\n 4,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target,\n type,\n key,\n newValue,\n oldValue,\n oldTarget\n } : void 0\n );\n }\n }\n resetScheduling();\n}\nfunction getDepFromReactive(object, key) {\n const depsMap = targetMap.get(object);\n return depsMap && depsMap.get(key);\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nconst arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();\nfunction createArrayInstrumentations() {\n const instrumentations = {};\n [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n const arr = toRaw(this);\n for (let i = 0, l = this.length; i < l; i++) {\n track(arr, \"get\", i + \"\");\n }\n const res = arr[key](...args);\n if (res === -1 || res === false) {\n return arr[key](...args.map(toRaw));\n } else {\n return res;\n }\n };\n });\n [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n pauseTracking();\n pauseScheduling();\n const res = toRaw(this)[key].apply(this, args);\n resetScheduling();\n resetTracking();\n return res;\n };\n });\n return instrumentations;\n}\nfunction hasOwnProperty(key) {\n if (!isSymbol(key))\n key = String(key);\n const obj = toRaw(this);\n track(obj, \"has\", key);\n return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n constructor(_isReadonly = false, _isShallow = false) {\n this._isReadonly = _isReadonly;\n this._isShallow = _isShallow;\n }\n get(target, key, receiver) {\n const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return isShallow2;\n } else if (key === \"__v_raw\") {\n if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\n // this means the reciever is a user proxy of the reactive proxy\n Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\n return target;\n }\n return;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly2) {\n if (targetIsArray && hasOwn(arrayInstrumentations, key)) {\n return Reflect.get(arrayInstrumentations, key, receiver);\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(target, key, receiver);\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly2) {\n track(target, \"get\", key);\n }\n if (isShallow2) {\n return res;\n }\n if (isRef(res)) {\n return targetIsArray && isIntegerKey(key) ? res : res.value;\n }\n if (isObject(res)) {\n return isReadonly2 ? readonly(res) : reactive(res);\n }\n return res;\n }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(false, isShallow2);\n }\n set(target, key, value, receiver) {\n let oldValue = target[key];\n if (!this._isShallow) {\n const isOldValueReadonly = isReadonly(oldValue);\n if (!isShallow(value) && !isReadonly(value)) {\n oldValue = toRaw(oldValue);\n value = toRaw(value);\n }\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n if (isOldValueReadonly) {\n return false;\n } else {\n oldValue.value = value;\n return true;\n }\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(target, key, value, receiver);\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n }\n deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n }\n has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n }\n ownKeys(target) {\n track(\n target,\n \"iterate\",\n isArray(target) ? \"length\" : ITERATE_KEY\n );\n return Reflect.ownKeys(target);\n }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(true, isShallow2);\n }\n set(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n deleteProperty(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(\n true\n);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get(target, key, isReadonly = false, isShallow = false) {\n target = target[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has: has2 } = getProto(rawTarget);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n if (has2.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has2.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n}\nfunction has(key, isReadonly = false) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"has\", key);\n }\n track(rawTarget, \"has\", rawKey);\n }\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly = false) {\n target = target[\"__v_raw\"];\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n}\nfunction add(value) {\n value = toRaw(value);\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n}\nfunction set(key, value) {\n value = toRaw(value);\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n}\nfunction deleteEntry(key) {\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2 ? get2.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(target, \"clear\", void 0, void 0, oldTarget);\n }\n return result;\n}\nfunction createForEach(isReadonly, isShallow) {\n return function forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n };\n}\nfunction createIterableMethod(method, isReadonly, isShallow) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(\n rawTarget,\n \"iterate\",\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n );\n return {\n // iterator protocol\n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n warn(\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\n toRaw(this)\n );\n }\n return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n };\n}\nfunction createInstrumentations() {\n const mutableInstrumentations2 = {\n get(key) {\n return get(this, key);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, false)\n };\n const shallowInstrumentations2 = {\n get(key) {\n return get(this, key, false, true);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, true)\n };\n const readonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, false)\n };\n const shallowReadonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, true)\n };\n const iteratorMethods = [\n \"keys\",\n \"values\",\n \"entries\",\n Symbol.iterator\n ];\n iteratorMethods.forEach((method) => {\n mutableInstrumentations2[method] = createIterableMethod(method, false, false);\n readonlyInstrumentations2[method] = createIterableMethod(method, true, false);\n shallowInstrumentations2[method] = createIterableMethod(method, false, true);\n shallowReadonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n true\n );\n });\n return [\n mutableInstrumentations2,\n readonlyInstrumentations2,\n shallowInstrumentations2,\n shallowReadonlyInstrumentations2\n ];\n}\nconst [\n mutableInstrumentations,\n readonlyInstrumentations,\n shallowInstrumentations,\n shallowReadonlyInstrumentations\n] = /* @__PURE__ */ createInstrumentations();\nfunction createInstrumentationGetter(isReadonly, shallow) {\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n key,\n receiver\n );\n };\n}\nconst mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has2, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has2.call(target, rawKey)) {\n const type = toRawType(target);\n warn(\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1 /* COMMON */;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2 /* COLLECTION */;\n default:\n return 0 /* INVALID */;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n if (isReadonly(target)) {\n return target;\n }\n return createReactiveObject(\n target,\n false,\n mutableHandlers,\n mutableCollectionHandlers,\n reactiveMap\n );\n}\nfunction shallowReactive(target) {\n return createReactiveObject(\n target,\n false,\n shallowReactiveHandlers,\n shallowCollectionHandlers,\n shallowReactiveMap\n );\n}\nfunction readonly(target) {\n return createReactiveObject(\n target,\n true,\n readonlyHandlers,\n readonlyCollectionHandlers,\n readonlyMap\n );\n}\nfunction shallowReadonly(target) {\n return createReactiveObject(\n target,\n true,\n shallowReadonlyHandlers,\n shallowReadonlyCollectionHandlers,\n shallowReadonlyMap\n );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`value cannot be made reactive: ${String(target)}`);\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0 /* INVALID */) {\n return target;\n }\n const proxy = new Proxy(\n target,\n targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n );\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\"]);\n }\n return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n return value ? !!value[\"__v_raw\"] : false;\n}\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\"];\n return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n if (Object.isExtensible(value)) {\n def(value, \"__v_skip\", true);\n }\n return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nconst COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`;\nclass ComputedRefImpl {\n constructor(getter, _setter, isReadonly, isSSR) {\n this.getter = getter;\n this._setter = _setter;\n this.dep = void 0;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = false;\n this.effect = new ReactiveEffect(\n () => getter(this._value),\n () => triggerRefValue(\n this,\n this.effect._dirtyLevel === 2 ? 2 : 3\n )\n );\n this.effect.computed = this;\n this.effect.active = this._cacheable = !isSSR;\n this[\"__v_isReadonly\"] = isReadonly;\n }\n get value() {\n const self = toRaw(this);\n if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {\n triggerRefValue(self, 4);\n }\n trackRefValue(self);\n if (self.effect._dirtyLevel >= 2) {\n if (!!(process.env.NODE_ENV !== \"production\") && this._warnRecursive) {\n warn(COMPUTED_SIDE_EFFECT_WARN, `\n\ngetter: `, this.getter);\n }\n triggerRefValue(self, 2);\n }\n return self._value;\n }\n set value(newValue) {\n this._setter(newValue);\n }\n // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x\n get _dirty() {\n return this.effect.dirty;\n }\n set _dirty(v) {\n this.effect.dirty = v;\n }\n // #endregion\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n const onlyGetter = isFunction(getterOrOptions);\n if (onlyGetter) {\n getter = getterOrOptions;\n setter = !!(process.env.NODE_ENV !== \"production\") ? () => {\n warn(\"Write operation failed: computed value is readonly\");\n } : NOOP;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.effect.onTrack = debugOptions.onTrack;\n cRef.effect.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\n\nfunction trackRefValue(ref2) {\n var _a;\n if (shouldTrack && activeEffect) {\n ref2 = toRaw(ref2);\n trackEffect(\n activeEffect,\n (_a = ref2.dep) != null ? _a : ref2.dep = createDep(\n () => ref2.dep = void 0,\n ref2 instanceof ComputedRefImpl ? ref2 : void 0\n ),\n !!(process.env.NODE_ENV !== \"production\") ? {\n target: ref2,\n type: \"get\",\n key: \"value\"\n } : void 0\n );\n }\n}\nfunction triggerRefValue(ref2, dirtyLevel = 4, newVal) {\n ref2 = toRaw(ref2);\n const dep = ref2.dep;\n if (dep) {\n triggerEffects(\n dep,\n dirtyLevel,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: newVal\n } : void 0\n );\n }\n}\nfunction isRef(r) {\n return !!(r && r.__v_isRef === true);\n}\nfunction ref(value) {\n return createRef(value, false);\n}\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (isRef(rawValue)) {\n return rawValue;\n }\n return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n constructor(value, __v_isShallow) {\n this.__v_isShallow = __v_isShallow;\n this.dep = void 0;\n this.__v_isRef = true;\n this._rawValue = __v_isShallow ? value : toRaw(value);\n this._value = __v_isShallow ? value : toReactive(value);\n }\n get value() {\n trackRefValue(this);\n return this._value;\n }\n set value(newVal) {\n const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);\n newVal = useDirectValue ? newVal : toRaw(newVal);\n if (hasChanged(newVal, this._rawValue)) {\n this._rawValue = newVal;\n this._value = useDirectValue ? newVal : toReactive(newVal);\n triggerRefValue(this, 4, newVal);\n }\n }\n}\nfunction triggerRef(ref2) {\n triggerRefValue(ref2, 4, !!(process.env.NODE_ENV !== \"production\") ? ref2.value : void 0);\n}\nfunction unref(ref2) {\n return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\n set: (target, key, value, receiver) => {\n const oldValue = target[key];\n if (isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n } else {\n return Reflect.set(target, key, value, receiver);\n }\n }\n};\nfunction proxyRefs(objectWithRefs) {\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n constructor(factory) {\n this.dep = void 0;\n this.__v_isRef = true;\n const { get, set } = factory(\n () => trackRefValue(this),\n () => triggerRefValue(this)\n );\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._get();\n }\n set value(newVal) {\n this._set(newVal);\n }\n}\nfunction customRef(factory) {\n return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n warn(`toRefs() expects a reactive object but received a plain one.`);\n }\n const ret = isArray(object) ? new Array(object.length) : {};\n for (const key in object) {\n ret[key] = propertyToRef(object, key);\n }\n return ret;\n}\nclass ObjectRefImpl {\n constructor(_object, _key, _defaultValue) {\n this._object = _object;\n this._key = _key;\n this._defaultValue = _defaultValue;\n this.__v_isRef = true;\n }\n get value() {\n const val = this._object[this._key];\n return val === void 0 ? this._defaultValue : val;\n }\n set value(newVal) {\n this._object[this._key] = newVal;\n }\n get dep() {\n return getDepFromReactive(toRaw(this._object), this._key);\n }\n}\nclass GetterRefImpl {\n constructor(_getter) {\n this._getter = _getter;\n this.__v_isRef = true;\n this.__v_isReadonly = true;\n }\n get value() {\n return this._getter();\n }\n}\nfunction toRef(source, key, defaultValue) {\n if (isRef(source)) {\n return source;\n } else if (isFunction(source)) {\n return new GetterRefImpl(source);\n } else if (isObject(source) && arguments.length > 1) {\n return propertyToRef(source, key, defaultValue);\n } else {\n return ref(source);\n }\n}\nfunction propertyToRef(source, key, defaultValue) {\n const val = source[key];\n return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\n}\n\nconst deferredComputed = computed;\n\nconst TrackOpTypes = {\n \"GET\": \"get\",\n \"HAS\": \"has\",\n \"ITERATE\": \"iterate\"\n};\nconst TriggerOpTypes = {\n \"SET\": \"set\",\n \"ADD\": \"add\",\n \"DELETE\": \"delete\",\n \"CLEAR\": \"clear\"\n};\nconst ReactiveFlags = {\n \"SKIP\": \"__v_skip\",\n \"IS_REACTIVE\": \"__v_isReactive\",\n \"IS_READONLY\": \"__v_isReadonly\",\n \"IS_SHALLOW\": \"__v_isShallow\",\n \"RAW\": \"__v_raw\"\n};\n\nexport { EffectScope, ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseScheduling, pauseTracking, proxyRefs, reactive, readonly, ref, resetScheduling, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, track, trigger, triggerRef, unref };\n","/**\n* @vue/runtime-core v3.4.27\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { pauseTracking, resetTracking, isRef, toRaw, shallowReadonly, isShallow, isReactive, ReactiveEffect, getCurrentScope, ref, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, customRef, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, isReservedProp, EMPTY_ARR, toRawType, makeMap, def, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n stack.push(vnode);\n}\nfunction popWarningContext() {\n stack.pop();\n}\nfunction warn$1(msg, ...args) {\n pauseTracking();\n const instance = stack.length ? stack[stack.length - 1].component : null;\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\n const trace = getComponentTrace();\n if (appWarnHandler) {\n callWithErrorHandling(\n appWarnHandler,\n instance,\n 11,\n [\n msg + args.map((a) => {\n var _a, _b;\n return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);\n }).join(\"\"),\n instance && instance.proxy,\n trace.map(\n ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n ).join(\"\\n\"),\n trace\n ]\n );\n } else {\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n if (trace.length && // avoid spamming console during tests\n true) {\n warnArgs.push(`\n`, ...formatTrace(trace));\n }\n console.warn(...warnArgs);\n }\n resetTracking();\n}\nfunction getComponentTrace() {\n let currentVNode = stack[stack.length - 1];\n if (!currentVNode) {\n return [];\n }\n const normalizedStack = [];\n while (currentVNode) {\n const last = normalizedStack[0];\n if (last && last.vnode === currentVNode) {\n last.recurseCount++;\n } else {\n normalizedStack.push({\n vnode: currentVNode,\n recurseCount: 0\n });\n }\n const parentInstance = currentVNode.component && currentVNode.component.parent;\n currentVNode = parentInstance && parentInstance.vnode;\n }\n return normalizedStack;\n}\nfunction formatTrace(trace) {\n const logs = [];\n trace.forEach((entry, i) => {\n logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n });\n return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n const isRoot = vnode.component ? vnode.component.parent == null : false;\n const open = ` at <${formatComponentName(\n vnode.component,\n vnode.type,\n isRoot\n )}`;\n const close = `>` + postfix;\n return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n const res = [];\n const keys = Object.keys(props);\n keys.slice(0, 3).forEach((key) => {\n res.push(...formatProp(key, props[key]));\n });\n if (keys.length > 3) {\n res.push(` ...`);\n }\n return res;\n}\nfunction formatProp(key, value, raw) {\n if (isString(value)) {\n value = JSON.stringify(value);\n return raw ? value : [`${key}=${value}`];\n } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n return raw ? value : [`${key}=${value}`];\n } else if (isRef(value)) {\n value = formatProp(key, toRaw(value.value), true);\n return raw ? value : [`${key}=Ref<`, value, `>`];\n } else if (isFunction(value)) {\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n } else {\n value = toRaw(value);\n return raw ? value : [`${key}=`, value];\n }\n}\nfunction assertNumber(val, type) {\n if (!!!(process.env.NODE_ENV !== \"production\"))\n return;\n if (val === void 0) {\n return;\n } else if (typeof val !== \"number\") {\n warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);\n } else if (isNaN(val)) {\n warn$1(`${type} is NaN - the duration expression might be incorrect.`);\n }\n}\n\nconst ErrorCodes = {\n \"SETUP_FUNCTION\": 0,\n \"0\": \"SETUP_FUNCTION\",\n \"RENDER_FUNCTION\": 1,\n \"1\": \"RENDER_FUNCTION\",\n \"WATCH_GETTER\": 2,\n \"2\": \"WATCH_GETTER\",\n \"WATCH_CALLBACK\": 3,\n \"3\": \"WATCH_CALLBACK\",\n \"WATCH_CLEANUP\": 4,\n \"4\": \"WATCH_CLEANUP\",\n \"NATIVE_EVENT_HANDLER\": 5,\n \"5\": \"NATIVE_EVENT_HANDLER\",\n \"COMPONENT_EVENT_HANDLER\": 6,\n \"6\": \"COMPONENT_EVENT_HANDLER\",\n \"VNODE_HOOK\": 7,\n \"7\": \"VNODE_HOOK\",\n \"DIRECTIVE_HOOK\": 8,\n \"8\": \"DIRECTIVE_HOOK\",\n \"TRANSITION_HOOK\": 9,\n \"9\": \"TRANSITION_HOOK\",\n \"APP_ERROR_HANDLER\": 10,\n \"10\": \"APP_ERROR_HANDLER\",\n \"APP_WARN_HANDLER\": 11,\n \"11\": \"APP_WARN_HANDLER\",\n \"FUNCTION_REF\": 12,\n \"12\": \"FUNCTION_REF\",\n \"ASYNC_COMPONENT_LOADER\": 13,\n \"13\": \"ASYNC_COMPONENT_LOADER\",\n \"SCHEDULER\": 14,\n \"14\": \"SCHEDULER\"\n};\nconst ErrorTypeStrings$1 = {\n [\"sp\"]: \"serverPrefetch hook\",\n [\"bc\"]: \"beforeCreate hook\",\n [\"c\"]: \"created hook\",\n [\"bm\"]: \"beforeMount hook\",\n [\"m\"]: \"mounted hook\",\n [\"bu\"]: \"beforeUpdate hook\",\n [\"u\"]: \"updated\",\n [\"bum\"]: \"beforeUnmount hook\",\n [\"um\"]: \"unmounted hook\",\n [\"a\"]: \"activated hook\",\n [\"da\"]: \"deactivated hook\",\n [\"ec\"]: \"errorCaptured hook\",\n [\"rtc\"]: \"renderTracked hook\",\n [\"rtg\"]: \"renderTriggered hook\",\n [0]: \"setup function\",\n [1]: \"render function\",\n [2]: \"watcher getter\",\n [3]: \"watcher callback\",\n [4]: \"watcher cleanup function\",\n [5]: \"native event handler\",\n [6]: \"component event handler\",\n [7]: \"vnode hook\",\n [8]: \"directive hook\",\n [9]: \"transition hook\",\n [10]: \"app errorHandler\",\n [11]: \"app warnHandler\",\n [12]: \"ref function\",\n [13]: \"async component loader\",\n [14]: \"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n try {\n return args ? fn(...args) : fn();\n } catch (err) {\n handleError(err, instance, type);\n }\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n if (isFunction(fn)) {\n const res = callWithErrorHandling(fn, instance, type, args);\n if (res && isPromise(res)) {\n res.catch((err) => {\n handleError(err, instance, type);\n });\n }\n return res;\n }\n if (isArray(fn)) {\n const values = [];\n for (let i = 0; i < fn.length; i++) {\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n }\n return values;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`\n );\n }\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n const contextVNode = instance ? instance.vnode : null;\n if (instance) {\n let cur = instance.parent;\n const exposedInstance = instance.proxy;\n const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;\n while (cur) {\n const errorCapturedHooks = cur.ec;\n if (errorCapturedHooks) {\n for (let i = 0; i < errorCapturedHooks.length; i++) {\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n return;\n }\n }\n }\n cur = cur.parent;\n }\n const appErrorHandler = instance.appContext.config.errorHandler;\n if (appErrorHandler) {\n pauseTracking();\n callWithErrorHandling(\n appErrorHandler,\n null,\n 10,\n [err, exposedInstance, errorInfo]\n );\n resetTracking();\n return;\n }\n }\n logError(err, type, contextVNode, throwInDev);\n}\nfunction logError(err, type, contextVNode, throwInDev = true) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const info = ErrorTypeStrings$1[type];\n if (contextVNode) {\n pushWarningContext(contextVNode);\n }\n warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n if (contextVNode) {\n popWarningContext();\n }\n if (throwInDev) {\n throw err;\n } else {\n console.error(err);\n }\n } else {\n console.error(err);\n }\n}\n\nlet isFlushing = false;\nlet isFlushPending = false;\nconst queue = [];\nlet flushIndex = 0;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick(fn) {\n const p = currentFlushPromise || resolvedPromise;\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n let start = flushIndex + 1;\n let end = queue.length;\n while (start < end) {\n const middle = start + end >>> 1;\n const middleJob = queue[middle];\n const middleJobId = getId(middleJob);\n if (middleJobId < id || middleJobId === id && middleJob.pre) {\n start = middle + 1;\n } else {\n end = middle;\n }\n }\n return start;\n}\nfunction queueJob(job) {\n if (!queue.length || !queue.includes(\n job,\n isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex\n )) {\n if (job.id == null) {\n queue.push(job);\n } else {\n queue.splice(findInsertionIndex(job.id), 0, job);\n }\n queueFlush();\n }\n}\nfunction queueFlush() {\n if (!isFlushing && !isFlushPending) {\n isFlushPending = true;\n currentFlushPromise = resolvedPromise.then(flushJobs);\n }\n}\nfunction invalidateJob(job) {\n const i = queue.indexOf(job);\n if (i > flushIndex) {\n queue.splice(i, 1);\n }\n}\nfunction queuePostFlushCb(cb) {\n if (!isArray(cb)) {\n if (!activePostFlushCbs || !activePostFlushCbs.includes(\n cb,\n cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex\n )) {\n pendingPostFlushCbs.push(cb);\n }\n } else {\n pendingPostFlushCbs.push(...cb);\n }\n queueFlush();\n}\nfunction flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (; i < queue.length; i++) {\n const cb = queue[i];\n if (cb && cb.pre) {\n if (instance && cb.id !== instance.uid) {\n continue;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n queue.splice(i, 1);\n i--;\n cb();\n }\n }\n}\nfunction flushPostFlushCbs(seen) {\n if (pendingPostFlushCbs.length) {\n const deduped = [...new Set(pendingPostFlushCbs)].sort(\n (a, b) => getId(a) - getId(b)\n );\n pendingPostFlushCbs.length = 0;\n if (activePostFlushCbs) {\n activePostFlushCbs.push(...deduped);\n return;\n }\n activePostFlushCbs = deduped;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\n continue;\n }\n activePostFlushCbs[postFlushIndex]();\n }\n activePostFlushCbs = null;\n postFlushIndex = 0;\n }\n}\nconst getId = (job) => job.id == null ? Infinity : job.id;\nconst comparator = (a, b) => {\n const diff = getId(a) - getId(b);\n if (diff === 0) {\n if (a.pre && !b.pre)\n return -1;\n if (b.pre && !a.pre)\n return 1;\n }\n return diff;\n};\nfunction flushJobs(seen) {\n isFlushPending = false;\n isFlushing = true;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n queue.sort(comparator);\n const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n try {\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job && job.active !== false) {\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n continue;\n }\n callWithErrorHandling(job, null, 14);\n }\n }\n } finally {\n flushIndex = 0;\n queue.length = 0;\n flushPostFlushCbs(seen);\n isFlushing = false;\n currentFlushPromise = null;\n if (queue.length || pendingPostFlushCbs.length) {\n flushJobs(seen);\n }\n }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n if (!seen.has(fn)) {\n seen.set(fn, 1);\n } else {\n const count = seen.get(fn);\n if (count > RECURSION_LIMIT) {\n const instance = fn.ownerInstance;\n const componentName = instance && getComponentName(instance.type);\n handleError(\n `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,\n null,\n 10\n );\n return true;\n } else {\n seen.set(fn, count + 1);\n }\n }\n}\n\nlet isHmrUpdating = false;\nconst hmrDirtyComponents = /* @__PURE__ */ new Set();\nif (!!(process.env.NODE_ENV !== \"production\")) {\n getGlobalThis().__VUE_HMR_RUNTIME__ = {\n createRecord: tryWrap(createRecord),\n rerender: tryWrap(rerender),\n reload: tryWrap(reload)\n };\n}\nconst map = /* @__PURE__ */ new Map();\nfunction registerHMR(instance) {\n const id = instance.type.__hmrId;\n let record = map.get(id);\n if (!record) {\n createRecord(id, instance.type);\n record = map.get(id);\n }\n record.instances.add(instance);\n}\nfunction unregisterHMR(instance) {\n map.get(instance.type.__hmrId).instances.delete(instance);\n}\nfunction createRecord(id, initialDef) {\n if (map.has(id)) {\n return false;\n }\n map.set(id, {\n initialDef: normalizeClassComponent(initialDef),\n instances: /* @__PURE__ */ new Set()\n });\n return true;\n}\nfunction normalizeClassComponent(component) {\n return isClassComponent(component) ? component.__vccOpts : component;\n}\nfunction rerender(id, newRender) {\n const record = map.get(id);\n if (!record) {\n return;\n }\n record.initialDef.render = newRender;\n [...record.instances].forEach((instance) => {\n if (newRender) {\n instance.render = newRender;\n normalizeClassComponent(instance.type).render = newRender;\n }\n instance.renderCache = [];\n isHmrUpdating = true;\n instance.effect.dirty = true;\n instance.update();\n isHmrUpdating = false;\n });\n}\nfunction reload(id, newComp) {\n const record = map.get(id);\n if (!record)\n return;\n newComp = normalizeClassComponent(newComp);\n updateComponentDef(record.initialDef, newComp);\n const instances = [...record.instances];\n for (const instance of instances) {\n const oldComp = normalizeClassComponent(instance.type);\n if (!hmrDirtyComponents.has(oldComp)) {\n if (oldComp !== record.initialDef) {\n updateComponentDef(oldComp, newComp);\n }\n hmrDirtyComponents.add(oldComp);\n }\n instance.appContext.propsCache.delete(instance.type);\n instance.appContext.emitsCache.delete(instance.type);\n instance.appContext.optionsCache.delete(instance.type);\n if (instance.ceReload) {\n hmrDirtyComponents.add(oldComp);\n instance.ceReload(newComp.styles);\n hmrDirtyComponents.delete(oldComp);\n } else if (instance.parent) {\n instance.parent.effect.dirty = true;\n queueJob(instance.parent.update);\n } else if (instance.appContext.reload) {\n instance.appContext.reload();\n } else if (typeof window !== \"undefined\") {\n window.location.reload();\n } else {\n console.warn(\n \"[HMR] Root or manually mounted instance modified. Full reload required.\"\n );\n }\n }\n queuePostFlushCb(() => {\n for (const instance of instances) {\n hmrDirtyComponents.delete(\n normalizeClassComponent(instance.type)\n );\n }\n });\n}\nfunction updateComponentDef(oldComp, newComp) {\n extend(oldComp, newComp);\n for (const key in oldComp) {\n if (key !== \"__file\" && !(key in newComp)) {\n delete oldComp[key];\n }\n }\n}\nfunction tryWrap(fn) {\n return (id, arg) => {\n try {\n return fn(id, arg);\n } catch (e) {\n console.error(e);\n console.warn(\n `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`\n );\n }\n };\n}\n\nlet devtools$1;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n if (devtools$1) {\n devtools$1.emit(event, ...args);\n } else if (!devtoolsNotInstalled) {\n buffer.push({ event, args });\n }\n}\nfunction setDevtoolsHook$1(hook, target) {\n var _a, _b;\n devtools$1 = hook;\n if (devtools$1) {\n devtools$1.enabled = true;\n buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));\n buffer = [];\n } else if (\n // handle late devtools injection - only do this if we are in an actual\n // browser environment to avoid the timer handle stalling test runner exit\n // (#4815)\n typeof window !== \"undefined\" && // some envs mock window but not fully\n window.HTMLElement && // also exclude jsdom\n !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n ) {\n const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n replay.push((newHook) => {\n setDevtoolsHook$1(newHook, target);\n });\n setTimeout(() => {\n if (!devtools$1) {\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n devtoolsNotInstalled = true;\n buffer = [];\n }\n }, 3e3);\n } else {\n devtoolsNotInstalled = true;\n buffer = [];\n }\n}\nfunction devtoolsInitApp(app, version) {\n emit$1(\"app:init\" /* APP_INIT */, app, version, {\n Fragment,\n Text,\n Comment,\n Static\n });\n}\nfunction devtoolsUnmountApp(app) {\n emit$1(\"app:unmount\" /* APP_UNMOUNT */, app);\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:added\" /* COMPONENT_ADDED */\n);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n if (devtools$1 && typeof devtools$1.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n !devtools$1.cleanupBuffer(component)) {\n _devtoolsComponentRemoved(component);\n }\n};\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction createDevtoolsComponentHook(hook) {\n return (component) => {\n emit$1(\n hook,\n component.appContext.app,\n component.uid,\n component.parent ? component.parent.uid : void 0,\n component\n );\n };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:start\" /* PERFORMANCE_START */\n);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:end\" /* PERFORMANCE_END */\n);\nfunction createDevtoolsPerformanceHook(hook) {\n return (component, type, time) => {\n emit$1(hook, component.appContext.app, component.uid, component, type, time);\n };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n emit$1(\n \"component:emit\" /* COMPONENT_EMIT */,\n component.appContext.app,\n component,\n event,\n params\n );\n}\n\nfunction emit(instance, event, ...rawArgs) {\n if (instance.isUnmounted)\n return;\n const props = instance.vnode.props || EMPTY_OBJ;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const {\n emitsOptions,\n propsOptions: [propsOptions]\n } = instance;\n if (emitsOptions) {\n if (!(event in emitsOptions) && true) {\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\n warn$1(\n `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(event)}\" prop.`\n );\n }\n } else {\n const validator = emitsOptions[event];\n if (isFunction(validator)) {\n const isValid = validator(...rawArgs);\n if (!isValid) {\n warn$1(\n `Invalid event arguments: event validation failed for event \"${event}\".`\n );\n }\n }\n }\n }\n }\n let args = rawArgs;\n const isModelListener = event.startsWith(\"update:\");\n const modelArg = isModelListener && event.slice(7);\n if (modelArg && modelArg in props) {\n const modifiersKey = `${modelArg === \"modelValue\" ? \"model\" : modelArg}Modifiers`;\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\n if (trim) {\n args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n }\n if (number) {\n args = rawArgs.map(looseToNumber);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentEmit(instance, event, args);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\n warn$1(\n `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\n instance,\n instance.type\n )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(\n event\n )}\" instead of \"${event}\".`\n );\n }\n }\n let handlerName;\n let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\n props[handlerName = toHandlerKey(camelize(event))];\n if (!handler && isModelListener) {\n handler = props[handlerName = toHandlerKey(hyphenate(event))];\n }\n if (handler) {\n callWithAsyncErrorHandling(\n handler,\n instance,\n 6,\n args\n );\n }\n const onceHandler = props[handlerName + `Once`];\n if (onceHandler) {\n if (!instance.emitted) {\n instance.emitted = {};\n } else if (instance.emitted[handlerName]) {\n return;\n }\n instance.emitted[handlerName] = true;\n callWithAsyncErrorHandling(\n onceHandler,\n instance,\n 6,\n args\n );\n }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n const cache = appContext.emitsCache;\n const cached = cache.get(comp);\n if (cached !== void 0) {\n return cached;\n }\n const raw = comp.emits;\n let normalized = {};\n let hasExtends = false;\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n const extendEmits = (raw2) => {\n const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n if (normalizedFromExtend) {\n hasExtends = true;\n extend(normalized, normalizedFromExtend);\n }\n };\n if (!asMixin && appContext.mixins.length) {\n appContext.mixins.forEach(extendEmits);\n }\n if (comp.extends) {\n extendEmits(comp.extends);\n }\n if (comp.mixins) {\n comp.mixins.forEach(extendEmits);\n }\n }\n if (!raw && !hasExtends) {\n if (isObject(comp)) {\n cache.set(comp, null);\n }\n return null;\n }\n if (isArray(raw)) {\n raw.forEach((key) => normalized[key] = null);\n } else {\n extend(normalized, raw);\n }\n if (isObject(comp)) {\n cache.set(comp, normalized);\n }\n return normalized;\n}\nfunction isEmitListener(options, key) {\n if (!options || !isOn(key)) {\n return false;\n }\n key = key.slice(2).replace(/Once$/, \"\");\n return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n const prev = currentRenderingInstance;\n currentRenderingInstance = instance;\n currentScopeId = instance && instance.type.__scopeId || null;\n return prev;\n}\nfunction pushScopeId(id) {\n currentScopeId = id;\n}\nfunction popScopeId() {\n currentScopeId = null;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n if (!ctx)\n return fn;\n if (fn._n) {\n return fn;\n }\n const renderFnWithContext = (...args) => {\n if (renderFnWithContext._d) {\n setBlockTracking(-1);\n }\n const prevInstance = setCurrentRenderingInstance(ctx);\n let res;\n try {\n res = fn(...args);\n } finally {\n setCurrentRenderingInstance(prevInstance);\n if (renderFnWithContext._d) {\n setBlockTracking(1);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentUpdated(ctx);\n }\n return res;\n };\n renderFnWithContext._n = true;\n renderFnWithContext._c = true;\n renderFnWithContext._d = true;\n return renderFnWithContext;\n}\n\nlet accessedAttrs = false;\nfunction markAttrsAccessed() {\n accessedAttrs = true;\n}\nfunction renderComponentRoot(instance) {\n const {\n type: Component,\n vnode,\n proxy,\n withProxy,\n propsOptions: [propsOptions],\n slots,\n attrs,\n emit,\n render,\n renderCache,\n props,\n data,\n setupState,\n ctx,\n inheritAttrs\n } = instance;\n const prev = setCurrentRenderingInstance(instance);\n let result;\n let fallthroughAttrs;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n accessedAttrs = false;\n }\n try {\n if (vnode.shapeFlag & 4) {\n const proxyToUse = withProxy || proxy;\n const thisProxy = !!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup ? new Proxy(proxyToUse, {\n get(target, key, receiver) {\n warn$1(\n `Property '${String(\n key\n )}' was accessed via 'this'. Avoid using 'this' in templates.`\n );\n return Reflect.get(target, key, receiver);\n }\n }) : proxyToUse;\n result = normalizeVNode(\n render.call(\n thisProxy,\n proxyToUse,\n renderCache,\n !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n setupState,\n data,\n ctx\n )\n );\n fallthroughAttrs = attrs;\n } else {\n const render2 = Component;\n if (!!(process.env.NODE_ENV !== \"production\") && attrs === props) {\n markAttrsAccessed();\n }\n result = normalizeVNode(\n render2.length > 1 ? render2(\n !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n !!(process.env.NODE_ENV !== \"production\") ? {\n get attrs() {\n markAttrsAccessed();\n return shallowReadonly(attrs);\n },\n slots,\n emit\n } : { attrs, slots, emit }\n ) : render2(\n !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n null\n )\n );\n fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n }\n } catch (err) {\n blockStack.length = 0;\n handleError(err, instance, 1);\n result = createVNode(Comment);\n }\n let root = result;\n let setRoot = void 0;\n if (!!(process.env.NODE_ENV !== \"production\") && result.patchFlag > 0 && result.patchFlag & 2048) {\n [root, setRoot] = getChildRoot(result);\n }\n if (fallthroughAttrs && inheritAttrs !== false) {\n const keys = Object.keys(fallthroughAttrs);\n const { shapeFlag } = root;\n if (keys.length) {\n if (shapeFlag & (1 | 6)) {\n if (propsOptions && keys.some(isModelListener)) {\n fallthroughAttrs = filterModelListeners(\n fallthroughAttrs,\n propsOptions\n );\n }\n root = cloneVNode(root, fallthroughAttrs, false, true);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !accessedAttrs && root.type !== Comment) {\n const allAttrs = Object.keys(attrs);\n const eventAttrs = [];\n const extraAttrs = [];\n for (let i = 0, l = allAttrs.length; i < l; i++) {\n const key = allAttrs[i];\n if (isOn(key)) {\n if (!isModelListener(key)) {\n eventAttrs.push(key[2].toLowerCase() + key.slice(3));\n }\n } else {\n extraAttrs.push(key);\n }\n }\n if (extraAttrs.length) {\n warn$1(\n `Extraneous non-props attributes (${extraAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`\n );\n }\n if (eventAttrs.length) {\n warn$1(\n `Extraneous non-emits event listeners (${eventAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the \"emits\" option.`\n );\n }\n }\n }\n }\n if (vnode.dirs) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn$1(\n `Runtime directive used on component with non-element root node. The directives will not function as intended.`\n );\n }\n root = cloneVNode(root, null, false, true);\n root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n }\n if (vnode.transition) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn$1(\n `Component inside renders non-element root node that cannot be animated.`\n );\n }\n root.transition = vnode.transition;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && setRoot) {\n setRoot(root);\n } else {\n result = root;\n }\n setCurrentRenderingInstance(prev);\n return result;\n}\nconst getChildRoot = (vnode) => {\n const rawChildren = vnode.children;\n const dynamicChildren = vnode.dynamicChildren;\n const childRoot = filterSingleRoot(rawChildren, false);\n if (!childRoot) {\n return [vnode, void 0];\n } else if (!!(process.env.NODE_ENV !== \"production\") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {\n return getChildRoot(childRoot);\n }\n const index = rawChildren.indexOf(childRoot);\n const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\n const setRoot = (updatedRoot) => {\n rawChildren[index] = updatedRoot;\n if (dynamicChildren) {\n if (dynamicIndex > -1) {\n dynamicChildren[dynamicIndex] = updatedRoot;\n } else if (updatedRoot.patchFlag > 0) {\n vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\n }\n }\n };\n return [normalizeVNode(childRoot), setRoot];\n};\nfunction filterSingleRoot(children, recurse = true) {\n let singleRoot;\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (isVNode(child)) {\n if (child.type !== Comment || child.children === \"v-if\") {\n if (singleRoot) {\n return;\n } else {\n singleRoot = child;\n if (!!(process.env.NODE_ENV !== \"production\") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {\n return filterSingleRoot(singleRoot.children);\n }\n }\n }\n } else {\n return;\n }\n }\n return singleRoot;\n}\nconst getFunctionalFallthrough = (attrs) => {\n let res;\n for (const key in attrs) {\n if (key === \"class\" || key === \"style\" || isOn(key)) {\n (res || (res = {}))[key] = attrs[key];\n }\n }\n return res;\n};\nconst filterModelListeners = (attrs, props) => {\n const res = {};\n for (const key in attrs) {\n if (!isModelListener(key) || !(key.slice(9) in props)) {\n res[key] = attrs[key];\n }\n }\n return res;\n};\nconst isElementRoot = (vnode) => {\n return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;\n};\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n const { props: prevProps, children: prevChildren, component } = prevVNode;\n const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n const emits = component.emitsOptions;\n if (!!(process.env.NODE_ENV !== \"production\") && (prevChildren || nextChildren) && isHmrUpdating) {\n return true;\n }\n if (nextVNode.dirs || nextVNode.transition) {\n return true;\n }\n if (optimized && patchFlag >= 0) {\n if (patchFlag & 1024) {\n return true;\n }\n if (patchFlag & 16) {\n if (!prevProps) {\n return !!nextProps;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n } else if (patchFlag & 8) {\n const dynamicProps = nextVNode.dynamicProps;\n for (let i = 0; i < dynamicProps.length; i++) {\n const key = dynamicProps[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {\n return true;\n }\n }\n }\n } else {\n if (prevChildren || nextChildren) {\n if (!nextChildren || !nextChildren.$stable) {\n return true;\n }\n }\n if (prevProps === nextProps) {\n return false;\n }\n if (!prevProps) {\n return !!nextProps;\n }\n if (!nextProps) {\n return true;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n }\n return false;\n}\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n const nextKeys = Object.keys(nextProps);\n if (nextKeys.length !== Object.keys(prevProps).length) {\n return true;\n }\n for (let i = 0; i < nextKeys.length; i++) {\n const key = nextKeys[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {\n return true;\n }\n }\n return false;\n}\nfunction updateHOCHostEl({ vnode, parent }, el) {\n while (parent) {\n const root = parent.subTree;\n if (root.suspense && root.suspense.activeBranch === vnode) {\n root.el = vnode.el;\n }\n if (root === vnode) {\n (vnode = parent.vnode).el = el;\n parent = parent.parent;\n } else {\n break;\n }\n }\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDynamicComponent(component) {\n if (isString(component)) {\n return resolveAsset(COMPONENTS, component, false) || component;\n } else {\n return component || NULL_DYNAMIC_COMPONENT;\n }\n}\nfunction resolveDirective(name) {\n return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n const instance = currentRenderingInstance || currentInstance;\n if (instance) {\n const Component = instance.type;\n if (type === COMPONENTS) {\n const selfName = getComponentName(\n Component,\n false\n );\n if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n return Component;\n }\n }\n const res = (\n // local registration\n // check instance[type] first which is resolved for options API\n resolve(instance[type] || Component[type], name) || // global registration\n resolve(instance.appContext[type], name)\n );\n if (!res && maybeSelfReference) {\n return Component;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n }\n return res;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n );\n }\n}\nfunction resolve(registry, name) {\n return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nconst isSuspense = (type) => type.__isSuspense;\nlet suspenseId = 0;\nconst SuspenseImpl = {\n name: \"Suspense\",\n // In order to make Suspense tree-shakable, we need to avoid importing it\n // directly in the renderer. The renderer checks for the __isSuspense flag\n // on a vnode's type and calls the `process` method, passing in renderer\n // internals.\n __isSuspense: true,\n process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n if (n1 == null) {\n mountSuspense(\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n } else {\n if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {\n n2.suspense = n1.suspense;\n n2.suspense.vnode = n2;\n n2.el = n1.el;\n return;\n }\n patchSuspense(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n }\n },\n hydrate: hydrateSuspense,\n create: createSuspenseBoundary,\n normalize: normalizeSuspenseChildren\n};\nconst Suspense = SuspenseImpl ;\nfunction triggerEvent(vnode, name) {\n const eventListener = vnode.props && vnode.props[name];\n if (isFunction(eventListener)) {\n eventListener();\n }\n}\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n const {\n p: patch,\n o: { createElement }\n } = rendererInternals;\n const hiddenContainer = createElement(\"div\");\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n container,\n hiddenContainer,\n anchor,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n patch(\n null,\n suspense.pendingBranch = vnode.ssContent,\n hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds\n );\n if (suspense.deps > 0) {\n triggerEvent(vnode, \"onPending\");\n triggerEvent(vnode, \"onFallback\");\n patch(\n null,\n vnode.ssFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n namespace,\n slotScopeIds\n );\n setActiveBranch(suspense, vnode.ssFallback);\n } else {\n suspense.resolve(false, true);\n }\n}\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\n const suspense = n2.suspense = n1.suspense;\n suspense.vnode = n2;\n n2.el = n1.el;\n const newBranch = n2.ssContent;\n const newFallback = n2.ssFallback;\n const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\n if (pendingBranch) {\n suspense.pendingBranch = newBranch;\n if (isSameVNodeType(newBranch, pendingBranch)) {\n patch(\n pendingBranch,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else if (isInFallback) {\n if (!isHydrating) {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n namespace,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n }\n } else {\n suspense.pendingId = suspenseId++;\n if (isHydrating) {\n suspense.isHydrating = false;\n suspense.activeBranch = pendingBranch;\n } else {\n unmount(pendingBranch, parentComponent, suspense);\n }\n suspense.deps = 0;\n suspense.effects.length = 0;\n suspense.hiddenContainer = createElement(\"div\");\n if (isInFallback) {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n namespace,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n suspense.resolve(true);\n } else {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n }\n }\n }\n } else {\n if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newBranch);\n } else {\n triggerEvent(n2, \"onPending\");\n suspense.pendingBranch = newBranch;\n if (newBranch.shapeFlag & 512) {\n suspense.pendingId = newBranch.component.suspenseId;\n } else {\n suspense.pendingId = suspenseId++;\n }\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n const { timeout, pendingId } = suspense;\n if (timeout > 0) {\n setTimeout(() => {\n if (suspense.pendingId === pendingId) {\n suspense.fallback(newFallback);\n }\n }, timeout);\n } else if (timeout === 0) {\n suspense.fallback(newFallback);\n }\n }\n }\n }\n}\nlet hasWarned = false;\nfunction createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\n if (!!(process.env.NODE_ENV !== \"production\") && true && !hasWarned) {\n hasWarned = true;\n console[console.info ? \"info\" : \"log\"](\n ` is an experimental feature and its API will likely change.`\n );\n }\n const {\n p: patch,\n m: move,\n um: unmount,\n n: next,\n o: { parentNode, remove }\n } = rendererInternals;\n let parentSuspenseId;\n const isSuspensible = isVNodeSuspensible(vnode);\n if (isSuspensible) {\n if (parentSuspense && parentSuspense.pendingBranch) {\n parentSuspenseId = parentSuspense.pendingId;\n parentSuspense.deps++;\n }\n }\n const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n assertNumber(timeout, `Suspense timeout`);\n }\n const initialAnchor = anchor;\n const suspense = {\n vnode,\n parent: parentSuspense,\n parentComponent,\n namespace,\n container,\n hiddenContainer,\n deps: 0,\n pendingId: suspenseId++,\n timeout: typeof timeout === \"number\" ? timeout : -1,\n activeBranch: null,\n pendingBranch: null,\n isInFallback: !isHydrating,\n isHydrating,\n isUnmounted: false,\n effects: [],\n resolve(resume = false, sync = false) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (!resume && !suspense.pendingBranch) {\n throw new Error(\n `suspense.resolve() is called without a pending branch.`\n );\n }\n if (suspense.isUnmounted) {\n throw new Error(\n `suspense.resolve() is called on an already unmounted suspense boundary.`\n );\n }\n }\n const {\n vnode: vnode2,\n activeBranch,\n pendingBranch,\n pendingId,\n effects,\n parentComponent: parentComponent2,\n container: container2\n } = suspense;\n let delayEnter = false;\n if (suspense.isHydrating) {\n suspense.isHydrating = false;\n } else if (!resume) {\n delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = () => {\n if (pendingId === suspense.pendingId) {\n move(\n pendingBranch,\n container2,\n anchor === initialAnchor ? next(activeBranch) : anchor,\n 0\n );\n queuePostFlushCb(effects);\n }\n };\n }\n if (activeBranch) {\n if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {\n anchor = next(activeBranch);\n }\n unmount(activeBranch, parentComponent2, suspense, true);\n }\n if (!delayEnter) {\n move(pendingBranch, container2, anchor, 0);\n }\n }\n setActiveBranch(suspense, pendingBranch);\n suspense.pendingBranch = null;\n suspense.isInFallback = false;\n let parent = suspense.parent;\n let hasUnresolvedAncestor = false;\n while (parent) {\n if (parent.pendingBranch) {\n parent.effects.push(...effects);\n hasUnresolvedAncestor = true;\n break;\n }\n parent = parent.parent;\n }\n if (!hasUnresolvedAncestor && !delayEnter) {\n queuePostFlushCb(effects);\n }\n suspense.effects = [];\n if (isSuspensible) {\n if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {\n parentSuspense.deps--;\n if (parentSuspense.deps === 0 && !sync) {\n parentSuspense.resolve();\n }\n }\n }\n triggerEvent(vnode2, \"onResolve\");\n },\n fallback(fallbackVNode) {\n if (!suspense.pendingBranch) {\n return;\n }\n const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;\n triggerEvent(vnode2, \"onFallback\");\n const anchor2 = next(activeBranch);\n const mountFallback = () => {\n if (!suspense.isInFallback) {\n return;\n }\n patch(\n null,\n fallbackVNode,\n container2,\n anchor2,\n parentComponent2,\n null,\n // fallback tree will not have suspense context\n namespace2,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, fallbackVNode);\n };\n const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = mountFallback;\n }\n suspense.isInFallback = true;\n unmount(\n activeBranch,\n parentComponent2,\n null,\n // no suspense so unmount hooks fire now\n true\n // shouldRemove\n );\n if (!delayEnter) {\n mountFallback();\n }\n },\n move(container2, anchor2, type) {\n suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);\n suspense.container = container2;\n },\n next() {\n return suspense.activeBranch && next(suspense.activeBranch);\n },\n registerDep(instance, setupRenderEffect) {\n const isInPendingSuspense = !!suspense.pendingBranch;\n if (isInPendingSuspense) {\n suspense.deps++;\n }\n const hydratedEl = instance.vnode.el;\n instance.asyncDep.catch((err) => {\n handleError(err, instance, 0);\n }).then((asyncSetupResult) => {\n if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {\n return;\n }\n instance.asyncResolved = true;\n const { vnode: vnode2 } = instance;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n pushWarningContext(vnode2);\n }\n handleSetupResult(instance, asyncSetupResult, false);\n if (hydratedEl) {\n vnode2.el = hydratedEl;\n }\n const placeholder = !hydratedEl && instance.subTree.el;\n setupRenderEffect(\n instance,\n vnode2,\n // component may have been moved before resolve.\n // if this is not a hydration, instance.subTree will be the comment\n // placeholder.\n parentNode(hydratedEl || instance.subTree.el),\n // anchor will not be used if this is hydration, so only need to\n // consider the comment placeholder case.\n hydratedEl ? null : next(instance.subTree),\n suspense,\n namespace,\n optimized\n );\n if (placeholder) {\n remove(placeholder);\n }\n updateHOCHostEl(instance, vnode2.el);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n popWarningContext();\n }\n if (isInPendingSuspense && --suspense.deps === 0) {\n suspense.resolve();\n }\n });\n },\n unmount(parentSuspense2, doRemove) {\n suspense.isUnmounted = true;\n if (suspense.activeBranch) {\n unmount(\n suspense.activeBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n if (suspense.pendingBranch) {\n unmount(\n suspense.pendingBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n }\n };\n return suspense;\n}\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n node.parentNode,\n // eslint-disable-next-line no-restricted-globals\n document.createElement(\"div\"),\n null,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals,\n true\n );\n const result = hydrateNode(\n node,\n suspense.pendingBranch = vnode.ssContent,\n parentComponent,\n suspense,\n slotScopeIds,\n optimized\n );\n if (suspense.deps === 0) {\n suspense.resolve(false, true);\n }\n return result;\n}\nfunction normalizeSuspenseChildren(vnode) {\n const { shapeFlag, children } = vnode;\n const isSlotChildren = shapeFlag & 32;\n vnode.ssContent = normalizeSuspenseSlot(\n isSlotChildren ? children.default : children\n );\n vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);\n}\nfunction normalizeSuspenseSlot(s) {\n let block;\n if (isFunction(s)) {\n const trackBlock = isBlockTreeEnabled && s._c;\n if (trackBlock) {\n s._d = false;\n openBlock();\n }\n s = s();\n if (trackBlock) {\n s._d = true;\n block = currentBlock;\n closeBlock();\n }\n }\n if (isArray(s)) {\n const singleChild = filterSingleRoot(s);\n if (!!(process.env.NODE_ENV !== \"production\") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {\n warn$1(` slots expect a single root node.`);\n }\n s = singleChild;\n }\n s = normalizeVNode(s);\n if (block && !s.dynamicChildren) {\n s.dynamicChildren = block.filter((c) => c !== s);\n }\n return s;\n}\nfunction queueEffectWithSuspense(fn, suspense) {\n if (suspense && suspense.pendingBranch) {\n if (isArray(fn)) {\n suspense.effects.push(...fn);\n } else {\n suspense.effects.push(fn);\n }\n } else {\n queuePostFlushCb(fn);\n }\n}\nfunction setActiveBranch(suspense, branch) {\n suspense.activeBranch = branch;\n const { vnode, parentComponent } = suspense;\n let el = branch.el;\n while (!el && branch.component) {\n branch = branch.component.subTree;\n el = branch.el;\n }\n vnode.el = el;\n if (parentComponent && parentComponent.subTree === vnode) {\n parentComponent.vnode.el = el;\n updateHOCHostEl(parentComponent, el);\n }\n}\nfunction isVNodeSuspensible(vnode) {\n const suspensible = vnode.props && vnode.props.suspensible;\n return suspensible != null && suspensible !== false;\n}\n\nconst ssrContextKey = Symbol.for(\"v-scx\");\nconst useSSRContext = () => {\n {\n const ctx = inject(ssrContextKey);\n if (!ctx) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(\n `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`\n );\n }\n return ctx;\n }\n};\n\nfunction watchEffect(effect, options) {\n return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\n );\n}\nfunction watchSyncEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\n );\n}\nconst INITIAL_WATCHER_VALUE = {};\nfunction watch(source, cb, options) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\n warn$1(\n `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\n );\n }\n return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, {\n immediate,\n deep,\n flush,\n once,\n onTrack,\n onTrigger\n} = EMPTY_OBJ) {\n if (cb && once) {\n const _cb = cb;\n cb = (...args) => {\n _cb(...args);\n unwatch();\n };\n }\n if (!!(process.env.NODE_ENV !== \"production\") && deep !== void 0 && typeof deep === \"number\") {\n warn$1(\n `watch() \"deep\" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`\n );\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\n if (immediate !== void 0) {\n warn$1(\n `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (deep !== void 0) {\n warn$1(\n `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (once !== void 0) {\n warn$1(\n `watch() \"once\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n }\n const warnInvalidSource = (s) => {\n warn$1(\n `Invalid watch source: `,\n s,\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n );\n };\n const instance = currentInstance;\n const reactiveGetter = (source2) => deep === true ? source2 : (\n // for deep: false, only traverse root-level properties\n traverse(source2, deep === false ? 1 : void 0)\n );\n let getter;\n let forceTrigger = false;\n let isMultiSource = false;\n if (isRef(source)) {\n getter = () => source.value;\n forceTrigger = isShallow(source);\n } else if (isReactive(source)) {\n getter = () => reactiveGetter(source);\n forceTrigger = true;\n } else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some((s) => isReactive(s) || isShallow(s));\n getter = () => source.map((s) => {\n if (isRef(s)) {\n return s.value;\n } else if (isReactive(s)) {\n return reactiveGetter(s);\n } else if (isFunction(s)) {\n return callWithErrorHandling(s, instance, 2);\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = () => callWithErrorHandling(source, instance, 2);\n } else {\n getter = () => {\n if (cleanup) {\n cleanup();\n }\n return callWithAsyncErrorHandling(\n source,\n instance,\n 3,\n [onCleanup]\n );\n };\n }\n } else {\n getter = NOOP;\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n }\n if (cb && deep) {\n const baseGetter = getter;\n getter = () => traverse(baseGetter());\n }\n let cleanup;\n let onCleanup = (fn) => {\n cleanup = effect.onStop = () => {\n callWithErrorHandling(fn, instance, 4);\n cleanup = effect.onStop = void 0;\n };\n };\n let ssrCleanup;\n if (isInSSRComponentSetup) {\n onCleanup = NOOP;\n if (!cb) {\n getter();\n } else if (immediate) {\n callWithAsyncErrorHandling(cb, instance, 3, [\n getter(),\n isMultiSource ? [] : void 0,\n onCleanup\n ]);\n }\n if (flush === \"sync\") {\n const ctx = useSSRContext();\n ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n } else {\n return NOOP;\n }\n }\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = () => {\n if (!effect.active || !effect.dirty) {\n return;\n }\n if (cb) {\n const newValue = effect.run();\n if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {\n if (cleanup) {\n cleanup();\n }\n callWithAsyncErrorHandling(cb, instance, 3, [\n newValue,\n // pass undefined as the old value when it's changed for the first time\n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n onCleanup\n ]);\n oldValue = newValue;\n }\n } else {\n effect.run();\n }\n };\n job.allowRecurse = !!cb;\n let scheduler;\n if (flush === \"sync\") {\n scheduler = job;\n } else if (flush === \"post\") {\n scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);\n } else {\n job.pre = true;\n if (instance)\n job.id = instance.uid;\n scheduler = () => queueJob(job);\n }\n const effect = new ReactiveEffect(getter, NOOP, scheduler);\n const scope = getCurrentScope();\n const unwatch = () => {\n effect.stop();\n if (scope) {\n remove(scope.effects, effect);\n }\n };\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = onTrack;\n effect.onTrigger = onTrigger;\n }\n if (cb) {\n if (immediate) {\n job();\n } else {\n oldValue = effect.run();\n }\n } else if (flush === \"post\") {\n queuePostRenderEffect(\n effect.run.bind(effect),\n instance && instance.suspense\n );\n } else {\n effect.run();\n }\n if (ssrCleanup)\n ssrCleanup.push(unwatch);\n return unwatch;\n}\nfunction instanceWatch(source, value, options) {\n const publicThis = this.proxy;\n const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n let cb;\n if (isFunction(value)) {\n cb = value;\n } else {\n cb = value.handler;\n options = value;\n }\n const reset = setCurrentInstance(this);\n const res = doWatch(getter, cb.bind(publicThis), options);\n reset();\n return res;\n}\nfunction createPathGetter(ctx, path) {\n const segments = path.split(\".\");\n return () => {\n let cur = ctx;\n for (let i = 0; i < segments.length && cur; i++) {\n cur = cur[segments[i]];\n }\n return cur;\n };\n}\nfunction traverse(value, depth = Infinity, seen) {\n if (depth <= 0 || !isObject(value) || value[\"__v_skip\"]) {\n return value;\n }\n seen = seen || /* @__PURE__ */ new Set();\n if (seen.has(value)) {\n return value;\n }\n seen.add(value);\n depth--;\n if (isRef(value)) {\n traverse(value.value, depth, seen);\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n traverse(value[i], depth, seen);\n }\n } else if (isSet(value) || isMap(value)) {\n value.forEach((v) => {\n traverse(v, depth, seen);\n });\n } else if (isPlainObject(value)) {\n for (const key in value) {\n traverse(value[key], depth, seen);\n }\n }\n return value;\n}\n\nfunction validateDirectiveName(name) {\n if (isBuiltInDirective(name)) {\n warn$1(\"Do not use built-in directive ids as custom directive id: \" + name);\n }\n}\nfunction withDirectives(vnode, directives) {\n if (currentRenderingInstance === null) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`withDirectives can only be used inside render functions.`);\n return vnode;\n }\n const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;\n const bindings = vnode.dirs || (vnode.dirs = []);\n for (let i = 0; i < directives.length; i++) {\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n if (dir) {\n if (isFunction(dir)) {\n dir = {\n mounted: dir,\n updated: dir\n };\n }\n if (dir.deep) {\n traverse(value);\n }\n bindings.push({\n dir,\n instance,\n value,\n oldValue: void 0,\n arg,\n modifiers\n });\n }\n }\n return vnode;\n}\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n const bindings = vnode.dirs;\n const oldBindings = prevVNode && prevVNode.dirs;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n if (oldBindings) {\n binding.oldValue = oldBindings[i].value;\n }\n let hook = binding.dir[name];\n if (hook) {\n pauseTracking();\n callWithAsyncErrorHandling(hook, instance, 8, [\n vnode.el,\n binding,\n vnode,\n prevVNode\n ]);\n resetTracking();\n }\n }\n}\n\nconst leaveCbKey = Symbol(\"_leaveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nfunction useTransitionState() {\n const state = {\n isMounted: false,\n isLeaving: false,\n isUnmounting: false,\n leavingVNodes: /* @__PURE__ */ new Map()\n };\n onMounted(() => {\n state.isMounted = true;\n });\n onBeforeUnmount(() => {\n state.isUnmounting = true;\n });\n return state;\n}\nconst TransitionHookValidator = [Function, Array];\nconst BaseTransitionPropsValidators = {\n mode: String,\n appear: Boolean,\n persisted: Boolean,\n // enter\n onBeforeEnter: TransitionHookValidator,\n onEnter: TransitionHookValidator,\n onAfterEnter: TransitionHookValidator,\n onEnterCancelled: TransitionHookValidator,\n // leave\n onBeforeLeave: TransitionHookValidator,\n onLeave: TransitionHookValidator,\n onAfterLeave: TransitionHookValidator,\n onLeaveCancelled: TransitionHookValidator,\n // appear\n onBeforeAppear: TransitionHookValidator,\n onAppear: TransitionHookValidator,\n onAfterAppear: TransitionHookValidator,\n onAppearCancelled: TransitionHookValidator\n};\nconst BaseTransitionImpl = {\n name: `BaseTransition`,\n props: BaseTransitionPropsValidators,\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const state = useTransitionState();\n return () => {\n const children = slots.default && getTransitionRawChildren(slots.default(), true);\n if (!children || !children.length) {\n return;\n }\n let child = children[0];\n if (children.length > 1) {\n let hasFound = false;\n for (const c of children) {\n if (c.type !== Comment) {\n if (!!(process.env.NODE_ENV !== \"production\") && hasFound) {\n warn$1(\n \" can only be used on a single element or component. Use for lists.\"\n );\n break;\n }\n child = c;\n hasFound = true;\n if (!!!(process.env.NODE_ENV !== \"production\"))\n break;\n }\n }\n }\n const rawProps = toRaw(props);\n const { mode } = rawProps;\n if (!!(process.env.NODE_ENV !== \"production\") && mode && mode !== \"in-out\" && mode !== \"out-in\" && mode !== \"default\") {\n warn$1(`invalid mode: ${mode}`);\n }\n if (state.isLeaving) {\n return emptyPlaceholder(child);\n }\n const innerChild = getKeepAliveChild(child);\n if (!innerChild) {\n return emptyPlaceholder(child);\n }\n const enterHooks = resolveTransitionHooks(\n innerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(innerChild, enterHooks);\n const oldChild = instance.subTree;\n const oldInnerChild = oldChild && getKeepAliveChild(oldChild);\n if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {\n const leavingHooks = resolveTransitionHooks(\n oldInnerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(oldInnerChild, leavingHooks);\n if (mode === \"out-in\" && innerChild.type !== Comment) {\n state.isLeaving = true;\n leavingHooks.afterLeave = () => {\n state.isLeaving = false;\n if (instance.update.active !== false) {\n instance.effect.dirty = true;\n instance.update();\n }\n };\n return emptyPlaceholder(child);\n } else if (mode === \"in-out\" && innerChild.type !== Comment) {\n leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\n const leavingVNodesCache = getLeavingNodesForType(\n state,\n oldInnerChild\n );\n leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\n el[leaveCbKey] = () => {\n earlyRemove();\n el[leaveCbKey] = void 0;\n delete enterHooks.delayedLeave;\n };\n enterHooks.delayedLeave = delayedLeave;\n };\n }\n }\n return child;\n };\n }\n};\nconst BaseTransition = BaseTransitionImpl;\nfunction getLeavingNodesForType(state, vnode) {\n const { leavingVNodes } = state;\n let leavingVNodesCache = leavingVNodes.get(vnode.type);\n if (!leavingVNodesCache) {\n leavingVNodesCache = /* @__PURE__ */ Object.create(null);\n leavingVNodes.set(vnode.type, leavingVNodesCache);\n }\n return leavingVNodesCache;\n}\nfunction resolveTransitionHooks(vnode, props, state, instance) {\n const {\n appear,\n mode,\n persisted = false,\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n onBeforeAppear,\n onAppear,\n onAfterAppear,\n onAppearCancelled\n } = props;\n const key = String(vnode.key);\n const leavingVNodesCache = getLeavingNodesForType(state, vnode);\n const callHook = (hook, args) => {\n hook && callWithAsyncErrorHandling(\n hook,\n instance,\n 9,\n args\n );\n };\n const callAsyncHook = (hook, args) => {\n const done = args[1];\n callHook(hook, args);\n if (isArray(hook)) {\n if (hook.every((hook2) => hook2.length <= 1))\n done();\n } else if (hook.length <= 1) {\n done();\n }\n };\n const hooks = {\n mode,\n persisted,\n beforeEnter(el) {\n let hook = onBeforeEnter;\n if (!state.isMounted) {\n if (appear) {\n hook = onBeforeAppear || onBeforeEnter;\n } else {\n return;\n }\n }\n if (el[leaveCbKey]) {\n el[leaveCbKey](\n true\n /* cancelled */\n );\n }\n const leavingVNode = leavingVNodesCache[key];\n if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {\n leavingVNode.el[leaveCbKey]();\n }\n callHook(hook, [el]);\n },\n enter(el) {\n let hook = onEnter;\n let afterHook = onAfterEnter;\n let cancelHook = onEnterCancelled;\n if (!state.isMounted) {\n if (appear) {\n hook = onAppear || onEnter;\n afterHook = onAfterAppear || onAfterEnter;\n cancelHook = onAppearCancelled || onEnterCancelled;\n } else {\n return;\n }\n }\n let called = false;\n const done = el[enterCbKey] = (cancelled) => {\n if (called)\n return;\n called = true;\n if (cancelled) {\n callHook(cancelHook, [el]);\n } else {\n callHook(afterHook, [el]);\n }\n if (hooks.delayedLeave) {\n hooks.delayedLeave();\n }\n el[enterCbKey] = void 0;\n };\n if (hook) {\n callAsyncHook(hook, [el, done]);\n } else {\n done();\n }\n },\n leave(el, remove) {\n const key2 = String(vnode.key);\n if (el[enterCbKey]) {\n el[enterCbKey](\n true\n /* cancelled */\n );\n }\n if (state.isUnmounting) {\n return remove();\n }\n callHook(onBeforeLeave, [el]);\n let called = false;\n const done = el[leaveCbKey] = (cancelled) => {\n if (called)\n return;\n called = true;\n remove();\n if (cancelled) {\n callHook(onLeaveCancelled, [el]);\n } else {\n callHook(onAfterLeave, [el]);\n }\n el[leaveCbKey] = void 0;\n if (leavingVNodesCache[key2] === vnode) {\n delete leavingVNodesCache[key2];\n }\n };\n leavingVNodesCache[key2] = vnode;\n if (onLeave) {\n callAsyncHook(onLeave, [el, done]);\n } else {\n done();\n }\n },\n clone(vnode2) {\n return resolveTransitionHooks(vnode2, props, state, instance);\n }\n };\n return hooks;\n}\nfunction emptyPlaceholder(vnode) {\n if (isKeepAlive(vnode)) {\n vnode = cloneVNode(vnode);\n vnode.children = null;\n return vnode;\n }\n}\nfunction getKeepAliveChild(vnode) {\n if (!isKeepAlive(vnode)) {\n return vnode;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && vnode.component) {\n return vnode.component.subTree;\n }\n const { shapeFlag, children } = vnode;\n if (children) {\n if (shapeFlag & 16) {\n return children[0];\n }\n if (shapeFlag & 32 && isFunction(children.default)) {\n return children.default();\n }\n }\n}\nfunction setTransitionHooks(vnode, hooks) {\n if (vnode.shapeFlag & 6 && vnode.component) {\n setTransitionHooks(vnode.component.subTree, hooks);\n } else if (vnode.shapeFlag & 128) {\n vnode.ssContent.transition = hooks.clone(vnode.ssContent);\n vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n } else {\n vnode.transition = hooks;\n }\n}\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\n let ret = [];\n let keyedFragmentCount = 0;\n for (let i = 0; i < children.length; i++) {\n let child = children[i];\n const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);\n if (child.type === Fragment) {\n if (child.patchFlag & 128)\n keyedFragmentCount++;\n ret = ret.concat(\n getTransitionRawChildren(child.children, keepComment, key)\n );\n } else if (keepComment || child.type !== Comment) {\n ret.push(key != null ? cloneVNode(child, { key }) : child);\n }\n }\n if (keyedFragmentCount > 1) {\n for (let i = 0; i < ret.length; i++) {\n ret[i].patchFlag = -2;\n }\n }\n return ret;\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineComponent(options, extraOptions) {\n return isFunction(options) ? (\n // #8326: extend call and options.name access are considered side-effects\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n ) : options;\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineAsyncComponent(source) {\n if (isFunction(source)) {\n source = { loader: source };\n }\n const {\n loader,\n loadingComponent,\n errorComponent,\n delay = 200,\n timeout,\n // undefined = never times out\n suspensible = true,\n onError: userOnError\n } = source;\n let pendingRequest = null;\n let resolvedComp;\n let retries = 0;\n const retry = () => {\n retries++;\n pendingRequest = null;\n return load();\n };\n const load = () => {\n let thisRequest;\n return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {\n err = err instanceof Error ? err : new Error(String(err));\n if (userOnError) {\n return new Promise((resolve, reject) => {\n const userRetry = () => resolve(retry());\n const userFail = () => reject(err);\n userOnError(err, userRetry, userFail, retries + 1);\n });\n } else {\n throw err;\n }\n }).then((comp) => {\n if (thisRequest !== pendingRequest && pendingRequest) {\n return pendingRequest;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !comp) {\n warn$1(\n `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`\n );\n }\n if (comp && (comp.__esModule || comp[Symbol.toStringTag] === \"Module\")) {\n comp = comp.default;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && comp && !isObject(comp) && !isFunction(comp)) {\n throw new Error(`Invalid async component load result: ${comp}`);\n }\n resolvedComp = comp;\n return comp;\n }));\n };\n return defineComponent({\n name: \"AsyncComponentWrapper\",\n __asyncLoader: load,\n get __asyncResolved() {\n return resolvedComp;\n },\n setup() {\n const instance = currentInstance;\n if (resolvedComp) {\n return () => createInnerComp(resolvedComp, instance);\n }\n const onError = (err) => {\n pendingRequest = null;\n handleError(\n err,\n instance,\n 13,\n !errorComponent\n );\n };\n if (suspensible && instance.suspense || isInSSRComponentSetup) {\n return load().then((comp) => {\n return () => createInnerComp(comp, instance);\n }).catch((err) => {\n onError(err);\n return () => errorComponent ? createVNode(errorComponent, {\n error: err\n }) : null;\n });\n }\n const loaded = ref(false);\n const error = ref();\n const delayed = ref(!!delay);\n if (delay) {\n setTimeout(() => {\n delayed.value = false;\n }, delay);\n }\n if (timeout != null) {\n setTimeout(() => {\n if (!loaded.value && !error.value) {\n const err = new Error(\n `Async component timed out after ${timeout}ms.`\n );\n onError(err);\n error.value = err;\n }\n }, timeout);\n }\n load().then(() => {\n loaded.value = true;\n if (instance.parent && isKeepAlive(instance.parent.vnode)) {\n instance.parent.effect.dirty = true;\n queueJob(instance.parent.update);\n }\n }).catch((err) => {\n onError(err);\n error.value = err;\n });\n return () => {\n if (loaded.value && resolvedComp) {\n return createInnerComp(resolvedComp, instance);\n } else if (error.value && errorComponent) {\n return createVNode(errorComponent, {\n error: error.value\n });\n } else if (loadingComponent && !delayed.value) {\n return createVNode(loadingComponent);\n }\n };\n }\n });\n}\nfunction createInnerComp(comp, parent) {\n const { ref: ref2, props, children, ce } = parent.vnode;\n const vnode = createVNode(comp, props, children);\n vnode.ref = ref2;\n vnode.ce = ce;\n delete parent.vnode.ce;\n return vnode;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nconst KeepAliveImpl = {\n name: `KeepAlive`,\n // Marker for special handling inside the renderer. We are not using a ===\n // check directly on KeepAlive in the renderer, because importing it directly\n // would prevent it from being tree-shaken.\n __isKeepAlive: true,\n props: {\n include: [String, RegExp, Array],\n exclude: [String, RegExp, Array],\n max: [String, Number]\n },\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const sharedContext = instance.ctx;\n if (!sharedContext.renderer) {\n return () => {\n const children = slots.default && slots.default();\n return children && children.length === 1 ? children[0] : children;\n };\n }\n const cache = /* @__PURE__ */ new Map();\n const keys = /* @__PURE__ */ new Set();\n let current = null;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n instance.__v_cache = cache;\n }\n const parentSuspense = instance.suspense;\n const {\n renderer: {\n p: patch,\n m: move,\n um: _unmount,\n o: { createElement }\n }\n } = sharedContext;\n const storageContainer = createElement(\"div\");\n sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {\n const instance2 = vnode.component;\n move(vnode, container, anchor, 0, parentSuspense);\n patch(\n instance2.vnode,\n vnode,\n container,\n anchor,\n instance2,\n parentSuspense,\n namespace,\n vnode.slotScopeIds,\n optimized\n );\n queuePostRenderEffect(() => {\n instance2.isDeactivated = false;\n if (instance2.a) {\n invokeArrayFns(instance2.a);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n sharedContext.deactivate = (vnode) => {\n const instance2 = vnode.component;\n move(vnode, storageContainer, null, 1, parentSuspense);\n queuePostRenderEffect(() => {\n if (instance2.da) {\n invokeArrayFns(instance2.da);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n instance2.isDeactivated = true;\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n function unmount(vnode) {\n resetShapeFlag(vnode);\n _unmount(vnode, instance, parentSuspense, true);\n }\n function pruneCache(filter) {\n cache.forEach((vnode, key) => {\n const name = getComponentName(vnode.type);\n if (name && (!filter || !filter(name))) {\n pruneCacheEntry(key);\n }\n });\n }\n function pruneCacheEntry(key) {\n const cached = cache.get(key);\n if (!current || !isSameVNodeType(cached, current)) {\n unmount(cached);\n } else if (current) {\n resetShapeFlag(current);\n }\n cache.delete(key);\n keys.delete(key);\n }\n watch(\n () => [props.include, props.exclude],\n ([include, exclude]) => {\n include && pruneCache((name) => matches(include, name));\n exclude && pruneCache((name) => !matches(exclude, name));\n },\n // prune post-render after `current` has been updated\n { flush: \"post\", deep: true }\n );\n let pendingCacheKey = null;\n const cacheSubtree = () => {\n if (pendingCacheKey != null) {\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n }\n };\n onMounted(cacheSubtree);\n onUpdated(cacheSubtree);\n onBeforeUnmount(() => {\n cache.forEach((cached) => {\n const { subTree, suspense } = instance;\n const vnode = getInnerChild(subTree);\n if (cached.type === vnode.type && cached.key === vnode.key) {\n resetShapeFlag(vnode);\n const da = vnode.component.da;\n da && queuePostRenderEffect(da, suspense);\n return;\n }\n unmount(cached);\n });\n });\n return () => {\n pendingCacheKey = null;\n if (!slots.default) {\n return null;\n }\n const children = slots.default();\n const rawVNode = children[0];\n if (children.length > 1) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`KeepAlive should contain exactly one component child.`);\n }\n current = null;\n return children;\n } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {\n current = null;\n return rawVNode;\n }\n let vnode = getInnerChild(rawVNode);\n const comp = vnode.type;\n const name = getComponentName(\n isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp\n );\n const { include, exclude, max } = props;\n if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {\n current = vnode;\n return rawVNode;\n }\n const key = vnode.key == null ? comp : vnode.key;\n const cachedVNode = cache.get(key);\n if (vnode.el) {\n vnode = cloneVNode(vnode);\n if (rawVNode.shapeFlag & 128) {\n rawVNode.ssContent = vnode;\n }\n }\n pendingCacheKey = key;\n if (cachedVNode) {\n vnode.el = cachedVNode.el;\n vnode.component = cachedVNode.component;\n if (vnode.transition) {\n setTransitionHooks(vnode, vnode.transition);\n }\n vnode.shapeFlag |= 512;\n keys.delete(key);\n keys.add(key);\n } else {\n keys.add(key);\n if (max && keys.size > parseInt(max, 10)) {\n pruneCacheEntry(keys.values().next().value);\n }\n }\n vnode.shapeFlag |= 256;\n current = vnode;\n return isSuspense(rawVNode.type) ? rawVNode : vnode;\n };\n }\n};\nconst KeepAlive = KeepAliveImpl;\nfunction matches(pattern, name) {\n if (isArray(pattern)) {\n return pattern.some((p) => matches(p, name));\n } else if (isString(pattern)) {\n return pattern.split(\",\").includes(name);\n } else if (isRegExp(pattern)) {\n return pattern.test(name);\n }\n return false;\n}\nfunction onActivated(hook, target) {\n registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n let current = target;\n while (current) {\n if (current.isDeactivated) {\n return;\n }\n current = current.parent;\n }\n return hook();\n });\n injectHook(type, wrappedHook, target);\n if (target) {\n let current = target.parent;\n while (current && current.parent) {\n if (isKeepAlive(current.parent.vnode)) {\n injectToKeepAliveRoot(wrappedHook, type, target, current);\n }\n current = current.parent;\n }\n }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n const injected = injectHook(\n type,\n hook,\n keepAliveRoot,\n true\n /* prepend */\n );\n onUnmounted(() => {\n remove(keepAliveRoot[type], injected);\n }, target);\n}\nfunction resetShapeFlag(vnode) {\n vnode.shapeFlag &= ~256;\n vnode.shapeFlag &= ~512;\n}\nfunction getInnerChild(vnode) {\n return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n if (target) {\n const hooks = target[type] || (target[type] = []);\n const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n if (target.isUnmounted) {\n return;\n }\n pauseTracking();\n const reset = setCurrentInstance(target);\n const res = callWithAsyncErrorHandling(hook, target, type, args);\n reset();\n resetTracking();\n return res;\n });\n if (prepend) {\n hooks.unshift(wrappedHook);\n } else {\n hooks.push(wrappedHook);\n }\n return wrappedHook;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, \"\"));\n warn$1(\n `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )\n );\n }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => (\n // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\n (!isInSSRComponentSetup || lifecycle === \"sp\") && injectHook(lifecycle, (...args) => hook(...args), target)\n);\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\"bu\");\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\"bum\");\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\"sp\");\nconst onRenderTriggered = createHook(\n \"rtg\"\n);\nconst onRenderTracked = createHook(\n \"rtc\"\n);\nfunction onErrorCaptured(hook, target = currentInstance) {\n injectHook(\"ec\", hook, target);\n}\n\nfunction renderList(source, renderItem, cache, index) {\n let ret;\n const cached = cache && cache[index];\n if (isArray(source) || isString(source)) {\n ret = new Array(source.length);\n for (let i = 0, l = source.length; i < l; i++) {\n ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);\n }\n } else if (typeof source === \"number\") {\n if (!!(process.env.NODE_ENV !== \"production\") && !Number.isInteger(source)) {\n warn$1(`The v-for range expect an integer value but got ${source}.`);\n }\n ret = new Array(source);\n for (let i = 0; i < source; i++) {\n ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n }\n } else if (isObject(source)) {\n if (source[Symbol.iterator]) {\n ret = Array.from(\n source,\n (item, i) => renderItem(item, i, void 0, cached && cached[i])\n );\n } else {\n const keys = Object.keys(source);\n ret = new Array(keys.length);\n for (let i = 0, l = keys.length; i < l; i++) {\n const key = keys[i];\n ret[i] = renderItem(source[key], key, i, cached && cached[i]);\n }\n }\n } else {\n ret = [];\n }\n if (cache) {\n cache[index] = ret;\n }\n return ret;\n}\n\nfunction createSlots(slots, dynamicSlots) {\n for (let i = 0; i < dynamicSlots.length; i++) {\n const slot = dynamicSlots[i];\n if (isArray(slot)) {\n for (let j = 0; j < slot.length; j++) {\n slots[slot[j].name] = slot[j].fn;\n }\n } else if (slot) {\n slots[slot.name] = slot.key ? (...args) => {\n const res = slot.fn(...args);\n if (res)\n res.key = slot.key;\n return res;\n } : slot.fn;\n }\n }\n return slots;\n}\n\nfunction renderSlot(slots, name, props = {}, fallback, noSlotted) {\n if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {\n if (name !== \"default\")\n props.name = name;\n return createVNode(\"slot\", props, fallback && fallback());\n }\n let slot = slots[name];\n if (!!(process.env.NODE_ENV !== \"production\") && slot && slot.length > 1) {\n warn$1(\n `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`\n );\n slot = () => [];\n }\n if (slot && slot._c) {\n slot._d = false;\n }\n openBlock();\n const validSlotContent = slot && ensureValidVNode(slot(props));\n const rendered = createBlock(\n Fragment,\n {\n key: props.key || // slot content array of a dynamic conditional slot may have a branch\n // key attached in the `createSlots` helper, respect that\n validSlotContent && validSlotContent.key || `_${name}`\n },\n validSlotContent || (fallback ? fallback() : []),\n validSlotContent && slots._ === 1 ? 64 : -2\n );\n if (!noSlotted && rendered.scopeId) {\n rendered.slotScopeIds = [rendered.scopeId + \"-s\"];\n }\n if (slot && slot._c) {\n slot._d = true;\n }\n return rendered;\n}\nfunction ensureValidVNode(vnodes) {\n return vnodes.some((child) => {\n if (!isVNode(child))\n return true;\n if (child.type === Comment)\n return false;\n if (child.type === Fragment && !ensureValidVNode(child.children))\n return false;\n return true;\n }) ? vnodes : null;\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n const ret = {};\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n warn$1(`v-on with no argument expects an object value.`);\n return ret;\n }\n for (const key in obj) {\n ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n }\n return ret;\n}\n\nconst getPublicInstance = (i) => {\n if (!i)\n return null;\n if (isStatefulComponent(i))\n return getExposeProxy(i) || i.proxy;\n return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n // Move PURE marker to new line to workaround compiler discarding it\n // due to type annotation\n /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n $: (i) => i,\n $el: (i) => i.vnode.el,\n $data: (i) => i.data,\n $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n $parent: (i) => getPublicInstance(i.parent),\n $root: (i) => getPublicInstance(i.root),\n $emit: (i) => i.emit,\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n $forceUpdate: (i) => i.f || (i.f = () => {\n i.effect.dirty = true;\n queueJob(i.update);\n }),\n $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n get({ _: instance }, key) {\n if (key === \"__v_skip\") {\n return true;\n }\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n return true;\n }\n let normalizedProps;\n if (key[0] !== \"$\") {\n const n = accessCache[key];\n if (n !== void 0) {\n switch (n) {\n case 1 /* SETUP */:\n return setupState[key];\n case 2 /* DATA */:\n return data[key];\n case 4 /* CONTEXT */:\n return ctx[key];\n case 3 /* PROPS */:\n return props[key];\n }\n } else if (hasSetupBinding(setupState, key)) {\n accessCache[key] = 1 /* SETUP */;\n return setupState[key];\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n accessCache[key] = 2 /* DATA */;\n return data[key];\n } else if (\n // only cache other properties when instance has declared (thus stable)\n // props\n (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n ) {\n accessCache[key] = 3 /* PROPS */;\n return props[key];\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n accessCache[key] = 0 /* OTHER */;\n }\n }\n const publicGetter = publicPropertiesMap[key];\n let cssModule, globalProperties;\n if (publicGetter) {\n if (key === \"$attrs\") {\n track(instance.attrs, \"get\", \"\");\n !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n track(instance, \"get\", key);\n }\n return publicGetter(instance);\n } else if (\n // css module (injected by vue-loader)\n (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n ) {\n return cssModule;\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (\n // global properties\n globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n ) {\n {\n return globalProperties[key];\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n // to infinite warning loop\n key.indexOf(\"__v\") !== 0)) {\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n warn$1(\n `Property ${JSON.stringify(\n key\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n );\n } else if (instance === currentRenderingInstance) {\n warn$1(\n `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n );\n }\n }\n },\n set({ _: instance }, key, value) {\n const { data, setupState, ctx } = instance;\n if (hasSetupBinding(setupState, key)) {\n setupState[key] = value;\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n warn$1(`Cannot mutate \r\n\r\n\r\n","export default \"__VITE_ASSET__ONBMDfQG__\"","export default \"__VITE_ASSET__BqwGyU6W__\"","export default \"__VITE_ASSET__DnnwDDBQ__\"","export default \"__VITE_ASSET__Cnf_PeNw__\"","export default \"__VITE_ASSET__CGLXDres__\"","export default \"__VITE_ASSET__C3ATOc2e__\"","export default \"__VITE_ASSET__XY7ti$eu__\"","export default \"__VITE_ASSET__DrmJ8SEo__\"","export default \"__VITE_ASSET__DBjGoxlp__\"","export default \"__VITE_ASSET__Bik6GiFr__\"","import { defineStore } from 'pinia';\r\nimport axios from 'axios';\r\nimport BelgianChocolate from '@/assets/images/flavor-facts/belgian-chocolate.png';\r\nimport ButterPecan from '@/assets/images/flavor-facts/butter-pecan.png';\r\nimport DulceDeLeche from '@/assets/images/flavor-facts/dulce-de-leche.png';\r\nimport Coffee from '@/assets/images/flavor-facts/coffee.png';\r\nimport Chocolate from '@/assets/images/flavor-facts/chocolate.png';\r\nimport MintChip from '@/assets/images/flavor-facts/mint-chip.png';\r\nimport Vanilla from '@/assets/images/flavor-facts/vanilla.png';\r\nimport CookiesAndCream from '@/assets/images/flavor-facts/cookies-and-cream.png';\r\nimport ChocolateChipCookieDough from '@/assets/images/flavor-facts/chocolate-chip-cookie-dough.png';\r\nimport Strawberry from '@/assets/images/flavor-facts/strawberry.png';\r\n\r\nconst toMinutes = 1000 /* milliseconds */ * 60 /* seconds */\r\nconst cacheExpiration = 90 * toMinutes;\r\n\r\nexport const useLearningStore = defineStore('learning', {\r\n state: () => ({\r\n learningData: null as ParsedSyncData | null,\r\n videoMapping: videoMappingInitialData(),\r\n flavorFacts: flavorFactsInitialData(),\r\n }),\r\n actions: {\r\n getLearningData\r\n }\r\n});\r\n\r\nasync function getLearningData(this:ReturnType) {\r\n const responseData = await fetch('/api/sync');\r\n const json = await responseData?.json();\r\n const processed = processSyncData(json);\r\n this.learningData = processed;\r\n \r\n return processed;\r\n}\r\n\r\nexport interface FlavorFact {\r\n name: string,\r\n description?: string,\r\n image: string,\r\n isRbstFree: boolean,\r\n isKosher: boolean,\r\n isGmoFree: boolean,\r\n}\r\n\r\nexport interface SyncData {\r\n Courses: Course[],\r\n Groups: Group[],\r\n Progress: ProgressItem[],\r\n IsGameInstanceSubmitted: boolean,\r\n IsNewHighScore: boolean\r\n}\r\n\r\nexport interface ParsedSyncData extends Omit {\r\n Courses: ParsedCourse[],\r\n Groups: ParsedGroup[],\r\n}\r\n\r\nexport interface ProgressItem {\r\n CourseStepId: number,\r\n UserId: number,\r\n CourseId: number,\r\n Status: number,\r\n CreatedOn: string,\r\n}\r\n\r\nexport interface Group {\r\n RecipeGroupId: number,\r\n Identifier: string,\r\n Title: string,\r\n Order: number,\r\n Disabled: boolean,\r\n ThumbnailIndex: number,\r\n ComingSoon: boolean,\r\n Recipes: Recipe[]\r\n}\r\n\r\nexport interface ParsedGroup extends Omit {\r\n Recipes: ParsedRecipe[];\r\n}\r\n\r\nexport interface Recipe {\r\n RecipeId: number,\r\n RecipeGroupId: number,\r\n Name1: string,\r\n Name2?: string,\r\n Type: string,\r\n Order: number,\r\n Disabled: boolean,\r\n ThumbnailIndex: number,\r\n Instances: RecipeInstance[]\r\n}\r\n\r\nexport interface ParsedRecipe extends Omit {\r\n Instances: ParsedRecipeInstance[];\r\n}\r\n\r\nexport interface RecipeInstance {\r\n RecipeInstanceId: number,\r\n RecipeId: number,\r\n Identifier: string,\r\n JsonData: string,\r\n Order: number,\r\n Disabled: boolean,\r\n ImageFile: RecipeImage,\r\n ImageLastUpdated: string,\r\n ImageFileSize: number\r\n}\r\n\r\nexport interface ParsedRecipeInstance extends Omit {\r\n JsonData: ParsedRecipeJson;\r\n}\r\n\r\nexport interface ParsedRecipeJson {\r\n size?: number,\r\n units?: string,\r\n steps?: string[][],\r\n points?: string,\r\n rewards?: string,\r\n columns?:string,\r\n rows?: string[][][],\r\n}\r\n\r\nexport interface RecipeImage {\r\n OriginalPath: string,\r\n FullPath: string,\r\n}\r\n\r\nexport interface Course {\r\n CourseId: number,\r\n Identifier: string,\r\n JsonData: string,\r\n Order: number,\r\n Steps: CourseStep[],\r\n RecipeGroupIds: number[],\r\n ImageLastUpdated: string,\r\n VideoLastUpdated: string,\r\n ImageFileSize: number,\r\n VideoFileSize: number,\r\n}\r\n\r\nexport interface ParsedCourse extends Omit {\r\n JsonData: CourseJsonData;\r\n}\r\n\r\nexport interface CourseStep {\r\n CourseStepId: number,\r\n CourseId: number,\r\n Type: number,\r\n ExecuteTime: number,\r\n JsonData: string,\r\n DataModel: CourseData,\r\n}\r\n\r\nexport interface CourseJsonData {\r\n title: CourseTitle[],\r\n mobile_title: CourseTitle[],\r\n note: string,\r\n ideas?: string|CourseGrid[],\r\n}\r\n\r\nexport interface CourseTitle {\r\n text: string,\r\n font: string,\r\n size: number,\r\n baseline: number,\r\n maximumLineHeight: number,\r\n}\r\n\r\nexport interface CourseGrid {\r\n columns: string[],\r\n rows: string[][],\r\n}\r\n\r\nexport interface CourseData {\r\n quizzes?: Quiz[],\r\n title?: string,\r\n note?: string,\r\n image?: string,\r\n button?: string,\r\n}\r\n\r\nexport interface Quiz {\r\n title: string,\r\n question: string[],\r\n answers: QuizAnswers[]\r\n}\r\n\r\nexport interface QuizAnswers {\r\n text: string,\r\n correct: boolean,\r\n}\r\n\r\nfunction processSyncData(data:SyncData):ParsedSyncData {\r\n const sortedGroups = data?.Groups?.sort((a,b) => a.Order - b.Order);\r\n return {\r\n ...data,\r\n Courses: data?.Courses?.map((course:Course):ParsedCourse => {\r\n const parsed: CourseJsonData = JSON.parse(course.JsonData);\r\n return {\r\n ...course,\r\n JsonData: parsed\r\n };\r\n }),\r\n Groups: sortedGroups?.map((group:Group):ParsedGroup => {\r\n const sortedRecipes = group?.Recipes?.sort((a,b) => a.Order - b.Order);\r\n return {\r\n ...group,\r\n Recipes: sortedRecipes?.map((recipe:Recipe):ParsedRecipe => {\r\n const sortedInstances = recipe?.Instances?.sort((a,b) => a.Order - b.Order);\r\n return {\r\n ...recipe,\r\n Instances: sortedInstances.map((instance:RecipeInstance):ParsedRecipeInstance => {\r\n return {\r\n ...instance,\r\n JsonData: JSON.parse(instance.JsonData.replace(/'/g, '\"'))\r\n }\r\n })\r\n }\r\n })\r\n }\r\n }),\r\n };\r\n}\r\n\r\nfunction videoMappingInitialData() {\r\n // For Prod only:\r\n return {\r\n 'a8ae09ed-5912-405c-8377-062bb3ed97ac': '951620706', // product history\r\n '41369aec-e2fb-4678-a5e8-0836872c204b': '951694750', // sweetness \r\n 'ebc0fd9a-b3a4-4029-83e0-be8df7b054a6': '1033546665', // loyalty program\r\n 'f92decf7-4861-44e3-bb1c-ce75834a4582': '951694608', // scooping 101\r\n '948446d9-8abb-4d10-b27c-981bb458875a': '951694578', // dazzler\r\n '1a7e64a3-ff85-4a39-9f5c-a429ebffaa6e': '1033546195', // spindle\r\n '21cf4372-b60b-4044-88d4-5aefaf050909': '951694376', // sampling\r\n 'a1996202-00d5-427a-99ff-729546010623': '1033547007', // vitamix\r\n } as Record;\r\n}\r\n\r\nfunction flavorFactsInitialData() {\r\n return {\r\n 'belgian-chocolate': {\r\n name: 'belgian chocolate',\r\n description: 'Our Belgian Chocolate combines rich, velvety chocolate ice cream with finely shaved dark Belgian chocolate for a unique textured experience.',\r\n image: BelgianChocolate,\r\n isRbstFree: true,\r\n isKosher: true,\r\n isGmoFree: false,\r\n },\r\n 'butter-pecan': {\r\n name: 'butter pecan',\r\n description: 'An American classic, revisited with our passion for singular flavor. We blend spoonful after spoonful of buttery toasted pecans with pure, sweet cream to create a delight like no other.',\r\n image: ButterPecan,\r\n isRbstFree: true,\r\n isKosher: true,\r\n isGmoFree: false,\r\n },\r\n 'dulce-de-leche': {\r\n name: 'dulce de leche',\r\n description: 'Häagen-Dazs discovered Dulce de Leche in South America in 1998. Our Dulce is inspired by Latin America’s treasured dessert. Our Ducle de Leche ice cream is a delicious combination of caramel and sweet cream, swirled with thick ribbons of golden caramel.',\r\n image: DulceDeLeche,\r\n isRbstFree: true,\r\n isKosher: true,\r\n isGmoFree: false,\r\n },\r\n 'coffee': {\r\n name: 'coffee',\r\n description: 'We roast the finest Brazilian coffee beans and brew them to perfection to bring out their rich, complex flavor. The combination of the brewed coffee combined with our pure, creamy ice cream awakens the senses. Coffee is one of the original three flavors that began Häagen-Dazs.',\r\n image: Coffee,\r\n isRbstFree: true,\r\n isKosher: true,\r\n isGmoFree: true,\r\n },\r\n 'chocolate': {\r\n name: 'chocolate',\r\n description: 'One of our original three flavors, our chocolate ice cream is rich, creamy, and totally indulgent. We make it from the finest cocoa and pure, sweet cream. Simple and indulgent.',\r\n image: Chocolate,\r\n isRbstFree: true,\r\n isKosher: true,\r\n isGmoFree: true,\r\n },\r\n 'mint-chip': {\r\n name: 'mint chip',\r\n description: 'Our Mint Chip isn’t green because we don’t use any green food coloring. Instead, we infuse mint essence into a smooth, creamy base and then we add rich chocolaty chips for the perfect finish to this refreshingly cool treat.',\r\n image: MintChip,\r\n isRbstFree: true,\r\n isKosher: true,\r\n isGmoFree: false,\r\n },\r\n 'vanilla': {\r\n name: 'vanilla',\r\n description: 'Vanilla is the essence of elegance and sophistication. This marriage of pure, sweet cream and Madagascar vanilla creates the sweet scent of exotic spice.',\r\n image: Vanilla,\r\n isRbstFree: true,\r\n isKosher: true,\r\n isGmoFree: true,\r\n },\r\n 'cookies-and-cream': {\r\n name: 'cookies and cream',\r\n description: 'Our best-selling ice cream, Cookies and Cream satisfies the kid in all of us. Pieces of rich, chocolaty cookies are dunked in delicious, creamy vanilla ice cream to make our Häagen-Dazs Cookies and Cream.',\r\n image: CookiesAndCream,\r\n isRbstFree: true,\r\n isKosher: true,\r\n isGmoFree: false,\r\n },\r\n 'chocolate-chip-cookie-dough': {\r\n name: 'chocolate chip cookie dough',\r\n description: 'For something playful, we created an ice cream that reflects the childhood memories of homemade chocolate chip cookies. We blend chunks of buttery cookie dough nd our sweet fudge chips with our finest pure vanilla ice cream.',\r\n image: ChocolateChipCookieDough,\r\n isRbstFree: true,\r\n isKosher: true,\r\n isGmoFree: false,\r\n },\r\n 'strawberry': {\r\n name: 'strawberry',\r\n description: 'Our strawberries come from farms in the Pacific Northwest that have supplied our berries for over 45 years. It took Rueben Mattus six years to find the perfect berry that satisfied his particular standards. The flavor launched in 1966 and continues to be a fan favorite.',\r\n image: Strawberry,\r\n isRbstFree: true,\r\n isKosher: true,\r\n isGmoFree: true,\r\n },\r\n } as Record;\r\n}","\r\n\r\n\r\n\r\n","\r\n\r\n\r\n\r\n","\r\n\r\n\r\n\r\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport default function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n \"stroke-width\": \"1.5\",\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\"\n }, [\n _createElementVNode(\"path\", {\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n d: \"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99\"\n })\n ]))\n}","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport default function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n \"stroke-width\": \"1.5\",\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\"\n }, [\n _createElementVNode(\"path\", {\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n d: \"m4.5 12.75 6 6 9-13.5\"\n })\n ]))\n}","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport default function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n \"stroke-width\": \"1.5\",\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\"\n }, [\n _createElementVNode(\"path\", {\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n d: \"M15.75 19.5 8.25 12l7.5-7.5\"\n })\n ]))\n}","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport default function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n \"stroke-width\": \"1.5\",\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\"\n }, [\n _createElementVNode(\"path\", {\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n d: \"m8.25 4.5 7.5 7.5-7.5 7.5\"\n })\n ]))\n}","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport default function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n \"stroke-width\": \"1.5\",\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\"\n }, [\n _createElementVNode(\"path\", {\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n d: \"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z\"\n })\n ]))\n}","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport default function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n \"stroke-width\": \"1.5\",\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\"\n }, [\n _createElementVNode(\"path\", {\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n d: \"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12\"\n })\n ]))\n}","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport default function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n \"stroke-width\": \"1.5\",\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\"\n }, [\n _createElementVNode(\"path\", {\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n d: \"M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18\"\n })\n ]))\n}","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport default function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n \"stroke-width\": \"1.5\",\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\"\n }, [\n _createElementVNode(\"path\", {\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n d: \"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z\"\n })\n ]))\n}","/*! @vimeo/player v2.23.0 | (c) 2024 Vimeo | MIT License | https://github.com/vimeo/player.js */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _regeneratorRuntime() {\n _regeneratorRuntime = function () {\n return exports;\n };\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function (obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\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 function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == typeof value && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function (method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\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 if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator.return && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) keys.push(key);\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function (skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n },\n stop: function () {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function (exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\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 && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function (record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\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) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\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 (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function (iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct.bind();\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n}\nfunction _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !_isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return _setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return _assertThisInitialized(self);\n}\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\n/**\n * @module lib/functions\n */\n\n/**\n * Check to see this is a node environment.\n * @type {Boolean}\n */\n/* global global */\nvar isNode = typeof global !== 'undefined' && {}.toString.call(global) === '[object global]';\n\n/**\n * Get the name of the method for a given getter or setter.\n *\n * @param {string} prop The name of the property.\n * @param {string} type Either “get” or “set”.\n * @return {string}\n */\nfunction getMethodName(prop, type) {\n if (prop.indexOf(type.toLowerCase()) === 0) {\n return prop;\n }\n return \"\".concat(type.toLowerCase()).concat(prop.substr(0, 1).toUpperCase()).concat(prop.substr(1));\n}\n\n/**\n * Check to see if the object is a DOM Element.\n *\n * @param {*} element The object to check.\n * @return {boolean}\n */\nfunction isDomElement(element) {\n return Boolean(element && element.nodeType === 1 && 'nodeName' in element && element.ownerDocument && element.ownerDocument.defaultView);\n}\n\n/**\n * Check to see whether the value is a number.\n *\n * @see http://dl.dropboxusercontent.com/u/35146/js/tests/isNumber.html\n * @param {*} value The value to check.\n * @param {boolean} integer Check if the value is an integer.\n * @return {boolean}\n */\nfunction isInteger(value) {\n // eslint-disable-next-line eqeqeq\n return !isNaN(parseFloat(value)) && isFinite(value) && Math.floor(value) == value;\n}\n\n/**\n * Check to see if the URL is a Vimeo url.\n *\n * @param {string} url The url string.\n * @return {boolean}\n */\nfunction isVimeoUrl(url) {\n return /^(https?:)?\\/\\/((((player|www)\\.)?vimeo\\.com)|((player\\.)?[a-zA-Z0-9-]+\\.videoji\\.hk))(?=$|\\/)/.test(url);\n}\n\n/**\n * Check to see if the URL is for a Vimeo embed.\n *\n * @param {string} url The url string.\n * @return {boolean}\n */\nfunction isVimeoEmbed(url) {\n var expr = /^https:\\/\\/player\\.((vimeo\\.com)|([a-zA-Z0-9-]+\\.videoji\\.hk))\\/video\\/\\d+/;\n return expr.test(url);\n}\nfunction getOembedDomain(url) {\n var match = (url || '').match(/^(?:https?:)?(?:\\/\\/)?([^/?]+)/);\n var domain = (match && match[1] || '').replace('player.', '');\n if (domain.endsWith('.videoji.hk')) {\n return domain;\n }\n return 'vimeo.com';\n}\n\n/**\n * Get the Vimeo URL from an element.\n * The element must have either a data-vimeo-id or data-vimeo-url attribute.\n *\n * @param {object} oEmbedParameters The oEmbed parameters.\n * @return {string}\n */\nfunction getVimeoUrl() {\n var oEmbedParameters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var id = oEmbedParameters.id;\n var url = oEmbedParameters.url;\n var idOrUrl = id || url;\n if (!idOrUrl) {\n throw new Error('An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.');\n }\n if (isInteger(idOrUrl)) {\n return \"https://vimeo.com/\".concat(idOrUrl);\n }\n if (isVimeoUrl(idOrUrl)) {\n return idOrUrl.replace('http:', 'https:');\n }\n if (id) {\n throw new TypeError(\"\\u201C\".concat(id, \"\\u201D is not a valid video id.\"));\n }\n throw new TypeError(\"\\u201C\".concat(idOrUrl, \"\\u201D is not a vimeo.com url.\"));\n}\n\n/* eslint-disable max-params */\n/**\n * A utility method for attaching and detaching event handlers\n *\n * @param {EventTarget} target\n * @param {string | string[]} eventName\n * @param {function} callback\n * @param {'addEventListener' | 'on'} onName\n * @param {'removeEventListener' | 'off'} offName\n * @return {{cancel: (function(): void)}}\n */\nvar subscribe = function subscribe(target, eventName, callback) {\n var onName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'addEventListener';\n var offName = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'removeEventListener';\n var eventNames = typeof eventName === 'string' ? [eventName] : eventName;\n eventNames.forEach(function (evName) {\n target[onName](evName, callback);\n });\n return {\n cancel: function cancel() {\n return eventNames.forEach(function (evName) {\n return target[offName](evName, callback);\n });\n }\n };\n};\n\nvar arrayIndexOfSupport = typeof Array.prototype.indexOf !== 'undefined';\nvar postMessageSupport = typeof window !== 'undefined' && typeof window.postMessage !== 'undefined';\nif (!isNode && (!arrayIndexOfSupport || !postMessageSupport)) {\n throw new Error('Sorry, the Vimeo Player API is not available in this browser.');\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\n/*!\n * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill\n * https://github.com/polygonplanet/weakmap-polyfill\n * Copyright (c) 2015-2021 polygonplanet \n * @license MIT\n */\n\n(function (self) {\n\n if (self.WeakMap) {\n return;\n }\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var hasDefine = Object.defineProperty && function () {\n try {\n // Avoid IE8's broken Object.defineProperty\n return Object.defineProperty({}, 'x', {\n value: 1\n }).x === 1;\n } catch (e) {}\n }();\n var defineProperty = function (object, name, value) {\n if (hasDefine) {\n Object.defineProperty(object, name, {\n configurable: true,\n writable: true,\n value: value\n });\n } else {\n object[name] = value;\n }\n };\n self.WeakMap = function () {\n // ECMA-262 23.3 WeakMap Objects\n function WeakMap() {\n if (this === void 0) {\n throw new TypeError(\"Constructor WeakMap requires 'new'\");\n }\n defineProperty(this, '_id', genId('_WeakMap'));\n\n // ECMA-262 23.3.1.1 WeakMap([iterable])\n if (arguments.length > 0) {\n // Currently, WeakMap `iterable` argument is not supported\n throw new TypeError('WeakMap iterable is not supported');\n }\n }\n\n // ECMA-262 23.3.3.2 WeakMap.prototype.delete(key)\n defineProperty(WeakMap.prototype, 'delete', function (key) {\n checkInstance(this, 'delete');\n if (!isObject(key)) {\n return false;\n }\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n delete key[this._id];\n return true;\n }\n return false;\n });\n\n // ECMA-262 23.3.3.3 WeakMap.prototype.get(key)\n defineProperty(WeakMap.prototype, 'get', function (key) {\n checkInstance(this, 'get');\n if (!isObject(key)) {\n return void 0;\n }\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n return entry[1];\n }\n return void 0;\n });\n\n // ECMA-262 23.3.3.4 WeakMap.prototype.has(key)\n defineProperty(WeakMap.prototype, 'has', function (key) {\n checkInstance(this, 'has');\n if (!isObject(key)) {\n return false;\n }\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n return true;\n }\n return false;\n });\n\n // ECMA-262 23.3.3.5 WeakMap.prototype.set(key, value)\n defineProperty(WeakMap.prototype, 'set', function (key, value) {\n checkInstance(this, 'set');\n if (!isObject(key)) {\n throw new TypeError('Invalid value used as weak map key');\n }\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n entry[1] = value;\n return this;\n }\n defineProperty(key, this._id, [key, value]);\n return this;\n });\n function checkInstance(x, methodName) {\n if (!isObject(x) || !hasOwnProperty.call(x, '_id')) {\n throw new TypeError(methodName + ' method called on incompatible receiver ' + typeof x);\n }\n }\n function genId(prefix) {\n return prefix + '_' + rand() + '.' + rand();\n }\n function rand() {\n return Math.random().toString().substring(2);\n }\n defineProperty(WeakMap, '_polyfill', true);\n return WeakMap;\n }();\n function isObject(x) {\n return Object(x) === x;\n }\n})(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : commonjsGlobal);\n\nvar npo_src = createCommonjsModule(function (module) {\n/*! Native Promise Only\n v0.8.1 (c) Kyle Simpson\n MIT License: http://getify.mit-license.org\n*/\n\n(function UMD(name, context, definition) {\n // special form of UMD for polyfilling across evironments\n context[name] = context[name] || definition();\n if ( module.exports) {\n module.exports = context[name];\n }\n})(\"Promise\", typeof commonjsGlobal != \"undefined\" ? commonjsGlobal : commonjsGlobal, function DEF() {\n\n var builtInProp,\n cycle,\n scheduling_queue,\n ToString = Object.prototype.toString,\n timer = typeof setImmediate != \"undefined\" ? function timer(fn) {\n return setImmediate(fn);\n } : setTimeout;\n\n // dammit, IE8.\n try {\n Object.defineProperty({}, \"x\", {});\n builtInProp = function builtInProp(obj, name, val, config) {\n return Object.defineProperty(obj, name, {\n value: val,\n writable: true,\n configurable: config !== false\n });\n };\n } catch (err) {\n builtInProp = function builtInProp(obj, name, val) {\n obj[name] = val;\n return obj;\n };\n }\n\n // Note: using a queue instead of array for efficiency\n scheduling_queue = function Queue() {\n var first, last, item;\n function Item(fn, self) {\n this.fn = fn;\n this.self = self;\n this.next = void 0;\n }\n return {\n add: function add(fn, self) {\n item = new Item(fn, self);\n if (last) {\n last.next = item;\n } else {\n first = item;\n }\n last = item;\n item = void 0;\n },\n drain: function drain() {\n var f = first;\n first = last = cycle = void 0;\n while (f) {\n f.fn.call(f.self);\n f = f.next;\n }\n }\n };\n }();\n function schedule(fn, self) {\n scheduling_queue.add(fn, self);\n if (!cycle) {\n cycle = timer(scheduling_queue.drain);\n }\n }\n\n // promise duck typing\n function isThenable(o) {\n var _then,\n o_type = typeof o;\n if (o != null && (o_type == \"object\" || o_type == \"function\")) {\n _then = o.then;\n }\n return typeof _then == \"function\" ? _then : false;\n }\n function notify() {\n for (var i = 0; i < this.chain.length; i++) {\n notifyIsolated(this, this.state === 1 ? this.chain[i].success : this.chain[i].failure, this.chain[i]);\n }\n this.chain.length = 0;\n }\n\n // NOTE: This is a separate function to isolate\n // the `try..catch` so that other code can be\n // optimized better\n function notifyIsolated(self, cb, chain) {\n var ret, _then;\n try {\n if (cb === false) {\n chain.reject(self.msg);\n } else {\n if (cb === true) {\n ret = self.msg;\n } else {\n ret = cb.call(void 0, self.msg);\n }\n if (ret === chain.promise) {\n chain.reject(TypeError(\"Promise-chain cycle\"));\n } else if (_then = isThenable(ret)) {\n _then.call(ret, chain.resolve, chain.reject);\n } else {\n chain.resolve(ret);\n }\n }\n } catch (err) {\n chain.reject(err);\n }\n }\n function resolve(msg) {\n var _then,\n self = this;\n\n // already triggered?\n if (self.triggered) {\n return;\n }\n self.triggered = true;\n\n // unwrap\n if (self.def) {\n self = self.def;\n }\n try {\n if (_then = isThenable(msg)) {\n schedule(function () {\n var def_wrapper = new MakeDefWrapper(self);\n try {\n _then.call(msg, function $resolve$() {\n resolve.apply(def_wrapper, arguments);\n }, function $reject$() {\n reject.apply(def_wrapper, arguments);\n });\n } catch (err) {\n reject.call(def_wrapper, err);\n }\n });\n } else {\n self.msg = msg;\n self.state = 1;\n if (self.chain.length > 0) {\n schedule(notify, self);\n }\n }\n } catch (err) {\n reject.call(new MakeDefWrapper(self), err);\n }\n }\n function reject(msg) {\n var self = this;\n\n // already triggered?\n if (self.triggered) {\n return;\n }\n self.triggered = true;\n\n // unwrap\n if (self.def) {\n self = self.def;\n }\n self.msg = msg;\n self.state = 2;\n if (self.chain.length > 0) {\n schedule(notify, self);\n }\n }\n function iteratePromises(Constructor, arr, resolver, rejecter) {\n for (var idx = 0; idx < arr.length; idx++) {\n (function IIFE(idx) {\n Constructor.resolve(arr[idx]).then(function $resolver$(msg) {\n resolver(idx, msg);\n }, rejecter);\n })(idx);\n }\n }\n function MakeDefWrapper(self) {\n this.def = self;\n this.triggered = false;\n }\n function MakeDef(self) {\n this.promise = self;\n this.state = 0;\n this.triggered = false;\n this.chain = [];\n this.msg = void 0;\n }\n function Promise(executor) {\n if (typeof executor != \"function\") {\n throw TypeError(\"Not a function\");\n }\n if (this.__NPO__ !== 0) {\n throw TypeError(\"Not a promise\");\n }\n\n // instance shadowing the inherited \"brand\"\n // to signal an already \"initialized\" promise\n this.__NPO__ = 1;\n var def = new MakeDef(this);\n this[\"then\"] = function then(success, failure) {\n var o = {\n success: typeof success == \"function\" ? success : true,\n failure: typeof failure == \"function\" ? failure : false\n };\n // Note: `then(..)` itself can be borrowed to be used against\n // a different promise constructor for making the chained promise,\n // by substituting a different `this` binding.\n o.promise = new this.constructor(function extractChain(resolve, reject) {\n if (typeof resolve != \"function\" || typeof reject != \"function\") {\n throw TypeError(\"Not a function\");\n }\n o.resolve = resolve;\n o.reject = reject;\n });\n def.chain.push(o);\n if (def.state !== 0) {\n schedule(notify, def);\n }\n return o.promise;\n };\n this[\"catch\"] = function $catch$(failure) {\n return this.then(void 0, failure);\n };\n try {\n executor.call(void 0, function publicResolve(msg) {\n resolve.call(def, msg);\n }, function publicReject(msg) {\n reject.call(def, msg);\n });\n } catch (err) {\n reject.call(def, err);\n }\n }\n var PromisePrototype = builtInProp({}, \"constructor\", Promise, /*configurable=*/false);\n\n // Note: Android 4 cannot use `Object.defineProperty(..)` here\n Promise.prototype = PromisePrototype;\n\n // built-in \"brand\" to signal an \"uninitialized\" promise\n builtInProp(PromisePrototype, \"__NPO__\", 0, /*configurable=*/false);\n builtInProp(Promise, \"resolve\", function Promise$resolve(msg) {\n var Constructor = this;\n\n // spec mandated checks\n // note: best \"isPromise\" check that's practical for now\n if (msg && typeof msg == \"object\" && msg.__NPO__ === 1) {\n return msg;\n }\n return new Constructor(function executor(resolve, reject) {\n if (typeof resolve != \"function\" || typeof reject != \"function\") {\n throw TypeError(\"Not a function\");\n }\n resolve(msg);\n });\n });\n builtInProp(Promise, \"reject\", function Promise$reject(msg) {\n return new this(function executor(resolve, reject) {\n if (typeof resolve != \"function\" || typeof reject != \"function\") {\n throw TypeError(\"Not a function\");\n }\n reject(msg);\n });\n });\n builtInProp(Promise, \"all\", function Promise$all(arr) {\n var Constructor = this;\n\n // spec mandated checks\n if (ToString.call(arr) != \"[object Array]\") {\n return Constructor.reject(TypeError(\"Not an array\"));\n }\n if (arr.length === 0) {\n return Constructor.resolve([]);\n }\n return new Constructor(function executor(resolve, reject) {\n if (typeof resolve != \"function\" || typeof reject != \"function\") {\n throw TypeError(\"Not a function\");\n }\n var len = arr.length,\n msgs = Array(len),\n count = 0;\n iteratePromises(Constructor, arr, function resolver(idx, msg) {\n msgs[idx] = msg;\n if (++count === len) {\n resolve(msgs);\n }\n }, reject);\n });\n });\n builtInProp(Promise, \"race\", function Promise$race(arr) {\n var Constructor = this;\n\n // spec mandated checks\n if (ToString.call(arr) != \"[object Array]\") {\n return Constructor.reject(TypeError(\"Not an array\"));\n }\n return new Constructor(function executor(resolve, reject) {\n if (typeof resolve != \"function\" || typeof reject != \"function\") {\n throw TypeError(\"Not a function\");\n }\n iteratePromises(Constructor, arr, function resolver(idx, msg) {\n resolve(msg);\n }, reject);\n });\n });\n return Promise;\n});\n});\n\n/**\n * @module lib/callbacks\n */\n\nvar callbackMap = new WeakMap();\n\n/**\n * Store a callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @param {(function(this:Player, *): void|{resolve: function, reject: function})} callback\n * The callback to call or an object with resolve and reject functions for a promise.\n * @return {void}\n */\nfunction storeCallback(player, name, callback) {\n var playerCallbacks = callbackMap.get(player.element) || {};\n if (!(name in playerCallbacks)) {\n playerCallbacks[name] = [];\n }\n playerCallbacks[name].push(callback);\n callbackMap.set(player.element, playerCallbacks);\n}\n\n/**\n * Get the callbacks for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @return {function[]}\n */\nfunction getCallbacks(player, name) {\n var playerCallbacks = callbackMap.get(player.element) || {};\n return playerCallbacks[name] || [];\n}\n\n/**\n * Remove a stored callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @param {function} [callback] The specific callback to remove.\n * @return {boolean} Was this the last callback?\n */\nfunction removeCallback(player, name, callback) {\n var playerCallbacks = callbackMap.get(player.element) || {};\n if (!playerCallbacks[name]) {\n return true;\n }\n\n // If no callback is passed, remove all callbacks for the event\n if (!callback) {\n playerCallbacks[name] = [];\n callbackMap.set(player.element, playerCallbacks);\n return true;\n }\n var index = playerCallbacks[name].indexOf(callback);\n if (index !== -1) {\n playerCallbacks[name].splice(index, 1);\n }\n callbackMap.set(player.element, playerCallbacks);\n return playerCallbacks[name] && playerCallbacks[name].length === 0;\n}\n\n/**\n * Return the first stored callback for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @return {function} The callback, or false if there were none\n */\nfunction shiftCallbacks(player, name) {\n var playerCallbacks = getCallbacks(player, name);\n if (playerCallbacks.length < 1) {\n return false;\n }\n var callback = playerCallbacks.shift();\n removeCallback(player, name, callback);\n return callback;\n}\n\n/**\n * Move callbacks associated with an element to another element.\n *\n * @param {HTMLElement} oldElement The old element.\n * @param {HTMLElement} newElement The new element.\n * @return {void}\n */\nfunction swapCallbacks(oldElement, newElement) {\n var playerCallbacks = callbackMap.get(oldElement);\n callbackMap.set(newElement, playerCallbacks);\n callbackMap.delete(oldElement);\n}\n\n/**\n * @module lib/postmessage\n */\n\n/**\n * Parse a message received from postMessage.\n *\n * @param {*} data The data received from postMessage.\n * @return {object}\n */\nfunction parseMessageData(data) {\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (error) {\n // If the message cannot be parsed, throw the error as a warning\n console.warn(error);\n return {};\n }\n }\n return data;\n}\n\n/**\n * Post a message to the specified target.\n *\n * @param {Player} player The player object to use.\n * @param {string} method The API method to call.\n * @param {object} params The parameters to send to the player.\n * @return {void}\n */\nfunction postMessage(player, method, params) {\n if (!player.element.contentWindow || !player.element.contentWindow.postMessage) {\n return;\n }\n var message = {\n method: method\n };\n if (params !== undefined) {\n message.value = params;\n }\n\n // IE 8 and 9 do not support passing messages, so stringify them\n var ieVersion = parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\\d+).*$/, '$1'));\n if (ieVersion >= 8 && ieVersion < 10) {\n message = JSON.stringify(message);\n }\n player.element.contentWindow.postMessage(message, player.origin);\n}\n\n/**\n * Parse the data received from a message event.\n *\n * @param {Player} player The player that received the message.\n * @param {(Object|string)} data The message data. Strings will be parsed into JSON.\n * @return {void}\n */\nfunction processData(player, data) {\n data = parseMessageData(data);\n var callbacks = [];\n var param;\n if (data.event) {\n if (data.event === 'error') {\n var promises = getCallbacks(player, data.data.method);\n promises.forEach(function (promise) {\n var error = new Error(data.data.message);\n error.name = data.data.name;\n promise.reject(error);\n removeCallback(player, data.data.method, promise);\n });\n }\n callbacks = getCallbacks(player, \"event:\".concat(data.event));\n param = data.data;\n } else if (data.method) {\n var callback = shiftCallbacks(player, data.method);\n if (callback) {\n callbacks.push(callback);\n param = data.value;\n }\n }\n callbacks.forEach(function (callback) {\n try {\n if (typeof callback === 'function') {\n callback.call(player, param);\n return;\n }\n callback.resolve(param);\n } catch (e) {\n // empty\n }\n });\n}\n\n/**\n * @module lib/embed\n */\nvar oEmbedParameters = ['airplay', 'audio_tracks', 'autopause', 'autoplay', 'background', 'byline', 'cc', 'chapter_id', 'chapters', 'chromecast', 'color', 'colors', 'controls', 'dnt', 'end_time', 'fullscreen', 'height', 'id', 'interactive_params', 'keyboard', 'loop', 'maxheight', 'maxwidth', 'muted', 'play_button_position', 'playsinline', 'portrait', 'progress_bar', 'quality_selector', 'responsive', 'speed', 'start_time', 'texttrack', 'title', 'transcript', 'transparent', 'url', 'vimeo_logo', 'volume', 'watch_full_video', 'width'];\n\n/**\n * Get the 'data-vimeo'-prefixed attributes from an element as an object.\n *\n * @param {HTMLElement} element The element.\n * @param {Object} [defaults={}] The default values to use.\n * @return {Object}\n */\nfunction getOEmbedParameters(element) {\n var defaults = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return oEmbedParameters.reduce(function (params, param) {\n var value = element.getAttribute(\"data-vimeo-\".concat(param));\n if (value || value === '') {\n params[param] = value === '' ? 1 : value;\n }\n return params;\n }, defaults);\n}\n\n/**\n * Create an embed from oEmbed data inside an element.\n *\n * @param {object} data The oEmbed data.\n * @param {HTMLElement} element The element to put the iframe in.\n * @return {HTMLIFrameElement} The iframe embed.\n */\nfunction createEmbed(_ref, element) {\n var html = _ref.html;\n if (!element) {\n throw new TypeError('An element must be provided');\n }\n if (element.getAttribute('data-vimeo-initialized') !== null) {\n return element.querySelector('iframe');\n }\n var div = document.createElement('div');\n div.innerHTML = html;\n element.appendChild(div.firstChild);\n element.setAttribute('data-vimeo-initialized', 'true');\n return element.querySelector('iframe');\n}\n\n/**\n * Make an oEmbed call for the specified URL.\n *\n * @param {string} videoUrl The vimeo.com url for the video.\n * @param {Object} [params] Parameters to pass to oEmbed.\n * @param {HTMLElement} element The element.\n * @return {Promise}\n */\nfunction getOEmbedData(videoUrl) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var element = arguments.length > 2 ? arguments[2] : undefined;\n return new Promise(function (resolve, reject) {\n if (!isVimeoUrl(videoUrl)) {\n throw new TypeError(\"\\u201C\".concat(videoUrl, \"\\u201D is not a vimeo.com url.\"));\n }\n var domain = getOembedDomain(videoUrl);\n var url = \"https://\".concat(domain, \"/api/oembed.json?url=\").concat(encodeURIComponent(videoUrl));\n for (var param in params) {\n if (params.hasOwnProperty(param)) {\n url += \"&\".concat(param, \"=\").concat(encodeURIComponent(params[param]));\n }\n }\n var xhr = 'XDomainRequest' in window ? new XDomainRequest() : new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.onload = function () {\n if (xhr.status === 404) {\n reject(new Error(\"\\u201C\".concat(videoUrl, \"\\u201D was not found.\")));\n return;\n }\n if (xhr.status === 403) {\n reject(new Error(\"\\u201C\".concat(videoUrl, \"\\u201D is not embeddable.\")));\n return;\n }\n try {\n var json = JSON.parse(xhr.responseText);\n // Check api response for 403 on oembed\n if (json.domain_status_code === 403) {\n // We still want to create the embed to give users visual feedback\n createEmbed(json, element);\n reject(new Error(\"\\u201C\".concat(videoUrl, \"\\u201D is not embeddable.\")));\n return;\n }\n resolve(json);\n } catch (error) {\n reject(error);\n }\n };\n xhr.onerror = function () {\n var status = xhr.status ? \" (\".concat(xhr.status, \")\") : '';\n reject(new Error(\"There was an error fetching the embed code from Vimeo\".concat(status, \".\")));\n };\n xhr.send();\n });\n}\n\n/**\n * Initialize all embeds within a specific element\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nfunction initializeEmbeds() {\n var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n var elements = [].slice.call(parent.querySelectorAll('[data-vimeo-id], [data-vimeo-url]'));\n var handleError = function handleError(error) {\n if ('console' in window && console.error) {\n console.error(\"There was an error creating an embed: \".concat(error));\n }\n };\n elements.forEach(function (element) {\n try {\n // Skip any that have data-vimeo-defer\n if (element.getAttribute('data-vimeo-defer') !== null) {\n return;\n }\n var params = getOEmbedParameters(element);\n var url = getVimeoUrl(params);\n getOEmbedData(url, params, element).then(function (data) {\n return createEmbed(data, element);\n }).catch(handleError);\n } catch (error) {\n handleError(error);\n }\n });\n}\n\n/**\n * Resize embeds when messaged by the player.\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nfunction resizeEmbeds() {\n var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n // Prevent execution if users include the player.js script multiple times.\n if (window.VimeoPlayerResizeEmbeds_) {\n return;\n }\n window.VimeoPlayerResizeEmbeds_ = true;\n var onMessage = function onMessage(event) {\n if (!isVimeoUrl(event.origin)) {\n return;\n }\n\n // 'spacechange' is fired only on embeds with cards\n if (!event.data || event.data.event !== 'spacechange') {\n return;\n }\n var iframes = parent.querySelectorAll('iframe');\n for (var i = 0; i < iframes.length; i++) {\n if (iframes[i].contentWindow !== event.source) {\n continue;\n }\n\n // Change padding-bottom of the enclosing div to accommodate\n // card carousel without distorting aspect ratio\n var space = iframes[i].parentElement;\n space.style.paddingBottom = \"\".concat(event.data.data[0].bottom, \"px\");\n break;\n }\n };\n window.addEventListener('message', onMessage);\n}\n\n/**\n * Add chapters to existing metadata for Google SEO\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nfunction initAppendVideoMetadata() {\n var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n // Prevent execution if users include the player.js script multiple times.\n if (window.VimeoSeoMetadataAppended) {\n return;\n }\n window.VimeoSeoMetadataAppended = true;\n var onMessage = function onMessage(event) {\n if (!isVimeoUrl(event.origin)) {\n return;\n }\n var data = parseMessageData(event.data);\n if (!data || data.event !== 'ready') {\n return;\n }\n var iframes = parent.querySelectorAll('iframe');\n for (var i = 0; i < iframes.length; i++) {\n var iframe = iframes[i];\n\n // Initiate appendVideoMetadata if iframe is a Vimeo embed\n var isValidMessageSource = iframe.contentWindow === event.source;\n if (isVimeoEmbed(iframe.src) && isValidMessageSource) {\n var player = new Player(iframe);\n player.callMethod('appendVideoMetadata', window.location.href);\n }\n }\n };\n window.addEventListener('message', onMessage);\n}\n\n/**\n * Seek to time indicated by vimeo_t query parameter if present in URL\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nfunction checkUrlTimeParam() {\n var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n // Prevent execution if users include the player.js script multiple times.\n if (window.VimeoCheckedUrlTimeParam) {\n return;\n }\n window.VimeoCheckedUrlTimeParam = true;\n var handleError = function handleError(error) {\n if ('console' in window && console.error) {\n console.error(\"There was an error getting video Id: \".concat(error));\n }\n };\n var onMessage = function onMessage(event) {\n if (!isVimeoUrl(event.origin)) {\n return;\n }\n var data = parseMessageData(event.data);\n if (!data || data.event !== 'ready') {\n return;\n }\n var iframes = parent.querySelectorAll('iframe');\n var _loop = function _loop() {\n var iframe = iframes[i];\n var isValidMessageSource = iframe.contentWindow === event.source;\n if (isVimeoEmbed(iframe.src) && isValidMessageSource) {\n var player = new Player(iframe);\n player.getVideoId().then(function (videoId) {\n var matches = new RegExp(\"[?&]vimeo_t_\".concat(videoId, \"=([^&#]*)\")).exec(window.location.href);\n if (matches && matches[1]) {\n var sec = decodeURI(matches[1]);\n player.setCurrentTime(sec);\n }\n return;\n }).catch(handleError);\n }\n };\n for (var i = 0; i < iframes.length; i++) {\n _loop();\n }\n };\n window.addEventListener('message', onMessage);\n}\n\n/* MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\nTerms */\n\nfunction initializeScreenfull() {\n var fn = function () {\n var val;\n var fnMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror'],\n // New WebKit\n ['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror'],\n // Old WebKit\n ['webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange', 'webkitfullscreenerror'], ['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror'], ['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError']];\n var i = 0;\n var l = fnMap.length;\n var ret = {};\n for (; i < l; i++) {\n val = fnMap[i];\n if (val && val[1] in document) {\n for (i = 0; i < val.length; i++) {\n ret[fnMap[0][i]] = val[i];\n }\n return ret;\n }\n }\n return false;\n }();\n var eventNameMap = {\n fullscreenchange: fn.fullscreenchange,\n fullscreenerror: fn.fullscreenerror\n };\n var screenfull = {\n request: function request(element) {\n return new Promise(function (resolve, reject) {\n var onFullScreenEntered = function onFullScreenEntered() {\n screenfull.off('fullscreenchange', onFullScreenEntered);\n resolve();\n };\n screenfull.on('fullscreenchange', onFullScreenEntered);\n element = element || document.documentElement;\n var returnPromise = element[fn.requestFullscreen]();\n if (returnPromise instanceof Promise) {\n returnPromise.then(onFullScreenEntered).catch(reject);\n }\n });\n },\n exit: function exit() {\n return new Promise(function (resolve, reject) {\n if (!screenfull.isFullscreen) {\n resolve();\n return;\n }\n var onFullScreenExit = function onFullScreenExit() {\n screenfull.off('fullscreenchange', onFullScreenExit);\n resolve();\n };\n screenfull.on('fullscreenchange', onFullScreenExit);\n var returnPromise = document[fn.exitFullscreen]();\n if (returnPromise instanceof Promise) {\n returnPromise.then(onFullScreenExit).catch(reject);\n }\n });\n },\n on: function on(event, callback) {\n var eventName = eventNameMap[event];\n if (eventName) {\n document.addEventListener(eventName, callback);\n }\n },\n off: function off(event, callback) {\n var eventName = eventNameMap[event];\n if (eventName) {\n document.removeEventListener(eventName, callback);\n }\n }\n };\n Object.defineProperties(screenfull, {\n isFullscreen: {\n get: function get() {\n return Boolean(document[fn.fullscreenElement]);\n }\n },\n element: {\n enumerable: true,\n get: function get() {\n return document[fn.fullscreenElement];\n }\n },\n isEnabled: {\n enumerable: true,\n get: function get() {\n // Coerce to boolean in case of old WebKit\n return Boolean(document[fn.fullscreenEnabled]);\n }\n }\n });\n return screenfull;\n}\n\n/** @typedef {import('./timing-src-connector.types').PlayerControls} PlayerControls */\n/** @typedef {import('./timing-object.types').TimingObject} TimingObject */\n/** @typedef {import('./timing-src-connector.types').TimingSrcConnectorOptions} TimingSrcConnectorOptions */\n/** @typedef {(msg: string) => any} Logger */\n/** @typedef {import('timing-object.types').TConnectionState} TConnectionState */\n\n/**\n * @type {TimingSrcConnectorOptions}\n *\n * For details on these properties and their effects, see the typescript definition referenced above.\n */\nvar defaultOptions = {\n role: 'viewer',\n autoPlayMuted: true,\n allowedDrift: 0.3,\n maxAllowedDrift: 1,\n minCheckInterval: 0.1,\n maxRateAdjustment: 0.2,\n maxTimeToCatchUp: 1\n};\n\n/**\n * There's a proposed W3C spec for the Timing Object which would introduce a new set of APIs that would simplify time-synchronization tasks for browser applications.\n *\n * Proposed spec: https://webtiming.github.io/timingobject/\n * V3 Spec: https://timingsrc.readthedocs.io/en/latest/\n * Demuxed talk: https://www.youtube.com/watch?v=cZSjDaGDmX8\n *\n * This class makes it easy to connect Vimeo.Player to a provided TimingObject via Vimeo.Player.setTimingSrc(myTimingObject, options) and the synchronization will be handled automatically.\n *\n * There are 5 general responsibilities in TimingSrcConnector:\n *\n * 1. `updatePlayer()` which sets the player's currentTime, playbackRate and pause/play state based on current state of the TimingObject.\n * 2. `updateTimingObject()` which sets the TimingObject's position and velocity from the player's state.\n * 3. `playerUpdater` which listens for change events on the TimingObject and will respond by calling updatePlayer.\n * 4. `timingObjectUpdater` which listens to the player events of seeked, play and pause and will respond by calling `updateTimingObject()`.\n * 5. `maintainPlaybackPosition` this is code that constantly monitors the player to make sure it's always in sync with the TimingObject. This is needed because videos will generally not play with precise time accuracy and there will be some drift which becomes more noticeable over longer periods (as noted in the timing-object spec). More details on this method below.\n */\nvar TimingSrcConnector = /*#__PURE__*/function (_EventTarget) {\n _inherits(TimingSrcConnector, _EventTarget);\n var _super = _createSuper(TimingSrcConnector);\n /**\n * @param {PlayerControls} player\n * @param {TimingObject} timingObject\n * @param {TimingSrcConnectorOptions} options\n * @param {Logger} logger\n */\n function TimingSrcConnector(_player, timingObject) {\n var _this;\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var logger = arguments.length > 3 ? arguments[3] : undefined;\n _classCallCheck(this, TimingSrcConnector);\n _this = _super.call(this);\n _defineProperty(_assertThisInitialized(_this), \"logger\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"speedAdjustment\", 0);\n /**\n * @param {PlayerControls} player\n * @param {number} newAdjustment\n * @return {Promise}\n */\n _defineProperty(_assertThisInitialized(_this), \"adjustSpeed\", /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(player, newAdjustment) {\n var newPlaybackRate;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(_this.speedAdjustment === newAdjustment)) {\n _context.next = 2;\n break;\n }\n return _context.abrupt(\"return\");\n case 2:\n _context.next = 4;\n return player.getPlaybackRate();\n case 4:\n _context.t0 = _context.sent;\n _context.t1 = _this.speedAdjustment;\n _context.t2 = _context.t0 - _context.t1;\n _context.t3 = newAdjustment;\n newPlaybackRate = _context.t2 + _context.t3;\n _this.log(\"New playbackRate: \".concat(newPlaybackRate));\n _context.next = 12;\n return player.setPlaybackRate(newPlaybackRate);\n case 12:\n _this.speedAdjustment = newAdjustment;\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function (_x, _x2) {\n return _ref.apply(this, arguments);\n };\n }());\n _this.logger = logger;\n _this.init(timingObject, _player, _objectSpread2(_objectSpread2({}, defaultOptions), options));\n return _this;\n }\n _createClass(TimingSrcConnector, [{\n key: \"disconnect\",\n value: function disconnect() {\n this.dispatchEvent(new Event('disconnect'));\n }\n\n /**\n * @param {TimingObject} timingObject\n * @param {PlayerControls} player\n * @param {TimingSrcConnectorOptions} options\n * @return {Promise}\n */\n }, {\n key: \"init\",\n value: function () {\n var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(timingObject, player, options) {\n var _this2 = this;\n var playerUpdater, positionSync, timingObjectUpdater;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return this.waitForTOReadyState(timingObject, 'open');\n case 2:\n if (!(options.role === 'viewer')) {\n _context2.next = 10;\n break;\n }\n _context2.next = 5;\n return this.updatePlayer(timingObject, player, options);\n case 5:\n playerUpdater = subscribe(timingObject, 'change', function () {\n return _this2.updatePlayer(timingObject, player, options);\n });\n positionSync = this.maintainPlaybackPosition(timingObject, player, options);\n this.addEventListener('disconnect', function () {\n positionSync.cancel();\n playerUpdater.cancel();\n });\n _context2.next = 14;\n break;\n case 10:\n _context2.next = 12;\n return this.updateTimingObject(timingObject, player);\n case 12:\n timingObjectUpdater = subscribe(player, ['seeked', 'play', 'pause', 'ratechange'], function () {\n return _this2.updateTimingObject(timingObject, player);\n }, 'on', 'off');\n this.addEventListener('disconnect', function () {\n return timingObjectUpdater.cancel();\n });\n case 14:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, this);\n }));\n function init(_x3, _x4, _x5) {\n return _init.apply(this, arguments);\n }\n return init;\n }()\n /**\n * Sets the TimingObject's state to reflect that of the player\n *\n * @param {TimingObject} timingObject\n * @param {PlayerControls} player\n * @return {Promise}\n */\n }, {\n key: \"updateTimingObject\",\n value: function () {\n var _updateTimingObject = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(timingObject, player) {\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n _context3.t0 = timingObject;\n _context3.next = 3;\n return player.getCurrentTime();\n case 3:\n _context3.t1 = _context3.sent;\n _context3.next = 6;\n return player.getPaused();\n case 6:\n if (!_context3.sent) {\n _context3.next = 10;\n break;\n }\n _context3.t2 = 0;\n _context3.next = 13;\n break;\n case 10:\n _context3.next = 12;\n return player.getPlaybackRate();\n case 12:\n _context3.t2 = _context3.sent;\n case 13:\n _context3.t3 = _context3.t2;\n _context3.t4 = {\n position: _context3.t1,\n velocity: _context3.t3\n };\n _context3.t0.update.call(_context3.t0, _context3.t4);\n case 16:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n function updateTimingObject(_x6, _x7) {\n return _updateTimingObject.apply(this, arguments);\n }\n return updateTimingObject;\n }()\n /**\n * Sets the player's timing state to reflect that of the TimingObject\n *\n * @param {TimingObject} timingObject\n * @param {PlayerControls} player\n * @param {TimingSrcConnectorOptions} options\n * @return {Promise}\n */\n }, {\n key: \"updatePlayer\",\n value: function () {\n var _updatePlayer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(timingObject, player, options) {\n var _timingObject$query, position, velocity;\n return _regeneratorRuntime().wrap(function _callee5$(_context5) {\n while (1) switch (_context5.prev = _context5.next) {\n case 0:\n _timingObject$query = timingObject.query(), position = _timingObject$query.position, velocity = _timingObject$query.velocity;\n if (typeof position === 'number') {\n player.setCurrentTime(position);\n }\n if (!(typeof velocity === 'number')) {\n _context5.next = 25;\n break;\n }\n if (!(velocity === 0)) {\n _context5.next = 11;\n break;\n }\n _context5.next = 6;\n return player.getPaused();\n case 6:\n _context5.t0 = _context5.sent;\n if (!(_context5.t0 === false)) {\n _context5.next = 9;\n break;\n }\n player.pause();\n case 9:\n _context5.next = 25;\n break;\n case 11:\n if (!(velocity > 0)) {\n _context5.next = 25;\n break;\n }\n _context5.next = 14;\n return player.getPaused();\n case 14:\n _context5.t1 = _context5.sent;\n if (!(_context5.t1 === true)) {\n _context5.next = 19;\n break;\n }\n _context5.next = 18;\n return player.play().catch( /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(err) {\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n if (!(err.name === 'NotAllowedError' && options.autoPlayMuted)) {\n _context4.next = 5;\n break;\n }\n _context4.next = 3;\n return player.setMuted(true);\n case 3:\n _context4.next = 5;\n return player.play().catch(function (err2) {\n return console.error('Couldn\\'t play the video from TimingSrcConnector. Error:', err2);\n });\n case 5:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }));\n return function (_x11) {\n return _ref2.apply(this, arguments);\n };\n }());\n case 18:\n this.updatePlayer(timingObject, player, options);\n case 19:\n _context5.next = 21;\n return player.getPlaybackRate();\n case 21:\n _context5.t2 = _context5.sent;\n _context5.t3 = velocity;\n if (!(_context5.t2 !== _context5.t3)) {\n _context5.next = 25;\n break;\n }\n player.setPlaybackRate(velocity);\n case 25:\n case \"end\":\n return _context5.stop();\n }\n }, _callee5, this);\n }));\n function updatePlayer(_x8, _x9, _x10) {\n return _updatePlayer.apply(this, arguments);\n }\n return updatePlayer;\n }()\n /**\n * Since video players do not play with 100% time precision, we need to closely monitor\n * our player to be sure it remains in sync with the TimingObject.\n *\n * If out of sync, we use the current conditions and the options provided to determine\n * whether to re-sync via setting currentTime or adjusting the playbackRate\n *\n * @param {TimingObject} timingObject\n * @param {PlayerControls} player\n * @param {TimingSrcConnectorOptions} options\n * @return {{cancel: (function(): void)}}\n */\n }, {\n key: \"maintainPlaybackPosition\",\n value: function maintainPlaybackPosition(timingObject, player, options) {\n var _this3 = this;\n var allowedDrift = options.allowedDrift,\n maxAllowedDrift = options.maxAllowedDrift,\n minCheckInterval = options.minCheckInterval,\n maxRateAdjustment = options.maxRateAdjustment,\n maxTimeToCatchUp = options.maxTimeToCatchUp;\n var syncInterval = Math.min(maxTimeToCatchUp, Math.max(minCheckInterval, maxAllowedDrift)) * 1000;\n var check = /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {\n var diff, diffAbs, min, max, adjustment;\n return _regeneratorRuntime().wrap(function _callee6$(_context6) {\n while (1) switch (_context6.prev = _context6.next) {\n case 0:\n _context6.t0 = timingObject.query().velocity === 0;\n if (_context6.t0) {\n _context6.next = 6;\n break;\n }\n _context6.next = 4;\n return player.getPaused();\n case 4:\n _context6.t1 = _context6.sent;\n _context6.t0 = _context6.t1 === true;\n case 6:\n if (!_context6.t0) {\n _context6.next = 8;\n break;\n }\n return _context6.abrupt(\"return\");\n case 8:\n _context6.t2 = timingObject.query().position;\n _context6.next = 11;\n return player.getCurrentTime();\n case 11:\n _context6.t3 = _context6.sent;\n diff = _context6.t2 - _context6.t3;\n diffAbs = Math.abs(diff);\n _this3.log(\"Drift: \".concat(diff));\n if (!(diffAbs > maxAllowedDrift)) {\n _context6.next = 22;\n break;\n }\n _context6.next = 18;\n return _this3.adjustSpeed(player, 0);\n case 18:\n player.setCurrentTime(timingObject.query().position);\n _this3.log('Resync by currentTime');\n _context6.next = 29;\n break;\n case 22:\n if (!(diffAbs > allowedDrift)) {\n _context6.next = 29;\n break;\n }\n min = diffAbs / maxTimeToCatchUp;\n max = maxRateAdjustment;\n adjustment = min < max ? (max - min) / 2 : max;\n _context6.next = 28;\n return _this3.adjustSpeed(player, adjustment * Math.sign(diff));\n case 28:\n _this3.log('Resync by playbackRate');\n case 29:\n case \"end\":\n return _context6.stop();\n }\n }, _callee6);\n }));\n return function check() {\n return _ref3.apply(this, arguments);\n };\n }();\n var interval = setInterval(function () {\n return check();\n }, syncInterval);\n return {\n cancel: function cancel() {\n return clearInterval(interval);\n }\n };\n }\n\n /**\n * @param {string} msg\n */\n }, {\n key: \"log\",\n value: function log(msg) {\n var _this$logger;\n (_this$logger = this.logger) === null || _this$logger === void 0 ? void 0 : _this$logger.call(this, \"TimingSrcConnector: \".concat(msg));\n }\n }, {\n key: \"waitForTOReadyState\",\n value:\n /**\n * @param {TimingObject} timingObject\n * @param {TConnectionState} state\n * @return {Promise}\n */\n function waitForTOReadyState(timingObject, state) {\n return new Promise(function (resolve) {\n var check = function check() {\n if (timingObject.readyState === state) {\n resolve();\n } else {\n timingObject.addEventListener('readystatechange', check, {\n once: true\n });\n }\n };\n check();\n });\n }\n }]);\n return TimingSrcConnector;\n}( /*#__PURE__*/_wrapNativeSuper(EventTarget));\n\nvar playerMap = new WeakMap();\nvar readyMap = new WeakMap();\nvar screenfull = {};\nvar Player = /*#__PURE__*/function () {\n /**\n * Create a Player.\n *\n * @param {(HTMLIFrameElement|HTMLElement|string|jQuery)} element A reference to the Vimeo\n * player iframe, and id, or a jQuery object.\n * @param {object} [options] oEmbed parameters to use when creating an embed in the element.\n * @return {Player}\n */\n function Player(element) {\n var _this = this;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, Player);\n /* global jQuery */\n if (window.jQuery && element instanceof jQuery) {\n if (element.length > 1 && window.console && console.warn) {\n console.warn('A jQuery object with multiple elements was passed, using the first element.');\n }\n element = element[0];\n }\n\n // Find an element by ID\n if (typeof document !== 'undefined' && typeof element === 'string') {\n element = document.getElementById(element);\n }\n\n // Not an element!\n if (!isDomElement(element)) {\n throw new TypeError('You must pass either a valid element or a valid id.');\n }\n\n // Already initialized an embed in this div, so grab the iframe\n if (element.nodeName !== 'IFRAME') {\n var iframe = element.querySelector('iframe');\n if (iframe) {\n element = iframe;\n }\n }\n\n // iframe url is not a Vimeo url\n if (element.nodeName === 'IFRAME' && !isVimeoUrl(element.getAttribute('src') || '')) {\n throw new Error('The player element passed isn’t a Vimeo embed.');\n }\n\n // If there is already a player object in the map, return that\n if (playerMap.has(element)) {\n return playerMap.get(element);\n }\n this._window = element.ownerDocument.defaultView;\n this.element = element;\n this.origin = '*';\n var readyPromise = new npo_src(function (resolve, reject) {\n _this._onMessage = function (event) {\n if (!isVimeoUrl(event.origin) || _this.element.contentWindow !== event.source) {\n return;\n }\n if (_this.origin === '*') {\n _this.origin = event.origin;\n }\n var data = parseMessageData(event.data);\n var isError = data && data.event === 'error';\n var isReadyError = isError && data.data && data.data.method === 'ready';\n if (isReadyError) {\n var error = new Error(data.data.message);\n error.name = data.data.name;\n reject(error);\n return;\n }\n var isReadyEvent = data && data.event === 'ready';\n var isPingResponse = data && data.method === 'ping';\n if (isReadyEvent || isPingResponse) {\n _this.element.setAttribute('data-ready', 'true');\n resolve();\n return;\n }\n processData(_this, data);\n };\n _this._window.addEventListener('message', _this._onMessage);\n if (_this.element.nodeName !== 'IFRAME') {\n var params = getOEmbedParameters(element, options);\n var url = getVimeoUrl(params);\n getOEmbedData(url, params, element).then(function (data) {\n var iframe = createEmbed(data, element);\n // Overwrite element with the new iframe,\n // but store reference to the original element\n _this.element = iframe;\n _this._originalElement = element;\n swapCallbacks(element, iframe);\n playerMap.set(_this.element, _this);\n return data;\n }).catch(reject);\n }\n });\n\n // Store a copy of this Player in the map\n readyMap.set(this, readyPromise);\n playerMap.set(this.element, this);\n\n // Send a ping to the iframe so the ready promise will be resolved if\n // the player is already ready.\n if (this.element.nodeName === 'IFRAME') {\n postMessage(this, 'ping');\n }\n if (screenfull.isEnabled) {\n var exitFullscreen = function exitFullscreen() {\n return screenfull.exit();\n };\n this.fullscreenchangeHandler = function () {\n if (screenfull.isFullscreen) {\n storeCallback(_this, 'event:exitFullscreen', exitFullscreen);\n } else {\n removeCallback(_this, 'event:exitFullscreen', exitFullscreen);\n }\n // eslint-disable-next-line\n _this.ready().then(function () {\n postMessage(_this, 'fullscreenchange', screenfull.isFullscreen);\n });\n };\n screenfull.on('fullscreenchange', this.fullscreenchangeHandler);\n }\n return this;\n }\n\n /**\n * Get a promise for a method.\n *\n * @param {string} name The API method to call.\n * @param {Object} [args={}] Arguments to send via postMessage.\n * @return {Promise}\n */\n _createClass(Player, [{\n key: \"callMethod\",\n value: function callMethod(name) {\n var _this2 = this;\n var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new npo_src(function (resolve, reject) {\n // We are storing the resolve/reject handlers to call later, so we\n // can’t return here.\n // eslint-disable-next-line promise/always-return\n return _this2.ready().then(function () {\n storeCallback(_this2, name, {\n resolve: resolve,\n reject: reject\n });\n postMessage(_this2, name, args);\n }).catch(reject);\n });\n }\n\n /**\n * Get a promise for the value of a player property.\n *\n * @param {string} name The property name\n * @return {Promise}\n */\n }, {\n key: \"get\",\n value: function get(name) {\n var _this3 = this;\n return new npo_src(function (resolve, reject) {\n name = getMethodName(name, 'get');\n\n // We are storing the resolve/reject handlers to call later, so we\n // can’t return here.\n // eslint-disable-next-line promise/always-return\n return _this3.ready().then(function () {\n storeCallback(_this3, name, {\n resolve: resolve,\n reject: reject\n });\n postMessage(_this3, name);\n }).catch(reject);\n });\n }\n\n /**\n * Get a promise for setting the value of a player property.\n *\n * @param {string} name The API method to call.\n * @param {mixed} value The value to set.\n * @return {Promise}\n */\n }, {\n key: \"set\",\n value: function set(name, value) {\n var _this4 = this;\n return new npo_src(function (resolve, reject) {\n name = getMethodName(name, 'set');\n if (value === undefined || value === null) {\n throw new TypeError('There must be a value to set.');\n }\n\n // We are storing the resolve/reject handlers to call later, so we\n // can’t return here.\n // eslint-disable-next-line promise/always-return\n return _this4.ready().then(function () {\n storeCallback(_this4, name, {\n resolve: resolve,\n reject: reject\n });\n postMessage(_this4, name, value);\n }).catch(reject);\n });\n }\n\n /**\n * Add an event listener for the specified event. Will call the\n * callback with a single parameter, `data`, that contains the data for\n * that event.\n *\n * @param {string} eventName The name of the event.\n * @param {function(*)} callback The function to call when the event fires.\n * @return {void}\n */\n }, {\n key: \"on\",\n value: function on(eventName, callback) {\n if (!eventName) {\n throw new TypeError('You must pass an event name.');\n }\n if (!callback) {\n throw new TypeError('You must pass a callback function.');\n }\n if (typeof callback !== 'function') {\n throw new TypeError('The callback must be a function.');\n }\n var callbacks = getCallbacks(this, \"event:\".concat(eventName));\n if (callbacks.length === 0) {\n this.callMethod('addEventListener', eventName).catch(function () {\n // Ignore the error. There will be an error event fired that\n // will trigger the error callback if they are listening.\n });\n }\n storeCallback(this, \"event:\".concat(eventName), callback);\n }\n\n /**\n * Remove an event listener for the specified event. Will remove all\n * listeners for that event if a `callback` isn’t passed, or only that\n * specific callback if it is passed.\n *\n * @param {string} eventName The name of the event.\n * @param {function} [callback] The specific callback to remove.\n * @return {void}\n */\n }, {\n key: \"off\",\n value: function off(eventName, callback) {\n if (!eventName) {\n throw new TypeError('You must pass an event name.');\n }\n if (callback && typeof callback !== 'function') {\n throw new TypeError('The callback must be a function.');\n }\n var lastCallback = removeCallback(this, \"event:\".concat(eventName), callback);\n\n // If there are no callbacks left, remove the listener\n if (lastCallback) {\n this.callMethod('removeEventListener', eventName).catch(function (e) {\n // Ignore the error. There will be an error event fired that\n // will trigger the error callback if they are listening.\n });\n }\n }\n\n /**\n * A promise to load a new video.\n *\n * @promise LoadVideoPromise\n * @fulfill {number} The video with this id or url successfully loaded.\n * @reject {TypeError} The id was not a number.\n */\n /**\n * Load a new video into this embed. The promise will be resolved if\n * the video is successfully loaded, or it will be rejected if it could\n * not be loaded.\n *\n * @param {number|string|object} options The id of the video, the url of the video, or an object with embed options.\n * @return {LoadVideoPromise}\n */\n }, {\n key: \"loadVideo\",\n value: function loadVideo(options) {\n return this.callMethod('loadVideo', options);\n }\n\n /**\n * A promise to perform an action when the Player is ready.\n *\n * @todo document errors\n * @promise LoadVideoPromise\n * @fulfill {void}\n */\n /**\n * Trigger a function when the player iframe has initialized. You do not\n * need to wait for `ready` to trigger to begin adding event listeners\n * or calling other methods.\n *\n * @return {ReadyPromise}\n */\n }, {\n key: \"ready\",\n value: function ready() {\n var readyPromise = readyMap.get(this) || new npo_src(function (resolve, reject) {\n reject(new Error('Unknown player. Probably unloaded.'));\n });\n return npo_src.resolve(readyPromise);\n }\n\n /**\n * A promise to add a cue point to the player.\n *\n * @promise AddCuePointPromise\n * @fulfill {string} The id of the cue point to use for removeCuePoint.\n * @reject {RangeError} the time was less than 0 or greater than the\n * video’s duration.\n * @reject {UnsupportedError} Cue points are not supported with the current\n * player or browser.\n */\n /**\n * Add a cue point to the player.\n *\n * @param {number} time The time for the cue point.\n * @param {object} [data] Arbitrary data to be returned with the cue point.\n * @return {AddCuePointPromise}\n */\n }, {\n key: \"addCuePoint\",\n value: function addCuePoint(time) {\n var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return this.callMethod('addCuePoint', {\n time: time,\n data: data\n });\n }\n\n /**\n * A promise to remove a cue point from the player.\n *\n * @promise AddCuePointPromise\n * @fulfill {string} The id of the cue point that was removed.\n * @reject {InvalidCuePoint} The cue point with the specified id was not\n * found.\n * @reject {UnsupportedError} Cue points are not supported with the current\n * player or browser.\n */\n /**\n * Remove a cue point from the video.\n *\n * @param {string} id The id of the cue point to remove.\n * @return {RemoveCuePointPromise}\n */\n }, {\n key: \"removeCuePoint\",\n value: function removeCuePoint(id) {\n return this.callMethod('removeCuePoint', id);\n }\n\n /**\n * A representation of a text track on a video.\n *\n * @typedef {Object} VimeoTextTrack\n * @property {string} language The ISO language code.\n * @property {string} kind The kind of track it is (captions or subtitles).\n * @property {string} label The human‐readable label for the track.\n */\n /**\n * A promise to enable a text track.\n *\n * @promise EnableTextTrackPromise\n * @fulfill {VimeoTextTrack} The text track that was enabled.\n * @reject {InvalidTrackLanguageError} No track was available with the\n * specified language.\n * @reject {InvalidTrackError} No track was available with the specified\n * language and kind.\n */\n /**\n * Enable the text track with the specified language, and optionally the\n * specified kind (captions or subtitles).\n *\n * When set via the API, the track language will not change the viewer’s\n * stored preference.\n *\n * @param {string} language The two‐letter language code.\n * @param {string} [kind] The kind of track to enable (captions or subtitles).\n * @return {EnableTextTrackPromise}\n */\n }, {\n key: \"enableTextTrack\",\n value: function enableTextTrack(language, kind) {\n if (!language) {\n throw new TypeError('You must pass a language.');\n }\n return this.callMethod('enableTextTrack', {\n language: language,\n kind: kind\n });\n }\n\n /**\n * A promise to disable the active text track.\n *\n * @promise DisableTextTrackPromise\n * @fulfill {void} The track was disabled.\n */\n /**\n * Disable the currently-active text track.\n *\n * @return {DisableTextTrackPromise}\n */\n }, {\n key: \"disableTextTrack\",\n value: function disableTextTrack() {\n return this.callMethod('disableTextTrack');\n }\n\n /**\n * A promise to pause the video.\n *\n * @promise PausePromise\n * @fulfill {void} The video was paused.\n */\n /**\n * Pause the video if it’s playing.\n *\n * @return {PausePromise}\n */\n }, {\n key: \"pause\",\n value: function pause() {\n return this.callMethod('pause');\n }\n\n /**\n * A promise to play the video.\n *\n * @promise PlayPromise\n * @fulfill {void} The video was played.\n */\n /**\n * Play the video if it’s paused. **Note:** on iOS and some other\n * mobile devices, you cannot programmatically trigger play. Once the\n * viewer has tapped on the play button in the player, however, you\n * will be able to use this function.\n *\n * @return {PlayPromise}\n */\n }, {\n key: \"play\",\n value: function play() {\n return this.callMethod('play');\n }\n\n /**\n * Request that the player enters fullscreen.\n * @return {Promise}\n */\n }, {\n key: \"requestFullscreen\",\n value: function requestFullscreen() {\n if (screenfull.isEnabled) {\n return screenfull.request(this.element);\n }\n return this.callMethod('requestFullscreen');\n }\n\n /**\n * Request that the player exits fullscreen.\n * @return {Promise}\n */\n }, {\n key: \"exitFullscreen\",\n value: function exitFullscreen() {\n if (screenfull.isEnabled) {\n return screenfull.exit();\n }\n return this.callMethod('exitFullscreen');\n }\n\n /**\n * Returns true if the player is currently fullscreen.\n * @return {Promise}\n */\n }, {\n key: \"getFullscreen\",\n value: function getFullscreen() {\n if (screenfull.isEnabled) {\n return npo_src.resolve(screenfull.isFullscreen);\n }\n return this.get('fullscreen');\n }\n\n /**\n * Request that the player enters picture-in-picture.\n * @return {Promise}\n */\n }, {\n key: \"requestPictureInPicture\",\n value: function requestPictureInPicture() {\n return this.callMethod('requestPictureInPicture');\n }\n\n /**\n * Request that the player exits picture-in-picture.\n * @return {Promise}\n */\n }, {\n key: \"exitPictureInPicture\",\n value: function exitPictureInPicture() {\n return this.callMethod('exitPictureInPicture');\n }\n\n /**\n * Returns true if the player is currently picture-in-picture.\n * @return {Promise}\n */\n }, {\n key: \"getPictureInPicture\",\n value: function getPictureInPicture() {\n return this.get('pictureInPicture');\n }\n\n /**\n * A promise to prompt the viewer to initiate remote playback.\n *\n * @promise RemotePlaybackPromptPromise\n * @fulfill {void}\n * @reject {NotFoundError} No remote playback device is available.\n */\n /**\n * Request to prompt the user to initiate remote playback.\n *\n * @return {RemotePlaybackPromptPromise}\n */\n }, {\n key: \"remotePlaybackPrompt\",\n value: function remotePlaybackPrompt() {\n return this.callMethod('remotePlaybackPrompt');\n }\n\n /**\n * A promise to unload the video.\n *\n * @promise UnloadPromise\n * @fulfill {void} The video was unloaded.\n */\n /**\n * Return the player to its initial state.\n *\n * @return {UnloadPromise}\n */\n }, {\n key: \"unload\",\n value: function unload() {\n return this.callMethod('unload');\n }\n\n /**\n * Cleanup the player and remove it from the DOM\n *\n * It won't be usable and a new one should be constructed\n * in order to do any operations.\n *\n * @return {Promise}\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this5 = this;\n return new npo_src(function (resolve) {\n readyMap.delete(_this5);\n playerMap.delete(_this5.element);\n if (_this5._originalElement) {\n playerMap.delete(_this5._originalElement);\n _this5._originalElement.removeAttribute('data-vimeo-initialized');\n }\n if (_this5.element && _this5.element.nodeName === 'IFRAME' && _this5.element.parentNode) {\n // If we've added an additional wrapper div, remove that from the DOM.\n // If not, just remove the iframe element.\n if (_this5.element.parentNode.parentNode && _this5._originalElement && _this5._originalElement !== _this5.element.parentNode) {\n _this5.element.parentNode.parentNode.removeChild(_this5.element.parentNode);\n } else {\n _this5.element.parentNode.removeChild(_this5.element);\n }\n }\n\n // If the clip is private there is a case where the element stays the\n // div element. Destroy should reset the div and remove the iframe child.\n if (_this5.element && _this5.element.nodeName === 'DIV' && _this5.element.parentNode) {\n _this5.element.removeAttribute('data-vimeo-initialized');\n var iframe = _this5.element.querySelector('iframe');\n if (iframe && iframe.parentNode) {\n // If we've added an additional wrapper div, remove that from the DOM.\n // If not, just remove the iframe element.\n if (iframe.parentNode.parentNode && _this5._originalElement && _this5._originalElement !== iframe.parentNode) {\n iframe.parentNode.parentNode.removeChild(iframe.parentNode);\n } else {\n iframe.parentNode.removeChild(iframe);\n }\n }\n }\n _this5._window.removeEventListener('message', _this5._onMessage);\n if (screenfull.isEnabled) {\n screenfull.off('fullscreenchange', _this5.fullscreenchangeHandler);\n }\n resolve();\n });\n }\n\n /**\n * A promise to get the autopause behavior of the video.\n *\n * @promise GetAutopausePromise\n * @fulfill {boolean} Whether autopause is turned on or off.\n * @reject {UnsupportedError} Autopause is not supported with the current\n * player or browser.\n */\n /**\n * Get the autopause behavior for this player.\n *\n * @return {GetAutopausePromise}\n */\n }, {\n key: \"getAutopause\",\n value: function getAutopause() {\n return this.get('autopause');\n }\n\n /**\n * A promise to set the autopause behavior of the video.\n *\n * @promise SetAutopausePromise\n * @fulfill {boolean} Whether autopause is turned on or off.\n * @reject {UnsupportedError} Autopause is not supported with the current\n * player or browser.\n */\n /**\n * Enable or disable the autopause behavior of this player.\n *\n * By default, when another video is played in the same browser, this\n * player will automatically pause. Unless you have a specific reason\n * for doing so, we recommend that you leave autopause set to the\n * default (`true`).\n *\n * @param {boolean} autopause\n * @return {SetAutopausePromise}\n */\n }, {\n key: \"setAutopause\",\n value: function setAutopause(autopause) {\n return this.set('autopause', autopause);\n }\n\n /**\n * A promise to get the buffered property of the video.\n *\n * @promise GetBufferedPromise\n * @fulfill {Array} Buffered Timeranges converted to an Array.\n */\n /**\n * Get the buffered property of the video.\n *\n * @return {GetBufferedPromise}\n */\n }, {\n key: \"getBuffered\",\n value: function getBuffered() {\n return this.get('buffered');\n }\n\n /**\n * @typedef {Object} CameraProperties\n * @prop {number} props.yaw - Number between 0 and 360.\n * @prop {number} props.pitch - Number between -90 and 90.\n * @prop {number} props.roll - Number between -180 and 180.\n * @prop {number} props.fov - The field of view in degrees.\n */\n /**\n * A promise to get the camera properties of the player.\n *\n * @promise GetCameraPromise\n * @fulfill {CameraProperties} The camera properties.\n */\n /**\n * For 360° videos get the camera properties for this player.\n *\n * @return {GetCameraPromise}\n */\n }, {\n key: \"getCameraProps\",\n value: function getCameraProps() {\n return this.get('cameraProps');\n }\n\n /**\n * A promise to set the camera properties of the player.\n *\n * @promise SetCameraPromise\n * @fulfill {Object} The camera was successfully set.\n * @reject {RangeError} The range was out of bounds.\n */\n /**\n * For 360° videos set the camera properties for this player.\n *\n * @param {CameraProperties} camera The camera properties\n * @return {SetCameraPromise}\n */\n }, {\n key: \"setCameraProps\",\n value: function setCameraProps(camera) {\n return this.set('cameraProps', camera);\n }\n\n /**\n * A representation of a chapter.\n *\n * @typedef {Object} VimeoChapter\n * @property {number} startTime The start time of the chapter.\n * @property {object} title The title of the chapter.\n * @property {number} index The place in the order of Chapters. Starts at 1.\n */\n /**\n * A promise to get chapters for the video.\n *\n * @promise GetChaptersPromise\n * @fulfill {VimeoChapter[]} The chapters for the video.\n */\n /**\n * Get an array of all the chapters for the video.\n *\n * @return {GetChaptersPromise}\n */\n }, {\n key: \"getChapters\",\n value: function getChapters() {\n return this.get('chapters');\n }\n\n /**\n * A promise to get the currently active chapter.\n *\n * @promise GetCurrentChaptersPromise\n * @fulfill {VimeoChapter|undefined} The current chapter for the video.\n */\n /**\n * Get the currently active chapter for the video.\n *\n * @return {GetCurrentChaptersPromise}\n */\n }, {\n key: \"getCurrentChapter\",\n value: function getCurrentChapter() {\n return this.get('currentChapter');\n }\n\n /**\n * A promise to get the accent color of the player.\n *\n * @promise GetColorPromise\n * @fulfill {string} The hex color of the player.\n */\n /**\n * Get the accent color for this player. Note this is deprecated in place of `getColorTwo`.\n *\n * @return {GetColorPromise}\n */\n }, {\n key: \"getColor\",\n value: function getColor() {\n return this.get('color');\n }\n\n /**\n * A promise to get all colors for the player in an array.\n *\n * @promise GetColorsPromise\n * @fulfill {string[]} The hex colors of the player.\n */\n /**\n * Get all the colors for this player in an array: [colorOne, colorTwo, colorThree, colorFour]\n *\n * @return {GetColorPromise}\n */\n }, {\n key: \"getColors\",\n value: function getColors() {\n return npo_src.all([this.get('colorOne'), this.get('colorTwo'), this.get('colorThree'), this.get('colorFour')]);\n }\n\n /**\n * A promise to set the accent color of the player.\n *\n * @promise SetColorPromise\n * @fulfill {string} The color was successfully set.\n * @reject {TypeError} The string was not a valid hex or rgb color.\n * @reject {ContrastError} The color was set, but the contrast is\n * outside of the acceptable range.\n * @reject {EmbedSettingsError} The owner of the player has chosen to\n * use a specific color.\n */\n /**\n * Set the accent color of this player to a hex or rgb string. Setting the\n * color may fail if the owner of the video has set their embed\n * preferences to force a specific color.\n * Note this is deprecated in place of `setColorTwo`.\n *\n * @param {string} color The hex or rgb color string to set.\n * @return {SetColorPromise}\n */\n }, {\n key: \"setColor\",\n value: function setColor(color) {\n return this.set('color', color);\n }\n\n /**\n * A promise to set all colors for the player.\n *\n * @promise SetColorsPromise\n * @fulfill {string[]} The colors were successfully set.\n * @reject {TypeError} The string was not a valid hex or rgb color.\n * @reject {ContrastError} The color was set, but the contrast is\n * outside of the acceptable range.\n * @reject {EmbedSettingsError} The owner of the player has chosen to\n * use a specific color.\n */\n /**\n * Set the colors of this player to a hex or rgb string. Setting the\n * color may fail if the owner of the video has set their embed\n * preferences to force a specific color.\n * The colors should be passed in as an array: [colorOne, colorTwo, colorThree, colorFour].\n * If a color should not be set, the index in the array can be left as null.\n *\n * @param {string[]} colors Array of the hex or rgb color strings to set.\n * @return {SetColorsPromise}\n */\n }, {\n key: \"setColors\",\n value: function setColors(colors) {\n if (!Array.isArray(colors)) {\n return new npo_src(function (resolve, reject) {\n return reject(new TypeError('Argument must be an array.'));\n });\n }\n var nullPromise = new npo_src(function (resolve) {\n return resolve(null);\n });\n var colorPromises = [colors[0] ? this.set('colorOne', colors[0]) : nullPromise, colors[1] ? this.set('colorTwo', colors[1]) : nullPromise, colors[2] ? this.set('colorThree', colors[2]) : nullPromise, colors[3] ? this.set('colorFour', colors[3]) : nullPromise];\n return npo_src.all(colorPromises);\n }\n\n /**\n * A representation of a cue point.\n *\n * @typedef {Object} VimeoCuePoint\n * @property {number} time The time of the cue point.\n * @property {object} data The data passed when adding the cue point.\n * @property {string} id The unique id for use with removeCuePoint.\n */\n /**\n * A promise to get the cue points of a video.\n *\n * @promise GetCuePointsPromise\n * @fulfill {VimeoCuePoint[]} The cue points added to the video.\n * @reject {UnsupportedError} Cue points are not supported with the current\n * player or browser.\n */\n /**\n * Get an array of the cue points added to the video.\n *\n * @return {GetCuePointsPromise}\n */\n }, {\n key: \"getCuePoints\",\n value: function getCuePoints() {\n return this.get('cuePoints');\n }\n\n /**\n * A promise to get the current time of the video.\n *\n * @promise GetCurrentTimePromise\n * @fulfill {number} The current time in seconds.\n */\n /**\n * Get the current playback position in seconds.\n *\n * @return {GetCurrentTimePromise}\n */\n }, {\n key: \"getCurrentTime\",\n value: function getCurrentTime() {\n return this.get('currentTime');\n }\n\n /**\n * A promise to set the current time of the video.\n *\n * @promise SetCurrentTimePromise\n * @fulfill {number} The actual current time that was set.\n * @reject {RangeError} the time was less than 0 or greater than the\n * video’s duration.\n */\n /**\n * Set the current playback position in seconds. If the player was\n * paused, it will remain paused. Likewise, if the player was playing,\n * it will resume playing once the video has buffered.\n *\n * You can provide an accurate time and the player will attempt to seek\n * to as close to that time as possible. The exact time will be the\n * fulfilled value of the promise.\n *\n * @param {number} currentTime\n * @return {SetCurrentTimePromise}\n */\n }, {\n key: \"setCurrentTime\",\n value: function setCurrentTime(currentTime) {\n return this.set('currentTime', currentTime);\n }\n\n /**\n * A promise to get the duration of the video.\n *\n * @promise GetDurationPromise\n * @fulfill {number} The duration in seconds.\n */\n /**\n * Get the duration of the video in seconds. It will be rounded to the\n * nearest second before playback begins, and to the nearest thousandth\n * of a second after playback begins.\n *\n * @return {GetDurationPromise}\n */\n }, {\n key: \"getDuration\",\n value: function getDuration() {\n return this.get('duration');\n }\n\n /**\n * A promise to get the ended state of the video.\n *\n * @promise GetEndedPromise\n * @fulfill {boolean} Whether or not the video has ended.\n */\n /**\n * Get the ended state of the video. The video has ended if\n * `currentTime === duration`.\n *\n * @return {GetEndedPromise}\n */\n }, {\n key: \"getEnded\",\n value: function getEnded() {\n return this.get('ended');\n }\n\n /**\n * A promise to get the loop state of the player.\n *\n * @promise GetLoopPromise\n * @fulfill {boolean} Whether or not the player is set to loop.\n */\n /**\n * Get the loop state of the player.\n *\n * @return {GetLoopPromise}\n */\n }, {\n key: \"getLoop\",\n value: function getLoop() {\n return this.get('loop');\n }\n\n /**\n * A promise to set the loop state of the player.\n *\n * @promise SetLoopPromise\n * @fulfill {boolean} The loop state that was set.\n */\n /**\n * Set the loop state of the player. When set to `true`, the player\n * will start over immediately once playback ends.\n *\n * @param {boolean} loop\n * @return {SetLoopPromise}\n */\n }, {\n key: \"setLoop\",\n value: function setLoop(loop) {\n return this.set('loop', loop);\n }\n\n /**\n * A promise to set the muted state of the player.\n *\n * @promise SetMutedPromise\n * @fulfill {boolean} The muted state that was set.\n */\n /**\n * Set the muted state of the player. When set to `true`, the player\n * volume will be muted.\n *\n * @param {boolean} muted\n * @return {SetMutedPromise}\n */\n }, {\n key: \"setMuted\",\n value: function setMuted(muted) {\n return this.set('muted', muted);\n }\n\n /**\n * A promise to get the muted state of the player.\n *\n * @promise GetMutedPromise\n * @fulfill {boolean} Whether or not the player is muted.\n */\n /**\n * Get the muted state of the player.\n *\n * @return {GetMutedPromise}\n */\n }, {\n key: \"getMuted\",\n value: function getMuted() {\n return this.get('muted');\n }\n\n /**\n * A promise to get the paused state of the player.\n *\n * @promise GetLoopPromise\n * @fulfill {boolean} Whether or not the video is paused.\n */\n /**\n * Get the paused state of the player.\n *\n * @return {GetLoopPromise}\n */\n }, {\n key: \"getPaused\",\n value: function getPaused() {\n return this.get('paused');\n }\n\n /**\n * A promise to get the playback rate of the player.\n *\n * @promise GetPlaybackRatePromise\n * @fulfill {number} The playback rate of the player on a scale from 0 to 2.\n */\n /**\n * Get the playback rate of the player on a scale from `0` to `2`.\n *\n * @return {GetPlaybackRatePromise}\n */\n }, {\n key: \"getPlaybackRate\",\n value: function getPlaybackRate() {\n return this.get('playbackRate');\n }\n\n /**\n * A promise to set the playbackrate of the player.\n *\n * @promise SetPlaybackRatePromise\n * @fulfill {number} The playback rate was set.\n * @reject {RangeError} The playback rate was less than 0 or greater than 2.\n */\n /**\n * Set the playback rate of the player on a scale from `0` to `2`. When set\n * via the API, the playback rate will not be synchronized to other\n * players or stored as the viewer's preference.\n *\n * @param {number} playbackRate\n * @return {SetPlaybackRatePromise}\n */\n }, {\n key: \"setPlaybackRate\",\n value: function setPlaybackRate(playbackRate) {\n return this.set('playbackRate', playbackRate);\n }\n\n /**\n * A promise to get the played property of the video.\n *\n * @promise GetPlayedPromise\n * @fulfill {Array} Played Timeranges converted to an Array.\n */\n /**\n * Get the played property of the video.\n *\n * @return {GetPlayedPromise}\n */\n }, {\n key: \"getPlayed\",\n value: function getPlayed() {\n return this.get('played');\n }\n\n /**\n * A promise to get the qualities available of the current video.\n *\n * @promise GetQualitiesPromise\n * @fulfill {Array} The qualities of the video.\n */\n /**\n * Get the qualities of the current video.\n *\n * @return {GetQualitiesPromise}\n */\n }, {\n key: \"getQualities\",\n value: function getQualities() {\n return this.get('qualities');\n }\n\n /**\n * A promise to get the current set quality of the video.\n *\n * @promise GetQualityPromise\n * @fulfill {string} The current set quality.\n */\n /**\n * Get the current set quality of the video.\n *\n * @return {GetQualityPromise}\n */\n }, {\n key: \"getQuality\",\n value: function getQuality() {\n return this.get('quality');\n }\n\n /**\n * A promise to set the video quality.\n *\n * @promise SetQualityPromise\n * @fulfill {number} The quality was set.\n * @reject {RangeError} The quality is not available.\n */\n /**\n * Set a video quality.\n *\n * @param {string} quality\n * @return {SetQualityPromise}\n */\n }, {\n key: \"setQuality\",\n value: function setQuality(quality) {\n return this.set('quality', quality);\n }\n\n /**\n * A promise to get the remote playback availability.\n *\n * @promise RemotePlaybackAvailabilityPromise\n * @fulfill {boolean} Whether remote playback is available.\n */\n /**\n * Get the availability of remote playback.\n *\n * @return {RemotePlaybackAvailabilityPromise}\n */\n }, {\n key: \"getRemotePlaybackAvailability\",\n value: function getRemotePlaybackAvailability() {\n return this.get('remotePlaybackAvailability');\n }\n\n /**\n * A promise to get the current remote playback state.\n *\n * @promise RemotePlaybackStatePromise\n * @fulfill {string} The state of the remote playback: connecting, connected, or disconnected.\n */\n /**\n * Get the current remote playback state.\n *\n * @return {RemotePlaybackStatePromise}\n */\n }, {\n key: \"getRemotePlaybackState\",\n value: function getRemotePlaybackState() {\n return this.get('remotePlaybackState');\n }\n\n /**\n * A promise to get the seekable property of the video.\n *\n * @promise GetSeekablePromise\n * @fulfill {Array} Seekable Timeranges converted to an Array.\n */\n /**\n * Get the seekable property of the video.\n *\n * @return {GetSeekablePromise}\n */\n }, {\n key: \"getSeekable\",\n value: function getSeekable() {\n return this.get('seekable');\n }\n\n /**\n * A promise to get the seeking property of the player.\n *\n * @promise GetSeekingPromise\n * @fulfill {boolean} Whether or not the player is currently seeking.\n */\n /**\n * Get if the player is currently seeking.\n *\n * @return {GetSeekingPromise}\n */\n }, {\n key: \"getSeeking\",\n value: function getSeeking() {\n return this.get('seeking');\n }\n\n /**\n * A promise to get the text tracks of a video.\n *\n * @promise GetTextTracksPromise\n * @fulfill {VimeoTextTrack[]} The text tracks associated with the video.\n */\n /**\n * Get an array of the text tracks that exist for the video.\n *\n * @return {GetTextTracksPromise}\n */\n }, {\n key: \"getTextTracks\",\n value: function getTextTracks() {\n return this.get('textTracks');\n }\n\n /**\n * A promise to get the embed code for the video.\n *\n * @promise GetVideoEmbedCodePromise\n * @fulfill {string} The `\r\n \r\n\r\n\r\n\r\n\r\n","import{computed as p,ref as s}from\"vue\";function d(u,e,r){let i=s(r==null?void 0:r.value),f=p(()=>u.value!==void 0);return[p(()=>f.value?u.value:i.value),function(t){return f.value||(i.value=t),e==null?void 0:e(t)}]}export{d as useControllable};\n","function t(e){typeof queueMicrotask==\"function\"?queueMicrotask(e):Promise.resolve().then(e).catch(o=>setTimeout(()=>{throw o}))}export{t as microTask};\n","import{microTask as n}from'./micro-task.js';function o(){let a=[],s={addEventListener(e,t,r,i){return e.addEventListener(t,r,i),s.add(()=>e.removeEventListener(t,r,i))},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);s.add(()=>cancelAnimationFrame(t))},nextFrame(...e){s.requestAnimationFrame(()=>{s.requestAnimationFrame(...e)})},setTimeout(...e){let t=setTimeout(...e);s.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return n(()=>{t.current&&e[0]()}),s.add(()=>{t.current=!1})},style(e,t,r){let i=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add(()=>{Object.assign(e.style,{[t]:i})})},group(e){let t=o();return e(t),this.add(()=>t.dispose())},add(e){return a.push(e),()=>{let t=a.indexOf(e);if(t>=0)for(let r of a.splice(t,1))r()}},dispose(){for(let e of a.splice(0))e()}};return s}export{o as disposables};\n","import{inject as n,provide as r}from\"vue\";let t=Symbol(\"headlessui.useid\"),i=0;function I(){return n(t,()=>`${++i}`)()}function l(e){r(t,e)}export{l as provideUseId,I as useId};\n","function o(e){var l;if(e==null||e.value==null)return null;let n=(l=e.value.$el)!=null?l:e.value;return n instanceof Node?n:null}export{o as dom};\n","function u(r,n,...a){if(r in n){let e=n[r];return typeof e==\"function\"?e(...a):e}let t=new Error(`Tried to handle \"${r}\" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(e=>`\"${e}\"`).join(\", \")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,u),t}export{u as match};\n","var i=Object.defineProperty;var d=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var n=(t,e,r)=>(d(t,typeof e!=\"symbol\"?e+\"\":e,r),r);class s{constructor(){n(this,\"current\",this.detect());n(this,\"currentId\",0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===\"server\"}get isClient(){return this.current===\"client\"}detect(){return typeof window==\"undefined\"||typeof document==\"undefined\"?\"server\":\"client\"}}let c=new s;export{c as env};\n","import{dom as o}from'./dom.js';import{env as t}from'./env.js';function i(r){if(t.isServer)return null;if(r instanceof Node)return r.ownerDocument;if(r!=null&&r.hasOwnProperty(\"value\")){let n=o(r);if(n)return n.ownerDocument}return document}export{i as getOwnerDocument};\n","import{nextTick as b}from\"vue\";import{match as M}from'./match.js';import{getOwnerDocument as f}from'./owner.js';let c=[\"[contentEditable=true]\",\"[tabindex]\",\"a[href]\",\"area[href]\",\"button:not([disabled])\",\"iframe\",\"input:not([disabled])\",\"select:not([disabled])\",\"textarea:not([disabled])\"].map(e=>`${e}:not([tabindex='-1'])`).join(\",\");var N=(n=>(n[n.First=1]=\"First\",n[n.Previous=2]=\"Previous\",n[n.Next=4]=\"Next\",n[n.Last=8]=\"Last\",n[n.WrapAround=16]=\"WrapAround\",n[n.NoScroll=32]=\"NoScroll\",n))(N||{}),T=(o=>(o[o.Error=0]=\"Error\",o[o.Overflow=1]=\"Overflow\",o[o.Success=2]=\"Success\",o[o.Underflow=3]=\"Underflow\",o))(T||{}),F=(t=>(t[t.Previous=-1]=\"Previous\",t[t.Next=1]=\"Next\",t))(F||{});function E(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(c)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var h=(t=>(t[t.Strict=0]=\"Strict\",t[t.Loose=1]=\"Loose\",t))(h||{});function w(e,r=0){var t;return e===((t=f(e))==null?void 0:t.body)?!1:M(r,{[0](){return e.matches(c)},[1](){let l=e;for(;l!==null;){if(l.matches(c))return!0;l=l.parentElement}return!1}})}function _(e){let r=f(e);b(()=>{r&&!w(r.activeElement,0)&&S(e)})}var y=(t=>(t[t.Keyboard=0]=\"Keyboard\",t[t.Mouse=1]=\"Mouse\",t))(y||{});typeof window!=\"undefined\"&&typeof document!=\"undefined\"&&(document.addEventListener(\"keydown\",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible=\"\")},!0),document.addEventListener(\"click\",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible=\"\")},!0));function S(e){e==null||e.focus({preventScroll:!0})}let H=[\"textarea\",\"input\"].join(\",\");function I(e){var r,t;return(t=(r=e==null?void 0:e.matches)==null?void 0:r.call(e,H))!=null?t:!1}function O(e,r=t=>t){return e.slice().sort((t,l)=>{let o=r(t),i=r(l);if(o===null||i===null)return 0;let n=o.compareDocumentPosition(i);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function v(e,r){return P(E(),r,{relativeTo:e})}function P(e,r,{sorted:t=!0,relativeTo:l=null,skipElements:o=[]}={}){var m;let i=(m=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?m:document,n=Array.isArray(e)?t?O(e):e:E(e);o.length>0&&n.length>1&&(n=n.filter(s=>!o.includes(s))),l=l!=null?l:i.activeElement;let x=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error(\"Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last\")})(),p=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,n.indexOf(l))-1;if(r&4)return Math.max(0,n.indexOf(l))+1;if(r&8)return n.length-1;throw new Error(\"Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last\")})(),L=r&32?{preventScroll:!0}:{},a=0,d=n.length,u;do{if(a>=d||a+d<=0)return 0;let s=p+a;if(r&16)s=(s+d)%d;else{if(s<0)return 3;if(s>=d)return 1}u=n[s],u==null||u.focus(L),a+=x}while(u!==i.activeElement);return r&6&&I(u)&&u.select(),2}export{N as Focus,T as FocusResult,h as FocusableMode,S as focusElement,v as focusFrom,P as focusIn,E as getFocusableElements,w as isFocusableElement,_ as restoreFocusIfNecessary,O as sortByDomNode};\n","function t(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function i(){return/Android/gi.test(window.navigator.userAgent)}function n(){return t()||i()}export{i as isAndroid,t as isIOS,n as isMobile};\n","import{watchEffect as r}from\"vue\";import{env as m}from'../utils/env.js';function u(e,t,n){m.isServer||r(o=>{document.addEventListener(e,t,n),o(()=>document.removeEventListener(e,t,n))})}export{u as useDocumentEvent};\n","import{watchEffect as i}from\"vue\";import{env as r}from'../utils/env.js';function w(e,n,t){r.isServer||i(o=>{window.addEventListener(e,n,t),o(()=>window.removeEventListener(e,n,t))})}export{w as useWindowEvent};\n","import{computed as s,ref as E}from\"vue\";import{dom as p}from'../utils/dom.js';import{FocusableMode as d,isFocusableElement as C}from'../utils/focus-management.js';import{isMobile as T}from'../utils/platform.js';import{useDocumentEvent as i}from'./use-document-event.js';import{useWindowEvent as M}from'./use-window-event.js';function w(f,m,l=s(()=>!0)){function a(e,r){if(!l.value||e.defaultPrevented)return;let t=r(e);if(t===null||!t.getRootNode().contains(t))return;let c=function o(n){return typeof n==\"function\"?o(n()):Array.isArray(n)||n instanceof Set?n:[n]}(f);for(let o of c){if(o===null)continue;let n=o instanceof HTMLElement?o:p(o);if(n!=null&&n.contains(t)||e.composed&&e.composedPath().includes(n))return}return!C(t,d.Loose)&&t.tabIndex!==-1&&e.preventDefault(),m(e,t)}let u=E(null);i(\"pointerdown\",e=>{var r,t;l.value&&(u.value=((t=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:t[0])||e.target)},!0),i(\"mousedown\",e=>{var r,t;l.value&&(u.value=((t=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:t[0])||e.target)},!0),i(\"click\",e=>{T()||u.value&&(a(e,()=>u.value),u.value=null)},!0),i(\"touchend\",e=>a(e,()=>e.target instanceof HTMLElement?e.target:null),!0),M(\"blur\",e=>a(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}export{w as useOutsideClick};\n","import{watchEffect as p}from\"vue\";import{getOwnerDocument as u}from'../utils/owner.js';function i({container:e,accept:t,walk:d,enabled:o}){p(()=>{let r=e.value;if(!r||o!==void 0&&!o.value)return;let l=u(e);if(!l)return;let c=Object.assign(f=>t(f),{acceptNode:t}),n=l.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,c,!1);for(;n.nextNode();)d(n.currentNode)})}export{i as useTreeWalker};\n","import{cloneVNode as O,Fragment as x,h as k}from\"vue\";import{match as w}from'./match.js';var N=(o=>(o[o.None=0]=\"None\",o[o.RenderStrategy=1]=\"RenderStrategy\",o[o.Static=2]=\"Static\",o))(N||{}),S=(e=>(e[e.Unmount=0]=\"Unmount\",e[e.Hidden=1]=\"Hidden\",e))(S||{});function A({visible:r=!0,features:t=0,ourProps:e,theirProps:o,...i}){var a;let n=j(o,e),l=Object.assign(i,{props:n});if(r||t&2&&n.static)return y(l);if(t&1){let d=(a=n.unmount)==null||a?0:1;return w(d,{[0](){return null},[1](){return y({...i,props:{...n,hidden:!0,style:{display:\"none\"}}})}})}return y(l)}function y({props:r,attrs:t,slots:e,slot:o,name:i}){var m,h;let{as:n,...l}=T(r,[\"unmount\",\"static\"]),a=(m=e.default)==null?void 0:m.call(e,o),d={};if(o){let u=!1,c=[];for(let[p,f]of Object.entries(o))typeof f==\"boolean\"&&(u=!0),f===!0&&c.push(p);u&&(d[\"data-headlessui-state\"]=c.join(\" \"))}if(n===\"template\"){if(a=b(a!=null?a:[]),Object.keys(l).length>0||Object.keys(t).length>0){let[u,...c]=a!=null?a:[];if(!v(u)||c.length>0)throw new Error(['Passing props on \"template\"!',\"\",`The current component <${i} /> is rendering a \"template\".`,\"However we need to passthrough the following props:\",Object.keys(l).concat(Object.keys(t)).map(s=>s.trim()).filter((s,g,R)=>R.indexOf(s)===g).sort((s,g)=>s.localeCompare(g)).map(s=>` - ${s}`).join(`\n`),\"\",\"You can apply a few solutions:\",['Add an `as=\"...\"` prop, to ensure that we render an actual element instead of a \"template\".',\"Render a single element as the child so that we can forward the props onto that element.\"].map(s=>` - ${s}`).join(`\n`)].join(`\n`));let p=j((h=u.props)!=null?h:{},l,d),f=O(u,p,!0);for(let s in p)s.startsWith(\"on\")&&(f.props||(f.props={}),f.props[s]=p[s]);return f}return Array.isArray(a)&&a.length===1?a[0]:a}return k(n,Object.assign({},l,d),{default:()=>a})}function b(r){return r.flatMap(t=>t.type===x?b(t.children):[t])}function j(...r){var o;if(r.length===0)return{};if(r.length===1)return r[0];let t={},e={};for(let i of r)for(let n in i)n.startsWith(\"on\")&&typeof i[n]==\"function\"?((o=e[n])!=null||(e[n]=[]),e[n].push(i[n])):t[n]=i[n];if(t.disabled||t[\"aria-disabled\"])return Object.assign(t,Object.fromEntries(Object.keys(e).map(i=>[i,void 0])));for(let i in e)Object.assign(t,{[i](n,...l){let a=e[i];for(let d of a){if(n instanceof Event&&n.defaultPrevented)return;d(n,...l)}}});return t}function E(r){let t=Object.assign({},r);for(let e in t)t[e]===void 0&&delete t[e];return t}function T(r,t=[]){let e=Object.assign({},r);for(let o of t)o in e&&delete e[o];return e}function v(r){return r==null?!1:typeof r.type==\"string\"||typeof r.type==\"object\"||typeof r.type==\"function\"}export{N as Features,S as RenderStrategy,E as compact,T as omit,A as render};\n","import{defineComponent as a}from\"vue\";import{render as p}from'../utils/render.js';var u=(e=>(e[e.None=1]=\"None\",e[e.Focusable=2]=\"Focusable\",e[e.Hidden=4]=\"Hidden\",e))(u||{});let f=a({name:\"Hidden\",props:{as:{type:[Object,String],default:\"div\"},features:{type:Number,default:1}},setup(t,{slots:n,attrs:i}){return()=>{var r;let{features:e,...d}=t,o={\"aria-hidden\":(e&2)===2?!0:(r=d[\"aria-hidden\"])!=null?r:void 0,hidden:(e&4)===4?!0:void 0,style:{position:\"fixed\",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",whiteSpace:\"nowrap\",borderWidth:\"0\",...(e&4)===4&&(e&2)!==2&&{display:\"none\"}}};return p({ourProps:o,theirProps:d,slot:{},attrs:i,slots:n,name:\"Hidden\"})}}});export{u as Features,f as Hidden};\n","import{inject as p,provide as r}from\"vue\";let n=Symbol(\"Context\");var i=(e=>(e[e.Open=1]=\"Open\",e[e.Closed=2]=\"Closed\",e[e.Closing=4]=\"Closing\",e[e.Opening=8]=\"Opening\",e))(i||{});function s(){return l()!==null}function l(){return p(n,null)}function t(o){r(n,o)}export{i as State,s as hasOpenClosed,l as useOpenClosed,t as useOpenClosedProvider};\n","var o=(r=>(r.Space=\" \",r.Enter=\"Enter\",r.Escape=\"Escape\",r.Backspace=\"Backspace\",r.Delete=\"Delete\",r.ArrowLeft=\"ArrowLeft\",r.ArrowUp=\"ArrowUp\",r.ArrowRight=\"ArrowRight\",r.ArrowDown=\"ArrowDown\",r.Home=\"Home\",r.End=\"End\",r.PageUp=\"PageUp\",r.PageDown=\"PageDown\",r.Tab=\"Tab\",r))(o||{});export{o as Keys};\n","function t(n){function e(){document.readyState!==\"loading\"&&(n(),document.removeEventListener(\"DOMContentLoaded\",e))}typeof window!=\"undefined\"&&typeof document!=\"undefined\"&&(document.addEventListener(\"DOMContentLoaded\",e),e())}export{t as onDocumentReady};\n","import{onDocumentReady as d}from'./document-ready.js';let t=[];d(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&t[0]!==n.target&&(t.unshift(n.target),t=t.filter(r=>r!=null&&r.isConnected),t.splice(10))}window.addEventListener(\"click\",e,{capture:!0}),window.addEventListener(\"mousedown\",e,{capture:!0}),window.addEventListener(\"focus\",e,{capture:!0}),document.body.addEventListener(\"click\",e,{capture:!0}),document.body.addEventListener(\"mousedown\",e,{capture:!0}),document.body.addEventListener(\"focus\",e,{capture:!0})});export{t as history};\n","function e(i={},s=null,t=[]){for(let[r,n]of Object.entries(i))o(t,f(s,r),n);return t}function f(i,s){return i?i+\"[\"+s+\"]\":s}function o(i,s,t){if(Array.isArray(t))for(let[r,n]of t.entries())o(i,f(s,r.toString()),n);else t instanceof Date?i.push([s,t.toISOString()]):typeof t==\"boolean\"?i.push([s,t?\"1\":\"0\"]):typeof t==\"string\"?i.push([s,t]):typeof t==\"number\"?i.push([s,`${t}`]):t==null?i.push([s,\"\"]):e(t,s,i)}function p(i){var t,r;let s=(t=i==null?void 0:i.form)!=null?t:i.closest(\"form\");if(s){for(let n of s.elements)if(n!==i&&(n.tagName===\"INPUT\"&&n.type===\"submit\"||n.tagName===\"BUTTON\"&&n.type===\"submit\"||n.nodeName===\"INPUT\"&&n.type===\"image\")){n.click();return}(r=s.requestSubmit)==null||r.call(s)}}export{p as attemptSubmit,e as objectToFormEntries};\n","import{watchEffect as i}from\"vue\";import{env as a}from'../utils/env.js';function E(n,e,o,r){a.isServer||i(t=>{n=n!=null?n:window,n.addEventListener(e,o,r),t(()=>n.removeEventListener(e,o,r))})}export{E as useEventListener};\n","import{ref as a}from\"vue\";import{useWindowEvent as t}from'./use-window-event.js';var d=(r=>(r[r.Forwards=0]=\"Forwards\",r[r.Backwards=1]=\"Backwards\",r))(d||{});function n(){let o=a(0);return t(\"keydown\",e=>{e.key===\"Tab\"&&(o.value=e.shiftKey?1:0)}),o}export{d as Direction,n as useTabDirection};\n","import{computed as L,defineComponent as I,Fragment as j,h as R,onMounted as M,onUnmounted as h,ref as E,watch as g,watchEffect as K}from\"vue\";import{useEventListener as U}from'../../hooks/use-event-listener.js';import{Direction as y,useTabDirection as _}from'../../hooks/use-tab-direction.js';import{Features as k,Hidden as D}from'../../internal/hidden.js';import{history as C}from'../../utils/active-element-history.js';import{dom as c}from'../../utils/dom.js';import{Focus as v,focusElement as p,focusIn as b,FocusResult as q}from'../../utils/focus-management.js';import{match as P}from'../../utils/match.js';import{microTask as S}from'../../utils/micro-task.js';import{getOwnerDocument as x}from'../../utils/owner.js';import{render as G}from'../../utils/render.js';function B(t){if(!t)return new Set;if(typeof t==\"function\")return new Set(t());let n=new Set;for(let r of t.value){let l=c(r);l instanceof HTMLElement&&n.add(l)}return n}var A=(e=>(e[e.None=1]=\"None\",e[e.InitialFocus=2]=\"InitialFocus\",e[e.TabLock=4]=\"TabLock\",e[e.FocusLock=8]=\"FocusLock\",e[e.RestoreFocus=16]=\"RestoreFocus\",e[e.All=30]=\"All\",e))(A||{});let ue=Object.assign(I({name:\"FocusTrap\",props:{as:{type:[Object,String],default:\"div\"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:E(new Set)}},inheritAttrs:!1,setup(t,{attrs:n,slots:r,expose:l}){let o=E(null);l({el:o,$el:o});let i=L(()=>x(o)),e=E(!1);M(()=>e.value=!0),h(()=>e.value=!1),$({ownerDocument:i},L(()=>e.value&&Boolean(t.features&16)));let m=z({ownerDocument:i,container:o,initialFocus:L(()=>t.initialFocus)},L(()=>e.value&&Boolean(t.features&2)));J({ownerDocument:i,container:o,containers:t.containers,previousActiveElement:m},L(()=>e.value&&Boolean(t.features&8)));let f=_();function a(u){let T=c(o);if(!T)return;(w=>w())(()=>{P(f.value,{[y.Forwards]:()=>{b(T,v.First,{skipElements:[u.relatedTarget]})},[y.Backwards]:()=>{b(T,v.Last,{skipElements:[u.relatedTarget]})}})})}let s=E(!1);function F(u){u.key===\"Tab\"&&(s.value=!0,requestAnimationFrame(()=>{s.value=!1}))}function H(u){if(!e.value)return;let T=B(t.containers);c(o)instanceof HTMLElement&&T.add(c(o));let d=u.relatedTarget;d instanceof HTMLElement&&d.dataset.headlessuiFocusGuard!==\"true\"&&(N(T,d)||(s.value?b(c(o),P(f.value,{[y.Forwards]:()=>v.Next,[y.Backwards]:()=>v.Previous})|v.WrapAround,{relativeTo:u.target}):u.target instanceof HTMLElement&&p(u.target)))}return()=>{let u={},T={ref:o,onKeydown:F,onFocusout:H},{features:d,initialFocus:w,containers:Q,...O}=t;return R(j,[Boolean(d&4)&&R(D,{as:\"button\",type:\"button\",\"data-headlessui-focus-guard\":!0,onFocus:a,features:k.Focusable}),G({ourProps:T,theirProps:{...n,...O},slot:u,attrs:n,slots:r,name:\"FocusTrap\"}),Boolean(d&4)&&R(D,{as:\"button\",type:\"button\",\"data-headlessui-focus-guard\":!0,onFocus:a,features:k.Focusable})])}}}),{features:A});function W(t){let n=E(C.slice());return g([t],([r],[l])=>{l===!0&&r===!1?S(()=>{n.value.splice(0)}):l===!1&&r===!0&&(n.value=C.slice())},{flush:\"post\"}),()=>{var r;return(r=n.value.find(l=>l!=null&&l.isConnected))!=null?r:null}}function $({ownerDocument:t},n){let r=W(n);M(()=>{K(()=>{var l,o;n.value||((l=t.value)==null?void 0:l.activeElement)===((o=t.value)==null?void 0:o.body)&&p(r())},{flush:\"post\"})}),h(()=>{n.value&&p(r())})}function z({ownerDocument:t,container:n,initialFocus:r},l){let o=E(null),i=E(!1);return M(()=>i.value=!0),h(()=>i.value=!1),M(()=>{g([n,r,l],(e,m)=>{if(e.every((a,s)=>(m==null?void 0:m[s])===a)||!l.value)return;let f=c(n);f&&S(()=>{var F,H;if(!i.value)return;let a=c(r),s=(F=t.value)==null?void 0:F.activeElement;if(a){if(a===s){o.value=s;return}}else if(f.contains(s)){o.value=s;return}a?p(a):b(f,v.First|v.NoScroll)===q.Error&&console.warn(\"There are no focusable elements inside the \"),o.value=(H=t.value)==null?void 0:H.activeElement})},{immediate:!0,flush:\"post\"})}),o}function J({ownerDocument:t,container:n,containers:r,previousActiveElement:l},o){var i;U((i=t.value)==null?void 0:i.defaultView,\"focus\",e=>{if(!o.value)return;let m=B(r);c(n)instanceof HTMLElement&&m.add(c(n));let f=l.value;if(!f)return;let a=e.target;a&&a instanceof HTMLElement?N(m,a)?(l.value=a,p(a)):(e.preventDefault(),e.stopPropagation(),p(f)):p(l.value)},!0)}function N(t,n){for(let r of t)if(r.contains(n))return!0;return!1}export{ue as FocusTrap};\n","import{onUnmounted as o,shallowRef as n}from\"vue\";function m(t){let e=n(t.getSnapshot());return o(t.subscribe(()=>{e.value=t.getSnapshot()})),e}export{m as useStore};\n","function a(o,r){let t=o(),n=new Set;return{getSnapshot(){return t},subscribe(e){return n.add(e),()=>n.delete(e)},dispatch(e,...s){let i=r[e].call(t,...s);i&&(t=i,n.forEach(c=>c()))}}}export{a as createStore};\n","function c(){let o;return{before({doc:e}){var l;let n=e.documentElement;o=((l=e.defaultView)!=null?l:window).innerWidth-n.clientWidth},after({doc:e,d:n}){let t=e.documentElement,l=t.clientWidth-t.offsetWidth,r=o-l;n.style(t,\"paddingRight\",`${r}px`)}}}export{c as adjustScrollbarPadding};\n","import{disposables as m}from'../../utils/disposables.js';import{isIOS as u}from'../../utils/platform.js';function w(){return u()?{before({doc:r,d:n,meta:c}){function a(o){return c.containers.flatMap(l=>l()).some(l=>l.contains(o))}n.microTask(()=>{var s;if(window.getComputedStyle(r.documentElement).scrollBehavior!==\"auto\"){let t=m();t.style(r.documentElement,\"scrollBehavior\",\"auto\"),n.add(()=>n.microTask(()=>t.dispose()))}let o=(s=window.scrollY)!=null?s:window.pageYOffset,l=null;n.addEventListener(r,\"click\",t=>{if(t.target instanceof HTMLElement)try{let e=t.target.closest(\"a\");if(!e)return;let{hash:f}=new URL(e.href),i=r.querySelector(f);i&&!a(i)&&(l=i)}catch{}},!0),n.addEventListener(r,\"touchstart\",t=>{if(t.target instanceof HTMLElement)if(a(t.target)){let e=t.target;for(;e.parentElement&&a(e.parentElement);)e=e.parentElement;n.style(e,\"overscrollBehavior\",\"contain\")}else n.style(t.target,\"touchAction\",\"none\")}),n.addEventListener(r,\"touchmove\",t=>{if(t.target instanceof HTMLElement){if(t.target.tagName===\"INPUT\")return;if(a(t.target)){let e=t.target;for(;e.parentElement&&e.dataset.headlessuiPortal!==\"\"&&!(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth);)e=e.parentElement;e.dataset.headlessuiPortal===\"\"&&t.preventDefault()}else t.preventDefault()}},{passive:!1}),n.add(()=>{var e;let t=(e=window.scrollY)!=null?e:window.pageYOffset;o!==t&&window.scrollTo(0,o),l&&l.isConnected&&(l.scrollIntoView({block:\"nearest\"}),l=null)})})}}:{}}export{w as handleIOSLocking};\n","function l(){return{before({doc:e,d:o}){o.style(e.documentElement,\"overflow\",\"hidden\")}}}export{l as preventScroll};\n","import{disposables as s}from'../../utils/disposables.js';import{createStore as i}from'../../utils/store.js';import{adjustScrollbarPadding as l}from'./adjust-scrollbar-padding.js';import{handleIOSLocking as d}from'./handle-ios-locking.js';import{preventScroll as p}from'./prevent-scroll.js';function m(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let a=i(()=>new Map,{PUSH(e,n){var o;let t=(o=this.get(e))!=null?o:{doc:e,count:0,d:s(),meta:new Set};return t.count++,t.meta.add(n),this.set(e,t),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let o={doc:e,d:n,meta:m(t)},c=[d(),l(),p()];c.forEach(({before:r})=>r==null?void 0:r(o)),c.forEach(({after:r})=>r==null?void 0:r(o))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});a.subscribe(()=>{let e=a.getSnapshot(),n=new Map;for(let[t]of e)n.set(t,t.documentElement.style.overflow);for(let t of e.values()){let o=n.get(t.doc)===\"hidden\",c=t.count!==0;(c&&!o||!c&&o)&&a.dispatch(t.count>0?\"SCROLL_PREVENT\":\"SCROLL_ALLOW\",t),t.count===0&&a.dispatch(\"TEARDOWN\",t)}});export{a as overflows};\n","import{computed as p,watch as s}from\"vue\";import{useStore as v}from'../../hooks/use-store.js';import{overflows as u}from'./overflow-store.js';function d(t,a,n){let i=v(u),l=p(()=>{let e=t.value?i.value.get(t.value):void 0;return e?e.count>0:!1});return s([t,a],([e,m],[r],o)=>{if(!e||!m)return;u.dispatch(\"PUSH\",e,n);let f=!1;o(()=>{f||(u.dispatch(\"POP\",r!=null?r:e,n),f=!0)})},{immediate:!0}),l}export{d as useDocumentOverflowLockedEffect};\n","import{ref as m,watchEffect as s}from\"vue\";import{dom as h}from'../utils/dom.js';let i=new Map,t=new Map;function E(d,f=m(!0)){s(o=>{var a;if(!f.value)return;let e=h(d);if(!e)return;o(function(){var u;if(!e)return;let r=(u=t.get(e))!=null?u:1;if(r===1?t.delete(e):t.set(e,r-1),r!==1)return;let n=i.get(e);n&&(n[\"aria-hidden\"]===null?e.removeAttribute(\"aria-hidden\"):e.setAttribute(\"aria-hidden\",n[\"aria-hidden\"]),e.inert=n.inert,i.delete(e))});let l=(a=t.get(e))!=null?a:0;t.set(e,l+1),l===0&&(i.set(e,{\"aria-hidden\":e.getAttribute(\"aria-hidden\"),inert:e.inert}),e.setAttribute(\"aria-hidden\",\"true\"),e.inert=!0)})}export{E as useInert};\n","import{h as m,ref as s}from\"vue\";import{Features as d,Hidden as c}from'../internal/hidden.js';import{dom as T}from'../utils/dom.js';import{getOwnerDocument as E}from'../utils/owner.js';function N({defaultContainers:o=[],portals:i,mainTreeNodeRef:H}={}){let t=s(null),r=E(t);function u(){var l,f,a;let n=[];for(let e of o)e!==null&&(e instanceof HTMLElement?n.push(e):\"value\"in e&&e.value instanceof HTMLElement&&n.push(e.value));if(i!=null&&i.value)for(let e of i.value)n.push(e);for(let e of(l=r==null?void 0:r.querySelectorAll(\"html > *, body > *\"))!=null?l:[])e!==document.body&&e!==document.head&&e instanceof HTMLElement&&e.id!==\"headlessui-portal-root\"&&(e.contains(T(t))||e.contains((a=(f=T(t))==null?void 0:f.getRootNode())==null?void 0:a.host)||n.some(M=>e.contains(M))||n.push(e));return n}return{resolveContainers:u,contains(n){return u().some(l=>l.contains(n))},mainTreeNodeRef:t,MainTreeNode(){return H!=null?null:m(c,{features:d.Hidden,ref:t})}}}function v(){let o=s(null);return{mainTreeNodeRef:o,MainTreeNode(){return m(c,{features:d.Hidden,ref:o})}}}export{v as useMainTreeNode,N as useRootContainers};\n","import{defineComponent as l,inject as a,provide as c}from\"vue\";import{render as p}from'../utils/render.js';let e=Symbol(\"ForcePortalRootContext\");function s(){return a(e,!1)}let u=l({name:\"ForcePortalRoot\",props:{as:{type:[Object,String],default:\"template\"},force:{type:Boolean,default:!1}},setup(o,{slots:t,attrs:r}){return c(e,o.force),()=>{let{force:f,...n}=o;return p({theirProps:n,ourProps:{},slot:{},slots:t,attrs:r,name:\"ForcePortalRoot\"})}}});export{u as ForcePortalRoot,s as usePortalRoot};\n","import{inject as f,onMounted as m,onUnmounted as l,provide as c,watch as p}from\"vue\";let u=Symbol(\"StackContext\");var s=(e=>(e[e.Add=0]=\"Add\",e[e.Remove=1]=\"Remove\",e))(s||{});function y(){return f(u,()=>{})}function R({type:o,enabled:r,element:e,onUpdate:i}){let a=y();function t(...n){i==null||i(...n),a(...n)}m(()=>{p(r,(n,d)=>{n?t(0,o,e):d===!0&&t(1,o,e)},{immediate:!0,flush:\"sync\"})}),l(()=>{r.value&&t(1,o,e)}),c(u,t)}export{s as StackMessage,y as useStackContext,R as useStackProvider};\n","import{computed as x,defineComponent as y,inject as R,onMounted as v,onUnmounted as D,provide as j,ref as p,unref as C}from\"vue\";import{useId as h}from'../../hooks/use-id.js';import{render as b}from'../../utils/render.js';let u=Symbol(\"DescriptionContext\");function w(){let t=R(u,null);if(t===null)throw new Error(\"Missing parent\");return t}function k({slot:t=p({}),name:o=\"Description\",props:s={}}={}){let e=p([]);function r(n){return e.value.push(n),()=>{let i=e.value.indexOf(n);i!==-1&&e.value.splice(i,1)}}return j(u,{register:r,slot:t,name:o,props:s}),x(()=>e.value.length>0?e.value.join(\" \"):void 0)}let K=y({name:\"Description\",props:{as:{type:[Object,String],default:\"p\"},id:{type:String,default:null}},setup(t,{attrs:o,slots:s}){var n;let e=(n=t.id)!=null?n:`headlessui-description-${h()}`,r=w();return v(()=>D(r.register(e))),()=>{let{name:i=\"Description\",slot:l=p({}),props:d={}}=r,{...c}=t,f={...Object.entries(d).reduce((a,[g,m])=>Object.assign(a,{[g]:C(m)}),{}),id:e};return b({ourProps:f,theirProps:c,slot:l.value,attrs:o,slots:s,name:i})}}});export{K as Description,k as useDescriptions};\n","import{computed as w,defineComponent as m,getCurrentInstance as j,h as I,inject as s,onMounted as R,onUnmounted as y,provide as E,reactive as G,ref as p,Teleport as O,watch as D,watchEffect as K}from\"vue\";import{usePortalRoot as S}from'../../internal/portal-force-root.js';import{dom as B}from'../../utils/dom.js';import{getOwnerDocument as C}from'../../utils/owner.js';import{render as h}from'../../utils/render.js';function x(e){let t=C(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let l=t.getElementById(\"headlessui-portal-root\");if(l)return l;let r=t.createElement(\"div\");return r.setAttribute(\"id\",\"headlessui-portal-root\"),t.body.appendChild(r)}const f=new WeakMap;function U(e){var t;return(t=f.get(e))!=null?t:0}function M(e,t){let l=t(U(e));return l<=0?f.delete(e):f.set(e,l),l}let $=m({name:\"Portal\",props:{as:{type:[Object,String],default:\"div\"}},setup(e,{slots:t,attrs:l}){let r=p(null),i=w(()=>C(r)),o=S(),u=s(H,null),n=p(o===!0||u==null?x(r.value):u.resolveTarget());n.value&&M(n.value,a=>a+1);let c=p(!1);R(()=>{c.value=!0}),K(()=>{o||u!=null&&(n.value=u.resolveTarget())});let v=s(d,null),g=!1,b=j();return D(r,()=>{if(g||!v)return;let a=B(r);a&&(y(v.register(a),b),g=!0)}),y(()=>{var P,T;let a=(P=i.value)==null?void 0:P.getElementById(\"headlessui-portal-root\");!a||n.value!==a||M(n.value,L=>L-1)||n.value.children.length>0||(T=n.value.parentElement)==null||T.removeChild(n.value)}),()=>{if(!c.value||n.value===null)return null;let a={ref:r,\"data-headlessui-portal\":\"\"};return I(O,{to:n.value},h({ourProps:a,theirProps:e,slot:{},attrs:l,slots:t,name:\"Portal\"}))}}}),d=Symbol(\"PortalParentContext\");function q(){let e=s(d,null),t=p([]);function l(o){return t.value.push(o),e&&e.register(o),()=>r(o)}function r(o){let u=t.value.indexOf(o);u!==-1&&t.value.splice(u,1),e&&e.unregister(o)}let i={register:l,unregister:r,portals:t};return[t,m({name:\"PortalWrapper\",setup(o,{slots:u}){return E(d,i),()=>{var n;return(n=u.default)==null?void 0:n.call(u)}}})]}let H=Symbol(\"PortalGroupContext\"),z=m({name:\"PortalGroup\",props:{as:{type:[Object,String],default:\"template\"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:l}){let r=G({resolveTarget(){return e.target}});return E(H,r),()=>{let{target:i,...o}=e;return h({theirProps:o,ourProps:{},slot:{},attrs:t,slots:l,name:\"PortalGroup\"})}}});export{$ as Portal,z as PortalGroup,q as useNestedPortals};\n","import{computed as o,defineComponent as O,h as v,inject as Y,nextTick as se,onMounted as $,onUnmounted as pe,provide as de,ref as y,watchEffect as fe}from\"vue\";import{FocusTrap as P}from'../../components/focus-trap/focus-trap.js';import{useDocumentOverflowLockedEffect as ge}from'../../hooks/document-overflow/use-document-overflow.js';import{useEventListener as ce}from'../../hooks/use-event-listener.js';import{useId as b}from'../../hooks/use-id.js';import{useInert as _}from'../../hooks/use-inert.js';import{useOutsideClick as ve}from'../../hooks/use-outside-click.js';import{useRootContainers as me}from'../../hooks/use-root-containers.js';import{State as I,useOpenClosed as De}from'../../internal/open-closed.js';import{ForcePortalRoot as F}from'../../internal/portal-force-root.js';import{StackMessage as z,useStackProvider as ye}from'../../internal/stack-context.js';import{Keys as Se}from'../../keyboard.js';import{dom as j}from'../../utils/dom.js';import{match as G}from'../../utils/match.js';import{getOwnerDocument as he}from'../../utils/owner.js';import{Features as V,render as C}from'../../utils/render.js';import{Description as Oe,useDescriptions as Pe}from'../description/description.js';import{Portal as J,PortalGroup as be,useNestedPortals as Ce}from'../portal/portal.js';var Te=(l=>(l[l.Open=0]=\"Open\",l[l.Closed=1]=\"Closed\",l))(Te||{});let H=Symbol(\"DialogContext\");function T(t){let i=Y(H,null);if(i===null){let l=new Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,T),l}return i}let A=\"DC8F892D-2EBD-447C-A4C8-A03058436FF4\",Ye=O({name:\"Dialog\",inheritAttrs:!1,props:{as:{type:[Object,String],default:\"div\"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:A},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:\"dialog\"}},emits:{close:t=>!0},setup(t,{emit:i,attrs:l,slots:p,expose:s}){var q,W;let n=(q=t.id)!=null?q:`headlessui-dialog-${b()}`,u=y(!1);$(()=>{u.value=!0});let r=!1,g=o(()=>t.role===\"dialog\"||t.role===\"alertdialog\"?t.role:(r||(r=!0,console.warn(`Invalid role [${g}] passed to . Only \\`dialog\\` and and \\`alertdialog\\` are supported. Using \\`dialog\\` instead.`)),\"dialog\")),D=y(0),S=De(),R=o(()=>t.open===A&&S!==null?(S.value&I.Open)===I.Open:t.open),m=y(null),E=o(()=>he(m));if(s({el:m,$el:m}),!(t.open!==A||S!==null))throw new Error(\"You forgot to provide an `open` prop to the `Dialog`.\");if(typeof R.value!=\"boolean\")throw new Error(`You provided an \\`open\\` prop to the \\`Dialog\\`, but the value is not a boolean. Received: ${R.value===A?void 0:t.open}`);let c=o(()=>u.value&&R.value?0:1),k=o(()=>c.value===0),w=o(()=>D.value>1),N=Y(H,null)!==null,[Q,X]=Ce(),{resolveContainers:B,mainTreeNodeRef:K,MainTreeNode:Z}=me({portals:Q,defaultContainers:[o(()=>{var e;return(e=h.panelRef.value)!=null?e:m.value})]}),ee=o(()=>w.value?\"parent\":\"leaf\"),U=o(()=>S!==null?(S.value&I.Closing)===I.Closing:!1),te=o(()=>N||U.value?!1:k.value),le=o(()=>{var e,a,d;return(d=Array.from((a=(e=E.value)==null?void 0:e.querySelectorAll(\"body > *\"))!=null?a:[]).find(f=>f.id===\"headlessui-portal-root\"?!1:f.contains(j(K))&&f instanceof HTMLElement))!=null?d:null});_(le,te);let ae=o(()=>w.value?!0:k.value),oe=o(()=>{var e,a,d;return(d=Array.from((a=(e=E.value)==null?void 0:e.querySelectorAll(\"[data-headlessui-portal]\"))!=null?a:[]).find(f=>f.contains(j(K))&&f instanceof HTMLElement))!=null?d:null});_(oe,ae),ye({type:\"Dialog\",enabled:o(()=>c.value===0),element:m,onUpdate:(e,a)=>{if(a===\"Dialog\")return G(e,{[z.Add]:()=>D.value+=1,[z.Remove]:()=>D.value-=1})}});let re=Pe({name:\"DialogDescription\",slot:o(()=>({open:R.value}))}),M=y(null),h={titleId:M,panelRef:y(null),dialogState:c,setTitleId(e){M.value!==e&&(M.value=e)},close(){i(\"close\",!1)}};de(H,h);let ne=o(()=>!(!k.value||w.value));ve(B,(e,a)=>{e.preventDefault(),h.close(),se(()=>a==null?void 0:a.focus())},ne);let ie=o(()=>!(w.value||c.value!==0));ce((W=E.value)==null?void 0:W.defaultView,\"keydown\",e=>{ie.value&&(e.defaultPrevented||e.key===Se.Escape&&(e.preventDefault(),e.stopPropagation(),h.close()))});let ue=o(()=>!(U.value||c.value!==0||N));return ge(E,ue,e=>{var a;return{containers:[...(a=e.containers)!=null?a:[],B]}}),fe(e=>{if(c.value!==0)return;let a=j(m);if(!a)return;let d=new ResizeObserver(f=>{for(let L of f){let x=L.target.getBoundingClientRect();x.x===0&&x.y===0&&x.width===0&&x.height===0&&h.close()}});d.observe(a),e(()=>d.disconnect())}),()=>{let{open:e,initialFocus:a,...d}=t,f={...l,ref:m,id:n,role:g.value,\"aria-modal\":c.value===0?!0:void 0,\"aria-labelledby\":M.value,\"aria-describedby\":re.value},L={open:c.value===0};return v(F,{force:!0},()=>[v(J,()=>v(be,{target:m.value},()=>v(F,{force:!1},()=>v(P,{initialFocus:a,containers:B,features:k.value?G(ee.value,{parent:P.features.RestoreFocus,leaf:P.features.All&~P.features.FocusLock}):P.features.None},()=>v(X,{},()=>C({ourProps:f,theirProps:{...d,...l},slot:L,attrs:l,slots:p,visible:c.value===0,features:V.RenderStrategy|V.Static,name:\"Dialog\"})))))),v(Z)])}}}),_e=O({name:\"DialogOverlay\",props:{as:{type:[Object,String],default:\"div\"},id:{type:String,default:null}},setup(t,{attrs:i,slots:l}){var u;let p=(u=t.id)!=null?u:`headlessui-dialog-overlay-${b()}`,s=T(\"DialogOverlay\");function n(r){r.target===r.currentTarget&&(r.preventDefault(),r.stopPropagation(),s.close())}return()=>{let{...r}=t;return C({ourProps:{id:p,\"aria-hidden\":!0,onClick:n},theirProps:r,slot:{open:s.dialogState.value===0},attrs:i,slots:l,name:\"DialogOverlay\"})}}}),ze=O({name:\"DialogBackdrop\",props:{as:{type:[Object,String],default:\"div\"},id:{type:String,default:null}},inheritAttrs:!1,setup(t,{attrs:i,slots:l,expose:p}){var r;let s=(r=t.id)!=null?r:`headlessui-dialog-backdrop-${b()}`,n=T(\"DialogBackdrop\"),u=y(null);return p({el:u,$el:u}),$(()=>{if(n.panelRef.value===null)throw new Error(\"A component is being used, but a component is missing.\")}),()=>{let{...g}=t,D={id:s,ref:u,\"aria-hidden\":!0};return v(F,{force:!0},()=>v(J,()=>C({ourProps:D,theirProps:{...i,...g},slot:{open:n.dialogState.value===0},attrs:i,slots:l,name:\"DialogBackdrop\"})))}}}),Ge=O({name:\"DialogPanel\",props:{as:{type:[Object,String],default:\"div\"},id:{type:String,default:null}},setup(t,{attrs:i,slots:l,expose:p}){var r;let s=(r=t.id)!=null?r:`headlessui-dialog-panel-${b()}`,n=T(\"DialogPanel\");p({el:n.panelRef,$el:n.panelRef});function u(g){g.stopPropagation()}return()=>{let{...g}=t,D={id:s,ref:n.panelRef,onClick:u};return C({ourProps:D,theirProps:g,slot:{open:n.dialogState.value===0},attrs:i,slots:l,name:\"DialogPanel\"})}}}),Ve=O({name:\"DialogTitle\",props:{as:{type:[Object,String],default:\"h2\"},id:{type:String,default:null}},setup(t,{attrs:i,slots:l}){var n;let p=(n=t.id)!=null?n:`headlessui-dialog-title-${b()}`,s=T(\"DialogTitle\");return $(()=>{s.setTitleId(p),pe(()=>s.setTitleId(null))}),()=>{let{...u}=t;return C({ourProps:{id:p},theirProps:u,slot:{open:s.dialogState.value===0},attrs:i,slots:l,name:\"DialogTitle\"})}}}),Je=Oe;export{Ye as Dialog,ze as DialogBackdrop,Je as DialogDescription,_e as DialogOverlay,Ge as DialogPanel,Ve as DialogTitle};\n","import{computed as v,defineComponent as x,inject as L,onMounted as k,onUnmounted as C,provide as j,ref as y,unref as h}from\"vue\";import{useId as w}from'../../hooks/use-id.js';import{render as R}from'../../utils/render.js';let a=Symbol(\"LabelContext\");function d(){let t=L(a,null);if(t===null){let n=new Error(\"You used a