{"version":3,"file":"framer.BM37CPmd.mjs","names":["assert","React","noop$5","isValidElement","forwardRef","React","useMemo","useContext","useCallback","useRef","useLayoutEffect","isObject$1","useState","useSyncExternalStore","useDeferredValue","Fragment$1","React$1.isValidElement","React$1.cloneElement","Suspense","useId","Children","createElement","startTransition","Fragment","isGenerator$1","assertNever$1","createPortal","React$1.Fragment","React$1.useRef","React$1.useMemo","animate$1","cloneElement","createContext","useEffect","Component","React$1.useState","React$1.forwardRef","React$1.useContext","__esmMin","pe","init_npm_react_18_3_1","ne","me","init_ssg_sandbox_shims","navigator","te","x","z","window","ie","le","ae","init_npm_react_dom_18_3_1","e","l","H","I","_e","L","Ha","se","oe","p","K","c","J","init_jsx_runtime","B","ce","de","spring","useMotionValue","px","optimizedAppearDataAttribute","useAnimation","useResetProjection","usePresence","useComposedRefs","useTransform","useScroll","transform","transformValue","resolveMotionValue","unwrapMotionComponent","useInstantLayoutTransition","isValidMotionProp","motionValue","useReducedMotionConfig","visualElementStore","inView","MotionConfigContext","isMotionComponent","PresenceContext","__commonJSMin","addScaleCorrector","frame","cancelFrame","MotionConfig","stagger","scroll","SwitchLayoutGroupContext","animateValue","AnimatePresence","MotionGlobalConfig","animate","useSpring","LayoutGroup","MotionValue","WillChangeMotionValue","init_chunk_C4BJMiCP","motion","isMotionValue$1","interpolate","useInstantTransition","encodeSVGForURL","svg","isFunction","value","isBoolean","isString","isNumber","isArray","isObject","isEmptyObject","_","object","isUndefined","isNull","isNullish","isValidDate","isGenerator","isPromiseLike","isPromise","encodeSVGForCSS","getPleaseReportMessage","formattedError","error","message","assert$1","condition","lines","assertNever","isScreenshotFramerHost","safeWindow","injectCSSRule","defaultCache","cssRule","cache","sheet","defaultSheet","styleElement","cssValue","css","isRelevantValidityStateKey","key","customValidityKey","validKey","isInvalid","validity","useCustomValidity","isValidRef","handleInvalid","onInvalid","handleChange","onChange","onValid","handleBlur","onBlur","onFocus","getMaxListDigits","lastListNumber","start","itemCount","listStyleType","decimalMaxListDigits","alphaMaxListDigits","romanMaxListDigits","nextCharacters","letterPermutations","permutations","i","characters","maxLength","threshold","romanNumeralLengthThresholds","thousands","createRGBVariableFallbacks","variables","variable","fallback","selectComponentChild","parentSelector","childSelector","noop","isWindow","isBot","supportsRequestIdleCallback","requestIdleCallback","noopSubscribe","returnTrue","returnFalse","RenderEnvironment","RenderTarget","FormInputStyleVariableNames","Var","inputClassName","inputWrapperClassName","emptyValueClassName","forcedFocusClassName","sharedInputCSS","inputWrapperCSS","inputBorderAllSides","inputBorderCSS","iconImageCSS","inputIconCSSDeclaration","maxListDigitsProperty","defaultRichTextContainerStyle","defaultTextFillStyle","defaultImageStyle","richTextCSSRules","textTruncationDisplayInlineVariableForSafari16","textTruncationDisplayNoneVariableForSafari16","textTruncationLineBreakVariableForSafari16","blockLikeElementSelectors","anySafariVersion","safari17OrGreater","safari16TextTruncationFix","init_chunk_YXhckCOx","query","target","\"Padding\"","\"BorderRadiusTopLeft\"","\"BorderRadiusTopRight\"","\"BorderRadiusBottomRight\"","\"BorderRadiusBottomLeft\"","\"CornerShape\"","\"BorderColor\"","\"BorderTopWidth\"","\"BorderRightWidth\"","\"BorderBottomWidth\"","\"BorderLeftWidth\"","\"BorderStyle\"","\"Background\"","\"FontFamily\"","\"FontWeight\"","\"FontSize\"","\"FontColor\"","\"FontStyle\"","\"FontLetterSpacing\"","\"FontTextAlignment\"","\"FontLineHeight\"","\"FontOpenType\"","\"FontVariationAxes\"","\"PlaceholderColor\"","\"BoxShadow\"","\"FocusedBorderColor\"","\"FocusedBorderWidth\"","\"FocusedBorderStyle\"","\"FocusedBackground\"","\"FocusedBoxShadow\"","\"FocusedTransition\"","\"BooleanCheckedBackground\"","\"BooleanCheckedBorderColor\"","\"BooleanCheckedBorderWidth\"","\"BooleanCheckedBorderStyle\"","\"BooleanCheckedBoxShadow\"","\"BooleanCheckedTransition\"","\"InvalidTextColor\"","\"IconBackgroundImage\"","\"IconMaskImage\"","\"IconColor\"","\"IconContent\"","\"WrapperHeight\"","output","declaration","selector","lastItem","index","preloadLazyModule","lazyModulesCache","hash","promise","loader","module","source","registerLazyModuleLoader","lazyModuleLoaders","requestedLazyModules","initLazyModulesCache","lazyPreloadLinks","link","lazyModuleValue","url","canImportDirectly","directLazyModulePrefix","isLazyComponentType","componentType","preloadKey$1","getLoadedComponent","moduleName","lazy","cacheHash","factory","factoryPromise","LoadedComponent","updateFromCache","maybeModule","load","factoryFn","component","err","hasRendered","Component","lazyModulesCollector","props","hasProp","o","prop","withEquals","equalsKey","valueEqual","a","b","arrayShallowEqual","length","arrayDeepEqual","equal","mapShallowEqual","aValue","mapDeepEqual","setEqual","objectShallowEqual","keys","objectKeys","objectDeepEqual","typeA","aIsArray","bIsArray","deep","aIsMap","bIsMap","aIsSet","bIsSet","dateA","dateB","regexpA","regexpB","isEqual","useGetRouteCallback","routes","routeId","RouterAPIProvider","RouterContext","api","useRouter","RoutesProvider","getRoute","useCurrentRoute","router","override","CurrentRouteContext","id","pathVariables","canonicalPathVariables","route","useCurrentRouteKey","currentRoute","useOnRouteChange","lastRoute","cb","useRoute","routerAPI","getRouteElementId","monitorINPRelatedInputs","inpRelatedInputs","inpRelatedInputHandler","type","event","useRouteElementId","targetRouteId","useCurrentPathVariables","is_plain_object","proto","thing","object_proto_names","get_type","is_buffer","get_escaped_char","char","stringify_string","result","last_pos","len","str","replacement","enumerable_symbols","symbol","stringify_key","is_identifier","is_valid_array_index","n","MAX_ARRAY_INDEX","is_valid_array_len","MAX_ARRAY_LEN","is_valid_array_index_string","s","array_index_cut","valid_array_indices","array","encode_native","array_buffer","decode_native","base64","encode_buffer","decode_buffer","encode_legacy","binary","chunk_size","chunk","decode_legacy","binary_string","merge_operations","overrides","defaults","merged","parse","unflatten","serialized","revivers","options","ops","default_parse_operations","parsed","hydrate","values","hydrated","hydrating","standalone","reviver","set","map","wrapped_index","obj","buffer","decode64","idx","stringify","stringified","run","reducers","default_stringify_operations","indexes","custom","flatten","number","fn","DevalueError","stringify_primitive","async","tag","flags","mostly_dense","populated_keys","population","d","j","key_type","key_is_primitive","info","encode64","shape","started","sendTrackingEvent","eventType","eventData","sendOn","trackingId","isValidTrackingId","validTrackingIdRegExp","createEmptyPayload","HandoverDataType","parseHandoverData","hydratedData","script","handleHydrationError","stack","hasHandoverData","data","dataType","getHandoverData","getLocaleKey","locale","makeHandoverKey","method","collectionId","localeKey","createCollectionUtilsCache","collectionUtils","utilsFactory","utilsCache","CollectionUtilsCache","CollectionUtilsCacheProvider","getCollectionUtilsCacheMemoized","CollectionUtilsCacheContext","useCollectionUtils","delay$1","resolve","ms","getNavigator","isMacOS","nav","macRegex","isIOS","iOSRegex","macIntelRegex","isAppleDevice","isEdge","edgeRegex","isChrome$1","chromeRegex","googleVendorRegex","isSafari","safariRegex","appleComputerRegex","isFirefox","firefoxRegex","isBrowser$1","safariVersion","safariVersionRegex","isFramerX","framerXRegex","isTest","deviceType","tabletRegex","mobileRegex","isDesktop","isCommandKeyPressed","noop$4","noopAsync$1","resolveSchedulerPriority","priority","isHigherSchedulerPriority","schedulerPriorityRank","requested","current","getScheduler","schedulerYield","activeScheduler","scheduleFallbackTask","resolvedPromise","createYieldToMain","timeOfLastYield","activeBatchEpisode","pendingResolvers","resolvePendingPromises","resolvePendingPromisesIfHidden","listenForPageLifecycle","interactionResponse","PAINT_FALLBACK_TIMEOUT_MS","scheduleFrameRead","withUnloadGuarantee","isPending","resolveYield","yieldPromise","createYieldPromise","schedulerOptions","schedulingOptions","waitForPaint","continueAfter","ensureContinueBeforeUnload","scheduleBatchYield","signal","finishYield","abortYield","didResume","episode","yieldBatchedToMain","now","batchDuration","batchDurationOption","YIELD_TARGET_FREQUENTLY","YIELD_TARGET_INFREQUENTLY","targetDuration","HIDDEN_TAB_YIELD_TARGET","shouldWaitForPaint","yieldToMain","batch","forwardCurrentQueryParams","queryParamsString","ignoreBackAnchor","backAnchor","forwardQueryParams","href","startOfHash","hrefWithoutHash","startOfSearch","baseUrl","searchString","newSearchParams","currentSearchParams","FRAMER_VARIANT_KEY","newSearchString","replacePathVariables","resultPath","path","isMissingInLocale","resultPathVariables","matches","pathVariablesRegExpGlobal","replacements","pathVariableWithDelimiter","match","pathVariableValue","currentSlug","utils","currentLocale","maybeRecordId","recordId","maybeNextSlug","nextLocale","nextSlug","maybeDefaultLocaleSlug","defaultLocale","defaultLocaleSlug","lastIndex","replacedPath","hasMatch","prependLocaleSlug","localeSlug","getLocalizedNavigationPath","basePath","pathLocalized","preserveQueryParams","getCollectionItemRecordId","activeLocale","getCollectionItemContentLocaleId","resolveRouteContentState","contentLocaleId","collectionUtilsCache","contentLocale","locales","useLocaleInfo","LocaleInfoContext","useLocaleCode","useLayoutDirection","LayoutDirectionContext","usePreloadRoute","linkContext","preloadRoute","useRoutePreloader","preload","enabled","shouldPreloadBasedOnUA","routeIds","needsRouteData","shouldLoadRouteData","context","yieldBeforePreload","loadedComponent","loadRouteData","defaultLocaleId","loaderContext","logIfPopstateCalledSynchronously","bugExistenceChecked","popstateCalled","popstateListener","msg","PageEffectsProvider","PageEffectsContext","usePageEffects","getPageEffectForRoute","currentRouteId","nextRouteId","global","createLinearEasing","time","step","state","generator","keyframes","maxDuration$1","parseUnit","calcMaskPosition","xUnit","mask","y","yUnit","innerWidth","innerHeight","complementaryOffset","amount","unit","circleCoverRadius","valuesToCSSKeyframes","maskGenerator","progress","page","getMaskGenerator","maskGenerators","createPageTransitionRules","name","settings","transition","isSpringTransition","getSpringOptions","duration","easing","startKeyframes","endKeyframes","restState","createViewTransitionStylesheet","defaultPageTransition","VIEW_TRANSITION_STYLES_ID","styleContent","exit","enter","removeViewTransitionStylesheet","element","supportsViewTransitions","addVTStylesheetAfterInRender","effect","startViewTransition","updateView","noop$3","useViewTransition","sitePageEffects","resolveHasPainted","pageEffect","hasPainted","update","updateCanonicalURL","canonical","newURL","prevUrl","syncGeneratedCanonicalURL","generatedCanonical","syncGeneratedHreflangLinks","generatedLinks","generatedLinkByHrefLang","hreflang","nextHrefLangs","links","hrefLang","useAfterPaintEffect","useEffectFn","runAfterPaint","runPromise","effectFn","cleanup","deps","useMonitorNextPaintAfterRender","pendingPaintResolvers","label","startLabel","endLabel","ignore","measureDetail","isHistoryState","readHistoryState","getEntryId","setLastKnownHistoryState","getLastKnownHistoryState","lastKnownHistoryState","createEntryId","withCurrentEntryId","withEntryId","previousState","replaceHistoryState","replaceState","repairHashHistoryState","pushHistoryState","useReplaceInitialState","disabled","initialHash","initialPathVariables","initialLocaleId","initialContentLocaleId","initialCanonicalPathVariables","usePopStateHandler","monitorNextPaintAfterRender","scrollRestoration","scrollRestorationForFramerTraversal","usesCustomScrollRestoration","viewTransitionReady","resolvePendingTraversal","popStateHandler","nextRender","stopMonitoringINPRelatedInputs","onHistoryTraversal","resolvedHash","didStartRouteChange","changeRoute","setCurrentRouteId","localeId","usesNativeScrollRestoration","viewTransition","announceNavigation","traversalHandler","destinationState","useNavigationAPI","handleRedirectForMissingPage","useSwitchLocale","switchLocale","sitePrefix","useCommitNavigationURL","navigationPromise","navigationController","navigateListener","navigateEvent","controller","updateURL","trimDashes","end","slugify","unsafeSlugCharactersRegExp","RenderTargetEnvironmentProvider","RenderTargetEnvironmentContext","useRenderTargetEnvironment","useMemoOne","initial","isFirstRun","committed","inputs","useCallbackOne","callback","getURLSearchStringSnapshot","getServerURLSearchStringSnapshot","subscribeToURLSearchString","urlSearchStringSubscribers","notifyURLSearchStringSubscribers","subscriber","URLSearchParamsProvider","isPreview","previewURLSearchString","setPreviewURLSearchString","committedRouterRenderKeyRef","routerRenderKey","useIsomorphicLayoutEffect$1","siteURLSearchString","deferredURLSearchString","isUrgentRouterRender","urlSearchString","replaceSearchParams","replacer","currentSearchString","startedDuringPendingNavigation","isNavigationCommitPending","scheduledRouterRenderKey","currentHistoryState","originalSearch","currentSearch","isFirstFilterChange","filtersCleared","nextHistoryState","urlString","URLSearchParamsContext","computeRelativePath","from","to","fromDir","getDirAndFile","toDir","toFile","relativePath","relative","normalizeString","fromEnd","fromLen","toLen","lastCommonSep","fromCode","StringPrototypeCharCodeAt","CHAR_FORWARD_SLASH","StringPrototypeSlice","out","res","lastSegmentLength","lastSlash","dots","code","isPathSeparator","CHAR_DOT","lastSlashIndex","StringPrototypeLastIndexOf","separator$1","getSitePrefix","siteCanonicalURL","resolveHash","template","pathVariable","getHashForRoute","hashVariables","nodeId","pattern","getPathForRoute","onlyHash","currentPath","currentRoutePath","currentRoutePathLocalized","currentPathVariables","isSamePageHashNavigation","isSameDynamicRouteNavigation","customNotFoundPagePaths","deferPreHydrationSubmit","form","hydratedAttribute","pendingSubmitAttribute","getDeferPreHydrationSubmitScript","formHydratedAttribute","formPendingSubmitAttribute","useReplayPreHydrationSubmit","formRef","cancelled","submit","changeEvent","replayMarker","clickEvent","getValuePropFromElement","isReplayEvent","shouldIgnoreReplayEvent","replayMarkerIgnore","useReplayPreHydrationInput","didReplayRef","elementRef","isHydration","isHydrationFn","valueProp","currentDOMValue","nativeInputValueSetter","turnOffReactEventHandling","eventsToStop","body","stopFn","TurnOnReactEventHandling","shouldTurnOnEventHandling","onlyRunOnce","hasRun","args","originalMethod","measureSafe","markHydrationStart","HydrationMarker","hydrationMarker","useMarkRouterEffects","useMarkSuspenseEffectsStart","useMarkSuspenseEffectEnd","MarkSuspenseEffectsStart","MarkSuspenseEffectsEnd","renderPage","defaultPageStyle","Page","emptyArray","frozenEmptyArray","getRouteInfoMemo","routeInfoCache","pathRoutes","pathRoutesLocalized","paths","pathsLocalized","lastRoutes","pathDepth","localizedPath","localizedDepth","byLocale","depth1","depth2","routesByPathLocalized","pathsForLocale","inferInitialRouteFromPath","inferInitialRouteFromPathAndLocales","locationPath","hasNonDefaultLocale","firstPathSegment","slug","localizedMap","exactMatchForLocale","matchPath","exactMatch","localizedList","rootPath","firstRoute","pathWithTrimmedSlashes","pathVariablesKeys","routePathRegExpString","escapeStringRegExp","routePath","routePathRegExp","pathVariablesValues","existingValue","string","unquoteServerTimingParameterValue","getServerTimingEntries","entries","serverTimingHeader","serverTimingMetric","rawName","parameters","description","parameter","separatorIndex","getServerTimingEntry","metricName","getNavigationServerTimingEntry","serverTiming","entry","serverTimingEntry","getVariantsFromServerTiming","patchRoute","abTestingVariantId","controlRoute","patchingRoute","elements","patchRoutesFromSearchParams","abTestId","variants","removeRoutesVariants","patchInitialRoute","parentId","patchRoutesForABTesting","initialRouteId","resolvedInitialRouteId","parentRouteId","useMetadata","metadata","robotsTag","warnOnce$1","rest","warningMessages","keyMessage","deprecationWarning","removedItem","removalVersion","isAnimatable","onUpdateKey","finishTransactionKey","animatableInterpolation","fromValue","toValue","Animatable","v","currentInterpolation","roundedNumber","multiplier","decimals","roundWithOffset","offset","roundToHalfPixel","Point","modulate","fromLow","fromHigh","rangeA","toLow","toHigh","rangeB","fromDelta","toDelta","limit","isNumeric","percentToFraction","digits","numberFromString","val","input","rgbToHsluv","r","g","hsluvConverter","rgbaFromHusl","h","hsvToStr","_h","_s","_v","rgbToRgb","bound01","rgbToHex","hex","pad2","allow3Char","rgbToHsl","_r","_g","_b","max","min","hue2rgb","t","q","hslToRgb","rgbToHsv","hsvToRgb","f","mod","_max","_n","isOnePointZero","processPercent","isPercentage","stringToObject","inputColor","color","namedColor","cssNames","matchers","parseIntFromHex","convertHexToDecimal","parseP3","p3Matcher","convertRGBChannelToLrgb","abs","convertRgbToLrgb","convertLrgbChannelToRgb","convertLrgbToRgb","convertRGBToHSV","M","m","normalizeHue","hue","convertHsvToRgb","convertRgbToP3","convertXyz65ToP3","convertRgbToXyz65","convertP3ToRgb","convertXyz65ToRgb","convertP3ToXyz65","clampRGB","P3Color","getCompleteColorStrategy","completeColor","colorOrR","getCompleteColorFromRGB","getCompleteColorFromString","getCompleteColorFromHSL","getCompleteColorFromHSV","rgb","correctAlpha","hsl","alphaValue","patchBorderRadiusScaleCorrector","isPatched","borderRadiusCorrectors","pixelsToPercent$1","axis","pixels","reWrapInCalc","calcPrefix","percentage","separator","LayoutIdProvider","LayoutIdContext","screen","usedIds","getLayoutId","cacheKey","previousId","nodeIdentifier","duplicatedFrom","possibleMatch","duplicatedId","byLastIdMatch","matchedLayoutId","shouldUseNamedLastIdMatch","previousLayoutId","shouldUseNamedMatch","last","possible","rootDuplicatedId","identifier","nextValue","nextLayoutId","layoutId","lastId","possibleId","persistLayoutIdCache","contextValue","initialValue","AutomaticLayoutIds","useConstant","ref","init","ErrorPlaceholder","title","file","stripSlash","errorStyle","titleStyle","messageStyle","isStaticRenderer","currentTarget","useIsStaticRenderer","isStatic","memoize$1","arg","getVariantsDimensions","width","height","lead","follow","orient","ratio","sizes","ValidSteps","urlWithScaleDownTo","urlObj","scaleDownTo","getResponsiveSrcSet","image","srcSet","variant","getFixedSrcSets","nodeFixedSize","imageMaxSide","scaleRatio","FixedSizeScaleVariants","getSrcSet","fixedSrcSets","x1","src","scale","getPlaceholderStyle","runtime","cssObjectFit","imageFit","cssObjectPosition","positionX","positionY","getImageStyle","cornerPropertiesToInherit","useDecodingAttribute","currentDecoding","avoidAsyncDecoding","switchDecodingToAuto","onImageLoad","onImageMount","node","StaticImage","containerSize","imageStyle","alt","CanvasImage","wrapperRef","imageElement","wrapper","OptimizedCanvasImage","BackgroundImageComponent","fallbackWrapperStyles","needsMotion","imageNode","backgroundSize","tileSize","roundedBackgroundSize","imageSource","wrapperStyle","style","collectBorderStyleForProps","borderWidth","borderTop","borderBottom","borderLeft","borderRight","collapseEqualBorders","borderStyle","borderColor","Border","applyForwardOverrides","forwardedOverrideId","_forwardedOverrideId","_forwardedOverrides","background","backgroundImageFromProps","BackgroundImage","backgroundImage","isEmpty","isReactElement","test","isReactChild","isFiniteNumber","degreesToRadians","degrees","isAutoDimensionType","dimensionType","valueToDimensionType","trimmedValue","getConstraintValue","parentSize","constraint","viewport","constraintValueForUncalculatedViewport","constrainHeight","constrainWidth","sizeAfterApplyingConstraintsAndAspectRatio","w","defaultWidth","defaultHeight","pinnedOffset","containsInvalidStringValues","constraintsEnabled","sizeFromFiniteNumberProps","size","rectFromFiniteNumberProps","left","top","calculateRect","parentSizeDisabled","constraintValues","getConstraintValues","enabledParentSize","deprecatedParentSize","parentSizeInfo","ConstraintValues","pixelAlign","_constraints","constraintMask","ConstraintMask","right","bottom","aspectRatio","autoSize","widthValue","heightValue","widthType","heightType","parsedWidth","parsedHeight","centerAnchorX","centerAnchorY","center","useParentSize","ConstraintsContext","isSize","getParentWidth","getParentHeight","useProvideParentSize","ProvideParentSize","useConstraints","isAutoSized","getIntrinsicSizeForBackgroundImage","htmlElementAsMotionComponent","asElem","\"div\"","hasCSSEvaluationListener","currentCSSRenderTarget","loadLibraryCSSRules","rule","getLoadedLibraryCSS","getLibraryCSS","withLibraryCSS","withCSS","collectLayoutHintDataProps","translation","layoutHintDataProps","isChrome","nodeIdFromString","processOverrideForwarding","children","child","transformTemplate","generated","useLayoutId","existingLayoutId","specificLayoutId","drag","layoutIdKey","__fromCodeComponentNode","layoutIdCandidate","postfix","useForceUpdate$2","setForcedRenderCount","useRerenderOnResize","sharedResizeObserver","getMeasurableCodeComponentChildren","isMeasurable","unwrapInlinedDisplayContents","firstMeasurableChild","useMeasureLayout","inCodeComponent","ComponentContainerContext","onCanvas","skipHook","visible","_needsMeasure","getChildren","measureClosestComponentContainer","container","forceLayerBackingWithMotionStyle","useTranslateZHack","smallValue","forceLayerBackingWithCSSProperties","setTranslateZHack","cssProperties","translateZ","resetSetStyle","asRecord","reset","isValidCSSStyleValue","microtask","manageCache","maxEntries","memoize","create","cachedMultiplyAlpha","CSSVariableRegExp","colorCache","ConvertColor","gradientColorStops","stops","gradient","alpha","stop","gradientColorStopsHash","isMultiStopGradient","multiStopGradientKeys","isSimpleGradient","simpleGradientKeys","collectBackgroundFromProps","backgroundColor","isMotionValue","Color","LinearGradient","RadialGradient","extractStyleFromProps","into","hasLeftAndRight","hasTopAndBottom","getStyleForFrameProps","cornerShape","hasEvents","getCursorFromEvents","pointerEventsSet","hasScrollableContent","hasScrollingOverflow","overflowKey","unwrapFrameProps","frameProps","minWidth","minHeight","maxWidth","maxHeight","useStyleAndRect","unwrappedProps","constraintsRect","defaultStyle","shouldDisablePointerEvents","safeToEditPointerEvents","centerTextStyle","propsStyle","__fromCanvasComponent","defaultFrameRect","constraintsStyle","_initialStyle","Layer","resultStyle","isRenderingStaticContent","getMotionProps","motionProps","isPropValid","filteredProps","\"layout\"","\"transition\"","hasDataFramerName","resolveParentSize","rect","_usesDOMRect","MagicMotionCrossfadeRoot","TREE_ROOT_ID","rootStyles","setRef","isMutableRef","useStableRefWithObserver","callbacks","cleanups","refCallback","cleanupFn","useObserverRef","fallbackRef","createStableRefWithObserver","forwardedRef","useRefEffect","effectRef","depsChangedRef","observeElement","observer","observers","root","SharedIntersectionObserver","_useSharedIntersectionObserver","SharedIntersectionObserverContext","rootMargin","useAppearEffect","internalState","isIntersecting","isIntersectingWithThreshold","isInView","animateOnce","hasAnimatedOnce","appearCallback","useSharedIntersectionObserver","thresholds","calculatedIntersection","boundingClientRect","intersectionRect","useIsInCurrentNavigationTarget","NavigationContainerContext","newMap","useMap","useOnCurrentTargetChange","NavigationTargetContext","register","deregister","shouldUsePreviousValue","nextProps","prevProps","getOriginProps","currentOriginProps","initialProps","transitionProps","contains3Dprops","containerProps","toPropsContain3d","fromPropsContain3d","pushTransition","TransitionDefaults","overlayTransition","flipTransition","reduceNavigationStateForAction","action","addOverlay","removeOverlay","add$1","remove","updateComponent","back","forward","currentState","currentOverlay","overlayItemId","overlayStack","currentItem","isCurrentScreen","nextIndex","removed","shouldMoveForward","isNextTargetForward","previous","containerKey","findLatestHistoryIndex","magicMotionPropsForAdd","transitionForContainer","updateTransitions","containers","nextState","nextItem","history","item","magicMotionPropsForRemove","nextKey","nextVisualIndex","visualIndex","validTargets","nextValidTarget","previousTransition","targetVisualIndex","currentVisualIndex","shouldRemoveLastKey","transitions","screenIndex","containerIndex","transitionForScreen","stackState","sequence","allAnimatableKeys","property","allAnimatableProperties","animation","transitionTo","transitionFrom","direction","activeOverlayItem","currentOverlayItem","previousOverlayItem","transitionPropsForStackWrapper","animationForStackWrapper","animationDefault","backfaceVisibleForStackWrapper","backdropColorForTransition","getBackfaceVisibleForOverlay","navigationItem","initialPropsForOverlay","getBackfaceVisibleForScreen","transitionPropsForOverlay","overlayIndex","animationPropsForContainer","containerCurrent","isInstantContainerTransition","overCurrentContext","containerIsVisible","containerContent","position","shouldStretchWidth","shouldStretchHeight","canStretchStyle","backdropTapAction","goBackAction","NavigationWrapper","resetProjection","skipLayoutAnimation","FramerNavigation","instance","\"children\"","isSharedEnum","sharedEnumBrand","isReactComponent","controlIsOptional","control","optionalKey","getControlDefaultValue","definition","applyControlDefaultsToDefaultProps","controlKey","controls","currentDefault","defaultProps","defaultValue","getDefaultProps","applyControlDefaultsToReactDefaultProps","setOutputControls","outputControlsKey","outputs","addPropertyControls","propertyControls","getPropertyControls","withOpacity","key$4","collectOpacityFromProps","opacity","shadowsAsFilter","filters","shadows","dropShadows","shadowItem","collectTextShadowsForProps","textShadow","shadow","collectLayerFilters","collectBackgroundFilters","collectFiltersFromProps","debounce","timeout","debounced","cx","classNames","extractPrefixedProps","strippedKey","stripPrefixFromPrefixedKey","prefix$1","prefixLength","cloneChildrenWithProps","cloned","asNode","useCloneChildrenWithPropsAndRef","hook","createHook","createRefFunction","updateIfNeeded","nextForwardedRef","shouldUpdate","preventNextCall","cloneChildrenWithPropsAndRef","ownRef","newProps","cloneAsElement","newRef","prevForwardedRef","prevChildRef","renderBranchedChildrenFromPropertyOverrides","childrenArray","cloneChildren","branches","nonOverriddenVariants","variantId","variantClassNames","primaryVariantId","propOverrides","arePropOverridesEffectivelyDifferent","effectiveVariants","intersection","parentVariants","effectiveRemainingVariants","renderedBranches","activeVariantId","SSRParentVariantsContext","hiddenClassNames","generateHiddenClassNames","SSRVariantClassName","SSRVariantGroupSeparatorClassName","variantHashFromClassName","className","variantClassName","alreadyHiddenInParent","showOnlyInVariantIds","propsForBreakpoint","withOptimizedAppearEffect","generatedComponentContext","GeneratedComponentContext","framerAppearIdKey","framerAppearEffects","optimized","disabledProps","getDisabledFXPropsInStaticRenderer","isVariantOrVariantList$1","isFXValuesKey","defaultFXValues","useFXValues","makeFXValues","effectValuesKeys","useLoop","shouldReduceMotion","mirrorStateRef","delay","useDelay","animationPromiseRef","animateValues","loop","loopTransition","mirror","loopRepeatType","opts","isRunning","setIsRunning","shouldRunRef","animateLoop","loopEffectEnabled","loopRepeatDelay","overrideRunRef","hasLoop","startStopTabVisibilityListener","loopPauseOffscreen","isIntersectingRef","stopAfterAnimationEnds","startAndStopBasedOnIntersection","addWillChange","effectEnabledStyle","effectDisabledStyle","parallaxTransform","speedFactor","speed","adjustPosition","originalPosition","scrollY","useParallax","yValue","parallaxY","visibility","visibilityStyle","parallaxTransformEnabled","unobserve","isTargetAndTransition","getTransition","runEffectAnimation","visualElement","startTime","appearId","handoffAnimationStartTime","instant","usePresenceAnimation","motionInitial","motionAnimate","motionExit","presenceInitial","animateConfig","presenceAnimate","presenceExit","isPresent","safeToRemove","base","hasMounted","lastAnimate","running","effectEnabled","calcOffsetTop","createTransformInputRange","starts","inputRange","transformTargets","targetRef","scrollObserverOffset","previousTop","currentScrollDirection","lastOffset","useScrollDirectionChange","scrollDirection","currentRouteKey","directionChangeOffset","lastDirection","repeat","hasDirectionChanged","scrollDirectionThreshold","nextTarget","createInputOutputRange","targets","outputRange","defaultOutputRange","firstRange","defaultRanges$2","hasExit","makeStyle","useAnimationVariants","transformPerspective","animateVariant","defaultStyles","targetOpacity","useStyleAppearEffect","playState","runAnimation","transitionWithFallback","fromInitial","isPlaying","appears","lastAppearState","animateWithScrollInfo","playedState","lastVariant","variantAnimation","useAttachOptionalSpring","springs","latestSetter","latestValue","startAnimation","active","createInputOutputRanges$1","effectKeyOutputRange","defaultRanges$1","previousTarget","createPageOutputRange","keyOutputRange","useStyleTransform","defaultValues$1","styleTransformEffectEnabled","effectDisabled","triggerOnScroll","transformTrigger","scrollYInputRange","transformViewportThreshold","pageInputRange","backwardsCompatibleEnabledCheck","secondaryKey","extractFXOptions","group","groupValues","groups","isReactRefObject","reactRefObjectKey","addMotionValueStyle","isVariantOrVariantList","ComponentPresetsConsumer","Context","componentIdentifier","useComponentViewport","ComponentViewportContext","useLayoutIdProps","_layoutIdKey","_duplicatedFrom","isSuspense426Error","Suspend","shouldSuspenseBoundariesBeActive","suspendPromise","SuspenseThatPreservesDom","DisableSuspenseSuspenseThatPreservesDomContext","suspend","NullFallback","collectErrorToAnalytics","componentStack","errorInfo","logError","shouldEnableCodeBoundaries","CodeComponentBoundary","ServerSideErrorBoundary","ClientSideErrorBoundary","nullFallback","DisabledCodeComponent","useNearestExternalComponent","ExternalComponentContext","useFurthestExternalComponent","nearestExternalComponent","IsExternalComponent","parent","newValue","scopeId","formatCodeCrashLocationFromSourceNode","CRASH_ERROR_MESSAGE_PREFIX","getErrorMessageForComponent","getErrorMessageFor","shouldWrapComponentWithBoundary","isLocalComponentInstance","isNodeLocalToProject","scopeIdOfThisComponent","scopeIdOfNearestExternalComponent","externalComponentLevel","inComponentSlot","isExternalComponent","isAuthoredByUser","scopeIdOfThisNode","useMaybeWrapComponentWithCodeBoundary","DeprecatedContainerErrorBoundary","getLibraryFeatures","disableCustomCode","isModuleExternal","observeHoverCapability","hasHoverCapability","next","notify","subscribers","getHoverCapability","getHoverCapabilitySnapshot","subscribeToHoverCapability","useHoverCapability","canHover","setCanHover","updateRenderedCapability","useTransition","unsubscribe","getActiveDefinitions","allCursors","hashes","previousDefinitions","newDefinitions","customCursorReplacesNativeCursor","cursor","valueForCursorAlignment","alignment","getCenteringTransform","placement","getCursorHash","el","portalIdAttribute","useCustomCursors","CustomCursorContext","cursors","webPageCursors","registerCursors","isLinkToWebPage","linkKey","linkInfoKey","useIsOnFramerCanvas","isInternalURL","isValidURL","isInternal","getRouteFromPageLink","pageLink","pathnameWithQueryParams","pathname","webPageId","isFramerPageLink","mediaType$1","parseFramerPageLink","searchParams","elementKey","collectionItem","collection","collectionKey","collectionItemId","collectionItemIdKey","pathVariablesValue","pathVariablesKey","navigateFromAttributes","elementId","pathVariablesRaw","smoothScroll","navigate","implicitPathVariables","linkFromFramerPageLink","createVariablesFromPageLinkCollectionItem","useReplaceNestedLinks","outerLink","OuterLinkContext","furthestExternalComponent","innerLink","shouldReplaceLink","onClick","propsAddedByLink","openExternalLink","onAuxClick","onKeyDown","observerRef","replacedChildren","isChildReplaceable","linkInfoIsCollectable","nestedLinksCollector","maybeReplaceAnchorWithSpan","childChildren","childProps","linkInfo","rel","AutoBreakpointVariant","humanReadableVariantMap","PropertyOverrides","setCurrentSiteId","siteId","getCurrentSiteId","currentSiteId","findAnchorElement","withinElement","ChildrenCanSuspend","withChildrenCanSuspend","findMatchingRouteAttributesForWebPageLink","getRouteAttributes","resolvedSlugs","findMatchingRouteAttributesForResolvedPath","allowRootRouteFallback","combinedPathVariables","combinedHashVariables","resolvedHref","useImplicitPathVariables","contextPathVariables","PathVariablesContext","linkMatchesRoute","combinedPathVariable","pathVariablesRegExp","hasServerOnlyRoutes","normalizeUrl","normalizedUrl","isExternalRewrite","isNavigationCheckEnabled","navigationCheckEnabled","serverOnlyRoutes","safariOnlyEnablement","mapResponseToNavigationResolution","response","redirectLocation","probedUrl","responseSiteId","probe","cacheNavigationResolution","navigationChecks","urlKey","resolution","retryNavigationCheck","retryDelayMs","runNavigationCheck","startNavigationCheck","getNavigationResolution","navigationCheck","waitForNavigationResolution","waitForNavigationResolutionTimeoutMs","getObserveRouteForPreloadingFn","connection","lowDeviceMemory","LOW_MEMORY_THRESHOLD","effectiveType","preloadDisabled","maxPreloadAmount","updateConnection","MAX_CONCURRENT_PRELOADS_SLOW_NETWORK","MAX_CONCURRENT_PRELOADS_FAST_NETWORK","onPreloadIntersectionChange","OBSERVER_THRESHOLD","activePreloadsAmount","preloadTimeout","nodesInViewport","routeToNodesInViewport","preloadedRoutes","PRELOAD_AFTER_MS","preloadPromise","nodeToRoute","preloadId","nodes","amountOfNodesInViewport","propsForLink","getTargetAttrValue","openInNewTab","handleResolveSlugError","fallbackMessage","resolveSlug","unresolvedSlug","maybeSlug","resolveSlugs","handleSlugs","unresolvedSlugs","slugKey","pathResult","slugResult","unresolvedPathSlugs","unresolvedHashSlugs","resolveSlugsWithSuspense","promises","useResolveSlugsWithSuspense","useTrackLinkClick","pageviewEventData","hrefAttribute","makeUrlAbsolute","clickTrackingId","targetWebPageId","targetRoute","targetRoutePath","targetCollectionItemId","maybeCollectionItemId","performNavigation","beforeUrlUpdate","createOnClickLinkHandler","usedCommandKey","anchorElement","isExternalLink","shouldPerformNavigation","track","trackLinkClick","createNavigate","resolveNavigation","navigationUrl","navigateOnClient","performServerNavigation","getServerNavigationUrl","redirectUrl","clickedUrl","destinationUrl","getLinkBaseUrl","getNavigationUrl","isBlankTarget","currentUrl","propsForRoutePath","linkOptions","matchedRoute","anchorTarget","cloneChildPropsWithAggregatedEvents","mergedStyle","mergeStyles","linkProps","aggregatedProps","onTap","childOnClick","childOnTap","maybeChildStyle","childStyle","hasChildStyles","hasLinkStyles","linkStyle","rebindEventHandlersIfNeeded","motionChild","restProps","isInternalNavigation","preventClickOnNativeAnchorLink","resolveLinkInternal","createWorkerTask","sha256","text","hashBuffer","randomCharacters","count","difficulty","processing","maxTime","nonce","tokenLength","secret","salt","calculateProofOfWork","webWorkerURL","worker","reject","getFormFieldNames","names","isFormField","getEncodedFormFieldsHeader","additionalKeys","fieldNames","addUTMTagsToFormData","document","useHoneypotFields","framerSiteId","FormContext","states","COMMON_FIELD_NAMES","fieldName","currentHoneypotInput","HONEYPOT_FIELD_NAME","honeypotCount","honeypotFilled","filledFieldsData","currentName","currentValue","fieldData","FIELD_DATA_ENUM","formData","METADATA_KEYS_ENUM","HONEYPOT_VERSION","getTimeSinceModuleLoadInSeconds","HoneypotFields","HoneypotInput","stateRef","trackFormSubmit","sendFormSubmitTrackingEvent","submitTrackingId","formReducer","errorState","completeState","incompleteState","pendingState","successState","stateCanSubmitForm","preventDefault","openExternalLinkInCurrentTab","linkElement","anyEmptyRequiredFields","submitForm","proofOfWork","headers","projectHash","responseHasError","EditorBarLauncher","fast","isPrioritized","isntPrioritized","libraryFeatures","editorBarFeatures","features","EditorBar","IgnoreErrors","fillPathVariables","TriggerStateProvider","visitedPagesRef","routeChangeHandlerRef","routerAPIRef","triggerStateRef","initialState","resolveRoutePath","linkToWebPage","handler","sendTrackingEventForTriggerInvoke","TriggerStateContext","pageViewEventData","maybePageViewEventData","isSamePage","aPathVariables","bPathVariables","setTimezoneAndLocaleForTracking","resolvedDateTimeOptions","pushLocaleHistoryState","pushRouteState","isSameRouteNavigation","historyPath","pushSamePageHashState","beforePush","getSafariScrollPositionReplaceStateInterval","modernSafariScrollPositionReplaceStateInterval","legacySafariScrollPositionReplaceStateInterval","setupScrollRestoration","updateScrollPosition","restoreFromBackForwardCache","restoreScrollPosition","enableBrowserScrollRestoration","disableBrowserScrollRestoration","cleanupTracking","setupContinuousScrollTracking","trackScrollPosition","originalScrollRestoration","isScrollPosition","getCurrentWindowScrollPosition","getSavedScrollPosition","scrollPosition","replaceScrollPositionForCurrentEntry","savedPosition","flush","scrollPositionReplaceStateInterval","lastScrollPositionReplaceStateTime","persistScrollPosition","flushScrollPosition","onDocumentVisibilityChange","cleanupVisibilityTracking","cleanupScrollTracking","setupScrollEndFallbackTracking","timeoutId","scheduledEntryId","cancelScheduledScrollEnd","entryId","onScrollEnd","scrollHandler","currentEntryId","quietPeriod","scrollElementIntoView","scrollIntoViewOptions","shouldSmoothScroll","tryScrollToHash","updateScrollForNavigation","behavior","restoreInitialScroll","useScrollRestoration","isScrollRestorationEnabled","pendingNavigationScrollRef","isScrollTrackingPausedRef","isCustomScrollRestorationConfigured","disableHistory","scheduleScroll","request","commitNavigationScroll","remountKey","ScrollRestorationEffects","useForceUpdate$1","SnippetsProvider","SnippetsContext","loadSnippetsModule","useSnippets","getSnippetMarkers","insertHTML","insertionParent","insertionPoint","referenceNode","range","pump","html","sourceNode","needsWait","handleScript","targetParent","beforeNode","clone","execExternalBlockingScript","findMarkers","startMarker","endMarker","startOfBodyStartMarker","endOfBodyStartMarker","startOfBodyEndMarker","endOfBodyEndMarker","startOfHeadStartMarker","endOfHeadStartMarker","startOfHeadEndMarker","endOfHeadEndMarker","comment","findSnippetMarkerNodes","startComment","endComment","snippetId","loadSnippets","snippets","placementParent","snippet","startSnippetMarker","endSnippetMarker","isLoaded","removeSnippetElements","codeStart","codeEnd","insertReference","findInsertReferece","sorting","nextNode","isRemovableNode","startIndex","reference","useLoadSnippets","isGeneratedPage","mainTagId","generatedPageDatasetKey","isInitialNavigation","getSnippets","pageId","snippetsForPlacement","snippetsSorting","canonicalURLForPath","baseURL","canonicalURL","prepareSyncLocaleMetadataAction","generatedCanonicalURL","hreflangLinks","localizedNavigationPath","xDefaultHref","useRouteLocaleContentSync","isCurrent","markAsStale","syncLocaleMetadata","executeBeforeUrlUpdateOnce","beforeUrlUpdateExecuted","useNavigationTransition","commitNavigationURL","pendingNavigationControllerRef","cancelPendingNavigation","isAbortable","transitionFn","resolveNavigationPromise","navigationTransition","Router","EMPTY_ARRAY","initialRoute","initialContentLocaleIdOverride","dep","forceUpdate","isInitialNavigationRef","routerPathnameWithHashRef","localeSwitchRequestIndexRef","currentRouteRef","currentPathVariablesRef","pendingNavigationResolutionRef","currentLocaleIdRef","scheduleNavigationScroll","currentLocaleId","useRouteContentState","textDirection","layoutDirection","adaptLayoutToTextDirection","lang","localeInfo","requestIndex","localeOrLocaleId","localeResult","setRouteContentState","nextPathWithFilledVariables","startNavigation","pathWithFilledVariables","pathnameWithHash","isHistoryTransition","onHashChange","nextHash","newRoute","routeStatus","executeBeforeUrlUpdate","inUse","usedVariable","routeElementId","sourcePathVariables","currentRouteLocaleId","isTargetRouteCommitPending","navigationResolution","currentPathnameWithHash","useSendPageView","initialCollectionItemId","currentCanonicalPathVariables","templatePageStyle","CustomCursorHost","SynchronousSuspenseErrorBoundary","MarkSuspenseEffects","NotFoundErrorBoundary","WithLayoutTemplate","pageExistsInCurrentLocale","inLayoutTemplate","notFoundPage","LayoutTemplate","currentCanonicalPathVariablesRef","overrideContentLocaleIdRef","overrideContentLocaleId","preloadImage","isObjectOrArray","getPropertyByPath","keyPath","keyParts","part","getRequestCacheKey","isNumberString","isValidFetchDataValueResult","resolveFetchDataValue","resolvedValue","getCacheDurationMs","cacheDuration","minimumCacheDurationMs","isCacheExpired","cacheDurationMs","insertionTimestamp","ServerDatabaseClientProvider","ServerDatabaseClientContext","client","PageRoot","isWebsite","MainLoop","environment","skipAnimations","isReducedMotion","serverDatabaseClient","FetchClientProvider","Wrapper","includeDataObserver","DataObserver","NavigationExport","RootComponent","useResolveLinks","resolveLink","dependencies","getLogger","getSymbolDispose","_usingCtx","using","\"for\"","getEvaluationContextPriority","activeEvaluationContext","evaluationContextScope","previousContext","yieldToMainDuringEvaluation","allowCooperativeYield","resolvedPriority","evaluateSync","_usingCtx$1","evaluateAsync","_usingCtx3","_usingCtx4","evaluateMaybeAsync","_usingCtx5","evaluateObject","evaluateArray","isAnyCollection","isAnyLegacyCollection","isAnyDatabaseCollection","isLegacyCollection","isLegacyLocalizedCollection","isDatabaseCollection","isLocalizedDatabaseCollection","compareArray","leftLength","rightLength","leftItem","rightItem","compare","collation","castArray","DatabaseValue","compareBoolean","castBoolean","valueToBoolean","compareColor","castColor","compareDate","leftDate","rightDate","castDate","date","compareEnum","castEnum","compareFile","castFile","compareLink","leftEncoded","rightEncoded","castLink","protocol","compareNumber","castNumber","valueToNumber","compareObject","leftKeys","rightKeys","leftKey","rightKey","castObject","definitionEntries","itemDefinition","compareResponsiveImage","castResponsiveImage","compareRichText","leftValue","rightValue","castRichText","compareVectorSetItem","castVectorSetItem","compareString","castString","valueToString","getCollectionItems","hasRandomCollectionId","prefix","getPersistedCollectionId","existingCollectionRef","persistedCollectionIdToSeenCollectionRef","getCollectionId","persistedId","stableCollectionId","collectionRefToStableCollectionId","getCollectionForLocale","cached","compatibilityCache","CompatibilityDatabaseCollection","Hash","isHashable","calculateHash","createSchedulingPrioritySource","initialPriority","readExecutionPriority","wrapRichTextPointer","isWrappedRichTextPointer","wrapVectorSetItemPointer","isWrappedVectorSetItemPointer","getCollectionsFromQuery","collections","collect","CollectionId","IndexId","FieldId","getNetworkLatency","getNetworkSpeed","createIndexQueryAll","GroupId","assert","AssertionError","databaseValueToSet","preloadResolvedValues","resolver","stringifyIdentifier","expression","stringifyLiteralValue","stringifyFunctionCall","stringifyExpression","argument","stringifyCaseExpression","caseString","stringifyUnaryOperation","stringifyBinaryOperation","stringifyTypeCast","stringifyQuery","stringifyCollection","stringifyJoin","stringifyFrom","join","autoIndentSql","formattedSql","sql","token","queryString","expressionString","selectExpression","orderExpression","isCollection","replaceCollection","getCacheKey","useQueryData","queryCache","getWhereExpressionFromPathVariables","expressions","useStableCallback","latestFn","rejectPending","pendingTimers","pendingPromises","createSet","useActiveVariantCallback","baseVariant","msDelay","useAddVariantProps","variantProps","gestureVariant","activeMediaQueryFromWindow","mediaQueries","activeBreakpointHashesFromWindow","breakpoints","mediaQuery","defaultHash","useHydratedBreakpointVariants","IsInitialNavigationContext","isScreenshotHost","usesMediaQueries","basePropsVariant","hydratedWithInitial","instantTransition","setActiveVariantInstant","updateStateAndRerender","mql","addMQLCallback","removeMQLCallback","requestIdleCallbackFallback","removeHiddenBreakpointLayersV2","suspenseBoundaries","activeBreakpointHashes","hiddenLayer","isSuspenseBoundaryStart","framerBreakpointCSSSelector","ssrVariant","suspenseBoundary","isSuspenseBoundaryEnd","callbackForVariant","useOnVariantChange","isActiveScreenRef","callbackMapRef","callbackMap","isActiveScreen","isOverlayed","isRoute","key$2","createGestureVariant","nextVariant","allVariants","currentVariant","activeTransition","variantTransition","getGesture","enabledGestures","isError","loading","isLoading","pressed","isPressed","hover","isHovered","createVariantClassName","safeBaseVariant","targetVariant","validBaseVariants","fallbackVariant","useRunCallbackIfPageIsVisible","listenerRef","callbackRef","clean","listenerFn","useRunCallbackIfElementIsInView","observerRefCleanup","isInViewRef","queuedMicrotask","useUpdateIfVisible","runUpdateIfPageIsVisible","runUpdateIfElementIsInView","checkViewport","getPromiseWithFallback","resolveFn","globalWaitForClickListener","globalClickReceivedListener","globalWaitingForClickResolve","useWaitForGlobalClick","useVariantState","externalDefaultVariant","externalTransitions","externalEnabledGestures","externalCycleOrder","isCanvas","runUpdateIfVisible","resolveNextVariant","nextBaseVariant","targetBaseVariant","defaultVariant","gesture","nextBase","nextGesture","clearError","yieldOnTap","globalWaitingForClickPromise","isHoveredHasUpdated","isPressedHasUpdated","setGestureState","setVariant","proposedVariant","CycleVariantState","cycleOrder","pauseOffscreen","clearLoadingGesture","addVariantProps","hasLoadingVariant","loadedBaseVariant","gestures","gestureHandlers","safeCSSValue","reUnsafeCharacters","createInputOutputRanges","exitTarget","lastInputRange","defaultRanges","firstItem","useOptimisticValue","defaultGetValueFromEvent","optimisticValue","setOptimisticValue","externalValue","previousExternalValue","setPreviousExternalValue","shouldSyncExternalValue","getValueFromEvent","normalizeValueForInputType","ClearIcon","serializeDefaultValue","isCaretOnLeft","useEscToClose","handleKeyDown","isOpen","close","calculateImageWidth","availableHeight","totalVerticalPadding","availableWidth","totalHorizontalPadding","maxWidthBasedOnHeight","optimisticallyDecodeImage","getPortalContainer","getSidePadding","padding","getTotalVerticalPadding","lightbox","getTotalHorizontalPadding","createImageWithSrcSet","isDistortionTransform","k","distortionTransforms","identityValue","isDistorted","withLightboxEffect","config","ancestorTickerContext","TickerContext","isInTickerItem","decodePromiseRef","open","setOpen","openOverrides","setOpenOverrides","onOpen","decode","srcDecodePromise","handleClick","onClose","timer","clear","currentRef","fallbackLayoutId","borderRadius","imageRendering","filter","hasAnyBorder","border","portalProps","paddingTop","paddingBottom","paddingLeft","paddingRight","layoutDependency","lightboxClassName","enterExitBackdropAnimation","targetBackdropAnimation","filterValidMotionAndDOMProps","validProps","domParser","supportsNativeParseHTML","parser","escapeHTML","replaceFramerPageLinks","rawHTML","regex","original","value1","value2","targetPath","attributes","params","pre1","pre2","post","isShallowEqualArray","convertVerticalAlignment$1","verticalAlignment","useLoadFonts","prevFontsRef","fonts","fromCanvasComponent","containerRef","newlyLoadedFontCount","newOverrideableRef","patchAndWaitForChild","refCallbackResolve","refCallbackPromise","isEffectKey","defaultValues","createKeyframes","effectValue","tokenizeText","tokenization","words","lastWordIndex","isLastWord","wordIndex","short","word","emojiSplitRe","tokenizationForEffect","transformString$1","transforms","getInitialEffectStyle","canPlay","canAnimate","useTextEffect","preview","trigger","play","cleanupRef","runAppearEffect","startDelay","effectStyle","mayAnimate","list","createElementList","actualEffect","createLineGroups","animations","currentGroup","isFragment","isLineBreak","processRichTextChildren","plainText","onlyLineBreaks","stylesPresetsClassNames","anchorLinkOffsetY","slugCounters","tokenizer","depth","dataPresetTag","elementType","stylesPresetClassName","isHeading","anchorLinkStylePresetClassName","generateHeadingSlug","anchorLink","safeGetMaxListDigits","extractTextFromReactNode","slugCounter","linearGradientLine","rad","angle","anglePoint","angleLine","Line","points","Rect","sortedPoints","point","elementPropertiesForLinearGradient","line","startPosition","endPosition","startPoint","endPoint","interpolator","elementPropertiesForRadialGradient","isRelativeNumber","withoutLastChar","getRelativeNumberValue","float","getPositionXFraction","getPositionYFraction","imagePatternPropsForFill","fill","imageWidth","imageHeight","offsetX","offsetY","fit","scaleX","scaleY","imageRatio","realWidth","realHeight","validScaleX","validScaleY","layerPositionX","layerPositionY","extraOffsetX","extraOffsetY","includeTransform","isAssetReference","mediaType","imageUrlForAsset","asset","pixelSize","isExport","useSVGTemplate","sharedSVGManager","revision","parseSVG","prefixIdsInSVG","recursivelyPrefixId","sanitizeString","prefixId","attr","fragmentIdentifier","URL_REF","prefixedValue","parseLength","unitsToPixels","getSVGSize","containsImageReference","containsCustomPropertyReference","hasBorderRadius","sizeSVG","div","localWindow","viewBox","withExternalLayout","intrinsicWidth","intrinsicHeight","getLoadingLazyAtYPosition","LOADING_LAZY_THRESHOLD","addFonts","bundles","upgradeFontBundlesAsNeeded","fontsOrBundles","font","getFonts","getFontsFromSharedStyle","oldFontBundle","fontBundles","fontOrBundle","isComponentFontBundle","upgradeComponentFont","componentFontBundleKey","fontV2","hasComponentFontV2","hasComponentFontV3","upgradeToComponentFontV2","upgradeToComponentFontV3","cssFamilyName","family","FRAMER_VARIABLE_FONT_SUFFIX","withPerformanceMarks","markStart","markEnd","runWithYield","scheduling","task","runTasksWithYield","settledTasks","isFirstTask","tasks","maybeValue","reason","getLoader","forwardLoader","PromiseState","LazyValue","native","NOT_PLAIN","SYMBOL_KEYS","array_buffer_byte_length","shared_array_buffer_byte_length","HandoverCollector","handoverCollector","handoverDataType$1","noopAsync","defaultLocaleInfo","cssVariable","conic","announceDiv","NodeIdContext","wasInBackground","NotFoundError","Observers","AnimatableValue","Hsluv","require_eventemitter3","EventEmitter3","EventEmitter","_raf","__raf","raf","LoopTimeStep","Loop","correctBorderScale","correctBorderRadius$1","baseStyle","textStyle","reactPropsRegex","mockWithWarning","mockWithoutWarning","implementation","isRuntimeInjected","fontStore","key$5","edgesInOrder","StyleSheetContext","framerPostSSRCSSSelector","componentsWithServerRenderedStyles","framerCSSMarker","CSSCollector","cssCollector","libraryCSSRules","SharedObserver","linearGradientKeys","radialGradientKeys","pointerEvents","VisibleFrame","FrameWithMotion","SharedLayoutContext","SharedLayoutRoot","ViewportContext","LayoutTree","SharedLayoutTree","NavigationTargetWrapper","NavigationContainer","NavigatorMock","NavigationContext","defaultState","NavigationCallbackContext","ControlType","hasOwnProperty","$private","ObservableObject","ObservableObjectProxyHandler","sharedProxyHandler","Data","DataObserverContext","PropertyOverridesWithoutCSS","defaultVariantKey","defaultVariants","AnimationCollector","framerAppearTransformTemplateToken","framerAppearAnimationScriptKey","loopOptionsKeys","parallaxOptionsKeys","presenceOptionsKeys","styleAppearOptionsKeys","styleTransformOptionsKeys","add","multiply","withFX","ComponentViewportProvider","withGeneratedLayoutId","setLibraryFeatures","Container","SmartComponentScopedContainer","replaceCursorClassName","cursorComponentClassName","CustomCursorContextProvider","staticCursorStyle","CustomCursorComponent","NestedLinksCollector","Instance","GracefullyDegradingErrorBoundary","observeRouteForPreloading","Link","MODULE_LOAD_TIME","FormContainer","FORCE_SHOW_EDITORBAR_LOCALSTORAGE_KEY","timezone","visitorLocale","loadingFetchResult","noop$2","FetchClient","FetchClientContext","IsRestoringCacheContext","ResolveLinks","unknownDefinition","Resolver","VIRTUAL_INDEX_FIELD","Metadata","CollectionMetadata","IndexMetadata","Indexes","FieldMetadata","Fields","OrderingField","Ordering","RequiredProps","Scope","KB","Cost","Tuple","Relation","AbstractNode","RelationalNode","ProjectionField","RelationalProject","collation$9","ScalarNode","collation$8","CaseCondition","ScalarCase","Builder","Subquery","RelationalFilter","RelationalIndexLookup","RelationalIntersection","RelationalScan","RelationalUnion","ScalarAnd","ScalarConstant","collation$7","ScalarContains","collation$6","ScalarEndsWith","ScalarEquals","ScalarGreaterThan","ScalarGreaterThanOrEqual","ScalarLessThan","ScalarLessThanOrEqual","ScalarNotEquals","ScalarOr","collation$5","ScalarStartsWith","Explorer","Group","Winner","RelationalProps","Memo","RelationalLeftJoin","RelationalLimit","RelationalOffset","ScalarArray","ScalarCast","ScalarFlatArray","collation$4","ScalarIn","collation$3","ScalarIndexOf","ScalarIntersection","ScalarLength","ScalarNot","collation$2","ScalarNotIn","ScalarVariable","Normalizer","EnforcerNode","EnforcerResolve","collation$1","EnforcerSort","Optimizer","log","QueryEngine","handoverDataType","QueryCache","keys$1","withVariantAppearEffect","WindowContext","useProvidedWindow","passwordManagerIgnoreDataProps","PlainTextInput","textInputWrapperClassName","textInputTypeWrapperClassName","textareaInputTypeWrapperClassName","clearButtonClassName","defaultTextareaResizerIcon","defaultTextareaResizerIconFlipped","defaultDateIconMaskImage","defaultTimeIconMaskImage","FormPlainTextInput","Select","selectWrapperClassName","caretOnLeftClassName","selectArrowSize","defaultSelectCaretMaskImage","FormSelect","Image$1","deprecatedRichTextPlaceholder","richTextWrapperClassName","DeprecatedRichText","BaseSVG","MotionSVG","FitText","defaultFonts","richTextContainerComponentType","RichTextContainer","RichText","ImagePatternElement","useDOM","SharedSVGEntry","visuallyHiddenStyle","SharedSVGManager","SVGInner","MAX_BACKGROUND_SVG_TEXT_LENGTH","SVGComponent","SVG","init_framer_B1b760uK","onfulfilled","onrejected","fulfill","valuePromise","thenable","boxed","regexp","view","primitive","iso","Constructor","byteOffset","utilFactory","entryKey","maybeUtils","utilsIsPromise","maybeResult","lazyValue","offsetToken","isTransparentToBlack","firstColor","secondColor","edge","widthToken","userAgent","chromePos","chromiumVersion","prevState","newState","isCalled","transaction","accumulatedChange","change","finishObservers","transactionId","updatedValues","animatable","finish","oldValue","previousValue","deltaX","deltaY","lastValue","diff","maxDiff","nTimes","centroid","sumX","sumY","sortClockwise","centerPoint","angles","Y","chan","digit2","digit1","intercept","slope","f1","f2","f3","f4","f5","f6","lr","lg","lb","divider","varU","varV","hrad","sub1","sub2","s1r","s2r","s3r","s1g","s2g","s3g","s1b","s2b","s3b","r0","r1","g0","g1","b0","b1","hueRad","cssUnit","permissiveMatch3","permissiveMatch4","space","clampedR","clampedG","clampedB","createColor","created","colorData","newColor","ColorMixModel","colorModel","colorString","hsv","colorA","colorB","model","fromColor","mixer","toColor","fraction","hslA","hslB","fromH","toH","deltaH","tween","gen","deltaR","deltaG","deltaB","deltaR2","deltaG2","deltaB2","tolerance","convertChannelToLinearRgb","channel","l1","l2","has","Events","EE","once","addListener","listener","emitter","evt","clearEvent","events","handlers","ee","listeners","a1","a2","a3","a4","a5","eventName","unique","\"requestAnimationFrame\"","postEventTasks","latest","corrected","projectionDelta","treeScale","candidate","reciever","fontSelectors","fontsLoadedCallback","lineA","y1","x2","y2","x3","lineB","y3","x4","y4","c1","beta","segments","deltaAX","deltaAY","deltaBX","deltaBY","pointOnLine","perp","hypotenuse","distance","other","xOffset","delta","yOffset","doubleValue","rectMaxX","rectMaxY","minX","maxX","minY","maxY","tl","tr","bl","ps","rect1","rect2","matrix","rectB","rectA","aMax","bMax","rects","comparingRect","rectMinX","rectMinY","rectMidX","rectMidY","pointA","pointB","minSize","diffX","diffY","br","rebasedRect","anchorRect","bound","pointToCenterLine","edges","candidateIndex","candidateRect","candidateDistance","constraints","centerX","centerY","parentWidth","parentHeight","hOpposingPinsOffset","freeSpace","vOpposingPinsOffset","parentSizeForPositioning","positioningParentWidth","positioningParentHeight","currentParentSize","componentsWithSSRStylesAttr","componentSerializationId","escapedCSS","concatenatedCSS","componentId","callbackForElement","usingMotionStyle","hasher","chr","linearGradient","overrideAngle","getStopValue","radialGradient","cssStops","nextStop","widthFactor","heightFactor","propsWithOverrides","dataProps","currentStyle","autoSized","centeringTransform","wrappedContent","_border","MotionComponent","intrinsicSize","__portal","needsReset","projectionNode","shouldAnimate","tree","isExiting","isLead","hasBecomeLead","hasExitBeenCancelled","shouldPromote","shouldDemote","overlayChanged","projection","sharedLayoutContext","animatesLayout","newCleanup","presence","viewportRef","isBeingRemoved","isLayeredContainer","shouldAnimateIn","wasCurrent","shouldAnimateOut","isPrevious","wasPrevious","origins","wasReset","exitTransition","exitAnimation","layout","perspective","identity","exitProps","areMagicMotionLayersPresent","isCurrentTarget","forceOpacity","isInitial","withMagicMotion","backdropColor","onTapBackdrop","exitBackfaceVisible","backfaceVisible","NavigationClassImpl","historyItem","#transition","#navigationAction","previousOverlay","#lastEventTimeStamp","updateState","#isSameEventTransition","transitionTraits","transitionOptions","#getStackState","overlayStackState","activeOverlay","isOverlayVisible","contentContainers","overlayContainers","stackIndex","\"Boolean\"","\"Number\"","\"MotionValue\"","\"Dimension\"","\"String\"","\"RichText\"","\"FusedNumber\"","\"Enum\"","\"SegmentedEnum\"","\"Color\"","\"Image\"","\"ResponsiveImage\"","\"File\"","\"ComponentInstance\"","\"Slot\"","\"Array\"","\"EventHandler\"","\"ChangeHandler\"","\"Transition\"","\"Link\"","\"Date\"","\"Object\"","\"Font\"","\"PageScope\"","\"ScrollSectionRef\"","\"CustomCursor\"","\"Border\"","\"Cursor\"","\"BorderRadius\"","\"Gap\"","\"CollectionReference\"","\"MultiCollectionReference\"","\"TrackingId\"","\"VectorSetItem\"","\"LinkRelValues\"","\"Location\"","\"SharedType\"","unproxiedState","privateObject","rawValue","transactions","receiver","changed","targetValue","rawValueIsObject","privateIndex","_data","cancel","cloneWithRefs","ancestorCtx","isHydrationOrSSR","breakpoint","variantHash","existing","#variantHashes","timeoutRef","forwardWithFXFlag","propsToForward","presenceEffectValues","presenceEffectStyle","inSmartComponent","targetOpacityValue","parallaxValues","parallaxStyle","parallax","transformValues","scrollStyle","styleTransform","appearEffectValues","scrollAppearStyle","styleAppear","loopValues","loopStyle","fxValues","layerOpacity","rotate","rotateX","rotateY","skewX","skewY","forwardedProps","dragConstraints","motionValueStyle","withPerspective","motionGestures","withFXFlagProps","componentViewport","cloneWithPropsAndRef","layoutIdProps","hasError","_rendersWithMotion","_withFX","outerLayoutId","as","childrenWithCodeBoundary","otherProps","tagName","plainHTMLRenderableProps","byCaller","pointerX","pointerY","cursorRef","forceRender","updateValues","updateVariant","updateCursor","fireEventToTarget","hideCursor","updateCursors","newCursors","unregister","onRegisterCursors","cursorHash","replaceNativeCursor","Cursor","springRaw","sprungX","sprungY","outerLinkKey","innerLinkKeys","outerLinkInfo","innerLinkInfo","innerLinkKey","outerLinkNestingInfo","unwrappedError","closingHTMLComment","dom","isOnFramerCanvas","relValues","maybeResolvedSlugs","preserveParams","preloadFn","restPropsAddedByLink","_routeId","_navigationUrl","_locale","_pathVariables","inputStateRef","honeypotInput","inputRef","methodsUsed","myInput","originalSetAttributeMethod","originalSetAttribute","attrName","attrValue","originalDescriptor","handleInput","originalName","honeypotStateRefs","dispatch","submissionInProgressRef","redirectTo","matchingRoute","handleSubmit","convertHoneypotFieldsForSubmission","replaceHoneypotWithMetadata","checkValidity","renderedChildren","skipFirstPageView","getFullPageviewEventData","currentLocation","hydratedCollectionItemId","eventDataOrPromise","interval","#staleQueriesInterval","currentIntervalForRequest","shortestCacheDuration","#shortestCacheDurations","intervalMs","cachedAt","#cachedAt","rawData","storedAt","cachedData","#subscribers","responseValue","cacheConfig","#preloadedRequests","ongoingFetch","#ongoingFetches","hasExpiredCache","cacheDurationForUrl","skipFetchRequest","nextSubscribers","initialClient","isRestoring","setIsRestoring","sourceValue","schema","controlEntries","controlDescription","itemIndex","pointer","richText","items","databaseItems","pointers","wrapped","ids","field","lookupNodes","ordering","resolvedFields","scopeField","fields","scope","namedFields","network","latency","totalRequests","transferredBytes","cost","tuple","tuples","predicate","isSynchronous","projections","passthrough","projectionFields","required","inputRequired","inputCost","optimizer","projectionsCost","projectionCost","outputFields","projectedValues","referencedFields","referencedOuterFields","when","then","conditions","otherwise","normalizer","inScope","select","fromScope","defaultOrdering","orderProjections","orderFields","order","orderingField","projectionScope","outScope","selects","fieldId","collectionData","collectionName","indexData","leftScope","rightScope","leftOrdering","rightOrdering","isOuterField","subquery","getArgument","functionName","predicateCost","predicates","isFullScan","lookup","leftOutputFields","rightOutputFields","leftRequired","leftCost","rightRequired","rightCost","sourceCost","targetCost","before","after","relational","winner","relationalProps","constraintCost","joinKeyMap","rightTuple","rightConstraint","tuplesForKey","leftTuple","leftConstraint","joinedTuple","limitCost","offsetCost","itemDefinitions","namedFieldEntries","namedFieldIds","inputContext","relation","relationTuple","leftSet","rightSet","shortestSet","longestSet","memo","pushedFilter","pushedLimit","nullableDefinition","isLeftVariable","arrayDefinition","castConditions","castCondition","fieldsByCollection","resolvedCollections","resolvedCollection","isAscending","leftPointer","rightPointer","normalized","enforcer","afterOptimizationYield","rawResults","rowEvaluators","rawObject","includeRaw","maybeEvaluatedPromise","raw","queryEngine","maxSize","requestedPriority","existingPriority","cachedSerialized","containsRandomCollectionId","handoverResult","queryResult","serializableResult","activeVariant","obscuredVariantId","animateState","visibleVariantId","variantAppearEffectEnabled","prevRouteKey","ariaLabel","ariaLabelledBy","ariaDescribedBy","normalizedExternalValue","setInputRef","handleClear","onClear","eventHandlers","handleWrapperClick","inputName","autofillEnabled","hasValue","showClear","wrapperClassName","isControlled","setSelectRef","hidden","measureRef","textAlignment","selectOptions","option","styleFromProps","fallbackIntrinsicSize","setFallbackIntrinsicSize","fitImageDimension","img","_children","fallbackLayoutRef","layoutRef","isOnCanvas","textOrOverride","innerHTML","escapedText","__htmlStructure","textFromDesign","htmlFromDesign","innerHTMLWithReplacedFramerPageLinks","interceptPageLinks","isHidden","isEditable","restrictedRenderTarget","hasTransformTemplate","rotation","positionSticky","positionStickyTop","positionStickyRight","positionStickyBottom","positionStickyLeft","stylesPresetsClassName","viewBoxScale","_as","renderTarget","textEffect","processedChildren","containerStyle","justifyContent","positionStyle","dataFramerName","validRestProps","layoutHints","content","contentProp","h1","h2","h3","contentId","uniqueSVG","svgSize","svgDom","generateUniqueIds","overflowVisible","newContainer","svgElement","box","providedWindow","SVGComponentInner","contentid","svgContentId","xFactor","yFactor","zoomFactor","zoom","innerStyle","_height","_opacity","_width","outerStyle","fillElement","fillColor","gradientId","elementProperties","imagePattern","svgAsBackgroundImage","requiresOverflowVisible","__html","hasTitleOrDescription","innerRef","transformer"],"sources":["https:/app.framerstatic.com/chunk.YXhckCOx.mjs","https:/app.framerstatic.com/framer.B1b760uK.mjs"],"sourcesContent":["import React from \"react\";\n\n//#region ../../shared/src/encodeSVGForURL.ts\nfunction encodeSVGForURL(svg) {\n\treturn `data:image/svg+xml,${svg.replaceAll(\"#\", \"%23\").replaceAll(\"'\", \"%27\").replaceAll(\"\\\"\", \"%22\")}`;\n}\n\n//#endregion\n//#region ../../library/src/utils/utils.ts\nfunction isFunction(value) {\n\treturn typeof value === \"function\";\n}\nfunction isBoolean(value) {\n\treturn typeof value === \"boolean\";\n}\nfunction isString(value) {\n\treturn typeof value === \"string\";\n}\nfunction isNumber(value) {\n\treturn Number.isFinite(value);\n}\nfunction isArray(value) {\n\treturn Array.isArray(value);\n}\nfunction isObject(value) {\n\treturn value !== null && typeof value === \"object\" && !isArray(value);\n}\nfunction isEmptyObject(object) {\n\tfor (const _ in object) return false;\n\treturn true;\n}\nfunction isUndefined(value) {\n\treturn typeof value === \"undefined\";\n}\nfunction isNull(value) {\n\treturn value === null;\n}\nfunction isNullish(value) {\n\treturn value == null;\n}\nfunction isValidDate(value) {\n\treturn value instanceof Date && !Number.isNaN(value.getTime());\n}\nfunction isGenerator(value) {\n\treturn isObject(value) && isFunction(value.return);\n}\nfunction isPromiseLike(value) {\n\treturn isObject(value) && isFunction(value.then);\n}\nfunction isPromise(value) {\n\treturn value instanceof Promise;\n}\nconst noop = () => {};\nconst isWindow = typeof window !== \"undefined\";\n/**\n* Determines if the provided userAgent is a bot that likely executes JavaScript.\n*\n* @internal\n*/\nconst isBot = /* @__PURE__ */ (() => isWindow && (navigator.webdriver || /bot|-google|google-|yandex|ia_archiver|crawl|spider/iu.test(navigator.userAgent)))();\nconst supportsRequestIdleCallback = /* @__PURE__ */ (() => isWindow && typeof window.requestIdleCallback === \"function\")();\nconst requestIdleCallback = /* @__PURE__ */ (() => supportsRequestIdleCallback ? window.requestIdleCallback : setTimeout)();\n/**\n* Returns a data URI for the given SVG string that can be used in CSS.\n*\n* Encodes only `#` (https://www.phpied.com/truth-encoding-svg-data-uris/) and `'` for use in `url('...')`.\n*/\nfunction encodeSVGForCSS(svg) {\n\treturn `url('${encodeSVGForURL(svg)}')`;\n}\nfunction getPleaseReportMessage(message, error) {\n\tconst formattedError = error instanceof Error ? error.stack ?? error.message : error;\n\treturn `${message ? `${message}\\n` : \"\"}In case the issue persists, report this to the Framer team via https://www.framer.com/contact/${formattedError ? `:\\n${formattedError}` : \".\"}`;\n}\nconst noopSubscribe = () => noop;\nconst returnTrue = () => true;\nconst returnFalse = () => false;\n\n//#endregion\n//#region ../../library/src/utils/assert.ts\n/**\n* Throws an error when the condition is falsy, optionally pass in a message to\n* describe the error.\n*\n* Best to use asserts where data is about to be stored. Then errors are caught\n* early, close to the cause. Otherwise data with broken expectation might hang\n* around, only to cause errors when used later on, with no pointer back to what\n* caused that bad state.\n*\n* Note that when an assert fails, consider that a fatal error caused by buggy\n* code. The program should halt, or perhaps do some kind of high level\n* recovery, and the bug should be reported and fixed. Asserts are not well\n* suited to use as defensive programming, but are good to use to quickly\n* highlight mistakes while writing new code.\n*\n* Also note asserts should not have side effects, the program should continue\n* to work when asserts are compiled away. Because asserts might be compiled\n* away in production code.\n*\n* And finally, the condition should be cheap, and the message should be a\n* static string. For anything computed pass a side-effect-free function\n* (e.g. `() => \\`unexpected ${JSON.stringify(value)}\\``), it only runs on\n* failure.\n*/\nfunction assert(condition, message) {\n\tif (condition) return;\n\tif (typeof message === \"function\") try {\n\t\tmessage = message();\n\t} catch {\n\t\tmessage = \"(assert message threw)\";\n\t}\n\tif (typeof message === \"string\" && message.length > 2048) message = message.slice(0, 2048) + \"…\";\n\tconst e = Error(message ? \"Assertion Error: \" + message : \"Assertion Error\");\n\tif (e.stack) try {\n\t\tconst lines = e.stack.split(\"\\n\");\n\t\tif (lines[1]?.includes(\"assert\")) {\n\t\t\tlines.splice(1, 1);\n\t\t\te.stack = lines.join(\"\\n\");\n\t\t} else if (lines[0]?.includes(\"assert\")) {\n\t\t\tlines.splice(0, 1);\n\t\t\te.stack = lines.join(\"\\n\");\n\t\t}\n\t} catch {}\n\tthrow e;\n}\n/**\n* Asserts that a code path is never entered. Additionally, asserts that the provided\n* value is evaluated to `never` by the type system, which means all possible discrete\n* types have been exhaustively checked by the time this statement is reached.\n*/\nfunction assertNever(x, error) {\n\tif (error instanceof Error) throw error;\n\tif (error !== void 0) throw new Error(String(error));\n\tthrow new Error(x ? `Unexpected value: ${x}` : \"Application entered invalid state\");\n}\n\n//#endregion\n//#region ../../library/src/utils/safeWindow.ts\nconst mockWindow = {\n\taddEventListener: () => {},\n\tremoveEventListener: () => {},\n\tdispatchEvent: () => false,\n\tResizeObserver: void 0,\n\tonpointerdown: false,\n\tonpointermove: false,\n\tonpointerup: false,\n\tontouchstart: false,\n\tontouchmove: false,\n\tontouchend: false,\n\tonmousedown: false,\n\tonmousemove: false,\n\tonmouseup: false,\n\tdevicePixelRatio: 1,\n\tscrollX: 0,\n\tscrollY: 0,\n\tlocation: {\n\t\thash: \"\",\n\t\thostname: \"\",\n\t\thref: \"\",\n\t\torigin: \"\",\n\t\tpathname: \"\",\n\t\tsearch: \"\"\n\t},\n\tdocument: {\n\t\tbaseURI: \"\",\n\t\tcookie: \"\",\n\t\treferrer: null\n\t},\n\tsetTimeout: () => 0,\n\tclearTimeout: () => {},\n\tsetInterval: () => 0,\n\tclearInterval: () => {},\n\trequestAnimationFrame: () => 0,\n\tcancelAnimationFrame: () => {},\n\trequestIdleCallback: () => 0,\n\tgetSelection: () => null,\n\tmatchMedia: (query) => {\n\t\treturn {\n\t\t\tmatches: false,\n\t\t\tmedia: query,\n\t\t\tonchange: () => {},\n\t\t\taddEventListener: () => {},\n\t\t\tremoveEventListener: () => {},\n\t\t\taddListener: () => {},\n\t\t\tremoveListener: () => {},\n\t\t\tdispatchEvent: () => false\n\t\t};\n\t},\n\tinnerHeight: 0,\n\tinnerWidth: 0,\n\tSVGSVGElement: {},\n\topen: function(_url, _target, _features) {},\n\t__framer_events: []\n};\n/**\n* Creates a server-safe reference to `window`, returning a mock if none is available.\n*\n* @internal\n*/\nconst safeWindow = !isWindow ? mockWindow : window;\n\n//#endregion\n//#region ../../library/src/render/types/RenderEnvironment.ts\n/**\n* The screenshot lambda runs the project on this host to force an export target state.\n* RenderEnvironment can change at runtime, but this shouldn’t.\n*\n* @internal\n*/\nfunction isScreenshotFramerHost() {\n\treturn safeWindow.location.origin === \"https://screenshot.framer.invalid\";\n}\n/**\n* @internal\n*/\nconst RenderEnvironment = /* @__PURE__ */ (() => ({\n\ttarget: isScreenshotFramerHost() ? \"EXPORT\" : \"PREVIEW\",\n\tzoom: 1\n}))();\n/**\n* This is used to temporarily execute a task in a different render environment (for example during export)\n* @internal\n*/\nfunction executeInRenderEnvironment(customEnvironment, task) {\n\tconst previousEnvironment = Object.assign({}, RenderEnvironment);\n\tObject.assign(RenderEnvironment, customEnvironment);\n\tconst result = task();\n\tObject.assign(RenderEnvironment, previousEnvironment);\n\treturn result;\n}\n/**\n* This function sets the global render environment Framer Core uses to render.\n* Because it sets global state, there should be only one thing responsable for calling it in every react app (e.g. Vekter and Preview)\n* @internal\n*/\nfunction setGlobalRenderEnvironment(environment) {\n\tObject.assign(RenderEnvironment, environment);\n}\n/**\n* @internal\n*/\nfunction useRenderEnvironment(target, zoom) {\n\tlet willChangeElements = false;\n\tif (RenderEnvironment.target !== target) {\n\t\tRenderEnvironment.target = target;\n\t\twillChangeElements = true;\n\t}\n\tif (RenderEnvironment.zoom !== zoom) RenderEnvironment.zoom = zoom;\n\treturn { willChangeElements };\n}\nconst RenderTarget = {\n\t/**\n\t* The component is to be rendered for the Framer canvas.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* function App() {\n\t*   if (RenderTarget.current() === RenderTarget.canvas) {\n\t*     return <CanvasComponent />\n\t*   }\n\t*   return <DefaultComponent />\n\t* }\n\t* ```\n\t*/\n\tcanvas: \"CANVAS\",\n\t/**\n\t* The component is to be rendered for export.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* function App() {\n\t*   if (RenderTarget.current() === RenderTarget.export) {\n\t*     return <ExportComponent />\n\t*   }\n\t*   return <DefaultComponent />\n\t* }\n\t* ```\n\t*/\n\texport: \"EXPORT\",\n\t/**\n\t* The component is to be rendered as a preview thumbnail, for example in the\n\t* component panel.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* function App() {\n\t*   if (RenderTarget.current() === RenderTarget.thumbnail) {\n\t*     return <Thumbnail />\n\t*   }\n\t*   return <DefaultComponent />\n\t* }\n\t* ```\n\t*/\n\tthumbnail: \"THUMBNAIL\",\n\t/**\n\t* The component is being rendered in the preview window.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* function App() {\n\t*   React.useEffect(() => {\n\t*     if (RenderTarget.current() === RenderTarget.preview) {\n\t*       // Do something in preview.\n\t*     }\n\t*   })\n\t*   return <DefaultComponent />\n\t* }\n\t* ```\n\t*/\n\tpreview: \"PREVIEW\",\n\t/**\n\t* Returns the current `RenderTarget` allowing components to apply\n\t* different behaviors depending on the environment.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* function App() {\n\t*   if (RenderTarget.current() === RenderTarget.thumbnail) {\n\t*     return <PreviewIcon />\n\t*   }\n\t*   return <Frame>...</Frame>\n\t* }\n\t* ```\n\t*/\n\tcurrent: () => RenderEnvironment.target,\n\t/**\n\t* Returns true if the current `RenderTarget` has performance restrictions.\n\t* Use this to avoid doing heavy work in these contexts because they may\n\t* bail on the rendering if the component takes too long.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* function App() {\n\t*   if (RenderTarget.hasRestrictions()) {\n\t*     return <SomePlaceholder />\n\t*   }\n\t*   return <RichPreviewContent />\n\t* }\n\t* ```\n\t*/\n\thasRestrictions: () => {\n\t\tconst target = RenderEnvironment.target;\n\t\tif (target === \"CANVAS\") return true;\n\t\tif (target === \"EXPORT\") return true;\n\t\treturn false;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/render/utils/setDocumentStyles.ts\nconst defaultCache = /* @__PURE__ */ new Set();\nlet defaultSheet;\n/**\n* Add CSS to the document.\n*\n* @param cssRule - CSS rule to add to the document\n*/\nfunction injectCSSRule(cssRule, sheet, cache = defaultCache) {\n\tif (!cssRule || cache.has(cssRule) || typeof document === \"undefined\") return;\n\tcache.add(cssRule);\n\tif (!sheet) {\n\t\tif (!defaultSheet) {\n\t\t\tconst styleElement = document.createElement(\"style\");\n\t\t\tstyleElement.setAttribute(\"type\", \"text/css\");\n\t\t\tstyleElement.setAttribute(\"data-framer-css\", \"true\");\n\t\t\tif (!document.head) {\n\t\t\t\tconsole.warn(\"not injecting CSS: the document is missing a <head> element\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdocument.head.appendChild(styleElement);\n\t\t\tif (styleElement.sheet) defaultSheet = styleElement.sheet;\n\t\t\telse {\n\t\t\t\tconsole.warn(\"not injecting CSS: injected <style> element does not have a sheet\", styleElement);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tsheet = defaultSheet;\n\t}\n\ttry {\n\t\tsheet.insertRule(cssRule, sheet.cssRules.length);\n\t} catch {}\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/FormInputStyleVariableNames.ts\n/**\n* FormInputStyleVariableNames represents all of the known\n* CSS variables available to be set for inputs within a form.\n* @internal\n*/\nlet FormInputStyleVariableNames = /* @__PURE__ */ function(FormInputStyleVariableNames) {\n\tFormInputStyleVariableNames[\"Padding\"] = \"--framer-input-padding\";\n\tFormInputStyleVariableNames[\"BorderRadiusTopLeft\"] = \"--framer-input-border-radius-top-left\";\n\tFormInputStyleVariableNames[\"BorderRadiusTopRight\"] = \"--framer-input-border-radius-top-right\";\n\tFormInputStyleVariableNames[\"BorderRadiusBottomRight\"] = \"--framer-input-border-radius-bottom-right\";\n\tFormInputStyleVariableNames[\"BorderRadiusBottomLeft\"] = \"--framer-input-border-radius-bottom-left\";\n\tFormInputStyleVariableNames[\"CornerShape\"] = \"--framer-input-corner-shape\";\n\tFormInputStyleVariableNames[\"BorderColor\"] = \"--framer-input-border-color\";\n\tFormInputStyleVariableNames[\"BorderTopWidth\"] = \"--framer-input-border-top-width\";\n\tFormInputStyleVariableNames[\"BorderRightWidth\"] = \"--framer-input-border-right-width\";\n\tFormInputStyleVariableNames[\"BorderBottomWidth\"] = \"--framer-input-border-bottom-width\";\n\tFormInputStyleVariableNames[\"BorderLeftWidth\"] = \"--framer-input-border-left-width\";\n\tFormInputStyleVariableNames[\"BorderStyle\"] = \"--framer-input-border-style\";\n\tFormInputStyleVariableNames[\"Background\"] = \"--framer-input-background\";\n\tFormInputStyleVariableNames[\"FontFamily\"] = \"--framer-input-font-family\";\n\tFormInputStyleVariableNames[\"FontWeight\"] = \"--framer-input-font-weight\";\n\tFormInputStyleVariableNames[\"FontSize\"] = \"--framer-input-font-size\";\n\tFormInputStyleVariableNames[\"FontColor\"] = \"--framer-input-font-color\";\n\tFormInputStyleVariableNames[\"FontStyle\"] = \"--framer-input-font-style\";\n\tFormInputStyleVariableNames[\"FontLetterSpacing\"] = \"--framer-input-font-letter-spacing\";\n\tFormInputStyleVariableNames[\"FontTextAlignment\"] = \"--framer-input-font-text-alignment\";\n\tFormInputStyleVariableNames[\"FontLineHeight\"] = \"--framer-input-font-line-height\";\n\tFormInputStyleVariableNames[\"FontOpenType\"] = \"--framer-input-font-open-type-features\";\n\tFormInputStyleVariableNames[\"FontVariationAxes\"] = \"--framer-input-font-variation-axes\";\n\tFormInputStyleVariableNames[\"PlaceholderColor\"] = \"--framer-input-placeholder-color\";\n\tFormInputStyleVariableNames[\"BoxShadow\"] = \"--framer-input-box-shadow\";\n\tFormInputStyleVariableNames[\"FocusedBorderColor\"] = \"--framer-input-focused-border-color\";\n\tFormInputStyleVariableNames[\"FocusedBorderWidth\"] = \"--framer-input-focused-border-width\";\n\tFormInputStyleVariableNames[\"FocusedBorderStyle\"] = \"--framer-input-focused-border-style\";\n\tFormInputStyleVariableNames[\"FocusedBackground\"] = \"--framer-input-focused-background\";\n\tFormInputStyleVariableNames[\"FocusedBoxShadow\"] = \"--framer-input-focused-box-shadow\";\n\tFormInputStyleVariableNames[\"FocusedTransition\"] = \"--framer-input-focused-transition\";\n\tFormInputStyleVariableNames[\"BooleanCheckedBackground\"] = \"--framer-input-boolean-checked-background\";\n\tFormInputStyleVariableNames[\"BooleanCheckedBorderColor\"] = \"--framer-input-boolean-checked-border-color\";\n\tFormInputStyleVariableNames[\"BooleanCheckedBorderWidth\"] = \"--framer-input-boolean-checked-border-width\";\n\tFormInputStyleVariableNames[\"BooleanCheckedBorderStyle\"] = \"--framer-input-boolean-checked-border-style\";\n\tFormInputStyleVariableNames[\"BooleanCheckedBoxShadow\"] = \"--framer-input-boolean-checked-box-shadow\";\n\tFormInputStyleVariableNames[\"BooleanCheckedTransition\"] = \"--framer-input-boolean-checked-transition\";\n\tFormInputStyleVariableNames[\"InvalidTextColor\"] = \"--framer-input-invalid-text-color\";\n\tFormInputStyleVariableNames[\"IconBackgroundImage\"] = \"--framer-input-icon-image\";\n\tFormInputStyleVariableNames[\"IconMaskImage\"] = \"--framer-input-icon-mask-image\";\n\tFormInputStyleVariableNames[\"IconColor\"] = \"--framer-input-icon-color\";\n\tFormInputStyleVariableNames[\"IconContent\"] = \"--framer-input-icon-content\";\n\tFormInputStyleVariableNames[\"WrapperHeight\"] = \"--framer-input-wrapper-height\";\n\treturn FormInputStyleVariableNames;\n}({});\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/shared.ts\nconst Var = FormInputStyleVariableNames;\nconst inputClassName = \"framer-form-input\";\nconst inputWrapperClassName = \"framer-form-input-wrapper\";\nconst emptyValueClassName = \"framer-form-input-empty\";\nconst forcedFocusClassName = \"framer-form-input-forced-focus\";\nconst forcedCheckedClassName = \"framer-form-input-forced-checked\";\nfunction cssValue(value) {\n\tif (typeof value === \"number\") return value;\n\tif (value.startsWith(\"--\")) return css.variable(value);\n\tif (value === \"\") return \"\\\"\\\"\";\n\treturn value;\n}\n/** Tools for generating css for form inputs. */\nconst css = /* @__PURE__ */ (() => {\n\t/**\n\t* A lightweight camelCase to kebab-case CSS templating function. References to a css variable\n\t* will be automatically wrapped in var().\n\t*/\n\tfunction css(selector, declaration) {\n\t\tlet output = \" \";\n\t\tfor (const key in declaration) {\n\t\t\tconst value = declaration[key];\n\t\t\tassert(value !== void 0, \"Encountered `undefined` in CSSDeclaration\");\n\t\t\toutput += `${key.replace(/([A-Z])/gu, \"-$1\").toLowerCase()}: ${cssValue(value)}; `;\n\t\t}\n\t\treturn selector + \" {\" + output + \"}\";\n\t}\n\t/**\n\t* Create a reference to a css variable with optional fallbacks. Variable fallbacks will be\n\t* nested as expected.\n\t*/\n\tcss.variable = (...variables) => {\n\t\tconst lastItem = variables[variables.length - 1];\n\t\tassert(lastItem !== void 0, \"Zero variables passed to `css.variable`\");\n\t\tlet value = lastItem.startsWith(\"--\") ? `var(${lastItem})` : lastItem;\n\t\tfor (let index = variables.length - 2; index >= 0; index--) value = `var(${variables[index]}, ${value})`;\n\t\treturn value;\n\t};\n\treturn css;\n})();\nconst sharedInputCSS = /* @__PURE__ */ (() => [css(`.${inputClassName}`, {\n\tpadding: css.variable(Var.Padding),\n\tbackground: \"transparent\",\n\tfontFamily: css.variable(Var.FontFamily),\n\tfontWeight: css.variable(Var.FontWeight),\n\tfontSize: css.variable(Var.FontSize),\n\tfontStyle: css.variable(Var.FontStyle),\n\tcolor: css.variable(Var.FontColor),\n\tfontFeatureSettings: css.variable(Var.FontOpenType),\n\tfontVariationSettings: css.variable(Var.FontVariationAxes),\n\tborder: \"none\",\n\ttextOverflow: \"ellipsis\",\n\twhiteSpace: \"nowrap\",\n\toverflow: \"hidden\",\n\twidth: \"100%\",\n\theight: css.variable(Var.WrapperHeight, \"100%\"),\n\tletterSpacing: css.variable(Var.FontLetterSpacing),\n\ttextAlign: css.variable(Var.FontTextAlignment),\n\tlineHeight: css.variable(Var.FontLineHeight)\n}), css(`.${inputClassName}:focus-visible`, { outline: \"none\" })])();\nconst inputWrapperCSS = /* @__PURE__ */ (() => [css(`.${inputWrapperClassName}`, { overflow: \"hidden\" })])();\nconst inputBorderAllSides = /* @__PURE__ */ (() => `var(${Var.BorderTopWidth}) var(${Var.BorderRightWidth}) var(${Var.BorderBottomWidth}) var(${Var.BorderLeftWidth})`)();\nconst inputBorderCSS = /* @__PURE__ */ (() => [`.${inputWrapperClassName}:after {\n        content: \"\";\n        pointer-events: none;\n        box-sizing: border-box;\n        position: absolute;\n        top: 0;\n        left: 0;\n        width: 100%;\n        height: 100%;\n        border-top-left-radius: var(${Var.BorderRadiusTopLeft});\n        border-top-right-radius: var(${Var.BorderRadiusTopRight});\n        border-bottom-right-radius: var(${Var.BorderRadiusBottomRight});\n        border-bottom-left-radius: var(${Var.BorderRadiusBottomLeft});\n        corner-shape: var(${Var.CornerShape});\n        border-color: var(${Var.BorderColor});\n        border-top-width: var(${Var.BorderTopWidth});\n        border-right-width: var(${Var.BorderRightWidth});\n        border-bottom-width: var(${Var.BorderBottomWidth});\n        border-left-width: var(${Var.BorderLeftWidth});\n        border-style: var(${Var.BorderStyle});\n        transition: var(${Var.FocusedTransition});\n        transition-property: border-color, border-width, border-style, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, corner-shape;\n    }`])();\nconst customValidityKey = \"customError\";\nconst validKey = \"valid\";\nfunction isRelevantValidityStateKey(key) {\n\treturn key !== customValidityKey && key !== validKey;\n}\n/**\n* Check the native validity of an input returning true as soon as we detect an\n* invalid state, skipping \"valid\", and \"customError\" which will always be true\n* because we set an empty string custom error to hide native warnings.\n*/\nfunction isInvalid(validity) {\n\tfor (const key in validity) {\n\t\tif (!isRelevantValidityStateKey(key)) continue;\n\t\tif (validity?.[key] === true) return true;\n\t}\n\treturn false;\n}\n/**\n* In some browsers, when a form is submitted, inputs with invalid values will\n* show a native warning. This is great for simple inputs. However in the case\n* where a designer has designed their own invalid state, these warnings can be\n* overwhelming. To avoid them, this hook allows setting a custom validity\n* warning when the form is submitted and the calling input is invalid. Then the\n* input will listen to onChange, and as soon as the input becomes valid again,\n* will call a provided onValid callback. This allows designers to control the\n* complete lifecycle of an input.\n*/\nfunction useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus) {\n\tconst isValidRef = React.useRef(null);\n\tconst handleInvalid = React.useCallback((e) => {\n\t\tif (!onInvalid) return;\n\t\tif (isValidRef.current === false) return;\n\t\tisValidRef.current = false;\n\t\te.currentTarget.setCustomValidity(\" \");\n\t\te.currentTarget.reportValidity();\n\t\tonInvalid(e);\n\t}, [onInvalid]);\n\tconst handleChange = React.useCallback((e) => {\n\t\tonChange?.(e);\n\t\tif (!onInvalid && !onValid) return;\n\t\tconst validity = e.target.validity;\n\t\tif (isValidRef.current === false && !isInvalid(validity)) {\n\t\t\te.currentTarget.setCustomValidity(\"\");\n\t\t\te.target.reportValidity();\n\t\t\tisValidRef.current = true;\n\t\t\tonValid?.();\n\t\t}\n\t}, [\n\t\tonInvalid,\n\t\tonValid,\n\t\tonChange\n\t]);\n\tconst handleBlur = React.useCallback((e) => {\n\t\tif (!onInvalid) {\n\t\t\tonBlur?.(e);\n\t\t\treturn;\n\t\t}\n\t\tif (isValidRef.current === false) return;\n\t\tconst validity = e.currentTarget.validity;\n\t\tif (isInvalid(validity)) {\n\t\t\thandleInvalid(e);\n\t\t\treturn;\n\t\t}\n\t\tonBlur?.(e);\n\t}, [\n\t\thandleInvalid,\n\t\tonBlur,\n\t\tonInvalid\n\t]);\n\treturn React.useMemo(() => {\n\t\treturn {\n\t\t\tonInvalid: handleInvalid,\n\t\t\tonChange: handleChange,\n\t\t\tonBlur: handleBlur,\n\t\t\tonFocus\n\t\t};\n\t}, [\n\t\thandleInvalid,\n\t\thandleChange,\n\t\thandleBlur,\n\t\tonFocus\n\t]);\n}\nconst iconSize = 16;\nconst iconImageCSS = /* @__PURE__ */ (() => ({\n\tbackgroundRepeat: \"no-repeat\",\n\tbackgroundSize: `${16}px`,\n\tmaskRepeat: \"no-repeat\",\n\tmaskSize: `${16}px`,\n\tbackgroundColor: css.variable(Var.IconColor)\n}))();\nconst inputIconCSSDeclaration = /* @__PURE__ */ (() => ({\n\tcontent: \"\",\n\tdisplay: \"block\",\n\tposition: \"absolute\",\n\tright: 0,\n\ttop: 0,\n\tbottom: 0,\n\twidth: `${16}px`,\n\tboxSizing: \"content-box\",\n\tpadding: css.variable(Var.Padding),\n\tborder: \"none\",\n\tpointerEvents: \"none\",\n\t...iconImageCSS\n}))();\n\n//#endregion\n//#region ../../library/src/render/utils/richTextListStyles.ts\nconst listStyleTypeProperty = \"--list-style-type\";\nconst maxListDigitsProperty = \"--max-list-digits\";\nfunction getMaxListDigits(start, itemCount, listStyleType) {\n\tconst lastListNumber = start + Math.max(itemCount, 1) - 1;\n\tswitch (listStyleType) {\n\t\tcase \"decimal\": return decimalMaxListDigits(lastListNumber);\n\t\tcase \"lower-alpha\":\n\t\tcase \"upper-alpha\":\n\t\tcase \"lower-latin\":\n\t\tcase \"upper-latin\": return alphaMaxListDigits(lastListNumber);\n\t\tcase \"lower-roman\":\n\t\tcase \"upper-roman\": return romanMaxListDigits(lastListNumber);\n\t\tdefault: return decimalMaxListDigits(lastListNumber);\n\t}\n}\nfunction decimalMaxListDigits(lastListNumber) {\n\treturn String(lastListNumber).length;\n}\nfunction alphaMaxListDigits(lastListNumber) {\n\tlet nextCharacters = 1;\n\twhile (letterPermutations(nextCharacters) < lastListNumber) nextCharacters++;\n\treturn nextCharacters;\n}\nfunction letterPermutations(characters) {\n\tlet permutations = 0;\n\tfor (let i = 0; i < characters; i++) permutations += 26 ** (i + 1);\n\treturn permutations;\n}\nconst romanNumeralLengthThresholds = [\n\t1,\n\t2,\n\t3,\n\t8,\n\t18,\n\t28,\n\t38,\n\t88,\n\t188,\n\t288,\n\t388,\n\t888\n];\nfunction romanMaxListDigits(lastListNumber) {\n\tlet maxLength = 0;\n\tfor (const threshold of romanNumeralLengthThresholds) {\n\t\tif (lastListNumber < threshold) return maxLength;\n\t\tmaxLength++;\n\t}\n\tconst thousands = Math.floor((lastListNumber - 888) / 1e3);\n\tif (thousands >= 1) return Math.max(maxLength, thousands + 12);\n\treturn maxLength;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/injectRichTextRules.ts\nfunction createRGBVariableFallbacks(variables, fallback) {\n\treturn css.variable(...variables.flatMap((variable) => [`${variable}-rgb`, variable]), fallback);\n}\nconst defaultRichTextContainerStyle = {\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tjustifyContent: \"flex-start\"\n};\nconst defaultTextFillStyle = { display: \"inline-block\" };\nconst defaultImageStyle = { display: \"block\" };\n/**\n* Components might be wrapped in a .ssr-variant in server-side rendering if they have property overrides.\n* We need to consider this when selecting direct children.\n* We might have the same problem with layouting styles outside rich text too, but so far haven't noticed.\n*/\nfunction selectComponentChild(parentSelector, childSelector) {\n\treturn `${parentSelector} > ${childSelector}, ${parentSelector} > .ssr-variant > ${childSelector}`;\n}\nconst richTextCSSRules = /* @__PURE__ */ (() => [\n\t`\n        [data-framer-component-type=\"RichTextContainer\"] {\n            display: ${defaultRichTextContainerStyle.display};\n            flex-direction: ${defaultRichTextContainerStyle.flexDirection};\n            justify-content: ${defaultRichTextContainerStyle.justifyContent};\n            outline: none;\n            flex-shrink: 0;\n        }\n    `,\n\t`\n        p.framer-text,\n        div.framer-text,\n        figure.framer-text,\n        h1.framer-text,\n        h2.framer-text,\n        h3.framer-text,\n        h4.framer-text,\n        h5.framer-text,\n        h6.framer-text,\n        ol.framer-text,\n        ul.framer-text {\n            margin: 0;\n            padding: 0;\n        }\n    `,\n\t`\n        p.framer-text,\n        div.framer-text,\n        h1.framer-text,\n        h2.framer-text,\n        h3.framer-text,\n        h4.framer-text,\n        h5.framer-text,\n        h6.framer-text,\n        li.framer-text,\n        ol.framer-text,\n        ul.framer-text,\n        mark.framer-text,\n        span.framer-text:not([data-text-fill]) {\n            font-family: var(--framer-font-family-preview, var(--framer-blockquote-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif)));\n            font-style: var(--framer-font-style-preview, var(--framer-blockquote-font-style, var(--framer-font-style, normal)));\n            font-weight: var(--framer-font-weight-preview, var(--framer-blockquote-font-weight, var(--framer-font-weight, 400)));\n            color: var(--framer-blockquote-text-color, var(--framer-text-color, #000));\n            font-size: calc(var(--framer-blockquote-font-size, var(--framer-font-size, 16px)) * var(--framer-font-size-scale, 1));\n            letter-spacing: var(--framer-blockquote-letter-spacing, var(--framer-letter-spacing, 0));\n            text-transform: var(--framer-blockquote-text-transform, var(--framer-text-transform, none));\n            text-decoration-line: var(--framer-blockquote-text-decoration, var(--framer-text-decoration, initial));\n            text-decoration-style: var(--framer-blockquote-text-decoration-style, var(--framer-text-decoration-style, initial));\n            text-decoration-color: var(--framer-blockquote-text-decoration-color, var(--framer-text-decoration-color, initial));\n            text-decoration-thickness: var(--framer-blockquote-text-decoration-thickness, var(--framer-text-decoration-thickness, initial));\n            text-decoration-skip-ink: var(--framer-blockquote-text-decoration-skip-ink, var(--framer-text-decoration-skip-ink, initial));\n            text-underline-offset: var(--framer-blockquote-text-decoration-offset, var(--framer-text-decoration-offset, initial));\n            line-height: var(--framer-blockquote-line-height, var(--framer-line-height, 1.2em));\n            text-align: var(--framer-blockquote-text-alignment, var(--framer-text-alignment, start));\n            -webkit-text-stroke-width: var(--framer-text-stroke-width, initial);\n            -webkit-text-stroke-color: var(--framer-text-stroke-color, initial);\n            -moz-font-feature-settings: var(--framer-font-open-type-features, initial);\n            -webkit-font-feature-settings: var(--framer-font-open-type-features, initial);\n            font-feature-settings: var(--framer-font-open-type-features, initial);\n            font-variation-settings: var(--framer-font-variation-axes-preview, var(--framer-font-variation-axes, normal));\n            text-wrap: var(--framer-text-wrap-override, var(--framer-text-wrap));\n        }\n    `,\n\t`\n        mark.framer-text,\n        p.framer-text,\n        div.framer-text,\n        h1.framer-text,\n        h2.framer-text,\n        h3.framer-text,\n        h4.framer-text,\n        h5.framer-text,\n        h6.framer-text,\n        li.framer-text,\n        ol.framer-text,\n        ul.framer-text {\n            background-color: var(--framer-blockquote-text-background-color, var(--framer-text-background-color, initial));\n            border-radius: var(--framer-blockquote-text-background-radius, var(--framer-text-background-radius, initial));\n            corner-shape: var(--framer-blockquote-text-background-corner-shape, var(--framer-text-background-corner-shape, initial));\n            padding: var(--framer-blockquote-text-background-padding, var(--framer-text-background-padding, initial));\n        }\n    `,\n\t`\n        @supports not (color: color(display-p3 1 1 1)) {\n            p.framer-text,\n            div.framer-text,\n            h1.framer-text,\n            h2.framer-text,\n            h3.framer-text,\n            h4.framer-text,\n            h5.framer-text,\n            h6.framer-text,\n            li.framer-text,\n            ol.framer-text,\n            ul.framer-text,\n            span.framer-text:not([data-text-fill]) {\n                color: ${createRGBVariableFallbacks([\"--framer-blockquote-text-color\", \"--framer-text-color\"], \"#000\")};\n                -webkit-text-stroke-color: ${createRGBVariableFallbacks([\"--framer-text-stroke-color\"], \"initial\")};\n            }\n\n            mark.framer-text {\n                background-color: ${createRGBVariableFallbacks([\"--framer-blockquote-text-background-color\", \"--framer-text-background-color\"], \"initial\")};\n            }\n        }\n    `,\n\t`\n        .framer-fit-text .framer-text {\n            white-space: nowrap;\n            white-space-collapse: preserve;\n        }\n    `,\n\t`\n        strong.framer-text {\n            font-family: var(--framer-blockquote-font-family-bold, var(--framer-font-family-bold));\n            font-style: var(--framer-blockquote-font-style-bold, var(--framer-font-style-bold));\n            font-weight: var(--framer-blockquote-font-weight-bold, var(--framer-font-weight-bold, bolder));\n            font-variation-settings: var(--framer-blockquote-font-variation-axes-bold, var(--framer-font-variation-axes-bold));\n        }\n    `,\n\t`\n        em.framer-text {\n            font-family: var(--framer-blockquote-font-family-italic, var(--framer-font-family-italic));\n            font-style: var(--framer-blockquote-font-style-italic, var(--framer-font-style-italic, italic));\n            font-weight: var(--framer-blockquote-font-weight-italic, var(--framer-font-weight-italic));\n            font-variation-settings: var(--framer-blockquote-font-variation-axes-italic, var(--framer-font-variation-axes-italic));\n        }\n    `,\n\t`\n        em.framer-text > strong.framer-text {\n            font-family: var(--framer-blockquote-font-family-bold-italic, var(--framer-font-family-bold-italic));\n            font-style: var(--framer-blockquote-font-style-bold-italic, var(--framer-font-style-bold-italic, italic));\n            font-weight: var(--framer-blockquote-font-weight-bold-italic, var(--framer-font-weight-bold-italic, bolder));\n            font-variation-settings: var(--framer-blockquote-font-variation-axes-bold-italic, var(--framer-font-variation-axes-bold-italic));\n        }\n    `,\n\t`\n        p.framer-text:not(:first-child),\n        div.framer-text:not(:first-child),\n        h1.framer-text:not(:first-child),\n        h2.framer-text:not(:first-child),\n        h3.framer-text:not(:first-child),\n        h4.framer-text:not(:first-child),\n        h5.framer-text:not(:first-child),\n        h6.framer-text:not(:first-child),\n        ol.framer-text:not(:first-child),\n        ul.framer-text:not(:first-child),\n        blockquote.framer-text:not(:first-child),\n        table.framer-text:not(:first-child),\n        figure.framer-text:not(:first-child),\n        .framer-image.framer-text:not(:first-child) {\n            margin-top: var(--framer-blockquote-paragraph-spacing, var(--framer-paragraph-spacing, 0));\n        }\n    `,\n\t`\n        li.framer-text > ul.framer-text:nth-child(2),\n        li.framer-text > ol.framer-text:nth-child(2) {\n            margin-top: 0;\n        }\n    `,\n\t`\n        .framer-text[data-text-fill] {\n            display: ${defaultTextFillStyle.display};\n            background-clip: text;\n            -webkit-background-clip: text;\n            /* make this a transparent color if you want to visualise the clipping  */\n            -webkit-text-fill-color: transparent;\n            padding: max(0em, calc(calc(1.3em - var(--framer-blockquote-line-height, var(--framer-line-height, 1.3em))) / 2));\n            margin: min(0em, calc(calc(1.3em - var(--framer-blockquote-line-height, var(--framer-line-height, 1.3em))) / -2));\n        }\n    `,\n\t`\n        code.framer-text,\n        code.framer-text span.framer-text:not([data-text-fill]) {\n            font-family: var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif));\n            font-style: var(--framer-blockquote-font-style, var(--framer-code-font-style, var(--framer-font-style, normal)));\n            font-weight: var(--framer-blockquote-font-weight, var(--framer-code-font-weight, var(--framer-font-weight, 400)));\n            color: var(--framer-blockquote-text-color, var(--framer-code-text-color, var(--framer-text-color, #000)));\n            font-size: calc(var(--framer-blockquote-font-size, var(--framer-font-size, 16px)) * var(--framer-font-size-scale, 1));\n            letter-spacing: var(--framer-blockquote-letter-spacing, var(--framer-letter-spacing, 0));\n            line-height: var(--framer-blockquote-line-height, var(--framer-line-height, 1.2em));\n        }\n    `,\n\t`\n        @supports not (color: color(display-p3 1 1 1)) {\n            code.framer-text,\n            code.framer-text span.framer-text:not([data-text-fill]) {\n                color: ${createRGBVariableFallbacks([\n\t\t\"--framer-blockquote-text-color\",\n\t\t\"--framer-code-text-color\",\n\t\t\"--framer-text-color\"\n\t], \"#000\")};\n            }\n        }\n    `,\n\t`\n        blockquote.framer-text {\n            margin-block-start: initial;\n            margin-block-end: initial;\n            margin-inline-start: initial;\n            margin-inline-end: initial;\n            unicode-bidi: initial;\n        }\n    `,\n\t`\n        a.framer-text,\n        a.framer-text span.framer-text:not([data-text-fill]),\n        span.framer-text[data-nested-link],\n        span.framer-text[data-nested-link] span.framer-text:not([data-text-fill]) {\n            /* Ensure the color is inherited from the link style rather than the parent text for nested spans */\n            color: inherit;\n            font-family: var(--framer-font-family-preview, var(--framer-link-font-family, var(--framer-blockquote-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif))));\n            font-style: var(--framer-font-style-preview, var(--framer-link-font-style, var(--framer-blockquote-font-style, var(--framer-font-style, normal))));\n            font-weight: var(--framer-font-weight-preview, var(--framer-link-font-weight, var(--framer-blockquote-font-weight, var(--framer-font-weight, 400))));\n            font-size: calc(var(--framer-blockquote-font-size, var(--framer-font-size, 16px)) * var(--framer-font-size-scale, 1));\n            text-transform: var(--framer-link-text-transform, var(--framer-blockquote-text-transform, var(--framer-text-transform, none)));\n            /* Cursor inherit to overwrite the user agent stylesheet on rich text links. */\n            cursor: var(--framer-custom-cursors, pointer);\n            /* Don't inherit background styles from any parent text style. */\n            background-color: initial;\n            border-radius: var(--framer-link-text-background-radius, initial);\n            corner-shape: var(--framer-link-text-background-corner-shape, initial);\n            padding: var(--framer-link-text-background-padding, initial);\n        }\n    `,\n\t`\n        a.framer-text,\n        span.framer-text[data-nested-link] {\n            color: var(--framer-link-text-color, var(--framer-blockquote-text-color, var(--framer-text-color, #000)));\n            text-decoration-line: var(--framer-link-text-decoration, var(--framer-blockquote-text-decoration, var(--framer-text-decoration, initial)));\n            text-decoration-style: var(--framer-link-text-decoration-style, var(--framer-blockquote-text-decoration-style, var(--framer-text-decoration-style, initial)));\n            text-decoration-color: var(--framer-link-text-decoration-color, var(--framer-blockquote-text-decoration-color, var(--framer-text-decoration-color, initial)));\n            text-decoration-thickness: var(--framer-link-text-decoration-thickness, var(--framer-blockquote-text-decoration-thickness, var(--framer-text-decoration-thickness, initial)));\n            text-decoration-skip-ink: var(--framer-link-text-decoration-skip-ink, var(--framer-blockquote-text-decoration-skip-ink, var(--framer-text-decoration-skip-ink, initial)));\n            text-underline-offset: var(--framer-link-text-decoration-offset, var(--framer-blockquote-text-decoration-offset, var(--framer-text-decoration-offset, initial)));\n            /* Don't inherit background styles from any parent text style. */\n            background-color: var(--framer-link-text-background-color, initial);\n        }\n    `,\n\t`\n        @supports not (color: color(display-p3 1 1 1)) {\n            a.framer-text,\n            span.framer-text[data-nested-link] {\n                color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-text-color\",\n\t\t\"--framer-blockquote-text-color\",\n\t\t\"--framer-text-color\"\n\t], \"#000\")};\n                background-color: ${createRGBVariableFallbacks([\"--framer-link-text-background-color\"], \"initial\")};\n                text-decoration-color: ${createRGBVariableFallbacks([\"--framer-link-text-decoration-color\", \"--framer-text-decoration-color\"], \"currentcolor\")};\n            }\n        }\n    `,\n\t`\n    code.framer-text a.framer-text,\n    code.framer-text a.framer-text span.framer-text:not([data-text-fill]),\n    code.framer-text span.framer-text[data-nested-link],\n    code.framer-text span.framer-text[data-nested-link] span.framer-text:not([data-text-fill]) {\n        font-family: var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif));\n        font-style: var(--framer-blockquote-font-style, var(--framer-code-font-style, var(--framer-font-style, normal)));\n        font-weight: var(--framer-blockquote-font-weight, var(--framer-code-font-weight, var(--framer-font-weight, 400)));\n        color: inherit;\n        font-size: calc(var(--framer-blockquote-font-size, var(--framer-font-size, 16px)) * var(--framer-font-size-scale, 1));\n    }\n`,\n\t`\n    code.framer-text a.framer-text,\n    code.framer-text span.framer-text[data-nested-link] {\n        color: var(--framer-link-text-color, var(--framer-blockquote-text-color, var(--framer-code-text-color, var(--framer-text-color, #000))));\n    }\n`,\n\t`\n    @supports not (color: color(display-p3 1 1 1)) {\n        code.framer-text a.framer-text,\n        code.framer-text a.framer-text span.framer-text:not([data-text-fill]),\n        code.framer-text span.framer-text[data-nested-link],\n        code.framer-text span.framer-text[data-nested-link] span.framer-text:not([data-text-fill]) {\n            color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-text-color\",\n\t\t\"--framer-blockquote-text-color\",\n\t\t\"--framer-code-text-color\",\n\t\t\"--framer-text-color\"\n\t], \"#000\")};\n        }\n    }\n`,\n\t`\n        /* Linked images keep the radius and padding of their image style. */\n        a.framer-text:where(:not(.framer-image)):hover,\n        a.framer-text:hover span.framer-text:not([data-text-fill]),\n        span.framer-text[data-nested-link]:hover,\n        span.framer-text[data-nested-link]:hover span.framer-text:not([data-text-fill]) {\n            font-family: var(--framer-font-family-preview, var(--framer-link-hover-font-family, var(--framer-link-font-family, var(--framer-blockquote-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif)))));\n            font-style: var(--framer-font-style-preview, var(--framer-link-hover-font-style, var(--framer-link-font-style, var(--framer-blockquote-font-style, var(--framer-font-style, normal)))));\n            font-weight: var(--framer-font-weight-preview, var(--framer-link-hover-font-weight, var(--framer-link-font-weight, var(--framer-blockquote-font-weight, var(--framer-font-weight, 400)))));\n            font-size: calc(var(--framer-link-hover-font-size, var(--framer-blockquote-font-size, var(--framer-font-size, 16px))) * var(--framer-font-size-scale, 1));\n            text-transform: var(--framer-link-hover-text-transform, var(--framer-link-text-transform, var(--framer-blockquote-text-transform, var(--framer-text-transform, none))));\n            border-radius: var(--framer-link-hover-text-background-radius, var(--framer-link-text-background-radius, var(--framer-text-background-radius, initial)));\n            corner-shape: var(--framer-link-hover-text-background-corner-shape, var(--framer-link-text-background-corner-shape, var(--framer-text-background-corner-shape, initial)));\n            padding: var(--framer-link-hover-text-background-padding, var(--framer-link-text-background-padding, var(--framer-text-background-padding, initial)));\n        }\n    `,\n\t`\n        a.framer-text:hover,\n        span.framer-text[data-nested-link]:hover {\n            color: var(--framer-link-hover-text-color, var(--framer-link-text-color, var(--framer-blockquote-text-color, var(--framer-text-color, #000))));\n            text-decoration-line: var(--framer-link-hover-text-decoration, var(--framer-link-text-decoration, var(--framer-blockquote-text-decoration, var(--framer-text-decoration, initial))));\n            text-decoration-style: var(--framer-link-hover-text-decoration-style, var(--framer-link-text-decoration-style, var(--framer-blockquote-text-decoration-style, var(--framer-text-decoration-style, initial))));\n            text-decoration-color: var(--framer-link-hover-text-decoration-color, var(--framer-link-text-decoration-color, var(--framer-blockquote-text-decoration-color, var(--framer-text-decoration-color, initial))));\n            text-decoration-thickness: var(--framer-link-hover-text-decoration-thickness, var(--framer-link-text-decoration-thickness, var(--framer-blockquote-text-decoration-thickness, var(--framer-text-decoration-thickness, initial))));\n            text-decoration-skip-ink: var(--framer-link-hover-text-decoration-skip-ink, var(--framer-link-text-decoration-skip-ink, var(--framer-blockquote-text-decoration-skip-ink, var(--framer-text-decoration-skip-ink, initial))));\n            text-underline-offset: var(--framer-link-hover-text-decoration-offset, var(--framer-link-text-decoration-offset, var(--framer-blockquote-text-decoration-offset, var(--framer-text-decoration-offset, initial))));\n            background-color: var(--framer-link-hover-text-background-color, var(--framer-link-text-background-color, var(--framer-text-background-color, initial)));\n        }\n    `,\n\t`\n    @supports not (color: color(display-p3 1 1 1)) {\n        a.framer-text:hover,\n        span.framer-text[data-nested-link]:hover {\n            color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-hover-text-color\",\n\t\t\"--framer-link-text-color\",\n\t\t\"--framer-blockquote-text-color\",\n\t\t\"--framer-text-color\"\n\t], \"#000\")};\n            background-color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-hover-text-background-color\",\n\t\t\"--framer-link-text-background-color\",\n\t\t\"--framer-text-background-color\"\n\t], \"initial\")};\n            text-decoration-color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-hover-text-decoration-color\",\n\t\t\"--framer-link-text-decoration-color\",\n\t\t\"--framer-text-decoration-color\"\n\t], \"currentcolor\")};\n        }\n    }\n    `,\n\t`\n        code.framer-text a.framer-text:hover,\n        code.framer-text span.framer-text[data-nested-link]:hover {\n            color: var(--framer-link-hover-text-color, var(--framer-link-text-color, var(--framer-blockquote-text-color, var(--framer-code-text-color, var(--framer-text-color, #000)))));\n        }\n    `,\n\t`\n    @supports not (color: color(display-p3 1 1 1)) {\n        code.framer-text a.framer-text:hover,\n        code.framer-text span.framer-text[data-nested-link]:hover {\n            color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-hover-text-color\",\n\t\t\"--framer-link-text-color\",\n\t\t\"--framer-blockquote-text-color\",\n\t\t\"--framer-code-text-color\",\n\t\t\"--framer-text-color\"\n\t], \"#000\")};\n        }\n    }\n   `,\n\t`\n        a.framer-text:where(:not(.framer-image))[data-framer-page-link-current],\n        a.framer-text[data-framer-page-link-current] span.framer-text:not([data-text-fill]),\n        span.framer-text[data-framer-page-link-current],\n        span.framer-text[data-framer-page-link-current] span.framer-text:not([data-text-fill]) {\n            font-family: var(--framer-font-family-preview, var(--framer-link-current-font-family, var(--framer-link-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif))));\n            font-style: var(--framer-font-style-preview, var(--framer-link-current-font-style, var(--framer-link-font-style, var(--framer-font-style, normal))));\n            font-weight: var(--framer-font-weight-preview, var(--framer-link-current-font-weight, var(--framer-link-font-weight, var(--framer-font-weight, 400))));\n            font-size: calc(var(--framer-link-current-font-size, var(--framer-link-font-size, var(--framer-font-size, 16px))) * var(--framer-font-size-scale, 1));\n            text-transform: var(--framer-link-current-text-transform, var(--framer-link-text-transform, var(--framer-text-transform, none)));\n            border-radius: var(--framer-link-current-text-background-radius, var(--framer-link-text-background-radius, initial));\n            corner-shape: var(--framer-link-current-text-background-corner-shape, var(--framer-link-text-background-corner-shape, initial));\n            padding: var(--framer-link-current-text-background-padding, var(--framer-link-text-background-padding, initial));\n        }\n    `,\n\t`\n        a.framer-text[data-framer-page-link-current],\n        span.framer-text[data-framer-page-link-current] {\n            color: var(--framer-link-current-text-color, var(--framer-link-text-color, var(--framer-text-color, #000)));\n            text-decoration-line: var(--framer-link-current-text-decoration, var(--framer-link-text-decoration, var(--framer-text-decoration, initial)));\n            text-decoration-style: var(--framer-link-current-text-decoration-style, var(--framer-link-text-decoration-style, var(--framer-text-decoration-style, initial)));\n            text-decoration-color: var(--framer-link-current-text-decoration-color, var(--framer-link-text-decoration-color, var(--framer-text-decoration-color, initial)));\n            text-decoration-thickness: var(--framer-link-current-text-decoration-thickness, var(--framer-link-text-decoration-thickness, var(--framer-text-decoration-thickness, initial)));\n            text-decoration-skip-ink: var(--framer-link-current-text-decoration-skip-ink, var(--framer-link-text-decoration-skip-ink, var(--framer-text-decoration-skip-ink, initial)));\n            text-underline-offset: var(--framer-link-current-text-decoration-offset, var(--framer-link-text-decoration-offset, var(--framer-text-decoration-offset, initial)));\n            background-color: var(--framer-link-current-text-background-color, var(--framer-link-text-background-color, var(--framer-text-background-color, initial)));\n        }\n    `,\n\t`\n        @supports not (color: color(display-p3 1 1 1)) {\n            a.framer-text[data-framer-page-link-current],\n            span.framer-text[data-framer-page-link-current]{\n                color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-current-text-color\",\n\t\t\"--framer-link-text-color\",\n\t\t\"--framer-text-color\"\n\t], \"#000\")};\n                background-color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-current-text-background-color\",\n\t\t\"--framer-link-text-background-color\",\n\t\t\"--framer-text-background-color\"\n\t], \"initial\")};\n                text-decoration-color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-current-text-decoration-color\",\n\t\t\"--framer-link-text-decoration-color\",\n\t\t\"--framer-text-decoration-color\"\n\t], \"currentcolor\")};\n            }\n        }\n    `,\n\t`\n        code.framer-text a.framer-text[data-framer-page-link-current],\n        code.framer-text a.framer-text[data-framer-page-link-current] span.framer-text:not([data-text-fill]),\n        code.framer-text span.framer-text[data-framer-page-link-current],\n        code.framer-text span.framer-text[data-framer-page-link-current] span.framer-text:not([data-text-fill]) {\n            font-family: var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif));\n            font-style: var(--framer-code-font-style, var(--framer-font-style, normal));\n            font-weight: var(--framer-code-font-weight, var(--framer-font-weight, 400));\n            color: inherit;\n            font-size: calc(var(--framer-link-current-font-size, var(--framer-link-font-size, var(--framer-font-size, 16px))) * var(--framer-font-size-scale, 1));\n        }\n    `,\n\t`\n        code.framer-text a.framer-text[data-framer-page-link-current],\n        code.framer-text span.framer-text[data-framer-page-link-current] {\n            color: var(--framer-link-current-text-color, var(--framer-link-text-color, var(--framer-code-text-color, var(--framer-text-color, #000))));\n        }\n    `,\n\t`\n        @supports not (color: color(display-p3 1 1 1)) {\n            code.framer-text a.framer-text[data-framer-page-link-current],\n            code.framer-text a.framer-text[data-framer-page-link-current] span.framer-text:not([data-text-fill]),\n            code.framer-text span.framer-text[data-framer-page-link-current],\n            code.framer-text span.framer-text[data-framer-page-link-current] span.framer-text:not([data-text-fill]) {\n                color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-current-text-color\",\n\t\t\"--framer-link-text-color\",\n\t\t\"--framer-code-text-color\",\n\t\t\"--framer-text-color\"\n\t], \"#000\")};\n                background-color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-current-text-background-color\",\n\t\t\"--framer-link-text-background-color\",\n\t\t\"--framer-text-background-color\"\n\t], \"initial\")};\n            }\n        }\n    `,\n\t`\n        a.framer-text:where(:not(.framer-image))[data-framer-page-link-current]:hover,\n        a.framer-text[data-framer-page-link-current]:hover span.framer-text:not([data-text-fill]),\n        span.framer-text[data-framer-page-link-current]:hover,\n        span.framer-text[data-framer-page-link-current]:hover span.framer-text:not([data-text-fill]) {\n            color: inherit;\n            font-family: var(--framer-font-family-preview, var(--framer-link-hover-font-family, var(--framer-link-current-font-family, var(--framer-link-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif)))));\n            font-style: var(--framer-font-style-preview, var(--framer-link-hover-font-style, var(--framer-link-current-font-style, var(--framer-link-font-style, var(--framer-font-style, normal)))));\n            font-weight: var(--framer-font-weight-preview, var(--framer-link-hover-font-weight, var(--framer-link-current-font-weight, var(--framer-link-font-weight, var(--framer-font-weight, 400)))));\n            font-size: calc(var(--framer-link-hover-font-size, var(--framer-link-current-font-size, var(--framer-link-font-size, var(--framer-font-size, 16px)))) * var(--framer-font-size-scale, 1));\n            text-transform: var(--framer-link-hover-text-transform, var(--framer-link-current-text-transform, var(--framer-link-text-transform, var(--framer-text-transform, none))));\n            border-radius: var(--framer-link-hover-text-background-radius, var(--framer-link-current-text-background-radius, var(--framer-link-text-background-radius, initial)));\n            corner-shape: var(--framer-link-hover-text-background-corner-shape, var(--framer-link-current-text-background-corner-shape, var(--framer-link-text-background-corner-shape, initial)));\n            padding: var(--framer-link-hover-text-background-padding, var(--framer-link-current-text-background-padding, var(--framer-link-text-background-padding, initial)));\n        }\n    `,\n\t`\n        a.framer-text[data-framer-page-link-current]:hover,\n        span.framer-text[data-framer-page-link-current]:hover {\n            color: var(--framer-link-hover-text-color, var(--framer-link-current-text-color, var(--framer-link-text-color, var(--framer-text-color, #000))));\n            text-decoration-line: var(--framer-link-hover-text-decoration, var(--framer-link-current-text-decoration, var(--framer-link-text-decoration, var(--framer-text-decoration, initial))));\n            text-decoration-style: var(--framer-link-hover-text-decoration-style, var(--framer-link-current-text-decoration-style, var(--framer-link-text-decoration-style, var(--framer-text-decoration-style, initial))));\n            text-decoration-color: var(--framer-link-hover-text-decoration-color, var(--framer-link-current-text-decoration-color, var(--framer-link-text-decoration-color, var(--framer-text-decoration-color, initial))));\n            text-decoration-thickness: var(--framer-link-hover-text-decoration-thickness, var(--framer-link-current-text-decoration-thickness, var(--framer-link-text-decoration-thickness, var(--framer-text-decoration-thickness, initial))));\n            text-decoration-skip-ink: var(--framer-link-hover-text-decoration-skip-ink, var(--framer-link-current-text-decoration-skip-ink, var(--framer-link-text-decoration-skip-ink, var(--framer-text-decoration-skip-ink, initial))));\n            text-underline-offset: var(--framer-link-hover-text-decoration-offset, var(--framer-link-current-text-decoration-offset, var(--framer-link-text-decoration-offset, var(--framer-text-decoration-offset, initial))));\n            background-color: var(--framer-link-hover-text-background-color, var(--framer-link-current-text-background-color, var(--framer-link-text-background-color, initial)));\n        }\n    `,\n\t`\n        @supports not (color: color(display-p3 1 1 1)) {\n            a.framer-text[data-framer-page-link-current]:hover,\n            span.framer-text[data-framer-page-link-current]:hover {\n                color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-hover-text-color\",\n\t\t\"--framer-link-current-text-color\",\n\t\t\"--framer-link-text-color\",\n\t\t\"--framer-code-text-color\",\n\t\t\"--framer-text-color\"\n\t], \"#000\")};\n                background-color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-hover-text-background-color\",\n\t\t\"--framer-link-current-text-background-color\",\n\t\t\"--framer-link-text-background-color\"\n\t], \"initial\")};\n                text-decoration-color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-hover-text-decoration-color\",\n\t\t\"--framer-link-current-text-decoration-color\",\n\t\t\"--framer-link-text-decoration-color\",\n\t\t\"--framer-text-decoration-color\"\n\t], \"currentcolor\")};\n            }\n        }\n    `,\n\t`\n        code.framer-text a.framer-text[data-framer-page-link-current]:hover,\n        code.framer-text span.framer-text[data-framer-page-link-current]:hover {\n            color: var(--framer-link-hover-text-color, var(--framer-link-current-text-color, var(--framer-link-text-color, var(--framer-code-text-color, var(--framer-text-color, #000)))));\n        }\n    `,\n\t`\n        @supports not (color: color(display-p3 1 1 1)) {\n            code.framer-text a.framer-text[data-framer-page-link-current]:hover,\n            code.framer-text a.framer-text[data-framer-page-link-current]:hover span.framer-text:not([data-text-fill]),\n            code.framer-text span.framer-text[data-framer-page-link-current]:hover,\n            code.framer-text span.framer-text[data-framer-page-link-current]:hover span.framer-text:not([data-text-fill]) {\n                color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-hover-text-color\",\n\t\t\"--framer-link-current-text-color\",\n\t\t\"--framer-link-text-color\",\n\t\t\"--framer-code-text-color\",\n\t\t\"--framer-text-color\"\n\t], \"#000\")};\n                background-color: ${createRGBVariableFallbacks([\n\t\t\"--framer-link-hover-text-background-color\",\n\t\t\"--framer-link-current-text-background-color\",\n\t\t\"--framer-link-text-background-color\"\n\t], \"initial\")};\n            }\n        }\n    `,\n\t`\n        .framer-image.framer-text {\n            display: ${defaultImageStyle.display};\n            max-width: 100%;\n            height: auto;\n        }\n    `,\n\t`\n        /* A linked image gets its image style on both the link and the image; only the image draws the border and shadow. */\n        a.framer-image.framer-text {\n            border: none;\n            box-shadow: none;\n        }\n    `,\n\t`\n        .text-styles-preset-reset.framer-text {\n            --framer-font-family: Inter, Inter Placeholder, sans-serif;\n            --framer-font-style: normal;\n            --framer-font-weight: 500;\n            --framer-text-color: #000;\n            --framer-font-size: 16px;\n            --framer-letter-spacing: 0;\n            --framer-text-transform: none;\n            --framer-text-decoration: none;\n            --framer-text-decoration-style: none;\n            --framer-text-decoration-color: none;\n            --framer-text-decoration-thickness: none;\n            --framer-text-decoration-skip-ink: none;\n            --framer-text-decoration-offset: none;\n            --framer-line-height: 1.2em;\n            --framer-text-alignment: start;\n            --framer-font-open-type-features: normal;\n            --framer-text-background-color: initial;\n            --framer-text-background-radius: initial;\n            --framer-text-background-corner-shape: initial;\n            --framer-text-background-padding: initial;\n        }\n    `,\n\t`\n        ol.framer-text {\n            --list-style-type: decimal;\n        }\n    `,\n\t`\n        ul.framer-text,\n        ol.framer-text {\n            padding-inline-start: 0;\n            position: relative;\n        }\n    `,\n\t`\n        li.framer-text {\n            counter-increment: list-item;\n            list-style: \"\";\n            padding-inline-start: 2ch;\n        }\n    `,\n\t`\n        ol.framer-text > li.framer-text {\n            padding-inline-start: calc(calc(var(${maxListDigitsProperty}, 1) + 1) * 1ch);\n        }\n    `,\n\t`\n        ol.framer-text > li.framer-text::before {\n            position: absolute;\n            inset-inline-start: 0;\n            content: counter(list-item, var(--list-style-type)) \".\";\n            font-variant-numeric: tabular-nums;\n        }\n    `,\n\t`\n        ul.framer-text > li.framer-text::before {\n            position: absolute;\n            inset-inline-start: 0;\n            content: \"•\";\n        }\n    `,\n\t`\n        .framer-table-wrapper {\n            overflow-x: auto;\n        }\n    `,\n\t`\n        table.framer-text,\n        .framer-table-wrapper table.framer-text {\n            border-collapse: separate;\n            border-spacing: 0;\n            table-layout: auto;\n            word-break: normal;\n            width: 100%;\n        }\n    `,\n\t`\n        td.framer-text,\n        th.framer-text {\n            min-width: 16ch;\n            overflow-wrap: anywhere;\n            vertical-align: top;\n        }\n    `,\n\t`\n        ${selectComponentChild(\".framer-text-module[data-width=\\\"fill\\\"]\", \":first-child\")} {\n            width: 100% !important;\n        }\n    `\n])();\n/**\n* Safari <=16 doesn't support text truncation (-webkit-line-clamp) of elements with block-level\n* ancestors. To workaround this, we render all ancestors as inline elements, so that the browser\n* can truncate the text as it would normally.\n*\n* Then we add a line break after each of the elements that we rendered inline, to retain as much of\n* the original structure as possible. It is not perfect, but it gets us most of functionality and\n* appearance for Safari <=16 users.\n*\n* We use CSS variables that are only defined when the text is truncated, so that the fix is only\n* applied to truncated text. This is better than using data attributes to target text truncated\n* nodes, because it doesn't cause unnecessary SSG variants/branches to be generated.\n*\n* @see https://stackoverflow.com/questions/70897195/line-clamp-webkit-not-working-in-safari\n* @see https://framer-team.slack.com/archives/C01B14R6E22/p1756882450581289\n* @see https://framer-team.slack.com/archives/CR3CYA1D4/p1757005728045899\n* */\nconst textTruncationDisplayInlineVariableForSafari16 = \"--text-truncation-display-inline-for-safari-16\";\nconst textTruncationDisplayNoneVariableForSafari16 = \"--text-truncation-display-none-for-safari-16\";\nconst textTruncationLineBreakVariableForSafari16 = \"--text-truncation-line-break-for-safari-16\";\nconst blockLikeElementSelectors = [\n\t\"div.framer-text\",\n\t\"p.framer-text\",\n\t\"h1.framer-text\",\n\t\"h2.framer-text\",\n\t\"h3.framer-text\",\n\t\"h4.framer-text\",\n\t\"h5.framer-text\",\n\t\"h6.framer-text\",\n\t\"ol.framer-text\",\n\t\"ul.framer-text\",\n\t\"li.framer-text\",\n\t\"blockquote.framer-text\",\n\t\".framer-text.framer-image\"\n];\nconst anySafariVersion = \"(background: -webkit-named-image(i))\";\nconst safari17OrGreater = \"(contain-intrinsic-size: inherit)\";\nconst safari16TextTruncationFix = /* @__PURE__ */ (() => [`@supports ${anySafariVersion} and (not ${safari17OrGreater}) {\n        /* Render block-like elements inline when text is truncated, otherwise default to user agent (revert)  */\n        ${blockLikeElementSelectors.join(\", \")} { display: var(${textTruncationDisplayInlineVariableForSafari16}, revert) }\n\n        /* Add a line break after each block-like element that we render inline, to resemble the block-like behavior */\n        ${blockLikeElementSelectors.map((selector) => `${selector}::after`).join(\", \")} { content: var(${textTruncationLineBreakVariableForSafari16}); white-space: pre; }\n\n        /* Don't render modules (e.g. videos, code-blocks), or tables when text is truncated, because often these can't be truncated and their children might be block elements */\n        .framer-text.framer-text-module,\n        .framer-text.framer-table-wrapper { display: var(${textTruncationDisplayNoneVariableForSafari16}, revert) }\n\n        /* Render text-fill elements inline when text is truncated, otherwise default to their default value (e.g. inline-block) */\n        p.framer-text[data-text-fill] { display: var(${textTruncationDisplayInlineVariableForSafari16}, ${defaultTextFillStyle.display}) }\n    }`])();\n\n//#endregion\nexport { returnTrue as $, assertNever as A, isNullish as B, RenderTarget as C, useRenderEnvironment as D, setGlobalRenderEnvironment as E, isBot as F, isString as G, isObject as H, isEmptyObject as I, isWindow as J, isUndefined as K, isFunction as L, getPleaseReportMessage as M, isArray as N, safeWindow as O, isBoolean as P, returnFalse as Q, isGenerator as R, RenderEnvironment as S, isScreenshotFramerHost as T, isPromise as U, isNumber as V, isPromiseLike as W, noopSubscribe as X, noop as Y, requestIdleCallback as Z, inputWrapperClassName as _, listStyleTypeProperty as a, FormInputStyleVariableNames as b, emptyValueClassName as c, iconImageCSS as d, supportsRequestIdleCallback as et, inputBorderAllSides as f, inputWrapperCSS as g, inputIconCSSDeclaration as h, getMaxListDigits as i, encodeSVGForCSS as j, assert as k, forcedCheckedClassName as l, inputClassName as m, richTextCSSRules as n, maxListDigitsProperty as o, inputBorderCSS as p, isValidDate as q, safari16TextTruncationFix as r, css as s, defaultRichTextContainerStyle as t, forcedFocusClassName as u, sharedInputCSS as v, executeInRenderEnvironment as w, injectCSSRule as x, useCustomValidity as y, isNull as z };\n//# sourceMappingURL=chunk.YXhckCOx.mjs.map","import { $ as distance2D, $a as getMixer, $i as getAnimationMap, $n as getViewAnimations, $o as velocityPerSecond, $r as buildSVGPath, $t as boxEqualsRounded, A as useReducedMotion, Aa as getDefaultValueType, Ai as optimizedAppearDataId, An as renderHTML, Ao as time, Ar as measurePageBox, At as cleanDirtyNodes, B as useMotionValue, Ba as fillOffset, Bi as getVariableValue, Bn as isControllingVariants, Bo as circIn, Br as has2DTranslate, Bt as addDomEvent, C as useAnimateMini, Ca as transformProps, Ci as findDimensionValueType, Cn as camelCaseAttributes, Co as rgba, Cr as isDragActive, Ct as animateLayout, D as createScopedAnimate, Da as fillWildcards, Di as animateTarget, Dn as isForcedMotionValue, Do as containsCSSVariable, Dr as propEffect, Dt as rootProjectionNode, E as animate$1, Ea as readTransformValue, Ei as animateVariant, En as scrapeMotionValuesFromProps, Eo as scale, Er as microtask, Et as HTMLProjectionNode, F as useAnimationFrame, Fa as getFinalKeyframe, Fi as setTarget, Fn as setFeatureDefinitions, Fo as isEasingArray, Fr as applyTreeDeltas, Ft as resolveMotionValue, G as scrollInfo, Ga as calcGeneratorDuration, Gi as getDefaultTransition, Gn as isAnimationControls, Go as backInOut, Gr as transformBoxPoints, Gt as correctBorderRadius, H as useElementScroll, Ha as inertia, Hi as arc, Hn as variantPriorityOrder, Ho as circOut, Hr as hasTransform, Ht as mixValues, I as useSpring, Ia as defaultEasing, Ii as isKeyframesTarget, In as initPrefersReducedMotion, Io as steps, Ir as scalePoint, It as delay, J as domMax, Ja as cancelFrame, Ji as MotionValue, Jn as createAxisDelta, Jo as mirrorEasing, Jr as svgEffect, Jt as aspectRatio, K as useMotionValueEvent, Ka as maxGeneratorDuration, Ki as getValueTransition, Kn as visualElementStore, Ko as backOut, Kr as addSVGValue, Kt as pixelsToPercent, L as useFollowValue, La as keyframes, Li as positionalKeys, Ln as hasReducedMotionListener, Lo as easeIn, Lr as transformAxis, Lt as delayInSeconds, M as WillChangeMotionValue, Ma as transformValueTypes, Mi as addValueToWillChange, Mn as DOMVisualElement, Mo as easingDefinitionToFunction, Mr as applyAxisDelta, Mt as propagateDirtyNodes, N as useVelocity, Na as JSAnimation, Ni as isWillChangeMotionValue, Nn as VisualElement, No as isBezierDefinition, Nr as applyBoxDelta, Nt as globalProjectionState, O as animationControls, Oa as getAnimatableNone, Oi as getOptimisedAppearId, On as addScaleCorrector, Oo as isCSSVariableName, Or as animateElement, Ot as nodeGroup, P as useTime, Pa as animateValue, Pi as isMotionValue$1, Pn as getFeatureDefinitions, Po as getEasingForSegment, Pr as applyPointDelta, Pt as NodeStack, Q as distance, Qa as mix, Qi as animationMapKey, Qn as animateView, Qo as warnOnce, Qr as buildSVGAttrs, Qt as boxEquals, R as useTransform, Ra as convertOffsetToTimes, Ri as resolveVariant, Rn as prefersReducedMotion, Ro as easeInOut, Rr as transformBox, Rt as FlatTree, S as useAnimationControls, Sa as transformPropOrder, Si as dimensionValueTypes, Sn as isSVGTag, So as rgbUnit, Sr as setDragLock, Ss as __commonJSMin, St as sync, T as useAnimate, Ta as parseValueFromTransform, Ti as animateVisualElement, Tn as HTMLVisualElement, To as number, Tr as cancelMicrotask, Tt as parseAnimateLayoutArgs, U as useScroll, Ua as spring, Ui as animateMotionValue, Un as variantProps, Uo as anticipate, Ur as convertBoundingBoxToBox, Ut as buildProjectionTransform, V as useViewportScroll, Va as interpolate, Vi as parseCSSVariable, Vn as isVariantNode, Vo as circInOut, Vr as hasScale, Vt as animateSingleValue, W as scroll, Wa as createGeneratorEasing, Wi as isTransitionDefined, Wn as isVariantLabel, Wo as backIn, Wr as convertBoxToBoundingBox, Wt as correctBoxShadow, X as useUnmountEffect, Xa as frameSteps, Xi as motionValue, Xn as createDelta, Xo as wrap, Xr as addAttrValue, Xt as axisEquals, Y as domAnimation, Ya as frame, Yi as collectMotionValues, Yn as createBox, Yo as cubicBezier, Yr as svgSubjectEffect, Yt as axisDeltaEquals, Z as motion, Za as createRenderBatcher, Zi as calcChildStagger, Zn as ViewTransitionBuilder, Zo as hasWarned, Zr as attrEffect, Zt as axisEqualsRounded, _ as DragControls, _a as supportsViewTimeline, _i as removeEffect, _n as checkVariantsDidChange, _o as progressPercentage, _r as isElementKeyboardAccessible, _s as PresenceContext, _t as PresenceChild, a as correctParentTransform, aa as acceleratedValues, ai as styleEffect, an as calcAxisDelta, ao as mixColor, ar as transformValue, as as noop, at as makeUseVisualState, b as usePresenceData, ba as KeyframeResolver, bi as applyPxDefaults, bn as scrapeMotionValuesFromProps$2, bo as vw, br as isNodeOrChild, bt as MotionConfigContext, c as disableInstantTransitions, ca as NativeAnimation, ci as MotionValueState, cn as calcRelativeAxis, co as mixImmediate, cr as transform, cs as isObject, ct as MotionContext, d as inView, da as startWaapiAnimation, di as isSVGElement, dn as calcRelativePosition, do as complex, dr as isSVGSVGElement, ds as invariant, dt as LayoutGroup, ea as NativeAnimationWrapper, ei as buildHTMLStyles, en as isDeltaZero, eo as mixArray, er as getViewAnimationLayerInfo, es as millisecondsToSeconds, et as addPointerEvent, f as useCycle, fa as mapEasingToNativeEasing, fi as isHTMLElement, fn as isNear, fo as hasComplexValues, fr as recordStats, fs as warning, ft as useForceUpdate, g as isMotionComponent, ga as supportsScrollTimeline, gi as findEffect, gn as getVariantContext, go as percent, gr as press, gs as removeItem, gt as usePresence, h as unwrapMotionComponent, ha as supportsLinearEasing, hi as animateValues, hn as copyBoxInto, ho as degrees, hr as getComputedStyle$1, hs as moveItem, ht as useIsPresent, i as startOptimizedAppearAnimation, ia as supportsBrowserAnimation, ii as readStyleValue, in as removePointDelta, io as mixVisibility, ir as mapValue, is as pipe, it as SwitchLayoutGroupContext, j as useWillChange, ja as numberValueTypes, ji as camelToDash, jn as Feature, jo as frameData, jr as measureViewportBox, jt as createProjectionNode, k as useReducedMotionConfig, ka as defaultValueTypes, ki as optimizedAppearDataAttribute, kn as scaleCorrectors, ko as isCSSVariableToken, kr as handOffElementState, kt as DocumentProjectionNode, l as useInstantTransition, la as applyGeneratorOptions, li as resolveElements, ln as calcRelativeAxisPosition, lo as hslaToRgba, lr as getOriginIndex, ls as isNumericalString, lt as MotionConfig, m as useInstantLayoutTransition, ma as cubicBezierAsString, mi as animateEffectSubject, mn as copyAxisInto, mo as hsla, mr as resize, ms as addUniqueItem, mt as AnimatePresence, n as useInvertedScale, na as GroupAnimation, ni as addStyleValue, nn as removeAxisTransforms, no as mixObject, nr as attachSpring, ns as SubscriptionManager, nt as animations, o as transformViewBoxPoint, oa as makeAnimationInstant, oi as styleSubjectEffect, on as calcBoxDelta, oo as mixLinearColor, or as attachFollow, os as memo, ot as filterProps, p as useResetProjection, pa as supportedWaapiEasing, pi as addEffect, pn as copyAxisDeltaInto, po as color, pr as statsBuffer, ps as clamp, pt as DeprecatedLayoutGroupContext, q as domMin, qa as generateLinearEasing, qi as resolveTransition, qn as createAxis, qo as reverseEasing, qr as readSVGValue, qt as eachAxis, r as useAnimatedState, ra as AsyncMotionValueAnimation, ri as originProps, rn as removeBoxTransforms, ro as invisibleValues, rr as springValue, rs as progress, rt as m, s as usePageInView, sa as NativeAnimationExtended, si as createEffect, sn as calcLength, so as mixNumber, sr as followValue, ss as isZeroValueString, st as isValidMotionProp, t as namespace_exports, ta as GroupAnimationWithThen, ti as buildTransform, tn as removeAxisDelta, to as mixComplex, tr as findValueType, ts as secondsToMilliseconds, tt as addPointerInfo, u as useInView, ua as isGenerator, ui as getValueAsType, un as calcRelativeBox, uo as analyseComplexValue, ur as stagger, us as MotionGlobalConfig, ut as LazyMotion, v as useDragControls, va as supportsFlags, vi as supportsPartialKeyframes, vn as createAnimationState, vo as px, vr as isElementTextInput, vs as useIsomorphicLayoutEffect, vt as PopChild, w as animateMini, wa as defaultTransformValue, wi as testValueType, wn as ObjectVisualElement, wo as alpha, wr as isDragging, wt as LayoutAnimationBuilder, x as useAnimation, xa as flushKeyframeResolvers, xi as DOMKeyframesResolver, xn as renderSVG, xo as hex, xr as hover, xs as LayoutGroupContext, xt as cancelSync, y as useDomEvent, ya as setStyle, yi as isWaapiSupportedEasing, yn as SVGVisualElement, yo as vh, yr as isPrimaryPointer, ys as isBrowser, yt as useComposedRefs, z as useMotionTemplate, za as defaultOffset, zi as resolveVariantFromProps, zn as updateMotionValuesFromProps, zo as easeOut, zr as translateAxis, zt as compareByDepth } from \"./chunk.C4BJMiCP.mjs\";\nimport { $ as returnTrue, A as assertNever$1, B as isNullish, C as RenderTarget, D as useRenderEnvironment, E as setGlobalRenderEnvironment, F as isBot, G as isString, H as isObject$1, I as isEmptyObject, J as isWindow, K as isUndefined, L as isFunction, M as getPleaseReportMessage, N as isArray, O as safeWindow, P as isBoolean, Q as returnFalse, R as isGenerator$1, S as RenderEnvironment, T as isScreenshotFramerHost, U as isPromise, V as isNumber, W as isPromiseLike, X as noopSubscribe, Y as noop$5, Z as requestIdleCallback, _ as inputWrapperClassName, a as listStyleTypeProperty, b as FormInputStyleVariableNames, c as emptyValueClassName, d as iconImageCSS, et as supportsRequestIdleCallback, f as inputBorderAllSides, g as inputWrapperCSS, h as inputIconCSSDeclaration, i as getMaxListDigits, j as encodeSVGForCSS, k as assert$1, l as forcedCheckedClassName, m as inputClassName, o as maxListDigitsProperty, p as inputBorderCSS, q as isValidDate, s as css, t as defaultRichTextContainerStyle, u as forcedFocusClassName, v as sharedInputCSS, w as executeInRenderEnvironment, x as injectCSSRule, y as useCustomValidity, z as isNull } from \"./chunk.YXhckCOx.mjs\";\nimport * as React$1 from \"react\";\nimport React, { Children, Component, Fragment, Suspense, cloneElement, createContext, createElement, createRef, forwardRef, isValidElement, memo as memo$1, startTransition, useCallback, useContext, useDeferredValue, useEffect, useId, useInsertionEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, useTransition } from \"react\";\nimport { Fragment as Fragment$1, jsx, jsxs } from \"react/jsx-runtime\";\nimport ReactDOM, { createPortal } from \"react-dom\";\n\n//#region ../../library/src/router/lazyModulesCache.ts\n/**\n* Module-scoped cache for lazy-loaded modules handed over from SSG.\n* This cache is populated before hydration starts, allowing lazy components\n* to load synchronously during hydration.\n*\n* @internal\n*/\nconst lazyModulesCache = /* @__PURE__ */ new Map();\nconst lazyModuleLoaders = /* @__PURE__ */ new Map();\nconst requestedLazyModules = /* @__PURE__ */ new Set();\nconst directLazyModulePrefix = \":\";\nfunction preloadLazyModule(hash, loader, source) {\n\tif (lazyModulesCache.has(hash)) return;\n\tconst promise = Promise.resolve().then(loader).then((module) => {\n\t\tlazyModulesCache.set(hash, module);\n\t\treturn module;\n\t}).catch((error) => {\n\t\tlazyModulesCache.delete(hash);\n\t\tconsole.warn(`Failed to preload lazy module from ${source}`, error);\n\t\tthrow error;\n\t});\n\tpromise.catch(noop$5);\n\tlazyModulesCache.set(hash, promise);\n}\n/**\n* Register the original lazy loader so cache initialization stores the same module namespace as the lazy import.\n* @internal\n*/\nfunction registerLazyModuleLoader(hash, loader) {\n\tif (!isWindow) return;\n\tlazyModuleLoaders.set(hash, loader);\n\tif (requestedLazyModules.has(hash)) preloadLazyModule(hash, loader, `registered loader ${hash}`);\n}\n/**\n* Initialize lazy modules cache by preloading modules from link tags.\n* Should be called during hydration to populate the cache.\n* @internal\n*/\nfunction initLazyModulesCache() {\n\tif (!isWindow) return;\n\tconst lazyPreloadLinks = document.querySelectorAll(\"[rel=\\\"modulepreload\\\"][data-framer-lazy]\");\n\tfor (const link of lazyPreloadLinks) {\n\t\tconst lazyModuleValue = link.getAttribute(\"data-framer-lazy\");\n\t\tconst url = link.getAttribute(\"href\");\n\t\tif (!lazyModuleValue || !url) continue;\n\t\tconst canImportDirectly = lazyModuleValue.startsWith(directLazyModulePrefix);\n\t\tconst hash = canImportDirectly ? lazyModuleValue.slice(1) : lazyModuleValue;\n\t\tif (!hash) continue;\n\t\trequestedLazyModules.add(hash);\n\t\tconst loader = lazyModuleLoaders.get(hash);\n\t\tif (loader) preloadLazyModule(hash, loader, `registered loader ${hash}`);\n\t\telse if (canImportDirectly) preloadLazyModule(hash, () => import(\n\t\t\t/* @vite-ignore */\n\t\t\turl\n), url);\n\t}\n}\n\n//#endregion\n//#region ../../library/src/router/lazyModulesCollector.ts\n/**\n* @internal\n*/\nconst lazyModulesCollector = isWindow ? void 0 : /* @__PURE__ */ new Set();\n\n//#endregion\n//#region ../../library/src/router/lazy.tsx\nconst preloadKey$1 = \"preload\";\n/**\n* @internal\n*/\nfunction isLazyComponentType(componentType) {\n\treturn typeof componentType === \"object\" && componentType !== null && !isValidElement(componentType) && preloadKey$1 in componentType;\n}\nfunction getLoadedComponent(module, moduleName) {\n\tif (moduleName in module) return module[moduleName];\n\tthrow new Error(`Module does not contain export '${moduleName}'`);\n}\n/**\n* Returns a React component with a `preload` function that can be used to preload the component before it's mounted.\n*\n* @param factory Must be a function that returns the `import(...)` promise. It's important to keep this outside of `lazy` so that esbuild can statically analyze the bundle (e.g. `import(importUrl)` breaks it).\n* @param moduleName The name of the export to use from the module (default: \"default\")\n* @param cacheHash Optional hash of the module filename, used for cache optimization. During build, this is automatically injected as a compact hash of the filename extracted from the original HTTPS URL (e.g., \"YouTube.js\" → hash).\n* @internal\n*/\nfunction lazy(factory, moduleName = \"default\", cacheHash) {\n\tif (cacheHash) registerLazyModuleLoader(cacheHash, factory);\n\tlet factoryPromise;\n\tlet LoadedComponent;\n\tlet error;\n\tconst updateFromCache = () => {\n\t\tif (LoadedComponent || !cacheHash || !lazyModulesCache.has(cacheHash)) return;\n\t\tconst maybeModule = lazyModulesCache.get(cacheHash);\n\t\tif (isPromise(maybeModule)) load(() => maybeModule);\n\t\telse LoadedComponent = getLoadedComponent(maybeModule, moduleName);\n\t};\n\tconst load = (factoryFn) => {\n\t\tif (LoadedComponent) return Promise.resolve(LoadedComponent);\n\t\tif (!factoryPromise) factoryPromise = factoryFn().then((module) => {\n\t\t\tconst component = getLoadedComponent(module, moduleName);\n\t\t\tLoadedComponent = component;\n\t\t\treturn component;\n\t\t}).catch((err) => {\n\t\t\terror = err;\n\t\t});\n\t\treturn factoryPromise;\n\t};\n\tlet hasRendered = false;\n\tconst Component = forwardRef(function LazyWithPreload(props, ref) {\n\t\tuseEffect(() => {\n\t\t\thasRendered = true;\n\t\t}, []);\n\t\tif (error) throw error;\n\t\tupdateFromCache();\n\t\tif (cacheHash !== void 0 && lazyModulesCollector !== void 0) lazyModulesCollector.add(cacheHash);\n\t\tif (!LoadedComponent) throw load(factory);\n\t\treturn /* @__PURE__ */ jsx(LoadedComponent, {\n\t\t\tref,\n\t\t\t...props\n\t\t});\n\t});\n\tComponent.preload = () => {\n\t\tupdateFromCache();\n\t\treturn load(factory);\n\t};\n\tComponent.getStatus = () => {\n\t\treturn {\n\t\t\thasLoaded: LoadedComponent !== void 0,\n\t\t\thasRendered\n\t\t};\n\t};\n\treturn Component;\n}\n\n//#endregion\n//#region ../../library/src/utils/objectKeys.ts\n/**\n* A convenience alternative to the following:\n*\n* ```ts\n* const keys = Object.keys(foo) as (keyof typeof foo)[]\n* ```\n*\n* **Use with caution!** [There's a reason why TypeScript doesn't do this out of the\n* box](https://stackoverflow.com/a/55012175/242684).\n*/\nconst objectKeys = Object.keys;\n\n//#endregion\n//#region ../../library/src/render/utils/isEqual.ts\nfunction hasProp(o, prop) {\n\treturn Object.prototype.hasOwnProperty.call(o, prop);\n}\nconst equalsKey = \"equals\";\nfunction withEquals(o) {\n\tif (o === null) return false;\n\tif (!(equalsKey in o)) return false;\n\treturn typeof o.equals === \"function\";\n}\nfunction valueEqual(a, b) {\n\tif (a === b) return true;\n\treturn a !== a && b !== b;\n}\nfunction arrayShallowEqual(a, b) {\n\tconst length = a.length;\n\tif (length !== b.length) return false;\n\tfor (let i = length; i-- !== 0;) if (!valueEqual(a[i], b[i])) return false;\n\treturn true;\n}\nfunction arrayDeepEqual(a, b) {\n\tconst length = a.length;\n\tif (length !== b.length) return false;\n\tfor (let i = length; i-- !== 0;) if (!equal(a[i], b[i], true)) return false;\n\treturn true;\n}\nfunction mapShallowEqual(a, b) {\n\tif (a.size !== b.size) return false;\n\tfor (const [key, aValue] of a.entries()) if (!valueEqual(aValue, b.get(key))) return false;\n\treturn true;\n}\nfunction mapDeepEqual(a, b) {\n\tif (a.size !== b.size) return false;\n\tfor (const [key, aValue] of a.entries()) if (!equal(aValue, b.get(key), true)) return false;\n\treturn true;\n}\nfunction setEqual(a, b) {\n\tif (a.size !== b.size) return false;\n\tfor (const aValue of a.keys()) if (!b.has(aValue)) return false;\n\treturn true;\n}\nfunction objectShallowEqual(a, b) {\n\tconst keys = objectKeys(a);\n\tif (keys.length !== objectKeys(b).length) return false;\n\tfor (const key of keys) {\n\t\tif (!hasProp(b, key)) return false;\n\t\tif (key === \"_owner\" && hasProp(a, \"$$typeof\") && a.$$typeof) continue;\n\t\tif (!valueEqual(a[key], b[key])) return false;\n\t}\n\treturn true;\n}\nfunction objectDeepEqual(a, b) {\n\tconst keys = objectKeys(a);\n\tif (keys.length !== objectKeys(b).length) return false;\n\tfor (const key of keys) {\n\t\tif (!hasProp(b, key)) return false;\n\t\tif (key === \"_owner\" && hasProp(a, \"$$typeof\") && a.$$typeof) continue;\n\t\tif (!equal(a[key], b[key], true)) return false;\n\t}\n\treturn true;\n}\nfunction equal(a, b, deep) {\n\tif (a === b) return true;\n\tif (!a || !b) return a !== a && b !== b;\n\tconst typeA = typeof a;\n\tif (typeA !== typeof b) return false;\n\tif (typeA !== \"object\") return false;\n\tconst aIsArray = Array.isArray(a);\n\tconst bIsArray = Array.isArray(b);\n\tif (aIsArray && bIsArray) {\n\t\tif (deep) return arrayDeepEqual(a, b);\n\t\telse return arrayShallowEqual(a, b);\n\t} else if (aIsArray !== bIsArray) return false;\n\tconst aIsMap = a instanceof Map;\n\tconst bIsMap = b instanceof Map;\n\tif (aIsMap && bIsMap) {\n\t\tif (deep) return mapDeepEqual(a, b);\n\t\telse return mapShallowEqual(a, b);\n\t} else if (aIsMap !== bIsMap) return false;\n\tconst aIsSet = a instanceof Set;\n\tconst bIsSet = b instanceof Set;\n\tif (aIsSet && bIsSet) return setEqual(a, b);\n\telse if (aIsSet !== bIsSet) return false;\n\tconst dateA = a instanceof Date;\n\tconst dateB = b instanceof Date;\n\tif (dateA && dateB) return a.getTime() === b.getTime();\n\telse if (dateA !== dateB) return false;\n\tconst regexpA = a instanceof RegExp;\n\tconst regexpB = b instanceof RegExp;\n\tif (regexpA && regexpB) return a.toString() === b.toString();\n\telse if (regexpA !== regexpB) return false;\n\tif (withEquals(a) && withEquals(b)) return a.equals(b);\n\tif (deep) return objectDeepEqual(a, b);\n\telse return objectShallowEqual(a, b);\n}\n/**\n* Deep by default.\n*\n* @internal\n*/\nfunction isEqual(a, b, deep = true) {\n\ttry {\n\t\treturn equal(a, b, deep);\n\t} catch (error) {\n\t\tif (error instanceof Error && /stack|recursion/iu.exec(error.message)) {\n\t\t\tconsole.warn(\"Warning: isEqual does not handle circular references.\", error.name, error.message);\n\t\t\treturn false;\n\t\t}\n\t\tthrow error;\n\t}\n}\n\n//#endregion\n//#region ../../library/src/router/useGetRouteCallback.ts\nfunction useGetRouteCallback(routes) {\n\treturn React.useCallback((routeId) => routes[routeId], [routes]);\n}\n\n//#endregion\n//#region ../../library/src/router/RouterContext.tsx\nconst RouterContext = /* @__PURE__ */ (() => React.createContext({}))();\n/**\n* @public\n*/\nfunction RouterAPIProvider({ api, children }) {\n\treturn /* @__PURE__ */ jsx(RouterContext.Provider, {\n\t\tvalue: api,\n\t\tchildren\n\t});\n}\n/**\n* @public\n*/\nfunction useRouter() {\n\treturn React.useContext(RouterContext);\n}\n/**\n*\n* Component to only provide the routes. Used by the Navigation component to\n* still be able to look up routes by id\n* @returns\n*/\nfunction RoutesProvider({ routes, children }) {\n\tconst getRoute = useGetRouteCallback(routes);\n\tconst api = useMemo(() => ({ getRoute }), [getRoute]);\n\treturn /* @__PURE__ */ jsx(RouterContext.Provider, {\n\t\tvalue: api,\n\t\tchildren\n\t});\n}\n\n//#endregion\n//#region ../../library/src/router/useCurrentRoute.tsx\nconst CurrentRouteContext = /* @__PURE__ */ (() => React.createContext({}))();\nfunction useCurrentRoute() {\n\tconst router = useRouter();\n\tconst override = useContext(CurrentRouteContext);\n\tconst id = override?.routeId ?? router.currentRouteId;\n\tconst pathVariables = override?.routeId ? override.pathVariables : router.currentPathVariables;\n\tconst canonicalPathVariables = override?.routeId ? void 0 : router.currentCanonicalPathVariables;\n\tconst route = id ? router.getRoute?.(id) : void 0;\n\treturn useMemo(() => {\n\t\tif (!id || !route) return void 0;\n\t\treturn {\n\t\t\t...route,\n\t\t\tid,\n\t\t\tpathVariables,\n\t\t\tcanonicalPathVariables\n\t\t};\n\t}, [\n\t\tcanonicalPathVariables,\n\t\tid,\n\t\tpathVariables,\n\t\troute\n\t]);\n}\n/**\n* When effects need to rerun when the route changes, using the routeId is not enough as the id can\n* stay the same but the path variables can change.\n*/\nfunction useCurrentRouteKey() {\n\tconst currentRoute = useCurrentRoute();\n\tif (!currentRoute) return void 0;\n\treturn `${currentRoute.id}-${JSON.stringify(currentRoute.pathVariables)}`;\n}\n/** @deprecated Prefer `useCurrentRoute` instead. */\nfunction useCurrentRouteId() {\n\treturn useCurrentRoute()?.id;\n}\n/**\n* Execute a side-effect *during render* when the route changes. This includes when the slug of a collection detail\n* page changes.\n*/\nfunction useOnRouteChange(cb) {\n\tconst currentRoute = useCurrentRoute();\n\tconst lastRoute = React.useRef(currentRoute);\n\tif (isEqual(lastRoute.current, currentRoute) || !currentRoute) return;\n\tlastRoute.current = currentRoute;\n\tcb(currentRoute);\n}\n\n//#endregion\n//#region ../../library/src/router/useRoute.ts\nfunction useRoute(routeId) {\n\tconst routerAPI = useRouter();\n\tif (!routeId) return void 0;\n\treturn routerAPI.getRoute?.(routeId);\n}\n\n//#endregion\n//#region ../../library/src/router/utils.ts\n/**\n* Retrieve the human readable element id from the Route definition, if it\n* exists.\n*\n* @internal\n*/\nfunction getRouteElementId(route, hash) {\n\tif (hash && route) {\n\t\tif (route.elements && hash in route.elements) return route.elements[hash];\n\t\telse return hash;\n\t}\n}\nconst EMPTY_ARRAY = [];\nfunction monitorINPRelatedInputs(signal) {\n\tconst inpRelatedInputs = [\n\t\t\"pointerdown\",\n\t\t\"pointerup\",\n\t\t\"keydown\",\n\t\t\"keyup\"\n\t];\n\tconst inpRelatedInputHandler = (event) => {\n\t\tconst type = event.type;\n\t\tif (!inpRelatedInputs.includes(type)) return;\n\t\tperformance.mark(`framer-navigation-input`, { detail: { type } });\n\t};\n\tfor (let i = 0; i < inpRelatedInputs.length; i++) document.addEventListener(inpRelatedInputs[i], inpRelatedInputHandler, { signal });\n\treturn () => {\n\t\tfor (let i = 0; i < inpRelatedInputs.length; i++) document.removeEventListener(inpRelatedInputs[i], inpRelatedInputHandler);\n\t};\n}\n\n//#endregion\n//#region ../../library/src/router/useRouteElementId.ts\nfunction useRouteElementId(id, targetRouteId) {\n\tconst currentRoute = useCurrentRoute();\n\tconst route = useRoute(targetRouteId) ?? currentRoute;\n\treturn React.useMemo(() => {\n\t\tif (!route) return id;\n\t\treturn getRouteElementId(route, id);\n\t}, [id, route]);\n}\n\n//#endregion\n//#region ../../library/src/router/useCurrentPathVariables.tsx\n/** @deprecated Prefer `useCurrentRoute` instead. */\nfunction useCurrentPathVariables() {\n\treturn useCurrentRoute()?.pathVariables;\n}\n\n//#endregion\n//#region ../../library/src/router/types.ts\nconst defaultLocaleId = \"default\";\n\n//#endregion\n//#region ../../library/src/modules/LazyValue.ts\nconst PromiseState = {\n\tPending: \"pending\",\n\tFulfilled: \"fulfilled\",\n\tRejected: \"rejected\"\n};\n/**\n* LazyValue is a PromiseLike class that can resolve or reject lazily.\n* Designed with the same API as https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled.\n*/\nvar LazyValue = class LazyValue {\n\tresolver;\n\tcacheHash;\n\tstatic is(value) {\n\t\treturn value instanceof LazyValue;\n\t}\n\tpromiseState = PromiseState.Pending;\n\tpreloadPromise;\n\tvalue;\n\treason;\n\t/**\n\t* Gets the status and preloads the value if it's not already preloaded.\n\t*/\n\tget status() {\n\t\tthis.preload();\n\t\treturn this.state;\n\t}\n\tget state() {\n\t\treturn this.promiseState;\n\t}\n\t/**\n\t* @param resolver Function that returns the value or promise\n\t* @param cacheHash Optional hash of the module filename, used for cache optimization. During build, this is automatically injected as a compact hash of the filename extracted from the original HTTPS URL (e.g., \"YouTube.js\" → hash).\n\t*/\n\tconstructor(resolver, cacheHash) {\n\t\tthis.resolver = resolver;\n\t\tthis.cacheHash = cacheHash;\n\t\tif (cacheHash !== void 0) registerLazyModuleLoader(cacheHash, resolver);\n\t}\n\tthen(onfulfilled, onrejected) {\n\t\tif (this.promiseState === PromiseState.Fulfilled) return Promise.resolve(this.value).then(onfulfilled, onrejected);\n\t\tif (this.promiseState === PromiseState.Rejected) return Promise.reject(this.reason).then(onfulfilled, onrejected);\n\t\treturn this.readAsync().then(onfulfilled, onrejected);\n\t}\n\t/**\n\t* Preload the value so it can be read() later.\n\t*\n\t* @returns The promise that resolves or rejects. `undefined` if the value has already been preloaded or is synchronously readable.\n\t*/\n\tpreload() {\n\t\tif (this.promiseState !== PromiseState.Pending) return;\n\t\tif (this.preloadPromise) return this.preloadPromise;\n\t\tif (this.cacheHash !== void 0 && lazyModulesCollector !== void 0) lazyModulesCollector.add(this.cacheHash);\n\t\tconst fulfill = (value) => {\n\t\t\tthis.promiseState = PromiseState.Fulfilled;\n\t\t\tthis.value = value;\n\t\t};\n\t\tconst reject = (reason) => {\n\t\t\tthis.promiseState = PromiseState.Rejected;\n\t\t\tthis.reason = reason;\n\t\t};\n\t\tlet maybeValue;\n\t\ttry {\n\t\t\tmaybeValue = this.cacheHash && lazyModulesCache.has(this.cacheHash) ? lazyModulesCache.get(this.cacheHash) : this.resolver();\n\t\t} catch (e) {\n\t\t\treject(e);\n\t\t\treturn;\n\t\t}\n\t\tif (!isPromise(maybeValue)) {\n\t\t\tfulfill(maybeValue);\n\t\t\treturn;\n\t\t}\n\t\tconst valuePromise = maybeValue.then(fulfill, reject);\n\t\tthis.preloadPromise = valuePromise;\n\t\treturn valuePromise;\n\t}\n\t/** Synchronously read the value after calling preload() before. */\n\tread = () => {\n\t\tif (this.promiseState === PromiseState.Fulfilled) return this.value;\n\t\tif (this.promiseState === PromiseState.Rejected) throw this.reason;\n\t\tthrow new Error(\"Need to call preload() before read()\");\n\t};\n\t/**\n\t* @deprecated Use readMaybeAsync() instead.\n\t* @important Don't remove it - was used in code-gen before October 2025.\n\t*/\n\tasync readAsync() {\n\t\treturn this.readMaybeAsync();\n\t}\n\t/**\n\t* Loads the value if it's not already loaded.\n\t*\n\t* @returns The value or a promise that resolves to the value.\n\t*/\n\treadMaybeAsync() {\n\t\tconst preloadPromise = this.preload();\n\t\tif (preloadPromise) return preloadPromise.then(this.read);\n\t\treturn this.read();\n\t}\n\t/**\n\t* FIXME: With React 19, mark this as deprecated and use the official `use` hook instead (just pass in the LazyValue instance).\n\t*/\n\tuse() {\n\t\tconst promise = this.preload();\n\t\tif (promise) throw promise;\n\t\treturn this.read();\n\t}\n};\n\n//#endregion\n//#region ../../../node_modules/devalue/src/constants.js\nconst MAX_ARRAY_LEN = 2 ** 32 - 1;\nconst MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;\n\n//#endregion\n//#region ../../../node_modules/devalue/src/utils.js\nvar DevalueError = class extends Error {\n\t/**\n\t* @param {string} message\n\t* @param {string[]} keys\n\t* @param {any} [value] - The value that failed to be serialized\n\t* @param {any} [root] - The root value being serialized\n\t*/\n\tconstructor(message, keys, value, root) {\n\t\tsuper(message);\n\t\tthis.name = \"DevalueError\";\n\t\tthis.path = keys.join(\"\");\n\t\tthis.value = value;\n\t\tthis.root = root;\n\t}\n};\nconst object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype).sort().join(\"\\0\");\n/** @param {any} thing */\nfunction is_plain_object(thing) {\n\tconst proto = Object.getPrototypeOf(thing);\n\treturn proto === Object.prototype || proto === null || Object.getPrototypeOf(proto) === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === object_proto_names;\n}\n/** @param {any} thing */\nfunction get_type(thing) {\n\treturn Object.prototype.toString.call(thing).slice(8, -1);\n}\n/** @param {any} thing */\nfunction is_buffer(thing) {\n\treturn typeof Buffer !== \"undefined\" && Buffer.isBuffer(thing);\n}\n/** @param {string} char */\nfunction get_escaped_char(char) {\n\tswitch (char) {\n\t\tcase \"\\\"\": return \"\\\\\\\"\";\n\t\tcase \"<\": return \"\\\\u003C\";\n\t\tcase \"\\\\\": return \"\\\\\\\\\";\n\t\tcase \"\\n\": return \"\\\\n\";\n\t\tcase \"\\r\": return \"\\\\r\";\n\t\tcase \"\t\": return \"\\\\t\";\n\t\tcase \"\\b\": return \"\\\\b\";\n\t\tcase \"\\f\": return \"\\\\f\";\n\t\tcase \"\\u2028\": return \"\\\\u2028\";\n\t\tcase \"\\u2029\": return \"\\\\u2029\";\n\t\tdefault: return char < \" \" ? `\\\\u${char.charCodeAt(0).toString(16).padStart(4, \"0\")}` : \"\";\n\t}\n}\n/** @param {string} str */\nfunction stringify_string(str) {\n\tlet result = \"\";\n\tlet last_pos = 0;\n\tconst len = str.length;\n\tfor (let i = 0; i < len; i += 1) {\n\t\tconst char = str[i];\n\t\tconst replacement = get_escaped_char(char);\n\t\tif (replacement) {\n\t\t\tresult += str.slice(last_pos, i) + replacement;\n\t\t\tlast_pos = i + 1;\n\t\t}\n\t}\n\treturn `\"${last_pos === 0 ? str : result + str.slice(last_pos)}\"`;\n}\n/** @param {Record<string | symbol, any>} object */\nfunction enumerable_symbols(object) {\n\treturn Object.getOwnPropertySymbols(object).filter((symbol) => Object.getOwnPropertyDescriptor(object, symbol).enumerable);\n}\nconst is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;\n/** @param {string} key */\nfunction stringify_key(key) {\n\treturn is_identifier.test(key) ? \".\" + key : \"[\" + JSON.stringify(key) + \"]\";\n}\n/** @param {number} n */\nfunction is_valid_array_index(n) {\n\tif (!Number.isInteger(n)) return false;\n\tif (n < 0) return false;\n\tif (n > MAX_ARRAY_INDEX) return false;\n\treturn true;\n}\n/** @param {number} n */\nfunction is_valid_array_len(n) {\n\tif (!Number.isInteger(n)) return false;\n\tif (n < 0) return false;\n\tif (n > MAX_ARRAY_LEN) return false;\n\treturn true;\n}\n/** @param {string} s */\nfunction is_valid_array_index_string(s) {\n\tif (s.length === 0) return false;\n\tif (s.length > 1 && s.charCodeAt(0) === 48) return false;\n\tfor (let i = 0; i < s.length; i++) {\n\t\tconst c = s.charCodeAt(i);\n\t\tif (c < 48 || c > 57) return false;\n\t}\n\treturn is_valid_array_index(+s);\n}\n/**\n* Returns the length of the leading run of valid array indices in `keys`.\n* @param {readonly string[]} keys\n*/\nfunction array_index_cut(keys) {\n\tfor (var i = keys.length - 1; i >= 0; i--) if (is_valid_array_index_string(keys[i])) break;\n\treturn i + 1;\n}\n/**\n* Finds the populated indices of an array.\n* @param {unknown[]} array\n*/\nfunction valid_array_indices(array) {\n\tconst keys = Object.keys(array);\n\tkeys.length = array_index_cut(keys);\n\treturn keys;\n}\n\n//#endregion\n//#region ../../../node_modules/devalue/src/base64.js\n/**\t@type {(array_buffer: ArrayBuffer) => string} */\nfunction encode_native(array_buffer) {\n\treturn new Uint8Array(array_buffer).toBase64();\n}\n/**\t@type {(base64: string) => ArrayBuffer} */\nfunction decode_native(base64) {\n\treturn Uint8Array.fromBase64(base64).buffer;\n}\n/** @type {(array_buffer: ArrayBuffer) => string} */\nfunction encode_buffer(array_buffer) {\n\treturn Buffer.from(array_buffer).toString(\"base64\");\n}\n/**\t@type {(base64: string) => ArrayBuffer} */\nfunction decode_buffer(base64) {\n\treturn Uint8Array.from(Buffer.from(base64, \"base64\")).buffer;\n}\n/** @type {(array_buffer: ArrayBuffer) => string} */\nfunction encode_legacy(array_buffer) {\n\tconst array = new Uint8Array(array_buffer);\n\tlet binary = \"\";\n\tconst chunk_size = 32768;\n\tfor (let i = 0; i < array.length; i += chunk_size) {\n\t\tconst chunk = array.subarray(i, i + chunk_size);\n\t\tbinary += String.fromCharCode.apply(null, chunk);\n\t}\n\treturn btoa(binary);\n}\n/**\t@type {(base64: string) => ArrayBuffer} */\nfunction decode_legacy(base64) {\n\tconst binary_string = atob(base64);\n\tconst len = binary_string.length;\n\tconst array = new Uint8Array(len);\n\tfor (let i = 0; i < len; i++) array[i] = binary_string.charCodeAt(i);\n\treturn array.buffer;\n}\nconst native = typeof Uint8Array.fromBase64 === \"function\";\nconst buffer = typeof process === \"object\" && process.versions?.node !== void 0;\nconst encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;\nconst decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;\n\n//#endregion\n//#region ../../../node_modules/devalue/src/operations.js\n/**\n* Merges caller-provided operation overrides over the defaults. Iterating the\n* default keys (rather than the override's own keys) means nullish members\n* fall back to the default, and inherited members — e.g. from a class\n* instance — are picked up.\n*\n* @template {Record<string, any>} T\n* @param {T} defaults\n* @param {Partial<T> | undefined} overrides\n* @returns {T}\n*/\nfunction merge_operations(defaults, overrides) {\n\tif (!overrides) return defaults;\n\tconst merged = {};\n\tfor (const key of Object.keys(defaults)) merged[key] = overrides[key] ?? defaults[key];\n\treturn merged;\n}\n/** @type {{ kind: 'not-plain' }} */\nconst NOT_PLAIN = /* @__PURE__ */ Object.freeze({ kind: \"not-plain\" });\n/** @type {{ kind: 'symbol-keys' }} */\nconst SYMBOL_KEYS = /* @__PURE__ */ Object.freeze({ kind: \"symbol-keys\" });\n/**\n* The default implementations of every introspection/extraction operation\n* `stringify` performs on the value being serialized. Each one uses native\n* JavaScript semantics (property access, iteration, prototype methods, etc).\n*\n* Pass overrides via the `operations` option of `stringify`/`stringifyAsync`\n* to customize how values are inspected — e.g. to serialize values without\n* triggering getters, proxy traps, or patched prototype methods, or to\n* serialize values that live in a different JavaScript runtime (a `node:vm`\n* context, a WASM-hosted engine, a remote process) through handle objects.\n*\n* The object is frozen — it is shared by every `stringify` call that does\n* not override a given operation.\n*\n*/\n/** @type {import('./types.js').DefaultStringifyOperations} */\nconst stringify_operations = {\n\tidentify: (value) => value,\n\ttypeOf: (value) => value === null ? \"null\" : typeof value,\n\ttoPrimitive: (value) => value,\n\ttagOf: (value) => get_type(value),\n\tisThenable: (value) => typeof value.then === \"function\",\n\ttoPromise: (thenable) => Promise.resolve(thenable),\n\tunbox: (boxed) => boxed.valueOf(),\n\ttoISOString: (date) => isNaN(date.getDate()) ? \"\" : date.toISOString(),\n\ttoStringValue: (value) => value.toString(),\n\tregExpInfo: (regexp) => ({\n\t\tsource: regexp.source,\n\t\tflags: regexp.flags\n\t}),\n\tvaluesOf: (set) => set,\n\tentriesOf: (map) => map,\n\tviewInfo: (view) => {\n\t\tif (is_buffer(view)) view = new Uint8Array(view);\n\t\treturn {\n\t\t\tbuffer: view.buffer,\n\t\t\tbyteOffset: view.byteOffset,\n\t\t\tbyteLength: view.byteLength,\n\t\t\tlength: view.length,\n\t\t\tbufferByteLength: view.buffer.byteLength\n\t\t};\n\t},\n\ttoArrayBuffer: (buffer) => buffer,\n\tlengthOf: (array) => array.length,\n\thasOwn: (value, key) => Object.hasOwn(value, key),\n\tindicesOf: (array) => valid_array_indices(array),\n\tshapeOf: (value) => {\n\t\tif (!is_plain_object(value)) return NOT_PLAIN;\n\t\tif (enumerable_symbols(value).length > 0) return SYMBOL_KEYS;\n\t\treturn {\n\t\t\tkind: Object.getPrototypeOf(value) === null ? \"null-proto\" : \"plain\",\n\t\t\tkeys: Object.keys(value)\n\t\t};\n\t},\n\tget: (value, key) => value[key]\n};\nconst default_stringify_operations = /* @__PURE__ */ Object.freeze(stringify_operations);\nconst array_buffer_byte_length = /* @__PURE__ */ (() => Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, \"byteLength\").get)();\nconst shared_array_buffer_byte_length = /* @__PURE__ */ (() => typeof SharedArrayBuffer === \"undefined\" ? void 0 : Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, \"byteLength\").get)();\n/**\n* The default implementations of every construction operation `parse` and\n* `unflatten` perform while reviving a value. Each one uses native\n* JavaScript semantics (built-in constructors, property assignment, etc).\n*\n* Pass overrides via the `operations` option of `parse`/`unflatten` to\n* customize how values are built — e.g. to construct them from the\n* intrinsics of a different realm (a `node:vm` context), or to build up\n* values inside another JavaScript runtime (a WASM-hosted engine, a remote\n* process) through handle objects.\n*\n* The object is frozen — it is shared by every `parse` call that does not\n* override a given operation.\n*\n*/\n/** @type {import('./types.js').DefaultParseOperations} */\nconst parse_operations = {\n\tfromPrimitive: (primitive) => primitive,\n\tfromISOString: (iso) => new Date(iso),\n\tfromStringValue: (tag, text) => {\n\t\tif (tag === \"URL\") return new URL(text);\n\t\tif (tag === \"URLSearchParams\") return new URLSearchParams(text);\n\t\treturn Temporal[tag.slice(9)].from(text);\n\t},\n\tfromArrayBuffer: (buffer) => buffer,\n\tfromRegExpInfo: (source, flags) => new RegExp(source, flags),\n\tfromViewInfo: (tag, buffer, byteOffset, length) => {\n\t\ttry {\n\t\t\tarray_buffer_byte_length.call(buffer);\n\t\t} catch (error) {\n\t\t\tif (!shared_array_buffer_byte_length) throw error;\n\t\t\tshared_array_buffer_byte_length.call(buffer);\n\t\t}\n\t\tconst Constructor = globalThis[tag];\n\t\treturn byteOffset !== void 0 ? new Constructor(buffer, byteOffset, length) : new Constructor(buffer);\n\t},\n\tbox: (value) => Object(value),\n\tcreateArray: (length) => new Array(length),\n\tcreateSparseArray: (length) => {\n\t\t/** @type {any[]} */\n\t\tconst array = [];\n\t\tarray[MAX_ARRAY_INDEX] = void 0;\n\t\tdelete array[MAX_ARRAY_INDEX];\n\t\tarray.length = length;\n\t\treturn array;\n\t},\n\tcreateObject: () => ({}),\n\tcreateNullPrototypeObject: () => Object.create(null),\n\tcreateSet: () => /* @__PURE__ */ new Set(),\n\tcreateMap: () => /* @__PURE__ */ new Map(),\n\tset: (target, key, value) => {\n\t\ttarget[key] = value;\n\t},\n\taddValue: (set, value) => {\n\t\tset.add(value);\n\t},\n\taddEntry: (map, key, value) => {\n\t\tmap.set(key, value);\n\t}\n};\nconst default_parse_operations = /* @__PURE__ */ Object.freeze(parse_operations);\n\n//#endregion\n//#region ../../../node_modules/devalue/src/parse.js\n/**\n* Revive a value serialized with `devalue.stringify`\n* @param {string} serialized\n* @param {Record<string, (value: any) => any>} [revivers]\n* @param {import('./types.js').ParseOptions} [options]\n*/\nfunction parse(serialized, revivers, options) {\n\treturn unflatten(JSON.parse(serialized), revivers, options);\n}\n/**\n* Revive a value flattened with `devalue.stringify`\n* @param {number | any[]} parsed\n* @param {Record<string, (value: any) => any>} [revivers]\n* @param {import('./types.js').ParseOptions} [options]\n*/\nfunction unflatten(parsed, revivers, options) {\n\t/** @type {import('./types.js').ParseOperations} */\n\tconst ops = merge_operations(default_parse_operations, options?.operations);\n\tif (typeof parsed === \"number\") return hydrate(parsed, true);\n\tif (!Array.isArray(parsed) || parsed.length === 0) throw new Error(\"Invalid input\");\n\tconst values = parsed;\n\tconst hydrated = Array(values.length);\n\t/**\n\t* A set of values currently being hydrated with custom revivers,\n\t* used to detect invalid cyclical dependencies\n\t* @type {Set<number> | null}\n\t*/\n\tlet hydrating = null;\n\t/**\n\t* @param {number} index\n\t* @returns {any}\n\t*/\n\tfunction hydrate(index, standalone = false) {\n\t\tif (index === -1) return ops.fromPrimitive(void 0);\n\t\tif (index === -3) return ops.fromPrimitive(NaN);\n\t\tif (index === -4) return ops.fromPrimitive(Infinity);\n\t\tif (index === -5) return ops.fromPrimitive(-Infinity);\n\t\tif (index === -6) return ops.fromPrimitive(-0);\n\t\tif (standalone || typeof index !== \"number\") throw new Error(`Invalid input`);\n\t\tif (index in hydrated) return hydrated[index];\n\t\tif (index >= values.length) throw new Error(`Invalid input`);\n\t\tconst value = values[index];\n\t\tif (!value || typeof value !== \"object\") hydrated[index] = ops.fromPrimitive(value);\n\t\telse if (Array.isArray(value)) {\n\t\t\tif (typeof value[0] === \"string\") {\n\t\t\t\tconst type = value[0];\n\t\t\t\tconst reviver = revivers && Object.hasOwn(revivers, type) ? revivers[type] : void 0;\n\t\t\t\tif (reviver) {\n\t\t\t\t\tlet i = value[1];\n\t\t\t\t\tif (typeof i !== \"number\") i = values.push(value[1]) - 1;\n\t\t\t\t\tif (Object.hasOwn(hydrated, i)) return hydrated[index] = reviver(hydrated[i]);\n\t\t\t\t\thydrating ??= /* @__PURE__ */ new Set();\n\t\t\t\t\tif (hydrating.has(i)) throw new Error(\"Invalid circular reference\");\n\t\t\t\t\thydrating.add(i);\n\t\t\t\t\thydrated[index] = reviver(hydrate(i));\n\t\t\t\t\thydrating.delete(i);\n\t\t\t\t\treturn hydrated[index];\n\t\t\t\t}\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase \"Date\":\n\t\t\t\t\t\thydrated[index] = ops.fromISOString(value[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Set\":\n\t\t\t\t\t\tconst set = ops.createSet();\n\t\t\t\t\t\thydrated[index] = set;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 1) ops.addValue(set, hydrate(value[i]));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Map\":\n\t\t\t\t\t\tconst map = ops.createMap();\n\t\t\t\t\t\thydrated[index] = map;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 2) ops.addEntry(map, hydrate(value[i]), hydrate(value[i + 1]));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"RegExp\":\n\t\t\t\t\t\thydrated[index] = ops.fromRegExpInfo(value[1], value[2]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Object\": {\n\t\t\t\t\t\tconst wrapped_index = value[1];\n\t\t\t\t\t\tif (typeof values[wrapped_index] === \"object\" && values[wrapped_index][0] !== \"BigInt\") throw new Error(\"Invalid input\");\n\t\t\t\t\t\thydrated[index] = ops.box(hydrate(wrapped_index));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase \"BigInt\":\n\t\t\t\t\t\thydrated[index] = ops.fromPrimitive(BigInt(value[1]));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"null\":\n\t\t\t\t\t\tconst obj = ops.createNullPrototypeObject();\n\t\t\t\t\t\thydrated[index] = obj;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 2) {\n\t\t\t\t\t\t\tconst key = value[i];\n\t\t\t\t\t\t\tif (typeof key !== \"string\") throw new Error(\"Cannot parse an object with a non-string key\");\n\t\t\t\t\t\t\tif (key === \"__proto__\") throw new Error(\"Cannot parse an object with a `__proto__` property\");\n\t\t\t\t\t\t\tops.set(obj, key, hydrate(value[i + 1]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Int8Array\":\n\t\t\t\t\tcase \"Uint8Array\":\n\t\t\t\t\tcase \"Uint8ClampedArray\":\n\t\t\t\t\tcase \"Int16Array\":\n\t\t\t\t\tcase \"Uint16Array\":\n\t\t\t\t\tcase \"Float16Array\":\n\t\t\t\t\tcase \"Int32Array\":\n\t\t\t\t\tcase \"Uint32Array\":\n\t\t\t\t\tcase \"Float32Array\":\n\t\t\t\t\tcase \"Float64Array\":\n\t\t\t\t\tcase \"BigInt64Array\":\n\t\t\t\t\tcase \"BigUint64Array\":\n\t\t\t\t\tcase \"DataView\": {\n\t\t\t\t\t\tif (values[value[1]][0] !== \"ArrayBuffer\") throw new Error(\"Invalid data\");\n\t\t\t\t\t\tconst buffer = hydrate(value[1]);\n\t\t\t\t\t\thydrated[index] = ops.fromViewInfo(type, buffer, value[2], value[3]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase \"ArrayBuffer\": {\n\t\t\t\t\t\tconst base64 = value[1];\n\t\t\t\t\t\tif (typeof base64 !== \"string\") throw new Error(\"Invalid ArrayBuffer encoding\");\n\t\t\t\t\t\thydrated[index] = ops.fromArrayBuffer(decode64(base64));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase \"URL\":\n\t\t\t\t\tcase \"URLSearchParams\":\n\t\t\t\t\tcase \"Temporal.Duration\":\n\t\t\t\t\tcase \"Temporal.Instant\":\n\t\t\t\t\tcase \"Temporal.PlainDate\":\n\t\t\t\t\tcase \"Temporal.PlainTime\":\n\t\t\t\t\tcase \"Temporal.PlainDateTime\":\n\t\t\t\t\tcase \"Temporal.PlainMonthDay\":\n\t\t\t\t\tcase \"Temporal.PlainYearMonth\":\n\t\t\t\t\tcase \"Temporal.ZonedDateTime\":\n\t\t\t\t\t\thydrated[index] = ops.fromStringValue(type, value[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: throw new Error(`Unknown type ${type}`);\n\t\t\t\t}\n\t\t\t} else if (value[0] === -7) {\n\t\t\t\tconst len = value[1];\n\t\t\t\tif (!is_valid_array_len(len)) throw new Error(\"Invalid input\");\n\t\t\t\tconst array = ops.createSparseArray(len);\n\t\t\t\thydrated[index] = array;\n\t\t\t\tfor (let i = 2; i < value.length; i += 2) {\n\t\t\t\t\tconst idx = value[i];\n\t\t\t\t\tif (!is_valid_array_index(idx) || idx >= len) throw new Error(\"Invalid input\");\n\t\t\t\t\tops.set(array, idx, hydrate(value[i + 1]));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst array = ops.createArray(value.length);\n\t\t\t\thydrated[index] = array;\n\t\t\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\t\t\tconst n = value[i];\n\t\t\t\t\tif (n === -2) continue;\n\t\t\t\t\tops.set(array, i, hydrate(n));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst object = ops.createObject();\n\t\t\thydrated[index] = object;\n\t\t\tfor (const key of Object.keys(value)) {\n\t\t\t\tif (key === \"__proto__\") throw new Error(\"Cannot parse an object with a `__proto__` property\");\n\t\t\t\tops.set(object, key, hydrate(value[key]));\n\t\t\t}\n\t\t}\n\t\treturn hydrated[index];\n\t}\n\treturn hydrate(0);\n}\n\n//#endregion\n//#region ../../../node_modules/devalue/src/stringify.js\n/**\n* Turn a value into a JSON string that can be parsed with `devalue.parse`\n* @param {any} value\n* @param {Record<string, (value: any) => any>} [reducers]\n* @param {import('./types.js').StringifyOptions} [options]\n*/\nfunction stringify(value, reducers, options) {\n\tconst stringified = run(false, value, reducers, options);\n\treturn typeof stringified === \"string\" ? stringified : `[${stringified.join(\",\")}]`;\n}\n/**\n* @param {boolean} async\n* @param {any} value\n* @param {Record<string, (value: any) => any>} [reducers]\n* @param {import('./types.js').StringifyOptions} [options]\n*/\nfunction run(async, value, reducers, options) {\n\tconst ops = merge_operations(default_stringify_operations, options?.operations);\n\t/** @type {any[]} */\n\tconst stringified = [];\n\t/** @type {Map<any, number>} */\n\tconst indexes = /* @__PURE__ */ new Map();\n\t/** @type {Array<{ key: string, fn: (value: any) => any }>} */\n\tconst custom = [];\n\tif (reducers) for (const key of Object.getOwnPropertyNames(reducers)) custom.push({\n\t\tkey,\n\t\tfn: reducers[key]\n\t});\n\t/** @type {string[]} */\n\tconst keys = [];\n\tlet p = 0;\n\t/**\n\t* @param {any} thing\n\t* @param {number} [index]\n\t*/\n\tfunction flatten(thing, index) {\n\t\tconst type = ops.typeOf(thing);\n\t\tif (type === \"undefined\") return -1;\n\t\t/** @type {number | undefined} */\n\t\tlet number;\n\t\tif (type === \"number\") {\n\t\t\tnumber = ops.toPrimitive(thing);\n\t\t\tif (Number.isNaN(number)) return -3;\n\t\t\tif (number === Infinity) return -4;\n\t\t\tif (number === -Infinity) return -5;\n\t\t\tif (number === 0 && 1 / number < 0) return -6;\n\t\t}\n\t\tconst id = ops.identify(thing);\n\t\tif (indexes.has(id)) return indexes.get(id);\n\t\tindex ??= p++;\n\t\tindexes.set(id, index);\n\t\tfor (const { key, fn } of custom) {\n\t\t\tconst value = fn(thing);\n\t\t\tif (value) {\n\t\t\t\tstringified[index] = `[\"${key}\",${flatten(value)}]`;\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\t\tif (type === \"function\") throw new DevalueError(`Cannot stringify a function`, keys, thing, value);\n\t\telse if (type === \"symbol\") throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);\n\t\t/** @type {string | Promise<any>} */\n\t\tlet str = \"\";\n\t\tif (type !== \"object\") str = stringify_primitive(type === \"number\" ? number : ops.toPrimitive(thing));\n\t\telse if (ops.isThenable(thing)) {\n\t\t\tif (!async) throw new DevalueError(`Cannot stringify a Promise or thenable — use stringifyAsync instead`, keys, thing, value);\n\t\t\tstr = ops.toPromise(thing).then((value) => {\n\t\t\t\tconst i = flatten(value, index);\n\t\t\t\tif (i < 0) stringified[index] = i;\n\t\t\t});\n\t\t\tstr.catch(() => {});\n\t\t} else {\n\t\t\tconst tag = ops.tagOf(thing);\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"Number\":\n\t\t\t\tcase \"String\":\n\t\t\t\tcase \"Boolean\":\n\t\t\t\tcase \"BigInt\":\n\t\t\t\t\tstr = `[\"Object\",${flatten(ops.unbox(thing))}]`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Date\":\n\t\t\t\t\tstr = `[\"Date\",\"${ops.toISOString(thing)}\"]`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"URL\":\n\t\t\t\t\tstr = `[\"URL\",${stringify_string(ops.toStringValue(thing))}]`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"URLSearchParams\":\n\t\t\t\t\tstr = `[\"URLSearchParams\",${stringify_string(ops.toStringValue(thing))}]`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"RegExp\":\n\t\t\t\t\tconst { source, flags } = ops.regExpInfo(thing);\n\t\t\t\t\tstr = flags ? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]` : `[\"RegExp\",${stringify_string(source)}]`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Array\": {\n\t\t\t\t\tlet mostly_dense = false;\n\t\t\t\t\tconst length = ops.lengthOf(thing);\n\t\t\t\t\tstr = \"[\";\n\t\t\t\t\tfor (let i = 0; i < length; i += 1) {\n\t\t\t\t\t\tif (i > 0) str += \",\";\n\t\t\t\t\t\tif (ops.hasOwn(thing, i)) {\n\t\t\t\t\t\t\tkeys.push(`[${i}]`);\n\t\t\t\t\t\t\tstr += flatten(ops.get(thing, i));\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t} else if (mostly_dense) str += -2;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tconst populated_keys = ops.indicesOf(thing);\n\t\t\t\t\t\t\tconst population = populated_keys.length;\n\t\t\t\t\t\t\tconst d = String(length).length;\n\t\t\t\t\t\t\tif ((length - population) * 3 > 4 + d + population * (d + 1)) {\n\t\t\t\t\t\t\t\tstr = \"[\" + -7 + \",\" + length;\n\t\t\t\t\t\t\t\tfor (let j = 0; j < populated_keys.length; j++) {\n\t\t\t\t\t\t\t\t\tconst key = populated_keys[j];\n\t\t\t\t\t\t\t\t\tkeys.push(`[${key}]`);\n\t\t\t\t\t\t\t\t\tstr += \",\" + key + \",\" + flatten(ops.get(thing, key));\n\t\t\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmostly_dense = true;\n\t\t\t\t\t\t\t\tstr += -2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tstr += \"]\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"Set\":\n\t\t\t\t\tstr = \"[\\\"Set\\\"\";\n\t\t\t\t\tfor (const value of ops.valuesOf(thing)) str += `,${flatten(value)}`;\n\t\t\t\t\tstr += \"]\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Map\":\n\t\t\t\t\tstr = \"[\\\"Map\\\"\";\n\t\t\t\t\tfor (const [key, value] of ops.entriesOf(thing)) {\n\t\t\t\t\t\tconst key_type = ops.typeOf(key);\n\t\t\t\t\t\tconst key_is_primitive = key_type !== \"object\" && key_type !== \"function\" && key_type !== \"symbol\";\n\t\t\t\t\t\tkeys.push(`.get(${key_is_primitive ? stringify_primitive(ops.toPrimitive(key)) : \"...\"})`);\n\t\t\t\t\t\tstr += `,${flatten(key)},${flatten(value)}`;\n\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t}\n\t\t\t\t\tstr += \"]\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Int8Array\":\n\t\t\t\tcase \"Uint8Array\":\n\t\t\t\tcase \"Uint8ClampedArray\":\n\t\t\t\tcase \"Int16Array\":\n\t\t\t\tcase \"Uint16Array\":\n\t\t\t\tcase \"Float16Array\":\n\t\t\t\tcase \"Int32Array\":\n\t\t\t\tcase \"Uint32Array\":\n\t\t\t\tcase \"Float32Array\":\n\t\t\t\tcase \"Float64Array\":\n\t\t\t\tcase \"BigInt64Array\":\n\t\t\t\tcase \"BigUint64Array\": {\n\t\t\t\t\tconst info = ops.viewInfo(thing);\n\t\t\t\t\tstr = \"[\\\"\" + tag + \"\\\",\" + flatten(info.buffer);\n\t\t\t\t\tif (info.byteLength !== info.bufferByteLength) str += `,${info.byteOffset},${info.length}`;\n\t\t\t\t\tstr += \"]\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"DataView\": {\n\t\t\t\t\tconst info = ops.viewInfo(thing);\n\t\t\t\t\tstr = \"[\\\"\" + tag + \"\\\",\" + flatten(info.buffer);\n\t\t\t\t\tif (info.byteLength !== info.bufferByteLength) str += `,${info.byteOffset},${info.byteLength}`;\n\t\t\t\t\tstr += \"]\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"ArrayBuffer\":\n\t\t\t\t\tstr = `[\"ArrayBuffer\",\"${encode64(ops.toArrayBuffer(thing))}\"]`;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Temporal.Duration\":\n\t\t\t\tcase \"Temporal.Instant\":\n\t\t\t\tcase \"Temporal.PlainDate\":\n\t\t\t\tcase \"Temporal.PlainTime\":\n\t\t\t\tcase \"Temporal.PlainDateTime\":\n\t\t\t\tcase \"Temporal.PlainMonthDay\":\n\t\t\t\tcase \"Temporal.PlainYearMonth\":\n\t\t\t\tcase \"Temporal.ZonedDateTime\":\n\t\t\t\t\tstr = `[\"${tag}\",${stringify_string(ops.toStringValue(thing))}]`;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: {\n\t\t\t\t\tconst shape = ops.shapeOf(thing);\n\t\t\t\t\tif (shape.kind === \"not-plain\") throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);\n\t\t\t\t\tif (shape.kind === \"symbol-keys\") throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);\n\t\t\t\t\tif (shape.kind === \"null-proto\") {\n\t\t\t\t\t\tstr = \"[\\\"null\\\"\";\n\t\t\t\t\t\tfor (const key of shape.keys) {\n\t\t\t\t\t\t\tif (key === \"__proto__\") throw new DevalueError(`Cannot stringify objects with __proto__ keys`, keys, thing, value);\n\t\t\t\t\t\t\tkeys.push(stringify_key(key));\n\t\t\t\t\t\t\tstr += `,${stringify_string(key)},${flatten(ops.get(thing, key))}`;\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstr += \"]\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr = \"{\";\n\t\t\t\t\t\tlet started = false;\n\t\t\t\t\t\tfor (const key of shape.keys) {\n\t\t\t\t\t\t\tif (key === \"__proto__\") throw new DevalueError(`Cannot stringify objects with __proto__ keys`, keys, thing, value);\n\t\t\t\t\t\t\tif (started) str += \",\";\n\t\t\t\t\t\t\tstarted = true;\n\t\t\t\t\t\t\tkeys.push(stringify_key(key));\n\t\t\t\t\t\t\tstr += `${stringify_string(key)}:${flatten(ops.get(thing, key))}`;\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstr += \"}\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstringified[index] = str;\n\t\treturn index;\n\t}\n\tconst index = flatten(value);\n\tif (index < 0) return `${index}`;\n\treturn stringified;\n}\n/**\n* @param {any} thing\n* @returns {string}\n*/\nfunction stringify_primitive(thing) {\n\tconst type = typeof thing;\n\tif (type === \"string\") return stringify_string(thing);\n\tif (thing === void 0) return (-1).toString();\n\tif (thing === 0 && 1 / thing < 0) return (-6).toString();\n\tif (type === \"bigint\") return `[\"BigInt\",\"${thing}\"]`;\n\treturn String(thing);\n}\n\n//#endregion\n//#region ../../library/src/utils/sendTrackingEvent.ts\nfunction sendTrackingEvent(eventType, eventData, sendOn = \"lazy\") {\n\tsafeWindow.__framer_events?.push([\n\t\teventType,\n\t\teventData,\n\t\tsendOn\n\t]);\n\tswitch (eventType) {\n\t\tcase \"published_site_click\": {\n\t\t\tconst { trackingId, href } = eventData;\n\t\t\tif (trackingId) document.dispatchEvent(new CustomEvent(\"framer:click\", { detail: {\n\t\t\t\ttrackingId,\n\t\t\t\thref\n\t\t\t} }));\n\t\t\tbreak;\n\t\t}\n\t\tcase \"published_site_form_submit\": {\n\t\t\tconst { trackingId } = eventData;\n\t\t\tif (trackingId) document.dispatchEvent(new CustomEvent(\"framer:formsubmit\", { detail: { trackingId } }));\n\t\t\tbreak;\n\t\t}\n\t\tcase \"published_site_pageview\": {\n\t\t\tconst { framerLocale } = eventData;\n\t\t\tdocument.dispatchEvent(new CustomEvent(\"framer:pageview\", { detail: { framerLocale } }));\n\t\t\tbreak;\n\t\t}\n\t\tcase \"published_site_trigger_invoke\": {\n\t\t\tconst { trackingId } = eventData;\n\t\t\tif (trackingId) document.dispatchEvent(new CustomEvent(\"framer:triggerinvoke\", { detail: { trackingId } }));\n\t\t\tbreak;\n\t\t}\n\t}\n}\nconst validTrackingIdRegExp = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u;\nfunction isValidTrackingId(trackingId) {\n\treturn isString(trackingId) && (trackingId === \"\" || validTrackingIdRegExp.test(trackingId));\n}\n\n//#endregion\n//#region ../../library/src/modules/dataHandover/dataHandover.ts\nconst HandoverDataType = {\n\tQueryCache: 0,\n\tCollectionUtilsCache: 1\n};\nlet hydratedData;\nfunction createEmptyPayload() {\n\treturn {\n\t\t[HandoverDataType.QueryCache]: /* @__PURE__ */ new Map(),\n\t\t[HandoverDataType.CollectionUtilsCache]: /* @__PURE__ */ new Map()\n\t};\n}\nfunction parseHandoverData() {\n\tif (!isWindow || false) return;\n\tif (hydratedData !== void 0) return hydratedData;\n\tlet script = document.getElementById(\"__framer__handoverData\");\n\tif (!script) return;\n\ttry {\n\t\thydratedData = parse(script.text) ?? createEmptyPayload();\n\t} catch (error) {\n\t\thydratedData = createEmptyPayload();\n\t\tconsole.warn(\"Failed to parse handover data. Falling back to network.\", error);\n\t}\n\trequestIdleCallback(() => {\n\t\tscript?.remove();\n\t\tscript = null;\n\t});\n\treturn hydratedData;\n}\nfunction handleHydrationError(error, key) {\n\tconsole.warn(getPleaseReportMessage(`Failed to resolve raw query result from DOM during hydration for: ${key}. This might make the page load slightly slower.`));\n\tif (Math.random() < .01) {\n\t\tconst stack = error instanceof Error && typeof error.stack === \"string\" ? error.stack : null;\n\t\tsendTrackingEvent(\"published_site_load_error\", {\n\t\t\tmessage: String(error),\n\t\t\tstack\n\t\t});\n\t}\n}\nfunction hasHandoverData(dataType, key) {\n\tconst data = parseHandoverData();\n\tif (!data) return false;\n\treturn data[dataType].has(key);\n}\n/**\n* Consumes `key` from `dataType` of handed over data.\n* Set `remove` to true if the you write handover data to another cache manager.\n*\n* The returned value is undefined if the key or dataType is not found, but also *can* be undefined if the value is actually undefined.\n* @see {@link hasHandoverData} to check if the key is present.\n*/\nfunction getHandoverData(dataType, key) {\n\tconst data = parseHandoverData();\n\tif (!data) return;\n\tconst map = data[dataType];\n\tif (!map.has(key)) return;\n\tconst value = map.get(key);\n\tmap.delete(key);\n\treturn value;\n}\nvar HandoverCollector = class {\n\tpayload = createEmptyPayload();\n\tisEmpty = true;\n\tset(dataType, key, value) {\n\t\tthis.payload[dataType].set(key, value);\n\t\tthis.isEmpty = false;\n\t}\n\thas(dataType, key) {\n\t\treturn this.payload[dataType].has(key);\n\t}\n\tget(dataType, key) {\n\t\treturn this.payload[dataType].get(key);\n\t}\n\t/**\n\t* Serializes the handover data to a string safe to use inside `<script>` tags.\n\t*/\n\ttoString() {\n\t\tif (this.isEmpty) return void 0;\n\t\ttry {\n\t\t\treturn stringify(this.payload);\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Failed to serialize handover data.\", error);\n\t\t\treturn;\n\t\t}\n\t}\n\tclear() {\n\t\tfor (const map of Object.values(this.payload)) map.clear();\n\t\tthis.isEmpty = true;\n\t}\n};\nconst handoverCollector = /* @__PURE__ */ (() => isWindow ? void 0 : new HandoverCollector())();\n\n//#endregion\n//#region ../../library/src/modules/cms/CollectionUtilsCache.tsx\nconst handoverDataType$1 = /* @__PURE__ */ (() => HandoverDataType.CollectionUtilsCache)();\nfunction getLocaleKey(locale) {\n\treturn locale?.id ?? \"default\";\n}\nfunction makeHandoverKey(method, collectionId, localeKey, id) {\n\treturn `${method}|${collectionId}|${localeKey}|${id}`;\n}\nlet utilsCache = /* @__PURE__ */ new WeakMap();\n/**\n* Builds a `collectionId -> CollectionUtilsCache` lookup. Instances are memoized per utils factory, so\n* a cache built outside React (see `resolveInitialRouteContentState`) shares them with the provider.\n*/\nfunction createCollectionUtilsCache(collectionUtils) {\n\treturn (collectionId) => {\n\t\tif (!collectionUtils) return;\n\t\tconst utilsFactory = collectionUtils[collectionId];\n\t\tif (!utilsFactory) return void 0;\n\t\tif (utilsCache.has(utilsFactory)) return utilsCache.get(utilsFactory);\n\t\tconst cache = new CollectionUtilsCache(utilsFactory, collectionId);\n\t\tutilsCache.set(utilsFactory, cache);\n\t\treturn cache;\n\t};\n}\nconst CollectionUtilsCacheContext = /* @__PURE__ */ createContext(void 0);\nfunction CollectionUtilsCacheProvider({ children, collectionUtils }) {\n\tconst getCollectionUtilsCacheMemoized = useMemo(() => {\n\t\treturn { get: createCollectionUtilsCache(collectionUtils) };\n\t}, [collectionUtils]);\n\treturn /* @__PURE__ */ jsx(CollectionUtilsCacheContext.Provider, {\n\t\tvalue: getCollectionUtilsCacheMemoized,\n\t\tchildren\n\t});\n}\nfunction useCollectionUtils() {\n\treturn useContext(CollectionUtilsCacheContext);\n}\n/**\n* Manages collection utils caches and makes the CollectionUtils functions server-client-handover aware.\n* When updating the implementation, keep in mind the collection utils generation in `exportToHTML`.\n*\n* Every instance manages its own slug/recordId cache, but they share a global collection utils\n* import cache.\n*/\nvar CollectionUtilsCache = class {\n\tcollectionId;\n\tmodule;\n\t/**\n\t* Stores returned values from CollectionUtils.\n\t* The values must be cached so that they can be returned synchronously when a React component unsuspends.\n\t*/\n\tcacheMap = /* @__PURE__ */ new Map();\n\tconstructor(utilFactory, collectionId) {\n\t\tthis.collectionId = collectionId;\n\t\tthis.module = new LazyValue(async () => {\n\t\t\ttry {\n\t\t\t\tconst utils = await utilFactory();\n\t\t\t\tassert$1(utils, \"Couldn't find CollectionUtils\");\n\t\t\t\treturn utils;\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(getPleaseReportMessage(\"Failed to import collection module.\", error));\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\t}\n\tcallUtilsMethod(method, id, locale) {\n\t\tconst localeKey = getLocaleKey(locale);\n\t\tconst entryKey = makeHandoverKey(method, this.collectionId, localeKey, id);\n\t\tif (this.cacheMap.has(entryKey)) {\n\t\t\tconst value = this.cacheMap.get(entryKey)?.readMaybeAsync();\n\t\t\tif (handoverCollector !== void 0) {\n\t\t\t\tif (isPromise(value)) return value.then((result) => {\n\t\t\t\t\thandoverCollector.set(handoverDataType$1, entryKey, result);\n\t\t\t\t\treturn result;\n\t\t\t\t});\n\t\t\t\thandoverCollector.set(handoverDataType$1, entryKey, value);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t\tif (hasHandoverData(handoverDataType$1, entryKey)) {\n\t\t\tconst data = getHandoverData(handoverDataType$1, entryKey);\n\t\t\tthis.cacheMap.set(entryKey, new LazyValue(() => data));\n\t\t\treturn data;\n\t\t}\n\t\tconst maybeUtils = this.module.readMaybeAsync();\n\t\tconst utilsIsPromise = isPromise(maybeUtils);\n\t\tlet maybeResult;\n\t\ttry {\n\t\t\tmaybeResult = utilsIsPromise ? maybeUtils.then((utils) => utils?.[method]?.(id, locale)) : maybeUtils?.[method]?.(id, locale);\n\t\t} catch (error) {\n\t\t\tconsole.error(getPleaseReportMessage(\"Failed to call CollectionUtils method.\", error));\n\t\t\tmaybeResult = void 0;\n\t\t}\n\t\tif (maybeResult === void 0) {\n\t\t\tif (handoverCollector !== void 0) handoverCollector.set(handoverDataType$1, entryKey, maybeResult);\n\t\t\tthis.cacheMap.set(entryKey, maybeResult);\n\t\t\treturn;\n\t\t}\n\t\tconst lazyValue = new LazyValue(async () => {\n\t\t\ttry {\n\t\t\t\tconst result = isPromise(maybeResult) ? await maybeResult : maybeResult;\n\t\t\t\tif (handoverCollector !== void 0) handoverCollector.set(handoverDataType$1, entryKey, result);\n\t\t\t\treturn result;\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(getPleaseReportMessage(\"Failed to call CollectionUtils method.\", error));\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\t\tthis.cacheMap.set(entryKey, lazyValue);\n\t\treturn lazyValue.readMaybeAsync();\n\t}\n\tgetSlugByRecordId(recordId, locale) {\n\t\treturn this.callUtilsMethod(\"getSlugByRecordId\", recordId, locale);\n\t}\n\tgetRecordIdBySlug(slug, locale) {\n\t\treturn this.callUtilsMethod(\"getRecordIdBySlug\", slug, locale);\n\t}\n\tgetContentLocaleIdByRecordId(recordId, locale) {\n\t\treturn this.callUtilsMethod(\"getContentLocaleIdByRecordId\", recordId, locale);\n\t}\n};\n\n//#endregion\n//#region ../../shared/src/delay.ts\n/**\n* Resolves after `ms` milliseconds. Use this instead of adding a local\n* `sleep()`, `wait()` or `setTimeout` promise wrapper.\n*/\nfunction delay$1(ms) {\n\treturn new Promise((resolve) => {\n\t\tsetTimeout(resolve, ms);\n\t});\n}\n\n//#endregion\n//#region ../../shared/src/environment.ts\nfunction getNavigator() {\n\treturn typeof navigator !== \"undefined\" ? navigator : void 0;\n}\nfunction getWindow() {\n\treturn typeof window !== \"undefined\" ? window : void 0;\n}\nconst macRegex = /Mac/u;\nconst winRegex = /Win/u;\nconst iOSRegex = /iPhone|iPod|iPad/iu;\nconst macIntelRegex = /MacIntel/iu;\nconst androidRegex = /android/iu;\n/**\n* @deprecated\n* - When checking for whether a keyboard event happened with the Cmd button pressed, use {@link isCommandKeyPressed} instead.\n* - When checking for whether the keyboard has a Cmd button, use {@link isAppleDevice} instead. iPads also have keyboards.\n* - When checking for scrollbar visibility: don’t (visibility is configurable in macOS), or use CSS and `window.matchMedia()`.\n*/\nfunction isMacOS() {\n\tconst nav = getNavigator();\n\treturn nav ? macRegex.test(nav.platform) : false;\n}\nfunction isWindows() {\n\tconst nav = getNavigator();\n\treturn nav ? winRegex.test(nav.platform) : false;\n}\nfunction isIOS() {\n\tconst nav = getNavigator();\n\tif (!nav) return false;\n\tif (iOSRegex.test(nav.platform)) return true;\n\treturn macIntelRegex.test(nav.platform) && nav.maxTouchPoints != null && nav.maxTouchPoints > 2;\n}\n/** Returns true if the device is running macOS or iOS. */\nfunction isAppleDevice() {\n\treturn isMacOS() || isIOS();\n}\nfunction isAndroid() {\n\tconst nav = getNavigator();\n\treturn nav ? androidRegex.test(nav.userAgent) : false;\n}\nconst edgeRegex = /Edg\\//u;\nfunction isEdge() {\n\tconst nav = getNavigator();\n\treturn nav ? edgeRegex.test(nav.userAgent) : false;\n}\nconst chromeRegex = /Chrome/u;\nconst googleVendorRegex = /Google Inc/u;\nfunction isChrome$1() {\n\tconst nav = getNavigator();\n\treturn nav ? chromeRegex.test(nav.userAgent) && googleVendorRegex.test(nav.vendor) && !isEdge() : false;\n}\nconst appleWebKitRegex = /AppleWebKit\\//u;\nfunction isWebKit() {\n\tconst nav = getNavigator();\n\treturn nav ? appleWebKitRegex.test(nav.userAgent) && !isChrome$1() && !isEdge() : false;\n}\nconst safariRegex = /Safari/u;\nconst appleComputerRegex = /Apple Computer/u;\nfunction isSafari() {\n\tconst nav = getNavigator();\n\treturn nav ? safariRegex.test(nav.userAgent) && appleComputerRegex.test(nav.vendor) : false;\n}\nconst firefoxRegex = /Firefox\\/\\d+\\.\\d+$/u;\nfunction isFirefox() {\n\tconst nav = getNavigator();\n\treturn nav ? firefoxRegex.test(nav.userAgent) : false;\n}\nfunction isBrowser$1() {\n\treturn typeof document === \"object\";\n}\nconst chromeVersionRegex = /Chrome\\/(\\d+)/u;\nfunction chromeMainVersion() {\n\tconst nav = getNavigator();\n\tif (!nav) return -1;\n\tconst result = chromeVersionRegex.exec(nav.userAgent);\n\tif (!result?.[1]) return -1;\n\tconst version = parseInt(result[1]);\n\treturn Number.isFinite(version) ? version : -1;\n}\nconst safariVersionRegex = /Version\\/([\\d.]+)/u;\nfunction safariVersion() {\n\tconst nav = getNavigator();\n\tif (!nav) return -1;\n\tconst result = safariVersionRegex.exec(nav.userAgent);\n\tif (result?.[1]) return parseFloat(result[1]);\n\treturn -1;\n}\nconst framerXRegex = /FramerX/u;\nfunction isFramerX() {\n\tconst nav = getNavigator();\n\treturn nav ? framerXRegex.test(nav.userAgent) : false;\n}\nfunction isTest() {\n\treturn false;\n}\nfunction isTouch() {\n\tconst win = getWindow();\n\tconst nav = getNavigator();\n\tif (!win || !nav) return false;\n\treturn \"ontouchstart\" in win || nav.maxTouchPoints > 0;\n}\nconst tabletRegex = /tablet|iPad|Nexus 9/iu;\nconst mobileRegex = /mobi/iu;\nfunction deviceType() {\n\tconst nav = getNavigator();\n\tif (nav && tabletRegex.test(nav.userAgent)) return \"tablet\";\n\tif (nav && mobileRegex.test(nav.userAgent)) return \"phone\";\n\treturn \"desktop\";\n}\nfunction isDesktop() {\n\treturn deviceType() === \"desktop\";\n}\nfunction isPhone() {\n\treturn deviceType() === \"phone\";\n}\nfunction isTablet() {\n\treturn deviceType() === \"tablet\";\n}\nfunction isMobile() {\n\treturn isPhone() || isTablet();\n}\nconst embeddedRegex = /Instagram|FB_IAB\\/FB4A|FBAN\\/FBIOS|BytedanceWebview|Twitter|LinkedIn/iu;\nfunction isEmbedded() {\n\tconst nav = getNavigator();\n\treturn nav ? embeddedRegex.test(nav.userAgent) : false;\n}\nconst absoluteUrlRegex = /^[a-z]{1,8}:\\/\\/.*$/iu;\nfunction isRelativeUrl(url) {\n\treturn !absoluteUrlRegex.test(url);\n}\nfunction isFileUrl(url) {\n\treturn url.startsWith(\"file://\");\n}\nfunction isDataUrl(url) {\n\treturn url.startsWith(\"data:\");\n}\nconst localServerUrlRegex1 = /[a-z]{1,8}:\\/\\/127\\.0\\.0\\.1/iu;\nconst localServerUrlRegex2 = /[a-zA-Z]{1,8}:\\/\\/localhost/u;\nfunction isLocalServerUrl(url) {\n\treturn localServerUrlRegex1.test(url) || localServerUrlRegex2.test(url);\n}\nfunction isLocalUrl(url) {\n\tif (isFileUrl(url)) return true;\n\tif (isLocalServerUrl(url)) return true;\n\treturn false;\n}\nfunction isCommandKeyPressed(event) {\n\treturn isAppleDevice() ? event.metaKey : event.ctrlKey;\n}\n\n//#endregion\n//#region ../../shared/src/noop.ts\nfunction noop$4() {}\nasync function noopAsync$1() {}\n\n//#endregion\n//#region ../../shared/src/yield.ts\nconst YIELD_TARGET_FREQUENTLY = /* @__PURE__ */ (() => 1e3 / 60)();\nconst YIELD_TARGET_INFREQUENTLY = /* @__PURE__ */ (() => 40)();\n/**\n* Hidden tabs should keep making progress without frequent main-thread yields.\n* @see https://calendar.perfplanet.com/2024/breaking-up-with-long-tasks-or-how-i-learned-to-group-loops-and-wield-the-yield/\n*/\nconst HIDDEN_TAB_YIELD_TARGET = /* @__PURE__ */ (() => 500)();\n/** Reads the current priority from a static value or live source. */\nfunction resolveSchedulerPriority(priority) {\n\treturn typeof priority === \"function\" ? priority() : priority;\n}\nconst schedulerPriorityRank = /* @__PURE__ */ (() => ({\n\tbackground: 0,\n\t\"user-visible\": 1,\n\t\"user-blocking\": 2\n}))();\n/** Returns whether a requested scheduler priority should promote work already running at the current priority. */\nfunction isHigherSchedulerPriority(requested, current) {\n\treturn schedulerPriorityRank[requested] > schedulerPriorityRank[current];\n}\nfunction getScheduler() {\n\tif (typeof scheduler === \"undefined\") return void 0;\n\treturn scheduler;\n}\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nfunction schedulerYield(options, scheduleFallbackTask) {\n\tconst priority = options?.priority;\n\tconst activeScheduler = getScheduler();\n\tif (priority === \"background\") return scheduleFallbackTask?.() ?? delay$1(1);\n\tif (activeScheduler?.yield) return activeScheduler.yield(options).catch(noop$4);\n\tif (activeScheduler?.postTask) return activeScheduler.postTask(noop$4, options).catch(noop$4);\n\tif (scheduleFallbackTask) return scheduleFallbackTask();\n\tif (priority === \"user-blocking\") return resolvedPromise;\n\treturn delay$1(0);\n}\nconst PAINT_FALLBACK_TIMEOUT_MS = 100;\nfunction createYieldToMain(scheduleFrameRead, scheduleFallbackTask, shouldWaitForPaint) {\n\tlet timeOfLastYield = -Infinity;\n\tlet activeBatchEpisode;\n\tconst pendingResolvers = /* @__PURE__ */ new Set();\n\t/** Resolves all paint waits that must continue before the document unloads. */\n\tfunction resolvePendingPromises() {\n\t\tfor (const resolve of pendingResolvers) resolve();\n\t\tpendingResolvers.clear();\n\t}\n\tfunction resolvePendingPromisesIfHidden() {\n\t\tif (document.hidden) {\n\t\t\tresolvePendingPromises();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tfunction listenForPageLifecycle() {\n\t\tif (!isBrowser$1()) return;\n\t\tdocument.addEventListener(\"visibilitychange\", resolvePendingPromisesIfHidden);\n\t\twindow.addEventListener(\"pagehide\", resolvePendingPromises);\n\t}\n\t/** Resolves earliest after the next paint, with a fallback when animation frames are suppressed. */\n\tfunction interactionResponse(options) {\n\t\treturn new Promise((resolve) => {\n\t\t\tsetTimeout(resolve, PAINT_FALLBACK_TIMEOUT_MS);\n\t\t\tscheduleFrameRead(() => {\n\t\t\t\tschedulerYield(options, scheduleFallbackTask).then(resolve);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Resolves a yield immediately if the document is already hidden or starts unloading.\n\t* Wrapping the selected yield promise preserves the guarantee for both paint-aware and plain yields.\n\t*\n\t* “ensureContinueBeforeUnload”: If the document changes to hidden prior to the promise resolving,\n\t* we assume it’s about to be closed, so we resolve the promise synchronously (\"urgently\").\n\t* This gives it a chance to complete its work before the document is destroyed.\n\t* (We also resolve immediately if the document is already hidden, but that’s simply\n\t* because when the document is backgrounded, there’s no chance of INP events.)\n\t*\n\t* @see https://kurtextrem.de/posts/improve-inp#exit-event-handlers-yieldunlessurgent\n\t*/\n\tfunction withUnloadGuarantee(yieldPromise) {\n\t\tif (!isBrowser$1()) return yieldPromise;\n\t\treturn new Promise((resolve) => {\n\t\t\tlet isPending = true;\n\t\t\tconst resolveYield = () => {\n\t\t\t\tif (!isPending) return;\n\t\t\t\tisPending = false;\n\t\t\t\tpendingResolvers.delete(resolveYield);\n\t\t\t\tresolve();\n\t\t\t};\n\t\t\tpendingResolvers.add(resolveYield);\n\t\t\tif (!resolvePendingPromisesIfHidden()) listenForPageLifecycle();\n\t\t\tyieldPromise.then(resolveYield, resolveYield);\n\t\t});\n\t}\n\tfunction createYieldPromise(schedulingOptions, waitForPaint) {\n\t\tconst { continueAfter, ensureContinueBeforeUnload, ...schedulerOptions } = schedulingOptions;\n\t\tconst yieldPromise = waitForPaint ?? continueAfter === \"paint\" ? interactionResponse(schedulerOptions) : schedulerYield(schedulerOptions, scheduleFallbackTask);\n\t\treturn ensureContinueBeforeUnload ? withUnloadGuarantee(yieldPromise) : yieldPromise;\n\t}\n\tfunction scheduleBatchYield(episode, schedulingOptions, waitForPaint) {\n\t\tif (waitForPaint) episode.pendingPaintYieldCount++;\n\t\tconst yieldPromise = createYieldPromise(schedulingOptions, waitForPaint);\n\t\tconst signal = schedulingOptions.signal;\n\t\tlet isPending = true;\n\t\tconst finishYield = (didResume) => {\n\t\t\tif (!isPending) return;\n\t\t\tisPending = false;\n\t\t\tsignal?.removeEventListener(\"abort\", abortYield);\n\t\t\tif (didResume) timeOfLastYield = performance.now();\n\t\t\tif (waitForPaint) episode.pendingPaintYieldCount--;\n\t\t\tif (activeBatchEpisode === episode && episode.pendingPaintYieldCount === 0) activeBatchEpisode = void 0;\n\t\t};\n\t\tconst abortYield = () => finishYield(false);\n\t\tif (signal?.aborted) abortYield();\n\t\telse signal?.addEventListener(\"abort\", abortYield, { once: true });\n\t\tyieldPromise.then(() => finishYield(true), () => finishYield(true));\n\t\treturn yieldPromise;\n\t}\n\tfunction yieldBatchedToMain(schedulingOptions, batchDurationOption) {\n\t\tlet episode = activeBatchEpisode;\n\t\tif (!episode) {\n\t\t\tconst now = performance.now();\n\t\t\tconst batchDuration = batchDurationOption ?? (schedulingOptions.priority === \"user-blocking\" ? YIELD_TARGET_FREQUENTLY : YIELD_TARGET_INFREQUENTLY);\n\t\t\tconst targetDuration = isBrowser$1() && document.hidden ? HIDDEN_TAB_YIELD_TARGET : batchDuration;\n\t\t\tif (now - timeOfLastYield < targetDuration) return;\n\t\t\tepisode = { pendingPaintYieldCount: 0 };\n\t\t\tactiveBatchEpisode = episode;\n\t\t}\n\t\tconst waitForPaint = schedulingOptions.continueAfter === \"paint\" && (episode.pendingPaintYieldCount > 0 || shouldWaitForPaint?.() !== false);\n\t\treturn scheduleBatchYield(episode, schedulingOptions, waitForPaint);\n\t}\n\tfunction yieldToMain(options) {\n\t\tconst { batch, batchDuration: batchDurationOption, ...schedulingOptions } = options ?? {};\n\t\tif (!isBrowser$1() && !scheduleFallbackTask) return batch ? void 0 : resolvedPromise;\n\t\tif (batch) return yieldBatchedToMain(schedulingOptions, batchDurationOption);\n\t\treturn createYieldPromise(schedulingOptions);\n\t}\n\treturn yieldToMain;\n}\n\n//#endregion\n//#region ../../library/src/utils/yield.ts\nconst scheduleFrameRead = (callback) => {\n\tframe.read(callback, false, true);\n};\n/**\n* Yields to the main thread before continuing execution.\n*\n* @see {@link YieldOptions}\n*/\nconst yieldToMain = /* @__PURE__ */ createYieldToMain(scheduleFrameRead);\n\n//#endregion\n//#region ../../library/src/router/forwardQueryParams.ts\n/**\n* ⚠️\n*\n* Please be careful about adding dependencies and non-shakable code[^1] to this file, as it's being used in\n* rewriteLinksWithQueryParams.ts, which ends up inlined into the published site's HTML!\n*\n* [^1]: As defined by esbuild, so probably more than you think: https://esbuild.github.io/api/#tree-shaking-and-side-effects\n*/\n/**\n* Forwards query params from the current `location` URL to the given `href`, merging them if necessary.\n*\n* When merging, params in the `href` take precedence.\n*\n* When `history.state.queryParamBackAnchorSearch` is a string (pre-filter search), uses that instead\n* of `location.search` so links preserve only pre-filter params and not dynamic filter params.\n*\n* When `ignoreBackAnchor` is set, always uses `location.search` instead of `queryParamBackAnchorSearch`.\n* This is used for same-page hash navigation, which should keep active filter params.\n*\n* Safe for server-side rendering, in which case it'll return `href` as-is.\n*/\nfunction forwardCurrentQueryParams(href, ignoreBackAnchor = false) {\n\tlet queryParamsString = \"\";\n\tif (typeof window !== \"undefined\") {\n\t\tif (ignoreBackAnchor) queryParamsString = window.location.search;\n\t\telse {\n\t\t\tconst backAnchor = (window.history?.state)?.queryParamBackAnchorSearch;\n\t\t\tif (backAnchor === void 0) queryParamsString = window.location.search;\n\t\t\telse queryParamsString = backAnchor === \"\" ? \"\" : `?${backAnchor}`;\n\t\t}\n\t}\n\tif (!queryParamsString) return href;\n\treturn forwardQueryParams(queryParamsString, href);\n}\nconst FRAMER_VARIANT_KEY = \"framer_variant\";\n/**\n* Forwards query params given by the `queryParamsString` to the given `href`, merging them if necessary.\n*\n* When merging, params in the `href` take precedence.\n*\n* @param queryParamsString Usually `window.location.search`, should include the leading `?` if not empty\n*/\nfunction forwardQueryParams(queryParamsString, href) {\n\tconst startOfHash = href.indexOf(\"#\");\n\tconst hrefWithoutHash = startOfHash === -1 ? href : href.substring(0, startOfHash);\n\tconst hash = startOfHash === -1 ? \"\" : href.substring(startOfHash);\n\tconst startOfSearch = hrefWithoutHash.indexOf(\"?\");\n\tconst baseUrl = startOfSearch === -1 ? hrefWithoutHash : hrefWithoutHash.substring(0, startOfSearch);\n\tconst searchString = startOfSearch === -1 ? \"\" : hrefWithoutHash.substring(startOfSearch);\n\tconst newSearchParams = new URLSearchParams(searchString);\n\tconst currentSearchParams = new URLSearchParams(queryParamsString);\n\tfor (const [key, value] of currentSearchParams) {\n\t\tif (newSearchParams.has(key)) continue;\n\t\tif (key === FRAMER_VARIANT_KEY) continue;\n\t\tnewSearchParams.append(key, value);\n\t}\n\tconst newSearchString = newSearchParams.toString();\n\tif (newSearchString === \"\") return hrefWithoutHash + hash;\n\treturn baseUrl + \"?\" + newSearchString + hash;\n}\n\n//#endregion\n//#region ../../library/src/router/pathVariables.ts\nconst pathVariablesRegExpRaw = \":([a-z]\\\\w*)\";\nconst pathVariablesRegExpGlobal = /* @__PURE__ */ new RegExp(pathVariablesRegExpRaw, \"gi\");\n\n//#endregion\n//#region ../../library/src/router/getLocalizedNavigationPath.ts\n/**\n* Replaces path variables in a path with their (potentially) localized counterparts\n*/\nasync function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, collectionId, pathVariables, collectionUtils) {\n\tlet resultPath = path;\n\tlet isMissingInLocale = false;\n\tconst resultPathVariables = { ...pathVariables };\n\tconst matches = Array.from(resultPath.matchAll(pathVariablesRegExpGlobal));\n\tconst replacements = await Promise.all(matches.map(async (match) => {\n\t\tconst pathVariableWithDelimiter = match?.[0];\n\t\tconst pathVariableValue = match?.[1];\n\t\tif (!pathVariableWithDelimiter || !pathVariableValue) throw new Error(\"Failed to replace path variables: unexpected regex match group\");\n\t\tconst currentSlug = pathVariables[pathVariableValue];\n\t\tif (!currentSlug || !isString(currentSlug)) throw new Error(`No slug found for path variable ${pathVariableValue}`);\n\t\tconst utils = collectionUtils?.get(collectionId);\n\t\tif (!utils || !currentLocale) return currentSlug;\n\t\tconst maybeRecordId = utils.getRecordIdBySlug(currentSlug, currentLocale);\n\t\tconst recordId = isPromise(maybeRecordId) ? await maybeRecordId : maybeRecordId;\n\t\tif (!recordId) return currentSlug;\n\t\tconst maybeNextSlug = utils.getSlugByRecordId(recordId, nextLocale);\n\t\tconst nextSlug = isPromise(maybeNextSlug) ? await maybeNextSlug : maybeNextSlug;\n\t\tif (!nextSlug) {\n\t\t\tisMissingInLocale = true;\n\t\t\tconst maybeDefaultLocaleSlug = utils.getSlugByRecordId(recordId, defaultLocale);\n\t\t\tconst defaultLocaleSlug = isPromise(maybeDefaultLocaleSlug) ? await maybeDefaultLocaleSlug : maybeDefaultLocaleSlug;\n\t\t\tif (defaultLocaleSlug) resultPathVariables[pathVariableValue] = defaultLocaleSlug;\n\t\t\treturn defaultLocaleSlug ?? currentSlug;\n\t\t}\n\t\tresultPathVariables[pathVariableValue] = nextSlug;\n\t\treturn nextSlug;\n\t}));\n\tlet lastIndex = 0;\n\tlet replacedPath = \"\";\n\tlet hasMatch = false;\n\tfor (let i = 0; i < matches.length; i++) {\n\t\tconst match = matches[i];\n\t\tconst replacement = replacements[i];\n\t\tif (!match || !replacement) continue;\n\t\treplacedPath += resultPath.substring(lastIndex, match.index);\n\t\tlastIndex = (match.index ?? 0) + (match[0]?.length ?? 0);\n\t\treplacedPath += replacements[i];\n\t\thasMatch = true;\n\t}\n\tif (hasMatch) {\n\t\treplacedPath += resultPath.substring(lastIndex);\n\t\tresultPath = replacedPath;\n\t}\n\treturn {\n\t\tpath: resultPath,\n\t\tpathVariables: resultPathVariables,\n\t\tisMissingInLocale\n\t};\n}\n/**\n* Inserts the locale slug as the first path segment when non-empty.\n* e.g. prependLocaleSlug(\"/about\", \"fr\") → \"/fr/about\"\n*/\nfunction prependLocaleSlug(path, localeSlug) {\n\tif (!localeSlug) return path;\n\treturn `/${localeSlug}${path}`;\n}\n/**\n* Generates a new path and its associated pathVariables for navigation to the\n* next locale. This is needed because slug translation can result in different\n* paths for different locales.\n*/\nasync function getLocalizedNavigationPath({ currentLocale, nextLocale, defaultLocale, route, pathVariables, collectionUtils, preserveQueryParams }) {\n\tconst { path: basePath, pathLocalized } = route;\n\tconst path = pathLocalized?.[nextLocale.id] ?? basePath;\n\tlet result = {\n\t\tpath,\n\t\tpathVariables,\n\t\tisMissingInLocale: false\n\t};\n\tif (!path) return result;\n\tif (pathVariables && route.collectionId) try {\n\t\tresult = await replacePathVariables(path, currentLocale, nextLocale, defaultLocale, route.collectionId, pathVariables, collectionUtils);\n\t} catch {}\n\tif (result.path !== void 0) result.path = prependLocaleSlug(result.path, nextLocale.slug);\n\tif (preserveQueryParams && result.path) result.path = forwardCurrentQueryParams(result.path, true);\n\treturn result;\n}\n/** Resolves the slug in the route's last path variable to a CMS record id. */\nasync function getCollectionItemRecordId({ activeLocale, collectionUtils, currentRoute, pathVariables }) {\n\tconst collectionId = currentRoute?.collectionId;\n\tif (!collectionId) return;\n\tconst utils = collectionUtils?.get(collectionId);\n\tif (!utils) return;\n\tif (!pathVariables || !currentRoute?.path) return;\n\tconst pathVariableValue = Array.from(currentRoute.path.matchAll(pathVariablesRegExpGlobal)).at(-1)?.[1];\n\tif (!pathVariableValue) return;\n\tconst currentSlug = pathVariables[pathVariableValue];\n\tif (!isString(currentSlug)) return;\n\treturn utils.getRecordIdBySlug(currentSlug, activeLocale ?? void 0);\n}\nasync function getCollectionItemContentLocaleId({ activeLocale, collectionUtils, currentRoute, pathVariables }) {\n\tif (!activeLocale || activeLocale.id === \"default\") return;\n\tconst collectionId = currentRoute?.collectionId;\n\tif (!collectionId) return;\n\tconst utils = collectionUtils?.get(collectionId);\n\tif (!utils?.getContentLocaleIdByRecordId) return;\n\tconst recordId = await getCollectionItemRecordId({\n\t\tactiveLocale,\n\t\tcollectionUtils,\n\t\tcurrentRoute,\n\t\tpathVariables\n\t});\n\tif (!recordId) return;\n\treturn utils.getContentLocaleIdByRecordId(recordId, activeLocale);\n}\nasync function resolveRouteContentState({ activeLocale, defaultLocale, collectionUtilsCache, locales, pathVariables, route, routeId }) {\n\tif (!activeLocale || !route) return {};\n\tconst contentLocaleId = await getCollectionItemContentLocaleId({\n\t\tactiveLocale,\n\t\tcollectionUtils: collectionUtilsCache,\n\t\tcurrentRoute: route,\n\t\tpathVariables\n\t}) ?? route.canonicalLocaleIdByLocaleId?.[activeLocale.id];\n\tconst contentLocale = contentLocaleId ? locales.find(({ id }) => id === contentLocaleId) : void 0;\n\tif (!contentLocale || contentLocale.id === activeLocale.id) return { contentLocaleId };\n\tconst { pathVariables: canonicalPathVariables } = await getLocalizedNavigationPath({\n\t\tcurrentLocale: activeLocale,\n\t\tnextLocale: contentLocale,\n\t\tdefaultLocale,\n\t\troute,\n\t\trouteId,\n\t\tpathVariables,\n\t\tcollectionUtils: collectionUtilsCache,\n\t\tpreserveQueryParams: false\n\t});\n\treturn !isEqual(canonicalPathVariables ?? {}, pathVariables ?? {}, false) ? {\n\t\tcontentLocaleId,\n\t\tcanonicalPathVariables\n\t} : { contentLocaleId };\n}\n\n//#endregion\n//#region ../../library/src/router/getLocalesForCurrentRoute.ts\nasync function getLocalesForCurrentRoute(activeLocale, locales, currentRoute, pathVariables, collectionUtils) {\n\tif (!currentRoute) return locales;\n\tconst slugByLocaleIfCollectionPage = await getSlugByLocaleIfCollectionPage(activeLocale, locales, currentRoute, pathVariables, collectionUtils);\n\tconst includedLocalesForCurrentRoute = currentRoute.includedLocales;\n\tconst localesForCurrentRoute = [];\n\tfor (const locale of locales) {\n\t\tif (includedLocalesForCurrentRoute) {\n\t\t\tif (!includedLocalesForCurrentRoute.includes(locale.id)) continue;\n\t\t}\n\t\tif (slugByLocaleIfCollectionPage) {\n\t\t\tif (!slugByLocaleIfCollectionPage.has(locale.id)) continue;\n\t\t}\n\t\tlocalesForCurrentRoute.push(locale);\n\t}\n\treturn localesForCurrentRoute;\n}\n/** Returns a lookup if the route has slugs, otherwise returns `null` */\nasync function getSlugByLocaleIfCollectionPage(activeLocale, locales, currentRoute, pathVariables, collectionUtils) {\n\tconst { collectionId } = currentRoute;\n\tif (!collectionId) return null;\n\tif (!activeLocale) return null;\n\tif (!pathVariables) return null;\n\tconst { path } = currentRoute;\n\tif (!path) return null;\n\tconst lastMatch = Array.from(path.matchAll(pathVariablesRegExpGlobal)).pop();\n\tif (!lastMatch) return null;\n\tconst pathVariableWithDelimiter = lastMatch?.[0];\n\tconst pathVariableValue = lastMatch?.[1];\n\tif (!pathVariableWithDelimiter || !pathVariableValue) throw new Error(\"Failed to replace path variables: unexpected regex match group\");\n\tconst currentSlug = pathVariables[pathVariableValue];\n\tif (!currentSlug || !isString(currentSlug)) throw new Error(`No slug found for path variable ${pathVariableValue}`);\n\tconst utils = collectionUtils?.get(collectionId);\n\tif (!utils) return null;\n\tconst maybeRecordId = utils.getRecordIdBySlug(currentSlug, activeLocale);\n\tconst recordId = isPromise(maybeRecordId) ? await maybeRecordId : maybeRecordId;\n\tif (!recordId) return null;\n\tconst slugById = /* @__PURE__ */ new Map();\n\tawait Promise.all(locales.map(async (locale) => {\n\t\tconst maybeSlug = utils.getSlugByRecordId(recordId, locale);\n\t\tconst slug = isPromise(maybeSlug) ? await maybeSlug : maybeSlug;\n\t\tif (!slug) return;\n\t\tslugById.set(locale.id, slug);\n\t}));\n\treturn slugById;\n}\n\n//#endregion\n//#region ../../library/src/router/useLocale.ts\nconst noopAsync = async () => {};\nconst defaultLocaleInfo = {\n\tcontentLocale: null,\n\tactiveLocale: null,\n\tlocales: [],\n\tsetLocale: noopAsync\n};\nconst LocaleInfoContext = /* @__PURE__ */ (() => {\n\tconst Context = React.createContext(defaultLocaleInfo);\n\tContext.displayName = \"LocaleInfoContext\";\n\treturn Context;\n})();\n/**\n* @public\n* @returns The active locale, all of the available locales, and a way to change the active locale.\n*/\nfunction useLocaleInfo() {\n\treturn React.useContext(LocaleInfoContext);\n}\n/**\n* @public\n* @returns The locales that are available for the current route.\n*/\nfunction useLocalesForCurrentRoute() {\n\tconst { currentRouteId, routes, currentPathVariables } = useRouter();\n\tconst { activeLocale, locales } = useLocaleInfo();\n\tconst [localesForCurrentRoute, setLocalesForCurrentRoute] = React.useState(() => activeLocale ? [activeLocale] : []);\n\tconst currentRoute = currentRouteId ? routes?.[currentRouteId] : void 0;\n\tconst collectionUtils = useCollectionUtils();\n\tReact.useEffect(() => {\n\t\tlet active = true;\n\t\tgetLocalesForCurrentRoute(activeLocale, locales, currentRoute, currentPathVariables, collectionUtils).then((localesSubset) => {\n\t\t\tif (!active) return;\n\t\t\tReact.startTransition(() => {\n\t\t\t\tif (localesSubset) setLocalesForCurrentRoute(localesSubset);\n\t\t\t\telse setLocalesForCurrentRoute(activeLocale ? [activeLocale] : []);\n\t\t\t});\n\t\t}).catch(() => {});\n\t\treturn () => {\n\t\t\tactive = false;\n\t\t};\n\t}, [\n\t\tactiveLocale,\n\t\tlocales,\n\t\tcollectionUtils,\n\t\tcurrentRoute,\n\t\tcurrentPathVariables\n\t]);\n\treturn localesForCurrentRoute;\n}\n/**\n* Only used in code generation within our code on alpha.\n* @deprecated Use `useLocaleInfo` instead.\n*/\nfunction useLocalizationInfo() {\n\tconst { activeLocale, locales, setLocale } = useLocaleInfo();\n\treturn {\n\t\tactiveLocalization: activeLocale,\n\t\tlocalizations: locales,\n\t\tsetLocalization: setLocale\n\t};\n}\n/**\n* @public\n* @returns The current locale code, which is a combination of the language and optional region,\n* e.g. \"en-US\".\n*/\nfunction useLocaleCode() {\n\treturn useLocaleInfo().activeLocale?.code ?? \"en-US\";\n}\n/**\n* Used in code generation of user code.\n* @deprecated Use `useLocaleCode` instead.\n*/\nfunction useLocale() {\n\treturn useLocaleCode();\n}\n/** @private */\nconst LayoutDirectionContext = /* @__PURE__ */ (() => {\n\tconst Context = React.createContext(\"ltr\");\n\tContext.displayName = \"LayoutDirectionContext\";\n\treturn Context;\n})();\n/**\n* @public\n* @returns The current layout direction, either \"ltr\" (left-to-right) or \"rtl\" (right-to-left).\n*/\nfunction useLayoutDirection() {\n\treturn React.useContext(LayoutDirectionContext);\n}\n\n//#endregion\n//#region ../../library/src/router/useRoutePreloader.ts\nconst shouldPreloadBasedOnUA = !isBot;\n/**\n* Hook that returns a preload function with locale and collectionUtils already bound.\n* Use this instead of calling preloadRoute directly to ensure proper context.\n*\n* @example\n* const preload = usePreloadRoute()\n* preload(routeId, { pathVariables }, { priority: \"user-visible\" }) // preloads code + data\n* preload(routeId, {}, { shouldLoadRouteData: false }) // preloads code only\n*/\nfunction usePreloadRoute() {\n\tconst collectionUtils = useCollectionUtils();\n\tconst { getRoute } = useRouter();\n\tconst { activeLocale, locales } = useLocaleInfo();\n\treturn useCallback((routeId, linkContext, options) => {\n\t\tif (!routeId || !getRoute) return;\n\t\tconst route = getRoute(routeId);\n\t\tconst { pathVariables } = linkContext;\n\t\treturn preloadRoute(route, {\n\t\t\trouteId,\n\t\t\tpathVariables,\n\t\t\tlocale: linkContext.locale ?? activeLocale ?? void 0,\n\t\t\tlocales,\n\t\t\tcollectionUtils\n\t\t}, options);\n\t}, [\n\t\tgetRoute,\n\t\tcollectionUtils,\n\t\tactiveLocale,\n\t\tlocales\n\t]);\n}\n/**\n* @deprecated see https://framer-team.slack.com/archives/CR3CYA1D4/p1714029035087469.\n*/\nfunction useRoutePreloader(routeIds, enabled = true) {\n\tconst preload = usePreloadRoute();\n\tuseEffect(() => {\n\t\tif (!enabled || !shouldPreloadBasedOnUA) return;\n\t\tfor (const routeId of routeIds) preload(routeId, {});\n\t}, [\n\t\trouteIds,\n\t\tenabled,\n\t\tpreload\n\t]);\n}\n/**\n* Preloads a route's component module and optionally its data.\n*\n* @param route - The route to preload\n* @param context - Optional context for data preloading (routeId, pathVariables, locale, collectionUtils)\n*/\nasync function preloadRoute(route, context, options = {}) {\n\tif (!shouldPreloadBasedOnUA || !route) return;\n\tconst { priority = \"background\", yieldBeforePreload = true, shouldLoadRouteData = true } = options;\n\tconst component = route.page;\n\tif (!component || !isLazyComponentType(component)) return;\n\tconst needsRouteData = shouldLoadRouteData && Boolean(context);\n\tif (component.getStatus().hasLoaded && !needsRouteData) return;\n\tif (yieldBeforePreload) await yieldToMain({ priority });\n\ttry {\n\t\tconst loadedComponent = await component.preload();\n\t\tif (needsRouteData && context && loadedComponent) await loadRouteData(loadedComponent, route, context, priority);\n\t} catch (e) {}\n}\n/**\n* Preloads a component's data using its loader.\n* This is called after the component module is loaded.\n*/\nasync function loadRouteData(component, route, context, priority) {\n\tconst loader = component.loader;\n\tif (!loader?.load) return;\n\tconst { canonicalPathVariables } = await resolveRouteContentState({\n\t\tactiveLocale: context.locale ?? null,\n\t\tdefaultLocale: context.locales?.find((locale) => locale.id === defaultLocaleId),\n\t\tcollectionUtilsCache: context.collectionUtils,\n\t\tlocales: context.locales ?? [],\n\t\tpathVariables: context.pathVariables,\n\t\troute,\n\t\trouteId: context.routeId\n\t});\n\tconst loaderContext = {\n\t\tsignal: context.signal ?? new AbortController().signal,\n\t\tpathVariables: context.pathVariables ?? {},\n\t\tcanonicalPathVariables,\n\t\trouteId: context.routeId,\n\t\tlocale: context.locale,\n\t\tpriority,\n\t\tcollectionUtils: context.collectionUtils\n\t};\n\ttry {\n\t\tawait loader.load({}, loaderContext);\n\t} catch (e) {}\n}\n\n//#endregion\n//#region ../../library/src/router/useRouteHandler.ts\nfunction useRouteHandler(routeId, preload = false, elementId) {\n\tconst { navigate } = useRouter();\n\tuseRoutePreloader([routeId], preload);\n\treturn React.useCallback(() => navigate?.(routeId, elementId), [\n\t\tnavigate,\n\t\telementId,\n\t\trouteId\n\t]);\n}\n\n//#endregion\n//#region ../../library/src/router/logIfPopstateBug.ts\nlet bugExistenceChecked = false;\n/**\n* This function logs if the popstate gets called synchronously during pushState(). This was originally a bug\n* in Chrome 102-127 [1]. We’ve kept it around as a canary [2].\n* [1] https://issues.chromium.org/issues/352436133\n* [2] https://framer-team.slack.com/archives/C05V49Q4NJ2/p1783621965472889\n*/\nfunction logIfPopstateCalledSynchronously() {\n\tif (bugExistenceChecked) return;\n\tbugExistenceChecked = true;\n\tlet popstateCalled = false;\n\tconst popstateListener = () => {\n\t\tpopstateCalled = true;\n\t};\n\twindow.addEventListener(\"popstate\", popstateListener, { once: true });\n\tqueueMicrotask(() => {\n\t\twindow.removeEventListener(\"popstate\", popstateListener);\n\t\tif (popstateCalled) {\n\t\t\tconst msg = \"Popstate called synchronously during pushState(). Please report this to the Framer team.\";\n\t\t\tconsole.error(msg);\n\t\t\tsendTrackingEvent(\"published_site_load_recoverable_error\", { message: msg });\n\t\t}\n\t});\n}\n\n//#endregion\n//#region ../../library/src/router/pageEffects/PageEffectsContext.tsx\nconst defaultSitePageEffects = {\n\tglobal: void 0,\n\troutes: {}\n};\nconst PageEffectsContext = /* @__PURE__ */ React.createContext(defaultSitePageEffects);\nfunction PageEffectsProvider({ children, value }) {\n\treturn /* @__PURE__ */ jsx(PageEffectsContext.Provider, {\n\t\tvalue,\n\t\tchildren\n\t});\n}\nfunction usePageEffects() {\n\treturn React.useContext(PageEffectsContext);\n}\n\n//#endregion\n//#region ../../library/src/router/pageEffects/getPageEffect.ts\nfunction getPageEffectForRoute(currentRouteId, nextRouteId, { global, routes }) {\n\treturn routes[currentRouteId]?.[nextRouteId] || global;\n}\n\n//#endregion\n//#region ../../library/src/router/pageEffects/cssGeneration/linearEasing.ts\nconst step = 10;\nconst maxDuration$1 = 1e4;\nfunction createLinearEasing(generator) {\n\tlet time = step;\n\tlet state = generator.next(0);\n\tconst keyframes = [state.value];\n\twhile (!state.done && time < maxDuration$1) {\n\t\tstate = generator.next(time);\n\t\tkeyframes.push(state.value);\n\t\ttime += step;\n\t}\n\t/**\n\t* If generating an animation that didn't actually move,\n\t* generate a second keyframe so we have an origin and target.\n\t*/\n\tif (keyframes.length === 1) keyframes.push(state.value);\n\treturn {\n\t\teasing: `linear(${keyframes.join(\",\")})`,\n\t\tduration: time - step\n\t};\n}\n\n//#endregion\n//#region ../../library/src/router/pageEffects/cssGeneration/masks.ts\nconst cssVariable = (name) => `--view-transition-${name}`;\nfunction parseUnit(value) {\n\treturn [parseFloat(value), value.endsWith(\"px\") ? \"px\" : \"%\"];\n}\nfunction calcMaskPosition(mask) {\n\tconst { innerWidth, innerHeight } = window;\n\tconst [x, xUnit] = parseUnit(mask.x);\n\tconst [y, yUnit] = parseUnit(mask.y);\n\treturn {\n\t\tx: xUnit === \"px\" ? x : innerWidth * (x / 100),\n\t\ty: yUnit === \"px\" ? y : innerHeight * (y / 100)\n\t};\n}\n/**\n* The distance from the near edge to the far edge along one axis, keeping the\n* authored unit so the value resolves against the pseudo-element's own box.\n* Chrome (unlike Firefox/Safari) no longer treats absolute pixel offsets baked\n* from `window.innerWidth`/`innerHeight` as relative to the view-transition\n* snapshot box, which anchored circle/inset masks to the top-left corner.\n*/\nfunction complementaryOffset(value) {\n\tconst [amount, unit] = parseUnit(value);\n\treturn unit === \"px\" ? `calc(100% - ${amount}px)` : `${100 - amount}%`;\n}\nconst conic = {\n\tmakeKeyframe: (mask, progress, page) => {\n\t\tlet percentage = 0;\n\t\tif (page === \"exit\" && mask.angularDirection === \"clockwise\" && progress === \"start\" || page === \"exit\" && mask.angularDirection === \"counter-clockwise\" && progress === \"end\" || page === \"enter\" && mask.angularDirection === \"counter-clockwise\" && progress === \"start\" || page === \"enter\" && mask.angularDirection === \"clockwise\" && progress === \"end\") percentage = mask.sweepAngle / 360 * 100;\n\t\treturn `${cssVariable(\"conic-offset\")}: ${percentage}%;`;\n\t},\n\tmakeStyles: (mask, page) => {\n\t\tconst offsetToken = `var(${cssVariable(\"conic-offset\")})`;\n\t\tconst isTransparentToBlack = page === \"exit\" && mask.angularDirection === \"clockwise\" || page === \"enter\" && mask.angularDirection === \"counter-clockwise\";\n\t\tconst firstColor = isTransparentToBlack ? \"transparent\" : \"black\";\n\t\tconst secondColor = isTransparentToBlack ? \"black\" : \"transparent\";\n\t\tlet gradient = `conic-gradient(from `;\n\t\tgradient += `${mask.angle}deg at ${mask.x} ${mask.y}, `;\n\t\tgradient += `${firstColor} 0%, ${firstColor} ${offsetToken}, `;\n\t\tgradient += `${secondColor} ${offsetToken}, ${secondColor} 100%)`;\n\t\treturn `mask-image: ${gradient}; -webkit-mask-image: ${gradient};`;\n\t},\n\tmakePropertyRules: () => `\n        @property ${cssVariable(\"conic-offset\")} {\n            syntax: '<percentage>';\n            initial-value: 0%;\n            inherits: false;\n        }\n    `\n};\n/**\n* The distance from the anchor to the furthest viewport corner, i.e. the radius\n* at which the reveal circle fully covers the page.\n*/\nfunction circleCoverRadius(mask) {\n\tconst { x, y } = calcMaskPosition(mask);\n\treturn Math.hypot(Math.max(x, window.innerWidth - x), Math.max(y, window.innerHeight - y));\n}\n/**\n* Reveal the circle via a `mask-image` radial-gradient driven by a registered\n* `@property` progress number, mirroring the `conic`/`blinds`/`wipe` masks,\n* instead of animating `clip-path`. `clip-path` is not compositor-accelerated,\n* so it drifts out of sync with the `transform`/`opacity` of the same\n* view-transition snapshot (browser-dependent); the property-driven gradient\n* stays locked to the shared animation timeline.\n*/\nconst circle = {\n\tmakeKeyframe: (_mask, progress) => {\n\t\treturn `${cssVariable(\"circle-progress\")}: ${progress === \"start\" ? 0 : 1};`;\n\t},\n\tmakeStyles: (mask) => {\n\t\tconst edge = `calc(100% * ${`var(${cssVariable(\"circle-progress\")})`})`;\n\t\tconst gradient = `radial-gradient(circle ${circleCoverRadius(mask)}px at ${mask.x} ${mask.y}, black ${edge}, transparent ${edge})`;\n\t\treturn `mask-image: ${gradient}; -webkit-mask-image: ${gradient};`;\n\t},\n\tmakePropertyRules: () => `\n        @property ${cssVariable(\"circle-progress\")} {\n            syntax: '<number>';\n            initial-value: 0;\n            inherits: false;\n        }\n    `\n};\nconst inset = { makeKeyframe: (mask, progress) => {\n\treturn progress === \"start\" ? `clip-path: inset(${mask.y} ${complementaryOffset(mask.x)} ${complementaryOffset(mask.y)} ${mask.x} round ${mask.round}px);` : `clip-path: inset(0 round 0);`;\n} };\nconst blinds = {\n\tmakeKeyframe: (mask, progress, page) => {\n\t\tconst [, unit] = parseUnit(mask.width);\n\t\tlet width = `0${unit}`;\n\t\tif (progress === \"start\" && page === \"exit\" || progress === \"end\" && page === \"enter\") width = mask.width;\n\t\treturn `${cssVariable(\"blinds-width\")}: ${width};`;\n\t},\n\tmakeStyles: (mask, page) => {\n\t\tconst widthToken = `var(${cssVariable(\"blinds-width\")})`;\n\t\tconst firstColor = page === \"exit\" ? \"transparent\" : \"black\";\n\t\tconst secondColor = page === \"exit\" ? \"black\" : \"transparent\";\n\t\tlet gradient = `repeating-linear-gradient(`;\n\t\tgradient += mask.angle + 90 + \"deg, \";\n\t\tgradient += `${firstColor} 0px, ${firstColor} ${widthToken}, `;\n\t\tgradient += `${secondColor} ${widthToken}, ${secondColor} ${mask.width})`;\n\t\treturn `mask-image: ${gradient}; -webkit-mask-image: ${gradient};`;\n\t},\n\tmakePropertyRules: () => {\n\t\treturn `\n            @property ${cssVariable(\"blinds-width\")} {\n                syntax: '<length-percentage>';\n                initial-value: 0px;\n                inherits: false;\n            }\n        `;\n\t}\n};\nconst wipe = {\n\tmakeKeyframe: (_mask, progress, page) => {\n\t\tconst offset = progress === \"start\" && page === \"exit\" || progress === \"end\" && page === \"enter\" ? 1 : 0;\n\t\treturn `${cssVariable(\"wipe-offset\")}: ${offset};`;\n\t},\n\tmakeStyles: (mask, page) => {\n\t\tconst offsetToken = `var(${cssVariable(\"wipe-offset\")})`;\n\t\tconst firstColor = page === \"exit\" ? \"transparent\" : \"black\";\n\t\tconst secondColor = page === \"exit\" ? \"black\" : \"transparent\";\n\t\tlet gradient = `linear-gradient(`;\n\t\tgradient += mask.angle + 90 + \"deg, \";\n\t\tgradient += `${firstColor} calc(calc(0% - ${mask.width}) + calc(calc(100% + ${mask.width}) * ${offsetToken})), `;\n\t\tgradient += `${secondColor} calc(calc(100% + ${mask.width}) * ${offsetToken}))`;\n\t\treturn `mask-image: ${gradient}; -webkit-mask-image: ${gradient};`;\n\t},\n\tmakePropertyRules: () => {\n\t\treturn `\n            @property ${cssVariable(\"wipe-offset\")} {\n                syntax: '<number>';\n                initial-value: 0;\n                inherits: false;\n            }\n        `;\n\t}\n};\nconst maskGenerators = {\n\tcircle,\n\tconic,\n\tinset,\n\tblinds,\n\twipe\n};\n\n//#endregion\n//#region ../../library/src/router/pageEffects/cssGeneration/page.ts\nconst restState = {\n\topacity: 1,\n\tx: \"0px\",\n\ty: \"0px\",\n\tscale: 1,\n\trotate: 0,\n\trotateX: 0,\n\trotateY: 0,\n\tmask: void 0\n};\nfunction valuesToCSSKeyframes(values, progress, page, maskGenerator) {\n\tlet keyframes = `\n      opacity: ${values.opacity};\n      transform: translate(${values.x}, ${values.y}) scale(${values.scale}) rotateX(${values.rotateX}deg) rotateY(${values.rotateY}deg) rotateZ(${values.rotate}deg);\n    `;\n\tif (values.mask) keyframes += maskGenerator?.makeKeyframe?.(values.mask, progress, page) || \"\";\n\treturn keyframes;\n}\nfunction getMaskGenerator(type) {\n\treturn type ? maskGenerators[type] : void 0;\n}\nfunction createPageTransitionRules(page, { transition, ...values }) {\n\tconst name = \"view-transition-\" + page;\n\tconst settings = {\n\t\tduration: \"0s\",\n\t\teasing: \"linear\"\n\t};\n\tif (transition.type === \"tween\") {\n\t\tsettings.duration = transition.duration + \"s\";\n\t\tsettings.easing = `cubic-bezier(${transition.ease.join(\",\")})`;\n\t} else if (isSpringTransition(transition)) {\n\t\tconst { easing, duration } = createLinearEasing(spring({\n\t\t\tkeyframes: [0, 1],\n\t\t\t...getSpringOptions(transition),\n\t\t\trestDelta: .001,\n\t\t\trestSpeed: 1e-4\n\t\t}));\n\t\tsettings.duration = duration + \"ms\";\n\t\tsettings.easing = easing;\n\t}\n\tconst maskGenerator = getMaskGenerator(values?.mask?.type);\n\tlet startKeyframes = valuesToCSSKeyframes(values, \"start\", page, maskGenerator);\n\tlet endKeyframes = valuesToCSSKeyframes({\n\t\t...restState,\n\t\tmask: values.mask\n\t}, \"end\", page, maskGenerator);\n\tif (page === \"exit\") [startKeyframes, endKeyframes] = [endKeyframes, startKeyframes];\n\treturn `\n        ${values.mask && maskGenerator?.makePropertyRules ? maskGenerator.makePropertyRules(values.mask) : \"\"}\n\n        @keyframes ${name} {\n            0% {\n                ${startKeyframes}\n            }\n\n            100% {\n                ${endKeyframes}\n            }\n        }\n\n        ::view-transition-${page === \"enter\" ? \"new\" : \"old\"}(root) {\n            animation-name: ${name};\n            animation-duration: ${settings.duration};\n            animation-delay: ${transition.delay}s;\n            animation-timing-function: ${settings.easing};\n            animation-fill-mode: both;\n            ${values.mask && maskGenerator?.makeStyles ? maskGenerator.makeStyles(values.mask, page) : \"\"}\n        }\n    `;\n}\nfunction isSpringTransition(transition) {\n\treturn transition.type === \"spring\";\n}\nfunction getSpringOptions(transition) {\n\tif (transition.durationBasedSpring) return {\n\t\tduration: transition.duration * 1e3,\n\t\tbounce: transition.bounce\n\t};\n\treturn {\n\t\tstiffness: transition.stiffness,\n\t\tdamping: transition.damping,\n\t\tmass: transition.mass\n\t};\n}\n\n//#endregion\n//#region ../../library/src/router/pageEffects/cssGeneration/index.ts\nconst VIEW_TRANSITION_STYLES_ID = \"view-transition-styles\";\nconst defaultPageTransition = {\n\tx: \"0px\",\n\ty: \"0px\",\n\tscale: 1,\n\topacity: 1,\n\trotate3d: false,\n\trotate: 0,\n\trotateX: 0,\n\trotateY: 0,\n\tmask: void 0,\n\ttransition: {\n\t\ttype: \"tween\",\n\t\tdelay: 0,\n\t\tduration: .2,\n\t\tease: [\n\t\t\t.27,\n\t\t\t0,\n\t\t\t.51,\n\t\t\t1\n\t\t],\n\t\tstiffness: 400,\n\t\tdamping: 30,\n\t\tmass: 1\n\t}\n};\nfunction createViewTransitionStylesheet({ exit = defaultPageTransition, enter }) {\n\tconst styleElement = document.createElement(\"style\");\n\tstyleElement.id = VIEW_TRANSITION_STYLES_ID;\n\tlet styleContent = `\n        @media (prefers-reduced-motion) {\n            ::view-transition-group(*),\n            ::view-transition-old(*),\n            ::view-transition-new(*) {\n                animation: none !important;\n            }\n        }\n    `;\n\tif (exit.mask || enter.mask || exit.opacity || enter.opacity || exit.transition.delay || enter.transition.delay) styleContent += `\n            ::view-transition-old(*),\n            ::view-transition-new(*) {\n                mix-blend-mode: normal;\n            }\n        `;\n\t/**\n\t* Disable backface visibility to better support 3D rotate.\n\t*/\n\tstyleContent += `\n        ::view-transition-old(*),\n        ::view-transition-new(*) {\n            backface-visibility: hidden;\n        }\n    `;\n\tstyleContent += createPageTransitionRules(\"exit\", exit);\n\tstyleContent += createPageTransitionRules(\"enter\", enter);\n\tstyleElement.textContent = styleContent;\n\tdocument.head.appendChild(styleElement);\n}\nfunction removeViewTransitionStylesheet() {\n\trequestIdleCallback(() => {\n\t\tframe.render(() => {\n\t\t\tperformance.mark(\"framer-vt-remove\");\n\t\t\tconst element = document.getElementById(VIEW_TRANSITION_STYLES_ID);\n\t\t\tif (element) document.head.removeChild(element);\n\t\t});\n\t});\n}\n\n//#endregion\n//#region ../../library/src/router/pageEffects/viewTransition.ts\nconst noop$3 = () => {};\nfunction supportsViewTransitions() {\n\treturn Boolean(document.startViewTransition);\n}\nfunction addVTStylesheetAfterInRender(effect) {\n\treturn new Promise((resolve) => {\n\t\tframe.render(() => {\n\t\t\tperformance.mark(\"framer-vt-style\");\n\t\t\tcreateViewTransitionStylesheet(effect);\n\t\t\tresolve();\n\t\t});\n\t});\n}\nasync function startViewTransition(updateView, effect, signal) {\n\tif (!supportsViewTransitions()) {\n\t\tupdateView();\n\t\treturn;\n\t}\n\tawait addVTStylesheetAfterInRender(effect);\n\tif (signal?.aborted) return;\n\tperformance.mark(\"framer-vt\");\n\tconst transition = document.startViewTransition(async () => {\n\t\tperformance.mark(\"framer-vt-freeze\");\n\t\tif (signal?.aborted) return;\n\t\telse signal?.addEventListener(\"abort\", () => transition.skipTransition());\n\t\tawait updateView();\n\t});\n\ttransition.updateCallbackDone.then(() => {\n\t\tperformance.mark(\"framer-vt-unfreeze\");\n\t}).catch(noop$3);\n\tPromise.all([transition.ready, transition.finished]).then(() => {\n\t\tperformance.mark(\"framer-vt-finished\");\n\t\tremoveViewTransitionStylesheet();\n\t}).catch(noop$3);\n\treturn transition;\n}\n\n//#endregion\n//#region ../../library/src/router/pageEffects/useViewTransition.ts\nfunction useViewTransition() {\n\tconst sitePageEffects = usePageEffects();\n\tconst resolveHasPainted = useRef(void 0);\n\tuseEffect(() => {\n\t\tif (resolveHasPainted.current) {\n\t\t\tresolveHasPainted.current();\n\t\t\tresolveHasPainted.current = void 0;\n\t\t}\n\t});\n\treturn useCallback((currentRouteId, nextRouteId, update, signal) => {\n\t\tconst pageEffect = getPageEffectForRoute(currentRouteId, nextRouteId, sitePageEffects);\n\t\tif (pageEffect) {\n\t\t\tconst hasPainted = new Promise((resolve) => {\n\t\t\t\tresolveHasPainted.current = resolve;\n\t\t\t});\n\t\t\treturn startViewTransition(async () => {\n\t\t\t\tupdate();\n\t\t\t\tawait hasPainted;\n\t\t\t}, pageEffect, signal);\n\t\t}\n\t\tupdate();\n\t}, [sitePageEffects]);\n}\n\n//#endregion\n//#region ../../library/src/router/routerDomUtils.ts\n/**\n* Updated the canonical meta tag, so that browsers use the correct URL for the share sheet - https://github.com/framer/company/issues/29317\n*/\nfunction updateCanonicalURL(url, prevUrl) {\n\trequestIdleCallback(() => {\n\t\tconst canonical = document.querySelector(\"link[rel='canonical']\");\n\t\tif (!canonical) return;\n\t\tconst newURL = new URL(url, prevUrl);\n\t\tnewURL.search = \"\";\n\t\tcanonical.setAttribute(\"href\", newURL.toString());\n\t});\n}\nfunction syncGeneratedCanonicalURL(url, prevUrl) {\n\trequestIdleCallback(() => {\n\t\tconst generatedCanonical = document.querySelector(`link[rel='canonical'][data-framer-generated-canonical]`);\n\t\tif (!url || document.querySelector(`link[rel='canonical']:not([data-framer-generated-canonical])`)) {\n\t\t\tgeneratedCanonical?.remove();\n\t\t\treturn;\n\t\t}\n\t\tconst newURL = new URL(url, prevUrl ?? document.baseURI);\n\t\tnewURL.search = \"\";\n\t\tnewURL.hash = \"\";\n\t\tconst canonical = generatedCanonical ?? document.createElement(\"link\");\n\t\tcanonical.setAttribute(\"rel\", \"canonical\");\n\t\tcanonical.setAttribute(\"data-framer-generated-canonical\", \"\");\n\t\tcanonical.setAttribute(\"href\", newURL.toString());\n\t\tdocument.head.append(canonical);\n\t});\n}\nfunction syncGeneratedHreflangLinks(links) {\n\trequestIdleCallback(() => {\n\t\tconst generatedLinks = Array.from(document.querySelectorAll(`link[rel='alternate'][hreflang][data-framer-generated-hreflang]`));\n\t\tif (document.querySelector(`link[rel='canonical']:not([data-framer-generated-canonical])`)) {\n\t\t\tfor (const link of generatedLinks) link.remove();\n\t\t\treturn;\n\t\t}\n\t\tconst generatedLinkByHrefLang = /* @__PURE__ */ new Map();\n\t\tfor (const link of generatedLinks) {\n\t\t\tconst hreflang = link.getAttribute(\"hreflang\");\n\t\t\tif (hreflang) generatedLinkByHrefLang.set(hreflang, link);\n\t\t}\n\t\tconst nextHrefLangs = /* @__PURE__ */ new Set();\n\t\tfor (const { href, hrefLang } of links) {\n\t\t\tnextHrefLangs.add(hrefLang);\n\t\t\tconst link = generatedLinkByHrefLang.get(hrefLang) ?? document.createElement(\"link\");\n\t\t\tlink.setAttribute(\"rel\", \"alternate\");\n\t\t\tlink.setAttribute(\"data-framer-generated-hreflang\", \"\");\n\t\t\tlink.setAttribute(\"href\", href);\n\t\t\tlink.setAttribute(\"hreflang\", hrefLang);\n\t\t\tdocument.head.append(link);\n\t\t}\n\t\tfor (const link of generatedLinks) {\n\t\t\tconst hrefLang = link.getAttribute(\"hreflang\");\n\t\t\tif (!hrefLang || !nextHrefLangs.has(hrefLang)) link.remove();\n\t\t}\n\t});\n}\n//! Credit to Astro | MIT License\nlet announceDiv;\nconst announceNavigation = () => {\n\tconst title = document.title;\n\tif (!title) return;\n\tif (document.ariaNotify) {\n\t\tdocument.ariaNotify(title, { priority: \"high\" });\n\t\treturn;\n\t}\n\tif (!announceDiv) {\n\t\tannounceDiv = document.createElement(\"div\");\n\t\tannounceDiv.setAttribute(\"aria-live\", \"assertive\");\n\t\tannounceDiv.setAttribute(\"aria-atomic\", \"true\");\n\t\tannounceDiv.style.position = \"absolute\";\n\t\tannounceDiv.style.transform = \"scale(0)\";\n\t\tdocument.body.append(announceDiv);\n\t}\n\tsetTimeout(() => {\n\t\tannounceDiv.textContent = title;\n\t}, 60);\n};\n\n//#endregion\n//#region ../../library/src/utils/useAfterPaintEffect.ts\n/**\n* Runs `fn` after the next paint. Similar to `useEffect`, but guarantees to run after the next paint (both cleanup and effect).\n* @see https://thoughtspile.github.io/2021/11/15/unintentional-layout-effect/ - use this when effects run after state updates in event handlers\n*\n* @param useEffectFn pass `useEffect` for less important updates (those will mostly run after the 2nd paint instead)\n*/\nfunction useAfterPaintEffect(effectFn, deps, options, useEffectFn = useLayoutEffect) {\n\tuseEffectFn(() => {\n\t\tconst runAfterPaint = async (fn) => {\n\t\t\tawait yieldToMain({\n\t\t\t\t...options,\n\t\t\t\tcontinueAfter: \"paint\"\n\t\t\t});\n\t\t\treturn fn();\n\t\t};\n\t\tconst runPromise = runAfterPaint(effectFn);\n\t\treturn () => {\n\t\t\t(async () => {\n\t\t\t\tconst cleanup = await runPromise;\n\t\t\t\tif (!cleanup) return;\n\t\t\t\trunAfterPaint(cleanup);\n\t\t\t})();\n\t\t};\n\t}, deps);\n}\n\n//#endregion\n//#region ../../library/src/router/useMonitorNextPaintAfterRender.ts\n/**\n* Monitor the length of time it takes for the component to rerender and paint.\n*/\nfunction useMonitorNextPaintAfterRender(label) {\n\tconst pendingPaintResolvers = useRef(/* @__PURE__ */ new Set());\n\tuseAfterPaintEffect(() => {\n\t\tfor (const resolve of pendingPaintResolvers.current) resolve();\n\t\tpendingPaintResolvers.current.clear();\n\t}, void 0, { priority: \"user-blocking\" });\n\treturn useCallback((measureDetail) => {\n\t\tlet resolveHasPainted;\n\t\tconst hasPainted = new Promise((resolve) => {\n\t\t\tresolveHasPainted = resolve;\n\t\t\tpendingPaintResolvers.current.add(resolve);\n\t\t});\n\t\tif (!label) return {\n\t\t\tpromise: hasPainted,\n\t\t\tmeasureDetail,\n\t\t\tignore: null\n\t\t};\n\t\tconst startLabel = `${label}-start`;\n\t\tconst endLabel = `${label}-end`;\n\t\tlet ignore = false;\n\t\tperformance.mark(startLabel);\n\t\thasPainted.finally(() => {\n\t\t\tif (ignore) return;\n\t\t\tperformance.mark(endLabel);\n\t\t\tperformance.measure(label, {\n\t\t\t\tstart: startLabel,\n\t\t\t\tend: endLabel,\n\t\t\t\tdetail: measureDetail\n\t\t\t});\n\t\t}).catch((e) => {\n\t\t\tconsole.error(e);\n\t\t});\n\t\treturn {\n\t\t\tpromise: hasPainted,\n\t\t\tmeasureDetail,\n\t\t\tignore: () => {\n\t\t\t\tignore = true;\n\t\t\t\tif (!resolveHasPainted) return;\n\t\t\t\tpendingPaintResolvers.current.delete(resolveHasPainted);\n\t\t\t\tresolveHasPainted();\n\t\t\t}\n\t\t};\n\t}, [label]);\n}\n\n//#endregion\n//#region ../../library/src/router/history.ts\nfunction isHistoryState(data) {\n\treturn isObject$1(data) && \"routeId\" in data;\n}\n/**\n* history.state is typed as `any` and can be null (e.g. native hash nav) or foreign state from\n* other scripts. Always narrow through this before treating a value as HistoryState.\n*/\nfunction readHistoryState(state = window.history.state) {\n\treturn isHistoryState(state) ? state : void 0;\n}\nfunction getEntryId(data) {\n\treturn data?.entryId;\n}\nlet lastKnownHistoryState;\nfunction setLastKnownHistoryState(state) {\n\tlastKnownHistoryState = state;\n}\nfunction getLastKnownHistoryState() {\n\treturn lastKnownHistoryState;\n}\nfunction createEntryId() {\n\treturn `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;\n}\nfunction withCurrentEntryId(data, previousState) {\n\treturn withEntryId(data, getEntryId(data) ?? getEntryId(previousState));\n}\nfunction withEntryId(data, entryId = createEntryId()) {\n\treturn {\n\t\t...data,\n\t\tentryId\n\t};\n}\nconst hasNavigationAPI = /* #__PURE__ */ (() => isWindow && typeof window.navigation?.back === \"function\")();\nconst isImpactedPopstateBugChromiumVersion = /* #__PURE__ */ (() => {\n\tif (typeof navigator === \"undefined\") return false;\n\tconst userAgent = navigator.userAgent;\n\tconst chromePos = userAgent.indexOf(\"Chrome/\");\n\tconst chromiumVersion = +userAgent.slice(chromePos + 7, userAgent.indexOf(\".\", chromePos));\n\treturn chromiumVersion > 101 && chromiumVersion < 128;\n})();\nconst useNavigationAPI = hasNavigationAPI && !isImpactedPopstateBugChromiumVersion && /* #__PURE__ */ (() => !isSafari())();\nfunction replaceHistoryState(data, url) {\n\tperformance.mark(\"framer-history-replace\");\n\tsetLastKnownHistoryState(withCurrentEntryId(data, readHistoryState()));\n\tif (url) updateCanonicalURL(url, window.location.href);\n\tconst replaceState = !url || url === window.location.href ? window.History.prototype.replaceState.bind(window.history) : window.history.replaceState.bind(window.history);\n\ttry {\n\t\treplaceState(lastKnownHistoryState, \"\", url);\n\t} catch {}\n}\nfunction repairHashHistoryState(data) {\n\tperformance.mark(\"framer-history-replace\");\n\tsetLastKnownHistoryState(withEntryId(data));\n\tHistory.prototype.replaceState.call(window.history, lastKnownHistoryState, \"\", void 0);\n}\n/**\n* Runs `callback` after any in-flight Navigation API transition settles. Directly calls callback is\n* not supported.\n* `replaceState` / `pushState` during an intercepted navigation aborts it in Chromium.\n*/\nfunction afterNavigationTransition(callback) {\n\tconst transition = window.navigation?.transition;\n\tif (!transition) {\n\t\tcallback();\n\t\treturn;\n\t}\n\tconst run = () => {\n\t\tconst currentTransition = window.navigation.transition;\n\t\tif (currentTransition && currentTransition !== transition) {\n\t\t\tafterNavigationTransition(callback);\n\t\t\treturn;\n\t\t}\n\t\tcallback();\n\t};\n\ttransition.finished.then(run, run);\n}\nfunction pushHistoryState(data, url) {\n\tperformance.mark(\"framer-history-push\");\n\tsetLastKnownHistoryState(withEntryId(data));\n\tupdateCanonicalURL(url, window.location.href);\n\tlogIfPopstateCalledSynchronously();\n\ttry {\n\t\twindow.history.pushState(lastKnownHistoryState, \"\", url);\n\t} catch {}\n}\nfunction useReplaceInitialState({ disabled, routeId, initialPathVariables, initialLocaleId, initialContentLocaleId, initialCanonicalPathVariables }) {\n\tuseLayoutEffect(() => {\n\t\tif (disabled) return;\n\t\tperformance.mark(\"framer-history-set-initial-state\");\n\t\tconst initialHash = window.location.hash ? window.location.hash.slice(1) : void 0;\n\t\treplaceHistoryState({\n\t\t\t...readHistoryState(),\n\t\t\trouteId,\n\t\t\thash: initialHash,\n\t\t\tpathVariables: initialPathVariables,\n\t\t\tlocaleId: initialLocaleId,\n\t\t\tcontentLocaleId: initialContentLocaleId,\n\t\t\tcanonicalPathVariables: initialCanonicalPathVariables\n\t\t});\n\t}, []);\n}\nfunction usePopStateHandler(scrollRestoration, currentRouteId, setCurrentRouteId) {\n\tconst startViewTransition = useViewTransition();\n\tconst monitorNextPaintAfterRender = useMonitorNextPaintAfterRender(\"framer-route-change\");\n\tconst { onHistoryTraversal, usesCustomScrollRestoration } = scrollRestoration;\n\tconst scrollRestorationForFramerTraversal = usesCustomScrollRestoration ? \"manual\" : \"after-transition\";\n\tconst viewTransitionReady = useRef(void 0);\n\tconst resolvePendingTraversal = useCallback(() => {\n\t\tviewTransitionReady.current?.resolve();\n\t\tviewTransitionReady.current = void 0;\n\t}, []);\n\tconst popStateHandler = useCallback(async ({ state }) => {\n\t\tif (!isHistoryState(state)) return;\n\t\tconst nextRender = monitorNextPaintAfterRender({ popstate: true });\n\t\tconst stopMonitoringINPRelatedInputs = monitorINPRelatedInputs();\n\t\tnextRender.promise.finally(stopMonitoringINPRelatedInputs);\n\t\tif (getEntryId(getLastKnownHistoryState()) !== (getEntryId(state) ?? getEntryId(readHistoryState()))) onHistoryTraversal();\n\t\tsetLastKnownHistoryState(state);\n\t\tconst { routeId, hash, pathVariables, localeId, contentLocaleId, canonicalPathVariables } = state;\n\t\tconst resolvedHash = isString(hash) ? hash : window.location.hash ? window.location.hash.slice(1) : void 0;\n\t\tlet didStartRouteChange = false;\n\t\tconst changeRoute = () => {\n\t\t\tif (didStartRouteChange) return;\n\t\t\tsetCurrentRouteId(routeId, isString(localeId) ? localeId : void 0, resolvedHash, window.location.pathname + window.location.search + window.location.hash, isObject$1(pathVariables) ? pathVariables : void 0, contentLocaleId, canonicalPathVariables, true, nextRender, false);\n\t\t\tdidStartRouteChange = true;\n\t\t};\n\t\tconst usesNativeScrollRestoration = scrollRestorationForFramerTraversal === \"after-transition\";\n\t\tawait Promise.resolve(startViewTransition(currentRouteId.current, routeId, changeRoute)).then((viewTransition) => viewTransition?.updateCallbackDone).catch(changeRoute).finally(() => {\n\t\t\tif (!usesNativeScrollRestoration) resolvePendingTraversal();\n\t\t});\n\t\tawait nextRender.promise;\n\t\tif (usesNativeScrollRestoration) resolvePendingTraversal();\n\t\tawait window.navigation?.transition?.finished.catch(noop$5);\n\t\tannounceNavigation();\n\t\tupdateCanonicalURL(window.location.href);\n\t}, [\n\t\tcurrentRouteId,\n\t\tmonitorNextPaintAfterRender,\n\t\tonHistoryTraversal,\n\t\tresolvePendingTraversal,\n\t\tsetCurrentRouteId,\n\t\tstartViewTransition,\n\t\tscrollRestorationForFramerTraversal\n\t]);\n\tconst traversalHandler = useCallback((event) => {\n\t\tif (event.navigationType !== \"traverse\" || !event.canIntercept) return;\n\t\tconst destinationState = event.destination?.getState();\n\t\tif (!isHistoryState(destinationState)) return;\n\t\tevent.intercept({\n\t\t\tasync handler() {\n\t\t\t\tawait new Promise((resolve, reject) => {\n\t\t\t\t\tviewTransitionReady.current = {\n\t\t\t\t\t\tresolve,\n\t\t\t\t\t\treject\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t\t\tviewTransitionReady.current = void 0;\n\t\t\t},\n\t\t\tscroll: scrollRestorationForFramerTraversal\n\t\t});\n\t}, [scrollRestorationForFramerTraversal]);\n\tuseEffect(() => {\n\t\twindow.addEventListener(\"popstate\", popStateHandler);\n\t\tif (useNavigationAPI) window.navigation.addEventListener(\"navigate\", traversalHandler);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"popstate\", popStateHandler);\n\t\t\tif (useNavigationAPI) window.navigation.removeEventListener(\"navigate\", traversalHandler);\n\t\t};\n\t}, [popStateHandler, traversalHandler]);\n}\n/**\n* Pages and CMS items can be excluded from a locale. Customers can add server-side\n* redirects for these paths. If one exists, use a full-page navigation to follow it\n* instead of rendering the missing page client-side.\n*/\nasync function handleRedirectForMissingPage(path) {\n\tif ((await fetch(path, {\n\t\tmethod: \"HEAD\",\n\t\tredirect: \"manual\"\n\t})).type === \"opaqueredirect\") {\n\t\twindow.location.href = window.location.origin + path;\n\t\treturn true;\n\t}\n\treturn false;\n}\nfunction useSwitchLocale() {\n\tconst collectionUtils = useCollectionUtils();\n\treturn useCallback((options) => {\n\t\treturn switchLocale({\n\t\t\t...options,\n\t\t\tcollectionUtils\n\t\t});\n\t}, [collectionUtils]);\n}\nasync function switchLocale({ sitePrefix, ...options }) {\n\tconst result = await getLocalizedNavigationPath(options);\n\tif (!result) return;\n\ttry {\n\t\tlocalStorage.preferredLocale = options.nextLocale.code;\n\t} catch {}\n\ttry {\n\t\tif (!isString(result.path)) throw new Error(\"Expected result.path to be a string\");\n\t\tif (result.isMissingInLocale || options.route.includedLocales && !options.route.includedLocales.includes(options.nextLocale.id)) {\n\t\t\tif (await handleRedirectForMissingPage(sitePrefix + result.path)) return;\n\t\t}\n\t} catch {}\n\treturn result;\n}\nfunction pushLoadMoreHistory(hash, paginationInfo) {\n\tconst scheduledEntryId = getEntryId(readHistoryState());\n\tif (!scheduledEntryId) return;\n\tafterNavigationTransition(() => {\n\t\tconst currentHistoryState = readHistoryState();\n\t\tif (!currentHistoryState) return;\n\t\tif (getEntryId(currentHistoryState) !== scheduledEntryId) return;\n\t\tconst newPaginationInfo = {\n\t\t\t...currentHistoryState.paginationInfo,\n\t\t\t[hash]: paginationInfo\n\t\t};\n\t\treplaceHistoryState({\n\t\t\t...currentHistoryState,\n\t\t\tpaginationInfo: newPaginationInfo\n\t\t});\n\t});\n}\n/**\n* Commits the URL while installing a Navigation API interceptor whose native loading indicator\n* and scroll behavior stay active until `promise` settles.\n*/\nfunction useCommitNavigationURL(usesCustomScrollRestoration) {\n\tconst navigationPromise = useRef(Promise.resolve());\n\tconst navigationController = useRef();\n\tconst navigateListener = useCallback((navigateEvent) => {\n\t\tif (navigateEvent.navigationType === \"traverse\" || !navigateEvent.canIntercept) return;\n\t\tconst controller = navigationController.current;\n\t\tcontroller?.signal.addEventListener(\"abort\", () => {\n\t\t\tcontroller.abort(\"user aborted\");\n\t\t});\n\t\tnavigateEvent.intercept({\n\t\t\thandler: () => navigationPromise.current,\n\t\t\tscroll: usesCustomScrollRestoration ? \"manual\" : \"after-transition\"\n\t\t});\n\t}, [usesCustomScrollRestoration]);\n\treturn useCallback((promise, controller, updateURL) => {\n\t\tif (!useNavigationAPI) {\n\t\t\tupdateURL?.();\n\t\t\treturn;\n\t\t}\n\t\tnavigationPromise.current = promise;\n\t\tnavigationController.current = controller;\n\t\twindow.navigation.addEventListener(\"navigate\", navigateListener);\n\t\tupdateURL?.();\n\t\tpromise.finally(() => {\n\t\t\tif (navigationPromise.current !== promise) return;\n\t\t\tnavigationController.current = void 0;\n\t\t\twindow.navigation.removeEventListener(\"navigate\", navigateListener);\n\t\t});\n\t}, [navigateListener]);\n}\n\n//#endregion\n//#region ../../library/src/utils/slugify.ts\nconst unsafeSlugCharactersRegExp = /[\\s?#[\\]@!$&'*+,;:=\"<>%{}|\\\\^`/]+/gu;\n/**\n* Trim leading and trailing dashes from a string.\n* We can't use a regexp, because matching e.g. /-+$/gu leads to polynomial backtracking with e.g. '-'.repeat(54773) + '\\x00-'\n*/\nfunction trimDashes(str) {\n\tlet start = 0;\n\tlet end = str.length;\n\twhile (start < end && str[start] === \"-\") start++;\n\twhile (end > start && str[end - 1] === \"-\") end--;\n\treturn str.slice(start, end);\n}\n/**\n* Takes a freeform string and converts it to a URL-safe slug.\n* Replaces problematic URL characters and combinations with dashes while preserving:\n* - Unicode letters and numbers\n* - Unicode symbols (±, §, etc.)\n* - URL-safe punctuation: - . ~ ( ) _\n*/\nfunction slugify(value) {\n\treturn trimDashes(value.trim().toLowerCase().replace(unsafeSlugCharactersRegExp, \"-\"));\n}\n\n//#endregion\n//#region ../../library/src/modules/NodeIdContext.tsx\n/**\n* React context used to track the current node ID in the component hierarchy.\n* This is used by the `useTracking` hook to associate events with specific nodes.\n* @internal\n*/\nconst NodeIdContext = /* @__PURE__ */ React.createContext(null);\n\n//#endregion\n//#region ../../library/src/modules/useTracking.ts\n/**\n* React hook for tracking custom events on published Framer sites.\n*\n* @returns {TrackCustomEvent} Function that sends tracking events with valid IDs.\n* Throws an error if the tracking ID is invalid.\n*\n* Tracking ID rules:\n* - Lowercase letters (a-z) and numbers (0-9) only\n* - Hyphens (-) as separators (no leading/trailing or consecutive hyphens)\n* - Valid: \"button-click\", \"form-submit\", \"video-play\", \"nav-item-1\"\n* - Invalid: \"Button-Click\", \"form--submit\", \"-button-click\", \"button_utils\"\n*\n* @example\n*\n* ```\n* function MyButton() {\n*     const trackEvent = useTracking()\n*     return <button onClick={() => trackEvent(\"button-click\")}>Click me</button>\n* }\n* ```\n*\n* @public\n*/\nfunction useTracking() {\n\tconst router = useRouter();\n\tconst nodeId = useContext(NodeIdContext);\n\treturn useCallback((trackingId) => {\n\t\tif (!router.pageviewEventData?.current) return;\n\t\tif (!isValidTrackingId(trackingId)) throw new Error(`Invalid tracking ID: ${trackingId}`);\n\t\tif (router.pageviewEventData.current instanceof Promise) router.pageviewEventData.current.then((eventData) => sendCustomTrackingEvent(eventData, nodeId, trackingId));\n\t\telse sendCustomTrackingEvent(router.pageviewEventData.current, nodeId, trackingId);\n\t}, [router, nodeId]);\n}\nfunction sendCustomTrackingEvent(eventData, nodeId, trackingId) {\n\tsendTrackingEvent(\"published_site_custom_event\", {\n\t\t...eventData,\n\t\tnodeId,\n\t\ttrackingId: trackingId || null\n\t}, \"eager\");\n}\n\n//#endregion\n//#region ../../library/src/modules/RenderTargetEnvironmentContext.tsx\nconst RenderTargetEnvironmentContext = /* @__PURE__ */ (() => {\n\tconst Context = createContext(\"preview\");\n\tContext.displayName = \"RenderTargetEnvironmentContext\";\n\treturn Context;\n})();\n/**\n* @internal\n*/\nfunction RenderTargetEnvironmentProvider({ children, value }) {\n\treturn /* @__PURE__ */ jsx(RenderTargetEnvironmentContext.Provider, {\n\t\tvalue,\n\t\tchildren\n\t});\n}\n/**\n* Returns whether the current RenderTarget is the in-app preview or the live site.\n*\n* @internal\n*/\nfunction useRenderTargetEnvironment() {\n\treturn useContext(RenderTargetEnvironmentContext);\n}\n\n//#endregion\n//#region ../../library/src/useIsomorphicLayoutEffect.ts\n/**\n* Swaps `useLayoutEffect` for `useEffect` on the server to avoid React warnings.\n* NOTE! The effect won't run on the server.\n*/\nconst useIsomorphicLayoutEffect$1 = typeof document !== \"undefined\" ? useLayoutEffect : useEffect;\n\n//#endregion\n//#region ../../library/src/utils/useMemoOne.ts\n/**\n* Like React.useMemo, but guarantees that it isn't garbage collected in the future.\n* Use this over the native `useMemo` when the memo ensures correctness.\n* If the memo is only intended as performance optimization (to prevent re-renders), use `useMemo` instead.\n*\n* @see React.useMemo\n* @see https://github.com/facebook/react/issues/15278 for why React.useMemo might be garbage collected in the future\n* @see https://bsky.app/profile/gsathya.bsky.social/post/3lbjz4g3czc2t\n*\n* Based on https://github.com/alexreardon/use-memo-one/blob/529e418f986d5401b4813bd6882884d5bfc0268d/src/index.js.\n*/\nfunction useMemoOne(factory, inputs) {\n\tconst initial = useState(() => ({\n\t\tinputs,\n\t\tresult: factory()\n\t}))[0];\n\tconst isFirstRun = useRef(true);\n\tconst committed = useRef(initial);\n\tconst cache = isFirstRun.current || Boolean(inputs && committed.current.inputs && isEqual(inputs, committed.current.inputs, false)) ? committed.current : {\n\t\tinputs,\n\t\tresult: factory()\n\t};\n\tuseEffect(() => {\n\t\tisFirstRun.current = false;\n\t\tcommitted.current = cache;\n\t}, [cache]);\n\treturn cache.result;\n}\nfunction useCallbackOne(callback, inputs) {\n\treturn useMemoOne(() => callback, inputs);\n}\n\n//#endregion\n//#region ../../library/src/router/queryParameters.tsx\nconst urlSearchStringSubscribers = /* @__PURE__ */ new Set();\nfunction getURLSearchStringSnapshot() {\n\treturn window.location.search;\n}\nfunction getServerURLSearchStringSnapshot() {\n\treturn \"\";\n}\nfunction subscribeToURLSearchString(callback) {\n\turlSearchStringSubscribers.add(callback);\n\twindow.addEventListener(\"popstate\", callback);\n\treturn () => {\n\t\turlSearchStringSubscribers.delete(callback);\n\t\twindow.removeEventListener(\"popstate\", callback);\n\t};\n}\nfunction notifyURLSearchStringSubscribers() {\n\tfor (const subscriber of urlSearchStringSubscribers) subscriber();\n}\nconst URLSearchParamsContext = /* @__PURE__ */ (() => {\n\tconst Context = createContext({\n\t\turlSearchParams: new URLSearchParams(),\n\t\treplaceSearchParams: async () => {}\n\t});\n\tContext.displayName = \"URLSearchParamsContext\";\n\treturn Context;\n})();\nfunction URLSearchParamsProvider({ children, routerRenderKey, isNavigationCommitPending }) {\n\tconst isPreview = useRenderTargetEnvironment() === \"preview\";\n\tconst [previewURLSearchString, setPreviewURLSearchString] = useState(\"\");\n\tconst committedRouterRenderKeyRef = useRef(routerRenderKey);\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tcommittedRouterRenderKeyRef.current = routerRenderKey;\n\t}, [routerRenderKey]);\n\tconst siteURLSearchString = useSyncExternalStore(subscribeToURLSearchString, getURLSearchStringSnapshot, getServerURLSearchStringSnapshot);\n\tconst deferredURLSearchString = useDeferredValue(siteURLSearchString);\n\tconst isUrgentRouterRender = routerRenderKey !== useDeferredValue(routerRenderKey);\n\tconst urlSearchString = isPreview ? previewURLSearchString : isUrgentRouterRender ? siteURLSearchString : deferredURLSearchString;\n\tconst replaceSearchParams = useCallback(async (replacer) => {\n\t\tif (isPreview) {\n\t\t\tstartTransition(() => {\n\t\t\t\tsetPreviewURLSearchString((currentSearchString) => {\n\t\t\t\t\treturn replacer(new URLSearchParams(currentSearchString)).toString();\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst startedDuringPendingNavigation = isNavigationCommitPending();\n\t\tconst scheduledRouterRenderKey = routerRenderKey;\n\t\tawait yieldToMain({ continueAfter: \"paint\" });\n\t\tif (startedDuringPendingNavigation || isNavigationCommitPending() || committedRouterRenderKeyRef.current !== scheduledRouterRenderKey) return;\n\t\tconst currentHistoryState = readHistoryState();\n\t\tif (!currentHistoryState) return;\n\t\tconst url = new URL(window.location.href);\n\t\tconst newSearchString = replacer(url.searchParams).toString();\n\t\turl.search = newSearchString;\n\t\tconst originalSearch = currentHistoryState.queryParamBackAnchorSearch;\n\t\tconst currentSearch = window.location.search.slice(1);\n\t\tconst isFirstFilterChange = originalSearch === void 0 && newSearchString !== currentSearch;\n\t\tconst filtersCleared = originalSearch !== void 0 && newSearchString === originalSearch;\n\t\tconst nextHistoryState = {\n\t\t\t...currentHistoryState,\n\t\t\tqueryParamBackAnchorSearch: filtersCleared ? void 0 : originalSearch ?? (isFirstFilterChange ? currentSearch : void 0)\n\t\t};\n\t\tconst urlString = url.toString();\n\t\tif (isFirstFilterChange || filtersCleared) pushHistoryState(nextHistoryState, urlString);\n\t\telse replaceHistoryState(nextHistoryState, urlString);\n\t\tnotifyURLSearchStringSubscribers();\n\t}, [\n\t\tisNavigationCommitPending,\n\t\tisPreview,\n\t\trouterRenderKey\n\t]);\n\tconst value = useMemoOne(() => ({\n\t\turlSearchParams: new URLSearchParams(urlSearchString),\n\t\treplaceSearchParams\n\t}), [urlSearchString, replaceSearchParams]);\n\treturn /* @__PURE__ */ jsx(URLSearchParamsContext.Provider, {\n\t\tvalue,\n\t\tchildren\n\t});\n}\nfunction useStringArrayQueryParam({ parameterName }) {\n\tconst parameterNameRef = useRef(parameterName);\n\tconst { urlSearchParams, replaceSearchParams } = useContext(URLSearchParamsContext);\n\treturn [useMemo(() => {\n\t\treturn urlSearchParams.getAll(parameterNameRef.current);\n\t}, [urlSearchParams]), useCallback(async (newValues) => {\n\t\tif (!isArray(newValues)) return;\n\t\tawait replaceSearchParams((currentSearchParams) => {\n\t\t\tconst name = parameterNameRef.current;\n\t\t\tconst next = new URLSearchParams();\n\t\t\tlet inserted = false;\n\t\t\tfor (const [key, originalValue] of currentSearchParams.entries()) {\n\t\t\t\tif (key !== name) {\n\t\t\t\t\tnext.append(key, originalValue);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (inserted) continue;\n\t\t\t\tinserted = true;\n\t\t\t\tfor (const newValue of newValues) {\n\t\t\t\t\tif (!isString(newValue)) continue;\n\t\t\t\t\tnext.append(name, newValue);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!inserted) for (const newValue of newValues) {\n\t\t\t\tif (!isString(newValue)) continue;\n\t\t\t\tnext.append(name, newValue);\n\t\t\t}\n\t\t\treturn next;\n\t\t});\n\t}, [replaceSearchParams])];\n}\nfunction useStringQueryParam({ initialValue, parameterName, optional }) {\n\tconst initialValueRef = useRef(optional ? void 0 : isString(initialValue) ? initialValue : \"\");\n\tconst [arrayValue, setArrayValue] = useStringArrayQueryParam({ parameterName });\n\treturn [useMemo(() => {\n\t\tif (arrayValue.length === 0) return initialValueRef.current;\n\t\treturn arrayValue[0] ?? \"\";\n\t}, [arrayValue]), useCallback(async (newValue) => {\n\t\tif (newValue === initialValueRef.current) return setArrayValue(EMPTY_ARRAY);\n\t\tif (!isString(newValue)) return;\n\t\treturn setArrayValue([newValue]);\n\t}, [setArrayValue])];\n}\nconst BOOLEAN_YES = \"yes\";\nconst BOOLEAN_NO = \"no\";\nfunction useBooleanQueryParam({ initialValue, parameterName, optional }) {\n\tconst initialValueRef = useRef(optional ? void 0 : initialValue ? BOOLEAN_YES : BOOLEAN_NO);\n\tconst [stringValue, setStringValue] = useStringQueryParam({\n\t\tinitialValue: initialValueRef.current,\n\t\tparameterName,\n\t\toptional\n\t});\n\treturn [useMemo(() => {\n\t\tif (stringValue === BOOLEAN_YES) return true;\n\t\tif (stringValue === BOOLEAN_NO) return false;\n\t\tif (isUndefined(stringValue)) return void 0;\n\t\tif (initialValueRef.current === BOOLEAN_YES) return true;\n\t\tif (initialValueRef.current === BOOLEAN_NO) return false;\n\t}, [stringValue]), useCallback(async (newValue) => {\n\t\tif (isUndefined(newValue)) return setStringValue(void 0);\n\t\tif (!isBoolean(newValue)) return;\n\t\treturn setStringValue(newValue ? BOOLEAN_YES : BOOLEAN_NO);\n\t}, [setStringValue])];\n}\nfunction parseNumberQueryParam(value) {\n\tconst includesComma = value.includes(\",\");\n\tconst includesDot = value.includes(\".\");\n\tif (includesComma && includesDot) return void 0;\n\tconst normalizedValue = includesComma ? value.replace(\",\", \".\") : value;\n\tconst parsed = Number(normalizedValue);\n\tif (!isNumber(parsed)) return void 0;\n\treturn parsed;\n}\nfunction serializeNumberQueryParam(value) {\n\treturn String(value);\n}\nfunction useNumberQueryParam({ initialValue, parameterName, optional }) {\n\tconst initialNumberValueRef = useRef(optional ? void 0 : isNumber(initialValue) ? initialValue : 0);\n\tconst [stringValue, setStringValue] = useStringQueryParam({\n\t\tinitialValue: useRef(isNumber(initialNumberValueRef.current) ? serializeNumberQueryParam(initialNumberValueRef.current) : void 0).current,\n\t\tparameterName,\n\t\toptional\n\t});\n\treturn [useMemo(() => {\n\t\tif (isUndefined(stringValue)) return void 0;\n\t\tconst parsed = parseNumberQueryParam(stringValue);\n\t\tif (isNumber(parsed)) return parsed;\n\t\treturn initialNumberValueRef.current;\n\t}, [stringValue]), useCallback(async (newValue) => {\n\t\tif (!isNumber(newValue)) return setStringValue(void 0);\n\t\treturn setStringValue(serializeNumberQueryParam(newValue));\n\t}, [setStringValue])];\n}\nconst dateOnlyLength = 10;\nconst dateTimeLength = 16;\nconst isoDateTimeCompletionTemplate = \"0000-00-00T00:00:00.000Z\";\nfunction getCompleteDateTime(value) {\n\ttry {\n\t\tconst completeDate = value + isoDateTimeCompletionTemplate.slice(value.length);\n\t\tconst date = new Date(completeDate);\n\t\tif (Number.isNaN(date.getTime())) return void 0;\n\t\tif (!date.toISOString().startsWith(value)) return void 0;\n\t\treturn completeDate;\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction parseDateQueryParam(value) {\n\tif (value.length === dateOnlyLength || value.length === dateTimeLength || value.length === 24) return getCompleteDateTime(value);\n}\nfunction serializeDateQueryParam(value, displayTime) {\n\tconst completeDate = getCompleteDateTime(value);\n\tif (!completeDate) return void 0;\n\tif (!displayTime) return completeDate.slice(0, dateOnlyLength);\n\treturn completeDate.slice(0, dateTimeLength);\n}\nfunction useDateQueryParam({ initialValue, parameterName, displayTime, optional }) {\n\tconst displayTimeRef = useRef(isBoolean(displayTime) ? displayTime : false);\n\tconst initialStringValueRef = useRef(optional || !isString(initialValue) ? void 0 : serializeDateQueryParam(initialValue, displayTimeRef.current));\n\tconst [stringValue, setStringValue] = useStringQueryParam({\n\t\tinitialValue: initialStringValueRef.current,\n\t\tparameterName,\n\t\toptional: isUndefined(initialStringValueRef.current)\n\t});\n\treturn [useMemo(() => {\n\t\tif (isUndefined(stringValue)) return void 0;\n\t\tconst date = parseDateQueryParam(stringValue);\n\t\tif (isString(date)) return date;\n\t\tconst initialDate = initialStringValueRef.current;\n\t\tif (!isString(initialDate)) return void 0;\n\t\treturn parseDateQueryParam(initialDate);\n\t}, [stringValue]), useCallback(async (newValue) => {\n\t\tif (isUndefined(newValue)) return setStringValue(void 0);\n\t\tif (!isString(newValue)) return;\n\t\tconst serializedDate = serializeDateQueryParam(newValue, displayTimeRef.current);\n\t\tif (!isString(serializedDate)) return;\n\t\treturn setStringValue(serializedDate);\n\t}, [setStringValue])];\n}\nfunction useCollectionReferenceQueryParam({ collectionId, initialValue, parameterName, optional }) {\n\tconst collectionUtils = useCollectionUtils();\n\tconst locale = useLocaleInfo().activeLocale ?? void 0;\n\tconst initialValueRef = useRef(optional ? void 0 : initialValue);\n\tconst [slug, setSlug] = useStringQueryParam({\n\t\tinitialValue: void 0,\n\t\tparameterName,\n\t\toptional: true\n\t});\n\treturn [useMemo(() => {\n\t\tif (!isString(slug)) return initialValueRef.current;\n\t\treturn use(getCollectionUtilsCache(collectionUtils, collectionId).getRecordIdBySlug(slug, locale));\n\t}, [\n\t\tcollectionUtils,\n\t\tcollectionId,\n\t\tlocale,\n\t\tslug\n\t]), useCallback(async (newId) => {\n\t\tif (isUndefined(newId)) return setSlug(void 0);\n\t\tconst newSlug = await getCollectionUtilsCache(collectionUtils, collectionId).getSlugByRecordId(newId, locale);\n\t\tif (!isString(newSlug)) return;\n\t\tawait setSlug(newSlug);\n\t}, [\n\t\tcollectionUtils,\n\t\tcollectionId,\n\t\tlocale,\n\t\tsetSlug\n\t])];\n}\nfunction useMultiCollectionReferenceQueryParam({ collectionId, initialValue, parameterName, optional }) {\n\tconst collectionUtils = useCollectionUtils();\n\tconst locale = useLocaleInfo().activeLocale ?? void 0;\n\tconst initialArrayValue = useRef(optional ? void 0 : isArray(initialValue) ? initialValue : EMPTY_ARRAY);\n\tconst [slugs, setSlugs] = useStringArrayQueryParam({ parameterName });\n\treturn [useMemo(() => {\n\t\tif (slugs.length === 0) return initialArrayValue.current;\n\t\tconst cache = getCollectionUtilsCache(collectionUtils, collectionId);\n\t\tconst maybePromises = slugs.filter(isNonEmptyString).map((slug) => cache.getRecordIdBySlug(slug, locale));\n\t\tconst supportsOptional = isUndefined(initialArrayValue.current);\n\t\tconst resolvedIds = useAll(maybePromises).filter(isString);\n\t\tif (resolvedIds.length === 0 && supportsOptional) return void 0;\n\t\treturn resolvedIds;\n\t}, [\n\t\tcollectionUtils,\n\t\tcollectionId,\n\t\tlocale,\n\t\tslugs\n\t]), useCallback(async (newIds) => {\n\t\tif (isUndefined(newIds)) return setSlugs(EMPTY_ARRAY);\n\t\tif (!isArray(newIds)) return;\n\t\tconst initialArray = initialArrayValue.current;\n\t\tif (newIds.length === 0 && isArray(initialArray) && !isEqual(newIds, initialArray)) return setSlugs([\"\"]);\n\t\tconst cache = getCollectionUtilsCache(collectionUtils, collectionId);\n\t\tconst newSlugs = await Promise.all(newIds.map((id) => cache.getSlugByRecordId(id, locale)));\n\t\tawait setSlugs(newSlugs.filter(isString));\n\t}, [\n\t\tcollectionUtils,\n\t\tcollectionId,\n\t\tlocale,\n\t\tsetSlugs\n\t])];\n}\nfunction isNonEmptyString(value) {\n\treturn isString(value) && value !== \"\";\n}\nconst noOpGetOptionTitle = () => void 0;\nfunction useEnumQueryParam({ initialValue, parameterName, options = EMPTY_ARRAY, getOptionTitle = noOpGetOptionTitle, optional }) {\n\tuseEffect(() => {\n\t\tif (options === EMPTY_ARRAY || getOptionTitle === noOpGetOptionTitle) console.warn(\"[useEnumQueryParam]\", `The URL variable \\`${parameterName}\\` is misconfigured because the referenced Option field was removed from the collection. Filters using this variable are disabled, and updating the variable will have no effect.`);\n\t}, [\n\t\toptions,\n\t\tgetOptionTitle,\n\t\tparameterName\n\t]);\n\tconst locale = useLocaleInfo().activeLocale ?? void 0;\n\tconst titleToIdMap = useMemo(() => {\n\t\tconst map = /* @__PURE__ */ new Map();\n\t\tfor (const id of options) {\n\t\t\tconst title = getOptionTitle(id, locale);\n\t\t\tif (!title) continue;\n\t\t\tmap.set(title, id);\n\t\t}\n\t\treturn map;\n\t}, [\n\t\tlocale,\n\t\toptions,\n\t\tgetOptionTitle\n\t]);\n\tconst [titleValue, setTitleValue] = useStringQueryParam({\n\t\tinitialValue: useMemo(() => {\n\t\t\tif (!initialValue) return void 0;\n\t\t\tif (!options.includes(initialValue)) return void 0;\n\t\t\treturn getOptionTitle(initialValue, locale) || \"\";\n\t\t}, [\n\t\t\tlocale,\n\t\t\tinitialValue,\n\t\t\toptions,\n\t\t\tgetOptionTitle\n\t\t]),\n\t\tparameterName,\n\t\toptional\n\t});\n\treturn [useMemo(() => {\n\t\tconst validInitialId = initialValue && options.includes(initialValue) ? initialValue : void 0;\n\t\tif (isUndefined(titleValue)) return;\n\t\tif (!titleValue) return validInitialId;\n\t\tconst resolvedId = titleToIdMap.get(titleValue);\n\t\tif (!resolvedId) {\n\t\t\tif (optional) return void 0;\n\t\t\treturn validInitialId;\n\t\t}\n\t\treturn resolvedId;\n\t}, [\n\t\ttitleValue,\n\t\ttitleToIdMap,\n\t\tinitialValue,\n\t\toptions,\n\t\toptional\n\t]), useCallback(async (newValue) => {\n\t\tif (isUndefined(newValue)) return setTitleValue(void 0);\n\t\tconst title = getOptionTitle(newValue, locale);\n\t\tif (title) return setTitleValue(title);\n\t}, [\n\t\tsetTitleValue,\n\t\tlocale,\n\t\tgetOptionTitle\n\t])];\n}\nfunction getCollectionUtilsCache(collectionUtils, collectionId) {\n\tconst collectionUtilsCache = collectionUtils?.get(collectionId);\n\tassert$1(collectionUtilsCache, () => `CollectionUtilsCache not found for collectionId: ${collectionId}`);\n\treturn collectionUtilsCache;\n}\nfunction use(maybePromise) {\n\tif (isPromise(maybePromise)) throw maybePromise;\n\treturn maybePromise;\n}\nfunction useAll(maybePromises) {\n\tfor (const maybePromise of maybePromises) if (isPromise(maybePromise)) throw Promise.all(maybePromises);\n\treturn maybePromises;\n}\n\n//#endregion\n//#region ../../library/src/router/computeRelativePath.ts\nfunction computeRelativePath(from, to) {\n\tif (!from.startsWith(\"/\") || !to.startsWith(\"/\")) throw new Error(\"from/to paths are expected to be absolute\");\n\tconst [fromDir] = getDirAndFile(from);\n\tconst [toDir, toFile] = getDirAndFile(to);\n\tlet relativePath = relative(fromDir, toDir);\n\tif (relativePath === \"\") relativePath = \".\";\n\tif (!relativePath.startsWith(\".\") && !relativePath.startsWith(\"/\")) relativePath = \"./\" + relativePath;\n\treturn relativePath + \"/\" + toFile;\n}\n/**\n* Takes a URL path and returns the \"directory\" part and the \"file\" part.\n*\n* For example:\n* - `getDirAndFile(\"/one/two\") === [\"/one/\", \"two\"]`\n* - `getDirAndFile(\"/one/two/\") === [\"/one/two/\", \"\"]`\n*\n* This matters for the purposes of the `.` and `..` \"operators\", which consider\n* the \"directories\" and not \"files\".\n*\n* (There are no actual \"directories\" and \"files\" in URL paths, only path\n*  segments, so these are metaphorical, hence the quotes. The metaphor holds\n*  quite well in practice!)\n*/\nfunction getDirAndFile(path) {\n\tconst index = path.lastIndexOf(\"/\");\n\treturn [path.substring(0, index + 1), path.substring(index + 1)];\n}\nconst CHAR_DOT = 46;\nconst CHAR_FORWARD_SLASH = 47;\nconst StringPrototypeCharCodeAt = (str, index) => str.charCodeAt(index);\nconst StringPrototypeLastIndexOf = (str, searchString) => str.lastIndexOf(searchString);\nconst StringPrototypeSlice = (str, start, end) => str.slice(start, end);\n/**\n* `path.relative`, ported from Node.js.\n*\n* Alterations are marked with the /* comments.\n*\n* https://nodejs.org/docs/latest-v14.x/api/path.html#path_path_relative_from_to\n* https://github.com/nodejs/node/blob/dd52c05046bcc65746e26e2de65699dffcd454ee/lib/path.js#L1190\n*/\nfunction relative(from, to) {\n\tif (from === to) return \"\";\n\tfrom = \"/\" + normalizeString(from);\n\tto = \"/\" + normalizeString(to);\n\tif (from === to) return \"\";\n\tconst fromStart = 1;\n\tconst fromEnd = from.length;\n\tconst fromLen = fromEnd - fromStart;\n\tconst toStart = 1;\n\tconst toLen = to.length - toStart;\n\tconst length = fromLen < toLen ? fromLen : toLen;\n\tlet lastCommonSep = -1;\n\tlet i = 0;\n\tfor (; i < length; i++) {\n\t\tconst fromCode = StringPrototypeCharCodeAt(from, fromStart + i);\n\t\tif (fromCode !== StringPrototypeCharCodeAt(to, toStart + i)) break;\n\t\telse if (fromCode === CHAR_FORWARD_SLASH) lastCommonSep = i;\n\t}\n\tif (i === length) {\n\t\tif (toLen > length) {\n\t\t\tif (StringPrototypeCharCodeAt(to, toStart + i) === CHAR_FORWARD_SLASH) return StringPrototypeSlice(to, toStart + i + 1);\n\t\t\tif (i === 0) return StringPrototypeSlice(to, toStart + i);\n\t\t} else if (fromLen > length) {\n\t\t\tif (StringPrototypeCharCodeAt(from, fromStart + i) === CHAR_FORWARD_SLASH) lastCommonSep = i;\n\t\t\telse if (i === 0) lastCommonSep = 0;\n\t\t}\n\t}\n\tlet out = \"\";\n\tfor (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) if (i === fromEnd || StringPrototypeCharCodeAt(from, i) === CHAR_FORWARD_SLASH) out += out.length === 0 ? \"..\" : \"/..\";\n\treturn `${out}${StringPrototypeSlice(to, toStart + lastCommonSep)}`;\n}\nconst separator$1 = \"/\";\nconst isPathSeparator = (code) => code === CHAR_FORWARD_SLASH;\n/**\n* Ported from Node.js. This is an internal function of the `path` module. The\n* last three arguments are hard-coded above to fit our needs.\n*\n* https://github.com/nodejs/node/blob/dd52c05046bcc65746e26e2de65699dffcd454ee/lib/path.js#L66\n*/\nfunction normalizeString(path) {\n\tlet res = \"\";\n\tlet lastSegmentLength = 0;\n\tlet lastSlash = -1;\n\tlet dots = 0;\n\tlet code = 0;\n\tfor (let i = 0; i <= path.length; ++i) {\n\t\tif (i < path.length) code = StringPrototypeCharCodeAt(path, i);\n\t\telse if (isPathSeparator(code)) break;\n\t\telse code = CHAR_FORWARD_SLASH;\n\t\tif (isPathSeparator(code)) {\n\t\t\tif (lastSlash === i - 1 || dots === 1) {} else if (dots === 2) {\n\t\t\t\tif (res.length < 2 || lastSegmentLength !== 2 || StringPrototypeCharCodeAt(res, res.length - 1) !== CHAR_DOT || StringPrototypeCharCodeAt(res, res.length - 2) !== CHAR_DOT) {\n\t\t\t\t\tif (res.length > 2) {\n\t\t\t\t\t\tconst lastSlashIndex = StringPrototypeLastIndexOf(res, separator$1);\n\t\t\t\t\t\tif (lastSlashIndex === -1) {\n\t\t\t\t\t\t\tres = \"\";\n\t\t\t\t\t\t\tlastSegmentLength = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tres = StringPrototypeSlice(res, 0, lastSlashIndex);\n\t\t\t\t\t\t\tlastSegmentLength = res.length - 1 - StringPrototypeLastIndexOf(res, separator$1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlastSlash = i;\n\t\t\t\t\t\tdots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (res.length !== 0) {\n\t\t\t\t\t\tres = \"\";\n\t\t\t\t\t\tlastSegmentLength = 0;\n\t\t\t\t\t\tlastSlash = i;\n\t\t\t\t\t\tdots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (res.length > 0) res += `${separator$1}${StringPrototypeSlice(path, lastSlash + 1, i)}`;\n\t\t\t\telse res = StringPrototypeSlice(path, lastSlash + 1, i);\n\t\t\t\tlastSegmentLength = i - lastSlash - 1;\n\t\t\t}\n\t\t\tlastSlash = i;\n\t\t\tdots = 0;\n\t\t} else if (code === CHAR_DOT && dots !== -1) ++dots;\n\t\telse dots = -1;\n\t}\n\treturn res;\n}\n\n//#endregion\n//#region ../../library/src/router/customNotFoundPagePaths.ts\nconst customNotFoundPagePaths = /* @__PURE__ */ new Set([\n\t`/404.html`,\n\t`/404`,\n\t`/404/`\n]);\n\n//#endregion\n//#region ../../library/src/router/getSitePrefix.ts\n/**\n* If this site is hosted (reverse-proxied) at a prefix, e.g., https://www.framer.com/sites, and the user is visiting\n* the site as such (as opposed to, e.g., accessing the site via its staging domain), returns that prefix, e.g., /sites,\n* always without a trailing slash. Otherwise, returns an empty string. Note that the last two qualities mean you can\n* trivially concatenate the result with a route path (which always starts with a slash) to get the full path.\n*\n* Because we use the canonical URL to determine the prefix, it requires it to be configured correctly (via custom AKA\n* advanced canonical URL) for reverse-proxied sites.\n*/\nfunction getSitePrefix(siteCanonicalURL) {\n\tif (!siteCanonicalURL) return \"\";\n\tlet url;\n\ttry {\n\t\turl = new URL(siteCanonicalURL);\n\t} catch {\n\t\treturn \"\";\n\t}\n\tif (url.pathname === \"/\" || window.location.origin !== url.origin) return \"\";\n\treturn url.pathname.endsWith(\"/\") ? url.pathname.slice(0, -1) : url.pathname;\n}\n\n//#endregion\n//#region ../../library/src/router/getPathForRoute.ts\nfunction resolveHash(template, variables) {\n\tconst resolvedHash = template.replace(pathVariablesRegExpGlobal, (match, pathVariable) => variables[pathVariable] ?? match);\n\tif (resolvedHash.includes(\":\")) return void 0;\n\treturn resolvedHash;\n}\nfunction getHashForRoute(hash, route, hashVariables) {\n\tconst variables = Object.assign({}, route.elements, hashVariables);\n\tif (hash.startsWith(\":\")) {\n\t\tconst nodeId = hash.slice(1);\n\t\tconst pattern = route.elementPatterns?.[nodeId];\n\t\tif (pattern) return resolveHash(pattern, variables);\n\t}\n\tif (hash.includes(\":\")) return resolveHash(hash, variables);\n\tconst element = route.elements?.[hash];\n\tif (element) return resolveHash(element, variables);\n\treturn hash;\n}\nfunction getPathForRoute(route, { currentRoutePath, currentRoutePathLocalized, currentPathVariables, hash, pathVariables, hashVariables, relative = true, preserveQueryParams, onlyHash = false, siteCanonicalURL, localeId, localeSlug }) {\n\tlet resolvedHash;\n\tif (hash && route) resolvedHash = getHashForRoute(hash, route, hashVariables);\n\tif (onlyHash) return resolvedHash ?? \"\";\n\tlet currentPath = currentRoutePath ?? \"/\";\n\tif (currentRoutePathLocalized && localeId) currentPath = currentRoutePathLocalized[localeId] ?? currentPath;\n\tif (currentPathVariables) currentPath = currentPath.replace(pathVariablesRegExpGlobal, (match, pathVariable) => String(currentPathVariables[pathVariable] || match));\n\tlet path = (localeId ? route?.pathLocalized?.[localeId] : void 0) ?? route?.path ?? \"/\";\n\tif (pathVariables) path = path.replace(pathVariablesRegExpGlobal, (match, pathVariable) => String(pathVariables[pathVariable] || match));\n\tconst isSamePageHashNavigation = Boolean(currentPath === path && resolvedHash);\n\tconst isSameDynamicRouteNavigation = !isSamePageHashNavigation && pathVariables !== void 0 && currentRoutePath !== void 0 && route?.path !== void 0 && currentRoutePath === route.path && currentPath !== path;\n\tif (relative) {\n\t\tif (customNotFoundPagePaths.has(currentPath) && typeof window !== \"undefined\") {\n\t\t\tconst sitePrefix = getSitePrefix(siteCanonicalURL);\n\t\t\tpath = computeRelativePath(window.location.pathname, sitePrefix + path);\n\t\t} else path = computeRelativePath(currentPath, path);\n\t} else path = prependLocaleSlug(path, localeSlug);\n\tconst ignoreBackAnchor = isSamePageHashNavigation || isSameDynamicRouteNavigation;\n\tif (preserveQueryParams || ignoreBackAnchor) path = forwardCurrentQueryParams(path, ignoreBackAnchor);\n\tif (resolvedHash) path = `${path}#${resolvedHash}`;\n\treturn path;\n}\n\n//#endregion\n//#region ../../library/src/router/useRouteAnchor.ts\n/**\n* @deprecated no longer used; kept for backwards compatibility. Prefer {@link useRouteHandler} instead.\n*/\nfunction useRouteAnchor(routeId, { elementId, hash: linkHash } = {}) {\n\tconst { navigate, currentPathVariables, preserveQueryParams, siteCanonicalURL } = useRouter();\n\tconst { activeLocale } = useLocaleInfo();\n\tconst route = useRoute(routeId);\n\tconst currentRouteId = useCurrentRouteId();\n\tconst currentRoute = useRoute(currentRouteId ?? \"\");\n\tuseRoutePreloader([routeId], true);\n\tconst hash = linkHash ?? elementId;\n\tconst href = React.useMemo(() => getPathForRoute(route, {\n\t\tcurrentRoutePath: currentRoute?.path,\n\t\tcurrentRoutePathLocalized: currentRoute?.pathLocalized,\n\t\tcurrentPathVariables,\n\t\thash,\n\t\tpreserveQueryParams,\n\t\tsiteCanonicalURL,\n\t\tlocaleId: activeLocale?.id\n\t}), [\n\t\tcurrentRoute,\n\t\tcurrentPathVariables,\n\t\thash,\n\t\tpreserveQueryParams,\n\t\troute,\n\t\tsiteCanonicalURL,\n\t\tactiveLocale?.id\n\t]);\n\tconst navigateToRoute = React.useCallback(() => navigate?.(routeId, hash), [\n\t\thash,\n\t\tnavigate,\n\t\trouteId\n\t]);\n\treturn {\n\t\tonClick: React.useCallback((event) => {\n\t\t\tevent.preventDefault();\n\t\t\tnavigateToRoute();\n\t\t}, [navigateToRoute]),\n\t\thref\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/useReplayPreHydrationInput.ts\nconst replayMarker = \"__f_replay\";\nconst replayMarkerIgnore = \"__f_replay_ignore\";\nconst formHydratedAttribute = \"data-framer-form-hydrated\";\nconst formPendingSubmitAttribute = \"data-framer-form-pending-submit\";\nfunction deferPreHydrationSubmit(hydratedAttribute, pendingSubmitAttribute) {\n\tconst form = document.currentScript?.parentElement;\n\tif (!form) return;\n\tform.addEventListener(\"submit\", (event) => {\n\t\tif (form.hasAttribute(hydratedAttribute)) return;\n\t\tevent.preventDefault();\n\t\tform.setAttribute(pendingSubmitAttribute, \"\");\n\t});\n}\n/** Inline script SSR'd into the form so a submit before hydration is deferred instead of navigating. */\nfunction getDeferPreHydrationSubmitScript() {\n\treturn `(${deferPreHydrationSubmit.toString()})(\"${formHydratedAttribute}\",\"${formPendingSubmitAttribute}\")`;\n}\n/** Replays a submit that the inline script deferred before hydration. Runs after `useReplayPreHydrationInput` has restored input values. */\nfunction useReplayPreHydrationSubmit(formRef, submit) {\n\tuseEffect(() => {\n\t\tconst form = formRef.current;\n\t\tif (!form) return;\n\t\tform.setAttribute(formHydratedAttribute, \"\");\n\t\tif (!form.hasAttribute(formPendingSubmitAttribute)) return;\n\t\tform.removeAttribute(formPendingSubmitAttribute);\n\t\tlet cancelled = false;\n\t\tqueueMicrotask(() => {\n\t\t\tif (cancelled) return;\n\t\t\tif (form.reportValidity()) submit(form);\n\t\t});\n\t\treturn () => {\n\t\t\tcancelled = true;\n\t\t};\n\t}, []);\n}\nfunction changeEvent() {\n\tconst event = new Event(\"change\", { bubbles: true });\n\tevent[replayMarker] = 1;\n\treturn event;\n}\nfunction clickEvent() {\n\tconst event = new MouseEvent(\"click\", { bubbles: true });\n\tevent[replayMarker] = 1;\n\treturn event;\n}\nfunction getValuePropFromElement(element) {\n\tif (element instanceof HTMLInputElement && (element.type === \"checkbox\" || element.type === \"radio\")) return \"checked\";\n\treturn \"value\";\n}\nfunction isReplayEvent(event) {\n\treturn replayMarker in event && event[replayMarker] === 1;\n}\nfunction shouldIgnoreReplayEvent(event) {\n\treturn replayMarkerIgnore in event.nativeEvent && event.nativeEvent[replayMarkerIgnore] === 1;\n}\nconst isHydrationFn = () => isWindow;\nfunction useReplayPreHydrationInput(value) {\n\tconst didReplayRef = useRef(false);\n\tconst elementRef = useRef(null);\n\tconst isHydration = useSyncExternalStore(noopSubscribe, returnFalse, isHydrationFn);\n\tuseEffect(() => {\n\t\tif (!isHydration) return;\n\t\tconst element = elementRef.current;\n\t\tif (didReplayRef.current || !element) return;\n\t\tdidReplayRef.current = true;\n\t\tconst valueProp = getValuePropFromElement(element);\n\t\tconst currentDOMValue = element[valueProp];\n\t\tif (currentDOMValue === (valueProp === \"checked\" ? Boolean(value) : value)) return;\n\t\tif (element.type === \"radio\" && currentDOMValue === true) {\n\t\t\telement.checked = false;\n\t\t\telement.dispatchEvent(clickEvent());\n\t\t\treturn;\n\t\t}\n\t\tif (valueProp === \"checked\") {\n\t\t\tconst event = clickEvent();\n\t\t\tevent[replayMarkerIgnore] = 1;\n\t\t\telement.dispatchEvent(event);\n\t\t\telement.dispatchEvent(clickEvent());\n\t\t\treturn;\n\t\t}\n\t\tif (element.nodeName === \"SELECT\") {\n\t\t\telement.dispatchEvent(changeEvent());\n\t\t\treturn;\n\t\t}\n\t\tconst nativeInputValueSetter = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), valueProp)?.set;\n\t\tif (!nativeInputValueSetter) return;\n\t\tnativeInputValueSetter.call(element, \"\");\n\t\tconst event = changeEvent();\n\t\tevent[replayMarkerIgnore] = 1;\n\t\telement.dispatchEvent(event);\n\t\tqueueMicrotask(() => {\n\t\t\tnativeInputValueSetter.call(element, currentDOMValue);\n\t\t\telement.dispatchEvent(changeEvent());\n\t\t});\n\t}, [isHydration]);\n\treturn elementRef;\n}\n\n//#endregion\n//#region ../../library/src/router/hydration/reactHydrationINPOptimizer.ts\nlet eventsToStop = [\n\t\"mousedown\",\n\t\"mouseup\",\n\t\"touchcancel\",\n\t\"touchend\",\n\t\"touchstart\",\n\t\"auxclick\",\n\t\"dblclick\",\n\t\"pointercancel\",\n\t\"pointerdown\",\n\t\"pointerup\",\n\t\"dragend\",\n\t\"dragstart\",\n\t\"drop\",\n\t\"compositionend\",\n\t\"compositionstart\",\n\t\"keydown\",\n\t\"keypress\",\n\t\"keyup\",\n\t\"input\",\n\t\"textInput\",\n\t\"copy\",\n\t\"cut\",\n\t\"paste\",\n\t\"click\",\n\t\"change\",\n\t\"contextmenu\",\n\t\"reset\"\n];\nconst stopFn = (event) => {\n\tif (!event.target?.closest?.(\"#main\")) return;\n\tif (isReplayEvent(event)) return;\n\tevent.stopPropagation();\n\tperformance.mark(\"framer-react-event-handling-prevented\");\n};\nlet shouldTurnOnEventHandling = false;\nfunction turnOffReactEventHandling() {\n\tif (!eventsToStop) return;\n\tshouldTurnOnEventHandling = true;\n\tperformance.mark(\"framer-react-event-handling-start\");\n\tconst options = { capture: true };\n\tconst body = document.body;\n\teventsToStop.forEach((event) => body.addEventListener(event, stopFn, options));\n}\nfunction TurnOnReactEventHandling() {\n\tuseEffect(() => {\n\t\tif (!shouldTurnOnEventHandling || !eventsToStop) return;\n\t\tconst options = { capture: true };\n\t\tconst body = document.body;\n\t\teventsToStop.forEach((event) => body.removeEventListener(event, stopFn, options));\n\t\teventsToStop = void 0;\n\t\tperformance.mark(\"framer-react-event-handling-end\");\n\t}, []);\n\treturn null;\n}\n\n//#endregion\n//#region ../../library/src/router/hydration/onlyRunOnce.ts\n/** A decorator that ensures a method is only run once. It returns undefined if the method has already run. */\nfunction onlyRunOnce(originalMethod) {\n\tlet hasRun = false;\n\treturn function(...args) {\n\t\tif (hasRun) return;\n\t\thasRun = true;\n\t\treturn originalMethod.apply(this, args);\n\t};\n}\n\n//#endregion\n//#region ../../library/src/router/hydration/hydrationTimings.ts\nfunction measureSafe(name, start, end) {\n\ttry {\n\t\tperformance.measure(name, start, end);\n\t} catch (e) {\n\t\tconsole.warn(`Could not measure ${name}`, e);\n\t}\n}\nvar HydrationMarker = class {\n\tmarkRenderStart = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-start\");\n\t});\n\tmarkRenderEnd = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-render-end\");\n\t\tmeasureSafe(\"framer-hydration-render\", \"framer-hydration-start\", \"framer-hydration-render-end\");\n\t});\n\tmarkUseInsertionEffectsStart = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-insertion-effects-start\");\n\t});\n\tmarkUseInsertionEffectRouterStart = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-router-insertion-effect\");\n\t});\n\tmarkUseInsertionEffectsEnd = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-insertion-effects-end\");\n\t\tmeasureSafe(\"framer-hydration-insertion-effects\", \"framer-hydration-insertion-effects-start\", \"framer-hydration-insertion-effects-end\");\n\t});\n\tmarkUseLayoutEffectsStart = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-layout-effects-start\");\n\t});\n\tmarkRouterUseLayoutEffectStart = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-router-layout-effect\");\n\t});\n\tmarkUseLayoutEffectsEnd = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-layout-effects-end\");\n\t\tmeasureSafe(\"framer-hydration-layout-effects\", \"framer-hydration-layout-effects-start\", \"framer-hydration-layout-effects-end\");\n\t});\n\tmarkUseEffectsStart = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-effects-start\");\n\t});\n\tmarkUseEffectsRouterStart = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-router-effect\");\n\t});\n\tmarkUseEffectsAreSynchronous = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-effects-sync\");\n\t});\n\tmarkUseEffectsEnd = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-effects-end\");\n\t\tmeasureSafe(\"framer-hydration-effects\", performance.getEntriesByName(\"framer-hydration-first-paint\")[0]?.name ?? performance.getEntriesByName(\"framer-hydration-effects-start\")[0]?.name, \"framer-hydration-effects-end\");\n\t});\n\tmarkRafStart = onlyRunOnce(() => {\n\t\tthis.browserRendering.hasStarted = true;\n\t\tperformance.mark(\"framer-hydration-browser-render-start\");\n\t});\n\tmarkRafEnd = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-browser-raf-end\");\n\t\tmeasureSafe(\"framer-hydration-raf\", \"framer-hydration-browser-render-start\", \"framer-hydration-browser-raf-end\");\n\t});\n\tmarkLayoutStylePaintEnd = onlyRunOnce(() => {\n\t\tperformance.mark(\"framer-hydration-first-paint\");\n\t\tmeasureSafe(\"framer-hydration-time-to-first-paint\", \"framer-hydration-start\", \"framer-hydration-first-paint\");\n\t\tmeasureSafe(\"framer-hydration-browser-render\", \"framer-hydration-browser-raf-end\", \"framer-hydration-first-paint\");\n\t});\n\tmeasureMutationEffects = onlyRunOnce(() => {\n\t\tmeasureSafe(\"framer-hydration-commit\", \"framer-hydration-layout-effects-end\", \"framer-hydration-effects-start\");\n\t});\n\tmeasureUnattributedHydrationOverhead = onlyRunOnce(() => {\n\t\tmeasureSafe(\"framer-hydration-uho\", performance.getEntriesByName(\"framer-hydration-effects-end\")[0]?.name ?? performance.getEntriesByName(\"framer-hydration-layout-effects-end\")[0]?.name, \"framer-hydration-browser-render-start\");\n\t});\n\trender = {\n\t\tmarkStart: () => this.markRenderStart(),\n\t\tmarkEnd: () => this.markRenderEnd()\n\t};\n\tmutationEffects = { measure: () => this.measureMutationEffects() };\n\tuseInsertionEffects = {\n\t\tmarkStart: () => this.markUseInsertionEffectsStart(),\n\t\tmarkRouterStart: () => this.markUseInsertionEffectRouterStart(),\n\t\tmarkEnd: () => this.markUseInsertionEffectsEnd()\n\t};\n\tuseLayoutEffects = {\n\t\tmarkStart: () => this.markUseLayoutEffectsStart(),\n\t\tmarkRouterStart: () => this.markRouterUseLayoutEffectStart(),\n\t\tmarkEnd: () => this.markUseLayoutEffectsEnd()\n\t};\n\tuseEffects = {\n\t\tmarkStart: () => this.markUseEffectsStart(),\n\t\tmarkRouterStart: () => this.markUseEffectsRouterStart(),\n\t\tmarkEnd: () => this.markUseEffectsEnd(),\n\t\tmarkAreSynchronous: () => this.markUseEffectsAreSynchronous()\n\t};\n\tbrowserRendering = {\n\t\thasStarted: false,\n\t\trequestAnimationFrame: {\n\t\t\tmarkStart: () => this.markRafStart(),\n\t\t\tmarkEnd: () => this.markRafEnd()\n\t\t},\n\t\tlayoutStylePaint: { markEnd: () => this.markLayoutStylePaintEnd() }\n\t};\n\tunattributedHydrationOverhead = { measure: () => this.measureUnattributedHydrationOverhead() };\n};\n/**\n* Hydration marker is defined only when the page is hydrated. It will be undefined when the page is\n* client-side-rendered (e.g. because it’s unoptimized), because we only want to measure hydration timings.\n*/\nlet hydrationMarker;\nfunction markHydrationStart() {\n\thydrationMarker = new HydrationMarker();\n\thydrationMarker.render.markStart();\n}\nfunction useMarkRouterEffects() {\n\tuseInsertionEffect(() => {\n\t\thydrationMarker?.useInsertionEffects.markRouterStart();\n\t}, []);\n\tuseLayoutEffect(() => {\n\t\thydrationMarker?.useLayoutEffects.markRouterStart();\n\t}, []);\n\tuseEffect(() => {\n\t\thydrationMarker?.useEffects.markRouterStart();\n\t}, []);\n}\nlet wasInBackground = false;\nfunction useMarkSuspenseEffectsStart() {\n\tuseInsertionEffect(() => {\n\t\thydrationMarker?.render.markEnd();\n\t\thydrationMarker?.useInsertionEffects.markStart();\n\t}, []);\n\tuseLayoutEffect(() => {\n\t\thydrationMarker?.useLayoutEffects.markStart();\n\t\tif (document.visibilityState !== \"visible\") {\n\t\t\twasInBackground = true;\n\t\t\treturn;\n\t\t}\n\t\tframe.read(() => {\n\t\t\thydrationMarker?.browserRendering.requestAnimationFrame.markStart();\n\t\t\thydrationMarker?.unattributedHydrationOverhead.measure();\n\t\t});\n\t}, []);\n\tuseEffect(() => {\n\t\thydrationMarker?.useEffects.markStart();\n\t\tif (!hydrationMarker?.browserRendering.hasStarted) {\n\t\t\thydrationMarker?.mutationEffects.measure();\n\t\t\thydrationMarker?.useEffects.markAreSynchronous();\n\t\t}\n\t}, []);\n}\n/**\n* Use this component as last child of the most top-level Suspense as a good-enough 'callback' for the end of hydration.\n* This works, because it's the last child of the `<Suspense>` boundary so the effects are only called once the boundary resolves.\n*/\nfunction useMarkSuspenseEffectEnd() {\n\tuseInsertionEffect(() => {\n\t\thydrationMarker?.useInsertionEffects.markEnd();\n\t}, []);\n\tuseLayoutEffect(() => {\n\t\thydrationMarker?.useLayoutEffects.markEnd();\n\t\tif (wasInBackground || document.visibilityState !== \"visible\") return;\n\t\tframe.read(() => {\n\t\t\thydrationMarker?.browserRendering.requestAnimationFrame.markEnd();\n\t\t\tyieldToMain().then(() => {\n\t\t\t\thydrationMarker?.browserRendering.layoutStylePaint.markEnd();\n\t\t\t});\n\t\t});\n\t}, []);\n\tuseEffect(() => {\n\t\thydrationMarker?.useEffects.markEnd();\n\t}, []);\n}\n/**\n* Use this component as the firstmost sibling of a component that suspends.\n* It marks start timings of effects that run after the other sibling unsuspends,\n* as React executes components from inside out (= most nested first).\n*/\nfunction MarkSuspenseEffectsStart() {\n\tuseMarkSuspenseEffectsStart();\n\treturn null;\n}\n/**\n* Use this component as last child of the most top-level Suspense as a good-enough 'callback' for the end of hydration.\n* This works, because it's the last child of the `<Suspense>` boundary so the effects are only called once the boundary resolves.\n*/\nfunction MarkSuspenseEffectsEnd() {\n\tuseMarkSuspenseEffectEnd();\n\treturn null;\n}\nconst MarkSuspenseEffects = {\n\tStart: MarkSuspenseEffectsStart,\n\tEnd: MarkSuspenseEffectsEnd\n};\n\n//#endregion\n//#region ../../library/src/router/renderPage.tsx\nfunction renderPage(Page, defaultPageStyle) {\n\tconst props = {\n\t\tstyle: defaultPageStyle,\n\t\t\"data-framer-root\": \"\"\n\t};\n\treturn React.isValidElement(Page) ? React.cloneElement(Page, props) : /* @__PURE__ */ jsx(Page, { ...props });\n}\n\n//#endregion\n//#region ../../library/src/router/error-boundary/NotFoundErrorBoundary.tsx\nvar NotFoundError = class extends Error {};\n/**\n* This error boundary catches and forwards errors, unless the error is `NotFoundError`, where it will render the 404 page.\n*/\nvar NotFoundErrorBoundary = class extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\terror: void 0,\n\t\t\trouterRenderKey: props.routerRenderKey\n\t\t};\n\t}\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { error };\n\t}\n\t/** Resets the error when the router starts rendering a new navigation. */\n\tstatic getDerivedStateFromProps(nextProps, prevState) {\n\t\tif (nextProps.routerRenderKey !== prevState.routerRenderKey) {\n\t\t\tconst newState = { routerRenderKey: nextProps.routerRenderKey };\n\t\t\tif (prevState.error) newState.error = void 0;\n\t\t\treturn newState;\n\t\t}\n\t\treturn null;\n\t}\n\trender() {\n\t\tif (this.state.error === void 0) return this.props.children;\n\t\tif (!(this.state.error instanceof NotFoundError)) throw this.state.error;\n\t\tconst { notFoundPage, defaultPageStyle } = this.props;\n\t\tif (!notFoundPage) throw this.state.error;\n\t\treturn renderPage(notFoundPage, defaultPageStyle);\n\t}\n};\n\n//#endregion\n//#region ../../shared/src/emptyArray.ts\nconst frozenEmptyArray = /* @__PURE__ */ Object.freeze([]);\n/**\n* Returns a stable typed empty array for the given type.\n*\n* @example\n* // Get an empty array of strings\n* const myArray = emptyArray<string>();\n*/\nfunction emptyArray() {\n\treturn frozenEmptyArray;\n}\n\n//#endregion\n//#region ../../library/src/router/inferInitialRouteFromPath.ts\nlet routeInfoCache;\nfunction getRouteInfoMemo(routes) {\n\tif (routeInfoCache?.lastRoutes !== routes) {\n\t\tconst pathRoutes = {};\n\t\tconst pathRoutesLocalized = {};\n\t\tlet paths = [];\n\t\tconst pathsLocalized = {};\n\t\tconst lastRoutes = routes;\n\t\tfor (const routeId in routes) {\n\t\t\tconst route = routes[routeId];\n\t\t\tassert$1(route, \"route must be defined\");\n\t\t\tconst { path, pathLocalized } = route;\n\t\t\tif (!path) continue;\n\t\t\tpathRoutes[path] = {\n\t\t\t\tpath,\n\t\t\t\tdepth: pathDepth(path),\n\t\t\t\trouteId\n\t\t\t};\n\t\t\tif (!pathLocalized) continue;\n\t\t\tfor (const localeId in pathLocalized) {\n\t\t\t\tconst localizedPath = pathLocalized[localeId];\n\t\t\t\tassert$1(localizedPath, \"localizedPath must be defined\");\n\t\t\t\tconst localizedDepth = pathDepth(localizedPath);\n\t\t\t\tconst byLocale = pathRoutesLocalized[localeId] ||= {};\n\t\t\t\tbyLocale[localizedPath] = {\n\t\t\t\t\tpath: localizedPath,\n\t\t\t\t\tdepth: localizedDepth,\n\t\t\t\t\trouteId\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\tpaths = Object.values(pathRoutes);\n\t\tpaths.sort(({ depth: depth1 }, { depth: depth2 }) => depth2 - depth1);\n\t\tfor (const localeId in pathRoutesLocalized) {\n\t\t\tconst routesByPathLocalized = pathRoutesLocalized[localeId];\n\t\t\tif (!routesByPathLocalized) continue;\n\t\t\tconst pathsForLocale = Object.values(routesByPathLocalized);\n\t\t\tpathsForLocale.sort(({ depth: depth1 }, { depth: depth2 }) => depth2 - depth1);\n\t\t\tpathsLocalized[localeId] = pathsForLocale;\n\t\t}\n\t\trouteInfoCache = {\n\t\t\tpathRoutes,\n\t\t\tpathRoutesLocalized,\n\t\t\tpaths,\n\t\t\tpathsLocalized,\n\t\t\tlastRoutes\n\t\t};\n\t}\n\treturn {\n\t\tpathRoutes: routeInfoCache.pathRoutes,\n\t\tpaths: routeInfoCache.paths,\n\t\tpathRoutesLocalized: routeInfoCache.pathRoutesLocalized,\n\t\tpathsLocalized: routeInfoCache.pathsLocalized\n\t};\n}\n/**\n* @deprecated\n* Use {@link inferInitialRouteFromPathAndLocales} instead.\n* Matching of localized paths without providing locales is not supported.\n* */\nfunction inferInitialRouteFromPath(routes, locationPath, fallback = true, locales = emptyArray()) {\n\treturn inferInitialRouteFromPathAndLocales(routes, locationPath, locales, fallback);\n}\nfunction inferInitialRouteFromPathAndLocales(routes, locationPath, locales, fallback = true) {\n\tconst { pathRoutes, paths, pathRoutesLocalized, pathsLocalized } = getRouteInfoMemo(routes);\n\tlet activeLocale;\n\tlet localeId;\n\tlet hasNonDefaultLocale = false;\n\tif (locales.length > 0) {\n\t\tconst firstPathSegment = locationPath.split(\"/\").find(Boolean);\n\t\tif (firstPathSegment) {\n\t\t\tactiveLocale = locales.find(({ slug }) => slug === firstPathSegment);\n\t\t\tif (activeLocale) {\n\t\t\t\tlocaleId = activeLocale.id;\n\t\t\t\tlocationPath = locationPath.substring(activeLocale.slug.length + 1);\n\t\t\t\thasNonDefaultLocale = true;\n\t\t\t}\n\t\t}\n\t\tif (!localeId) {\n\t\t\tconst defaultLocale = locales.find(({ slug }) => slug === \"\");\n\t\t\tif (defaultLocale) localeId = defaultLocale.id;\n\t\t}\n\t}\n\tif (localeId && hasNonDefaultLocale) {\n\t\tconst localizedMap = pathRoutesLocalized[localeId];\n\t\tconst exactMatchForLocale = localizedMap ? localizedMap[locationPath] : void 0;\n\t\tif (exactMatchForLocale) {\n\t\t\tconst match = matchPath(locationPath, exactMatchForLocale.path);\n\t\t\tif (match.isMatch) return {\n\t\t\t\trouteId: exactMatchForLocale.routeId,\n\t\t\t\tlocaleId,\n\t\t\t\tpathVariables: match.pathVariables\n\t\t\t};\n\t\t}\n\t}\n\tconst exactMatch = pathRoutes[locationPath];\n\tif (exactMatch) {\n\t\tconst match = matchPath(locationPath, exactMatch.path);\n\t\tif (match.isMatch) return {\n\t\t\trouteId: exactMatch.routeId,\n\t\t\tlocaleId,\n\t\t\tpathVariables: match.pathVariables\n\t\t};\n\t}\n\tif (localeId && hasNonDefaultLocale) {\n\t\tconst localizedList = pathsLocalized[localeId];\n\t\tif (localizedList) for (const { path, routeId } of localizedList) {\n\t\t\tconst match = matchPath(locationPath, path);\n\t\t\tif (match.isMatch) return {\n\t\t\t\trouteId,\n\t\t\t\tlocaleId,\n\t\t\t\tpathVariables: match.pathVariables\n\t\t\t};\n\t\t}\n\t}\n\tfor (const { path, routeId } of paths) {\n\t\tconst match = matchPath(locationPath, path);\n\t\tif (match.isMatch) return {\n\t\t\trouteId,\n\t\t\tlocaleId,\n\t\t\tpathVariables: match.pathVariables\n\t\t};\n\t}\n\tif (!fallback) throw new Error(\"No exact match found for path\");\n\tconst rootPath = pathRoutes[\"/\"];\n\tif (rootPath) return {\n\t\trouteId: rootPath.routeId,\n\t\tlocaleId\n\t};\n\tconst firstRoute = Object.keys(routes)[0];\n\tif (!firstRoute) throw new Error(\"Router should not have undefined routes\");\n\treturn {\n\t\trouteId: firstRoute,\n\t\tlocaleId\n\t};\n}\n/**\n* - \"/\" => 0\n* - \"/news\" => 1\n* - \"/news/\" => 1\n* - \"/news/michael-jackson-lives\" => 2\n*/\nfunction pathDepth(path) {\n\tconst pathWithTrimmedSlashes = path.replace(/^\\/|\\/$/gu, \"\");\n\tif (pathWithTrimmedSlashes === \"\") return 0;\n\treturn pathWithTrimmedSlashes.split(\"/\").length;\n}\nfunction matchPath(path, routePath) {\n\tconst pathVariablesKeys = [];\n\tconst routePathRegExpString = escapeStringRegExp(routePath).replace(pathVariablesRegExpGlobal, (_, name) => {\n\t\tpathVariablesKeys.push(name);\n\t\treturn \"([^/]+)\";\n\t});\n\tconst routePathRegExp = new RegExp(routePathRegExpString + \"$\");\n\tconst matches = path.match(routePathRegExp);\n\tif (!matches) return { isMatch: false };\n\tif (matches.length === 1) return { isMatch: true };\n\tconst pathVariables = {};\n\tconst pathVariablesValues = matches.slice(1);\n\tfor (let i = 0; i < pathVariablesKeys.length; ++i) {\n\t\tconst key = pathVariablesKeys[i];\n\t\tif (key === void 0) continue;\n\t\tconst value = pathVariablesValues[i];\n\t\tconst existingValue = pathVariables[key];\n\t\tif (existingValue) {\n\t\t\tif (existingValue !== value) return { isMatch: false };\n\t\t\telse continue;\n\t\t}\n\t\tif (value === void 0) throw new Error(\"Path variable values cannot be undefined\");\n\t\tpathVariables[key] = value;\n\t}\n\treturn {\n\t\tisMatch: true,\n\t\tpathVariables\n\t};\n}\nfunction escapeStringRegExp(string) {\n\treturn string.replace(/[|\\\\{}()[\\]^$+*?.]/gu, \"\\\\$&\").replace(/-/gu, \"\\\\x2d\");\n}\n\n//#endregion\n//#region ../../library/src/router/resolveInitialRouteContentState.ts\n/**\n* Resolves a CMS route's initial content locale / canonical path variables before the React tree mounts.\n*\n* Must run outside React: `Router` mounts `SuspenseThatPreservesDom`, whose fallback throws a\n* never-resolving promise, so `Router` cannot itself live under a Suspense boundary that waits on this.\n* Called from the exportToHTML client-render script and vekter preview; SSG/hydration already have it.\n*/\nasync function resolveInitialRouteContentState({ routes, routeId, pathVariables, localeId, locales, collectionUtils }) {\n\tconst route = routes[routeId];\n\tconst resolvedLocales = locales ?? [];\n\tconst collectionUtilsCache = { get: createCollectionUtilsCache(collectionUtils) };\n\tconst defaultLocale = resolvedLocales.find(({ id }) => id === defaultLocaleId);\n\tconst activeLocale = resolvedLocales.find(({ id }) => id === (localeId ?? \"default\")) ?? null;\n\tconst collectionItemId = (route?.collectionId ? getCollectionItemRecordId({\n\t\tactiveLocale,\n\t\tcollectionUtils: collectionUtilsCache,\n\t\tcurrentRoute: route,\n\t\tpathVariables\n\t}) : Promise.resolve(void 0)).then((recordId) => recordId ?? null).catch((error) => {\n\t\tconsole.error(getPleaseReportMessage(\"Failed to resolve the initial collection item id.\", error));\n\t\treturn null;\n\t});\n\treturn {\n\t\t...await resolveRouteContentState({\n\t\t\tactiveLocale,\n\t\t\tdefaultLocale,\n\t\t\tcollectionUtilsCache,\n\t\t\tlocales: resolvedLocales,\n\t\t\tpathVariables,\n\t\t\troute,\n\t\t\trouteId\n\t\t}),\n\t\tcollectionItemId\n\t};\n}\n\n//#endregion\n//#region ../../library/src/utils/getNavigationServerTimingEntry.ts\nfunction unquoteServerTimingParameterValue(value) {\n\treturn value.startsWith(\"\\\"\") && value.endsWith(\"\\\"\") ? value.slice(1, -1) : value;\n}\n/**\n* Parses a `Server-Timing` header into a map of metric name → description.\n* Metric names are stored in lowercase so lookups are case-insensitive.\n*/\nfunction getServerTimingEntries(serverTimingHeader) {\n\tconst entries = /* @__PURE__ */ new Map();\n\tif (!serverTimingHeader) return entries;\n\tfor (const serverTimingMetric of serverTimingHeader.split(\",\")) {\n\t\tconst [rawName, ...parameters] = serverTimingMetric.split(\";\");\n\t\tconst name = rawName?.trim().toLowerCase();\n\t\tif (!name) continue;\n\t\tlet description = \"\";\n\t\tfor (const parameter of parameters) {\n\t\t\tconst separatorIndex = parameter.indexOf(\"=\");\n\t\t\tif (separatorIndex === -1) continue;\n\t\t\tif (parameter.slice(0, separatorIndex).trim().toLowerCase() !== \"desc\") continue;\n\t\t\tdescription = unquoteServerTimingParameterValue(parameter.slice(separatorIndex + 1).trim());\n\t\t}\n\t\tentries.set(name, description);\n\t}\n\treturn entries;\n}\n/**\n* Reads a named Server-Timing entry from a `Server-Timing` header.\n*/\nfunction getServerTimingEntry(name, serverTimingHeader) {\n\tconst metricName = name.toLowerCase();\n\tconst description = getServerTimingEntries(serverTimingHeader).get(metricName);\n\tif (description === void 0) return void 0;\n\treturn {\n\t\tname: metricName,\n\t\tdescription\n\t};\n}\n/**\n* Reads a named Server-Timing entry from the document navigation timing.\n* Returns undefined when Server-Timing is unavailable (SSR, missing API, Safari < 16.4).\n*/\nfunction getNavigationServerTimingEntry(name) {\n\tif (typeof window === \"undefined\" || typeof performance === \"undefined\") return void 0;\n\tif (!(\"PerformanceServerTiming\" in window)) return void 0;\n\tconst serverTiming = performance.getEntriesByType(\"navigation\")[0]?.serverTiming;\n\tif (!serverTiming || serverTiming.length === 0) return void 0;\n\tconst entry = serverTiming.find((serverTimingEntry) => serverTimingEntry.name === name);\n\tif (!entry) return void 0;\n\treturn {\n\t\tname: entry.name,\n\t\tdescription: entry.description\n\t};\n}\n\n//#endregion\n//#region ../../library/src/router/routeVariants.ts\n/**\n* Exported for testing purposes\n*/\nfunction getVariantsFromServerTiming() {\n\tconst entry = getNavigationServerTimingEntry(\"abtests\");\n\treturn new URLSearchParams(entry?.description);\n}\nfunction patchRoute(routes, abTestId, abTestingVariantId) {\n\tconst route = routes[abTestingVariantId];\n\tif (!route) return;\n\tconst routeId = route.abTestingParentId ?? abTestingVariantId;\n\tconst controlRoute = routes[routeId];\n\tif (!controlRoute) return;\n\tconst { abTestingParentId: _, ...patchingRoute } = route;\n\tconst elements = controlRoute.elements || route.elements ? {\n\t\t...controlRoute.elements,\n\t\t...route.elements\n\t} : void 0;\n\troutes[routeId] = {\n\t\t...patchingRoute,\n\t\tincludedLocales: controlRoute.includedLocales,\n\t\telements,\n\t\tabTestingVariantId,\n\t\tabTestId\n\t};\n}\nfunction patchRoutesFromSearchParams(routes, variants) {\n\tfor (const [abTestId, abTestingVariantId] of variants) patchRoute(routes, abTestId, abTestingVariantId);\n}\n/**\n* This function removes all routes that are route variants.\n*\n* A route variant is a route that has an abTestingParentId.\n* All patched control routes have the abTestingVariantId and doesn't have abTestingParentId.\n*\n* NOTE: This function is important as the route variants have the same path as the control route, breaking the `inferInitialRouteFromPath` function.\n*/\nfunction removeRoutesVariants(routes) {\n\tfor (const routeId in routes) if (routes[routeId]?.abTestingParentId) delete routes[routeId];\n}\n/**\n* This function patches the initial route with the variant route.\n* This is needed in case of browsers not supporting the server-timing header (Safari older than 16.4).\n* If we don't patch it this way, the page will flicker rendering the variant route from SSG and then hydrate with the control route.\n*/\nfunction patchInitialRoute(routes, routeId) {\n\tif (!routes[routeId]) return;\n\tif (!routes[routeId].abTestingParentId) return;\n\tconst parentId = routes[routeId].abTestingParentId;\n\tconst controlRoute = routes[parentId];\n\tconst { abTestingParentId: _, ...route } = routes[routeId];\n\tconst elements = controlRoute?.elements || route.elements ? {\n\t\t...controlRoute?.elements,\n\t\t...route.elements\n\t} : void 0;\n\troutes[parentId] = {\n\t\t...route,\n\t\tincludedLocales: controlRoute?.includedLocales,\n\t\telements,\n\t\tabTestingVariantId: routeId\n\t};\n}\n/**\n* Patches the routes based on route variants provided by the server-timing header or the cookie (testing purposes).\n* It replaces the original route with the variant route, most importantly the page component, and also sets the abTestingVariantId.\n*\n* The logic in this patching is the following:\n* 1. Patch the initial route in case it's a variant route\n* 2. Retrieve the assignments from the server-timing header and cookie\n* 3. The incoming value is a map of abTestId -> variantId\n* 4. For each entry in the map:\n*    a. Retrieve the original routeId from the variant route\n*    b. Retrieve the variant route\n*    c. Replace the original route with the variant route\n* 5. Remove all variant routes to not mess with the inferInitialRouteFromPath function\n* 6. Return the resolved initial route id, so if the initial route is a variant route, it will resolve to the control route, that was already patched\n*\n* The `abTestId` and `abTestingVariantId` are set here and used in the tracking events.\n*\n* With this patching logic, the entire site won't have to know about the variant routes,\n* the pages will navigate normally \"thinking\" that they are the original route, but rendering the variant route.\n*/\nfunction patchRoutesForABTesting(routes, initialRouteId) {\n\tif (typeof window === \"undefined\") return initialRouteId;\n\tlet resolvedInitialRouteId = initialRouteId;\n\tif (initialRouteId) {\n\t\tpatchInitialRoute(routes, initialRouteId);\n\t\tconst parentRouteId = routes[initialRouteId]?.abTestingParentId;\n\t\tif (parentRouteId) resolvedInitialRouteId = parentRouteId;\n\t}\n\tpatchRoutesFromSearchParams(routes, getVariantsFromServerTiming());\n\tremoveRoutesVariants(routes);\n\treturn resolvedInitialRouteId;\n}\n\n//#endregion\n//#region ../../library/src/router/useMetadata.ts\n/** @public */\nfunction useMetadata(metadata) {\n\tReact$1.useEffect(() => {\n\t\tif (metadata.robots) {\n\t\t\tlet robotsTag = document.querySelector(\"meta[name=\\\"robots\\\"]\");\n\t\t\tif (robotsTag) robotsTag.setAttribute(\"content\", metadata.robots);\n\t\t\telse {\n\t\t\t\trobotsTag = document.createElement(\"meta\");\n\t\t\t\trobotsTag.setAttribute(\"name\", \"robots\");\n\t\t\t\trobotsTag.setAttribute(\"content\", metadata.robots);\n\t\t\t\tdocument.head.appendChild(robotsTag);\n\t\t\t}\n\t\t}\n\t}, [metadata.robots]);\n\tReact$1.useInsertionEffect(() => {\n\t\tdocument.title = metadata.title || \"\";\n\t\tif (metadata.viewport) document.querySelector(\"meta[name=\\\"viewport\\\"]\")?.setAttribute(\"content\", metadata.viewport);\n\t}, [metadata.title, metadata.viewport]);\n}\n\n//#endregion\n//#region ../../library/src/utils/warnOnce.ts\nconst warningMessages = /* @__PURE__ */ new Set();\n/** Report a warning to the console, but only once. The first string becomes the\n* key to suppress this and other warnings, so make sure it is fairly unique.\n*\n* Note, it is best to not use string interpolation, instead pass in multiple\n* fragments.\n*/\nfunction warnOnce$1(keyMessage, ...rest) {\n\tif (warningMessages.has(keyMessage)) return;\n\twarningMessages.add(keyMessage);\n\tconsole.warn(keyMessage, ...rest);\n}\n\n//#endregion\n//#region ../../library/src/utils/deprecation.ts\nfunction deprecationWarning(removedItem, removalVersion, replacement) {\n\tconst warningText = `Deprecation warning: ${removedItem} will be removed in version ${removalVersion}${replacement ? `, use ${replacement} instead` : \"\"}.`;\n\twarnOnce$1(warningText);\n}\n\n//#endregion\n//#region ../../library/src/animation/Animatable/Observers.ts\n/**\n* @internal\n*/\nvar Observers = class {\n\tobservers = /* @__PURE__ */ new Set();\n\ttransactions = {};\n\tadd(observer) {\n\t\tthis.observers.add(observer);\n\t\tlet isCalled = false;\n\t\treturn () => {\n\t\t\tif (isCalled) return;\n\t\t\tisCalled = true;\n\t\t\tthis.remove(observer);\n\t\t};\n\t}\n\tremove(observer) {\n\t\tthis.observers.delete(observer);\n\t}\n\tnotify(change, transaction) {\n\t\tif (transaction) {\n\t\t\tconst accumulatedChange = this.transactions[transaction] || change;\n\t\t\taccumulatedChange.value = change.value;\n\t\t\tthis.transactions[transaction] = accumulatedChange;\n\t\t} else this.callObservers(change);\n\t}\n\tfinishTransaction(transaction) {\n\t\tconst accumulatedChange = this.transactions[transaction];\n\t\tdelete this.transactions[transaction];\n\t\treturn this.callObservers(accumulatedChange, transaction);\n\t}\n\tcallObservers(change, transaction) {\n\t\tconst finishObservers = [];\n\t\tnew Set(this.observers).forEach((observer) => {\n\t\t\tif (typeof observer === \"function\") observer(change, transaction);\n\t\t\telse {\n\t\t\t\tobserver.update(change, transaction);\n\t\t\t\tfinishObservers.push(observer.finish);\n\t\t\t}\n\t\t});\n\t\treturn finishObservers;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/animation/Animatable/Animatable.ts\n/**\n* @public\n*/\nconst Animatable = /* @__PURE__ */ (() => {\n\t/**\n\t* Creates a Animatable object that can be animated. These objects can be passed into a {@link DeprecatedFrame} instead of a primitive like number\n\t* and afterwards animated with {@link (animate:function)}.\n\t* @remarks\n\t* ```jsx\n\t* const value = Animatable(0)\n\t* animate(value, 100)\n\t* ```\n\t* @param value - Value to animate\n\t* @returns Animatable value\n\t* @public\n\t* @deprecated Use {@link useMotionValue} instead\n\t*/\n\tfunction Animatable(value) {\n\t\tdeprecationWarning(\"Animatable()\", \"2.0.0\", \"the new animation API (https://www.framer.com/api/animation/)\");\n\t\treturn isAnimatable(value) ? value : new AnimatableValue(value);\n\t}\n\t/**\n\t* @internal\n\t*/\n\tAnimatable.transaction = (update) => {\n\t\tconst transactionId = Math.random();\n\t\tconst updatedValues = /* @__PURE__ */ new Set();\n\t\tconst updater = (animatable, value) => {\n\t\t\tanimatable.set(value, transactionId);\n\t\t\tupdatedValues.add(animatable);\n\t\t};\n\t\tupdate(updater, transactionId);\n\t\tconst finishObservers = [];\n\t\tupdatedValues.forEach((value) => {\n\t\t\tfinishObservers.push(...value.finishTransaction(transactionId));\n\t\t});\n\t\tfinishObservers.forEach((finish) => {\n\t\t\tfinish(transactionId);\n\t\t});\n\t};\n\t/**\n\t* @public\n\t*/\n\tAnimatable.getNumber = (value, defaultValue = 0) => {\n\t\treturn Animatable.get(value, defaultValue);\n\t};\n\t/** @internal */\n\tAnimatable.get = (value, defaultValue) => {\n\t\tif (value === void 0 || value === null) return defaultValue;\n\t\tif (isAnimatable(value)) return value.get();\n\t\treturn value;\n\t};\n\t/**\n\t* @internal\n\t*/\n\tAnimatable.objectToValues = (object) => {\n\t\tif (!object) return object;\n\t\tconst result = {};\n\t\tfor (const key in object) {\n\t\t\tconst value = object[key];\n\t\t\tif (isAnimatable(value)) result[key] = value.get();\n\t\t\telse result[key] = value;\n\t\t}\n\t\treturn result;\n\t};\n\treturn Animatable;\n})();\nconst onUpdateKey = \"onUpdate\";\nconst finishTransactionKey = \"finishTransaction\";\n/**\n* @internal\n* @deprecated\n*/\nfunction isAnimatable(value) {\n\treturn value !== null && typeof value === \"object\" && onUpdateKey in value && value[onUpdateKey] instanceof Function && finishTransactionKey in value && value[finishTransactionKey] instanceof Function;\n}\nfunction animatableInterpolation(value, currentInterpolation) {\n\treturn {\n\t\tinterpolate(from, to) {\n\t\t\tconst fromValue = from.get();\n\t\t\tconst toValue = to.get();\n\t\t\tconst result = Animatable(fromValue);\n\t\t\treturn (progress) => {\n\t\t\t\tconst v = currentInterpolation.interpolate(fromValue, toValue)(progress);\n\t\t\t\tresult.set(v);\n\t\t\t\treturn result;\n\t\t\t};\n\t\t},\n\t\tdifference(from, to) {\n\t\t\tconst v = from.get();\n\t\t\treturn currentInterpolation.difference(v, to.get());\n\t\t}\n\t};\n}\nvar AnimatableValue = class {\n\tvalue;\n\tobservers = new Observers();\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n\tstatic interpolationFor(value, currentInterpolation) {\n\t\tif (isAnimatable(value)) return animatableInterpolation(value, currentInterpolation);\n\t}\n\tget() {\n\t\treturn this.value;\n\t}\n\tset(value, transaction) {\n\t\tconst oldValue = this.value;\n\t\tif (isAnimatable(value)) value = value.get();\n\t\tthis.value = value;\n\t\tconst change = {\n\t\t\tvalue,\n\t\t\toldValue\n\t\t};\n\t\tthis.observers.notify(change, transaction);\n\t}\n\tfinishTransaction(transaction) {\n\t\treturn this.observers.finishTransaction(transaction);\n\t}\n\tonUpdate(handler) {\n\t\treturn this.observers.add(handler);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/render/utils/roundedNumber.ts\n/** @internal */\nfunction roundedNumber(value, decimals) {\n\tconst multiplier = 10 ** Math.round(Math.abs(decimals));\n\treturn Math.round(value * multiplier) / multiplier;\n}\n/** @internal */\nfunction roundedNumberString(value, decimals) {\n\tconst result = value.toFixed(decimals);\n\treturn decimals === 0 ? result : `${+result}`;\n}\n/** @internal */\nfunction roundWithOffset(value, offset) {\n\tif (offset === 0) return Math.round(value);\n\toffset -= offset | 0;\n\tif (offset < 0) offset = 1 - offset;\n\treturn Math.round(value - offset) + offset;\n}\n/** @internal */\nfunction roundToHalfPixel(value) {\n\treturn Math.round(value * 2) / 2;\n}\n\n//#endregion\n//#region ../../library/src/render/types/Point.ts\n/**\n* @public\n*/\nfunction Point(x, y) {\n\treturn {\n\t\tx,\n\t\ty\n\t};\n}\n/**\n* @public\n*/\n(function(_Point) {\n\t_Point.isQuadrilateralPoints = (points) => {\n\t\treturn points?.length === 4;\n\t};\n\t_Point.add = (...args) => {\n\t\treturn args.reduce((previousValue, currentValue) => {\n\t\t\treturn {\n\t\t\t\tx: previousValue.x + currentValue.x,\n\t\t\t\ty: previousValue.y + currentValue.y\n\t\t\t};\n\t\t}, {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t});\n\t};\n\t_Point.subtract = (a, b) => {\n\t\treturn {\n\t\t\tx: a.x - b.x,\n\t\t\ty: a.y - b.y\n\t\t};\n\t};\n\t_Point.multiply = (a, b) => {\n\t\treturn {\n\t\t\tx: a.x * b,\n\t\t\ty: a.y * b\n\t\t};\n\t};\n\t_Point.divide = (a, b) => {\n\t\treturn {\n\t\t\tx: a.x / b,\n\t\t\ty: a.y / b\n\t\t};\n\t};\n\t_Point.absolute = (point) => {\n\t\treturn {\n\t\t\tx: Math.abs(point.x),\n\t\t\ty: Math.abs(point.y)\n\t\t};\n\t};\n\t_Point.reverse = (point) => {\n\t\treturn {\n\t\t\tx: point.x * -1,\n\t\t\ty: point.y * -1\n\t\t};\n\t};\n\t_Point.pixelAligned = (point, offset = {\n\t\tx: 0,\n\t\ty: 0\n\t}) => {\n\t\treturn {\n\t\t\tx: roundWithOffset(point.x, offset.x),\n\t\t\ty: roundWithOffset(point.y, offset.y)\n\t\t};\n\t};\n\t_Point.distance = (a, b) => {\n\t\tconst deltaX = Math.abs(a.x - b.x);\n\t\tconst deltaY = Math.abs(a.y - b.y);\n\t\treturn Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n\t};\n\t_Point.angle = (a, b) => {\n\t\treturn Math.atan2(b.y - a.y, b.x - a.x) * 180 / Math.PI - 90;\n\t};\n\t_Point.angleFromX = (a, b) => {\n\t\treturn Math.atan2(b.y - a.y, b.x - a.x) * 180 / Math.PI;\n\t};\n\t_Point.isEqual = (a, b) => {\n\t\treturn a.x === b.x && a.y === b.y;\n\t};\n\t_Point.rotationNormalizer = () => {\n\t\tlet lastValue;\n\t\treturn (value) => {\n\t\t\tif (typeof lastValue !== \"number\") lastValue = value;\n\t\t\tconst diff = lastValue - value;\n\t\t\tconst maxDiff = Math.abs(diff) + 180;\n\t\t\tconst nTimes = Math.floor(maxDiff / 360);\n\t\t\tif (diff < 180) value -= nTimes * 360;\n\t\t\tif (diff > 180) value += nTimes * 360;\n\t\t\tlastValue = value;\n\t\t\treturn value;\n\t\t};\n\t};\n\tfunction center(a, b) {\n\t\treturn {\n\t\t\tx: (a.x + b.x) / 2,\n\t\t\ty: (a.y + b.y) / 2\n\t\t};\n\t}\n\t_Point.center = center;\n\tfunction centroid(points) {\n\t\tlet sumX = 0;\n\t\tlet sumY = 0;\n\t\tpoints.forEach((point) => {\n\t\t\tsumX += point.x;\n\t\t\tsumY += point.y;\n\t\t});\n\t\treturn {\n\t\t\tx: sumX / points.length,\n\t\t\ty: sumY / points.length\n\t\t};\n\t}\n\t_Point.centroid = centroid;\n\tfunction sortClockwise(points) {\n\t\tconst centerPoint = Point.centroid(points);\n\t\tconst angles = /* @__PURE__ */ new Map();\n\t\tfor (let i = 0; i < points.length; i++) {\n\t\t\tconst point = points[i];\n\t\t\tif (!point) continue;\n\t\t\tangles.set(point, Math.atan2(point.y - centerPoint.y, point.x - centerPoint.x));\n\t\t}\n\t\treturn points.sort((a, b) => (angles.get(a) ?? 0) - (angles.get(b) ?? 0));\n\t}\n\t_Point.sortClockwise = sortClockwise;\n})(Point || (Point = {}));\n\n//#endregion\n//#region ../../library/src/animation/Animators/BezierAnimator.ts\nconst BezierDefaults = {\n\tcurve: \"ease\",\n\tduration: 1\n};\nfunction controlPointsForCurve(curve) {\n\tswitch (curve) {\n\t\tcase \"linear\": return [\n\t\t\t0,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1\n\t\t];\n\t\tcase \"ease\": return [\n\t\t\t.25,\n\t\t\t.1,\n\t\t\t.25,\n\t\t\t1\n\t\t];\n\t\tcase \"ease-in\": return [\n\t\t\t.42,\n\t\t\t0,\n\t\t\t1,\n\t\t\t1\n\t\t];\n\t\tcase \"ease-out\": return [\n\t\t\t0,\n\t\t\t0,\n\t\t\t.58,\n\t\t\t1\n\t\t];\n\t\tcase \"ease-in-out\": return [\n\t\t\t.42,\n\t\t\t0,\n\t\t\t.58,\n\t\t\t1\n\t\t];\n\t}\n}\n/**\n* Animator class using a bezier curve.\n* @internal\n* @deprecated Use the `transition` prop instead\n*/\nvar BezierAnimator = class {\n\tinterpolation;\n\tunitBezier;\n\toptions;\n\tcurrent;\n\tdestination;\n\tinterpolator;\n\tprogress = 0;\n\tconstructor(options, interpolation) {\n\t\tthis.interpolation = interpolation;\n\t\tthis.options = {\n\t\t\t...BezierDefaults,\n\t\t\t...options\n\t\t};\n\t\tlet controlPoints;\n\t\tif (typeof this.options.curve === \"string\") controlPoints = controlPointsForCurve(this.options.curve);\n\t\telse controlPoints = this.options.curve;\n\t\tconst [p1x, p1y, p2x, p2y] = controlPoints;\n\t\tthis.unitBezier = new UnitBezier(Point(p1x, p1y), Point(p2x, p2y));\n\t}\n\tsetFrom(value) {\n\t\tthis.current = value;\n\t\tthis.updateInterpolator();\n\t}\n\tsetTo(value) {\n\t\tthis.destination = value;\n\t\tthis.updateInterpolator();\n\t}\n\tisReady() {\n\t\treturn this.interpolator !== void 0;\n\t}\n\tupdateInterpolator() {\n\t\tif (this.current === void 0 || this.destination === void 0) return;\n\t\tthis.interpolator = this.interpolation.interpolate(this.current, this.destination);\n\t}\n\tnext = (delta) => {\n\t\tconst { duration } = this.options;\n\t\tthis.progress += delta / duration;\n\t\tconst value = this.unitBezier.solve(this.progress, this.solveEpsilon(duration));\n\t\tassert$1(this.interpolator !== void 0, \"setFrom() or setTo() must be called before next()\");\n\t\tthis.current = this.interpolator(value);\n\t\treturn this.current;\n\t};\n\tisFinished() {\n\t\treturn this.progress >= 1;\n\t}\n\tsolveEpsilon(duration) {\n\t\treturn 1 / (200 * duration);\n\t}\n};\nvar UnitBezier = class {\n\ta;\n\tb;\n\tc;\n\tconstructor(point1, point2) {\n\t\tthis.c = Point.multiply(point1, 3);\n\t\tthis.b = Point.subtract(Point.multiply(Point.subtract(point2, point1), 3), this.c);\n\t\tthis.a = Point.subtract(Point.subtract(Point(1, 1), this.c), this.b);\n\t}\n\tsolve(x, epsilon) {\n\t\treturn this.sampleY(this.solveForT(x, epsilon));\n\t}\n\tsampleX(t) {\n\t\treturn ((this.a.x * t + this.b.x) * t + this.c.x) * t;\n\t}\n\tsampleY(t) {\n\t\treturn ((this.a.y * t + this.b.y) * t + this.c.y) * t;\n\t}\n\tsampleDerivativeX(t) {\n\t\treturn (3 * this.a.x * t + 2 * this.b.x) * t + this.c.x;\n\t}\n\tsolveForT(x, epsilon) {\n\t\tlet t0, t1, t2, x2, d2, i;\n\t\tt2 = x;\n\t\tfor (i = 0; i < 8; ++i) {\n\t\t\tx2 = this.sampleX(t2) - x;\n\t\t\tif (Math.abs(x2) < epsilon) return t2;\n\t\t\td2 = this.sampleDerivativeX(t2);\n\t\t\tif (Math.abs(d2) < epsilon) break;\n\t\t\tt2 = t2 - x2 / d2;\n\t\t}\n\t\tt0 = 0;\n\t\tt1 = 1;\n\t\tt2 = x;\n\t\tif (t2 < t0) return t0;\n\t\tif (t2 > t1) return t1;\n\t\twhile (t0 < t1) {\n\t\t\tx2 = this.sampleX(t2);\n\t\t\tif (Math.abs(x2 - x) < epsilon) return t2;\n\t\t\tif (x > x2) t0 = t2;\n\t\t\telse t1 = t2;\n\t\t\tt2 = (t1 - t0) * .5 + t0;\n\t\t}\n\t\treturn t2;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/animation/Animators/Integrator.ts\n/**\n* @internal\n*/\nvar Integrator = class {\n\taccelerationForState;\n\tconstructor(accelerationFunction) {\n\t\tthis.accelerationForState = accelerationFunction;\n\t}\n\tintegrateState(state, dt) {\n\t\tconst a = this.evaluateState(state);\n\t\tconst b = this.evaluateStateWithDerivative(state, dt * .5, a);\n\t\tconst c = this.evaluateStateWithDerivative(state, dt * .5, b);\n\t\tconst d = this.evaluateStateWithDerivative(state, dt, c);\n\t\tconst dxdt = 1 / 6 * (a.dx + 2 * (b.dx + c.dx) + d.dx);\n\t\tconst dvdt = 1 / 6 * (a.dv + 2 * (b.dv + c.dv) + d.dv);\n\t\tstate.x = state.x + dxdt * dt;\n\t\tstate.v = state.v + dvdt * dt;\n\t\treturn state;\n\t}\n\tevaluateState(initialState) {\n\t\tconst dv = this.accelerationForState(initialState);\n\t\treturn {\n\t\t\tdx: initialState.v,\n\t\t\tdv\n\t\t};\n\t}\n\tevaluateStateWithDerivative(initialState, dt, derivative) {\n\t\tconst state = {\n\t\t\tx: initialState.x + derivative.dx * dt,\n\t\t\tv: initialState.v + derivative.dv * dt\n\t\t};\n\t\treturn {\n\t\t\tdx: state.v,\n\t\t\tdv: this.accelerationForState(state)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/animation/Animators/SpringCurveValueConverter.ts\nconst epsilon = .001;\nconst minDuration = .01;\nconst maxDuration = 10;\nconst minDamping = /* @__PURE__ */ (() => Number.MIN_VALUE)();\nconst maxDamping = 1;\nfunction approximateRoot(func, derivative, initialGuess, times = 12) {\n\tlet result = initialGuess;\n\tfor (let i = 1, end = times, asc = 1 <= end; asc ? i < end : i > end; asc ? i++ : i--) result = result - func(result) / derivative(result);\n\treturn result;\n}\nfunction angularFrequency(undampedFrequency, dampingRatio) {\n\treturn undampedFrequency * Math.sqrt(1 - dampingRatio ** 2);\n}\nconst SpringCurveValueConverter = {\n\tcomputeDampingRatio: (tension, friction, mass = 1) => {\n\t\treturn friction / (2 * Math.sqrt(mass * tension));\n\t},\n\tcomputeDuration: (tension, friction, velocity = 0, mass = 1) => {\n\t\tlet duration;\n\t\tconst dampingRatio = SpringCurveValueConverter.computeDampingRatio(tension, friction);\n\t\tconst undampedFrequency = Math.sqrt(tension / mass);\n\t\tif (dampingRatio < 1) {\n\t\t\tconst a = Math.sqrt(1 - dampingRatio ** 2);\n\t\t\tconst d = -((velocity / (a * undampedFrequency) - dampingRatio / a) / epsilon);\n\t\t\tif (d <= 0) return null;\n\t\t\tduration = Math.log(d) / (dampingRatio * undampedFrequency);\n\t\t} else return null;\n\t\treturn duration;\n\t},\n\tcomputeDerivedCurveOptions: (dampingRatio, duration, velocity = 0, mass = 1) => {\n\t\tlet derivative, envelope;\n\t\tdampingRatio = Math.max(Math.min(dampingRatio, maxDamping), minDamping);\n\t\tduration = Math.max(Math.min(duration, maxDuration), minDuration);\n\t\tif (dampingRatio < 1) {\n\t\t\tenvelope = function(envelopeUndampedFrequency) {\n\t\t\t\tconst exponentialDecay = envelopeUndampedFrequency * dampingRatio;\n\t\t\t\tconst currentDisplacement = exponentialDecay * duration;\n\t\t\t\tconst a = exponentialDecay - velocity;\n\t\t\t\tconst b = angularFrequency(envelopeUndampedFrequency, dampingRatio);\n\t\t\t\tconst c = Math.exp(-currentDisplacement);\n\t\t\t\treturn epsilon - a / b * c;\n\t\t\t};\n\t\t\tderivative = function(derivativeUndampedFrequency) {\n\t\t\t\tconst currentDisplacement = derivativeUndampedFrequency * dampingRatio * duration;\n\t\t\t\tconst d = currentDisplacement * velocity + velocity;\n\t\t\t\tconst e = dampingRatio ** 2 * derivativeUndampedFrequency ** 2 * duration;\n\t\t\t\tconst f = Math.exp(-currentDisplacement);\n\t\t\t\tconst g = angularFrequency(derivativeUndampedFrequency ** 2, dampingRatio);\n\t\t\t\treturn (-envelope(derivativeUndampedFrequency) + epsilon > 0 ? -1 : 1) * ((d - e) * f) / g;\n\t\t\t};\n\t\t} else {\n\t\t\tenvelope = function(envelopeUndampedFrequency) {\n\t\t\t\treturn -.001 + Math.exp(-envelopeUndampedFrequency * duration) * ((envelopeUndampedFrequency - velocity) * duration + 1);\n\t\t\t};\n\t\t\tderivative = function(derivativeUndampedFrequency) {\n\t\t\t\treturn Math.exp(-derivativeUndampedFrequency * duration) * ((velocity - derivativeUndampedFrequency) * duration ** 2);\n\t\t\t};\n\t\t}\n\t\tconst result = {\n\t\t\ttension: 100,\n\t\t\tfriction: 10,\n\t\t\tvelocity\n\t\t};\n\t\tconst initialGuess = 5 / duration;\n\t\tconst undampedFrequency = approximateRoot(envelope, derivative, initialGuess);\n\t\tif (!Number.isNaN(undampedFrequency)) {\n\t\t\tresult.tension = undampedFrequency ** 2 * mass;\n\t\t\tresult.friction = dampingRatio * 2 * Math.sqrt(mass * result.tension);\n\t\t}\n\t\treturn result;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/animation/Animators/SpringAnimator.ts\nconst SpringTensionFrictionDefaults = /* @__PURE__ */ (() => ({\n\ttension: 500,\n\tfriction: 10,\n\ttolerance: 1 / 1e4,\n\tvelocity: 0\n}))();\nconst SpringDampingDurationDefaults = {\n\tdampingRatio: 1,\n\tduration: 1,\n\tvelocity: 0,\n\tmass: 1\n};\nfunction isDampingDurationSpringOptions(options) {\n\tif (!options) return false;\n\treturn typeof options.dampingRatio === \"number\" || typeof options.duration === \"number\" || typeof options.mass === \"number\";\n}\n/**\n* Animator class using a spring curve\n* @internal\n* @deprecated Use the `transition` prop instead\n*/\nvar SpringAnimator = class {\n\tinterpolation;\n\toptions;\n\tcurrent;\n\tdestination;\n\tdifference;\n\tstate;\n\tintegrator;\n\tinterpolator;\n\tconstructor(options, interpolation) {\n\t\tthis.interpolation = interpolation;\n\t\tlet _opt;\n\t\tif (isDampingDurationSpringOptions(options)) {\n\t\t\tconst toPass = {\n\t\t\t\t...SpringDampingDurationDefaults,\n\t\t\t\t...options\n\t\t\t};\n\t\t\t_opt = SpringCurveValueConverter.computeDerivedCurveOptions(toPass.dampingRatio, toPass.duration, toPass.velocity, toPass.mass);\n\t\t} else _opt = options;\n\t\tthis.options = {\n\t\t\t...SpringTensionFrictionDefaults,\n\t\t\t..._opt\n\t\t};\n\t\tthis.state = {\n\t\t\tx: 0,\n\t\t\tv: this.options.velocity\n\t\t};\n\t\tthis.integrator = new Integrator((state) => -this.options.tension * state.x - this.options.friction * state.v);\n\t}\n\tisReady() {\n\t\treturn this.interpolator !== void 0 && this.difference !== void 0;\n\t}\n\tnext(delta) {\n\t\tthis.state = this.integrator.integrateState(this.state, delta);\n\t\tassert$1(this.interpolator !== void 0, \"setFrom() or setTo() must be called before next()\");\n\t\treturn this.interpolator(this.progress());\n\t}\n\tisFinished() {\n\t\tconst positionNearZero = Math.abs(this.state.x) < this.options.tolerance;\n\t\tconst velocityNearZero = Math.abs(this.state.v) < this.options.tolerance;\n\t\treturn positionNearZero && velocityNearZero;\n\t}\n\tsetFrom(value) {\n\t\tthis.current = value;\n\t\tthis.updateInterpolator();\n\t}\n\tsetVelocity(velocity) {\n\t\tthis.state.v = velocity;\n\t}\n\tprogress() {\n\t\tassert$1(this.difference !== void 0, \"setTo() must be called before progress()\");\n\t\treturn 1 - this.state.x / this.difference;\n\t}\n\tsetTo(value) {\n\t\tassert$1(this.current !== void 0, \"setFrom() must be called before setTo()\");\n\t\tthis.destination = value;\n\t\tthis.difference = this.interpolation.difference(this.destination, this.current);\n\t\tthis.state.x = this.difference;\n\t\tthis.updateInterpolator();\n\t}\n\t/** @internal */\n\tgetState() {\n\t\treturn this.state;\n\t}\n\tupdateInterpolator() {\n\t\tif (this.current === void 0 || this.destination === void 0) return;\n\t\tthis.interpolator = this.interpolation.interpolate(this.current, this.destination);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/render/types/Color/CSSNames.ts\nconst cssNames = {\n\taliceblue: \"f0f8ff\",\n\tantiquewhite: \"faebd7\",\n\taqua: \"0ff\",\n\taquamarine: \"7fffd4\",\n\tazure: \"f0ffff\",\n\tbeige: \"f5f5dc\",\n\tbisque: \"ffe4c4\",\n\tblack: \"000\",\n\tblanchedalmond: \"ffebcd\",\n\tblue: \"00f\",\n\tblueviolet: \"8a2be2\",\n\tbrown: \"a52a2a\",\n\tburlywood: \"deb887\",\n\tburntsienna: \"ea7e5d\",\n\tcadetblue: \"5f9ea0\",\n\tchartreuse: \"7fff00\",\n\tchocolate: \"d2691e\",\n\tcoral: \"ff7f50\",\n\tcornflowerblue: \"6495ed\",\n\tcornsilk: \"fff8dc\",\n\tcrimson: \"dc143c\",\n\tcyan: \"0ff\",\n\tdarkblue: \"00008b\",\n\tdarkcyan: \"008b8b\",\n\tdarkgoldenrod: \"b8860b\",\n\tdarkgray: \"a9a9a9\",\n\tdarkgreen: \"006400\",\n\tdarkgrey: \"a9a9a9\",\n\tdarkkhaki: \"bdb76b\",\n\tdarkmagenta: \"8b008b\",\n\tdarkolivegreen: \"556b2f\",\n\tdarkorange: \"ff8c00\",\n\tdarkorchid: \"9932cc\",\n\tdarkred: \"8b0000\",\n\tdarksalmon: \"e9967a\",\n\tdarkseagreen: \"8fbc8f\",\n\tdarkslateblue: \"483d8b\",\n\tdarkslategray: \"2f4f4f\",\n\tdarkslategrey: \"2f4f4f\",\n\tdarkturquoise: \"00ced1\",\n\tdarkviolet: \"9400d3\",\n\tdeeppink: \"ff1493\",\n\tdeepskyblue: \"00bfff\",\n\tdimgray: \"696969\",\n\tdimgrey: \"696969\",\n\tdodgerblue: \"1e90ff\",\n\tfirebrick: \"b22222\",\n\tfloralwhite: \"fffaf0\",\n\tforestgreen: \"228b22\",\n\tfuchsia: \"f0f\",\n\tgainsboro: \"dcdcdc\",\n\tghostwhite: \"f8f8ff\",\n\tgold: \"ffd700\",\n\tgoldenrod: \"daa520\",\n\tgray: \"808080\",\n\tgreen: \"008000\",\n\tgreenyellow: \"adff2f\",\n\tgrey: \"808080\",\n\thoneydew: \"f0fff0\",\n\thotpink: \"ff69b4\",\n\tindianred: \"cd5c5c\",\n\tindigo: \"4b0082\",\n\tivory: \"fffff0\",\n\tkhaki: \"f0e68c\",\n\tlavender: \"e6e6fa\",\n\tlavenderblush: \"fff0f5\",\n\tlawngreen: \"7cfc00\",\n\tlemonchiffon: \"fffacd\",\n\tlightblue: \"add8e6\",\n\tlightcoral: \"f08080\",\n\tlightcyan: \"e0ffff\",\n\tlightgoldenrodyellow: \"fafad2\",\n\tlightgray: \"d3d3d3\",\n\tlightgreen: \"90ee90\",\n\tlightgrey: \"d3d3d3\",\n\tlightpink: \"ffb6c1\",\n\tlightsalmon: \"ffa07a\",\n\tlightseagreen: \"20b2aa\",\n\tlightskyblue: \"87cefa\",\n\tlightslategray: \"789\",\n\tlightslategrey: \"789\",\n\tlightsteelblue: \"b0c4de\",\n\tlightyellow: \"ffffe0\",\n\tlime: \"0f0\",\n\tlimegreen: \"32cd32\",\n\tlinen: \"faf0e6\",\n\tmagenta: \"f0f\",\n\tmaroon: \"800000\",\n\tmediumaquamarine: \"66cdaa\",\n\tmediumblue: \"0000cd\",\n\tmediumorchid: \"ba55d3\",\n\tmediumpurple: \"9370db\",\n\tmediumseagreen: \"3cb371\",\n\tmediumslateblue: \"7b68ee\",\n\tmediumspringgreen: \"00fa9a\",\n\tmediumturquoise: \"48d1cc\",\n\tmediumvioletred: \"c71585\",\n\tmidnightblue: \"191970\",\n\tmintcream: \"f5fffa\",\n\tmistyrose: \"ffe4e1\",\n\tmoccasin: \"ffe4b5\",\n\tnavajowhite: \"ffdead\",\n\tnavy: \"000080\",\n\toldlace: \"fdf5e6\",\n\tolive: \"808000\",\n\tolivedrab: \"6b8e23\",\n\torange: \"ffa500\",\n\torangered: \"ff4500\",\n\torchid: \"da70d6\",\n\tpalegoldenrod: \"eee8aa\",\n\tpalegreen: \"98fb98\",\n\tpaleturquoise: \"afeeee\",\n\tpalevioletred: \"db7093\",\n\tpapayawhip: \"ffefd5\",\n\tpeachpuff: \"ffdab9\",\n\tperu: \"cd853f\",\n\tpink: \"ffc0cb\",\n\tplum: \"dda0dd\",\n\tpowderblue: \"b0e0e6\",\n\tpurple: \"800080\",\n\trebeccapurple: \"663399\",\n\tred: \"f00\",\n\trosybrown: \"bc8f8f\",\n\troyalblue: \"4169e1\",\n\tsaddlebrown: \"8b4513\",\n\tsalmon: \"fa8072\",\n\tsandybrown: \"f4a460\",\n\tseagreen: \"2e8b57\",\n\tseashell: \"fff5ee\",\n\tsienna: \"a0522d\",\n\tsilver: \"c0c0c0\",\n\tskyblue: \"87ceeb\",\n\tslateblue: \"6a5acd\",\n\tslategray: \"708090\",\n\tslategrey: \"708090\",\n\tsnow: \"fffafa\",\n\tspringgreen: \"00ff7f\",\n\tsteelblue: \"4682b4\",\n\ttan: \"d2b48c\",\n\tteal: \"008080\",\n\tthistle: \"d8bfd8\",\n\ttomato: \"ff6347\",\n\tturquoise: \"40e0d0\",\n\tviolet: \"ee82ee\",\n\twheat: \"f5deb3\",\n\twhite: \"fff\",\n\twhitesmoke: \"f5f5f5\",\n\tyellow: \"ff0\",\n\tyellowgreen: \"9acd32\"\n};\n\n//#endregion\n//#region ../../library/src/render/types/Color/Utils.ts\nfunction modulate(value, rangeA, rangeB, limit = false) {\n\tconst [fromLow, fromHigh] = rangeA;\n\tconst [toLow, toHigh] = rangeB;\n\tconst fromDelta = fromHigh - fromLow;\n\tif (fromDelta === 0) return (toHigh + toLow) / 2;\n\tconst toDelta = toHigh - toLow;\n\tif (toDelta === 0) return toLow;\n\tconst result = toLow + (value - fromLow) / fromDelta * toDelta;\n\tif (limit === true) {\n\t\tif (toLow < toHigh) {\n\t\t\tif (result < toLow) return toLow;\n\t\t\tif (result > toHigh) return toHigh;\n\t\t} else {\n\t\t\tif (result > toLow) return toLow;\n\t\t\tif (result < toHigh) return toHigh;\n\t\t}\n\t}\n\treturn result;\n}\nfunction isNumeric(value) {\n\treturn !Number.isNaN(value) && Number.isFinite(value);\n}\nfunction percentToFraction(val) {\n\tconst digits = numberFromString(val);\n\tif (digits !== void 0) {\n\t\tif (val.includes(\"%\")) return digits / 100;\n\t\treturn digits;\n\t}\n\treturn 0;\n}\nfunction numberFromString(input) {\n\tconst match = /\\d?\\.?\\d+/u.exec(input);\n\treturn match ? Number(match[0]) : void 0;\n}\n\n//#endregion\n//#region ../../library/src/render/types/Color/types.ts\n/** @public */\nlet ColorFormat = /* @__PURE__ */ function(ColorFormat) {\n\tColorFormat[\"RGB\"] = \"rgb\";\n\tColorFormat[\"HSL\"] = \"hsl\";\n\tColorFormat[\"HSV\"] = \"hsv\";\n\tColorFormat[\"HEX\"] = \"hex\";\n\tColorFormat[\"NAME\"] = \"name\";\n\treturn ColorFormat;\n}({});\n/**\n* Various Color functions, such as {@link (Color:namespace).mix} and {@link\n* (Color:namespace).interpolate}, take an optional color model that\n* determines how two colors are mixed together.\n*\n* @remarks\n*\n* ```javascript\n* const newColor = Color.mix(Color(\"red\"), Color(\"blue\"), {model: ColorMixModelType.HSL})\n* ```\n*\n* @public\n*/\nlet ColorMixModelType = /* @__PURE__ */ function(ColorMixModelType) {\n\t/**\n\t* Use the {@link https://en.wikipedia.org/wiki/RGB_color_model | RGB color space} without an alpha value\n\t*\n\t* @remarks\n\t*\n\t* ```javascript\n\t* const newColor = Color.mix(Color(\"red\"), Color(\"blue\"), {model: ColorMixModelType.RGB})\n\t* ```\n\t*\n\t* @public\n\t*/\n\tColorMixModelType[\"RGB\"] = \"rgb\";\n\t/**\n\t* Use the {@link https://en.wikipedia.org/wiki/RGB_color_model | RGB color space} color space with an alpha value\n\t*\n\t* @remarks\n\t*\n\t* ```javascript\n\t* const newColor = Color.mix(Color(\"red\"), Color(\"blue\"), {model: ColorMixModelType.RGBA})\n\t* ```\n\t*\n\t* @public\n\t*/\n\tColorMixModelType[\"RGBA\"] = \"rgba\";\n\t/**\n\t* Use the {@link https://en.wikipedia.org/wiki/HSL_and_HSV | HSL} color space with an alpha value\n\t*\n\t* @remarks\n\t*\n\t* ```javascript\n\t* const newColor = Color.mix(Color(\"red\"), Color(\"blue\"), {model: ColorMixModelType.HSL})\n\t* ```\n\t*\n\t* @public\n\t*/\n\tColorMixModelType[\"HSL\"] = \"hsl\";\n\t/**\n\t* Use the {@link https://en.wikipedia.org/wiki/HSL_and_HSV | HSL} color space with an alpha value\n\t*\n\t* @remarks\n\t*\n\t* ```javascript\n\t* const newColor = Color.mix(Color(\"red\"), Color(\"blue\"), {model: ColorMixModelType.HSLA})\n\t* ```\n\t*\n\t* @public\n\t*/\n\tColorMixModelType[\"HSLA\"] = \"hsla\";\n\t/**\n\t* Use the {@link http://www.hsluv.org | HSLuv } human friendly color model\n\t*\n\t* @remarks\n\t*\n\t* ```javascript\n\t* const newColor = Color.mix(Color(\"red\"), Color(\"blue\"), {model: ColorMixModelType.HUSL})\n\t* ```\n\t*\n\t* @public\n\t*/\n\tColorMixModelType[\"HUSL\"] = \"husl\";\n\treturn ColorMixModelType;\n}({});\n\n//#endregion\n//#region ../../../node_modules/hsluv/dist/hsluv.mjs\nvar Hsluv = class Hsluv {\n\tconstructor() {\n\t\tthis.hex = \"#000000\";\n\t\tthis.rgb_r = 0;\n\t\tthis.rgb_g = 0;\n\t\tthis.rgb_b = 0;\n\t\tthis.xyz_x = 0;\n\t\tthis.xyz_y = 0;\n\t\tthis.xyz_z = 0;\n\t\tthis.luv_l = 0;\n\t\tthis.luv_u = 0;\n\t\tthis.luv_v = 0;\n\t\tthis.lch_l = 0;\n\t\tthis.lch_c = 0;\n\t\tthis.lch_h = 0;\n\t\tthis.hsluv_h = 0;\n\t\tthis.hsluv_s = 0;\n\t\tthis.hsluv_l = 0;\n\t\tthis.hpluv_h = 0;\n\t\tthis.hpluv_p = 0;\n\t\tthis.hpluv_l = 0;\n\t\tthis.r0s = 0;\n\t\tthis.r0i = 0;\n\t\tthis.r1s = 0;\n\t\tthis.r1i = 0;\n\t\tthis.g0s = 0;\n\t\tthis.g0i = 0;\n\t\tthis.g1s = 0;\n\t\tthis.g1i = 0;\n\t\tthis.b0s = 0;\n\t\tthis.b0i = 0;\n\t\tthis.b1s = 0;\n\t\tthis.b1i = 0;\n\t}\n\tstatic fromLinear(c) {\n\t\tif (c <= .0031308) return 12.92 * c;\n\t\telse return 1.055 * Math.pow(c, 1 / 2.4) - .055;\n\t}\n\tstatic toLinear(c) {\n\t\tif (c > .04045) return Math.pow((c + .055) / 1.055, 2.4);\n\t\telse return c / 12.92;\n\t}\n\tstatic yToL(Y) {\n\t\tif (Y <= Hsluv.epsilon) return Y / Hsluv.refY * Hsluv.kappa;\n\t\telse return 116 * Math.pow(Y / Hsluv.refY, 1 / 3) - 16;\n\t}\n\tstatic lToY(L) {\n\t\tif (L <= 8) return Hsluv.refY * L / Hsluv.kappa;\n\t\telse return Hsluv.refY * Math.pow((L + 16) / 116, 3);\n\t}\n\tstatic rgbChannelToHex(chan) {\n\t\tconst c = Math.round(chan * 255);\n\t\tconst digit2 = c % 16;\n\t\tconst digit1 = (c - digit2) / 16 | 0;\n\t\treturn Hsluv.hexChars.charAt(digit1) + Hsluv.hexChars.charAt(digit2);\n\t}\n\tstatic hexToRgbChannel(hex, offset) {\n\t\tconst digit1 = Hsluv.hexChars.indexOf(hex.charAt(offset));\n\t\tconst digit2 = Hsluv.hexChars.indexOf(hex.charAt(offset + 1));\n\t\treturn (digit1 * 16 + digit2) / 255;\n\t}\n\tstatic distanceFromOriginAngle(slope, intercept, angle) {\n\t\tconst d = intercept / (Math.sin(angle) - slope * Math.cos(angle));\n\t\tif (d < 0) return Infinity;\n\t\telse return d;\n\t}\n\tstatic distanceFromOrigin(slope, intercept) {\n\t\treturn Math.abs(intercept) / Math.sqrt(Math.pow(slope, 2) + 1);\n\t}\n\tstatic min6(f1, f2, f3, f4, f5, f6) {\n\t\treturn Math.min(f1, Math.min(f2, Math.min(f3, Math.min(f4, Math.min(f5, f6)))));\n\t}\n\trgbToHex() {\n\t\tthis.hex = \"#\";\n\t\tthis.hex += Hsluv.rgbChannelToHex(this.rgb_r);\n\t\tthis.hex += Hsluv.rgbChannelToHex(this.rgb_g);\n\t\tthis.hex += Hsluv.rgbChannelToHex(this.rgb_b);\n\t}\n\thexToRgb() {\n\t\tthis.hex = this.hex.toLowerCase();\n\t\tthis.rgb_r = Hsluv.hexToRgbChannel(this.hex, 1);\n\t\tthis.rgb_g = Hsluv.hexToRgbChannel(this.hex, 3);\n\t\tthis.rgb_b = Hsluv.hexToRgbChannel(this.hex, 5);\n\t}\n\txyzToRgb() {\n\t\tthis.rgb_r = Hsluv.fromLinear(Hsluv.m_r0 * this.xyz_x + Hsluv.m_r1 * this.xyz_y + Hsluv.m_r2 * this.xyz_z);\n\t\tthis.rgb_g = Hsluv.fromLinear(Hsluv.m_g0 * this.xyz_x + Hsluv.m_g1 * this.xyz_y + Hsluv.m_g2 * this.xyz_z);\n\t\tthis.rgb_b = Hsluv.fromLinear(Hsluv.m_b0 * this.xyz_x + Hsluv.m_b1 * this.xyz_y + Hsluv.m_b2 * this.xyz_z);\n\t}\n\trgbToXyz() {\n\t\tconst lr = Hsluv.toLinear(this.rgb_r);\n\t\tconst lg = Hsluv.toLinear(this.rgb_g);\n\t\tconst lb = Hsluv.toLinear(this.rgb_b);\n\t\tthis.xyz_x = .41239079926595 * lr + .35758433938387 * lg + .18048078840183 * lb;\n\t\tthis.xyz_y = .21263900587151 * lr + .71516867876775 * lg + .072192315360733 * lb;\n\t\tthis.xyz_z = .019330818715591 * lr + .11919477979462 * lg + .95053215224966 * lb;\n\t}\n\txyzToLuv() {\n\t\tconst divider = this.xyz_x + 15 * this.xyz_y + 3 * this.xyz_z;\n\t\tlet varU = 4 * this.xyz_x;\n\t\tlet varV = 9 * this.xyz_y;\n\t\tif (divider !== 0) {\n\t\t\tvarU /= divider;\n\t\t\tvarV /= divider;\n\t\t} else {\n\t\t\tvarU = NaN;\n\t\t\tvarV = NaN;\n\t\t}\n\t\tthis.luv_l = Hsluv.yToL(this.xyz_y);\n\t\tif (this.luv_l === 0) {\n\t\t\tthis.luv_u = 0;\n\t\t\tthis.luv_v = 0;\n\t\t} else {\n\t\t\tthis.luv_u = 13 * this.luv_l * (varU - Hsluv.refU);\n\t\t\tthis.luv_v = 13 * this.luv_l * (varV - Hsluv.refV);\n\t\t}\n\t}\n\tluvToXyz() {\n\t\tif (this.luv_l === 0) {\n\t\t\tthis.xyz_x = 0;\n\t\t\tthis.xyz_y = 0;\n\t\t\tthis.xyz_z = 0;\n\t\t\treturn;\n\t\t}\n\t\tconst varU = this.luv_u / (13 * this.luv_l) + Hsluv.refU;\n\t\tconst varV = this.luv_v / (13 * this.luv_l) + Hsluv.refV;\n\t\tthis.xyz_y = Hsluv.lToY(this.luv_l);\n\t\tthis.xyz_x = 0 - 9 * this.xyz_y * varU / ((varU - 4) * varV - varU * varV);\n\t\tthis.xyz_z = (9 * this.xyz_y - 15 * varV * this.xyz_y - varV * this.xyz_x) / (3 * varV);\n\t}\n\tluvToLch() {\n\t\tthis.lch_l = this.luv_l;\n\t\tthis.lch_c = Math.sqrt(this.luv_u * this.luv_u + this.luv_v * this.luv_v);\n\t\tif (this.lch_c < 1e-8) this.lch_h = 0;\n\t\telse {\n\t\t\tconst hrad = Math.atan2(this.luv_v, this.luv_u);\n\t\t\tthis.lch_h = hrad * 180 / Math.PI;\n\t\t\tif (this.lch_h < 0) this.lch_h = 360 + this.lch_h;\n\t\t}\n\t}\n\tlchToLuv() {\n\t\tconst hrad = this.lch_h / 180 * Math.PI;\n\t\tthis.luv_l = this.lch_l;\n\t\tthis.luv_u = Math.cos(hrad) * this.lch_c;\n\t\tthis.luv_v = Math.sin(hrad) * this.lch_c;\n\t}\n\tcalculateBoundingLines(l) {\n\t\tconst sub1 = Math.pow(l + 16, 3) / 1560896;\n\t\tconst sub2 = sub1 > Hsluv.epsilon ? sub1 : l / Hsluv.kappa;\n\t\tconst s1r = sub2 * (284517 * Hsluv.m_r0 - 94839 * Hsluv.m_r2);\n\t\tconst s2r = sub2 * (838422 * Hsluv.m_r2 + 769860 * Hsluv.m_r1 + 731718 * Hsluv.m_r0);\n\t\tconst s3r = sub2 * (632260 * Hsluv.m_r2 - 126452 * Hsluv.m_r1);\n\t\tconst s1g = sub2 * (284517 * Hsluv.m_g0 - 94839 * Hsluv.m_g2);\n\t\tconst s2g = sub2 * (838422 * Hsluv.m_g2 + 769860 * Hsluv.m_g1 + 731718 * Hsluv.m_g0);\n\t\tconst s3g = sub2 * (632260 * Hsluv.m_g2 - 126452 * Hsluv.m_g1);\n\t\tconst s1b = sub2 * (284517 * Hsluv.m_b0 - 94839 * Hsluv.m_b2);\n\t\tconst s2b = sub2 * (838422 * Hsluv.m_b2 + 769860 * Hsluv.m_b1 + 731718 * Hsluv.m_b0);\n\t\tconst s3b = sub2 * (632260 * Hsluv.m_b2 - 126452 * Hsluv.m_b1);\n\t\tthis.r0s = s1r / s3r;\n\t\tthis.r0i = s2r * l / s3r;\n\t\tthis.r1s = s1r / (s3r + 126452);\n\t\tthis.r1i = (s2r - 769860) * l / (s3r + 126452);\n\t\tthis.g0s = s1g / s3g;\n\t\tthis.g0i = s2g * l / s3g;\n\t\tthis.g1s = s1g / (s3g + 126452);\n\t\tthis.g1i = (s2g - 769860) * l / (s3g + 126452);\n\t\tthis.b0s = s1b / s3b;\n\t\tthis.b0i = s2b * l / s3b;\n\t\tthis.b1s = s1b / (s3b + 126452);\n\t\tthis.b1i = (s2b - 769860) * l / (s3b + 126452);\n\t}\n\tcalcMaxChromaHpluv() {\n\t\tconst r0 = Hsluv.distanceFromOrigin(this.r0s, this.r0i);\n\t\tconst r1 = Hsluv.distanceFromOrigin(this.r1s, this.r1i);\n\t\tconst g0 = Hsluv.distanceFromOrigin(this.g0s, this.g0i);\n\t\tconst g1 = Hsluv.distanceFromOrigin(this.g1s, this.g1i);\n\t\tconst b0 = Hsluv.distanceFromOrigin(this.b0s, this.b0i);\n\t\tconst b1 = Hsluv.distanceFromOrigin(this.b1s, this.b1i);\n\t\treturn Hsluv.min6(r0, r1, g0, g1, b0, b1);\n\t}\n\tcalcMaxChromaHsluv(h) {\n\t\tconst hueRad = h / 360 * Math.PI * 2;\n\t\tconst r0 = Hsluv.distanceFromOriginAngle(this.r0s, this.r0i, hueRad);\n\t\tconst r1 = Hsluv.distanceFromOriginAngle(this.r1s, this.r1i, hueRad);\n\t\tconst g0 = Hsluv.distanceFromOriginAngle(this.g0s, this.g0i, hueRad);\n\t\tconst g1 = Hsluv.distanceFromOriginAngle(this.g1s, this.g1i, hueRad);\n\t\tconst b0 = Hsluv.distanceFromOriginAngle(this.b0s, this.b0i, hueRad);\n\t\tconst b1 = Hsluv.distanceFromOriginAngle(this.b1s, this.b1i, hueRad);\n\t\treturn Hsluv.min6(r0, r1, g0, g1, b0, b1);\n\t}\n\thsluvToLch() {\n\t\tif (this.hsluv_l > 99.9999999) {\n\t\t\tthis.lch_l = 100;\n\t\t\tthis.lch_c = 0;\n\t\t} else if (this.hsluv_l < 1e-8) {\n\t\t\tthis.lch_l = 0;\n\t\t\tthis.lch_c = 0;\n\t\t} else {\n\t\t\tthis.lch_l = this.hsluv_l;\n\t\t\tthis.calculateBoundingLines(this.hsluv_l);\n\t\t\tconst max = this.calcMaxChromaHsluv(this.hsluv_h);\n\t\t\tthis.lch_c = max / 100 * this.hsluv_s;\n\t\t}\n\t\tthis.lch_h = this.hsluv_h;\n\t}\n\tlchToHsluv() {\n\t\tif (this.lch_l > 99.9999999) {\n\t\t\tthis.hsluv_s = 0;\n\t\t\tthis.hsluv_l = 100;\n\t\t} else if (this.lch_l < 1e-8) {\n\t\t\tthis.hsluv_s = 0;\n\t\t\tthis.hsluv_l = 0;\n\t\t} else {\n\t\t\tthis.calculateBoundingLines(this.lch_l);\n\t\t\tconst max = this.calcMaxChromaHsluv(this.lch_h);\n\t\t\tthis.hsluv_s = this.lch_c / max * 100;\n\t\t\tthis.hsluv_l = this.lch_l;\n\t\t}\n\t\tthis.hsluv_h = this.lch_h;\n\t}\n\thpluvToLch() {\n\t\tif (this.hpluv_l > 99.9999999) {\n\t\t\tthis.lch_l = 100;\n\t\t\tthis.lch_c = 0;\n\t\t} else if (this.hpluv_l < 1e-8) {\n\t\t\tthis.lch_l = 0;\n\t\t\tthis.lch_c = 0;\n\t\t} else {\n\t\t\tthis.lch_l = this.hpluv_l;\n\t\t\tthis.calculateBoundingLines(this.hpluv_l);\n\t\t\tconst max = this.calcMaxChromaHpluv();\n\t\t\tthis.lch_c = max / 100 * this.hpluv_p;\n\t\t}\n\t\tthis.lch_h = this.hpluv_h;\n\t}\n\tlchToHpluv() {\n\t\tif (this.lch_l > 99.9999999) {\n\t\t\tthis.hpluv_p = 0;\n\t\t\tthis.hpluv_l = 100;\n\t\t} else if (this.lch_l < 1e-8) {\n\t\t\tthis.hpluv_p = 0;\n\t\t\tthis.hpluv_l = 0;\n\t\t} else {\n\t\t\tthis.calculateBoundingLines(this.lch_l);\n\t\t\tconst max = this.calcMaxChromaHpluv();\n\t\t\tthis.hpluv_p = this.lch_c / max * 100;\n\t\t\tthis.hpluv_l = this.lch_l;\n\t\t}\n\t\tthis.hpluv_h = this.lch_h;\n\t}\n\thsluvToRgb() {\n\t\tthis.hsluvToLch();\n\t\tthis.lchToLuv();\n\t\tthis.luvToXyz();\n\t\tthis.xyzToRgb();\n\t}\n\thpluvToRgb() {\n\t\tthis.hpluvToLch();\n\t\tthis.lchToLuv();\n\t\tthis.luvToXyz();\n\t\tthis.xyzToRgb();\n\t}\n\thsluvToHex() {\n\t\tthis.hsluvToRgb();\n\t\tthis.rgbToHex();\n\t}\n\thpluvToHex() {\n\t\tthis.hpluvToRgb();\n\t\tthis.rgbToHex();\n\t}\n\trgbToHsluv() {\n\t\tthis.rgbToXyz();\n\t\tthis.xyzToLuv();\n\t\tthis.luvToLch();\n\t\tthis.lchToHpluv();\n\t\tthis.lchToHsluv();\n\t}\n\trgbToHpluv() {\n\t\tthis.rgbToXyz();\n\t\tthis.xyzToLuv();\n\t\tthis.luvToLch();\n\t\tthis.lchToHpluv();\n\t\tthis.lchToHpluv();\n\t}\n\thexToHsluv() {\n\t\tthis.hexToRgb();\n\t\tthis.rgbToHsluv();\n\t}\n\thexToHpluv() {\n\t\tthis.hexToRgb();\n\t\tthis.rgbToHpluv();\n\t}\n};\nHsluv.hexChars = \"0123456789abcdef\";\nHsluv.refY = 1;\nHsluv.refU = .19783000664283;\nHsluv.refV = .46831999493879;\nHsluv.kappa = 903.2962962;\nHsluv.epsilon = .0088564516;\nHsluv.m_r0 = 3.240969941904521;\nHsluv.m_r1 = -1.537383177570093;\nHsluv.m_r2 = -.498610760293;\nHsluv.m_g0 = -.96924363628087;\nHsluv.m_g1 = 1.87596750150772;\nHsluv.m_g2 = .041555057407175;\nHsluv.m_b0 = .055630079696993;\nHsluv.m_b1 = -.20397695888897;\nHsluv.m_b2 = 1.056971514242878;\n\n//#endregion\n//#region ../../library/src/render/types/Color/converters.ts\nconst hsluvConverter = /* @__PURE__ */ new Hsluv();\nfunction rgbToHsluv(r, g, b) {\n\thsluvConverter.rgb_r = r / 255;\n\thsluvConverter.rgb_g = g / 255;\n\thsluvConverter.rgb_b = b / 255;\n\thsluvConverter.rgbToHsluv();\n\treturn {\n\t\th: hsluvConverter.hsluv_h,\n\t\ts: hsluvConverter.hsluv_s,\n\t\tl: hsluvConverter.hsluv_l\n\t};\n}\nfunction rgbaFromHusl(h, s, l, a = 1) {\n\thsluvConverter.hsluv_h = h;\n\thsluvConverter.hsluv_s = s;\n\thsluvConverter.hsluv_l = l;\n\thsluvConverter.hsluvToRgb();\n\treturn {\n\t\tr: hsluvConverter.rgb_r * 255,\n\t\tg: hsluvConverter.rgb_g * 255,\n\t\tb: hsluvConverter.rgb_b * 255,\n\t\ta\n\t};\n}\nfunction hsvToStr(h, s, v, a) {\n\tconst _h = Math.round(h);\n\tconst _s = Math.round(s * 100);\n\tconst _v = Math.round(v * 100);\n\treturn a === void 0 || a === 1 ? \"hsv(\" + _h + \", \" + _s + \"%, \" + _v + \"%)\" : \"hsva(\" + _h + \", \" + _s + \"%, \" + _v + \"%, \" + a + \")\";\n}\nfunction rgbToRgb(r, g, b) {\n\treturn {\n\t\tr: isNumeric(r) ? bound01(r, 255) * 255 : 0,\n\t\tg: isNumeric(g) ? bound01(g, 255) * 255 : 0,\n\t\tb: isNumeric(b) ? bound01(b, 255) * 255 : 0\n\t};\n}\nfunction rgbToHex(r, g, b, allow3Char) {\n\tconst hex = [\n\t\tpad2(Math.round(r).toString(16)),\n\t\tpad2(Math.round(g).toString(16)),\n\t\tpad2(Math.round(b).toString(16))\n\t];\n\tif (allow3Char && hex[0].charAt(0) === hex[0].charAt(1) && hex[1].charAt(0) === hex[1].charAt(1) && hex[2].charAt(0) === hex[2].charAt(1)) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n\treturn hex.join(\"\");\n}\nfunction rgbToHsl(r, g, b) {\n\tlet l;\n\tlet s;\n\tconst _r = bound01(r, 255);\n\tconst _g = bound01(g, 255);\n\tconst _b = bound01(b, 255);\n\tconst max = Math.max(_r, _g, _b);\n\tconst min = Math.min(_r, _g, _b);\n\tlet h = s = l = (max + min) / 2;\n\tif (max === min) h = s = 0;\n\telse {\n\t\tconst d = max - min;\n\t\ts = l > .5 ? d / (2 - max - min) : d / (max + min);\n\t\tswitch (max) {\n\t\t\tcase _r:\n\t\t\t\th = (_g - _b) / d + (_g < _b ? 6 : 0);\n\t\t\t\tbreak;\n\t\t\tcase _g:\n\t\t\t\th = (_b - _r) / d + 2;\n\t\t\t\tbreak;\n\t\t\tcase _b: h = (_r - _g) / d + 4;\n\t\t}\n\t\th /= 6;\n\t}\n\treturn {\n\t\th: h * 360,\n\t\ts,\n\t\tl\n\t};\n}\nfunction hue2rgb(p, q, t) {\n\tif (t < 0) t += 1;\n\tif (t > 1) t -= 1;\n\tif (t < 1 / 6) return p + (q - p) * 6 * t;\n\tif (t < 1 / 2) return q;\n\tif (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n\treturn p;\n}\nfunction hslToRgb(h, s, l) {\n\tlet r;\n\tlet g;\n\tlet b;\n\th = bound01(h, 360);\n\ts = bound01(s * 100, 100);\n\tl = bound01(l * 100, 100);\n\tif (s === 0) r = g = b = l;\n\telse {\n\t\tconst q = l < .5 ? l * (1 + s) : l + s - l * s;\n\t\tconst p = 2 * l - q;\n\t\tr = hue2rgb(p, q, h + 1 / 3);\n\t\tg = hue2rgb(p, q, h);\n\t\tb = hue2rgb(p, q, h - 1 / 3);\n\t}\n\treturn {\n\t\tr: r * 255,\n\t\tg: g * 255,\n\t\tb: b * 255\n\t};\n}\nfunction rgbToHsv(r, g, b) {\n\tr = bound01(r, 255);\n\tg = bound01(g, 255);\n\tb = bound01(b, 255);\n\tconst max = Math.max(r, g, b);\n\tconst min = Math.min(r, g, b);\n\tconst d = max - min;\n\tlet h = 0;\n\tconst s = max === 0 ? 0 : d / max;\n\tconst v = max;\n\tif (max === min) h = 0;\n\telse {\n\t\tswitch (max) {\n\t\t\tcase r:\n\t\t\t\th = (g - b) / d + (g < b ? 6 : 0);\n\t\t\t\tbreak;\n\t\t\tcase g:\n\t\t\t\th = (b - r) / d + 2;\n\t\t\t\tbreak;\n\t\t\tcase b: h = (r - g) / d + 4;\n\t\t}\n\t\th /= 6;\n\t}\n\treturn {\n\t\th,\n\t\ts,\n\t\tv\n\t};\n}\nfunction hsvToRgb(h, s, v) {\n\th = bound01(h, 360) * 6;\n\ts = bound01(s * 100, 100);\n\tv = bound01(v * 100, 100);\n\tconst i = Math.floor(h);\n\tconst f = h - i;\n\tconst p = v * (1 - s);\n\tconst q = v * (1 - f * s);\n\tconst t = v * (1 - (1 - f) * s);\n\tconst mod = i % 6;\n\tconst r = [\n\t\tv,\n\t\tq,\n\t\tp,\n\t\tp,\n\t\tt,\n\t\tv\n\t][mod];\n\tconst g = [\n\t\tt,\n\t\tv,\n\t\tv,\n\t\tq,\n\t\tp,\n\t\tp\n\t][mod];\n\tconst b = [\n\t\tp,\n\t\tp,\n\t\tt,\n\t\tv,\n\t\tv,\n\t\tq\n\t][mod];\n\treturn {\n\t\tr: r * 255,\n\t\tg: g * 255,\n\t\tb: b * 255\n\t};\n}\nfunction bound01(n, max) {\n\tlet _max;\n\tlet _n;\n\tif (typeof max === \"string\") _max = parseFloat(max);\n\telse _max = max;\n\tif (typeof n === \"string\") {\n\t\tif (isOnePointZero(n)) n = \"100%\";\n\t\tconst processPercent = isPercentage(n);\n\t\t_n = Math.min(_max, Math.max(0, parseFloat(n)));\n\t\tif (processPercent) _n = Math.floor(_n * _max) / 100;\n\t} else _n = n;\n\tif (Math.abs(_n - _max) < 1e-6) return 1;\n\treturn _n % _max / _max;\n}\nfunction isOnePointZero(n) {\n\treturn typeof n === \"string\" && n.includes(\".\") && parseFloat(n) === 1;\n}\nfunction isPercentage(n) {\n\treturn typeof n === \"string\" && n.includes(\"%\");\n}\nfunction pad2(char) {\n\tif (char.length === 1) return \"0\" + char;\n\telse return \"\" + char;\n}\nconst matchers = /* @__PURE__ */ (() => {\n\tconst cssUnit = \"(?:[-\\\\+]?\\\\d*\\\\.\\\\d+%?)|(?:[-\\\\+]?\\\\d+%?)\";\n\tconst permissiveMatch3 = \"[\\\\s|\\\\(]+(\" + cssUnit + \")[,|\\\\s]+(\" + cssUnit + \")[,|\\\\s]+(\" + cssUnit + \")\\\\s*\\\\)?\";\n\tconst permissiveMatch4 = \"[\\\\s|\\\\(]+(\" + cssUnit + \")[,|\\\\s]+(\" + cssUnit + \")[,|\\\\s]+(\" + cssUnit + \")[,|\\\\s]+(\" + cssUnit + \")\\\\s*\\\\)?\";\n\treturn {\n\t\trgb: new RegExp(\"rgb\" + permissiveMatch3),\n\t\trgba: new RegExp(\"rgba\" + permissiveMatch4),\n\t\thsl: new RegExp(\"hsl\" + permissiveMatch3),\n\t\thsla: new RegExp(\"hsla\" + permissiveMatch4),\n\t\thsv: new RegExp(\"hsv\" + permissiveMatch3),\n\t\thsva: new RegExp(\"hsva\" + permissiveMatch4),\n\t\thex3: /^([\\da-f])([\\da-f])([\\da-f])$/iu,\n\t\thex6: /^([\\da-f]{2})([\\da-f]{2})([\\da-f]{2})$/iu,\n\t\thex4: /^#?([\\da-f])([\\da-f])([\\da-f])([\\da-f])$/iu,\n\t\thex8: /^#?([\\da-f]{2})([\\da-f]{2})([\\da-f]{2})([\\da-f]{2})$/iu\n\t};\n})();\nfunction stringToObject(inputColor) {\n\tif (inputColor.includes(\"gradient(\")) return false;\n\tif (inputColor.includes(\"var(\")) return false;\n\tlet color = inputColor.replace(/^[\\s,#]+/u, \"\").trimEnd().toLowerCase();\n\tconst namedColor = cssNames[color];\n\tif (namedColor) color = namedColor;\n\tif (color === \"transparent\") return {\n\t\tr: 0,\n\t\tg: 0,\n\t\tb: 0,\n\t\ta: 0,\n\t\tformat: \"name\"\n\t};\n\tlet match;\n\tif (match = matchers.rgb.exec(color)) return {\n\t\tr: parseInt(match[1] ?? \"\"),\n\t\tg: parseInt(match[2] ?? \"\"),\n\t\tb: parseInt(match[3] ?? \"\"),\n\t\ta: 1,\n\t\tformat: \"rgb\"\n\t};\n\tif (match = matchers.rgba.exec(color)) return {\n\t\tr: parseInt(match[1] ?? \"\"),\n\t\tg: parseInt(match[2] ?? \"\"),\n\t\tb: parseInt(match[3] ?? \"\"),\n\t\ta: parseFloat(match[4] ?? \"\"),\n\t\tformat: \"rgb\"\n\t};\n\tif (match = matchers.hsl.exec(color)) return {\n\t\th: parseInt(match[1] ?? \"\"),\n\t\ts: percentToFraction(match[2] ?? \"\"),\n\t\tl: percentToFraction(match[3] ?? \"\"),\n\t\ta: 1,\n\t\tformat: \"hsl\"\n\t};\n\tif (match = matchers.hsla.exec(color)) return {\n\t\th: parseInt(match[1] ?? \"\"),\n\t\ts: percentToFraction(match[2] ?? \"\"),\n\t\tl: percentToFraction(match[3] ?? \"\"),\n\t\ta: parseFloat(match[4] ?? \"\"),\n\t\tformat: \"hsl\"\n\t};\n\tif (match = matchers.hsv.exec(color)) return {\n\t\th: parseInt(match[1] ?? \"\"),\n\t\ts: percentToFraction(match[2] ?? \"\"),\n\t\tv: percentToFraction(match[3] ?? \"\"),\n\t\ta: 1,\n\t\tformat: \"hsv\"\n\t};\n\tif (match = matchers.hsva.exec(color)) return {\n\t\th: parseInt(match[1] ?? \"\"),\n\t\ts: percentToFraction(match[2] ?? \"\"),\n\t\tv: percentToFraction(match[3] ?? \"\"),\n\t\ta: parseFloat(match[4] ?? \"\"),\n\t\tformat: \"hsv\"\n\t};\n\tif (match = matchers.hex8.exec(color)) return {\n\t\tr: parseIntFromHex(match[1] ?? \"\"),\n\t\tg: parseIntFromHex(match[2] ?? \"\"),\n\t\tb: parseIntFromHex(match[3] ?? \"\"),\n\t\ta: convertHexToDecimal(match[4] ?? \"\"),\n\t\tformat: namedColor ? \"name\" : \"hex\"\n\t};\n\tif (match = matchers.hex6.exec(color)) return {\n\t\tr: parseIntFromHex(match[1] ?? \"\"),\n\t\tg: parseIntFromHex(match[2] ?? \"\"),\n\t\tb: parseIntFromHex(match[3] ?? \"\"),\n\t\ta: 1,\n\t\tformat: namedColor ? \"name\" : \"hex\"\n\t};\n\tif (match = matchers.hex4.exec(color)) return {\n\t\tr: parseIntFromHex(`${match[1]}${match[1]}`),\n\t\tg: parseIntFromHex(`${match[2]}${match[2]}`),\n\t\tb: parseIntFromHex(`${match[3]}${match[3]}`),\n\t\ta: convertHexToDecimal(match[4] + \"\" + match[4]),\n\t\tformat: namedColor ? \"name\" : \"hex\"\n\t};\n\tif (match = matchers.hex3.exec(color)) return {\n\t\tr: parseIntFromHex(`${match[1]}${match[1]}`),\n\t\tg: parseIntFromHex(`${match[2]}${match[2]}`),\n\t\tb: parseIntFromHex(`${match[3]}${match[3]}`),\n\t\ta: 1,\n\t\tformat: namedColor ? \"name\" : \"hex\"\n\t};\n\telse return false;\n}\nfunction parseIntFromHex(hex) {\n\treturn parseInt(hex, 16);\n}\nfunction convertHexToDecimal(h) {\n\treturn parseIntFromHex(h) / 255;\n}\n\n//#endregion\n//#region ../../library/src/render/types/Color/p3.ts\nconst p3Matcher = /^color\\(display-p3\\s+(?<r>\\d+\\.\\d+|\\d+|\\.\\d+)\\s+(?<g>\\d+\\.\\d+|\\d+|\\.\\d+)\\s+(?<b>\\d+\\.\\d+|\\d+|\\.\\d+)(?:\\s*\\/\\s*(?<a>\\d+\\.\\d+|\\d+|\\.\\d+))?\\)$/u;\nfunction parseP3(color) {\n\tconst match = p3Matcher.exec(color);\n\tif (!match) return null;\n\tconst { r = \"0\", g = \"0\", b = \"0\", a } = match.groups ?? {};\n\treturn {\n\t\tr: parseFloat(r),\n\t\tg: parseFloat(g),\n\t\tb: parseFloat(b),\n\t\ta: a ? parseFloat(a) : 1\n\t};\n}\nfunction convertRGBChannelToLrgb(c = 0) {\n\tconst abs = Math.abs(c);\n\tif (abs <= .04045) return c / 12.92;\n\treturn (Math.sign(c) || 1) * ((abs + .055) / 1.055) ** 2.4;\n}\n/**\n* https://github.com/Evercoder/culori/blob/main/src/lrgb/convertLrgbToRgb.js\n*/\nfunction convertRgbToLrgb({ r, g, b, a }) {\n\treturn {\n\t\tr: convertRGBChannelToLrgb(r),\n\t\tg: convertRGBChannelToLrgb(g),\n\t\tb: convertRGBChannelToLrgb(b),\n\t\ta\n\t};\n}\nfunction convertLrgbChannelToRgb(c = 0) {\n\tconst abs = Math.abs(c);\n\tif (abs > .0031308) return (Math.sign(c) || 1) * (1.055 * abs ** (1 / 2.4) - .055);\n\treturn c * 12.92;\n}\n/**\n* https://github.com/Evercoder/culori/blob/main/src/lrgb/convertRgbToLrgb.js\n*/\nfunction convertLrgbToRgb({ r, g, b, a }) {\n\treturn {\n\t\tr: convertLrgbChannelToRgb(r),\n\t\tg: convertLrgbChannelToRgb(g),\n\t\tb: convertLrgbChannelToRgb(b),\n\t\ta\n\t};\n}\n/**\n* https://github.com/Evercoder/culori/blob/main/src/p3/convertP3ToXyz65.js\n*\n* References:\n* https://drafts.csswg.org/css-color/#color-conversion-code\n* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\nconst convertP3ToXyz65 = (color) => {\n\tconst { r, g, b, a } = convertRgbToLrgb(color);\n\treturn {\n\t\tx: .486570948648216 * r + .265667693169093 * g + .1982172852343625 * b,\n\t\ty: .2289745640697487 * r + .6917385218365062 * g + .079286914093745 * b,\n\t\tz: 0 * r + .0451133818589026 * g + 1.043944368900976 * b,\n\t\ta\n\t};\n};\n/**\n* https://github.com/Evercoder/culori/blob/main/src/xyz65/convertXyz65ToRgb.js\n*\n* References:\n* https://drafts.csswg.org/css-color/#color-conversion-code\n* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n* https://observablehq.com/@danburzo/color-matrix-calculator\n*/\nconst convertXyz65ToRgb = ({ x = 0, y = 0, z = 0, a = 1 }) => {\n\treturn convertLrgbToRgb({\n\t\tr: x * 3.2409699419045226 - y * 1.537383177570094 - .4986107602930034 * z,\n\t\tg: x * -.9692436362808796 + y * 1.8759675015077204 + .0415550574071756 * z,\n\t\tb: x * .0556300796969936 - y * .2039769588889765 + 1.0569715142428784 * z,\n\t\ta\n\t});\n};\n/**\n* https://github.com/Evercoder/culori/blob/main/src/xyz65/convertRgbToXyz65.js#L12\n*\n* References:\n* https://drafts.csswg.org/css-color/#color-conversion-code\n* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n* https://observablehq.com/@danburzo/color-matrix-calculator\n*/\nconst convertRgbToXyz65 = (color) => {\n\tconst { r, g, b, a } = convertRgbToLrgb(color);\n\treturn {\n\t\tx: .4123907992659593 * r + .357584339383878 * g + .1804807884018343 * b,\n\t\ty: .2126390058715102 * r + .715168678767756 * g + .0721923153607337 * b,\n\t\tz: .0193308187155918 * r + .119194779794626 * g + .9505321522496607 * b,\n\t\ta\n\t};\n};\n/**\n* https://github.com/Evercoder/culori/blob/main/src/p3/convertXyz65ToP3.js\n*\n* References:\n* https://drafts.csswg.org/css-color/#color-conversion-code\n* http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n*/\nconst convertXyz65ToP3 = ({ x = 0, y = 0, z = 0, a = 1 }) => {\n\treturn convertLrgbToRgb({\n\t\tr: x * 2.4934969119414263 - y * .9313836179191242 - .402710784450717 * z,\n\t\tg: x * -.8294889695615749 + y * 1.7626640603183465 + .0236246858419436 * z,\n\t\tb: x * .0358458302437845 - y * .0761723892680418 + .9568845240076871 * z,\n\t\ta\n\t});\n};\n/**\n* https://github.com/Evercoder/culori/blob/main/src/hsv/convertRgbToHsv.js\n*\n* Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Formal_derivation\n*/\nfunction convertRGBToHSV({ r, g, b, a }) {\n\tconst M = Math.max(r, g, b), m = Math.min(r, g, b);\n\tconst res = {\n\t\th: 0,\n\t\ts: M === 0 ? 0 : 1 - m / M,\n\t\tv: M,\n\t\ta\n\t};\n\tif (M - m !== 0) res.h = (M === r ? (g - b) / (M - m) + (g < b ? 6 : 0) : M === g ? (b - r) / (M - m) + 2 : (r - g) / (M - m) + 4) * 60;\n\treturn res;\n}\nfunction normalizeHue(hue) {\n\treturn (hue = hue % 360) < 0 ? hue + 360 : hue;\n}\n/**\n* https://github.com/Evercoder/culori/blob/main/src/hsv/convertHsvToRgb.js\n*\n* Based on: https://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB\n*/\nfunction convertHsvToRgb({ h = 0, s = 0, v = 0, a = 1 }) {\n\tconst hue = normalizeHue(h);\n\tconst f = Math.abs(hue / 60 % 2 - 1);\n\tswitch (Math.floor(hue / 60)) {\n\t\tcase 0: return {\n\t\t\tr: v,\n\t\t\tg: v * (1 - s * f),\n\t\t\tb: v * (1 - s),\n\t\t\ta\n\t\t};\n\t\tcase 1: return {\n\t\t\tr: v * (1 - s * f),\n\t\t\tg: v,\n\t\t\tb: v * (1 - s),\n\t\t\ta\n\t\t};\n\t\tcase 2: return {\n\t\t\tr: v * (1 - s),\n\t\t\tg: v,\n\t\t\tb: v * (1 - s * f),\n\t\t\ta\n\t\t};\n\t\tcase 3: return {\n\t\t\tr: v * (1 - s),\n\t\t\tg: v * (1 - s * f),\n\t\t\tb: v,\n\t\t\ta\n\t\t};\n\t\tcase 4: return {\n\t\t\tr: v * (1 - s * f),\n\t\t\tg: v * (1 - s),\n\t\t\tb: v,\n\t\t\ta\n\t\t};\n\t\tcase 5: return {\n\t\t\tr: v,\n\t\t\tg: v * (1 - s),\n\t\t\tb: v * (1 - s * f),\n\t\t\ta\n\t\t};\n\t\tdefault: return {\n\t\t\tr: v * (1 - s),\n\t\t\tg: v * (1 - s),\n\t\t\tb: v * (1 - s),\n\t\t\ta\n\t\t};\n\t}\n}\nfunction convertRgbToP3(color) {\n\treturn convertXyz65ToP3(convertRgbToXyz65(color));\n}\nfunction convertP3ToRgb(color) {\n\treturn convertXyz65ToRgb(convertP3ToXyz65(color));\n}\n\n//#endregion\n//#region ../../library/src/render/types/Color/Color.ts\n/**\n* P3 colors use a different sspace than srgb\n*\n* @TODO - Parse colors to 0-1 ranges, and use this class with the format.\n*/\nvar P3Color = class P3Color {\n\tformat = \"p3\";\n\tr;\n\tg;\n\tb;\n\ta;\n\tconstructor(color) {\n\t\tthis.r = color.r ?? 0;\n\t\tthis.g = color.g ?? 0;\n\t\tthis.b = color.b ?? 0;\n\t\tthis.a = color.a ?? 1;\n\t}\n\thsv() {\n\t\treturn convertRGBToHSV(this);\n\t}\n\trgb() {\n\t\treturn convertP3ToRgb(this);\n\t}\n\thsl() {\n\t\treturn rgbToHsl(this.r, this.g, this.b);\n\t}\n\ttoString(space = \"p3\", overrides) {\n\t\tswitch (space) {\n\t\t\tcase \"p3\": {\n\t\t\t\tconst r = overrides?.r ?? this.r;\n\t\t\t\tconst g = overrides?.g ?? this.g;\n\t\t\t\tconst b = overrides?.b ?? this.b;\n\t\t\t\tconst a = overrides?.a ?? this.a;\n\t\t\t\treturn a === 1 ? `color(display-p3 ${r} ${g} ${b})` : `color(display-p3 ${r} ${g} ${b} / ${a})`;\n\t\t\t}\n\t\t\tcase \"srgb\": {\n\t\t\t\tconst color = this.rgb();\n\t\t\t\tconst clampedR = Math.round(Math.max(0, Math.min(color.r, 1)) * 100) / 100;\n\t\t\t\tconst clampedG = Math.round(Math.max(0, Math.min(color.g, 1)) * 100) / 100;\n\t\t\t\tconst clampedB = Math.round(Math.max(0, Math.min(color.b, 1)) * 100) / 100;\n\t\t\t\tconst r = overrides?.r ?? clampedR * 255;\n\t\t\t\tconst g = overrides?.g ?? clampedG * 255;\n\t\t\t\tconst b = overrides?.b ?? clampedB * 255;\n\t\t\t\tconst a = overrides?.a ?? color.a ?? 1;\n\t\t\t\treturn a === 1 ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${a})`;\n\t\t\t}\n\t\t}\n\t}\n\tstatic isP3String(color) {\n\t\treturn color.startsWith(\"color(display-p3\");\n\t}\n\tstatic fromHSV(color, space = \"p3\") {\n\t\tswitch (space) {\n\t\t\tcase \"p3\": return new P3Color(convertHsvToRgb(color));\n\t\t\tcase \"srgb\": return new P3Color(convertRgbToP3(convertHsvToRgb(color)));\n\t\t}\n\t}\n\tstatic fromRGB(color) {\n\t\treturn new P3Color(convertRgbToP3({\n\t\t\tr: Math.round(color.r / 255 * 1e4) / 1e4,\n\t\t\tg: Math.round(color.g / 255 * 1e4) / 1e4,\n\t\t\tb: Math.round(color.b / 255 * 1e4) / 1e4,\n\t\t\ta: color.a ?? 1\n\t\t}));\n\t}\n\tstatic fromRGBString(color) {\n\t\tconst value = Color(color);\n\t\tif (!value) return void 0;\n\t\treturn P3Color.fromRGB(value);\n\t}\n\tstatic fromString(color) {\n\t\tif (!P3Color.isP3String(color)) return void 0;\n\t\tconst parsed = parseP3(color);\n\t\tif (!parsed) return void 0;\n\t\treturn new P3Color({\n\t\t\tr: parsed.r,\n\t\t\tg: parsed.g,\n\t\t\tb: parsed.b,\n\t\t\ta: parsed.a\n\t\t});\n\t}\n\tstatic srgbFromValue(color) {\n\t\tif (!isString(color) || !Color.isP3String(color)) return color;\n\t\tconst value = P3Color.fromString(color);\n\t\tif (!value) return color;\n\t\treturn value.toString(\"srgb\");\n\t}\n\tstatic multiplyAlpha(color, alpha) {\n\t\treturn new P3Color({\n\t\t\tr: color.r,\n\t\t\tg: color.g,\n\t\t\tb: color.b,\n\t\t\ta: color.a * alpha\n\t\t});\n\t}\n};\nfunction clampRGB(color) {\n\treturn P3Color.srgbFromValue(color);\n}\nconst cache = /* @__PURE__ */ new Map();\n/**\n* The Color function can be used to define colors, either as a string value or as an object. All colors\n* are converted to a Color object with `r, g, b`, `h, s, l` and an `a` value.\n* There are also various helpers on the Color function for working with,\n* modifying and detecting colors.\n*\n* ```jsx\n* // HEX\n* const blue = Color(\"#0099FF\")\n*\n* // RGB\n* const blue = Color(\"rgb(0, 153, 255)\")\n* const blue = Color(0, 153, 255)\n* const blue = Color({r: 0, g: 153, b: 255})\n* const blue = Color({r: 0, g: 153, b: 255, a: 1})\n*\n* // HSL\n* const blue = Color(\"hsl(204, 100%, 50%)\")\n* const blue = Color({h: 204, s: 1, l: 0.5})\n* const blue = Color({h: 204, s: 1, l: 0.5, a: 1})\n* ```\n* @public\n*/\nconst Color = /* @__PURE__ */ (() => {\n\t/**\n\t* @public\n\t*/\n\tfunction Color(color, r, g, b) {\n\t\tif (typeof color === \"string\") {\n\t\t\tlet c = cache.get(color);\n\t\t\tif (c) return c;\n\t\t\tc = createColor(color);\n\t\t\tif (c === void 0) return {\n\t\t\t\t...Color(\"black\"),\n\t\t\t\tisValid: false\n\t\t\t};\n\t\t\tcache.set(color, c);\n\t\t\treturn c;\n\t\t}\n\t\tconst created = createColor(color, r, g, b);\n\t\treturn created !== void 0 ? created : {\n\t\t\t...Color(\"black\"),\n\t\t\tisValid: false\n\t\t};\n\t}\n\tfunction createColor(color, r, g, b) {\n\t\tif (color === \"\") return void 0;\n\t\tconst colorData = getCompleteColorStrategy(color, r, g, b);\n\t\tif (colorData) {\n\t\t\tconst newColor = {\n\t\t\t\tr: colorData.r,\n\t\t\t\tg: colorData.g,\n\t\t\t\tb: colorData.b,\n\t\t\t\ta: colorData.a,\n\t\t\t\th: colorData.h,\n\t\t\t\ts: colorData.s,\n\t\t\t\tl: colorData.l,\n\t\t\t\tinitialValue: typeof color === \"string\" && colorData.format !== \"hsv\" ? color : void 0,\n\t\t\t\troundA: Math.round(100 * colorData.a) / 100,\n\t\t\t\tformat: colorData.format,\n\t\t\t\tmix: Color.mix,\n\t\t\t\ttoValue: () => Color.toRgbString(newColor)\n\t\t\t};\n\t\t\treturn newColor;\n\t\t} else return;\n\t}\n\tconst ColorMixModel = {\n\t\tisRGB(colorModel) {\n\t\t\treturn colorModel === \"rgb\" || colorModel === \"rgba\";\n\t\t},\n\t\tisHSL(colorModel) {\n\t\t\treturn colorModel === \"hsl\" || colorModel === \"hsla\";\n\t\t}\n\t};\n\t/**\n\t* Formats a Color object into a readable string for debugging.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.inspect(blue)\n\t* ```\n\t*\n\t* @param color - The Color object to format\n\t* @param initialValue - A canonical hex string to be used instead of an rgba() value.\n\t*/\n\tColor.inspect = (color, initialValue) => {\n\t\tif (color.format === \"hsl\") return `<${color.constructor.name} h:${color.h} s:${color.s} l:${color.l} a:${color.a}>`;\n\t\telse if (color.format === \"hex\" || color.format === \"name\") return `<${color.constructor.name} \"${initialValue}\">`;\n\t\telse return `<${color.constructor.name} r:${color.r} g:${color.g} b:${color.b} a:${color.a}>`;\n\t};\n\t/**\n\t* Checks if the value is a valid color object or color string. Returns true or false.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* Color.isColor(\"#0099FF\") // true\n\t* Color.isColor(Color(\"#0099FF\")) // true\n\t* ```\n\t*\n\t* @param color - The potential color value to validate\n\t*/\n\tColor.isColor = (color) => {\n\t\tif (typeof color === \"string\") return Color.isColorString(color);\n\t\telse return Color.isColorObject(color);\n\t};\n\t/**\n\t* Checks if the value is a valid color string. Returns true or false.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* Color.isColorString(\"#0099FF\") // true\n\t* ```\n\t*\n\t* @param color - A string representing a color\n\t*/\n\tColor.isColorString = (colorString) => {\n\t\tif (typeof colorString === \"string\") return stringToObject(colorString) !== false;\n\t\treturn false;\n\t};\n\t/**\n\t* Checks if the value is a valid Color object. Returns true or false.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.isColorObject(blue) // true\n\t* Color.isColorObject(\"#0099FF\") // false\n\t* ```\n\t*\n\t* @param color - An object representing a color.\n\t*/\n\tColor.isColorObject = (color) => {\n\t\treturn isObject$1(color) && typeof color.r === \"number\" && typeof color.g === \"number\" && typeof color.b === \"number\" && typeof color.h === \"number\" && typeof color.s === \"number\" && typeof color.l === \"number\" && typeof color.a === \"number\" && typeof color.roundA === \"number\" && typeof color.format === \"string\";\n\t};\n\t/**\n\t* Formats a Color instance into an RGB string.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.toString(blue) // \"rgb(0, 153, 255)\"\n\t* ```\n\t*\n\t* @param color - The color to format\n\t*/\n\tColor.toString = (color) => {\n\t\treturn Color.toRgbString(color);\n\t};\n\t/**\n\t* Formats a Color instance into an hexidecimal value.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.toHex(blue) // \"0099FF\"\n\t* Color.toHex(Color(\"#FFAAFF\"), true) // \"FAF\"\n\t* ```\n\t*\n\t* @param color - The color to format\n\t* @param allow3Char - If true will return short hand colors if possible (defaults to false).\n\t*/\n\tColor.toHex = (color, allow3Char = false) => {\n\t\treturn rgbToHex(color.r, color.g, color.b, allow3Char);\n\t};\n\t/**\n\t* Formats a Color instance into an hexidecimal string.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.toHexString(blue) // \"#0099FF\"\n\t* Color.toHexString(Color(\"#FFAAFF\"), true) // \"#FAF\"\n\t* ```\n\t*\n\t* @param color - The color to format\n\t* @param allow3Char - If true will return short hand colors if possible (defaults to false).\n\t*/\n\tColor.toHexString = (color, allow3Char = false) => {\n\t\treturn `#${Color.toHex(color, allow3Char)}`;\n\t};\n\tColor.isP3String = (color) => {\n\t\tif (typeof color !== \"string\") return false;\n\t\treturn P3Color.isP3String(color);\n\t};\n\t/**\n\t* Formats a Color instance into an RGB string.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.toRgbString(blue) // \"rgb(0, 153, 255)\"\n\t* ```\n\t*\n\t* @param color - The color to format\n\t*/\n\tColor.toRgbString = (color) => {\n\t\treturn color.a === 1 ? \"rgb(\" + Math.round(color.r) + \", \" + Math.round(color.g) + \", \" + Math.round(color.b) + \")\" : \"rgba(\" + Math.round(color.r) + \", \" + Math.round(color.g) + \", \" + Math.round(color.b) + \", \" + color.roundA + \")\";\n\t};\n\t/**\n\t* Formats a Color instance into an HUSL object.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.toHusl(blue) // {h: 250, s: 100, l: 50, a: 1}\n\t* ```\n\t*\n\t* @param color - The color to format\n\t*/\n\tColor.toHusl = (color) => {\n\t\treturn {\n\t\t\t...rgbToHsluv(color.r, color.g, color.b),\n\t\t\ta: color.roundA\n\t\t};\n\t};\n\t/**\n\t* Formats a Color instance into an HSL string.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.toHslString(blue) // \"hsl(204, 100%, 50%)\"\n\t* ```\n\t*\n\t* @param color - The color to format\n\t*/\n\tColor.toHslString = (color) => {\n\t\tconst hsl = Color.toHsl(color);\n\t\tconst h = Math.round(hsl.h);\n\t\tconst s = Math.round(hsl.s * 100);\n\t\tconst l = Math.round(hsl.l * 100);\n\t\treturn color.a === 1 ? \"hsl(\" + h + \", \" + s + \"%, \" + l + \"%)\" : \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \" + color.roundA + \")\";\n\t};\n\t/**\n\t* Formats a Color instance into an HSV object.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.toHsv(blue) // {h: 204, s: 1, v: 1, a: 1}\"\n\t* ```\n\t*\n\t* @param color - The color to format\n\t*/\n\tColor.toHsv = (color) => {\n\t\tconst hsv = rgbToHsv(color.r, color.g, color.b);\n\t\treturn {\n\t\t\th: hsv.h * 360,\n\t\t\ts: hsv.s,\n\t\t\tv: hsv.v,\n\t\t\ta: color.a\n\t\t};\n\t};\n\t/**\n\t* Formats a Color instance into an HSV string.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.toHslString(blue) // \"hsv(204, 100%, 50%)\"\n\t* ```\n\t*\n\t* @param color - The color to format\n\t*/\n\tColor.toHsvString = (color) => {\n\t\tconst hsv = rgbToHsv(color.r, color.g, color.b);\n\t\tconst h = Math.round(hsv.h * 360);\n\t\tconst s = Math.round(hsv.s * 100);\n\t\tconst v = Math.round(hsv.v * 100);\n\t\treturn color.a === 1 ? \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\" : \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \" + color.roundA + \")\";\n\t};\n\t/**\n\t* Formats a Color instance into {@link https://css-tricks.com/snippets/css/named-colors-and-hex-equivalents/ | CSS name}\n\t* or returns false if unspecified.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const green = Color(\"#8FBC8F\")\n\t*\n\t* Color.toName(green) // \"darkseagreen\"\n\t* ```\n\t*\n\t* @param color - The color to format\n\t*/\n\tColor.toName = (color) => {\n\t\tif (color.a === 0) return \"transparent\";\n\t\tif (color.a < 1) return false;\n\t\tconst hex = rgbToHex(color.r, color.g, color.b, true);\n\t\tfor (const key of Object.keys(cssNames)) if (cssNames[key] === hex) return key;\n\t\treturn false;\n\t};\n\t/**\n\t* Formats a color into an HSL object.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.toHsl(blue) // {h: 204, s: 1, l: 0.5, a: 1}\n\t* ```\n\t*\n\t* @param color - The color to format\n\t*/\n\tColor.toHsl = (color) => {\n\t\treturn {\n\t\t\th: Math.round(color.h),\n\t\t\ts: color.s,\n\t\t\tl: color.l,\n\t\t\ta: color.a\n\t\t};\n\t};\n\t/**\n\t* Formats a color into an RGB object.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* Color.toRgb(blue) // {r: 40, g: 175, b: 250, a: 1}\n\t* ```\n\t*\n\t* @param color - The color to format\n\t*/\n\tColor.toRgb = (color) => {\n\t\treturn {\n\t\t\tr: Math.round(color.r),\n\t\t\tg: Math.round(color.g),\n\t\t\tb: Math.round(color.b),\n\t\t\ta: color.a\n\t\t};\n\t};\n\t/**\n\t* Returns a brightened color.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t* const brightblue = Color.lighten(blue, 20)\n\t* ```\n\t*\n\t* @param color - The color to brighten\n\t* @param amount - A number, from 0 to 100. Set to 10 by default.\n\t*/\n\tColor.brighten = (color, amount = 10) => {\n\t\tconst rgb = Color.toRgb(color);\n\t\trgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n\t\trgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n\t\trgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n\t\treturn Color(rgb);\n\t};\n\t/**\n\t* Add white and return a lightened color.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t* const lightblue = Color.lighten(blue, 20)\n\t* ```\n\t*\n\t* @param color - The color to lighten\n\t* @param amount - A number, from 0 to 100. Set to 10 by default.\n\t*/\n\tColor.lighten = (color, amount = 10) => {\n\t\tconst hsl = Color.toHsl(color);\n\t\thsl.l += amount / 100;\n\t\thsl.l = Math.min(1, Math.max(0, hsl.l));\n\t\treturn Color(hsl);\n\t};\n\t/**\n\t* Add black and return a darkened color.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t* const darkblue = Color.darken(blue, 20)\n\t* ```\n\t* @param color - The color to darken.\n\t* @param amount - A number, from 0 to 100. Set to 10 by default.\n\t*/\n\tColor.darken = (color, amount = 10) => {\n\t\tconst hsl = Color.toHsl(color);\n\t\thsl.l -= amount / 100;\n\t\thsl.l = Math.min(1, Math.max(0, hsl.l));\n\t\treturn Color(hsl);\n\t};\n\t/**\n\t* Increase the saturation of a color.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t* const saturated = Color.saturate(blue, 100)\n\t* ```\n\t* @param color - The color to modify\n\t* @param amount - A number from 0 to 100. Set to 10 by default.\n\t*/\n\tColor.saturate = (color, amount = 10) => {\n\t\tconst hsl = Color.toHsl(color);\n\t\thsl.s += amount / 100;\n\t\thsl.s = Math.min(1, Math.max(0, hsl.s));\n\t\treturn Color(hsl);\n\t};\n\t/**\n\t* Decrease the saturation of a color.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t* const desaturated = Color.desaturate(blue, 100)\n\t* ```\n\t* @param color - The color to modify\n\t* @param amount - A number from 0 to 100. Set to 10 by default.\n\t*/\n\tColor.desaturate = (color, amount = 10) => {\n\t\tconst hsl = Color.toHsl(color);\n\t\thsl.s -= amount / 100;\n\t\thsl.s = Math.min(1, Math.max(0, hsl.s));\n\t\treturn Color(hsl);\n\t};\n\t/**\n\t* Return a fully desaturated color.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t* const gray = Color.grayscale(blue)\n\t* ```\n\t* @param color - The color to convert.\n\t*/\n\tColor.grayscale = (color) => {\n\t\treturn Color.desaturate(color, 100);\n\t};\n\t/**\n\t* Returns a new color for the rotated hue.\n\t* @param color - The color to manipulate\n\t* @param angle - The angle in degrees in which to rotate the hue.\n\t*/\n\tColor.hueRotate = (color, angle) => {\n\t\tconst hsl = Color.toHsl(color);\n\t\thsl.h += angle;\n\t\thsl.h = hsl.h > 360 ? hsl.h - 360 : hsl.h;\n\t\treturn Color(hsl);\n\t};\n\t/**\n\t* Set the alpha value, also known as opacity, of the color.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* const transparent = Color.alpha(blue, 0.1)\n\t* ```\n\t* @param color - The original color to modify.\n\t* @param alpha - A number from 1 to 0. Set to 1 by default.\n\t*/\n\tColor.alpha = (color, a = 1) => {\n\t\treturn Color({\n\t\t\tr: color.r,\n\t\t\tg: color.g,\n\t\t\tb: color.b,\n\t\t\ta\n\t\t});\n\t};\n\t/**\n\t* Set the alpha value, also known as opacity, of the color to zero.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t*\n\t* const transparent = Color.alpha(blue)\n\t* ```\n\t* @param color - The original color to modify.\n\t*/\n\tColor.transparent = (color) => {\n\t\treturn Color.alpha(color, 0);\n\t};\n\t/**\n\t* Change the alpha value, also know as opacity, by a multiplier.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const blue = Color(\"#0099FF\")\n\t* const transparent = Color.multiplyAlpha(blue, 0.5)\n\t* ```\n\t* @param color - The original color to modify.\n\t* @param alphaValue - A number between 1 and 0, defaults to 1,\n\t*/\n\tColor.multiplyAlpha = (color, alphaValue = 1) => {\n\t\treturn Color({\n\t\t\tr: color.r,\n\t\t\tg: color.g,\n\t\t\tb: color.b,\n\t\t\ta: color.a * alphaValue\n\t\t});\n\t};\n\t/**\n\t* Alpha blends a top color over a bottom color and returns the resulting opaque color.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const red = Color(\"red\")\n\t* const blue = Color(\"blue\")\n\t* const blended = Color.alphaComposite(Color.alpha(red, 0.5), blue)\n\t* ```\n\t*\n\t* @param top - The foreground color layered on top.\n\t* @param bottom - The background color behind it.\n\t*/\n\tColor.alphaComposite = (top, bottom) => {\n\t\tif (top.a === 1) return top;\n\t\tif (bottom.a < 1) throw new Error(\"Bottom color must be fully opaque for alpha blending, you should check and determine your own strategy for resolving alpha bottom layers, ie. `Color.alphaComposite(bottom, Color('white'))`\");\n\t\tif (top.a === 0) return bottom;\n\t\treturn Color({\n\t\t\tr: Math.round(top.r * top.a + bottom.r * (1 - top.a)),\n\t\t\tg: Math.round(top.g * top.a + bottom.g * (1 - top.a)),\n\t\t\tb: Math.round(top.b * top.a + bottom.b * (1 - top.a)),\n\t\t\ta: 1\n\t\t});\n\t};\n\t/**\n\t* Returns a function that can be used to transition a color from one value\n\t* to another. By default this will use the RGB `mix` model. Useful for providing to animation tools.\n\t*\n\t* ```jsx\n\t* const blend = Color.interpolate(Color(\"red\"), Color(\"blue\"))\n\t*\n\t* blend(0)   // Initial state (red)\n\t* blend(0.5) // Mid state (purple)\n\t* blend(1)   // Final state (blue)\n\t* ```\n\t* @param colorA - The starting color\n\t* @param colorB - The final color\n\t* @param model  - The model to use for the mix. One of {@link ColorMixModelType}\n\t*/\n\tColor.interpolate = (colorA, colorB, model = \"rgb\") => {\n\t\tif (!Color.isColorObject(colorA) || !Color.isColorObject(colorB)) throw new TypeError(\"Both arguments for Color.interpolate must be Color objects\");\n\t\treturn (progress) => {\n\t\t\treturn Color.mixAsColor(colorA, colorB, progress, false, model);\n\t\t};\n\t};\n\t/**\n\t* Create a function that will mix two colors together and output the result as an rgb string.\n\t*\n\t* @param colorA - The starting color\n\t* @param colorB - The final color\n\t* @param options - Options for the color mixer\n\t*\n\t* - `model`: The model to use for the mix. One of {@link ColorMixModelType}\n\t*\n\t* @public\n\t*/\n\tColor.mix = (from, toColor, { model = \"rgb\" } = {}) => {\n\t\tconst fromColor = typeof from === \"string\" ? Color(from) : from;\n\t\tconst mixer = Color.interpolate(fromColor, toColor, model);\n\t\treturn (p) => Color.toRgbString(mixer(p));\n\t};\n\t/**\n\t* Blend two colors together, optionally based on user input. The fraction defines the\n\t* distribution between the two colors, and is set to 0.5 by default.\n\t* The `limit` defines if the color can transition beyond its range.\n\t* @remarks\n\t* ```jsx\n\t* // Mix red with yellow\n\t* const orange = Color.mix(\"red\", \"yellow\", 0.5)\n\t* ```\n\t*\n\t* ```jsx\n\t* Color.mix(\"red\", \"yellow\", 0.5, true, \"husl\")\n\t* ```\n\t*\n\t* @param colorA   - A color, the first one.\n\t* @param colorB   - A color, the second one.\n\t* @param fraction - An optional number, from 0 to 1, set to 0.5 by default.\n\t* @param limit    - An optional boolean, set to false by default.\n\t* @param model    - The model to use for the mix. One of {@link ColorMixModelType}\n\t*/\n\tColor.mixAsColor = (colorA, colorB, fraction = .5, limit = false, model = \"rgb\") => {\n\t\tlet result = null;\n\t\tif (ColorMixModel.isRGB(model)) result = Color({\n\t\t\tr: modulate(fraction, [0, 1], [colorA.r, colorB.r], limit),\n\t\t\tg: modulate(fraction, [0, 1], [colorA.g, colorB.g], limit),\n\t\t\tb: modulate(fraction, [0, 1], [colorA.b, colorB.b], limit),\n\t\t\ta: modulate(fraction, [0, 1], [colorA.a, colorB.a], limit)\n\t\t});\n\t\telse {\n\t\t\tlet hslA, hslB;\n\t\t\tif (ColorMixModel.isHSL(model)) {\n\t\t\t\thslA = Color.toHsl(colorA);\n\t\t\t\thslB = Color.toHsl(colorB);\n\t\t\t} else {\n\t\t\t\thslA = Color.toHusl(colorA);\n\t\t\t\thslB = Color.toHusl(colorB);\n\t\t\t}\n\t\t\tif (hslA.s === 0) hslA.h = hslB.h;\n\t\t\telse if (hslB.s === 0) hslB.h = hslA.h;\n\t\t\tconst fromH = hslA.h;\n\t\t\tconst toH = hslB.h;\n\t\t\tlet deltaH = toH - fromH;\n\t\t\tif (deltaH > 180) deltaH = toH - 360 - fromH;\n\t\t\telse if (deltaH < -180) deltaH = toH + 360 - fromH;\n\t\t\tconst tween = {\n\t\t\t\th: modulate(fraction, [0, 1], [fromH, fromH + deltaH], limit),\n\t\t\t\ts: modulate(fraction, [0, 1], [hslA.s, hslB.s], limit),\n\t\t\t\tl: modulate(fraction, [0, 1], [hslA.l, hslB.l], limit),\n\t\t\t\ta: modulate(fraction, [0, 1], [colorA.a, colorB.a], limit)\n\t\t\t};\n\t\t\tif (ColorMixModel.isHSL(model)) result = Color(tween);\n\t\t\telse result = Color(rgbaFromHusl(tween.h, tween.s, tween.l, tween.a));\n\t\t}\n\t\treturn result;\n\t};\n\t/**\n\t* Returns a Color instance with a random color value set.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const random = Color.random()\n\t* ```\n\t*\n\t* @param alphaValue - An optional alpha value, set to 1 by default.\n\t*/\n\tColor.random = (alphaValue = 1) => {\n\t\tfunction gen() {\n\t\t\treturn Math.floor(Math.random() * 255);\n\t\t}\n\t\treturn Color(\"rgba(\" + gen() + \", \" + gen() + \", \" + gen() + \", \" + alphaValue + \")\");\n\t};\n\t/**\n\t* Creates a greyscale color.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* const gray = Color.gray(0.5)\n\t* ```\n\t*\n\t* @param amount - A number from 0 to 1 representing the amount of white.\n\t* @param alphaValue  - A number from 0 to 1 representing the alpha. Set to 1 by default.\n\t*/\n\tColor.grey = (amount = .5, alphaValue = 1) => {\n\t\tamount = Math.floor(amount * 255);\n\t\treturn Color(\"rgba(\" + amount + \", \" + amount + \", \" + amount + \", \" + alphaValue + \")\");\n\t};\n\t/**\n\t* @internal\n\t* Alias for {@link (Color:namespace).grey}\n\t*/\n\tColor.gray = Color.grey;\n\t/** @internal */\n\tColor.rgbToHsl = (r, g, b) => {\n\t\treturn rgbToHsl(r, g, b);\n\t};\n\t/** @internal */\n\tColor.isValidColorProperty = (name, value) => {\n\t\tif ((name.toLowerCase().slice(-5) === \"color\" || name === \"fill\" || name === \"stroke\") && typeof value === \"string\" && Color.isColorString(value)) return true;\n\t\treturn false;\n\t};\n\t/**\n\t* Calculates the color difference using {@link https://en.wikipedia.org/wiki/Color_difference#Euclidean |\n\t* Euclidean distance fitting human perception}. Returns a value between 0 and 765\n\t* @param colorA - A first color.\n\t* @param colorB - A second color.\n\t*/\n\tColor.difference = (colorA, colorB) => {\n\t\tconst _r = (colorA.r + colorB.r) / 2;\n\t\tconst deltaR = colorA.r - colorB.r;\n\t\tconst deltaG = colorA.g - colorB.g;\n\t\tconst deltaB = colorA.b - colorB.b;\n\t\tconst deltaR2 = deltaR ** 2;\n\t\tconst deltaG2 = deltaG ** 2;\n\t\tconst deltaB2 = deltaB ** 2;\n\t\treturn Math.sqrt(2 * deltaR2 + 4 * deltaG2 + 3 * deltaB2 + _r * (deltaR2 - deltaB2) / 256);\n\t};\n\t/**\n\t* Checks whether two Color objects are equal.\n\t*\n\t* @remarks\n\t* ```jsx\n\t* Color.equal(Color(\"red\"), Color(\"red\"))  // true\n\t* Color.equal(Color(\"red\"), Color(\"blue\")) // false\n\t*\n\t* Color.equal(Color(\"#0099FF\"), Color(\"009AFF\"))    // false\n\t* Color.equal(Color(\"#0099FF\"), Color(\"009AFF\"), 2) // true\n\t* ```\n\t*\n\t* @param colorA    - The first color\n\t* @param colorB    - The second color\n\t* @param tolerance - A tolerance for the difference between rgba values. Set to 0.1 by default.\n\t*/\n\tColor.equal = (colorA, colorB, tolerance = .1) => {\n\t\tif (Math.abs(colorA.r - colorB.r) >= tolerance) return false;\n\t\tif (Math.abs(colorA.g - colorB.g) >= tolerance) return false;\n\t\tif (Math.abs(colorA.b - colorB.b) >= tolerance) return false;\n\t\tif (Math.abs(colorA.a - colorB.a) * 256 >= tolerance) return false;\n\t\treturn true;\n\t};\n\tfunction convertChannelToLinearRgb(channel) {\n\t\tchannel /= 255;\n\t\tconst abs = Math.abs(channel);\n\t\tif (abs < .04045) return channel / 12.92;\n\t\treturn (Math.sign(channel) || 1) * ((abs + .055) / 1.055) ** 2.4;\n\t}\n\tColor.luminance = (color) => {\n\t\tconst { r, g, b } = Color.toRgb(color);\n\t\treturn .2126 * convertChannelToLinearRgb(r) + .7152 * convertChannelToLinearRgb(g) + .0722 * convertChannelToLinearRgb(b);\n\t};\n\tColor.contrast = (a, b) => {\n\t\tconst l1 = Color.luminance(a);\n\t\tconst l2 = Color.luminance(b);\n\t\treturn (Math.max(l1, l2) + .05) / (Math.min(l1, l2) + .05);\n\t};\n\treturn Color;\n})();\nfunction getCompleteColorStrategy(colorOrR, g, b, a = 1) {\n\tlet completeColor;\n\tif (typeof colorOrR === \"number\" && !Number.isNaN(colorOrR) && typeof g === \"number\" && !Number.isNaN(g) && typeof b === \"number\" && !Number.isNaN(b)) completeColor = getCompleteColorFromRGB({\n\t\tr: colorOrR,\n\t\tg,\n\t\tb,\n\t\ta\n\t});\n\telse if (typeof colorOrR === \"string\") completeColor = getCompleteColorFromString(colorOrR);\n\telse if (typeof colorOrR === \"object\") {\n\t\tif (colorOrR.hasOwnProperty(\"r\") && colorOrR.hasOwnProperty(\"g\") && colorOrR.hasOwnProperty(\"b\")) completeColor = getCompleteColorFromRGB(colorOrR);\n\t\telse completeColor = getCompleteColorFromHSL(colorOrR);\n\t}\n\treturn completeColor;\n}\nfunction getCompleteColorFromString(color) {\n\tconst result = stringToObject(color);\n\tif (result) {\n\t\tif (result.format === \"hsl\") return getCompleteColorFromHSL(result);\n\t\telse if (result.format === \"hsv\") return getCompleteColorFromHSV(result);\n\t\telse return getCompleteColorFromRGB(result);\n\t}\n}\nfunction getCompleteColorFromHSV(color) {\n\tconst rgb = hsvToRgb(color.h, color.s, color.v);\n\treturn {\n\t\t...rgbToHsl(rgb.r, rgb.g, rgb.b),\n\t\t...rgb,\n\t\tformat: \"rgb\",\n\t\ta: color.a !== void 0 ? correctAlpha(color.a) : 1\n\t};\n}\nfunction getCompleteColorFromRGB(color) {\n\tconst rgb = rgbToRgb(color.r, color.g, color.b);\n\treturn {\n\t\t...rgbToHsl(rgb.r, rgb.g, rgb.b),\n\t\t...rgb,\n\t\tformat: \"rgb\",\n\t\ta: color.a !== void 0 ? correctAlpha(color.a) : 1\n\t};\n}\nfunction getCompleteColorFromHSL(color) {\n\tlet h;\n\tlet s;\n\tlet l;\n\tlet rgb = {\n\t\tr: 0,\n\t\tg: 0,\n\t\tb: 0\n\t};\n\tlet hsl = {\n\t\th: 0,\n\t\ts: 0,\n\t\tl: 0\n\t};\n\th = isNumeric(color.h) ? color.h : 0;\n\th = (h + 360) % 360;\n\ts = isNumeric(color.s) ? color.s : 1;\n\tif (typeof color.s === \"string\") s = numberFromString(color.s);\n\tl = isNumeric(color.l) ? color.l : .5;\n\tif (typeof color.l === \"string\") l = numberFromString(color.l);\n\trgb = hslToRgb(h, s, l);\n\thsl = {\n\t\th,\n\t\ts,\n\t\tl\n\t};\n\treturn {\n\t\t...rgb,\n\t\t...hsl,\n\t\ta: color.a === void 0 ? 1 : color.a,\n\t\tformat: \"hsl\"\n\t};\n}\nfunction correctAlpha(alphaValue) {\n\talphaValue = parseFloat(alphaValue);\n\tif (alphaValue < 0) alphaValue = 0;\n\tif (Number.isNaN(alphaValue) || alphaValue > 1) alphaValue = 1;\n\treturn alphaValue;\n}\n\n//#endregion\n//#region ../../library/src/interpolation/Interpolation.ts\n/**\n* @internal\n*/\nfunction isInterpolatable(value) {\n\treturn typeof value === \"function\" && value.interpolationFor && typeof value.interpolationFor === \"function\";\n}\n/**\n* @public\n*/\nconst Interpolation = { \n/**\n* @param from -\n* @param to -\n* @internal\n*/\nhandleUndefined: (from, to) => {\n\tif (from === void 0) from = to;\n\tif (to === void 0) to = from;\n\treturn [from, to];\n} };\n\n//#endregion\n//#region ../../library/src/interpolation/ColorInterpolation.ts\nconst ColorInterpolation = (type = \"husl\") => {\n\treturn {\n\t\tinterpolate(from, to) {\n\t\t\t[from, to] = Interpolation.handleUndefined(from, to);\n\t\t\treturn Color.interpolate(Color(from), Color(to), type);\n\t\t},\n\t\tdifference(from, to) {\n\t\t\treturn Color.difference(Color(from), Color(to));\n\t\t}\n\t};\n};\n\n//#endregion\n//#region ../../library/src/interpolation/NoInterpolation.ts\nconst NoInterpolation = {\n\tinterpolate(from, to) {\n\t\t[from, to] = Interpolation.handleUndefined(from, to);\n\t\treturn (progress) => {\n\t\t\treturn progress < .5 ? from : to;\n\t\t};\n\t},\n\tdifference(from, to) {\n\t\treturn from === to ? 0 : 1;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/interpolation/NumberInterpolation.ts\nconst NumberInterpolation = {\n\tinterpolate(from, to) {\n\t\t[from, to] = Interpolation.handleUndefined(from, to);\n\t\tconst a1 = from;\n\t\tconst b1 = to - a1;\n\t\treturn (progress) => {\n\t\t\treturn a1 + b1 * progress;\n\t\t};\n\t},\n\tdifference(from, to) {\n\t\treturn to - from;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/interpolation/ObjectInterpolation.ts\nconst ObjectInterpolation = (valueInterpolation) => {\n\treturn {\n\t\tinterpolate(from, to) {\n\t\t\t[from, to] = Interpolation.handleUndefined(from, to);\n\t\t\tconst result = Object.assign({}, from);\n\t\t\tconst interpolations = {};\n\t\t\tconst keys = /* @__PURE__ */ new Set();\n\t\t\tfor (const key in from) {\n\t\t\t\tinterpolations[key] = valueInterpolation.interpolate(from[key], to[key]);\n\t\t\t\tkeys.add(key);\n\t\t\t}\n\t\t\tfor (const key in to) if (!keys.has(key)) {\n\t\t\t\tinterpolations[key] = valueInterpolation.interpolate(from[key], to[key]);\n\t\t\t\tkeys.add(key);\n\t\t\t}\n\t\t\treturn (progress) => {\n\t\t\t\tfor (const key in interpolations) result[key] = interpolations[key](progress);\n\t\t\t\treturn result;\n\t\t\t};\n\t\t},\n\t\tdifference(from, to) {\n\t\t\tlet sum = 0;\n\t\t\tfor (const key in from) {\n\t\t\t\tconst difference = valueInterpolation.difference(from[key], to[key]);\n\t\t\t\tsum += difference ** 2;\n\t\t\t}\n\t\t\treturn Math.sqrt(sum);\n\t\t}\n\t};\n};\n\n//#endregion\n//#region ../../library/src/interpolation/ValueInterpolation.ts\nconst DefaultInterpolationOptions = { colorModel: \"husl\" };\n/**\n* @internal\n*/\nvar ValueInterpolation = class ValueInterpolation {\n\toptions;\n\t/**\n\t* @internal\n\t*/\n\tconstructor(options = DefaultInterpolationOptions) {\n\t\tthis.options = {\n\t\t\t...DefaultInterpolationOptions,\n\t\t\t...options\n\t\t};\n\t}\n\t/**\n\t* @internal\n\t*/\n\tinterPolationForValue(value) {\n\t\tconst type = typeof value;\n\t\tif (type === \"number\") return NumberInterpolation;\n\t\telse if (type === \"boolean\" || type === \"function\") return NoInterpolation;\n\t\telse if (Color.isColor(value)) return ColorInterpolation(this.options.colorModel);\n\t\telse if (type === \"object\") {\n\t\t\tif (value === null) return NoInterpolation;\n\t\t\tconst constructor = value.constructor;\n\t\t\tif (constructor && isInterpolatable(constructor)) {\n\t\t\t\tconst interpolation = constructor.interpolationFor(value, this);\n\t\t\t\tif (interpolation && interpolation !== this && interpolation.constructor !== ValueInterpolation) return interpolation;\n\t\t\t}\n\t\t\treturn ObjectInterpolation(this);\n\t\t}\n\t\tconsole.warn(`No interpolation defined for ${value}`);\n\t\treturn NoInterpolation;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tinterpolate = (from, to) => {\n\t\t[from, to] = Interpolation.handleUndefined(from, to);\n\t\treturn this.interPolationForValue(from).interpolate(from, to);\n\t};\n\t/**\n\t* @internal\n\t*/\n\tdifference = (from, to) => {\n\t\treturn this.interPolationForValue(from).difference(from, to);\n\t};\n};\n/**\n* @internal\n*/\nconst AnyInterpolation = /* @__PURE__ */ new ValueInterpolation();\n\n//#endregion\n//#region ../../library/src/render/utils/isMotionValue.ts\n/** @internal */\nconst isMotionValue = (v) => v instanceof MotionValue;\n\n//#endregion\n//#region ../../library/src/animation/Animators/PrecalculatedAnimator.ts\nconst Defaults$1 = /* @__PURE__ */ (() => ({\n\tdelta: 1 / 60,\n\tmaxValues: 1e4\n}))();\n/**\n* @internal\n* @deprecated\n*/\nvar PrecalculatedAnimator = class {\n\tanimator;\n\tvalues;\n\tcurrentTime = 0;\n\ttotalTime;\n\toptions;\n\tconstructor(options) {\n\t\tthis.options = {\n\t\t\t...Defaults$1,\n\t\t\t...options\n\t\t};\n\t\tthis.animator = options.animator;\n\t}\n\tpreCalculate() {\n\t\tif (!this.animator.isReady()) return;\n\t\tconst { delta } = this.options;\n\t\tthis.values = [];\n\t\twhile (!this.animator.isFinished() && this.values.length < this.options.maxValues) {\n\t\t\tlet value = this.animator.next(this.options.delta);\n\t\t\tif (typeof value === \"object\" && value) value = { ...value };\n\t\t\tthis.values.push(value);\n\t\t}\n\t\tthis.totalTime = this.values.length * delta;\n\t}\n\tindexForTime(time) {\n\t\tassert$1(this.values !== void 0, \"values must be set before calling indexForTime()\");\n\t\tassert$1(this.totalTime !== void 0, \"totalTime must be set before calling indexForTime()\");\n\t\treturn Math.max(0, Math.min(this.values.length - 1, Math.round(this.values.length * (time / this.totalTime)) - 1));\n\t}\n\tvalueForTime(time) {\n\t\tassert$1(this.values !== void 0, \"values must be set before calling valueForTime()\");\n\t\tconst index = this.indexForTime(time);\n\t\treturn this.values[index];\n\t}\n\tsetFrom(value) {\n\t\tthis.animator.setFrom(value);\n\t\tthis.preCalculate();\n\t}\n\tsetTo(end) {\n\t\tthis.animator.setTo(end);\n\t\tthis.preCalculate();\n\t}\n\tisReady() {\n\t\tassert$1(this.totalTime !== void 0, \"totalTime must be set before calling isReady()\");\n\t\treturn this.values !== void 0 && this.values.length > 0 && this.totalTime > 0;\n\t}\n\tnext(delta) {\n\t\tthis.currentTime += delta;\n\t\treturn this.valueForTime(this.currentTime);\n\t}\n\tisFinished() {\n\t\tassert$1(this.totalTime !== void 0, \"totalTime must be set before calling isFinished()\");\n\t\treturn this.totalTime === 0 || this.currentTime >= this.totalTime;\n\t}\n\tget endValue() {\n\t\tthis.preCalculate();\n\t\tassert$1(this.totalTime !== void 0, \"expecting totalTime to be set after calling preCalculate()\");\n\t\tconst value = this.valueForTime(this.totalTime);\n\t\tassert$1(this.values !== void 0, \"expecting values to be set after calling preCalculate()\");\n\t\treturn this.values.length > 0 ? value : this.animator.next(0);\n\t}\n};\n\n//#endregion\n//#region ../../../node_modules/eventemitter3/index.js\nvar require_eventemitter3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar prefix = \"~\";\n\t/**\n\t* Constructor to create a storage for our `EE` objects.\n\t* An `Events` instance is a plain object whose properties are event names.\n\t*\n\t* @constructor\n\t* @private\n\t*/\n\tfunction Events() {}\n\tif (Object.create) {\n\t\tEvents.prototype = Object.create(null);\n\t\tif (!new Events().__proto__) prefix = false;\n\t}\n\t/**\n\t* Representation of a single event listener.\n\t*\n\t* @param {Function} fn The listener function.\n\t* @param {*} context The context to invoke the listener with.\n\t* @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n\t* @constructor\n\t* @private\n\t*/\n\tfunction EE(fn, context, once) {\n\t\tthis.fn = fn;\n\t\tthis.context = context;\n\t\tthis.once = once || false;\n\t}\n\t/**\n\t* Add a listener for a given event.\n\t*\n\t* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n\t* @param {(String|Symbol)} event The event name.\n\t* @param {Function} fn The listener function.\n\t* @param {*} context The context to invoke the listener with.\n\t* @param {Boolean} once Specify if the listener is a one-time listener.\n\t* @returns {EventEmitter}\n\t* @private\n\t*/\n\tfunction addListener(emitter, event, fn, context, once) {\n\t\tif (typeof fn !== \"function\") throw new TypeError(\"The listener must be a function\");\n\t\tvar listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;\n\t\tif (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n\t\telse if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n\t\telse emitter._events[evt] = [emitter._events[evt], listener];\n\t\treturn emitter;\n\t}\n\t/**\n\t* Clear event by name.\n\t*\n\t* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n\t* @param {(String|Symbol)} evt The Event name.\n\t* @private\n\t*/\n\tfunction clearEvent(emitter, evt) {\n\t\tif (--emitter._eventsCount === 0) emitter._events = new Events();\n\t\telse delete emitter._events[evt];\n\t}\n\t/**\n\t* Minimal `EventEmitter` interface that is molded against the Node.js\n\t* `EventEmitter` interface.\n\t*\n\t* @constructor\n\t* @public\n\t*/\n\tfunction EventEmitter() {\n\t\tthis._events = new Events();\n\t\tthis._eventsCount = 0;\n\t}\n\t/**\n\t* Return an array listing the events for which the emitter has registered\n\t* listeners.\n\t*\n\t* @returns {Array}\n\t* @public\n\t*/\n\tEventEmitter.prototype.eventNames = function eventNames() {\n\t\tvar names = [], events, name;\n\t\tif (this._eventsCount === 0) return names;\n\t\tfor (name in events = this._events) if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n\t\tif (Object.getOwnPropertySymbols) return names.concat(Object.getOwnPropertySymbols(events));\n\t\treturn names;\n\t};\n\t/**\n\t* Return the listeners registered for a given event.\n\t*\n\t* @param {(String|Symbol)} event The event name.\n\t* @returns {Array} The registered listeners.\n\t* @public\n\t*/\n\tEventEmitter.prototype.listeners = function listeners(event) {\n\t\tvar evt = prefix ? prefix + event : event, handlers = this._events[evt];\n\t\tif (!handlers) return [];\n\t\tif (handlers.fn) return [handlers.fn];\n\t\tfor (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) ee[i] = handlers[i].fn;\n\t\treturn ee;\n\t};\n\t/**\n\t* Return the number of listeners listening to a given event.\n\t*\n\t* @param {(String|Symbol)} event The event name.\n\t* @returns {Number} The number of listeners.\n\t* @public\n\t*/\n\tEventEmitter.prototype.listenerCount = function listenerCount(event) {\n\t\tvar evt = prefix ? prefix + event : event, listeners = this._events[evt];\n\t\tif (!listeners) return 0;\n\t\tif (listeners.fn) return 1;\n\t\treturn listeners.length;\n\t};\n\t/**\n\t* Calls each of the listeners registered for a given event.\n\t*\n\t* @param {(String|Symbol)} event The event name.\n\t* @returns {Boolean} `true` if the event had listeners, else `false`.\n\t* @public\n\t*/\n\tEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n\t\tvar evt = prefix ? prefix + event : event;\n\t\tif (!this._events[evt]) return false;\n\t\tvar listeners = this._events[evt], len = arguments.length, args, i;\n\t\tif (listeners.fn) {\n\t\t\tif (listeners.once) this.removeListener(event, listeners.fn, void 0, true);\n\t\t\tswitch (len) {\n\t\t\t\tcase 1: return listeners.fn.call(listeners.context), true;\n\t\t\t\tcase 2: return listeners.fn.call(listeners.context, a1), true;\n\t\t\t\tcase 3: return listeners.fn.call(listeners.context, a1, a2), true;\n\t\t\t\tcase 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n\t\t\t\tcase 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n\t\t\t\tcase 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n\t\t\t}\n\t\t\tfor (i = 1, args = new Array(len - 1); i < len; i++) args[i - 1] = arguments[i];\n\t\t\tlisteners.fn.apply(listeners.context, args);\n\t\t} else {\n\t\t\tvar length = listeners.length, j;\n\t\t\tfor (i = 0; i < length; i++) {\n\t\t\t\tif (listeners[i].once) this.removeListener(event, listeners[i].fn, void 0, true);\n\t\t\t\tswitch (len) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tlisteners[i].fn.call(listeners[i].context);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tlisteners[i].fn.call(listeners[i].context, a1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tlisteners[i].fn.call(listeners[i].context, a1, a2);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\tlisteners[i].fn.call(listeners[i].context, a1, a2, a3);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif (!args) for (j = 1, args = new Array(len - 1); j < len; j++) args[j - 1] = arguments[j];\n\t\t\t\t\t\tlisteners[i].fn.apply(listeners[i].context, args);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t};\n\t/**\n\t* Add a listener for a given event.\n\t*\n\t* @param {(String|Symbol)} event The event name.\n\t* @param {Function} fn The listener function.\n\t* @param {*} [context=this] The context to invoke the listener with.\n\t* @returns {EventEmitter} `this`.\n\t* @public\n\t*/\n\tEventEmitter.prototype.on = function on(event, fn, context) {\n\t\treturn addListener(this, event, fn, context, false);\n\t};\n\t/**\n\t* Add a one-time listener for a given event.\n\t*\n\t* @param {(String|Symbol)} event The event name.\n\t* @param {Function} fn The listener function.\n\t* @param {*} [context=this] The context to invoke the listener with.\n\t* @returns {EventEmitter} `this`.\n\t* @public\n\t*/\n\tEventEmitter.prototype.once = function once(event, fn, context) {\n\t\treturn addListener(this, event, fn, context, true);\n\t};\n\t/**\n\t* Remove the listeners of a given event.\n\t*\n\t* @param {(String|Symbol)} event The event name.\n\t* @param {Function} fn Only remove the listeners that match this function.\n\t* @param {*} context Only remove the listeners that have this context.\n\t* @param {Boolean} once Only remove one-time listeners.\n\t* @returns {EventEmitter} `this`.\n\t* @public\n\t*/\n\tEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n\t\tvar evt = prefix ? prefix + event : event;\n\t\tif (!this._events[evt]) return this;\n\t\tif (!fn) {\n\t\t\tclearEvent(this, evt);\n\t\t\treturn this;\n\t\t}\n\t\tvar listeners = this._events[evt];\n\t\tif (listeners.fn) {\n\t\t\tif (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) clearEvent(this, evt);\n\t\t} else {\n\t\t\tfor (var i = 0, events = [], length = listeners.length; i < length; i++) if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) events.push(listeners[i]);\n\t\t\tif (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n\t\t\telse clearEvent(this, evt);\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n\t* Remove all listeners, or those of the specified event.\n\t*\n\t* @param {(String|Symbol)} [event] The event name.\n\t* @returns {EventEmitter} `this`.\n\t* @public\n\t*/\n\tEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n\t\tvar evt;\n\t\tif (event) {\n\t\t\tevt = prefix ? prefix + event : event;\n\t\t\tif (this._events[evt]) clearEvent(this, evt);\n\t\t} else {\n\t\t\tthis._events = new Events();\n\t\t\tthis._eventsCount = 0;\n\t\t}\n\t\treturn this;\n\t};\n\tEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\tEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\tEventEmitter.prefixed = prefix;\n\tEventEmitter.EventEmitter = EventEmitter;\n\tif (\"undefined\" !== typeof module) module.exports = EventEmitter;\n}));\n\n//#endregion\n//#region ../../library/src/core/EventEmitter.ts\nconst EventEmitter3 = /* @__PURE__ */ (() => require_eventemitter3().EventEmitter)();\nvar EventEmitter = class {\n\t_emitter = new EventEmitter3();\n\teventNames() {\n\t\treturn this._emitter.eventNames();\n\t}\n\teventListeners() {\n\t\tconst listeners = {};\n\t\tfor (const eventName of this._emitter.eventNames()) listeners[eventName] = this._emitter.listeners(eventName);\n\t\treturn listeners;\n\t}\n\ton(eventName, fn) {\n\t\tthis.addEventListener(eventName, fn, false, false, this);\n\t}\n\toff(eventName, fn) {\n\t\tthis.removeEventListeners(eventName, fn);\n\t}\n\tonce(eventName, fn) {\n\t\tthis.addEventListener(eventName, fn, true, false, this);\n\t}\n\tunique(eventName, fn) {\n\t\tthis.addEventListener(eventName, fn, false, true, this);\n\t}\n\taddEventListener(eventName, fn, once, unique, context) {\n\t\tif (unique) {\n\t\t\tfor (const name of this._emitter.eventNames()) if (fn === this._emitter.listeners(name)) return;\n\t\t}\n\t\tif (once === true) this._emitter.once(eventName, fn, context);\n\t\telse this._emitter.addListener(eventName, fn, context);\n\t}\n\tremoveEventListeners(eventName, fn) {\n\t\tif (eventName) this._emitter.removeListener(eventName, fn);\n\t\telse this.removeAllEventListeners();\n\t}\n\tremoveAllEventListeners() {\n\t\tthis._emitter.removeAllListeners();\n\t}\n\tcountEventListeners(eventName) {\n\t\tif (eventName) return this._emitter.listeners(eventName).length;\n\t\telse {\n\t\t\tlet count = 0;\n\t\t\tfor (const name of this._emitter.eventNames()) count += this._emitter.listeners(name).length;\n\t\t\treturn count;\n\t\t}\n\t}\n\temit(eventName, ...args) {\n\t\tthis._emitter.emit(eventName, ...args);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/core/Time.ts\nconst _raf = (f) => {\n\tsetTimeout(f, 1 / 60);\n};\nconst __raf = /* @__PURE__ */ (() => safeWindow[\"requestAnimationFrame\"] || _raf)();\nconst raf = (f) => __raf(f);\n\n//#endregion\n//#region ../../library/src/core/Loop.ts\nlet LoopTimeStep = /* @__PURE__ */ (() => 1 / 60)();\n/**\n* @public\n*/\nvar Loop = class extends EventEmitter {\n\t_started = false;\n\t_frame = 0;\n\t_frameTasks = [];\n\t/**\n\t* To add a task to be done at the end of a frame.\n\t* Tasks added from a task will be ignored. These will run after loop events have been processed.\n\t* @internal\n\t*/\n\taddFrameTask(task) {\n\t\tthis._frameTasks.push(task);\n\t}\n\t_processFrameTasks() {\n\t\tconst postEventTasks = this._frameTasks;\n\t\tconst length = postEventTasks.length;\n\t\tif (length === 0) return;\n\t\tfor (let i = 0; i < length; i++) postEventTasks[i]?.();\n\t\tpostEventTasks.length = 0;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tstatic set TimeStep(value) {\n\t\tLoopTimeStep = value;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tstatic get TimeStep() {\n\t\treturn LoopTimeStep;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tconstructor(start = false) {\n\t\tsuper();\n\t\tif (start) this.start();\n\t}\n\t/**\n\t* @internal\n\t*/\n\tstart() {\n\t\tif (this._started) return this;\n\t\tthis._frame = 0;\n\t\tthis._started = true;\n\t\traf(this.tick);\n\t\treturn this;\n\t}\n\t/**\n\t* @internal\n\t* @deprecated Don’t use `stop` as you could be stopping the MainLoop for others.\n\t*/\n\tstop() {\n\t\tthis._started = false;\n\t\treturn this;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tget frame() {\n\t\treturn this._frame;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tget time() {\n\t\treturn this._frame * LoopTimeStep;\n\t}\n\t/**\n\t* @internal\n\t*/\n\ttick = () => {\n\t\tif (!this._started) return;\n\t\traf(this.tick);\n\t\tthis.emit(\"update\", this._frame, LoopTimeStep);\n\t\tthis.emit(\"render\", this._frame, LoopTimeStep);\n\t\tthis._processFrameTasks();\n\t\tthis._frame++;\n\t};\n};\n/**\n* @internal\n*\n* This call is safe to be tree-shaken away as long as `new Loop()` is called with `start` set to `false` (or unset).\n*/\nconst MainLoop = /* @__PURE__ */ new Loop();\n\n//#endregion\n//#region ../../library/src/animation/Drivers/AnimationDriver.ts\n/**\n* @internal\n*/\nvar AnimationDriver = class {\n\tanimator;\n\tupdateCallback;\n\tfinishedCallback;\n\tconstructor(animator, updateCallback, finishedCallback) {\n\t\tthis.animator = animator;\n\t\tthis.updateCallback = updateCallback;\n\t\tthis.finishedCallback = finishedCallback;\n\t\tif (!this.animator.isReady()) console.warn(\"AnimationDriver initialized with animator that isn't ready\");\n\t}\n\tupdate = (frame, elapsed) => {\n\t\tif (this.animator.isFinished()) this.finish();\n\t\telse {\n\t\t\tconst value = this.animator.next(elapsed);\n\t\t\tthis.updateCallback(value);\n\t\t}\n\t};\n\tfinish() {\n\t\tif (this.finishedCallback) this.finishedCallback(this.animator.isFinished());\n\t}\n\tisFinished() {\n\t\treturn this.animator.isFinished();\n\t}\n};\n\n//#endregion\n//#region ../../library/src/animation/Drivers/MainLoopDriver.ts\n/**\n* @internal\n*/\nvar MainLoopAnimationDriver = class extends AnimationDriver {\n\tplay() {\n\t\tif (RenderEnvironment.target !== RenderTarget.preview) {\n\t\t\tthis.finishedCallback?.(false);\n\t\t\treturn;\n\t\t}\n\t\tMainLoop.on(\"update\", this.update);\n\t}\n\tcancel() {\n\t\tMainLoop.off(\"update\", this.update);\n\t}\n\tfinish() {\n\t\tMainLoop.off(\"update\", this.update);\n\t\tsuper.finish();\n\t}\n};\n\n//#endregion\n//#region ../../library/src/animation/FramerAnimation.ts\nconst DefaultDeprecatedAnimationOptions = {\n\tprecalculate: false,\n\tcolorModel: \"husl\"\n};\n/**\n* The animation object returned by the {@link (animate:function)} functions\n* @remarks\n* Can be used to control a animation or wait for it to finish. You never create a FramerAnimation yourself, but store the return type from the animate function.\n* ```jsx\n* const animation = animate.ease(value, 100)\n* await animation.finished()\n* const animation = animate.spring(value, 200)\n* animation.cancel()\n* ```\n* @privateRemarks\n* This could be called just Animation, but it's type would clash with\n* javascript's native Animation: https://developer.mozilla.org/en-US/docs/Web/API/Animation\n* So if you forget the import, you would get weird errors.\n*\n* Also, this class follows the native Animation as much as possible.\n* @public\n* @deprecated Use the {@link useAnimation} hook instead\n*/\nvar FramerAnimation = class FramerAnimation {\n\t/**\n\t* @internal\n\t*/\n\tdriver;\n\t/**\n\t* @internal\n\t*/\n\tconstructor(target, from, to, animatorClass, options, driverClass = MainLoopAnimationDriver) {\n\t\tthis.resetFinishedPromise();\n\t\tconst deprecatedAnimationOptions = { ...DefaultDeprecatedAnimationOptions };\n\t\tconst animatorOptions = {};\n\t\tif (options) {\n\t\t\tObject.assign(deprecatedAnimationOptions, options);\n\t\t\tObject.assign(animatorOptions, options);\n\t\t}\n\t\tlet interpolation;\n\t\tif (deprecatedAnimationOptions.customInterpolation) interpolation = deprecatedAnimationOptions.customInterpolation;\n\t\telse interpolation = new ValueInterpolation(options);\n\t\tlet animator;\n\t\tif (!animatorClass) animator = new BezierAnimator({}, interpolation);\n\t\telse animator = new animatorClass(animatorOptions, interpolation);\n\t\tif (deprecatedAnimationOptions.precalculate) animator = new PrecalculatedAnimator({ animator });\n\t\tanimator.setFrom(from);\n\t\tanimator.setTo(to);\n\t\tconst updateCallback = (value) => {\n\t\t\tFramerAnimation.driverCallbackHandler(target, value);\n\t\t};\n\t\tconst finishedCallback = (isFinished) => {\n\t\t\tif (isFinished) {\n\t\t\t\tFramerAnimation.driverCallbackHandler(target, to);\n\t\t\t\tif (this.playStateSource === \"running\") this.playStateValue = \"finished\";\n\t\t\t}\n\t\t};\n\t\tthis.driver = new driverClass(animator, updateCallback, finishedCallback);\n\t}\n\t/**\n\t* @internal\n\t*/\n\tstatic driverCallbackHandler(target, value) {\n\t\tif (isAnimatable(target) || isMotionValue(target)) target.set(value);\n\t\telse {\n\t\t\tconst targetObject = target;\n\t\t\tAnimatable.transaction((update) => {\n\t\t\t\tfor (const key in targetObject) {\n\t\t\t\t\tconst targetValue = targetObject[key];\n\t\t\t\t\tif (isAnimatable(targetValue)) update(targetValue, value[key]);\n\t\t\t\t\telse targetObject[key] = value[key];\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* @internal\n\t*/\n\tplayStateSource = \"idle\";\n\t/**\n\t* @internal\n\t*/\n\tget playStateValue() {\n\t\treturn this.playStateSource;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tset playStateValue(value) {\n\t\tif (value !== this.playStateSource) {\n\t\t\tconst oldValue = value;\n\t\t\tthis.playStateSource = value;\n\t\t\tswitch (value) {\n\t\t\t\tcase \"idle\":\n\t\t\t\t\tif (oldValue === \"running\") this.oncancel?.();\n\t\t\t\t\tthis.readyResolve && this.readyResolve();\n\t\t\t\t\tthis.resetReadyPromise();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"finished\":\n\t\t\t\t\tif (oldValue === \"idle\") {\n\t\t\t\t\t\tconsole.warn(\"Bad state transition\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.onfinish?.();\n\t\t\t\t\tthis.finishedResolve && this.finishedResolve();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"running\": this.resetReadyPromise();\n\t\t\t}\n\t\t\tif (oldValue === \"finished\") this.resetFinishedPromise();\n\t\t\tif (value === \"finished\") this.playStateValue = \"idle\";\n\t\t}\n\t}\n\t/**\n\t* @internal\n\t*/\n\tget playState() {\n\t\treturn this.playStateValue;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tonfinish;\n\t/**\n\t* @internal\n\t*/\n\toncancel;\n\t/**\n\t* @internal\n\t*/\n\treadyPromise = Promise.resolve();\n\t/**\n\t* @internal\n\t*/\n\treadyResolve = null;\n\t/**\n\t* @internal\n\t*/\n\tresetReadyPromise() {\n\t\tthis.readyResolve = null;\n\t\tthis.readyPromise = new Promise((resolve, reject) => {\n\t\t\tthis.readyResolve = resolve;\n\t\t});\n\t}\n\t/**\n\t* Wait for the animation to be ready to play.\n\t* @remarks\n\t* ```jsx\n\t* const animation = animate.ease(value, 100)\n\t* animation.ready().then(() => {\n\t*    // Animation is ready\n\t* })\n\t\n\t* // async/await syntax\n\t* const animation = animate.ease(value, 100)\n\t* await animation.ready()\n\t* // Animation is ready\n\t* ```\n\t* @returns Promise that is resolved when the animation is ready to play\n\t* @public\n\t*/\n\tget ready() {\n\t\treturn this.readyPromise;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tfinishedPromise = Promise.resolve();\n\t/**\n\t* @internal\n\t*/\n\tfinishedResolve = null;\n\t/**\n\t* @internal\n\t*/\n\tfinishedReject = null;\n\t/**\n\t* @internal\n\t*/\n\tresetFinishedPromise() {\n\t\tthis.finishedResolve = null;\n\t\tthis.finishedReject = null;\n\t\tthis.finishedPromise = new Promise((resolve, reject) => {\n\t\t\tthis.finishedResolve = resolve;\n\t\t\tthis.finishedReject = reject;\n\t\t});\n\t\tthis.finishedPromise.catch((reason) => {});\n\t}\n\t/**\n\t* Wait for the animation to be finished.\n\t* @remarks\n\t* ```jsx\n\t* // async/await syntax\n\t* const animation = animate.ease(value, 100)\n\t* await animation.finished()\n\t* // Animation is finished\n\t*\n\t*\n\t* const animation = animate.ease(value, 100)\n\t* animation.ready().then(() => {\n\t*    // Animation is finished\n\t* })\n\t* ```\n\t* @returns Promise that is resolved when the animation is ready to play\n\t* @public\n\t*/\n\tget finished() {\n\t\treturn this.finishedPromise;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tplay() {\n\t\tthis.playStateValue = \"running\";\n\t\tthis.driver.play();\n\t}\n\t/**\n\t* Cancels the animation if it is still running.\n\t* @remarks\n\t* ```jsx\n\t* const animation = animate.ease(value, 100, {duration: 3})\n\t* setTimeout(() => animation.cancel(), 500)\n\t* ```\n\t* @public\n\t*/\n\tcancel() {\n\t\tif (this.playStateValue !== \"running\") return;\n\t\tthis.driver.cancel();\n\t\tif (this.playState !== \"idle\") this.finishedReject && this.finishedReject(\"AbortError\");\n\t\tthis.playStateValue = \"idle\";\n\t}\n\t/**\n\t* @internal\n\t*/\n\tfinish() {\n\t\tif (this.playStateSource === \"running\") {\n\t\t\tthis.playStateValue = \"finished\";\n\t\t\tthis.driver.finish();\n\t\t}\n\t}\n\t/**\n\t* @internal\n\t*/\n\tisFinished() {\n\t\treturn this.playStateValue === \"finished\";\n\t}\n};\n\n//#endregion\n//#region ../../library/src/animation/Motion/autoValueHandlers.ts\nconst correctBorderScale = (axis) => ({ correct: (latest, { projectionDelta, treeScale }) => {\n\tif (typeof latest === \"string\") latest = parseFloat(latest);\n\tif (latest === 0) return \"0px\";\n\tlet corrected = latest;\n\tif (projectionDelta && treeScale) {\n\t\tcorrected = Math.round(latest / projectionDelta[axis].scale / treeScale[axis]);\n\t\tcorrected = Math.max(corrected, 1);\n\t}\n\treturn corrected + \"px\";\n} });\n\n//#endregion\n//#region ../../library/src/animation/Motion/MotionSetup.tsx\naddScaleCorrector({\n\tborderTopWidth: correctBorderScale(\"y\"),\n\tborderLeftWidth: correctBorderScale(\"x\"),\n\tborderRightWidth: correctBorderScale(\"x\"),\n\tborderBottomWidth: correctBorderScale(\"y\")\n});\n/** @public */\nfunction MotionSetup({ children }) {\n\treturn /* @__PURE__ */ jsx(Fragment$1, { children });\n}\n\n//#endregion\n//#region ../../library/src/animation/Motion/patchBorderRadiusScaleCorrector.ts\nfunction patchBorderRadiusScaleCorrector() {\n\tif (isPatched) return;\n\tisPatched = true;\n\taddScaleCorrector(borderRadiusCorrectors);\n}\nlet isPatched = false;\nconst calcPrefix = \"calc(\";\nconst separator = \"*\";\nconst correctBorderRadius$1 = { correct: (latest, node) => {\n\tif (!node.target) return latest;\n\tif (typeof latest === \"string\") {\n\t\tif (latest.startsWith(calcPrefix)) {\n\t\t\tconst [candidate, ...rest] = latest.slice(5).split(separator);\n\t\t\tif (isUndefined(candidate) || !px.test(candidate.trim())) return latest;\n\t\t\tconst pixels = parseFloat(candidate);\n\t\t\tconst x = pixelsToPercent$1(pixels, node.target.x);\n\t\t\tconst y = pixelsToPercent$1(pixels, node.target.y);\n\t\t\treturn `${reWrapInCalc(x, rest)} ${reWrapInCalc(y, rest)}`;\n\t\t}\n\t\tif (px.test(latest)) latest = parseFloat(latest);\n\t\telse return latest;\n\t}\n\treturn `${pixelsToPercent$1(latest, node.target.x)}% ${pixelsToPercent$1(latest, node.target.y)}%`;\n} };\nconst borderRadiusCorrectors = /* @__PURE__ */ (() => ({\n\tborderRadius: {\n\t\t...correctBorderRadius$1,\n\t\tapplyTo: [\n\t\t\t\"borderTopLeftRadius\",\n\t\t\t\"borderTopRightRadius\",\n\t\t\t\"borderBottomLeftRadius\",\n\t\t\t\"borderBottomRightRadius\"\n\t\t]\n\t},\n\tborderTopLeftRadius: correctBorderRadius$1,\n\tborderTopRightRadius: correctBorderRadius$1,\n\tborderBottomLeftRadius: correctBorderRadius$1,\n\tborderBottomRightRadius: correctBorderRadius$1\n}))();\nfunction pixelsToPercent$1(pixels, axis) {\n\tif (axis.max === axis.min) return 0;\n\treturn pixels / (axis.max - axis.min) * 100;\n}\nfunction reWrapInCalc(percentage, rest) {\n\treturn `${calcPrefix}${percentage}%${separator}${rest.join(separator)}`;\n}\n\n//#endregion\n//#region ../../library/src/animation/Motion/startAnimation.ts\n/**\n* @deprecated\n* @internal\n*/\nfunction startAnimation(_key, value, target, transition = {}) {\n\twarnOnce$1(`\"startAnimation\" is unsupported. Use \"animate\" instead: https://www.framer.com/api/motion/utilities/#animate`);\n\treturn new Promise((resolve) => {\n\t\tanimate$1(value, target, {\n\t\t\t...transition,\n\t\t\tonComplete: () => resolve()\n\t\t});\n\t});\n}\n\n//#endregion\n//#region ../../library/src/animation/animate.ts\n/**\n* Animate an {@link (Animatable:interface)} value to a new value.\n* @remarks\n* Recommended use is to use convenience functions from the `animate` namespace\n* instead of passing an animator. Only use this for low-level animation tweaking.\n*\n* ```jsx\n* const value = Animatable(0)\n* animate(value, 100)\n*\n* const value = Animatable({x: 0, y: 0})\n* animate(value, {x: 100, y: 100})\n* ```\n*\n* @param from - The animatable value or object to start from\n* @param to - Value to animate to\n* @param animator - Animator class to use.\n* @param options - Animation options\n* @returns Instance of {@link FramerAnimation} that can be used to control the animation\n* @public\n* @deprecated Use the {@link AnimationProps.animate} prop on {@link Frame} instead.\n*/\nfunction deprecatedAnimate(from, to, animator, options) {\n\tdeprecationWarning(\"animate()\", \"2.0.0\", \"the new animation API (https://www.framer.com/api/animation/)\");\n\tconst target = from;\n\tlet fromValue;\n\tif (isAnimatable(from) || isMotionValue(from)) fromValue = from.get();\n\telse fromValue = Animatable.objectToValues(from);\n\tconst animation = new FramerAnimation(target, fromValue, to, animator, options);\n\tanimation.play();\n\treturn animation;\n}\n/**\n* @public\n* @deprecated Use the {@link MotionProps.animate} prop on {@link Frame} instead.\n*/\nconst animate = /* @__PURE__ */ (() => {\n\t/** @public */\n\tfunction animate(from, to, animatorOrTransition, options) {\n\t\treturn isAnimatable(from) ? deprecatedAnimate(from, to, animatorOrTransition, options) : animate$1(from, to, animatorOrTransition);\n\t}\n\t/**\n\t* Animate value with a spring curve\n\t* @remarks\n\t* ```jsx\n\t* const value = Animatable(0)\n\t* animate.spring(value, 100, {tension: 100, friction: 100})\n\t*\n\t* animate.spring(value, 100, {dampingRatio: 0.5, duration: 1})\n\t* ```\n\t* @param from - Value to animate\n\t* @param to - Value to animate to\n\t* @param options - Options for the spring\n\t* These can be either `tension`, `friction`, `velocity` and `tolerance` _or_ `dampingRatio`, `duration`, `velocity` and `mass`\n\t* @returns Instance of {@link FramerAnimation} that can be used to control the animation\n\t* @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.\n\t*/\n\tanimate.spring = (from, to, options) => {\n\t\treturn animate(from, to, SpringAnimator, options);\n\t};\n\t/**\n\t* Animate value with a bezier curve\n\t* @remarks\n\t* ```jsx\n\t* const value = Animatable(0)\n\t* animate.bezier(value, 100, {duration: 1, curve: Bezier.EaseIn})\n\t*\n\t* animate.bezier(value, 100, {duration: 1, curve: [0.3, 0.1, 0.4, 1]})\n\t* ```\n\t* @param from - Value to animate\n\t* @param to - Value to animate to\n\t* @param options - Options for the bezier curve\n\t*\n\t* - `duration` Duration of the animation\n\t* - `curve` One of the `Bezier` enum values or an array with 4 control points\n\t*\n\t* @returns Instance of {@link FramerAnimation} that can be used to control the animation\n\t* @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.\n\t*/\n\tanimate.bezier = (from, to, options) => {\n\t\treturn animate(from, to, BezierAnimator, options);\n\t};\n\t/**\n\t* Animate value with a linear animation\n\t* @remarks\n\t* ```jsx\n\t* const value = Animatable(0)\n\t* animate.linear(value, 100)\n\t*\n\t* animate.linear(value, 100, {duration: 1})\n\t* ```\n\t* @param from  - Value to animate\n\t* @param to - Value to animate to\n\t* @param options - The options for the animation\n\t*\n\t* - `duration` - Duration of the animation\n\t*\n\t* @returns Instance of {@link FramerAnimation} that can be used to control the animation\n\t* @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.\n\t*/\n\tanimate.linear = (from, to, options) => {\n\t\treturn animate.bezier(from, to, {\n\t\t\t...options,\n\t\t\tcurve: \"linear\"\n\t\t});\n\t};\n\t/**\n\t* Animate value with a ease animation\n\t* @remarks\n\t* ```jsx\n\t* const value = Animatable(0)\n\t* animate.ease(value, 100)\n\t*\n\t* animate.ease(value, 100, {duration: 1})\n\t* ```\n\t* @param from  - Value to animate\n\t* @param to - Value to animate to\n\t* @param options - The options for the animation\n\t*\n\t* - `duration` - Duration of the animation\n\t*\n\t* @returns Instance of {@link FramerAnimation} that can be used to control the animation\n\t* @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.\n\t*/\n\tanimate.ease = (from, to, options) => {\n\t\treturn animate.bezier(from, to, {\n\t\t\t...options,\n\t\t\tcurve: \"ease\"\n\t\t});\n\t};\n\t/**\n\t* Animate value with a ease in animation\n\t* @remarks\n\t* ```jsx\n\t* const value = Animatable(0)\n\t* animate.easeIn(value, 100)\n\t*\n\t* animate.easeIn(value, 100, {duration: 1})\n\t* ```\n\t* @param from  - Value to animate\n\t* @param to - Value to animate to\n\t* @param options - The options for the animation\n\t*\n\t* - `duration` - Duration of the animation\n\t*\n\t* @returns Instance of {@link FramerAnimation} that can be used to control the animation\n\t* @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.\n\t*/\n\tanimate.easeIn = (from, to, options) => {\n\t\treturn animate.bezier(from, to, {\n\t\t\t...options,\n\t\t\tcurve: \"ease-in\"\n\t\t});\n\t};\n\t/**\n\t* Animate value with a ease out animation\n\t* @remarks\n\t* ```jsx\n\t* const value = Animatable(0)\n\t* animate.easeOut(value, 100)\n\t*\n\t* animate.easeOUt(value, 100, {duration: 1})\n\t* ```\n\t* @param from  - Value to animate\n\t* @param to - Value to animate to\n\t* @param options - The options for the animation\n\t*\n\t* - `duration` - Duration of the animation\n\t*\n\t* @returns Instance of {@link FramerAnimation} that can be used to control the animation\n\t* @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.\n\t*/\n\tanimate.easeOut = (from, to, options) => {\n\t\treturn animate.bezier(from, to, {\n\t\t\t...options,\n\t\t\tcurve: \"ease-out\"\n\t\t});\n\t};\n\t/**\n\t* Animate value with a ease in out animation\n\t* @remarks\n\t* ```jsx\n\t* const value = Animatable(0)\n\t* animate.easeInOut(value, 100)\n\t*\n\t* animate.easeInOut(value, 100, {duration: 1})\n\t* ```\n\t* @param from  - Value to animate\n\t* @param to - Value to animate to\n\t* @param options - The options for the animation\n\t*\n\t* - `duration` - Duration of the animation\n\t*\n\t* @returns Instance of {@link FramerAnimation} that can be used to control the animation\n\t* @deprecated Use {@link MotionProps.animate} on {@link Frame} instead.\n\t*/\n\tanimate.easeInOut = (from, to, options) => {\n\t\treturn animate.bezier(from, to, {\n\t\t\t...options,\n\t\t\tcurve: \"ease-in-out\"\n\t\t});\n\t};\n\treturn animate;\n})();\n\n//#endregion\n//#region ../../library/src/components/AnimateLayout/LayoutIdContext.tsx\n/**\n* @internal\n*/\nconst LayoutIdContext = /* @__PURE__ */ React.createContext({\n\tgetLayoutId: (args) => null,\n\tpersistLayoutIdCache: () => {},\n\ttop: false,\n\tenabled: true\n});\n/**\n* @internal\n*/\nfunction LayoutIdProvider({ children }) {\n\tif (useContext(LayoutIdContext).top) return /* @__PURE__ */ jsx(Fragment$1, { children });\n\tconst cache = useRef({\n\t\tbyId: {},\n\t\tbyName: {},\n\t\tbyLastId: {},\n\t\tbyPossibleId: {},\n\t\tbyLastName: {},\n\t\tbyLayoutId: {},\n\t\tcount: {\n\t\t\tbyId: {},\n\t\t\tbyName: {}\n\t\t}\n\t});\n\tconst screen = useRef({\n\t\tbyId: {},\n\t\tbyName: {},\n\t\tbyLastId: {},\n\t\tbyPossibleId: {},\n\t\tbyLastName: {},\n\t\tbyLayoutId: {}\n\t});\n\tconst usedIds = useRef(/* @__PURE__ */ new Set()).current;\n\tconst getLayoutId = useCallback(({ id, name, duplicatedFrom }) => {\n\t\tif (!id) return null;\n\t\tconst cacheKey = name ? \"byName\" : \"byId\";\n\t\tconst previousId = cache.current[cacheKey][id];\n\t\tif (previousId) return previousId;\n\t\tconst nodeIdentifier = name || id;\n\t\tif (!duplicatedFrom && !usedIds.has(nodeIdentifier) && (!cache.current.byLayoutId[nodeIdentifier] || cache.current.byLayoutId[nodeIdentifier] === nodeIdentifier)) {\n\t\t\tif (cache.current.count[cacheKey][nodeIdentifier] === void 0) {\n\t\t\t\tcache.current.count[cacheKey][nodeIdentifier] = 0;\n\t\t\t\tcache.current.byLayoutId[nodeIdentifier] = nodeIdentifier;\n\t\t\t\tscreen.current[cacheKey][id] = nodeIdentifier;\n\t\t\t}\n\t\t\tusedIds.add(nodeIdentifier);\n\t\t\treturn nodeIdentifier;\n\t\t}\n\t\tlet possibleMatch = void 0;\n\t\tif (duplicatedFrom?.length) for (let index = duplicatedFrom.length - 1; index >= 0; index--) {\n\t\t\tconst duplicatedId = duplicatedFrom[index];\n\t\t\tassert$1(!!duplicatedId, `duplicatedId must be defined`);\n\t\t\tconst match = cache.current[cacheKey][duplicatedId];\n\t\t\tconst byLastIdMatch = cache.current.byLastId[duplicatedId];\n\t\t\tif (byLastIdMatch && !possibleMatch) {\n\t\t\t\tconst matchedLayoutId = cache.current.byLayoutId[byLastIdMatch];\n\t\t\t\tconst shouldUseNamedLastIdMatch = !matchedLayoutId || matchedLayoutId === name;\n\t\t\t\tif (byLastIdMatch && !usedIds.has(byLastIdMatch) && (name ? shouldUseNamedLastIdMatch : true)) possibleMatch = [byLastIdMatch, duplicatedId];\n\t\t\t}\n\t\t\tconst previousLayoutId = match ? cache.current.byLayoutId[match] : void 0;\n\t\t\tconst shouldUseNamedMatch = !previousLayoutId || previousLayoutId === name;\n\t\t\tif (match && !usedIds.has(match) && (name ? shouldUseNamedMatch : true)) {\n\t\t\t\tscreen.current[cacheKey][id] = match;\n\t\t\t\tscreen.current.byLastId[duplicatedId] = match;\n\t\t\t\tusedIds.add(match);\n\t\t\t\treturn match;\n\t\t\t}\n\t\t}\n\t\tconst last = cache.current.byLastId[id];\n\t\tif (last && !usedIds.has(last)) {\n\t\t\tusedIds.add(last);\n\t\t\tscreen.current.byId[id] = last;\n\t\t\treturn last;\n\t\t}\n\t\tif (possibleMatch) {\n\t\t\tconst [match, duplicatedId] = possibleMatch;\n\t\t\tscreen.current[cacheKey][id] = match;\n\t\t\tscreen.current.byLastId[duplicatedId] = match;\n\t\t\tusedIds.add(match);\n\t\t\treturn match;\n\t\t}\n\t\tconst possible = cache.current.byPossibleId[id];\n\t\tif (possible && !usedIds.has(possible)) {\n\t\t\tusedIds.add(possible);\n\t\t\tscreen.current.byId[id] = possible;\n\t\t\treturn possible;\n\t\t}\n\t\tconst rootDuplicatedId = duplicatedFrom?.[0];\n\t\tconst identifier = name || rootDuplicatedId || id;\n\t\tconst { layoutId, value: nextValue } = nextLayoutId(identifier, (cache.current.count[cacheKey][identifier] ?? -1) + 1, usedIds);\n\t\tcache.current.count[cacheKey][identifier] = nextValue;\n\t\tscreen.current[cacheKey][id] = layoutId;\n\t\tif (duplicatedFrom?.length) {\n\t\t\tif (!name) {\n\t\t\t\tconst lastId = duplicatedFrom[duplicatedFrom.length - 1];\n\t\t\t\tif (lastId) screen.current.byLastId[lastId] = layoutId;\n\t\t\t\tif (duplicatedFrom.length > 1) for (let index = 0; index < duplicatedFrom.length - 1; index++) {\n\t\t\t\t\tconst possibleId = duplicatedFrom[index];\n\t\t\t\t\tif (possibleId === void 0) continue;\n\t\t\t\t\tif (!screen.current.byPossibleId[possibleId]) screen.current.byPossibleId[possibleId] = layoutId;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tscreen.current.byLayoutId[layoutId] = nodeIdentifier;\n\t\tusedIds.add(layoutId);\n\t\treturn layoutId;\n\t}, []);\n\tconst persistLayoutIdCache = useCallback(() => {\n\t\tcache.current = {\n\t\t\tbyId: {\n\t\t\t\t...cache.current.byId,\n\t\t\t\t...screen.current.byId\n\t\t\t},\n\t\t\tbyLastId: {\n\t\t\t\t...cache.current.byLastId,\n\t\t\t\t...screen.current.byLastId\n\t\t\t},\n\t\t\tbyPossibleId: {\n\t\t\t\t...cache.current.byPossibleId,\n\t\t\t\t...screen.current.byPossibleId\n\t\t\t},\n\t\t\tbyName: {\n\t\t\t\t...cache.current.byName,\n\t\t\t\t...screen.current.byName\n\t\t\t},\n\t\t\tbyLastName: {\n\t\t\t\t...cache.current.byLastName,\n\t\t\t\t...screen.current.byLastName\n\t\t\t},\n\t\t\tbyLayoutId: {\n\t\t\t\t...cache.current.byLayoutId,\n\t\t\t\t...screen.current.byLayoutId\n\t\t\t},\n\t\t\tcount: {\n\t\t\t\t...cache.current.count,\n\t\t\t\tbyName: {}\n\t\t\t}\n\t\t};\n\t\tscreen.current = {\n\t\t\tbyId: {},\n\t\t\tbyName: {},\n\t\t\tbyLastId: {},\n\t\t\tbyPossibleId: {},\n\t\t\tbyLastName: {},\n\t\t\tbyLayoutId: {}\n\t\t};\n\t\tusedIds.clear();\n\t}, []);\n\tconst contextValue = useRef({\n\t\tgetLayoutId,\n\t\tpersistLayoutIdCache,\n\t\ttop: true,\n\t\tenabled: true\n\t}).current;\n\treturn /* @__PURE__ */ jsx(LayoutIdContext.Provider, {\n\t\tvalue: contextValue,\n\t\tchildren\n\t});\n}\nfunction nextLayoutId(identifier, initialValue, usedIds) {\n\tlet value = initialValue;\n\tlet layoutId = value ? `${identifier}-${value}` : identifier;\n\twhile (usedIds.has(layoutId)) {\n\t\tvalue++;\n\t\tlayoutId = `${identifier}-${value}`;\n\t}\n\treturn {\n\t\tlayoutId,\n\t\tvalue\n\t};\n}\n/**\n* Enable or disable the automatic generation of layout ids for canvas layers.\n* By default layout ids are generated for all layers created on the Framer\n* canvas. However, layout ids are not generated for any layer that is a\n* descendant of a code component. Sometimes you will want to enable layout id\n* generation for descendants of your code components when they use children,\n* slots, or import design components, and you want those layers to animate with\n* magic motion transitions.\n*\n* You can enable that behavior by wrapping your code component like this\n* ```typescript\n* <AutomaticLayoutIds enabled>\n*  <YourComponent/>\n* </AutomaticLayoutIds>\n* ```\n* @public\n*/\nfunction AutomaticLayoutIds({ enabled = true, ...props }) {\n\tconst context = useContext(LayoutIdContext);\n\tconst contextValue = useMemo(() => {\n\t\treturn {\n\t\t\t...context,\n\t\t\tenabled\n\t\t};\n\t}, [enabled]);\n\treturn /* @__PURE__ */ jsx(LayoutIdContext.Provider, {\n\t\t...props,\n\t\tvalue: contextValue\n\t});\n}\n\n//#endregion\n//#region ../../library/src/components/utils/useConstant.ts\nfunction useConstant(init) {\n\tconst ref = useRef(null);\n\tif (ref.current === null) ref.current = init();\n\treturn ref.current;\n}\n\n//#endregion\n//#region ../../library/src/components/Device/ErrorPlaceholder.tsx\nconst baseStyle = {\n\tbackground: void 0,\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tjustifyContent: \"center\",\n\talignItems: \"center\",\n\tlineHeight: \"1.4em\",\n\ttextOverflow: \"ellipsis\",\n\toverflow: \"hidden\",\n\tminHeight: 0,\n\twidth: \"100%\",\n\theight: \"100%\"\n};\nconst errorStyle = /* @__PURE__ */ (() => ({\n\t...baseStyle,\n\tborder: \"1px solid rgba(149, 149, 149, 0.15)\",\n\tborderRadius: 6,\n\tfontSize: \"12px\",\n\tbackgroundColor: \"rgba(149, 149, 149, 0.1)\",\n\tcolor: \"#a5a5a5\"\n}))();\nconst textStyle = {\n\toverflow: \"hidden\",\n\twhiteSpace: \"nowrap\",\n\ttextOverflow: \"ellipsis\",\n\tmaxWidth: \"100%\",\n\tflexShrink: 0,\n\tpadding: `0 10px`\n};\nconst titleStyle = /* @__PURE__ */ (() => ({\n\t...textStyle,\n\tfontWeight: 500\n}))();\nconst messageStyle = /* @__PURE__ */ (() => ({\n\t...textStyle,\n\twhiteSpace: \"pre\",\n\tmaxHeight: \"calc(50% - calc(20px * var(--framerInternalCanvas-canvasPlaceholderContentScaleFactor, 1)))\",\n\tWebkitMaskImage: \"linear-gradient(to bottom, black 80%, transparent 100%)\"\n}))();\n/** @internal */\nfunction ErrorPlaceholder(props) {\n\tconst { error, file } = props;\n\tconst title = file ? `Error in ${stripSlash(file)}` : \"Error\";\n\tconst message = error instanceof Error ? error.message : \"\" + error;\n\treturn /* @__PURE__ */ jsxs(\"div\", {\n\t\tstyle: errorStyle,\n\t\tchildren: [/* @__PURE__ */ jsx(\"div\", {\n\t\t\tclassName: \"text\",\n\t\t\tstyle: titleStyle,\n\t\t\tchildren: title\n\t\t}), message && /* @__PURE__ */ jsx(\"div\", {\n\t\t\tclassName: \"text\",\n\t\t\tstyle: messageStyle,\n\t\t\tchildren: message\n\t\t})]\n\t});\n}\nfunction stripSlash(title) {\n\tif (title.startsWith(\"./\")) return title.replace(\"./\", \"\");\n\treturn title;\n}\n\n//#endregion\n//#region ../../library/src/components/Device/Device.tsx\nfunction getScaleData(deviceOptions, containerSize) {\n\tconst { componentWidth, componentHeight } = getComponentSize(deviceOptions);\n\tconst scaleX = containerSize.width / componentWidth;\n\tconst scaleY = containerSize.height / componentHeight;\n\tconst scale = Math.min(scaleX, scaleY, 1);\n\tlet screenScalePixelFix = 1;\n\tif (scale < 1) {\n\t\tconst actualScreenWidth = deviceOptions.screenWidth * scale;\n\t\tconst screenScaleX = (actualScreenWidth + 1) / actualScreenWidth;\n\t\tconst actualScreenHeight = deviceOptions.screenHeight * scale;\n\t\tconst screenScaleY = (actualScreenHeight + 1) / actualScreenHeight;\n\t\tscreenScalePixelFix = Math.max(screenScaleX, screenScaleY);\n\t}\n\treturn {\n\t\tscale,\n\t\tscreenScalePixelFix,\n\t\tscaledComponentWidth: componentWidth * scale,\n\t\tscaledComponentHeight: componentHeight * scale,\n\t\tscaledDeviceWidth: deviceOptions.deviceWidth * scale,\n\t\tscaledDeviceHeight: deviceOptions.deviceHeight * scale\n\t};\n}\nfunction getColorsFromTheme(theme, type) {\n\tif (type === \"none\") return {};\n\tif (!theme) return {};\n\tconst isDarkTheme = theme === \"dark\";\n\treturn {\n\t\tshadowColor: isDarkTheme ? \"rgba(0, 0, 0, 0.55)\" : \"rgba(0, 0, 0, 0.15)\",\n\t\tbezelColor: isDarkTheme ? \"#222\" : \"#fff\",\n\t\tbezelShadeColor: isDarkTheme ? \"#000\" : \"rgba(0, 0, 0, 0.2)\",\n\t\tscreenColor: isDarkTheme ? \"#333\" : \"#eee\"\n\t};\n}\nvar ErrorBoundary = class extends Component {\n\tstate = {};\n\tcomponentDidCatch(error, info) {\n\t\tlet stack = info.componentStack?.split(\"\\n\").filter((line) => line.length !== 0);\n\t\tlet currentIndex = 0;\n\t\tif (stack) {\n\t\t\tfor (const line of stack) {\n\t\t\t\tif (line.startsWith(`    in ${this.constructor.name}`)) break;\n\t\t\t\tcurrentIndex++;\n\t\t\t}\n\t\t\tstack = stack.slice(0, currentIndex);\n\t\t}\n\t\tthis.setState({ lastError: {\n\t\t\terror,\n\t\t\tcomponentStack: stack\n\t\t} });\n\t}\n\tcomponentDidUpdate(_, prevState) {\n\t\tif (this.state.lastError === void 0) return;\n\t\tif (prevState.lastError === this.state.lastError) this.setState({ lastError: void 0 });\n\t}\n\trender() {\n\t\tif (this.state.lastError) return /* @__PURE__ */ jsx(ErrorPlaceholder, {\n\t\t\terror: this.state.lastError.error.message,\n\t\t\tfile: \"Prototype\"\n\t\t});\n\t\treturn this.props.children;\n\t}\n};\n/**\n* @internal\n*/\nfunction Device({ canResize = false, children, ResizeObserver = safeWindow.ResizeObserver, ...options }) {\n\tconst optionsRef = React.useRef(void 0);\n\tif (optionsRef.current === void 0) optionsRef.current = options;\n\tconst deviceAppearance = options.deviceOptions?.appearance.type;\n\tconst scaleDataRef = React.useRef();\n\tconst containerRef = React.useRef(null);\n\tconst deviceRef = React.useRef(null);\n\tconst screenRef = React.useRef(null);\n\tconst updateImperativeScale = React.useCallback(({ scale, screenScalePixelFix }) => {\n\t\tif (!scaleDataRef.current || !deviceRef.current || !screenRef.current) return;\n\t\tdeviceRef.current.style.transform = `scale(${scale})`;\n\t\tscreenRef.current.style.transform = `scale(${screenScalePixelFix})`;\n\t}, []);\n\tif (scaleDataRef.current === void 0 && options.deviceOptions && options.scaleTo && options.scaleTo !== \"dynamic\") updateImperativeScale(scaleDataRef.current = getScaleData(options.deviceOptions, options.scaleTo));\n\tconst invertScale = React.useCallback((point) => {\n\t\tif (!scaleDataRef.current) return point;\n\t\tconst { scale = 1 } = scaleDataRef.current;\n\t\treturn {\n\t\t\tx: point.x / scale,\n\t\t\ty: point.y / scale\n\t\t};\n\t}, []);\n\tconst updateScale = React.useCallback(() => {\n\t\tconst { deviceOptions, scaleTo } = optionsRef.current ?? {};\n\t\tif (!deviceOptions || !scaleTo || scaleTo !== \"dynamic\" || !containerRef.current) return;\n\t\tif (containerRef.current.offsetWidth === 0 || containerRef.current.offsetHeight === 0) return;\n\t\tconst scaleData = scaleDataRef.current = getScaleData(deviceOptions, {\n\t\t\twidth: containerRef.current.offsetWidth,\n\t\t\theight: containerRef.current.offsetHeight\n\t\t});\n\t\tupdateImperativeScale(scaleData);\n\t}, [updateImperativeScale]);\n\tconst observer = useConstant(() => {\n\t\tif (!ResizeObserver) return;\n\t\treturn new ResizeObserver(() => updateScale());\n\t});\n\tReact.useLayoutEffect(() => {\n\t\toptionsRef.current = {\n\t\t\tdeviceOptions: options.deviceOptions,\n\t\t\toverrideTheme: options.overrideTheme,\n\t\t\tscaleTo: options.scaleTo\n\t\t};\n\t}, [\n\t\toptions.deviceOptions,\n\t\toptions.overrideTheme,\n\t\toptions.scaleTo\n\t]);\n\tReact.useLayoutEffect(() => {\n\t\tupdateScale();\n\t}, [updateScale]);\n\tReact.useEffect(() => {\n\t\tif (!observer || !containerRef.current) return;\n\t\tobserver.observe(containerRef.current);\n\t\treturn () => observer.disconnect();\n\t}, []);\n\tconst { containerStyle, handStyle, deviceStyle, deviceImageStyle, screenStyle } = getDeviceStyle(options);\n\tconst resizeStyles = canResize ? {\n\t\tdisplay: \"flex\",\n\t\tjustifyContent: \"center\",\n\t\talignItems: \"center\",\n\t\theight: \"100%\"\n\t} : {};\n\tconst screenBackground = options.deviceOptions?.transparentBackground ? \"transparent\" : \"white\";\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\tstyle: {\n\t\t\t...containerStyle,\n\t\t\t...resizeStyles\n\t\t},\n\t\tref: containerRef,\n\t\tchildren: /* @__PURE__ */ jsxs(\"div\", {\n\t\t\tstyle: { ...deviceStyle },\n\t\t\tref: deviceRef,\n\t\t\tchildren: [\n\t\t\t\thandStyle && /* @__PURE__ */ jsx(\"div\", { style: handStyle }),\n\t\t\t\tdeviceAppearance === \"external-clay\" && deviceImageStyle && /* @__PURE__ */ jsx(\"div\", { style: deviceImageStyle }),\n\t\t\t\t/* @__PURE__ */ jsx(\"div\", {\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...screenStyle,\n\t\t\t\t\t\tpointerEvents: void 0,\n\t\t\t\t\t\tbackgroundColor: children ? screenBackground : screenStyle.backgroundColor\n\t\t\t\t\t},\n\t\t\t\t\tref: screenRef,\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(MotionConfig, {\n\t\t\t\t\t\ttransformPagePoint: invertScale,\n\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(ErrorBoundary, { children })\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\tdeviceAppearance === \"realistic\" && deviceImageStyle && /* @__PURE__ */ jsx(\"div\", { style: deviceImageStyle })\n\t\t\t]\n\t\t})\n\t});\n}\nconst HAND_IMG_WIDTH = 2400;\nconst HAND_IMG_HEIGHT = 3740;\nconst HAND_IMG_GAP_WIDTH = 859;\nconst HAND_IMG_GAP_BOTTOM = /* @__PURE__ */ (() => 987)();\nconst noDeviceSize = {\n\tcomponentWidth: 500,\n\tcomponentHeight: 500\n};\n/**\n* @internal\n*/\nfunction getComponentSize(options) {\n\tif (!options) return noDeviceSize;\n\tconst { deviceWidth, deviceHeight, noPadding } = options;\n\tconst padding = noPadding ? 0 : 90;\n\treturn {\n\t\tcomponentWidth: deviceWidth + padding,\n\t\tcomponentHeight: deviceHeight + padding\n\t};\n}\nfunction getDeviceStyle({ scaleTo, deviceOptions, overrideTheme } = {}) {\n\tconst noDeviceStyle = {\n\t\tcontainerStyle: {},\n\t\tdeviceStyle: {},\n\t\tscreenStyle: {}\n\t};\n\tif (!deviceOptions) return noDeviceStyle;\n\tconst { componentWidth, componentHeight } = getComponentSize(deviceOptions);\n\tconst overriddenColors = getColorsFromTheme(overrideTheme, deviceOptions.appearance.type);\n\tconst { deviceWidth, deviceHeight, appearance, screenWidth, screenHeight, screenMaxHeight, screenOffsetTop, screenOffsetLeft, screenRadius, screenMaskImage, screenColor, shadow, background, hand } = deviceOptions;\n\tconst boxShadows = [];\n\tif (appearance.type === \"clay\" && shadow) boxShadows.push(shadow);\n\tlet bezelStyle = void 0;\n\tif (appearance.type === \"clay\") {\n\t\tbezelStyle = {\n\t\t\tborderRadius: appearance.bezelRadius,\n\t\t\tbackgroundColor: overriddenColors.bezelColor || appearance.bezelColor\n\t\t};\n\t\tif (overriddenColors.bezelShadeColor || appearance.bezelShadeColor) boxShadows.push(`inset 0 0 15px ${overriddenColors.bezelShadeColor || appearance.bezelShadeColor}`);\n\t}\n\tconst handOffsetLeft = hand?.offsetLeft ?? 0;\n\tconst handOffsetRight = hand?.offsetRight ?? 0;\n\tconst handOffsetBottom = hand?.offsetBottom ?? 0;\n\tconst handScale = (deviceWidth - handOffsetLeft - handOffsetRight) / HAND_IMG_GAP_WIDTH;\n\treturn {\n\t\tcontainerStyle: {\n\t\t\twidth: scaleTo ? \"100%\" : componentWidth,\n\t\t\theight: scaleTo ? \"100%\" : componentHeight,\n\t\t\tflex: \"1 1 0\",\n\t\t\tdisplay: \"flex\",\n\t\t\talignItems: \"center\",\n\t\t\tjustifyContent: \"center\",\n\t\t\toverflow: \"hidden\",\n\t\t\tbackground\n\t\t},\n\t\thandStyle: hand && {\n\t\t\twidth: HAND_IMG_WIDTH * handScale,\n\t\t\theight: HAND_IMG_HEIGHT * handScale,\n\t\t\tposition: \"absolute\",\n\t\t\tpointerEvents: \"none\",\n\t\t\tbackgroundImage: `url(\"${hand.imageUrl}\")`,\n\t\t\tbackgroundSize: \"contain\",\n\t\t\tbackgroundRepeat: \"no-repeat\",\n\t\t\tleft: -772 * handScale + handOffsetLeft,\n\t\t\tbottom: -HAND_IMG_GAP_BOTTOM * handScale + handOffsetBottom\n\t\t},\n\t\tdeviceStyle: {\n\t\t\twidth: deviceWidth,\n\t\t\theight: deviceHeight,\n\t\t\tflexShrink: 0,\n\t\t\tposition: \"absolute\",\n\t\t\tboxShadow: boxShadows.join(\",\"),\n\t\t\t...bezelStyle\n\t\t},\n\t\tdeviceImageStyle: appearance.type === \"realistic\" || appearance.type === \"external-clay\" ? {\n\t\t\twidth: appearance.imageWidth,\n\t\t\theight: appearance.imageHeight,\n\t\t\tposition: \"absolute\",\n\t\t\tpointerEvents: \"none\",\n\t\t\toverflow: \"hidden\",\n\t\t\tbackgroundImage: `url(\"${appearance.imageUrl}\")`,\n\t\t\tbackgroundPosition: \"top left\",\n\t\t\tbackgroundRepeat: \"no-repeat\",\n\t\t\tbackgroundSize: `${appearance.imageWidth}px ${appearance.imageHeight}px`,\n\t\t\ttransformOrigin: \"top left\",\n\t\t\ttransform: appearance.rotateImage ? `translateY(${appearance.imageWidth}px) rotate(-90deg)` : void 0\n\t\t} : void 0,\n\t\tscreenStyle: {\n\t\t\twidth: screenWidth,\n\t\t\theight: screenHeight,\n\t\t\tmaxHeight: screenMaxHeight,\n\t\t\tposition: \"absolute\",\n\t\t\ttop: screenOffsetTop,\n\t\t\tleft: screenOffsetLeft,\n\t\t\tdisplay: \"flex\",\n\t\t\talignItems: \"center\",\n\t\t\tjustifyContent: \"center\",\n\t\t\toverflow: \"hidden\",\n\t\t\tborderRadius: screenRadius,\n\t\t\tbackgroundColor: overriddenColors.screenColor || screenColor,\n\t\t\t...screenMaskImage && {\n\t\t\t\tmaskImage: screenMaskImage,\n\t\t\t\tWebkitMaskImage: screenMaskImage,\n\t\t\t\tmaskSize: \"contain\",\n\t\t\t\tWebkitMaskSize: \"contain\"\n\t\t\t}\n\t\t}\n\t};\n}\n\n//#endregion\n//#region ../../library/src/components/Device/presets.ts\nconst defaultPresetId = \"iphone-12-pro\";\nconst presetsBase = /* @__PURE__ */ (() => ({\n\tiPhonePro: {\n\t\tscreenRadius: 0,\n\t\tclayBezelLeft: 21,\n\t\tclayBezelRight: 21,\n\t\tclayBezelTop: 21,\n\t\tclayBezelBottom: 21,\n\t\tclayBezelRadius: 59\n\t},\n\tiPhone8: {\n\t\tscreenRadius: 0,\n\t\tclayBezelLeft: 24,\n\t\tclayBezelRight: 24,\n\t\tclayBezelTop: 96,\n\t\tclayBezelBottom: 96,\n\t\tclayBezelRadius: 57\n\t},\n\tiPadPro: {\n\t\tscreenRadius: 25,\n\t\tclayBezelLeft: 38,\n\t\tclayBezelRight: 38,\n\t\tclayBezelTop: 38,\n\t\tclayBezelBottom: 38,\n\t\tclayBezelRadius: 63\n\t},\n\tdesktop: {\n\t\tclayBezelLeft: 20,\n\t\tclayBezelRight: 20,\n\t\tclayBezelTop: 20,\n\t\tclayBezelBottom: 20,\n\t\tclayBezelRadius: 20\n\t}\n}))();\n/**\n* @internal\n*/\nconst devicePresets = /* @__PURE__ */ (() => [\n\t{\n\t\tid: \"iphone-12\",\n\t\ttitle: \"iPhone 12\",\n\t\tscreenRadius: 0,\n\t\tclayBezelLeft: 22,\n\t\tclayBezelRight: 22,\n\t\tclayBezelTop: 22,\n\t\tclayBezelBottom: 22,\n\t\tclayBezelRadius: 66,\n\t\tscreenWidth: 390,\n\t\tscreenHeight: 844,\n\t\texternalClay: {\n\t\t\twidth: 500,\n\t\t\theight: 974,\n\t\t\tscreenOffsetTop: 65,\n\t\t\tscreenOffsetLeft: 55\n\t\t},\n\t\tscreenMask: \"<g style=\\\"transform: scale(0.5);\\\"><path d=\\\"M171.2 0c2.3 0 4 .5 5.4 1.3 1.6 1 2.8 2.2 3.7 3.8.8 1.6 1.2 2.3 1.2 4.9 0 12 2.2 19 6.2 26.5s9.8 13.3 17.3 17.4c7.5 4 15.8 6.1 30.6 6.1h311.5c14.3 0 22.5-2.2 29.9-6.1 7.5-4 13.3-10 17.3-17.4 4-7.5 6.2-14.5 6.2-26.5 0-2.6.4-3.2 1.1-4.9.8-1.6 2-2.9 3.4-3.8 1.4-.8 3.2-1.3 5.4-1.3h54.2c40.1 0 54.7 4.2 69.4 12a81.8 81.8 0 0134 34c7.8 14.7 12 29.3 12 69.4v1457.2c0 40.1-4.2 54.7-12 69.4a81.8 81.8 0 01-34 34c-14.7 7.8-29.3 12-69.4 12H115.4c-40.1 0-54.7-4.2-69.4-12a81.8 81.8 0 01-34-34c-7.8-14.7-12-29.3-12-69.4V115.4C0 75.3 4.2 60.7 12 46a81.8 81.8 0 0134-34C60.7 4.2 75.3 0 115.4 0h55.4z\\\" fill=\\\"#000\\\" fill-rule=\\\"evenodd\\\"/></g>\",\n\t\trealisticImage: {\n\t\t\twidth: 490,\n\t\t\theight: 944,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 50,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"black\",\n\t\t\t\t\ttitle: \"Black\",\n\t\t\t\t\tcolorValue: \"#2E2C36\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"white\",\n\t\t\t\t\ttitle: \"White\",\n\t\t\t\t\tcolorValue: \"#F7F3F0\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"blue\",\n\t\t\t\t\ttitle: \"Blue\",\n\t\t\t\t\tcolorValue: \"#14496D\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"green\",\n\t\t\t\t\ttitle: \"Green\",\n\t\t\t\t\tcolorValue: \"#DAF0D9\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"red\",\n\t\t\t\t\ttitle: \"Red\",\n\t\t\t\t\tcolorValue: \"#DB4141\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 29,\n\t\t\t\tright: 29,\n\t\t\t\tbottom: 29\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"iphone-12-mini\",\n\t\ttitle: \"iPhone 12 Mini\",\n\t\tscreenRadius: 0,\n\t\tclayBezelLeft: 22,\n\t\tclayBezelRight: 22,\n\t\tclayBezelTop: 22,\n\t\tclayBezelBottom: 22,\n\t\tclayBezelRadius: 66,\n\t\tscreenWidth: 360,\n\t\tscreenHeight: 780,\n\t\texternalClay: {\n\t\t\twidth: 450,\n\t\t\theight: 890,\n\t\t\tscreenOffsetTop: 55,\n\t\t\tscreenOffsetLeft: 45\n\t\t},\n\t\tscreenMask: \"<g style=\\\"transform: scale(0.5);\\\"><path d=\\\"M142 18c0 19 14 47 43 48h349c31 0 44-29 44-48 0-12 4-18 14-18h18c38 0 52 4 66 11 14 8 25 19 33 33v1c7 14 11 28 11 65v1340c0 38-4 52-11 66-8 14-19 25-33 33h-1c-14 7-28 11-65 11H110c-38 0-52-4-66-11-14-8-25-19-33-33v-1c-7-13-11-27-11-64V110c0-38 4-52 11-66 8-14 19-25 33-33h1C58 4 72 0 109 0h16c11 0 17 6 17 18z\\\" fill=\\\"#000\\\" fill-rule=\\\"evenodd\\\"/></g>\",\n\t\trealisticImage: {\n\t\t\twidth: 460,\n\t\t\theight: 880,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 50,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"black\",\n\t\t\t\t\ttitle: \"Black\",\n\t\t\t\t\tcolorValue: \"#2E2C36\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"white\",\n\t\t\t\t\ttitle: \"White\",\n\t\t\t\t\tcolorValue: \"#F7F3F0\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"blue\",\n\t\t\t\t\ttitle: \"Blue\",\n\t\t\t\t\tcolorValue: \"#14496D\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"green\",\n\t\t\t\t\ttitle: \"Green\",\n\t\t\t\t\tcolorValue: \"#DAF0D9\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"red\",\n\t\t\t\t\ttitle: \"Red\",\n\t\t\t\t\tcolorValue: \"#DB4141\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 31.5,\n\t\t\t\tright: 30.5,\n\t\t\t\tbottom: 30\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"iphone-12-pro\",\n\t\ttitle: \"iPhone 12 Pro\",\n\t\tscreenRadius: 0,\n\t\tclayBezelLeft: 22,\n\t\tclayBezelRight: 22,\n\t\tclayBezelTop: 22,\n\t\tclayBezelBottom: 22,\n\t\tclayBezelRadius: 66,\n\t\tscreenWidth: 390,\n\t\tscreenHeight: 844,\n\t\texternalClay: {\n\t\t\twidth: 494,\n\t\t\theight: 968,\n\t\t\tscreenOffsetTop: 62,\n\t\t\tscreenOffsetLeft: 52\n\t\t},\n\t\tscreenMask: \"<g style=\\\"transform: scale(0.5);\\\"><path d=\\\"M171.2 0c2.3 0 4 .5 5.4 1.3 1.6 1 2.8 2.2 3.7 3.8.8 1.6 1.2 2.3 1.2 4.9 0 12 2.2 19 6.2 26.5s9.8 13.3 17.3 17.4c7.5 4 15.8 6.1 30.6 6.1h311.5c14.3 0 22.5-2.2 29.9-6.1 7.5-4 13.3-10 17.3-17.4 4-7.5 6.2-14.5 6.2-26.5 0-2.6.4-3.2 1.1-4.9.8-1.6 2-2.9 3.4-3.8 1.4-.8 3.2-1.3 5.4-1.3h54.2c40.1 0 54.7 4.2 69.4 12a81.8 81.8 0 0134 34c7.8 14.7 12 29.3 12 69.4v1457.2c0 40.1-4.2 54.7-12 69.4a81.8 81.8 0 01-34 34c-14.7 7.8-29.3 12-69.4 12H115.4c-40.1 0-54.7-4.2-69.4-12a81.8 81.8 0 01-34-34c-7.8-14.7-12-29.3-12-69.4V115.4C0 75.3 4.2 60.7 12 46a81.8 81.8 0 0134-34C60.7 4.2 75.3 0 115.4 0h55.4z\\\" fill=\\\"#000\\\" fill-rule=\\\"evenodd\\\"/></g>\",\n\t\trealisticImage: {\n\t\t\twidth: 490,\n\t\t\theight: 944,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 50,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"graphite\",\n\t\t\t\t\ttitle: \"Graphite\",\n\t\t\t\t\tcolorValue: \"#585753\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#E5E6E1\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"pacific-blue\",\n\t\t\t\t\ttitle: \"Pacific Blue\",\n\t\t\t\t\tcolorValue: \"#415D6C\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"gold\",\n\t\t\t\t\ttitle: \"Gold\",\n\t\t\t\t\tcolorValue: \"#FCECD5\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 29,\n\t\t\t\tright: 29,\n\t\t\t\tbottom: 29\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"iphone-12-pro-max\",\n\t\ttitle: \"iPhone 12 Pro Max\",\n\t\tscreenRadius: 50,\n\t\tclayBezelLeft: 22,\n\t\tclayBezelRight: 22,\n\t\tclayBezelTop: 22,\n\t\tclayBezelBottom: 22,\n\t\tclayBezelRadius: 66,\n\t\tscreenWidth: 428,\n\t\tscreenHeight: 926,\n\t\texternalClay: {\n\t\t\twidth: 532,\n\t\t\theight: 1050,\n\t\t\tscreenOffsetTop: 62,\n\t\t\tscreenOffsetLeft: 52\n\t\t},\n\t\tscreenMask: \"<path d=\\\"M102 0c6 0 7 3 7 9 0 10 7 23 24 23h164c13 0 22-12 22-23 0-6 1-9 7-9h34c24 0 32 2 41 7s15 11 20 20 7 17 7 41v790c0 24-2 32-7 41s-11 15-20 20-17 7-41 7H68c-24 0-32-2-41-7s-15-11-20-20-7-17-7-41V68c0-24 2-32 7-41S18 12 27 7s17-7 41-7h34z\\\" fill=\\\"#000\\\" fill-rule=\\\"evenodd\\\"/>\",\n\t\trealisticImage: {\n\t\t\twidth: 528,\n\t\t\theight: 1026,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 50,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"graphite\",\n\t\t\t\t\ttitle: \"Graphite\",\n\t\t\t\t\tcolorValue: \"#585753\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#E5E6E1\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"pacific-blue\",\n\t\t\t\t\ttitle: \"Pacific Blue\",\n\t\t\t\t\tcolorValue: \"#415D6C\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"gold\",\n\t\t\t\t\ttitle: \"Gold\",\n\t\t\t\t\tcolorValue: \"#FCECD5\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 28.5,\n\t\t\t\tright: 28,\n\t\t\t\tbottom: 29\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"iphone-11\",\n\t\ttitle: \"iPhone 11\",\n\t\tscreenRadius: 0,\n\t\tclayBezelLeft: 35.5,\n\t\tclayBezelRight: 35.5,\n\t\tclayBezelTop: 35.5,\n\t\tclayBezelBottom: 35.5,\n\t\tclayBezelRadius: 77,\n\t\tscreenWidth: 414,\n\t\tscreenHeight: 896,\n\t\texternalClay: {\n\t\t\twidth: 524,\n\t\t\theight: 1026,\n\t\t\tscreenOffsetTop: 65,\n\t\t\tscreenOffsetLeft: 55\n\t\t},\n\t\tscreenMask: \"<path d=\\\"M85.5 0C89.1 0 92 3 92 6.5c.3 6 1.5 10 3.4 13.5 2.2 4.1 5.5 7.4 9.6 9.6 4.2 2.2 8.9 3.4 17 3.4h170c8.1 0 12.8-1.2 17-3.4 4.1-2.2 7.4-5.5 9.6-9.6A31 31 0 00322 6.5c0-3.6 3-6.5 6.5-6.5h32.3c18.5 0 25.2 2 32 5.5 6.7 3.7 12 9 15.7 15.7 3.6 6.8 5.5 13.5 5.5 32v789.6c0 18.5-2 25.2-5.5 32-3.7 6.7-9 12-15.7 15.7-6.8 3.6-13.5 5.5-32 5.5H53.2c-18.5 0-25.2-2-32-5.5-6.7-3.7-12-9-15.7-15.7C2 868 0 861.3 0 842.8V53.2c0-18.5 2-25.2 5.5-32 3.7-6.7 9-12 15.7-15.7C28 2 34.7 0 53.2 0h32.3z\\\" fill=\\\"#000\\\" fill-rule=\\\"nonzero\\\"/>\",\n\t\trealisticImage: {\n\t\t\twidth: 514,\n\t\t\theight: 996,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 50,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"black\",\n\t\t\t\t\ttitle: \"Black\",\n\t\t\t\t\tcolorValue: \"#202120\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"white\",\n\t\t\t\t\ttitle: \"White\",\n\t\t\t\t\tcolorValue: \"#F9F6EF\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"purple\",\n\t\t\t\t\ttitle: \"Purple\",\n\t\t\t\t\tcolorValue: \"#D1CDDB\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"green\",\n\t\t\t\t\ttitle: \"Green\",\n\t\t\t\t\tcolorValue: \"#ADE0CD\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"red\",\n\t\t\t\t\ttitle: \"Red\",\n\t\t\t\t\tcolorValue: \"#B90D2E\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"yellow\",\n\t\t\t\t\ttitle: \"Yellow\",\n\t\t\t\t\tcolorValue: \"#FFE680\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 14.5,\n\t\t\t\tright: 14.5,\n\t\t\t\tbottom: 14.5\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"iphone-11-pro\",\n\t\ttitle: \"iPhone 11 Pro\",\n\t\t...presetsBase.iPhonePro,\n\t\tscreenWidth: 375,\n\t\tscreenHeight: 812,\n\t\texternalClay: {\n\t\t\twidth: 485,\n\t\t\theight: 942,\n\t\t\tscreenOffsetTop: 65,\n\t\t\tscreenOffsetLeft: 55\n\t\t},\n\t\tscreenMask: \"<path d=\\\"M292 8.668V9c0 9.266-7.07 21-23.332 21h-162C90.402 30 83.332 18.266 83.332 9v-.332c0-4.285 0-8.668-7.664-8.668H43.332C16.312 0 0 16.313 0 43.332v725.336C0 795.688 16.313 812 43.332 812h288.336c27.02 0 43.332-16.313 43.332-43.332V43.332C375 16.312 358.687 0 331.668 0h-32C292 0 292 4.383 292 8.668zm0 0\\\"/>\",\n\t\trealisticImage: {\n\t\t\twidth: 475,\n\t\t\theight: 912,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 50,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"space-grey\",\n\t\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\t\tcolorValue: \"#52514F\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#EBEBE3\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"gold\",\n\t\t\t\t\ttitle: \"Gold\",\n\t\t\t\t\tcolorValue: \"#FBD7BD\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"midnight-green\",\n\t\t\t\t\ttitle: \"Midnight Green\",\n\t\t\t\t\tcolorValue: \"#4F5850\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 24.5,\n\t\t\t\tright: 24.5,\n\t\t\t\tbottom: 23.5\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"iphone-11-pro-max\",\n\t\ttitle: \"iPhone 11 Pro Max\",\n\t\t...presetsBase.iPhonePro,\n\t\tscreenWidth: 414,\n\t\tscreenHeight: 896,\n\t\texternalClay: {\n\t\t\twidth: 524,\n\t\t\theight: 1026,\n\t\t\tscreenOffsetTop: 65,\n\t\t\tscreenOffsetLeft: 55\n\t\t},\n\t\tscreenMask: \"<path d=\\\"M96 0c3.313 0 5.91 2.688 6 6 .18 6.645 1.191 10.148 2.938 13.41 1.917 3.586 4.73 6.402 8.316 8.317 3.586 1.918 7.441 2.941 15.445 2.941h156.602c8.004 0 11.86-1.023 15.445-2.941 3.586-1.915 6.399-4.73 8.317-8.317 1.746-3.265 2.746-6.758 2.937-13.41.094-3.313 2.688-6 6-6h46.004c17.387 0 23.687 1.809 30.043 5.21 6.355 3.4 11.344 8.388 14.742 14.743C412.191 26.31 414 32.61 414 49.996v796.008c0 17.387-1.809 23.687-5.21 30.043-3.4 6.355-8.388 11.344-14.743 14.742-6.356 3.402-12.656 5.211-30.043 5.211H49.996c-17.387 0-23.687-1.809-30.043-5.21-6.355-3.4-11.344-8.388-14.742-14.743C1.809 869.69 0 863.39 0 846.004V49.996C0 32.61 1.809 26.31 5.21 19.953c3.4-6.355 8.388-11.344 14.743-14.742C26.31 1.809 32.61 0 49.996 0zm0 0\\\"/>\",\n\t\trealisticImage: {\n\t\t\twidth: 514,\n\t\t\theight: 996,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 50,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"space-grey\",\n\t\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\t\tcolorValue: \"#52514F\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#EBEBE3\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"gold\",\n\t\t\t\t\ttitle: \"Gold\",\n\t\t\t\t\tcolorValue: \"#FBD7BD\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"midnight-green\",\n\t\t\t\t\ttitle: \"Midnight Green\",\n\t\t\t\t\tcolorValue: \"#4F5850\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 23.5,\n\t\t\t\tright: 24.5,\n\t\t\t\tbottom: 24\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"iphone-8\",\n\t\ttitle: \"iPhone 8\",\n\t\t...presetsBase.iPhone8,\n\t\tscreenWidth: 375,\n\t\tscreenHeight: 667,\n\t\texternalClay: {\n\t\t\twidth: 491,\n\t\t\theight: 971,\n\t\t\tscreenOffsetLeft: 58,\n\t\t\tscreenOffsetTop: 152\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 475,\n\t\t\theight: 927,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 130,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"space-grey\",\n\t\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\t\tcolorValue: \"#28282A\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#DFE1E2\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"gold\",\n\t\t\t\t\ttitle: \"Gold\",\n\t\t\t\t\tcolorValue: \"#F6E6DB\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 22,\n\t\t\t\tright: 22,\n\t\t\t\tbottom: 18.5\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"iphone-8-plus\",\n\t\ttitle: \"iPhone 8 Plus\",\n\t\t...presetsBase.iPhone8,\n\t\tscreenWidth: 414,\n\t\tscreenHeight: 736,\n\t\texternalClay: {\n\t\t\twidth: 530,\n\t\t\theight: 1064,\n\t\t\tscreenOffsetLeft: 58,\n\t\t\tscreenOffsetTop: 164\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 514,\n\t\t\theight: 996,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 130,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"space-grey\",\n\t\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\t\tcolorValue: \"#28282A\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#DFE1E2\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"gold\",\n\t\t\t\t\ttitle: \"Gold\",\n\t\t\t\t\tcolorValue: \"#F6E6DB\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 21,\n\t\t\t\tright: 20.5,\n\t\t\t\tbottom: 19\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"iphone-se\",\n\t\ttitle: \"iPhone SE\",\n\t\tscreenWidth: 320,\n\t\tscreenHeight: 568,\n\t\tscreenRadius: 0,\n\t\tclayBezelLeft: 20,\n\t\tclayBezelRight: 20,\n\t\tclayBezelTop: 112,\n\t\tclayBezelBottom: 112,\n\t\tclayBezelRadius: 57,\n\t\texternalClay: {\n\t\t\twidth: 436,\n\t\t\theight: 872,\n\t\t\tscreenOffsetLeft: 58,\n\t\t\tscreenOffsetTop: 152\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 420,\n\t\t\theight: 828,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 130,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"space-grey\",\n\t\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\t\tcolorValue: \"#C3C4C8\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#E1E2E4\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"gold\",\n\t\t\t\t\ttitle: \"Gold\",\n\t\t\t\t\tcolorValue: \"#EFD8BD\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"rose-gold\",\n\t\t\t\t\ttitle: \"Rose Gold\",\n\t\t\t\t\tcolorValue: \"#F7CFCA\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 22,\n\t\t\t\tright: 22,\n\t\t\t\tbottom: 26.5\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"samsung-galaxy-s7\",\n\t\ttitle: \"Samsung Galaxy S7\",\n\t\tscreenRadius: 0,\n\t\tclayBezelLeft: 22,\n\t\tclayBezelRight: 22,\n\t\tclayBezelTop: 22,\n\t\tclayBezelBottom: 22,\n\t\tclayBezelRadius: 66,\n\t\tscreenWidth: 360,\n\t\tscreenHeight: 640,\n\t\texternalClay: {\n\t\t\twidth: 454,\n\t\t\theight: 880,\n\t\t\tscreenOffsetTop: 120,\n\t\t\tscreenOffsetLeft: 47\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 440,\n\t\t\theight: 860,\n\t\t\tscreenOffsetLeft: 40,\n\t\t\tscreenOffsetTop: 110,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"black\",\n\t\t\t\t\ttitle: \"Black\",\n\t\t\t\t\tcolorValue: \"#2E2C36\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"white\",\n\t\t\t\t\ttitle: \"White\",\n\t\t\t\t\tcolorValue: \"#F7F3F0\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#E5E6E1\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"gold\",\n\t\t\t\t\ttitle: \"Gold\",\n\t\t\t\t\tcolorValue: \"#FCECD5\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 26,\n\t\t\t\tright: 25.5,\n\t\t\t\tbottom: 32\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"samsung-note-10\",\n\t\ttitle: \"Samsung Note 10\",\n\t\tscreenWidth: 360,\n\t\tscreenHeight: 760,\n\t\tscreenRadius: 10,\n\t\tclayBezelLeft: 7,\n\t\tclayBezelRight: 7,\n\t\tclayBezelTop: 15,\n\t\tclayBezelBottom: 15,\n\t\tclayBezelRadius: 15\n\t},\n\t{\n\t\tid: \"pixel-5\",\n\t\ttitle: \"Google Pixel 5\",\n\t\tscreenRadius: 31,\n\t\tclayBezelLeft: 22,\n\t\tclayBezelRight: 22,\n\t\tclayBezelTop: 22,\n\t\tclayBezelBottom: 22,\n\t\tclayBezelRadius: 66,\n\t\tscreenWidth: 360,\n\t\tscreenHeight: 780,\n\t\texternalClay: {\n\t\t\twidth: 460,\n\t\t\theight: 900,\n\t\t\tscreenOffsetTop: 60,\n\t\t\tscreenOffsetLeft: 50\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 460,\n\t\t\theight: 880,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 50,\n\t\t\tavailableColors: [{\n\t\t\t\tid: \"just-black\",\n\t\t\t\ttitle: \"Just Black\",\n\t\t\t\tcolorValue: \"#2E2C36\"\n\t\t\t}, {\n\t\t\t\tid: \"sorta-sage\",\n\t\t\t\ttitle: \"Sorta Sage\",\n\t\t\t\tcolorValue: \"#B7C9C0\"\n\t\t\t}],\n\t\t\thandOffset: {\n\t\t\t\tleft: 31.5,\n\t\t\t\tright: 31,\n\t\t\t\tbottom: 31\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"pixel-4\",\n\t\ttitle: \"Google Pixel 4\",\n\t\tscreenWidth: 360,\n\t\tscreenHeight: 760,\n\t\tscreenRadius: 34,\n\t\tclayBezelLeft: 10,\n\t\tclayBezelRight: 10,\n\t\tclayBezelTop: 50,\n\t\tclayBezelBottom: 25,\n\t\tclayBezelRadius: 50,\n\t\texternalClay: {\n\t\t\twidth: 460,\n\t\t\theight: 938,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 89\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 460,\n\t\t\theight: 920,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 80,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"clearly-white\",\n\t\t\t\t\ttitle: \"Clearly White\",\n\t\t\t\t\tcolorValue: \"#EAEDF2\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"just-black\",\n\t\t\t\t\ttitle: \"Just Black\",\n\t\t\t\t\tcolorValue: \"#1A1A1A\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"oh-so-orange\",\n\t\t\t\t\ttitle: \"Oh So Orange\",\n\t\t\t\t\tcolorValue: \"#FF7A68\"\n\t\t\t\t}\n\t\t\t],\n\t\t\thandOffset: {\n\t\t\t\tleft: 35.5,\n\t\t\t\tright: 35.5,\n\t\t\t\tbottom: 57\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tid: \"macbook-air\",\n\t\ttitle: \"MacBook Air\",\n\t\tscreenWidth: 1440,\n\t\tscreenHeight: 900,\n\t\tdisableRotation: true,\n\t\texternalClay: {\n\t\t\twidth: 1890,\n\t\t\theight: 1125,\n\t\t\tscreenOffsetLeft: 225,\n\t\t\tscreenOffsetTop: 98\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 1924,\n\t\t\theight: 1120,\n\t\t\tscreenOffsetLeft: 242,\n\t\t\tscreenOffsetTop: 98,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#E5E6E1\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"space-grey\",\n\t\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\t\tcolorValue: \"#B1B5B7\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"gold\",\n\t\t\t\t\ttitle: \"Gold\",\n\t\t\t\t\tcolorValue: \"#FCECD5\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n\t{\n\t\tid: \"macbook-pro-13\",\n\t\ttitle: `MacBook Pro 13\"`,\n\t\tscreenWidth: 1440,\n\t\tscreenHeight: 900,\n\t\tdisableRotation: true,\n\t\texternalClay: {\n\t\t\twidth: 1914,\n\t\t\theight: 1169,\n\t\t\tscreenOffsetLeft: 236,\n\t\t\tscreenOffsetTop: 109\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 1958,\n\t\t\theight: 1165,\n\t\t\tscreenOffsetLeft: 259,\n\t\t\tscreenOffsetTop: 109,\n\t\t\tavailableColors: [{\n\t\t\t\tid: \"silver\",\n\t\t\t\ttitle: \"Silver\",\n\t\t\t\tcolorValue: \"#E5E6E1\"\n\t\t\t}, {\n\t\t\t\tid: \"space-grey\",\n\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\tcolorValue: \"#B1B5B7\"\n\t\t\t}]\n\t\t}\n\t},\n\t{\n\t\tid: \"macbook-pro-16\",\n\t\ttitle: `MacBook Pro 16\"`,\n\t\tscreenWidth: 1536,\n\t\tscreenHeight: 960,\n\t\tdisableRotation: true,\n\t\texternalClay: {\n\t\t\twidth: 1984,\n\t\t\theight: 1179,\n\t\t\tscreenOffsetLeft: 225,\n\t\t\tscreenOffsetTop: 78\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 2016,\n\t\t\theight: 1174,\n\t\t\tscreenOffsetLeft: 240,\n\t\t\tscreenOffsetTop: 74,\n\t\t\tavailableColors: [{\n\t\t\t\tid: \"silver\",\n\t\t\t\ttitle: \"Silver\",\n\t\t\t\tcolorValue: \"#E5E6E1\"\n\t\t\t}, {\n\t\t\t\tid: \"space-grey\",\n\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\tcolorValue: \"#B1B5B7\"\n\t\t\t}]\n\t\t}\n\t},\n\t{\n\t\tid: \"imac-21-5\",\n\t\ttitle: `iMac 21.5\"`,\n\t\tscreenWidth: 2048,\n\t\tscreenHeight: 1152,\n\t\tdisableRotation: true,\n\t\texternalClay: {\n\t\t\twidth: 2288,\n\t\t\theight: 1892,\n\t\t\tscreenOffsetLeft: 120,\n\t\t\tscreenOffsetTop: 120\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 2281,\n\t\t\theight: 1898,\n\t\t\tscreenOffsetLeft: 116,\n\t\t\tscreenOffsetTop: 122\n\t\t}\n\t},\n\t{\n\t\tid: \"imac-27\",\n\t\ttitle: `iMac 27\"`,\n\t\tscreenWidth: 2560,\n\t\tscreenHeight: 1440,\n\t\tdisableRotation: true,\n\t\texternalClay: {\n\t\t\twidth: 2848,\n\t\t\theight: 2351,\n\t\t\tscreenOffsetLeft: 144,\n\t\t\tscreenOffsetTop: 151\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 2838,\n\t\t\theight: 2360,\n\t\t\tscreenOffsetLeft: 139,\n\t\t\tscreenOffsetTop: 146,\n\t\t\tavailableColors: [{\n\t\t\t\tid: \"silver\",\n\t\t\t\ttitle: \"Silver\",\n\t\t\t\tcolorValue: \"#E5E6E1\"\n\t\t\t}, {\n\t\t\t\tid: \"pro\",\n\t\t\t\ttitle: \"Pro\",\n\t\t\t\tcolorValue: \"#5F5E63\"\n\t\t\t}]\n\t\t}\n\t},\n\t{\n\t\tid: \"pro-display-xdr\",\n\t\ttitle: `Pro Display XDR`,\n\t\tscreenWidth: 3008,\n\t\tscreenHeight: 1692,\n\t\tdisableRotation: true,\n\t\texternalClay: {\n\t\t\twidth: 3148,\n\t\t\theight: 2325,\n\t\t\tscreenOffsetLeft: 70,\n\t\t\tscreenOffsetTop: 60\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 3138,\n\t\t\theight: 4695 / 2,\n\t\t\tscreenOffsetLeft: 65,\n\t\t\tscreenOffsetTop: 65\n\t\t}\n\t},\n\t{\n\t\tid: \"dell-xps\",\n\t\ttitle: `Dell XPS`,\n\t\tscreenWidth: 1920,\n\t\tscreenHeight: 1080,\n\t\tdisableRotation: true,\n\t\texternalClay: {\n\t\t\twidth: 2624,\n\t\t\theight: 1381,\n\t\t\tscreenOffsetLeft: 352,\n\t\t\tscreenOffsetTop: 57\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 2706,\n\t\t\theight: 1373,\n\t\t\tscreenOffsetLeft: 393,\n\t\t\tscreenOffsetTop: 54\n\t\t}\n\t},\n\t{\n\t\tid: \"surface-book\",\n\t\ttitle: `Microsoft Surface Book`,\n\t\tscreenWidth: 1500,\n\t\tscreenHeight: 1e3,\n\t\tdisableRotation: true,\n\t\texternalClay: {\n\t\t\twidth: 2089,\n\t\t\theight: 1234,\n\t\t\tscreenOffsetLeft: 296,\n\t\t\tscreenOffsetTop: 93\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 2100,\n\t\t\theight: 1254,\n\t\t\tscreenOffsetLeft: 300,\n\t\t\tscreenOffsetTop: 105\n\t\t}\n\t},\n\t{\n\t\tid: \"ipad\",\n\t\ttitle: \"iPad\",\n\t\tscreenRadius: 0,\n\t\tscreenWidth: 810,\n\t\tscreenHeight: 1080,\n\t\tclayBezelLeft: 30,\n\t\tclayBezelRight: 30,\n\t\tclayBezelTop: 95,\n\t\tclayBezelBottom: 95,\n\t\tclayBezelRadius: 0,\n\t\texternalClay: {\n\t\t\twidth: 966,\n\t\t\theight: 1378,\n\t\t\tscreenOffsetLeft: 78,\n\t\t\tscreenOffsetTop: 149\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 960,\n\t\t\theight: 1360,\n\t\t\tscreenOffsetLeft: 75,\n\t\t\tscreenOffsetTop: 140,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"space-grey\",\n\t\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\t\tcolorValue: \"#C3C4C8\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#E1E2E4\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"gold\",\n\t\t\t\t\ttitle: \"Gold\",\n\t\t\t\t\tcolorValue: \"#EFD8BD\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n\t{\n\t\tid: \"ipad-mini\",\n\t\ttitle: \"iPad Mini\",\n\t\tscreenRadius: 0,\n\t\tclayBezelLeft: 49,\n\t\tclayBezelRight: 49,\n\t\tclayBezelTop: 49,\n\t\tclayBezelBottom: 49,\n\t\tclayBezelRadius: 49,\n\t\tscreenWidth: 768,\n\t\tscreenHeight: 1024,\n\t\texternalClay: {\n\t\t\twidth: 924,\n\t\t\theight: 1384,\n\t\t\tscreenOffsetLeft: 78,\n\t\t\tscreenOffsetTop: 180\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 928,\n\t\t\theight: 1364,\n\t\t\tscreenOffsetLeft: 80,\n\t\t\tscreenOffsetTop: 170,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"space-grey\",\n\t\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\t\tcolorValue: \"#C3C4C8\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#E1E2E4\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"gold\",\n\t\t\t\t\ttitle: \"Gold\",\n\t\t\t\t\tcolorValue: \"#EFD8BD\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n\t{\n\t\tid: \"ipad-air\",\n\t\ttitle: \"iPad Air\",\n\t\tscreenRadius: 18,\n\t\tclayBezelLeft: 49,\n\t\tclayBezelRight: 49,\n\t\tclayBezelTop: 49,\n\t\tclayBezelBottom: 49,\n\t\tclayBezelRadius: 49,\n\t\tscreenWidth: 820,\n\t\tscreenHeight: 1180,\n\t\texternalClay: {\n\t\t\twidth: 994,\n\t\t\theight: 1374,\n\t\t\tscreenOffsetLeft: 87,\n\t\t\tscreenOffsetTop: 97\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 980,\n\t\t\theight: 1340,\n\t\t\tscreenOffsetLeft: 80,\n\t\t\tscreenOffsetTop: 80,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"space-grey\",\n\t\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\t\tcolorValue: \"#C3C4C8\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"silver\",\n\t\t\t\t\ttitle: \"Silver\",\n\t\t\t\t\tcolorValue: \"#E1E2E4\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"rose-gold\",\n\t\t\t\t\ttitle: \"Rose Gold\",\n\t\t\t\t\tcolorValue: \"#ECCBC4\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"blue\",\n\t\t\t\t\ttitle: \"Blue\",\n\t\t\t\t\tcolorValue: \"#CBDAE6\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"green\",\n\t\t\t\t\ttitle: \"Green\",\n\t\t\t\t\tcolorValue: \"#DAF0D9\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n\t{\n\t\tid: \"ipad-pro-11\",\n\t\ttitle: \"iPad Pro 11″\",\n\t\tscreenRadius: 17,\n\t\tclayBezelLeft: 49,\n\t\tclayBezelRight: 49,\n\t\tclayBezelTop: 49,\n\t\tclayBezelBottom: 49,\n\t\tclayBezelRadius: 49,\n\t\tscreenWidth: 834,\n\t\tscreenHeight: 1194,\n\t\texternalClay: {\n\t\t\twidth: 990,\n\t\t\theight: 1370,\n\t\t\tscreenOffsetLeft: 78,\n\t\t\tscreenOffsetTop: 88\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 984,\n\t\t\theight: 1344,\n\t\t\tscreenOffsetLeft: 75,\n\t\t\tscreenOffsetTop: 75,\n\t\t\tavailableColors: [{\n\t\t\t\tid: \"space-grey\",\n\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\tcolorValue: \"#C3C4C8\"\n\t\t\t}, {\n\t\t\t\tid: \"silver\",\n\t\t\t\ttitle: \"Silver\",\n\t\t\t\tcolorValue: \"#E1E2E4\"\n\t\t\t}]\n\t\t}\n\t},\n\t{\n\t\tid: \"ipad-pro-12-9\",\n\t\ttitle: \"iPad Pro 12.9″\",\n\t\t...presetsBase.iPadPro,\n\t\tscreenRadius: 17,\n\t\tscreenWidth: 1024,\n\t\tscreenHeight: 1366,\n\t\texternalClay: {\n\t\t\twidth: 1180,\n\t\t\theight: 1542,\n\t\t\tscreenOffsetLeft: 78,\n\t\t\tscreenOffsetTop: 88\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 1174,\n\t\t\theight: 1516,\n\t\t\tscreenOffsetLeft: 75,\n\t\t\tscreenOffsetTop: 75,\n\t\t\tavailableColors: [{\n\t\t\t\tid: \"space-grey\",\n\t\t\t\ttitle: \"Space Grey\",\n\t\t\t\tcolorValue: \"#C3C4C8\"\n\t\t\t}, {\n\t\t\t\tid: \"silver\",\n\t\t\t\ttitle: \"Silver\",\n\t\t\t\tcolorValue: \"#E1E2E4\"\n\t\t\t}]\n\t\t}\n\t},\n\t{\n\t\tid: \"surface-3\",\n\t\ttitle: \"Microsoft Surface 3\",\n\t\tscreenRadius: 0,\n\t\tclayBezelLeft: 49,\n\t\tclayBezelRight: 49,\n\t\tclayBezelTop: 49,\n\t\tclayBezelBottom: 49,\n\t\tclayBezelRadius: 49,\n\t\tscreenWidth: 960,\n\t\tscreenHeight: 640,\n\t\texternalClay: {\n\t\t\twidth: 1184,\n\t\t\theight: 864,\n\t\t\tscreenOffsetLeft: 112,\n\t\t\tscreenOffsetTop: 112\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 1140,\n\t\t\theight: 790,\n\t\t\tscreenOffsetLeft: 90,\n\t\t\tscreenOffsetTop: 75\n\t\t}\n\t},\n\t{\n\t\tid: \"surface-pro-4\",\n\t\ttitle: \"Microsoft Surface Pro 4\",\n\t\tscreenRadius: 0,\n\t\tclayBezelLeft: 49,\n\t\tclayBezelRight: 49,\n\t\tclayBezelTop: 49,\n\t\tclayBezelBottom: 49,\n\t\tclayBezelRadius: 49,\n\t\tscreenWidth: 1368,\n\t\tscreenHeight: 912,\n\t\texternalClay: {\n\t\t\twidth: 1592,\n\t\t\theight: 1136,\n\t\t\tscreenOffsetLeft: 112,\n\t\t\tscreenOffsetTop: 112\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 1588,\n\t\t\theight: 1112,\n\t\t\tscreenOffsetLeft: 110,\n\t\t\tscreenOffsetTop: 100\n\t\t}\n\t},\n\t{\n\t\tid: \"apple-watch-44\",\n\t\ttitle: `Apple Watch 44mm`,\n\t\tscreenRadius: 33,\n\t\tscreenWidth: 184,\n\t\tscreenHeight: 224,\n\t\tdisableRotation: true,\n\t\texternalClay: {\n\t\t\twidth: 298,\n\t\t\theight: 502,\n\t\t\tscreenOffsetLeft: 57,\n\t\t\tscreenOffsetTop: 129\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 274,\n\t\t\theight: 454,\n\t\t\tscreenOffsetLeft: 45,\n\t\t\tscreenOffsetTop: 115,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"black\",\n\t\t\t\t\ttitle: \"Black\",\n\t\t\t\t\tcolorValue: \"#2E2C36\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"white\",\n\t\t\t\t\ttitle: \"White\",\n\t\t\t\t\tcolorValue: \"#F7F3F0\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"yellow\",\n\t\t\t\t\ttitle: \"Yellow\",\n\t\t\t\t\tcolorValue: \"#FDDC6C\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"orange\",\n\t\t\t\t\ttitle: \"Orange\",\n\t\t\t\t\tcolorValue: \"#F35C56\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n\t{\n\t\tid: \"apple-watch-40\",\n\t\ttitle: `Apple Watch 40mm`,\n\t\tscreenRadius: 27,\n\t\tscreenWidth: 162,\n\t\tscreenHeight: 197,\n\t\tdisableRotation: true,\n\t\texternalClay: {\n\t\t\twidth: 280,\n\t\t\theight: 463,\n\t\t\tscreenOffsetLeft: 59,\n\t\t\tscreenOffsetTop: 124\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 252,\n\t\t\theight: 427,\n\t\t\tscreenOffsetLeft: 45,\n\t\t\tscreenOffsetTop: 115,\n\t\t\tavailableColors: [\n\t\t\t\t{\n\t\t\t\t\tid: \"black\",\n\t\t\t\t\ttitle: \"Black\",\n\t\t\t\t\tcolorValue: \"#2E2C36\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"white\",\n\t\t\t\t\ttitle: \"White\",\n\t\t\t\t\tcolorValue: \"#F7F3F0\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"yellow\",\n\t\t\t\t\ttitle: \"Yellow\",\n\t\t\t\t\tcolorValue: \"#FDDC6C\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"orange\",\n\t\t\t\t\ttitle: \"Orange\",\n\t\t\t\t\tcolorValue: \"#F35C56\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n\t{\n\t\tid: \"tv-full-hd\",\n\t\ttitle: `Full HD`,\n\t\tscreenRadius: 0,\n\t\tscreenWidth: 1920,\n\t\tscreenHeight: 1080,\n\t\texternalClay: {\n\t\t\twidth: 1968,\n\t\t\theight: 1168,\n\t\t\tscreenOffsetLeft: 24,\n\t\t\tscreenOffsetTop: 12\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 2020,\n\t\t\theight: 1180,\n\t\t\tscreenOffsetLeft: 50,\n\t\t\tscreenOffsetTop: 50\n\t\t}\n\t},\n\t{\n\t\tid: \"tv-4k\",\n\t\ttitle: `4K`,\n\t\tscreenRadius: 0,\n\t\tscreenWidth: 3840,\n\t\tscreenHeight: 2160,\n\t\texternalClay: {\n\t\t\twidth: 3908,\n\t\t\theight: 2308,\n\t\t\tscreenOffsetLeft: 34,\n\t\t\tscreenOffsetTop: 24\n\t\t},\n\t\trealisticImage: {\n\t\t\twidth: 3980,\n\t\t\theight: 2300,\n\t\t\tscreenOffsetLeft: 70,\n\t\t\tscreenOffsetTop: 70\n\t\t}\n\t},\n\t{\n\t\tid: \"720p\",\n\t\ttitle: \"720p\",\n\t\t...presetsBase.desktop,\n\t\tscreenWidth: 720,\n\t\tscreenHeight: 1280\n\t},\n\t{\n\t\tid: \"900p\",\n\t\ttitle: \"900p\",\n\t\t...presetsBase.desktop,\n\t\tscreenWidth: 900,\n\t\tscreenHeight: 1440\n\t},\n\t{\n\t\tid: \"1080p\",\n\t\ttitle: \"1080p\",\n\t\t...presetsBase.desktop,\n\t\tscreenWidth: 1080,\n\t\tscreenHeight: 1920\n\t},\n\t{\n\t\tid: \"1440p\",\n\t\ttitle: \"1440p\",\n\t\t...presetsBase.desktop,\n\t\tscreenWidth: 1440,\n\t\tscreenHeight: 2560\n\t},\n\t{\n\t\tid: \"4k\",\n\t\ttitle: \"4K\",\n\t\t...presetsBase.desktop,\n\t\tscreenWidth: 2160,\n\t\tscreenHeight: 3840\n\t}\n])();\nconst deviceCodeComponentPresetIds = [\n\t\"iphone-12\",\n\t\"iphone-12-mini\",\n\t\"iphone-12-pro\",\n\t\"iphone-11\",\n\t\"iphone-11-pro\",\n\t\"iphone-11-pro-max\",\n\t\"iphone-8\",\n\t\"iphone-8-plus\",\n\t\"iphone-se\",\n\t\"samsung-note-10\",\n\t\"pixel-4\",\n\t\"ipad\",\n\t\"ipad-pro-11\",\n\t\"ipad-pro-12-9\",\n\t\"720p\",\n\t\"900p\",\n\t\"1080p\",\n\t\"1440p\",\n\t\"4k\"\n];\nconst devicePresetsMap = /* @__PURE__ */ devicePresets.reduce((map, preset) => {\n\tmap[preset.id] = preset;\n\treturn map;\n}, {});\n/**\n* @internal\n*/\nfunction getDevicePreset(presetId) {\n\treturn devicePresetsMap[presetId] ?? devicePresetsMap[\"iphone-12-pro\"];\n}\n\n//#endregion\n//#region ../../library/src/components/Device/DeviceCodeComponentProps.ts\n/**\n* @internal\n*/\nconst defaultDeviceProps = {\n\tpreset: defaultPresetId,\n\tcustomWidth: 375,\n\tcustomHeight: 800,\n\tcustomBezel: 20,\n\tisMixedBezel: false,\n\tbezelTop: 20,\n\tbezelRight: 20,\n\tbezelBottom: 20,\n\tbezelLeft: 20,\n\tcustomBezelRadius: 20,\n\tcustomScreenRadius: 0,\n\torientation: \"portrait\",\n\tskin: \"clay\",\n\ttheme: \"dark\",\n\tshadow: true,\n\tbackgroundColor: void 0\n};\n/**\n* @internal\n*/\nfunction convertPropsToDeviceOptions(props, { forceOldClay = false } = {}) {\n\tif (props.preset === \"no-device\") return;\n\tlet preset;\n\tif (props.preset === \"custom\") preset = {\n\t\tscreenWidth: props.customWidth,\n\t\tscreenHeight: props.customHeight,\n\t\tscreenRadius: props.customScreenRadius,\n\t\tclayBezelTop: props.isMixedBezel ? props.bezelTop : props.customBezel,\n\t\tclayBezelRight: props.isMixedBezel ? props.bezelRight : props.customBezel,\n\t\tclayBezelBottom: props.isMixedBezel ? props.bezelBottom : props.customBezel,\n\t\tclayBezelLeft: props.isMixedBezel ? props.bezelLeft : props.customBezel,\n\t\tclayBezelRadius: props.customBezelRadius\n\t};\n\telse preset = getDevicePreset(props.preset);\n\tconst colors = getColorsFromTheme(props.theme);\n\tconst shadowColor = colors.shadowColor;\n\tconst shadow = props.shadow ? `0 10px 30px ${shadowColor}` : void 0;\n\tconst rotate = !preset.disableRotation && (props.orientation === \"landscape\" || props.rotated);\n\tlet deviceWidth;\n\tlet deviceHeight;\n\tlet screenOffsetTop;\n\tlet screenOffsetLeft;\n\tlet colorId = props.colorId;\n\tlet appearance;\n\tif ((props.skin === void 0 || props.skin === \"realistic\") && preset.realisticImage && props.preset) {\n\t\tdeviceWidth = preset.realisticImage.width;\n\t\tdeviceHeight = preset.realisticImage.height;\n\t\tscreenOffsetTop = preset.realisticImage.screenOffsetTop;\n\t\tscreenOffsetLeft = preset.realisticImage.screenOffsetLeft;\n\t\tcolorId = colorId ?? colorIdForTheme(props.theme, preset.realisticImage.availableColors);\n\t\tappearance = {\n\t\t\ttype: \"realistic\",\n\t\t\timageUrl: colorId ? `https://preview.framercdn.com/images/devices/${props.preset}-${colorId}.png` : `https://preview.framercdn.com/images/devices/${props.preset}.png`,\n\t\t\timageWidth: preset.realisticImage.width,\n\t\t\timageHeight: preset.realisticImage.height,\n\t\t\trotateImage: rotate\n\t\t};\n\t} else {\n\t\tdeviceWidth = preset.screenWidth + (preset.clayBezelLeft ?? 0) + (preset.clayBezelRight ?? 0);\n\t\tdeviceHeight = preset.screenHeight + (preset.clayBezelTop ?? 0) + (preset.clayBezelBottom ?? 0);\n\t\tscreenOffsetTop = preset.clayBezelTop ?? 0;\n\t\tscreenOffsetLeft = preset.clayBezelLeft ?? 0;\n\t\tif (preset.externalClay && !forceOldClay) {\n\t\t\tdeviceWidth = preset.externalClay.width;\n\t\t\tdeviceHeight = preset.externalClay.height;\n\t\t\tscreenOffsetTop = preset.externalClay.screenOffsetTop;\n\t\t\tscreenOffsetLeft = preset.externalClay.screenOffsetLeft;\n\t\t\tappearance = {\n\t\t\t\ttype: \"external-clay\",\n\t\t\t\timageUrl: `https://preview.framercdn.com/images/devices/${props.preset}-${props.theme}.svg`,\n\t\t\t\timageWidth: preset.externalClay.width,\n\t\t\t\timageHeight: preset.externalClay.height,\n\t\t\t\trotateImage: rotate\n\t\t\t};\n\t\t} else appearance = {\n\t\t\ttype: \"clay\",\n\t\t\tbezelRadius: preset.clayBezelRadius !== void 0 ? `${preset.clayBezelRadius}px` : void 0,\n\t\t\tbezelColor: colors.bezelColor,\n\t\t\tbezelShadeColor: colors.bezelShadeColor\n\t\t};\n\t}\n\tlet screenWidth = preset.screenWidth;\n\tlet screenHeight = preset.screenHeight;\n\tif (rotate) {\n\t\tconst screenOffsetRight = deviceWidth - screenWidth - screenOffsetLeft;\n\t\t[deviceWidth, deviceHeight] = [deviceHeight, deviceWidth];\n\t\t[screenWidth, screenHeight] = [screenHeight, screenWidth];\n\t\t[screenOffsetTop, screenOffsetLeft] = [screenOffsetRight, screenOffsetTop];\n\t}\n\tconst handOffset = preset.realisticImage?.handOffset;\n\treturn {\n\t\tdeviceWidth,\n\t\tdeviceHeight,\n\t\tappearance,\n\t\tscreenWidth,\n\t\tscreenHeight,\n\t\tscreenOffsetTop,\n\t\tscreenOffsetLeft,\n\t\tscreenRadius: preset.screenRadius !== void 0 ? `${preset.screenRadius}px` : void 0,\n\t\tscreenMaskImage: appearance.type !== \"realistic\" && preset.screenMask ? makeScreenMaskImage({\n\t\t\tmask: preset.screenMask,\n\t\t\twidth: preset.screenWidth,\n\t\t\theight: preset.screenHeight,\n\t\t\trotate\n\t\t}) : void 0,\n\t\tscreenColor: colors.screenColor,\n\t\tshadow,\n\t\thand: props.hand !== void 0 && supportsHand(props) ? {\n\t\t\timageUrl: `https://preview.framercdn.com/images/hands/${props.hand}.png`,\n\t\t\toffsetLeft: handOffset?.left,\n\t\t\toffsetRight: handOffset?.right,\n\t\t\toffsetBottom: handOffset?.bottom\n\t\t} : void 0,\n\t\tbackground: props.backgroundColor,\n\t\ttheme: props.theme,\n\t\tcolorId\n\t};\n}\nfunction makeScreenMaskImage({ mask, width, height, rotate = false }) {\n\tconst transform = rotate ? `transform=\"translate(0 ${width}) rotate(-90)\"` : \"\";\n\treturn encodeSVGForCSS(`<svg xmlns=\"http://www.w3.org/2000/svg\" viewport=\"0 0 ${width} ${height}\" preserveAspectRatio=\"none\"><g x=\"0\" y=\"0\" ${transform}>${mask}</g></svg>`);\n}\nconst lightColors = /* @__PURE__ */ new Set([\n\t\"white\",\n\t\"silver\",\n\t\"clearly-white\",\n\t\"sorta-sage\"\n]);\nconst darkColors = /* @__PURE__ */ new Set([\n\t\"black\",\n\t\"space-grey\",\n\t\"graphite\",\n\t\"just-black\",\n\t\"pro\"\n]);\n/** @internal */\nfunction colorIdForTheme(theme, availableColors) {\n\tif (!availableColors) return;\n\tconst colors = theme === \"light\" ? lightColors : darkColors;\n\tfor (const color of availableColors) if (colors.has(color.id)) return color.id;\n\treturn availableColors[0]?.id;\n}\nfunction supportsHand({ preset: presetId, skin, orientation = \"portrait\" }) {\n\tif (!presetId || presetId === \"custom\" || presetId === \"no-device\" || orientation === \"landscape\") return false;\n\tconst preset = getDevicePreset(presetId);\n\treturn skin !== \"clay\" && preset.realisticImage?.handOffset !== void 0;\n}\n\n//#endregion\n//#region ../../library/src/modules/useIsStaticRenderer.ts\n/**\n* Returns true if the caller is executed in a Framer Canvas or Export Canvas environment, or false\n* otherwise. This function could be used outside of a React component; the value it returns will\n* never change.\n*\n* @public\n*/\nfunction isStaticRenderer() {\n\tconst currentTarget = RenderTarget.current();\n\treturn currentTarget === RenderTarget.canvas || currentTarget === RenderTarget.export;\n}\n/**\n* Returns a constant value based on whether the caller is mounted in a Framer Canvas or Export\n* Canvas environment.\n*\n* If you need to use this outside of React, use `isStaticRenderer()` instead.\n*\n* @public\n*/\nfunction useIsStaticRenderer() {\n\tconst [isStatic] = useState(() => isStaticRenderer());\n\treturn isStatic;\n}\n\n//#endregion\n//#region ../../library/src/utils/asRecord.ts\n/** No-op operation that casts an object to a record */\nconst asRecord = (object) => object;\n\n//#endregion\n//#region ../../library/src/utils/isPropValid.ts\n/**\n* @license Emotion v11.0.0\n* MIT License\n*\n* Copyright (c) Emotion team and other contributors\n*\n* Permission is hereby granted, free of charge, to any person obtaining a copy\n* of this software and associated documentation files (the \"Software\"), to deal\n* in the Software without restriction, including without limitation the rights\n* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the Software is\n* furnished to do so, subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be included in all\n* copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n* SOFTWARE.\n*/\nfunction memoize$1(fn) {\n\tconst cache = Object.create(Object.prototype);\n\treturn (arg) => {\n\t\tif (cache[arg] === void 0) cache[arg] = fn(arg);\n\t\treturn cache[arg];\n\t};\n}\nconst reactPropsRegex = /^(?:children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|[dkrxyz]|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y1|y2|yChannelSelector|zoomAndPan|for|class|autofocus|(?:[Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*)$/u;\nconst isPropValid = /* #__PURE__ */ memoize$1((prop) => reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91);\n\n//#endregion\n//#region ../../library/src/utils/runtimeInjection.ts\nconst mockWithWarning = (message) => {\n\treturn () => {\n\t\twarnOnce$1(message);\n\t};\n};\nconst mockWithoutWarning = () => {\n\treturn () => {};\n};\n/** This stores the injected implementations */\nconst implementation = {\n\timagePlaceholderSvg: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"126\" height=\"126\"><path id=\"a\" d=\"M126 0v21.584L21.584 126H0v-17.585L108.415 0H126Zm0 108.414V126h-17.586L126 108.414Zm0-84v39.171L63.585 126H24.414L126 24.414Zm0 42v39.17L105.584 126h-39.17L126 66.414ZM105.586 0 0 105.586V66.415L66.415 0h39.171Zm-42 0L0 63.586V24.415L24.415 0h39.171Zm-42 0L0 21.586V0h21.586Z\" fill=\"rgb(136, 136, 136, 0.2)\" fill-rule=\"evenodd\"/></svg>`,\n\tuseImageSource(image) {\n\t\treturn image.src ?? \"\";\n\t},\n\tuseImageElement(image, rect, nodeId) {\n\t\tconst src = runtime.useImageSource(image, rect, nodeId);\n\t\treturn useMemo(() => {\n\t\t\tconst element = new Image();\n\t\t\telement.src = src;\n\t\t\tif (image.srcSet) element.srcset = image.srcSet;\n\t\t\treturn element;\n\t\t}, [src, image.srcSet]);\n\t},\n\tcanRenderOptimizedCanvasImage() {\n\t\treturn false;\n\t},\n\tfontStore: {\n\t\tisSelectorLoaded() {\n\t\t\treturn true;\n\t\t},\n\t\tasync loadFonts() {\n\t\t\treturn { newlyLoadedFontCount: 0 };\n\t\t},\n\t\tasync loadWebFontsFromSelectors() {\n\t\t\treturn [];\n\t\t},\n\t\tasync loadMissingFonts() {}\n\t},\n\tisOnPageCanvas: false\n};\nlet isRuntimeInjected = false;\nconst runtimeProxy = { get(target, key, reciever) {\n\tif (Reflect.has(target, key)) return Reflect.get(target, key, reciever);\n\tif ([\"getLogger\"].includes(String(key))) return mockWithoutWarning();\n\tif (isRuntimeInjected) return mockWithWarning(`${String(key)} is not available in this version of Framer.`);\n\treturn mockWithWarning(`${String(key)} is only available inside of Framer. https://www.framer.com/`);\n} };\n/**\n* This proxy makes sure that any key on the runtime object will return a\n* function that logs a warning to the console. Functions for which a\n* implementation is provided are available through this object, e.g.\n* `runtime.addActionControls()`\n* @internal\n*/\nconst runtime = /* @__PURE__ */ new Proxy(implementation, runtimeProxy);\n/**\n* @deprecated Do not use in app code. In app code, import fontStore from Vekter instead. This is exported solely for\n* codegenned code (such as font presets) that rely on this.\n*/\nconst fontStore = {\n\tisSelectorLoaded(selector) {\n\t\treturn runtime.fontStore.isSelectorLoaded(selector);\n\t},\n\tloadFonts(fontSelectors) {\n\t\treturn runtime.fontStore.loadFonts(fontSelectors);\n\t},\n\tloadWebFontsFromSelectors(fontSelectors) {\n\t\treturn runtime.fontStore.loadWebFontsFromSelectors(fontSelectors);\n\t},\n\tloadMissingFonts(fontSelectors, fontsLoadedCallback) {\n\t\treturn runtime.fontStore.loadMissingFonts(fontSelectors, fontsLoadedCallback);\n\t}\n};\n/**\n* This function is used by the `initializeRuntime()` function of the runtime to\n* provide the implementation of the functions defined in the `Runtime`\n* interface.\n* @internal\n*/\nfunction _injectRuntime(injectedRuntime) {\n\tObject.assign(implementation, injectedRuntime);\n\tisRuntimeInjected = true;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/corners.ts\nconst cornerPropertiesToInherit = {\n\tborderRadius: \"inherit\",\n\tcornerShape: \"inherit\"\n};\n\n//#endregion\n//#region ../assets/src/getVariantsDimensions.ts\n/**\n* Scale multipliers for generating `srcSet` attributes based on fixed size nodes.\n*/\nconst FixedSizeScaleVariants = [\n\t1,\n\t2,\n\t2.2\n];\nconst ValidSteps = [\n\t512,\n\t1024,\n\t2048,\n\t4096\n];\nfunction getVariantsDimensions(width, height) {\n\tif (width === void 0 || height === void 0) return;\n\tlet lead = width, follow = height, orient = 0;\n\tif (height > width) {\n\t\tlead = height;\n\t\tfollow = width;\n\t\torient = 1;\n\t}\n\tconst ratio = lead / follow;\n\tconst sizes = [];\n\tfor (const step of ValidSteps) {\n\t\tif (lead <= step) return sizes;\n\t\tsizes.push({\n\t\t\tmaxSideSize: step,\n\t\t\twidth: orient === 0 ? step : Math.trunc(step / ratio)\n\t\t});\n\t}\n\treturn sizes;\n}\n\n//#endregion\n//#region ../../library/src/render/style/getSrcSet.ts\nfunction urlWithScaleDownTo(url, scaleDownTo) {\n\ttry {\n\t\tconst urlObj = new URL(url);\n\t\tif (scaleDownTo) urlObj.searchParams.set(\"scale-down-to\", `${scaleDownTo}`);\n\t\telse urlObj.searchParams.delete(\"scale-down-to\");\n\t\treturn urlObj.toString();\n\t} catch {\n\t\treturn url;\n\t}\n}\nconst MinVariantSizeForSourceSet = 512;\nfunction getResponsiveSrcSet(source, image, variants) {\n\tif (!variants || variants.length === 0) return void 0;\n\tif (!image.pixelWidth) return void 0;\n\tconst srcSet = [];\n\tfor (const variant of variants) {\n\t\tif (variant.width < 512) continue;\n\t\tconst url = urlWithScaleDownTo(source, variant.maxSideSize);\n\t\tsrcSet.push(`${url} ${variant.width}w`);\n\t}\n\tsrcSet.push(`${urlWithScaleDownTo(source, null)} ${image.pixelWidth}w`);\n\treturn srcSet.join(\", \") || void 0;\n}\nfunction getFixedSrcSets(source, image, nodeFixedSize) {\n\tif (!image.pixelWidth || !image.pixelHeight) return void 0;\n\tif (!nodeFixedSize?.width || !nodeFixedSize?.height) return void 0;\n\tconst srcSet = [];\n\tconst imageMaxSide = Math.max(image.pixelWidth, image.pixelHeight);\n\tconst scaleRatio = Math.max(nodeFixedSize.width / image.pixelWidth, nodeFixedSize.height / image.pixelHeight);\n\tfor (const variant of FixedSizeScaleVariants) {\n\t\tconst url = urlWithScaleDownTo(source, Math.round(imageMaxSide * variant * scaleRatio));\n\t\tsrcSet.push({\n\t\t\tsrc: url,\n\t\t\tscale: variant\n\t\t});\n\t}\n\treturn srcSet;\n}\nfunction getSrcSet(nodeFixedSize, image, source) {\n\tif (![\"auto\", \"lossless\"].includes(image.preferredSize ?? \"\")) return {\n\t\tsrc: source,\n\t\tsrcSet: void 0\n\t};\n\tif (nodeFixedSize) {\n\t\tconst fixedSrcSets = getFixedSrcSets(source, image, nodeFixedSize);\n\t\tif (!fixedSrcSets?.length) return {\n\t\t\tsrc: source,\n\t\t\tsrcSet: void 0\n\t\t};\n\t\tconst [x1, ...rest] = fixedSrcSets;\n\t\treturn {\n\t\t\tsrc: x1?.src,\n\t\t\tsrcSet: rest.map(({ src, scale }) => `${src} ${scale}x`).join(\", \")\n\t\t};\n\t} else return {\n\t\tsrc: source,\n\t\tsrcSet: getResponsiveSrcSet(source, image, getVariantsDimensions(image.pixelWidth, image.pixelHeight))\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/style/BackgroundImageComponent.tsx\nconst wrapperStyle = /* @__PURE__ */ (() => ({\n\tposition: \"absolute\",\n\t...cornerPropertiesToInherit,\n\ttop: 0,\n\tright: 0,\n\tbottom: 0,\n\tleft: 0\n}))();\nfunction getPlaceholderStyle() {\n\treturn {\n\t\tbackgroundRepeat: \"repeat\",\n\t\tbackgroundPosition: \"left top\",\n\t\tbackgroundSize: \"64px auto\",\n\t\tbackgroundImage: encodeSVGForCSS(runtime.imagePlaceholderSvg)\n\t};\n}\nfunction cssObjectFit(imageFit) {\n\tswitch (imageFit) {\n\t\tcase \"fit\": return \"contain\";\n\t\tcase \"stretch\": return \"fill\";\n\t\tdefault: return \"cover\";\n\t}\n}\nfunction cssObjectPosition(positionX, positionY) {\n\tconst x = positionX ?? \"center\";\n\tconst y = positionY ?? \"center\";\n\tif (x === \"center\" && y === \"center\") return \"center\";\n\treturn x + \" \" + y;\n}\nfunction getImageStyle(image) {\n\treturn {\n\t\tdisplay: \"block\",\n\t\twidth: \"100%\",\n\t\theight: \"100%\",\n\t\t...cornerPropertiesToInherit,\n\t\tobjectPosition: cssObjectPosition(image.positionX, image.positionY),\n\t\tobjectFit: cssObjectFit(image.fit)\n\t};\n}\n/**\n* This defines the following behavior:\n* - While the image is loading, or JS hasn’t loaded yet: render with decoding=\"async\" (unless\n*   forced otherwise)\n* - Once the image is loaded: switch to decoding=\"auto\"\n*\n* This ensures images don’t introduce animation jank when they are mounted for the first time, but\n* also don’t experience white flashes [1] when their `src` changes later (eg due to a resize or a\n* `sizes` change).\n* [1] https://framer-team.slack.com/archives/C01B14R6E22/p1736530731563399\n*/\nfunction useDecodingAttribute(avoidAsyncDecoding) {\n\tconst currentDecoding = React.useRef(avoidAsyncDecoding ? \"auto\" : \"async\");\n\tconst switchDecodingToAuto = useCallback((node) => {\n\t\tcurrentDecoding.current = \"auto\";\n\t\tnode.decoding = \"auto\";\n\t}, []);\n\tconst onImageLoad = useCallback((event) => {\n\t\tswitchDecodingToAuto(event.currentTarget);\n\t}, [switchDecodingToAuto]);\n\tconst onImageMount = useCallback((node) => {\n\t\tif (node?.complete) switchDecodingToAuto(node);\n\t}, [switchDecodingToAuto]);\n\treturn {\n\t\tdecoding: currentDecoding.current,\n\t\tonImageLoad,\n\t\tonImageMount\n\t};\n}\nfunction StaticImage({ image, containerSize, nodeId, alt, draggable, avoidAsyncDecoding }) {\n\tconst source = runtime.useImageSource(image, containerSize, nodeId);\n\tconst imageStyle = getImageStyle(image);\n\tconst { decoding, onImageLoad, onImageMount } = useDecodingAttribute(avoidAsyncDecoding);\n\tconst { srcSet, src } = !(\"srcSet\" in image) ? getSrcSet(image.nodeFixedSize, image, source) : {\n\t\tsrc: source,\n\t\tsrcSet: image.srcSet\n\t};\n\treturn /* @__PURE__ */ jsx(\"img\", {\n\t\tsuppressHydrationWarning: true,\n\t\tref: onImageMount,\n\t\tdecoding,\n\t\tfetchpriority: image.fetchPriority,\n\t\tloading: image.loading,\n\t\twidth: image.pixelWidth,\n\t\theight: image.pixelHeight,\n\t\tsizes: srcSet ? image.sizes : void 0,\n\t\tsrcSet,\n\t\tsrc,\n\t\tonLoad: onImageLoad,\n\t\talt: alt ?? image.alt ?? \"\",\n\t\tstyle: imageStyle,\n\t\tdraggable\n\t});\n}\nfunction CanvasImage({ image, containerSize, nodeId }) {\n\tconst wrapperRef = React.useRef(null);\n\tconst imageElement = runtime.useImageElement(image, containerSize, nodeId);\n\tconst imageStyle = getImageStyle(image);\n\tReact.useLayoutEffect(() => {\n\t\tconst wrapper = wrapperRef.current;\n\t\tif (wrapper === null) return;\n\t\twrapper.appendChild(imageElement);\n\t\treturn () => {\n\t\t\twrapper.removeChild(imageElement);\n\t\t};\n\t}, [imageElement]);\n\tObject.assign(imageElement.style, imageStyle);\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\tref: wrapperRef,\n\t\tstyle: {\n\t\t\tdisplay: \"contents\",\n\t\t\t...cornerPropertiesToInherit\n\t\t}\n\t});\n}\nfunction OptimizedCanvasImage({ nodeId, image, containerSize }) {\n\tconst wrapperRef = React.useRef(null);\n\tconst source = runtime.useImageSource(image, containerSize, nodeId);\n\tReact.useLayoutEffect(() => {\n\t\tconst wrapper = wrapperRef.current;\n\t\tif (wrapper === null) return;\n\t\tconst imageStyle = getImageStyle(image);\n\t\truntime.renderOptimizedCanvasImage(wrapper, source, imageStyle, nodeId);\n\t}, [\n\t\tnodeId,\n\t\timage,\n\t\tsource\n\t]);\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\tref: wrapperRef,\n\t\tstyle: {\n\t\t\tdisplay: \"contents\",\n\t\t\t...cornerPropertiesToInherit\n\t\t}\n\t});\n}\nfunction BackgroundImageComponent({ layoutId, image, ...props }) {\n\tif (layoutId) layoutId += \"-background\";\n\tlet fallbackWrapperStyles = null;\n\tlet needsMotion = !!layoutId;\n\tlet imageNode = null;\n\tif (isString(image.src)) {\n\t\tif (image.fit === \"tile\" && image.pixelWidth && image.pixelHeight) {\n\t\t\tconst backgroundSize = isNumber(image.backgroundSize) ? image.backgroundSize : 1;\n\t\t\tconst tileSize = {\n\t\t\t\twidth: Math.round(backgroundSize * image.pixelWidth),\n\t\t\t\theight: Math.round(backgroundSize * image.pixelHeight)\n\t\t\t};\n\t\t\tconst roundedBackgroundSize = roundToHalfPixel(backgroundSize * (image.pixelWidth / 2));\n\t\t\tconst imageSource = runtime.useImageSource(image, tileSize);\n\t\t\tfallbackWrapperStyles = {\n\t\t\t\t...wrapperStyle,\n\t\t\t\tbackgroundImage: `url(${imageSource})`,\n\t\t\t\tbackgroundRepeat: \"repeat\",\n\t\t\t\tbackgroundPosition: cssObjectPosition(image.positionX, image.positionY),\n\t\t\t\topacity: void 0,\n\t\t\t\tborder: 0,\n\t\t\t\tbackgroundSize: `${roundedBackgroundSize}px auto`\n\t\t\t};\n\t\t\timageNode = null;\n\t\t\tneedsMotion = true;\n\t\t} else if (RenderTarget.current() !== RenderTarget.canvas) imageNode = /* @__PURE__ */ jsx(StaticImage, {\n\t\t\timage,\n\t\t\tavoidAsyncDecoding: RenderTarget.current() === RenderTarget.export,\n\t\t\t...props\n\t\t});\n\t\telse if (runtime.canRenderOptimizedCanvasImage(runtime.useImageSource(image))) imageNode = /* @__PURE__ */ jsx(OptimizedCanvasImage, {\n\t\t\timage,\n\t\t\t...props\n\t\t});\n\t\telse imageNode = /* @__PURE__ */ jsx(CanvasImage, {\n\t\t\timage,\n\t\t\t...props\n\t\t});\n\t}\n\tconst style = imageNode ? wrapperStyle : fallbackWrapperStyles ?? {\n\t\t...wrapperStyle,\n\t\t...getPlaceholderStyle()\n\t};\n\treturn needsMotion ? /* @__PURE__ */ jsx(motion.div, {\n\t\tlayoutId,\n\t\tstyle,\n\t\t\"data-framer-background-image-wrapper\": true,\n\t\tchildren: imageNode\n\t}) : /* @__PURE__ */ jsx(\"div\", {\n\t\tstyle,\n\t\t\"data-framer-background-image-wrapper\": true,\n\t\tchildren: imageNode\n\t});\n}\n\n//#endregion\n//#region ../../library/src/render/style/BorderComponent.tsx\n/** @internal */\nfunction collectBorderStyleForProps(props, style, collapseEqualBorders = true) {\n\tconst { borderWidth, borderStyle, borderColor } = props;\n\tif (!borderWidth) return;\n\tlet borderTop;\n\tlet borderBottom;\n\tlet borderLeft;\n\tlet borderRight;\n\tif (typeof borderWidth === \"number\") borderTop = borderBottom = borderLeft = borderRight = borderWidth;\n\telse {\n\t\tborderTop = borderWidth.top || 0;\n\t\tborderBottom = borderWidth.bottom || 0;\n\t\tborderLeft = borderWidth.left || 0;\n\t\tborderRight = borderWidth.right || 0;\n\t}\n\tif (borderTop === 0 && borderBottom === 0 && borderLeft === 0 && borderRight === 0) return;\n\tif (collapseEqualBorders && borderTop === borderBottom && borderTop === borderLeft && borderTop === borderRight) {\n\t\tstyle.border = `${borderTop}px ${borderStyle} ${borderColor}`;\n\t\treturn;\n\t}\n\tstyle.borderStyle = props.borderStyle;\n\tstyle.borderColor = props.borderColor;\n\tstyle.borderTopWidth = `${borderTop}px`;\n\tstyle.borderBottomWidth = `${borderBottom}px`;\n\tstyle.borderLeftWidth = `${borderLeft}px`;\n\tstyle.borderRightWidth = `${borderRight}px`;\n}\nfunction Border(props) {\n\tconst layoutId = props.layoutId ? `${props.layoutId}-border` : void 0;\n\tif (!props.borderWidth) return null;\n\tconst style = {\n\t\tposition: \"absolute\",\n\t\tleft: 0,\n\t\tright: 0,\n\t\ttop: 0,\n\t\tbottom: 0,\n\t\t...cornerPropertiesToInherit,\n\t\tpointerEvents: \"none\"\n\t};\n\tif (props.border) {\n\t\tstyle.border = props.border;\n\t\treturn /* @__PURE__ */ jsx(motion.div, { style });\n\t}\n\tcollectBorderStyleForProps(props, style, false);\n\treturn /* @__PURE__ */ jsx(motion.div, {\n\t\t\"data-frame-border\": true,\n\t\tstyle,\n\t\tlayoutId\n\t});\n}\n\n//#endregion\n//#region ../../library/src/render/types/BackgroundImage.ts\nconst key$5 = \"src\";\n/** @public */\nconst BackgroundImage = { isImageObject: function(image) {\n\tif (!image || typeof image === \"string\") return false;\n\treturn typeof image === \"object\" && key$5 in image;\n} };\n\n//#endregion\n//#region ../../library/src/render/style/backgroundImageFromProps.ts\nfunction applyForwardOverrides(background, props) {\n\tconst { _forwardedOverrideId, _forwardedOverrides, id } = props;\n\tconst forwardedOverrideId = _forwardedOverrideId ?? id;\n\tconst src = _forwardedOverrides && forwardedOverrideId ? _forwardedOverrides[forwardedOverrideId] : void 0;\n\tif (src && typeof src === \"string\") background = {\n\t\t...background,\n\t\tsrc\n\t};\n\treturn background;\n}\n/** @internal */\nfunction backgroundImageFromProps(props) {\n\tconst { background, image } = props;\n\tif (image !== void 0 && background && !BackgroundImage.isImageObject(background)) return;\n\tlet backgroundImage = null;\n\tif (isString(image)) backgroundImage = {\n\t\talt: \"\",\n\t\tsrc: image\n\t};\n\telse backgroundImage = Animatable.get(background, null);\n\tif (!BackgroundImage.isImageObject(backgroundImage)) return;\n\treturn applyForwardOverrides(backgroundImage, props);\n}\n\n//#endregion\n//#region ../../library/src/utils/type-guards.ts\nfunction isEmpty(obj) {\n\treturn !obj || !Object.keys(obj).length && obj.constructor === Object;\n}\nfunction isReactElement(test) {\n\treturn typeof test !== \"string\" && typeof test !== \"number\";\n}\nfunction isReactChild(test) {\n\treturn test !== null && typeof test !== \"undefined\" && typeof test !== \"boolean\" && !isEmpty(test);\n}\n\n//#endregion\n//#region ../../library/src/render/utils/isFiniteNumber.ts\n/** @internal */\nfunction isFiniteNumber(value) {\n\treturn Number.isFinite(value);\n}\n/** @internal */\nfunction finiteNumber(value) {\n\treturn isFiniteNumber(value) ? value : void 0;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/degreesToRadians.ts\n/** @internal */\nfunction degreesToRadians(degrees) {\n\treturn degrees * (Math.PI / 180);\n}\n\n//#endregion\n//#region ../../library/src/render/types/Line.ts\n/**\n* @internal\n*/\nconst Line = /* @__PURE__ */ (() => {\n\t/**\n\t* @internal\n\t*/\n\tfunction Line(a, b) {\n\t\treturn {\n\t\t\ta,\n\t\t\tb\n\t\t};\n\t}\n\tLine.offset = (line, offset) => {\n\t\tconst angle = Point.angleFromX(line.a, line.b);\n\t\tconst rad = degreesToRadians(angle);\n\t\tconst x = offset * Math.sin(rad);\n\t\tconst y = offset * Math.cos(rad);\n\t\treturn Line({\n\t\t\tx: line.a.x + x,\n\t\t\ty: line.a.y - y\n\t\t}, {\n\t\t\tx: line.b.x + x,\n\t\t\ty: line.b.y - y\n\t\t});\n\t};\n\tLine.intersection = (lineA, lineB, segments) => {\n\t\tconst x1 = lineA.a.x;\n\t\tconst y1 = lineA.a.y;\n\t\tconst x2 = lineA.b.x;\n\t\tconst y2 = lineA.b.y;\n\t\tconst x3 = lineB.a.x;\n\t\tconst y3 = lineB.a.y;\n\t\tconst x4 = lineB.b.x;\n\t\tconst y4 = lineB.b.y;\n\t\tconst a1 = (x4 - x3) * (y3 - y1) - (y4 - y3) * (x3 - x1);\n\t\tconst b1 = (x4 - x3) * (y2 - y1) - (y4 - y3) * (x2 - x1);\n\t\tconst c1 = (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1);\n\t\tif (a1 === 0 && b1 === 0) return null;\n\t\tif (b1 === 0) return null;\n\t\tconst alpha = a1 / b1;\n\t\tconst beta = c1 / b1;\n\t\tif (segments && (alpha < 0 || alpha > 1 || beta < 0 || beta > 1)) return null;\n\t\treturn {\n\t\t\tx: x1 + alpha * (x2 - x1),\n\t\t\ty: y1 + alpha * (y2 - y1)\n\t\t};\n\t};\n\tLine.intersectionAngle = (lineA, lineB) => {\n\t\tconst deltaAX = lineA.b.x - lineA.a.x;\n\t\tconst deltaAY = lineA.b.y - lineA.a.y;\n\t\tconst deltaBX = lineB.b.x - lineB.a.x;\n\t\tconst deltaBY = lineB.b.y - lineB.a.y;\n\t\treturn Math.atan2(deltaAX * deltaBY - deltaAY * deltaBX, deltaAX * deltaBX + deltaAY * deltaBY) * (180 / Math.PI);\n\t};\n\tLine.isOrthogonal = (line) => {\n\t\treturn line.a.x === line.b.x || line.a.y === line.b.y;\n\t};\n\tLine.perpendicular = (line, pointOnLine) => {\n\t\tconst deltaX = line.a.x - line.b.x;\n\t\tconst deltaY = line.a.y - line.b.y;\n\t\treturn Line(Point(pointOnLine.x - deltaY, pointOnLine.y + deltaX), pointOnLine);\n\t};\n\tLine.projectPoint = (line, point) => {\n\t\tconst perp = Line.perpendicular(line, point);\n\t\treturn Line.intersection(line, perp);\n\t};\n\tLine.pointAtPercentDistance = (line, distance) => {\n\t\tconst hypotenuse = Line.distance(line);\n\t\tconst r = distance * hypotenuse / hypotenuse;\n\t\treturn {\n\t\t\tx: r * line.b.x + (1 - r) * line.a.x,\n\t\t\ty: r * line.b.y + (1 - r) * line.a.y\n\t\t};\n\t};\n\tLine.distance = (line) => {\n\t\treturn Point.distance(line.a, line.b);\n\t};\n\treturn Line;\n})();\n\n//#endregion\n//#region ../../library/src/render/types/Rect.ts\n/**\n* @public\n*/\nconst Rect = {\n\t/**\n\t*\n\t* @param rect -\n\t* @param other -\n\t* @returns if the input rectangles are equal in size and position\n\t* @public\n\t*/\n\tequals: function(rect, other) {\n\t\tif (rect === other) return true;\n\t\tif (!rect || !other) return false;\n\t\treturn rect.x === other.x && rect.y === other.y && rect.width === other.width && rect.height === other.height;\n\t},\n\t/** @internal */\n\tfrom: (rect) => {\n\t\treturn {\n\t\t\tx: rect.x,\n\t\t\ty: rect.y,\n\t\t\twidth: rect.width,\n\t\t\theight: rect.height\n\t\t};\n\t},\n\t/** @internal */\n\tatOrigin: (size) => {\n\t\treturn {\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\twidth: size.width,\n\t\t\theight: size.height\n\t\t};\n\t},\n\t/** @internal */\n\tfromTwoPoints: (a, b) => {\n\t\treturn {\n\t\t\tx: Math.min(a.x, b.x),\n\t\t\ty: Math.min(a.y, b.y),\n\t\t\twidth: Math.abs(a.x - b.x),\n\t\t\theight: Math.abs(a.y - b.y)\n\t\t};\n\t},\n\t/** @internal */\n\tfromRect: (rect) => {\n\t\treturn {\n\t\t\tx: rect.left,\n\t\t\ty: rect.top,\n\t\t\twidth: rect.right - rect.left,\n\t\t\theight: rect.bottom - rect.top\n\t\t};\n\t},\n\t/** @internal */\n\tmultiply: (rect, n) => {\n\t\treturn {\n\t\t\tx: rect.x * n,\n\t\t\ty: rect.y * n,\n\t\t\twidth: rect.width * n,\n\t\t\theight: rect.height * n\n\t\t};\n\t},\n\t/** @internal */\n\tdivide: (rect, n) => {\n\t\treturn Rect.multiply(rect, 1 / n);\n\t},\n\t/** @internal */\n\toffset: (rect, delta) => {\n\t\tconst xOffset = typeof delta.x === \"number\" ? delta.x : 0;\n\t\tconst yOffset = typeof delta.y === \"number\" ? delta.y : 0;\n\t\treturn {\n\t\t\t...rect,\n\t\t\tx: rect.x + xOffset,\n\t\t\ty: rect.y + yOffset\n\t\t};\n\t},\n\t/** @internal */\n\tinflate: (rect, value) => {\n\t\tif (value === 0) return rect;\n\t\tconst doubleValue = 2 * value;\n\t\treturn {\n\t\t\tx: rect.x - value,\n\t\t\ty: rect.y - value,\n\t\t\twidth: rect.width + doubleValue,\n\t\t\theight: rect.height + doubleValue\n\t\t};\n\t},\n\t/** @internal */\n\tpixelAligned: (rect) => {\n\t\tconst x = Math.round(rect.x);\n\t\tconst y = Math.round(rect.y);\n\t\tconst rectMaxX = Math.round(rect.x + rect.width);\n\t\tconst rectMaxY = Math.round(rect.y + rect.height);\n\t\treturn {\n\t\t\tx,\n\t\t\ty,\n\t\t\twidth: Math.max(rectMaxX - x, 0),\n\t\t\theight: Math.max(rectMaxY - y, 0)\n\t\t};\n\t},\n\t/** @internal */\n\thalfPixelAligned: (rect) => {\n\t\tconst x = Math.round(rect.x * 2) / 2;\n\t\tconst y = Math.round(rect.y * 2) / 2;\n\t\tconst rectMaxX = Math.round((rect.x + rect.width) * 2) / 2;\n\t\tconst rectMaxY = Math.round((rect.y + rect.height) * 2) / 2;\n\t\treturn {\n\t\t\tx,\n\t\t\ty,\n\t\t\twidth: Math.max(rectMaxX - x, 1),\n\t\t\theight: Math.max(rectMaxY - y, 1)\n\t\t};\n\t},\n\t/** @internal */\n\tround: (rect, decimals = 0) => {\n\t\treturn {\n\t\t\tx: roundedNumber(rect.x, decimals),\n\t\t\ty: roundedNumber(rect.y, decimals),\n\t\t\twidth: roundedNumber(rect.width, decimals),\n\t\t\theight: roundedNumber(rect.height, decimals)\n\t\t};\n\t},\n\t/** @internal */\n\troundToOutside: (rect) => {\n\t\tconst x = Math.floor(rect.x);\n\t\tconst y = Math.floor(rect.y);\n\t\tconst rectMaxX = Math.ceil(rect.x + rect.width);\n\t\tconst rectMaxY = Math.ceil(rect.y + rect.height);\n\t\treturn {\n\t\t\tx,\n\t\t\ty,\n\t\t\twidth: Math.max(rectMaxX - x, 0),\n\t\t\theight: Math.max(rectMaxY - y, 0)\n\t\t};\n\t},\n\t/**\n\t* @param rect -\n\t* @internal\n\t*/\n\tminX: (rect) => {\n\t\treturn rect.x;\n\t},\n\t/**\n\t* @param rect -\n\t* @internal\n\t*/\n\tmaxX: (rect) => {\n\t\treturn rect.x + rect.width;\n\t},\n\t/**\n\t* @param rect -\n\t* @internal\n\t*/\n\tminY: (rect) => {\n\t\treturn rect.y;\n\t},\n\t/**\n\t* @param rect -\n\t* @internal\n\t*/\n\tmaxY: (rect) => {\n\t\treturn rect.y + rect.height;\n\t},\n\t/** @internal */\n\tpositions: (rect) => {\n\t\treturn {\n\t\t\tminX: rect.x,\n\t\t\tmidX: rect.x + rect.width / 2,\n\t\t\tmaxX: Rect.maxX(rect),\n\t\t\tminY: rect.y,\n\t\t\tmidY: rect.y + rect.height / 2,\n\t\t\tmaxY: Rect.maxY(rect)\n\t\t};\n\t},\n\t/**\n\t*\n\t* @param rect -\n\t* @internal\n\t*/\n\tcenter: (rect) => {\n\t\treturn {\n\t\t\tx: rect.x + rect.width / 2,\n\t\t\ty: rect.y + rect.height / 2\n\t\t};\n\t},\n\t/** @internal */\n\tboundingRectFromPoints: (points) => {\n\t\tlet minX = Infinity;\n\t\tlet maxX = -Infinity;\n\t\tlet minY = Infinity;\n\t\tlet maxY = -Infinity;\n\t\tfor (let i = 0; i < points.length; i++) {\n\t\t\tconst point = points[i];\n\t\t\tminX = Math.min(minX, point.x);\n\t\t\tmaxX = Math.max(maxX, point.x);\n\t\t\tminY = Math.min(minY, point.y);\n\t\t\tmaxY = Math.max(maxY, point.y);\n\t\t}\n\t\treturn {\n\t\t\tx: minX,\n\t\t\ty: minY,\n\t\t\twidth: maxX - minX,\n\t\t\theight: maxY - minY\n\t\t};\n\t},\n\t/**\n\t* Returns the precise box defined by the given points, starting from the top-left point. This produces the same\n\t* Rect as Rect.boundingRectFromPoints *only* when the rect described by the points is not rotated.\n\t*\n\t* @internal\n\t*/\n\tfromPoints: (ps) => {\n\t\tconst [tl, tr, _, bl] = ps;\n\t\tconst { x, y } = tl;\n\t\treturn {\n\t\t\tx,\n\t\t\ty,\n\t\t\twidth: Point.distance(tl, tr),\n\t\t\theight: Point.distance(tl, bl)\n\t\t};\n\t},\n\t/**\n\t* Returns a rect containing all input rects\n\t* @param rect - a list of rectangles\n\t* @returns A rectangle that fits exactly around the input rects\n\t* @internal\n\t*/\n\tmerge: (...rect) => {\n\t\tconst min = {\n\t\t\tx: Math.min(...rect.map(Rect.minX)),\n\t\t\ty: Math.min(...rect.map(Rect.minY))\n\t\t};\n\t\tconst max = {\n\t\t\tx: Math.max(...rect.map(Rect.maxX)),\n\t\t\ty: Math.max(...rect.map(Rect.maxY))\n\t\t};\n\t\treturn Rect.fromTwoPoints(min, max);\n\t},\n\t/** @internal */\n\tintersection: (rect1, rect2) => {\n\t\tconst x = Math.max(rect1.x, rect2.x);\n\t\tconst x2 = Math.min(rect1.x + rect1.width, rect2.x + rect2.width);\n\t\tconst y = Math.max(rect1.y, rect2.y);\n\t\tconst y2 = Math.min(rect1.y + rect1.height, rect2.y + rect2.height);\n\t\treturn {\n\t\t\tx,\n\t\t\ty,\n\t\t\twidth: x2 - x,\n\t\t\theight: y2 - y\n\t\t};\n\t},\n\t/**\n\t* Returns all the corner points for a rect\n\t* @param rect -\n\t* @internal\n\t*/\n\tpoints: (rect) => {\n\t\treturn [\n\t\t\t{\n\t\t\t\tx: Rect.minX(rect),\n\t\t\t\ty: Rect.minY(rect)\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: Rect.minX(rect),\n\t\t\t\ty: Rect.maxY(rect)\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: Rect.maxX(rect),\n\t\t\t\ty: Rect.minY(rect)\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: Rect.maxX(rect),\n\t\t\t\ty: Rect.maxY(rect)\n\t\t\t}\n\t\t];\n\t},\n\t/**\n\t* Returns all the corner points for a rect at the origin.\n\t* @internal\n\t*/\n\tpointsAtOrigin: (rect) => {\n\t\treturn [\n\t\t\t{\n\t\t\t\tx: 0,\n\t\t\t\ty: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: rect.width,\n\t\t\t\ty: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: rect.width,\n\t\t\t\ty: rect.height\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: 0,\n\t\t\t\ty: rect.height\n\t\t\t}\n\t\t];\n\t},\n\t/** Takes a rect and transforms it by a matrix, resulting in the bounding rectangle of the\n\t* rotated and/or translated original.\n\t* @param rect - rectangle to transform\n\t* @param matrix - matrix to transform by\n\t* @returns The bounding rectangle of the rotated and/or translated rect.\n\t*/\n\ttransform: (rect, matrix) => {\n\t\tconst { x: x1, y: y1 } = matrix.transformPoint({\n\t\t\tx: rect.x,\n\t\t\ty: rect.y\n\t\t});\n\t\tconst { x: x2, y: y2 } = matrix.transformPoint({\n\t\t\tx: rect.x + rect.width,\n\t\t\ty: rect.y\n\t\t});\n\t\tconst { x: x3, y: y3 } = matrix.transformPoint({\n\t\t\tx: rect.x + rect.width,\n\t\t\ty: rect.y + rect.height\n\t\t});\n\t\tconst { x: x4, y: y4 } = matrix.transformPoint({\n\t\t\tx: rect.x,\n\t\t\ty: rect.y + rect.height\n\t\t});\n\t\tconst x = Math.min(x1, x2, x3, x4);\n\t\tconst width = Math.max(x1, x2, x3, x4) - x;\n\t\tconst y = Math.min(y1, y2, y3, y4);\n\t\treturn {\n\t\t\tx,\n\t\t\ty,\n\t\t\twidth,\n\t\t\theight: Math.max(y1, y2, y3, y4) - y\n\t\t};\n\t},\n\t/**\n\t* Checks if a rectangle contains a point\n\t* @param rect - The rectangle to check\n\t* @param point - The point to check\n\t* @returns true if the provided rectangle contains the provided point\n\t* @internal\n\t*/\n\tcontainsPoint: (rect, point) => {\n\t\tif (point.x < Rect.minX(rect)) return false;\n\t\tif (point.x > Rect.maxX(rect)) return false;\n\t\tif (point.y < Rect.minY(rect)) return false;\n\t\tif (point.y > Rect.maxY(rect)) return false;\n\t\tif (Number.isNaN(rect.x)) return false;\n\t\tif (Number.isNaN(rect.y)) return false;\n\t\treturn true;\n\t},\n\t/**\n\t* Returns wether a rect contains another rect entirely\n\t* @param rectA -\n\t* @param rectB -\n\t* @returns true if rectA contains rectB\n\t*/\n\tcontainsRect: (rectA, rectB) => {\n\t\tfor (const point of Rect.points(rectB)) if (!Rect.containsPoint(rectA, point)) return false;\n\t\treturn true;\n\t},\n\t/** @internal */\n\ttoCSS: (rect) => {\n\t\treturn {\n\t\t\tdisplay: \"block\",\n\t\t\ttransform: `translate(${rect.x}px, ${rect.y}px)`,\n\t\t\twidth: `${rect.width}px`,\n\t\t\theight: `${rect.height}px`\n\t\t};\n\t},\n\t/** @internal */\n\tinset: (rect, n) => {\n\t\treturn {\n\t\t\tx: rect.x + n,\n\t\t\ty: rect.y + n,\n\t\t\twidth: Math.max(0, rect.width - 2 * n),\n\t\t\theight: Math.max(0, rect.height - 2 * n)\n\t\t};\n\t},\n\t/** @internal */\n\tintersects: (rectA, rectB) => {\n\t\treturn !(rectB.x >= Rect.maxX(rectA) || Rect.maxX(rectB) <= rectA.x || rectB.y >= Rect.maxY(rectA) || Rect.maxY(rectB) <= rectA.y);\n\t},\n\t/** @internal */\n\toverlapHorizontally: (rectA, rectB) => {\n\t\tconst aMax = Rect.maxX(rectA);\n\t\tconst bMax = Rect.maxX(rectB);\n\t\treturn aMax > rectB.x && bMax > rectA.x;\n\t},\n\t/** @internal */\n\toverlapVertically: (rectA, rectB) => {\n\t\tconst aMax = Rect.maxY(rectA);\n\t\tconst bMax = Rect.maxY(rectB);\n\t\treturn aMax > rectB.y && bMax > rectA.y;\n\t},\n\t/** @internal */\n\tdoesNotIntersect: (rect, rects) => {\n\t\treturn !rects.some((comparingRect) => {\n\t\t\treturn Rect.intersects(comparingRect, rect);\n\t\t});\n\t},\n\t/**\n\t*\n\t* @param rectA -\n\t* @param rectB -\n\t* @returns if the input rectangles are equal in size and position\n\t* @public\n\t* @deprecated: please use Rect.equals instead\n\t*/\n\tisEqual: (rectA, rectB) => {\n\t\treturn Rect.equals(rectA, rectB);\n\t},\n\t/**\n\t* @returns [tl, tr, br, bl]\n\t* @internal\n\t*/\n\tcornerPoints: (rect) => {\n\t\tconst rectMinX = rect.x;\n\t\tconst rectMaxX = rect.x + rect.width;\n\t\tconst rectMinY = rect.y;\n\t\tconst rectMaxY = rect.y + rect.height;\n\t\treturn [\n\t\t\t{\n\t\t\t\tx: rectMinX,\n\t\t\t\ty: rectMinY\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: rectMaxX,\n\t\t\t\ty: rectMinY\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: rectMaxX,\n\t\t\t\ty: rectMaxY\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: rectMinX,\n\t\t\t\ty: rectMaxY\n\t\t\t}\n\t\t];\n\t},\n\t/** @internal */\n\tmidPoints: (rect) => {\n\t\tconst rectMinX = rect.x;\n\t\tconst rectMidX = rect.x + rect.width / 2;\n\t\tconst rectMaxX = rect.x + rect.width;\n\t\tconst rectMinY = rect.y;\n\t\tconst rectMidY = rect.y + rect.height / 2;\n\t\tconst rectMaxY = rect.y + rect.height;\n\t\treturn [\n\t\t\t{\n\t\t\t\tx: rectMidX,\n\t\t\t\ty: rectMinY\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: rectMaxX,\n\t\t\t\ty: rectMidY\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: rectMidX,\n\t\t\t\ty: rectMaxY\n\t\t\t},\n\t\t\t{\n\t\t\t\tx: rectMinX,\n\t\t\t\ty: rectMidY\n\t\t\t}\n\t\t];\n\t},\n\t/** @internal */\n\tpointDistance: (rect, point) => {\n\t\tlet x = 0;\n\t\tlet y = 0;\n\t\tif (point.x < rect.x) x = rect.x - point.x;\n\t\telse if (point.x > Rect.maxX(rect)) x = point.x - Rect.maxX(rect);\n\t\tif (point.y < rect.y) y = rect.y - point.y;\n\t\telse if (point.y > Rect.maxY(rect)) y = point.y - Rect.maxY(rect);\n\t\treturn Point.distance({\n\t\t\tx,\n\t\t\ty\n\t\t}, {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t});\n\t},\n\tdelta: (a, b) => {\n\t\tconst pointA = {\n\t\t\tx: Rect.minX(a),\n\t\t\ty: Rect.minY(a)\n\t\t};\n\t\tconst pointB = {\n\t\t\tx: Rect.minX(b),\n\t\t\ty: Rect.minY(b)\n\t\t};\n\t\treturn {\n\t\t\tx: pointA.x - pointB.x,\n\t\t\ty: pointA.y - pointB.y\n\t\t};\n\t},\n\t/** @internal */\n\twithMinSize: (rect, minSize) => {\n\t\tconst { width: minWidth, height: minHeight } = minSize;\n\t\tconst diffX = rect.width - minWidth;\n\t\tconst diffY = rect.height - minHeight;\n\t\treturn {\n\t\t\twidth: Math.max(rect.width, minWidth),\n\t\t\theight: Math.max(rect.height, minHeight),\n\t\t\tx: rect.width < minWidth ? rect.x + diffX / 2 : rect.x,\n\t\t\ty: rect.height < minHeight ? rect.y + diffY / 2 : rect.y\n\t\t};\n\t},\n\t/**\n\t* Return false if any point is not inside or on the provided rect.\n\t* @internal\n\t*/\n\tanyPointsOutsideRect: (rect, ps) => {\n\t\tconst rectMinX = Rect.minX(rect);\n\t\tconst rectMinY = Rect.minY(rect);\n\t\tconst rectMaxX = Rect.maxX(rect);\n\t\tconst rectMaxY = Rect.maxY(rect);\n\t\tfor (const point of ps) {\n\t\t\tif (point.x < rectMinX || point.x > rectMaxX) return true;\n\t\t\tif (point.y < rectMinY || point.y > rectMaxY) return true;\n\t\t}\n\t\treturn false;\n\t},\n\t/**\n\t* Returns the four edges of a rect as lines in the order of top, right, bottom, left.\n\t* @internal\n\t*/\n\tedges: (rect) => {\n\t\tconst [tl, tr, br, bl] = Rect.cornerPoints(rect);\n\t\treturn [\n\t\t\tLine(tl, tr),\n\t\t\tLine(tr, br),\n\t\t\tLine(br, bl),\n\t\t\tLine(bl, tl)\n\t\t];\n\t},\n\t/**\n\t* Return a new rect projected into a new position based on the anchor rect and the given direction/alignment.\n\t* @internal\n\t*/\n\trebaseRectOnto: (rect, anchorRect, direction, alignment) => {\n\t\tconst rebasedRect = { ...rect };\n\t\tswitch (direction) {\n\t\t\tcase \"bottom\":\n\t\t\tcase \"top\":\n\t\t\t\tswitch (alignment) {\n\t\t\t\t\tcase \"start\":\n\t\t\t\t\t\trebasedRect.x = anchorRect.x;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"center\":\n\t\t\t\t\t\trebasedRect.x = anchorRect.x + anchorRect.width / 2 - rect.width / 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"end\":\n\t\t\t\t\t\trebasedRect.x = anchorRect.x + anchorRect.width - rect.width;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: assertNever$1(alignment);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"left\":\n\t\t\t\trebasedRect.x = anchorRect.x - rect.width;\n\t\t\t\tbreak;\n\t\t\tcase \"right\":\n\t\t\t\trebasedRect.x = anchorRect.x + anchorRect.width;\n\t\t\t\tbreak;\n\t\t\tdefault: assertNever$1(direction);\n\t\t}\n\t\tswitch (direction) {\n\t\t\tcase \"left\":\n\t\t\tcase \"right\":\n\t\t\t\tswitch (alignment) {\n\t\t\t\t\tcase \"start\":\n\t\t\t\t\t\trebasedRect.y = anchorRect.y;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"center\":\n\t\t\t\t\t\trebasedRect.y = anchorRect.y + anchorRect.height / 2 - rect.height / 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"end\":\n\t\t\t\t\t\trebasedRect.y = anchorRect.y + anchorRect.height - rect.height;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: assertNever$1(alignment);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"top\":\n\t\t\t\trebasedRect.y = anchorRect.y - rect.height;\n\t\t\t\tbreak;\n\t\t\tcase \"bottom\":\n\t\t\t\trebasedRect.y = anchorRect.y + anchorRect.height;\n\t\t\t\tbreak;\n\t\t\tdefault: assertNever$1(direction);\n\t\t}\n\t\treturn rebasedRect;\n\t},\n\t/**\n\t* Constrain a rect to a bound, offsetting its position to make the rect fit within the bound.\n\t* @internal\n\t*/\n\tconstrain: (rect, bound) => {\n\t\tif (!bound) return rect;\n\t\tlet y = Math.max(rect.y, bound.y);\n\t\ty = Math.min(y, bound.y + bound.height - rect.height);\n\t\tlet x = Math.max(rect.x, bound.x);\n\t\tx = Math.min(x, bound.x + bound.width - rect.width);\n\t\treturn {\n\t\t\tx,\n\t\t\ty,\n\t\t\twidth: rect.width,\n\t\t\theight: rect.height\n\t\t};\n\t},\n\t/**\n\t* Finds the closest edge of a rect to a point. Note that this does not check perpendicular\n\t* distances, so it might not be the technically closest edge, but rather a close approximation\n\t* or the visually closest edge. It achieves this by drawing a line from the center of the rect\n\t* to the point and checking if it intersects with any of the edges. Returns undefined if no\n\t* edge is intersected (e.g., if the point is inside the rect).\n\t* @internal\n\t*/\n\tclosestEdge: (rect, point) => {\n\t\tconst center = Rect.center(rect);\n\t\tconst pointToCenterLine = Line(point, center);\n\t\tconst edges = Rect.edges(rect);\n\t\tfor (let i = 0; i < edges.length; i++) {\n\t\t\tconst edge = edges[i];\n\t\t\tif (!edge) continue;\n\t\t\tif (Line.intersection(pointToCenterLine, edge, true)) {\n\t\t\t\tconst name = edgesInOrder[i];\n\t\t\t\tassert$1(name, () => `Invalid edge name: ${JSON.stringify(edgesInOrder)}`);\n\t\t\t\treturn {\n\t\t\t\t\tedge,\n\t\t\t\t\tname\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t},\n\t/** @internal */\n\tclosestRect: (rects, point) => {\n\t\tlet index = 0;\n\t\tlet rect = rects[0];\n\t\tassert$1(rect, \"Rect array is empty\");\n\t\tlet distance = Rect.pointDistance(rect, point);\n\t\tfor (let candidateIndex = 1; candidateIndex < rects.length; candidateIndex += 1) {\n\t\t\tconst candidateRect = rects[candidateIndex];\n\t\t\tassert$1(candidateRect);\n\t\t\tconst candidateDistance = Rect.pointDistance(candidateRect, point);\n\t\t\tif (candidateDistance < distance) {\n\t\t\t\tindex = candidateIndex;\n\t\t\t\trect = candidateRect;\n\t\t\t\tdistance = candidateDistance;\n\t\t\t}\n\t\t\tif (distance === 0) break;\n\t\t}\n\t\treturn {\n\t\t\trect,\n\t\t\tindex\n\t\t};\n\t}\n};\nconst edgesInOrder = [\n\t\"top\",\n\t\"right\",\n\t\"bottom\",\n\t\"left\"\n];\n\n//#endregion\n//#region ../../library/src/render/types/Constraints.ts\nconst constraintDefaults = {\n\tleft: null,\n\tright: null,\n\ttop: null,\n\tbottom: null,\n\tcenterX: \"50%\",\n\tcenterY: \"50%\",\n\taspectRatio: null,\n\tparentSize: null,\n\twidth: 100,\n\theight: 100\n};\n/** @internal */\nlet DimensionType = /* @__PURE__ */ function(DimensionType) {\n\tDimensionType[DimensionType[\"FixedNumber\"] = 0] = \"FixedNumber\";\n\tDimensionType[DimensionType[\"Percentage\"] = 1] = \"Percentage\";\n\t/** @internal */ DimensionType[DimensionType[\"Auto\"] = 2] = \"Auto\";\n\tDimensionType[DimensionType[\"FractionOfFreeSpace\"] = 3] = \"FractionOfFreeSpace\";\n\tDimensionType[DimensionType[\"Viewport\"] = 4] = \"Viewport\";\n\t/** @internal */\n\tDimensionType[DimensionType[\"FitImage\"] = 5] = \"FitImage\";\n\treturn DimensionType;\n}({});\nfunction isAutoDimensionType(dimensionType) {\n\tif (isUndefined(dimensionType)) return false;\n\treturn dimensionType === 2 || dimensionType === 5;\n}\nfunction isConstraintSupportingChild(child) {\n\tif (!isReactChild(child) || !isReactElement(child)) return false;\n\treturn true;\n}\n/** @internal */\nconst ConstraintMask = { quickfix: (constraints) => {\n\tif (isAutoDimensionType(constraints.widthType) || isAutoDimensionType(constraints.heightType)) constraints.aspectRatio = null;\n\tif (isFiniteNumber(constraints.aspectRatio)) {\n\t\tif (constraints.left && constraints.right) constraints.widthType = 0;\n\t\tif (constraints.top && constraints.bottom) constraints.heightType = 0;\n\t\tif (constraints.left && constraints.right && constraints.top && constraints.bottom) constraints.bottom = false;\n\t\tif (constraints.widthType !== 0 && constraints.heightType !== 0) constraints.heightType = 0;\n\t}\n\tif (constraints.left && constraints.right) {\n\t\tif (constraints.fixedSize || isAutoDimensionType(constraints.widthType) || isFiniteNumber(constraints.maxWidth)) constraints.right = false;\n\t\tconstraints.widthType = 0;\n\t}\n\tif (constraints.top && constraints.bottom) {\n\t\tif (constraints.fixedSize || isAutoDimensionType(constraints.heightType) || isFiniteNumber(constraints.maxHeight)) constraints.bottom = false;\n\t\tconstraints.heightType = 0;\n\t}\n\treturn constraints;\n} };\n/** @internal */\nfunction valueToDimensionType(value) {\n\tif (typeof value === \"string\") {\n\t\tconst trimmedValue = value.trim();\n\t\tif (trimmedValue === \"auto\") return 2;\n\t\tif (trimmedValue.endsWith(\"fr\")) return 3;\n\t\tif (trimmedValue.endsWith(\"%\")) return 1;\n\t\tif (trimmedValue.endsWith(\"vw\") || trimmedValue.endsWith(\"vh\")) return 4;\n\t}\n\treturn 0;\n}\n/**\n* @internal\n*/\nconst ConstraintValues = {\n\tfromProperties: (props) => {\n\t\tconst { left, right, top, bottom, width, height, centerX, centerY, aspectRatio, autoSize } = props;\n\t\tconst constraints = ConstraintMask.quickfix({\n\t\t\tleft: isFiniteNumber(left) || isAnimatable(left),\n\t\t\tright: isFiniteNumber(right) || isAnimatable(right),\n\t\t\ttop: isFiniteNumber(top) || isAnimatable(top),\n\t\t\tbottom: isFiniteNumber(bottom) || isAnimatable(bottom),\n\t\t\twidthType: valueToDimensionType(width),\n\t\t\theightType: valueToDimensionType(height),\n\t\t\taspectRatio: aspectRatio || null,\n\t\t\tfixedSize: autoSize === true\n\t\t});\n\t\tlet widthValue = null;\n\t\tlet heightValue = null;\n\t\tlet widthType = 0;\n\t\tlet heightType = 0;\n\t\tif (constraints.widthType !== 0 && typeof width === \"string\") {\n\t\t\tconst parsedWidth = parseFloat(width);\n\t\t\tif (width.endsWith(\"fr\")) {\n\t\t\t\twidthType = 3;\n\t\t\t\twidthValue = parsedWidth;\n\t\t\t} else if (width === \"auto\") widthType = 2;\n\t\t\telse {\n\t\t\t\twidthType = 1;\n\t\t\t\twidthValue = parsedWidth / 100;\n\t\t\t}\n\t\t} else if (width !== void 0 && typeof width !== \"string\") widthValue = Animatable.getNumber(width);\n\t\tif (constraints.heightType !== 0 && typeof height === \"string\") {\n\t\t\tconst parsedHeight = parseFloat(height);\n\t\t\tif (height.endsWith(\"fr\")) {\n\t\t\t\theightType = 3;\n\t\t\t\theightValue = parsedHeight;\n\t\t\t} else if (height === \"auto\") heightType = 2;\n\t\t\telse {\n\t\t\t\theightType = 1;\n\t\t\t\theightValue = parseFloat(height) / 100;\n\t\t\t}\n\t\t} else if (height !== void 0 && typeof height !== \"string\") heightValue = Animatable.getNumber(height);\n\t\tlet centerAnchorX = .5;\n\t\tlet centerAnchorY = .5;\n\t\tif (centerX) centerAnchorX = parseFloat(centerX) / 100;\n\t\tif (centerY) centerAnchorY = parseFloat(centerY) / 100;\n\t\treturn {\n\t\t\tleft: constraints.left ? Animatable.getNumber(left) : null,\n\t\t\tright: constraints.right ? Animatable.getNumber(right) : null,\n\t\t\ttop: constraints.top ? Animatable.getNumber(top) : null,\n\t\t\tbottom: constraints.bottom ? Animatable.getNumber(bottom) : null,\n\t\t\twidthType,\n\t\t\theightType,\n\t\t\twidth: widthValue,\n\t\t\theight: heightValue,\n\t\t\taspectRatio: constraints.aspectRatio || null,\n\t\t\tcenterAnchorX,\n\t\t\tcenterAnchorY\n\t\t};\n\t},\n\ttoSize: (values, parentSizeInfo, autoSize, freeSpace) => {\n\t\tlet width = null;\n\t\tlet height = null;\n\t\tconst parentWidth = parentSizeInfo?.sizing ? Animatable.getNumber(parentSizeInfo?.sizing.width) : null;\n\t\tconst parentHeight = parentSizeInfo?.sizing ? Animatable.getNumber(parentSizeInfo?.sizing.height) : null;\n\t\tconst hOpposingPinsOffset = pinnedOffset(values.left, values.right);\n\t\tif (parentWidth && isFiniteNumber(hOpposingPinsOffset)) width = parentWidth - hOpposingPinsOffset;\n\t\telse if (autoSize && isAutoDimensionType(values.widthType)) width = autoSize.width;\n\t\telse if (isFiniteNumber(values.width)) switch (values.widthType) {\n\t\t\tcase 0:\n\t\t\t\twidth = values.width;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\twidth = freeSpace ? freeSpace.freeSpaceInParent.width / freeSpace.freeSpaceUnitDivisor.width * values.width : null;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\tcase 4:\n\t\t\t\tif (parentWidth) width = parentWidth * values.width;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\tcase 5: break;\n\t\t\tdefault: assertNever$1(values.widthType);\n\t\t}\n\t\tconst vOpposingPinsOffset = pinnedOffset(values.top, values.bottom);\n\t\tif (parentHeight && isFiniteNumber(vOpposingPinsOffset)) height = parentHeight - vOpposingPinsOffset;\n\t\telse if (autoSize && isAutoDimensionType(values.heightType)) height = autoSize.height;\n\t\telse if (isFiniteNumber(values.height)) switch (values.heightType) {\n\t\t\tcase 0:\n\t\t\t\theight = values.height;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\theight = freeSpace ? freeSpace.freeSpaceInParent.height / freeSpace.freeSpaceUnitDivisor.height * values.height : null;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\tcase 4:\n\t\t\t\tif (parentHeight) height = parentHeight * values.height;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\tcase 5: break;\n\t\t\tdefault: assertNever$1(values.heightType);\n\t\t}\n\t\treturn sizeAfterApplyingConstraintsAndAspectRatio(width, height, values, {\n\t\t\theight: parentHeight ?? 0,\n\t\t\twidth: parentWidth ?? 0\n\t\t}, parentSizeInfo?.viewport);\n\t},\n\ttoRect: (values, parentSizeInfo = null, autoSize = null, pixelAlign = false, freeSpace = null) => {\n\t\tlet x = values.left || 0;\n\t\tlet y = values.top || 0;\n\t\tconst { width, height } = ConstraintValues.toSize(values, parentSizeInfo, autoSize, freeSpace);\n\t\tconst parentSizeForPositioning = parentSizeInfo?.positioning ?? null;\n\t\tconst positioningParentWidth = parentSizeForPositioning ? Animatable.getNumber(parentSizeForPositioning.width) : null;\n\t\tconst positioningParentHeight = parentSizeForPositioning ? Animatable.getNumber(parentSizeForPositioning.height) : null;\n\t\tif (values.left !== null) x = values.left;\n\t\telse if (positioningParentWidth && values.right !== null) x = positioningParentWidth - values.right - width;\n\t\telse if (positioningParentWidth) x = values.centerAnchorX * positioningParentWidth - width / 2;\n\t\tif (values.top !== null) y = values.top;\n\t\telse if (positioningParentHeight && values.bottom !== null) y = positioningParentHeight - values.bottom - height;\n\t\telse if (positioningParentHeight) y = values.centerAnchorY * positioningParentHeight - height / 2;\n\t\tconst f = {\n\t\t\tx,\n\t\t\ty,\n\t\t\twidth,\n\t\t\theight\n\t\t};\n\t\tif (pixelAlign) return Rect.pixelAligned(f);\n\t\treturn f;\n\t}\n};\nconst defaultWidth = 200;\nconst defaultHeight = 200;\nfunction getConstraintValue(constraint, value, parentSize, viewport) {\n\tif (typeof value === \"string\") {\n\t\tif (value.endsWith(\"%\") && parentSize) switch (constraint) {\n\t\t\tcase \"maxWidth\":\n\t\t\tcase \"minWidth\": return parseFloat(value) / 100 * parentSize.width;\n\t\t\tcase \"maxHeight\":\n\t\t\tcase \"minHeight\": return parseFloat(value) / 100 * parentSize.height;\n\t\t}\n\t\tif (value.endsWith(\"vh\")) {\n\t\t\tif (!viewport) return constraintValueForUncalculatedViewport(constraint);\n\t\t\tswitch (constraint) {\n\t\t\t\tcase \"maxWidth\":\n\t\t\t\tcase \"minWidth\": return parseFloat(value) / 100 * viewport.width;\n\t\t\t\tcase \"maxHeight\":\n\t\t\t\tcase \"minHeight\": return parseFloat(value) / 100 * viewport.height;\n\t\t\t}\n\t\t}\n\t\treturn parseFloat(value);\n\t}\n\treturn value;\n}\nfunction constraintValueForUncalculatedViewport(constraint) {\n\tswitch (constraint) {\n\t\tcase \"minWidth\":\n\t\tcase \"minHeight\": return Number.NEGATIVE_INFINITY;\n\t\tcase \"maxWidth\":\n\t\tcase \"maxHeight\": return Number.POSITIVE_INFINITY;\n\t\tdefault: assertNever$1(constraint, \"unknown constraint key\");\n\t}\n}\nfunction constrainHeight(height, values, parentSize, viewport) {\n\tif (values.minHeight) height = Math.max(getConstraintValue(\"minHeight\", values.minHeight, parentSize, viewport), height);\n\tif (values.maxHeight) height = Math.min(getConstraintValue(\"maxHeight\", values.maxHeight, parentSize, viewport), height);\n\treturn height;\n}\nfunction constrainWidth(width, values, parentSize, viewport) {\n\tif (values.minWidth) width = Math.max(getConstraintValue(\"minWidth\", values.minWidth, parentSize, viewport), width);\n\tif (values.maxWidth) width = Math.min(getConstraintValue(\"maxWidth\", values.maxWidth, parentSize, viewport), width);\n\treturn width;\n}\nfunction sizeAfterApplyingConstraintsAndAspectRatio(width, height, values, parentSize, viewport) {\n\tlet w = constrainWidth(isFiniteNumber(width) ? width : defaultWidth, values, parentSize, viewport);\n\tlet h = constrainHeight(isFiniteNumber(height) ? height : defaultHeight, values, parentSize, viewport);\n\tif (isFiniteNumber(values.aspectRatio) && values.aspectRatio > 0) {\n\t\tif (isFiniteNumber(values.left) && isFiniteNumber(values.right)) h = w / values.aspectRatio;\n\t\telse if (isFiniteNumber(values.top) && isFiniteNumber(values.bottom)) w = h * values.aspectRatio;\n\t\telse if (values.widthType !== 0) h = w / values.aspectRatio;\n\t\telse w = h * values.aspectRatio;\n\t}\n\treturn {\n\t\twidth: w,\n\t\theight: h\n\t};\n}\nfunction pinnedOffset(start, end) {\n\tif (!isFiniteNumber(start) || !isFiniteNumber(end)) return null;\n\treturn start + end;\n}\n\n//#endregion\n//#region ../../library/src/render/types/NewConstraints.tsx\nfunction containsInvalidStringValues(props) {\n\tif (typeof props.right === \"string\") return true;\n\tif (typeof props.bottom === \"string\") return true;\n\tif (typeof props.left === \"string\" && (!props.center || props.center === \"y\")) return true;\n\tif (typeof props.top === \"string\" && (!props.center || props.center === \"x\")) return true;\n\treturn false;\n}\n/** @internal */\nfunction constraintsEnabled(props) {\n\tif (!props._constraints) return false;\n\tif (containsInvalidStringValues(props)) return false;\n\treturn props._constraints.enabled;\n}\nfunction sizeFromFiniteNumberProps(props) {\n\tconst { size } = props;\n\tlet { width, height } = props;\n\tif (isFiniteNumber(size)) {\n\t\tif (width === void 0) width = size;\n\t\tif (height === void 0) height = size;\n\t}\n\tif (isFiniteNumber(width) && isFiniteNumber(height)) return {\n\t\twidth,\n\t\theight\n\t};\n\treturn null;\n}\nfunction rectFromFiniteNumberProps(props) {\n\tconst size = sizeFromFiniteNumberProps(props);\n\tif (size === null) return null;\n\tconst { left, top } = props;\n\tif (isFiniteNumber(left) && isFiniteNumber(top)) return {\n\t\tx: left,\n\t\ty: top,\n\t\t...size\n\t};\n\treturn null;\n}\n/** @internal */\nfunction calculateRect(props, parentSize, pixelAlign = true) {\n\tif (props.positionFixed || props.positionAbsolute) return null;\n\tconst parentSizeDisabled = parentSize === 1 || parentSize === 2;\n\tif (!constraintsEnabled(props) || parentSizeDisabled) return rectFromFiniteNumberProps(props);\n\tconst constraintValues = getConstraintValues(props);\n\tconst enabledParentSize = deprecatedParentSize(parentSize);\n\tconst parentSizeInfo = enabledParentSize ? {\n\t\tsizing: enabledParentSize,\n\t\tpositioning: enabledParentSize,\n\t\tviewport: null\n\t} : null;\n\treturn ConstraintValues.toRect(constraintValues, parentSizeInfo, null, pixelAlign, null);\n}\n/** @internal */\nfunction getConstraintValues(props) {\n\tconst { left, right, top, bottom, center, _constraints, size } = props;\n\tlet { width, height } = props;\n\tif (width === void 0) width = size;\n\tif (height === void 0) height = size;\n\tconst { aspectRatio, autoSize } = _constraints;\n\tconst constraintMask = ConstraintMask.quickfix({\n\t\tleft: isFiniteNumber(left),\n\t\tright: isFiniteNumber(right),\n\t\ttop: isFiniteNumber(top),\n\t\tbottom: isFiniteNumber(bottom),\n\t\twidthType: valueToDimensionType(width),\n\t\theightType: valueToDimensionType(height),\n\t\taspectRatio: aspectRatio || null,\n\t\tfixedSize: autoSize === true\n\t});\n\tlet widthValue = null;\n\tlet heightValue = null;\n\tlet widthType = 0;\n\tlet heightType = 0;\n\tif (constraintMask.widthType !== 0 && typeof width === \"string\") {\n\t\tconst parsedWidth = parseFloat(width);\n\t\tif (width.endsWith(\"fr\")) {\n\t\t\twidthType = 3;\n\t\t\twidthValue = parsedWidth;\n\t\t} else if (width === \"auto\") widthType = 2;\n\t\telse {\n\t\t\twidthType = 1;\n\t\t\twidthValue = parsedWidth / 100;\n\t\t}\n\t} else if (width !== void 0 && typeof width !== \"string\") widthValue = width;\n\tif (constraintMask.heightType !== 0 && typeof height === \"string\") {\n\t\tconst parsedHeight = parseFloat(height);\n\t\tif (height.endsWith(\"fr\")) {\n\t\t\theightType = 3;\n\t\t\theightValue = parsedHeight;\n\t\t} else if (height === \"auto\") heightType = 2;\n\t\telse {\n\t\t\theightType = 1;\n\t\t\theightValue = parseFloat(height) / 100;\n\t\t}\n\t} else if (height !== void 0 && typeof height !== \"string\") heightValue = height;\n\tlet centerAnchorX = .5;\n\tlet centerAnchorY = .5;\n\tif (center === true || center === \"x\") {\n\t\tconstraintMask.left = false;\n\t\tif (typeof left === \"string\") centerAnchorX = parseFloat(left) / 100;\n\t}\n\tif (center === true || center === \"y\") {\n\t\tconstraintMask.top = false;\n\t\tif (typeof top === \"string\") centerAnchorY = parseFloat(top) / 100;\n\t}\n\treturn {\n\t\tleft: constraintMask.left ? left : null,\n\t\tright: constraintMask.right ? right : null,\n\t\ttop: constraintMask.top ? top : null,\n\t\tbottom: constraintMask.bottom ? bottom : null,\n\t\twidthType,\n\t\theightType,\n\t\twidth: widthValue,\n\t\theight: heightValue,\n\t\taspectRatio: constraintMask.aspectRatio || null,\n\t\tcenterAnchorX,\n\t\tcenterAnchorY,\n\t\tminHeight: props.minHeight,\n\t\tmaxHeight: props.maxHeight,\n\t\tminWidth: props.minWidth,\n\t\tmaxWidth: props.maxWidth\n\t};\n}\nlet ParentSizeState = /* @__PURE__ */ function(ParentSizeState) {\n\tParentSizeState[ParentSizeState[\"Unknown\"] = 0] = \"Unknown\";\n\tParentSizeState[ParentSizeState[\"Disabled\"] = 1] = \"Disabled\";\n\tParentSizeState[ParentSizeState[\"DisabledForCurrentLevel\"] = 2] = \"DisabledForCurrentLevel\";\n\treturn ParentSizeState;\n}({});\nconst ConstraintsContext = /* @__PURE__ */ React.createContext({ parentSize: 0 });\nfunction deprecatedParentSize(parentSize) {\n\tif (parentSize === 0 || parentSize === 1 || parentSize === 2) return null;\n\treturn parentSize;\n}\n/** @internal */\nfunction useParentSize() {\n\treturn React.useContext(ConstraintsContext).parentSize;\n}\nfunction isSize(o) {\n\treturn typeof o === \"object\";\n}\n/** @internal */\nconst ProvideParentSize = (props) => {\n\tconst currentParentSize = useParentSize();\n\tconst { parentSize, children } = props;\n\tconst value = React.useMemo(() => ({ parentSize }), [getParentWidth(parentSize), getParentHeight(parentSize)]);\n\tif (currentParentSize === 1) return children ? /* @__PURE__ */ jsx(Fragment$1, { children }) : null;\n\treturn /* @__PURE__ */ jsx(ConstraintsContext.Provider, {\n\t\tvalue,\n\t\tchildren\n\t});\n};\nfunction getParentWidth(parentSize) {\n\treturn isSize(parentSize) ? parentSize.width : parentSize;\n}\nfunction getParentHeight(parentSize) {\n\treturn isSize(parentSize) ? parentSize.height : parentSize;\n}\nfunction useProvideParentSize(node, parentSize) {\n\treturn /* @__PURE__ */ jsx(ProvideParentSize, {\n\t\tparentSize,\n\t\tchildren: node\n\t});\n}\nfunction useConstraints(props) {\n\treturn calculateRect(props, useParentSize(), true);\n}\nfunction isAutoSized({ width, height }) {\n\treturn width === \"auto\" || width === \"min-content\" || height === \"auto\" || height === \"min-content\";\n}\n\n//#endregion\n//#region ../../library/src/render/utils/getIntrinsicSizeForBackgroundImage.ts\nfunction getIntrinsicSizeForBackgroundImage(background) {\n\tif (!background) return void 0;\n\tif (background.pixelHeight && background.pixelWidth) return {\n\t\twidth: background.pixelWidth,\n\t\theight: background.pixelHeight\n\t};\n\tif (background.src === void 0) return {\n\t\twidth: 1,\n\t\theight: 1\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/utils/htmlElementAsMotionComponent.ts\n/** Get a motion component based on a HTML element name, if undefined it will default to motion[\"div\"] */\nfunction htmlElementAsMotionComponent(asElem) {\n\treturn asElem && asElem !== \"search\" && asElem !== \"slot\" && asElem !== \"template\" ? motion[asElem] : motion[\"div\"];\n}\n\n//#endregion\n//#region ../../library/src/render/StyleSheetContext.ts\n/** @internal */\nconst StyleSheetContext = /* @__PURE__ */ React.createContext(void 0);\n\n//#endregion\n//#region ../../library/src/modules/cssEvaluationListener.ts\nlet listener;\nfunction hasCSSEvaluationListener() {\n\treturn listener !== void 0;\n}\nfunction reportEvaluatedCSS(serializationId, escapedCSS) {\n\tlistener?.(serializationId, escapedCSS);\n}\n\n//#endregion\n//#region ../../library/src/modules/withCSS.tsx\nconst framerPostSSRCSSSelector = \"style[data-framer-css-ssr-minified]\";\nconst componentsWithServerRenderedStyles = /* #__PURE__ */ (() => {\n\tif (!isBrowser$1()) return /* @__PURE__ */ new Set();\n\tconst componentsWithSSRStylesAttr = document.querySelector(framerPostSSRCSSSelector)?.getAttribute(\"data-framer-components\");\n\tif (!componentsWithSSRStylesAttr) return /* @__PURE__ */ new Set();\n\treturn new Set(componentsWithSSRStylesAttr.split(\" \"));\n})();\n/**\n* Marks <style> tags that are created by Framer and must be minified and moved to <head> during SSG.\n* We don’t minify and move non-Framer <style> tags because that’d cause hydration mismatches (e.g.\n* when a <style> tag is added by a code component.)\n*\n* @deprecated This is no longer used by withCSS, but we still use it tag some global styles.\n*\n* @internal\n*/\nconst framerCSSMarker = \"data-framer-css-ssr\";\nfunction currentCSSRenderTarget() {\n\tif (isScreenshotFramerHost()) return RenderTarget.preview;\n\treturn RenderTarget.current();\n}\n/**\n* Render a React component with css that will be injected into the document's\n* head when the component is first rendered. The escapedCSS argument can either\n* be a string where each line is a css rule, or an array of css rule strings.\n*\n* @public\n*/\nconst withCSS = (Component, escapedCSS, componentSerializationId) => {\n\tif (hasCSSEvaluationListener() && componentSerializationId !== void 0 && !isFunction(escapedCSS)) {\n\t\tconst rules = Array.isArray(escapedCSS) ? escapedCSS : escapedCSS.split(\"\\n\");\n\t\treportEvaluatedCSS(componentSerializationId, rules.filter(Boolean));\n\t}\n\treturn React.forwardRef((props, ref) => {\n\t\tconst { sheet, cache } = React.useContext(StyleSheetContext) ?? {};\n\t\tconst id = componentSerializationId;\n\t\tif (!isBrowser$1()) {\n\t\t\tif (isFunction(escapedCSS)) escapedCSS = escapedCSS(currentCSSRenderTarget(), props);\n\t\t\tconst concatenatedCSS = Array.isArray(escapedCSS) ? escapedCSS.join(\"\\n\") : escapedCSS;\n\t\t\tcssCollector.add(concatenatedCSS, id);\n\t\t}\n\t\tuseInsertionEffect(() => {\n\t\t\tif (id && componentsWithServerRenderedStyles.has(id)) return;\n\t\t\t(isFunction(escapedCSS) ? escapedCSS(currentCSSRenderTarget(), props) : Array.isArray(escapedCSS) ? escapedCSS : escapedCSS.split(\"\\n\")).forEach((rule) => rule && injectCSSRule(rule, sheet, cache));\n\t\t}, []);\n\t\treturn /* @__PURE__ */ jsx(Component, {\n\t\t\t...props,\n\t\t\tref\n\t\t});\n\t});\n};\nvar CSSCollector = class {\n\tstyles = /* @__PURE__ */ new Set();\n\tcomponentIds = /* @__PURE__ */ new Set();\n\tadd(css, componentId) {\n\t\tthis.styles.add(css);\n\t\tif (componentId) this.componentIds.add(componentId);\n\t}\n\tgetStyles() {\n\t\treturn this.styles;\n\t}\n\tgetComponentIds() {\n\t\treturn this.componentIds;\n\t}\n\tclear() {\n\t\tthis.styles.clear();\n\t\tthis.componentIds.clear();\n\t}\n};\nconst cssCollector = /* @__PURE__ */ new CSSCollector();\n\n//#endregion\n//#region ../../library/src/render/utils/injectComponentCSSRules.ts\nlet libraryCSSRules;\nlet getLoadedLibraryCSS;\n/**\n* SSG adds the library CSS to every page (see rewriteHTMLTemplate), so sites only need to load it when rendering\n* without SSG.\n*\n* @internal\n*/\nfunction loadLibraryCSSRules() {\n\treturn libraryCSSRules ??= import(\"./chunk.B3RYC8bk.mjs\").then((module) => {\n\t\tgetLoadedLibraryCSS = module.getCombinedCSSRules;\n\t\tif (isBrowser$1()) for (const rule of getLoadedLibraryCSS()) injectCSSRule(rule, void 0);\n\t\treturn module;\n\t});\n}\nfunction getLibraryCSS() {\n\tif (getLoadedLibraryCSS) return getLoadedLibraryCSS();\n\tif (isBrowser$1()) loadLibraryCSSRules();\n\treturn [];\n}\nfunction withLibraryCSS(Component) {\n\treturn withCSS(Component, getLibraryCSS, \"framer-lib-combinedCSSRules\");\n}\n\n//#endregion\n//#region ../../library/src/render/utils/layoutHintDataProps.ts\nconst isChrome = /* @__PURE__ */ isChrome$1();\n/** Collects centering and pixel offsets, including generated dynamic bindings for layout templates. */\nfunction collectLayoutHintDataProps(props, center, translation) {\n\tprops[\"data-framer-layout-hint-center-x\"] = center === true || center === \"x\" ? true : void 0;\n\tprops[\"data-framer-layout-hint-center-y\"] = center === true || center === \"y\" ? true : void 0;\n\tprops[\"data-framer-layout-hint-x\"] = translation?.x;\n\tprops[\"data-framer-layout-hint-y\"] = translation?.y;\n}\n/**\n* Describes the translations measurement must remove on the canvas. Pass center only\n* when a centering transform template is active, and style before layout-position\n* transforms are added. Chrome needs centering hints to resolve percentages against\n* the computed size; pixel offsets must be removed independently on every browser.\n*/\nfunction layoutHintDataProps(center, style) {\n\tconst props = {};\n\tif (RenderTarget.current() !== RenderTarget.canvas) return props;\n\tcollectLayoutHintDataProps(props, isChrome ? center : void 0, {\n\t\tx: typeof style?.x === \"number\" ? style.x : void 0,\n\t\ty: typeof style?.y === \"number\" ? style.y : void 0\n\t});\n\treturn props;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/nodeIdFromString.ts\n/** Copy of nodeIDFromString() in Vekter NodeID.ts module */\nfunction nodeIdFromString(str) {\n\treturn str.replace(/^id_/u, \"\").replace(/\\\\/gu, \"\");\n}\n\n//#endregion\n//#region ../../library/src/render/utils/performanceDebugging.ts\nfunction countNodeRender() {}\n\n//#endregion\n//#region ../../library/src/render/utils/processOverrideForwarding.ts\nfunction processOverrideForwarding(props, children) {\n\tif (!children) {\n\t\tchildren = props.children;\n\t\tif (!children) return {\n\t\t\tprops,\n\t\t\tchildren\n\t\t};\n\t}\n\tconst _forwardedOverrides = props._forwardedOverrides;\n\tif (!_forwardedOverrides) return {\n\t\tprops,\n\t\tchildren\n\t};\n\tchildren = React.Children.map(children, (child) => {\n\t\tif (!React.isValidElement(child)) return child;\n\t\treturn React.cloneElement(child, { _forwardedOverrides });\n\t});\n\treturn {\n\t\tprops,\n\t\tchildren\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/utils/transformTemplate.ts\n/** @public */\nfunction transformTemplate(center) {\n\treturn (_, generated) => {\n\t\tif (center === true) return `translate(-50%, -50%) ${generated}`;\n\t\telse if (center === \"x\") return `translateX(-50%) ${generated}`;\n\t\telse if (center === \"y\") return `translateY(-50%) ${generated}`;\n\t\treturn generated || \"none\";\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/utils/useLayoutId.ts\n/**\n* @internal\n*/\nfunction useLayoutId(props, { specificLayoutId, postfix } = {}) {\n\tconst { name, layoutIdKey, duplicatedFrom, __fromCodeComponentNode = false, drag } = props;\n\tconst { getLayoutId, enabled } = useContext(LayoutIdContext);\n\treturn useMemo(() => {\n\t\tif (!enabled) return props.layoutId;\n\t\tconst existingLayoutId = specificLayoutId || props.layoutId;\n\t\tif (!existingLayoutId) {\n\t\t\tif (drag || !layoutIdKey || __fromCodeComponentNode) return void 0;\n\t\t}\n\t\tconst layoutIdCandidate = existingLayoutId || getLayoutId({\n\t\t\tid: layoutIdKey,\n\t\t\tname,\n\t\t\tduplicatedFrom\n\t\t});\n\t\tif (!layoutIdCandidate) return void 0;\n\t\treturn postfix ? `${layoutIdCandidate}-${postfix}` : layoutIdCandidate;\n\t}, [enabled]);\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/ComponentContainerContext.tsx\n/**\n* React context used to determine if we're inside a code component.\n* @internal\n*/\nconst ComponentContainerContext = /* @__PURE__ */ React.createContext(false);\n\n//#endregion\n//#region ../../library/src/modules/useForceUpdate.ts\n/**\n* @public\n*/\nfunction useForceUpdate$2() {\n\tconst [_, setForcedRenderCount] = React.useState(0);\n\treturn React.useCallback(() => setForcedRenderCount((v) => v + 1), []);\n}\n\n//#endregion\n//#region ../../library/src/components/hoc/withMeasuredSize.tsx\nconst DEFAULT_SIZE = 200;\nvar SharedObserver = class {\n\tsharedResizeObserver;\n\tcallbacks = /* @__PURE__ */ new WeakMap();\n\tconstructor() {\n\t\tthis.sharedResizeObserver = new ResizeObserver(this.updateResizedElements.bind(this));\n\t}\n\tupdateResizedElements(entries) {\n\t\tfor (const entry of entries) {\n\t\t\tconst callbackForElement = this.callbacks.get(entry.target);\n\t\t\tif (callbackForElement) callbackForElement(entry.contentRect);\n\t\t}\n\t}\n\tobserveElementWithCallback(element, callback) {\n\t\tthis.sharedResizeObserver.observe(element);\n\t\tthis.callbacks.set(element, callback);\n\t}\n\tunobserve(element) {\n\t\tthis.sharedResizeObserver.unobserve(element);\n\t\tthis.callbacks.delete(element);\n\t}\n};\nconst sharedResizeObserver = /* @__PURE__ */ (() => isBrowser$1() ? new SharedObserver() : void 0)();\nfunction useRerenderOnResize(ref) {\n\tconst update = useForceUpdate$2();\n\tuseEffect(() => {\n\t\tconst element = ref?.current;\n\t\tif (!element) return;\n\t\tsharedResizeObserver?.observeElementWithCallback(ref.current, update);\n\t\treturn () => {\n\t\t\tsharedResizeObserver?.unobserve(element);\n\t\t};\n\t}, [ref, update]);\n}\n/**\n* Uses a globally shared resize observer, and returns an updated\n* size object when the element's size changes. This is the recommended way to\n* use a Resize Observer: https://github.com/WICG/resize-observer/issues/59.\n* @deprecated only used in the deprecated `withMeasuredSize` HoC\n*/\nfunction useMeasuredSize(ref) {\n\tconst forceUpdate = useForceUpdate$2();\n\tconst size = React.useRef(null);\n\tfunction updateSize(newSize) {\n\t\tif (newSize.width === 0 && newSize.height === 0) return;\n\t\tif (!size.current || newSize.height !== size.current.height || newSize.width !== size.current.width) {\n\t\t\tsize.current = {\n\t\t\t\twidth: newSize.width,\n\t\t\t\theight: newSize.height\n\t\t\t};\n\t\t\tforceUpdate();\n\t\t}\n\t}\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tif (!ref.current) return;\n\t\tconst { offsetWidth, offsetHeight } = ref.current;\n\t\tupdateSize({\n\t\t\twidth: offsetWidth,\n\t\t\theight: offsetHeight\n\t\t});\n\t\tsharedResizeObserver.observeElementWithCallback(ref.current, updateSize);\n\t\treturn () => {\n\t\t\tif (!ref.current) return;\n\t\t\tsharedResizeObserver.unobserve(ref.current);\n\t\t};\n\t}, []);\n\treturn size.current;\n}\n/**\n* @internal\n*/\nconst SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE = \"data-framer-size-compatibility-wrapper\";\n/**\n* A HoC to enhance code components that depend on being rendered with exact\n* width and height props with width and height props determined via a shared\n* ResizeObserver.\n*\n* @FIXME Do not depend on this HoC. The current plan is to turn it into a no-op\n* after a deprecation period. If we need to provide this functionality to\n* customers after we migrate to a modules-first ecosystem, then we can provide\n* a new copy of this HoC or the `useMeasuredSize` hook, and recommend use\n* without a module version, allowing everyone to share the same ResizeObserver\n* on a single canvas.\n*\n* @internal\n*/\nconst withMeasuredSize = (Component) => (props) => {\n\tconst ref = React.useRef(null);\n\tconst size = useMeasuredSize(ref);\n\tconst dataProps = { [SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE]: true };\n\tconst shouldRender = Boolean(size);\n\tconst fallbackWidth = props.width ?? DEFAULT_SIZE;\n\tconst fallbackHeight = props.height ?? DEFAULT_SIZE;\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\tstyle: {\n\t\t\twidth: \"100%\",\n\t\t\theight: \"100%\",\n\t\t\tpointerEvents: \"none\"\n\t\t},\n\t\tref,\n\t\t...dataProps,\n\t\tchildren: shouldRender && /* @__PURE__ */ jsx(Component, {\n\t\t\t...props,\n\t\t\twidth: size?.width ?? fallbackWidth,\n\t\t\theight: size?.height ?? fallbackHeight\n\t\t})\n\t});\n};\n\n//#endregion\n//#region ../../library/src/render/utils/getMeasurableCodeComponentChildren.ts\n/**\n* @internal\n*\n* Returns a plain array of references to all children, which should be\n* considered for content size calculations on this node (e.g. when running \"Fit\n* Content\" on it)\n*\n* @param element the element of the component container\n*/\nfunction getMeasurableCodeComponentChildren(element) {\n\treturn [...element.firstElementChild && element.firstElementChild.hasAttribute(\"data-framer-size-compatibility-wrapper\") ? element.firstElementChild.children : element.children].filter(isMeasurable).map(unwrapInlinedDisplayContents);\n}\n/**\n* Rough check if an element of a HTMLCollection has measurable layout (can be\n* rendered as anything other than \"display: none\") _without_ querying its\n* computed styles, because we want to avoid a style recalculation penalty.\n*\n* @param element an HTMLCollection node\n*/\nfunction isMeasurable(element) {\n\tif (element instanceof HTMLBaseElement || element instanceof HTMLHeadElement || element instanceof HTMLLinkElement || element instanceof HTMLMetaElement || element instanceof HTMLScriptElement || element instanceof HTMLStyleElement || element instanceof HTMLTitleElement) return false;\n\treturn element instanceof HTMLElement || element instanceof SVGElement;\n}\n/**\n* Checks if an element has \"display: contents\" in its inline styles, and if\n* yes, returns the first measurable descendant. We intentionally _only_ check\n* the inlined display style, because reading it should not cause a style recalc\n* and it covers the use cases we have right now - wrapper divs around smart\n* components.\n*\n* @param element\n* @returns\n*/\nfunction unwrapInlinedDisplayContents(element) {\n\tif (!(element instanceof HTMLElement)) return element;\n\tif (element.children.length === 0) return element;\n\tif (element.style.display !== \"contents\") return element;\n\tconst firstMeasurableChild = [...element.children].find(isMeasurable);\n\tif (firstMeasurableChild) return unwrapInlinedDisplayContents(firstMeasurableChild);\n\treturn element;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/useMeasureLayout.ts\n/**\n* Adds the element and its children to the layout measure queue\n*\n* @internal\n*/\nfunction useMeasureLayout(props, ref, getChildren = () => [], options = {}) {\n\tconst { id, visible, _needsMeasure } = props;\n\tconst { skipHook = false } = options;\n\tconst inCodeComponent = useContext(ComponentContainerContext);\n\tconst onCanvas = RenderTarget.current() === RenderTarget.canvas;\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tif (!onCanvas || inCodeComponent || skipHook) return;\n\t\tif (!(ref.current && id && visible && _needsMeasure)) return;\n\t\truntime.queueMeasureRequest(nodeIdFromString(id), ref.current, getChildren(ref.current));\n\t});\n}\n/**\n* Attempts to find the closest component container ancestor to a reference\n* element, and add a layout measure request for it. Used when an element inside\n* a code component has caused a layout shift outside of the normal render loop\n* (such as when fonts load), and needs to trigger a re-measure of its container.\n*\n* @param element\n* @internal\n*/\nfunction measureClosestComponentContainer(element) {\n\tconst container = element.closest(\"[data-framer-component-container]\");\n\tif (!container) return;\n\truntime.queueMeasureRequest(nodeIdFromString(container.id), container, getMeasurableCodeComponentChildren(container));\n}\n\n//#endregion\n//#region ../../library/src/render/utils/setLayerBacked.ts\n/**\n* This file contains a bunch of helpers to force browser to render elements\n* with layer backing (GPU accelleration)\n*/\n/**\n* The string in this smallValue is very specifically \"0.000001px\".\n*\n* - Safari before Catalina will change 1e-7 into 0.0000001px\n* - Safari in Catalina will change 0.0000001px into 1e-7\n*\n* So this value should be \"0.000001px\" (1e-6) and not smaller, because\n* otherwise it will break the string replacement for removing the translateZ\n* hack.\n*/\nconst smallValue = \"0.000001px\";\nconst translateZ = /* @__PURE__ */ (() => ` translateZ(${smallValue})`)();\nconst useTranslateZHack = /* @__PURE__ */ (() => isFramerX() || isSafari() || isTest())();\n/**\n* Forces layer backing during rendering with a motion style\n*/\nfunction forceLayerBackingWithMotionStyle(motionStyle) {\n\tmotionStyle.willChange = \"transform\";\n\tconst onCanvas = RenderTarget.current() === RenderTarget.canvas;\n\tif (useTranslateZHack && onCanvas) motionStyle.translateZ = smallValue;\n}\n/**\n* Forces layer backing during rendering with React's CSS properties\n*\n* @internal\n*/\nfunction forceLayerBackingWithCSSProperties(cssProperties) {\n\tcssProperties.willChange = \"transform\";\n\tsetTranslateZHack(cssProperties, true);\n}\n/**\n* Within Safari we can force gpu layers (avoid dumping them) by adding a small\n* translateZ value:\n* https://github.com/WebKit/webkit/blob/6ddbf54e861f9df5e0171422c32cc6173120f717/LayoutTests/compositing/layer-creation/compositing-policy.html#L23\n* So to prevent this memory heuristic to trigger, we also rig those layers with\n* a tiny translateZ property.\n*/\nfunction setTranslateZHack(style, enabled) {\n\tconst onCanvas = RenderTarget.current() === RenderTarget.canvas;\n\tif (!useTranslateZHack || !onCanvas) return;\n\tconst transform = isString(style.transform) ? style.transform || \"\" : \"\";\n\tif (enabled) {\n\t\tif (!transform.includes(translateZ)) style.transform = transform + translateZ;\n\t} else style.transform = transform.replace(translateZ, \"\");\n}\n\n//#endregion\n//#region ../../library/src/render/utils/useWebkitFixes.ts\n/** @internal */\nfunction resetSetStyle(element, key, toValue, microtask = true) {\n\tif (!element) return;\n\tconst style = asRecord(element.style);\n\tconst value = toValue ? toValue : style[key];\n\tconst reset = () => {\n\t\tif (!isValidCSSStyleValue(value)) return;\n\t\tstyle[key] = value;\n\t};\n\tstyle[key] = null;\n\tif (microtask) Promise.resolve().then(reset);\n\telse setTimeout(reset, 0);\n}\nfunction isValidCSSStyleValue(value) {\n\treturn isString(value) || isNumber(value) || isNull(value);\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Layer.tsx\n/** @public */\nconst Layer = /* @__PURE__ */ (() => {\n\tclass Layer extends Component {\n\t\tstatic defaultProps = {};\n\t\tstatic applyWillChange(props, style, usingMotionStyle) {\n\t\t\tif (props.willChangeTransform) {\n\t\t\t\tif (usingMotionStyle) forceLayerBackingWithMotionStyle(style);\n\t\t\t\telse forceLayerBackingWithCSSProperties(style);\n\t\t\t}\n\t\t}\n\t\t/** @private (Just using `private` breaks compilation unless using `stripInternal`) */\n\t\tlayerElement = null;\n\t\tsetLayerElement = (element) => {\n\t\t\tthis.layerElement = element;\n\t\t};\n\t\t/** @internal */\n\t\tshouldComponentUpdate(nextProps, nextState) {\n\t\t\treturn nextProps._needsMeasure || this.state !== nextState || !isEqual(this.props, nextProps);\n\t\t}\n\t\t/** @internal */\n\t\tcomponentDidUpdate(prevProps) {\n\t\t\tif (asRecord(this.props).clip && asRecord(this.props).radius === 0 && asRecord(prevProps).radius !== 0) resetSetStyle(this.layerElement, \"overflow\", \"hidden\", false);\n\t\t}\n\t}\n\treturn Layer;\n})();\n\n//#endregion\n//#region ../../library/src/utils/memoize.ts\nfunction manageCache(cache, maxEntries) {\n\tif (cache.size < maxEntries) return;\n\tlet i = Math.round(Math.random());\n\tfor (const key of cache.keys()) {\n\t\tif ((++i & 1) === 1) continue;\n\t\tcache.delete(key);\n\t}\n}\n/** @internal */\nfunction memoize(maxEntries, cache, key, create) {\n\tconst r = cache.get(key);\n\tif (r) return r;\n\tmanageCache(cache, maxEntries);\n\tconst g = create(key);\n\tcache.set(key, g);\n\treturn g;\n}\n\n//#endregion\n//#region ../../library/src/utils/string.ts\nconst hash = (value) => {\n\tlet hasher = 0, i, chr;\n\tif (value.length === 0) return hasher;\n\tfor (i = 0; i < value.length; i++) {\n\t\tchr = value.charCodeAt(i);\n\t\thasher = (hasher << 5) - hasher + chr;\n\t\thasher |= 0;\n\t}\n\treturn hasher;\n};\n\n//#endregion\n//#region ../../library/src/render/types/Color/ConvertColor.ts\n/**\n* @internal\n*/\nconst ConvertColor = {\n\thueRotate: (color, angle) => {\n\t\treturn Color.toHslString(Color.hueRotate(Color(color), angle));\n\t},\n\tsetAlpha: (color, alpha) => {\n\t\treturn Color.toRgbString(Color.alpha(Color(color), alpha));\n\t},\n\tgetAlpha: (color) => {\n\t\tconst obj = stringToObject(color);\n\t\treturn obj ? obj.a : 1;\n\t},\n\tmultiplyAlpha: (color, alpha) => {\n\t\treturn Color.toRgbString(Color.multiplyAlpha(Color(color), alpha));\n\t},\n\t/**\n\t* @internal\n\t*/\n\ttoHexValue: (color) => {\n\t\treturn Color.toHex(Color(color)).toUpperCase();\n\t},\n\ttoHex: (color) => {\n\t\treturn Color.toHexString(Color(color)).toUpperCase();\n\t},\n\ttoRgb: (color) => {\n\t\treturn Color.toRgb(Color(color));\n\t},\n\ttoRgbString: (color) => {\n\t\treturn Color.toRgbString(Color(color));\n\t},\n\ttoHSV: (color) => {\n\t\treturn Color.toHsv(Color(color));\n\t},\n\ttoHSL: (color) => {\n\t\treturn Color.toHsl(Color(color));\n\t},\n\ttoHslString: (color) => {\n\t\treturn Color.toHslString(Color(color));\n\t},\n\ttoHsvString: (color) => {\n\t\treturn Color.toHsvString(Color(color));\n\t},\n\thsvToHSLString: (hsv) => {\n\t\treturn Color.toHslString(Color(hsvToStr(hsv.h, hsv.s, hsv.v, hsv.a)));\n\t},\n\t/**\n\t* @internal\n\t*/\n\thsvToHexValue: (hsv) => {\n\t\treturn Color.toHex(Color(hsvToStr(hsv.h, hsv.s, hsv.v, hsv.a))).toUpperCase();\n\t},\n\thsvToHex: (hsv) => {\n\t\treturn Color.toHexString(Color(hsvToStr(hsv.h, hsv.s, hsv.v, hsv.a))).toUpperCase();\n\t},\n\thsvToRgbString: (hsv) => {\n\t\treturn Color.toRgbString(Color(hsvToStr(hsv.h, hsv.s, hsv.v, hsv.a)));\n\t},\n\thsvToString: (hsv) => {\n\t\treturn hsvToStr(hsv.h, hsv.s, hsv.v);\n\t},\n\trgbaToString: (color) => {\n\t\treturn Color.toRgbString(Color(color));\n\t},\n\t/**\n\t* @internal\n\t*/\n\trgbToHexValue: (color) => {\n\t\treturn Color.toHex(Color(color));\n\t},\n\trgbToHexString: (color) => {\n\t\treturn Color.toHexString(Color(color));\n\t},\n\thslToString: (color) => {\n\t\treturn Color.toHslString(Color(color));\n\t},\n\thslToRgbString: (color) => {\n\t\treturn Color.toRgbString(Color(color));\n\t},\n\ttoColorPickerSquare: (h) => {\n\t\treturn Color.toRgbString(Color({\n\t\t\th,\n\t\t\ts: 1,\n\t\t\tl: .5,\n\t\t\ta: 1\n\t\t}));\n\t},\n\tisValid: (color) => {\n\t\treturn Color(color).isValid !== false;\n\t},\n\tequals: (a, b) => {\n\t\tif (Color.isP3String(a) || Color.isP3String(b)) return a === b;\n\t\tif (typeof a === \"string\") a = Color(a);\n\t\tif (typeof b === \"string\") b = Color(b);\n\t\treturn Color.equal(a, b);\n\t},\n\ttoHexOrRgbaString: (input) => {\n\t\tconst color = Color(input);\n\t\treturn color.a !== 1 ? Color.toRgbString(color) : Color.toHexString(color);\n\t},\n\t/**\n\t* Converts a color to a string to consistent formats for animating.\n\t*/\n\ttoFormatString: (color) => {\n\t\tif (Color.isP3String(color)) return color;\n\t\treturn Color.toRgbString(Color(color));\n\t}\n};\n\n//#endregion\n//#region ../../library/src/render/utils/gradientColorStops.ts\nconst CSSVariableRegExp = /var\\(.+\\)/u;\nconst colorCache = /* @__PURE__ */ new Map();\nfunction cachedMultiplyAlpha(s, a) {\n\tconst key = [s, a];\n\tif (CSSVariableRegExp.test(s)) return s;\n\treturn memoize(1e3, colorCache, key, () => ConvertColor.multiplyAlpha(s, a));\n}\n/**\n* @param alpha - is optional because SVGs define the alpha as a seperate property\n* @internal\n*/\nfunction gradientColorStops(gradient, alpha = 1) {\n\tlet stops;\n\tif (\"stops\" in gradient) stops = gradient.stops;\n\telse stops = [{\n\t\tvalue: gradient.start,\n\t\tposition: 0\n\t}, {\n\t\tvalue: gradient.end,\n\t\tposition: 1\n\t}];\n\tif (alpha === 1) return stops;\n\telse return stops.map((stop) => ({\n\t\t...stop,\n\t\tvalue: cachedMultiplyAlpha(stop.value, alpha)\n\t}));\n}\nfunction gradientColorStopsHash(gradient, alpha) {\n\tlet result = 0;\n\tgradientColorStops(gradient, alpha).forEach((stop) => {\n\t\tresult ^= hash(stop.value) ^ stop.position;\n\t});\n\treturn result;\n}\n\n//#endregion\n//#region ../../library/src/render/types/MultiStopGradient.ts\nconst multiStopGradientKeys = [\"stops\"];\nfunction isMultiStopGradient(value) {\n\treturn value && multiStopGradientKeys.every((key) => key in value);\n}\n\n//#endregion\n//#region ../../library/src/render/types/SimpleGradient.ts\nconst simpleGradientKeys = [\"start\", \"end\"];\nfunction isSimpleGradient(value) {\n\treturn value && simpleGradientKeys.every((key) => key in value);\n}\n\n//#endregion\n//#region ../../library/src/render/types/LinearGradient.ts\nconst linearGradientKeys = [\"angle\", \"alpha\"];\n/**\n* @public\n*/\nconst LinearGradient = {\n\t/**\n\t* @param value -\n\t*/\n\tisLinearGradient: (value) => {\n\t\treturn isObject$1(value) && linearGradientKeys.every((key) => key in value) && (isSimpleGradient(value) || isMultiStopGradient(value));\n\t},\n\t/** @internal */\n\thash: (linearGradient) => {\n\t\treturn linearGradient.angle ^ gradientColorStopsHash(linearGradient, linearGradient.alpha);\n\t},\n\t/** @internal */\n\ttoCSS: (linearGradient, overrideAngle, getStopValue) => {\n\t\tconst stops = gradientColorStops(linearGradient, linearGradient.alpha);\n\t\tconst angle = overrideAngle !== void 0 ? overrideAngle : linearGradient.angle;\n\t\treturn `linear-gradient(${Math.round(angle)}deg, ${stops.map((stop) => `${getStopValue?.(stop.value) ?? stop.value} ${stop.position * 100}%`).join(\", \")})`;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/render/types/RadialGradient.ts\nconst radialGradientKeys = [\n\t\"widthFactor\",\n\t\"heightFactor\",\n\t\"centerAnchorX\",\n\t\"centerAnchorY\",\n\t\"alpha\"\n];\n/**\n* @public\n*/\nconst RadialGradient = {\n\t/**\n\t* @param value -\n\t* @public\n\t*/\n\tisRadialGradient: (value) => {\n\t\treturn isObject$1(value) && radialGradientKeys.every((key) => key in value) && (isSimpleGradient(value) || isMultiStopGradient(value));\n\t},\n\t/** @internal */\n\thash: (radialGradient) => {\n\t\treturn radialGradient.centerAnchorX ^ radialGradient.centerAnchorY ^ radialGradient.widthFactor ^ radialGradient.heightFactor ^ gradientColorStopsHash(radialGradient, radialGradient.alpha);\n\t},\n\t/** @internal */\n\ttoCSS: (radialGradient, getStopValue) => {\n\t\tconst { alpha, widthFactor, heightFactor, centerAnchorX, centerAnchorY } = radialGradient;\n\t\tconst stops = gradientColorStops(radialGradient, alpha);\n\t\tconst cssStops = stops.map((stop, index) => {\n\t\t\tconst nextStop = stops[index + 1];\n\t\t\tconst position = stop.position === 1 && nextStop?.position === 1 ? stop.position - 1e-4 : stop.position;\n\t\t\treturn `${getStopValue?.(stop.value) ?? stop.value} ${position * 100}%`;\n\t\t});\n\t\treturn `radial-gradient(${widthFactor * 100}% ${heightFactor * 100}% at ${centerAnchorX * 100}% ${centerAnchorY * 100}%, ${cssStops.join(\", \")})`;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/render/traits/Background.ts\nfunction collectBackgroundFromProps({ background, backgroundColor }, style) {\n\tif (backgroundColor) {\n\t\tif (typeof backgroundColor === \"string\" || isMotionValue(backgroundColor)) style.backgroundColor = backgroundColor;\n\t\telse if (Color.isColorObject(background)) style.backgroundColor = background.initialValue || Color.toRgbString(background);\n\t} else if (background) {\n\t\tbackground = Animatable.get(background, null);\n\t\tif (typeof background === \"string\" || isMotionValue(background)) style.background = background;\n\t\telse if (LinearGradient.isLinearGradient(background)) style.background = LinearGradient.toCSS(background);\n\t\telse if (RadialGradient.isRadialGradient(background)) style.background = RadialGradient.toCSS(background);\n\t\telse if (Color.isColorObject(background)) style.backgroundColor = background.initialValue || Color.toRgbString(background);\n\t}\n}\n\n//#endregion\n//#region ../../library/src/render/utils/extractStyleFromProps.ts\nfunction extractStyleFromProps(props, name, styleRef, into) {\n\tif (into === void 0) into = name;\n\tif (props[name] !== void 0) {\n\t\tstyleRef[into] = props[name];\n\t\treturn;\n\t}\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Frame/getStyleForFrameProps.ts\nfunction hasLeftAndRight(style) {\n\tif (!style) return false;\n\treturn style.left !== void 0 && style.right !== void 0;\n}\nfunction hasTopAndBottom(style) {\n\tif (!style) return false;\n\treturn style.top !== void 0 && style.bottom !== void 0;\n}\nfunction getStyleForFrameProps(props) {\n\tif (!props) return {};\n\tconst style = {};\n\tif (props.preserve3d === true) style.transformStyle = \"preserve-3d\";\n\telse if (props.preserve3d === false) style.transformStyle = \"flat\";\n\tif (props.backfaceVisible === true) style.backfaceVisibility = \"visible\";\n\telse if (props.backfaceVisible === false) style.backfaceVisibility = \"hidden\";\n\tif (style.backfaceVisibility) style.WebkitBackfaceVisibility = style.backfaceVisibility;\n\tif (props.perspective !== void 0) style.perspective = style.WebkitPerspective = props.perspective;\n\tif (!props.__fromCanvasComponent) {\n\t\tif (props.center === true) {\n\t\t\tstyle.left = \"50%\";\n\t\t\tstyle.top = \"50%\";\n\t\t} else if (props.center === \"x\") style.left = \"50%\";\n\t\telse if (props.center === \"y\") style.top = \"50%\";\n\t}\n\tconst { cornerShape } = props;\n\tif (isMotionValue$1(cornerShape)) style.cornerShape = transformValue(() => `superellipse(${cornerShape.get()})`);\n\telse if (cornerShape !== void 0) style.cornerShape = `superellipse(${cornerShape})`;\n\textractStyleFromProps(props, \"size\", style);\n\textractStyleFromProps(props, \"width\", style);\n\textractStyleFromProps(props, \"height\", style);\n\textractStyleFromProps(props, \"minWidth\", style);\n\textractStyleFromProps(props, \"minHeight\", style);\n\textractStyleFromProps(props, \"top\", style);\n\textractStyleFromProps(props, \"right\", style);\n\textractStyleFromProps(props, \"bottom\", style);\n\textractStyleFromProps(props, \"left\", style);\n\textractStyleFromProps(props, \"position\", style);\n\textractStyleFromProps(props, \"overflow\", style);\n\textractStyleFromProps(props, \"opacity\", style);\n\tif (!props._border?.borderWidth) extractStyleFromProps(props, \"border\", style);\n\textractStyleFromProps(props, \"borderRadius\", style);\n\textractStyleFromProps(props, \"radius\", style, \"borderRadius\");\n\textractStyleFromProps(props, \"color\", style);\n\textractStyleFromProps(props, \"shadow\", style, \"boxShadow\");\n\textractStyleFromProps(props, \"x\", style);\n\textractStyleFromProps(props, \"y\", style);\n\textractStyleFromProps(props, \"z\", style);\n\textractStyleFromProps(props, \"rotate\", style);\n\textractStyleFromProps(props, \"rotateX\", style);\n\textractStyleFromProps(props, \"rotateY\", style);\n\textractStyleFromProps(props, \"rotateZ\", style);\n\textractStyleFromProps(props, \"scale\", style);\n\textractStyleFromProps(props, \"scaleX\", style);\n\textractStyleFromProps(props, \"scaleY\", style);\n\textractStyleFromProps(props, \"skew\", style);\n\textractStyleFromProps(props, \"skewX\", style);\n\textractStyleFromProps(props, \"skewY\", style);\n\textractStyleFromProps(props, \"originX\", style);\n\textractStyleFromProps(props, \"originY\", style);\n\textractStyleFromProps(props, \"originZ\", style);\n\tcollectBackgroundFromProps(props, style);\n\treturn style;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Frame/FrameWithMotion.tsx\nfunction hasEvents(props) {\n\tfor (const key in props) if (key === \"drag\" || key.startsWith(\"while\") || typeof asRecord(props)[key] === \"function\" && key.startsWith(\"on\") && !key.includes(\"Animation\")) return true;\n\treturn false;\n}\nconst pointerEvents = [\n\t\"onClick\",\n\t\"onDoubleClick\",\n\t\"onMouse\",\n\t\"onMouseDown\",\n\t\"onMouseUp\",\n\t\"onTapDown\",\n\t\"onTap\",\n\t\"onTapUp\",\n\t\"onPointer\",\n\t\"onPointerDown\",\n\t\"onPointerUp\",\n\t\"onTouch\",\n\t\"onTouchDown\",\n\t\"onTouchUp\"\n];\nconst pointerEventsSet = /* @__PURE__ */ (() => /* @__PURE__ */ new Set([...pointerEvents, ...pointerEvents.map((event) => `${event}Capture`)]))();\nfunction getCursorFromEvents(props) {\n\tif (props.drag) return \"grab\";\n\tfor (const key in props) if (pointerEventsSet.has(key)) return \"pointer\";\n}\nconst overflowKey = \"overflow\";\nfunction hasScrollableContent(props) {\n\tif (hasScrollingOverflow(props)) return true;\n\tif (!props.style) return false;\n\tif (hasScrollingOverflow(props.style)) return true;\n\treturn false;\n}\nfunction hasScrollingOverflow(props) {\n\tif (overflowKey in props && (props[overflowKey] === \"scroll\" || props[overflowKey] === \"auto\")) return true;\n\treturn false;\n}\n/** @internal */\nfunction unwrapFrameProps(frameProps) {\n\tconst { left, top, bottom, right, width, height, center, _constraints, size, widthType, heightType, positionFixed, positionAbsolute } = frameProps;\n\tconst minWidth = resolveMotionValue(frameProps.minWidth);\n\tconst minHeight = resolveMotionValue(frameProps.minHeight);\n\tconst maxWidth = resolveMotionValue(frameProps.maxWidth);\n\tconst maxHeight = resolveMotionValue(frameProps.maxHeight);\n\treturn {\n\t\ttop: resolveMotionValue(top),\n\t\tleft: resolveMotionValue(left),\n\t\tbottom: resolveMotionValue(bottom),\n\t\tright: resolveMotionValue(right),\n\t\twidth: resolveMotionValue(width),\n\t\theight: resolveMotionValue(height),\n\t\tsize: resolveMotionValue(size),\n\t\tcenter,\n\t\t_constraints,\n\t\twidthType,\n\t\theightType,\n\t\tpositionFixed,\n\t\tpositionAbsolute,\n\t\tminWidth,\n\t\tminHeight,\n\t\tmaxWidth,\n\t\tmaxHeight\n\t};\n}\nconst defaultFrameRect = {\n\tx: 0,\n\ty: 0,\n\twidth: 200,\n\theight: 200\n};\nfunction useStyleAndRect(props) {\n\tconst inCodeComponent = useContext(ComponentContainerContext);\n\tconst { style, _initialStyle, __fromCanvasComponent, size } = props;\n\tconst unwrappedProps = unwrapFrameProps(props);\n\tconst constraintsRect = useConstraints(unwrappedProps);\n\tconst defaultStyle = {\n\t\tdisplay: \"block\",\n\t\tflex: style?.flex ?? \"0 0 auto\",\n\t\tuserSelect: RenderTarget.current() !== RenderTarget.preview ? \"none\" : void 0\n\t};\n\tif (!props.__fromCanvasComponent) defaultStyle.backgroundColor = props.background === void 0 ? \"rgba(0, 170, 255, 0.3)\" : void 0;\n\tconst shouldDisablePointerEvents = !hasEvents(props) && !props.__fromCanvasComponent && !hasScrollableContent(props);\n\tconst safeToEditPointerEvents = props.style ? !(\"pointerEvents\" in props.style) : true;\n\tif (shouldDisablePointerEvents && safeToEditPointerEvents) defaultStyle.pointerEvents = \"none\";\n\tconst centerTextStyle = React.Children.count(props.children) > 0 && React.Children.toArray(props.children).every((child) => {\n\t\treturn typeof child === \"string\" || typeof child === \"number\";\n\t}) && {\n\t\tdisplay: \"flex\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\ttextAlign: \"center\"\n\t};\n\tconst propsStyle = getStyleForFrameProps(props);\n\tif (size === void 0 && !__fromCanvasComponent) {\n\t\tif (!hasLeftAndRight(propsStyle)) defaultStyle.width = defaultFrameRect.width;\n\t\tif (!hasTopAndBottom(propsStyle)) defaultStyle.height = defaultFrameRect.height;\n\t}\n\tif (unwrappedProps.minWidth !== void 0) defaultStyle.minWidth = unwrappedProps.minWidth;\n\tif (unwrappedProps.minHeight !== void 0) defaultStyle.minHeight = unwrappedProps.minHeight;\n\tlet constraintsStyle = {};\n\tif (constraintsEnabled(unwrappedProps)) {\n\t\tif (constraintsRect && !isAutoSized(props)) constraintsStyle = {\n\t\t\tleft: constraintsRect.x,\n\t\t\ttop: constraintsRect.y,\n\t\t\twidth: constraintsRect.width,\n\t\t\theight: constraintsRect.height,\n\t\t\tright: void 0,\n\t\t\tbottom: void 0\n\t\t};\n\t}\n\tObject.assign(defaultStyle, centerTextStyle, _initialStyle, propsStyle, constraintsStyle, style);\n\tObject.assign(defaultStyle, {\n\t\toverflowX: defaultStyle.overflowX ?? defaultStyle.overflow,\n\t\toverflowY: defaultStyle.overflowY ?? defaultStyle.overflow,\n\t\toverflow: void 0\n\t});\n\tLayer.applyWillChange(props, defaultStyle, true);\n\tlet resultStyle = defaultStyle;\n\tif (!defaultStyle.transform) resultStyle = {\n\t\tx: 0,\n\t\ty: 0,\n\t\t...defaultStyle\n\t};\n\tconst isRenderingStaticContent = isStaticRenderer();\n\tif (props.positionSticky) {\n\t\tif (!isRenderingStaticContent || runtime.isOnPageCanvas || inCodeComponent) {\n\t\t\tresultStyle.position = \"sticky\";\n\t\t\tresultStyle.willChange = \"transform\";\n\t\t\tresultStyle.top = props.positionStickyTop;\n\t\t\tresultStyle.right = props.positionStickyRight;\n\t\t\tresultStyle.bottom = props.positionStickyBottom;\n\t\t\tresultStyle.left = props.positionStickyLeft;\n\t\t}\n\t} else if (isRenderingStaticContent) {\n\t\tif (props.positionFixed) resultStyle.position = runtime.isOnPageCanvas ? \"fixed\" : \"absolute\";\n\t\telse if (props.positionAbsolute) resultStyle.position = \"absolute\";\n\t}\n\tif (\"rotate\" in resultStyle && resultStyle.rotate === void 0) delete resultStyle.rotate;\n\treturn [resultStyle, constraintsRect];\n}\nconst filteredProps = /* @__PURE__ */ new Set([\n\t\"width\",\n\t\"height\",\n\t\"opacity\",\n\t\"overflow\",\n\t\"radius\",\n\t\"background\",\n\t\"color\",\n\t\"x\",\n\t\"y\",\n\t\"z\",\n\t\"rotate\",\n\t\"rotateX\",\n\t\"rotateY\",\n\t\"rotateZ\",\n\t\"scale\",\n\t\"scaleX\",\n\t\"scaleY\",\n\t\"skew\",\n\t\"skewX\",\n\t\"skewY\",\n\t\"originX\",\n\t\"originY\",\n\t\"originZ\"\n]);\nfunction getMotionProps(props) {\n\tconst motionProps = {};\n\tfor (const key in props) if ((isValidMotionProp(key) || isPropValid(key)) && !filteredProps.has(key)) motionProps[key] = asRecord(props)[key];\n\telse if (key === \"positionTransition\" || key === \"layoutTransition\") {\n\t\t/** Support legacy layout animation props */\n\t\tmotionProps[\"layout\"] = true;\n\t\tif (typeof asRecord(props)[key] !== \"boolean\" && !props.transition) motionProps[\"transition\"] = asRecord(props)[key];\n\t}\n\treturn motionProps;\n}\nfunction hasDataFramerName(props) {\n\treturn \"data-framer-name\" in props;\n}\n/** @internal */\nconst VisibleFrame = /* @__PURE__ */ forwardRef(function VisibleFrame(props, forwardedRef) {\n\tconst { name, center, border, _border, __portal } = props;\n\tconst { props: propsWithOverrides, children } = processOverrideForwarding(props);\n\tconst motionProps = getMotionProps(propsWithOverrides);\n\tconst layoutId = useLayoutId(props);\n\tconst cursor = getCursorFromEvents(props);\n\tconst fallbackRef = useRef(null);\n\tconst ref = forwardedRef ?? fallbackRef;\n\tconst dataProps = {\n\t\t\"data-framer-component-type\": props.componentType ?? \"Frame\",\n\t\t\"data-framer-cursor\": cursor,\n\t\t\"data-framer-highlight\": cursor === \"pointer\" ? true : void 0,\n\t\t\"data-layoutid\": layoutId,\n\t\t\"data-framer-offset-parent-id\": asRecord(props)[\"data-framer-offset-parent-id\"]\n\t};\n\tif (!hasDataFramerName(props) && name) asRecord(dataProps)[\"data-framer-name\"] = name;\n\tconst [currentStyle, rect] = useStyleAndRect(propsWithOverrides);\n\tconst unwrappedProps = unwrapFrameProps(propsWithOverrides);\n\tconst autoSized = isAutoSized(unwrappedProps);\n\tconst centeringTransform = center && !(rect && !autoSized && constraintsEnabled(unwrappedProps)) ? center : void 0;\n\tif (centeringTransform) {\n\t\tif (!motionProps.transformTemplate) motionProps.transformTemplate = transformTemplate(center);\n\t} else if (!motionProps.transformTemplate) motionProps.transformTemplate = void 0;\n\tObject.assign(dataProps, layoutHintDataProps(centeringTransform, propsWithOverrides.style));\n\tuseMeasureLayout(props, ref);\n\tconst backgroundImage = backgroundImageFromProps(props);\n\tconst parentSize = resolveParentSize(propsWithOverrides, unwrappedProps, rect, useContext(ComponentContainerContext));\n\tconst wrappedContent = useProvideParentSize(/* @__PURE__ */ jsxs(Fragment$1, { children: [\n\t\tbackgroundImage ? /* @__PURE__ */ jsx(BackgroundImageComponent, {\n\t\t\talt: props.alt ?? \"\",\n\t\t\timage: backgroundImage,\n\t\t\tcontainerSize: rect ?? void 0,\n\t\t\tnodeId: props.id && nodeIdFromString(props.id),\n\t\t\tlayoutId\n\t\t}) : null,\n\t\tchildren,\n\t\t/* @__PURE__ */ jsx(Border, {\n\t\t\t..._border,\n\t\t\tborder,\n\t\t\tlayoutId\n\t\t})\n\t] }), parentSize);\n\tconst MotionComponent = htmlElementAsMotionComponent(props.as);\n\tconst intrinsicSize = getIntrinsicSizeForBackgroundImage(backgroundImage);\n\tif (props.fitImageDimension && intrinsicSize) {\n\t\tcurrentStyle[props.fitImageDimension] = \"auto\";\n\t\tcurrentStyle.aspectRatio = intrinsicSize.width / intrinsicSize.height;\n\t}\n\treturn /* @__PURE__ */ jsxs(MotionComponent, {\n\t\t...dataProps,\n\t\t...motionProps,\n\t\tlayoutId,\n\t\tstyle: currentStyle,\n\t\tref,\n\t\tchildren: [wrappedContent, __portal]\n\t});\n});\n/** @internal */\nconst FrameWithMotionInner = /* @__PURE__ */ forwardRef(function FrameWithMotion(props, ref) {\n\t/* @__PURE__ */ countNodeRender();\n\tconst { visible = true } = props;\n\tif (!visible) return null;\n\treturn /* @__PURE__ */ jsx(VisibleFrame, {\n\t\t...props,\n\t\tref\n\t});\n});\n/** @internal */\nconst FrameWithMotion = /* @__PURE__ */ withLibraryCSS(FrameWithMotionInner);\nfunction resolveParentSize(props, unwrappedProps, rect, inCodeComponent) {\n\tif (inCodeComponent) return rect ? {\n\t\twidth: rect.width,\n\t\theight: rect.height\n\t} : 1;\n\tconst { _usesDOMRect } = props;\n\tconst { widthType = 0, heightType = 0, width, height } = unwrappedProps;\n\tif (rect && !_usesDOMRect) return rect;\n\tif (widthType === 0 && heightType === 0 && typeof width === \"number\" && typeof height === \"number\") return {\n\t\twidth,\n\t\theight\n\t};\n\tif (_usesDOMRect || props.positionFixed || props.positionAbsolute) return 2;\n\treturn 0;\n}\n\n//#endregion\n//#region ../../library/src/components/EmptyState.tsx\n/** @internal */\nfunction EmptyState({ title = \"\", description = \"Click and drag the connector to any frame on the canvas →\", children, size, hide, insideUserCodeComponent = false, position = \"absolute\" }) {\n\tconst { target } = RenderEnvironment;\n\tconst childCount = React.Children.count(children);\n\tif (insideUserCodeComponent && childCount === 0) return /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\t...size,\n\t\t\"data-name\": \"placeholder\"\n\t});\n\tif (target !== RenderTarget.canvas) return null;\n\tif (hide) return null;\n\tif (childCount !== 0) return null;\n\treturn /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\tclassName: \"framerInternalUI-canvasPlaceholder\",\n\t\ttop: 0,\n\t\tleft: 0,\n\t\tbottom: 0,\n\t\tright: 0,\n\t\tstyle: {\n\t\t\tposition,\n\t\t\t...size\n\t\t},\n\t\tchildren: /* @__PURE__ */ jsx(\"div\", {\n\t\t\tstyle: {\n\t\t\t\tdisplay: \"flex\",\n\t\t\t\talignItems: \"center\",\n\t\t\t\tlineHeight: \"1.4\",\n\t\t\t\theight: \"100%\",\n\t\t\t\twidth: \"100%\"\n\t\t\t},\n\t\t\tchildren: /* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\talignItems: \"center\",\n\t\t\t\t\tjustifyContent: \"center\",\n\t\t\t\t\tflexDirection: \"column\",\n\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\tWebkitMaskImage: `linear-gradient(90deg, black, black calc(100% - 12px * ${scaleFactor}), transparent)`\n\t\t\t\t},\n\t\t\t\tchildren: [/* @__PURE__ */ jsx(Title, { children: title }), /* @__PURE__ */ jsx(Description, { children: description })]\n\t\t\t})\n\t\t})\n\t}, \"empty-state\");\n}\nconst scaleFactor = \"var(--framerInternalCanvas-canvasPlaceholderContentScaleFactor, 1)\";\nfunction Title({ children }) {\n\treturn /* @__PURE__ */ jsx(\"span\", {\n\t\tstyle: {\n\t\t\tdisplay: \"flex\",\n\t\t\tflexDirection: \"column\",\n\t\t\ttextAlign: \"center\",\n\t\t\tflexGrow: 1,\n\t\t\tflexShrink: 0,\n\t\t\tfontWeight: 600,\n\t\t\tmarginBottom: \"5px\"\n\t\t},\n\t\tchildren\n\t});\n}\nfunction Description({ children }) {\n\treturn /* @__PURE__ */ jsx(\"span\", {\n\t\tstyle: {\n\t\t\tdisplay: \"flex\",\n\t\t\tflexDirection: \"column\",\n\t\t\ttextAlign: \"center\",\n\t\t\tflexGrow: 1,\n\t\t\tflexShrink: 0,\n\t\t\tfontWeight: 400,\n\t\t\tmaxWidth: \"200px\"\n\t\t},\n\t\tchildren\n\t});\n}\n\n//#endregion\n//#region ../../library/src/components/AnimateLayout/SharedLayoutRoot.tsx\n/**\n* @internal\n*/\nconst TREE_ROOT_ID = \"__LAYOUT_TREE_ROOT\";\n/**\n* @internal\n*/\nconst SharedLayoutContext = /* @__PURE__ */ React.createContext({\n\tschedulePromoteTree: () => {},\n\tscheduleProjectionDidUpdate: () => {},\n\tinitLead: () => {}\n});\n/**\n* @internal\n* Orchestrates the promotion of the descendent SharedLayoutTrees:\n* 1. When a LayoutTree mounts as a lead, it will call `initLead` to set itself\n* as the current lead without scheduling a promotion (nodes are promoted on\n* mount automatically in Motion).\n*\n* 2. When a LayoutTree becomes the lead tree, it schedules a promotion in its\n* shouldComponentUpdate lifecycle method. SharedLayoutRoot will kickoff the\n* promotion in its getSnapshotBeforeUpdate lifecycle method, when all of its\n* descendent SharedLayoutTrees finish taking snapshots.\n*\n* 3. When a LayoutTree becomes the lead tree using an non-magic-motion\n* transition, we block its React render. SharedLayoutRoot will also schedule a\n* manual projection tree update to run later in its componentDidUpdate method\n* so that we could perform cleanups correctly.\n*/\nvar SharedLayoutRoot = class extends Component {\n\tshouldAnimate = false;\n\ttransition;\n\tlead;\n\tfollow;\n\tscheduledPromotion = false;\n\tscheduledDidUpdate = false;\n\tgetSnapshotBeforeUpdate() {\n\t\tif (!this.scheduledPromotion || !this.lead || !this.follow) return null;\n\t\tconst needsReset = this.lead?.layoutMaybeMutated && !this.shouldAnimate;\n\t\tthis.lead.projectionNodes.forEach((projectionNode) => {\n\t\t\tprojectionNode?.promote({\n\t\t\t\tneedsReset,\n\t\t\t\ttransition: this.shouldAnimate ? this.transition : void 0,\n\t\t\t\tpreserveFollowOpacity: projectionNode.options.layoutId === \"__LAYOUT_TREE_ROOT\" && !this.follow?.isExiting\n\t\t\t});\n\t\t});\n\t\tif (this.shouldAnimate) this.follow.layoutMaybeMutated = true;\n\t\telse this.scheduleProjectionDidUpdate();\n\t\tthis.lead.layoutMaybeMutated = false;\n\t\tthis.transition = void 0;\n\t\tthis.scheduledPromotion = false;\n\t\treturn null;\n\t}\n\tcomponentDidUpdate() {\n\t\tif (!this.lead) return null;\n\t\tif (this.scheduledDidUpdate) {\n\t\t\tthis.lead.rootProjectionNode?.root?.didUpdate();\n\t\t\tthis.scheduledDidUpdate = false;\n\t\t}\n\t}\n\tscheduleProjectionDidUpdate = () => {\n\t\tthis.scheduledDidUpdate = true;\n\t};\n\tschedulePromoteTree = (tree, transition, shouldAnimate) => {\n\t\tthis.follow = this.lead;\n\t\tthis.shouldAnimate = shouldAnimate;\n\t\tthis.lead = tree;\n\t\tthis.transition = transition;\n\t\tthis.scheduledPromotion = true;\n\t};\n\tinitLead = (tree, shouldAnimate) => {\n\t\tthis.follow = this.lead;\n\t\tthis.lead = tree;\n\t\tif (this.follow && shouldAnimate) this.follow.layoutMaybeMutated = true;\n\t};\n\tsharedLayoutContext = {\n\t\tschedulePromoteTree: this.schedulePromoteTree,\n\t\tscheduleProjectionDidUpdate: this.scheduleProjectionDidUpdate,\n\t\tinitLead: this.initLead\n\t};\n\trender() {\n\t\treturn /* @__PURE__ */ jsx(SharedLayoutContext.Provider, {\n\t\t\tvalue: this.sharedLayoutContext,\n\t\t\tchildren: this.props.children\n\t\t});\n\t}\n};\n\n//#endregion\n//#region ../../library/src/components/MagicMotionCrossfadeRoot.tsx\nconst rootStyles = {\n\twidth: \"100%\",\n\theight: \"100%\",\n\tbackgroundColor: \"none\"\n};\n/**\n* @internal\n* When performing a magic motion transition, if the two ground frames don't\n* have matching layoutId, we still want the roots to cross-fade into each other.\n* To implement this, we wrap the content of a navigation screen in a root\n* component that's using a constant layoutId.\n*/\nfunction MagicMotionCrossfadeRoot(props) {\n\treturn /* @__PURE__ */ jsx(motion.div, {\n\t\tlayoutId: TREE_ROOT_ID,\n\t\tstyle: rootStyles,\n\t\tchildren: props.children\n\t});\n}\n\n//#endregion\n//#region ../../library/src/components/utils/refHelper.ts\n/**\n* Sets the ref to the given value or calls any ref functions.\n*/\nfunction setRef(ref, value) {\n\tif (isFunction(ref)) ref(value);\n\telse if (isMutableRef(ref)) ref.current = value;\n}\nfunction isMutableRef(ref) {\n\treturn isObject$1(ref) && \"current\" in ref;\n}\nfunction refHasValue(ref) {\n\treturn isMutableRef(ref) && ref.current !== null;\n}\nfunction useStableRefWithObserver() {\n\tconst callbacks = useConstant(() => /* @__PURE__ */ new Set());\n\tconst cleanups = useConstant(() => /* @__PURE__ */ new Map());\n\treturn useConstant(() => (ref, refCallback) => {\n\t\treturn {\n\t\t\tget current() {\n\t\t\t\treturn ref.current;\n\t\t\t},\n\t\t\tset current(value) {\n\t\t\t\tif (value === ref.current) return;\n\t\t\t\tref.current = value;\n\t\t\t\tif (refCallback) refCallback(value);\n\t\t\t\tcleanups.forEach((cleanup, callback) => {\n\t\t\t\t\tif (cleanup) cleanup();\n\t\t\t\t\telse callback(null);\n\t\t\t\t});\n\t\t\t\tif (value === null) {\n\t\t\t\t\tcleanups.clear();\n\t\t\t\t\tcallbacks.clear();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcallbacks.forEach((callback) => {\n\t\t\t\t\tconst cleanup = callback(value);\n\t\t\t\t\tcleanups.set(callback, cleanup);\n\t\t\t\t});\n\t\t\t},\n\t\t\t/**\n\t\t\t* Adds `fn` to the list of callbacks to be called when the ref is updated.\n\t\t\t* Executes `fn` immediately if the ref already has a value.\n\t\t\t*/\n\t\t\tobserve(fn) {\n\t\t\t\tcallbacks.add(fn);\n\t\t\t\tconst value = ref.current;\n\t\t\t\tif (value) {\n\t\t\t\t\tconst cleanup = fn(value);\n\t\t\t\t\tcleanups.set(fn, cleanup);\n\t\t\t\t}\n\t\t\t},\n\t\t\t/**\n\t\t\t* Removes `fn` from the list of callbacks.\n\t\t\t* Runs the cleanup for `fn` if it has been called before.\n\t\t\t*/\n\t\t\tunobserve(fn) {\n\t\t\t\tif (!fn) return;\n\t\t\t\tcallbacks.delete(fn);\n\t\t\t\tif (!cleanups.has(fn)) return;\n\t\t\t\tconst cleanupFn = cleanups.get(fn);\n\t\t\t\tif (cleanupFn) cleanupFn();\n\t\t\t\telse fn(null);\n\t\t\t\tcleanups.delete(fn);\n\t\t\t}\n\t\t};\n\t});\n}\n/**\n* Returns a ref-look-alike (current can be read and set as refs returned from `useRef`), but also allows multiple callbacks to be registered.\n* @see {@link useRefEffect} for a way to use the callback\n*/\nfunction useObserverRef(forwardedRef) {\n\tconst fallbackRef = useRef(null);\n\tconst createStableRefWithObserver = useStableRefWithObserver();\n\treturn useConstant(() => {\n\t\tif (isMutableRef(forwardedRef)) return createStableRefWithObserver(forwardedRef);\n\t\tif (isFunction(forwardedRef)) return createStableRefWithObserver(fallbackRef, forwardedRef);\n\t\treturn createStableRefWithObserver(fallbackRef);\n\t});\n}\n/**\n* Use this hook as replacement for `use(Layout)Effect` when dealing with refs in HOCs.\n* This is required, as `useEffect`s might run before the ref is attached (e.g. when a child is a Link component).\n*\n* Lifecycle:\n* - Callbacks are executed *before* (regular) layout effects. So if you want to replace `useEffect`, use the await-interaction-response pattern (so that it awaits a paint).\n* - `ref.current` updates (non-null): re-runs `effect`\n* - `ref.current` becomes null (on unmount): runs cleanup\n*\n* Cleanup if `effect` has at least run once:\n* - If `effect` it returned a function: the returned fn is called with `undefined` as parameter.\n* - If `effect` it returned undefined: `effect` is called with `null` as parameter.\n*\n* `deps` change: cleanup runs first, then the effect.\n*\n* @param ref Must stay a stable {@link useObserverRef} across renders.\n* @param effect Must be pure (calling effect+cleanup twice should yield the same result as calling it once). Not needed to be wrapped in `useCallback`.\n*/\nfunction useRefEffect(ref, effect, deps) {\n\tconst effectRef = useRef();\n\tconst depsChangedRef = useRef();\n\tuseMemoOne(() => {\n\t\tif (depsChangedRef.current !== void 0) depsChangedRef.current = true;\n\t}, deps ?? [{}]);\n\tif (!ref) return;\n\tif (depsChangedRef.current === false) return;\n\tdepsChangedRef.current = false;\n\tref.unobserve(effectRef.current);\n\tref.observe(effect);\n\teffectRef.current = effect;\n}\n\n//#endregion\n//#region ../../library/src/modules/useSharedIntersectionObserver.ts\nvar SharedIntersectionObserver = class {\n\tsharedIntersectionObserver;\n\tcallbacks = /* @__PURE__ */ new WeakMap();\n\tconstructor(options) {\n\t\tthis.sharedIntersectionObserver = new IntersectionObserver(this.intersectionObserverCallback.bind(this), options);\n\t}\n\tintersectionObserverCallback(entries, observer) {\n\t\tfor (const entry of entries) {\n\t\t\tconst callbackForElement = this.callbacks.get(entry.target);\n\t\t\tif (callbackForElement) callbackForElement(entry, observer);\n\t\t}\n\t}\n\tobserveElementWithCallback(element, callback) {\n\t\tif (!this.sharedIntersectionObserver) return;\n\t\tthis.sharedIntersectionObserver.observe(element);\n\t\tthis.callbacks.set(element, callback);\n\t}\n\tunobserve(element) {\n\t\tif (!this.sharedIntersectionObserver) return;\n\t\tthis.sharedIntersectionObserver.unobserve(element);\n\t\tthis.callbacks.delete(element);\n\t}\n\tget root() {\n\t\treturn this.sharedIntersectionObserver?.root;\n\t}\n};\nconst SharedIntersectionObserverContext = /* @__PURE__ */ createContext(/* @__PURE__ */ new Map());\nfunction observeElement(observers, key, element, root, callback, rootMargin, threshold) {\n\tlet observer = observers.get(key);\n\tif (!observer || observer.root !== root?.current) {\n\t\tobserver = new SharedIntersectionObserver({\n\t\t\troot: root?.current,\n\t\t\trootMargin,\n\t\t\tthreshold\n\t\t});\n\t\tobservers.set(key, observer);\n\t}\n\tobserver.observeElementWithCallback(element, callback);\n\treturn () => {\n\t\tobserver.unobserve(element);\n\t};\n}\n/**\n* This hook returns a ref callback that can be used to observe an element.\n* It returns a cleanup function that should be called when `element` becomes `null`.\n*\n* @important Does not re-register the observer if options or callback changes.\n* @internal\n*/\nfunction _useSharedIntersectionObserver(ref, callback, options) {\n\tconst key = useConstant(() => `${options.rootMargin}`);\n\tconst observers = useContext(SharedIntersectionObserverContext);\n\tconst { enabled, root, rootMargin, threshold } = options;\n\tuseRefEffect(ref, (element) => {\n\t\tif (!enabled) return;\n\t\tif (element === null) return;\n\t\treturn observeElement(observers, key, element, root, callback, rootMargin, threshold);\n\t}, [\n\t\tenabled,\n\t\tcallback,\n\t\troot,\n\t\trootMargin,\n\t\tthreshold\n\t]);\n}\n/**\n* If the client doesn't support the Intersection Observer we can save some performance.\n* @internal\n*/\nconst useSharedIntersectionObserver = typeof IntersectionObserver === \"undefined\" ? noop$5 : _useSharedIntersectionObserver;\n\n//#endregion\n//#region ../../library/src/modules/useAppearEffect.ts\n/**\n* Rather than rely on the intersectionRatio provided by an\n* IntersectionObserverEntry, we run the observer on every percent of\n* intersection, and calculate our own intersection percentage based purely off\n* of height.\n*/\nconst thresholds = /* @__PURE__ */ new Array(100).fill(void 0).map((_, i) => i * .01);\n/**\n* @internal\n*/\nconst ViewportContext = /* @__PURE__ */ React.createContext(null);\nfunction useAppearEffect(ref, appearCallback, options) {\n\tconst internalState = React.useRef({\n\t\tisInView: false,\n\t\thasAnimatedOnce: false\n\t});\n\tconst { enabled, animateOnce, threshold, rootMargin = `0px 0px 0px 0px` } = options;\n\tconst callback = React.useCallback((entry) => {\n\t\tconst { isInView, hasAnimatedOnce } = internalState.current;\n\t\tconst isIntersecting = isIntersectingWithThreshold(entry, threshold?.y ?? 0);\n\t\tif (isIntersecting && !isInView) {\n\t\t\tif (animateOnce && hasAnimatedOnce) return;\n\t\t\tinternalState.current.hasAnimatedOnce = true;\n\t\t\tinternalState.current.isInView = true;\n\t\t\tappearCallback(true);\n\t\t\treturn;\n\t\t}\n\t\tif (!isIntersecting && isInView) {\n\t\t\tinternalState.current.isInView = false;\n\t\t\tif (animateOnce) return;\n\t\t\tappearCallback(false);\n\t\t\treturn;\n\t\t}\n\t}, [\n\t\tanimateOnce,\n\t\tthreshold?.y,\n\t\tappearCallback\n\t]);\n\tuseSharedIntersectionObserver(ref, callback, {\n\t\tthreshold: thresholds,\n\t\trootMargin,\n\t\tenabled: enabled ?? true\n\t});\n}\n/**\n* Calculate the vertical intersection ratio, as a percentage of the target\n* element's height, or the window height, whichever is smaller. This ensures\n* that items that are larger than the size of the viewport are always able to\n* trigger the intersection at any threshold (0, 0.5 or 1).\n*/\nfunction calculatedIntersection(intersectionRect, boundingClientRect) {\n\tif (boundingClientRect.height === 0) return 0;\n\treturn intersectionRect.height / Math.min(boundingClientRect.height, safeWindow.innerHeight);\n}\nfunction isIntersectingWithThreshold({ boundingClientRect, intersectionRect, isIntersecting }, threshold) {\n\tif (boundingClientRect.height === 0) return isIntersecting;\n\treturn isIntersecting && calculatedIntersection(intersectionRect, boundingClientRect) >= threshold;\n}\n\n//#endregion\n//#region ../../library/src/components/AnimateLayout/SharedLayoutTree.tsx\n/**\n* @internal\n*/\nvar LayoutTree = class extends Component {\n\t/**\n\t* SharedLayoutTrees need to reset the projections styles previously applied\n\t* on their boxes if they are becoming lead but not animating.\n\t*/\n\tlayoutMaybeMutated = false;\n\t/**\n\t* A list of projection nodes in the tree\n\t*/\n\tprojectionNodes = /* @__PURE__ */ new Map();\n\t/**\n\t* The projection node with the smallest depth in the tree's children.\n\t*/\n\trootProjectionNode;\n\t/**\n\t* When a tree is tagged as being removed, either by usePresence, or by\n\t* Navigation, we set it on `this` in shouldComponentUpdate so that it's\n\t* accessible by SharedLayoutRoot before the LayoutTree has updated.\n\t*/\n\tisExiting;\n\tcomponentDidMount() {\n\t\t/**\n\t\t* Nodes are automatically promoted in Motion when they mount. We need\n\t\t* to let SharedLayoutRoot know about the first lead without scheduling\n\t\t* a promotion.\n\t\t*/\n\t\tif (this.props.isLead) this.props.sharedLayoutContext.initLead(this, !!this.props.animatesLayout);\n\t}\n\tshouldComponentUpdate(nextProps) {\n\t\tconst { isLead, isExiting, isOverlayed, animatesLayout, transition, sharedLayoutContext } = nextProps;\n\t\tthis.isExiting = isExiting;\n\t\t/**\n\t\t* Since Navigation wraps it's child NavigationContainers in a NavigationContainer,\n\t\t* we need to ensure that we don't prevent updates if we are not handling layout animations.\n\t\t*/\n\t\tif (isLead === void 0) return true;\n\t\tconst hasBecomeLead = !this.props.isLead && isLead;\n\t\tconst hasExitBeenCancelled = this.props.isExiting && !isExiting;\n\t\tconst shouldPromote = hasBecomeLead || hasExitBeenCancelled;\n\t\tconst shouldDemote = !!this.props.isLead && !isLead;\n\t\tconst overlayChanged = this.props.isOverlayed !== isOverlayed;\n\t\tif (shouldPromote || shouldDemote) this.projectionNodes.forEach((projection) => projection?.willUpdate());\n\t\tif (shouldPromote) sharedLayoutContext.schedulePromoteTree(this, transition, !!animatesLayout);\n\t\telse if (overlayChanged)\n /**\n\t\t* When performing an overlay transition, we block the layout update\n\t\t* in Motion, but we don't promote the tree since the lead doesn't\n\t\t* change. Therefore, we still need to schedule a didUpdate manually\n\t\t* to unblock the layout update for the next layout animation.\n\t\t*/\n\t\tsharedLayoutContext.scheduleProjectionDidUpdate();\n\t\treturn !!shouldPromote && !!animatesLayout;\n\t}\n\tshouldPreserveFollowOpacity = (child) => {\n\t\treturn child.options.layoutId === \"__LAYOUT_TREE_ROOT\" && !this.props.isExiting;\n\t};\n\tswitchLayoutGroupContext = {\n\t\tregister: (child) => this.addChild(child),\n\t\tderegister: (child) => this.removeChild(child),\n\t\ttransition: this.props.isLead !== void 0 && this.props.animatesLayout ? this.props.transition : void 0,\n\t\tshouldPreserveFollowOpacity: this.shouldPreserveFollowOpacity\n\t};\n\taddChild(child) {\n\t\tconst layoutId = child.options.layoutId;\n\t\tif (layoutId) {\n\t\t\tthis.projectionNodes.set(layoutId, child);\n\t\t\tthis.setRootChild(child);\n\t\t}\n\t}\n\t/**\n\t* As children are added, make sure that `this.rootProjectionNode` is always the\n\t* child with the smallest depth.\n\t*/\n\tsetRootChild(child) {\n\t\tif (!this.rootProjectionNode) return this.rootProjectionNode = child;\n\t\tthis.rootProjectionNode = this.rootProjectionNode.depth < child.depth ? this.rootProjectionNode : child;\n\t}\n\tremoveChild(child) {\n\t\tconst layoutId = child.options.layoutId;\n\t\tif (layoutId) this.projectionNodes.delete(layoutId);\n\t}\n\trender() {\n\t\treturn /* @__PURE__ */ jsx(SwitchLayoutGroupContext.Provider, {\n\t\t\tvalue: this.switchLayoutGroupContext,\n\t\t\tchildren: this.props.children\n\t\t});\n\t}\n};\nconst SharedLayoutTree = (props) => {\n\tconst sharedLayoutContext = React.useContext(SharedLayoutContext);\n\treturn /* @__PURE__ */ jsx(LayoutTree, {\n\t\t...props,\n\t\tsharedLayoutContext\n\t});\n};\n\n//#endregion\n//#region ../../library/src/components/NavigationContainerContext.tsx\n/**\n* @internal\n*/\nconst NavigationContainerContext = /* @__PURE__ */ React.createContext(true);\n/**\n* Used to know if a code component is a child of the current screen.\n* This can be useful for resetting timers or interactions that need to trigger on every navigation.\n* @public\n*/\nfunction useIsInCurrentNavigationTarget() {\n\treturn useContext(NavigationContainerContext);\n}\n\n//#endregion\n//#region ../../library/src/components/utils/useMap.ts\nfunction newMap() {\n\treturn /* @__PURE__ */ new Map();\n}\n/** Returns a constant instance of a Map */\nfunction useMap() {\n\treturn useConstant(newMap);\n}\n\n//#endregion\n//#region ../../library/src/components/NavigationTargetContext.tsx\nconst NavigationTargetContext = /* @__PURE__ */ createContext({\n\tregister: () => {},\n\tderegister: () => {}\n});\n/**\n* @internal\n*\n* Run the registered callback when the current navigation target changes\n* @param isCurrent If the ground node is present as the current target in the preview\n*/\nconst NavigationTargetWrapper = ({ isCurrent, isOverlayed, children }) => {\n\tconst callbacks = useMap();\n\tconst register = useCallback((fn) => {\n\t\tif (callbacks.has(fn)) {\n\t\t\tconsole.warn(\"NavigationTargetWrapper: already registered\");\n\t\t\treturn;\n\t\t}\n\t\tcallbacks.set(fn, void 0);\n\t}, [callbacks]);\n\tconst deregister = useCallback((fn) => {\n\t\tcallbacks.get(fn)?.();\n\t\tcallbacks.delete(fn);\n\t}, [callbacks]);\n\tconst value = useRef({\n\t\tregister,\n\t\tderegister\n\t}).current;\n\tuseEffect(() => {\n\t\tcallbacks.forEach((_, cb) => {\n\t\t\tconst newCleanup = cb(isCurrent, isOverlayed);\n\t\t\tcallbacks.set(cb, isFunction(newCleanup) ? newCleanup : void 0);\n\t\t});\n\t\treturn () => {\n\t\t\tcallbacks.forEach((cleanup, cb) => {\n\t\t\t\tif (!cleanup) return;\n\t\t\t\tcleanup();\n\t\t\t\tcallbacks.set(cb, void 0);\n\t\t\t});\n\t\t};\n\t}, [\n\t\tisCurrent,\n\t\tisOverlayed,\n\t\tcallbacks\n\t]);\n\treturn /* @__PURE__ */ jsx(NavigationTargetContext.Provider, {\n\t\tvalue,\n\t\tchildren\n\t});\n};\n/**\n* @internal\n*\n* Register the callback on mount to the NavigationTargetWrapper, deregister it on unmount.\n* The callback will be fired when the current target changes. The callback allows a cleanup callback to be returned.\n* The cleanup will fire before the next update and on unmount.\n* @param callback A callback that receives the `isCurrent` state of the NavigateTargetWrapper\n* @param deps If present, callback will be renewed when the dependencies change.\n*/\nfunction useOnCurrentTargetChange(callback, deps = []) {\n\tconst { register, deregister } = useContext(NavigationTargetContext);\n\tuseEffect(() => {\n\t\tif (!callback) return;\n\t\tregister(callback);\n\t\treturn () => deregister(callback);\n\t}, [\n\t\tregister,\n\t\tderegister,\n\t\t...deps\n\t]);\n}\n\n//#endregion\n//#region ../../library/src/components/NavigationContainer.tsx\nconst NavigationContainer = /* @__PURE__ */ React.memo(function NavigationContainer({ isLayeredContainer, isCurrent, isPrevious, isOverlayed = false, visible, transitionProps, children, backdropColor, onTapBackdrop, backfaceVisible, exitBackfaceVisible, animation, exitAnimation, instant, initialProps, exitProps, position = {\n\ttop: 0,\n\tright: 0,\n\tbottom: 0,\n\tleft: 0\n}, withMagicMotion, index, areMagicMotionLayersPresent, id, isInitial }) {\n\tconst animate = useAnimation();\n\tconst presence = useContext(PresenceContext);\n\tconst { persistLayoutIdCache } = useContext(LayoutIdContext);\n\tconst previousState = useRef({\n\t\twasCurrent: void 0,\n\t\twasPrevious: false,\n\t\twasBeingRemoved: false,\n\t\twasReset: true,\n\t\torigins: getOriginProps({}, initialProps, transitionProps)\n\t});\n\tconst viewportRef = useRef(null);\n\tconst isBeingRemoved = presence !== null && !presence.isPresent;\n\tif (isCurrent && previousState.current.wasCurrent === void 0) persistLayoutIdCache();\n\tuseEffect(() => {\n\t\tif (isLayeredContainer || !animate) return;\n\t\tif (isBeingRemoved) {\n\t\t\tpreviousState.current = {\n\t\t\t\t...previousState.current,\n\t\t\t\twasBeingRemoved: isBeingRemoved\n\t\t\t};\n\t\t\treturn;\n\t\t}\n\t\tconst { wasPrevious, wasCurrent } = previousState.current;\n\t\tconst shouldAnimateIn = isCurrent && !wasCurrent || !isBeingRemoved && previousState.current.wasBeingRemoved && isCurrent;\n\t\tconst shouldAnimateOut = isPrevious && !wasPrevious;\n\t\tconst origins = getOriginProps(previousState.current.origins, initialProps, transitionProps);\n\t\tlet wasReset = previousState.current.wasReset;\n\t\tif (shouldAnimateIn || shouldAnimateOut) {\n\t\t\tanimate.stop();\n\t\t\tanimate.start({\n\t\t\t\tzIndex: index,\n\t\t\t\t...origins,\n\t\t\t\t...transitionProps\n\t\t\t});\n\t\t\twasReset = false;\n\t\t} else if (wasReset === false) {\n\t\t\tanimate.stop();\n\t\t\tanimate.set({\n\t\t\t\tzIndex: index,\n\t\t\t\t...allAnimatableProperties,\n\t\t\t\topacity: 0\n\t\t\t});\n\t\t\twasReset = true;\n\t\t}\n\t\tpreviousState.current = {\n\t\t\twasCurrent: !!isCurrent,\n\t\t\twasPrevious: !!isPrevious,\n\t\t\twasBeingRemoved: false,\n\t\t\twasReset,\n\t\t\torigins\n\t\t};\n\t}, [\n\t\tisCurrent,\n\t\tisPrevious,\n\t\tisBeingRemoved\n\t]);\n\tconst transition = instant ? { type: false } : \"velocity\" in animation ? {\n\t\t...animation,\n\t\tvelocity: 0\n\t} : animation;\n\tconst exitTransition = instant ? { type: false } : exitAnimation || animation;\n\tconst layout = { ...position };\n\tif (layout.left === void 0 || layout.right === void 0) layout.width = \"auto\";\n\tif (layout.top === void 0 || layout.bottom === void 0) layout.height = \"auto\";\n\tconst perspective = (contains3Dprops(transitionProps) || contains3Dprops(initialProps)) && (isLayeredContainer || isCurrent || isPrevious) ? 1200 : void 0;\n\tconst identity = {\n\t\t...allAnimatableProperties,\n\t\t...previousState.current.origins\n\t};\n\tconst animations = isLayeredContainer ? {\n\t\tinitial: {\n\t\t\t...identity,\n\t\t\t...initialProps\n\t\t},\n\t\tanimate: {\n\t\t\t...identity,\n\t\t\t...transitionProps,\n\t\t\ttransition\n\t\t},\n\t\texit: {\n\t\t\t...identity,\n\t\t\t...exitProps,\n\t\t\ttransition: animation\n\t\t}\n\t} : {\n\t\tanimate,\n\t\texit: {\n\t\t\t...identity,\n\t\t\t...exitProps,\n\t\t\ttransition: exitTransition\n\t\t}\n\t};\n\tconst isPresent = !(isBeingRemoved || areMagicMotionLayersPresent === false);\n\tconst isCurrentTarget = !!isCurrent && isPresent;\n\tconst forceOpacity = isCurrent && isInitial;\n\treturn /* @__PURE__ */ jsxs(FrameWithMotion, {\n\t\t\"data-framer-component-type\": \"NavigationContainerWrapper\",\n\t\twidth: \"100%\",\n\t\theight: \"100%\",\n\t\tstyle: {\n\t\t\tposition: \"absolute\",\n\t\t\ttransformStyle: \"flat\",\n\t\t\tbackgroundColor: \"transparent\",\n\t\t\toverflow: \"hidden\",\n\t\t\tzIndex: isLayeredContainer || isBeingRemoved || isCurrent && withMagicMotion ? index : void 0,\n\t\t\tpointerEvents: void 0,\n\t\t\tvisibility: visible ? \"visible\" : \"hidden\",\n\t\t\tperspective\n\t\t},\n\t\tchildren: [isLayeredContainer && /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\t\twidth: \"100%\",\n\t\t\theight: \"100%\",\n\t\t\t\"data-framer-component-type\": \"NavigationContainerBackdrop\",\n\t\t\ttransition: animation,\n\t\t\tinitial: { opacity: instant && visible ? 1 : 0 },\n\t\t\tanimate: { opacity: 1 },\n\t\t\texit: { opacity: 0 },\n\t\t\tbackgroundColor: backdropColor ? backdropColor : \"transparent\",\n\t\t\tonTap: !isBeingRemoved ? onTapBackdrop : void 0\n\t\t}), /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\t\t...layout,\n\t\t\t...animations,\n\t\t\ttransition: {\n\t\t\t\tdefault: transition,\n\t\t\t\toriginX: { type: false },\n\t\t\t\toriginY: { type: false },\n\t\t\t\toriginZ: { type: false }\n\t\t\t},\n\t\t\tbackgroundColor: \"transparent\",\n\t\t\tbackfaceVisible: !isBeingRemoved ? backfaceVisible : exitBackfaceVisible,\n\t\t\t\"data-framer-component-type\": \"NavigationContainer\",\n\t\t\t\"data-framer-is-current-navigation-target\": !!isCurrent,\n\t\t\tstyle: {\n\t\t\t\tpointerEvents: void 0,\n\t\t\t\topacity: forceOpacity || isLayeredContainer || isCurrent && withMagicMotion ? 1 : 0\n\t\t\t},\n\t\t\t\"data-is-present\": isPresent ? void 0 : false,\n\t\t\tref: viewportRef,\n\t\t\tchildren: /* @__PURE__ */ jsx(ViewportContext.Provider, {\n\t\t\t\tvalue: viewportRef,\n\t\t\t\tchildren: /* @__PURE__ */ jsx(NavigationContainerContext.Provider, {\n\t\t\t\t\tvalue: isCurrentTarget,\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(NavigationTargetWrapper, {\n\t\t\t\t\t\tisCurrent: isCurrentTarget,\n\t\t\t\t\t\tisOverlayed,\n\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(SharedLayoutTree, {\n\t\t\t\t\t\t\tisLead: isCurrent,\n\t\t\t\t\t\t\tanimatesLayout: !!withMagicMotion,\n\t\t\t\t\t\t\ttransition,\n\t\t\t\t\t\t\tisExiting: !isPresent,\n\t\t\t\t\t\t\tisOverlayed,\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tchildren\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t})\n\t\t})]\n\t});\n}, shouldUsePreviousValue);\nfunction shouldUsePreviousValue(prevProps, nextProps) {\n\tif (nextProps.isCurrent === void 0) return false;\n\tif (prevProps.isCurrent !== nextProps.isCurrent) return false;\n\tif (prevProps.isPrevious !== nextProps.isPrevious) return false;\n\tif (nextProps.isCurrent && prevProps.isOverlayed !== nextProps.isOverlayed) return false;\n\treturn true;\n}\nfunction getOriginProps(currentOriginProps, initialProps, transitionProps) {\n\tconst result = { ...currentOriginProps };\n\tif (initialProps) {\n\t\tif (isFiniteNumber(initialProps.originX)) result.originX = initialProps.originX;\n\t\tif (isFiniteNumber(initialProps.originY)) result.originY = initialProps.originY;\n\t\tif (isFiniteNumber(initialProps.originZ)) result.originZ = initialProps.originZ;\n\t}\n\tif (transitionProps) {\n\t\tif (isFiniteNumber(transitionProps.originX)) result.originX = transitionProps.originX;\n\t\tif (isFiniteNumber(transitionProps.originY)) result.originY = transitionProps.originY;\n\t\tif (isFiniteNumber(transitionProps.originZ)) result.originZ = transitionProps.originZ;\n\t}\n\treturn result;\n}\nfunction contains3Dprops(containerProps) {\n\tif (!containerProps) return false;\n\tif (!(\"rotateX\" in containerProps || \"rotateY\" in containerProps || \"z\" in containerProps)) return false;\n\tconst toPropsContain3d = containerProps.rotateX !== 0 || containerProps.rotateY !== 0 || containerProps.z !== 0;\n\tconst fromPropsContain3d = containerProps?.transition?.rotateX.from !== 0 || containerProps?.transition?.rotateY.from !== 0 || containerProps?.transition?.z.from !== 0;\n\treturn toPropsContain3d || fromPropsContain3d;\n}\nconst allAnimatableProperties = {\n\tx: 0,\n\ty: 0,\n\tz: 0,\n\trotate: 0,\n\trotateX: 0,\n\trotateY: 0,\n\trotateZ: 0,\n\tscale: 1,\n\tscaleX: 1,\n\tscaleY: 1,\n\tscaleZ: 1,\n\tskew: 0,\n\tskewX: 0,\n\tskewY: 0,\n\toriginX: .5,\n\toriginY: .5,\n\toriginZ: 0,\n\topacity: 1\n};\n\n//#endregion\n//#region ../../library/src/components/NavigatorMock.tsx\nvar NavigatorMock = class {\n\twarning = () => {\n\t\twarnOnce$1(\"The Navigator API is only available inside of Framer: https://www.framer.com/\");\n\t};\n\tgoBack = () => this.warning();\n\tinstant = () => this.warning();\n\tfade = () => this.warning();\n\tpush = () => this.warning();\n\tmodal = () => this.warning();\n\toverlay = () => this.warning();\n\tflip = () => this.warning();\n\tcustomTransition = () => this.warning();\n\tmagicMotion = () => this.warning();\n};\n/**\n* @internal\n*/\nconst navigatorMock = /* @__PURE__ */ new NavigatorMock();\n\n//#endregion\n//#region ../../library/src/components/NavigationContext.ts\n/**\n* @internal\n*/\nconst NavigationContext = /* @__PURE__ */ createContext(navigatorMock);\n\n//#endregion\n//#region ../../library/src/components/NavigationTransitions.ts\n/**\n* @internal\n*/\nconst TransitionDefaults = {\n\tFade: {\n\t\texit: { opacity: 0 },\n\t\tenter: { opacity: 0 }\n\t},\n\tPushLeft: {\n\t\texit: { x: \"-30%\" },\n\t\tenter: { x: \"100%\" }\n\t},\n\tPushRight: {\n\t\texit: { x: \"30%\" },\n\t\tenter: { x: \"-100%\" }\n\t},\n\tPushUp: {\n\t\texit: { y: \"-30%\" },\n\t\tenter: { y: \"100%\" }\n\t},\n\tPushDown: {\n\t\texit: { y: \"30%\" },\n\t\tenter: { y: \"-100%\" }\n\t},\n\tInstant: {\n\t\tanimation: { type: false },\n\t\tenter: { opacity: 0 }\n\t},\n\tModal: {\n\t\toverCurrentContext: true,\n\t\tgoBackOnTapOutside: true,\n\t\tposition: { center: true },\n\t\tenter: {\n\t\t\topacity: 0,\n\t\t\tscale: 1.2\n\t\t}\n\t},\n\tOverlayLeft: {\n\t\toverCurrentContext: true,\n\t\tgoBackOnTapOutside: true,\n\t\tposition: {\n\t\t\tright: 0,\n\t\t\ttop: 0,\n\t\t\tbottom: 0\n\t\t},\n\t\tenter: { x: \"100%\" }\n\t},\n\tOverlayRight: {\n\t\toverCurrentContext: true,\n\t\tgoBackOnTapOutside: true,\n\t\tposition: {\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\tbottom: 0\n\t\t},\n\t\tenter: { x: \"-100%\" }\n\t},\n\tOverlayUp: {\n\t\toverCurrentContext: true,\n\t\tgoBackOnTapOutside: true,\n\t\tposition: {\n\t\t\tbottom: 0,\n\t\t\tleft: 0,\n\t\t\tright: 0\n\t\t},\n\t\tenter: { y: \"100%\" }\n\t},\n\tOverlayDown: {\n\t\toverCurrentContext: true,\n\t\tgoBackOnTapOutside: true,\n\t\tposition: {\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\tright: 0\n\t\t},\n\t\tenter: { y: \"-100%\" }\n\t},\n\tFlipLeft: {\n\t\tbackfaceVisible: false,\n\t\texit: { rotateY: -180 },\n\t\tenter: { rotateY: 180 }\n\t},\n\tFlipRight: {\n\t\tbackfaceVisible: false,\n\t\texit: { rotateY: 180 },\n\t\tenter: { rotateY: -180 }\n\t},\n\tFlipUp: {\n\t\tbackfaceVisible: false,\n\t\texit: { rotateX: 180 },\n\t\tenter: { rotateX: -180 }\n\t},\n\tFlipDown: {\n\t\tbackfaceVisible: false,\n\t\texit: { rotateX: -180 },\n\t\tenter: { rotateX: 180 }\n\t},\n\tMagicMotion: { withMagicMotion: true }\n};\n/**\n* @internal\n*/\nfunction pushTransition(options) {\n\tswitch (options?.appearsFrom ? options.appearsFrom : \"right\") {\n\t\tcase \"right\": return TransitionDefaults.PushLeft;\n\t\tcase \"left\": return TransitionDefaults.PushRight;\n\t\tcase \"bottom\": return TransitionDefaults.PushUp;\n\t\tcase \"top\": return TransitionDefaults.PushDown;\n\t}\n}\n/**\n* @internal\n*/\nfunction overlayTransition(options) {\n\tswitch (options?.appearsFrom ? options.appearsFrom : \"bottom\") {\n\t\tcase \"right\": return TransitionDefaults.OverlayLeft;\n\t\tcase \"left\": return TransitionDefaults.OverlayRight;\n\t\tcase \"bottom\": return TransitionDefaults.OverlayUp;\n\t\tcase \"top\": return TransitionDefaults.OverlayDown;\n\t}\n}\n/**\n* @internal\n*/\nfunction flipTransition(options) {\n\tswitch (options?.appearsFrom ? options.appearsFrom : \"bottom\") {\n\t\tcase \"right\": return TransitionDefaults.FlipLeft;\n\t\tcase \"left\": return TransitionDefaults.FlipRight;\n\t\tcase \"bottom\": return TransitionDefaults.FlipUp;\n\t\tcase \"top\": return TransitionDefaults.FlipDown;\n\t}\n}\n\n//#endregion\n//#region ../../library/src/components/reduceNavigationStateForAction.ts\nconst defaultState = () => ({\n\tcurrent: -1,\n\tprevious: -1,\n\tcurrentOverlay: -1,\n\tpreviousOverlay: -1,\n\tvisualIndex: 0,\n\toverlayItemId: 0,\n\thistoryItemId: 0,\n\thistory: [],\n\toverlayStack: [],\n\tcontainers: {},\n\tcontainerIndex: {},\n\tcontainerVisualIndex: {},\n\tcontainerIsRemoved: {},\n\ttransitionForContainer: {},\n\tpreviousTransition: null\n});\n/**\n* @internal\n*/\nfunction reduceNavigationStateForAction(state, action) {\n\tswitch (action.type) {\n\t\tcase \"addOverlay\": return addOverlay(state, action.transition, action.component);\n\t\tcase \"removeOverlay\": return removeOverlay(state);\n\t\tcase \"add\": return add$1(state, action.key, action.transition, action.component);\n\t\tcase \"remove\": return remove(state);\n\t\tcase \"update\": return updateComponent(state, action.key, action.component);\n\t\tcase \"back\": return back(state);\n\t\tcase \"forward\": return forward(state);\n\t\tdefault: return;\n\t}\n}\nfunction updateComponent(currentState, key, component) {\n\treturn {\n\t\t...currentState,\n\t\tcontainers: {\n\t\t\t...currentState.containers,\n\t\t\t[key]: component\n\t\t}\n\t};\n}\n/**\n* Add a new navigation target as an overlay.\n*/\nfunction addOverlay(currentState, transition, component) {\n\tconst currentOverlay = currentState.overlayStack[currentState.currentOverlay];\n\tif (currentOverlay && currentOverlay.component === component) return;\n\tconst overlayItemId = currentState.overlayItemId + 1;\n\tconst overlayStack = [...currentState.overlayStack, {\n\t\tkey: `stack-${overlayItemId}`,\n\t\tcomponent,\n\t\ttransition\n\t}];\n\treturn {\n\t\t...currentState,\n\t\toverlayStack,\n\t\toverlayItemId,\n\t\tcurrentOverlay: Math.max(0, Math.min(currentState.currentOverlay + 1, overlayStack.length - 1)),\n\t\tpreviousOverlay: currentState.currentOverlay\n\t};\n}\n/**\n* Dismiss all overlays.\n*/\nfunction removeOverlay(currentState) {\n\treturn {\n\t\t...currentState,\n\t\toverlayStack: [],\n\t\tcurrentOverlay: -1,\n\t\tpreviousOverlay: currentState.currentOverlay\n\t};\n}\n/** Navigate to a new or existing navigation target with an animated transition. */\nfunction add$1(currentState, key, transition, component) {\n\tif (!currentState.containers[key]) currentState.containers[key] = component;\n\tcurrentState.history = currentState.history.slice(0, currentState.current + 1);\n\tcurrentState.visualIndex = Math.max(currentState.history.length, 0);\n\tconst currentItem = currentState.history[currentState.history.length - 1];\n\tconst isCurrentScreen = currentItem?.key === key;\n\tcurrentState.overlayStack = [];\n\tif (isCurrentScreen && currentState.currentOverlay > -1) return {\n\t\t...currentState,\n\t\tcurrentOverlay: -1,\n\t\tpreviousOverlay: currentState.currentOverlay\n\t};\n\tif (isCurrentScreen) return;\n\tconst nextIndex = currentState.containerVisualIndex[key];\n\tconst removed = currentState.containerIsRemoved[key];\n\tconst shouldMoveForward = currentItem?.key && transition.withMagicMotion ? isNextTargetForward(key, nextIndex, removed, currentState.history) : true;\n\tcurrentState.history.push({\n\t\tkey,\n\t\ttransition,\n\t\tvisualIndex: shouldMoveForward ? Math.max(currentState.visualIndex, 0) : currentState.containerVisualIndex[key]\n\t});\n\tconst current = currentState.current + 1;\n\tconst previous = currentState.current;\n\tfor (const containerKey in currentState.containerIndex) if (currentState.containerIndex[containerKey] === current) currentState.containerIndex[containerKey] = findLatestHistoryIndex(containerKey, currentState.history);\n\tcurrentState.containerIndex[key] = current;\n\tconst { containerVisualIndex, containerIsRemoved } = magicMotionPropsForAdd(currentState, key, shouldMoveForward);\n\tconst transitionForContainer = updateTransitions(current, previous, currentState.history, currentState.containerIndex, currentState.transitionForContainer);\n\treturn {\n\t\t...currentState,\n\t\tcurrent,\n\t\tprevious,\n\t\tcontainerVisualIndex,\n\t\tcontainerIsRemoved,\n\t\ttransitionForContainer,\n\t\tpreviousTransition: null,\n\t\tcurrentOverlay: -1,\n\t\thistoryItemId: currentState.historyItemId + 1,\n\t\tpreviousOverlay: currentState.currentOverlay\n\t};\n}\n/**\n* @FIXME -- This simple function supports browser back by not removing pages.\n* This allows subsequent forward actions to navigate to an already mounted\n* component. This may have unintended effects when interacting with magic\n* motion however. Since magic motion between framer web pages will have dubious\n* value, this hasn't been implemented.\n*/\nfunction back(currentState) {\n\tconst containers = { ...currentState.containers };\n\tconst nextState = remove(currentState);\n\tif (!nextState) return;\n\tnextState.containers = containers;\n\treturn nextState;\n}\nfunction forward(currentState) {\n\tconst nextItem = currentState.history[currentState.current + 1];\n\tif (!nextItem) return;\n\tconst { key, transition, component } = nextItem;\n\tconst history = [...currentState.history];\n\tconst nextState = add$1(currentState, key, transition, component);\n\tif (!nextState) return;\n\tnextState.history = history;\n\treturn nextState;\n}\n/**\n* Navigate away from the screen that was most recently navigated to, to the previous screen.\n* Animations will play in reverse.\n*/\nfunction remove(currentState) {\n\tconst history = currentState.history.slice(0, currentState.current + 1);\n\tif (history.length === 1) return;\n\tconst currentItem = history.pop();\n\tif (!currentItem) return;\n\tconst target = history[history.length - 1];\n\tassert$1(target, \"The navigation history must have at least one component\");\n\tcurrentState.containerIndex[target.key] = history.length - 1;\n\tif (history.every((item) => item.key !== currentItem.key)) delete currentState.containers[currentItem.key];\n\tconst current = currentState.current - 1;\n\tconst previous = currentState.current;\n\tconst { containerIsRemoved, containerVisualIndex, previousTransition, visualIndex } = magicMotionPropsForRemove(currentState, target, currentItem);\n\tconst transitionForContainer = updateTransitions(current, previous, currentState.history, currentState.containerIndex, currentState.transitionForContainer);\n\treturn {\n\t\t...currentState,\n\t\tcurrent,\n\t\tprevious,\n\t\tcontainerIsRemoved,\n\t\tcontainerVisualIndex,\n\t\tpreviousTransition,\n\t\tvisualIndex,\n\t\ttransitionForContainer\n\t};\n}\n/**\n* When transitioning forwards to an existing container, update navigation state to optimize magic motion sequences.\n* In cases where we are about to navigate to a screen we have already navigated to with a magic motion transition,\n* we optimize the animation experience by simulating a back transition to solve layering issues.\n*/\nfunction magicMotionPropsForAdd(currentState, nextKey, shouldMoveForward) {\n\tconst update = {\n\t\tcontainerVisualIndex: { ...currentState.containerVisualIndex },\n\t\tcontainerIsRemoved: { ...currentState.containerIsRemoved }\n\t};\n\tif (shouldMoveForward) {\n\t\tupdate.containerVisualIndex[nextKey] = currentState.history.length - 1;\n\t\tupdate.containerIsRemoved[nextKey] = false;\n\t} else {\n\t\tconst nextVisualIndex = currentState.containerVisualIndex[nextKey];\n\t\tfor (const [key, visualIndex] of Object.entries(currentState.containerVisualIndex)) if (nextVisualIndex !== void 0 && visualIndex > nextVisualIndex) update.containerIsRemoved[key] = true;\n\t}\n\treturn update;\n}\n/**\n* When transitioning back to a previous container, update navigation state to optimize magic motion sequences.\n* In cases where we have navigated forward via magic motion transitions that appear to add and remove screens,\n* while continuing to add to the history, we need to replicate the opposite navigations when transitioning back.\n*/\nfunction magicMotionPropsForRemove(currentState, target, currentItem) {\n\tconst validTargets = [target.key, currentItem.key];\n\tconst nextValidTarget = currentState.history[currentState.history.length - 2];\n\tconst previousTransition = currentState.previousTransition === null ? null : { ...currentState.previousTransition };\n\tconst update = {\n\t\tcontainerIsRemoved: { ...currentState.containerIsRemoved },\n\t\tcontainerVisualIndex: { ...currentState.containerVisualIndex },\n\t\tpreviousTransition,\n\t\tvisualIndex: currentState.visualIndex\n\t};\n\tif (nextValidTarget) validTargets.push(nextValidTarget.key);\n\tconst targetVisualIndex = currentState.containerVisualIndex[target.key];\n\tconst currentVisualIndex = currentState.containerVisualIndex[currentItem.key];\n\tconst shouldRemoveLastKey = targetVisualIndex !== void 0 && currentVisualIndex !== void 0 && targetVisualIndex <= currentVisualIndex || target.visualIndex !== void 0 && target.visualIndex < currentState.history.length - 1;\n\tconst nextIndex = target.visualIndex;\n\tif (shouldRemoveLastKey) {\n\t\tupdate.containerIsRemoved[currentItem.key] = true;\n\t\tupdate.containerVisualIndex[target.key] = nextIndex !== void 0 ? nextIndex : currentState.history.length - 1;\n\t} else {\n\t\tupdate.visualIndex = currentState.visualIndex + 1;\n\t\tupdate.containerVisualIndex[target.key] = currentState.visualIndex + 1;\n\t}\n\tif (currentItem.transition.withMagicMotion) update.previousTransition = currentItem.transition || null;\n\tcurrentState.containerIsRemoved[target.key] = false;\n\treturn update;\n}\nfunction findLatestHistoryIndex(key, history) {\n\tfor (let index = history.length; index > history.length; index--) if (history[index]?.key === key) return index;\n\treturn -1;\n}\nfunction updateTransitions(current, previous, history, containerIndex, transitionForContainer) {\n\tconst transitions = { ...transitionForContainer };\n\tfor (const [key, screenIndex] of Object.entries(containerIndex)) {\n\t\tconst transition = transitionForScreen(screenIndex, {\n\t\t\tcurrent,\n\t\t\tprevious,\n\t\t\thistory\n\t\t});\n\t\tif (transition) transitions[key] = transition;\n\t}\n\treturn transitions;\n}\nfunction isNextTargetForward(key, index, removed, history) {\n\tif (removed || index === void 0) return true;\n\tif (index === 0) return false;\n\tif (history.slice(index, history.length).some((item) => item.key === key)) return true;\n\tif (history.slice(0, index - 1).some((item) => item.key === key)) return false;\n\treturn true;\n}\nfunction transitionForScreen(screenIndex, stackState) {\n\tconst { current, previous, history } = stackState;\n\tif (screenIndex !== current && screenIndex !== previous) return void 0;\n\tif (screenIndex === current && current > previous) {\n\t\tconst item = history[screenIndex];\n\t\treturn sequence(\"enter\", item?.transition.enter, item?.transition.animation);\n\t}\n\tif (screenIndex === previous && current > previous) {\n\t\tconst item = history[screenIndex + 1];\n\t\treturn sequence(\"exit\", item?.transition.exit, item?.transition.animation);\n\t}\n\tif (screenIndex === current && current < previous) {\n\t\tconst item = history[screenIndex + 1];\n\t\treturn sequence(\"enter\", item?.transition.exit, item?.transition.animation);\n\t}\n\tif (screenIndex === previous && current < previous) {\n\t\tconst item = history[screenIndex];\n\t\treturn sequence(\"exit\", item?.transition.enter, item?.transition.animation);\n\t}\n}\nconst allAnimatableKeys = /* @__PURE__ */ objectKeys(allAnimatableProperties);\nfunction sequence(direction, transition, animation) {\n\tconst value = {};\n\tconst from = {};\n\tallAnimatableKeys.forEach((property) => {\n\t\tvalue[property] = allAnimatableProperties[property];\n\t\tfrom[property] = {\n\t\t\t...animation,\n\t\t\tfrom: allAnimatableProperties[property]\n\t\t};\n\t});\n\tif (transition) Object.keys(transition).forEach((property) => {\n\t\tif (transition[property] === void 0) return;\n\t\tconst transitionTo = transition[property];\n\t\tconst transitionFrom = typeof transition[property] === \"string\" ? `${asRecord(allAnimatableProperties)[property]}%` : asRecord(allAnimatableProperties)[property];\n\t\tasRecord(value)[property] = direction === \"enter\" ? transitionFrom : transitionTo;\n\t\tfrom[property] = {\n\t\t\t...animation,\n\t\t\tfrom: direction === \"enter\" ? transitionTo : transitionFrom,\n\t\t\tvelocity: 0\n\t\t};\n\t});\n\treturn {\n\t\t...value,\n\t\ttransition: { ...from }\n\t};\n}\n\n//#endregion\n//#region ../../library/src/components/Navigation.tsx\n/**\n* Provides {@link NavigationInterface} that can be used to start transitions in Framer.\n* @public\n*/\nconst NavigationConsumer = /* @__PURE__ */ (() => NavigationContext.Consumer)();\nconst NavigationCallbackContext = /* @__PURE__ */ React.createContext(void 0);\n/**\n* @internal\n*/\nconst NavigationCallbackProvider = /* @__PURE__ */ (() => NavigationCallbackContext.Provider)();\n/**\n* @internal\n*/\nconst IsInitialNavigationContext = /* @__PURE__ */ React.createContext(void 0);\n/**\n* @internal export for testing only\n*\n* We’re wrapping the whole Navigation class with `@__PURE__` because esbuild\n* can’t compile static class properties in a tree-shakeable way: https://github.com/evanw/esbuild/issues/3765.\n* The wrapper allows them to stay in the IIFE and be tree-shaken.\n* If/when esbuild fixes that issue, we can remove `export type NavigationClass`\n* and just export the class directly.\n*/\nconst FramerNavigation = /* @__PURE__ */ (() => {\n\tclass NavigationClassImpl extends Component {\n\t\t#lastEventTimeStamp = null;\n\t\tstate = defaultState();\n\t\tstatic defaultProps = { enabled: true };\n\t\tstatic contextType = NavigationCallbackContext;\n\t\tconstructor(props) {\n\t\t\tsuper(props);\n\t\t\tconst component = this.props.children;\n\t\t\tif (!component || !isReactChild(component) || !isReactElement(component)) return;\n\t\t\tconst transition = { ...TransitionDefaults.Instant };\n\t\t\tconst action = {\n\t\t\t\ttype: \"add\",\n\t\t\t\tkey: component.key?.toString() || `stack-${this.state.historyItemId + 1}`,\n\t\t\t\ttransition,\n\t\t\t\tcomponent\n\t\t\t};\n\t\t\tconst newState = reduceNavigationStateForAction(this.state, action);\n\t\t\tif (!newState) return;\n\t\t\tthis.state = newState;\n\t\t}\n\t\tcomponentDidMount() {\n\t\t\tconst historyItem = this.state.history[this.state.current];\n\t\t\tif (!historyItem) return;\n\t\t\tthis.context?.(historyItem.key);\n\t\t}\n\t\tUNSAFE_componentWillReceiveProps(props) {\n\t\t\tconst component = props.children;\n\t\t\tif (!isReactChild(component) || !isReactElement(component)) return;\n\t\t\tconst key = component.key?.toString();\n\t\t\tif (!key) return;\n\t\t\tif (this.state.history.length === 0) this.#transition(component, TransitionDefaults.Instant);\n\t\t\telse this.#navigationAction({\n\t\t\t\ttype: \"update\",\n\t\t\t\tkey,\n\t\t\t\tcomponent\n\t\t\t});\n\t\t}\n\t\tcomponentWillUnmount() {\n\t\t\tthis.props.resetProjection?.();\n\t\t}\n\t\t#getStackState(options) {\n\t\t\tconst { current, previous, currentOverlay, previousOverlay } = this.state;\n\t\t\tif (options.overCurrentContext) return {\n\t\t\t\tcurrent: currentOverlay,\n\t\t\t\tprevious: previousOverlay,\n\t\t\t\thistory: this.state.overlayStack\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tcurrent,\n\t\t\t\tprevious,\n\t\t\t\thistory: this.state.history\n\t\t\t};\n\t\t}\n\t\t/**\n\t\t* To prevent bubbling events from triggering multiple transitions,\n\t\t* we ensure that the current event has a different timestamp then the event that triggered the last transition.\n\t\t* We use Window.event to ensure that even transitions invoked by code components - and may not pass a reference to the event - are caught.\n\t\t* This works better than measuring the time of transition calls with performance.now()\n\t\t* because the time between calls can get longer and longer as more screens are added to the stack,\n\t\t* preventing a deterministic time between transitions to be used to determine if they were triggered at the same time or not.\n\t\t*/\n\t\t#isSameEventTransition() {\n\t\t\tif (!globalThis.event) return false;\n\t\t\treturn this.#lastEventTimeStamp === globalThis.event.timeStamp;\n\t\t}\n\t\t#navigationAction = (action) => {\n\t\t\tif (!this.props.enabled && this.state.history.length > 0) return;\n\t\t\tconst newState = reduceNavigationStateForAction(this.state, action);\n\t\t\tif (!newState) return;\n\t\t\tconst { skipLayoutAnimation } = this.props;\n\t\t\tconst historyItem = newState.history[newState.current];\n\t\t\tconst withMagicMotion = action.type === \"add\" && action.transition.withMagicMotion || action.type === \"forward\" && historyItem?.transition.withMagicMotion || action.type === \"remove\" && !!newState.previousTransition;\n\t\t\tconst updateState = () => {\n\t\t\t\tthis.setState(newState);\n\t\t\t\tif (historyItem?.key) this.context?.(historyItem.key);\n\t\t\t};\n\t\t\tif (skipLayoutAnimation && !withMagicMotion) skipLayoutAnimation(updateState);\n\t\t\telse updateState();\n\t\t};\n\t\t#transition(component, transitionTraits, transitionOptions) {\n\t\t\tif (this.#isSameEventTransition()) return;\n\t\t\tthis.#lastEventTimeStamp = globalThis.event?.timeStamp || null;\n\t\t\tif (!component || !isReactChild(component) || !isReactElement(component)) return;\n\t\t\tconst transition = {\n\t\t\t\t...transitionTraits,\n\t\t\t\t...transitionOptions\n\t\t\t};\n\t\t\tif (!!transition.overCurrentContext) return this.#navigationAction({\n\t\t\t\ttype: \"addOverlay\",\n\t\t\t\ttransition,\n\t\t\t\tcomponent\n\t\t\t});\n\t\t\tconst key = component.key?.toString() || `stack-${this.state.historyItemId + 1}`;\n\t\t\tthis.#navigationAction({\n\t\t\t\ttype: \"add\",\n\t\t\t\tkey,\n\t\t\t\ttransition,\n\t\t\t\tcomponent\n\t\t\t});\n\t\t}\n\t\tgoBack = () => {\n\t\t\tif (this.#isSameEventTransition()) return;\n\t\t\tthis.#lastEventTimeStamp = globalThis.event?.timeStamp || null;\n\t\t\tif (this.state.currentOverlay !== -1) return this.#navigationAction({ type: \"removeOverlay\" });\n\t\t\treturn this.#navigationAction({ type: \"remove\" });\n\t\t};\n\t\tinstant(component) {\n\t\t\tthis.#transition(component, TransitionDefaults.Instant, void 0);\n\t\t}\n\t\tfade(component, options) {\n\t\t\tthis.#transition(component, TransitionDefaults.Fade, options);\n\t\t}\n\t\tpush(component, options) {\n\t\t\tthis.#transition(component, pushTransition(options), options);\n\t\t}\n\t\tmodal(component, options) {\n\t\t\tthis.#transition(component, TransitionDefaults.Modal, options);\n\t\t}\n\t\toverlay(component, options) {\n\t\t\tthis.#transition(component, overlayTransition(options), options);\n\t\t}\n\t\tflip(component, options) {\n\t\t\tthis.#transition(component, flipTransition(options), options);\n\t\t}\n\t\tmagicMotion(component, options) {\n\t\t\tthis.#transition(component, TransitionDefaults.MagicMotion, options);\n\t\t}\n\t\tcustomTransition(component, transition) {\n\t\t\tthis.#transition(component, transition);\n\t\t}\n\t\trender() {\n\t\t\tconst stackState = this.#getStackState({ overCurrentContext: false });\n\t\t\tconst overlayStackState = this.#getStackState({ overCurrentContext: true });\n\t\t\tconst activeOverlay = activeOverlayItem(overlayStackState);\n\t\t\tconst isOverlayVisible = overlayStackState.current > -1;\n\t\t\tconst isInitial = this.state.history.length === 1;\n\t\t\tconst contentContainers = [];\n\t\t\tfor (const [key, component] of Object.entries(this.state.containers)) {\n\t\t\t\tconst index = this.state.containerIndex[key];\n\t\t\t\tassert$1(index !== void 0, \"Container's index must be registered\");\n\t\t\t\tconst visualIndex = this.state.containerVisualIndex[key];\n\t\t\t\tassert$1(visualIndex !== void 0, \"Container's visual index must be registered\");\n\t\t\t\tconst removed = this.state.containerIsRemoved[key];\n\t\t\t\tconst historyItem = this.state.history[index];\n\t\t\t\tconst transitionProps = this.state.transitionForContainer[key];\n\t\t\t\tconst isCurrent = index === this.state.current;\n\t\t\t\tconst isPrevious = index === this.state.previous;\n\t\t\t\tconst areMagicMotionLayersPresent = isCurrent ? false : removed;\n\t\t\t\tconst withMagicMotion = historyItem?.transition?.withMagicMotion || isCurrent && !!this.state.previousTransition;\n\t\t\t\tcontentContainers.push(/* @__PURE__ */ jsx(NavigationContainer, {\n\t\t\t\t\tid: key,\n\t\t\t\t\tindex: visualIndex,\n\t\t\t\t\tisInitial,\n\t\t\t\t\tisCurrent,\n\t\t\t\t\tisPrevious,\n\t\t\t\t\tisOverlayed: isOverlayVisible,\n\t\t\t\t\tvisible: isCurrent || isPrevious,\n\t\t\t\t\tposition: historyItem?.transition?.position,\n\t\t\t\t\tinstant: isInstantContainerTransition(index, stackState),\n\t\t\t\t\ttransitionProps,\n\t\t\t\t\tanimation: animationPropsForContainer(index, stackState),\n\t\t\t\t\tbackfaceVisible: getBackfaceVisibleForScreen(index, stackState),\n\t\t\t\t\texitAnimation: historyItem?.transition?.animation,\n\t\t\t\t\texitBackfaceVisible: historyItem?.transition?.backfaceVisible,\n\t\t\t\t\texitProps: historyItem?.transition?.enter,\n\t\t\t\t\twithMagicMotion,\n\t\t\t\t\tareMagicMotionLayersPresent: areMagicMotionLayersPresent ? false : void 0,\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(MagicMotionCrossfadeRoot, { children: containerContent({\n\t\t\t\t\t\tcomponent,\n\t\t\t\t\t\ttransition: historyItem?.transition\n\t\t\t\t\t}) })\n\t\t\t\t}, key));\n\t\t\t}\n\t\t\tconst overlayContainers = this.state.overlayStack.map((item, stackIndex) => {\n\t\t\t\treturn /* @__PURE__ */ jsx(NavigationContainer, {\n\t\t\t\t\tisLayeredContainer: true,\n\t\t\t\t\tisCurrent: stackIndex === this.state.currentOverlay,\n\t\t\t\t\tposition: item.transition.position,\n\t\t\t\t\tinitialProps: initialPropsForOverlay(stackIndex, overlayStackState),\n\t\t\t\t\ttransitionProps: transitionPropsForOverlay(stackIndex, overlayStackState),\n\t\t\t\t\tinstant: isInstantContainerTransition(stackIndex, overlayStackState, true),\n\t\t\t\t\tanimation: animationPropsForContainer(stackIndex, overlayStackState),\n\t\t\t\t\texitProps: item.transition.enter,\n\t\t\t\t\tvisible: containerIsVisible(stackIndex, overlayStackState),\n\t\t\t\t\tbackdropColor: backdropColorForTransition(item.transition),\n\t\t\t\t\tbackfaceVisible: getBackfaceVisibleForOverlay(stackIndex, overlayStackState),\n\t\t\t\t\tonTapBackdrop: backdropTapAction(item.transition, this.goBack),\n\t\t\t\t\tindex: this.state.current + 1 + stackIndex,\n\t\t\t\t\tchildren: containerContent({\n\t\t\t\t\t\tcomponent: item.component,\n\t\t\t\t\t\ttransition: item.transition\n\t\t\t\t\t})\n\t\t\t\t}, item.key);\n\t\t\t});\n\t\t\treturn /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\t\t\t\"data-framer-component-type\": \"NavigationRoot\",\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\twidth: \"100%\",\n\t\t\t\theight: \"100%\",\n\t\t\t\tposition: \"relative\",\n\t\t\t\tstyle: {\n\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\tbackgroundColor: \"unset\",\n\t\t\t\t\tpointerEvents: void 0,\n\t\t\t\t\t...this.props.style\n\t\t\t\t},\n\t\t\t\tchildren: /* @__PURE__ */ jsx(NavigationContext.Provider, {\n\t\t\t\t\tvalue: this,\n\t\t\t\t\tchildren: /* @__PURE__ */ jsxs(IsInitialNavigationContext.Provider, {\n\t\t\t\t\t\tvalue: isInitial,\n\t\t\t\t\t\tchildren: [/* @__PURE__ */ jsx(NavigationContainer, {\n\t\t\t\t\t\t\tisLayeredContainer: true,\n\t\t\t\t\t\t\tposition: void 0,\n\t\t\t\t\t\t\tinitialProps: {},\n\t\t\t\t\t\t\tinstant: false,\n\t\t\t\t\t\t\ttransitionProps: transitionPropsForStackWrapper(activeOverlay),\n\t\t\t\t\t\t\tanimation: animationForStackWrapper(activeOverlay),\n\t\t\t\t\t\t\tbackfaceVisible: backfaceVisibleForStackWrapper(activeOverlay),\n\t\t\t\t\t\t\tvisible: true,\n\t\t\t\t\t\t\tbackdropColor: void 0,\n\t\t\t\t\t\t\tonTapBackdrop: void 0,\n\t\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(LayoutIdProvider, { children: /* @__PURE__ */ jsx(SharedLayoutRoot, { children: /* @__PURE__ */ jsx(AnimatePresence, {\n\t\t\t\t\t\t\t\tpresenceAffectsLayout: false,\n\t\t\t\t\t\t\t\tchildren: contentContainers\n\t\t\t\t\t\t\t}) }) })\n\t\t\t\t\t\t}), /* @__PURE__ */ jsx(AnimatePresence, { children: overlayContainers })]\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t});\n\t\t}\n\t}\n\treturn NavigationClassImpl;\n})();\nconst animationDefault = {\n\tstiffness: 500,\n\tdamping: 50,\n\trestDelta: 1,\n\ttype: \"spring\"\n};\nfunction activeOverlayItem(overlayStack) {\n\tlet currentOverlayItem;\n\tlet previousOverlayItem;\n\tif (overlayStack.current !== -1) currentOverlayItem = overlayStack.history[overlayStack.current];\n\telse previousOverlayItem = overlayStack.history[overlayStack.previous];\n\treturn {\n\t\tcurrentOverlayItem,\n\t\tpreviousOverlayItem\n\t};\n}\nfunction transitionPropsForStackWrapper({ currentOverlayItem }) {\n\treturn currentOverlayItem?.transition?.exit;\n}\nfunction animationForStackWrapper({ currentOverlayItem, previousOverlayItem }) {\n\tif (currentOverlayItem?.transition?.animation) return currentOverlayItem.transition.animation;\n\tif (previousOverlayItem?.transition?.animation) return previousOverlayItem.transition.animation;\n\treturn animationDefault;\n}\nfunction backfaceVisibleForStackWrapper({ currentOverlayItem, previousOverlayItem }) {\n\tif (currentOverlayItem) return currentOverlayItem.transition.backfaceVisible;\n\treturn previousOverlayItem?.transition?.backfaceVisible;\n}\nfunction backdropColorForTransition(transition) {\n\tif (transition.backdropColor) return transition.backdropColor;\n\tif (transition.overCurrentContext) return \"rgba(4,4,15,.4)\";\n}\nfunction getBackfaceVisibleForOverlay(containerIndex, stackState) {\n\tconst { current, history } = stackState;\n\tif (containerIndex === current) {\n\t\tconst navigationItem = history[containerIndex];\n\t\tif (navigationItem?.transition) return navigationItem.transition.backfaceVisible;\n\t\treturn true;\n\t} else if (containerIndex < current) {\n\t\tconst navigationItem = history[containerIndex + 1];\n\t\tif (navigationItem?.transition) return navigationItem.transition.backfaceVisible;\n\t\treturn true;\n\t} else {\n\t\tconst navigationItem = history[containerIndex];\n\t\tif (navigationItem?.transition) return navigationItem.transition.backfaceVisible;\n\t\treturn true;\n\t}\n}\nfunction initialPropsForOverlay(containerIndex, stackState) {\n\tconst navigationItem = stackState.history[containerIndex];\n\tif (navigationItem) return navigationItem.transition.enter;\n}\nfunction getBackfaceVisibleForScreen(screenIndex, stackState) {\n\tconst { current, previous, history } = stackState;\n\tif (screenIndex === previous && current > previous || screenIndex === current && current < previous) return history[screenIndex + 1]?.transition?.backfaceVisible;\n\treturn history[screenIndex]?.transition?.backfaceVisible;\n}\nfunction transitionPropsForOverlay(overlayIndex, stackState) {\n\tconst { current, history } = stackState;\n\tif (overlayIndex === current) return;\n\telse if (overlayIndex < current) {\n\t\tconst navigationItem = history[overlayIndex + 1];\n\t\tif (navigationItem?.transition) return navigationItem.transition.exit;\n\t} else {\n\t\tconst navigationItem = history[overlayIndex];\n\t\tif (navigationItem?.transition) return navigationItem.transition.enter;\n\t}\n}\nfunction animationPropsForContainer(containerIndex, stackState) {\n\tconst { current, previous, history } = stackState;\n\tconst containerCurrent = previous > current ? previous : current;\n\tif (containerIndex < containerCurrent) {\n\t\tconst navigationItem = history[containerIndex + 1];\n\t\tif (navigationItem?.transition?.animation) return navigationItem.transition.animation;\n\t} else if (containerIndex !== containerCurrent) {\n\t\tconst navigationItem = history[containerIndex];\n\t\tif (navigationItem?.transition?.animation) return navigationItem.transition.animation;\n\t} else {\n\t\tconst navigationItem = history[containerIndex];\n\t\tif (navigationItem?.transition.animation) return navigationItem.transition.animation;\n\t}\n\treturn animationDefault;\n}\nfunction isInstantContainerTransition(containerIndex, stackState, overCurrentContext) {\n\tconst { current, previous, history } = stackState;\n\tif (overCurrentContext && history.length > 1) return true;\n\tif (containerIndex !== previous && containerIndex !== current) return true;\n\tif (current === previous) return true;\n\treturn false;\n}\nfunction containerIsVisible(containerIndex, stackState) {\n\tconst { current, previous } = stackState;\n\tif (containerIndex > current && containerIndex > previous) return false;\n\tif (containerIndex === current) return true;\n\treturn false;\n}\nfunction containerContent(item) {\n\treturn React.Children.map(item.component, (child) => {\n\t\tif (!isReactChild(child) || !isReactElement(child) || !child.props) return child;\n\t\tconst props = { style: child.props.style ?? {} };\n\t\tconst position = item?.transition?.position;\n\t\tconst shouldStretchWidth = !position || position.left !== void 0 && position.right !== void 0;\n\t\tconst shouldStretchHeight = !position || position.top !== void 0 && position.bottom !== void 0;\n\t\tconst canStretchStyle = \"style\" in child.props ? isObject$1(child.props.style) : true;\n\t\tif (shouldStretchWidth) {\n\t\t\tif (\"width\" in child.props) props.width = \"100%\";\n\t\t\tif (canStretchStyle) props.style.width = \"100%\";\n\t\t}\n\t\tif (shouldStretchHeight) {\n\t\t\tif (\"height\" in child.props) props.height = \"100%\";\n\t\t\tif (canStretchStyle) props.style.height = \"100%\";\n\t\t}\n\t\treturn React.cloneElement(child, props);\n\t});\n}\nfunction backdropTapAction(transition, goBackAction) {\n\tif (transition.goBackOnTapOutside !== false) return goBackAction;\n}\n/**\n* @internal\n*/\nfunction NavigationWrapper(props, ref) {\n\tconst resetProjection = useResetProjection();\n\tconst skipLayoutAnimation = useInstantLayoutTransition();\n\tconst setNavigationRef = (instance) => {\n\t\tif (!ref) return;\n\t\tif (typeof ref === \"function\") {\n\t\t\tref(instance);\n\t\t\treturn;\n\t\t}\n\t\tref.current = instance;\n\t};\n\treturn /* @__PURE__ */ jsx(FramerNavigation, {\n\t\tref: setNavigationRef,\n\t\t...props,\n\t\tresetProjection,\n\t\tskipLayoutAnimation,\n\t\tchildren: props[\"children\"]\n\t});\n}\nconst NavigationExport = /* @__PURE__ */ withLibraryCSS(/* @__PURE__ */ React.forwardRef(NavigationWrapper));\n\n//#endregion\n//#region ../../library/src/render/types/NavigationLink.ts\n/**\n* @internal\n* @deprecated\n*/\nlet NavigateTo = /* @__PURE__ */ function(NavigateTo) {\n\tNavigateTo[\"Previous\"] = \"@Previous\";\n\treturn NavigateTo;\n}({});\n/**\n* @internal\n* @deprecated\n*/\nlet NavigationTransitionType = /* @__PURE__ */ function(NavigationTransitionType) {\n\tNavigationTransitionType[\"push\"] = \"push\";\n\tNavigationTransitionType[\"instant\"] = \"instant\";\n\tNavigationTransitionType[\"fade\"] = \"fade\";\n\tNavigationTransitionType[\"modal\"] = \"modal\";\n\tNavigationTransitionType[\"overlay\"] = \"overlay\";\n\tNavigationTransitionType[\"flip\"] = \"flip\";\n\tNavigationTransitionType[\"magicMotion\"] = \"magicMotion\";\n\treturn NavigationTransitionType;\n}({});\n\n//#endregion\n//#region ../../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js\n/** @license React v16.13.1\n* react-is.production.min.js\n*\n* Copyright (c) Facebook, Inc. and its affiliates.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\nvar require_react_is_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tvar b = \"function\" === typeof Symbol && Symbol.for;\n\tvar c = b ? Symbol.for(\"react.element\") : 60103;\n\tvar d = b ? Symbol.for(\"react.portal\") : 60106;\n\tvar e = b ? Symbol.for(\"react.fragment\") : 60107;\n\tvar f = b ? Symbol.for(\"react.strict_mode\") : 60108;\n\tvar g = b ? Symbol.for(\"react.profiler\") : 60114;\n\tvar h = b ? Symbol.for(\"react.provider\") : 60109;\n\tvar k = b ? Symbol.for(\"react.context\") : 60110;\n\tvar l = b ? Symbol.for(\"react.async_mode\") : 60111;\n\tvar m = b ? Symbol.for(\"react.concurrent_mode\") : 60111;\n\tvar n = b ? Symbol.for(\"react.forward_ref\") : 60112;\n\tvar p = b ? Symbol.for(\"react.suspense\") : 60113;\n\tvar q = b ? Symbol.for(\"react.suspense_list\") : 60120;\n\tvar r = b ? Symbol.for(\"react.memo\") : 60115;\n\tvar t = b ? Symbol.for(\"react.lazy\") : 60116;\n\tvar v = b ? Symbol.for(\"react.block\") : 60121;\n\tvar w = b ? Symbol.for(\"react.fundamental\") : 60117;\n\tvar x = b ? Symbol.for(\"react.responder\") : 60118;\n\tvar y = b ? Symbol.for(\"react.scope\") : 60119;\n\tfunction z(a) {\n\t\tif (\"object\" === typeof a && null !== a) {\n\t\t\tvar u = a.$$typeof;\n\t\t\tswitch (u) {\n\t\t\t\tcase c: switch (a = a.type, a) {\n\t\t\t\t\tcase l:\n\t\t\t\t\tcase m:\n\t\t\t\t\tcase e:\n\t\t\t\t\tcase g:\n\t\t\t\t\tcase f:\n\t\t\t\t\tcase p: return a;\n\t\t\t\t\tdefault: switch (a = a && a.$$typeof, a) {\n\t\t\t\t\t\tcase k:\n\t\t\t\t\t\tcase n:\n\t\t\t\t\t\tcase t:\n\t\t\t\t\t\tcase r:\n\t\t\t\t\t\tcase h: return a;\n\t\t\t\t\t\tdefault: return u;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcase d: return u;\n\t\t\t}\n\t\t}\n\t}\n\tfunction A(a) {\n\t\treturn z(a) === m;\n\t}\n\texports.AsyncMode = l;\n\texports.ConcurrentMode = m;\n\texports.ContextConsumer = k;\n\texports.ContextProvider = h;\n\texports.Element = c;\n\texports.ForwardRef = n;\n\texports.Fragment = e;\n\texports.Lazy = t;\n\texports.Memo = r;\n\texports.Portal = d;\n\texports.Profiler = g;\n\texports.StrictMode = f;\n\texports.Suspense = p;\n\texports.isAsyncMode = function(a) {\n\t\treturn A(a) || z(a) === l;\n\t};\n\texports.isConcurrentMode = A;\n\texports.isContextConsumer = function(a) {\n\t\treturn z(a) === k;\n\t};\n\texports.isContextProvider = function(a) {\n\t\treturn z(a) === h;\n\t};\n\texports.isElement = function(a) {\n\t\treturn \"object\" === typeof a && null !== a && a.$$typeof === c;\n\t};\n\texports.isForwardRef = function(a) {\n\t\treturn z(a) === n;\n\t};\n\texports.isFragment = function(a) {\n\t\treturn z(a) === e;\n\t};\n\texports.isLazy = function(a) {\n\t\treturn z(a) === t;\n\t};\n\texports.isMemo = function(a) {\n\t\treturn z(a) === r;\n\t};\n\texports.isPortal = function(a) {\n\t\treturn z(a) === d;\n\t};\n\texports.isProfiler = function(a) {\n\t\treturn z(a) === g;\n\t};\n\texports.isStrictMode = function(a) {\n\t\treturn z(a) === f;\n\t};\n\texports.isSuspense = function(a) {\n\t\treturn z(a) === p;\n\t};\n\texports.isValidElementType = function(a) {\n\t\treturn \"string\" === typeof a || \"function\" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || \"object\" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);\n\t};\n\texports.typeOf = z;\n}));\n\n//#endregion\n//#region ../../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js\nvar require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = require_react_is_production_min();\n}));\n\n//#endregion\n//#region ../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\nvar require_hoist_non_react_statics_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar reactIs = require_react_is();\n\t/**\n\t* Copyright 2015, Yahoo! Inc.\n\t* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n\t*/\n\tvar REACT_STATICS = {\n\t\tchildContextTypes: true,\n\t\tcontextType: true,\n\t\tcontextTypes: true,\n\t\tdefaultProps: true,\n\t\tdisplayName: true,\n\t\tgetDefaultProps: true,\n\t\tgetDerivedStateFromError: true,\n\t\tgetDerivedStateFromProps: true,\n\t\tmixins: true,\n\t\tpropTypes: true,\n\t\ttype: true\n\t};\n\tvar KNOWN_STATICS = {\n\t\tname: true,\n\t\tlength: true,\n\t\tprototype: true,\n\t\tcaller: true,\n\t\tcallee: true,\n\t\targuments: true,\n\t\tarity: true\n\t};\n\tvar FORWARD_REF_STATICS = {\n\t\t\"$$typeof\": true,\n\t\trender: true,\n\t\tdefaultProps: true,\n\t\tdisplayName: true,\n\t\tpropTypes: true\n\t};\n\tvar MEMO_STATICS = {\n\t\t\"$$typeof\": true,\n\t\tcompare: true,\n\t\tdefaultProps: true,\n\t\tdisplayName: true,\n\t\tpropTypes: true,\n\t\ttype: true\n\t};\n\tvar TYPE_STATICS = {};\n\tTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\n\tTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\tfunction getStatics(component) {\n\t\tif (reactIs.isMemo(component)) return MEMO_STATICS;\n\t\treturn TYPE_STATICS[component[\"$$typeof\"]] || REACT_STATICS;\n\t}\n\tvar defineProperty = Object.defineProperty;\n\tvar getOwnPropertyNames = Object.getOwnPropertyNames;\n\tvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\n\tvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\tvar getPrototypeOf = Object.getPrototypeOf;\n\tvar objectPrototype = Object.prototype;\n\tfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n\t\tif (typeof sourceComponent !== \"string\") {\n\t\t\tif (objectPrototype) {\n\t\t\t\tvar inheritedComponent = getPrototypeOf(sourceComponent);\n\t\t\t\tif (inheritedComponent && inheritedComponent !== objectPrototype) hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n\t\t\t}\n\t\t\tvar keys = getOwnPropertyNames(sourceComponent);\n\t\t\tif (getOwnPropertySymbols) keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n\t\t\tvar targetStatics = getStatics(targetComponent);\n\t\t\tvar sourceStatics = getStatics(sourceComponent);\n\t\t\tfor (var i = 0; i < keys.length; ++i) {\n\t\t\t\tvar key = keys[i];\n\t\t\t\tif (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n\t\t\t\t\tvar descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdefineProperty(targetComponent, key, descriptor);\n\t\t\t\t\t} catch (e) {}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn targetComponent;\n\t}\n\tmodule.exports = hoistNonReactStatics;\n}));\n\n//#endregion\n//#region ../../library/src/components/hoc/hoistNonReactStatic.ts\nconst hoistNonReactStatic = /* @__PURE__ */ (() => require_hoist_non_react_statics_cjs())();\n\n//#endregion\n//#region ../../library/src/components/hoc/WithNavigator.tsx\n/**\n* @internal\n* @deprecated - Will be replaced. Use navigation action instead.\n*/\nfunction WithNavigator(BaseComponent, navigationTransition, navigationTransitionDirection, NavigationTarget, navigationTransitionOptions) {\n\tconst InternalWithNavigator = class extends React.Component {\n\t\trender() {\n\t\t\treturn /* @__PURE__ */ jsx(NavigationContext.Consumer, { children: (navigation) => {\n\t\t\t\tconst navigate = () => {\n\t\t\t\t\tif (navigationTransition === \"goBack\") {\n\t\t\t\t\t\tnavigation.goBack();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (!NavigationTarget) return;\n\t\t\t\t\tconst component = NavigationTarget();\n\t\t\t\t\tconst appearsFrom = transitionDirectionToSide(navigationTransitionDirection);\n\t\t\t\t\tswitch (navigationTransition) {\n\t\t\t\t\t\tcase \"instant\":\n\t\t\t\t\t\t\tnavigation.instant(component);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"fade\":\n\t\t\t\t\t\t\tnavigation.fade(component);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"modal\":\n\t\t\t\t\t\t\tnavigation.modal(component, navigationTransitionOptions);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"push\":\n\t\t\t\t\t\t\tnavigation.push(component, { appearsFrom });\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"overlay\":\n\t\t\t\t\t\t\tnavigation.overlay(component, {\n\t\t\t\t\t\t\t\t...navigationTransitionOptions,\n\t\t\t\t\t\t\t\tappearsFrom\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"flip\":\n\t\t\t\t\t\t\tnavigation.flip(component, { appearsFrom });\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"magicMotion\": navigation.magicMotion(component, {});\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tconst { onTap, ...props } = this.props;\n\t\t\t\tif (onTap) props.onTap = (...args) => {\n\t\t\t\t\tonTap.apply(this, args);\n\t\t\t\t\tnavigate.apply(this, args);\n\t\t\t\t};\n\t\t\t\telse props.onTap = navigate;\n\t\t\t\treturn /* @__PURE__ */ jsx(BaseComponent, { ...props });\n\t\t\t} });\n\t\t}\n\t};\n\thoistNonReactStatic(InternalWithNavigator, BaseComponent);\n\treturn InternalWithNavigator;\n}\nfunction transitionDirectionToSide(direction) {\n\tswitch (direction) {\n\t\tcase \"left\": return \"right\";\n\t\tcase \"right\": return \"left\";\n\t\tcase \"up\": return \"bottom\";\n\t\tcase \"down\": return \"top\";\n\t}\n}\n\n//#endregion\n//#region ../../library/src/components/AnimateLayout/AnimateSharedLayout.tsx\n/**\n* @public\n* @deprecated Since Framer Motion 5 AnimateSharedLayout is no longer required for shared layout transitions.\n* You can use the `layoutId` prop and components will animate from one to another.\n* If you need to group components that affect each other's layout or scope shared layout animation, consider using `LayoutGroup` instead.\n*/\nconst AnimateSharedLayout = (props) => props.children;\n\n//#endregion\n//#region ../../library/src/render/types/PropertyControls.ts\n/**\n* Used by the {@link PropertyControls} and specifies the type of user interface for receiving\n* input. Each field has a distinct set of properties though they all accept `title` and `hidden`\n* properties.\n*\n* @remarks\n* ```javascript\n* export function MyComponent({ title }) {\n*   return <div>{title}</div>\n* }\n*\n* addPropertyControls(MyComponent, {\n*   title: {\n*     type: ControlType.String,\n*     title: \"Title\",\n*     hidden: (props) => true\n*   },\n* }\n* ```\n* @public\n*/\nlet ControlType = /* @__PURE__ */ function(ControlType) {\n\t/**\n\t* A control that displays an on / off checkbox. The associated property will be `true` or `false`,\n\t* depending on the state of the checkbox. Includes an optional `defaultValue`, which is set to `true` by default. You can also customize the labels displayed in the property panel with the `enabledTitle` and `disabledTitle` properties.\n\t*\n\t* @remarks\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   return <div>{props.showText ? \"Hello World\" : null}</div>\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   showText: {\n\t*     type: ControlType.Boolean,\n\t*     title: \"Show Text\",\n\t*     defaultValue: true,\n\t*     enabledTitle: \"On\",\n\t*     disabledTitle: \"Off\",\n\t*   },\n\t* })\n\t* ```\n\t*/\n\tControlType[\"Boolean\"] = \"boolean\";\n\t/**\n\t* A control that accepts any numeric value. This will be provided directly as a property.\n\t* Will display an input field with a range slider by default. The\n\t* `displayStepper` option can be enabled to include a stepper control instead.\n\t*\n\t* @remarks\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   return <motion.div style={{ rotate: props.rotation }}>{props.rotation}</motion.div>\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   rotation: {\n\t*     type: ControlType.Number,\n\t*     defaultValue: 0,\n\t*     min: 0,\n\t*     max: 360,\n\t*     unit: \"deg\",\n\t*     step: 0.1,\n\t*     displayStepper: true,\n\t*   },\n\t* })\n\t* ```\n\t*/\n\tControlType[\"Number\"] = \"number\";\n\t/**\n\t* A control whose associated property is a `MotionValue<T>`. `valueType` describes its scalar\n\t* contents, and `defaultValue` is the initial scalar value, not a shared MotionValue instance.\n\t*/\n\tControlType[\"MotionValue\"] = \"motionvalue\";\n\t/**\n\t* A control for a number with a selectable unit suffix or a literal value. The associated\n\t* property is a string, such as `\"16px\"`, `\"50%\"`, or `\"auto\"`.\n\t*\n\t* @public\n\t*/\n\tControlType[\"Dimension\"] = \"dimension\";\n\t/**\n\t* A control that accepts plain text values. This will be provided directly as a property.\n\t* Will display an input field with an optional placeholder value.\n\t* If `obscured` attribute is set to true a password input field will be used instead of a regular text input\n\t* so that the value in the input will be visually obscured, yet still be available as plain text inside the component.\n\t* `displayTextArea` can be enabled to display a multi-line input area instead.\n\t*\n\t* @remarks\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   return <div>{props.title} — {props.body}</div>\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   title: {\n\t*     type: ControlType.String,\n\t*     defaultValue: \"Framer\",\n\t*     placeholder: \"Type something…\",\n\t*   },\n\t*   body: {\n\t*     type: ControlType.String,\n\t*     defaultValue: \"Lorem ipsum dolor sit amet.\",\n\t*     placeholder: \"Type something…\",\n\t*     displayTextArea: true,\n\t*   },\n\t* })\n\t* ```\n\t*/\n\tControlType[\"String\"] = \"string\";\n\t/**\n\t* @internal\n\t* This is used by framer internally. Use at your own risk. Will contain a string with html\n\t* markup containing h1, h2, etc., paragraphs, and inline styles.\n\t*/\n\tControlType[\"RichText\"] = \"richtext\";\n\t/**\n\t* Deprecated, please use ControlType.Padding and ControlType.BorderRadius. You should be able\n\t* to switch to the new control type without data loss. Be aware that these new controls only\n\t* have a single value (e.g. `10px` or `10px 20px 30px 40px`).\n\t*\n\t* A control that can be used to take a single number or four distinct numeric input fields. The\n\t* typical use case for this control is for visual properties like border, padding or margin. It\n\t* will display an input field to accept a single value, alongside a segmented control allowing\n\t* four distinct values to be provided.\n\t*\n\t* You can also set the default value for each valueKey as well as the toggleKey by setting\n\t* their values on `defaultProps`.\n\t*\n\t* @deprecated Please use {@link ControlType.Padding} and ${@link ControlType.BorderRadius}. You\n\t* should be able to switch to the new control type without data loss. Be aware that these new controls only\n\t* have a single value (e.g. `10px` or `10px 20px 30px 40px`).\n\t* @remarks\n\t* ```javascript\n\t* export function MyComponent({\n\t*   radius = 50,\n\t*   topLeft,\n\t*   topRight,\n\t*   bottomRight,\n\t*   bottomLeft,\n\t*   isMixed = false,\n\t* }) {\n\t*   const borderRadius = isMixed\n\t*     ? `${topLeft}px ${topRight}px ${bottomRight}px ${bottomLeft}px`\n\t*     : `${radius}px`\n\t*   return <div style={{ background: \"red\", borderRadius }}></div>\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   radius: {\n\t*     type: ControlType.FusedNumber,\n\t*     title: \"Radius\",\n\t*     defaultValue: 50,\n\t*     toggleKey: \"isMixed\",\n\t*     toggleTitles: [\"All\", \"Individual\"],\n\t*     valueKeys: [\"topLeft\", \"topRight\", \"bottomRight\", \"bottomLeft\"],\n\t*     valueLabels: [\"NW\", \"NE\", \"SE\", \"SW\"],\n\t*     min: 0,\n\t*   },\n\t* })\n\t*\n\t* // Set the default value for each valueKey as well as the toggleKey by setting their values on `defaultProps`:\n\t* MyComponent.defaultProps = {\n\t*     radius: 10,\n\t*     isMixed: true,\n\t*     topLeft: 5,\n\t*     topRight: 15,\n\t*     bottomRight: 5,\n\t*     bottomLeft: 15,\n\t* }\n\t* ```\n\t*/\n\tControlType[\"FusedNumber\"] = \"fusednumber\";\n\t/**\n\t* A property control that represents a list of options. The list contains primitive values and each\n\t* value has to be unique. The selected option will be provided as a property. This control is displayed\n\t* as a dropdown menu in which a user can select one of the items.\n\t* `displaySegmentedControl` can be enabled to display a segmented control instead.\n\t*\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   const value = props.value || \"a\"\n\t*   const colors = { a: \"red\", b: \"green\", c: \"blue\" }\n\t*   return <div style={{ background: colors[value] }}>{value}</div>\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   value: {\n\t*     type: ControlType.Enum,\n\t*     defaultValue: \"a\",\n\t*     options: [\"a\", \"b\", \"c\"],\n\t*     optionTitles: [\"Option A\", \"Option B\", \"Option C\"],\n\t*   },\n\t* })\n\t* ```\n\t*/\n\tControlType[\"Enum\"] = \"enum\";\n\t/**\n\t* Deprecated, please use {@link ControlType.Enum} and enable displaySegmentedControl.\n\t*\n\t* @deprecated Please use {@link ControlType.Enum} and enable displaySegmentedControl.\n\t* @remarks\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   const value = props.value || \"a\"\n\t*   const colors = { a: \"red\", b: \"green\", c: \"blue\" }\n\t*   return <div style={{ background: colors[value] }}>{value}</div>\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   value: {\n\t*     type: ControlType.SegmentedEnum,\n\t*     defaultValue: \"a\",\n\t*     options: [\"a\", \"b\", \"c\"],\n\t*     optionTitles: [\"A\", \"B\", \"C\"],\n\t*   },\n\t* })\n\t* ```\n\t*/\n\tControlType[\"SegmentedEnum\"] = \"segmentedenum\";\n\t/**\n\t* A control that represents a color value. It will be included in the component props as a string.\n\t* This control is displayed as a color field and will provide the selected color in either\n\t* HEX (`\"#fff\"`) or HSL (`hsla(203, 87%, 50%, 0.5)`) notation, depending on\n\t* whether there is an alpha channel.\n\t*\n\t* @remarks\n\t* ```javascript\n\t* function MyComponent(props) {\n\t*   return <div style={{ background: props.background }} />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   background: {\n\t*     type: ControlType.Color,\n\t*     defaultValue: \"#fff\",\n\t*   },\n\t* })\n\t* ```\n\t*/\n\tControlType[\"Color\"] = \"color\";\n\t/**\n\t* @deprecated Please use {@link ControlType.ResponsiveImage}’s `src` field instead.\n\t*/\n\tControlType[\"Image\"] = \"image\";\n\t/**\n\t* A control that allows the user to pick an image resource. Displayed as an image picker\n\t* with associated file picker.\n\t*\n\t* The chosen image will be provided in the component props as an object with `src` and `srcSet` properties:\n\t* - `src`: a string containing the URL of a full resolution image\n\t* - `srcSet`: an optional string with scaled down image variants. This is typically passed into [`<img srcSet>`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset)\n\t*   and helps the browser to load a smaller image when a full-size one isn’t necessary.\n\t* - `alt`: an optional description of the image.\n\t*\n\t* @remarks\n\t* ```javascript\n\t* function MyComponent(props) {\n\t*   return <img src={props.image.src} srcSet={props.image.srcSet} alt={props.image.alt} />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   image: {\n\t*     type: ControlType.ResponsiveImage,\n\t*   }\n\t* })\n\t* ```\n\t*/\n\tControlType[\"ResponsiveImage\"] = \"responsiveimage\";\n\t/**\n\t* A control that allows the user to pick a file resource. It will be\n\t* included in the component props as an URL string.\n\t* Displayed as an file picker that will open a native file browser. The\n\t* selected file will be provided as a fully qualified URL. The\n\t* `allowedFileTypes` property must be provided to specify acceptable file\n\t* types.\n\t*\n\t* @remarks\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   return (\n\t*     <div>\n\t*       <video\n\t*         style={{ objectFit: \"contain\", props.width, props.height }}\n\t*         src={props.filepath}\n\t*         controls\n\t*       />\n\t*     </div>\n\t*   )\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   filepath: {\n\t*     type: ControlType.File,\n\t*     allowedFileTypes: [\"mov\"],\n\t*   },\n\t* })\n\t* ```\n\t*/\n\tControlType[\"File\"] = \"file\";\n\t/**\n\t* Deprecated, please use {@link ControlType.Slot} instead. The new slot type doesn't need to be\n\t* nested within an array control if you want to allow for multiple slot items to be connected.\n\t* By default the new slot type allows for an infinite amount of items. You can limit the amount\n\t* of items by setting the `maxCount` property.\n\t*\n\t* @deprecated Please use {@link ControlType.Slot} instead.\n\t*/\n\tControlType[\"ComponentInstance\"] = \"componentinstance\";\n\t/**\n\t* A control that references 1 to many other components on the canvas, included in the component\n\t* props as a React node. This control by default allows any number of components to be linked,\n\t* but this can be limited by setting the `maxCount` property.\n\t*\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   return <div>{props.children}</div>\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   children: {\n\t*     type: ControlType.Slot,\n\t*     maxCount: 5,\n\t*   },\n\t* })\n\t* ```\n\t*/\n\tControlType[\"Slot\"] = \"slot\";\n\t/**\n\t* A control that allows multiple values per `ControlType`, provided as an\n\t* array via properties. For most control types this will be displayed as an\n\t* additional section in the properties panel allowing as many fields to be\n\t* provided as required.\n\t*\n\t* For a {@link ControlType.ComponentInstance} the Frame will also gain an\n\t* additional outlet control on the Canvas that allows links to be created\n\t* between frames.\n\t*\n\t* Group properties together by using an object control.\n\t*\n\t* For multiple {@link ControlType.FusedNumber} values, you can pass in an\n\t* array of single values as the React default prop.\n\t*\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   const frames = props.images.map(image => <img src={image.src} style={{ width: \"100%\", height: \"100%\" }} />)\n\t*   return <div>{frames}</div>\n\t* }\n\t*\n\t* // Add a repeatable image property control\n\t* addPropertyControls(MyComponent, {\n\t*   images: {\n\t*     type: ControlType.Array,\n\t*     control: {\n\t*       type: ControlType.ResponsiveImage\n\t*     }\n\t*   },\n\t*   // Allow up to five items\n\t*   maxCount: 5,\n\t* })\n\t*\n\t* // Add a multi-connector to your component to connect components on the canvas\n\t* addPropertyControls(MyComponent, {\n\t*   children: {\n\t*     type: ControlType.Array,\n\t*     control: {\n\t*       type: ControlType.ComponentInstance\n\t*     },\n\t*     maxCount: 5,\n\t*   },\n\t* })\n\t*\n\t* // Add a list of objects\n\t* addPropertyControls(MyComponent, {\n\t*   myArray: {\n\t*     type: ControlType.Array,\n\t*     control: {\n\t*       type: ControlType.Object,\n\t*       controls: {\n\t*         title: { type: ControlType.String, defaultValue: \"Employee\" },\n\t*         avatar: { type: ControlType.ResponsiveImage },\n\t*       },\n\t*     },\n\t*     defaultValue: [\n\t*       { title: \"Jorn\" },\n\t*       { title: \"Koen\" },\n\t*     ],\n\t*   },\n\t* })\n\t*\n\t* // For multiple values, you can pass in an array of single values as the React default prop.\n\t* MyComponent.defaultProps = {\n\t*    paddings: [5, 10, 15],\n\t* }\n\t* ```\n\t*\n\t*/\n\tControlType[\"Array\"] = \"array\";\n\t/**\n\t* A control that exposes events in the prototyping panel within the Framer UI. When choosing an event from the prototyping panel, you can select from a list of actions to trigger.\n\t* Use `payload` to describe the values the handler is called with, so they can be bound to actions.\n\t*\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   return <motion.div onTap={props.onTap} />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   onTap: {\n\t*     type: ControlType.EventHandler,\n\t*   },\n\t* })\n\t* ```\n\t*/\n\tControlType[\"EventHandler\"] = \"eventhandler\";\n\t/**\n\t* @internal\n\t* A control used by Framer internally to associate an implicit change handler with another\n\t* control.\n\t*/\n\tControlType[\"ChangeHandler\"] = \"changehandler\";\n\t/**\n\t* A control that allows for editing Framer Motion transition options within the Framer UI.\n\t*\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   return (\n\t*       <motion.div\n\t*          animate={{ scale: 2 }}\n\t*          transition={props.transition}\n\t*       />\n\t*   )\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   transition: {\n\t*       type: ControlType.Transition,\n\t*   },\n\t* })\n\t* ```\n\t*/\n\tControlType[\"Transition\"] = \"transition\";\n\t/**\n\t* A control that allows for exposing shadows. The value will be provided as\n\t* a string with valid CSS box-shadow values.\n\t*\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*  return <motion.div style={{boxShadow: props.shadow}} />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*  shadow: {\n\t*      type: ControlType.BoxShadow,\n\t*  }\n\t* })\n\t*/\n\tControlType[\"BoxShadow\"] = \"boxshadow\";\n\t/**\n\t* A control that allows for exposing external or internal links. Preferred over `ControlType.String` when dealing with links since it allows internal pages to be selected in the UI.\n\t*\n\t* ```javascript\n\t* import { addPropertyControls, ControlType, Link } from \"framer\"\n\t*\n\t* export function MyComponent(props) {\n\t*   return (\n\t*     // Wrap anchor tags with the Link component so that internal/external links are routed correctly.\n\t*     <Link href={props.link}>\n\t*       <a>My Link</a>\n\t*     </Link>\n\t*   )\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   link: {\n\t*     type: ControlType.Link,\n\t*   }\n\t* })\n\t* ```\n\t*/\n\tControlType[\"Link\"] = \"link\";\n\t/**\n\t* A control that allows for exposing dates. The value will be provided in toJSON() string format.\n\t*\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   const formattedDate = React.useMemo(() => {\n\t*     return new Date(props.date).toLocaleDateString()\n\t*   }, [props.date])\n\t*   return <div>{formattedDate}</div>\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   date: {\n\t*     type: ControlType.Date,\n\t*     displayTime: true\n\t*   }\n\t* })\n\t* ```\n\t*/\n\tControlType[\"Date\"] = \"date\";\n\t/**\n\t* A control that allows for grouping multiple properties as an object.\n\t*\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   return <div style={{ opacity: props.myObject.opacity, background: props.myObject.tint }} />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   myObject: {\n\t*     type: ControlType.Object,\n\t*     controls: {\n\t*       opacity: { type: ControlType.Number },\n\t*       tint: { type: ControlType.Color },\n\t*     }\n\t*   }\n\t* })\n\t* ```\n\t*/\n\tControlType[\"Object\"] = \"object\";\n\t/**\n\t* A control that allows for selecting a font to be used in the component.\n\t*\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   return <div style={props.customFont} />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   customFont: {\n\t*     type: ControlType.Font,\n\t*     title: \"Custom Font\",\n\t*     defaultValue: {\n\t*       textAlign: \"start\", // or \"end\", \"left\", \"right\", \"center\", or \"justify\"\n\t*       fontSize: 16, // or \"16px\", or \"16rem\"\n\t*       letterSpacing: 0.1, // or \"0.1em\", or \"1px\"\n\t*       lineHeight: 1.5, // or \"1.5em\", or \"20px\", or \"150%\"\n\t*     },\n\t*     defaultFontType: \"sans-serif\", // or \"serif\", or \"monospace\"\n\t*     defaultFontSize: \"16px\", // or \"16rem\", or \"16pt\"\n\t*     displayTextAlignment: true,\n\t*     displayFontSize: true,\n\t*     controls: \"basic\", // or \"extended\", to show more options\n\t*   }\n\t* })\n\t* ```\n\t*/\n\tControlType[\"Font\"] = \"font\";\n\t/**\n\t* @internal\n\t* A control that allows for selecting a page, a path to that page will be provided during\n\t* rendering.\n\t*\n\t* ```javascript\n\t* export function MyComponent(props) {\n\t*   return <div />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   scope: {\n\t*     type: ControlType.PageScope,\n\t*   }\n\t* })\n\t* ```\n\t*/\n\tControlType[\"PageScope\"] = \"pagescope\";\n\t/**\n\t* @internal\n\t* A control that allows specifying a scroll section on the current web page\n\t* which will be provided as a React ref.\n\t*/\n\tControlType[\"ScrollSectionRef\"] = \"scrollsectionref\";\n\t/**\n\t* @internal\n\t* A control that allows specifying a custom cursor that should be shown\n\t* when mousing over the element assigned.\n\t*/\n\tControlType[\"CustomCursor\"] = \"customcursor\";\n\t/**\n\t* @public\n\t* A control that represents a border.\n\t*\n\t* @remarks\n\t* ```javascript\n\t* function MyComponent(props) {\n\t*   return <div style={props.border} />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   border: {\n\t*     type: ControlType.Border,\n\t*     defaultValue: {\n\t*       borderWidth: 1,\n\t*       borderStyle: \"solid\",\n\t*       borderColor: \"rgba(0, 0, 0, 0.5)\",\n\t*     },\n\t*   }\n\t* })\n\t* ```\n\t*/\n\tControlType[\"Border\"] = \"border\";\n\t/**\n\t* @public\n\t* A control that allows specifying a web cursor that should be shown\n\t* when mousing over the element assigned.\n\t*/\n\tControlType[\"Cursor\"] = \"cursor\";\n\t/**\n\t* @public\n\t* A control that represents CSS padding.\n\t*\n\t* @remarks\n\t* ```javascript\n\t* function MyComponent({ padding }) {\n\t*   return <div style={{ padding }} />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   padding: {\n\t*     type: ControlType.Padding,\n\t*     defaultValue: \"8px\",\n\t*   }\n\t* })\n\t*/\n\tControlType[\"Padding\"] = \"padding\";\n\t/**\n\t* @public\n\t* A control that represents CSS border radius.\n\t*\n\t* @remarks\n\t* ```javascript\n\t* function MyComponent({ borderRadius }) {\n\t*   return <div style={{ borderRadius }} />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   borderRadius: {\n\t*     type: ControlType.BorderRadius,\n\t*     defaultValue: \"16px\",\n\t*     title: \"Radius\",\n\t*   }\n\t* })\n\t*/\n\tControlType[\"BorderRadius\"] = \"borderradius\";\n\t/**\n\t* A control that represents CSS gap.\n\t*\n\t* @remarks\n\t* ```javascript\n\t* function MyComponent({ gap }) {\n\t*   return <div style={{ gap, display: \"grid\" }} />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   gap: {\n\t*     type: ControlType.Gap,\n\t*     defaultValue: \"8px\",\n\t*   }\n\t* })\n\t*/\n\tControlType[\"Gap\"] = \"gap\";\n\t/**\n\t* @internal\n\t* A control that represents the id of a single collection item.\n\t*/\n\tControlType[\"CollectionReference\"] = \"collectionreference\";\n\t/**\n\t* @internal\n\t* A control that represents the ids of multiple collection items.\n\t*/\n\tControlType[\"MultiCollectionReference\"] = \"multicollectionreference\";\n\t/**\n\t* @public\n\t* A control that represents an id of a tracking event:\n\t* - Lowercase letters (a-z) and numbers (0-9) only\n\t* - Hyphens (-) as separators (no leading/trailing or consecutive hyphens)\n\t* - Valid: \"button-click\", \"form-submit\", \"video-play\", \"nav-item-1\"\n\t* - Invalid: \"Button-Click\", \"form--submit\", \"-button-click\", \"button_utils\"\n\t*\n\t*/\n\tControlType[\"TrackingId\"] = \"trackingid\";\n\t/**\n\t* @internal\n\t* A control that provides a React.ComponentInstance of a Vector from a predetermined Vector\n\t* Set.\n\t*\n\t* Not intended to be configurable in user code as it requires knowing global module ids to\n\t* support external vector sets.\n\t*\n\t* @remarks\n\t* ```javascript\n\t* function MyComponent({ Icon }) {\n\t*   return <Icon color=\"red\" />\n\t* }\n\t*\n\t* addPropertyControls(MyComponent, {\n\t*   Icon: {\n\t*     type: ControlType.VectorSetItem,\n\t*     setModuleId: \"yyy\", // Global module id of the Vector Set.\n\t*     defaultValue: {\n\t*       identifier: \"local-module:xxx/yyy:zzz\",\n\t*       moduleId: \"xxx\", // Global module id of the Vector.\n\t*     },\n\t*     title: \"Phosphor\",\n\t*   }\n\t* })\n\t*/\n\tControlType[\"VectorSetItem\"] = \"vectorsetitem\";\n\t/**\n\t* @internal\n\t* A control that allows for selecting one or more link rel values.\n\t*/\n\tControlType[\"LinkRelValues\"] = \"linkrelvalues\";\n\t/**\n\t* @internal\n\t* A control that stores a geographic location with coordinate, optional place name and address.\n\t*/\n\tControlType[\"Location\"] = \"location\";\n\t/**\n\t* @internal\n\t* A reference to a type that a module defines, such as shared options from `defineEnum`.\n\t*/\n\tControlType[\"SharedType\"] = \"sharedtype\";\n\treturn ControlType;\n}({});\n\n//#endregion\n//#region ../../library/src/modules/defineEnum.ts\n/**\n* Brands the objects that defineEnum creates. `Symbol.for`, because the runtime verifier runs its own copy of the\n* library, and a symbol from `Symbol()` would differ between that copy and the one a component imports.\n* @internal\n*/\nconst sharedEnumBrand = /* @__PURE__ */ Symbol.for(\"framer.sharedEnum\");\n/**\n* The key of a definition's module identifier, which serialized controls store instead of its options. The modules\n* Framer generates set it. `Symbol.for` for the same reason as `sharedEnumBrand`.\n* @internal\n*/\nconst sharedTypeIdentity = /* @__PURE__ */ Symbol.for(\"framer.sharedTypeIdentity\");\n/** @internal */\nfunction isSharedEnum(value) {\n\treturn isObject$1(value) && sharedEnumBrand in value;\n}\n/**\n* Defines a list of options that several controls share.\n* @internal\n*/\nfunction defineEnum(definition) {\n\tconst { options, localizedOptionTitles } = definition;\n\tconst optionTitles = options.map((option, index) => definition.optionTitles?.[index] ?? option);\n\tconst optionForTitle = (title) => {\n\t\tif (typeof title !== \"string\") return void 0;\n\t\tconst index = optionTitles.indexOf(title);\n\t\treturn index === -1 ? void 0 : options[index];\n\t};\n\treturn {\n\t\t[sharedEnumBrand]: true,\n\t\tkind: \"enum\",\n\t\toptions,\n\t\toptionTitles,\n\t\ttitleFor(value, locale) {\n\t\t\tif (typeof value !== \"string\") return void 0;\n\t\t\tconst index = options.indexOf(value);\n\t\t\tif (index === -1) return void 0;\n\t\t\tfor (let current = locale; current; current = current.fallback) {\n\t\t\t\tconst title = localizedOptionTitles?.[current.id]?.[index];\n\t\t\t\tif (title) return title;\n\t\t\t}\n\t\t\treturn optionTitles[index];\n\t\t},\n\t\toptionForTitle,\n\t\tgetValidValue(value, fallback) {\n\t\t\tif (typeof value === \"string\" && options.includes(value)) return value;\n\t\t\treturn optionForTitle(value) ?? (fallback !== void 0 && options.includes(fallback) ? fallback : void 0);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region ../../library/src/utils/applyControlDefaultsToReactDefaultProps.ts\nfunction isReactComponent(component) {\n\treturn isObject$1(component) || isFunction(component);\n}\nconst optionalKey = \"optional\";\nfunction controlIsOptional(control) {\n\treturn !!control && optionalKey in control && control[optionalKey] === true;\n}\nfunction getControlDefaultValue(control) {\n\ttry {\n\t\tswitch (control.type) {\n\t\t\tcase \"string\":\n\t\t\tcase \"collectionreference\":\n\t\t\tcase \"color\":\n\t\t\tcase \"date\":\n\t\t\tcase \"link\":\n\t\t\tcase \"boxshadow\":\n\t\t\tcase \"padding\":\n\t\t\tcase \"borderradius\":\n\t\t\tcase \"gap\":\n\t\t\tcase \"dimension\": return isString(control.defaultValue) ? control.defaultValue : void 0;\n\t\t\tcase \"sharedtype\": {\n\t\t\t\tif (!(\"definition\" in control) || !isSharedEnum(control.definition)) return void 0;\n\t\t\t\tconst { definition } = control;\n\t\t\t\tswitch (definition.kind) {\n\t\t\t\t\tcase \"enum\":\n\t\t\t\t\t\tif (!isString(control.defaultValue)) return void 0;\n\t\t\t\t\t\treturn definition.options.includes(control.defaultValue) ? control.defaultValue : void 0;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tdefinition.kind;\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase \"boolean\": return isBoolean(control.defaultValue) ? control.defaultValue : void 0;\n\t\t\tcase \"enum\":\n\t\t\t\tif (isUndefined(control.defaultValue)) return void 0;\n\t\t\t\treturn control.options.includes(control.defaultValue) ? control.defaultValue : void 0;\n\t\t\tcase \"fusednumber\":\n\t\t\tcase \"number\": return isNumber(control.defaultValue) ? control.defaultValue : void 0;\n\t\t\tcase \"transition\": return isObject$1(control.defaultValue) ? control.defaultValue : void 0;\n\t\t\tcase \"border\": return isObject$1(control.defaultValue) ? control.defaultValue : void 0;\n\t\t\tcase \"font\":\n\t\t\tcase \"location\": return isObject$1(control.defaultValue) ? control.defaultValue : void 0;\n\t\t\tcase \"linkrelvalues\": return isArray(control.defaultValue) ? control.defaultValue : void 0;\n\t\t\tcase \"multicollectionreference\": return isArray(control.defaultValue) ? control.defaultValue : void 0;\n\t\t\tcase \"object\": {\n\t\t\t\tconst value = isObject$1(control.defaultValue) ? control.defaultValue : {};\n\t\t\t\tif (isObject$1(control.controls)) applyControlDefaultsToDefaultProps(value, control.controls);\n\t\t\t\treturn value;\n\t\t\t}\n\t\t\tcase \"array\": return isArray(control.defaultValue) ? control.defaultValue : void 0;\n\t\t\tcase \"motionvalue\":\n\t\t\tcase \"file\":\n\t\t\tcase \"image\":\n\t\t\tcase \"richtext\":\n\t\t\tcase \"pagescope\":\n\t\t\tcase \"eventhandler\":\n\t\t\tcase \"changehandler\":\n\t\t\tcase \"segmentedenum\":\n\t\t\tcase \"responsiveimage\":\n\t\t\tcase \"componentinstance\":\n\t\t\tcase \"slot\":\n\t\t\tcase \"scrollsectionref\":\n\t\t\tcase \"customcursor\":\n\t\t\tcase \"cursor\":\n\t\t\tcase \"trackingid\":\n\t\t\tcase \"vectorsetitem\": return;\n\t\t\tdefault: return;\n\t\t}\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction applyControlDefaultsToDefaultProps(defaultProps, controls) {\n\tfor (const controlKey in controls) {\n\t\tconst control = controls[controlKey];\n\t\tif (!control) continue;\n\t\tconst currentDefault = defaultProps[controlKey];\n\t\tif (!isUndefined(currentDefault)) continue;\n\t\tif (controlIsOptional(control)) continue;\n\t\tconst defaultValue = getControlDefaultValue(control);\n\t\tif (isUndefined(defaultValue)) continue;\n\t\tdefaultProps[controlKey] = defaultValue;\n\t}\n}\nfunction getDefaultProps(component) {\n\tif (isObject$1(component.defaultProps)) return component.defaultProps;\n\tconst defaultProps = {};\n\tcomponent.defaultProps = defaultProps;\n\treturn defaultProps;\n}\nfunction applyControlDefaultsToReactDefaultProps(component, controls) {\n\tif (!isReactComponent(component)) return;\n\tapplyControlDefaultsToDefaultProps(getDefaultProps(component), controls);\n}\n\n//#endregion\n//#region ../../library/src/utils/outputControls.ts\nconst outputControlsKey = \"outputControls\";\nfunction setOutputControls(target, outputs) {\n\tObject.assign(target, { [outputControlsKey]: outputs });\n}\n\n//#endregion\n//#region ../../library/src/utils/addPropertyControls.ts\nfunction addPropertyControls(component, propertyControls, outputs) {\n\tObject.assign(component, { propertyControls });\n\tapplyControlDefaultsToReactDefaultProps(component, propertyControls);\n\tif (outputs !== void 0) setOutputControls(component, outputs);\n}\n/**\n* Get the property controls for a component\n* @param component - The component to retrieve the property controls for\n* @returns The property controls for the given component\n* @internal\n*/\nfunction getPropertyControls(component) {\n\treturn component.propertyControls;\n}\n\n//#endregion\n//#region ../../library/src/components/Device/usePrototypingMetaTags.ts\nfunction applyMetaTag(name, props) {\n\tlet tag = document.querySelector(`meta[name=\"${name}\"]`);\n\tif (!tag) {\n\t\ttag = document.createElement(\"meta\");\n\t\tdocument.getElementsByTagName(\"head\")[0]?.appendChild(tag);\n\t\ttag.setAttribute(\"name\", name);\n\t}\n\tfor (const [k, v] of Object.entries(props)) tag.setAttribute(k, v);\n}\nfunction usePrototypingMetaTags() {\n\tReact.useEffect(() => {\n\t\tapplyMetaTag(\"mobile-web-app-capable\", { content: \"yes\" });\n\t\tapplyMetaTag(\"apple-mobile-web-app-capable\", { content: \"yes\" });\n\t\tapplyMetaTag(\"apple-mobile-web-app-status-bar-style\", { content: \"black-translucent\" });\n\t\tapplyMetaTag(\"viewport\", { content: \"viewport-fit=cover, user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1\" });\n\t}, []);\n}\n\n//#endregion\n//#region ../../library/src/components/Device/DeviceCodeComponent.tsx\n/**\n* @internal\n*/\nconst DeviceCodeComponentInner = /* #__PURE__ */ withLibraryCSS(({ children, ...props }) => {\n\tusePrototypingMetaTags();\n\tconst deviceOptions = convertPropsToDeviceOptions(props, { forceOldClay: true });\n\tif (!deviceOptions) return /* @__PURE__ */ jsx(\"div\", {\n\t\t\"data-framer-component-type\": \"DeviceComponent\",\n\t\tclassName: \"no-device\",\n\t\tstyle: {\n\t\t\twidth: \"100%\",\n\t\t\theight: \"100%\"\n\t\t},\n\t\tchildren: /* @__PURE__ */ jsx(ProvideParentSize, {\n\t\t\tparentSize: 1,\n\t\t\tchildren\n\t\t})\n\t});\n\tconst child = Array.isArray(children) ? children[0] : children;\n\tconst resizedChild = child && React.isValidElement(child) ? React.cloneElement(child, {\n\t\twidth: deviceOptions.screenWidth,\n\t\theight: deviceOptions.screenHeight\n\t}) : null;\n\treturn /* @__PURE__ */ jsx(Device, {\n\t\tscaleTo: \"dynamic\",\n\t\tdeviceOptions,\n\t\tchildren: resizedChild\n\t});\n});\nconst DeviceCodeComponent = /* @__PURE__ */ (() => {\n\tconst { componentWidth: defaultWidth, componentHeight: defaultHeight } = getComponentSize(convertPropsToDeviceOptions(defaultDeviceProps, { forceOldClay: true }));\n\tDeviceCodeComponentInner.defaultProps = {\n\t\twidth: defaultWidth,\n\t\theight: defaultHeight,\n\t\t...defaultDeviceProps\n\t};\n\tconst deviceCodeComponentPresets = devicePresets.filter((preset) => deviceCodeComponentPresetIds.includes(preset.id));\n\taddPropertyControls(DeviceCodeComponentInner, {\n\t\tchildren: {\n\t\t\ttitle: \"Content\",\n\t\t\ttype: \"slot\",\n\t\t\tmaxCount: 1\n\t\t},\n\t\tpreset: {\n\t\t\ttype: \"enum\",\n\t\t\toptions: [\"no-device\", \"custom\"].concat(deviceCodeComponentPresets.map((preset) => preset.id)),\n\t\t\toptionTitles: [\"No Device\", \"Custom\"].concat(deviceCodeComponentPresets.map((preset) => preset.title))\n\t\t},\n\t\tcustomWidth: {\n\t\t\ttitle: \"Width\",\n\t\t\ttype: \"number\",\n\t\t\tmin: 0,\n\t\t\tdisplayStepper: true,\n\t\t\thidden: (props) => props.preset !== \"custom\"\n\t\t},\n\t\tcustomHeight: {\n\t\t\ttitle: \"Height\",\n\t\t\ttype: \"number\",\n\t\t\tmin: 0,\n\t\t\tdisplayStepper: true,\n\t\t\thidden: (props) => props.preset !== \"custom\"\n\t\t},\n\t\tcustomBezel: {\n\t\t\ttitle: \"Bezel\",\n\t\t\ttype: \"fusednumber\",\n\t\t\tmin: 0,\n\t\t\ttoggleKey: \"isMixedBezel\",\n\t\t\ttoggleTitles: [\"a\", \"b\"],\n\t\t\tvalueKeys: [\n\t\t\t\t\"bezelTop\",\n\t\t\t\t\"bezelRight\",\n\t\t\t\t\"bezelBottom\",\n\t\t\t\t\"bezelLeft\"\n\t\t\t],\n\t\t\tvalueLabels: [\n\t\t\t\t\"T\",\n\t\t\t\t\"R\",\n\t\t\t\t\"B\",\n\t\t\t\t\"L\"\n\t\t\t],\n\t\t\thidden: (props) => props.preset !== \"custom\"\n\t\t},\n\t\tcustomBezelRadius: {\n\t\t\ttitle: \"Bezel radius\",\n\t\t\ttype: \"number\",\n\t\t\tmin: 0,\n\t\t\tdisplayStepper: true,\n\t\t\thidden: (props) => props.preset !== \"custom\"\n\t\t},\n\t\tcustomScreenRadius: {\n\t\t\ttitle: \"Screen radius\",\n\t\t\ttype: \"number\",\n\t\t\tmin: 0,\n\t\t\tdisplayStepper: true,\n\t\t\thidden: (props) => props.preset !== \"custom\"\n\t\t},\n\t\torientation: {\n\t\t\ttype: \"enum\",\n\t\t\tdisplaySegmentedControl: true,\n\t\t\toptions: [\"portrait\", \"landscape\"],\n\t\t\toptionTitles: [\"Portrait\", \"Landscape\"],\n\t\t\toptionIcons: [\"orientation-portrait\", \"orientation-landscape\"],\n\t\t\thidden: (props) => !!props.preset && !supportsOrientation(props.preset)\n\t\t},\n\t\tskin: {\n\t\t\ttitle: \"Device\",\n\t\t\ttype: \"enum\",\n\t\t\tdisplaySegmentedControl: true,\n\t\t\toptions: [\"realistic\", \"clay\"],\n\t\t\toptionTitles: [\"Realistic\", \"Clay\"],\n\t\t\tdefaultValue: \"clay\",\n\t\t\thidden: (props) => !!props.preset && !supportsRealisticSkin(props.preset)\n\t\t},\n\t\ttheme: {\n\t\t\ttype: \"enum\",\n\t\t\tdisplaySegmentedControl: true,\n\t\t\toptions: [\"light\", \"dark\"],\n\t\t\toptionTitles: [\"Light\", \"Dark\"],\n\t\t\thidden: (props) => !!props.preset && !supportsThemes(props.preset, props.skin)\n\t\t},\n\t\tshadow: {\n\t\t\ttype: \"boolean\",\n\t\t\tenabledTitle: \"On\",\n\t\t\tdisabledTitle: \"Off\",\n\t\t\thidden: ({ skin, preset }) => preset !== \"custom\" && skin === \"realistic\" || preset === \"no-device\"\n\t\t},\n\t\thand: {\n\t\t\ttype: \"enum\",\n\t\t\toptions: [\n\t\t\t\tnull,\n\t\t\t\t\"hand-1\",\n\t\t\t\t\"hand-2\"\n\t\t\t],\n\t\t\toptionTitles: [\n\t\t\t\t\"None\",\n\t\t\t\t\"Model 1\",\n\t\t\t\t\"Model 2\"\n\t\t\t],\n\t\t\thidden: (props) => !supportsHand(props)\n\t\t},\n\t\tbackgroundColor: {\n\t\t\ttype: \"color\",\n\t\t\ttitle: \"Background\",\n\t\t\toptional: true,\n\t\t\thidden: ({ preset }) => preset === \"no-device\"\n\t\t}\n\t});\n\treturn DeviceCodeComponentInner;\n})();\nfunction supportsOrientation(presetId) {\n\tif (presetId === \"no-device\") return false;\n\tif (presetId === \"custom\") return true;\n\treturn !getDevicePreset(presetId).disableRotation;\n}\nfunction supportsRealisticSkin(presetId) {\n\tif (presetId === \"custom\" || presetId === \"no-device\") return false;\n\treturn !!getDevicePreset(presetId).realisticImage;\n}\nfunction supportsThemes(presetId, skin) {\n\tif (presetId === \"no-device\") return false;\n\tif (presetId === \"custom\" || skin !== \"realistic\") return true;\n\tconst realisticImage = getDevicePreset(presetId).realisticImage;\n\tif (realisticImage === void 0) return true;\n\tif (colorIdForTheme(\"dark\", realisticImage.availableColors) !== void 0) return true;\n\treturn false;\n}\n\n//#endregion\n//#region ../../library/src/utils/events.ts\nfunction pointForEvent(event, customTarget = null) {\n\tlet target;\n\tif (customTarget instanceof HTMLElement) target = customTarget;\n\tif (!target && event.target instanceof HTMLElement) target = event.target;\n\tif (!target) return {\n\t\tx: event.pageX,\n\t\ty: event.pageY\n\t};\n\tif (typeof safeWindow.webkitConvertPointFromPageToNode === \"function\") {\n\t\tlet webkitPoint = new safeWindow.WebKitPoint(event.pageX, event.pageY);\n\t\twebkitPoint = safeWindow.webkitConvertPointFromPageToNode(target, webkitPoint);\n\t\treturn {\n\t\t\tx: webkitPoint.x,\n\t\t\ty: webkitPoint.y\n\t\t};\n\t}\n\tconst rect = target.getBoundingClientRect();\n\tconst width = parseFloat(target.style.width);\n\tconst height = parseFloat(target.style.height);\n\tconst scale = {\n\t\tx: width ? width / rect.width : 1,\n\t\ty: height ? height / rect.height : 1\n\t};\n\treturn {\n\t\tx: scale.x * (event.pageX - rect.left - target.clientLeft + target.scrollLeft),\n\t\ty: scale.y * (event.pageY - rect.top - target.clientTop + target.scrollTop)\n\t};\n}\n\n//#endregion\n//#region ../../library/src/events/FramerEvent.ts\n/**\n* @public\n*/\nvar FramerEvent = class FramerEvent {\n\toriginalEvent;\n\tsession;\n\t/**\n\t* @internal\n\t*/\n\ttime = Date.now();\n\t/**\n\t* @internal\n\t*/\n\tloopTime = MainLoop.time;\n\t/**\n\t* @internal\n\t*/\n\tpoint;\n\t/**\n\t* @internal\n\t*/\n\tdevicePoint;\n\t/**\n\t* @internal\n\t*/\n\ttarget;\n\t/**\n\t* @internal\n\t*/\n\tdelta;\n\t/**\n\t* @internal\n\t*/\n\tconstructor(originalEvent, session) {\n\t\tthis.originalEvent = originalEvent;\n\t\tthis.session = session;\n\t\tconst customTarget = session?.startEvent?.target || originalEvent.target;\n\t\tconst eventLike = FramerEvent.eventLikeFromOriginalEvent(originalEvent);\n\t\tthis.point = pointForEvent(eventLike, customTarget);\n\t\tconst deviceTarget = session?.originElement ? session.originElement : document.body;\n\t\tthis.devicePoint = pointForEvent(eventLike, deviceTarget);\n\t\tthis.target = originalEvent.target || null;\n\t\tconst lastEvent = session?.lastEvent;\n\t\tif (originalEvent instanceof WheelEvent) this.delta = {\n\t\t\tx: originalEvent.deltaX,\n\t\t\ty: originalEvent.deltaY\n\t\t};\n\t\telse if (lastEvent && this.devicePoint && lastEvent.devicePoint) this.delta = Point.subtract(this.devicePoint, lastEvent.devicePoint);\n\t\telse this.delta = {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t}\n\tstatic eventLikeFromOriginalEvent(originalEvent) {\n\t\tif (\"touches\" in originalEvent) {\n\t\t\tlet touches = originalEvent.touches;\n\t\t\tif (!touches?.length) {\n\t\t\t\tif (originalEvent.changedTouches && originalEvent.changedTouches.length) touches = originalEvent.changedTouches;\n\t\t\t}\n\t\t\tconst firstTouch = touches[0];\n\t\t\tif (!touches || !firstTouch) return {\n\t\t\t\tpageX: 0,\n\t\t\t\tpageY: 0,\n\t\t\t\ttarget: null\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tpageX: firstTouch.clientX || firstTouch.screenX || firstTouch.pageX,\n\t\t\t\tpageY: firstTouch.clientY || firstTouch.screenY || firstTouch.pageY,\n\t\t\t\ttarget: originalEvent.target\n\t\t\t};\n\t\t}\n\t\treturn originalEvent;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tvelocity(t) {\n\t\treturn this.session ? this.session.velocity(t) : {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t}\n\t/**\n\t* @internal\n\t*/\n\tget offset() {\n\t\treturn this.session ? this.session.offset(this) : {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t}\n\t/**\n\t* @internal\n\t*/\n\tget isLeftMouseClick() {\n\t\tif (isTouch()) return;\n\t\tif (\"button\" in this.originalEvent && \"buttons\" in this.originalEvent && \"ctrlKey\" in this.originalEvent) return (this.originalEvent.button === 0 || this.originalEvent.buttons === 1) && !this.originalEvent.ctrlKey;\n\t\treturn false;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/animation/Animators/FrictionAnimator.ts\n/**\n* @internal\n* @deprecated\n*/\nvar FrictionAnimator = class {\n\toptions;\n\tstate;\n\tintegrator;\n\tconstructor(options) {\n\t\tthis.options = {\n\t\t\tvelocity: 0,\n\t\t\tfriction: 2,\n\t\t\ttolerance: 1 / 10\n\t\t};\n\t\tObject.assign(this.options, options);\n\t\tthis.state = {\n\t\t\tx: 0,\n\t\t\tv: this.options.velocity\n\t\t};\n\t\tthis.integrator = new Integrator((state) => -(this.options.friction * state.v));\n\t}\n\tsetFrom(value) {\n\t\tthis.state.x = value;\n\t}\n\tsetTo(value) {}\n\tsetVelocity(velocity) {\n\t\tthis.state.v = velocity;\n\t}\n\tgetState() {\n\t\treturn this.state;\n\t}\n\tisReady() {\n\t\treturn true;\n\t}\n\tnext(delta) {\n\t\tthis.state = this.integrator.integrateState(this.state, delta);\n\t\treturn this.state.x;\n\t}\n\tisFinished() {\n\t\treturn Math.abs(this.state.v) < this.options.tolerance;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/animation/Animators/InertialScrollAnimator.ts\nconst Defaults = {\n\tvelocity: 0,\n\tmin: 0,\n\tmax: 0,\n\tmomentum: {\n\t\tfriction: 2,\n\t\ttolerance: 10\n\t},\n\tbounce: {\n\t\ttension: 500,\n\t\tfriction: 10,\n\t\ttolerance: 1\n\t}\n};\n/**\n* @internal\n* @deprecated\n*/\nvar InertialScrollAnimator = class {\n\toptions;\n\tcurrent;\n\tfrictionAnimator;\n\tspringAnimator;\n\tuseSpring;\n\tconstructor(options) {\n\t\tthis.options = Object.assign({ ...Defaults }, options);\n\t\tthis.frictionAnimator = new FrictionAnimator({\n\t\t\tfriction: this.options.momentum.friction,\n\t\t\ttolerance: this.options.momentum.tolerance,\n\t\t\tvelocity: this.options.velocity\n\t\t});\n\t\tthis.springAnimator = new SpringAnimator({\n\t\t\ttension: this.options.bounce.tension,\n\t\t\tfriction: this.options.bounce.friction,\n\t\t\ttolerance: this.options.bounce.tolerance,\n\t\t\tvelocity: this.options.velocity\n\t\t}, NumberInterpolation);\n\t\tthis.useSpring = false;\n\t}\n\tisReady() {\n\t\treturn true;\n\t}\n\tnext(delta) {\n\t\tthis.current = this.currentAnimator.next(delta);\n\t\tif (!this.useSpring) this.tryTransitionToSpring();\n\t\treturn this.current;\n\t}\n\tget currentAnimator() {\n\t\tif (this.useSpring) return this.springAnimator;\n\t\treturn this.frictionAnimator;\n\t}\n\tisFinished() {\n\t\treturn this.currentAnimator.isFinished();\n\t}\n\tget state() {\n\t\treturn this.currentAnimator.getState();\n\t}\n\tsetFrom(value) {\n\t\tthis.setState({\n\t\t\tx: value,\n\t\t\tv: this.state.v\n\t\t});\n\t}\n\tsetState(state) {\n\t\tthis.frictionAnimator.setFrom(state.x);\n\t\tthis.frictionAnimator.setVelocity(state.v);\n\t\tif (this.isValidState()) return this.tryTransitionToSpring();\n\t\telse {\n\t\t\tlet bound = 0;\n\t\t\tif (this.state.x <= this.options.min) bound = this.options.min;\n\t\t\tif (this.state.x >= this.options.max) bound = this.options.max;\n\t\t\treturn this.transitionToSpring(bound);\n\t\t}\n\t}\n\tsetTo(destination) {\n\t\tthis.frictionAnimator.setTo(destination);\n\t\tthis.springAnimator.setTo(destination);\n\t}\n\tsetLimits(min, max) {\n\t\tthis.options.min = min;\n\t\tthis.options.max = max;\n\t}\n\ttryTransitionToSpring() {\n\t\tconst belowMinWithVelocity = this.state.x < this.options.min && this.state.v <= 0;\n\t\tconst aboveMaxWithVelocity = this.state.x > this.options.max && this.state.v >= 0;\n\t\tif (belowMinWithVelocity || aboveMaxWithVelocity) {\n\t\t\tlet bound;\n\t\t\tif (belowMinWithVelocity) bound = this.options.min;\n\t\t\telse bound = this.options.max;\n\t\t\tthis.transitionToSpring(bound);\n\t\t} else this.useSpring = false;\n\t}\n\ttransitionToSpring(bound) {\n\t\tthis.springAnimator.setFrom(this.state.x);\n\t\tthis.springAnimator.setVelocity(this.state.v);\n\t\tthis.springAnimator.setTo(bound);\n\t\tthis.useSpring = true;\n\t}\n\tisValidState() {\n\t\tconst belowMinTravelingBack = this.state.x < this.options.min && this.state.v > 0;\n\t\tconst aboveMaxTravelingBack = this.state.x > this.options.max && this.state.v < 0;\n\t\tif (belowMinTravelingBack || aboveMaxTravelingBack) {\n\t\t\tlet bound;\n\t\t\tif (belowMinTravelingBack) bound = this.options.min;\n\t\t\telse bound = this.options.max;\n\t\t\treturn 1 - this.frictionAnimator.options.friction * (bound - this.state.x) / this.state.v > 0;\n\t\t}\n\t\treturn true;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/utils/math.ts\nconst clamp$1 = (value, a, b) => {\n\tconst min = Math.min(a, b);\n\tconst max = Math.max(a, b);\n\tif (value < min) value = min;\n\tif (value > max) value = max;\n\treturn value;\n};\n\n//#endregion\n//#region ../../library/src/components/hoc/WithDragging.tsx\nconst DraggingContext = /* @__PURE__ */ React.createContext({ dragging: false });\nfunction WithDragging(Component) {\n\tclass WithDraggingHOC extends React.Component {\n\t\tstatic draggingDefaultProps = {\n\t\t\tmomentum: true,\n\t\t\tmomentumOptions: {\n\t\t\t\tfriction: 2.1,\n\t\t\t\ttolerance: 1\n\t\t\t},\n\t\t\tmomentumVelocityMultiplier: 800,\n\t\t\tspeedX: 1,\n\t\t\tspeedY: 1,\n\t\t\tbounce: true,\n\t\t\tbounceOptions: {\n\t\t\t\tfriction: 40,\n\t\t\t\ttension: 200,\n\t\t\t\ttolerance: 1\n\t\t\t},\n\t\t\tdirectionLock: false,\n\t\t\tdirectionLockThreshold: {\n\t\t\t\tx: 10,\n\t\t\t\ty: 10\n\t\t\t},\n\t\t\toverdrag: true,\n\t\t\toverdragScale: .5,\n\t\t\tpixelAlign: true,\n\t\t\tvelocityTimeout: 100,\n\t\t\tvelocityScale: 890,\n\t\t\thorizontal: true,\n\t\t\tvertical: true,\n\t\t\tenabled: true,\n\t\t\tconstraints: {},\n\t\t\tmouseWheel: false\n\t\t};\n\t\tstatic defaultProps = Object.assign({}, Component.defaultProps, WithDraggingHOC.draggingDefaultProps);\n\t\tstate = { isDragging: false };\n\t\tx = Animatable(0);\n\t\ty = Animatable(0);\n\t\tconstructor(props, defaultProps) {\n\t\t\tsuper(props, defaultProps);\n\t\t\tconst x = this.props.left;\n\t\t\tconst y = this.props.top;\n\t\t\tif (!x) this.x = Animatable(0);\n\t\t\telse if (isAnimatable(x)) this.x = x;\n\t\t\telse this.x = Animatable(x);\n\t\t\tif (!y) this.y = Animatable(0);\n\t\t\telse if (isAnimatable(y)) this.y = y;\n\t\t\telse this.y = Animatable(y);\n\t\t\tthis.x.onUpdate(this.onChangePosition);\n\t\t\tthis.y.onUpdate(this.onChangePosition);\n\t\t\tconst constraints = this.props.constraints;\n\t\t\tif (constraints) this.constraints = constraints;\n\t\t}\n\t\tUNSAFE_componentWillReceiveProps(props) {\n\t\t\tif (this.props.left !== props.left && isFiniteNumber(props.left)) this.x.set(props.left);\n\t\t\tif (this.props.top !== props.top && isFiniteNumber(props.top)) this.y.set(props.top);\n\t\t\tconst constraints = props.constraints;\n\t\t\tif (constraints) this.constraints = constraints;\n\t\t}\n\t\tonChangePosition = (change, transaction) => {\n\t\t\tif (change.value === change.oldValue) return;\n\t\t\tif (this.props.onMove) this.props.onMove(this.point, this);\n\t\t};\n\t\tget point() {\n\t\t\treturn {\n\t\t\t\tx: this.x.get(),\n\t\t\t\ty: this.y.get()\n\t\t\t};\n\t\t}\n\t\tsetPoint(point, axis = null) {\n\t\t\tswitch (axis) {\n\t\t\t\tcase \"x\":\n\t\t\t\t\tthis.x.set(point.x);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"y\":\n\t\t\t\t\tthis.y.set(point.y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase null:\n\t\t\t\t\tthis.x.set(point.x);\n\t\t\t\t\tthis.y.set(point.y);\n\t\t\t}\n\t\t}\n\t\tgetValue(axis) {\n\t\t\tswitch (axis) {\n\t\t\t\tcase \"x\": return this.x.get();\n\t\t\t\tcase \"y\": return this.y.get();\n\t\t\t}\n\t\t}\n\t\tget width() {\n\t\t\tconst width = this.props.width;\n\t\t\tif (!width) return 100;\n\t\t\tif (isAnimatable(width)) return width.get();\n\t\t\tif (typeof width === \"string\") return parseFloat(width);\n\t\t\treturn width;\n\t\t}\n\t\tget height() {\n\t\t\tconst height = this.props.height;\n\t\t\tif (!height) return 100;\n\t\t\tif (isAnimatable(height)) return height.get();\n\t\t\tif (typeof height === \"string\") return parseFloat(height);\n\t\t\treturn height;\n\t\t}\n\t\tisMoving = false;\n\t\tisAnimating = false;\n\t\tdirectionLockAxis = null;\n\t\tlayerStartPoint = null;\n\t\tcorrectedLayerStartPoint = null;\n\t\tpreviousPoint = null;\n\t\t_constraints = null;\n\t\tanimation = null;\n\t\tget constraints() {\n\t\t\treturn this._constraints;\n\t\t}\n\t\tset constraints(value) {\n\t\t\tif (value !== null && typeof value === \"object\") this._constraints = {\n\t\t\t\tx: value.x || 0,\n\t\t\t\ty: value.y || 0,\n\t\t\t\twidth: value.width || 0,\n\t\t\t\theight: value.height || 0\n\t\t\t};\n\t\t\telse this._constraints = null;\n\t\t\tif (this._constraints) this.updateAnimationConstraints(this._constraints);\n\t\t}\n\t\tget constraintsOffset() {\n\t\t\tif (!this.constraints) return {\n\t\t\t\tx: 0,\n\t\t\t\ty: 0\n\t\t\t};\n\t\t\tconst { minX, minY, maxX, maxY } = this.calculateConstraints(this._constraints);\n\t\t\tconst point = this.point;\n\t\t\tconst constrainedPoint = {\n\t\t\t\tx: clamp$1(point.x, minX, maxX),\n\t\t\t\ty: clamp$1(point.y, minY, maxY)\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tx: point.x - constrainedPoint.x,\n\t\t\t\ty: point.y - constrainedPoint.y\n\t\t\t};\n\t\t}\n\t\tget isBeyondConstraints() {\n\t\t\tconst constraintsOffset = this.constraintsOffset;\n\t\t\tif (constraintsOffset.x !== 0) return true;\n\t\t\tif (constraintsOffset.y !== 0) return true;\n\t\t\treturn false;\n\t\t}\n\t\tpanStart = (event) => {\n\t\t\tif (!this.props.enabled) return;\n\t\t\tthis.isMoving = this.isAnimating;\n\t\t\tthis.stopAnimation();\n\t\t\tthis.resetdirectionLock();\n\t\t\tthis.layerStartPoint = this.point;\n\t\t\tthis.correctedLayerStartPoint = this.point;\n\t\t\tif (this._constraints && this.props.bounce) this.correctedLayerStartPoint = this.constrainPosition(this.correctedLayerStartPoint, this._constraints, 1 / this.props.overdragScale);\n\t\t\tthis.previousPoint = this.correctedLayerStartPoint;\n\t\t\tif (!this.state.isDragging) this.setState({ isDragging: true });\n\t\t\tif (this.props.onDragSessionStart) this.props.onDragSessionStart(event, this);\n\t\t};\n\t\tpan = (event) => {\n\t\t\tconst { enabled, speedX, speedY, directionLock, overdragScale, vertical, horizontal, pixelAlign, onDragStart, onDragWillMove, onDragDidMove, onDragSessionMove } = this.props;\n\t\t\tif (!enabled) return;\n\t\t\tassert$1(this.previousPoint !== null, \"previousPoint must be set in panStart()\");\n\t\t\tlet point = { ...this.previousPoint };\n\t\t\tpoint.x += event.delta.x * speedX;\n\t\t\tpoint.y += event.delta.y * speedY;\n\t\t\tthis.previousPoint = { ...point };\n\t\t\tif (this._constraints) point = this.constrainPosition(point, this._constraints, overdragScale);\n\t\t\tif (directionLock) {\n\t\t\t\tif (this.directionLockAxis === null) {\n\t\t\t\t\tconst offset = event.offset;\n\t\t\t\t\toffset.x = offset.x * speedX;\n\t\t\t\t\toffset.y = offset.y * speedY;\n\t\t\t\t\tthis.updatedirectionLock(offset);\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tassert$1(this.layerStartPoint !== null, \"layerStartPoint must be set in panStart()\");\n\t\t\t\t\tif (this.directionLockAxis === \"y\") point.x = this.layerStartPoint.x;\n\t\t\t\t\tif (this.directionLockAxis === \"x\") point.y = this.layerStartPoint.y;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!this.state.isDragging) {\n\t\t\t\tthis.setState({ isDragging: true });\n\t\t\t\tthis.isMoving = true;\n\t\t\t\tif (onDragStart) onDragStart(event, this);\n\t\t\t}\n\t\t\tif (onDragWillMove) onDragWillMove(event, this);\n\t\t\tif (pixelAlign) {\n\t\t\t\tpoint.x = Math.round(point.x);\n\t\t\t\tpoint.y = Math.round(point.y);\n\t\t\t}\n\t\t\tif (!horizontal && !vertical) return;\n\t\t\tlet axis = null;\n\t\t\tif (horizontal && !vertical) axis = \"x\";\n\t\t\telse if (vertical && !horizontal) axis = \"y\";\n\t\t\tthis.setPoint(point, axis);\n\t\t\tif (onDragDidMove) onDragDidMove(event, this);\n\t\t\tif (onDragSessionMove) onDragSessionMove(event, this);\n\t\t};\n\t\tpanEnd = (event) => {\n\t\t\tif (!this.props.enabled) return;\n\t\t\tthis.startAnimation(event);\n\t\t\tconst { onDragSessionEnd, onDragEnd } = this.props;\n\t\t\tif (this.state.isDragging) {\n\t\t\t\tif (onDragEnd) onDragEnd(event, this);\n\t\t\t}\n\t\t\tif (onDragSessionEnd) onDragSessionEnd(event, this);\n\t\t\tif (this.state.isDragging) this.setState({ isDragging: false });\n\t\t\tthis.isMoving = this.isAnimating;\n\t\t};\n\t\tmouseWheelStart = (event) => {\n\t\t\tthis.correctedLayerStartPoint = this.point;\n\t\t\tthis.previousPoint = this.correctedLayerStartPoint;\n\t\t\tthis.stopAnimation();\n\t\t};\n\t\tmouseWheel = (event) => {\n\t\t\tconst { enabled, speedX, speedY, vertical, horizontal, pixelAlign, onDragWillMove, onDragDidMove, mouseWheel } = this.props;\n\t\t\tif (!mouseWheel || !enabled) return;\n\t\t\tlet point = { ...this.point };\n\t\t\tpoint.x -= event.delta.x * speedX;\n\t\t\tpoint.y -= event.delta.y * speedY;\n\t\t\tif (this._constraints) point = this.constrainPosition(point, this._constraints, 0, false);\n\t\t\tif (onDragWillMove) onDragWillMove(event, this);\n\t\t\tif (pixelAlign) {\n\t\t\t\tpoint.x = Math.round(point.x);\n\t\t\t\tpoint.y = Math.round(point.y);\n\t\t\t}\n\t\t\tif (!horizontal && !vertical) return;\n\t\t\tlet axis = null;\n\t\t\tif (horizontal && !vertical) axis = \"x\";\n\t\t\telse if (vertical && !horizontal) axis = \"y\";\n\t\t\tthis.setPoint(point, axis);\n\t\t\tif (onDragDidMove) onDragDidMove(event, this);\n\t\t};\n\t\tmouseWheelEnd = (event) => {};\n\t\tclampAndScale(value, min, max, scale, scaleAllowed) {\n\t\t\tif (!scaleAllowed) return clamp$1(value, min, max);\n\t\t\tif (value < min) value = min + (value - min) * scale;\n\t\t\tif (value > max) value = max + (value - max) * scale;\n\t\t\treturn value;\n\t\t}\n\t\tcalculateConstraints(bounds) {\n\t\t\tif (!bounds) return {\n\t\t\t\tminX: Infinity,\n\t\t\t\tmaxX: Infinity,\n\t\t\t\tminY: Infinity,\n\t\t\t\tmaxY: Infinity\n\t\t\t};\n\t\t\tif (bounds.width < this.width) bounds.width = this.width;\n\t\t\tif (bounds.height < this.height) bounds.height = this.height;\n\t\t\tconst constraints = {\n\t\t\t\tminX: Rect.minX(bounds),\n\t\t\t\tmaxX: Rect.maxX(bounds),\n\t\t\t\tminY: Rect.minY(bounds),\n\t\t\t\tmaxY: Rect.maxY(bounds)\n\t\t\t};\n\t\t\tconstraints.maxX -= this.width;\n\t\t\tconstraints.maxY -= this.height;\n\t\t\treturn constraints;\n\t\t}\n\t\tconstrainPosition(proposedPoint, bounds, scale, overdrag = this.props.overdrag) {\n\t\t\tconst { maxX, maxY, minX, minY } = this.calculateConstraints(this._constraints);\n\t\t\tconst point = {\n\t\t\t\tx: this.clampAndScale(proposedPoint.x, minX, maxX, scale, overdrag),\n\t\t\t\ty: this.clampAndScale(proposedPoint.y, minY, maxY, scale, overdrag)\n\t\t\t};\n\t\t\tif (this.props.speedX === 0 || this.props.horizontal === false) point.x = proposedPoint.x;\n\t\t\tif (this.props.speedY === 0 || this.props.vertical === false) point.y = proposedPoint.y;\n\t\t\treturn point;\n\t\t}\n\t\tupdatedirectionLock(correctedDelta) {\n\t\t\tif (Math.abs(correctedDelta.y) > this.props.directionLockThreshold.y) this.directionLockAxis = \"y\";\n\t\t\telse if (Math.abs(correctedDelta.x) > this.props.directionLockThreshold.x) this.directionLockAxis = \"x\";\n\t\t\tif (this.directionLockAxis !== null) {\n\t\t\t\tif (this.props.onDragDirectionLockStart) this.props.onDragDirectionLockStart(this.directionLockAxis, this);\n\t\t\t}\n\t\t}\n\t\tresetdirectionLock() {\n\t\t\tthis.directionLockAxis = null;\n\t\t}\n\t\tsetupAnimation() {\n\t\t\tif (this.animation) return;\n\t\t\tthis.animation = {\n\t\t\t\tx: this.setupAnimationForAxis(\"x\"),\n\t\t\t\ty: this.setupAnimationForAxis(\"y\")\n\t\t\t};\n\t\t\tthis.updateAnimationConstraints(this._constraints);\n\t\t}\n\t\tsetupAnimationForAxis(axis) {\n\t\t\tconst animator = new InertialScrollAnimator({\n\t\t\t\tmomentum: this.props.momentumOptions,\n\t\t\t\tbounce: this.props.bounceOptions\n\t\t\t});\n\t\t\tconst updateCallback = (value) => {\n\t\t\t\tthis.onAnimationStep(axis, value);\n\t\t\t};\n\t\t\tconst doneCallback = () => {\n\t\t\t\tthis.onAnimationStop(axis);\n\t\t\t};\n\t\t\treturn new MainLoopAnimationDriver(animator, updateCallback, doneCallback);\n\t\t}\n\t\tupdateAnimationConstraints(constraints) {\n\t\t\tif (!this.animation) return;\n\t\t\tif (constraints) {\n\t\t\t\tconst { minX, minY, maxX, maxY } = this.calculateConstraints(constraints);\n\t\t\t\tthis.animation.x.animator.setLimits(minX, maxX);\n\t\t\t\tthis.animation.y.animator.setLimits(minY, maxY);\n\t\t\t} else {\n\t\t\t\tthis.animation.x.animator.setLimits(-Infinity, Infinity);\n\t\t\t\tthis.animation.y.animator.setLimits(-Infinity, Infinity);\n\t\t\t}\n\t\t}\n\t\tonAnimationStep = (axis, value) => {\n\t\t\tif (axis === \"x\" && this.props.horizontal === false) return;\n\t\t\tif (axis === \"y\" && this.props.vertical === false) return;\n\t\t\tlet delta = 0;\n\t\t\tif (this.constraints) {\n\t\t\t\tif (this.props.bounce) delta = value - this.getValue(axis);\n\t\t\t\telse {\n\t\t\t\t\tconst { minX, minY, maxX, maxY } = this.calculateConstraints(this._constraints);\n\t\t\t\t\tif (axis === \"x\") delta = clamp$1(value, minX, maxX) - this.getValue(axis);\n\t\t\t\t\tif (axis === \"y\") delta = clamp$1(value, minY, maxY) - this.getValue(axis);\n\t\t\t\t}\n\t\t\t} else delta = value - this.getValue(axis);\n\t\t\tconst updatePoint = this.point;\n\t\t\tif (axis === \"x\") updatePoint[axis] = updatePoint[axis] + delta;\n\t\t\tif (axis === \"y\") updatePoint[axis] = updatePoint[axis] + delta;\n\t\t\tthis.setPoint(updatePoint, axis);\n\t\t};\n\t\tonAnimationStop = (axis) => {\n\t\t\tif (axis === \"x\" && this.props.horizontal === false) return;\n\t\t\tif (axis === \"y\" && this.props.vertical === false) return;\n\t\t\tif (!this.animation) return;\n\t\t\tif (this.props.pixelAlign) {\n\t\t\t\tconst point = this.point;\n\t\t\t\tpoint.x = Math.round(point.x);\n\t\t\t\tpoint.y = Math.round(point.y);\n\t\t\t\tthis.setPoint(point, axis);\n\t\t\t}\n\t\t\tif (this.animation.x.isFinished() && this.animation.y.isFinished()) return this.stopAnimation();\n\t\t};\n\t\tstartAnimation(event) {\n\t\t\tconst { momentum, bounce, momentumVelocityMultiplier, speedX, speedY, overdrag, onDragAnimationStart } = this.props;\n\t\t\tif (!(momentum || bounce)) return;\n\t\t\tif (this.isBeyondConstraints === false && momentum === false) return;\n\t\t\tif (this.isBeyondConstraints === false && this.state.isDragging === false) return;\n\t\t\tconst { minX, minY, maxX, maxY } = this.calculateConstraints(this._constraints);\n\t\t\tconst startAnimationX = overdrag === true || this.point.x > minX && this.point.x < maxX;\n\t\t\tconst startAnimationY = overdrag === true || this.point.y > minY && this.point.y < maxY;\n\t\t\tif (startAnimationX === startAnimationY && startAnimationY === false) return;\n\t\t\tconst velocity = event.velocity(.1);\n\t\t\tlet velocityX = velocity.x * momentumVelocityMultiplier * speedX;\n\t\t\tlet velocityY = velocity.y * momentumVelocityMultiplier * speedY;\n\t\t\tif (this.directionLockAxis === \"x\") velocityY = 0;\n\t\t\tif (this.directionLockAxis === \"y\") velocityX = 0;\n\t\t\tthis.setupAnimation();\n\t\t\tthis.isAnimating = true;\n\t\t\tthis.isMoving = true;\n\t\t\tif (!this.animation) return;\n\t\t\tthis.animation.x.animator.setState({\n\t\t\t\tx: this.point.x,\n\t\t\t\tv: velocityX\n\t\t\t});\n\t\t\tif (startAnimationX) this.animation.x.play();\n\t\t\tthis.animation.y.animator.setState({\n\t\t\t\tx: this.point.y,\n\t\t\t\tv: velocityY\n\t\t\t});\n\t\t\tif (startAnimationY) this.animation.y.play();\n\t\t\tif (onDragAnimationStart) onDragAnimationStart(this.animation, this);\n\t\t}\n\t\tstopAnimation = () => {\n\t\t\tthis.isAnimating = false;\n\t\t\tthis.isMoving = false;\n\t\t\tif (!this.animation) return;\n\t\t\tthis.animation.x.cancel();\n\t\t\tthis.animation.y.cancel();\n\t\t\tif (this.props.onDragAnimationEnd) this.props.onDragAnimationEnd(this.animation, this);\n\t\t\tthis.animation = null;\n\t\t};\n\t\twrapHandler(ownHandler, originalHandler) {\n\t\t\tif (!originalHandler) return ownHandler;\n\t\t\treturn (event) => {\n\t\t\t\townHandler(event);\n\t\t\t\toriginalHandler(event);\n\t\t\t};\n\t\t}\n\t\trender() {\n\t\t\tconst originalProps = { ...this.props };\n\t\t\tObject.keys(WithDraggingHOC.draggingDefaultProps).forEach((key) => {\n\t\t\t\tdelete asRecord(originalProps)[key];\n\t\t\t});\n\t\t\toriginalProps.onPanStart = this.wrapHandler(this.panStart, originalProps.onPanStart);\n\t\t\toriginalProps.onPan = this.wrapHandler(this.pan, originalProps.onPan);\n\t\t\toriginalProps.onPanEnd = this.wrapHandler(this.panEnd, originalProps.onPanEnd);\n\t\t\toriginalProps.onMouseWheelStart = this.wrapHandler(this.mouseWheelStart, originalProps.onMouseWheelStart);\n\t\t\toriginalProps.onMouseWheel = this.wrapHandler(this.mouseWheel, originalProps.onMouseWheel);\n\t\t\toriginalProps.onMouseWheelEnd = this.wrapHandler(this.mouseWheelEnd, originalProps.onMouseWheelEnd);\n\t\t\toriginalProps.left = this.x;\n\t\t\toriginalProps.top = this.y;\n\t\t\treturn /* @__PURE__ */ jsx(DraggingContext.Provider, {\n\t\t\t\tvalue: { dragging: this.state.isDragging },\n\t\t\t\tchildren: /* @__PURE__ */ jsx(Component, { ...originalProps })\n\t\t\t});\n\t\t}\n\t}\n\tconst withDragging = WithDraggingHOC;\n\thoistNonReactStatic(withDragging, Component);\n\treturn withDragging;\n}\n\n//#endregion\n//#region ../../library/src/components/hoc/WithEvents.tsx\nconst hoverProps = {\n\tonMouseEnter: \"mouseenter\",\n\tonMouseLeave: \"mouseleave\"\n};\nconst hoverEventKeys = /* @__PURE__ */ Object.keys(hoverProps);\nconst eventHandlerMapping = {\n\tpanstart: [\"onPanStart\"],\n\tpan: [\"onPan\"],\n\tpanend: [\"onPanEnd\"],\n\ttapstart: [\"onTapStart\", \"onMouseDown\"],\n\ttap: [\"onTap\", \"onClick\"],\n\ttapend: [\"onTapEnd\", \"onMouseUp\"],\n\tmousewheelstart: [\"onMouseWheelStart\"],\n\tmousewheel: [\"onMouseWheel\"],\n\tmousewheelend: [\"onMouseWheelEnd\"]\n};\nconst tapEventKeys = /* @__PURE__ */ new Set([\n\t\"tapstart\",\n\t\"tap\",\n\t\"tapend\"\n]);\nfunction WithEvents(BaseComponent) {\n\tconst withEvents = class WithEventsHOC extends React.Component {\n\t\tstatic defaultProps = Object.assign({}, BaseComponent.defaultProps);\n\t\tshouldCancelTap = false;\n\t\tactiveEventListeners = /* @__PURE__ */ new Map();\n\t\tget element() {\n\t\t\treturn this.component.current && this.component.current.element;\n\t\t}\n\t\thasFramerEventListener = false;\n\t\tcomponent = React.createRef();\n\t\tcomponentDidMount() {\n\t\t\tthis.addEventListeners();\n\t\t}\n\t\tcomponentDidUpdate(prevProps) {\n\t\t\tthis.addEventListeners(prevProps);\n\t\t}\n\t\tcomponentWillUnmount() {\n\t\t\tthis.removeEventListeners();\n\t\t}\n\t\taddEventListeners(prevProps) {\n\t\t\tif (this.element && !this.hasFramerEventListener) {\n\t\t\t\tthis.element.addEventListener(\"FramerEvent\", ({ detail }) => {\n\t\t\t\t\tconst type = detail.type;\n\t\t\t\t\tconst framerEvent = detail.event;\n\t\t\t\t\tthis.handleEvent(type, framerEvent);\n\t\t\t\t});\n\t\t\t\thoverEventKeys.forEach((eventName) => this.addHoverEvent(eventName));\n\t\t\t\tthis.hasFramerEventListener = true;\n\t\t\t} else if (this.element && prevProps) hoverEventKeys.forEach((eventName) => this.checkHoverEvent(eventName, prevProps));\n\t\t\telse if (!this.element) this.hasFramerEventListener = false;\n\t\t}\n\t\tremoveEventListeners() {\n\t\t\thoverEventKeys.forEach((eventName) => this.removeHoverEvent(eventName));\n\t\t}\n\t\taddHoverEvent(eventName) {\n\t\t\tconst originalEventListener = this.props[eventName];\n\t\t\tif (this.element && originalEventListener) {\n\t\t\t\tconst eventListener = (e) => {\n\t\t\t\t\tconst framerEvent = new FramerEvent(e);\n\t\t\t\t\toriginalEventListener(framerEvent);\n\t\t\t\t};\n\t\t\t\tthis.activeEventListeners.set(eventName, eventListener);\n\t\t\t\tconst domEventName = hoverProps[eventName];\n\t\t\t\tthis.element.addEventListener(domEventName, eventListener);\n\t\t\t}\n\t\t}\n\t\tremoveHoverEvent(eventName) {\n\t\t\tconst eventListener = this.activeEventListeners.get(eventName);\n\t\t\tif (this.element && eventListener) {\n\t\t\t\tconst domEventName = hoverProps[eventName];\n\t\t\t\tthis.element.removeEventListener(domEventName, eventListener);\n\t\t\t\tthis.activeEventListeners.delete(eventName);\n\t\t\t}\n\t\t}\n\t\tcheckHoverEvent(eventName, prevProps) {\n\t\t\tif (prevProps[eventName] !== this.props[eventName]) {\n\t\t\t\tthis.removeHoverEvent(eventName);\n\t\t\t\tthis.addHoverEvent(eventName);\n\t\t\t}\n\t\t}\n\t\thandleEvent(type, framerEvent) {\n\t\t\tconst eventListenerKeys = eventHandlerMapping[type];\n\t\t\tif (!eventListenerKeys) return;\n\t\t\teventListenerKeys.forEach((eventKey) => {\n\t\t\t\tconst eventListener = this.props[eventKey];\n\t\t\t\tconst cancelEvent = this.shouldCancelTap && tapEventKeys.has(eventKey);\n\t\t\t\tif (eventListener && !cancelEvent) eventListener(framerEvent);\n\t\t\t});\n\t\t}\n\t\trender() {\n\t\t\treturn /* @__PURE__ */ jsx(DraggingContext.Consumer, { children: (value) => {\n\t\t\t\tthis.shouldCancelTap = value.dragging;\n\t\t\t\treturn /* @__PURE__ */ jsx(BaseComponent, {\n\t\t\t\t\t...this.props,\n\t\t\t\t\tref: this.component\n\t\t\t\t});\n\t\t\t} });\n\t\t}\n\t};\n\thoistNonReactStatic(withEvents, BaseComponent);\n\treturn withEvents;\n}\n\n//#endregion\n//#region ../../library/src/data/ObservableObject.ts\nconst hasOwnProperty = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nconst $private = /* @__PURE__ */ Symbol(\"private\");\n/**\n* @internal\n*/\nconst ObservableObject = /* @__PURE__ */ (() => {\n\t/**\n\t* @internal\n\t*/\n\tfunction ObservableObject(initial = {}, makeAnimatables = false, observeAnimatables = true) {\n\t\tconst unproxiedState = { [$private]: {\n\t\t\tmakeAnimatables,\n\t\t\tobserveAnimatables,\n\t\t\tobservers: new Observers(),\n\t\t\treset() {\n\t\t\t\tfor (const key in state) if (hasOwnProperty(state, key)) {\n\t\t\t\t\tconst value = hasOwnProperty(initial, key) ? asRecord(initial)[key] : void 0;\n\t\t\t\t\tif (value !== void 0) state[key] = value;\n\t\t\t\t\telse delete state[key];\n\t\t\t\t}\n\t\t\t},\n\t\t\ttransactions: /* @__PURE__ */ new Set()\n\t\t} };\n\t\tconst state = new Proxy(unproxiedState, sharedProxyHandler);\n\t\tObject.assign(state, initial);\n\t\treturn state;\n\t}\n\tObservableObject.resetObject = (target) => {\n\t\treturn target[$private].reset();\n\t};\n\tObservableObject.addObserver = (target, observer) => {\n\t\treturn target[$private].observers.add(observer);\n\t};\n\treturn ObservableObject;\n})();\nvar ObservableObjectProxyHandler = class {\n\tset = (target, key, value, receiver) => {\n\t\tif (key === $private) return false;\n\t\tconst privateObject = target[$private];\n\t\tlet animatable;\n\t\tlet rawValue;\n\t\tif (isAnimatable(value)) {\n\t\t\tanimatable = value;\n\t\t\trawValue = animatable.get();\n\t\t} else rawValue = value;\n\t\tif (privateObject.makeAnimatables && typeof value !== \"function\" && typeof value !== \"object\" && !animatable) animatable = Animatable(value);\n\t\tif (privateObject.observeAnimatables && animatable) {\n\t\t\tconst transactions = privateObject.transactions;\n\t\t\tanimatable.onUpdate({\n\t\t\t\tupdate: (change, transaction) => {\n\t\t\t\t\tif (transaction) transactions.add(transaction);\n\t\t\t\t\tprivateObject.observers.notify({ value: receiver }, transaction);\n\t\t\t\t},\n\t\t\t\tfinish: (transaction) => {\n\t\t\t\t\tif (transactions.delete(transaction)) privateObject.observers.finishTransaction(transaction);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tlet result = false;\n\t\tlet changed = true;\n\t\tconst targetValue = asRecord(target)[key];\n\t\tif (targetValue !== void 0) {\n\t\t\tif (isAnimatable(targetValue)) {\n\t\t\t\tchanged = targetValue.get() !== rawValue;\n\t\t\t\ttargetValue.set(rawValue);\n\t\t\t} else {\n\t\t\t\tchanged = targetValue !== rawValue;\n\t\t\t\tasRecord(target)[key] = rawValue;\n\t\t\t}\n\t\t\tconst rawValueIsObject = rawValue !== null && typeof rawValue === \"object\";\n\t\t\tif (Array.isArray(rawValue) || rawValueIsObject) changed = true;\n\t\t\tresult = true;\n\t\t} else {\n\t\t\tif (animatable) value = animatable;\n\t\t\tresult = Reflect.set(target, key, value);\n\t\t}\n\t\tif (changed) privateObject.observers.notify({ value: receiver });\n\t\treturn result;\n\t};\n\tget = (target, key, receiver) => {\n\t\tif (key === $private) return asRecord(target)[key];\n\t\tconst value = Reflect.get(target, key, receiver);\n\t\treturn typeof value === \"function\" ? value.bind(receiver) : value;\n\t};\n\tdeleteProperty(target, key) {\n\t\tconst result = Reflect.deleteProperty(target, key);\n\t\ttarget[$private].observers.notify({ value: target });\n\t\treturn result;\n\t}\n\townKeys(target) {\n\t\tconst keys = Reflect.ownKeys(target);\n\t\tconst privateIndex = keys.indexOf($private);\n\t\tif (privateIndex !== -1) keys.splice(privateIndex, 1);\n\t\treturn keys;\n\t}\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tif (key === $private) return;\n\t\treturn Reflect.getOwnPropertyDescriptor(target, key);\n\t}\n};\nconst sharedProxyHandler = /* @__PURE__ */ new ObservableObjectProxyHandler();\n\n//#endregion\n//#region ../../library/src/render/traits/Blending.ts\n/** @internal */\nfunction collectBlendingFromProps(node, style) {\n\tif (!node.blendingMode || node.blendingMode === \"normal\") return;\n\tstyle.mixBlendMode = node.blendingMode;\n}\n\n//#endregion\n//#region ../../library/src/render/traits/Opacity.ts\nconst key$4 = \"opacity\";\n/** @internal */\nfunction withOpacity(target) {\n\treturn key$4 in target;\n}\n/** @internal */\nfunction collectOpacityFromProps(props, style) {\n\tif (!withOpacity(props)) return;\n\tconst opacity = Animatable.getNumber(props.opacity);\n\tif (opacity === 1) return;\n\tstyle.opacity = opacity;\n}\n\n//#endregion\n//#region ../../library/src/render/traits/Overflow.ts\nfunction collectOverflowFromProps(props, style) {\n\tif (props.overflow) style.overflow = props.overflow;\n}\n\n//#endregion\n//#region ../../library/src/render/traits/Radius.ts\nconst key$3 = \"radius\";\nfunction hasRadius(props) {\n\treturn key$3 in props;\n}\n/**\n* Takes a border-radius value supporting a range of types and returns\n* a string representation for use in CSS.\n* NOTE: We always return a string so that we support both React.CSSProperties\n* as well as the CSSStyleDeclaration interface.\n*/\nfunction getRadiusValue(value) {\n\tlet num = Number(value);\n\tif (typeof value === \"string\" && Number.isNaN(num)) return value;\n\telse if (isAnimatable(value)) num = Animatable.getNumber(value);\n\treturn num ? `${num}px` : \"0\";\n}\nfunction hasRadiusValue(value) {\n\treturn value && value !== \"0\";\n}\n/**\n* We assign the borderRadius to each corner individually to make it easier to animate between\n* different frames.\n*/\nfunction collectRadiusFromProps(props, style) {\n\tif (!hasRadius(props)) return;\n\tconst { radius } = props;\n\tif (typeof radius === \"string\" || isAnimatable(radius) || isFiniteNumber(radius)) {\n\t\tconst radiusValue = getRadiusValue(radius);\n\t\tif (hasRadiusValue(radiusValue)) style.borderTopLeftRadius = style.borderTopRightRadius = style.borderBottomRightRadius = style.borderBottomLeftRadius = radiusValue;\n\t} else if (radius) {\n\t\tconst topLeft = getRadiusValue(radius.topLeft);\n\t\tconst topRight = getRadiusValue(radius.topRight);\n\t\tconst bottomRight = getRadiusValue(radius.bottomRight);\n\t\tconst bottomLeft = getRadiusValue(radius.bottomLeft);\n\t\tif (hasRadiusValue(topLeft) || hasRadiusValue(topRight) || hasRadiusValue(bottomRight) || hasRadiusValue(bottomLeft)) {\n\t\t\tstyle.borderTopLeftRadius = topLeft;\n\t\t\tstyle.borderTopRightRadius = topRight;\n\t\t\tstyle.borderBottomRightRadius = bottomRight;\n\t\t\tstyle.borderBottomLeftRadius = bottomLeft;\n\t\t}\n\t}\n}\n\n//#endregion\n//#region ../../library/src/render/traits/TextColor.ts\nfunction collectTextColorFromProps(props, style) {\n\tconst { color } = props;\n\tif (typeof color === \"string\") style.color = color;\n\telse if (Color.isColorObject(color)) style.color = color.initialValue || Color.toRgbString(color);\n}\n\n//#endregion\n//#region ../../library/src/render/types/Shadow.ts\nconst shadowKeys = [\n\t\"color\",\n\t\"x\",\n\t\"y\",\n\t\"blur\"\n];\n/** @public */\nconst Shadow = { is: (shadow) => {\n\treturn shadow && shadowKeys.every((key) => key in shadow);\n} };\nconst boxShadowKeys = [\n\t\"x\",\n\t\"y\",\n\t\"color\",\n\t\"inset\",\n\t\"blur\",\n\t\"spread\"\n];\n/** @public */\nconst BoxShadow = {\n\tis: (shadow) => {\n\t\treturn shadow && boxShadowKeys.every((key) => key in shadow);\n\t},\n\ttoCSS: (shadow) => {\n\t\treturn `${shadow.inset ? \"inset \" : \"\"}${shadow.x}px ${shadow.y}px ${shadow.blur}px ${shadow.spread}px ${shadow.color}`;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/render/style/shadow.tsx\nfunction shadowsAsFilter(shadows) {\n\tconst filters = [];\n\tif (shadows && shadows.length) {\n\t\tconst dropShadows = shadows.map((shadowItem) => {\n\t\t\treturn `drop-shadow(${shadowItem.x}px ${shadowItem.y}px ${shadowItem.blur}px ${shadowItem.color})`;\n\t\t});\n\t\tfilters.push(...dropShadows);\n\t}\n\treturn filters;\n}\nfunction collectTextShadowsForProps(props, style) {\n\tif (!props.shadows || props.shadows.length === 0) return;\n\tconst textShadow = props.shadows.map((shadow) => {\n\t\treturn `${shadow.x}px ${shadow.y}px ${shadow.blur}px ${shadow.color}`;\n\t}).join(\", \");\n\tif (!textShadow) return;\n\tstyle.textShadow = textShadow;\n}\nfunction collectBoxShadowsForProps(props, style) {\n\tif (!props.shadows || props.shadows.length === 0) return;\n\tconst boxShadow = props.shadows.map((shadowItem) => BoxShadow.toCSS(shadowItem)).join(\", \");\n\tif (!boxShadow) return;\n\tstyle.boxShadow = boxShadow;\n}\n/** @internal */\nfunction shadowForShape(boxShadows, rect, shapeId, fillEnabled, strokeEnabled, strokeWidth, strokeClipId, svgStrokeAttributes) {\n\tconst definition = [];\n\tlet outsetElement = null;\n\tlet insetElement = null;\n\tlet maskElement = null;\n\tconst needsStrokeClip = false;\n\tconst shadows = [];\n\tconst insetShadows = [];\n\tconst svgShadowProps = RenderTarget.current() === RenderTarget.canvas ? { className: \"svg-shadow\" } : {};\n\tfor (const shadow of boxShadows) shadow.inset ? insetShadows.push(shadow) : shadows.push(shadow);\n\tif (shadows.length > 0) {\n\t\tshadows.reverse();\n\t\tconst outsideShadowId = shapeId.add(\"_shadow_out\");\n\t\tconst normalizedRect = Rect.atOrigin(rect);\n\t\tconst shadowRects = [normalizedRect];\n\t\tfor (const shadow of shadows) {\n\t\t\tconst localShadowRect = localShadowFrame(shadow, normalizedRect, true);\n\t\t\tif (localShadowRect === null) continue;\n\t\t\tshadowRects.push(localShadowRect);\n\t\t}\n\t\tlet maxBlur = 0;\n\t\tconst filterElements = [];\n\t\tconst mergeElements = [];\n\t\tfor (let i = 0, il = shadows.length; i < il; i++) {\n\t\t\tconst shadow = shadows[i];\n\t\t\tif (!shadow) continue;\n\t\t\tconst shadowElements = outerShadowElements(shapeId, shadow, i);\n\t\t\tmaxBlur = Math.max(maxBlur, shadow.blur);\n\t\t\tfilterElements.push(shadowElements.filterElements);\n\t\t\tmergeElements.push(shadowElements.mergeElement);\n\t\t}\n\t\tlet expandStrokeWidth = strokeWidth;\n\t\tif (!isFiniteNumber(expandStrokeWidth)) expandStrokeWidth = 0;\n\t\tlet miter = svgStrokeAttributes.strokeMiterlimit;\n\t\tif (!isFiniteNumber(miter)) miter = 4;\n\t\tlet shadowRect = Rect.merge(...shadowRects);\n\t\tshadowRect = Rect.inflate(shadowRect, (expandStrokeWidth * miter / 2 + maxBlur) * 1.1);\n\t\tconst width = rect.width + (strokeWidth ? strokeWidth / 2 : 0);\n\t\tconst height = rect.height + (strokeWidth ? strokeWidth / 2 : 0);\n\t\tconst filterX = shadowRect.x / width * 100;\n\t\tconst filterY = shadowRect.y / height * 100;\n\t\tconst filterWidth = shadowRect.width / width * 100;\n\t\tconst filterHeight = shadowRect.height / height * 100;\n\t\tconst svgRect = {\n\t\t\tx: `${filterX.toFixed(1)}%`,\n\t\t\ty: `${filterY.toFixed(1)}%`,\n\t\t\twidth: `${filterWidth.toFixed(1)}%`,\n\t\t\theight: `${filterHeight.toFixed(1)}%`\n\t\t};\n\t\tdefinition.push(/* @__PURE__ */ jsxs(\"filter\", {\n\t\t\tid: outsideShadowId.id,\n\t\t\tfilterUnits: \"objectBoundingBox\",\n\t\t\t...svgRect,\n\t\t\t...svgShadowProps,\n\t\t\tchildren: [filterElements, shadows.length > 1 ? /* @__PURE__ */ jsx(\"feMerge\", { children: mergeElements }) : null]\n\t\t}, outsideShadowId.id));\n\t\tconst maskId = shapeId.add(\"mask\");\n\t\tmaskElement = /* @__PURE__ */ jsxs(\"mask\", {\n\t\t\tid: maskId.id,\n\t\t\t...svgRect,\n\t\t\tchildren: [/* @__PURE__ */ jsx(\"rect\", {\n\t\t\t\t...svgRect,\n\t\t\t\tfill: \"white\"\n\t\t\t}), /* @__PURE__ */ jsx(\"use\", {\n\t\t\t\thref: shapeId.link,\n\t\t\t\tfill: \"black\",\n\t\t\t\tfillOpacity: fillEnabled ? void 0 : 0\n\t\t\t})]\n\t\t});\n\t\toutsetElement = /* @__PURE__ */ jsx(\"g\", {\n\t\t\tfilter: outsideShadowId.urlLink,\n\t\t\t...svgShadowProps,\n\t\t\tmask: maskId.urlLink,\n\t\t\tchildren: /* @__PURE__ */ jsx(\"use\", {\n\t\t\t\t...svgStrokeAttributes,\n\t\t\t\tfill: \"black\",\n\t\t\t\tfillOpacity: fillEnabled ? void 0 : 0,\n\t\t\t\tstroke: \"black\",\n\t\t\t\tstrokeOpacity: strokeEnabled ? void 0 : 0,\n\t\t\t\tstrokeWidth: strokeEnabled ? strokeWidth : 0,\n\t\t\t\txlinkHref: shapeId.link,\n\t\t\t\tclipPath: strokeClipId.urlLink\n\t\t\t})\n\t\t});\n\t}\n\tif (insetShadows.length) {\n\t\tinsetShadows.reverse();\n\t\tconst insideShadowId = shapeId.add(\"_shadow_inside\");\n\t\tconst normalizedRect = Rect.atOrigin(rect);\n\t\tconst shadowRects = [normalizedRect];\n\t\tfor (const shadow of insetShadows) {\n\t\t\tconst localShadowRect = localShadowFrame(shadow, normalizedRect, true);\n\t\t\tif (localShadowRect === null) continue;\n\t\t\tshadowRects.push(localShadowRect);\n\t\t}\n\t\tconst shadowRect = Rect.merge(...shadowRects);\n\t\tconst width = rect.width + (strokeWidth ? strokeWidth / 2 : .1);\n\t\tconst height = rect.height + (strokeWidth ? strokeWidth / 2 : .1);\n\t\tconst filterX = shadowRect.x / width * 100;\n\t\tconst filterY = shadowRect.y / height * 100;\n\t\tconst filterWidth = shadowRect.width / width * 100;\n\t\tconst filterHeight = shadowRect.height / height * 100;\n\t\tconst filterElements = [];\n\t\tconst mergeElements = [];\n\t\tfor (let i = 0, il = insetShadows.length; i < il; i++) {\n\t\t\tconst shadow = insetShadows[i];\n\t\t\tif (!shadow) continue;\n\t\t\tconst shadowElements = innerShadowElements(shapeId, shadow, i);\n\t\t\tfilterElements.push(shadowElements.filterElements);\n\t\t\tmergeElements.push(shadowElements.mergeElement);\n\t\t}\n\t\tdefinition.push(/* @__PURE__ */ jsxs(\"filter\", {\n\t\t\tid: insideShadowId.id,\n\t\t\tx: `${filterX.toFixed(1)}%`,\n\t\t\ty: `${filterY.toFixed(1)}%`,\n\t\t\twidth: `${filterWidth.toFixed(1)}%`,\n\t\t\theight: `${filterHeight.toFixed(1)}%`,\n\t\t\tfilterUnits: \"objectBoundingBox\",\n\t\t\t...svgShadowProps,\n\t\t\tchildren: [filterElements, insetShadows.length > 1 ? /* @__PURE__ */ jsx(\"feMerge\", { children: mergeElements }) : null]\n\t\t}, insideShadowId.id));\n\t\tlet clipPath;\n\t\tinsetElement = /* @__PURE__ */ jsx(\"use\", {\n\t\t\tfill: \"black\",\n\t\t\tfillOpacity: \"1\",\n\t\t\tfilter: insideShadowId.urlLink,\n\t\t\txlinkHref: shapeId.link,\n\t\t\tclipPath,\n\t\t\t...svgShadowProps\n\t\t});\n\t}\n\treturn {\n\t\tdefinition,\n\t\toutsetElement,\n\t\tinsetElement,\n\t\tneedsStrokeClip,\n\t\tmaskElement\n\t};\n}\nfunction outerShadowElements(shapeID, shadow, index) {\n\tconst shadowKey = shapeID.add(\"_outer_shadow\" + index);\n\treturn {\n\t\tfilterElements: /* @__PURE__ */ jsx(OuterShadowFilterElements, {\n\t\t\tshadow,\n\t\t\tshadowKey\n\t\t}, shadowKey.id + \"-filters\"),\n\t\tmergeElement: /* @__PURE__ */ jsx(\"feMergeNode\", { in: shadowKey.id }, shadowKey.id + \"-merge\")\n\t};\n}\nconst OuterShadowFilterElements = (props) => {\n\tconst { shadow, shadowKey } = props;\n\tconst offsetId = shadowKey.add(\"offset\").id;\n\tconst blurId = shadowKey.add(\"blur\").id;\n\tconst floodId = shadowKey.add(\"flood\").id;\n\treturn /* @__PURE__ */ jsxs(Fragment$1, { children: [\n\t\t/* @__PURE__ */ jsx(\"feOffset\", {\n\t\t\tdx: shadow.x,\n\t\t\tdy: shadow.y,\n\t\t\tin: \"SourceAlpha\",\n\t\t\tresult: offsetId\n\t\t}),\n\t\t/* @__PURE__ */ jsx(\"feGaussianBlur\", {\n\t\t\tstdDeviation: shadow.blur / 2,\n\t\t\tin: offsetId,\n\t\t\tresult: blurId\n\t\t}),\n\t\t/* @__PURE__ */ jsx(\"feFlood\", {\n\t\t\tfloodColor: shadow.color,\n\t\t\tresult: floodId\n\t\t}),\n\t\t/* @__PURE__ */ jsx(\"feComposite\", {\n\t\t\tin: floodId,\n\t\t\tin2: blurId,\n\t\t\toperator: \"in\",\n\t\t\tresult: shadowKey.id\n\t\t})\n\t] });\n};\nfunction innerShadowElements(shapeID, shadow, index) {\n\tconst shadowKey = shapeID.add(\"_inside_shadow\" + index);\n\treturn {\n\t\tfilterElements: /* @__PURE__ */ jsx(InnerShadowFilterElements, {\n\t\t\tshadow,\n\t\t\tshadowKey\n\t\t}, shadowKey.id + \"-filters\"),\n\t\tmergeElement: /* @__PURE__ */ jsx(\"feMergeNode\", { in: shadowKey.id }, shadowKey.id + \"-merge\")\n\t};\n}\nconst InnerShadowFilterElements = (props) => {\n\tconst { shadow, shadowKey } = props;\n\tconst blurId = shadowKey.add(\"blur\").id;\n\tconst offsetId = shadowKey.add(\"offset\").id;\n\tconst compositeId = shadowKey.add(\"composite\").id;\n\tconst floodId = shadowKey.add(\"flood\").id;\n\treturn /* @__PURE__ */ jsxs(Fragment$1, { children: [\n\t\t/* @__PURE__ */ jsx(\"feGaussianBlur\", {\n\t\t\tstdDeviation: shadow.blur / 2,\n\t\t\tin: \"SourceAlpha\",\n\t\t\tresult: blurId\n\t\t}),\n\t\t/* @__PURE__ */ jsx(\"feOffset\", {\n\t\t\tdx: shadow.x,\n\t\t\tdy: shadow.y,\n\t\t\tin: blurId,\n\t\t\tresult: offsetId\n\t\t}),\n\t\t/* @__PURE__ */ jsx(\"feComposite\", {\n\t\t\tin: offsetId,\n\t\t\tin2: \"SourceAlpha\",\n\t\t\toperator: \"arithmetic\",\n\t\t\tk2: \"-1\",\n\t\t\tk3: \"1\",\n\t\t\tresult: compositeId\n\t\t}),\n\t\t/* @__PURE__ */ jsx(\"feFlood\", {\n\t\t\tfloodColor: shadow.color,\n\t\t\tresult: floodId\n\t\t}),\n\t\t/* @__PURE__ */ jsx(\"feComposite\", {\n\t\t\tin: floodId,\n\t\t\tin2: compositeId,\n\t\t\toperator: \"in\",\n\t\t\tresult: shadowKey.id\n\t\t})\n\t] });\n};\nfunction calcMaxRealisticShadowBlur(distance, focus) {\n\treturn interpolate([\n\t\t0,\n\t\t.5,\n\t\t1\n\t], [\n\t\tdistance * 5,\n\t\tdistance,\n\t\t0\n\t])(focus);\n}\nfunction calcRealisticShadowSpread(diffusion) {\n\treturn mix(-5, 0, diffusion);\n}\n/** @internal */\nfunction localShadowFrame(shadow, rect, isSVG = false) {\n\tif (!isSVG && asRecord(shadow).inset) return null;\n\tlet growth = shadow.blur;\n\tlet minX;\n\tlet maxX;\n\tlet minY;\n\tlet maxY;\n\tif (isSVG) {\n\t\tminX = -Math.abs(shadow.x) - growth;\n\t\tmaxX = Math.abs(shadow.x) + rect.width + growth;\n\t\tminY = -Math.abs(shadow.y) - growth;\n\t\tmaxY = Math.abs(shadow.y) + rect.height + growth;\n\t} else if (BoxShadow.is(shadow) && shadow.type === \"realistic\") {\n\t\tgrowth = \"focus\" in shadow && \"diffusion\" in shadow ? calcMaxRealisticShadowBlur(distance(shadow.x, shadow.y), shadow.focus) + calcRealisticShadowSpread(shadow.diffusion) : 0;\n\t\tif (shadow.x >= 0) {\n\t\t\tminX = 0 - growth;\n\t\t\tmaxX = shadow.x + rect.width + growth;\n\t\t} else {\n\t\t\tminX = shadow.x - growth;\n\t\t\tmaxX = rect.width + growth;\n\t\t}\n\t\tif (shadow.y >= 0) {\n\t\t\tminY = 0 - growth;\n\t\t\tmaxY = shadow.y + rect.height + growth;\n\t\t} else {\n\t\t\tminY = shadow.y - growth;\n\t\t\tmaxY = rect.height + growth;\n\t\t}\n\t} else {\n\t\tif (\"spread\" in shadow) growth += shadow.spread;\n\t\tminX = shadow.x - growth;\n\t\tmaxX = shadow.x + rect.width + growth;\n\t\tminY = shadow.y - growth;\n\t\tmaxY = shadow.y + rect.height + growth;\n\t}\n\tif (maxX <= minX || maxY <= minY) return null;\n\treturn {\n\t\tx: minX,\n\t\ty: minY,\n\t\twidth: maxX - minX,\n\t\theight: maxY - minY\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/utils/filtersForNode.ts\nfunction collectLayerFilters(props, style) {\n\tconst filters = [];\n\t/**\n\t* number-percentage types are set as numbers, as when filters are read from the DOM\n\t* they are returned as numbers rather than percetages. This makes it simpler for Motion\n\t* to animate from filters read from the DOM.\n\t*/\n\tif (isFiniteNumber(props.brightness)) filters.push(`brightness(${props.brightness / 100})`);\n\tif (isFiniteNumber(props.contrast)) filters.push(`contrast(${props.contrast / 100})`);\n\tif (isFiniteNumber(props.grayscale)) filters.push(`grayscale(${props.grayscale / 100})`);\n\tif (isFiniteNumber(props.hueRotate)) filters.push(`hue-rotate(${props.hueRotate}deg)`);\n\tif (isFiniteNumber(props.invert)) filters.push(`invert(${props.invert / 100})`);\n\tif (isFiniteNumber(props.saturate)) filters.push(`saturate(${props.saturate / 100})`);\n\tif (isFiniteNumber(props.sepia)) filters.push(`sepia(${props.sepia / 100})`);\n\tif (isFiniteNumber(props.blur)) filters.push(`blur(${props.blur}px)`);\n\tif (props.dropShadows) filters.push(...shadowsAsFilter(props.dropShadows));\n\tif (filters.length === 0) return;\n\tstyle.filter = style.WebkitFilter = filters.join(\" \");\n}\nfunction collectBackgroundFilters(props, style) {\n\tif (isFiniteNumber(props.backgroundBlur)) style.backdropFilter = style.WebkitBackdropFilter = `blur(${props.backgroundBlur}px)`;\n}\n/** @internal */\nfunction collectFiltersFromProps(props, style) {\n\tcollectBackgroundFilters(props, style);\n\tcollectLayerFilters(props, style);\n}\n\n//#endregion\n//#region ../../library/src/render/style/collectVisualStyleFromProps.ts\n/** @internal */\nfunction collectVisualStyleFromProps(props, style, isTextNode = false) {\n\tcollectBackgroundFromProps(props, style);\n\tcollectRadiusFromProps(props, style);\n\tcollectFiltersFromProps(props, style);\n\tcollectBlendingFromProps(props, style);\n\tcollectOverflowFromProps(props, style);\n\tcollectOpacityFromProps(props, style);\n\tcollectTextColorFromProps(props, style);\n\tif (isTextNode) collectTextShadowsForProps(props, style);\n\telse collectBoxShadowsForProps(props, style);\n}\n\n//#endregion\n//#region ../../library/src/render/traits/Transform.ts\nconst getNumber = /* @__PURE__ */ (() => Animatable.getNumber)();\nconst transformDefaults = {\n\tz: 0,\n\trotation: 0,\n\trotationX: 0,\n\trotationY: 0,\n\trotationZ: 0,\n\tscale: 1,\n\tscaleX: 1,\n\tscaleY: 1,\n\tscaleZ: 1,\n\tskew: 0,\n\tskewX: 0,\n\tskewY: 0,\n\toriginX: .5,\n\toriginY: .5,\n\toriginZ: 0\n};\nfunction getRotation(rotation, rotate) {\n\tif (typeof rotate === \"string\") rotate = parseFloat(rotate);\n\treturn isFiniteNumber(rotate) ? rotate : getNumber(rotation);\n}\nfunction collectTransformFromProps(props, rect, style) {\n\tconst motionStyle = style;\n\tconst x = typeof rect.x === \"number\" ? `${rect.x}px` : rect.x;\n\tconst y = typeof rect.y === \"number\" ? `${rect.y}px` : rect.y;\n\tconst z = getNumber(props.z);\n\tconst scaleZ = getNumber(props.scaleZ);\n\tconst originZ = getNumber(props.originZ);\n\tconst rotationZ = getRotation(props.rotationZ, resolveMotionValue(motionStyle.rotateZ));\n\tconst rotationX = getRotation(props.rotationX, resolveMotionValue(motionStyle.rotateX));\n\tconst rotationY = getRotation(props.rotationY, resolveMotionValue(motionStyle.rotateY));\n\tconst scale = getNumber(props.scale);\n\tconst scaleX = getNumber(props.scaleX);\n\tconst scaleY = getNumber(props.scaleY);\n\tconst skew = getNumber(props.skew);\n\tconst skewX = getNumber(props.skewX);\n\tconst skewY = getNumber(props.skewY);\n\tconst rotation = getRotation(props.rotation, resolveMotionValue(motionStyle.rotate));\n\tif (RenderEnvironment.target === RenderTarget.export || z !== 0 || scaleZ !== 1 || originZ !== 0 || rotationZ !== 0 || rotationX !== 0 || rotationY !== 0) style.transform = `\n            ${`translate3d(${x}, ${y}, ${z}px)`}\n            scale3d(${scaleX * scale}, ${scaleY * scale}, ${scaleZ})\n            skew(${skew}deg,${skew}deg)\n            skewX(${skewX}deg)\n            skewY(${skewY}deg)\n            translateZ(${originZ}px)\n            rotateX(${rotationX}deg)\n            rotateY(${rotationY}deg)\n            rotateZ(${(rotation + rotationZ).toFixed(4)}deg)\n            translateZ(${-originZ}px)`;\n\telse style.transform = `\n            ${`translate(${x}, ${y})`}\n            scale(${scaleX * scale}, ${scaleY * scale})\n            skew(${skew}deg,${skew}deg)\n            skewX(${skewX}deg)\n            skewY(${skewY}deg)\n            rotate(${rotation.toFixed(4)}deg)`;\n\tconst transformOrigin = `${getNumber(props.originX) * 100}% ${getNumber(props.originY) * 100}%`;\n\tstyle.transformOrigin = transformOrigin;\n\tstyle.WebkitTransformOrigin = transformOrigin;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Frame/DeprecatedFrame.tsx\n/** @internal */\nfunction cssBackgroundSize(size) {\n\tswitch (size) {\n\t\tcase \"fit\": return \"contain\";\n\t\tcase \"stretch\": return \"100% 100%\";\n\t\tdefault: return \"cover\";\n\t}\n}\nfunction collectBackgroundImageFromProps(props, style) {\n\tconst image = backgroundImageFromProps(props);\n\tif (image) {\n\t\tstyle.backgroundImage = `url(\"${image.src}\")`;\n\t\tstyle.backgroundSize = cssBackgroundSize(image.fit);\n\t\tstyle.backgroundRepeat = \"no-repeat\";\n\t\tstyle.backgroundPosition = \"center\";\n\t}\n}\nfunction toPixelString(value) {\n\treturn isFiniteNumber(value) ? `${value}px` : value;\n}\nfunction applyLayoutProp(style, props, key) {\n\tif (props[key] !== void 0) {\n\t\tconst value = Animatable.get(props[key], void 0);\n\t\tasRecord(style)[key] = toPixelString(value);\n\t}\n}\n/**\n* @public\n*/\nconst DeprecatedFrame = /* @__PURE__ */ (() => {\n\tclass DeprecatedFrameInner extends Layer {\n\t\tstatic supportsConstraints = true;\n\t\tstatic defaultFrameSpecificProps = {\n\t\t\t...constraintDefaults,\n\t\t\t...transformDefaults,\n\t\t\topacity: 1,\n\t\t\tbackground: Color(\"rgba(0, 170, 255, 0.3)\"),\n\t\t\tvisible: true,\n\t\t\tborderWidth: 0,\n\t\t\tborderColor: \"#222\",\n\t\t\tborderStyle: \"solid\"\n\t\t};\n\t\tstatic defaultProps = {\n\t\t\t...Layer.defaultProps,\n\t\t\t...DeprecatedFrameInner.defaultFrameSpecificProps\n\t\t};\n\t\tstatic rect(props) {\n\t\t\tconst constraintValues = ConstraintValues.fromProperties(props);\n\t\t\tconst parentSizeInfo = props.parentSize ? {\n\t\t\t\tsizing: props.parentSize,\n\t\t\t\tpositioning: props.parentSize,\n\t\t\t\tviewport: null\n\t\t\t} : null;\n\t\t\treturn ConstraintValues.toRect(constraintValues, parentSizeInfo, null, true);\n\t\t}\n\t\tget rect() {\n\t\t\treturn DeprecatedFrameInner.rect(this.props);\n\t\t}\n\t\telement = null;\n\t\timageDidChange = false;\n\t\tstate = { size: null };\n\t\tstatic getDerivedStateFromProps(nextProps, prevState) {\n\t\t\tconst size = DeprecatedFrameInner.updatedSize(nextProps, prevState);\n\t\t\tconst { target } = RenderEnvironment;\n\t\t\tif (nextProps.background && BackgroundImage.isImageObject(nextProps.background) ? nextProps.background.src : null) return { size };\n\t\t\tif (prevState.size) {\n\t\t\t\tif (target === RenderTarget.preview) return null;\n\t\t\t\tif (prevState.size.width === size.width && prevState.size.height === size.height) return null;\n\t\t\t}\n\t\t\treturn { size };\n\t\t}\n\t\tstatic updatedSize(props, state) {\n\t\t\tconst rect = DeprecatedFrameInner.rect(props);\n\t\t\tlet size = state.size;\n\t\t\tconst newSize = {\n\t\t\t\twidth: rect.width,\n\t\t\t\theight: rect.height\n\t\t\t};\n\t\t\tconst { target } = RenderEnvironment;\n\t\t\tif (!size) {\n\t\t\t\tif (target === RenderTarget.preview) size = ObservableObject(newSize, true);\n\t\t\t\telse size = newSize;\n\t\t\t} else if (isAnimatable(size.width) && isAnimatable(size.height)) {\n\t\t\t\tsize.width.set(newSize.width);\n\t\t\t\tsize.height.set(newSize.height);\n\t\t\t} else size = newSize;\n\t\t\treturn size;\n\t\t}\n\t\tgetStyle() {\n\t\t\tconst rect = this.rect;\n\t\t\tconst style = {\n\t\t\t\tdisplay: \"block\",\n\t\t\t\tposition: \"absolute\",\n\t\t\t\twidth: `${rect.width}px`,\n\t\t\t\theight: `${rect.height}px`,\n\t\t\t\tpointerEvents: void 0,\n\t\t\t\tuserSelect: \"none\"\n\t\t\t};\n\t\t\tlet left = Animatable.get(this.props.left, void 0);\n\t\t\tlet top = Animatable.get(this.props.top, void 0);\n\t\t\tObject.assign(style, this.props._initialStyle);\n\t\t\tconst hasParentSize = this.context.parentSize !== 1;\n\t\t\tconst perspective = Animatable.get(this.props.perspective, void 0);\n\t\t\tstyle.perspective = perspective;\n\t\t\tstyle.WebkitPerspective = perspective;\n\t\t\tlet backfaceVisibility = void 0;\n\t\t\tconst backfaceVisible = Animatable.get(this.props.backfaceVisible, void 0);\n\t\t\tif (backfaceVisible === true) backfaceVisibility = \"visible\";\n\t\t\telse if (backfaceVisible === false) backfaceVisibility = \"hidden\";\n\t\t\tstyle.backfaceVisibility = backfaceVisibility;\n\t\t\tstyle.WebkitBackfaceVisibility = backfaceVisibility;\n\t\t\tconst preserve3d = Animatable.get(this.props.preserve3d, void 0);\n\t\t\tif (preserve3d === true) style.transformStyle = \"preserve-3d\";\n\t\t\telse if (preserve3d === false) style.transformStyle = \"flat\";\n\t\t\t/**\n\t\t\t* If we don't have ParentSizeState, we can't correctly figure out x/y position based\n\t\t\t* on the parent size and this component's width/height. So we can apply right and bottom\n\t\t\t* directly and let the DOM layout figure out the rest.\n\t\t\t*/\n\t\t\tif (!hasParentSize) {\n\t\t\t\tapplyLayoutProp(style, this.props, \"right\");\n\t\t\t\tapplyLayoutProp(style, this.props, \"bottom\");\n\t\t\t\tconst stringWidth = toPixelString(Animatable.get(this.props.width, void 0));\n\t\t\t\tconst stringHeight = toPixelString(Animatable.get(this.props.height, void 0));\n\t\t\t\tif (typeof left === \"string\" && left.endsWith(\"%\") && this.props.right === null) {\n\t\t\t\t\tleft = `calc(${left} - calc(${stringWidth}} / 2))`;\n\t\t\t\t\tstyle.width = stringWidth;\n\t\t\t\t}\n\t\t\t\tif (typeof top === \"string\" && top.endsWith(\"%\") && this.props.bottom === null) {\n\t\t\t\t\ttop = `calc(${top} - calc(${stringHeight} / 2))`;\n\t\t\t\t\tstyle.height = stringHeight;\n\t\t\t\t}\n\t\t\t\tif (top !== void 0 && style.bottom !== void 0) {\n\t\t\t\t\tstyle.height = void 0;\n\t\t\t\t\ttop = toPixelString(Animatable.get(this.props.top, void 0));\n\t\t\t\t} else style.height = stringHeight;\n\t\t\t\tif (left !== void 0 && style.right !== void 0) {\n\t\t\t\t\tstyle.width = void 0;\n\t\t\t\t\tleft = toPixelString(Animatable.get(this.props.left, void 0));\n\t\t\t\t} else style.width = stringWidth;\n\t\t\t}\n\t\t\tconst transformRect = { ...rect };\n\t\t\tif (typeof left !== \"undefined\") transformRect.x = left;\n\t\t\tif (typeof top !== \"undefined\") transformRect.y = top;\n\t\t\tcollectTransformFromProps(this.props, transformRect, style);\n\t\t\tcollectVisualStyleFromProps(this.props, style);\n\t\t\tcollectBackgroundImageFromProps(this.props, style);\n\t\t\tLayer.applyWillChange(this.props, style, false);\n\t\t\tif (this.props.style) Object.assign(style, this.props.style);\n\t\t\treturn style;\n\t\t}\n\t\tupdateStyle = () => {\n\t\t\tif (!this.element) return;\n\t\t\tObject.assign(this.element.style, this.getStyle());\n\t\t};\n\t\tsetElement = (element) => {\n\t\t\tthis.element = element;\n\t\t\tthis.setLayerElement(element);\n\t\t};\n\t\tpropsObserver;\n\t\tpropsObserverCancel;\n\t\tsizeObserver;\n\t\tsizeObserverCancel;\n\t\tcomponentDidMount() {\n\t\t\tconst { target } = RenderEnvironment;\n\t\t\tif (target === RenderTarget.preview) {\n\t\t\t\tthis.propsObserver = ObservableObject(this.props, true);\n\t\t\t\tthis.propsObserverCancel = ObservableObject.addObserver(this.propsObserver, this.onPropsChange);\n\t\t\t\tif (this.props.parentSize && isAnimatable(this.props.parentSize.width) && isAnimatable(this.props.parentSize.height)) {\n\t\t\t\t\tthis.sizeObserver = ObservableObject(this.props.parentSize, true);\n\t\t\t\t\tthis.sizeObserverCancel = ObservableObject.addObserver(this.sizeObserver, this.onSizeChange);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcomponentDidUpdate() {\n\t\t\tconst { target } = RenderEnvironment;\n\t\t\tthis.propsObserverCancel?.();\n\t\t\tthis.sizeObserverCancel?.();\n\t\t\tif (target === RenderTarget.preview) {\n\t\t\t\tthis.propsObserver = ObservableObject(this.props, true);\n\t\t\t\tthis.propsObserverCancel = ObservableObject.addObserver(this.propsObserver, this.onPropsChange);\n\t\t\t\tif (this.props.parentSize && isAnimatable(this.props.parentSize.width) && isAnimatable(this.props.parentSize.height)) {\n\t\t\t\t\tthis.sizeObserver = ObservableObject(this.props.parentSize, true);\n\t\t\t\t\tthis.sizeObserverCancel = ObservableObject.addObserver(this.sizeObserver, this.onSizeChange);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tonPropsChange = (props) => {\n\t\t\tconst rect = DeprecatedFrameInner.rect(Animatable.objectToValues(props.value));\n\t\t\tif (this.state.size && isAnimatable(this.state.size.width) && isAnimatable(props.value.width)) this.state.size.width.set(rect.width);\n\t\t\tif (this.state.size && isAnimatable(this.state.size.height) && isAnimatable(props.value.height)) this.state.size.height.set(rect.height);\n\t\t\tthis.updateStyle();\n\t\t};\n\t\tonSizeChange = () => {\n\t\t\tthis.updateStyle();\n\t\t};\n\t\tcomponentWillUnmount() {\n\t\t\tthis.propsObserverCancel?.();\n\t\t\tthis.propsObserverCancel = void 0;\n\t\t\tthis.sizeObserverCancel?.();\n\t\t\tthis.sizeObserverCancel = void 0;\n\t\t}\n\t\trender() {\n\t\t\t/* @__PURE__ */ countNodeRender();\n\t\t\tconst { visible, id, className } = this.props;\n\t\t\tif (!visible) return null;\n\t\t\tconst style = this.getStyle();\n\t\t\tconst rect = this.rect;\n\t\t\tconst parentSize = {\n\t\t\t\twidth: rect.width,\n\t\t\t\theight: rect.height\n\t\t\t};\n\t\t\treturn /* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\tid,\n\t\t\t\tstyle,\n\t\t\t\tref: this.setElement,\n\t\t\t\tclassName,\n\t\t\t\tchildren: [/* @__PURE__ */ jsx(ProvideParentSize, {\n\t\t\t\t\tparentSize,\n\t\t\t\t\tchildren: this.layoutChildren()\n\t\t\t\t}), /* @__PURE__ */ jsx(Border, { ...this.props })]\n\t\t\t});\n\t\t}\n\t\tlayoutChildren() {\n\t\t\tconst _forwardedOverrides = this.props._forwardedOverrides;\n\t\t\tlet children = React.Children.map(this.props.children, (child) => {\n\t\t\t\tif (isConstraintSupportingChild(child)) return React.cloneElement(child, {\n\t\t\t\t\tparentSize: this.state.size,\n\t\t\t\t\t_forwardedOverrides\n\t\t\t\t});\n\t\t\t\telse if (_forwardedOverrides && child) return React.cloneElement(child, { _forwardedOverrides });\n\t\t\t\telse return child;\n\t\t\t});\n\t\t\tif (children?.length === 1 && typeof children[0] === \"string\") children = [/* @__PURE__ */ jsx(Center, { children }, \"0\")];\n\t\t\treturn children;\n\t\t}\n\t}\n\tDeprecatedFrameInner.contextType = ConstraintsContext;\n\treturn DeprecatedFrameInner;\n})();\nfunction Center(props) {\n\tconst style = Object.assign({}, {\n\t\theight: \"100%\",\n\t\tdisplay: \"flex\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\tfontFamily: \"Helvetica\"\n\t}, props.style || {});\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\tstyle,\n\t\tchildren: props.children\n\t});\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Frame/isDeprecatedFrameProps.ts\nconst frameWithMotionPropsFields = [\n\t\"_border\",\n\t\"_constraints\",\n\t\"animate\",\n\t\"initial\",\n\t\"variants\",\n\t\"transition\",\n\t\"inherit\",\n\t\"center\",\n\t\"initial\",\n\t\"transformTemplate\",\n\t\"animate\",\n\t\"variants\",\n\t\"transition\",\n\t\"onUpdate\",\n\t\"onAnimationComplete\",\n\t\"onPanSessionStart\",\n\t\"onTapCancel\",\n\t\"whileTap\",\n\t\"whileHover\",\n\t\"onHoverStart\",\n\t\"onHoverEnd\",\n\t\"drag\",\n\t\"dragDirectionLock\",\n\t\"dragPropagation\",\n\t\"dragConstraints\",\n\t\"dragElastic\",\n\t\"dragMomentum\",\n\t\"dragTransition\",\n\t\"onDragStart\",\n\t\"onDragEnd\",\n\t\"onDrag\",\n\t\"onDirectionLock\",\n\t\"onDragTransitionEnd\",\n\t\"x\",\n\t\"y\",\n\t\"rotate\",\n\t\"rotateX\",\n\t\"rotateY\",\n\t\"rotateZ\",\n\t\"position\",\n\t\"border\",\n\t\"borderRadius\",\n\t\"cornerShape\",\n\t\"shadow\",\n\t\"size\"\n];\nconst deprecatedFramePropsFields = [\n\t\"autoSize\",\n\t\"aspectRatio\",\n\t\"borderWidth\",\n\t\"borderStyle\",\n\t\"borderColor\",\n\t\"centerX\",\n\t\"centerY\"\n];\n/**\n* This function guard will define is props meant to be used with old frame or with new one\n* @param props Old or new props for the frame\n*/\nfunction isDeprecatedFrameProps(props) {\n\tfor (const propKey in props) if (isAnimatable(props[propKey])) return true;\n\tfor (const field of frameWithMotionPropsFields) if (props.hasOwnProperty(field)) return false;\n\tfor (const field of deprecatedFramePropsFields) if (props.hasOwnProperty(field)) return true;\n\treturn false;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Frame/index.tsx\n/** @public */\nconst DeprecatedFrameWithEvents = /* @__PURE__ */ WithEvents(DeprecatedFrame);\n/** @public */\nconst Frame = /* @__PURE__ */ (() => {\n\tconst FrameInner = forwardRef(function FrameInner(props, ref) {\n\t\tconst parentSize = useParentSize();\n\t\tif (isDeprecatedFrameProps(props)) {\n\t\t\tconst currentParentSize = props.parentSize || deprecatedParentSize(parentSize);\n\t\t\treturn /* @__PURE__ */ jsx(DeprecatedFrameWithEvents, {\n\t\t\t\t...props,\n\t\t\t\tparentSize: currentParentSize\n\t\t\t});\n\t\t}\n\t\treturn /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\t\t...props,\n\t\t\tref\n\t\t});\n\t});\n\tFrameInner[\"displayName\"] = \"Frame\";\n\treturn FrameInner;\n})();\n\n//#endregion\n//#region ../../library/src/components/Draggable.ts\n/** @public */\nconst Draggable = /* @__PURE__ */ WithDragging(DeprecatedFrameWithEvents);\n\n//#endregion\n//#region ../../library/src/render/utils/debounce.ts\n/** @internal */\nfunction debounce(fn, time) {\n\tlet timeout;\n\tconst debounced = (...args) => {\n\t\tsafeWindow.clearTimeout(timeout);\n\t\ttimeout = safeWindow.setTimeout(fn, time, ...args);\n\t};\n\tconst cancel = () => {\n\t\tsafeWindow.clearTimeout(timeout);\n\t};\n\tdebounced.cancel = cancel;\n\treturn debounced;\n}\n\n//#endregion\n//#region ../../library/src/components/Scroll/useWheelScroll.ts\nfunction useWheelScroll(ref, { enabled, initial, prev, direction, constraints, offsetX, offsetY, onScrollStart, onScroll, onScrollEnd }) {\n\tconst isWheelScrollActive = useRef(false);\n\tconst getPointData = useCallback(() => {\n\t\tconst point = getPoint(offsetX, offsetY);\n\t\tconst data = {\n\t\t\tpoint,\n\t\t\tvelocity: {\n\t\t\t\tx: offsetX.getVelocity(),\n\t\t\t\ty: offsetY.getVelocity()\n\t\t\t},\n\t\t\toffset: {\n\t\t\t\tx: point.x - initial.x,\n\t\t\t\ty: point.y - initial.y\n\t\t\t},\n\t\t\tdelta: {\n\t\t\t\tx: point.x - prev.x,\n\t\t\t\ty: point.y - prev.y\n\t\t\t}\n\t\t};\n\t\tprev.x = point.x;\n\t\tprev.y = point.y;\n\t\treturn data;\n\t}, []);\n\tlet handler;\n\tif (enabled) {\n\t\tfunction clampX(v) {\n\t\t\treturn constraints.current === null ? v : clamp$1(v, constraints.current.left, constraints.current.right);\n\t\t}\n\t\tfunction clampY(v) {\n\t\t\treturn constraints.current === null ? v : clamp$1(v, constraints.current.top, constraints.current.bottom);\n\t\t}\n\t\tfunction updateX(delta) {\n\t\t\toffsetX.stop();\n\t\t\toffsetX.set(clampX(offsetX.get() - delta));\n\t\t}\n\t\tfunction updateY(delta) {\n\t\t\toffsetY.stop();\n\t\t\toffsetY.set(clampY(offsetY.get() - delta));\n\t\t}\n\t\tconst debouncedOnScrollEnd = debounce(() => {\n\t\t\tonScrollEnd?.(getPointData());\n\t\t\tisWheelScrollActive.current = false;\n\t\t}, 200);\n\t\thandler = (e) => {\n\t\t\te.preventDefault();\n\t\t\tif (!isWheelScrollActive.current) {\n\t\t\t\tconst x = offsetX.get();\n\t\t\t\tconst y = offsetY.get();\n\t\t\t\tinitial.x = x;\n\t\t\t\tinitial.y = y;\n\t\t\t\tprev.x = x;\n\t\t\t\tprev.y = y;\n\t\t\t\tonScrollStart?.(getPointData());\n\t\t\t\tisWheelScrollActive.current = true;\n\t\t\t}\n\t\t\tswitch (direction) {\n\t\t\t\tcase \"horizontal\":\n\t\t\t\t\tupdateX(e.deltaX);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"vertical\":\n\t\t\t\t\tupdateY(e.deltaY);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tupdateX(e.deltaX);\n\t\t\t\t\tupdateY(e.deltaY);\n\t\t\t}\n\t\t\tonScroll?.(getPointData());\n\t\t\tdebouncedOnScrollEnd();\n\t\t};\n\t}\n\tuseDomEvent(ref, \"wheel\", handler, { passive: false });\n}\nfunction getPoint(x, y) {\n\treturn {\n\t\tx: x.get(),\n\t\ty: y.get()\n\t};\n}\n\n//#endregion\n//#region ../../shared/src/parseNumberRounded.ts\nfunction parseNumberRounded(value, precision = 2) {\n\tlet number = 0;\n\tif (typeof value === \"number\") number = value;\n\telse if (typeof value === \"string\") number = parseFloat(value);\n\telse return;\n\tif (Number.isInteger(number)) return number;\n\tlet multiplier = 1;\n\twhile (precision-- > 0) multiplier *= 10;\n\tif (number < 0) multiplier *= -1;\n\treturn Math.round(number * multiplier) / multiplier;\n}\n\n//#endregion\n//#region ../../library/src/components/utils/paddingFromProps.ts\n/**\n* @internal\n*/\nfunction hasPaddingPerSide(props) {\n\tconst { paddingPerSide, paddingTop, paddingBottom, paddingLeft, paddingRight } = props;\n\treturn paddingPerSide !== false && (paddingTop !== void 0 || paddingBottom !== void 0 || paddingLeft !== void 0 || paddingRight !== void 0);\n}\n/**\n* @internal\n*/\nfunction paddingFromProps(props) {\n\tconst { padding = 0, paddingTop, paddingBottom, paddingLeft, paddingRight } = props;\n\tif (hasPaddingPerSide(props)) return {\n\t\ttop: paddingTop !== void 0 ? paddingTop : padding,\n\t\tbottom: paddingBottom !== void 0 ? paddingBottom : padding,\n\t\tleft: paddingLeft !== void 0 ? paddingLeft : padding,\n\t\tright: paddingRight !== void 0 ? paddingRight : padding\n\t};\n\treturn {\n\t\ttop: padding,\n\t\tbottom: padding,\n\t\tleft: padding,\n\t\tright: padding\n\t};\n}\n/**\n* @internal\n*/\nfunction makePaddingString({ top, left, bottom, right }) {\n\tif (top === right && right === bottom && bottom === left) return `${top}px`;\n\treturn `${top}px ${right}px ${bottom}px ${left}px`;\n}\n/**\n* Accepts a string (like \"5px 10px 15px 20px\" or \"5px 0 5px\" or \"none\" or similar). Returns parsed\n* top, right, bottom, left values. Intended as a (slightly more flexible) reverse of `makePaddingString`.\n* @internal\n*/\nfunction parsePaddingString(padding) {\n\tif (padding === \"none\") return null;\n\tconst parts = padding.trim().split(/\\s+/u).map((v) => parseNumberRounded(v));\n\tconst [part1, part2, part3, part4] = parts;\n\tswitch (parts.length) {\n\t\tcase 1:\n\t\t\tif (!isFiniteNumber(part1)) return null;\n\t\t\treturn {\n\t\t\t\ttop: part1,\n\t\t\t\tright: part1,\n\t\t\t\tbottom: part1,\n\t\t\t\tleft: part1\n\t\t\t};\n\t\tcase 2:\n\t\t\tif (!isFiniteNumber(part1) || !isFiniteNumber(part2)) return null;\n\t\t\treturn {\n\t\t\t\ttop: part1,\n\t\t\t\tright: part2,\n\t\t\t\tbottom: part1,\n\t\t\t\tleft: part2\n\t\t\t};\n\t\tcase 3:\n\t\t\tif (!isFiniteNumber(part1) || !isFiniteNumber(part2) || !isFiniteNumber(part3)) return null;\n\t\t\treturn {\n\t\t\t\ttop: part1,\n\t\t\t\tright: part2,\n\t\t\t\tbottom: part3,\n\t\t\t\tleft: part2\n\t\t\t};\n\t\tcase 4:\n\t\t\tif (!isFiniteNumber(part1) || !isFiniteNumber(part2) || !isFiniteNumber(part3) || !isFiniteNumber(part4)) return null;\n\t\t\treturn {\n\t\t\t\ttop: part1,\n\t\t\t\tright: part2,\n\t\t\t\tbottom: part3,\n\t\t\t\tleft: part4\n\t\t\t};\n\t\tdefault: return null;\n\t}\n}\n\n//#endregion\n//#region ../../library/src/components/Stack/Stack.tsx\n/**\n* @public\n* @deprecated The `Stack` component is being deprecated and will no longer be maintained in future releases. We recommend using flexbox instead for layout needs: {@link https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox}\n*/\nconst Stack = /* @__PURE__ */ (() => {\n\tconst StackInner = React.forwardRef(function StackInner(stackProps, forwardedRef) {\n\t\tconst { as = \"div\", direction = \"vertical\", distribution = \"start\", alignment = \"center\", gap = 10, wrap = false, children, style: styleProp, className, willChangeTransform, __fromCodeComponentNode, parentSize, __contentWrapperStyle, ...containerProps } = stackProps;\n\t\tconst flexDirection = toFlexDirection(direction);\n\t\tconst justifyContent = toJustifyOrAlignment(distribution);\n\t\tconst alignItems = toJustifyOrAlignment(alignment);\n\t\tconst padding = hasPaddingPerSide(containerProps) || containerProps.padding ? makePaddingString(paddingFromProps(containerProps)) : void 0;\n\t\tconst stackPaddingStyle = padding === void 0 ? {} : { padding };\n\t\tconst { width: _width, height: _height, minWidth: _minWidth, maxWidth: _maxWidth, minHeight: _minHeight, maxHeight: _maxHeight, ...contentWrapperStyle } = __contentWrapperStyle ?? {};\n\t\tconst style = {\n\t\t\t...styleProp,\n\t\t\tdisplay: \"flex\",\n\t\t\tflexDirection,\n\t\t\tflexWrap: wrap ? \"wrap\" : \"nowrap\",\n\t\t\tjustifyContent,\n\t\t\talignItems,\n\t\t\talignContent: alignItems,\n\t\t\t...stackPaddingStyle,\n\t\t\t...contentWrapperStyle\n\t\t};\n\t\tLayer.applyWillChange({ willChangeTransform }, style, true);\n\t\tif (__fromCodeComponentNode && !constraintsEnabled(unwrapFrameProps(containerProps))) {\n\t\t\tcontainerProps.width = \"100%\";\n\t\t\tcontainerProps.height = \"100%\";\n\t\t\tcontainerProps._constraints = { enabled: true };\n\t\t}\n\t\tconst layoutId = useLayoutId(stackProps);\n\t\tconst { children: _children, props } = processOverrideForwarding(containerProps, children);\n\t\tconst widthType = containerProps.widthType ?? (containerProps.width === \"auto\" ? 2 : 0);\n\t\tconst heightType = containerProps.heightType ?? (containerProps.height === \"auto\" ? 2 : 0);\n\t\tconst fractionChildren = handleFraction(_children, direction, widthType, heightType);\n\t\tconst content = useProvideParentSize(fractionChildren, parentSize ?? 1);\n\t\tconst attributes = { \"data-framer-component-type\": \"Stack\" };\n\t\tconst fromCanvasComponent = containerProps.__fromCanvasComponent;\n\t\tif (fromCanvasComponent) attributes[\"data-framer-generated\"] = true;\n\t\tif (isGapEnabled(gap, justifyContent, wrap)) {\n\t\t\tconst gapSupportedInMainAxis = isGapSupportedInMainAxis(justifyContent);\n\t\t\tif (gapSupportedInMainAxis || direction !== \"horizontal\") style.columnGap = `${gap}px`;\n\t\t\tif (gapSupportedInMainAxis || direction !== \"vertical\") style.rowGap = `${gap}px`;\n\t\t}\n\t\tif (style.width === void 0 && widthType === 2) style.width = \"min-content\";\n\t\tif (style.height === void 0 && heightType === 2) style.height = \"min-content\";\n\t\treturn /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\t\tas,\n\t\t\tbackground: fromCanvasComponent ? void 0 : \"none\",\n\t\t\t...props,\n\t\t\tlayoutId,\n\t\t\tref: forwardedRef,\n\t\t\t...attributes,\n\t\t\tstyle,\n\t\t\tclassName,\n\t\t\tlayoutScroll: true,\n\t\t\tchildren: content\n\t\t});\n\t});\n\tStackInner.defaultProps = { distribution: \"start\" };\n\tStackInner.displayName = \"Stack\";\n\taddPropertyControls(StackInner, {\n\t\tdirection: {\n\t\t\ttype: \"segmentedenum\",\n\t\t\toptions: [\"horizontal\", \"vertical\"],\n\t\t\ttitle: \"Direction\",\n\t\t\tdefaultValue: \"vertical\"\n\t\t},\n\t\tdistribution: {\n\t\t\ttype: \"enum\",\n\t\t\toptions: [\n\t\t\t\t\"start\",\n\t\t\t\t\"center\",\n\t\t\t\t\"end\",\n\t\t\t\t\"space-between\",\n\t\t\t\t\"space-around\",\n\t\t\t\t\"space-evenly\"\n\t\t\t],\n\t\t\toptionTitles: [\n\t\t\t\t\"Start\",\n\t\t\t\t\"Center\",\n\t\t\t\t\"End\",\n\t\t\t\t\"Space Between\",\n\t\t\t\t\"Space Around\",\n\t\t\t\t\"Space Evenly\"\n\t\t\t],\n\t\t\ttitle: \"Distribute\",\n\t\t\tdefaultValue: \"space-around\"\n\t\t},\n\t\talignment: {\n\t\t\ttype: \"segmentedenum\",\n\t\t\toptions: [\n\t\t\t\t\"start\",\n\t\t\t\t\"center\",\n\t\t\t\t\"end\"\n\t\t\t],\n\t\t\ttitle: \"Align\",\n\t\t\tdefaultValue: \"center\"\n\t\t},\n\t\tgap: {\n\t\t\ttype: \"number\",\n\t\t\tmin: 0,\n\t\t\ttitle: \"Gap\",\n\t\t\thidden: (props) => {\n\t\t\t\treturn props.distribution !== void 0 && [\n\t\t\t\t\t\"space-between\",\n\t\t\t\t\t\"space-around\",\n\t\t\t\t\t\"space-evenly\"\n\t\t\t\t].includes(props.distribution);\n\t\t\t},\n\t\t\tdefaultValue: 10\n\t\t},\n\t\tpadding: {\n\t\t\ttype: \"fusednumber\",\n\t\t\ttoggleKey: \"paddingPerSide\",\n\t\t\ttoggleTitles: [\"Padding\", \"Padding per side\"],\n\t\t\tvalueKeys: [\n\t\t\t\t\"paddingTop\",\n\t\t\t\t\"paddingRight\",\n\t\t\t\t\"paddingBottom\",\n\t\t\t\t\"paddingLeft\"\n\t\t\t],\n\t\t\tvalueLabels: [\n\t\t\t\t\"t\",\n\t\t\t\t\"r\",\n\t\t\t\t\"b\",\n\t\t\t\t\"l\"\n\t\t\t],\n\t\t\tmin: 0,\n\t\t\ttitle: \"Padding\",\n\t\t\tdefaultValue: 0\n\t\t}\n\t});\n\treturn StackInner;\n})();\n/**\n* @internal\n*/\nfunction isFractionDimension(dimension) {\n\treturn typeof dimension === \"string\" && dimension.endsWith(\"fr\");\n}\n/**\n* @internal\n*/\nfunction fraction(dimension) {\n\tconst value = parseFloat(dimension);\n\treturn isFiniteNumber(value) ? value : 0;\n}\nfunction handleFraction(children, direction, widthType, heightType) {\n\treturn React.Children.map(children, (child) => {\n\t\tif (!isReactChild(child) || !isReactElement(child)) return;\n\t\tconst isVertical = direction === \"vertical\";\n\t\tconst style = {};\n\t\tlet hasFraction = false;\n\t\tconst { style: propsStyle, size } = child.props;\n\t\tlet { width, height } = child.props;\n\t\tif (size !== void 0) {\n\t\t\tif (width === void 0) width = size;\n\t\t\tif (height === void 0) height = size;\n\t\t}\n\t\tlet newWidth = width;\n\t\tlet newHeight = height;\n\t\tif (isFractionDimension(width)) {\n\t\t\thasFraction = true;\n\t\t\thasFraction = true;\n\t\t\tif (isVertical) {\n\t\t\t\tif (widthType === 2) {\n\t\t\t\t\tstyle.alignSelf = \"stretch\";\n\t\t\t\t\tnewWidth = \"auto\";\n\t\t\t\t} else newWidth = `${fraction(width) * 100}%`;\n\t\t\t} else {\n\t\t\t\tnewWidth = 1;\n\t\t\t\tstyle.flexGrow = fraction(width);\n\t\t\t\tstyle.flexBasis = 0;\n\t\t\t}\n\t\t\tstyle.width = newWidth;\n\t\t}\n\t\tif (isFractionDimension(height)) {\n\t\t\thasFraction = true;\n\t\t\tif (isVertical) {\n\t\t\t\tnewHeight = 1;\n\t\t\t\tstyle.flexGrow = fraction(height);\n\t\t\t\tstyle.flexBasis = 0;\n\t\t\t} else if (heightType === 2) {\n\t\t\t\tstyle.alignSelf = \"stretch\";\n\t\t\t\tnewHeight = \"auto\";\n\t\t\t} else newHeight = `${fraction(height) * 100}%`;\n\t\t\tstyle.height = newHeight;\n\t\t}\n\t\tif (!hasFraction) return child;\n\t\tconst nextStyle = {\n\t\t\t...propsStyle,\n\t\t\t...style\n\t\t};\n\t\treturn React.cloneElement(child, {\n\t\t\twidth: newWidth,\n\t\t\theight: newHeight,\n\t\t\tstyle: nextStyle\n\t\t});\n\t});\n}\nfunction isGapSupportedInMainAxis(justifyContent) {\n\tif (!justifyContent) return false;\n\treturn ![\n\t\t\"space-between\",\n\t\t\"space-around\",\n\t\t\"space-evenly\",\n\t\t\"stretch\"\n\t].includes(justifyContent);\n}\n/**\n* @internal\n*/\nfunction isGapEnabled(gap, justifyContent, wrap) {\n\tif (!gap) return false;\n\tif (!wrap && !isGapSupportedInMainAxis(justifyContent)) return false;\n\treturn true;\n}\n/**\n* @internal\n*/\nfunction toFlexDirection(direction) {\n\tswitch (direction) {\n\t\tcase \"vertical\": return \"column\";\n\t\tcase \"horizontal\": return \"row\";\n\t\tdefault: return direction;\n\t}\n}\n/** @internal */\nfunction toJustifyOrAlignment(distribution) {\n\tswitch (distribution) {\n\t\tcase \"start\": return \"flex-start\";\n\t\tcase \"end\": return \"flex-end\";\n\t\tdefault: return distribution;\n\t}\n}\n\n//#endregion\n//#region ../../library/src/components/Page/PageContainer.tsx\nconst pageContentWrapperType = \"PageContentWrapper\";\nfunction PageContainer({ children, effect, dragEnabled, direction, contentHeight, contentWidth, alignment, gap, isLastPage, contentOffsetRef, constraintsRef, directionLock, onDragStart, onDrag, onDragEnd, layoutId }) {\n\tconst isHorizontalDirection = direction === \"horizontal\";\n\tconst dragAxis = isHorizontalDirection ? \"x\" : \"y\";\n\tconst hasHorizontalGap = isHorizontalDirection && !isLastPage && gap;\n\tconst hasVerticalGap = !isHorizontalDirection && !isLastPage && gap;\n\tconst hasAutoWidth = contentWidth !== \"stretch\" && isHorizontalDirection;\n\tconst hasAutoHeight = contentHeight !== \"stretch\" && !isHorizontalDirection;\n\tconst wrapperWidth = hasAutoWidth ? \"auto\" : \"100%\";\n\tconst wrapperHeight = hasAutoHeight ? \"auto\" : \"100%\";\n\tconst containerWidth = hasHorizontalGap && wrapperWidth === \"100%\" ? `calc(100% + ${gap}px)` : wrapperWidth;\n\tconst containerHeight = hasVerticalGap && wrapperHeight === \"100%\" ? `calc(100% + ${gap}px)` : wrapperHeight;\n\treturn /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\tposition: \"relative\",\n\t\t\"data-framer-component-type\": \"PageContainer\",\n\t\twidth: containerWidth,\n\t\theight: containerHeight,\n\t\tlayoutId: layoutId ? `${layoutId}-container` : void 0,\n\t\tbackgroundColor: \"transparent\",\n\t\tdrag: dragEnabled ? dragAxis : false,\n\t\tdragDirectionLock: directionLock,\n\t\t_dragX: contentOffsetRef.current.x,\n\t\t_dragY: contentOffsetRef.current.y,\n\t\tdragConstraints: constraintsRef.current,\n\t\tonDrag,\n\t\tonDragStart,\n\t\tonDragEnd,\n\t\tpreserve3d: true,\n\t\tstyle: {\n\t\t\tpointerEvents: void 0,\n\t\t\tpaddingRight: hasHorizontalGap ? gap : 0,\n\t\t\tpaddingBottom: hasVerticalGap ? gap : 0\n\t\t},\n\t\tchildren: /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\t\tposition: \"relative\",\n\t\t\t\"data-framer-component-type\": pageContentWrapperType,\n\t\t\twidth: wrapperWidth,\n\t\t\theight: wrapperHeight,\n\t\t\tpreserve3d: false,\n\t\t\tbackgroundColor: \"transparent\",\n\t\t\tstyle: {\n\t\t\t\t...effect,\n\t\t\t\tpointerEvents: void 0,\n\t\t\t\tdisplay: \"flex\",\n\t\t\t\tflexDirection: isHorizontalDirection ? \"row\" : \"column\",\n\t\t\t\talignItems: alignment && toJustifyOrAlignment(alignment)\n\t\t\t},\n\t\t\tchildren\n\t\t}, effect ? Object.keys(effect).join(\"\") : \"\")\n\t});\n}\n\n//#endregion\n//#region ../../library/src/components/Page/EmulatedPage.tsx\n/**\n* The Page component allows you to create horizontally or vertically swipeable areas. It can be\n* imported from the Framer Library and used in code components. Add children to create pages to\n* swipe between. These children will be stretched to the size of the page component by default,\n* but can also be set to auto to maintain their original size.\n*\n* @remarks\n* ```jsx\n* import React from \"react\"\n* import { Frame, Page } from \"framer\"\n* export class Page extends React.Component {\n*   render() {\n*     return (\n*       <Page>\n*         <Frame />\n*       </Page>\n*     )\n*   }\n* }\n* ```\n* @public\n* @deprecated The option to add those to \"Canvas\" pages has been removed as of May 2025, but pages using this might exist in the wild.\n*/\nconst PageInner = /* @__PURE__ */ React.forwardRef(function Page(props, forwardedRef) {\n\tconst { direction = \"horizontal\", contentWidth = \"stretch\", contentHeight = \"stretch\", alignment = \"start\", currentPage = 0, animateCurrentPageUpdate = true, gap: gapValue = 10, padding: _padding = 0, momentum = false, dragEnabled = true, defaultEffect: _defaultEffect = \"none\", background = \"transparent\", overflow = \"hidden\", __fromCodeComponentNode, effect: _effect, children, contentOffsetX, contentOffsetY, onChangePage, onScrollStart, onScroll, onDragStart, onDrag, onDragEnd, directionLock, onScrollEnd, onDirectionLock: _onDirectionLock, onUpdate: _onUpdate, wheelEnabled = false, layoutId: specificLayoutId, ...rest } = props;\n\tconst layoutId = useLayoutId(props, {\n\t\tspecificLayoutId,\n\t\tpostfix: \"page\"\n\t});\n\tconst containerProps = {\n\t\t...rest,\n\t\tbackground\n\t};\n\tconst hasMountedRef = React.useRef(false);\n\tconst hasFixedSize = RenderTarget.hasRestrictions() && props.__fromCodeComponentNode && isFiniteNumber(containerProps.width) && isFiniteNumber(containerProps.height);\n\tif (!hasFixedSize && __fromCodeComponentNode && !containerProps.__fromCanvasComponent) {\n\t\tcontainerProps.width = \"100%\";\n\t\tcontainerProps.height = \"100%\";\n\t\tcontainerProps._constraints = { enabled: true };\n\t}\n\tconst { initial, prev } = React.useRef({\n\t\tinitial: {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t},\n\t\tprev: {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t}\n\t}).current;\n\tconst isHorizontal = direction === \"horizontal\";\n\tlet gap = gapValue;\n\tif (gap < 0) {\n\t\twarnOnce$1(`The 'gap' property of Page component can not be negative, but is ${gapValue}.`);\n\t\tgap = 0;\n\t}\n\tconst pageCount = React.Children.count(children);\n\tconst maxOffsetRef = React.useRef(0);\n\tconst constraints = React.useRef({\n\t\ttop: 0,\n\t\tleft: 0,\n\t\tright: 0,\n\t\tbottom: 0\n\t});\n\tconst fallbackContainerRef = React.useRef(null);\n\tconst containerRef = forwardedRef || fallbackContainerRef;\n\tconst scrollableRef = React.useRef(null);\n\tconst pageEffectValuesRef = React.useRef([]);\n\tconst pageRectsRef = React.useRef([]);\n\tconst internalX = useMotionValue(isMotionValue(contentOffsetX) ? 0 : contentOffsetX ?? 0);\n\tconst internalY = useMotionValue(isMotionValue(contentOffsetY) ? 0 : contentOffsetY ?? 0);\n\tconst contentOffsetRef = React.useRef({\n\t\tx: isMotionValue(contentOffsetX) ? contentOffsetX : internalX,\n\t\ty: isMotionValue(contentOffsetY) ? contentOffsetY : internalY\n\t});\n\tconst currentContentPageRef = React.useRef(currentPage);\n\tconst propsBoundedCurrentPageRef = React.useRef(currentPage);\n\tconst latestPropsRef = React.useRef(props);\n\tlatestPropsRef.current = props;\n\tconst lastDirectionRef = React.useRef(props.direction);\n\tconst snapToPage = useSnapToPage(currentContentPageRef, contentOffsetRef, isHorizontal);\n\tconst [_, setForceUpdateCount] = React.useState(0);\n\tconst containerSizeRef = React.useRef({\n\t\twidth: 200,\n\t\theight: 200\n\t});\n\tif (hasFixedSize && isFiniteNumber(containerProps.width) && isFiniteNumber(containerProps.height)) {\n\t\tcontainerSizeRef.current.width = containerProps.width;\n\t\tcontainerSizeRef.current.height = containerProps.height;\n\t}\n\tconst updateOnResize = React.useCallback(() => {\n\t\tif (!hasFixedSize) startTransition(() => setForceUpdateCount((v) => v + 1));\n\t}, [hasFixedSize]);\n\tReact.useEffect(() => {\n\t\tif (RenderTarget.current() !== RenderTarget.preview) return;\n\t\tglobalThis.addEventListener(\"resize\", updateOnResize);\n\t\treturn () => {\n\t\t\tglobalThis.removeEventListener(\"resize\", updateOnResize);\n\t\t};\n\t}, [updateOnResize]);\n\tconst applyEffects = () => {\n\t\tpageEffectValuesRef.current.forEach((effectDictionary, index) => {\n\t\t\tconst values = effectValues(index, latestPropsRef, pageRectsRef, contentOffsetRef, maxOffsetRef);\n\t\t\tif (!effectDictionary || !values) return;\n\t\t\tfor (const [key, value] of Object.entries(values)) {\n\t\t\t\tconst effectValue = effectDictionary[key];\n\t\t\t\tif (isMotionValue(effectValue)) effectValue.set(value);\n\t\t\t}\n\t\t});\n\t};\n\tconst updateMaxOffsetFromPageContents = (containerSize) => {\n\t\tconst newPageContentRects = getPageContentRects(containerRef, containerSize, direction, gap);\n\t\tif (newPageContentRects) pageRectsRef.current = newPageContentRects;\n\t\tconst newMaxOffset = getMaxOffset(containerSizeRef.current, pageRectsRef.current, direction, latestPropsRef.current);\n\t\tif (newMaxOffset !== maxOffsetRef.current) {\n\t\t\tmaxOffsetRef.current = newMaxOffset;\n\t\t\tconstraints.current.top = -newMaxOffset;\n\t\t\tconstraints.current.left = -newMaxOffset;\n\t\t\t/**\n\t\t\t* @FIXME Without this forced render, if you resize Page on the\n\t\t\t* canvas when it's current page is not 0, you will see flashes of\n\t\t\t* the previous page. This happens when the MotionValue for the x or\n\t\t\t* y offset is out of sync with the size of the Page and the Page\n\t\t\t* contents, which manifests as the current page not being\n\t\t\t* transformed far enough from the start point.\n\t\t\t*\n\t\t\t* Unfortunately, it's not 100% clear why this force render is\n\t\t\t* required.\n\t\t\t*\n\t\t\t* Since the offset is a Motion Value, its updates are not tied to\n\t\t\t* React renders, so it stays up to date based on a 60fps render\n\t\t\t* cycle run by framer-motion. However, this setState is called\n\t\t\t* inside a useLayoutEffect hook. If an update is scheduled during a\n\t\t\t* useLayoutEffect hook, painting is deferred until no more updates\n\t\t\t* are scheduled. In the case of this function, the first\n\t\t\t* useLayoutEffect after a resize will trigger this React render,\n\t\t\t* painting will be deferred, and the same useLayoutEffect will run\n\t\t\t* a second time, finally calling this function a second time. On\n\t\t\t* the second invocation of this function, since we cache the\n\t\t\t* previous maxOffset to a ref, this state update will not get\n\t\t\t* called. Since no updates are scheduled in the second render,\n\t\t\t* React will finally paint the update.\n\t\t\t*\n\t\t\t* Since this bug only happens in Safari in some circumstances when\n\t\t\t* resizing on the canvas at 60fps, it's possible that there is a\n\t\t\t* case where when we do not defer painting in the first\n\t\t\t* useLayoutEffect, the React render and the MotionValue update are\n\t\t\t* not in sync, causing a brief flash.\n\t\t\t*\n\t\t\t* However, if we can figure out a way to ensure those updates\n\t\t\t* happen in sync, we should remove this React render as it is\n\t\t\t* unnecessary and will only hinder performance when used elsewhere,\n\t\t\t* such as generated components where you can resize a Page while\n\t\t\t* performing a page transition.\n\t\t\t*/\n\t\t\tif (RenderTarget.current() === RenderTarget.canvas) setForceUpdateCount((v) => v + 1);\n\t\t}\n\t};\n\tconst measureContainerSize = () => {\n\t\tconst element = containerRef.current;\n\t\tif (!element) return null;\n\t\tconst { offsetWidth, offsetHeight } = element;\n\t\tconst currentSize = containerSizeRef.current;\n\t\tif (offsetWidth !== currentSize.width || offsetHeight !== currentSize.height) {\n\t\t\tcontainerSizeRef.current = {\n\t\t\t\twidth: offsetWidth,\n\t\t\t\theight: offsetHeight\n\t\t\t};\n\t\t\treturn containerSizeRef.current;\n\t\t}\n\t\treturn null;\n\t};\n\tconst updateAndSnapToPage = (newPage, mount = false) => {\n\t\tconst newBoundedCurrentPage = getBoundedCurrentPage(newPage, pageCount);\n\t\tif (newBoundedCurrentPage !== propsBoundedCurrentPageRef.current) {\n\t\t\tpropsBoundedCurrentPageRef.current = newBoundedCurrentPage;\n\t\t\tupdateCurrentPage(newBoundedCurrentPage, currentContentPageRef, !mount ? onChangePage : void 0);\n\t\t}\n\t\tconst offset = offsetForPage(newBoundedCurrentPage, pageCount, pageRectsRef, isHorizontal, maxOffsetRef);\n\t\tconst animated = animateCurrentPageUpdate && RenderTarget.current() !== RenderTarget.canvas && !mount;\n\t\tsnapToPage(newBoundedCurrentPage, offset, { animated });\n\t};\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tif (hasMountedRef.current) return;\n\t\t/**\n\t\t* Defer the measurement of drag constraints until the next animation frame.\n\t\t* When the preview is closed and reopened, it's switched from display: none\n\t\t* to display: block. When an element is the child of display: none its measurements\n\t\t* return `0`. When this layout effect fires, the preview iframe *is* set to\n\t\t* display: block but in a twist of browser render scheduling this hasn't yet\n\t\t* affected the iframe contents. So by deferring to the following animation frame\n\t\t* we allow the iframe contents to take on dimension again.\n\t\t* Fixes: https://github.com/framer/company/issues/23200\n\t\t*/\n\t\trequestAnimationFrame(() => {\n\t\t\tcurrentContentPageRef.current = currentPage;\n\t\t\tconst contentOffset = contentOffsetRef.current;\n\t\t\tcontentOffset.x.on(\"change\", applyEffects);\n\t\t\tcontentOffset.y.on(\"change\", applyEffects);\n\t\t\tapplyEffects();\n\t\t\thasMountedRef.current = true;\n\t\t\tconst containerSize = measureContainerSize() ?? containerSizeRef.current;\n\t\t\tupdateMaxOffsetFromPageContents(containerSize);\n\t\t\tupdateAndSnapToPage(currentContentPageRef.current, true);\n\t\t});\n\t}, []);\n\tReact.useEffect(() => {\n\t\tif (currentPage !== currentContentPageRef.current) updateAndSnapToPage(currentPage);\n\t}, [currentPage]);\n\tconst handleMeasureLifecycle = () => {\n\t\tconst newContainerSize = measureContainerSize();\n\t\tupdateMaxOffsetFromPageContents(newContainerSize ?? containerSizeRef.current);\n\t\tupdateAndSnapToPage(currentContentPageRef.current);\n\t\tif (newContainerSize || direction !== lastDirectionRef.current) {\n\t\t\tif (direction === \"horizontal\") contentOffsetRef.current.y.set(0);\n\t\t\telse contentOffsetRef.current.x.set(0);\n\t\t\tlastDirectionRef.current = direction;\n\t\t}\n\t};\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tif (RenderTarget.current() !== RenderTarget.canvas) return;\n\t\thandleMeasureLifecycle();\n\t});\n\tconst onDragStartHandler = (event, info) => {\n\t\tif (onScrollStart) onScrollStart(info);\n\t\tif (onDragStart) onDragStart(event, info);\n\t\tprev.x = initial.x = info.point.x;\n\t\tprev.y = initial.y = info.point.y;\n\t};\n\tconst onDragHandler = (event, info) => {\n\t\tif (onScroll) onScroll(info);\n\t\tif (onDrag) onDrag(event, info);\n\t\tprev.x = info.point.x;\n\t\tprev.y = info.point.y;\n\t};\n\tconst onDragTransitionEnd = () => {\n\t\tif (props.onDragTransitionEnd) props.onDragTransitionEnd();\n\t\tif (onScrollEnd) {\n\t\t\tconst { x, y } = contentOffsetRef.current;\n\t\t\tconst point = {\n\t\t\t\tx: x.get(),\n\t\t\t\ty: y.get()\n\t\t\t};\n\t\t\tonScrollEnd({\n\t\t\t\tpoint,\n\t\t\t\tvelocity: {\n\t\t\t\t\tx: x.getVelocity(),\n\t\t\t\t\ty: y.getVelocity()\n\t\t\t\t},\n\t\t\t\toffset: {\n\t\t\t\t\tx: point.x - initial.x,\n\t\t\t\t\ty: point.y - initial.y\n\t\t\t\t},\n\t\t\t\tdelta: {\n\t\t\t\t\tx: point.x - prev.x,\n\t\t\t\t\ty: point.y - prev.y\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\tconst onDragEndHandler = async (event, info) => {\n\t\tconst contentOffset = isHorizontal ? contentOffsetRef.current.x : contentOffsetRef.current.y;\n\t\tcontentOffset.stop();\n\t\tconst startPosition = contentOffset.get();\n\t\tconst axis = isHorizontal ? \"x\" : \"y\";\n\t\tconst velocity = info.velocity[axis];\n\t\tlet index = nearestPageIndex(pageRectsRef.current, startPosition, startPosition, isHorizontal, momentum);\n\t\tif (velocity)\n /**\n\t\t* TODO: This is a bit hacky. We're hijacking the inertia animation for the modifyTarget functionality. Maybe this is information we can\n\t\t* pass through the `onDragEnd` event handler if `dragMomentum` is `true`.\n\t\t*/\n\t\tanimateValue({\n\t\t\ttype: \"inertia\",\n\t\t\tkeyframes: [startPosition],\n\t\t\tvelocity,\n\t\t\tmodifyTarget: (endPosition) => {\n\t\t\t\tindex = nearestPageIndex(pageRectsRef.current, startPosition, endPosition, isHorizontal, momentum);\n\t\t\t\treturn endPosition;\n\t\t\t}\n\t\t}).stop();\n\t\tupdateCurrentPage(index, currentContentPageRef, onChangePage);\n\t\tconst offset = offsetForPage(index, pageCount, pageRectsRef, isHorizontal, maxOffsetRef);\n\t\tif (onDragEnd) onDragEnd(event, info);\n\t\tconst handler = contentOffsetRef.current[axis];\n\t\thandler.set(startPosition);\n\t\tanimate$1(handler, offset, {\n\t\t\ttype: \"spring\",\n\t\t\tvelocity,\n\t\t\tstiffness: 500,\n\t\t\tdamping: 50,\n\t\t\tonComplete: onDragTransitionEnd\n\t\t});\n\t};\n\tpageEffectValuesRef.current = [];\n\tconst childComponents = React.Children.map(children, (child, index) => {\n\t\tif (!isReactChild(child) || !isReactElement(child)) return child;\n\t\tconst update = {\n\t\t\tright: void 0,\n\t\t\tbottom: void 0,\n\t\t\ttop: void 0,\n\t\t\tleft: void 0,\n\t\t\t_constraints: { enabled: false },\n\t\t\tstyle: void 0\n\t\t};\n\t\tif (containerProps.__fromCanvasComponent) {\n\t\t\tupdate.style = child.props.style ?? {};\n\t\t\tif (contentWidth === \"stretch\") update.style.width = \"100%\";\n\t\t\tif (contentHeight === \"stretch\") update.style.height = \"100%\";\n\t\t} else {\n\t\t\tif (contentWidth === \"stretch\") update.width = \"100%\";\n\t\t\tif (contentHeight === \"stretch\") update.height = \"100%\";\n\t\t}\n\t\tlet effectDictionary;\n\t\tconst values = effectValues(index, latestPropsRef, pageRectsRef, contentOffsetRef, maxOffsetRef);\n\t\tif (values) {\n\t\t\teffectDictionary = {};\n\t\t\tfor (const key in values) effectDictionary[key] = motionValue(values[key]);\n\t\t}\n\t\tpageEffectValuesRef.current.push(effectDictionary);\n\t\treturn /* @__PURE__ */ jsx(PageContainer, {\n\t\t\teffect: effectDictionary,\n\t\t\tdragEnabled,\n\t\t\tdirection,\n\t\t\tcontentHeight,\n\t\t\tcontentWidth,\n\t\t\talignment,\n\t\t\tgap,\n\t\t\tisLastPage: index === pageCount - 1,\n\t\t\tcontentOffsetRef,\n\t\t\tconstraintsRef: constraints,\n\t\t\tdirectionLock,\n\t\t\tonDragStart: onDragStartHandler,\n\t\t\tonDrag: onDragHandler,\n\t\t\tonDragEnd: onDragEndHandler,\n\t\t\tlayoutId: layoutId ? `${layoutId}-${index}` : void 0,\n\t\t\tchildren: React.cloneElement(child, update)\n\t\t}, index);\n\t});\n\tuseWheelScroll(scrollableRef, {\n\t\tenabled: wheelEnabled,\n\t\tinitial,\n\t\tprev,\n\t\tdirection,\n\t\tconstraints,\n\t\toffsetX: contentOffsetRef.current.x,\n\t\toffsetY: contentOffsetRef.current.y,\n\t\tonScrollStart,\n\t\tonScroll,\n\t\tonScrollEnd\n\t});\n\treturn /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\t\"data-framer-component-type\": \"PageWrapper\",\n\t\tpreserve3d: false,\n\t\tperspective: hasEffect(props) ? 1200 : void 0,\n\t\t...containerProps,\n\t\tstyle: {\n\t\t\tpointerEvents: void 0,\n\t\t\t...containerProps.style,\n\t\t\toverflow\n\t\t},\n\t\tlayoutId,\n\t\tref: containerRef,\n\t\tonLayoutMeasure: handleMeasureLifecycle,\n\t\tchildren: /* @__PURE__ */ jsxs(FrameWithMotion, {\n\t\t\t\"data-framer-component-type\": \"Page\",\n\t\t\tref: scrollableRef,\n\t\t\tbackground: null,\n\t\t\tx: contentOffsetRef.current.x,\n\t\t\ty: contentOffsetRef.current.y,\n\t\t\twidth: \"100%\",\n\t\t\theight: \"100%\",\n\t\t\tpreserve3d: true,\n\t\t\tlayout: true,\n\t\t\tlayoutId: layoutId !== void 0 ? layoutId + \"-page\" : void 0,\n\t\t\tstyle: {\n\t\t\t\tpadding: makePaddingString(paddingFromProps(props)),\n\t\t\t\tdisplay: \"flex\",\n\t\t\t\tflexDirection: isHorizontal ? \"row\" : \"column\",\n\t\t\t\tpointerEvents: props.style?.pointerEvents\n\t\t\t},\n\t\t\tchildren: [/* @__PURE__ */ jsx(EmptyState, {\n\t\t\t\ttitle: \"Page\",\n\t\t\t\tdescription: \"Click and drag the connector to any frame on the canvas →\",\n\t\t\t\tsize: containerSizeRef.current,\n\t\t\t\tinsideUserCodeComponent: !__fromCodeComponentNode,\n\t\t\t\tchildren\n\t\t\t}), childComponents]\n\t\t})\n\t});\n});\nconst Page$1 = /* @__PURE__ */ withLibraryCSS(PageInner);\nfunction cubeEffect(info) {\n\tconst { normalizedOffset, direction } = info;\n\tconst isHorizontal = direction === \"horizontal\";\n\treturn {\n\t\toriginX: normalizedOffset < 0 ? 1 : 0,\n\t\toriginY: normalizedOffset < 0 ? 1 : 0,\n\t\trotateY: isHorizontal ? Math.min(Math.max(-90, normalizedOffset * 90), 90) : 0,\n\t\trotateX: isHorizontal ? 0 : Math.min(Math.max(-90, normalizedOffset * -90), 90),\n\t\tbackfaceVisibility: \"hidden\",\n\t\tWebkitBackfaceVisibility: \"hidden\"\n\t};\n}\nfunction coverflowEffect(info) {\n\tconst { normalizedOffset, direction } = info;\n\tconst isHorizontal = direction === \"horizontal\";\n\treturn {\n\t\trotateY: isHorizontal ? Math.min(45, Math.max(-45, normalizedOffset * -45)) : 0,\n\t\trotateX: isHorizontal ? 0 : Math.min(45, Math.max(-45, normalizedOffset * 45)),\n\t\toriginX: isHorizontal ? normalizedOffset < 0 ? 0 : 1 : .5,\n\t\toriginY: isHorizontal ? .5 : normalizedOffset < 0 ? 0 : 1,\n\t\tx: isHorizontal ? `${normalizedOffset * -25}%` : 0,\n\t\ty: isHorizontal ? 0 : `${normalizedOffset * -25}%`,\n\t\tz: -Math.abs(normalizedOffset),\n\t\tscale: 1 - Math.abs(normalizedOffset / 10)\n\t};\n}\nfunction calcPileAxisOffset(offset, length) {\n\treturn offset * length - offset * 8;\n}\nfunction pileEffect(info) {\n\tconst { normalizedOffset, direction, size } = info;\n\tconst isHorizontal = direction === \"horizontal\";\n\tconst absoluteOffset = Math.abs(normalizedOffset);\n\treturn {\n\t\tx: normalizedOffset < 0 && isHorizontal ? calcPileAxisOffset(absoluteOffset, size.width) : 0,\n\t\ty: normalizedOffset < 0 && !isHorizontal ? calcPileAxisOffset(absoluteOffset, size.height) : 0,\n\t\tscale: normalizedOffset < 0 ? 1 - absoluteOffset / 50 : 1\n\t};\n}\nfunction wheelEffect(info) {\n\tconst { normalizedOffset, direction, size } = info;\n\tconst isHorizontal = direction === \"horizontal\";\n\tconst originZ = (isHorizontal ? size.width : size.height) * 18 / (2 * Math.PI);\n\tconst rotateX = isHorizontal ? 0 : normalizedOffset * -20;\n\tconst rotateY = isHorizontal ? normalizedOffset * 20 : 0;\n\tconst y = isHorizontal ? 0 : normalizedOffset * -size.height;\n\tconst x = isHorizontal ? normalizedOffset * -size.width : 0;\n\treturn {\n\t\topacity: 1 - Math.abs(normalizedOffset) / 4,\n\t\ttransform: `translate(${x}px, ${y}px) translateZ(-${originZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) translateZ(${originZ}px)`\n\t};\n}\nfunction getDefaultEffect(type) {\n\tswitch (type) {\n\t\tcase \"cube\": return cubeEffect;\n\t\tcase \"coverflow\": return coverflowEffect;\n\t\tcase \"pile\": return pileEffect;\n\t\tcase \"wheel\": return wheelEffect;\n\t\tdefault: return null;\n\t}\n}\nfunction nearestPageIndex(pageRects, startPosition, endPosition, isHorizontalDirection, allowSkippingPages) {\n\tconst distanceToStart = function(rect) {\n\t\tconst rectPosition = isHorizontalDirection ? rect.x : rect.y;\n\t\treturn Math.abs(rectPosition + startPosition);\n\t};\n\tconst distanceToEnd = function(rect) {\n\t\tconst rectPosition = isHorizontalDirection ? rect.x : rect.y;\n\t\treturn Math.abs(rectPosition + endPosition);\n\t};\n\tif (allowSkippingPages) {\n\t\tconst closestPages = [...pageRects].sort((a, b) => distanceToEnd(a) - distanceToEnd(b));\n\t\tif (!closestPages[0]) return -1;\n\t\treturn pageRects.indexOf(closestPages[0]);\n\t} else {\n\t\tconst closestToStart = [...pageRects].sort((a, b) => distanceToStart(a) - distanceToStart(b));\n\t\tif (closestToStart.length === 1 && closestToStart[0]) return pageRects.indexOf(closestToStart[0]);\n\t\tconst pageA = closestToStart[0];\n\t\tconst pageB = closestToStart[1];\n\t\tif (!pageA || !pageB) return -1;\n\t\tconst closestPages = [pageA, pageB].sort((a, b) => distanceToEnd(a) - distanceToEnd(b));\n\t\tif (!closestPages[0]) return -1;\n\t\treturn pageRects.indexOf(closestPages[0]);\n\t}\n}\nfunction getPageContentRects(containerRef, containerSize, direction, gap) {\n\tconst containerElement = containerRef.current;\n\tif (!containerElement) return;\n\tconst contentWrappers = [];\n\tcontainerElement.firstChild?.childNodes.forEach((node) => {\n\t\tconst childNode = node.firstChild;\n\t\tif (!(childNode instanceof HTMLElement)) return;\n\t\tif (childNode.getAttribute(\"data-framer-component-type\") === \"PageContentWrapper\") contentWrappers.push(childNode);\n\t});\n\tconst sizes = [];\n\tcontentWrappers.forEach((contentWrapper) => {\n\t\tif (contentWrapper instanceof HTMLElement && contentWrapper.firstChild instanceof HTMLElement) {\n\t\t\tlet width = contentWrapper.firstChild.offsetWidth;\n\t\t\tlet height = contentWrapper.firstChild.offsetHeight;\n\t\t\tif (isTest()) {\n\t\t\t\twidth = 100;\n\t\t\t\theight = 100;\n\t\t\t}\n\t\t\tsizes.push({\n\t\t\t\twidth,\n\t\t\t\theight\n\t\t\t});\n\t\t} else sizes.push(null);\n\t});\n\tlet maxX = 0;\n\tlet maxY = 0;\n\tconst isHorizontal = direction === \"horizontal\";\n\treturn sizes.map((queriedSize) => {\n\t\tconst size = queriedSize || containerSize;\n\t\tconst x = maxX;\n\t\tconst y = maxY;\n\t\tif (isHorizontal) maxX += size.width + gap;\n\t\telse maxY += size.height + gap;\n\t\treturn {\n\t\t\t...size,\n\t\t\tx,\n\t\t\ty\n\t\t};\n\t});\n}\nfunction getMaxOffset(containerSize, pageContentRects, direction, paddingProps) {\n\tconst lastPageRect = pageContentRects[pageContentRects.length - 1];\n\tif (!lastPageRect) return 0;\n\tconst paddingSides = paddingFromProps(paddingProps);\n\tconst isHorizontal = direction === \"horizontal\";\n\tconst paddingStart = isHorizontal ? paddingSides.left : paddingSides.top;\n\tconst paddingEnd = isHorizontal ? paddingSides.right : paddingSides.bottom;\n\tconst pageWidth = isHorizontal ? lastPageRect.width : lastPageRect.height;\n\tconst freeSpace = (isHorizontal ? containerSize.width : containerSize.height) - paddingStart - paddingEnd - pageWidth;\n\tconst target = isHorizontal ? lastPageRect.x : lastPageRect.y;\n\tif (freeSpace <= 0) return Math.max(target, 0);\n\treturn Math.max(target - freeSpace, 0);\n}\nfunction offsetForPage(index, pageCount, pageRectsRef, isHorizontal, maxOffsetRef) {\n\tconst pageIndex = Math.max(0, Math.min(pageCount - 1, index));\n\tconst currentPageRect = pageRectsRef.current[pageIndex];\n\tif (!currentPageRect) return 0;\n\tif (isHorizontal) return -Math.min(currentPageRect.x, maxOffsetRef.current);\n\telse return -Math.min(currentPageRect.y, maxOffsetRef.current);\n}\nfunction useSnapToPage(currentContentPageRef, contentOffsetRef, isHorizontal) {\n\treturn (pageIndex, offset, options) => {\n\t\tcurrentContentPageRef.current = pageIndex;\n\t\tconst contentOffset = isHorizontal ? contentOffsetRef.current.x : contentOffsetRef.current.y;\n\t\tif (!options || !options.animated) {\n\t\t\tcontentOffset.set(offset);\n\t\t\treturn;\n\t\t}\n\t\tconst axis = isHorizontal ? \"x\" : \"y\";\n\t\tconst value = contentOffsetRef.current[axis];\n\t\tvalue.set(contentOffset.get());\n\t\tanimate$1(value, offset, {\n\t\t\ttype: \"spring\",\n\t\t\tvelocity: contentOffset.getVelocity(),\n\t\t\tstiffness: 500,\n\t\t\tdamping: 50\n\t\t});\n\t};\n}\nfunction getBoundedCurrentPage(pageIndex, pageCount) {\n\treturn pageIndex >= 0 ? Math.min(pageIndex, pageCount - 1) : (pageIndex % pageCount + pageCount) % pageCount;\n}\nfunction effectValues(index, latestPropsRef, pageRectsRef, contentOffsetRef, maxOffsetRef) {\n\tconst { direction: latestDirection = \"horizontal\", defaultEffect: latestDefaultEffect, effect: latestEffect, gap: latestGap = 10 } = latestPropsRef.current;\n\tconst latestIsHorizontal = latestDirection === \"horizontal\";\n\tconst pageRect = pageRectsRef.current[index] || {\n\t\tx: latestIsHorizontal ? index * 200 + latestGap : 0,\n\t\ty: latestIsHorizontal ? 0 : index * 200 + latestGap,\n\t\twidth: 200,\n\t\theight: 200\n\t};\n\tconst effectFunction = latestEffect || getDefaultEffect(latestDefaultEffect);\n\tif (!effectFunction) return null;\n\tlet offset;\n\tlet normalizedOffset;\n\tconst contentOffset = contentOffsetRef.current;\n\tconst maxScrollOffset = maxOffsetRef.current;\n\tif (latestIsHorizontal) {\n\t\toffset = Math.min(pageRect.x, maxScrollOffset) + (contentOffset ? contentOffset.x.get() : 0);\n\t\tnormalizedOffset = offset / (pageRect.width + latestGap);\n\t} else {\n\t\toffset = Math.min(pageRect.y, maxScrollOffset) + (contentOffset ? contentOffset.y.get() : 0);\n\t\tnormalizedOffset = offset / (pageRect.height + latestGap);\n\t}\n\tconst size = {\n\t\twidth: pageRect.width,\n\t\theight: pageRect.height\n\t};\n\treturn effectFunction({\n\t\toffset,\n\t\tnormalizedOffset,\n\t\tsize,\n\t\tindex,\n\t\tdirection: latestDirection,\n\t\tgap: latestGap,\n\t\tpageCount: pageRectsRef.current.length\n\t});\n}\nfunction hasEffect(props) {\n\treturn !!props.effect || !!getDefaultEffect(props.defaultEffect);\n}\nfunction updateCurrentPage(newPageIndex, currentContentPageRef, onChangePage) {\n\tif (currentContentPageRef.current === newPageIndex) return;\n\tif (onChangePage) onChangePage(newPageIndex, currentContentPageRef.current);\n\tcurrentContentPageRef.current = newPageIndex;\n}\n\n//#endregion\n//#region ../../library/src/components/Page/Page.tsx\n/**\n* @deprecated Creating new Page components in Framer is no longer supported as of July 2025.\n* Existing Page components will continue to work, but please use alternative solutions for new\n* projects.\n*/\nconst Page = /* @__PURE__ */ (() => {\n\tconst ContentDimension = {\n\t\tAuto: \"auto\",\n\t\tStretch: \"stretch\"\n\t};\n\tconst pageContentDimensionOptions = [ContentDimension.Auto, ContentDimension.Stretch];\n\tconst pageContentDimensionTitles = /* @__PURE__ */ pageContentDimensionOptions.map((option) => {\n\t\tswitch (option) {\n\t\t\tcase ContentDimension.Auto: return \"Auto\";\n\t\t\tcase ContentDimension.Stretch: return \"Stretch\";\n\t\t}\n\t});\n\tconst pageEffectOptions = [\n\t\t\"none\",\n\t\t\"cube\",\n\t\t\"coverflow\",\n\t\t\"wheel\",\n\t\t\"pile\"\n\t];\n\tconst pageEffectTitles = /* @__PURE__ */ pageEffectOptions.map((option) => {\n\t\tswitch (option) {\n\t\t\tcase \"none\": return \"None\";\n\t\t\tcase \"cube\": return \"Cube\";\n\t\t\tcase \"coverflow\": return \"Cover Flow\";\n\t\t\tcase \"wheel\": return \"Wheel\";\n\t\t\tcase \"pile\": return \"Pile\";\n\t\t}\n\t});\n\tconst pageAlignmentOptions = [\n\t\t\"start\",\n\t\t\"center\",\n\t\t\"end\"\n\t];\n\tconst genericAlignmentTitles = /* @__PURE__ */ pageAlignmentOptions.map((option) => {\n\t\tswitch (option) {\n\t\t\tcase \"start\": return \"Start\";\n\t\t\tcase \"center\": return \"Center\";\n\t\t\tcase \"end\": return \"End\";\n\t\t}\n\t});\n\tPage$1.defaultProps = {\n\t\tgap: 10,\n\t\tdirectionLock: false\n\t};\n\taddPropertyControls(Page$1, {\n\t\tdirection: {\n\t\t\ttype: \"enum\",\n\t\t\toptions: [\"horizontal\", \"vertical\"],\n\t\t\ttitle: \"Direction\",\n\t\t\tdefaultValue: \"horizontal\",\n\t\t\tdisplaySegmentedControl: true,\n\t\t\toptionIcons: [\"direction-horizontal\", \"direction-vertical\"]\n\t\t},\n\t\tdirectionLock: {\n\t\t\ttype: \"boolean\",\n\t\t\ttitle: \"Lock\",\n\t\t\tenabledTitle: \"1 Axis\",\n\t\t\tdisabledTitle: \"Off\",\n\t\t\tdefaultValue: true\n\t\t},\n\t\tcontentWidth: {\n\t\t\ttype: \"enum\",\n\t\t\toptions: pageContentDimensionOptions,\n\t\t\toptionTitles: pageContentDimensionTitles,\n\t\t\ttitle: \"Width\",\n\t\t\tdefaultValue: ContentDimension.Stretch,\n\t\t\tdisplaySegmentedControl: true\n\t\t},\n\t\tcontentHeight: {\n\t\t\ttype: \"enum\",\n\t\t\toptions: pageContentDimensionOptions,\n\t\t\toptionTitles: pageContentDimensionTitles,\n\t\t\ttitle: \"Height\",\n\t\t\tdefaultValue: ContentDimension.Stretch,\n\t\t\tdisplaySegmentedControl: true\n\t\t},\n\t\talignment: {\n\t\t\ttype: \"enum\",\n\t\t\toptions: pageAlignmentOptions,\n\t\t\toptionTitles: genericAlignmentTitles,\n\t\t\ttitle: \"Align\",\n\t\t\thidden(props) {\n\t\t\t\tconst { direction, contentWidth, contentHeight } = props;\n\t\t\t\treturn (direction === \"horizontal\" ? contentHeight : contentWidth) === ContentDimension.Stretch;\n\t\t\t},\n\t\t\tdefaultValue: \"start\",\n\t\t\tdisplaySegmentedControl: true,\n\t\t\toptionIcons: { direction: {\n\t\t\t\thorizontal: [\n\t\t\t\t\t\"align-top\",\n\t\t\t\t\t\"align-middle\",\n\t\t\t\t\t\"align-bottom\"\n\t\t\t\t],\n\t\t\t\tvertical: [\n\t\t\t\t\t\"align-left\",\n\t\t\t\t\t\"align-center\",\n\t\t\t\t\t\"align-right\"\n\t\t\t\t]\n\t\t\t} }\n\t\t},\n\t\tgap: {\n\t\t\ttype: \"number\",\n\t\t\tmin: 0,\n\t\t\ttitle: \"Gap\",\n\t\t\tdefaultValue: 0\n\t\t},\n\t\tpadding: {\n\t\t\ttype: \"fusednumber\",\n\t\t\ttoggleKey: \"paddingPerSide\",\n\t\t\ttoggleTitles: [\"Padding\", \"Padding per side\"],\n\t\t\tvalueKeys: [\n\t\t\t\t\"paddingTop\",\n\t\t\t\t\"paddingRight\",\n\t\t\t\t\"paddingBottom\",\n\t\t\t\t\"paddingLeft\"\n\t\t\t],\n\t\t\tvalueLabels: [\n\t\t\t\t\"T\",\n\t\t\t\t\"R\",\n\t\t\t\t\"B\",\n\t\t\t\t\"L\"\n\t\t\t],\n\t\t\tmin: 0,\n\t\t\ttitle: \"Padding\",\n\t\t\tdefaultValue: 0\n\t\t},\n\t\toverflow: {\n\t\t\ttype: \"enum\",\n\t\t\ttitle: \"Overflow\",\n\t\t\tdefaultValue: \"hidden\",\n\t\t\toptions: [\"visible\", \"hidden\"],\n\t\t\toptionTitles: [\"Visible\", \"Hidden\"],\n\t\t\tdisplaySegmentedControl: true\n\t\t},\n\t\tcurrentPage: {\n\t\t\ttype: \"number\",\n\t\t\tmin: 0,\n\t\t\ttitle: \"Current\",\n\t\t\tdisplayStepper: true,\n\t\t\tdefaultValue: 0\n\t\t},\n\t\tmomentum: {\n\t\t\ttype: \"boolean\",\n\t\t\tenabledTitle: \"On\",\n\t\t\tdisabledTitle: \"Off\",\n\t\t\ttitle: \"Momentum\",\n\t\t\tdefaultValue: false\n\t\t},\n\t\tdragEnabled: {\n\t\t\ttype: \"boolean\",\n\t\t\ttitle: \"Drag\",\n\t\t\tenabledTitle: \"On\",\n\t\t\tdisabledTitle: \"Off\",\n\t\t\tdefaultValue: true\n\t\t},\n\t\twheelEnabled: {\n\t\t\ttype: \"boolean\",\n\t\t\ttitle: \"Wheel\",\n\t\t\tenabledTitle: \"On\",\n\t\t\tdisabledTitle: \"Off\",\n\t\t\tdefaultValue: false\n\t\t},\n\t\tdefaultEffect: {\n\t\t\ttype: \"enum\",\n\t\t\toptions: pageEffectOptions,\n\t\t\toptionTitles: pageEffectTitles,\n\t\t\ttitle: \"Effect\",\n\t\t\tdefaultValue: \"none\"\n\t\t},\n\t\tchildren: {\n\t\t\ttype: \"array\",\n\t\t\ttitle: \"Content\",\n\t\t\tcontrol: {\n\t\t\t\ttype: \"componentinstance\",\n\t\t\t\ttitle: \"Page\"\n\t\t\t}\n\t\t}\n\t});\n\tPage$1.supportsConstraints = true;\n\treturn Page$1;\n})();\n\n//#endregion\n//#region ../../library/src/components/Pagination/InfiniteScroll.tsx\nfunction useInfiniteScroll({ ref: observerRef, loadMore, rootMargin = \"0px\", paginationInfo }) {\n\tconst isVisibleRef = useRef(false);\n\tconst callback = React.useCallback((entry) => {\n\t\tif (!entry.isIntersecting) {\n\t\t\tisVisibleRef.current = false;\n\t\t\treturn;\n\t\t}\n\t\tisVisibleRef.current = true;\n\t\tloadMore();\n\t}, [loadMore]);\n\tuseEffect(() => {\n\t\tframe.postRender(() => {\n\t\t\tframe.render(() => {\n\t\t\t\tif (isVisibleRef.current) loadMore();\n\t\t\t});\n\t\t});\n\t\tpaginationInfo.currentPage;\n\t}, [paginationInfo.currentPage, loadMore]);\n\tuseSharedIntersectionObserver(observerRef, callback, {\n\t\trootMargin,\n\t\tenabled: paginationInfo.currentPage < paginationInfo.totalPages\n\t});\n}\n/** @public */\nfunction withInfiniteScroll(Component) {\n\treturn React.forwardRef(({ __paginationInfo, __loadMore, ...props }, ref) => {\n\t\tconst infiniteScrollRef = useObserverRef(ref);\n\t\tuseInfiniteScroll({\n\t\t\trootMargin: \"500px\",\n\t\t\tloadMore: __loadMore,\n\t\t\tref: infiniteScrollRef,\n\t\t\tpaginationInfo: __paginationInfo\n\t\t});\n\t\treturn /* @__PURE__ */ jsx(Component, {\n\t\t\t...props,\n\t\t\tref: infiniteScrollRef\n\t\t});\n\t});\n}\n\n//#endregion\n//#region ../../library/src/components/Scroll/EmulatedScroll.tsx\nconst directionMap = {\n\thorizontal: \"x\",\n\tvertical: \"y\",\n\tboth: true\n};\nfunction convertScrollDirectionToDrag(scrollDirection) {\n\treturn scrollDirection ? directionMap[scrollDirection] : scrollDirection;\n}\nconst useUpdateChildSize = ({ dragDirection, children, fromCanvasComponent }) => {\n\treturn useMemo(() => {\n\t\treturn React.Children.map(children, (child) => {\n\t\t\tif (child === null || typeof child !== \"object\" || typeof child.type === \"string\") return child;\n\t\t\tconst updatedSize = {};\n\t\t\tswitch (dragDirection) {\n\t\t\t\tcase \"vertical\":\n\t\t\t\t\tupdatedSize.width = \"100%\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"horizontal\":\n\t\t\t\t\tupdatedSize.height = \"100%\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: return child;\n\t\t\t}\n\t\t\tconst update = fromCanvasComponent ? { style: Object.assign({}, child.props.style, updatedSize) } : updatedSize;\n\t\t\treturn React.cloneElement(child, update);\n\t\t});\n\t}, [\n\t\tdragDirection,\n\t\tchildren,\n\t\tfromCanvasComponent\n\t]);\n};\nconst numberFromOptionalMotionValue = (value) => {\n\treturn typeof value === \"number\" ? value : value.get();\n};\n/**\n* @private\n* @deprecated Part of canvas page components.\n*/\nconst EmulatedScrollInner = /* @__PURE__ */ React.forwardRef(function EmulatedScroll(props, forwardedRef) {\n\tconst { direction = \"vertical\", directionLock = false, dragEnabled = true, dragElastic, dragMomentum, dragTransition, wheelEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth, contentHeight, onScrollStart, onScroll, onScrollEnd, onDragStart, onDrag, onDragEnd, onUpdate, onDirectionLock, style, children, scrollAnimate, resetOffset, overdragEnabled = true, layoutId: specificLayoutId, native: _native, ...containerProps } = props;\n\tconst layoutId = useLayoutId(props, {\n\t\tspecificLayoutId,\n\t\tpostfix: \"scroll\"\n\t});\n\tconst defaultX = useMotionValue(typeof contentOffsetX === \"number\" ? contentOffsetX : 0);\n\tconst defaultY = useMotionValue(typeof contentOffsetY === \"number\" ? contentOffsetY : 0);\n\tconst x = isMotionValue(contentOffsetX) ? contentOffsetX : defaultX;\n\tconst y = isMotionValue(contentOffsetY) ? contentOffsetY : defaultY;\n\tconst measuredConstraints = useRef(null);\n\tconst dragControls = useDragControls();\n\tconst isInTarget = useIsInCurrentNavigationTarget();\n\tconst wasInTargetRef = useRef(true);\n\tfunction setMeasureDragConstraints(constraints) {\n\t\tconstraints = offsetToZero(constraints);\n\t\tif (contentWidth !== void 0) constraints.left = -contentWidth;\n\t\tif (contentHeight !== void 0) constraints.top = -contentHeight;\n\t\treturn measuredConstraints.current = constraints;\n\t}\n\tconst { initial, prev } = useRef({\n\t\tinitial: {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t},\n\t\tprev: {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t}\n\t}).current;\n\tconst isPreview = RenderTarget.current() === RenderTarget.preview;\n\tconst containerFallbackRef = useRef(null);\n\tconst containerRef = forwardedRef || containerFallbackRef;\n\tconst contentRef = useRef(null);\n\tconst lastOffsetRef = useRef(null);\n\tfunction shouldResetScroll(inTarget) {\n\t\tconst hasEnteredTarget = inTarget && wasInTargetRef.current === false;\n\t\treturn resetOffset && hasEnteredTarget;\n\t}\n\tfunction measureAndUpdateScrollOffset() {\n\t\tif (!contentRef.current || !containerRef.current) return;\n\t\tconst mustReset = shouldResetScroll(isInTarget);\n\t\twasInTargetRef.current = isInTarget;\n\t\tconst previous = lastOffsetRef.current;\n\t\tif (previous === null && contentOffsetX === void 0 && contentOffsetY === void 0) return;\n\t\tconst shouldUpdateOffset = previous === null || !isMotionValue(contentOffsetX) && contentOffsetX !== previous.offsetX || !isMotionValue(contentOffsetY) && contentOffsetY !== previous.offsetY;\n\t\tconst currentMaxXOffset = contentRef.current.offsetWidth - containerRef.current.offsetWidth;\n\t\tconst currentMaxYOffset = contentRef.current.offsetHeight - containerRef.current.offsetHeight;\n\t\tconst hasSizeChanged = currentMaxXOffset !== previous?.maxXOffset || currentMaxYOffset !== previous?.maxYOffset;\n\t\tconst hasScrollOffsetChanged = previous?.x !== x.get() || previous?.y !== y.get();\n\t\tif (mustReset || shouldUpdateOffset || hasSizeChanged && !hasScrollOffsetChanged) {\n\t\t\tconst currentOffsetX = direction !== \"vertical\" ? numberFromOptionalMotionValue(contentOffsetX) : 0;\n\t\t\tconst currentOffsetY = direction !== \"horizontal\" ? numberFromOptionalMotionValue(contentOffsetY) : 0;\n\t\t\tconst nextXOffset = -Math.min(currentOffsetX, currentMaxXOffset);\n\t\t\tconst nextYOffset = -Math.min(currentOffsetY, currentMaxYOffset);\n\t\t\tx.set(nextXOffset);\n\t\t\ty.set(nextYOffset);\n\t\t\tlastOffsetRef.current = {\n\t\t\t\tmaxXOffset: currentMaxXOffset,\n\t\t\t\tmaxYOffset: currentMaxYOffset,\n\t\t\t\toffsetX: currentOffsetX,\n\t\t\t\toffsetY: currentOffsetY,\n\t\t\t\tx: nextXOffset,\n\t\t\t\ty: nextYOffset\n\t\t\t};\n\t\t}\n\t}\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tif (RenderTarget.current() !== RenderTarget.canvas) return;\n\t\tmeasureAndUpdateScrollOffset();\n\t});\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tif (RenderTarget.current() === RenderTarget.canvas) return;\n\t\tmeasureAndUpdateScrollOffset();\n\t}, []);\n\tReact.useEffect(() => {\n\t\tif (shouldResetScroll(isInTarget)) measureAndUpdateScrollOffset();\n\t\tif (isInTarget === false) wasInTargetRef.current = false;\n\t}, [isInTarget]);\n\tconst getLatestPoint = () => ({\n\t\tx: x.get(),\n\t\ty: y.get()\n\t});\n\tconst resetInitialPoint = useCallback(() => {\n\t\tconst point = getLatestPoint();\n\t\tinitial.x = point.x;\n\t\tinitial.y = point.y;\n\t\tprev.x = point.x;\n\t\tprev.y = point.y;\n\t}, []);\n\tconst getPointData = useCallback(() => {\n\t\tconst point = getLatestPoint();\n\t\tconst data = {\n\t\t\tpoint,\n\t\t\tvelocity: {\n\t\t\t\tx: x.getVelocity(),\n\t\t\t\ty: y.getVelocity()\n\t\t\t},\n\t\t\toffset: {\n\t\t\t\tx: point.x - initial.x,\n\t\t\t\ty: point.y - initial.y\n\t\t\t},\n\t\t\tdelta: {\n\t\t\t\tx: point.x - prev.x,\n\t\t\t\ty: point.y - prev.y\n\t\t\t}\n\t\t};\n\t\tprev.x = point.x;\n\t\tprev.y = point.y;\n\t\treturn data;\n\t}, [x, y]);\n\tconst updateScrollListeners = useCallback(() => {\n\t\tonUpdate?.({\n\t\t\tx: x.get(),\n\t\t\ty: y.get()\n\t\t});\n\t\tonScroll?.(getPointData());\n\t}, [\n\t\tonScroll,\n\t\tonUpdate,\n\t\tgetPointData,\n\t\tx,\n\t\ty\n\t]);\n\tconst scheduleUpdateScrollListeners = useCallback(() => {\n\t\tframe.update(updateScrollListeners, false, true);\n\t}, [updateScrollListeners]);\n\tconst onMotionDragStart = (event, info) => {\n\t\tresetInitialPoint();\n\t\tonDragStart?.(event, info);\n\t\tonScrollStart?.(info);\n\t};\n\tconst onMotionDragTransitionEnd = () => onScrollEnd?.(getPointData());\n\tconst onWheelScrollStart = (info) => {\n\t\tonScrollStart?.(info);\n\t};\n\tuseWheelScroll(containerRef, {\n\t\tenabled: wheelEnabled,\n\t\tinitial,\n\t\tprev,\n\t\tdirection,\n\t\toffsetX: x,\n\t\toffsetY: y,\n\t\tonScrollStart: onWheelScrollStart,\n\t\tonScroll,\n\t\tonScrollEnd,\n\t\tconstraints: measuredConstraints\n\t});\n\tconst overdragX = useMotionValue(0);\n\tconst overdragY = useMotionValue(0);\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tconst setScrollX = (xValue) => {\n\t\t\tconst element = containerRef.current;\n\t\t\tif (!(element instanceof HTMLDivElement)) return;\n\t\t\telement.scrollLeft = -xValue;\n\t\t\tconst constraints = measuredConstraints.current;\n\t\t\tif (constraints && overdragEnabled) {\n\t\t\t\tlet overdragXValue = 0;\n\t\t\t\tif (xValue > constraints.right) overdragXValue = xValue;\n\t\t\t\tif (xValue < constraints.left) overdragXValue = xValue - constraints.left;\n\t\t\t\toverdragX.set(overdragXValue);\n\t\t\t}\n\t\t\tscheduleUpdateScrollListeners();\n\t\t};\n\t\tconst currentX = x.get();\n\t\tif (currentX !== 0) setScrollX(currentX);\n\t\treturn x.on(\"change\", setScrollX);\n\t}, [\n\t\tx,\n\t\toverdragX,\n\t\tscheduleUpdateScrollListeners,\n\t\toverdragEnabled\n\t]);\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tconst setScrollY = (yValue) => {\n\t\t\tconst element = containerRef.current;\n\t\t\tif (!(element instanceof HTMLDivElement)) return;\n\t\t\telement.scrollTop = -yValue;\n\t\t\tconst constraints = measuredConstraints.current;\n\t\t\tif (constraints && overdragEnabled) {\n\t\t\t\tlet overdragYValue = 0;\n\t\t\t\tif (yValue > constraints.bottom) overdragYValue = yValue;\n\t\t\t\tif (yValue < constraints.top) overdragYValue = yValue - constraints.top;\n\t\t\t\toverdragY.set(overdragYValue);\n\t\t\t}\n\t\t\tscheduleUpdateScrollListeners();\n\t\t};\n\t\tconst currentY = y.get();\n\t\tif (currentY !== 0) setScrollY(currentY);\n\t\treturn y.on(\"change\", setScrollY);\n\t}, [\n\t\ty,\n\t\toverdragY,\n\t\tscheduleUpdateScrollListeners,\n\t\toverdragEnabled\n\t]);\n\tconst nativeOnScroll = React.useCallback(() => {\n\t\tconst element = containerRef.current;\n\t\tif (!(element instanceof HTMLDivElement)) return;\n\t\tconst xDelta = Math.abs(x.get() + element.scrollLeft);\n\t\tconst yDelta = Math.abs(y.get() + element.scrollTop);\n\t\tif (xDelta > 1) x.set(-element.scrollLeft);\n\t\tif (yDelta > 1) y.set(-element.scrollTop);\n\t}, [x, y]);\n\tconst isEmpty = React.Children.count(children) === 0;\n\tconst width = direction !== \"vertical\" && !isEmpty ? \"auto\" : \"100%\";\n\tconst height = direction !== \"horizontal\" && !isEmpty ? \"auto\" : \"100%\";\n\tconst size = !containerProps.__fromCanvasComponent ? {\n\t\twidth: containerProps.__fromCodeComponentNode ? \"100%\" : containerProps.width,\n\t\theight: containerProps.__fromCodeComponentNode ? \"100%\" : containerProps.height\n\t} : {};\n\treturn /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\t\"data-framer-component-type\": \"Scroll\",\n\t\tbackground: \"none\",\n\t\t...containerProps,\n\t\t...size,\n\t\tstyle: {\n\t\t\t...style,\n\t\t\twillChange: isPreview ? \"transform\" : void 0,\n\t\t\toverflow: \"hidden\"\n\t\t},\n\t\tonScroll: nativeOnScroll,\n\t\tpreserve3d: containerProps.preserve3d,\n\t\tref: containerRef,\n\t\tlayoutId,\n\t\tlayoutScroll: true,\n\t\tonBeforeLayoutMeasure: measureAndUpdateScrollOffset,\n\t\tchildren: /* @__PURE__ */ jsxs(FrameWithMotion, {\n\t\t\t\"data-framer-component-type\": \"ScrollContentWrapper\",\n\t\t\tanimate: scrollAnimate,\n\t\t\tdrag: dragEnabled && convertScrollDirectionToDrag(direction),\n\t\t\tdragDirectionLock: directionLock,\n\t\t\tdragElastic,\n\t\t\tdragMomentum,\n\t\t\tdragTransition,\n\t\t\tdragConstraints: containerRef,\n\t\t\tdragControls,\n\t\t\tonDragStart: onMotionDragStart,\n\t\t\tonDrag,\n\t\t\tonDragEnd,\n\t\t\tonDragTransitionEnd: onMotionDragTransitionEnd,\n\t\t\tonDirectionLock,\n\t\t\tonMeasureDragConstraints: setMeasureDragConstraints,\n\t\t\twidth,\n\t\t\theight,\n\t\t\t_dragX: x,\n\t\t\t_dragY: y,\n\t\t\tposition: \"relative\",\n\t\t\tx: overdragEnabled ? overdragX : void 0,\n\t\t\ty: overdragEnabled ? overdragY : void 0,\n\t\t\tref: contentRef,\n\t\t\tstyle: {\n\t\t\t\tdisplay: isEmpty ? \"block\" : \"inline-block\",\n\t\t\t\twillChange: isPreview ? \"transform\" : void 0,\n\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\toverflow: \"visible\",\n\t\t\t\tminWidth: \"100%\",\n\t\t\t\tminHeight: \"100%\"\n\t\t\t},\n\t\t\tpreserve3d: containerProps.preserve3d,\n\t\t\tchildren: [/* @__PURE__ */ jsx(EmptyState, {\n\t\t\t\tsize: {\n\t\t\t\t\twidth: isFiniteNumber(containerProps.width) ? containerProps.width : \"100%\",\n\t\t\t\t\theight: isFiniteNumber(containerProps.height) ? containerProps.height : \"100%\"\n\t\t\t\t},\n\t\t\t\tinsideUserCodeComponent: !containerProps.__fromCodeComponentNode,\n\t\t\t\ttitle: \"Scroll\",\n\t\t\t\tdescription: \"Click and drag the connector to any frame on the canvas →\",\n\t\t\t\tchildren\n\t\t\t}), useUpdateChildSize({\n\t\t\t\tdragDirection: direction,\n\t\t\t\tchildren,\n\t\t\t\tfromCanvasComponent: containerProps.__fromCanvasComponent\n\t\t\t})]\n\t\t})\n\t});\n});\nconst EmulatedScroll = /* @__PURE__ */ withLibraryCSS(EmulatedScrollInner);\n/**\n* Because we're overriding the usual drag x/y with scrollTop and scrollLeft\n* our constraints calculations need rebasing to 0\n*/\nfunction offsetToZero({ top, left, right, bottom }) {\n\tconst width = right - left;\n\treturn {\n\t\ttop: -(bottom - top),\n\t\tleft: -width,\n\t\tright: 0,\n\t\tbottom: 0\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/cx.ts\n/**\n* Combine values and create a className string. Falsy values are not included.\n*\n* This helper is commonly exported by css-in-js libraries like Linaria, or\n* Emotion as cx. This is the implementation from Linaria:\n* https://github.com/callstack/linaria/blob/master/packages/core/src/cx.ts.\n*\n* We need it here so we can use it in es-modules.\n*\n* @public\n*/\nfunction cx(...classNames) {\n\treturn classNames.filter(Boolean).join(\" \");\n}\n\n//#endregion\n//#region ../../library/src/components/utils/animatePointWithInertia.ts\nfunction isRunningAnimation(...phases) {\n\tlet runningAny = false;\n\tlet cancelledAny = false;\n\tphases.forEach((phase) => {\n\t\trunningAny = runningAny || phase === 1;\n\t\tcancelledAny = cancelledAny || phase === 3;\n\t});\n\treturn runningAny && !cancelledAny;\n}\nfunction didFinishAnimations(...phases) {\n\treturn phases.every((phase) => phase === 0 || phase === 2);\n}\nconst timeConstant = 400;\nfunction animatePointWithInertia({ from, velocity, onUpdate, onComplete, onStop }) {\n\tconst latest = from;\n\tlet animationPhaseX = 0;\n\tlet animationPhaseY = 0;\n\tconst animations = [];\n\tconst updateHandler = () => {\n\t\tif (isRunningAnimation(animationPhaseX, animationPhaseY)) onUpdate(latest);\n\t};\n\tconst completionHandler = () => {\n\t\tif (didFinishAnimations(animationPhaseX, animationPhaseY)) onComplete();\n\t};\n\tif (velocity.x) {\n\t\tanimationPhaseX = 1;\n\t\tanimations.push(animateValue({\n\t\t\tkeyframes: [from.x],\n\t\t\tvelocity: -velocity.x,\n\t\t\ttimeConstant,\n\t\t\tonUpdate: (value) => {\n\t\t\t\tlatest.x = value;\n\t\t\t\tframe.update(updateHandler, false, true);\n\t\t\t},\n\t\t\tonComplete: () => {\n\t\t\t\tif (animationPhaseX !== 1) throw Error(\"animation x should be running when completing\");\n\t\t\t\tanimationPhaseX = 2;\n\t\t\t\tcompletionHandler();\n\t\t\t}\n\t\t}));\n\t}\n\tif (velocity.y) {\n\t\tanimationPhaseY = 1;\n\t\tanimations.push(animateValue({\n\t\t\tkeyframes: [from.y],\n\t\t\tvelocity: -velocity.y,\n\t\t\ttimeConstant,\n\t\t\tonUpdate: (value) => {\n\t\t\t\tlatest.y = value;\n\t\t\t\tframe.update(updateHandler, false, true);\n\t\t\t},\n\t\t\tonComplete: () => {\n\t\t\t\tif (animationPhaseY !== 1) throw Error(\"animation y should be running when completing\");\n\t\t\t\tanimationPhaseY = 2;\n\t\t\t\tcompletionHandler();\n\t\t\t}\n\t\t}));\n\t}\n\tif (!isRunningAnimation(animationPhaseX, animationPhaseY)) completionHandler();\n\treturn { stop: () => {\n\t\tif (!isRunningAnimation(animationPhaseX, animationPhaseY)) return;\n\t\tanimations.forEach((animation) => animation.stop());\n\t\tanimationPhaseX = animationPhaseX === 1 ? 3 : animationPhaseX;\n\t\tanimationPhaseY = animationPhaseY === 1 ? 3 : animationPhaseY;\n\t\tonStop();\n\t} };\n}\n\n//#endregion\n//#region ../../library/src/components/utils/useEmulatedTouchScroll.ts\nconst scrollThreshold = 3;\nconst isTouchDevice = /* @__PURE__ */ isTouch();\nconst isSafariBrowser = /* @__PURE__ */ isSafari();\nfunction getTouchAction(element) {\n\tif (!(element instanceof HTMLElement)) return null;\n\treturn element.style.touchAction;\n}\nfunction canPanInDirection(element, direction) {\n\tswitch (direction) {\n\t\tcase \"horizontal\": return getTouchAction(element) === \"pan-x\";\n\t\tcase \"vertical\": return getTouchAction(element) === \"pan-y\";\n\t\tdefault: return false;\n\t}\n}\nfunction isInteractiveElement(element) {\n\tconst tag = element.tagName.toLowerCase();\n\tif (tag === \"input\") return true;\n\tif (tag === \"text\") return true;\n\tif (tag === \"textarea\") return true;\n\treturn false;\n}\nfunction canStartScrollFromElement(element, direction) {\n\tif (!(element instanceof Element)) return false;\n\tif (isInteractiveElement(element)) return false;\n\tif (element.hasAttribute(\"draggable\")) {\n\t\tif (!canPanInDirection(element, direction)) return false;\n\t}\n\treturn true;\n}\nfunction getEventPoint(event) {\n\treturn {\n\t\tx: event.pageX,\n\t\ty: event.pageY\n\t};\n}\nfunction setPointerEvents(element, value) {\n\tif (element?.style) element.style[\"pointerEvents\"] = value;\n}\nfunction getPointerEvents(element) {\n\treturn element?.style?.pointerEvents;\n}\nconst emptyObject = /* @__PURE__ */ Object.freeze({});\nfunction useEmulateTouchScroll(ref, direction, enabled) {\n\tif (isTouchDevice) return emptyObject;\n\tif (RenderTarget.current() !== RenderTarget.preview) return emptyObject;\n\tconst scrollAnimationControlsRef = React.useRef(null);\n\tuseEffect(() => {\n\t\tif (!ref.current) return;\n\t\tconst element = ref.current;\n\t\tlet phase = 0;\n\t\tlet targets = null;\n\t\tlet downPoint = null;\n\t\tlet scrollOffsetStart = null;\n\t\tlet mouseMoveEvents = [];\n\t\tfunction onMouseMove(event) {\n\t\t\tswitch (phase) {\n\t\t\t\tcase 0:\n\t\t\t\tcase 4:\n\t\t\t\tcase 3: return;\n\t\t\t}\n\t\t\tif (isCommandKeyPressed(event)) return;\n\t\t\tconst point = getEventPoint(event);\n\t\t\tif (!downPoint) return;\n\t\t\tconst offset = Point.subtract(point, downPoint);\n\t\t\tif (phase === 1 || phase === 5) {\n\t\t\t\tconst deltaX = Math.abs(offset.x);\n\t\t\t\tconst deltaY = Math.abs(offset.y);\n\t\t\t\tif ((deltaX > scrollThreshold || deltaY > scrollThreshold) && deltaX !== deltaY) {\n\t\t\t\t\tconst scrollDirection = deltaX > deltaY ? \"horizontal\" : \"vertical\";\n\t\t\t\t\tif (direction === \"horizontal\" && scrollDirection === \"vertical\" || direction === \"vertical\" && scrollDirection === \"horizontal\") {\n\t\t\t\t\t\tphase = 3;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tphase = 2;\n\t\t\t\t\ttargets?.forEach(([target]) => setPointerEvents(target, \"none\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isSafariBrowser) event.preventDefault();\n\t\t\tif (phase !== 2) return;\n\t\t\tsafeWindow.getSelection()?.empty();\n\t\t\tmouseMoveEvents = getRecentEvents([...mouseMoveEvents, event]);\n\t\t\tif (scrollOffsetStart) {\n\t\t\t\tif (direction !== \"vertical\") element.scrollLeft = scrollOffsetStart.x - offset.x;\n\t\t\t\tif (direction !== \"horizontal\") element.scrollTop = scrollOffsetStart.y - offset.y;\n\t\t\t}\n\t\t}\n\t\tfunction onMouseUp(event) {\n\t\t\tsafeWindow.removeEventListener(\"mousemove\", onMouseMove, false);\n\t\t\tsafeWindow.removeEventListener(\"mouseup\", onMouseUp);\n\t\t\tif (phase === 2 && targets) targets.forEach(([target, originalPointerEventsValue]) => setPointerEvents(target, originalPointerEventsValue || \"auto\"));\n\t\t\ttargets = null;\n\t\t\tconst velocity = calculateVelocity({\n\t\t\t\tmouseMoveEvents,\n\t\t\t\tmouseUpEvent: event\n\t\t\t});\n\t\t\tdownPoint = null;\n\t\t\tif (phase === 2) {\n\t\t\t\tconst shouldAnimateY = direction !== \"horizontal\" && velocity.y !== 0;\n\t\t\t\tconst shouldAnimateX = direction !== \"vertical\" && velocity.x !== 0;\n\t\t\t\tif (!shouldAnimateY && !shouldAnimateX) {\n\t\t\t\t\tphase = 0;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tphase = 4;\n\t\t\t\tscrollAnimationControlsRef.current = animatePointWithInertia({\n\t\t\t\t\tfrom: {\n\t\t\t\t\t\tx: element.scrollLeft,\n\t\t\t\t\t\ty: element.scrollTop\n\t\t\t\t\t},\n\t\t\t\t\tvelocity: {\n\t\t\t\t\t\tx: shouldAnimateX ? velocity.x : 0,\n\t\t\t\t\t\ty: shouldAnimateY ? velocity.y : 0\n\t\t\t\t\t},\n\t\t\t\t\tonUpdate: (position) => {\n\t\t\t\t\t\tif (shouldAnimateX) element.scrollLeft = position.x;\n\t\t\t\t\t\tif (shouldAnimateY) element.scrollTop = position.y;\n\t\t\t\t\t},\n\t\t\t\t\tonStop: () => {\n\t\t\t\t\t\tif (phase !== 5) phase = 0;\n\t\t\t\t\t\tscrollAnimationControlsRef.current = null;\n\t\t\t\t\t},\n\t\t\t\t\tonComplete: () => {\n\t\t\t\t\t\tif (phase !== 4) throw Error(\"On animation completion we should still be in the animation phase\");\n\t\t\t\t\t\tphase = 0;\n\t\t\t\t\t\tscrollAnimationControlsRef.current = null;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else phase = 0;\n\t\t}\n\t\tfunction onMouseWheel() {\n\t\t\tscrollAnimationControlsRef.current?.stop();\n\t\t}\n\t\tfunction onMouseDown(event) {\n\t\t\tif (!enabled) return;\n\t\t\tif (isCommandKeyPressed(event)) return;\n\t\t\tif (!canStartScrollFromElement(event.target, direction)) {\n\t\t\t\tif (phase === 4) {\n\t\t\t\t\tphase = 0;\n\t\t\t\t\tscrollAnimationControlsRef.current?.stop();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst previousPhase = phase;\n\t\t\tphase = previousPhase === 4 ? 5 : 1;\n\t\t\tdownPoint = getEventPoint(event);\n\t\t\ttargets = document.elementsFromPoint(downPoint.x, downPoint.y).filter((targetEl) => targetEl instanceof HTMLElement || targetEl instanceof SVGElement).map((targetEl) => [targetEl, getPointerEvents(targetEl)]);\n\t\t\tscrollOffsetStart = {\n\t\t\t\tx: element.scrollLeft,\n\t\t\t\ty: element.scrollTop\n\t\t\t};\n\t\t\tmouseMoveEvents = [];\n\t\t\tif (scrollAnimationControlsRef.current) {\n\t\t\t\tif (previousPhase !== 4) throw Error(\"When stopping a drag animation we need to be animating\");\n\t\t\t\tscrollAnimationControlsRef.current.stop();\n\t\t\t}\n\t\t\tsafeWindow.addEventListener(\"mousemove\", onMouseMove);\n\t\t\tsafeWindow.addEventListener(\"mouseup\", onMouseUp);\n\t\t\telement.addEventListener(\"mousewheel\", onMouseWheel);\n\t\t}\n\t\telement.addEventListener(\"mousedown\", onMouseDown);\n\t\treturn () => {\n\t\t\telement.removeEventListener(\"mousedown\", onMouseDown);\n\t\t\telement.removeEventListener(\"mousewheel\", onMouseWheel);\n\t\t\tsafeWindow.removeEventListener(\"mousemove\", onMouseMove);\n\t\t\tsafeWindow.removeEventListener(\"mouseup\", onMouseUp);\n\t\t\tphase = 5;\n\t\t\tscrollAnimationControlsRef.current?.stop();\n\t\t};\n\t}, [\n\t\tref,\n\t\tdirection,\n\t\tenabled\n\t]);\n\treturn React.useMemo(() => {\n\t\treturn { cancelEmulatedTouchScrollAnimation: () => {\n\t\t\tscrollAnimationControlsRef.current?.stop();\n\t\t} };\n\t}, []);\n}\nconst timeDelta = /* @__PURE__ */ (() => 4 / 60 * 1e3)();\nfunction getRecentEvents(events) {\n\tconst maxAge = new CustomEvent(\"getTime\").timeStamp - timeDelta;\n\treturn events.filter((event) => event.timeStamp > maxAge);\n}\nconst zeroPoint = {\n\tx: 0,\n\ty: 0\n};\nfunction calculateVelocity({ mouseMoveEvents, mouseUpEvent }) {\n\tconst oldestMouseMoveEvent = getRecentEvents(mouseMoveEvents)[0];\n\tif (!oldestMouseMoveEvent) return zeroPoint;\n\tconst deltaX = mouseUpEvent.clientX - oldestMouseMoveEvent.clientX;\n\tconst deltaY = mouseUpEvent.clientY - oldestMouseMoveEvent.clientY;\n\tconst time = mouseUpEvent.timeStamp - oldestMouseMoveEvent.timeStamp;\n\tif (time === 0) return zeroPoint;\n\treturn {\n\t\tx: deltaX / time * 1e3,\n\t\ty: deltaY / time * 1e3\n\t};\n}\n\n//#endregion\n//#region ../../library/src/components/utils/useUpdateScrollOffset.ts\nfunction useUpdateScrollOffset(ref, side, offset, cancelEmulatedTouchScrollAnimation) {\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tif (isMotionValue(offset)) {\n\t\t\tconst updateScrollLeft = () => {\n\t\t\t\tcancelEmulatedTouchScrollAnimation?.();\n\t\t\t\tconst element = ref.current;\n\t\t\t\tif (element) element[side] = Math.abs(offset.get());\n\t\t\t};\n\t\t\tupdateScrollLeft();\n\t\t\treturn offset.on(\"change\", updateScrollLeft);\n\t\t} else if (isFiniteNumber(offset)) {\n\t\t\tconst element = ref.current;\n\t\t\tif (!element) return;\n\t\t\tcancelEmulatedTouchScrollAnimation?.();\n\t\t\telement[side] = Math.abs(offset);\n\t\t}\n\t}, [offset]);\n}\n\n//#endregion\n//#region ../../library/src/components/Scroll/NativeScroll.tsx\n/**\n* @private\n*/\nconst NativeScrollInner = /* @__PURE__ */ React.forwardRef(function NativeScroll(props, forwardedRef) {\n\tconst { direction = \"vertical\", scrollBarVisible = false, dragEnabled = true, contentOffsetX = 0, contentOffsetY = 0, contentWidth: _contentWidth, contentHeight: _contentHeight, children, resetOffset, onScroll, className, directionLock: _directionLock = false, wheelEnabled: _wheelEnabled = true, scrollAnimate: _scrollAnimate, dragTransition: _dragTransition, dragMomentum: _dragMomentum, dragElastic: _dragElastic, overdragEnabled: _overdragEnabled = true, onScrollStart: _onScrollStart, onScrollEnd: _onScrollEnd, onDragStart: _onDragStart, onDrag: _onDrag, onDragEnd: _onDragEnd, onUpdate: _onUpdate, onDirectionLock: _onDirectionLock, layoutId: specificLayoutId, native: _native, ...containerProps } = props;\n\tconst layoutId = useLayoutId(props, {\n\t\tspecificLayoutId,\n\t\tpostfix: \"scroll\"\n\t});\n\tconst fallbackRef = React.useRef(null);\n\tconst ref = forwardedRef || fallbackRef;\n\tconst { cancelEmulatedTouchScrollAnimation } = useEmulateTouchScroll(ref, direction, dragEnabled);\n\tconst isInTarget = useIsInCurrentNavigationTarget();\n\tconst previousIsInTargetRef = React.useRef(isInTarget);\n\tconst updateScrollOffsetHandler = () => {\n\t\tif (!resetOffset) return;\n\t\tconst previousIsTarget = previousIsInTargetRef.current;\n\t\tpreviousIsInTargetRef.current = isInTarget;\n\t\tif (!(isInTarget && !previousIsTarget)) return;\n\t\tconst element = ref.current;\n\t\tif (!element) return;\n\t\tif (direction !== \"vertical\") {\n\t\t\tcancelEmulatedTouchScrollAnimation?.();\n\t\t\telement.scrollLeft = Math.abs(isMotionValue(contentOffsetX) ? contentOffsetX.get() : contentOffsetX);\n\t\t}\n\t\tif (direction !== \"horizontal\") {\n\t\t\tcancelEmulatedTouchScrollAnimation?.();\n\t\t\telement.scrollTop = Math.abs(isMotionValue(contentOffsetY) ? contentOffsetY.get() : contentOffsetY);\n\t\t}\n\t};\n\tuseIsomorphicLayoutEffect$1(updateScrollOffsetHandler, [isInTarget]);\n\tuseUpdateScrollOffset(ref, \"scrollLeft\", contentOffsetX, cancelEmulatedTouchScrollAnimation);\n\tuseUpdateScrollOffset(ref, \"scrollTop\", contentOffsetY, cancelEmulatedTouchScrollAnimation);\n\tconst size = !containerProps.__fromCanvasComponent ? {\n\t\twidth: containerProps.__fromCodeComponentNode ? \"100%\" : containerProps.width,\n\t\theight: containerProps.__fromCodeComponentNode ? \"100%\" : containerProps.height\n\t} : {};\n\treturn /* @__PURE__ */ jsxs(FrameWithMotion, {\n\t\tref,\n\t\t\"data-framer-component-type\": \"NativeScroll\",\n\t\tbackground: \"none\",\n\t\t...containerProps,\n\t\t...size,\n\t\tonScroll,\n\t\tlayoutId,\n\t\tonBeforeLayoutMeasure: updateScrollOffsetHandler,\n\t\tlayoutScroll: true,\n\t\tclassName: cx(className, `direction-${direction}`, !scrollBarVisible && \"scrollbar-hidden\"),\n\t\tchildren: [/* @__PURE__ */ jsx(EmptyState, {\n\t\t\tchildren,\n\t\t\tsize: {\n\t\t\t\twidth: isFiniteNumber(containerProps.width) ? containerProps.width : \"100%\",\n\t\t\t\theight: isFiniteNumber(containerProps.height) ? containerProps.height : \"100%\"\n\t\t\t},\n\t\t\tinsideUserCodeComponent: !containerProps.__fromCodeComponentNode,\n\t\t\ttitle: \"Scroll\",\n\t\t\tdescription: \"Click and drag the connector to any frame on the canvas →\"\n\t\t}), children]\n\t});\n});\nconst NativeScroll = /* @__PURE__ */ withLibraryCSS(NativeScrollInner);\n\n//#endregion\n//#region ../../library/src/components/Scroll/Scroll.tsx\n/**\n* @public\n* @deprecated Creating new Scroll components in Framer is no longer supported as of July 2025.\n* Existing Scroll components will continue to work, but please use alternative solutions for new\n* projects.\n*/\nconst Scroll = /* @__PURE__ */ (() => {\n\tconst ScrollInner = React.forwardRef(function ScrollInner(props, forwardedRef) {\n\t\tif (props.native) return /* @__PURE__ */ jsx(NativeScroll, {\n\t\t\tref: forwardedRef,\n\t\t\t...props\n\t\t});\n\t\telse return /* @__PURE__ */ jsx(EmulatedScroll, {\n\t\t\tref: forwardedRef,\n\t\t\t...props\n\t\t});\n\t});\n\tScrollInner.defaultProps = { directionLock: false };\n\taddPropertyControls(ScrollInner, {\n\t\tnative: {\n\t\t\ttype: \"boolean\",\n\t\t\tdefaultValue: false\n\t\t},\n\t\tdirection: {\n\t\t\ttype: \"segmentedenum\",\n\t\t\ttitle: \"Direction\",\n\t\t\toptions: [\n\t\t\t\t\"vertical\",\n\t\t\t\t\"horizontal\",\n\t\t\t\t\"both\"\n\t\t\t],\n\t\t\tdefaultValue: \"vertical\"\n\t\t},\n\t\tcontentOffsetX: {\n\t\t\ttype: \"number\",\n\t\t\ttitle: \"Offset X\",\n\t\t\tdefaultValue: 0,\n\t\t\tmin: 0,\n\t\t\tstep: 10,\n\t\t\tdisplayStepper: true,\n\t\t\thidden: ({ direction }) => direction === \"vertical\"\n\t\t},\n\t\tcontentOffsetY: {\n\t\t\ttype: \"number\",\n\t\t\ttitle: \"Offset Y\",\n\t\t\tdefaultValue: 0,\n\t\t\tmin: 0,\n\t\t\tstep: 10,\n\t\t\tdisplayStepper: true,\n\t\t\thidden: ({ direction }) => direction === \"horizontal\"\n\t\t},\n\t\tdirectionLock: {\n\t\t\ttype: \"boolean\",\n\t\t\ttitle: \"Lock\",\n\t\t\tenabledTitle: \"1 Axis\",\n\t\t\tdisabledTitle: \"Off\",\n\t\t\tdefaultValue: true,\n\t\t\thidden: ({ native }) => native === true\n\t\t},\n\t\tdragEnabled: {\n\t\t\ttype: \"boolean\",\n\t\t\ttitle: \"Drag\",\n\t\t\tenabledTitle: \"On\",\n\t\t\tdisabledTitle: \"Off\",\n\t\t\tdefaultValue: true\n\t\t},\n\t\toverdragEnabled: {\n\t\t\ttype: \"boolean\",\n\t\t\ttitle: \"Overdrag\",\n\t\t\tenabledTitle: \"On\",\n\t\t\tdisabledTitle: \"Off\",\n\t\t\tdefaultValue: true,\n\t\t\thidden: ({ native }) => native === true\n\t\t},\n\t\twheelEnabled: {\n\t\t\ttype: \"boolean\",\n\t\t\ttitle: \"Wheel\",\n\t\t\tenabledTitle: \"On\",\n\t\t\tdisabledTitle: \"Off\",\n\t\t\tdefaultValue: true,\n\t\t\thidden: ({ native }) => native === true\n\t\t},\n\t\tscrollBarVisible: {\n\t\t\ttype: \"boolean\",\n\t\t\ttitle: \"Scroll bar\",\n\t\t\tenabledTitle: \"Visible\",\n\t\t\tdisabledTitle: \"Hidden\",\n\t\t\tdefaultValue: false,\n\t\t\thidden: ({ native }) => native === false\n\t\t},\n\t\tresetOffset: {\n\t\t\ttype: \"boolean\",\n\t\t\ttitle: \"Reset\",\n\t\t\tdefaultValue: false\n\t\t}\n\t});\n\tScrollInner.supportsConstraints = true;\n\treturn ScrollInner;\n})();\n\n//#endregion\n//#region ../../library/src/components/useNavigation.ts\n/**\n* @returns NavigationInterface {@link NavigationInterface}\n* @public\n*/\nfunction useNavigation() {\n\treturn useContext(NavigationContext);\n}\n\n//#endregion\n//#region ../../library/src/data/Data.ts\n/**\n* @internal\n*/\nconst data = /* @__PURE__ */ (() => {\n\t/**\n\t* Allows data to be shared between Frames using Code Overrides.\n\t* Any changes to the `Data` instance will cause the preview to update and code\n\t* overrides will re-render. In this example, we’re updating the `scale` property on `press`, setting it to `0.5`.\n\t* ```jsx\n\t* import { Data, Override } from \"framer\"\n\t*\n\t* const data = Data({\n\t*    scale: 0.5,\n\t* })\n\t*\n\t* export function WhileTap(): Override {\n\t*    return {\n\t*        whileTap: {\n\t*            scale: data.scale,\n\t*        },\n\t*    }\n\t* }\n\t*\n\t* ```\n\t* @param initial - The initial value of the data to be set.\n\t* @returns the data object for use across components.\n\t* @public\n\t*/\n\tfunction Data(initial = {}) {\n\t\tconst _data = ObservableObject(initial, false, false);\n\t\tData.addData(_data);\n\t\treturn _data;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tData._stores = [];\n\t/** @internal */\n\tData.addData = (_data) => {\n\t\tData._stores.push(_data);\n\t};\n\t/** @internal */\n\tData.reset = () => {\n\t\tData._stores.forEach((target) => ObservableObject.resetObject(target));\n\t};\n\t/** @internal */\n\tData.addObserver = (target, observer) => {\n\t\treturn ObservableObject.addObserver(target, observer);\n\t};\n\treturn Data;\n})();\nconst Data = data;\n\n//#endregion\n//#region ../../library/src/data/PropertyStore.ts\n/**\n* @internal\n* @deprecated Use Data instead\n*/\nconst PropertyStore = /* @__PURE__ */ (() => {\n\t/**\n\t* @internal\n\t* @deprecated Use Data instead\n\t*/\n\tfunction PropertyStore(initial = {}, makeAnimatables = false) {\n\t\tdeprecationWarning(\"PropertyStore\", \"1.0.0\", \"Data() or ObservableObject()\");\n\t\treturn ObservableObject(initial, makeAnimatables);\n\t}\n\tPropertyStore.addObserver = (target, observer) => {\n\t\treturn ObservableObject.addObserver(target, observer);\n\t};\n\treturn PropertyStore;\n})();\n\n//#endregion\n//#region ../../library/src/data/useData/store.ts\n/**\n* Take the user-defined `actions` map and return a version of the same functions\n* that update the store.\n*\n* @param get - Store data getter\n* @param set - Store data setter\n* @param actions - The actions to bind to the store\n*/\nfunction bindActionsToStore(get, set, actions) {\n\tconst boundActions = {};\n\tfor (const key in actions) {\n\t\tconst action = actions[key];\n\t\tif (!action) continue;\n\t\tboundActions[key] = (data) => set(action(get(), data));\n\t}\n\treturn boundActions;\n}\n/**\n* A data store instance. `useData` can create and access multiple different data stores depending\n* on the `storeId` passed to it (if any).\n*\n* @param initialState - The initial state of the store.\n* @param unboundActions - Optional map of actions to make available for manipulating the data store.\n*/\nfunction createStore(initialState, unboundActions) {\n\tlet state = initialState;\n\tlet version = 0;\n\tconst subscribers = /* @__PURE__ */ new Set();\n\tconst notifySubscriber = (sub) => sub(version);\n\tconst get = () => state;\n\tconst set = (latestState) => {\n\t\tversion++;\n\t\tstate = latestState;\n\t\tsubscribers.forEach(notifySubscriber);\n\t};\n\tconst actions = unboundActions ? bindActionsToStore(get, set, unboundActions) : set;\n\treturn {\n\t\tget,\n\t\tset,\n\t\tgetVersion: () => version,\n\t\tgetActions: () => actions,\n\t\tsubscribe: (sub) => {\n\t\t\tsubscribers.add(sub);\n\t\t\treturn () => subscribers.delete(sub);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region ../../library/src/data/useData/index.ts\nconst defaultId = /* @__PURE__ */ Symbol(\"default\");\n/**\n* @internal\n* @deprecated ancient (2019?) and does not seem to be used.\n*/\nconst DataContext = /* @__PURE__ */ createContext(defaultId);\nfunction createData(defaultState, actions) {\n\tconst stores = /* @__PURE__ */ new Map();\n\tconst useData = (id, initialState) => {\n\t\tconst contextId = useContext(DataContext);\n\t\tid = id || contextId;\n\t\tconst store = useMemo(() => {\n\t\t\tif (!stores.has(id)) stores.set(id, createStore(initialState || defaultState, actions));\n\t\t\treturn stores.get(id);\n\t\t}, [id]);\n\t\tconst [, notifyUpdates] = useState(store.getVersion());\n\t\tconst storeValueAtHookCallTime = useMemo(() => store.get(), [store]);\n\t\tuseEffect(() => {\n\t\t\tconst unsubscribe = store.subscribe(notifyUpdates);\n\t\t\tif (storeValueAtHookCallTime !== store.get()) notifyUpdates(store.getVersion());\n\t\t\treturn unsubscribe;\n\t\t}, [store, storeValueAtHookCallTime]);\n\t\treturn [store.get(), store.getActions()];\n\t};\n\treturn useData;\n}\n\n//#endregion\n//#region ../../library/src/deprecated/DataObserver.tsx\nconst initialState = { update: 0 };\n/**\n* @deprecated\n* @internal\n*/\nconst DataObserverContext = /* @__PURE__ */ React.createContext({ update: NaN });\n/**\n* Makes the component re-render when `Data` changes\n* @returns `true` if observing succeeds (context is provided), `false` when it fails\n* @public\n*/\nfunction useObserveData() {\n\tconst context = React.useContext(DataObserverContext);\n\treturn !Number.isNaN(context.update);\n}\n/**\n* @deprecated\n* @internal\n*/\nvar DataObserver = class extends Component {\n\tobservers = [];\n\tstate = initialState;\n\ttaskAdded = false;\n\tframeTask = () => {\n\t\tthis.setState({ update: this.state.update + 1 });\n\t\tthis.taskAdded = false;\n\t};\n\tobserver = () => {\n\t\tif (this.taskAdded) return;\n\t\tthis.taskAdded = true;\n\t\tMainLoop.addFrameTask(this.frameTask);\n\t};\n\tcomponentWillUnmount() {\n\t\tthis.observers.map((cancel) => cancel());\n\t\tData.reset();\n\t}\n\trender() {\n\t\tconst { children } = this.props;\n\t\tthis.observers.map((cancel) => cancel());\n\t\tthis.observers = [];\n\t\tData._stores.forEach((d) => {\n\t\t\tconst observer = Data.addObserver(d, this.observer);\n\t\t\tthis.observers.push(observer);\n\t\t});\n\t\treturn /* @__PURE__ */ jsx(DataObserverContext.Provider, {\n\t\t\tvalue: { ...this.state },\n\t\t\tchildren\n\t\t});\n\t}\n};\n\n//#endregion\n//#region ../../library/src/deprecated/convertColorProps.ts\nfunction convertColorObject(prop) {\n\tif (typeof prop === \"string\" || isMotionValue(prop)) return prop;\n\telse if (LinearGradient.isLinearGradient(prop)) return LinearGradient.toCSS(prop);\n\telse if (RadialGradient.isRadialGradient(prop)) return RadialGradient.toCSS(prop);\n\telse if (Color.isColorObject(prop)) return Color.toRgbString(prop);\n\treturn prop;\n}\nfunction convertColorProps(props) {\n\tif (props.background || props.color) {\n\t\tconst converted = Object.assign({}, props);\n\t\tif (props.background) converted.background = convertColorObject(props.background);\n\t\tif (props.color) converted.color = convertColorObject(props.color);\n\t\treturn converted;\n\t}\n\treturn props;\n}\n\n//#endregion\n//#region ../../library/src/deprecated/WithOverride.tsx\n/**\n* @deprecated No longer used by Framer because built into preview. From version ## TODO: add correct version\n* @internal\n*/\nfunction WithOverride(Component, override) {\n\tconst useOverride = typeof override === \"function\" ? (props) => override(convertColorProps(props)) : () => convertColorProps(override);\n\tconst ComponentWithOverride = function(props) {\n\t\tuseContext(DataObserverContext);\n\t\tconst overrideProps = useOverride(props);\n\t\tconst { style, ...rest } = props;\n\t\treturn /* @__PURE__ */ jsx(Component, {\n\t\t\t...rest,\n\t\t\t...overrideProps,\n\t\t\t_initialStyle: style\n\t\t});\n\t};\n\thoistNonReactStatic(ComponentWithOverride, Component);\n\tComponentWithOverride[\"displayName\"] = `WithOverride(${Component.displayName || Component.name})`;\n\treturn ComponentWithOverride;\n}\n\n//#endregion\n//#region ../../library/src/modules/hocOptions.ts\nconst prefix$1 = \"__framer__\";\nconst prefixLength = /* @__PURE__ */ (() => 10)();\nfunction extractPrefixedProps(props, keys) {\n\tconst result = {};\n\tconst rest = {};\n\tfor (const key in props) {\n\t\tconst strippedKey = stripPrefixFromPrefixedKey(key);\n\t\tif (strippedKey && keys.has(strippedKey)) {\n\t\t\tresult[strippedKey] = props[key];\n\t\t\tcontinue;\n\t\t}\n\t\trest[key] = props[key];\n\t}\n\treturn [result, rest];\n}\nfunction stripPrefixFromPrefixedKey(key) {\n\tif (key.startsWith(prefix$1)) return key.substr(prefixLength);\n}\n\n//#endregion\n//#region ../../library/src/modules/GeneratedComponentContext.ts\n/** @internal */\nconst GeneratedComponentContext = /* @__PURE__ */ React.createContext(void 0);\n\n//#endregion\n//#region ../../library/src/components/utils/cloneChildrenWithProps.tsx\nfunction cloneChildrenWithProps(children, props, asNode) {\n\tconst cloned = React$1.Children.map(children, (child) => {\n\t\tif (React$1.isValidElement(child)) return React$1.cloneElement(child, props);\n\t\treturn child;\n\t});\n\tif (asNode) return cloned;\n\treturn /* @__PURE__ */ jsx(Fragment$1, { children: cloned });\n}\n\n//#endregion\n//#region ../../library/src/components/utils/useCloneChildrenWithPropsAndRef.tsx\n/**\n* This hook creates a clone function to clone children with parent-forwarded props and ref.\n* It forwards the refs and props to the children in a safe way.\n* Clone function is stateful and should only be called once during the render cycle.\n* If you need to clone children multiple times, you should create a new instance of the hook.\n* */\nfunction useCloneChildrenWithPropsAndRef(forwardedRef) {\n\tconst hook = useConstant(() => createHook(forwardedRef));\n\thook.useSetup(forwardedRef);\n\treturn hook.cloneAsElement;\n}\nfunction createHook(forwardedRef) {\n\tconst state = {\n\t\tforwardedRef,\n\t\tchildRef: null,\n\t\tref: null\n\t};\n\tstate.ref = createRefFunction(state);\n\tconst updateIfNeeded = (nextForwardedRef, ref) => {\n\t\tif (!state.forwardedRef && state.forwardedRef === nextForwardedRef) {\n\t\t\tstate.ref = ref;\n\t\t\treturn;\n\t\t}\n\t\tlet shouldUpdate = false;\n\t\tif (state.childRef !== ref) {\n\t\t\tstate.childRef = ref;\n\t\t\tshouldUpdate = true;\n\t\t}\n\t\tif (state.forwardedRef !== nextForwardedRef) {\n\t\t\tstate.forwardedRef = nextForwardedRef;\n\t\t\tshouldUpdate = true;\n\t\t}\n\t\tif (!shouldUpdate) return;\n\t\tstate.ref = createRefFunction(state);\n\t};\n\tlet preventNextCall = false;\n\tfunction cloneChildrenWithPropsAndRef(children, props) {\n\t\tif (preventNextCall) throw new ReferenceError(\"useCloneChildrenWithPropsAndRef: You should not call cloneChildrenWithPropsAndRef more than once during the render cycle.\");\n\t\tpreventNextCall = true;\n\t\tif (React$1.Children.count(children) > 1 && forwardedRef) {\n\t\t\tstate.forwardedRef = void 0;\n\t\t\tstate.ref = state.childRef;\n\t\t}\n\t\treturn React$1.Children.map(children, (child) => {\n\t\t\tif (React$1.isValidElement(child)) {\n\t\t\t\tconst ownRef = \"ref\" in child ? child.ref : void 0;\n\t\t\t\tupdateIfNeeded(state.forwardedRef, ownRef);\n\t\t\t\tconst newProps = isFunction(props) ? props(child.props) : props;\n\t\t\t\treturn React$1.cloneElement(child, state.ref !== ownRef ? {\n\t\t\t\t\t...newProps,\n\t\t\t\t\tref: state.ref\n\t\t\t\t} : newProps);\n\t\t\t}\n\t\t\treturn child;\n\t\t});\n\t}\n\tconst cloneAsElement = function cloneAsElement(children, props) {\n\t\treturn /* @__PURE__ */ jsx(Fragment$1, { children: cloneChildrenWithPropsAndRef(children, props) });\n\t};\n\t/**\n\t* Clones children and adds props and refs and returns them as a real type of React.Children.map\n\t* */\n\tcloneAsElement.cloneAsArray = cloneChildrenWithPropsAndRef;\n\treturn {\n\t\tuseSetup: (newRef) => {\n\t\t\tpreventNextCall = false;\n\t\t\tupdateIfNeeded(newRef, state.childRef);\n\t\t},\n\t\t/**\n\t\t* Clones children and adds props and refs and returns them as a JSX.Element\n\t\t* Making it easier to use as it wraps them in a Fragment.\n\t\t* */\n\t\tcloneAsElement\n\t};\n}\nfunction createRefFunction(state) {\n\tif (!state.forwardedRef) return state.childRef;\n\tconst { forwardedRef: prevForwardedRef, childRef: prevChildRef } = state;\n\treturn (value) => {\n\t\tsetRef(prevChildRef, value);\n\t\tsetRef(prevForwardedRef, value);\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/PropertyOverrides.tsx\nconst SSRParentVariantsContext = /* @__PURE__ */ React.createContext(void 0);\nconst SSRVariantClassName = \"ssr-variant\";\nconst SSRVariantGroupSeparatorClassName = \"ssr-variant-group-separator\";\nfunction renderBranchedChildrenFromPropertyOverrides(overrides, children, props, variantClassNames, primaryVariantId, parentVariants, cloneChildren, activeVariantId) {\n\tconst childrenArray = React.Children.toArray(children);\n\tconst child = childrenArray[0];\n\tif (childrenArray.length !== 1 || !React.isValidElement(child)) {\n\t\tconsole.warn(\"PropertyOverrides: expected exactly one React element for a child\", children);\n\t\treturn cloneChildren(children, props);\n\t}\n\tconst branches = [];\n\tconst nonOverriddenVariants = [];\n\tfor (const [variantId] of Object.entries(variantClassNames)) {\n\t\tif (variantId === primaryVariantId) continue;\n\t\tconst propOverrides = overrides[variantId];\n\t\tif (!propOverrides || !arePropOverridesEffectivelyDifferent(child.props, propOverrides)) {\n\t\t\tnonOverriddenVariants.push(variantId);\n\t\t\tcontinue;\n\t\t}\n\t\tconst effectiveVariants = intersection([variantId], parentVariants);\n\t\tif (effectiveVariants.length) branches.push({\n\t\t\tvariants: effectiveVariants,\n\t\t\tpropOverrides\n\t\t});\n\t}\n\tif (branches.length === 0) return cloneChildren(child, props);\n\tconst effectiveRemainingVariants = intersection([primaryVariantId, ...nonOverriddenVariants], parentVariants);\n\tif (effectiveRemainingVariants.length) branches.unshift({ variants: effectiveRemainingVariants });\n\tconst renderedBranches = [];\n\tfor (const { variants, propOverrides } of branches) {\n\t\tif (activeVariantId && !variants.includes(activeVariantId)) continue;\n\t\tconst key = activeVariantId ? \"active-branch\" : variants.join(\"+\");\n\t\tlet element = /* @__PURE__ */ jsx(SSRParentVariantsContext.Provider, {\n\t\t\tvalue: {\n\t\t\t\tprimaryVariantId,\n\t\t\t\tvariants: new Set(variants)\n\t\t\t},\n\t\t\tchildren: cloneChildren(child, propOverrides ? {\n\t\t\t\t...props,\n\t\t\t\t...propOverrides\n\t\t\t} : props)\n\t\t}, key);\n\t\tconst hiddenClassNames = generateHiddenClassNames(variants, parentVariants, variantClassNames);\n\t\tif (hiddenClassNames.length) {\n\t\t\tassert$1(branches.length > 1, \"Must branch out when there are hiddenClassNames\");\n\t\t\telement = /* @__PURE__ */ jsx(\"div\", {\n\t\t\t\tclassName: `${SSRVariantClassName} ${hiddenClassNames.join(\" \")}`,\n\t\t\t\tsuppressHydrationWarning: true,\n\t\t\t\tchildren: element\n\t\t\t}, key);\n\t\t} else assert$1(branches.length === 1, \"Cannot branch out when hiddenClassNames is empty\");\n\t\trenderedBranches.push(element);\n\t}\n\tassert$1(!activeVariantId || renderedBranches.length === 1, \"Must render exactly one branch when activeVariantId is given\");\n\tif (!activeVariantId) return [...renderedBranches, /* @__PURE__ */ jsx(\"div\", { className: SSRVariantGroupSeparatorClassName }, \"property-overrides-separator\")];\n\treturn renderedBranches;\n}\n/**\n* @deprecated\n* @internal\n*/\nconst SSRVariants = /* @__PURE__ */ React.forwardRef(function SSRVariants({ id: _nodeId, children, ...props }, ref) {\n\tconst cloneWithRefs = useCloneChildrenWithPropsAndRef(ref);\n\tif (isBrowser$1()) return cloneWithRefs(children, props);\n\tthrow new Error(\"SSRVariants is no longer supported outside canvas and preview\");\n});\nfunction variantHashFromClassName(className) {\n\treturn className.split(\"-\")[2];\n}\nfunction generateHiddenClassNames(showOnlyInVariantIds, parentVariants, variantClassNames) {\n\tconst classNames = [];\n\tfor (const [variantId, variantClassName] of Object.entries(variantClassNames)) {\n\t\tconst alreadyHiddenInParent = parentVariants && !parentVariants.has(variantId);\n\t\tif (showOnlyInVariantIds.includes(variantId) || alreadyHiddenInParent) continue;\n\t\tclassNames.push(`hidden-${variantHashFromClassName(variantClassName)}`);\n\t}\n\treturn classNames;\n}\n/**\n* There's no point rendering a branch if there's no overlap between its\n* variants, and the parent variants.\n*\n* Example 1: if we're currently in a branch that's gonna be visible on mobile\n* only, there's no point rendering a branch that should be tablet-only.\n*\n* Example 2: if we're currently in a branch that's gonna be visible on desktop\n* and tablet, then we should render a branch that's gonna be visible on tablet\n* and mobile.\n*\n* In other words, we're simply looking for an intersection between the two\n* arrays.\n*\n* If we're currently at the top level (parentVariants is undefined), then we\n* need to render all the branches.\n*/\nfunction intersection(variants, parentVariants) {\n\tif (!parentVariants) return variants;\n\treturn variants.filter((variant) => parentVariants.has(variant));\n}\nfunction arePropOverridesEffectivelyDifferent(props, propOverrides) {\n\tfor (const key of Object.keys(propOverrides)) if (!isEqual(props[key], propOverrides[key], true)) return true;\n\treturn false;\n}\nfunction propsForBreakpoint(variant, props, overrides) {\n\tif (!overrides || !variant) return props;\n\treturn {\n\t\t...props,\n\t\t...overrides[variant]\n\t};\n}\n/**\n* This is a wrapper for components that have some of their props overridden in different breakpoints.\n*\n* It'll make sure that the component is rendered with props appropriate for the breakpoint, i.e., taking the overrides\n* into account.\n*\n* It also handles SSR + hydration. During SSR, we'll render all the versions of the component into the HTML, with\n* appropriate `hidden-xxx` classes to make sure that on the client, only the version for the correct breakpoint is\n* being shown. Before hydration, we expect all the hidden/non-active breakpoints to be removed from the DOM, which is\n* currently being done by a small inline script injected during SSG. During hydration, we only render the active\n* breakpoint, but we keep the `hidden-xxx`/`ssr-variant` container, because we don't want the shown DOM elements to\n* move around, as that could affect our LCP scores. If we removed/unwrapped the container, the benchmarks might think\n* that the LCP has changed.\n*\n* @internal\n*/\nconst PropertyOverridesWithoutCSS = /* @__PURE__ */ React.forwardRef(function PropertyOverrides(props, ref) {\n\tconst cloneWithRefs = useCloneChildrenWithPropsAndRef(ref);\n\tconst ancestorCtx = React.useContext(SSRParentVariantsContext);\n\tconst isHydrationOrSSR = React.useSyncExternalStore(noopSubscribe, returnFalse, returnTrue);\n\tconst action = useConstant(() => {\n\t\tif (isHydrationOrSSR) {\n\t\t\tif (isBrowser$1()) return 1;\n\t\t\telse return 2;\n\t\t} else return 0;\n\t});\n\tconst generatedComponentContext = React.useContext(GeneratedComponentContext);\n\treturn useMemoOne(() => {\n\t\tconst { breakpoint, overrides, children, ...restProps } = props;\n\t\tif (!generatedComponentContext) {\n\t\t\tconsole.warn(\"PropertyOverrides is missing GeneratedComponentContext\");\n\t\t\treturn cloneWithRefs(children, restProps);\n\t\t}\n\t\tconst { primaryVariantId, variantClassNames } = generatedComponentContext;\n\t\tconst parentVariants = ancestorCtx?.primaryVariantId === primaryVariantId ? ancestorCtx?.variants : void 0;\n\t\tswitch (action) {\n\t\t\tcase 0: return cloneWithRefs(children, propsForBreakpoint(breakpoint, restProps, overrides));\n\t\t\tcase 1: return renderBranchedChildrenFromPropertyOverrides(overrides, children, restProps, variantClassNames, primaryVariantId, parentVariants, cloneWithRefs, breakpoint);\n\t\t\tcase 2: return renderBranchedChildrenFromPropertyOverrides(overrides, children, restProps, variantClassNames, primaryVariantId, parentVariants, cloneChildrenWithProps, void 0);\n\t\t\tdefault: assertNever$1(action);\n\t\t}\n\t}, [\n\t\tgeneratedComponentContext,\n\t\tancestorCtx,\n\t\tcloneWithRefs,\n\t\tprops\n\t]);\n});\nconst PropertyOverrides = /* @__PURE__ */ (() => withCSS(PropertyOverridesWithoutCSS, `.${SSRVariantClassName} { display: contents }`, \"PropertyOverrides\"))();\n\n//#endregion\n//#region ../../library/src/modules/optimizeAppear.tsx\nconst defaultVariantKey = \"default\";\nconst defaultVariants = /* @__PURE__ */ new Set([defaultVariantKey]);\nvar AnimationCollector = class {\n\tentries = /* @__PURE__ */ new Map();\n\t/** @deprecated */\n\tset(nodeId, prop, value, variantHash) {\n\t\tswitch (prop) {\n\t\t\tcase \"transformTemplate\":\n\t\t\t\tassert$1(typeof value === \"string\", `transformTemplate must be a string, received: ${value}`);\n\t\t\t\tthis.setHash(nodeId, variantHash, {\n\t\t\t\t\ttransformTemplate: value,\n\t\t\t\t\tlegacy: true\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"initial\":\n\t\t\tcase \"animate\":\n\t\t\t\tassert$1(typeof value === \"object\", `${prop} must be a valid object, received: ${value}`);\n\t\t\t\tthis.setHash(nodeId, variantHash, {\n\t\t\t\t\t[prop]: value,\n\t\t\t\t\tlegacy: true\n\t\t\t\t});\n\t\t}\n\t}\n\tsetHash(id, variantHash = defaultVariantKey, value) {\n\t\tconst existing = this.entries.get(id) ?? {};\n\t\tconst existingValue = existing[variantHash] ?? {};\n\t\texisting[variantHash] = value === null ? null : {\n\t\t\t...existingValue,\n\t\t\t...value\n\t\t};\n\t\tthis.entries.set(id, existing);\n\t}\n\t#variantHashes = {};\n\tvariantHash(variantId, info) {\n\t\tif (variantId === info?.primaryVariantId) return defaultVariantKey;\n\t\tconst existing = this.#variantHashes[variantId];\n\t\tif (existing) return existing;\n\t\tconst className = info?.variantClassNames[variantId];\n\t\tif (!className) return defaultVariantKey;\n\t\treturn this.#variantHashes[variantId] = variantHashFromClassName(className);\n\t}\n\tsetAll(id, variants = defaultVariants, props, info) {\n\t\tif (props === null) {\n\t\t\tfor (const variantId of variants) this.setHash(id, this.variantHash(variantId, info), null);\n\t\t\treturn;\n\t\t}\n\t\tconst transformTemplate = isFunction(props.transformTemplate) ? props.transformTemplate?.({}, framerAppearTransformTemplateToken) : void 0;\n\t\tconst initial = props.__framer__presenceInitial ?? props.initial;\n\t\tconst animate = props.__framer__presenceAnimate ?? props.animate;\n\t\tconst config = {\n\t\t\tinitial: isObject$1(initial) ? initial : void 0,\n\t\t\tanimate: isObject$1(animate) ? animate : void 0,\n\t\t\ttransformTemplate: isString(transformTemplate) ? transformTemplate : void 0\n\t\t};\n\t\tfor (const variantId of variants) this.setHash(id, this.variantHash(variantId, info), config);\n\t}\n\tclear() {\n\t\tthis.entries.clear();\n\t}\n\ttoObject() {\n\t\treturn Object.fromEntries(this.entries);\n\t}\n};\n/**\n* @internal\n*/\nconst framerAppearEffects = /* @__PURE__ */ new AnimationCollector();\n/**\n* @internal\n*/\nfunction withOptimizedAppearEffect(Component) {\n\treturn React.forwardRef(({ optimized, ...props }, ref) => {\n\t\tconst generatedComponentContext = React.useContext(GeneratedComponentContext);\n\t\tconst variants = React.useContext(SSRParentVariantsContext)?.variants;\n\t\tconst id = props[framerAppearIdKey];\n\t\tif (id && !isBrowser$1()) framerAppearEffects.setAll(id, variants, optimized ? props : null, generatedComponentContext);\n\t\tconst disabledProps = getDisabledFXPropsInStaticRenderer(props);\n\t\treturn /* @__PURE__ */ jsx(Component, {\n\t\t\tref,\n\t\t\t...props,\n\t\t\t...disabledProps\n\t\t});\n\t});\n}\n/**\n* @internal\n*/\nconst optimizeAppear = (prop, id, animateTargetAndTransition, variantHash) => {\n\tif (!isBrowser$1()) framerAppearEffects.set(id, prop, animateTargetAndTransition, variantHash);\n\treturn animateTargetAndTransition;\n};\n/**\n* @internal\n*/\nconst framerAppearTransformTemplateToken = \"__Appear_Animation_Transform__\";\n/**\n* @internal\n*/\nconst optimizeAppearTransformTemplate = (id, fn) => {\n\tif (!isBrowser$1()) {\n\t\tconst template = fn?.({}, framerAppearTransformTemplateToken);\n\t\tif (template === void 0) return fn;\n\t\tframerAppearEffects.set(id, \"transformTemplate\", template);\n\t}\n\treturn fn;\n};\n/**\n* The dataset key we assign to every node that needs an appear animation. Its value is a unique hashed id, so the\n* appear animation script in SSG can correctly find the nodes that need to be animated, no matter how we alter the ids\n* later on in code-gen/rendering.\n* @internal\n*/\nconst framerAppearIdKey = \"data-framer-appear-id\";\n/**\n* The dataset key we assign to the appear animation script tag in the HTML template. SSG uses this key as a selector to\n* inject the animation script.\n* @internal\n*/\nconst framerAppearAnimationScriptKey = \"data-framer-appear-animation\";\n/**\n* Disable animations on the component when we're on the canvas to prevent any values from impacting\n* the design. Don't always unset `animate` or `initial` as if these are already set in a smart\n* component, we will break the active variant.\n*\n* @internal\n*/\nconst getDisabledFXPropsInStaticRenderer = (props) => {\n\tif (!isStaticRenderer()) return void 0;\n\treturn {\n\t\tanimate: isVariantOrVariantList$1(props.animate) ? props.animate : void 0,\n\t\tinitial: isVariantOrVariantList$1(props.initial) ? props.initial : void 0,\n\t\texit: void 0\n\t};\n};\nfunction isVariantOrVariantList$1(value) {\n\treturn isString(value) || Array.isArray(value);\n}\n\n//#endregion\n//#region ../../library/src/modules/useFXValues.ts\nconst effectValuesKeys = [\n\t\"opacity\",\n\t\"x\",\n\t\"y\",\n\t\"scale\",\n\t\"rotate\",\n\t\"rotateX\",\n\t\"rotateY\",\n\t\"skewX\",\n\t\"skewY\",\n\t\"transformPerspective\"\n];\nconst makeFXValues = (defaults) => {\n\treturn {\n\t\tx: motionValue(defaults?.x ?? 0),\n\t\ty: motionValue(defaults?.y ?? 0),\n\t\topacity: motionValue(defaults?.opacity ?? 1),\n\t\tscale: motionValue(defaults?.scale ?? 1),\n\t\trotate: motionValue(defaults?.rotate ?? 0),\n\t\trotateX: motionValue(defaults?.rotateX ?? 0),\n\t\trotateY: motionValue(defaults?.rotateY ?? 0),\n\t\tskewX: motionValue(defaults?.skewX ?? 0),\n\t\tskewY: motionValue(defaults?.skewY ?? 0),\n\t\t/** @deprecated */\n\t\ttransformPerspective: motionValue(defaults?.transformPerspective ?? 0)\n\t};\n};\nconst defaultFXValues = {\n\tx: 0,\n\ty: 0,\n\tscale: 1,\n\topacity: 1,\n\trotate: 0,\n\trotateX: 0,\n\trotateY: 0,\n\tskewX: 0,\n\tskewY: 0,\n\t/** @deprecated */\n\ttransformPerspective: 0\n};\n/** @internal */\nfunction isFXValuesKey(key) {\n\treturn key in defaultFXValues;\n}\nconst effectEnabledStyle = /* @__PURE__ */ Object.freeze({ willChange: \"transform\" });\nconst effectDisabledStyle = /* @__PURE__ */ Object.freeze({});\n/**\n* Create the fx values object, resetting the motion values to defaults when the\n* effect is disabled.\n*/\nfunction useFXValues(values, enabled) {\n\tconst effect = useConstant(() => ({ values: makeFXValues(enabled ? values : void 0) }));\n\tReact.useEffect(() => {\n\t\tif (enabled) return;\n\t\tfor (const key of effectValuesKeys) {\n\t\t\tconst value = defaultFXValues[key];\n\t\t\tif (isUndefined(value)) continue;\n\t\t\teffect.values[key].set(value);\n\t\t}\n\t}, [enabled]);\n\treturn effect;\n}\n\n//#endregion\n//#region ../../library/src/modules/useLoopEffect.ts\nconst loopOptionsKeys = /* @__PURE__ */ new Set([\n\t\"loopEffectEnabled\",\n\t\"loopTransition\",\n\t\"loop\",\n\t\"loopRepeatType\",\n\t\"loopRepeatDelay\",\n\t\"loopPauseOffscreen\"\n]);\nconst useDelay = () => {\n\tconst timeoutRef = useRef();\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tclearTimeout(timeoutRef.current);\n\t\t};\n\t}, []);\n\treturn async (d) => new Promise((resolve) => {\n\t\ttimeoutRef.current = setTimeout(() => {\n\t\t\tresolve(true);\n\t\t}, d * 1e3);\n\t});\n};\nfunction useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepeatType, loop, loopPauseOffscreen }, ref) {\n\tconst shouldReduceMotion = useReducedMotionConfig();\n\tconst values = useConstant(makeFXValues);\n\tconst mirrorStateRef = useRef(false);\n\tconst delay = useDelay();\n\tconst animationPromiseRef = useRef(null);\n\tconst animateValues = useCallback(async () => {\n\t\tif (!loop) return;\n\t\tconst transition = loopTransition || void 0;\n\t\tconst mirror = mirrorStateRef.current && loopRepeatType === \"mirror\";\n\t\tconst to = mirror ? defaultFXValues : loop;\n\t\tconst from = mirror ? loop : defaultFXValues;\n\t\tmirrorStateRef.current = !mirrorStateRef.current;\n\t\tanimationPromiseRef.current = Promise.all(effectValuesKeys.map((key) => {\n\t\t\tif (shouldReduceMotion && key !== \"opacity\") return;\n\t\t\tvalues[key].jump(from[key] ?? defaultFXValues[key]);\n\t\t\treturn new Promise((resolve) => {\n\t\t\t\tconst opts = {\n\t\t\t\t\t...transition,\n\t\t\t\t\tonComplete: () => resolve()\n\t\t\t\t};\n\t\t\t\tconst target = to[key] ?? from[key];\n\t\t\t\tif (typeof target === \"number\") animate$1(values[key], target, opts);\n\t\t\t});\n\t\t}));\n\t\treturn animationPromiseRef.current;\n\t}, [\n\t\tloop,\n\t\tloopRepeatType,\n\t\tloopTransition,\n\t\tshouldReduceMotion\n\t]);\n\tconst [isRunning, setIsRunning] = useState(false);\n\tconst shouldRunRef = useRef(false);\n\tconst animateLoop = useCallback(async () => {\n\t\tif (!loopEffectEnabled || !shouldRunRef.current) return;\n\t\tawait animateValues();\n\t\tawait delay(loopRepeatDelay ?? 0);\n\t\tanimateLoop();\n\t}, [\n\t\tanimateValues,\n\t\tdelay,\n\t\tloopEffectEnabled,\n\t\tloopRepeatDelay\n\t]);\n\tconst start = useCallback(() => {\n\t\tif (shouldRunRef.current) return;\n\t\tshouldRunRef.current = true;\n\t\tstartTransition(() => setIsRunning(true));\n\t\tanimateLoop();\n\t}, [animateLoop]);\n\tconst stop = useCallback((overrideRunRef = true) => {\n\t\teffectValuesKeys.forEach((key) => {\n\t\t\tvalues[key].stop();\n\t\t});\n\t\teffectValuesKeys.forEach((key) => {\n\t\t\tvalues[key].set(defaultFXValues[key]);\n\t\t});\n\t\tmirrorStateRef.current = false;\n\t\tif (overrideRunRef) {\n\t\t\tshouldRunRef.current = false;\n\t\t\tstartTransition(() => setIsRunning(false));\n\t\t}\n\t}, []);\n\tconst hasLoop = loopEffectEnabled && loop;\n\tconst startStopTabVisibilityListener = useCallback(() => {\n\t\tif (document.hidden) stop(false);\n\t\telse if (shouldRunRef.current) {\n\t\t\tshouldRunRef.current = false;\n\t\t\tstart();\n\t\t}\n\t}, [start, stop]);\n\tuseEffect(() => {\n\t\tif (!hasLoop) return;\n\t\tdocument.addEventListener(\"visibilitychange\", startStopTabVisibilityListener);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"visibilitychange\", startStopTabVisibilityListener);\n\t\t};\n\t}, [hasLoop, startStopTabVisibilityListener]);\n\tuseEffect(() => {\n\t\tif (hasLoop && loopPauseOffscreen) return;\n\t\tif (hasLoop) start();\n\t\telse stop();\n\t}, [\n\t\tstart,\n\t\tstop,\n\t\tloopPauseOffscreen,\n\t\thasLoop\n\t]);\n\tuseEffect(() => {\n\t\treturn () => stop();\n\t}, [stop]);\n\tconst isIntersectingRef = useRef(false);\n\tconst stopAfterAnimationEnds = useCallback(async () => {\n\t\tif (!animationPromiseRef.current) return;\n\t\tawait animationPromiseRef.current;\n\t\tif (isIntersectingRef.current) return;\n\t\tstop();\n\t}, [stop]);\n\t/**\n\t* This is only called 1x when the observed ref is intersecting or stops intersecting (due to the implicit `threshold: 0` option on the IO)\n\t*/\n\tconst startAndStopBasedOnIntersection = useCallback((entry) => {\n\t\tif (entry.isIntersecting) {\n\t\t\tisIntersectingRef.current = true;\n\t\t\tstart();\n\t\t} else {\n\t\t\tisIntersectingRef.current = false;\n\t\t\tstopAfterAnimationEnds();\n\t\t}\n\t}, [start, stopAfterAnimationEnds]);\n\tuseSharedIntersectionObserver(ref, startAndStopBasedOnIntersection, { enabled: hasLoop && loopPauseOffscreen });\n\tconst addWillChange = isRunning || !loopPauseOffscreen;\n\treturn useMemo(() => {\n\t\treturn {\n\t\t\tvalues,\n\t\t\tstyle: hasLoop && addWillChange ? effectEnabledStyle : effectDisabledStyle\n\t\t};\n\t}, [hasLoop, addWillChange]);\n}\n\n//#endregion\n//#region ../../library/src/modules/parallaxTransform.ts\nfunction parallaxTransform(scrollY, originalPosition, speed, offset, adjustPosition) {\n\tconst speedFactor = speed / 100 - 1;\n\treturn (adjustPosition ? (originalPosition - offset) * speedFactor : 0) + -scrollY * speedFactor;\n}\n\n//#endregion\n//#region ../../library/src/modules/useParallax.ts\nconst parallaxOptionsKeys = /* @__PURE__ */ new Set([\n\t\"speed\",\n\t\"adjustPosition\",\n\t\"offset\",\n\t\"parallaxTransformEnabled\"\n]);\nfunction useParallax(options, ref, visibilityStyle) {\n\tconst { speed = 100, offset = 0, adjustPosition = false, parallaxTransformEnabled } = options;\n\tconst originalPosition = React.useRef(null);\n\tconst shouldReduceMotion = useReducedMotionConfig();\n\tconst transform = React.useCallback((yValue) => {\n\t\tif (originalPosition.current === null) return 0;\n\t\tif (speed === 100) return 0;\n\t\treturn parallaxTransform(yValue, originalPosition.current, speed, offset, adjustPosition);\n\t}, [\n\t\tspeed,\n\t\toffset,\n\t\tadjustPosition\n\t]);\n\t/**\n\t* Merge scroll-derived Y with the any animations the element might be running.\n\t*/\n\tconst { scrollY } = useScroll();\n\tconst parallaxY = useTransform(scrollY, transform);\n\tconst visibility = useMotionValue(adjustPosition && originalPosition.current === null ? \"hidden\" : visibilityStyle);\n\tconst defaultValue = useMotionValue(0);\n\tconst observers = useContext(SharedIntersectionObserverContext);\n\t/**\n\t* Get the element that is having the parallax applied's offset from\n\t* the top of the viewport when it mounts. We use this to do\n\t* calculations later.\n\t*\n\t* @FIXME: This breaks if the element changes layout unrelated to\n\t* the parallax transform, for example when switching breakpoints.\n\t*/\n\tuseRefEffect(ref, (element) => {\n\t\tif (element === null || !parallaxTransformEnabled) return;\n\t\tconst unobserve = observeElement(observers, \"undefined\", element, null, (entry) => {\n\t\t\toriginalPosition.current = entry.boundingClientRect.top;\n\t\t\tframe.update(() => {\n\t\t\t\tparallaxY.set(transform(scrollY.get()));\n\t\t\t\tif (adjustPosition) visibility.set(visibilityStyle ?? \"initial\");\n\t\t\t});\n\t\t\tunobserve();\n\t\t});\n\t\treturn unobserve;\n\t}, [adjustPosition, parallaxTransformEnabled]);\n\tuseOnRouteChange(() => {\n\t\tif (!parallaxTransformEnabled) return;\n\t\tparallaxY.set(0);\n\t});\n\treturn {\n\t\tvalues: { y: shouldReduceMotion || !parallaxTransformEnabled ? defaultValue : parallaxY },\n\t\tstyle: parallaxTransformEnabled ? {\n\t\t\t...effectEnabledStyle,\n\t\t\tvisibility\n\t\t} : effectDisabledStyle\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/usePresenceAnimation.ts\nfunction isTargetAndTransition(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction getTransition(value) {\n\tif (!isTargetAndTransition(value)) return void 0;\n\treturn value?.transition;\n}\nfunction runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId, instant) {\n\tconst transition = getTransition(target);\n\treturn Promise.all(effectValuesKeys.map((key) => {\n\t\treturn new Promise((resolve) => {\n\t\t\tif (shouldReduceMotion && key !== \"opacity\") return resolve();\n\t\t\tconst motionValue = effect.values[key];\n\t\t\tmotionValue.stop();\n\t\t\tlet value = !isTargetAndTransition(target) ? defaultFXValues[key] : target?.[key] ?? defaultFXValues[key];\n\t\t\tif (isMotionValue$1(value)) value = value.get();\n\t\t\tif (!isNumber(value)) return resolve();\n\t\t\tconst visualElement = visualElementStore.get(ref.current);\n\t\t\tif (visualElement) visualElement.setBaseTarget(key, value);\n\t\t\tlet startTime;\n\t\t\tif (isString(appearId) && !motionValue?.hasAnimated && safeWindow.MotionHandoffAnimation) {\n\t\t\t\tconst handoffAnimationStartTime = safeWindow.MotionHandoffAnimation(appearId, key, frame);\n\t\t\t\tif (handoffAnimationStartTime) startTime = handoffAnimationStartTime;\n\t\t\t} else if (isString(appearId)) safeWindow.MotionCancelOptimisedAnimation?.(appearId, key, frame);\n\t\t\tif (instant) motionValue.set(value);\n\t\t\telse animate$1(motionValue, value, {\n\t\t\t\t...transition,\n\t\t\t\tvelocity: 0,\n\t\t\t\tstartTime,\n\t\t\t\tonComplete: () => resolve()\n\t\t\t});\n\t\t});\n\t}));\n}\n/**\n* Extract prefixed keys. These will only be present if the ground node of a\n* Smart Component has an appear effect. This is necessary so we don't conflict\n* with props that control the active variant.\n*/\nconst presenceOptionsKeys = /* @__PURE__ */ new Set([\n\t\"presenceInitial\",\n\t\"presenceAnimate\",\n\t\"presenceExit\"\n]);\nfunction usePresenceAnimation({ initial: motionInitial, animate: motionAnimate, exit: motionExit, presenceInitial, presenceAnimate, presenceExit }, ref, enabled, style, appearId) {\n\tconst initial = presenceInitial ?? motionInitial;\n\tconst animateConfig = presenceAnimate ?? motionAnimate;\n\tconst exit = presenceExit ?? motionExit;\n\tconst [isPresent, safeToRemove] = usePresence();\n\tconst internalState = useRef({\n\t\tlastPresence: false,\n\t\tlastAnimate: animateConfig,\n\t\thasMounted: false,\n\t\trunning: false\n\t});\n\tconst effect = useConstant(() => {\n\t\tconst base = initial ?? style;\n\t\tif (!isObject$1(base)) return { values: makeFXValues() };\n\t\tconst defaults = {};\n\t\tfor (const key in base) {\n\t\t\tconst value = isObject$1(base) ? base[key] : void 0;\n\t\t\tif (!isNumber(value)) continue;\n\t\t\tdefaults[key] = value;\n\t\t}\n\t\treturn { values: makeFXValues(defaults) };\n\t});\n\tuseRefEffect(ref, (element) => {\n\t\tconst { hasMounted } = internalState.current;\n\t\tif (hasMounted && animateConfig) return;\n\t\tconst visualElement = visualElementStore.get(element);\n\t\tif (!visualElement) return;\n\t\tObject.assign(internalState.current, { hasMounted: true });\n\t\tfor (const key in effect.values) {\n\t\t\tif (!isFXValuesKey(key)) continue;\n\t\t\tconst value = style?.[key];\n\t\t\tvisualElement.setBaseTarget(key, isNumber(value) ? value : defaultFXValues[key]);\n\t\t}\n\t}, [animateConfig]);\n\tconst shouldReduceMotion = useReducedMotionConfig();\n\tuseRefEffect(ref, (element) => {\n\t\tif (!enabled) {\n\t\t\tsafeToRemove?.();\n\t\t\treturn;\n\t\t}\n\t\tif (element === null) return;\n\t\tif (isPresent !== internalState.current.lastPresence) {\n\t\t\tObject.assign(internalState.current, { lastPresence: isPresent });\n\t\t\tif (isPresent) {\n\t\t\t\tif (initial && animateConfig) {\n\t\t\t\t\tObject.assign(internalState.current, { running: true });\n\t\t\t\t\trunEffectAnimation(animateConfig, effect, shouldReduceMotion, ref, appearId).then(() => Object.assign(internalState.current, { running: false }));\n\t\t\t\t}\n\t\t\t} else if (exit) {\n\t\t\t\tObject.assign(internalState.current, { running: true });\n\t\t\t\trunEffectAnimation(exit, effect, shouldReduceMotion, ref, appearId).then(() => Object.assign(internalState.current, { running: false })).then(() => safeToRemove());\n\t\t\t} else safeToRemove();\n\t\t\treturn;\n\t\t}\n\t\tconst { lastAnimate, running } = internalState.current;\n\t\tif (!!isEqual(animateConfig, lastAnimate) || !animateConfig) return;\n\t\tObject.assign(internalState.current, { lastAnimate: animateConfig });\n\t\trunEffectAnimation(animateConfig, effect, shouldReduceMotion, ref, appearId, !running).then(() => Object.assign(internalState.current, { running: false }));\n\t});\n\tconst effectEnabled = enabled && animateConfig;\n\treturn useMemo(() => {\n\t\treturn {\n\t\t\tvalues: effect.values,\n\t\t\tstyle: effectEnabled ? effectEnabledStyle : effectDisabledStyle\n\t\t};\n\t}, [effectEnabled]);\n}\n\n//#endregion\n//#region ../../library/src/modules/calculateOffsetTop.ts\n/**\n* OffsetTop must be calculated by looping. See motionone:\n* https://github.com/motiondivision/motionone/blob/main/packages/dom/src/gestures/scroll/offsets/inset.ts\n*/\nfunction calcOffsetTop(element, container) {\n\tlet top = 0;\n\tlet current = element;\n\twhile (current && current !== container) {\n\t\tif (!(current instanceof HTMLElement)) break;\n\t\ttop += current.offsetTop;\n\t\tcurrent = current.offsetParent;\n\t}\n\treturn top;\n}\n\n//#endregion\n//#region ../../library/src/modules/createTransformInputRange.ts\n/**\n* When scrolling directly to an element with element.scrollIntoView(), the\n* scroll progress will be exactly 0, but users expect that to trigger the\n* animation. We add -1 offset to ensure that the progress is guaranteed to be >\n* 0 if scrolled to with this API.\n*/\nconst scrollObserverOffset = 1;\nfunction createTransformInputRange(transformTargets, threshold = 0, callback) {\n\tconst starts = [];\n\tconst inputRange = [];\n\tfor (let index = transformTargets.length; index >= 0; index--) {\n\t\tconst { ref: targetRef, offset } = transformTargets[index] ?? {};\n\t\tif (!targetRef?.current) continue;\n\t\tconst top = calcOffsetTop(targetRef.current, document.documentElement) - scrollObserverOffset - (offset ?? 0) - threshold;\n\t\tconst height = targetRef.current?.clientHeight ?? 0;\n\t\tconst previousTop = starts[starts.length - 1];\n\t\tconst end = Math.max(top + height, 0);\n\t\tstarts.push(top);\n\t\tinputRange.unshift(Math.max(top, 0), previousTop === void 0 ? end : Math.min(end, Math.max(previousTop - 1, 0)));\n\t\tcallback?.(index);\n\t}\n\treturn inputRange;\n}\n\n//#endregion\n//#region ../../library/src/modules/useScrollDirectionChange.ts\nfunction currentScrollDirection(offset, lastOffset = 0) {\n\tif (offset < lastOffset) return \"up\";\n\treturn \"down\";\n}\nconst scrollDirectionThreshold = 4;\nfunction useScrollDirectionChange(scrollDirection, cb, options = {}) {\n\tconst { direction, target } = scrollDirection ?? {};\n\tconst { repeat = true, enabled = true } = options;\n\tconst currentRouteKey = useCurrentRouteKey();\n\tReact.useEffect(() => {\n\t\tif (!direction || !enabled) return;\n\t\tlet lastOffset = void 0;\n\t\tlet directionChangeOffset = 0;\n\t\tlet lastDirection = void 0;\n\t\tlet currentTarget = void 0;\n\t\treturn scroll((_, { y: scrollY }) => {\n\t\t\tif (!repeat && currentTarget === target) return;\n\t\t\tif (scrollY.current > scrollY.scrollLength) return;\n\t\t\tif (scrollY.current < 0) return;\n\t\t\tconst d = currentScrollDirection(scrollY.current, lastOffset);\n\t\t\tlastOffset = scrollY.current;\n\t\t\tconst hasDirectionChanged = d !== lastDirection;\n\t\t\tlastDirection = d;\n\t\t\tif (hasDirectionChanged) directionChangeOffset = scrollY.current;\n\t\t\telse {\n\t\t\t\tif (Math.abs(scrollY.current - directionChangeOffset) < scrollDirectionThreshold) return;\n\t\t\t\tconst nextTarget = d === direction ? target : void 0;\n\t\t\t\tif (nextTarget !== currentTarget) cb(nextTarget);\n\t\t\t\tcurrentTarget = nextTarget;\n\t\t\t}\n\t\t});\n\t}, [\n\t\tcurrentRouteKey,\n\t\tdirection,\n\t\trepeat,\n\t\ttarget,\n\t\tenabled,\n\t\tcb\n\t]);\n}\n\n//#endregion\n//#region ../../library/src/modules/useStyleAppearEffect.ts\nconst styleAppearOptionsKeys = /* @__PURE__ */ new Set([\n\t\"threshold\",\n\t\"animateOnce\",\n\t\"opacity\",\n\t\"targetOpacity\",\n\t\"x\",\n\t\"y\",\n\t\"scale\",\n\t\"transition\",\n\t\"rotate\",\n\t\"rotateX\",\n\t\"rotateY\",\n\t\"perspective\",\n\t\"enter\",\n\t\"exit\",\n\t\"animate\",\n\t\"styleAppearEffectEnabled\",\n\t\"targets\",\n\t\"scrollDirection\"\n]);\nconst defaultOutputRange = [\"animate\", \"animate\"];\nconst defaultRanges$2 = {\n\tinputRange: [],\n\toutputRange: []\n};\nfunction createInputOutputRange(targets, threshold, hasExit) {\n\tconst inputRange = createTransformInputRange(targets, threshold);\n\tconst outputRange = [...defaultOutputRange];\n\tconst firstRange = inputRange[0];\n\tif (!isNumber(firstRange)) return defaultRanges$2;\n\tif (firstRange > 1) {\n\t\tinputRange.unshift(0, firstRange - 1);\n\t\toutputRange.unshift(\"initial\", \"initial\");\n\t}\n\tif (hasExit) {\n\t\tconst last = inputRange[inputRange.length - 1];\n\t\tif (!isNumber(last)) return defaultRanges$2;\n\t\tinputRange.push(last + 1);\n\t\toutputRange.push(\"exit\");\n\t}\n\treturn {\n\t\tinputRange,\n\t\toutputRange\n\t};\n}\nfunction makeStyle(defaults) {\n\treturn {\n\t\tx: defaults?.x ?? defaultFXValues.x,\n\t\ty: defaults?.y ?? defaultFXValues.y,\n\t\tscale: defaults?.scale ?? defaultFXValues.scale,\n\t\topacity: defaults?.opacity ?? defaultFXValues.opacity,\n\t\ttransformPerspective: defaults?.transformPerspective ?? defaultFXValues.transformPerspective,\n\t\trotate: defaults?.rotate ?? defaultFXValues.rotate,\n\t\trotateX: defaults?.rotateX ?? defaultFXValues.rotateX,\n\t\trotateY: defaults?.rotateY ?? defaultFXValues.rotateY,\n\t\tskewX: defaults?.skewX ?? defaultFXValues.skewX,\n\t\tskewY: defaults?.skewY ?? defaultFXValues.skewY,\n\t\ttransition: defaults?.transition ?? void 0\n\t};\n}\nfunction useAnimationVariants({ opacity, targetOpacity, perspective: transformPerspective, enter, exit, animate: animateVariant, ...defaultStyles }) {\n\treturn React.useMemo(() => ({\n\t\tinitial: enter ?? makeStyle({\n\t\t\t...defaultStyles,\n\t\t\topacity: opacity ?? targetOpacity ?? 1,\n\t\t\ttransformPerspective\n\t\t}),\n\t\tanimate: animateVariant ?? makeStyle({ opacity: targetOpacity }),\n\t\texit: exit ?? makeStyle()\n\t}), [\n\t\tanimateVariant,\n\t\tdefaultStyles,\n\t\tenter,\n\t\texit,\n\t\topacity,\n\t\ttargetOpacity,\n\t\ttransformPerspective\n\t]);\n}\nfunction useStyleAppearEffect(options, ref) {\n\tconst shouldReduceMotion = useReducedMotionConfig();\n\tconst variants = useAnimationVariants(options);\n\tconst enabled = options.styleAppearEffectEnabled;\n\tconst effect = useFXValues(enabled ? variants.initial : variants.animate, enabled);\n\tconst playState = React.useRef({\n\t\tisPlaying: false,\n\t\tscheduledAppearState: void 0,\n\t\tlastAppearState: !options.styleAppearEffectEnabled\n\t});\n\tconst currentRouteKey = useCurrentRouteKey();\n\t/**\n\t* Record the promise of the last animation so we can await it.\n\t*/\n\tconst animation = React.useRef();\n\tconst runAnimation = React.useCallback(async ({ transition, ...target }, fromInitial) => {\n\t\tconst transitionWithFallback = transition ?? variants.animate.transition ?? options.transition;\n\t\tawait animation.current;\n\t\tconst visualElement = visualElementStore.get(ref.current);\n\t\tanimation.current = Promise.all(effectValuesKeys.map((key) => {\n\t\t\tif (fromInitial) effect.values[key].set(variants.initial[key] ?? defaultFXValues[key]);\n\t\t\tconst toValue = target[key] ?? defaultFXValues[key];\n\t\t\t/**\n\t\t\t* Update the base target for this value. The base target is the value that\n\t\t\t* Motion will animate to if a value disappears from all props. For example,\n\t\t\t* if we have `whileHover` set but the value isn't defined in `animate`.\n\t\t\t*\n\t\t\t* This is usually not necessary but this composed MotionValue is opaque to\n\t\t\t* Framer Motion.\n\t\t\t*/\n\t\t\tif (visualElement && typeof toValue !== \"object\") visualElement.setBaseTarget(key, toValue);\n\t\t\treturn new Promise((resolve) => {\n\t\t\t\tif (shouldReduceMotion && key !== \"opacity\") {\n\t\t\t\t\tif (isNumber(toValue)) effect.values[key].set(toValue);\n\t\t\t\t\tresolve();\n\t\t\t\t} else {\n\t\t\t\t\tconst opts = {\n\t\t\t\t\t\trestDelta: key === \"scale\" ? .001 : void 0,\n\t\t\t\t\t\t...transitionWithFallback,\n\t\t\t\t\t\tonComplete: () => resolve()\n\t\t\t\t\t};\n\t\t\t\t\tif (typeof toValue === \"number\") animate$1(effect.values[key], toValue, opts);\n\t\t\t\t}\n\t\t\t});\n\t\t}));\n\t}, []);\n\tconst hasAnimatedOnce = options.animateOnce && playState.current.lastAppearState === true;\n\tconst animateWithIntersectionObserver = !options.targets && options.styleAppearEffectEnabled && !options.scrollDirection && !hasAnimatedOnce;\n\tuseAppearEffect(ref, (appears) => {\n\t\tconst { isPlaying, lastAppearState } = playState.current;\n\t\tif (isPlaying) {\n\t\t\tplayState.current.scheduledAppearState = appears;\n\t\t\treturn;\n\t\t}\n\t\tplayState.current.scheduledAppearState = void 0;\n\t\tplayState.current.lastAppearState = appears;\n\t\tif (lastAppearState === appears) return;\n\t\trunAnimation(appears ? variants.animate : variants.exit, appears);\n\t}, {\n\t\tenabled: animateWithIntersectionObserver,\n\t\tanimateOnce: !!options.animateOnce,\n\t\tthreshold: { y: options.threshold }\n\t});\n\tconst animateWithScrollInfo = options.targets && enabled && !options.scrollDirection;\n\tReact.useEffect(() => {\n\t\tif (!animateWithScrollInfo) return;\n\t\tconst playedState = { initial: true };\n\t\tlet lastVariant = \"initial\";\n\t\treturn scroll((_, { y: scrollY }) => {\n\t\t\tconst { targets } = options;\n\t\t\tif (!targets) return;\n\t\t\tif (!targets[0] || targets[0].ref && !targets[0].ref.current) return;\n\t\t\tconst { inputRange, outputRange } = createInputOutputRange(targets, (options.threshold ?? 0) * scrollY.containerLength, !!options.exit);\n\t\t\tif (inputRange.length === 0 || inputRange.length !== outputRange.length) return;\n\t\t\tconst variant = transform(scrollY.current, inputRange, outputRange);\n\t\t\tif (options.animateOnce && playedState[variant]) return;\n\t\t\tplayedState[variant] = true;\n\t\t\tif (lastVariant === variant) return;\n\t\t\tlastVariant = variant;\n\t\t\tconst variantAnimation = asRecord(variants)[variant];\n\t\t\tif (!variantAnimation) return;\n\t\t\trunAnimation(variantAnimation);\n\t\t});\n\t}, [currentRouteKey, animateWithScrollInfo]);\n\tuseScrollDirectionChange(options.scrollDirection, (target) => void runAnimation(target ?? variants.animate), {\n\t\tenabled,\n\t\trepeat: !options.animateOnce\n\t});\n\tuseOnRouteChange(() => {\n\t\tif (!enabled) return;\n\t\tif (!options.targets && !options.scrollDirection) return;\n\t\tfor (const key of effectValuesKeys) effect.values[key].set(variants.initial?.[key] ?? defaultFXValues[key]);\n\t});\n\treturn useMemo(() => {\n\t\treturn {\n\t\t\tvalues: effect.values,\n\t\t\tstyle: enabled ? effectEnabledStyle : effectDisabledStyle\n\t\t};\n\t}, [enabled]);\n}\n\n//#endregion\n//#region ../../library/src/modules/useStyleTransformEffect.ts\nconst styleTransformOptionsKeys = /* @__PURE__ */ new Set([\n\t\"transformViewportThreshold\",\n\t\"styleTransformEffectEnabled\",\n\t\"transformTargets\",\n\t\"spring\",\n\t\"transformTrigger\"\n]);\nconst defaultValues$1 = (transformTargets, shouldReduceMotion) => {\n\tconst initial = transformTargets?.[0]?.target;\n\treturn shouldReduceMotion ? { opacity: initial?.opacity ?? 1 } : initial;\n};\nconst defaultRanges$1 = () => ({\n\topacity: [],\n\tx: [],\n\ty: [],\n\tscale: [],\n\trotate: [],\n\trotateX: [],\n\trotateY: [],\n\tskewX: [],\n\tskewY: [],\n\ttransformPerspective: []\n});\nfunction useAttachOptionalSpring(values, spring) {\n\tconst springs = React.useRef({});\n\tReact.useEffect(() => {\n\t\tif (spring === void 0) return;\n\t\tfor (const key of objectKeys(values)) {\n\t\t\tconst m = values[key];\n\t\t\tlet latestSetter;\n\t\t\tlet latestValue;\n\t\t\tfunction startAnimation() {\n\t\t\t\tconst active = springs.current[key];\n\t\t\t\tif (active) active.stop();\n\t\t\t\tsprings.current[key] = animateValue({\n\t\t\t\t\tkeyframes: [m.get(), latestValue],\n\t\t\t\t\tvelocity: m.getVelocity(),\n\t\t\t\t\t...spring,\n\t\t\t\t\trestDelta: .001,\n\t\t\t\t\tonUpdate: latestSetter\n\t\t\t\t});\n\t\t\t}\n\t\t\tm.attach((v, set) => {\n\t\t\t\tlatestValue = v;\n\t\t\t\tlatestSetter = set;\n\t\t\t\tframe.postRender(startAnimation);\n\t\t\t\treturn m.get();\n\t\t\t});\n\t\t}\n\t}, [JSON.stringify(spring)]);\n}\nfunction createInputOutputRanges$1(transformTargets, threshold) {\n\tconst effectKeyOutputRange = defaultRanges$1();\n\treturn {\n\t\tinputRange: createTransformInputRange(transformTargets, threshold, (index) => {\n\t\t\tconst previousTarget = transformTargets[index - 1]?.target;\n\t\t\tconst currentTarget = transformTargets[index]?.target;\n\t\t\tfor (const key of effectValuesKeys) effectKeyOutputRange[key]?.unshift(previousTarget?.[key] ?? 0, currentTarget?.[key] ?? 0);\n\t\t}),\n\t\teffectKeyOutputRange\n\t};\n}\nfunction createPageOutputRange(transformTargets) {\n\tconst keyOutputRange = defaultRanges$1();\n\tfor (const { target } of transformTargets) for (const key of effectValuesKeys) keyOutputRange[key]?.push(target[key]);\n\treturn keyOutputRange;\n}\nconst pageInputRange = [0, 1];\nfunction useStyleTransform({ transformTrigger, styleTransformEffectEnabled, transformTargets, spring, transformViewportThreshold = 0 }, ref) {\n\tconst shouldReduceMotion = useReducedMotionConfig();\n\tconst effect = useFXValues(defaultValues$1(transformTargets, shouldReduceMotion), styleTransformEffectEnabled);\n\tconst effectDisabled = !styleTransformEffectEnabled || !transformTargets;\n\tconst triggerOnScroll = transformTrigger === \"onScrollTarget\";\n\tconst currentRouteKey = useCurrentRouteKey();\n\tuseLayoutEffect(() => {\n\t\tif (effectDisabled || !triggerOnScroll) return;\n\t\treturn scroll((_, { y: scrollY }) => {\n\t\t\tif (!transformTargets[0] || transformTargets[0].ref && !transformTargets[0].ref.current) return;\n\t\t\tconst { inputRange: scrollYInputRange, effectKeyOutputRange } = createInputOutputRanges$1(transformTargets, transformViewportThreshold * scrollY.containerLength);\n\t\t\tif (scrollYInputRange.length === 0) return;\n\t\t\tfor (const key of effectValuesKeys) {\n\t\t\t\tif (shouldReduceMotion && key !== \"opacity\") continue;\n\t\t\t\tif (scrollYInputRange.length !== effectKeyOutputRange[key].length) continue;\n\t\t\t\tif (effectKeyOutputRange[key][0] === void 0) continue;\n\t\t\t\teffect.values[key].set(transform(scrollY.current, scrollYInputRange, effectKeyOutputRange[key]));\n\t\t\t}\n\t\t});\n\t}, [\n\t\tshouldReduceMotion,\n\t\ttriggerOnScroll,\n\t\ttransformViewportThreshold,\n\t\ttransformTargets,\n\t\teffectDisabled\n\t]);\n\tuseRefEffect(ref, (element) => {\n\t\tif (effectDisabled || triggerOnScroll || element === null) return;\n\t\tconst outputRange = createPageOutputRange(transformTargets);\n\t\treturn scroll((_, { y: scrollY }) => {\n\t\t\tfor (const key of effectValuesKeys) {\n\t\t\t\tif (shouldReduceMotion && key !== \"opacity\") continue;\n\t\t\t\tif (pageInputRange.length !== outputRange[key].length) continue;\n\t\t\t\tif (outputRange[key][0] === void 0) continue;\n\t\t\t\teffect.values[key].set(transform(scrollY.progress, pageInputRange, outputRange[key]));\n\t\t\t}\n\t\t}, transformTrigger === \"onInView\" ? {\n\t\t\ttarget: element ?? void 0,\n\t\t\toffset: [\"start end\", \"end end\"]\n\t\t} : void 0);\n\t}, [\n\t\tcurrentRouteKey,\n\t\tshouldReduceMotion,\n\t\ttransformTrigger,\n\t\ttriggerOnScroll,\n\t\ttransformTargets,\n\t\teffectDisabled\n\t]);\n\tuseAttachOptionalSpring(effect.values, spring);\n\tuseOnRouteChange(() => {\n\t\tif (effectDisabled) return;\n\t\tconst values = defaultValues$1(transformTargets, shouldReduceMotion);\n\t\tfor (const key of effectValuesKeys) effect.values[key].set(values?.[key] ?? defaultFXValues[key]);\n\t});\n\treturn React.useMemo(() => {\n\t\treturn {\n\t\t\tvalues: effect.values,\n\t\t\tstyle: styleTransformEffectEnabled ? effectEnabledStyle : effectDisabledStyle\n\t\t};\n\t}, [styleTransformEffectEnabled]);\n}\n\n//#endregion\n//#region ../../library/src/modules/withFX.tsx\nconst groups = {\n\tparallax: parallaxOptionsKeys,\n\tstyleAppear: styleAppearOptionsKeys,\n\tstyleTransform: styleTransformOptionsKeys,\n\tloop: loopOptionsKeys,\n\tpresence: presenceOptionsKeys\n};\nconst groupValues = /* @__PURE__ */ objectKeys(groups);\nfunction backwardsCompatibleEnabledCheck(key, secondaryKey, object) {\n\treturn !(key in object) && secondaryKey in object || object[key] === true;\n}\n/**\n* Iterate through an object of React component props, extracting key-values\n* that are prefixed with the framer prefix set in hocOptions.ts. Depending on\n* which effect the prefixed key belongs to, store the values to a group for\n* that effect, and store the non-prefixed key values to an object of props to\n* be forwarded to the wrapped component.\n*\n* This is similar to hocOptions.ts:extractPrefixedProps().\n*/\nfunction extractFXOptions(props) {\n\tconst result = {\n\t\tparallax: {},\n\t\tstyleAppear: {},\n\t\tstyleTransform: {},\n\t\tpresence: {\n\t\t\tanimate: props.animate,\n\t\t\tinitial: props.initial,\n\t\t\texit: props.exit\n\t\t},\n\t\tloop: {},\n\t\tforwardedProps: {},\n\t\ttargetOpacityValue: props.__targetOpacity,\n\t\twithPerspective: props.__perspectiveFX,\n\t\tinSmartComponent: props.__smartComponentFX\n\t};\n\tfor (const key in props) {\n\t\tif (key === \"__targetOpacity\" || key === \"__perspectiveFX\" || key === \"__smartComponentFX\") continue;\n\t\tconst strippedKey = stripPrefixFromPrefixedKey(key);\n\t\tif (strippedKey) {\n\t\t\tfor (const group of groupValues) if (groups[group]?.has(strippedKey)) {\n\t\t\t\tresult[group][strippedKey] = asRecord(props)[key];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else result.forwardedProps[key] = asRecord(props)[key];\n\t}\n\tresult.parallax.parallaxTransformEnabled = backwardsCompatibleEnabledCheck(\"parallaxTransformEnabled\", \"speed\", result.parallax);\n\tresult.styleAppear.styleAppearEffectEnabled = backwardsCompatibleEnabledCheck(\"styleAppearEffectEnabled\", \"animateOnce\", result.styleAppear);\n\treturn result;\n}\nconst add = (values) => values.reduce((sum, value) => sum += value, 0);\nconst multiply = (values) => values.reduce((sum, value) => sum = sum * value, 1);\nconst reactRefObjectKey = \"current\";\nfunction isReactRefObject(value) {\n\treturn isObject$1(value) && reactRefObjectKey in value;\n}\nfunction addMotionValueStyle(style, values) {\n\tif (!style || !isObject$1(style)) return values;\n\tfor (const key in style) {\n\t\tconst value = style[key];\n\t\tif (!isMotionValue$1(value) || !isFXValuesKey(key)) continue;\n\t\tif (!isNumber(value.get())) continue;\n\t\tvalues[key].push(value);\n\t}\n}\nfunction isVariantOrVariantList(value) {\n\treturn isString(value) || Array.isArray(value);\n}\nconst withFX = (Component) => React.forwardRef((props, forwardedRef) => {\n\tconst forwardWithFXFlag = !isMotionComponent(Component);\n\tif (props.__withFX) {\n\t\tconst propsToForward = { ...props };\n\t\tif (!forwardWithFXFlag) Reflect.deleteProperty(propsToForward, \"__withFX\");\n\t\treturn /* @__PURE__ */ jsx(Component, {\n\t\t\t...propsToForward,\n\t\t\tanimate: void 0,\n\t\t\tinitial: void 0,\n\t\t\texit: void 0,\n\t\t\tref: forwardedRef\n\t\t});\n\t}\n\tconst disabledProps = getDisabledFXPropsInStaticRenderer(props);\n\tif (disabledProps) return /* @__PURE__ */ jsx(Component, {\n\t\t...extractFXOptions(props).forwardedProps,\n\t\t...disabledProps,\n\t\tref: forwardedRef\n\t});\n\tconst { parallax = {}, styleAppear = {}, styleTransform = {}, presence = {}, loop = {}, forwardedProps, targetOpacityValue, withPerspective, inSmartComponent = false } = extractFXOptions(props);\n\tconst observerRef = useObserverRef(forwardedRef);\n\tconst presenceStyle = isUndefined(targetOpacityValue) ? props.style : {\n\t\t...props.style,\n\t\topacity: void 0\n\t};\n\tconst { values: presenceEffectValues, style: presenceEffectStyle } = usePresenceAnimation(presence, observerRef, inSmartComponent, presenceStyle, props[optimizedAppearDataAttribute]);\n\tconst { values: parallaxValues, style: parallaxStyle } = useParallax(parallax, observerRef, props.style?.visibility);\n\tconst { values: transformValues, style: scrollStyle } = useStyleTransform(styleTransform, observerRef);\n\tconst { values: appearEffectValues, style: scrollAppearStyle } = useStyleAppearEffect(styleAppear, observerRef);\n\tconst { values: loopValues, style: loopStyle } = useLoop(loop, observerRef);\n\tconst fxValues = React.useMemo(() => {\n\t\tconst layerOpacity = new MotionValue(targetOpacityValue ?? 1);\n\t\treturn {\n\t\t\tscale: [\n\t\t\t\tappearEffectValues.scale,\n\t\t\t\tloopValues.scale,\n\t\t\t\tpresenceEffectValues.scale,\n\t\t\t\ttransformValues.scale\n\t\t\t],\n\t\t\topacity: [\n\t\t\t\tappearEffectValues.opacity,\n\t\t\t\tloopValues.opacity,\n\t\t\t\tpresenceEffectValues.opacity,\n\t\t\t\tlayerOpacity,\n\t\t\t\ttransformValues.opacity\n\t\t\t],\n\t\t\tx: [\n\t\t\t\tappearEffectValues.x,\n\t\t\t\tloopValues.x,\n\t\t\t\tpresenceEffectValues.x,\n\t\t\t\ttransformValues.x\n\t\t\t],\n\t\t\ty: [\n\t\t\t\tappearEffectValues.y,\n\t\t\t\tloopValues.y,\n\t\t\t\tparallaxValues.y,\n\t\t\t\tpresenceEffectValues.y,\n\t\t\t\ttransformValues.y\n\t\t\t],\n\t\t\trotate: [\n\t\t\t\tappearEffectValues.rotate,\n\t\t\t\tloopValues.rotate,\n\t\t\t\tpresenceEffectValues.rotate,\n\t\t\t\ttransformValues.rotate\n\t\t\t],\n\t\t\trotateX: [\n\t\t\t\tappearEffectValues.rotateX,\n\t\t\t\tloopValues.rotateX,\n\t\t\t\tpresenceEffectValues.rotateX,\n\t\t\t\ttransformValues.rotateX\n\t\t\t],\n\t\t\trotateY: [\n\t\t\t\tappearEffectValues.rotateY,\n\t\t\t\tloopValues.rotateY,\n\t\t\t\tpresenceEffectValues.rotateY,\n\t\t\t\ttransformValues.rotateY\n\t\t\t],\n\t\t\tskewX: [\n\t\t\t\tappearEffectValues.skewX,\n\t\t\t\tloopValues.skewX,\n\t\t\t\tpresenceEffectValues.skewX,\n\t\t\t\ttransformValues.skewX\n\t\t\t],\n\t\t\tskewY: [\n\t\t\t\tappearEffectValues.skewY,\n\t\t\t\tloopValues.skewY,\n\t\t\t\tpresenceEffectValues.skewY,\n\t\t\t\ttransformValues.skewY\n\t\t\t],\n\t\t\t/** @deprecated */\n\t\t\ttransformPerspective: [transformValues.transformPerspective, appearEffectValues.transformPerspective]\n\t\t};\n\t}, [\n\t\ttargetOpacityValue,\n\t\ttransformValues,\n\t\tparallaxValues,\n\t\tappearEffectValues,\n\t\tloopValues,\n\t\tpresenceEffectValues\n\t]);\n\taddMotionValueStyle(props.style, fxValues);\n\tconst scale = useTransform(fxValues.scale, multiply);\n\tconst opacity = useTransform(fxValues.opacity, multiply);\n\tconst x = useTransform(fxValues.x, add);\n\tconst y = useTransform(fxValues.y, add);\n\tconst rotate = useTransform(fxValues.rotate, add);\n\tconst rotateX = useTransform(fxValues.rotateX, add);\n\tconst rotateY = useTransform(fxValues.rotateY, add);\n\tconst skewX = useTransform(fxValues.skewX, add);\n\tconst skewY = useTransform(fxValues.skewY, add);\n\t/** @deprecated */\n\tconst transformPerspective = useTransform(fxValues.transformPerspective, add);\n\tconst { drag, dragConstraints } = forwardedProps;\n\tuseRerenderOnResize(drag && isReactRefObject(dragConstraints) ? dragConstraints : void 0);\n\tconst motionValueStyle = {\n\t\topacity,\n\t\tscale,\n\t\tx,\n\t\ty,\n\t\trotate,\n\t\trotateX,\n\t\trotateY,\n\t\tskewX,\n\t\tskewY\n\t};\n\tif (isUndefined(withPerspective)) motionValueStyle.transformPerspective = transformPerspective;\n\tconst animate = isVariantOrVariantList(props.animate) ? props.animate : void 0;\n\tconst initial = isVariantOrVariantList(props.initial) ? props.initial : void 0;\n\tconst exit = isVariantOrVariantList(props.exit) ? props.exit : void 0;\n\tconst motionGestures = inSmartComponent && !presence.presenceInitial ? {\n\t\tinitial,\n\t\tanimate,\n\t\texit\n\t} : {};\n\tconst withFXFlagProps = forwardWithFXFlag ? { __withFX: true } : {};\n\treturn /* @__PURE__ */ jsx(Component, {\n\t\t...forwardedProps,\n\t\t...motionGestures,\n\t\t...withFXFlagProps,\n\t\tstyle: {\n\t\t\t...props.style,\n\t\t\t...parallaxStyle,\n\t\t\t...scrollStyle,\n\t\t\t...loopStyle,\n\t\t\t...motionValueStyle,\n\t\t\t...scrollAppearStyle,\n\t\t\t...presenceEffectStyle\n\t\t},\n\t\tvalues: presenceEffectValues,\n\t\tref: observerRef\n\t});\n});\n\n//#endregion\n//#region ../../library/src/deprecated/deprecatedEffects.ts\n/**\n* @public\n* @deprecated\n*/\nconst withParallaxTransform = withFX;\n/**\n* @public\n* @deprecated\n*/\nconst withStyleAppearEffect = withFX;\n\n//#endregion\n//#region ../../library/src/events/recognizer/MouseEventListener.ts\n/**\n* @internal\n*/\nvar MouseEventListener = class extends Component {\n\t/**\n\t* @internal\n\t*/\n\trender() {\n\t\treturn this.props.children;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tcomponentDidMount() {\n\t\tsafeWindow.addEventListener(\"mousedown\", this.domMouseDown);\n\t\tsafeWindow.addEventListener(\"wheel\", this.domMouseWheel);\n\t}\n\t/**\n\t* @internal\n\t*/\n\tcomponentWillUnmount() {\n\t\tsafeWindow.removeEventListener(\"mousemove\", this.domMouseMove);\n\t\tsafeWindow.removeEventListener(\"mousedown\", this.domMouseDown);\n\t\tsafeWindow.removeEventListener(\"mouseup\", this.domMouseUp);\n\t\tsafeWindow.removeEventListener(\"wheel\", this.domMouseWheel);\n\t}\n\t/**\n\t* @internal\n\t*/\n\tdomMouseDown = (originalEvent) => {\n\t\tsafeWindow.addEventListener(\"mousemove\", this.domMouseMove);\n\t\tsafeWindow.addEventListener(\"mouseup\", this.domMouseUp);\n\t\tconst event = new FramerEvent(originalEvent, this.props.session);\n\t\tthis.props.session.pointerDown(event);\n\t};\n\t/**\n\t* @internal\n\t*/\n\tdomMouseMove = (originalEvent) => {\n\t\tif (!(originalEvent.buttons === void 0 ? originalEvent.which === 1 : originalEvent.buttons === 1)) {\n\t\t\tthis.domMouseUp(originalEvent);\n\t\t\treturn;\n\t\t}\n\t\tconst event = new FramerEvent(originalEvent, this.props.session);\n\t\tthis.props.session.pointerMove(event);\n\t};\n\t/**\n\t* @internal\n\t*/\n\tdomMouseUp = (originalEvent) => {\n\t\tsafeWindow.removeEventListener(\"mousemove\", this.domMouseMove);\n\t\tsafeWindow.removeEventListener(\"mouseup\", this.domMouseUp);\n\t\tconst event = new FramerEvent(originalEvent, this.props.session);\n\t\tthis.props.session.pointerUp(event);\n\t};\n\t/**\n\t* @internal\n\t*/\n\tdomMouseWheel = (originalEvent) => {\n\t\tconst event = new FramerEvent(originalEvent, this.props.session);\n\t\tthis.props.session.mouseWheel(event);\n\t};\n};\n\n//#endregion\n//#region ../../library/src/events/recognizer/TouchEventListener.ts\n/**\n* @internal\n*/\nvar TouchEventListener = class extends Component {\n\t/**\n\t* @internal\n\t*/\n\trender() {\n\t\treturn this.props.children;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tcomponentDidMount() {\n\t\tsafeWindow.addEventListener(\"touchstart\", this.domTouchStart);\n\t}\n\t/**\n\t* @internal\n\t*/\n\tcomponentWillUnmount() {\n\t\tsafeWindow.removeEventListener(\"touchstart\", this.domTouchStart);\n\t\tsafeWindow.removeEventListener(\"touchmove\", this.domTouchMove);\n\t\tsafeWindow.removeEventListener(\"touchend\", this.domTouchEnd);\n\t}\n\t/**\n\t* @internal\n\t*/\n\tdomTouchStart = (originalEvent) => {\n\t\tsafeWindow.addEventListener(\"touchmove\", this.domTouchMove);\n\t\tsafeWindow.addEventListener(\"touchend\", this.domTouchEnd);\n\t\tconst event = new FramerEvent(originalEvent, this.props.session);\n\t\tthis.props.session.pointerDown(event);\n\t};\n\t/**\n\t* @internal\n\t*/\n\tdomTouchMove = (originalEvent) => {\n\t\tconst event = new FramerEvent(originalEvent, this.props.session);\n\t\tthis.props.session.pointerMove(event);\n\t};\n\t/**\n\t* @internal\n\t*/\n\tdomTouchEnd = (originalEvent) => {\n\t\tsafeWindow.removeEventListener(\"touchmove\", this.domTouchMove);\n\t\tsafeWindow.removeEventListener(\"touchend\", this.domTouchEnd);\n\t\tconst event = new FramerEvent(originalEvent, this.props.session);\n\t\tthis.props.session.pointerUp(event);\n\t};\n};\n\n//#endregion\n//#region ../../library/src/events/FramerEventListener.ts\n/** @internal */\nconst FramerEventListener = /* @__PURE__ */ isTouch() ? TouchEventListener : MouseEventListener;\n\n//#endregion\n//#region ../../library/src/events/recognizer/GestureRecognizer.ts\nfunction stateName(state) {\n\tswitch (state) {\n\t\tcase 2: return \"Possible\";\n\t\tcase 4: return \"Began\";\n\t\tcase 8: return \"Changed\";\n\t\tcase 16: return \"Ended\";\n\t\tcase 32: return \"Failed\";\n\t\tcase 64: return \"Cancelled\";\n\t\tcase 128: return \"Recognized\";\n\t\tdefault: return \"Unknown\";\n\t}\n}\nfunction containsBitmask(value, bitmask) {\n\treturn (value & bitmask) !== 0;\n}\n/**\n* @internal\n*/\nvar GestureRecognizer = class {\n\t_state = 2;\n\tget state() {\n\t\treturn this._state;\n\t}\n\tsetState(state) {\n\t\tthis._state = state;\n\t}\n\thandler = null;\n\tpreventers = [];\n\tget isPrevented() {\n\t\tlet prevented = false;\n\t\tfor (const recognizer of this.preventers) if (recognizer.state & 28) {\n\t\t\tprevented = true;\n\t\t\tbreak;\n\t\t}\n\t\treturn prevented;\n\t}\n\tcanBePreventedBy(recognizer) {\n\t\tthis.preventers.push(recognizer);\n\t}\n\thasState(bitmask) {\n\t\treturn containsBitmask(this.state, bitmask);\n\t}\n\tstateSwitch(newState) {\n\t\tlet allowedStates;\n\t\tswitch (this.state) {\n\t\t\tcase 2:\n\t\t\t\tallowedStates = 164;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tallowedStates = 88;\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tallowedStates = 88;\n\t\t\t\tbreak;\n\t\t\tcase 128:\n\t\t\tcase 16:\n\t\t\tcase 64:\n\t\t\tcase 32:\n\t\t\t\tallowedStates = 2;\n\t\t\t\tbreak;\n\t\t\tdefault: allowedStates = 0;\n\t\t}\n\t\tif (!containsBitmask(newState, allowedStates)) {\n\t\t\tconsole.warn(`Unallowed state change from ${stateName(this.state)} to ${stateName(newState)}`);\n\t\t\treturn;\n\t\t}\n\t\tthis.setState(newState);\n\t}\n\tcancel() {\n\t\tif (this.hasState(12)) this.setState(64);\n\t\tthis.reset();\n\t}\n\treset() {\n\t\tif (!this.hasState(2)) this.stateSwitch(2);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/events/recognizer/MouseWheelGestureRecognizer.ts\n/**\n* @internal\n*/\nvar MouseWheelGestureRecognizer = class extends GestureRecognizer {\n\tstartEvent = null;\n\teventType = \"mousewheel\";\n\tpointerSessionBegan(session, event) {}\n\tpointerSessionMoved(session, event) {}\n\tpointerSessionEnded(session, event) {}\n\tmouseWheel(session, event) {\n\t\tif (!this.handler) return;\n\t\tif (this.hasState(2)) {\n\t\t\tthis.startEvent = event;\n\t\t\tthis.stateSwitch(4);\n\t\t\tthis.handler.gestureBegan(this.eventType, event, this.startEvent.target);\n\t\t\treturn;\n\t\t}\n\t\tif (this.hasState(4 | 8) && this.startEvent) {\n\t\t\tthis.stateSwitch(8);\n\t\t\tthis.handler.gestureChanged(this.eventType, event, this.startEvent.target);\n\t\t}\n\t\tthis.onMouseWheelEnd(event);\n\t}\n\tonMouseWheelEnd = debounce((event) => {\n\t\tif (this.handler && this.startEvent) {\n\t\t\tthis.stateSwitch(16);\n\t\t\tthis.handler.gestureEnded(this.eventType, event, this.startEvent.target);\n\t\t\tthis.startEvent = null;\n\t\t\tthis.reset();\n\t\t}\n\t}, 300);\n};\n\n//#endregion\n//#region ../../library/src/events/recognizer/PanGestureRecognizer.ts\n/**\n* @internal\n*/\nvar PanGestureRecognizer = class extends GestureRecognizer {\n\tstartEvent = null;\n\teventType = \"pan\";\n\tpointerSessionBegan(session, event) {\n\t\tthis.recognize(session, event);\n\t}\n\tpointerSessionMoved(session, event) {\n\t\tthis.recognize(session, event);\n\t}\n\tpointerSessionEnded(session, event) {\n\t\tthis.panend(event);\n\t}\n\trecognize(session, event) {\n\t\tif (Math.abs(event.delta.x) > 0 || Math.abs(event.delta.y) > 0) {\n\t\t\tif (this.startEvent) this.pan(event);\n\t\t\telse this.panstart(event);\n\t\t}\n\t}\n\treset() {\n\t\tthis.startEvent = null;\n\t\tsuper.reset();\n\t}\n\tpanstart(event) {\n\t\tif (!this.hasState(2) || event.isLeftMouseClick !== void 0 && !event.isLeftMouseClick) return;\n\t\tthis.stateSwitch(4);\n\t\tthis.startEvent = event;\n\t\tif (this.handler && this.startEvent.target) this.handler.gestureBegan(this.eventType, event, this.startEvent.target);\n\t}\n\tpan(event) {\n\t\tif (!this.hasState(4 | 8)) return;\n\t\tif (!this.startEvent) return;\n\t\tthis.stateSwitch(8);\n\t\tif (this.handler && this.startEvent.target) this.handler.gestureChanged(this.eventType, event, this.startEvent.target);\n\t}\n\tpanend(event) {\n\t\tif (!this.hasState(4 | 8)) return;\n\t\tif (!this.startEvent) return;\n\t\tthis.stateSwitch(16);\n\t\tif (this.handler && this.startEvent.target) this.handler.gestureEnded(this.eventType, event, this.startEvent.target);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/events/recognizer/TapGestureRecognizer.ts\n/**\n* @internal\n*/\nvar TapGestureRecognizer = class extends GestureRecognizer {\n\teventType = \"tap\";\n\tpointerSessionBegan(session, event) {\n\t\tif (this.handler && (event.isLeftMouseClick === void 0 || event.isLeftMouseClick)) this.handler.gestureBegan(this.eventType, event, null);\n\t}\n\tpointerSessionMoved(session, event) {}\n\tpointerSessionEnded(session, event) {\n\t\tif (this.isPrevented) this.stateSwitch(32);\n\t\telse if (!session.startEvent || session.startEvent.target === event.target) {\n\t\t\tthis.stateSwitch(128);\n\t\t\tif (this.handler) this.handler.gestureChanged(this.eventType, event, null);\n\t\t} else this.stateSwitch(32);\n\t\tif (this.handler) this.handler.gestureEnded(this.eventType, event, null);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/events/FramerEventSession.ts\n/**\n* @internal\n*/\nvar FramerEventSession = class {\n\tevents = [];\n\trecognizers = [];\n\tmouseWheelRecognizer = new MouseWheelGestureRecognizer();\n\tdispatcher;\n\t/**\n\t* @internal\n\t*/\n\toriginElement;\n\tget isStarted() {\n\t\treturn this.events.length !== 0;\n\t}\n\tget startEvent() {\n\t\treturn this.isStarted ? this.events[0] : void 0;\n\t}\n\tget lastEvent() {\n\t\treturn this.events[this.events.length - 1];\n\t}\n\tconstructor(dispatcher, customOrigin) {\n\t\tthis.dispatcher = dispatcher;\n\t\tif (customOrigin) this.originElement = customOrigin;\n\t\telse this.originElement = document.body;\n\t\tconst pan = new PanGestureRecognizer();\n\t\tconst tap = new TapGestureRecognizer();\n\t\tpan.handler = this;\n\t\ttap.handler = this;\n\t\tthis.mouseWheelRecognizer.handler = this;\n\t\tthis.recognizers = [tap, pan];\n\t}\n\tprocessEvent(event) {\n\t\tthis.events.push(event);\n\t\treturn event;\n\t}\n\tpointerDown(event) {\n\t\tif (this.isStarted) return;\n\t\tthis.processEvent(event);\n\t\tthis.recognizers.map((r) => {\n\t\t\tr.cancel();\n\t\t\tr.pointerSessionBegan(this, event);\n\t\t});\n\t}\n\tpointerMove(event) {\n\t\tif (!this.isStarted) return;\n\t\tthis.processEvent(event);\n\t\tthis.recognizers.map((r) => {\n\t\t\tr.pointerSessionMoved(this, event);\n\t\t});\n\t}\n\tpointerUp(event) {\n\t\tif (!this.isStarted) return;\n\t\tthis.processEvent(event);\n\t\tthis.recognizers.map((r) => {\n\t\t\tr.pointerSessionEnded(this, event);\n\t\t});\n\t\tthis.clearEvents();\n\t\tthis.recognizers.map((r) => {\n\t\t\tr.reset();\n\t\t});\n\t}\n\tmouseWheel(event) {\n\t\tthis.processEvent(event);\n\t\tthis.mouseWheelRecognizer.mouseWheel(this, event);\n\t\tthis.clearEvents();\n\t}\n\tclearEvents() {\n\t\tthis.events = [];\n\t}\n\tdispatch(type, event, target = null) {\n\t\tconst dispatchTarget = target || this.startEvent?.target || event.target;\n\t\tif (dispatchTarget) this.dispatcher(type, event, dispatchTarget);\n\t}\n\tgestureBegan(type, event, target) {\n\t\tthis.dispatch(`${type}start`, event, target);\n\t}\n\tgestureChanged(type, event, target) {\n\t\tthis.dispatch(type, event, target);\n\t}\n\tgestureEnded(type, event, target) {\n\t\tthis.dispatch(`${type}end`, event, target);\n\t}\n\t/**\n\t* Average velocity over last n seconds in pixels per second.\n\t* @param n - number of events to use for calculation\n\t*/\n\tvelocity(t = Loop.TimeStep * 2) {\n\t\tif (!this.isStarted || this.events.length < 2) return {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t\tconst events = this.events;\n\t\tlet i = events.length - 1;\n\t\tlet event = null;\n\t\twhile (i >= 0) {\n\t\t\tevent = events[i] ?? null;\n\t\t\tif (!event || MainLoop.time - event.loopTime > t) break;\n\t\t\ti--;\n\t\t}\n\t\tif (!event) return {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t\tconst current = events[events.length - 1];\n\t\tif (!current) return {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t\tconst time = (MainLoop.time - event.loopTime) * 1e3;\n\t\tif (time === 0) return {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t\tconst velocity = {\n\t\t\tx: (current.devicePoint.x - event.devicePoint.x) / time,\n\t\t\ty: (current.devicePoint.y - event.devicePoint.y) / time\n\t\t};\n\t\tif (velocity.x === Infinity) velocity.x = 0;\n\t\tif (velocity.y === Infinity) velocity.y = 0;\n\t\treturn velocity;\n\t}\n\toffset(event) {\n\t\tif (!this.startEvent) return {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t\tconst subtract = (pointA, pointB) => {\n\t\t\treturn {\n\t\t\t\tx: pointA.x - pointB.x,\n\t\t\t\ty: pointA.y - pointB.y\n\t\t\t};\n\t\t};\n\t\treturn subtract(event.devicePoint, this.startEvent.devicePoint);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/ComponentPresetsContext.tsx\n/**\n* This context is used to pass down component presets from the RichTextNode to\n* the component embeds in rich text in the CMS.\n*/\nconst Context = /* @__PURE__ */ createContext({});\nfunction ComponentPresetsProvider({ presets, children }) {\n\tconst lastPresets = useRef(presets);\n\tif (!isEqual(presets, lastPresets.current, false)) lastPresets.current = presets;\n\treturn /* @__PURE__ */ jsx(Context.Provider, {\n\t\tvalue: lastPresets.current,\n\t\tchildren\n\t});\n}\nfunction ComponentPresetsConsumer({ componentIdentifier, children }) {\n\treturn children(useContext(Context)[componentIdentifier] ?? {});\n}\n\n//#endregion\n//#region ../../library/src/modules/ComponentViewportContext.tsx\nconst ComponentViewportContext = /* @__PURE__ */ React.createContext({});\nfunction useComponentViewport() {\n\treturn React.useContext(ComponentViewportContext);\n}\n/**\n* This context wraps all instances of smart components. It exposes the smart\n* component’s dimensions so that the component can learn them during run time.\n* Unless the component doesn’t declare that it supports this mechanism (via the\n* `@framerComponentViewportWidth` annotation) – in which case the dimensions\n* are set to `undefined`.\n* https://github.com/framer/FramerStudio/pull/16570#discussion_r1484244932\n*/\nconst ComponentViewportProvider = /* @__PURE__ */ React.forwardRef(function ComponentViewportProvider({ width, height, y, children, ...rest }, ref) {\n\tconst componentViewport = React.useMemo(() => {\n\t\treturn {\n\t\t\twidth,\n\t\t\theight,\n\t\t\ty\n\t\t};\n\t}, [\n\t\twidth,\n\t\theight,\n\t\ty\n\t]);\n\tconst cloneWithPropsAndRef = useCloneChildrenWithPropsAndRef(ref);\n\treturn /* @__PURE__ */ jsx(ComponentViewportContext.Provider, {\n\t\tvalue: componentViewport,\n\t\tchildren: cloneWithPropsAndRef(children, rest)\n\t});\n});\n\n//#endregion\n//#region ../../library/src/render/utils/withGeneratedLayoutId.tsx\n/**\n* Higher Order Component to provide a generated layoutId to the wrapped\n* component in the Framer preview, but preserving any user-specified layoutId\n* prop.\n*\n* @internal\n*/\nconst withGeneratedLayoutId = (Component) => React.forwardRef((props, ref) => {\n\tconst layoutIdProps = useLayoutIdProps(props);\n\treturn /* @__PURE__ */ jsx(Component, {\n\t\t...layoutIdProps,\n\t\tref\n\t});\n});\nfunction useLayoutIdProps(props) {\n\tconst layoutId = useLayoutId(props);\n\tconst { layoutIdKey: _layoutIdKey, duplicatedFrom: _duplicatedFrom, ...rest } = props;\n\treturn {\n\t\tlayoutId,\n\t\t...rest\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/libraryFeatures.ts\nlet libraryFeatures = {};\nconst getLibraryFeatures = () => {\n\treturn libraryFeatures;\n};\nconst setLibraryFeatures = (features) => {\n\tlibraryFeatures = features;\n};\n\n//#endregion\n//#region ../../library/src/router/error-boundary/SynchronousSuspenseErrorBoundary.tsx\nlet shouldSuspenseBoundariesBeActive = false;\n/**\n* This is an error boundary that catches React error #426 (https://react.dev/errors/426) –\n* “A component suspended while responding to synchronous input” – and prevents it from crashing the\n* app when there are no active¹ Suspense boundaries around the component that suspended.\n*\n* It does that by activating¹ all SuspenseThatPreservesDOM boundaries. Critically, this relies on\n* an implicit assumption that there is at least one SuspenseThatPreservesDOM boundary around the\n* suspended component. This is true as of Mar 2025 (we have a bunch of granular\n* SuspenseThatPreserveDOM boundaries around the tree, and also a top-level catch-all\n* SuspenseThatPreserveDOM boundary in Router), but this might change.\n* - We don’t have any hard logic or tests that enforces this assumption, but we do have a helpful\n*   log (in componentDidCatch) that hints what happened if the app still crashes despite activating\n*   all SuspenseThatPreservesDOM boundaries.\n* - If this assumption does ever change, and #426 starts causing crashes, the easy workaround is to\n*   wrap `return this.props.children` in a regular <Suspense> boundary.\n*\n* For more details about what this is and why it exists, see\n* https://www.notion.so/framer/SuspenseThatPreservesDOM-1b0adf6e8c968089ae0dc158fc514e6b?pvs=4\n*\n* ¹ — “Active” and “inactive” are concrete terms; see\n* https://www.notion.so/framer/SuspenseThatPreservesDOM-1b0adf6e8c968089ae0dc158fc514e6b?pvs=4\n*/\nvar SynchronousSuspenseErrorBoundary = class extends Component {\n\tstate = { error: void 0 };\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { error };\n\t}\n\tcomponentDidCatch(error, errorInfo) {\n\t\tif (!isSuspense426Error(error)) return;\n\t\tconst componentStack = errorInfo?.componentStack;\n\t\tconsole.error(\"Caught an error in SynchronousSuspenseErrorBoundary:\\n\\n\", error, \"\\n\\nComponent stack:\\n\", componentStack, \"\\n\\nThis error indicates a state update wasn’t wrapped with `startTransition`. Some of the UI might flash as a result. \" + getPleaseReportMessage(\"If you are the author of this website, update external components and check recently added custom code or code overrides.\"));\n\t\tconst stack = error instanceof Error && typeof error.stack === \"string\" ? error.stack : void 0;\n\t\tsendTrackingEvent(\"published_site_load_recoverable_error\", {\n\t\t\tmessage: String(error),\n\t\t\tstack,\n\t\t\tcomponentStack: stack ? void 0 : componentStack\n\t\t});\n\t}\n\trender() {\n\t\tconst error = this.state.error;\n\t\tif (error === void 0) return this.props.children;\n\t\tif (!isSuspense426Error(error)) throw error;\n\t\tshouldSuspenseBoundariesBeActive = true;\n\t\treturn this.props.children;\n\t}\n};\n/**\n* This function detects when React throws https://react.dev/errors/426:\n*\n* > A component suspended while responding to synchronous input. This will cause the UI to be\n* > replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.\n*\n* This error is thrown when a setState update that’s not wrapped in a startTransition causes some component\n* to suspend, *and* there are no active <Suspense> boundaries around that component to render a fallback.\n* Unless caught by an error boundary, it’s a non-recoverable crash.\n*/\nfunction isSuspense426Error(error) {\n\treturn error instanceof Error && (error.message.includes(\"A component suspended while responding to synchronous input.\") || error.message.includes(\"Minified React error #426\"));\n}\n\n//#endregion\n//#region ../../library/src/router/SuspenseThatPreservesDom.tsx\nconst suspendPromise = /* @__PURE__ */ (() => typeof window !== \"undefined\" ? new Promise(() => {}) : null)();\nfunction Suspend() {\n\tif (typeof window === \"undefined\" || shouldSuspenseBoundariesBeActive) return /* @__PURE__ */ jsx(\"div\", {\n\t\thidden: true,\n\t\tdangerouslySetInnerHTML: { __html: \"<!-- SuspenseThatPreservesDOM fallback rendered -->\" }\n\t});\n\tthrow suspendPromise;\n}\nconst suspend = /* @__PURE__ */ jsx(Suspend, {});\nconst DisableSuspenseSuspenseThatPreservesDomContext = /* @__PURE__ */ (() => {\n\tconst context = createContext(false);\n\tcontext.displayName = \"DisableSuspenseSuspenseThatPreservesDomContext\";\n\treturn context;\n})();\n/**\n* This is a Suspense boundary that’s usually inactive but can be toggled active. “Inactive” means\n* that it effectively functions as a no-op component that simply renders its children. This is\n* opposed to regular Suspense boundaries, which are “active” because they render a fallback when\n* something inside them suspends.\n*\n* For why this exists and how we’re using this, see\n* https://www.notion.so/framer/SuspenseThatPreservesDOM-1b0adf6e8c968089ae0dc158fc514e6b?pvs=4\n*/\nfunction SuspenseThatPreservesDom({ children }) {\n\tif (useContext(DisableSuspenseSuspenseThatPreservesDomContext)) return /* @__PURE__ */ jsx(Fragment$1, { children });\n\treturn /* @__PURE__ */ jsx(Suspense, {\n\t\tfallback: suspend,\n\t\tchildren\n\t});\n}\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/NullFallback.tsx\nfunction NullFallback() {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\thidden: true,\n\t\tdangerouslySetInnerHTML: { __html: \"<!-- Code boundary fallback rendered -->\" }\n\t});\n}\n/** This is used as a code boundary fallback, to make it very clear why something hides when we hide it. */\nconst nullFallback = /* @__PURE__ */ jsx(NullFallback, {});\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/collectErrorToAnalytics.tsx\nfunction collectErrorToAnalytics(error, errorInfo) {\n\tif (!isWindow) return;\n\tif (Math.random() > .01) return;\n\tconst stack = error instanceof Error && typeof error.stack === \"string\" ? error.stack : null;\n\tconst componentStack = errorInfo?.componentStack;\n\tsendTrackingEvent(\"published_site_load_recoverable_error\", {\n\t\tmessage: String(error),\n\t\tstack,\n\t\tcomponentStack: stack ? void 0 : componentStack\n\t});\n}\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/logger.ts\nfunction logError(...args) {\n\tconsole.error(...args);\n}\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/shouldEnableCodeBoundaries.ts\nfunction shouldEnableCodeBoundaries() {\n\treturn RenderTarget.current() !== RenderTarget.canvas;\n}\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/CodeComponentBoundary.tsx\n/**\n* A code boundary for code components. Ensures any errors thrown by code components\n* (either during SSR, or during client render) don’t crash the whole page – and, instead,\n* just disable the code component (rendering `fallback` instead).\n*\n* The fallback is normally `null` (= the component is disabled completely), except when\n* the boundary is used by a code override – in which case, the fallback is the component\n* without the override.\n*/\nfunction CodeComponentBoundary({ getErrorMessage, fallback, children }) {\n\tif (!shouldEnableCodeBoundaries()) return children;\n\treturn /* @__PURE__ */ jsx(ServerSideErrorBoundary, {\n\t\tfallback,\n\t\tchildren: /* @__PURE__ */ jsx(ClientSideErrorBoundary, {\n\t\t\tfallback,\n\t\t\tgetErrorMessage,\n\t\t\tchildren\n\t\t})\n\t});\n}\n/**\n* Catches errors thrown by a code component during client rendering – and renders `fallback` (normally null) instead.\n*/\nvar ClientSideErrorBoundary = class extends Component {\n\tstate = { hasError: false };\n\tstatic getDerivedStateFromError() {\n\t\treturn { hasError: true };\n\t}\n\tcomponentDidCatch(error, errorInfo) {\n\t\tlogError(this.props.getErrorMessage(), errorInfo?.componentStack);\n\t\tcollectErrorToAnalytics(error, errorInfo);\n\t}\n\trender() {\n\t\tconst { children, fallback = nullFallback } = this.props;\n\t\tconst { hasError } = this.state;\n\t\treturn hasError ? fallback : children;\n\t}\n};\n/**\n* Catches errors thrown by a code component during server rendering – and renders `fallback` (normally null) instead.\n*\n* This component is separate from `ClientSideErrorBoundary` because, as of React 18, React doesn’t trigger\n* `getDerivedStateFromError`/`componentDidCatch` on the server. Instead, it renders a Suspense fallback\n* and re-tries rendering on the client.\n*/\nfunction ServerSideErrorBoundary({ children, fallback = nullFallback }) {\n\treturn typeof window === \"undefined\" ? /* @__PURE__ */ jsx(Suspense, {\n\t\tfallback,\n\t\tchildren\n\t}) : /* @__PURE__ */ jsx(SuspenseThatPreservesDom, { children });\n}\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/DeprecatedContainerErrorBoundary.tsx\n/**\n* A previous, deprecated version of the code boundary. Replaced by ./CodeComponentBoundary.tsx.\n* For more details, see https://www.notion.so/framer/Code-Boundaries-153adf6e8c96803dbd27ffe5cfd1e874?pvs=4#157adf6e8c9680a593cad4dfc6dd9cec\n* @deprecated\n*/\nvar DeprecatedContainerErrorBoundary = class extends Component {\n\tstate = { hasError: false };\n\tcomponentDidCatch(error, errorInfo) {\n\t\tconst componentStack = errorInfo?.componentStack;\n\t\tconsole.error(\"Error in component (see previous log). This component has been hidden. Please check any custom code or code overrides to fix.\", componentStack);\n\t\tthis.setState({ hasError: true });\n\t\tcollectErrorToAnalytics(error, errorInfo);\n\t}\n\trender() {\n\t\tconst { children } = this.props;\n\t\tconst { hasError } = this.state;\n\t\treturn hasError ? null : children;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/DisabledCodeComponent.tsx\nfunction DisabledCodeComponent() {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\tstyle: {\n\t\t\tpadding: \"12px 16px\",\n\t\t\tborderWidth: 1,\n\t\t\tborderRadius: 6,\n\t\t\tborderStyle: \"solid\",\n\t\t\tborderColor: \"rgba(149, 149, 149, 0.15)\",\n\t\t\tbackgroundColor: \"rgba(149, 149, 149, 0.1)\",\n\t\t\tfontSize: 12,\n\t\t\tcolor: \"#a5a5a5\"\n\t\t},\n\t\tchildren: \"Code component disabled\"\n\t});\n}\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/ExternalComponentContext.tsx\nconst ExternalComponentContext = /* @__PURE__ */ (() => React.createContext(void 0))();\n/**\n* In Framer, a component can be project-local (if it’s defined in the same project it’s used in),\n* or project-external (if it comes from a different project).\n*\n* This hook returns how deeply nested the component is inside project-external components,\n* plus the scope of the nearest external component. For example, if you have:\n*\n* /some-web-page          (defined in projectId: AAA, scopeId: not applicable)\n*   <HeroComponent>       (defined in projectId: AAA, scopeId: /some-web-page)\n*     <DesignSystemHero>  (defined in projectId: BBB [note: external!], scopeId: <HeroComponent>)\n*       <HeroMobile>      (defined in projectId: BBB, scopeId: <DesignSystemHero>)\n*         <Ticker>        (defined in projectId: CCC [note: external!], scopeId: <HeroMobile>)\n*           <TickerSlot>  (defined in projectId: BBB, scopeId: <HeroMobile>)\n*\n* then calling `useNearestExternalComponent()` inside `<TickerSlot>` will return `{ level:2, scopeId: HeroMobile }`.\n*/\nfunction useNearestExternalComponent() {\n\treturn React.useContext(ExternalComponentContext);\n}\n/**\n* Retrieves the top-most external component in the tree.\n*/\nfunction useFurthestExternalComponent() {\n\tconst nearestExternalComponent = useNearestExternalComponent();\n\treturn React.useMemo(() => {\n\t\tif (!nearestExternalComponent) return void 0;\n\t\tlet item = nearestExternalComponent;\n\t\twhile (item.parent && item.parent.level > 0) item = item.parent;\n\t\treturn item;\n\t}, [nearestExternalComponent]);\n}\n/**\n* As of Dec 2024, this component is used to wrap project-external components. Wrapping happens every time\n* an external component is encountered, even if it’s already nested inside other external component.\n*\n* For example, if you have:\n*\n* /page                       (defined in projectId: AAA)\n*   <HeroComponent>           (defined in projectId: AAA)\n*     <DesignSystemHero />    (defined in projectId: BBB)\n*       <HeroMobile />        (defined in projectId: BBB)\n*         <Ticker>            (defined in projectId: CCC)\n*           <TickerSlot />    (defined in projectId: BBB)\n*\n* then <DesignSystemHero> and <Ticker> will each be wrapped in an `IsExternalComponent` boundary, since they’re\n* external to projects they’re used in.\n*/\nfunction IsExternalComponent({ children, scopeId, nodeId }) {\n\tconst parent = useNearestExternalComponent();\n\tconst newValue = React.useMemo(() => ({\n\t\tlevel: (parent?.level ?? 0) + 1,\n\t\tscopeId,\n\t\tnodeId,\n\t\tparent\n\t}), [\n\t\tscopeId,\n\t\tnodeId,\n\t\tparent\n\t]);\n\treturn /* @__PURE__ */ jsx(ExternalComponentContext.Provider, {\n\t\tvalue: newValue,\n\t\tchildren\n\t});\n}\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/errorMessages.ts\nconst CRASH_ERROR_MESSAGE_PREFIX = \"code-crash:\";\nfunction formatCodeCrashLocationFromSourceNode(scopeId, nodeId) {\n\treturn `${CRASH_ERROR_MESSAGE_PREFIX}${scopeId}:${nodeId}`;\n}\nfunction getErrorMessageForComponent(scopeId, nodeId) {\n\treturn getErrorMessageFor(\"component\", scopeId, nodeId);\n}\nfunction getErrorMessageForOverride(scopeId, nodeId) {\n\treturn getErrorMessageFor(\"override\", scopeId, nodeId);\n}\nfunction getErrorMessageFor(element, scopeId, nodeId) {\n\treturn `A code ${element} crashed while rendering due to the error above. To find and fix it, open the project in the editor → open Quick Actions (press Cmd+K or Ctrl+K) → paste this: ${formatCodeCrashLocationFromSourceNode(scopeId, nodeId)} → click “Show Layer”.`;\n}\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/shouldWrapWithBoundary.ts\n/**\n* We want to apply a code boundary around two kinds of component instances:\n* 1) all local instances of local code components\n* 2) all local instances of external components (both code and smart)\n*\n* All other components won’t get a code boundary – and will, therefore, propagate\n* their errors upwards to either 1) or 2).\n*\n* For why we’re treating external components like that, see https://www.notion.so/framer/Code-Boundaries-153adf6e8c96803dbd27ffe5cfd1e874#153adf6e8c9680689438dbe7cf310461\n*/\nfunction shouldWrapComponentWithBoundary(scopeIdOfThisComponent, scopeIdOfNearestExternalComponent, externalComponentLevel, isAuthoredByUser, isExternalComponent, inComponentSlot) {\n\tconst isLocalComponentInstance = isNodeLocalToProject(scopeIdOfThisComponent, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot);\n\treturn isLocalComponentInstance && !isExternalComponent && isAuthoredByUser || isLocalComponentInstance && isExternalComponent;\n}\n/**\n* We want to apply a code boundary only to overrides that wrap project-local frames.\n*\n* All overrides applied inside external components will not get a code boundary –\n* and will, therefore, propagate their errors upwards to the external component.\n*\n* For why we’re treating external components like that, see https://www.notion.so/framer/Code-Boundaries-153adf6e8c96803dbd27ffe5cfd1e874#153adf6e8c9680689438dbe7cf310461\n*/\nfunction shouldWrapOverrideWithBoundary(scopeIdOfNodeWithOverride, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot) {\n\treturn isNodeLocalToProject(scopeIdOfNodeWithOverride, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot);\n}\nfunction isNodeLocalToProject(scopeIdOfThisNode, scopeIdOfNearestExternalComponent, externalComponentLevel, inComponentSlot) {\n\tif (isUndefined(externalComponentLevel)) return true;\n\tif (externalComponentLevel === 1 && inComponentSlot && scopeIdOfThisNode === scopeIdOfNearestExternalComponent) return true;\n\treturn false;\n}\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/maybeWrapComponentWithCodeBoundary.tsx\n/**\n* Wraps passed children (which are presumed to be a smart or code component) with a code boundary, if necessary.\n*/\nfunction useMaybeWrapComponentWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot) {\n\tconst nearestExternalComponent = useNearestExternalComponent();\n\tif (isUndefined(scopeId) || isUndefined(nodeId)) return /* @__PURE__ */ jsx(DeprecatedContainerErrorBoundary, { children });\n\tconst { disableCustomCode } = getLibraryFeatures();\n\tif (disableCustomCode && isAuthoredByUser) return /* @__PURE__ */ jsx(DisabledCodeComponent, {});\n\tif (shouldWrapComponentWithBoundary(scopeId, nearestExternalComponent?.scopeId, nearestExternalComponent?.level, isAuthoredByUser ?? false, isModuleExternal ?? false, inComponentSlot ?? false)) children = /* @__PURE__ */ jsx(CodeComponentBoundary, {\n\t\tgetErrorMessage: getErrorMessageForComponent.bind(null, scopeId, nodeId),\n\t\tfallback: null,\n\t\tchildren\n\t});\n\tif (isModuleExternal) children = /* @__PURE__ */ jsx(IsExternalComponent, {\n\t\tscopeId,\n\t\tnodeId,\n\t\tchildren\n\t});\n\treturn children;\n}\n\n//#endregion\n//#region ../../library/src/modules/Container.tsx\nconst ContainerInner = /* @__PURE__ */ React.forwardRef(function ContainerInner({ children, layoutId, as, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot, rendersWithMotion: _rendersWithMotion, __withFX: _withFX, ...props }, ref) {\n\tconst outerLayoutId = useConstant(() => layoutId ? `${layoutId}-container` : void 0);\n\tconst MotionComponent = htmlElementAsMotionComponent(as);\n\tconst clonedChildren = React.Children.map(children, (child) => {\n\t\treturn React.isValidElement(child) ? React.cloneElement(child, { layoutId: layoutId ?? child.props.layoutId }) : child;\n\t});\n\tconst childrenWithCodeBoundary = useMaybeWrapComponentWithCodeBoundary(clonedChildren, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot);\n\treturn /* @__PURE__ */ jsx(MotionComponent, {\n\t\tlayoutId: outerLayoutId,\n\t\t...props,\n\t\tref,\n\t\tchildren: /* @__PURE__ */ jsx(ComponentContainerContext.Provider, {\n\t\t\tvalue: true,\n\t\t\tchildren: /* @__PURE__ */ jsx(NodeIdContext.Provider, {\n\t\t\t\tvalue: nodeId ?? null,\n\t\t\t\tchildren: /* @__PURE__ */ jsx(AutomaticLayoutIds, {\n\t\t\t\t\tenabled: false,\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(LayoutGroup, {\n\t\t\t\t\t\tid: layoutId ?? \"\",\n\t\t\t\t\t\tinherit: props.layout ? true : \"id\",\n\t\t\t\t\t\tchildren: childrenWithCodeBoundary\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t});\n});\n/**\n* A container for smart & code components.\n* @internal\n*/\nconst Container = /* @__PURE__ */ withGeneratedLayoutId(ContainerInner);\n/**\n* A container for smart & code components that’s used instead of @see Container when the component is inside a smart component.\n* @internal\n*/\nconst SmartComponentScopedContainer = /* @__PURE__ */ React.forwardRef(function SmartComponentScopedContainer(props, ref) {\n\tconst { as, children, scopeId, nodeId, isAuthoredByUser, rendersWithMotion, isModuleExternal, inComponentSlot, ...otherProps } = props;\n\tconst childrenWithCodeBoundary = useMaybeWrapComponentWithCodeBoundary(children, scopeId, nodeId, isAuthoredByUser, isModuleExternal, inComponentSlot);\n\tconst tagName = props.as ?? \"div\";\n\tif (props.rendersWithMotion) {\n\t\tconst Component = htmlElementAsMotionComponent(tagName);\n\t\treturn /* @__PURE__ */ jsx(NodeIdContext.Provider, {\n\t\t\tvalue: nodeId ?? null,\n\t\t\tchildren: /* @__PURE__ */ jsx(Component, {\n\t\t\t\t...otherProps,\n\t\t\t\tref,\n\t\t\t\tstyle: props.style,\n\t\t\t\tchildren: childrenWithCodeBoundary\n\t\t\t})\n\t\t});\n\t} else {\n\t\tconst Component = tagName;\n\t\tconst { layoutId, layoutDependency, ...plainHTMLRenderableProps } = otherProps;\n\t\treturn /* @__PURE__ */ jsx(NodeIdContext.Provider, {\n\t\t\tvalue: nodeId ?? null,\n\t\t\tchildren: /* @__PURE__ */ jsx(Component, {\n\t\t\t\t...plainHTMLRenderableProps,\n\t\t\t\tref,\n\t\t\t\tstyle: props.style,\n\t\t\t\tchildren: childrenWithCodeBoundary\n\t\t\t})\n\t\t});\n\t}\n});\n\n//#endregion\n//#region ../../library/src/modules/CloneableLayoutGroupItem.tsx\nconst CloneableLayoutGroupItem = /* @__PURE__ */ React.forwardRef(function CloneableLayoutGroupItem({ __framerLayoutGroupElement, __framerLayoutGroupId, ...props }, ref) {\n\tif (ref) props.ref = ref;\n\treturn /* @__PURE__ */ jsx(LayoutGroup, {\n\t\tid: __framerLayoutGroupId,\n\t\tchildren: React.cloneElement(__framerLayoutGroupElement, props)\n\t});\n});\n/**\n* Keeps an element cloneable by its consumer while preserving the layout group that scopes its layout IDs.\n* @internal\n*/\nfunction createCloneableLayoutGroupItem(element, key, layoutGroupId) {\n\tif (!React.isValidElement(element)) return element;\n\treturn React.createElement(CloneableLayoutGroupItem, {\n\t\t...element.props,\n\t\t__framerLayoutGroupElement: element,\n\t\t__framerLayoutGroupId: layoutGroupId,\n\t\tkey\n\t});\n}\n\n//#endregion\n//#region ../../library/src/modules/hoverCapability.ts\nlet hasHoverCapability;\nconst subscribers = /* @__PURE__ */ new Set();\nfunction observeHoverCapability() {\n\tif (hasHoverCapability !== void 0 || typeof window === \"undefined\") return;\n\tconst query = safeWindow.matchMedia(\"(any-hover: hover)\");\n\thasHoverCapability = query.matches;\n\tquery.addEventListener(\"change\", function updateHoverCapability(event) {\n\t\tconst next = event.matches;\n\t\tif (next === hasHoverCapability) return;\n\t\thasHoverCapability = next;\n\t\tfor (const notify of subscribers) notify();\n\t});\n}\n/** Read cached hover capability in event handlers, without querying media on the hot path. */\nfunction getHoverCapability() {\n\tobserveHoverCapability();\n\treturn getHoverCapabilitySnapshot();\n}\nfunction getHoverCapabilitySnapshot() {\n\treturn hasHoverCapability ?? false;\n}\nfunction subscribeToHoverCapability(notify) {\n\tsubscribers.add(notify);\n\tobserveHoverCapability();\n\treturn () => {\n\t\tsubscribers.delete(notify);\n\t};\n}\n/** Subscribe to the shared hover capability when it determines rendered content. */\nfunction useHoverCapability(initialValue = false) {\n\tconst [canHover, setCanHover] = useState(initialValue);\n\tuseIsomorphicLayoutEffect$1(function observeRenderedHoverCapability() {\n\t\tfunction updateRenderedCapability(useTransition = true) {\n\t\t\tconst current = getHoverCapabilitySnapshot();\n\t\t\tif (useTransition) startTransition(() => setCanHover(current));\n\t\t\telse setCanHover(current);\n\t\t}\n\t\tconst unsubscribe = subscribeToHoverCapability(updateRenderedCapability);\n\t\tupdateRenderedCapability(false);\n\t\treturn unsubscribe;\n\t}, []);\n\treturn canHover;\n}\n\n//#endregion\n//#region ../../library/src/modules/CustomCursor.tsx\nconst CustomCursorContext = /* @__PURE__ */ createContext({\n\tonRegisterCursors: () => () => {},\n\tregisterCursors: () => {}\n});\nconst replaceCursorClassName = \"framer-cursor-none\";\nconst cursorComponentClassName = \"framer-pointer-events-none\";\nfunction getActiveDefinitions(map, previousDefinitions, newDefinitions) {\n\tconst allCursors = {};\n\tfor (const [, hashes] of map) for (const hash of hashes) {\n\t\tconst value = allCursors[hash] ?? previousDefinitions[hash] ?? newDefinitions[hash];\n\t\tif (value) allCursors[hash] = value;\n\t}\n\treturn allCursors;\n}\n/**\n* Wrap the entire website in a context that provides an event-emitter which\n* facilitates:\n*  1. Web pages to record their cursors to the global list\n*  2. The Custom Cursor implementation to update whenever the list changes.\n*\n* This is slight overkill, as there should only ever be 1\n* <CustomCursorComponent/>, but this architecture ensures that future changes\n* can't accidentally rerender the entire webpage at 60fps, which would be a huge\n* performance hit.\n*/\nconst CustomCursorContextProvider = /* @__PURE__ */ memo$1(function CustomCursorList({ children }) {\n\tconst value = useConstant(() => {\n\t\tconst events = /* @__PURE__ */ new Set();\n\t\tlet allCursors = {};\n\t\tconst byCaller = /* @__PURE__ */ new Map();\n\t\treturn {\n\t\t\tonRegisterCursors: (callback) => {\n\t\t\t\tcallback(allCursors);\n\t\t\t\tevents.add(callback);\n\t\t\t\treturn () => events.delete(callback);\n\t\t\t},\n\t\t\tregisterCursors: (cursors, id) => {\n\t\t\t\tbyCaller.set(id, Object.keys(cursors));\n\t\t\t\tallCursors = getActiveDefinitions(byCaller, allCursors, cursors);\n\t\t\t\tfor (const callback of events) callback(allCursors);\n\t\t\t\treturn () => {\n\t\t\t\t\tbyCaller.delete(id);\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t});\n\tconst shouldReduceMotion = useReducedMotionConfig();\n\treturn /* @__PURE__ */ jsxs(CustomCursorContext.Provider, {\n\t\tvalue,\n\t\tchildren: [children, !shouldReduceMotion && /* @__PURE__ */ jsx(CustomCursorComponent, {})]\n\t});\n});\nconst CustomCursorHost = /* @__PURE__ */ (() => withCSS(CustomCursorContextProvider, [`.${replaceCursorClassName}, .${replaceCursorClassName} * { cursor: none !important; }`, `.${cursorComponentClassName}, .${cursorComponentClassName} * { pointer-events: none !important; }`], \"framer-lib-cursors-host\"))();\nconst staticCursorStyle = /* @__PURE__ */ (() => ({\n\tposition: \"fixed\",\n\ttop: 0,\n\tleft: 0,\n\tzIndex: 13,\n\tpointerEvents: \"none\"\n}))();\nfunction customCursorReplacesNativeCursor(cursor) {\n\tif (!cursor) return false;\n\tif (cursor.placement || cursor.alignment) return false;\n\treturn true;\n}\nfunction valueForCursorAlignment(alignment) {\n\tswitch (alignment) {\n\t\tcase \"start\": return \"0%\";\n\t\tcase \"center\": return \"-50%\";\n\t\tcase \"end\": return \"-100%\";\n\t\tdefault: assertNever$1(alignment);\n\t}\n}\nfunction getCenteringTransform(placement, alignment = \"center\") {\n\tswitch (placement) {\n\t\tcase \"top\": return `${valueForCursorAlignment(alignment)}, -100%`;\n\t\tcase \"right\": return `0%, ${valueForCursorAlignment(alignment)}`;\n\t\tcase \"bottom\": return `${valueForCursorAlignment(alignment)}, 0%`;\n\t\tcase \"left\": return `-100%, ${valueForCursorAlignment(alignment)}`;\n\t\tdefault: return \"-50%, -50%\";\n\t}\n}\nconst portalIdAttribute = \"data-framer-portal-id\";\n/**\n* Get the custom cursor based on the element under the pointer. Elements in a\n* Framer site specify the cursor via an attribute that sets a hash of all of\n* the cursor settings. This hash corresponds to an entry that contains the\n* settings and component and is reported to the CustomCursorContext by the web\n* page that requires it on mount.\n*\n* Using a data-attribute and elementFromPoint has several benefits over the\n* alternative (which is wrapping each layer that sets or modifies a custom\n* cursor in a Higher Order Component that tracks mouseenter/exit) for several\n* reasons:\n* 1. It allows us to easily provide custom cursors to layers that may or may\n*    not support this higher order component. For example, in the future we can\n*    introduce a ControlType.CustomCursor that will allow any layer in a Smart\n*    Component to update the cursor without the layer in that Smart Component\n*    needing to change its behavior.\n* 2. It means we do not have to maintain a state machine or \"stack\" of layers\n*    that have recorded the cursor has entered/exited since ancestors don't\n*    report a mouseleave when the cursor moves into a descendant). Such a stack\n*    may be prone to errors if the window is blurred or the user switches tabs,\n*    or in cases where the DOM isn't setup as expected.\n* 3. It means that the cursor hit detection is done by the browser, which means\n*    it is more likely to match the native cursor.\n*\n* Their are 2 downsides to this approach:\n* 1. We must call elementFromPoint once per mousemove animation frame (at\n*    least) and iterate through the entries until we find an element with an\n*    attribute. This is theoretically expensive in a project where many\n*    elements are stacked on top of each other. However in practice, this\n*    number is rarely in the large double digits, so doesn't represent a real\n*    performance issue at this time.\n* 2. If the browser does not trigger a mousemove event, the cursor will not\n*    update even if content underneath changes.\n*\n* It may be possible to cache the results of this function by using\n* document.elementFromPoint and returning the last result for that top element.\n* However, this can be problematic if the top element doesn't change, but\n* elements underneath do. For that reason that optimization hasn't been\n* included at this time.\n*\n* It's important to note that elementFromPoint triggers style recalculation\n* and can trigger layout. It's important this is called in the read phase to\n* reduce the likelihood of this happening.\n*/\nfunction getCursorHash(x, y) {\n\tlet el = document.elementFromPoint(x, y);\n\twhile (el) {\n\t\tif (el === document.body) return void 0;\n\t\tconst value = el.getAttribute(\"data-framer-cursor\");\n\t\tif (value) return value;\n\t\tif (el.hasAttribute(\"data-framer-portal-id\")) {\n\t\t\tconst id = el.getAttribute(portalIdAttribute);\n\t\t\tel = el.parentElement;\n\t\t\tif (id) el = document.getElementById(id) ?? el;\n\t\t} else el = el.parentElement;\n\t}\n}\nconst CustomCursorComponent = /* @__PURE__ */ memo$1(function CustomCursorComponent() {\n\tconst { onRegisterCursors } = useContext(CustomCursorContext);\n\tconst hasHoverCapability = useHoverCapability(false);\n\tconst pointerX = useMotionValue(0);\n\tconst pointerY = useMotionValue(0);\n\tconst opacity = useMotionValue(0);\n\tconst cursorRef = useRef(null);\n\tconst internalState = useRef({\n\t\tcursors: {},\n\t\tcursorHash: void 0\n\t});\n\tconst forceRender = useForceUpdate$2();\n\tuseEffect(() => {\n\t\tif (!hasHoverCapability) return;\n\t\tlet x = 0;\n\t\tlet y = 0;\n\t\tfunction updateValues() {\n\t\t\tpointerX.set(x);\n\t\t\tpointerY.set(y);\n\t\t\tanimate$1(opacity, 1, {\n\t\t\t\ttype: \"tween\",\n\t\t\t\tduration: .2\n\t\t\t});\n\t\t}\n\t\tconst updateVariant = () => {\n\t\t\tif (isEmptyObject(internalState.current.cursors)) return;\n\t\t\tconst hash = getCursorHash(x, y);\n\t\t\tif (hash !== internalState.current.cursorHash) {\n\t\t\t\tinternalState.current.cursorHash = hash;\n\t\t\t\tframe.update(() => forceRender());\n\t\t\t}\n\t\t};\n\t\tfunction updateCursor(e) {\n\t\t\tif (e.pointerType === \"touch\") {\n\t\t\t\tcancelFrame(updateVariant);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tframe.read(updateVariant, true);\n\t\t\tx = e.clientX;\n\t\t\ty = e.clientY;\n\t\t\tframe.update(updateValues);\n\t\t}\n\t\tfunction fireEventToTarget(e) {\n\t\t\tif (e.target === cursorRef.current || !cursorRef.current) return;\n\t\t\tconst event = new PointerEvent(e.type, {\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: e.cancelable,\n\t\t\t\tpointerType: e.pointerType,\n\t\t\t\tpointerId: e.pointerId,\n\t\t\t\tcomposed: e.composed,\n\t\t\t\tisPrimary: e.isPrimary,\n\t\t\t\tbuttons: e.buttons,\n\t\t\t\tbutton: e.button\n\t\t\t});\n\t\t\tframe.update(() => {\n\t\t\t\tcursorRef.current?.dispatchEvent(event);\n\t\t\t});\n\t\t}\n\t\tsafeWindow.addEventListener(\"pointermove\", updateCursor);\n\t\tdocument.addEventListener(\"pointerdown\", fireEventToTarget);\n\t\tdocument.addEventListener(\"pointerup\", fireEventToTarget);\n\t\tframe.read(updateVariant, true);\n\t\treturn () => {\n\t\t\tsafeWindow.removeEventListener(\"pointermove\", updateCursor);\n\t\t\tdocument.removeEventListener(\"pointerdown\", fireEventToTarget);\n\t\t\tdocument.removeEventListener(\"pointerup\", fireEventToTarget);\n\t\t\tcancelFrame(updateVariant);\n\t\t};\n\t}, [\n\t\topacity,\n\t\tpointerX,\n\t\tpointerY,\n\t\tforceRender,\n\t\thasHoverCapability\n\t]);\n\tuseEffect(() => {\n\t\tif (!hasHoverCapability) return;\n\t\tfunction hideCursor() {\n\t\t\tanimate$1(opacity, 0, {\n\t\t\t\ttype: \"tween\",\n\t\t\t\tduration: .2\n\t\t\t});\n\t\t}\n\t\tdocument.addEventListener(\"mouseleave\", hideCursor);\n\t\tsafeWindow.addEventListener(\"blur\", hideCursor);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"mouseleave\", hideCursor);\n\t\t\tsafeWindow.removeEventListener(\"blur\", hideCursor);\n\t\t};\n\t}, [opacity, hasHoverCapability]);\n\tuseLayoutEffect(() => {\n\t\tfunction updateCursors(newCursors) {\n\t\t\tinternalState.current.cursors = newCursors;\n\t\t\tinternalState.current.cursorHash = !isEmptyObject(newCursors) ? getCursorHash(pointerX.get(), pointerY.get()) : null;\n\t\t\tforceRender();\n\t\t}\n\t\tconst unregister = onRegisterCursors(updateCursors);\n\t\treturn () => {\n\t\t\tunregister();\n\t\t\tdocument.body.classList.toggle(replaceCursorClassName, false);\n\t\t};\n\t}, [\n\t\tpointerX,\n\t\tpointerY,\n\t\tonRegisterCursors,\n\t\tforceRender\n\t]);\n\tconst { cursors, cursorHash } = internalState.current;\n\tconst cursor = cursorHash ? cursors[cursorHash] : null;\n\tconst replaceNativeCursor = customCursorReplacesNativeCursor(cursor);\n\tuseLayoutEffect(() => {\n\t\tif (!hasHoverCapability) return;\n\t\tdocument.body.classList.toggle(replaceCursorClassName, replaceNativeCursor);\n\t}, [replaceNativeCursor, hasHoverCapability]);\n\tconst Cursor = cursor?.component;\n\tconst springRaw = cursor?.transition ?? { duration: 0 };\n\tconst spring = springRaw.duration !== void 0 ? {\n\t\t...springRaw,\n\t\tduration: springRaw.duration * 1e3\n\t} : springRaw;\n\tconst sprungX = useSpring(pointerX, spring);\n\tconst sprungY = useSpring(pointerY, spring);\n\tconst x = useTransform(() => sprungX.get() + (cursor?.offset?.x ?? 0));\n\tconst y = useTransform(() => sprungY.get() + (cursor?.offset?.y ?? 0));\n\tconst alignment = cursor?.alignment;\n\tconst placement = cursor?.placement;\n\tconst transformTemplate = useCallback((_, t) => `translate(${getCenteringTransform(placement, alignment)}) ${t}`, [alignment, placement]);\n\tif (!hasHoverCapability || !cursor || !Cursor) return null;\n\treturn /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(Cursor, {\n\t\ttransformTemplate,\n\t\tstyle: {\n\t\t\t...staticCursorStyle,\n\t\t\tx,\n\t\t\ty,\n\t\t\topacity\n\t\t},\n\t\tglobalTapTarget: true,\n\t\tvariant: cursor?.variant,\n\t\tref: cursorRef,\n\t\tclassName: cursorComponentClassName\n\t}) });\n});\n/**\n* Allow web pages to register their custom cursors to the global context so\n* that the same cursor can be used across pages without flashes of missing\n* cursors.\n*/\nfunction useCustomCursors(webPageCursors) {\n\tconst { registerCursors } = useContext(CustomCursorContext);\n\tconst cursors = useConstant(() => webPageCursors);\n\tconst id = useId();\n\tuseLayoutEffect(() => {\n\t\treturn registerCursors(cursors, id);\n\t}, [registerCursors, id]);\n}\n\n//#endregion\n//#region ../../library/src/modules/LinkToWebPage.ts\nconst linkKey = \"webPageId\";\nfunction isLinkToWebPage(link) {\n\treturn Boolean(link && typeof link === \"object\" && linkKey in link);\n}\n\n//#endregion\n//#region ../../library/src/modules/NestedLinksCollector.ts\nfunction linkInfoKey(link) {\n\treturn `${link.scopeId}:${link.nodeId}:${link.furthestExternalComponent?.scopeId}:${link.furthestExternalComponent?.nodeId}`;\n}\n/**\n* Collector for detected nested links.\n*\n* There are 3 possible kinds of nested links:\n* 1. A link inside another in the same project\n* 2. A link inside an external component that is wrapped in a link in the page\n* 3. A link inside an external component that is wrapped in a link in this external component\n*\n* Which means that we may have 3 possible error messages:\n* 1. A message that will contain the nested link layer and the parent link layer\n* 2. A message that will contain the nested external component layer and the parent link layer\n* 3. A message that will only contain the nested external component layer\n*/\nvar NestedLinksCollector = class {\n\tcollectedLinks = /* @__PURE__ */ new Map();\n\tnestingInfo = /* @__PURE__ */ new Map();\n\tclear() {\n\t\tthis.collectedLinks.clear();\n\t\tthis.nestingInfo.clear();\n\t}\n\t/**\n\t* Returns a Map of outer links to their inner links.\n\t*\n\t* NOTE: This function is called in the SSG renderer sandbox (<root>/src/ssg/src/ssg-sandbox-renderer/sandbox/worker/renderer.ts)\n\t*/\n\tgetLinks() {\n\t\tconst result = /* @__PURE__ */ new Map();\n\t\tfor (const [outerLinkKey, innerLinkKeys] of this.nestingInfo) {\n\t\t\tconst outerLinkInfo = this.collectedLinks.get(outerLinkKey);\n\t\t\tassert$1(outerLinkInfo, `Outer link not found: ${outerLinkKey}`);\n\t\t\tconst links = Array.from(innerLinkKeys).map((innerLinkKey) => {\n\t\t\t\tconst innerLinkInfo = this.collectedLinks.get(innerLinkKey);\n\t\t\t\tassert$1(innerLinkInfo, `Inner link not found: ${innerLinkKey}`);\n\t\t\t\treturn innerLinkInfo;\n\t\t\t});\n\t\t\tresult.set(outerLinkInfo, links);\n\t\t}\n\t\treturn result;\n\t}\n\tcollectNestedLink(outerLink, innerLink) {\n\t\tif (isWindow && !isTest() || !outerLink.nodeId || !innerLink.nodeId) return;\n\t\tthis.collectedLinks.set(linkInfoKey(outerLink), outerLink);\n\t\tthis.collectedLinks.set(linkInfoKey(innerLink), innerLink);\n\t\tconst outerLinkNestingInfo = this.nestingInfo.get(linkInfoKey(outerLink)) ?? /* @__PURE__ */ new Set();\n\t\touterLinkNestingInfo.add(linkInfoKey(innerLink));\n\t\tthis.nestingInfo.set(linkInfoKey(outerLink), outerLinkNestingInfo);\n\t}\n};\n/**\n* @internal\n*/\nconst nestedLinksCollector = /* @__PURE__ */ new NestedLinksCollector();\n\n//#endregion\n//#region ../../library/src/modules/useIsOnFramerCanvas.ts\n/**\n* Returns a constant value based on whether the caller is mounted in a Framer\n* Canvas environment.\n*\n* @public\n*/\nfunction useIsOnFramerCanvas() {\n\treturn RenderTarget.current() === RenderTarget.canvas;\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/urlChecks.tsx\nfunction isInternalURL(href) {\n\tif (href === void 0) return false;\n\tif (href.startsWith(\"#\") || href.startsWith(\"/\") || href.startsWith(\".\")) return true;\n\treturn false;\n}\nfunction isValidURL(href, isInternal) {\n\ttry {\n\t\tconst url = new URL(href);\n\t\treturn Boolean(url.protocol);\n\t} catch {}\n\treturn isInternal;\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/getRouteFromPageLink.tsx\nfunction getRouteFromPageLink(pageLink, router, currentRoute, locales) {\n\tif (isString(pageLink)) {\n\t\tconst isInternal = isInternalURL(pageLink);\n\t\tif (!router.routes || !router.getRoute || !currentRoute || !isInternal) return;\n\t\tconst [pathnameWithQueryParams] = pageLink.split(\"#\", 2);\n\t\tif (pathnameWithQueryParams === void 0) return;\n\t\tconst [pathname] = pathnameWithQueryParams.split(\"?\", 2);\n\t\tif (pathname === void 0) return;\n\t\ttry {\n\t\t\tconst { routeId } = inferInitialRouteFromPath(router.routes, pathname, pathname === \"\", locales);\n\t\t\treturn router.getRoute(routeId);\n\t\t} catch {\n\t\t\treturn;\n\t\t}\n\t}\n\tconst { webPageId } = pageLink;\n\treturn router.getRoute?.(webPageId);\n}\n\n//#endregion\n//#region ../../library/src/modules/framerPageLink.ts\nconst elementKey = \"element\";\nconst collectionKey = \"collection\";\nconst collectionItemIdKey = \"collectionItemId\";\nconst pathVariablesKey = \"pathVariables\";\nconst mediaType$1 = \"framer/page-link,\";\n/**\n* @internal\n* @deprecated\n*/\nfunction isFramerPageLink(value) {\n\treturn isString(value) && value.startsWith(`data:${mediaType$1}`);\n}\n/**\n* @internal\n* @deprecated\n*/\nfunction createFramerPageLink(targetId = null, options = {}) {\n\tconst link = new URL(`data:${mediaType$1}${targetId ? targetId : \"none\"}`);\n\tif (options.element) link.searchParams.append(elementKey, options.element);\n\tif (options.collectionItem) {\n\t\tlink.searchParams.append(collectionKey, options.collectionItem.collection);\n\t\tlink.searchParams.append(collectionItemIdKey, options.collectionItem.collectionItemId);\n\t\tlink.searchParams.append(pathVariablesKey, new URLSearchParams(options.collectionItem.pathVariables).toString());\n\t}\n\treturn link.href;\n}\n/**\n* @internal\n* @deprecated\n*/\nfunction parseFramerPageLink(link) {\n\tif (!isFramerPageLink(link)) return;\n\ttry {\n\t\tconst url = new URL(link);\n\t\tconst target = url.pathname.substring(17);\n\t\tconst searchParams = url.searchParams;\n\t\tconst element = searchParams.has(elementKey) ? searchParams.get(elementKey) : void 0;\n\t\tlet collectionItem;\n\t\tconst collection = searchParams.get(collectionKey);\n\t\tconst collectionItemId = searchParams.get(collectionItemIdKey);\n\t\tconst pathVariablesValue = searchParams.get(pathVariablesKey);\n\t\tif (collection && collectionItemId && pathVariablesValue) collectionItem = {\n\t\t\tcollection,\n\t\t\tcollectionItemId,\n\t\t\tpathVariables: Object.fromEntries(new URLSearchParams(pathVariablesValue).entries())\n\t\t};\n\t\treturn {\n\t\t\ttarget: target === \"none\" ? null : target,\n\t\t\t/**\n\t\t\t* For historical reason we used to set \"element=none\" into the\n\t\t\t* datalink, we no longer do that today, but we still keep this code\n\t\t\t* so we could parse legacy links correctly.\n\t\t\t*/\n\t\t\telement: element === \"none\" ? void 0 : element,\n\t\t\tcollectionItem\n\t\t};\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* @internal\n* @deprecated\n*/\nfunction shouldOpenLinkInNewTab(link) {\n\treturn !isFramerPageLink(link);\n}\n/** @internal @deprecated */\nfunction navigateFromAttributes(navigate, element, implicitPathVariables) {\n\tlet routeId = element.getAttribute(\"data-framer-page-link-target\");\n\tlet elementId;\n\tlet pathVariables;\n\tif (routeId) {\n\t\telementId = element.getAttribute(\"data-framer-page-link-element\") ?? void 0;\n\t\tconst pathVariablesRaw = element.getAttribute(\"data-framer-page-link-path-variables\");\n\t\tif (pathVariablesRaw) pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesRaw).entries());\n\t} else {\n\t\tconst href = element.getAttribute(\"href\");\n\t\tif (!href) return false;\n\t\tconst link = parseFramerPageLink(href);\n\t\tif (!link?.target) return false;\n\t\trouteId = link.target;\n\t\telementId = link.element ?? void 0;\n\t\tpathVariables = link.collectionItem?.pathVariables;\n\t}\n\tconst smoothScroll = elementId ? element.dataset.framerSmoothScroll !== void 0 : void 0;\n\tnavigate(routeId, elementId, Object.assign({}, implicitPathVariables, pathVariables), smoothScroll);\n\treturn true;\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/linkFromFramerPageLink.tsx\n/**\n* Convert a deprecated framer page link string (data:framer/page-link,augiA20Il) into the same shape as a ComplexLink from\n* Vekter.\n*\n* @internal\n*/\nfunction linkFromFramerPageLink(link) {\n\tif (!isFramerPageLink(link)) return link;\n\tconst parsed = parseFramerPageLink(link);\n\tif (!parsed) return void 0;\n\tconst { target, element, collectionItem } = parsed;\n\tif (!target) return void 0;\n\treturn {\n\t\twebPageId: target,\n\t\thash: element ?? void 0,\n\t\tpathVariables: createVariablesFromPageLinkCollectionItem(collectionItem)\n\t};\n}\nfunction createVariablesFromPageLinkCollectionItem(collectionItem) {\n\tif (!collectionItem) return void 0;\n\tconst variables = {};\n\tfor (const pathVariablesKey in collectionItem.pathVariables) {\n\t\tconst value = collectionItem.pathVariables[pathVariablesKey];\n\t\tif (value) variables[pathVariablesKey] = value;\n\t}\n\treturn variables;\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/useReplaceNestedLinks.tsx\nconst OuterLinkContext = /* @__PURE__ */ createContext(void 0);\nfunction ResetOuterLinkContext({ children }) {\n\treturn /* @__PURE__ */ jsx(OuterLinkContext.Provider, {\n\t\tvalue: void 0,\n\t\tchildren\n\t});\n}\n/**\n* NOTE: Any change to this function should have a QA for this project https://development.framer.com/projects/Nested-Links--ozJyj13jPMDAbU9zv9WB-1rkcd\n*/\nfunction useReplaceNestedLinks(children, scopeId, nodeId, href, propsAddedByLink, observerRef) {\n\tconst outerLink = useContext(OuterLinkContext);\n\tconst furthestExternalComponent = useFurthestExternalComponent();\n\tconst innerLink = useMemo(() => ({\n\t\tscopeId,\n\t\tnodeId,\n\t\tfurthestExternalComponent\n\t}), [\n\t\tscopeId,\n\t\tnodeId,\n\t\tfurthestExternalComponent\n\t]);\n\tconst router = useRouter();\n\tconst currentRoute = useCurrentRoute();\n\tconst { locales } = useLocaleInfo();\n\tconst route = useMemo(() => {\n\t\tconst pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);\n\t\tif (!pageLink) return;\n\t\treturn getRouteFromPageLink(pageLink, router, currentRoute, locales);\n\t}, [\n\t\tcurrentRoute,\n\t\thref,\n\t\trouter,\n\t\tlocales\n\t]);\n\tconst isOnFramerCanvas = useIsOnFramerCanvas();\n\tconst shouldReplaceLink = Boolean(!isOnFramerCanvas && outerLink?.nodeId && innerLink.nodeId);\n\tconst onClick = useCallback((event) => {\n\t\tif (!propsAddedByLink.href) return;\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tif (isCommandKeyPressed(event)) {\n\t\t\topenExternalLink(propsAddedByLink.href, \"\", \"_blank\");\n\t\t\treturn;\n\t\t}\n\t\tif (route) propsAddedByLink.navigate?.();\n\t\telse openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);\n\t}, [propsAddedByLink, route]);\n\tconst onAuxClick = useCallback((event) => {\n\t\tif (!propsAddedByLink.href) return;\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\topenExternalLink(propsAddedByLink.href, \"\", \"_blank\");\n\t}, [propsAddedByLink]);\n\tconst onKeyDown = useCallback((event) => {\n\t\tif (!propsAddedByLink.href) return;\n\t\tif (event.key !== \"Enter\") return;\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tif (route) propsAddedByLink.navigate?.();\n\t\telse openExternalLink(propsAddedByLink.href, propsAddedByLink.rel, propsAddedByLink.target);\n\t}, [propsAddedByLink, route]);\n\tuseRefEffect(observerRef, (node) => {\n\t\tif (node === null) return;\n\t\tif (!shouldReplaceLink) return;\n\t\tnode.dataset.hydrated = \"true\";\n\t}, [shouldReplaceLink]);\n\tlet replacedChildren = children;\n\tif (shouldReplaceLink) {\n\t\tChildren.forEach(children, (child) => {\n\t\t\tif (!isChildReplaceable(child)) return;\n\t\t\tassert$1(linkInfoIsCollectable(outerLink), \"outerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above\");\n\t\t\tassert$1(linkInfoIsCollectable(innerLink), \"innerLink must have nodeId defined at this point; this was verified with `shouldReplaceLink` above\");\n\t\t\tnestedLinksCollector.collectNestedLink(outerLink, innerLink);\n\t\t});\n\t\treplacedChildren = Children.map(children, (child) => {\n\t\t\tif (!isChildReplaceable(child)) return child;\n\t\t\tconst tag = maybeReplaceAnchorWithSpan(child.type);\n\t\t\tconst { children: childChildren, ...childProps } = child.props;\n\t\t\tconst props = {\n\t\t\t\t...childProps,\n\t\t\t\t\"data-nested-link\": true,\n\t\t\t\trole: \"link\",\n\t\t\t\ttabIndex: 0,\n\t\t\t\tonClick,\n\t\t\t\tonAuxClick,\n\t\t\t\tonKeyDown,\n\t\t\t\tas: childProps.as && maybeReplaceAnchorWithSpan(childProps.as)\n\t\t\t};\n\t\t\tconst ref = \"ref\" in child ? child.ref : void 0;\n\t\t\treturn createElement(tag, {\n\t\t\t\t...props,\n\t\t\t\tref\n\t\t\t}, childChildren);\n\t\t});\n\t}\n\treturn /* @__PURE__ */ jsx(OuterLinkContext.Provider, {\n\t\tvalue: innerLink,\n\t\tchildren: replacedChildren\n\t});\n}\nfunction linkInfoIsCollectable(linkInfo) {\n\treturn !isUndefined(linkInfo?.nodeId);\n}\n/**\n* This function checks if a child of Link is replaceable by a span. We support replacing\n* - motion.a → motion.span\n* - a → span\n* - <Image as=\"a\"> → <Image as=\"span\">\n* but there might be other scenarios we haven’t designed for.\n*/\nfunction isChildReplaceable(child) {\n\treturn isValidElement(child) && (maybeReplaceAnchorWithSpan(child.type) !== child.type || maybeReplaceAnchorWithSpan(child.props.as) !== child.props.as);\n}\nfunction openExternalLink(href, rel, target) {\n\tconst link = document.createElement(\"a\");\n\tlink.href = href;\n\tif (rel) link.rel = rel;\n\tif (target) link.target = target;\n\tdocument.body.appendChild(link);\n\tlink.click();\n\tlink.remove();\n}\nfunction maybeReplaceAnchorWithSpan(component) {\n\tif (component === \"a\") return \"span\";\n\tif (isMotionComponent(component) && unwrapMotionComponent(component) === \"a\") return motion.span;\n\treturn component;\n}\n\n//#endregion\n//#region ../../library/src/modules/InjectSelectionStyle.tsx\nconst textSelectionColorVariable = \"--text-selection-color\";\nconst textSelectionBackgroundColorVariable = \"--text-selection-background-color\";\nfunction updateTextSelectionStyles(triggerId) {\n\tif (!triggerId) return;\n\tframe.read(() => {\n\t\tconst el = document.getElementById(triggerId);\n\t\tif (!el) return;\n\t\tconst styles = getComputedStyle(el);\n\t\tconst textSelectionColor = styles.getPropertyValue(\"--selection-color\").trim();\n\t\tconst textSelectionBackgroundColor = styles.getPropertyValue(\"--selection-background-color\").trim();\n\t\tframe.render(() => {\n\t\t\tconst overlayPortal = document.querySelectorAll(`[data-framer-portal-id=\"${triggerId}\"]`);\n\t\t\tif (overlayPortal.length === 0) return;\n\t\t\tif (textSelectionColor) overlayPortal.forEach((el) => el.style.setProperty(textSelectionColorVariable, textSelectionColor));\n\t\t\tif (textSelectionBackgroundColor) overlayPortal.forEach((el) => el.style.setProperty(textSelectionBackgroundColorVariable, textSelectionBackgroundColor));\n\t\t});\n\t});\n}\nfunction getTextSelectionStylesFromTrigger(triggerId) {\n\treturn [`[data-framer-portal-id=\"${triggerId}\"] * ::selection {\n    color: var(${textSelectionColorVariable});\n    background-color: var(${textSelectionBackgroundColorVariable}, highlight);\n}`];\n}\nfunction InjectSelectionStyleWithoutCSS({ triggerId, children }) {\n\tReact.useLayoutEffect(() => {\n\t\tif (triggerId) updateTextSelectionStyles(triggerId);\n\t}, [triggerId]);\n\treturn children;\n}\nconst InjectSelectionStyle = /* @__PURE__ */ (() => withCSS(InjectSelectionStyleWithoutCSS, (_target, props) => getTextSelectionStylesFromTrigger(props?.triggerId), \"InjectSelectionStyle\"))();\n\n//#endregion\n//#region ../../library/src/render/types/Polygon.ts\n/**\n* @internal\n*/\nconst Polygon = {\n\t/**\n\t* Determine if the vertices are ordered clockwise or counter-clockwise. This works for simple\n\t* (non-self-intersecting) convex polygons. If the polygon is collapsed into a line (signedArea = 0), we consider it\n\t* clockwise for it works with how Framer draws the polygons.\n\t* See: https://paulbourke.net/geometry/polygonmesh/\n\t* @internal */\n\tisClockwise: (points) => {\n\t\treturn Polygon.signedArea(points) <= 0;\n\t},\n\t/**\n\t* Calculate the signed area to determine if the vertices go clockwise or counter clockwise. We flip all the y\n\t* values because the y axis in our canvas coordinate is fipped.\n\t* See: https://mathworld.wolfram.com/PolygonArea.html\n\t* @internal */\n\tsignedArea: (points) => {\n\t\tlet sum = 0;\n\t\tconst len = points.length;\n\t\tfor (let i = 0; i < len; i++) {\n\t\t\tconst pointA = points[i];\n\t\t\tconst pointB = points[(i + 1) % len];\n\t\t\tif (!pointA || !pointB) continue;\n\t\t\tsum += pointA.x * -pointB.y - pointB.x * -pointA.y;\n\t\t}\n\t\treturn 1 / 2 * sum;\n\t},\n\t/**\n\t* Determine if some Point lies inside (or on) the polygon formed by other\n\t* Points. The other points must be provided in a clockwise/counter\n\t* clockwise order otherwise the line segments we create to test the polygon\n\t* will not be representative.\n\t*\n\t* Solution for convex polygons based on:\n\t* https://www.eecs.umich.edu/courses/eecs380/HANDOUTS/PROJ2/InsidePoly.html\n\t*\n\t* We create a line segment for each side of the polygon. The point we are\n\t* testing must be on or on the same side of each line segment.\n\t*\n\t* @internal\n\t*/\n\tcontainsPoint: (polygonPoints, point) => {\n\t\tlet sign = void 0;\n\t\tfor (let i = 0; i < polygonPoints.length; i++) {\n\t\t\tif (Point.isEqual(polygonPoints[i], point)) return true;\n\t\t\tconst x1 = polygonPoints[i]?.x ?? 0;\n\t\t\tconst y1 = polygonPoints[i]?.y ?? 0;\n\t\t\tconst i2 = (i + 1) % polygonPoints.length;\n\t\t\tif (Point.isEqual(polygonPoints[i2], point)) return true;\n\t\t\tconst x2 = polygonPoints[i2]?.x ?? 0;\n\t\t\tconst y2 = polygonPoints[i2]?.y ?? 0;\n\t\t\tconst d = (point.x - x1) * (y2 - y1) - (point.y - y1) * (x2 - x1);\n\t\t\tif (d === 0) continue;\n\t\t\tconst localSign = d > 0;\n\t\t\tsign ??= localSign;\n\t\t\tif (sign !== localSign) return false;\n\t\t}\n\t\treturn true;\n\t},\n\t/** @internal */\n\tintersects: (pointsA, pointsB) => {\n\t\tif (pointsA.length < 1 || pointsB.length < 1) return false;\n\t\tconst boundingRectA = Rect.boundingRectFromPoints(pointsA);\n\t\tconst boundingRectB = Rect.boundingRectFromPoints(pointsB);\n\t\tif (!Rect.intersects(boundingRectA, boundingRectB)) return false;\n\t\tconst edgesA = [];\n\t\tconst pointsALength = pointsA.length;\n\t\tpointsA.forEach((point, index) => {\n\t\t\tconst nextPoint = pointsA[(index + 1) % pointsALength];\n\t\t\tif (!nextPoint) return;\n\t\t\tedgesA.push(Line(point, nextPoint));\n\t\t});\n\t\tconst edgesB = [];\n\t\tconst pointsBLength = pointsB.length;\n\t\tpointsB.forEach((point, index) => {\n\t\t\tconst nextPoint = pointsB[(index + 1) % pointsBLength];\n\t\t\tif (!nextPoint) return;\n\t\t\tedgesB.push(Line(point, nextPoint));\n\t\t});\n\t\tfor (const edgeA of edgesA) for (const edgeB of edgesB) if (Line.intersection(edgeA, edgeB, true)) return true;\n\t\tif (Polygon.containsPoint(pointsB, pointsA[0])) return true;\n\t\tif (Polygon.containsPoint(pointsA, pointsB[0])) return true;\n\t\treturn false;\n\t},\n\t/** @internal */\n\tcontains: (pointsA, pointsB) => {\n\t\tfor (let i = 0; i < pointsB.length; i++) if (!Polygon.containsPoint(pointsA, pointsB[i])) return false;\n\t\treturn true;\n\t},\n\t/** @internal */\n\tclipToRect: (points, rect) => {\n\t\tconst edges = Rect.edges(rect);\n\t\tconst seen = /* @__PURE__ */ new Set();\n\t\tconst count = points.length;\n\t\tconst clippedPoints = [];\n\t\tconst originalPoints = [];\n\t\tfor (let i = 0; i < count; i++) {\n\t\t\tconst point = points[i];\n\t\t\tconst nextPoint = points[(i + 1) % count];\n\t\t\tif (Rect.containsPoint(rect, point)) {\n\t\t\t\tconst intersectionKey = keyForPoint(point);\n\t\t\t\tseen.add(intersectionKey);\n\t\t\t\toriginalPoints.push(point);\n\t\t\t\tif (Rect.containsPoint(rect, nextPoint)) continue;\n\t\t\t}\n\t\t\tconst line = Line(point, nextPoint);\n\t\t\tedges.forEach((edge) => {\n\t\t\t\tconst intersection = Line.intersection(line, edge, true);\n\t\t\t\tif (!intersection) return;\n\t\t\t\tconst intersectionKey = keyForPoint(intersection);\n\t\t\t\tif (seen.has(intersectionKey)) return;\n\t\t\t\tseen.add(intersectionKey);\n\t\t\t\tclippedPoints.push(intersection);\n\t\t\t});\n\t\t}\n\t\tif (clippedPoints.length === 0) return originalPoints;\n\t\tRect.points(rect).forEach((point) => {\n\t\t\tif (!Polygon.containsPoint(points, point)) return;\n\t\t\tseen.add(keyForPoint(point));\n\t\t\tclippedPoints.push(point);\n\t\t});\n\t\treturn Point.sortClockwise([...originalPoints, ...clippedPoints]);\n\t}\n};\nfunction keyForPoint(point) {\n\treturn `${point?.x}-${point?.y}`;\n}\n\n//#endregion\n//#region ../../library/src/modules/floatingPositionSafeAreaStyle.ts\nfunction invertPlacement(placement) {\n\tswitch (placement) {\n\t\tcase \"top\": return \"bottom\";\n\t\tcase \"right\": return \"left\";\n\t\tcase \"bottom\": return \"top\";\n\t\tcase \"left\": return \"right\";\n\t\tdefault: assertNever$1(placement);\n\t}\n}\nfunction preferredOffset(point, length, max, collisionDetectionPadding = 0) {\n\tconst min = Math.max(point, collisionDetectionPadding);\n\tif (point < min) return min;\n\tconst size = length + collisionDetectionPadding;\n\tif (min + size > max) return max - size;\n\treturn min;\n}\nfunction collisionAxis(placement, rect, windowSize) {\n\tswitch (placement) {\n\t\tcase \"top\":\n\t\tcase \"bottom\":\n\t\t\tif (rect.y < 0 || rect.y + rect.height > windowSize.height) return \"y\";\n\t\t\treturn;\n\t\tcase \"left\":\n\t\tcase \"right\":\n\t\t\tif (rect.x < 0 || rect.x + rect.width > windowSize.width) return \"x\";\n\t\t\treturn;\n\t\tdefault: assertNever$1(placement);\n\t}\n}\nfunction getPlacementAndOffsetAvoidingScreenCollision(rect, placement, offset, windowSize) {\n\tswitch (collisionAxis(placement, rect, windowSize)) {\n\t\tcase \"x\": return {\n\t\t\tplacement: invertPlacement(placement),\n\t\t\tx: offset.x * -1,\n\t\t\ty: offset.y\n\t\t};\n\t\tcase \"y\": return {\n\t\t\tplacement: invertPlacement(placement),\n\t\t\tx: offset.x,\n\t\t\ty: offset.y * -1\n\t\t};\n\t\tdefault: return {\n\t\t\tplacement,\n\t\t\tx: offset.x,\n\t\t\ty: offset.y\n\t\t};\n\t}\n}\nfunction getSafePlacementFloatingPositionRect(anchor, element, placement, alignment, offset, collisionDetectionSize, collisionDetectionPadding) {\n\tconst rebasedRect = Rect.rebaseRectOnto(element, anchor, placement, alignment);\n\tconst preferredRect = {\n\t\tx: rebasedRect.x + offset.x,\n\t\ty: rebasedRect.y + offset.y,\n\t\twidth: element.width,\n\t\theight: element.height\n\t};\n\tif (!collisionDetectionSize) return [placement, preferredRect];\n\tconst { x, y, placement: safePlacement } = getPlacementAndOffsetAvoidingScreenCollision(preferredRect, placement, offset, collisionDetectionSize);\n\tconst rebasedCollisionRect = Rect.rebaseRectOnto(element, anchor, safePlacement, alignment);\n\treturn [safePlacement, {\n\t\tx: preferredOffset(rebasedCollisionRect.x + x, element.width, collisionDetectionSize.width, collisionDetectionPadding),\n\t\ty: preferredOffset(rebasedCollisionRect.y + y, element.height, collisionDetectionSize.height, collisionDetectionPadding),\n\t\twidth: element.width,\n\t\theight: element.height\n\t}];\n}\n/**\n*  Check if point a is inside a polygon formed of point b and other points. I\n*  so, use b, otherwise use a.\n*/\nfunction preferredPoint(a, b, points) {\n\tif (Polygon.containsPoint([b, ...points], a)) return b;\n\treturn a;\n}\n/**\n* Prevent the point of the polygon that is under the cursor from being closer\n* than 5px to the edge of the anchor on the axis of the Floating layers\n* placement. This ensures that the polygon can't be too shallow to be useful.\n*/\nconst minInset = 5;\nfunction safeAreaPolygonConstraints(rect) {\n\treturn {\n\t\tconstrainX: (value) => Math.min(Math.max(value, rect.x + minInset), rect.x + rect.width - minInset),\n\t\tconstrainY: (value) => Math.min(Math.max(value, rect.y + minInset), rect.y + rect.height - minInset)\n\t};\n}\nconst mouseOffset = 4;\n/**\n* Create the points of a triangle between the mouse cursor, and one side\n* (determined by the placement) of the rect. The lines from the cursor point to\n* the side points should not intersect the provided rect.\n*/\nfunction polygonPoints({ x, y }, placement, rect, { constrainX, constrainY }) {\n\tconst [tl, bl, tr, br] = Rect.points(rect);\n\tswitch (placement) {\n\t\tcase \"left\": {\n\t\t\tconst mousePoint = {\n\t\t\t\tx: constrainX(x - mouseOffset),\n\t\t\t\ty\n\t\t\t};\n\t\t\treturn [\n\t\t\t\tmousePoint,\n\t\t\t\tpreferredPoint(br, bl, [mousePoint, tr]),\n\t\t\t\tpreferredPoint(tr, tl, [mousePoint, br])\n\t\t\t];\n\t\t}\n\t\tcase \"right\": {\n\t\t\tconst mousePoint = {\n\t\t\t\tx: constrainX(x + mouseOffset),\n\t\t\t\ty\n\t\t\t};\n\t\t\treturn [\n\t\t\t\tmousePoint,\n\t\t\t\tpreferredPoint(bl, br, [mousePoint, tl]),\n\t\t\t\tpreferredPoint(tl, tr, [mousePoint, bl])\n\t\t\t];\n\t\t}\n\t\tcase \"top\": {\n\t\t\tconst mousePoint = {\n\t\t\t\tx,\n\t\t\t\ty: constrainY(y - mouseOffset)\n\t\t\t};\n\t\t\treturn [\n\t\t\t\tmousePoint,\n\t\t\t\tpreferredPoint(bl, tl, [mousePoint, br]),\n\t\t\t\tpreferredPoint(br, tr, [mousePoint, bl])\n\t\t\t];\n\t\t}\n\t\tcase \"bottom\": {\n\t\t\tconst mousePoint = {\n\t\t\t\tx,\n\t\t\t\ty: constrainY(y + mouseOffset)\n\t\t\t};\n\t\t\treturn [\n\t\t\t\tmousePoint,\n\t\t\t\tpreferredPoint(tl, bl, [mousePoint, tr]),\n\t\t\t\tpreferredPoint(tr, br, [mousePoint, tl])\n\t\t\t];\n\t\t}\n\t\tdefault: assertNever$1(placement);\n\t}\n}\n/**\n* Create a css inset value for the safe area based on the placement of the\n* floating element, and the delta between the floating element and anchor\n* elements. The safe area is rendered inside the floating element, so the\n* offset should only be <= 0 to move the safe area in line with the anchor.\n*/\nfunction safeAreaInset(placement, delta) {\n\tswitch (placement) {\n\t\tcase \"left\": return `${Math.min(delta.y, 0)}px auto auto 0px`;\n\t\tcase \"right\": return `${Math.min(delta.y, 0)}px 0px auto auto`;\n\t\tcase \"top\": return `0px auto auto ${Math.min(delta.x, 0)}px`;\n\t\tcase \"bottom\": return `auto auto 0px ${Math.min(delta.x, 0)}px`;\n\t\tdefault: assertNever$1(placement);\n\t}\n}\nfunction floatingPositionSafeAreaStyle(x, y, placement, anchorRect, floatingRect) {\n\tconst minX = Math.min(floatingRect.x, anchorRect.x);\n\tconst minY = Math.min(floatingRect.y, anchorRect.y);\n\tconst rect = Rect.merge(anchorRect, floatingRect);\n\tconst points = polygonPoints({\n\t\tx,\n\t\ty\n\t}, placement, floatingRect, safeAreaPolygonConstraints(anchorRect)).map((point) => `${point.x - minX}px ${point.y - minY}px`).join(\", \");\n\treturn {\n\t\theight: `${rect.height}px`,\n\t\twidth: `${rect.width}px`,\n\t\tclipPath: `polygon(${points})`,\n\t\tinset: safeAreaInset(placement, Rect.delta(anchorRect, floatingRect))\n\t};\n}\nfunction valueForFloatingAlignment(alignment) {\n\tswitch (alignment) {\n\t\tcase \"start\": return 0;\n\t\tcase \"center\": return .5;\n\t\tcase \"end\": return 1;\n\t\tdefault: assertNever$1(alignment);\n\t}\n}\n/**\n* Convert Placement and Alignment to framer-motion's originX/originY so that\n* the Floating element always appears to animate from the anchor.\n*/\nfunction motionOriginFromFloatingPosition(placement = \"bottom\", alignment = \"center\") {\n\tswitch (placement) {\n\t\tcase \"top\": return {\n\t\t\toriginX: valueForFloatingAlignment(alignment),\n\t\t\toriginY: 1\n\t\t};\n\t\tcase \"right\": return {\n\t\t\toriginX: 0,\n\t\t\toriginY: valueForFloatingAlignment(alignment)\n\t\t};\n\t\tcase \"bottom\": return {\n\t\t\toriginX: valueForFloatingAlignment(alignment),\n\t\t\toriginY: 0\n\t\t};\n\t\tcase \"left\": return {\n\t\t\toriginX: 1,\n\t\t\toriginY: valueForFloatingAlignment(alignment)\n\t\t};\n\t\tdefault: assertNever$1(placement);\n\t}\n}\n\n//#endregion\n//#region ../../library/src/modules/Floating.tsx\n/**\n* If the Floating layer is in a fixed position context, the best rendering will\n* be achieved by rendering the Floating layer with fixed positioning. As soon\n* as we detect that an ancestor is fixed, we can opt into that. Otherwise using\n* absolute positioning.\n*\n* At the same time, we can check for any ancestors that aren't the body element\n* that are scrollable. When the Floating layer is in a scrollable container, we\n* need to do extra work to ensure that even if those containers are scrolled,\n* the relative overlay stays pinned to its anchor. This is some overhead so we\n* only do it when we need to.\n*/\nfunction domReadGetAncestorInfo(anchorRef) {\n\tlet el = anchorRef.current;\n\tconst info = {\n\t\tposition: \"absolute\",\n\t\tscrolls: false\n\t};\n\twhile (el) {\n\t\tif (el?.tagName === \"BODY\") return info;\n\t\tif (getComputedStyle(el)?.position === \"fixed\") info.position = \"fixed\";\n\t\tif (el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight) info.scrolls = true;\n\t\tif (info.scrolls && info.position === \"fixed\") return info;\n\t\tel = el.parentElement;\n\t}\n\treturn info;\n}\nfunction domReadStartAnimationFrameLoop(onRead) {\n\tframe.read(onRead, true);\n\treturn () => cancelFrame(onRead);\n}\n/**\n* Create a function that can be called to update the style and shape of the\n* safe area. We store the last mouse position inline so that we can update the\n* safe area to stay near the mouse when the anchor moves.\n*/\nfunction domWriteCreateUpdateSafeArea(safeAreaRef) {\n\tlet x = 0;\n\tlet y = 0;\n\treturn (anchorRect, calculatedRect, placement, event) => {\n\t\tif (!safeAreaRef.current?.style) return;\n\t\tx = event?.clientX ?? x;\n\t\ty = event?.clientY ?? y;\n\t\tObject.assign(safeAreaRef.current.style, floatingPositionSafeAreaStyle(x, y, placement, anchorRect, calculatedRect));\n\t};\n}\nfunction domWriteUpdatePosition(floatingPositionRef, position, rect, scrollX, scrollY) {\n\tif (!floatingPositionRef.current) return;\n\tObject.assign(floatingPositionRef.current.style, {\n\t\tposition,\n\t\tvisibility: \"visible\",\n\t\tleft: (rect?.x ?? 0) + scrollX + \"px\",\n\t\ttop: (rect?.y ?? 0) + scrollY + \"px\"\n\t});\n}\nconst FloatingStackingContext = /* @__PURE__ */ (() => {\n\tconst Context = React.createContext(/* @__PURE__ */ new Set());\n\tContext.displayName = \"FloatingStackingContext\";\n\treturn Context;\n})();\n/**\n* For the best UX, when triggered on hover, the Floating layer is only\n* dismissed when the mouse is not inside the floating element, the anchor, or\n* the safe area.\n*\n* Additionally support hiding Floating layers with the \"Escape\" key when they\n* do not have a safe area.\n*/\nfunction useDismissFloatingLayer(anchorRef, floatingPositionRef, safeAreaRef, { safeArea, onDismiss }) {\n\tconst descendantStackingContext = useConstant(() => /* @__PURE__ */ new Set());\n\tconst ancestorStackingContext = React.useContext(FloatingStackingContext);\n\tconst [isPresent, safeToRemove] = usePresence();\n\tReact.useEffect(() => {\n\t\tif (isPresent) {\n\t\t\tif (!floatingPositionRef.current) return;\n\t\t\tfloatingPositionRef.current.style.pointerEvents = \"\";\n\t\t\tancestorStackingContext.add(floatingPositionRef.current);\n\t\t} else {\n\t\t\tif (!floatingPositionRef.current) return;\n\t\t\tfloatingPositionRef.current.style.pointerEvents = \"none\";\n\t\t\tancestorStackingContext.delete(floatingPositionRef.current);\n\t\t\tsafeToRemove();\n\t\t}\n\t}, [\n\t\tisPresent,\n\t\tsafeToRemove,\n\t\tfloatingPositionRef,\n\t\tancestorStackingContext\n\t]);\n\tReact.useEffect(() => {\n\t\tif (!safeArea) {\n\t\t\tconst handleEscape = (e) => {\n\t\t\t\tif (e.key !== \"Escape\") return;\n\t\t\t\tonDismiss();\n\t\t\t};\n\t\t\tsafeWindow.addEventListener(\"keyup\", handleEscape);\n\t\t\treturn () => safeWindow.removeEventListener(\"keyup\", handleEscape);\n\t\t}\n\t\tlet latestEvent;\n\t\tfunction maybeDismiss() {\n\t\t\tif (!latestEvent || descendantStackingContext.size !== 0) return;\n\t\t\tfor (const element of document.elementsFromPoint(latestEvent.x, latestEvent.y)) {\n\t\t\t\tif (element === anchorRef.current) return;\n\t\t\t\tif (element === floatingPositionRef.current) return;\n\t\t\t\tif (element === safeAreaRef.current) return;\n\t\t\t}\n\t\t\tonDismiss();\n\t\t}\n\t\tfunction scheduleMaybeDismiss(event) {\n\t\t\tlatestEvent = event;\n\t\t\tframe.read(maybeDismiss);\n\t\t}\n\t\tsafeWindow.addEventListener(\"mousemove\", scheduleMaybeDismiss);\n\t\treturn () => {\n\t\t\tsafeWindow.removeEventListener(\"mousemove\", scheduleMaybeDismiss);\n\t\t\tcancelFrame(maybeDismiss);\n\t\t};\n\t}, [\n\t\tonDismiss,\n\t\tsafeArea,\n\t\tanchorRef,\n\t\tsafeAreaRef,\n\t\tfloatingPositionRef\n\t]);\n\treturn descendantStackingContext;\n}\nfunction makeGetSafePlacementFloatingPositionRect({ placement, alignment, offset, collisionDetectionSize, collisionDetectionPadding }) {\n\treturn (anchor, element) => getSafePlacementFloatingPositionRect(anchor, element, placement, alignment, offset, collisionDetectionSize, collisionDetectionPadding);\n}\n/**\n* Determine the motion transform origin for the floating layer based on its\n* placement and alignment. This can change if we have to flip the placement to\n* avoid collision with the window.\n*/\nfunction useDynamicMotionOrigin(initialPlacement, alignment) {\n\treturn useConstant(() => {\n\t\tconst { originX, originY } = motionOriginFromFloatingPosition(initialPlacement, alignment);\n\t\tconst origin = {\n\t\t\tx: motionValue(originX),\n\t\t\ty: motionValue(originY)\n\t\t};\n\t\treturn [origin, (placement) => {\n\t\t\tconst values = motionOriginFromFloatingPosition(placement, alignment);\n\t\t\torigin.x.set(values.originX);\n\t\t\torigin.y.set(values.originY);\n\t\t}];\n\t});\n}\n/**\n* Clone the child of the floating layer to assign transform origin motion\n* values. This ensures that any animations performed by the floating layer will\n* always appear to originate from the trigger even if we have flipped the\n* placement to avoid collision with the window.\n*/\nfunction childrenWithOrigin(child, { x, y }) {\n\tif (!child || !isReactChild(child) || !isReactElement(child)) return null;\n\tif (!isObject$1(child.props.style) && !isUndefined(child.props.style)) return null;\n\tconst style = {\n\t\t...child.props.style,\n\t\toriginX: x,\n\t\toriginY: y\n\t};\n\treturn React.cloneElement(child, { style });\n}\nconst overlayContainerId = \"overlay\";\nconst templateOverlayContainerId = \"template-overlay\";\nfunction getPortalContainer$1(deprecatedSelector, inComponent) {\n\tif (inComponent || isUndefined(deprecatedSelector)) {\n\t\tconst container = document.querySelector(`#${\"template-overlay\"}`) ?? document.querySelector(`#${\"overlay\"}`);\n\t\tif (container) return container;\n\t}\n\tconst container = isString(deprecatedSelector) ? document.querySelector(deprecatedSelector) : void 0;\n\tif (container) return container;\n\treturn document.body;\n}\nfunction Floating({ alignment, placement, safeArea, offsetX, offsetY, anchorRef, className, children, portalSelector, zIndex, collisionDetection = false, collisionDetectionPadding, onDismiss, ...rest }) {\n\tconst floatingPositionRef = React.useRef(null);\n\tconst safeAreaRef = React.useRef(null);\n\tconst contentRef = React.useRef(null);\n\tconst [origin, updateOrigin] = useDynamicMotionOrigin(placement, alignment);\n\tReact.useLayoutEffect(() => {\n\t\tif (!refHasValue(anchorRef) || !contentRef.current || !placement || !alignment) return;\n\t\tconst offset = {\n\t\t\tx: offsetX ?? 0,\n\t\t\ty: offsetY ?? 0\n\t\t};\n\t\tlet cleanup;\n\t\tlet cleanupHasRun = false;\n\t\tlet initialUpdateHasRun = false;\n\t\tlet anchorRect;\n\t\tlet safePlacement;\n\t\tlet calculatedRect;\n\t\tlet latestEvent;\n\t\tlet updateSafeArea;\n\t\tlet scrollX = 0;\n\t\tlet scrollY = 0;\n\t\tconst ancestorInfo = domReadGetAncestorInfo(anchorRef);\n\t\tconst position = ancestorInfo.position;\n\t\tconst elementRect = contentRef.current.getBoundingClientRect();\n\t\tconst getSafePlacementRect = makeGetSafePlacementFloatingPositionRect({\n\t\t\tplacement,\n\t\t\talignment,\n\t\t\toffset,\n\t\t\tcollisionDetectionSize: collisionDetection ? {\n\t\t\t\twidth: safeWindow.innerWidth,\n\t\t\t\theight: safeWindow.innerHeight\n\t\t\t} : void 0,\n\t\t\tcollisionDetectionPadding\n\t\t});\n\t\tconst onRender = () => {\n\t\t\tif (cleanupHasRun) return;\n\t\t\tdomWriteUpdatePosition(floatingPositionRef, position, calculatedRect, scrollX, scrollY);\n\t\t\tif (safeArea) updateSafeArea(anchorRect, calculatedRect, safePlacement, latestEvent);\n\t\t\tlatestEvent = void 0;\n\t\t};\n\t\tconst initialRender = () => {\n\t\t\tupdateSafeArea = domWriteCreateUpdateSafeArea(safeAreaRef);\n\t\t\tif (latestEvent) onRender();\n\t\t\telse domWriteUpdatePosition(floatingPositionRef, position, calculatedRect, scrollX, scrollY);\n\t\t\tinitialUpdateHasRun = true;\n\t\t};\n\t\tconst onUpdate = () => {\n\t\t\tif (cleanupHasRun) return;\n\t\t\tupdateOrigin(safePlacement);\n\t\t};\n\t\tconst domReadUpdateSafePlacementAndRect = () => {\n\t\t\tif (!getSafePlacementRect || cleanupHasRun) return;\n\t\t\tif (position === \"fixed\") {\n\t\t\t\tscrollX = 0;\n\t\t\t\tscrollY = 0;\n\t\t\t} else {\n\t\t\t\tscrollX = safeWindow.scrollX;\n\t\t\t\tscrollY = safeWindow.scrollY;\n\t\t\t}\n\t\t\tanchorRect = anchorRef.current.getBoundingClientRect();\n\t\t\tconst safePlacementAndRect = getSafePlacementRect(anchorRect, elementRect);\n\t\t\tsafePlacement = safePlacementAndRect[0];\n\t\t\tcalculatedRect = safePlacementAndRect[1];\n\t\t};\n\t\tdomReadUpdateSafePlacementAndRect();\n\t\tonUpdate();\n\t\tinitialRender();\n\t\tif (ancestorInfo.scrolls) cleanup = domReadStartAnimationFrameLoop(domReadUpdateSafePlacementAndRect);\n\t\tif (!safeArea) return () => {\n\t\t\tcleanup?.();\n\t\t\tcleanupHasRun = true;\n\t\t};\n\t\tconst handleMouseMove = (event) => {\n\t\t\tlatestEvent = event;\n\t\t\tif (!initialUpdateHasRun) return;\n\t\t\tframe.read(domReadUpdateSafePlacementAndRect, false, true);\n\t\t\tframe.update(onUpdate, false, true);\n\t\t\tframe.render(onRender, false, true);\n\t\t};\n\t\tconst anchor = anchorRef.current;\n\t\tanchor.addEventListener(\"mousemove\", handleMouseMove);\n\t\treturn () => {\n\t\t\tanchor.removeEventListener(\"mousemove\", handleMouseMove);\n\t\t\tcleanup?.();\n\t\t\tcleanupHasRun = true;\n\t\t};\n\t}, [\n\t\tsafeArea,\n\t\tplacement,\n\t\talignment,\n\t\toffsetX,\n\t\toffsetY,\n\t\tanchorRef,\n\t\tcollisionDetection,\n\t\tcollisionDetectionPadding,\n\t\tupdateOrigin\n\t]);\n\tconst descendantContext = useDismissFloatingLayer(anchorRef, floatingPositionRef, safeAreaRef, {\n\t\tsafeArea,\n\t\tonDismiss\n\t});\n\tconst inComponent = useContext(ComponentContainerContext);\n\treturn ReactDOM.createPortal(/* @__PURE__ */ jsxs(motion.div, {\n\t\tref: floatingPositionRef,\n\t\tclassName,\n\t\tstyle: {\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\tvisibility: \"hidden\",\n\t\t\twidth: \"auto\",\n\t\t\theight: \"auto\",\n\t\t\tposition: \"absolute\",\n\t\t\tzIndex\n\t\t},\n\t\t...rest,\n\t\tchildren: [safeArea ? /* @__PURE__ */ jsx(\"div\", {\n\t\t\tref: safeAreaRef,\n\t\t\tstyle: { position: \"absolute\" },\n\t\t\t\"data-safearea\": true\n\t\t}) : /* @__PURE__ */ jsx(\"div\", {\n\t\t\tstyle: {\n\t\t\t\tposition: \"fixed\",\n\t\t\t\tinset: 0\n\t\t\t},\n\t\t\t\"aria-hidden\": true,\n\t\t\tonClick: onDismiss\n\t\t}), /* @__PURE__ */ jsx(FloatingStackingContext.Provider, {\n\t\t\tvalue: descendantContext,\n\t\t\tchildren: /* @__PURE__ */ jsx(ResetOuterLinkContext, { children: /* @__PURE__ */ jsx(InjectSelectionStyle, {\n\t\t\t\ttriggerId: anchorRef.current?.id ?? void 0,\n\t\t\t\tchildren: /* @__PURE__ */ jsx(\"div\", {\n\t\t\t\t\tref: contentRef,\n\t\t\t\t\tchildren: childrenWithOrigin(children, origin)\n\t\t\t\t})\n\t\t\t}) })\n\t\t})]\n\t}), getPortalContainer$1(portalSelector, inComponent));\n}\n\n//#endregion\n//#region ../../library/src/modules/Instance.tsx\nconst Instance = /* @__PURE__ */ React.forwardRef(function Instance({ Component, ...props }, ref) {\n\treturn Component ? /* @__PURE__ */ jsx(Component, {\n\t\t...props,\n\t\tref\n\t}) : null;\n});\n\n//#endregion\n//#region ../../library/src/modules/AutoBreakpointVariant.tsx\n/**\n* Automatically applies the active breakpoint variant name to embedded component instances\n* (e.g. components rendered from Rich Text) if they do not have a variant set.\n*\n* @internal\n*/\nfunction AutoBreakpointVariant({ component, props }) {\n\tconst generatedComponentContext = useContext(GeneratedComponentContext);\n\tconst element = createElement(component, props);\n\tif (\"variant\" in props && props.variant != null) return element;\n\tif (!generatedComponentContext) return element;\n\tconst { activeVariantId, humanReadableVariantMap } = generatedComponentContext;\n\tif (!activeVariantId || !humanReadableVariantMap) return element;\n\tconst overrides = {};\n\tfor (const [name, id] of Object.entries(humanReadableVariantMap)) overrides[id] = { variant: name };\n\treturn /* @__PURE__ */ jsx(PropertyOverrides, {\n\t\toverrides,\n\t\tbreakpoint: activeVariantId,\n\t\tchildren: element\n\t});\n}\n\n//#endregion\n//#region ../../library/src/modules/GracefullyDegradingErrorBoundary.tsx\n/**\n* Top-level error boundary that gracefully degrades to a non-interactive fallback UI. See also https://github.com/framer/company/issues/31364.\n* Inspired by https://github.com/uncurated-tests/graceful-degradation-hydration-error/blob/main/app/gracefully-degrading-error-boundary.tsx\n* @internal\n*/\nvar GracefullyDegradingErrorBoundary = class extends Component {\n\tstate = { error: void 0 };\n\tmessage = \"Made UI non-interactive due to an error.\";\n\tmessageFatal = \"Fatal error.\";\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { error };\n\t}\n\tcomponentDidCatch(error) {\n\t\twindow.__framer_hadFatalError = true;\n\t\tif (\"cause\" in error) error = error.cause;\n\t\tconsole.error(getPleaseReportMessage(isBot ? this.message : this.messageFatal, error));\n\t\tif (Math.random() > .5) return;\n\t\tconst stack = error instanceof Error && typeof error.stack === \"string\" ? error.stack : null;\n\t\tsendTrackingEvent(\"published_site_load_error\", {\n\t\t\tmessage: String(error),\n\t\t\tstack\n\t\t});\n\t}\n\trender() {\n\t\tconst error = this.state.error;\n\t\tif (!error) return this.props.children;\n\t\t/**\n\t\t* At this point, we know that nothing interactive can happen anymore, so we can run side-effects (reading from the DOM) in render.\n\t\t*\n\t\t* As a side-note, we don't need to handle recoverable hydration errors here, because recoverable errors, such as hydration mismatches, are handled by React and skip error boundaries.\n\t\t* So we only need to handle fatal errors. A fatal error is an error outside of hydration, where React would unmount the root. An example would be a runtime TypeError.\n\t\t*/\n\t\tconst unwrappedError = \"cause\" in error ? error.cause : error;\n\t\tconst closingHTMLComment = /-->/gu;\n\t\tconst closingHTMLCommentReplacement = \"--!>\";\n\t\tconst dom = isBot ? document.getElementById(\"main\")?.innerHTML || \"\" : \"\";\n\t\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\t\tstyle: { display: \"contents\" },\n\t\t\tsuppressHydrationWarning: true,\n\t\t\tdangerouslySetInnerHTML: { __html: `<!-- DOM replaced by GracefullyDegradingErrorBoundary due to \"${unwrappedError.message.replace(closingHTMLComment, closingHTMLCommentReplacement)}\". ${getPleaseReportMessage()}: --><!-- Stack: ${error.stack?.replace(closingHTMLComment, \"--!>\")} -->` + dom }\n\t\t});\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/Link/currentSiteId.ts\nlet currentSiteId;\n/** Must be called before PageRoot renders so navigation checks can read the site ID without racing. */\nfunction setCurrentSiteId(siteId) {\n\tcurrentSiteId = siteId;\n}\nfunction getCurrentSiteId() {\n\treturn currentSiteId;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/findAnchorElement.ts\n/**\n* Search the closest anchor element ancestor of the given target.\n* @param target The starting element.\n* @param withinElement If an element is given, the search will stop when it\n* hits the element. Otherwise, it will try to get the closest anchor element.\n*/\nfunction findAnchorElement(target, withinElement) {\n\tif (target instanceof HTMLAnchorElement) return target;\n\tif (target instanceof Element) {\n\t\tif (target === withinElement) return null;\n\t\treturn findAnchorElement(target.parentElement, withinElement);\n\t}\n\treturn null;\n}\n\n//#endregion\n//#region ../../library/src/modules/ChildrenCanSuspend.tsx\nfunction ChildrenCanSuspend({ children }) {\n\treturn /* @__PURE__ */ jsx(SuspenseThatPreservesDom, { children });\n}\nfunction withChildrenCanSuspend(Component) {\n\treturn forwardRef(function withChildrenCanSuspendInner(props, ref) {\n\t\treturn /* @__PURE__ */ jsx(ChildrenCanSuspend, { children: /* @__PURE__ */ jsx(Component, {\n\t\t\t...props,\n\t\t\tref\n\t\t}) });\n\t});\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/findMatchingRouteAttributes.tsx\nfunction findMatchingRouteAttributesForWebPageLink(router, currentRoute, pageLink, activeLocale, resolvedSlugs, implicitPathVariables) {\n\tconst { webPageId, hash, pathVariables, hashVariables } = pageLink;\n\treturn getRouteAttributes(router, currentRoute, webPageId, hash, implicitPathVariables, pathVariables, hashVariables, resolvedSlugs, activeLocale);\n}\nfunction findMatchingRouteAttributesForResolvedPath(router, path, implicitPathVariables, locales) {\n\tif (!router.routes || !router.getRoute) return;\n\tif (!isInternalURL(path)) return;\n\ttry {\n\t\tconst [pathnameWithQueryParams, hash] = path.split(\"#\", 2);\n\t\tassert$1(pathnameWithQueryParams !== void 0, \"A href must have a defined pathname.\");\n\t\tconst [pathname] = pathnameWithQueryParams.split(\"?\", 2);\n\t\tassert$1(pathname !== void 0, \"A href must have a defined pathname.\");\n\t\tconst allowRootRouteFallback = pathname === \"\";\n\t\tconst { routeId, pathVariables, localeId } = inferInitialRouteFromPath(router.routes, pathname, allowRootRouteFallback, locales);\n\t\tconst route = router.getRoute(routeId);\n\t\tif (route) return {\n\t\t\trouteId,\n\t\t\troute,\n\t\t\thref: path,\n\t\t\telementId: hash,\n\t\t\tpathVariables: Object.assign({}, implicitPathVariables, pathVariables),\n\t\t\tlocale: localeId ? locales?.find(({ id }) => id === localeId) : void 0\n\t\t};\n\t} catch {}\n}\nfunction getRouteAttributes(router, currentRoute, routeId, hash, implicitPathVariables, pathVariables, hashVariables, resolvedSlugs, activeLocale) {\n\tconst combinedPathVariables = {\n\t\t...implicitPathVariables,\n\t\t...pathVariables,\n\t\t...resolvedSlugs?.path\n\t};\n\tconst combinedHashVariables = {\n\t\t...implicitPathVariables,\n\t\t...hashVariables,\n\t\t...resolvedSlugs?.hash\n\t};\n\tconst route = router.getRoute?.(routeId);\n\tconst resolvedHref = getPathForRoute(route, {\n\t\tcurrentRoutePath: currentRoute?.path,\n\t\tcurrentRoutePathLocalized: currentRoute?.pathLocalized,\n\t\tcurrentPathVariables: currentRoute?.pathVariables,\n\t\thash,\n\t\tpathVariables: combinedPathVariables,\n\t\thashVariables: combinedHashVariables,\n\t\tpreserveQueryParams: router.preserveQueryParams,\n\t\tsiteCanonicalURL: router.siteCanonicalURL,\n\t\tlocaleId: activeLocale?.id\n\t});\n\treturn {\n\t\trouteId,\n\t\troute,\n\t\thref: resolvedHref,\n\t\telementId: resolvedHref.split(\"#\", 2)[1],\n\t\tpathVariables: combinedPathVariables,\n\t\tlocale: activeLocale ?? void 0\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/pathVariables.tsx\nconst pathVariablesRegExp = /:([a-z]\\w*)/gi;\n/** @internal */\nconst PathVariablesContext = /* @__PURE__ */ createContext(void 0);\n/**\n* Implicit path variables (defaults to use for links) are provided…\n*\n* - via the PathVariablesContext, for use with repeaters\n*\n*   e.g. a link to /blog/:slug, repeated multiple times with different :slug\n*   variables\n*\n* - via the current dynamic page\n*\n*   e.g. a page links to itself (permalink? scroll target?)\n*\n* XXX: You never know which route these path variables are intended for, so\n* it's possible to have a mismatch. Should this hook accept a route ID?\n*\n* @internal\n*/\nfunction useImplicitPathVariables() {\n\tconst contextPathVariables = useContext(PathVariablesContext);\n\tconst currentPathVariables = useCurrentRoute()?.pathVariables;\n\treturn contextPathVariables || currentPathVariables;\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/linkMatchesRoute.tsx\n/**\n* @param route The current route to compare against.\n* @param link The link that may point at the current page.\n* @param implicitPathVariables Path variables that will be used by default if\n* not explicitly defined in the link.\n*/\nfunction linkMatchesRoute(route, { webPageId, hash, pathVariables }, implicitPathVariables) {\n\tif (webPageId !== route.id) return false;\n\tif (hash) return false;\n\tif (route.path && route.pathVariables) {\n\t\tconst combinedPathVariable = Object.assign({}, implicitPathVariables, pathVariables);\n\t\tfor (const [, key] of route.path.matchAll(pathVariablesRegExp)) {\n\t\t\tif (!key) return false;\n\t\t\tif (route.pathVariables[key] !== combinedPathVariable[key]) return false;\n\t\t}\n\t}\n\treturn true;\n}\n/**\n* @internal\n*/\nfunction useLinkMatchesRoute(link) {\n\tconst route = useCurrentRoute();\n\tconst contextPathVariables = useContext(PathVariablesContext);\n\tif (!route) return false;\n\tconst pageLink = isString(link) ? linkFromFramerPageLink(link) : link;\n\treturn isLinkToWebPage(pageLink) ? linkMatchesRoute(route, pageLink, contextPathVariables) : false;\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/navigationCheck.ts\nconst navigationChecks = /* @__PURE__ */ new Map();\nconst retryDelayMs = 500;\nconst waitForNavigationResolutionTimeoutMs = 500;\nlet navigationCheckEnabled;\nlet safariOnlyEnablement = false;\nfunction hasServerOnlyRoutes() {\n\treturn Boolean(getNavigationServerTimingEntry(\"ss-only-routes\"));\n}\nfunction normalizeUrl(url) {\n\tif (typeof window === \"undefined\") return void 0;\n\tconst baseUrl = window.location.href;\n\tlet normalizedUrl;\n\ttry {\n\t\tnormalizedUrl = new URL(url, baseUrl);\n\t} catch {\n\t\treturn;\n\t}\n\tnormalizedUrl.hash = \"\";\n\treturn normalizedUrl;\n}\n/**\n* Detects paths FDS rewrote to another origin via `rewrite;desc=\"external\"` when no site ID is present.\n*/\nfunction isExternalRewrite(serverTimingHeader) {\n\treturn getServerTimingEntry(\"rewrite\", serverTimingHeader)?.description === \"external\";\n}\nfunction isNavigationCheckEnabled() {\n\tif (!getLibraryFeatures().checkServerSideRouter) return false;\n\tif (navigationCheckEnabled === void 0) {\n\t\tconst serverOnlyRoutes = hasServerOnlyRoutes();\n\t\tsafariOnlyEnablement = !serverOnlyRoutes && isSafari() && safariVersion() < 16.4;\n\t\tnavigationCheckEnabled = serverOnlyRoutes || safariOnlyEnablement;\n\t}\n\treturn navigationCheckEnabled;\n}\nfunction mapResponseToNavigationResolution(response, probedUrl) {\n\tif (response.type === \"opaqueredirect\") return { decision: \"server\" };\n\tif (!response.ok) return { decision: \"server\" };\n\tconst redirectLocation = response.headers.get(\"Framer-Location\");\n\tif (redirectLocation) try {\n\t\treturn {\n\t\t\tdecision: \"server\",\n\t\t\tredirectUrl: new URL(redirectLocation, probedUrl).href\n\t\t};\n\t} catch {\n\t\treturn { decision: \"server\" };\n\t}\n\tconst responseSiteId = response.headers.get(\"Framer-Site-Id\");\n\tif (responseSiteId === null) return { decision: isExternalRewrite(response.headers.get(\"server-timing\")) ? \"server\" : \"client\" };\n\treturn { decision: responseSiteId === getCurrentSiteId() ? \"client\" : \"server\" };\n}\nasync function probe(url) {\n\tconst response = await fetch(url, {\n\t\tmethod: \"HEAD\",\n\t\tredirect: \"manual\",\n\t\tcredentials: \"same-origin\",\n\t\theaders: { \"Framer-Navigation\": \"true\" }\n\t});\n\tif (safariOnlyEnablement) {\n\t\tif (response.type !== \"opaqueredirect\" && response.status !== 0 && response.ok && !response.headers.has(\"Framer-Location\")) {\n\t\t\tsafariOnlyEnablement = false;\n\t\t\tif (!getServerTimingEntry(\"ss-only-routes\", response.headers.get(\"server-timing\"))) navigationCheckEnabled = false;\n\t\t}\n\t}\n\tif (response.status >= 500) throw new Error(`Transient response status ${response.status}`);\n\treturn mapResponseToNavigationResolution(response, url);\n}\nfunction cacheNavigationResolution(urlKey, resolution) {\n\tif (navigationChecks.has(urlKey)) navigationChecks.set(urlKey, resolution);\n}\nasync function retryNavigationCheck(urlKey) {\n\tawait delay$1(retryDelayMs);\n\ttry {\n\t\tcacheNavigationResolution(urlKey, await probe(urlKey));\n\t} catch {\n\t\tnavigationChecks.delete(urlKey);\n\t}\n}\nasync function runNavigationCheck(urlKey) {\n\ttry {\n\t\tconst resolution = await probe(urlKey);\n\t\tcacheNavigationResolution(urlKey, resolution);\n\t\treturn resolution;\n\t} catch {\n\t\tretryNavigationCheck(urlKey);\n\t\treturn { decision: \"server\" };\n\t}\n}\nfunction startNavigationCheck(url) {\n\tif (!isNavigationCheckEnabled()) return;\n\tconst normalizedUrl = normalizeUrl(url);\n\tif (!normalizedUrl || normalizedUrl.origin !== window.location.origin) return;\n\tconst urlKey = normalizedUrl.href;\n\tif (navigationChecks.has(urlKey)) return;\n\tnavigationChecks.set(urlKey, runNavigationCheck(urlKey));\n}\nfunction getNavigationResolution(url) {\n\tconst normalizedUrl = normalizeUrl(url);\n\tif (!normalizedUrl) return void 0;\n\tconst navigationCheck = navigationChecks.get(normalizedUrl.href);\n\treturn navigationCheck && !isPromise(navigationCheck) ? navigationCheck : void 0;\n}\nasync function waitForNavigationResolution(url) {\n\tconst normalizedUrl = normalizeUrl(url);\n\tif (!normalizedUrl) return void 0;\n\tconst navigationCheck = navigationChecks.get(normalizedUrl.href);\n\tif (!navigationCheck) return void 0;\n\tif (!isPromise(navigationCheck)) return navigationCheck;\n\treturn Promise.race([navigationCheck, delay$1(waitForNavigationResolutionTimeoutMs).then(() => void 0)]);\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/observeRouteForPreloading.ts\nconst PRELOAD_AFTER_MS = 500;\nconst OBSERVER_THRESHOLD = .9;\nconst LOW_MEMORY_THRESHOLD = 1.7;\nconst MAX_CONCURRENT_PRELOADS_SLOW_NETWORK = 4;\nconst MAX_CONCURRENT_PRELOADS_FAST_NETWORK = Infinity;\nconst nodeToRoute = /* @__PURE__ */ new WeakMap();\nconst preloadedRoutes = /* @__PURE__ */ new Set();\nconst routeToNodesInViewport = /* @__PURE__ */ new Map();\nfunction getObserveRouteForPreloadingFn() {\n\tconst connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection || {};\n\tconst lowDeviceMemory = navigator.deviceMemory && navigator.deviceMemory < LOW_MEMORY_THRESHOLD;\n\tlet effectiveType, preloadDisabled, maxPreloadAmount;\n\tfunction updateConnection() {\n\t\teffectiveType = connection.effectiveType || \"\";\n\t\tpreloadDisabled = connection.saveData || effectiveType.includes(\"2g\");\n\t\tmaxPreloadAmount = effectiveType === \"3g\" || lowDeviceMemory ? MAX_CONCURRENT_PRELOADS_SLOW_NETWORK : MAX_CONCURRENT_PRELOADS_FAST_NETWORK;\n\t}\n\tconnection.addEventListener?.(\"change\", updateConnection);\n\tupdateConnection();\n\tconst observer = new IntersectionObserver(onPreloadIntersectionChange, { threshold: OBSERVER_THRESHOLD });\n\tlet activePreloadsAmount = 0;\n\tasync function preloadTimeout(context, target) {\n\t\tif (preloadDisabled) return;\n\t\tstartNavigationCheck(context.navigationUrl);\n\t\tconst { id, preload } = context;\n\t\tconst nodesInViewport = routeToNodesInViewport.get(id);\n\t\tif (!nodesInViewport?.size || preloadedRoutes.has(id)) return;\n\t\tif (activePreloadsAmount >= maxPreloadAmount) {\n\t\t\tsetTimeout(() => preloadTimeout(context, target), PRELOAD_AFTER_MS);\n\t\t\treturn;\n\t\t}\n\t\t++activePreloadsAmount;\n\t\tpreloadedRoutes.add(id);\n\t\tconst preloadPromise = preload()?.catch(() => {});\n\t\tobserver.unobserve(target);\n\t\tnodeToRoute.delete(target);\n\t\tfor (const node of nodesInViewport) {\n\t\t\tobserver.unobserve(node);\n\t\t\tnodeToRoute.delete(node);\n\t\t}\n\t\tnodesInViewport.clear();\n\t\trouteToNodesInViewport.delete(id);\n\t\tawait preloadPromise;\n\t\t--activePreloadsAmount;\n\t}\n\tfunction onPreloadIntersectionChange(entries) {\n\t\tfor (const entry of entries) {\n\t\t\tconst target = entry.target;\n\t\t\tconst context = nodeToRoute.get(target);\n\t\t\tif (!context || preloadedRoutes.has(context.id)) {\n\t\t\t\tobserver.unobserve(target);\n\t\t\t\tnodeToRoute.delete(target);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst preloadId = context.id;\n\t\t\tconst nodes = routeToNodesInViewport.get(preloadId);\n\t\t\tconst amountOfNodesInViewport = routeToNodesInViewport.get(preloadId)?.size ?? 0;\n\t\t\tif (entry.isIntersecting) {\n\t\t\t\tif (nodes) nodes.add(target);\n\t\t\t\telse routeToNodesInViewport.set(preloadId, /* @__PURE__ */ new Set([target]));\n\t\t\t\tsetTimeout(() => preloadTimeout(context, target), PRELOAD_AFTER_MS);\n\t\t\t} else {\n\t\t\t\tif (nodes) nodes.delete(target);\n\t\t\t\tif (amountOfNodesInViewport <= 1) routeToNodesInViewport.delete(preloadId);\n\t\t\t}\n\t\t}\n\t}\n\treturn (node, preload, id, navigationUrl) => {\n\t\tif (preloadedRoutes.has(id)) return;\n\t\tnodeToRoute.set(node, {\n\t\t\tid,\n\t\t\tpreload,\n\t\t\tnavigationUrl\n\t\t});\n\t\tobserver.observe(node);\n\t\treturn () => {\n\t\t\tnodeToRoute.delete(node);\n\t\t\tobserver.unobserve(node);\n\t\t};\n\t};\n}\nconst observeRouteForPreloading = !shouldPreloadBasedOnUA || typeof IntersectionObserver === \"undefined\" ? null : /* @__PURE__ */ getObserveRouteForPreloadingFn();\n\n//#endregion\n//#region ../../library/src/modules/Link/types.ts\n/** @internal */\nlet AnchorLinkTarget = /* @__PURE__ */ function(AnchorLinkTarget) {\n\tAnchorLinkTarget[\"_blank\"] = \"_blank\";\n\tAnchorLinkTarget[\"_self\"] = \"_self\";\n\treturn AnchorLinkTarget;\n}({});\n\n//#endregion\n//#region ../../library/src/modules/Link/propsForLink.tsx\nfunction propsForLink(href, options) {\n\tconst isInternal = isInternalURL(href);\n\tconst props = {\n\t\thref: href === \"\" || isValidURL(href, isInternal) ? href : `https://${href}`,\n\t\ttarget: getTargetAttrValue(options?.openInNewTab, isInternal),\n\t\trel: !isInternal ? options?.rel : void 0\n\t};\n\tif (options?.preserveParams) {\n\t\tprops.href = forwardCurrentQueryParams(props.href ?? href);\n\t\tprops[\"data-framer-preserve-params\"] = true;\n\t}\n\tif (options?.trackLinkClick) props.onClick = () => {\n\t\toptions.trackLinkClick(href);\n\t};\n\treturn props;\n}\nfunction getTargetAttrValue(openInNewTab, isInternal) {\n\tif (openInNewTab !== void 0) return openInNewTab ? \"_blank\" : void 0;\n\treturn isInternal ? void 0 : \"_blank\";\n}\n\n//#endregion\n//#region ../../library/src/modules/resolveSlug.ts\nfunction handleResolveSlugError(error, fallbackMessage) {\n\tconsole.warn(getPleaseReportMessage(`Failed to resolve slug: ${error instanceof Error ? error.message : fallbackMessage ?? \"Unknown error\"}`));\n}\nfunction resolveSlug(unresolvedSlug, collectionUtils, activeLocale) {\n\ttry {\n\t\tconst utils = collectionUtils?.get(unresolvedSlug.collectionId);\n\t\tif (!utils) return handleResolveSlugError(void 0, `Couldn't find collection utils for collection id: \"${unresolvedSlug.collectionId}\"`);\n\t\tconst maybeSlug = utils.getSlugByRecordId(unresolvedSlug.collectionItemId, activeLocale ?? void 0);\n\t\tif (isPromise(maybeSlug)) return maybeSlug.catch(handleResolveSlugError);\n\t\treturn maybeSlug;\n\t} catch (error) {\n\t\thandleResolveSlugError(error);\n\t}\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/resolveSlugs.ts\nasync function resolveSlugs(unresolvedPathSlugs, unresolvedHashSlugs, activeLocale, collectionUtils) {\n\tasync function handleSlugs(unresolvedSlugs) {\n\t\tif (!unresolvedSlugs) return {};\n\t\tconst result = {};\n\t\tfor (const slugKey in unresolvedSlugs) {\n\t\t\tconst unresolvedSlug = unresolvedSlugs[slugKey];\n\t\t\tassert$1(unresolvedSlug, \"unresolvedSlug should be defined\");\n\t\t\tconst maybeSlug = resolveSlug(unresolvedSlug, collectionUtils, activeLocale);\n\t\t\tconst value = isPromise(maybeSlug) ? await maybeSlug : maybeSlug;\n\t\t\tif (value) result[slugKey] = value;\n\t\t}\n\t\treturn result;\n\t}\n\tconst [pathResult, slugResult] = await Promise.allSettled([handleSlugs(unresolvedPathSlugs), handleSlugs(unresolvedHashSlugs)]);\n\treturn {\n\t\tpath: pathResult.status === \"fulfilled\" ? pathResult.value : void 0,\n\t\thash: slugResult.status === \"fulfilled\" ? slugResult.value : void 0\n\t};\n}\nfunction resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, activeLocale, collectionUtils, promises = []) {\n\tfunction handleSlugs(unresolvedSlugs) {\n\t\tif (!unresolvedSlugs) return;\n\t\tconst result = {};\n\t\tfor (const slugKey in unresolvedSlugs) {\n\t\t\tconst unresolvedSlug = unresolvedSlugs[slugKey];\n\t\t\tif (!unresolvedSlug) continue;\n\t\t\tconst maybeSlug = resolveSlug(unresolvedSlug, collectionUtils, activeLocale);\n\t\t\tif (isPromise(maybeSlug)) promises.push(maybeSlug);\n\t\t\telse if (maybeSlug) result[slugKey] = maybeSlug;\n\t\t}\n\t\treturn result;\n\t}\n\tconst result = {\n\t\tpath: handleSlugs(unresolvedPathSlugs),\n\t\thash: handleSlugs(unresolvedHashSlugs)\n\t};\n\tif (promises.length > 0) return Promise.allSettled(promises);\n\treturn result;\n}\nfunction useResolveSlugsWithSuspense() {\n\tconst collectionUtils = useCollectionUtils();\n\treturn useCallback((unresolvedPathSlugs, unresolvedHashSlugs, activeLocale, promises = []) => {\n\t\treturn resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, activeLocale, collectionUtils, promises);\n\t}, [collectionUtils]);\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/useTrackLinkClick.ts\nfunction useTrackLinkClick({ nodeId, clickTrackingId, router, href, activeLocale }) {\n\tconst collectionUtils = useCollectionUtils();\n\treturn useCallback(async (hrefAttribute) => {\n\t\tif (!router.pageviewEventData?.current) return;\n\t\tconst pageviewEventData = router.pageviewEventData.current instanceof Promise ? await router.pageviewEventData.current : router.pageviewEventData.current;\n\t\tconst pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);\n\t\tif (!isLinkToWebPage(pageLink)) return sendTrackingEvent(\"published_site_click\", {\n\t\t\t...pageviewEventData,\n\t\t\thref: hrefAttribute ? makeUrlAbsolute(hrefAttribute) : null,\n\t\t\tnodeId: nodeId ?? null,\n\t\t\ttrackingId: clickTrackingId || null,\n\t\t\ttargetRoutePath: null,\n\t\t\ttargetWebPageId: null,\n\t\t\ttargetCollectionItemId: null\n\t\t}, \"eager\");\n\t\tconst targetWebPageId = pageLink.webPageId;\n\t\tconst targetRoute = router?.getRoute?.(targetWebPageId);\n\t\tconst targetRoutePath = targetRoute?.path ?? null;\n\t\tlet targetCollectionItemId = null;\n\t\tif (targetRoute?.collectionId && pageLink.pathVariables) {\n\t\t\tconst utils = collectionUtils?.get(targetRoute.collectionId);\n\t\t\tif (!utils) return;\n\t\t\tconst [slug] = Object.values(pageLink.pathVariables);\n\t\t\tif (isString(slug)) {\n\t\t\t\tconst maybeCollectionItemId = utils.getRecordIdBySlug(slug, activeLocale || void 0);\n\t\t\t\ttargetCollectionItemId = (isPromise(maybeCollectionItemId) ? await maybeCollectionItemId : maybeCollectionItemId) ?? null;\n\t\t\t}\n\t\t}\n\t\treturn sendTrackingEvent(\"published_site_click\", {\n\t\t\t...pageviewEventData,\n\t\t\thref: hrefAttribute ? makeUrlAbsolute(hrefAttribute) : null,\n\t\t\tnodeId: nodeId ?? null,\n\t\t\ttrackingId: clickTrackingId ?? null,\n\t\t\ttargetRoutePath,\n\t\t\ttargetWebPageId,\n\t\t\ttargetCollectionItemId\n\t\t}, \"eager\");\n\t}, [\n\t\tnodeId,\n\t\tclickTrackingId,\n\t\trouter,\n\t\thref,\n\t\tactiveLocale,\n\t\tcollectionUtils\n\t]);\n}\n/**\n* Returns absolute path for links on the same domain, or the original URL if it's external.\n*/\nfunction makeUrlAbsolute(href) {\n\ttry {\n\t\tconst url = new URL(href, safeWindow.document.baseURI);\n\t\treturn url.origin === safeWindow.location.origin ? url.pathname + url.search + url.hash : url.href;\n\t} catch {\n\t\treturn href;\n\t}\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/index.tsx\nfunction performNavigation(router, routeId, preload, elementId, combinedPathVariables, smoothScroll, beforeUrlUpdate) {\n\tpreload();\n\trouter.navigate?.(routeId, elementId, combinedPathVariables, smoothScroll, beforeUrlUpdate);\n}\nfunction createOnClickLinkHandler(href, trackLinkClick, navigate) {\n\treturn async (event) => {\n\t\tconst usedCommandKey = isCommandKeyPressed(event);\n\t\t/**\n\t\t* Note: in the preview iframe we hijack all anchor link\n\t\t* clicks and modify the target based on the href, so that\n\t\t* we won't try to open an external links in the preview\n\t\t* iframe, for example. (see src/app/vekter/src/preview-next/utils/interceptAnchorLinks.ts)\n\t\t*/\n\t\tconst anchorElement = findAnchorElement(event.target);\n\t\tconst isExternalLink = !anchorElement || anchorElement.getAttribute(\"target\") === \"_blank\";\n\t\tconst shouldPerformNavigation = !usedCommandKey && !isExternalLink;\n\t\tconst track = () => void trackLinkClick(href);\n\t\tif (!shouldPerformNavigation) {\n\t\t\tawait yieldToMain({\n\t\t\t\tpriority: \"user-blocking\",\n\t\t\t\tensureContinueBeforeUnload: true,\n\t\t\t\tcontinueAfter: \"paint\"\n\t\t\t});\n\t\t\ttrack();\n\t\t\treturn;\n\t\t}\n\t\tevent.preventDefault();\n\t\tnavigate(track);\n\t};\n}\nfunction createNavigate(href, navigationUrl, navigateOnClient) {\n\treturn async (beforeUrlUpdate) => {\n\t\tconst resolution = await resolveNavigation(navigationUrl);\n\t\tif (resolution.decision === \"client\") {\n\t\t\tnavigateOnClient(beforeUrlUpdate);\n\t\t\treturn;\n\t\t}\n\t\tperformServerNavigation(navigationUrl ?? href, beforeUrlUpdate, resolution.redirectUrl);\n\t};\n}\nasync function resolveNavigation(navigationUrl) {\n\tif (!navigationUrl || !isNavigationCheckEnabled()) return { decision: \"client\" };\n\tconst resolution = getNavigationResolution(navigationUrl);\n\tif (resolution) return resolution;\n\tstartNavigationCheck(navigationUrl);\n\treturn await waitForNavigationResolution(navigationUrl) ?? { decision: \"server\" };\n}\nasync function performServerNavigation(href, beforeUrlUpdate, redirectUrl) {\n\tawait yieldToMain({\n\t\tpriority: \"user-blocking\",\n\t\tensureContinueBeforeUnload: true,\n\t\tcontinueAfter: \"paint\"\n\t});\n\tbeforeUrlUpdate?.();\n\twindow.location.assign(getServerNavigationUrl(href, redirectUrl));\n}\nfunction getServerNavigationUrl(href, redirectUrl) {\n\tif (!redirectUrl) return href;\n\ttry {\n\t\tconst clickedUrl = new URL(href, window.location.href);\n\t\tconst destinationUrl = new URL(redirectUrl);\n\t\tif (clickedUrl.hash && !destinationUrl.hash) destinationUrl.hash = clickedUrl.hash;\n\t\treturn destinationUrl.href;\n\t} catch {\n\t\treturn redirectUrl;\n\t}\n}\nfunction getLinkBaseUrl(siteCanonicalURL) {\n\tconst sitePrefix = getSitePrefix(siteCanonicalURL);\n\tif (sitePrefix && window.location.pathname === sitePrefix) {\n\t\tconst url = new URL(window.location.href);\n\t\turl.pathname = `${sitePrefix}/`;\n\t\treturn url.href;\n\t}\n\treturn window.location.href;\n}\nfunction getNavigationUrl(href, isBlankTarget, siteCanonicalURL) {\n\tif (isBlankTarget || typeof window === \"undefined\") return void 0;\n\tconst baseUrl = getLinkBaseUrl(siteCanonicalURL);\n\tlet url;\n\ttry {\n\t\turl = new URL(href, baseUrl);\n\t} catch {\n\t\treturn;\n\t}\n\tconst currentUrl = new URL(baseUrl);\n\tif (url.origin !== currentUrl.origin) return void 0;\n\tif (url.pathname === currentUrl.pathname && url.search === currentUrl.search) return void 0;\n\treturn url.href;\n}\nfunction propsForRoutePath(href, router, currentRoute, linkOptions, preload, localeId, locales, implicitPathVariables) {\n\tif (!currentRoute) return propsForLink(href, linkOptions);\n\tconst matchedRoute = findMatchingRouteAttributesForResolvedPath(router, href, implicitPathVariables, locales);\n\tif (!matchedRoute) return propsForLink(href, linkOptions);\n\tconst { routeId, route, elementId, pathVariables, locale } = matchedRoute;\n\tif (!route) return propsForLink(href, linkOptions);\n\tconst path = getPathForRoute(route, {\n\t\tcurrentRoutePath: currentRoute.path,\n\t\tcurrentRoutePathLocalized: currentRoute.pathLocalized,\n\t\tcurrentPathVariables: currentRoute.pathVariables,\n\t\thash: elementId,\n\t\tpathVariables,\n\t\tpreserveQueryParams: router.preserveQueryParams && !isBot,\n\t\tsiteCanonicalURL: router.siteCanonicalURL,\n\t\tlocaleId\n\t});\n\tconst anchorTarget = getTargetAttrValue(linkOptions.openInNewTab, true);\n\tconst isBlankTarget = anchorTarget === \"_blank\";\n\tconst navigationUrl = getNavigationUrl(path, isBlankTarget, router.siteCanonicalURL);\n\tconst linkContext = {\n\t\tpathVariables,\n\t\tlocale\n\t};\n\tconst navigate = createNavigate(path, navigationUrl, (beforeUrlUpdate) => performNavigation(router, routeId, () => preload(routeId, linkContext, {\n\t\tpriority: \"user-blocking\",\n\t\tyieldBeforePreload: false,\n\t\tshouldLoadRouteData: !isBlankTarget\n\t}), elementId, pathVariables, linkOptions.smoothScroll, beforeUrlUpdate));\n\treturn {\n\t\thref: path,\n\t\ttarget: anchorTarget,\n\t\tonClick: createOnClickLinkHandler(path, linkOptions.trackLinkClick, navigate),\n\t\tnavigate,\n\t\t\"data-framer-page-link-current\": currentRoute && linkMatchesRoute(currentRoute, {\n\t\t\twebPageId: routeId,\n\t\t\thash: elementId,\n\t\t\tpathVariables\n\t\t}, implicitPathVariables) || void 0,\n\t\tpreload: () => preload(routeId, linkContext, {\n\t\t\tpriority: \"background\",\n\t\t\tyieldBeforePreload: true,\n\t\t\tshouldLoadRouteData: !isBlankTarget\n\t\t}),\n\t\t_routeId: routeId,\n\t\t_pathVariables: pathVariables,\n\t\t_locale: locale,\n\t\t_navigationUrl: navigationUrl\n\t};\n}\n/**\n* NOTE: Any change to this component should have a QA for this project https://development.framer.com/projects/Nested-Links--ozJyj13jPMDAbU9zv9WB-1rkcd\n*/\n/** @public */\nconst Link = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ forwardRef(function Link({ children, href, openInNewTab, smoothScroll, clickTrackingId, relValues, preserveParams, nodeId, scopeId, motionChild, ...restProps }, forwardedRef) {\n\tconst router = useRouter();\n\tconst currentRoute = useCurrentRoute();\n\tconst implicitPathVariables = useImplicitPathVariables();\n\tconst { activeLocale, locales } = useLocaleInfo();\n\tconst resolveSlugsWithSuspense = useResolveSlugsWithSuspense();\n\tconst preload = usePreloadRoute();\n\tconst isOnFramerCanvas = useIsOnFramerCanvas();\n\tconst trackLinkClick = useTrackLinkClick({\n\t\tnodeId,\n\t\tclickTrackingId,\n\t\trouter,\n\t\thref,\n\t\tactiveLocale\n\t});\n\tconst propsAddedByLink = useMemo(() => {\n\t\tif (!href) return {};\n\t\tconst pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);\n\t\tif (!pageLink) return {};\n\t\tif (isString(pageLink)) return propsForRoutePath(pageLink, router, currentRoute, {\n\t\t\topenInNewTab,\n\t\t\ttrackLinkClick,\n\t\t\trel: relValues?.join(\" \"),\n\t\t\tpreserveParams,\n\t\t\tsmoothScroll\n\t\t}, preload, activeLocale?.id, locales, implicitPathVariables);\n\t\tconst { unresolvedPathSlugs, unresolvedHashSlugs } = pageLink;\n\t\tconst maybeResolvedSlugs = resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, activeLocale);\n\t\tif (isPromise(maybeResolvedSlugs)) throw maybeResolvedSlugs;\n\t\tconst { routeId, href: resolvedHref, elementId, pathVariables, locale } = findMatchingRouteAttributesForWebPageLink(router, currentRoute, pageLink, activeLocale, maybeResolvedSlugs, implicitPathVariables);\n\t\tconst anchorTarget = getTargetAttrValue(openInNewTab, true);\n\t\tconst isBlankTarget = anchorTarget === \"_blank\";\n\t\tconst navigationUrl = getNavigationUrl(resolvedHref, isBlankTarget, router.siteCanonicalURL);\n\t\tconst linkContext = {\n\t\t\tpathVariables,\n\t\t\tlocale\n\t\t};\n\t\tconst navigate = createNavigate(resolvedHref, navigationUrl, (beforeUrlUpdate) => performNavigation(router, routeId, () => preload(routeId, linkContext, {\n\t\t\tpriority: \"user-blocking\",\n\t\t\tyieldBeforePreload: false,\n\t\t\tshouldLoadRouteData: !isBlankTarget\n\t\t}), elementId, pathVariables, smoothScroll, beforeUrlUpdate));\n\t\treturn {\n\t\t\thref: resolvedHref,\n\t\t\ttarget: anchorTarget,\n\t\t\tonClick: createOnClickLinkHandler(resolvedHref, trackLinkClick, navigate),\n\t\t\t\"data-framer-page-link-current\": currentRoute && linkMatchesRoute(currentRoute, pageLink, implicitPathVariables) || void 0,\n\t\t\tnavigate,\n\t\t\tpreload: () => preload(routeId, linkContext, {\n\t\t\t\tpriority: \"background\",\n\t\t\t\tyieldBeforePreload: true,\n\t\t\t\tshouldLoadRouteData: !isBlankTarget\n\t\t\t}),\n\t\t\t_routeId: routeId,\n\t\t\t_pathVariables: pathVariables,\n\t\t\t_locale: locale,\n\t\t\t_navigationUrl: navigationUrl\n\t\t};\n\t}, [\n\t\thref,\n\t\trouter,\n\t\tactiveLocale,\n\t\timplicitPathVariables,\n\t\topenInNewTab,\n\t\tcurrentRoute,\n\t\tsmoothScroll,\n\t\ttrackLinkClick,\n\t\trelValues,\n\t\tlocales,\n\t\tpreserveParams,\n\t\tresolveSlugsWithSuspense,\n\t\tpreload\n\t]);\n\tconst hasRef = isValidElement(children) && \"ref\" in children;\n\tconst observerRef = useObserverRef(hasRef ? children.ref : void 0);\n\tconst { navigate, preload: preloadFn, _routeId, _pathVariables, _locale, _navigationUrl, ...restPropsAddedByLink } = propsAddedByLink;\n\tuseRefEffect(observerRef, (node) => {\n\t\tif (node === null || !_routeId || !preloadFn || !_navigationUrl || isOnFramerCanvas) return;\n\t\treturn observeRouteForPreloading?.(node, preloadFn, `${_routeId}:${_locale?.id}:${JSON.stringify(_pathVariables)}`, _navigationUrl);\n\t}, [\n\t\tpreloadFn,\n\t\t_routeId,\n\t\t_pathVariables,\n\t\t_locale,\n\t\t_navigationUrl,\n\t\tisOnFramerCanvas\n\t]);\n\tconst isInternalNavigation = Boolean(navigate);\n\tconst replacedChildren = useCloneChildrenWithPropsAndRef(forwardedRef).cloneAsArray(children, (childProps) => cloneChildPropsWithAggregatedEvents(childProps, {\n\t\t...restProps,\n\t\t...rebindEventHandlersIfNeeded(restPropsAddedByLink, motionChild, isInternalNavigation)\n\t}, observerRef));\n\treturn useReplaceNestedLinks(replacedChildren, scopeId, nodeId, href, propsAddedByLink, observerRef);\n}));\nfunction cloneChildPropsWithAggregatedEvents(childProps, linkProps, observerRef) {\n\tconst mergedStyle = mergeStyles(childProps.style, linkProps.style);\n\tconst aggregatedProps = {\n\t\t...childProps,\n\t\t...linkProps,\n\t\t...mergedStyle && { style: mergedStyle },\n\t\tref: observerRef\n\t};\n\tconst { onTap, onClick } = linkProps;\n\tif (!onTap && !onClick) return aggregatedProps;\n\tconst { onClick: childOnClick, onTap: childOnTap } = childProps;\n\treturn {\n\t\t...aggregatedProps,\n\t\tonClick: onClick || childOnClick ? (event) => {\n\t\t\tif (isFunction(childOnClick)) childOnClick?.(event);\n\t\t\tonClick?.(event);\n\t\t} : void 0,\n\t\tonTap: onTap || childOnTap ? (event, info) => {\n\t\t\tif (isFunction(childOnTap)) childOnTap?.(event, info);\n\t\t\tonTap?.(event, info);\n\t\t} : void 0\n\t};\n}\nfunction mergeStyles(childStyle, linkStyle) {\n\tconst maybeChildStyle = isObject$1(childStyle) ? childStyle : void 0;\n\tconst hasChildStyles = maybeChildStyle && !isEmptyObject(maybeChildStyle);\n\tconst hasLinkStyles = linkStyle && !isEmptyObject(linkStyle);\n\tif (!hasChildStyles && !hasLinkStyles) return void 0;\n\treturn {\n\t\t...maybeChildStyle,\n\t\t...linkStyle\n\t};\n}\nfunction rebindEventHandlersIfNeeded(linkProps, motionChild, isInternalNavigation) {\n\tif (!Boolean(motionChild && isIOS())) return linkProps;\n\tconst { onClick, ...restProps } = linkProps;\n\tif (!onClick) return linkProps;\n\tif (isInternalNavigation) return {\n\t\t...restProps,\n\t\tonTap: onClick,\n\t\tonClick: preventClickOnNativeAnchorLink\n\t};\n\treturn {\n\t\t...restProps,\n\t\tonTap: onClick\n\t};\n}\nfunction preventClickOnNativeAnchorLink(event) {\n\tconst anchorElement = findAnchorElement(event.target);\n\tif (!anchorElement || anchorElement.getAttribute(\"target\") === \"_blank\") return;\n\tevent.preventDefault();\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/resolveLink.ts\n/** @internal */\nfunction resolveLink(href, router, implicitPathVariables, activeLocale) {\n\treturn resolveLinkInternal(href, router, implicitPathVariables, void 0, activeLocale);\n}\n/** @internal */\nfunction resolveLinkInternal(href, router, implicitPathVariables, onlyHash, activeLocale, resolveSlugs) {\n\tconst pageLink = isLinkToWebPage(href) ? href : linkFromFramerPageLink(href);\n\tif (!isLinkToWebPage(pageLink)) return isString(href) ? propsForLink(href).href : void 0;\n\tif (!router.getRoute || !router.currentRouteId) return void 0;\n\tconst currentRoute = router.getRoute(router.currentRouteId);\n\tconst { webPageId, hash, pathVariables, hashVariables, unresolvedHashSlugs, unresolvedPathSlugs } = pageLink;\n\tconst route = router.getRoute(webPageId);\n\tconst resolvedSlugs = unresolvedPathSlugs || unresolvedHashSlugs ? resolveSlugs?.(unresolvedPathSlugs, unresolvedHashSlugs) : void 0;\n\tif (isPromise(resolvedSlugs)) return;\n\tconst combinedPathVariables = Object.assign({}, router.currentPathVariables, implicitPathVariables, pathVariables, resolvedSlugs?.path);\n\tconst combinedHashVariables = Object.assign({}, router.currentPathVariables, implicitPathVariables, hashVariables, resolvedSlugs?.hash);\n\treturn getPathForRoute(route, {\n\t\tcurrentRoutePath: currentRoute?.path,\n\t\tcurrentRoutePathLocalized: currentRoute?.pathLocalized,\n\t\tcurrentPathVariables: router.currentPathVariables,\n\t\thash,\n\t\tpathVariables: combinedPathVariables,\n\t\thashVariables: combinedHashVariables,\n\t\trelative: false,\n\t\tpreserveQueryParams: router.preserveQueryParams,\n\t\tonlyHash,\n\t\tsiteCanonicalURL: router.siteCanonicalURL,\n\t\tlocaleId: activeLocale?.id,\n\t\tlocaleSlug: activeLocale?.slug\n\t});\n}\n\n//#endregion\n//#region ../../library/src/modules/Link/resolvePageScope.tsx\n/** @public */\nfunction resolvePageScope(pageLink, router, localeId) {\n\tif (!router.getRoute || !router.currentRouteId) return void 0;\n\tconst currentRoute = router.getRoute(router.currentRouteId);\n\tconst { webPageId } = pageLink;\n\tconst route = router.getRoute(webPageId);\n\treturn getPathForRoute(route, {\n\t\tcurrentRoutePath: currentRoute?.path,\n\t\tcurrentRoutePathLocalized: currentRoute?.pathLocalized,\n\t\tcurrentPathVariables: router.currentPathVariables,\n\t\trelative: false,\n\t\tpreserveQueryParams: false,\n\t\tsiteCanonicalURL: void 0,\n\t\tlocaleId\n\t});\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/antibot.ts\nconst salt = \"framer\";\nconst difficulty = 3;\nconst tokenLength = 30;\nconst maxTime = 1e4;\nfunction createWorkerTask() {\n\treturn function() {\n\t\tasync function sha256(text) {\n\t\t\tconst buffer = new TextEncoder().encode(text);\n\t\t\tconst hashBuffer = await crypto.subtle.digest(\"SHA-256\", buffer);\n\t\t\treturn Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n\t\t}\n\t\tfunction randomCharacters(count) {\n\t\t\tconst characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\t\t\tlet result = \"\";\n\t\t\tconst charactersLength = 62;\n\t\t\tfor (let i = 0; i < count; i++) result += characters.charAt(Math.floor(Math.random() * charactersLength));\n\t\t\treturn result;\n\t\t}\n\t\taddEventListener(\"message\", async (event) => {\n\t\t\tconst { salt, difficulty, tokenLength, maxTime } = event.data;\n\t\t\tconst target = \"0\".repeat(difficulty);\n\t\t\tconst startTime = performance.now();\n\t\t\tlet processing = true;\n\t\t\twhile (processing) {\n\t\t\t\tif (performance.now() - startTime > maxTime) {\n\t\t\t\t\tprocessing = false;\n\t\t\t\t\tpostMessage({ success: false });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst nonce = randomCharacters(tokenLength);\n\t\t\t\tconst secret = `${Date.now()}:${nonce}`;\n\t\t\t\tconst hash = await sha256(salt + secret);\n\t\t\t\tif (hash.startsWith(target)) {\n\t\t\t\t\tpostMessage({\n\t\t\t\t\t\tsuccess: true,\n\t\t\t\t\t\tsecret,\n\t\t\t\t\t\thash\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}.toString();\n}\nasync function calculateProofOfWork() {\n\treturn new Promise((resolve, reject) => {\n\t\tconst webWorkerURL = URL.createObjectURL(new Blob([\n\t\t\t\"(\",\n\t\t\tcreateWorkerTask(),\n\t\t\t\")()\"\n\t\t], { type: \"application/javascript\" }));\n\t\tconst worker = new Worker(webWorkerURL);\n\t\tworker.onmessage = (event) => {\n\t\t\tworker.terminate();\n\t\t\tURL.revokeObjectURL(webWorkerURL);\n\t\t\tif (event.data.success) resolve({\n\t\t\t\tsecret: event.data.secret,\n\t\t\t\thash: event.data.hash\n\t\t\t});\n\t\t\telse resolve(void 0);\n\t\t};\n\t\tworker.onerror = (event) => {\n\t\t\tworker.terminate();\n\t\t\tURL.revokeObjectURL(webWorkerURL);\n\t\t\treject(event);\n\t\t};\n\t\tworker.postMessage({\n\t\t\tsalt,\n\t\t\tdifficulty,\n\t\t\ttokenLength,\n\t\t\tmaxTime\n\t\t});\n\t});\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/formData.ts\nconst HONEYPOT_FIELD_NAME = \"__framer\";\n/**\n* Form field names in DOM order, including fields the browser omits from FormData (e.g. unchecked\n* checkboxes). Call while honeypot fields still use their `__framer`-prefixed submission names.\n*\n* NOTE: form-fields-header-stability — Only fields mounted at submit time are reported. Variant /\n* visibility conditionals that unmount inputs still produce different Framer-Form-Fields headers\n* across submissions; fixing that needs a design-time field list, not a smarter DOM walk.\n*/\nfunction getFormFieldNames(form) {\n\tconst names = /* @__PURE__ */ new Set();\n\tfor (const element of form.elements) {\n\t\tif (!isFormField(element) || element.disabled || !element.name) continue;\n\t\tif (element.name.startsWith(\"__framer\")) continue;\n\t\tnames.add(element.name);\n\t}\n\treturn Array.from(names);\n}\nfunction isFormField(element) {\n\tif (element instanceof HTMLSelectElement || element instanceof HTMLTextAreaElement) return true;\n\treturn element instanceof HTMLInputElement && ![\n\t\t\"file\",\n\t\t\"submit\",\n\t\t\"reset\",\n\t\t\"button\",\n\t\t\"image\"\n\t].includes(element.type);\n}\nfunction getEncodedFormFieldsHeader(fieldNames, data) {\n\tconst additionalKeys = Array.from(data.keys()).filter((key) => !fieldNames.includes(key));\n\treturn [...fieldNames, ...additionalKeys].map(encodeURIComponent).join(\",\");\n}\n/**\nIncludes UTM tags from the `framerFormsUTMTags` cookie, that is set in\nsrc/app/vekter/src/export/bundled/captureFormsUTMTagsInCookie.ts\n*/\nfunction addUTMTagsToFormData(data, document) {\n\ttry {\n\t\tconst matches = document.cookie.match(\"(^|;) ?framerFormsUTMTags=([^;]*)(;|$)\");\n\t\tif (matches !== null && matches[2]) {\n\t\t\tconst parsed = JSON.parse(decodeURIComponent(matches[2]));\n\t\t\tif (!parsed || typeof parsed !== \"object\") return;\n\t\t\t[\n\t\t\t\t\"utm_source\",\n\t\t\t\t\"utm_medium\",\n\t\t\t\t\"utm_campaign\",\n\t\t\t\t\"utm_term\",\n\t\t\t\t\"utm_content\",\n\t\t\t\t\"gclid\"\n\t\t\t].forEach((key) => {\n\t\t\t\tif (typeof parsed[key] === \"string\") data.append(key, parsed[key]);\n\t\t\t});\n\t\t}\n\t} catch (e) {}\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/honeypot.tsx\nconst HONEYPOT_VERSION = \"3\";\nconst COMMON_FIELD_NAMES = [\n\t\"website\",\n\t\"company\",\n\t\"message\",\n\t\"subject\",\n\t\"title\",\n\t\"description\",\n\t\"feedback\",\n\t\"notes\",\n\t\"details\",\n\t\"remarks\",\n\t\"comments\"\n];\nconst MODULE_LOAD_TIME = /* @__PURE__ */ (() => Date.now())();\nconst FIELD_DATA_ENUM = {\n\tname: 0,\n\tvalue: 1,\n\tsetAttribute: 2,\n\tvalueProperty: 3,\n\tisInputEventTrusted: 4,\n\tinputChangeTimeSinceModuleLoad: 5,\n\twasFilledBeforeHydration: 6\n};\nconst METADATA_KEYS_ENUM = {\n\tfieldData: 0,\n\tfieldCount: 1,\n\tfieldFilledCount: 2,\n\thpVersion: 3,\n\tsiteId: 4,\n\ttimeToSubmissionSinceModuleLoad: 5\n};\nconst getTimeSinceModuleLoadInSeconds = () => {\n\treturn ((Date.now() - MODULE_LOAD_TIME) / 1e3).toFixed(2);\n};\nconst HoneypotInput = ({ inputStateRef }) => {\n\tconst { inputRef, originalName } = inputStateRef;\n\tReact.useLayoutEffect(() => {\n\t\tconst honeypotInput = inputRef.current;\n\t\tif (!honeypotInput) return;\n\t\tconst methodsUsed = inputStateRef.methodsUsed;\n\t\tif (honeypotInput.value) methodsUsed.wasFilledBeforeHydration = true;\n\t}, [inputRef, inputStateRef]);\n\tReact.useEffect(() => {\n\t\tconst myInput = inputRef.current;\n\t\tif (!myInput) return;\n\t\tconst methodsUsed = inputStateRef.methodsUsed;\n\t\tconst originalSetAttributeMethod = Element.prototype.setAttribute;\n\t\tconst originalSetAttribute = originalSetAttributeMethod.bind(myInput);\n\t\tmyInput.setAttribute = function(attrName, attrValue) {\n\t\t\tif (attrName === \"value\") {\n\t\t\t\tmethodsUsed.setAttribute = true;\n\t\t\t\tmethodsUsed.inputChangeTimeSinceModuleLoad = getTimeSinceModuleLoadInSeconds();\n\t\t\t}\n\t\t\toriginalSetAttribute(attrName, attrValue);\n\t\t};\n\t\tconst originalDescriptor = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, \"value\");\n\t\tif (originalDescriptor) Object.defineProperty(myInput, \"value\", {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn originalDescriptor.get?.call(this) ?? \"\";\n\t\t\t},\n\t\t\tset: function(newValue) {\n\t\t\t\tmethodsUsed.valueProperty = true;\n\t\t\t\tmethodsUsed.inputChangeTimeSinceModuleLoad = getTimeSinceModuleLoadInSeconds();\n\t\t\t\toriginalDescriptor.set?.call(this, newValue);\n\t\t\t}\n\t\t});\n\t\tconst handleInput = (event) => {\n\t\t\tmethodsUsed.isInputEventTrusted = event.isTrusted;\n\t\t\tmethodsUsed.inputChangeTimeSinceModuleLoad = getTimeSinceModuleLoadInSeconds();\n\t\t};\n\t\tmyInput.addEventListener(\"input\", handleInput);\n\t\treturn () => {\n\t\t\tmyInput.setAttribute = originalSetAttributeMethod.bind(myInput);\n\t\t\tif (originalDescriptor) Object.defineProperty(myInput, \"value\", originalDescriptor);\n\t\t\tmyInput.removeEventListener(\"input\", handleInput);\n\t\t};\n\t}, [inputRef, inputStateRef]);\n\treturn /* @__PURE__ */ jsx(\"input\", {\n\t\tref: inputRef,\n\t\ttype: \"text\",\n\t\tname: originalName,\n\t\tsuppressHydrationWarning: true,\n\t\ttabIndex: -1,\n\t\tautoComplete: \"one-time-code\",\n\t\t\"aria-hidden\": \"true\",\n\t\tstyle: {\n\t\t\tposition: \"absolute\",\n\t\t\ttransform: \"scale(0)\"\n\t\t},\n\t\tdefaultValue: \"\",\n\t\t\"data-1p-ignore\": true,\n\t\t\"data-lpignore\": \"true\",\n\t\t\"data-form-type\": \"other\",\n\t\t\"data-bwignore\": true\n\t});\n};\nfunction useHoneypotFields() {\n\tconst framerSiteId = React.useContext(FormContext);\n\tconst states = React.useMemo(() => COMMON_FIELD_NAMES.map((fieldName) => ({\n\t\tinputRef: React.createRef(),\n\t\toriginalName: fieldName,\n\t\tmethodsUsed: {\n\t\t\tsetAttribute: false,\n\t\t\tvalueProperty: false\n\t\t}\n\t})), []);\n\treturn {\n\t\tstates,\n\t\tconvertHoneypotFieldsForSubmission: React.useCallback(() => {\n\t\t\tstates.forEach((state) => {\n\t\t\t\tconst currentHoneypotInput = state.inputRef.current;\n\t\t\t\tif (currentHoneypotInput) currentHoneypotInput.name = `${HONEYPOT_FIELD_NAME}_${state.originalName}`;\n\t\t\t});\n\t\t}, [states]),\n\t\treplaceHoneypotWithMetadata: React.useCallback((formData) => {\n\t\t\tconst honeypotCount = states.length;\n\t\t\tlet honeypotFilled = 0;\n\t\t\tconst filledFieldsData = [];\n\t\t\tstates.forEach((state) => {\n\t\t\t\tconst currentHoneypotInput = state.inputRef.current;\n\t\t\t\tif (currentHoneypotInput) {\n\t\t\t\t\tconst currentName = currentHoneypotInput.name;\n\t\t\t\t\tconst currentValue = currentHoneypotInput.value;\n\t\t\t\t\tif (currentValue) {\n\t\t\t\t\t\thoneypotFilled++;\n\t\t\t\t\t\tconst fieldData = {\n\t\t\t\t\t\t\t[FIELD_DATA_ENUM.name]: state.originalName,\n\t\t\t\t\t\t\t[FIELD_DATA_ENUM.value]: currentValue,\n\t\t\t\t\t\t\t[FIELD_DATA_ENUM.setAttribute]: state.methodsUsed.setAttribute,\n\t\t\t\t\t\t\t[FIELD_DATA_ENUM.valueProperty]: state.methodsUsed.valueProperty,\n\t\t\t\t\t\t\t[FIELD_DATA_ENUM.isInputEventTrusted]: state.methodsUsed.isInputEventTrusted,\n\t\t\t\t\t\t\t[FIELD_DATA_ENUM.inputChangeTimeSinceModuleLoad]: state.methodsUsed.inputChangeTimeSinceModuleLoad,\n\t\t\t\t\t\t\t[FIELD_DATA_ENUM.wasFilledBeforeHydration]: state.methodsUsed.wasFilledBeforeHydration\n\t\t\t\t\t\t};\n\t\t\t\t\t\tfilledFieldsData.push(JSON.stringify(fieldData));\n\t\t\t\t\t}\n\t\t\t\t\tformData.delete(currentName);\n\t\t\t\t\tcurrentHoneypotInput.name = state.originalName;\n\t\t\t\t}\n\t\t\t});\n\t\t\tformData.append(`${HONEYPOT_FIELD_NAME}_${METADATA_KEYS_ENUM.fieldData}`, `[${filledFieldsData.join(\",\")}]`);\n\t\t\tformData.append(`${HONEYPOT_FIELD_NAME}_${METADATA_KEYS_ENUM.fieldCount}`, honeypotCount.toString());\n\t\t\tformData.append(`${HONEYPOT_FIELD_NAME}_${METADATA_KEYS_ENUM.fieldFilledCount}`, honeypotFilled.toString());\n\t\t\tformData.append(`${HONEYPOT_FIELD_NAME}_${METADATA_KEYS_ENUM.hpVersion}`, HONEYPOT_VERSION);\n\t\t\tformData.append(`${HONEYPOT_FIELD_NAME}_${METADATA_KEYS_ENUM.siteId}`, framerSiteId || \"\");\n\t\t\tformData.append(`${HONEYPOT_FIELD_NAME}_${METADATA_KEYS_ENUM.timeToSubmissionSinceModuleLoad}`, getTimeSinceModuleLoadInSeconds());\n\t\t}, [states, framerSiteId])\n\t};\n}\nfunction HoneypotFields({ states }) {\n\treturn /* @__PURE__ */ jsx(Fragment$1, { children: states.map((stateRef) => /* @__PURE__ */ jsx(HoneypotInput, { inputStateRef: stateRef }, `hp_${stateRef.originalName}`)) });\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/trackFormSubmit.ts\nfunction trackFormSubmit({ router, nodeId, submitTrackingId }) {\n\tif (!router?.pageviewEventData?.current) return;\n\tif (router.pageviewEventData.current instanceof Promise) router.pageviewEventData.current.then((pageviewEventData) => {\n\t\tsendFormSubmitTrackingEvent(pageviewEventData, nodeId, submitTrackingId);\n\t});\n\telse sendFormSubmitTrackingEvent(router.pageviewEventData.current, nodeId, submitTrackingId);\n}\nfunction sendFormSubmitTrackingEvent(pageviewEventData, nodeId, trackingId) {\n\treturn sendTrackingEvent(\"published_site_form_submit\", {\n\t\t...pageviewEventData,\n\t\tnodeId: nodeId ?? null,\n\t\ttrackingId: trackingId || null\n\t}, \"eager\");\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/FormContainer.tsx\nconst pendingState = { state: \"pending\" };\nconst successState = { state: \"success\" };\nconst incompleteState = { state: \"incomplete\" };\nconst completeState = { state: \"complete\" };\nconst errorState = { state: \"error\" };\nfunction formReducer({ state }, { type }) {\n\tswitch (type) {\n\t\tcase \"complete\":\n\t\t\tif (state === \"error\") return errorState;\n\t\t\treturn completeState;\n\t\tcase \"incomplete\":\n\t\t\tif (state === \"error\") return errorState;\n\t\t\treturn incompleteState;\n\t\tcase \"submit\": return pendingState;\n\t\tcase \"success\": return successState;\n\t\tcase \"error\": return errorState;\n\t\tdefault: assertNever$1(type);\n\t}\n}\nfunction stateCanSubmitForm({ state }) {\n\treturn state === \"incomplete\" || state === \"complete\";\n}\nfunction preventDefault(e) {\n\te.preventDefault();\n}\nfunction openExternalLinkInCurrentTab(link, formRef) {\n\tconst href = isValidURL(link, false) ? link : `https://${link}`;\n\tconst linkElement = document.createElement(\"a\");\n\tlinkElement.href = href;\n\tlinkElement.target = \"_self\";\n\tlinkElement.style.display = \"none\";\n\tif (!formRef.current) return;\n\tformRef.current.appendChild(linkElement);\n\tlinkElement.click();\n\tlinkElement.remove();\n}\n/** @internal */\nconst FormContext = /* @__PURE__ */ React.createContext(void 0);\n/** @internal */\nconst FormContainer = /* @__PURE__ */ React.forwardRef(function FormContainer({ action, children, redirectUrl, onSuccess, onError, onLoading, submitTrackingId, nodeId, ...props }, forwardedRef) {\n\tconst formMarkerAttribute = \"data-framer-form\";\n\tconst formRef = React.useRef(null);\n\tconst ref = useComposedRefs(forwardedRef, formRef);\n\tconst { states: honeypotStateRefs, convertHoneypotFieldsForSubmission, replaceHoneypotWithMetadata } = useHoneypotFields();\n\tconst router = useRouter();\n\tconst currentRoute = useCurrentRoute();\n\tconst implicitPathVariables = useImplicitPathVariables();\n\tconst collectionUtils = useCollectionUtils();\n\tconst [state, dispatch] = React.useReducer(formReducer, incompleteState);\n\tconst { activeLocale, locales } = useLocaleInfo();\n\tconst projectHash = useContext(FormContext);\n\tconst callbacks = React.useRef({\n\t\tonSuccess,\n\t\tonError,\n\t\tonLoading\n\t});\n\tcallbacks.current = {\n\t\tonSuccess,\n\t\tonError,\n\t\tonLoading\n\t};\n\tconst submissionInProgressRef = React.useRef(false);\n\tasync function redirectTo(link) {\n\t\tif (isString(link)) {\n\t\t\tconst matchingRoute = findMatchingRouteAttributesForResolvedPath(router, link, implicitPathVariables, locales);\n\t\t\tif (!matchingRoute) {\n\t\t\t\topenExternalLinkInCurrentTab(link, formRef);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { routeId, elementId, pathVariables } = matchingRoute;\n\t\t\trouter.navigate?.(routeId, elementId, pathVariables);\n\t\t\treturn;\n\t\t}\n\t\tassert$1(isLinkToWebPage(link), () => `Expected link to be either a LinkToWebPage or a string: ${JSON.stringify(link)}`);\n\t\tconst resolvedSlugs = await resolveSlugs(link.unresolvedPathSlugs, link.unresolvedHashSlugs, activeLocale, collectionUtils);\n\t\tconst { routeId, elementId, pathVariables } = findMatchingRouteAttributesForWebPageLink(router, currentRoute, link, activeLocale, resolvedSlugs, implicitPathVariables);\n\t\trouter.navigate?.(routeId, elementId, pathVariables);\n\t}\n\tconst handleSubmit = (event) => {\n\t\tevent.preventDefault();\n\t\tsubmit(event.currentTarget);\n\t};\n\tasync function submit(form) {\n\t\tif (!action || !projectHash || submissionInProgressRef.current) return;\n\t\tsubmissionInProgressRef.current = true;\n\t\tconvertHoneypotFieldsForSubmission();\n\t\tconst data = new FormData(form);\n\t\tconst fieldNames = getFormFieldNames(form);\n\t\tawait yieldToMain({\n\t\t\tpriority: \"user-visible\",\n\t\t\tcontinueAfter: \"paint\"\n\t\t});\n\t\treplaceHoneypotWithMetadata(data);\n\t\tstartTransition(() => dispatch({ type: \"submit\" }));\n\t\taddUTMTagsToFormData(data, safeWindow.document);\n\t\tfor (const [key, value] of data) if (value instanceof File) data.delete(key);\n\t\ttry {\n\t\t\tcallbacks.current.onLoading?.();\n\t\t\ttrackFormSubmit({\n\t\t\t\trouter,\n\t\t\t\tnodeId,\n\t\t\t\tsubmitTrackingId,\n\t\t\t\tactiveLocale\n\t\t\t});\n\t\t\tawait submitForm(action, data, fieldNames, projectHash);\n\t\t\tstartTransition(() => dispatch({ type: \"success\" }));\n\t\t\tcallbacks.current.onSuccess?.();\n\t\t\tif (redirectUrl) await redirectTo(redirectUrl);\n\t\t} catch (error) {\n\t\t\tstartTransition(() => dispatch({ type: \"error\" }));\n\t\t\tcallbacks.current.onError?.();\n\t\t\tconsole.error(error);\n\t\t}\n\t\tsubmissionInProgressRef.current = false;\n\t}\n\tconst handleKeyDown = (event) => {\n\t\tconst { target: input, currentTarget: form, key } = event;\n\t\tif (input instanceof HTMLTextAreaElement) return;\n\t\tif (key === \"Enter\" && form.checkValidity()) {\n\t\t\tevent.preventDefault();\n\t\t\thandleSubmit(event);\n\t\t}\n\t};\n\tconst checkValidity = async (e) => {\n\t\tconst target = e.currentTarget;\n\t\tawait yieldToMain({\n\t\t\tpriority: \"background\",\n\t\t\tcontinueAfter: \"paint\"\n\t\t});\n\t\tstartTransition(() => dispatch({ type: anyEmptyRequiredFields(target) ? \"incomplete\" : \"complete\" }));\n\t};\n\tuseReplayPreHydrationSubmit(formRef, (form) => void submit(form));\n\tconst renderedChildren = React.useMemo(() => children(state), [children, state]);\n\treturn /* @__PURE__ */ jsxs(motion.form, {\n\t\t...props,\n\t\tmethod: \"post\",\n\t\t\"data-framer-form\": \"\",\n\t\tonSubmit: stateCanSubmitForm(state) ? handleSubmit : preventDefault,\n\t\tonKeyDown: handleKeyDown,\n\t\tonChange: checkValidity,\n\t\tref,\n\t\tchildren: [\n\t\t\trenderedChildren,\n\t\t\t/* @__PURE__ */ jsx(HoneypotFields, { states: honeypotStateRefs }),\n\t\t\t/* @__PURE__ */ jsx(\"script\", { dangerouslySetInnerHTML: { __html: getDeferPreHydrationSubmitScript() } }),\n\t\t\t/* @__PURE__ */ jsxs(\"noscript\", { children: [\n\t\t\t\t/* @__PURE__ */ jsx(\"style\", { children: `[${formMarkerAttribute}] input[name=framer-noscript] { position: absolute; transform: scale(0); }` }),\n\t\t\t\t/* @__PURE__ */ jsx(\"input\", {\n\t\t\t\t\trequired: true,\n\t\t\t\t\tpattern: \"(?!)\",\n\t\t\t\t\tname: \"framer-noscript\",\n\t\t\t\t\ttabIndex: -1,\n\t\t\t\t\t\"aria-label\": \"Enable JavaScript to submit this form\",\n\t\t\t\t\ttitle: \"Enable JavaScript to submit this form\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ jsx(\"p\", { children: \"Enable JavaScript to submit this form.\" })\n\t\t\t] })\n\t\t]\n\t});\n});\nfunction anyEmptyRequiredFields(element) {\n\tif (element.children.length === 0) return false;\n\tfor (const child of element.children) if (child instanceof HTMLInputElement || child instanceof HTMLTextAreaElement || child instanceof HTMLSelectElement) {\n\t\tif (child.required && child.value === \"\") return true;\n\t} else if (anyEmptyRequiredFields(child)) return true;\n\treturn false;\n}\nasync function submitForm(action, data, fieldNames, projectHash) {\n\tconst proofOfWork = await calculateProofOfWork();\n\tif (!proofOfWork) throw new Error(\"Failed to calculate proof of work\");\n\tconst headers = {\n\t\t\"Framer-Site-Id\": projectHash,\n\t\t\"Framer-POW\": proofOfWork.secret,\n\t\t\"Framer-Form-Fields\": getEncodedFormFieldsHeader(fieldNames, data)\n\t};\n\tconst response = await fetch(action, {\n\t\tbody: data,\n\t\tmethod: \"POST\",\n\t\theaders\n\t});\n\tif (response.ok) return response;\n\telse {\n\t\tconst body = await response.json();\n\t\tconst error = \"Failed to submit form\";\n\t\tif (responseHasError(body)) throw new Error(`${error} - ${body.error.message}`);\n\t\tthrow new Error(error);\n\t}\n}\nfunction responseHasError(response) {\n\treturn typeof response === \"object\" && response !== null && \"error\" in response && isObject$1(response.error) && \"message\" in response.error && typeof response.error.message === \"string\";\n}\n\n//#endregion\n//#region ../../shared/src/constants.ts\nconst FORCE_SHOW_EDITORBAR_LOCALSTORAGE_KEY = \"__framer_force_showing_editorbar_since\";\n\n//#endregion\n//#region ../../library/src/components/IgnoreErrors.tsx\nvar IgnoreErrors = class extends Component {\n\tstate = { error: void 0 };\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { error };\n\t}\n\trender() {\n\t\tif (this.state.error) return null;\n\t\treturn this.props.children;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/EditorBarLauncher.tsx\nconst isPrioritized = () => {\n\ttry {\n\t\treturn !!localStorage[FORCE_SHOW_EDITORBAR_LOCALSTORAGE_KEY];\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nconst isntPrioritized = () => !isPrioritized();\nfunction EditorBarLauncher({ EditorBar, fast = false }) {\n\tconst framerSiteId = useContext(FormContext);\n\tconst enabled = useSyncExternalStore(noopSubscribe, fast ? isPrioritized : isntPrioritized, returnFalse);\n\tconst libraryFeatures = getLibraryFeatures();\n\tconst editorBarFeatures = useMemo(() => {\n\t\tconst features = {};\n\t\tlet key;\n\t\tfor (key in libraryFeatures) if (libraryFeatures.hasOwnProperty(key) && (key.startsWith(\"editorBar\") || key.startsWith(\"onPage\"))) features[key] = libraryFeatures[key];\n\t\treturn features;\n\t}, [libraryFeatures]);\n\tif (!EditorBar || !framerSiteId || !enabled) return null;\n\treturn /* @__PURE__ */ jsx(IgnoreErrors, { children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(EditorBar, {\n\t\tframerSiteId,\n\t\tfeatures: editorBarFeatures\n\t}) }) });\n}\n\n//#endregion\n//#region ../../library/src/router/fillPathVariables.ts\nfunction fillPathVariables(path, variables) {\n\treturn path.replace(pathVariablesRegExpGlobal, (match, name) => {\n\t\tconst value = variables[name];\n\t\tif (typeof value !== \"string\" || value.length === 0) return match;\n\t\treturn encodeURIComponent(value);\n\t});\n}\n\n//#endregion\n//#region ../../library/src/utils/triggerActionsStorage.ts\nconst triggerHistoryStorageKey = \"framer:trigger-history:v1\";\nconst triggerHistoryStorageVersion = 1;\nconst TriggerActionsStorageSymbol = /* @__PURE__ */ Symbol(\"TriggerStorage\");\nvar TriggerActionsStorage = class {\n\teventsToTrack = /* @__PURE__ */ new Set();\n\thistoryEvents = /* @__PURE__ */ new Map();\n\tpersistHistory = debounce(() => this.flushHistoryToStorage(), 250);\n\tconstructor() {\n\t\tif (typeof window === \"undefined\" || !window.document) return;\n\t\tthis.eventsToTrack = getTriggerEventsToTrack();\n\t\tthis.initializeHistoryListeners();\n\t\tthis.loadHistoryFromStorage();\n\t}\n\tinitializeHistoryListeners() {\n\t\tif (typeof window === \"undefined\" || !window.document) return;\n\t\twindow.document.addEventListener(\"framer:click\", this.onClickEvent);\n\t\twindow.document.addEventListener(\"framer:formsubmit\", this.onFormSubmitEvent);\n\t\twindow.addEventListener(\"storage\", this.onStorageEvent);\n\t}\n\tonClickEvent = (event) => {\n\t\tconst detail = event.detail;\n\t\tif (!detail?.trackingId) return;\n\t\tthis.recordHistoryEvent(\"click\", detail.trackingId);\n\t};\n\tonFormSubmitEvent = (event) => {\n\t\tconst detail = event.detail;\n\t\tif (!detail?.trackingId) return;\n\t\tthis.recordHistoryEvent(\"form_submit\", detail.trackingId);\n\t};\n\tonTriggerInvoke(triggerTargetId) {\n\t\tthis.recordHistoryEvent(\"trigger_invoke\", triggerTargetId);\n\t}\n\tonStorageEvent = (event) => {\n\t\tif (event.key !== triggerHistoryStorageKey) return;\n\t\tconst parsed = parseHistoryStorage(event.newValue);\n\t\tif (parsed) updateMap(this.historyEvents, parsed);\n\t};\n\trecordHistoryEvent(eventType, id) {\n\t\tif (!this.eventsToTrack.has(getKey(eventType, id))) return;\n\t\tthis.historyEvents.set(getKey(eventType, id), Date.now());\n\t\tthis.persistHistory();\n\t}\n\tloadHistoryFromStorage() {\n\t\tif (typeof window === \"undefined\") return;\n\t\ttry {\n\t\t\tconst parsed = parseHistoryStorage(window.localStorage.getItem(triggerHistoryStorageKey));\n\t\t\tif (parsed) updateMap(this.historyEvents, parsed);\n\t\t} catch {}\n\t}\n\tflushHistoryToStorage() {\n\t\tif (typeof window === \"undefined\") return;\n\t\ttry {\n\t\t\twindow.localStorage.setItem(triggerHistoryStorageKey, JSON.stringify({\n\t\t\t\tversion: triggerHistoryStorageVersion,\n\t\t\t\tevents: Object.fromEntries(this.historyEvents.entries())\n\t\t\t}));\n\t\t} catch {}\n\t}\n\thasSeenEvent(eventType, id, sinceMs) {\n\t\tconst key = getKey(eventType, id);\n\t\tconst now = Date.now();\n\t\tconst seenAt = this.historyEvents.get(key);\n\t\tif (seenAt === void 0) return false;\n\t\tif (!sinceMs) return true;\n\t\treturn seenAt + sinceMs >= now;\n\t}\n};\nfunction parseHistoryStorage(raw) {\n\tif (!raw) return void 0;\n\ttry {\n\t\tconst parsed = JSON.parse(raw);\n\t\tif (parsed?.version !== triggerHistoryStorageVersion || !parsed.events) return void 0;\n\t\treturn new Map(Object.entries(parsed.events));\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction updateMap(map, incoming) {\n\tfor (const [key, value] of incoming.entries()) {\n\t\tif ((map.get(key) ?? 0) >= value) continue;\n\t\tmap.set(key, value);\n\t}\n}\nfunction getKey(eventType, id) {\n\treturn `${eventType}:${id}`;\n}\nfunction getTriggerEventsToTrack() {\n\tif (typeof window === \"undefined\" || !window.document || !(TriggerActionsStorageSymbol in window)) return /* @__PURE__ */ new Set();\n\treturn new Set(window[TriggerActionsStorageSymbol]);\n}\n\n//#endregion\n//#region ../../library/src/utils/triggerActions.ts\nconst cookieRegex = /^(?<key>[^=]*)=(?<value>.*)$/u;\nvar TriggerState = class {\n\ttriggers = /* @__PURE__ */ new Map();\n\tevents = /* @__PURE__ */ new Map();\n\tinitializedAtMs = Date.now();\n\tlastRouteChangeAtMs = Date.now();\n\tvisitedPages;\n\tmaxScrollPercentage = getScrollPercentage();\n\tserverTimingCountry;\n\tonTriggerListeners = /* @__PURE__ */ new Set();\n\tdelayTimeouts = /* @__PURE__ */ new Map();\n\tresolveRoute;\n\tgetCurrentRoutePath;\n\tsendTrackingEvent;\n\tstorage = new TriggerActionsStorage();\n\tconstructor(initial) {\n\t\tthis.visitedPages = new Set(initial.visitedPages);\n\t\tthis.resolveRoute = initial.resolveRoute;\n\t\tthis.getCurrentRoutePath = initial.getCurrentRoutePath;\n\t\tinitial.setRouteChangeHandler(this.onRouteChange);\n\t\tthis.sendTrackingEvent = initial.sendTrackingEvent;\n\t}\n\tget invokedTriggers() {\n\t\treturn new Set([...this.triggers.entries()].filter(([, triggerEntry]) => triggerEntry.status === \"triggered\").map(([trigger]) => trigger));\n\t}\n\taddOnTriggerListener(listener) {\n\t\tthis.onTriggerListeners.add(listener);\n\t}\n\tremoveOnTriggerListener(listener) {\n\t\tthis.onTriggerListeners.delete(listener);\n\t}\n\tsubscribe(triggerId, targetId, trigger, callback) {\n\t\tif (isEmptyTrigger(trigger)) return noop$5;\n\t\tconst triggerEntry = this.triggers.get(triggerId) ?? {\n\t\t\tstatus: \"pending\",\n\t\t\ttargetId,\n\t\t\ttrigger,\n\t\t\tunsubscribeHandlers: /* @__PURE__ */ new Set()\n\t\t};\n\t\tif (triggerEntry.status === \"triggered\") return noop$5;\n\t\ttriggerEntry.callback = callback;\n\t\ttriggerEntry.status = \"pending\";\n\t\tthis.triggers.set(triggerId, triggerEntry);\n\t\tif (this.evaluate(triggerId)) this.invoke(triggerId);\n\t\telse this.register(triggerId);\n\t\treturn () => {\n\t\t\tthis.unsubscribe(triggerId);\n\t\t};\n\t}\n\tunsubscribe(triggerId) {\n\t\tconst triggerEntry = this.triggers.get(triggerId);\n\t\tif (!triggerEntry) return;\n\t\tif (triggerEntry.status === \"triggered\") return;\n\t\ttriggerEntry.callback = void 0;\n\t\ttriggerEntry.status = \"inactive\";\n\t\tclearTimeout(this.delayTimeouts.get(triggerId));\n\t\tthis.delayTimeouts.delete(triggerId);\n\t\tfor (const unsubscribe of triggerEntry.unsubscribeHandlers) unsubscribe();\n\t}\n\ton(event, initialize, triggerId) {\n\t\tconst triggerEntry = this.triggers.get(triggerId);\n\t\tif (triggerEntry?.status !== \"pending\") return;\n\t\tconst handler = (eventPayload) => {\n\t\t\tif (triggerEntry?.status !== \"pending\") return;\n\t\t\tthis.evaluateAndInvoke(triggerId, eventPayload);\n\t\t};\n\t\tlet state = this.events.get(event);\n\t\tif (!state) {\n\t\t\tstate = {\n\t\t\t\thandlers: /* @__PURE__ */ new Set(),\n\t\t\t\tcleanup: initialize((eventPayload) => {\n\t\t\t\t\tthis.events.get(event)?.handlers?.forEach((triggerHandler) => triggerHandler(eventPayload));\n\t\t\t\t})\n\t\t\t};\n\t\t\tthis.events.set(event, state);\n\t\t}\n\t\tstate.handlers.add(handler);\n\t\ttriggerEntry.unsubscribeHandlers.add(() => {\n\t\t\tthis.off(event, handler);\n\t\t});\n\t}\n\toff(event, handler) {\n\t\tconst state = this.events.get(event);\n\t\tif (!state) return;\n\t\tstate.handlers.delete(handler);\n\t\tif (state.handlers.size !== 0) return;\n\t\tthis.events.delete(event);\n\t\tstate.cleanup?.();\n\t}\n\tonRouteChange = (currentPath) => {\n\t\tthis.visitedPages.add(currentPath);\n\t\tthis.lastRouteChangeAtMs = Date.now();\n\t\tthis.reevaluatePendingTriggers();\n\t};\n\treevaluatePendingTriggers() {\n\t\tfor (const [triggerId, triggerEntry] of this.triggers.entries()) if (triggerEntry.status === \"pending\") this.evaluateAndInvoke(triggerId);\n\t}\n\tevaluate(triggerId, eventPayload) {\n\t\tconst triggerEntry = this.triggers.get(triggerId);\n\t\tassert$1(triggerEntry, \"Trigger should be available in triggers map before evaluation\");\n\t\tif (triggerEntry?.status === \"triggered\") return true;\n\t\tif (!this.evaluateStaticRules(triggerEntry)) return false;\n\t\tconst firstCondition = triggerEntry.trigger.interactions[0];\n\t\tif (!firstCondition) return true;\n\t\tlet operator = firstCondition.operator;\n\t\tlet result = this.evaluateCondition(firstCondition, eventPayload);\n\t\tfor (let i = 1; i < triggerEntry.trigger.interactions.length; i++) {\n\t\t\tconst condition = triggerEntry.trigger.interactions[i];\n\t\t\tassert$1(condition, \"Condition should be available in conditions array\");\n\t\t\tconst evaluatedCondition = this.evaluateCondition(condition, eventPayload);\n\t\t\tresult = operator === \"or\" ? result || evaluatedCondition : result && evaluatedCondition;\n\t\t\toperator = condition.operator;\n\t\t}\n\t\treturn result;\n\t}\n\tevaluateCondition(condition, eventPayload) {\n\t\tswitch (condition.type) {\n\t\t\tcase \"delay\": {\n\t\t\t\tconst initial = condition.delayType === \"site\" ? this.initializedAtMs : this.lastRouteChangeAtMs;\n\t\t\t\treturn Date.now() - initial >= condition.delayMs;\n\t\t\t}\n\t\t\tcase \"scrollPercentage\":\n\t\t\t\tthis.maxScrollPercentage = Math.max(this.maxScrollPercentage, getScrollPercentage());\n\t\t\t\treturn this.maxScrollPercentage >= condition.scrollPercentage;\n\t\t\tcase \"exit\":\n\t\t\t\tif (eventPayload?.type !== \"exit\") return false;\n\t\t\t\treturn condition.exitType === \"all\" ? Boolean(eventPayload.exitType) : eventPayload.exitType === condition.exitType;\n\t\t\tdefault: assertNever$1(condition);\n\t\t}\n\t}\n\tevaluateStaticRules(triggerEntry) {\n\t\tif (triggerEntry.trigger.cookies && !this.evaluateCookies(triggerEntry.trigger.cookies)) return false;\n\t\tif (triggerEntry.trigger.urlParams && !this.evaluateUrlParams(triggerEntry.trigger.urlParams)) return false;\n\t\tif (triggerEntry.trigger.pageCount && this.visitedPages.size < triggerEntry.trigger.pageCount) return false;\n\t\tif (!this.evaluateRouteRules(triggerEntry.trigger.includeRoutes, triggerEntry.trigger.excludeRoutes)) return false;\n\t\tif (triggerEntry.trigger.schedule && !this.evaluateScheduleRules(triggerEntry.trigger.schedule)) return false;\n\t\tif (triggerEntry.trigger.eventHistory && !this.evaluateEventHistoryRules(triggerEntry.trigger.eventHistory)) return false;\n\t\tif (!this.evaluateLocationRules(triggerEntry.trigger.includeLocations, triggerEntry.trigger.excludeLocations)) return false;\n\t\treturn true;\n\t}\n\tevaluateEventHistoryRules(eventHistory) {\n\t\tif (!eventHistory.length) return true;\n\t\tfor (const rule of eventHistory) {\n\t\t\tconst seen = this.storage.hasSeenEvent(rule.eventType, rule.eventId, rule.withinMs);\n\t\t\tif (rule.ruleType === \"seen\" ? !seen : seen) return false;\n\t\t}\n\t\treturn true;\n\t}\n\tevaluateCookies(cookies) {\n\t\tif (cookies.rules.length === 0) return true;\n\t\tif (typeof window === \"undefined\" || !window.document) return false;\n\t\tconst cookieStrings = (window.document.cookie ?? \"\").split(\";\").map((cookie) => cookie.trim()).filter(Boolean);\n\t\tconst operatorFunction = cookies.operator === \"and\" ? \"every\" : \"some\";\n\t\treturn cookies.rules[operatorFunction]((rule) => {\n\t\t\tif (!rule.key) return false;\n\t\t\tswitch (rule.type) {\n\t\t\t\tcase \"set\": return cookieStrings.some((cookie) => cookie.startsWith(`${rule.key}=`));\n\t\t\t\tcase \"not-set\": return !cookieStrings.some((cookie) => cookie.startsWith(`${rule.key}=`));\n\t\t\t\tcase \"equals\": return cookieRegex.exec(cookieStrings.find((cookie) => cookie.startsWith(`${rule.key}=`)) ?? \"\")?.groups?.value === rule.value;\n\t\t\t}\n\t\t});\n\t}\n\tevaluateUrlParams(params) {\n\t\tif (params.rules.length === 0) return true;\n\t\tif (typeof window === \"undefined\" || !window.location) return false;\n\t\tconst urlParams = new URLSearchParams(window.location.search ?? \"\");\n\t\tconst operatorFunction = params.operator === \"and\" ? \"every\" : \"some\";\n\t\treturn params.rules[operatorFunction]((rule) => {\n\t\t\tif (!rule.key) return false;\n\t\t\tswitch (rule.type) {\n\t\t\t\tcase \"set\": return urlParams.has(rule.key);\n\t\t\t\tcase \"not-set\": return !urlParams.has(rule.key);\n\t\t\t\tcase \"equals\": return urlParams.get(rule.key) === rule.value;\n\t\t\t}\n\t\t});\n\t}\n\tevaluateRouteRules(includeRoutes, excludeRoutes) {\n\t\tif (!includeRoutes?.length && !excludeRoutes?.length) return true;\n\t\tconst currentPath = this.getCurrentRoutePath();\n\t\tif (!currentPath) return false;\n\t\tfor (const routeRule of excludeRoutes ?? []) {\n\t\t\tif (!routeRule.route) continue;\n\t\t\tconst targetPath = this.resolveRoute(routeRule.route);\n\t\t\tif (routeRule.wildcard ? currentPath.startsWith(targetPath) : currentPath === targetPath) return false;\n\t\t}\n\t\tfor (const routeRule of includeRoutes ?? []) {\n\t\t\tif (!routeRule.route) continue;\n\t\t\tconst targetPath = this.resolveRoute(routeRule.route);\n\t\t\tif (routeRule.wildcard ? currentPath.startsWith(targetPath) : currentPath === targetPath) return true;\n\t\t}\n\t\treturn !includeRoutes?.length;\n\t}\n\t/**\n\t* Evaluates if the include and exclude location rules are satisfied by the user's country (as resolved from the server timing header)\n\t*/\n\tevaluateLocationRules(includeLocations, excludeLocations) {\n\t\tif (!includeLocations?.length && !excludeLocations?.length) return true;\n\t\tthis.serverTimingCountry ??= getServerTimingCountry();\n\t\tif (!this.serverTimingCountry) return !includeLocations?.length;\n\t\tfor (const locationRule of excludeLocations ?? []) {\n\t\t\tif (!locationRule.location) continue;\n\t\t\tif (matchesLocation(this.serverTimingCountry, locationRule.location)) return false;\n\t\t}\n\t\tfor (const locationRule of includeLocations ?? []) {\n\t\t\tif (!locationRule.location) continue;\n\t\t\tif (matchesLocation(this.serverTimingCountry, locationRule.location)) return true;\n\t\t}\n\t\treturn !includeLocations?.length;\n\t}\n\tevaluateScheduleRules(schedule) {\n\t\tif (!schedule) return true;\n\t\tconst now = /* @__PURE__ */ new Date();\n\t\tif (schedule.startAt && /* @__PURE__ */ new Date(`${schedule.startAt}${schedule.startAtOffset ?? \"\"}`) > now) return false;\n\t\tif (schedule.endAt && /* @__PURE__ */ new Date(`${schedule.endAt}${schedule.endAtOffset ?? \"\"}`) < now) return false;\n\t\treturn true;\n\t}\n\tevaluateAndInvoke(triggerId, eventPayload) {\n\t\tif (this.evaluate(triggerId, eventPayload)) this.invoke(triggerId);\n\t}\n\tinvoke(triggerId, options = { callCallback: true }) {\n\t\tconst triggerEntry = this.triggers.get(triggerId);\n\t\tif (triggerEntry?.status !== \"pending\") return;\n\t\ttriggerEntry.status = \"triggered\";\n\t\tfor (const listener of this.onTriggerListeners) listener(triggerId);\n\t\tif (options.callCallback) {\n\t\t\ttriggerEntry.callback?.();\n\t\t\tthis.trackInvoke(triggerEntry);\n\t\t}\n\t}\n\ttrackInvoke(triggerEntry) {\n\t\tthis.storage.onTriggerInvoke(triggerEntry.targetId);\n\t\tsetTimeout(() => {\n\t\t\tthis.sendTrackingEvent({\n\t\t\t\ttrackingId: triggerEntry.trigger.trackingId,\n\t\t\t\tnodeId: parseTriggerTargetId(triggerEntry.targetId).nodeId ?? null\n\t\t\t});\n\t\t}, 20);\n\t}\n\tregister(triggerId) {\n\t\tconst triggerEntry = this.triggers.get(triggerId);\n\t\tif (triggerEntry?.status !== \"pending\") return;\n\t\tfor (const condition of triggerEntry.trigger.interactions) switch (condition.type) {\n\t\t\tcase \"delay\":\n\t\t\t\t{\n\t\t\t\t\tconst initial = condition.delayType === \"site\" ? this.initializedAtMs : this.lastRouteChangeAtMs;\n\t\t\t\t\tclearTimeout(this.delayTimeouts.get(triggerId));\n\t\t\t\t\tthis.delayTimeouts.set(triggerId, setTimeout(() => {\n\t\t\t\t\t\tthis.evaluateAndInvoke(triggerId);\n\t\t\t\t\t}, initial + condition.delayMs - Date.now()));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"scrollPercentage\":\n\t\t\t\tthis.on(\"scrollPercentage\", initializeScrollPercentageListener, triggerId);\n\t\t\t\tbreak;\n\t\t\tcase \"exit\":\n\t\t\t\tthis.on(\"exit\", initializeExitListener, triggerId);\n\t\t\t\tbreak;\n\t\t\tdefault: assertNever$1(condition);\n\t\t}\n\t}\n};\nfunction initializeExitListener(emit) {\n\tif (typeof window === \"undefined\") return;\n\tconst visibilityChangeHandler = () => {\n\t\tif (document.hidden) emit({\n\t\t\ttype: \"exit\",\n\t\t\texitType: \"visibilitychange\"\n\t\t});\n\t};\n\twindow.document.addEventListener(\"visibilitychange\", visibilityChangeHandler);\n\tconst mouseLeaveHandler = () => emit({\n\t\ttype: \"exit\",\n\t\texitType: \"mouseleave\"\n\t});\n\twindow.document.documentElement.addEventListener(\"mouseleave\", mouseLeaveHandler);\n\treturn () => {\n\t\twindow.document.removeEventListener(\"visibilitychange\", visibilityChangeHandler);\n\t\twindow.document.documentElement.removeEventListener(\"mouseleave\", mouseLeaveHandler);\n\t};\n}\nfunction initializeScrollPercentageListener(emit) {\n\tif (typeof window === \"undefined\") return;\n\tconst debouncedEmit = debounce(() => emit({\n\t\ttype: \"scrollPercentage\",\n\t\tscrollPercentage: getScrollPercentage()\n\t}), 100);\n\twindow.document.addEventListener(\"scroll\", debouncedEmit);\n\treturn () => {\n\t\twindow.document.removeEventListener(\"scroll\", debouncedEmit);\n\t};\n}\nfunction getScrollPercentage() {\n\tif (typeof window === \"undefined\" || !window.document) return 0;\n\treturn window.scrollY / (window.document.documentElement.scrollHeight - window.innerHeight) * 100 || 0;\n}\nfunction isEmptyTrigger(trigger) {\n\treturn trigger.interactions.length === 0 && !trigger.cookies?.rules.length && !trigger.urlParams?.rules.length && !trigger.pageCount && !trigger.includeRoutes?.length && !trigger.excludeRoutes?.length && !trigger.schedule?.startAt && !trigger.schedule?.endAt && !trigger.includeLocations?.length && !trigger.excludeLocations?.length && !trigger.eventHistory?.some((rule) => rule.eventType !== \"trigger_invoke\");\n}\nfunction parseTriggerTargetId(targetId) {\n\tconst [nodeId, actionSuffix] = targetId.split(\"-\");\n\treturn {\n\t\tnodeId,\n\t\tactionSuffix\n\t};\n}\n/**\n* Gets the country code from the server timing header if present.\n* Does not support Safari 15.6 and earlier.\n* @returns The ISO 3166-1 alpha-2 code of the country or undefined if not available\n*/\nfunction getServerTimingCountry() {\n\treturn getNavigationServerTimingEntry(\"country\")?.description;\n}\nconst europeanUnionCountriesInEurope = [\n\t\"AT\",\n\t\"BE\",\n\t\"BG\",\n\t\"CZ\",\n\t\"DE\",\n\t\"DK\",\n\t\"EE\",\n\t\"ES\",\n\t\"FI\",\n\t\"FR\",\n\t\"GR\",\n\t\"HR\",\n\t\"HU\",\n\t\"IE\",\n\t\"IT\",\n\t\"LT\",\n\t\"LU\",\n\t\"LV\",\n\t\"MT\",\n\t\"NL\",\n\t\"PL\",\n\t\"PT\",\n\t\"RO\",\n\t\"SE\",\n\t\"SI\",\n\t\"SK\"\n];\n/**\n* Broad geographic regions follow UN M49 groupings; Central America and the Caribbean are included in North America.\n*/\nconst triggerActionRegionMap = /* @__PURE__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t\t\"KG\",\n\t\t\"KH\",\n\t\t\"KP\",\n\t\t\"KR\",\n\t\t\"KW\",\n\t\t\"KZ\",\n\t\t\"LA\",\n\t\t\"LB\",\n\t\t\"LK\",\n\t\t\"MM\",\n\t\t\"MN\",\n\t\t\"MO\",\n\t\t\"MV\",\n\t\t\"MY\",\n\t\t\"NP\",\n\t\t\"OM\",\n\t\t\"PH\",\n\t\t\"PK\",\n\t\t\"PS\",\n\t\t\"QA\",\n\t\t\"SA\",\n\t\t\"SG\",\n\t\t\"SY\",\n\t\t\"TH\",\n\t\t\"TJ\",\n\t\t\"TL\",\n\t\t\"TM\",\n\t\t\"TR\",\n\t\t\"TW\",\n\t\t\"UZ\",\n\t\t\"VN\",\n\t\t\"YE\"\n\t]),\n\tEurope: /* @__PURE__ */ new Set([\n\t\t...europeanUnionCountriesInEurope,\n\t\t\"AD\",\n\t\t\"AL\",\n\t\t\"AX\",\n\t\t\"BA\",\n\t\t\"BY\",\n\t\t\"CH\",\n\t\t\"FO\",\n\t\t\"GB\",\n\t\t\"GG\",\n\t\t\"GI\",\n\t\t\"IM\",\n\t\t\"IS\",\n\t\t\"JE\",\n\t\t\"LI\",\n\t\t\"MC\",\n\t\t\"MD\",\n\t\t\"ME\",\n\t\t\"MK\",\n\t\t\"NO\",\n\t\t\"RS\",\n\t\t\"RU\",\n\t\t\"SJ\",\n\t\t\"SM\",\n\t\t\"UA\",\n\t\t\"VA\"\n\t]),\n\t\"European Union\": /* @__PURE__ */ new Set([...europeanUnionCountriesInEurope, \"CY\"]),\n\t\"North America\": /* @__PURE__ */ new Set([\n\t\t\"AG\",\n\t\t\"AI\",\n\t\t\"AW\",\n\t\t\"BB\",\n\t\t\"BL\",\n\t\t\"BM\",\n\t\t\"BQ\",\n\t\t\"BS\",\n\t\t\"BZ\",\n\t\t\"CA\",\n\t\t\"CR\",\n\t\t\"CU\",\n\t\t\"CW\",\n\t\t\"DM\",\n\t\t\"DO\",\n\t\t\"GD\",\n\t\t\"GL\",\n\t\t\"GP\",\n\t\t\"GT\",\n\t\t\"HN\",\n\t\t\"HT\",\n\t\t\"JM\",\n\t\t\"KN\",\n\t\t\"KY\",\n\t\t\"LC\",\n\t\t\"MF\",\n\t\t\"MQ\",\n\t\t\"MS\",\n\t\t\"MX\",\n\t\t\"NI\",\n\t\t\"PA\",\n\t\t\"PM\",\n\t\t\"PR\",\n\t\t\"SV\",\n\t\t\"SX\",\n\t\t\"TC\",\n\t\t\"TT\",\n\t\t\"US\",\n\t\t\"VC\",\n\t\t\"VG\",\n\t\t\"VI\"\n\t]),\n\tOceania: /* @__PURE__ */ new Set([\n\t\t\"AS\",\n\t\t\"AU\",\n\t\t\"CC\",\n\t\t\"CK\",\n\t\t\"CX\",\n\t\t\"FJ\",\n\t\t\"FM\",\n\t\t\"GU\",\n\t\t\"HM\",\n\t\t\"KI\",\n\t\t\"MH\",\n\t\t\"MP\",\n\t\t\"NC\",\n\t\t\"NF\",\n\t\t\"NR\",\n\t\t\"NU\",\n\t\t\"NZ\",\n\t\t\"PF\",\n\t\t\"PG\",\n\t\t\"PN\",\n\t\t\"PW\",\n\t\t\"SB\",\n\t\t\"TK\",\n\t\t\"TO\",\n\t\t\"TV\",\n\t\t\"UM\",\n\t\t\"VU\",\n\t\t\"WF\",\n\t\t\"WS\"\n\t]),\n\t\"South America\": /* @__PURE__ */ new Set([\n\t\t\"AR\",\n\t\t\"BO\",\n\t\t\"BR\",\n\t\t\"BV\",\n\t\t\"CL\",\n\t\t\"CO\",\n\t\t\"EC\",\n\t\t\"FK\",\n\t\t\"GF\",\n\t\t\"GS\",\n\t\t\"GY\",\n\t\t\"PE\",\n\t\t\"PY\",\n\t\t\"SR\",\n\t\t\"UY\",\n\t\t\"VE\"\n\t])\n}))();\nfunction matchesLocation(currentCountry, targetLocation) {\n\tif (triggerActionRegionMap[targetLocation]?.has(currentCountry)) return true;\n\treturn currentCountry === targetLocation;\n}\n\n//#endregion\n//#region ../../library/src/modules/TriggerStateContext.tsx\nconst TriggerStateContext = /* @__PURE__ */ (() => {\n\tconst Context = createContext(void 0);\n\tContext.displayName = \"TriggerStateContext\";\n\treturn Context;\n})();\nfunction TriggerStateProvider({ currentRoutePath, routerAPI, children }) {\n\tconst visitedPagesRef = useRef();\n\tconst routeChangeHandlerRef = useRef();\n\tconst routerAPIRef = useRef(routerAPI);\n\tconst triggerStateRef = useRef(null);\n\trouterAPIRef.current = routerAPI;\n\tuseEffect(() => {\n\t\tif (!currentRoutePath) return;\n\t\tvisitedPagesRef.current ??= /* @__PURE__ */ new Set();\n\t\tvisitedPagesRef.current.add(currentRoutePath);\n\t\trouteChangeHandlerRef.current?.(currentRoutePath);\n\t}, [currentRoutePath]);\n\tconst [initialState] = useState(() => ({\n\t\tgetInitialState: () => ({\n\t\t\tvisitedPages: visitedPagesRef.current ?? /* @__PURE__ */ new Set(),\n\t\t\tgetCurrentRoutePath: () => routerAPIRef.current ? resolveRoutePath(routerAPIRef.current, routerAPIRef.current.currentRouteId, routerAPIRef.current.currentPathVariables) : \"\",\n\t\t\tresolveRoute: (linkToWebPage) => routerAPIRef.current ? resolveRoutePath(routerAPIRef.current, linkToWebPage.webPageId, linkToWebPage.pathVariables) : \"\",\n\t\t\tsetRouteChangeHandler: (handler) => {\n\t\t\t\trouteChangeHandlerRef.current = handler;\n\t\t\t},\n\t\t\tsendTrackingEvent: async (event) => {\n\t\t\t\tif (!routerAPIRef.current) return;\n\t\t\t\tsendTrackingEventForTriggerInvoke(routerAPIRef.current.pageviewEventData.current, event);\n\t\t\t}\n\t\t}),\n\t\ttriggerStateRef\n\t}));\n\treturn /* @__PURE__ */ jsx(TriggerStateContext.Provider, {\n\t\tvalue: initialState,\n\t\tchildren\n\t});\n}\nasync function sendTrackingEventForTriggerInvoke(maybePageViewEventData, event) {\n\tif (!isValidTrackingId(event.trackingId)) return;\n\tconst pageViewEventData = maybePageViewEventData instanceof Promise ? await maybePageViewEventData : maybePageViewEventData;\n\tif (!pageViewEventData) return;\n\tsendTrackingEvent(\"published_site_trigger_invoke\", {\n\t\t...pageViewEventData,\n\t\t...event,\n\t\ttrackingId: event.trackingId || null\n\t}, \"lazy\");\n}\nfunction resolveRoutePath(routerAPI, routeId, pathVariables) {\n\tconst route = routerAPI.getRoute(routeId);\n\tif (!route?.path) return \"\";\n\treturn pathVariables ? fillPathVariables(route.path, pathVariables) : route.path;\n}\nfunction useTriggerState() {\n\treturn getTriggerState(useContext(TriggerStateContext));\n}\nfunction getTriggerState(triggerStateContext) {\n\tif (typeof window === \"undefined\" || !window.document || isStaticRenderer()) return null;\n\tassert$1(triggerStateContext, \"TriggerStateProvider is missing\");\n\tconst { getInitialState, triggerStateRef } = triggerStateContext;\n\tif (triggerStateRef.current instanceof TriggerState) return triggerStateRef.current;\n\ttriggerStateRef.current = new TriggerState(getInitialState());\n\treturn triggerStateRef.current;\n}\n\n//#endregion\n//#region ../../library/src/router/isSamePage.ts\nfunction isSamePage(a, b) {\n\tif (a.routeId !== b.routeId) return false;\n\tif (a.pathVariables === b.pathVariables) return true;\n\tconst aPathVariables = a.pathVariables || {};\n\tconst bPathVariables = b.pathVariables || {};\n\treturn aPathVariables.length === bPathVariables.length && Object.keys(aPathVariables).every((key) => aPathVariables[key] === bPathVariables[key]);\n}\n\n//#endregion\n//#region ../../library/src/router/pageAnalytics.ts\nlet timezone = null;\nlet visitorLocale = null;\nfunction setTimezoneAndLocaleForTracking() {\n\tconst resolvedDateTimeOptions = Intl.DateTimeFormat().resolvedOptions();\n\ttimezone = resolvedDateTimeOptions.timeZone;\n\tvisitorLocale = resolvedDateTimeOptions.locale;\n}\nrequestIdleCallback(setTimezoneAndLocaleForTracking);\nconst useSendPageView = (currentRoute, currentRouteId, currentPathnameWithHash, currentPathVariables, activeLocale, initialCollectionItemId) => {\n\tconst framerSiteId = useContext(FormContext);\n\tconst pageviewEventData = useRef();\n\tconst collectionUtils = useCollectionUtils();\n\tconst skipFirstPageView = useRef(true);\n\tuseEffect(() => {\n\t\tfunction getFullPageviewEventData() {\n\t\t\tif (!timezone || !visitorLocale) setTimezoneAndLocaleForTracking();\n\t\t\tconst currentLocation = currentPathnameWithHash ? new URL(currentPathnameWithHash, safeWindow.location.href) : safeWindow.location;\n\t\t\tconst eventData = {\n\t\t\t\tversion: 2,\n\t\t\t\tabTestId: currentRoute?.abTestId,\n\t\t\t\tframerSiteId: framerSiteId ?? null,\n\t\t\t\twebPageId: currentRoute?.abTestingVariantId ?? currentRouteId,\n\t\t\t\troutePath: currentRoute?.path || \"/\",\n\t\t\t\tcollectionItemId: null,\n\t\t\t\tframerLocale: activeLocale?.code || null,\n\t\t\t\treferrer: null,\n\t\t\t\turl: currentLocation.href,\n\t\t\t\thostname: currentLocation.hostname,\n\t\t\t\tpathname: currentLocation.pathname,\n\t\t\t\tsearch: currentLocation.search || null,\n\t\t\t\thash: currentLocation.hash || null,\n\t\t\t\ttimezone,\n\t\t\t\tlocale: visitorLocale\n\t\t\t};\n\t\t\t/**\n\t\t\t* `undefined` means the collection item id is unknown (e.g. preview or a non-prerendered\n\t\t\t* client render), so we load it below. `null` means this is not a CMS page.\n\t\t\t*/\n\t\t\tconst hydratedCollectionItemId = skipFirstPageView.current && initialCollectionItemId !== void 0 ? initialCollectionItemId : void 0;\n\t\t\treturn currentRoute?.collectionId && currentPathVariables ? (async () => {\n\t\t\t\tlet collectionItemId = hydratedCollectionItemId ?? null;\n\t\t\t\tif (hydratedCollectionItemId === void 0) {\n\t\t\t\t\tconst utils = currentRoute.collectionId && collectionUtils?.get(currentRoute.collectionId);\n\t\t\t\t\tconst [slug] = Object.values(currentPathVariables);\n\t\t\t\t\tif (utils && isString(slug)) {\n\t\t\t\t\t\tconst maybeCollectionItemId = utils.getRecordIdBySlug(slug, activeLocale || void 0);\n\t\t\t\t\t\tcollectionItemId = (isPromise(maybeCollectionItemId) ? await maybeCollectionItemId : maybeCollectionItemId) ?? null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\t...eventData,\n\t\t\t\t\tcollectionItemId\n\t\t\t\t};\n\t\t\t})() : eventData;\n\t\t}\n\t\t(async () => {\n\t\t\tconst eventDataOrPromise = pageviewEventData.current = getFullPageviewEventData();\n\t\t\tconst eventData = eventDataOrPromise instanceof Promise ? await eventDataOrPromise : eventDataOrPromise;\n\t\t\tpageviewEventData.current = eventData;\n\t\t\tif (skipFirstPageView.current) skipFirstPageView.current = false;\n\t\t\telse sendTrackingEvent(\"published_site_pageview\", eventData, \"eager\");\n\t\t})();\n\t\tconst listener = async (event) => {\n\t\t\tif (event.persisted) {\n\t\t\t\tconst eventDataOrPromise = pageviewEventData.current = getFullPageviewEventData();\n\t\t\t\tconst eventData = eventDataOrPromise instanceof Promise ? await eventDataOrPromise : eventDataOrPromise;\n\t\t\t\tpageviewEventData.current = eventData;\n\t\t\t\tsendTrackingEvent(\"published_site_pageview\", eventData, \"eager\");\n\t\t\t}\n\t\t};\n\t\twindow.addEventListener(\"pageshow\", listener);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"pageshow\", listener);\n\t\t};\n\t}, [\n\t\tcurrentRoute,\n\t\tcurrentRouteId,\n\t\tcurrentPathnameWithHash,\n\t\tcurrentPathVariables,\n\t\tactiveLocale,\n\t\tframerSiteId,\n\t\tcollectionUtils,\n\t\tinitialCollectionItemId\n\t]);\n\treturn pageviewEventData;\n};\n\n//#endregion\n//#region ../../library/src/router/pushLocaleHistoryState.ts\n/**\n* Locale switches remount the current route, so preserve its pagination metadata in the new entry.\n*/\nfunction pushLocaleHistoryState({ routeId, url, pathVariables, localeId, contentLocaleId, canonicalPathVariables }) {\n\tpushHistoryState({\n\t\trouteId,\n\t\tpathVariables,\n\t\tlocaleId,\n\t\tpaginationInfo: readHistoryState()?.paginationInfo,\n\t\tcontentLocaleId,\n\t\tcanonicalPathVariables\n\t}, url);\n}\n\n//#endregion\n//#region ../../library/src/router/pushRouteState.ts\nfunction pushRouteState(routeId, route, options) {\n\tconst { path } = route;\n\tif (!path) return;\n\tconst { historyPath, hash, pathVariables, localeId, currentRoutePath, contentLocaleId, canonicalPathVariables } = options;\n\tconst isSameRouteNavigation = currentRoutePath !== void 0 && currentRoutePath === path;\n\tconst previousState = readHistoryState();\n\tconst queryParamBackAnchorSearch = isSameRouteNavigation ? previousState?.queryParamBackAnchorSearch : void 0;\n\tpushHistoryState({\n\t\trouteId,\n\t\thash,\n\t\tpathVariables,\n\t\tcontentLocaleId,\n\t\tcanonicalPathVariables,\n\t\tlocaleId,\n\t\tqueryParamBackAnchorSearch\n\t}, historyPath);\n}\n\n//#endregion\n//#region ../../library/src/router/pushSamePageHashState.ts\n/**\n* Same-page hash navigation does not remount the route, so effects cannot repopulate its history\n* metadata. Preserve it as part of this route-level write instead of the low-level history adapter.\n*/\nfunction pushSamePageHashState(routeId, route, options, beforePush) {\n\tconst currentHistoryState = readHistoryState();\n\tif (!route.path || currentHistoryState?.hash === options.hash) return;\n\tbeforePush?.();\n\tpushHistoryState({\n\t\trouteId,\n\t\thash: options.hash,\n\t\tpathVariables: options.pathVariables,\n\t\tlocaleId: options.localeId,\n\t\tqueryParamBackAnchorSearch: currentHistoryState?.queryParamBackAnchorSearch,\n\t\tpaginationInfo: currentHistoryState?.paginationInfo,\n\t\tcontentLocaleId: currentHistoryState?.contentLocaleId,\n\t\tcanonicalPathVariables: currentHistoryState?.canonicalPathVariables\n\t}, getPathForRoute(route, options));\n}\n\n//#endregion\n//#region ../../library/src/router/scrollManagement.ts\n/**\n* # Custom scroll restoration\n*\n* The Router writes destination history before rendering so render-time URL reads are correct.\n* During Suspense this means history can point at the destination while the source DOM is visible.\n*\n* Scroll position tracking is best effort, through `scrollend`. The idea of this implementation is\n* to piggyback on `scrollend` as it fires when a user stops scrolling. So regular user flow is\n* this:\n* [scrollend] -> [click / tap] -> [navigate()]\n* as `scrollend` usually has fired before a user clicks somewhere.\n*\n* `ScrollRestorationEffects` applies scroll after commit:\n* - \"reset\": hash target, or page origin.\n* - \"restore\": saved position, then hash target or page origin.\n* - \"preserve\": native traversal or locale switch; do not scroll.\n*\n* ## Limitations\n* - Browser native scroll restoration does not store the scroll position when you tap on a link\n*   during a \"fling\", so scrollend behaves exactly like the native scroll restoration.\n* - This also means we do not want extra flushes or similar on navigations, which avoids\n*   reading `scrollX` and `scrollY` in the critical path of INP (as a navigation is\n*   always a result of a user interaction).\n* - Scroll tracking pauses until React commits the navigation so source-page scroll position\n*   updates cannot be written to the destination entry.\n*\n* ### Safari\n* - Swipe-back captures the presented frame when history changes. A push before the first\n*   destination paint captured the source; a push after it captured the destination.\n* - A persisted bfcache return can expose (0, 0) while history state still has the saved position,\n*   so persisted `pageshow` restores it manually.\n*/\nlet lastScrollPositionReplaceStateTime = 0;\n/**\n* Browsers have different `replaceState` limits.\n*\n* As of July 2026:\n* - Safari <17: 100 calls per 30 seconds\n* - Safari 17+: 100 calls per 10 seconds (https://github.com/WebKit/WebKit/commit/451d10e21bf95fec6dc00ef842ab676a38db4278)\n* - Chromium 72+: 200 calls per 10 seconds (https://chromium.googlesource.com/chromium/src/+/HEAD/third_party/blink/renderer/core/frame/navigation_rate_limiter.cc)\n* - Firefox 83+: 200 calls per 10 seconds (https://bugzilla.mozilla.org/show_bug.cgi?id=1314912)\n* - Firefox 148+ and updated ESR 140: 1,000 calls per 10 seconds (https://bugzilla.mozilla.org/show_bug.cgi?id=1995636)\n*\n* Safari 16 and older are limited to 2 writes per second, leaving room below the 30-second quota.\n* Safari 17 and newer allow 5 writes per second, using at most half of the 10-second quota so\n* navigation and lifecycle writes still have room.\n*/\nconst legacySafariScrollPositionReplaceStateInterval = 500;\nconst modernSafariScrollPositionReplaceStateInterval = 200;\nfunction getSafariScrollPositionReplaceStateInterval() {\n\treturn safariVersion() >= 17 ? modernSafariScrollPositionReplaceStateInterval : legacySafariScrollPositionReplaceStateInterval;\n}\nfunction setupScrollRestoration(trackScrollPosition = updateScrollPosition) {\n\tconst restoreFromBackForwardCache = (event) => {\n\t\tif (!event.persisted) return;\n\t\trestoreScrollPosition();\n\t};\n\tif (isSafari()) {\n\t\twindow.addEventListener(\"pageshow\", restoreFromBackForwardCache);\n\t\tlastScrollPositionReplaceStateTime = Date.now() - getSafariScrollPositionReplaceStateInterval();\n\t}\n\tconst enableBrowserScrollRestoration = disableBrowserScrollRestoration();\n\tconst cleanupTracking = setupContinuousScrollTracking(trackScrollPosition);\n\treturn function cleanup() {\n\t\twindow.removeEventListener(\"pageshow\", restoreFromBackForwardCache);\n\t\tenableBrowserScrollRestoration();\n\t\tcleanupTracking();\n\t};\n}\nfunction disableBrowserScrollRestoration() {\n\tconst originalScrollRestoration = window.history.scrollRestoration;\n\twindow.history.scrollRestoration = \"manual\";\n\treturn function cleanup() {\n\t\twindow.history.scrollRestoration = originalScrollRestoration;\n\t};\n}\nfunction isScrollPosition(value) {\n\treturn isObject$1(value) && typeof value.x === \"number\" && typeof value.y === \"number\";\n}\nfunction getCurrentWindowScrollPosition() {\n\treturn {\n\t\tx: window.scrollX,\n\t\ty: window.scrollY\n\t};\n}\nfunction getSavedScrollPosition() {\n\tconst currentState = readHistoryState();\n\tif (!currentState) return;\n\tconst { scrollPosition } = currentState;\n\tif (!isScrollPosition(scrollPosition)) return;\n\treturn scrollPosition;\n}\nfunction replaceScrollPositionForCurrentEntry(position) {\n\tconst currentState = readHistoryState();\n\tif (!currentState) return;\n\treplaceHistoryState({\n\t\t...currentState,\n\t\tscrollPosition: position\n\t});\n\tif (isSafari()) lastScrollPositionReplaceStateTime = Date.now();\n}\nfunction updateScrollPosition(position, flush = false) {\n\tconst savedPosition = getSavedScrollPosition();\n\tif (!(!savedPosition || savedPosition.x !== position.x || savedPosition.y !== position.y)) return;\n\tif (isSafari() && !flush) {\n\t\tconst scrollPositionReplaceStateInterval = getSafariScrollPositionReplaceStateInterval();\n\t\tif (Date.now() - lastScrollPositionReplaceStateTime < scrollPositionReplaceStateInterval) return;\n\t}\n\treplaceScrollPositionForCurrentEntry(position);\n}\n/**\n* We need to continuously monitor the scroll position, because otherwise there is no good way to\n* ensure a forward navigation after a back navigation works correctly.\n*\n* pagehide/visibilitychange is just a safety net, in cases where e.g. you click a slow external\n* link, then start scrolling and in the middle of the scroll the next page is loaded (thus pagehide\n* is triggered). We'll then correctly restore the scroll position on browser back.\n*\n* We on purpose do not track e.g. mousedown (button 3/4) presses, because at least Chrome's native\n* scroll tracking does also not record the scroll position in this case.\n*/\nfunction setupContinuousScrollTracking(trackScrollPosition) {\n\tconst persistScrollPosition = () => {\n\t\ttrackScrollPosition(getCurrentWindowScrollPosition());\n\t};\n\tconst flushScrollPosition = () => {\n\t\ttrackScrollPosition(getCurrentWindowScrollPosition(), true);\n\t};\n\tconst onDocumentVisibilityChange = () => {\n\t\tif (document.visibilityState !== \"hidden\") return;\n\t\tflushScrollPosition();\n\t};\n\tdocument.addEventListener(\"visibilitychange\", onDocumentVisibilityChange);\n\twindow.addEventListener(\"pagehide\", flushScrollPosition);\n\tconst cleanupVisibilityTracking = () => {\n\t\tdocument.removeEventListener(\"visibilitychange\", onDocumentVisibilityChange);\n\t\twindow.removeEventListener(\"pagehide\", flushScrollPosition);\n\t};\n\tif (!(\"onscrollend\" in window)) {\n\t\tconst cleanupScrollTracking = setupScrollEndFallbackTracking(persistScrollPosition);\n\t\treturn function cleanup() {\n\t\t\tcleanupVisibilityTracking();\n\t\t\tcleanupScrollTracking();\n\t\t};\n\t}\n\twindow.addEventListener(\"scrollend\", persistScrollPosition);\n\treturn function cleanup() {\n\t\tcleanupVisibilityTracking();\n\t\twindow.removeEventListener(\"scrollend\", persistScrollPosition);\n\t};\n}\nfunction setupScrollEndFallbackTracking(onScrollEnd) {\n\tlet timeoutId;\n\tlet scheduledEntryId;\n\tfunction cancelScheduledScrollEnd() {\n\t\tclearTimeout(timeoutId);\n\t\ttimeoutId = void 0;\n\t\tscheduledEntryId = void 0;\n\t}\n\tconst trackScrollPosition = () => {\n\t\tconst entryId = scheduledEntryId;\n\t\tcancelScheduledScrollEnd();\n\t\tif (entryId === void 0 || getEntryId(readHistoryState()) !== entryId) return;\n\t\tonScrollEnd();\n\t};\n\tconst scrollHandler = () => {\n\t\tconst currentEntryId = getEntryId(readHistoryState());\n\t\tif (currentEntryId === void 0) {\n\t\t\tcancelScheduledScrollEnd();\n\t\t\treturn;\n\t\t}\n\t\tclearTimeout(timeoutId);\n\t\tscheduledEntryId = currentEntryId;\n\t\tconst quietPeriod = isSafari() ? getSafariScrollPositionReplaceStateInterval() : 100;\n\t\ttimeoutId = window.setTimeout(trackScrollPosition, quietPeriod);\n\t};\n\twindow.addEventListener(\"scroll\", scrollHandler);\n\treturn function cleanup() {\n\t\twindow.removeEventListener(\"scroll\", scrollHandler);\n\t\tcancelScheduledScrollEnd();\n\t};\n}\n/**\n* @important Make sure this runs in a rAF, because browsers also wait for scroll restoration until the tab is visible.\n*/\nfunction restoreScrollPosition() {\n\tconst savedPosition = getSavedScrollPosition();\n\tif (!savedPosition) return false;\n\twindow.scrollTo(savedPosition.x, savedPosition.y);\n\treturn true;\n}\nfunction scrollElementIntoView(element, shouldSmoothScroll) {\n\tconst scrollIntoViewOptions = shouldSmoothScroll ? {\n\t\tbehavior: \"smooth\",\n\t\tblock: \"start\",\n\t\tinline: \"nearest\"\n\t} : void 0;\n\telement.scrollIntoView(scrollIntoViewOptions);\n}\n/**\n* @important Make sure this runs in a rAF, because browsers also wait for scroll restoration until the tab is visible.\n*/\nfunction tryScrollToHash(hash, shouldSmoothScroll) {\n\tconst element = hash && document.getElementById(hash);\n\tif (element) {\n\t\tscrollElementIntoView(element, shouldSmoothScroll);\n\t\treturn true;\n\t}\n}\nfunction updateScrollForNavigation(hash, shouldSmoothScroll, behavior) {\n\tif (behavior === \"preserve-scroll-position\") return;\n\tframe.render(() => {\n\t\tif (behavior === \"restore-scroll-position\" && restoreScrollPosition()) return;\n\t\tif (tryScrollToHash(hash, shouldSmoothScroll)) return;\n\t\twindow.scrollTo(0, 0);\n\t}, false, true);\n}\nfunction restoreInitialScroll(hash, shouldSmoothScroll) {\n\tframe.read(() => {\n\t\tif (window.scrollY !== 0 || window.scrollX !== 0) return;\n\t\tframe.render(() => {\n\t\t\tif (restoreScrollPosition()) return;\n\t\t\ttryScrollToHash(hash, shouldSmoothScroll);\n\t\t}, false, true);\n\t});\n}\n/**\n* Handles scroll restoration for the router.\n* It restores the initial scroll position on mount, sets up continuous scroll tracking, and\n* pauses tracking until the matching route commits.\n*/\nfunction useScrollRestoration(disableHistory) {\n\tconst isScrollRestorationEnabled = getLibraryFeatures().scrollRestoration;\n\tconst pendingNavigationScrollRef = useRef(void 0);\n\tconst isScrollTrackingPausedRef = useRef(false);\n\tconst isCustomScrollRestorationConfigured = Boolean(isScrollRestorationEnabled && !disableHistory);\n\tconst scheduleScroll = useCallback((request) => {\n\t\tpendingNavigationScrollRef.current = request;\n\t\tif (!isCustomScrollRestorationConfigured) return;\n\t\tisScrollTrackingPausedRef.current = true;\n\t}, [isCustomScrollRestorationConfigured]);\n\tconst trackScrollPosition = useCallback((position, flush = false) => {\n\t\tif (isScrollTrackingPausedRef.current) return;\n\t\tupdateScrollPosition(position, flush);\n\t}, []);\n\tconst onHistoryTraversal = useCallback(() => {\n\t\tif (!isCustomScrollRestorationConfigured) return;\n\t\tisScrollTrackingPausedRef.current = true;\n\t}, [isCustomScrollRestorationConfigured]);\n\tconst isNavigationCommitPending = useCallback(() => pendingNavigationScrollRef.current !== void 0 || isScrollTrackingPausedRef.current, []);\n\tconst commitNavigationScroll = useCallback((routeId, remountKey) => {\n\t\tconst request = pendingNavigationScrollRef.current;\n\t\tif (!request || request.routeId !== routeId || request.remountKey !== remountKey) return;\n\t\tpendingNavigationScrollRef.current = void 0;\n\t\tisScrollTrackingPausedRef.current = false;\n\t\tupdateScrollForNavigation(request.hash, request.shouldSmoothScroll, request.behavior);\n\t}, []);\n\tuseLayoutEffect(() => {\n\t\tif (!isCustomScrollRestorationConfigured) return;\n\t\treturn setupScrollRestoration(trackScrollPosition);\n\t}, [isCustomScrollRestorationConfigured, trackScrollPosition]);\n\treturn {\n\t\tusesCustomScrollRestoration: isCustomScrollRestorationConfigured,\n\t\tisNavigationCommitPending,\n\t\tonHistoryTraversal,\n\t\tscheduleScroll,\n\t\tcommitNavigationScroll\n\t};\n}\n/**\n* Must stay inside `SuspenseThatPreservesDom` and before the page subtree. This keeps pending\n* ownership while the destination suspends, then commits it before destination layout effects.\n* The actual navigation scroll is frame-scheduled, so the DOM is ready before it runs.\n*/\nfunction ScrollRestorationEffects({ currentRouteId, remountKey, scrollRestoration }) {\n\tconst { commitNavigationScroll, usesCustomScrollRestoration } = scrollRestoration;\n\tuseLayoutEffect(() => {\n\t\tcommitNavigationScroll(currentRouteId, remountKey);\n\t});\n\tuseEffect(() => {\n\t\tif (!usesCustomScrollRestoration) return;\n\t\trestoreInitialScroll(window.location.hash.slice(1) || void 0, false);\n\t}, []);\n\treturn null;\n}\n\n//#endregion\n//#region ../../library/src/router/useForceUpdate.ts\nfunction useForceUpdate$1() {\n\tconst [_, setForcedRenderCount] = React.useState(0);\n\treturn [_, React.useCallback(() => setForcedRenderCount((v) => v + 1), [])];\n}\n\n//#endregion\n//#region ../../shared/src/ssg/constants.ts\nconst mainTagId = \"main\";\nconst generatedPageDatasetKey = \"framerGeneratedPage\";\nconst startOfHeadStartMarker = \"<!-- Start of headStart -->\";\nconst endOfHeadStartMarker = \"<!-- End of headStart -->\";\nconst startOfHeadEndMarker = \"<!-- Start of headEnd -->\";\nconst endOfHeadEndMarker = \"<!-- End of headEnd -->\";\nconst startOfBodyStartMarker = \"<!-- Start of bodyStart -->\";\nconst endOfBodyStartMarker = \"<!-- End of bodyStart -->\";\nconst startOfBodyEndMarker = \"<!-- Start of bodyEnd -->\";\nconst endOfBodyEndMarker = \"<!-- End of bodyEnd -->\";\n\n//#endregion\n//#region ../../library/src/modules/custom-code/context.tsx\nconst SnippetsContext = /* @__PURE__ */ (() => React.createContext(void 0))();\nfunction SnippetsProvider({ children, loadSnippetsModule }) {\n\treturn /* @__PURE__ */ jsx(SnippetsContext.Provider, {\n\t\tvalue: loadSnippetsModule,\n\t\tchildren\n\t});\n}\nfunction useSnippets() {\n\treturn React.useContext(SnippetsContext);\n}\n\n//#endregion\n//#region ../../shared/src/custom-code/markers.ts\nfunction getSnippetMarkers(id) {\n\treturn {\n\t\tstart: `<!-- Snippet: ${id} -->`,\n\t\tend: `<!-- SnippetEnd: ${id} -->`\n\t};\n}\n\n//#endregion\n//#region ../../library/src/utils/insertHTML.ts\n/**\n* Inserts `html` into the document relative to `referenceNode`.\n*\n* Will block parsing on sync scripts, mimicking the browser's parser.\n*/\nasync function insertHTML(html, referenceNode, position = \"beforeend\") {\n\tlet insertionParent, insertionPoint;\n\tswitch (position) {\n\t\tcase \"beforebegin\":\n\t\t\tassert$1(referenceNode.parentNode, \"Can't use 'beforebegin' with a referenceNode at the top level\");\n\t\t\tinsertionParent = referenceNode.parentNode;\n\t\t\tinsertionPoint = referenceNode;\n\t\t\tbreak;\n\t\tcase \"afterend\":\n\t\t\tassert$1(referenceNode.parentNode, \"Can't use 'afterend' with a referenceNode at the top level\");\n\t\t\tinsertionParent = referenceNode.parentNode;\n\t\t\tinsertionPoint = referenceNode.nextSibling;\n\t\t\tbreak;\n\t\tcase \"afterbegin\":\n\t\t\tinsertionParent = referenceNode;\n\t\t\tinsertionPoint = referenceNode.firstChild;\n\t\t\tbreak;\n\t\tcase \"beforeend\":\n\t\t\tinsertionParent = referenceNode;\n\t\t\tinsertionPoint = null;\n\t\t\tbreak;\n\t\tdefault: assertNever$1(position);\n\t}\n\tconst range = document.createRange();\n\trange.selectNodeContents(insertionParent);\n\tawait pump(range.createContextualFragment(html), insertionParent, insertionPoint);\n}\nasync function pump(sourceNode, targetParent, beforeNode) {\n\tfor (let node = sourceNode.firstChild; node; node = node.nextSibling) {\n\t\tif (node instanceof HTMLScriptElement) {\n\t\t\tconst needsWait = handleScript(node, targetParent, beforeNode);\n\t\t\tif (needsWait !== void 0) await needsWait;\n\t\t\tcontinue;\n\t\t}\n\t\tconst clone = node.cloneNode(false);\n\t\ttargetParent.insertBefore(clone, beforeNode);\n\t\tif (node.firstChild) await pump(node, clone, null);\n\t}\n}\nfunction handleScript(node, parent, beforeNode) {\n\tconst script = node.cloneNode(true);\n\tif (!node.hasAttribute(\"src\") || node.hasAttribute(\"async\") || node.hasAttribute(\"defer\") || node.getAttribute(\"type\")?.toLowerCase() === \"module\") parent.insertBefore(script, beforeNode);\n\telse return execExternalBlockingScript(script, parent, beforeNode);\n}\nfunction execExternalBlockingScript(script, parent, beforeNode) {\n\treturn new Promise((resolve) => {\n\t\tscript.onload = script.onerror = resolve;\n\t\tparent.insertBefore(script, beforeNode);\n\t});\n}\n\n//#endregion\n//#region ../../library/src/modules/custom-code/markers.ts\nfunction findMarkers(placement) {\n\tlet startMarker;\n\tlet endMarker;\n\tswitch (placement) {\n\t\tcase \"bodyStart\":\n\t\t\tstartMarker = startOfBodyStartMarker;\n\t\t\tendMarker = endOfBodyStartMarker;\n\t\t\tbreak;\n\t\tcase \"bodyEnd\":\n\t\t\tstartMarker = startOfBodyEndMarker;\n\t\t\tendMarker = endOfBodyEndMarker;\n\t\t\tbreak;\n\t\tcase \"headStart\":\n\t\t\tstartMarker = startOfHeadStartMarker;\n\t\t\tendMarker = endOfHeadStartMarker;\n\t\t\tbreak;\n\t\tcase \"headEnd\":\n\t\t\tstartMarker = startOfHeadEndMarker;\n\t\t\tendMarker = endOfHeadEndMarker;\n\t}\n\tconst element = placement === \"bodyStart\" || placement === \"bodyEnd\" ? document.body : document.head;\n\tlet start = null;\n\tlet end = null;\n\tfor (const node of element.childNodes) {\n\t\tif (node.nodeType !== Node.COMMENT_NODE) continue;\n\t\tconst comment = `<!--${node.nodeValue}-->`;\n\t\tif (comment === startMarker) start = node;\n\t\telse if (comment === endMarker) end = node;\n\t}\n\treturn {\n\t\tstart,\n\t\tend\n\t};\n}\nfunction findSnippetMarkerNodes(snippetId, startMarker, endMarker) {\n\tif (!startMarker || !endMarker) return {\n\t\tstart: null,\n\t\tend: null\n\t};\n\tlet start = null;\n\tlet end = null;\n\tconst { start: startComment, end: endComment } = getSnippetMarkers(snippetId);\n\tlet node = startMarker.nextSibling;\n\twhile (node && node !== endMarker) {\n\t\tif (node.nodeType !== Node.COMMENT_NODE) {\n\t\t\tnode = node.nextSibling;\n\t\t\tcontinue;\n\t\t}\n\t\tconst comment = `<!--${node.nodeValue}-->`;\n\t\tif (comment === startComment) start = node;\n\t\telse if (comment === endComment) {\n\t\t\tend = node;\n\t\t\tbreak;\n\t\t}\n\t\tnode = node.nextSibling;\n\t}\n\treturn {\n\t\tstart,\n\t\tend\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/custom-code/loadSnippets.ts\nasync function loadSnippets(placement, snippets, sorting) {\n\tif (snippets.length === 0) return;\n\tconst { start, end } = findMarkers(placement);\n\tconst placementParent = placement === \"bodyStart\" || placement === \"bodyEnd\" ? document.body : document.head;\n\tfor (const snippet of snippets) {\n\t\tconst { start: startSnippetMarker, end: endSnippetMarker } = findSnippetMarkerNodes(snippet.id, start, end);\n\t\tconst isLoaded = startSnippetMarker && endSnippetMarker;\n\t\tif (isLoaded && snippet.loadMode === \"once\") continue;\n\t\tremoveSnippetElements(startSnippetMarker, endSnippetMarker);\n\t\tif (isLoaded) {\n\t\t\tawait insertHTML(snippet.code, endSnippetMarker, \"beforebegin\");\n\t\t\tcontinue;\n\t\t}\n\t\tconst { start: codeStart, end: codeEnd } = getSnippetMarkers(snippet.id);\n\t\tconst code = `${codeStart}\\n${snippet.code}\\n${codeEnd}`;\n\t\tconst insertReference = findInsertReferece(snippet.id, sorting, start, end);\n\t\tif (insertReference) await insertHTML(code, insertReference, \"afterend\");\n\t\telse await insertHTML(code, start ?? placementParent, start ? \"afterend\" : \"beforeend\");\n\t}\n}\nfunction removeSnippetElements(start, end) {\n\tif (!start || !end) return;\n\tlet node = start.nextSibling;\n\twhile (node && node !== end) {\n\t\tconst nextNode = node.nextSibling;\n\t\tif (isRemovableNode(node)) node.remove();\n\t\tnode = nextNode;\n\t}\n}\nfunction isRemovableNode(node) {\n\tif (node.nodeType !== Node.ELEMENT_NODE) return true;\n\tif (node.nodeName === \"SCRIPT\") {\n\t\tconst type = node.type;\n\t\tif (!type || type === \"text/javascript\" || type === \"module\") return false;\n\t}\n\treturn true;\n}\n/**\n* Searches the first reference point in the document for the given snippet id.\n*\n* This is necessary as there might be snippets that aren't loaded yet, but they are the previous items in the sorting array.\n*/\nfunction findInsertReferece(snippetId, sorting, start, end) {\n\tconst startIndex = sorting.indexOf(snippetId) - 1;\n\tif (startIndex < 0) return null;\n\tfor (let i = startIndex; i >= 0; i--) {\n\t\tconst item = sorting[i];\n\t\tif (!item) continue;\n\t\tconst reference = findSnippetMarkerNodes(item, start, end).end;\n\t\tif (reference) return reference;\n\t}\n\treturn null;\n}\n\n//#endregion\n//#region ../../library/src/modules/custom-code/useLoadSnippets.ts\nfunction useLoadSnippets() {\n\tconst loadSnippetsModule = useSnippets();\n\treturn useCallback(async (pageId, pathVariables, contentLocale, isInitialNavigation) => {\n\t\tif (!loadSnippetsModule) return;\n\t\tconst isGeneratedPage = document.getElementById(mainTagId)?.dataset[generatedPageDatasetKey] !== void 0;\n\t\tif (isInitialNavigation && isGeneratedPage) return;\n\t\tconst { getSnippets, snippetsSorting } = await loadSnippetsModule.readMaybeAsync();\n\t\tconst snippets = await getSnippets(pageId, pathVariables, contentLocale);\n\t\tfor (const key in snippets) {\n\t\t\tconst placement = key;\n\t\t\tconst snippetsForPlacement = snippets[placement];\n\t\t\tconst sorting = snippetsSorting[placement];\n\t\t\tawait loadSnippets(placement, snippetsForPlacement, sorting);\n\t\t}\n\t}, [loadSnippetsModule]);\n}\n\n//#endregion\n//#region ../../shared/src/ssg/canonicalURLForPath.ts\n/**\n* Combines a page path with a canonical URL to create a full page URL. Correctly accounts for canonical URLs that include pathnames.\n*\n* @example\n* canonicalURLForPath(\"/about\", \"https://www.framer.com\") // → \"https://www.framer.com/about\"\n* canonicalURLForPath(\"/about\", \"https://www.framer.com/sites\") // → \"https://www.framer.com/sites/about\"\n* canonicalURLForPath(\"/about\", \"https://www.framer.com/sites/\") // → \"https://www.framer.com/sites/about\"\n*/\nfunction canonicalURLForPath(path, canonicalURL) {\n\tif (path.startsWith(\"/\")) path = \".\" + path;\n\tconst baseURL = new URL(canonicalURL);\n\tif (!baseURL.pathname.endsWith(\"/\")) baseURL.pathname += \"/\";\n\treturn new URL(path, baseURL).href;\n}\n\n//#endregion\n//#region ../../library/src/router/prepareSyncLocaleMetadataAction.tsx\nasync function prepareSyncLocaleMetadataAction({ siteCanonicalURL, activeLocale, contentLocale, currentRoute, currentRouteId, currentPathVariables, locales, collectionUtils }) {\n\tif (!siteCanonicalURL || !activeLocale || !contentLocale || !currentRoute) return;\n\tlet generatedCanonicalURL;\n\tconst hreflangLinks = [];\n\tconst defaultLocale = locales.find((locale) => locale.id === defaultLocaleId);\n\tconst { path: localizedNavigationPath } = await getLocalizedNavigationPath({\n\t\tcurrentLocale: activeLocale,\n\t\tnextLocale: contentLocale,\n\t\tdefaultLocale,\n\t\troute: currentRoute,\n\t\trouteId: currentRouteId,\n\t\tpathVariables: currentPathVariables,\n\t\tcollectionUtils,\n\t\tpreserveQueryParams: false\n\t});\n\tif (localizedNavigationPath) generatedCanonicalURL = canonicalURLForPath(localizedNavigationPath, siteCanonicalURL);\n\tlet xDefaultHref;\n\tfor (const locale of locales) {\n\t\tif (currentRoute.includedLocales && !currentRoute.includedLocales.includes(locale.id)) continue;\n\t\tconst { path, isMissingInLocale } = await getLocalizedNavigationPath({\n\t\t\tcurrentLocale: activeLocale,\n\t\t\tnextLocale: locale,\n\t\t\tdefaultLocale,\n\t\t\troute: currentRoute,\n\t\t\trouteId: currentRouteId,\n\t\t\tpathVariables: currentPathVariables,\n\t\t\tcollectionUtils,\n\t\t\tpreserveQueryParams: false\n\t\t});\n\t\tif (!path || isMissingInLocale) continue;\n\t\tconst href = canonicalURLForPath(path, siteCanonicalURL);\n\t\threflangLinks.push({\n\t\t\thref,\n\t\t\threfLang: locale.code\n\t\t});\n\t\tif (locale.id === \"default\") xDefaultHref = href;\n\t}\n\tif (xDefaultHref) hreflangLinks.push({\n\t\thref: xDefaultHref,\n\t\threfLang: \"x-default\"\n\t});\n\treturn () => {\n\t\tsyncGeneratedCanonicalURL(generatedCanonicalURL, window.location.href);\n\t\tsyncGeneratedHreflangLinks(hreflangLinks);\n\t};\n}\n\n//#endregion\n//#region ../../library/src/router/useRouteLocaleContentSync.tsx\nfunction useRouteLocaleContentSync({ activeLocale, contentLocale, currentPathVariables, currentRoute, currentRouteId, isInitialNavigation, locales, siteCanonicalURL }) {\n\tconst collectionUtilsCache = useCollectionUtils();\n\tconst loadSnippets = useLoadSnippets();\n\tuseEffect(() => {\n\t\tlet isCurrent = true;\n\t\tconst markAsStale = () => void (isCurrent = false);\n\t\tif (!activeLocale || !contentLocale) {\n\t\t\tloadSnippets(currentRouteId, currentPathVariables ?? {}, activeLocale, isInitialNavigation).catch((error) => {\n\t\t\t\tif (!isCurrent) return;\n\t\t\t\tcollectErrorToAnalytics(error);\n\t\t\t});\n\t\t\treturn markAsStale;\n\t\t}\n\t\t(activeLocale.id === contentLocale.id ? /* @__PURE__ */ noopAsync$1() : getLocalizedNavigationPath({\n\t\t\tcurrentLocale: activeLocale,\n\t\t\tnextLocale: contentLocale,\n\t\t\tdefaultLocale: locales.find(({ id }) => id === defaultLocaleId),\n\t\t\troute: currentRoute,\n\t\t\trouteId: currentRouteId,\n\t\t\tpathVariables: currentPathVariables,\n\t\t\tcollectionUtils: collectionUtilsCache,\n\t\t\tpreserveQueryParams: false\n\t\t})).then(async (result) => {\n\t\t\tif (!isCurrent) return;\n\t\t\tconst pathVariables = result ? result.pathVariables : currentPathVariables;\n\t\t\tawait loadSnippets(currentRouteId, pathVariables ?? {}, contentLocale, isInitialNavigation);\n\t\t\tif (!isCurrent) return;\n\t\t\tconst syncLocaleMetadata = await prepareSyncLocaleMetadataAction({\n\t\t\t\tsiteCanonicalURL,\n\t\t\t\tactiveLocale,\n\t\t\t\tcontentLocale,\n\t\t\t\tcurrentRoute,\n\t\t\t\tcurrentRouteId,\n\t\t\t\tcurrentPathVariables,\n\t\t\t\tlocales,\n\t\t\t\tcollectionUtils: collectionUtilsCache\n\t\t\t});\n\t\t\tif (!isCurrent) return;\n\t\t\tsyncLocaleMetadata?.();\n\t\t}).catch((error) => {\n\t\t\tif (!isCurrent) return;\n\t\t\tcollectErrorToAnalytics(error);\n\t\t});\n\t\treturn markAsStale;\n\t}, [\n\t\tactiveLocale,\n\t\tcollectionUtilsCache,\n\t\tcontentLocale,\n\t\tcurrentPathVariables,\n\t\tcurrentRoute,\n\t\tcurrentRouteId,\n\t\tisInitialNavigation,\n\t\tloadSnippets,\n\t\tlocales,\n\t\tsiteCanonicalURL\n\t]);\n}\n\n//#endregion\n//#region ../../library/src/router/Router.tsx\nfunction executeBeforeUrlUpdateOnce(beforeUrlUpdate) {\n\tif (!beforeUrlUpdate) return noop$5;\n\tlet beforeUrlUpdateExecuted = false;\n\treturn () => {\n\t\tif (beforeUrlUpdateExecuted) return;\n\t\tbeforeUrlUpdateExecuted = true;\n\t\tbeforeUrlUpdate?.();\n\t};\n}\n/**\n* Wrapper around navigation transitions (React, not view transitions). Add side-effects of the navigation transition here.\n* @return The returned callback returns a promise that resolves when the URL navigation is complete, including rendering and URL update.\n*/\nfunction useNavigationTransition(usesCustomScrollRestoration) {\n\tconst commitNavigationURL = useCommitNavigationURL(usesCustomScrollRestoration);\n\tconst pendingNavigationControllerRef = useRef(void 0);\n\tconst cancelPendingNavigation = useCallback(() => {\n\t\tpendingNavigationControllerRef.current?.abort();\n\t\tpendingNavigationControllerRef.current = void 0;\n\t}, []);\n\treturn {\n\t\tstartNavigation: useCallback(async (transitionFn, nextRender, updateURL, isAbortable = true) => {\n\t\t\tcancelPendingNavigation();\n\t\t\tconst controller = isAbortable ? new AbortController() : void 0;\n\t\t\tpendingNavigationControllerRef.current = controller;\n\t\t\tconst signal = controller?.signal;\n\t\t\tconst stopMonitoringINPRelatedInputs = monitorINPRelatedInputs(signal);\n\t\t\tnextRender.promise.finally(stopMonitoringINPRelatedInputs);\n\t\t\tif (updateURL === void 0) {\n\t\t\t\ttransitionFn(signal);\n\t\t\t\treturn nextRender.promise;\n\t\t\t}\n\t\t\tlet resolveNavigationPromise;\n\t\t\tconst navigationPromise = new Promise((resolve, reject) => {\n\t\t\t\tresolveNavigationPromise = resolve;\n\t\t\t\tsignal?.addEventListener(\"abort\", reject);\n\t\t\t}).catch(noop$5);\n\t\t\tcommitNavigationURL(navigationPromise, controller, updateURL);\n\t\t\ttransitionFn(signal);\n\t\t\tawait nextRender.promise;\n\t\t\tif (signal?.aborted) return;\n\t\t\tconst navigationTransition = window.navigation?.transition;\n\t\t\tresolveNavigationPromise();\n\t\t\ttry {\n\t\t\t\tawait navigationTransition?.finished;\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Navigation transition failed\", error);\n\t\t\t}\n\t\t\tif (signal?.aborted) return;\n\t\t\tannounceNavigation();\n\t\t}, [cancelPendingNavigation, commitNavigationURL]),\n\t\tcancelPendingNavigation\n\t};\n}\nfunction Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, initialCollectionItemId, initialContentLocaleIdOverride, locales = EMPTY_ARRAY, initialCanonicalPathVariables, preserveQueryParams = false, LayoutTemplate, EditorBar, siteCanonicalURL, adaptLayoutToTextDirection }) {\n\tuseMarkRouterEffects();\n\tuseReplaceInitialState({\n\t\tdisabled: disableHistory,\n\t\trouteId: initialRoute,\n\t\tinitialPathVariables,\n\t\tinitialLocaleId,\n\t\tinitialContentLocaleId: initialContentLocaleIdOverride,\n\t\tinitialCanonicalPathVariables\n\t});\n\tconst startViewTransition = useViewTransition();\n\tconst [dep, forceUpdate] = useForceUpdate$1();\n\tconst monitorNextPaintAfterRender = useMonitorNextPaintAfterRender(\"framer-route-change\");\n\tconst transitionFn = useMemo(() => {\n\t\tif (!getLibraryFeatures().synchronousNavigationOnDesktop || !isDesktop()) return startTransition;\n\t\treturn (fn) => fn();\n\t}, []);\n\tconst isInitialNavigationRef = useRef(true);\n\tconst routerPathnameWithHashRef = useRef();\n\tconst localeSwitchRequestIndexRef = useRef(0);\n\tconst currentRouteRef = useRef(initialRoute);\n\tconst currentPathVariablesRef = useRef(initialPathVariables);\n\tconst pendingNavigationResolutionRef = useRef();\n\tconst currentLocaleIdRef = useRef(initialLocaleId);\n\tconst scrollRestoration = useScrollRestoration(disableHistory);\n\tconst { isNavigationCommitPending, usesCustomScrollRestoration } = scrollRestoration;\n\tconst { startNavigation, cancelPendingNavigation } = useNavigationTransition(usesCustomScrollRestoration);\n\tconst collectionUtilsCache = useCollectionUtils();\n\tconst scheduleNavigationScroll = scrollRestoration.scheduleScroll;\n\tconst currentLocaleId = currentLocaleIdRef.current;\n\tconst currentRouteId = currentRouteRef.current;\n\tconst currentPathVariables = currentPathVariablesRef.current;\n\tconst currentRoute = routes[currentRouteId];\n\tconst currentRoutePath = currentRoute?.path;\n\tif (!currentRoute) throw new Error(`Router cannot find route for ${currentRouteId}`);\n\tconst defaultLocale = useMemo(() => {\n\t\treturn locales.find(({ id }) => id === defaultLocaleId);\n\t}, [locales]);\n\tconst activeLocale = useMemo(() => {\n\t\treturn locales.find(({ id }) => {\n\t\t\tif (!currentLocaleId) return id === \"default\";\n\t\t\treturn id === currentLocaleId;\n\t\t}) ?? null;\n\t}, [currentLocaleId, locales]);\n\tconst { contentLocale, currentCanonicalPathVariables, pageExistsInCurrentLocale, setRouteContentState } = useRouteContentState({\n\t\tactiveLocale,\n\t\tcurrentRoute,\n\t\tinitialCanonicalPathVariables,\n\t\tinitialContentLocaleIdOverride,\n\t\tlocales,\n\t\troutes\n\t});\n\tconst textDirection = activeLocale?.textDirection ?? \"ltr\";\n\tconst layoutDirection = adaptLayoutToTextDirection ? textDirection : \"ltr\";\n\tuseLayoutEffect(() => {\n\t\tif (!adaptLayoutToTextDirection) return;\n\t\tdocument.documentElement.setAttribute(\"dir\", textDirection);\n\t}, [textDirection, adaptLayoutToTextDirection]);\n\tconst lang = activeLocale?.code;\n\tuseLayoutEffect(() => {\n\t\tif (lang) document.documentElement.setAttribute(\"lang\", lang);\n\t}, [lang]);\n\tconst switchLocale = useSwitchLocale();\n\tconst localeInfo = useMemo(() => {\n\t\treturn {\n\t\t\tactiveLocale,\n\t\t\tcontentLocale,\n\t\t\tlocales,\n\t\t\tsetLocale: async (localeOrLocaleId) => {\n\t\t\t\tconst requestIndex = ++localeSwitchRequestIndexRef.current;\n\t\t\t\tconst nextRender = monitorNextPaintAfterRender({ localized: true });\n\t\t\t\tawait yieldToMain({\n\t\t\t\t\tpriority: \"user-blocking\",\n\t\t\t\t\tcontinueAfter: \"paint\"\n\t\t\t\t});\n\t\t\t\tif (requestIndex !== localeSwitchRequestIndexRef.current) {\n\t\t\t\t\tnextRender.ignore?.();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet localeId;\n\t\t\t\tif (isString(localeOrLocaleId)) localeId = localeOrLocaleId;\n\t\t\t\telse if (isObject$1(localeOrLocaleId)) localeId = localeOrLocaleId.id;\n\t\t\t\tconst nextLocale = locales.find(({ id }) => id === localeId);\n\t\t\t\tif (!nextLocale) {\n\t\t\t\t\tnextRender.ignore?.();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst currentRouteId = currentRouteRef.current;\n\t\t\t\tconst currentRoute = routes[currentRouteId];\n\t\t\t\tif (!currentRoute) {\n\t\t\t\t\tnextRender.ignore?.();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst sitePrefix = getSitePrefix(siteCanonicalURL);\n\t\t\t\ttry {\n\t\t\t\t\tconst localeResult = await switchLocale({\n\t\t\t\t\t\tcurrentLocale: activeLocale,\n\t\t\t\t\t\tnextLocale,\n\t\t\t\t\t\troute: currentRoute,\n\t\t\t\t\t\trouteId: currentRouteId,\n\t\t\t\t\t\tdefaultLocale,\n\t\t\t\t\t\tpathVariables: currentPathVariablesRef.current,\n\t\t\t\t\t\tpreserveQueryParams,\n\t\t\t\t\t\tsitePrefix\n\t\t\t\t\t});\n\t\t\t\t\tif (!localeResult || requestIndex !== localeSwitchRequestIndexRef.current) {\n\t\t\t\t\t\tnextRender.ignore?.();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst currentPath = localeResult.path && sitePrefix + localeResult.path;\n\t\t\t\t\tconst { contentLocaleId, canonicalPathVariables } = await resolveRouteContentState({\n\t\t\t\t\t\tactiveLocale: nextLocale,\n\t\t\t\t\t\tdefaultLocale,\n\t\t\t\t\t\tcollectionUtilsCache,\n\t\t\t\t\t\tlocales,\n\t\t\t\t\t\tpathVariables: localeResult.pathVariables,\n\t\t\t\t\t\troute: currentRoute,\n\t\t\t\t\t\trouteId: currentRouteId\n\t\t\t\t\t});\n\t\t\t\t\tif (requestIndex !== localeSwitchRequestIndexRef.current) {\n\t\t\t\t\t\tnextRender.ignore?.();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tisInitialNavigationRef.current = false;\n\t\t\t\t\tcurrentLocaleIdRef.current = nextLocale.id;\n\t\t\t\t\trouterPathnameWithHashRef.current = currentPath;\n\t\t\t\t\tcurrentPathVariablesRef.current = localeResult.pathVariables;\n\t\t\t\t\tsetRouteContentState(contentLocaleId, canonicalPathVariables);\n\t\t\t\t\tconst nextPathWithFilledVariables = currentRoute.path && localeResult.pathVariables ? fillPathVariables(currentRoute.path, localeResult.pathVariables) : currentRoute.path;\n\t\t\t\t\tscheduleNavigationScroll({\n\t\t\t\t\t\trouteId: currentRouteId,\n\t\t\t\t\t\tremountKey: `${nextLocale.id}${nextPathWithFilledVariables}`,\n\t\t\t\t\t\thash: void 0,\n\t\t\t\t\t\tshouldSmoothScroll: false,\n\t\t\t\t\t\tbehavior: \"preserve-scroll-position\"\n\t\t\t\t\t});\n\t\t\t\t\tstartNavigation(() => {\n\t\t\t\t\t\tstartViewTransition(currentRouteId, currentRouteId, () => transitionFn(forceUpdate));\n\t\t\t\t\t}, nextRender, disableHistory ? void 0 : currentPath ? () => {\n\t\t\t\t\t\tpushLocaleHistoryState({\n\t\t\t\t\t\t\trouteId: currentRouteId,\n\t\t\t\t\t\t\turl: currentPath,\n\t\t\t\t\t\t\tpathVariables: localeResult.pathVariables,\n\t\t\t\t\t\t\tlocaleId: nextLocale.id,\n\t\t\t\t\t\t\tcontentLocaleId,\n\t\t\t\t\t\t\tcanonicalPathVariables\n\t\t\t\t\t\t});\n\t\t\t\t\t} : void 0, false);\n\t\t\t\t} catch {\n\t\t\t\t\tnextRender.ignore?.();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}, [\n\t\tactiveLocale,\n\t\tdefaultLocale,\n\t\tcontentLocale,\n\t\tdisableHistory,\n\t\tforceUpdate,\n\t\tlocales,\n\t\tpreserveQueryParams,\n\t\tsetRouteContentState,\n\t\troutes,\n\t\tscheduleNavigationScroll,\n\t\tstartNavigation,\n\t\tstartViewTransition,\n\t\tmonitorNextPaintAfterRender,\n\t\ttransitionFn,\n\t\tswitchLocale,\n\t\tcollectionUtilsCache,\n\t\tsiteCanonicalURL\n\t]);\n\tconst setCurrentRouteId = useCallback((routeId, localeId, hash, pathnameWithHash, pathVariables, contentLocaleId, canonicalPathVariables, isHistoryTransition, nextRender, shouldSmoothScroll, updateURL) => {\n\t\tisInitialNavigationRef.current = false;\n\t\tconst currentRouteId = currentRouteRef.current;\n\t\tconst route = routes[routeId];\n\t\tconst resolvedHash = getRouteElementId(route, hash);\n\t\tconst pathWithFilledVariables = route?.path && pathVariables ? fillPathVariables(route.path, pathVariables) : route?.path;\n\t\tcurrentRouteRef.current = routeId;\n\t\tcurrentLocaleIdRef.current = localeId;\n\t\tcurrentPathVariablesRef.current = pathVariables;\n\t\tpendingNavigationResolutionRef.current = void 0;\n\t\tsetRouteContentState(contentLocaleId, canonicalPathVariables);\n\t\trouterPathnameWithHashRef.current = pathnameWithHash;\n\t\tscheduleNavigationScroll({\n\t\t\trouteId,\n\t\t\tremountKey: `${localeId}${pathWithFilledVariables}`,\n\t\t\thash: resolvedHash,\n\t\t\tshouldSmoothScroll: shouldSmoothScroll ?? false,\n\t\t\tbehavior: isHistoryTransition ? usesCustomScrollRestoration ? \"restore-scroll-position\" : \"preserve-scroll-position\" : \"scroll-to-hash-or-top\"\n\t\t});\n\t\tif (isHistoryTransition) {\n\t\t\tcancelPendingNavigation();\n\t\t\ttransitionFn(forceUpdate);\n\t\t\treturn;\n\t\t}\n\t\tstartNavigation((signal) => {\n\t\t\tstartViewTransition(currentRouteId, routeId, () => transitionFn(forceUpdate), signal);\n\t\t}, nextRender, updateURL, true);\n\t}, [\n\t\tforceUpdate,\n\t\tsetRouteContentState,\n\t\troutes,\n\t\tusesCustomScrollRestoration,\n\t\tscheduleNavigationScroll,\n\t\tstartNavigation,\n\t\tstartViewTransition,\n\t\ttransitionFn,\n\t\tcancelPendingNavigation\n\t]);\n\tusePopStateHandler(scrollRestoration, currentRouteRef, setCurrentRouteId);\n\tuseEffect(() => {\n\t\tif (disableHistory) return;\n\t\tconst onHashChange = () => {\n\t\t\tconst currentState = readHistoryState();\n\t\t\tconst nextHash = window.location.hash === \"\" ? void 0 : window.location.hash.slice(1);\n\t\t\tif (currentState) {\n\t\t\t\tif (getRouteElementId(routes[currentState.routeId], currentState.hash) === nextHash) return;\n\t\t\t}\n\t\t\tconst stateToRepair = currentState ? currentState : getLastKnownHistoryState() ?? {\n\t\t\t\trouteId: currentRouteRef.current,\n\t\t\t\tpathVariables: currentPathVariablesRef.current,\n\t\t\t\tlocaleId: currentLocaleIdRef.current\n\t\t\t};\n\t\t\trepairHashHistoryState({\n\t\t\t\t...stateToRepair,\n\t\t\t\thash: nextHash,\n\t\t\t\tscrollPosition: void 0\n\t\t\t});\n\t\t};\n\t\twindow.addEventListener(\"hashchange\", onHashChange);\n\t\treturn () => window.removeEventListener(\"hashchange\", onHashChange);\n\t}, [disableHistory, routes]);\n\tconst navigate = useCallback(async (routeId, hash, pathVariables, shouldSmoothScroll, beforeUrlUpdate) => {\n\t\tconst newRoute = routes[routeId];\n\t\tconst routeStatus = isLazyComponentType(newRoute?.page) ? newRoute.page.getStatus() : void 0;\n\t\tconst hasRendered = routeStatus?.hasRendered;\n\t\tconst nextRender = monitorNextPaintAfterRender({\n\t\t\tcached: hasRendered,\n\t\t\tpreloaded: hasRendered ? void 0 : routeStatus?.hasLoaded\n\t\t});\n\t\tconst executeBeforeUrlUpdate = executeBeforeUrlUpdateOnce(beforeUrlUpdate);\n\t\tyieldToMain({\n\t\t\tpriority: \"background\",\n\t\t\tensureContinueBeforeUnload: true,\n\t\t\tcontinueAfter: \"paint\"\n\t\t}).then(executeBeforeUrlUpdate);\n\t\tawait yieldToMain({\n\t\t\tpriority: \"user-blocking\",\n\t\t\tcontinueAfter: \"paint\"\n\t\t});\n\t\tif (pathVariables) {\n\t\t\tconst inUse = /* @__PURE__ */ new Set();\n\t\t\tconst path = newRoute?.path ?? \"/\";\n\t\t\tfor (const match of path.matchAll(pathVariablesRegExpGlobal)) {\n\t\t\t\tconst usedVariable = match[1];\n\t\t\t\tif (usedVariable === void 0) throw new Error(\"A matching path variable should not be undefined\");\n\t\t\t\tinUse.add(usedVariable);\n\t\t\t}\n\t\t\tpathVariables = Object.fromEntries(Object.entries(pathVariables).filter(([key]) => inUse.has(key)));\n\t\t}\n\t\tconst routeElementId = getRouteElementId(newRoute, hash);\n\t\tconst sourcePathVariables = currentPathVariablesRef.current;\n\t\tconst currentRouteLocaleId = currentLocaleIdRef.current;\n\t\tif (pendingNavigationResolutionRef.current === void 0 && isSamePage({\n\t\t\trouteId: currentRouteRef.current,\n\t\t\tpathVariables: sourcePathVariables\n\t\t}, {\n\t\t\trouteId,\n\t\t\tpathVariables\n\t\t})) {\n\t\t\tconst isTargetRouteCommitPending = isNavigationCommitPending();\n\t\t\tif (isTargetRouteCommitPending) {\n\t\t\t\tconst pathWithFilledVariables = newRoute?.path && pathVariables ? fillPathVariables(newRoute.path, pathVariables) : newRoute?.path;\n\t\t\t\tscheduleNavigationScroll({\n\t\t\t\t\trouteId,\n\t\t\t\t\tremountKey: `${currentRouteLocaleId}${pathWithFilledVariables}`,\n\t\t\t\t\thash: routeElementId,\n\t\t\t\t\tshouldSmoothScroll: shouldSmoothScroll ?? false,\n\t\t\t\t\tbehavior: \"scroll-to-hash-or-top\"\n\t\t\t\t});\n\t\t\t} else cancelPendingNavigation();\n\t\t\tnextRender.ignore?.();\n\t\t\tif (!isTargetRouteCommitPending && usesCustomScrollRestoration) updateScrollForNavigation(routeElementId, shouldSmoothScroll, \"scroll-to-hash-or-top\");\n\t\t\tconst route = routes[routeId];\n\t\t\tif (!disableHistory && route) pushSamePageHashState(routeId, route, {\n\t\t\t\tcurrentRoutePath: route.path,\n\t\t\t\tcurrentRoutePathLocalized: route.pathLocalized,\n\t\t\t\tcurrentPathVariables: sourcePathVariables,\n\t\t\t\tpathVariables,\n\t\t\t\thash,\n\t\t\t\tlocaleId: currentRouteLocaleId,\n\t\t\t\tpreserveQueryParams,\n\t\t\t\tsiteCanonicalURL\n\t\t\t}, executeBeforeUrlUpdate);\n\t\t\tif (!isTargetRouteCommitPending && !usesCustomScrollRestoration) updateScrollForNavigation(routeElementId, shouldSmoothScroll, \"scroll-to-hash-or-top\");\n\t\t\treturn;\n\t\t}\n\t\tif (!newRoute) return;\n\t\tconst currentRoute = routes[currentRouteRef.current];\n\t\tconst pathnameWithHash = getSitePrefix(siteCanonicalURL) + getPathForRoute(newRoute, {\n\t\t\tcurrentRoutePath: currentRoute?.path,\n\t\t\tcurrentRoutePathLocalized: currentRoute?.pathLocalized,\n\t\t\tcurrentPathVariables: sourcePathVariables,\n\t\t\thash,\n\t\t\tpathVariables,\n\t\t\tlocaleId: currentRouteLocaleId,\n\t\t\tlocaleSlug: locales.find(({ id }) => id === currentRouteLocaleId)?.slug,\n\t\t\tpreserveQueryParams,\n\t\t\trelative: false,\n\t\t\tsiteCanonicalURL\n\t\t});\n\t\tconst navigationResolution = {};\n\t\tpendingNavigationResolutionRef.current = navigationResolution;\n\t\tconst { contentLocaleId, canonicalPathVariables } = await resolveRouteContentState({\n\t\t\tactiveLocale,\n\t\t\tdefaultLocale,\n\t\t\tcollectionUtilsCache,\n\t\t\tlocales,\n\t\t\tpathVariables,\n\t\t\troute: newRoute,\n\t\t\trouteId\n\t\t});\n\t\tif (pendingNavigationResolutionRef.current !== navigationResolution) return;\n\t\tconst updateURL = () => {\n\t\t\texecuteBeforeUrlUpdate();\n\t\t\tpushRouteState(routeId, newRoute, {\n\t\t\t\thistoryPath: pathnameWithHash,\n\t\t\t\tcurrentRoutePath: currentRoute?.path,\n\t\t\t\thash,\n\t\t\t\tpathVariables,\n\t\t\t\tcontentLocaleId,\n\t\t\t\tcanonicalPathVariables,\n\t\t\t\tlocaleId: currentRouteLocaleId\n\t\t\t});\n\t\t};\n\t\tsetCurrentRouteId(routeId, currentRouteLocaleId, hash, pathnameWithHash, pathVariables, contentLocaleId, canonicalPathVariables, false, nextRender, shouldSmoothScroll, disableHistory ? void 0 : updateURL);\n\t}, [\n\t\tcancelPendingNavigation,\n\t\troutes,\n\t\tlocales,\n\t\tsetCurrentRouteId,\n\t\tdisableHistory,\n\t\tpreserveQueryParams,\n\t\tsiteCanonicalURL,\n\t\tmonitorNextPaintAfterRender,\n\t\tusesCustomScrollRestoration,\n\t\tisNavigationCommitPending,\n\t\tscheduleNavigationScroll,\n\t\tcollectionUtilsCache,\n\t\tdefaultLocale,\n\t\tactiveLocale\n\t]);\n\tconst getRoute = useGetRouteCallback(routes);\n\tconst currentPathnameWithHash = routerPathnameWithHashRef.current;\n\tconst pageviewEventData = useSendPageView(currentRoute, currentRouteId, currentPathnameWithHash, currentPathVariables, activeLocale, initialCollectionItemId);\n\tconst isInitialNavigation = isInitialNavigationRef.current;\n\tuseRouteLocaleContentSync({\n\t\tactiveLocale,\n\t\tcontentLocale,\n\t\tcurrentPathVariables,\n\t\tcurrentRoute,\n\t\tcurrentRouteId,\n\t\tisInitialNavigation,\n\t\tlocales,\n\t\tsiteCanonicalURL\n\t});\n\tconst api = useMemo(() => ({\n\t\tnavigate,\n\t\tgetRoute,\n\t\tcurrentRouteId,\n\t\tcurrentPathVariables,\n\t\tcurrentCanonicalPathVariables,\n\t\troutes,\n\t\tcollectionUtils,\n\t\tpreserveQueryParams,\n\t\tpageviewEventData,\n\t\tsiteCanonicalURL,\n\t\tisInitialNavigation\n\t}), [\n\t\tnavigate,\n\t\tgetRoute,\n\t\tcurrentRouteId,\n\t\tcurrentPathVariables,\n\t\tcurrentCanonicalPathVariables,\n\t\troutes,\n\t\tcollectionUtils,\n\t\tpreserveQueryParams,\n\t\tsiteCanonicalURL,\n\t\tpageviewEventData,\n\t\tisInitialNavigation\n\t]);\n\tconst pathWithFilledVariables = currentRoutePath && currentPathVariables ? fillPathVariables(currentRoutePath, currentPathVariables) : currentRoutePath;\n\tconst remountKey = `${currentLocaleId}${pathWithFilledVariables}`;\n\tconst templatePageStyle = useConstant(() => ({\n\t\t...defaultPageStyle,\n\t\tdisplay: \"contents\"\n\t}));\n\treturn /* @__PURE__ */ jsx(RouterAPIProvider, {\n\t\tapi,\n\t\tchildren: /* @__PURE__ */ jsx(LocaleInfoContext.Provider, {\n\t\t\tvalue: localeInfo,\n\t\t\tchildren: /* @__PURE__ */ jsx(LayoutDirectionContext.Provider, {\n\t\t\t\tvalue: layoutDirection,\n\t\t\t\tchildren: /* @__PURE__ */ jsx(CustomCursorHost, { children: /* @__PURE__ */ jsx(URLSearchParamsProvider, {\n\t\t\t\t\trouterRenderKey: dep,\n\t\t\t\t\tisNavigationCommitPending: scrollRestoration.isNavigationCommitPending,\n\t\t\t\t\tchildren: /* @__PURE__ */ jsxs(TriggerStateProvider, {\n\t\t\t\t\t\tcurrentRoutePath: pathWithFilledVariables,\n\t\t\t\t\t\trouterAPI: api,\n\t\t\t\t\t\tchildren: [EditorBar && /* @__PURE__ */ jsx(EditorBarLauncher, {\n\t\t\t\t\t\t\tEditorBar,\n\t\t\t\t\t\t\tfast: true\n\t\t\t\t\t\t}), /* @__PURE__ */ jsx(SynchronousSuspenseErrorBoundary, { children: /* @__PURE__ */ jsxs(SuspenseThatPreservesDom, { children: [\n\t\t\t\t\t\t\t/* @__PURE__ */ jsx(MarkSuspenseEffects.Start, {}),\n\t\t\t\t\t\t\t/* @__PURE__ */ jsx(ScrollRestorationEffects, {\n\t\t\t\t\t\t\t\tcurrentRouteId,\n\t\t\t\t\t\t\t\tremountKey,\n\t\t\t\t\t\t\t\tscrollRestoration\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t/* @__PURE__ */ jsx(NotFoundErrorBoundary, {\n\t\t\t\t\t\t\t\tnotFoundPage,\n\t\t\t\t\t\t\t\tdefaultPageStyle,\n\t\t\t\t\t\t\t\trouterRenderKey: dep,\n\t\t\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(WithLayoutTemplate, {\n\t\t\t\t\t\t\t\t\tLayoutTemplate,\n\t\t\t\t\t\t\t\t\twebPageId: currentRoute?.abTestingVariantId ?? currentRouteId,\n\t\t\t\t\t\t\t\t\tstyle: defaultPageStyle,\n\t\t\t\t\t\t\t\t\tchildren: (inLayoutTemplate) => {\n\t\t\t\t\t\t\t\t\t\treturn /* @__PURE__ */ jsx(Fragment, { children: pageExistsInCurrentLocale ? renderPage(currentRoute.page, inLayoutTemplate ? templatePageStyle : defaultPageStyle) : notFoundPage && renderPage(notFoundPage, defaultPageStyle) }, remountKey);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tEditorBar && /* @__PURE__ */ jsx(EditorBarLauncher, { EditorBar }),\n\t\t\t\t\t\t\t/* @__PURE__ */ jsx(TurnOnReactEventHandling, {}),\n\t\t\t\t\t\t\t/* @__PURE__ */ jsx(MarkSuspenseEffects.End, {})\n\t\t\t\t\t\t] }) })]\n\t\t\t\t\t})\n\t\t\t\t}) })\n\t\t\t})\n\t\t})\n\t});\n}\nfunction WithLayoutTemplate({ LayoutTemplate, webPageId, style, children }) {\n\tif (!LayoutTemplate) return children(false);\n\treturn /* @__PURE__ */ jsx(LayoutTemplate, {\n\t\twebPageId,\n\t\tstyle,\n\t\tchildren\n\t});\n}\nfunction useRouteContentState({ activeLocale, currentRoute, initialCanonicalPathVariables, initialContentLocaleIdOverride, locales, routes }) {\n\tconst currentCanonicalPathVariablesRef = useRef(initialCanonicalPathVariables);\n\tconst overrideContentLocaleIdRef = useRef(initialContentLocaleIdOverride);\n\tconst overrideContentLocaleId = overrideContentLocaleIdRef.current;\n\tconst pageExistsInCurrentLocale = !activeLocale || !currentRoute.includedLocales || currentRoute.includedLocales.includes(activeLocale.id);\n\tconst contentLocale = useMemo(() => {\n\t\tif (!activeLocale) return null;\n\t\tlet contentLocaleId;\n\t\tif (pageExistsInCurrentLocale) contentLocaleId = overrideContentLocaleId ?? currentRoute?.canonicalLocaleIdByLocaleId?.[activeLocale.id];\n\t\telse contentLocaleId = Object.values(routes).find((route) => route.path && customNotFoundPagePaths.has(route.path))?.canonicalLocaleIdByLocaleId?.[activeLocale.id];\n\t\tif (!contentLocaleId) return activeLocale;\n\t\treturn locales.find(({ id }) => id === contentLocaleId) ?? activeLocale;\n\t}, [\n\t\tactiveLocale,\n\t\tcurrentRoute,\n\t\tlocales,\n\t\toverrideContentLocaleId,\n\t\tpageExistsInCurrentLocale,\n\t\troutes\n\t]);\n\tconst setRouteContentState = useCallback((contentLocaleId, canonicalPathVariables) => {\n\t\toverrideContentLocaleIdRef.current = contentLocaleId;\n\t\tcurrentCanonicalPathVariablesRef.current = canonicalPathVariables;\n\t}, []);\n\treturn {\n\t\tcontentLocale,\n\t\tcurrentCanonicalPathVariables: currentCanonicalPathVariablesRef.current,\n\t\tpageExistsInCurrentLocale,\n\t\tsetRouteContentState\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/utils/preloadImage.ts\n/** @internal */\nfunction preloadImage(url) {\n\treturn new Promise((resolve, reject) => {\n\t\ttry {\n\t\t\tnew URL(url);\n\t\t\tconst image = new Image();\n\t\t\timage.onload = () => resolve();\n\t\t\timage.onerror = reject;\n\t\t\timage.src = url;\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n}\n\n//#endregion\n//#region ../../library/src/utils/getPropertyByPath.ts\nfunction isObjectOrArray(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction getPropertyByPath(input, keyPath) {\n\tif (keyPath === \"\") return input;\n\tconst keyParts = keyPath.split(/[.[\\]]+/u).filter((part) => part.length > 0);\n\tlet current = input;\n\tfor (const part of keyParts) {\n\t\tif (!isObjectOrArray(current)) return;\n\t\tcurrent = current[part];\n\t}\n\treturn current;\n}\n\n//#endregion\n//#region ../../library/src/modules/FetchClient.tsx\nfunction getRequestCacheKey(value) {\n\treturn `${value.credentials}:${value.url}`;\n}\nconst loadingFetchResult = {\n\tstatus: \"loading\",\n\tdata: void 0\n};\nfunction isNumberString(value) {\n\treturn isString(value) && !Number.isNaN(Number(value));\n}\nfunction isValidFetchDataValueResult(type, value) {\n\tswitch (type) {\n\t\tcase \"string\": return isString(value) || isNumber(value);\n\t\tcase \"color\": return isString(value);\n\t\tcase \"boolean\": return isBoolean(value);\n\t\tcase \"number\": return isNumber(value) || isNumberString(value);\n\t\tcase \"link\":\n\t\tcase \"image\": return isString(value) && isValidURL(value, false);\n\t\tdefault: return false;\n\t}\n}\n/** @internal */\nfunction resolveFetchDataValue(result, request) {\n\tif (result.status === \"loading\") return request.fallbackValue;\n\tif (result.status === \"error\") throw result.error;\n\tconst resolvedValue = getPropertyByPath(result.data, request.resultKeyPath);\n\tif (isUndefined(resolvedValue)) throw new Error(`Key '${request.resultKeyPath}' not found in response`);\n\tif (!isValidFetchDataValueResult(request.resultOutputType, resolvedValue)) throw new Error(`Resolved value '${resolvedValue}' is not valid for type '${request.resultOutputType}'`);\n\treturn resolvedValue;\n}\nconst minimumCacheDurationMs = 5e3;\nfunction getCacheDurationMs(cacheDuration) {\n\treturn Math.max(cacheDuration * 1e3, minimumCacheDurationMs);\n}\nfunction isCacheExpired(insertionTimestamp, cacheDuration) {\n\tif (RenderTarget.current() === RenderTarget.canvas) return false;\n\tconst cacheDurationMs = getCacheDurationMs(cacheDuration);\n\treturn Date.now() >= insertionTimestamp + cacheDurationMs;\n}\nconst noop$2 = () => {};\nvar FetchClient = class FetchClient {\n\tstatic cacheKey = \"framer-fetch-client-cache\";\n\tresponseValues = /* @__PURE__ */ new Map();\n\t#subscribers = /* @__PURE__ */ new Map();\n\t#preloadedRequests = /* @__PURE__ */ new Set();\n\t#shortestCacheDurations = /* @__PURE__ */ new Map();\n\t#cachedAt = /* @__PURE__ */ new Map();\n\t#ongoingFetches = /* @__PURE__ */ new Map();\n\t#staleQueriesInterval = /* @__PURE__ */ new Map();\n\tunmount() {\n\t\tfor (const [key, interval] of this.#staleQueriesInterval) {\n\t\t\tclearInterval(interval);\n\t\t\tthis.#staleQueriesInterval.delete(key);\n\t\t}\n\t}\n\tstopQueryRefetching(request) {\n\t\tconst cacheKey = getRequestCacheKey(request);\n\t\tconst interval = this.#staleQueriesInterval.get(cacheKey);\n\t\tif (interval) {\n\t\t\tclearInterval(interval);\n\t\t\tthis.#staleQueriesInterval.delete(cacheKey);\n\t\t}\n\t}\n\t/**\n\t* Start an interval for the given request to refresh the value\n\t* depending on the shortest configured cache duration for that request.\n\t*/\n\tstartQueryRefetching(request) {\n\t\tconst cacheKey = getRequestCacheKey(request);\n\t\tconst currentIntervalForRequest = this.#staleQueriesInterval.get(cacheKey);\n\t\tconst shortestCacheDuration = this.#shortestCacheDurations.get(cacheKey);\n\t\tif (currentIntervalForRequest) return;\n\t\tif (!shortestCacheDuration) return;\n\t\tconst intervalMs = Math.min(getCacheDurationMs(shortestCacheDuration), 2 ** 31 - 1);\n\t\tconst interval = safeWindow.setInterval(() => {\n\t\t\tif (document.visibilityState === \"hidden\") return;\n\t\t\tconst cachedAt = this.#cachedAt.get(cacheKey);\n\t\t\tif (!shortestCacheDuration || !cachedAt) return;\n\t\t\tthis.fetchWithCache({\n\t\t\t\t...request,\n\t\t\t\tcacheDuration: shortestCacheDuration\n\t\t\t});\n\t\t}, intervalMs);\n\t\tthis.#staleQueriesInterval.set(cacheKey, interval);\n\t}\n\thydrateCache() {\n\t\ttry {\n\t\t\tconst rawData = localStorage.getItem(FetchClient.cacheKey);\n\t\t\tif (!rawData) return;\n\t\t\tconst data = JSON.parse(rawData);\n\t\t\tif (typeof data !== \"object\") throw new Error(\"Invalid cache data\");\n\t\t\tfor (const cacheKey in data) {\n\t\t\t\tconst cached = data[cacheKey];\n\t\t\t\tif (!Array.isArray(cached) || cached.length !== 3) throw new Error(\"Invalid cache data\");\n\t\t\t\tconst [storedAt, cacheDuration, cachedData] = cached;\n\t\t\t\tif (isCacheExpired(storedAt, cacheDuration)) continue;\n\t\t\t\tthis.#cachedAt.set(cacheKey, storedAt);\n\t\t\t\tthis.#shortestCacheDurations.set(cacheKey, cacheDuration);\n\t\t\t\tthis.responseValues.set(cacheKey, {\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\tdata: cachedData\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tlocalStorage.removeItem(FetchClient.cacheKey);\n\t\t\t} catch {}\n\t\t}\n\t}\n\tsetResponseValue(cacheKey, value) {\n\t\tthis.responseValues.set(cacheKey, value);\n\t\tthis.persistCache();\n\t\tconst subscribers = this.#subscribers.get(cacheKey);\n\t\tif (!subscribers) return;\n\t\tfor (const subscriber of subscribers) subscriber();\n\t}\n\tpersistCache = debounce(() => {\n\t\tconst data = {};\n\t\tfor (const [url, responseValue] of this.responseValues) {\n\t\t\tif (!responseValue) continue;\n\t\t\tif (responseValue.status !== \"success\") continue;\n\t\t\tconst cacheConfig = this.#shortestCacheDurations.get(url);\n\t\t\tif (!cacheConfig || cacheConfig === 0) continue;\n\t\t\tconst storedAt = this.#cachedAt.get(url);\n\t\t\tif (!storedAt) continue;\n\t\t\tif (storedAt && isCacheExpired(storedAt, cacheConfig)) continue;\n\t\t\tdata[url] = [\n\t\t\t\tstoredAt,\n\t\t\t\tcacheConfig,\n\t\t\t\tresponseValue.data\n\t\t\t];\n\t\t}\n\t\ttry {\n\t\t\tlocalStorage.setItem(FetchClient.cacheKey, JSON.stringify(data));\n\t\t} catch {}\n\t}, 500);\n\tasync prefetch(request) {\n\t\tif (!isBrowser$1()) return;\n\t\tif (!isValidURL(request.url, false)) return;\n\t\tconst cacheKey = getRequestCacheKey(request);\n\t\tthis.#preloadedRequests.add(cacheKey);\n\t\tawait this.fetchWithCache(request);\n\t\tconst result = this.getValue(cacheKey);\n\t\tif (!result || result.status === \"loading\") throw new Error(\"Unexpected result status for prefetch\");\n\t\tconst subscribers = this.#subscribers.get(cacheKey);\n\t\tfor (const subscriber of subscribers ?? []) subscriber();\n\t\tconst resolvedValue = resolveFetchDataValue(result, request);\n\t\tif (request.resultOutputType === \"image\" && isString(resolvedValue)) await preloadImage(resolvedValue).catch(noop$2);\n\t\treturn resolvedValue;\n\t}\n\tasync fetchWithCache(request) {\n\t\tif (!isBrowser$1()) return;\n\t\tconst cacheKey = getRequestCacheKey(request);\n\t\tconst ongoingFetch = this.#ongoingFetches.get(cacheKey);\n\t\tif (ongoingFetch) return ongoingFetch;\n\t\tconst cachedAt = this.#cachedAt.get(cacheKey);\n\t\tconst hasExpiredCache = cachedAt && isCacheExpired(cachedAt, request.cacheDuration);\n\t\tif (this.responseValues.has(cacheKey) && !hasExpiredCache) return;\n\t\tif (!this.responseValues.get(cacheKey)) this.setResponseValue(cacheKey, loadingFetchResult);\n\t\tconst doFetch = async () => {\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(request.url, {\n\t\t\t\t\tmethod: \"GET\",\n\t\t\t\t\tcredentials: request.credentials\n\t\t\t\t});\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\tthis.setResponseValue(cacheKey, {\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\terror: /* @__PURE__ */ new Error(\"Invalid Response Status\"),\n\t\t\t\t\t\tdata: void 0\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst value = await response.json();\n\t\t\t\tthis.setResponseValue(cacheKey, {\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\tdata: value\n\t\t\t\t});\n\t\t\t\tthis.#cachedAt.set(cacheKey, Date.now());\n\t\t\t} catch (error) {\n\t\t\t\tthis.setResponseValue(cacheKey, {\n\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\terror,\n\t\t\t\t\tdata: void 0\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\tconst promise = doFetch();\n\t\tthis.#ongoingFetches.set(cacheKey, promise);\n\t\tpromise.finally(() => {\n\t\t\tthis.#ongoingFetches.delete(cacheKey);\n\t\t});\n\t\treturn promise;\n\t}\n\tgetValue(cacheKey, onlyIfPrefetched = false) {\n\t\tif (onlyIfPrefetched && !this.#preloadedRequests.has(cacheKey)) return void 0;\n\t\treturn this.responseValues.get(cacheKey);\n\t}\n\tsubscribe(request, callback, skipFetchRequest = false) {\n\t\tconst { url, cacheDuration } = request;\n\t\tif (!isValidURL(url, false)) return noop$2;\n\t\tconst cacheKey = getRequestCacheKey(request);\n\t\tconst cacheDurationForUrl = this.#shortestCacheDurations.get(cacheKey);\n\t\tif (!cacheDurationForUrl || cacheDuration < cacheDurationForUrl) this.#shortestCacheDurations.set(cacheKey, cacheDuration);\n\t\tif (!skipFetchRequest) {\n\t\t\tthis.startQueryRefetching(request);\n\t\t\tthis.fetchWithCache(request);\n\t\t}\n\t\tconst subscribers = this.#subscribers.get(cacheKey) ?? /* @__PURE__ */ new Set();\n\t\tsubscribers.add(callback);\n\t\tthis.#subscribers.set(cacheKey, subscribers);\n\t\treturn () => {\n\t\t\tconst nextSubscribers = this.#subscribers.get(cacheKey);\n\t\t\tif (!nextSubscribers) return;\n\t\t\tnextSubscribers.delete(callback);\n\t\t\tif (nextSubscribers.size === 0) {\n\t\t\t\tthis.#subscribers.delete(cacheKey);\n\t\t\t\tthis.stopQueryRefetching(request);\n\t\t\t}\n\t\t};\n\t}\n};\nconst FetchClientContext = /* @__PURE__ */ React$1.createContext(void 0);\nconst IsRestoringCacheContext = /* @__PURE__ */ React$1.createContext(true);\nconst FetchClientProvider = ({ children, client: initialClient }) => {\n\tconst [client] = React$1.useState(() => initialClient ?? new FetchClient());\n\tconst [isRestoring, setIsRestoring] = React$1.useState(true);\n\tReact$1.useEffect(() => {\n\t\tclient.hydrateCache();\n\t\tReact$1.startTransition(() => {\n\t\t\tsetIsRestoring(false);\n\t\t});\n\t\treturn () => client.unmount();\n\t}, [client]);\n\treturn /* @__PURE__ */ jsx(IsRestoringCacheContext.Provider, {\n\t\tvalue: isRestoring,\n\t\tchildren: /* @__PURE__ */ jsx(FetchClientContext.Provider, {\n\t\t\tvalue: client,\n\t\t\tchildren\n\t\t})\n\t});\n};\n/**\n* The RequestsObserver is used to track the state of a list of fetch requests.\n* It combines the results into a stable identity and notifies subscribers when\n* any of the requests changee.\n*/\nvar RequestsObserver = class {\n\tclient;\n\trequests;\n\t#subscriptions = /* @__PURE__ */ new Map();\n\t#subscribers = /* @__PURE__ */ new Set();\n\t#results;\n\t#SSRResults;\n\t#onlyPrefetched = true;\n\tconstructor(client, requests) {\n\t\tthis.client = client;\n\t\tthis.requests = requests;\n\t\tthis.setRequests(requests, { onlyPrefetched: true });\n\t\tthis.#SSRResults = {\n\t\t\tstatus: \"loading\",\n\t\t\tdata: requests.map((request) => request.fallbackValue)\n\t\t};\n\t\tthis.#results = this.#SSRResults;\n\t}\n\tsetRequests(requests, { onlyPrefetched = false }) {\n\t\tconst lastRequests = this.requests;\n\t\tthis.requests = requests;\n\t\tconst requestsByCacheKey = new Map(requests.map((request) => [getRequestCacheKey(request), request]));\n\t\tconst nextSubscribedKeys = Array.from(requestsByCacheKey.keys());\n\t\tconst hasOnlyPrefetchedChange = this.#onlyPrefetched !== onlyPrefetched;\n\t\tif (!onlyPrefetched) this.#onlyPrefetched = false;\n\t\tif (!(nextSubscribedKeys.length !== this.#subscriptions.size || nextSubscribedKeys.some((url) => !this.#subscriptions.has(url))) && !hasOnlyPrefetchedChange) {\n\t\t\tif (!isEqual(lastRequests, requests)) this.updateResults();\n\t\t\treturn;\n\t\t}\n\t\tfor (const url of this.#subscriptions.keys()) {\n\t\t\tthis.#subscriptions.get(url)?.();\n\t\t\tthis.#subscriptions.delete(url);\n\t\t}\n\t\tfor (const cacheKey of nextSubscribedKeys) {\n\t\t\tconst requestConfig = requestsByCacheKey.get(cacheKey);\n\t\t\tif (!requestConfig) continue;\n\t\t\tconst unsubscribe = this.client.subscribe(requestConfig, this.updateResults, onlyPrefetched);\n\t\t\tthis.#subscriptions.set(cacheKey, unsubscribe);\n\t\t}\n\t\tif (this.#subscribers.size === 0) return;\n\t\tthis.updateResults();\n\t}\n\tupdateResults = () => {\n\t\tconst data = [];\n\t\tconst statuses = /* @__PURE__ */ new Set();\n\t\tconst errors = [];\n\t\tfor (const request of this.requests) {\n\t\t\tconst cachekey = getRequestCacheKey(request);\n\t\t\tconst value = this.client.getValue(cachekey, this.#onlyPrefetched);\n\t\t\tif (!value) {\n\t\t\t\tstatuses.add(\"loading\");\n\t\t\t\tdata.push(request.fallbackValue);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstatuses.add(value.status);\n\t\t\ttry {\n\t\t\t\tconst resolvedValue = resolveFetchDataValue(value, request);\n\t\t\t\tdata.push(resolvedValue);\n\t\t\t} catch (error) {\n\t\t\t\tdata.push(!isUndefined(request.errorFallbackValue) ? request.errorFallbackValue : request.fallbackValue);\n\t\t\t\terrors.push(error);\n\t\t\t}\n\t\t}\n\t\tconst result = {\n\t\t\tstatus: statuses.has(\"error\") ? \"error\" : statuses.has(\"loading\") ? \"loading\" : \"success\",\n\t\t\tdata\n\t\t};\n\t\tif (!isEqual(result, this.#results)) {\n\t\t\tthis.#results = result;\n\t\t\tif (errors.length > 0 && !statuses.has(\"loading\") && this.#subscribers.size > 0) console.error(\"Fetch failed: \" + errors.join(\"\\n\"));\n\t\t}\n\t\tfor (const subscriber of this.#subscribers) subscriber();\n\t};\n\tunmount() {\n\t\tfor (const unsubscribe of this.#subscribers) unsubscribe();\n\t\tfor (const unsubscribe of this.#subscriptions.values()) unsubscribe();\n\t}\n\tsubscribe = (callback) => {\n\t\tthis.#subscribers.add(callback);\n\t\tthis.updateResults();\n\t\treturn () => {\n\t\t\tthis.#subscribers.delete(callback);\n\t\t};\n\t};\n\tgetServerResults = () => {\n\t\treturn this.#SSRResults;\n\t};\n\tgetResults = () => {\n\t\treturn this.#results;\n\t};\n};\nfunction useFetchRequestsForChildren(requests, disabled, children) {\n\tconst fetchClient = React$1.useContext(FetchClientContext);\n\tif (!fetchClient) throw new Error(\"useFetchRequest must be used within a FetchClientProvider\");\n\tconst isRestoringCache = React$1.useContext(IsRestoringCacheContext);\n\tconst [observer] = React$1.useState(() => new RequestsObserver(fetchClient, requests));\n\tReact$1.useLayoutEffect(() => {\n\t\tif (disabled) return;\n\t\tobserver.setRequests(requests, { onlyPrefetched: false });\n\t}, [\n\t\trequests,\n\t\tobserver,\n\t\tdisabled\n\t]);\n\tReact$1.useEffect(() => {\n\t\treturn () => observer.unmount();\n\t}, [observer]);\n\tconst subscribe = React$1.useCallback((onChange) => {\n\t\tif (isRestoringCache || disabled) return noop$2;\n\t\treturn observer.subscribe(onChange);\n\t}, [\n\t\tdisabled,\n\t\tobserver,\n\t\tisRestoringCache\n\t]);\n\tconst synchronousData = React$1.useSyncExternalStore(subscribe, observer.getResults, observer.getServerResults);\n\tconst deferredData = React$1.useDeferredValue(synchronousData);\n\treturn useMemoOne(() => children(deferredData.data, deferredData.status), [deferredData, children]);\n}\nfunction usePrefetch() {\n\tconst fetchClient = React$1.useContext(FetchClientContext);\n\tif (!fetchClient) throw new Error(\"useFetchRequest must be used within a FetchClientProvider\");\n\treturn React$1.useCallback((request) => fetchClient.prefetch(request), [fetchClient]);\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/ServerDatabaseClientContext.tsx\nconst ServerDatabaseClientContext = /* @__PURE__ */ (() => {\n\tconst Context = createContext(void 0);\n\tContext.displayName = \"ServerDatabaseClientContext\";\n\treturn Context;\n})();\nfunction ServerDatabaseClientProvider({ client, children }) {\n\treturn /* @__PURE__ */ jsx(ServerDatabaseClientContext.Provider, {\n\t\tvalue: client,\n\t\tchildren\n\t});\n}\nfunction useServerDatabaseClient() {\n\tconst client = useContext(ServerDatabaseClientContext);\n\tassert$1(client, \"Missing ServerDatabaseClient\");\n\treturn client;\n}\n\n//#endregion\n//#region ../../library/src/modules/PageRoot.tsx\nMotionGlobalConfig.WillChange = class extends WillChangeMotionValue {\n\tadd(name) {\n\t\tif (name === \"backgroundColor\") return;\n\t\tsuper.add(name);\n\t}\n};\n/**\n* @description Router Component\n* Safari iOS has a weird bug that will make `font-size` scale-up in the presence\n* of a unit width/height + `overflow: hidden` + an element in the DOM that has\n* opacity 0 and is set to opacity 1 in JS, just like in the case of our effects\n* with Motion. We set the width of published sites to auto to fix the issue. It\n* must explicitly be set on published sites because the same fix brakes the\n* preview.\n* Webkit issue: https://bugs.webkit.org/show_bug.cgi?id=240653\n* */\n/** @public */\nfunction PageRoot(props) {\n\tconst { RootComponent, isWebsite, environment, routeId, framerSiteId, pathVariables, canonicalPathVariables, routes, collectionUtils, serverDatabaseClient, notFoundPage, isReducedMotion = false, skipAnimations = false, includeDataObserver = false, localeId, locales, preserveQueryParams, EditorBar, defaultPageStyle, disableHistory, LayoutTemplate, siteCanonicalURL, adaptLayoutToTextDirection, loadSnippetsModule, initialCollectionItemId, initialContentLocaleIdOverride } = props;\n\tReact.useEffect(() => {\n\t\tif (isWebsite) return;\n\t\tMainLoop.start();\n\t}, []);\n\tif (isWebsite) return /* @__PURE__ */ jsx(RenderTargetEnvironmentProvider, {\n\t\tvalue: environment ?? \"preview\",\n\t\tchildren: /* @__PURE__ */ jsx(MotionConfig, {\n\t\t\treducedMotion: skipAnimations ? \"always\" : isReducedMotion ? \"user\" : \"never\",\n\t\t\tskipAnimations,\n\t\t\tchildren: /* @__PURE__ */ jsx(CollectionUtilsCacheProvider, {\n\t\t\t\tcollectionUtils,\n\t\t\t\tchildren: /* @__PURE__ */ jsx(ServerDatabaseClientProvider, {\n\t\t\t\t\tclient: serverDatabaseClient,\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(FetchClientProvider, { children: /* @__PURE__ */ jsx(FormContext.Provider, {\n\t\t\t\t\t\tvalue: framerSiteId,\n\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(SnippetsProvider, {\n\t\t\t\t\t\t\tloadSnippetsModule,\n\t\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(Router, {\n\t\t\t\t\t\t\t\tinitialRoute: routeId,\n\t\t\t\t\t\t\t\tinitialPathVariables: pathVariables,\n\t\t\t\t\t\t\t\tinitialCanonicalPathVariables: canonicalPathVariables,\n\t\t\t\t\t\t\t\tinitialLocaleId: localeId,\n\t\t\t\t\t\t\t\tinitialCollectionItemId,\n\t\t\t\t\t\t\t\tinitialContentLocaleIdOverride,\n\t\t\t\t\t\t\t\troutes,\n\t\t\t\t\t\t\t\tcollectionUtils,\n\t\t\t\t\t\t\t\tnotFoundPage,\n\t\t\t\t\t\t\t\tlocales,\n\t\t\t\t\t\t\t\tdefaultPageStyle: defaultPageStyle ?? {\n\t\t\t\t\t\t\t\t\tminHeight: \"100vh\",\n\t\t\t\t\t\t\t\t\twidth: \"auto\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tpreserveQueryParams,\n\t\t\t\t\t\t\t\tEditorBar,\n\t\t\t\t\t\t\t\tdisableHistory,\n\t\t\t\t\t\t\t\tLayoutTemplate,\n\t\t\t\t\t\t\t\tsiteCanonicalURL,\n\t\t\t\t\t\t\t\tadaptLayoutToTextDirection\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t})\n\t\t\t\t\t}) })\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t});\n\telse {\n\t\tconst Wrapper = includeDataObserver ? DataObserver : React.Fragment;\n\t\treturn /* @__PURE__ */ jsx(Wrapper, { children: /* @__PURE__ */ jsx(RoutesProvider, {\n\t\t\troutes,\n\t\t\tchildren: /* @__PURE__ */ jsx(NavigationExport, { children: React.isValidElement(RootComponent) ? RootComponent : React.createElement(RootComponent, { key: routeId }) })\n\t\t}) });\n\t}\n}\n\n//#endregion\n//#region ../../library/src/modules/ResolveLinks.tsx\n/**\n* Resolves every link visited by a synchronous callback. The callback owns the\n* structure of the returned value, while this hook batches slug loading and\n* suspends until every link can be resolved.\n* @public\n*/\nfunction useResolveLinks(resolve, dependencies) {\n\tconst router = useRouter();\n\tconst { activeLocale } = useLocaleInfo();\n\tconst resolveSlugsWithSuspense = useResolveSlugsWithSuspense();\n\treturn useMemoOne(() => {\n\t\tconst promises = [];\n\t\tconst resolveLink = (link) => {\n\t\t\tif (!link) return void 0;\n\t\t\tif (isString(link) || isLinkToWebPage(link)) return resolveLinkInternal(link, router, void 0, void 0, activeLocale, resolveSlugs);\n\t\t\treturn resolveLinkInternal(link.href, router, link.implicitPathVariables, link.refKey, activeLocale, resolveSlugs);\n\t\t};\n\t\tfunction resolveSlugs(unresolvedPathSlugs, unresolvedHashSlugs) {\n\t\t\treturn resolveSlugsWithSuspense(unresolvedPathSlugs, unresolvedHashSlugs, activeLocale, promises);\n\t\t}\n\t\tconst resolvedValue = resolve(resolveLink);\n\t\tif (promises.length > 0) throw Promise.allSettled(promises);\n\t\treturn resolvedValue;\n\t}, [\n\t\trouter,\n\t\tactiveLocale,\n\t\tresolveSlugsWithSuspense,\n\t\t...dependencies\n\t]);\n}\n/**\n* The ResolveLinks component is given an array of links that have unresolved\n* slug values. The component is responsible for loading the slug values in\n* parallel and suspending until all the values are resolved.\n*\n* During code generation, all links with unresolved slugs will be collected\n* separately and wrapped into a ResolveLinks component. A function as child\n* pattern is used to provide a binding to access the resolved versions of the\n* links.\n* @public\n*/\nconst ResolveLinks = /* @__PURE__ */ withChildrenCanSuspend(/* @__PURE__ */ forwardRef(function ResolveLinksInner({ links, children, ...rest }, ref) {\n\treturn useCloneChildrenWithPropsAndRef(ref)(children(useResolveLinks((resolveLink) => links.map(resolveLink), [links])), rest);\n}));\n\n//#endregion\n//#region ../../library/src/modules/Fetcher.tsx\nconst Fetcher = /* @__PURE__ */ React$1.forwardRef(function Fetcher({ requests, disabled, children, ...rest }, ref) {\n\treturn useCloneChildrenWithPropsAndRef(ref)(useFetchRequestsForChildren(requests, disabled, children), rest);\n});\n\n//#endregion\n//#region ../../library/src/modules/callEach.ts\n/**\n* @internal\n*/\nconst callEach = (...fns) => fns.forEach((fn) => fn?.());\n\n//#endregion\n//#region ../../library/src/utils/getLogger.ts\nfunction getLogger(name) {\n\treturn {\n\t\ttrace(...args) {\n\t\t\treturn runtime.getLogger(name)?.trace(...args);\n\t\t},\n\t\tdebug(...args) {\n\t\t\treturn runtime.getLogger(name)?.debug(...args);\n\t\t},\n\t\tinfo(...args) {\n\t\t\treturn runtime.getLogger(name)?.info(...args);\n\t\t},\n\t\twarn(...args) {\n\t\t\treturn runtime.getLogger(name)?.warn(...args);\n\t\t},\n\t\terror(...args) {\n\t\t\treturn runtime.getLogger(name)?.error(...args);\n\t\t},\n\t\tget enabled() {\n\t\t\treturn runtime.getLogger(name) !== void 0;\n\t\t}\n\t};\n}\n\n//#endregion\n//#region ../../shared/src/getSymbolDispose.ts\n/**\n* Safari has no native `Symbol.dispose`, and third-party scripts install their own — Google Identity\n* Services uses a unique `Symbol(\"n\")`, esbuild's lowered `using` helper uses the registry symbol. So\n* resolve it on every use rather than once per module: the lowered helper reads `Symbol.dispose` when\n* the scope is entered, and only a read made at that same moment is guaranteed to return the same\n* symbol, whichever script defined it. A module-level constant can be a whole page load older, and\n* then disposal throws \"Object not disposable\".\n*\n* Computed keys must use this too. `[Symbol.dispose]` is `[undefined]` in Safari, so esbuild's\n* `__using` helper looks up `Symbol.for(\"Symbol.dispose\")` and throws \"Object not disposable\".\n*/\nfunction getSymbolDispose() {\n\tif (!Symbol.dispose) Object.defineProperty(Symbol, \"dispose\", {\n\t\tvalue: Symbol.for(\"Symbol.dispose\"),\n\t\twritable: false,\n\t\tenumerable: false,\n\t\tconfigurable: false\n\t});\n\treturn Symbol.dispose;\n}\n\n//#endregion\n//#region \\0@oxc-project+runtime@0.154.0/helpers/esm/usingCtx.js\nfunction _usingCtx() {\n\tvar r = \"function\" == typeof SuppressedError ? SuppressedError : function(r, e) {\n\t\tvar n = Error();\n\t\treturn n.name = \"SuppressedError\", n.error = r, n.suppressed = e, n;\n\t}, e = {}, n = [];\n\tfunction using(r, e) {\n\t\tif (null != e) {\n\t\t\tif (Object(e) !== e) throw new TypeError(\"using declarations can only be used with objects, functions, null, or undefined.\");\n\t\t\tif (r) var o = e[Symbol.asyncDispose || Symbol[\"for\"](\"Symbol.asyncDispose\")];\n\t\t\tif (void 0 === o && (o = e[Symbol.dispose || Symbol[\"for\"](\"Symbol.dispose\")], r)) var t = o;\n\t\t\tif (\"function\" != typeof o) throw new TypeError(\"Object is not disposable.\");\n\t\t\tt && (o = function o() {\n\t\t\t\ttry {\n\t\t\t\t\tt.call(e);\n\t\t\t\t} catch (r) {\n\t\t\t\t\treturn Promise.reject(r);\n\t\t\t\t}\n\t\t\t}), n.push({\n\t\t\t\tv: e,\n\t\t\t\td: o,\n\t\t\t\ta: r\n\t\t\t});\n\t\t} else r && n.push({\n\t\t\td: e,\n\t\t\ta: r\n\t\t});\n\t\treturn e;\n\t}\n\treturn {\n\t\te,\n\t\tu: using.bind(null, !1),\n\t\ta: using.bind(null, !0),\n\t\td: function d() {\n\t\t\tvar o, t = this.e, s = 0;\n\t\t\tfunction next() {\n\t\t\t\tfor (; o = n.pop();) try {\n\t\t\t\t\tif (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);\n\t\t\t\t\tif (o.d) {\n\t\t\t\t\t\tvar r = o.d.call(o.v);\n\t\t\t\t\t\tif (o.a) return s |= 2, Promise.resolve(r).then(next, err);\n\t\t\t\t\t} else s |= 1;\n\t\t\t\t} catch (r) {\n\t\t\t\t\treturn err(r);\n\t\t\t\t}\n\t\t\t\tif (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();\n\t\t\t\tif (t !== e) throw t;\n\t\t\t}\n\t\t\tfunction err(n) {\n\t\t\t\treturn t = t !== e ? new r(n, t) : n, next();\n\t\t\t}\n\t\t\treturn next();\n\t\t}\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Evaluate.ts\nlet activeEvaluationContext = {\n\tpriority: void 0,\n\tcanYield: true\n};\n/** Returns the priority source active while the current generator step is running. */\nfunction getEvaluationContextPriority() {\n\treturn activeEvaluationContext.priority;\n}\nfunction evaluationContextScope(context) {\n\tconst previousContext = activeEvaluationContext;\n\tactiveEvaluationContext = context;\n\treturn { [getSymbolDispose()]() {\n\t\tactiveEvaluationContext = previousContext;\n\t} };\n}\n/** Yields only when the current query was explicitly assigned a scheduler priority. */\nfunction yieldToMainDuringEvaluation(priority = activeEvaluationContext.priority, allowCooperativeYield = activeEvaluationContext.canYield) {\n\tif (!allowCooperativeYield || priority === void 0) return;\n\tconst resolvedPriority = resolveSchedulerPriority(priority);\n\treturn yieldToMain({\n\t\tbatch: true,\n\t\tpriority: resolvedPriority\n\t});\n}\n/**\n* Runs a generator and returns the final value. Throws an error if the\n* generator yields.\n*/\nfunction evaluateSync(generator) {\n\ttry {\n\t\tvar _usingCtx$1 = _usingCtx();\n\t\t_usingCtx$1.u(evaluationContextScope({\n\t\t\tpriority: activeEvaluationContext.priority,\n\t\t\tcanYield: false\n\t\t}));\n\t\tconst state = generator.next();\n\t\tassert$1(state.done, \"Generator must not yield\");\n\t\treturn state.value;\n\t} catch (_) {\n\t\t_usingCtx$1.e = _;\n\t} finally {\n\t\t_usingCtx$1.d();\n\t}\n}\n/**\n* Runs a generator and returns the final value. Any value yielded by the\n* generator will be awaited and returned to the generator.\n*/\nasync function evaluateAsync(generator, state, priority = activeEvaluationContext.priority, allowCooperativeYield = activeEvaluationContext.canYield) {\n\tconst context = {\n\t\tpriority,\n\t\tcanYield: allowCooperativeYield\n\t};\n\tlet currentState = state;\n\tif (currentState === void 0) try {\n\t\tvar _usingCtx3 = _usingCtx();\n\t\t_usingCtx3.u(evaluationContextScope(context));\n\t\tcurrentState = generator.next();\n\t} catch (_) {\n\t\t_usingCtx3.e = _;\n\t} finally {\n\t\t_usingCtx3.d();\n\t}\n\twhile (!currentState.done) try {\n\t\tvar _usingCtx4 = _usingCtx();\n\t\tconst value = await currentState.value;\n\t\tconst yieldPromise = yieldToMainDuringEvaluation(priority, allowCooperativeYield);\n\t\tif (yieldPromise) await yieldPromise;\n\t\t_usingCtx4.u(evaluationContextScope(context));\n\t\tcurrentState = generator.next(value);\n\t} catch (_) {\n\t\t_usingCtx4.e = _;\n\t} finally {\n\t\t_usingCtx4.d();\n\t}\n\treturn currentState.value;\n}\n/**\n* Runs a generator and returns the final value. Returns a promise if the generator yields.\n* Otherwise returns the final value directly.\n*/\nfunction evaluateMaybeAsync(generator, priority = activeEvaluationContext.priority, allowCooperativeYield = activeEvaluationContext.canYield) {\n\ttry {\n\t\tvar _usingCtx5 = _usingCtx();\n\t\t_usingCtx5.u(evaluationContextScope({\n\t\t\tpriority,\n\t\t\tcanYield: allowCooperativeYield\n\t\t}));\n\t\tconst state = generator.next();\n\t\tif (state.done) return state.value;\n\t\treturn evaluateAsync(generator, state, priority, allowCooperativeYield);\n\t} catch (_) {\n\t\t_usingCtx5.e = _;\n\t} finally {\n\t\t_usingCtx5.d();\n\t}\n}\n/**\n* Runs multiple generators inside an object concurrently and returns a new\n* object with the returned values.\n*/\nfunction* evaluateObject(values, priority = activeEvaluationContext.priority) {\n\tconst result = {};\n\tconst keys = Object.keys(values);\n\tconst promises = [];\n\tfor (const key of keys) {\n\t\tconst generator = values[key];\n\t\tif (isGenerator$1(generator)) {\n\t\t\tconst state = generator.next();\n\t\t\tif (state.done) result[key] = state.value;\n\t\t\telse promises.push(evaluateAsync(generator, state, priority).then((value) => {\n\t\t\t\tresult[key] = value;\n\t\t\t}));\n\t\t} else result[key] = generator;\n\t}\n\tif (promises.length > 0) yield Promise.all(promises);\n\treturn result;\n}\n/**\n* Runs multiple generators inside an array concurrently and returns a new array\n* with the returned values.\n*/\nfunction* evaluateArray(values, priority = activeEvaluationContext.priority) {\n\tconst result = [];\n\tconst keys = values.keys();\n\tconst promises = [];\n\tfor (const key of keys) {\n\t\tconst yieldPromise = yieldToMainDuringEvaluation(priority);\n\t\tif (yieldPromise) yield yieldPromise;\n\t\tconst generator = values[key];\n\t\tif (isGenerator$1(generator)) {\n\t\t\tconst state = generator.next();\n\t\t\tif (state.done) result[key] = state.value;\n\t\t\telse promises.push(evaluateAsync(generator, state, priority).then((value) => {\n\t\t\t\tresult[key] = value;\n\t\t\t}));\n\t\t} else result[key] = generator;\n\t}\n\tif (promises.length > 0) yield Promise.all(promises);\n\treturn result;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/types.ts\nfunction isAnyCollection(value) {\n\treturn isAnyLegacyCollection(value) || isAnyDatabaseCollection(value);\n}\nfunction isLegacyCollection(value) {\n\treturn isArray(value) && value.every(isObject$1);\n}\nfunction isLegacyLocalizedCollection(value) {\n\treturn isObject$1(value) && isFunction(value.read) && isFunction(value.preload);\n}\nfunction isAnyLegacyCollection(value) {\n\treturn isLegacyCollection(value) || isLegacyLocalizedCollection(value);\n}\nfunction isDatabaseCollection(value) {\n\treturn isObject$1(value) && isObject$1(value.schema);\n}\nfunction isLocalizedDatabaseCollection(value) {\n\treturn isObject$1(value) && isObject$1(value.collectionByLocaleId);\n}\nfunction isAnyDatabaseCollection(value) {\n\treturn isDatabaseCollection(value) || isLocalizedDatabaseCollection(value);\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/DatabaseValue.ts\nfunction compareArray(left, right, collation) {\n\tconst leftLength = left.value.length;\n\tconst rightLength = right.value.length;\n\tif (leftLength < rightLength) return -1;\n\tif (leftLength > rightLength) return 1;\n\tfor (let i = 0; i < leftLength; i++) {\n\t\tconst leftItem = left.value[i];\n\t\tconst rightItem = right.value[i];\n\t\tconst result = compare(leftItem, rightItem, collation);\n\t\tif (result !== 0) return result;\n\t}\n\treturn 0;\n}\nfunction castArray(value, definition) {\n\tswitch (value?.type) {\n\t\tcase \"array\": {\n\t\t\tconst result = value.value.map((item) => {\n\t\t\t\treturn DatabaseValue.cast(item, definition.definition);\n\t\t\t});\n\t\t\treturn {\n\t\t\t\ttype: \"array\",\n\t\t\t\tvalue: result\n\t\t\t};\n\t\t}\n\t}\n\treturn null;\n}\nfunction compareBoolean(left, right) {\n\tif (left.value < right.value) return -1;\n\tif (left.value > right.value) return 1;\n\treturn 0;\n}\nfunction castBoolean(value) {\n\tswitch (value?.type) {\n\t\tcase \"boolean\": return value;\n\t\tcase \"number\":\n\t\tcase \"string\": return {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: Boolean(value.value)\n\t\t};\n\t}\n\treturn null;\n}\nfunction valueToBoolean(value) {\n\treturn castBoolean(value)?.value ?? false;\n}\nfunction compareColor(left, right) {\n\tif (left.value < right.value) return -1;\n\tif (left.value > right.value) return 1;\n\treturn 0;\n}\nfunction castColor(value) {\n\tswitch (value?.type) {\n\t\tcase \"color\": return value;\n\t}\n\treturn null;\n}\nfunction compareDate(left, right) {\n\tconst leftDate = new Date(left.value);\n\tconst rightDate = new Date(right.value);\n\tif (leftDate < rightDate) return -1;\n\tif (leftDate > rightDate) return 1;\n\treturn 0;\n}\nfunction castDate(value) {\n\tswitch (value?.type) {\n\t\tcase \"date\": return value;\n\t\tcase \"number\":\n\t\tcase \"string\": {\n\t\t\tconst date = new Date(value.value);\n\t\t\tif (isValidDate(date)) return {\n\t\t\t\ttype: \"date\",\n\t\t\t\tvalue: date.toISOString()\n\t\t\t};\n\t\t\treturn null;\n\t\t}\n\t}\n\treturn null;\n}\nfunction compareEnum(left, right) {\n\tif (left.value < right.value) return -1;\n\tif (left.value > right.value) return 1;\n\treturn 0;\n}\nfunction castEnum(value) {\n\tswitch (value?.type) {\n\t\tcase \"enum\": return value;\n\t\tcase \"string\": return {\n\t\t\ttype: \"enum\",\n\t\t\tvalue: value.value\n\t\t};\n\t}\n\treturn null;\n}\nfunction compareFile(left, right) {\n\tif (left.value < right.value) return -1;\n\tif (left.value > right.value) return 1;\n\treturn 0;\n}\nfunction castFile(value) {\n\tswitch (value?.type) {\n\t\tcase \"file\": return value;\n\t}\n\treturn null;\n}\nfunction compareLink(left, right) {\n\tconst leftEncoded = JSON.stringify(left.value);\n\tconst rightEncoded = JSON.stringify(right.value);\n\tif (leftEncoded < rightEncoded) return -1;\n\tif (leftEncoded > rightEncoded) return 1;\n\treturn 0;\n}\nfunction castLink(value) {\n\tswitch (value?.type) {\n\t\tcase \"link\": return value;\n\t\tcase \"string\": try {\n\t\t\tconst { protocol } = new URL(value.value);\n\t\t\tif (protocol === \"http:\" || protocol === \"https:\") return {\n\t\t\t\ttype: \"link\",\n\t\t\t\tvalue: value.value\n\t\t\t};\n\t\t\treturn null;\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t}\n\treturn null;\n}\nfunction compareNumber(left, right) {\n\tif (left.value < right.value) return -1;\n\tif (left.value > right.value) return 1;\n\treturn 0;\n}\nfunction castNumber(value) {\n\tswitch (value?.type) {\n\t\tcase \"number\":\n\t\tcase \"string\": {\n\t\t\tconst number = Number(value.value);\n\t\t\tif (Number.isFinite(number)) return {\n\t\t\t\ttype: \"number\",\n\t\t\t\tvalue: number\n\t\t\t};\n\t\t\treturn null;\n\t\t}\n\t}\n\treturn null;\n}\nfunction valueToNumber(value) {\n\treturn castNumber(value)?.value ?? null;\n}\nfunction compareObject(left, right, collation) {\n\tconst leftKeys = Object.keys(left.value).sort();\n\tconst rightKeys = Object.keys(right.value).sort();\n\tif (leftKeys.length < rightKeys.length) return -1;\n\tif (leftKeys.length > rightKeys.length) return 1;\n\tfor (let i = 0; i < leftKeys.length; i++) {\n\t\tconst leftKey = leftKeys[i];\n\t\tconst rightKey = rightKeys[i];\n\t\tif (leftKey < rightKey) return -1;\n\t\tif (leftKey > rightKey) return 1;\n\t\tconst result = compare(left.value[leftKey] ?? null, right.value[rightKey] ?? null, collation);\n\t\tif (result !== 0) return result;\n\t}\n\treturn 0;\n}\nfunction castObject(value, definition) {\n\tswitch (value?.type) {\n\t\tcase \"object\": {\n\t\t\tconst result = {};\n\t\t\tconst definitionEntries = Object.entries(definition.definitions);\n\t\t\tfor (const [key, itemDefinition] of definitionEntries) {\n\t\t\t\tconst item = value.value[key] ?? null;\n\t\t\t\tresult[key] = DatabaseValue.cast(item, itemDefinition);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\ttype: \"object\",\n\t\t\t\tvalue: result\n\t\t\t};\n\t\t}\n\t}\n\treturn null;\n}\nfunction compareResponsiveImage(left, right) {\n\tconst leftEncoded = JSON.stringify(left.value);\n\tconst rightEncoded = JSON.stringify(right.value);\n\tif (leftEncoded < rightEncoded) return -1;\n\tif (leftEncoded > rightEncoded) return 1;\n\treturn 0;\n}\nfunction castResponsiveImage(value) {\n\tswitch (value?.type) {\n\t\tcase \"responsiveimage\": return value;\n\t}\n\treturn null;\n}\nfunction compareRichText(left, right) {\n\tconst leftValue = left.value;\n\tconst rightValue = right.value;\n\tif (leftValue < rightValue) return -1;\n\tif (leftValue > rightValue) return 1;\n\treturn 0;\n}\nfunction castRichText(value) {\n\tswitch (value?.type) {\n\t\tcase \"richtext\": return value;\n\t}\n\treturn null;\n}\nfunction compareVectorSetItem(left, right) {\n\tconst leftValue = left.value;\n\tconst rightValue = right.value;\n\tif (leftValue < rightValue) return -1;\n\tif (leftValue > rightValue) return 1;\n\treturn 0;\n}\nfunction castVectorSetItem(value) {\n\tswitch (value?.type) {\n\t\tcase \"vectorsetitem\": return value;\n\t}\n\treturn null;\n}\nfunction compareString(left, right, collation) {\n\tlet leftValue = left.value;\n\tlet rightValue = right.value;\n\tif (collation.type === 0) {\n\t\tleftValue = left.value.toLowerCase();\n\t\trightValue = right.value.toLowerCase();\n\t}\n\tif (leftValue < rightValue) return -1;\n\tif (leftValue > rightValue) return 1;\n\treturn 0;\n}\nfunction castString(value) {\n\tswitch (value?.type) {\n\t\tcase \"string\": return value;\n\t\tcase \"number\": return {\n\t\t\ttype: \"string\",\n\t\t\tvalue: String(value.value)\n\t\t};\n\t}\n\treturn null;\n}\nfunction valueToString(value) {\n\treturn castString(value)?.value ?? null;\n}\nconst DatabaseValue = {\n\t/**\n\t* Casts a value to a different type.\n\t*/\n\tcast(value, definition) {\n\t\tswitch (definition.type) {\n\t\t\tcase \"array\": return castArray(value, definition);\n\t\t\tcase \"boolean\": return castBoolean(value);\n\t\t\tcase \"color\": return castColor(value);\n\t\t\tcase \"date\": return castDate(value);\n\t\t\tcase \"enum\": return castEnum(value);\n\t\t\tcase \"file\": return castFile(value);\n\t\t\tcase \"link\": return castLink(value);\n\t\t\tcase \"number\": return castNumber(value);\n\t\t\tcase \"object\": return castObject(value, definition);\n\t\t\tcase \"responsiveimage\": return castResponsiveImage(value);\n\t\t\tcase \"richtext\": return castRichText(value);\n\t\t\tcase \"string\": return castString(value);\n\t\t\tcase \"vectorsetitem\": return castVectorSetItem(value);\n\t\t\tcase \"unknown\": return value;\n\t\t\tdefault: assertNever$1(definition, \"Unsupported cast\");\n\t\t}\n\t},\n\t/**\n\t* Parses a JavaScript variable into a DatabaseValue.\n\t*/\n\tparse(value) {\n\t\tif (isBoolean(value)) return {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue\n\t\t};\n\t\tif (isValidDate(value)) return {\n\t\t\ttype: \"date\",\n\t\t\tvalue: value.toISOString()\n\t\t};\n\t\tif (isNumber(value)) return {\n\t\t\ttype: \"number\",\n\t\t\tvalue\n\t\t};\n\t\tif (isString(value)) return {\n\t\t\ttype: \"string\",\n\t\t\tvalue\n\t\t};\n\t\tif (isArray(value)) return {\n\t\t\ttype: \"array\",\n\t\t\tvalue: value.map(DatabaseValue.parse)\n\t\t};\n\t\treturn null;\n\t},\n\t/**\n\t* Checks if the left value is equal to the right value. Returns false if\n\t* the values are not of the same type.\n\t*/\n\tequal(left, right, collation) {\n\t\tif (left?.type !== right?.type) return false;\n\t\treturn compare(left, right, collation) === 0;\n\t},\n\t/**\n\t* Checks if the left value is less than the right value. Returns false if\n\t* the values are not of the same type.\n\t*/\n\tlessThan(left, right, collation) {\n\t\tif (left?.type !== right?.type) return false;\n\t\treturn compare(left, right, collation) < 0;\n\t},\n\t/**\n\t* Checks if the left value is less than or equal to the right value.\n\t* Returns false if the values are not of the same type.\n\t*/\n\tlessThanOrEqual(left, right, collation) {\n\t\tif (left?.type !== right?.type) return false;\n\t\treturn compare(left, right, collation) <= 0;\n\t},\n\t/**\n\t* Checks if the left value is greater than the right value. Returns false\n\t* if the values are not of the same type.\n\t*/\n\tgreaterThan(left, right, collation) {\n\t\tif (left?.type !== right?.type) return false;\n\t\treturn compare(left, right, collation) > 0;\n\t},\n\t/**\n\t* Checks if the left value is greater than or equal to the right value.\n\t* Returns false if the values are not of the same type.\n\t*/\n\tgreaterThanOrEqual(left, right, collation) {\n\t\tif (left?.type !== right?.type) return false;\n\t\treturn compare(left, right, collation) >= 0;\n\t},\n\t/**\n\t* Checks if the left value is in the right value. Returns false if the\n\t* right value is not an array.\n\t*/\n\tin(left, right, collation) {\n\t\tif (right?.type !== \"array\") return false;\n\t\treturn right.value.some((item) => {\n\t\t\treturn DatabaseValue.equal(item, left, collation);\n\t\t});\n\t},\n\t/**\n\t* Get the index of the first occurrence of `target` in `source`.\n\t*\n\t* If source has duplicates, the index of the first occurrence is always returned.\n\t*/\n\tindexOf(source, target, collation) {\n\t\tif (source?.type !== \"array\") return -1;\n\t\treturn source.value.findIndex((item) => {\n\t\t\treturn DatabaseValue.equal(item, target, collation);\n\t\t});\n\t},\n\tcontains(source, target, collation) {\n\t\tlet sourceValue = valueToString(source);\n\t\tlet targetValue = valueToString(target);\n\t\tif (isNull(sourceValue)) return false;\n\t\tif (isNull(targetValue)) return false;\n\t\tif (collation.type === 0) {\n\t\t\tsourceValue = sourceValue.toLowerCase();\n\t\t\ttargetValue = targetValue.toLowerCase();\n\t\t}\n\t\treturn sourceValue.includes(targetValue);\n\t},\n\tstartsWith(source, target, collation) {\n\t\tlet sourceValue = valueToString(source);\n\t\tlet targetValue = valueToString(target);\n\t\tif (isNull(sourceValue)) return false;\n\t\tif (isNull(targetValue)) return false;\n\t\tif (collation.type === 0) {\n\t\t\tsourceValue = sourceValue.toLowerCase();\n\t\t\ttargetValue = targetValue.toLowerCase();\n\t\t}\n\t\treturn sourceValue.startsWith(targetValue);\n\t},\n\tendsWith(source, target, collation) {\n\t\tlet sourceValue = valueToString(source);\n\t\tlet targetValue = valueToString(target);\n\t\tif (isNull(sourceValue)) return false;\n\t\tif (isNull(targetValue)) return false;\n\t\tif (collation.type === 0) {\n\t\t\tsourceValue = sourceValue.toLowerCase();\n\t\t\ttargetValue = targetValue.toLowerCase();\n\t\t}\n\t\treturn sourceValue.endsWith(targetValue);\n\t},\n\tlength(value) {\n\t\tswitch (value?.type) {\n\t\t\tcase \"array\": return value.value.length;\n\t\t}\n\t\treturn 0;\n\t},\n\tstringify(value) {\n\t\tif (value === null) return \"null\";\n\t\tswitch (value.type) {\n\t\t\tcase \"array\": return `[${value.value.map(DatabaseValue.stringify).join(\", \")}]`;\n\t\t\tcase \"boolean\":\n\t\t\tcase \"number\": return String(value.value);\n\t\t\tcase \"string\": return `'${value.value}'`;\n\t\t\tcase \"enum\": return `'${value.value}' /* Enum */`;\n\t\t\tcase \"color\": return `'${value.value}' /* Color */`;\n\t\t\tcase \"date\": return `'${value.value}' /* Date */`;\n\t\t\tcase \"richtext\": return \"RichText\";\n\t\t\tcase \"vectorsetitem\": return \"VectorSetItem\";\n\t\t\tcase \"responsiveimage\": return \"ResponsiveImage\";\n\t\t\tcase \"file\": return \"File\";\n\t\t\tcase \"link\": return isString(value.value) ? `'${value.value}' /* Link */` : \"Link\";\n\t\t\tcase \"object\": return \"Object\";\n\t\t\tdefault: assertNever$1(value);\n\t\t}\n\t}\n};\n/**\n* Compares two DatabaseValue of the same type. Returns a negative number if\n* the left value is less than the right value, a positive number if the\n* left value is greater than the right value, and 0 if they are equal.\n*/\nfunction compare(left, right, collation) {\n\tif (isNull(left) || isNull(right)) {\n\t\tassert$1(left === right);\n\t\treturn 0;\n\t}\n\tswitch (left.type) {\n\t\tcase \"array\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareArray(left, right, collation);\n\t\tcase \"boolean\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareBoolean(left, right);\n\t\tcase \"color\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareColor(left, right);\n\t\tcase \"date\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareDate(left, right);\n\t\tcase \"enum\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareEnum(left, right);\n\t\tcase \"file\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareFile(left, right);\n\t\tcase \"link\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareLink(left, right);\n\t\tcase \"number\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareNumber(left, right);\n\t\tcase \"object\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareObject(left, right, collation);\n\t\tcase \"responsiveimage\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareResponsiveImage(left, right);\n\t\tcase \"richtext\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareRichText(left, right);\n\t\tcase \"vectorsetitem\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareVectorSetItem(left, right);\n\t\tcase \"string\":\n\t\t\tassert$1(left.type === right.type);\n\t\t\treturn compareString(left, right, collation);\n\t\tdefault: assertNever$1(left);\n\t}\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/DatabaseValueDefinition.ts\nconst unknownDefinition = {\n\ttype: \"unknown\",\n\tisNullable: true\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/CompatibilityDatabaseCollection.ts\nasync function getCollectionItems(collection, locale) {\n\tif (isLegacyLocalizedCollection(collection)) {\n\t\tawait collection.preload(locale);\n\t\treturn collection.read(locale);\n\t}\n\treturn collection;\n}\nvar CompatibilityDatabaseCollection = class {\n\tcollection;\n\tlocale;\n\tschema;\n\tindexes = [];\n\tconstructor(collection, locale) {\n\t\tthis.collection = collection;\n\t\tthis.locale = locale;\n\t\tconst propertyControls = getPropertyControls(collection);\n\t\tassert$1(propertyControls, \"Collection does not have properties\");\n\t\tconst schema = { id: {\n\t\t\ttype: \"string\",\n\t\t\tisNullable: false\n\t\t} };\n\t\tconst controlEntries = Object.entries(propertyControls);\n\t\tfor (const [key, controlDescription] of controlEntries) {\n\t\t\tif (!controlDescription) continue;\n\t\t\tconst type = controlDescription.type;\n\t\t\tassert$1(type !== \"array\", \"Array properties are not supported\");\n\t\t\tassert$1(type !== \"object\", \"Object properties are not supported\");\n\t\t\tschema[key] = {\n\t\t\t\ttype,\n\t\t\t\tisNullable: true\n\t\t\t};\n\t\t}\n\t\tthis.schema = schema;\n\t}\n\tgetDatabaseItem(item, pointer) {\n\t\tconst data = {};\n\t\tconst itemIndex = Number(pointer);\n\t\tfor (const key in this.schema) {\n\t\t\tconst value = item[key];\n\t\t\tif (isNullish(value)) continue;\n\t\t\tconst definition = this.schema[key];\n\t\t\tif (isUndefined(definition)) continue;\n\t\t\tassert$1(definition.type !== \"unknown\", \"Invalid definition type\");\n\t\t\tif (definition.type === \"richtext\") {\n\t\t\t\tdata[key] = {\n\t\t\t\t\ttype: definition.type,\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\titemIndex,\n\t\t\t\t\t\tkey\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdata[key] = {\n\t\t\t\ttype: definition.type,\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tpointer,\n\t\t\tdata\n\t\t};\n\t}\n\tasync resolveRichText(pointer) {\n\t\tconst { itemIndex, key } = pointer;\n\t\tconst richText = (await getCollectionItems(this.collection, this.locale))[itemIndex]?.[key];\n\t\tif (LazyValue.is(richText)) return richText.readMaybeAsync();\n\t\treturn richText;\n\t}\n\tasync scanItems(priority) {\n\t\tconst items = await getCollectionItems(this.collection, this.locale);\n\t\tconst databaseItems = [];\n\t\tfor (let index = 0; index < items.length; index++) {\n\t\t\tconst yieldPromise = yieldToMainDuringEvaluation(priority);\n\t\t\tif (yieldPromise) await yieldPromise;\n\t\t\tconst item = items[index];\n\t\t\tassert$1(item, \"Can't find collection item\");\n\t\t\tconst pointer = String(index);\n\t\t\tdatabaseItems.push(this.getDatabaseItem(item, pointer));\n\t\t}\n\t\treturn databaseItems;\n\t}\n\tasync resolveItems(pointers, priority) {\n\t\tconst items = await getCollectionItems(this.collection, this.locale);\n\t\tconst databaseItems = [];\n\t\tfor (const pointer of pointers) {\n\t\t\tconst yieldPromise = yieldToMainDuringEvaluation(priority);\n\t\t\tif (yieldPromise) await yieldPromise;\n\t\t\tconst item = items[Number(pointer)];\n\t\t\tassert$1(item, \"Can't find collection item\");\n\t\t\tdatabaseItems.push(this.getDatabaseItem(item, pointer));\n\t\t}\n\t\treturn databaseItems;\n\t}\n\tcompareItems(left, right) {\n\t\treturn Number(left.pointer) - Number(right.pointer);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/getCollectionId.ts\nconst persistedCollectionIdToSeenCollectionRef = /* @__PURE__ */ new Map();\nconst collectionRefToStableCollectionId = /* @__PURE__ */ new WeakMap();\nconst prefix = \"$r_\";\nfunction hasRandomCollectionId(id) {\n\treturn id.includes(prefix);\n}\nfunction getPersistedCollectionId(collection) {\n\tif (!isAnyDatabaseCollection(collection)) return void 0;\n\tif (!collection.id) return void 0;\n\tconst existingCollectionRef = persistedCollectionIdToSeenCollectionRef.get(collection.id);\n\tif (!existingCollectionRef) {\n\t\tpersistedCollectionIdToSeenCollectionRef.set(collection.id, new WeakRef(collection));\n\t\treturn collection.id;\n\t}\n\tif (existingCollectionRef.deref() === collection) return collection.id;\n}\nfunction getCollectionId(collection) {\n\tconst persistedId = getPersistedCollectionId(collection);\n\tif (persistedId) return persistedId;\n\tconst stableCollectionId = collectionRefToStableCollectionId.get(collection);\n\tif (stableCollectionId) return stableCollectionId;\n\tconst id = `${prefix}${Math.random().toString(16).slice(2)}`;\n\tcollectionRefToStableCollectionId.set(collection, id);\n\treturn id;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/getCollectionForLocale.ts\nconst compatibilityCache = /* @__PURE__ */ new Map();\nfunction getCollectionForLocale(data, locale) {\n\tif (isAnyLegacyCollection(data)) {\n\t\tconst cacheKey = getCollectionId(data) + (locale?.id ?? \"default\");\n\t\tconst cached = compatibilityCache.get(cacheKey);\n\t\tif (cached) return cached;\n\t\tconst collection = new CompatibilityDatabaseCollection(data, locale);\n\t\tcompatibilityCache.set(cacheKey, collection);\n\t\treturn collection;\n\t}\n\tif (isDatabaseCollection(data)) return data;\n\tif (isLocalizedDatabaseCollection(data)) {\n\t\twhile (locale) {\n\t\t\tconst collection = data.collectionByLocaleId[locale.id];\n\t\t\tif (collection) return collection;\n\t\t\tlocale = locale.fallback;\n\t\t}\n\t\treturn data.collectionByLocaleId.default;\n\t}\n\tassertNever$1(data, \"Unsupported collection type\");\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Hashable.ts\nfunction Hash(value) {\n\treturn value;\n}\n/**\n* Checks if a value is a hashable object.\n*/\nfunction isHashable(value) {\n\treturn isFunction(value.getHash);\n}\n/**\n* Calculates a hash for a list of values.\n*/\nfunction calculateHash(name, ...values) {\n\tlet hash = `${name}(`;\n\tfor (let index = 0; index < values.length; index++) {\n\t\tif (index > 0) hash += \", \";\n\t\tconst value = values[index];\n\t\tif (isObject$1(value) && isHashable(value)) {\n\t\t\thash += value.getHash();\n\t\t\tcontinue;\n\t\t}\n\t\thash += JSON.stringify(value) ?? \"\";\n\t}\n\treturn Hash(`${hash})`);\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/queryScheduling.ts\n/** Returns a priority for query evaluation that stays up to date if scheduling changes. */\nfunction createSchedulingPrioritySource(priority) {\n\tif (priority === void 0) return;\n\tif (typeof priority !== \"function\") return priority;\n\tconst initialPriority = priority();\n\treturn () => priority() ?? initialPriority;\n}\n/** Reads the current scheduler priority from a priority source. */\nfunction readExecutionPriority(priority) {\n\tif (priority === void 0) return;\n\treturn resolveSchedulerPriority(priority);\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Resolver.ts\nfunction wrapRichTextPointer(collection, pointer) {\n\treturn {\n\t\tcollectionId: getCollectionId(collection),\n\t\tpointer\n\t};\n}\nfunction isWrappedRichTextPointer(value) {\n\treturn isObject$1(value) && isString(value.collectionId);\n}\nfunction wrapVectorSetItemPointer(collection, pointer) {\n\treturn {\n\t\tcollectionId: getCollectionId(collection),\n\t\tpointer\n\t};\n}\nfunction isWrappedVectorSetItemPointer(value) {\n\treturn isObject$1(value) && isString(value.collectionId);\n}\nvar Resolver = class {\n\tcollections;\n\tpriority;\n\tconstructor(query, locale, priority) {\n\t\tthis.collections = getCollectionsFromQuery(query, locale);\n\t\tthis.priority = createSchedulingPrioritySource(priority);\n\t}\n\t*resolveArrayValue(value) {\n\t\treturn yield* evaluateArray(value.value.map((item) => {\n\t\t\treturn this.resolveValue(item);\n\t\t}));\n\t}\n\t*resolveObjectValue(value) {\n\t\tconst result = {};\n\t\tfor (const key in value.value) {\n\t\t\tconst item = value.value[key];\n\t\t\tresult[key] = this.resolveValue(item);\n\t\t}\n\t\treturn yield* evaluateObject(result);\n\t}\n\trichTextCache = /* @__PURE__ */ new WeakMap();\n\tloadRichTextValue(value) {\n\t\tconst wrapped = value.value;\n\t\tassert$1(isWrappedRichTextPointer(wrapped), \"Rich text pointer must be wrapped\");\n\t\tconst collection = this.collections.get(wrapped.collectionId);\n\t\tassert$1(collection, \"Can't find collection for rich text pointer\");\n\t\tconst cache = this.richTextCache.get(collection) ?? /* @__PURE__ */ new Map();\n\t\tthis.richTextCache.set(collection, cache);\n\t\tconst cached = cache.get(wrapped.pointer);\n\t\tif (cached) return cached;\n\t\tconst result = collection.resolveRichText(wrapped.pointer);\n\t\tcache.set(wrapped.pointer, result);\n\t\treturn result;\n\t}\n\tpreloadRichTextValue(value) {\n\t\tthis.loadRichTextValue(value);\n\t}\n\t*resolveRichTextValue(value) {\n\t\tconst result = this.loadRichTextValue(value);\n\t\tif (isPromiseLike(result)) return yield result;\n\t\treturn result;\n\t}\n\tvectorSetItemCache = /* @__PURE__ */ new WeakMap();\n\tloadVectorSetItemValue(value) {\n\t\tconst wrapped = value.value;\n\t\tassert$1(isWrappedVectorSetItemPointer(wrapped), \"Vector set item pointer must be wrapped\");\n\t\tconst collection = this.collections.get(wrapped.collectionId);\n\t\tassert$1(collection, \"Can't find collection for vector set item pointer\");\n\t\tassert$1(collection.resolveVectorSetItem, \"Can't resolve vector set item pointer\");\n\t\tconst cache = this.vectorSetItemCache.get(collection) ?? /* @__PURE__ */ new Map();\n\t\tthis.vectorSetItemCache.set(collection, cache);\n\t\tconst cached = cache.get(wrapped.pointer);\n\t\tif (cached) return cached;\n\t\tconst result = collection.resolveVectorSetItem(wrapped.pointer);\n\t\tcache.set(wrapped.pointer, result);\n\t\treturn result;\n\t}\n\tpreloadVectorSetItemValue(value) {\n\t\tthis.loadVectorSetItemValue(value);\n\t}\n\t*resolveVectorSetItemValue(value) {\n\t\tconst result = this.loadVectorSetItemValue(value);\n\t\tif (isPromiseLike(result)) return yield result;\n\t\treturn result;\n\t}\n\t*resolveValue(value) {\n\t\tswitch (value?.type) {\n\t\t\tcase \"array\": return yield* this.resolveArrayValue(value);\n\t\t\tcase \"object\": return yield* this.resolveObjectValue(value);\n\t\t\tcase \"richtext\": return yield* this.resolveRichTextValue(value);\n\t\t\tcase \"vectorsetitem\": return yield* this.resolveVectorSetItemValue(value);\n\t\t}\n\t\treturn value?.value ?? null;\n\t}\n};\nfunction getCollectionsFromQuery(query, locale) {\n\tconst collections = /* @__PURE__ */ new Map();\n\tfunction collect(value) {\n\t\tif (isObject$1(value)) {\n\t\t\tif (value.type === \"Collection\" && isAnyCollection(value.data)) {\n\t\t\t\tconst collection = getCollectionForLocale(value.data, locale);\n\t\t\t\tconst collectionId = getCollectionId(collection);\n\t\t\t\tcollections.set(collectionId, collection);\n\t\t\t} else for (const key in value) {\n\t\t\t\tconst property = value[key];\n\t\t\t\tcollect(property);\n\t\t\t}\n\t\t} else if (isArray(value)) for (const item of value) collect(item);\n\t}\n\tcollect(query);\n\treturn collections;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Metadata.ts\n/**\n* We have a special identifier called \"index\" to sort items based on the order\n* defined in the CMS. The index can only be used by the `EnforcerSort` node.\n*/\nconst VIRTUAL_INDEX_FIELD = \"index\";\nvar Metadata = class extends Set {\n\tmerge(other) {\n\t\tfor (const item of other) this.add(item);\n\t}\n\tequals(other) {\n\t\tif (this === other) return true;\n\t\tif (this.size !== other.size) return false;\n\t\tfor (const item of this) if (!other.has(item)) return false;\n\t\treturn true;\n\t}\n\tsubsetOf(other) {\n\t\tif (this === other) return true;\n\t\tif (this.size > other.size) return false;\n\t\tfor (const item of this) if (!other.has(item)) return false;\n\t\treturn true;\n\t}\n\tgetHash() {\n\t\tconst ids = [];\n\t\tfor (const item of this) ids.push(item.id);\n\t\tids.sort((a, b) => a - b);\n\t\treturn calculateHash(this.name, ...ids);\n\t}\n};\nfunction CollectionId(id) {\n\treturn id;\n}\nvar CollectionMetadata = class {\n\tid;\n\tname;\n\tdata;\n\tindexes = new Indexes();\n\tfields = new Fields();\n\tfieldByName = /* @__PURE__ */ new Map();\n\tconstructor(id, name, data) {\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t\tthis.data = data;\n\t}\n\taddNamedField(fieldName, field) {\n\t\tthis.fields.add(field);\n\t\tthis.fieldByName.set(fieldName, field);\n\t}\n\tgetFieldByName(fieldName) {\n\t\treturn this.fieldByName.get(fieldName);\n\t}\n};\nfunction IndexId(id) {\n\treturn id;\n}\nvar IndexMetadata = class {\n\tid;\n\tdata;\n\tcollection;\n\tlookupNodes;\n\tconstraint;\n\tordering;\n\tresolvedFields = new Fields();\n\tconstructor(id, data, collection, lookupNodes, constraint, ordering) {\n\t\tthis.id = id;\n\t\tthis.data = data;\n\t\tthis.collection = collection;\n\t\tthis.lookupNodes = lookupNodes;\n\t\tthis.constraint = constraint;\n\t\tthis.ordering = ordering;\n\t\tfor (const fieldName in data.schema) {\n\t\t\tconst field = collection.getFieldByName(fieldName);\n\t\t\tif (field) this.resolvedFields.add(field);\n\t\t}\n\t}\n};\nvar Indexes = class extends Metadata {\n\tname = \"Indexes\";\n};\nfunction FieldId(id) {\n\treturn id;\n}\nvar FieldMetadata = class {\n\tid;\n\tname;\n\tdefinition;\n\tcollection;\n\tconstructor(id, name, definition, collection) {\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t\tthis.definition = definition;\n\t\tthis.collection = collection;\n\t}\n\tgetValue(item) {\n\t\tassert$1(this.name, \"Can only get value of field with a name\");\n\t\tconst value = item.data[this.name];\n\t\tif (!value) return null;\n\t\treturn this.wrapPointers(value);\n\t}\n\twrapPointers(value) {\n\t\tswitch (value?.type) {\n\t\t\tcase \"array\": return {\n\t\t\t\ttype: \"array\",\n\t\t\t\tvalue: value.value.map((item) => this.wrapPointers(item))\n\t\t\t};\n\t\t\tcase \"object\": {\n\t\t\t\tconst wrapped = {};\n\t\t\t\tfor (const key in value.value) wrapped[key] = this.wrapPointers(value.value[key]);\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"object\",\n\t\t\t\t\tvalue: wrapped\n\t\t\t\t};\n\t\t\t}\n\t\t\tcase \"richtext\":\n\t\t\t\tassert$1(this.collection, \"Rich text field must have a collection\");\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"richtext\",\n\t\t\t\t\tvalue: wrapRichTextPointer(this.collection.data, value.value)\n\t\t\t\t};\n\t\t\tcase \"vectorsetitem\":\n\t\t\t\tassert$1(this.collection, \"Vector set item field must have a collection\");\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"vectorsetitem\",\n\t\t\t\t\tvalue: wrapVectorSetItemPointer(this.collection.data, value.value)\n\t\t\t\t};\n\t\t}\n\t\treturn value;\n\t}\n};\nvar Fields = class extends Metadata {\n\tname = \"Fields\";\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Ordering.ts\nvar OrderingField = class {\n\tfield;\n\tdirection;\n\tconstructor(field, direction = \"asc\") {\n\t\tthis.field = field;\n\t\tthis.direction = direction;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"OrderingField\", this.field.id, this.direction);\n\t}\n};\n/**\n* Ordering describes how a relation should be sorted. If the ordering is empty,\n* the relation can be sorted in any order.\n*/\nvar Ordering = class {\n\tfields = [];\n\tconstructor(ordering) {\n\t\tif (ordering) this.merge(ordering);\n\t}\n\tget length() {\n\t\treturn this.fields.length;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"Ordering\", ...this.fields);\n\t}\n\tpush(field) {\n\t\tthis.fields.push(field);\n\t}\n\tmerge(ordering) {\n\t\tthis.fields.push(...ordering.fields);\n\t}\n\tequals(other) {\n\t\tif (this === other) return true;\n\t\tif (this.length !== other.length) return false;\n\t\treturn this.getHash() === other.getHash();\n\t}\n\tprovidedByFields(fields) {\n\t\tfor (const { field } of this.fields) {\n\t\t\tif (fields.has(field)) continue;\n\t\t\tif (field.name === \"index\") continue;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/PhysicalProps.ts\n/**\n* Required props describe the physical properties of the relation returned by a\n* relational node. Physical properties include the ordering of the relation and\n* the set of fields that have to be resolved. When a relational node can't\n* provide a required property, we wrap it with an `EnforcerNode` in the\n* optimizer.\n*\n* Physical properties are built top down. We start with a set of required\n* properties for the root node, and then recursively build up the required\n* properties for the child nodes as we optimize the query plan.\n*\n* Some nodes can pass the required properties to their children, while others\n* will add more to them. For example, a `RelationalFilter` node doesn't change\n* the ordering of the input node, but it requires that all fields referenced by\n* the predicate are resolved.\n*/\nvar RequiredProps = class {\n\tordering;\n\tresolvedFields;\n\tconstructor(ordering, resolvedFields) {\n\t\tthis.ordering = ordering;\n\t\tthis.resolvedFields = resolvedFields;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"RequiredProps\", this.ordering, this.resolvedFields);\n\t}\n\t/**\n\t* Required props with no ordering and no resolved fields are considered\n\t* minimal. Every node can provide them.\n\t*/\n\tget isMinimal() {\n\t\treturn this.ordering.length === 0 && this.resolvedFields.size === 0;\n\t}\n\t/**\n\t* Checks if the node can provide the required props. If it can't, we need\n\t* to add enforcers that provides them.\n\t*\n\t* Some nodes don't provide the required props directly, but can pass them\n\t* through to their children. E.g. a `RelationalFilter` returns the relation\n\t* in the same order and with the same resolved fields as its input. These\n\t* nodes should return `true` and pass the required props to their children.\n\t*/\n\tcanProvide(node) {\n\t\treturn this.canProvideOrdering(node) && this.canProvideResolvedFields(node);\n\t}\n\t/**\n\t* Checks if the given node can provide the required ordering. If it can't,\n\t* we need to add an `EnforcerSort` node that provides it.\n\t*/\n\tcanProvideOrdering(node) {\n\t\tif (this.ordering.length === 0) return true;\n\t\treturn node.canProvideOrdering(this.ordering);\n\t}\n\t/**\n\t* Checks if the given node can provide the required resolved fields. If it\n\t* can't, we need to add an `EnforcerResolve` node that provides it.\n\t*/\n\tcanProvideResolvedFields(node) {\n\t\tif (this.resolvedFields.size === 0) return true;\n\t\treturn node.canProvideResolvedFields(this.resolvedFields);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Scope.ts\n/**\n* The builder uses the scope to track available fields in the query. It's\n* similar to the concept of a scope in a programming language.\n*\n* Take the following query as an example:\n* ```\n* SELECT id AS article_id FROM articles\n* ORDER BY articles.title, article_id;\n* ```\n*\n* This query has two separate scopes:\n* - The first scope is for the `FROM` clause. The scope contains all fields of\n*   the articles collection.\n* - The second scope is for the `SELECT` clause. It contains the fields in the\n*   select list.\n*\n* Because the `ORDER BY` clause has access to the \"select\" scope, it can\n* resolve the `article_id` field. It can also resolve the `articles.title`\n* field because the \"from\" scope is the parent of the \"select\" scope.\n*/\nvar Scope = class Scope {\n\tparent;\n\t/**\n\t* The last node built in the scope.\n\t*/\n\tnode;\n\t/**\n\t* Returns the last node built in the scope and removes it from the scope.\n\t* Throws an error if no node was built in the scope yet.\n\t*/\n\ttakeNode() {\n\t\tconst node = this.node;\n\t\tassert$1(node, \"Node is missing\");\n\t\tthis.node = void 0;\n\t\treturn node;\n\t}\n\t/**\n\t* Sets the last node built in the scope. Throws an error if there is\n\t* already a node in the scope.\n\t*/\n\tsetNode(node) {\n\t\tassert$1(!this.node, \"Node already set\");\n\t\tthis.node = node;\n\t}\n\t/**\n\t* The required ordering of the scope.\n\t*/\n\tordering;\n\tsetOrdering(ordering) {\n\t\tthis.ordering = ordering;\n\t}\n\t/**\n\t* A list of all fields available in the scope.\n\t*/\n\tfields = [];\n\tfieldsByName = /* @__PURE__ */ new Map();\n\tconstructor(parent) {\n\t\tthis.parent = parent;\n\t}\n\t/**\n\t* Create a new scope with the this scope as its parent.\n\t*/\n\tpush() {\n\t\treturn new Scope(this);\n\t}\n\t/**\n\t* Creates a new scope with the parent of the this scope as its parent.\n\t*/\n\treplace() {\n\t\treturn new Scope(this.parent);\n\t}\n\t/**\n\t* Adds a field to this scope. Any fields that are added will be available\n\t* in the this scope and all of its children.\n\t*/\n\taddField(scopeField) {\n\t\tthis.fields.push(scopeField);\n\t\tconst fields = this.fieldsByName.get(scopeField.name);\n\t\tif (fields) fields.push(scopeField);\n\t\telse this.fieldsByName.set(scopeField.name, [scopeField]);\n\t}\n\t/**\n\t* Merges all fields from the given scope into the this scope.\n\t*/\n\taddFieldsFromScope(scope) {\n\t\tfor (const scopeField of scope.fields) this.fields.push(scopeField);\n\t\tfor (const [name, fields] of scope.fieldsByName) {\n\t\t\tconst existing = this.fieldsByName.get(name);\n\t\t\tif (existing) existing.push(...fields);\n\t\t\telse this.fieldsByName.set(name, fields.slice());\n\t\t}\n\t}\n\t/**\n\t* Resolves a field from this scope. If the field is not found, the parent\n\t* scope is checked. If the name of a field is ambiguous, an error is\n\t* thrown.\n\t*/\n\tresolveField(name, collection) {\n\t\tconst fields = this.fieldsByName.get(name);\n\t\tif (fields) {\n\t\t\tlet candidate;\n\t\t\tfor (const field of fields) {\n\t\t\t\tif (collection && field.collectionName !== collection) continue;\n\t\t\t\tif (candidate) throw new Error(\"Ambiguous fields\");\n\t\t\t\tcandidate = field;\n\t\t\t}\n\t\t\tif (candidate) return candidate;\n\t\t}\n\t\treturn this.parent?.resolveField(name, collection);\n\t}\n\t/**\n\t* Checks if the scope or any parent scope has the given scope field.\n\t*/\n\thas(scopeField) {\n\t\tif (this.fieldsByName.get(scopeField.name)?.includes(scopeField)) return true;\n\t\treturn this.parent?.has(scopeField) ?? false;\n\t}\n\t/**\n\t* Returns the required ordering for the scope.\n\t*/\n\tgetRequiredOrdering() {\n\t\treturn this.ordering ?? new Ordering();\n\t}\n\t/**\n\t* Returns the required resolved fields for the scope.\n\t*/\n\tgetRequiredResolvedFields() {\n\t\tconst resolvedFields = new Fields();\n\t\tfor (const { field } of this.fields) if (field.collection) resolvedFields.add(field);\n\t\treturn resolvedFields;\n\t}\n\t/**\n\t* Returns the set of required physical props for this scope. This is used\n\t* to create the required props for the root node in the optimizer.\n\t*/\n\tgetRequiredProps() {\n\t\tconst ordering = this.getRequiredOrdering();\n\t\tconst resolvedFields = this.getRequiredResolvedFields();\n\t\treturn new RequiredProps(ordering, resolvedFields);\n\t}\n\t/**\n\t* Returns a map of the fields in this scope, with their scope names as\n\t* keys. This is used to create the final `QueryResult` with the correct\n\t* field names.\n\t*/\n\tgetNamedFields() {\n\t\tconst namedFields = {};\n\t\tfor (const { name, field } of this.fields) namedFields[name] = field;\n\t\treturn namedFields;\n\t}\n\t/**\n\t* Returns the single field from this scope if it only contains one field.\n\t* Throws an error if there are more than one fields.\n\t*/\n\tgetSingleField() {\n\t\tassert$1(this.fields.length === 1, \"Scope must contain exactly one field\");\n\t\tconst scopeField = this.fields[0];\n\t\tassert$1(scopeField, \"Field must exist\");\n\t\treturn scopeField.field;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Cost.ts\n/**\n* Returns the estimated network latency in ms.\n*/\nfunction getNetworkLatency() {\n\treturn 25;\n}\n/**\n* Returns the estimated network speed in bytes per ms.\n*/\nfunction getNetworkSpeed() {\n\treturn 12500;\n}\nconst KB = 1e3;\nvar Cost = class Cost {\n\tnetwork;\n\tconstructor(network) {\n\t\tthis.network = network;\n\t}\n\tstatic estimate(totalRequests, transferredBytes) {\n\t\tconst latency = getNetworkLatency();\n\t\tconst speed = getNetworkSpeed();\n\t\tconst network = totalRequests * latency + transferredBytes / speed;\n\t\treturn new Cost(network);\n\t}\n\tstatic max(left, right) {\n\t\tconst network = Math.max(left.network, right.network);\n\t\treturn new Cost(network);\n\t}\n\tstatic compare(left, right) {\n\t\tif (left.network < right.network) return -1;\n\t\tif (left.network > right.network) return 1;\n\t\treturn 0;\n\t}\n\tadd(cost) {\n\t\tthis.network += cost.network;\n\t\treturn this;\n\t}\n\ttoString() {\n\t\treturn `${this.network}ms`;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Relation.ts\n/**\n* A tuple is a single item in a relation. It contains the values for each field\n* and the pointers for each collection.\n*/\nvar Tuple = class {\n\tpointers = /* @__PURE__ */ new Map();\n\tvalues = /* @__PURE__ */ new Map();\n\tgetKey() {\n\t\tconst result = [];\n\t\tfor (const [collection, pointer] of this.pointers) result.push(`${collection.id}-${pointer}`);\n\t\treturn result.sort().join(\"-\");\n\t}\n\taddValue(field, value) {\n\t\tthis.values.set(field, value);\n\t}\n\tgetValue(field) {\n\t\treturn this.values.get(field) ?? null;\n\t}\n\tmergeValues(tuple) {\n\t\tfor (const [field, value] of tuple.values) this.addValue(field, value);\n\t}\n\taddPointer(collection, pointer) {\n\t\tthis.pointers.set(collection, pointer);\n\t}\n\tgetPointer(collection) {\n\t\treturn this.pointers.get(collection);\n\t}\n\tmergePointers(tuple) {\n\t\tfor (const [collection, pointer] of tuple.pointers) this.addPointer(collection, pointer);\n\t}\n\tmerge(tuple) {\n\t\tthis.mergeValues(tuple);\n\t\tthis.mergePointers(tuple);\n\t}\n};\n/**\n* A relation is the list of tuples returned by a relational node. We use the\n* name relation to distinguish them from the raw items returned by the CMS\n* module.\n*/\nvar Relation = class Relation {\n\tfields;\n\ttuples;\n\tconstructor(fields, tuples = []) {\n\t\tthis.fields = fields;\n\t\tthis.tuples = tuples;\n\t}\n\tpush(tuple) {\n\t\tthis.tuples.push(tuple);\n\t}\n\tfilter(predicate) {\n\t\tconst tuples = this.tuples.filter(predicate);\n\t\treturn new Relation(this.fields, tuples);\n\t}\n\tmap(fields, callback) {\n\t\tconst tuples = this.tuples.map(callback);\n\t\treturn new Relation(fields, tuples);\n\t}\n\tsort(callback) {\n\t\tconst tuples = Array.from(this.tuples).sort(callback);\n\t\treturn new Relation(this.fields, tuples);\n\t}\n\tslice(start, end) {\n\t\tconst tuples = this.tuples.slice(start, end);\n\t\treturn new Relation(this.fields, tuples);\n\t}\n\tunion(other) {\n\t\tconst fields = new Fields();\n\t\tfor (const field of this.fields) if (other.fields.has(field)) fields.add(field);\n\t\tconst keys = /* @__PURE__ */ new Set();\n\t\tconst result = new Relation(fields);\n\t\tfor (const tuple of this.tuples) {\n\t\t\tconst key = tuple.getKey();\n\t\t\tkeys.add(key);\n\t\t\tresult.push(tuple);\n\t\t}\n\t\tfor (const tuple of other.tuples) {\n\t\t\tconst key = tuple.getKey();\n\t\t\tif (keys.has(key)) continue;\n\t\t\tresult.push(tuple);\n\t\t}\n\t\treturn result;\n\t}\n\tintersection(other) {\n\t\tconst fields = new Fields();\n\t\tfor (const field of this.fields) if (other.fields.has(field)) fields.add(field);\n\t\tconst keys = /* @__PURE__ */ new Set();\n\t\tconst result = new Relation(fields);\n\t\tfor (const tuple of this.tuples) {\n\t\t\tconst key = tuple.getKey();\n\t\t\tkeys.add(key);\n\t\t}\n\t\tfor (const tuple of other.tuples) {\n\t\t\tconst key = tuple.getKey();\n\t\t\tif (!keys.has(key)) continue;\n\t\t\tresult.push(tuple);\n\t\t}\n\t\treturn result;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/AbstractNode.ts\nvar AbstractNode = class {\n\tisSynchronous;\n\tconstructor(isSynchronous) {\n\t\tthis.isSynchronous = isSynchronous;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/relational/RelationalNode.ts\nvar RelationalNode = class extends AbstractNode {\n\tgroup;\n\t/**\n\t* Returns the group that the node belongs to. Throws an error if the node\n\t* is not in a group. This should only happen in the constructor because\n\t* every node is added to a group right after creation.\n\t*/\n\tgetGroup() {\n\t\tassert$1(this.group, \"Node must be in a group\");\n\t\treturn this.group;\n\t}\n\t/**\n\t* Adds the node to the given group. Throws an error if the node is already\n\t* in a group.\n\t*/\n\tsetGroup(group) {\n\t\tassert$1(!this.group, \"Node is already in a group\");\n\t\tthis.group = group;\n\t}\n\t/**\n\t* Evaluates the node and all children synchronously. Throws an error if the\n\t* node is not synchronous.\n\t*/\n\tevaluateSync() {\n\t\tconst generator = this.evaluate(void 0);\n\t\treturn evaluateSync(generator);\n\t}\n\t/**\n\t* Evaluates the node and all children asynchronously.\n\t*/\n\tevaluateAsync(priority) {\n\t\tconst generator = this.evaluate(void 0);\n\t\treturn evaluateAsync(generator, void 0, priority);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/relational/RelationalProject.ts\nvar ProjectionField = class {\n\tinput;\n\tfield;\n\tconstructor(input, field) {\n\t\tthis.input = input;\n\t\tthis.field = field;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ProjectionField\", this.input, this.field.id);\n\t}\n};\nvar RelationalProject = class RelationalProject extends RelationalNode {\n\tinput;\n\tprojections;\n\tpassthrough;\n\tinputGroup;\n\tconstructor(input, projections, passthrough) {\n\t\tlet isSynchronous = input.isSynchronous;\n\t\tfor (const projection of projections) isSynchronous &&= projection.input.isSynchronous;\n\t\tsuper(isSynchronous);\n\t\tthis.input = input;\n\t\tthis.projections = projections;\n\t\tthis.passthrough = passthrough;\n\t\tthis.inputGroup = input.getGroup();\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"RelationalProject\", this.inputGroup.id, ...this.projections, this.passthrough);\n\t}\n\tgetOutputFields() {\n\t\tconst fields = new Fields();\n\t\tfields.merge(this.passthrough);\n\t\tfor (const projection of this.projections) fields.add(projection.field);\n\t\treturn fields;\n\t}\n\tcanProvideOrdering(ordering) {\n\t\tconst projectionFields = new Fields();\n\t\tfor (const projection of this.projections) projectionFields.add(projection.field);\n\t\tfor (const { field } of ordering.fields) if (projectionFields.has(field)) return false;\n\t\treturn true;\n\t}\n\tcanProvideResolvedFields() {\n\t\treturn true;\n\t}\n\tgetInputRequiredProps(required) {\n\t\tconst resolvedFields = new Fields(required.resolvedFields);\n\t\tfor (const projection of this.projections) {\n\t\t\tresolvedFields.merge(projection.input.referencedFields);\n\t\t\tresolvedFields.delete(projection.field);\n\t\t}\n\t\treturn new RequiredProps(required.ordering, resolvedFields);\n\t}\n\toptimize(optimizer, required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst inputCost = optimizer.optimizeGroup(this.inputGroup, inputRequired);\n\t\tlet projectionsCost = new Cost(0);\n\t\tfor (const projection of this.projections) {\n\t\t\tconst projectionCost = projection.input.optimize(optimizer);\n\t\t\tprojectionsCost = Cost.max(projectionsCost, projectionCost);\n\t\t}\n\t\treturn new Cost(0).add(Cost.max(inputCost, projectionsCost));\n\t}\n\tgetOptimized(required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst input = this.inputGroup.getOptimized(inputRequired);\n\t\tconst projections = this.projections.map((projection) => {\n\t\t\tconst projectionInput = projection.input.getOptimized();\n\t\t\treturn new ProjectionField(projectionInput, projection.field);\n\t\t});\n\t\treturn new RelationalProject(input, projections, this.passthrough);\n\t}\n\t*evaluate(context) {\n\t\tconst outputFields = this.getOutputFields();\n\t\tconst input = yield* this.input.evaluate(context);\n\t\tconst projectedValues = yield* evaluateArray(input.tuples.map((tuple) => evaluateArray(this.projections.map((projection) => evaluateObject({\n\t\t\tfield: projection.field,\n\t\t\tvalue: projection.input.evaluate(context, tuple)\n\t\t})))));\n\t\treturn input.map(outputFields, (tuple, index) => {\n\t\t\tconst result = new Tuple();\n\t\t\tresult.mergePointers(tuple);\n\t\t\tfor (const field of this.passthrough) {\n\t\t\t\tconst value = tuple.getValue(field);\n\t\t\t\tresult.addValue(field, value);\n\t\t\t}\n\t\t\tconst projections = projectedValues[index];\n\t\t\tassert$1(projections, \"Projections must exist\");\n\t\t\tfor (const { field, value } of projections) result.addValue(field, value);\n\t\t\treturn result;\n\t\t});\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarNode.ts\nconst collation$9 = { type: 0 };\nvar ScalarNode = class extends AbstractNode {\n\treferencedFields;\n\treferencedOuterFields;\n\tisSynchronous;\n\tconstructor(referencedFields, referencedOuterFields, isSynchronous) {\n\t\tsuper(isSynchronous);\n\t\tthis.referencedFields = referencedFields;\n\t\tthis.referencedOuterFields = referencedOuterFields;\n\t\tthis.isSynchronous = isSynchronous;\n\t}\n\t/**\n\t* Evaluates the node and all children synchronously. Throws an error if the\n\t* node is not synchronous.\n\t*/\n\tevaluateSync() {\n\t\tconst generator = this.evaluate(void 0, void 0);\n\t\treturn evaluateSync(generator);\n\t}\n\t/**\n\t* Evaluates the node and all children asynchronously.\n\t*/\n\tevaluateAsync() {\n\t\tconst generator = this.evaluate(void 0, void 0);\n\t\treturn evaluateAsync(generator);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarCase.ts\nconst collation$8 = { type: 0 };\nvar CaseCondition = class {\n\twhen;\n\tthen;\n\tconstructor(when, then) {\n\t\tthis.when = when;\n\t\tthis.then = then;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"CaseCondition\", this.when, this.then);\n\t}\n};\nvar ScalarCase = class ScalarCase extends ScalarNode {\n\tinput;\n\tconditions;\n\totherwise;\n\tdefinition = {\n\t\ttype: \"unknown\",\n\t\tisNullable: true\n\t};\n\tconstructor(input, conditions, otherwise) {\n\t\tconst referencedFields = new Fields();\n\t\tconst referencedOuterFields = new Fields();\n\t\tlet isSynchronous = true;\n\t\tif (input) {\n\t\t\treferencedFields.merge(input.referencedFields);\n\t\t\treferencedOuterFields.merge(input.referencedOuterFields);\n\t\t\tisSynchronous &&= input.isSynchronous;\n\t\t}\n\t\tfor (const { when, then } of conditions) {\n\t\t\treferencedFields.merge(when.referencedFields);\n\t\t\treferencedOuterFields.merge(when.referencedOuterFields);\n\t\t\tisSynchronous &&= when.isSynchronous;\n\t\t\treferencedFields.merge(then.referencedFields);\n\t\t\treferencedOuterFields.merge(then.referencedOuterFields);\n\t\t\tisSynchronous &&= then.isSynchronous;\n\t\t}\n\t\tif (otherwise) {\n\t\t\treferencedFields.merge(otherwise.referencedFields);\n\t\t\treferencedOuterFields.merge(otherwise.referencedOuterFields);\n\t\t\tisSynchronous &&= otherwise.isSynchronous;\n\t\t}\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.input = input;\n\t\tthis.conditions = conditions;\n\t\tthis.otherwise = otherwise;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarCase\", this.input, ...this.conditions, this.otherwise);\n\t}\n\toptimize(optimizer) {\n\t\tthis.input?.optimize(optimizer);\n\t\tfor (const condition of this.conditions) {\n\t\t\tcondition.when.optimize(optimizer);\n\t\t\tcondition.then.optimize(optimizer);\n\t\t}\n\t\tthis.otherwise?.optimize(optimizer);\n\t\treturn new Cost(0);\n\t}\n\tgetOptimized() {\n\t\tconst input = this.input?.getOptimized();\n\t\tconst conditions = this.conditions.map((condition) => {\n\t\t\tconst when = condition.when.getOptimized();\n\t\t\tconst then = condition.then.getOptimized();\n\t\t\treturn new CaseCondition(when, then);\n\t\t});\n\t\tconst otherwise = this.otherwise?.getOptimized();\n\t\treturn new ScalarCase(input, conditions, otherwise);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { input, conditions, otherwise } = yield* evaluateObject({\n\t\t\tinput: this.input?.evaluate(context, tuple) ?? null,\n\t\t\tconditions: evaluateArray(this.conditions.map((condition) => evaluateObject({\n\t\t\t\twhen: condition.when.evaluate(context, tuple),\n\t\t\t\tthen: condition.then.evaluate(context, tuple)\n\t\t\t}))),\n\t\t\totherwise: this.otherwise?.evaluate(context, tuple) ?? null\n\t\t});\n\t\tif (this.input) {\n\t\t\tfor (const { when, then } of conditions) if (DatabaseValue.equal(input, when, collation$8)) return then;\n\t\t} else for (const { when, then } of conditions) if (valueToBoolean(when)) return then;\n\t\treturn otherwise;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Builder.ts\n/**\n* The builder creates the initial normalized query plan for a query. While\n* doing that, it populates the memo.\n*\n* Like programming languages, SQL has a concept of \"scope\". The builder is\n* responsible for creating the correct scope for each part in the query.\n*\n* For example, in the following query:\n* ```\n* SELECT articles.title AS title, authors.name AS author\n* FROM articles JOIN authors ON articles.author_id = authors.id\n* ORDER BY author, title;\n* ```\n*\n* The builder will start with the `FROM` clause. It builds the left and right\n* side of the join, and creates a scope for each of the two collections. The\n* fields of both scopes are added to the \"from\" scope. This scope is then used\n* to resolve fields in the `ON` clause of the join.\n*\n* The builder continues with the `SELECT` clause, and creates a new scope for\n* the projection. Because the \"from\" scope is the parent, all fields of it are\n* also available in the \"projection\" scope. Every field in the `SELECT` clause is\n* added to the \"projection\" scope, which is then used to build the `ORDER BY`\n* clause.\n*/\nvar Builder = class {\n\tnormalizer;\n\tquery;\n\tlocale;\n\tcollectionId = 0;\n\tindexId = 0;\n\tfieldId = 0;\n\t/**\n\t* A stack of the subqueries that are currently being built. We use this to\n\t* calculate fields that come from the enclosing scope or from inside the\n\t* subquery.\n\t*/\n\tsubqueries = [];\n\tconstructor(normalizer, query, locale) {\n\t\tthis.normalizer = normalizer;\n\t\tthis.query = query;\n\t\tthis.locale = locale;\n\t}\n\tbuild() {\n\t\tconst inScope = new Scope();\n\t\treturn this.buildQuery(inScope, this.query);\n\t}\n\tbuildQuery(inScope, query) {\n\t\tconst select = {\n\t\t\ttype: \"Select\",\n\t\t\t...query\n\t\t};\n\t\treturn this.buildSelect(inScope, select);\n\t}\n\tbuildSelect(inScope, select) {\n\t\tconst fromScope = this.buildFrom(inScope, select.from);\n\t\tconst defaultOrdering = fromScope.getRequiredOrdering();\n\t\tif (select.where) {\n\t\t\tconst input = fromScope.takeNode();\n\t\t\tconst predicate = this.buildExpression(fromScope, select.where);\n\t\t\tconst node = this.normalizer.newRelationalFilter(input, predicate);\n\t\t\tfromScope.setNode(node);\n\t\t}\n\t\tconst orderProjections = [];\n\t\tconst orderFields = new Fields();\n\t\tlet ordering;\n\t\tif (select.orderBy) {\n\t\t\tordering = new Ordering();\n\t\t\tfor (const order of select.orderBy) if (order.type === \"Identifier\") {\n\t\t\t\tconst scopeField = fromScope.resolveField(order.name, order.collection);\n\t\t\t\tif (isUndefined(scopeField)) continue;\n\t\t\t\torderFields.add(scopeField.field);\n\t\t\t\tconst orderingField = new OrderingField(scopeField.field, order.direction);\n\t\t\t\tordering.push(orderingField);\n\t\t\t} else {\n\t\t\t\tconst expression = this.buildExpression(fromScope, order);\n\t\t\t\tconst fieldId = FieldId(this.fieldId++);\n\t\t\t\tconst field = new FieldMetadata(fieldId, void 0, expression.definition, void 0);\n\t\t\t\tconst projection = new ProjectionField(expression, field);\n\t\t\t\torderProjections.push(projection);\n\t\t\t\tconst orderingField = new OrderingField(field, order.direction);\n\t\t\t\tordering.push(orderingField);\n\t\t\t}\n\t\t\tordering.merge(defaultOrdering);\n\t\t} else ordering = defaultOrdering;\n\t\tconst projectionScope = this.buildSelectList(fromScope, select.select, orderFields, orderProjections);\n\t\tprojectionScope.setOrdering(ordering);\n\t\tif (select.offset) {\n\t\t\tconst input = projectionScope.takeNode();\n\t\t\tconst offset = this.buildExpression(inScope, select.offset);\n\t\t\tconst node = this.normalizer.newRelationalOffset(input, offset, ordering);\n\t\t\tprojectionScope.setNode(node);\n\t\t}\n\t\tif (select.limit) {\n\t\t\tconst input = projectionScope.takeNode();\n\t\t\tconst limit = this.buildExpression(inScope, select.limit);\n\t\t\tconst node = this.normalizer.newRelationalLimit(input, limit, ordering);\n\t\t\tprojectionScope.setNode(node);\n\t\t}\n\t\treturn projectionScope;\n\t}\n\tbuildSelectList(inScope, selects, orderFields, orderProjections) {\n\t\tconst outScope = inScope.push();\n\t\tconst passthrough = new Fields(orderFields);\n\t\tconst projections = [...orderProjections];\n\t\tfor (const select of selects) if (select.type === \"Identifier\") {\n\t\t\tconst scopeField = inScope.resolveField(select.name, select.collection);\n\t\t\tif (isUndefined(scopeField)) continue;\n\t\t\tpassthrough.add(scopeField.field);\n\t\t\toutScope.addField({\n\t\t\t\t...scopeField,\n\t\t\t\tname: select.alias ?? scopeField.name\n\t\t\t});\n\t\t} else {\n\t\t\tconst expression = this.buildExpression(inScope, select);\n\t\t\tassert$1(select.alias, \"Subqueries should have an alias\");\n\t\t\tconst fieldId = FieldId(this.fieldId++);\n\t\t\tconst fieldName = select.alias;\n\t\t\tconst field = new FieldMetadata(fieldId, fieldName, expression.definition, void 0);\n\t\t\tconst projection = new ProjectionField(expression, field);\n\t\t\tprojections.push(projection);\n\t\t\toutScope.addField({\n\t\t\t\tfield,\n\t\t\t\tname: fieldName\n\t\t\t});\n\t\t}\n\t\tconst input = inScope.takeNode();\n\t\tconst node = this.normalizer.newRelationalProject(input, projections, passthrough);\n\t\toutScope.setNode(node);\n\t\treturn outScope;\n\t}\n\tbuildFrom(inScope, from) {\n\t\tswitch (from.type) {\n\t\t\tcase \"Collection\": return this.buildCollection(inScope, from);\n\t\t\tcase \"LeftJoin\": return this.buildJoin(inScope, from);\n\t\t\tdefault: assertNever$1(from, \"Unsupported from type\");\n\t\t}\n\t}\n\tbuildCollection(inScope, from) {\n\t\tconst outScope = inScope.push();\n\t\tconst collectionData = getCollectionForLocale(from.data, this.locale);\n\t\tconst collectionName = from.alias;\n\t\tconst collectionId = CollectionId(this.collectionId++);\n\t\tconst collection = new CollectionMetadata(collectionId, collectionName, collectionData);\n\t\tfor (const [fieldName, definition] of Object.entries(collectionData.schema)) {\n\t\t\tconst fieldId = FieldId(this.fieldId++);\n\t\t\tconst field = new FieldMetadata(fieldId, fieldName, definition, collection);\n\t\t\toutScope.addField({\n\t\t\t\tfield,\n\t\t\t\tname: fieldName,\n\t\t\t\tcollectionName\n\t\t\t});\n\t\t\tcollection.addNamedField(fieldName, field);\n\t\t}\n\t\t{\n\t\t\tconst definition = {\n\t\t\t\ttype: \"number\",\n\t\t\t\tisNullable: false\n\t\t\t};\n\t\t\tconst fieldId = FieldId(this.fieldId++);\n\t\t\tconst field = new FieldMetadata(fieldId, VIRTUAL_INDEX_FIELD, definition, collection);\n\t\t\toutScope.addField({\n\t\t\t\tfield,\n\t\t\t\tname: VIRTUAL_INDEX_FIELD,\n\t\t\t\tcollectionName\n\t\t\t});\n\t\t\tconst ordering = new Ordering();\n\t\t\tconst orderingField = new OrderingField(field);\n\t\t\tordering.push(orderingField);\n\t\t\toutScope.setOrdering(ordering);\n\t\t}\n\t\tfor (const indexData of collectionData.indexes) {\n\t\t\tconst lookupNodes = [];\n\t\t\tfor (const expression of indexData.fields) {\n\t\t\t\tconst node = this.buildExpression(outScope, expression);\n\t\t\t\tlookupNodes.push(node);\n\t\t\t}\n\t\t\tlet constraint;\n\t\t\tif (indexData.where) constraint = this.buildExpression(outScope, indexData.where);\n\t\t\tconst ordering = new Ordering();\n\t\t\tconst indexId = IndexId(this.indexId++);\n\t\t\tconst index = new IndexMetadata(indexId, indexData, collection, lookupNodes, constraint, ordering);\n\t\t\tcollection.indexes.add(index);\n\t\t}\n\t\tconst node = this.normalizer.newRelationalScan(collection);\n\t\toutScope.setNode(node);\n\t\treturn outScope;\n\t}\n\tbuildJoin(inScope, from) {\n\t\tconst leftScope = this.buildFrom(inScope, from.left);\n\t\tconst rightScope = this.buildFrom(inScope, from.right);\n\t\tconst ordering = new Ordering();\n\t\tconst leftOrdering = leftScope.getRequiredOrdering();\n\t\tordering.merge(leftOrdering);\n\t\tconst rightOrdering = rightScope.getRequiredOrdering();\n\t\tordering.merge(rightOrdering);\n\t\tconst outScope = inScope.push();\n\t\toutScope.addFieldsFromScope(leftScope);\n\t\toutScope.addFieldsFromScope(rightScope);\n\t\toutScope.setOrdering(ordering);\n\t\tconst constraint = this.buildExpression(outScope, from.constraint);\n\t\tconst left = leftScope.takeNode();\n\t\tconst right = rightScope.takeNode();\n\t\tlet node;\n\t\tswitch (from.type) {\n\t\t\tcase \"LeftJoin\":\n\t\t\t\tnode = this.normalizer.newRelationalLeftJoin(left, right, constraint);\n\t\t\t\tbreak;\n\t\t\tdefault: assertNever$1(from.type, \"Unsupported join type\");\n\t\t}\n\t\toutScope.setNode(node);\n\t\treturn outScope;\n\t}\n\tbuildExpression(inScope, expression) {\n\t\tswitch (expression.type) {\n\t\t\tcase \"Identifier\": return this.buildIdentifier(inScope, expression);\n\t\t\tcase \"LiteralValue\": return this.buildLiteralValue(expression);\n\t\t\tcase \"FunctionCall\": return this.buildFunctionCall(inScope, expression);\n\t\t\tcase \"Case\": return this.buildCase(inScope, expression);\n\t\t\tcase \"UnaryOperation\": return this.buildUnaryOperation(inScope, expression);\n\t\t\tcase \"BinaryOperation\": return this.buildBinaryOperation(inScope, expression);\n\t\t\tcase \"TypeCast\": return this.buildTypeCast(inScope, expression);\n\t\t\tcase \"Select\": throw new Error(\"Subqueries are only supported inside subquery function calls\");\n\t\t\tdefault: assertNever$1(expression, \"Unsupported expression\");\n\t\t}\n\t}\n\tbuildIdentifier(inScope, expression) {\n\t\tconst scopeField = inScope.resolveField(expression.name, expression.collection);\n\t\tif (scopeField) {\n\t\t\tlet isOuterField = false;\n\t\t\tfor (const subquery of this.subqueries) if (isOuterField) subquery.referencedOuterFields.add(scopeField.field);\n\t\t\telse {\n\t\t\t\tisOuterField = subquery.inScope.has(scopeField);\n\t\t\t\tif (isOuterField) subquery.referencedFields.add(scopeField.field);\n\t\t\t}\n\t\t\treturn this.normalizer.newScalarVariable(scopeField.field, isOuterField);\n\t\t}\n\t\treturn this.normalizer.newScalarConstant(unknownDefinition, null);\n\t}\n\tbuildLiteralValue(expression) {\n\t\tconst value = DatabaseValue.parse(expression.value);\n\t\treturn this.normalizer.newScalarConstant(unknownDefinition, value);\n\t}\n\tbuildFunctionCall(inScope, expression) {\n\t\tconst getArgument = (index) => {\n\t\t\tconst argument = expression.arguments[index];\n\t\t\tassert$1(argument, \"Missing argument\");\n\t\t\treturn this.buildExpression(inScope, argument);\n\t\t};\n\t\tconst functionName = expression.functionName;\n\t\tswitch (functionName) {\n\t\t\tcase \"CONTAINS\": {\n\t\t\t\tconst source = getArgument(0);\n\t\t\t\tconst target = getArgument(1);\n\t\t\t\treturn this.normalizer.newScalarContains(source, target);\n\t\t\t}\n\t\t\tcase \"STARTS_WITH\": {\n\t\t\t\tconst source = getArgument(0);\n\t\t\t\tconst target = getArgument(1);\n\t\t\t\treturn this.normalizer.newScalarStartsWith(source, target);\n\t\t\t}\n\t\t\tcase \"ENDS_WITH\": {\n\t\t\t\tconst source = getArgument(0);\n\t\t\t\tconst target = getArgument(1);\n\t\t\t\treturn this.normalizer.newScalarEndsWith(source, target);\n\t\t\t}\n\t\t\tcase \"LENGTH\": {\n\t\t\t\tconst array = getArgument(0);\n\t\t\t\treturn this.normalizer.newScalarLength(array);\n\t\t\t}\n\t\t\tcase \"INDEX_OF\": {\n\t\t\t\tconst source = getArgument(0);\n\t\t\t\tconst target = getArgument(1);\n\t\t\t\treturn this.normalizer.newScalarIndexOf(source, target);\n\t\t\t}\n\t\t\tcase \"ARRAY\": {\n\t\t\t\tconst subquery = expression.arguments[0];\n\t\t\t\tassert$1(subquery, \"Missing argument\");\n\t\t\t\tassert$1(subquery.type === \"Select\", \"Subqueries require a select expression\");\n\t\t\t\treturn this.buildSubqueryArray(inScope, subquery);\n\t\t\t}\n\t\t\tcase \"FLAT_ARRAY\": {\n\t\t\t\tconst subquery = expression.arguments[0];\n\t\t\t\tassert$1(subquery, \"Missing argument\");\n\t\t\t\tassert$1(subquery.type === \"Select\", \"Subqueries require a select expression\");\n\t\t\t\treturn this.buildSubqueryFlatArray(inScope, subquery);\n\t\t\t}\n\t\t\tcase \"INTERSECT\": {\n\t\t\t\tconst source = getArgument(0);\n\t\t\t\tconst target = getArgument(1);\n\t\t\t\treturn this.normalizer.newScalarIntersection(source, target);\n\t\t\t}\n\t\t\tdefault: assertNever$1(functionName, \"Unsupported function name\");\n\t\t}\n\t}\n\tbuildSubqueryArray(inScope, expression) {\n\t\ttry {\n\t\t\tconst subquery = new Subquery(inScope);\n\t\t\tthis.subqueries.push(subquery);\n\t\t\tconst outScope = this.buildSelect(inScope, expression);\n\t\t\tconst input = outScope.takeNode();\n\t\t\tconst namedFields = outScope.getNamedFields();\n\t\t\tconst ordering = outScope.getRequiredOrdering();\n\t\t\tconst referencedFields = subquery.referencedFields;\n\t\t\tconst referencedOuterFields = subquery.referencedOuterFields;\n\t\t\treturn this.normalizer.newScalarArray(input, namedFields, ordering, referencedFields, referencedOuterFields);\n\t\t} finally {\n\t\t\tthis.subqueries.pop();\n\t\t}\n\t}\n\tbuildSubqueryFlatArray(inScope, expression) {\n\t\ttry {\n\t\t\tconst subquery = new Subquery(inScope);\n\t\t\tthis.subqueries.push(subquery);\n\t\t\tconst outScope = this.buildSelect(inScope, expression);\n\t\t\tconst input = outScope.takeNode();\n\t\t\tconst field = outScope.getSingleField();\n\t\t\tconst ordering = outScope.getRequiredOrdering();\n\t\t\tconst referencedFields = subquery.referencedFields;\n\t\t\tconst referencedOuterFields = subquery.referencedOuterFields;\n\t\t\treturn this.normalizer.newScalarFlatArray(input, field, ordering, referencedFields, referencedOuterFields);\n\t\t} finally {\n\t\t\tthis.subqueries.pop();\n\t\t}\n\t}\n\tbuildCase(inScope, expression) {\n\t\tlet input;\n\t\tif (expression.value) input = this.buildExpression(inScope, expression.value);\n\t\tconst conditions = expression.conditions.map((condition) => {\n\t\t\tconst when = this.buildExpression(inScope, condition.when);\n\t\t\tconst then = this.buildExpression(inScope, condition.then);\n\t\t\treturn new CaseCondition(when, then);\n\t\t});\n\t\tlet otherwise;\n\t\tif (expression.else) otherwise = this.buildExpression(inScope, expression.else);\n\t\treturn this.normalizer.newScalarCase(input, conditions, otherwise);\n\t}\n\tbuildUnaryOperation(inScope, expression) {\n\t\tconst input = this.buildExpression(inScope, expression.value);\n\t\tswitch (expression.operator) {\n\t\t\tcase \"not\": return this.normalizer.newScalarNot(input);\n\t\t\tdefault: assertNever$1(expression.operator, \"Unsupported unary operator\");\n\t\t}\n\t}\n\tbuildBinaryOperation(inScope, expression) {\n\t\tconst left = this.buildExpression(inScope, expression.left);\n\t\tconst right = this.buildExpression(inScope, expression.right);\n\t\tswitch (expression.operator) {\n\t\t\tcase \"and\": return this.normalizer.newScalarAnd(left, right);\n\t\t\tcase \"or\": return this.normalizer.newScalarOr(left, right);\n\t\t\tcase \"==\": return this.normalizer.newScalarEquals(left, right);\n\t\t\tcase \"!=\": return this.normalizer.newScalarNotEquals(left, right);\n\t\t\tcase \"<\": return this.normalizer.newScalarLessThan(left, right);\n\t\t\tcase \"<=\": return this.normalizer.newScalarLessThanOrEqual(left, right);\n\t\t\tcase \">\": return this.normalizer.newScalarGreaterThan(left, right);\n\t\t\tcase \">=\": return this.normalizer.newScalarGreaterThanOrEqual(left, right);\n\t\t\tcase \"in\": return this.normalizer.newScalarIn(left, right);\n\t\t\tdefault: assertNever$1(expression.operator, \"Unsupported binary operator\");\n\t\t}\n\t}\n\tbuildTypeCast(inScope, expression) {\n\t\tconst input = this.buildExpression(inScope, expression.value);\n\t\tswitch (expression.dataType) {\n\t\t\tcase \"BOOLEAN\": {\n\t\t\t\tconst definition = {\n\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t\tisNullable: true\n\t\t\t\t};\n\t\t\t\treturn this.normalizer.newScalarCast(input, definition);\n\t\t\t}\n\t\t\tcase \"DATE\": {\n\t\t\t\tconst definition = {\n\t\t\t\t\ttype: \"date\",\n\t\t\t\t\tisNullable: true\n\t\t\t\t};\n\t\t\t\treturn this.normalizer.newScalarCast(input, definition);\n\t\t\t}\n\t\t\tcase \"NUMBER\": {\n\t\t\t\tconst definition = {\n\t\t\t\t\ttype: \"number\",\n\t\t\t\t\tisNullable: true\n\t\t\t\t};\n\t\t\t\treturn this.normalizer.newScalarCast(input, definition);\n\t\t\t}\n\t\t\tcase \"STRING\": {\n\t\t\t\tconst definition = {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tisNullable: true\n\t\t\t\t};\n\t\t\t\treturn this.normalizer.newScalarCast(input, definition);\n\t\t\t}\n\t\t\tdefault: throw new Error(\"Unsupported data type\");\n\t\t}\n\t}\n};\nvar Subquery = class {\n\tinScope;\n\t/**\n\t* A list of fields that are referenced from `inScope` of the subquery.\n\t*\n\t* To evaluate a subquery, we need to know which fields are coming from\n\t* outside the subquery and which fields are coming from inside the\n\t* subquery. For example, in the following query:\n\t*\n\t* ```\n\t* SELECT title, (\n\t*     SELECT name FROM articles\n\t*     WHERE id = author_id\n\t* ) AS author FROM articles\n\t* ```\n\t*\n\t* The `name` and `id` fields are coming from the inside the subquery, but\n\t* the `author_id` field is coming from the parent scope. We need to resolve\n\t* `author_id` before we can evaluate the subquery.\n\t*/\n\treferencedFields = new Fields();\n\t/**\n\t* A list of fields that are referenced from the `inScope` of the parent\n\t* subquery.\n\t*/\n\treferencedOuterFields = new Fields();\n\tconstructor(inScope) {\n\t\tthis.inScope = inScope;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/relational/RelationalFilter.ts\nvar RelationalFilter = class RelationalFilter extends RelationalNode {\n\tinput;\n\tpredicate;\n\tinputGroup;\n\tconstructor(input, predicate) {\n\t\tsuper(input.isSynchronous && predicate.isSynchronous);\n\t\tthis.input = input;\n\t\tthis.predicate = predicate;\n\t\tthis.inputGroup = input.getGroup();\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"RelationalFilter\", this.inputGroup.id, this.predicate);\n\t}\n\tgetOutputFields() {\n\t\treturn this.inputGroup.relational.outputFields;\n\t}\n\tcanProvideOrdering() {\n\t\treturn true;\n\t}\n\tcanProvideResolvedFields() {\n\t\treturn true;\n\t}\n\tgetInputRequiredProps(required) {\n\t\tconst resolvedFields = new Fields(required.resolvedFields);\n\t\tresolvedFields.merge(this.predicate.referencedFields);\n\t\treturn new RequiredProps(required.ordering, resolvedFields);\n\t}\n\toptimize(optimizer, required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst inputCost = optimizer.optimizeGroup(this.inputGroup, inputRequired);\n\t\tconst predicateCost = this.predicate.optimize(optimizer);\n\t\treturn new Cost(0).add(Cost.max(inputCost, predicateCost));\n\t}\n\tgetOptimized(required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst input = this.inputGroup.getOptimized(inputRequired);\n\t\tconst predicate = this.predicate.getOptimized();\n\t\treturn new RelationalFilter(input, predicate);\n\t}\n\t*evaluate(context) {\n\t\tconst input = yield* this.input.evaluate(context);\n\t\tconst predicates = yield* evaluateArray(input.tuples.map((tuple) => {\n\t\t\treturn this.predicate.evaluate(context, tuple);\n\t\t}));\n\t\treturn input.filter((_, index) => {\n\t\t\tconst predicate = predicates[index] ?? null;\n\t\t\treturn valueToBoolean(predicate);\n\t\t});\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/relational/RelationalIndexLookup.ts\nvar RelationalIndexLookup = class RelationalIndexLookup extends RelationalNode {\n\tindex;\n\tquery;\n\tconstructor(index, query) {\n\t\tsuper(false);\n\t\tthis.index = index;\n\t\tthis.query = query;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"RelationalIndexLookup\", this.index.id, ...this.query);\n\t}\n\tgetOutputFields() {\n\t\treturn this.index.collection.fields;\n\t}\n\tcanProvideOrdering(ordering) {\n\t\treturn ordering.equals(this.index.ordering);\n\t}\n\tcanProvideResolvedFields(resolvedFields) {\n\t\treturn resolvedFields.subsetOf(this.index.resolvedFields);\n\t}\n\toptimize() {\n\t\tconst isFullScan = this.query.every((lookup) => lookup.type === \"All\");\n\t\treturn Cost.estimate(1, isFullScan ? 100 * KB : 50 * KB);\n\t}\n\tgetOptimized() {\n\t\treturn new RelationalIndexLookup(this.index, this.query);\n\t}\n\t*evaluate() {\n\t\tconst index = this.index;\n\t\tconst collection = index.collection;\n\t\tconst outputFields = this.getOutputFields();\n\t\tconst items = yield index.data.lookupItems(this.query, getEvaluationContextPriority());\n\t\tconst priority = getEvaluationContextPriority();\n\t\tconst tuples = [];\n\t\tfor (const item of items) {\n\t\t\tconst yieldPromise = yieldToMainDuringEvaluation(priority);\n\t\t\tif (yieldPromise) yield yieldPromise;\n\t\t\tconst tuple = new Tuple();\n\t\t\tfor (const field of index.resolvedFields) {\n\t\t\t\tconst value = field.getValue(item);\n\t\t\t\ttuple.addPointer(collection, item.pointer);\n\t\t\t\ttuple.addValue(field, value);\n\t\t\t}\n\t\t\ttuples.push(tuple);\n\t\t}\n\t\treturn new Relation(outputFields, tuples);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/relational/RelationalIntersection.ts\nvar RelationalIntersection = class RelationalIntersection extends RelationalNode {\n\tleft;\n\tright;\n\tleftGroup;\n\trightGroup;\n\tconstructor(left, right) {\n\t\tsuper(left.isSynchronous && right.isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.leftGroup = left.getGroup();\n\t\tthis.rightGroup = right.getGroup();\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"RelationalIntersection\", this.leftGroup.id, this.rightGroup.id);\n\t}\n\tgetOutputFields() {\n\t\tconst outputFields = new Fields();\n\t\tconst leftOutputFields = this.leftGroup.relational.outputFields;\n\t\tconst rightOutputFields = this.rightGroup.relational.outputFields;\n\t\tfor (const field of leftOutputFields) if (rightOutputFields.has(field)) outputFields.add(field);\n\t\treturn outputFields;\n\t}\n\tcanProvideOrdering() {\n\t\treturn false;\n\t}\n\tcanProvideResolvedFields() {\n\t\treturn true;\n\t}\n\tgetChildRequiredProps(required) {\n\t\tconst ordering = new Ordering();\n\t\treturn new RequiredProps(ordering, required.resolvedFields);\n\t}\n\toptimize(optimizer, required) {\n\t\tconst leftRequired = this.getChildRequiredProps(required);\n\t\tconst leftCost = optimizer.optimizeGroup(this.leftGroup, leftRequired);\n\t\tconst rightRequired = this.getChildRequiredProps(required);\n\t\tconst rightCost = optimizer.optimizeGroup(this.rightGroup, rightRequired);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized(required) {\n\t\tconst leftRequired = this.getChildRequiredProps(required);\n\t\tconst left = this.leftGroup.getOptimized(leftRequired);\n\t\tconst rightRequired = this.getChildRequiredProps(required);\n\t\tconst right = this.rightGroup.getOptimized(rightRequired);\n\t\treturn new RelationalIntersection(left, right);\n\t}\n\t*evaluate(context) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context),\n\t\t\tright: this.right.evaluate(context)\n\t\t});\n\t\treturn left.intersection(right);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/relational/RelationalScan.ts\nvar RelationalScan = class RelationalScan extends RelationalNode {\n\tcollection;\n\tconstructor(collection) {\n\t\tsuper(false);\n\t\tthis.collection = collection;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"RelationalScan\", this.collection.id);\n\t}\n\tgetOutputFields() {\n\t\treturn this.collection.fields;\n\t}\n\tcanProvideOrdering() {\n\t\treturn false;\n\t}\n\tcanProvideResolvedFields(resolvedFields) {\n\t\treturn resolvedFields.subsetOf(this.collection.fields);\n\t}\n\toptimize() {\n\t\treturn Cost.estimate(1, 200 * KB);\n\t}\n\tgetOptimized() {\n\t\treturn new RelationalScan(this.collection);\n\t}\n\t*evaluate() {\n\t\tconst collection = this.collection;\n\t\tconst outputFields = this.getOutputFields();\n\t\tconst items = yield collection.data.scanItems(getEvaluationContextPriority());\n\t\tconst priority = getEvaluationContextPriority();\n\t\tconst tuples = [];\n\t\tfor (const item of items) {\n\t\t\tconst yieldPromise = yieldToMainDuringEvaluation(priority);\n\t\t\tif (yieldPromise) yield yieldPromise;\n\t\t\tconst tuple = new Tuple();\n\t\t\tfor (const field of outputFields) {\n\t\t\t\tconst value = field.getValue(item);\n\t\t\t\ttuple.addPointer(collection, item.pointer);\n\t\t\t\ttuple.addValue(field, value);\n\t\t\t}\n\t\t\ttuples.push(tuple);\n\t\t}\n\t\treturn new Relation(outputFields, tuples);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/relational/RelationalUnion.ts\nvar RelationalUnion = class RelationalUnion extends RelationalNode {\n\tleft;\n\tright;\n\tleftGroup;\n\trightGroup;\n\tconstructor(left, right) {\n\t\tsuper(left.isSynchronous && right.isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.leftGroup = left.getGroup();\n\t\tthis.rightGroup = right.getGroup();\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"RelationalUnion\", this.leftGroup.id, this.rightGroup.id);\n\t}\n\tgetOutputFields() {\n\t\tconst outputFields = new Fields();\n\t\tconst leftOutputFields = this.leftGroup.relational.outputFields;\n\t\tconst rightOutputFields = this.rightGroup.relational.outputFields;\n\t\tfor (const field of leftOutputFields) if (rightOutputFields.has(field)) outputFields.add(field);\n\t\treturn outputFields;\n\t}\n\tcanProvideOrdering() {\n\t\treturn false;\n\t}\n\tcanProvideResolvedFields() {\n\t\treturn true;\n\t}\n\tgetChildRequiredProps(required) {\n\t\tconst ordering = new Ordering();\n\t\treturn new RequiredProps(ordering, required.resolvedFields);\n\t}\n\toptimize(optimizer, required) {\n\t\tconst leftRequired = this.getChildRequiredProps(required);\n\t\tconst leftCost = optimizer.optimizeGroup(this.leftGroup, leftRequired);\n\t\tconst rightRequired = this.getChildRequiredProps(required);\n\t\tconst rightCost = optimizer.optimizeGroup(this.rightGroup, rightRequired);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized(required) {\n\t\tconst leftRequired = this.getChildRequiredProps(required);\n\t\tconst left = this.leftGroup.getOptimized(leftRequired);\n\t\tconst rightRequired = this.getChildRequiredProps(required);\n\t\tconst right = this.rightGroup.getOptimized(rightRequired);\n\t\treturn new RelationalUnion(left, right);\n\t}\n\t*evaluate(context) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context),\n\t\t\tright: this.right.evaluate(context)\n\t\t});\n\t\treturn left.union(right);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarAnd.ts\nvar ScalarAnd = class ScalarAnd extends ScalarNode {\n\tleft;\n\tright;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(left, right) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(left.referencedFields);\n\t\treferencedFields.merge(right.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(left.referencedOuterFields);\n\t\treferencedOuterFields.merge(right.referencedOuterFields);\n\t\tconst isSynchronous = left.isSynchronous && right.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarAnd\", this.left, this.right);\n\t}\n\toptimize(optimizer) {\n\t\tconst leftCost = this.left.optimize(optimizer);\n\t\tconst rightCost = this.right.optimize(optimizer);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized() {\n\t\tconst left = this.left.getOptimized();\n\t\tconst right = this.right.getOptimized();\n\t\treturn new ScalarAnd(left, right);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context, tuple),\n\t\t\tright: this.right.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: valueToBoolean(left) && valueToBoolean(right)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarConstant.ts\nvar ScalarConstant = class extends ScalarNode {\n\tdefinition;\n\tvalue;\n\tconstructor(definition, value) {\n\t\tconst referencedFields = new Fields();\n\t\tconst referencedOuterFields = new Fields();\n\t\tsuper(referencedFields, referencedOuterFields, true);\n\t\tthis.definition = definition;\n\t\tthis.value = value;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarConstant\", this.definition, this.value);\n\t}\n\toptimize() {\n\t\treturn new Cost(0);\n\t}\n\tgetOptimized() {\n\t\treturn this;\n\t}\n\t*evaluate() {\n\t\treturn this.value;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarContains.ts\nconst collation$7 = { type: 0 };\nvar ScalarContains = class ScalarContains extends ScalarNode {\n\tsource;\n\ttarget;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(source, target) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(source.referencedFields);\n\t\treferencedFields.merge(target.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(source.referencedOuterFields);\n\t\treferencedOuterFields.merge(target.referencedOuterFields);\n\t\tconst isSynchronous = source.isSynchronous && target.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.source = source;\n\t\tthis.target = target;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarContains\", this.source, this.target);\n\t}\n\toptimize(optimizer) {\n\t\tconst sourceCost = this.source.optimize(optimizer);\n\t\tconst targetCost = this.target.optimize(optimizer);\n\t\treturn Cost.max(sourceCost, targetCost);\n\t}\n\tgetOptimized() {\n\t\tconst source = this.source.getOptimized();\n\t\tconst target = this.target.getOptimized();\n\t\treturn new ScalarContains(source, target);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { source, target } = yield* evaluateObject({\n\t\t\tsource: this.source.evaluate(context, tuple),\n\t\t\ttarget: this.target.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: DatabaseValue.contains(source, target, collation$7)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarEndsWith.ts\nconst collation$6 = { type: 0 };\nvar ScalarEndsWith = class ScalarEndsWith extends ScalarNode {\n\tsource;\n\ttarget;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(source, target) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(source.referencedFields);\n\t\treferencedFields.merge(target.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(source.referencedOuterFields);\n\t\treferencedOuterFields.merge(target.referencedOuterFields);\n\t\tconst isSynchronous = source.isSynchronous && target.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.source = source;\n\t\tthis.target = target;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarEndsWith\", this.source, this.target);\n\t}\n\toptimize(optimizer) {\n\t\tconst sourceCost = this.source.optimize(optimizer);\n\t\tconst targetCost = this.target.optimize(optimizer);\n\t\treturn Cost.max(sourceCost, targetCost);\n\t}\n\tgetOptimized() {\n\t\tconst source = this.source.getOptimized();\n\t\tconst target = this.target.getOptimized();\n\t\treturn new ScalarEndsWith(source, target);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { source, target } = yield* evaluateObject({\n\t\t\tsource: this.source.evaluate(context, tuple),\n\t\t\ttarget: this.target.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: DatabaseValue.endsWith(source, target, collation$6)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarEquals.ts\nvar ScalarEquals = class ScalarEquals extends ScalarNode {\n\tleft;\n\tright;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(left, right) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(left.referencedFields);\n\t\treferencedFields.merge(right.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(left.referencedOuterFields);\n\t\treferencedOuterFields.merge(right.referencedOuterFields);\n\t\tconst isSynchronous = left.isSynchronous && right.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarEquals\", this.left, this.right);\n\t}\n\toptimize(optimizer) {\n\t\tconst leftCost = this.left.optimize(optimizer);\n\t\tconst rightCost = this.right.optimize(optimizer);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized() {\n\t\tconst left = this.left.getOptimized();\n\t\tconst right = this.right.getOptimized();\n\t\treturn new ScalarEquals(left, right);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context, tuple),\n\t\t\tright: this.right.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: DatabaseValue.equal(left, right, collation$9)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarGreaterThan.ts\nvar ScalarGreaterThan = class ScalarGreaterThan extends ScalarNode {\n\tleft;\n\tright;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(left, right) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(left.referencedFields);\n\t\treferencedFields.merge(right.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(left.referencedOuterFields);\n\t\treferencedOuterFields.merge(right.referencedOuterFields);\n\t\tconst isSynchronous = left.isSynchronous && right.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarGreaterThan\", this.left, this.right);\n\t}\n\toptimize(optimizer) {\n\t\tconst leftCost = this.left.optimize(optimizer);\n\t\tconst rightCost = this.right.optimize(optimizer);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized() {\n\t\tconst left = this.left.getOptimized();\n\t\tconst right = this.right.getOptimized();\n\t\treturn new ScalarGreaterThan(left, right);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context, tuple),\n\t\t\tright: this.right.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: DatabaseValue.greaterThan(left, right, collation$9)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarGreaterThanOrEqual.ts\nvar ScalarGreaterThanOrEqual = class ScalarGreaterThanOrEqual extends ScalarNode {\n\tleft;\n\tright;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(left, right) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(left.referencedFields);\n\t\treferencedFields.merge(right.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(left.referencedOuterFields);\n\t\treferencedOuterFields.merge(right.referencedOuterFields);\n\t\tconst isSynchronous = left.isSynchronous && right.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarGreaterThanOrEqual\", this.left, this.right);\n\t}\n\toptimize(optimizer) {\n\t\tconst leftCost = this.left.optimize(optimizer);\n\t\tconst rightCost = this.right.optimize(optimizer);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized() {\n\t\tconst left = this.left.getOptimized();\n\t\tconst right = this.right.getOptimized();\n\t\treturn new ScalarGreaterThanOrEqual(left, right);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context, tuple),\n\t\t\tright: this.right.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: DatabaseValue.greaterThanOrEqual(left, right, collation$9)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarLessThan.ts\nvar ScalarLessThan = class ScalarLessThan extends ScalarNode {\n\tleft;\n\tright;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(left, right) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(left.referencedFields);\n\t\treferencedFields.merge(right.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(left.referencedOuterFields);\n\t\treferencedOuterFields.merge(right.referencedOuterFields);\n\t\tconst isSynchronous = left.isSynchronous && right.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarLessThan\", this.left, this.right);\n\t}\n\toptimize(optimizer) {\n\t\tconst leftCost = this.left.optimize(optimizer);\n\t\tconst rightCost = this.right.optimize(optimizer);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized() {\n\t\tconst left = this.left.getOptimized();\n\t\tconst right = this.right.getOptimized();\n\t\treturn new ScalarLessThan(left, right);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context, tuple),\n\t\t\tright: this.right.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: DatabaseValue.lessThan(left, right, collation$9)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarLessThanOrEqual.ts\nvar ScalarLessThanOrEqual = class ScalarLessThanOrEqual extends ScalarNode {\n\tleft;\n\tright;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(left, right) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(left.referencedFields);\n\t\treferencedFields.merge(right.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(left.referencedOuterFields);\n\t\treferencedOuterFields.merge(right.referencedOuterFields);\n\t\tconst isSynchronous = left.isSynchronous && right.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarLessThanOrEqual\", this.left, this.right);\n\t}\n\toptimize(optimizer) {\n\t\tconst leftCost = this.left.optimize(optimizer);\n\t\tconst rightCost = this.right.optimize(optimizer);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized() {\n\t\tconst left = this.left.getOptimized();\n\t\tconst right = this.right.getOptimized();\n\t\treturn new ScalarLessThanOrEqual(left, right);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context, tuple),\n\t\t\tright: this.right.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: DatabaseValue.lessThanOrEqual(left, right, collation$9)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarNotEquals.ts\nvar ScalarNotEquals = class ScalarNotEquals extends ScalarNode {\n\tleft;\n\tright;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(left, right) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(left.referencedFields);\n\t\treferencedFields.merge(right.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(left.referencedOuterFields);\n\t\treferencedOuterFields.merge(right.referencedOuterFields);\n\t\tconst isSynchronous = left.isSynchronous && right.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarNotEquals\", this.left, this.right);\n\t}\n\toptimize(optimizer) {\n\t\tconst leftCost = this.left.optimize(optimizer);\n\t\tconst rightCost = this.right.optimize(optimizer);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized() {\n\t\tconst left = this.left.getOptimized();\n\t\tconst right = this.right.getOptimized();\n\t\treturn new ScalarNotEquals(left, right);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context, tuple),\n\t\t\tright: this.right.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: !DatabaseValue.equal(left, right, collation$9)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarOr.ts\nvar ScalarOr = class ScalarOr extends ScalarNode {\n\tleft;\n\tright;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(left, right) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(left.referencedFields);\n\t\treferencedFields.merge(right.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(left.referencedOuterFields);\n\t\treferencedOuterFields.merge(right.referencedOuterFields);\n\t\tconst isSynchronous = left.isSynchronous && right.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarOr\", this.left, this.right);\n\t}\n\toptimize(optimizer) {\n\t\tconst leftCost = this.left.optimize(optimizer);\n\t\tconst rightCost = this.right.optimize(optimizer);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized() {\n\t\tconst left = this.left.getOptimized();\n\t\tconst right = this.right.getOptimized();\n\t\treturn new ScalarOr(left, right);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context, tuple),\n\t\t\tright: this.right.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: valueToBoolean(left) || valueToBoolean(right)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarStartsWith.ts\nconst collation$5 = { type: 0 };\nvar ScalarStartsWith = class ScalarStartsWith extends ScalarNode {\n\tsource;\n\ttarget;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(source, target) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(source.referencedFields);\n\t\treferencedFields.merge(target.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(source.referencedOuterFields);\n\t\treferencedOuterFields.merge(target.referencedOuterFields);\n\t\tconst isSynchronous = source.isSynchronous && target.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.source = source;\n\t\tthis.target = target;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarStartsWith\", this.source, this.target);\n\t}\n\toptimize(optimizer) {\n\t\tconst sourceCost = this.source.optimize(optimizer);\n\t\tconst targetCost = this.target.optimize(optimizer);\n\t\treturn Cost.max(sourceCost, targetCost);\n\t}\n\tgetOptimized() {\n\t\tconst source = this.source.getOptimized();\n\t\tconst target = this.target.getOptimized();\n\t\treturn new ScalarStartsWith(source, target);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { source, target } = yield* evaluateObject({\n\t\t\tsource: this.source.evaluate(context, tuple),\n\t\t\ttarget: this.target.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: DatabaseValue.startsWith(source, target, collation$5)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Explorer.ts\n/**\n* The explorer is responsible for generating non-normalized alternative query plans. For example,\n* the initial normalized query plan can only contain a single filter, but we could split it into\n* multiple filters so we can apply other optimizations to some parts of the query.\n*/\nvar Explorer = class {\n\tnormalizer;\n\tmemo;\n\tconstructor(normalizer) {\n\t\tthis.normalizer = normalizer;\n\t\tthis.memo = normalizer.memo;\n\t}\n\texplore(before) {\n\t\tconst group = before.getGroup();\n\t\tif (before instanceof RelationalFilter) {\n\t\t\tif (before.predicate instanceof ScalarAnd) {\n\t\t\t\tconst left = this.normalizer.newRelationalFilter(before.input, before.predicate.left);\n\t\t\t\tconst right = this.normalizer.newRelationalFilter(before.input, before.predicate.right);\n\t\t\t\tconst after = new RelationalIntersection(left, right);\n\t\t\t\tthis.memo.addRelational(after, group);\n\t\t\t}\n\t\t\tif (before.predicate instanceof ScalarOr) {\n\t\t\t\tconst left = this.normalizer.newRelationalFilter(before.input, before.predicate.left);\n\t\t\t\tconst right = this.normalizer.newRelationalFilter(before.input, before.predicate.right);\n\t\t\t\tconst after = new RelationalUnion(left, right);\n\t\t\t\tthis.memo.addRelational(after, group);\n\t\t\t}\n\t\t}\n\t\tif (before instanceof RelationalScan) for (const index of before.collection.indexes) {\n\t\t\tif (index.constraint) continue;\n\t\t\tconst query = createIndexQueryAll(index.lookupNodes.length);\n\t\t\tconst after = new RelationalIndexLookup(index, query);\n\t\t\tthis.memo.addRelational(after, group);\n\t\t}\n\t\tif (before instanceof RelationalFilter) {\n\t\t\tfor (const input of before.inputGroup.nodes) if (input instanceof RelationalScan) for (const index of input.collection.indexes) {\n\t\t\t\tif (before.predicate instanceof ScalarEquals && before.predicate.left === index.lookupNodes[0] && before.predicate.right instanceof ScalarConstant && index.data.supportedLookupTypes.includes(\"Equals\")) {\n\t\t\t\t\tconst query = createIndexQueryAll(index.lookupNodes.length);\n\t\t\t\t\tquery[0] = {\n\t\t\t\t\t\ttype: \"Equals\",\n\t\t\t\t\t\tvalue: before.predicate.right.value\n\t\t\t\t\t};\n\t\t\t\t\tconst after = new RelationalIndexLookup(index, query);\n\t\t\t\t\tthis.memo.addRelational(after, group);\n\t\t\t\t}\n\t\t\t\tif (before.predicate instanceof ScalarNotEquals && before.predicate.left === index.lookupNodes[0] && before.predicate.right instanceof ScalarConstant && index.data.supportedLookupTypes.includes(\"NotEquals\")) {\n\t\t\t\t\tconst query = createIndexQueryAll(index.lookupNodes.length);\n\t\t\t\t\tquery[0] = {\n\t\t\t\t\t\ttype: \"NotEquals\",\n\t\t\t\t\t\tvalue: before.predicate.right.value\n\t\t\t\t\t};\n\t\t\t\t\tconst after = new RelationalIndexLookup(index, query);\n\t\t\t\t\tthis.memo.addRelational(after, group);\n\t\t\t\t}\n\t\t\t\tif (before.predicate instanceof ScalarLessThan && before.predicate.left === index.lookupNodes[0] && before.predicate.right instanceof ScalarConstant && index.data.supportedLookupTypes.includes(\"LessThan\")) {\n\t\t\t\t\tconst query = createIndexQueryAll(index.lookupNodes.length);\n\t\t\t\t\tquery[0] = {\n\t\t\t\t\t\ttype: \"LessThan\",\n\t\t\t\t\t\tvalue: before.predicate.right.value,\n\t\t\t\t\t\tinclusive: false\n\t\t\t\t\t};\n\t\t\t\t\tconst after = new RelationalIndexLookup(index, query);\n\t\t\t\t\tthis.memo.addRelational(after, group);\n\t\t\t\t}\n\t\t\t\tif (before.predicate instanceof ScalarLessThanOrEqual && before.predicate.left === index.lookupNodes[0] && before.predicate.right instanceof ScalarConstant && index.data.supportedLookupTypes.includes(\"LessThan\")) {\n\t\t\t\t\tconst query = createIndexQueryAll(index.lookupNodes.length);\n\t\t\t\t\tquery[0] = {\n\t\t\t\t\t\ttype: \"LessThan\",\n\t\t\t\t\t\tvalue: before.predicate.right.value,\n\t\t\t\t\t\tinclusive: true\n\t\t\t\t\t};\n\t\t\t\t\tconst after = new RelationalIndexLookup(index, query);\n\t\t\t\t\tthis.memo.addRelational(after, group);\n\t\t\t\t}\n\t\t\t\tif (before.predicate instanceof ScalarGreaterThan && before.predicate.left === index.lookupNodes[0] && before.predicate.right instanceof ScalarConstant && index.data.supportedLookupTypes.includes(\"GreaterThan\")) {\n\t\t\t\t\tconst query = createIndexQueryAll(index.lookupNodes.length);\n\t\t\t\t\tquery[0] = {\n\t\t\t\t\t\ttype: \"GreaterThan\",\n\t\t\t\t\t\tvalue: before.predicate.right.value,\n\t\t\t\t\t\tinclusive: false\n\t\t\t\t\t};\n\t\t\t\t\tconst after = new RelationalIndexLookup(index, query);\n\t\t\t\t\tthis.memo.addRelational(after, group);\n\t\t\t\t}\n\t\t\t\tif (before.predicate instanceof ScalarGreaterThanOrEqual && before.predicate.left === index.lookupNodes[0] && before.predicate.right instanceof ScalarConstant && index.data.supportedLookupTypes.includes(\"GreaterThan\")) {\n\t\t\t\t\tconst query = createIndexQueryAll(index.lookupNodes.length);\n\t\t\t\t\tquery[0] = {\n\t\t\t\t\t\ttype: \"GreaterThan\",\n\t\t\t\t\t\tvalue: before.predicate.right.value,\n\t\t\t\t\t\tinclusive: true\n\t\t\t\t\t};\n\t\t\t\t\tconst after = new RelationalIndexLookup(index, query);\n\t\t\t\t\tthis.memo.addRelational(after, group);\n\t\t\t\t}\n\t\t\t\tif (before.predicate instanceof ScalarContains && before.predicate.source === index.lookupNodes[0] && before.predicate.target instanceof ScalarConstant && index.data.supportedLookupTypes.includes(\"Contains\")) {\n\t\t\t\t\tconst query = createIndexQueryAll(index.lookupNodes.length);\n\t\t\t\t\tquery[0] = {\n\t\t\t\t\t\ttype: \"Contains\",\n\t\t\t\t\t\tvalue: before.predicate.target.value\n\t\t\t\t\t};\n\t\t\t\t\tconst after = new RelationalIndexLookup(index, query);\n\t\t\t\t\tthis.memo.addRelational(after, group);\n\t\t\t\t}\n\t\t\t\tif (before.predicate instanceof ScalarStartsWith && before.predicate.source === index.lookupNodes[0] && before.predicate.target instanceof ScalarConstant && index.data.supportedLookupTypes.includes(\"StartsWith\")) {\n\t\t\t\t\tconst query = createIndexQueryAll(index.lookupNodes.length);\n\t\t\t\t\tquery[0] = {\n\t\t\t\t\t\ttype: \"StartsWith\",\n\t\t\t\t\t\tvalue: before.predicate.target.value\n\t\t\t\t\t};\n\t\t\t\t\tconst after = new RelationalIndexLookup(index, query);\n\t\t\t\t\tthis.memo.addRelational(after, group);\n\t\t\t\t}\n\t\t\t\tif (before.predicate instanceof ScalarEndsWith && before.predicate.source === index.lookupNodes[0] && before.predicate.target instanceof ScalarConstant && index.data.supportedLookupTypes.includes(\"EndsWith\")) {\n\t\t\t\t\tconst query = createIndexQueryAll(index.lookupNodes.length);\n\t\t\t\t\tquery[0] = {\n\t\t\t\t\t\ttype: \"EndsWith\",\n\t\t\t\t\t\tvalue: before.predicate.target.value\n\t\t\t\t\t};\n\t\t\t\t\tconst after = new RelationalIndexLookup(index, query);\n\t\t\t\t\tthis.memo.addRelational(after, group);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\nfunction createIndexQueryAll(length) {\n\tconst lookup = { type: \"All\" };\n\treturn new Array(length).fill(lookup);\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Group.ts\nfunction GroupId(id) {\n\treturn id;\n}\n/**\n* A group contains a list of nodes that are logically equivalent. This means\n* that all nodes in the group return the same set of tuples, but the order of\n* the tuples may be different. After a group is optimized for a set of physical\n* props, it stores the best node and its cost in the winners map.\n*/\nvar Group = class {\n\tid;\n\trelational;\n\t/**\n\t* A list of all nodes in the group. All nodes must have compatible\n\t* relational props.\n\t*/\n\tnodes = [];\n\t/**\n\t* A map of all winners in the group by their hash.\n\t*/\n\twinners = /* @__PURE__ */ new Map();\n\tconstructor(id, relational) {\n\t\tthis.id = id;\n\t\tthis.relational = relational;\n\t}\n\t/**\n\t* Adds a node to the group. Throws an error if the node is already in a\n\t* group.\n\t*/\n\taddNode(node) {\n\t\tthis.nodes.push(node);\n\t\tnode.setGroup(this);\n\t}\n\t/**\n\t* Returns the winner for the given required physical props. The winner\n\t* stores the best node and its cost. This is used to find the best node in\n\t* the group.\n\t*/\n\tgetWinner(required) {\n\t\tconst hash = required.getHash();\n\t\tconst existing = this.winners.get(hash);\n\t\tif (existing) return existing;\n\t\tconst winner = new Winner();\n\t\tthis.winners.set(hash, winner);\n\t\treturn winner;\n\t}\n\t/**\n\t* Returns the optimized version of the node. The optimized version is the\n\t* node with the lowest cost with all children replaced with their optimized\n\t* versions. This is used to create the final optimized query plan.\n\t*/\n\tgetOptimized(required) {\n\t\tconst winner = this.getWinner(required);\n\t\tassert$1(winner.node, \"Group not optimized\");\n\t\tconst optimizer = winner.node.getOptimized(required);\n\t\toptimizer.setGroup(this);\n\t\treturn optimizer;\n\t}\n};\n/**\n* The winner stores the best node and its cost of the group for a given set of\n* required physical props.\n*/\nvar Winner = class {\n\tnode;\n\tcost = new Cost(Infinity);\n\tnodes = [];\n\tupdate(node, cost) {\n\t\tthis.nodes.push(node);\n\t\tif (Cost.compare(cost, this.cost) < 0) {\n\t\t\tthis.node = node;\n\t\t\tthis.cost = cost;\n\t\t}\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/LogicalProps.ts\n/**\n* Relational props describe the logical properties of the relation returned by\n* a relational node. While each node in a group can return the fields and\n* tuples in a different order and use a different algorithm to calculate them,\n* all nodes must return the same set of data. For example, a hash join and a\n* merge join will return the same set of tuples, but the order of the tuples\n* may be different.\n*/\nvar RelationalProps = class {\n\toutputFields;\n\tconstructor(outputFields) {\n\t\tthis.outputFields = outputFields;\n\t}\n\t/**\n\t* Checks if the given relational properties are compatible with this.\n\t*/\n\tisCompatible(other) {\n\t\treturn this.outputFields.equals(other.outputFields);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Memo.ts\n/**\n* The memo is a directed acyclic graph of every possible query plan. It\n* contains a list of groups, with all nodes in a group being logically\n* equivalent.\n*\n* The nodes in memo are also known as multi-expressions or memo-expression,\n* because the children of a node can be part of a group themselves.\n*\n* Nodes can be either relational (e.g. scan, join) or scalar (e.g. <, >). A\n* traditional cascades query optimizer differentiates between logical nodes and\n* physical nodes. A logical node is a node that describes what needs to be\n* done, while a physical implementation of the node is the actual algorithm.\n* For example, a logical join can be implemented by a physical nested loop join\n* or physical hash join. We took the same approach as CockroachDB, where every\n* node is both a logical and physical expression. This means even the initial\n* unoptimized query plan can be executed.\n*\n* Scalar nodes are not part of a group, because we don't generate logically\n* equivalent alternatives for them. We only store the normalized version in the\n* memo. This is because the performance difference of two logically equivalent\n* scalar nodes is negligible. But the performance difference of two relation\n* nodes might be significant.\n*/\nvar Memo = class {\n\t/**\n\t* A map of all nodes in the memo by their hash. This allows to easily find\n\t* duplicated nodes and their groups.\n\t*/\n\tnodes = /* @__PURE__ */ new Map();\n\t/**\n\t* A list of all groups in the memo. The id of a group is the index of the\n\t* group in this list.\n\t*/\n\tgroups = [];\n\t/**\n\t* Adds a new group with the given relational props to the memo. All nodes\n\t* in the group must have the same props. It's expected that the normalized\n\t* node is immediately added to the group after creating it.\n\t*/\n\taddGroup(relationalProps) {\n\t\tconst id = GroupId(this.groups.length);\n\t\tconst group = new Group(id, relationalProps);\n\t\tthis.groups.push(group);\n\t\treturn group;\n\t}\n\t/**\n\t* Adds a relational node to the memo and the group. If the node is already\n\t* in the memo, it returns the existing node. If no group is given, it\n\t* creates a new group with the given relational props of the node.\n\t*/\n\taddRelational(node, group) {\n\t\tconst hash = node.getHash();\n\t\tconst existing = this.nodes.get(hash);\n\t\tif (existing) return existing;\n\t\tthis.nodes.set(hash, node);\n\t\tconst outputFields = node.getOutputFields();\n\t\tconst relational = new RelationalProps(outputFields);\n\t\tgroup ??= this.addGroup(relational);\n\t\tgroup.addNode(node);\n\t\tassert$1(relational.isCompatible(group.relational), \"Group has inconsistent relational props\");\n\t\treturn node;\n\t}\n\t/**\n\t* Adds a scalar node to the memo. If the node is already in the memo, it\n\t* returns the existing node.\n\t*/\n\taddScalar(node) {\n\t\tconst hash = node.getHash();\n\t\tconst existing = this.nodes.get(hash);\n\t\tif (existing) return existing;\n\t\tthis.nodes.set(hash, node);\n\t\treturn node;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/relational/RelationalLeftJoin.ts\nvar RelationalLeftJoin = class RelationalLeftJoin extends RelationalNode {\n\tleft;\n\tright;\n\tconstraint;\n\tleftGroup;\n\trightGroup;\n\tconstructor(left, right, constraint) {\n\t\tsuper(left.isSynchronous && right.isSynchronous && constraint.isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.constraint = constraint;\n\t\tthis.leftGroup = left.getGroup();\n\t\tthis.rightGroup = right.getGroup();\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"RelationalLeftJoin\", this.leftGroup.id, this.rightGroup.id, this.constraint);\n\t}\n\tgetOutputFields() {\n\t\tconst outputFields = new Fields();\n\t\toutputFields.merge(this.leftGroup.relational.outputFields);\n\t\toutputFields.merge(this.rightGroup.relational.outputFields);\n\t\treturn outputFields;\n\t}\n\tcanProvideOrdering() {\n\t\treturn false;\n\t}\n\tcanProvideResolvedFields() {\n\t\treturn true;\n\t}\n\tgetChildRequiredProps(group, required) {\n\t\tconst resolvedFields = new Fields();\n\t\tconst outputFields = group.relational.outputFields;\n\t\tfor (const field of required.resolvedFields) if (outputFields.has(field)) resolvedFields.add(field);\n\t\tfor (const field of this.constraint.referencedFields) if (outputFields.has(field)) resolvedFields.add(field);\n\t\tconst ordering = new Ordering();\n\t\treturn new RequiredProps(ordering, resolvedFields);\n\t}\n\toptimize(optimizer, required) {\n\t\tconst leftRequired = this.getChildRequiredProps(this.leftGroup, required);\n\t\tconst leftCost = optimizer.optimizeGroup(this.leftGroup, leftRequired);\n\t\tconst rightRequired = this.getChildRequiredProps(this.rightGroup, required);\n\t\tconst rightCost = optimizer.optimizeGroup(this.rightGroup, rightRequired);\n\t\tconst constraintCost = this.constraint.optimize(optimizer);\n\t\treturn Cost.max(Cost.max(leftCost, rightCost), constraintCost);\n\t}\n\tgetOptimized(required) {\n\t\tconst leftRequired = this.getChildRequiredProps(this.leftGroup, required);\n\t\tconst left = this.leftGroup.getOptimized(leftRequired);\n\t\tconst rightRequired = this.getChildRequiredProps(this.rightGroup, required);\n\t\tconst right = this.rightGroup.getOptimized(rightRequired);\n\t\tconst constraint = this.constraint.getOptimized();\n\t\treturn new RelationalLeftJoin(left, right, constraint);\n\t}\n\t/** Optimized path for equality constraints that runs in O(n + m) time. */\n\t*evaluateScalarEquals(left, right, leftConstraint, rightConstraint, context) {\n\t\tconst joinKeyMap = /* @__PURE__ */ new Map();\n\t\tfor (const rightTuple of right.tuples) {\n\t\t\tconst rightValue = yield* rightConstraint.evaluate(context, rightTuple);\n\t\t\tconst key = JSON.stringify(rightValue?.value ?? null);\n\t\t\tconst tuplesForKey = joinKeyMap.get(key) ?? [];\n\t\t\ttuplesForKey.push(rightTuple);\n\t\t\tjoinKeyMap.set(key, tuplesForKey);\n\t\t}\n\t\tconst outputFields = this.getOutputFields();\n\t\tconst result = new Relation(outputFields);\n\t\tfor (const leftTuple of left.tuples) {\n\t\t\tconst leftValue = yield* leftConstraint.evaluate(context, leftTuple);\n\t\t\tconst key = JSON.stringify(leftValue?.value ?? null);\n\t\t\tconst matches = joinKeyMap.get(key) ?? [];\n\t\t\tif (matches.length === 0) result.push(leftTuple);\n\t\t\telse for (const rightTuple of matches) {\n\t\t\t\tconst joinedTuple = new Tuple();\n\t\t\t\tjoinedTuple.merge(leftTuple);\n\t\t\t\tjoinedTuple.merge(rightTuple);\n\t\t\t\tresult.push(joinedTuple);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\t*evaluate(context) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context),\n\t\t\tright: this.right.evaluate(context)\n\t\t});\n\t\tif (this.constraint instanceof ScalarEquals) {\n\t\t\tif (this.constraint.left.referencedFields.subsetOf(this.leftGroup.relational.outputFields) && this.constraint.right.referencedFields.subsetOf(this.rightGroup.relational.outputFields)) return yield* this.evaluateScalarEquals(left, right, this.constraint.left, this.constraint.right, context);\n\t\t\tif (this.constraint.right.referencedFields.subsetOf(this.leftGroup.relational.outputFields) && this.constraint.left.referencedFields.subsetOf(this.rightGroup.relational.outputFields)) return yield* this.evaluateScalarEquals(left, right, this.constraint.right, this.constraint.left, context);\n\t\t}\n\t\tconst outputFields = this.getOutputFields();\n\t\tconst result = new Relation(outputFields);\n\t\tfor (const leftTuple of left.tuples) {\n\t\t\tlet hasMatch = false;\n\t\t\tfor (const rightTuple of right.tuples) {\n\t\t\t\tconst tuple = new Tuple();\n\t\t\t\ttuple.merge(leftTuple);\n\t\t\t\ttuple.merge(rightTuple);\n\t\t\t\tconst value = yield* this.constraint.evaluate(context, tuple);\n\t\t\t\tif (valueToBoolean(value)) {\n\t\t\t\t\tresult.push(tuple);\n\t\t\t\t\thasMatch = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!hasMatch) result.push(leftTuple);\n\t\t}\n\t\treturn result;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/relational/RelationalLimit.ts\nvar RelationalLimit = class RelationalLimit extends RelationalNode {\n\tinput;\n\tlimit;\n\tordering;\n\tinputGroup;\n\tconstructor(input, limit, ordering) {\n\t\tsuper(input.isSynchronous && limit.isSynchronous);\n\t\tthis.input = input;\n\t\tthis.limit = limit;\n\t\tthis.ordering = ordering;\n\t\tthis.inputGroup = input.getGroup();\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"RelationalLimit\", this.inputGroup.id, this.limit);\n\t}\n\tgetOutputFields() {\n\t\treturn this.inputGroup.relational.outputFields;\n\t}\n\tcanProvideOrdering(ordering) {\n\t\treturn ordering.equals(this.ordering);\n\t}\n\tcanProvideResolvedFields() {\n\t\treturn true;\n\t}\n\tgetInputRequiredProps(required) {\n\t\tconst resolvedFields = new Fields(required.resolvedFields);\n\t\tresolvedFields.merge(this.limit.referencedFields);\n\t\treturn new RequiredProps(this.ordering, resolvedFields);\n\t}\n\toptimize(optimizer, required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst inputCost = optimizer.optimizeGroup(this.inputGroup, inputRequired);\n\t\tconst limitCost = this.limit.optimize(optimizer);\n\t\treturn new Cost(0).add(Cost.max(inputCost, limitCost));\n\t}\n\tgetOptimized(required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst input = this.inputGroup.getOptimized(inputRequired);\n\t\tconst limit = this.limit.getOptimized();\n\t\treturn new RelationalLimit(input, limit, this.ordering);\n\t}\n\t*evaluate(context) {\n\t\tconst { input, limit } = yield* evaluateObject({\n\t\t\tinput: this.input.evaluate(context),\n\t\t\tlimit: this.limit.evaluate(context, void 0)\n\t\t});\n\t\tconst value = valueToNumber(limit) ?? Infinity;\n\t\tif (value === Infinity) return input;\n\t\treturn input.slice(0, value);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/relational/RelationalOffset.ts\nvar RelationalOffset = class RelationalOffset extends RelationalNode {\n\tinput;\n\toffset;\n\tordering;\n\tinputGroup;\n\tconstructor(input, offset, ordering) {\n\t\tsuper(input.isSynchronous && offset.isSynchronous);\n\t\tthis.input = input;\n\t\tthis.offset = offset;\n\t\tthis.ordering = ordering;\n\t\tthis.inputGroup = input.getGroup();\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"RelationalOffset\", this.inputGroup.id, this.offset);\n\t}\n\tgetOutputFields() {\n\t\treturn this.inputGroup.relational.outputFields;\n\t}\n\tcanProvideOrdering(ordering) {\n\t\treturn ordering.equals(this.ordering);\n\t}\n\tcanProvideResolvedFields() {\n\t\treturn true;\n\t}\n\tgetInputRequiredProps(required) {\n\t\tconst resolvedFields = new Fields(required.resolvedFields);\n\t\tresolvedFields.merge(this.offset.referencedFields);\n\t\treturn new RequiredProps(this.ordering, resolvedFields);\n\t}\n\toptimize(optimizer, required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst inputCost = optimizer.optimizeGroup(this.inputGroup, inputRequired);\n\t\tconst offsetCost = this.offset.optimize(optimizer);\n\t\treturn new Cost(0).add(Cost.max(inputCost, offsetCost));\n\t}\n\tgetOptimized(required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst input = this.inputGroup.getOptimized(inputRequired);\n\t\tconst offset = this.offset.getOptimized();\n\t\treturn new RelationalOffset(input, offset, this.ordering);\n\t}\n\t*evaluate(context) {\n\t\tconst { input, offset } = yield* evaluateObject({\n\t\t\tinput: this.input.evaluate(context),\n\t\t\toffset: this.offset.evaluate(context, void 0)\n\t\t});\n\t\tconst value = valueToNumber(offset) ?? 0;\n\t\tif (value === 0) return input;\n\t\treturn input.slice(value);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarArray.ts\nvar ScalarArray = class ScalarArray extends ScalarNode {\n\tinput;\n\tnamedFields;\n\tordering;\n\treferencedFields;\n\treferencedOuterFields;\n\tinputGroup;\n\tdefinition;\n\tconstructor(input, namedFields, ordering, referencedFields, referencedOuterFields) {\n\t\tsuper(referencedFields, referencedOuterFields, input.isSynchronous);\n\t\tthis.input = input;\n\t\tthis.namedFields = namedFields;\n\t\tthis.ordering = ordering;\n\t\tthis.referencedFields = referencedFields;\n\t\tthis.referencedOuterFields = referencedOuterFields;\n\t\tthis.inputGroup = input.getGroup();\n\t\tconst itemDefinitions = {};\n\t\tconst namedFieldEntries = Object.entries(namedFields);\n\t\tfor (const [name, field] of namedFieldEntries) itemDefinitions[name] = field.definition;\n\t\tthis.definition = {\n\t\t\ttype: \"array\",\n\t\t\tisNullable: false,\n\t\t\tdefinition: {\n\t\t\t\ttype: \"object\",\n\t\t\t\tisNullable: false,\n\t\t\t\tdefinitions: itemDefinitions\n\t\t\t}\n\t\t};\n\t}\n\tgetHash() {\n\t\tconst namedFieldIds = {};\n\t\tconst namedFieldEntries = Object.entries(this.namedFields);\n\t\tfor (const [name, field] of namedFieldEntries) namedFieldIds[name] = field.id;\n\t\treturn calculateHash(\"ScalarArray\", this.inputGroup.id, namedFieldIds, this.ordering, this.referencedFields, this.referencedOuterFields);\n\t}\n\tgetInputRequiredProps() {\n\t\tconst resolvedFields = new Fields();\n\t\tconst fields = Object.values(this.namedFields);\n\t\tfor (const field of fields) {\n\t\t\tif (isUndefined(field.collection)) continue;\n\t\t\tresolvedFields.add(field);\n\t\t}\n\t\treturn new RequiredProps(this.ordering, resolvedFields);\n\t}\n\toptimize(optimizer) {\n\t\tconst inputRequired = this.getInputRequiredProps();\n\t\tconst inputCost = optimizer.optimizeGroup(this.inputGroup, inputRequired);\n\t\treturn new Cost(0).add(inputCost);\n\t}\n\tgetOptimized() {\n\t\tconst inputRequired = this.getInputRequiredProps();\n\t\tconst input = this.inputGroup.getOptimized(inputRequired);\n\t\treturn new ScalarArray(input, this.namedFields, this.ordering, this.referencedFields, this.referencedOuterFields);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst inputContext = new Tuple();\n\t\tif (context) inputContext.merge(context);\n\t\tif (tuple) inputContext.merge(tuple);\n\t\tconst relation = yield* this.input.evaluate(inputContext);\n\t\tconst namedFieldEntries = Object.entries(this.namedFields);\n\t\treturn {\n\t\t\ttype: \"array\",\n\t\t\tvalue: relation.tuples.map((relationTuple) => {\n\t\t\t\tconst value = {};\n\t\t\t\tfor (const [name, field] of namedFieldEntries) value[name] = relationTuple.getValue(field);\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"object\",\n\t\t\t\t\tvalue\n\t\t\t\t};\n\t\t\t})\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarCast.ts\nvar ScalarCast = class ScalarCast extends ScalarNode {\n\tinput;\n\tdefinition;\n\tconstructor(input, definition) {\n\t\tsuper(input.referencedFields, input.referencedOuterFields, input.isSynchronous);\n\t\tthis.input = input;\n\t\tthis.definition = definition;\n\t\tassert$1(definition.isNullable, \"Unsupported non-nullable cast\");\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarCast\", this.input, this.definition);\n\t}\n\toptimize(optimizer) {\n\t\treturn this.input.optimize(optimizer);\n\t}\n\tgetOptimized() {\n\t\tconst input = this.input.getOptimized();\n\t\treturn new ScalarCast(input, this.definition);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst input = yield* this.input.evaluate(context, tuple);\n\t\treturn DatabaseValue.cast(input, this.definition);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarFlatArray.ts\nvar ScalarFlatArray = class ScalarFlatArray extends ScalarNode {\n\tinput;\n\tfield;\n\tordering;\n\treferencedFields;\n\treferencedOuterFields;\n\tinputGroup;\n\tdefinition;\n\tconstructor(input, field, ordering, referencedFields, referencedOuterFields) {\n\t\tsuper(referencedFields, referencedOuterFields, input.isSynchronous);\n\t\tthis.input = input;\n\t\tthis.field = field;\n\t\tthis.ordering = ordering;\n\t\tthis.referencedFields = referencedFields;\n\t\tthis.referencedOuterFields = referencedOuterFields;\n\t\tthis.inputGroup = input.getGroup();\n\t\tthis.definition = {\n\t\t\ttype: \"array\",\n\t\t\tisNullable: false,\n\t\t\tdefinition: field.definition\n\t\t};\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarFlatArray\", this.inputGroup.id, this.field.id, this.ordering, this.referencedFields, this.referencedOuterFields);\n\t}\n\tgetInputRequiredProps() {\n\t\tconst resolvedFields = new Fields();\n\t\tif (!isUndefined(this.field.collection)) resolvedFields.add(this.field);\n\t\treturn new RequiredProps(this.ordering, resolvedFields);\n\t}\n\toptimize(optimizer) {\n\t\tconst inputRequired = this.getInputRequiredProps();\n\t\tconst inputCost = optimizer.optimizeGroup(this.inputGroup, inputRequired);\n\t\treturn new Cost(0).add(inputCost);\n\t}\n\tgetOptimized() {\n\t\tconst inputRequired = this.getInputRequiredProps();\n\t\tconst input = this.inputGroup.getOptimized(inputRequired);\n\t\treturn new ScalarFlatArray(input, this.field, this.ordering, this.referencedFields, this.referencedOuterFields);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst inputContext = new Tuple();\n\t\tif (context) inputContext.merge(context);\n\t\tif (tuple) inputContext.merge(tuple);\n\t\tconst relation = yield* this.input.evaluate(inputContext);\n\t\treturn {\n\t\t\ttype: \"array\",\n\t\t\tvalue: relation.tuples.map((relationTuple) => {\n\t\t\t\treturn relationTuple.getValue(this.field);\n\t\t\t})\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarIn.ts\nconst collation$4 = { type: 0 };\nvar ScalarIn = class ScalarIn extends ScalarNode {\n\tleft;\n\tright;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(left, right) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(left.referencedFields);\n\t\treferencedFields.merge(right.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(left.referencedOuterFields);\n\t\treferencedOuterFields.merge(right.referencedOuterFields);\n\t\tconst isSynchronous = left.isSynchronous && right.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarIn\", this.left, this.right);\n\t}\n\toptimize(optimizer) {\n\t\tconst leftCost = this.left.optimize(optimizer);\n\t\tconst rightCost = this.right.optimize(optimizer);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized() {\n\t\tconst left = this.left.getOptimized();\n\t\tconst right = this.right.getOptimized();\n\t\treturn new ScalarIn(left, right);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context, tuple),\n\t\t\tright: this.right.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: DatabaseValue.in(left, right, collation$4)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarIndexOf.ts\nconst collation$3 = { type: 1 };\nvar ScalarIndexOf = class ScalarIndexOf extends ScalarNode {\n\tsource;\n\ttarget;\n\tdefinition = {\n\t\ttype: \"number\",\n\t\tisNullable: false\n\t};\n\tconstructor(source, target) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(source.referencedFields);\n\t\treferencedFields.merge(target.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(source.referencedOuterFields);\n\t\treferencedOuterFields.merge(target.referencedOuterFields);\n\t\tconst isSynchronous = source.isSynchronous && target.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.source = source;\n\t\tthis.target = target;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarIndexOf\", this.source, this.target);\n\t}\n\toptimize(optimizer) {\n\t\tconst sourceCost = this.source.optimize(optimizer);\n\t\tconst targetCost = this.target.optimize(optimizer);\n\t\treturn Cost.max(sourceCost, targetCost);\n\t}\n\tgetOptimized() {\n\t\tconst source = this.source.getOptimized();\n\t\tconst target = this.target.getOptimized();\n\t\treturn new ScalarIndexOf(source, target);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { source, target } = yield* evaluateObject({\n\t\t\tsource: this.source.evaluate(context, tuple),\n\t\t\ttarget: this.target.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"number\",\n\t\t\tvalue: DatabaseValue.indexOf(source, target, collation$3)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../shared/src/assert.ts\nvar AssertionError = class extends Error {};\n/**\n* Throws an error when the condition is falsy, optionally pass in a message to\n* describe the error.\n*\n* Best to use asserts where data is about to be stored. Then errors are caught\n* early, close to the cause. Otherwise data with broken expectation might hang\n* around, only to cause errors when used later on, with no pointer back to what\n* caused that bad state.\n*\n* Note that when an assert fails, consider that a fatal error caused by buggy\n* code. The program should halt, or perhaps do some kind of high level\n* recovery, and the bug should be reported and fixed. Asserts are not well\n* suited to use as defensive programming, but are good to use to quickly\n* highlight mistakes while writing new code.\n*\n* And finally, the condition should be cheap, and the message should be a\n* static string. For anything computed pass a side-effect-free function\n* (e.g. `() => \\`unexpected ${JSON.stringify(value)}\\``), it only runs on\n* failure.\n*/\nfunction assert(condition, message) {\n\tif (condition) return;\n\tif (typeof message === \"function\") try {\n\t\tmessage = message();\n\t} catch {\n\t\tmessage = \"(assert message threw)\";\n\t}\n\tif (typeof message === \"string\" && message.length > 2048) message = message.slice(0, 2048) + \"…\";\n\tconst e = new AssertionError(message ? \"Assertion Error: \" + message : \"Assertion Error\");\n\tif (e.stack) try {\n\t\tconst lines = e.stack.split(\"\\n\");\n\t\tif (lines[1]?.includes(\"assert\")) {\n\t\t\tlines.splice(1, 1);\n\t\t\te.stack = lines.join(\"\\n\");\n\t\t} else if (lines[0]?.includes(\"assert\")) {\n\t\t\tlines.splice(0, 1);\n\t\t\te.stack = lines.join(\"\\n\");\n\t\t}\n\t} catch {}\n\tthrow e;\n}\n/**\n* Asserts that a code path is never entered. Additionally, asserts that the provided\n* value is evaluated to `never` by the type system, which means all possible discrete\n* types have been exhaustively checked by the time this statement is reached.\n*/\nfunction assertNever(x, error) {\n\tif (error instanceof Error) throw error;\n\tif (error !== void 0) throw new Error(String(error));\n\tthrow new Error(x ? `Unexpected value: ${x}` : \"Application entered invalid state\");\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarIntersection.ts\nvar ScalarIntersection = class ScalarIntersection extends ScalarNode {\n\tleft;\n\tright;\n\tdefinition = {\n\t\ttype: \"array\",\n\t\tdefinition: {\n\t\t\ttype: \"string\",\n\t\t\tisNullable: false\n\t\t},\n\t\tisNullable: false\n\t};\n\tconstructor(left, right) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(left.referencedFields);\n\t\treferencedFields.merge(right.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(left.referencedOuterFields);\n\t\treferencedOuterFields.merge(right.referencedOuterFields);\n\t\tconst isSynchronous = left.isSynchronous && right.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarIntersection\", this.left, this.right);\n\t}\n\toptimize(optimizer) {\n\t\tconst leftCost = this.left.optimize(optimizer);\n\t\tconst rightCost = this.right.optimize(optimizer);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized() {\n\t\tconst left = this.left.getOptimized();\n\t\tconst right = this.right.getOptimized();\n\t\treturn new ScalarIntersection(left, right);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context, tuple),\n\t\t\tright: this.right.evaluate(context, tuple)\n\t\t});\n\t\tconst leftSet = databaseValueToSet(left);\n\t\tconst rightSet = databaseValueToSet(right);\n\t\tconst intersection = [];\n\t\tconst shortestSet = leftSet.size < rightSet.size ? leftSet : rightSet;\n\t\tconst longestSet = shortestSet === leftSet ? rightSet : leftSet;\n\t\tfor (const item of shortestSet) if (longestSet.has(item)) intersection.push({\n\t\t\ttype: \"string\",\n\t\t\tvalue: item\n\t\t});\n\t\treturn {\n\t\t\ttype: \"array\",\n\t\t\tvalue: intersection\n\t\t};\n\t}\n};\nfunction databaseValueToSet(value) {\n\tconst set = /* @__PURE__ */ new Set();\n\tif (!value) return set;\n\tassert(value.type === \"array\", () => `ScalarIntersection expects an array, got: ${value.type}`);\n\tfor (const item of value.value) {\n\t\tif (!item) continue;\n\t\tassert(item.type === \"string\", () => `ScalarIntersection expects an array of strings, got an array with: ${item.type}`);\n\t\tset.add(item.value);\n\t}\n\treturn set;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarLength.ts\nvar ScalarLength = class ScalarLength extends ScalarNode {\n\tinput;\n\tdefinition = {\n\t\ttype: \"number\",\n\t\tisNullable: false\n\t};\n\tconstructor(input) {\n\t\tsuper(input.referencedFields, input.referencedOuterFields, input.isSynchronous);\n\t\tthis.input = input;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarLength\", this.input);\n\t}\n\toptimize(optimizer) {\n\t\treturn this.input.optimize(optimizer);\n\t}\n\tgetOptimized() {\n\t\tconst input = this.input.getOptimized();\n\t\treturn new ScalarLength(input);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst input = yield* this.input.evaluate(context, tuple);\n\t\treturn {\n\t\t\ttype: \"number\",\n\t\t\tvalue: DatabaseValue.length(input)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarNot.ts\nvar ScalarNot = class ScalarNot extends ScalarNode {\n\tinput;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(input) {\n\t\tsuper(input.referencedFields, input.referencedOuterFields, input.isSynchronous);\n\t\tthis.input = input;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarNot\", this.input);\n\t}\n\toptimize(optimizer) {\n\t\treturn this.input.optimize(optimizer);\n\t}\n\tgetOptimized() {\n\t\tconst input = this.input.getOptimized();\n\t\treturn new ScalarNot(input);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst input = yield* this.input.evaluate(context, tuple);\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: !valueToBoolean(input)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarNotIn.ts\nconst collation$2 = { type: 0 };\nvar ScalarNotIn = class ScalarNotIn extends ScalarNode {\n\tleft;\n\tright;\n\tdefinition = {\n\t\ttype: \"boolean\",\n\t\tisNullable: false\n\t};\n\tconstructor(left, right) {\n\t\tconst referencedFields = new Fields();\n\t\treferencedFields.merge(left.referencedFields);\n\t\treferencedFields.merge(right.referencedFields);\n\t\tconst referencedOuterFields = new Fields();\n\t\treferencedOuterFields.merge(left.referencedOuterFields);\n\t\treferencedOuterFields.merge(right.referencedOuterFields);\n\t\tconst isSynchronous = left.isSynchronous && right.isSynchronous;\n\t\tsuper(referencedFields, referencedOuterFields, isSynchronous);\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarNotIn\", this.left, this.right);\n\t}\n\toptimize(optimizer) {\n\t\tconst leftCost = this.left.optimize(optimizer);\n\t\tconst rightCost = this.right.optimize(optimizer);\n\t\treturn Cost.max(leftCost, rightCost);\n\t}\n\tgetOptimized() {\n\t\tconst left = this.left.getOptimized();\n\t\tconst right = this.right.getOptimized();\n\t\treturn new ScalarNotIn(left, right);\n\t}\n\t*evaluate(context, tuple) {\n\t\tconst { left, right } = yield* evaluateObject({\n\t\t\tleft: this.left.evaluate(context, tuple),\n\t\t\tright: this.right.evaluate(context, tuple)\n\t\t});\n\t\treturn {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: !DatabaseValue.in(left, right, collation$2)\n\t\t};\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/scalar/ScalarVariable.ts\nvar ScalarVariable = class extends ScalarNode {\n\tfield;\n\tisOuterField;\n\tdefinition;\n\tconstructor(field, isOuterField) {\n\t\tassert$1(field.name !== VIRTUAL_INDEX_FIELD, \"Invalid field name\");\n\t\tconst referencedFields = new Fields();\n\t\tconst referencedOuterFields = new Fields();\n\t\tif (isOuterField) referencedOuterFields.add(field);\n\t\telse referencedFields.add(field);\n\t\tsuper(referencedFields, referencedOuterFields, true);\n\t\tthis.field = field;\n\t\tthis.isOuterField = isOuterField;\n\t\tthis.definition = field.definition;\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"ScalarVariable\", this.field.id, this.isOuterField);\n\t}\n\toptimize() {\n\t\treturn new Cost(0);\n\t}\n\tgetOptimized() {\n\t\treturn this;\n\t}\n\t*evaluate(context, tuple) {\n\t\tif (this.isOuterField) {\n\t\t\tassert$1(context, \"Context must exist\");\n\t\t\treturn context.getValue(this.field);\n\t\t}\n\t\tassert$1(tuple, \"Tuple must exist\");\n\t\treturn tuple.getValue(this.field);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Normalizer.ts\n/**\n* The normalizer converts nodes into their normalized form and inserts them\n* into the memo. This is the most common way to insert a node into the memo.\n*\n* If a normalized node is already in the memo, it will be returned instead.\n* Otherwise, a new memo group is created and the node is inserted into it as\n* its first and only child. The explorer will then create logically equivalent\n* nodes and add them into the same group.\n*/\nvar Normalizer = class {\n\tmemo;\n\tconstructor(memo) {\n\t\tthis.memo = memo;\n\t}\n\tfinishRelational(node) {\n\t\treturn this.memo.addRelational(node);\n\t}\n\tnewRelationalScan(collection) {\n\t\tconst node = new RelationalScan(collection);\n\t\treturn this.finishRelational(node);\n\t}\n\tnewRelationalIndexLookup(index, query) {\n\t\tconst node = new RelationalIndexLookup(index, query);\n\t\treturn this.finishRelational(node);\n\t}\n\tnewRelationalLeftJoin(left, right, constraint) {\n\t\tconst node = new RelationalLeftJoin(left, right, constraint);\n\t\treturn this.finishRelational(node);\n\t}\n\tnewRelationalRightJoin(left, right, constraint) {\n\t\treturn this.newRelationalLeftJoin(right, left, constraint);\n\t}\n\tnewRelationalFilter(input, predicate) {\n\t\tif (predicate instanceof ScalarConstant && predicate.value?.type === \"boolean\" && predicate.value.value === true) return input;\n\t\tif (input instanceof RelationalLeftJoin && predicate.referencedFields.subsetOf(input.leftGroup.relational.outputFields)) {\n\t\t\tconst pushedFilter = this.newRelationalFilter(input.left, predicate);\n\t\t\treturn this.newRelationalLeftJoin(pushedFilter, input.right, input.constraint);\n\t\t}\n\t\tconst node = new RelationalFilter(input, predicate);\n\t\treturn this.finishRelational(node);\n\t}\n\tnewRelationalProject(input, projections, passthrough) {\n\t\tconst node = new RelationalProject(input, projections, passthrough);\n\t\treturn this.finishRelational(node);\n\t}\n\tnewRelationalLimit(input, limit, ordering) {\n\t\tif (input instanceof RelationalProject && limit.referencedFields.subsetOf(input.inputGroup.relational.outputFields) && ordering.providedByFields(input.inputGroup.relational.outputFields)) {\n\t\t\tconst pushedLimit = this.newRelationalLimit(input.input, limit, ordering);\n\t\t\treturn this.newRelationalProject(pushedLimit, input.projections, input.passthrough);\n\t\t}\n\t\tconst node = new RelationalLimit(input, limit, ordering);\n\t\treturn this.finishRelational(node);\n\t}\n\tnewRelationalOffset(input, offset, ordering) {\n\t\tconst node = new RelationalOffset(input, offset, ordering);\n\t\treturn this.finishRelational(node);\n\t}\n\tfinishScalar(node) {\n\t\tif (!(node instanceof ScalarConstant) && node.isSynchronous && node.referencedFields.size === 0 && node.referencedOuterFields.size === 0) {\n\t\t\tconst value = node.evaluateSync();\n\t\t\treturn this.newScalarConstant(node.definition, value);\n\t\t}\n\t\treturn this.memo.addScalar(node);\n\t}\n\t/**\n\t* When we create `ScalarConstant` nodes, we always give them an unknown\n\t* type definition. Before we compare them to other nodes, we need to cast\n\t* them to a specific type.\n\t*\n\t* For example, in the following query:\n\t* ```\n\t* SELECT id FROM cars WHERE type = \"coupe\"\n\t* ```\n\t*\n\t* If the `type` field is an enum, and we parse the `\"coupe\"` constant as a\n\t* string, the where clause will always be false because an enum can't be\n\t* equal to a string. But if we cast the string to an enum type first, the\n\t* where clause will work as expected.\n\t*/\n\tremoveUnknown(node, definition) {\n\t\tif (node.definition.type !== \"unknown\") return node;\n\t\tif (definition.type === \"unknown\") return node;\n\t\tconst nullableDefinition = {\n\t\t\t...definition,\n\t\t\tisNullable: true\n\t\t};\n\t\treturn this.newScalarCast(node, nullableDefinition);\n\t}\n\tnewScalarVariable(field, isOuterField) {\n\t\tconst node = new ScalarVariable(field, isOuterField);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarConstant(definition, value) {\n\t\tconst node = new ScalarConstant(definition, value);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarNot(input) {\n\t\tif (input instanceof ScalarNot) {\n\t\t\tif (input.input.definition.type === \"boolean\") return input.input;\n\t\t\tconst definition = {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tisNullable: true\n\t\t\t};\n\t\t\treturn this.newScalarCast(input.input, definition);\n\t\t}\n\t\tif (input instanceof ScalarEquals) return this.newScalarNotEquals(input.left, input.right);\n\t\tif (input instanceof ScalarNotEquals) return this.newScalarEquals(input.left, input.right);\n\t\tif (input instanceof ScalarLessThan) return this.newScalarGreaterThanOrEqual(input.left, input.right);\n\t\tif (input instanceof ScalarLessThanOrEqual) return this.newScalarGreaterThan(input.left, input.right);\n\t\tif (input instanceof ScalarGreaterThan) return this.newScalarLessThanOrEqual(input.left, input.right);\n\t\tif (input instanceof ScalarGreaterThanOrEqual) return this.newScalarLessThan(input.left, input.right);\n\t\tif (input instanceof ScalarAnd) {\n\t\t\tconst left = this.newScalarNot(input.left);\n\t\t\tconst right = this.newScalarNot(input.right);\n\t\t\treturn this.newScalarOr(left, right);\n\t\t}\n\t\tif (input instanceof ScalarOr) {\n\t\t\tconst left = this.newScalarNot(input.left);\n\t\t\tconst right = this.newScalarNot(input.right);\n\t\t\treturn this.newScalarAnd(left, right);\n\t\t}\n\t\tconst node = new ScalarNot(input);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarAnd(left, right) {\n\t\tif (right instanceof ScalarConstant && right.value?.type === \"boolean\" && right.value.value === true) return left;\n\t\tif (left instanceof ScalarConstant && left.value?.type === \"boolean\" && left.value.value === true) return right;\n\t\tif (right instanceof ScalarConstant && right.value?.type === \"boolean\" && right.value.value === false) return right;\n\t\tif (left instanceof ScalarConstant && left.value?.type === \"boolean\" && left.value.value === false) return left;\n\t\tconst node = new ScalarAnd(left, right);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarOr(left, right) {\n\t\tif (right instanceof ScalarConstant && right.value?.type === \"boolean\" && right.value.value === true) return right;\n\t\tif (left instanceof ScalarConstant && left.value?.type === \"boolean\" && left.value.value === true) return left;\n\t\tif (right instanceof ScalarConstant && right.value?.type === \"boolean\" && right.value.value === false) return left;\n\t\tif (left instanceof ScalarConstant && left.value?.type === \"boolean\" && left.value.value === false) return right;\n\t\tconst node = new ScalarOr(left, right);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarEquals(left, right) {\n\t\tconst isLeftVariable = left instanceof ScalarVariable;\n\t\tif (right instanceof ScalarVariable && !isLeftVariable) return this.newScalarEquals(right, left);\n\t\tleft = this.removeUnknown(left, right.definition);\n\t\tright = this.removeUnknown(right, left.definition);\n\t\tconst node = new ScalarEquals(left, right);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarNotEquals(left, right) {\n\t\tconst isLeftVariable = left instanceof ScalarVariable;\n\t\tif (right instanceof ScalarVariable && !isLeftVariable) return this.newScalarNotEquals(right, left);\n\t\tleft = this.removeUnknown(left, right.definition);\n\t\tright = this.removeUnknown(right, left.definition);\n\t\tconst node = new ScalarNotEquals(left, right);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarLessThan(left, right) {\n\t\tconst isLeftVariable = left instanceof ScalarVariable;\n\t\tif (right instanceof ScalarVariable && !isLeftVariable) return this.newScalarGreaterThan(right, left);\n\t\tleft = this.removeUnknown(left, right.definition);\n\t\tright = this.removeUnknown(right, left.definition);\n\t\tconst node = new ScalarLessThan(left, right);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarLessThanOrEqual(left, right) {\n\t\tconst isLeftVariable = left instanceof ScalarVariable;\n\t\tif (right instanceof ScalarVariable && !isLeftVariable) return this.newScalarGreaterThanOrEqual(right, left);\n\t\tleft = this.removeUnknown(left, right.definition);\n\t\tright = this.removeUnknown(right, left.definition);\n\t\tconst node = new ScalarLessThanOrEqual(left, right);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarGreaterThan(left, right) {\n\t\tconst isLeftVariable = left instanceof ScalarVariable;\n\t\tif (right instanceof ScalarVariable && !isLeftVariable) return this.newScalarLessThan(right, left);\n\t\tleft = this.removeUnknown(left, right.definition);\n\t\tright = this.removeUnknown(right, left.definition);\n\t\tconst node = new ScalarGreaterThan(left, right);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarGreaterThanOrEqual(left, right) {\n\t\tconst isLeftVariable = left instanceof ScalarVariable;\n\t\tif (right instanceof ScalarVariable && !isLeftVariable) return this.newScalarLessThanOrEqual(right, left);\n\t\tleft = this.removeUnknown(left, right.definition);\n\t\tright = this.removeUnknown(right, left.definition);\n\t\tconst node = new ScalarGreaterThanOrEqual(left, right);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarIn(left, right) {\n\t\tif (right.definition.type === \"array\") left = this.removeUnknown(left, right.definition.definition);\n\t\tconst arrayDefinition = {\n\t\t\ttype: \"array\",\n\t\t\tisNullable: true,\n\t\t\tdefinition: left.definition\n\t\t};\n\t\tright = this.removeUnknown(right, arrayDefinition);\n\t\tconst node = new ScalarIn(left, right);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarNotIn(left, right) {\n\t\tif (right.definition.type === \"array\") left = this.removeUnknown(left, right.definition.definition);\n\t\tconst arrayDefinition = {\n\t\t\ttype: \"array\",\n\t\t\tisNullable: true,\n\t\t\tdefinition: left.definition\n\t\t};\n\t\tright = this.removeUnknown(right, arrayDefinition);\n\t\tconst node = new ScalarNotIn(left, right);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarCase(input, conditions, otherwise) {\n\t\tif (input) {\n\t\t\tconst castConditions = [];\n\t\t\tfor (const { when, then } of conditions) {\n\t\t\t\tconst castWhen = this.removeUnknown(when, input.definition);\n\t\t\t\tconst castCondition = new CaseCondition(castWhen, then);\n\t\t\t\tcastConditions.push(castCondition);\n\t\t\t}\n\t\t\tconditions = castConditions;\n\t\t}\n\t\tconst node = new ScalarCase(input, conditions, otherwise);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarContains(source, target) {\n\t\tconst node = new ScalarContains(source, target);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarStartsWith(source, target) {\n\t\tconst node = new ScalarStartsWith(source, target);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarEndsWith(source, target) {\n\t\tconst node = new ScalarEndsWith(source, target);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarLength(array) {\n\t\tconst node = new ScalarLength(array);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarIndexOf(source, target) {\n\t\tconst node = new ScalarIndexOf(source, target);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarArray(input, namedFields, ordering, referencedFields, referencedOuterFields) {\n\t\tconst node = new ScalarArray(input, namedFields, ordering, referencedFields, referencedOuterFields);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarFlatArray(input, field, ordering, referencedFields, referencedOuterFields) {\n\t\tconst node = new ScalarFlatArray(input, field, ordering, referencedFields, referencedOuterFields);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarIntersection(left, right) {\n\t\tconst node = new ScalarIntersection(left, right);\n\t\treturn this.finishScalar(node);\n\t}\n\tnewScalarCast(input, definition) {\n\t\tif (input.definition.type === definition.type) return input;\n\t\tconst node = new ScalarCast(input, definition);\n\t\treturn this.finishScalar(node);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/enforcer/EnforcerNode.ts\n/**\n* An enforcer node is a node that can always provide a specific physical\n* property. This is used by the optimizer to ensure physical properties for\n* nodes that don't provide them already.\n*/\nvar EnforcerNode = class extends RelationalNode {};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/enforcer/EnforcerResolve.ts\n/**\n* The resolve enforcer is used to resolved fields that are required by its\n* parent node. For example, a `RelationalIndexLookup` returns fields that are\n* not resolved. This means some fields are theoretically available, but they\n* are not loaded yet because they are not stored in the index. If required,\n* these fields can be resolved by fetching them from the database collection.\n*/\nvar EnforcerResolve = class EnforcerResolve extends EnforcerNode {\n\tinput;\n\tfields;\n\tresolver;\n\tinputGroup;\n\tconstructor(input, fields, resolver) {\n\t\tsuper(false);\n\t\tthis.input = input;\n\t\tthis.fields = fields;\n\t\tthis.resolver = resolver;\n\t\tthis.inputGroup = input.getGroup();\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"EnforcerResolve\", this.inputGroup.id, this.fields);\n\t}\n\tgetOutputFields() {\n\t\treturn this.inputGroup.relational.outputFields;\n\t}\n\tcanProvideOrdering() {\n\t\treturn true;\n\t}\n\tcanProvideResolvedFields(resolvedFields) {\n\t\treturn resolvedFields.subsetOf(this.fields);\n\t}\n\tgetInputRequiredProps(required) {\n\t\tconst resolvedFields = new Fields();\n\t\treturn new RequiredProps(required.ordering, resolvedFields);\n\t}\n\toptimize(optimizer, required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst inputCost = optimizer.optimizeGroup(this.inputGroup, inputRequired);\n\t\treturn Cost.estimate(0, 100 * KB).add(inputCost);\n\t}\n\tgetOptimized(required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst input = this.inputGroup.getOptimized(inputRequired);\n\t\treturn new EnforcerResolve(input, this.fields, this.resolver);\n\t}\n\t*evaluate(context) {\n\t\tconst input = yield* this.input.evaluate(context);\n\t\tassert$1(this.fields.subsetOf(input.fields), \"Fields can't be resolved\");\n\t\tconst fieldsByCollection = /* @__PURE__ */ new Map();\n\t\tfor (const field of this.fields) {\n\t\t\tassert$1(field.collection, \"Collection required to resolve field\");\n\t\t\tlet fields = fieldsByCollection.get(field.collection);\n\t\t\tif (!fields) {\n\t\t\t\tfields = new Fields();\n\t\t\t\tfieldsByCollection.set(field.collection, fields);\n\t\t\t}\n\t\t\tfields.add(field);\n\t\t}\n\t\tfor (const tuple of input.tuples) for (const field of this.fields) preloadResolvedValues(tuple.getValue(field), this.resolver);\n\t\tconst resolvedCollections = yield Promise.all(Array.from(fieldsByCollection).map(async ([collection, fields]) => {\n\t\t\tconst pointers = [];\n\t\t\tfor (const tuple of input.tuples) {\n\t\t\t\tconst pointer = tuple.getPointer(collection);\n\t\t\t\tif (pointer) pointers.push(pointer);\n\t\t\t}\n\t\t\tconst items = await collection.data.resolveItems(pointers, this.resolver.priority);\n\t\t\tassert$1(items.length === pointers.length, \"Invalid number of items\");\n\t\t\treturn {\n\t\t\t\tcollection,\n\t\t\t\tfields,\n\t\t\t\titems,\n\t\t\t\tnextItemIndex: 0\n\t\t\t};\n\t\t}));\n\t\treturn input.map(input.fields, (tuple) => {\n\t\t\tconst result = new Tuple();\n\t\t\tresult.merge(tuple);\n\t\t\tfor (const resolvedCollection of resolvedCollections) {\n\t\t\t\tconst { collection, fields, items } = resolvedCollection;\n\t\t\t\tconst pointer = tuple.getPointer(collection);\n\t\t\t\tif (!pointer) continue;\n\t\t\t\tconst item = items[resolvedCollection.nextItemIndex++];\n\t\t\t\tassert$1(item, \"Item not found\");\n\t\t\t\tassert$1(item.pointer === pointer, \"Pointer mismatch\");\n\t\t\t\tfor (const field of fields) {\n\t\t\t\t\tconst value = field.getValue(item);\n\t\t\t\t\tresult.addValue(field, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t});\n\t}\n};\nfunction preloadResolvedValues(value, resolver) {\n\tswitch (value?.type) {\n\t\tcase \"array\":\n\t\t\tfor (const item of value.value) preloadResolvedValues(item, resolver);\n\t\t\treturn;\n\t\tcase \"object\":\n\t\t\tfor (const key in value.value) preloadResolvedValues(value.value[key], resolver);\n\t\t\treturn;\n\t\tcase \"richtext\":\n\t\t\tresolver.preloadRichTextValue(value);\n\t\t\treturn;\n\t\tcase \"vectorsetitem\":\n\t\t\tresolver.preloadVectorSetItemValue(value);\n\t\t\treturn;\n\t}\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/enforcer/EnforcerSort.ts\nconst collation$1 = { type: 0 };\nvar EnforcerSort = class EnforcerSort extends EnforcerNode {\n\tinput;\n\tordering;\n\tinputGroup;\n\tconstructor(input, ordering) {\n\t\tsuper(input.isSynchronous);\n\t\tthis.input = input;\n\t\tthis.ordering = ordering;\n\t\tthis.inputGroup = input.getGroup();\n\t}\n\tgetHash() {\n\t\treturn calculateHash(\"EnforcerSort\", this.inputGroup.id, this.ordering);\n\t}\n\tgetOutputFields() {\n\t\treturn this.inputGroup.relational.outputFields;\n\t}\n\tcanProvideOrdering(ordering) {\n\t\treturn ordering.equals(this.ordering);\n\t}\n\tcanProvideResolvedFields() {\n\t\treturn true;\n\t}\n\tgetInputRequiredProps(required) {\n\t\tconst resolvedFields = new Fields(required.resolvedFields);\n\t\tfor (const { field } of this.ordering.fields) {\n\t\t\tif (field.name === \"index\") continue;\n\t\t\tif (isUndefined(field.collection)) continue;\n\t\t\tresolvedFields.add(field);\n\t\t}\n\t\tconst ordering = new Ordering();\n\t\treturn new RequiredProps(ordering, resolvedFields);\n\t}\n\toptimize(optimizer, required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst inputCost = optimizer.optimizeGroup(this.inputGroup, inputRequired);\n\t\treturn new Cost(0).add(inputCost);\n\t}\n\tgetOptimized(required) {\n\t\tconst inputRequired = this.getInputRequiredProps(required);\n\t\tconst input = this.inputGroup.getOptimized(inputRequired);\n\t\treturn new EnforcerSort(input, this.ordering);\n\t}\n\t*evaluate(context) {\n\t\treturn (yield* this.input.evaluate(context)).sort((leftTuple, rightTuple) => {\n\t\t\tfor (const { field, direction } of this.ordering.fields) {\n\t\t\t\tconst isAscending = direction === \"asc\";\n\t\t\t\tif (field.name === \"index\") {\n\t\t\t\t\tconst collection = field.collection;\n\t\t\t\t\tassert$1(collection, \"Collection required for sorting\");\n\t\t\t\t\tconst leftPointer = leftTuple.getPointer(collection);\n\t\t\t\t\tassert$1(leftPointer, \"Pointer required for sorting\");\n\t\t\t\t\tconst leftItem = {\n\t\t\t\t\t\tpointer: leftPointer,\n\t\t\t\t\t\tdata: {}\n\t\t\t\t\t};\n\t\t\t\t\tconst rightPointer = rightTuple.getPointer(collection);\n\t\t\t\t\tassert$1(rightPointer, \"Pointer required for sorting\");\n\t\t\t\t\tconst rightItem = {\n\t\t\t\t\t\tpointer: rightPointer,\n\t\t\t\t\t\tdata: {}\n\t\t\t\t\t};\n\t\t\t\t\tconst order = collection.data.compareItems(leftItem, rightItem);\n\t\t\t\t\treturn isAscending ? order : -order;\n\t\t\t\t}\n\t\t\t\tconst leftValue = leftTuple.getValue(field);\n\t\t\t\tconst rightValue = rightTuple.getValue(field);\n\t\t\t\tif (DatabaseValue.equal(leftValue, rightValue, collation$1)) continue;\n\t\t\t\tif (isNull(leftValue) || DatabaseValue.lessThan(leftValue, rightValue, collation$1)) return isAscending ? -1 : 1;\n\t\t\t\tif (isNull(rightValue) || DatabaseValue.greaterThan(leftValue, rightValue, collation$1)) return isAscending ? 1 : -1;\n\t\t\t\tthrow new Error(\"Invalid comparison\");\n\t\t\t}\n\t\t\treturn 0;\n\t\t});\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/nodes/relational/RelationalAssert.ts\nconst collation = { type: 1 };\n\n//#endregion\n//#region ../../library/src/modules/cms/optimizer/Optimizer.ts\n/**\n* The optimizer is responsible for creating the best query plan for a given\n* query. It is heavily inspired by the CockroachDB query optimizer and you will\n* find a lot of similarities between the two.\n*\n* This optimizer and the Cockroach optimizer are based on the Cascades query\n* optimizer which itself is based on the Volcano query optimizer. To learn more\n* about query optimizers here is a list of resources that helped me:\n* - The first 30 pages of this paper:\n*   https://15721.courses.cs.cmu.edu/spring2020/papers/20-optimizer2/xu-columbia-thesis1998.pdf\n* - This YouTube video starting at 1:00:01 and the next video:\n*   https://www.youtube.com/watch?v=DwX0X8CyBSg\n* - This blog post but unfortunately the series looks abandoned:\n*   https://xuanwo.io/2024/02-what-i-talk-about-when-i-talk-about-query-optimizer-part-1/\n* - The Cockroach repo (some code is auto generated by the build process):\n*   https://github.com/cockroachdb/cockroach\n* - This walkthrough of the Cockroach optimizer:\n*   https://github.com/cockroachdb/cockroach/blob/master/docs/tech-notes/life_of_a_query.md#logical-planning-and-optimization\n* - The EvaDB repo which is written in Python:\n*   https://github.com/georgia-tech-db/evadb\n*\n* This is how the optimizer works:\n*\n* We start by creating an initial query plan for a given query in the builder.\n* The query plan is a tree of different nodes (Cascades calls them expressions)\n* that describe what needs to be done to execute the query.\n*\n* For example, the following query:\n* ```\n* SELECT articles.title, authors.name\n* FROM articles\n* LEFT JOIN authors\n* ON articles.author_id = authors.id\n* WHERE articles.published = true\n* ORDER BY articles.title\n* ```\n*\n* Can be represented by the following query plan:\n* ```\n*      Filter(articles.published = true)\n*                      |\n*  LeftJoin(articles.author_id = authors.id)\n*        /                          \\\n*  Scan(articles)              Scan(authors)\n* ```\n*\n* Notice that the query plan doesn't include a node for the `ORDER BY` clause.\n* This is because ordering is a physical property of the relational node. Two\n* nodes can be logically equivalent if they return the same result, but in a\n* different order. The physical properties then describe additional properties\n* of the result.\n*\n* The general idea of the optimizer is to create alternative versions of the\n* initial query plan and finding the best one with a cost function. The hard\n* part is to avoid exponential complexity.\n*\n*\n* The main data structure of the optimizer is the memo. It's a directed acyclic\n* graph of all possible query plans. Because it's a graph, we can avoid\n* optimizing nodes that have already been optimized. This works by grouping\n* nodes that return the same result. It's called a memo because it memoizes the\n* optimization results. If a group was already optimized, we can return the\n* previous optimization result.\n*\n* The nodes in the memo are also known as multi-expressions because their\n* children are part of a group themselves. This means a single node is actually\n* representing multiple different query plans.\n*\n* The builder adds the normalized nodes of the initial query plan to the memo.\n* For example, the query plan above is represented by the following groups in\n* the memo:\n* ```\n* G1: Filter(G2)\n* G2: LeftJoin(G3, G4)\n* G3: Scan(articles)\n* G4: Scan(authors)\n* ```\n*\n* After the initial query plan is created, the optimizer starts by optimizing\n* the root group #1 with the root required physical props. In our case, the\n* physical props require the result to be sorted by the `articles.title` field.\n*\n* To optimize the root group, the optimizer iterates over all the nodes in the\n* group. For each node, the optimizer checks if it can provide the required\n* physical props. Because the filter node doesn't change the ordering of its\n* input, it can pass down the required ordering to it. But the cost of the\n* filter node can't be calculated yet without knowing the cost of its input, so\n* we need to recursively optimize the input group #2 of the filter.\n*\n* To optimize it, the same steps are applied. However, the left join cannot\n* provide the ordering, so the optimizer needs to add a sort enforcer. An\n* enforcer is a node that can always provide the required properties. The sort\n* enforcer recursively optimizes the group #2 again, but this time without the\n* required ordering. The left join can meet the reduced requirements, but to\n* calculate the cost, we again need to optimize the inputs of it.\n*\n* To optimize the input groups #3 and #4, the optimizer applies the same steps\n* again. Because the scan operator doesn't have any inputs, we can cost it and\n* store the result in the memo:\n* ```\n* G1: Filter(G2)\n* G2: LeftJoin(G3, G4)\n* G3: Scan(articles)\n* └── []\n*     ├── best: Scan(articles)\n*     └── cost: 10\n* G4: Scan(authors)\n* └── []\n*     ├── best: Scan(authors)\n*     └── cost: 10\n* ```\n*\n* After optimizing the inputs of the left join and costing it, the optimizer\n* creates alternative nodes that are logically equivalent to the original node.\n* In the case of the left join, the explorer creates a logically equivalent\n* right join. The new node is added to the same group as the original node:\n* ```\n* G1: Filter(G2)\n* G2: LeftJoin(G3, G4), RightJoin(G4, G3)\n* G3: Scan(articles)\n* └── []\n*     ├── best: Scan(articles)\n*     └── cost: 10\n* G4: Scan(authors)\n* └── []\n*     ├── best: Scan(authors)\n*     └── cost: 10\n* ```\n*\n* To cost the right join, the optimizer needs to optimize its inputs first.\n* Luckily, the inputs are already optimized, so we don't need to do anything\n* and can return the memoized best node and its cost instead.\n*\n* After the optimizer has optimized all nodes in the group #2, it can store the\n* best node in the memo:\n* ```\n* G1: Filter(G2)\n* G2: LeftJoin(G3, G4), RightJoin(G4, G3)\n* └── []\n*     ├── best: LeftJoin(G3, G4)\n*     └── cost: 20\n* G3: Scan(articles)\n* └── []\n*     ├── best: Scan(articles)\n*     └── cost: 10\n* G4: Scan(authors)\n* └── []\n*     ├── best: Scan(authors)\n*     └── cost: 10\n* ```\n*\n* But remember that the filter node passed down the ordering requirement. We\n* need to finish optimization of the group #2 with the additional ordering\n* requirement:\n* ```\n* G1: Filter(G2)\n* G2: LeftJoin(G3, G4), RightJoin(G4, G3)\n* ├── [ordering: articles.title]\n* │   ├── best: Sort(G2)\n* │   └── cost: 30\n* └── []\n*     ├── best: LeftJoin(G3, G4)\n*     └── cost: 25\n* G3: Scan(articles)\n* └── []\n*     ├── best: Scan(articles)\n*     └── cost: 10\n* G4: Scan(authors)\n* └── []\n*     ├── best: Scan(authors)\n*     └── cost: 10\n* ```\n*\n* Now we can bubble up again and also finish optimization of the root group #1:\n* ```\n* G1: Filter(G2)\n* └── [ordering: articles.title]\n*     ├── best: Filter(G2)\n*     └── cost: 40\n* G2: LeftJoin(G3, G4), RightJoin(G4, G3)\n* ├── [ordering: articles.title]\n* │   ├── best: Sort(G2)\n* │   └── cost: 35\n* └── []\n*     ├── best: LeftJoin(G3, G4)\n*     └── cost: 25\n* G3: Scan(articles)\n* └── []\n*     ├── best: Scan(articles)\n*     └── cost: 10\n* G4: Scan(authors)\n* └── []\n*     ├── best: Scan(authors)\n*     └── cost: 10\n* ```\n*\n* But the optimizer is not done yet. It also tries a top level sort enforcer\n* because that could be a better plan. It does so by recursively optimizing the\n* root group #1 without the ordering requirement:\n* ```\n* G1: Filter(G2)\n* ├── [ordering: articles.title]\n* │   ├── best: Filter(G2)\n* │   └── cost: 40\n* └── []\n*     ├── best: Filter(G2)\n*     └── cost: 25\n* G2: LeftJoin(G3, G4), RightJoin(G4, G3)\n* ├── [ordering: articles.title]\n* │   ├── best: Sort(G2)\n* │   └── cost: 35\n* └── []\n*     ├── best: LeftJoin(G3, G4)\n*     └── cost: 25\n* G3: Scan(articles)\n* └── []\n*     ├── best: Scan(articles)\n*     └── cost: 10\n* G4: Scan(authors)\n* └── []\n*     ├── best: Scan(authors)\n*     └── cost: 10\n* ```\n*\n* Turns out that the sort enforcer of group #1 has to sort fewer items than the\n* sort enforcer of group #2. So the overall cost of the query plan with the top\n* level sort enforcer is lower than the query plan without it:\n* ```\n* G1: Filter(G2)\n* ├── [ordering: articles.title]\n* │   ├── best: Sort(G1)\n* │   └── cost: 40\n* └── []\n*     ├── best: Filter(G2)\n*     └── cost: 25\n* G2: LeftJoin(G3, G4), RightJoin(G4, G3)\n* ├── [ordering: articles.title]\n* │   ├── best: Sort(G2)\n* │   └── cost: 35\n* └── []\n*     ├── best: LeftJoin(G3, G4)\n*     └── cost: 25\n* G3: Scan(articles)\n* └── []\n*     ├── best: Scan(articles)\n*     └── cost: 10\n* G4: Scan(authors)\n* └── []\n*     ├── best: Scan(authors)\n*     └── cost: 10\n* ```\n*\n* As the final step, the optimizer creates the optimized root node, with all\n* its children replaced by their best nodes.\n*/\nvar Optimizer = class {\n\tquery;\n\tlocale;\n\tresolver;\n\tmemo = new Memo();\n\tnormalizer = new Normalizer(this.memo);\n\texplorer = new Explorer(this.normalizer);\n\tconstructor(query, locale, resolver) {\n\t\tthis.query = query;\n\t\tthis.locale = locale;\n\t\tthis.resolver = resolver;\n\t}\n\toptimize(priority) {\n\t\tconst outScope = new Builder(this.normalizer, this.query, this.locale).build();\n\t\tconst yieldPromise = yieldToMainDuringEvaluation(priority);\n\t\tif (yieldPromise) return yieldPromise.then(() => this.optimizeBuiltQuery(outScope));\n\t\treturn this.optimizeBuiltQuery(outScope);\n\t}\n\toptimizeBuiltQuery(outScope) {\n\t\tconst group = outScope.takeNode().getGroup();\n\t\tconst required = outScope.getRequiredProps();\n\t\tthis.optimizeGroup(group, required);\n\t\treturn [group.getOptimized(required), outScope.getNamedFields()];\n\t}\n\toptimizeGroup(group, required) {\n\t\tconst winner = group.getWinner(required);\n\t\tif (winner.node) return winner.cost;\n\t\tconst normalized = group.nodes[0];\n\t\tassert$1(normalized, \"Normalized node not found\");\n\t\tthis.createEnforcer(winner, normalized, required);\n\t\tfor (const node of group.nodes) {\n\t\t\tif (required.canProvide(node)) {\n\t\t\t\tconst cost = node.optimize(this, required);\n\t\t\t\twinner.update(node, cost);\n\t\t\t}\n\t\t\tif (required.isMinimal) this.explorer.explore(node);\n\t\t}\n\t\treturn winner.cost;\n\t}\n\tcreateEnforcer(winner, node, required) {\n\t\tif (required.resolvedFields.size > 0) {\n\t\t\tconst enforcer = new EnforcerResolve(node, required.resolvedFields, this.resolver);\n\t\t\tconst cost = enforcer.optimize(this, required);\n\t\t\twinner.update(enforcer, cost);\n\t\t}\n\t\tif (required.ordering.length > 0) {\n\t\t\tconst enforcer = new EnforcerSort(node, required.ordering);\n\t\t\tconst cost = enforcer.optimize(this, required);\n\t\t\twinner.update(enforcer, cost);\n\t\t}\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/stringifyQuery.ts\nfunction stringifyIdentifier(expression) {\n\tif (expression.collection) return `\"${expression.collection}\".\"${expression.name}\"`;\n\treturn `\"${expression.name}\"`;\n}\nfunction stringifyLiteralValue(expression) {\n\tif (typeof expression.value === \"string\") return `'${expression.value}'`;\n\treturn expression.value;\n}\nfunction stringifyFunctionCall(expression) {\n\treturn `${expression.functionName}(${expression.arguments.map((argument) => stringifyExpression(argument)).join(\", \")})`;\n}\nfunction stringifyCaseExpression(expression) {\n\tlet caseString = \"CASE\";\n\tif (expression.value) caseString += ` ${stringifyExpression(expression.value)}`;\n\tfor (const condition of expression.conditions) caseString += ` WHEN ${stringifyExpression(condition.when)} THEN ${stringifyExpression(condition.then)}`;\n\tif (expression.else) caseString += ` ELSE ${stringifyExpression(expression.else)}`;\n\tcaseString += \" END\";\n\treturn caseString;\n}\nfunction stringifyUnaryOperation(expression) {\n\tconst value = stringifyExpression(expression.value);\n\treturn `${expression.operator.toUpperCase()} ${value}`;\n}\nfunction stringifyBinaryOperation(expression) {\n\tconst left = stringifyExpression(expression.left);\n\tconst right = stringifyExpression(expression.right);\n\treturn `${left} ${expression.operator.toUpperCase()} ${right}`;\n}\nfunction stringifyTypeCast(expression) {\n\treturn `CAST(${stringifyExpression(expression.value)} as ${expression.dataType})`;\n}\nfunction stringifyExpression(expression) {\n\tswitch (expression.type) {\n\t\tcase \"Identifier\": return stringifyIdentifier(expression);\n\t\tcase \"LiteralValue\": return stringifyLiteralValue(expression);\n\t\tcase \"FunctionCall\": return stringifyFunctionCall(expression);\n\t\tcase \"Case\": return stringifyCaseExpression(expression);\n\t\tcase \"UnaryOperation\": return stringifyUnaryOperation(expression);\n\t\tcase \"BinaryOperation\": return stringifyBinaryOperation(expression);\n\t\tcase \"TypeCast\": return stringifyTypeCast(expression);\n\t\tcase \"Select\": return `${stringifyQuery(expression)}`;\n\t\tdefault: assertNever$1(expression);\n\t}\n}\nfunction stringifyCollection(collection) {\n\tif (isDatabaseCollection(collection.data)) return \"Collection\";\n\tif (collection.alias) return `\"${collection.data.displayName}\" AS \"${collection.alias}\"`;\n\treturn `\"${collection.data.displayName}\"`;\n}\nfunction stringifyJoin(join) {\n\tlet result = `${stringifyFrom(join.left)} LEFT JOIN ${stringifyFrom(join.right)}`;\n\tif (join.constraint) result += ` ON ${stringifyExpression(join.constraint)}`;\n\treturn result;\n}\nfunction stringifyFrom(from) {\n\tswitch (from.type) {\n\t\tcase \"Collection\": return stringifyCollection(from);\n\t\tcase \"LeftJoin\": return stringifyJoin(from);\n\t\tdefault: assertNever$1(from);\n\t}\n}\nfunction autoIndentSql(sql) {\n\tlet formattedSql = \"\";\n\tsql.split(/\\s+/u).forEach((token) => {\n\t\tif (token === \"\") return;\n\t\tif ([\n\t\t\t\"SELECT\",\n\t\t\t\"FROM\",\n\t\t\t\"WHERE\",\n\t\t\t\"ORDER\",\n\t\t\t\"LIMIT\",\n\t\t\t\"OFFSET\"\n\t\t].includes(token)) formattedSql += `\\n${token}`;\n\t\telse if ([\"AND\", \"OR\"].includes(token)) formattedSql += `\\n\\t${token}`;\n\t\telse formattedSql += ` ${token}`;\n\t});\n\treturn formattedSql.trim();\n}\nfunction stringifyQuery(query) {\n\tlet queryString = \"\";\n\tqueryString += `SELECT ${query.select.map((selectExpression) => {\n\t\tconst expressionString = stringifyExpression(selectExpression);\n\t\tif (selectExpression.alias) return `${expressionString} AS \"${selectExpression.alias}\"`;\n\t\treturn expressionString;\n\t}).join(\", \")}`;\n\tqueryString += ` FROM ${stringifyFrom(query.from)}`;\n\tif (query.where) queryString += ` WHERE ${stringifyExpression(query.where)}`;\n\tif (query.orderBy) queryString += ` ORDER BY ${query.orderBy.map((orderExpression) => {\n\t\treturn `${stringifyExpression(orderExpression)} ${orderExpression.direction ?? \"asc\"}`;\n\t}).join(\", \")}`;\n\tif (query.limit) queryString += ` LIMIT ${stringifyExpression(query.limit)}`;\n\tif (query.offset) queryString += ` OFFSET ${stringifyExpression(query.offset)}`;\n\treturn autoIndentSql(queryString);\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/QueryEngine.ts\nconst log = /* @__PURE__ */ getLogger(\"query-engine\");\nvar QueryEngine = class {\n\tasync evalQuery(query, locale, includeRaw, priority) {\n\t\tif (log.enabled) log.debug(`Query:\\n${stringifyQuery(query)}`);\n\t\tconst resolver = new Resolver(query, locale, priority);\n\t\tconst optimizer = new Optimizer(query, locale, resolver);\n\t\tconst yieldPromise = yieldToMainDuringEvaluation(resolver.priority);\n\t\tif (yieldPromise) await yieldPromise;\n\t\tconst optimized = optimizer.optimize(priority);\n\t\tconst [root, namedFields] = isPromise(optimized) ? await optimized : optimized;\n\t\tconst afterOptimizationYield = yieldToMainDuringEvaluation(priority);\n\t\tif (afterOptimizationYield) await afterOptimizationYield;\n\t\tconst relation = await root.evaluateAsync(priority);\n\t\tconst namedFieldEntries = Object.entries(namedFields);\n\t\tconst rawResults = [];\n\t\tconst rowEvaluators = [];\n\t\tfor (const tuple of relation.tuples) {\n\t\t\tconst yieldPromise = yieldToMainDuringEvaluation(priority);\n\t\t\tif (yieldPromise) await yieldPromise;\n\t\t\tconst object = {};\n\t\t\tconst rawObject = {};\n\t\t\tfor (const [fieldName, field] of namedFieldEntries) {\n\t\t\t\tconst value = tuple.getValue(field);\n\t\t\t\tobject[fieldName] = resolver.resolveValue(value);\n\t\t\t\tif (includeRaw) rawObject[fieldName] = value;\n\t\t\t}\n\t\t\tif (includeRaw) rawResults.push(rawObject);\n\t\t\trowEvaluators.push(evaluateObject(object, priority));\n\t\t}\n\t\tconst maybeEvaluatedPromise = evaluateMaybeAsync(evaluateArray(rowEvaluators, priority), priority);\n\t\tif (includeRaw) return [isPromise(maybeEvaluatedPromise) ? await maybeEvaluatedPromise : maybeEvaluatedPromise, rawResults];\n\t\treturn maybeEvaluatedPromise;\n\t}\n\tasync serializeableQuery(query, locale, priority) {\n\t\treturn this.evalQuery(query, locale, true, priority);\n\t}\n\tasync query(query, locale, priority) {\n\t\treturn this.evalQuery(query, locale, false, priority);\n\t}\n\tresolveSerializableQueryResult(raw, query, locale, priority) {\n\t\tconst resolver = new Resolver(query, locale, priority);\n\t\treturn evaluateMaybeAsync(evaluateArray(raw.map((item) => {\n\t\t\tconst object = {};\n\t\t\tlet key;\n\t\t\tfor (key in item) {\n\t\t\t\tconst value = item[key];\n\t\t\t\tobject[key] = resolver.resolveValue(value);\n\t\t\t}\n\t\t\treturn evaluateObject(object);\n\t\t})), void 0, false);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/QueryCache.ts\nconst handoverDataType = /* @__PURE__ */ (() => HandoverDataType.QueryCache)();\nfunction isCollection(value) {\n\treturn isObject$1(value) && value.type === \"Collection\";\n}\n/**\n* Every instance manages its own cache and size.\n*/\nvar QueryCache = class {\n\tqueryEngine;\n\tmaxSize;\n\tcache = /* @__PURE__ */ new Map();\n\t/** Server-only cache for serialized results to avoid re-serializing on cache hits */\n\tserializedCache = handoverCollector !== void 0 ? /* @__PURE__ */ new Map() : void 0;\n\tconstructor(queryEngine, maxSize = Infinity) {\n\t\tthis.queryEngine = queryEngine;\n\t\tthis.maxSize = maxSize;\n\t}\n\tclear() {\n\t\tthis.cache.clear();\n\t\tthis.serializedCache?.clear();\n\t}\n\tprune() {\n\t\tif (this.cache.size <= this.maxSize) return;\n\t\tfor (const [key, entry] of this.cache) {\n\t\t\tif (this.cache.size <= this.maxSize) break;\n\t\t\tif (entry.value.state === \"pending\") continue;\n\t\t\tthis.cache.delete(key);\n\t\t\tthis.serializedCache?.delete(key);\n\t\t}\n\t}\n\tget(query, locale, priority) {\n\t\tconst key = getCacheKey(query, locale);\n\t\tconst existing = this.cache.get(key);\n\t\tif (existing) {\n\t\t\tconst requestedPriority = readExecutionPriority(priority) ?? \"user-visible\";\n\t\t\tconst existingPriority = readExecutionPriority(existing.priority);\n\t\t\tif (existingPriority === void 0 && priority !== void 0 && existing.value.state === \"pending\") {\n\t\t\t\tthis.cache.delete(key);\n\t\t\t\treturn this.get(query, locale, priority);\n\t\t\t}\n\t\t\tif (existingPriority !== void 0 && isHigherSchedulerPriority(requestedPriority, existingPriority) && existing.value.state === \"pending\") {\n\t\t\t\tthis.cache.delete(key);\n\t\t\t\treturn this.get(query, locale, requestedPriority);\n\t\t\t}\n\t\t\tthis.cache.delete(key);\n\t\t\tthis.cache.set(key, existing);\n\t\t\tif (handoverCollector !== void 0 && this.serializedCache !== void 0 && !hasRandomCollectionId(key) && existing.value.state === \"fulfilled\") {\n\t\t\t\tconst cachedSerialized = this.serializedCache.get(key);\n\t\t\t\tif (cachedSerialized !== void 0) handoverCollector.set(handoverDataType, key, cachedSerialized);\n\t\t\t}\n\t\t\treturn existing.value;\n\t\t}\n\t\tconst resolver = () => {\n\t\t\tconst containsRandomCollectionId = hasRandomCollectionId(key);\n\t\t\tconst handoverResult = containsRandomCollectionId ? void 0 : getHandoverData(handoverDataType, key);\n\t\t\tif (handoverResult) try {\n\t\t\t\treturn this.queryEngine.resolveSerializableQueryResult(handoverResult, query, locale);\n\t\t\t} catch (error) {\n\t\t\t\thandleHydrationError(error, key);\n\t\t\t}\n\t\t\tif (handoverCollector !== void 0 && !containsRandomCollectionId) return this.queryEngine.serializeableQuery(query, locale, priority).then(([queryResult, serializableResult]) => {\n\t\t\t\tthis.serializedCache?.set(key, serializableResult);\n\t\t\t\thandoverCollector.set(handoverDataType, key, serializableResult);\n\t\t\t\treturn queryResult;\n\t\t\t});\n\t\t\treturn this.queryEngine.query(query, locale, priority);\n\t\t};\n\t\tconst value = new LazyValue(resolver);\n\t\tthis.cache.set(key, {\n\t\t\tvalue,\n\t\t\tpriority\n\t\t});\n\t\tthis.prune();\n\t\treturn value;\n\t}\n};\nfunction replaceCollection(_, value) {\n\tif (isCollection(value) && isAnyCollection(value.data)) return getCollectionId(value.data);\n\treturn value;\n}\nfunction getCacheKey(query, locale) {\n\tconst localeId = locale?.id ?? \"default\";\n\treturn JSON.stringify(query, replaceCollection) + localeId;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/errors.ts\nvar ServerDatabaseError = class extends Error {\n\tconstructor(...args) {\n\t\tconst [message = \"error\", ...rest] = args;\n\t\tsuper(`server database: ${message}`, ...rest);\n\t\tthis.name = \"ServerDatabaseError\";\n\t}\n};\n/**\n* Only use this for cases that we want to support but didn't implement yet.\n* For invalid input (e.g. broken project state), `warnOnce` (or `throw` if unrecoverable) a `ServerDatabaseError`.\n*/\nvar UnsupportedQueryError = class extends ServerDatabaseError {\n\tconstructor(...args) {\n\t\tconst [message = \"error\", ...rest] = args;\n\t\tsuper(`unsupported: ${message}`, ...rest);\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/raw.ts\nfunction isServerDatabaseRawValue(value) {\n\treturn value === null || typeof value === \"string\" || typeof value === \"number\";\n}\nfunction isServerDatabaseRawRow(value) {\n\treturn isObject$1(value) && Object.values(value).every(isServerDatabaseRawValue);\n}\nfunction isServerDatabaseRawQueryResult(value) {\n\treturn isObject$1(value) && Array.isArray(value.rows) && value.rows.every(isServerDatabaseRawRow);\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/NetworkServerDatabase.ts\nfunction isServerDatabaseResponse(value) {\n\tif (!isObject$1(value)) return false;\n\tconst hasData = \"data\" in value;\n\tif (hasData === \"error\" in value) return false;\n\tif (hasData) return isServerDatabaseRawQueryResult(value.data);\n\treturn isObject$1(value.error) && typeof value.error.message === \"string\";\n}\nvar NetworkServerDatabase = class {\n\turl;\n\tconstructor(config) {\n\t\tconst url = new URL(`${config.endpoint}/${config.siteId}/query`);\n\t\turl.searchParams.set(\"root\", config.root);\n\t\tthis.url = url.toString();\n\t}\n\tasync query(sql, parameters = {}) {\n\t\tconst url = new URL(this.url);\n\t\tconst statement = { sql };\n\t\tif (!isEmptyObject(parameters)) statement.params = parameters;\n\t\turl.searchParams.set(\"statement\", JSON.stringify(statement));\n\t\tconst response = await fetch(url.href, { headers: { Accept: \"application/json\" } });\n\t\tif (response.headers.get(\"content-type\")?.split(\";\", 1)[0]?.trim().toLowerCase() !== \"application/json\") throw new ServerDatabaseError(`Query failed with status ${response.status}: Expected JSON response`);\n\t\tlet responseBody;\n\t\ttry {\n\t\t\tresponseBody = await response.json();\n\t\t} catch {\n\t\t\tthrow new ServerDatabaseError(`Query returned invalid JSON`);\n\t\t}\n\t\tconst serverDatabaseResponse = isServerDatabaseResponse(responseBody) ? responseBody : void 0;\n\t\tconst data = serverDatabaseResponse && \"data\" in serverDatabaseResponse ? serverDatabaseResponse.data : void 0;\n\t\tconst error = serverDatabaseResponse && \"error\" in serverDatabaseResponse ? serverDatabaseResponse.error : void 0;\n\t\tif (error || !response.ok) throw new ServerDatabaseError(`Query failed with status ${response.status}${error ? `: ${error.message}` : \"\"}`);\n\t\tif (!data) throw new ServerDatabaseError(\"Query returned invalid response\");\n\t\treturn data;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/mapValueToRaw.ts\nfunction mapValueToRaw(value) {\n\tif (value === null || typeof value === \"string\" || typeof value === \"number\") return value;\n\tif (typeof value === \"boolean\") return value ? 1 : 0;\n\treturn JSON.stringify(value);\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/mapParametersToRaw.ts\nfunction mapParametersToRaw(parameters) {\n\treturn Object.fromEntries(Object.entries(parameters).map(([name, value]) => [name, mapValueToRaw(value)]));\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/rich-text/ServerRichText.ts\nfunction isServerRichTextNode(value) {\n\tif (isString(value)) return true;\n\tif (isObject$1(value) && isString(value.type)) return true;\n\treturn false;\n}\n\n//#endregion\n//#region ../../library/src/utils/shouldBeNever.ts\n/**\n* A utility function that does nothing but makes TypeScript check for the never type.\n*\n* For example, sometimes something that should never happen is expected to\n* happen, like during a rollback. To prevent unwanted crashers use\n* `shouldBeNever` instead of `assertNever`.\n*/\nfunction shouldBeNever(_) {}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/rich-text/renderServerRichText.tsx\nconst logger$1 = /* @__PURE__ */ getLogger(\"server database\");\nfunction renderServerRichText(node, components) {\n\tif (typeof node === \"string\") return node;\n\tfunction renderChildren(children) {\n\t\treturn children.map((child) => renderServerRichText(child, components));\n\t}\n\tswitch (node.type) {\n\t\tcase \"fragment\": {\n\t\t\tconst children = renderChildren(node.children);\n\t\t\treturn createElement(Fragment, void 0, ...children);\n\t\t}\n\t\tcase \"tag\": {\n\t\t\tconst children = renderChildren(node.children);\n\t\t\tif (node.tag === \"a\") return createElement(motion.a, node.props, ...children);\n\t\t\treturn createElement(node.tag, node.props, ...children);\n\t\t}\n\t\tcase \"link\": {\n\t\t\tconst children = renderChildren(node.children);\n\t\t\treturn createElement(Link, node.props, ...children);\n\t\t}\n\t\tcase \"module\": {\n\t\t\tconst Component = components[node.identifier];\n\t\t\tif (!Component) {\n\t\t\t\tlogger$1.warn(new ServerDatabaseError(`Missing component for rich text module ${node.identifier}, rendering nothing.`));\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tComponent.preload();\n\t\t\treturn renderServerRichTextModule(node, Component);\n\t\t}\n\t\tdefault:\n\t\t\t/* @__PURE__ */ shouldBeNever(node);\n\t\t\treturn null;\n\t}\n}\nfunction renderServerRichTextModule({ identifier, width, alignment, aspectRatio }, Component) {\n\tconst wrapperProps = getRichTextModuleWrapperProps(width, alignment, aspectRatio);\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\t...wrapperProps,\n\t\tchildren: /* @__PURE__ */ jsx(ComponentPresetsConsumer, {\n\t\t\tcomponentIdentifier: identifier,\n\t\t\tchildren: (presetProps) => /* @__PURE__ */ jsx(AutoBreakpointVariant, {\n\t\t\t\tcomponent: Component,\n\t\t\t\tprops: { ...presetProps }\n\t\t\t})\n\t\t})\n\t});\n}\nfunction getRichTextModuleWrapperProps(width, alignment, aspectRatio) {\n\tconst style = {\n\t\twidth: \"100%\",\n\t\theight: \"auto\",\n\t\taspectRatio\n\t};\n\tif (width === \"fit\") {\n\t\tstyle.overflow = \"hidden\";\n\t\tstyle.width = \"fit-content\";\n\t\tif (alignment === \"center\") {\n\t\t\tstyle.marginLeft = \"auto\";\n\t\t\tstyle.marginRight = \"auto\";\n\t\t} else if (alignment === \"right\") style.marginLeft = \"auto\";\n\t}\n\treturn {\n\t\tclassName: \"framer-text-module\",\n\t\tstyle,\n\t\t\"data-width\": width\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/mapValueFromRaw.ts\nconst logger = /* @__PURE__ */ getLogger(\"server database\");\n/** Only vector set items map asynchronously, because they load the referenced module. */\nfunction mapValueFromRaw(value, type, components) {\n\tif (type === \"unsupported\") {\n\t\tlogger.warn(new UnsupportedQueryError(`result type, returning null.`));\n\t\treturn null;\n\t}\n\tif (value === null) return null;\n\tswitch (type) {\n\t\tcase \"boolean\": return mapBooleanValue(value);\n\t\tcase \"date\": return mapDateValue(value);\n\t\tcase \"number\": return mapNumberValue(value);\n\t\tcase \"color\":\n\t\tcase \"enum\":\n\t\tcase \"file\":\n\t\tcase \"string\":\n\t\tcase \"collectionreference\": return mapStringValue(value);\n\t\tcase \"multicollectionreference\": return mapStringArrayJsonValue(value);\n\t\tcase \"responsiveimage\": return mapImageJsonValue(value);\n\t\tcase \"richtext\": return mapRichTextJsonValue(value, components);\n\t\tcase \"link\": return mapLinkJsonValue(value);\n\t\tcase \"vectorsetitem\": return mapVectorSetItemValue(value, components);\n\t\tdefault: assertNever$1(type, \"Unknown server query result type\");\n\t}\n}\nfunction mapBooleanValue(value) {\n\tif (value === 0) return false;\n\tif (value === 1) return true;\n\tlogger.warn(new ServerDatabaseError(`Unexpected boolean value ${value}, returning null.`));\n\treturn null;\n}\nfunction mapDateValue(value) {\n\tif (typeof value !== \"string\") {\n\t\tlogger.warn(new ServerDatabaseError(`Unexpected date value ${value}, returning null.`));\n\t\treturn null;\n\t}\n\tconst date = new Date(value);\n\tif (!isValidDate(date)) {\n\t\tlogger.warn(new ServerDatabaseError(`Unexpected date value ${value}, returning null.`));\n\t\treturn null;\n\t}\n\treturn date.toISOString();\n}\nfunction mapNumberValue(value) {\n\tif (typeof value !== \"number\") {\n\t\tlogger.warn(new ServerDatabaseError(`Unexpected number value ${value}, returning null.`));\n\t\treturn null;\n\t}\n\treturn value;\n}\nfunction mapStringValue(value) {\n\tif (typeof value !== \"string\") {\n\t\tlogger.warn(new ServerDatabaseError(`Unexpected string value ${value}, returning null.`));\n\t\treturn null;\n\t}\n\treturn value;\n}\nfunction mapStringArrayJsonValue(value) {\n\tif (typeof value === \"string\") try {\n\t\tconst parsed = JSON.parse(value);\n\t\tif (isStringArray(parsed)) return parsed;\n\t} catch {}\n\tlogger.warn(new ServerDatabaseError(`Unexpected multi reference value ${value}, returning null.`));\n\treturn null;\n}\nfunction isStringArray(value) {\n\treturn Array.isArray(value) && value.every((item) => typeof item === \"string\");\n}\nfunction mapImageJsonValue(value) {\n\tif (typeof value === \"string\") try {\n\t\tconst parsed = JSON.parse(value);\n\t\tif (isImageValue(parsed)) return parsed;\n\t} catch {}\n\tlogger.warn(new ServerDatabaseError(`Unexpected image value ${value}, returning null.`));\n\treturn null;\n}\nfunction isImageValue(value) {\n\treturn isObject$1(value) && typeof value.src === \"string\";\n}\nfunction mapRichTextJsonValue(value, components) {\n\tif (typeof value === \"string\") try {\n\t\tconst parsed = JSON.parse(value);\n\t\tif (isServerRichTextNode(parsed)) return renderServerRichText(parsed, components);\n\t} catch {}\n\tlogger.warn(new ServerDatabaseError(`Unexpected rich text value ${value}, returning null.`));\n\treturn null;\n}\nfunction mapLinkJsonValue(value) {\n\tif (typeof value === \"string\") try {\n\t\tconst parsed = JSON.parse(value);\n\t\tif (typeof parsed === \"string\" || isLinkToWebPage(parsed)) return parsed;\n\t} catch {}\n\tlogger.warn(new ServerDatabaseError(`Unexpected link value ${value}, returning null.`));\n\treturn null;\n}\nfunction mapVectorSetItemValue(value, components) {\n\tif (typeof value !== \"string\") {\n\t\tlogger.warn(new ServerDatabaseError(`Unexpected vector set item value ${value}, returning null.`));\n\t\treturn null;\n\t}\n\tconst Component = components[value];\n\tif (!Component) {\n\t\tlogger.warn(new ServerDatabaseError(`Missing component for vector set item ${value}, returning null.`));\n\t\treturn null;\n\t}\n\tComponent.preload();\n\treturn Component;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/mapRowsFromRaw.ts\nfunction mapRowsFromRaw(rows, columns, components) {\n\treturn rows.map((row) => {\n\t\tconst mappedRow = {};\n\t\tfor (const column of columns) {\n\t\t\tif (!(column.fieldName in row)) throw new ServerDatabaseError(`Expected SQL result column \"${column.fieldName}\".`);\n\t\t\tconst value = row[column.fieldName];\n\t\t\tif (value === void 0) throw new ServerDatabaseError(`Expected SQL result column \"${column.fieldName}\" returned undefined.`);\n\t\t\tmappedRow[column.fieldName] = mapValueFromRaw(value, column.type, components);\n\t\t}\n\t\treturn mappedRow;\n\t});\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/sql/systemColumns.ts\nconst collectionItemIdColumn = \"collectionItemId\";\nconst positionColumn = \"position\";\nconst arrayItemIdColumn = \"arrayItemId\";\nconst indexColumn = \"index\";\nconst referencedCollectionItemIdColumn = \"referencedCollectionItemId\";\nconst createdAtColumn = \"createdAt\";\nconst updatedAtColumn = \"updatedAt\";\nconst localeIdColumn = \"localeId\";\nconst inclusionColumn = \"inclusion\";\nconst excludeInclusionValue = \"exclude\";\nconst systemColumns = [\n\tcollectionItemIdColumn,\n\tpositionColumn,\n\tarrayItemIdColumn,\n\tindexColumn,\n\treferencedCollectionItemIdColumn,\n\tcreatedAtColumn,\n\tupdatedAtColumn,\n\tlocaleIdColumn\n];\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/sql/sql.ts\nvar BaseSafeSql = class extends String {};\nfunction isSafeSql(value) {\n\treturn value instanceof BaseSafeSql;\n}\nvar SafeSql = class extends BaseSafeSql {};\nfunction sqlTemplate(strings, ...statementsAndParameters) {\n\tassert(strings[0] !== void 0, \"sql template literal must have at least one string part\");\n\tconst result = [new SafeSql(strings[0])];\n\tstatementsAndParameters.forEach((statementOrParameter, i) => {\n\t\tassert(strings[i + 1] !== void 0, \"sql template literal must have a string part after each statement or parameter\");\n\t\tconst nextStringPart = new SafeSql(strings[i + 1]);\n\t\tif (Array.isArray(statementOrParameter)) {\n\t\t\tresult.push(...statementOrParameter, nextStringPart);\n\t\t\treturn;\n\t\t}\n\t\tif (statementOrParameter instanceof BaseSafeSql) {\n\t\t\tresult.push(statementOrParameter, nextStringPart);\n\t\t\treturn;\n\t\t}\n\t\tif (isSqlParameter(statementOrParameter)) {\n\t\t\tresult.push(statementOrParameter, nextStringPart);\n\t\t\treturn;\n\t\t}\n\t\tassertNever(statementOrParameter, \"Unknown value in sql template literal\");\n\t});\n\treturn result;\n}\nfunction join(statements, separator, emptyFallback) {\n\tconst result = [];\n\tfor (const statement of statements) {\n\t\tif (result.length > 0) result.push(new SafeSql(separator));\n\t\tif (Array.isArray(statement)) result.push(...statement);\n\t\telse result.push(statement);\n\t}\n\tif (result.length === 0) {\n\t\tif (!emptyFallback) return void 0;\n\t\tresult.push(new SafeSql(emptyFallback));\n\t}\n\treturn result;\n}\nconst identifierRegex = /^[a-z][\\w/:]+$/iu;\nfunction assertIdentifier(identifierString) {\n\tif (!identifierRegex.test(identifierString)) throw new Error(`Only system columns, collection ids, and field ids may be used as SQL identifiers. Received invalid SQL identifier: ${identifierString}`);\n}\nfunction identifier(identifierString) {\n\tassertIdentifier(identifierString);\n\treturn new SafeSql(`\"${identifierString}\"`);\n}\nfunction assertQualifier(qualifierString) {\n\tif (!qualifierString.split(\".\").every((segment) => identifierRegex.test(segment) && !systemColumns.includes(segment))) throw new Error(`Only collection ids and field ids may be used as SQL qualifiers. Received invalid SQL qualifier: ${qualifierString}`);\n}\nfunction qualifier(qualifierString) {\n\tassertQualifier(qualifierString);\n\treturn new SafeSql(`\"${qualifierString}\"`);\n}\nfunction qualifiedIdentifier(qualifierString, id) {\n\treturn sql`${qualifier(qualifierString)}.${identifier(id)}`;\n}\nfunction alias(aliasString) {\n\tconst lastSeparatorIndex = aliasString.lastIndexOf(\".\");\n\tif (lastSeparatorIndex === -1) return identifier(aliasString);\n\tconst qualifierString = aliasString.slice(0, lastSeparatorIndex);\n\tconst identifierString = aliasString.slice(lastSeparatorIndex + 1);\n\tassertQualifier(qualifierString);\n\tassertIdentifier(identifierString);\n\treturn new SafeSql(`\"${aliasString}\"`);\n}\nfunction parameter(name, value) {\n\tassert(parameterRegex.test(name), `Invalid SQL parameter name ${name}`);\n\treturn {\n\t\tname,\n\t\tvalue\n\t};\n}\nconst sql = /* @__PURE__ */ Object.assign(sqlTemplate, {\n\tjoin,\n\tidentifier,\n\tqualifiedIdentifier,\n\talias,\n\tparameter\n});\nconst parameterRegex = /^\\w+$/u;\nfunction isSqlParameter(value) {\n\treturn typeof value === \"object\" && value !== null && \"name\" in value && \"value\" in value;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/sql/serializeSql.ts\nfunction serializeSql(statement) {\n\tlet sql = \"\";\n\tconst parameters = {};\n\tfor (const part of Array.isArray(statement) ? statement : [statement]) {\n\t\tif (isSafeSql(part)) {\n\t\t\tsql += part;\n\t\t\tcontinue;\n\t\t}\n\t\tif (isSqlParameter(part)) {\n\t\t\tlet conflictingParameterCount = 0;\n\t\t\tlet name = part.name;\n\t\t\twhile (true) {\n\t\t\t\tif (parameters[name] === void 0) break;\n\t\t\t\tif (parameters[name] === part.value) break;\n\t\t\t\tconflictingParameterCount++;\n\t\t\t\tname = `${part.name}::${conflictingParameterCount}`;\n\t\t\t}\n\t\t\tsql += `$${name}`;\n\t\t\tparameters[name] = part.value;\n\t\t\tcontinue;\n\t\t}\n\t\tassertNever(part, \"Unknown part in SQL statement\");\n\t}\n\treturn {\n\t\tsql,\n\t\tparameters\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/sql/systemTables.ts\nfunction getItemsTable(collectionId) {\n\treturn `${collectionId}/items`;\n}\nfunction getItemLocalizationsTable(collectionId) {\n\treturn `${collectionId}/itemLocalizations`;\n}\nfunction getItemMultiCollectionReferencesTable(collectionId) {\n\treturn `${collectionId}/itemMultiCollectionReferences`;\n}\nfunction getItemMultiCollectionReferencesView(collectionId, fieldId) {\n\treturn `${getItemMultiCollectionReferencesTable(collectionId)}/${fieldId}`;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/localization.ts\nfunction getLocalizedItemsCte(collectionId) {\n\treturn `${collectionId}/localizedItems`;\n}\nfunction getValueInLocaleColumn(fieldId, localeId) {\n\treturn `${fieldId}/${localeId}`;\n}\nfunction getLocalizedValueColumn(fieldId) {\n\treturn `localized/${fieldId}`;\n}\nfunction registerLocalizedField(collectionId, fieldId, field, { localizedItemTables }) {\n\tconst localizedFields = localizedItemTables.get(collectionId) ?? /* @__PURE__ */ new Map();\n\tlocalizedFields.set(fieldId, field);\n\tlocalizedItemTables.set(collectionId, localizedFields);\n}\nfunction registerItemsTable(collectionId, { chainedLocaleIds, localizedItemTables }) {\n\tif (chainedLocaleIds.length === 0) return getItemsTable(collectionId);\n\tif (!localizedItemTables.has(collectionId)) localizedItemTables.set(collectionId, /* @__PURE__ */ new Map());\n\treturn getLocalizedItemsCte(collectionId);\n}\nfunction compileLocalizedValue(expression, localizedExpressions, field) {\n\tif (field.type === \"responsiveimage\") {\n\t\tconst localizedImagesWithoutAlt = localizedExpressions.map((image) => {\n\t\t\tconst imageContainsSrc = sql`json_extract(${image}, '$.src') IS NOT NULL`;\n\t\t\tconst imageWithoutAlt = sql`json_remove(${image}, '$.alt')`;\n\t\t\treturn sql`IIF(${imageContainsSrc}, ${imageWithoutAlt}, NULL)`;\n\t\t});\n\t\tconst defaultImageWithoutAlt = sql`json_remove(${expression}, '$.alt')`;\n\t\tconst imageWithoutAlt = sql`COALESCE(${sql.join([...localizedImagesWithoutAlt, defaultImageWithoutAlt], \", \", \"1\")})`;\n\t\tconst alts = [...localizedExpressions, expression].map((image) => sql`json_extract(${image}, '$.alt')`);\n\t\tconst alt = sql`json_object('alt', COALESCE(${sql.join(alts, \", \", \"1\")}))`;\n\t\treturn sql`json_patch(${imageWithoutAlt}, ${alt})`;\n\t}\n\treturn sql`COALESCE(${sql.join([...localizedExpressions, expression], \", \", \"1\")})`;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/cte/localization.ts\nfunction getItemsInLocaleChainCte(collectionId) {\n\treturn `${collectionId}/itemsInLocaleChain`;\n}\nfunction compileWithClause(context) {\n\tconst tables = [];\n\tfor (const [collectionId, fields] of context.localizedItemTables) {\n\t\ttables.push(compileItemsInLocaleChainCte(collectionId, fields, context));\n\t\ttables.push(compileLocalizedItemsCte(collectionId, fields, context));\n\t}\n\tconst commonTableExpressions = sql.join(tables, \", \");\n\tif (!commonTableExpressions) return sql``;\n\treturn sql`WITH ${commonTableExpressions} `;\n}\nfunction compileItemsInLocaleChainCte(collectionId, fields, { chainedLocaleIds, serverCollections }) {\n\tconst localizationsTable = sql.identifier(getItemLocalizationsTable(collectionId));\n\tconst itemId = sql.qualifiedIdentifier(collectionId, collectionItemIdColumn);\n\tfunction compileValueInLocale(columnId, localeId, condition) {\n\t\tconst itemIdsMatch = sql`${sql.identifier(collectionItemIdColumn)} = ${itemId}`;\n\t\tconst localesMatch = sql`${sql.identifier(localeIdColumn)} = ${sql.parameter(\"localeId\", localeId)}`;\n\t\tlet whereClause = sql`${itemIdsMatch} AND ${localesMatch}`;\n\t\tif (condition) whereClause = sql`${whereClause} AND ${condition}`;\n\t\tconst valueInLocale = sql`(SELECT ${sql.identifier(columnId)} FROM ${localizationsTable} WHERE ${whereClause})`;\n\t\treturn sql`${valueInLocale} AS ${sql.identifier(getValueInLocaleColumn(columnId, localeId))}`;\n\t}\n\tconst valuesInLocales = [];\n\tconst activeLocaleId = chainedLocaleIds[0];\n\tif (activeLocaleId !== void 0) valuesInLocales.push(compileValueInLocale(inclusionColumn, activeLocaleId));\n\tconst itemIsIncludedInLocale = sql`${sql.identifier(inclusionColumn)} IS NULL`;\n\tfor (const localeId of chainedLocaleIds) for (const fieldId of fields.keys()) {\n\t\tconst isSlug = fieldId === serverCollections[collectionId]?.slugFieldId;\n\t\tvaluesInLocales.push(compileValueInLocale(fieldId, localeId, isSlug ? void 0 : itemIsIncludedInLocale));\n\t}\n\tconst itemsInLocaleChainTable = sql`SELECT ${sql.join([...valuesInLocales, sql`*`], \", \", \"1\")} FROM ${sql.identifier(getItemsTable(collectionId))} AS ${sql.alias(collectionId)}`;\n\treturn sql`${sql.identifier(getItemsInLocaleChainCte(collectionId))} AS (${itemsInLocaleChainTable})`;\n}\nfunction compileLocalizedItemsCte(collectionId, fields, { chainedLocaleIds }) {\n\tconst localizedValues = [];\n\tfor (const [fieldId, field] of fields) {\n\t\tconst localizedExpressions = chainedLocaleIds.map((localeId) => sql.identifier(getValueInLocaleColumn(fieldId, localeId)));\n\t\tconst localizedValue = compileLocalizedValue(sql.identifier(fieldId), localizedExpressions, field);\n\t\tlocalizedValues.push(sql`${localizedValue} AS ${sql.identifier(getLocalizedValueColumn(fieldId))}`);\n\t}\n\tlet localizedItemsSelect = sql`SELECT ${sql.join([...localizedValues, sql`*`], \", \", \"1\")} FROM ${sql.identifier(getItemsInLocaleChainCte(collectionId))}`;\n\tconst activeLocaleId = chainedLocaleIds[0];\n\tif (activeLocaleId !== void 0) {\n\t\tconst inclusionInActiveLocale = sql.identifier(getValueInLocaleColumn(inclusionColumn, activeLocaleId));\n\t\tlocalizedItemsSelect = sql`${localizedItemsSelect} WHERE ${inclusionInActiveLocale} IS NOT ${sql.parameter(\"inclusion\", excludeInclusionValue)}`;\n\t}\n\treturn sql`${sql.identifier(getLocalizedItemsCte(collectionId))} AS (${localizedItemsSelect})`;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/from.ts\nfunction compileFromClause(table, alias, joins, joinType) {\n\tconst source = sql.identifier(table);\n\tconst joinParts = [alias === void 0 ? source : sql`${source} AS ${sql.alias(alias)}`];\n\tfor (const [joinAlias, join] of joins) joinParts.push(sql`${sql.identifier(join.table)} AS ${sql.alias(joinAlias)} ON ${join.condition}`);\n\treturn { statement: sql`FROM ${sql.join(joinParts, joinType, \"(SELECT 0 WHERE 0)\")}` };\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/limitAndOffset.ts\n/**\n* The maximum limit for a single page query. Beyond this limit, pagination must be used.\n* This is 5_001 so that the maximum allowed page size (which is more user-visible) can be 5_001 - 1 = 5_000.\n*/\nconst maximumLimit = 5001;\nfunction compileLimitAndOffsetClause({ limit, offset }) {\n\tconst validLimit = limit !== void 0 && isValidCount(limit, \"limit\") ? Math.min(limit, maximumLimit) : maximumLimit;\n\tconst validOffset = isValidCount(offset, \"offset\") ? offset : 0;\n\treturn { statement: sql`LIMIT ${sql.parameter(\"limit\", validLimit)} OFFSET ${sql.parameter(\"offset\", validOffset)}` };\n}\nfunction isValidCount(value, name) {\n\tif (Number.isSafeInteger(value) && value >= 0) return true;\n\twarnOnce$1(new ServerDatabaseError(`Query ${name} must be a non-negative safe integer, got ${value}.`).toString());\n\treturn false;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/fields/lookup.ts\nfunction isDateSystemColumn(fieldId) {\n\treturn fieldId === \"createdAt\" || fieldId === \"updatedAt\";\n}\nconst previousItemIdField = \"previousItemId\";\nconst nextItemIdField = \"nextItemId\";\nfunction isNeighborField(fieldId) {\n\treturn fieldId === \"previousItemId\" || fieldId === \"nextItemId\";\n}\nfunction lookupField(serverCollections, collectionId, fieldId) {\n\tif (isDateSystemColumn(fieldId)) return {\n\t\ttype: \"date\",\n\t\tisLocalized: false\n\t};\n\tif (isNeighborField(fieldId)) return {\n\t\ttype: \"collectionreference\",\n\t\treferencedCollectionId: collectionId\n\t};\n\treturn serverCollections[collectionId]?.fields[fieldId];\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/joins/references.ts\nfunction compileReferenceJoin(qualifier, identifier, joinAlias, table) {\n\treturn {\n\t\ttable,\n\t\tcondition: sql`${sql.qualifiedIdentifier(qualifier, identifier)} = ${sql.qualifiedIdentifier(joinAlias, collectionItemIdColumn)}`\n\t};\n}\nfunction registerReferenceJoin(qualifier, fieldId, referencedCollectionId, context) {\n\tconst joinAlias = `${qualifier}.${fieldId}`;\n\tif (context.joins.has(joinAlias)) return joinAlias;\n\tconst join = compileReferenceJoin(qualifier, fieldId, joinAlias, registerItemsTable(referencedCollectionId, context));\n\tcontext.joins.set(joinAlias, join);\n\treturn joinAlias;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/fields/multiReference.ts\nfunction compileMultiReferenceExpression(qualifier, collectionId, fieldId, referencedItemsTable) {\n\tconst sideTable = getItemMultiCollectionReferencesView(collectionId, fieldId);\n\tconst selectClause = compileMultiReferenceSelectClause(sideTable, `${qualifier}.${fieldId}`, referencedItemsTable);\n\tconst fromClause = compileFromClause(sideTable, void 0, selectClause.joins, \" JOIN \");\n\tconst whereClause = compileMultiReferenceWhereClause(sideTable, qualifier);\n\treturn sql`(${selectClause.statement} ${fromClause.statement} ${whereClause.statement})`;\n}\nfunction compileMultiReferenceSelectClause(sideTable, joinAlias, referencedItemsTable) {\n\tconst joins = /* @__PURE__ */ new Map([[joinAlias, compileReferenceJoin(sideTable, referencedCollectionItemIdColumn, joinAlias, referencedItemsTable)]]);\n\treturn {\n\t\tstatement: sql`SELECT json_group_array(${sql.qualifiedIdentifier(joinAlias, collectionItemIdColumn)} ORDER BY ${sql.qualifiedIdentifier(sideTable, indexColumn)})`,\n\t\tjoins\n\t};\n}\n/** Correlates the side table rows with the owning item. */\nfunction compileMultiReferenceWhereClause(sideTable, qualifier) {\n\treturn { statement: sql`WHERE ${sql.qualifiedIdentifier(sideTable, collectionItemIdColumn)} = ${sql.qualifiedIdentifier(qualifier, collectionItemIdColumn)}` };\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/fields/physical.ts\nfunction resolvePhysicalField(qualifier, collectionId, fieldId, context) {\n\tif (isNeighborField(fieldId)) return void 0;\n\tconst field = lookupField(context.serverCollections, collectionId, fieldId);\n\tif (!field) return void 0;\n\tconst isLocalized = \"isLocalized\" in field && field.isLocalized && context.chainedLocaleIds.length > 0;\n\tif (isLocalized) registerLocalizedField(collectionId, fieldId, field, context);\n\treturn {\n\t\tqualifier,\n\t\tcollectionId,\n\t\ttailFieldId: fieldId,\n\t\ttailField: field,\n\t\tisLocalized\n\t};\n}\nfunction resolveDefaultOrderField(qualifier, collectionId, fieldPath, context) {\n\tconst [fieldId, ...rest] = fieldPath;\n\tif (fieldId === void 0 || rest.length > 0) {\n\t\twarnOnce$1(new ServerDatabaseError(`Default order field path \"${fieldPath.join(\".\")}\" of collection ${collectionId} is not a top-level field.`).toString());\n\t\treturn;\n\t}\n\tconst resolved = resolvePhysicalField(qualifier, collectionId, fieldId, context);\n\tif (!resolved) warnOnce$1(new ServerDatabaseError(`Default order field ${fieldId} is not a physical field of collection ${collectionId}.`).toString());\n\treturn resolved;\n}\nfunction compileFieldExpression(resolvedField, context) {\n\tconst { qualifier, collectionId, tailFieldId, tailField } = resolvedField;\n\tif (tailField.type === \"multicollectionreference\") {\n\t\tconst referencedItemsTable = registerItemsTable(tailField.referencedCollectionId, context);\n\t\treturn compileMultiReferenceExpression(qualifier, collectionId, tailFieldId, referencedItemsTable);\n\t}\n\tif (tailField.type === \"collectionreference\" && tailFieldId !== \"collectionItemId\") {\n\t\tconst referenceQualifier = registerReferenceJoin(qualifier, tailFieldId, tailField.referencedCollectionId, context);\n\t\treturn sql.qualifiedIdentifier(referenceQualifier, collectionItemIdColumn);\n\t}\n\treturn compileValueExpression(resolvedField);\n}\nfunction compileValueExpression({ qualifier, tailFieldId, isLocalized }) {\n\tif (!isLocalized) return sql.qualifiedIdentifier(qualifier, tailFieldId);\n\treturn sql.qualifiedIdentifier(qualifier, getLocalizedValueColumn(tailFieldId));\n}\nfunction compileSortKey(resolved) {\n\tif (resolved.tailField.type === \"multicollectionreference\") return void 0;\n\tif (resolved.tailField.type === \"unsupported\") {\n\t\twarnOnce$1(new UnsupportedQueryError(`sort field type.`).toString());\n\t\treturn;\n\t}\n\tlet expression = compileValueExpression(resolved);\n\tif (resolved.tailField.type === \"string\") expression = sql`LOWER(${expression})`;\n\treturn expression;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/joins/neighbors.ts\nfunction registerNeighborJoin(qualifier, neighborFieldId, collectionId, context) {\n\tconst joinAlias = `${qualifier}.${neighborFieldId}`;\n\tif (context.joins.has(joinAlias)) return joinAlias;\n\tconst join = compileNeighborJoin(qualifier, neighborFieldId, joinAlias, collectionId, context);\n\tcontext.joins.set(joinAlias, join);\n\treturn joinAlias;\n}\nfunction compileNeighborJoin(qualifier, neighborFieldId, joinAlias, collectionId, context) {\n\tconst candidateAlias = `${joinAlias}/candidate`;\n\tconst candidateContext = {\n\t\t...context,\n\t\tjoins: /* @__PURE__ */ new Map()\n\t};\n\tconst isPrevious = neighborFieldId === previousItemIdField;\n\tconst keys = [];\n\tfor (const { fieldPath, direction } of context.serverCollections[collectionId]?.defaultOrderBy ?? []) {\n\t\tconst current = resolveDefaultOrderField(qualifier, collectionId, fieldPath, context);\n\t\tconst candidate = resolveDefaultOrderField(candidateAlias, collectionId, fieldPath, candidateContext);\n\t\tconst currentKey = current && compileSortKey(current);\n\t\tconst candidateKey = candidate && compileSortKey(candidate);\n\t\tif (!currentKey || !candidateKey) continue;\n\t\tconst descending = isPrevious && direction === \"asc\" || !isPrevious && direction === \"desc\";\n\t\tkeys.push({\n\t\t\tcurrent: currentKey,\n\t\t\tcandidate: candidateKey,\n\t\t\tdescending\n\t\t});\n\t}\n\tconst follows = compileFollows(keys, qualifier, candidateAlias, isPrevious);\n\tconst orderByClause = compileNeighborOrderByClause(keys, candidateAlias, isPrevious);\n\tconst itemsTable = registerItemsTable(collectionId, context);\n\tconst fromClause = compileFromClause(itemsTable, candidateAlias, candidateContext.joins, \" LEFT JOIN \");\n\tconst currentId = sql.qualifiedIdentifier(qualifier, collectionItemIdColumn);\n\tconst candidateId = sql.qualifiedIdentifier(candidateAlias, collectionItemIdColumn);\n\treturn {\n\t\ttable: itemsTable,\n\t\tcondition: sql`${sql.qualifiedIdentifier(joinAlias, collectionItemIdColumn)} = (SELECT ${candidateId} ${fromClause.statement} WHERE ${currentId} IS NOT NULL AND (${follows}) ${orderByClause.statement} LIMIT 1)`\n\t};\n}\nfunction compileFollows(keys, qualifier, candidateAlias, isPrevious) {\n\tconst currentPosition = sql.qualifiedIdentifier(qualifier, positionColumn);\n\tconst candidatePosition = sql.qualifiedIdentifier(candidateAlias, positionColumn);\n\tlet follows = isPrevious ? sql`${candidatePosition} < ${currentPosition}` : sql`${candidatePosition} > ${currentPosition}`;\n\tfor (const key of [...keys].reverse()) follows = sql`${compileFollowsOnKey(key)} OR (${key.candidate} IS ${key.current} AND (${follows}))`;\n\treturn follows;\n}\nfunction compileNeighborOrderByClause(keys, candidateAlias, isPrevious) {\n\tconst parts = [];\n\tfor (const { candidate, descending } of keys) parts.push(sql`${candidate} ${descending ? sql`DESC` : sql`ASC`}`);\n\tparts.push(sql`${sql.qualifiedIdentifier(candidateAlias, positionColumn)} ${isPrevious ? sql`DESC` : sql`ASC`}`);\n\treturn { statement: sql`ORDER BY ${sql.join(parts, \", \", \"1\")}` };\n}\nfunction compileFollowsOnKey({ current, candidate, descending }) {\n\treturn descending ? sql`${candidate} < ${current} OR (${candidate} IS NULL AND ${current} IS NOT NULL)` : sql`${candidate} > ${current} OR (${current} IS NULL AND ${candidate} IS NOT NULL)`;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/fields/fieldPath.ts\n/**\n* Resolves {@link ResolvedField} metadata and registers the joins the path needs in the {@link QueryContext}.\n*/\nfunction resolveFieldPath(rootCollectionId, fieldPath, context) {\n\tconst referencePath = [...fieldPath];\n\tconst tailFieldId = referencePath.pop();\n\tif (tailFieldId === void 0) return {\n\t\tqualifier: rootCollectionId,\n\t\tcollectionId: rootCollectionId,\n\t\ttailFieldId: collectionItemIdColumn,\n\t\ttailField: {\n\t\t\ttype: \"collectionreference\",\n\t\t\treferencedCollectionId: rootCollectionId\n\t\t},\n\t\tisLocalized: false\n\t};\n\tlet collectionId = rootCollectionId;\n\tlet qualifier = collectionId;\n\tfor (const referenceFieldId of referencePath) {\n\t\tconst field = lookupField(context.serverCollections, collectionId, referenceFieldId);\n\t\tif (!field) {\n\t\t\twarnOnce$1(new ServerDatabaseError(`Intermediate field ${referenceFieldId} does not exist in collection ${collectionId}.`).toString());\n\t\t\treturn;\n\t\t}\n\t\tif (field.type !== \"collectionreference\") {\n\t\t\twarnOnce$1(new ServerDatabaseError(`Intermediate field ${referenceFieldId} is not a single reference field.`).toString());\n\t\t\treturn;\n\t\t}\n\t\tqualifier = isNeighborField(referenceFieldId) ? registerNeighborJoin(qualifier, referenceFieldId, field.referencedCollectionId, context) : registerReferenceJoin(qualifier, referenceFieldId, field.referencedCollectionId, context);\n\t\tcollectionId = field.referencedCollectionId;\n\t}\n\tif (isNeighborField(tailFieldId)) return {\n\t\tqualifier: registerNeighborJoin(qualifier, tailFieldId, collectionId, context),\n\t\tcollectionId,\n\t\ttailFieldId: collectionItemIdColumn,\n\t\ttailField: {\n\t\t\ttype: \"collectionreference\",\n\t\t\treferencedCollectionId: collectionId\n\t\t},\n\t\tisLocalized: false\n\t};\n\tconst resolved = resolvePhysicalField(qualifier, collectionId, tailFieldId, context);\n\tif (!resolved) {\n\t\twarnOnce$1(new ServerDatabaseError(`Field ${tailFieldId} does not exist in collection ${collectionId}.`).toString());\n\t\treturn;\n\t}\n\treturn resolved;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/orderBy.ts\n/**\n* Orders by the query's sort fields, then the collection's default order,\n* then the manual item position as a tiebreaker so that the order is total.\n*/\nfunction compileOrderByClause({ collectionId, orderBy }, context) {\n\tconst parts = [];\n\tfor (const { fieldPath, direction } of orderBy) {\n\t\tconst part = compileOrderByField(resolveFieldPath(collectionId, fieldPath, context), direction);\n\t\tif (part) parts.push(part);\n\t}\n\tfor (const { fieldPath, direction } of context.serverCollections[collectionId]?.defaultOrderBy ?? []) {\n\t\tconst part = compileOrderByField(resolveDefaultOrderField(collectionId, collectionId, fieldPath, context), direction);\n\t\tif (part) parts.push(part);\n\t}\n\tparts.push(sql.qualifiedIdentifier(collectionId, positionColumn));\n\treturn { statement: sql`ORDER BY ${sql.join(parts, \", \", \"1\")}` };\n}\nfunction compileOrderByField(resolved, direction) {\n\tconst expression = resolved && compileSortKey(resolved);\n\tif (!expression) return void 0;\n\treturn sql`${expression} ${direction === \"desc\" ? sql`DESC` : sql`ASC`}`;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/select.ts\n/**\n* Compiles the select clause against the server collections, walking each\n* column's `fieldPath` from the source collection (see the README):\n*\n* - Every reference field along the path registers a LEFT JOIN in\n*   the context's `joins`, aliased by the dotted path prefix.\n* - A path resolving to a value field selects that column.\n* - A path resolving to a collection — an empty path (the source item) or a\n*   path ending on a reference field — selects the item's identity column, in\n*   case of multi references with a JSON array subquery.\n*\n* Schema drift fails soft: a missing reference or tail field drops the column.\n*/\nfunction compileSelectClause({ collectionId, columns }, context) {\n\tconst resultColumns = [];\n\tconst selectParts = [];\n\tfor (const column of columns) {\n\t\tconst compiledColumn = compileColumn(collectionId, column, context);\n\t\tif (!compiledColumn) continue;\n\t\tresultColumns.push({\n\t\t\tfieldName: column.alias,\n\t\t\ttype: compiledColumn.type\n\t\t});\n\t\tselectParts.push(sql`${compiledColumn.expression} AS ${sql.alias(column.alias)}`);\n\t}\n\tif (selectParts.length === 0) warnOnce$1(new ServerDatabaseError(\"Query selects no column.\").toString());\n\treturn {\n\t\tstatement: sql`SELECT ${sql.join(selectParts, \", \", \"1\")}`,\n\t\tcolumns: resultColumns\n\t};\n}\nfunction compileColumn(rootCollectionId, column, context) {\n\tconst resolved = resolveFieldPath(rootCollectionId, column.fieldPath, context);\n\tif (!resolved) return void 0;\n\treturn {\n\t\texpression: compileFieldExpression(resolved, context),\n\t\ttype: resolved.tailField.type\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/where.ts\nfunction compileWhereClause(collectionId, filters, context) {\n\tconst compiledFilters = [];\n\tfor (const filter of filters.conditions) {\n\t\tconst compiledFilter = compileFilter(collectionId, filter, context);\n\t\tif (compiledFilter) compiledFilters.push(compiledFilter);\n\t}\n\tconst filterCondition = joinCompiledFilters(compiledFilters, getJoinOperator(filters.operator));\n\treturn { statement: sql`WHERE ${filterCondition}` };\n}\nfunction joinCompiledFilters(compiledFilters, operator) {\n\tconst expression = sql.join(compiledFilters.map((compiledFilter) => compiledFilter.expression), operator, \"1\");\n\tif (!compiledFilters.some((compiledFilter) => compiledFilter.indexableSupersetExpression)) return expression;\n\tconst indexableSupersetExpression = sql.join(compiledFilters.flatMap((compiledFilter) => {\n\t\tif (compiledFilter.indexableSupersetExpression) return [sql`(${compiledFilter.indexableSupersetExpression})`];\n\t\tif (operator === \" OR \") return [compiledFilter.expression];\n\t\treturn [];\n\t}), operator, \"1\");\n\treturn sql`(${indexableSupersetExpression}) AND (${expression})`;\n}\nfunction getJoinOperator(filterOperator) {\n\tswitch (filterOperator) {\n\t\tcase \"any\": return \" OR \";\n\t\tcase \"all\": return \" AND \";\n\t}\n}\nfunction compileFilter(collectionId, filter, context) {\n\tconst resolved = resolveFieldPath(collectionId, filter.fieldPath, context);\n\tif (!resolved) return void 0;\n\tif (resolved.tailField.type === \"unsupported\") {\n\t\twarnOnce$1(new UnsupportedQueryError(`filter field type.`).toString());\n\t\treturn;\n\t}\n\tconst parameterName = filter.fieldPath.join(\"_\") || resolved.tailFieldId;\n\tconst fieldStep = compileField(resolved, context);\n\tconst transforms = preOptimizeTransforms(fieldStep, filter.transforms);\n\tconst filterStep = compileTransforms(fieldStep, transforms, parameterName);\n\tif (!filterStep) return void 0;\n\tif (filterStep.type !== \"boolean\") {\n\t\twarnOnce$1(new ServerDatabaseError(`Filter chain on ${filterStep.type} field does not result in a boolean.`).toString());\n\t\treturn;\n\t}\n\treturn {\n\t\texpression: filterStep.inputToleratingNull().expression,\n\t\tindexableSupersetExpression: compileLocalizedIndexableSuperset(resolved, context.chainedLocaleIds, transforms, parameterName) ?? compileReferenceIndexableSuperset(resolved, filterStep, transforms, parameterName)\n\t};\n}\nfunction compileReferenceIndexableSuperset({ qualifier, tailFieldId, tailField }, filterStep, transforms, parameterName) {\n\tif (tailField.type !== \"collectionreference\" || tailFieldId === \"collectionItemId\") return;\n\tif (filterStep.inputToleratingNull().nullable === \"no\") return;\n\treturn compileTransforms(createFieldStep(sql.qualifiedIdentifier(qualifier, tailFieldId), tailField.type), transforms, parameterName)?.inputToleratingNull().expression;\n}\nfunction compileLocalizedIndexableSuperset({ qualifier, collectionId, tailFieldId, tailField, isLocalized }, chainedLocaleIds, transforms, parameterName) {\n\tif (!isLocalized) return;\n\tconst defaultLocaleValue = createFieldStep(sql.qualifiedIdentifier(qualifier, tailFieldId), tailField.type);\n\tconst otherLocalesValue = createFieldStep(sql.identifier(tailFieldId), tailField.type);\n\tconst defaultLocaleCandidateStep = compileTransforms(defaultLocaleValue, transforms, parameterName);\n\tconst otherLocalesCandidateStep = compileTransforms(otherLocalesValue, transforms, parameterName);\n\tif (!defaultLocaleCandidateStep || !otherLocalesCandidateStep) return;\n\tconst isCandidateInDefaultLocale = defaultLocaleCandidateStep.inputToleratingNull().expression;\n\tconst localeIdParameters = chainedLocaleIds.map((localeId) => sql.parameter(\"localeId\", localeId));\n\tconst candidatesInOtherLocales = sql`SELECT ${sql.identifier(collectionItemIdColumn)} FROM ${sql.identifier(getItemLocalizationsTable(collectionId))} WHERE ${sql.identifier(localeIdColumn)} IN (${sql.join(localeIdParameters, \", \", \"1\")}) AND ${otherLocalesCandidateStep.inputToleratingNull().expression}`;\n\tconst isCandidateInOtherLocales = sql`${sql.qualifiedIdentifier(qualifier, collectionItemIdColumn)} IN (${candidatesInOtherLocales})`;\n\treturn sql`${isCandidateInDefaultLocale} OR ${isCandidateInOtherLocales}`;\n}\nfunction compileTransforms(firstStep, transforms, parameterName) {\n\tlet currentStep = firstStep;\n\tfor (const transform of transforms) {\n\t\tparameterName += `_${transform.name}`;\n\t\tcurrentStep = compileTransform(transform, currentStep.lowercaseIfString(), parameterName);\n\t\tif (!currentStep) return void 0;\n\t}\n\treturn currentStep;\n}\nfunction preOptimizeTransforms(currentStep, transforms) {\n\tif (currentStep.type === \"boolean\" && transforms.length === 0) return [{\n\t\tname: \"equals\",\n\t\tvalue: true\n\t}];\n\treturn transforms;\n}\n/**\n* This is essentially the first primitive filter optimizer.\n* It ensures transforms that propagate NULL in SQL (like `equals` and `isIncludedIn`) don't need to always append `IS TRUE` to prevent NULL propagation,\n* which would be ridiculous for e.g. `WHERE a = 1 IS TRUE`, while at the same time ensuring a subsequent transform that is sensitive to NULL (like `equals null`) still wraps with the needed `IS TRUE`.\n*/\nvar Step = class Step {\n\t#expression;\n\t#type;\n\t#nullable;\n\tconstructor(init) {\n\t\tthis.#expression = init.expression;\n\t\tthis.#type = init.type;\n\t\tthis.#nullable = init.nullable;\n\t}\n\t/**\n\t* Get the input to be used in a context that carries through NULL representing false,\n\t* or correctly handles NULL representing false (e.g. `WHERE`/`AND` coercing to false).\n\t*/\n\tinputToleratingNull() {\n\t\treturn {\n\t\t\texpression: this.#expression,\n\t\t\tnullable: this.#nullable\n\t\t};\n\t}\n\t/**\n\t* Get the input to be used in a context that misbehaves on a NULL representing false (e.g. `= NULL`).\n\t*/\n\tinputSensitiveToNull() {\n\t\tif (this.#nullable === \"treat-as-false\") return {\n\t\t\texpression: sql`(${this.#expression} IS TRUE)`,\n\t\t\tnullable: \"no\"\n\t\t};\n\t\treturn {\n\t\t\texpression: this.#expression,\n\t\t\tnullable: this.#nullable\n\t\t};\n\t}\n\tlowercaseIfString() {\n\t\treturn new Step({\n\t\t\texpression: lowercaseIfString(this.#type, this.#expression),\n\t\t\ttype: this.#type,\n\t\t\tnullable: this.#nullable\n\t\t});\n\t}\n\tget type() {\n\t\treturn this.#type;\n\t}\n};\nfunction treatNullInputAsFalse(input) {\n\tswitch (input.nullable) {\n\t\tcase \"yes\":\n\t\tcase \"treat-as-false\": return \"treat-as-false\";\n\t\tcase \"no\": return \"no\";\n\t}\n}\nfunction treatNullValueAsFalse(value) {\n\tif (value === null) return \"treat-as-false\";\n\treturn \"no\";\n}\nfunction compileField(resolvedFieldPath, context) {\n\treturn createFieldStep(compileFieldExpression(resolvedFieldPath, context), resolvedFieldPath.tailField.type);\n}\nfunction createFieldStep(expression, type) {\n\treturn new Step({\n\t\texpression,\n\t\ttype,\n\t\tnullable: type === \"multicollectionreference\" ? \"no\" : \"yes\"\n\t});\n}\nfunction compileTransform(transform, previousStep, parameterName) {\n\tif (transform.value === void 0) return void 0;\n\tswitch (transform.name) {\n\t\tcase \"equals\": return compileEquals(previousStep, parameterName, transform.value);\n\t\tcase \"isIncludedIn\": return compileIsIncludedIn(previousStep, parameterName, transform.value);\n\t\tcase \"contains\": return compileContains(previousStep, parameterName, transform.value);\n\t\tdefault:\n\t\t\twarnOnce$1(new UnsupportedQueryError(`filter transform.`).toString());\n\t\t\treturn;\n\t}\n}\nfunction compileEquals(previousStep, parameterName, value) {\n\tconst input = previousStep.inputSensitiveToNull();\n\tif (value === null) return new Step({\n\t\texpression: sql`${input.expression} IS NULL`,\n\t\ttype: \"boolean\",\n\t\tnullable: \"no\"\n\t});\n\treturn new Step({\n\t\texpression: sql`${input.expression} = ${lowercaseIfString(previousStep.type, sql.parameter(parameterName, value))}`,\n\t\ttype: \"boolean\",\n\t\tnullable: treatNullInputAsFalse(input)\n\t});\n}\nfunction compileIsIncludedIn(previousStep, parameterName, value) {\n\tconst input = previousStep.inputToleratingNull();\n\treturn new Step({\n\t\texpression: sql`${input.expression} IN (SELECT ${lowercaseIfString(previousStep.type, sql`value`)} FROM json_each(${sql.parameter(parameterName, value)}))`,\n\t\ttype: \"boolean\",\n\t\tnullable: treatNullInputAsFalse(input)\n\t});\n}\nfunction compileContains(previousStep, parameterName, value) {\n\tswitch (previousStep.type) {\n\t\tcase \"multicollectionreference\": return new Step({\n\t\t\texpression: sql`${sql.parameter(parameterName, value)} IN (SELECT value FROM json_each(${previousStep.inputToleratingNull().expression}))`,\n\t\t\ttype: \"boolean\",\n\t\t\tnullable: treatNullValueAsFalse(value)\n\t\t});\n\t\tcase \"string\":\n\t\t\twarnOnce$1(new UnsupportedQueryError(`contains filter on a ${previousStep.type} field.`).toString());\n\t\t\treturn;\n\t\tdefault:\n\t\t\twarnOnce$1(new ServerDatabaseError(`Contains filter on a ${previousStep.type} field.`).toString());\n\t\t\treturn;\n\t}\n}\nfunction lowercaseIfString(type, expression) {\n\tif (type !== \"string\") return expression;\n\treturn sql`LOWER(${expression})`;\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/query-compiler/index.ts\nfunction compileQuery(serverQuery, serverCollections) {\n\tconst { collectionId } = serverQuery;\n\tconst context = {\n\t\tserverCollections,\n\t\tjoins: /* @__PURE__ */ new Map(),\n\t\tchainedLocaleIds: serverQuery.chainedLocaleIds,\n\t\tlocalizedItemTables: /* @__PURE__ */ new Map()\n\t};\n\tconst selectClause = compileSelectClause(serverQuery, context);\n\tconst whereClause = compileWhereClause(collectionId, serverQuery.filters, context);\n\tconst orderByClause = compileOrderByClause(serverQuery, context);\n\tconst fromClause = compileFromClause(registerItemsTable(collectionId, context), collectionId, context.joins, \" LEFT JOIN \");\n\tconst withClause = compileWithClause(context);\n\tconst limitAndOffsetClause = compileLimitAndOffsetClause(serverQuery);\n\tconst statement = sql`${withClause}${selectClause.statement} ${fromClause.statement} ${whereClause.statement} ${orderByClause.statement} ${limitAndOffsetClause.statement}`;\n\treturn {\n\t\tstatement: serializeSql(statement),\n\t\tcolumns: selectClause.columns\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/ServerDatabaseClient.ts\n/**\n* Compiles `ServerQuery`s against the provided collection schema, executes\n* them through the database, and caches mapped rows per (sql, parameters).\n*\n* @internal\n*/\nvar ServerDatabaseClient = class {\n\tdatabase;\n\tcollections;\n\tcomponents;\n\tcache = /* @__PURE__ */ new Map();\n\tconstructor(database, { collections, components }) {\n\t\tthis.database = database;\n\t\tthis.collections = collections;\n\t\tthis.components = components;\n\t}\n\tquery(query) {\n\t\tconst { statement: { sql, parameters }, columns } = compileQuery(query, this.collections);\n\t\tconst rawParameters = mapParametersToRaw(parameters);\n\t\tconst cacheKey = JSON.stringify([sql, rawParameters]);\n\t\tconst cached = this.cache.get(cacheKey);\n\t\tif (cached) return cached;\n\t\tconst value = new LazyValue(async () => {\n\t\t\tconst rows = await this.execute(sql, rawParameters);\n\t\t\treturn mapRowsFromRaw(rows, columns, this.components);\n\t\t});\n\t\tthis.cache.set(cacheKey, value);\n\t\treturn value;\n\t}\n\t/** Starts loading the query result so that `query(...).use()` doesn't suspend. */\n\tpreload(query) {\n\t\treturn this.query(query).preload();\n\t}\n\tasync execute(sql, parameters) {\n\t\treturn (await this.database.query(sql, parameters)).rows;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/useServerData.ts\n/**\n* @internal\n*/\nfunction useServerData(pageQuery) {\n\tconst [rows = []] = useServerDataPages([pageQuery]);\n\treturn rows;\n}\nfunction useServerDataPages(pageQueries) {\n\tconst { activeLocale } = useLocaleInfo();\n\tconst client = useServerDatabaseClient();\n\tconst chainedLocaleIds = getChainedLocaleIds(activeLocale);\n\tconst pages = pageQueries.map((pageQuery) => client.query({\n\t\t...pageQuery,\n\t\tchainedLocaleIds\n\t}));\n\tfor (const page of pages) page.preload();\n\treturn pages.map((page) => page.use());\n}\nfunction getChainedLocaleIds(locale) {\n\tconst chainedLocaleIds = [];\n\tfor (const { id } of walkLocaleFallbackChain(locale)) {\n\t\tif (id === \"default\") continue;\n\t\tchainedLocaleIds.push(id);\n\t}\n\treturn chainedLocaleIds;\n}\nfunction* walkLocaleFallbackChain(locale) {\n\tlet current = locale;\n\twhile (current) {\n\t\tyield current;\n\t\tcurrent = current.fallback;\n\t}\n}\n\n//#endregion\n//#region ../../library/src/components/utils/useLoadMorePagination.tsx\nfunction getPersistedCurrentPage(hash) {\n\tif (typeof window === \"undefined\") return void 0;\n\tconst currentPage = readHistoryState()?.paginationInfo?.[hash]?.currentPage;\n\treturn typeof currentPage === \"number\" ? currentPage : void 0;\n}\nfunction getInitialCurrentPage(isInitialNavigation, hash) {\n\tif (isInitialNavigation) return 1;\n\treturn getPersistedCurrentPage(hash) ?? 1;\n}\nfunction useLoadMorePagination(totalSize, pageSize, hash, paginateWithSuspendedLoadingState = false) {\n\treturn useLoadMoreControls(useLoadMorePageState(hash, paginateWithSuspendedLoadingState), Math.ceil(totalSize / pageSize));\n}\nfunction useLoadMorePageState(hash, paginateWithSuspendedLoadingState) {\n\tconst { isInitialNavigation = true } = useRouter();\n\tconst [isPending, startLoadingTransition] = useTransition();\n\tconst persistedPage = getPersistedCurrentPage(hash);\n\tconst pendingRestorePageRef = useRef(isInitialNavigation ? persistedPage : void 0);\n\tconst [currentPage, setCurrentPage] = useState(() => getInitialCurrentPage(isInitialNavigation, hash));\n\tconst currentPageRef = useRef(currentPage);\n\tuseEffect(function restorePersistedPageAfterHydration() {\n\t\tif (!isInitialNavigation) return;\n\t\tconst pendingRestorePage = pendingRestorePageRef.current;\n\t\tif (pendingRestorePage === void 0 || pendingRestorePage === currentPageRef.current) {\n\t\t\tpendingRestorePageRef.current = void 0;\n\t\t\treturn;\n\t\t}\n\t\tcurrentPageRef.current = pendingRestorePage;\n\t\tstartTransition(() => setCurrentPage(pendingRestorePage));\n\t}, [isInitialNavigation]);\n\tconst persistToHistory = useCallback((paginationInfo) => {\n\t\tconst pendingRestorePage = pendingRestorePageRef.current;\n\t\tif (pendingRestorePage !== void 0 && pendingRestorePage !== currentPageRef.current) return;\n\t\tpendingRestorePageRef.current = void 0;\n\t\tpushLoadMoreHistory(hash, paginationInfo);\n\t}, [hash]);\n\tconst onCanvas = useIsOnFramerCanvas();\n\tconst loadMoreInFlightRef = useRef(false);\n\treturn {\n\t\tcurrentPage,\n\t\tisLoading: isPending,\n\t\tloadNextPage: useCallback(async (knownMinimumPageCount) => {\n\t\t\tif (onCanvas) return;\n\t\t\tif (currentPageRef.current >= knownMinimumPageCount) return;\n\t\t\tif (loadMoreInFlightRef.current) return;\n\t\t\tloadMoreInFlightRef.current = true;\n\t\t\ttry {\n\t\t\t\tawait yieldToMain({\n\t\t\t\t\tpriority: \"user-blocking\",\n\t\t\t\t\tcontinueAfter: \"paint\"\n\t\t\t\t});\n\t\t\t\tif (currentPageRef.current >= knownMinimumPageCount) return;\n\t\t\t\tconst nextPage = Math.min(currentPageRef.current + 1, knownMinimumPageCount);\n\t\t\t\tcurrentPageRef.current = nextPage;\n\t\t\t\t(paginateWithSuspendedLoadingState ? startLoadingTransition : startTransition)(() => {\n\t\t\t\t\tsetCurrentPage(nextPage);\n\t\t\t\t});\n\t\t\t} finally {\n\t\t\t\tloadMoreInFlightRef.current = false;\n\t\t\t}\n\t\t}, [paginateWithSuspendedLoadingState, onCanvas]),\n\t\tpersistToHistory\n\t};\n}\nfunction useLoadMoreControls({ currentPage, isLoading, loadNextPage, persistToHistory }, knownMinimumPageCount) {\n\tconst paginationInfo = useMemo(() => {\n\t\treturn {\n\t\t\tcurrentPage,\n\t\t\thasNextPage: currentPage < knownMinimumPageCount,\n\t\t\ttotalPages: knownMinimumPageCount,\n\t\t\tisLoading\n\t\t};\n\t}, [\n\t\tcurrentPage,\n\t\tknownMinimumPageCount,\n\t\tisLoading\n\t]);\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tpersistToHistory(paginationInfo);\n\t}, [persistToHistory, paginationInfo]);\n\treturn {\n\t\tpaginationInfo,\n\t\tloadMore: useCallback(() => loadNextPage(knownMinimumPageCount), [loadNextPage, knownMinimumPageCount])\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/server-database/usePaginatedServerData.ts\n/**\n* @internal\n*/\nfunction usePaginatedServerData(query, pagination, hash) {\n\tconst pageState = useLoadMorePageState(hash, true);\n\tconst pageSize = Math.min(pagination.pageSize, maximumLimit - 1);\n\tconst pageQueries = Array.from({ length: pageState.currentPage }, (_, pageIndex) => getPageQuery(query, {\n\t\t...pagination,\n\t\tpageSize\n\t}, pageIndex));\n\tconst pagesRows = useServerDataPages(pageQueries);\n\tconst hasNextPage = (pagesRows.at(-1)?.length ?? 0) > pageSize;\n\tconst rows = pagesRows.flatMap((pageRows) => pageRows.slice(0, pageSize));\n\tconst { paginationInfo, loadMore } = useLoadMoreControls(pageState, pageState.currentPage + (hasNextPage ? 1 : 0));\n\treturn {\n\t\trows,\n\t\tpaginationInfo,\n\t\tloadMore\n\t};\n}\nfunction getPageQuery(query, { startOffset = 0, maximumItemCount = Infinity, pageSize }, pageIndex) {\n\tconst itemCountBeforePage = pageSize * pageIndex;\n\tconst remainingItemCount = Math.max(0, maximumItemCount - itemCountBeforePage);\n\treturn {\n\t\t...query,\n\t\toffset: startOffset + itemCountBeforePage,\n\t\tlimit: Math.min(pageSize + 1, remainingItemCount)\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/useQueryData.ts\nconst queryEngine = /* @__PURE__ */ new QueryEngine();\n/**\n* Singleton query cache used by useQueryData and loaders.\n* @internal\n*/\nconst queryCache = /* @__PURE__ */ new QueryCache(queryEngine);\n/** @internal */\nfunction useQueryData(query) {\n\tconst { activeLocale } = useLocaleInfo();\n\treturn queryCache.get(query, activeLocale).use();\n}\n/** @internal */\nfunction useQueryCount(query) {\n\treturn useQueryData({\n\t\t...query,\n\t\tselect: []\n\t}).length;\n}\n/**\n* @internal\n*/\nfunction usePreloadQuery(priority = \"background\") {\n\tconst { activeLocale } = useLocaleInfo();\n\treturn useCallback((query) => {\n\t\treturn queryCache.get(query, activeLocale, priority).readMaybeAsync();\n\t}, [activeLocale, priority]);\n}\n/** Utility function to create a WHERE expression from path variables. */\nfunction getWhereExpressionFromPathVariables(pathVariables, collection) {\n\tconst expressions = Object.entries(pathVariables ?? {}).filter(([, value]) => {\n\t\tif (isUndefined(value)) return false;\n\t\tif (isObject$1(value)) return false;\n\t\treturn true;\n\t}).map(([name, value]) => ({\n\t\ttype: \"BinaryOperation\",\n\t\toperator: \"==\",\n\t\tleft: {\n\t\t\ttype: \"TypeCast\",\n\t\t\tvalue: {\n\t\t\t\ttype: \"Identifier\",\n\t\t\t\tname,\n\t\t\t\tcollection\n\t\t\t},\n\t\t\tdataType: \"STRING\"\n\t\t},\n\t\tright: {\n\t\t\ttype: \"LiteralValue\",\n\t\t\tvalue: String(value)\n\t\t}\n\t}));\n\tif (expressions.length === 0) return {\n\t\ttype: \"LiteralValue\",\n\t\tvalue: false\n\t};\n\treturn expressions.reduce((result, expression) => ({\n\t\ttype: \"BinaryOperation\",\n\t\toperator: \"and\",\n\t\tleft: result,\n\t\tright: expression\n\t}));\n}\n\n//#endregion\n//#region ../../library/src/modules/cms/useFormSelectVariableBinding.tsx\nconst ALL_ELEMENTS_VALUE = \"__all__\";\nconst BOOLEAN_TRUE_VALUE = \"__true__\";\nconst BOOLEAN_FALSE_VALUE = \"__false__\";\nconst variableBindingHooks = {\n\t[\"boolean\"]: useFormSelectBooleanVariableBinding,\n\t[\"collectionreference\"]: useFormSelectCollectionVariableBinding,\n\t[\"enum\"]: useFormSelectEnumVariableBinding\n};\nfunction useFormSelectVariableBinding(options) {\n\tconst variableTypeRef = useRef(options.variableType);\n\treturn variableBindingHooks[variableTypeRef.current](options);\n}\nfunction useFormSelectBooleanVariableBinding({ allItemsLabel, booleanTrueLabel, booleanFalseLabel, isOptional, setValue, value }) {\n\treturn [\n\t\tuseMemo(() => {\n\t\t\tif (value === true) return BOOLEAN_TRUE_VALUE;\n\t\t\tif (value === false) return BOOLEAN_FALSE_VALUE;\n\t\t\treturn isOptional ? ALL_ELEMENTS_VALUE : BOOLEAN_TRUE_VALUE;\n\t\t}, [isOptional, value]),\n\t\tuseMemo(() => withAllOption([{\n\t\t\tdisabled: false,\n\t\t\ttitle: booleanTrueLabel,\n\t\t\ttype: \"option\",\n\t\t\tvalue: BOOLEAN_TRUE_VALUE\n\t\t}, {\n\t\t\tdisabled: false,\n\t\t\ttitle: booleanFalseLabel,\n\t\t\ttype: \"option\",\n\t\t\tvalue: BOOLEAN_FALSE_VALUE\n\t\t}], isOptional, allItemsLabel, false), [\n\t\t\tallItemsLabel,\n\t\t\tbooleanTrueLabel,\n\t\t\tbooleanFalseLabel,\n\t\t\tisOptional\n\t\t]),\n\t\tuseCallback((event) => {\n\t\t\tif (!(event.target instanceof HTMLSelectElement)) return;\n\t\t\tconst selectedValue = event.target.value;\n\t\t\tstartTransition(() => {\n\t\t\t\tif (selectedValue === ALL_ELEMENTS_VALUE) setValue(void 0);\n\t\t\t\telse if (selectedValue === BOOLEAN_TRUE_VALUE) setValue(true);\n\t\t\t\telse if (selectedValue === BOOLEAN_FALSE_VALUE) setValue(false);\n\t\t\t});\n\t\t}, [setValue])\n\t];\n}\nfunction useFormSelectCollectionVariableBinding({ allItemsLabel, collectionData, isOptional, slugId, titleId, setValue, value: rawValue }) {\n\treturn useStringSelectBinding({\n\t\tallItemsLabel,\n\t\tisOptional,\n\t\tselectOptions: useCollectionSelectOptions({\n\t\t\tcollectionData,\n\t\t\tslugId,\n\t\t\ttitleId\n\t\t}),\n\t\tsetValue,\n\t\tvalue: isBoolean(rawValue) ? void 0 : rawValue\n\t});\n}\nfunction useFormSelectEnumVariableBinding({ allItemsLabel, options: enumOptions, getOptionTitle, isOptional, setValue, value: rawValue }) {\n\tconst { activeLocale } = useLocaleInfo();\n\treturn useStringSelectBinding({\n\t\tallItemsLabel,\n\t\tisOptional,\n\t\tselectOptions: useMemo(() => {\n\t\t\tif (!enumOptions) return void 0;\n\t\t\treturn enumOptions.map((enumId) => ({\n\t\t\t\ttype: \"option\",\n\t\t\t\tvalue: enumId,\n\t\t\t\ttitle: getOptionTitle?.(enumId, activeLocale) ?? \"\"\n\t\t\t}));\n\t\t}, [\n\t\t\tactiveLocale,\n\t\t\tenumOptions,\n\t\t\tgetOptionTitle\n\t\t]),\n\t\tsetValue,\n\t\tvalue: isString(rawValue) ? rawValue : void 0\n\t});\n}\nfunction useCollectionSelectOptions({ collectionData, slugId, titleId }) {\n\tconst query = useMemo(() => ({\n\t\tfrom: {\n\t\t\ttype: \"Collection\",\n\t\t\tdata: collectionData\n\t\t},\n\t\tselect: [\n\t\t\t{\n\t\t\t\ttype: \"Identifier\",\n\t\t\t\tname: \"id\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"Identifier\",\n\t\t\t\tname: slugId\n\t\t\t},\n\t\t\t...titleId ? [{\n\t\t\t\ttype: \"Identifier\",\n\t\t\t\tname: titleId\n\t\t\t}] : []\n\t\t]\n\t}), [\n\t\tcollectionData,\n\t\tslugId,\n\t\ttitleId\n\t]);\n\tconst records = useQueryData(query);\n\treturn useMemo(() => {\n\t\tif (!Array.isArray(records) || records.length === 0) return void 0;\n\t\treturn records.filter((record) => typeof record?.id === \"string\").flatMap((record) => {\n\t\t\tconst id = record.id;\n\t\t\tconst title = titleId && isString(record[titleId]) ? record[titleId] : void 0;\n\t\t\tconst slug = isString(record[slugId]) ? record[slugId] : void 0;\n\t\t\tconst displayTitle = title || slug;\n\t\t\tif (!displayTitle) return [];\n\t\t\treturn [{\n\t\t\t\ttype: \"option\",\n\t\t\t\tvalue: id,\n\t\t\t\ttitle: displayTitle\n\t\t\t}];\n\t\t});\n\t}, [\n\t\trecords,\n\t\ttitleId,\n\t\tslugId\n\t]);\n}\nfunction useStringSelectBinding({ allItemsLabel, isOptional, selectOptions, setValue, value }) {\n\treturn [\n\t\tvalue === void 0 ? ALL_ELEMENTS_VALUE : value,\n\t\tuseMemo(() => withAllOption(selectOptions, isOptional, allItemsLabel), [\n\t\t\tallItemsLabel,\n\t\t\tisOptional,\n\t\t\tselectOptions\n\t\t]),\n\t\tuseCallback((event) => {\n\t\t\tif (!(event.target instanceof HTMLSelectElement)) return;\n\t\t\tconst selectedValue = event.target.value;\n\t\t\tstartTransition(() => {\n\t\t\t\tif (selectedValue === ALL_ELEMENTS_VALUE) setValue(void 0);\n\t\t\t\telse setValue(selectedValue);\n\t\t\t});\n\t\t}, [setValue])\n\t];\n}\nfunction withAllOption(options, isOptional, allItemsLabel, includeDivider = true) {\n\tif (isOptional !== true || !allItemsLabel) return options;\n\tconst allOption = {\n\t\ttitle: allItemsLabel,\n\t\ttype: \"option\",\n\t\tvalue: ALL_ELEMENTS_VALUE\n\t};\n\tif (!options || options.length === 0) return [allOption];\n\tif (includeDivider) return [\n\t\tallOption,\n\t\t{ type: \"divider\" },\n\t\t...options\n\t];\n\treturn [allOption, ...options];\n}\n\n//#endregion\n//#region ../../library/src/utils/createTrigger.ts\n/**\n* Trigger definitions are wrapped in this function so any dependent events are collected when the module is imported.\n* The function has no usage when used in any other way because the events will have been used to create TriggerActionsStorage already.\n* This allows us to collect all tracking events that we need to consume for all triggers in the bundle.\n*/\nfunction createTrigger(input) {\n\tif (typeof window === \"undefined\" || !window.document) return input;\n\tconst safeWindow = window;\n\tfor (const rule of input.eventHistory ?? []) {\n\t\tif (!rule.eventId) continue;\n\t\tsafeWindow[TriggerActionsStorageSymbol] ??= /* @__PURE__ */ new Set();\n\t\tsafeWindow[TriggerActionsStorageSymbol].add(`${rule.eventType}:${rule.eventId}`);\n\t}\n\treturn input;\n}\n\n//#endregion\n//#region ../../library/src/utils/useStableCallback.ts\n/**\n* Creates a callback that remains stable across re-renders while allowing the callback argument to update.\n* The callback can be passed to effects or memoised components without triggering rerenders or re-executions.\n* NOTE: Values captured by the callback may lag *if* the callback is called during render\n*\n* @example\n* const someContext = useContext(SomeContext)\n* const doSomething = useStableCallback((reactiveValue) => {\n*   do(someContext.importantValue, reactiveValue)\n* })\n* // only reevalutes when props.reactiveValue changes\n* useEffect(() => {\n*   doSomething(props.reactiveValue)\n* }, [props.reactiveValue])\n*/\nfunction useStableCallback(callback) {\n\tconst ref = useRef(callback);\n\tuseInsertionEffect(() => {\n\t\tref.current = callback;\n\t}, [callback]);\n\treturn useCallbackOne((...args) => {\n\t\tconst latestFn = ref.current;\n\t\treturn latestFn(...args);\n\t}, []);\n}\n\n//#endregion\n//#region ../../library/src/modules/TriggerSubscription.tsx\nfunction TriggerSubscription({ triggerId, targetId, trigger, callback, triggeredExternally }) {\n\tconst triggerState = useTriggerState();\n\tconst stableCallback = useStableCallback(callback ?? noop$5);\n\tuseEffect(() => {\n\t\treturn triggerState?.subscribe(triggerId, targetId, trigger, stableCallback);\n\t}, [\n\t\ttriggerState?.subscribe,\n\t\ttriggerId,\n\t\ttargetId,\n\t\ttrigger,\n\t\tstableCallback\n\t]);\n\tuseEffect(() => {\n\t\tif (triggeredExternally) triggerState?.invoke(triggerId, { callCallback: false });\n\t}, [\n\t\ttriggerState,\n\t\ttriggerId,\n\t\ttriggeredExternally\n\t]);\n\treturn null;\n}\nfunction useTriggers() {\n\tconst triggerState = useTriggerState();\n\tconst [invokedTriggers, setInvokedTriggers] = useState(() => triggerState?.invokedTriggers ?? /* @__PURE__ */ new Set());\n\tuseEffect(() => {\n\t\tif (!triggerState) return;\n\t\tconst onTrigger = () => {\n\t\t\tstartTransition(() => {\n\t\t\t\tsetInvokedTriggers(triggerState.invokedTriggers);\n\t\t\t});\n\t\t};\n\t\ttriggerState.addOnTriggerListener(onTrigger);\n\t\tstartTransition(() => {\n\t\t\tsetInvokedTriggers((current) => current.size !== triggerState.invokedTriggers.size ? triggerState.invokedTriggers : current);\n\t\t});\n\t\treturn () => {\n\t\t\ttriggerState.removeOnTriggerListener(onTrigger);\n\t\t};\n\t}, [triggerState]);\n\treturn useMemo(() => ({ hasTriggered: (triggerId) => {\n\t\treturn invokedTriggers.has(triggerId);\n\t} }), [invokedTriggers]);\n}\n\n//#endregion\n//#region ../../library/src/modules/useActiveVariantCallback.ts\nfunction rejectPending(pendingTimers, pendingPromises) {\n\tpendingTimers.forEach((t) => clearTimeout(t));\n\tpendingTimers.clear();\n\tpendingPromises.forEach((reject) => reject?.(\"Callback cancelled by variant change\"));\n\tpendingPromises.clear();\n}\nfunction createSet() {\n\treturn /* @__PURE__ */ new Set();\n}\n/**\n* Create callbacks that can be cancelled if the component is unmounted, the\n* active variant changes, or the component moves out of the target screen in a\n* Framer prototype.\n*\n* @public\n*/\nfunction useActiveVariantCallback(baseVariant) {\n\tconst pendingPromises = useConstant(createSet);\n\tconst pendingTimers = useConstant(createSet);\n\tuseOnCurrentTargetChange(() => {\n\t\treturn () => rejectPending(pendingTimers, pendingPromises);\n\t});\n\tuseEffect(() => {\n\t\treturn () => rejectPending(pendingTimers, pendingPromises);\n\t}, []);\n\tuseEffect(() => {\n\t\trejectPending(pendingTimers, pendingPromises);\n\t}, [baseVariant]);\n\treturn useRef({\n\t\t/**\n\t\t* Create a callback that can be cancelled if the base variant changes.\n\t\t*/\n\t\tactiveVariantCallback: (callback) => async (...args) => {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tpendingPromises.add(reject);\n\t\t\t\tcallback(...args).then(resolve);\n\t\t\t}).catch(() => {});\n\t\t},\n\t\t/**\n\t\t* Execute a callback after a defined period of time. The callback will not\n\t\t* be called if pending events are cancelled because the timeout will be\n\t\t* cancelled.\n\t\t*/\n\t\tdelay: async (callback, msDelay) => {\n\t\t\tawait new Promise((resolve) => {\n\t\t\t\tpendingTimers.add(globalThis.setTimeout(() => resolve(true), msDelay));\n\t\t\t});\n\t\t\tcallback();\n\t\t}\n\t}).current;\n}\n/**\n* Create callbacks that can be cancelled if the component is unmounted, or the\n* component moves out of the target screen in a Framer prototype.\n*\n* @internal\n*/\nfunction useActiveTargetCallback() {\n\tconst value = useActiveVariantCallback(void 0);\n\treturn useRef({\n\t\tactiveTargetCallback: value.activeVariantCallback,\n\t\tdelay: value.delay\n\t}).current;\n}\n\n//#endregion\n//#region ../../library/src/modules/useAddVariantProps.ts\n/**\n* Returns combines React props from a hash map based on the active variants.\n*\n* @public\n*/\nfunction useAddVariantProps(baseVariant, gestureVariant, variantProps) {\n\treturn React.useCallback((id) => {\n\t\tif (!variantProps) return {};\n\t\tif (!baseVariant) return {};\n\t\tif (gestureVariant) return Object.assign({}, variantProps[baseVariant]?.[id], variantProps[gestureVariant]?.[id]);\n\t\treturn variantProps[baseVariant]?.[id] || {};\n\t}, [\n\t\tbaseVariant,\n\t\tgestureVariant,\n\t\tvariantProps\n\t]);\n}\n\n//#endregion\n//#region ../../library/src/modules/useBreakpointVariants.ts\nfunction createMediaQueriesFromBreakpoints(breakpoints) {\n\tconst mediaQueries = {};\n\tfor (const [variant, query] of Object.entries(breakpoints)) {\n\t\tconst { min = 0, max } = query;\n\t\tconst mediaQuery = [];\n\t\tif (min) mediaQuery.push(`(min-width: ${min}px)`);\n\t\tif (max) mediaQuery.push(`(max-width: ${max}px)`);\n\t\tif (mediaQuery.length) mediaQueries[variant] = mediaQuery.join(\" and \");\n\t}\n\treturn mediaQueries;\n}\nfunction activeMediaQueryFromWindow(mediaQueries) {\n\tfor (const [variant, query] of Object.entries(mediaQueries)) if (safeWindow.matchMedia(query).matches) return variant;\n}\nfunction activeBreakpointHashesFromWindow(breakpoints) {\n\tconst matches = [];\n\tfor (const { hash, mediaQuery } of breakpoints) {\n\t\tif (!mediaQuery) continue;\n\t\tif (safeWindow.matchMedia(mediaQuery).matches) matches.push(hash);\n\t}\n\tif (matches.length > 0) return matches;\n\tconst defaultHash = breakpoints[0]?.hash;\n\tif (!defaultHash) return void 0;\n\treturn [defaultHash];\n}\n/**\n* @internal\n*\n* Return the active breakpoint variant based on javascript media queries.\n* Additionally, initially return the primary breakpoint value, and update to\n* the active breakpoint in a layout effect to avoid hydration errors for\n* components whose react props differ from the primary breakpoint.\n*/\nfunction useHydratedBreakpointVariants(initial, mediaQueries, hydratedWithInitial = true) {\n\tconst isInitialNavigation = useContext(IsInitialNavigationContext);\n\tconst isStaticRenderer = useIsStaticRenderer();\n\tconst isScreenshotHost = isScreenshotFramerHost();\n\tconst usesMediaQueries = isBrowser$1() && (!isStaticRenderer || isScreenshotHost);\n\tconst baseVariant = useRef(usesMediaQueries ? activeMediaQueryFromWindow(mediaQueries) ?? initial : initial);\n\tconst basePropsVariant = useRef(hydratedWithInitial && isInitialNavigation ? initial : baseVariant.current);\n\tconst forceUpdate = useForceUpdate$2();\n\tconst instantTransition = useInstantTransition();\n\tconst setActiveVariantInstant = useCallback((variant) => {\n\t\tif (variant !== baseVariant.current || variant !== basePropsVariant.current) {\n\t\t\tfunction updateStateAndRerender() {\n\t\t\t\tbaseVariant.current = basePropsVariant.current = variant;\n\t\t\t\tstartTransition(() => {\n\t\t\t\t\tforceUpdate();\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (isStaticRenderer) updateStateAndRerender();\n\t\t\telse instantTransition(() => {\n\t\t\t\tupdateStateAndRerender();\n\t\t\t});\n\t\t}\n\t}, [\n\t\tinstantTransition,\n\t\tforceUpdate,\n\t\tisStaticRenderer\n\t]);\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tif (!isStaticRenderer) return;\n\t\tif (isScreenshotHost) {\n\t\t\tsetActiveVariantInstant(activeMediaQueryFromWindow(mediaQueries) ?? initial);\n\t\t\treturn;\n\t\t}\n\t\tsetActiveVariantInstant(initial);\n\t}, [\n\t\tinitial,\n\t\tisScreenshotHost,\n\t\tisStaticRenderer,\n\t\tmediaQueries,\n\t\tsetActiveVariantInstant\n\t]);\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tif (!hydratedWithInitial || isInitialNavigation !== true) return;\n\t\tsetActiveVariantInstant(baseVariant.current);\n\t}, []);\n\tuseEffect(() => {\n\t\tif (!usesMediaQueries || isScreenshotHost) return;\n\t\tconst callbacks = [];\n\t\tfor (const [variant, query] of Object.entries(mediaQueries)) {\n\t\t\tconst mql = safeWindow.matchMedia(query);\n\t\t\tconst callback = (event) => {\n\t\t\t\tif (event.matches) setActiveVariantInstant(variant);\n\t\t\t};\n\t\t\taddMQLCallback(mql, callback);\n\t\t\tcallbacks.push([mql, callback]);\n\t\t}\n\t\treturn () => callbacks.forEach(([mql, callback]) => removeMQLCallback(mql, callback));\n\t}, [\n\t\tisScreenshotHost,\n\t\tmediaQueries,\n\t\tsetActiveVariantInstant,\n\t\tusesMediaQueries\n\t]);\n\treturn [baseVariant.current, basePropsVariant.current];\n}\nfunction addMQLCallback(mql, callback) {\n\tif (mql.addEventListener) mql.addEventListener(\"change\", callback);\n\telse mql.addListener(callback);\n}\nfunction removeMQLCallback(mql, callback) {\n\tif (mql.removeEventListener) mql.removeEventListener(\"change\", callback);\n\telse mql.removeListener(callback);\n}\n/**\n* @internal\n*\n* Compatibility wrapper for old generated screens which pass an unused second\n* width argument, breakpoints as maps of raw number values, and expect to\n* receive a single return value.\n*/\nfunction useBreakpointVariants(initial, _width, breakpoints) {\n\tconst [initialVariant] = useHydratedBreakpointVariants(initial, useConstant(() => createMediaQueriesFromBreakpoints(breakpoints)), true);\n\treturn initialVariant;\n}\n/**\n* @internal\n*\n* @deprecated This function used to be called at the top level of old generated web page components, so we need to keep\n* it for backward compatibility. These days, it does nothing, and we instead remove hidden breakpoint layers using the\n* \"v2\" function below, which is being called in the main site script, right before hydration.\n*/\nfunction removeHiddenBreakpointLayers(_initial, _mediaQueries, _variantClassNames) {}\nconst framerBreakpointCSSSelector = \"style[data-framer-breakpoint-css]\";\n/** A fallback for when requestIdleCallback is not available (as of 2024, all Safari versions). */\nfunction requestIdleCallbackFallback(callback) {\n\tsetTimeout(callback, 1);\n}\n/**\n* During SSR, if a component differs between breakpoints in a way that can't be expressed purely with CSS, we render\n* (via PropertyOverrides) all its variants into the HTML, with a bit of CSS so that at runtime the browser only shows\n* the correct breakpoint.\n*\n* But then, we need to clean this up before hydration kicks in, otherwise we'll get a hydration error, because the\n* client doesn't expect all those extra (hidden) breakpoints that are still in the DOM.\n*\n* This is expected to be called in the main site script, right before hydration, see exportToHTML.ts.\n*/\nfunction removeHiddenBreakpointLayersV2(breakpoints) {\n\tconst suspenseBoundaries = /* @__PURE__ */ new Set();\n\tconst activeBreakpointHashes = activeBreakpointHashesFromWindow(breakpoints);\n\tif (activeBreakpointHashes) for (const hash of activeBreakpointHashes) for (const hiddenLayer of document.querySelectorAll(\".hidden-\" + hash)) {\n\t\tif (isSuspenseBoundaryStart(hiddenLayer.previousSibling)) suspenseBoundaries.add(hiddenLayer.previousSibling);\n\t\thiddenLayer.parentNode?.removeChild(hiddenLayer);\n\t}\n\t(supportsRequestIdleCallback ? safeWindow.requestIdleCallback : requestIdleCallbackFallback)(() => {\n\t\tdocument.querySelector(framerBreakpointCSSSelector)?.remove();\n\t});\n\tfor (const ssrVariant of document.querySelectorAll(\".ssr-variant:empty\")) {\n\t\tif (isSuspenseBoundaryStart(ssrVariant.previousSibling)) suspenseBoundaries.add(ssrVariant.previousSibling);\n\t\tssrVariant.parentNode?.removeChild(ssrVariant);\n\t}\n\tfor (const suspenseBoundary of suspenseBoundaries) if (isSuspenseBoundaryEnd(suspenseBoundary.nextSibling)) {\n\t\tsuspenseBoundary.parentNode?.removeChild(suspenseBoundary.nextSibling);\n\t\tsuspenseBoundary.parentNode?.removeChild(suspenseBoundary);\n\t}\n}\nfunction isSuspenseBoundaryStart(node) {\n\treturn node?.nodeType === Node.COMMENT_NODE && node.textContent === \"$\";\n}\nfunction isSuspenseBoundaryEnd(node) {\n\treturn node?.nodeType === Node.COMMENT_NODE && node.textContent === \"/$\";\n}\n\n//#endregion\n//#region ../../library/src/modules/useDataRecord.ts\n/**\n* Returns a record from the collection which matches all the given variables.\n*\n* @internal\n* @deprecated Use useQueryData instead.\n*/\nfunction useDataRecord(collection, variables) {\n\treturn useMemo(() => {\n\t\tif (!Array.isArray(collection)) return null;\n\t\tif (!variables) return null;\n\t\treturn collection.find((record) => {\n\t\t\treturn Object.entries(variables).every(([key, value]) => {\n\t\t\t\tconst recordValue = record[key];\n\t\t\t\tif (value === void 0 || recordValue === void 0 || isObject$1(value) || isObject$1(recordValue)) return false;\n\t\t\t\treturn String(value) === String(recordValue);\n\t\t\t});\n\t\t}) ?? null;\n\t}, [collection, variables]);\n}\n\n//#endregion\n//#region ../../library/src/modules/useDynamicRefs.ts\nfunction useDynamicRefs() {\n\tconst map = useConstant(() => /* @__PURE__ */ new Map());\n\treturn React.useCallback((key) => {\n\t\tconst existing = map.get(key);\n\t\tif (existing) return existing;\n\t\tconst ref = createRef();\n\t\tmap.set(key, ref);\n\t\treturn ref;\n\t}, []);\n}\nconst map = /* @__PURE__ */ new Map();\n/**\n* When a Scroll Section is provided to a Layout Template as a property by a Web\n* Page, we need to create the ref on a context so that it is available in the\n* parent Layout Template.\n*/\nfunction useSiteRefs() {\n\tconst route = useCurrentRoute();\n\tconst { activeLocale } = useLocaleInfo();\n\tconst path = useMemo(() => {\n\t\treturn getPathForRoute(route, {\n\t\t\tcurrentRoutePath: route?.path,\n\t\t\tcurrentRoutePathLocalized: route?.pathLocalized,\n\t\t\tcurrentPathVariables: route?.pathVariables,\n\t\t\tpreserveQueryParams: false,\n\t\t\trelative: false,\n\t\t\tsiteCanonicalURL: void 0,\n\t\t\tlocaleId: activeLocale?.id\n\t\t});\n\t}, [route, activeLocale?.id]);\n\treturn React.useCallback((key) => {\n\t\tif (!key) return;\n\t\tconst computedKey = `${path}-${key}`;\n\t\tconst existing = map.get(computedKey);\n\t\tif (existing) return existing;\n\t\tconst ref = createRef();\n\t\tmap.set(computedKey, ref);\n\t\treturn ref;\n\t}, [path]);\n}\n\n//#endregion\n//#region ../../library/src/modules/useGamepad.ts\n/** @internal */\nfunction isFramerGamepadKeydownData(value) {\n\treturn isObject$1(value) && value.mapping !== void 0;\n}\nfunction gamepadInputsHaveChanged(previous, current) {\n\tif (previous.length !== current.length) return true;\n\tif (!previous.every((item, i) => current[i] === item)) return true;\n\treturn false;\n}\n/**\n* Exported for testing.\n* @internal\n*/\nfunction createGamepadPoller() {\n\tconst handlers = /* @__PURE__ */ new Set();\n\tlet isConnected = false;\n\tlet isPolling = null;\n\tlet lastKeys = [];\n\tconst startPolling = () => {\n\t\tconst input = getGamepadInputs();\n\t\tif (!input) return;\n\t\tconst { gamepad, inputs } = input;\n\t\tconst { mapping, id } = gamepad;\n\t\tif (gamepadInputsHaveChanged(lastKeys, inputs)) handlers.forEach((handler) => handler({\n\t\t\tinputs,\n\t\t\tmapping,\n\t\t\tid\n\t\t}));\n\t\tlastKeys = inputs;\n\t\tisPolling = safeWindow.requestAnimationFrame(startPolling);\n\t};\n\tconst handleConnection = () => {\n\t\tif (isConnected || isPolling) return;\n\t\tstartPolling();\n\t\tisConnected = true;\n\t};\n\tconst stopPolling = () => {\n\t\tif (!isPolling) return;\n\t\tsafeWindow.cancelAnimationFrame(isPolling);\n\t\tisPolling = null;\n\t};\n\tconst handleDisconnection = () => {\n\t\tif (!isConnected) return;\n\t\tstopPolling();\n\t\tisConnected = false;\n\t};\n\tconst setupAndStartPolling = () => {\n\t\tif (isPolling) return;\n\t\tif (!getGamepadInputs()) {\n\t\t\tsafeWindow.addEventListener(\"gamepadconnected\", handleConnection);\n\t\t\treturn;\n\t\t}\n\t\tsafeWindow.addEventListener(\"gamepaddisconnected\", handleDisconnection);\n\t\tisConnected = true;\n\t\tstartPolling();\n\t};\n\tconst cleanupAndStopPolling = () => {\n\t\tif (!isPolling) return;\n\t\tsafeWindow.removeEventListener(\"gamepadconnected\", handleConnection);\n\t\tsafeWindow.removeEventListener(\"gamepaddisconnected\", handleDisconnection);\n\t\tstopPolling();\n\t};\n\treturn {\n\t\tregister(callback) {\n\t\t\tif (handlers.size === 0) setupAndStartPolling();\n\t\t\thandlers.add(callback);\n\t\t},\n\t\tunregister(callback) {\n\t\t\thandlers.delete(callback);\n\t\t\tif (handlers.size === 0) cleanupAndStopPolling();\n\t\t}\n\t};\n}\nconst gamepadPoller = /* @__PURE__ */ createGamepadPoller();\n/** @internal */\nconst GamepadContext = /* @__PURE__ */ React.createContext(gamepadPoller);\n/**\n* Return the first gamepad that has input together with the input keys. If\n* there's no input, return the first available gamepad. If there's no gamepad\n* connected, return null.\n*/\nfunction getGamepadInputs() {\n\tlet firstConnectedGamepad = null;\n\tconst gamepads = navigator.getGamepads();\n\tfor (const gamepad of gamepads) {\n\t\tif (!gamepad) continue;\n\t\tif (!firstConnectedGamepad) firstConnectedGamepad = gamepad;\n\t\tconst inputs = [...scanPressedAxis(gamepad), ...scanPressedButtons(gamepad)];\n\t\tif (inputs.length > 0) return {\n\t\t\tgamepad,\n\t\t\tinputs\n\t\t};\n\t}\n\tif (firstConnectedGamepad) return {\n\t\tgamepad: firstConnectedGamepad,\n\t\tinputs: []\n\t};\n\treturn null;\n}\nfunction scanPressedAxis(gamepad) {\n\tconst axes = [];\n\tfor (const [idx, axis] of gamepad.axes.entries()) {\n\t\tif (idx > 3) continue;\n\t\tif (axis <= -.5) axes.push(`Axis ${idx}-`);\n\t\tif (axis > .5) axes.push(`Axis ${idx}+`);\n\t}\n\treturn axes;\n}\nfunction scanPressedButtons(gamepad) {\n\tconst buttons = [];\n\tfor (const [idx, button] of gamepad.buttons.entries()) if (isButtonPressed(button)) buttons.push(`Button ${idx}`);\n\treturn buttons;\n}\nfunction isButtonPressed(button) {\n\treturn button.pressed === true || button.value > 0;\n}\n/**\n* Register a callback to be executed when a gamepad button is pressed and the\n* registering component is in the current Framer navigation target. Optionally\n* provide a specific gamepad mapping, or flag the hook to operate on keyup.\n*\n*  @public\n*/\nfunction useGamepad(input, callback, { mapping, on } = {}) {\n\tconst context = React.useContext(GamepadContext);\n\tconst settings = useConstant(() => ({\n\t\tmapping: mapping ?? \"standard\",\n\t\ton: on ?? \"keydown\"\n\t}));\n\tconst stateRef = React.useRef({\n\t\tpressed: false,\n\t\thandler: callback\n\t});\n\tconst cb = React.useCallback((gamepad) => {\n\t\tconst { pressed, handler } = stateRef.current;\n\t\tif (gamepad.inputs.includes(input) && settings.mapping === gamepad.mapping) {\n\t\t\tsettings.on === \"keydown\" && handler();\n\t\t\tstateRef.current.pressed = true;\n\t\t} else if (pressed) {\n\t\t\tsettings.on === \"keyup\" && handler();\n\t\t\tstateRef.current.pressed = false;\n\t\t}\n\t}, [input, settings]);\n\tuseOnCurrentTargetChange((isInTarget, isOverlayed) => {\n\t\tif (isInTarget && !isOverlayed) context.register(cb);\n\t\telse context.unregister(cb);\n\t\treturn () => context.unregister(cb);\n\t}, []);\n\tReact.useEffect(() => {\n\t\treturn () => context.unregister(cb);\n\t}, [cb, context]);\n\tReact.useEffect(() => {\n\t\tstateRef.current.handler = callback;\n\t}, [callback]);\n}\n\n//#endregion\n//#region ../../library/src/modules/useHotkey.ts\nconst modifierDefaults = {\n\taltKey: false,\n\tctrlKey: false,\n\tmetaKey: false,\n\tshiftKey: false\n};\nfunction createShortcutDefinition(shortcut) {\n\tconst keys = shortcut.split(\"+\");\n\tconst key = keys.pop();\n\tif (!key) return void 0;\n\tconst modifiers = {};\n\tfor (const modifier of keys) modifiers[`${modifier}Key`] = true;\n\treturn {\n\t\t...modifierDefaults,\n\t\t...modifiers,\n\t\tkey\n\t};\n}\n/** @internal */\nfunction useHotkey(shortcut, callback) {\n\tconst inTarget = React.useRef(true);\n\tconst shortcutDefinition = useConstant(() => createShortcutDefinition(shortcut));\n\tuseOnCurrentTargetChange((isCurrentTarget, isOverlayed) => {\n\t\tinTarget.current = isCurrentTarget && !isOverlayed;\n\t\treturn () => inTarget.current = false;\n\t});\n\tconst eventHandler = React.useCallback((event) => {\n\t\tif (!shortcutDefinition) return;\n\t\tif (!inTarget.current) return;\n\t\tif (!Object.keys(shortcutDefinition).every((key) => shortcutDefinition[key] === asRecord(event)[key])) return;\n\t\tevent.preventDefault();\n\t\tcallback();\n\t}, [shortcutDefinition, callback]);\n\tReact.useEffect(() => {\n\t\tdocument.addEventListener(\"keydown\", eventHandler);\n\t\treturn () => document.removeEventListener(\"keydown\", eventHandler);\n\t}, [eventHandler]);\n}\n\n//#endregion\n//#region ../../library/src/modules/useNavigate.tsx\n/**\n* A wrapper around the Router API to provide backwards compatibilty for\n* generated components that depend on the `useNavigate` export from \"framer\",\n* instead of the `useRoute` that is currently used\n*\n* @internal\n*/\nfunction useNavigate() {\n\tconst { navigate } = useRouter();\n\tconst onCanvas = useIsOnFramerCanvas();\n\tif (!navigate) return () => {};\n\treturn (target) => {\n\t\tif (onCanvas) return;\n\t\tnavigate(target);\n\t\treturn false;\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/useOnVariantChange.ts\nfunction callbackForVariant(map, variant) {\n\tif (map[variant]) return map[variant];\n\tif (variant in map) return void 0;\n\treturn map.default;\n}\n/**\n* Executes a callback when the base variant changes. Events will not be\n* executed on the Framer canvas.\n*\n* @public\n*/\nfunction useOnVariantChange(variant, callbackMap) {\n\tif (isStaticRenderer()) return;\n\tconst isActiveScreenRef = React.useRef(true);\n\tconst callbackMapRef = React.useRef(callbackMap);\n\tuseOnCurrentTargetChange((isCurrent, isOverlayed) => {\n\t\tconst isActiveScreen = isCurrent && !isOverlayed;\n\t\tif (!isActiveScreenRef.current && isActiveScreen) {\n\t\t\tconst callback = callbackForVariant(callbackMapRef.current, variant);\n\t\t\tif (callback) callback();\n\t\t}\n\t\tisActiveScreenRef.current = isActiveScreen;\n\t}, []);\n\tReact.useEffect(() => {\n\t\tif (isActiveScreenRef.current) {\n\t\t\tconst callback = callbackForVariant(callbackMapRef.current, variant);\n\t\t\tif (callback) callback();\n\t\t}\n\t}, [variant]);\n}\n/**\n* A simplified version of useOnVariantChange, that takes a single callback,\n* cancelling it only if the navigation target changes.\n*\n* @internal\n*/\nfunction useOnAppear(callback) {\n\tuseOnVariantChange(\"default\", { default: callback });\n}\n\n//#endregion\n//#region ../../library/src/modules/useOverlayState.tsx\nfunction setOverflow(blockDocumentScrolling, show) {\n\tif (blockDocumentScrolling === false) return;\n\tframe.render(() => {\n\t\tconst htmlStyle = document.documentElement.style;\n\t\tif (show) htmlStyle.setProperty(\"overflow\", \"hidden\");\n\t\telse htmlStyle.removeProperty(\"overflow\");\n\t});\n}\n/**\n* When managing hiding/showing overlays, we want to prevent accidental body\n* scrolling beneath the overlay. This hook decorates a normal React useState\n* hook with solving this problem.\n*\n* Additionally, we allow the overlay to be dismissed by the escape key\n* when explicitly enabled.\n*\n* @public\n*/\nfunction useOverlayState({ blockDocumentScrolling = true, dismissWithEsc = false } = {}) {\n\tconst [showOverlay, setShowOverlay] = React.useState(false);\n\tconst callback = React.useCallback(async (show) => {\n\t\tawait yieldToMain({\n\t\t\tpriority: \"user-blocking\",\n\t\t\tcontinueAfter: \"paint\"\n\t\t});\n\t\tstartTransition(() => setShowOverlay(show));\n\t\tsetOverflow(blockDocumentScrolling, show);\n\t}, [blockDocumentScrolling]);\n\tReact.useEffect(() => () => {\n\t\tyieldToMain({\n\t\t\tpriority: \"user-blocking\",\n\t\t\tcontinueAfter: \"paint\"\n\t\t}).then(() => {\n\t\t\tsetOverflow(blockDocumentScrolling, false);\n\t\t});\n\t}, [blockDocumentScrolling]);\n\tReact.useEffect(() => {\n\t\tif (!dismissWithEsc) return;\n\t\tconst handleEscapeKeyDown = (event) => {\n\t\t\tif (event.key !== \"Escape\") return;\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tcallback(false);\n\t\t};\n\t\tsafeWindow.addEventListener(\"keydown\", handleEscapeKeyDown);\n\t\treturn () => safeWindow.removeEventListener(\"keydown\", handleEscapeKeyDown);\n\t}, [dismissWithEsc, callback]);\n\treturn [showOverlay, callback];\n}\n\n//#endregion\n//#region ../../library/src/router/isRoute.ts\nconst key$2 = \"page\";\n/**\n* @internal\n*/\nfunction isRoute(route) {\n\treturn isObject$1(route) && key$2 in route && route.page !== void 0;\n}\n\n//#endregion\n//#region ../../library/src/modules/usePrototypeNavigate.tsx\n/**\n* If it is a lazy import, we need to call React.createElement to ensure it is\n* mountable. The value returned from the router can either be a valid React\n* element, for instance if created with React.createElement or written in JSX,\n* or it can be a React.ComponentType, in which case we have to explicitly call\n* React.CreateElement before returning.\n*/\nasync function componentForRoute(route) {\n\tif (!isRoute(route)) return;\n\tconst { page: routeComponent } = route;\n\tif (!routeComponent) return;\n\tif (React.isValidElement(routeComponent)) return routeComponent;\n\tif (withPreload(routeComponent)) await routeComponent.preload();\n\treturn React.createElement(routeComponent, { key: route.path });\n}\nconst preloadKey = \"preload\";\nfunction withPreload(component) {\n\treturn !!component && isObject$1(component) && preloadKey in component;\n}\n/**\n* A relative duplicate of useNavigate from runtime to support navigation in\n* combined screens. Additionally supports a preload argument that allows target\n* screens that are lazy imported to be requested before they are navigated to.\n*\n* @internal\n*/\nfunction usePrototypeNavigate({ preload } = {}) {\n\tconst navigation = useNavigation();\n\tconst { getRoute } = useRouter();\n\tconst onCanvas = useIsOnFramerCanvas();\n\tReact.useEffect(() => {\n\t\tif (!navigation || onCanvas) return;\n\t\tpreload?.forEach((componentOrRoute) => {\n\t\t\tlet component;\n\t\t\tif (isString(componentOrRoute)) {\n\t\t\t\tconst route = getRoute?.(componentOrRoute);\n\t\t\t\tif (isRoute(route)) component = route.page;\n\t\t\t} else component = componentOrRoute;\n\t\t\tif (component && withPreload(component)) component.preload();\n\t\t});\n\t}, []);\n\tif (!navigation) return () => {};\n\treturn async (target, options = {}) => {\n\t\tif (onCanvas) return;\n\t\tif (target === \"previous\") {\n\t\t\tnavigation.goBack();\n\t\t\treturn false;\n\t\t}\n\t\tconst Component = typeof target === \"string\" ? await componentForRoute(getRoute?.(target)).catch(() => {}) : React.isValidElement(target) ? target : null;\n\t\tif (!Component) return;\n\t\tconst { appearsFrom, backdropColor, animation } = options;\n\t\tswitch (options.transition || \"instant\") {\n\t\t\tcase \"instant\":\n\t\t\t\tnavigation.instant(Component);\n\t\t\t\tbreak;\n\t\t\tcase \"fade\":\n\t\t\t\tnavigation.fade(Component, { animation });\n\t\t\t\tbreak;\n\t\t\tcase \"push\":\n\t\t\t\tnavigation.push(Component, {\n\t\t\t\t\tappearsFrom,\n\t\t\t\t\tanimation\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"flip\":\n\t\t\t\tnavigation.flip(Component, {\n\t\t\t\t\tappearsFrom,\n\t\t\t\t\tanimation\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"magicMotion\":\n\t\t\t\tnavigation.magicMotion(Component, { animation });\n\t\t\t\tbreak;\n\t\t\tcase \"modal\":\n\t\t\t\tnavigation.modal(Component, {\n\t\t\t\t\tbackdropColor,\n\t\t\t\t\tanimation\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"overlay\": navigation.overlay(Component, {\n\t\t\t\tappearsFrom,\n\t\t\t\tbackdropColor,\n\t\t\t\tanimation\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t};\n}\n\n//#endregion\n//#region ../../library/src/components/utils/useLoadMorePaginatedQuery.tsx\nfunction useLoadMorePaginatedQuery(query, pageSize, hash) {\n\tconst count = useQueryCount(query);\n\tconst { paginationInfo, loadMore } = useLoadMorePagination(count, pageSize, hash, true);\n\treturn {\n\t\tpaginatedQuery: useMemo(() => {\n\t\t\tlet limit = pageSize * paginationInfo.currentPage;\n\t\t\tif (query.limit) {\n\t\t\t\tif (query.limit.type !== \"LiteralValue\" || typeof query.limit.value !== \"number\") throw new Error(\"Unexpected type for query limit\");\n\t\t\t\tlimit = Math.min(limit, query.limit.value);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t...query,\n\t\t\t\tlimit: {\n\t\t\t\t\ttype: \"LiteralValue\",\n\t\t\t\t\tvalue: limit\n\t\t\t\t}\n\t\t\t};\n\t\t}, [\n\t\t\tquery,\n\t\t\tpageSize,\n\t\t\tpaginationInfo\n\t\t]),\n\t\tpaginationInfo,\n\t\tloadMore\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/useVariantState.ts\nfunction createGestureVariant(variant, type) {\n\treturn `${variant}-${type}`;\n}\nfunction nextVariant(allVariants, currentVariant) {\n\tlet nextIndex = allVariants.indexOf(currentVariant) + 1;\n\tif (nextIndex >= allVariants.length) nextIndex = 0;\n\tconst nextVariant = allVariants[nextIndex];\n\tassert$1(nextVariant !== void 0, \"nextVariant should be defined\");\n\treturn nextVariant;\n}\nfunction activeTransition(transitions, variant) {\n\tif (!transitions) return void 0;\n\tif (variant) {\n\t\tconst variantTransition = transitions[variant];\n\t\tif (variantTransition) return variantTransition;\n\t}\n\treturn transitions.default;\n}\n/**\n* @internal\n*/\nlet VariantSelector = /* @__PURE__ */ function(VariantSelector) {\n\tVariantSelector[\"Variant\"] = \"v\";\n\treturn VariantSelector;\n}({});\nfunction getGesture(enabledGestures, isHovered, isPressed, isLoading, isError) {\n\tconst { hover, pressed, loading, error } = enabledGestures || {};\n\tif (error && isError) return \"error\";\n\tif (loading && isLoading) return \"loading\";\n\tif (pressed && isPressed) return \"pressed\";\n\tif (hover && isHovered) return \"hover\";\n}\nfunction createVariantClassName(baseVariant, variantClassNames) {\n\tconst mappedClassName = variantClassNames[baseVariant];\n\tif (mappedClassName) return mappedClassName;\n\treturn `framer-v-${baseVariant}`;\n}\nfunction safeBaseVariant(targetVariant, fallbackVariant, validBaseVariants) {\n\tif (!targetVariant) return fallbackVariant;\n\tif (validBaseVariants.has(targetVariant)) return targetVariant;\n\treturn fallbackVariant;\n}\n/**\n* Flag setVariantState as cycling variants.\n* @public\n*/\nconst CycleVariantState = /* @__PURE__ */ Symbol(\"cycle\");\n/**\n* Runs the specified callback if the page is visible. If not, it will wait until the page becomes visible.\n*/\nfunction useRunCallbackIfPageIsVisible() {\n\tconst listenerRef = useRef();\n\tconst callbackRef = useRef();\n\tconst clean = useCallback(() => {\n\t\tif (!listenerRef.current) return;\n\t\tdocument.removeEventListener(\"visibilitychange\", listenerRef.current);\n\t\tlistenerRef.current = void 0;\n\t\tcallbackRef.current = void 0;\n\t}, []);\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tclean();\n\t\t};\n\t}, [clean]);\n\treturn useCallback((callback) => {\n\t\tif (!document.hidden) {\n\t\t\tcallback();\n\t\t\tclean();\n\t\t\treturn;\n\t\t}\n\t\tcallbackRef.current = callback;\n\t\tif (listenerRef.current) return;\n\t\tconst listenerFn = () => {\n\t\t\tif (document.hidden) return;\n\t\t\tcallbackRef.current?.();\n\t\t\tclean();\n\t\t};\n\t\tlistenerRef.current = listenerFn;\n\t\tdocument.addEventListener(\"visibilitychange\", listenerFn);\n\t}, [clean]);\n}\n/**\n* Runs the specified callback if the element is in view. If not, it will wait until the element comes into view.\n*/\nfunction useRunCallbackIfElementIsInView() {\n\tconst observerRefCleanup = useRef();\n\tconst isInViewRef = useRef(false);\n\tconst callbackRef = useRef();\n\tconst observers = useContext(SharedIntersectionObserverContext);\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tobserverRefCleanup.current?.();\n\t\t\tcallbackRef.current = void 0;\n\t\t\tobserverRefCleanup.current = void 0;\n\t\t};\n\t}, []);\n\treturn useCallback((callback, ref) => {\n\t\tif (!ref?.current || isInViewRef.current) {\n\t\t\tcallback();\n\t\t\treturn;\n\t\t}\n\t\tcallbackRef.current = callback;\n\t\tif (observerRefCleanup.current) return;\n\t\tlet queuedMicrotask = false;\n\t\tconst observerCallback = (entry) => {\n\t\t\tisInViewRef.current = entry.isIntersecting;\n\t\t\tif (queuedMicrotask) return;\n\t\t\tqueuedMicrotask = true;\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tqueuedMicrotask = false;\n\t\t\t\tif (!isInViewRef.current) return;\n\t\t\t\tcallbackRef.current?.();\n\t\t\t});\n\t\t};\n\t\tobserverRefCleanup.current = observeElement(observers, \"undefined\", ref.current, null, observerCallback);\n\t}, [observers]);\n}\nfunction useUpdateIfVisible(ref) {\n\tconst runUpdateIfPageIsVisible = useRunCallbackIfPageIsVisible();\n\tconst runUpdateIfElementIsInView = useRunCallbackIfElementIsInView();\n\treturn useCallback((callback, checkViewport = false) => {\n\t\tif (isBot) {\n\t\t\tcallback();\n\t\t\treturn;\n\t\t}\n\t\trunUpdateIfPageIsVisible(checkViewport && ref ? () => runUpdateIfElementIsInView(callback, ref) : callback);\n\t}, [\n\t\trunUpdateIfPageIsVisible,\n\t\trunUpdateIfElementIsInView,\n\t\tref\n\t]);\n}\nlet globalWaitingForClickPromise;\nlet globalWaitingForClickResolve;\nasync function getPromiseWithFallback() {\n\treturn new Promise((resolve) => {\n\t\tlet resolveFn = resolve;\n\t\tsetTimeout(() => {\n\t\t\tif (!resolveFn) return;\n\t\t\tperformance.mark(\"wait-for-click-fallback\");\n\t\t\tresolveFn();\n\t\t}, 150);\n\t\tglobalWaitingForClickResolve = () => {\n\t\t\tresolve();\n\t\t\tresolveFn = void 0;\n\t\t};\n\t});\n}\nfunction globalWaitForClickListener(event) {\n\tif (event.button === 0) {\n\t\tperformance.mark(\"pointerdown-listener\");\n\t\tglobalWaitingForClickPromise = getPromiseWithFallback();\n\t}\n}\nfunction globalClickReceivedListener() {\n\tperformance.mark(\"click-received-listener\");\n\tglobalWaitingForClickPromise = void 0;\n\tglobalWaitingForClickResolve?.();\n\tglobalWaitingForClickResolve = void 0;\n}\nfunction useWaitForGlobalClick(enabled = false) {\n\tuseEffect(() => {\n\t\tif (!enabled) return;\n\t\tdocument.addEventListener(\"pointerup\", globalWaitForClickListener, true);\n\t\tdocument.__proto__.addEventListener.call(document, \"click\", globalClickReceivedListener, true);\n\t}, [enabled]);\n}\n/**\n* Handle stateful logic in Framer Canvas Components.\n*\n* @public\n*/\nfunction useVariantState({ variant, defaultVariant: externalDefaultVariant, transitions: externalTransitions, enabledGestures: externalEnabledGestures, cycleOrder: externalCycleOrder = [], variantProps = {}, variantClassNames = {}, ref }) {\n\tconst forceUpdate = useForceUpdate$2();\n\tconst isCanvas = useIsOnFramerCanvas();\n\tconst validBaseVariants = useConstant(() => new Set(externalCycleOrder));\n\tuseWaitForGlobalClick(getLibraryFeatures().yieldOnTap);\n\tconst runUpdateIfVisible = useUpdateIfVisible(ref);\n\tconst internalState = useRef({\n\t\tisHovered: false,\n\t\tisHoveredHasUpdated: false,\n\t\tisPressed: false,\n\t\tisPressedHasUpdated: false,\n\t\tisError: false,\n\t\thasPressedVariants: true,\n\t\tbaseVariant: safeBaseVariant(variant, externalDefaultVariant, validBaseVariants),\n\t\tlastVariant: variant,\n\t\tgestureVariant: void 0,\n\t\tloadedBaseVariant: {},\n\t\tdefaultVariant: externalDefaultVariant,\n\t\tenabledGestures: externalEnabledGestures,\n\t\tcycleOrder: externalCycleOrder,\n\t\ttransitions: externalTransitions\n\t});\n\tconst resolveNextVariant = useCallback((targetBaseVariant) => {\n\t\tconst { isHovered, isPressed, isError, enabledGestures, defaultVariant } = internalState.current;\n\t\tconst nextBaseVariant = safeBaseVariant(targetBaseVariant, defaultVariant, validBaseVariants);\n\t\tconst gesture = getGesture(enabledGestures?.[nextBaseVariant], isHovered, isPressed, false, isError);\n\t\treturn [nextBaseVariant, gesture ? createGestureVariant(nextBaseVariant, gesture) : void 0];\n\t}, []);\n\tconst updateIfNeeded = useCallback(async (baseVariant, gestureVariant, defaultVariant, nextBaseVariant, checkViewport = false, clearError = false) => {\n\t\tconst [nextBase, nextGesture] = resolveNextVariant(nextBaseVariant);\n\t\tif (nextBase === baseVariant && nextGesture === gestureVariant) return;\n\t\tif (clearError) internalState.current.isError = false;\n\t\tinternalState.current.baseVariant = nextBase || defaultVariant;\n\t\tinternalState.current.gestureVariant = nextGesture;\n\t\tconst yieldOnTap = getLibraryFeatures().yieldOnTap && internalState.current.isPressedHasUpdated;\n\t\tif (yieldOnTap && globalWaitingForClickPromise) {\n\t\t\tperformance.mark(\"wait-for-tap-start\");\n\t\t\tawait globalWaitingForClickPromise;\n\t\t\tperformance.measure(\"wait-for-tap\", \"wait-for-tap-start\");\n\t\t}\n\t\tif (yieldOnTap) {\n\t\t\tperformance.mark(\"yield-on-tap-start\");\n\t\t\tawait yieldToMain({\n\t\t\t\tpriority: \"user-blocking\",\n\t\t\t\tcontinueAfter: \"paint\"\n\t\t\t});\n\t\t\tperformance.measure(\"yield-on-tap\", \"yield-on-tap-start\");\n\t\t}\n\t\tconst { isHovered, isPressed, isHoveredHasUpdated, isPressedHasUpdated } = internalState.current;\n\t\tif (isHovered || isHoveredHasUpdated || isPressed || isPressedHasUpdated) {\n\t\t\tstartTransition(forceUpdate);\n\t\t\treturn;\n\t\t}\n\t\trunUpdateIfVisible(() => startTransition(forceUpdate), checkViewport);\n\t}, [\n\t\tresolveNextVariant,\n\t\tforceUpdate,\n\t\trunUpdateIfVisible\n\t]);\n\tconst setGestureState = useCallback(({ isHovered, isPressed, isError }) => {\n\t\tif (isHovered && !isCanvas && getLibraryFeatures().disableHoverOnMobile && !getHoverCapability()) isHovered = false;\n\t\tconst isPressedHasUpdated = isPressed !== internalState.current.isPressed;\n\t\tconst isHoveredHasUpdated = isHovered !== internalState.current.isHovered;\n\t\tif (isHovered !== void 0) internalState.current.isHovered = isHovered;\n\t\tif (isPressed !== void 0) internalState.current.isPressed = isPressed;\n\t\tif (isError !== void 0) internalState.current.isError = isError;\n\t\tconst { baseVariant, gestureVariant, defaultVariant } = internalState.current;\n\t\tinternalState.current.isPressedHasUpdated = isPressedHasUpdated;\n\t\tinternalState.current.isHoveredHasUpdated = isHoveredHasUpdated;\n\t\tupdateIfNeeded(baseVariant, gestureVariant, defaultVariant, baseVariant, false);\n\t}, [updateIfNeeded, isCanvas]);\n\tconst setVariant = useCallback((proposedVariant, pauseOffscreen = false) => {\n\t\tconst { defaultVariant, cycleOrder, baseVariant, gestureVariant } = internalState.current;\n\t\tconst nextBaseVariant = proposedVariant === CycleVariantState ? nextVariant(cycleOrder || [], baseVariant || defaultVariant) : proposedVariant;\n\t\tupdateIfNeeded(baseVariant, gestureVariant, defaultVariant, nextBaseVariant, pauseOffscreen, true);\n\t}, [updateIfNeeded]);\n\tconst clearLoadingGesture = useCallback(() => {\n\t\tconst { baseVariant } = internalState.current;\n\t\tinternalState.current.loadedBaseVariant[baseVariant] = true;\n\t\trunUpdateIfVisible(() => startTransition(forceUpdate), true);\n\t}, [forceUpdate, runUpdateIfVisible]);\n\tif (variant !== internalState.current.lastVariant) {\n\t\tconst [nextBase, nextGesture] = resolveNextVariant(variant);\n\t\tinternalState.current.lastVariant = nextBase;\n\t\tif (nextBase !== internalState.current.baseVariant || nextGesture !== internalState.current.gestureVariant) {\n\t\t\tinternalState.current.baseVariant = nextBase;\n\t\t\tinternalState.current.gestureVariant = nextGesture;\n\t\t}\n\t}\n\tconst { baseVariant, gestureVariant, defaultVariant, enabledGestures, isHovered, isPressed, isError, loadedBaseVariant } = internalState.current;\n\tconst addVariantProps = useAddVariantProps(internalState.current.baseVariant, internalState.current.gestureVariant, variantProps);\n\treturn useMemo(() => {\n\t\tconst variants = [];\n\t\tif (baseVariant !== defaultVariant) variants.push(baseVariant);\n\t\tconst hasLoadingVariant = enabledGestures?.[baseVariant]?.loading;\n\t\tconst isLoading = !isError && !isCanvas && !!hasLoadingVariant && !loadedBaseVariant[baseVariant];\n\t\tconst gesture = isLoading ? createGestureVariant(baseVariant, \"loading\") : gestureVariant;\n\t\tif (gesture) variants.push(gesture);\n\t\tconst gestures = enabledGestures?.[baseVariant];\n\t\tconst gestureHandlers = {\n\t\t\tonMouseEnter: () => setGestureState({ isHovered: true }),\n\t\t\tonMouseLeave: () => setGestureState({ isHovered: false })\n\t\t};\n\t\tif (gestures?.pressed) Object.assign(gestureHandlers, {\n\t\t\tonTapStart: () => setGestureState({ isPressed: true }),\n\t\t\tonTapCancel: () => setGestureState({ isPressed: false }),\n\t\t\tonTap: () => setGestureState({ isPressed: false })\n\t\t});\n\t\treturn {\n\t\t\tvariants,\n\t\t\tbaseVariant,\n\t\t\tgestureVariant: gesture,\n\t\t\tisLoading,\n\t\t\ttransition: activeTransition(internalState.current.transitions, baseVariant),\n\t\t\tsetVariant,\n\t\t\tsetGestureState,\n\t\t\tclearLoadingGesture,\n\t\t\taddVariantProps,\n\t\t\tgestureHandlers,\n\t\t\tclassNames: cx(createVariantClassName(baseVariant, variantClassNames), getGesture(gestures, isHovered, isPressed, isLoading, isError))\n\t\t};\n\t}, [\n\t\tbaseVariant,\n\t\tgestureVariant,\n\t\tisHovered,\n\t\tisPressed,\n\t\tloadedBaseVariant,\n\t\taddVariantProps,\n\t\tsetVariant,\n\t\tdefaultVariant,\n\t\tenabledGestures,\n\t\tsetGestureState,\n\t\tclearLoadingGesture,\n\t\tvariantClassNames\n\t]);\n}\n\n//#endregion\n//#region ../../library/src/modules/safeCSSValue.ts\nconst reUnsafeCharacters = /[}{<>&;]/u;\nfunction safeCSSValue(value) {\n\tif (!isString(value)) return \"none\";\n\tif (reUnsafeCharacters.test(value)) return \"none\";\n\treturn value;\n}\n\n//#endregion\n//#region ../../library/src/modules/code-boundary/withCodeBoundaryForOverrides.tsx\nconst appliedOverrides = /* @__PURE__ */ new WeakMap();\n/**\n* A code boundary for code overrides. Ensures any errors thrown by overrides\n* (either during SSR, or during client render) don’t crash the whole page – and, instead,\n* just disable the override.\n*\n* Unlike code components (which might only throw during rendering), a code override might throw\n* in several situations:\n*\n* 1) in the override HOC:\n*\n*    ```tsx\n*    const withBlue = (Component) => {\n*      doSomething() // this throws\n*      return (props) => <Component {...props} color=\"blue\" />\n*    }\n*    ```\n*\n* 2) in the component created by the override:\n*\n*    ```tsx\n*    const withBlue = (Component) => {\n*      return (props) => {\n*        doSomething() // this throws\n*        return <Component {...props} color=\"blue\" />\n*      }\n*    }\n*    ```\n*\n* This means we have to try/catch both when applying the override, and when rendering the overridden component.\n*/\nfunction withCodeBoundaryForOverrides(Component, { scopeId, nodeId, override, inComponentSlot }) {\n\tif (getLibraryFeatures().disableCustomCode) return Component;\n\tif (!shouldEnableCodeBoundaries()) return applyOverride(Component, override, scopeId, nodeId);\n\tconst appliedOverride = tryToApplyOverride(Component, override, scopeId, nodeId);\n\tlet hasErrorBeenLogged = false;\n\tfunction CodeBoundaryForOverrides(props, ref) {\n\t\tconst nearestExternalComponent = useNearestExternalComponent();\n\t\tif (shouldWrapOverrideWithBoundary(scopeId, nearestExternalComponent?.scopeId, nearestExternalComponent?.level, inComponentSlot ?? false)) {\n\t\t\tif (appliedOverride.status === \"success\") return /* @__PURE__ */ jsx(NodeIdContext.Provider, {\n\t\t\t\tvalue: nodeId,\n\t\t\t\tchildren: /* @__PURE__ */ jsx(CodeComponentBoundary, {\n\t\t\t\t\tgetErrorMessage: getErrorMessageForOverride.bind(null, scopeId, nodeId),\n\t\t\t\t\tfallback: /* @__PURE__ */ jsx(Component, {\n\t\t\t\t\t\t...props,\n\t\t\t\t\t\tref\n\t\t\t\t\t}),\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(appliedOverride.Component, {\n\t\t\t\t\t\t...props,\n\t\t\t\t\t\tref\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t});\n\t\t\telse {\n\t\t\t\tif (!hasErrorBeenLogged) {\n\t\t\t\t\tlogError(appliedOverride.error);\n\t\t\t\t\tlogError(getErrorMessageForOverride(scopeId, nodeId));\n\t\t\t\t\tcollectErrorToAnalytics(appliedOverride.error);\n\t\t\t\t\thasErrorBeenLogged = true;\n\t\t\t\t}\n\t\t\t\treturn /* @__PURE__ */ jsx(Component, {\n\t\t\t\t\t...props,\n\t\t\t\t\tref\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (appliedOverride.status === \"success\") return /* @__PURE__ */ jsx(NodeIdContext.Provider, {\n\t\t\tvalue: nodeId,\n\t\t\tchildren: /* @__PURE__ */ jsx(appliedOverride.Component, {\n\t\t\t\t...props,\n\t\t\t\tref\n\t\t\t})\n\t\t});\n\t\telse throw appliedOverride.error;\n\t}\n\treturn React.forwardRef(CodeBoundaryForOverrides);\n}\n/** Try to apply passed overrides, and return the error if that fails. */\nfunction tryToApplyOverride(Component, override, scopeId, nodeId) {\n\ttry {\n\t\treturn {\n\t\t\tstatus: \"success\",\n\t\t\tComponent: applyOverride(Component, override, scopeId, nodeId)\n\t\t};\n\t} catch (error) {\n\t\treturn {\n\t\t\tstatus: \"error\",\n\t\t\terror\n\t\t};\n\t}\n}\n/** Cache per call site so Fast Refresh keeps the override wrapper stable and avoids remounting. */\nfunction applyOverride(Component, override, scopeId, nodeId) {\n\tlet components = appliedOverrides.get(override);\n\tif (!components) {\n\t\tcomponents = /* @__PURE__ */ new WeakMap();\n\t\tappliedOverrides.set(override, components);\n\t}\n\tlet callSites = components.get(Component);\n\tif (!callSites) {\n\t\tcallSites = /* @__PURE__ */ new Map();\n\t\tcomponents.set(Component, callSites);\n\t}\n\tconst callSite = `${scopeId}:${nodeId}`;\n\tif (callSites.has(callSite)) return callSites.get(callSite);\n\tconst ComponentWithOverrides = override(Component);\n\tcallSites.set(callSite, ComponentWithOverrides);\n\treturn ComponentWithOverrides;\n}\n\n//#endregion\n//#region ../../library/src/modules/withStrokeFX.tsx\nfunction valueWithMirroring(value, mirror) {\n\treturn mirror ? wrap(0, 2, value) : value;\n}\nfunction singleFrame() {\n\treturn new Promise((resolve) => {\n\t\tframe.postRender(() => resolve());\n\t});\n}\nconst withV1StrokeFX = (Component) => forwardRef((props, forwardedRef) => {\n\tconst { strokeEffectLength, strokeEffectGap, strokeEffectOffset, strokeEffectLoop, strokeEffectTotalLength, strokeEffectLoopType, pathLengthTransition, ...restProps } = props;\n\tconst isCanvas = isStaticRenderer();\n\tconst offset = useMotionValue(0);\n\tconst { length, gap } = useConstant(() => ({\n\t\tlength: strokeEffectTotalLength * strokeEffectLength,\n\t\tgap: strokeEffectTotalLength * strokeEffectGap\n\t}));\n\tuseEffect(() => {\n\t\tif (isCanvas) return;\n\t\tconst signal = new AbortController();\n\t\tasync function loop() {\n\t\t\tlet index = 0;\n\t\t\twhile (true) {\n\t\t\t\tif (signal.signal.aborted) break;\n\t\t\t\tconst mirror = strokeEffectLoop && strokeEffectLoopType === \"mirror\";\n\t\t\t\tconst from = valueWithMirroring(index, mirror);\n\t\t\t\tconst to = valueWithMirroring(index + 1, mirror);\n\t\t\t\tawait Promise.all([animate$1(offset, [from, to], pathLengthTransition), singleFrame()]);\n\t\t\t\tif (!strokeEffectLoop) break;\n\t\t\t\tif (strokeEffectLoop && strokeEffectLoopType === \"repeat\") continue;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tloop();\n\t\treturn () => {\n\t\t\tsignal.abort();\n\t\t};\n\t}, []);\n\tconst value = useTransform(offset, (v) => {\n\t\treturn strokeEffectOffset * strokeEffectTotalLength + (strokeEffectTotalLength - Math.max(v, .001) * strokeEffectTotalLength);\n\t});\n\tconst effect = !isCanvas ? {\n\t\tstrokeDasharray: `${length} ${gap}`,\n\t\tstrokeDashoffset: value\n\t} : void 0;\n\treturn /* @__PURE__ */ jsx(Component, {\n\t\t...restProps,\n\t\t...effect,\n\t\tref: forwardedRef\n\t});\n});\n\n//#endregion\n//#region ../../library/src/render/utils/tickerUtils.ts\n/**\n* Turns the react children prop into an array of react nodes to be consumed by the Ticker.\n* We flatten children of fragments to ensure the ticker can wrap the individual children even if they\n* were supplied like <><Child1 /> <Child2 /></><Child3 /> (this happens for cms items in the canvas).\n*/\nfunction flattenChildrenToTickerItems(children) {\n\tconst result = [];\n\tChildren.forEach(children, (child) => {\n\t\tif (isValidElement(child) && child.type === Fragment) result.push(...flattenChildrenToTickerItems(child.props.children));\n\t\telse if (child) result.push(child);\n\t});\n\treturn result;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/motionplus/Ticker.tsx\nfunction findCurrentIndexFromInset$1(currentInset, itemPositions, wrapInset) {\n\tconst iteration = Math.floor(currentInset / wrapInset);\n\tconst transform = iteration * wrapInset;\n\tlet itemIndex = 0;\n\tfor (let i = 0; i < itemPositions.length; i++) {\n\t\tconst { end } = itemPositions[i];\n\t\titemIndex = i;\n\t\tif (end + transform > currentInset) break;\n\t}\n\treturn itemIndex + iteration * itemPositions.length;\n}\nfunction findNextItemInset$1(currentInset, itemPositions, gap, targetInset) {\n\tif (itemPositions.length === 0) return 0;\n\tconst wrapInset = itemPositions[itemPositions.length - 1].end + gap;\n\tconst idealInset = targetInset ?? currentInset + (itemPositions[0]?.end ?? 0);\n\tlet index = findCurrentIndexFromInset$1(currentInset, itemPositions, wrapInset) + 1;\n\tlet nextItemInset = 0;\n\tlet hasFoundNextInset = false;\n\twhile (!hasFoundNextInset) {\n\t\tconst { start, end } = itemPositions[wrap(0, itemPositions.length, index)];\n\t\tconst transformInset = Math.floor(index / itemPositions.length) * wrapInset;\n\t\tnextItemInset = start + transformInset;\n\t\tif (end + transformInset > idealInset) hasFoundNextInset = true;\n\t\telse index++;\n\t}\n\treturn nextItemInset;\n}\nfunction findPrevItemInset$1(currentInset, itemPositions, gap, targetInset, containerLength) {\n\tif (itemPositions.length === 0) return 0;\n\tconst wrapInset = itemPositions[itemPositions.length - 1].end + gap;\n\tconst idealInset = targetInset ?? currentInset - (containerLength ?? 0);\n\tlet index = findCurrentIndexFromInset$1(currentInset, itemPositions, wrapInset);\n\tlet prevItemInset = currentInset;\n\tlet hasFoundPrevInset = false;\n\twhile (!hasFoundPrevInset) {\n\t\tconst { start, end } = itemPositions[wrap(0, itemPositions.length, index)];\n\t\tconst itemSize = end - start;\n\t\tconst transformedStart = start + Math.floor(index / itemPositions.length) * wrapInset;\n\t\tif (idealInset <= transformedStart + gap || transformedStart >= currentInset) {\n\t\t\tprevItemInset = transformedStart;\n\t\t\tindex--;\n\t\t} else if (idealInset <= transformedStart) {\n\t\t\tprevItemInset = transformedStart;\n\t\t\thasFoundPrevInset = true;\n\t\t} else {\n\t\t\tif (containerLength && itemSize > containerLength || prevItemInset === currentInset && idealInset >= transformedStart) prevItemInset = transformedStart;\n\t\t\thasFoundPrevInset = true;\n\t\t}\n\t}\n\treturn prevItemInset;\n}\nconst TickerContext$1 = /* @__PURE__ */ (() => {\n\tconst Context = createContext(null);\n\tContext.displayName = \"TickerContext\";\n\treturn Context;\n})();\nfunction useTicker() {\n\tconst context = useContext(TickerContext$1);\n\tinvariant$2(context, \"useTicker must be used within a Ticker component\");\n\treturn context;\n}\nconst TickerItemContext = /* @__PURE__ */ (() => {\n\tconst Context = createContext(void 0);\n\tContext.displayName = \"TickerItemContext\";\n\treturn Context;\n})();\nfunction useTickerItem() {\n\tconst itemContext = useContext(TickerItemContext);\n\tinvariant$2(itemContext, \"useTickerItem must be used within a TickerItem\");\n\treturn itemContext;\n}\nconst ltrStrategy = (insetProp, lengthProp, viewportLengthProp, paddingStartProp, direction) => {\n\treturn {\n\t\tsign: 1,\n\t\tdirection,\n\t\tlengthProp,\n\t\tviewportLengthProp,\n\t\tpaddingStartProp,\n\t\tmeasureItem: (item) => {\n\t\t\treturn {\n\t\t\t\tstart: item[insetProp],\n\t\t\t\tend: item[insetProp] + item[lengthProp]\n\t\t\t};\n\t\t},\n\t\tgetCumulativeInset: (element) => {\n\t\t\tlet offset = 0;\n\t\t\tlet el = element;\n\t\t\twhile (el) {\n\t\t\t\toffset += el[insetProp];\n\t\t\t\tel = el.offsetParent;\n\t\t\t}\n\t\t\treturn offset;\n\t\t}\n\t};\n};\nconst xStrategy = /* @__PURE__ */ (() => ltrStrategy(\"offsetLeft\", \"offsetWidth\", \"innerWidth\", \"paddingLeft\", \"right\"))();\nconst yStrategy = /* @__PURE__ */ (() => ltrStrategy(\"offsetTop\", \"offsetHeight\", \"innerHeight\", \"paddingTop\", \"bottom\"))();\nfunction offsetRight(element, container) {\n\treturn (container?.offsetWidth ?? window.innerWidth) - (element.offsetLeft + element.offsetWidth);\n}\nconst xRtlStrategy = /* @__PURE__ */ (() => ({\n\t...xStrategy,\n\tsign: -1,\n\tdirection: \"left\",\n\tpaddingStartProp: \"paddingRight\",\n\tmeasureItem: (item, container) => {\n\t\tconst length = item.offsetWidth;\n\t\tconst start = offsetRight(item, container);\n\t\treturn {\n\t\t\tstart,\n\t\t\tend: start + length\n\t\t};\n\t},\n\tgetCumulativeInset: (element) => {\n\t\tlet offset = 0;\n\t\tlet el = element;\n\t\twhile (el) {\n\t\t\toffset += offsetRight(el, el.offsetParent);\n\t\t\tel = el.offsetParent;\n\t\t}\n\t\treturn offset;\n\t}\n}))();\nfunction getLayoutStrategy(axis, direction) {\n\treturn axis === \"y\" ? yStrategy : direction === \"ltr\" ? xStrategy : xRtlStrategy;\n}\n/**\n* Represents an individual item within the Ticker.\n*\n* This component handles the logic for repositioning items to create the infinite scroll effect.\n*\n* @param offset - The current scroll offset of the ticker.\n* @param axis - The scroll axis (\"x\" or \"y\").\n* @param listSize - The total size of the list including all clones.\n* @param itemIndex - The original index of the item.\n* @param cloneIndex - The index of the clone, if this is a cloned item.\n* @param props - HTML attributes to pass to the list item li element.\n* @returns A ListItem React component.\n*/\nfunction TickerItemWrapper({ children, offset, axis, listSize = 0, numItems, itemIndex, positionInSet, cloneIndex, bounds, alignItems, reproject = true, size = \"auto\", safeMargin }) {\n\tconst { start, end } = bounds;\n\tconst { visibleLength, direction, inset } = useTicker();\n\tconst { sign } = getLayoutStrategy(axis, direction);\n\tconst projection = useTransform(() => {\n\t\tif (!reproject) return 0;\n\t\tconst currentOffset = offset.get();\n\t\tif (!start && !end || !listSize) return 0;\n\t\tif (currentOffset * sign + bounds.end <= -inset - safeMargin) return listSize * sign;\n\t\t/**\n\t\t* If we've defined a safeMargin, also project items backwards if they\n\t\t* fall outside the right boundary (+ margin). This fills-in the start area\n\t\t* without affecting the alignment of items.\n\t\t*/\n\t\tif (safeMargin > 0) {\n\t\t\tconst rightBoundary = visibleLength - safeMargin - inset;\n\t\t\tif (currentOffset * sign + bounds.start >= rightBoundary) return -listSize * sign;\n\t\t}\n\t\treturn 0;\n\t});\n\tconst itemOffset = useTransform(() => {\n\t\tconst currentOffset = offset.get();\n\t\tconst currentTransform = projection.get();\n\t\tif (!start && !end || !listSize) return 0;\n\t\treturn currentOffset * sign + start + currentTransform * sign;\n\t});\n\tconst ariaProps = cloneIndex === void 0 ? {\n\t\t[\"aria-hidden\"]: false,\n\t\t[\"aria-posinset\"]: positionInSet ?? itemIndex + 1,\n\t\t[\"aria-setsize\"]: numItems,\n\t\t[\"data-item-index\"]: itemIndex\n\t} : { [\"aria-hidden\"]: true };\n\tconst isFill = size === \"fill\";\n\tconst offAxisSize = alignItems === \"stretch\" ? \"100%\" : \"fit-content\";\n\tconst props = {\n\t\tclassName: cloneIndex === void 0 ? \"ticker-item\" : \"clone-item\",\n\t\tstyle: {\n\t\t\tflexGrow: 0,\n\t\t\tflexShrink: 0,\n\t\t\tposition: \"relative\",\n\t\t\tflexBasis: size === \"fill\" ? \"100%\" : void 0,\n\t\t\tdisplay: isFill ? \"grid\" : void 0,\n\t\t\tgridTemplateColumns: isFill ? \"1fr\" : void 0,\n\t\t\tgridTemplateRows: isFill ? \"1fr\" : void 0,\n\t\t\tminWidth: isFill ? 0 : void 0,\n\t\t\tminHeight: isFill ? 0 : void 0,\n\t\t\theight: axis === \"x\" ? offAxisSize : void 0,\n\t\t\twidth: axis === \"y\" ? offAxisSize : void 0,\n\t\t\tx: axis === \"x\" ? projection : 0,\n\t\t\ty: axis === \"y\" ? projection : 0\n\t\t},\n\t\t...ariaProps\n\t};\n\treturn /* @__PURE__ */ jsx(TickerItemContext.Provider, {\n\t\tvalue: {\n\t\t\tstart,\n\t\t\tend,\n\t\t\toffset: itemOffset,\n\t\t\tprojection,\n\t\t\titemIndex,\n\t\t\tcloneIndex,\n\t\t\tprops\n\t\t},\n\t\tchildren: size === \"manual\" ? children : /* @__PURE__ */ jsx(DefaultTickerItem, { children })\n\t});\n}\nfunction DefaultTickerItem({ children }) {\n\tconst { props } = useTickerItem();\n\treturn /* @__PURE__ */ jsx(motion.li, {\n\t\t...props,\n\t\tchildren\n\t});\n}\nfunction useFocusNavigation(containerRef, axis, focusOffset, offset, setHasFocus) {\n\tconst isFocusTrapped = useRef(false);\n\tuseEffect(() => {\n\t\tconst container = containerRef.current;\n\t\tif (!container) return;\n\t\tlet detectionEnabled = false;\n\t\tconst abortController = new AbortController();\n\t\tconst eventOptions = { signal: abortController.signal };\n\t\tconst eventOptionsWithCapture = {\n\t\t\t...eventOptions,\n\t\t\tcapture: true\n\t\t};\n\t\tconst scrollProp = axis === \"x\" ? \"scrollLeft\" : \"scrollTop\";\n\t\tconst offsetProp = axis === \"x\" ? \"offsetLeft\" : \"offsetTop\";\n\t\tconst leftKey = axis === \"x\" ? \"ArrowLeft\" : \"ArrowUp\";\n\t\tconst rightKey = axis === \"x\" ? \"ArrowRight\" : \"ArrowDown\";\n\t\tlet focusableElements = [];\n\t\tlet focusIndex = 0;\n\t\tconst applyFocusOffset = () => {\n\t\t\tconst nextFocusableElement = focusableElements[focusIndex];\n\t\t\tif (!nextFocusableElement) return;\n\t\t\tnextFocusableElement.focus({ preventScroll: true });\n\t\t\tfocusOffset.set(-nextFocusableElement[offsetProp]);\n\t\t\tcontainer[scrollProp] = 0;\n\t\t\tframe.render(() => {\n\t\t\t\tcontainer[scrollProp] = 0;\n\t\t\t});\n\t\t};\n\t\tconst handleFocusNavigation = (event) => {\n\t\t\tif (event.key === \"Tab\") {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tendFocusTrap();\n\t\t\t\tconst allFocusableElements = Array.from(document.querySelectorAll(\"a, button, input, textarea, select, [tabindex]:not([tabindex=\\\"-1\\\"]), [contenteditable=\\\"true\\\"]\")).filter(isHTMLElement$1);\n\t\t\t\tallFocusableElements.sort(compareTabIndexes);\n\t\t\t\tconst lastFocusableElement = allFocusableElements[event.shiftKey ? 0 : allFocusableElements.length - 1];\n\t\t\t\tconst initialIndex = event.shiftKey ? allFocusableElements.length - 1 : 0;\n\t\t\t\t/**\n\t\t\t\t* If the last focusable element in the DOM is inside the container\n\t\t\t\t* then we want to set focus on the first DOM element\n\t\t\t\t*/\n\t\t\t\tif (container.contains(lastFocusableElement)) {\n\t\t\t\t\tallFocusableElements[initialIndex].focus();\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tconst indexOfCurrentElement = allFocusableElements.indexOf(focusableElements[focusIndex]);\n\t\t\t\t\tconst delta = event.shiftKey ? -1 : 1;\n\t\t\t\t\tfor (let i = indexOfCurrentElement; i < allFocusableElements.length && i >= 0; i += delta) {\n\t\t\t\t\t\tconst element = allFocusableElements[i];\n\t\t\t\t\t\tif (!container.contains(element)) {\n\t\t\t\t\t\t\telement.focus();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t} else if (event.key === leftKey) focusIndex--;\n\t\t\telse if (event.key === rightKey) focusIndex++;\n\t\t\tfocusIndex = wrap(0, focusableElements.length, focusIndex);\n\t\t\tapplyFocusOffset();\n\t\t};\n\t\tconst startFocusTrap = () => {\n\t\t\tif (isFocusTrapped.current) return;\n\t\t\tfocusableElements = Array.from(container.querySelectorAll(\".ticker-item a, .ticker-item button, .ticker-item input, .ticker-item textarea, .ticker-item select, .ticker-item [tabindex]:not([tabindex=\\\"-1\\\"]), .ticker-item [contenteditable=\\\"true\\\"]\")).filter(isHTMLElement$1);\n\t\t\tfocusIndex = 0;\n\t\t\tif (!focusableElements.length) return;\n\t\t\tsetHasFocus(true);\n\t\t\tisFocusTrapped.current = true;\n\t\t\tapplyFocusOffset();\n\t\t\twindow.addEventListener(\"focus\", detectTrapEnd, eventOptionsWithCapture);\n\t\t\twindow.addEventListener(\"blur\", detectTrapEnd, eventOptionsWithCapture);\n\t\t\tcontainer.addEventListener(\"keydown\", handleFocusNavigation, eventOptions);\n\t\t};\n\t\tconst detectTrapEnd = (event) => {\n\t\t\tif (!event.target || !(event.target instanceof HTMLElement) || !container.contains(event.target)) endFocusTrap();\n\t\t};\n\t\tconst endFocusTrap = () => {\n\t\t\tif (!isFocusTrapped.current) return;\n\t\t\tisFocusTrapped.current = false;\n\t\t\tsetHasFocus(false);\n\t\t\toffset.set(focusOffset.get());\n\t\t\twindow.removeEventListener(\"focus\", detectTrapEnd);\n\t\t\twindow.removeEventListener(\"blur\", detectTrapEnd);\n\t\t\tcontainer.removeEventListener(\"keydown\", handleFocusNavigation);\n\t\t};\n\t\tconst handleFocus = (event) => {\n\t\t\tconst { target } = event;\n\t\t\tif (!isHTMLElement$1(target)) return;\n\t\t\tif (!isFocusTrapped.current) startFocusTrap();\n\t\t};\n\t\tconst detectFocusTrapEnable = () => {\n\t\t\tif (detectionEnabled) return;\n\t\t\tdetectionEnabled = true;\n\t\t\tcontainer.addEventListener(\"focus\", handleFocus, eventOptionsWithCapture);\n\t\t\twindow.addEventListener(\"pointermove\", handlePointerMove, eventOptions);\n\t\t};\n\t\tconst handlePointerMove = () => {\n\t\t\tif (!detectionEnabled) return;\n\t\t\tdetectionEnabled = false;\n\t\t\tcontainer.removeEventListener(\"focus\", handleFocus, true);\n\t\t\twindow.removeEventListener(\"pointermove\", handlePointerMove, eventOptions);\n\t\t};\n\t\tconst handleAriaHiddenClicks = (event) => {\n\t\t\tconst ariaHiddenAncestor = event.target.closest(\"[aria-hidden=\\\"true\\\"]\");\n\t\t\tif (ariaHiddenAncestor) ariaHiddenAncestor.removeAttribute(\"aria-hidden\");\n\t\t};\n\t\tconst resetScroll = () => {\n\t\t\tcontainer.scrollLeft = 0;\n\t\t\tcontainer.scrollTop = 0;\n\t\t};\n\t\twindow.addEventListener(\"keydown\", detectFocusTrapEnable, eventOptions);\n\t\tcontainer.addEventListener(\"pointerdown\", handleAriaHiddenClicks, eventOptions);\n\t\tcontainer.addEventListener(\"scroll\", resetScroll, eventOptions);\n\t\treturn () => {\n\t\t\tabortController.abort();\n\t\t\tendFocusTrap();\n\t\t};\n\t}, []);\n}\nfunction compareTabIndexes(a, b) {\n\tif (a.tabIndex >= 1 && b.tabIndex >= 1) return a.tabIndex - b.tabIndex;\n\tif (a.tabIndex >= 1 && b.tabIndex <= 0) return -1;\n\tif (b.tabIndex >= 1 && a.tabIndex <= 0) return 1;\n\treturn 0;\n}\nfunction isHTMLElement$1(element) {\n\treturn element instanceof HTMLElement;\n}\nfunction calcItemLength(itemPosition) {\n\treturn itemPosition.end - itemPosition.start;\n}\nfunction calcTotalItemLength(itemPositions) {\n\treturn itemPositions[itemPositions.length - 1].end - itemPositions[0].start;\n}\nfunction calcNumClones(visibleLength, itemPositions, gap) {\n\tconst totalItemLength = calcTotalItemLength(itemPositions);\n\tconst maxItemLength = Math.max(...itemPositions.map(calcItemLength));\n\tlet count = 0;\n\t/**\n\t* A length where the largest item is out of the visible area.\n\t*/\n\tlet safeFillLength = 0;\n\twhile (safeFillLength < visibleLength) {\n\t\tsafeFillLength = (totalItemLength + gap) * (count + 1) - maxItemLength;\n\t\tcount++;\n\t}\n\treturn Math.max(count - 1, 0);\n}\nconst alignAlias = {\n\tstart: \"flex-start\",\n\tend: \"flex-end\"\n};\n/**\n* A performant, accessible, and infinitely scrolling ticker component.\n*/\nfunction TickerComponent({ items, velocity = 50, hoverFactor = 1, gap = 10, axis = \"x\", align = \"center\", offset, isStatic = false, itemSize = \"auto\", overflow = false, loop = true, children, as = \"div\", snap, safeMargin = 0, fade = 0, fadeTransition, pageTransition, ...props }, ref) {\n\tconst internalContainerRef = useRef(null);\n\tconst containerRef = useComposedRefs(ref, internalContainerRef);\n\tconst listRef = useRef(null);\n\tconst [state, setState] = useState({\n\t\tdirection: \"ltr\",\n\t\tvisibleLength: 0,\n\t\tinset: 0,\n\t\ttotalItemLength: 0,\n\t\tcontainerLength: 0,\n\t\titemPositions: [],\n\t\titemBounds: [],\n\t\titemSetPositions: [],\n\t\tisMeasured: false,\n\t\tmaxInset: null\n\t});\n\tconst alignItems = alignAlias[align] || align;\n\tconst { sign } = getLayoutStrategy(axis, state.direction);\n\tif (isStatic) {\n\t\tconst renderedOffset = useMotionValue(0);\n\t\tconst tickerContext = useMemo(() => ({\n\t\t\t...state,\n\t\t\tgap,\n\t\t\tclampOffset: noop,\n\t\t\toffset: renderedOffset,\n\t\t\trenderedOffset\n\t\t}), [\n\t\t\tstate,\n\t\t\tgap,\n\t\t\trenderedOffset\n\t\t]);\n\t\treturn /* @__PURE__ */ jsx(TickerContext$1.Provider, {\n\t\t\tvalue: tickerContext,\n\t\t\tchildren: /* @__PURE__ */ jsx(ListView, {\n\t\t\t\tcontainerProps: props,\n\t\t\t\tcontainerRef,\n\t\t\t\tgap,\n\t\t\t\taxis,\n\t\t\t\talignItems,\n\t\t\t\toffset: renderedOffset,\n\t\t\t\trenderedOffset,\n\t\t\t\titems,\n\t\t\t\titemSize,\n\t\t\t\tstate,\n\t\t\t\toverflow,\n\t\t\t\tsafeMargin,\n\t\t\t\tisStatic: true,\n\t\t\t\tas,\n\t\t\t\tfade,\n\t\t\t\tsign,\n\t\t\t\tchildren\n\t\t\t})\n\t\t});\n\t}\n\tconst [hasFocus, setHasFocus] = useState(false);\n\tconst velocityFactor = useMotionValue(1);\n\tconst defaultOffset = useMotionValue(0);\n\toffset ??= defaultOffset;\n\tconst wrappedOffset = useTransform(() => {\n\t\tif (state.direction === \"rtl\" && axis === \"x\") return wrap(state.totalItemLength + gap + state.inset, state.inset, offset.get());\n\t\treturn wrap(-state.totalItemLength - gap - state.inset, -state.inset, offset.get());\n\t});\n\tconst focusOffset = useMotionValue(0);\n\tconst renderedOffset = hasFocus ? focusOffset : loop ? wrappedOffset : offset;\n\tconst isInViewport = useInView(internalContainerRef, { margin: \"100px\" });\n\tconst isPageInView = usePageInView();\n\tconst isInView = isInViewport && isPageInView;\n\tconst isReducedMotion = useReducedMotion();\n\tconst updateMeasurements = () => {\n\t\tif (!internalContainerRef.current || !listRef.current) return;\n\t\tconst direction = window.getComputedStyle(internalContainerRef.current).direction;\n\t\tconst { measureItem, lengthProp, viewportLengthProp, getCumulativeInset } = getLayoutStrategy(axis, direction);\n\t\tconst paddingStartProp = axis === \"x\" ? \"paddingLeft\" : \"paddingTop\";\n\t\tconst paddingEndProp = axis === \"x\" ? \"paddingRight\" : \"paddingBottom\";\n\t\tconst container = internalContainerRef.current;\n\t\tconst allItems = listRef.current.querySelectorAll(\".ticker-item\");\n\t\tif (!allItems.length) return;\n\t\tlet hasItemSizeChanged = false;\n\t\tconst itemPositions = [];\n\t\tconst itemBounds = [];\n\t\tconst itemSetPositions = [];\n\t\tfor (let i = 0; i < allItems.length; i++) {\n\t\t\tconst item = allItems[i];\n\t\t\tconst itemIndex = Number(item.dataset.itemIndex);\n\t\t\tconst size = measureItem(item, container);\n\t\t\titemPositions.push(size);\n\t\t\titemBounds[itemIndex] = size;\n\t\t\titemSetPositions[itemIndex] = itemPositions.length;\n\t\t\tconst prevSize = state.itemBounds[itemIndex];\n\t\t\tif (!prevSize || size.start !== prevSize.start || size.end !== prevSize.end) hasItemSizeChanged = true;\n\t\t}\n\t\t/**\n\t\t* Cap to viewport size to prevent infinite or wasteful cloning in the event that the\n\t\t* container width is reactive to the number of children rendered within it.\n\t\t*/\n\t\tconst containerLength = Math.min(container[lengthProp], window[viewportLengthProp]);\n\t\tlet visibleLength = overflow ? window[viewportLengthProp] : containerLength;\n\t\tif (safeMargin > 0) visibleLength += safeMargin * 2;\n\t\tconst totalItemLength = calcTotalItemLength(itemPositions);\n\t\tconst computedContainerStyle = window.getComputedStyle(container);\n\t\tconst containerPaddingStart = parseInt(computedContainerStyle[paddingStartProp] ?? 0);\n\t\tconst containerPaddingEnd = parseInt(computedContainerStyle[paddingEndProp] ?? 0);\n\t\tconst inset = overflow ? getCumulativeInset(allItems[0]) : containerPaddingStart;\n\t\tconst maxInset = loop === false ? Math.max(0, totalItemLength - containerLength + containerPaddingStart + containerPaddingEnd) : null;\n\t\tif (visibleLength !== state.visibleLength || totalItemLength !== state.totalItemLength || inset !== state.inset || state.itemPositions.length !== itemPositions.length || hasItemSizeChanged) setState({\n\t\t\tdirection,\n\t\t\tvisibleLength,\n\t\t\titemPositions,\n\t\t\titemBounds,\n\t\t\titemSetPositions,\n\t\t\ttotalItemLength,\n\t\t\tinset,\n\t\t\tcontainerLength,\n\t\t\tmaxInset,\n\t\t\tisMeasured: true\n\t\t});\n\t};\n\tuseIsomorphicLayoutEffect(() => {\n\t\tif (!isInView || !internalContainerRef.current) return;\n\t\tupdateMeasurements();\n\t\tconst trackViewport = overflow ? resize(updateMeasurements) : void 0;\n\t\tconst trackContainer = resize(internalContainerRef.current, updateMeasurements);\n\t\treturn () => {\n\t\t\ttrackViewport?.();\n\t\t\ttrackContainer();\n\t\t};\n\t}, [\n\t\titems,\n\t\tisInView,\n\t\toverflow\n\t]);\n\tconst isMeasured = state.totalItemLength > 0;\n\tuseAnimationFrame(isMeasured && isInView && offset === defaultOffset && !isReducedMotion ? (_time, delta) => {\n\t\tconst frameOffset = delta / 1e3 * (velocity * sign * velocityFactor.get());\n\t\toffset.set(offset.get() - frameOffset);\n\t} : noop);\n\tconst cloneCount = useMemo(() => {\n\t\tif (!isMeasured || !state.visibleLength) return 0;\n\t\treturn calcNumClones(state.visibleLength, state.itemPositions, gap);\n\t}, [\n\t\tisMeasured,\n\t\tstate,\n\t\tgap\n\t]);\n\tconst totalListSize = state.totalItemLength === 0 ? 0 : (state.totalItemLength + gap) * (cloneCount + 1);\n\tconst clonedItemGroups = [];\n\tif (loop) for (let i = 0; i < cloneCount; i++) {\n\t\tconst clonedItems = [];\n\t\titems.forEach((item, itemIndex) => {\n\t\t\tconst originalBounds = state.itemBounds[itemIndex];\n\t\t\tconst cloneOffset = (state.totalItemLength + gap) * (i + 1);\n\t\t\tconst cloneBounds = originalBounds ? {\n\t\t\t\tstart: originalBounds.start + cloneOffset,\n\t\t\t\tend: originalBounds.end + cloneOffset\n\t\t\t} : defaultBounds;\n\t\t\tclonedItems.push(/* @__PURE__ */ jsx(TickerItemWrapper, {\n\t\t\t\toffset: renderedOffset,\n\t\t\t\taxis,\n\t\t\t\tlistSize: totalListSize,\n\t\t\t\titemIndex,\n\t\t\t\tcloneIndex: itemIndex,\n\t\t\t\tbounds: cloneBounds,\n\t\t\t\talignItems,\n\t\t\t\tsize: itemSize,\n\t\t\t\tsafeMargin,\n\t\t\t\tnumItems: state.isMeasured ? state.itemPositions.length : items.length,\n\t\t\t\tchildren: item\n\t\t\t}, `clone-${i}-${itemIndex}`));\n\t\t});\n\t\tconst id = `ticker-group-${i}`;\n\t\tclonedItemGroups.push(/* @__PURE__ */ jsx(LayoutGroup, {\n\t\t\tid,\n\t\t\tchildren: clonedItems\n\t\t}, id));\n\t}\n\tuseFocusNavigation(internalContainerRef, axis, focusOffset, offset, setHasFocus);\n\tconst clampOffset = useCallback((value) => {\n\t\treturn state.maxInset !== null ? clamp(-state.maxInset, 0, value) : value;\n\t}, [state.maxInset]);\n\tconst tickerContext = useMemo(() => ({\n\t\t...state,\n\t\tgap,\n\t\tclampOffset,\n\t\toffset,\n\t\trenderedOffset\n\t}), [\n\t\tstate,\n\t\tgap,\n\t\tclampOffset,\n\t\toffset,\n\t\trenderedOffset\n\t]);\n\treturn /* @__PURE__ */ jsx(TickerContext$1.Provider, {\n\t\tvalue: tickerContext,\n\t\tchildren: /* @__PURE__ */ jsx(ListView, {\n\t\t\tcontainerProps: props,\n\t\t\tcontainerRef,\n\t\t\tlistRef,\n\t\t\tgap,\n\t\t\taxis,\n\t\t\talignItems,\n\t\t\tisMeasured,\n\t\t\tisInView,\n\t\t\toffset,\n\t\t\trenderedOffset,\n\t\t\titems,\n\t\t\titemSize,\n\t\t\tclonedItems: clonedItemGroups,\n\t\t\tclampOffset,\n\t\t\tsnap,\n\t\t\tsafeMargin,\n\t\t\tonPointerEnter: () => {\n\t\t\t\tanimate$1(velocityFactor, hoverFactor);\n\t\t\t},\n\t\t\tonPointerLeave: () => {\n\t\t\t\tanimate$1(velocityFactor, 1);\n\t\t\t},\n\t\t\ttotalListSize,\n\t\t\tstate,\n\t\t\toverflow,\n\t\t\tloop,\n\t\t\tas,\n\t\t\tfade,\n\t\t\tsign,\n\t\t\tfadeTransition,\n\t\t\tpageTransition,\n\t\t\tchildren\n\t\t})\n\t});\n}\nconst Ticker$1 = /* @__PURE__ */ forwardRef(TickerComponent);\nfunction ListView({ children, containerProps, containerRef, listRef, gap, axis, alignItems, isMeasured, isInView, isStatic, items, offset, clonedItems, clampOffset, renderedOffset, onPointerEnter, onPointerLeave, totalListSize, itemSize, overflow, state, safeMargin, snap, loop, as, fade, sign, fadeTransition = defaultFadeTransition, pageTransition }) {\n\tconst MotionComponent = useMemo(() => motion.create(as), [as]);\n\t/**\n\t* Derive drag constraints based on measurements.\n\t*/\n\tlet dragConstraints = {};\n\tconst { maxInset } = state;\n\tif (maxInset !== null) {\n\t\tif (axis === \"x\") dragConstraints = sign > 0 ? {\n\t\t\tleft: maxInset * -1,\n\t\t\tright: 0\n\t\t} : {\n\t\t\tright: maxInset,\n\t\t\tleft: 0\n\t\t};\n\t\telse dragConstraints = {\n\t\t\ttop: maxInset * -1,\n\t\t\tbottom: 0\n\t\t};\n\t}\n\tconst { drag, _dragX, _dragY, dragMomentum = false, onDragEnd: onDragEndProp, onPointerDown: onPointerDownProp, ...remainingProps } = containerProps;\n\tlet onDragEnd = onDragEndProp;\n\tlet onPointerDown = onPointerDownProp;\n\tconst dragMotionValue = axis === \"x\" ? _dragX : _dragY;\n\tconst dragMomentumAnimation = useRef(null);\n\t/**\n\t* TODO: This should probably be accomplished with dragMotionValue.jump()\n\t* in the onPointerDown handler but investigate why this isn't working.\n\t*/\n\tconst stopDragMomentumAnimation = () => {\n\t\tif (!dragMomentumAnimation.current) return;\n\t\tdragMomentumAnimation.current.stop();\n\t\tdragMomentumAnimation.current = null;\n\t};\n\tif (!onDragEnd && drag && dragMotionValue) {\n\t\tonPointerDown = () => {\n\t\t\tdragMotionValue.jump(offset.get());\n\t\t\tstopDragMomentumAnimation();\n\t\t};\n\t\tonDragEnd = (_e, { velocity }) => {\n\t\t\tconst current = offset.get();\n\t\t\tstopDragMomentumAnimation();\n\t\t\tframe.postRender(() => {\n\t\t\t\tlet target = current + velocity[axis] * (snap ? .3 : .8);\n\t\t\t\tif (snap) {\n\t\t\t\t\tif (velocity[axis] < 0) target = -findNextItemInset$1(-current, state.itemPositions, gap, -target);\n\t\t\t\t\telse if (velocity[axis] > 0) target = -findPrevItemInset$1(-current, state.itemPositions, gap, -target, state.containerLength);\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst closestNext = -findNextItemInset$1(-current, state.itemPositions, gap, -current);\n\t\t\t\t\t\tconst closestPrev = -findPrevItemInset$1(-current, state.itemPositions, gap, -current, state.containerLength);\n\t\t\t\t\t\ttarget = Math.abs(current - closestNext) < Math.abs(current - closestPrev) ? closestNext : closestPrev;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst constraints = loop ? {} : sign > 0 ? {\n\t\t\t\t\tmax: 0,\n\t\t\t\t\tmin: dragConstraints[axis === \"x\" ? \"left\" : \"top\"]\n\t\t\t\t} : {\n\t\t\t\t\tmin: 0,\n\t\t\t\t\tmax: dragConstraints.right\n\t\t\t\t};\n\t\t\t\tdragMomentumAnimation.current = animate$1(dragMotionValue, clampOffset(target * sign) * sign, snap ? pageTransition : {\n\t\t\t\t\ttype: \"inertia\",\n\t\t\t\t\tvelocity: velocity[axis],\n\t\t\t\t\tmodifyTarget: () => target,\n\t\t\t\t\tbounceDamping: 40,\n\t\t\t\t\tbounceStiffness: 400,\n\t\t\t\t\t...constraints\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t}\n\t/**\n\t* Create mask image to fade edges out\n\t*/\n\tconst fadeStartOpacity = useMotionValue(loop ? 0 : 1);\n\tconst fadeEndOpacity = useMotionValue(0);\n\tconst strategy = getLayoutStrategy(axis, state.direction);\n\tconst unit = typeof fade === \"number\" ? \"px\" : \"\";\n\tconst maskImage = useTransform(() => {\n\t\treturn `linear-gradient(to ${strategy.direction}, rgba(0,0,0,${fadeStartOpacity.get()}) 0px, black ${fade}${unit}, black calc(100% - ${fade}${unit}), rgba(0,0,0,${fadeEndOpacity.get()}) 100%)`;\n\t});\n\tconst fadeStyles = fade ? {\n\t\tmaskImage,\n\t\tWebkitMaskImage: maskImage\n\t} : {};\n\tconst isAtLimits = useRef({\n\t\tstart: true,\n\t\tend: false\n\t});\n\tuseMotionValueEvent(renderedOffset, \"change\", (value) => {\n\t\tif (maxInset === null) return;\n\t\tconst maxOffset = maxInset * -1;\n\t\tvalue *= sign;\n\t\tif (value < 0) {\n\t\t\tif (isAtLimits.current.start) {\n\t\t\t\tanimate$1(fadeStartOpacity, 0, fadeTransition);\n\t\t\t\tisAtLimits.current.start = false;\n\t\t\t}\n\t\t} else if (!isAtLimits.current.start) {\n\t\t\tanimate$1(fadeStartOpacity, 1, fadeTransition);\n\t\t\tisAtLimits.current.start = true;\n\t\t}\n\t\tif (value > maxOffset) {\n\t\t\tif (isAtLimits.current.end) {\n\t\t\t\tanimate$1(fadeEndOpacity, 0, fadeTransition);\n\t\t\t\tisAtLimits.current.end = false;\n\t\t\t}\n\t\t} else if (!isAtLimits.current.end) {\n\t\t\tanimate$1(fadeEndOpacity, 1, fadeTransition);\n\t\t\tisAtLimits.current.end = true;\n\t\t}\n\t});\n\treturn /* @__PURE__ */ jsxs(Fragment$1, { children: [\n\t\t/* @__PURE__ */ jsx(MotionComponent, {\n\t\t\t...remainingProps,\n\t\t\tref: containerRef,\n\t\t\tstyle: {\n\t\t\t\toverflowX: !overflow && axis === \"x\" ? \"clip\" : void 0,\n\t\t\t\toverflowY: !overflow && axis === \"y\" ? \"clip\" : void 0,\n\t\t\t\t...containerStyle,\n\t\t\t\t...containerProps.style,\n\t\t\t\t...fadeStyles\n\t\t\t},\n\t\t\tonPointerEnter,\n\t\t\tonPointerLeave,\n\t\t\tdrag,\n\t\t\t_dragX,\n\t\t\t_dragY,\n\t\t\tdragConstraints,\n\t\t\tdragMomentum,\n\t\t\tonPointerDown,\n\t\t\tonDragEnd,\n\t\t\tchildren: /* @__PURE__ */ jsxs(motion.ul, {\n\t\t\t\tref: listRef,\n\t\t\t\tstyle: {\n\t\t\t\t\t...listStyle,\n\t\t\t\t\tflexDirection: axis === \"x\" ? \"row\" : \"column\",\n\t\t\t\t\tgap: `${gap}px`,\n\t\t\t\t\tx: axis === \"x\" ? renderedOffset : 0,\n\t\t\t\t\ty: axis === \"y\" ? renderedOffset : 0,\n\t\t\t\t\topacity: isMeasured || isStatic ? 1 : 0,\n\t\t\t\t\talignItems,\n\t\t\t\t\twillChange: isMeasured && isInView ? \"transform\" : void 0,\n\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\theight: \"100%\",\n\t\t\t\t\tmaxHeight: \"100%\",\n\t\t\t\t\tmaxWidth: \"100%\"\n\t\t\t\t},\n\t\t\t\tchildren: [items.map((item, index) => /* @__PURE__ */ jsx(TickerItemWrapper, {\n\t\t\t\t\taxis,\n\t\t\t\t\toffset: renderedOffset,\n\t\t\t\t\tlistSize: totalListSize,\n\t\t\t\t\titemIndex: index,\n\t\t\t\t\tbounds: state.itemBounds[index] ?? defaultBounds,\n\t\t\t\t\talignItems,\n\t\t\t\t\tsize: itemSize,\n\t\t\t\t\treproject: loop,\n\t\t\t\t\tsafeMargin,\n\t\t\t\t\tpositionInSet: state.itemSetPositions[index],\n\t\t\t\t\tnumItems: state.isMeasured ? state.itemPositions.length : items.length,\n\t\t\t\t\tchildren: item\n\t\t\t\t}, \"original-\" + index)), clonedItems || null]\n\t\t\t})\n\t\t}),\n\t\t\" \",\n\t\tchildren\n\t] });\n}\nfunction invariant$2(condition, message) {\n\tif (!condition) throw new Error(message);\n}\nconst defaultBounds = {\n\tstart: 0,\n\tend: 0\n};\nconst containerStyle = {\n\tdisplay: \"flex\",\n\tposition: \"relative\"\n};\nconst listStyle = {\n\tdisplay: \"flex\",\n\tposition: \"relative\",\n\twillChange: \"transform\",\n\tlistStyleType: \"none\",\n\tpadding: 0,\n\tmargin: 0,\n\tjustifyContent: \"flex-start\"\n};\nconst defaultFadeTransition = {\n\tduration: .2,\n\tease: \"linear\"\n};\n\n//#endregion\n//#region ../../library/src/render/presentation/motionplus/wheel.ts\nfunction calcDirection(delta) {\n\treturn -Math.sign(delta);\n}\nfunction wheel(element, { axis = \"y\", onWheel, onSwipe, swipeThreshold = 100, swipeTimeout = 150, jitterThreshold = 2, lineHeight = 16 }) {\n\tlet state = \"IDLE\";\n\t/**\n\t* The accumulated delta value. Once this becomes greater than\n\t* swipeThreshold, a swipe is triggered. It gets reset to 0 either when\n\t* swipe is interrupted, or after a timeout from wheel events.\n\t*/\n\tlet accumulator = 0;\n\t/**\n\t* The direction of the swipe.\n\t* 1 = forward, -1 = backward, 0 = no swipe.\n\t*/\n\tlet swipeDirection = 0;\n\t/**\n\t* The last delta value. Used to detect momentum scrolls and decide\n\t* when a new wheel sessions has started via touchpad.\n\t*/\n\tlet lastDelta = 0;\n\t/**\n\t* True when the wheel delta is decelerating. If this is true, then further\n\t* wheel acceleration will be considered a new gesture and wheel events\n\t* will start firing.\n\t*/\n\tlet isDecelerating = false;\n\tlet accelerationCount = 0;\n\t/**\n\t* Whether the gesture has swiped in the wheel session. This caps the number\n\t* of swipes per session to 1.\n\t*/\n\tlet hasSwipedInSession = false;\n\t/**\n\t* The timeout ID for the session.\n\t*/\n\tlet sessionTimeoutId = null;\n\tconst wheelHandler = (event) => {\n\t\tconst primaryDelta = axis === \"x\" && !event.shiftKey ? event.deltaX : event.deltaY;\n\t\tconst perpendicularDelta = axis === \"x\" && !event.shiftKey ? event.deltaY : event.deltaX;\n\t\tif (Math.abs(primaryDelta) < Math.abs(perpendicularDelta)) return;\n\t\tif (onWheel || onSwipe) event.preventDefault();\n\t\tlet delta = -(event.deltaMode === WheelEvent.DOM_DELTA_LINE ? primaryDelta * lineHeight : primaryDelta);\n\t\tif (delta === 0) return;\n\t\tif (sessionTimeoutId) clearTimeout(sessionTimeoutId);\n\t\tsessionTimeoutId = setTimeout(() => {\n\t\t\tstate = \"IDLE\";\n\t\t\thasSwipedInSession = false;\n\t\t\taccumulator = 0;\n\t\t}, swipeTimeout);\n\t\tif (state === \"IDLE\") state = \"WHEELING\";\n\t\tconst newDirection = calcDirection(delta);\n\t\tfunction startSwipe(triggeringDelta, currentAccumulator) {\n\t\t\tstate = \"SWIPING\";\n\t\t\thasSwipedInSession = true;\n\t\t\tswipeDirection = calcDirection(currentAccumulator);\n\t\t\tisDecelerating = false;\n\t\t\taccelerationCount = 0;\n\t\t\tlastDelta = Math.abs(triggeringDelta);\n\t\t\tonSwipe?.(swipeDirection);\n\t\t\taccumulator = Math.abs(currentAccumulator) % swipeThreshold * swipeDirection;\n\t\t}\n\t\tswitch (state) {\n\t\t\tcase \"WHEELING\": {\n\t\t\t\tconst newAccumulator = accumulator + delta;\n\t\t\t\tif (onSwipe && !hasSwipedInSession && Math.abs(newAccumulator) >= swipeThreshold) startSwipe(delta, newAccumulator);\n\t\t\t\telse {\n\t\t\t\t\taccumulator = newAccumulator;\n\t\t\t\t\tonWheel?.(delta);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"SWIPING\": {\n\t\t\t\tconst deltaAbs = Math.abs(delta);\n\t\t\t\tconst isDirectionChange = newDirection !== swipeDirection;\n\t\t\t\tlet isMomentumChange = false;\n\t\t\t\tif (lastDelta > 0) {\n\t\t\t\t\tconst deltaDiff = deltaAbs - lastDelta;\n\t\t\t\t\tif (deltaDiff < 0) isDecelerating = true;\n\t\t\t\t\tif (isDecelerating && deltaDiff > jitterThreshold) {\n\t\t\t\t\t\taccelerationCount++;\n\t\t\t\t\t\tif (accelerationCount > 2) isMomentumChange = true;\n\t\t\t\t\t} else accelerationCount = 0;\n\t\t\t\t}\n\t\t\t\tif (isDirectionChange || isMomentumChange) {\n\t\t\t\t\thasSwipedInSession = false;\n\t\t\t\t\tconst newAccumulator = delta;\n\t\t\t\t\tif (onSwipe && !hasSwipedInSession && Math.abs(newAccumulator) >= swipeThreshold) startSwipe(delta, newAccumulator);\n\t\t\t\t\telse {\n\t\t\t\t\t\tstate = \"WHEELING\";\n\t\t\t\t\t\taccumulator = newAccumulator;\n\t\t\t\t\t\tonWheel?.(delta);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tlastDelta = deltaAbs;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t};\n\telement.addEventListener(\"wheel\", wheelHandler, { passive: false });\n\treturn () => {\n\t\tif (sessionTimeoutId) clearTimeout(sessionTimeoutId);\n\t\telement.removeEventListener(\"wheel\", wheelHandler);\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/motionplus/Carousel.tsx\nconst CarouselContext = /* @__PURE__ */ (() => {\n\tconst Context = createContext(null);\n\tContext.displayName = \"CarouselContext\";\n\treturn Context;\n})();\nfunction useCarousel() {\n\tconst context = useContext(CarouselContext);\n\tinvariant$1(Boolean(context), \"useCarousel must be used within a Carousel component\");\n\treturn context;\n}\nfunction findCurrentIndexFromInset(currentInset, itemPositions, wrapInset) {\n\tconst iteration = Math.floor(currentInset / wrapInset);\n\tconst transform = iteration * wrapInset;\n\tlet itemIndex = 0;\n\tfor (let i = 0; i < itemPositions.length; i++) {\n\t\tconst { end } = itemPositions[i];\n\t\titemIndex = i;\n\t\tif (end + transform > currentInset) break;\n\t}\n\treturn itemIndex + iteration * itemPositions.length;\n}\nfunction findPrevItemInset(currentInset, itemPositions, gap, targetInset, containerLength) {\n\tif (itemPositions.length === 0) return 0;\n\tconst wrapInset = itemPositions[itemPositions.length - 1].end + gap;\n\tconst idealInset = targetInset ?? currentInset - (containerLength ?? 0);\n\tlet index = findCurrentIndexFromInset(currentInset, itemPositions, wrapInset);\n\tlet prevItemInset = currentInset;\n\tlet hasFoundPrevInset = false;\n\twhile (!hasFoundPrevInset) {\n\t\tconst { start, end } = itemPositions[wrap(0, itemPositions.length, index)];\n\t\tconst itemSize = end - start;\n\t\tconst transformedStart = start + Math.floor(index / itemPositions.length) * wrapInset;\n\t\tif (idealInset <= transformedStart + gap || transformedStart >= currentInset) {\n\t\t\tprevItemInset = transformedStart;\n\t\t\tindex--;\n\t\t} else if (idealInset <= transformedStart) {\n\t\t\tprevItemInset = transformedStart;\n\t\t\thasFoundPrevInset = true;\n\t\t} else {\n\t\t\tif (containerLength && itemSize > containerLength || prevItemInset === currentInset && idealInset >= transformedStart) prevItemInset = transformedStart;\n\t\t\thasFoundPrevInset = true;\n\t\t}\n\t}\n\treturn prevItemInset;\n}\nfunction findPrevPageInset(currentInset, containerLength, itemPositions, gap) {\n\treturn findPrevItemInset(currentInset, itemPositions, gap, currentInset - containerLength, containerLength);\n}\nfunction findNextItemInset(currentInset, itemPositions, gap, targetInset) {\n\tif (itemPositions.length === 0) return 0;\n\tconst wrapInset = itemPositions[itemPositions.length - 1].end + gap;\n\tconst idealInset = targetInset ?? currentInset + (itemPositions[0]?.end ?? 0);\n\tlet index = findCurrentIndexFromInset(currentInset, itemPositions, wrapInset) + 1;\n\tlet nextItemInset = 0;\n\tlet hasFoundNextInset = false;\n\twhile (!hasFoundNextInset) {\n\t\tconst { start, end } = itemPositions[wrap(0, itemPositions.length, index)];\n\t\tconst transformInset = Math.floor(index / itemPositions.length) * wrapInset;\n\t\tnextItemInset = start + transformInset;\n\t\tif (end + transformInset > idealInset) hasFoundNextInset = true;\n\t\telse index++;\n\t}\n\treturn nextItemInset;\n}\nfunction findNextPageInset(currentInset, containerLength, itemPositions, gap) {\n\treturn findNextItemInset(currentInset, itemPositions, gap, currentInset + containerLength);\n}\nfunction calcPageInsets(itemPositions, containerLength, maxInset, allowRescale = true) {\n\tconst pageInsetData = {\n\t\tinsets: [],\n\t\tvisibleLength: containerLength\n\t};\n\tif (itemPositions.length === 0) return pageInsetData;\n\tconst insets = [itemPositions[0].start];\n\t/**\n\t* Loop through items and decide whether they've passed the\n\t* threshold of a new page.\n\t*/\n\tfor (let i = 1; i < itemPositions.length; i++) {\n\t\tconst { start, end } = itemPositions[i];\n\t\t/**\n\t\t* If the end of this item is greater than the last\n\t\t* page inset plus the container length, we need to\n\t\t* add a new page inset.\n\t\t*/\n\t\tif (insets[insets.length - 1] + containerLength < end) {\n\t\t\t/**\n\t\t\t* If we have a maxInset, it means looping is disabled and\n\t\t\t* therefore we need bail if the we're beyond the maxInset\n\t\t\t* (as this will align the final item with the end of the container)\n\t\t\t*/\n\t\t\tif (maxInset !== null) {\n\t\t\t\tif (start <= maxInset) insets.push(start);\n\t\t\t\telse {\n\t\t\t\t\tinsets.push(maxInset);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else insets.push(start);\n\t\t}\n\t}\n\t/**\n\t* If we're not looping, we want to check the size of the final page vs\n\t* the average page size. If the final page is less than half the average,\n\t* we attempt to redistribute by using a shorter container length.\n\t*/\n\tif (allowRescale && maxInset !== null && insets.length > 1) {\n\t\tconst originalLastInset = insets[insets.length - 1];\n\t\tconst pageSizes = [];\n\t\tfor (let i = 0; i < insets.length - 1; i++) pageSizes.push(insets[i + 1] - insets[i]);\n\t\tconst averagePageSize = pageSizes.reduce((sum, size) => sum + size, 0) / pageSizes.length;\n\t\tif (maxInset - originalLastInset < averagePageSize * .5) {\n\t\t\tconst scaledPagination = calcPageInsets(itemPositions, containerLength * .75, maxInset, false);\n\t\t\tif (scaledPagination.insets.length === insets.length) return scaledPagination;\n\t\t}\n\t}\n\treturn {\n\t\tinsets,\n\t\tvisibleLength: containerLength\n\t};\n}\nfunction calcCurrentPage(targetOffset, pageInsets, wrapInset, maxInset) {\n\tconst targetInset = -targetOffset;\n\tconst iteration = maxInset === null ? Math.floor(targetInset / wrapInset) : 0;\n\tconst transformInset = iteration * wrapInset;\n\tfor (let i = pageInsets.length - 1; i >= 0; i--) {\n\t\tconst inset = pageInsets[i] + transformInset;\n\t\tconst prevIndex = wrap(0, pageInsets.length, i - 1);\n\t\tconst prevTransformInset = (i === 0 ? iteration - 1 : iteration) * wrapInset;\n\t\tconst prevInset = pageInsets[prevIndex] + prevTransformInset;\n\t\tconst halfDistanceToPrev = (inset - prevInset) / 2;\n\t\tconst nextIndex = wrap(0, pageInsets.length, i + 1);\n\t\tconst nextTransformInset = (i === pageInsets.length - 1 ? iteration + 1 : iteration) * wrapInset;\n\t\tconst nextInset = pageInsets[nextIndex] + nextTransformInset;\n\t\tif (targetInset < nextInset - (nextInset - inset) / 2 && targetInset >= prevInset + halfDistanceToPrev) return i;\n\t}\n\treturn 0;\n}\nfunction CarouselView({ children, offset, targetOffset, tugOffset, loop = true, transition, tickerRef, axis = \"x\", snap = \"page\", page, wheelSwipeThreshold }) {\n\t/**\n\t* When this boolean is true, the rendered offset will be \"attached\" to\n\t* the target offset, allowing for direct manipulation. When it's false,\n\t* we're animating the offset to the target offset. This allows things\n\t* like pagination and pagination progress to be optionally coupled to\n\t* the target offset.\n\t*/\n\tconst isOffsetAttachedToTarget = useRef(true);\n\t/**\n\t* Calculate pagination and inset limits based on the measured\n\t* ticker and item dimensions.\n\t*/\n\tconst { clampOffset, totalItemLength, itemPositions, containerLength, gap, maxInset, direction, isMeasured } = useTicker();\n\tconst wrapInset = totalItemLength + gap;\n\tconst pagination = calcPageInsets(itemPositions, containerLength, maxInset);\n\tconst totalPages = pagination.insets.length;\n\tconst { sign } = getLayoutStrategy(axis, direction);\n\t/**\n\t* Set page offset when page prop is provided and measurements are ready.\n\t* Responds to changes in the page prop.\n\t*/\n\tconst lastPageRef = useRef(void 0);\n\tconst hasInitialized = useRef(false);\n\tuseEffect(() => {\n\t\tif (page === void 0 || !isMeasured || totalPages === 0) return;\n\t\tconst pageIndex = clamp(0, totalPages - 1, page);\n\t\tconst newOffset = -pagination.insets[pageIndex] * sign;\n\t\tif (!hasInitialized.current) {\n\t\t\thasInitialized.current = true;\n\t\t\tlastPageRef.current = page;\n\t\t\ttargetOffset.jump(newOffset);\n\t\t\toffset.jump(newOffset);\n\t\t} else if (lastPageRef.current !== page) {\n\t\t\tlastPageRef.current = page;\n\t\t\ttargetOffset.jump(newOffset);\n\t\t\toffset.jump(newOffset);\n\t\t}\n\t}, [\n\t\tisMeasured,\n\t\ttotalPages,\n\t\tpage,\n\t\tsign,\n\t\ttargetOffset,\n\t\toffset,\n\t\tpagination.insets\n\t]);\n\t/**\n\t* Helper function to calculate pagination state based on target offset\n\t*/\n\tconst calculatePaginationState = (targetOffsetValue) => {\n\t\treturn {\n\t\t\tcurrent: calcCurrentPage(targetOffsetValue * sign, pagination.insets, wrapInset, maxInset),\n\t\t\tisNextActive: loop ? true : targetOffsetValue * -sign < maxInset,\n\t\t\tisPrevActive: loop ? true : targetOffsetValue * -sign > 0\n\t\t};\n\t};\n\tconst [paginationState, setPaginationState] = useState(() => calculatePaginationState(targetOffset.get()));\n\tuseEffect(() => {\n\t\tupdatePaginationState();\n\t}, [containerLength, totalItemLength]);\n\tconst updatePaginationState = () => {\n\t\t/**\n\t\t* We derive the current page from the target offset, not the currently-rendered\n\t\t* offset. This ensures that if we're paginating discretely, the page indicator\n\t\t* updates immediately, and if we're jumping many pages that any indicator like a dots\n\t\t* indicator doesn't appear to animate through many dots as the carousel animates.\n\t\t*/\n\t\tconst newPaginationState = calculatePaginationState(targetOffset.get());\n\t\tif (newPaginationState.current !== paginationState.current || newPaginationState.isNextActive !== paginationState.isNextActive || newPaginationState.isPrevActive !== paginationState.isPrevActive) setPaginationState(newPaginationState);\n\t};\n\t/**\n\t* Handle changes to the target offset.\n\t* - Update the rendered offset.\n\t* - Update pagination state.\n\t*/\n\tuseMotionValueEvent(targetOffset, \"change\", (latest) => {\n\t\toffset.set(latest);\n\t\tupdatePaginationState();\n\t});\n\t/**\n\t* Attach the rendered offset to the target offset.\n\t*/\n\tconst currentAnimation = useRef(null);\n\tconst stopOffsetAnimation = () => {\n\t\tif (!currentAnimation.current) return;\n\t\tcurrentAnimation.current.stop();\n\t\tcurrentAnimation.current = null;\n\t};\n\t/**\n\t* Add a custom handler to the offset motion value. We link offset to targetOffset\n\t* and only update targetOffset from pagination/gestures. When offset is attached\n\t* to targetOffset, changes are passed straight through to offset. When it's not\n\t* attached, we animate offset to the latest targetOffset value.\n\t*/\n\tuseEffect(() => {\n\t\toffset.attach((v, onUpdate) => {\n\t\t\tstopOffsetAnimation();\n\t\t\tif (isOffsetAttachedToTarget.current) onUpdate(v);\n\t\t\telse currentAnimation.current = new JSAnimation({\n\t\t\t\tkeyframes: [offset.get(), v],\n\t\t\t\tvelocity: clamp(-2e3, 2e3, offset.getVelocity()),\n\t\t\t\t...transition,\n\t\t\t\tonUpdate,\n\t\t\t\tonComplete: () => {\n\t\t\t\t\tcurrentAnimation.current = null;\n\t\t\t\t}\n\t\t\t});\n\t\t\tisOffsetAttachedToTarget.current = true;\n\t\t}, stopOffsetAnimation);\n\t}, []);\n\t/**\n\t* Discrete pagination. Support (and pass via context) next/prev/goto\n\t* functions.\n\t*/\n\tconst stepOffset = (newOffset) => {\n\t\tconst clampedOffset = clampOffset(newOffset);\n\t\ttargetOffset.stop();\n\t\tisOffsetAttachedToTarget.current = false;\n\t\ttargetOffset.set(clampedOffset * sign);\n\t};\n\tconst paginate = (findPageInset, direction) => {\n\t\tconst offset = -findPageInset(-targetOffset.get() * sign, pagination.visibleLength, itemPositions, gap);\n\t\tconst clamped = clampOffset(offset);\n\t\tif (clamped * sign === targetOffset.get()) animate$1(tugOffset, 0, {\n\t\t\tvelocity: direction * sign * 400,\n\t\t\t...limitSpring\n\t\t});\n\t\telse stepOffset(clamped);\n\t};\n\tconst nextPage = () => paginate(findNextPageInset, -1);\n\tconst prevPage = () => paginate(findPrevPageInset, 1);\n\tconst gotoPage = (i) => {\n\t\tconst transformOffset = (loop ? Math.floor(-targetOffset.get() * sign / wrapInset) : 0) * -wrapInset;\n\t\tstepOffset(-pagination.insets[i] + transformOffset);\n\t};\n\t/**\n\t* Wheel input. Support direct wheel manipulation and, when snap is\n\t* enabled, swipe pagination.\n\t*/\n\tconst wheelCallbacks = useRef({\n\t\tnextPage,\n\t\tprevPage,\n\t\tclampOffset\n\t});\n\tuseEffect(() => {\n\t\twheelCallbacks.current = {\n\t\t\tnextPage,\n\t\t\tprevPage,\n\t\t\tclampOffset\n\t\t};\n\t}, [\n\t\tnextPage,\n\t\tprevPage,\n\t\tclampOffset\n\t]);\n\tuseEffect(() => {\n\t\tconst element = tickerRef.current;\n\t\tif (!element) return;\n\t\treturn wheel(element, {\n\t\t\taxis,\n\t\t\tswipeThreshold: wheelSwipeThreshold,\n\t\t\tonSwipe: snap ? (direction) => {\n\t\t\t\tconst { nextPage, prevPage } = wheelCallbacks.current;\n\t\t\t\tdirection * sign === 1 ? nextPage() : prevPage();\n\t\t\t} : void 0,\n\t\t\tonWheel: (delta) => {\n\t\t\t\tconst { clampOffset } = wheelCallbacks.current;\n\t\t\t\tconst newOffset = offset.get() + delta;\n\t\t\t\tconst clampedOffset = sign > 0 ? clampOffset(newOffset) : clamp(0, maxInset, newOffset);\n\t\t\t\ttargetOffset.jump(maxInset ? clampedOffset : newOffset);\n\t\t\t}\n\t\t});\n\t}, [\n\t\taxis,\n\t\tsnap,\n\t\toffset,\n\t\tsign\n\t]);\n\treturn /* @__PURE__ */ jsx(CarouselContext.Provider, {\n\t\tvalue: {\n\t\t\tcurrentPage: paginationState.current,\n\t\t\tisNextActive: paginationState.isNextActive,\n\t\t\tisPrevActive: paginationState.isPrevActive,\n\t\t\ttotalPages,\n\t\t\tnextPage,\n\t\t\tprevPage,\n\t\t\tgotoPage,\n\t\t\toffset,\n\t\t\ttargetOffset\n\t\t},\n\t\tchildren\n\t});\n}\nfunction Carousel$1({ children, loop = true, transition = defaultTransition, axis = \"x\", snap = \"page\", page, wheelSwipeThreshold, ...props }) {\n\tconst ref = useRef(null);\n\tconst targetOffset = useMotionValue(0);\n\tconst offset = useMotionValue(0);\n\tconst tugOffset = useMotionValue(0);\n\tconst renderedOffset = useTransform(() => tugOffset.get() + offset.get());\n\treturn /* @__PURE__ */ jsx(Ticker$1, {\n\t\trole: \"region\",\n\t\t\"aria-roledescription\": \"carousel\",\n\t\toffset: renderedOffset,\n\t\tloop,\n\t\tref,\n\t\taxis,\n\t\tdrag: axis,\n\t\t_dragX: axis === \"x\" ? targetOffset : false,\n\t\t_dragY: axis === \"y\" ? targetOffset : false,\n\t\tsnap,\n\t\tpageTransition: transition,\n\t\t...props,\n\t\tchildren: /* @__PURE__ */ jsx(CarouselView, {\n\t\t\ttickerRef: ref,\n\t\t\tloop,\n\t\t\toffset,\n\t\t\ttugOffset,\n\t\t\ttargetOffset,\n\t\t\ttransition,\n\t\t\tsnap,\n\t\t\taxis,\n\t\t\tpage,\n\t\t\twheelSwipeThreshold,\n\t\t\tchildren\n\t\t})\n\t});\n}\nconst defaultTransition = {\n\ttype: \"spring\",\n\tstiffness: 200,\n\tdamping: 40\n};\nconst limitSpring = {\n\ttype: \"spring\",\n\tstiffness: 80,\n\tdamping: 10\n};\nfunction invariant$1(condition, message) {\n\tif (!condition) throw new Error(message);\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Carousel.tsx\nfunction createCarouselDotsValue(itemCount) {\n\treturn Array.from({ length: itemCount }, (_, index) => ({ id: String(index + 1) }));\n}\nfunction useCarouselVariables() {\n\tconst { currentPage, totalPages, isNextActive, isPrevActive, nextPage, prevPage, gotoPage } = useCarousel();\n\tconst isStatic = useIsStaticRenderer();\n\treturn useMemo(() => ({\n\t\tcarousel_active_item_index: isStatic ? 1 : currentPage + 1,\n\t\tcarousel_total_items: isStatic ? 3 : totalPages,\n\t\tcarousel_has_next: isStatic ? true : isNextActive,\n\t\tcarousel_has_previous: isStatic ? false : isPrevActive,\n\t\tcarousel_dots: createCarouselDotsValue(isStatic ? 3 : totalPages),\n\t\tcarouselNextPage: nextPage,\n\t\tcarouselPreviousPage: prevPage,\n\t\tcarouselGoToPage: gotoPage\n\t}), [\n\t\tisStatic,\n\t\tcurrentPage,\n\t\ttotalPages,\n\t\tisNextActive,\n\t\tisPrevActive,\n\t\tnextPage,\n\t\tprevPage,\n\t\tgotoPage\n\t]);\n}\nfunction CarouselVariableBindings({ children }) {\n\treturn children(useCarouselVariables());\n}\n/** Renders a node only in the variants where it is a carousel control. */\nfunction CarouselControl({ isCarouselControl, children }) {\n\treturn isCarouselControl ? children : null;\n}\n/** Without this 100% sized items will not display correctly */\nconst requiredCarouselStyle = {\n\theight: \"100%\",\n\twidth: \"100%\"\n};\nconst Carousel = /* @__PURE__ */ forwardRef(function Carousel(props, ref) {\n\tconst { children, carouselEffectStackDirection, carouselEffectAlign, carouselEffectGap, carouselEffectXOverflow, carouselEffectYOverflow, carouselEffectOverflow, carouselEffectLoop, carouselEffectAutoPlay, carouselEffectInterval, carouselEffectSnap, carouselEffectControls, as: asProp, ...rest } = props;\n\tconst isStatic = useIsStaticRenderer();\n\tconst axis = carouselEffectStackDirection?.startsWith(\"column\") ? \"y\" : \"x\";\n\tconst overflow = (axis === \"x\" ? carouselEffectXOverflow ?? carouselEffectOverflow ?? \"visible\" : carouselEffectYOverflow ?? carouselEffectOverflow ?? \"visible\") === \"visible\";\n\tconst gap = getGap$1(carouselEffectGap, axis);\n\tconst snap = carouselEffectSnap === true ? \"page\" : carouselEffectSnap;\n\tconst items = flattenChildrenToTickerItems(children);\n\tconst MotionComponent = useMemo(() => motion.create(asProp), [asProp]);\n\treturn /* @__PURE__ */ jsx(MotionComponent, {\n\t\t...rest,\n\t\tref,\n\t\tchildren: /* @__PURE__ */ jsxs(Carousel$1, {\n\t\t\taxis,\n\t\t\talign: carouselEffectAlign ?? \"center\",\n\t\t\tgap,\n\t\t\tisStatic,\n\t\t\titemSize: \"manual\",\n\t\t\toverflow,\n\t\t\tloop: carouselEffectLoop,\n\t\t\tsnap,\n\t\t\titems,\n\t\t\tstyle: requiredCarouselStyle,\n\t\t\tchildren: [carouselEffectAutoPlay && /* @__PURE__ */ jsx(CarouselAutoPlay, { intervalSeconds: carouselEffectInterval ?? 1.5 }), carouselEffectControls]\n\t\t})\n\t});\n});\nfunction CarouselAutoPlay({ intervalSeconds }) {\n\tconst { nextPage, currentPage, isNextActive } = useCarousel();\n\tconst progress = useMotionValue(0);\n\tuseEffect(() => {\n\t\tif (!isNextActive) return;\n\t\tconst animation = animate$1(progress, [0, 1], {\n\t\t\tduration: intervalSeconds,\n\t\t\tease: \"linear\",\n\t\t\tonComplete: nextPage\n\t\t});\n\t\treturn () => animation.stop();\n\t}, [\n\t\tintervalSeconds,\n\t\tprogress,\n\t\tcurrentPage,\n\t\tisNextActive,\n\t\tnextPage\n\t]);\n\treturn null;\n}\nfunction getGap$1(gap, axis) {\n\tif (typeof gap === \"number\" && Number.isFinite(gap)) return gap;\n\tif (!isString(gap)) return void 0;\n\tconst gaps = gap.split(\" \");\n\tconst rowGap = gaps[0];\n\tconst columnGap = gaps[1] ?? gaps[0];\n\tconst value = axis === \"x\" ? columnGap : rowGap;\n\tif (!value) return void 0;\n\tconst parsed = parseInt(value);\n\treturn Number.isNaN(parsed) ? void 0 : parsed;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/BasicTicker.tsx\nconst BasicTicker = /* @__PURE__ */ forwardRef(function BasicTicker(props, ref) {\n\tconst { children, as: asProp, tickerEffectVelocity, tickerEffectAlign, axis, directionModifier, hoverModifier, gap, overflow, playState, ...rest } = props;\n\tconst Component = asProp ?? motion.div;\n\tconst isStatic = useIsStaticRenderer();\n\tconst velocity = (playState === \"paused\" ? 0 : tickerEffectVelocity ?? 100) * directionModifier;\n\treturn /* @__PURE__ */ jsx(Ticker$1, {\n\t\tref,\n\t\tas: Component,\n\t\t...rest,\n\t\tgap,\n\t\taxis,\n\t\talign: tickerEffectAlign ?? \"center\",\n\t\tisStatic,\n\t\tvelocity,\n\t\thoverFactor: hoverModifier,\n\t\titemSize: \"manual\",\n\t\toverflow\n\t});\n});\n\n//#endregion\n//#region ../../library/src/render/presentation/DraggableTicker.tsx\nconst DraggableTicker = /* @__PURE__ */ forwardRef(function DraggableTicker(props, ref) {\n\tconst { children, as: asProp, tickerEffectVelocity, tickerEffectAlign, axis, directionModifier, hoverModifier, gap, overflow, playState, ...rest } = props;\n\tconst Component = asProp ?? motion.div;\n\tconst layoutDirectionModifier = useLayoutDirection() === \"rtl\" && axis === \"x\" ? -1 : 1;\n\tconst targetVelocity = (playState === \"paused\" ? 0 : tickerEffectVelocity ?? 100) * directionModifier * layoutDirectionModifier;\n\tconst offsetMotionValue = useMotionValue(0);\n\tconst lastDrag = useRef(0);\n\tconst dragMomentum = useRef(false);\n\tconst isHovering = useRef(false);\n\tconst isDragging = useRef(false);\n\tconst handleClickCapture = (event) => {\n\t\tif (!isDragging.current) return;\n\t\tif (event.target && event.target !== event.currentTarget) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t}\n\t};\n\tuseAnimationFrame((_, delta) => {\n\t\tconst velocity = Math.abs(offsetMotionValue.getVelocity());\n\t\tconst currentTargetVelocity = isHovering.current ? targetVelocity * hoverModifier : targetVelocity;\n\t\tif (performance.now() > lastDrag.current && (!dragMomentum.current || velocity < Math.abs(currentTargetVelocity))) {\n\t\t\tconst frameOffset = delta / 1e3 * currentTargetVelocity;\n\t\t\tconst updated = offsetMotionValue.get() - frameOffset;\n\t\t\tif (dragMomentum.current) {\n\t\t\t\toffsetMotionValue.stop();\n\t\t\t\tdragMomentum.current = false;\n\t\t\t}\n\t\t\toffsetMotionValue.set(updated);\n\t\t}\n\t});\n\tuseEffect(() => {\n\t\tif (playState === \"paused\") offsetMotionValue.stop();\n\t}, [playState, offsetMotionValue]);\n\treturn /* @__PURE__ */ jsx(Ticker$1, {\n\t\tref,\n\t\tas: Component,\n\t\t...rest,\n\t\tgap,\n\t\taxis,\n\t\talign: tickerEffectAlign ?? \"center\",\n\t\titemSize: \"manual\",\n\t\toverflow,\n\t\t_dragX: axis === \"x\" ? offsetMotionValue : void 0,\n\t\t_dragY: axis === \"y\" ? offsetMotionValue : void 0,\n\t\toffset: offsetMotionValue,\n\t\tdrag: axis,\n\t\tdragMomentum: true,\n\t\tonClickCapture: handleClickCapture,\n\t\tonDragStart: () => {\n\t\t\tisDragging.current = true;\n\t\t},\n\t\tonDragEnd: () => {\n\t\t\tlastDrag.current = performance.now();\n\t\t\tdragMomentum.current = true;\n\t\t\tsetTimeout(() => {\n\t\t\t\tisDragging.current = false;\n\t\t\t}, 5);\n\t\t},\n\t\tonMouseEnter: () => {\n\t\t\tisHovering.current = true;\n\t\t},\n\t\tonMouseLeave: () => {\n\t\t\tisHovering.current = false;\n\t\t}\n\t});\n});\n\n//#endregion\n//#region ../../library/src/render/presentation/TickerContext.tsx\nconst TickerContext = /* @__PURE__ */ (() => {\n\tconst Context = createContext(void 0);\n\tContext.displayName = \"TickerContext\";\n\treturn Context;\n})();\nconst TickerContextProvider = ({ onPlayStateChange, children }) => {\n\tconst value = useMemo(() => ({\n\t\tstart: () => startTransition(() => onPlayStateChange(\"running\")),\n\t\tstop: () => startTransition(() => onPlayStateChange(\"paused\"))\n\t}), [onPlayStateChange]);\n\treturn /* @__PURE__ */ jsx(TickerContext.Provider, {\n\t\tvalue,\n\t\tchildren\n\t});\n};\n\n//#endregion\n//#region ../../library/src/render/presentation/Ticker.tsx\nconst Ticker = /* @__PURE__ */ forwardRef(function Ticker(props, ref) {\n\tconst { children, tickerEffectDraggable, tickerEffectStackDirection, tickerEffectXOverflow, tickerEffectYOverflow, tickerEffectOverflow, tickerEffectGap, tickerEffectDirectionModifier, tickerEffectHoverModifier, tickerEffectPosition, tickerEffectIsDataRepeater, style: styleProps, ...rest } = props;\n\tconst isStatic = useIsStaticRenderer();\n\tconst [playState, setPlayState] = useState(\"running\");\n\tconst axis = tickerEffectStackDirection?.startsWith(\"column\") ? \"y\" : \"x\";\n\tconst directionModifier = tickerEffectDirectionModifier === \"reverse\" ? -1 : 1;\n\tconst hoverModifier = isFiniteNumber(tickerEffectHoverModifier) ? tickerEffectHoverModifier / 100 : 1;\n\tconst overflow = (axis === \"x\" ? tickerEffectXOverflow ?? tickerEffectOverflow ?? \"visible\" : tickerEffectYOverflow ?? tickerEffectOverflow ?? \"visible\") === \"visible\";\n\tconst gap = getGap(tickerEffectGap, axis);\n\tconst items = flattenChildrenToTickerItems(children);\n\tconst tickerStyle = {\n\t\t...styleProps,\n\t\t\"--ticker-cms-total-children\": tickerEffectIsDataRepeater ? items.length : void 0,\n\t\tposition: tickerEffectPosition\n\t};\n\tif (isStatic || !tickerEffectDraggable) return /* @__PURE__ */ jsx(TickerContextProvider, {\n\t\tonPlayStateChange: setPlayState,\n\t\tchildren: /* @__PURE__ */ jsx(BasicTicker, {\n\t\t\t...rest,\n\t\t\tstyle: tickerStyle,\n\t\t\tref,\n\t\t\taxis,\n\t\t\tgap,\n\t\t\toverflow,\n\t\t\tdirectionModifier,\n\t\t\thoverModifier,\n\t\t\titems,\n\t\t\tplayState\n\t\t})\n\t});\n\treturn /* @__PURE__ */ jsx(TickerContextProvider, {\n\t\tonPlayStateChange: setPlayState,\n\t\tchildren: /* @__PURE__ */ jsx(DraggableTicker, {\n\t\t\t...rest,\n\t\t\tstyle: tickerStyle,\n\t\t\tref,\n\t\t\taxis,\n\t\t\tgap,\n\t\t\toverflow,\n\t\t\tdirectionModifier,\n\t\t\thoverModifier,\n\t\t\titems,\n\t\t\tplayState\n\t\t})\n\t});\n});\nfunction getGap(gap, axis) {\n\tif (isFiniteNumber(gap)) return gap;\n\tif (!isString(gap)) return void 0;\n\tconst gaps = gap.split(\" \");\n\tconst rowGap = gaps[0];\n\tconst columnGap = gaps[1] ?? gaps[0];\n\tif (axis === \"x\" && columnGap) return naNToUndefined(parseInt(columnGap));\n\tif (axis === \"y\" && rowGap) return naNToUndefined(parseInt(rowGap));\n}\nfunction naNToUndefined(value) {\n\treturn Number.isNaN(value) ? void 0 : value;\n}\n\n//#endregion\n//#region ../../library/src/modules/withTickerFX.tsx\nconst withTickerFX = (Component) => {\n\treturn (props) => {\n\t\tconst { carouselEffectProps, tickerEffectProps, domProps } = getProps(props);\n\t\tif (props.carouselEffectEnabled) return /* @__PURE__ */ jsx(Carousel, {\n\t\t\t...carouselEffectProps,\n\t\t\t...domProps,\n\t\t\tas: Component\n\t\t});\n\t\tif (props.tickerEffectEnabled) return /* @__PURE__ */ jsx(Ticker, {\n\t\t\t...tickerEffectProps,\n\t\t\t...domProps,\n\t\t\tas: Component\n\t\t});\n\t\treturn /* @__PURE__ */ jsx(Component, { ...domProps });\n\t};\n};\nfunction getProps(props) {\n\tconst { carouselEffectEnabled, carouselEffectAlign, carouselEffectAutoPlay, carouselEffectControls, carouselEffectGap, carouselEffectInterval, carouselEffectLoop, carouselEffectOverflow, carouselEffectSnap, carouselEffectStackDirection, carouselEffectXOverflow, carouselEffectYOverflow, tickerEffectEnabled, tickerEffectAlign, tickerEffectDirectionModifier, tickerEffectDraggable, tickerEffectGap, tickerEffectHoverModifier, tickerEffectIsDataRepeater, tickerEffectOverflow, tickerEffectPosition, tickerEffectStackDirection, tickerEffectVelocity, tickerEffectXOverflow, tickerEffectYOverflow, ...domProps } = props;\n\treturn {\n\t\tcarouselEffectProps: {\n\t\t\tcarouselEffectAlign,\n\t\t\tcarouselEffectAutoPlay,\n\t\t\tcarouselEffectControls,\n\t\t\tcarouselEffectGap,\n\t\t\tcarouselEffectInterval,\n\t\t\tcarouselEffectLoop,\n\t\t\tcarouselEffectOverflow,\n\t\t\tcarouselEffectSnap,\n\t\t\tcarouselEffectStackDirection,\n\t\t\tcarouselEffectXOverflow,\n\t\t\tcarouselEffectYOverflow\n\t\t},\n\t\ttickerEffectProps: {\n\t\t\ttickerEffectAlign,\n\t\t\ttickerEffectDirectionModifier,\n\t\t\ttickerEffectDraggable,\n\t\t\ttickerEffectGap,\n\t\t\ttickerEffectHoverModifier,\n\t\t\ttickerEffectIsDataRepeater,\n\t\t\ttickerEffectOverflow,\n\t\t\ttickerEffectPosition,\n\t\t\ttickerEffectStackDirection,\n\t\t\ttickerEffectVelocity,\n\t\t\ttickerEffectXOverflow,\n\t\t\ttickerEffectYOverflow\n\t\t},\n\t\tdomProps\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/withFlowFX.tsx\nconst withFlowFX = (Component) => React.forwardRef((props, forwardedRef) => {\n\tconst { flowEffectEnabled, flowEffectTransition, isNestedFlowEffect, transition, ...forwardedProps } = props;\n\tconst mergedTransition = useMemo(() => flowEffectTransition ? {\n\t\tdefault: transition,\n\t\tlayout: flowEffectTransition\n\t} : transition, [transition, flowEffectTransition]);\n\tif (!flowEffectEnabled) return /* @__PURE__ */ jsx(Component, {\n\t\t...forwardedProps,\n\t\tref: forwardedRef,\n\t\ttransition\n\t});\n\tlet componentWithFlowEffect = /* @__PURE__ */ jsx(Component, {\n\t\t...forwardedProps,\n\t\tref: forwardedRef\n\t});\n\tif (flowEffectTransition) componentWithFlowEffect = /* @__PURE__ */ jsx(MotionConfig, {\n\t\ttransition: mergedTransition,\n\t\tchildren: componentWithFlowEffect\n\t});\n\tif (!isNestedFlowEffect) componentWithFlowEffect = /* @__PURE__ */ jsx(LayoutGroup, { children: componentWithFlowEffect });\n\treturn componentWithFlowEffect;\n});\n\n//#endregion\n//#region ../../library/src/modules/withMappedReactProps.tsx\n/**\n* All code generated by Framer inlines its annotations as an exported object\n* that can be accessed. The shape of that object is stable, but could change in\n* future. This property access path is hardcoded to make sure that code that is\n* already generated never stops working. If the shape of the annotation\n* changes, this accessing of the value will also need to change at the same\n* time, but this code needs to remain backwards compatible so that old\n* code-generation is not effected.\n*/\nfunction extractMappingFromInfo(info) {\n\tconst json = info.__FramerMetadata__.exports.default.annotations?.framerVariables;\n\tif (!json) return void 0;\n\ttry {\n\t\treturn JSON.parse(json);\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* Smart Component instances are code-generated with immutable react property\n* keys. This ensures that renaming or reordering variables in Framer, doesn't\n* cause dependents of the Smart Component to provide incorrect values to the\n* new component.\n*\n* However, when a user adds a code override to a smart component, they expect\n* to be able to reference the props by their human readable name. To allow\n* that, this HOC can be wrapped around all of the override HOCs, and when\n* provided an object with ids that map to the human readable property, will\n* remap the props so that those human readable keys are used instead of the\n* immutable ids, and this remapped version of props can be consumed by all user\n* overrides.\n*/\nfunction withMappedReactProps(Component, info) {\n\treturn (rawProps) => {\n\t\tconst props = {};\n\t\tconst mapping = extractMappingFromInfo(info);\n\t\tfor (const key in rawProps) asRecord(props)[mapping?.[key] ?? key] = rawProps[key];\n\t\treturn /* @__PURE__ */ jsx(Component, { ...props });\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/textureResources.ts\n/**\n* Cross-context-safe video-element check. This renderer code also runs in the shader\n* fallback Web Worker (OffscreenCanvas), where DOM globals like `HTMLVideoElement` are\n* undefined — referencing the global directly in `instanceof` throws there. (`ImageBitmap`\n* is available in workers, so it needs no such guard.)\n*/\nfunction isVideoElement(value) {\n\treturn typeof HTMLVideoElement !== \"undefined\" && value instanceof HTMLVideoElement;\n}\n/**\n* Releases heavyweight browser resources held by a texture source. `ImageBitmap`\n* holds a GPU-backed buffer until closed; `HTMLVideoElement` holds a video decoder the\n* browser won't free on GC alone — the pause → remove src → load() sequence is what\n* actually releases it. Both `instanceof` checks are guarded against an undefined global so\n* this is safe to call wherever a release lands (the fallback Web Worker lacks DOM globals).\n*/\nfunction releaseTextureValue(value) {\n\tif (typeof ImageBitmap !== \"undefined\" && value instanceof ImageBitmap) {\n\t\tvalue.close();\n\t\treturn;\n\t}\n\tif (isVideoElement(value)) {\n\t\tvalue.pause();\n\t\tvalue.removeAttribute(\"src\");\n\t\tvalue.load();\n\t}\n}\n/**\n* Releases the texture sources held by a resolved uniform set. Used by one-shot resolution paths\n* that own their textures directly (e.g. fallback-image generation) — the live shader path instead\n* pools its videos and releases them through `videoDecoderPool`.\n*/\nfunction releaseTextureUniforms(uniforms) {\n\tfor (const uniform of Object.values(uniforms)) if (uniform.type === \"sampler2D\") releaseTextureValue(uniform.value);\n}\n/**\n* Time budget for a video to produce its first decodable frame. Exceeding it rejects so\n* the shader degrades to its fallback image — this is also how decoder exhaustion\n* surfaces, since hitting the browser's decoder limit can stall silently (no `error`\n* event) rather than fail outright.\n*/\nconst videoLoadTimeoutMs = 1e4;\n/**\n* Loads a muted, looping video paused on its first frame, ready for `texImage2D`. Self-releases\n* its decoder on failure/timeout — the rejection leaves no caller to own it. Aborting `signal`\n* tears an in-flight load down immediately: the pool aborts when an owner drops a video before it\n* loads, so churning swaps/unmounts don't leave decoders buffering in the background past the cap.\n*\n* The pooled shader path goes through `videoDecoderPool.acquire`; one-shot callers (fallback-image\n* generation) call this directly and release the result themselves.\n*/\nfunction loadVideoTexture(url, signal) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst video = document.createElement(\"video\");\n\t\tvideo.crossOrigin = \"anonymous\";\n\t\tvideo.muted = true;\n\t\tvideo.loop = true;\n\t\tvideo.setAttribute(\"playsinline\", \"\");\n\t\tvideo.preload = \"auto\";\n\t\tconst aborted = \"Video texture load aborted\";\n\t\tif (signal?.aborted) {\n\t\t\treleaseTextureValue(video);\n\t\t\treject(/* @__PURE__ */ new Error(aborted));\n\t\t\treturn;\n\t\t}\n\t\tconst onAbort = () => fail(aborted);\n\t\tconst onError = () => fail(`Failed to load video texture from \"${url}\"`);\n\t\tconst timeoutId = window.setTimeout(() => fail(`Timed out loading video texture from \"${url}\"`), videoLoadTimeoutMs);\n\t\tfunction detach() {\n\t\t\twindow.clearTimeout(timeoutId);\n\t\t\tsignal?.removeEventListener(\"abort\", onAbort);\n\t\t\tvideo.removeEventListener(\"error\", onError);\n\t\t}\n\t\tfunction fail(message) {\n\t\t\tdetach();\n\t\t\treleaseTextureValue(video);\n\t\t\treject(new Error(message));\n\t\t}\n\t\tsignal?.addEventListener(\"abort\", onAbort, { once: true });\n\t\tvideo.addEventListener(\"loadeddata\", () => {\n\t\t\tdetach();\n\t\t\tresolve(video);\n\t\t}, { once: true });\n\t\tvideo.addEventListener(\"error\", onError, { once: true });\n\t\tvideo.src = url;\n\t});\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/WebGL2ShaderRenderer.ts\n/** Runtime catalog of `ShaderBufferFormat`; `satisfies` keeps the members in sync with the type. */\nconst supportedBufferFormats = [\n\t\"rgba8\",\n\t\"r8\",\n\t\"rg16f\",\n\t\"rgba16f\",\n\t\"rgba32f\"\n];\n/** Read-only view of the format catalog. */\nconst shaderBufferFormats = /* @__PURE__ */ new Set(supportedBufferFormats);\n/** Built-in uniforms automatically provided to every pass (main and buffers). */\nconst builtInUniforms = {\n\ttime: {\n\t\tname: \"u_time\",\n\t\tglslType: \"float\"\n\t},\n\tresolution: {\n\t\tname: \"u_resolution\",\n\t\tglslType: \"vec2\"\n\t},\n\tdeltaTime: {\n\t\tname: \"u_deltaTime\",\n\t\tglslType: \"float\"\n\t},\n\tpixelRatio: {\n\t\tname: \"u_pixelRatio\",\n\t\tglslType: \"float\"\n\t},\n\tmousePosition: {\n\t\tname: \"u_mousePosition\",\n\t\tglslType: \"vec4\"\n\t},\n\tmousePointerDown: {\n\t\tname: \"u_mousePointerDown\",\n\t\tglslType: \"float\"\n\t},\n\tmouseHover: {\n\t\tname: \"u_mouseHover\",\n\t\tglslType: \"float\"\n\t}\n};\nconst webGLContextLostEvent = \"webglcontextlost\";\nconst noop$1 = () => {};\n/**\n* Encapsulates all WebGL operations for rendering custom fragment shaders, including\n* optional multi-pass buffers (ping-pong FBOs with cross-buffer sampling). Handles\n* context creation, shader compilation, and rendering lifecycle.\n*/\nvar WebGL2ShaderRenderer = class {\n\tgl;\n\tcanvas;\n\tcontextLostHandler;\n\tdisposed = false;\n\tpixelRatio = typeof window !== \"undefined\" ? window.devicePixelRatio : 1;\n\tresolutionScale;\n\tlastBufferWidth = 0;\n\tlastBufferHeight = 0;\n\tonContextLost;\n\tresources;\n\ttextures = /* @__PURE__ */ new Map();\n\t/** First texture unit available for custom samplers. Buffers occupy `[0, n)`; customs follow. */\n\tget customTextureUnitBase() {\n\t\treturn this.resources.bufferPasses.length;\n\t}\n\tconstructor(canvas, vertexSource, fragmentSource, resolutionScale, onContextLostHandler = noop$1, bufferDescriptors = []) {\n\t\tthis.resolutionScale = resolutionScale;\n\t\tthis.canvas = canvas;\n\t\tthis.onContextLost = onContextLostHandler;\n\t\tconst gl = canvas.getContext(\"webgl2\", {\n\t\t\talpha: true,\n\t\t\tpremultipliedAlpha: false,\n\t\t\tantialias: false,\n\t\t\tpowerPreference: \"default\",\n\t\t\tpreserveDrawingBuffer: canvas instanceof OffscreenCanvas\n\t\t});\n\t\tif (!gl) throw new Error(\"WebGL2 not supported\");\n\t\tthis.gl = gl;\n\t\tthis.contextLostHandler = (event) => {\n\t\t\tevent.preventDefault();\n\t\t\tthis.dispose();\n\t\t\tthis.onContextLost?.();\n\t\t};\n\t\tcanvas.addEventListener(webGLContextLostEvent, this.contextLostHandler);\n\t\ttry {\n\t\t\tthis.resources = this.buildResources(vertexSource, fragmentSource, bufferDescriptors);\n\t\t} catch (error) {\n\t\t\tcanvas.removeEventListener(webGLContextLostEvent, this.contextLostHandler);\n\t\t\tthrow error;\n\t\t}\n\t\tconst { mainPass, bufferPasses } = this.resources;\n\t\tgl.clearColor(0, 0, 0, 0);\n\t\tif (bufferPasses.length === 0) {\n\t\t\tgl.useProgram(mainPass.program);\n\t\t\tgl.bindVertexArray(mainPass.vao);\n\t\t}\n\t}\n\t/**\n\t* Allocates every GL resource the renderer needs and returns them as a `GLResources`.\n\t* If any step throws, the catch deletes whatever was allocated up to that point before\n\t* rethrowing — so the constructor never has to know about partial state.\n\t*/\n\tbuildResources(vertexSource, fragmentSource, bufferDescriptors) {\n\t\tconst { gl, canvas } = this;\n\t\tconst offendingFloatBuffer = bufferDescriptors.find((d) => shaderBufferFormatRequiresFloatExt(d.format));\n\t\tif (offendingFloatBuffer && !gl.getExtension(\"EXT_color_buffer_float\")) throw new Error(`Shader buffer \"${offendingFloatBuffer.uniformName}\" requested format \"${offendingFloatBuffer.format}\" but the EXT_color_buffer_float extension is not available.`);\n\t\tconst hasFloatLinear = !offendingFloatBuffer || !!gl.getExtension(\"OES_texture_float_linear\");\n\t\tconst vertexShader = this.compileShader(gl.VERTEX_SHADER, vertexSource);\n\t\tlet mainProgram;\n\t\tconst bufferProgramPairs = [];\n\t\tlet positionBuffer;\n\t\tlet texCoordBuffer;\n\t\tlet mainPass;\n\t\tconst bufferPasses = [];\n\t\ttry {\n\t\t\tmainProgram = this.linkFragmentProgram(vertexShader, fragmentSource);\n\t\t\tfor (const desc of bufferDescriptors) bufferProgramPairs.push([this.linkFragmentProgram(vertexShader, desc.fragment), desc]);\n\t\t\tpositionBuffer = createStaticArrayBuffer(gl, new Float32Array([\n\t\t\t\t-1,\n\t\t\t\t-1,\n\t\t\t\t1,\n\t\t\t\t-1,\n\t\t\t\t-1,\n\t\t\t\t1,\n\t\t\t\t-1,\n\t\t\t\t1,\n\t\t\t\t1,\n\t\t\t\t-1,\n\t\t\t\t1,\n\t\t\t\t1\n\t\t\t]));\n\t\t\ttexCoordBuffer = createStaticArrayBuffer(gl, new Float32Array([\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t\t1,\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t\t1,\n\t\t\t\t1\n\t\t\t]));\n\t\t\tmainPass = this.buildPassState(mainProgram, bufferDescriptors, positionBuffer, texCoordBuffer);\n\t\t\tfor (let textureUnit = 0; textureUnit < bufferProgramPairs.length; textureUnit++) {\n\t\t\t\tconst pair = bufferProgramPairs[textureUnit];\n\t\t\t\tif (!pair) continue;\n\t\t\t\tconst [program, desc] = pair;\n\t\t\t\tbufferPasses.push(this.buildBufferPass(program, desc, bufferDescriptors, hasFloatLinear, textureUnit, positionBuffer, texCoordBuffer));\n\t\t\t}\n\t\t\tthis.allocateBufferPassStorages(bufferPasses, canvas.width, canvas.height);\n\t\t\tthis.bindStaticSamplerUnits(mainPass, bufferPasses);\n\t\t\treturn {\n\t\t\t\tpositionBuffer,\n\t\t\t\ttexCoordBuffer,\n\t\t\t\tmainPass,\n\t\t\t\tbufferPasses\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tfor (const bufferPass of bufferPasses) this.disposeBufferPass(bufferPass);\n\t\t\tfor (let i = bufferPasses.length; i < bufferProgramPairs.length; i++) {\n\t\t\t\tconst pair = bufferProgramPairs[i];\n\t\t\t\tif (pair) gl.deleteProgram(pair[0]);\n\t\t\t}\n\t\t\tif (mainPass) this.disposePass(mainPass);\n\t\t\telse if (mainProgram) gl.deleteProgram(mainProgram);\n\t\t\tif (texCoordBuffer) gl.deleteBuffer(texCoordBuffer);\n\t\t\tif (positionBuffer) gl.deleteBuffer(positionBuffer);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tgl.deleteShader(vertexShader);\n\t\t}\n\t}\n\t/**\n\t* Renders a frame with the given timing, optional custom uniforms, and mouse input.\n\t* Branches on whether any buffers are configured: the no-buffer path is a single\n\t* draw with program + VAO already bound from construction; the multi-pass path\n\t* walks each buffer's FBO in declaration order before drawing the main pass.\n\t*/\n\trender(elapsedTime, deltaTime, uniforms, mouseInput) {\n\t\tif (this.disposed) return;\n\t\tif (this.resources.bufferPasses.length === 0) {\n\t\t\tthis.renderSinglePass(elapsedTime, deltaTime, uniforms, mouseInput);\n\t\t\treturn;\n\t\t}\n\t\tthis.renderMultiPass(elapsedTime, deltaTime, uniforms, mouseInput);\n\t}\n\t/**\n\t* No-buffer hot path: program + VAO are bound once at construction, so each frame\n\t* is just built-ins + custom uniforms + clear + draw.\n\t*/\n\trenderSinglePass(elapsedTime, deltaTime, uniforms, mouseInput) {\n\t\tconst { gl, canvas, resources: { mainPass } } = this;\n\t\tthis.updatePassBuiltIns(mainPass, elapsedTime, deltaTime, mouseInput, canvas.width, canvas.height);\n\t\tthis.applyCustomUniforms(mainPass, uniforms, this.customTextureUnitBase);\n\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\tgl.drawArrays(gl.TRIANGLES, 0, 6);\n\t}\n\t/**\n\t* Multi-pass render: each buffer in declaration order draws into its own FBO, with\n\t* its just-written texture re-pinned to its reserved unit so later buffers (and the\n\t* main pass) see the latest output. The main pass draws to the default framebuffer\n\t* with every buffer texture still bound.\n\t*/\n\trenderMultiPass(elapsedTime, deltaTime, uniforms, mouseInput) {\n\t\tconst { gl, canvas, resources: { mainPass, bufferPasses }, customTextureUnitBase } = this;\n\t\tfor (const bufferPass of bufferPasses) {\n\t\t\tgl.activeTexture(gl.TEXTURE0 + bufferPass.textureUnit);\n\t\t\tgl.bindTexture(gl.TEXTURE_2D, bufferPass.textures[bufferPass.writeIdx === 0 ? 1 : 0]);\n\t\t}\n\t\tfor (const bufferPass of bufferPasses) {\n\t\t\tgl.useProgram(bufferPass.program);\n\t\t\tgl.bindVertexArray(bufferPass.vao);\n\t\t\tthis.updatePassBuiltIns(bufferPass, elapsedTime, deltaTime, mouseInput, bufferPass.width, bufferPass.height);\n\t\t\tthis.applyCustomUniforms(bufferPass, uniforms, customTextureUnitBase);\n\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, bufferPass.fbos[bufferPass.writeIdx]);\n\t\t\tgl.viewport(0, 0, bufferPass.width, bufferPass.height);\n\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\t\tgl.drawArrays(gl.TRIANGLES, 0, 6);\n\t\t\tgl.activeTexture(gl.TEXTURE0 + bufferPass.textureUnit);\n\t\t\tgl.bindTexture(gl.TEXTURE_2D, bufferPass.textures[bufferPass.writeIdx]);\n\t\t\tbufferPass.writeIdx = bufferPass.writeIdx === 0 ? 1 : 0;\n\t\t}\n\t\tgl.useProgram(mainPass.program);\n\t\tgl.bindVertexArray(mainPass.vao);\n\t\tthis.updatePassBuiltIns(mainPass, elapsedTime, deltaTime, mouseInput, canvas.width, canvas.height);\n\t\tthis.applyCustomUniforms(mainPass, uniforms, customTextureUnitBase);\n\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\tgl.viewport(0, 0, canvas.width, canvas.height);\n\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\tgl.drawArrays(gl.TRIANGLES, 0, 6);\n\t}\n\t/**\n\t* Syncs the canvas buffer and viewport to match display size, accounting for device pixel ratio.\n\t* Each buffer's render target resizes alongside (its size = canvas size × buffer.resolutionScale).\n\t*/\n\tresize() {\n\t\tif (this.disposed) return;\n\t\tconst { canvas } = this;\n\t\tif (canvas instanceof OffscreenCanvas) throw new Error(\"resize() is not supported for OffscreenCanvas.\");\n\t\tconst cssWidth = canvas.offsetWidth;\n\t\tconst cssHeight = canvas.offsetHeight;\n\t\tconst dpr = window.devicePixelRatio;\n\t\tconst effectiveDpr = Math.max(dpr * this.resolutionScale, 1);\n\t\tthis.pixelRatio = effectiveDpr;\n\t\tconst width = cssWidth * effectiveDpr;\n\t\tconst height = cssHeight * effectiveDpr;\n\t\tif (width === this.lastBufferWidth && height === this.lastBufferHeight) return;\n\t\tthis.lastBufferWidth = width;\n\t\tthis.lastBufferHeight = height;\n\t\tcanvas.width = width;\n\t\tcanvas.height = height;\n\t\tthis.gl.viewport(0, 0, width, height);\n\t\ttry {\n\t\t\tthis.allocateBufferPassStorages(this.resources.bufferPasses, width, height);\n\t\t} catch (error) {\n\t\t\tthis.dispose();\n\t\t\tthrow error;\n\t\t}\n\t}\n\t/**\n\t* @param pixelDensity - The ratio between the canvas's physical pixel\n\t* dimensions and the logical (CSS) dimensions the shader should assume.\n\t* Surfaces as `u_pixelRatio` so shaders can derive CSS-space values via\n\t* `u_resolution / u_pixelRatio`. On-screen canvases get this from\n\t* `window.devicePixelRatio`; offscreen renders must supply it explicitly\n\t* when the canvas is supersampled (e.g. 2x for fallback image sharpness).\n\t*/\n\tresizeOffscreenCanvas(width, height, pixelDensity) {\n\t\tif (this.disposed) return;\n\t\tif (pixelDensity !== void 0) this.pixelRatio = pixelDensity;\n\t\tthis.gl.viewport(0, 0, width, height);\n\t\ttry {\n\t\t\tthis.allocateBufferPassStorages(this.resources.bufferPasses, width, height);\n\t\t} catch (error) {\n\t\t\tthis.dispose();\n\t\t\tthrow error;\n\t\t}\n\t}\n\t/**\n\t* Force all commands to complete execution; used for canvas fallback image generation\n\t*/\n\tfinish() {\n\t\tif (this.disposed) return;\n\t\tthis.gl.finish();\n\t}\n\t/**\n\t* Releases every WebGL resource owned by this renderer: shared geometry buffers,\n\t* user-supplied sampler textures, and each pass's program / VAO / (for buffers) FBOs\n\t* and ping-pong textures.\n\t*\n\t* Idempotent. Safe after the WebGL context has been lost — the GPU driver already\n\t* invalidated the resources, so we skip the gl.delete* calls. `disposed` gates all\n\t* public methods so reads after disposal short-circuit before touching `this.resources`.\n\t*/\n\tdispose() {\n\t\tif (this.disposed) return;\n\t\tthis.disposed = true;\n\t\tthis.canvas.removeEventListener(webGLContextLostEvent, this.contextLostHandler);\n\t\tfor (const [, entry] of this.textures) if (entry.source && !isVideoElement(entry.source)) releaseTextureValue(entry.source);\n\t\tif (this.gl.isContextLost()) return;\n\t\tconst { gl, resources } = this;\n\t\tfor (const bufferPass of resources.bufferPasses) this.disposeBufferPass(bufferPass);\n\t\tthis.disposePass(resources.mainPass);\n\t\tgl.deleteBuffer(resources.positionBuffer);\n\t\tgl.deleteBuffer(resources.texCoordBuffer);\n\t\tfor (const [, entry] of this.textures) gl.deleteTexture(entry.texture);\n\t\tthis.textures.clear();\n\t}\n\t/** Releases the program + VAO owned by any pass. Shared by main-pass and buffer-pass disposal. */\n\tdisposePass(pass) {\n\t\tconst { gl } = this;\n\t\tgl.deleteVertexArray(pass.vao);\n\t\tgl.deleteProgram(pass.program);\n\t}\n\t/** Releases everything a buffer pass owns: program + VAO (via `disposePass`), plus its ping-pong textures and FBOs. */\n\tdisposeBufferPass(bufferPass) {\n\t\tconst { gl } = this;\n\t\tthis.disposePass(bufferPass);\n\t\tfor (const tex of bufferPass.textures) gl.deleteTexture(tex);\n\t\tfor (const fbo of bufferPass.fbos) gl.deleteFramebuffer(fbo);\n\t}\n\t/**\n\t* Builds the GL state shared by main and buffer passes: a fresh VAO bound to the shared\n\t* fullscreen-quad geometry with this program's attribute locations, plus uniform-location\n\t* caches for built-ins, custom uniforms (lazy-filled on first set), and one entry per\n\t* buffer's `u_<name>_buffer` sampler. Geometry buffers are passed in so this works during\n\t* construction before the corresponding `this.*` fields are set.\n\t*/\n\tbuildPassState(program, bufferDescriptors, positionBuffer, texCoordBuffer) {\n\t\tconst { gl } = this;\n\t\tconst vao = gl.createVertexArray();\n\t\tif (!vao) throw new Error(\"Failed to create vertex array object\");\n\t\tgl.bindVertexArray(vao);\n\t\tbindFullScreenQuadAttribs(gl, program, positionBuffer, texCoordBuffer);\n\t\tgl.bindVertexArray(null);\n\t\tconst builtInLocations = lookupBuiltInLocations(gl, program);\n\t\tconst bufferSamplerLocations = /* @__PURE__ */ new Map();\n\t\tfor (const desc of bufferDescriptors) bufferSamplerLocations.set(desc.uniformName, gl.getUniformLocation(program, desc.uniformName));\n\t\treturn {\n\t\t\tprogram,\n\t\t\tvao,\n\t\t\tbuiltInLocations,\n\t\t\tcustomLocations: /* @__PURE__ */ new Map(),\n\t\t\tbufferSamplerLocations\n\t\t};\n\t}\n\t/**\n\t* Extends `buildPassState` with the per-buffer ping-pong storage: two textures + two\n\t* framebuffers, plus a reserved texture unit that every pass (including this buffer's\n\t* own pass, for self-feedback) samples from. Texture storage stays uninitialized\n\t* here — `allocateBufferPassStorage` sizes them once the canvas dimensions are known.\n\t*/\n\tbuildBufferPass(program, descriptor, bufferDescriptors, hasFloatLinear, textureUnit, positionBuffer, texCoordBuffer) {\n\t\tconst base = this.buildPassState(program, bufferDescriptors, positionBuffer, texCoordBuffer);\n\t\tconst { gl } = this;\n\t\tconst formatGL = resolveBufferFormatGL(gl, descriptor.format);\n\t\tconst filter = shaderBufferFormatRequiresFloatExt(descriptor.format) && !hasFloatLinear ? gl.NEAREST : gl.LINEAR;\n\t\tconst texA = createBufferTexture(gl, filter);\n\t\tconst texB = createBufferTexture(gl, filter);\n\t\tconst fboA = createBufferFramebuffer(gl, texA);\n\t\tconst fboB = createBufferFramebuffer(gl, texB);\n\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\tgl.bindTexture(gl.TEXTURE_2D, null);\n\t\treturn {\n\t\t\t...base,\n\t\t\tuniformName: descriptor.uniformName,\n\t\t\tresolutionScale: descriptor.resolutionScale,\n\t\t\tformat: descriptor.format,\n\t\t\tinternalFormat: formatGL.internalFormat,\n\t\t\tuploadFormat: formatGL.uploadFormat,\n\t\t\tpixelType: formatGL.pixelType,\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\ttextures: [texA, texB],\n\t\t\tfbos: [fboA, fboB],\n\t\t\twriteIdx: 0,\n\t\t\ttextureUnit\n\t\t};\n\t}\n\t/**\n\t* Wires every `u_<bufferName>_buffer` sampler-to-unit binding once at construction.\n\t* Each buffer's \"current\" texture stays bound to its reserved unit for the entire frame,\n\t* and the unit number is fixed for the lifetime of the program — so we never need to call\n\t* `gl.uniform1i` for these samplers per-frame. A buffer reading its own name during its\n\t* own pass uses the same binding (the unit holds the prior-frame texture before draw\n\t* and the just-written texture after).\n\t*/\n\tbindStaticSamplerUnits(mainPass, bufferPasses) {\n\t\tconst { gl } = this;\n\t\tconst allPasses = [mainPass, ...bufferPasses];\n\t\tfor (const pass of allPasses) {\n\t\t\tgl.useProgram(pass.program);\n\t\t\tfor (const bufferPass of bufferPasses) {\n\t\t\t\tconst loc = pass.bufferSamplerLocations.get(bufferPass.uniformName);\n\t\t\t\tif (loc) gl.uniform1i(loc, bufferPass.textureUnit);\n\t\t\t}\n\t\t}\n\t}\n\t/** Resizes every buffer pass to the given canvas dimensions. */\n\tallocateBufferPassStorages(bufferPasses, canvasWidth, canvasHeight) {\n\t\tfor (const bufferPass of bufferPasses) this.allocateBufferPassStorage(bufferPass, canvasWidth, canvasHeight);\n\t}\n\t/**\n\t* Sizes the buffer's two ping-pong textures to `canvas × resolutionScale` (clamped to\n\t* at least 1×1) and clears both attached FBOs so a stale prior frame doesn't leak in\n\t* after a resize. Idempotent — early-returns when the requested size matches the\n\t* current size.\n\t*/\n\tallocateBufferPassStorage(bufferPass, canvasWidth, canvasHeight) {\n\t\tconst { gl } = this;\n\t\tconst w = Math.max(1, Math.floor(canvasWidth * bufferPass.resolutionScale));\n\t\tconst h = Math.max(1, Math.floor(canvasHeight * bufferPass.resolutionScale));\n\t\tif (w === bufferPass.width && h === bufferPass.height) return;\n\t\tbufferPass.width = w;\n\t\tbufferPass.height = h;\n\t\tfor (const tex of bufferPass.textures) {\n\t\t\tgl.bindTexture(gl.TEXTURE_2D, tex);\n\t\t\tgl.texImage2D(gl.TEXTURE_2D, 0, bufferPass.internalFormat, w, h, 0, bufferPass.uploadFormat, bufferPass.pixelType, null);\n\t\t}\n\t\tgl.bindTexture(gl.TEXTURE_2D, null);\n\t\tconst [prevX, prevY, prevW, prevH] = gl.getParameter(gl.VIEWPORT);\n\t\tfor (const fbo of bufferPass.fbos) {\n\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, fbo);\n\t\t\tthrowIfFramebufferIncomplete(gl, bufferPass.uniformName, bufferPass.format);\n\t\t\tgl.viewport(0, 0, w, h);\n\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\n\t\t}\n\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\tgl.viewport(prevX, prevY, prevW, prevH);\n\t}\n\t/**\n\t* Compiles GLSL source code into a shader object the GPU can execute.\n\t* @throws Error with shader info log if compilation fails\n\t*/\n\tcompileShader(type, source) {\n\t\tconst { gl } = this;\n\t\tconst shader = gl.createShader(type);\n\t\tif (!shader) throw new Error(\"Failed to create shader\");\n\t\tgl.shaderSource(shader, source);\n\t\tgl.compileShader(shader);\n\t\tif (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n\t\t\tconst info = gl.getShaderInfoLog(shader);\n\t\t\tgl.deleteShader(shader);\n\t\t\tconst shaderType = type === gl.VERTEX_SHADER ? \"Vertex\" : \"Fragment\";\n\t\t\tthrow new Error(`${shaderType} shader compilation failed: ${info}`);\n\t\t}\n\t\treturn shader;\n\t}\n\t/**\n\t* Compiles a fragment source, attaches it to the given vertex shader, and links them\n\t* into a program. The compiled fragment shader is released in a `finally` block so\n\t* we never leak it whether linking succeeds, fails, or compilation throws.\n\t*\n\t* @throws Error with the program info log if linking fails.\n\t*/\n\tlinkFragmentProgram(vertexShader, fragmentSource) {\n\t\tconst { gl } = this;\n\t\tconst fragmentShader = this.compileShader(gl.FRAGMENT_SHADER, fragmentSource);\n\t\ttry {\n\t\t\tconst program = gl.createProgram();\n\t\t\tif (!program) throw new Error(\"Failed to create program\");\n\t\t\tgl.attachShader(program, vertexShader);\n\t\t\tgl.attachShader(program, fragmentShader);\n\t\t\tgl.linkProgram(program);\n\t\t\tif (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n\t\t\t\tconst info = gl.getProgramInfoLog(program);\n\t\t\t\tgl.deleteProgram(program);\n\t\t\t\tthrow new Error(`Program linking failed: ${info}`);\n\t\t\t}\n\t\t\treturn program;\n\t\t} finally {\n\t\t\tgl.deleteShader(fragmentShader);\n\t\t}\n\t}\n\t/**\n\t* Sets a non-texture uniform value in the shader program.\n\t*/\n\tsetUniform(location, uniform) {\n\t\tif (location === null) return;\n\t\tswitch (uniform.type) {\n\t\t\tcase \"boolean\":\n\t\t\t\tthis.gl.uniform1f(location, uniform.value ? 1 : 0);\n\t\t\t\tbreak;\n\t\t\tcase \"float\":\n\t\t\t\tthis.gl.uniform1f(location, uniform.value);\n\t\t\t\tbreak;\n\t\t\tcase \"int\":\n\t\t\t\tthis.gl.uniform1i(location, uniform.value);\n\t\t\t\tbreak;\n\t\t\tcase \"vec2\":\n\t\t\t\tthis.gl.uniform2fv(location, uniform.value);\n\t\t\t\tbreak;\n\t\t\tcase \"vec4\":\n\t\t\t\tthis.gl.uniform4fv(location, uniform.value);\n\t\t\t\tbreak;\n\t\t\tcase \"vec4[]\": this.gl.uniform4fv(location, uniform.value.flat());\n\t\t}\n\t}\n\t/**\n\t* Creates or updates a texture from a texture source and binds it to the given unit.\n\t*/\n\tbindTexture(uniformName, source, textureUnit) {\n\t\tconst { gl, textures } = this;\n\t\tlet entry = textures.get(uniformName);\n\t\tconst isNewTexture = !entry;\n\t\tif (isNewTexture) {\n\t\t\tconst texture = gl.createTexture();\n\t\t\tif (!texture) return;\n\t\t\tentry = {\n\t\t\t\ttexture,\n\t\t\t\tsource: null\n\t\t\t};\n\t\t\ttextures.set(uniformName, entry);\n\t\t}\n\t\tif (!entry) return;\n\t\tgl.activeTexture(gl.TEXTURE0 + textureUnit);\n\t\tgl.bindTexture(gl.TEXTURE_2D, entry.texture);\n\t\tif (isVideoElement(source)) {\n\t\t\tthis.uploadVideoFrame(entry, source, isNewTexture);\n\t\t\treturn;\n\t\t}\n\t\tif (isNewTexture || entry.source !== source) {\n\t\t\tif (entry.source && !isVideoElement(entry.source)) releaseTextureValue(entry.source);\n\t\t\tentry.source = source;\n\t\t\tgl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, source);\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\t\t\tgl.generateMipmap(gl.TEXTURE_2D);\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n\t\t}\n\t}\n\t/**\n\t* Uploads the current frame of a video to the bound texture. Prefers `texSubImage2D`\n\t* (pixel update) over `texImage2D` (storage realloc) once the texture is sized, and\n\t* skips frames that haven't advanced. No mipmaps — regenerating them per frame is far\n\t* too costly, so LINEAR filtering is the trade-off.\n\t*/\n\tuploadVideoFrame(entry, video, isNewTexture) {\n\t\tconst { gl } = this;\n\t\tif (video.readyState < video.HAVE_CURRENT_DATA) return;\n\t\tif (video.seeking) return;\n\t\tconst { videoWidth, videoHeight, currentTime } = video;\n\t\tif (videoWidth === 0 || videoHeight === 0) return;\n\t\tif (entry.source && entry.source !== video && !isVideoElement(entry.source)) releaseTextureValue(entry.source);\n\t\tif (isNewTexture || entry.source !== video || entry.videoWidth !== videoWidth || entry.videoHeight !== videoHeight) {\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n\t\t\tgl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video);\n\t\t\tentry.source = video;\n\t\t\tentry.videoWidth = videoWidth;\n\t\t\tentry.videoHeight = videoHeight;\n\t\t\tentry.videoTime = currentTime;\n\t\t\treturn;\n\t\t}\n\t\tif (entry.videoTime === currentTime) return;\n\t\tgl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, video);\n\t\tentry.videoTime = currentTime;\n\t}\n\t/**\n\t* Pushes user-supplied uniform values into the active program, lazy-caching their\n\t* locations on first encounter. Sampler2D values are uploaded to texture units\n\t* starting at `textureUnitBase` — which is `0` for the no-buffer hot path and\n\t* `this.resources.bufferPasses.length` when buffers are present (so reserved buffer units come first).\n\t*/\n\tapplyCustomUniforms(pass, uniforms, textureUnitBase) {\n\t\tif (!uniforms) return;\n\t\tconst { gl } = this;\n\t\tlet textureUnit = textureUnitBase;\n\t\tfor (const uniformName in uniforms) {\n\t\t\tconst uniformValue = uniforms[uniformName];\n\t\t\tif (!uniformValue) continue;\n\t\t\tlet location = pass.customLocations.get(uniformName);\n\t\t\tif (location === void 0) {\n\t\t\t\tlocation = gl.getUniformLocation(pass.program, uniformName);\n\t\t\t\tpass.customLocations.set(uniformName, location);\n\t\t\t}\n\t\t\tif (uniformValue.type === \"sampler2D\") {\n\t\t\t\tthis.bindTexture(uniformName, uniformValue.value, textureUnit);\n\t\t\t\tif (location !== null) gl.uniform1i(location, textureUnit);\n\t\t\t\ttextureUnit++;\n\t\t\t} else this.setUniform(location, uniformValue);\n\t\t}\n\t}\n\t/**\n\t* Sets every built-in uniform (`u_time`, `u_resolution`, mouse, etc.) for the active\n\t* program. `passWidth` / `passHeight` reflect the dimensions of THIS pass's render\n\t* target — for buffer passes that's `buffer.width × buffer.height`, for the main pass\n\t* it's the canvas size — so `u_resolution` always matches the framebuffer being drawn.\n\t*/\n\tupdatePassBuiltIns(pass, elapsedTime, deltaTime, mouseInput, passWidth, passHeight) {\n\t\tconst { gl, pixelRatio } = this;\n\t\tconst locations = pass.builtInLocations;\n\t\tif (locations[builtInUniforms.time.name] !== null) gl.uniform1f(locations[builtInUniforms.time.name], elapsedTime);\n\t\tif (locations[builtInUniforms.resolution.name] !== null) gl.uniform2f(locations[builtInUniforms.resolution.name], passWidth, passHeight);\n\t\tif (locations[builtInUniforms.deltaTime.name] !== null) gl.uniform1f(locations[builtInUniforms.deltaTime.name], deltaTime);\n\t\tif (locations[builtInUniforms.pixelRatio.name] !== null) gl.uniform1f(locations[builtInUniforms.pixelRatio.name], pixelRatio);\n\t\tif (locations[builtInUniforms.mousePosition.name] !== null) gl.uniform4fv(locations[builtInUniforms.mousePosition.name], mouseInput.position);\n\t\tif (locations[builtInUniforms.mousePointerDown.name] !== null) gl.uniform1f(locations[builtInUniforms.mousePointerDown.name], mouseInput.pointerDown);\n\t\tif (locations[builtInUniforms.mouseHover.name] !== null) gl.uniform1f(locations[builtInUniforms.mouseHover.name], mouseInput.hover);\n\t}\n};\nfunction createStaticArrayBuffer(gl, data) {\n\tconst buffer = gl.createBuffer();\n\tif (!buffer) throw new Error(\"Failed to create buffer\");\n\tgl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n\tgl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\n\treturn buffer;\n}\nfunction bindFullScreenQuadAttribs(gl, program, positionBuffer, texCoordBuffer) {\n\tconst positionLocation = gl.getAttribLocation(program, \"a_position\");\n\tif (positionLocation >= 0) {\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n\t\tgl.enableVertexAttribArray(positionLocation);\n\t\tgl.vertexAttribPointer(positionLocation, 2, gl.FLOAT, false, 0, 0);\n\t}\n\tconst texCoordLocation = gl.getAttribLocation(program, \"a_texCoord\");\n\tif (texCoordLocation >= 0) {\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer);\n\t\tgl.enableVertexAttribArray(texCoordLocation);\n\t\tgl.vertexAttribPointer(texCoordLocation, 2, gl.FLOAT, false, 0, 0);\n\t}\n}\nfunction lookupBuiltInLocations(gl, program) {\n\treturn {\n\t\t[builtInUniforms.time.name]: gl.getUniformLocation(program, builtInUniforms.time.name),\n\t\t[builtInUniforms.resolution.name]: gl.getUniformLocation(program, builtInUniforms.resolution.name),\n\t\t[builtInUniforms.deltaTime.name]: gl.getUniformLocation(program, builtInUniforms.deltaTime.name),\n\t\t[builtInUniforms.pixelRatio.name]: gl.getUniformLocation(program, builtInUniforms.pixelRatio.name),\n\t\t[builtInUniforms.mousePosition.name]: gl.getUniformLocation(program, builtInUniforms.mousePosition.name),\n\t\t[builtInUniforms.mousePointerDown.name]: gl.getUniformLocation(program, builtInUniforms.mousePointerDown.name),\n\t\t[builtInUniforms.mouseHover.name]: gl.getUniformLocation(program, builtInUniforms.mouseHover.name)\n\t};\n}\n/**\n* Creates a buffer-pass texture pre-configured for ping-pong rendering: caller-supplied\n* `filter` (LINEAR for clean upsampling on most formats, NEAREST when the float-linear\n* extension is missing — decided at the call site), CLAMP_TO_EDGE so sampling outside\n* [0,1] returns the edge pixel instead of repeating. Storage is sized later by\n* `allocateBufferPassStorage` once the canvas dimensions are known.\n*/\nfunction createBufferTexture(gl, filter) {\n\tconst texture = gl.createTexture();\n\tif (!texture) throw new Error(\"Failed to create buffer texture\");\n\tgl.bindTexture(gl.TEXTURE_2D, texture);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filter);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filter);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\treturn texture;\n}\n/** Creates a framebuffer with `texture` attached as COLOR_ATTACHMENT0 and returns it. */\nfunction createBufferFramebuffer(gl, texture) {\n\tconst fbo = gl.createFramebuffer();\n\tif (!fbo) throw new Error(\"Failed to create buffer framebuffer\");\n\tgl.bindFramebuffer(gl.FRAMEBUFFER, fbo);\n\tgl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n\treturn fbo;\n}\n/**\n* Throws if the currently-bound framebuffer is not complete. Caller must have called\n* `gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)` immediately prior. The buffer's uniform name +\n* format are included so authors can trace failures back to their config.\n*/\nfunction throwIfFramebufferIncomplete(gl, uniformName, format) {\n\tconst status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n\tif (status !== gl.FRAMEBUFFER_COMPLETE) throw new Error(`Shader buffer \"${uniformName}\" framebuffer is incomplete (format: \"${format}\", status: 0x${status.toString(16)}).`);\n}\n/**\n* Translates a `ShaderBufferFormat` string into the three GL constants `texImage2D`\n* needs (internal storage format, upload format, pixel type). Single source for the\n* mapping — adding a new format means adding one case here, and TypeScript's\n* exhaustiveness check will flag it at every call site if missed.\n*/\nfunction resolveBufferFormatGL(gl, format) {\n\tswitch (format) {\n\t\tcase \"rgba8\": return {\n\t\t\tinternalFormat: gl.RGBA8,\n\t\t\tuploadFormat: gl.RGBA,\n\t\t\tpixelType: gl.UNSIGNED_BYTE\n\t\t};\n\t\tcase \"r8\": return {\n\t\t\tinternalFormat: gl.R8,\n\t\t\tuploadFormat: gl.RED,\n\t\t\tpixelType: gl.UNSIGNED_BYTE\n\t\t};\n\t\tcase \"rg16f\": return {\n\t\t\tinternalFormat: gl.RG16F,\n\t\t\tuploadFormat: gl.RG,\n\t\t\tpixelType: gl.HALF_FLOAT\n\t\t};\n\t\tcase \"rgba16f\": return {\n\t\t\tinternalFormat: gl.RGBA16F,\n\t\t\tuploadFormat: gl.RGBA,\n\t\t\tpixelType: gl.HALF_FLOAT\n\t\t};\n\t\tcase \"rgba32f\": return {\n\t\t\tinternalFormat: gl.RGBA32F,\n\t\t\tuploadFormat: gl.RGBA,\n\t\t\tpixelType: gl.FLOAT\n\t\t};\n\t}\n}\n/**\n* Returns true for formats that need `EXT_color_buffer_float` to be color-renderable\n* (i.e. usable as an FBO color attachment). The 8-bit normalized formats are renderable\n* in the WebGL2 baseline; everything float is gated on the extension.\n*/\nfunction shaderBufferFormatRequiresFloatExt(format) {\n\treturn format === \"rg16f\" || format === \"rgba16f\" || format === \"rgba32f\";\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/uniformName.ts\n/**\n* Naming utilities for shader uniforms. The shader pipeline derives every uniform name\n* from a user-facing key (a propertyControl key, a buffer name, etc.) by applying a\n* stable string transform — keeping those transforms in one module avoids drift between\n* the head generator (`defineShader`) and the renderer's uniform-location lookups.\n*/\nconst heightmapSuffix = \"_heightmap\";\nconst arrayLengthSuffix = \"_length\";\nconst bufferSuffix = \"_buffer\";\n/** Matches any non-word character (anything outside `[A-Za-z0-9_]`). */\nconst nonWordCharPattern = /\\W/gu;\n/** Type guard for strings that already match the `UniformName` template. */\nfunction isUniformName(s) {\n\treturn s.startsWith(\"u_\") && s.length > \"u_\".length;\n}\n/** Returns true for the `u_<name>_heightmap` shape produced by `toHeightmapUniformName`. */\nfunction isHeightmapUniformName(s) {\n\treturn isUniformName(s) && s.endsWith(heightmapSuffix);\n}\n/** Returns true for the `u_<name>_length` shape produced by `toArrayLengthName`. */\nfunction isArrayLengthUniformName(s) {\n\treturn isUniformName(s) && s.endsWith(arrayLengthSuffix);\n}\n/** Returns true for the `u_<name>_buffer` shape produced by `toBufferUniformName`. */\nfunction isBufferUniformName(s) {\n\treturn isUniformName(s) && s.endsWith(\"_buffer\");\n}\n/**\n* Replaces non-word chars in `key` with `_` so the result is safe to embed in a uniform name.\n* e.g. `foo-bar` → `foo_bar`, `foo bar` → `foo_bar`. Word chars (letters, digits, underscores)\n* pass through unchanged.\n*/\nfunction sanitizeUniformKey(key) {\n\treturn key.replace(nonWordCharPattern, \"_\");\n}\n/** Converts a control prop key to a valid uniform name. e.g. `fooBar` → `u_fooBar` */\nfunction toUniformName(key) {\n\treturn `${\"u_\"}${sanitizeUniformKey(key)}`;\n}\n/** Appends `_length` to a uniform name. e.g. `u_fooBar` → `u_fooBar_length` */\nfunction toArrayLengthName(uniformName) {\n\treturn `${uniformName}${arrayLengthSuffix}`;\n}\n/** Converts a control prop key to a heightmap uniform name. e.g. `logo` → `u_logo_heightmap` */\nfunction toHeightmapUniformName(key) {\n\treturn `${\"u_\"}${sanitizeUniformKey(key)}${heightmapSuffix}`;\n}\n/** Converts a buffer name to its sampler uniform. e.g. `trail` → `u_trail_buffer` */\nfunction toBufferUniformName(key) {\n\treturn `${\"u_\"}${sanitizeUniformKey(key)}${bufferSuffix}`;\n}\n/** Converts a control prop key to a valid array max length name. e.g. `fooBar` → `NUM_FOO_BAR` */\nfunction toArrayMaxLengthName(key) {\n\treturn `NUM_${sanitizeUniformKey(key).replace(/[a-z0-9](?=[A-Z])/gu, \"$&_\").toUpperCase()}`;\n}\n\n//#endregion\n//#region ../../library/src/modules/defineShader.ts\n/**\n* Maps scalar property control types to their corresponding GLSL uniform type declarations.\n*/\nfunction controlTypeToGLSLType(controlType) {\n\tswitch (controlType) {\n\t\tcase \"number\":\n\t\tcase \"enum\": return \"float\";\n\t\tcase \"boolean\": return \"float\";\n\t\tcase \"color\": return \"vec4\";\n\t\tcase \"responsiveimage\":\n\t\tcase \"file\": return \"sampler2D\";\n\t\tdefault: assertNever$1(controlType);\n\t}\n}\n/**\n* GLSL ES 3.0 version directive required by WebGL2.\n* Must be the first line in the shader source.\n*/\nconst glslVersionDirective = \"#version 300 es\";\n/**\n* Sets the default precision for float operations to highp (high precision).\n* Required in fragment shaders since GLSL ES has no default float precision.\n*/\nconst glslPrecisionDirective = \"precision highp float;\";\n/**\n* UV coordinates input from the vertex shader.\n* Provided as a varying from the default fullscreen quad vertex shader,\n* ranging from (0,0) at bottom-left to (1,1) at top-right.\n*/\nconst glslUVInput = \"in vec2 v_uv;\";\n/**\n* Fragment color output variable.\n* The final RGBA color written to the framebuffer for this fragment.\n*/\nconst glslFragColorOutput = \"out vec4 fragColor;\";\n/**\n* Generates the complete shader head that gets prepended to user-provided fragment code.\n* The same head is generated for every pass (main and buffers) — same `propertyControls`,\n* same built-ins, same cross-buffer samplers (`u_<bufferName>_buffer`). For self-feedback\n* inside a buffer's own pass, sample its own name (`u_<thisBufferName>_buffer`) — the\n* renderer pins the prior-frame texture to that buffer's reserved unit during its own draw.\n*/\nfunction generateShaderHead(options = {}) {\n\tconst { propertyControls, heightmapSource, bufferNames } = options;\n\tconst lines = [\n\t\tglslVersionDirective,\n\t\tglslPrecisionDirective,\n\t\t\"\",\n\t\tglslUVInput,\n\t\tglslFragColorOutput\n\t];\n\tconst values = propertyControls ? Object.values(propertyControls) : [];\n\tif (values.length > 0) {\n\t\tif (values.some((control) => control?.type === \"array\")) {\n\t\t\tlines.push(\"\");\n\t\t\tfor (const key in propertyControls) {\n\t\t\t\tconst control = propertyControls[key];\n\t\t\t\tif (!control || control.type !== \"array\") continue;\n\t\t\t\tif (control.control?.type !== \"color\") throw new Error(`Shader array control \"${key}\" is not supported. Only color arrays may be defined.`);\n\t\t\t\tif (!isNumber(control.maxCount)) throw new Error(`Shader array control \"${key}\" must have a maxCount.`);\n\t\t\t\tlines.push(`#define ${toArrayMaxLengthName(key)} ${control.maxCount}`);\n\t\t\t}\n\t\t}\n\t\tlines.push(\"\");\n\t\tfor (const key in propertyControls) {\n\t\t\tconst control = propertyControls[key];\n\t\t\tif (!control) continue;\n\t\t\tif (control.type === \"array\") {\n\t\t\t\tconst name = toUniformName(key);\n\t\t\t\tlines.push(`uniform vec4 ${name}[${toArrayMaxLengthName(key)}];`);\n\t\t\t\tlines.push(`uniform int ${toArrayLengthName(name)};`);\n\t\t\t} else {\n\t\t\t\tconst glslType = controlTypeToGLSLType(control.type);\n\t\t\t\tlines.push(`uniform ${glslType} ${toUniformName(key)};`);\n\t\t\t}\n\t\t}\n\t}\n\tif (heightmapSource) lines.push(`uniform sampler2D ${toHeightmapUniformName(heightmapSource)};`);\n\tif (bufferNames && bufferNames.length > 0) {\n\t\tlines.push(\"\");\n\t\tfor (const name of bufferNames) lines.push(`uniform sampler2D ${toBufferUniformName(name)};`);\n\t}\n\tlines.push(\"\");\n\tfor (const uniform of Object.values(builtInUniforms)) lines.push(`uniform ${uniform.glslType} ${uniform.name};`);\n\tlines.push(\"\");\n\treturn lines.join(\"\\n\");\n}\n/**\n* Prepares a complete fragment shader by prepending the auto-generated head and the\n* optional shared `common` GLSL section to the user-provided fragment code. The order\n* is `head + common + fragment`, so authors can call into helpers declared in `common`\n* from `void main()` and still see all uniforms in scope inside `common`.\n*/\nfunction prepareFragmentShader(fragment, common, options = {}) {\n\tconst head = generateShaderHead(options);\n\tif (!common) return head + fragment;\n\treturn `${head}${common}\\n${fragment}`;\n}\nconst defaultBufferResolutionScale = .5;\nconst defaultBufferFormat = \"rgba8\";\n/**\n* Resolves user `ShaderBufferConfig` inputs into the post-prep `BufferDescriptor` shape:\n* derives `uniformName`, prepends the auto-generated head to each fragment, and applies\n* defaults for `resolutionScale`/`format`.\n*/\nfunction resolveBufferDescriptors(buffers, common, headOptions) {\n\tif (!buffers) return void 0;\n\treturn buffers.map((buffer) => ({\n\t\tuniformName: toBufferUniformName(buffer.name),\n\t\tfragment: prepareFragmentShader(buffer.fragment, common, headOptions),\n\t\tresolutionScale: buffer.resolutionScale ?? defaultBufferResolutionScale,\n\t\tformat: buffer.format ?? defaultBufferFormat\n\t}));\n}\n/**\n* String constant used to brand objects created by defineShader.\n* We use a string instead of Symbol.for() to avoid side effects that\n* would prevent tree-shaking in published site bundles.\n*/\nconst shaderConfigBrand = \"__framer_shaderConfig__\";\n/**\n* Checks if an object is a valid (post-prep) shader configuration.\n* @param obj - The object to check\n* @returns True if the object is a valid shader configuration, false otherwise\n* @internal\n*/\nfunction isShaderConfig(obj) {\n\treturn isObject$1(obj) && shaderConfigBrand in obj;\n}\nconst shaderControlTypes = {\n\t[\"number\"]: true,\n\t[\"boolean\"]: true,\n\t[\"color\"]: true,\n\t[\"responsiveimage\"]: true,\n\t[\"file\"]: true,\n\t[\"enum\"]: true,\n\t[\"array\"]: true\n};\n/**\n* Defines a shader module with a fragment shader, controls, and other shader configuration options.\n*\n* The fragment shader only needs to contain the main() function and any custom\n* helper functions. The following boilerplate is automatically prepended:\n* - Version declaration (#version 300 es)\n* - Precision qualifier (precision highp float)\n* - Input/output declarations (in vec2 v_uv, out vec4 fragColor)\n* - Uniform declarations derived from propertyControls (`u_<key>`)\n* - Built-in uniforms, always available: `u_time` (seconds, float), `u_deltaTime` (seconds\n*   since the last frame, float), `u_resolution` (canvas size in physical pixels, vec2), and\n*   `u_pixelRatio` (float). The mouse uniforms documented on the `mouse` field only carry\n*   values when that field is set.\n*\n* @param shaderConfig - Shader configuration\n* @returns The shader definition with the prepared fragment shader\n*\n* @example\n* ```typescript\n* import { defineShader, ControlType } from \"framer\"\n*\n* export default defineShader({\n*     fragment: `\n*         void main() {\n*             vec2 uv = v_uv * u_speed;\n*             fragColor = vec4(uv, sin(u_time), 1.0);\n*         }\n*     `,\n*     propertyControls: {\n*         speed: { type: ControlType.Number, defaultValue: 0.5, min: 0, max: 5 },\n*     },\n* })\n* ```\n* @public\n*/\nfunction defineShader(shaderConfig) {\n\tvalidateShaderInputs(shaderConfig);\n\tconst bufferNames = shaderConfig.buffers ? shaderConfig.buffers.map((b) => b.name) : void 0;\n\tconst preparedMainFragment = prepareFragmentShader(shaderConfig.fragment, shaderConfig.common, {\n\t\tpropertyControls: shaderConfig.propertyControls,\n\t\theightmapSource: shaderConfig.heightmapSource,\n\t\tbufferNames\n\t});\n\tconst resolvedBuffers = resolveBufferDescriptors(shaderConfig.buffers, shaderConfig.common, {\n\t\tpropertyControls: shaderConfig.propertyControls,\n\t\theightmapSource: shaderConfig.heightmapSource,\n\t\tbufferNames\n\t});\n\treturn {\n\t\t...shaderConfig,\n\t\tfragment: preparedMainFragment,\n\t\tbuffers: resolvedBuffers,\n\t\t[shaderConfigBrand]: true\n\t};\n}\nfunction validateShaderInputs(shaderConfig) {\n\tconst seenDerivedNames = /* @__PURE__ */ new Map();\n\tif (shaderConfig.propertyControls) for (const key in shaderConfig.propertyControls) {\n\t\tif (isUniformName(key) || key === \"u_\") throw new Error(`Property control key \"${key}\" must not start with \"${\"u_\"}\".`);\n\t\tconst derivedName = toUniformName(key);\n\t\tif (isHeightmapUniformName(derivedName)) throw new Error(`Property control key \"${key}\" must not end with \"_heightmap\".`);\n\t\tif (isArrayLengthUniformName(derivedName)) throw new Error(`Property control key \"${key}\" must not end with \"_length\".`);\n\t\tif (isBufferUniformName(derivedName)) throw new Error(`Property control key \"${key}\" must not end with \"_buffer\".`);\n\t\tconst collidingKey = seenDerivedNames.get(derivedName);\n\t\tif (collidingKey !== void 0) throw new Error(`Property control keys \"${collidingKey}\" and \"${key}\" both resolve to the same uniform \"${derivedName}\".`);\n\t\tseenDerivedNames.set(derivedName, key);\n\t}\n\tif (shaderConfig.heightmapSource) {\n\t\tconst control = shaderConfig.propertyControls?.[shaderConfig.heightmapSource];\n\t\tif (!control || control.type !== \"responsiveimage\") throw new Error(`heightmapSource \"${shaderConfig.heightmapSource}\" must reference a ResponsiveImage property control.`);\n\t}\n\tif (shaderConfig.buffers) for (const buffer of shaderConfig.buffers) {\n\t\tif (isUniformName(buffer.name)) throw new Error(`Shader buffer name \"${buffer.name}\" must not start with \"${\"u_\"}\".`);\n\t\tconst derivedName = toBufferUniformName(buffer.name);\n\t\tconst collidingName = seenDerivedNames.get(derivedName);\n\t\tif (collidingName !== void 0) throw new Error(collidingName === buffer.name ? `Duplicate shader buffer name \"${buffer.name}\".` : `Shader buffer names \"${collidingName}\" and \"${buffer.name}\" both resolve to the same uniform \"${derivedName}\".`);\n\t\tseenDerivedNames.set(derivedName, buffer.name);\n\t\tif (buffer.resolutionScale !== void 0) {\n\t\t\tif (!isNumber(buffer.resolutionScale) || buffer.resolutionScale <= 0 || buffer.resolutionScale > 1) throw new Error(`Shader buffer \"${buffer.name}\" has invalid resolutionScale ${buffer.resolutionScale}. Must be in the range (0, 1].`);\n\t\t}\n\t\tif (buffer.format !== void 0 && !shaderBufferFormats.has(buffer.format)) throw new Error(`Shader buffer \"${buffer.name}\" has invalid format \"${buffer.format}\". Must be one of: ${[...shaderBufferFormats].join(\", \")}.`);\n\t}\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/ShaderFallbackImage.tsx\nconst ShaderFallbackImage = /* @__PURE__ */ memo$1(function ShaderFallbackImage({ src }) {\n\tif (!src) return null;\n\treturn /* @__PURE__ */ jsx(BackgroundImageComponent, {\n\t\timage: {\n\t\t\tsrc,\n\t\t\tfit: \"fill\",\n\t\t\tloading: \"lazy\"\n\t\t},\n\t\tdraggable: false,\n\t\talt: \"\"\n\t});\n});\n\n//#endregion\n//#region ../../library/src/render/utils/parseCSSVariable.ts\n/**\n* Since the token metadata can contain `(` and `)` if the shared color name or\n* package contain them, we can't use a regex to just find the contents within\n* the parentheses. This function counts up and down as opening and closing\n* parentheses are encountered, returning the result when the first encountered\n* parenthesis is finally closed, excluding the leading and trailing\n* parentheses. Splitting by the first encountered comma, to return the custom\n* property reference, and the fallback value if provided.\n*/\nfunction parseCSSVarRange(input, from = 0) {\n\tconst varIndex = input.indexOf(\"var(\", from);\n\tif (varIndex === -1) return null;\n\tconst start = varIndex + 4;\n\tlet parens = 1;\n\tlet commaIndex;\n\tfor (let index = start; index < input.length; index++) if (input[index] === \"(\") parens++;\n\telse if (input[index] === \")\") {\n\t\tparens--;\n\t\tif (parens === 0) return {\n\t\t\tstart: varIndex,\n\t\t\tend: index + 1,\n\t\t\tcommaIndex\n\t\t};\n\t} else if (commaIndex === void 0 && input[index] === \",\") commaIndex = index;\n\treturn null;\n}\nfunction tokenFromVarRange(string, range) {\n\tif (!range) return {};\n\tconst { start, end, commaIndex } = range;\n\tconst metadata = string.substring(end).trim();\n\tif (!commaIndex) return {\n\t\tcustomProperty: string.substring(start + 4, end - 1),\n\t\tmetadata\n\t};\n\treturn {\n\t\tcustomProperty: string.substring(start + 4, commaIndex),\n\t\tfallback: string.substring(commaIndex + 1, end - 1).trim(),\n\t\tmetadata\n\t};\n}\nfunction parseCSSVariable$1(token) {\n\treturn tokenFromVarRange(token, parseCSSVarRange(token));\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/shaderTextureCache.ts\n/** Maximum URL-keyed entries in `load`'s store before FIFO eviction. */\nconst maxLoadedTextures = 30;\n/** Maximum derived-texture entries in `generate`'s store before FIFO eviction. */\nconst maxGeneratedTextures = 20;\n/**\n* Shared cache for textures resolved through the shader uniform pipeline.\n*\n* Two stores, separated by source semantics and memory profile:\n*\n* - `load(key, factory)`: async sources (URL-loaded images). Caches the in-flight\n*   promise so concurrent first loads dedupe to a single network/decode pass.\n*   Rejections are evicted so a retry can succeed. FIFO-evicted past\n*   `maxLoadedTextures` — entries are cheap (raster `HTMLImageElement`s share\n*   their decoded bytes with the browser image cache), but rasterized SVG\n*   canvases can reach 4096px on the longest side, so the cap matters.\n*\n* - `generate(key, factory)`: synchronously derived textures (heightmaps and\n*   future synthetics). FIFO-evicted past when limit is exceeded; each entry is\n*   a source-image-sized canvas and is usually the heaviest thing in the cache.\n*\n* Identity is the whole point: returning the same `HTMLImageElement` /\n* `HTMLCanvasElement` across renders lets `WebGL2ShaderRenderer.bindTexture`'s\n* reference-equality guard skip the GPU upload on drag-induced rerenders.\n*\n* @internal\n*/\nvar ShaderTextureCache = class {\n\tloaders = /* @__PURE__ */ new Map();\n\tgenerated = /* @__PURE__ */ new Map();\n\tload(key, factory) {\n\t\tconst cached = this.loaders.get(key);\n\t\tif (cached) return cached;\n\t\tconst promise = factory();\n\t\tpromise.catch(() => {\n\t\t\tif (this.loaders.get(key) === promise) this.loaders.delete(key);\n\t\t});\n\t\tevictOldestIfFull(this.loaders, 30);\n\t\tthis.loaders.set(key, promise);\n\t\treturn promise;\n\t}\n\tgenerate(key, factory) {\n\t\tconst cached = this.generated.get(key);\n\t\tif (cached) return cached;\n\t\tconst created = factory();\n\t\tif (!created) return void 0;\n\t\tevictOldestIfFull(this.generated, 20);\n\t\tthis.generated.set(key, created);\n\t\treturn created;\n\t}\n\tclear() {\n\t\tthis.loaders.clear();\n\t\tthis.generated.clear();\n\t}\n\t/** @internal Exposed for testing. */\n\tget loadedSize() {\n\t\treturn this.loaders.size;\n\t}\n\t/** @internal Exposed for testing. */\n\tget generatedSize() {\n\t\treturn this.generated.size;\n\t}\n};\nfunction evictOldestIfFull(map, max) {\n\tif (map.size < max) return;\n\tconst oldest = map.keys().next().value;\n\tif (oldest !== void 0) map.delete(oldest);\n}\nconst shaderTextureCache = /* @__PURE__ */ new ShaderTextureCache();\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/heightmap.ts\n/**\n* Heightmap generation for shader modules.\n*\n* Generates a three-channel texture from a transparent image:\n* - Red:   normalized Poisson field (0 at boundary, 255 at deepest center)\n* - Green: inverted alpha from the original image (255 = outside/transparent, 0 = inside/opaque)\n* - Blue:  hard binary shape mask (255 = inside, 0 = outside) — no anti-aliasing\n*\n* The blue channel exists because bilinear texture filtering at the shape boundary\n* blends inside texels (r=depth, g=0) with outside texels (r=0, g=255), producing\n* pixels where both R and G are non-zero simultaneously. Shaders can threshold B\n* (e.g. `step(0.5, hm.b)`) to get a clean inside/outside decision for masking.\n*\n* Pipeline: scale to 1024 working res (short edge) → binary mask →\n* 8-connected boundary detection → Poisson solve → write R+G+B at working res → upscale.\n* Working resolution scales by the short edge (1024px min) so wide/tall images get\n* more detail. SVGs arrive pre-rasterized at 4096px from loadTexture.\n* The Poisson solver produces smooth harmonic gradients naturally tolerant to noise.\n* Results are cached via `shaderTextureCache` when the caller provides a cache key.\n*/\nconst scaledDownWorkingResolution = 1024;\n/**\n* Generates a heightmap texture from a source image with transparency.\n* Returns a canvas usable directly as a WebGL texture source.\n*\n* The caller provides cache identity via `getCacheKey` (e.g. URL, data\n* attribute) — passing `undefined` skips caching entirely.\n*/\nfunction generateHeightmap(image, getCacheKey) {\n\tif (!isHeightMapSupportedTexImageSource(image)) return;\n\tconst cacheKey = getCacheKey?.();\n\tif (!cacheKey) return buildHeightmap(image);\n\tconst cached = shaderTextureCache.generate(cacheKey, () => buildHeightmap(image));\n\tif (!(cached instanceof HTMLCanvasElement)) return void 0;\n\treturn cached;\n}\nfunction buildHeightmap(image) {\n\tconst info = getImageInfo(image);\n\tif (!info) return void 0;\n\tlet scale = scaledDownWorkingResolution / Math.min(info.width, info.height);\n\tconst maxPixelCount = scaledDownWorkingResolution * scaledDownWorkingResolution;\n\tconst uncappedPixels = info.width * scale * (info.height * scale);\n\tif (uncappedPixels > maxPixelCount) scale *= Math.sqrt(maxPixelCount / uncappedPixels);\n\tconst width = Math.max(1, Math.round(info.width * scale));\n\tconst height = Math.max(1, Math.round(info.height * scale));\n\tconst srcCanvas = document.createElement(\"canvas\");\n\tsrcCanvas.width = width;\n\tsrcCanvas.height = height;\n\tconst srcCtx = srcCanvas.getContext(\"2d\");\n\tif (!srcCtx) return void 0;\n\tsrcCtx.drawImage(info.source, 0, 0, width, height);\n\tconst pixels = srcCtx.getImageData(0, 0, width, height).data;\n\tconst size = width * height;\n\tconst mask = new Uint8Array(size);\n\tfor (let i = 0; i < size; i++) mask[i] = (pixels[i * 4 + 3] ?? 0) > 0 ? 1 : 0;\n\tconst interior = new Uint8Array(size);\n\tfor (let i = 0; i < size; i++) {\n\t\tif (mask[i] === 0) continue;\n\t\tconst x = i % width;\n\t\tconst y = Math.floor(i / width);\n\t\tif (x === 0 || x === width - 1 || y === 0 || y === height - 1) continue;\n\t\tlet isBoundary = false;\n\t\tfor (let dy = -1; dy <= 1 && !isBoundary; dy++) for (let dx = -1; dx <= 1 && !isBoundary; dx++) {\n\t\t\tif (dx === 0 && dy === 0) continue;\n\t\t\tif (mask[(y + dy) * width + (x + dx)] === 0) isBoundary = true;\n\t\t}\n\t\tif (!isBoundary) interior[i] = 1;\n\t}\n\tconst field = solvePoissonField(interior, width, height);\n\tlet maxVal = 0;\n\tfor (let i = 0; i < size; i++) {\n\t\tconst v = field[i] ?? 0;\n\t\tif (v > maxVal) maxVal = v;\n\t}\n\tconst lowResCanvas = document.createElement(\"canvas\");\n\tlowResCanvas.width = width;\n\tlowResCanvas.height = height;\n\tconst lowResCtx = lowResCanvas.getContext(\"2d\");\n\tif (!lowResCtx) return void 0;\n\tconst outData = lowResCtx.createImageData(width, height);\n\tfor (let i = 0; i < size; i++) {\n\t\tconst normalized = maxVal > 0 ? (field[i] ?? 0) / maxVal : 0;\n\t\toutData.data[i * 4] = Math.round(normalized * 255);\n\t\toutData.data[i * 4 + 1] = 255 - (pixels[i * 4 + 3] ?? 0);\n\t\toutData.data[i * 4 + 2] = mask[i] ? 255 : 0;\n\t\toutData.data[i * 4 + 3] = 255;\n\t}\n\tlowResCtx.putImageData(outData, 0, 0);\n\tconst outCanvas = document.createElement(\"canvas\");\n\toutCanvas.width = info.width;\n\toutCanvas.height = info.height;\n\tconst outCtx = outCanvas.getContext(\"2d\");\n\tif (!outCtx) return void 0;\n\toutCtx.imageSmoothingEnabled = true;\n\toutCtx.drawImage(lowResCanvas, 0, 0, info.width, info.height);\n\treturn outCanvas;\n}\n/**\n* Solves a Poisson equation over interior shape pixels using Red-Black\n* Successive Over-Relaxation (SOR). Produces a smooth harmonic field\n* that peaks at the deepest interior and falls to 0 at boundaries.\n*\n* Uses a sparse representation — only interior pixels are iterated,\n* with precomputed neighbor indices. For typical logos covering ~30%\n* of the image, this is ~3x faster than iterating the full grid.\n*\n* Parameters:\n* - omega 1.95: near-optimal SOR relaxation for large grids (theoretical\n*   optimum ~1.99 for 1024px). Conservative enough to avoid oscillation.\n* - iterations 50: tuned for 1024px working resolution. SOR convergence\n*   scales with grid dimension; 50 gives full propagation at 1024px.\n* - sourceTerm 0.01: constant driving term. Scale is arbitrary since the\n*   output is normalized to 0-1.\n*\n* @internal Exported for testing.\n*/\nfunction solvePoissonField(interior, width, height) {\n\tconst size = width * height;\n\tconst field = new Float32Array(size);\n\tconst omega = 1.95;\n\tconst sourceTerm = .01;\n\tconst iterations = 50;\n\tconst redEntries = [];\n\tconst blackEntries = [];\n\tfor (let i = 0; i < size; i++) {\n\t\tif (interior[i] === 0) continue;\n\t\tconst x = i % width;\n\t\tconst y = Math.floor(i / width);\n\t\t((x + y) % 2 === 0 ? redEntries : blackEntries).push(i, y > 0 ? i - width : -1, y < height - 1 ? i + width : -1, x > 0 ? i - 1 : -1, x < width - 1 ? i + 1 : -1);\n\t}\n\tconst red = new Int32Array(redEntries);\n\tconst black = new Int32Array(blackEntries);\n\tconst oneMinusOmega = -.95;\n\tconst omegaOver4 = omega / 4;\n\tfor (let iter = 0; iter < iterations; iter++) {\n\t\tupdatePixels(red, field, oneMinusOmega, omegaOver4, sourceTerm);\n\t\tupdatePixels(black, field, oneMinusOmega, omegaOver4, sourceTerm);\n\t}\n\treturn field;\n}\n/** Processes a sparse pixel list (stride 5) for one SOR half-step. */\nfunction updatePixels(pixels, field, oneMinusOmega, omegaOver4, sourceTerm) {\n\tfor (let j = 0; j < pixels.length; j += 5) {\n\t\tconst idx = pixels[j] ?? 0;\n\t\tconst topIdx = pixels[j + 1] ?? -1;\n\t\tconst bottomIdx = pixels[j + 2] ?? -1;\n\t\tconst leftIdx = pixels[j + 3] ?? -1;\n\t\tconst rightIdx = pixels[j + 4] ?? -1;\n\t\tconst top = topIdx >= 0 ? field[topIdx] ?? 0 : 0;\n\t\tconst bottom = bottomIdx >= 0 ? field[bottomIdx] ?? 0 : 0;\n\t\tconst left = leftIdx >= 0 ? field[leftIdx] ?? 0 : 0;\n\t\tconst right = rightIdx >= 0 ? field[rightIdx] ?? 0 : 0;\n\t\tfield[idx] = oneMinusOmega * (field[idx] ?? 0) + omegaOver4 * (sourceTerm + top + bottom + left + right);\n\t}\n}\nfunction getImageInfo(image) {\n\tif (image instanceof HTMLImageElement) {\n\t\tconst w = image.naturalWidth;\n\t\tconst h = image.naturalHeight;\n\t\treturn w > 0 && h > 0 ? {\n\t\t\tsource: image,\n\t\t\twidth: w,\n\t\t\theight: h\n\t\t} : void 0;\n\t}\n\tif (image instanceof HTMLCanvasElement) return image.width > 0 && image.height > 0 ? {\n\t\tsource: image,\n\t\twidth: image.width,\n\t\theight: image.height\n\t} : void 0;\n}\nfunction isHeightMapSupportedTexImageSource(image) {\n\treturn image instanceof HTMLImageElement || image instanceof HTMLCanvasElement;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/videoDecoderPool.ts\n/**\n* Hard ceiling on concurrently-pooled decoders across all owners. Browsers cap live video\n* decoders (~75 in Chrome) and exhaustion stalls silently, so this bounds it well below that:\n* an extra video degrades to its fallback instead of wedging the page. This is NOT an eviction\n* cap — a full pool means that many decoders are genuinely live, so the right move is to refuse\n* the new one, never to tear down another owner's playing decoder.\n*\n* @internal Exported for tests.\n*/\nconst maxPooledVideos = 24;\n/**\n* Stops a shader's videos from restarting whenever you edit an unrelated control. Any control change\n* re-resolves the shader's whole uniform set; without this pool, each re-resolve would build a fresh\n* `<video>` and jump it back to the start. Instead the pool keeps a shader's decoders around and hands\n* the same one back next time. \"Owner\" throughout is one shader instance, identified by its canvas ref.\n*\n* @internal\n*/\nvar VideoDecoderPool = class {\n\tbyOwner = /* @__PURE__ */ new Map();\n\t/**\n\t* Get this shader's decoder for `url` while resolving a video uniform — created and loaded on the\n\t* first request, then the same cached one every time after, so a re-resolve never restarts a playing\n\t* video. Each shader gets its own decoder for a URL: a `<video>` has one playback head, so two\n\t* shaders can't share play/pause/seek. Rejects — and forgets the entry so a later acquire retries —\n\t* if the load fails or the pool is already full.\n\t*/\n\tacquire(owner, url) {\n\t\tlet owned = this.byOwner.get(owner);\n\t\tif (!owned) {\n\t\t\towned = /* @__PURE__ */ new Map();\n\t\t\tthis.byOwner.set(owner, owned);\n\t\t}\n\t\tconst existing = owned.get(url);\n\t\tif (existing) return existing.promise;\n\t\tif (this.size >= 24) return Promise.reject(/* @__PURE__ */ new Error(`Video decoder pool is full (max ${24}); \"${url}\" falls back.`));\n\t\tconst controller = new AbortController();\n\t\tconst promise = loadVideoTexture(url, controller.signal);\n\t\tpromise.catch(() => {\n\t\t\tif (owned.get(url)?.promise === promise) owned.delete(url);\n\t\t});\n\t\towned.set(url, {\n\t\t\tpromise,\n\t\t\tcontroller\n\t\t});\n\t\treturn promise;\n\t}\n\t/**\n\t* After a resolve commits, drop this shader's decoders whose URL isn't in `keepUrls` — e.g. the\n\t* outgoing video after a URL swap. A no-op when the shader has nothing pooled.\n\t*/\n\tkeepOnly(owner, keepUrls) {\n\t\tconst owned = this.byOwner.get(owner);\n\t\tif (!owned) return;\n\t\tfor (const [url, entry] of owned) {\n\t\t\tif (keepUrls.has(url)) continue;\n\t\t\towned.delete(url);\n\t\t\tdispose(entry);\n\t\t}\n\t\tif (owned.size === 0) this.byOwner.delete(owner);\n\t}\n\t/**\n\t* Dispose every decoder this shader holds — on unmount, or when a resolve fails. Decoders must be\n\t* released explicitly; the browser won't free them on garbage collection alone.\n\t*/\n\treleaseAll(owner) {\n\t\tconst owned = this.byOwner.get(owner);\n\t\tif (!owned) return;\n\t\tfor (const entry of owned.values()) dispose(entry);\n\t\tthis.byOwner.delete(owner);\n\t}\n\t/** @internal Exposed for testing. */\n\tget size() {\n\t\tlet total = 0;\n\t\tfor (const owned of this.byOwner.values()) total += owned.size;\n\t\treturn total;\n\t}\n};\n/**\n* Releases a dropped pooled video. Aborting first covers the in-flight case — `loadVideoTexture`'s\n* abort handler tears the `<video>` down immediately, stopping a background buffer. If it already\n* resolved, the abort is a no-op and the settled promise releases the decoder. Either path runs\n* `releaseTextureValue` exactly once.\n*/\nfunction dispose(entry) {\n\tentry.controller.abort();\n\tentry.promise.then(releaseTextureValue, () => {});\n}\nconst videoDecoderPool = /* @__PURE__ */ new VideoDecoderPool();\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/helpers.ts\nconst overlayStyle = {\n\tposition: \"absolute\",\n\tinset: 0,\n\twidth: \"100%\",\n\theight: \"100%\"\n};\n/**\n* Multiplier to convert milliseconds to seconds.\n* Since we use requestAnimationFrame and performance.now(), the base time we receive in callbacks is in milliseconds.\n*/\nconst timeMultiplier = .001;\n/**\n* Sentinel UV coordinate used when the pointer is absent or outside the element.\n*/\nconst offScreen = -999;\n/**\n* Default mouse state representing \"no pointer interaction.\"\n* Non-interactive render paths (offscreen fallback worker, shaders without mouse\n* config) pass this explicitly to `WebGL2ShaderRenderer.render` — avoids the\n* WebGL zero-init trap where `u_mousePosition` would otherwise read as `vec4(0)`\n* (UV origin / bottom-left).\n*/\nconst defaultMouseData = {\n\tposition: [\n\t\toffScreen,\n\t\toffScreen,\n\t\t0,\n\t\t0\n\t],\n\tpointerDown: 0,\n\thover: 0\n};\n/**\n* Resolves a CSS variable string to its computed color value using the DOM.\n* Falls back to the inline fallback value if the custom property is not defined\n* or no element is available. P3 values are converted to sRGB because shaders\n* only work with sRGB color space.\n*/\nfunction resolveCSSVariableColor(color, element) {\n\tconst parsed = parseCSSVariable$1(color);\n\tif (!parsed.customProperty) return color;\n\tif (element) {\n\t\tconst resolved = getComputedStyle(element).getPropertyValue(parsed.customProperty).trim();\n\t\tif (resolved) return P3Color.srgbFromValue(resolved);\n\t}\n\treturn P3Color.srgbFromValue(parsed.fallback ?? color);\n}\n/**\n* Converts a CSS color string to a normalized vec4 array for shader uniforms.\n* RGB values are normalized from 0-255 to 0-1 range.\n*\n* When the color is a CSS variable (e.g. a design token), the element is used\n* to resolve the variable via getComputedStyle before conversion.\n*/\nfunction colorToVec4(color, element) {\n\tconst resolved = resolveCSSVariableColor(color, element);\n\tconst rgba = Color.toRgb(Color(resolved));\n\treturn [\n\t\trgba.r / 255,\n\t\trgba.g / 255,\n\t\trgba.b / 255,\n\t\trgba.a\n\t];\n}\n/**\n* Loads a URL as a WebGL sampler2D source. Images are cached and shared by URL (they're immutable and\n* decoder-less); a video can't be — each is a live decoder with its own playback head — so a live\n* shader's video goes through the per-owner pool, while one-shot fallback generation loads it standalone\n* and frees it itself.\n*\n* SVGs are rasterized at 4096px on the longest side (texture filtering handles the downscaling). We go\n* through an HTMLImageElement rather than createImageBitmap so the browser's native decoding, color\n* management, and premultiplied-alpha handling carry through to `texImage2D`.\n*/\nfunction loadTexture(url, signal, owner) {\n\tif (isVideoSource(url)) {\n\t\tif (!owner) return loadVideoTexture(url, signal);\n\t\tif (signal?.aborted) return Promise.reject(/* @__PURE__ */ new Error(\"Texture load aborted\"));\n\t\treturn abortable(videoDecoderPool.acquire(owner, url), signal);\n\t}\n\treturn abortable(shaderTextureCache.load(url, () => loadTextureFromNetwork(url)), signal);\n}\n/** Rejects the await when `signal` aborts, without cancelling `promise` (the underlying load runs on). */\nfunction abortable(promise, signal) {\n\tif (!signal) return promise;\n\treturn new Promise((resolve, reject) => {\n\t\tconst onAbort = () => reject(/* @__PURE__ */ new Error(\"Texture load aborted\"));\n\t\tif (signal.aborted) {\n\t\t\tonAbort();\n\t\t\treturn;\n\t\t}\n\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t\tpromise.then((value) => {\n\t\t\tsignal.removeEventListener(\"abort\", onAbort);\n\t\t\tresolve(value);\n\t\t}, (error) => {\n\t\t\tsignal.removeEventListener(\"abort\", onAbort);\n\t\t\treject(error);\n\t\t});\n\t});\n}\nconst videoExtensions = [\".mp4\", \".m4v\"];\nfunction isVideoSource(url) {\n\treturn urlHasExtension(url, videoExtensions);\n}\n/**\n* The URL a texture uniform points at, or undefined when there's nothing to load. A File's value is the\n* URL directly; a ResponsiveImage's wraps it in an object. The value can also be absent at runtime — an\n* optional CMS/responsive image whose expression evaluated to undefined — so fall back rather than\n* assume a `.src` (that missing sampler should just go unset, not fail the whole shader's resolve).\n*/\nfunction getTextureUrl(uniform) {\n\tconst { value } = uniform;\n\tif (isString(value)) return value;\n\tif (isObject$1(value) && \"src\" in value) return value.src;\n}\n/**\n* The set of video URLs a uniform set references. Lets the caller tell `videoDecoderPool.keepOnly`\n* which decoders are still needed after a resolution, so swapped-out videos are released.\n*/\nfunction collectVideoUrls(uniforms) {\n\tconst urls = /* @__PURE__ */ new Set();\n\tfor (const uniform of Object.values(uniforms)) if (uniform.type === \"file\" && isVideoSource(uniform.value)) urls.add(uniform.value);\n\treturn urls;\n}\nfunction loadTextureFromNetwork(url) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst img = new Image();\n\t\timg.crossOrigin = \"anonymous\";\n\t\timg.onload = () => resolve(rasterizeSVGAtFixedRes(img) ?? img);\n\t\timg.onerror = (event) => {\n\t\t\tconst message = event instanceof ErrorEvent && event.message ? `Failed to load texture from \"${url}\": ${event.message}` : `Failed to load texture from \"${url}\"`;\n\t\t\treject(new Error(message));\n\t\t};\n\t\timg.src = url;\n\t});\n}\n/**\n* Returns a stable cache key for a texture source.\n* HTMLImageElement uses its src URL. HTMLCanvasElement uses data-src\n* (set during SVG rasterization to preserve the original image URL).\n* @internal Exported for testing.\n*/\nfunction getTextureCacheKey(source) {\n\tif (source instanceof HTMLImageElement) return source.src || void 0;\n\tif (source instanceof HTMLCanvasElement) return source.dataset.src || void 0;\n}\nconst svgExtension = \".svg\";\n/** Fixed high resolution for SVG rasterization. Matches Paper's approach. */\nconst svgRasterSize = 4096;\n/**\n* Re-rasterizes an SVG at a fixed high resolution (4096px on longest side).\n* The browser re-renders the vector source at the target canvas dimensions,\n* producing crisp edges regardless of element size. The GPU handles\n* downscaling via texture filtering (LINEAR_MIPMAP_LINEAR).\n*\n* Returns undefined for non-SVG images.\n*/\nfunction rasterizeSVGAtFixedRes(image) {\n\tif (!isSVGSource(image.src)) return void 0;\n\tconst w = image.naturalWidth;\n\tconst h = image.naturalHeight;\n\tif (w <= 0 || h <= 0) return void 0;\n\tconst scale = svgRasterSize / Math.max(w, h);\n\tconst targetW = Math.max(1, Math.round(w * scale));\n\tconst targetH = Math.max(1, Math.round(h * scale));\n\tconst canvas = document.createElement(\"canvas\");\n\tcanvas.width = targetW;\n\tcanvas.height = targetH;\n\tconst ctx = canvas.getContext(\"2d\");\n\tif (!ctx) return void 0;\n\tctx.drawImage(image, 0, 0, targetW, targetH);\n\tcanvas.dataset.src = image.src;\n\treturn canvas;\n}\n/**\n* Whether a URL's path ends with one of the given extensions. Matches on the parsed\n* pathname (ignoring query/fragment), falling back to a substring check for inputs that\n* don't parse as URLs.\n*/\nfunction urlHasExtension(url, extensions) {\n\ttry {\n\t\tconst pathname = new URL(url, \"https://placeholder\").pathname.toLowerCase();\n\t\treturn extensions.some((extension) => pathname.endsWith(extension));\n\t} catch {\n\t\tconst lower = url.toLowerCase();\n\t\treturn extensions.some((extension) => lower.includes(extension));\n\t}\n}\nfunction isSVGSource(url) {\n\treturn urlHasExtension(url, [svgExtension]);\n}\n/**\n* Resolves a single uniform input to its WebGL-compatible value.\n* Immediate values resolve instantly, textures are loaded from their URL.\n* Color uniforms that contain CSS variables are resolved via the element's computed style.\n*/\nasync function resolveUniform(uniform, element, signal, owner) {\n\tswitch (uniform.type) {\n\t\tcase \"number\":\n\t\tcase \"enum\": return {\n\t\t\ttype: \"float\",\n\t\t\tvalue: uniform.value\n\t\t};\n\t\tcase \"boolean\": return {\n\t\t\ttype: \"boolean\",\n\t\t\tvalue: uniform.value\n\t\t};\n\t\tcase \"color\": return {\n\t\t\ttype: \"vec4\",\n\t\t\tvalue: colorToVec4(uniform.value, element)\n\t\t};\n\t\tcase \"responsiveimage\":\n\t\tcase \"file\": {\n\t\t\tconst url = getTextureUrl(uniform);\n\t\t\tif (!url) return;\n\t\t\treturn {\n\t\t\t\ttype: \"sampler2D\",\n\t\t\t\tvalue: await loadTexture(url, signal, owner)\n\t\t\t};\n\t\t}\n\t\tcase \"array\": return {\n\t\t\ttype: \"vec4[]\",\n\t\t\tvalue: uniform.value.map((color) => colorToVec4(color, element))\n\t\t};\n\t\tdefault: assertNever$1(uniform);\n\t}\n}\n/**\n* Resolves all uniform inputs to WebGL-compatible values. Adds `u_<key>_length` for arrays.\n*\n* `canvasRef` plays two roles, both tied to the shader's canvas: its element resolves CSS-variable\n* (design-token) colors via `getComputedStyle`, and the ref itself is the video-pool owner. Omit it\n* for one-shot, headless resolves (e.g. fallback-image generation) — colors fall back to inline\n* values and videos load standalone.\n*\n* When `heightmapSource` is set, also generates a heightmap texture from the referenced\n* image uniform and adds it as `u_<key>_heightmap`.\n*/\nasync function resolveUniforms(uniforms, canvasRef, heightmapSource, signal) {\n\tconst result = {};\n\tconst heightmapSourceUniform = heightmapSource ? toUniformName(heightmapSource) : void 0;\n\tconst element = canvasRef?.current ?? null;\n\ttry {\n\t\tfor (const [name, uniform] of Object.entries(uniforms)) {\n\t\t\tconst resolved = await resolveUniform(uniform, element, signal, canvasRef);\n\t\t\tif (!resolved) continue;\n\t\t\tresult[name] = resolved;\n\t\t\tif (uniform.type === \"array\") result[toArrayLengthName(name)] = {\n\t\t\t\ttype: \"int\",\n\t\t\t\tvalue: uniform.value.length\n\t\t\t};\n\t\t\tif (heightmapSource && heightmapSourceUniform && name === heightmapSourceUniform && resolved.type === \"sampler2D\") {\n\t\t\t\tconst heightmap = generateHeightmap(resolved.value, () => getTextureCacheKey(resolved.value));\n\t\t\t\tif (heightmap) result[toHeightmapUniformName(heightmapSource)] = {\n\t\t\t\t\ttype: \"sampler2D\",\n\t\t\t\t\tvalue: heightmap\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tif (!canvasRef) releaseTextureUniforms(result);\n\t\tthrow error;\n\t}\n\treturn result;\n}\nfunction resolveResolutionScale(scale) {\n\tif (typeof scale === \"number\") return scale;\n\tif (scale === \"performance\") return .75;\n\tif (scale === \"consistent\") return 0;\n\treturn 1;\n}\n/**\n* Calculates shader timing values from a raw millisecond timestamp.\n*/\nfunction getShaderTiming(timeMs, startTime, lastTime) {\n\tconst currentTime = timeMs * timeMultiplier;\n\treturn {\n\t\tcurrentTime,\n\t\telapsedTime: currentTime - startTime,\n\t\tdeltaTime: lastTime === startTime ? 1 / 60 : currentTime - lastTime\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/ShaderSandboxFallbackImage.tsx\nconst sandboxFallbackImageStyle = {\n\tdisplay: \"block\",\n\twidth: \"100%\",\n\theight: \"100%\",\n\tobjectFit: \"cover\",\n\tposition: \"absolute\",\n\tinset: 0\n};\nconst sandboxFallbackContainerStyle = {\n\tposition: \"absolute\",\n\tinset: 0\n};\nconst ShaderSandboxFallbackImage = /* @__PURE__ */ memo$1(function ShaderSandboxFallbackImage({ src, hidden = false, onDisplaySrcChange }) {\n\tconst [displaySrc, setDisplaySrc] = useState(src);\n\tconst [previousSrc, setPreviousSrc] = useState(void 0);\n\tconst [prevDisplaySrc, setPrevDisplaySrc] = useState(displaySrc);\n\tconst fadeRef = useRef(null);\n\tif (displaySrc !== prevDisplaySrc) {\n\t\tsetPreviousSrc(prevDisplaySrc);\n\t\tsetPrevDisplaySrc(displaySrc);\n\t}\n\tconst onDisplaySrcChangeRef = useRef(onDisplaySrcChange);\n\tuseLayoutEffect(() => {\n\t\tonDisplaySrcChangeRef.current = onDisplaySrcChange;\n\t}, [onDisplaySrcChange]);\n\tconst isInitialMountRef = useRef(true);\n\tuseLayoutEffect(() => {\n\t\tif (isInitialMountRef.current) {\n\t\t\tisInitialMountRef.current = false;\n\t\t\treturn;\n\t\t}\n\t\tif (!previousSrc) onDisplaySrcChangeRef.current?.();\n\t}, [displaySrc]);\n\tuseEffect(() => {\n\t\tif (src === displaySrc) return;\n\t\tlet isActive = true;\n\t\tif (src) {\n\t\t\tconst img = new Image();\n\t\t\timg.src = src;\n\t\t\tconst setSrc = () => isActive ? startTransition(() => setDisplaySrc(src)) : void 0;\n\t\t\tif (typeof img.decode === \"function\") img.decode().then(setSrc).catch(setSrc);\n\t\t\telse img.onload = setSrc;\n\t\t} else startTransition(() => setDisplaySrc(void 0));\n\t\treturn () => {\n\t\t\tisActive = false;\n\t\t};\n\t}, [src, displaySrc]);\n\tuseEffect(() => {\n\t\tconst el = fadeRef.current;\n\t\tif (!el || !previousSrc) return;\n\t\tlet cancelled = false;\n\t\tconst animation = el.animate([{ opacity: 0 }, { opacity: 1 }], {\n\t\t\tduration: 300,\n\t\t\teasing: \"ease-in-out\",\n\t\t\tfill: \"forwards\"\n\t\t});\n\t\tanimation.onfinish = () => {\n\t\t\tif (!cancelled) {\n\t\t\t\tstartTransition(() => setPreviousSrc(void 0));\n\t\t\t\tonDisplaySrcChangeRef.current?.();\n\t\t\t}\n\t\t};\n\t\treturn () => {\n\t\t\tcancelled = true;\n\t\t\tanimation.cancel();\n\t\t};\n\t}, [previousSrc]);\n\tif (!displaySrc) return null;\n\tconst containerStyle = {\n\t\t...overlayStyle,\n\t\topacity: hidden ? 0 : 1,\n\t\tpointerEvents: hidden ? \"none\" : void 0\n\t};\n\treturn /* @__PURE__ */ jsxs(\"div\", {\n\t\tstyle: containerStyle,\n\t\tchildren: [previousSrc && /* @__PURE__ */ jsx(\"img\", {\n\t\t\tsrc: previousSrc,\n\t\t\tdecoding: \"async\",\n\t\t\tstyle: sandboxFallbackImageStyle,\n\t\t\tdraggable: false,\n\t\t\talt: \"\"\n\t\t}, `prev-${previousSrc}`), /* @__PURE__ */ jsx(\"div\", {\n\t\t\tref: previousSrc ? fadeRef : void 0,\n\t\t\tstyle: sandboxFallbackContainerStyle,\n\t\t\tchildren: /* @__PURE__ */ jsx(\"img\", {\n\t\t\t\tsrc: displaySrc,\n\t\t\t\tstyle: sandboxFallbackImageStyle,\n\t\t\t\tdecoding: \"async\",\n\t\t\t\tdraggable: false,\n\t\t\t\talt: \"\"\n\t\t\t})\n\t\t}, displaySrc)]\n\t});\n});\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/defaultShaders.ts\n/**\n* Default vertex shader - fullscreen quad with UV coordinates passed to fragment shader.\n* This is the standard vertex shader for most 2D shader effects.\n*/\nconst DEFAULT_VERTEX_SHADER = `#version 300 es\nprecision highp float;\n\nin vec2 a_position;\nin vec2 a_texCoord;\n\nout vec2 v_uv;\n\nvoid main() {\n    v_uv = a_texCoord;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n}\n`;\n/**\n* Default fragment shader - transparent output.\n*/\nconst DEFAULT_FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nin vec2 v_uv;\nout vec4 fragColor;\n\nvoid main() {\n    fragColor = vec4(0.0);\n}\n`;\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/ShaderPoolContext.ts\nconst slotStatus = {\n\t/** No WebGL context slot allocated — show fallback image. */\n\tnoSlot: 0,\n\t/** Slot allocated, render a single frame at t=0 and re-render on change. */\n\tsingleFrame: 1,\n\t/** Slot allocated, run continuous rAF animation. */\n\tanimate: 2\n};\n/**\n* Context for the shader pool system. When present (canvas), shaders register\n* with the pool and rendering is managed by slot allocation. When null\n* (published sites), shaders render normally without pool management.\n*/\nconst ShaderPoolContext = /* @__PURE__ */ createContext(null);\nfunction useShaderPoolContext() {\n\treturn useContext(ShaderPoolContext);\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/useStableUniforms.ts\n/**\n* Returns a reference-stable view of `uniforms`: the same object identity is kept across renders\n* until a uniform value actually changes. The parent (`ShaderNodeRenderer`) rebuilds the uniforms\n* object every render, so this lets downstream effects key on identity and skip redundant\n* re-resolution on renders that didn't change a value.\n*/\nfunction useStableUniforms(uniforms) {\n\tconst ref = useRef(uniforms);\n\tif (!isEqual(ref.current, uniforms)) ref.current = uniforms;\n\treturn ref.current;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/hooks.ts\n/**\n* Resolves uniform inputs to WebGL-compatible values.\n* All uniform types go through the same resolution path.\n* Color uniforms that contain CSS variables are resolved via the element's computed style.\n*/\nfunction useResolvedUniforms(uniforms, canvasRef, heightmapSource, onUniformResolutionSucceeded, onUniformResolutionFailed) {\n\tconst [resolvedUniforms, setResolvedUniforms] = useState({});\n\tconst [haveUniformsResolved, setHaveUniformsResolved] = useState(uniforms === void 0);\n\tconst stableUniforms = useStableUniforms(uniforms);\n\tuseEffect(() => () => videoDecoderPool.releaseAll(canvasRef), [canvasRef]);\n\tuseEffect(() => {\n\t\tif (!stableUniforms) {\n\t\t\tvideoDecoderPool.releaseAll(canvasRef);\n\t\t\tstartTransition(() => {\n\t\t\t\tsetResolvedUniforms({});\n\t\t\t\tsetHaveUniformsResolved(true);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst controller = new AbortController();\n\t\tresolveUniforms(stableUniforms, canvasRef, heightmapSource, controller.signal).then((resolved) => {\n\t\t\tif (controller.signal.aborted) return;\n\t\t\tvideoDecoderPool.keepOnly(canvasRef, collectVideoUrls(stableUniforms));\n\t\t\tstartTransition(() => {\n\t\t\t\tsetResolvedUniforms(resolved);\n\t\t\t\tsetHaveUniformsResolved(true);\n\t\t\t});\n\t\t\tonUniformResolutionSucceeded?.();\n\t\t}).catch(() => {\n\t\t\tif (controller.signal.aborted) return;\n\t\t\tvideoDecoderPool.releaseAll(canvasRef);\n\t\t\tonUniformResolutionFailed?.();\n\t\t});\n\t\treturn () => controller.abort();\n\t}, [\n\t\tstableUniforms,\n\t\tcanvasRef,\n\t\theightmapSource,\n\t\tonUniformResolutionSucceeded,\n\t\tonUniformResolutionFailed\n\t]);\n\treturn {\n\t\tresolvedUniforms,\n\t\thaveUniformsResolved\n\t};\n}\n/**\n* Observes canvas size and device pixel ratio changes.\n*\n* NOTE: ResizeObserver batches calls to the resize handler to once per frame.\n* Performance issues during resize should be done by improving shader performance in favor of enabling instant rendering on resize.\n*/\nfunction useCanvasResize(canvasRef, resizeHandler) {\n\tuseEffect(() => {\n\t\tconst canvas = canvasRef.current;\n\t\tif (!canvas) return;\n\t\tconst resizeObserver = new ResizeObserver(resizeHandler);\n\t\tresizeObserver.observe(canvas);\n\t\treturn () => {\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, [canvasRef, resizeHandler]);\n\tuseOnDprChange(resizeHandler);\n}\n/**\n* Fires callback when device pixel ratio changes (e.g., window moved between monitors).\n*/\nfunction useOnDprChange(callback) {\n\tuseEffect(() => {\n\t\tlet dprQuery = matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);\n\t\tconst handleChange = () => {\n\t\t\tcallback();\n\t\t\tdprQuery.removeEventListener(\"change\", handleChange);\n\t\t\tdprQuery = matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);\n\t\t\tdprQuery.addEventListener(\"change\", handleChange);\n\t\t};\n\t\tdprQuery.addEventListener(\"change\", handleChange);\n\t\treturn () => {\n\t\t\tdprQuery.removeEventListener(\"change\", handleChange);\n\t\t};\n\t}, [callback]);\n}\n/**\n* Derives the rendering state for a shader based on pool slot, visibility,\n* reduced motion, and context loss. Handles recovery when a shader is\n* re-selected after context loss.\n*/\nfunction useShaderRenderState(poolSlot, isSelected, isMultiSelected, isIntersecting, mode, animated, skipInitialFallback, isPreviewActive) {\n\tconst shouldPauseOnFirstFrame = useReducedMotionConfig() === true || RenderTarget.current() === RenderTarget.export;\n\tconst shouldSkipFallbackOverlay = skipInitialFallback || shouldPauseOnFirstFrame;\n\tlet isFallbackOnly;\n\tlet effectiveAnimated;\n\tlet effectiveSingleFrame;\n\tlet effectiveMode;\n\tif (poolSlot !== null) {\n\t\tconst hasSlot = poolSlot !== slotStatus.noSlot;\n\t\tisFallbackOnly = !hasSlot;\n\t\teffectiveAnimated = (animated ?? true) && isSelected && !isMultiSelected && !shouldPauseOnFirstFrame && !isPreviewActive;\n\t\teffectiveSingleFrame = hasSlot && !effectiveAnimated;\n\t\teffectiveMode = \"instant\";\n\t} else {\n\t\tisFallbackOnly = mode === \"fallback\" || !isIntersecting;\n\t\teffectiveAnimated = (animated ?? true) && !shouldPauseOnFirstFrame && !isPreviewActive;\n\t\teffectiveSingleFrame = !effectiveAnimated;\n\t\teffectiveMode = mode;\n\t}\n\tconst [contextLost, setContextLost] = useState(false);\n\tconst onContextLost = useCallback(() => {\n\t\tstartTransition(() => setContextLost(true));\n\t}, []);\n\tuseLayoutEffect(() => {\n\t\tif (contextLost && isSelected) startTransition(() => setContextLost(false));\n\t}, [contextLost, isSelected]);\n\tif (contextLost) isFallbackOnly = true;\n\tconst [uniformResolutionFailed, setUniformResolutionFailed] = useState(false);\n\tconst onUniformResolutionFailed = useCallback(() => {\n\t\tstartTransition(() => setUniformResolutionFailed(true));\n\t}, []);\n\tconst onUniformResolutionSucceeded = useCallback(() => {\n\t\tstartTransition(() => setUniformResolutionFailed(false));\n\t}, []);\n\tconst wasSelectedRef = useRef(isSelected);\n\tuseLayoutEffect(() => {\n\t\tconst becameSelected = !wasSelectedRef.current && isSelected;\n\t\twasSelectedRef.current = isSelected;\n\t\tif (becameSelected && uniformResolutionFailed) onUniformResolutionSucceeded();\n\t}, [\n\t\tuniformResolutionFailed,\n\t\tisSelected,\n\t\tonUniformResolutionSucceeded\n\t]);\n\tif (uniformResolutionFailed) isFallbackOnly = true;\n\tif (mode !== \"fallback\" && skipInitialFallback && !contextLost && !uniformResolutionFailed && isIntersecting && poolSlot !== slotStatus.noSlot) isFallbackOnly = false;\n\treturn {\n\t\tisFallbackOnly,\n\t\teffectiveAnimated,\n\t\teffectiveSingleFrame,\n\t\teffectiveMode,\n\t\tshouldSkipFallbackOverlay,\n\t\tonContextLost,\n\t\tonUniformResolutionSucceeded,\n\t\tonUniformResolutionFailed\n\t};\n}\n/**\n* PATCH: Delays shader reveal with a fixed timeout.\n* This avoids, but doesn't fix, a flash of white in Chrome when the shader loads.\n* Other things tried: idle timeout, n frame delay, waiting for window load, PerformanceObserver.\n* It's basically a hack and we should find a better solution.\n*/\nconst SHADER_REVEAL_DELAY_MS = 300;\nfunction usePatchDelayShaderRender(enabled = true) {\n\tconst [mayRender, setMayRender] = useState(!enabled);\n\tuseIsomorphicLayoutEffect$1(() => {\n\t\tif (!enabled) {\n\t\t\tstartTransition(() => setMayRender(true));\n\t\t\treturn;\n\t\t}\n\t\tstartTransition(() => setMayRender(false));\n\t\tconst timeoutId = window.setTimeout(() => {\n\t\t\tstartTransition(() => setMayRender(true));\n\t\t}, SHADER_REVEAL_DELAY_MS);\n\t\treturn () => {\n\t\t\tclearTimeout(timeoutId);\n\t\t};\n\t}, [enabled]);\n\treturn mayRender;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/useShaderVideoPlayback.ts\n/** Invokes `fn` for each resolved sampler2D uniform whose value is a video element. */\nfunction forEachVideoUniform(uniforms, fn) {\n\tfor (const uniform of Object.values(uniforms)) if (uniform.type === \"sampler2D\" && isVideoElement(uniform.value)) fn(uniform.value);\n}\n/**\n* Drives playback for video-uniform textures (the video pool resolves them paused on frame 0).\n* Plays them while `shouldPlay` is true — restarting from the start each time playback begins —\n* and pauses + rewinds to frame 0 when it's false, so a stopped shader sits on frame 0 (matching\n* its fallback). Playback only; the decoder lifecycle (load, reuse, release) is owned by\n* `videoDecoderPool` via `useResolvedUniforms`.\n*\n* `renderSingleFrame` repaints frame 0 after a rewind — single-frame mode won't otherwise re-render\n* once the async seek lands.\n*/\nfunction useShaderVideoPlayback(resolvedUniforms, shouldPlay, renderSingleFrame) {\n\tconst wasPlayingRef = useRef(false);\n\tuseLayoutEffect(() => {\n\t\tconst startedPlaying = shouldPlay && !wasPlayingRef.current;\n\t\twasPlayingRef.current = shouldPlay;\n\t\tlet didRewind = false;\n\t\tforEachVideoUniform(resolvedUniforms, (video) => {\n\t\t\tif (shouldPlay) {\n\t\t\t\tif (startedPlaying) video.currentTime = 0;\n\t\t\t\tvideo.play().catch(() => {});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvideo.pause();\n\t\t\tif (video.currentTime === 0) return;\n\t\t\tvideo.addEventListener(\"seeked\", () => renderSingleFrame(), { once: true });\n\t\t\tvideo.currentTime = 0;\n\t\t\tdidRewind = true;\n\t\t});\n\t\tif (didRewind) renderSingleFrame();\n\t}, [\n\t\tresolvedUniforms,\n\t\tshouldPlay,\n\t\trenderSingleFrame\n\t]);\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/ShaderCanvas.tsx\nconst canvasStyle = {\n\tdisplay: \"block\",\n\twidth: \"100%\",\n\theight: \"100%\"\n};\n/**\n* WebGL2 canvas for rendering custom fragment shaders.\n*\n* Uniforms can include texture URLs (type: \"texture\") which are automatically\n* loaded and converted to sampler2D uniforms for the shader.\n*/\nfunction ShaderCanvas({ vertexShader = DEFAULT_VERTEX_SHADER, fragmentShader = DEFAULT_FRAGMENT_SHADER, animated = true, resolutionScale, uniforms, onError, onReady, onContextLost, onUniformResolutionSucceeded, onUniformResolutionFailed, singleFrame = false, heightmapSource, mouseDataRef, buffers }) {\n\tconst canvasRef = useRef(null);\n\tconst rendererRef = useRef(null);\n\tconst animationFrameRef = useRef(0);\n\tconst startTimeRef = useRef(0);\n\tconst lastTimeRef = useRef(0);\n\tconst shaderRenderedFrameRef = useRef(null);\n\tconst [isRendererLive, setIsRendererLive] = useState(false);\n\tconst onReadyRef = useRef(onReady);\n\tuseLayoutEffect(() => {\n\t\tonReadyRef.current = onReady;\n\t}, [onReady]);\n\tconst onContextLostRef = useRef(onContextLost);\n\tuseLayoutEffect(() => {\n\t\tonContextLostRef.current = onContextLost;\n\t}, [onContextLost]);\n\tconst { resolvedUniforms, haveUniformsResolved } = useResolvedUniforms(uniforms, canvasRef, heightmapSource, onUniformResolutionSucceeded, onUniformResolutionFailed);\n\tconst resolvedUniformsRef = useRef(resolvedUniforms);\n\tconst animatedRef = useRef(animated);\n\tuseLayoutEffect(() => {\n\t\tanimatedRef.current = animated;\n\t}, [animated]);\n\tconst singleFrameRef = useRef(singleFrame);\n\tuseLayoutEffect(() => {\n\t\tsingleFrameRef.current = singleFrame;\n\t}, [singleFrame]);\n\tconst readySignalledRef = useRef(false);\n\t/** Signal ready after the first frame where uniforms have been resolved. */\n\tconst signalReadyIfNeeded = useCallback(() => {\n\t\tif (readySignalledRef.current || !haveUniformsResolved) return;\n\t\treadySignalledRef.current = true;\n\t\tonReadyRef.current?.();\n\t\tshaderRenderedFrameRef.current = requestAnimationFrame(() => {\n\t\t\tshaderRenderedFrameRef.current = null;\n\t\t\tperformance.mark?.(\"shader_rendered\");\n\t\t});\n\t}, [haveUniformsResolved]);\n\tconst currentSizeRef = useRef({\n\t\twidth: 0,\n\t\theight: 0,\n\t\tdpr: 0\n\t});\n\tconst lastAppliedSizeRef = useRef({\n\t\twidth: 0,\n\t\theight: 0,\n\t\tdpr: 0\n\t});\n\tconst updateCurrentSize = useCallback(() => {\n\t\tconst canvas = canvasRef.current;\n\t\tif (!canvas) return;\n\t\tcurrentSizeRef.current = {\n\t\t\twidth: canvas.offsetWidth,\n\t\t\theight: canvas.offsetHeight,\n\t\t\tdpr: window.devicePixelRatio\n\t\t};\n\t}, []);\n\tconst maybeResize = useCallback(() => {\n\t\tconst renderer = rendererRef.current;\n\t\tif (!renderer) return;\n\t\tconst current = currentSizeRef.current;\n\t\tconst last = lastAppliedSizeRef.current;\n\t\tif (current.width === last.width && current.height === last.height && current.dpr === last.dpr) return;\n\t\trenderer.resize();\n\t\tlastAppliedSizeRef.current = { ...current };\n\t}, []);\n\tconst animate = useCallback((time) => {\n\t\tconst renderer = rendererRef.current;\n\t\tif (!renderer) return;\n\t\tif (singleFrameRef.current) {\n\t\t\tif (!haveUniformsResolved) return;\n\t\t\tmaybeResize();\n\t\t\trenderer.render(0, 0, resolvedUniformsRef.current, mouseDataRef?.current ?? defaultMouseData);\n\t\t\tsignalReadyIfNeeded();\n\t\t\treturn;\n\t\t}\n\t\tif (!haveUniformsResolved) {\n\t\t\tanimationFrameRef.current = requestAnimationFrame(animate);\n\t\t\treturn;\n\t\t}\n\t\tif (!readySignalledRef.current) {\n\t\t\tstartTimeRef.current = time * timeMultiplier;\n\t\t\tlastTimeRef.current = startTimeRef.current;\n\t\t}\n\t\tmaybeResize();\n\t\tconst { currentTime, elapsedTime, deltaTime } = getShaderTiming(time, startTimeRef.current, lastTimeRef.current);\n\t\tlastTimeRef.current = currentTime;\n\t\trenderer.render(elapsedTime, deltaTime, resolvedUniformsRef.current, mouseDataRef?.current ?? defaultMouseData);\n\t\tsignalReadyIfNeeded();\n\t\tif (!singleFrameRef.current && animatedRef.current) animationFrameRef.current = requestAnimationFrame(animate);\n\t}, [\n\t\thaveUniformsResolved,\n\t\tsignalReadyIfNeeded,\n\t\tmouseDataRef,\n\t\tmaybeResize\n\t]);\n\t/** Render a single frame at t=0 with current uniforms. */\n\tconst renderSingleFrame = useCallback(() => {\n\t\tconst renderer = rendererRef.current;\n\t\tif (!renderer || !haveUniformsResolved) return;\n\t\tmaybeResize();\n\t\trenderer.render(0, 0, resolvedUniformsRef.current, mouseDataRef?.current ?? defaultMouseData);\n\t\tsignalReadyIfNeeded();\n\t}, [\n\t\thaveUniformsResolved,\n\t\tmouseDataRef,\n\t\tsignalReadyIfNeeded,\n\t\tmaybeResize\n\t]);\n\tuseLayoutEffect(() => {\n\t\tresolvedUniformsRef.current = resolvedUniforms;\n\t\tif (singleFrameRef.current && rendererRef.current) renderSingleFrame();\n\t}, [resolvedUniforms, renderSingleFrame]);\n\tuseShaderVideoPlayback(resolvedUniforms, animated && !singleFrame && haveUniformsResolved && isRendererLive, renderSingleFrame);\n\tuseEffect(() => {\n\t\tconst canvas = canvasRef.current;\n\t\tif (!canvas || !haveUniformsResolved) return;\n\t\treadySignalledRef.current = false;\n\t\ttry {\n\t\t\tconst renderer = new WebGL2ShaderRenderer(canvas, vertexShader, fragmentShader, resolveResolutionScale(resolutionScale), onContextLostRef.current, buffers);\n\t\t\trendererRef.current = renderer;\n\t\t\tlastAppliedSizeRef.current = {\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0,\n\t\t\t\tdpr: 0\n\t\t\t};\n\t\t\tupdateCurrentSize();\n\t\t\tmaybeResize();\n\t\t\tstartTimeRef.current = performance.now() * timeMultiplier;\n\t\t\tlastTimeRef.current = startTimeRef.current;\n\t\t\tif (singleFrameRef.current) renderSingleFrame();\n\t\t\telse animationFrameRef.current = requestAnimationFrame(animate);\n\t\t\tstartTransition(() => setIsRendererLive(true));\n\t\t} catch (error) {\n\t\t\tstartTransition(() => setIsRendererLive(false));\n\t\t\tif (onError && error instanceof Error) onError(error);\n\t\t}\n\t\treturn () => {\n\t\t\tcancelAnimationFrame(animationFrameRef.current);\n\t\t\tif (shaderRenderedFrameRef.current !== null) cancelAnimationFrame(shaderRenderedFrameRef.current);\n\t\t\trendererRef.current?.dispose();\n\t\t\trendererRef.current = null;\n\t\t};\n\t}, [\n\t\tvertexShader,\n\t\tfragmentShader,\n\t\tresolutionScale,\n\t\tanimate,\n\t\trenderSingleFrame,\n\t\tonError,\n\t\tbuffers,\n\t\thaveUniformsResolved,\n\t\tupdateCurrentSize,\n\t\tmaybeResize\n\t]);\n\tconst wasAnimatedRef = useRef(animated);\n\tconst wasReactiveRef = useRef(singleFrame);\n\tuseEffect(() => {\n\t\tconst becameAnimated = animated && !wasAnimatedRef.current;\n\t\tconst leftReactive = !singleFrame && wasReactiveRef.current;\n\t\tif ((becameAnimated || leftReactive) && rendererRef.current) {\n\t\t\tstartTimeRef.current = performance.now() * timeMultiplier;\n\t\t\tlastTimeRef.current = startTimeRef.current;\n\t\t\tanimationFrameRef.current = requestAnimationFrame(animate);\n\t\t}\n\t\twasAnimatedRef.current = animated;\n\t\twasReactiveRef.current = singleFrame;\n\t}, [\n\t\tanimated,\n\t\tsingleFrame,\n\t\tanimate\n\t]);\n\tconst handleResize = useCallback(() => {\n\t\tconst renderer = rendererRef.current;\n\t\tif (!renderer || !haveUniformsResolved) return;\n\t\tupdateCurrentSize();\n\t\tif (singleFrameRef.current) {\n\t\t\trenderSingleFrame();\n\t\t\treturn;\n\t\t}\n\t\tmaybeResize();\n\t\tconst { currentTime, elapsedTime, deltaTime } = getShaderTiming(performance.now(), startTimeRef.current, lastTimeRef.current);\n\t\tlastTimeRef.current = currentTime;\n\t\trenderer.render(elapsedTime, deltaTime, resolvedUniformsRef.current, mouseDataRef?.current ?? defaultMouseData);\n\t}, [\n\t\thaveUniformsResolved,\n\t\tmouseDataRef,\n\t\trenderSingleFrame,\n\t\tupdateCurrentSize,\n\t\tmaybeResize\n\t]);\n\tuseCanvasResize(canvasRef, handleResize);\n\treturn /* @__PURE__ */ jsx(\"canvas\", {\n\t\tref: canvasRef,\n\t\tstyle: canvasStyle,\n\t\tdraggable: false\n\t});\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/ShaderWithFallbackOverlay.tsx\nconst SHADER_PLAY_DELAY = 250;\nconst ShaderWithFallbackOverlay = /* @__PURE__ */ memo$1(function ShaderWithFallbackOverlay({ mode, fallbackImage, skipInitialFallback, vertexShader, fragmentShader, animated, resolutionScale, uniforms, onError, onReady, singleFrame, onContextLost, onUniformResolutionSucceeded, onUniformResolutionFailed, heightmapSource, mouseDataRef, buffers }) {\n\tconst [isShaderReady, setIsShaderReady] = useState(false);\n\tconst [shouldPlay, setShouldPlay] = useState(false);\n\tconst isProgressive = mode === \"progressive\";\n\tconst hasFallbackImage = Boolean(fallbackImage);\n\tconst shouldSkipInitialFallback = Boolean(skipInitialFallback && hasFallbackImage);\n\tconst isFallbackShown = isProgressive && hasFallbackImage && !shouldSkipInitialFallback;\n\tconst isRevealDelayComplete = usePatchDelayShaderRender(isFallbackShown);\n\tconst onReadyRef = useRef(onReady);\n\tuseLayoutEffect(() => {\n\t\tonReadyRef.current = onReady;\n\t}, [onReady]);\n\tconst handleReady = useCallback(() => {\n\t\tstartTransition(() => setIsShaderReady(true));\n\t\tonReadyRef.current?.();\n\t}, []);\n\tuseEffect(() => {\n\t\tif (!isProgressive) return;\n\t\tif (!isShaderReady || !isRevealDelayComplete) return;\n\t\tconst timeout = window.setTimeout(() => {\n\t\t\tstartTransition(() => setShouldPlay(true));\n\t\t}, SHADER_PLAY_DELAY);\n\t\treturn () => {\n\t\t\tclearTimeout(timeout);\n\t\t};\n\t}, [\n\t\tisProgressive,\n\t\tisRevealDelayComplete,\n\t\tisShaderReady\n\t]);\n\tconst shouldHideCanvas = isFallbackShown && !isRevealDelayComplete;\n\tconst effectiveSingleFrame = singleFrame || shouldHideCanvas || isProgressive && !shouldSkipInitialFallback && !shouldPlay;\n\tconst shouldShowFallback = hasFallbackImage && !shouldSkipInitialFallback && (!isRevealDelayComplete || !isShaderReady);\n\treturn /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(\"div\", {\n\t\tstyle: {\n\t\t\t...overlayStyle,\n\t\t\topacity: shouldHideCanvas ? 0 : 1\n\t\t},\n\t\tchildren: /* @__PURE__ */ jsx(ShaderCanvas, {\n\t\t\tvertexShader,\n\t\t\tfragmentShader,\n\t\t\tanimated,\n\t\t\tresolutionScale,\n\t\t\tsingleFrame: effectiveSingleFrame,\n\t\t\tuniforms,\n\t\t\tonError,\n\t\t\tonReady: handleReady,\n\t\t\tonContextLost,\n\t\t\tonUniformResolutionSucceeded,\n\t\t\tonUniformResolutionFailed,\n\t\t\theightmapSource,\n\t\t\tmouseDataRef,\n\t\t\tbuffers\n\t\t})\n\t}), fallbackImage && !shouldSkipInitialFallback && /* @__PURE__ */ jsx(\"div\", {\n\t\tstyle: {\n\t\t\t...overlayStyle,\n\t\t\topacity: shouldShowFallback ? 1 : 0,\n\t\t\ttransition: \"opacity 200ms ease-in-out\",\n\t\t\tpointerEvents: \"none\"\n\t\t},\n\t\tchildren: /* @__PURE__ */ jsx(ShaderFallbackImage, { src: fallbackImage })\n\t})] });\n});\n\n//#endregion\n//#region ../../library/src/render/presentation/motionplus/usePointerPosition.ts\n/**\n* This file is generated from motion-plus/react.\n* Before committing any changes, please make sure that the overrides we noted below persist.\n*/\nlet x;\nlet y;\nfunction initPointerTracking() {\n\tx = motionValue(0);\n\ty = motionValue(0);\n\tlet pointerX = 0;\n\tlet pointerY = 0;\n\tfunction updatePointer() {\n\t\tif (!x || !y) return;\n\t\tx.set(pointerX);\n\t\ty.set(pointerY);\n\t}\n\tif (typeof window !== \"undefined\") {\n\t\twindow.addEventListener(\"pointermove\", onlyMouse((event) => {\n\t\t\tpointerX = event.clientX;\n\t\t\tpointerY = event.clientY;\n\t\t\t/**\n\t\t\t* Don't update pointer until the next render frame to\n\t\t\t* avoid\n\t\t\t*\n\t\t\t* TODO: Update motion values to cache rendered value\n\t\t\t* and use that in projection measurements\n\t\t\t* instead of using this approach\n\t\t\t*/\n\t\t\tframe.update(updatePointer);\n\t\t}));\n\t\twindow.addEventListener(\"dragover\", (event) => {\n\t\t\tpointerX = event.clientX;\n\t\t\tpointerY = event.clientY;\n\t\t\tframe.update(updatePointer);\n\t\t});\n\t}\n}\n/**\n* NOTE: this slightly differs from the motion-plus `usePointerPosition()` API, which has no\n* parameters and always attaches global window listeners on first call. The `enabled`\n* flag is a FramerStudio-specific addition so consumers can opt out of initializing the\n* singleton when they don't need pointer tracking. Once any caller opts in, tracking\n* is live for the page lifetime.\n*/\nfunction usePointerPosition(enabled = true) {\n\tif (enabled && !x) initPointerTracking();\n\treturn {\n\t\tx,\n\t\ty\n\t};\n}\nfunction onlyMouse(callback) {\n\treturn (event) => {\n\t\tif (event.pointerType === \"mouse\") callback(event);\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/useShaderMouse.ts\n/** Instant follow — no spring smoothing. Used when no spring is configured. */\nconst fallbackShaderMouseSpringOptions = { duration: 0 };\n/** Converts SpringOptions duration from seconds to milliseconds for useSpring. */\nfunction toSpringOptions(spring) {\n\tconst resolved = spring ?? fallbackShaderMouseSpringOptions;\n\treturn resolved.duration !== void 0 ? {\n\t\t...resolved,\n\t\tduration: resolved.duration * 1e3\n\t} : resolved;\n}\nfunction toElementRelative(rect, clientX, clientY) {\n\tif (!rect || rect.width <= 0 || rect.height <= 0) return [offScreen, offScreen];\n\treturn [(clientX - rect.left) / rect.width, 1 - (clientY - rect.top) / rect.height];\n}\n/**\n* Returns a ref containing mouse position, state, and velocity for shader uniforms.\n* Position is tracked globally so shaders react before hover. pointerDown/hover are element-scoped.\n*/\nfunction useShaderMouse(containerRef, mouseConfig) {\n\tconst dataRef = useRef(defaultMouseData);\n\tconst enabled = mouseConfig?.enabled ?? false;\n\tconst springOptions = toSpringOptions(mouseConfig?.springOptions);\n\tconst rectRef = useRef(null);\n\tconst updateRect = useCallback(() => {\n\t\tconst el = containerRef.current;\n\t\tif (el) rectRef.current = el.getBoundingClientRect();\n\t}, [containerRef]);\n\tconst { x: trackedX, y: trackedY } = usePointerPosition(enabled);\n\tconst stubX = useMotionValue(0);\n\tconst stubY = useMotionValue(0);\n\tconst pointerX = trackedX ?? stubX;\n\tconst pointerY = trackedY ?? stubY;\n\tconst rawX = useTransform(pointerX, (x) => toElementRelative(rectRef.current, x, pointerY.get())[0]);\n\tconst rawY = useTransform(pointerY, (y) => toElementRelative(rectRef.current, pointerX.get(), y)[1]);\n\tconst rawPointerDown = useMotionValue(0);\n\tconst rawHover = useMotionValue(0);\n\tconst smoothX = useSpring(rawX, springOptions);\n\tconst smoothY = useSpring(rawY, springOptions);\n\tconst smoothPointerDown = useSpring(rawPointerDown, springOptions);\n\tconst smoothHover = useSpring(rawHover, springOptions);\n\tconst velocityX = useVelocity(smoothX);\n\tconst velocityY = useVelocity(smoothY);\n\tuseEffect(() => {\n\t\tif (!enabled) return;\n\t\tconst el = containerRef.current;\n\t\tif (!el) return;\n\t\tupdateRect();\n\t\tlet hasEnteredOnce = false;\n\t\twindow.addEventListener(\"scroll\", updateRect, {\n\t\t\tpassive: true,\n\t\t\tcapture: true\n\t\t});\n\t\tconst cleanupWindowResize = resize(updateRect);\n\t\tconst cleanupResize = resize(el, updateRect);\n\t\tconst cleanupHover = hover(el, () => {\n\t\t\tupdateRect();\n\t\t\tif (!hasEnteredOnce) {\n\t\t\t\thasEnteredOnce = true;\n\t\t\t\tsmoothX.jump(rawX.get());\n\t\t\t\tsmoothY.jump(rawY.get());\n\t\t\t}\n\t\t\tframe.update(() => rawHover.set(1));\n\t\t\treturn () => frame.update(() => rawHover.set(0));\n\t\t});\n\t\tconst cleanupPress = press(el, () => {\n\t\t\tframe.update(() => rawPointerDown.set(1));\n\t\t\treturn () => frame.update(() => rawPointerDown.set(0));\n\t\t});\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"scroll\", updateRect, { capture: true });\n\t\t\tcleanupWindowResize();\n\t\t\tcleanupResize();\n\t\t\tcleanupHover();\n\t\t\tcleanupPress();\n\t\t\tdataRef.current = defaultMouseData;\n\t\t};\n\t}, [\n\t\tenabled,\n\t\tcontainerRef,\n\t\trawX,\n\t\trawY,\n\t\trawPointerDown,\n\t\trawHover,\n\t\tsmoothX,\n\t\tsmoothY,\n\t\tupdateRect\n\t]);\n\tuseConditionalAnimationFrame(enabled, useCallback(() => {\n\t\tdataRef.current = {\n\t\t\tposition: [\n\t\t\t\tsmoothX.get(),\n\t\t\t\tsmoothY.get(),\n\t\t\t\tvelocityX.get(),\n\t\t\t\tvelocityY.get()\n\t\t\t],\n\t\t\tpointerDown: smoothPointerDown.get(),\n\t\t\thover: smoothHover.get()\n\t\t};\n\t}, [\n\t\tsmoothX,\n\t\tsmoothY,\n\t\tsmoothPointerDown,\n\t\tsmoothHover,\n\t\tvelocityX,\n\t\tvelocityY\n\t]));\n\treturn dataRef;\n}\n/**\n* Runs the rAF loop only while `enabled` is true — disabled shaders pay zero cost.\n* `callback` should be wrapped in `useCallback` so the loop isn't torn down every render.\n*/\nfunction useConditionalAnimationFrame(enabled, callback) {\n\tuseEffect(() => {\n\t\tif (!enabled) return;\n\t\tlet rafId = 0;\n\t\tlet lastTime = performance.now();\n\t\tfunction tick(time) {\n\t\t\tcallback(time, time - lastTime);\n\t\t\tlastTime = time;\n\t\t\trafId = requestAnimationFrame(tick);\n\t\t}\n\t\trafId = requestAnimationFrame(tick);\n\t\treturn () => cancelAnimationFrame(rafId);\n\t}, [enabled, callback]);\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/useShaderPool.ts\n/**\n* Hook that registers a shader with the pool and returns its current slot status.\n*\n* Returns null when no pool context exists (published sites).\n*/\nfunction useShaderPoolSlot(id, isSelected, isVisible) {\n\tconst pool = useShaderPoolContext();\n\tconst [status, setStatus] = useState(slotStatus.noSlot);\n\tuseEffect(() => {\n\t\tif (!pool || !id) return;\n\t\tpool.register(id, isSelected, isVisible);\n\t\tstartTransition(() => setStatus(pool.getSlotStatus(id)));\n\t\tconst unsub = pool.subscribe(id, () => {\n\t\t\tstartTransition(() => setStatus(pool.getSlotStatus(id)));\n\t\t});\n\t\treturn () => {\n\t\t\tunsub();\n\t\t};\n\t}, [\n\t\tpool,\n\t\tid,\n\t\tisSelected,\n\t\tisVisible\n\t]);\n\tuseEffect(() => {\n\t\tif (!pool || !id) return;\n\t\treturn () => {\n\t\t\tpool.deregister(id);\n\t\t};\n\t}, [pool, id]);\n\tif (!pool) return null;\n\treturn status;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Shader/Shader.tsx\n/**\n* Main shader component. Renders fallback, canvas, progressively or instantly based on `mode`.\n*\n* When rendered inside a ShaderPoolProvider (canvas), pool-based context management\n* controls which shaders get WebGL contexts. When no pool exists (published sites),\n* the component renders normally based on `mode`.\n*/\nconst Shader = /* @__PURE__ */ forwardRef(function Shader({ mode = \"instant\", fallbackImage, skipInitialFallback, placeholder, style, width, height, vertexShader, fragmentShader, animated, uniforms, onError, onReady, resolutionScale, poolId, isSelected = false, isMultiSelected = false, isPreviewActive = false, heightmapSource, mouse, buffers, ...rest }, ref) {\n\tconst observerRef = useObserverRef(ref);\n\tconst renderTargetEnvironment = useRenderTargetEnvironment();\n\tconst shouldSkipPreviewFallback = RenderTarget.current() === RenderTarget.preview && renderTargetEnvironment === \"preview\";\n\tconst shouldSkipInitialFallback = Boolean(fallbackImage && (skipInitialFallback || shouldSkipPreviewFallback));\n\tconst isOnCanvas = useIsOnFramerCanvas();\n\tconst mouseDataRef = useShaderMouse(observerRef, isOnCanvas ? void 0 : mouse);\n\tconst [isIntersecting, setIsIntersecting] = useState(shouldSkipInitialFallback);\n\tconst intersectionCallback = useCallback((entry) => {\n\t\tstartTransition(() => setIsIntersecting(entry.isIntersecting));\n\t}, []);\n\tuseSharedIntersectionObserver(observerRef, intersectionCallback, {\n\t\tthreshold: 0,\n\t\tenabled: true\n\t});\n\tconst autoId = useId();\n\tconst poolSlot = useShaderPoolSlot(poolId ?? autoId, isSelected, isIntersecting);\n\tuseEffect(() => {\n\t\tperformance.mark?.(\"shader_register\");\n\t}, []);\n\tconst { isFallbackOnly, effectiveAnimated, effectiveSingleFrame, effectiveMode, shouldSkipFallbackOverlay, onContextLost, onUniformResolutionSucceeded, onUniformResolutionFailed } = useShaderRenderState(poolSlot, isSelected, isMultiSelected, isIntersecting, mode, animated, shouldSkipInitialFallback, isPreviewActive);\n\tconst [isShaderReady, setIsShaderReady] = useState(false);\n\tuseLayoutEffect(() => {\n\t\tif (isFallbackOnly) startTransition(() => setIsShaderReady(false));\n\t}, [isFallbackOnly]);\n\tconst handleShaderReady = useCallback(() => {\n\t\tstartTransition(() => setIsShaderReady(true));\n\t\tonReady?.();\n\t}, [onReady]);\n\tconst shaderProps = {\n\t\tvertexShader,\n\t\tfragmentShader,\n\t\tuniforms,\n\t\tresolutionScale,\n\t\tonError,\n\t\tonContextLost,\n\t\tonUniformResolutionSucceeded,\n\t\tonUniformResolutionFailed,\n\t\theightmapSource,\n\t\tbuffers\n\t};\n\tconst containerFrameProps = {\n\t\tstyle,\n\t\twidth,\n\t\theight,\n\t\t...rest\n\t};\n\tif (isOnCanvas) {\n\t\tconst hideFallback = !isFallbackOnly && (shouldSkipInitialFallback || isShaderReady);\n\t\treturn /* @__PURE__ */ jsxs(ShaderContainerFrame, {\n\t\t\tref: observerRef,\n\t\t\t...containerFrameProps,\n\t\t\tchildren: [\n\t\t\t\t!isFallbackOnly && /* @__PURE__ */ jsx(ShaderWithFallbackOverlay, {\n\t\t\t\t\tmode: effectiveMode,\n\t\t\t\t\tskipInitialFallback: shouldSkipFallbackOverlay,\n\t\t\t\t\tonReady: handleShaderReady,\n\t\t\t\t\t...shaderProps,\n\t\t\t\t\tanimated: effectiveAnimated,\n\t\t\t\t\tsingleFrame: effectiveSingleFrame,\n\t\t\t\t\tmouseDataRef\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ jsx(ShaderSandboxFallbackImage, {\n\t\t\t\t\tsrc: fallbackImage,\n\t\t\t\t\thidden: hideFallback\n\t\t\t\t}),\n\t\t\t\tisFallbackOnly && !fallbackImage && placeholder\n\t\t\t]\n\t\t});\n\t}\n\tif (isFallbackOnly) return /* @__PURE__ */ jsx(ShaderContainerFrame, {\n\t\tref: observerRef,\n\t\t...containerFrameProps,\n\t\tchildren: shouldSkipFallbackOverlay && !isIntersecting ? null : /* @__PURE__ */ jsx(ShaderFallbackImage, { src: fallbackImage })\n\t});\n\treturn /* @__PURE__ */ jsx(ShaderContainerFrame, {\n\t\tref: observerRef,\n\t\t...containerFrameProps,\n\t\tchildren: /* @__PURE__ */ jsx(ShaderWithFallbackOverlay, {\n\t\t\tmode: effectiveMode,\n\t\t\tfallbackImage,\n\t\t\tskipInitialFallback: shouldSkipFallbackOverlay,\n\t\t\tonReady,\n\t\t\t...shaderProps,\n\t\t\tanimated: effectiveAnimated,\n\t\t\tsingleFrame: effectiveSingleFrame,\n\t\t\tmouseDataRef\n\t\t})\n\t});\n});\nconst ShaderContainerFrame = /* @__PURE__ */ forwardRef(function ShaderContainerFrame({ children, style, ...rest }, ref) {\n\tconst styles = {\n\t\tborderRadius: \"inherit\",\n\t\tcornerShape: \"inherit\",\n\t\t...style,\n\t\toverflow: \"hidden\"\n\t};\n\treturn /* @__PURE__ */ jsx(FrameWithMotion, {\n\t\tref,\n\t\t__fromCanvasComponent: true,\n\t\tstyle: styles,\n\t\t...rest,\n\t\tcomponentType: \"Shader\",\n\t\tchildren\n\t});\n});\n\n//#endregion\n//#region ../../library/src/modules/withVariantAppearEffect.tsx\nconst keys$1 = /* @__PURE__ */ new Set([\n\t\"visibleVariantId\",\n\t\"obscuredVariantId\",\n\t\"threshold\",\n\t\"animateOnce\",\n\t\"variantAppearEffectEnabled\",\n\t\"targets\",\n\t\"exitTarget\",\n\t\"scrollDirection\"\n]);\nconst defaultRanges = {\n\tinputRange: [],\n\toutputRange: []\n};\n/**\n* Creates an input range in px offset from the top of the screen, and the index\n* of the transform target that should be active during those ranges. We use\n* index, rather than the target variant, because we want to be able to record\n* that we have animated to each transformTarget, to prevent running transitions\n* more than once when the user desires. If we recorded the variant string, and\n* the user used the same variant for multiple targets, we may not know if we\n* should or should not animate \"back\" to a variant we had already animated to\n* once before.\n*\n* -1 means the initial variant should be animated back to.\n*\n* e.g. [0, 199, 200, 400, 600, 800] | [-1, -1, 1, 1, 2, 2]\n*/\nfunction createInputOutputRanges(transformTargets, threshold, exitTarget) {\n\tconst outputRange = [];\n\tconst inputRange = createTransformInputRange(transformTargets, threshold, (index) => outputRange.unshift(index, index));\n\tif (exitTarget) {\n\t\tconst lastInputRange = inputRange[inputRange.length - 1];\n\t\tif (!isNumber(lastInputRange)) return defaultRanges;\n\t\tinputRange.push(lastInputRange + 1);\n\t\toutputRange.push(-1);\n\t}\n\tconst firstItem = inputRange[0];\n\tif (!isNumber(firstItem)) return defaultRanges;\n\tif (firstItem <= 1) return {\n\t\tinputRange,\n\t\toutputRange\n\t};\n\treturn {\n\t\tinputRange: [\n\t\t\t0,\n\t\t\tMath.max(firstItem - 1, 0),\n\t\t\t...inputRange\n\t\t],\n\t\toutputRange: [\n\t\t\t-1,\n\t\t\t-1,\n\t\t\t...outputRange\n\t\t]\n\t};\n}\n/**\n* @public\n*/\nconst withVariantAppearEffect = (Component) => React.forwardRef((props, forwardedRef) => {\n\tif (RenderTarget.current() === RenderTarget.canvas) return /* @__PURE__ */ jsx(Component, {\n\t\t...props,\n\t\tref: forwardedRef\n\t});\n\tconst [options, rest] = extractPrefixedProps(props, keys$1);\n\tconst { visibleVariantId, obscuredVariantId, animateOnce, threshold, variantAppearEffectEnabled, targets, exitTarget, scrollDirection } = options;\n\tconst [activeVariant, setVariant] = React.useState(obscuredVariantId);\n\tconst animateState = React.useRef(false);\n\tconst observerRef = useObserverRef(forwardedRef);\n\tuseAppearEffect(observerRef, (appears) => {\n\t\tif (options.targets) return;\n\t\tif (options.scrollDirection) return;\n\t\tif (animateOnce && animateState.current === true) return;\n\t\tif (animateState.current === appears) return;\n\t\tanimateState.current = appears;\n\t\tReact.startTransition(() => {\n\t\t\tsetVariant(appears ? visibleVariantId : obscuredVariantId);\n\t\t});\n\t}, {\n\t\tenabled: variantAppearEffectEnabled,\n\t\tanimateOnce,\n\t\tthreshold: { y: threshold }\n\t});\n\tconst currentRouteKey = useCurrentRouteKey();\n\tconst prevRouteKey = React.useRef(currentRouteKey);\n\tReact.useEffect(() => {\n\t\tif (scrollDirection) return;\n\t\tif (!targets) return;\n\t\tif (prevRouteKey.current !== currentRouteKey) {\n\t\t\tprevRouteKey.current = currentRouteKey;\n\t\t\tReact.startTransition(() => setVariant(obscuredVariantId));\n\t\t}\n\t\tconst playedState = {};\n\t\tlet currentVariant = void 0;\n\t\treturn scroll((_, { y: scrollY }) => {\n\t\t\t/**\n\t\t\t* It can be that this function fires after scroll target refs have been\n\t\t\t* dehydrated. Check the first target to see if it is still hydrated and\n\t\t\t* bail if not.\n\t\t\t*/\n\t\t\tif (!targets[0] || targets[0].ref && !targets[0].ref.current) return;\n\t\t\tconst { inputRange, outputRange } = createInputOutputRanges(targets, (threshold ?? 0) * scrollY.containerLength, exitTarget);\n\t\t\tif (inputRange.length === 0 || inputRange.length !== outputRange.length) return;\n\t\t\tconst index = Math.floor(transform(scrollY.current, inputRange, outputRange));\n\t\t\tif (animateOnce && playedState[index]) return;\n\t\t\tplayedState[index] = true;\n\t\t\tconst variant = targets[index]?.target ?? void 0;\n\t\t\tif (variant === currentVariant) return;\n\t\t\tcurrentVariant = variant;\n\t\t\tReact.startTransition(() => {\n\t\t\t\tsetVariant(variant);\n\t\t\t});\n\t\t});\n\t}, [\n\t\tcurrentRouteKey,\n\t\tanimateOnce,\n\t\tthreshold,\n\t\ttargets,\n\t\tprops.variant,\n\t\tscrollDirection,\n\t\texitTarget\n\t]);\n\tuseScrollDirectionChange(scrollDirection, (variant) => React.startTransition(() => setVariant(variant)), {\n\t\tenabled: variantAppearEffectEnabled,\n\t\trepeat: !animateOnce\n\t});\n\tuseOnRouteChange(() => {\n\t\tif (!variantAppearEffectEnabled) return;\n\t\tconst target = !options.targets && !options.scrollDirection ? options.obscuredVariantId : void 0;\n\t\tReact.startTransition(() => setVariant(target));\n\t});\n\tif (!(\"variantAppearEffectEnabled\" in options) || variantAppearEffectEnabled === true) return /* @__PURE__ */ jsx(Component, {\n\t\t...rest,\n\t\tvariant: activeVariant ?? props.variant,\n\t\tref: observerRef\n\t});\n\telse return /* @__PURE__ */ jsx(Component, { ...rest });\n});\n\n//#endregion\n//#region ../../library/src/modules/withVariantFX.tsx\n/**\n* Allow motion elements inside of a Smart Component, which uses `animate`\n* inheritance to update visual variants, to perform presence animations without\n* breaking inheritance of the active variant for descendants.\n*\n* @deprecated - This component was used before we generally supported effects\n* in smart components, when we supported appear effects for relative overlays.\n* It is now no longer code-generated, and replaced with withFX. This does not\n* mean we can remove this code. Code generated by Framer may still import it.\n*/\nconst withVariantFX = (Component) => React.forwardRef(({ initial, animate, exit, ...props }, forwardedRef) => {\n\tconst observerRef = useObserverRef(forwardedRef);\n\tconst effect = usePresenceAnimation({\n\t\tinitial,\n\t\tanimate,\n\t\texit\n\t}, observerRef, true);\n\treturn /* @__PURE__ */ jsx(Component, {\n\t\t...props,\n\t\tstyle: {\n\t\t\t...props?.style,\n\t\t\t...effect.values\n\t\t},\n\t\tref: observerRef\n\t});\n});\n\n//#endregion\n//#region ../../library/src/render/WindowContext.ts\n/** @public */\nconst WindowContext = /* @__PURE__ */ React.createContext(void 0);\n/** @public */\nconst useProvidedWindow = () => React.useContext(WindowContext);\n\n//#endregion\n//#region ../../library/src/render/fonts/types.ts\nlet FontSourceNames = /* @__PURE__ */ function(FontSourceNames) {\n\tFontSourceNames[\"Google\"] = \"google\";\n\tFontSourceNames[\"Fontshare\"] = \"fontshare\";\n\tFontSourceNames[\"Framer\"] = \"framer\";\n\tFontSourceNames[\"Local\"] = \"local\";\n\tFontSourceNames[\"Custom\"] = \"custom\";\n\tFontSourceNames[\"BuiltIn\"] = \"builtIn\";\n\treturn FontSourceNames;\n}({});\n\n//#endregion\n//#region ../../library/src/render/fonts/LocalFontSource.ts\n/** @internal */\nconst systemFontFamilyName = \"System Default\";\n\n//#endregion\n//#region ../../../node_modules/fontfaceobserver/fontfaceobserver.standalone.js\nvar require_fontfaceobserver_standalone = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\t(function() {\n\t\tfunction p(a, c) {\n\t\t\tdocument.addEventListener ? a.addEventListener(\"scroll\", c, !1) : a.attachEvent(\"scroll\", c);\n\t\t}\n\t\tfunction u(a) {\n\t\t\tdocument.body ? a() : document.addEventListener ? document.addEventListener(\"DOMContentLoaded\", function b() {\n\t\t\t\tdocument.removeEventListener(\"DOMContentLoaded\", b);\n\t\t\t\ta();\n\t\t\t}) : document.attachEvent(\"onreadystatechange\", function g() {\n\t\t\t\tif (\"interactive\" == document.readyState || \"complete\" == document.readyState) document.detachEvent(\"onreadystatechange\", g), a();\n\t\t\t});\n\t\t}\n\t\tfunction w(a) {\n\t\t\tthis.g = document.createElement(\"div\");\n\t\t\tthis.g.setAttribute(\"aria-hidden\", \"true\");\n\t\t\tthis.g.appendChild(document.createTextNode(a));\n\t\t\tthis.h = document.createElement(\"span\");\n\t\t\tthis.i = document.createElement(\"span\");\n\t\t\tthis.m = document.createElement(\"span\");\n\t\t\tthis.j = document.createElement(\"span\");\n\t\t\tthis.l = -1;\n\t\t\tthis.h.style.cssText = \"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\n\t\t\tthis.i.style.cssText = \"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\n\t\t\tthis.j.style.cssText = \"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\n\t\t\tthis.m.style.cssText = \"display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;\";\n\t\t\tthis.h.appendChild(this.m);\n\t\t\tthis.i.appendChild(this.j);\n\t\t\tthis.g.appendChild(this.h);\n\t\t\tthis.g.appendChild(this.i);\n\t\t}\n\t\tfunction x(a, c) {\n\t\t\ta.g.style.cssText = \"max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:\" + c + \";\";\n\t\t}\n\t\tfunction B(a) {\n\t\t\tvar c = a.g.offsetWidth, b = c + 100;\n\t\t\ta.j.style.width = b + \"px\";\n\t\t\ta.i.scrollLeft = b;\n\t\t\ta.h.scrollLeft = a.h.scrollWidth + 100;\n\t\t\treturn a.l !== c ? (a.l = c, !0) : !1;\n\t\t}\n\t\tfunction C(a, c) {\n\t\t\tfunction b() {\n\t\t\t\tvar e = g;\n\t\t\t\tB(e) && null !== e.g.parentNode && c(e.l);\n\t\t\t}\n\t\t\tvar g = a;\n\t\t\tp(a.h, b);\n\t\t\tp(a.i, b);\n\t\t\tB(a);\n\t\t}\n\t\tfunction D(a, c, b) {\n\t\t\tc = c || {};\n\t\t\tb = b || window;\n\t\t\tthis.family = a;\n\t\t\tthis.style = c.style || \"normal\";\n\t\t\tthis.weight = c.weight || \"normal\";\n\t\t\tthis.stretch = c.stretch || \"normal\";\n\t\t\tthis.context = b;\n\t\t}\n\t\tvar E = null, F = null, G = null, H = null;\n\t\tfunction I(a) {\n\t\t\tnull === F && (M(a) && /Apple/.test(window.navigator.vendor) ? (a = /AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))(?:\\.([0-9]+))/.exec(window.navigator.userAgent), F = !!a && 603 > parseInt(a[1], 10)) : F = !1);\n\t\t\treturn F;\n\t\t}\n\t\tfunction M(a) {\n\t\t\tnull === H && (H = !!a.document.fonts);\n\t\t\treturn H;\n\t\t}\n\t\tfunction N(a, c) {\n\t\t\tvar b = a.style, g = a.weight;\n\t\t\tif (null === G) {\n\t\t\t\tvar e = document.createElement(\"div\");\n\t\t\t\ttry {\n\t\t\t\t\te.style.font = \"condensed 100px sans-serif\";\n\t\t\t\t} catch (q) {}\n\t\t\t\tG = \"\" !== e.style.font;\n\t\t\t}\n\t\t\treturn [\n\t\t\t\tb,\n\t\t\t\tg,\n\t\t\t\tG ? a.stretch : \"\",\n\t\t\t\t\"100px\",\n\t\t\t\tc\n\t\t\t].join(\" \");\n\t\t}\n\t\tD.prototype.load = function(a, c) {\n\t\t\tvar b = this, g = a || \"BESbswy\", e = 0, q = c || 3e3, J = (/* @__PURE__ */ new Date()).getTime();\n\t\t\treturn new Promise(function(K, L) {\n\t\t\t\tif (M(b.context) && !I(b.context)) {\n\t\t\t\t\tvar O = new Promise(function(r, t) {\n\t\t\t\t\t\tfunction h() {\n\t\t\t\t\t\t\t(/* @__PURE__ */ new Date()).getTime() - J >= q ? t(Error(\"\" + q + \"ms timeout exceeded\")) : b.context.document.fonts.load(N(b, \"\\\"\" + b.family + \"\\\"\"), g).then(function(n) {\n\t\t\t\t\t\t\t\t1 <= n.length ? r() : setTimeout(h, 25);\n\t\t\t\t\t\t\t}, t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\th();\n\t\t\t\t\t}), P = new Promise(function(r, t) {\n\t\t\t\t\t\te = setTimeout(function() {\n\t\t\t\t\t\t\tt(Error(\"\" + q + \"ms timeout exceeded\"));\n\t\t\t\t\t\t}, q);\n\t\t\t\t\t});\n\t\t\t\t\tPromise.race([P, O]).then(function() {\n\t\t\t\t\t\tclearTimeout(e);\n\t\t\t\t\t\tK(b);\n\t\t\t\t\t}, L);\n\t\t\t\t} else u(function() {\n\t\t\t\t\tfunction r() {\n\t\t\t\t\t\tvar d;\n\t\t\t\t\t\tif (d = -1 != k && -1 != l || -1 != k && -1 != m || -1 != l && -1 != m) (d = k != l && k != m && l != m) || (null === E && (d = /AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))/.exec(window.navigator.userAgent), E = !!d && (536 > parseInt(d[1], 10) || 536 === parseInt(d[1], 10) && 11 >= parseInt(d[2], 10))), d = E && (k == y && l == y && m == y || k == z && l == z && m == z || k == A && l == A && m == A)), d = !d;\n\t\t\t\t\t\td && (null !== f.parentNode && f.parentNode.removeChild(f), clearTimeout(e), K(b));\n\t\t\t\t\t}\n\t\t\t\t\tfunction t() {\n\t\t\t\t\t\tif ((/* @__PURE__ */ new Date()).getTime() - J >= q) null !== f.parentNode && f.parentNode.removeChild(f), L(Error(\"\" + q + \"ms timeout exceeded\"));\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar d = b.context.document.hidden;\n\t\t\t\t\t\t\tif (!0 === d || void 0 === d) k = h.g.offsetWidth, l = n.g.offsetWidth, m = v.g.offsetWidth, r();\n\t\t\t\t\t\t\te = setTimeout(t, 50);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar h = new w(g), n = new w(g), v = new w(g), k = -1, l = -1, m = -1, y = -1, z = -1, A = -1, f = document.createElement(\"div\");\n\t\t\t\t\tf.dir = \"ltr\";\n\t\t\t\t\tx(h, N(b, \"sans-serif\"));\n\t\t\t\t\tx(n, N(b, \"serif\"));\n\t\t\t\t\tx(v, N(b, \"monospace\"));\n\t\t\t\t\tf.appendChild(h.g);\n\t\t\t\t\tf.appendChild(n.g);\n\t\t\t\t\tf.appendChild(v.g);\n\t\t\t\t\tb.context.document.body.appendChild(f);\n\t\t\t\t\ty = h.g.offsetWidth;\n\t\t\t\t\tz = n.g.offsetWidth;\n\t\t\t\t\tA = v.g.offsetWidth;\n\t\t\t\t\tt();\n\t\t\t\t\tC(h, function(d) {\n\t\t\t\t\t\tk = d;\n\t\t\t\t\t\tr();\n\t\t\t\t\t});\n\t\t\t\t\tx(h, N(b, \"\\\"\" + b.family + \"\\\",sans-serif\"));\n\t\t\t\t\tC(n, function(d) {\n\t\t\t\t\t\tl = d;\n\t\t\t\t\t\tr();\n\t\t\t\t\t});\n\t\t\t\t\tx(n, N(b, \"\\\"\" + b.family + \"\\\",serif\"));\n\t\t\t\t\tC(v, function(d) {\n\t\t\t\t\t\tm = d;\n\t\t\t\t\t\tr();\n\t\t\t\t\t});\n\t\t\t\t\tx(v, N(b, \"\\\"\" + b.family + \"\\\",monospace\"));\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t\t\"object\" === typeof module ? module.exports = D : (window.FontFaceObserver = D, window.FontFaceObserver.prototype.load = D.prototype.load);\n\t})();\n}));\n\n//#endregion\n//#region ../../library/src/render/fonts/loadFont.ts\nconst FontFaceObserver = /* @__PURE__ */ (() => require_fontfaceobserver_standalone())();\nconst FONT_LOADING_TIMEOUT = 5e3;\nconst MAX_RETRIES = 3;\nvar FontLoadingError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"FontLoadingError\";\n\t}\n};\nlet fontFacesByDocument = /* @__PURE__ */ new WeakMap();\nfunction getDocumentFontFaces(targetDocument) {\n\tlet documentFontFaces = fontFacesByDocument.get(targetDocument);\n\tif (!documentFontFaces) {\n\t\tdocumentFontFaces = {\n\t\t\trequests: /* @__PURE__ */ new Map(),\n\t\t\tfontFaces: /* @__PURE__ */ new Map(),\n\t\t\tready: /* @__PURE__ */ new Map()\n\t\t};\n\t\tfontFacesByDocument.set(targetDocument, documentFontFaces);\n\t}\n\treturn documentFontFaces;\n}\nfunction getRequestId(family, style, weight, url) {\n\treturn `${family}-${style}-${weight}-${url}`;\n}\nfunction getReadyPromiseId(family, style, weight) {\n\treturn `${family}-${style}-${weight}`;\n}\n/** @internal */\nconst loadFont = (data, targetDocument) => loadFontWithRetries(data, targetDocument, 0);\nasync function loadFontWithRetries(data, targetDocument, attempt) {\n\tconst { family, url, stretch, unicodeRange } = data;\n\tconst weight = data.weight;\n\tconst style = data.style || \"normal\";\n\tconst requestId = getRequestId(family, style, weight, url);\n\tconst documentFontFaces = getDocumentFontFaces(targetDocument);\n\tlet request = documentFontFaces.requests.get(requestId);\n\tif (!request || attempt > 0) {\n\t\tconst fontFace = new FontFace(family, `url(${url})`, {\n\t\t\tweight: isString(weight) ? weight : weight?.toString(),\n\t\t\tstyle,\n\t\t\tstretch,\n\t\t\tunicodeRange\n\t\t});\n\t\trequest = fontFace.load().then(() => {\n\t\t\ttargetDocument.fonts.add(fontFace);\n\t\t\tdocumentFontFaces.fontFaces.set(requestId, fontFace);\n\t\t\treturn isFontReady(family, style, weight, targetDocument);\n\t\t}).catch((e) => {\n\t\t\tif (e.name !== \"NetworkError\") throw e;\n\t\t\tif (attempt < MAX_RETRIES) return loadFontWithRetries(data, targetDocument, attempt + 1);\n\t\t\tthrow new FontLoadingError(`Font loading failed after ${attempt} retries due to network error: ${JSON.stringify({\n\t\t\t\tfamily,\n\t\t\t\tstyle,\n\t\t\t\tweight,\n\t\t\t\turl,\n\t\t\t\tstretch,\n\t\t\t\tunicodeRange\n\t\t\t})}`);\n\t\t});\n\t\tdocumentFontFaces.requests.set(requestId, request);\n\t\tconst thisRequest = request;\n\t\tthisRequest.catch(() => {\n\t\t\tif (documentFontFaces.requests.get(requestId) === thisRequest) documentFontFaces.requests.delete(requestId);\n\t\t});\n\t}\n\tawait request;\n}\n/**\n* Resolves once the font can be rendered in `targetDocument`. `FontFaceObserver` measures in the\n* global document, so other documents rely on their own `fonts.ready` instead.\n*\n* @internal\n*/\nasync function isFontReady(family, style, weight, targetDocument = document) {\n\tconst readyPromises = getDocumentFontFaces(targetDocument).ready;\n\tconst readyPromiseId = getReadyPromiseId(family, style, weight);\n\tlet readyPromise = readyPromises.get(readyPromiseId);\n\tif (!readyPromise) {\n\t\treadyPromise = targetDocument === document ? new FontFaceObserver(family, {\n\t\t\tstyle,\n\t\t\tweight\n\t\t}).load(null, FONT_LOADING_TIMEOUT) : targetDocument.fonts.ready.then(() => void 0);\n\t\treadyPromises.set(readyPromiseId, readyPromise);\n\t}\n\ttry {\n\t\tawait readyPromise;\n\t} catch (e) {\n\t\tthrow new FontLoadingError(`Failed to check if font is ready (${FONT_LOADING_TIMEOUT}ms timeout exceeded): ${JSON.stringify({\n\t\t\tfamily,\n\t\t\tstyle,\n\t\t\tweight\n\t\t})}`);\n\t}\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/CustomProperties.tsx\n/**\n* Takes a CSS properties map of custom property to value and inserts them into the DOM.\n* @internal\n*\n*/\nfunction CustomProperties({ children, customProperties }) {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\tstyle: customProperties,\n\t\tchildren\n\t});\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/useOptimisticValue.ts\nconst defaultGetValueFromEvent = (event) => {\n\treturn event.target.value;\n};\nfunction useOptimisticValue(externalValue, shouldSyncExternalValue, onChange, getValueFromEvent = defaultGetValueFromEvent) {\n\tconst [optimisticValue, setOptimisticValue] = React.useState(externalValue);\n\tconst [previousExternalValue, setPreviousExternalValue] = React.useState(externalValue);\n\tif (shouldSyncExternalValue && externalValue !== previousExternalValue) {\n\t\tsetPreviousExternalValue(externalValue);\n\t\tsetOptimisticValue(externalValue);\n\t}\n\treturn [\n\t\toptimisticValue,\n\t\tsetOptimisticValue,\n\t\tReact.useCallback((event) => {\n\t\t\tif (shouldIgnoreReplayEvent(event)) return;\n\t\t\tif (shouldSyncExternalValue) setOptimisticValue(getValueFromEvent(event));\n\t\t\tif (onChange) React.startTransition(() => {\n\t\t\t\tonChange(event);\n\t\t\t});\n\t\t}, [\n\t\t\tgetValueFromEvent,\n\t\t\tonChange,\n\t\t\tshouldSyncExternalValue\n\t\t])\n\t];\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/FormPlainTextInput.tsx\nconst passwordManagerIgnoreDataProps = {\n\t\"data-1p-ignore\": true,\n\t\"data-lpignore\": true,\n\t\"data-form-type\": \"other\",\n\tautocomplete: \"off\"\n};\n/** @internal */\nconst PlainTextInput = /* @__PURE__ */ forwardRef(function FormPlainTextInput(props, ref) {\n\tconst { \"aria-label\": ariaLabel, \"aria-labelledby\": ariaLabelledBy, \"aria-describedby\": ariaDescribedBy, autoFocus, className, inputName, max, min, placeholder, required, step, style, type, maxLength, value, defaultValue, autofillEnabled, onChange, onBlur, onInvalid, onFocus, onValid, onClear, ...rest } = props;\n\tconst normalizedExternalValue = normalizeValueForInputType(value ?? defaultValue, type);\n\tconst [optimisticValue, setOptimisticValue, handleChange] = useOptimisticValue(normalizedExternalValue ?? \"\", true, onChange);\n\tconst setInputRef = useReplayPreHydrationInput(normalizedExternalValue);\n\tconst handleClear = useCallback(() => {\n\t\tsetOptimisticValue(\"\");\n\t\tif (onClear) startTransition(() => onClear());\n\t}, [onClear, setOptimisticValue]);\n\tconst eventHandlers = useCustomValidity(onValid, onInvalid, handleChange, onBlur, onFocus);\n\tconst handleWrapperClick = useCallback((e) => {\n\t\tif (e.target === e.currentTarget) setInputRef.current?.focus();\n\t}, [setInputRef]);\n\tif (type === \"hidden\") return /* @__PURE__ */ jsx(motion.input, {\n\t\ttype: \"hidden\",\n\t\tname: inputName,\n\t\tdefaultValue\n\t});\n\tconst dataProps = autofillEnabled === false ? passwordManagerIgnoreDataProps : void 0;\n\tconst hasValue = !!optimisticValue;\n\tconst showClear = !!onClear && hasValue;\n\tconst wrapperClassName = cx(textInputWrapperClassName, inputWrapperClassName, className, type === \"text\" && textInputTypeWrapperClassName, type === \"textarea\" && textareaInputTypeWrapperClassName);\n\treturn /* @__PURE__ */ jsxs(motion.div, {\n\t\tref,\n\t\tonClick: handleWrapperClick,\n\t\tstyle,\n\t\tclassName: wrapperClassName,\n\t\t...rest,\n\t\tchildren: [type === \"textarea\" ? /* @__PURE__ */ jsx(motion.textarea, {\n\t\t\tref: setInputRef,\n\t\t\t...dataProps,\n\t\t\t...eventHandlers,\n\t\t\t\"aria-label\": ariaLabel,\n\t\t\t\"aria-labelledby\": ariaLabelledBy,\n\t\t\t\"aria-describedby\": ariaDescribedBy,\n\t\t\trequired,\n\t\t\tautoFocus,\n\t\t\tname: inputName,\n\t\t\tplaceholder,\n\t\t\tclassName: inputClassName,\n\t\t\tvalue: optimisticValue,\n\t\t\tmaxLength\n\t\t}) : /* @__PURE__ */ jsx(motion.input, {\n\t\t\tref: setInputRef,\n\t\t\t...dataProps,\n\t\t\t...eventHandlers,\n\t\t\t\"aria-label\": ariaLabel,\n\t\t\t\"aria-labelledby\": ariaLabelledBy,\n\t\t\t\"aria-describedby\": ariaDescribedBy,\n\t\t\ttype,\n\t\t\trequired,\n\t\t\tautoFocus,\n\t\t\tname: inputName,\n\t\t\tplaceholder,\n\t\t\tclassName: cx(inputClassName, !hasValue && \"framer-form-input-empty\"),\n\t\t\tvalue: optimisticValue,\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tstep,\n\t\t\tmaxLength\n\t\t}), showClear && /* @__PURE__ */ jsx(\"button\", {\n\t\t\ttype: \"button\",\n\t\t\tclassName: clearButtonClassName,\n\t\t\tonClick: handleClear,\n\t\t\t\"aria-label\": \"Clear\",\n\t\t\tchildren: /* @__PURE__ */ jsx(ClearIcon, {})\n\t\t})]\n\t});\n});\nfunction normalizeValueForInputType(value, type) {\n\tif (!value || type !== \"date\") return value;\n\tif (value.includes(\"T\")) return value.split(\"T\")[0];\n\treturn value;\n}\nfunction ClearIcon() {\n\treturn /* @__PURE__ */ jsx(\"svg\", {\n\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\twidth: \"8\",\n\t\theight: \"8\",\n\t\tviewBox: \"0 0 8 8\",\n\t\t\"aria-hidden\": \"true\",\n\t\tchildren: /* @__PURE__ */ jsx(\"path\", {\n\t\t\td: \"m1.5 6.5 5-5M6.5 6.5l-5-5\",\n\t\t\tfill: \"none\",\n\t\t\tstroke: \"currentColor\",\n\t\t\tstrokeWidth: \"1.5\",\n\t\t\tstrokeLinecap: \"round\"\n\t\t})\n\t});\n}\nconst textInputWrapperClassName = \"framer-form-text-input\";\nconst textInputTypeWrapperClassName = \"framer-form-text-input-type\";\nconst textareaInputTypeWrapperClassName = \"framer-form-textarea-input-type\";\nconst clearButtonClassName = \"framer-form-text-input-clear\";\nconst defaultTextareaResizerIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\"><path d=\"m1.5 8 7-7M9 5.5l-3 3\" stroke=\"%23999\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path></svg>`;\nconst defaultTextareaResizerIconFlipped = `<svg xmlns=\"http://www.w3.org/2000/svg\" transform=\"scale(-1, 1)\" width=\"14\" height=\"14\"><path d=\"m1.5 8 7-7M9 5.5l-3 3\" stroke=\"%23999\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path></svg>`;\nconst defaultDateIconMaskImage = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"16\\\" height=\\\"16\\\"><path fill=\\\"rgb(153, 153, 153)\\\" d=\\\"M3 5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2H3Z\\\" opacity=\\\".3\\\"/><path fill=\\\"transparent\\\" stroke=\\\"rgb(153, 153, 153)\\\" stroke-width=\\\"1.5\\\" d=\\\"M3.25 5.25a2 2 0 0 1 2-2h5.5a2 2 0 0 1 2 2v5.5a2 2 0 0 1-2 2h-5.5a2 2 0 0 1-2-2ZM3 6.75h9.5\\\"/></svg>\";\nconst defaultTimeIconMaskImage = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"16\\\" height=\\\"16\\\"><path fill=\\\"transparent\\\" stroke=\\\"rgb(153, 153, 153)\\\" stroke-width=\\\"1.5\\\" d=\\\"M2.5 8a5.5 5.5 0 1 1 11 0 5.5 5.5 0 1 1-11 0Z\\\"/><path fill=\\\"transparent\\\" stroke=\\\"rgb(153, 153, 153)\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M7.75 8.25v-3m0 3h2\\\"/></svg>\";\nconst styles$2 = /* @__PURE__ */ (() => [\n\t...sharedInputCSS,\n\t...inputBorderCSS,\n\t...inputWrapperCSS,\n\tcss(`.${inputWrapperClassName}`, {\n\t\tboxShadow: css.variable(\"--framer-input-box-shadow\"),\n\t\tborderTopLeftRadius: css.variable(\"--framer-input-border-radius-top-left\"),\n\t\tborderTopRightRadius: css.variable(\"--framer-input-border-radius-top-right\"),\n\t\tborderBottomRightRadius: css.variable(\"--framer-input-border-radius-bottom-right\"),\n\t\tborderBottomLeftRadius: css.variable(\"--framer-input-border-radius-bottom-left\"),\n\t\tcornerShape: css.variable(\"--framer-input-corner-shape\"),\n\t\tbackground: css.variable(\"--framer-input-background\"),\n\t\ttransition: css.variable(\"--framer-input-focused-transition\"),\n\t\ttransitionProperty: \"background, box-shadow\"\n\t}),\n\tcss(`.${textInputWrapperClassName} .${inputClassName}::placeholder`, { color: css.variable(\"--framer-input-placeholder-color\") }),\n\tcss(`.${textInputWrapperClassName}`, {\n\t\tdisplay: \"flex\",\n\t\talignItems: \"center\",\n\t\tpadding: css.variable(\"--framer-input-padding\")\n\t}),\n\tcss(`.${textInputWrapperClassName} .${inputClassName}`, {\n\t\tflex: 1,\n\t\tminWidth: 0,\n\t\twidth: \"auto\",\n\t\tpadding: 0\n\t}),\n\tcss(`.${textInputWrapperClassName}.${textareaInputTypeWrapperClassName}`, { padding: 0 }),\n\tcss(`.${textInputWrapperClassName}.${textareaInputTypeWrapperClassName} textarea.${inputClassName}`, {\n\t\twidth: \"100%\",\n\t\tpadding: css.variable(\"--framer-input-padding\")\n\t}),\n\tcss(`.${textInputWrapperClassName} .${inputClassName}[type=\"date\"], .${textInputWrapperClassName} .${inputClassName}[type=\"time\"]`, {\n\t\t\"-webkit-appearance\": \"none\",\n\t\tappearance: \"none\"\n\t}),\n\tcss(`.${textInputWrapperClassName} .${inputClassName}::-webkit-date-and-time-value`, { textAlign: \"start\" }),\n\tcss(`.${textInputWrapperClassName} textarea`, {\n\t\tdisplay: \"flex\",\n\t\tresize: css.variable(\"--framer-textarea-resize\"),\n\t\toverflowY: \"auto\",\n\t\tminHeight: \"inherit\",\n\t\tmaxHeight: \"inherit\",\n\t\twhiteSpace: \"break-spaces\"\n\t}),\n\tcss(`.${textInputWrapperClassName} textarea::-webkit-resizer`, { background: `no-repeat ${encodeSVGForCSS(defaultTextareaResizerIcon)}` }),\n\tcss(`.${textInputWrapperClassName}:dir(rtl) textarea::-webkit-resizer`, { background: `no-repeat ${encodeSVGForCSS(defaultTextareaResizerIconFlipped)}` }),\n\tcss(`.${textInputWrapperClassName} textarea::-webkit-scrollbar`, {\n\t\tcursor: \"pointer\",\n\t\tbackground: \"transparent\"\n\t}),\n\tcss(`.${textInputWrapperClassName} textarea::-webkit-scrollbar-thumb:window-inactive`, { opacity: 0 }),\n\tcss(`.${textInputWrapperClassName} textarea::-webkit-scrollbar-corner`, {\n\t\tbackground: \"none\",\n\t\tbackgroundColor: \"transparent\",\n\t\toutline: \"none\"\n\t}),\n\tcss(`.${textInputWrapperClassName} .${inputClassName}::-webkit-datetime-edit`, { height: css.variable(\"--framer-input-font-line-height\") }),\n\tcss(`.${textInputWrapperClassName} .${inputClassName}.${emptyValueClassName}::-webkit-datetime-edit`, {\n\t\tcolor: css.variable(\"--framer-input-placeholder-color\"),\n\t\t\"-webkit-text-fill-color\": css.variable(\"--framer-input-placeholder-color\"),\n\t\toverflow: \"visible\"\n\t}),\n\tcss(`.${textInputWrapperClassName}.${textInputTypeWrapperClassName}::before`, {\n\t\tcontent: css.variable(\"--framer-input-icon-content\", \"none\"),\n\t\tdisplay: \"block\",\n\t\tflexShrink: 0,\n\t\twidth: `${16}px`,\n\t\theight: `${16}px`,\n\t\tmarginRight: `${8}px`,\n\t\t...iconImageCSS,\n\t\tbackgroundPosition: \"center\",\n\t\tmaskPosition: \"center\",\n\t\tmaskImage: css.variable(\"--framer-input-icon-mask-image\"),\n\t\tbackgroundImage: css.variable(\"--framer-input-icon-image\")\n\t}),\n\tcss(`.${textInputWrapperClassName} .${inputClassName}[type=\"date\"]::before, .${textInputWrapperClassName} .${inputClassName}[type=\"time\"]::before`, {\n\t\t...inputIconCSSDeclaration,\n\t\tpaddingLeft: `${10}px`,\n\t\tmaskPosition: `${10}px center`,\n\t\tbackgroundPosition: `${10}px center`\n\t}),\n\tcss(`.${textInputWrapperClassName} .${inputClassName}[type=\"date\"]::before`, {\n\t\tmaskImage: css.variable(\"--framer-input-icon-mask-image\", encodeSVGForCSS(defaultDateIconMaskImage)),\n\t\tbackgroundImage: css.variable(\"--framer-input-icon-image\")\n\t}),\n\tcss(`.${textInputWrapperClassName} .${inputClassName}[type=\"time\"]::before`, {\n\t\tmaskImage: css.variable(\"--framer-input-icon-mask-image\", encodeSVGForCSS(defaultTimeIconMaskImage)),\n\t\tbackgroundImage: css.variable(\"--framer-input-icon-image\")\n\t}),\n\tcss(`.${textInputWrapperClassName} .${inputClassName}::-webkit-calendar-picker-indicator`, {\n\t\topacity: 0,\n\t\tposition: \"absolute\",\n\t\tright: 0,\n\t\ttop: 0,\n\t\tbottom: 0,\n\t\tpadding: css.variable(\"--framer-input-padding\"),\n\t\tpaddingTop: 0,\n\t\tpaddingBottom: 0,\n\t\twidth: `${16}px`,\n\t\theight: \"100%\"\n\t}),\n\tcss(`.${textInputWrapperClassName}:focus-within, .${textInputWrapperClassName}.${forcedFocusClassName}`, {\n\t\tboxShadow: css.variable(\"--framer-input-focused-box-shadow\", \"--framer-input-box-shadow\"),\n\t\tbackground: css.variable(\"--framer-input-focused-background\", \"--framer-input-background\")\n\t}),\n\tcss(`.${textInputWrapperClassName}:focus-within::after, .${textInputWrapperClassName}.${forcedFocusClassName}::after`, {\n\t\tborderColor: css.variable(\"--framer-input-focused-border-color\", \"--framer-input-border-color\"),\n\t\tborderStyle: css.variable(\"--framer-input-focused-border-style\", \"--framer-input-border-style\"),\n\t\tborderWidth: css.variable(\"--framer-input-focused-border-width\", inputBorderAllSides)\n\t}),\n\tcss(`.${clearButtonClassName}`, {\n\t\tdisplay: \"flex\",\n\t\torder: 2,\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\tflexShrink: 0,\n\t\twidth: `${16}px`,\n\t\theight: `${16}px`,\n\t\tmarginLeft: `${8}px`,\n\t\tpadding: 0,\n\t\tborder: \"none\",\n\t\tbackground: \"transparent\",\n\t\tcursor: \"pointer\",\n\t\tcolor: css.variable(\"--framer-input-placeholder-color\"),\n\t\ttransition: \"color 0.15s ease\",\n\t\toutline: \"none\"\n\t}),\n\tcss(`.${clearButtonClassName}:hover, .${clearButtonClassName}:focus-visible`, { color: css.variable(\"--framer-input-font-color\") })\n])();\nconst FormPlainTextInput = /* @__PURE__ */ withCSS(PlainTextInput, styles$2, \"framer-lib-form-plain-text-input\");\n\n//#endregion\n//#region ../../library/src/hooks/useBooleanLatch.ts\n/**\n* Takes in a boolean value and optionally a latch target.\n* Once the value have become equal to the latch target,\n* it will remain latched to that value for the lifetime of the component\n*\n* @param value - The state that should be used to latch\n* @param latchTo - The value that the latch should stick to\n*/\nfunction useBooleanLatch(value, latchTo = true) {\n\tconst [latchedValue, setLatchedValue] = useState(value);\n\tif (latchedValue !== latchTo && latchedValue !== value) setLatchedValue(value);\n\treturn latchedValue;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/FormBooleanInput.tsx\nconst className = \"framer-form-boolean-input\";\nconst getCheckedFromEvent = (event) => event.target.checked;\n/** @internal */\nconst BooleanInput = /* @__PURE__ */ React.forwardRef(function FormBooleanInput(props, ref) {\n\tconst { inputName, type = \"checkbox\", defaultChecked, checked, onValid, onChange, onBlur, onFocus, onInvalid, ...rest } = props;\n\tconst isCanvas = useIsOnFramerCanvas();\n\tconst isControlled = useBooleanLatch(!isCanvas && checked !== void 0);\n\tconst externalChecked = checked ?? false;\n\tconst [optimisticChecked, , handleChange] = useOptimisticValue(externalChecked, isControlled, onChange, getCheckedFromEvent);\n\tconst setReplayInputRef = useReplayPreHydrationInput(isControlled ? externalChecked : defaultChecked);\n\tconst eventHandlers = useCustomValidity(onValid, onInvalid, handleChange, onBlur, onFocus);\n\tconst attributes = isCanvas ? { checked: defaultChecked } : isControlled ? { checked: optimisticChecked } : { defaultChecked };\n\tconst setInputRef = React.useCallback((input) => {\n\t\tsetRef(ref, input);\n\t\tsetRef(setReplayInputRef, input);\n\t}, [ref, setReplayInputRef]);\n\treturn /* @__PURE__ */ jsx(motion.input, {\n\t\t...rest,\n\t\t...attributes,\n\t\t...eventHandlers,\n\t\treadOnly: isCanvas,\n\t\tref: setInputRef,\n\t\ttype,\n\t\tname: inputName,\n\t\tclassName: cx(className, props.className)\n\t});\n});\nconst defaultCheckedIcon = \"data:image/svg+xml,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"16\\\" height=\\\"16\\\"><path d=\\\"M 4 8 L 6.5 10.5 L 11.5 5.5\\\" fill=\\\"transparent\\\" stroke-width=\\\"2\\\" stroke=\\\"rgb(255, 255, 255)\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"></path></svg>\";\nconst borderRadius = `var(${\"--framer-input-border-radius-top-left\"}) var(${\"--framer-input-border-radius-top-right\"}) var(${\"--framer-input-border-radius-bottom-right\"}) var(${\"--framer-input-border-radius-bottom-left\"})`;\nconst styles$1 = /* @__PURE__ */ (() => [\n\tcss(`.${className}`, {\n\t\t\"-webkit-appearance\": \"none\",\n\t\talignItems: \"center\",\n\t\tappearance: \"none\",\n\t\tbackgroundColor: \"#fff\",\n\t\tbackground: \"--framer-input-background\",\n\t\tborderRadius,\n\t\tcornerShape: css.variable(\"--framer-input-corner-shape\"),\n\t\tboxShadow: \"--framer-input-box-shadow\",\n\t\tdisplay: \"flex\",\n\t\tjustifyContent: \"center\",\n\t\tmargin: 0,\n\t\toverflow: \"hidden\",\n\t\tposition: \"relative\",\n\t\ttransition: \"--framer-input-boolean-checked-transition\",\n\t\ttransitionProperty: \"box-shadow, background\"\n\t}),\n\tcss(`.${className}::after`, {\n\t\tbackground: \"transparent\",\n\t\tborderColor: css.variable(\"--framer-input-border-color\", \"transparent\"),\n\t\tborderRadius,\n\t\tcornerShape: css.variable(\"--framer-input-corner-shape\"),\n\t\tborderStyle: \"--framer-input-border-style\",\n\t\tborderWidth: inputBorderAllSides,\n\t\tboxSizing: \"border-box\",\n\t\tcontent: \"\",\n\t\tdisplay: \"block\",\n\t\tinset: 0,\n\t\tposition: \"absolute\",\n\t\ttransition: \"--framer-input-boolean-checked-transition\",\n\t\ttransitionProperty: \"border-color, border-width, border-style\"\n\t}),\n\tcss(`.${className}::before`, {\n\t\t...inputIconCSSDeclaration,\n\t\tbackgroundPosition: \"center\",\n\t\tbackgroundSize: \"contain\",\n\t\tmaskPosition: \"center\",\n\t\tmaskSize: \"contain\",\n\t\theight: \"100%\",\n\t\topacity: 0,\n\t\ttransition: \"--framer-input-boolean-checked-transition\",\n\t\ttransitionProperty: \"opacity\",\n\t\twidth: \"100%\"\n\t}),\n\tcss(`.${className}[type=\"checkbox\"]::before`, {\n\t\tbackgroundImage: css.variable(\"--framer-input-icon-image\"),\n\t\tmaskImage: css.variable(\"--framer-input-icon-mask-image\", `url('${defaultCheckedIcon}')`)\n\t}),\n\tcss(`.${className}[type=\"radio\"]::before`, {\n\t\tbackgroundImage: css.variable(\"--framer-input-icon-image\"),\n\t\tmaskImage: css.variable(\"--framer-input-icon-mask-image\")\n\t}),\n\tcss(`.${className}:checked, .${className}.${forcedCheckedClassName}`, {\n\t\tbackgroundColor: css.variable(\"--framer-input-boolean-checked-background\", \"--framer-input-background\"),\n\t\tboxShadow: css.variable(\"--framer-input-boolean-checked-box-shadow\", \"--framer-input-box-shadow\")\n\t}),\n\tcss(`.${className}:checked::before, .${className}.${forcedCheckedClassName}::before`, { opacity: 1 }),\n\tcss(`.${className}:checked::after, .${className}.${forcedCheckedClassName}::after`, {\n\t\tborderColor: css.variable(\"--framer-input-boolean-checked-border-color\", \"--framer-input-border-color\", \"transparent\"),\n\t\tborderStyle: css.variable(\"--framer-input-boolean-checked-border-style\", \"--framer-input-border-style\", \"solid\"),\n\t\tborderWidth: css.variable(\"--framer-input-boolean-checked-border-width\", inputBorderAllSides)\n\t}),\n\tcss(`.${className}:focus, .${className}.${forcedFocusClassName}`, {\n\t\tbackgroundColor: css.variable(\"--framer-input-focused-background\", \"--framer-input-background\"),\n\t\tboxShadow: css.variable(\"--framer-input-focused-box-shadow\", \"--framer-input-box-shadow\")\n\t}),\n\tcss(`.${className}:focus-visible`, { outline: \"none\" }),\n\tcss(`.${className}:focus::after, .${className}.${forcedFocusClassName}::after`, {\n\t\tborderColor: css.variable(\"--framer-input-focused-border-color\", \"--framer-input-border-color\", \"transparent\"),\n\t\tborderStyle: css.variable(\"--framer-input-focused-border-style\", \"--framer-input-border-style\", \"solid\"),\n\t\tborderWidth: css.variable(\"--framer-input-focused-border-width\", inputBorderAllSides)\n\t}),\n\tcss(`.${className}:focus:checked`, {\n\t\tbackgroundColor: css.variable(\"--framer-input-focused-background\", \"--framer-input-boolean-checked-background\", \"--framer-input-background\"),\n\t\tboxShadow: css.variable(\"--framer-input-focused-box-shadow\", \"--framer-input-boolean-checked-box-shadow\", \"--framer-input-box-shadow\")\n\t}),\n\tcss(`.${className}:focus:checked::after`, {\n\t\tborderStyle: css.variable(\"--framer-input-focused-border-style\", \"--framer-input-boolean-checked-border-style\", \"--framer-input-border-style\", \"solid\"),\n\t\tborderWidth: css.variable(\"--framer-input-focused-border-width\", \"--framer-input-boolean-checked-border-width\", inputBorderAllSides)\n\t})\n])();\nconst FormBooleanInput = /* @__PURE__ */ withCSS(BooleanInput, styles$1, \"framer-lib-form-boolean-input\");\n\n//#endregion\n//#region ../../library/src/render/presentation/Forms/FormSelect.tsx\nconst Select = /* @__PURE__ */ React.forwardRef(function Select(props, measureRef) {\n\tconst { \"aria-label\": ariaLabel, \"aria-labelledby\": ariaLabelledBy, \"aria-describedby\": ariaDescribedBy, autoFocus, className, inputName, required, hidden, defaultValue, value, selectOptions, textAlignment, style, onValid, onChange, onBlur, onInvalid, onFocus, ...rest } = props;\n\tconst isCanvas = useIsOnFramerCanvas();\n\tconst layoutDirection = useLayoutDirection();\n\tconst isControlled = !isCanvas && value !== void 0;\n\tconst externalValue = value ?? \"\";\n\tconst [optimisticValue, , handleChange] = useOptimisticValue(externalValue, isControlled, onChange);\n\tconst setSelectRef = useReplayPreHydrationInput(isControlled ? externalValue : defaultValue);\n\tconst eventHandlers = useCustomValidity(onValid, onInvalid, handleChange, onBlur, onFocus);\n\tif (hidden) return /* @__PURE__ */ jsx(motion.input, {\n\t\ttype: \"hidden\",\n\t\tname: inputName,\n\t\tdefaultValue\n\t});\n\treturn /* @__PURE__ */ jsx(motion.div, {\n\t\tref: measureRef,\n\t\tstyle,\n\t\tclassName: cx(inputWrapperClassName, selectWrapperClassName, isCaretOnLeft(textAlignment, layoutDirection) && caretOnLeftClassName, className),\n\t\t...rest,\n\t\tchildren: /* @__PURE__ */ jsx(motion.select, {\n\t\t\t\"aria-label\": ariaLabel,\n\t\t\t\"aria-labelledby\": ariaLabelledBy,\n\t\t\t\"aria-describedby\": ariaDescribedBy,\n\t\t\tref: setSelectRef,\n\t\t\tname: inputName,\n\t\t\tautoFocus,\n\t\t\trequired,\n\t\t\tclassName: inputClassName,\n\t\t\tdefaultValue,\n\t\t\tvalue: isControlled ? optimisticValue : void 0,\n\t\t\t...eventHandlers,\n\t\t\tchildren: selectOptions?.map((option, index) => {\n\t\t\t\tswitch (option.type) {\n\t\t\t\t\tcase \"divider\": return /* @__PURE__ */ jsx(\"hr\", {}, index);\n\t\t\t\t\tcase \"option\": return /* @__PURE__ */ jsx(\"option\", {\n\t\t\t\t\t\tvalue: option.value ?? option.title,\n\t\t\t\t\t\tdisabled: option.disabled,\n\t\t\t\t\t\tchildren: option.title ?? option.value\n\t\t\t\t\t}, index);\n\t\t\t\t\tdefault: return assertNever$1(option);\n\t\t\t\t}\n\t\t\t})\n\t\t}, isCanvas ? serializeDefaultValue(defaultValue) : void 0)\n\t});\n});\nfunction serializeDefaultValue(defaultValue) {\n\tif (defaultValue === void 0) return \"__undefined__\";\n\tif (isNumber(defaultValue)) return String(defaultValue);\n\tif (defaultValue === \"\") return \"__empty__\";\n\treturn defaultValue;\n}\nfunction isCaretOnLeft(alignment, direction) {\n\tswitch (alignment) {\n\t\tcase \"left\": return false;\n\t\tcase \"right\": return true;\n\t\tcase \"end\": return direction === \"ltr\";\n\t\tcase void 0:\n\t\tcase \"start\":\n\t\tcase \"center\":\n\t\tcase \"justify\": return direction === \"rtl\";\n\t\tdefault: return assertNever$1(alignment);\n\t}\n}\nconst selectWrapperClassName = \"framer-form-select-wrapper\";\nconst caretOnLeftClassName = \"framer-form-select-caret-left\";\nconst selectArrowSize = 16;\nconst defaultSelectCaretMaskImage = /* @__PURE__ */ (() => `data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${selectArrowSize}\" height=\"${selectArrowSize}\"><path d=\"M 3.5 6 L 8 10.5 L 12.5 6\" fill=\"transparent\" stroke-width=\"1.5\" stroke=\"rgb(153, 153, 153)\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></svg>`)();\nconst styles = /* @__PURE__ */ (() => [\n\t...sharedInputCSS,\n\t...inputBorderCSS,\n\t...inputWrapperCSS,\n\tcss(`.${selectWrapperClassName}`, {\n\t\tpadding: css.variable(\"--framer-input-padding\"),\n\t\tpaddingTop: 0,\n\t\tpaddingBottom: 0,\n\t\tpaddingLeft: 0,\n\t\tbackground: css.variable(\"--framer-input-background\"),\n\t\tborderTopLeftRadius: css.variable(\"--framer-input-border-radius-top-left\"),\n\t\tborderTopRightRadius: css.variable(\"--framer-input-border-radius-top-right\"),\n\t\tborderBottomRightRadius: css.variable(\"--framer-input-border-radius-bottom-right\"),\n\t\tborderBottomLeftRadius: css.variable(\"--framer-input-border-radius-bottom-left\"),\n\t\tcornerShape: css.variable(\"--framer-input-corner-shape\"),\n\t\tboxShadow: css.variable(\"--framer-input-box-shadow\"),\n\t\ttransition: css.variable(\"--framer-input-focused-transition\"),\n\t\ttransitionProperty: \"background, box-shadow\"\n\t}),\n\tcss(`.${selectWrapperClassName} select`, {\n\t\tappearance: \"none\",\n\t\t\"-webkit-appearance\": \"none\",\n\t\tpadding: css.variable(\"--framer-input-padding\"),\n\t\tbackground: \"transparent\"\n\t}),\n\tcss(`.${selectWrapperClassName}::before`, {\n\t\t...inputIconCSSDeclaration,\n\t\tpaddingLeft: `${10}px`,\n\t\tbackgroundPosition: `${10}px center`,\n\t\tmaskPosition: `${10}px center`,\n\t\tbackgroundImage: css.variable(\"--framer-input-icon-image\"),\n\t\tmaskImage: css.variable(\"--framer-input-icon-mask-image\", `url('${defaultSelectCaretMaskImage}')`)\n\t}),\n\tcss(`.${caretOnLeftClassName}`, {\n\t\tpadding: css.variable(\"--framer-input-padding\"),\n\t\tpaddingTop: 0,\n\t\tpaddingRight: 0,\n\t\tpaddingBottom: 0\n\t}),\n\tcss(`.${caretOnLeftClassName}::before`, {\n\t\tleft: 0,\n\t\tright: \"auto\",\n\t\tpadding: css.variable(\"--framer-input-padding\"),\n\t\tpaddingRight: `${10}px`,\n\t\tbackgroundPosition: `right ${10}px center`,\n\t\tmaskPosition: `right ${10}px center`\n\t}),\n\tcss(`.${selectWrapperClassName} select:required:invalid`, { color: css.variable(\"--framer-input-invalid-text-color\") }),\n\tcss(`.${selectWrapperClassName}:focus-within, .${selectWrapperClassName}.${forcedFocusClassName}`, {\n\t\tbackground: css.variable(\"--framer-input-focused-background\", \"--framer-input-background\"),\n\t\tboxShadow: css.variable(\"--framer-input-focused-box-shadow\", \"--framer-input-box-shadow\")\n\t}),\n\tcss(`.${selectWrapperClassName}:focus-within::after, .${selectWrapperClassName}.${forcedFocusClassName}::after`, {\n\t\tborderColor: css.variable(\"--framer-input-focused-border-color\", \"--framer-input-border-color\"),\n\t\tborderStyle: css.variable(\"--framer-input-focused-border-style\", \"--framer-input-border-style\"),\n\t\tborderWidth: css.variable(\"--framer-input-focused-border-width\", inputBorderAllSides)\n\t}),\n\tcss(`.${selectWrapperClassName} select option`, { color: \"#000\" }),\n\tcss(`.${selectWrapperClassName} select option:disabled`, { color: \"rgba(0, 0, 0, 0.4)\" })\n])();\nconst FormSelect = /* @__PURE__ */ withCSS(Select, styles, \"framer-lib-form-select\");\n\n//#endregion\n//#region ../../library/src/render/presentation/useEscToClose.ts\n/** @private */\nfunction useEscToClose(isOpen, close) {\n\tuseEffect(() => {\n\t\tfunction handleKeyDown(e) {\n\t\t\tif (e.key === \"Escape\" && isOpen) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tclose();\n\t\t\t}\n\t\t}\n\t\twindow.addEventListener(\"keyup\", handleKeyDown);\n\t\treturn () => window.removeEventListener(\"keyup\", handleKeyDown);\n\t}, [isOpen, close]);\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/withLightbox.tsx\nfunction calculateImageWidth(aspectRatio, maxWidth, totalHorizontalPadding, totalVerticalPadding) {\n\tconst availableHeight = window.innerHeight - totalVerticalPadding;\n\tconst availableWidth = Math.min(window.innerWidth - totalHorizontalPadding, maxWidth);\n\tconst maxWidthBasedOnHeight = availableHeight / aspectRatio;\n\treturn Math.min(availableWidth, maxWidthBasedOnHeight);\n}\nfunction optimisticallyDecodeImage(image, { width, height }) {\n\tif (!image.src || !image.srcSet) return;\n\tconst i = new window.Image();\n\ti.src = image.src;\n\ti.srcset = image.srcSet;\n\ti.sizes = image.sizes || \"\";\n\ti.width = width;\n\ti.height = height;\n\treturn i.decode();\n}\nfunction getPortalContainer() {\n\treturn document.getElementById(\"template-overlay\") ?? document.getElementById(\"overlay\") ?? document.body;\n}\nfunction getSidePadding(value, padding) {\n\tif (isNumber(value)) return value;\n\treturn padding ?? 0;\n}\nfunction getTotalVerticalPadding(lightbox) {\n\treturn getSidePadding(lightbox?.paddingTop, lightbox?.padding) + getSidePadding(lightbox?.paddingBottom, lightbox?.padding);\n}\nfunction getTotalHorizontalPadding(lightbox) {\n\treturn getSidePadding(lightbox?.paddingLeft, lightbox?.padding) + getSidePadding(lightbox?.paddingRight, lightbox?.padding);\n}\n/**\n* Create a new srcset for the image. Discard an existing srcset even if it exists, since we avoid\n* generating srcset entries that are smaller than the trigger. The lightbox however may scale down\n* past that since it is tied to the screen size.\n*/\nfunction createImageWithSrcSet(lightbox, background) {\n\tif (!lightbox || !background?.src) return background;\n\tconst base = new URL(background.src);\n\tbase.searchParams.delete(\"scale-down-to\");\n\tbase.searchParams.delete(\"lossless\");\n\treturn {\n\t\t...background,\n\t\tsizes: `min(100vw, ${lightbox.maxWidth - getTotalHorizontalPadding(lightbox)}px)`,\n\t\tsrcSet: getSrcSet(background.nodeFixedSize, background, background.src).srcSet\n\t};\n}\nconst distortionTransforms = (() => ({\n\tx: void 0,\n\ty: void 0,\n\tz: 0,\n\ttranslateX: void 0,\n\ttranslateY: void 0,\n\ttranslateZ: 0,\n\trotate: void 0,\n\trotateX: 0,\n\trotateY: 0,\n\trotateZ: void 0,\n\tscale: 1,\n\tscaleX: 1,\n\tscaleY: 1,\n\tscaleZ: 1,\n\tskew: 0,\n\tskewX: 0,\n\tskewY: 0,\n\toriginX: void 0,\n\toriginY: void 0,\n\toriginZ: void 0,\n\tperspective: 0,\n\ttransformPerspective: 0\n}))();\nfunction isDistortionTransform(values) {\n\tif (!values) return false;\n\tfor (const k in values) {\n\t\tif (!(k in distortionTransforms)) continue;\n\t\tconst identityValue = distortionTransforms[k];\n\t\tconst value = values[k];\n\t\tif (!isNumber(identityValue) || !isNumber(value)) continue;\n\t\tif (identityValue === value) continue;\n\t\treturn true;\n\t}\n\treturn false;\n}\n/**\n* Check if an element is distorted by transforms, either by its own style, or by an ancestor.\n*/\nfunction isDistorted(ref) {\n\tconst element = visualElementStore.get(ref.current);\n\tif (!element) return false;\n\tif (isDistortionTransform(element.projection?.latestValues)) return true;\n\tconst path = element.projection?.path;\n\tif (!path || path.length === 0) return false;\n\tfor (const p of path) if (isDistortionTransform(p.latestValues)) return true;\n\treturn false;\n}\nconst enterExitBackdropAnimation = { opacity: 0 };\nconst targetBackdropAnimation = { opacity: 1 };\n/**\n* when browser view transitions support interruptions use that here...\n*/\nfunction withLightboxEffect(Component) {\n\treturn forwardRef(function LightboxEffect({ lightbox, lightboxClassName, onClick, ...props }, forwardedRef) {\n\t\tconst config = useContext(MotionConfigContext);\n\t\tconst ancestorTickerContext = useContext(TickerContext);\n\t\tconst isInTickerItem = Boolean(ancestorTickerContext);\n\t\tconst fallbackRef = useRef(null);\n\t\tconst ref = forwardedRef ?? fallbackRef;\n\t\tconst decodePromiseRef = useRef();\n\t\tconst image = useMemo(() => createImageWithSrcSet(lightbox, props.background), [lightbox, props.background]);\n\t\tconst [open, setOpen] = useState(false);\n\t\tconst [openOverrides, setOpenOverrides] = useState();\n\t\tconst onOpen = useCallback(() => {\n\t\t\tif (!lightbox) return;\n\t\t\tif (open) {\n\t\t\t\tstartTransition(() => {\n\t\t\t\t\tsetOpen(true);\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tframe.read(() => {\n\t\t\t\tif (!ref.current) return;\n\t\t\t\tconst style = getComputedStyle(ref.current);\n\t\t\t\tconst borderStyle = ref.current.getAttribute(\"data-border\") === \"true\" ? getComputedStyle(ref.current, \"::after\") : void 0;\n\t\t\t\tconst width = ref.current.offsetWidth ?? 1;\n\t\t\t\tconst height = ref.current.offsetHeight ?? 1;\n\t\t\t\tconst transition = isDistorted(ref) || isInTickerItem ? { duration: 0 } : lightbox.transition;\n\t\t\t\tstartTransition(() => {\n\t\t\t\t\tsetOpenOverrides({\n\t\t\t\t\t\tborderRadius: style.borderRadius,\n\t\t\t\t\t\taspectRatio: width / (height || 1),\n\t\t\t\t\t\tborderTop: borderStyle?.borderTopWidth,\n\t\t\t\t\t\tborderRight: borderStyle?.borderRightWidth,\n\t\t\t\t\t\tborderBottom: borderStyle?.borderBottomWidth,\n\t\t\t\t\t\tborderLeft: borderStyle?.borderLeftWidth,\n\t\t\t\t\t\tborderStyle: borderStyle?.borderStyle,\n\t\t\t\t\t\tborderColor: borderStyle?.borderColor,\n\t\t\t\t\t\ttransition,\n\t\t\t\t\t\timageRendering: style.imageRendering,\n\t\t\t\t\t\tfilter: style.filter\n\t\t\t\t\t});\n\t\t\t\t\tsetOpen(true);\n\t\t\t\t\tancestorTickerContext?.stop();\n\t\t\t\t});\n\t\t\t});\n\t\t}, [\n\t\t\tlightbox,\n\t\t\topen,\n\t\t\tref,\n\t\t\tancestorTickerContext?.stop,\n\t\t\tisInTickerItem\n\t\t]);\n\t\tconst aspectRatio = openOverrides?.aspectRatio ?? 1;\n\t\tconst decode = useStableCallback(() => {\n\t\t\tif (!lightbox || !image?.src) return;\n\t\t\tconst srcDecodePromise = decodePromiseRef.current?.[image.src];\n\t\t\tif (srcDecodePromise) return srcDecodePromise;\n\t\t\tconst width = calculateImageWidth(aspectRatio, lightbox.maxWidth, getTotalHorizontalPadding(lightbox), getTotalVerticalPadding(lightbox));\n\t\t\tconst promise = optimisticallyDecodeImage(image, {\n\t\t\t\twidth,\n\t\t\t\theight: width * aspectRatio\n\t\t\t});\n\t\t\tdecodePromiseRef.current = { [image.src]: promise };\n\t\t\treturn promise;\n\t\t});\n\t\tconst handleClick = useCallback(async (e) => {\n\t\t\tonClick?.(e);\n\t\t\tif (open || !lightbox || !image) return;\n\t\t\tawait decode();\n\t\t\tonOpen();\n\t\t}, [\n\t\t\tonClick,\n\t\t\tonOpen,\n\t\t\topen,\n\t\t\timage,\n\t\t\tlightbox,\n\t\t\tdecode\n\t\t]);\n\t\tconst onClose = useCallback((e) => {\n\t\t\te?.stopPropagation();\n\t\t\tstartTransition(() => {\n\t\t\t\tsetOpen(false);\n\t\t\t});\n\t\t}, []);\n\t\tuseEscToClose(open, onClose);\n\t\tuseEffect(() => {\n\t\t\tif (!lightbox) return;\n\t\t\tlet timer;\n\t\t\tfunction enter() {\n\t\t\t\ttimer = setTimeout(() => {\n\t\t\t\t\tdecode();\n\t\t\t\t}, 50);\n\t\t\t}\n\t\t\tfunction clear() {\n\t\t\t\tclearTimeout(timer);\n\t\t\t}\n\t\t\tconst currentRef = ref.current;\n\t\t\tcurrentRef?.addEventListener(\"mouseenter\", enter);\n\t\t\tcurrentRef?.addEventListener(\"mouseleave\", clear);\n\t\t\tcurrentRef?.addEventListener(\"pointerdown\", decode);\n\t\t\treturn () => {\n\t\t\t\tclear();\n\t\t\t\tcurrentRef?.removeEventListener(\"mouseenter\", enter);\n\t\t\t\tcurrentRef?.removeEventListener(\"mouseleave\", clear);\n\t\t\t\tcurrentRef?.removeEventListener(\"pointerdown\", decode);\n\t\t\t};\n\t\t}, [\n\t\t\tdecode,\n\t\t\tref,\n\t\t\tlightbox\n\t\t]);\n\t\tconst fallbackLayoutId = useId();\n\t\tconst transition = openOverrides?.transition ?? props.transition ?? config.transition;\n\t\tconst borderRadius = openOverrides?.borderRadius;\n\t\tconst imageRendering = openOverrides?.imageRendering;\n\t\tconst filter = openOverrides?.filter;\n\t\tconst borderTop = openOverrides?.borderTop;\n\t\tconst borderRight = openOverrides?.borderRight;\n\t\tconst borderBottom = openOverrides?.borderBottom;\n\t\tconst borderLeft = openOverrides?.borderLeft;\n\t\tconst borderStyle = openOverrides?.borderStyle;\n\t\tconst borderColor = openOverrides?.borderColor;\n\t\tconst hasAnyBorder = Boolean(borderTop || borderRight || borderBottom || borderLeft || borderStyle || borderColor);\n\t\tconst border = hasAnyBorder ? {\n\t\t\t\"--border-top-width\": borderTop,\n\t\t\t\"--border-right-width\": borderRight,\n\t\t\t\"--border-bottom-width\": borderBottom,\n\t\t\t\"--border-left-width\": borderLeft,\n\t\t\t\"--border-style\": borderStyle,\n\t\t\t\"--border-color\": borderColor\n\t\t} : void 0;\n\t\tconst portalProps = { [portalIdAttribute]: props.id };\n\t\tconst paddingTop = getSidePadding(lightbox?.paddingTop, lightbox?.padding);\n\t\tconst paddingBottom = getSidePadding(lightbox?.paddingBottom, lightbox?.padding);\n\t\tconst paddingLeft = getSidePadding(lightbox?.paddingLeft, lightbox?.padding);\n\t\tconst paddingRight = getSidePadding(lightbox?.paddingRight, lightbox?.padding);\n\t\tconst style = openOverrides?.borderRadius ? {\n\t\t\t...props.style,\n\t\t\tborderRadius: openOverrides.borderRadius\n\t\t} : props.style;\n\t\tconst layoutDependency = open ? props.layoutDependency ? `${props.layoutDependency}-open` : \"open\" : props.layoutDependency;\n\t\tconst layoutId = isInTickerItem && open ? void 0 : props.layoutId ?? (lightbox ? fallbackLayoutId : void 0);\n\t\treturn /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Component, {\n\t\t\t...props,\n\t\t\tstyle,\n\t\t\tonClick: handleClick,\n\t\t\tlayoutId,\n\t\t\tref,\n\t\t\tlayoutDependency,\n\t\t\ttransition\n\t\t}), /* @__PURE__ */ jsx(AnimatePresence, {\n\t\t\tonExitComplete: () => {\n\t\t\t\tstartTransition(() => {\n\t\t\t\t\tsetOpenOverrides(void 0);\n\t\t\t\t\tancestorTickerContext?.start();\n\t\t\t\t});\n\t\t\t},\n\t\t\tchildren: open && lightbox && image && /* @__PURE__ */ jsx(Fragment, { children: createPortal(/* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(motion.div, {\n\t\t\t\t...portalProps,\n\t\t\t\tclassName: lightboxClassName,\n\t\t\t\tonClick: onClose,\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: \"fixed\",\n\t\t\t\t\tinset: 0,\n\t\t\t\t\tzIndex: lightbox.zIndex,\n\t\t\t\t\tbackgroundColor: lightbox.backdrop ?? \"transparent\"\n\t\t\t\t},\n\t\t\t\ttransition,\n\t\t\t\tinitial: enterExitBackdropAnimation,\n\t\t\t\tanimate: targetBackdropAnimation,\n\t\t\t\texit: enterExitBackdropAnimation\n\t\t\t}), /* @__PURE__ */ jsx(motion.div, {\n\t\t\t\t...portalProps,\n\t\t\t\tclassName: lightboxClassName,\n\t\t\t\tstyle: {\n\t\t\t\t\talignItems: \"center\",\n\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\tinset: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,\n\t\t\t\t\tjustifyContent: \"center\",\n\t\t\t\t\tpointerEvents: \"none\",\n\t\t\t\t\tposition: \"fixed\",\n\t\t\t\t\tzIndex: lightbox.zIndex\n\t\t\t\t},\n\t\t\t\tchildren: /* @__PURE__ */ jsx(\"div\", {\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\talignItems: \"center\",\n\t\t\t\t\t\taspectRatio,\n\t\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\t\tjustifyContent: \"center\",\n\t\t\t\t\t\tmaxHeight: \"100%\",\n\t\t\t\t\t\tposition: \"relative\",\n\t\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\t\tmaxWidth: lightbox.maxWidth\n\t\t\t\t\t},\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(motion.div, {\n\t\t\t\t\t\tlayoutId,\n\t\t\t\t\t\ttransition,\n\t\t\t\t\t\tonClick: onOpen,\n\t\t\t\t\t\tclassName: \"framer-lightbox-container\",\n\t\t\t\t\t\t\"data-border\": hasAnyBorder,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\taspectRatio,\n\t\t\t\t\t\t\tborderRadius,\n\t\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\tuserSelect: \"none\",\n\t\t\t\t\t\t\timageRendering,\n\t\t\t\t\t\t\tfilter,\n\t\t\t\t\t\t\t...border\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(BackgroundImageComponent, {\n\t\t\t\t\t\t\timage,\n\t\t\t\t\t\t\talt: image.alt,\n\t\t\t\t\t\t\tdraggable: props.draggable\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t})] }), getPortalContainer()) }, \"backdrop\")\n\t\t})] });\n\t});\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Image.tsx\nconst Component$1 = /* @__PURE__ */ React.forwardRef(function Image(props, ref) {\n\tconst { background, children, alt, draggable, fitImageDimension, style: styleFromProps, ...rest } = props;\n\tconst style = { ...styleFromProps };\n\tconst intrinsicSize = useMemo(() => getIntrinsicSizeForBackgroundImage(background), [background]);\n\tconst [fallbackIntrinsicSize, setFallbackIntrinsicSize] = useState();\n\tReact.useEffect(() => {\n\t\tif (!background?.src) return;\n\t\tif (!fitImageDimension) return;\n\t\tif (intrinsicSize) return;\n\t\tconst img = document.createElement(\"img\");\n\t\timg.onload = () => {\n\t\t\tif (img.naturalWidth && img.naturalHeight) startTransition(() => setFallbackIntrinsicSize({\n\t\t\t\twidth: img.naturalWidth,\n\t\t\t\theight: img.naturalHeight\n\t\t\t}));\n\t\t};\n\t\timg.src = background.src;\n\t}, [\n\t\tbackground?.src,\n\t\tfitImageDimension,\n\t\tintrinsicSize\n\t]);\n\tconst size = intrinsicSize ?? fallbackIntrinsicSize;\n\tif (fitImageDimension && size) {\n\t\tstyle[fitImageDimension] = \"auto\";\n\t\tstyle.aspectRatio = size.width / size.height;\n\t}\n\tif (background) delete style.background;\n\tconst MotionComponent = htmlElementAsMotionComponent(props.as);\n\treturn /* @__PURE__ */ jsxs(MotionComponent, {\n\t\t...rest,\n\t\tstyle,\n\t\tref,\n\t\tdraggable,\n\t\tchildren: [background && /* @__PURE__ */ jsx(BackgroundImageComponent, {\n\t\t\timage: background,\n\t\t\talt,\n\t\t\tdraggable\n\t\t}), children]\n\t});\n});\n/** @public */\nconst Image$1 = /* @__PURE__ */ withLightboxEffect(Component$1);\n\n//#endregion\n//#region ../../library/src/render/presentation/withColumnMasonryLayout.tsx\nconst ColumnMasonryLayout = /* @__PURE__ */ React.memo(function ColumnMasonryLayout({ trackCount, rowGap, parentIsDataRepeater = false, itemsOrder, children }) {\n\tlet normalizedChildren = prepareChildrenArrayForMasonry(children, parentIsDataRepeater);\n\tif (itemsOrder?.length) normalizedChildren = reorderChildrenForItemsOrder(normalizedChildren, itemsOrder);\n\tconst tracks = groupChildrenIntoTracks(trackCount, normalizedChildren);\n\tconst wrapperStyle = getMasonryColumnStyle(rowGap);\n\treturn tracks.map((trackChildren, i) => /* @__PURE__ */ jsx(\"div\", {\n\t\tstyle: wrapperStyle,\n\t\tchildren: trackChildren\n\t}, getMasonryColumnKey(i)));\n});\nfunction getChildOrderId(child) {\n\treturn React.isValidElement(child) ? child.props[\"data-framer-order-id\"] : void 0;\n}\n/**\n* Reorder children based on the parent's itemsOrder property.\n*\n* We need to do this as our column masonry layout cannot utilize the `order` CSS property due to\n* conflicts with the redistribution of children into flex box tracks. Instead, we're marking each\n* child with a `data-framer-order-id` attribute that we can later extract from the serialized JSX and\n* reorder them based on the itemsOrder prop.\n*\n* @param children Serialized JSX children of the original node.\n* @param itemsOrder Visual ordering of children based on their original ids.\n* @returns Children reordered based on the itemsOrder.\n*/\nfunction reorderChildrenForItemsOrder(children, itemsOrder) {\n\tconst childrenById = /* @__PURE__ */ new Map();\n\tconst remaining = [];\n\tconst orderSet = new Set(itemsOrder);\n\tfor (const child of children) {\n\t\tconst id = getChildOrderId(child);\n\t\tif (id && orderSet.has(id)) childrenById.set(id, child);\n\t\telse remaining.push(child);\n\t}\n\tconst ordered = [];\n\tfor (const id of itemsOrder) {\n\t\tconst child = childrenById.get(id);\n\t\tif (child) ordered.push(child);\n\t}\n\treturn [...ordered, ...remaining];\n}\nfunction prepareChildrenArrayForMasonry(children, parentIsDataRepeater) {\n\tconst array = React.Children.toArray(children);\n\tif (!parentIsDataRepeater) return array;\n\treturn array.flatMap((child) => React.isValidElement(child) && child.type === React.Fragment ? React.Children.toArray(child.props.children) : child);\n}\n/**\n* Split the given children into Masonry tracks (columns) using the\n* provided distribution algorithm.\n*/\nfunction groupChildrenIntoTracks(trackCount, children) {\n\tconst tracks = Array.from({ length: trackCount }, () => []);\n\tchildren.forEach((child, idx) => {\n\t\tconst track = pickMasonryTrack(trackCount, idx);\n\t\ttracks[track]?.push(child);\n\t});\n\treturn tracks;\n}\n/**\n* Compute the base column wrapper style for a Masonry stack.\n*/\nfunction getMasonryColumnStyle(rowGap) {\n\treturn {\n\t\tdisplay: \"flex\",\n\t\tflexDirection: \"column\",\n\t\trowGap,\n\t\twidth: \"100%\"\n\t};\n}\n/**\n* Get the key for a Masonry column wrapper.\n*/\nfunction getMasonryColumnKey(i) {\n\treturn `masonry-stack-${i}`;\n}\n/**\n* Simple picker function that evenly distributes children into tracks.\n*\n* This approach differs from  the proposed CSS specification, as the latter works with\n* height-aware distribution instead of child order.\n*\n* We're using the child index for a sequential distribution due to the fact that\n* our distribution logic needs to work both on the client and the server, and considering\n* that some nodes would have heights that we would need to measure on the client, we\n* cannot guarantee a consistent distribution on the server.\n*\n* Example:\n*   Suppose there are 3 tracks/columns and 7 children:\n*\n*   | Track 0 | Track 1 | Track 2 |\n*   |---------|---------|---------|\n*   |   0     |   1     |   2     |\n*   |   3     |   4     |   5     |\n*   |   6     |         |         |\n*\n*   Each child is placed in (childIndex % trackCount):\n*     pickMasonryTrack(3, 0) // 0 → Track 0\n*     pickMasonryTrack(3, 1) // 1 → Track 1\n*     pickMasonryTrack(3, 2) // 2 → Track 2\n*     pickMasonryTrack(3, 3) // 0 → Track 0 (wraps)\n*     ...\n*/\nfunction pickMasonryTrack(trackCount, childIndex) {\n\tif (trackCount <= 0) return 0;\n\treturn childIndex % trackCount;\n}\n/** @internal */\nconst withColumnMasonryLayout = (Component) => {\n\treturn forwardRef(function MasonryLayout({ columnMasonryLayoutEnabled, trackCount = 1, rowGap, parentIsDataRepeater, itemsOrder, children, style: existingStyle, ...rest }, ref) {\n\t\tif (!columnMasonryLayoutEnabled) return /* @__PURE__ */ jsx(Component, {\n\t\t\tref,\n\t\t\tstyle: existingStyle,\n\t\t\t...rest,\n\t\t\tchildren\n\t\t});\n\t\tconst mergedStyle = {\n\t\t\t...existingStyle,\n\t\t\tgridTemplateColumns: `repeat(${trackCount}, 1fr)`\n\t\t};\n\t\treturn /* @__PURE__ */ jsx(Component, {\n\t\t\tref,\n\t\t\tstyle: mergedStyle,\n\t\t\t...rest,\n\t\t\tchildren: /* @__PURE__ */ jsx(ColumnMasonryLayout, {\n\t\t\t\ttrackCount,\n\t\t\t\trowGap,\n\t\t\t\tparentIsDataRepeater,\n\t\t\t\titemsOrder,\n\t\t\t\tchildren\n\t\t\t})\n\t\t});\n\t});\n};\n\n//#endregion\n//#region ../../library/src/render/presentation/formatRelativeDate.ts\nconst formatters = /* @__PURE__ */ new Map();\nfunction getRelativeTimeFormat(style, numeric, locale) {\n\tconst args = [locale, {\n\t\tnumeric,\n\t\tstyle\n\t}];\n\tconst key = JSON.stringify(args);\n\tconst existing = formatters.get(key);\n\tif (existing) return existing;\n\tconst formatter = new Intl.RelativeTimeFormat(...args);\n\tformatters.set(key, formatter);\n\treturn formatter;\n}\nfunction formatRelativeDate(targetDate, referenceDate, format, style, numeric, capitalize, locale) {\n\tconst unit = getRelativeDateUnit(targetDate, referenceDate, format);\n\tconst value = getRelativeDateValue(targetDate, referenceDate, unit);\n\tconst formatted = getRelativeTimeFormat(style, numeric, locale).format(value, unit);\n\tif (capitalize) return capitalizeFirstLetter(formatted);\n\treturn formatted;\n}\nfunction capitalizeFirstLetter(text) {\n\treturn text.charAt(0).toUpperCase() + text.slice(1);\n}\nfunction getRelativeDateUnit(targetDate, referenceDate, format) {\n\tif (format !== \"auto\") return format;\n\tconst daysDiff = differenceInCalendarDays(targetDate, referenceDate);\n\tif (Math.abs(daysDiff) <= 7) return \"day\";\n\tconst weeksDiff = differenceInCalendarWeeks(targetDate, referenceDate);\n\tif (Math.abs(weeksDiff) <= 4) return \"week\";\n\tconst monthsDiff = differenceInCalendarMonths(targetDate, referenceDate);\n\tif (Math.abs(monthsDiff) <= 12) return \"month\";\n\treturn \"year\";\n}\nconst SECOND = 1e3;\nconst MINUTE = 6e4;\nconst HOUR = 36e5;\nconst DAY = 864e5;\nconst WEEK = 6048e5;\nfunction getRelativeDateValue(targetDate, referenceDate, unit) {\n\tconst delta = targetDate.getTime() - referenceDate.getTime();\n\tswitch (unit) {\n\t\tcase \"second\": return Math.trunc(delta / SECOND);\n\t\tcase \"minute\": return Math.trunc(delta / MINUTE);\n\t\tcase \"hour\": return Math.trunc(delta / HOUR);\n\t\tcase \"day\": return differenceInCalendarDays(targetDate, referenceDate);\n\t\tcase \"week\": return differenceInCalendarWeeks(targetDate, referenceDate);\n\t\tcase \"month\": return differenceInCalendarMonths(targetDate, referenceDate);\n\t\tcase \"quarter\": return differenceInCalendarQuarters(targetDate, referenceDate);\n\t\tcase \"year\": return differenceInCalendarYears(targetDate, referenceDate);\n\t}\n}\nfunction getUTCStartOfDay(date) {\n\tconst result = new Date(date);\n\tresult.setUTCHours(0, 0, 0, 0);\n\treturn result;\n}\nfunction differenceInCalendarDays(targetDate, referenceDate) {\n\tconst targetTimestamp = getUTCStartOfDay(targetDate).getTime();\n\tconst referenceTimestamp = getUTCStartOfDay(referenceDate).getTime();\n\treturn Math.round((targetTimestamp - referenceTimestamp) / DAY);\n}\nfunction getUTCStartOfWeek(date) {\n\tconst result = new Date(date);\n\tconst day = result.getUTCDay();\n\tconst diff = (day < 1 ? 7 : 0) + day - 1;\n\tresult.setUTCDate(result.getUTCDate() - diff);\n\tresult.setUTCHours(0, 0, 0, 0);\n\treturn result;\n}\nfunction differenceInCalendarWeeks(targetDate, referenceDate) {\n\tconst targetTimestamp = getUTCStartOfWeek(targetDate).getTime();\n\tconst referenceTimestamp = getUTCStartOfWeek(referenceDate).getTime();\n\treturn Math.round((targetTimestamp - referenceTimestamp) / WEEK);\n}\nfunction differenceInCalendarMonths(targetDate, referenceDate) {\n\tconst yearsDiff = targetDate.getUTCFullYear() - referenceDate.getUTCFullYear();\n\tconst monthsDiff = targetDate.getUTCMonth() - referenceDate.getUTCMonth();\n\treturn yearsDiff * 12 + monthsDiff;\n}\nfunction getUTCQuarter(date) {\n\tconst month = date.getUTCMonth();\n\treturn Math.trunc(month / 3);\n}\nfunction differenceInCalendarQuarters(targetDate, referenceDate) {\n\tconst yearsDiff = targetDate.getUTCFullYear() - referenceDate.getUTCFullYear();\n\tconst quartersDiff = getUTCQuarter(targetDate) - getUTCQuarter(referenceDate);\n\treturn yearsDiff * 4 + quartersDiff;\n}\nfunction differenceInCalendarYears(targetDate, referenceDate) {\n\treturn targetDate.getUTCFullYear() - referenceDate.getUTCFullYear();\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/RelativeDate.tsx\nconst RelativeDate = /* @__PURE__ */ memo$1(function RelativeDate({ date: dateString, dateFormat = \"auto\", dateStyle = \"long\", dateNumeric = \"auto\", dateCapitalize = false, locale: externalLocale, ...props }) {\n\tconst fallbackLocale = useLocaleCode();\n\tconst locale = externalLocale || fallbackLocale;\n\tconst targetDate = dateString ? new Date(dateString) : null;\n\tconst [currentDate, setCurrentDate] = useState(getCurrentDate);\n\tconst interval = dateFormat === \"second\" ? 1e3 : 6e4;\n\tuseEffect(() => {\n\t\tconst timeout = setInterval(() => {\n\t\t\tstartTransition(() => {\n\t\t\t\tsetCurrentDate(getCurrentDate);\n\t\t\t});\n\t\t}, interval);\n\t\treturn () => {\n\t\t\tclearInterval(timeout);\n\t\t};\n\t}, [interval]);\n\tif (!isValidDate(targetDate)) return null;\n\tconst formattedDate = targetDate.toLocaleString(locale, {\n\t\ttimeZone: \"UTC\",\n\t\tdateStyle: \"long\",\n\t\ttimeStyle: dateFormat === \"second\" ? \"medium\" : dateFormat === \"minute\" || dateFormat === \"hour\" ? \"short\" : void 0\n\t});\n\tconst formattedRelativeDate = formatRelativeDate(targetDate, currentDate, dateFormat, dateStyle, dateNumeric, dateCapitalize, locale);\n\tconst formattedIsoDate = targetDate.toISOString();\n\treturn /* @__PURE__ */ jsxs(\"time\", {\n\t\tsuppressHydrationWarning: true,\n\t\tdateTime: formattedIsoDate,\n\t\ttitle: formattedDate,\n\t\t...props,\n\t\tchildren: [isWindow ? formattedRelativeDate : formattedDate, isWindow ? null : /* @__PURE__ */ jsx(\"script\", {\n\t\t\t\"data-relative-date-script\": \"inline\",\n\t\t\tdangerouslySetInnerHTML: { __html: createHydrationScript(targetDate, dateFormat, dateStyle, dateNumeric, dateCapitalize, locale) }\n\t\t})]\n\t});\n});\nfunction getCurrentDate() {\n\tconst date = /* @__PURE__ */ new Date();\n\treturn new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n}\nfunction createHydrationScript(date, format, style, numeric, capitalize, locale) {\n\treturn `document.currentScript.parentElement.textContent = window.__framer_formatRelativeDate(new Date(${date.getTime()}), new Date(), ${JSON.stringify(format)}, ${JSON.stringify(style)}, ${JSON.stringify(numeric)}, ${JSON.stringify(capitalize)}, ${JSON.stringify(locale)})`;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/filterValidMotionAndDOMProps.ts\nfunction filterValidMotionAndDOMProps(props) {\n\tconst validProps = {};\n\tfor (const key in props) if (isValidMotionProp(key) || isPropValid(key)) validProps[key] = props[key];\n\treturn validProps;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/dom.ts\n/** @internal */\nconst frameFromElement = (element) => {\n\tconst rect = Rect.fromRect(element.getBoundingClientRect());\n\trect.x = rect.x + safeWindow.scrollX;\n\trect.y = rect.y + safeWindow.scrollY;\n\treturn rect;\n};\n/** @internal */\nconst frameFromElements = (elements) => {\n\treturn Rect.merge(...elements.map(frameFromElement));\n};\n/** Returns a page frame for the given element */\nconst convertToPageFrame = (rect, element) => {\n\tconst point = convertToPagePoint(rect, element);\n\treturn {\n\t\tx: point.x,\n\t\ty: point.y,\n\t\twidth: rect.width,\n\t\theight: rect.height\n\t};\n};\n/** Returns a parent frame for the given element */\nconst convertFromPageFrame = (rect, element) => {\n\tconst point = convertFromPagePoint(rect, element);\n\treturn {\n\t\tx: point.x,\n\t\ty: point.y,\n\t\twidth: rect.width,\n\t\theight: rect.height\n\t};\n};\nconst getPageFrame = (element) => {\n\tconst rect = element.getBoundingClientRect();\n\treturn {\n\t\tx: rect.left + safeWindow.scrollX,\n\t\ty: rect.top + safeWindow.scrollY,\n\t\twidth: rect.width,\n\t\theight: rect.height\n\t};\n};\nconst fromEventForPage = (event) => {\n\treturn {\n\t\tx: event.pageX,\n\t\ty: event.pageY\n\t};\n};\nconst fromEventForClient = (event) => {\n\treturn {\n\t\tx: event.clientX,\n\t\ty: event.clientY\n\t};\n};\nconst convertToPagePoint = (point, element) => {\n\tconst rect = getPageFrame(element);\n\treturn {\n\t\tx: point.x + rect.x,\n\t\ty: point.y + rect.y\n\t};\n};\nconst convertFromPagePoint = (point, element) => {\n\tconst rect = getPageFrame(element);\n\treturn {\n\t\tx: point.x - rect.x,\n\t\ty: point.y - rect.y\n\t};\n};\n/** @internal */\nconst dispatchKeyDownEvent = (keyCode, options = {}) => {\n\tconst keyboardEvent = new KeyboardEvent(\"keydown\", {\n\t\tbubbles: true,\n\t\tkeyCode,\n\t\t...options\n\t});\n\tconst activeElement = document.activeElement;\n\tif (activeElement) activeElement.dispatchEvent(keyboardEvent);\n};\n/** @internal */\nconst DOM = {\n\tframeFromElement,\n\tframeFromElements,\n\tconvertToPageFrame,\n\tconvertFromPageFrame,\n\tgetPageFrame,\n\tfromEventForPage,\n\tfromEventForClient,\n\tconvertToPagePoint,\n\tconvertFromPagePoint\n};\nlet parser;\nconst supportsNativeParseHTML = /* #__PURE__ */ (() => !isFirefox() && typeof Document !== \"undefined\" && typeof Document.parseHTMLUnsafe === \"function\")();\n/**\n* @important Can cause XSS vulnerabilities if the returned document is appended to the current DOM.\n*/\nfunction domParser(html, type) {\n\tif (supportsNativeParseHTML && !type) return Document.parseHTMLUnsafe(html);\n\tparser ??= new DOMParser();\n\treturn parser.parseFromString(html, type ?? \"text/html\");\n}\nfunction escapeHTML(value) {\n\treturn value.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\").replaceAll(\">\", \"&gt;\").replaceAll(\"\\\"\", \"&quot;\").replaceAll(\"'\", \"&#39;\");\n}\n\n//#endregion\n//#region ../../library/src/modules/replaceFramerPageLinks.ts\n/** A regex that searches for html tags, and href values. */\nconst regex = /(<([a-z]+)(?:\\s+(?!href[\\s=])[^=\\s]+=(?:'[^']*'|\"[^\"]*\"))*)(?:(\\s+href\\s*=)(?:'([^']*)'|\"([^\"]*)\"))?((?:\\s+[^=\\s]+=(?:'[^']*'|\"[^\"]*\"))*>)/gi;\n/**\n* @internal @deprecated\n*/\nfunction replaceFramerPageLinks(rawHTML, getRoute, currentRoute, implicitPathVariables) {\n\treturn rawHTML.replace(regex, (original, pre1, tag, pre2, value1, value2, post) => {\n\t\tif (tag.toLowerCase() !== \"a\") return original;\n\t\tconst href = value1 || value2;\n\t\tconst pageLink = parseFramerPageLink(href.replace(/&amp;/gu, \"&\"));\n\t\tif (!pageLink?.target) return original;\n\t\tconst targetRoute = getRoute(pageLink.target);\n\t\tif (!isRoute(targetRoute) || !isRoute(currentRoute)) return original;\n\t\tconst targetPath = targetRoute.path;\n\t\tconst currentPath = currentRoute.path;\n\t\tif (!targetPath || !currentPath) return original;\n\t\tlet attributes = ` ${\"data-framer-page-link-target\"}=\"${pageLink.target}\"`;\n\t\tconst elementId = getRouteElementId(targetRoute, pageLink.element ?? void 0);\n\t\tif (elementId) attributes += ` ${\"data-framer-page-link-element\"}=\"${pageLink.element}\"`;\n\t\tconst link = linkFromFramerPageLink(href);\n\t\tif (!link || isString(link)) return original;\n\t\tif (linkMatchesRoute(currentRoute, link, implicitPathVariables)) attributes += ` ${\"data-framer-page-link-current\"}`;\n\t\tlet relativePath = targetPath;\n\t\tconst pathVariables = Object.assign({}, implicitPathVariables, pageLink.collectionItem?.pathVariables);\n\t\tif (Object.keys(pathVariables).length > 0) relativePath = relativePath.replace(pathVariablesRegExp, (_, key) => \"\" + pathVariables[key]);\n\t\tif (pageLink.collectionItem?.pathVariables) {\n\t\t\tconst params = new URLSearchParams(pageLink.collectionItem.pathVariables);\n\t\t\tattributes += ` ${\"data-framer-page-link-path-variables\"}=\"${params}\"`;\n\t\t}\n\t\trelativePath = computeRelativePath(currentPath, relativePath);\n\t\treturn pre1 + pre2 + `\"${escapeHTML(relativePath + (elementId ? `#${elementId}` : \"\"))}\"` + attributes + post;\n\t});\n}\n\n//#endregion\n//#region ../../library/src/render/utils/isShallowEqualArray.ts\n/** @internal */\nfunction isShallowEqualArray(a, b) {\n\treturn a.length === b.length && a.every((v, i) => v === b[i]);\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/DeprecatedRichText.tsx\n/**\n* @internal\n* Don't change these values as they are used in generated components as well.\n*/\nconst deprecatedRichTextPlaceholder = \"{{ text-placeholder }}\";\nconst richTextWrapperClassName = \"rich-text-wrapper\";\n/** @internal @deprecated */\nconst DeprecatedRichTextInner = /* @__PURE__ */ React$1.forwardRef(function Text(props, forwardedRef) {\n\tconst { id, name, html, htmlFromDesign, text, textFromDesign, fonts = [], width, height, left, right, top, bottom, center, className, stylesPresetsClassName, visible = true, opacity, rotation = 0, verticalAlignment = \"top\", isEditable = false, environment = RenderTarget.current, withExternalLayout = false, positionSticky, positionStickyTop, positionStickyRight, positionStickyBottom, positionStickyLeft, __htmlStructure, __fromCanvasComponent = false, _forwardedOverrideId, _forwardedOverrides, _usesDOMRect, children: _children, ...rest } = props;\n\tconst parentSize = useParentSize();\n\tconst layoutId = useLayoutId(props);\n\tconst fallbackLayoutRef = useRef(null);\n\tconst layoutRef = forwardedRef ?? fallbackLayoutRef;\n\tconst { navigate, getRoute } = useRouter();\n\tconst currentRoute = useCurrentRoute();\n\tuseRoutePreloader(props.preload ?? []);\n\tuseMeasureLayout(props, layoutRef);\n\tconst inCodeComponent = React$1.useContext(ComponentContainerContext);\n\tconst isOnCanvas = useIsOnFramerCanvas();\n\tlet textOrOverride = text;\n\tconst forwardedOverrideId = _forwardedOverrideId ?? id;\n\tif (forwardedOverrideId && _forwardedOverrides) {\n\t\tconst override = _forwardedOverrides[forwardedOverrideId];\n\t\tif (typeof override === \"string\") textOrOverride = override;\n\t}\n\tlet innerHTML = \"\";\n\tif (textOrOverride) {\n\t\tconst escapedText = escapeHTML(textOrOverride);\n\t\tinnerHTML = __htmlStructure ? __htmlStructure.replace(deprecatedRichTextPlaceholder, escapedText) : `<p>${escapedText}</p>`;\n\t} else if (html) innerHTML = html;\n\telse if (textFromDesign) {\n\t\tconst escapedText = escapeHTML(textFromDesign);\n\t\tinnerHTML = __htmlStructure ? __htmlStructure.replace(deprecatedRichTextPlaceholder, escapedText) : `<p>${escapedText}</p>`;\n\t} else if (htmlFromDesign) innerHTML = htmlFromDesign;\n\tconst implicitPathVariables = useImplicitPathVariables();\n\tconst innerHTMLWithReplacedFramerPageLinks = React$1.useMemo(() => {\n\t\tif (isOnCanvas || !getRoute || !currentRoute) return innerHTML;\n\t\treturn replaceFramerPageLinks(innerHTML, getRoute, currentRoute, implicitPathVariables);\n\t}, [\n\t\tinnerHTML,\n\t\tgetRoute,\n\t\tcurrentRoute,\n\t\timplicitPathVariables\n\t]);\n\tReact$1.useEffect(() => {\n\t\tconst container = layoutRef.current;\n\t\tif (container === null) return;\n\t\tfunction interceptPageLinks(event) {\n\t\t\tconst anchorElement = findAnchorElement(event.target, layoutRef.current);\n\t\t\tif (isCommandKeyPressed(event) || !navigate || !anchorElement || anchorElement.getAttribute(\"target\") === \"_blank\") return;\n\t\t\tif (navigateFromAttributes(navigate, anchorElement, implicitPathVariables)) event.preventDefault();\n\t\t}\n\t\tcontainer.addEventListener(\"click\", interceptPageLinks);\n\t\treturn () => {\n\t\t\tcontainer.removeEventListener(\"click\", interceptPageLinks);\n\t\t};\n\t}, [navigate, implicitPathVariables]);\n\tuseLoadFonts(fonts, __fromCanvasComponent, layoutRef);\n\tif (!visible) return null;\n\tconst isHidden = isEditable && environment() === RenderTarget.canvas;\n\tconst style = {\n\t\toutline: \"none\",\n\t\tdisplay: \"flex\",\n\t\tflexDirection: \"column\",\n\t\tjustifyContent: convertVerticalAlignment$1(verticalAlignment),\n\t\topacity: isHidden ? 0 : opacity,\n\t\tflexShrink: 0\n\t};\n\tconst restrictedRenderTarget = RenderTarget.hasRestrictions();\n\tconst rect = calculateRect(props, parentSize || 0, false);\n\tconst isAutoSized = _usesDOMRect && (width === \"auto\" || height === \"auto\");\n\tconst hasTransformTemplate = !!props.transformTemplate || !rect || !restrictedRenderTarget || __fromCanvasComponent || isAutoSized;\n\tconst template = hasTransformTemplate ? props.transformTemplate ?? transformTemplate(center) : void 0;\n\tif (!withExternalLayout) {\n\t\tif (rect && restrictedRenderTarget && !isAutoSized) {\n\t\t\tconst rotate = Animatable.getNumber(rotation).toFixed(4);\n\t\t\tstyle.transform = `translate(${rect.x}px, ${rect.y}px) rotate(${rotate}deg)`;\n\t\t\tstyle.width = rect.width;\n\t\t\tstyle.minWidth = rect.width;\n\t\t\tstyle.height = rect.height;\n\t\t} else {\n\t\t\tstyle.left = left;\n\t\t\tstyle.right = right;\n\t\t\tstyle.top = top;\n\t\t\tstyle.bottom = bottom;\n\t\t\tstyle.width = width;\n\t\t\tstyle.height = height;\n\t\t\tstyle.rotate = rotation;\n\t\t}\n\t\tif (positionSticky) {\n\t\t\tif (!isOnCanvas || inCodeComponent) {\n\t\t\t\tstyle.position = \"sticky\";\n\t\t\t\tstyle.willChange = \"transform\";\n\t\t\t\tstyle.top = positionStickyTop;\n\t\t\t\tstyle.right = positionStickyRight;\n\t\t\t\tstyle.bottom = positionStickyBottom;\n\t\t\t\tstyle.left = positionStickyLeft;\n\t\t\t}\n\t\t} else if (isOnCanvas && (props.positionFixed || props.positionAbsolute)) style.position = \"absolute\";\n\t}\n\tcollectFiltersFromProps(props, style);\n\tcollectTextShadowsForProps(props, style);\n\tObject.assign(style, props.style);\n\treturn /* @__PURE__ */ jsx(motion.div, {\n\t\tid,\n\t\tref: layoutRef,\n\t\t...filterValidMotionAndDOMProps(asRecord(rest)),\n\t\t...layoutHintDataProps(hasTransformTemplate ? center : void 0, props.style),\n\t\tstyle,\n\t\tlayoutId,\n\t\t\"data-framer-name\": name,\n\t\t\"data-framer-component-type\": \"DeprecatedRichText\",\n\t\t\"data-center\": center,\n\t\tclassName: cx(className, stylesPresetsClassName, richTextWrapperClassName),\n\t\ttransformTemplate: template,\n\t\tdangerouslySetInnerHTML: { __html: innerHTMLWithReplacedFramerPageLinks }\n\t});\n});\nconst DeprecatedRichText = /* @__PURE__ */ withLibraryCSS(DeprecatedRichTextInner);\nfunction convertVerticalAlignment$1(verticalAlignment) {\n\tswitch (verticalAlignment) {\n\t\tcase \"top\": return \"flex-start\";\n\t\tcase \"center\": return \"center\";\n\t\tcase \"bottom\": return \"flex-end\";\n\t}\n}\nfunction useLoadFonts(fonts, fromCanvasComponent, containerRef) {\n\tconst prevFontsRef = useRef([]);\n\tif (!isShallowEqualArray(prevFontsRef.current, fonts)) {\n\t\tprevFontsRef.current = fonts;\n\t\truntime.fontStore.loadFonts(fonts).then(({ newlyLoadedFontCount }) => {\n\t\t\tif (!fromCanvasComponent || !containerRef.current || RenderTarget.current() !== RenderTarget.canvas) return;\n\t\t\tif (newlyLoadedFontCount > 0) measureClosestComponentContainer(containerRef.current);\n\t\t});\n\t}\n}\n\n//#endregion\n//#region ../../library/src/render/utils/patchAndWaitForChild.ts\nfunction newOverrideableRef() {\n\treturn { current: null };\n}\n/**\n* Overrides the ref's `current` property, and resolves the returned promise when the ref is set for the first time.\n* Rejects the returned promise if the controller's signal is aborted, or if the ref unmounts.\n*/\nasync function patchAndWaitForChild(ref, controller) {\n\tlet current = ref.current;\n\tif (current) return current;\n\t/**\n\t* The elements in the set are refs of children. If they're wrapped in Suspense, they could mount later than the container.\n\t* Thus, we wait for each ref to be set.\n\t* We do that step by step (awaiting 1 ref at a time) as optimization, as it's likely that all refs mount at once.\n\t*/\n\tlet refCallbackResolve;\n\tconst refCallbackPromise = new Promise((resolve, reject) => {\n\t\trefCallbackResolve = resolve;\n\t\tcontroller.signal.addEventListener(\"abort\", () => reject());\n\t});\n\tObject.defineProperty(ref, \"current\", {\n\t\tget() {\n\t\t\treturn current;\n\t\t},\n\t\tset(element) {\n\t\t\tcurrent = element;\n\t\t\tif (element === null) {\n\t\t\t\tcontroller.abort();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trefCallbackResolve(element);\n\t\t},\n\t\tconfigurable: true\n\t});\n\treturn refCallbackPromise;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/useTextEffect.tsx\nconst defaultValues = {\n\topacity: 1,\n\ty: 0,\n\tx: 0,\n\tscale: 1,\n\trotate: 0,\n\trotateX: 0,\n\trotateY: 0,\n\tskewX: 0,\n\tskewY: 0,\n\tfilter: \"none\"\n};\nfunction isEffectKey(key) {\n\treturn key in defaultValues;\n}\nfunction createKeyframes(effect, shouldReduceMotion) {\n\tconst out = {};\n\tfor (const key in effect) {\n\t\tif (!isEffectKey(key)) continue;\n\t\tconst effectValue = effect[key];\n\t\tconst defaultValue = defaultValues[key];\n\t\tif (isUndefined(effectValue) || isUndefined(defaultValue)) continue;\n\t\tif (shouldReduceMotion && key !== \"opacity\") continue;\n\t\tout[key] = [effectValue, defaultValue];\n\t}\n\treturn out;\n}\nconst emojiSplitRe = /* @__PURE__ */ (() => {\n\treturn /\\p{Regional_Indicator}{2}|\\p{Emoji}\\p{Emoji_Modifier}?\\p{Variation_Selector}?(?:\\u{200d}\\p{Emoji}\\p{Emoji_Modifier}?\\p{Variation_Selector}?)*|./gu;\n})();\nfunction tokenizeText(text, tokenization = \"character\", elements, shouldReduceMotion, style) {\n\tif (shouldReduceMotion) {\n\t\tconst ref = newOverrideableRef();\n\t\telements.add(ref);\n\t\treturn /* @__PURE__ */ jsx(\"span\", {\n\t\t\tref,\n\t\t\tstyle,\n\t\t\tchildren: text\n\t\t});\n\t}\n\tswitch (tokenization) {\n\t\tcase \"character\":\n\t\tcase \"line\": {\n\t\t\tconst words = text.split(\" \");\n\t\t\tconst lastWordIndex = words.length - 1;\n\t\t\treturn words.map((word, wordIndex) => {\n\t\t\t\tconst isLastWord = wordIndex === lastWordIndex;\n\t\t\t\tconst short = word.length <= 12;\n\t\t\t\treturn /* @__PURE__ */ jsxs(React$1.Fragment, { children: [/* @__PURE__ */ jsx(\"span\", {\n\t\t\t\t\tstyle: { whiteSpace: short ? \"nowrap\" : \"unset\" },\n\t\t\t\t\tchildren: word.match(emojiSplitRe)?.map((char, i) => {\n\t\t\t\t\t\tconst ref = newOverrideableRef();\n\t\t\t\t\t\telements.add(ref);\n\t\t\t\t\t\treturn /* @__PURE__ */ jsx(\"span\", {\n\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t\tstyle,\n\t\t\t\t\t\t\tchildren: char\n\t\t\t\t\t\t}, char + i);\n\t\t\t\t\t})\n\t\t\t\t}), isLastWord ? null : \" \"] }, word + wordIndex + isLastWord);\n\t\t\t});\n\t\t}\n\t\tcase \"word\": {\n\t\t\tconst words = text.split(\" \");\n\t\t\tconst lastWordIndex = words.length - 1;\n\t\t\treturn words.map((char, i) => {\n\t\t\t\tconst isLastWord = i === lastWordIndex;\n\t\t\t\tconst ref = newOverrideableRef();\n\t\t\t\telements.add(ref);\n\t\t\t\treturn /* @__PURE__ */ jsxs(React$1.Fragment, { children: [/* @__PURE__ */ jsx(\"span\", {\n\t\t\t\t\tref,\n\t\t\t\t\tstyle,\n\t\t\t\t\tchildren: char\n\t\t\t\t}), isLastWord ? null : \" \"] }, char + i + isLastWord);\n\t\t\t});\n\t\t}\n\t\tdefault: return text;\n\t}\n}\nfunction tokenizationForEffect(effect) {\n\tconst type = effect.type;\n\tswitch (type) {\n\t\tcase \"appear\": return effect.tokenization ?? \"character\";\n\t\tdefault: assertNever$1(type);\n\t}\n}\nfunction transformString$1(effect) {\n\tconst transforms = [];\n\tif (isNumber(effect.x)) transforms.push(`translateX(${effect.x}px)`);\n\tif (isNumber(effect.y)) transforms.push(`translateY(${effect.y}px)`);\n\tif (isNumber(effect.scale)) transforms.push(`scale(${effect.scale})`);\n\tif (isNumber(effect.rotate)) transforms.push(`rotate(${effect.rotate}deg)`);\n\tif (isNumber(effect.rotateX)) transforms.push(`rotateX(${effect.rotateX}deg)`);\n\tif (isNumber(effect.rotateY)) transforms.push(`rotateY(${effect.rotateY}deg)`);\n\tif (isNumber(effect.skewX)) transforms.push(`skewX(${effect.skewX}deg)`);\n\tif (isNumber(effect.skewY)) transforms.push(`skewY(${effect.skewY}deg)`);\n\treturn transforms.join(\" \");\n}\nfunction getInitialEffectStyle(canPlay, canAnimate, effect, shouldReduceMotion) {\n\tif (!effect?.effect) return void 0;\n\tconst type = effect.type;\n\tswitch (type) {\n\t\tcase \"appear\": switch (effect.tokenization) {\n\t\t\tcase \"element\":\n\t\t\t\tif (!canPlay || !canAnimate) return void 0;\n\t\t\t\treturn {\n\t\t\t\t\topacity: effect.effect.opacity,\n\t\t\t\t\tfilter: shouldReduceMotion ? void 0 : effect.effect.filter,\n\t\t\t\t\ttransform: shouldReduceMotion ? void 0 : transformString$1(effect.effect)\n\t\t\t\t};\n\t\t\tdefault:\n\t\t\t\tif (!canPlay || !canAnimate) return { display: \"inline-block\" };\n\t\t\t\treturn {\n\t\t\t\t\tdisplay: \"inline-block\",\n\t\t\t\t\topacity: effect.effect.opacity,\n\t\t\t\t\tfilter: shouldReduceMotion ? void 0 : effect.effect.filter,\n\t\t\t\t\ttransform: shouldReduceMotion ? void 0 : transformString$1(effect.effect)\n\t\t\t\t};\n\t\t}\n\t\tdefault: assertNever$1(type);\n\t}\n}\n/** @internal */\nfunction useTextEffect(config, ref, preview) {\n\tconst elements = useConstant(() => /* @__PURE__ */ new Set());\n\tconst isRenderingStaticContent = isStaticRenderer();\n\tconst canPlay = preview || !isRenderingStaticContent;\n\tconst shouldReduceMotion = useReducedMotionConfig();\n\tconst state = React$1.useRef({\n\t\thasMounted: false,\n\t\thasAnimatedOnce: false,\n\t\tisAnimating: false,\n\t\teffect: config\n\t});\n\tstate.current.effect = config;\n\tconst trigger = config?.trigger ?? \"onMount\";\n\tconst target = config?.target;\n\tconst threshold = config?.threshold;\n\tReact$1.useEffect(() => {\n\t\tif (!canPlay || preview) return;\n\t\tstate.current.hasMounted = true;\n\t\tfunction play() {\n\t\t\tconst { effect } = state.current;\n\t\t\tif (!canPlay || !effect) return;\n\t\t\tif (effect?.repeat !== true && state.current.hasAnimatedOnce) return;\n\t\t\tif (effect?.type === \"appear\" && state.current.isAnimating) return;\n\t\t\tObject.assign(state.current, {\n\t\t\t\thasAnimatedOnce: true,\n\t\t\t\tisAnimating: true\n\t\t\t});\n\t\t\tconst type = effect.type;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"appear\": {\n\t\t\t\t\tconst { transition, startDelay, repeat, tokenization } = effect;\n\t\t\t\t\tconst cleanupRef = { current: void 0 };\n\t\t\t\t\trunAppearEffect(tokenization, effect.effect, elements, transition, startDelay, repeat, shouldReduceMotion, () => {\n\t\t\t\t\t\tObject.assign(state.current, { isAnimating: false });\n\t\t\t\t\t}, cleanupRef);\n\t\t\t\t\treturn () => cleanupRef.current?.();\n\t\t\t\t}\n\t\t\t\tdefault: assertNever$1(type);\n\t\t\t}\n\t\t}\n\t\tswitch (trigger) {\n\t\t\tcase \"onMount\":\n\t\t\t\tplay();\n\t\t\t\treturn;\n\t\t\tcase \"onInView\": {\n\t\t\t\tconst element = ref?.current;\n\t\t\t\tif (!element) return;\n\t\t\t\treturn inView(element, play, { amount: threshold ?? 0 });\n\t\t\t}\n\t\t\tcase \"onScrollTarget\": {\n\t\t\t\tconst element = target?.ref?.current;\n\t\t\t\tif (!element) return;\n\t\t\t\treturn inView(element, play, {\n\t\t\t\t\tamount: threshold ?? 0,\n\t\t\t\t\troot: document,\n\t\t\t\t\tmargin: target?.offset ? `${target.offset}px 0px 0px 0px` : void 0\n\t\t\t\t});\n\t\t\t}\n\t\t\tdefault: assertNever$1(trigger);\n\t\t}\n\t}, [\n\t\tcanPlay,\n\t\telements,\n\t\tpreview,\n\t\tref,\n\t\ttarget,\n\t\tthreshold,\n\t\ttrigger\n\t]);\n\tconst effectEnabled = !!config;\n\tconst tokenization = config ? tokenizationForEffect(config) : void 0;\n\treturn React$1.useMemo(() => ({\n\t\tgetTokenizer: () => {\n\t\t\telements.clear();\n\t\t\tif (!effectEnabled) return void 0;\n\t\t\tconst { hasMounted, hasAnimatedOnce, effect } = state.current;\n\t\t\tconst effectStyle = getInitialEffectStyle(canPlay, preview || mayAnimate(hasMounted, hasAnimatedOnce, effect), state.current.effect, shouldReduceMotion);\n\t\t\treturn {\n\t\t\t\ttext: (text) => tokenizeText(text, tokenization, elements, shouldReduceMotion, effectStyle),\n\t\t\t\tprops: (style) => {\n\t\t\t\t\tif (effect?.tokenization !== \"element\") return void 0;\n\t\t\t\t\tconst r = newOverrideableRef();\n\t\t\t\t\telements.add(r);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tref: r,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\t...effectStyle\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tplay: () => {\n\t\t\tconst { effect } = state.current;\n\t\t\tif (!effect) return;\n\t\t\tconst type = effect.type;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"appear\": {\n\t\t\t\t\tconst { transition, startDelay } = effect;\n\t\t\t\t\trunAppearEffect(tokenization, effect.effect, elements, transition, startDelay, false, shouldReduceMotion);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: assertNever$1(type);\n\t\t\t}\n\t\t}\n\t}), [\n\t\tcanPlay,\n\t\teffectEnabled,\n\t\telements,\n\t\tpreview,\n\t\ttokenization\n\t]);\n}\nfunction mayAnimate(hasMounted, hasAnimatedOnce, effect) {\n\treturn !(hasMounted && effect?.trigger === \"onMount\" || hasAnimatedOnce && !effect?.repeat && (effect?.trigger === \"onInView\" || effect?.trigger === \"onScrollTarget\"));\n}\nasync function runAppearEffect(tokenization = \"character\", effect, elements, transition, startDelay = 0, repeat = false, shouldReduceMotion, callback, cleanupRef) {\n\tconst enter = createKeyframes(effect, shouldReduceMotion);\n\tconst controller = new AbortController();\n\tif (cleanupRef) cleanupRef.current = () => controller.abort();\n\tswitch (tokenization) {\n\t\tcase \"character\":\n\t\tcase \"element\":\n\t\tcase \"word\": {\n\t\t\tconst list = await createElementList(elements, controller);\n\t\t\tif (list === null) return;\n\t\t\tanimate$1(list, enter, {\n\t\t\t\t...transition,\n\t\t\t\trestDelta: .001,\n\t\t\t\tdelay: stagger(transition?.delay ?? 0, { startDelay })\n\t\t\t}).then(() => callback?.());\n\t\t\tif (!repeat || !cleanupRef) return;\n\t\t\tcleanupRef.current = () => {\n\t\t\t\tconst actualEffect = shouldReduceMotion ? { opacity: effect.opacity } : effect;\n\t\t\t\tanimate$1(list, actualEffect, {\n\t\t\t\t\t...transition,\n\t\t\t\t\trestDelta: .001,\n\t\t\t\t\tdelay: stagger(transition?.delay ?? 0, { startDelay })\n\t\t\t\t});\n\t\t\t};\n\t\t\treturn;\n\t\t}\n\t\tcase \"line\": {\n\t\t\ttry {\n\t\t\t\tfor (const element of elements) await patchAndWaitForChild(element, controller);\n\t\t\t} catch {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet list;\n\t\t\tframe.read(() => {\n\t\t\t\tlist = createLineGroups(elements);\n\t\t\t\tif (list.length === 0) return;\n\t\t\t\tframe.update(() => {\n\t\t\t\t\tconst animations = list.map((group, i) => {\n\t\t\t\t\t\treturn animate$1(group, enter, {\n\t\t\t\t\t\t\t...transition,\n\t\t\t\t\t\t\trestDelta: .001,\n\t\t\t\t\t\t\tdelay: startDelay + i * (transition?.delay ?? 0)\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tPromise.all(animations).then(() => callback?.());\n\t\t\t\t});\n\t\t\t});\n\t\t\tif (!repeat || !cleanupRef) return;\n\t\t\tcleanupRef.current = () => {\n\t\t\t\tif (list.length === 0) return;\n\t\t\t\tconst actualEffect = shouldReduceMotion ? { opacity: effect.opacity } : effect;\n\t\t\t\tlist.forEach((group, i) => {\n\t\t\t\t\tanimate$1(group, actualEffect, {\n\t\t\t\t\t\t...transition,\n\t\t\t\t\t\trestDelta: .001,\n\t\t\t\t\t\tdelay: startDelay + i * (transition?.delay ?? 0)\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t};\n\t\t\treturn;\n\t\t}\n\t\tdefault: assertNever$1(tokenization);\n\t}\n}\nasync function createElementList(elements, controller) {\n\tif (elements.size === 0) return null;\n\tconst list = [];\n\tfor (const element of elements) try {\n\t\tconst node = await patchAndWaitForChild(element, controller);\n\t\tif (node) list.push(node);\n\t} catch {\n\t\treturn null;\n\t}\n\treturn list;\n}\nfunction createLineGroups(elements) {\n\tconst groups = [];\n\tlet currentGroup = [];\n\tlet lastOffset = null;\n\tfor (const element of elements) {\n\t\tif (!element.current) continue;\n\t\tconst top = element.current.offsetTop;\n\t\tconst height = element.current.offsetHeight;\n\t\tif (!height || lastOffset === null || top === lastOffset) currentGroup.push(element.current);\n\t\telse {\n\t\t\tgroups.push(currentGroup);\n\t\t\tcurrentGroup = [element.current];\n\t\t}\n\t\tif (height) lastOffset = top;\n\t}\n\tgroups.push(currentGroup);\n\treturn groups;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/RichText.tsx\nconst BaseSVG = /* @__PURE__ */ forwardRef(function BaseSVG(props, forwardedRef) {\n\treturn /* @__PURE__ */ jsx(\"svg\", {\n\t\t...props,\n\t\tref: forwardedRef,\n\t\tchildren: props.children\n\t});\n});\nconst MotionSVG = /* @__PURE__ */ motion.create(BaseSVG);\nconst FitText = /* @__PURE__ */ forwardRef(function FitText({ viewBoxScale, viewBox, children, ...props }, forwardedRef) {\n\treturn /* @__PURE__ */ jsx(MotionSVG, {\n\t\t...props,\n\t\tref: forwardedRef,\n\t\tviewBox,\n\t\tchildren: /* @__PURE__ */ jsx(motion.foreignObject, {\n\t\t\twidth: \"100%\",\n\t\t\theight: \"100%\",\n\t\t\tclassName: \"framer-fit-text\",\n\t\t\ttransform: `scale(${viewBoxScale})`,\n\t\t\tstyle: {\n\t\t\t\toverflow: \"visible\",\n\t\t\t\ttransformOrigin: \"center center\"\n\t\t\t},\n\t\t\tchildren\n\t\t})\n\t});\n});\nconst defaultFonts = [];\nconst richTextContainerComponentType = \"RichTextContainer\";\nconst RichTextContainer = /* @__PURE__ */ forwardRef(function RichTextContainer(props, forwardedRef) {\n\tconst { __fromCanvasComponent = false, _forwardedOverrideId, _forwardedOverrides, _usesDOMRect, anchorLinkOffsetY, as: _as, bottom, center, children, environment = RenderTarget.current, fonts = defaultFonts, height, isEditable = false, left, name, opacity, positionSticky, positionStickyBottom, positionStickyLeft, positionStickyRight, positionStickyTop, right, rotation = 0, style, _initialStyle, stylesPresetsClassNames, text: plainText, top, verticalAlignment = \"top\", visible = true, width, withExternalLayout = false, viewBox, viewBoxScale = 1, effect, ...rest } = props;\n\tconst parentSize = useParentSize();\n\tconst renderTarget = environment();\n\tconst isOnCanvas = renderTarget === RenderTarget.canvas;\n\tconst isRenderingStaticContent = isOnCanvas || renderTarget === RenderTarget.export;\n\tconst inCodeComponent = useContext(ComponentContainerContext);\n\tconst layoutId = useLayoutId(props);\n\tconst fallbackRef = useRef(null);\n\tconst containerRef = forwardedRef ?? fallbackRef;\n\tuseMeasureLayout(props, containerRef);\n\tuseLoadFonts(fonts, __fromCanvasComponent, containerRef);\n\tconst textEffect = useTextEffect(effect, containerRef);\n\tconst processedChildren = useMemo(() => {\n\t\tif (!children) return;\n\t\treturn processRichTextChildren(children, stylesPresetsClassNames, plainText, anchorLinkOffsetY, void 0, textEffect.getTokenizer());\n\t}, [\n\t\tchildren,\n\t\tstylesPresetsClassNames,\n\t\tplainText,\n\t\tanchorLinkOffsetY,\n\t\ttextEffect\n\t]);\n\tif (!visible) return null;\n\tconst containerStyle = { opacity: isEditable && isOnCanvas ? 0 : opacity };\n\t/**\n\t* If the dynamic inline styles match the default static styles, we don't need to set them\n\t* inline. This reduces the size of the published sites' html. We need to be careful not to\n\t* remove animatable motion styles, but justify content is not animated in rich text.\n\t* @see https://www.notion.so/framer/71c2ef9441cf40a39f59d4ad51ec0e29?v=e8e59361f11b404c969372616a0af5a0\n\t*/\n\tconst justifyContent = convertVerticalAlignment$1(verticalAlignment);\n\tif (justifyContent !== defaultRichTextContainerStyle.justifyContent) containerStyle.justifyContent = justifyContent;\n\tconst positionStyle = {};\n\tconst restrictedRenderTarget = RenderTarget.hasRestrictions();\n\tconst rect = calculateRect(props, parentSize || 0, false);\n\tconst isAutoSized = _usesDOMRect && (width === \"auto\" || height === \"auto\");\n\tconst hasTransformTemplate = !!props.transformTemplate || !rect || !restrictedRenderTarget || __fromCanvasComponent || isAutoSized;\n\tconst template = hasTransformTemplate ? props.transformTemplate ?? transformTemplate(center) : void 0;\n\tif (!withExternalLayout) {\n\t\tif (rect && restrictedRenderTarget && !isAutoSized) {\n\t\t\tpositionStyle.x = rect.x + (isNumber(style?.x) ? style.x : 0);\n\t\t\tpositionStyle.y = rect.y + (isNumber(style?.y) ? style.y : 0);\n\t\t\tpositionStyle.left = 0;\n\t\t\tpositionStyle.top = 0;\n\t\t\tcontainerStyle.rotate = Animatable.getNumber(rotation);\n\t\t\tcontainerStyle.width = rect.width;\n\t\t\tcontainerStyle.minWidth = rect.width;\n\t\t\tcontainerStyle.height = rect.height;\n\t\t} else {\n\t\t\tcontainerStyle.left = left;\n\t\t\tcontainerStyle.right = right;\n\t\t\tcontainerStyle.top = top;\n\t\t\tcontainerStyle.bottom = bottom;\n\t\t\tcontainerStyle.width = width;\n\t\t\tcontainerStyle.height = height;\n\t\t\tcontainerStyle.rotate = rotation;\n\t\t}\n\t\tif (positionSticky) {\n\t\t\tif (!isRenderingStaticContent || inCodeComponent) {\n\t\t\t\tcontainerStyle.position = \"sticky\";\n\t\t\t\tcontainerStyle.willChange = \"transform\";\n\t\t\t\tcontainerStyle.top = positionStickyTop;\n\t\t\t\tcontainerStyle.right = positionStickyRight;\n\t\t\t\tcontainerStyle.bottom = positionStickyBottom;\n\t\t\t\tcontainerStyle.left = positionStickyLeft;\n\t\t\t}\n\t\t} else if (isOnCanvas && (props.positionFixed || props.positionAbsolute)) containerStyle.position = \"absolute\";\n\t}\n\tcollectFiltersFromProps(props, containerStyle);\n\tcollectTextShadowsForProps(props, containerStyle);\n\tObject.assign(containerStyle, _initialStyle, style, positionStyle);\n\tif (layoutId) rest.layout = \"preserve-aspect\";\n\tconst Component = htmlElementAsMotionComponent(props.as);\n\tconst dataFramerName = rest[\"data-framer-name\"] ?? name;\n\tconst validRestProps = filterValidMotionAndDOMProps(asRecord(rest));\n\tconst layoutHints = layoutHintDataProps(hasTransformTemplate ? center : void 0, style);\n\tif (isString(props.viewBox)) {\n\t\tif (props.as !== void 0) return /* @__PURE__ */ jsx(Component, {\n\t\t\t...validRestProps,\n\t\t\t...layoutHints,\n\t\t\tref: containerRef,\n\t\t\tstyle: containerStyle,\n\t\t\tlayoutId,\n\t\t\ttransformTemplate: template,\n\t\t\t\"data-framer-name\": dataFramerName,\n\t\t\t\"data-framer-component-type\": richTextContainerComponentType,\n\t\t\tchildren: /* @__PURE__ */ jsx(FitText, {\n\t\t\t\tviewBox,\n\t\t\t\tviewBoxScale,\n\t\t\t\tstyle: {\n\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\theight: \"100%\"\n\t\t\t\t},\n\t\t\t\tchildren: processedChildren\n\t\t\t})\n\t\t});\n\t\telse return /* @__PURE__ */ jsx(FitText, {\n\t\t\t...validRestProps,\n\t\t\t...layoutHints,\n\t\t\tref: containerRef,\n\t\t\tstyle: containerStyle,\n\t\t\tlayoutId,\n\t\t\tviewBox,\n\t\t\tviewBoxScale,\n\t\t\ttransformTemplate: template,\n\t\t\t\"data-framer-name\": dataFramerName,\n\t\t\t\"data-framer-component-type\": richTextContainerComponentType,\n\t\t\tchildren: processedChildren\n\t\t});\n\t}\n\treturn /* @__PURE__ */ jsx(Component, {\n\t\t...validRestProps,\n\t\t...layoutHints,\n\t\tref: containerRef,\n\t\tstyle: containerStyle,\n\t\tlayoutId,\n\t\ttransformTemplate: template,\n\t\t\"data-framer-name\": dataFramerName,\n\t\t\"data-framer-component-type\": richTextContainerComponentType,\n\t\tchildren: processedChildren\n\t});\n});\nfunction isFragment(element) {\n\treturn element.type === Fragment;\n}\nfunction isLineBreak(element) {\n\treturn element.type === \"br\";\n}\nfunction processRichTextChildren(element, stylesPresetsClassNames, plainText, anchorLinkOffsetY, slugCounters = {}, tokenizer, depth = isFragment(element) ? -1 : 0) {\n\tlet children = Children.toArray(element.props.children);\n\tif (!isUndefined(plainText)) children = children.slice(0, 1);\n\tlet onlyLineBreaks = true;\n\tchildren = children.map((child) => {\n\t\tif (!isValidElement(child) || !isLineBreak(child)) onlyLineBreaks = false;\n\t\tif (isValidElement(child)) return processRichTextChildren(child, stylesPresetsClassNames, plainText, anchorLinkOffsetY, slugCounters, tokenizer, depth + 1);\n\t\tconst text = !isUndefined(plainText) ? plainText : child;\n\t\treturn isString(text) && tokenizer ? tokenizer.text(text) : text;\n\t});\n\tconst { [\"data-preset-tag\"]: dataPresetTag, ...props } = element.props;\n\tif (isString(element.type) || isMotionComponent(element.type)) {\n\t\tconst elementType = unwrapMotionComponent(element.type) || element.type;\n\t\tconst tag = dataPresetTag || elementType;\n\t\tconst stylesPresetClassName = isString(tag) ? stylesPresetsClassNames?.[tag] : void 0;\n\t\tprops.className = cx(\"framer-text\", props.className, stylesPresetClassName);\n\t\tif (tokenizer && depth === 0 && !onlyLineBreaks) Object.assign(props, tokenizer.props(props.style));\n\t\tconst isHeading = elementType === \"h1\" || elementType === \"h2\" || elementType === \"h3\" || elementType === \"h4\" || elementType === \"h5\" || elementType === \"h6\";\n\t\tconst anchorLinkStylePresetClassName = stylesPresetsClassNames?.anchor;\n\t\tif (isHeading && anchorLinkStylePresetClassName) {\n\t\t\tconst slug = generateHeadingSlug(children, slugCounters);\n\t\t\tprops.id = slug;\n\t\t\tconst className = cx(\"framer-text\", anchorLinkStylePresetClassName);\n\t\t\tconst anchorLink = /* @__PURE__ */ jsx(\"a\", {\n\t\t\t\thref: `#${slug}`,\n\t\t\t\tclassName,\n\t\t\t\tchildren\n\t\t\t});\n\t\t\tprops.style = {\n\t\t\t\t...props.style,\n\t\t\t\tscrollMarginTop: anchorLinkOffsetY\n\t\t\t};\n\t\t\tchildren = [anchorLink];\n\t\t}\n\t\tif (tag === \"ol\") props.style = {\n\t\t\t...props.style,\n\t\t\t[maxListDigitsProperty]: safeGetMaxListDigits(props.start ?? 1, Children.count(props.children), props.style?.[\"--list-style-type\"] ?? \"\")\n\t\t};\n\t}\n\treturn cloneElement(element, props, ...children);\n}\nfunction generateHeadingSlug(children, slugCounters) {\n\tconst headingText = children.map(extractTextFromReactNode).join(\"\");\n\tlet slug = slugify(headingText);\n\tconst slugCounter = slugCounters[slug] ?? 0;\n\tif (slugCounter > 0) slug += `-${slugCounter}`;\n\tslugCounters[slug] = slugCounter + 1;\n\treturn slug;\n}\nfunction extractTextFromReactNode(node) {\n\tif (isString(node) || isNumber(node)) return node.toString();\n\tif (isValidElement(node)) return extractTextFromReactNode(node.props.children);\n\tif (Array.isArray(node)) return node.map(extractTextFromReactNode).join(\"\");\n\treturn \"\";\n}\nfunction safeGetMaxListDigits(start, itemCount, listStyleType) {\n\tconst startNumber = Number(start) || 1;\n\treturn getMaxListDigits(startNumber, itemCount, listStyleType);\n}\n/** @internal */\nconst RichTextInner = /* @__PURE__ */ forwardRef(function RichText({ children, html, htmlFromDesign, ...props }, forwardedRef) {\n\tconst content = html || children || htmlFromDesign;\n\tif (isString(content)) {\n\t\tif (!props.stylesPresetsClassName && isObject$1(props.stylesPresetsClassNames)) props.stylesPresetsClassName = Object.values(props.stylesPresetsClassNames).join(\" \");\n\t\tconst contentProp = { [isString(html) ? \"html\" : \"htmlFromDesign\"]: content };\n\t\treturn /* @__PURE__ */ jsx(DeprecatedRichText, {\n\t\t\t...props,\n\t\t\t...contentProp,\n\t\t\tref: forwardedRef\n\t\t});\n\t}\n\tif (!props.stylesPresetsClassNames && isString(props.stylesPresetsClassName)) {\n\t\tconst [h1, h2, h3, p, a] = props.stylesPresetsClassName.split(\" \");\n\t\tif (h1 === void 0 || h2 === void 0 || h3 === void 0 || p === void 0 || a === void 0) console.warn(`Encountered invalid stylesPresetsClassNames: ${props.stylesPresetsClassNames}`);\n\t\telse props.stylesPresetsClassNames = {\n\t\t\th1,\n\t\t\th2,\n\t\t\th3,\n\t\t\tp,\n\t\t\ta\n\t\t};\n\t}\n\treturn /* @__PURE__ */ jsx(RichTextContainer, {\n\t\t...props,\n\t\tref: forwardedRef,\n\t\tchildren: isValidElement(content) ? content : void 0\n\t});\n});\nconst RichText = /* @__PURE__ */ withLibraryCSS(RichTextInner);\n\n//#endregion\n//#region ../../library/src/render/utils/elementPropertiesForGradient.ts\n/**\n* Get a line made up of the 2 points where a line from the center of the layer\n* along the angle of the gradient would intersect with a 1x1 rectangle.\n*/\nfunction linearGradientLine(angle) {\n\tconst rad = angle * Math.PI / 180;\n\tconst offset = {\n\t\tx: -Math.sin(rad) * 100,\n\t\ty: Math.cos(rad) * 100\n\t};\n\tconst anglePoint = Point(offset.x, offset.y);\n\tconst angleLine = Line(Point(.5, .5), anglePoint);\n\tconst points = Rect.points({\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth: 1,\n\t\theight: 1\n\t});\n\tconst sortedPoints = points.map((point) => ({\n\t\tpoint,\n\t\tdistance: Point.distance(anglePoint, point)\n\t})).sort((a, b) => a.distance - b.distance);\n\tconst a = sortedPoints[0]?.point;\n\tconst b = sortedPoints[1]?.point;\n\tassert$1(a && b, \"linearGradientLine: Must have 2 closest points.\");\n\tconst [c, d] = points.filter((point) => !Point.isEqual(point, a) && !Point.isEqual(point, b));\n\tassert$1(c && d, \"linearGradientLine: Must have 2 opposing points.\");\n\tconst start = Line.intersection(angleLine, Line(a, b));\n\tconst end = Line.intersection(angleLine, Line(c, d));\n\tassert$1(start && end, \"linearGradientLine: Must have a start and end point.\");\n\treturn Line(start, end);\n}\nfunction elementPropertiesForLinearGradient(gradient, id) {\n\tconst line = linearGradientLine(gradient.angle);\n\tconst stops = gradientColorStops(gradient);\n\tconst startPosition = stops[0]?.position ?? 0;\n\tconst endPosition = stops[stops.length - 1]?.position ?? 1;\n\tconst startPoint = Line.pointAtPercentDistance(line, startPosition);\n\tconst endPoint = Line.pointAtPercentDistance(line, endPosition);\n\tconst interpolator = interpolate([startPosition, endPosition], [0, 1]);\n\treturn {\n\t\tid: `id${id}g${LinearGradient.hash(gradient)}`,\n\t\tx1: startPoint.x,\n\t\ty1: startPoint.y,\n\t\tx2: endPoint.x,\n\t\ty2: endPoint.y,\n\t\tstops: stops.map((stop) => ({\n\t\t\tcolor: stop.value,\n\t\t\talpha: ConvertColor.getAlpha(stop.value) * gradient.alpha,\n\t\t\tposition: interpolator(stop.position)\n\t\t}))\n\t};\n}\nfunction elementPropertiesForRadialGradient(gradient, id) {\n\treturn {\n\t\tid: `id${id}g${RadialGradient.hash(gradient)}`,\n\t\twidthFactor: gradient.widthFactor,\n\t\theightFactor: gradient.heightFactor,\n\t\tcenterAnchorX: gradient.centerAnchorX,\n\t\tcenterAnchorY: gradient.centerAnchorY,\n\t\tstops: gradientColorStops(gradient).map((stop) => ({\n\t\t\tcolor: stop.value,\n\t\t\talpha: ConvertColor.getAlpha(stop.value) * gradient.alpha,\n\t\t\tposition: stop.position\n\t\t}))\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/types/RelativeNumber.ts\n/** @public */\nfunction isRelativeNumber(value) {\n\tif (!isString(value)) return false;\n\tif (value.charAt(value.length - 1) !== \"%\") return false;\n\tconst withoutLastChar = value.slice(0, -1);\n\treturn isNumber(parseFloat(withoutLastChar));\n}\n/** @public */\nfunction getRelativeNumberValue(value) {\n\tconst withoutLastChar = value.slice(0, -1);\n\tconst float = parseFloat(withoutLastChar);\n\treturn isNumber(float) ? float : 50;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/imagePatternPropsForFill.tsx\nfunction getPositionXFraction(positionX) {\n\tif (isRelativeNumber(positionX)) return getRelativeNumberValue(positionX) / 100;\n\tif (positionX === \"left\") return 0;\n\tif (positionX === \"right\") return 1;\n\treturn .5;\n}\nfunction getPositionYFraction(positionY) {\n\tif (isRelativeNumber(positionY)) return getRelativeNumberValue(positionY) / 100;\n\tif (positionY === \"top\") return 0;\n\tif (positionY === \"bottom\") return 1;\n\treturn .5;\n}\n/** @internal */\nfunction imagePatternPropsForFill(fill, frame, id, includeTransform) {\n\tfill = Animatable.get(fill, \"#09F\");\n\tif (!BackgroundImage.isImageObject(fill)) return void 0;\n\tif (!fill.pixelWidth || !fill.pixelHeight) return void 0;\n\tconst imageWidth = fill.pixelWidth;\n\tconst imageHeight = fill.pixelHeight;\n\tlet transform;\n\tconst { fit } = fill;\n\tlet width = 1, height = 1;\n\tlet offsetX = 0;\n\tlet offsetY = 0;\n\tif (fit === \"fill\" || fit === \"fit\" || fit === \"tile\" || !fit) {\n\t\tlet scaleX = 1;\n\t\tlet scaleY = 1;\n\t\tconst imageRatio = imageWidth / imageHeight;\n\t\tconst realWidth = frame.height * imageRatio;\n\t\tconst realHeight = frame.width / imageRatio;\n\t\tconst validScaleX = realWidth / frame.width;\n\t\tconst validScaleY = realHeight / frame.height;\n\t\tif (fit === \"tile\") {\n\t\t\tfill.backgroundSize ??= 1;\n\t\t\twidth = Math.round(fill.backgroundSize * (imageWidth / 2));\n\t\t\theight = Math.round(fill.backgroundSize * (imageHeight / 2));\n\t\t\tconst layerPositionX = frame.x ?? 0;\n\t\t\tconst layerPositionY = frame.y ?? 0;\n\t\t\tlet extraOffsetX = 0;\n\t\t\tlet extraOffsetY = 0;\n\t\t\tif (includeTransform) {\n\t\t\t\textraOffsetX = layerPositionX;\n\t\t\t\textraOffsetY = layerPositionY;\n\t\t\t}\n\t\t\toffsetX = (frame.width - width) * getPositionXFraction(fill.positionX) + extraOffsetX;\n\t\t\toffsetY = (frame.height - height) * getPositionYFraction(fill.positionY) + extraOffsetY;\n\t\t\ttransform = `translate(${offsetX + layerPositionX}, ${offsetY + layerPositionY})`;\n\t\t} else {\n\t\t\tif (fit === \"fill\" || !fit ? validScaleY > validScaleX : validScaleY < validScaleX) {\n\t\t\t\tscaleY = validScaleY;\n\t\t\t\toffsetY = (1 - validScaleY) * getPositionYFraction(fill.positionY);\n\t\t\t} else {\n\t\t\t\tscaleX = validScaleX;\n\t\t\t\toffsetX = (1 - validScaleX) * getPositionXFraction(fill.positionX);\n\t\t\t}\n\t\t\ttransform = `translate(${offsetX}, ${offsetY}) scale(${scaleX}, ${scaleY})`;\n\t\t}\n\t}\n\treturn {\n\t\tid: `id${id}g-fillImage`,\n\t\tpath: fill.src ?? \"\",\n\t\ttransform,\n\t\twidth,\n\t\theight,\n\t\toffsetX,\n\t\toffsetY\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/utils/imageUrlForAsset.ts\nconst mediaType = \"framer/asset-reference,\";\nfunction isAssetReference(value) {\n\treturn value.startsWith(`data:${mediaType}`);\n}\n/**\n* @internal\n*/\nfunction imageUrlForAsset(asset, pixelSize) {\n\tif (/^\\w+:/u.test(asset) && !isAssetReference(asset)) return asset;\n\tif (typeof pixelSize !== \"number\") pixelSize = void 0;\n\telse if (pixelSize <= 512) pixelSize = 512;\n\telse if (pixelSize <= 1024) pixelSize = 1024;\n\telse if (pixelSize <= 2048) pixelSize = 2048;\n\telse pixelSize = 4096;\n\tconst isExport = RenderTarget.current() === RenderTarget.export;\n\treturn runtime.assetResolver(asset, {\n\t\tpixelSize,\n\t\tisExport\n\t}) ?? \"\";\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/ImagePatternElement.tsx\nconst ImagePatternElement = ({ id, path, transform, repeat, width, height, offsetX, offsetY }) => {\n\tconst href = imageUrlForAsset(path);\n\treturn /* @__PURE__ */ jsx(\"pattern\", {\n\t\tid,\n\t\twidth: repeat ? width : \"100%\",\n\t\theight: repeat ? height : \"100%\",\n\t\tpatternContentUnits: repeat ? void 0 : \"objectBoundingBox\",\n\t\tpatternUnits: repeat ? \"userSpaceOnUse\" : void 0,\n\t\tx: repeat ? offsetX : void 0,\n\t\ty: repeat ? offsetY : void 0,\n\t\tchildren: /* @__PURE__ */ jsx(\"image\", {\n\t\t\twidth: repeat ? width : 1,\n\t\t\theight: repeat ? height : 1,\n\t\t\thref,\n\t\t\tpreserveAspectRatio: \"none\",\n\t\t\ttransform: repeat ? void 0 : transform,\n\t\t\tx: repeat ? 0 : void 0,\n\t\t\ty: repeat ? 0 : void 0\n\t\t}, href)\n\t});\n};\n\n//#endregion\n//#region ../../library/src/render/presentation/SharedSVGManager.ts\nconst useDOM = /* @__PURE__ */ isBrowser$1();\nvar SharedSVGEntry = class {\n\tid;\n\tsvg;\n\tinnerHTML;\n\tviewBox;\n\tcount;\n\tconstructor(id, svg, innerHTML, viewBox, count = 0) {\n\t\tthis.id = id;\n\t\tthis.svg = svg;\n\t\tthis.innerHTML = innerHTML;\n\t\tthis.viewBox = viewBox;\n\t\tthis.count = count;\n\t}\n};\nconst visuallyHiddenStyle = \"position: absolute; overflow: hidden; bottom: 0; left: 0; width: 0; height: 0; z-index: 0; contain: strict\";\n/** Complex SVGs are placed once in a container and used as a template for all instances.\n* Notice the manager uses the svg string itself as the key to manage global instances with. */\nvar SharedSVGManager = class {\n\tentries = /* @__PURE__ */ new Map();\n\tvectorSetItems = /* @__PURE__ */ new Map();\n\tdebugGetEntries() {\n\t\treturn this.entries;\n\t}\n\t/** Request to render a svg, this will ensure there is a global instance and will return a\n\t* template referencing the image. Must be balanced with `unsubscribe()` calls using the same\n\t* svg. If called multiple times while the shared SVG exists, the generateUniqueIds and\n\t* contentId parameters are ignored. */\n\tsubscribe(svg, generateUniqueIds, contentId, overflowVisible) {\n\t\tif (!svg || svg === \"\") return \"\";\n\t\tlet entry = this.entries.get(svg);\n\t\tif (!entry) {\n\t\t\tif (!contentId) contentId = `svg${String(hash(svg))}_${String(svg.length)}`;\n\t\t\tlet uniqueSVG = svg;\n\t\t\tlet svgSize;\n\t\t\tconst svgDom = parseSVG(svg);\n\t\t\tif (svgDom) {\n\t\t\t\tif (generateUniqueIds) prefixIdsInSVG(svgDom, contentId);\n\t\t\t\tsvgDom.id = contentId;\n\t\t\t\tsvgSize = getSVGSize(svgDom);\n\t\t\t\tsvgDom.removeAttribute(\"xmlns\");\n\t\t\t\tsvgDom.removeAttribute(\"xlink\");\n\t\t\t\tsvgDom.removeAttribute(\"xmlns:xlink\");\n\t\t\t\tuniqueSVG = svgDom.outerHTML;\n\t\t\t}\n\t\t\tentry = this.createDOMElementFor(uniqueSVG, contentId, svgSize, overflowVisible);\n\t\t\tthis.entries.set(svg, entry);\n\t\t}\n\t\tentry.count += 1;\n\t\treturn entry.innerHTML;\n\t}\n\t/** Returns the viewBox for the svg, or undefined if there is no viewBox. */\n\tgetViewBox(svg) {\n\t\tif (!svg || svg === \"\") return;\n\t\treturn this.entries.get(svg)?.viewBox;\n\t}\n\t/** When no longer rendering an svg it must be unsubscribed from so resources can be cleaned up.\n\t* Pass in the same svg as used with `subscribe()`. */\n\tunsubscribe(svg) {\n\t\tif (!svg || svg === \"\") return;\n\t\tconst entry = this.entries.get(svg);\n\t\tif (!entry) return;\n\t\tentry.count -= 1;\n\t\tif (entry.count > 0) return;\n\t\tsetTimeout(() => this.maybeRemoveEntry(svg), 5e3);\n\t}\n\tmaybeRemoveEntry(svg) {\n\t\tconst entry = this.entries.get(svg);\n\t\tif (!entry) return;\n\t\tif (entry.count > 0) return;\n\t\tthis.entries.delete(svg);\n\t\tthis.removeDOMElement(entry);\n\t}\n\tremoveDOMElement(entry) {\n\t\tif (useDOM) (document?.getElementById(entry.id))?.remove();\n\t}\n\tgetOrCreateTemplateContainer() {\n\t\tconst container = document.getElementById(\"svg-templates\");\n\t\tif (container) return container;\n\t\tconst newContainer = document.createElement(\"div\");\n\t\tnewContainer.id = \"svg-templates\";\n\t\tnewContainer.ariaHidden = \"true\";\n\t\tnewContainer.style.cssText = visuallyHiddenStyle;\n\t\tdocument.body.appendChild(newContainer);\n\t\treturn newContainer;\n\t}\n\tmaybeAppendTemplate(id, svg) {\n\t\tif (document.getElementById(id)) return;\n\t\tconst container = document.createElement(\"div\");\n\t\tcontainer.innerHTML = svg;\n\t\tconst svgElement = container.firstElementChild;\n\t\tif (!svgElement) return;\n\t\tsvgElement.id = id;\n\t\tthis.getOrCreateTemplateContainer().appendChild(svgElement);\n\t}\n\tcreateDOMElementFor(svg, id, size, overflowVisible) {\n\t\tif (useDOM) this.maybeAppendTemplate(id, svg);\n\t\tconst box = size ? `0 0 ${size.width} ${size.height}` : void 0;\n\t\tconst viewBox = box ? ` viewBox=\"${box}\"` : \"\";\n\t\tconst innerHTML = `<svg style=\"width:100%;height:100%;${overflowVisible ? \"overflow: visible;\" : \"\"}\"${viewBox}><use href=\"#${id}\"/></svg>`;\n\t\treturn new SharedSVGEntry(id, svg, innerHTML, box);\n\t}\n\t/**\n\t* Vectors are serialized in such a way that they don't need to be parsed again, instead they\n\t* just need to provide their template. The hash is already known.\n\t*\n\t* VECTOR @TODO - Unsubscribe from vector set items.\n\t*/\n\ttemplate(revision, svg) {\n\t\tif (this.vectorSetItems.get(revision)) return `#${revision}`;\n\t\tthis.vectorSetItems.set(revision, {\n\t\t\tsvg,\n\t\t\tcount: 0\n\t\t});\n\t\tif (!useDOM) return `#${revision}`;\n\t\tthis.maybeAppendTemplate(revision, svg);\n\t\treturn `#${revision}`;\n\t}\n\tsubscribeToTemplate(revision) {\n\t\tconst entry = this.vectorSetItems.get(revision);\n\t\tif (!entry) return;\n\t\tentry.count++;\n\t\treturn () => {\n\t\t\tconst latest = this.vectorSetItems.get(revision);\n\t\t\tif (!latest) return;\n\t\t\tlatest.count--;\n\t\t\tif (latest.count > 0) return;\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (this.vectorSetItems.get(revision)?.count) return;\n\t\t\t\tthis.vectorSetItems.delete(revision);\n\t\t\t\tif (useDOM) document?.getElementById(revision)?.remove();\n\t\t\t}, 5e3);\n\t\t};\n\t}\n\tclear() {\n\t\tthis.entries.clear();\n\t}\n\t/** Returns a string containing a div#svg-templates and all the current svg templates. Can be\n\t* used after running `ReactDOMServer.renderToString()` */\n\tgenerateTemplates() {\n\t\tconst output = [];\n\t\toutput.push(`<div id=\"svg-templates\" style=\"${visuallyHiddenStyle}\" aria-hidden=\"true\">`);\n\t\tthis.entries.forEach((value) => output.push(value.svg));\n\t\tthis.vectorSetItems.forEach((value, revision) => {\n\t\t\tconst svg = value.svg;\n\t\t\toutput.push(svg.includes(`id=\"${revision}\"`) ? svg : svg.replace(/^<svg/u, `<svg id=\"${revision}\"`));\n\t\t});\n\t\toutput.push(\"</div>\");\n\t\treturn output.join(\"\\n\");\n\t}\n};\n/**\n* @internal\n*/\nfunction useSVGTemplate(revision, svg) {\n\tuseEffect(() => sharedSVGManager.subscribeToTemplate(revision), [revision]);\n\treturn sharedSVGManager.template(revision, svg);\n}\n/**\n* @internal\n*/\nconst sharedSVGManager = /* @__PURE__ */ new SharedSVGManager();\nfunction parseSVG(svg) {\n\ttry {\n\t\tconst node = domParser(svg).getElementsByTagName(\"svg\")[0];\n\t\tif (!node) throw Error(\"no svg element found\");\n\t\treturn node;\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction prefixIdsInSVG(svg, prefix) {\n\trecursivelyPrefixId(svg, sanitizeString(prefix));\n}\nfunction sanitizeString(str) {\n\treturn str.replace(/[^\\w\\-:.]|^[^a-z]+/gi, \"\");\n}\nfunction recursivelyPrefixId(el, prefix) {\n\tprefixId(el, prefix);\n\tArray.from(el.children).forEach((node) => {\n\t\trecursivelyPrefixId(node, prefix);\n\t});\n}\nfunction prefixId(el, prefix) {\n\tel.getAttributeNames().forEach((attr) => {\n\t\tconst value = el.getAttribute(attr);\n\t\tif (!value) return;\n\t\tif (attr === \"id\") el.setAttribute(attr, `${prefix}_${value}`);\n\t\tif (attr === \"href\" || attr === \"xlink:href\") {\n\t\t\tconst [base, fragmentIdentifier] = value.split(\"#\");\n\t\t\tif (base) return;\n\t\t\tel.setAttribute(attr, `#${prefix}_${fragmentIdentifier}`);\n\t\t\treturn;\n\t\t}\n\t\tconst URL_REF = \"url(#\";\n\t\tif (value.includes(URL_REF)) {\n\t\t\tconst prefixedValue = value.replace(URL_REF, `${URL_REF}${prefix}_`);\n\t\t\tel.setAttribute(attr, prefixedValue);\n\t\t}\n\t});\n}\nconst unitsToPixels = /* @__PURE__ */ (() => ({\n\tcm: 96 / 2.54,\n\tmm: 96 / 2.54 / 10,\n\tQ: 96 / 2.54 / 40,\n\tin: 96,\n\tpc: 16,\n\tpt: 96 / 72,\n\tpx: 1,\n\tem: 16,\n\tex: 8,\n\tch: 8,\n\trem: 16\n}))();\n/** Parses values like 10cm in `<svg ... width=\"10cm\" ...>` turning them into pixel sizes. Ignoring\n* percentage values or unparsable values. Should at least parse anything browsers parse. */\nfunction parseLength(value) {\n\tif (!value) return;\n\tconst m = /(-?[\\d.]+)([a-z%]*)/u.exec(value);\n\tif (m?.[1] === void 0 || m?.[2] === void 0) return;\n\tif (m[2]?.startsWith(\"%\")) return;\n\treturn Math.round(parseFloat(m[1]) * (unitsToPixels[m[2]] || 1));\n}\n/** Tries to return something sensible from the <svg width=\"X\" height=\"X\"> attributes. We use that\n* to give the outer svg a matching viewbox.\n*\n* Note, this is not a perfect solution. Ideally we know our SVGs better and we only use viewBoxes,\n* removed any percentage based sizes, etc. But at least we should be consistent between how canvas,\n* preview, and publish render.\n* */\nfunction getSVGSize(svg) {\n\tconst width = parseLength(svg.getAttribute(\"width\"));\n\tconst height = parseLength(svg.getAttribute(\"height\"));\n\tif (typeof width !== \"number\" || typeof height !== \"number\") return;\n\tif (width <= 0 || height <= 0) return;\n\treturn {\n\t\twidth,\n\t\theight\n\t};\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/SVG.tsx\n/**\n* @internal\n*/\nconst SVGInner = /* @__PURE__ */ forwardRef(function SVG(props, forwardedRef) {\n\tconst parentSize = useParentSize();\n\tconst layoutId = useLayoutId(props);\n\tconst layoutRef = React.useRef(null);\n\tconst ref = forwardedRef ?? layoutRef;\n\tconst providedWindow = useProvidedWindow();\n\tuseMeasureLayout(props, layoutRef);\n\treturn /* @__PURE__ */ jsx(SVGComponent, {\n\t\t...props,\n\t\tinnerRef: ref,\n\t\tparentSize,\n\t\tlayoutId,\n\t\tprovidedWindow\n\t});\n});\nconst MAX_BACKGROUND_SVG_TEXT_LENGTH = 5e4;\nfunction containsImageReference(svg) {\n\treturn svg.indexOf(\"image\") >= 0;\n}\nfunction containsCustomPropertyReference(svg) {\n\treturn svg.indexOf(\"var(--\") >= 0;\n}\nfunction hasBorderRadius(style) {\n\treturn !!(style.borderRadius || style.borderBottomLeftRadius || style.borderBottomRightRadius || style.borderTopLeftRadius || style.borderTopRightRadius);\n}\nfunction sizeSVG(container, props) {\n\tconst div = container.current;\n\tif (!div) return;\n\tconst localWindow = props.providedWindow ?? safeWindow;\n\tconst svg = div.firstElementChild;\n\tif (!svg || !(svg instanceof localWindow.SVGSVGElement)) return;\n\tif (!svg.getAttribute(\"viewBox\")) {\n\t\tconst viewBox = sharedSVGManager.getViewBox(props.svg);\n\t\tif (viewBox) svg.setAttribute(\"viewBox\", viewBox);\n\t}\n\tconst { withExternalLayout, parentSize } = props;\n\tif (!withExternalLayout && constraintsEnabled(props) && parentSize !== 1 && parentSize !== 2) return;\n\tconst { intrinsicWidth, intrinsicHeight, _constraints } = props;\n\tif (svg.viewBox?.baseVal?.width === 0 && svg.viewBox?.baseVal?.height === 0 && isFiniteNumber(intrinsicWidth) && isFiniteNumber(intrinsicHeight)) svg.setAttribute(\"viewBox\", `0 0 ${intrinsicWidth} ${intrinsicHeight}`);\n\tif (_constraints?.aspectRatio) svg.setAttribute(\"preserveAspectRatio\", \"\");\n\telse svg.setAttribute(\"preserveAspectRatio\", \"none\");\n\tsvg.setAttribute(\"width\", \"100%\");\n\tsvg.setAttribute(\"height\", \"100%\");\n}\nconst SVGComponent = /* @__PURE__ */ (() => {\n\treturn class SVGComponentInner extends Layer {\n\t\tstatic supportsConstraints = true;\n\t\tstatic defaultSVGProps = {\n\t\t\tleft: void 0,\n\t\t\tright: void 0,\n\t\t\ttop: void 0,\n\t\t\tbottom: void 0,\n\t\t\tstyle: void 0,\n\t\t\t_constraints: {\n\t\t\t\tenabled: true,\n\t\t\t\taspectRatio: null\n\t\t\t},\n\t\t\tparentSize: 0,\n\t\t\trotation: 0,\n\t\t\tvisible: true,\n\t\t\tsvg: \"\",\n\t\t\tshadows: []\n\t\t};\n\t\tstatic defaultProps = {\n\t\t\t...Layer.defaultProps,\n\t\t\t...SVGComponentInner.defaultSVGProps\n\t\t};\n\t\tstatic frame(props) {\n\t\t\treturn calculateRect(props, props.parentSize || 0);\n\t\t}\n\t\tcontainer = React.createRef();\n\t\tsvgElement = null;\n\t\tsetSVGElement = (element) => {\n\t\t\tthis.svgElement = element;\n\t\t\tthis.setLayerElement(element);\n\t\t};\n\t\tpreviouslyRenderedSVG = \"\";\n\t\tget frame() {\n\t\t\treturn calculateRect(this.props, this.props.parentSize || 0);\n\t\t}\n\t\tunmountedSVG = \"\";\n\t\tcomponentDidMount() {\n\t\t\tif (this.unmountedSVG) {\n\t\t\t\tconst { svgContentId } = this.props;\n\t\t\t\tconst contentid = svgContentId ? `svg${svgContentId}` : null;\n\t\t\t\tsharedSVGManager.subscribe(this.unmountedSVG, !svgContentId, contentid);\n\t\t\t\tthis.previouslyRenderedSVG = this.unmountedSVG;\n\t\t\t}\n\t\t\tif (this.props.svgContentId) return;\n\t\t\tsizeSVG(this.container, this.props);\n\t\t}\n\t\tcomponentWillUnmount() {\n\t\t\tsharedSVGManager.unsubscribe(this.previouslyRenderedSVG);\n\t\t\tthis.unmountedSVG = this.previouslyRenderedSVG;\n\t\t\tthis.previouslyRenderedSVG = \"\";\n\t\t}\n\t\tcomponentDidUpdate(prevProps) {\n\t\t\tsuper.componentDidUpdate(prevProps);\n\t\t\tif (this.props.svgContentId) return;\n\t\t\tconst { fill } = this.props;\n\t\t\tif (BackgroundImage.isImageObject(fill) && BackgroundImage.isImageObject(prevProps.fill) && fill.src !== prevProps.fill.src) resetSetStyle(this.svgElement, \"fill\", null, false);\n\t\t\tsizeSVG(this.container, this.props);\n\t\t}\n\t\tcollectLayout(style, innerStyle) {\n\t\t\tif (this.props.withExternalLayout) {\n\t\t\t\tinnerStyle.width = \"100%\";\n\t\t\t\tinnerStyle.height = \"100%\";\n\t\t\t\tinnerStyle.aspectRatio = \"inherit\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst rect = this.frame;\n\t\t\tconst { rotation, intrinsicWidth, intrinsicHeight, width, height } = this.props;\n\t\t\tconst rotate = Animatable.getNumber(rotation);\n\t\t\tstyle.opacity = isFiniteNumber(this.props.opacity) ? this.props.opacity : 1;\n\t\t\t/**\n\t\t\t* The if-statement below switches between positioning the SVG with\n\t\t\t* transforms or (in the else statement) with DOM-layout.\n\t\t\t*\n\t\t\t* On the canvas (when RenderTarget.hasRestrictions()) we want to\n\t\t\t* position with transforms for performance reasons. When dragging an\n\t\t\t* SVG around, if we can reposition an SVG using transforms, it won't\n\t\t\t* trigger a browser layout.\n\t\t\t*\n\t\t\t* In the preview we always position with DOM-layout, to not interfere\n\t\t\t* with Magic Motion that uses the transforms for animating.\n\t\t\t*\n\t\t\t* However, there might be cases where we do not have a frame to use for\n\t\t\t* positioning the SVG using transforms. For example when rendering\n\t\t\t* inside a Scroll component (that uses DOM-layout for it's children,\n\t\t\t* also on the canvas), we cannot always calculate a frame. In these\n\t\t\t* cases we do use DOM-layout to position the SVG, even on the canvas.\n\t\t\t*/\n\t\t\tif (RenderTarget.hasRestrictions() && rect) {\n\t\t\t\tObject.assign(style, {\n\t\t\t\t\ttransform: `translate(${rect.x}px, ${rect.y}px) rotate(${rotate.toFixed(4)}deg)`,\n\t\t\t\t\twidth: `${rect.width}px`,\n\t\t\t\t\theight: `${rect.height}px`\n\t\t\t\t});\n\t\t\t\tif (constraintsEnabled(this.props)) style.position = \"absolute\";\n\t\t\t\tconst xFactor = rect.width / (intrinsicWidth || 1);\n\t\t\t\tconst yFactor = rect.height / (intrinsicHeight || 1);\n\t\t\t\tinnerStyle.transformOrigin = \"top left\";\n\t\t\t\tconst { zoom, target } = RenderEnvironment;\n\t\t\t\tif (target === RenderTarget.export) {\n\t\t\t\t\tconst zoomFactor = zoom > 1 ? zoom : 1;\n\t\t\t\t\tinnerStyle.transform = `scale(${xFactor * zoomFactor}, ${yFactor * zoomFactor})`;\n\t\t\t\t\tinnerStyle.zoom = 1 / zoomFactor;\n\t\t\t\t} else innerStyle.transform = `scale(${xFactor}, ${yFactor})`;\n\t\t\t\tif (intrinsicWidth && intrinsicHeight) {\n\t\t\t\t\tinnerStyle.width = intrinsicWidth;\n\t\t\t\t\tinnerStyle.height = intrinsicHeight;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { left, right, top, bottom } = this.props;\n\t\t\tObject.assign(style, {\n\t\t\t\tleft,\n\t\t\t\tright,\n\t\t\t\ttop,\n\t\t\t\tbottom,\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\trotate\n\t\t\t});\n\t\t\tObject.assign(innerStyle, {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: 0,\n\t\t\t\tright: 0,\n\t\t\t\tposition: \"absolute\"\n\t\t\t});\n\t\t}\n\t\trender() {\n\t\t\t/* @__PURE__ */ countNodeRender();\n\t\t\tconst { id, visible, style, fill, svg, intrinsicHeight, intrinsicWidth, title, description, layoutId, className, variants, withExternalLayout, innerRef, svgContentId, height: _height, opacity: _opacity, width: _width, requiresOverflowVisible, ...rest } = this.props;\n\t\t\tif (!withExternalLayout && (!visible || !id)) return null;\n\t\t\tconst identifier = id ?? layoutId ?? \"svg\";\n\t\t\tconst rect = this.frame;\n\t\t\tconst size = rect || {\n\t\t\t\twidth: intrinsicWidth || 100,\n\t\t\t\theight: intrinsicHeight || 100\n\t\t\t};\n\t\t\tconst outerStyle = {\n\t\t\t\t...style,\n\t\t\t\timageRendering: \"pixelated\",\n\t\t\t\tflexShrink: 0\n\t\t\t};\n\t\t\tconst innerStyle = {};\n\t\t\tthis.collectLayout(outerStyle, innerStyle);\n\t\t\tcollectOpacityFromProps(this.props, outerStyle);\n\t\t\tcollectFiltersFromProps(this.props, outerStyle);\n\t\t\tLayer.applyWillChange(this.props, outerStyle, false);\n\t\t\t/** The fillElement will be used an all paths in the SVG that have no fill set. */\n\t\t\tlet fillElement = null;\n\t\t\tif (typeof fill === \"string\" || Color.isColorObject(fill)) {\n\t\t\t\tconst fillColor = Color.isColorObject(fill) ? fill.initialValue || Color.toRgbString(fill) : fill;\n\t\t\t\touterStyle.fill = fillColor;\n\t\t\t\touterStyle.color = fillColor;\n\t\t\t} else if (LinearGradient.isLinearGradient(fill)) {\n\t\t\t\tconst gradient = fill;\n\t\t\t\tconst gradientId = `${encodeURI(id || \"\")}g${LinearGradient.hash(gradient)}`;\n\t\t\t\touterStyle.fill = `url(#${gradientId})`;\n\t\t\t\tconst { stops, x1, x2, y1, y2 } = elementPropertiesForLinearGradient(gradient, identifier);\n\t\t\t\tfillElement = /* @__PURE__ */ jsx(\"svg\", {\n\t\t\t\t\tref: this.setSVGElement,\n\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\theight: \"100%\",\n\t\t\t\t\tstyle: { position: \"absolute\" },\n\t\t\t\t\trole: \"presentation\",\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(\"linearGradient\", {\n\t\t\t\t\t\tid: gradientId,\n\t\t\t\t\t\tx1,\n\t\t\t\t\t\tx2,\n\t\t\t\t\t\ty1,\n\t\t\t\t\t\ty2,\n\t\t\t\t\t\tchildren: stops.map((stop, idx) => {\n\t\t\t\t\t\t\treturn /* @__PURE__ */ jsx(\"stop\", {\n\t\t\t\t\t\t\t\toffset: stop.position,\n\t\t\t\t\t\t\t\tstopColor: stop.color,\n\t\t\t\t\t\t\t\tstopOpacity: stop.alpha\n\t\t\t\t\t\t\t}, idx);\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t});\n\t\t\t} else if (RadialGradient.isRadialGradient(fill)) {\n\t\t\t\tconst gradient = fill;\n\t\t\t\tconst gradientId = `${encodeURI(id || \"\")}g${RadialGradient.hash(gradient)}`;\n\t\t\t\touterStyle.fill = `url(#${gradientId})`;\n\t\t\t\tconst elementProperties = elementPropertiesForRadialGradient(gradient, identifier);\n\t\t\t\tfillElement = /* @__PURE__ */ jsx(\"svg\", {\n\t\t\t\t\tref: this.setSVGElement,\n\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\theight: \"100%\",\n\t\t\t\t\tstyle: { position: \"absolute\" },\n\t\t\t\t\trole: \"presentation\",\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(\"radialGradient\", {\n\t\t\t\t\t\tid: gradientId,\n\t\t\t\t\t\tcy: gradient.centerAnchorY,\n\t\t\t\t\t\tcx: gradient.centerAnchorX,\n\t\t\t\t\t\tr: gradient.widthFactor,\n\t\t\t\t\t\tchildren: elementProperties.stops.map((stop, idx) => {\n\t\t\t\t\t\t\treturn /* @__PURE__ */ jsx(\"stop\", {\n\t\t\t\t\t\t\t\toffset: stop.position,\n\t\t\t\t\t\t\t\tstopColor: stop.color,\n\t\t\t\t\t\t\t\tstopOpacity: stop.alpha\n\t\t\t\t\t\t\t}, idx);\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t});\n\t\t\t} else if (BackgroundImage.isImageObject(fill)) {\n\t\t\t\tconst imagePattern = imagePatternPropsForFill(fill, size, identifier);\n\t\t\t\tif (imagePattern) {\n\t\t\t\t\touterStyle.fill = `url(#${imagePattern.id})`;\n\t\t\t\t\tfillElement = /* @__PURE__ */ jsx(\"svg\", {\n\t\t\t\t\t\tref: this.setSVGElement,\n\t\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\t\theight: \"100%\",\n\t\t\t\t\t\tstyle: { position: \"absolute\" },\n\t\t\t\t\t\trole: \"presentation\",\n\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(\"defs\", { children: /* @__PURE__ */ jsx(ImagePatternElement, { ...imagePattern }) })\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst dataProps = { \"data-framer-component-type\": \"SVG\" };\n\t\t\tconst hasTransformTemplate = !rect;\n\t\t\tObject.assign(dataProps, layoutHintDataProps(hasTransformTemplate ? this.props.center : void 0, this.props.style));\n\t\t\tconst svgAsBackgroundImage = !requiresOverflowVisible && !fillElement && !outerStyle.fill && !outerStyle.background && !outerStyle.backgroundImage && svg.length < MAX_BACKGROUND_SVG_TEXT_LENGTH && !containsImageReference(svg) && !containsCustomPropertyReference(svg);\n\t\t\tlet content = null;\n\t\t\tif (svgAsBackgroundImage) {\n\t\t\t\touterStyle.backgroundSize = \"100% 100%\";\n\t\t\t\touterStyle.backgroundImage = encodeSVGForCSS(svg);\n\t\t\t\tsharedSVGManager.unsubscribe(this.previouslyRenderedSVG);\n\t\t\t\tthis.previouslyRenderedSVG = \"\";\n\t\t\t} else {\n\t\t\t\tconst contentid = svgContentId ? `svg${svgContentId}` : null;\n\t\t\t\tconst __html = sharedSVGManager.subscribe(svg, !svgContentId, contentid, requiresOverflowVisible);\n\t\t\t\tsharedSVGManager.unsubscribe(this.previouslyRenderedSVG);\n\t\t\t\tthis.previouslyRenderedSVG = svg;\n\t\t\t\tif (hasBorderRadius(outerStyle)) outerStyle.overflow = \"hidden\";\n\t\t\t\tcontent = /* @__PURE__ */ jsxs(Fragment$1, { children: [fillElement, /* @__PURE__ */ jsx(\"div\", {\n\t\t\t\t\tclassName: \"svgContainer\",\n\t\t\t\t\tstyle: innerStyle,\n\t\t\t\t\tref: this.container,\n\t\t\t\t\tdangerouslySetInnerHTML: { __html }\n\t\t\t\t}, BackgroundImage.isImageObject(fill) ? fill.src : \"\")] });\n\t\t\t}\n\t\t\tconst MotionComponent = htmlElementAsMotionComponent(this.props.as);\n\t\t\tconst { href, target, rel, onClick, onTap } = this.props;\n\t\t\tconst hasTitleOrDescription = title || description;\n\t\t\treturn /* @__PURE__ */ jsx(MotionComponent, {\n\t\t\t\t...dataProps,\n\t\t\t\t...filterValidMotionAndDOMProps(asRecord(rest)),\n\t\t\t\tlayoutId,\n\t\t\t\ttransformTemplate: hasTransformTemplate ? transformTemplate(this.props.center) : void 0,\n\t\t\t\tid,\n\t\t\t\tref: innerRef,\n\t\t\t\tstyle: outerStyle,\n\t\t\t\tclassName,\n\t\t\t\tvariants,\n\t\t\t\ttabIndex: this.props.tabIndex,\n\t\t\t\trole: hasTitleOrDescription ? \"img\" : void 0,\n\t\t\t\t\"aria-label\": title,\n\t\t\t\t\"aria-description\": description,\n\t\t\t\t\"aria-hidden\": hasTitleOrDescription ? void 0 : \"true\",\n\t\t\t\tonTap,\n\t\t\t\tonClick,\n\t\t\t\thref,\n\t\t\t\ttarget,\n\t\t\t\trel,\n\t\t\t\tchildren: content\n\t\t\t});\n\t\t}\n\t};\n})();\nconst SVG = /* @__PURE__ */ withLibraryCSS(SVGInner);\n\n//#endregion\n//#region ../../library/src/render/fonts/useFontLoadStatus.tsx\n/**\n* @internal\n* Hook to subscribe to font store and get the current font loading status.\n* @deprecated only used in legacy text\n* */\nfunction useFontLoadStatus(fontSelectors = [], timeout = 5e3) {\n\tconst missingFontSelectors = fontSelectors.filter((selector) => !runtime.fontStore.isSelectorLoaded(selector));\n\tconst [fontLoadStatus, setFontLoadStatus] = React.useState(missingFontSelectors.length ? \"loading\" : \"done\");\n\tReact.useEffect(() => {\n\t\tif (!missingFontSelectors.length) return;\n\t\tsetFontLoadStatus(\"loading\");\n\t\tconst timer = setTimeout(() => {\n\t\t\tsetFontLoadStatus(\"timeout\");\n\t\t}, timeout);\n\t\truntime.fontStore.loadFonts(missingFontSelectors).then(() => {\n\t\t\tclearTimeout(timer);\n\t\t\tsetFontLoadStatus(\"done\");\n\t\t});\n\t}, [fontSelectors.join(\", \"), missingFontSelectors.join(\", \")]);\n\treturn fontLoadStatus;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Text.tsx\n/**\n* @internal\n* @deprecated this is the legacy text component.\n*/\nconst TextInner = /* @__PURE__ */ React.forwardRef(function Text(props, forwardedRef) {\n\tconst parentSize = useParentSize();\n\tconst layoutId = useLayoutId(props);\n\tconst fallbackLayoutRef = useRef(null);\n\tconst layoutRef = forwardedRef ?? fallbackLayoutRef;\n\tconst { navigate, getRoute } = useRouter();\n\tconst currentRoute = useCurrentRoute();\n\tuseRoutePreloader(props.preload ?? []);\n\tconst onCanvas = useIsOnFramerCanvas();\n\tconst matchesCurrentRoute = useLinkMatchesRoute(props.__link);\n\tconst fontLoadStatus = useFontLoadStatus(props.fonts);\n\tuseMeasureLayout(props, layoutRef);\n\tconst { fonts, __fromCanvasComponent } = props;\n\tconst prevFontsRef = useRef([]);\n\tconst fontsDidChange = !isShallowEqualArray(prevFontsRef.current ?? [], fonts ?? []);\n\tprevFontsRef.current = fonts;\n\tuseEffect(() => {\n\t\tif (!fontsDidChange || !fonts) return;\n\t\truntime.fontStore.loadFonts(fonts).then(({ newlyLoadedFontCount }) => {\n\t\t\tif (!__fromCanvasComponent || !layoutRef.current || RenderTarget.current() !== RenderTarget.canvas) return;\n\t\t\tif (newlyLoadedFontCount === 0) return;\n\t\t\tmeasureClosestComponentContainer(layoutRef.current);\n\t\t});\n\t}, [fonts]);\n\tconst implicitPathVariables = useImplicitPathVariables();\n\tconst interceptPageLinks = React.useCallback((event) => {\n\t\tconst anchorElement = findAnchorElement(event.target, layoutRef.current);\n\t\tif (isCommandKeyPressed(event) || !navigate || !anchorElement) return;\n\t\tif (navigateFromAttributes(navigate, anchorElement, implicitPathVariables)) event.preventDefault();\n\t}, [navigate, implicitPathVariables]);\n\tuseEffect(() => {\n\t\tconst ref = layoutRef.current;\n\t\tif (!ref) return;\n\t\tref.addEventListener(\"click\", interceptPageLinks);\n\t\treturn () => ref.removeEventListener(\"click\", interceptPageLinks);\n\t}, [interceptPageLinks]);\n\tconst rawHTML = React.useMemo(() => {\n\t\tif (!props.rawHTML || onCanvas || !getRoute || !currentRoute) return props.rawHTML;\n\t\treturn replaceFramerPageLinks(props.rawHTML, getRoute, currentRoute, implicitPathVariables);\n\t}, [\n\t\tprops.rawHTML,\n\t\tgetRoute,\n\t\tcurrentRoute,\n\t\timplicitPathVariables\n\t]);\n\treturn /* @__PURE__ */ jsx(TextComponent, {\n\t\t...props,\n\t\tinnerRef: layoutRef,\n\t\tlayoutId,\n\t\tparentSize,\n\t\tfontLoadStatus,\n\t\trawHTML,\n\t\tmatchesCurrentRoute\n\t});\n});\nconst TextComponent = /* @__PURE__ */ (() => {\n\treturn class TextComponentInner extends Layer {\n\t\tstatic supportsConstraints = true;\n\t\tstatic defaultTextProps = {\n\t\t\topacity: void 0,\n\t\t\tleft: void 0,\n\t\t\tright: void 0,\n\t\t\ttop: void 0,\n\t\t\tbottom: void 0,\n\t\t\t_constraints: {\n\t\t\t\tenabled: true,\n\t\t\t\taspectRatio: null\n\t\t\t},\n\t\t\trotation: 0,\n\t\t\tvisible: true,\n\t\t\talignment: void 0,\n\t\t\tverticalAlignment: \"top\",\n\t\t\tshadows: [],\n\t\t\tfont: \"16px Arial\"\n\t\t};\n\t\tstatic defaultProps = {\n\t\t\t...Layer.defaultProps,\n\t\t\t...TextComponentInner.defaultTextProps,\n\t\t\tisEditable: false,\n\t\t\tenvironment: RenderTarget.current,\n\t\t\twithExternalLayout: false,\n\t\t\tfontLoadStatus: \"loading\"\n\t\t};\n\t\teditorText;\n\t\tget frame() {\n\t\t\treturn calculateRect(this.props, this.props.parentSize || 0, false);\n\t\t}\n\t\tgetOverrideText() {\n\t\t\tconst { _forwardedOverrideId, _forwardedOverrides, id } = this.props;\n\t\t\tconst forwardedOverrideId = _forwardedOverrideId ?? id;\n\t\t\tif (forwardedOverrideId && _forwardedOverrides) {\n\t\t\t\tconst text = _forwardedOverrides[forwardedOverrideId];\n\t\t\t\tif (isString(text)) return text;\n\t\t\t}\n\t\t}\n\t\trender() {\n\t\t\treturn /* @__PURE__ */ jsx(ComponentContainerContext.Consumer, { children: this.renderMain });\n\t\t}\n\t\tcollectLayout(style, inCodeComponent) {\n\t\t\tif (this.props.withExternalLayout) return;\n\t\t\tconst rect = this.frame;\n\t\t\tconst { rotation, autoSize, positionSticky, positionStickyTop, positionStickyRight, positionStickyBottom, positionStickyLeft, width: externalWidth, height: externalHeight, _usesDOMRect, positionFixed, positionAbsolute } = this.props;\n\t\t\tconst rotate = Animatable.getNumber(rotation);\n\t\t\tif (rect && !(_usesDOMRect && (externalWidth === \"auto\" || externalHeight === \"auto\")) && RenderTarget.hasRestrictions()) Object.assign(style, {\n\t\t\t\ttransform: `translate(${rect.x}px, ${rect.y}px) rotate(${rotate.toFixed(4)}deg)`,\n\t\t\t\twidth: autoSize ? \"auto\" : `${rect.width}px`,\n\t\t\t\tminWidth: `${rect.width}px`,\n\t\t\t\theight: `${rect.height}px`\n\t\t\t});\n\t\t\telse {\n\t\t\t\tconst { left, right, top, bottom } = this.props;\n\t\t\t\tlet width;\n\t\t\t\tlet height;\n\t\t\t\tif (autoSize) {\n\t\t\t\t\twidth = \"auto\";\n\t\t\t\t\theight = \"auto\";\n\t\t\t\t} else {\n\t\t\t\t\tif (!isFiniteNumber(left) || !isFiniteNumber(right)) width = externalWidth;\n\t\t\t\t\tif (!isFiniteNumber(top) || !isFiniteNumber(bottom)) height = externalHeight;\n\t\t\t\t}\n\t\t\t\tObject.assign(style, {\n\t\t\t\t\tleft,\n\t\t\t\t\tright,\n\t\t\t\t\ttop,\n\t\t\t\t\tbottom,\n\t\t\t\t\twidth,\n\t\t\t\t\theight,\n\t\t\t\t\trotate\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst isRenderingStaticContent = isStaticRenderer();\n\t\t\tif (positionSticky) {\n\t\t\t\tif (!isRenderingStaticContent || inCodeComponent) {\n\t\t\t\t\tstyle.position = \"sticky\";\n\t\t\t\t\tstyle.willChange = \"transform\";\n\t\t\t\t\tstyle.top = positionStickyTop;\n\t\t\t\t\tstyle.right = positionStickyRight;\n\t\t\t\t\tstyle.bottom = positionStickyBottom;\n\t\t\t\t\tstyle.left = positionStickyLeft;\n\t\t\t\t}\n\t\t\t} else if (RenderTarget.current() === RenderTarget.canvas && (positionFixed || positionAbsolute)) style.position = \"absolute\";\n\t\t}\n\t\tsetElement = (element) => {\n\t\t\tif (this.props.innerRef) this.props.innerRef.current = element;\n\t\t\tthis.setLayerElement(element);\n\t\t};\n\t\tget transformTemplate() {\n\t\t\tconst { _usesDOMRect, widthType, heightType, __fromCanvasComponent } = this.props;\n\t\t\tif (this.props.transformTemplate) return this.props.transformTemplate;\n\t\t\tconst rect = this.frame;\n\t\t\tconst isDOMLayoutAutoSized = _usesDOMRect && (isAutoDimensionType(widthType) || isAutoDimensionType(heightType));\n\t\t\tif (!rect || !RenderTarget.hasRestrictions() || __fromCanvasComponent || isDOMLayoutAutoSized) return transformTemplate(this.props.center);\n\t\t}\n\t\t/** Used by the ComponentContainerContext */\n\t\trenderMain = (inCodeComponent) => {\n\t\t\t/* @__PURE__ */ countNodeRender();\n\t\t\tconst { font, visible, alignment, opacity, id, layoutId, className, transition, variants, name, __fromCanvasComponent, _initialStyle, widthType: _widthType, heightType: _heightType, _usesDOMRect, autoSize, style: styleProp, fontLoadStatus, matchesCurrentRoute, preload: _preload, tabIndex, ...rest } = this.props;\n\t\t\tif (!visible) return null;\n\t\t\tconst isHidden = this.props.isEditable && this.props.environment() === RenderTarget.canvas;\n\t\t\tconst style = {\n\t\t\t\toutline: \"none\",\n\t\t\t\tdisplay: \"flex\",\n\t\t\t\tflexDirection: \"column\",\n\t\t\t\tjustifyContent: convertVerticalAlignment(this.props.verticalAlignment),\n\t\t\t\topacity: isHidden ? 0 : opacity,\n\t\t\t\tflexShrink: 0\n\t\t\t};\n\t\t\tif (_initialStyle) {\n\t\t\t\tfor (const key in _initialStyle) if (key.startsWith(\"--framer\")) asRecord(style)[key] = asRecord(_initialStyle)[key];\n\t\t\t}\n\t\t\tconst dataProps = {\n\t\t\t\t\"data-framer-component-type\": \"Text\",\n\t\t\t\t\"data-framer-name\": rest[\"data-framer-name\"] ?? name\n\t\t\t};\n\t\t\tif (autoSize) asRecord(dataProps)[\"data-framer-component-text-autosized\"] = \"true\";\n\t\t\tthis.collectLayout(style, inCodeComponent);\n\t\t\tcollectFiltersFromProps(this.props, style);\n\t\t\tcollectTextShadowsForProps(this.props, style);\n\t\t\tif (style.opacity === 1 || style.opacity === void 0) delete style.opacity;\n\t\t\tlet rawHTML = this.props.rawHTML;\n\t\t\tconst text = this.getOverrideText() || this.props.text;\n\t\t\tif (isString(text)) {\n\t\t\t\tif (rawHTML) rawHTML = replaceDraftHTMLWithText(rawHTML, text);\n\t\t\t\telse rawHTML = `<p style=\"font: ${font}\">${text}</p>`;\n\t\t\t}\n\t\t\tif (this.props.style) Object.assign(style, this.props.style);\n\t\t\tconst centeringTransformTemplate = this.transformTemplate;\n\t\t\tObject.assign(dataProps, layoutHintDataProps(centeringTransformTemplate ? this.props.center : void 0, this.props.style));\n\t\t\tif (rawHTML) {\n\t\t\t\tstyle.lineHeight = \"1px\";\n\t\t\t\tstyle.fontSize = \"0px\";\n\t\t\t\tif (RenderTarget.current() === RenderTarget.canvas && fontLoadStatus === \"loading\") style.visibility = \"hidden\";\n\t\t\t\tif (RenderTarget.current() === RenderTarget.canvas && fontLoadStatus === \"timeout\") style.backgroundColor = \"rgba(255, 0, 0, 0.3)\";\n\t\t\t\tObject.assign(style, styleProp);\n\t\t\t\tif (alignment) asRecord(style)[\"--framer-text-alignment\"] = alignment;\n\t\t\t\tconst tabIndexProps = getTabIndexProps(tabIndex);\n\t\t\t\treturn /* @__PURE__ */ jsx(motion.div, {\n\t\t\t\t\tlayoutId,\n\t\t\t\t\tid,\n\t\t\t\t\t...tabIndexProps,\n\t\t\t\t\t...dataProps,\n\t\t\t\t\t...filterValidMotionAndDOMProps(asRecord(rest)),\n\t\t\t\t\tstyle,\n\t\t\t\t\ttransformTemplate: centeringTransformTemplate,\n\t\t\t\t\tdangerouslySetInnerHTML: { __html: rawHTML },\n\t\t\t\t\t\"data-center\": this.props.center,\n\t\t\t\t\tclassName: cx(className, matchesCurrentRoute && \"isCurrent\"),\n\t\t\t\t\ttransition,\n\t\t\t\t\tvariants,\n\t\t\t\t\tref: this.setElement\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t};\n})();\nconst Text = /* @__PURE__ */ withLibraryCSS(TextInner);\nconst linkTag = \"(?:<a[^>]*>)?\";\nconst linkClosingTag = \"(?:</a>)?\";\nconst outerTag = \"<[^>]+>\";\nconst outerClosingTag = \"</[^>]+>\";\nconst blockTag = \"<(?:div|span)[^>]*>\";\nconst blockClosingTag = \"</(?:div|span)>\";\nconst inlineTag = \"<[^>]+>\";\nconst inlineClosingTag = \"</[^>]+>\";\nconst textContentRegex = /* @__PURE__ */ (() => new RegExp(`^(${linkTag}${outerTag}${blockTag}${inlineTag}).*?(${inlineClosingTag}).*?(${blockClosingTag}${outerClosingTag}${linkClosingTag})$`, \"su\"))();\n/**\n* If text is overriden in an override or by a variable, we take the rawHTML,\n* find the first styled span inside the first block, put the text in there, and\n* discard everything else. For example:\n*\n*     <p>\n*         <span>\n*             <span style=\"BOLD\">Hello </span>\n*             <span>World from the 1st block</span>\n*             <br>\n*         </span>\n*         <span>\n*             <!-- Second block is an empty line -->\n*             <span><br></span>\n*         </span>\n*         <span>\n*             <span>More text in third block</span>\n*             <br>\n*         </span>\n*     </p>\n*\n* will become:\n*\n*     <h1>\n*         <span>\n*             <span style=\"BOLD\">Text from the text prop, e.g., a variable or an override</span>\n*             <br>\n*         </span>\n*     </h1>\n*/\nfunction replaceDraftHTMLWithText(rawHTML, text) {\n\treturn rawHTML.replace(textContentRegex, (_, openingTags, inlineClosingTag, closingTags) => openingTags + text + inlineClosingTag + \"<br>\" + closingTags);\n}\nfunction convertVerticalAlignment(verticalAlignment) {\n\tswitch (verticalAlignment) {\n\t\tcase \"top\": return \"flex-start\";\n\t\tcase \"center\": return \"center\";\n\t\tcase \"bottom\": return \"flex-end\";\n\t}\n}\nfunction getTabIndexProps(tabIndex) {\n\tif (tabIndex === void 0) return {};\n\treturn { tabIndex };\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/TickerItem.tsx\n/**\n* @internal\n* To support relative sizes for ticker items we have to control the ticker item that is rendered in the ticker.\n* Ticker provides the props to us and we override the width and height to be relative.\n*/\nfunction TickerItem({ height, width, isCarouselControl, children }) {\n\tconst itemProps = useSafeTickerItem();\n\tif (isCarouselControl) return null;\n\tif (!itemProps || !children) return children;\n\tconst { props } = itemProps;\n\treturn /* @__PURE__ */ jsx(motion.li, {\n\t\t...props,\n\t\tstyle: {\n\t\t\t...props.style,\n\t\t\twidth: width ?? \"fit-content\",\n\t\t\theight: height ?? \"fit-content\"\n\t\t},\n\t\tchildren\n\t});\n}\nfunction useSafeTickerItem() {\n\ttry {\n\t\treturn useTickerItem();\n\t} catch {\n\t\treturn;\n\t}\n}\n\n//#endregion\n//#region ../../library/src/utils/internalId.ts\nconst keys = /* @__PURE__ */ new Map();\n/** @internal */\nvar InternalID = class InternalID {\n\tid;\n\t_link = null;\n\t_urllink = null;\n\tconstructor(id) {\n\t\tthis.id = id;\n\t}\n\tadd(str) {\n\t\treturn InternalID.forKey(this.id + str);\n\t}\n\ttoString() {\n\t\treturn this.id;\n\t}\n\tget link() {\n\t\tconst res = this._link;\n\t\tif (res) return res;\n\t\treturn this._link = \"#\" + this.id;\n\t}\n\tget urlLink() {\n\t\tconst res = this._urllink;\n\t\tif (res) return res;\n\t\treturn this._urllink = \"url(#\" + this.id + \")\";\n\t}\n\tstatic forKey(key) {\n\t\tlet res = keys.get(key);\n\t\tif (res) return res;\n\t\tres = new InternalID(\"a\" + (1e3 + keys.size) + \"z\");\n\t\tkeys.set(key, res);\n\t\treturn res;\n\t}\n};\n\n//#endregion\n//#region ../../library/src/render/types/randomID.ts\nconst first = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\nconst letters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_\";\nfunction f() {\n\treturn first[Math.floor(Math.random() * 52)];\n}\nfunction l() {\n\treturn letters[Math.floor(Math.random() * 63)];\n}\nfunction randomID() {\n\treturn f() + l() + l() + l() + l() + l() + l() + l() + l();\n}\n\n//#endregion\n//#region ../../library/src/render/types/PathSegment.ts\nconst PathSegmentOuter = /* @__PURE__ */ (() => {\n\tclass PathSegment {\n\t\t__class = \"PathSegment\";\n\t\tstatic displayName = \"WithClassDiscriminatorMixin(PathSegment)\";\n\t\tx = 0;\n\t\ty = 0;\n\t\thandleMirroring = \"straight\";\n\t\thandleOutX = 0;\n\t\thandleOutY = 0;\n\t\thandleInX = 0;\n\t\thandleInY = 0;\n\t\tradius = 0;\n\t\tradiusSmoothing = void 0;\n\t\tconstructor(value) {\n\t\t\tif (value) Object.assign(this, value);\n\t\t\tif (!value?.id) this.id = randomID();\n\t\t}\n\t\tmerge(value) {\n\t\t\treturn Object.assign(Object.create(Object.getPrototypeOf(this)), this, value);\n\t\t}\n\t\tstatic point = (pathSegment) => {\n\t\t\treturn {\n\t\t\t\tx: pathSegment.x,\n\t\t\t\ty: pathSegment.y\n\t\t\t};\n\t\t};\n\t\tstatic handleOut = (pathSegment) => {\n\t\t\treturn {\n\t\t\t\tx: pathSegment.handleOutX,\n\t\t\t\ty: pathSegment.handleOutY\n\t\t\t};\n\t\t};\n\t\tstatic handleIn = (pathSegment) => {\n\t\t\treturn {\n\t\t\t\tx: pathSegment.handleInX,\n\t\t\t\ty: pathSegment.handleInY\n\t\t\t};\n\t\t};\n\t\tstatic calculatedHandleOut = (pathSegment) => {\n\t\t\tswitch (pathSegment.handleMirroring) {\n\t\t\t\tcase \"symmetric\":\n\t\t\t\tcase \"disconnected\":\n\t\t\t\tcase \"asymmetric\": return Point.add(PathSegment.point(pathSegment), PathSegment.handleOut(pathSegment));\n\t\t\t\tdefault: return {\n\t\t\t\t\tx: pathSegment.x,\n\t\t\t\t\ty: pathSegment.y\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tstatic calculatedHandleIn = (pathSegment) => {\n\t\t\tswitch (pathSegment.handleMirroring) {\n\t\t\t\tcase \"symmetric\": return Point.subtract(PathSegment.point(pathSegment), PathSegment.handleOut(pathSegment));\n\t\t\t\tcase \"disconnected\":\n\t\t\t\tcase \"asymmetric\": return Point.add(PathSegment.point(pathSegment), PathSegment.handleIn(pathSegment));\n\t\t\t\tdefault: return PathSegment.point(pathSegment);\n\t\t\t}\n\t\t};\n\t\tstatic curveDefault = (points, index) => {\n\t\t\tif (points.length > 2) {\n\t\t\t\tlet pointBefore;\n\t\t\t\tlet pointAfter;\n\t\t\t\tif (index === 0) pointBefore = points[points.length - 1];\n\t\t\t\telse pointBefore = points[index - 1];\n\t\t\t\tif (index === points.length - 1) pointAfter = points[0];\n\t\t\t\telse pointAfter = points[index + 1];\n\t\t\t\tassert$1(pointBefore, \"pointBefore should be defined\");\n\t\t\t\tassert$1(pointAfter, \"pointAfter should be defined\");\n\t\t\t\tconst delta = Point.subtract(PathSegment.point(pointAfter), PathSegment.point(pointBefore));\n\t\t\t\treturn {\n\t\t\t\t\tx: delta.x / 4,\n\t\t\t\t\ty: delta.y / 4\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tx: 10,\n\t\t\t\ty: 10\n\t\t\t};\n\t\t};\n\t}\n\tPathSegment.prototype.__class = \"PathSegment\";\n\treturn PathSegment;\n})();\n/** @internal */\nconst PathSegment = PathSegmentOuter;\n\n//#endregion\n//#region ../../library/src/render/traits/Path.ts\nconst key$1 = \"pathSegments\";\n/**\n* @internal\n*/\nfunction withPath(target) {\n\treturn key$1 in target;\n}\n/**\n* @internal\n*/\nconst pathDefaults = {\n\tpathSegments: [],\n\tpathClosed: false\n};\n/**\n* @internal\n*/\nfunction toSVGPath(withPaths, translate = {\n\tx: 0,\n\ty: 0\n}, canvasMode = RenderTarget.canvas) {\n\tlet pathElements = [];\n\tlet paths = [];\n\tif (Array.isArray(withPaths)) paths = withPaths;\n\telse paths = [withPaths];\n\tpaths.forEach((path) => {\n\t\tconst { pathClosed, pathSegments } = path;\n\t\tconst segmentCount = pathSegments.length;\n\t\tif (segmentCount === 0) return \"\";\n\t\tfor (let i = 0; i < segmentCount; i++) {\n\t\t\tconst segment = pathSegments[i];\n\t\t\tassert$1(segment, \"Path segment must be defined\");\n\t\t\tlet nextSegment;\n\t\t\tlet prevSegment;\n\t\t\tconst isFirstSegment = i === 0;\n\t\t\tconst isLastSegment = i === segmentCount - 1;\n\t\t\tif (!isLastSegment) nextSegment = pathSegments[i + 1];\n\t\t\telse if (pathClosed) nextSegment = pathSegments[0];\n\t\t\tif (!isFirstSegment) prevSegment = pathSegments[i - 1];\n\t\t\telse if (pathClosed) prevSegment = pathSegments[segmentCount - 1];\n\t\t\tif (i === 0) pathElements.push(\"M\");\n\t\t\telse if (prevSegment && isStraightCurve(prevSegment, segment)) pathElements.push(\"L\");\n\t\t\tpathElements.push(segment.x + translate.x, segment.y + translate.y);\n\t\t\tif (nextSegment && !isStraightCurve(segment, nextSegment)) {\n\t\t\t\tconst handleOut = PathSegment.calculatedHandleOut(segment);\n\t\t\t\tconst handleIn = PathSegment.calculatedHandleIn(nextSegment);\n\t\t\t\tpathElements.push(\"C\", handleOut.x + translate.x, handleOut.y + translate.y, handleIn.x + translate.x, handleIn.y + translate.y);\n\t\t\t}\n\t\t\tif (isLastSegment && nextSegment) {\n\t\t\t\tif (isStraightCurve(segment, nextSegment)) pathElements.push(\"Z\");\n\t\t\t\telse pathElements.push(nextSegment.x + translate.x, nextSegment.y + translate.y, \"Z\");\n\t\t\t}\n\t\t}\n\t});\n\tif (canvasMode === RenderTarget.export || canvasMode === RenderTarget.preview) pathElements = pathElements.map((value) => isFiniteNumber(value) ? roundedNumberString(value, 3) : value);\n\treturn pathElements.join(\" \");\n}\n/**\n* @internal\n*/\nfunction isStraightCurve(fromSegment, toSegment) {\n\tconst fromStraight = fromSegment.handleMirroring === \"straight\" || fromSegment.handleOutX === 0 && fromSegment.handleOutY === 0;\n\tconst toStraight = toSegment.handleMirroring === \"straight\" || toSegment.handleInX === 0 && toSegment.handleInY === 0;\n\treturn fromStraight && toStraight;\n}\n\n//#endregion\n//#region ../../library/src/render/types/svgElementAttributeDefaults.ts\nconst svgElementAttributeDefaults = {\n\tstroke: \"none\",\n\tstrokeWidth: 1,\n\tstrokeLinecap: \"butt\",\n\tstrokeLinejoin: \"miter\",\n\tstrokeMiterlimit: 4,\n\tstrokeDasharray: \"0\",\n\tstrokeDashoffset: 0,\n\tstrokeOpacity: 1,\n\tfill: \"black\",\n\tfillRule: \"nonzero\",\n\tfillOpacity: 1\n};\n\n//#endregion\n//#region ../../library/src/render/utils/createTransformValues.ts\nfunction createTransformValues(baseTransform, mode) {\n\tlet { x, y } = baseTransform;\n\tconst { width, height, rotation } = baseTransform;\n\tif (mode === \"resetXY\") {\n\t\tx = 0;\n\t\ty = 0;\n\t}\n\treturn {\n\t\tx,\n\t\ty,\n\t\twidth,\n\t\theight,\n\t\trotation\n\t};\n}\nfunction getTransformMode(isRootVectorNode, includeTransform) {\n\tif (includeTransform !== void 0) {\n\t\tif (includeTransform) return \"asIs\";\n\t} else if (!isRootVectorNode) return \"asIs\";\n\treturn \"resetXY\";\n}\nfunction transformValues(rect, rotation, isRootVectorNode, includeTransform) {\n\tconst transformMode = getTransformMode(isRootVectorNode, includeTransform);\n\treturn createTransformValues({\n\t\t...rect,\n\t\trotation: includeTransform === false ? 0 : rotation\n\t}, transformMode);\n}\n\n//#endregion\n//#region ../../library/src/render/utils/transformString.ts\n/** @internal */\nfunction transformString(transform) {\n\tif (transform === void 0) return;\n\tconst { x, y, rotation, width, height } = transform;\n\tlet result;\n\tif (x !== 0 || y !== 0) result = `translate(${roundedNumberString(x, 3)} ${roundedNumberString(y, 3)})`;\n\tif (rotation !== 0) {\n\t\tconst rotationString = `rotate(${roundedNumberString(rotation, 4)} ${roundedNumberString(width / 2, 3)} ${roundedNumberString(height / 2, 3)})`;\n\t\tresult = result ? `${result} ${rotationString}` : rotationString;\n\t}\n\treturn result;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/GradientElement.tsx\nvar LinearGradientElement = class extends Component {\n\trender() {\n\t\tconst { id, stops, x1, x2, y1, y2 } = this.props;\n\t\treturn /* @__PURE__ */ jsx(\"linearGradient\", {\n\t\t\tid,\n\t\t\tx1,\n\t\t\tx2,\n\t\t\ty1,\n\t\t\ty2,\n\t\t\tchildren: stops.map((stop, idx) => {\n\t\t\t\treturn /* @__PURE__ */ jsx(\"stop\", {\n\t\t\t\t\toffset: stop.position,\n\t\t\t\t\tstopColor: stop.color,\n\t\t\t\t\tstopOpacity: stop.alpha\n\t\t\t\t}, idx);\n\t\t\t})\n\t\t});\n\t}\n};\nvar RadialGradientElement = class extends Component {\n\trender() {\n\t\tconst { centerAnchorX, centerAnchorY, id, widthFactor, heightFactor, stops } = this.props;\n\t\treturn /* @__PURE__ */ jsx(\"radialGradient\", {\n\t\t\tid,\n\t\t\tcy: centerAnchorY,\n\t\t\tcx: centerAnchorX,\n\t\t\tr: widthFactor,\n\t\t\tgradientTransform: getRadialGradientTransform(heightFactor, widthFactor, centerAnchorX, centerAnchorY),\n\t\t\tchildren: stops.map((stop, idx) => {\n\t\t\t\treturn /* @__PURE__ */ jsx(\"stop\", {\n\t\t\t\t\toffset: stop.position,\n\t\t\t\t\tstopColor: stop.color,\n\t\t\t\t\tstopOpacity: stop.alpha\n\t\t\t\t}, idx);\n\t\t\t})\n\t\t});\n\t}\n};\nfunction getRadialGradientTransform(heightFactor, widthFactor, centerAnchorX, centerAnchorY) {\n\treturn `translate(${centerAnchorX}, ${centerAnchorY}) scale(1 ${widthFactor ? heightFactor / widthFactor : 1e3}) translate(-${centerAnchorX}, -${centerAnchorY})`;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/vectorHostPlacement.ts\n/**\n* Root SVG elements must sit on half pixels to render consistently across\n* browsers, but vector geometry can have a fractional origin. Splits the exact\n* logical position into a browser-safe host position for the root SVG element\n* and the remaining content offset, which is applied inside the SVG so\n* rendered geometry stays at the exact logical position.\n*\n* @internal\n*/\nfunction getVectorHostPlacement(left, top) {\n\tconst hostLeft = roundToHalfPixel(left);\n\tconst hostTop = roundToHalfPixel(top);\n\treturn {\n\t\thostLeft,\n\t\thostTop,\n\t\tcontentOffsetX: snapNoise(left - hostLeft),\n\t\tcontentOffsetY: snapNoise(top - hostTop)\n\t};\n}\nfunction snapNoise(offset) {\n\treturn Math.abs(offset) < 1e-9 ? 0 : offset;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/SVGRoot.tsx\n/**\n* @internal\n*/\nconst SVGRoot = (props) => {\n\tconst { id, children, left, width, height, top, style, _needsMeasure } = props;\n\tconst inCodeComponent = React.useContext(ComponentContainerContext);\n\tconst ref = React.useRef(null);\n\tuseMeasureLayout({\n\t\tid,\n\t\tvisible: true,\n\t\t_needsMeasure\n\t}, ref);\n\t/**\n\t* @TODO These styles need to animate if changed by a Generated Variant.\n\t* However, we cannot use `animate` since that will block the children\n\t* from reacting to the active variant. We also have to consider canvas\n\t* performance.\n\t*/\n\tconst { hostLeft, hostTop, contentOffsetX, contentOffsetY } = getVectorHostPlacement(left, top);\n\tconst svgStyle = {\n\t\tposition: \"absolute\",\n\t\twidth,\n\t\theight,\n\t\tleft: hostLeft,\n\t\ttop: hostTop,\n\t\toverflow: \"visible\",\n\t\tdisplay: \"block\",\n\t\t...style\n\t};\n\tconst svgProps = {\n\t\tid: inCodeComponent ? void 0 : id,\n\t\tviewBox: `0 0 ${width} ${height}`,\n\t\tref\n\t};\n\tconst needsScale = isSafari() ? window.devicePixelRatio !== 1 : window.devicePixelRatio === 1;\n\tconst needsTranslate = window.devicePixelRatio === 1;\n\tif (!needsScale && !needsTranslate && !(contentOffsetX !== 0 || contentOffsetY !== 0)) return /* @__PURE__ */ jsx(\"svg\", {\n\t\trole: \"presentation\",\n\t\t...svgProps,\n\t\tstyle: svgStyle,\n\t\tchildren\n\t});\n\tconst svgTransform = needsScale ? { transform: \"scale(2)\" } : void 0;\n\treturn /* @__PURE__ */ jsx(\"svg\", {\n\t\trole: \"presentation\",\n\t\t...svgProps,\n\t\tstyle: {\n\t\t\t...svgStyle,\n\t\t\t...svgTransform\n\t\t},\n\t\tchildren: /* @__PURE__ */ jsx(\"g\", {\n\t\t\tstyle: {\n\t\t\t\ttransformOrigin: \"center\",\n\t\t\t\ttransform: getShapeTransform({\n\t\t\t\t\tneedsScale,\n\t\t\t\t\tneedsTranslate,\n\t\t\t\t\thostLeft,\n\t\t\t\t\thostTop,\n\t\t\t\t\tcontentOffsetX,\n\t\t\t\t\tcontentOffsetY\n\t\t\t\t})\n\t\t\t},\n\t\t\tchildren\n\t\t})\n\t});\n};\nfunction getShapeTransform({ needsScale, needsTranslate, hostLeft, hostTop, contentOffsetX, contentOffsetY }) {\n\tconst l = (needsTranslate ? Math.floor(hostLeft) - hostLeft : 0) + contentOffsetX;\n\tconst t = (needsTranslate ? Math.floor(hostTop) - hostTop : 0) + contentOffsetY;\n\tconst transforms = [];\n\tif (needsScale) transforms.push(\"scale(0.5)\");\n\tif (l || t) transforms.push(`translate(${l}px, ${t}px)`);\n\treturn transforms.length ? transforms.join(\" \") : void 0;\n}\n\n//#endregion\n//#region ../../library/src/render/presentation/Vector.tsx\n/**\n* @internal\n*/\nconst Vector = /* @__PURE__ */ (() => {\n\treturn class VectorInner extends Layer {\n\t\tstatic defaultVectorProps = {\n\t\t\tisRootVectorNode: false,\n\t\t\tname: null,\n\t\t\tincludeTransform: void 0,\n\t\t\tdefaultFillColor: void 0,\n\t\t\tdefaultStrokeColor: void 0,\n\t\t\tdefaultStrokeWidth: void 0,\n\t\t\tdefaultStrokeAlignment: \"center\",\n\t\t\twidth: 100,\n\t\t\theight: 100,\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\trotation: 0,\n\t\t\trotate: void 0,\n\t\t\topacity: void 0,\n\t\t\tcalculatedPath: [],\n\t\t\tcalculatedPathBoundingBox: {\n\t\t\t\tx: 0,\n\t\t\t\ty: 0,\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0\n\t\t\t},\n\t\t\td: void 0,\n\t\t\tinsideStroke: false,\n\t\t\tstrokeEnabled: true,\n\t\t\tstrokeClipId: void 0,\n\t\t\tstrokeWidth: void 0,\n\t\t\tidAttribute: void 0,\n\t\t\ttransition: void 0,\n\t\t\tshadows: [],\n\t\t\tstrokeAlpha: 1,\n\t\t\tlineCap: \"butt\",\n\t\t\tstrokeColor: \"#0AF\",\n\t\t\tlineJoin: \"miter\",\n\t\t\tstrokeMiterLimit: 4,\n\t\t\tstrokeDashArray: \"0\",\n\t\t\tstrokeDashOffset: 0,\n\t\t\tfill: \"rgba(0,170,255,0.5)\",\n\t\t\tvisible: void 0\n\t\t};\n\t\tstatic defaultProps = {\n\t\t\t...Layer.defaultProps,\n\t\t\t...VectorInner.defaultVectorProps\n\t\t};\n\t\trender() {\n\t\t\t/* @__PURE__ */ countNodeRender();\n\t\t\tconst { opacity, calculatedPath, calculatedPathBoundingBox, d, insideStroke, strokeEnabled, strokeClipId, strokeWidth, idAttribute, shadows, name, includeTransform, isRootVectorNode, rotation, id, lineCap, lineJoin, strokeColor, strokeMiterLimit, strokeDashArray, strokeDashOffset, fill, variants, transition, fillOpacity, visible, x, y, width, height } = this.props;\n\t\t\tif (!visible) return null;\n\t\t\tif (!id || !strokeClipId) return null;\n\t\t\tconst rotate = this.props.rotate ?? rotation ?? 0;\n\t\t\tconst { target } = RenderEnvironment;\n\t\t\t/**\n\t\t\t* @TODO For Vectors to animate smoothly in Generated Components, we\n\t\t\t* need to reconsider how we set this transform. This transform needs to\n\t\t\t* be set on changes for the image fill to update, but also used in an\n\t\t\t* `initial` prop, and set by `variants` so that rotation animates. We\n\t\t\t* also have to consider canvas performance.\n\t\t\t*/\n\t\t\tconst transform = transformValues({\n\t\t\t\tx,\n\t\t\t\ty,\n\t\t\t\twidth,\n\t\t\t\theight\n\t\t\t}, rotate, isRootVectorNode, includeTransform);\n\t\t\tlet vectorFill;\n\t\t\tlet fillAlpha = 0;\n\t\t\tlet imagePattern;\n\t\t\tlet linearGradient;\n\t\t\tlet radialGradient;\n\t\t\tif (isString(fill) || Color.isColorObject(fill)) {\n\t\t\t\tconst fillColor = Color.isColorObject(fill) ? fill.initialValue || Color.toRgbString(fill) : fill;\n\t\t\t\tif (fillColor !== \"transparent\") {\n\t\t\t\t\tvectorFill = fillColor;\n\t\t\t\t\tfillAlpha = ConvertColor.getAlpha(vectorFill);\n\t\t\t\t}\n\t\t\t} else if (LinearGradient.isLinearGradient(fill)) {\n\t\t\t\tlinearGradient = elementPropertiesForLinearGradient(fill, id);\n\t\t\t\tvectorFill = `url(#${linearGradient.id})`;\n\t\t\t\tfillAlpha = 1;\n\t\t\t} else if (RadialGradient.isRadialGradient(fill)) {\n\t\t\t\tradialGradient = elementPropertiesForRadialGradient(fill, id);\n\t\t\t\tvectorFill = `url(#${radialGradient.id})`;\n\t\t\t\tfillAlpha = 1;\n\t\t\t} else if (BackgroundImage.isImageObject(fill)) {\n\t\t\t\timagePattern = imagePatternPropsForFill(fill, transform, id, includeTransform);\n\t\t\t\tif (imagePattern) {\n\t\t\t\t\tvectorFill = `url(#${imagePattern.id})`;\n\t\t\t\t\tfillAlpha = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (vectorFill === svgElementAttributeDefaults.fill) vectorFill = void 0;\n\t\t\tif (vectorFill === void 0) vectorFill = \"transparent\";\n\t\t\tif (!(vectorFill !== void 0 && vectorFill !== \"transparent\" && fillAlpha !== 0) && !strokeEnabled) fillAlpha = 1;\n\t\t\tlet mainElement;\n\t\t\tlet strokeClipPath = null;\n\t\t\tlet shapeReference = null;\n\t\t\tlet strokeElement = null;\n\t\t\tlet pathTranslate;\n\t\t\tlet elementTransform;\n\t\t\tconst translatePaths = target === RenderTarget.export;\n\t\t\tif (transform.rotation === 0 && translatePaths) pathTranslate = transform;\n\t\t\telse {\n\t\t\t\tpathTranslate = {\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty: 0\n\t\t\t\t};\n\t\t\t\telementTransform = transformString(transform);\n\t\t\t}\n\t\t\tconst pathAttributes = {\n\t\t\t\td: d ?? toSVGPath(calculatedPath, pathTranslate, target),\n\t\t\t\ttransform: elementTransform\n\t\t\t};\n\t\t\tconst svgStrokeAttributes = {};\n\t\t\tif (strokeEnabled && strokeWidth !== 0) {\n\t\t\t\tsvgStrokeAttributes.strokeWidth = strokeWidth;\n\t\t\t\tsvgStrokeAttributes.stroke = strokeColor;\n\t\t\t\tsvgStrokeAttributes.strokeLinecap = lineCap;\n\t\t\t\tsvgStrokeAttributes.strokeLinejoin = lineJoin;\n\t\t\t\tif (lineJoin === \"miter\") svgStrokeAttributes.strokeMiterlimit = strokeMiterLimit;\n\t\t\t\tsvgStrokeAttributes.strokeDasharray = strokeDashArray;\n\t\t\t\tif (strokeDashOffset !== 0) svgStrokeAttributes.strokeDashoffset = strokeDashOffset;\n\t\t\t}\n\t\t\tfor (const key in svgElementAttributeDefaults) if (asRecord(svgStrokeAttributes)[key] === asRecord(svgElementAttributeDefaults)[key]) asRecord(svgStrokeAttributes)[key] = void 0;\n\t\t\tconst internalShapeId = InternalID.forKey(id);\n\t\t\tconst internalStrokeClipId = InternalID.forKey(strokeClipId);\n\t\t\tconst shadow = shadowForShape(shadows, calculatedPathBoundingBox, internalShapeId, Boolean(fill), strokeEnabled, strokeWidth, internalStrokeClipId, svgStrokeAttributes);\n\t\t\tconst currentName = target === RenderTarget.preview ? name || void 0 : void 0;\n\t\t\tif (shadow.insetElement !== null || shadow.outsetElement !== null || insideStroke) {\n\t\t\t\tpathAttributes.id = internalShapeId.id;\n\t\t\t\tshapeReference = /* @__PURE__ */ jsx(motion.path, {\n\t\t\t\t\t...pathAttributes,\n\t\t\t\t\tvariants,\n\t\t\t\t\ttransition\n\t\t\t\t});\n\t\t\t\tif (shadow.needsStrokeClip || insideStroke) strokeClipPath = /* @__PURE__ */ jsx(\"clipPath\", {\n\t\t\t\t\tid: internalStrokeClipId.id,\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(\"use\", { xlinkHref: internalShapeId.link })\n\t\t\t\t});\n\t\t\t\tif (shadow.insetElement !== null && strokeEnabled && strokeWidth && strokeWidth > 0) {\n\t\t\t\t\tmainElement = /* @__PURE__ */ jsx(\"use\", {\n\t\t\t\t\t\txlinkHref: internalShapeId.link,\n\t\t\t\t\t\tfill: vectorFill,\n\t\t\t\t\t\tfillOpacity,\n\t\t\t\t\t\tstrokeOpacity: \"0\",\n\t\t\t\t\t\tname: currentName\n\t\t\t\t\t});\n\t\t\t\t\tstrokeElement = /* @__PURE__ */ jsx(\"use\", {\n\t\t\t\t\t\txlinkHref: internalShapeId.link,\n\t\t\t\t\t\tclipPath: internalStrokeClipId.urlLink,\n\t\t\t\t\t\tfill: \"transparent\",\n\t\t\t\t\t\t...svgStrokeAttributes,\n\t\t\t\t\t\tstrokeWidth\n\t\t\t\t\t});\n\t\t\t\t} else mainElement = /* @__PURE__ */ jsx(\"use\", {\n\t\t\t\t\txlinkHref: internalShapeId.link,\n\t\t\t\t\tfill: vectorFill,\n\t\t\t\t\tfillOpacity,\n\t\t\t\t\tclipPath: internalStrokeClipId.urlLink,\n\t\t\t\t\t...svgStrokeAttributes,\n\t\t\t\t\tstrokeWidth,\n\t\t\t\t\tname: currentName\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tpathAttributes.id = idAttribute;\n\t\t\t\tmainElement = /* @__PURE__ */ jsx(motion.path, {\n\t\t\t\t\t...pathAttributes,\n\t\t\t\t\tfill: vectorFill,\n\t\t\t\t\t...svgStrokeAttributes,\n\t\t\t\t\tname: currentName,\n\t\t\t\t\tfillOpacity,\n\t\t\t\t\tvariants,\n\t\t\t\t\ttransition\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst imagePatternElement = imagePattern ? /* @__PURE__ */ jsx(ImagePatternElement, {\n\t\t\t\t...imagePattern,\n\t\t\t\trepeat: BackgroundImage.isImageObject(fill) && fill.fit === \"tile\"\n\t\t\t}) : void 0;\n\t\t\tlet gradient;\n\t\t\tif (linearGradient) gradient = /* @__PURE__ */ jsx(LinearGradientElement, { ...linearGradient });\n\t\t\telse if (radialGradient) gradient = /* @__PURE__ */ jsx(RadialGradientElement, { ...radialGradient });\n\t\t\tlet defs = null;\n\t\t\tif (shapeReference || strokeClipPath || shadow.definition && shadow.definition.length || gradient || imagePatternElement) defs = /* @__PURE__ */ jsxs(\"defs\", { children: [\n\t\t\t\tshapeReference,\n\t\t\t\tstrokeClipPath,\n\t\t\t\tshadow.definition,\n\t\t\t\tgradient,\n\t\t\t\timagePatternElement\n\t\t\t] });\n\t\t\tconst opacityValue = opacity ?? (variants ? 1 : void 0);\n\t\t\tif (defs === null && shadow.outsetElement === null && shadow.insetElement === null && strokeElement === null) {\n\t\t\t\tmainElement = /* @__PURE__ */ jsx(motion.path, {\n\t\t\t\t\t...pathAttributes,\n\t\t\t\t\tfill: vectorFill,\n\t\t\t\t\t...svgStrokeAttributes,\n\t\t\t\t\tfillOpacity,\n\t\t\t\t\topacity: opacityValue,\n\t\t\t\t\tvariants,\n\t\t\t\t\ttransition,\n\t\t\t\t\tname: currentName\n\t\t\t\t});\n\t\t\t\treturn this.renderElement(mainElement);\n\t\t\t}\n\t\t\treturn this.renderElement(/* @__PURE__ */ jsxs(motion.g, {\n\t\t\t\topacity: opacityValue,\n\t\t\t\tvariants,\n\t\t\t\ttransition,\n\t\t\t\tchildren: [\n\t\t\t\t\tdefs,\n\t\t\t\t\tshadow.maskElement,\n\t\t\t\t\tshadow.outsetElement,\n\t\t\t\t\tmainElement,\n\t\t\t\t\tshadow.insetElement,\n\t\t\t\t\tstrokeElement\n\t\t\t\t]\n\t\t\t}));\n\t\t}\n\t\trenderElement(element) {\n\t\t\tconst { id, isRootVectorNode, width, height, includeTransform, left, top, style, _needsMeasure } = this.props;\n\t\t\tif (!isRootVectorNode) return element;\n\t\t\tif (includeTransform) return element;\n\t\t\t/**\n\t\t\t* @TODO For generated components, this <svg> wrapper needs to become a\n\t\t\t* <motion.svg> and animate it's changes to width/height with layout,\n\t\t\t* and translate x & y with variants.\n\t\t\t*/\n\t\t\treturn /* @__PURE__ */ jsx(SVGRoot, {\n\t\t\t\tid,\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\tleft,\n\t\t\t\ttop,\n\t\t\t\tstyle,\n\t\t\t\t_needsMeasure,\n\t\t\t\tchildren: element\n\t\t\t});\n\t\t}\n\t};\n})();\n\n//#endregion\n//#region ../../library/src/render/presentation/VectorGroup.tsx\n/**\n* @internal\n*/\nconst VectorGroup = /* @__PURE__ */ (() => {\n\treturn class VectorGroupInner extends Layer {\n\t\tstatic defaultVectorGroupProps = {\n\t\t\tname: void 0,\n\t\t\topacity: void 0,\n\t\t\tvisible: true,\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\trotation: 0,\n\t\t\twidth: 100,\n\t\t\theight: 100,\n\t\t\ttargetName: void 0,\n\t\t\tdefaultName: \"\",\n\t\t\tisRootVectorNode: false,\n\t\t\tincludeTransform: void 0\n\t\t};\n\t\tstatic defaultProps = {\n\t\t\t...Layer.defaultProps,\n\t\t\t...VectorGroupInner.defaultVectorGroupProps\n\t\t};\n\t\trender() {\n\t\t\t/* @__PURE__ */ countNodeRender();\n\t\t\tconst { name: nameProp, opacity, visible, targetName, defaultName, children, includeTransform, x, y, width, height, rotation, isRootVectorNode } = this.props;\n\t\t\tif (!visible) return null;\n\t\t\tconst { target } = RenderEnvironment;\n\t\t\tconst transform = transformValues({\n\t\t\t\tx,\n\t\t\t\ty,\n\t\t\t\twidth,\n\t\t\t\theight\n\t\t\t}, rotation, isRootVectorNode, includeTransform);\n\t\t\tconst addNames = target === RenderTarget.preview;\n\t\t\tlet name = void 0;\n\t\t\tif (addNames) {\n\t\t\t\tif (targetName) name = targetName;\n\t\t\t\telse if (nameProp) name = nameProp;\n\t\t\t\telse name = defaultName;\n\t\t\t}\n\t\t\treturn this.renderElement(/* @__PURE__ */ jsx(\"g\", {\n\t\t\t\ttransform: transformString(transform),\n\t\t\t\tname,\n\t\t\t\topacity,\n\t\t\t\tchildren\n\t\t\t}));\n\t\t}\n\t\trenderElement(element) {\n\t\t\tconst { id, isRootVectorNode, width, height, includeTransform, left, top, style, _needsMeasure } = this.props;\n\t\t\tif (!isRootVectorNode) return element;\n\t\t\tif (includeTransform) return element;\n\t\t\treturn /* @__PURE__ */ jsx(SVGRoot, {\n\t\t\t\tid,\n\t\t\t\tleft,\n\t\t\t\ttop,\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\tstyle,\n\t\t\t\t_needsMeasure,\n\t\t\t\tchildren: element\n\t\t\t});\n\t\t}\n\t};\n})();\n\n//#endregion\n//#region ../../library/src/render/traits/Shape.ts\nconst key = \"calculatedPaths\";\n/**\n* @internal\n*/\nfunction withShape(target) {\n\tif (!isObject$1(target)) return false;\n\treturn key in target;\n}\n\n//#endregion\n//#region ../../library/src/render/types/Size.ts\nconst Size = /* @__PURE__ */ (() => {\n\t/**\n\t* @public\n\t*/\n\tfunction Size(width, height) {\n\t\treturn {\n\t\t\twidth,\n\t\t\theight\n\t\t};\n\t}\n\t/**\n\t* @param sizeA -\n\t* @param sizeB -\n\t* @internal\n\t*/\n\tSize.equals = (sizeA, sizeB) => {\n\t\tif (sizeA === sizeB) return true;\n\t\tif (!sizeA || !sizeB) return false;\n\t\treturn sizeA.width === sizeB.width && sizeA.height === sizeB.height;\n\t};\n\t/**\n\t*\n\t* @param fromSize - The initial size\n\t* @param toSize - The size to update to\n\t* @param keepAspectRatio - If the updating should preserve the aspect ratio\n\t* @remarks\n\t* keepAspectRatio only works if passing a toSize with only a width or height\n\t* @internal\n\t*/\n\tSize.update = (fromSize, toSize, keepAspectRatio = false) => {\n\t\tlet { width, height } = fromSize;\n\t\tconst sizeRatio = width / height;\n\t\twidth = toSize.width !== void 0 ? toSize.width : width;\n\t\theight = toSize.height !== void 0 ? toSize.height : height;\n\t\tif (keepAspectRatio) {\n\t\t\tif (toSize.width === void 0 && toSize.height !== void 0) width = toSize.height * sizeRatio;\n\t\t\tif (toSize.width !== void 0 && toSize.height === void 0 && sizeRatio !== 0) height = toSize.width / sizeRatio;\n\t\t}\n\t\treturn {\n\t\t\twidth,\n\t\t\theight\n\t\t};\n\t};\n\t/**\n\t*\n\t* @param sizeA -\n\t* @param sizeB -\n\t* @internal\n\t*/\n\tSize.subtract = (sizeA, sizeB) => {\n\t\treturn {\n\t\t\twidth: Math.max(0, sizeA.width - sizeB.width),\n\t\t\theight: Math.max(0, sizeA.height - sizeB.height)\n\t\t};\n\t};\n\t/**\n\t* @public\n\t*/\n\tSize.zero = Size(0, 0);\n\t/**\n\t* Checks if the size has a zero width and zero height\n\t* @param size - size to check\n\t* @public\n\t*/\n\tSize.isZero = function(size) {\n\t\treturn size === Size.zero || size.width === 0 && size.height === 0;\n\t};\n\t/**\n\t* @param width -\n\t* @param height -\n\t* @param size -\n\t* @internal\n\t*/\n\tSize.defaultIfZero = function(width, height, size) {\n\t\tif (Size.isZero(size)) return Size(width, height);\n\t\treturn size;\n\t};\n\treturn Size;\n})();\n\n//#endregion\n//#region ../../library/src/render/utils/annotateTypeOnStringify.ts\n/** @internal */\nfunction annotateTypeOnStringify(ctor, typeName) {\n\tconst existingToJSON = ctor.prototype.toJSON;\n\tctor.prototype.toJSON = function() {\n\t\tconst base = existingToJSON ? existingToJSON.apply(this) : this;\n\t\treturn Object.assign({}, base, { __type__: typeName });\n\t};\n\treturn ctor;\n}\n/** @internal */\nfunction isOfAnnotatedType(object, typeName) {\n\treturn object?.__type__ === typeName;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/getLoadingLazyAtYPosition.ts\nconst LOADING_LAZY_THRESHOLD = 1e3;\n/** @internal */\nfunction getLoadingLazyAtYPosition(offset) {\n\treturn offset > LOADING_LAZY_THRESHOLD ? \"lazy\" : void 0;\n}\n\n//#endregion\n//#region ../../library/src/render/utils/gradientForShape.tsx\n/**\n* @internal\n*/\nfunction gradientForShape(nodeId, node) {\n\tif (LinearGradient.isLinearGradient(node.fill)) return elementPropertiesForLinearGradient(node.fill, nodeId);\n\tif (RadialGradient.isRadialGradient(node.fill)) return elementPropertiesForRadialGradient(node.fill, nodeId);\n}\n\n//#endregion\n//#region ../../library/src/render/utils/throttle.ts\n/**\n*  @internal\n*  @deprecated - don't use outside of Library anymore.\n*/\nfunction throttle(fn, time) {\n\tlet previous = 0;\n\tlet timeout;\n\tconst later = (...args) => {\n\t\tprevious = Date.now();\n\t\ttimeout = void 0;\n\t\tfn(...args);\n\t};\n\treturn (...args) => {\n\t\tconst now = Date.now();\n\t\tconst remaining = time - (now - previous);\n\t\tif (remaining <= 0 || remaining > time) {\n\t\t\tif (timeout) {\n\t\t\t\tsafeWindow.clearTimeout(timeout);\n\t\t\t\ttimeout = void 0;\n\t\t\t}\n\t\t\tprevious = now;\n\t\t\tfn(...args);\n\t\t} else if (!timeout) timeout = safeWindow.setTimeout(later, remaining, ...args);\n\t};\n}\n\n//#endregion\n//#region ../../library/src/utils/addActionControls.ts\n/**\n* Provide a title and controls for an action, used in the Framer UI\n* @param action - a reference to an {@link Action}\n* @param title - the display title of the action\n* @param controls - the action controls\n* @internal\n*/\nfunction addActionControls(action, title, controls) {\n\truntime.addActionControls(action, title, controls);\n}\n\n//#endregion\n//#region ../../library/src/render/fonts/css.ts\nconst FRAMER_VARIABLE_FONT_SUFFIX = \"Variable\";\n\n//#endregion\n//#region ../../library/src/utils/addFonts.ts\n/** @public */\nfunction addFonts(component, fontsOrBundles, flags) {\n\tconst bundles = upgradeFontBundlesAsNeeded(fontsOrBundles);\n\tif (!flags?.supportsExplicitInterCodegen && !bundles.some((font) => font.explicitInter === false)) bundles.push({\n\t\texplicitInter: false,\n\t\tfonts: []\n\t});\n\tObject.assign(component, { fonts: bundles });\n}\n/** @public */\nfunction getFonts(component) {\n\tif (!component) return emptyArray();\n\treturn component.fonts ?? emptyArray();\n}\n/** @internal */\nfunction getFontsFromSharedStyle(fontsOrBundles) {\n\tif (fontsOrBundles.length === 0) return [{\n\t\texplicitInter: false,\n\t\tfonts: []\n\t}];\n\treturn upgradeFontBundlesAsNeeded(fontsOrBundles);\n}\n/** @internal */\nfunction getFontsFromComponentPreset(fonts) {\n\tif (fonts.length === 0) return [{\n\t\texplicitInter: false,\n\t\tfonts: []\n\t}];\n\treturn upgradeFontBundlesAsNeeded(fonts);\n}\nfunction upgradeFontBundlesAsNeeded(fonts) {\n\tconst oldFontBundle = {\n\t\texplicitInter: false,\n\t\tfonts: []\n\t};\n\tconst fontBundles = [];\n\tfor (const fontOrBundle of fonts) if (isComponentFontBundle(fontOrBundle)) fontBundles.push({\n\t\texplicitInter: fontOrBundle.explicitInter,\n\t\tfonts: fontOrBundle.fonts.map(upgradeComponentFont)\n\t});\n\telse oldFontBundle.fonts.push(upgradeComponentFont(fontOrBundle));\n\tif (oldFontBundle.fonts.length > 0) fontBundles.push(oldFontBundle);\n\treturn fontBundles;\n}\nconst componentFontBundleKey = \"explicitInter\";\n/** @internal */\nfunction isComponentFontBundle(font) {\n\treturn componentFontBundleKey in font;\n}\nfunction upgradeComponentFont(font) {\n\tconst fontV2 = hasComponentFontV2(font) || hasComponentFontV3(font) ? font : upgradeToComponentFontV2(font);\n\treturn hasComponentFontV3(fontV2) ? fontV2 : upgradeToComponentFontV3(fontV2);\n}\nfunction hasComponentFontV2(font) {\n\treturn \"source\" in font;\n}\nfunction hasComponentFontV3(font) {\n\treturn \"cssFamilyName\" in font;\n}\n/** Upgrades an older ComponentFontV1 present in code-generated sources to the modern ComponentFont version. */\nfunction upgradeToComponentFontV2(font) {\n\tlet source;\n\tif (font.url.startsWith(\"https://fonts.gstatic.com/s/\")) source = \"google\";\n\telse if (font.url.startsWith(\"https://framerusercontent.com/third-party-assets/fontshare/\")) source = \"fontshare\";\n\telse source = \"custom\";\n\treturn {\n\t\t...font,\n\t\tsource\n\t};\n}\nfunction upgradeToComponentFontV3(font) {\n\tconst { family, ...rest } = font;\n\tconst cssFamilyName = font.variationAxes && font.source !== \"custom\" ? `${family} ${FRAMER_VARIABLE_FONT_SUFFIX}` : family;\n\treturn {\n\t\t...rest,\n\t\tuiFamilyName: family,\n\t\tcssFamilyName\n\t};\n}\n\n//#endregion\n//#region ../../library/src/modules/HookVariableBindings.tsx\n/**\n* Runs a code hook and returns what it exposes, keyed as the hook returned it. Values are not\n* validated here: every assignment checks what it receives against its own control. The hook\n* identity comes from a static import, so calling it conditionally keeps the order of hooks stable\n* for a given component.\n*/\nfunction useHookOutputs(hook, inputs, ownerRef) {\n\tconst outputs = isFunction(hook) ? hook(inputs, ownerRef) : void 0;\n\treturn isObject$1(outputs) ? outputs : {};\n}\nfunction HookOutputs({ hook, inputs, ownerRef, children }) {\n\tconst ownRef = React.useRef(null);\n\tconst ref = ownerRef ?? ownRef;\n\treturn children(useHookOutputs(hook, inputs, ref), ref);\n}\n/** The frame without its hook, rendered only once the hook has thrown. */\nfunction HookFallback({ ownerRef, children }) {\n\tconst ownRef = React.useRef(null);\n\treturn children({}, ownerRef ?? ownRef);\n}\n/**\n* Provides a hook's outputs to the frame it is assigned to and to its descendants. A hook that\n* throws is disabled by a code boundary like a code component, and the frame renders without it.\n*/\nfunction HookVariableBindings({ scopeId, nodeId, ...props }) {\n\treturn /* @__PURE__ */ jsx(CodeComponentBoundary, {\n\t\tgetErrorMessage: () => getErrorMessageFor(\"hook\", scopeId, nodeId),\n\t\tfallback: /* @__PURE__ */ jsx(HookFallback, {\n\t\t\townerRef: props.ownerRef,\n\t\t\tchildren: props.children\n\t\t}),\n\t\tchildren: /* @__PURE__ */ jsx(HookOutputs, { ...props })\n\t});\n}\n\n//#endregion\n//#region ../../library/src/utils/withPerformanceMarks.ts\nfunction withPerformanceMarks(prefix, callback) {\n\tconst markStart = `${prefix}-start`;\n\tperformance.mark(markStart);\n\tcallback();\n\tconst markEnd = `${prefix}-end`;\n\tperformance.mark(markEnd);\n\tperformance.measure(prefix, markStart, markEnd);\n}\n\n//#endregion\n//#region ../../library/src/utils/environment.ts\nfunction deviceOS() {\n\tif (isMacOS()) return \"macos\";\n\tif (isIOS()) return \"ios\";\n\tif (isAndroid()) return \"android\";\n\tif (isWindows()) return \"windows\";\n}\nfunction deviceFont(os) {\n\tif (!os) os = deviceOS();\n\tconst fonts = {\n\t\tapple: \"-apple-system, BlinkMacSystemFont, SF Pro Text, SF UI Text, Helvetica Neue\",\n\t\tgoogle: \"Roboto, Helvetica Neue\",\n\t\tmicrosoft: \"Segoe UI, Helvetica Neue\"\n\t};\n\tif (os === \"macos\") return fonts.apple;\n\tif (os === \"ios\") return fonts.apple;\n\tif (os === \"android\") return fonts.google;\n\tif (os === \"windows\") return fonts.microsoft;\n\treturn fonts.apple;\n}\n/** @internal */\n/** @deprecated Exported only for backwards compatibility; import directly from @framerjs/shared/src/environment.ts instead. */\nconst environment = {\n\tchromeMainVersion,\n\tdeviceFont,\n\tdeviceOS,\n\tdeviceType,\n\tisAndroid,\n\tisBrowser: isBrowser$1,\n\tisChrome: isChrome$1,\n\tisDataUrl,\n\tisDesktop,\n\tisEdge,\n\tisEmbedded,\n\tisFileUrl,\n\tisFirefox,\n\tisFramerX,\n\tisIOS,\n\tisLocalServerUrl,\n\tisLocalUrl,\n\tisMacOS,\n\tisMobile,\n\tisPhone,\n\tisRelativeUrl,\n\tisSafari,\n\tisTablet,\n\tisTest,\n\tisTouch,\n\tisWebKit,\n\tisWindows,\n\tsafariVersion\n};\n\n//#endregion\n//#region ../../library/src/utils/network.ts\n/**\n* @internal\n*/\nfunction loadJSON(url) {\n\treturn fetch(url, { mode: \"cors\" }).then((res) => res.json());\n}\n\n//#endregion\n//#region ../../library/src/utils/inspectObjectType.ts\nfunction inspectObjectType(item) {\n\tlet className;\n\tif ((item.constructor !== null ? item.constructor.name : void 0) !== null && (item.constructor !== null ? item.constructor.name : void 0) !== \"Object\") return item.constructor.name;\n\tconst extract = function(str) {\n\t\tif (!str) return null;\n\t\tconst match = /\\[object (\\w+)\\]/u.exec(str);\n\t\tif (match) return match[1];\n\t\treturn null;\n\t};\n\tif (item.toString) {\n\t\tclassName = extract(item.toString());\n\t\tif (className) return className;\n\t}\n\tif (item.constructor !== null ? item.constructor.toString : void 0) {\n\t\tclassName = extract(item.constructor !== null ? item.constructor.toString() : void 0);\n\t\tif (className) return className.replace(\"Constructor\", \"\");\n\t}\n\treturn \"Object\";\n}\n\n//#endregion\n//#region ../../library/src/utils/inspect.ts\nfunction inspect(item, max, l) {\n\tif (max === void 0) max = 5;\n\tif (l === void 0) l = 0;\n\tif (item === null) return \"null\";\n\tif (item === void 0) return \"undefined\";\n\tif (isObject$1(item) && isFunction(item.toInspect)) return item.toInspect();\n\tif (isString(item)) return `\"${item}\"`;\n\tif (isNumber(item)) return `${item}`;\n\tif (isFunction(item)) {\n\t\tlet code = item.toString().slice(9).replace(/\\n/gu, \"\").replace(/\\s+/gu, \" \");\n\t\tif (code.length > 50 && l > 0) code = `${code.slice(0, 51).trim()}… }`;\n\t\treturn `<Function ${code}>`;\n\t}\n\tif (isArray(item)) {\n\t\tif (l > max) return \"[...]\";\n\t\treturn `[${item.map((i) => inspect(i, max, (l || 0) + 1)).join(\", \")}]`;\n\t}\n\tif (isObject$1(item)) {\n\t\tlet objectInfo;\n\t\tconst objectType = inspectObjectType(item);\n\t\tif (/HTML\\w+?Element/u.test(objectType)) return `<${objectType}>`;\n\t\tif (l > max) objectInfo = \"{...}\";\n\t\telse objectInfo = `{${Object.keys(item).map((k) => `${k}:${inspect(item[k], max, (l || 0) + 1)}`).join(\", \")}}`;\n\t\tif (objectType === \"Object\") return objectInfo;\n\t\treturn `<${objectType} ${objectInfo}>`;\n\t}\n\treturn `${item}`;\n}\n\n//#endregion\n//#region ../../library/src/utils/print.ts\n/**\n* Prints to the console.\n*\n* @param args - Arguments to print\n* @public\n*/\nfunction print(...args) {\n\tconst line = args.map((arg) => {\n\t\treturn inspect(arg);\n\t}).join(\", \");\n\tconsole.log(line);\n}\n\n//#endregion\n//#region ../../library/src/utils/useInitialRouteComponent.ts\nfunction initialRouteComponent(component) {\n\tif (!component) return null;\n\tif (withPreload(component)) return null;\n\treturn component;\n}\n/**\n* Workaround for SSG + React.Suspense 💥 ReactDomServer currently does not support Suspense in\n* React 17, and will fail if it encounters Suspense. To work around this, we have to implement a\n* simple version of Suspense ourselves. To do this we use this hook to fetch the initial route of a\n* prototype, and only render the component after it has been fetched.\n* @internal\n* @deprecated used by canvas pages only\n*/\nfunction useInitialRouteComponent(routes, homeNodeId) {\n\tconst InitialRouteComponent = routes[homeNodeId]?.page;\n\tconst [RouteComponent, setRouteComponent] = useState(() => initialRouteComponent(InitialRouteComponent));\n\tuseEffect(() => {\n\t\tif (withPreload(InitialRouteComponent)) (async () => {\n\t\t\tawait InitialRouteComponent.preload();\n\t\t\tsetRouteComponent(InitialRouteComponent);\n\t\t})();\n\t}, []);\n\treturn RouteComponent;\n}\n\n//#endregion\n//#region ../../library/src/utils/runWithYield.ts\n/** Runs a task after yielding to the main thread when the shared batch budget has elapsed; otherwise runs synchronously. */\nfunction runWithYield(task, scheduling) {\n\tconst yieldPromise = yieldToMain({\n\t\tbatch: true,\n\t\tpriority: scheduling.priority,\n\t\tsignal: scheduling.signal\n\t});\n\tif (!yieldPromise) return task();\n\treturn yieldPromise.then(task);\n}\n/**\n* Starts tasks with time-budgeted yield checkpoints while preserving `Promise.allSettled` semantics.\n* Tasks are thunks so their synchronous work starts only after its checkpoint rather than while the\n* task list is being created.\n*/\nasync function runTasksWithYield(tasks, scheduling) {\n\tconst settledTasks = [];\n\tlet isFirstTask = true;\n\tfor (const task of tasks) {\n\t\tif (!isFirstTask) {\n\t\t\tconst yieldPromise = yieldToMain({\n\t\t\t\tbatch: true,\n\t\t\t\tpriority: scheduling.priority,\n\t\t\t\tsignal: scheduling.signal\n\t\t\t});\n\t\t\tif (yieldPromise) await yieldPromise;\n\t\t}\n\t\tisFirstTask = false;\n\t\ttry {\n\t\t\tconst maybeValue = task();\n\t\t\tsettledTasks.push(Promise.resolve(maybeValue).then((value) => ({\n\t\t\t\tstatus: \"fulfilled\",\n\t\t\t\tvalue\n\t\t\t}), (reason) => ({\n\t\t\t\tstatus: \"rejected\",\n\t\t\t\treason\n\t\t\t})));\n\t\t} catch (reason) {\n\t\t\tsettledTasks.push(Promise.resolve({\n\t\t\t\tstatus: \"rejected\",\n\t\t\t\treason\n\t\t\t}));\n\t\t}\n\t}\n\treturn Promise.all(settledTasks);\n}\n\n//#endregion\n//#region ../../library/src/modules/loader/addLoader.ts\n/**\n* Attaches a loader function to a component for data preloading.\n*\n* @example\n* ```tsx\n* addLoader(ParentComponent, async (props, context) => {\n*   return Promise.allSettled([\n*     forwardLoader(ChildComponent, {\n*       ...props,\n*       url: \"https://api.example.com/data\"\n*     }, context),\n*     fetch(props.url ?? \"https://api.example.com/data\", { signal: context.signal, cache: \"force-cache\" })\n*   ])\n* })\n* ```\n*\n* @public\n*/\nfunction addLoader(component, loaderFn) {\n\tObject.assign(component, { loader: { load: loaderFn } });\n}\n/**\n* Get the loader for a component if it exists.\n* @internal\n*/\nfunction getLoader(component) {\n\treturn component.loader;\n}\n\n//#endregion\n//#region ../../library/src/modules/loader/forwardLoader.ts\n/**\n* Forwards a loader call to a child component if it has a loader defined.\n*\n* @example\n* ```tsx\n* addLoader(ParentComponent, async (props, context) => {\n*   return Promise.allSettled([\n*     forwardLoader(ChildComponent, {\n*       ...props,\n*       url: \"https://api.example.com/data\"\n*     }, context),\n*     fetch(props.url ?? \"https://api.example.com/data\", { signal: context.signal, cache: \"force-cache\" })\n*   ])\n* })\n* ```\n*\n* @public\n*/\nfunction forwardLoader(component, props, context) {\n\tconst loader = getLoader(component);\n\tif (!loader) return Promise.resolve(void 0);\n\treturn loader.load(props, context);\n}\n\n//#endregion\n//#region ../../library/package.json\nvar version$1 = \"2.4.1\";\n\n//#endregion\n//#region ../../library/src/version.ts\n/**\n* @public\n*/\nconst version = /* @__PURE__ */ (() => version$1)();\n\n//#endregion\n//#region ../../library/src/animation/Motion/addChildHack.ts\nMotionValue.prototype.addChild = function({ transformer = (v) => v }) {\n\tconst child = motionValue(transformer(this.get()));\n\tthis.onChange((v) => child.set(transformer(v)));\n\treturn child;\n};\n\n//#endregion\nexport { AnchorLinkTarget, Animatable, AnimatePresence, AnimateSharedLayout, AnyInterpolation, AsyncMotionValueAnimation, AutoBreakpointVariant, AutomaticLayoutIds, BackgroundImage, BezierAnimator, BoxShadow, CarouselControl, CarouselVariableBindings, ChildrenCanSuspend, CollectionUtilsCache, Color, ColorFormat, ColorMixModelType, ComponentContainerContext, ComponentPresetsConsumer, ComponentPresetsProvider, ComponentViewportProvider, ConstraintMask, ConstraintValues, Container, ControlType, ConvertColor, CustomCursorHost, CustomProperties, CycleVariantState, DOM, DOMKeyframesResolver, DOMVisualElement, Data, DataContext, DataObserver, DataObserverContext, DeprecatedFrameWithEvents, DeprecatedLayoutGroupContext, Device, DeviceCodeComponent, DimensionType, DocumentProjectionNode, DragControls, Draggable, EmptyState, ErrorPlaceholder, Feature, Fetcher, FlatTree, Floating, FontSourceNames, FormBooleanInput, FormContainer, FormPlainTextInput, FormSelect, Frame, FrameWithMotion, FramerAnimation, FramerEvent, FramerEventListener, FramerEventSession, GamepadContext, GeneratedComponentContext, GracefullyDegradingErrorBoundary, GroupAnimation, GroupAnimationWithThen, HTMLProjectionNode, HTMLVisualElement, HookVariableBindings, Image$1 as Image, InjectSelectionStyle, Instance, InternalID, JSAnimation, KeyframeResolver, Layer, LayoutAnimationBuilder, LayoutGroup, LayoutGroupContext, LayoutIdContext, LazyMotion, LazyValue, Line, LinearGradient, Link, MainLoop, MotionConfig, MotionConfigContext, MotionContext, MotionGlobalConfig, MotionSetup, MotionValue, MotionValueState, NativeAnimation, NativeAnimationExtended, NativeAnimationWrapper, NavigateTo, NavigationExport as Navigation, NavigationCallbackProvider, NavigationConsumer, NavigationTransitionType, NetworkServerDatabase, NodeStack, NotFoundError, ObjectVisualElement, ObservableObject, Page, PageEffectsProvider, PageRoot, ParentSizeState, PathSegment, PathVariablesContext, Point, Polygon, PopChild, PresenceChild, PresenceContext, PropertyOverrides, PropertyStore, QueryCache, QueryEngine, RadialGradient, Rect, RelativeDate, RenderTarget, namespace_exports as Reorder, ResetOuterLinkContext, ResolveLinks, RichText, SSRVariants, SVG, SVGVisualElement, Scroll, ServerDatabaseClient, Shader, Shadow, Size, SmartComponentScopedContainer, SpringAnimator, Stack, StyleSheetContext, SubscriptionManager, SwitchLayoutGroupContext, Text, TickerItem, TriggerSubscription, ValueInterpolation, VariantSelector, Vector, VectorGroup, ViewTransitionBuilder, VisualElement, WillChangeMotionValue, WindowContext, WithNavigator, WithOverride, _injectRuntime, acceleratedValues, addActionControls, addAttrValue, addDomEvent, addEffect, addFonts, addLoader, addPointerEvent, addPointerInfo, addPropertyControls, addSVGValue, addScaleCorrector, addStyleValue, addUniqueItem, addValueToWillChange, alpha, analyseComplexValue, animate, animateEffectSubject, animateElement, animateLayout, animateMini, animateMotionValue, animateSingleValue, animateTarget, animateValue, animateValues, animateVariant, animateView, animateVisualElement, animationControls, animationMapKey, animations, annotateTypeOnStringify, anticipate, applyAxisDelta, applyBoxDelta, applyGeneratorOptions, applyPointDelta, applyPxDefaults, applyTreeDeltas, arc, aspectRatio, attachFollow, attachSpring, attrEffect, axisDeltaEquals, axisEquals, axisEqualsRounded, backIn, backInOut, backOut, backgroundImageFromProps, boxEquals, boxEqualsRounded, buildHTMLStyles, buildProjectionTransform, buildSVGAttrs, buildSVGPath, buildTransform, calcAxisDelta, calcBoxDelta, calcChildStagger, calcGeneratorDuration, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, calculateRect, callEach, camelCaseAttributes, camelToDash, cancelFrame, cancelMicrotask, cancelSync, checkVariantsDidChange, circIn, circInOut, circOut, clamp, clampRGB, cleanDirtyNodes, collectMotionValues, collectVisualStyleFromProps, color, compareByDepth, complex, constraintsEnabled, containsCSSVariable, convertBoundingBoxToBox, convertBoxToBoundingBox, convertOffsetToTimes, convertPropsToDeviceOptions, copyAxisDeltaInto, copyAxisInto, copyBoxInto, correctBorderRadius, correctBoxShadow, correctParentTransform, createAnimationState, createAxis, createAxisDelta, createBox, createCloneableLayoutGroupItem, createData, createDelta, createEffect, createFramerPageLink, createGeneratorEasing, createProjectionNode, createRenderBatcher, createScopedAnimate, createTrigger, cssBackgroundSize, cssCollector, cubicBezier, cubicBezierAsString, cx, debounce, defaultDeviceProps, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, defineEnum, defineShader, degrees, degreesToRadians, delay, delayInSeconds, devicePresets, dimensionValueTypes, disableInstantTransitions, dispatchKeyDownEvent, distance, distance2D, domAnimation, domMax, domMin, eachAxis, easeIn, easeInOut, easeOut, easingDefinitionToFunction, environment, executeInRenderEnvironment, fillOffset, fillWildcards, filterProps, findDimensionValueType, findEffect, findValueType, finiteNumber, flushKeyframeResolvers, followValue, fontStore, forceLayerBackingWithCSSProperties, forwardLoader, fraction, frame, frameData, frameFromElement, frameFromElements, frameSteps, framerAppearAnimationScriptKey, framerAppearEffects, framerAppearIdKey, framerAppearTransformTemplateToken, framerCSSMarker, generateLinearEasing, getAnimatableNone, getAnimationMap, getComponentSize, getComputedStyle$1 as getComputedStyle, getDefaultTransition, getDefaultValueType, getDevicePreset, getEasingForSegment, getFeatureDefinitions, getFinalKeyframe, getFonts, getFontsFromComponentPreset, getFontsFromSharedStyle, getLoadingLazyAtYPosition, getMeasurableCodeComponentChildren, getMixer, getOptimisedAppearId, getOriginIndex, getPropertyControls, getValueAsType, getValueTransition, getVariableValue, getVariantContext, getViewAnimationLayerInfo, getViewAnimations, getWhereExpressionFromPathVariables, globalProjectionState, gradientForShape, handOffElementState, handoverCollector, has2DTranslate, hasComplexValues, hasReducedMotionListener, hasScale, hasTransform, hasWarned, hex, hover, hsla, hslaToRgba, imagePatternPropsForFill, imageUrlForAsset, inView, inertia, inferInitialRouteFromPath, initLazyModulesCache, initPrefersReducedMotion, interpolate, invariant, invisibleValues, isAnimatable, isAnimationControls, isBezierDefinition, isBrowser, isCSSVariableName, isCSSVariableToken, isControllingVariants, isDeltaZero, isDragActive, isDragging, isEasingArray, isElementKeyboardAccessible, isElementTextInput, isEmptyTrigger, isEqual, isFiniteNumber, isForcedMotionValue, isFractionDimension, isFramerGamepadKeydownData, isFramerPageLink, isGapEnabled, isGenerator, isHTMLElement, isKeyframesTarget, isMotionComponent, isMotionValue, isNear, isNodeOrChild, isNumericalString, isObject, isOfAnnotatedType, isPrimaryPointer, isRelativeNumber, isSVGElement, isSVGSVGElement, isSVGTag, isShaderConfig, isShallowEqualArray, isSharedEnum, isStaticRenderer, isStraightCurve, isTransitionDefined, isValidMotionProp, isVariantLabel, isVariantNode, isWaapiSupportedEasing, isWillChangeMotionValue, isZeroValueString, keyframes, lazy, lazyModulesCollector, loadFont, loadJSON, loadLibraryCSSRules, localShadowFrame, m, makeAnimationInstant, makePaddingString, makeUseVisualState, mapEasingToNativeEasing, mapValue, markHydrationStart, maxGeneratorDuration, measurePageBox, measureViewportBox, memo, memoize, microtask, millisecondsToSeconds, mirrorEasing, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixValues, mixVisibility, modulate, motion, motionValue, moveItem, nestedLinksCollector, nodeGroup, noop, number, numberValueTypes, optimizeAppear, optimizeAppearTransformTemplate, optimizedAppearDataAttribute, optimizedAppearDataId, originProps, paddingFromProps, parseAnimateLayoutArgs, parseCSSVariable, parseFramerPageLink, parsePaddingString, parseValueFromTransform, patchBorderRadiusScaleCorrector, patchRoutesForABTesting, pathDefaults, percent, pipe, pixelsToPercent, positionalKeys, prefersReducedMotion, preloadImage, press, print, progress, progressPercentage, propEffect, propagateDirtyNodes, propsForLink, pushLoadMoreHistory, px, queryCache, readSVGValue, readStyleValue, readTransformValue, recordStats, removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removeEffect, removeHiddenBreakpointLayers, removeHiddenBreakpointLayersV2, removeItem, removePointDelta, renderHTML, renderSVG, resize, resolveElements, resolveInitialRouteContentState, resolveLink, resolveMotionValue, resolvePageScope, resolveTransition, resolveVariant, resolveVariantFromProps, reverseEasing, rgbUnit, rgba, rootProjectionNode, roundWithOffset, roundedNumber, roundedNumberString, runTasksWithYield, runWithYield, safeCSSValue, scale, scaleCorrectors, scalePoint, scrapeMotionValuesFromProps as scrapeHTMLMotionValuesFromProps, scrapeMotionValuesFromProps$2 as scrapeSVGMotionValuesFromProps, scroll, scrollInfo, secondsToMilliseconds, setCurrentSiteId, setDragLock, setFeatureDefinitions, setGlobalRenderEnvironment, setLibraryFeatures, setStyle, setTarget, sharedSVGManager, sharedTypeIdentity, shouldOpenLinkInNewTab, spring, springValue, stagger, startAnimation, startOptimizedAppearAnimation, startWaapiAnimation, statsBuffer, steps, styleEffect, styleSubjectEffect, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, supportsViewTimeline, svgEffect, svgSubjectEffect, sync, systemFontFamilyName, testValueType, throttle, time, toFlexDirection, toJustifyOrAlignment, toSVGPath, transform, transformAxis, transformBox, transformBoxPoints, transformPropOrder, transformProps, transformString, transformTemplate, transformValue, transformValueTypes, transformViewBoxPoint, translateAxis, turnOffReactEventHandling, unwrapMotionComponent, updateMotionValuesFromProps, useActiveTargetCallback, useActiveVariantCallback, useAddVariantProps, useAnimate, useAnimateMini, useAnimatedState, useAnimatedState as useDeprecatedAnimatedState, useAnimation, useAnimationControls, useAnimationFrame, useBooleanQueryParam, useBreakpointVariants, useCarouselVariables, useCollectionReferenceQueryParam, useComponentViewport, useComposedRefs, useConstant, useCurrentPathVariables, useCurrentRoute, useCurrentRouteId, useCustomCursors, useCycle, useDataRecord, useDateQueryParam, useInvertedScale as useDeprecatedInvertedScale, useInvertedScale, useDomEvent, useDragControls, useDynamicRefs, useElementScroll, useEnumQueryParam, useFollowValue, useForceUpdate, useFormSelectVariableBinding, useGamepad, useHookOutputs, useHotkey, useHydratedBreakpointVariants, useInView, useInitialRouteComponent, useInstantLayoutTransition, useInstantTransition, useIsInCurrentNavigationTarget, useIsOnFramerCanvas, useIsPresent, useIsStaticRenderer, useIsomorphicLayoutEffect, useLayoutDirection, useLoadMorePaginatedQuery, useLoadMorePagination, useLocale, useLocaleCode, useLocaleInfo, useLocalesForCurrentRoute, useLocalizationInfo, useMeasureLayout, useMetadata, useMotionTemplate, useMotionValue, useMotionValueEvent, useMultiCollectionReferenceQueryParam, useNavigate, useNavigation, useNumberQueryParam, useObserveData, useOnAppear, useOnCurrentTargetChange, useOnVariantChange, useOverlayState, usePageEffects, usePageInView, usePaginatedServerData, usePrefetch, usePreloadQuery, usePresence, usePresenceData, usePrototypeNavigate, useProvidedWindow, useQueryData, useReducedMotion, useReducedMotionConfig, useRenderEnvironment, useResetProjection, useResolveLinks, useRoute, useRouteAnchor, useRouteElementId, useRouteHandler, useRouter, useSVGTemplate, useScroll, useServerData, useSiteRefs, useSpring, useStringQueryParam, useTime, useTracking, useTransform, useTriggers, useUnmountEffect, useVariantState, useVelocity, useViewportScroll, useWillChange, valueToDimensionType, variantPriorityOrder, variantProps, velocityPerSecond, version, vh, visualElementStore, vw, warnOnce, warning, withCSS, withCodeBoundaryForOverrides, withColumnMasonryLayout, withFX, withFlowFX, withGeneratedLayoutId, withInfiniteScroll, withMappedReactProps, withMeasuredSize, withOpacity, withOptimizedAppearEffect, withParallaxTransform, withPath, withPerformanceMarks, withShape, withStyleAppearEffect, withTickerFX, withV1StrokeFX, withVariantAppearEffect, withVariantFX, wrap, yieldToMain };\n//# sourceMappingURL=framer.B1b760uK.mjs.map"],"mappings":"A,6rBAGA,SAASkH,GAAgB,EAAK,CAC7B,MAAO,sBAAsBC,EAAI,WAAW,IAAK,KAAK,CAAC,CAAC,WAAW,IAAK,KAAK,CAAC,CAAC,WAAW,IAAM,KAAK,GACtG,CAIA,SAASC,GAAW,EAAO,CAC1B,OAAO,OAAOC,GAAU,UACzB,CACA,SAASC,GAAU,EAAO,CACzB,OAAO,OAAOD,GAAU,SACzB,CACA,SAASE,EAAS,EAAO,CACxB,OAAO,OAAOF,GAAU,QACzB,CACA,SAASG,EAAS,EAAO,CACxB,OAAO,OAAO,SAASH,CAAK,CAC7B,CACA,SAASI,GAAQ,EAAO,CACvB,OAAO,MAAM,QAAQJ,CAAK,CAC3B,CACA,SAASK,EAAS,EAAO,CACxB,OAAyB,OAAOL,GAAU,YAAnCA,GAA+C,CAACI,GAAQJ,CAAK,CACrE,CACA,SAASM,GAAc,EAAQ,CAC9B,IAAK,IAAMC,KAAKC,EAAQ,MAAO,GAC/B,MAAO,EACR,CACA,SAASC,GAAY,EAAO,CAC3B,OAAcT,IAAU,MACzB,CACA,SAASU,GAAO,EAAO,CACtB,OAAOV,IAAU,IAClB,CACA,SAASW,GAAU,EAAO,CACzB,OAAOX,GAAS,IACjB,CACA,SAASY,GAAY,EAAO,CAC3B,OAAOZ,aAAiB,MAAQ,CAAC,OAAO,MAAMA,EAAM,QAAQ,CAAC,CAC9D,CACA,SAASa,GAAY,EAAO,CAC3B,OAAOR,EAASL,CAAK,GAA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