@pod-os/elements 0.29.1-rc.80aa77e.0 → 0.29.1-rc.88079dc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/elements.cjs.js +1 -1
- package/dist/cjs/ion-icon_33.cjs.entry.js +58 -31
- package/dist/cjs/ion-icon_33.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pos-document.cjs.entry.js +1 -1
- package/dist/cjs/pos-document.cjs.entry.js.map +1 -1
- package/dist/collection/components/pos-document/pos-document.css +1 -1
- package/dist/collection/components/pos-tool-select/pos-tool-select.css +47 -8
- package/dist/collection/components/pos-tool-select/pos-tool-select.js +31 -2
- package/dist/collection/components/pos-tool-select/pos-tool-select.js.map +1 -1
- package/dist/collection/components/pos-type-router/pos-type-router.css +35 -2
- package/dist/collection/components/pos-type-router/pos-type-router.js +25 -8
- package/dist/collection/components/pos-type-router/pos-type-router.js.map +1 -1
- package/dist/collection/components/pos-type-router/selectToolsForTypes.js +28 -22
- package/dist/collection/components/pos-type-router/selectToolsForTypes.js.map +1 -1
- package/dist/components/pos-document2.js +1 -1
- package/dist/components/pos-document2.js.map +1 -1
- package/dist/components/pos-tool-select2.js +9 -2
- package/dist/components/pos-tool-select2.js.map +1 -1
- package/dist/components/pos-type-router2.js +54 -31
- package/dist/components/pos-type-router2.js.map +1 -1
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/elements.esm.js.map +1 -1
- package/dist/elements/{p-2a77781a.entry.js → p-21649e42.entry.js} +5 -5
- package/dist/elements/p-21649e42.entry.js.map +1 -0
- package/dist/elements/p-f2e65e83.entry.js +2 -0
- package/dist/elements/p-f2e65e83.entry.js.map +1 -0
- package/dist/esm/elements.js +1 -1
- package/dist/esm/ion-icon_33.entry.js +58 -31
- package/dist/esm/ion-icon_33.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pos-document.entry.js +1 -1
- package/dist/esm/pos-document.entry.js.map +1 -1
- package/dist/types/components/pos-tool-select/pos-tool-select.d.ts +7 -0
- package/dist/types/components/pos-type-router/pos-type-router.d.ts +6 -3
- package/dist/types/components/pos-type-router/selectToolsForTypes.d.ts +4 -4
- package/dist/types/components.d.ts +14 -0
- package/package.json +1 -1
- package/dist/elements/p-2a77781a.entry.js.map +0 -1
- package/dist/elements/p-38edfa6d.entry.js +0 -2
- package/dist/elements/p-38edfa6d.entry.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__defProps","defineProperties","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropDescs","getOwnPropertyDescriptors","__getOwnPropSymbols","getOwnPropertySymbols","__hasOwnProp","prototype","hasOwnProperty","__propIsEnum","propertyIsEnumerable","__knownSymbol","name","symbol","Symbol","for","__typeError","msg","TypeError","__defNormalProp","obj","key","value","enumerable","configurable","writable","__spreadValues","a","b","prop","call","__spreadProps","__decorateClass","decorators","target","kind","result","i","length","decorator","__accessCheck","member","has","__privateGet","getter","get","__privateAdd","WeakSet","add","set","__privateSet","setter","__await","promise","isYieldStar","this","__yieldStar","isAwait","method","it","k","x","v","done","Promise","resolve","throw","CACHED_MAP","getIconMap","window","Map","win","Ionicons","map","getUrl","url","getSrc","src","getName","icon","mode","ios","md","getNamedUrl","iconName","iconEl","getAssetPath","e","console","warn","toLower","isSrc","isStr","trim","invalidChars","replace","str","test","val","toLowerCase","inheritAttributes","el","attributes","attributeObject","forEach","attr","hasAttribute","getAttribute","removeAttribute","isRTL","hostEl","dir","document","validateContent","svgContent","div","createElement","innerHTML","childNodes","nodeName","removeChild","svgElm","firstElementChild","svgClass","setAttribute","isValid","elm","nodeType","indexOf","isSvgDataUrl","startsWith","isEncodedDataUrl","ioniconContent","requests","parser","getSvgContent","sanitize","req","fetch","DOMParser","doc","parseFromString","svg","querySelector","outerHTML","then","rsp","ok","text","iconCss","IonIconStyle0","Icon","constructor","hostRef","inheritedAttributes","didLoadIcon","undefined","isVisible","getIonMode","color","flipRtl","size","lazy","componentWillLoad","connectedCallback","waitUntilVisible","loadIcon","componentDidLoad","disconnectedCallback","io","disconnect","rootMargin","cb","IntersectionObserver","data","isIntersecting","observe","render","shouldAutoFlip","includes","shouldBeFlippable","h","Host","assign","role","class","createColorClasses","assetsDirs","documentElement","progressBarIosCss","IonProgressBarIosStyle0","progressBarMdCss","IonProgressBarMdStyle0","ProgressBar","type","reversed","buffer","paused","config","getBoolean","renderIndeterminate","renderProgress","part","finalValue","clamp","finalBuffer","style","transform","rippleEffectCss","IonRippleEffectStyle0","RippleEffect","addRipple","y","readTask","rect","getBoundingClientRect","width","height","hypotenuse","Math","sqrt","maxDim","max","maxRadius","unbounded","PADDING","initialSize","floor","INITIAL_ORIGIN_SCALE","finalScale","posX","left","posY","top","styleX","styleY","moveX","moveY","writeTask","classList","setProperty","container","shadowRoot","appendChild","setTimeout","removeRipple","ripple","remove","skeletonTextCss","IonSkeletonTextStyle0","SkeletonText","animated","emitStyle","ionStyle","emit","inMedia","hostContext","getAnimationPosition","position","positionAnchor","toast","offset","warnIfAnchorIsHidden","box","bottom","innerHeight","offsetParent","printIonWarning","getOffsetForMiddlePosition","toastHeight","wrapperHeight","iosEnterAnimation","baseEl","opts","baseAnimation","createAnimation","wrapperAnimation","root","getElementRoot","wrapperEl","addElement","fromTo","topPosition","clientHeight","easing","duration","addAnimation","iosLeaveAnimation","mdEnterAnimation","mdLeaveAnimation","createSwipeToDismissGesture","toastPosition","onDismiss","hostElHeight","wrapperElBox","MAX_SWIPE_DISTANCE","DISMISS_THRESHOLD","STEP_OFFSET","INVERSION_FACTOR","SWIPE_UP_DOWN_KEYFRAMES","swipeAnimation","keyframes","progressStart","computeStep","delta","onMove","detail","step","deltaY","progressStep","onEnd","velocity","velocityY","threshold","gesture","enable","shouldDismiss","playTo","remainingDistance","startOffset","startPosition","offsetFactor","endOffset","endPosition","KEYFRAMES","remainingStepAmount","min","abs","onFinish","destroy","oneTimeCallback","progressEnd","createGesture","gestureName","gesturePriority","OVERLAY_GESTURE_PRIORITY","direction","toastIosCss","IonToastIosStyle0","toastMdCss","IonToastMdStyle0","Toast","delegateController","createDelegateController","lockController","createLockController","triggerController","createTriggerController","customHTMLEnabled","ENABLE_HTML_CONTENT_DEFAULT","presented","dispatchCancelHandler","ev","isCancel","cancelButton","getButtons","find","callButtonHandler","createSwipeGesture","dismiss","GESTURE","destroySwipeGesture","prefersSwipeGesture","swipeGesture","revealContentToScreenReader","overlayIndex","delegate","hasController","enterAnimation","leaveAnimation","cssClass","getNumber","header","layout","message","keyboardClose","buttons","translucent","htmlAttributes","isOpen","trigger","swipeGestureChanged","lastPresentedPosition","onIsOpenChange","newValue","oldValue","present","triggerChanged","addClickListener","prepareOverlay","removeClickListener","setOverlayId","raf","unlock","lock","attachViewToDom","anchor","getAnchorElement","animationPosition","durationTimeout","_a","_b","clearTimeout","dismissed","removeViewFromDom","onDidDismiss","eventMethod","onWillDismiss","foundEl","getElementById","HTMLElement","buttonClick","button","handler","rtn","safeCall","error","renderButtons","side","buttonGroupsClasses","buttonClass","tabIndex","onClick","buttonPart","slot","renderToastMessage","ariaHidden","sanitizeDOMString","renderHeader","allButtons","startButtons","filter","endButtons","wrapperClass","tabindex","zIndex","getClassMap","onIonToastWillDismiss","posAddNewThingCss","PosAddNewThingStyle0","PosAddNewThing","openDialog","dialog","showModal","id","title","ref","referenceUri","storedSettings","localStorage","getItem","initialSettings","JSON","parse","offlineCache","localSettings","createStore","persistChanges","syncChangesAcrossTabs","on","snapshot","stringify","state","setItem","addEventListener","event","newSettings","instanceOfAny","object","constructors","some","c","idbProxyableTypes","cursorAdvanceMethods","getIdbProxyableTypes","IDBDatabase","IDBObjectStore","IDBIndex","IDBCursor","IDBTransaction","getCursorAdvanceMethods","advance","continue","continuePrimaryKey","transactionDoneMap","WeakMap","transformCache","reverseTransformCache","promisifyRequest","request","reject","unlisten","removeEventListener","success","wrap","cacheDonePromiseForTransaction","tx","complete","DOMException","idbProxyTraps","receiver","objectStoreNames","objectStore","replaceTraps","callback","wrapFunction","func","args","apply","unwrap","transformCachableValue","Proxy","IDBRequest","openDB","version","blocked","upgrade","blocking","terminated","indexedDB","open","openPromise","oldVersion","newVersion","transaction","db","catch","readMethods","writeMethods","cachedMethods","getMethod","targetFuncName","useIndex","isWrite","async","storeName","store","index","shift","all","oldTraps","advanceMethodProps","methodMap","advanceResults","ittrProxiedCursorToOriginalProxy","cursorIteratorTraps","cachedFunc","iterate","cursor","openCursor","proxiedCursor","delete","isIteratorProp","asyncIterator","IndexedDbOfflineCache","dbPromise","contains","createObjectStore","keyPath","createIndex","clear","put","existing","getFromIndex","revision","NavigatorOnlineStatus","isOnline","navigator","onLine","createPodOS","session","settings","PodOS","NoOfflineCache","onlineStatus","isFunction","createErrorClass","createImpl","_super","instance","Error","stack","ctorFunc","create","UnsubscriptionError","UnsubscriptionErrorImpl","errors","err","toString","join","arrRemove","arr","item","splice","Subscription","initialTeardown","closed","_parentage","_finalizers","unsubscribe","Array","isArray","parent","initialFinalizer","finalizer","execFinalizer","push","teardown","_hasParent","_addParent","_removeParent","EMPTY","empty","EMPTY_SUBSCRIPTION","isSubscription","onUnhandledError","onStoppedNotification","useDeprecatedSynchronousErrorHandling","useDeprecatedNextContext","timeoutProvider","timeout","handle","reportUnhandledError","noop","COMPLETE_NOTIFICATION","createNotification","errorNotification","nextNotification","context","errorContext","isRoot","errorThrown","Subscriber","destination","super","isStopped","EMPTY_OBSERVER","next","SafeSubscriber","handleStoppedNotification","_next","_error","_complete","_bind","Function","bind","fn","thisArg","ConsumerObserver","partialObserver","handleUnhandledError","observerOrNext","defaultErrorHandler","notification","subscriber","observable","identity","pipeFromArray","fns","piped","input","reduce","prev","Observable","subscribe","_subscribe","lift","operator","source","isSubscriber","_trySubscribe","sink","promiseCtor","getPromiseCtor","Symbol_observable","pipe","operations","toPromise","isObserver","hasLift","operate","init","liftedSource","createOperatorSubscriber","onNext","onComplete","onError","onFinalize","OperatorSubscriber","shouldUnsubscribe","ObjectUnsubscribedError","ObjectUnsubscribedErrorImpl","Subject","currentObservers","observers","hasError","thrownError","subject","AnonymousSubject","_throwIfClosed","from","observer","observed","_checkFinalizedStatuses","_innerSubscribe","asObservable","BehaviorSubject","_value","getValue","subscription","dateTimestampProvider","now","Date","Action","scheduler","work","schedule","delay","intervalProvider","setInterval","clearInterval","AsyncAction","pending","recycleAsyncId","requestAsyncId","_id","flush","_scheduler","execute","_execute","_delay","errored","errorValue","actions","Scheduler","schedulerActionCtor","AsyncScheduler","SchedulerAction","_active","action","asyncScheduler","__awaiter","_arguments","P","generator","adopt","fulfilled","rejected","__values","o","s","iterator","m","__asyncGenerator","g","q","verb","n","resume","settle","r","fulfill","f","__asyncValues","d","SuppressedError","suppressed","isArrayLike","isPromise","isInteropObservable","isAsyncIterable","createInvalidObservableTypeError","getSymbolIterator","isIterable","Symbol_iterator","readableStreamLikeToAsyncGenerator","readableStream","arguments","readableStreamLikeToAsyncGenerator_1","reader","getReader","read","releaseLock","isReadableStreamLike","innerFrom","fromInteropObservable","fromArrayLike","fromPromise","fromAsyncIterable","fromIterable","fromReadableStreamLike","obs","array","iterable","asyncIterable","process","asyncIterable_1","asyncIterable_1_1","e_1","e_1_1","return","debounceTime","dueTime","activeTask","lastValue","lastTime","emitWhenIdle","targetTime","takeUntil","notifier","crypto$1","crypto","isCryptoKey","CryptoKey","digest","algorithm","subtleDigest","slice","Uint8Array","subtle","digest$1","encoder","TextEncoder","decoder","TextDecoder","concat","buffers","acc","buf","encodeBase64","unencoded","encode","CHUNK_SIZE","String","fromCharCode","subarray","btoa","decodeBase64","encoded","binary","atob","bytes","charCodeAt","decode$1","decode","JOSEError","options","code","captureStackTrace","JWTClaimValidationFailed","payload","claim","reason","cause","JWTExpired","JOSEAlgNotAllowed","JOSENotSupported","JWEDecryptionFailed","JWEInvalid","JWSInvalid","JWTInvalid","JWKInvalid","JWKSInvalid","JWKSNoMatchingKey","JWKSMultipleMatchingKeys","JWKSTimeout","JWSSignatureVerificationFailed","unusable","isAlgorithm","getHashLength","hash","parseInt","getNamedCurve","alg","checkUsage","usages","expected","last","pop","checkSigCryptoKey","actual","namedCurve","types","Boolean","invalidKeyInput","withAlg","isKeyLike","toStringTag","isDisjoint","headers","sources","parameters","keys","Set","parameter","isDisjoint$1","isObjectLike","isObject","getPrototypeOf","proto","checkKeyLength","modulusLength","isJWK","kty","isPrivateJWK","isPublicJWK","isSecretJWK","subtleMapping","jwk","keyUsages","crv","rest","ext","key_ops","keyData","use","importKey","asKeyObject","exportKeyValue","privCache","pubCache","isKeyObject","importAndCache","cache","freeze","cached","cryptoKey","normalizePublicKey","export","format","dp","dq","p","qi","normalizePrivateKey","normalize","importJWK","oth","tag","jwkMatchesOp","usage","symmetricTypeCheck","allowJwk","asymmetricTypeCheck","checkKeyType","symmetric","checkKeyTypeWithJwk","validateCrit","Err","recognizedDefault","recognizedOption","protectedHeader","joseHeader","crit","recognized","entries","validateAlgorithms","option","algorithms","validateAlgorithms$1","keyToJWK","extractable","exportKey","keyToJWK$1","exportJWK","subtleDsa","saltLength","getCryptoKey","verify","signature","verify$1","flattenedVerify","jws","protected","parsedProt","extensions","b64","resolvedKey","verified","unprotectedHeader","compactVerify","split","epoch","date","getTime","minute","hour","day","week","year","REGEX","secs","matched","exec","parseFloat","unit","numericDate","round","normalizeTyp","checkAudiencePresence","audPayload","audOption","jwtPayload","encodedPayload","typ","requiredClaims","issuer","audience","maxTokenAge","presenceCheck","reverse","iss","sub","aud","tolerance","clockTolerance","currentDate","iat","nbf","exp","age","jwtVerify","jwt","sign","sign$1","FlattenedSign","_payload","setProtectedHeader","_protectedHeader","setUnprotectedHeader","_unprotectedHeader","CompactSign","_flattened","validateInput","label","Number","isFinite","ProduceJWT","setIssuer","setSubject","setAudience","setJti","jwtId","jti","setNotBefore","setExpirationTime","setIssuedAt","SignJWT","sig","check","description","calculateJwkThumbprint","digestAlgorithm","components","getKtyFromAlg","isJWKSLike","jwks","every","isJWKLike","clone","structuredClone","LocalJWKSet","_cached","_jwks","getKey","token","kid","candidates","candidate","importWithAlgCache","createLocalJWKSet","localJWKSet","fetchJwks","controller","timedOut","AbortController","abort","response","href","signal","redirect","status","json","fetchJwks$1","isCloudflareWorkers","WebSocketPair","userAgent","EdgeRuntime","USER_AGENT","NAME","VERSION","jwksCache","isFreshJwksCache","cacheMaxAge","uat","RemoteJWKSet","URL","_url","_options","agent","_timeoutDuration","timeoutDuration","_cooldownDuration","cooldownDuration","_cacheMaxAge","_cache","_jwksTimestamp","_local","coolingDown","fresh","reload","_pendingFetch","Headers","fromEntries","createRemoteJWKSet","remoteJWKSet","reloading","decodeJwt","decoded","getModulusLengthOption","generateKeyPair$1","publicExponent","generateKey","generateKeyPair","requestDynamicClientRegistration","registration_endpoint","client_details","client_registration_request_body","grant_types","id_token_signed_response_alg","token_endpoint_auth_method","application_type","subject_type","body","SessionDatabase","dbName","dbVersion","onerror","onsuccess","onupgradeneeded","oncomplete","onabort","deleteItem","close","redirectForLogin","idp","redirect_uri","redirect_uri_","redirect_uri_sane","origin","pathname","search","sessionStorage","idp_origin","openid_configuration","client_id","client_registration","redirect_uris","pkce_code_verifier","pkce_code_challenge","getPKCEcode","csrf_token","randomUUID","redirect_to_idp","encodeURIComponent","location","onIncomingRedirect","authorization_code","searchParams","clientDetails","history","pushState","token_endpoint","key_pair","token_response","requestAccessToken","accessToken","jwks_uri","dpopThumbprint","publicKey","token_details","dpop_key_pair","idp_details","sessionDatabase","removeItem","idpDetails","tokenDetails","jwk_public_key","dpop","htu","htm","privateKey","URLSearchParams","grant_type","code_verifier","renewTokens","refresh_token","requestFreshTokens","Session","sessionInformation","isActive_","webId_","currentAth_","tokenRefreshTimeout","sessionDeactivateTimeout","onSessionExpirationWarning","sessionOptions","login","logout","_","handleRedirectFromLogin","newSessionInfo","setSessionDetails","restore","createSignedDPoPToken","ath","authFetch","dpopPayload","Request","toUpperCase","access_token","isActive","webId","computeAth","setSessionDeactivateTimeout","setTokenRefreshTimeout","deactivate_buffer_seconds","timeUntilDeactivate","expires_in","refresh_buffer_seconds","timeUntilRefresh","newTokens","hashBuffer","hashArray","base64","base64url","BrowserSession","authenticatedFetch","_authenticatedFetch","onSessionRestoreCallback","sessionInfo$","isLoggedIn","handleIncomingRedirect","restorePreviousSession","oidcIssuer","observeSession","onSessionRestore","PosApp","disconnected$","loading","unsubscribeSettings","os","sessionRestoredEmitter","sessionInfo","sessionStore","profile","fetchProfile","podOsLoadedEmitter","initializeOs","stopPropagation","loadModule","module","loadContactsModule","posAppBrowserCss","PosAppBrowserStyle0","PosAppBrowser","uri","mainContent","Logo","viewBox","xmlns","fill","stroke","posAppDashboardCss","PosAppDashboardStyle0","PosAppDashboard","posAppSettingsCss","PosAppSettingsStyle0","PosAppSettings","PosDescription","receiveResource","resource","subscribeResource","posDialogCss","PosDialogStyle0","PosDialog","PosErrorToast","unhandledRejection","showToast","catchError","toastController","posExampleResourcesCss","PosExampleResourcesStyle0","PosExampleResources","posGettingStartedCss","PosGettingStartedStyle0","PosGettingStarted","posImageCss","PosImageStyle0","PosImage","blurredBackground","setOs","onChange","fetchBlob","initializeOsEmitter","imageError","networkError","brokenFile","file","fetchFile","resourceLoadedEmitter","blob","dataUri","createObjectURL","onImageError","alt","BrokenFile","backgroundImage","PosInternalRouter","PosLabel","posLoginCss","PosLoginStyle0","PosLogin","customLoggedInComponent","host","idpUrl","onLogin","loggedInComponents","defaultLoggedInComponents","posLoginFormCss","PosLoginFormStyle0","PosLoginForm","canSubmit","validate","onSubmit","handleSubmit","htmlFor","required","onInput","handleChange","list","placeholder","disabled","idpUrlSelected","t","globalThis","ShadowRoot","ShadyCSS","nativeShadow","Document","CSSStyleSheet","_$cssResult$","cssText","styleSheet","replaceSync","S","adoptedStyleSheets","litNonce","textContent","cssRules","is","getOwnPropertyNames","trustedTypes","l","emptyScript","reactiveElementPolyfillSupport","u","toAttribute","fromAttribute","attribute","converter","reflect","useDefault","hasChanged","metadata","litPropertyMetadata","addInitializer","_$Ei","observedAttributes","finalize","_$Eh","createProperty","wrapped","elementProperties","noAccessor","getPropertyDescriptor","requestUpdate","getPropertyOptions","finalized","properties","_$Eu","elementStyles","finalizeStyles","styles","flat","unshift","_$Ep","isUpdatePending","hasUpdated","_$Em","_$Ev","_$ES","enableUpdating","_$AL","_$E_","addController","_$EO","renderRoot","isConnected","hostConnected","removeController","createRenderRoot","attachShadow","shadowRootOptions","hostDisconnected","attributeChangedCallback","_$AK","_$ET","_$Ej","C","_$EP","_$Eq","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","update","_$EM","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","ReactiveElement","reactiveElementVersions","createPolicy","createHTML","random","toFixed","createComment","RegExp","$","_$litType$","strings","values","T","E","A","createTreeWalker","V","lastIndex","N","parts","currentNode","content","firstChild","replaceWith","nextNode","hasAttributes","getAttributeNames","endsWith","ctor","H","I","L","tagName","append","_$Co","_$Cl","_$litDirective$","_$AO","_$AT","_$AS","M","_$AV","_$AN","_$AD","_$AM","parentNode","_$AU","creationScope","importNode","R","nextSibling","z","_$AI","_$Cv","_$AH","_$AA","_$AB","startNode","endNode","_$AR","O","insertBefore","createTextNode","_$AC","_$AP","setConnected","element","j","toggleAttribute","capture","once","passive","handleEvent","litHtmlPolyfillSupport","litHtmlVersions","B","renderBefore","_$litPart$","renderOptions","_$Do","_$litElement$","litElementHydrateSupport","LitElement","litElementPolyfillSupport","litElementVersions","dropdown_styles_default","css","activeElements","activeElement","getDeepestActiveElement","computedStyleMap","getCachedComputedStyle","computedStyle","getComputedStyle","checkVisibility","checkOpacity","checkVisibilityCSS","visibility","display","isOverflowingAndTabbable","overflowY","overflowX","isOverflowingY","scrollHeight","isOverflowingX","scrollWidth","clientWidth","isTabbable","hasTabindex","isNaN","closest","rootNode","getRootNode","findRadios","firstChecked","firstRadio","isNativelyTabbable","getTabbableBoundary","tabbableElements","getTabbableElements","start","end","getSlottedChildrenOutsideRootElement","slotElement","composed","walkedEls","walk","Element","HTMLSlotElement","assignedElements","flatten","assignedEl","children","sort","aTabindex","bTabindex","popup_styles_default","connectedElements","translations","fallback","documentDirection","documentLanguage","isClient","MutationObserver","documentElementObserver","lang","language","attributeFilter","registerTranslation","translation","$code","LocalizeController","getTranslationData","locale","Intl","Locale","region","primary","secondary","exists","includeFallback","term","dateToFormat","DateTimeFormat","number","numberToFormat","NumberFormat","relativeTime","RelativeTimeFormat","$name","$dir","carousel","clearEntry","copied","copy","currentValue","goToSlide","slide","count","hidePassword","nextSlide","numOptionsSelected","num","previousSlide","progress","resize","scrollToEnd","scrollToStart","selectAColorFromTheScreen","showPassword","slideNum","toggleColorFormat","en_default","DefaultLocalizationController","component_styles_default","Reflect","decorate","_hasRecordedInitialProperties","ShoelaceElement","initialReflectedProperties","dependencies","component","define","CustomEvent","bubbles","cancelable","dispatchEvent","elementConstructor","currentlyRegisteredConstructor","customElements","_err","existingVersion","changedProperties","property","sides","alignments","placements","createCoords","oppositeSideMap","right","oppositeAlignmentMap","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","yAxisSides","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","mainAlignmentSide","reference","floating","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","lrPlacement","rlPlacement","tbPlacement","btPlacement","getSideList","isStart","getOppositeAxisPlacements","flipAlignment","expandPaddingObject","padding","getPaddingObject","rectToClientRect","computeCoordsFromPlacement","_ref","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","strategy","middleware","platform","validMiddleware","getElementRects","statefulPlacement","middlewareData","resetCount","nextX","nextY","reset","initialPlacement","elements","detectOverflow","_await$platform$isEle","boundary","rootBoundary","elementContext","altBoundary","paddingObject","altContext","clippingClientRect","getClippingRect","isElement","contextElement","getDocumentElement","getOffsetParent","offsetScale","getScale","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","arrow","arrowDimensions","getDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","min$1","center","shouldAddOffset","alignmentOffset","centerOffset","getPlacementList","autoAlignment","allowedPlacements","allowedPlacementsSortedByAlignment","autoPlacement","_middlewareData$autoP","_middlewareData$autoP2","_placementsThatFitOnE","crossAxis","detectOverflowOptions","placements$1","overflow","currentIndex","currentPlacement","alignmentSides","currentOverflows","allOverflows","overflows","nextPlacement","placementsSortedByMostSpace","placementsThatFitOnEachSide","resetPlacement","flip","_middlewareData$arrow","_middlewareData$flip","mainAxis","checkMainAxis","checkCrossAxis","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","initialSideAxis","isBasePlacement","hasFallbackAxisSideDirection","overflowsData","_middlewareData$flip2","_overflowsData$filter","nextIndex","ignoreCrossAxisOverflow","_overflowsData$filter2","currentSideAxis","getSideOffsets","isAnySideFullyClipped","hide","offsets","referenceHiddenOffsets","referenceHidden","escapedOffsets","escaped","getBoundingRect","minX","minY","maxX","maxY","getRectsByLine","sortedRects","groups","prevRect","inline","nativeClientRects","getClientRects","clientRects","firstRect","lastRect","isTop","isLeftSide","maxRight","minLeft","measureRects","resetRects","originSides","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","_middlewareData$offse","diffCoords","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","enabled","limitShift","rawOffset","computedOffset","len","limitMin","limitMax","_middlewareData$offse2","isOriginSide","_state$middlewareData","_state$middlewareData2","heightSide","widthSide","maximumClippingHeight","maximumClippingWidth","overflowAvailableHeight","overflowAvailableWidth","noShift","availableHeight","availableWidth","xMin","xMax","yMin","yMax","nextDimensions","hasWindow","getNodeName","node","isNode","getWindow","_node$ownerDocument","ownerDocument","defaultView","Node","isHTMLElement","isShadowRoot","invalidOverflowDisplayValues","isOverflowElement","tableElements","isTableElement","topLayerSelectors","isTopLayer","selector","matches","_e","transformProperties","willChangeValues","containValues","isContainingBlock","elementOrCss","webkit","isWebKit","containerType","backdropFilter","willChange","contain","getContainingBlock","getParentNode","isLastTraversableNode","CSS","supports","lastTraversableNodeNames","getNodeScroll","scrollLeft","scrollTop","scrollX","scrollY","assignedSlot","getNearestOverflowAncestor","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","frameElement","getFrameElement","visualViewport","getCssDimensions","hasOffset","offsetWidth","offsetHeight","shouldFallback","unwrapElement","domElement","noOffsets","getVisualOffsets","offsetLeft","offsetTop","shouldAddVisualOffsets","isFixed","floatingOffsetParent","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","clientLeft","paddingLeft","clientTop","paddingTop","getWindowScrollBarX","leftScroll","getHTMLOffset","scroll","ignoreScrollbarX","htmlRect","topLayer","isOffsetParentAnElement","offsetRect","htmlOffset","getDocumentRect","html","getViewportRect","visualViewportBased","absoluteOrFixed","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","cachedResult","currentContainingBlockComputedStyle","elementIsFixed","currentNodeIsContaining","shouldDropCurrentNode","ancestor","elementClippingAncestors","_c","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getRectRelativeToOffsetParent","setLeftRTLScrollbarOffset","isStaticPositioned","getTrueOffsetParent","polyfill","rawOffsetParent","svgOffsetParent","getOffsetParentFn","getDimensionsFn","floatingDimensions","rectsAreEqual","observeMove","timeoutId","cleanup","_io","refresh","skip","elementRectForRootMargin","insetTop","insetRight","insetBottom","insetLeft","isFirstUpdate","handleObserve","ratio","intersectionRatio","autoUpdate","ancestorScroll","ancestorResize","elementResize","ResizeObserver","layoutShift","animationFrame","referenceEl","ancestors","cleanupIo","reobserveFrame","resizeObserver","firstEntry","unobserve","cancelAnimationFrame","requestAnimationFrame","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","offset$1","autoPlacement$1","shift$1","flip$1","size$1","hide$1","arrow$1","inline$1","limitShift$1","mergedOptions","platformWithCache","computePosition$1","ATTRIBUTE","CHILD","PROPERTY","BOOLEAN_ATTRIBUTE","EVENT","ELEMENT","_$Ct","_$Ci","st","nt","offsetParentPolyfill","flatTreeParent","isVirtualElement","SlPopup","localize","active","distance","skidding","arrowPlacement","arrowPadding","flipFallbackPlacements","flipFallbackStrategy","flipPadding","shiftPadding","autoSizePadding","hoverBridge","updateHoverBridge","anchorEl","anchorRect","popupRect","popup","topLeftX","topLeftY","topRightX","topRightY","bottomLeftX","bottomLeftY","bottomRightX","bottomRightY","stop","changedProps","handleAnchorChange","reposition","removeProperty","sync","syncWidth","syncHeight","flipBoundary","shiftBoundary","autoSize","autoSizeBoundary","arrowEl","isRtl","staticSide","arrowX","arrowY","classMap","query","defaultAnimationRegistry","customAnimationRegistry","ensureAnimation","animation","getLogicalAnimation","rtlKeyframes","setDefaultAnimation","animationName","getAnimation","customAnimation","defaultAnimation","waitForEvent","eventName","animateTo","Infinity","animate","prefersReducedMotion","matchMedia","stopAnimations","getAnimations","cancel","watch","propertyName","resolvedOptions","waitUntilFirstUpdate","decoratedFnName","watchedProperties","SlDropdown","stayOpenOnSelect","hoist","handleKeyDown","focusOnTrigger","handleDocumentKeyDown","closeWatcher","preventDefault","computeClosestContaining","_a2","containingElement","handleDocumentMouseDown","path","composedPath","handlePanelSelect","panel","hidden","addOpenListeners","removeOpenListeners","focus","getMenu","handleTriggerClick","show","handleTriggerKeyDown","menu","menuItems","getAllItems","firstMenuItem","lastMenuItem","setCurrentItem","handleTriggerKeyUp","handleTriggerSlotChange","updateAccessibleTrigger","accessibleTrigger","CloseWatcher","onclose","handleOpenChange","ifDefined","dropdown","opacity","menu_styles_default","SlMenu","handleClick","menuItemTypes","closestMenu","clickHasSubmenu","checked","getCurrentItem","click","items","activeItem","handleMouseDown","isMenuItem","handleSlotChange","defaultSlot","inert","menu_item_styles_default","_$AQ","reconnected","disconnected","setValue","G","rt","lt","ct","ht","SubmenuController","hasSlotController","popupRef","createRef","enableSubmenuTimer","isPopupConnected","submenuOpenDelay","handleMouseMove","clientX","clientY","handleMouseOver","enableSubmenu","disableSubmenu","handleSubmenuEntry","handleFocusOut","relatedTarget","handlePopupMouseover","handlePopupReposition","submenuSlot","localName","addListeners","removeListeners","updateSkidding","elt","querySelectorAll","setSubmenuState","parentElement","styleMap","attrs","accumulator","styleValue","CSSUnitValue","unitValue","pxValue","to","isExpanded","renderSubmenu","spinner_styles_default","SlSpinner","HasSlotController","slotNames","hasDefaultSlot","TEXT_NODE","ELEMENT_NODE","hasNamedSlot","slotName","getTextContent","nodes","assignedNodes","library","resolver","getBasePath","library_default_default","icons","caret","eye","eyedropper","indeterminate","radio","systemLibrary","library_system_default","registry","watchedIcons","watchIcon","unwatchIcon","getIconLibrary","lib","icon_styles_default","CACHEABLE_ERROR","RETRYABLE_ERROR","iconCache","SlIcon","initialRender","resolveIcon","fileData","spriteSheet","svgEl","adoptNode","setIcon","getIconSource","fromLibrary","handleLabelChange","hasLabel","iconResolver","isTemplateResult","shadowSVG","mutator","cloneNode","SlMenuItem","submenuController","handleHostClick","stopImmediatePropagation","handleDefaultSlotChange","textLabel","getTextLabel","cachedTextLabel","handleCheckedChange","handleDisabledChange","handleTypeChange","isSubmenu","isSubmenuExpanded","posMakeFindableCss","PosMakeFindableStyle0","PosMakeFindable","indexes","showOptions","isIndexed","receivePodOs","thing","getLabelIndexes","unsubscribeSessionChange","subscribePodOs","updateUri","checkIfIndexed","getPrivateLabelIndexes","assume","LabelIndex","addToLabelIndex","indexUpdatedEmitter","createDefaultLabelIndex","indexCreatedEmitter","errorEmitter","main","IconSuccess","IconMakeFindable","onSelect","posNavigationCss","PosNavigationStyle0","PosNavigation","inputValue","searchIndex","suggestions","selectedIndex","changeEvents","debouncedSearch","updateResource","buildSearchIndex","clearSearchIndex","rebuildSearchIndex","rebuild","openNavigationDialog","inputRef","select","dialogRef","closeDialog","clearSuggestions","onClickSelf","linkEmitter","searchIndexReady","current","enterkeyhint","posNavigationBarCss","PosNavigationBarStyle0","PosNavigationBar","navigate","activate","ctrlKey","metaKey","ariaLabel","posNewThingFormCss","PosNewThingFormStyle0","PosNewThingForm","selectedTypeUri","onTermSelected","newUri","proposeUriForNewThing","addNewThing","posPictureCss","PosPictureStyle0","PosPicture","pic","picture","posResourceCss","PosResourceStyle0","PosResource","consumers","loadResource","provideResource","getResource","consumer","posRichLinkCss","PosRichLinkStyle0","PosRichLink","followPredicate","showCustomContent","addLink","links","predicate","uris","link","rel","relations","rev","reverseRelations","lastElementChild","appendToMap","propName","debounce","ms","maybeElement","cleanupElements","stencilSubscription","getRenderingRef","elmsToUpdate","dispose","forceUpdate","elms","createObservableMap","defaultState","states","handlers","ownKeys","removeFromArray","unSet","unReset","subscriptions","unsubs","unsub","createRouter","parseURL","DEFAULT_PARSE_URL","activePath","newV","oldV","baseURI","match","routes","route","params","matchPath","navigationChanged","Switch","childrenRoutes","jsx","disposeRouter","router","results","posRouterCss","PosRouterStyle0","Router","PosRouter","linkClicked","sessionRestored","routeChanged","posSelectTermCss","PosSelectTermStyle0","PosSelectTerm","terms","setTerms","listKnownTerms","termSelected","shorthand","posSettingOfflineCacheCss","PosSettingOfflineCacheStyle0","PosSettingOfflineCache","posToolSelectCss","PosToolSelectStyle0","PosToolSelect","tools","selected","toolSelected","AvailableTools","Generic","RdfDocument","priority","DocumentViewer","mimeType","ImageViewer","LdpContainer","selectToolsForTypes","typeUris","maxPriorityFor","onlyRelevant","toSorted","byPriority","tool","maxPriority","posTypeRouterCss","PosTypeRouterStyle0","PosTypeRouter","availableTools","currentTool","initialTool","urlParams","toolParam","handleToolSelected","oldTool","replaceState","renderApp","SelectedTool","OldTool","onAnimationEnd","removeOldTool","avatar_styles_default","SlAvatar","image","initials","shape","handleImageChange","handleImageLoadError","avatarWithImage","avatarWithoutImage","avatar","divider_styles_default","SlDivider","vertical","handleVerticalChange","posUserMenuCss","PosUserMenuStyle0","PosUserMenu"],"sources":["../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KAW7D32O.js","../node_modules/ionicons/dist/collection/components/icon/utils.js","../node_modules/ionicons/dist/collection/components/icon/validate.js","../node_modules/ionicons/dist/collection/components/icon/request.js","../node_modules/ionicons/dist/collection/components/icon/icon.css?tag=ion-icon&encapsulation=shadow","../node_modules/ionicons/dist/collection/components/icon/icon.js","../node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css?tag=ion-progress-bar&mode=ios&encapsulation=shadow","../node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css?tag=ion-progress-bar&mode=md&encapsulation=shadow","../node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.js","../node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css?tag=ion-ripple-effect&encapsulation=shadow","../node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.js","../node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css?tag=ion-skeleton-text&encapsulation=shadow","../node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.js","../node_modules/@ionic/core/dist/collection/components/toast/animations/utils.js","../node_modules/@ionic/core/dist/collection/components/toast/animations/ios.enter.js","../node_modules/@ionic/core/dist/collection/components/toast/animations/ios.leave.js","../node_modules/@ionic/core/dist/collection/components/toast/animations/md.enter.js","../node_modules/@ionic/core/dist/collection/components/toast/animations/md.leave.js","../node_modules/@ionic/core/dist/collection/components/toast/gestures/swipe-to-dismiss.js","../node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css?tag=ion-toast&mode=ios&encapsulation=shadow","../node_modules/@ionic/core/dist/collection/components/toast/toast.md.css?tag=ion-toast&mode=md&encapsulation=shadow","../node_modules/@ionic/core/dist/collection/components/toast/toast.js","src/components/pos-add-new-thing/pos-add-new-thing.css?tag=pos-add-new-thing&encapsulation=shadow","src/components/pos-add-new-thing/pos-add-new-thing.tsx","src/store/settings.ts","../node_modules/idb/build/index.js","src/cache/IndexedDbOfflineCache.ts","src/cache/NavigatorOnlineStatus.ts","src/pod-os.ts","../node_modules/rxjs/dist/esm/internal/util/isFunction.js","../node_modules/rxjs/dist/esm/internal/util/createErrorClass.js","../node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js","../node_modules/rxjs/dist/esm/internal/util/arrRemove.js","../node_modules/rxjs/dist/esm/internal/Subscription.js","../node_modules/rxjs/dist/esm/internal/config.js","../node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js","../node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js","../node_modules/rxjs/dist/esm/internal/util/noop.js","../node_modules/rxjs/dist/esm/internal/NotificationFactories.js","../node_modules/rxjs/dist/esm/internal/util/errorContext.js","../node_modules/rxjs/dist/esm/internal/Subscriber.js","../node_modules/rxjs/dist/esm/internal/symbol/observable.js","../node_modules/rxjs/dist/esm/internal/util/identity.js","../node_modules/rxjs/dist/esm/internal/util/pipe.js","../node_modules/rxjs/dist/esm/internal/Observable.js","../node_modules/rxjs/dist/esm/internal/util/lift.js","../node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js","../node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","../node_modules/rxjs/dist/esm/internal/Subject.js","../node_modules/rxjs/dist/esm/internal/BehaviorSubject.js","../node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","../node_modules/rxjs/dist/esm/internal/scheduler/Action.js","../node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","../node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","../node_modules/rxjs/dist/esm/internal/Scheduler.js","../node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","../node_modules/rxjs/dist/esm/internal/scheduler/async.js","../node_modules/tslib/tslib.es6.js","../node_modules/rxjs/dist/esm/internal/util/isArrayLike.js","../node_modules/rxjs/dist/esm/internal/util/isPromise.js","../node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js","../node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js","../node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js","../node_modules/rxjs/dist/esm/internal/symbol/iterator.js","../node_modules/rxjs/dist/esm/internal/util/isIterable.js","../node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js","../node_modules/rxjs/dist/esm/internal/observable/innerFrom.js","../node_modules/rxjs/dist/esm/internal/operators/debounceTime.js","../node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","../node_modules/@uvdsl/solid-oidc-client-browser/dist/esm/index.js","src/authentication/BrowserSession.ts","src/components/pos-app/pos-app.tsx","src/apps/pos-app-browser/pos-app-browser.css?tag=pos-app-browser","src/apps/pos-app-browser/pos-app-browser.tsx","src/apps/pos-app-dashboard/pos-app-dashboard.css?tag=pos-app-dashboard&encapsulation=shadow","src/apps/pos-app-dashboard/pos-app-dashboard.tsx","src/apps/pos-app-settings/pos-app-settings.css?tag=pos-app-settings&encapsulation=shadow","src/apps/pos-app-settings/pos-app-settings.tsx","src/components/pos-description/pos-description.tsx","src/components/pos-dialog/pos-dialog.css?tag=pos-dialog","src/components/pos-dialog/pos-dialog.tsx","src/components/pos-error-toast/pos-error-toast.tsx","src/apps/pos-app-dashboard/pos-example-resources/pos-example-resources.css?tag=pos-example-resources&encapsulation=shadow","src/apps/pos-app-dashboard/pos-example-resources/pos-example-resources.tsx","src/apps/pos-app-dashboard/pos-getting-started/pos-getting-started.css?tag=pos-getting-started&encapsulation=shadow","src/apps/pos-app-dashboard/pos-getting-started/pos-getting-started.tsx","src/components/pos-image/pos-image.css?tag=pos-image&encapsulation=shadow","src/components/pos-image/pos-image.tsx","src/components/pos-internal-router/pos-internal-router.tsx","src/components/pos-label/pos-label.tsx","src/components/pos-login/pos-login.css?tag=pos-login&encapsulation=shadow","src/components/pos-login/pos-login.tsx","src/components/pos-login-form/pos-login-form.css?tag=pos-login-form&encapsulation=shadow","src/components/pos-login-form/pos-login-form.tsx","../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LXP7GVU3.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VESXC477.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3KSWVBQ5.js","../node_modules/@shoelace-style/localize/dist/index.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7BTDLTNI.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6CTB5ZDJ.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TUVJKY7S.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../node_modules/@lit/reactive-element/decorators/base.js","../node_modules/@lit/reactive-element/decorators/query.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.4TUIT776.js","../node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js","../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js","../node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js","../node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js","../node_modules/lit-html/directive.js","../node_modules/lit-html/directives/class-map.js","../node_modules/composed-offset-position/dist/composed-offset-position.esm.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5JY5FUCG.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.K7JGTRV7.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.B4BZKR24.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.AJ3ENQ5C.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GMYPQTFK.js","../node_modules/lit-html/directives/if-defined.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.C56A5M6T.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.UDWRA64J.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VVA35HTY.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.Q6CVTR7F.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.JHOXTQXA.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KZJNDGFO.js","../node_modules/lit-html/directive-helpers.js","../node_modules/lit-html/async-directive.js","../node_modules/lit-html/directives/ref.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZLIGP6HZ.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7DUCI5S4.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.36O46B5H.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NYIIDP5N.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.P7ZG6EMR.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3TFKS637.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZL53POKZ.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QLXRCYS4.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.YHLNUJ7P.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WGYPSPL3.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HVTXQL7M.js","src/components/pos-make-findable/pos-make-findable.css?tag=pos-make-findable&encapsulation=shadow","src/components/pos-make-findable/pos-make-findable.tsx","src/components/pos-navigation/pos-navigation.css?tag=pos-navigation&encapsulation=shadow","src/components/pos-navigation/pos-navigation.tsx","src/components/pos-navigation/bar/pos-navigation-bar.css?tag=pos-navigation-bar&encapsulation=shadow","src/components/pos-navigation/bar/pos-navigation-bar.tsx","src/components/pos-new-thing-form/pos-new-thing-form.css?tag=pos-new-thing-form&encapsulation=shadow","src/components/pos-new-thing-form/pos-new-thing-form.tsx","src/components/pos-picture/pos-picture.css?tag=pos-picture&encapsulation=shadow","src/components/pos-picture/pos-picture.tsx","src/components/pos-resource/pos-resource.css?tag=pos-resource&encapsulation=shadow","src/components/pos-resource/pos-resource.tsx","src/components/pos-rich-link/pos-rich-link.css?tag=pos-rich-link&encapsulation=shadow","src/components/pos-rich-link/pos-rich-link.tsx","../node_modules/stencil-router-v2/node_modules/@stencil/store/dist/index.mjs","../node_modules/stencil-router-v2/dist/index.mjs","src/components/pos-router/pos-router.css?tag=pos-router","src/components/pos-router/pos-router.tsx","src/components/pos-select-term/pos-select-term.css?tag=pos-select-term&encapsulation=shadow","src/components/pos-select-term/pos-select-term.tsx","src/apps/pos-app-settings/pos-setting-offline-cache/pos-setting-offline-cache.css?tag=pos-setting-offline-cache&encapsulation=shadow","src/apps/pos-app-settings/pos-setting-offline-cache/pos-setting-offline-cache.tsx","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZGGPD2XJ.js","src/components/pos-tool-select/pos-tool-select.css?tag=pos-tool-select&encapsulation=shadow","src/components/pos-tool-select/pos-tool-select.tsx","src/components/pos-type-router/selectToolsForTypes.ts","src/components/pos-type-router/pos-type-router.css?tag=pos-type-router&encapsulation=shadow","src/components/pos-type-router/pos-type-router.tsx","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.K35GSB4N.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WREZSXX4.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.24ZZSBUF.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SUSCR7CI.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5ZSXZIE6.js","../node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IVVHNXMC.js","src/components/pos-user-menu/pos-user-menu.css?tag=pos-user-menu&encapsulation=shadow","src/components/pos-user-menu/pos-user-menu.tsx"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for(\"Symbol.\" + name);\nvar __typeError = (msg) => {\n throw TypeError(msg);\n};\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __decorateClass = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result) __defProp(target, key, result);\n return result;\n};\nvar __accessCheck = (obj, member, msg) => member.has(obj) || __typeError(\"Cannot \" + msg);\nvar __privateGet = (obj, member, getter) => (__accessCheck(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj));\nvar __privateAdd = (obj, member, value) => member.has(obj) ? __typeError(\"Cannot add the same private member more than once\") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\nvar __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, \"write to private field\"), setter ? setter.call(obj, value) : member.set(obj, value), value);\nvar __await = function(promise, isYieldStar) {\n this[0] = promise;\n this[1] = isYieldStar;\n};\nvar __yieldStar = (value) => {\n var obj = value[__knownSymbol(\"asyncIterator\")], isAwait = false, method, it = {};\n if (obj == null) {\n obj = value[__knownSymbol(\"iterator\")]();\n method = (k) => it[k] = (x) => obj[k](x);\n } else {\n obj = obj.call(value);\n method = (k) => it[k] = (v) => {\n if (isAwait) {\n isAwait = false;\n if (k === \"throw\") throw v;\n return v;\n }\n isAwait = true;\n return {\n done: false,\n value: new __await(new Promise((resolve) => {\n var x = obj[k](v);\n if (!(x instanceof Object)) __typeError(\"Object expected\");\n resolve(x);\n }), 1)\n };\n };\n }\n return it[__knownSymbol(\"iterator\")] = () => it, method(\"next\"), \"throw\" in obj ? method(\"throw\") : it.throw = (x) => {\n throw x;\n }, \"return\" in obj && method(\"return\"), it;\n};\n\nexport {\n __spreadValues,\n __spreadProps,\n __decorateClass,\n __privateGet,\n __privateAdd,\n __privateSet,\n __yieldStar\n};\n","import { getAssetPath } from \"@stencil/core\";\nlet CACHED_MAP;\nexport const getIconMap = () => {\n if (typeof window === 'undefined') {\n return new Map();\n }\n else {\n if (!CACHED_MAP) {\n const win = window;\n win.Ionicons = win.Ionicons || {};\n CACHED_MAP = win.Ionicons.map = win.Ionicons.map || new Map();\n }\n return CACHED_MAP;\n }\n};\nexport const addIcons = (icons) => {\n Object.keys(icons).forEach(name => {\n addToIconMap(name, icons[name]);\n /**\n * Developers can also pass in the SVG object directly\n * and Ionicons can map the object to a kebab case name.\n * Example: addIcons({ addCircleOutline });\n * This will create an \"addCircleOutline\" entry and\n * an \"add-circle-outline\" entry.\n * Usage: <ion-icon name=\"add-circle-outline\"></ion-icon>\n * Using name=\"addCircleOutline\" is valid too, but the\n * kebab case naming is preferred.\n */\n const toKebabCase = name.replace(/([a-z0-9]|(?=[A-Z]))([A-Z0-9])/g, \"$1-$2\").toLowerCase();\n if (name !== toKebabCase) {\n addToIconMap(toKebabCase, icons[name]);\n }\n });\n};\nconst addToIconMap = (name, data) => {\n const map = getIconMap();\n const existingIcon = map.get(name);\n if (existingIcon === undefined) {\n map.set(name, data);\n /**\n * Importing and defining the same icon reference\n * multiple times should not yield a warning.\n */\n }\n else if (existingIcon !== data) {\n console.warn(`[Ionicons Warning]: Multiple icons were mapped to name \"${name}\". Ensure that multiple icons are not mapped to the same icon name.`);\n }\n};\nexport const getUrl = (i) => {\n let url = getSrc(i.src);\n if (url) {\n return url;\n }\n url = getName(i.name, i.icon, i.mode, i.ios, i.md);\n if (url) {\n return getNamedUrl(url, i);\n }\n if (i.icon) {\n url = getSrc(i.icon);\n if (url) {\n return url;\n }\n url = getSrc(i.icon[i.mode]);\n if (url) {\n return url;\n }\n }\n return null;\n};\nconst getNamedUrl = (iconName, iconEl) => {\n const url = getIconMap().get(iconName);\n if (url) {\n return url;\n }\n try {\n return getAssetPath(`svg/${iconName}.svg`);\n }\n catch (e) {\n /**\n * In the custom elements build version of ionicons, referencing an icon\n * by name will throw an invalid URL error because the asset path is not defined.\n * This catches that error and logs something that is more developer-friendly.\n * We also include a reference to the ion-icon element so developers can\n * figure out which instance of ion-icon needs to be updated.\n */\n console.warn(`[Ionicons Warning]: Could not load icon with name \"${iconName}\". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`, iconEl);\n }\n};\nexport const getName = (iconName, icon, mode, ios, md) => {\n // default to \"md\" if somehow the mode wasn't set\n mode = (mode && toLower(mode)) === 'ios' ? 'ios' : 'md';\n // if an icon was passed in using the ios or md attributes\n // set the iconName to whatever was passed in\n if (ios && mode === 'ios') {\n iconName = toLower(ios);\n }\n else if (md && mode === 'md') {\n iconName = toLower(md);\n }\n else {\n if (!iconName && icon && !isSrc(icon)) {\n iconName = icon;\n }\n if (isStr(iconName)) {\n iconName = toLower(iconName);\n }\n }\n if (!isStr(iconName) || iconName.trim() === '') {\n return null;\n }\n // only allow alpha characters and dash\n const invalidChars = iconName.replace(/[a-z]|-|\\d/gi, '');\n if (invalidChars !== '') {\n return null;\n }\n return iconName;\n};\nexport const getSrc = (src) => {\n if (isStr(src)) {\n src = src.trim();\n if (isSrc(src)) {\n return src;\n }\n }\n return null;\n};\nexport const isSrc = (str) => str.length > 0 && /(\\/|\\.)/.test(str);\nexport const isStr = (val) => typeof val === 'string';\nexport const toLower = (val) => val.toLowerCase();\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `ion-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (el, attributes = []) => {\n const attributeObject = {};\n attributes.forEach(attr => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n el.removeAttribute(attr);\n }\n });\n return attributeObject;\n};\n/**\n * Returns `true` if the document or host element\n * has a `dir` set to `rtl`. The host value will always\n * take priority over the root document value.\n */\nexport const isRTL = (hostEl) => {\n if (hostEl) {\n if (hostEl.dir !== '') {\n return hostEl.dir.toLowerCase() === 'rtl';\n }\n }\n return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === 'rtl';\n};\n","import { isStr } from \"./utils\";\nexport const validateContent = (svgContent) => {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n // setup this way to ensure it works on our buddy IE\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n // must only have 1 root element\n const svgElm = div.firstElementChild;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\n const svgClass = svgElm.getAttribute('class') || '';\n svgElm.setAttribute('class', (svgClass + ' s-ion-icon').trim());\n // root element must be an svg\n // lets double check we've got valid elements\n // do not allow scripts\n if (isValid(svgElm)) {\n return div.innerHTML;\n }\n }\n return '';\n};\nexport const isValid = (elm) => {\n if (elm.nodeType === 1) {\n if (elm.nodeName.toLowerCase() === 'script') {\n return false;\n }\n for (let i = 0; i < elm.attributes.length; i++) {\n const name = elm.attributes[i].name;\n if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {\n return false;\n }\n }\n for (let i = 0; i < elm.childNodes.length; i++) {\n if (!isValid(elm.childNodes[i])) {\n return false;\n }\n }\n }\n return true;\n};\nexport const isSvgDataUrl = (url) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, validateContent } from \"./validate\";\nexport const ioniconContent = new Map();\nconst requests = new Map();\nlet parser;\nexport const getSvgContent = (url, sanitize) => {\n // see if we already have a request for this url\n let req = requests.get(url);\n if (!req) {\n if (typeof fetch !== 'undefined' && typeof document !== 'undefined') {\n /**\n * If the url is a data url of an svg, then try to parse it\n * with the DOMParser. This works with content security policies enabled.\n */\n if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n /**\n * Create an instance of the DOM parser. This creates a single\n * parser instance for the entire app, which is more efficient.\n */\n parser = new DOMParser();\n }\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n if (svg) {\n ioniconContent.set(url, svg.outerHTML);\n }\n return Promise.resolve();\n }\n else {\n // we don't already have a request\n req = fetch(url).then((rsp) => {\n if (rsp.ok) {\n return rsp.text().then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n ioniconContent.set(url, svgContent || '');\n });\n }\n ioniconContent.set(url, '');\n });\n // cache for the same requests\n requests.set(url, req);\n }\n }\n else {\n // set to empty for ssr scenarios and resolve promise\n ioniconContent.set(url, '');\n return Promise.resolve();\n }\n }\n return req;\n};\n",":host {\n display: inline-block;\n\n width: 1em;\n height: 1em;\n\n contain: strict;\n\n fill: currentColor;\n\n box-sizing: content-box !important;\n\n}\n\n:host .ionicon {\n stroke: currentColor;\n}\n\n.ionicon-fill-none {\n fill: none;\n}\n\n.ionicon-stroke-width {\n stroke-width: 32px;\n stroke-width: var(--ionicon-stroke-width, 32px);\n}\n\n.icon-inner,\n.ionicon,\nsvg {\n display: block;\n\n height: 100%;\n width: 100%;\n}\n\n/* Icon RTL\n * -----------------------------------------------------------\n */\n\n/**\n * Safari <16.4 incorrectly reports\n * that it supports :dir(rtl) when it does not.\n * This @supports statement lets us target\n * WebKit browsers to apply the RTL fallback.\n * -webkit-named-image only exists on WebKit.\n * For WebKit browsers that do support :dir(rtl)\n * (i.e. Safari >= 16.4) then the :dir(rtl)\n * code farther down on the page will take\n * effect and override this fallback.\n */\n@supports (background: -webkit-named-image(i)) {\n :host(.icon-rtl) .icon-inner {\n transform: scaleX(-1);\n }\n}\n\n/**\n * Fallback for browsers that support\n * neither :host-context nor :dir.\n * The icon will not react to dir\n * changes, but it will at least\n * respect the dir on component load.\n */\n@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])) {\n :host(.icon-rtl) .icon-inner {\n transform: scaleX(-1);\n }\n}\n\n/* :host-context is supported in chromium; :dir is supported in safari & firefox */\n:host(.flip-rtl):host-context([dir='rtl']) .icon-inner {\n transform: scaleX(-1);\n}\n\n@supports selector(:dir(rtl)) {\n :host(.flip-rtl:dir(rtl)) .icon-inner {\n transform: scaleX(-1);\n }\n /**\n * This is needed for WebKit otherwise the fallback\n * will always cause the icon to be flipped if the document\n * loads in RTL.\n */\n :host(.flip-rtl:dir(ltr)) .icon-inner {\n transform: scaleX(1);\n }\n}\n\n/* Icon Sizes\n * -----------------------------------------------------------\n */\n\n:host(.icon-small) {\n font-size: 1.125rem !important;\n}\n\n:host(.icon-large) {\n font-size: 2rem !important;\n}\n\n/* Icon Colors\n * -----------------------------------------------------------\n */\n\n:host(.ion-color) {\n color: var(--ion-color-base) !important;\n}\n\n:host(.ion-color-primary) {\n --ion-color-base: var(--ion-color-primary, #3880ff);\n}\n\n:host(.ion-color-secondary) {\n --ion-color-base: var(--ion-color-secondary, #0cd1e8);\n}\n\n:host(.ion-color-tertiary) {\n --ion-color-base: var(--ion-color-tertiary, #f4a942);\n}\n\n:host(.ion-color-success) {\n --ion-color-base: var(--ion-color-success, #10dc60);\n}\n\n:host(.ion-color-warning) {\n --ion-color-base: var(--ion-color-warning, #ffce00);\n}\n\n:host(.ion-color-danger) {\n --ion-color-base: var(--ion-color-danger, #f14141);\n}\n\n:host(.ion-color-light) {\n --ion-color-base: var(--ion-color-light, #f4f5f8);\n}\n\n:host(.ion-color-medium) {\n --ion-color-base: var(--ion-color-medium, #989aa2);\n}\n\n:host(.ion-color-dark) {\n --ion-color-base: var(--ion-color-dark, #222428);\n}\n","import { Build, Host, h } from \"@stencil/core\";\nimport { getSvgContent, ioniconContent } from \"./request\";\nimport { getName, getUrl, inheritAttributes, isRTL } from \"./utils\";\nexport class Icon {\n constructor() {\n this.iconName = null;\n this.inheritedAttributes = {};\n this.didLoadIcon = false;\n this.svgContent = undefined;\n this.isVisible = false;\n this.mode = getIonMode();\n this.color = undefined;\n this.ios = undefined;\n this.md = undefined;\n this.flipRtl = undefined;\n this.name = undefined;\n this.src = undefined;\n this.icon = undefined;\n this.size = undefined;\n this.lazy = false;\n this.sanitize = true;\n }\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n }\n connectedCallback() {\n // purposely do not return the promise here because loading\n // the svg file should not hold up loading the app\n // only load the svg if it's visible\n this.waitUntilVisible(this.el, '50px', () => {\n this.isVisible = true;\n this.loadIcon();\n });\n }\n componentDidLoad() {\n /**\n * Addresses an Angular issue where property values are assigned after the 'connectedCallback' but prior to the registration of watchers.\n * This enhancement ensures the loading of an icon when the component has finished rendering and the icon has yet to apply the SVG data.\n * This modification pertains to the usage of Angular's binding syntax:\n * `<ion-icon [name]=\"myIconName\"></ion-icon>`\n */\n if (!this.didLoadIcon) {\n this.loadIcon();\n }\n }\n disconnectedCallback() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n waitUntilVisible(el, rootMargin, cb) {\n if (Build.isBrowser && this.lazy && typeof window !== 'undefined' && window.IntersectionObserver) {\n const io = (this.io = new window.IntersectionObserver((data) => {\n if (data[0].isIntersecting) {\n io.disconnect();\n this.io = undefined;\n cb();\n }\n }, { rootMargin }));\n io.observe(el);\n }\n else {\n // browser doesn't support IntersectionObserver\n // so just fallback to always show it\n cb();\n }\n }\n loadIcon() {\n if (Build.isBrowser && this.isVisible) {\n const url = getUrl(this);\n if (url) {\n if (ioniconContent.has(url)) {\n // sync if it's already loaded\n this.svgContent = ioniconContent.get(url);\n }\n else {\n // async if it hasn't been loaded\n getSvgContent(url, this.sanitize).then(() => (this.svgContent = ioniconContent.get(url)));\n }\n this.didLoadIcon = true;\n }\n }\n this.iconName = getName(this.name, this.icon, this.mode, this.ios, this.md);\n }\n render() {\n const { flipRtl, iconName, inheritedAttributes, el } = this;\n const mode = this.mode || 'md';\n // we have designated that arrows & chevrons should automatically flip (unless flip-rtl is set to false) because \"back\" is left in ltr and right in rtl, and \"forward\" is the opposite\n const shouldAutoFlip = iconName\n ? (iconName.includes('arrow') || iconName.includes('chevron')) && flipRtl !== false\n : false;\n // if shouldBeFlippable is true, the icon should change direction when `dir` changes\n const shouldBeFlippable = flipRtl || shouldAutoFlip;\n return (h(Host, Object.assign({ role: \"img\", class: Object.assign(Object.assign({ [mode]: true }, createColorClasses(this.color)), { [`icon-${this.size}`]: !!this.size, 'flip-rtl': shouldBeFlippable, 'icon-rtl': shouldBeFlippable && isRTL(el) }) }, inheritedAttributes), Build.isBrowser && this.svgContent ? (h(\"div\", { class: \"icon-inner\", innerHTML: this.svgContent })) : (h(\"div\", { class: \"icon-inner\" }))));\n }\n static get is() { return \"ion-icon\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"icon.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"icon.css\"]\n };\n }\n static get assetsDirs() { return [\"svg\"]; }\n static get properties() {\n return {\n \"mode\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The mode determines which platform styles to use.\"\n },\n \"attribute\": \"mode\",\n \"reflect\": false,\n \"defaultValue\": \"getIonMode()\"\n },\n \"color\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The color to use for the background of the item.\"\n },\n \"attribute\": \"color\",\n \"reflect\": false\n },\n \"ios\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies which icon to use on `ios` mode.\"\n },\n \"attribute\": \"ios\",\n \"reflect\": false\n },\n \"md\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies which icon to use on `md` mode.\"\n },\n \"attribute\": \"md\",\n \"reflect\": false\n },\n \"flipRtl\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies whether the icon should horizontally flip when `dir` is `\\\"rtl\\\"`.\"\n },\n \"attribute\": \"flip-rtl\",\n \"reflect\": false\n },\n \"name\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies which icon to use from the built-in set of icons.\"\n },\n \"attribute\": \"name\",\n \"reflect\": true\n },\n \"src\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specifies the exact `src` of an SVG file to use.\"\n },\n \"attribute\": \"src\",\n \"reflect\": false\n },\n \"icon\": {\n \"type\": \"any\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"A combination of both `name` and `src`. If a `src` url is detected\\nit will set the `src` property. Otherwise it assumes it's a built-in named\\nSVG and set the `name` property.\"\n },\n \"attribute\": \"icon\",\n \"reflect\": false\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the icon.\\nAvailable options are: `\\\"small\\\"` and `\\\"large\\\"`.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false\n },\n \"lazy\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If enabled, ion-icon will be loaded lazily when it's visible in the viewport.\\nDefault, `false`.\"\n },\n \"attribute\": \"lazy\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"sanitize\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"default\",\n \"text\": \"true\"\n }],\n \"text\": \"When set to `false`, SVG content that is HTTP fetched will not be checked\\nif the response SVG content has any `<script>` elements, or any attributes\\nthat start with `on`, such as `onclick`.\"\n },\n \"attribute\": \"sanitize\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n }\n };\n }\n static get states() {\n return {\n \"svgContent\": {},\n \"isVisible\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"name\",\n \"methodName\": \"loadIcon\"\n }, {\n \"propName\": \"src\",\n \"methodName\": \"loadIcon\"\n }, {\n \"propName\": \"icon\",\n \"methodName\": \"loadIcon\"\n }, {\n \"propName\": \"ios\",\n \"methodName\": \"loadIcon\"\n }, {\n \"propName\": \"md\",\n \"methodName\": \"loadIcon\"\n }];\n }\n}\nconst getIonMode = () => (Build.isBrowser && typeof document !== 'undefined' && document.documentElement.getAttribute('mode')) || 'md';\nconst createColorClasses = (color) => {\n return color\n ? {\n 'ion-color': true,\n [`ion-color-${color}`]: true,\n }\n : null;\n};\n","/**\n * Convert a font size to a dynamic font size.\n * Fonts that participate in Dynamic Type should use\n * dynamic font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param unit (optional) - The unit to convert to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a maximum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a minimum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * maximum and minimum font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * A heuristic that applies CSS to tablet\n * viewports.\n *\n * Usage:\n * @include tablet-viewport() {\n * :host {\n * background-color: green;\n * }\n * }\n */\n/**\n * A heuristic that applies CSS to mobile\n * viewports (i.e. phones, not tablets).\n *\n * Usage:\n * @include mobile-viewport() {\n * :host {\n * background-color: blue;\n * }\n * }\n */\n:host {\n /**\n * @prop --background: Background of the progress track, or the buffer bar if `buffer` is set\n * @prop --progress-background: Background of the progress bar representing the current value\n * @prop --buffer-background: DEPRECATED, use `--background` instead\n */\n --background: rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.3);\n --progress-background: var(--ion-color-primary, #3880ff);\n --buffer-background: var(--background);\n display: block;\n position: relative;\n width: 100%;\n contain: strict;\n direction: ltr;\n overflow: hidden;\n}\n\n.progress,\n.progress-indeterminate,\n.indeterminate-bar-primary,\n.indeterminate-bar-secondary,\n.progress-buffer-bar {\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n}\n\n.buffer-circles-container,\n.buffer-circles {\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n position: absolute;\n}\n\n.buffer-circles {\n /* stylelint-disable property-disallowed-list */\n right: -10px;\n left: -10px;\n /* stylelint-enable property-disallowed-list */\n}\n\n.progress,\n.progress-buffer-bar,\n.buffer-circles-container {\n /* stylelint-disable-next-line property-disallowed-list */\n transform-origin: left top;\n transition: transform 150ms linear;\n}\n\n.progress,\n.progress-indeterminate {\n background: var(--progress-background);\n z-index: 2;\n}\n\n.progress-buffer-bar {\n background: var(--buffer-background);\n z-index: 1;\n}\n\n.buffer-circles-container {\n overflow: hidden;\n}\n\n.indeterminate-bar-primary {\n /* stylelint-disable property-disallowed-list */\n top: 0;\n right: 0;\n bottom: 0;\n left: -145.166611%;\n /* stylelint-enable property-disallowed-list */\n animation: primary-indeterminate-translate 2s infinite linear;\n}\n.indeterminate-bar-primary .progress-indeterminate {\n animation: primary-indeterminate-scale 2s infinite linear;\n animation-play-state: inherit;\n}\n\n.indeterminate-bar-secondary {\n /* stylelint-disable property-disallowed-list */\n top: 0;\n right: 0;\n bottom: 0;\n left: -54.888891%;\n /* stylelint-enable property-disallowed-list */\n animation: secondary-indeterminate-translate 2s infinite linear;\n}\n.indeterminate-bar-secondary .progress-indeterminate {\n animation: secondary-indeterminate-scale 2s infinite linear;\n animation-play-state: inherit;\n}\n\n.buffer-circles {\n background-image: radial-gradient(ellipse at center, var(--buffer-background) 0%, var(--buffer-background) 30%, transparent 30%);\n /* stylelint-disable property-disallowed-list */\n background-repeat: repeat-x;\n background-position: 5px center;\n background-size: 10px 10px;\n /* stylelint-enable property-disallowed-list */\n z-index: 0;\n animation: buffering 450ms infinite linear;\n}\n\n:host(.progress-bar-reversed) {\n transform: scaleX(-1);\n}\n\n:host(.progress-paused) .indeterminate-bar-secondary,\n:host(.progress-paused) .indeterminate-bar-primary,\n:host(.progress-paused) .buffer-circles {\n animation-play-state: paused;\n}\n\n:host(.ion-color) .progress-buffer-bar {\n background: rgba(var(--ion-color-base-rgb), 0.3);\n}\n\n:host(.ion-color) .buffer-circles {\n background-image: radial-gradient(ellipse at center, rgba(var(--ion-color-base-rgb), 0.3) 0%, rgba(var(--ion-color-base-rgb), 0.3) 30%, transparent 30%);\n}\n\n:host(.ion-color) .progress,\n:host(.ion-color) .progress-indeterminate {\n background: var(--ion-color-base);\n}\n\n@keyframes primary-indeterminate-translate {\n 0% {\n transform: translateX(0);\n }\n 20% {\n animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);\n transform: translateX(0);\n }\n 59.15% {\n animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);\n transform: translateX(83.67142%);\n }\n 100% {\n transform: translateX(200.611057%);\n }\n}\n@keyframes primary-indeterminate-scale {\n 0% {\n transform: scaleX(0.08);\n }\n 36.65% {\n animation-timing-function: cubic-bezier(0.334731, 0.12482, 0.785844, 1);\n transform: scaleX(0.08);\n }\n 69.15% {\n animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);\n transform: scaleX(0.661479);\n }\n 100% {\n transform: scaleX(0.08);\n }\n}\n@keyframes secondary-indeterminate-translate {\n 0% {\n animation-timing-function: cubic-bezier(0.15, 0, 0.515058, 0.409685);\n transform: translateX(0);\n }\n 25% {\n animation-timing-function: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);\n transform: translateX(37.651913%);\n }\n 48.35% {\n animation-timing-function: cubic-bezier(0.4, 0.627035, 0.6, 0.902026);\n transform: translateX(84.386165%);\n }\n 100% {\n transform: translateX(160.277782%);\n }\n}\n@keyframes secondary-indeterminate-scale {\n 0% {\n animation-timing-function: cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);\n transform: scaleX(0.08);\n }\n 19.15% {\n animation-timing-function: cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);\n transform: scaleX(0.457104);\n }\n 44.15% {\n animation-timing-function: cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);\n transform: scaleX(0.72796);\n }\n 100% {\n transform: scaleX(0.08);\n }\n}\n@keyframes buffering {\n to {\n transform: translateX(-10px);\n }\n}\n:host {\n height: 3px;\n}","/**\n * Convert a font size to a dynamic font size.\n * Fonts that participate in Dynamic Type should use\n * dynamic font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param unit (optional) - The unit to convert to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a maximum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a minimum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * maximum and minimum font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * A heuristic that applies CSS to tablet\n * viewports.\n *\n * Usage:\n * @include tablet-viewport() {\n * :host {\n * background-color: green;\n * }\n * }\n */\n/**\n * A heuristic that applies CSS to mobile\n * viewports (i.e. phones, not tablets).\n *\n * Usage:\n * @include mobile-viewport() {\n * :host {\n * background-color: blue;\n * }\n * }\n */\n:host {\n /**\n * @prop --background: Background of the progress track, or the buffer bar if `buffer` is set\n * @prop --progress-background: Background of the progress bar representing the current value\n * @prop --buffer-background: DEPRECATED, use `--background` instead\n */\n --background: rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.3);\n --progress-background: var(--ion-color-primary, #3880ff);\n --buffer-background: var(--background);\n display: block;\n position: relative;\n width: 100%;\n contain: strict;\n direction: ltr;\n overflow: hidden;\n}\n\n.progress,\n.progress-indeterminate,\n.indeterminate-bar-primary,\n.indeterminate-bar-secondary,\n.progress-buffer-bar {\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n}\n\n.buffer-circles-container,\n.buffer-circles {\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n position: absolute;\n}\n\n.buffer-circles {\n /* stylelint-disable property-disallowed-list */\n right: -10px;\n left: -10px;\n /* stylelint-enable property-disallowed-list */\n}\n\n.progress,\n.progress-buffer-bar,\n.buffer-circles-container {\n /* stylelint-disable-next-line property-disallowed-list */\n transform-origin: left top;\n transition: transform 150ms linear;\n}\n\n.progress,\n.progress-indeterminate {\n background: var(--progress-background);\n z-index: 2;\n}\n\n.progress-buffer-bar {\n background: var(--buffer-background);\n z-index: 1;\n}\n\n.buffer-circles-container {\n overflow: hidden;\n}\n\n.indeterminate-bar-primary {\n /* stylelint-disable property-disallowed-list */\n top: 0;\n right: 0;\n bottom: 0;\n left: -145.166611%;\n /* stylelint-enable property-disallowed-list */\n animation: primary-indeterminate-translate 2s infinite linear;\n}\n.indeterminate-bar-primary .progress-indeterminate {\n animation: primary-indeterminate-scale 2s infinite linear;\n animation-play-state: inherit;\n}\n\n.indeterminate-bar-secondary {\n /* stylelint-disable property-disallowed-list */\n top: 0;\n right: 0;\n bottom: 0;\n left: -54.888891%;\n /* stylelint-enable property-disallowed-list */\n animation: secondary-indeterminate-translate 2s infinite linear;\n}\n.indeterminate-bar-secondary .progress-indeterminate {\n animation: secondary-indeterminate-scale 2s infinite linear;\n animation-play-state: inherit;\n}\n\n.buffer-circles {\n background-image: radial-gradient(ellipse at center, var(--buffer-background) 0%, var(--buffer-background) 30%, transparent 30%);\n /* stylelint-disable property-disallowed-list */\n background-repeat: repeat-x;\n background-position: 5px center;\n background-size: 10px 10px;\n /* stylelint-enable property-disallowed-list */\n z-index: 0;\n animation: buffering 450ms infinite linear;\n}\n\n:host(.progress-bar-reversed) {\n transform: scaleX(-1);\n}\n\n:host(.progress-paused) .indeterminate-bar-secondary,\n:host(.progress-paused) .indeterminate-bar-primary,\n:host(.progress-paused) .buffer-circles {\n animation-play-state: paused;\n}\n\n:host(.ion-color) .progress-buffer-bar {\n background: rgba(var(--ion-color-base-rgb), 0.3);\n}\n\n:host(.ion-color) .buffer-circles {\n background-image: radial-gradient(ellipse at center, rgba(var(--ion-color-base-rgb), 0.3) 0%, rgba(var(--ion-color-base-rgb), 0.3) 30%, transparent 30%);\n}\n\n:host(.ion-color) .progress,\n:host(.ion-color) .progress-indeterminate {\n background: var(--ion-color-base);\n}\n\n@keyframes primary-indeterminate-translate {\n 0% {\n transform: translateX(0);\n }\n 20% {\n animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);\n transform: translateX(0);\n }\n 59.15% {\n animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);\n transform: translateX(83.67142%);\n }\n 100% {\n transform: translateX(200.611057%);\n }\n}\n@keyframes primary-indeterminate-scale {\n 0% {\n transform: scaleX(0.08);\n }\n 36.65% {\n animation-timing-function: cubic-bezier(0.334731, 0.12482, 0.785844, 1);\n transform: scaleX(0.08);\n }\n 69.15% {\n animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);\n transform: scaleX(0.661479);\n }\n 100% {\n transform: scaleX(0.08);\n }\n}\n@keyframes secondary-indeterminate-translate {\n 0% {\n animation-timing-function: cubic-bezier(0.15, 0, 0.515058, 0.409685);\n transform: translateX(0);\n }\n 25% {\n animation-timing-function: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);\n transform: translateX(37.651913%);\n }\n 48.35% {\n animation-timing-function: cubic-bezier(0.4, 0.627035, 0.6, 0.902026);\n transform: translateX(84.386165%);\n }\n 100% {\n transform: translateX(160.277782%);\n }\n}\n@keyframes secondary-indeterminate-scale {\n 0% {\n animation-timing-function: cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);\n transform: scaleX(0.08);\n }\n 19.15% {\n animation-timing-function: cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);\n transform: scaleX(0.457104);\n }\n 44.15% {\n animation-timing-function: cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);\n transform: scaleX(0.72796);\n }\n 100% {\n transform: scaleX(0.08);\n }\n}\n@keyframes buffering {\n to {\n transform: translateX(-10px);\n }\n}\n:host {\n height: 4px;\n}","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { Host, h } from \"@stencil/core\";\nimport { clamp } from \"../../utils/helpers\";\nimport { createColorClasses } from \"../../utils/theme\";\nimport { config } from \"../../global/config\";\nimport { getIonMode } from \"../../global/ionic-global\";\n/**\n * @virtualProp {\"ios\" | \"md\"} mode - The mode determines which platform styles to use.\n *\n * @part progress - The progress bar that shows the current value when `type` is `\"determinate\"` and slides back and forth when `type` is `\"indeterminate\"`.\n * @part stream - The animated circles that appear while buffering. This only shows when `buffer` is set and `type` is `\"determinate\"`.\n * @part track - The track bar behind the progress bar. If the `buffer` property is set and `type` is `\"determinate\"` the track will be the\n * width of the `buffer` value.\n */\nexport class ProgressBar {\n constructor() {\n this.type = 'determinate';\n this.reversed = false;\n this.value = 0;\n this.buffer = 1;\n this.color = undefined;\n }\n render() {\n const { color, type, reversed, value, buffer } = this;\n const paused = config.getBoolean('_testing');\n const mode = getIonMode(this);\n return (h(Host, { key: '944b79ed6fce1b2c0ed48681cd8517a5abbddd80', role: \"progressbar\", \"aria-valuenow\": type === 'determinate' ? value : null, \"aria-valuemin\": \"0\", \"aria-valuemax\": \"1\", class: createColorClasses(color, {\n [mode]: true,\n [`progress-bar-${type}`]: true,\n 'progress-paused': paused,\n 'progress-bar-reversed': document.dir === 'rtl' ? !reversed : reversed,\n }) }, type === 'indeterminate' ? renderIndeterminate() : renderProgress(value, buffer)));\n }\n static get is() { return \"ion-progress-bar\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"ios\": [\"progress-bar.ios.scss\"],\n \"md\": [\"progress-bar.md.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"ios\": [\"progress-bar.ios.css\"],\n \"md\": [\"progress-bar.md.css\"]\n };\n }\n static get properties() {\n return {\n \"type\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"'determinate' | 'indeterminate'\",\n \"resolved\": \"\\\"determinate\\\" | \\\"indeterminate\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The state of the progress bar, based on if the time the process takes is known or not.\\nDefault options are: `\\\"determinate\\\"` (no animation), `\\\"indeterminate\\\"` (animate from left to right).\"\n },\n \"attribute\": \"type\",\n \"reflect\": false,\n \"defaultValue\": \"'determinate'\"\n },\n \"reversed\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If true, reverse the progress bar direction.\"\n },\n \"attribute\": \"reversed\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"value\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The value determines how much of the active bar should display when the\\n`type` is `\\\"determinate\\\"`.\\nThe value should be between [0, 1].\"\n },\n \"attribute\": \"value\",\n \"reflect\": false,\n \"defaultValue\": \"0\"\n },\n \"buffer\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If the buffer and value are smaller than 1, the buffer circles will show.\\nThe buffer should be between [0, 1].\"\n },\n \"attribute\": \"buffer\",\n \"reflect\": false,\n \"defaultValue\": \"1\"\n },\n \"color\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"Color\",\n \"resolved\": \"\\\"danger\\\" | \\\"dark\\\" | \\\"light\\\" | \\\"medium\\\" | \\\"primary\\\" | \\\"secondary\\\" | \\\"success\\\" | \\\"tertiary\\\" | \\\"warning\\\" | string & Record<never, never> | undefined\",\n \"references\": {\n \"Color\": {\n \"location\": \"import\",\n \"path\": \"../../interface\",\n \"id\": \"src/interface.d.ts::Color\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The color to use from your application's color palette.\\nDefault options are: `\\\"primary\\\"`, `\\\"secondary\\\"`, `\\\"tertiary\\\"`, `\\\"success\\\"`, `\\\"warning\\\"`, `\\\"danger\\\"`, `\\\"light\\\"`, `\\\"medium\\\"`, and `\\\"dark\\\"`.\\nFor more information on colors, see [theming](/docs/theming/basics).\"\n },\n \"attribute\": \"color\",\n \"reflect\": true\n }\n };\n }\n}\nconst renderIndeterminate = () => {\n return (h(\"div\", { part: \"track\", class: \"progress-buffer-bar\" }, h(\"div\", { class: \"indeterminate-bar-primary\" }, h(\"span\", { part: \"progress\", class: \"progress-indeterminate\" })), h(\"div\", { class: \"indeterminate-bar-secondary\" }, h(\"span\", { part: \"progress\", class: \"progress-indeterminate\" }))));\n};\nconst renderProgress = (value, buffer) => {\n const finalValue = clamp(0, value, 1);\n const finalBuffer = clamp(0, buffer, 1);\n return [\n h(\"div\", { part: \"progress\", class: \"progress\", style: { transform: `scaleX(${finalValue})` } }),\n /**\n * Buffer circles with two container to move\n * the circles behind the buffer progress\n * with respecting the animation.\n * When finalBuffer === 1, we use display: none\n * instead of removing the element to avoid flickering.\n */\n h(\"div\", { class: { 'buffer-circles-container': true, 'ion-hide': finalBuffer === 1 }, style: { transform: `translateX(${finalBuffer * 100}%)` } }, h(\"div\", { class: \"buffer-circles-container\", style: { transform: `translateX(-${finalBuffer * 100}%)` } }, h(\"div\", { part: \"stream\", class: \"buffer-circles\" }))),\n h(\"div\", { part: \"track\", class: \"progress-buffer-bar\", style: { transform: `scaleX(${finalBuffer})` } }),\n ];\n};\n","/**\n * Convert a font size to a dynamic font size.\n * Fonts that participate in Dynamic Type should use\n * dynamic font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param unit (optional) - The unit to convert to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a maximum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a minimum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * maximum and minimum font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * A heuristic that applies CSS to tablet\n * viewports.\n *\n * Usage:\n * @include tablet-viewport() {\n * :host {\n * background-color: green;\n * }\n * }\n */\n/**\n * A heuristic that applies CSS to mobile\n * viewports (i.e. phones, not tablets).\n *\n * Usage:\n * @include mobile-viewport() {\n * :host {\n * background-color: blue;\n * }\n * }\n */\n:host {\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n position: absolute;\n contain: strict;\n pointer-events: none;\n}\n\n:host(.unbounded) {\n contain: layout size style;\n}\n\n.ripple-effect {\n border-radius: 50%;\n position: absolute;\n background-color: currentColor;\n color: inherit;\n contain: strict;\n opacity: 0;\n animation: 225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;\n will-change: transform, opacity;\n pointer-events: none;\n}\n\n.fade-out {\n transform: translate(var(--translate-end)) scale(var(--final-scale, 1));\n animation: 150ms fadeOutAnimation forwards;\n}\n\n@keyframes rippleAnimation {\n from {\n animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transform: scale(1);\n }\n to {\n transform: translate(var(--translate-end)) scale(var(--final-scale, 1));\n }\n}\n@keyframes fadeInAnimation {\n from {\n animation-timing-function: linear;\n opacity: 0;\n }\n to {\n opacity: 0.16;\n }\n}\n@keyframes fadeOutAnimation {\n from {\n animation-timing-function: linear;\n opacity: 0.16;\n }\n to {\n opacity: 0;\n }\n}","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { Host, h, readTask, writeTask } from \"@stencil/core\";\nimport { getIonMode } from \"../../global/ionic-global\";\nexport class RippleEffect {\n constructor() {\n this.type = 'bounded';\n }\n /**\n * Adds the ripple effect to the parent element.\n *\n * @param x The horizontal coordinate of where the ripple should start.\n * @param y The vertical coordinate of where the ripple should start.\n */\n async addRipple(x, y) {\n return new Promise((resolve) => {\n readTask(() => {\n const rect = this.el.getBoundingClientRect();\n const width = rect.width;\n const height = rect.height;\n const hypotenuse = Math.sqrt(width * width + height * height);\n const maxDim = Math.max(height, width);\n const maxRadius = this.unbounded ? maxDim : hypotenuse + PADDING;\n const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);\n const finalScale = maxRadius / initialSize;\n let posX = x - rect.left;\n let posY = y - rect.top;\n if (this.unbounded) {\n posX = width * 0.5;\n posY = height * 0.5;\n }\n const styleX = posX - initialSize * 0.5;\n const styleY = posY - initialSize * 0.5;\n const moveX = width * 0.5 - posX;\n const moveY = height * 0.5 - posY;\n writeTask(() => {\n const div = document.createElement('div');\n div.classList.add('ripple-effect');\n const style = div.style;\n style.top = styleY + 'px';\n style.left = styleX + 'px';\n style.width = style.height = initialSize + 'px';\n style.setProperty('--final-scale', `${finalScale}`);\n style.setProperty('--translate-end', `${moveX}px, ${moveY}px`);\n const container = this.el.shadowRoot || this.el;\n container.appendChild(div);\n setTimeout(() => {\n resolve(() => {\n removeRipple(div);\n });\n }, 225 + 100);\n });\n });\n });\n }\n get unbounded() {\n return this.type === 'unbounded';\n }\n render() {\n const mode = getIonMode(this);\n return (h(Host, { key: 'f1129019a6d556b008c754aeb79618c69baea9f8', role: \"presentation\", class: {\n [mode]: true,\n unbounded: this.unbounded,\n } }));\n }\n static get is() { return \"ion-ripple-effect\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ripple-effect.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ripple-effect.css\"]\n };\n }\n static get properties() {\n return {\n \"type\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"'bounded' | 'unbounded'\",\n \"resolved\": \"\\\"bounded\\\" | \\\"unbounded\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the type of ripple-effect:\\n\\n- `bounded`: the ripple effect expands from the user's click position\\n- `unbounded`: the ripple effect expands from the center of the button and overflows the container.\\n\\nNOTE: Surfaces for bounded ripples should have the overflow property set to hidden,\\nwhile surfaces for unbounded ripples should have it set to visible.\"\n },\n \"attribute\": \"type\",\n \"reflect\": false,\n \"defaultValue\": \"'bounded'\"\n }\n };\n }\n static get methods() {\n return {\n \"addRipple\": {\n \"complexType\": {\n \"signature\": \"(x: number, y: number) => Promise<() => void>\",\n \"parameters\": [{\n \"name\": \"x\",\n \"type\": \"number\",\n \"docs\": \"The horizontal coordinate of where the ripple should start.\"\n }, {\n \"name\": \"y\",\n \"type\": \"number\",\n \"docs\": \"The vertical coordinate of where the ripple should start.\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<() => void>\"\n },\n \"docs\": {\n \"text\": \"Adds the ripple effect to the parent element.\",\n \"tags\": [{\n \"name\": \"param\",\n \"text\": \"x The horizontal coordinate of where the ripple should start.\"\n }, {\n \"name\": \"param\",\n \"text\": \"y The vertical coordinate of where the ripple should start.\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n}\nconst removeRipple = (ripple) => {\n ripple.classList.add('fade-out');\n setTimeout(() => {\n ripple.remove();\n }, 200);\n};\nconst PADDING = 10;\nconst INITIAL_ORIGIN_SCALE = 0.5;\n","/**\n * Convert a font size to a dynamic font size.\n * Fonts that participate in Dynamic Type should use\n * dynamic font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param unit (optional) - The unit to convert to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a maximum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a minimum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * maximum and minimum font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * A heuristic that applies CSS to tablet\n * viewports.\n *\n * Usage:\n * @include tablet-viewport() {\n * :host {\n * background-color: green;\n * }\n * }\n */\n/**\n * A heuristic that applies CSS to mobile\n * viewports (i.e. phones, not tablets).\n *\n * Usage:\n * @include mobile-viewport() {\n * :host {\n * background-color: blue;\n * }\n * }\n */\n:host {\n /**\n * @prop --background: Background of the skeleton text\n * @prop --background-rgb: Background of the skeleton text in rgb format\n *\n * @prop --border-radius: Border radius of the skeleton text\n */\n --background: rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065);\n border-radius: var(--border-radius, inherit);\n display: block;\n width: 100%;\n height: inherit;\n margin-top: 4px;\n margin-bottom: 4px;\n background: var(--background);\n line-height: 10px;\n user-select: none;\n pointer-events: none;\n}\n\nspan {\n display: inline-block;\n}\n\n:host(.in-media) {\n margin-left: 0;\n margin-right: 0;\n margin-top: 0;\n margin-bottom: 0;\n height: 100%;\n}\n\n:host(.skeleton-text-animated) {\n position: relative;\n background: linear-gradient(to right, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 8%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.135) 18%, rgba(var(--background-rgb, var(--ion-text-color-rgb, 0, 0, 0)), 0.065) 33%);\n background-size: 800px 104px;\n animation-duration: 1s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: shimmer;\n animation-timing-function: linear;\n}\n\n/* stylelint-disable property-disallowed-list */\n@keyframes shimmer {\n 0% {\n background-position: -400px 0;\n }\n 100% {\n background-position: 400px 0;\n }\n}\n/* stylelint-enable property-disallowed-list */","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { Host, h } from \"@stencil/core\";\nimport { hostContext } from \"../../utils/theme\";\nimport { config } from \"../../global/config\";\nimport { getIonMode } from \"../../global/ionic-global\";\nexport class SkeletonText {\n constructor() {\n this.animated = false;\n }\n componentWillLoad() {\n this.emitStyle();\n }\n emitStyle() {\n // The emitted property is used by item in order\n // to add the item-skeleton-text class which applies\n // overflow: hidden to its label\n const style = {\n 'skeleton-text': true,\n };\n this.ionStyle.emit(style);\n }\n render() {\n const animated = this.animated && config.getBoolean('animated', true);\n const inMedia = hostContext('ion-avatar', this.el) || hostContext('ion-thumbnail', this.el);\n const mode = getIonMode(this);\n return (h(Host, { key: '4dab0fd2de666de12ad8f6dc6ed1e1de0be67ddd', class: {\n [mode]: true,\n 'skeleton-text-animated': animated,\n 'in-media': inMedia,\n } }, h(\"span\", { key: 'f8f908ec24d65e63b14d9a54640a5f18f0fa8fa5' }, \"\\u00A0\")));\n }\n static get is() { return \"ion-skeleton-text\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"skeleton-text.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"skeleton-text.css\"]\n };\n }\n static get properties() {\n return {\n \"animated\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the skeleton text will animate.\"\n },\n \"attribute\": \"animated\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"ionStyle\",\n \"name\": \"ionStyle\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": undefined\n }],\n \"text\": \"Emitted when the styles change.\"\n },\n \"complexType\": {\n \"original\": \"StyleEventDetail\",\n \"resolved\": \"StyleEventDetail\",\n \"references\": {\n \"StyleEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../interface\",\n \"id\": \"src/interface.d.ts::StyleEventDetail\"\n }\n }\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n}\n","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { win } from \"../../../utils/browser/index\";\nimport { printIonWarning } from \"../../../utils/logging/index\";\n/**\n * Calculate the CSS top and bottom position of the toast, to be used\n * as starting points for the animation keyframes.\n *\n * The default animations for both MD and iOS\n * use translateY, which calculates from the\n * top edge of the screen. This behavior impacts\n * how we compute the offset when a toast has\n * position='bottom' since we need to calculate from\n * the bottom edge of the screen instead.\n *\n * @param position The value of the toast's position prop.\n * @param positionAnchor The element the toast should be anchored to,\n * if applicable.\n * @param mode The toast component's mode (md, ios, etc).\n * @param toast A reference to the toast element itself.\n */\nexport function getAnimationPosition(position, positionAnchor, mode, toast) {\n /**\n * Start with a predefined offset from the edge the toast will be\n * positioned relative to, whether on the screen or anchor element.\n */\n let offset;\n if (mode === 'md') {\n offset = position === 'top' ? 8 : -8;\n }\n else {\n offset = position === 'top' ? 10 : -10;\n }\n /**\n * If positionAnchor is defined, add in the distance from the target\n * screen edge to the target anchor edge. For position=\"top\", the\n * bottom anchor edge is targeted. For position=\"bottom\", the top\n * anchor edge is targeted.\n */\n if (positionAnchor && win) {\n warnIfAnchorIsHidden(positionAnchor, toast);\n const box = positionAnchor.getBoundingClientRect();\n if (position === 'top') {\n offset += box.bottom;\n }\n else if (position === 'bottom') {\n /**\n * Just box.top is the distance from the top edge of the screen\n * to the top edge of the anchor. We want to calculate from the\n * bottom edge of the screen instead.\n */\n offset -= win.innerHeight - box.top;\n }\n /**\n * We don't include safe area here because that should already be\n * accounted for when checking the position of the anchor.\n */\n return {\n top: `${offset}px`,\n bottom: `${offset}px`,\n };\n }\n else {\n return {\n top: `calc(${offset}px + var(--ion-safe-area-top, 0px))`,\n bottom: `calc(${offset}px - var(--ion-safe-area-bottom, 0px))`,\n };\n }\n}\n/**\n * If the anchor element is hidden, getBoundingClientRect()\n * will return all 0s for it, which can cause unexpected\n * results in the position calculation when animating.\n */\nfunction warnIfAnchorIsHidden(positionAnchor, toast) {\n if (positionAnchor.offsetParent === null) {\n printIonWarning('The positionAnchor element for ion-toast was found in the DOM, but appears to be hidden. This may lead to unexpected positioning of the toast.', toast);\n }\n}\n/**\n * Returns the top offset required to place\n * the toast in the middle of the screen.\n * Only needed when position=\"toast\".\n * @param toastHeight - The height of the ion-toast element\n * @param wrapperHeight - The height of the .toast-wrapper element\n * inside the toast's shadow root.\n */\nexport const getOffsetForMiddlePosition = (toastHeight, wrapperHeight) => {\n return Math.floor(toastHeight / 2 - wrapperHeight / 2);\n};\n","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { createAnimation } from \"../../../utils/animation/animation\";\nimport { getElementRoot } from \"../../../utils/helpers\";\nimport { getOffsetForMiddlePosition } from \"./utils\";\n/**\n * iOS Toast Enter Animation\n */\nexport const iosEnterAnimation = (baseEl, opts) => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const { position, top, bottom } = opts;\n const root = getElementRoot(baseEl);\n const wrapperEl = root.querySelector('.toast-wrapper');\n wrapperAnimation.addElement(wrapperEl);\n switch (position) {\n case 'top':\n wrapperAnimation.fromTo('transform', 'translateY(-100%)', `translateY(${top})`);\n break;\n case 'middle':\n const topPosition = getOffsetForMiddlePosition(baseEl.clientHeight, wrapperEl.clientHeight);\n wrapperEl.style.top = `${topPosition}px`;\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n default:\n wrapperAnimation.fromTo('transform', 'translateY(100%)', `translateY(${bottom})`);\n break;\n }\n return baseAnimation.easing('cubic-bezier(.155,1.105,.295,1.12)').duration(400).addAnimation(wrapperAnimation);\n};\n","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { createAnimation } from \"../../../utils/animation/animation\";\nimport { getElementRoot } from \"../../../utils/helpers\";\n/**\n * iOS Toast Leave Animation\n */\nexport const iosLeaveAnimation = (baseEl, opts) => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const { position, top, bottom } = opts;\n const root = getElementRoot(baseEl);\n const wrapperEl = root.querySelector('.toast-wrapper');\n wrapperAnimation.addElement(wrapperEl);\n switch (position) {\n case 'top':\n wrapperAnimation.fromTo('transform', `translateY(${top})`, 'translateY(-100%)');\n break;\n case 'middle':\n wrapperAnimation.fromTo('opacity', 0.99, 0);\n break;\n default:\n wrapperAnimation.fromTo('transform', `translateY(${bottom})`, 'translateY(100%)');\n break;\n }\n return baseAnimation.easing('cubic-bezier(.36,.66,.04,1)').duration(300).addAnimation(wrapperAnimation);\n};\n","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { createAnimation } from \"../../../utils/animation/animation\";\nimport { getElementRoot } from \"../../../utils/helpers\";\nimport { getOffsetForMiddlePosition } from \"./utils\";\n/**\n * MD Toast Enter Animation\n */\nexport const mdEnterAnimation = (baseEl, opts) => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const { position, top, bottom } = opts;\n const root = getElementRoot(baseEl);\n const wrapperEl = root.querySelector('.toast-wrapper');\n wrapperAnimation.addElement(wrapperEl);\n switch (position) {\n case 'top':\n wrapperEl.style.setProperty('transform', `translateY(${top})`);\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n case 'middle':\n const topPosition = getOffsetForMiddlePosition(baseEl.clientHeight, wrapperEl.clientHeight);\n wrapperEl.style.top = `${topPosition}px`;\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n default:\n wrapperEl.style.setProperty('transform', `translateY(${bottom})`);\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n }\n return baseAnimation.easing('cubic-bezier(.36,.66,.04,1)').duration(400).addAnimation(wrapperAnimation);\n};\n","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { createAnimation } from \"../../../utils/animation/animation\";\nimport { getElementRoot } from \"../../../utils/helpers\";\n/**\n * md Toast Leave Animation\n */\nexport const mdLeaveAnimation = (baseEl) => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const root = getElementRoot(baseEl);\n const wrapperEl = root.querySelector('.toast-wrapper');\n wrapperAnimation.addElement(wrapperEl).fromTo('opacity', 0.99, 0);\n return baseAnimation.easing('cubic-bezier(.36,.66,.04,1)').duration(300).addAnimation(wrapperAnimation);\n};\n","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { Build } from \"@stencil/core\";\nimport { createAnimation } from \"../../../utils/animation/animation\";\nimport { createGesture } from \"../../../utils/gesture/index\";\nimport { getElementRoot } from \"../../../utils/helpers\";\nimport { OVERLAY_GESTURE_PRIORITY } from \"../../../utils/overlays\";\nimport { getOffsetForMiddlePosition } from \"../animations/utils\";\n/**\n * Create a gesture that allows the Toast\n * to be swiped to dismiss.\n * @param el - The Toast element\n * @param toastPosition - The last computed position of the Toast. This is computed in the \"present\" method.\n * @param onDismiss - A callback to fire when the Toast was swiped to dismiss.\n */\nexport const createSwipeToDismissGesture = (el, toastPosition, onDismiss) => {\n /**\n * Users should swipe on the visible toast wrapper\n * rather than on ion-toast which covers the entire screen.\n * When testing the class instance the inner wrapper will not\n * be defined. As a result, we use a placeholder element in those environments.\n */\n const wrapperEl = Build.isTesting\n ? document.createElement('div')\n : getElementRoot(el).querySelector('.toast-wrapper');\n const hostElHeight = el.clientHeight;\n const wrapperElBox = wrapperEl.getBoundingClientRect();\n /**\n * The maximum amount that\n * the toast can be swiped. This should\n * account for the wrapper element's height\n * too so the toast can be swiped offscreen\n * completely.\n */\n let MAX_SWIPE_DISTANCE = 0;\n /**\n * The step value at which a toast\n * is eligible for dismissing via gesture.\n */\n const DISMISS_THRESHOLD = 0.5;\n /**\n * The middle position Toast starts 50% of the way\n * through the animation, so we need to use this\n * as the starting point for our step values.\n */\n const STEP_OFFSET = el.position === 'middle' ? 0.5 : 0;\n /**\n * When the Toast is at the top users will be\n * swiping up. As a result, the delta values will be\n * negative numbers which will result in negative steps\n * and thresholds. As a result, we need to make those numbers\n * positive.\n */\n const INVERSION_FACTOR = el.position === 'top' ? -1 : 1;\n /**\n * The top offset that places the\n * toast in the middle of the screen.\n * Only needed when position=\"middle\".\n */\n const topPosition = getOffsetForMiddlePosition(hostElHeight, wrapperElBox.height);\n const SWIPE_UP_DOWN_KEYFRAMES = [\n { offset: 0, transform: `translateY(-${topPosition + wrapperElBox.height}px)` },\n { offset: 0.5, transform: `translateY(0px)` },\n { offset: 1, transform: `translateY(${topPosition + wrapperElBox.height}px)` },\n ];\n const swipeAnimation = createAnimation('toast-swipe-to-dismiss-animation')\n .addElement(wrapperEl)\n /**\n * The specific value here does not actually\n * matter. We just need this to be a positive\n * value so the animation does not jump\n * to the end when the user beings to drag.\n */\n .duration(100);\n switch (el.position) {\n case 'middle':\n MAX_SWIPE_DISTANCE = hostElHeight + wrapperElBox.height;\n swipeAnimation.keyframes(SWIPE_UP_DOWN_KEYFRAMES);\n /**\n * Toast can be swiped up or down but\n * should start in the middle of the screen.\n */\n swipeAnimation.progressStart(true, 0.5);\n break;\n case 'top':\n /**\n * The bottom edge of the wrapper\n * includes the distance between the top\n * of the screen and the top of the wrapper\n * as well as the wrapper height so the wrapper\n * can be dragged fully offscreen.\n */\n MAX_SWIPE_DISTANCE = wrapperElBox.bottom;\n swipeAnimation.keyframes([\n { offset: 0, transform: `translateY(${toastPosition.top})` },\n { offset: 1, transform: 'translateY(-100%)' },\n ]);\n swipeAnimation.progressStart(true, 0);\n break;\n case 'bottom':\n default:\n /**\n * This computes the distance between the\n * top of the wrapper and the bottom of the\n * screen including the height of the wrapper\n * element so it can be dragged fully offscreen.\n */\n MAX_SWIPE_DISTANCE = hostElHeight - wrapperElBox.top;\n swipeAnimation.keyframes([\n { offset: 0, transform: `translateY(${toastPosition.bottom})` },\n { offset: 1, transform: 'translateY(100%)' },\n ]);\n swipeAnimation.progressStart(true, 0);\n break;\n }\n const computeStep = (delta) => {\n return (delta * INVERSION_FACTOR) / MAX_SWIPE_DISTANCE;\n };\n const onMove = (detail) => {\n const step = STEP_OFFSET + computeStep(detail.deltaY);\n swipeAnimation.progressStep(step);\n };\n const onEnd = (detail) => {\n const velocity = detail.velocityY;\n const threshold = ((detail.deltaY + velocity * 1000) / MAX_SWIPE_DISTANCE) * INVERSION_FACTOR;\n /**\n * Disable the gesture for the remainder of the animation.\n * It will be re-enabled if the toast animates back to\n * its initial presented position.\n */\n gesture.enable(false);\n let shouldDismiss = true;\n let playTo = 1;\n let step = 0;\n let remainingDistance = 0;\n if (el.position === 'middle') {\n /**\n * A middle positioned Toast appears\n * in the middle of the screen (at animation offset 0.5).\n * As a result, the threshold will be calculated relative\n * to this starting position. In other words at animation offset 0.5\n * the threshold will be 0. We want the middle Toast to be eligible\n * for dismiss when the user has swiped either half way up or down the\n * screen. As a result, we divide DISMISS_THRESHOLD in half. We also\n * consider when the threshold is a negative in the event the\n * user drags up (since the deltaY will also be negative).\n */\n shouldDismiss = threshold >= DISMISS_THRESHOLD / 2 || threshold <= -DISMISS_THRESHOLD / 2;\n /**\n * Since we are replacing the keyframes\n * below the animation always starts from\n * the beginning of the new keyframes.\n * Similarly, we are always playing to\n * the end of the new keyframes.\n */\n playTo = 1;\n step = 0;\n /**\n * The Toast should animate from wherever its\n * current position is to the desired end state.\n *\n * To begin, we get the current position of the\n * Toast for its starting state.\n */\n const wrapperElBox = wrapperEl.getBoundingClientRect();\n const startOffset = wrapperElBox.top - topPosition;\n const startPosition = `${startOffset}px`;\n /**\n * If the deltaY is negative then the user is swiping\n * up, so the Toast should animate to the top of the screen.\n * If the deltaY is positive then the user is swiping\n * down, so the Toast should animate to the bottom of the screen.\n * We also account for when the deltaY is 0, but realistically\n * that should never happen because it means the user did not drag\n * the toast.\n */\n const offsetFactor = detail.deltaY <= 0 ? -1 : 1;\n const endOffset = (topPosition + wrapperElBox.height) * offsetFactor;\n /**\n * If the Toast should dismiss\n * then we need to figure out which edge of\n * the screen it should animate towards.\n * By default, the Toast will come\n * back to its default state in the\n * middle of the screen.\n */\n const endPosition = shouldDismiss ? `${endOffset}px` : '0px';\n const KEYFRAMES = [\n { offset: 0, transform: `translateY(${startPosition})` },\n { offset: 1, transform: `translateY(${endPosition})` },\n ];\n swipeAnimation.keyframes(KEYFRAMES);\n /**\n * Compute the remaining amount of pixels the\n * toast needs to move to be fully dismissed.\n */\n remainingDistance = endOffset - startOffset;\n }\n else {\n shouldDismiss = threshold >= DISMISS_THRESHOLD;\n playTo = shouldDismiss ? 1 : 0;\n step = computeStep(detail.deltaY);\n /**\n * Compute the remaining amount of pixels the\n * toast needs to move to be fully dismissed.\n */\n const remainingStepAmount = shouldDismiss ? 1 - step : step;\n remainingDistance = remainingStepAmount * MAX_SWIPE_DISTANCE;\n }\n /**\n * The animation speed should depend on how quickly\n * the user flicks the toast across the screen. However,\n * it should be no slower than 200ms.\n * We use Math.abs on the remainingDistance because that value\n * can be negative when swiping up on a middle position toast.\n */\n const duration = Math.min(Math.abs(remainingDistance) / Math.abs(velocity), 200);\n swipeAnimation\n .onFinish(() => {\n if (shouldDismiss) {\n onDismiss();\n swipeAnimation.destroy();\n }\n else {\n if (el.position === 'middle') {\n /**\n * If the toast snapped back to\n * the middle of the screen we need\n * to reset the keyframes\n * so the toast can be swiped\n * up or down again.\n */\n swipeAnimation.keyframes(SWIPE_UP_DOWN_KEYFRAMES).progressStart(true, 0.5);\n }\n else {\n swipeAnimation.progressStart(true, 0);\n }\n /**\n * If the toast did not dismiss then\n * the user should be able to swipe again.\n */\n gesture.enable(true);\n }\n /**\n * This must be a one time callback\n * otherwise a new callback will\n * be added every time onEnd runs.\n */\n }, { oneTimeCallback: true })\n .progressEnd(playTo, step, duration);\n };\n const gesture = createGesture({\n el: wrapperEl,\n gestureName: 'toast-swipe-to-dismiss',\n gesturePriority: OVERLAY_GESTURE_PRIORITY,\n /**\n * Toast only supports vertical swipes.\n * This needs to be updated if we later\n * support horizontal swipes.\n */\n direction: 'y',\n onMove,\n onEnd,\n });\n return gesture;\n};\n","/**\n * Convert a font size to a dynamic font size.\n * Fonts that participate in Dynamic Type should use\n * dynamic font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param unit (optional) - The unit to convert to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a maximum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a minimum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * maximum and minimum font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * A heuristic that applies CSS to tablet\n * viewports.\n *\n * Usage:\n * @include tablet-viewport() {\n * :host {\n * background-color: green;\n * }\n * }\n */\n/**\n * A heuristic that applies CSS to mobile\n * viewports (i.e. phones, not tablets).\n *\n * Usage:\n * @include mobile-viewport() {\n * :host {\n * background-color: blue;\n * }\n * }\n */\n:host {\n /**\n * @prop --background: Background of the toast\n * @prop --color: Color of the toast text\n *\n * @prop --border-color: Border color of the toast\n * @prop --border-radius: Border radius of the toast\n * @prop --border-width: Border width of the toast\n * @prop --border-style: Border style of the toast\n *\n * @prop --white-space: White space of the toast message\n *\n * @prop --box-shadow: Box shadow of the toast\n *\n * @prop --min-width: Minimum width of the toast\n * @prop --width: Width of the toast\n * @prop --max-width: Maximum width of the toast\n *\n * @prop --min-height: Minimum height of the toast\n * @prop --height: Height of the toast\n * @prop --max-height: Maximum height of the toast\n *\n * @prop --button-color: Color of the button text\n *\n * @prop --start: Position from the left if direction is left-to-right, and from the right if direction is right-to-left\n * @prop --end: Position from the right if direction is left-to-right, and from the left if direction is right-to-left\n */\n --border-width: 0;\n --border-style: none;\n --border-color: initial;\n --box-shadow: none;\n --min-width: auto;\n --width: auto;\n --min-height: auto;\n --height: auto;\n --max-height: auto;\n --white-space: normal;\n top: 0;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n outline: none;\n color: var(--color);\n font-family: var(--ion-font-family, inherit);\n contain: strict;\n z-index: 1001;\n pointer-events: none;\n}\n@supports (inset-inline-start: 0) {\n :host {\n inset-inline-start: 0;\n }\n}\n@supports not (inset-inline-start: 0) {\n :host {\n left: 0;\n }\n :host-context([dir=rtl]) {\n left: unset;\n right: unset;\n right: 0;\n }\n @supports selector(:dir(rtl)) {\n :host(:dir(rtl)) {\n left: unset;\n right: unset;\n right: 0;\n }\n }\n}\n\n:host(.overlay-hidden) {\n display: none;\n}\n\n:host(.ion-color) {\n --button-color: inherit;\n color: var(--ion-color-contrast);\n}\n\n:host(.ion-color) .toast-button-cancel {\n color: inherit;\n}\n\n:host(.ion-color) .toast-wrapper {\n background: var(--ion-color-base);\n}\n\n.toast-wrapper {\n border-radius: var(--border-radius);\n width: var(--width);\n min-width: var(--min-width);\n max-width: var(--max-width);\n height: var(--height);\n min-height: var(--min-height);\n max-height: var(--max-height);\n border-width: var(--border-width);\n border-style: var(--border-style);\n border-color: var(--border-color);\n background: var(--background);\n box-shadow: var(--box-shadow);\n}\n@supports (inset-inline-start: 0) {\n .toast-wrapper {\n inset-inline-start: var(--start);\n inset-inline-end: var(--end);\n }\n}\n@supports not (inset-inline-start: 0) {\n .toast-wrapper {\n left: var(--start);\n right: var(--end);\n }\n :host-context([dir=rtl]) .toast-wrapper {\n left: unset;\n right: unset;\n left: var(--end);\n right: var(--start);\n }\n [dir=rtl] .toast-wrapper {\n left: unset;\n right: unset;\n left: var(--end);\n right: var(--start);\n }\n @supports selector(:dir(rtl)) {\n .toast-wrapper:dir(rtl) {\n left: unset;\n right: unset;\n left: var(--end);\n right: var(--start);\n }\n }\n}\n\n.toast-wrapper.toast-top {\n transform: translate3d(0, -100%, 0);\n top: 0;\n}\n\n.toast-wrapper.toast-bottom {\n transform: translate3d(0, 100%, 0);\n bottom: 0;\n}\n\n.toast-container {\n display: flex;\n align-items: center;\n pointer-events: auto;\n height: inherit;\n min-height: inherit;\n max-height: inherit;\n contain: content;\n}\n\n.toast-layout-stacked .toast-container {\n flex-wrap: wrap;\n}\n\n.toast-layout-baseline .toast-content {\n display: flex;\n flex: 1;\n flex-direction: column;\n justify-content: center;\n}\n\n.toast-icon {\n -webkit-margin-start: 16px;\n margin-inline-start: 16px;\n}\n\n.toast-content {\n min-width: 0;\n}\n\n.toast-message {\n flex: 1;\n white-space: var(--white-space);\n}\n\n.toast-button-group {\n display: flex;\n}\n\n.toast-layout-stacked .toast-button-group {\n justify-content: end;\n width: 100%;\n}\n\n.toast-button {\n border: 0;\n outline: none;\n color: var(--button-color);\n z-index: 0;\n}\n\n.toast-icon,\n.toast-button-icon {\n font-size: 1.4em;\n}\n\n.toast-button-inner {\n display: flex;\n align-items: center;\n}\n\n@media (any-hover: hover) {\n .toast-button:hover {\n cursor: pointer;\n }\n}\n/**\n * Convert a font size to a dynamic font size.\n * Fonts that participate in Dynamic Type should use\n * dynamic font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param unit (optional) - The unit to convert to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a maximum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a minimum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * maximum and minimum font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * A heuristic that applies CSS to tablet\n * viewports.\n *\n * Usage:\n * @include tablet-viewport() {\n * :host {\n * background-color: green;\n * }\n * }\n */\n/**\n * A heuristic that applies CSS to mobile\n * viewports (i.e. phones, not tablets).\n *\n * Usage:\n * @include mobile-viewport() {\n * :host {\n * background-color: blue;\n * }\n * }\n */\n:host {\n --background: var(--ion-color-step-50, #f2f2f2);\n --border-radius: 14px;\n --button-color: var(--ion-color-primary, #3880ff);\n --color: var(--ion-color-step-850, #262626);\n --max-width: 700px;\n --max-height: 478px;\n --start: 10px;\n --end: 10px;\n font-size: clamp(14px, 0.875rem, 43.4px);\n}\n\n.toast-wrapper {\n -webkit-margin-start: auto;\n margin-inline-start: auto;\n -webkit-margin-end: auto;\n margin-inline-end: auto;\n margin-top: auto;\n margin-bottom: auto;\n display: block;\n position: absolute;\n z-index: 10;\n}\n\n@supports (backdrop-filter: blur(0)) {\n :host(.toast-translucent) .toast-wrapper {\n background: rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);\n backdrop-filter: saturate(180%) blur(20px);\n }\n :host(.ion-color.toast-translucent) .toast-wrapper {\n background: rgba(var(--ion-color-base-rgb), 0.8);\n }\n}\n.toast-wrapper.toast-middle {\n opacity: 0.01;\n}\n\n.toast-content {\n -webkit-padding-start: 15px;\n padding-inline-start: 15px;\n -webkit-padding-end: 15px;\n padding-inline-end: 15px;\n padding-top: 15px;\n padding-bottom: 15px;\n}\n\n.toast-header {\n margin-bottom: 2px;\n font-weight: 500;\n}\n\n.toast-button {\n -webkit-padding-start: 15px;\n padding-inline-start: 15px;\n -webkit-padding-end: 15px;\n padding-inline-end: 15px;\n padding-top: 10px;\n padding-bottom: 10px;\n min-height: 44px;\n transition: background-color, opacity 100ms linear;\n border: 0;\n background-color: transparent;\n font-family: var(--ion-font-family);\n font-size: clamp(17px, 1.0625rem, 21.998px);\n font-weight: 500;\n overflow: hidden;\n}\n\n.toast-button.ion-activated {\n opacity: 0.4;\n}\n\n@media (any-hover: hover) {\n .toast-button:hover {\n opacity: 0.6;\n }\n}","/**\n * Convert a font size to a dynamic font size.\n * Fonts that participate in Dynamic Type should use\n * dynamic font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param unit (optional) - The unit to convert to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a maximum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a minimum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * maximum and minimum font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * A heuristic that applies CSS to tablet\n * viewports.\n *\n * Usage:\n * @include tablet-viewport() {\n * :host {\n * background-color: green;\n * }\n * }\n */\n/**\n * A heuristic that applies CSS to mobile\n * viewports (i.e. phones, not tablets).\n *\n * Usage:\n * @include mobile-viewport() {\n * :host {\n * background-color: blue;\n * }\n * }\n */\n:host {\n /**\n * @prop --background: Background of the toast\n * @prop --color: Color of the toast text\n *\n * @prop --border-color: Border color of the toast\n * @prop --border-radius: Border radius of the toast\n * @prop --border-width: Border width of the toast\n * @prop --border-style: Border style of the toast\n *\n * @prop --white-space: White space of the toast message\n *\n * @prop --box-shadow: Box shadow of the toast\n *\n * @prop --min-width: Minimum width of the toast\n * @prop --width: Width of the toast\n * @prop --max-width: Maximum width of the toast\n *\n * @prop --min-height: Minimum height of the toast\n * @prop --height: Height of the toast\n * @prop --max-height: Maximum height of the toast\n *\n * @prop --button-color: Color of the button text\n *\n * @prop --start: Position from the left if direction is left-to-right, and from the right if direction is right-to-left\n * @prop --end: Position from the right if direction is left-to-right, and from the left if direction is right-to-left\n */\n --border-width: 0;\n --border-style: none;\n --border-color: initial;\n --box-shadow: none;\n --min-width: auto;\n --width: auto;\n --min-height: auto;\n --height: auto;\n --max-height: auto;\n --white-space: normal;\n top: 0;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n outline: none;\n color: var(--color);\n font-family: var(--ion-font-family, inherit);\n contain: strict;\n z-index: 1001;\n pointer-events: none;\n}\n@supports (inset-inline-start: 0) {\n :host {\n inset-inline-start: 0;\n }\n}\n@supports not (inset-inline-start: 0) {\n :host {\n left: 0;\n }\n :host-context([dir=rtl]) {\n left: unset;\n right: unset;\n right: 0;\n }\n @supports selector(:dir(rtl)) {\n :host(:dir(rtl)) {\n left: unset;\n right: unset;\n right: 0;\n }\n }\n}\n\n:host(.overlay-hidden) {\n display: none;\n}\n\n:host(.ion-color) {\n --button-color: inherit;\n color: var(--ion-color-contrast);\n}\n\n:host(.ion-color) .toast-button-cancel {\n color: inherit;\n}\n\n:host(.ion-color) .toast-wrapper {\n background: var(--ion-color-base);\n}\n\n.toast-wrapper {\n border-radius: var(--border-radius);\n width: var(--width);\n min-width: var(--min-width);\n max-width: var(--max-width);\n height: var(--height);\n min-height: var(--min-height);\n max-height: var(--max-height);\n border-width: var(--border-width);\n border-style: var(--border-style);\n border-color: var(--border-color);\n background: var(--background);\n box-shadow: var(--box-shadow);\n}\n@supports (inset-inline-start: 0) {\n .toast-wrapper {\n inset-inline-start: var(--start);\n inset-inline-end: var(--end);\n }\n}\n@supports not (inset-inline-start: 0) {\n .toast-wrapper {\n left: var(--start);\n right: var(--end);\n }\n :host-context([dir=rtl]) .toast-wrapper {\n left: unset;\n right: unset;\n left: var(--end);\n right: var(--start);\n }\n [dir=rtl] .toast-wrapper {\n left: unset;\n right: unset;\n left: var(--end);\n right: var(--start);\n }\n @supports selector(:dir(rtl)) {\n .toast-wrapper:dir(rtl) {\n left: unset;\n right: unset;\n left: var(--end);\n right: var(--start);\n }\n }\n}\n\n.toast-wrapper.toast-top {\n transform: translate3d(0, -100%, 0);\n top: 0;\n}\n\n.toast-wrapper.toast-bottom {\n transform: translate3d(0, 100%, 0);\n bottom: 0;\n}\n\n.toast-container {\n display: flex;\n align-items: center;\n pointer-events: auto;\n height: inherit;\n min-height: inherit;\n max-height: inherit;\n contain: content;\n}\n\n.toast-layout-stacked .toast-container {\n flex-wrap: wrap;\n}\n\n.toast-layout-baseline .toast-content {\n display: flex;\n flex: 1;\n flex-direction: column;\n justify-content: center;\n}\n\n.toast-icon {\n -webkit-margin-start: 16px;\n margin-inline-start: 16px;\n}\n\n.toast-content {\n min-width: 0;\n}\n\n.toast-message {\n flex: 1;\n white-space: var(--white-space);\n}\n\n.toast-button-group {\n display: flex;\n}\n\n.toast-layout-stacked .toast-button-group {\n justify-content: end;\n width: 100%;\n}\n\n.toast-button {\n border: 0;\n outline: none;\n color: var(--button-color);\n z-index: 0;\n}\n\n.toast-icon,\n.toast-button-icon {\n font-size: 1.4em;\n}\n\n.toast-button-inner {\n display: flex;\n align-items: center;\n}\n\n@media (any-hover: hover) {\n .toast-button:hover {\n cursor: pointer;\n }\n}\n/**\n * Convert a font size to a dynamic font size.\n * Fonts that participate in Dynamic Type should use\n * dynamic font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param unit (optional) - The unit to convert to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a maximum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * a minimum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * Convert a font size to a dynamic font size but impose\n * maximum and minimum font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n/**\n * A heuristic that applies CSS to tablet\n * viewports.\n *\n * Usage:\n * @include tablet-viewport() {\n * :host {\n * background-color: green;\n * }\n * }\n */\n/**\n * A heuristic that applies CSS to mobile\n * viewports (i.e. phones, not tablets).\n *\n * Usage:\n * @include mobile-viewport() {\n * :host {\n * background-color: blue;\n * }\n * }\n */\n:host {\n --background: var(--ion-color-step-800, #333333);\n --border-radius: 4px;\n --box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);\n --button-color: var(--ion-color-primary, #3880ff);\n --color: var(--ion-color-step-50, #f2f2f2);\n --max-width: 700px;\n --start: 8px;\n --end: 8px;\n font-size: 0.875rem;\n}\n\n.toast-wrapper {\n -webkit-margin-start: auto;\n margin-inline-start: auto;\n -webkit-margin-end: auto;\n margin-inline-end: auto;\n margin-top: auto;\n margin-bottom: auto;\n display: block;\n position: absolute;\n opacity: 0.01;\n z-index: 10;\n}\n\n.toast-content {\n -webkit-padding-start: 16px;\n padding-inline-start: 16px;\n -webkit-padding-end: 16px;\n padding-inline-end: 16px;\n padding-top: 14px;\n padding-bottom: 14px;\n}\n\n.toast-header {\n margin-bottom: 2px;\n font-weight: 500;\n line-height: 1.25rem;\n}\n\n.toast-message {\n line-height: 1.25rem;\n}\n\n.toast-layout-baseline .toast-button-group-start {\n -webkit-margin-start: 8px;\n margin-inline-start: 8px;\n}\n\n.toast-layout-stacked .toast-button-group-start {\n -webkit-margin-end: 8px;\n margin-inline-end: 8px;\n margin-top: 8px;\n}\n\n.toast-layout-baseline .toast-button-group-end {\n -webkit-margin-end: 8px;\n margin-inline-end: 8px;\n}\n\n.toast-layout-stacked .toast-button-group-end {\n -webkit-margin-end: 8px;\n margin-inline-end: 8px;\n margin-bottom: 8px;\n}\n\n.toast-button {\n -webkit-padding-start: 15px;\n padding-inline-start: 15px;\n -webkit-padding-end: 15px;\n padding-inline-end: 15px;\n padding-top: 10px;\n padding-bottom: 10px;\n position: relative;\n background-color: transparent;\n font-family: var(--ion-font-family);\n font-size: 0.875rem;\n font-weight: 500;\n letter-spacing: 0.84px;\n text-transform: uppercase;\n overflow: hidden;\n}\n\n.toast-button-cancel {\n color: var(--ion-color-step-100, #e6e6e6);\n}\n\n.toast-button-icon-only {\n border-radius: 50%;\n -webkit-padding-start: 9px;\n padding-inline-start: 9px;\n -webkit-padding-end: 9px;\n padding-inline-end: 9px;\n padding-top: 9px;\n padding-bottom: 9px;\n width: 36px;\n height: 36px;\n}\n\n@media (any-hover: hover) {\n .toast-button:hover {\n background-color: rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08);\n }\n .toast-button-cancel:hover {\n background-color: rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08);\n }\n}","/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { h, Host } from \"@stencil/core\";\nimport { ENABLE_HTML_CONTENT_DEFAULT } from \"../../utils/config\";\nimport { raf } from \"../../utils/helpers\";\nimport { createLockController } from \"../../utils/lock-controller\";\nimport { printIonWarning } from \"../../utils/logging/index\";\nimport { GESTURE, createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from \"../../utils/overlays\";\nimport { sanitizeDOMString } from \"../../utils/sanitization/index\";\nimport { createColorClasses, getClassMap } from \"../../utils/theme\";\nimport { config } from \"../../global/config\";\nimport { getIonMode } from \"../../global/ionic-global\";\nimport { iosEnterAnimation } from \"./animations/ios.enter\";\nimport { iosLeaveAnimation } from \"./animations/ios.leave\";\nimport { mdEnterAnimation } from \"./animations/md.enter\";\nimport { mdLeaveAnimation } from \"./animations/md.leave\";\nimport { getAnimationPosition } from \"./animations/utils\";\nimport { createSwipeToDismissGesture } from \"./gestures/swipe-to-dismiss\";\n// TODO(FW-2832): types\n/**\n * @virtualProp {\"ios\" | \"md\"} mode - The mode determines which platform styles to use.\n *\n * @part button - Any button element that is displayed inside of the toast.\n * @part button cancel - Any button element with role \"cancel\" that is displayed inside of the toast.\n * @part container - The element that wraps all child elements.\n * @part header - The header text of the toast.\n * @part message - The body text of the toast.\n * @part icon - The icon that appears next to the toast content.\n */\nexport class Toast {\n constructor() {\n this.delegateController = createDelegateController(this);\n this.lockController = createLockController();\n this.triggerController = createTriggerController();\n this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);\n this.presented = false;\n this.dispatchCancelHandler = (ev) => {\n const role = ev.detail.role;\n if (isCancel(role)) {\n const cancelButton = this.getButtons().find((b) => b.role === 'cancel');\n this.callButtonHandler(cancelButton);\n }\n };\n /**\n * Create a new swipe gesture so Toast\n * can be swiped to dismiss.\n */\n this.createSwipeGesture = (toastPosition) => {\n const gesture = (this.gesture = createSwipeToDismissGesture(this.el, toastPosition, () => {\n /**\n * If the gesture completed then\n * we should dismiss the toast.\n */\n this.dismiss(undefined, GESTURE);\n }));\n gesture.enable(true);\n };\n /**\n * Destroy an existing swipe gesture\n * so Toast can no longer be swiped to dismiss.\n */\n this.destroySwipeGesture = () => {\n const { gesture } = this;\n if (gesture === undefined) {\n return;\n }\n gesture.destroy();\n this.gesture = undefined;\n };\n /**\n * Returns `true` if swipeGesture\n * is configured to a value that enables the swipe behavior.\n * Returns `false` otherwise.\n */\n this.prefersSwipeGesture = () => {\n const { swipeGesture } = this;\n return swipeGesture === 'vertical';\n };\n this.revealContentToScreenReader = false;\n this.overlayIndex = undefined;\n this.delegate = undefined;\n this.hasController = false;\n this.color = undefined;\n this.enterAnimation = undefined;\n this.leaveAnimation = undefined;\n this.cssClass = undefined;\n this.duration = config.getNumber('toastDuration', 0);\n this.header = undefined;\n this.layout = 'baseline';\n this.message = undefined;\n this.keyboardClose = false;\n this.position = 'bottom';\n this.positionAnchor = undefined;\n this.buttons = undefined;\n this.translucent = false;\n this.animated = true;\n this.icon = undefined;\n this.htmlAttributes = undefined;\n this.swipeGesture = undefined;\n this.isOpen = false;\n this.trigger = undefined;\n }\n swipeGestureChanged() {\n /**\n * If the Toast is presented, then we need to destroy\n * any actives gestures before a new gesture is potentially\n * created below.\n *\n * If the Toast is dismissed, then no gesture should be available\n * since the Toast is not visible. This case should never\n * happen since the \"dismiss\" method handles destroying\n * any active swipe gestures, but we keep this code\n * around to handle the first case.\n */\n this.destroySwipeGesture();\n /**\n * A new swipe gesture should only be created\n * if the Toast is presented. If the Toast is not\n * yet presented then the \"present\" method will\n * handle calling the swipe gesture setup function.\n */\n if (this.presented && this.prefersSwipeGesture()) {\n /**\n * If the Toast is presented then\n * lastPresentedPosition is defined.\n */\n this.createSwipeGesture(this.lastPresentedPosition);\n }\n }\n onIsOpenChange(newValue, oldValue) {\n if (newValue === true && oldValue === false) {\n this.present();\n }\n else if (newValue === false && oldValue === true) {\n this.dismiss();\n }\n }\n triggerChanged() {\n const { trigger, el, triggerController } = this;\n if (trigger) {\n triggerController.addClickListener(el, trigger);\n }\n }\n connectedCallback() {\n prepareOverlay(this.el);\n this.triggerChanged();\n }\n disconnectedCallback() {\n this.triggerController.removeClickListener();\n }\n componentWillLoad() {\n setOverlayId(this.el);\n }\n componentDidLoad() {\n /**\n * If toast was rendered with isOpen=\"true\"\n * then we should open toast immediately.\n */\n if (this.isOpen === true) {\n raf(() => this.present());\n }\n /**\n * When binding values in frameworks such as Angular\n * it is possible for the value to be set after the Web Component\n * initializes but before the value watcher is set up in Stencil.\n * As a result, the watcher callback may not be fired.\n * We work around this by manually calling the watcher\n * callback when the component has loaded and the watcher\n * is configured.\n */\n this.triggerChanged();\n }\n /**\n * Present the toast overlay after it has been created.\n */\n async present() {\n const unlock = await this.lockController.lock();\n await this.delegateController.attachViewToDom();\n const { el, position } = this;\n const anchor = this.getAnchorElement();\n const animationPosition = getAnimationPosition(position, anchor, getIonMode(this), el);\n /**\n * Cache the calculated position of the toast, so we can re-use it\n * in the dismiss animation.\n */\n this.lastPresentedPosition = animationPosition;\n await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, {\n position,\n top: animationPosition.top,\n bottom: animationPosition.bottom,\n });\n /**\n * Content is revealed to screen readers after\n * the transition to avoid jank since this\n * state updates will cause a re-render.\n */\n this.revealContentToScreenReader = true;\n if (this.duration > 0) {\n this.durationTimeout = setTimeout(() => this.dismiss(undefined, 'timeout'), this.duration);\n }\n /**\n * If the Toast has a swipe gesture then we can\n * create the gesture so users can swipe the\n * presented Toast.\n */\n if (this.prefersSwipeGesture()) {\n this.createSwipeGesture(animationPosition);\n }\n unlock();\n }\n /**\n * Dismiss the toast overlay after it has been presented.\n *\n * @param data Any data to emit in the dismiss events.\n * @param role The role of the element that is dismissing the toast.\n * This can be useful in a button handler for determining which button was\n * clicked to dismiss the toast.\n * Some examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`.\n *\n * This is a no-op if the overlay has not been presented yet. If you want\n * to remove an overlay from the DOM that was never presented, use the\n * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.\n */\n async dismiss(data, role) {\n var _a, _b;\n const unlock = await this.lockController.lock();\n const { durationTimeout, position, lastPresentedPosition } = this;\n if (durationTimeout) {\n clearTimeout(durationTimeout);\n }\n const dismissed = await dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation, \n /**\n * Fetch the cached position that was calculated back in the present\n * animation. We always want to animate the dismiss from the same\n * position the present stopped at, so the animation looks continuous.\n */\n {\n position,\n top: (_a = lastPresentedPosition === null || lastPresentedPosition === void 0 ? void 0 : lastPresentedPosition.top) !== null && _a !== void 0 ? _a : '',\n bottom: (_b = lastPresentedPosition === null || lastPresentedPosition === void 0 ? void 0 : lastPresentedPosition.bottom) !== null && _b !== void 0 ? _b : '',\n });\n if (dismissed) {\n this.delegateController.removeViewFromDom();\n this.revealContentToScreenReader = false;\n }\n this.lastPresentedPosition = undefined;\n /**\n * If the Toast has a swipe gesture then we can\n * safely destroy it now that it is dismissed.\n */\n this.destroySwipeGesture();\n unlock();\n return dismissed;\n }\n /**\n * Returns a promise that resolves when the toast did dismiss.\n */\n onDidDismiss() {\n return eventMethod(this.el, 'ionToastDidDismiss');\n }\n /**\n * Returns a promise that resolves when the toast will dismiss.\n */\n onWillDismiss() {\n return eventMethod(this.el, 'ionToastWillDismiss');\n }\n getButtons() {\n const buttons = this.buttons\n ? this.buttons.map((b) => {\n return typeof b === 'string' ? { text: b } : b;\n })\n : [];\n return buttons;\n }\n /**\n * Returns the element specified by the positionAnchor prop,\n * or undefined if prop's value is an ID string and the element\n * is not found in the DOM.\n */\n getAnchorElement() {\n const { position, positionAnchor, el } = this;\n /**\n * If positionAnchor is undefined then\n * no anchor should be used when presenting the toast.\n */\n if (positionAnchor === undefined) {\n return;\n }\n if (position === 'middle' && positionAnchor !== undefined) {\n printIonWarning('The positionAnchor property is ignored when using position=\"middle\".', this.el);\n return undefined;\n }\n if (typeof positionAnchor === 'string') {\n /**\n * If the anchor is defined as an ID, find the element.\n * We do this on every present so the toast doesn't need\n * to account for the surrounding DOM changing since the\n * last time it was presented.\n */\n const foundEl = document.getElementById(positionAnchor);\n if (foundEl === null) {\n printIonWarning(`An anchor element with an ID of \"${positionAnchor}\" was not found in the DOM.`, el);\n return undefined;\n }\n return foundEl;\n }\n if (positionAnchor instanceof HTMLElement) {\n return positionAnchor;\n }\n printIonWarning('Invalid positionAnchor value:', positionAnchor, el);\n return undefined;\n }\n async buttonClick(button) {\n const role = button.role;\n if (isCancel(role)) {\n return this.dismiss(undefined, role);\n }\n const shouldDismiss = await this.callButtonHandler(button);\n if (shouldDismiss) {\n return this.dismiss(undefined, role);\n }\n return Promise.resolve();\n }\n async callButtonHandler(button) {\n if (button === null || button === void 0 ? void 0 : button.handler) {\n // a handler has been provided, execute it\n // pass the handler the values from the inputs\n try {\n const rtn = await safeCall(button.handler);\n if (rtn === false) {\n // if the return value of the handler is false then do not dismiss\n return false;\n }\n }\n catch (e) {\n console.error(e);\n }\n }\n return true;\n }\n renderButtons(buttons, side) {\n if (buttons.length === 0) {\n return;\n }\n const mode = getIonMode(this);\n const buttonGroupsClasses = {\n 'toast-button-group': true,\n [`toast-button-group-${side}`]: true,\n };\n return (h(\"div\", { class: buttonGroupsClasses }, buttons.map((b) => (h(\"button\", Object.assign({}, b.htmlAttributes, { type: \"button\", class: buttonClass(b), tabIndex: 0, onClick: () => this.buttonClick(b), part: buttonPart(b) }), h(\"div\", { class: \"toast-button-inner\" }, b.icon && (h(\"ion-icon\", { \"aria-hidden\": \"true\", icon: b.icon, slot: b.text === undefined ? 'icon-only' : undefined, class: \"toast-button-icon\" })), b.text), mode === 'md' && (h(\"ion-ripple-effect\", { type: b.icon !== undefined && b.text === undefined ? 'unbounded' : 'bounded' })))))));\n }\n /**\n * Render the `message` property.\n * @param key - A key to give the element a stable identity. This is used to improve compatibility with screen readers.\n * @param ariaHidden - If \"true\" then content will be hidden from screen readers.\n */\n renderToastMessage(key, ariaHidden = null) {\n const { customHTMLEnabled, message } = this;\n if (customHTMLEnabled) {\n return (h(\"div\", { key: key, \"aria-hidden\": ariaHidden, class: \"toast-message\", part: \"message\", innerHTML: sanitizeDOMString(message) }));\n }\n return (h(\"div\", { key: key, \"aria-hidden\": ariaHidden, class: \"toast-message\", part: \"message\" }, message));\n }\n /**\n * Render the `header` property.\n * @param key - A key to give the element a stable identity. This is used to improve compatibility with screen readers.\n * @param ariaHidden - If \"true\" then content will be hidden from screen readers.\n */\n renderHeader(key, ariaHidden = null) {\n return (h(\"div\", { key: key, class: \"toast-header\", \"aria-hidden\": ariaHidden, part: \"header\" }, this.header));\n }\n render() {\n const { layout, el, revealContentToScreenReader, header, message } = this;\n const allButtons = this.getButtons();\n const startButtons = allButtons.filter((b) => b.side === 'start');\n const endButtons = allButtons.filter((b) => b.side !== 'start');\n const mode = getIonMode(this);\n const wrapperClass = {\n 'toast-wrapper': true,\n [`toast-${this.position}`]: true,\n [`toast-layout-${layout}`]: true,\n };\n /**\n * Stacked buttons are only meant to be\n * used with one type of button.\n */\n if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {\n printIonWarning('This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);\n }\n return (h(Host, Object.assign({ key: '23803334fb668f6ce7044d3a321cb84bc753bd16', tabindex: \"-1\" }, this.htmlAttributes, { style: {\n zIndex: `${60000 + this.overlayIndex}`,\n }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h(\"div\", { key: '7cd7138ba079fccf97f318b91e9986491ab4214d', class: wrapperClass }, h(\"div\", { key: '93b78fa64e24435adeb77a04c1d1d53d2f093864', class: \"toast-container\", part: \"container\" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h(\"ion-icon\", { key: '9a3c71b164ebcfba2540acb7568beffa76b62f47', class: \"toast-icon\", part: \"icon\", icon: this.icon, lazy: false, \"aria-hidden\": \"true\" })), h(\"div\", { key: 'feb9268102d844f1314205f7440de7066cf0620e', class: \"toast-content\", role: \"status\", \"aria-atomic\": \"true\", \"aria-live\": \"polite\" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));\n }\n static get is() { return \"ion-toast\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"ios\": [\"toast.ios.scss\"],\n \"md\": [\"toast.md.scss\"]\n };\n }\n static get styleUrls() {\n return {\n \"ios\": [\"toast.ios.css\"],\n \"md\": [\"toast.md.css\"]\n };\n }\n static get properties() {\n return {\n \"overlayIndex\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": undefined\n }],\n \"text\": \"\"\n },\n \"attribute\": \"overlay-index\",\n \"reflect\": false\n },\n \"delegate\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"FrameworkDelegate\",\n \"resolved\": \"FrameworkDelegate | undefined\",\n \"references\": {\n \"FrameworkDelegate\": {\n \"location\": \"import\",\n \"path\": \"../../interface\",\n \"id\": \"src/interface.d.ts::FrameworkDelegate\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": undefined\n }],\n \"text\": \"\"\n }\n },\n \"hasController\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": undefined\n }],\n \"text\": \"\"\n },\n \"attribute\": \"has-controller\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"color\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"Color\",\n \"resolved\": \"\\\"danger\\\" | \\\"dark\\\" | \\\"light\\\" | \\\"medium\\\" | \\\"primary\\\" | \\\"secondary\\\" | \\\"success\\\" | \\\"tertiary\\\" | \\\"warning\\\" | string & Record<never, never> | undefined\",\n \"references\": {\n \"Color\": {\n \"location\": \"import\",\n \"path\": \"../../interface\",\n \"id\": \"src/interface.d.ts::Color\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The color to use from your application's color palette.\\nDefault options are: `\\\"primary\\\"`, `\\\"secondary\\\"`, `\\\"tertiary\\\"`, `\\\"success\\\"`, `\\\"warning\\\"`, `\\\"danger\\\"`, `\\\"light\\\"`, `\\\"medium\\\"`, and `\\\"dark\\\"`.\\nFor more information on colors, see [theming](/docs/theming/basics).\"\n },\n \"attribute\": \"color\",\n \"reflect\": true\n },\n \"enterAnimation\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"AnimationBuilder\",\n \"resolved\": \"((baseEl: any, opts?: any) => Animation) | undefined\",\n \"references\": {\n \"AnimationBuilder\": {\n \"location\": \"import\",\n \"path\": \"../../interface\",\n \"id\": \"src/interface.d.ts::AnimationBuilder\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Animation to use when the toast is presented.\"\n }\n },\n \"leaveAnimation\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"AnimationBuilder\",\n \"resolved\": \"((baseEl: any, opts?: any) => Animation) | undefined\",\n \"references\": {\n \"AnimationBuilder\": {\n \"location\": \"import\",\n \"path\": \"../../interface\",\n \"id\": \"src/interface.d.ts::AnimationBuilder\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Animation to use when the toast is dismissed.\"\n }\n },\n \"cssClass\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string | string[]\",\n \"resolved\": \"string | string[] | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Additional classes to apply for custom CSS. If multiple classes are\\nprovided they should be separated by spaces.\"\n },\n \"attribute\": \"css-class\",\n \"reflect\": false\n },\n \"duration\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"How many milliseconds to wait before hiding the toast. By default, it will show\\nuntil `dismiss()` is called.\"\n },\n \"attribute\": \"duration\",\n \"reflect\": false,\n \"defaultValue\": \"config.getNumber('toastDuration', 0)\"\n },\n \"header\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Header to be shown in the toast.\"\n },\n \"attribute\": \"header\",\n \"reflect\": false\n },\n \"layout\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ToastLayout\",\n \"resolved\": \"\\\"baseline\\\" | \\\"stacked\\\"\",\n \"references\": {\n \"ToastLayout\": {\n \"location\": \"import\",\n \"path\": \"./toast-interface\",\n \"id\": \"src/components/toast/toast-interface.ts::ToastLayout\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Defines how the message and buttons are laid out in the toast.\\n'baseline': The message and the buttons will appear on the same line.\\nMessage text may wrap within the message container.\\n'stacked': The buttons containers and message will stack on top\\nof each other. Use this if you have long text in your buttons.\"\n },\n \"attribute\": \"layout\",\n \"reflect\": false,\n \"defaultValue\": \"'baseline'\"\n },\n \"message\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string | IonicSafeString\",\n \"resolved\": \"IonicSafeString | string | undefined\",\n \"references\": {\n \"IonicSafeString\": {\n \"location\": \"import\",\n \"path\": \"../../utils/sanitization\",\n \"id\": \"src/utils/sanitization/index.ts::IonicSafeString\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Message to be shown in the toast.\\nThis property accepts custom HTML as a string.\\nContent is parsed as plaintext by default.\\n`innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config\\nbefore custom HTML can be used.\"\n },\n \"attribute\": \"message\",\n \"reflect\": false\n },\n \"keyboardClose\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the keyboard will be automatically dismissed when the overlay is presented.\"\n },\n \"attribute\": \"keyboard-close\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"position\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ToastPosition\",\n \"resolved\": \"\\\"bottom\\\" | \\\"middle\\\" | \\\"top\\\"\",\n \"references\": {\n \"ToastPosition\": {\n \"location\": \"import\",\n \"path\": \"./toast-interface\",\n \"id\": \"src/components/toast/toast-interface.ts::ToastPosition\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The starting position of the toast on the screen. Can be tweaked further\\nusing the `positionAnchor` property.\"\n },\n \"attribute\": \"position\",\n \"reflect\": false,\n \"defaultValue\": \"'bottom'\"\n },\n \"positionAnchor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"HTMLElement | string\",\n \"resolved\": \"HTMLElement | string | undefined\",\n \"references\": {\n \"HTMLElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLElement\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The element to anchor the toast's position to. Can be set as a direct reference\\nor the ID of the element. With `position=\\\"bottom\\\"`, the toast will sit above the\\nchosen element. With `position=\\\"top\\\"`, the toast will sit below the chosen element.\\nWith `position=\\\"middle\\\"`, the value of `positionAnchor` is ignored.\"\n },\n \"attribute\": \"position-anchor\",\n \"reflect\": false\n },\n \"buttons\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"(ToastButton | string)[]\",\n \"resolved\": \"(string | ToastButton)[] | undefined\",\n \"references\": {\n \"ToastButton\": {\n \"location\": \"import\",\n \"path\": \"./toast-interface\",\n \"id\": \"src/components/toast/toast-interface.ts::ToastButton\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"An array of buttons for the toast.\"\n }\n },\n \"translucent\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toast will be translucent.\\nOnly applies when the mode is `\\\"ios\\\"` and the device supports\\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).\"\n },\n \"attribute\": \"translucent\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"animated\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toast will animate.\"\n },\n \"attribute\": \"animated\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"icon\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The name of the icon to display, or the path to a valid SVG file. See `ion-icon`.\\nhttps://ionic.io/ionicons\"\n },\n \"attribute\": \"icon\",\n \"reflect\": false\n },\n \"htmlAttributes\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"{ [key: string]: any }\",\n \"resolved\": \"undefined | { [key: string]: any; }\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Additional attributes to pass to the toast.\"\n }\n },\n \"swipeGesture\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"ToastSwipeGestureDirection\",\n \"resolved\": \"\\\"vertical\\\" | undefined\",\n \"references\": {\n \"ToastSwipeGestureDirection\": {\n \"location\": \"import\",\n \"path\": \"./toast-interface\",\n \"id\": \"src/components/toast/toast-interface.ts::ToastSwipeGestureDirection\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If set to 'vertical', the Toast can be dismissed with\\na swipe gesture. The swipe direction is determined by\\nthe value of the `position` property:\\n`top`: The Toast can be swiped up to dismiss.\\n`bottom`: The Toast can be swiped down to dismiss.\\n`middle`: The Toast can be swiped up or down to dismiss.\"\n },\n \"attribute\": \"swipe-gesture\",\n \"reflect\": false\n },\n \"isOpen\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toast will open. If `false`, the toast will close.\\nUse this if you need finer grained control over presentation, otherwise\\njust use the toastController or the `trigger` property.\\nNote: `isOpen` will not automatically be set back to `false` when\\nthe toast dismisses. You will need to do that in your code.\"\n },\n \"attribute\": \"is-open\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"trigger\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string | undefined\",\n \"resolved\": \"string | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"An ID corresponding to the trigger element that\\ncauses the toast to open when clicked.\"\n },\n \"attribute\": \"trigger\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"revealContentToScreenReader\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"didPresent\",\n \"name\": \"ionToastDidPresent\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted after the toast has presented.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"willPresent\",\n \"name\": \"ionToastWillPresent\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted before the toast has presented.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"willDismiss\",\n \"name\": \"ionToastWillDismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted before the toast has dismissed.\"\n },\n \"complexType\": {\n \"original\": \"OverlayEventDetail\",\n \"resolved\": \"OverlayEventDetail<any>\",\n \"references\": {\n \"OverlayEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/overlays-interface\",\n \"id\": \"src/utils/overlays-interface.ts::OverlayEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"didDismiss\",\n \"name\": \"ionToastDidDismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted after the toast has dismissed.\"\n },\n \"complexType\": {\n \"original\": \"OverlayEventDetail\",\n \"resolved\": \"OverlayEventDetail<any>\",\n \"references\": {\n \"OverlayEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/overlays-interface\",\n \"id\": \"src/utils/overlays-interface.ts::OverlayEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"didPresentShorthand\",\n \"name\": \"didPresent\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted after the toast has presented.\\nShorthand for ionToastWillDismiss.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"willPresentShorthand\",\n \"name\": \"willPresent\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted before the toast has presented.\\nShorthand for ionToastWillPresent.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"willDismissShorthand\",\n \"name\": \"willDismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted before the toast has dismissed.\\nShorthand for ionToastWillDismiss.\"\n },\n \"complexType\": {\n \"original\": \"OverlayEventDetail\",\n \"resolved\": \"OverlayEventDetail<any>\",\n \"references\": {\n \"OverlayEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/overlays-interface\",\n \"id\": \"src/utils/overlays-interface.ts::OverlayEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"didDismissShorthand\",\n \"name\": \"didDismiss\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted after the toast has dismissed.\\nShorthand for ionToastDidDismiss.\"\n },\n \"complexType\": {\n \"original\": \"OverlayEventDetail\",\n \"resolved\": \"OverlayEventDetail<any>\",\n \"references\": {\n \"OverlayEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/overlays-interface\",\n \"id\": \"src/utils/overlays-interface.ts::OverlayEventDetail\"\n }\n }\n }\n }];\n }\n static get methods() {\n return {\n \"present\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n },\n \"ToastPresentOptions\": {\n \"location\": \"import\",\n \"path\": \"./toast-interface\",\n \"id\": \"src/components/toast/toast-interface.ts::ToastPresentOptions\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Present the toast overlay after it has been created.\",\n \"tags\": []\n }\n },\n \"dismiss\": {\n \"complexType\": {\n \"signature\": \"(data?: any, role?: string) => Promise<boolean>\",\n \"parameters\": [{\n \"name\": \"data\",\n \"type\": \"any\",\n \"docs\": \"Any data to emit in the dismiss events.\"\n }, {\n \"name\": \"role\",\n \"type\": \"string | undefined\",\n \"docs\": \"The role of the element that is dismissing the toast.\\nThis can be useful in a button handler for determining which button was\\nclicked to dismiss the toast.\\nSome examples include: ``\\\"cancel\\\"`, `\\\"destructive\\\"`, \\\"selected\\\"`, and `\\\"backdrop\\\"`.\\n\\nThis is a no-op if the overlay has not been presented yet. If you want\\nto remove an overlay from the DOM that was never presented, use the\\n[remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n },\n \"ToastDismissOptions\": {\n \"location\": \"import\",\n \"path\": \"./toast-interface\",\n \"id\": \"src/components/toast/toast-interface.ts::ToastDismissOptions\"\n }\n },\n \"return\": \"Promise<boolean>\"\n },\n \"docs\": {\n \"text\": \"Dismiss the toast overlay after it has been presented.\",\n \"tags\": [{\n \"name\": \"param\",\n \"text\": \"data Any data to emit in the dismiss events.\"\n }, {\n \"name\": \"param\",\n \"text\": \"role The role of the element that is dismissing the toast.\\nThis can be useful in a button handler for determining which button was\\nclicked to dismiss the toast.\\nSome examples include: ``\\\"cancel\\\"`, `\\\"destructive\\\"`, \\\"selected\\\"`, and `\\\"backdrop\\\"`.\\n\\nThis is a no-op if the overlay has not been presented yet. If you want\\nto remove an overlay from the DOM that was never presented, use the\\n[remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.\"\n }]\n }\n },\n \"onDidDismiss\": {\n \"complexType\": {\n \"signature\": \"<T = any>() => Promise<OverlayEventDetail<T>>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n },\n \"OverlayEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/overlays-interface\",\n \"id\": \"src/utils/overlays-interface.ts::OverlayEventDetail\"\n },\n \"T\": {\n \"location\": \"global\",\n \"id\": \"global::T\"\n }\n },\n \"return\": \"Promise<OverlayEventDetail<T>>\"\n },\n \"docs\": {\n \"text\": \"Returns a promise that resolves when the toast did dismiss.\",\n \"tags\": []\n }\n },\n \"onWillDismiss\": {\n \"complexType\": {\n \"signature\": \"<T = any>() => Promise<OverlayEventDetail<T>>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n },\n \"OverlayEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/overlays-interface\",\n \"id\": \"src/utils/overlays-interface.ts::OverlayEventDetail\"\n },\n \"T\": {\n \"location\": \"global\",\n \"id\": \"global::T\"\n }\n },\n \"return\": \"Promise<OverlayEventDetail<T>>\"\n },\n \"docs\": {\n \"text\": \"Returns a promise that resolves when the toast will dismiss.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"swipeGesture\",\n \"methodName\": \"swipeGestureChanged\"\n }, {\n \"propName\": \"isOpen\",\n \"methodName\": \"onIsOpenChange\"\n }, {\n \"propName\": \"trigger\",\n \"methodName\": \"triggerChanged\"\n }];\n }\n}\nconst buttonClass = (button) => {\n return Object.assign({ 'toast-button': true, 'toast-button-icon-only': button.icon !== undefined && button.text === undefined, [`toast-button-${button.role}`]: button.role !== undefined, 'ion-focusable': true, 'ion-activatable': true }, getClassMap(button.cssClass));\n};\nconst buttonPart = (button) => {\n return isCancel(button.role) ? 'button cancel' : 'button';\n};\n",":host {\n font-family: var(--font-sans);\n display: block;\n}\n\nbutton#new {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n width: var(--size-10);\n height: var(--size-10);\n background-color: var(--pos-primary-color);\n color: var(--pos-primary-text-color);\n font-size: var(--scale-6);\n border-radius: var(--radius-xs);\n}\n\nbutton#new:hover,\nbutton#new:focus {\n outline: none;\n filter: brightness(110%);\n box-shadow: var(--shadow-sm);\n}\n\npos-new-thing-form {\n margin: var(--scale-3);\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'pos-add-new-thing',\n styleUrl: 'pos-add-new-thing.css',\n shadow: true,\n})\nexport class PosAddNewThing {\n @Prop() referenceUri!: string;\n\n private dialog: HTMLPosDialogElement;\n\n openDialog() {\n this.dialog.showModal();\n }\n\n render() {\n return (\n <Host>\n <button id=\"new\" title=\"Add a new thing\" onClick={() => this.openDialog()}>\n <ion-icon name=\"add-circle-outline\"></ion-icon>\n </button>\n <pos-dialog ref={el => (this.dialog = el as HTMLPosDialogElement)}>\n <span slot=\"title\">Add a new thing</span>\n <pos-new-thing-form slot=\"content\" referenceUri={this.referenceUri} />\n </pos-dialog>\n </Host>\n );\n }\n}\n","import { createStore } from '@stencil/store';\n\nexport interface LocalSettings {\n offlineCache: boolean;\n}\n\nconst storedSettings = localStorage.getItem('settings');\nconst initialSettings = storedSettings\n ? JSON.parse(storedSettings)\n : {\n offlineCache: false,\n };\n\nexport const localSettings = createStore<LocalSettings>(initialSettings);\n\npersistChanges();\nsyncChangesAcrossTabs();\n\nfunction persistChanges() {\n localSettings.on('set', () => {\n const snapshot = JSON.stringify(localSettings.state);\n localStorage.setItem('settings', snapshot);\n });\n}\nfunction syncChangesAcrossTabs() {\n window.addEventListener('storage', event => {\n if (event.key === 'settings' && event.newValue) {\n const newSettings: LocalSettings = JSON.parse(event.newValue);\n localSettings.state.offlineCache = newSettings.offlineCache;\n }\n });\n}\n","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst transactionDoneMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n // This mapping exists in reverseTransformCache but doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(this.request);\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n });\n }\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event.newVersion, event));\n }\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking) {\n db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n }\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event));\n }\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nconst advanceMethodProps = ['continue', 'continuePrimaryKey', 'advance'];\nconst methodMap = {};\nconst advanceResults = new WeakMap();\nconst ittrProxiedCursorToOriginalProxy = new WeakMap();\nconst cursorIteratorTraps = {\n get(target, prop) {\n if (!advanceMethodProps.includes(prop))\n return target[prop];\n let cachedFunc = methodMap[prop];\n if (!cachedFunc) {\n cachedFunc = methodMap[prop] = function (...args) {\n advanceResults.set(this, ittrProxiedCursorToOriginalProxy.get(this)[prop](...args));\n };\n }\n return cachedFunc;\n },\n};\nasync function* iterate(...args) {\n // tslint:disable-next-line:no-this-assignment\n let cursor = this;\n if (!(cursor instanceof IDBCursor)) {\n cursor = await cursor.openCursor(...args);\n }\n if (!cursor)\n return;\n cursor = cursor;\n const proxiedCursor = new Proxy(cursor, cursorIteratorTraps);\n ittrProxiedCursorToOriginalProxy.set(proxiedCursor, cursor);\n // Map this double-proxy back to the original, so other cursor methods work.\n reverseTransformCache.set(proxiedCursor, unwrap(cursor));\n while (cursor) {\n yield proxiedCursor;\n // If one of the advancing methods was not called, call continue().\n cursor = await (advanceResults.get(proxiedCursor) || cursor.continue());\n advanceResults.delete(proxiedCursor);\n }\n}\nfunction isIteratorProp(target, prop) {\n return ((prop === Symbol.asyncIterator &&\n instanceOfAny(target, [IDBIndex, IDBObjectStore, IDBCursor])) ||\n (prop === 'iterate' && instanceOfAny(target, [IDBIndex, IDBObjectStore])));\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get(target, prop, receiver) {\n if (isIteratorProp(target, prop))\n return iterate;\n return oldTraps.get(target, prop, receiver);\n },\n has(target, prop) {\n return isIteratorProp(target, prop) || oldTraps.has(target, prop);\n },\n}));\n\nexport { deleteDB, openDB, unwrap, wrap };\n","import { DBSchema, IDBPDatabase, openDB } from 'idb';\nimport { CachedRdfDocument, OfflineCache } from '@pod-os/core';\n\ninterface OfflineCacheDb extends DBSchema {\n documents: {\n key: string;\n value: CachedRdfDocument;\n indexes: {\n 'url-revision': [string, string];\n };\n };\n}\n\n/**\n * An offline cache backed by the browsers IndexedDB storage\n */\nexport class IndexedDbOfflineCache implements OfflineCache {\n private readonly dbPromise: Promise<IDBPDatabase<OfflineCacheDb>>;\n\n constructor() {\n this.dbPromise = openDB<OfflineCacheDb>('OfflineCacheDB', 1, {\n upgrade(db) {\n if (!db.objectStoreNames.contains('documents')) {\n const store = db.createObjectStore('documents', { keyPath: 'url' });\n store.createIndex('url-revision', ['url', 'revision']);\n }\n },\n });\n }\n\n async clear() {\n const db = await this.dbPromise;\n return db.clear('documents');\n }\n\n async get(url: string): Promise<CachedRdfDocument | undefined> {\n const db = await this.dbPromise;\n return await db.get('documents', url);\n }\n\n async put(document: CachedRdfDocument) {\n const db = await this.dbPromise;\n const existing = await db.getFromIndex('documents', 'url-revision', [document.url, document.revision]);\n\n if (existing) {\n return; // No need to update if the revision is the same\n }\n await db.put('documents', document);\n }\n}\n","import { OnlineStatus } from '@pod-os/core';\n\nexport class NavigatorOnlineStatus implements OnlineStatus {\n isOnline(): boolean {\n return navigator.onLine;\n }\n}\n","import { NoOfflineCache, PodOS } from '@pod-os/core';\nimport { IndexedDbOfflineCache } from './cache/IndexedDbOfflineCache';\nimport { NavigatorOnlineStatus } from './cache/NavigatorOnlineStatus';\nimport { LocalSettings } from './store/settings';\nimport { BrowserSession } from './authentication';\n\nexport const createPodOS = (session: BrowserSession, settings: LocalSettings): PodOS => {\n return new PodOS({\n session,\n offlineCache: settings.offlineCache ? new IndexedDbOfflineCache() : new NoOfflineCache(),\n onlineStatus: new NavigatorOnlineStatus(),\n });\n};\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","export function createErrorClass(createImpl) {\n const _super = (instance) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { createErrorClass } from './createErrorClass';\nexport const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function arrRemove(arr, item) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nexport class Subscription {\n constructor(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n unsubscribe() {\n let errors;\n if (!this.closed) {\n this.closed = true;\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n add(teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n }\n _hasParent(parent) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n _addParent(parent) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n _removeParent(parent) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n remove(teardown) {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\nSubscription.EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n})();\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","export const config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","export const timeoutProvider = {\n setTimeout(handler, timeout, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind,\n value,\n error,\n };\n}\n//# sourceMappingURL=NotificationFactories.js.map","import { config } from '../config';\nlet context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","import { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nexport class Subscriber extends Subscription {\n constructor(destination) {\n super();\n this.isStopped = false;\n if (destination) {\n this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(this);\n }\n }\n else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n static create(next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n }\n next(value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n }\n error(err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n }\n complete() {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n }\n unsubscribe() {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null;\n }\n }\n _next(value) {\n this.destination.next(value);\n }\n _error(err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n _complete() {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n }\n}\nconst _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nclass ConsumerObserver {\n constructor(partialObserver) {\n this.partialObserver = partialObserver;\n }\n next(value) {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n error(err) {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n }\n complete() {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\nexport class SafeSubscriber extends Subscriber {\n constructor(observerOrNext, error, complete) {\n super();\n let partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n let context;\n if (this && config.useDeprecatedNextContext) {\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\nexport const EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","export const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n//# sourceMappingURL=observable.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { identity } from './identity';\nexport function pipe(...fns) {\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce((prev, fn) => fn(prev), input);\n };\n}\n//# sourceMappingURL=pipe.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nexport class Observable {\n constructor(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n lift(operator) {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n subscribe(observerOrNext, error, complete) {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n this._subscribe(subscriber)\n :\n this._trySubscribe(subscriber));\n });\n return subscriber;\n }\n _trySubscribe(sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n }\n forEach(next, promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n });\n }\n _subscribe(subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n }\n [Symbol_observable]() {\n return this;\n }\n pipe(...operations) {\n return pipeFromArray(operations)(this);\n }\n toPromise(promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n let value;\n this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value));\n });\n }\n}\nObservable.create = (subscribe) => {\n return new Observable(subscribe);\n};\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return (source) => {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n//# sourceMappingURL=lift.js.map","import { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nexport class OperatorSubscriber extends Subscriber {\n constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n super(destination);\n this.onFinalize = onFinalize;\n this.shouldUnsubscribe = shouldUnsubscribe;\n this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n unsubscribe() {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n }\n}\n//# sourceMappingURL=OperatorSubscriber.js.map","import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n}\nSubject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n//# sourceMappingURL=Subject.js.map","import { Subject } from './Subject';\nexport class BehaviorSubject extends Subject {\n constructor(_value) {\n super();\n this._value = _value;\n }\n get value() {\n return this.getValue();\n }\n _subscribe(subscriber) {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n getValue() {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n next(value) {\n super.next((this._value = value));\n }\n}\n//# sourceMappingURL=BehaviorSubject.js.map","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n constructor(scheduler, work) {\n super();\n }\n schedule(state, delay = 0) {\n return this;\n }\n}\n//# sourceMappingURL=Action.js.map","export const intervalProvider = {\n setInterval(handler, timeout, ...args) {\n const { delegate } = intervalProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=intervalProvider.js.map","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n schedule(state, delay = 0) {\n var _a;\n if (this.closed) {\n return this;\n }\n this.state = state;\n const id = this.id;\n const scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n requestAsyncId(scheduler, _id, delay = 0) {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n recycleAsyncId(_scheduler, id, delay = 0) {\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n }\n execute(state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n _execute(state, _delay) {\n let errored = false;\n let errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n//# sourceMappingURL=AsyncAction.js.map","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n//# sourceMappingURL=Scheduler.js.map","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n }\n flush(action) {\n const { actions } = this;\n if (this._active) {\n actions.push(action);\n return;\n }\n let error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n//# sourceMappingURL=AsyncScheduler.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n//# sourceMappingURL=async.js.map","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","export const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function');\n//# sourceMappingURL=isArrayLike.js.map","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n//# sourceMappingURL=isPromise.js.map","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n//# sourceMappingURL=isInteropObservable.js.map","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n//# sourceMappingURL=isAsyncIterable.js.map","export function createInvalidObservableTypeError(input) {\n return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`);\n}\n//# sourceMappingURL=throwUnobservableError.js.map","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport const iterator = getSymbolIterator();\n//# sourceMappingURL=iterator.js.map","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n//# sourceMappingURL=isIterable.js.map","import { __asyncGenerator, __await } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { value, done } = yield __await(reader.read());\n if (done) {\n return yield __await(void 0);\n }\n yield yield __await(value);\n }\n }\n finally {\n reader.releaseLock();\n }\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n//# sourceMappingURL=isReadableStreamLike.js.map","import { __asyncValues, __awaiter } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable((subscriber) => {\n const obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable((subscriber) => {\n for (let i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable((subscriber) => {\n promise\n .then((value) => {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, (err) => subscriber.error(err))\n .then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable((subscriber) => {\n for (const value of iterable) {\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable((subscriber) => {\n process(asyncIterable, subscriber).catch((err) => subscriber.error(err));\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_1, _a;\n return __awaiter(this, void 0, void 0, function* () {\n try {\n for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) {\n const value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n });\n}\n//# sourceMappingURL=innerFrom.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler = asyncScheduler) {\n return operate((source, subscriber) => {\n let activeTask = null;\n let lastValue = null;\n let lastTime = null;\n const emit = () => {\n if (activeTask) {\n activeTask.unsubscribe();\n activeTask = null;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle() {\n const targetTime = lastTime + dueTime;\n const now = scheduler.now();\n if (now < targetTime) {\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n emit();\n }\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n lastValue = value;\n lastTime = scheduler.now();\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = activeTask = null;\n }));\n });\n}\n//# sourceMappingURL=debounceTime.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=takeUntil.js.map","var crypto$1 = crypto;\nconst isCryptoKey = (key) => key instanceof CryptoKey;\n\nconst digest = async (algorithm, data) => {\n const subtleDigest = `SHA-${algorithm.slice(-3)}`;\n return new Uint8Array(await crypto$1.subtle.digest(subtleDigest, data));\n};\nvar digest$1 = digest;\n\nconst encoder = new TextEncoder();\nconst decoder = new TextDecoder();\nfunction concat(...buffers) {\n const size = buffers.reduce((acc, { length }) => acc + length, 0);\n const buf = new Uint8Array(size);\n let i = 0;\n for (const buffer of buffers) {\n buf.set(buffer, i);\n i += buffer.length;\n }\n return buf;\n}\n\nconst encodeBase64 = (input) => {\n let unencoded = input;\n if (typeof unencoded === 'string') {\n unencoded = encoder.encode(unencoded);\n }\n const CHUNK_SIZE = 0x8000;\n const arr = [];\n for (let i = 0; i < unencoded.length; i += CHUNK_SIZE) {\n arr.push(String.fromCharCode.apply(null, unencoded.subarray(i, i + CHUNK_SIZE)));\n }\n return btoa(arr.join(''));\n};\nconst encode = (input) => {\n return encodeBase64(input).replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n};\nconst decodeBase64 = (encoded) => {\n const binary = atob(encoded);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return bytes;\n};\nconst decode$1 = (input) => {\n let encoded = input;\n if (encoded instanceof Uint8Array) {\n encoded = decoder.decode(encoded);\n }\n encoded = encoded.replace(/-/g, '+').replace(/_/g, '/').replace(/\\s/g, '');\n try {\n return decodeBase64(encoded);\n }\n catch {\n throw new TypeError('The input to be decoded is not correctly encoded.');\n }\n};\n\nclass JOSEError extends Error {\n constructor(message, options) {\n super(message, options);\n this.code = 'ERR_JOSE_GENERIC';\n this.name = this.constructor.name;\n Error.captureStackTrace?.(this, this.constructor);\n }\n}\nJOSEError.code = 'ERR_JOSE_GENERIC';\nclass JWTClaimValidationFailed extends JOSEError {\n constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n super(message, { cause: { claim, reason, payload } });\n this.code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n this.claim = claim;\n this.reason = reason;\n this.payload = payload;\n }\n}\nJWTClaimValidationFailed.code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\nclass JWTExpired extends JOSEError {\n constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n super(message, { cause: { claim, reason, payload } });\n this.code = 'ERR_JWT_EXPIRED';\n this.claim = claim;\n this.reason = reason;\n this.payload = payload;\n }\n}\nJWTExpired.code = 'ERR_JWT_EXPIRED';\nclass JOSEAlgNotAllowed extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n }\n}\nJOSEAlgNotAllowed.code = 'ERR_JOSE_ALG_NOT_ALLOWED';\nclass JOSENotSupported extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = 'ERR_JOSE_NOT_SUPPORTED';\n }\n}\nJOSENotSupported.code = 'ERR_JOSE_NOT_SUPPORTED';\nclass JWEDecryptionFailed extends JOSEError {\n constructor(message = 'decryption operation failed', options) {\n super(message, options);\n this.code = 'ERR_JWE_DECRYPTION_FAILED';\n }\n}\nJWEDecryptionFailed.code = 'ERR_JWE_DECRYPTION_FAILED';\nclass JWEInvalid extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = 'ERR_JWE_INVALID';\n }\n}\nJWEInvalid.code = 'ERR_JWE_INVALID';\nclass JWSInvalid extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = 'ERR_JWS_INVALID';\n }\n}\nJWSInvalid.code = 'ERR_JWS_INVALID';\nclass JWTInvalid extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = 'ERR_JWT_INVALID';\n }\n}\nJWTInvalid.code = 'ERR_JWT_INVALID';\nclass JWKInvalid extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = 'ERR_JWK_INVALID';\n }\n}\nJWKInvalid.code = 'ERR_JWK_INVALID';\nclass JWKSInvalid extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = 'ERR_JWKS_INVALID';\n }\n}\nJWKSInvalid.code = 'ERR_JWKS_INVALID';\nclass JWKSNoMatchingKey extends JOSEError {\n constructor(message = 'no applicable key found in the JSON Web Key Set', options) {\n super(message, options);\n this.code = 'ERR_JWKS_NO_MATCHING_KEY';\n }\n}\nJWKSNoMatchingKey.code = 'ERR_JWKS_NO_MATCHING_KEY';\nclass JWKSMultipleMatchingKeys extends JOSEError {\n constructor(message = 'multiple matching keys found in the JSON Web Key Set', options) {\n super(message, options);\n this.code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n }\n}\nJWKSMultipleMatchingKeys.code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\nclass JWKSTimeout extends JOSEError {\n constructor(message = 'request timed out', options) {\n super(message, options);\n this.code = 'ERR_JWKS_TIMEOUT';\n }\n}\nJWKSTimeout.code = 'ERR_JWKS_TIMEOUT';\nclass JWSSignatureVerificationFailed extends JOSEError {\n constructor(message = 'signature verification failed', options) {\n super(message, options);\n this.code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n }\n}\nJWSSignatureVerificationFailed.code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n\nfunction unusable(name, prop = 'algorithm.name') {\n return new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);\n}\nfunction isAlgorithm(algorithm, name) {\n return algorithm.name === name;\n}\nfunction getHashLength(hash) {\n return parseInt(hash.name.slice(4), 10);\n}\nfunction getNamedCurve(alg) {\n switch (alg) {\n case 'ES256':\n return 'P-256';\n case 'ES384':\n return 'P-384';\n case 'ES512':\n return 'P-521';\n default:\n throw new Error('unreachable');\n }\n}\nfunction checkUsage(key, usages) {\n if (usages.length && !usages.some((expected) => key.usages.includes(expected))) {\n let msg = 'CryptoKey does not support this operation, its usages must include ';\n if (usages.length > 2) {\n const last = usages.pop();\n msg += `one of ${usages.join(', ')}, or ${last}.`;\n }\n else if (usages.length === 2) {\n msg += `one of ${usages[0]} or ${usages[1]}.`;\n }\n else {\n msg += `${usages[0]}.`;\n }\n throw new TypeError(msg);\n }\n}\nfunction checkSigCryptoKey(key, alg, ...usages) {\n switch (alg) {\n case 'HS256':\n case 'HS384':\n case 'HS512': {\n if (!isAlgorithm(key.algorithm, 'HMAC'))\n throw unusable('HMAC');\n const expected = parseInt(alg.slice(2), 10);\n const actual = getHashLength(key.algorithm.hash);\n if (actual !== expected)\n throw unusable(`SHA-${expected}`, 'algorithm.hash');\n break;\n }\n case 'RS256':\n case 'RS384':\n case 'RS512': {\n if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5'))\n throw unusable('RSASSA-PKCS1-v1_5');\n const expected = parseInt(alg.slice(2), 10);\n const actual = getHashLength(key.algorithm.hash);\n if (actual !== expected)\n throw unusable(`SHA-${expected}`, 'algorithm.hash');\n break;\n }\n case 'PS256':\n case 'PS384':\n case 'PS512': {\n if (!isAlgorithm(key.algorithm, 'RSA-PSS'))\n throw unusable('RSA-PSS');\n const expected = parseInt(alg.slice(2), 10);\n const actual = getHashLength(key.algorithm.hash);\n if (actual !== expected)\n throw unusable(`SHA-${expected}`, 'algorithm.hash');\n break;\n }\n case 'EdDSA': {\n if (key.algorithm.name !== 'Ed25519' && key.algorithm.name !== 'Ed448') {\n throw unusable('Ed25519 or Ed448');\n }\n break;\n }\n case 'Ed25519': {\n if (!isAlgorithm(key.algorithm, 'Ed25519'))\n throw unusable('Ed25519');\n break;\n }\n case 'ES256':\n case 'ES384':\n case 'ES512': {\n if (!isAlgorithm(key.algorithm, 'ECDSA'))\n throw unusable('ECDSA');\n const expected = getNamedCurve(alg);\n const actual = key.algorithm.namedCurve;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.namedCurve');\n break;\n }\n default:\n throw new TypeError('CryptoKey does not support this operation');\n }\n checkUsage(key, usages);\n}\n\nfunction message(msg, actual, ...types) {\n types = types.filter(Boolean);\n if (types.length > 2) {\n const last = types.pop();\n msg += `one of type ${types.join(', ')}, or ${last}.`;\n }\n else if (types.length === 2) {\n msg += `one of type ${types[0]} or ${types[1]}.`;\n }\n else {\n msg += `of type ${types[0]}.`;\n }\n if (actual == null) {\n msg += ` Received ${actual}`;\n }\n else if (typeof actual === 'function' && actual.name) {\n msg += ` Received function ${actual.name}`;\n }\n else if (typeof actual === 'object' && actual != null) {\n if (actual.constructor?.name) {\n msg += ` Received an instance of ${actual.constructor.name}`;\n }\n }\n return msg;\n}\nvar invalidKeyInput = (actual, ...types) => {\n return message('Key must be ', actual, ...types);\n};\nfunction withAlg(alg, actual, ...types) {\n return message(`Key for the ${alg} algorithm must be `, actual, ...types);\n}\n\nvar isKeyLike = (key) => {\n if (isCryptoKey(key)) {\n return true;\n }\n return key?.[Symbol.toStringTag] === 'KeyObject';\n};\nconst types = ['CryptoKey'];\n\nconst isDisjoint = (...headers) => {\n const sources = headers.filter(Boolean);\n if (sources.length === 0 || sources.length === 1) {\n return true;\n }\n let acc;\n for (const header of sources) {\n const parameters = Object.keys(header);\n if (!acc || acc.size === 0) {\n acc = new Set(parameters);\n continue;\n }\n for (const parameter of parameters) {\n if (acc.has(parameter)) {\n return false;\n }\n acc.add(parameter);\n }\n }\n return true;\n};\nvar isDisjoint$1 = isDisjoint;\n\nfunction isObjectLike(value) {\n return typeof value === 'object' && value !== null;\n}\nfunction isObject(input) {\n if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') {\n return false;\n }\n if (Object.getPrototypeOf(input) === null) {\n return true;\n }\n let proto = input;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(input) === proto;\n}\n\nvar checkKeyLength = (alg, key) => {\n if (alg.startsWith('RS') || alg.startsWith('PS')) {\n const { modulusLength } = key.algorithm;\n if (typeof modulusLength !== 'number' || modulusLength < 2048) {\n throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);\n }\n }\n};\n\nfunction isJWK(key) {\n return isObject(key) && typeof key.kty === 'string';\n}\nfunction isPrivateJWK(key) {\n return key.kty !== 'oct' && typeof key.d === 'string';\n}\nfunction isPublicJWK(key) {\n return key.kty !== 'oct' && typeof key.d === 'undefined';\n}\nfunction isSecretJWK(key) {\n return isJWK(key) && key.kty === 'oct' && typeof key.k === 'string';\n}\n\nfunction subtleMapping(jwk) {\n let algorithm;\n let keyUsages;\n switch (jwk.kty) {\n case 'RSA': {\n switch (jwk.alg) {\n case 'PS256':\n case 'PS384':\n case 'PS512':\n algorithm = { name: 'RSA-PSS', hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'RS256':\n case 'RS384':\n case 'RS512':\n algorithm = { name: 'RSASSA-PKCS1-v1_5', hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512':\n algorithm = {\n name: 'RSA-OAEP',\n hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}`,\n };\n keyUsages = jwk.d ? ['decrypt', 'unwrapKey'] : ['encrypt', 'wrapKey'];\n break;\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n }\n break;\n }\n case 'EC': {\n switch (jwk.alg) {\n case 'ES256':\n algorithm = { name: 'ECDSA', namedCurve: 'P-256' };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ES384':\n algorithm = { name: 'ECDSA', namedCurve: 'P-384' };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ES512':\n algorithm = { name: 'ECDSA', namedCurve: 'P-521' };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n algorithm = { name: 'ECDH', namedCurve: jwk.crv };\n keyUsages = jwk.d ? ['deriveBits'] : [];\n break;\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n }\n break;\n }\n case 'OKP': {\n switch (jwk.alg) {\n case 'Ed25519':\n algorithm = { name: 'Ed25519' };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'EdDSA':\n algorithm = { name: jwk.crv };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n algorithm = { name: jwk.crv };\n keyUsages = jwk.d ? ['deriveBits'] : [];\n break;\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n }\n break;\n }\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"kty\" (Key Type) Parameter value');\n }\n return { algorithm, keyUsages };\n}\nconst parse = async (jwk) => {\n if (!jwk.alg) {\n throw new TypeError('\"alg\" argument is required when \"jwk.alg\" is not present');\n }\n const { algorithm, keyUsages } = subtleMapping(jwk);\n const rest = [\n algorithm,\n jwk.ext ?? false,\n jwk.key_ops ?? keyUsages,\n ];\n const keyData = { ...jwk };\n delete keyData.alg;\n delete keyData.use;\n return crypto$1.subtle.importKey('jwk', keyData, ...rest);\n};\nvar asKeyObject = parse;\n\nconst exportKeyValue = (k) => decode$1(k);\nlet privCache;\nlet pubCache;\nconst isKeyObject = (key) => {\n return key?.[Symbol.toStringTag] === 'KeyObject';\n};\nconst importAndCache = async (cache, key, jwk, alg, freeze = false) => {\n let cached = cache.get(key);\n if (cached?.[alg]) {\n return cached[alg];\n }\n const cryptoKey = await asKeyObject({ ...jwk, alg });\n if (freeze)\n Object.freeze(key);\n if (!cached) {\n cache.set(key, { [alg]: cryptoKey });\n }\n else {\n cached[alg] = cryptoKey;\n }\n return cryptoKey;\n};\nconst normalizePublicKey = (key, alg) => {\n if (isKeyObject(key)) {\n let jwk = key.export({ format: 'jwk' });\n delete jwk.d;\n delete jwk.dp;\n delete jwk.dq;\n delete jwk.p;\n delete jwk.q;\n delete jwk.qi;\n if (jwk.k) {\n return exportKeyValue(jwk.k);\n }\n pubCache || (pubCache = new WeakMap());\n return importAndCache(pubCache, key, jwk, alg);\n }\n if (isJWK(key)) {\n if (key.k)\n return decode$1(key.k);\n pubCache || (pubCache = new WeakMap());\n const cryptoKey = importAndCache(pubCache, key, key, alg, true);\n return cryptoKey;\n }\n return key;\n};\nconst normalizePrivateKey = (key, alg) => {\n if (isKeyObject(key)) {\n let jwk = key.export({ format: 'jwk' });\n if (jwk.k) {\n return exportKeyValue(jwk.k);\n }\n privCache || (privCache = new WeakMap());\n return importAndCache(privCache, key, jwk, alg);\n }\n if (isJWK(key)) {\n if (key.k)\n return decode$1(key.k);\n privCache || (privCache = new WeakMap());\n const cryptoKey = importAndCache(privCache, key, key, alg, true);\n return cryptoKey;\n }\n return key;\n};\nvar normalize = { normalizePublicKey, normalizePrivateKey };\n\nasync function importJWK(jwk, alg) {\n if (!isObject(jwk)) {\n throw new TypeError('JWK must be an object');\n }\n alg || (alg = jwk.alg);\n switch (jwk.kty) {\n case 'oct':\n if (typeof jwk.k !== 'string' || !jwk.k) {\n throw new TypeError('missing \"k\" (Key Value) Parameter value');\n }\n return decode$1(jwk.k);\n case 'RSA':\n if ('oth' in jwk && jwk.oth !== undefined) {\n throw new JOSENotSupported('RSA JWK \"oth\" (Other Primes Info) Parameter value is not supported');\n }\n case 'EC':\n case 'OKP':\n return asKeyObject({ ...jwk, alg });\n default:\n throw new JOSENotSupported('Unsupported \"kty\" (Key Type) Parameter value');\n }\n}\n\nconst tag = (key) => key?.[Symbol.toStringTag];\nconst jwkMatchesOp = (alg, key, usage) => {\n if (key.use !== undefined && key.use !== 'sig') {\n throw new TypeError('Invalid key for this operation, when present its use must be sig');\n }\n if (key.key_ops !== undefined && key.key_ops.includes?.(usage) !== true) {\n throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${usage}`);\n }\n if (key.alg !== undefined && key.alg !== alg) {\n throw new TypeError(`Invalid key for this operation, when present its alg must be ${alg}`);\n }\n return true;\n};\nconst symmetricTypeCheck = (alg, key, usage, allowJwk) => {\n if (key instanceof Uint8Array)\n return;\n if (allowJwk && isJWK(key)) {\n if (isSecretJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK \"kty\" (Key Type) equal to \"oct\" and the JWK \"k\" (Key Value) present`);\n }\n if (!isKeyLike(key)) {\n throw new TypeError(withAlg(alg, key, ...types, 'Uint8Array', allowJwk ? 'JSON Web Key' : null));\n }\n if (key.type !== 'secret') {\n throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type \"secret\"`);\n }\n};\nconst asymmetricTypeCheck = (alg, key, usage, allowJwk) => {\n if (allowJwk && isJWK(key)) {\n switch (usage) {\n case 'sign':\n if (isPrivateJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for this operation be a private JWK`);\n case 'verify':\n if (isPublicJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for this operation be a public JWK`);\n }\n }\n if (!isKeyLike(key)) {\n throw new TypeError(withAlg(alg, key, ...types, allowJwk ? 'JSON Web Key' : null));\n }\n if (key.type === 'secret') {\n throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type \"secret\"`);\n }\n if (usage === 'sign' && key.type === 'public') {\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm signing must be of type \"private\"`);\n }\n if (usage === 'decrypt' && key.type === 'public') {\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm decryption must be of type \"private\"`);\n }\n if (key.algorithm && usage === 'verify' && key.type === 'private') {\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm verifying must be of type \"public\"`);\n }\n if (key.algorithm && usage === 'encrypt' && key.type === 'private') {\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm encryption must be of type \"public\"`);\n }\n};\nfunction checkKeyType(allowJwk, alg, key, usage) {\n const symmetric = alg.startsWith('HS') ||\n alg === 'dir' ||\n alg.startsWith('PBES2') ||\n /^A\\d{3}(?:GCM)?KW$/.test(alg);\n if (symmetric) {\n symmetricTypeCheck(alg, key, usage, allowJwk);\n }\n else {\n asymmetricTypeCheck(alg, key, usage, allowJwk);\n }\n}\ncheckKeyType.bind(undefined, false);\nconst checkKeyTypeWithJwk = checkKeyType.bind(undefined, true);\n\nfunction validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {\n if (joseHeader.crit !== undefined && protectedHeader?.crit === undefined) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be integrity protected');\n }\n if (!protectedHeader || protectedHeader.crit === undefined) {\n return new Set();\n }\n if (!Array.isArray(protectedHeader.crit) ||\n protectedHeader.crit.length === 0 ||\n protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be an array of non-empty strings when present');\n }\n let recognized;\n if (recognizedOption !== undefined) {\n recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]);\n }\n else {\n recognized = recognizedDefault;\n }\n for (const parameter of protectedHeader.crit) {\n if (!recognized.has(parameter)) {\n throw new JOSENotSupported(`Extension Header Parameter \"${parameter}\" is not recognized`);\n }\n if (joseHeader[parameter] === undefined) {\n throw new Err(`Extension Header Parameter \"${parameter}\" is missing`);\n }\n if (recognized.get(parameter) && protectedHeader[parameter] === undefined) {\n throw new Err(`Extension Header Parameter \"${parameter}\" MUST be integrity protected`);\n }\n }\n return new Set(protectedHeader.crit);\n}\n\nconst validateAlgorithms = (option, algorithms) => {\n if (algorithms !== undefined &&\n (!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== 'string'))) {\n throw new TypeError(`\"${option}\" option must be an array of strings`);\n }\n if (!algorithms) {\n return undefined;\n }\n return new Set(algorithms);\n};\nvar validateAlgorithms$1 = validateAlgorithms;\n\nconst keyToJWK = async (key) => {\n if (key instanceof Uint8Array) {\n return {\n kty: 'oct',\n k: encode(key),\n };\n }\n if (!isCryptoKey(key)) {\n throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array'));\n }\n if (!key.extractable) {\n throw new TypeError('non-extractable CryptoKey cannot be exported as a JWK');\n }\n const { ext, key_ops, alg, use, ...jwk } = await crypto$1.subtle.exportKey('jwk', key);\n return jwk;\n};\nvar keyToJWK$1 = keyToJWK;\n\nasync function exportJWK(key) {\n return keyToJWK$1(key);\n}\n\nfunction subtleDsa(alg, algorithm) {\n const hash = `SHA-${alg.slice(-3)}`;\n switch (alg) {\n case 'HS256':\n case 'HS384':\n case 'HS512':\n return { hash, name: 'HMAC' };\n case 'PS256':\n case 'PS384':\n case 'PS512':\n return { hash, name: 'RSA-PSS', saltLength: alg.slice(-3) >> 3 };\n case 'RS256':\n case 'RS384':\n case 'RS512':\n return { hash, name: 'RSASSA-PKCS1-v1_5' };\n case 'ES256':\n case 'ES384':\n case 'ES512':\n return { hash, name: 'ECDSA', namedCurve: algorithm.namedCurve };\n case 'Ed25519':\n return { name: 'Ed25519' };\n case 'EdDSA':\n return { name: algorithm.name };\n default:\n throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n }\n}\n\nasync function getCryptoKey(alg, key, usage) {\n if (usage === 'sign') {\n key = await normalize.normalizePrivateKey(key, alg);\n }\n if (usage === 'verify') {\n key = await normalize.normalizePublicKey(key, alg);\n }\n if (isCryptoKey(key)) {\n checkSigCryptoKey(key, alg, usage);\n return key;\n }\n if (key instanceof Uint8Array) {\n if (!alg.startsWith('HS')) {\n throw new TypeError(invalidKeyInput(key, ...types));\n }\n return crypto$1.subtle.importKey('raw', key, { hash: `SHA-${alg.slice(-3)}`, name: 'HMAC' }, false, [usage]);\n }\n throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array', 'JSON Web Key'));\n}\n\nconst verify = async (alg, key, signature, data) => {\n const cryptoKey = await getCryptoKey(alg, key, 'verify');\n checkKeyLength(alg, cryptoKey);\n const algorithm = subtleDsa(alg, cryptoKey.algorithm);\n try {\n return await crypto$1.subtle.verify(algorithm, cryptoKey, signature, data);\n }\n catch {\n return false;\n }\n};\nvar verify$1 = verify;\n\nasync function flattenedVerify(jws, key, options) {\n if (!isObject(jws)) {\n throw new JWSInvalid('Flattened JWS must be an object');\n }\n if (jws.protected === undefined && jws.header === undefined) {\n throw new JWSInvalid('Flattened JWS must have either of the \"protected\" or \"header\" members');\n }\n if (jws.protected !== undefined && typeof jws.protected !== 'string') {\n throw new JWSInvalid('JWS Protected Header incorrect type');\n }\n if (jws.payload === undefined) {\n throw new JWSInvalid('JWS Payload missing');\n }\n if (typeof jws.signature !== 'string') {\n throw new JWSInvalid('JWS Signature missing or incorrect type');\n }\n if (jws.header !== undefined && !isObject(jws.header)) {\n throw new JWSInvalid('JWS Unprotected Header incorrect type');\n }\n let parsedProt = {};\n if (jws.protected) {\n try {\n const protectedHeader = decode$1(jws.protected);\n parsedProt = JSON.parse(decoder.decode(protectedHeader));\n }\n catch {\n throw new JWSInvalid('JWS Protected Header is invalid');\n }\n }\n if (!isDisjoint$1(parsedProt, jws.header)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n }\n const joseHeader = {\n ...parsedProt,\n ...jws.header,\n };\n const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options?.crit, parsedProt, joseHeader);\n let b64 = true;\n if (extensions.has('b64')) {\n b64 = parsedProt.b64;\n if (typeof b64 !== 'boolean') {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== 'string' || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n const algorithms = options && validateAlgorithms$1('algorithms', options.algorithms);\n if (algorithms && !algorithms.has(alg)) {\n throw new JOSEAlgNotAllowed('\"alg\" (Algorithm) Header Parameter value not allowed');\n }\n if (b64) {\n if (typeof jws.payload !== 'string') {\n throw new JWSInvalid('JWS Payload must be a string');\n }\n }\n else if (typeof jws.payload !== 'string' && !(jws.payload instanceof Uint8Array)) {\n throw new JWSInvalid('JWS Payload must be a string or an Uint8Array instance');\n }\n let resolvedKey = false;\n if (typeof key === 'function') {\n key = await key(parsedProt, jws);\n resolvedKey = true;\n checkKeyTypeWithJwk(alg, key, 'verify');\n if (isJWK(key)) {\n key = await importJWK(key, alg);\n }\n }\n else {\n checkKeyTypeWithJwk(alg, key, 'verify');\n }\n const data = concat(encoder.encode(jws.protected ?? ''), encoder.encode('.'), typeof jws.payload === 'string' ? encoder.encode(jws.payload) : jws.payload);\n let signature;\n try {\n signature = decode$1(jws.signature);\n }\n catch {\n throw new JWSInvalid('Failed to base64url decode the signature');\n }\n const verified = await verify$1(alg, key, signature, data);\n if (!verified) {\n throw new JWSSignatureVerificationFailed();\n }\n let payload;\n if (b64) {\n try {\n payload = decode$1(jws.payload);\n }\n catch {\n throw new JWSInvalid('Failed to base64url decode the payload');\n }\n }\n else if (typeof jws.payload === 'string') {\n payload = encoder.encode(jws.payload);\n }\n else {\n payload = jws.payload;\n }\n const result = { payload };\n if (jws.protected !== undefined) {\n result.protectedHeader = parsedProt;\n }\n if (jws.header !== undefined) {\n result.unprotectedHeader = jws.header;\n }\n if (resolvedKey) {\n return { ...result, key };\n }\n return result;\n}\n\nasync function compactVerify(jws, key, options) {\n if (jws instanceof Uint8Array) {\n jws = decoder.decode(jws);\n }\n if (typeof jws !== 'string') {\n throw new JWSInvalid('Compact JWS must be a string or Uint8Array');\n }\n const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split('.');\n if (length !== 3) {\n throw new JWSInvalid('Invalid Compact JWS');\n }\n const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options);\n const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };\n if (typeof key === 'function') {\n return { ...result, key: verified.key };\n }\n return result;\n}\n\nvar epoch = (date) => Math.floor(date.getTime() / 1000);\n\nconst minute = 60;\nconst hour = minute * 60;\nconst day = hour * 24;\nconst week = day * 7;\nconst year = day * 365.25;\nconst REGEX = /^(\\+|\\-)? ?(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;\nvar secs = (str) => {\n const matched = REGEX.exec(str);\n if (!matched || (matched[4] && matched[1])) {\n throw new TypeError('Invalid time period format');\n }\n const value = parseFloat(matched[2]);\n const unit = matched[3].toLowerCase();\n let numericDate;\n switch (unit) {\n case 'sec':\n case 'secs':\n case 'second':\n case 'seconds':\n case 's':\n numericDate = Math.round(value);\n break;\n case 'minute':\n case 'minutes':\n case 'min':\n case 'mins':\n case 'm':\n numericDate = Math.round(value * minute);\n break;\n case 'hour':\n case 'hours':\n case 'hr':\n case 'hrs':\n case 'h':\n numericDate = Math.round(value * hour);\n break;\n case 'day':\n case 'days':\n case 'd':\n numericDate = Math.round(value * day);\n break;\n case 'week':\n case 'weeks':\n case 'w':\n numericDate = Math.round(value * week);\n break;\n default:\n numericDate = Math.round(value * year);\n break;\n }\n if (matched[1] === '-' || matched[4] === 'ago') {\n return -numericDate;\n }\n return numericDate;\n};\n\nconst normalizeTyp = (value) => value.toLowerCase().replace(/^application\\//, '');\nconst checkAudiencePresence = (audPayload, audOption) => {\n if (typeof audPayload === 'string') {\n return audOption.includes(audPayload);\n }\n if (Array.isArray(audPayload)) {\n return audOption.some(Set.prototype.has.bind(new Set(audPayload)));\n }\n return false;\n};\nvar jwtPayload = (protectedHeader, encodedPayload, options = {}) => {\n let payload;\n try {\n payload = JSON.parse(decoder.decode(encodedPayload));\n }\n catch {\n }\n if (!isObject(payload)) {\n throw new JWTInvalid('JWT Claims Set must be a top-level JSON object');\n }\n const { typ } = options;\n if (typ &&\n (typeof protectedHeader.typ !== 'string' ||\n normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) {\n throw new JWTClaimValidationFailed('unexpected \"typ\" JWT header value', payload, 'typ', 'check_failed');\n }\n const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options;\n const presenceCheck = [...requiredClaims];\n if (maxTokenAge !== undefined)\n presenceCheck.push('iat');\n if (audience !== undefined)\n presenceCheck.push('aud');\n if (subject !== undefined)\n presenceCheck.push('sub');\n if (issuer !== undefined)\n presenceCheck.push('iss');\n for (const claim of new Set(presenceCheck.reverse())) {\n if (!(claim in payload)) {\n throw new JWTClaimValidationFailed(`missing required \"${claim}\" claim`, payload, claim, 'missing');\n }\n }\n if (issuer &&\n !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) {\n throw new JWTClaimValidationFailed('unexpected \"iss\" claim value', payload, 'iss', 'check_failed');\n }\n if (subject && payload.sub !== subject) {\n throw new JWTClaimValidationFailed('unexpected \"sub\" claim value', payload, 'sub', 'check_failed');\n }\n if (audience &&\n !checkAudiencePresence(payload.aud, typeof audience === 'string' ? [audience] : audience)) {\n throw new JWTClaimValidationFailed('unexpected \"aud\" claim value', payload, 'aud', 'check_failed');\n }\n let tolerance;\n switch (typeof options.clockTolerance) {\n case 'string':\n tolerance = secs(options.clockTolerance);\n break;\n case 'number':\n tolerance = options.clockTolerance;\n break;\n case 'undefined':\n tolerance = 0;\n break;\n default:\n throw new TypeError('Invalid clockTolerance option type');\n }\n const { currentDate } = options;\n const now = epoch(currentDate || new Date());\n if ((payload.iat !== undefined || maxTokenAge) && typeof payload.iat !== 'number') {\n throw new JWTClaimValidationFailed('\"iat\" claim must be a number', payload, 'iat', 'invalid');\n }\n if (payload.nbf !== undefined) {\n if (typeof payload.nbf !== 'number') {\n throw new JWTClaimValidationFailed('\"nbf\" claim must be a number', payload, 'nbf', 'invalid');\n }\n if (payload.nbf > now + tolerance) {\n throw new JWTClaimValidationFailed('\"nbf\" claim timestamp check failed', payload, 'nbf', 'check_failed');\n }\n }\n if (payload.exp !== undefined) {\n if (typeof payload.exp !== 'number') {\n throw new JWTClaimValidationFailed('\"exp\" claim must be a number', payload, 'exp', 'invalid');\n }\n if (payload.exp <= now - tolerance) {\n throw new JWTExpired('\"exp\" claim timestamp check failed', payload, 'exp', 'check_failed');\n }\n }\n if (maxTokenAge) {\n const age = now - payload.iat;\n const max = typeof maxTokenAge === 'number' ? maxTokenAge : secs(maxTokenAge);\n if (age - tolerance > max) {\n throw new JWTExpired('\"iat\" claim timestamp check failed (too far in the past)', payload, 'iat', 'check_failed');\n }\n if (age < 0 - tolerance) {\n throw new JWTClaimValidationFailed('\"iat\" claim timestamp check failed (it should be in the past)', payload, 'iat', 'check_failed');\n }\n }\n return payload;\n};\n\nasync function jwtVerify(jwt, key, options) {\n const verified = await compactVerify(jwt, key, options);\n if (verified.protectedHeader.crit?.includes('b64') && verified.protectedHeader.b64 === false) {\n throw new JWTInvalid('JWTs MUST NOT use unencoded payload');\n }\n const payload = jwtPayload(verified.protectedHeader, verified.payload, options);\n const result = { payload, protectedHeader: verified.protectedHeader };\n if (typeof key === 'function') {\n return { ...result, key: verified.key };\n }\n return result;\n}\n\nconst sign = async (alg, key, data) => {\n const cryptoKey = await getCryptoKey(alg, key, 'sign');\n checkKeyLength(alg, cryptoKey);\n const signature = await crypto$1.subtle.sign(subtleDsa(alg, cryptoKey.algorithm), cryptoKey, data);\n return new Uint8Array(signature);\n};\nvar sign$1 = sign;\n\nclass FlattenedSign {\n constructor(payload) {\n if (!(payload instanceof Uint8Array)) {\n throw new TypeError('payload must be an instance of Uint8Array');\n }\n this._payload = payload;\n }\n setProtectedHeader(protectedHeader) {\n if (this._protectedHeader) {\n throw new TypeError('setProtectedHeader can only be called once');\n }\n this._protectedHeader = protectedHeader;\n return this;\n }\n setUnprotectedHeader(unprotectedHeader) {\n if (this._unprotectedHeader) {\n throw new TypeError('setUnprotectedHeader can only be called once');\n }\n this._unprotectedHeader = unprotectedHeader;\n return this;\n }\n async sign(key, options) {\n if (!this._protectedHeader && !this._unprotectedHeader) {\n throw new JWSInvalid('either setProtectedHeader or setUnprotectedHeader must be called before #sign()');\n }\n if (!isDisjoint$1(this._protectedHeader, this._unprotectedHeader)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n }\n const joseHeader = {\n ...this._protectedHeader,\n ...this._unprotectedHeader,\n };\n const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options?.crit, this._protectedHeader, joseHeader);\n let b64 = true;\n if (extensions.has('b64')) {\n b64 = this._protectedHeader.b64;\n if (typeof b64 !== 'boolean') {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== 'string' || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n checkKeyTypeWithJwk(alg, key, 'sign');\n let payload = this._payload;\n if (b64) {\n payload = encoder.encode(encode(payload));\n }\n let protectedHeader;\n if (this._protectedHeader) {\n protectedHeader = encoder.encode(encode(JSON.stringify(this._protectedHeader)));\n }\n else {\n protectedHeader = encoder.encode('');\n }\n const data = concat(protectedHeader, encoder.encode('.'), payload);\n const signature = await sign$1(alg, key, data);\n const jws = {\n signature: encode(signature),\n payload: '',\n };\n if (b64) {\n jws.payload = decoder.decode(payload);\n }\n if (this._unprotectedHeader) {\n jws.header = this._unprotectedHeader;\n }\n if (this._protectedHeader) {\n jws.protected = decoder.decode(protectedHeader);\n }\n return jws;\n }\n}\n\nclass CompactSign {\n constructor(payload) {\n this._flattened = new FlattenedSign(payload);\n }\n setProtectedHeader(protectedHeader) {\n this._flattened.setProtectedHeader(protectedHeader);\n return this;\n }\n async sign(key, options) {\n const jws = await this._flattened.sign(key, options);\n if (jws.payload === undefined) {\n throw new TypeError('use the flattened module for creating JWS with b64: false');\n }\n return `${jws.protected}.${jws.payload}.${jws.signature}`;\n }\n}\n\nfunction validateInput(label, input) {\n if (!Number.isFinite(input)) {\n throw new TypeError(`Invalid ${label} input`);\n }\n return input;\n}\nclass ProduceJWT {\n constructor(payload = {}) {\n if (!isObject(payload)) {\n throw new TypeError('JWT Claims Set MUST be an object');\n }\n this._payload = payload;\n }\n setIssuer(issuer) {\n this._payload = { ...this._payload, iss: issuer };\n return this;\n }\n setSubject(subject) {\n this._payload = { ...this._payload, sub: subject };\n return this;\n }\n setAudience(audience) {\n this._payload = { ...this._payload, aud: audience };\n return this;\n }\n setJti(jwtId) {\n this._payload = { ...this._payload, jti: jwtId };\n return this;\n }\n setNotBefore(input) {\n if (typeof input === 'number') {\n this._payload = { ...this._payload, nbf: validateInput('setNotBefore', input) };\n }\n else if (input instanceof Date) {\n this._payload = { ...this._payload, nbf: validateInput('setNotBefore', epoch(input)) };\n }\n else {\n this._payload = { ...this._payload, nbf: epoch(new Date()) + secs(input) };\n }\n return this;\n }\n setExpirationTime(input) {\n if (typeof input === 'number') {\n this._payload = { ...this._payload, exp: validateInput('setExpirationTime', input) };\n }\n else if (input instanceof Date) {\n this._payload = { ...this._payload, exp: validateInput('setExpirationTime', epoch(input)) };\n }\n else {\n this._payload = { ...this._payload, exp: epoch(new Date()) + secs(input) };\n }\n return this;\n }\n setIssuedAt(input) {\n if (typeof input === 'undefined') {\n this._payload = { ...this._payload, iat: epoch(new Date()) };\n }\n else if (input instanceof Date) {\n this._payload = { ...this._payload, iat: validateInput('setIssuedAt', epoch(input)) };\n }\n else if (typeof input === 'string') {\n this._payload = {\n ...this._payload,\n iat: validateInput('setIssuedAt', epoch(new Date()) + secs(input)),\n };\n }\n else {\n this._payload = { ...this._payload, iat: validateInput('setIssuedAt', input) };\n }\n return this;\n }\n}\n\nclass SignJWT extends ProduceJWT {\n setProtectedHeader(protectedHeader) {\n this._protectedHeader = protectedHeader;\n return this;\n }\n async sign(key, options) {\n const sig = new CompactSign(encoder.encode(JSON.stringify(this._payload)));\n sig.setProtectedHeader(this._protectedHeader);\n if (Array.isArray(this._protectedHeader?.crit) &&\n this._protectedHeader.crit.includes('b64') &&\n this._protectedHeader.b64 === false) {\n throw new JWTInvalid('JWTs MUST NOT use unencoded payload');\n }\n return sig.sign(key, options);\n }\n}\n\nconst check = (value, description) => {\n if (typeof value !== 'string' || !value) {\n throw new JWKInvalid(`${description} missing or invalid`);\n }\n};\nasync function calculateJwkThumbprint(jwk, digestAlgorithm) {\n if (!isObject(jwk)) {\n throw new TypeError('JWK must be an object');\n }\n digestAlgorithm ?? (digestAlgorithm = 'sha256');\n if (digestAlgorithm !== 'sha256' &&\n digestAlgorithm !== 'sha384' &&\n digestAlgorithm !== 'sha512') {\n throw new TypeError('digestAlgorithm must one of \"sha256\", \"sha384\", or \"sha512\"');\n }\n let components;\n switch (jwk.kty) {\n case 'EC':\n check(jwk.crv, '\"crv\" (Curve) Parameter');\n check(jwk.x, '\"x\" (X Coordinate) Parameter');\n check(jwk.y, '\"y\" (Y Coordinate) Parameter');\n components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y };\n break;\n case 'OKP':\n check(jwk.crv, '\"crv\" (Subtype of Key Pair) Parameter');\n check(jwk.x, '\"x\" (Public Key) Parameter');\n components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x };\n break;\n case 'RSA':\n check(jwk.e, '\"e\" (Exponent) Parameter');\n check(jwk.n, '\"n\" (Modulus) Parameter');\n components = { e: jwk.e, kty: jwk.kty, n: jwk.n };\n break;\n case 'oct':\n check(jwk.k, '\"k\" (Key Value) Parameter');\n components = { k: jwk.k, kty: jwk.kty };\n break;\n default:\n throw new JOSENotSupported('\"kty\" (Key Type) Parameter missing or unsupported');\n }\n const data = encoder.encode(JSON.stringify(components));\n return encode(await digest$1(digestAlgorithm, data));\n}\n\nfunction getKtyFromAlg(alg) {\n switch (typeof alg === 'string' && alg.slice(0, 2)) {\n case 'RS':\n case 'PS':\n return 'RSA';\n case 'ES':\n return 'EC';\n case 'Ed':\n return 'OKP';\n default:\n throw new JOSENotSupported('Unsupported \"alg\" value for a JSON Web Key Set');\n }\n}\nfunction isJWKSLike(jwks) {\n return (jwks &&\n typeof jwks === 'object' &&\n Array.isArray(jwks.keys) &&\n jwks.keys.every(isJWKLike));\n}\nfunction isJWKLike(key) {\n return isObject(key);\n}\nfunction clone(obj) {\n if (typeof structuredClone === 'function') {\n return structuredClone(obj);\n }\n return JSON.parse(JSON.stringify(obj));\n}\nclass LocalJWKSet {\n constructor(jwks) {\n this._cached = new WeakMap();\n if (!isJWKSLike(jwks)) {\n throw new JWKSInvalid('JSON Web Key Set malformed');\n }\n this._jwks = clone(jwks);\n }\n async getKey(protectedHeader, token) {\n const { alg, kid } = { ...protectedHeader, ...token?.header };\n const kty = getKtyFromAlg(alg);\n const candidates = this._jwks.keys.filter((jwk) => {\n let candidate = kty === jwk.kty;\n if (candidate && typeof kid === 'string') {\n candidate = kid === jwk.kid;\n }\n if (candidate && typeof jwk.alg === 'string') {\n candidate = alg === jwk.alg;\n }\n if (candidate && typeof jwk.use === 'string') {\n candidate = jwk.use === 'sig';\n }\n if (candidate && Array.isArray(jwk.key_ops)) {\n candidate = jwk.key_ops.includes('verify');\n }\n if (candidate) {\n switch (alg) {\n case 'ES256':\n candidate = jwk.crv === 'P-256';\n break;\n case 'ES256K':\n candidate = jwk.crv === 'secp256k1';\n break;\n case 'ES384':\n candidate = jwk.crv === 'P-384';\n break;\n case 'ES512':\n candidate = jwk.crv === 'P-521';\n break;\n case 'Ed25519':\n candidate = jwk.crv === 'Ed25519';\n break;\n case 'EdDSA':\n candidate = jwk.crv === 'Ed25519' || jwk.crv === 'Ed448';\n break;\n }\n }\n return candidate;\n });\n const { 0: jwk, length } = candidates;\n if (length === 0) {\n throw new JWKSNoMatchingKey();\n }\n if (length !== 1) {\n const error = new JWKSMultipleMatchingKeys();\n const { _cached } = this;\n error[Symbol.asyncIterator] = async function* () {\n for (const jwk of candidates) {\n try {\n yield await importWithAlgCache(_cached, jwk, alg);\n }\n catch { }\n }\n };\n throw error;\n }\n return importWithAlgCache(this._cached, jwk, alg);\n }\n}\nasync function importWithAlgCache(cache, jwk, alg) {\n const cached = cache.get(jwk) || cache.set(jwk, {}).get(jwk);\n if (cached[alg] === undefined) {\n const key = await importJWK({ ...jwk, ext: true }, alg);\n if (key instanceof Uint8Array || key.type !== 'public') {\n throw new JWKSInvalid('JSON Web Key Set members must be public keys');\n }\n cached[alg] = key;\n }\n return cached[alg];\n}\nfunction createLocalJWKSet(jwks) {\n const set = new LocalJWKSet(jwks);\n const localJWKSet = async (protectedHeader, token) => set.getKey(protectedHeader, token);\n Object.defineProperties(localJWKSet, {\n jwks: {\n value: () => clone(set._jwks),\n enumerable: true,\n configurable: false,\n writable: false,\n },\n });\n return localJWKSet;\n}\n\nconst fetchJwks = async (url, timeout, options) => {\n let controller;\n let id;\n let timedOut = false;\n if (typeof AbortController === 'function') {\n controller = new AbortController();\n id = setTimeout(() => {\n timedOut = true;\n controller.abort();\n }, timeout);\n }\n const response = await fetch(url.href, {\n signal: controller ? controller.signal : undefined,\n redirect: 'manual',\n headers: options.headers,\n }).catch((err) => {\n if (timedOut)\n throw new JWKSTimeout();\n throw err;\n });\n if (id !== undefined)\n clearTimeout(id);\n if (response.status !== 200) {\n throw new JOSEError('Expected 200 OK from the JSON Web Key Set HTTP response');\n }\n try {\n return await response.json();\n }\n catch {\n throw new JOSEError('Failed to parse the JSON Web Key Set HTTP response as JSON');\n }\n};\nvar fetchJwks$1 = fetchJwks;\n\nfunction isCloudflareWorkers() {\n return (typeof WebSocketPair !== 'undefined' ||\n (typeof navigator !== 'undefined' && navigator.userAgent === 'Cloudflare-Workers') ||\n (typeof EdgeRuntime !== 'undefined' && EdgeRuntime === 'vercel'));\n}\nlet USER_AGENT;\nif (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {\n const NAME = 'jose';\n const VERSION = 'v5.10.0';\n USER_AGENT = `${NAME}/${VERSION}`;\n}\nconst jwksCache = Symbol();\nfunction isFreshJwksCache(input, cacheMaxAge) {\n if (typeof input !== 'object' || input === null) {\n return false;\n }\n if (!('uat' in input) || typeof input.uat !== 'number' || Date.now() - input.uat >= cacheMaxAge) {\n return false;\n }\n if (!('jwks' in input) ||\n !isObject(input.jwks) ||\n !Array.isArray(input.jwks.keys) ||\n !Array.prototype.every.call(input.jwks.keys, isObject)) {\n return false;\n }\n return true;\n}\nclass RemoteJWKSet {\n constructor(url, options) {\n if (!(url instanceof URL)) {\n throw new TypeError('url must be an instance of URL');\n }\n this._url = new URL(url.href);\n this._options = { agent: options?.agent, headers: options?.headers };\n this._timeoutDuration =\n typeof options?.timeoutDuration === 'number' ? options?.timeoutDuration : 5000;\n this._cooldownDuration =\n typeof options?.cooldownDuration === 'number' ? options?.cooldownDuration : 30000;\n this._cacheMaxAge = typeof options?.cacheMaxAge === 'number' ? options?.cacheMaxAge : 600000;\n if (options?.[jwksCache] !== undefined) {\n this._cache = options?.[jwksCache];\n if (isFreshJwksCache(options?.[jwksCache], this._cacheMaxAge)) {\n this._jwksTimestamp = this._cache.uat;\n this._local = createLocalJWKSet(this._cache.jwks);\n }\n }\n }\n coolingDown() {\n return typeof this._jwksTimestamp === 'number'\n ? Date.now() < this._jwksTimestamp + this._cooldownDuration\n : false;\n }\n fresh() {\n return typeof this._jwksTimestamp === 'number'\n ? Date.now() < this._jwksTimestamp + this._cacheMaxAge\n : false;\n }\n async getKey(protectedHeader, token) {\n if (!this._local || !this.fresh()) {\n await this.reload();\n }\n try {\n return await this._local(protectedHeader, token);\n }\n catch (err) {\n if (err instanceof JWKSNoMatchingKey) {\n if (this.coolingDown() === false) {\n await this.reload();\n return this._local(protectedHeader, token);\n }\n }\n throw err;\n }\n }\n async reload() {\n if (this._pendingFetch && isCloudflareWorkers()) {\n this._pendingFetch = undefined;\n }\n const headers = new Headers(this._options.headers);\n if (USER_AGENT && !headers.has('User-Agent')) {\n headers.set('User-Agent', USER_AGENT);\n this._options.headers = Object.fromEntries(headers.entries());\n }\n this._pendingFetch || (this._pendingFetch = fetchJwks$1(this._url, this._timeoutDuration, this._options)\n .then((json) => {\n this._local = createLocalJWKSet(json);\n if (this._cache) {\n this._cache.uat = Date.now();\n this._cache.jwks = json;\n }\n this._jwksTimestamp = Date.now();\n this._pendingFetch = undefined;\n })\n .catch((err) => {\n this._pendingFetch = undefined;\n throw err;\n }));\n await this._pendingFetch;\n }\n}\nfunction createRemoteJWKSet(url, options) {\n const set = new RemoteJWKSet(url, options);\n const remoteJWKSet = async (protectedHeader, token) => set.getKey(protectedHeader, token);\n Object.defineProperties(remoteJWKSet, {\n coolingDown: {\n get: () => set.coolingDown(),\n enumerable: true,\n configurable: false,\n },\n fresh: {\n get: () => set.fresh(),\n enumerable: true,\n configurable: false,\n },\n reload: {\n value: () => set.reload(),\n enumerable: true,\n configurable: false,\n writable: false,\n },\n reloading: {\n get: () => !!set._pendingFetch,\n enumerable: true,\n configurable: false,\n },\n jwks: {\n value: () => set._local?.jwks(),\n enumerable: true,\n configurable: false,\n writable: false,\n },\n });\n return remoteJWKSet;\n}\n\nconst decode = decode$1;\n\nfunction decodeJwt(jwt) {\n if (typeof jwt !== 'string')\n throw new JWTInvalid('JWTs must use Compact JWS serialization, JWT must be a string');\n const { 1: payload, length } = jwt.split('.');\n if (length === 5)\n throw new JWTInvalid('Only JWTs using Compact JWS serialization can be decoded');\n if (length !== 3)\n throw new JWTInvalid('Invalid JWT');\n if (!payload)\n throw new JWTInvalid('JWTs must contain a payload');\n let decoded;\n try {\n decoded = decode(payload);\n }\n catch {\n throw new JWTInvalid('Failed to base64url decode the payload');\n }\n let result;\n try {\n result = JSON.parse(decoder.decode(decoded));\n }\n catch {\n throw new JWTInvalid('Failed to parse the decoded payload as JSON');\n }\n if (!isObject(result))\n throw new JWTInvalid('Invalid JWT Claims Set');\n return result;\n}\n\nfunction getModulusLengthOption(options) {\n const modulusLength = options?.modulusLength ?? 2048;\n if (typeof modulusLength !== 'number' || modulusLength < 2048) {\n throw new JOSENotSupported('Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used');\n }\n return modulusLength;\n}\nasync function generateKeyPair$1(alg, options) {\n let algorithm;\n let keyUsages;\n switch (alg) {\n case 'PS256':\n case 'PS384':\n case 'PS512':\n algorithm = {\n name: 'RSA-PSS',\n hash: `SHA-${alg.slice(-3)}`,\n publicExponent: new Uint8Array([0x01, 0x00, 0x01]),\n modulusLength: getModulusLengthOption(options),\n };\n keyUsages = ['sign', 'verify'];\n break;\n case 'RS256':\n case 'RS384':\n case 'RS512':\n algorithm = {\n name: 'RSASSA-PKCS1-v1_5',\n hash: `SHA-${alg.slice(-3)}`,\n publicExponent: new Uint8Array([0x01, 0x00, 0x01]),\n modulusLength: getModulusLengthOption(options),\n };\n keyUsages = ['sign', 'verify'];\n break;\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512':\n algorithm = {\n name: 'RSA-OAEP',\n hash: `SHA-${parseInt(alg.slice(-3), 10) || 1}`,\n publicExponent: new Uint8Array([0x01, 0x00, 0x01]),\n modulusLength: getModulusLengthOption(options),\n };\n keyUsages = ['decrypt', 'unwrapKey', 'encrypt', 'wrapKey'];\n break;\n case 'ES256':\n algorithm = { name: 'ECDSA', namedCurve: 'P-256' };\n keyUsages = ['sign', 'verify'];\n break;\n case 'ES384':\n algorithm = { name: 'ECDSA', namedCurve: 'P-384' };\n keyUsages = ['sign', 'verify'];\n break;\n case 'ES512':\n algorithm = { name: 'ECDSA', namedCurve: 'P-521' };\n keyUsages = ['sign', 'verify'];\n break;\n case 'Ed25519':\n algorithm = { name: 'Ed25519' };\n keyUsages = ['sign', 'verify'];\n break;\n case 'EdDSA': {\n keyUsages = ['sign', 'verify'];\n const crv = options?.crv ?? 'Ed25519';\n switch (crv) {\n case 'Ed25519':\n case 'Ed448':\n algorithm = { name: crv };\n break;\n default:\n throw new JOSENotSupported('Invalid or unsupported crv option provided');\n }\n break;\n }\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW': {\n keyUsages = ['deriveKey', 'deriveBits'];\n const crv = options?.crv ?? 'P-256';\n switch (crv) {\n case 'P-256':\n case 'P-384':\n case 'P-521': {\n algorithm = { name: 'ECDH', namedCurve: crv };\n break;\n }\n case 'X25519':\n case 'X448':\n algorithm = { name: crv };\n break;\n default:\n throw new JOSENotSupported('Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448');\n }\n break;\n }\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n }\n return crypto$1.subtle.generateKey(algorithm, options?.extractable ?? false, keyUsages);\n}\n\nasync function generateKeyPair(alg, options) {\n return generateKeyPair$1(alg, options);\n}\n\n/**\n * When the client does not have a webid profile document, use this.\n *\n * @param registration_endpoint\n * @param redirect__uris\n * @returns\n */\nconst requestDynamicClientRegistration = async (registration_endpoint, client_details) => {\n // prepare dynamic client registration\n const client_registration_request_body = {\n ...client_details,\n grant_types: [\"authorization_code\", \"refresh_token\"],\n id_token_signed_response_alg: \"ES256\",\n token_endpoint_auth_method: \"none\",\n application_type: \"web\",\n subject_type: \"public\",\n };\n // register\n return fetch(registration_endpoint, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(client_registration_request_body),\n });\n};\n\n/**\n * A simple IndexedDB wrapper\n */\nclass SessionDatabase {\n dbName;\n storeName;\n dbVersion;\n db = null;\n /**\n * Creates a new instance\n * @param dbName The name of the IndexedDB database\n * @param storeName The name of the object store\n * @param dbVersion The database version\n */\n constructor(dbName = 'soidc', storeName = 'session', dbVersion = 1) {\n this.dbName = dbName;\n this.storeName = storeName;\n this.dbVersion = dbVersion;\n }\n /**\n * Initializes the IndexedDB database\n * @returns Promise that resolves when the database is ready\n */\n async init() {\n return new Promise((resolve, reject) => {\n const request = indexedDB.open(this.dbName, this.dbVersion);\n request.onerror = (event) => {\n reject(new Error(`Database error: ${event.target.error}`));\n };\n request.onsuccess = (event) => {\n this.db = event.target.result;\n resolve(this);\n };\n request.onupgradeneeded = (event) => {\n const db = event.target.result;\n // Check if the object store already exists, if not create it\n if (!db.objectStoreNames.contains(this.storeName)) {\n db.createObjectStore(this.storeName);\n }\n };\n });\n }\n /**\n * Stores any value in the database with the given ID as key\n * @param id The identifier/key for the value\n * @param value The value to store\n */\n async setItem(id, value) {\n if (!this.db) {\n await this.init();\n }\n return new Promise((resolve, reject) => {\n const transaction = this.db.transaction(this.storeName, 'readwrite');\n // Handle transation\n transaction.oncomplete = () => {\n resolve();\n };\n transaction.onerror = (event) => {\n reject(new Error(`Transaction error for setItem(${id},...): ${event.target.error}`));\n };\n transaction.onabort = (event) => {\n reject(new Error(`Transaction aborted for setItem(${id},...): ${event.target.error}`));\n };\n // Perform the request within the transaction\n const store = transaction.objectStore(this.storeName);\n store.put(value, id);\n });\n }\n /**\n * Retrieves a value from the database by ID\n * @param id The identifier/key for the value\n * @returns The stored value or null if not found\n */\n async getItem(id) {\n if (!this.db) {\n await this.init();\n }\n return new Promise((resolve, reject) => {\n const transaction = this.db.transaction(this.storeName, 'readonly');\n // Handle transation\n transaction.onerror = (event) => {\n reject(new Error(`Transaction error for getItem(${id}): ${event.target.error}`));\n };\n transaction.onabort = (event) => {\n reject(new Error(`Transaction aborted for getItem(${id}): ${event.target.error}`));\n };\n // Perform the request within the transaction\n const store = transaction.objectStore(this.storeName);\n const request = store.get(id);\n request.onsuccess = () => {\n resolve(request.result || null);\n };\n });\n }\n /**\n * Removes an item from the database\n * @param id The identifier of the item to remove\n */\n async deleteItem(id) {\n if (!this.db) {\n await this.init();\n }\n return new Promise((resolve, reject) => {\n const transaction = this.db.transaction(this.storeName, 'readwrite');\n // Handle transation\n transaction.oncomplete = () => {\n resolve();\n };\n transaction.onerror = (event) => {\n reject(new Error(`Transaction error for deleteItem(${id}): ${event.target.error}`));\n };\n transaction.onabort = (event) => {\n reject(new Error(`Transaction aborted for deleteItem(${id}): ${event.target.error}`));\n };\n // Perform the request within the transaction\n const store = transaction.objectStore(this.storeName);\n store.delete(id);\n });\n }\n /**\n * Clears all items from the database\n */\n async clear() {\n if (!this.db) {\n await this.init();\n }\n return new Promise((resolve, reject) => {\n const transaction = this.db.transaction(this.storeName, 'readwrite');\n // Handle transation\n transaction.oncomplete = () => {\n resolve();\n };\n transaction.onerror = (event) => {\n reject(new Error(`Transaction error for clear(): ${event.target.error}`));\n };\n transaction.onabort = (event) => {\n reject(new Error(`Transaction aborted for clear(): ${event.target.error}`));\n };\n // Perform the request within the transaction\n const store = transaction.objectStore(this.storeName);\n store.clear();\n });\n }\n /**\n * Closes the database connection\n */\n close() {\n if (this.db) {\n this.db.close();\n this.db = null;\n }\n }\n}\n\n/**\n * Login with the idp, using a provided `client_id` or dynamic client registration if none provided.\n *\n * @param idp\n * @param redirect_uri\n */\nconst redirectForLogin = async (idp, redirect_uri, client_details) => {\n // RFC 6749 - Section 3.1.2 - sanitize redirect_uri\n const redirect_uri_ = new URL(redirect_uri);\n const redirect_uri_sane = redirect_uri_.origin + redirect_uri_.pathname + redirect_uri_.search;\n // RFC 9207 iss check: remember the identity provider (idp) / issuer (iss)\n sessionStorage.setItem(\"idp\", idp);\n // lookup openid configuration of idp\n const idp_origin = new URL(idp).origin;\n const openid_configuration = await fetch(`${idp_origin}/.well-known/openid-configuration`)\n .then((response) => {\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n return response.json();\n });\n // remember token endpoint\n sessionStorage.setItem(\"token_endpoint\", openid_configuration[\"token_endpoint\"]);\n // remember jwks_uri for later token verification\n sessionStorage.setItem(\"jwks_uri\", openid_configuration[\"jwks_uri\"]);\n let client_id = client_details?.client_id;\n // no client_id => attempt dynamic registration\n if (!client_id) {\n // use registration endpoint\n const registration_endpoint = openid_configuration[\"registration_endpoint\"];\n // get client registration\n const client_registration = await requestDynamicClientRegistration(registration_endpoint, client_details ?? { redirect_uris: [redirect_uri_sane] })\n .then((response) => {\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n return response.json();\n });\n client_id = client_registration[\"client_id\"];\n // remember client_id\n sessionStorage.setItem(\"client_id\", client_id);\n }\n // RFC 7636 PKCE, remember code verifer\n const { pkce_code_verifier, pkce_code_challenge } = await getPKCEcode();\n sessionStorage.setItem(\"pkce_code_verifier\", pkce_code_verifier);\n // RFC 6749 OAuth 2.0 - CSRF token\n const csrf_token = window.crypto.randomUUID();\n sessionStorage.setItem(\"csrf_token\", csrf_token);\n // redirect to idp\n const redirect_to_idp = openid_configuration[\"authorization_endpoint\"] +\n `?response_type=code` +\n `&redirect_uri=${encodeURIComponent(redirect_uri_sane)}` +\n `&scope=openid offline_access webid` +\n `&client_id=${encodeURIComponent(client_id)}` +\n `&code_challenge_method=S256` +\n `&code_challenge=${pkce_code_challenge}` +\n `&state=${csrf_token}` +\n `&prompt=consent`; // this query parameter value MUST be present for CSS v7 to issue a refresh token ( // TODO open issue because prompting is the default behaviour but without this query param no refresh token is provided despite the \"remember this client\" box being checked)\n window.location.href = redirect_to_idp;\n};\n/**\n * RFC 7636 PKCE\n * @returns PKCE code verifier and PKCE code challenge\n */\nconst getPKCEcode = async () => {\n // create random string as PKCE code verifier\n const pkce_code_verifier = window.crypto.randomUUID() + \"-\" + window.crypto.randomUUID();\n // hash the verifier and base64URL encode as PKCE code challenge\n const digest = new Uint8Array(await window.crypto.subtle.digest(\"SHA-256\", new TextEncoder().encode(pkce_code_verifier)));\n const pkce_code_challenge = btoa(String.fromCharCode(...digest))\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\")\n .replace(/=+$/, \"\");\n return { pkce_code_verifier, pkce_code_challenge };\n};\n/**\n * On incoming redirect from OpenID provider (idp/iss),\n * URL contains authrization code, issuer (idp) and state (csrf token),\n * get an access token for the authrization code.\n */\nconst onIncomingRedirect = async (client_details) => {\n const url = new URL(window.location.href);\n // authorization code\n const authorization_code = url.searchParams.get(\"code\");\n // if no code, session remains unauthenticated at this point\n if (authorization_code === null) {\n return { clientDetails: client_details };\n }\n // RFC 9207 issuer check\n const idp = sessionStorage.getItem(\"idp\");\n if (idp === null || url.searchParams.get(\"iss\") != idp) {\n throw new Error(\"RFC 9207 - iss != idp - \" + url.searchParams.get(\"iss\") + \" != \" + idp);\n }\n // RFC 6749 OAuth 2.0\n if (url.searchParams.get(\"state\") != sessionStorage.getItem(\"csrf_token\")) {\n throw new Error(\"RFC 6749 - state != csrf_token - \" + url.searchParams.get(\"state\") + \" != \" + sessionStorage.getItem(\"csrf_token\"));\n }\n // remove redirect query parameters from URL\n url.searchParams.delete(\"iss\");\n url.searchParams.delete(\"state\");\n url.searchParams.delete(\"code\");\n window.history.pushState({}, document.title, url.toString());\n // prepare token request\n const pkce_code_verifier = sessionStorage.getItem(\"pkce_code_verifier\");\n if (pkce_code_verifier === null) {\n throw new Error(\"Access Token Request preparation - Could not find in sessionStorage: pkce_code_verifier\");\n }\n const client_id = client_details?.client_id || sessionStorage.getItem(\"client_id\");\n if (!client_id) {\n throw new Error(\"Access Token Request preparation - Could not find in sessionStorage: client_id (dynamic registration)\");\n }\n const token_endpoint = sessionStorage.getItem(\"token_endpoint\");\n if (token_endpoint === null) {\n throw new Error(\"Access Token Request preparation - Could not find in sessionStorage: token_endpoint\");\n }\n // RFC 9449 DPoP\n const key_pair = await generateKeyPair(\"ES256\");\n // get access token\n const token_response = await requestAccessToken(authorization_code, pkce_code_verifier, url.toString(), client_id, token_endpoint, key_pair)\n .then((response) => {\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n return response.json();\n });\n // verify access_token // ! Solid-OIDC specification says it should be a dpop-bound `id token` but implementations provide a dpop-bound `access token`\n const accessToken = token_response[\"access_token\"];\n const jwks_uri = sessionStorage.getItem(\"jwks_uri\");\n if (jwks_uri === null) {\n throw new Error(\"Access Token validation preparation - Could not find in sessionStorage: jwks_uri\");\n }\n const jwks = createRemoteJWKSet(new URL(jwks_uri));\n const { payload } = await jwtVerify(accessToken, jwks, {\n issuer: idp, // RFC 9207\n audience: \"solid\", // RFC 7519 // ! \"solid\" as per implementations ...\n // exp, nbf, iat - handled automatically\n });\n // check dpop thumbprint\n const dpopThumbprint = await calculateJwkThumbprint(await exportJWK(key_pair.publicKey));\n if (payload[\"cnf\"][\"jkt\"] != dpopThumbprint) {\n throw new Error(\"Access Token validation failed on `jkt`: jkt != DPoP thumbprint - \" + payload[\"cnf\"][\"jkt\"] + \" != \" + dpopThumbprint);\n }\n // check client_id\n if (payload[\"client_id\"] != client_id) {\n throw new Error(\"Access Token validation failed on `client_id`: JWT payload != client_id - \" + payload[\"client_id\"] + \" != \" + client_id);\n }\n // summarise session info\n const token_details = { ...token_response, dpop_key_pair: key_pair };\n const idp_details = { idp, jwks_uri, token_endpoint };\n if (!client_details)\n client_details = { redirect_uris: [window.location.href] };\n client_details.client_id = client_id;\n // to remember for session restore\n const sessionDatabase = await new SessionDatabase().init();\n await Promise.all([\n sessionDatabase.setItem(\"idp\", idp),\n sessionDatabase.setItem(\"jwks_uri\", jwks_uri),\n sessionDatabase.setItem(\"token_endpoint\", token_endpoint),\n sessionDatabase.setItem(\"client_id\", client_id),\n sessionDatabase.setItem(\"dpop_keypair\", key_pair),\n sessionDatabase.setItem(\"refresh_token\", token_response[\"refresh_token\"])\n ]);\n sessionDatabase.close();\n // clean session storage\n sessionStorage.removeItem(\"csrf_token\");\n sessionStorage.removeItem(\"pkce_code_verifier\");\n sessionStorage.removeItem(\"idp\");\n sessionStorage.removeItem(\"jwks_uri\");\n sessionStorage.removeItem(\"token_endpoint\");\n sessionStorage.removeItem(\"client_id\");\n // return session information\n return {\n clientDetails: client_details,\n idpDetails: idp_details,\n tokenDetails: token_details\n };\n};\n/**\n * Request an dpop-bound access token from a token endpoint\n * @param authorization_code\n * @param pkce_code_verifier\n * @param redirect_uri\n * @param client_id\n * @param token_endpoint\n * @param key_pair\n * @returns\n */\nconst requestAccessToken = async (authorization_code, pkce_code_verifier, redirect_uri, client_id, token_endpoint, key_pair) => {\n // prepare public key to bind access token to\n const jwk_public_key = await exportJWK(key_pair.publicKey);\n jwk_public_key.alg = \"ES256\";\n // sign the access token request DPoP token\n const dpop = await new SignJWT({\n htu: token_endpoint,\n htm: \"POST\",\n })\n .setIssuedAt()\n .setJti(window.crypto.randomUUID())\n .setProtectedHeader({\n alg: \"ES256\",\n typ: \"dpop+jwt\",\n jwk: jwk_public_key,\n })\n .sign(key_pair.privateKey);\n return fetch(token_endpoint, {\n method: \"POST\",\n headers: {\n dpop,\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n body: new URLSearchParams({\n grant_type: \"authorization_code\",\n code: authorization_code,\n code_verifier: pkce_code_verifier,\n redirect_uri: redirect_uri,\n client_id: client_id,\n }),\n });\n};\n\nconst renewTokens = async () => {\n // remember session details\n const sessionDatabase = await new SessionDatabase().init();\n const client_id = await sessionDatabase.getItem(\"client_id\");\n const token_endpoint = await sessionDatabase.getItem(\"token_endpoint\");\n const key_pair = await sessionDatabase.getItem(\"dpop_keypair\");\n const refresh_token = await sessionDatabase.getItem(\"refresh_token\");\n if (client_id === null || token_endpoint === null || key_pair === null || refresh_token === null) {\n // we can not restore the old session\n throw new Error(\"Could not refresh tokens: details missing from database.\");\n }\n const token_response = await requestFreshTokens(refresh_token, client_id, token_endpoint, key_pair)\n .then((response) => {\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n return response.json();\n });\n // verify access_token // ! Solid-OIDC specification says it should be a dpop-bound `id token` but implementations provide a dpop-bound `access token`\n const accessToken = token_response[\"access_token\"];\n const idp = await sessionDatabase.getItem(\"idp\");\n if (idp === null) {\n throw new Error(\"Access Token validation preparation - Could not find in sessionDatabase: idp\");\n }\n const jwks_uri = await sessionDatabase.getItem(\"jwks_uri\");\n if (jwks_uri === null) {\n throw new Error(\"Access Token validation preparation - Could not find in sessionDatabase: jwks_uri\");\n }\n const jwks = createRemoteJWKSet(new URL(jwks_uri));\n const { payload } = await jwtVerify(accessToken, jwks, {\n issuer: idp, // RFC 9207\n audience: \"solid\", // RFC 7519 // ! \"solid\" as per implementations ...\n // exp, nbf, iat - handled automatically\n });\n // check dpop thumbprint\n const dpopThumbprint = await calculateJwkThumbprint(await exportJWK(key_pair.publicKey));\n if (payload[\"cnf\"][\"jkt\"] != dpopThumbprint) {\n throw new Error(\"Access Token validation failed on `jkt`: jkt != DPoP thumbprint - \" + payload[\"cnf\"][\"jkt\"] + \" != \" + dpopThumbprint);\n }\n // check client_id\n if (payload[\"client_id\"] != client_id) {\n throw new Error(\"Access Token validation failed on `client_id`: JWT payload != client_id - \" + payload[\"client_id\"] + \" != \" + client_id);\n }\n // set new refresh token for token rotation\n await sessionDatabase.setItem(\"refresh_token\", token_response[\"refresh_token\"]);\n sessionDatabase.close();\n return {\n ...token_response,\n dpop_key_pair: key_pair,\n };\n};\n/**\n * Request an dpop-bound access token from a token endpoint using a refresh token\n * @param authorization_code\n * @param pkce_code_verifier\n * @param redirect_uri\n * @param client_id\n * @param token_endpoint\n * @param key_pair\n * @returns\n */\nconst requestFreshTokens = async (refresh_token, client_id, token_endpoint, key_pair) => {\n // prepare public key to bind access token to\n const jwk_public_key = await exportJWK(key_pair.publicKey);\n jwk_public_key.alg = \"ES256\";\n // sign the access token request DPoP token\n const dpop = await new SignJWT({\n htu: token_endpoint,\n htm: \"POST\",\n })\n .setIssuedAt()\n .setJti(window.crypto.randomUUID())\n .setProtectedHeader({\n alg: \"ES256\",\n typ: \"dpop+jwt\",\n jwk: jwk_public_key,\n })\n .sign(key_pair.privateKey);\n return fetch(token_endpoint, {\n method: \"POST\",\n headers: {\n dpop,\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n body: new URLSearchParams({\n grant_type: \"refresh_token\",\n refresh_token,\n client_id\n }),\n });\n};\n\nclass Session {\n sessionInformation;\n isActive_ = false;\n webId_ = undefined;\n currentAth_ = undefined;\n tokenRefreshTimeout;\n sessionDeactivateTimeout;\n onSessionExpirationWarning;\n /**\n * Create a new session.\n */\n constructor(clientDetails, sessionOptions) {\n this.sessionInformation = { clientDetails };\n this.onSessionExpirationWarning = sessionOptions?.onSessionExpirationWarning;\n }\n /**\n * Redirect the user for login to their IDP.\n *\n * @throws Error if the session has not been initialized.\n */\n async login(idp, redirect_uri) {\n await redirectForLogin(idp, redirect_uri, this.sessionInformation.clientDetails);\n }\n /**\n * Clears all session-related information, including IDP details and tokens.\n * This logs the user out.\n * Client details are preserved.\n */\n async logout() {\n // clear timeouts\n if (this.sessionDeactivateTimeout)\n clearTimeout(this.sessionDeactivateTimeout);\n this.sessionDeactivateTimeout = undefined;\n if (this.tokenRefreshTimeout)\n clearTimeout(this.tokenRefreshTimeout);\n this.tokenRefreshTimeout = undefined;\n // clean session data\n this.sessionInformation.idpDetails = undefined;\n this.sessionInformation.tokenDetails = undefined;\n this.isActive_ = false;\n this.webId_ = undefined;\n // only preserve client_id if URI\n if (this.sessionInformation.clientDetails?.client_id)\n try {\n new URL(this.sessionInformation.clientDetails.client_id);\n }\n catch (_) {\n this.sessionInformation.clientDetails.client_id = undefined;\n }\n // clean session database\n const sessionDatabase = await new SessionDatabase().init();\n await sessionDatabase.clear();\n sessionDatabase.close();\n }\n /**\n * Handles the redirect from the identity provider after a login attempt.\n * It attempts to retrieve tokens using the authorization code.\n */\n async handleRedirectFromLogin() {\n // Redirect after Authorization Code Grant // memory via sessionStorage\n const newSessionInfo = await onIncomingRedirect(this.sessionInformation.clientDetails);\n // no session - we remain unauthenticated\n if (!newSessionInfo.tokenDetails) {\n return;\n }\n // we got a session\n this.sessionInformation = newSessionInfo;\n await this.setSessionDetails();\n }\n /**\n * Handles session restoration using the refresh token grant.\n * Silently fails if session could not be restored (maybe there was no session in the first place).\n */\n async restore() {\n // Restore session using Refresh Token Grant // memory via IndexedDB\n await renewTokens()\n .then(tokenDetails => {\n // got new tokens\n this.sessionInformation.tokenDetails = tokenDetails;\n // set session information\n return this.setSessionDetails();\n })\n // anything missing or wrong => abort, could not restore session.\n .catch(_ => { }); // fail silently\n }\n /**\n * Creates a signed DPoP (Demonstration of Proof-of-Possession) token.\n *\n * @param payload The payload to include in the DPoP token. By default, it includes `htu` (HTTP target URI) and `htm` (HTTP method).\n * @returns A promise that resolves to the signed DPoP token string.\n * @throws Error if the session has not been initialized - if no token details are available.\n */\n async createSignedDPoPToken(payload) {\n if (!this.sessionInformation.tokenDetails || !this.currentAth_) {\n throw new Error(\"Session not established.\");\n }\n payload.ath = this.currentAth_;\n const jwk_public_key = await exportJWK(this.sessionInformation.tokenDetails.dpop_key_pair.publicKey);\n return new SignJWT(payload)\n .setIssuedAt()\n .setJti(window.crypto.randomUUID())\n .setProtectedHeader({\n alg: \"ES256\",\n typ: \"dpop+jwt\",\n jwk: jwk_public_key,\n })\n .sign(this.sessionInformation.tokenDetails.dpop_key_pair.privateKey);\n }\n /**\n * Makes an HTTP fetch request.\n * If a session is active, it includes the DPoP token and the access token in the `Authorization` header.\n *\n * @param input The URL or Request object to fetch.\n * @param init Optional fetch request options (RequestInit). Headers for `Authorization` and `DPoP` will be overwritten if a session is active.\n * @param dpopPayload Optional payload for the DPoP token. If provided, it overrides the default `htu` and `htm` claims.\n * @returns A promise that resolves to the fetch Response.\n */\n async authFetch(input, init, dpopPayload) {\n // prepare authenticated call using a DPoP token (either provided payload, or default)\n let url;\n let method;\n let headers;\n if (input instanceof Request) {\n url = new URL(input.url);\n method = init?.method || input?.method || 'GET';\n headers = new Headers(input.headers);\n }\n else {\n init = init || {};\n url = new URL(input.toString());\n method = init.method || 'GET';\n headers = init.headers ? new Headers(init.headers) : new Headers();\n }\n // create DPoP token, and add tokens to request\n if (this.sessionInformation.tokenDetails) {\n dpopPayload = dpopPayload ?? {\n htu: `${url.origin}${url.pathname}`,\n htm: method.toUpperCase()\n };\n const dpop = await this.createSignedDPoPToken(dpopPayload);\n headers.set(\"dpop\", dpop);\n headers.set(\"authorization\", `DPoP ${this.sessionInformation.tokenDetails.access_token}`);\n }\n // check explicitly; to avoid unexpected behaviour\n if (input instanceof Request) { // clone the provided request, and override the headers\n return fetch(new Request(input, { ...init, headers }));\n }\n // just override the headers\n return fetch(url, { ...init, headers });\n }\n get isActive() {\n return this.isActive_;\n }\n get webId() {\n return this.webId_;\n }\n //\n // Helper Methods\n //\n /**\n * Set the session to active if there is an access token.\n */\n async setSessionDetails() {\n // check for access token \n if (!this.sessionInformation.tokenDetails?.access_token) {\n this.logout();\n }\n // generate ath\n this.currentAth_ = await this.computeAth(this.sessionInformation.tokenDetails.access_token);\n // check for active session\n this.webId_ = decodeJwt(this.sessionInformation.tokenDetails.access_token)[\"webid\"];\n this.isActive_ = this.webId !== undefined;\n // deactivating session when token expire\n this.setSessionDeactivateTimeout();\n // refreshing tokens\n this.setTokenRefreshTimeout();\n }\n setSessionDeactivateTimeout() {\n const deactivate_buffer_seconds = 5;\n const timeUntilDeactivate = (this.sessionInformation.tokenDetails.expires_in - deactivate_buffer_seconds) * 1000;\n if (this.sessionDeactivateTimeout)\n clearTimeout(this.sessionDeactivateTimeout);\n this.sessionDeactivateTimeout = setTimeout(() => this.logout(), timeUntilDeactivate);\n }\n setTokenRefreshTimeout() {\n const refresh_buffer_seconds = 95;\n const timeUntilRefresh = (this.sessionInformation.tokenDetails.expires_in - refresh_buffer_seconds) * 1000;\n if (this.tokenRefreshTimeout)\n clearTimeout(this.tokenRefreshTimeout);\n this.tokenRefreshTimeout = setTimeout(async () => {\n const newTokens = await renewTokens()\n .catch((error) => {\n // anything missing or wrong => could not renew tokens.\n if (this.onSessionExpirationWarning)\n this.onSessionExpirationWarning();\n return undefined;\n });\n if (!newTokens) {\n return;\n }\n this.sessionInformation.tokenDetails = newTokens;\n this.setSessionDeactivateTimeout();\n this.setTokenRefreshTimeout();\n }, timeUntilRefresh);\n }\n /**\n * RFC 9449 - Hash of the access token\n */\n async computeAth(accessToken) {\n // Convert the ASCII string of the token to a Uint8Array\n const encoder = new TextEncoder();\n const data = encoder.encode(accessToken); // ASCII by default\n // Compute SHA-256 hash\n const hashBuffer = await crypto.subtle.digest('SHA-256', data);\n // Convert ArrayBuffer to base64url string\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n const base64 = btoa(String.fromCharCode(...hashArray));\n // Convert base64 to base64url\n const base64url = base64\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/=+$/, '');\n return base64url;\n }\n}\n\nexport { Session };\n//# sourceMappingURL=index.js.map\n","import { Session } from '@uvdsl/solid-oidc-client-browser';\nimport { BehaviorSubject } from 'rxjs';\nimport { AuthenticatedFetch, PodOsSession, SessionInfo } from '@pod-os/core';\n\nexport class BrowserSession implements PodOsSession {\n private readonly session: Session;\n private onSessionRestoreCallback: (url: string) => void = () => {};\n private readonly _authenticatedFetch: AuthenticatedFetch;\n\n private readonly sessionInfo$: BehaviorSubject<SessionInfo> = new BehaviorSubject<SessionInfo>({\n isLoggedIn: false,\n webId: undefined,\n });\n\n get authenticatedFetch(): (url: RequestInfo, init?: RequestInit | undefined) => Promise<Response> {\n return this._authenticatedFetch;\n }\n\n constructor() {\n this.session = new Session();\n this._authenticatedFetch = this.session.authFetch.bind(this.session);\n }\n\n async handleIncomingRedirect(restorePreviousSession = false) {\n await this.session.handleRedirectFromLogin();\n if (restorePreviousSession) {\n await this.session.restore();\n if (this.session.isActive) {\n this.onSessionRestoreCallback(window.location.href);\n }\n }\n this.sessionInfo$.next({\n isLoggedIn: this.session.isActive,\n webId: this.session.webId,\n });\n }\n\n async login(oidcIssuer: string) {\n return this.session.login(oidcIssuer, window.location.href);\n }\n\n async logout() {\n await this.session.logout();\n this.sessionInfo$.next({\n isLoggedIn: false,\n webId: undefined,\n });\n }\n\n observeSession(): BehaviorSubject<SessionInfo> {\n return this.sessionInfo$;\n }\n\n onSessionRestore(callback: (url: string) => void) {\n this.onSessionRestoreCallback = callback;\n }\n}\n","import { PodOS } from '@pod-os/core';\nimport { Component, h, Listen, Prop, State, Event, EventEmitter } from '@stencil/core';\nimport sessionStore from '../../store/session';\nimport { localSettings } from '../../store/settings';\nimport { createPodOS } from '../../pod-os';\nimport { Subject, takeUntil } from 'rxjs';\nimport { BrowserSession } from '../../authentication';\n\ninterface InitializeOsEvent extends CustomEvent {\n detail: Function;\n}\n\ninterface RequestModuleEvent extends CustomEvent {\n detail: {\n module: string;\n receiver: Function;\n };\n}\n\n@Component({\n tag: 'pos-app',\n shadow: true,\n})\nexport class PosApp {\n @State() os: PodOS;\n\n @Prop() restorePreviousSession: boolean = false;\n\n /**\n * Fired whenever the session was restored\n */\n @Event({ eventName: 'pod-os:session-restored' }) sessionRestoredEmitter: EventEmitter<{ url: string }>;\n\n /**\n * Fires as soon as the pos-app DOM element has been loaded and PodOS can be used. Note: In case the user is authenticated, this will fire before profile data of the user has been fetched, but after authentication has been handled.\n */\n @Event({ eventName: 'pod-os:loaded' }) podOsLoadedEmitter: EventEmitter<{\n os: PodOS;\n authenticatedFetch: typeof global.fetch;\n }>;\n\n private readonly disconnected$ = new Subject<void>();\n\n @State()\n private unsubscribeSettings: () => void;\n\n @State()\n private loading = true;\n\n async componentWillLoad() {\n const session = new BrowserSession();\n this.unsubscribeSettings = localSettings.on('set', () => {\n this.os = createPodOS(session, localSettings.state);\n });\n this.os = createPodOS(session, localSettings.state);\n session.onSessionRestore(url => {\n this.sessionRestoredEmitter.emit({ url });\n });\n try {\n await session.handleIncomingRedirect(this.restorePreviousSession);\n } catch (e) {\n console.error(e);\n }\n this.os\n .observeSession()\n .pipe(takeUntil(this.disconnected$))\n .subscribe(async sessionInfo => {\n sessionStore.state.webId = sessionInfo.webId;\n if (sessionInfo.isLoggedIn) {\n const profile = await this.os.fetchProfile(sessionInfo.webId);\n sessionStore.state.profile = profile;\n }\n sessionStore.state.isLoggedIn = sessionInfo.isLoggedIn;\n this.loading = false;\n });\n this.podOsLoadedEmitter.emit({\n os: this.os,\n authenticatedFetch: session.authenticatedFetch,\n });\n }\n\n disconnectedCallback() {\n this.unsubscribeSettings();\n this.disconnected$.next();\n this.disconnected$.unsubscribe();\n }\n\n @Listen('pod-os:init')\n async initializeOs(event: InitializeOsEvent) {\n event.stopPropagation();\n event.detail(this.os);\n }\n\n @Listen('pod-os:module')\n async loadModule(event: RequestModuleEvent) {\n event.stopPropagation();\n if (event.detail.module === 'contacts') {\n const module = await this.os.loadContactsModule();\n event.detail.receiver(module);\n } else {\n throw Error(`Unknown module \"${event.detail.module}\"`);\n }\n }\n\n render() {\n return this.loading ? <ion-progress-bar type=\"indeterminate\"></ion-progress-bar> : <slot></slot>;\n }\n}\n","pos-router {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\npos-navigation {\n max-width: var(--width-lg);\n margin: 0;\n min-width: var(--size-32);\n flex-shrink: 1; /* Ensure navigation can shrink */\n}\n\npos-add-new-thing,\npos-login {\n flex: 0 1 auto;\n flex-shrink: 0; /* Ensure those items don't shrink */\n}\n\nheader,\nfooter {\n display: flex;\n gap: var(--size-1);\n height: auto;\n justify-content: center;\n align-items: center;\n padding: var(--size-1);\n}\n\nfooter svg {\n width: var(--size-5);\n height: var(--size-5);\n}\n\nfooter {\n font-size: var(--scale-fluid-000);\n\n .settings {\n padding: 0 var(--size-1);\n text-decoration: none;\n background-color: var(--pos-background-color);\n border: 1px solid var(--pos-secondary-border-color);\n color: var(--pos-secondary-border-color);\n border-radius: var(--radius-xs);\n\n &:hover {\n background-color: var(--pos-secondary-border-color);\n color: var(--pos-background-color);\n }\n }\n}\n\nheader {\n flex-wrap: nowrap;\n padding: var(--size-1) var(--size-8);\n}\n\nmain {\n flex: 1;\n max-height: 100vh;\n overflow: auto;\n}\n\n@media (max-width: 640px) {\n header {\n padding: var(--size-1);\n justify-content: space-between;\n }\n footer {\n display: none;\n }\n}\n","import { Component, h, Host, Prop, State } from '@stencil/core';\nimport session from '../../store/session';\n\n@Component({\n tag: 'pos-app-browser',\n styleUrl: 'pos-app-browser.css',\n})\nexport class PosAppBrowser {\n @Prop() restorePreviousSession: boolean = false;\n\n /**\n * The mode the app is running in:\n *\n * - standalone: use this when you deploy it as a standalone web application\n * - pod: use this when you host this app as a default interface for you pod\n */\n @Prop() mode: 'standalone' | 'pod' = 'standalone';\n\n @State() uri = '';\n\n render() {\n return (\n <Host>\n <pos-app restorePreviousSession={this.restorePreviousSession}>\n <pos-error-toast>\n <pos-router mode={this.mode} onPod-os:route-changed={e => (this.uri = e.detail)}>\n <header>\n <pos-add-new-thing referenceUri={this.uri}></pos-add-new-thing>\n <pos-navigation uri={this.uri === 'pod-os:dashboard' ? '' : this.uri}></pos-navigation>\n\n <pos-login>\n <pos-user-menu webId={session.state.webId} slot=\"if-logged-in\"></pos-user-menu>\n </pos-login>\n </header>\n <main>{this.mainContent()}</main>\n <footer>\n <Logo />\n <span>PodOS Browser</span>\n </footer>\n </pos-router>\n </pos-error-toast>\n </pos-app>\n </Host>\n );\n }\n\n private mainContent() {\n if (this.uri === '') {\n return null;\n }\n if (this.uri.startsWith('pod-os:')) {\n return <pos-internal-router uri={this.uri} />;\n }\n return (\n <pos-resource key={this.uri} uri={this.uri}>\n <pos-type-router />\n </pos-resource>\n );\n }\n}\n\nconst Logo = () => {\n return (\n <svg viewBox=\"0 0 400 400\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M50 350 L50 100 L200 50 L350 100 L350 350 Z\"\n style={{\n 'fill': '#008BF8',\n 'stroke': '#008BF8',\n 'stroke-width': '70',\n }}\n stroke-linejoin=\"round\"\n />\n\n <path\n d=\"M100 300 L100 150 L200 120 L300 150 L300 300 L130 300 L130 370 L100 370Z\"\n style={{\n 'fill': 'white',\n 'stroke': 'white',\n 'stroke-width': '45',\n }}\n stroke-linejoin=\"round\"\n />\n\n <path\n d=\"M150 250 L150 200 L200 180 L250 200 L250 250 Z\"\n style={{\n 'fill': '#DC0073',\n 'stroke': '#DC0073',\n 'stroke-width': '20',\n }}\n stroke-linejoin=\"round\"\n />\n </svg>\n );\n};\n",":host {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(var(--size-12), var(--size-96)));\n gap: var(--size-4);\n padding: var(--size-2);\n justify-content: center;\n align-items: start;\n justify-items: stretch;\n}\n","import { Component, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'pos-app-dashboard',\n styleUrl: 'pos-app-dashboard.css',\n shadow: true,\n})\nexport class PosAppDashboard {\n render() {\n return (\n <Host>\n <pos-getting-started></pos-getting-started>\n <pos-example-resources></pos-example-resources>\n </Host>\n );\n }\n}\n",":host {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(var(--size-12), var(--size-96)));\n gap: var(--size-4);\n padding: var(--size-2);\n justify-content: center;\n align-items: start;\n justify-items: stretch;\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'pos-app-settings',\n styleUrl: 'pos-app-settings.css',\n shadow: true,\n})\nexport class PosAppSettings {\n render() {\n return <pos-setting-offline-cache></pos-setting-offline-cache>;\n }\n}\n","import { Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-description',\n shadow: true,\n})\nexport class PosDescription implements ResourceAware {\n @State() resource: Thing;\n\n @Event({ eventName: 'pod-os:resource' }) subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.resource = resource;\n };\n\n render() {\n return this.resource ? this.resource.description() : null;\n }\n}\n","dialog {\n background-color: var(--pos-background-color);\n color: var(--pos-normal-text-color);\n border: none;\n border-radius: var(--radius-md);\n box-shadow: var(--shadow-md);\n max-width: var(--width-xs);\n animation: slideIn 0.2s ease-out;\n}\n\ndialog::backdrop {\n background: rgba(0, 0, 0, 0.5);\n backdrop-filter: var(--blur-sm);\n animation: fadeIn 0.2s ease-out;\n}\n\n@media (prefers-color-scheme: dark) {\n dialog::backdrop {\n background: rgb(100, 100, 100, 0.5);\n }\n}\n\ndialog header > :first-child {\n /* This is the title slot*/\n flex-grow: 1;\n font-weight: var(--weight-light);\n font-size: var(--scale-2);\n font-family: var(--font-sans);\n margin: 0;\n}\n\ndialog header {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: var(--scale-0);\n border-bottom-style: inset;\n padding: 0 0 var(--scale-0) 0;\n}\n\ndialog > :last-child {\n /* This is the content slot*/\n display: block;\n margin-top: var(--scale-3);\n}\n\nbutton#close {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n background: none;\n font-size: var(--scale-3);\n color: var(--color-grey-500);\n}\n\nbutton#close:hover {\n color: var(--pos-secondary-border-color);\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes slideIn {\n from {\n opacity: 0;\n transform: translateY(-20px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n","import { Component, Host, h, Method } from '@stencil/core';\n\n/**\n * Styled wrapper around native dialog element, with slots `title` and `content`\n */\n@Component({\n tag: 'pos-dialog',\n styleUrl: 'pos-dialog.css',\n shadow: false, // shadow dom prevents the html dialog from working normally (autofocus, close on submit)\n})\nexport class PosDialog {\n private dialog: HTMLDialogElement;\n\n @Method()\n async showModal() {\n this.dialog.showModal();\n }\n\n @Method()\n async close() {\n this.dialog.close();\n }\n\n render() {\n return (\n <Host>\n <dialog ref={el => (this.dialog = el as HTMLDialogElement)}>\n <header>\n <slot name=\"title\" />\n <button tabindex={-1} id=\"close\" title=\"Close\" onClick={() => this.close()}>\n <ion-icon name=\"close-outline\"></ion-icon>\n </button>\n </header>\n <slot name=\"content\" />\n </dialog>\n </Host>\n );\n }\n}\n","import { toastController } from '@ionic/core';\nimport { Component, h, Host, Listen } from '@stencil/core';\n\n@Component({\n tag: 'pos-error-toast',\n shadow: true,\n})\nexport class PosErrorToast {\n @Listen('unhandledrejection', { target: 'window' })\n async unhandledRejection(event: PromiseRejectionEvent) {\n event.stopPropagation();\n console.error('unhandled promise rejection', event);\n await this.showToast(event.reason.toString());\n }\n\n @Listen('pod-os:error')\n async catchError(event) {\n event.stopPropagation();\n console.error(event.detail);\n await this.showToast(event.detail.message);\n }\n\n private async showToast(message: string) {\n const toast = await toastController.create({\n message,\n duration: 10000,\n position: 'top',\n color: 'danger',\n buttons: [\n {\n text: 'Dismiss',\n role: 'cancel',\n },\n ],\n });\n\n await toast.present();\n }\n render() {\n return (\n <Host>\n <ion-toast\n trigger=\"never\"\n message=\"Workarround to preload ion-toast and ion-ripple-effect to be able to show errors while offline\"\n duration={0}\n >\n <ion-ripple-effect></ion-ripple-effect>\n </ion-toast>\n <slot></slot>\n </Host>\n );\n }\n}\n",":host {\n border: var(--size-px) solid var(--pos-border-color);\n border-radius: var(--radius-lg);\n box-shadow: var(--shadow-md);\n padding: var(--size-8);\n max-width: var(--size-96);\n background: var(--pos-card-background);\n}\n\n.links {\n display: flex;\n flex-direction: column;\n gap: var(--size-3);\n max-width: 80vw;\n}\n","import { Component, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'pos-example-resources',\n styleUrl: 'pos-example-resources.css',\n shadow: true,\n})\nexport class PosExampleResources {\n render() {\n return (\n <Host>\n <div>\n <h2>Try these... 💡</h2>\n <p>No idea where to start? Try these example resources, and follow your nose 👃</p>\n <div class=\"links\">\n <pos-rich-link uri=\"https://pod-os.solidcommunity.net/profile/card#me\" />\n <pos-rich-link uri=\"https://angelo.veltens.org/profile/card#me\" />\n <pos-rich-link uri=\"https://angelo.veltens.org/public/bookmarks\" />\n <pos-rich-link uri=\"https://solidos.solidcommunity.net/profile/card#me\" />\n </div>\n </div>\n </Host>\n );\n }\n}\n",":host {\n border: var(--size-px) solid var(--pos-border-color);\n border-radius: var(--radius-lg);\n box-shadow: var(--shadow-md);\n padding: var(--size-8);\n max-width: var(--size-96);\n background: var(--pos-card-background);\n}\n\n.question {\n font-weight: var(--weight-semibold);\n}\n\na {\n font-weight: var(--weight-bold);\n color: var(--pos-primary-color);\n}\n\nbutton.login {\n background: none;\n color: var(--pos-primary-color);\n display: inline;\n text-decoration: underline;\n border: none;\n padding: 0;\n margin: 0;\n cursor: pointer;\n font-size: unset;\n}\n","import { Component, Event, EventEmitter, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'pos-getting-started',\n styleUrl: 'pos-getting-started.css',\n shadow: true,\n})\nexport class PosGettingStarted {\n @Event({ eventName: 'pod-os:login' })\n login: EventEmitter<void>;\n\n render() {\n return (\n <Host>\n <div>\n <h2>Getting started 🚀</h2>\n <p>🔎 Enter a URL into the above navigation bar to browse through the web of data. </p>\n <p>\n 🔐{' '}\n <button class=\"login\" onClick={() => this.login.emit()}>\n Sign in\n </button>{' '}\n to access private resources on your Solid Pod or those of your friends or coworkers.\n </p>\n </div>\n <div>\n <p class=\"question\">New to Solid?</p>\n <p>\n <a href=\"https://solidproject.org/for-developers#hosted-pod-services\">Get a Pod →</a>\n </p>\n </div>\n <div>\n <p class=\"question\">Want to dig deeper into PodOS?</p>\n <p>\n <a href=\"http://pod-os.org\">Learn more →</a>\n </p>\n </div>\n </Host>\n );\n }\n}\n",":host {\n /**\n * @prop --width: Width of the image\n * @prop --height: Height of the image\n * @prop --border-radius: Border radius of the image\n * @prop --max-width: Maximum width of the image\n * @prop --max-height: Maximum height of the image\n * @prop --object-fit: CSS object-fit of the image\n */\n display: flex;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n border-radius: inherit;\n}\n\nimg,\nion-skeleton-text,\ndiv.error {\n border-radius: var(--border-radius);\n width: var(--width);\n height: var(--height);\n max-width: var(--max-width);\n max-height: var(--max-height);\n object-fit: var(--object-fit);\n}\n\nimg {\n backdrop-filter: var(--blur-xl);\n}\n\n.error {\n display: flex;\n opacity: 0.8;\n background: repeating-linear-gradient(-45deg, rgba(150, 0, 0, 0.1), rgba(150, 0, 0, 0.1) 10px, #fff 5px, #fff 25px);\n flex-direction: column;\n border: 1px solid red;\n color: black;\n align-items: center;\n justify-content: center;\n word-break: break-all;\n padding: 1rem;\n box-sizing: border-box;\n}\n\n.error ion-icon {\n color: #282828;\n --ionicon-stroke-width: calc(var(--width) / 5);\n font-size: calc(var(--width) / 2);\n}\n\na.error {\n text-decoration: none;\n width: var(--width);\n height: var(--height);\n}\n\n.code {\n font-weight: bold;\n font-size: calc(var(--width) / 8);\n}\n\n.text {\n font-size: calc(var(--width) / 20);\n}\n","import { BrokenFile as BrokenFileData, PodOS } from '@pod-os/core';\nimport { BrokenFile } from '../broken-file/BrokenFile';\nimport { Component, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport session from '../../store/session';\n\n/**\n * Tries fetch an image with the solid authentication, and can visualize http errors like 403 or 404 if this fails.\n * Falls back to classic `<img src=\"...\">` on network errors like CORS.\n * Renders a normal link if even this fails.\n */\n@Component({\n tag: 'pos-image',\n styleUrl: 'pos-image.css',\n shadow: true,\n})\nexport class PosImage {\n @Prop() src: string;\n\n @Prop() alt: string;\n\n /**\n * Use a blurred version of the image as its own background, if the image is scaled down to fit into the container.\n */\n @Prop() blurredBackground: boolean = false;\n\n @State() os: PodOS;\n\n @State()\n private dataUri: string;\n\n @State()\n private brokenFile: BrokenFileData;\n\n @State()\n private networkError: Error;\n\n @State()\n private imageError: Event;\n\n @State()\n private loading: boolean = true;\n\n @Event({ eventName: 'pod-os:init' }) initializeOsEmitter: EventEmitter;\n\n /**\n * Indicates that the resource given in `src` property has been loaded.\n */\n @Event({ eventName: 'pod-os:resource-loaded' }) resourceLoadedEmitter: EventEmitter<string>;\n\n componentWillLoad() {\n session.onChange('isLoggedIn', () => this.fetchBlob());\n this.initializeOsEmitter.emit(this.setOs);\n }\n\n setOs = async (os: PodOS) => {\n this.os = os;\n };\n\n @Watch('os')\n @Watch('src')\n async fetchBlob() {\n try {\n this.loading = true;\n this.imageError = null;\n this.networkError = null;\n this.brokenFile = null;\n const file = await this.os.fetchFile(this.src);\n this.resourceLoadedEmitter.emit(this.src);\n if (file.blob()) {\n this.dataUri = URL.createObjectURL(file.blob());\n } else {\n this.brokenFile = file as BrokenFileData;\n }\n } catch (err) {\n this.networkError = err;\n } finally {\n this.loading = false;\n }\n }\n\n onImageError(err: Event) {\n this.networkError = null;\n this.imageError = err;\n }\n\n render() {\n if (this.loading) {\n return <ion-skeleton-text animated={true}></ion-skeleton-text>;\n }\n if (this.networkError) {\n // probably a CORS error\n return <img alt={this.alt} src={this.src} onError={err => this.onImageError(err)} />;\n }\n if (this.brokenFile) {\n // fetching worked, but HTTP response was not ok\n return <BrokenFile file={this.brokenFile} />;\n }\n if (this.imageError) {\n // if even the loading via classic <img src=\"...\"> failed, render a link\n return (\n <div class=\"error\">\n <a href={this.src}>{this.src}</a>\n </div>\n );\n }\n\n return (\n <Host\n style={{\n backgroundImage: this.blurredBackground ? `url('${this.dataUri}')` : null,\n }}\n >\n <img src={this.dataUri} alt={this.alt} />\n </Host>\n );\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'pos-internal-router',\n})\nexport class PosInternalRouter {\n @Prop()\n uri: string = 'pod-os:dashboard';\n\n render() {\n return this.uri === 'pod-os:settings' ? (\n <pos-app-settings></pos-app-settings>\n ) : (\n <pos-app-dashboard></pos-app-dashboard>\n );\n }\n}\n","import { Thing } from '@pod-os/core';\nimport { Component, Event, State } from '@stencil/core';\nimport { ResourceAware, ResourceEventEmitter, subscribeResource } from '../events/ResourceAware';\n\n/**\n * Displays a human-readable label of the resource, provided by [Thing.label()](https://pod-os.org/reference/core/classes/thing/#label)\n */\n@Component({\n tag: 'pos-label',\n shadow: true,\n})\nexport class PosLabel implements ResourceAware {\n @State() resource: Thing;\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: ResourceEventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.resource = resource;\n };\n\n render() {\n return this.resource ? this.resource.label() : null;\n }\n}\n",".container {\n display: flex;\n align-items: center;\n gap: var(--size-2);\n}\n.user-data {\n align-items: center;\n display: inline-flex;\n gap: 10px;\n}\n.user-data pos-picture {\n --width: 40px;\n --height: 40px;\n --border-radius: 50%;\n}\n\npos-login-form {\n margin: var(--size-2);\n}\n\ndialog {\n margin-top: var(--size-10);\n}\n\nbutton#login,\nbutton#logout {\n outline: none;\n font-weight: var(--weight-bold);\n letter-spacing: var(--letter-xl);\n border: none;\n box-sizing: border-box;\n border-radius: var(--radius-xs);\n padding: var(--size-2);\n box-shadow: var(--shadow-sm);\n color: var(--pos-primary-text-color);\n background-color: var(--pos-primary-color);\n}\n\nbutton#login:focus-within,\nbutton#logout:focus-within {\n outline: var(--pos-input-focus-outline);\n}\n\nbutton#login:focus,\nbutton#login:hover,\nbutton#logout:focus,\nbutton#logout:hover {\n filter: brightness(110%);\n box-shadow: var(--shadow-md);\n}\n","import { PodOS } from '@pod-os/core';\nimport { Component, Element, Event, EventEmitter, h, Host, Listen, State } from '@stencil/core';\n\nimport session from '../../store/session';\n\n@Component({\n tag: 'pos-login',\n shadow: true,\n styleUrl: 'pos-login.css',\n})\nexport class PosLogin {\n @Event({ eventName: 'pod-os:init' }) initializeOsEmitter: EventEmitter;\n\n @State() os: PodOS;\n\n @Element() host: HTMLElement;\n\n @State()\n private customLoggedInComponent: boolean = false;\n\n componentWillLoad() {\n this.customLoggedInComponent = !!this.host.querySelector('[slot=\"if-logged-in\"]');\n this.initializeOsEmitter.emit(this.setOs);\n }\n\n setOs = async (os: PodOS) => {\n this.os = os;\n };\n\n login(event: CustomEvent<string>) {\n const idpUrl = event.detail;\n this.os.login(idpUrl);\n }\n\n @Listen('pod-os:logout', { target: 'document' })\n logout() {\n this.os.logout();\n }\n\n private dialog: HTMLPosDialogElement;\n\n @Listen('pod-os:login', { target: 'document' })\n onLogin() {\n this.openDialog();\n }\n\n openDialog() {\n this.dialog.showModal();\n }\n\n render() {\n return (\n <Host>\n <div class=\"container\">\n {!session.state.isLoggedIn ? (\n <button id=\"login\" onClick={() => this.openDialog()}>\n Login\n </button>\n ) : (\n this.loggedInComponents()\n )}\n </div>\n <pos-dialog ref={el => (this.dialog = el)}>\n <span slot=\"title\">Sign in to your Pod</span>\n <pos-login-form onPod-os:idp-url-selected={ev => this.login(ev)} slot=\"content\" />\n </pos-dialog>\n </Host>\n );\n }\n\n private loggedInComponents() {\n return this.customLoggedInComponent ? <slot name=\"if-logged-in\"></slot> : this.defaultLoggedInComponents();\n }\n\n private defaultLoggedInComponents() {\n return [\n <pos-resource uri={session.state.webId}>\n <span class=\"user-data\">\n <pos-picture />\n <pos-label />\n </span>\n </pos-resource>,\n <button id=\"logout\" onClick={() => this.logout()}>\n Logout\n </button>,\n ];\n }\n}\n",":host {\n display: block;\n margin: 0;\n}\n\nform {\n display: flex;\n flex-direction: column;\n gap: var(--size-4);\n}\n\ninput {\n outline: var(--pos-input-outline);\n padding: var(--scale-000);\n border: none;\n border-radius: var(--radius-xs);\n width: var(--size-full);\n box-sizing: border-box;\n background: var(--pos-input-background-color);\n color: var(--pos-normal-text-color);\n}\n\ninput:focus-within {\n outline: var(--pos-input-focus-outline);\n}\n\ninput#login {\n outline: none;\n box-shadow: var(--shadow-sm);\n cursor: pointer;\n color: var(--pos-primary-text-color);\n background-color: var(--pos-primary-color);\n}\n\ninput#login:disabled {\n cursor: default;\n color: var(--pos-disabled-text-color);\n background-color: var(--pos-disabled-color);\n box-shadow: none;\n}\n\ninput#login:hover:not(:disabled),\ninput#login:focus {\n filter: brightness(110%);\n box-shadow: var(--shadow-md);\n}\n","import { Component, Event, EventEmitter, h, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'pos-login-form',\n shadow: {\n delegatesFocus: true,\n },\n styleUrl: 'pos-login-form.css',\n})\nexport class PosLoginForm {\n @State() idpUrl: string = '';\n\n @State() canSubmit: boolean = false;\n\n /**\n * Emits the selected IDP URL to use for login\n */\n @Event({ eventName: 'pod-os:idp-url-selected' }) idpUrlSelected: EventEmitter;\n\n @Watch('idpUrl')\n validate() {\n this.canSubmit = Boolean(this.idpUrl);\n }\n\n render(): any {\n return (\n <form method=\"dialog\" onSubmit={() => this.handleSubmit()}>\n <label htmlFor=\"idpUrl\">Please enter your Identity Provider</label>\n <input\n id=\"idpUrl\"\n type=\"url\"\n value={this.idpUrl}\n required={true}\n onInput={e => this.handleChange(e)}\n list=\"suggestedIssuers\"\n placeholder=\"Type to search...\"\n />\n <datalist id=\"suggestedIssuers\">\n <option value=\"https://solidcommunity.net/\">solidcommunity.net</option>\n <option value=\"https://solidweb.me/\">solidweb.me</option>\n <option value=\"https://login.inrupt.com\">Inrupt PodSpaces</option>\n <option value=\"https://trinpod.us\">trinpod.us</option>\n <option value=\"https://trinpod.eu\">trinpod.eu</option>\n <option value=\"https://solid.redpencil.io/\">redpencil.io</option>\n <option value=\"https://teamid.live/\">teamid.live</option>\n </datalist>\n <input id=\"login\" type=\"submit\" value=\"Login\" disabled={!this.canSubmit} />\n </form>\n );\n }\n\n handleChange(event) {\n this.validate();\n this.idpUrl = event.target.value;\n }\n\n async handleSubmit() {\n this.idpUrlSelected.emit(this.idpUrl);\n }\n}\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.1\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=y(3),T=Symbol.for(\"lit-noChange\"),E=Symbol.for(\"lit-nothing\"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?\"!--\"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp(\"</\"+u[2],\"g\")),c=m):void 0!==u[3]&&(c=m):c===m?\">\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[P(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:\".\"===e[1]?H:\"?\"===e[1]?I:\"@\"===e[1]?L:k}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=C.nextNode(),o++)}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||\"\"===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}class I extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E)}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const Z={M:e,P:h,A:o,C:1,L:V,R:M,D:u,V:S,I:R,H:k,N:I,U:L,B:H,F:z},j=t.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push(\"3.3.1\");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{Z as _$LH,x as html,w as mathml,T as noChange,E as nothing,B as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.1\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","// src/components/dropdown/dropdown.styles.ts\nimport { css } from \"lit\";\nvar dropdown_styles_default = css`\n :host {\n display: inline-block;\n }\n\n .dropdown::part(popup) {\n z-index: var(--sl-z-index-dropdown);\n }\n\n .dropdown[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .dropdown[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n .dropdown[data-current-placement^='left']::part(popup) {\n transform-origin: right;\n }\n\n .dropdown[data-current-placement^='right']::part(popup) {\n transform-origin: left;\n }\n\n .dropdown__trigger {\n display: block;\n }\n\n .dropdown__panel {\n font-family: var(--sl-font-sans);\n font-size: var(--sl-font-size-medium);\n font-weight: var(--sl-font-weight-normal);\n box-shadow: var(--sl-shadow-large);\n border-radius: var(--sl-border-radius-medium);\n pointer-events: none;\n }\n\n .dropdown--open .dropdown__panel {\n display: block;\n pointer-events: all;\n }\n\n /* When users slot a menu, make sure it conforms to the popup's auto-size */\n ::slotted(sl-menu) {\n max-width: var(--auto-size-available-width) !important;\n max-height: var(--auto-size-available-height) !important;\n }\n`;\n\nexport {\n dropdown_styles_default\n};\n","import {\n __yieldStar\n} from \"./chunk.KAW7D32O.js\";\n\n// src/internal/active-elements.ts\nfunction* activeElements(activeElement = document.activeElement) {\n if (activeElement === null || activeElement === void 0) return;\n yield activeElement;\n if (\"shadowRoot\" in activeElement && activeElement.shadowRoot && activeElement.shadowRoot.mode !== \"closed\") {\n yield* __yieldStar(activeElements(activeElement.shadowRoot.activeElement));\n }\n}\nfunction getDeepestActiveElement() {\n return [...activeElements()].pop();\n}\n\n// src/internal/tabbable.ts\nvar computedStyleMap = /* @__PURE__ */ new WeakMap();\nfunction getCachedComputedStyle(el) {\n let computedStyle = computedStyleMap.get(el);\n if (!computedStyle) {\n computedStyle = window.getComputedStyle(el, null);\n computedStyleMap.set(el, computedStyle);\n }\n return computedStyle;\n}\nfunction isVisible(el) {\n if (typeof el.checkVisibility === \"function\") {\n return el.checkVisibility({ checkOpacity: false, checkVisibilityCSS: true });\n }\n const computedStyle = getCachedComputedStyle(el);\n return computedStyle.visibility !== \"hidden\" && computedStyle.display !== \"none\";\n}\nfunction isOverflowingAndTabbable(el) {\n const computedStyle = getCachedComputedStyle(el);\n const { overflowY, overflowX } = computedStyle;\n if (overflowY === \"scroll\" || overflowX === \"scroll\") {\n return true;\n }\n if (overflowY !== \"auto\" || overflowX !== \"auto\") {\n return false;\n }\n const isOverflowingY = el.scrollHeight > el.clientHeight;\n if (isOverflowingY && overflowY === \"auto\") {\n return true;\n }\n const isOverflowingX = el.scrollWidth > el.clientWidth;\n if (isOverflowingX && overflowX === \"auto\") {\n return true;\n }\n return false;\n}\nfunction isTabbable(el) {\n const tag = el.tagName.toLowerCase();\n const tabindex = Number(el.getAttribute(\"tabindex\"));\n const hasTabindex = el.hasAttribute(\"tabindex\");\n if (hasTabindex && (isNaN(tabindex) || tabindex <= -1)) {\n return false;\n }\n if (el.hasAttribute(\"disabled\")) {\n return false;\n }\n if (el.closest(\"[inert]\")) {\n return false;\n }\n if (tag === \"input\" && el.getAttribute(\"type\") === \"radio\") {\n const rootNode = el.getRootNode();\n const findRadios = `input[type='radio'][name=\"${el.getAttribute(\"name\")}\"]`;\n const firstChecked = rootNode.querySelector(`${findRadios}:checked`);\n if (firstChecked) {\n return firstChecked === el;\n }\n const firstRadio = rootNode.querySelector(findRadios);\n return firstRadio === el;\n }\n if (!isVisible(el)) {\n return false;\n }\n if ((tag === \"audio\" || tag === \"video\") && el.hasAttribute(\"controls\")) {\n return true;\n }\n if (el.hasAttribute(\"tabindex\")) {\n return true;\n }\n if (el.hasAttribute(\"contenteditable\") && el.getAttribute(\"contenteditable\") !== \"false\") {\n return true;\n }\n const isNativelyTabbable = [\n \"button\",\n \"input\",\n \"select\",\n \"textarea\",\n \"a\",\n \"audio\",\n \"video\",\n \"summary\",\n \"iframe\"\n ].includes(tag);\n if (isNativelyTabbable) {\n return true;\n }\n return isOverflowingAndTabbable(el);\n}\nfunction getTabbableBoundary(root) {\n var _a, _b;\n const tabbableElements = getTabbableElements(root);\n const start = (_a = tabbableElements[0]) != null ? _a : null;\n const end = (_b = tabbableElements[tabbableElements.length - 1]) != null ? _b : null;\n return { start, end };\n}\nfunction getSlottedChildrenOutsideRootElement(slotElement, root) {\n var _a;\n return ((_a = slotElement.getRootNode({ composed: true })) == null ? void 0 : _a.host) !== root;\n}\nfunction getTabbableElements(root) {\n const walkedEls = /* @__PURE__ */ new WeakMap();\n const tabbableElements = [];\n function walk(el) {\n if (el instanceof Element) {\n if (el.hasAttribute(\"inert\") || el.closest(\"[inert]\")) {\n return;\n }\n if (walkedEls.has(el)) {\n return;\n }\n walkedEls.set(el, true);\n if (!tabbableElements.includes(el) && isTabbable(el)) {\n tabbableElements.push(el);\n }\n if (el instanceof HTMLSlotElement && getSlottedChildrenOutsideRootElement(el, root)) {\n el.assignedElements({ flatten: true }).forEach((assignedEl) => {\n walk(assignedEl);\n });\n }\n if (el.shadowRoot !== null && el.shadowRoot.mode === \"open\") {\n walk(el.shadowRoot);\n }\n }\n for (const e of el.children) {\n walk(e);\n }\n }\n walk(root);\n return tabbableElements.sort((a, b) => {\n const aTabindex = Number(a.getAttribute(\"tabindex\")) || 0;\n const bTabindex = Number(b.getAttribute(\"tabindex\")) || 0;\n return bTabindex - aTabindex;\n });\n}\n\nexport {\n activeElements,\n getDeepestActiveElement,\n getTabbableBoundary,\n getTabbableElements\n};\n","// src/components/popup/popup.styles.ts\nimport { css } from \"lit\";\nvar popup_styles_default = css`\n :host {\n --arrow-color: var(--sl-color-neutral-1000);\n --arrow-size: 6px;\n\n /*\n * These properties are computed to account for the arrow's dimensions after being rotated 45º. The constant\n * 0.7071 is derived from sin(45), which is the diagonal size of the arrow's container after rotating.\n */\n --arrow-size-diagonal: calc(var(--arrow-size) * 0.7071);\n --arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size));\n\n display: contents;\n }\n\n .popup {\n position: absolute;\n isolation: isolate;\n max-width: var(--auto-size-available-width, none);\n max-height: var(--auto-size-available-height, none);\n }\n\n .popup--fixed {\n position: fixed;\n }\n\n .popup:not(.popup--active) {\n display: none;\n }\n\n .popup__arrow {\n position: absolute;\n width: calc(var(--arrow-size-diagonal) * 2);\n height: calc(var(--arrow-size-diagonal) * 2);\n rotate: 45deg;\n background: var(--arrow-color);\n z-index: -1;\n }\n\n /* Hover bridge */\n .popup-hover-bridge:not(.popup-hover-bridge--visible) {\n display: none;\n }\n\n .popup-hover-bridge {\n position: fixed;\n z-index: calc(var(--sl-z-index-dropdown) - 1);\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n clip-path: polygon(\n var(--hover-bridge-top-left-x, 0) var(--hover-bridge-top-left-y, 0),\n var(--hover-bridge-top-right-x, 0) var(--hover-bridge-top-right-y, 0),\n var(--hover-bridge-bottom-right-x, 0) var(--hover-bridge-bottom-right-y, 0),\n var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)\n );\n }\n`;\n\nexport {\n popup_styles_default\n};\n","const connectedElements = new Set();\nconst translations = new Map();\nlet fallback;\nlet documentDirection = 'ltr';\nlet documentLanguage = 'en';\nconst isClient = (typeof MutationObserver !== \"undefined\" && typeof document !== \"undefined\" && typeof document.documentElement !== \"undefined\");\nif (isClient) {\n const documentElementObserver = new MutationObserver(update);\n documentDirection = document.documentElement.dir || 'ltr';\n documentLanguage = document.documentElement.lang || navigator.language;\n documentElementObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['dir', 'lang']\n });\n}\nexport function registerTranslation(...translation) {\n translation.map(t => {\n const code = t.$code.toLowerCase();\n if (translations.has(code)) {\n translations.set(code, Object.assign(Object.assign({}, translations.get(code)), t));\n }\n else {\n translations.set(code, t);\n }\n if (!fallback) {\n fallback = t;\n }\n });\n update();\n}\nexport function update() {\n if (isClient) {\n documentDirection = document.documentElement.dir || 'ltr';\n documentLanguage = document.documentElement.lang || navigator.language;\n }\n [...connectedElements.keys()].map((el) => {\n if (typeof el.requestUpdate === 'function') {\n el.requestUpdate();\n }\n });\n}\nexport class LocalizeController {\n constructor(host) {\n this.host = host;\n this.host.addController(this);\n }\n hostConnected() {\n connectedElements.add(this.host);\n }\n hostDisconnected() {\n connectedElements.delete(this.host);\n }\n dir() {\n return `${this.host.dir || documentDirection}`.toLowerCase();\n }\n lang() {\n return `${this.host.lang || documentLanguage}`.toLowerCase();\n }\n getTranslationData(lang) {\n var _a, _b;\n const locale = new Intl.Locale(lang.replace(/_/g, '-'));\n const language = locale === null || locale === void 0 ? void 0 : locale.language.toLowerCase();\n const region = (_b = (_a = locale === null || locale === void 0 ? void 0 : locale.region) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : '';\n const primary = translations.get(`${language}-${region}`);\n const secondary = translations.get(language);\n return { locale, language, region, primary, secondary };\n }\n exists(key, options) {\n var _a;\n const { primary, secondary } = this.getTranslationData((_a = options.lang) !== null && _a !== void 0 ? _a : this.lang());\n options = Object.assign({ includeFallback: false }, options);\n if ((primary && primary[key]) ||\n (secondary && secondary[key]) ||\n (options.includeFallback && fallback && fallback[key])) {\n return true;\n }\n return false;\n }\n term(key, ...args) {\n const { primary, secondary } = this.getTranslationData(this.lang());\n let term;\n if (primary && primary[key]) {\n term = primary[key];\n }\n else if (secondary && secondary[key]) {\n term = secondary[key];\n }\n else if (fallback && fallback[key]) {\n term = fallback[key];\n }\n else {\n console.error(`No translation found for: ${String(key)}`);\n return String(key);\n }\n if (typeof term === 'function') {\n return term(...args);\n }\n return term;\n }\n date(dateToFormat, options) {\n dateToFormat = new Date(dateToFormat);\n return new Intl.DateTimeFormat(this.lang(), options).format(dateToFormat);\n }\n number(numberToFormat, options) {\n numberToFormat = Number(numberToFormat);\n return isNaN(numberToFormat) ? '' : new Intl.NumberFormat(this.lang(), options).format(numberToFormat);\n }\n relativeTime(value, unit, options) {\n return new Intl.RelativeTimeFormat(this.lang(), options).format(value, unit);\n }\n}\n","// src/translations/en.ts\nimport { registerTranslation } from \"@shoelace-style/localize\";\nvar translation = {\n $code: \"en\",\n $name: \"English\",\n $dir: \"ltr\",\n carousel: \"Carousel\",\n clearEntry: \"Clear entry\",\n close: \"Close\",\n copied: \"Copied\",\n copy: \"Copy\",\n currentValue: \"Current value\",\n error: \"Error\",\n goToSlide: (slide, count) => `Go to slide ${slide} of ${count}`,\n hidePassword: \"Hide password\",\n loading: \"Loading\",\n nextSlide: \"Next slide\",\n numOptionsSelected: (num) => {\n if (num === 0) return \"No options selected\";\n if (num === 1) return \"1 option selected\";\n return `${num} options selected`;\n },\n previousSlide: \"Previous slide\",\n progress: \"Progress\",\n remove: \"Remove\",\n resize: \"Resize\",\n scrollToEnd: \"Scroll to end\",\n scrollToStart: \"Scroll to start\",\n selectAColorFromTheScreen: \"Select a color from the screen\",\n showPassword: \"Show password\",\n slideNum: (slide) => `Slide ${slide}`,\n toggleColorFormat: \"Toggle color format\"\n};\nregisterTranslation(translation);\nvar en_default = translation;\n\nexport {\n en_default\n};\n","import {\n en_default\n} from \"./chunk.7BTDLTNI.js\";\n\n// src/utilities/localize.ts\nimport { LocalizeController as DefaultLocalizationController, registerTranslation } from \"@shoelace-style/localize\";\nimport { registerTranslation as registerTranslation2 } from \"@shoelace-style/localize\";\nvar LocalizeController = class extends DefaultLocalizationController {\n};\nregisterTranslation(en_default);\n\nexport {\n LocalizeController,\n registerTranslation2 as registerTranslation\n};\n","// src/styles/component.styles.ts\nimport { css } from \"lit\";\nvar component_styles_default = css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n`;\n\nexport {\n component_styles_default\n};\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}=\"object\"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};\n//# sourceMappingURL=query.js.map\n","import {\n __decorateClass,\n __privateAdd,\n __privateGet,\n __privateSet,\n __spreadValues\n} from \"./chunk.KAW7D32O.js\";\n\n// src/internal/shoelace-element.ts\nimport { LitElement } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nvar _hasRecordedInitialProperties;\nvar ShoelaceElement = class extends LitElement {\n constructor() {\n super();\n __privateAdd(this, _hasRecordedInitialProperties, false);\n // Store the constructor value of all `static properties = {}`\n this.initialReflectedProperties = /* @__PURE__ */ new Map();\n Object.entries(this.constructor.dependencies).forEach(([name, component]) => {\n this.constructor.define(name, component);\n });\n }\n emit(name, options) {\n const event = new CustomEvent(name, __spreadValues({\n bubbles: true,\n cancelable: false,\n composed: true,\n detail: {}\n }, options));\n this.dispatchEvent(event);\n return event;\n }\n /* eslint-enable */\n static define(name, elementConstructor = this, options = {}) {\n const currentlyRegisteredConstructor = customElements.get(name);\n if (!currentlyRegisteredConstructor) {\n try {\n customElements.define(name, elementConstructor, options);\n } catch (_err) {\n customElements.define(name, class extends elementConstructor {\n }, options);\n }\n return;\n }\n let newVersion = \" (unknown version)\";\n let existingVersion = newVersion;\n if (\"version\" in elementConstructor && elementConstructor.version) {\n newVersion = \" v\" + elementConstructor.version;\n }\n if (\"version\" in currentlyRegisteredConstructor && currentlyRegisteredConstructor.version) {\n existingVersion = \" v\" + currentlyRegisteredConstructor.version;\n }\n if (newVersion && existingVersion && newVersion === existingVersion) {\n return;\n }\n console.warn(\n `Attempted to register <${name}>${newVersion}, but <${name}>${existingVersion} has already been registered.`\n );\n }\n attributeChangedCallback(name, oldValue, newValue) {\n if (!__privateGet(this, _hasRecordedInitialProperties)) {\n this.constructor.elementProperties.forEach(\n (obj, prop) => {\n if (obj.reflect && this[prop] != null) {\n this.initialReflectedProperties.set(prop, this[prop]);\n }\n }\n );\n __privateSet(this, _hasRecordedInitialProperties, true);\n }\n super.attributeChangedCallback(name, oldValue, newValue);\n }\n willUpdate(changedProperties) {\n super.willUpdate(changedProperties);\n this.initialReflectedProperties.forEach((value, prop) => {\n if (changedProperties.has(prop) && this[prop] == null) {\n this[prop] = value;\n }\n });\n }\n};\n_hasRecordedInitialProperties = new WeakMap();\n/* eslint-disable */\n// @ts-expect-error This is auto-injected at build time.\nShoelaceElement.version = \"2.20.1\";\nShoelaceElement.dependencies = {};\n__decorateClass([\n property()\n], ShoelaceElement.prototype, \"dir\", 2);\n__decorateClass([\n property()\n], ShoelaceElement.prototype, \"lang\", 2);\n\nexport {\n ShoelaceElement\n};\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nconst yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);\nfunction getSideAxis(placement) {\n return yAxisSides.has(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {\n if (ignoreScrollbarX === void 0) {\n ignoreScrollbarX = false;\n }\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :\n // RTL <body> scrollbar.\n getWindowScrollBarX(documentElement, htmlRect));\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nconst absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as s,Directive as i,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=s(class extends i{constructor(t){if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||t.strings?.length>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((s=>t[s])).join(\" \")+\" \"}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return t}});export{e as classMap};\n//# sourceMappingURL=class-map.js.map\n","import { isContainingBlock } from '@floating-ui/utils/dom';\n\nfunction offsetParent(element) {\n return offsetParentPolyfill(element);\n}\nfunction offsetTop(element) {\n return offsetTopLeftPolyfill(element, 'offsetTop');\n}\nfunction offsetLeft(element) {\n return offsetTopLeftPolyfill(element, 'offsetLeft');\n}\nfunction flatTreeParent(element) {\n if (element.assignedSlot) {\n return element.assignedSlot;\n }\n if (element.parentNode instanceof ShadowRoot) {\n return element.parentNode.host;\n }\n return element.parentNode;\n}\nfunction ancestorTreeScopes(element) {\n const scopes = new Set();\n let currentScope = element.getRootNode();\n while (currentScope) {\n scopes.add(currentScope);\n currentScope = currentScope.parentNode\n ? currentScope.parentNode.getRootNode()\n : null;\n }\n return scopes;\n}\nfunction offsetParentPolyfill(element) {\n // Do an initial walk to check for display:none ancestors.\n for (let ancestor = element; ancestor; ancestor = flatTreeParent(ancestor)) {\n if (!(ancestor instanceof Element)) {\n continue;\n }\n if (getComputedStyle(ancestor).display === 'none') {\n return null;\n }\n }\n for (let ancestor = flatTreeParent(element); ancestor; ancestor = flatTreeParent(ancestor)) {\n if (!(ancestor instanceof Element)) {\n continue;\n }\n const style = getComputedStyle(ancestor);\n // Display:contents nodes aren't in the layout tree, so they should be skipped.\n if (style.display === 'contents') {\n continue;\n }\n if (style.position !== 'static' || isContainingBlock(style)) {\n return ancestor;\n }\n if (ancestor.tagName === 'BODY') {\n return ancestor;\n }\n }\n return null;\n}\nfunction offsetTopLeftPolyfill(element, offsetTopOrLeft) {\n let value = element[offsetTopOrLeft];\n let nextOffsetParent = offsetParentPolyfill(element);\n const scopes = ancestorTreeScopes(element);\n while (nextOffsetParent && !scopes.has(nextOffsetParent.getRootNode())) {\n value -= nextOffsetParent[offsetTopOrLeft];\n nextOffsetParent = offsetParentPolyfill(nextOffsetParent);\n }\n return value;\n}\n\nexport { offsetLeft, offsetParent, offsetTop };\n","import {\n popup_styles_default\n} from \"./chunk.3KSWVBQ5.js\";\nimport {\n LocalizeController\n} from \"./chunk.6CTB5ZDJ.js\";\nimport {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.4TUIT776.js\";\nimport {\n __decorateClass,\n __spreadProps,\n __spreadValues\n} from \"./chunk.KAW7D32O.js\";\n\n// src/components/popup/popup.component.ts\nimport { arrow, autoUpdate, computePosition, flip, offset, platform, shift, size } from \"@floating-ui/dom\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { html } from \"lit\";\nimport { offsetParent } from \"composed-offset-position\";\nimport { property, query } from \"lit/decorators.js\";\nfunction isVirtualElement(e) {\n return e !== null && typeof e === \"object\" && \"getBoundingClientRect\" in e && (\"contextElement\" in e ? e.contextElement instanceof Element : true);\n}\nvar SlPopup = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.localize = new LocalizeController(this);\n this.active = false;\n this.placement = \"top\";\n this.strategy = \"absolute\";\n this.distance = 0;\n this.skidding = 0;\n this.arrow = false;\n this.arrowPlacement = \"anchor\";\n this.arrowPadding = 10;\n this.flip = false;\n this.flipFallbackPlacements = \"\";\n this.flipFallbackStrategy = \"best-fit\";\n this.flipPadding = 0;\n this.shift = false;\n this.shiftPadding = 0;\n this.autoSizePadding = 0;\n this.hoverBridge = false;\n this.updateHoverBridge = () => {\n if (this.hoverBridge && this.anchorEl) {\n const anchorRect = this.anchorEl.getBoundingClientRect();\n const popupRect = this.popup.getBoundingClientRect();\n const isVertical = this.placement.includes(\"top\") || this.placement.includes(\"bottom\");\n let topLeftX = 0;\n let topLeftY = 0;\n let topRightX = 0;\n let topRightY = 0;\n let bottomLeftX = 0;\n let bottomLeftY = 0;\n let bottomRightX = 0;\n let bottomRightY = 0;\n if (isVertical) {\n if (anchorRect.top < popupRect.top) {\n topLeftX = anchorRect.left;\n topLeftY = anchorRect.bottom;\n topRightX = anchorRect.right;\n topRightY = anchorRect.bottom;\n bottomLeftX = popupRect.left;\n bottomLeftY = popupRect.top;\n bottomRightX = popupRect.right;\n bottomRightY = popupRect.top;\n } else {\n topLeftX = popupRect.left;\n topLeftY = popupRect.bottom;\n topRightX = popupRect.right;\n topRightY = popupRect.bottom;\n bottomLeftX = anchorRect.left;\n bottomLeftY = anchorRect.top;\n bottomRightX = anchorRect.right;\n bottomRightY = anchorRect.top;\n }\n } else {\n if (anchorRect.left < popupRect.left) {\n topLeftX = anchorRect.right;\n topLeftY = anchorRect.top;\n topRightX = popupRect.left;\n topRightY = popupRect.top;\n bottomLeftX = anchorRect.right;\n bottomLeftY = anchorRect.bottom;\n bottomRightX = popupRect.left;\n bottomRightY = popupRect.bottom;\n } else {\n topLeftX = popupRect.right;\n topLeftY = popupRect.top;\n topRightX = anchorRect.left;\n topRightY = anchorRect.top;\n bottomLeftX = popupRect.right;\n bottomLeftY = popupRect.bottom;\n bottomRightX = anchorRect.left;\n bottomRightY = anchorRect.bottom;\n }\n }\n this.style.setProperty(\"--hover-bridge-top-left-x\", `${topLeftX}px`);\n this.style.setProperty(\"--hover-bridge-top-left-y\", `${topLeftY}px`);\n this.style.setProperty(\"--hover-bridge-top-right-x\", `${topRightX}px`);\n this.style.setProperty(\"--hover-bridge-top-right-y\", `${topRightY}px`);\n this.style.setProperty(\"--hover-bridge-bottom-left-x\", `${bottomLeftX}px`);\n this.style.setProperty(\"--hover-bridge-bottom-left-y\", `${bottomLeftY}px`);\n this.style.setProperty(\"--hover-bridge-bottom-right-x\", `${bottomRightX}px`);\n this.style.setProperty(\"--hover-bridge-bottom-right-y\", `${bottomRightY}px`);\n }\n };\n }\n async connectedCallback() {\n super.connectedCallback();\n await this.updateComplete;\n this.start();\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.stop();\n }\n async updated(changedProps) {\n super.updated(changedProps);\n if (changedProps.has(\"active\")) {\n if (this.active) {\n this.start();\n } else {\n this.stop();\n }\n }\n if (changedProps.has(\"anchor\")) {\n this.handleAnchorChange();\n }\n if (this.active) {\n await this.updateComplete;\n this.reposition();\n }\n }\n async handleAnchorChange() {\n await this.stop();\n if (this.anchor && typeof this.anchor === \"string\") {\n const root = this.getRootNode();\n this.anchorEl = root.getElementById(this.anchor);\n } else if (this.anchor instanceof Element || isVirtualElement(this.anchor)) {\n this.anchorEl = this.anchor;\n } else {\n this.anchorEl = this.querySelector('[slot=\"anchor\"]');\n }\n if (this.anchorEl instanceof HTMLSlotElement) {\n this.anchorEl = this.anchorEl.assignedElements({ flatten: true })[0];\n }\n if (this.anchorEl && this.active) {\n this.start();\n }\n }\n start() {\n if (!this.anchorEl || !this.active) {\n return;\n }\n this.cleanup = autoUpdate(this.anchorEl, this.popup, () => {\n this.reposition();\n });\n }\n async stop() {\n return new Promise((resolve) => {\n if (this.cleanup) {\n this.cleanup();\n this.cleanup = void 0;\n this.removeAttribute(\"data-current-placement\");\n this.style.removeProperty(\"--auto-size-available-width\");\n this.style.removeProperty(\"--auto-size-available-height\");\n requestAnimationFrame(() => resolve());\n } else {\n resolve();\n }\n });\n }\n /** Forces the popup to recalculate and reposition itself. */\n reposition() {\n if (!this.active || !this.anchorEl) {\n return;\n }\n const middleware = [\n // The offset middleware goes first\n offset({ mainAxis: this.distance, crossAxis: this.skidding })\n ];\n if (this.sync) {\n middleware.push(\n size({\n apply: ({ rects }) => {\n const syncWidth = this.sync === \"width\" || this.sync === \"both\";\n const syncHeight = this.sync === \"height\" || this.sync === \"both\";\n this.popup.style.width = syncWidth ? `${rects.reference.width}px` : \"\";\n this.popup.style.height = syncHeight ? `${rects.reference.height}px` : \"\";\n }\n })\n );\n } else {\n this.popup.style.width = \"\";\n this.popup.style.height = \"\";\n }\n if (this.flip) {\n middleware.push(\n flip({\n boundary: this.flipBoundary,\n // @ts-expect-error - We're converting a string attribute to an array here\n fallbackPlacements: this.flipFallbackPlacements,\n fallbackStrategy: this.flipFallbackStrategy === \"best-fit\" ? \"bestFit\" : \"initialPlacement\",\n padding: this.flipPadding\n })\n );\n }\n if (this.shift) {\n middleware.push(\n shift({\n boundary: this.shiftBoundary,\n padding: this.shiftPadding\n })\n );\n }\n if (this.autoSize) {\n middleware.push(\n size({\n boundary: this.autoSizeBoundary,\n padding: this.autoSizePadding,\n apply: ({ availableWidth, availableHeight }) => {\n if (this.autoSize === \"vertical\" || this.autoSize === \"both\") {\n this.style.setProperty(\"--auto-size-available-height\", `${availableHeight}px`);\n } else {\n this.style.removeProperty(\"--auto-size-available-height\");\n }\n if (this.autoSize === \"horizontal\" || this.autoSize === \"both\") {\n this.style.setProperty(\"--auto-size-available-width\", `${availableWidth}px`);\n } else {\n this.style.removeProperty(\"--auto-size-available-width\");\n }\n }\n })\n );\n } else {\n this.style.removeProperty(\"--auto-size-available-width\");\n this.style.removeProperty(\"--auto-size-available-height\");\n }\n if (this.arrow) {\n middleware.push(\n arrow({\n element: this.arrowEl,\n padding: this.arrowPadding\n })\n );\n }\n const getOffsetParent = this.strategy === \"absolute\" ? (element) => platform.getOffsetParent(element, offsetParent) : platform.getOffsetParent;\n computePosition(this.anchorEl, this.popup, {\n placement: this.placement,\n middleware,\n strategy: this.strategy,\n platform: __spreadProps(__spreadValues({}, platform), {\n getOffsetParent\n })\n }).then(({ x, y, middlewareData, placement }) => {\n const isRtl = this.localize.dir() === \"rtl\";\n const staticSide = { top: \"bottom\", right: \"left\", bottom: \"top\", left: \"right\" }[placement.split(\"-\")[0]];\n this.setAttribute(\"data-current-placement\", placement);\n Object.assign(this.popup.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n if (this.arrow) {\n const arrowX = middlewareData.arrow.x;\n const arrowY = middlewareData.arrow.y;\n let top = \"\";\n let right = \"\";\n let bottom = \"\";\n let left = \"\";\n if (this.arrowPlacement === \"start\") {\n const value = typeof arrowX === \"number\" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : \"\";\n top = typeof arrowY === \"number\" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : \"\";\n right = isRtl ? value : \"\";\n left = isRtl ? \"\" : value;\n } else if (this.arrowPlacement === \"end\") {\n const value = typeof arrowX === \"number\" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : \"\";\n right = isRtl ? \"\" : value;\n left = isRtl ? value : \"\";\n bottom = typeof arrowY === \"number\" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : \"\";\n } else if (this.arrowPlacement === \"center\") {\n left = typeof arrowX === \"number\" ? `calc(50% - var(--arrow-size-diagonal))` : \"\";\n top = typeof arrowY === \"number\" ? `calc(50% - var(--arrow-size-diagonal))` : \"\";\n } else {\n left = typeof arrowX === \"number\" ? `${arrowX}px` : \"\";\n top = typeof arrowY === \"number\" ? `${arrowY}px` : \"\";\n }\n Object.assign(this.arrowEl.style, {\n top,\n right,\n bottom,\n left,\n [staticSide]: \"calc(var(--arrow-size-diagonal) * -1)\"\n });\n }\n });\n requestAnimationFrame(() => this.updateHoverBridge());\n this.emit(\"sl-reposition\");\n }\n render() {\n return html`\n <slot name=\"anchor\" @slotchange=${this.handleAnchorChange}></slot>\n\n <span\n part=\"hover-bridge\"\n class=${classMap({\n \"popup-hover-bridge\": true,\n \"popup-hover-bridge--visible\": this.hoverBridge && this.active\n })}\n ></span>\n\n <div\n part=\"popup\"\n class=${classMap({\n popup: true,\n \"popup--active\": this.active,\n \"popup--fixed\": this.strategy === \"fixed\",\n \"popup--has-arrow\": this.arrow\n })}\n >\n <slot></slot>\n ${this.arrow ? html`<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>` : \"\"}\n </div>\n `;\n }\n};\nSlPopup.styles = [component_styles_default, popup_styles_default];\n__decorateClass([\n query(\".popup\")\n], SlPopup.prototype, \"popup\", 2);\n__decorateClass([\n query(\".popup__arrow\")\n], SlPopup.prototype, \"arrowEl\", 2);\n__decorateClass([\n property()\n], SlPopup.prototype, \"anchor\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlPopup.prototype, \"active\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlPopup.prototype, \"placement\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlPopup.prototype, \"strategy\", 2);\n__decorateClass([\n property({ type: Number })\n], SlPopup.prototype, \"distance\", 2);\n__decorateClass([\n property({ type: Number })\n], SlPopup.prototype, \"skidding\", 2);\n__decorateClass([\n property({ type: Boolean })\n], SlPopup.prototype, \"arrow\", 2);\n__decorateClass([\n property({ attribute: \"arrow-placement\" })\n], SlPopup.prototype, \"arrowPlacement\", 2);\n__decorateClass([\n property({ attribute: \"arrow-padding\", type: Number })\n], SlPopup.prototype, \"arrowPadding\", 2);\n__decorateClass([\n property({ type: Boolean })\n], SlPopup.prototype, \"flip\", 2);\n__decorateClass([\n property({\n attribute: \"flip-fallback-placements\",\n converter: {\n fromAttribute: (value) => {\n return value.split(\" \").map((p) => p.trim()).filter((p) => p !== \"\");\n },\n toAttribute: (value) => {\n return value.join(\" \");\n }\n }\n })\n], SlPopup.prototype, \"flipFallbackPlacements\", 2);\n__decorateClass([\n property({ attribute: \"flip-fallback-strategy\" })\n], SlPopup.prototype, \"flipFallbackStrategy\", 2);\n__decorateClass([\n property({ type: Object })\n], SlPopup.prototype, \"flipBoundary\", 2);\n__decorateClass([\n property({ attribute: \"flip-padding\", type: Number })\n], SlPopup.prototype, \"flipPadding\", 2);\n__decorateClass([\n property({ type: Boolean })\n], SlPopup.prototype, \"shift\", 2);\n__decorateClass([\n property({ type: Object })\n], SlPopup.prototype, \"shiftBoundary\", 2);\n__decorateClass([\n property({ attribute: \"shift-padding\", type: Number })\n], SlPopup.prototype, \"shiftPadding\", 2);\n__decorateClass([\n property({ attribute: \"auto-size\" })\n], SlPopup.prototype, \"autoSize\", 2);\n__decorateClass([\n property()\n], SlPopup.prototype, \"sync\", 2);\n__decorateClass([\n property({ type: Object })\n], SlPopup.prototype, \"autoSizeBoundary\", 2);\n__decorateClass([\n property({ attribute: \"auto-size-padding\", type: Number })\n], SlPopup.prototype, \"autoSizePadding\", 2);\n__decorateClass([\n property({ attribute: \"hover-bridge\", type: Boolean })\n], SlPopup.prototype, \"hoverBridge\", 2);\n\nexport {\n SlPopup\n};\n","import {\n __spreadProps,\n __spreadValues\n} from \"./chunk.KAW7D32O.js\";\n\n// src/utilities/animation-registry.ts\nvar defaultAnimationRegistry = /* @__PURE__ */ new Map();\nvar customAnimationRegistry = /* @__PURE__ */ new WeakMap();\nfunction ensureAnimation(animation) {\n return animation != null ? animation : { keyframes: [], options: { duration: 0 } };\n}\nfunction getLogicalAnimation(animation, dir) {\n if (dir.toLowerCase() === \"rtl\") {\n return {\n keyframes: animation.rtlKeyframes || animation.keyframes,\n options: animation.options\n };\n }\n return animation;\n}\nfunction setDefaultAnimation(animationName, animation) {\n defaultAnimationRegistry.set(animationName, ensureAnimation(animation));\n}\nfunction setAnimation(el, animationName, animation) {\n customAnimationRegistry.set(el, __spreadProps(__spreadValues({}, customAnimationRegistry.get(el)), { [animationName]: ensureAnimation(animation) }));\n}\nfunction getAnimation(el, animationName, options) {\n const customAnimation = customAnimationRegistry.get(el);\n if (customAnimation == null ? void 0 : customAnimation[animationName]) {\n return getLogicalAnimation(customAnimation[animationName], options.dir);\n }\n const defaultAnimation = defaultAnimationRegistry.get(animationName);\n if (defaultAnimation) {\n return getLogicalAnimation(defaultAnimation, options.dir);\n }\n return {\n keyframes: [],\n options: { duration: 0 }\n };\n}\n\nexport {\n setDefaultAnimation,\n setAnimation,\n getAnimation\n};\n","// src/internal/event.ts\nfunction waitForEvent(el, eventName) {\n return new Promise((resolve) => {\n function done(event) {\n if (event.target === el) {\n el.removeEventListener(eventName, done);\n resolve();\n }\n }\n el.addEventListener(eventName, done);\n });\n}\n\nexport {\n waitForEvent\n};\n","import {\n __spreadProps,\n __spreadValues\n} from \"./chunk.KAW7D32O.js\";\n\n// src/internal/animate.ts\nfunction animateTo(el, keyframes, options) {\n return new Promise((resolve) => {\n if ((options == null ? void 0 : options.duration) === Infinity) {\n throw new Error(\"Promise-based animations must be finite.\");\n }\n const animation = el.animate(keyframes, __spreadProps(__spreadValues({}, options), {\n duration: prefersReducedMotion() ? 0 : options.duration\n }));\n animation.addEventListener(\"cancel\", resolve, { once: true });\n animation.addEventListener(\"finish\", resolve, { once: true });\n });\n}\nfunction parseDuration(delay) {\n delay = delay.toString().toLowerCase();\n if (delay.indexOf(\"ms\") > -1) {\n return parseFloat(delay);\n }\n if (delay.indexOf(\"s\") > -1) {\n return parseFloat(delay) * 1e3;\n }\n return parseFloat(delay);\n}\nfunction prefersReducedMotion() {\n const query = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n return query.matches;\n}\nfunction stopAnimations(el) {\n return Promise.all(\n el.getAnimations().map((animation) => {\n return new Promise((resolve) => {\n animation.cancel();\n requestAnimationFrame(resolve);\n });\n })\n );\n}\nfunction shimKeyframesHeightAuto(keyframes, calculatedHeight) {\n return keyframes.map((keyframe) => __spreadProps(__spreadValues({}, keyframe), {\n height: keyframe.height === \"auto\" ? `${calculatedHeight}px` : keyframe.height\n }));\n}\n\nexport {\n animateTo,\n parseDuration,\n prefersReducedMotion,\n stopAnimations,\n shimKeyframesHeightAuto\n};\n","import {\n __spreadValues\n} from \"./chunk.KAW7D32O.js\";\n\n// src/internal/watch.ts\nfunction watch(propertyName, options) {\n const resolvedOptions = __spreadValues({\n waitUntilFirstUpdate: false\n }, options);\n return (proto, decoratedFnName) => {\n const { update } = proto;\n const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];\n proto.update = function(changedProps) {\n watchedProperties.forEach((property) => {\n const key = property;\n if (changedProps.has(key)) {\n const oldValue = changedProps.get(key);\n const newValue = this[key];\n if (oldValue !== newValue) {\n if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) {\n this[decoratedFnName](oldValue, newValue);\n }\n }\n }\n });\n update.call(this, changedProps);\n };\n };\n}\n\nexport {\n watch\n};\n","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","import {\n dropdown_styles_default\n} from \"./chunk.LXP7GVU3.js\";\nimport {\n getDeepestActiveElement,\n getTabbableBoundary\n} from \"./chunk.VESXC477.js\";\nimport {\n SlPopup\n} from \"./chunk.5JY5FUCG.js\";\nimport {\n getAnimation,\n setDefaultAnimation\n} from \"./chunk.K7JGTRV7.js\";\nimport {\n waitForEvent\n} from \"./chunk.B4BZKR24.js\";\nimport {\n animateTo,\n stopAnimations\n} from \"./chunk.AJ3ENQ5C.js\";\nimport {\n LocalizeController\n} from \"./chunk.6CTB5ZDJ.js\";\nimport {\n watch\n} from \"./chunk.GMYPQTFK.js\";\nimport {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.4TUIT776.js\";\nimport {\n __decorateClass\n} from \"./chunk.KAW7D32O.js\";\n\n// src/components/dropdown/dropdown.component.ts\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { html } from \"lit\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { property, query } from \"lit/decorators.js\";\nvar SlDropdown = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.localize = new LocalizeController(this);\n this.open = false;\n this.placement = \"bottom-start\";\n this.disabled = false;\n this.stayOpenOnSelect = false;\n this.distance = 0;\n this.skidding = 0;\n this.hoist = false;\n this.sync = void 0;\n this.handleKeyDown = (event) => {\n if (this.open && event.key === \"Escape\") {\n event.stopPropagation();\n this.hide();\n this.focusOnTrigger();\n }\n };\n this.handleDocumentKeyDown = (event) => {\n var _a;\n if (event.key === \"Escape\" && this.open && !this.closeWatcher) {\n event.stopPropagation();\n this.focusOnTrigger();\n this.hide();\n return;\n }\n if (event.key === \"Tab\") {\n if (this.open && ((_a = document.activeElement) == null ? void 0 : _a.tagName.toLowerCase()) === \"sl-menu-item\") {\n event.preventDefault();\n this.hide();\n this.focusOnTrigger();\n return;\n }\n const computeClosestContaining = (element, tagName) => {\n if (!element) return null;\n const closest = element.closest(tagName);\n if (closest) return closest;\n const rootNode = element.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n return computeClosestContaining(rootNode.host, tagName);\n }\n return null;\n };\n setTimeout(() => {\n var _a2;\n const activeElement = ((_a2 = this.containingElement) == null ? void 0 : _a2.getRootNode()) instanceof ShadowRoot ? getDeepestActiveElement() : document.activeElement;\n if (!this.containingElement || computeClosestContaining(activeElement, this.containingElement.tagName.toLowerCase()) !== this.containingElement) {\n this.hide();\n }\n });\n }\n };\n this.handleDocumentMouseDown = (event) => {\n const path = event.composedPath();\n if (this.containingElement && !path.includes(this.containingElement)) {\n this.hide();\n }\n };\n this.handlePanelSelect = (event) => {\n const target = event.target;\n if (!this.stayOpenOnSelect && target.tagName.toLowerCase() === \"sl-menu\") {\n this.hide();\n this.focusOnTrigger();\n }\n };\n }\n connectedCallback() {\n super.connectedCallback();\n if (!this.containingElement) {\n this.containingElement = this;\n }\n }\n firstUpdated() {\n this.panel.hidden = !this.open;\n if (this.open) {\n this.addOpenListeners();\n this.popup.active = true;\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.hide();\n }\n focusOnTrigger() {\n const trigger = this.trigger.assignedElements({ flatten: true })[0];\n if (typeof (trigger == null ? void 0 : trigger.focus) === \"function\") {\n trigger.focus();\n }\n }\n getMenu() {\n return this.panel.assignedElements({ flatten: true }).find((el) => el.tagName.toLowerCase() === \"sl-menu\");\n }\n handleTriggerClick() {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n this.focusOnTrigger();\n }\n }\n async handleTriggerKeyDown(event) {\n if ([\" \", \"Enter\"].includes(event.key)) {\n event.preventDefault();\n this.handleTriggerClick();\n return;\n }\n const menu = this.getMenu();\n if (menu) {\n const menuItems = menu.getAllItems();\n const firstMenuItem = menuItems[0];\n const lastMenuItem = menuItems[menuItems.length - 1];\n if ([\"ArrowDown\", \"ArrowUp\", \"Home\", \"End\"].includes(event.key)) {\n event.preventDefault();\n if (!this.open) {\n this.show();\n await this.updateComplete;\n }\n if (menuItems.length > 0) {\n this.updateComplete.then(() => {\n if (event.key === \"ArrowDown\" || event.key === \"Home\") {\n menu.setCurrentItem(firstMenuItem);\n firstMenuItem.focus();\n }\n if (event.key === \"ArrowUp\" || event.key === \"End\") {\n menu.setCurrentItem(lastMenuItem);\n lastMenuItem.focus();\n }\n });\n }\n }\n }\n }\n handleTriggerKeyUp(event) {\n if (event.key === \" \") {\n event.preventDefault();\n }\n }\n handleTriggerSlotChange() {\n this.updateAccessibleTrigger();\n }\n //\n // Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and\n // `aria-expanded`. These must be applied to the \"accessible trigger\" (the tabbable portion of the trigger element\n // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,\n // a child of the slotted element, or an element in the slotted element's shadow root.\n //\n // For example, the accessible trigger of an <sl-button> is a <button> located inside its shadow root.\n //\n // To determine this, we assume the first tabbable element in the trigger slot is the \"accessible trigger.\"\n //\n updateAccessibleTrigger() {\n const assignedElements = this.trigger.assignedElements({ flatten: true });\n const accessibleTrigger = assignedElements.find((el) => getTabbableBoundary(el).start);\n let target;\n if (accessibleTrigger) {\n switch (accessibleTrigger.tagName.toLowerCase()) {\n // Shoelace buttons have to update the internal button so it's announced correctly by screen readers\n case \"sl-button\":\n case \"sl-icon-button\":\n target = accessibleTrigger.button;\n break;\n default:\n target = accessibleTrigger;\n }\n target.setAttribute(\"aria-haspopup\", \"true\");\n target.setAttribute(\"aria-expanded\", this.open ? \"true\" : \"false\");\n }\n }\n /** Shows the dropdown panel. */\n async show() {\n if (this.open) {\n return void 0;\n }\n this.open = true;\n return waitForEvent(this, \"sl-after-show\");\n }\n /** Hides the dropdown panel */\n async hide() {\n if (!this.open) {\n return void 0;\n }\n this.open = false;\n return waitForEvent(this, \"sl-after-hide\");\n }\n /**\n * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\n * is activated.\n */\n reposition() {\n this.popup.reposition();\n }\n addOpenListeners() {\n var _a;\n this.panel.addEventListener(\"sl-select\", this.handlePanelSelect);\n if (\"CloseWatcher\" in window) {\n (_a = this.closeWatcher) == null ? void 0 : _a.destroy();\n this.closeWatcher = new CloseWatcher();\n this.closeWatcher.onclose = () => {\n this.hide();\n this.focusOnTrigger();\n };\n } else {\n this.panel.addEventListener(\"keydown\", this.handleKeyDown);\n }\n document.addEventListener(\"keydown\", this.handleDocumentKeyDown);\n document.addEventListener(\"mousedown\", this.handleDocumentMouseDown);\n }\n removeOpenListeners() {\n var _a;\n if (this.panel) {\n this.panel.removeEventListener(\"sl-select\", this.handlePanelSelect);\n this.panel.removeEventListener(\"keydown\", this.handleKeyDown);\n }\n document.removeEventListener(\"keydown\", this.handleDocumentKeyDown);\n document.removeEventListener(\"mousedown\", this.handleDocumentMouseDown);\n (_a = this.closeWatcher) == null ? void 0 : _a.destroy();\n }\n async handleOpenChange() {\n if (this.disabled) {\n this.open = false;\n return;\n }\n this.updateAccessibleTrigger();\n if (this.open) {\n this.emit(\"sl-show\");\n this.addOpenListeners();\n await stopAnimations(this);\n this.panel.hidden = false;\n this.popup.active = true;\n const { keyframes, options } = getAnimation(this, \"dropdown.show\", { dir: this.localize.dir() });\n await animateTo(this.popup.popup, keyframes, options);\n this.emit(\"sl-after-show\");\n } else {\n this.emit(\"sl-hide\");\n this.removeOpenListeners();\n await stopAnimations(this);\n const { keyframes, options } = getAnimation(this, \"dropdown.hide\", { dir: this.localize.dir() });\n await animateTo(this.popup.popup, keyframes, options);\n this.panel.hidden = true;\n this.popup.active = false;\n this.emit(\"sl-after-hide\");\n }\n }\n render() {\n return html`\n <sl-popup\n part=\"base\"\n exportparts=\"popup:base__popup\"\n id=\"dropdown\"\n placement=${this.placement}\n distance=${this.distance}\n skidding=${this.skidding}\n strategy=${this.hoist ? \"fixed\" : \"absolute\"}\n flip\n shift\n auto-size=\"vertical\"\n auto-size-padding=\"10\"\n sync=${ifDefined(this.sync ? this.sync : void 0)}\n class=${classMap({\n dropdown: true,\n \"dropdown--open\": this.open\n })}\n >\n <slot\n name=\"trigger\"\n slot=\"anchor\"\n part=\"trigger\"\n class=\"dropdown__trigger\"\n @click=${this.handleTriggerClick}\n @keydown=${this.handleTriggerKeyDown}\n @keyup=${this.handleTriggerKeyUp}\n @slotchange=${this.handleTriggerSlotChange}\n ></slot>\n\n <div aria-hidden=${this.open ? \"false\" : \"true\"} aria-labelledby=\"dropdown\">\n <slot part=\"panel\" class=\"dropdown__panel\"></slot>\n </div>\n </sl-popup>\n `;\n }\n};\nSlDropdown.styles = [component_styles_default, dropdown_styles_default];\nSlDropdown.dependencies = { \"sl-popup\": SlPopup };\n__decorateClass([\n query(\".dropdown\")\n], SlDropdown.prototype, \"popup\", 2);\n__decorateClass([\n query(\".dropdown__trigger\")\n], SlDropdown.prototype, \"trigger\", 2);\n__decorateClass([\n query(\".dropdown__panel\")\n], SlDropdown.prototype, \"panel\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlDropdown.prototype, \"open\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlDropdown.prototype, \"placement\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlDropdown.prototype, \"disabled\", 2);\n__decorateClass([\n property({ attribute: \"stay-open-on-select\", type: Boolean, reflect: true })\n], SlDropdown.prototype, \"stayOpenOnSelect\", 2);\n__decorateClass([\n property({ attribute: false })\n], SlDropdown.prototype, \"containingElement\", 2);\n__decorateClass([\n property({ type: Number })\n], SlDropdown.prototype, \"distance\", 2);\n__decorateClass([\n property({ type: Number })\n], SlDropdown.prototype, \"skidding\", 2);\n__decorateClass([\n property({ type: Boolean })\n], SlDropdown.prototype, \"hoist\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlDropdown.prototype, \"sync\", 2);\n__decorateClass([\n watch(\"open\", { waitUntilFirstUpdate: true })\n], SlDropdown.prototype, \"handleOpenChange\", 1);\nsetDefaultAnimation(\"dropdown.show\", {\n keyframes: [\n { opacity: 0, scale: 0.9 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 100, easing: \"ease\" }\n});\nsetDefaultAnimation(\"dropdown.hide\", {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.9 }\n ],\n options: { duration: 100, easing: \"ease\" }\n});\n\nexport {\n SlDropdown\n};\n","import {\n SlDropdown\n} from \"./chunk.C56A5M6T.js\";\n\n// src/components/dropdown/dropdown.ts\nvar dropdown_default = SlDropdown;\nSlDropdown.define(\"sl-dropdown\");\n\nexport {\n dropdown_default\n};\n","// src/components/menu/menu.styles.ts\nimport { css } from \"lit\";\nvar menu_styles_default = css`\n :host {\n display: block;\n position: relative;\n background: var(--sl-panel-background-color);\n border: solid var(--sl-panel-border-width) var(--sl-panel-border-color);\n border-radius: var(--sl-border-radius-medium);\n padding: var(--sl-spacing-x-small) 0;\n overflow: auto;\n overscroll-behavior: none;\n }\n\n ::slotted(sl-divider) {\n --spacing: var(--sl-spacing-x-small);\n }\n`;\n\nexport {\n menu_styles_default\n};\n","import {\n menu_styles_default\n} from \"./chunk.VVA35HTY.js\";\nimport {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.4TUIT776.js\";\nimport {\n __decorateClass\n} from \"./chunk.KAW7D32O.js\";\n\n// src/components/menu/menu.component.ts\nimport { html } from \"lit\";\nimport { query } from \"lit/decorators.js\";\nvar SlMenu = class extends ShoelaceElement {\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute(\"role\", \"menu\");\n }\n handleClick(event) {\n const menuItemTypes = [\"menuitem\", \"menuitemcheckbox\"];\n const composedPath = event.composedPath();\n const target = composedPath.find((el) => {\n var _a;\n return menuItemTypes.includes(((_a = el == null ? void 0 : el.getAttribute) == null ? void 0 : _a.call(el, \"role\")) || \"\");\n });\n if (!target) return;\n const closestMenu = composedPath.find((el) => {\n var _a;\n return ((_a = el == null ? void 0 : el.getAttribute) == null ? void 0 : _a.call(el, \"role\")) === \"menu\";\n });\n const clickHasSubmenu = closestMenu !== this;\n if (clickHasSubmenu) return;\n const item = target;\n if (item.type === \"checkbox\") {\n item.checked = !item.checked;\n }\n this.emit(\"sl-select\", { detail: { item } });\n }\n handleKeyDown(event) {\n if (event.key === \"Enter\" || event.key === \" \") {\n const item = this.getCurrentItem();\n event.preventDefault();\n event.stopPropagation();\n item == null ? void 0 : item.click();\n } else if ([\"ArrowDown\", \"ArrowUp\", \"Home\", \"End\"].includes(event.key)) {\n const items = this.getAllItems();\n const activeItem = this.getCurrentItem();\n let index = activeItem ? items.indexOf(activeItem) : 0;\n if (items.length > 0) {\n event.preventDefault();\n event.stopPropagation();\n if (event.key === \"ArrowDown\") {\n index++;\n } else if (event.key === \"ArrowUp\") {\n index--;\n } else if (event.key === \"Home\") {\n index = 0;\n } else if (event.key === \"End\") {\n index = items.length - 1;\n }\n if (index < 0) {\n index = items.length - 1;\n }\n if (index > items.length - 1) {\n index = 0;\n }\n this.setCurrentItem(items[index]);\n items[index].focus();\n }\n }\n }\n handleMouseDown(event) {\n const target = event.target;\n if (this.isMenuItem(target)) {\n this.setCurrentItem(target);\n }\n }\n handleSlotChange() {\n const items = this.getAllItems();\n if (items.length > 0) {\n this.setCurrentItem(items[0]);\n }\n }\n isMenuItem(item) {\n var _a;\n return item.tagName.toLowerCase() === \"sl-menu-item\" || [\"menuitem\", \"menuitemcheckbox\", \"menuitemradio\"].includes((_a = item.getAttribute(\"role\")) != null ? _a : \"\");\n }\n /** @internal Gets all slotted menu items, ignoring dividers, headers, and other elements. */\n getAllItems() {\n return [...this.defaultSlot.assignedElements({ flatten: true })].filter((el) => {\n if (el.inert || !this.isMenuItem(el)) {\n return false;\n }\n return true;\n });\n }\n /**\n * @internal Gets the current menu item, which is the menu item that has `tabindex=\"0\"` within the roving tab index.\n * The menu item may or may not have focus, but for keyboard interaction purposes it's considered the \"active\" item.\n */\n getCurrentItem() {\n return this.getAllItems().find((i) => i.getAttribute(\"tabindex\") === \"0\");\n }\n /**\n * @internal Sets the current menu item to the specified element. This sets `tabindex=\"0\"` on the target element and\n * `tabindex=\"-1\"` to all other items. This method must be called prior to setting focus on a menu item.\n */\n setCurrentItem(item) {\n const items = this.getAllItems();\n items.forEach((i) => {\n i.setAttribute(\"tabindex\", i === item ? \"0\" : \"-1\");\n });\n }\n render() {\n return html`\n <slot\n @slotchange=${this.handleSlotChange}\n @click=${this.handleClick}\n @keydown=${this.handleKeyDown}\n @mousedown=${this.handleMouseDown}\n ></slot>\n `;\n }\n};\nSlMenu.styles = [component_styles_default, menu_styles_default];\n__decorateClass([\n query(\"slot\")\n], SlMenu.prototype, \"defaultSlot\", 2);\n\nexport {\n SlMenu\n};\n","import {\n SlMenu\n} from \"./chunk.Q6CVTR7F.js\";\n\n// src/components/menu/menu.ts\nvar menu_default = SlMenu;\nSlMenu.define(\"sl-menu\");\n\nexport {\n menu_default\n};\n","// src/components/menu-item/menu-item.styles.ts\nimport { css } from \"lit\";\nvar menu_item_styles_default = css`\n :host {\n --submenu-offset: -2px;\n\n display: block;\n }\n\n :host([inert]) {\n display: none;\n }\n\n .menu-item {\n position: relative;\n display: flex;\n align-items: stretch;\n font-family: var(--sl-font-sans);\n font-size: var(--sl-font-size-medium);\n font-weight: var(--sl-font-weight-normal);\n line-height: var(--sl-line-height-normal);\n letter-spacing: var(--sl-letter-spacing-normal);\n color: var(--sl-color-neutral-700);\n padding: var(--sl-spacing-2x-small) var(--sl-spacing-2x-small);\n transition: var(--sl-transition-fast) fill;\n user-select: none;\n -webkit-user-select: none;\n white-space: nowrap;\n cursor: pointer;\n }\n\n .menu-item.menu-item--disabled {\n outline: none;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .menu-item.menu-item--loading {\n outline: none;\n cursor: wait;\n }\n\n .menu-item.menu-item--loading *:not(sl-spinner) {\n opacity: 0.5;\n }\n\n .menu-item--loading sl-spinner {\n --indicator-color: currentColor;\n --track-width: 1px;\n position: absolute;\n font-size: 0.75em;\n top: calc(50% - 0.5em);\n left: 0.65rem;\n opacity: 1;\n }\n\n .menu-item .menu-item__label {\n flex: 1 1 auto;\n display: inline-block;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n .menu-item .menu-item__prefix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .menu-item .menu-item__prefix::slotted(*) {\n margin-inline-end: var(--sl-spacing-x-small);\n }\n\n .menu-item .menu-item__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .menu-item .menu-item__suffix::slotted(*) {\n margin-inline-start: var(--sl-spacing-x-small);\n }\n\n /* Safe triangle */\n .menu-item--submenu-expanded::after {\n content: '';\n position: fixed;\n z-index: calc(var(--sl-z-index-dropdown) - 1);\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n clip-path: polygon(\n var(--safe-triangle-cursor-x, 0) var(--safe-triangle-cursor-y, 0),\n var(--safe-triangle-submenu-start-x, 0) var(--safe-triangle-submenu-start-y, 0),\n var(--safe-triangle-submenu-end-x, 0) var(--safe-triangle-submenu-end-y, 0)\n );\n }\n\n :host(:focus-visible) {\n outline: none;\n }\n\n :host(:hover:not([aria-disabled='true'], :focus-visible)) .menu-item,\n .menu-item--submenu-expanded {\n background-color: var(--sl-color-neutral-100);\n color: var(--sl-color-neutral-1000);\n }\n\n :host(:focus-visible) .menu-item {\n outline: none;\n background-color: var(--sl-color-primary-600);\n color: var(--sl-color-neutral-0);\n opacity: 1;\n }\n\n .menu-item .menu-item__check,\n .menu-item .menu-item__chevron {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1.5em;\n visibility: hidden;\n }\n\n .menu-item--checked .menu-item__check,\n .menu-item--has-submenu .menu-item__chevron {\n visibility: visible;\n }\n\n /* Add elevation and z-index to submenus */\n sl-popup::part(popup) {\n box-shadow: var(--sl-shadow-large);\n z-index: var(--sl-z-index-dropdown);\n margin-left: var(--submenu-offset);\n }\n\n .menu-item--rtl sl-popup::part(popup) {\n margin-left: calc(-1 * var(--submenu-offset));\n }\n\n @media (forced-colors: active) {\n :host(:hover:not([aria-disabled='true'])) .menu-item,\n :host(:focus-visible) .menu-item {\n outline: dashed 1px SelectedItem;\n outline-offset: -1px;\n }\n }\n\n ::slotted(sl-menu) {\n max-width: var(--auto-size-available-width) !important;\n max-height: var(--auto-size-available-height) !important;\n }\n`;\n\nexport {\n menu_item_styles_default\n};\n","import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:t}=o,i=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,n={HTML:1,SVG:2,MATHML:3},e=(o,t)=>void 0===t?void 0!==o?._$litType$:o?._$litType$===t,l=o=>null!=o?._$litType$?.h,d=o=>void 0!==o?._$litDirective$,c=o=>o?._$litDirective$,f=o=>void 0===o.strings,r=()=>document.createComment(\"\"),s=(o,i,n)=>{const e=o._$AA.parentNode,l=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=e.insertBefore(r(),l),d=e.insertBefore(r(),l);n=new t(i,d,o,o.options)}else{const t=n._$AB.nextSibling,i=n._$AM,d=i!==o;if(d){let t;n._$AQ?.(o),n._$AM=o,void 0!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t)}if(t!==l||d){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t}}}return n},v=(o,t,i=o)=>(o._$AI(t,i),o),u={},m=(o,t=u)=>o._$AH=t,p=o=>o._$AH,M=o=>{o._$AR(),o._$AA.remove()},h=o=>{o._$AR()};export{n as TemplateResultType,h as clearPart,p as getCommittedValue,c as getDirectiveClass,s as insertPart,l as isCompiledTemplateResult,d as isDirectiveResult,i as isPrimitive,f as isSingleExpression,e as isTemplateResult,M as removePart,v as setChildPartValue,m as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n","import{isSingleExpression as i}from\"./directive-helpers.js\";import{Directive as t,PartType as e}from\"./directive.js\";export{directive}from\"./directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=(i,t)=>{const e=i._$AN;if(void 0===e)return!1;for(const i of e)i._$AO?.(t,!1),s(i,t);return!0},o=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t}while(0===e?.size)},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),c(t)}};function h(i){void 0!==this._$AN?(o(this),this._$AM=i,r(this)):this._$AM=i}function n(i,t=!1,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t)if(Array.isArray(r))for(let i=e;i<r.length;i++)s(r[i],!1),o(r[i]);else null!=r&&(s(r,!1),o(r));else s(this,i)}const c=i=>{i.type==e.CHILD&&(i._$AP??=n,i._$AQ??=h)};class f extends t{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(s(this,i),o(this))}setValue(t){if(i(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}export{f as AsyncDirective,t as Directive,e as PartType};\n//# sourceMappingURL=async-directive.js.map\n","import{nothing as t}from\"../lit-html.js\";import{AsyncDirective as i}from\"../async-directive.js\";import{directive as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=()=>new h;class h{}const o=new WeakMap,n=s(class extends i{render(i){return t}update(i,[s]){const e=s!==this.G;return e&&void 0!==this.G&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=s,this.ht=i.options?.host,this.rt(this.ct=i.element)),t}rt(t){if(this.isConnected||(t=void 0),\"function\"==typeof this.G){const i=this.ht??globalThis;let s=o.get(i);void 0===s&&(s=new WeakMap,o.set(i,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return\"function\"==typeof this.G?o.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});export{e as createRef,n as ref};\n//# sourceMappingURL=ref.js.map\n","// src/components/menu-item/submenu-controller.ts\nimport { createRef, ref } from \"lit/directives/ref.js\";\nimport { html } from \"lit\";\nvar SubmenuController = class {\n constructor(host, hasSlotController) {\n this.popupRef = createRef();\n this.enableSubmenuTimer = -1;\n this.isConnected = false;\n this.isPopupConnected = false;\n this.skidding = 0;\n this.submenuOpenDelay = 100;\n // Set the safe triangle cursor position\n this.handleMouseMove = (event) => {\n this.host.style.setProperty(\"--safe-triangle-cursor-x\", `${event.clientX}px`);\n this.host.style.setProperty(\"--safe-triangle-cursor-y\", `${event.clientY}px`);\n };\n this.handleMouseOver = () => {\n if (this.hasSlotController.test(\"submenu\")) {\n this.enableSubmenu();\n }\n };\n // Focus on the first menu-item of a submenu.\n this.handleKeyDown = (event) => {\n switch (event.key) {\n case \"Escape\":\n case \"Tab\":\n this.disableSubmenu();\n break;\n case \"ArrowLeft\":\n if (event.target !== this.host) {\n event.preventDefault();\n event.stopPropagation();\n this.host.focus();\n this.disableSubmenu();\n }\n break;\n case \"ArrowRight\":\n case \"Enter\":\n case \" \":\n this.handleSubmenuEntry(event);\n break;\n default:\n break;\n }\n };\n this.handleClick = (event) => {\n var _a;\n if (event.target === this.host) {\n event.preventDefault();\n event.stopPropagation();\n } else if (event.target instanceof Element && (event.target.tagName === \"sl-menu-item\" || ((_a = event.target.role) == null ? void 0 : _a.startsWith(\"menuitem\")))) {\n this.disableSubmenu();\n }\n };\n // Close this submenu on focus outside of the parent or any descendants.\n this.handleFocusOut = (event) => {\n if (event.relatedTarget && event.relatedTarget instanceof Element && this.host.contains(event.relatedTarget)) {\n return;\n }\n this.disableSubmenu();\n };\n // Prevent the parent menu-item from getting focus on mouse movement on the submenu\n this.handlePopupMouseover = (event) => {\n event.stopPropagation();\n };\n // Set the safe triangle values for the submenu when the position changes\n this.handlePopupReposition = () => {\n const submenuSlot = this.host.renderRoot.querySelector(\"slot[name='submenu']\");\n const menu = submenuSlot == null ? void 0 : submenuSlot.assignedElements({ flatten: true }).filter((el) => el.localName === \"sl-menu\")[0];\n const isRtl = getComputedStyle(this.host).direction === \"rtl\";\n if (!menu) {\n return;\n }\n const { left, top, width, height } = menu.getBoundingClientRect();\n this.host.style.setProperty(\"--safe-triangle-submenu-start-x\", `${isRtl ? left + width : left}px`);\n this.host.style.setProperty(\"--safe-triangle-submenu-start-y\", `${top}px`);\n this.host.style.setProperty(\"--safe-triangle-submenu-end-x\", `${isRtl ? left + width : left}px`);\n this.host.style.setProperty(\"--safe-triangle-submenu-end-y\", `${top + height}px`);\n };\n (this.host = host).addController(this);\n this.hasSlotController = hasSlotController;\n }\n hostConnected() {\n if (this.hasSlotController.test(\"submenu\") && !this.host.disabled) {\n this.addListeners();\n }\n }\n hostDisconnected() {\n this.removeListeners();\n }\n hostUpdated() {\n if (this.hasSlotController.test(\"submenu\") && !this.host.disabled) {\n this.addListeners();\n this.updateSkidding();\n } else {\n this.removeListeners();\n }\n }\n addListeners() {\n if (!this.isConnected) {\n this.host.addEventListener(\"mousemove\", this.handleMouseMove);\n this.host.addEventListener(\"mouseover\", this.handleMouseOver);\n this.host.addEventListener(\"keydown\", this.handleKeyDown);\n this.host.addEventListener(\"click\", this.handleClick);\n this.host.addEventListener(\"focusout\", this.handleFocusOut);\n this.isConnected = true;\n }\n if (!this.isPopupConnected) {\n if (this.popupRef.value) {\n this.popupRef.value.addEventListener(\"mouseover\", this.handlePopupMouseover);\n this.popupRef.value.addEventListener(\"sl-reposition\", this.handlePopupReposition);\n this.isPopupConnected = true;\n }\n }\n }\n removeListeners() {\n if (this.isConnected) {\n this.host.removeEventListener(\"mousemove\", this.handleMouseMove);\n this.host.removeEventListener(\"mouseover\", this.handleMouseOver);\n this.host.removeEventListener(\"keydown\", this.handleKeyDown);\n this.host.removeEventListener(\"click\", this.handleClick);\n this.host.removeEventListener(\"focusout\", this.handleFocusOut);\n this.isConnected = false;\n }\n if (this.isPopupConnected) {\n if (this.popupRef.value) {\n this.popupRef.value.removeEventListener(\"mouseover\", this.handlePopupMouseover);\n this.popupRef.value.removeEventListener(\"sl-reposition\", this.handlePopupReposition);\n this.isPopupConnected = false;\n }\n }\n }\n handleSubmenuEntry(event) {\n const submenuSlot = this.host.renderRoot.querySelector(\"slot[name='submenu']\");\n if (!submenuSlot) {\n console.error(\"Cannot activate a submenu if no corresponding menuitem can be found.\", this);\n return;\n }\n let menuItems = null;\n for (const elt of submenuSlot.assignedElements()) {\n menuItems = elt.querySelectorAll(\"sl-menu-item, [role^='menuitem']\");\n if (menuItems.length !== 0) {\n break;\n }\n }\n if (!menuItems || menuItems.length === 0) {\n return;\n }\n menuItems[0].setAttribute(\"tabindex\", \"0\");\n for (let i = 1; i !== menuItems.length; ++i) {\n menuItems[i].setAttribute(\"tabindex\", \"-1\");\n }\n if (this.popupRef.value) {\n event.preventDefault();\n event.stopPropagation();\n if (this.popupRef.value.active) {\n if (menuItems[0] instanceof HTMLElement) {\n menuItems[0].focus();\n }\n } else {\n this.enableSubmenu(false);\n this.host.updateComplete.then(() => {\n if (menuItems[0] instanceof HTMLElement) {\n menuItems[0].focus();\n }\n });\n this.host.requestUpdate();\n }\n }\n }\n setSubmenuState(state) {\n if (this.popupRef.value) {\n if (this.popupRef.value.active !== state) {\n this.popupRef.value.active = state;\n this.host.requestUpdate();\n }\n }\n }\n // Shows the submenu. Supports disabling the opening delay, e.g. for keyboard events that want to set the focus to the\n // newly opened menu.\n enableSubmenu(delay = true) {\n if (delay) {\n window.clearTimeout(this.enableSubmenuTimer);\n this.enableSubmenuTimer = window.setTimeout(() => {\n this.setSubmenuState(true);\n }, this.submenuOpenDelay);\n } else {\n this.setSubmenuState(true);\n }\n }\n disableSubmenu() {\n window.clearTimeout(this.enableSubmenuTimer);\n this.setSubmenuState(false);\n }\n // Calculate the space the top of a menu takes-up, for aligning the popup menu-item with the activating element.\n updateSkidding() {\n var _a;\n if (!((_a = this.host.parentElement) == null ? void 0 : _a.computedStyleMap)) {\n return;\n }\n const styleMap = this.host.parentElement.computedStyleMap();\n const attrs = [\"padding-top\", \"border-top-width\", \"margin-top\"];\n const skidding = attrs.reduce((accumulator, attr) => {\n var _a2;\n const styleValue = (_a2 = styleMap.get(attr)) != null ? _a2 : new CSSUnitValue(0, \"px\");\n const unitValue = styleValue instanceof CSSUnitValue ? styleValue : new CSSUnitValue(0, \"px\");\n const pxValue = unitValue.to(\"px\");\n return accumulator - pxValue.value;\n }, 0);\n this.skidding = skidding;\n }\n isExpanded() {\n return this.popupRef.value ? this.popupRef.value.active : false;\n }\n renderSubmenu() {\n const isRtl = getComputedStyle(this.host).direction === \"rtl\";\n if (!this.isConnected) {\n return html` <slot name=\"submenu\" hidden></slot> `;\n }\n return html`\n <sl-popup\n ${ref(this.popupRef)}\n placement=${isRtl ? \"left-start\" : \"right-start\"}\n anchor=\"anchor\"\n flip\n flip-fallback-strategy=\"best-fit\"\n skidding=\"${this.skidding}\"\n strategy=\"fixed\"\n auto-size=\"vertical\"\n auto-size-padding=\"10\"\n >\n <slot name=\"submenu\"></slot>\n </sl-popup>\n `;\n }\n};\n\nexport {\n SubmenuController\n};\n","// src/components/spinner/spinner.styles.ts\nimport { css } from \"lit\";\nvar spinner_styles_default = css`\n :host {\n --track-width: 2px;\n --track-color: rgb(128 128 128 / 25%);\n --indicator-color: var(--sl-color-primary-600);\n --speed: 2s;\n\n display: inline-flex;\n width: 1em;\n height: 1em;\n flex: none;\n }\n\n .spinner {\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n }\n\n .spinner__track,\n .spinner__indicator {\n fill: none;\n stroke-width: var(--track-width);\n r: calc(0.5em - var(--track-width) / 2);\n cx: 0.5em;\n cy: 0.5em;\n transform-origin: 50% 50%;\n }\n\n .spinner__track {\n stroke: var(--track-color);\n transform-origin: 0% 0%;\n }\n\n .spinner__indicator {\n stroke: var(--indicator-color);\n stroke-linecap: round;\n stroke-dasharray: 150% 75%;\n animation: spin var(--speed) linear infinite;\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n stroke-dasharray: 0.05em, 3em;\n }\n\n 50% {\n transform: rotate(450deg);\n stroke-dasharray: 1.375em, 1.375em;\n }\n\n 100% {\n transform: rotate(1080deg);\n stroke-dasharray: 0.05em, 3em;\n }\n }\n`;\n\nexport {\n spinner_styles_default\n};\n","import {\n spinner_styles_default\n} from \"./chunk.7DUCI5S4.js\";\nimport {\n LocalizeController\n} from \"./chunk.6CTB5ZDJ.js\";\nimport {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.4TUIT776.js\";\n\n// src/components/spinner/spinner.component.ts\nimport { html } from \"lit\";\nvar SlSpinner = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.localize = new LocalizeController(this);\n }\n render() {\n return html`\n <svg part=\"base\" class=\"spinner\" role=\"progressbar\" aria-label=${this.localize.term(\"loading\")}>\n <circle class=\"spinner__track\"></circle>\n <circle class=\"spinner__indicator\"></circle>\n </svg>\n `;\n }\n};\nSlSpinner.styles = [component_styles_default, spinner_styles_default];\n\nexport {\n SlSpinner\n};\n","// src/internal/slot.ts\nvar HasSlotController = class {\n constructor(host, ...slotNames) {\n this.slotNames = [];\n this.handleSlotChange = (event) => {\n const slot = event.target;\n if (this.slotNames.includes(\"[default]\") && !slot.name || slot.name && this.slotNames.includes(slot.name)) {\n this.host.requestUpdate();\n }\n };\n (this.host = host).addController(this);\n this.slotNames = slotNames;\n }\n hasDefaultSlot() {\n return [...this.host.childNodes].some((node) => {\n if (node.nodeType === node.TEXT_NODE && node.textContent.trim() !== \"\") {\n return true;\n }\n if (node.nodeType === node.ELEMENT_NODE) {\n const el = node;\n const tagName = el.tagName.toLowerCase();\n if (tagName === \"sl-visually-hidden\") {\n return false;\n }\n if (!el.hasAttribute(\"slot\")) {\n return true;\n }\n }\n return false;\n });\n }\n hasNamedSlot(name) {\n return this.host.querySelector(`:scope > [slot=\"${name}\"]`) !== null;\n }\n test(slotName) {\n return slotName === \"[default]\" ? this.hasDefaultSlot() : this.hasNamedSlot(slotName);\n }\n hostConnected() {\n this.host.shadowRoot.addEventListener(\"slotchange\", this.handleSlotChange);\n }\n hostDisconnected() {\n this.host.shadowRoot.removeEventListener(\"slotchange\", this.handleSlotChange);\n }\n};\nfunction getTextContent(slot) {\n if (!slot) {\n return \"\";\n }\n const nodes = slot.assignedNodes({ flatten: true });\n let text = \"\";\n [...nodes].forEach((node) => {\n if (node.nodeType === Node.TEXT_NODE) {\n text += node.textContent;\n }\n });\n return text;\n}\n\nexport {\n HasSlotController,\n getTextContent\n};\n","import {\n getBasePath\n} from \"./chunk.3Y6SB6QS.js\";\n\n// src/components/icon/library.default.ts\nvar library = {\n name: \"default\",\n resolver: (name) => getBasePath(`assets/icons/${name}.svg`)\n};\nvar library_default_default = library;\n\nexport {\n library_default_default\n};\n","// src/components/icon/library.system.ts\nvar icons = {\n caret: `\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"6 9 12 15 18 9\"></polyline>\n </svg>\n `,\n check: `\n <svg part=\"checked-icon\" class=\"checkbox__icon\" viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\">\n <g transform=\"translate(3.428571, 3.428571)\">\n <path d=\"M0,5.71428571 L3.42857143,9.14285714\"></path>\n <path d=\"M9.14285714,0 L3.42857143,9.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n `,\n \"chevron-down\": `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-chevron-down\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z\"/>\n </svg>\n `,\n \"chevron-left\": `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-chevron-left\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z\"/>\n </svg>\n `,\n \"chevron-right\": `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-chevron-right\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\"/>\n </svg>\n `,\n copy: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-copy\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2Zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H6ZM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1H2Z\"/>\n </svg>\n `,\n eye: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-eye\" viewBox=\"0 0 16 16\">\n <path d=\"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z\"/>\n <path d=\"M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z\"/>\n </svg>\n `,\n \"eye-slash\": `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-eye-slash\" viewBox=\"0 0 16 16\">\n <path d=\"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z\"/>\n <path d=\"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z\"/>\n <path d=\"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z\"/>\n </svg>\n `,\n eyedropper: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-eyedropper\" viewBox=\"0 0 16 16\">\n <path d=\"M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z\"></path>\n </svg>\n `,\n \"grip-vertical\": `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-grip-vertical\" viewBox=\"0 0 16 16\">\n <path d=\"M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z\"></path>\n </svg>\n `,\n indeterminate: `\n <svg part=\"indeterminate-icon\" class=\"checkbox__icon\" viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(2.285714, 6.857143)\">\n <path d=\"M10.2857143,1.14285714 L1.14285714,1.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n `,\n \"person-fill\": `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-person-fill\" viewBox=\"0 0 16 16\">\n <path d=\"M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z\"/>\n </svg>\n `,\n \"play-fill\": `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-play-fill\" viewBox=\"0 0 16 16\">\n <path d=\"m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z\"></path>\n </svg>\n `,\n \"pause-fill\": `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-pause-fill\" viewBox=\"0 0 16 16\">\n <path d=\"M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z\"></path>\n </svg>\n `,\n radio: `\n <svg part=\"checked-icon\" class=\"radio__icon\" viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"currentColor\">\n <circle cx=\"8\" cy=\"8\" r=\"3.42857143\"></circle>\n </g>\n </g>\n </svg>\n `,\n \"star-fill\": `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-star-fill\" viewBox=\"0 0 16 16\">\n <path d=\"M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z\"/>\n </svg>\n `,\n \"x-lg\": `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-x-lg\" viewBox=\"0 0 16 16\">\n <path d=\"M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z\"/>\n </svg>\n `,\n \"x-circle-fill\": `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-x-circle-fill\" viewBox=\"0 0 16 16\">\n <path d=\"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z\"></path>\n </svg>\n `\n};\nvar systemLibrary = {\n name: \"system\",\n resolver: (name) => {\n if (name in icons) {\n return `data:image/svg+xml,${encodeURIComponent(icons[name])}`;\n }\n return \"\";\n }\n};\nvar library_system_default = systemLibrary;\n\nexport {\n library_system_default\n};\n","import {\n library_default_default\n} from \"./chunk.P7ZG6EMR.js\";\nimport {\n library_system_default\n} from \"./chunk.3TFKS637.js\";\n\n// src/components/icon/library.ts\nvar registry = [library_default_default, library_system_default];\nvar watchedIcons = [];\nfunction watchIcon(icon) {\n watchedIcons.push(icon);\n}\nfunction unwatchIcon(icon) {\n watchedIcons = watchedIcons.filter((el) => el !== icon);\n}\nfunction getIconLibrary(name) {\n return registry.find((lib) => lib.name === name);\n}\nfunction registerIconLibrary(name, options) {\n unregisterIconLibrary(name);\n registry.push({\n name,\n resolver: options.resolver,\n mutator: options.mutator,\n spriteSheet: options.spriteSheet\n });\n watchedIcons.forEach((icon) => {\n if (icon.library === name) {\n icon.setIcon();\n }\n });\n}\nfunction unregisterIconLibrary(name) {\n registry = registry.filter((lib) => lib.name !== name);\n}\n\nexport {\n watchIcon,\n unwatchIcon,\n getIconLibrary,\n registerIconLibrary,\n unregisterIconLibrary\n};\n","// src/components/icon/icon.styles.ts\nimport { css } from \"lit\";\nvar icon_styles_default = css`\n :host {\n display: inline-block;\n width: 1em;\n height: 1em;\n box-sizing: content-box !important;\n }\n\n svg {\n display: block;\n height: 100%;\n width: 100%;\n }\n`;\n\nexport {\n icon_styles_default\n};\n","import {\n getIconLibrary,\n unwatchIcon,\n watchIcon\n} from \"./chunk.ZL53POKZ.js\";\nimport {\n icon_styles_default\n} from \"./chunk.QLXRCYS4.js\";\nimport {\n watch\n} from \"./chunk.GMYPQTFK.js\";\nimport {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.4TUIT776.js\";\nimport {\n __decorateClass\n} from \"./chunk.KAW7D32O.js\";\n\n// src/components/icon/icon.component.ts\nimport { html } from \"lit\";\nimport { isTemplateResult } from \"lit/directive-helpers.js\";\nimport { property, state } from \"lit/decorators.js\";\nvar CACHEABLE_ERROR = Symbol();\nvar RETRYABLE_ERROR = Symbol();\nvar parser;\nvar iconCache = /* @__PURE__ */ new Map();\nvar SlIcon = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.initialRender = false;\n this.svg = null;\n this.label = \"\";\n this.library = \"default\";\n }\n /** Given a URL, this function returns the resulting SVG element or an appropriate error symbol. */\n async resolveIcon(url, library) {\n var _a;\n let fileData;\n if (library == null ? void 0 : library.spriteSheet) {\n this.svg = html`<svg part=\"svg\">\n <use part=\"use\" href=\"${url}\"></use>\n </svg>`;\n return this.svg;\n }\n try {\n fileData = await fetch(url, { mode: \"cors\" });\n if (!fileData.ok) return fileData.status === 410 ? CACHEABLE_ERROR : RETRYABLE_ERROR;\n } catch (e) {\n return RETRYABLE_ERROR;\n }\n try {\n const div = document.createElement(\"div\");\n div.innerHTML = await fileData.text();\n const svg = div.firstElementChild;\n if (((_a = svg == null ? void 0 : svg.tagName) == null ? void 0 : _a.toLowerCase()) !== \"svg\") return CACHEABLE_ERROR;\n if (!parser) parser = new DOMParser();\n const doc = parser.parseFromString(svg.outerHTML, \"text/html\");\n const svgEl = doc.body.querySelector(\"svg\");\n if (!svgEl) return CACHEABLE_ERROR;\n svgEl.part.add(\"svg\");\n return document.adoptNode(svgEl);\n } catch (e) {\n return CACHEABLE_ERROR;\n }\n }\n connectedCallback() {\n super.connectedCallback();\n watchIcon(this);\n }\n firstUpdated() {\n this.initialRender = true;\n this.setIcon();\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n unwatchIcon(this);\n }\n getIconSource() {\n const library = getIconLibrary(this.library);\n if (this.name && library) {\n return {\n url: library.resolver(this.name),\n fromLibrary: true\n };\n }\n return {\n url: this.src,\n fromLibrary: false\n };\n }\n handleLabelChange() {\n const hasLabel = typeof this.label === \"string\" && this.label.length > 0;\n if (hasLabel) {\n this.setAttribute(\"role\", \"img\");\n this.setAttribute(\"aria-label\", this.label);\n this.removeAttribute(\"aria-hidden\");\n } else {\n this.removeAttribute(\"role\");\n this.removeAttribute(\"aria-label\");\n this.setAttribute(\"aria-hidden\", \"true\");\n }\n }\n async setIcon() {\n var _a;\n const { url, fromLibrary } = this.getIconSource();\n const library = fromLibrary ? getIconLibrary(this.library) : void 0;\n if (!url) {\n this.svg = null;\n return;\n }\n let iconResolver = iconCache.get(url);\n if (!iconResolver) {\n iconResolver = this.resolveIcon(url, library);\n iconCache.set(url, iconResolver);\n }\n if (!this.initialRender) {\n return;\n }\n const svg = await iconResolver;\n if (svg === RETRYABLE_ERROR) {\n iconCache.delete(url);\n }\n if (url !== this.getIconSource().url) {\n return;\n }\n if (isTemplateResult(svg)) {\n this.svg = svg;\n if (library) {\n await this.updateComplete;\n const shadowSVG = this.shadowRoot.querySelector(\"[part='svg']\");\n if (typeof library.mutator === \"function\" && shadowSVG) {\n library.mutator(shadowSVG);\n }\n }\n return;\n }\n switch (svg) {\n case RETRYABLE_ERROR:\n case CACHEABLE_ERROR:\n this.svg = null;\n this.emit(\"sl-error\");\n break;\n default:\n this.svg = svg.cloneNode(true);\n (_a = library == null ? void 0 : library.mutator) == null ? void 0 : _a.call(library, this.svg);\n this.emit(\"sl-load\");\n }\n }\n render() {\n return this.svg;\n }\n};\nSlIcon.styles = [component_styles_default, icon_styles_default];\n__decorateClass([\n state()\n], SlIcon.prototype, \"svg\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlIcon.prototype, \"name\", 2);\n__decorateClass([\n property()\n], SlIcon.prototype, \"src\", 2);\n__decorateClass([\n property()\n], SlIcon.prototype, \"label\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlIcon.prototype, \"library\", 2);\n__decorateClass([\n watch(\"label\")\n], SlIcon.prototype, \"handleLabelChange\", 1);\n__decorateClass([\n watch([\"name\", \"src\", \"library\"])\n], SlIcon.prototype, \"setIcon\", 1);\n\nexport {\n SlIcon\n};\n","import {\n menu_item_styles_default\n} from \"./chunk.KZJNDGFO.js\";\nimport {\n SubmenuController\n} from \"./chunk.ZLIGP6HZ.js\";\nimport {\n SlPopup\n} from \"./chunk.5JY5FUCG.js\";\nimport {\n SlSpinner\n} from \"./chunk.36O46B5H.js\";\nimport {\n HasSlotController,\n getTextContent\n} from \"./chunk.NYIIDP5N.js\";\nimport {\n LocalizeController\n} from \"./chunk.6CTB5ZDJ.js\";\nimport {\n SlIcon\n} from \"./chunk.YHLNUJ7P.js\";\nimport {\n watch\n} from \"./chunk.GMYPQTFK.js\";\nimport {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.4TUIT776.js\";\nimport {\n __decorateClass\n} from \"./chunk.KAW7D32O.js\";\n\n// src/components/menu-item/menu-item.component.ts\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { html } from \"lit\";\nimport { property, query } from \"lit/decorators.js\";\nvar SlMenuItem = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.localize = new LocalizeController(this);\n this.type = \"normal\";\n this.checked = false;\n this.value = \"\";\n this.loading = false;\n this.disabled = false;\n this.hasSlotController = new HasSlotController(this, \"submenu\");\n this.submenuController = new SubmenuController(this, this.hasSlotController);\n this.handleHostClick = (event) => {\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n this.handleMouseOver = (event) => {\n this.focus();\n event.stopPropagation();\n };\n }\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"click\", this.handleHostClick);\n this.addEventListener(\"mouseover\", this.handleMouseOver);\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"click\", this.handleHostClick);\n this.removeEventListener(\"mouseover\", this.handleMouseOver);\n }\n handleDefaultSlotChange() {\n const textLabel = this.getTextLabel();\n if (typeof this.cachedTextLabel === \"undefined\") {\n this.cachedTextLabel = textLabel;\n return;\n }\n if (textLabel !== this.cachedTextLabel) {\n this.cachedTextLabel = textLabel;\n this.emit(\"slotchange\", { bubbles: true, composed: false, cancelable: false });\n }\n }\n handleCheckedChange() {\n if (this.checked && this.type !== \"checkbox\") {\n this.checked = false;\n console.error('The checked attribute can only be used on menu items with type=\"checkbox\"', this);\n return;\n }\n if (this.type === \"checkbox\") {\n this.setAttribute(\"aria-checked\", this.checked ? \"true\" : \"false\");\n } else {\n this.removeAttribute(\"aria-checked\");\n }\n }\n handleDisabledChange() {\n this.setAttribute(\"aria-disabled\", this.disabled ? \"true\" : \"false\");\n }\n handleTypeChange() {\n if (this.type === \"checkbox\") {\n this.setAttribute(\"role\", \"menuitemcheckbox\");\n this.setAttribute(\"aria-checked\", this.checked ? \"true\" : \"false\");\n } else {\n this.setAttribute(\"role\", \"menuitem\");\n this.removeAttribute(\"aria-checked\");\n }\n }\n /** Returns a text label based on the contents of the menu item's default slot. */\n getTextLabel() {\n return getTextContent(this.defaultSlot);\n }\n isSubmenu() {\n return this.hasSlotController.test(\"submenu\");\n }\n render() {\n const isRtl = this.localize.dir() === \"rtl\";\n const isSubmenuExpanded = this.submenuController.isExpanded();\n return html`\n <div\n id=\"anchor\"\n part=\"base\"\n class=${classMap({\n \"menu-item\": true,\n \"menu-item--rtl\": isRtl,\n \"menu-item--checked\": this.checked,\n \"menu-item--disabled\": this.disabled,\n \"menu-item--loading\": this.loading,\n \"menu-item--has-submenu\": this.isSubmenu(),\n \"menu-item--submenu-expanded\": isSubmenuExpanded\n })}\n ?aria-haspopup=\"${this.isSubmenu()}\"\n ?aria-expanded=\"${isSubmenuExpanded ? true : false}\"\n >\n <span part=\"checked-icon\" class=\"menu-item__check\">\n <sl-icon name=\"check\" library=\"system\" aria-hidden=\"true\"></sl-icon>\n </span>\n\n <slot name=\"prefix\" part=\"prefix\" class=\"menu-item__prefix\"></slot>\n\n <slot part=\"label\" class=\"menu-item__label\" @slotchange=${this.handleDefaultSlotChange}></slot>\n\n <slot name=\"suffix\" part=\"suffix\" class=\"menu-item__suffix\"></slot>\n\n <span part=\"submenu-icon\" class=\"menu-item__chevron\">\n <sl-icon name=${isRtl ? \"chevron-left\" : \"chevron-right\"} library=\"system\" aria-hidden=\"true\"></sl-icon>\n </span>\n\n ${this.submenuController.renderSubmenu()}\n ${this.loading ? html` <sl-spinner part=\"spinner\" exportparts=\"base:spinner__base\"></sl-spinner> ` : \"\"}\n </div>\n `;\n }\n};\nSlMenuItem.styles = [component_styles_default, menu_item_styles_default];\nSlMenuItem.dependencies = {\n \"sl-icon\": SlIcon,\n \"sl-popup\": SlPopup,\n \"sl-spinner\": SlSpinner\n};\n__decorateClass([\n query(\"slot:not([name])\")\n], SlMenuItem.prototype, \"defaultSlot\", 2);\n__decorateClass([\n query(\".menu-item\")\n], SlMenuItem.prototype, \"menuItem\", 2);\n__decorateClass([\n property()\n], SlMenuItem.prototype, \"type\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlMenuItem.prototype, \"checked\", 2);\n__decorateClass([\n property()\n], SlMenuItem.prototype, \"value\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlMenuItem.prototype, \"loading\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlMenuItem.prototype, \"disabled\", 2);\n__decorateClass([\n watch(\"checked\")\n], SlMenuItem.prototype, \"handleCheckedChange\", 1);\n__decorateClass([\n watch(\"disabled\")\n], SlMenuItem.prototype, \"handleDisabledChange\", 1);\n__decorateClass([\n watch(\"type\")\n], SlMenuItem.prototype, \"handleTypeChange\", 1);\n\nexport {\n SlMenuItem\n};\n","import {\n SlMenuItem\n} from \"./chunk.WGYPSPL3.js\";\n\n// src/components/menu-item/menu-item.ts\nvar menu_item_default = SlMenuItem;\nSlMenuItem.define(\"sl-menu-item\");\n\nexport {\n menu_item_default\n};\n","button.main {\n display: flex;\n transition:\n width 200ms,\n background-color 500ms,\n color 500ms,\n border-color 500ms;\n max-width: var(--size-40);\n flex-direction: row;\n overflow: hidden;\n height: var(--pos-navigation-bar-height);\n width: var(--pos-navigation-bar-height);\n align-items: center;\n justify-content: center;\n border-radius: var(--radius-md);\n color: var(--pos-subtle-text-color);\n border: var(--size-px) dashed var(--pos-subtle-text-color);\n background-color: var(--pos-background-color);\n\n p {\n padding: 0;\n margin: 0;\n display: none;\n white-space: nowrap;\n }\n\n &.success {\n color: var(--color-green-700);\n border-color: var(--color-green-700);\n border-style: solid;\n background-color: var(--color-green-100);\n }\n\n &:active {\n transform: scale(0.99);\n filter: brightness(90%);\n }\n &:focus {\n outline: var(--pos-input-focus-outline);\n }\n}\n\nsvg {\n display: inline-block;\n height: var(--size-6);\n flex-shrink: 0;\n flex-grow: 0;\n width: var(--size-6);\n}\n\nbutton.main:hover,\nsl-dropdown[open] button {\n &.success {\n background: var(--color-green-200);\n color: var(--color-green-700);\n }\n width: var(--size-full);\n height: var(--pos-navigation-bar-height);\n background: var(--pos-background-color);\n color: var(--pos-normal-text-color);\n\n p {\n display: inline-block;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\nimport { LabelIndex, PodOS, Thing, WebIdProfile } from '@pod-os/core';\nimport { PodOsAware, PodOsEventEmitter, subscribePodOs } from '../events/PodOsAware';\nimport session from '../../store/session';\n\nimport './shoelace';\n\n@Component({\n tag: 'pos-make-findable',\n styleUrl: 'pos-make-findable.css',\n shadow: true,\n})\nexport class PosMakeFindable implements PodOsAware {\n @Prop() uri!: string;\n\n @State() os: PodOS;\n @State() thing: Thing;\n @State() indexes: LabelIndex[] = [];\n\n @Event({ eventName: 'pod-os:init' }) subscribePodOs: PodOsEventEmitter;\n\n @State() unsubscribeSessionChange: undefined | (() => void);\n\n @State() showOptions = false;\n @State() isIndexed = false;\n\n @Event({ eventName: 'pod-os:error' }) errorEmitter: EventEmitter;\n @Event({ eventName: 'pod-os:search:index-updated' }) indexUpdatedEmitter: EventEmitter;\n @Event({ eventName: 'pod-os:search:index-created' }) indexCreatedEmitter: EventEmitter;\n\n @Element() el: HTMLElement;\n\n componentWillLoad() {\n subscribePodOs(this);\n }\n\n disconnectedCallback() {\n this.unsubscribeSessionChange && this.unsubscribeSessionChange();\n }\n\n @Watch('uri')\n updateUri(uri: string) {\n this.thing = this.os.store.get(uri);\n this.isIndexed = this.checkIfIndexed(uri);\n }\n\n private checkIfIndexed(uri: string) {\n return this.indexes.some(it => it.contains(uri));\n }\n\n receivePodOs = async (os: PodOS) => {\n this.os = os;\n this.thing = this.os.store.get(this.uri);\n this.getLabelIndexes(session.state.profile);\n this.unsubscribeSessionChange = session.onChange('profile', profile => {\n this.getLabelIndexes(profile);\n });\n };\n\n private getLabelIndexes(profile: WebIdProfile) {\n if (profile) {\n this.indexes = profile.getPrivateLabelIndexes().map(it => this.os.store.get(it).assume(LabelIndex));\n this.showOptions = this.indexes.length > 1;\n this.isIndexed = this.checkIfIndexed(this.uri);\n }\n }\n\n private async onClick(e: MouseEvent) {\n e.preventDefault();\n if (this.indexes.length === 1) {\n const index = this.indexes[0];\n await this.addToLabelIndex(index);\n this.indexUpdatedEmitter.emit(index);\n } else if (this.indexes.length === 0) {\n const index = await this.createDefaultLabelIndex();\n await this.addToLabelIndex(index);\n this.indexCreatedEmitter.emit(index);\n }\n }\n\n private async addToLabelIndex(index: LabelIndex) {\n try {\n await this.os.addToLabelIndex(this.thing, index);\n this.isIndexed = true;\n } catch (e) {\n this.errorEmitter.emit(e);\n }\n }\n\n private async createDefaultLabelIndex(): Promise<LabelIndex> {\n try {\n return await this.os.createDefaultLabelIndex(session.state.profile);\n } catch (e) {\n this.errorEmitter.emit(e);\n }\n }\n\n render() {\n if (!session.state.isLoggedIn || !this.uri) {\n return null;\n }\n\n const label = 'Make this findable';\n const button = (\n <button\n type=\"button\"\n slot=\"trigger\"\n aria-label={label}\n class={{ main: true, success: this.isIndexed }}\n onClick={e => this.onClick(e)}\n title=\"\"\n >\n {this.isIndexed ? <IconSuccess /> : <IconMakeFindable />}\n <p>{label}</p>\n </button>\n );\n if (this.showOptions) {\n return (\n <Host>\n <sl-dropdown>\n {button}\n <sl-menu role=\"listbox\">\n {this.indexes.map((index: LabelIndex) => (\n <sl-menu-item role=\"option\" value={index} type=\"checkbox\" checked={index.contains(this.uri)}>\n <pos-resource uri={index.uri} lazy={true}>\n <pos-label></pos-label>\n </pos-resource>\n </sl-menu-item>\n ))}\n </sl-menu>\n </sl-dropdown>\n </Host>\n );\n } else {\n return button;\n }\n }\n\n @Listen('sl-select')\n async onSelect(e: CustomEvent<{ item: { value: LabelIndex } }>) {\n const index = e.detail.item.value;\n e.preventDefault();\n await this.addToLabelIndex(index);\n this.indexUpdatedEmitter.emit(index);\n }\n}\n\nconst IconMakeFindable = () => (\n <svg\n role=\"presentation\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z\"\n />\n </svg>\n);\n\nconst IconSuccess = () => (\n <svg\n role=\"presentation\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12\"\n />\n </svg>\n);\n",":host {\n --pos-navigation-bar-height: var(--size-10);\n}\n\nsearch {\n position: relative;\n}\n\n.suggestions ol {\n border: 1px solid var(--pos-border-color);\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n\n.suggestions {\n width: 100%;\n overflow-y: auto;\n max-height: 90dvh;\n li {\n padding: 1rem;\n background-color: var(--pos-background-color);\n pos-rich-link {\n --background-color: inherit;\n }\n &[aria-selected='true'] {\n background-color: var(--pos-primary-color);\n &:hover {\n background-color: var(--pos-primary-color);\n }\n }\n &:hover {\n background-color: var(--pos-border-color);\n }\n }\n}\n\n.suggestions li.selected pos-rich-link {\n --label-color: white;\n --description-color: var(--pos-border-color);\n --uri-color: var(--pos-subtle-text-color);\n}\n\ndialog {\n position: absolute;\n margin-top: calc(-1 * var(--pos-navigation-bar-height));\n padding: 0;\n width: 100%;\n max-width: 100%;\n min-width: 100%;\n overflow: hidden;\n max-height: 100dvh;\n background-color: var(--pos-background-color);\n color: var(--pos-normal-text-color);\n border: var(--pos-border-color);\n border-radius: var(--radius-md);\n box-shadow: var(--shadow-md);\n form {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n align-items: center;\n input {\n display: flex;\n font-size: var(--scale-1);\n height: var(--pos-navigation-bar-height);\n border-top-left-radius: var(--radius-md);\n border-top-right-radius: var(--radius-md);\n padding-left: var(--size-2);\n width: 100%;\n border: none;\n outline: none;\n color: var(--pos-normal-text-color);\n background-color: var(--pos-input-background-color);\n box-sizing: border-box;\n }\n }\n}\n\ndialog[open] {\n display: flex;\n z-index: var(--layer-top);\n animation: slideIn 100ms ease-out;\n}\n\n@media (max-width: 640px) {\n search {\n position: unset;\n }\n dialog {\n margin-top: var(--size-1);\n top: 0;\n width: 95dvw;\n max-width: unset;\n min-width: unset;\n form {\n input {\n height: var(--size-12);\n font-size: var(--scale-fluid-3);\n }\n }\n }\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n","import { PodOS, SearchIndex, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, Listen, Prop, State, Watch } from '@stencil/core';\nimport { debounceTime, Subject } from 'rxjs';\n\nimport session from '../../store/session';\nimport { PodOsAware, PodOsEventEmitter, subscribePodOs } from '../events/PodOsAware';\n\ninterface NavigateEvent {\n detail: Thing | null;\n}\n\n@Component({\n tag: 'pos-navigation',\n shadow: true,\n styleUrl: 'pos-navigation.css',\n})\nexport class PosNavigation implements PodOsAware {\n @State() private os: PodOS;\n private dialogRef?: HTMLDialogElement;\n\n private inputRef?: HTMLInputElement;\n\n @Event({ eventName: 'pod-os:init' }) subscribePodOs: PodOsEventEmitter;\n\n /**\n * Initial value of the navigation bar\n */\n @Prop() uri: string = '';\n\n /**\n * Current value of the input field\n */\n @State() private inputValue: string = this.uri;\n\n @Event({ eventName: 'pod-os:link' }) linkEmitter: EventEmitter;\n\n @State() searchIndex?: SearchIndex = undefined;\n\n @State() private suggestions = [];\n\n @State() private selectedIndex = -1;\n\n @State() private resource: Thing = null;\n\n private readonly changeEvents = new Subject<void>();\n private debouncedSearch = null;\n\n @Watch('uri')\n @Watch('os')\n updateResource(): void {\n try {\n this.resource = this.uri ? this.os?.store.get(this.uri) : null;\n } catch {\n this.resource = null;\n }\n }\n\n componentWillLoad() {\n subscribePodOs(this);\n this.updateResource();\n session.onChange('isLoggedIn', async isLoggedIn => {\n if (isLoggedIn) {\n await this.buildSearchIndex();\n } else {\n this.clearSearchIndex();\n }\n });\n this.debouncedSearch = this.changeEvents.pipe(debounceTime(300)).subscribe(() => this.search());\n }\n\n disconnectedCallback() {\n this.debouncedSearch?.unsubscribe();\n }\n\n @Listen('pod-os:search:index-created')\n private async buildSearchIndex() {\n this.searchIndex = await this.os.buildSearchIndex(session.state.profile);\n }\n\n @Listen('pod-os:search:index-updated')\n rebuildSearchIndex() {\n this.searchIndex.rebuild();\n }\n\n @Listen('pod-os:navigate')\n openNavigationDialog(e: NavigateEvent) {\n this.resource = e.detail;\n if (e.detail) {\n this.inputValue = e.detail.uri;\n this.search();\n }\n this.inputRef?.select();\n this.dialogRef?.show();\n }\n\n private clearSearchIndex() {\n this.searchIndex?.clear();\n }\n\n receivePodOs = async (os: PodOS) => {\n this.os = os;\n };\n\n private onChange(event) {\n this.inputValue = event.target.value;\n this.changeEvents.next();\n }\n\n @Listen('click', { target: 'document' })\n closeDialog() {\n this.dialogRef?.close();\n this.selectedIndex = -1;\n }\n\n @Listen('pod-os:link')\n clearSuggestions() {\n this.suggestions = [];\n this.dialogRef?.close();\n this.selectedIndex = -1;\n }\n\n @Listen('click')\n onClickSelf(event) {\n event.stopPropagation();\n }\n\n @Listen('keydown')\n handleKeyDown(ev: KeyboardEvent) {\n if (ev.key === 'Escape') {\n this.closeDialog();\n } else if (ev.key === 'ArrowDown') {\n ev.preventDefault();\n this.selectedIndex = Math.min(this.selectedIndex + 1, this.suggestions.length - 1);\n } else if (ev.key === 'ArrowUp') {\n ev.preventDefault();\n this.selectedIndex = Math.max(this.selectedIndex - 1, 0);\n }\n }\n\n private search() {\n if (this.searchIndex) {\n this.suggestions = this.inputValue ? this.searchIndex.search(this.inputValue) : [];\n }\n }\n\n private onSubmit() {\n if (this.suggestions && this.selectedIndex > -1) {\n this.linkEmitter.emit(this.suggestions[this.selectedIndex].ref);\n } else {\n this.linkEmitter.emit(this.inputValue);\n }\n }\n\n render() {\n return (\n <nav>\n <search>\n <pos-navigation-bar\n searchIndexReady={this.searchIndex !== undefined}\n current={this.resource}\n ></pos-navigation-bar>\n <dialog ref={el => (this.dialogRef = el)}>\n <form method=\"dialog\" onSubmit={() => this.onSubmit()}>\n <input\n ref={el => (this.inputRef = el)}\n enterkeyhint=\"search\"\n aria-label=\"Search or enter URI\"\n placeholder=\"Search or enter URI\"\n value={this.uri}\n onChange={e => this.onChange(e)}\n onInput={e => this.onChange(e)}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded={this.suggestions.length > 0}\n aria-controls=\"suggestions-list\"\n aria-activedescendant={this.selectedIndex >= 0 ? `option-${this.selectedIndex}` : null}\n />\n {this.suggestions.length > 0 ? (\n <div class=\"suggestions\">\n <ol id=\"suggestions-list\" role=\"listbox\" aria-label=\"Search results\">\n {this.suggestions.map((it, index) => (\n <li\n id={`option-${index}`}\n role=\"option\"\n aria-selected={index === this.selectedIndex ? 'true' : 'false'}\n >\n <pos-rich-link uri={it.ref}></pos-rich-link>\n </li>\n ))}\n </ol>\n </div>\n ) : null}\n </form>\n </dialog>\n </search>\n </nav>\n );\n }\n}\n","section.current {\n display: flex;\n height: var(--pos-navigation-bar-height);\n flex-grow: 1;\n gap: 0;\n background-color: var(--pos-input-background-color);\n border-radius: var(--radius-md);\n width: 100%;\n &:focus-within {\n outline: var(--pos-input-focus-outline);\n }\n}\n\nsection.current button {\n cursor: pointer;\n font-size: var(--scale-1);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n background: none;\n color: var(--pos-normal-text-color);\n outline: none;\n border: none;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n &:focus {\n text-decoration: underline;\n }\n :first-child {\n flex-grow: 1;\n }\n svg {\n width: var(--size-6);\n color: var(--pos-subtle-text-color);\n }\n}\n","import { Component, Event, EventEmitter, h, Listen, Prop } from '@stencil/core';\nimport { Thing } from '@pod-os/core';\n\n@Component({\n tag: 'pos-navigation-bar',\n shadow: true,\n styleUrl: 'pos-navigation-bar.css',\n})\nexport class PosNavigationBar {\n @Prop() current?: Thing;\n @Prop() searchIndexReady: boolean;\n\n @Event({ eventName: 'pod-os:navigate' }) navigate: EventEmitter;\n\n private onClick() {\n this.navigate.emit(this.current);\n }\n\n @Listen('keydown', { target: 'document' })\n activate(e: KeyboardEvent) {\n if ((e.ctrlKey || e.metaKey) && e.key === 'k') {\n e.preventDefault();\n this.navigate.emit(this.current);\n }\n }\n\n render() {\n const ariaLabel = this.current ? `${this.current.label()} (Click to search or enter URI)` : 'Search or enter URI';\n\n return (\n <section class=\"current\">\n {this.current && this.searchIndexReady && <pos-make-findable uri={this.current.uri}></pos-make-findable>}\n <button aria-label={ariaLabel} onClick={() => this.onClick()}>\n <div>{this.current ? this.current.label() : 'Search or enter URI'}</div>\n {this.icon()}\n </button>\n </section>\n );\n }\n\n private icon() {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z\"\n />\n </svg>\n );\n }\n}\n",":host {\n display: block;\n}\n\nform {\n display: grid;\n grid-template-columns: var(--size-16) 1fr;\n grid-gap: var(--scale-0);\n}\n\nlabel {\n grid-column: 1 / 2;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n\ninput,\npos-select-term,\nbutton {\n grid-column: 2 / 3;\n}\n\ninput,\npos-select-term::part(input) {\n outline: var(--pos-input-outline);\n padding: var(--scale-000);\n border: none;\n border-radius: var(--radius-xs);\n width: var(--size-full);\n box-sizing: border-box;\n background: var(--pos-input-background-color);\n color: var(--pos-normal-text-color);\n}\n\ninput:focus-within,\npos-select-term::part(input):focus-within {\n outline: var(--pos-input-focus-outline);\n}\n\n#new-uri {\n grid-column: 1/3;\n cursor: default;\n word-break: break-all;\n color: var(--pos-normal-text-color);\n font-weight: var(--weight-light);\n background: var(--pos-disabled-color);\n padding: var(--scale-000);\n border-radius: var(--radius-xs);\n}\n\ninput#create {\n outline: none;\n box-shadow: var(--shadow-sm);\n cursor: pointer;\n color: var(--pos-primary-text-color);\n background-color: var(--pos-primary-color);\n}\n\ninput#create:disabled {\n cursor: default;\n color: var(--pos-disabled-text-color);\n background-color: var(--pos-disabled-color);\n box-shadow: none;\n}\n\ninput#create:hover:not(:disabled),\ninput#create:focus {\n filter: brightness(110%);\n box-shadow: var(--shadow-md);\n}\n","import { PodOS } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\nimport { PodOsAware, PodOsEventEmitter, subscribePodOs } from '../events/PodOsAware';\n\n@Component({\n tag: 'pos-new-thing-form',\n styleUrl: 'pos-new-thing-form.css',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class PosNewThingForm implements PodOsAware {\n @Prop() referenceUri!: string;\n @State() os: PodOS;\n\n @State() newUri: string;\n @State() name: string;\n @State() selectedTypeUri: string;\n\n @State() canSubmit: boolean = false;\n\n @Event({ eventName: 'pod-os:link' }) linkEmitter: EventEmitter;\n @Event({ eventName: 'pod-os:error' }) errorEmitter: EventEmitter;\n\n @Watch('name')\n @Watch('selectedTypeUri')\n validate() {\n this.canSubmit = Boolean(this.name && this.selectedTypeUri);\n }\n\n componentWillLoad() {\n subscribePodOs(this);\n }\n receivePodOs = async (os: PodOS) => {\n this.os = os;\n };\n\n @Event({ eventName: 'pod-os:init' }) subscribePodOs: PodOsEventEmitter;\n\n render() {\n return (\n <form method=\"dialog\" onSubmit={e => this.handleSubmit(e)}>\n <label htmlFor=\"type\">Type</label>\n <pos-select-term\n id=\"type\"\n placeholder=\"\"\n value={this.selectedTypeUri}\n onPod-os:term-selected={e => this.onTermSelected(e)}\n />\n <label htmlFor=\"name\">Name</label>\n <input id=\"name\" type=\"text\" value={this.name} onInput={e => this.handleChange(e)} />\n {this.newUri ? (\n <div id=\"new-uri\" title=\"This will be the URI of the new thing\">\n {this.newUri}\n </div>\n ) : null}\n <input id=\"create\" type=\"submit\" value=\"Create\" disabled={!this.canSubmit} />\n </form>\n );\n }\n\n handleChange(event) {\n this.name = event.target.value;\n this.newUri = this.os.proposeUriForNewThing(this.referenceUri, this.name);\n }\n\n onTermSelected(event) {\n this.selectedTypeUri = event.detail.uri;\n }\n\n async handleSubmit(event) {\n try {\n await this.os.addNewThing(this.newUri, this.name, this.selectedTypeUri);\n this.linkEmitter.emit(this.newUri);\n this.reset();\n } catch (error) {\n event.preventDefault();\n this.errorEmitter.emit(error);\n }\n }\n\n private reset() {\n this.name = '';\n this.newUri = '';\n this.selectedTypeUri = '';\n }\n}\n",":host {\n /**\n * @prop --width: Width of the picture\n * @prop --height: Height of the picture\n * @prop --border-radius: Border radius of the picture\n * @prop --object-fit: CSS object-fit of the picture\n */\n --width: 300px;\n --height: 300px;\n --border-radius: var(--border-radius, 0);\n --object-fit: var(--object-fit, cover);\n}\n","import { Component, Event, EventEmitter, State, h, Prop } from '@stencil/core';\nimport { Thing } from '@pod-os/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-picture',\n shadow: true,\n styleUrl: 'pos-picture.css',\n})\nexport class PosPicture implements ResourceAware {\n /**\n * Use a blurred version of the image as its own background, if the image is scaled down to fit into the container.\n */\n @Prop() blurredBackground: boolean = false;\n\n @State() resource: Thing;\n\n @Event({ eventName: 'pod-os:resource' }) subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.resource = resource;\n };\n\n render() {\n const pic = this.resource ? this.resource.picture() : null;\n if (!pic) return <slot></slot>;\n return <pos-image blurredBackground={this.blurredBackground} src={pic.url} alt={this.resource.label()}></pos-image>;\n }\n}\n","details.error {\n margin: var(--size-2);\n background-color: var(--pos-error-background-color);\n border: var(--size-px) solid var(--pos-error-border-color);\n padding: var(--size-2);\n border-radius: var(--radius-md);\n\n a {\n color: var(--pos-normal-text-color);\n }\n}\n","import { PodOS, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport session from '../../store/session';\nimport { PodOsAware, PodOsEventEmitter, subscribePodOs } from '../events/PodOsAware';\nimport { ResourceReceiver } from '../events/ResourceAware';\n\ninterface SubscribeResourceEvent extends CustomEvent {\n detail: ResourceReceiver;\n}\n\n@Component({\n tag: 'pos-resource',\n shadow: true,\n styleUrl: 'pos-resource.css',\n})\nexport class PosResource implements PodOsAware {\n @State() os: PodOS;\n\n @State() resource: Thing;\n @State() consumers: SubscribeResourceEvent[] = [];\n\n @Prop() uri: string;\n\n @Prop() lazy: boolean = false;\n\n @Event({ eventName: 'pod-os:init' }) subscribePodOs: PodOsEventEmitter;\n\n /**\n * Indicates that the resource given in `uri` property has been loaded.\n */\n @Event({ eventName: 'pod-os:resource-loaded' }) resourceLoadedEmitter: EventEmitter;\n\n @State()\n private error: Error;\n\n @State()\n private loading: boolean = true;\n\n componentWillLoad() {\n session.onChange('isLoggedIn', () => this.loadResource());\n subscribePodOs(this);\n }\n\n receivePodOs = async (os: PodOS) => {\n this.os = os;\n };\n\n @Listen('pod-os:resource')\n async provideResource(event: SubscribeResourceEvent) {\n event.stopPropagation();\n if (this.resource) {\n event.detail(this.resource);\n }\n this.consumers.push(event);\n }\n\n @Watch('os')\n @Watch('uri')\n async loadResource() {\n await this.getResource(!this.lazy);\n }\n\n @Method()\n async fetch() {\n await this.getResource(true);\n }\n\n private async getResource(fetch: boolean = false) {\n try {\n if (fetch) {\n this.loading = true;\n await this.os.fetch(this.uri);\n this.resourceLoadedEmitter.emit(this.uri);\n }\n this.resource = this.os.store.get(this.uri);\n this.error = null;\n this.consumers.forEach(consumer => {\n consumer.detail(this.resource);\n });\n } catch (err) {\n this.error = err;\n } finally {\n this.loading = false;\n }\n }\n\n render() {\n if (this.loading) {\n return <ion-progress-bar type=\"indeterminate\" />;\n }\n if (this.error) {\n return (\n <details class=\"error\">\n <summary title=\"Click to expand\">⚠ Sorry, something went wrong</summary>\n <p>\n Status:\n {\n // @ts-ignore\n this.error.status\n }\n </p>\n <p>{this.error.message}</p>\n <p>\n You can try to open the link outside PodOS: <a href={this.uri}>{this.uri}</a>\n </p>\n </details>\n );\n }\n return <slot />;\n }\n}\n",":host {\n --background-color: inherit;\n --label-color: var(--pos-normal-text-color);\n --description-color: var(--pos-normal-text-color);\n --uri-color: var(--pos-subtle-text-color);\n --font-family: var(--font-sans);\n}\n\np.content {\n background-color: var(--background-color);\n line-height: var(--line-xs);\n margin: 0;\n display: flex;\n flex-direction: column;\n align-items: baseline;\n gap: var(--size-1);\n\n .url {\n font-size: var(--scale-fluid-1);\n color: var(--pos-subtle-text-color);\n }\n}\n\na {\n color: var(--label-color);\n max-width: min(100%, var(--prose-lg));\n text-decoration: underline;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n text-decoration-thickness: var(--size-px);\n}\n\npos-label {\n color: var(--label-color);\n font-size: var(--scale-fluid-2);\n margin-bottom: var(--size-1);\n}\n\npos-description {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n font-weight: var(--weight-light);\n color: var(--description-color);\n font-size: var(--scale-fluid-2);\n}\n\n@media (min-width: 640px) {\n pos-label {\n font-size: var(--scale-fluid-0);\n }\n pos-description {\n font-size: var(--scale-fluid-1);\n }\n\n p.content {\n .url {\n font-size: var(--scale-fluid-000);\n }\n }\n}\n","import { Relation, Thing } from '@pod-os/core';\nimport { Component, Element, Event, EventEmitter, h, Prop, State } from '@stencil/core';\nimport { ResourceAware, ResourceEventEmitter, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-rich-link',\n shadow: true,\n styleUrl: 'pos-rich-link.css',\n})\nexport class PosRichLink implements ResourceAware {\n /**\n * Link will use this URI\n */\n @Prop() uri?: string;\n /**\n * Link will be obtained by following the predicate with this URI forward from a resource\n */\n @Prop() rel?: string;\n /**\n * Link will be obtained by following the predicate with this URI in reverse from a resource\n */\n @Prop() rev?: string;\n\n @Event({ eventName: 'pod-os:link' }) linkEmitter: EventEmitter;\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: ResourceEventEmitter;\n\n @Event({ eventName: 'pod-os:error' }) errorEmitter: EventEmitter;\n\n @State() link?: string;\n @State() followPredicate: boolean = false;\n @State() error: string = null;\n\n @Element() host: HTMLElement;\n\n @State()\n private showCustomContent: boolean = false;\n\n componentWillLoad() {\n this.showCustomContent = // custom content can either be given as child elements, or as just text, so we check for both:\n !!this.host.lastElementChild || // either has any child element\n this.host.textContent.trim() != ''; // or contains a non-empty text\n if (!this.uri) subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n const addLink = (links: Relation[], resource: Thing, predicate: string, direction: string) => {\n if (links.length == 0) {\n this.error = 'No matching link found';\n this.errorEmitter.emit(\n new Error(`pos-rich-link: No matching link found from ${resource.uri} ${direction}=${predicate}`),\n );\n } else if (links[0].uris.length > 1) {\n this.error = 'More than one matching link found';\n this.errorEmitter.emit(\n new Error(`pos-rich-link: More than one matching link found from ${resource.uri} ${direction}=${predicate}`),\n );\n } else {\n this.link = links[0].uris[0];\n this.followPredicate = true;\n }\n };\n\n if (this.rel) {\n addLink(resource.relations(this.rel), resource, this.rel, 'rel');\n } else if (this.rev) {\n addLink(resource.reverseRelations(this.rev), resource, this.rev, 'rev');\n } else {\n this.link = resource.uri;\n }\n };\n\n render() {\n const content = (uri: string) =>\n this.showCustomContent ? (\n <a\n href={uri}\n onClick={e => {\n e.preventDefault();\n this.linkEmitter.emit(uri);\n }}\n >\n <slot></slot>\n </a>\n ) : (\n <p class=\"content\">\n <a\n href={uri}\n onClick={e => {\n e.preventDefault();\n this.linkEmitter.emit(uri);\n }}\n >\n <pos-label />\n </a>\n <span class=\"url\">{new URL(uri).host}</span>\n <pos-description />\n </p>\n );\n\n if (this.error) {\n return this.error;\n } else if (this.followPredicate) {\n return (\n <pos-resource lazy={true} uri={this.link}>\n {content(this.link)}\n </pos-resource>\n );\n } else if (this.link) {\n return content(this.link);\n } else if (this.uri) {\n return (\n <pos-resource lazy={true} uri={this.uri}>\n {content(this.uri)}\n </pos-resource>\n );\n } else {\n return null;\n }\n }\n}\n","import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n let states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(defaultState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n const unReset = on('reset', () => cb(defaultState[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { Build } from '@stencil/core';\nimport { createStore } from '@stencil/store';\n\nlet defaultRouter;\nconst createRouter = (opts) => {\n var _a;\n const win = window;\n const url = new URL(win.location.href);\n const parseURL = (_a = opts === null || opts === void 0 ? void 0 : opts.parseURL) !== null && _a !== void 0 ? _a : DEFAULT_PARSE_URL;\n const { state, onChange, dispose } = createStore({\n url,\n activePath: parseURL(url)\n }, (newV, oldV, prop) => {\n if (prop === 'url') {\n return newV.href !== oldV.href;\n }\n return newV !== oldV;\n });\n const push = (href) => {\n history.pushState(null, null, href);\n const url = new URL(href, document.baseURI);\n state.url = url;\n state.activePath = parseURL(url);\n };\n const match = (routes) => {\n const { activePath } = state;\n for (let route of routes) {\n const params = matchPath(activePath, route.path);\n if (params) {\n if (route.to != null) {\n const to = (typeof route.to === 'string')\n ? route.to\n : route.to(activePath);\n push(to);\n return match(routes);\n }\n else {\n return { params, route };\n }\n }\n }\n return undefined;\n };\n const navigationChanged = () => {\n const url = new URL(win.location.href);\n state.url = url;\n state.activePath = parseURL(url);\n };\n const Switch = (_, childrenRoutes) => {\n const result = match(childrenRoutes);\n if (result) {\n if (typeof result.route.jsx === 'function') {\n return result.route.jsx(result.params);\n }\n else {\n return result.route.jsx;\n }\n }\n };\n const disposeRouter = () => {\n defaultRouter = undefined;\n win.removeEventListener('popstate', navigationChanged);\n dispose();\n };\n const router = defaultRouter = {\n Switch,\n get url() {\n return state.url;\n },\n get activePath() {\n return state.activePath;\n },\n push,\n onChange: onChange,\n dispose: disposeRouter,\n };\n // Initial update\n navigationChanged();\n // Listen URL changes\n win.addEventListener('popstate', navigationChanged);\n return router;\n};\nconst Route = (props, children) => {\n var _a;\n if ('to' in props) {\n return {\n path: props.path,\n to: props.to,\n };\n }\n if (Build.isDev && props.render && children.length > 0) {\n console.warn('Route: if `render` is provided, the component should not have any children');\n }\n return {\n path: props.path,\n id: props.id,\n jsx: (_a = props.render) !== null && _a !== void 0 ? _a : children,\n };\n};\nconst href = (href, router = defaultRouter) => {\n if (Build.isDev && !router) {\n throw new Error('Router must be defined in href');\n }\n return {\n href,\n onClick: (ev) => {\n if (ev.metaKey || ev.ctrlKey) {\n return;\n }\n if (ev.which == 2 || ev.button == 1) {\n return;\n }\n ev.preventDefault();\n router.push(href);\n },\n };\n};\nconst matchPath = (pathname, path) => {\n if (typeof path === 'string') {\n if (path === pathname) {\n return {};\n }\n }\n else if (typeof path === 'function') {\n const params = path(pathname);\n if (params) {\n return params === true\n ? {}\n : { ...params };\n }\n }\n else {\n const results = path.exec(pathname);\n if (results) {\n path.lastIndex = 0;\n return { ...results };\n }\n }\n return undefined;\n};\nconst DEFAULT_PARSE_URL = (url) => {\n return url.pathname.toLowerCase();\n};\nconst NotFound = () => ({});\n\n/**\n * TS adaption of https://github.com/pillarjs/path-to-regexp/blob/master/index.js\n */\n/**\n * Default configs.\n */\nconst DEFAULT_DELIMITER = '/';\nconst DEFAULT_DELIMITERS = './';\n/**\n * The main path matching regexp utility.\n */\nconst PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\"]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined]\n '(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'\n].join('|'), 'g');\n/**\n * Parse a string for the raw tokens.\n */\nconst parse = (str, options) => {\n var tokens = [];\n var key = 0;\n var index = 0;\n var path = '';\n var defaultDelimiter = (options && options.delimiter) || DEFAULT_DELIMITER;\n var delimiters = (options && options.delimiters) || DEFAULT_DELIMITERS;\n var pathEscaped = false;\n var res;\n while ((res = PATH_REGEXP.exec(str)) !== null) {\n var m = res[0];\n var escaped = res[1];\n var offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length;\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1];\n pathEscaped = true;\n continue;\n }\n var prev = '';\n var next = str[index];\n var name = res[2];\n var capture = res[3];\n var group = res[4];\n var modifier = res[5];\n if (!pathEscaped && path.length) {\n var k = path.length - 1;\n if (delimiters.indexOf(path[k]) > -1) {\n prev = path[k];\n path = path.slice(0, k);\n }\n }\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path);\n path = '';\n pathEscaped = false;\n }\n var partial = prev !== '' && next !== undefined && next !== prev;\n var repeat = modifier === '+' || modifier === '*';\n var optional = modifier === '?' || modifier === '*';\n var delimiter = prev || defaultDelimiter;\n var pattern = capture || group;\n tokens.push({\n name: name || key++,\n prefix: prev,\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n pattern: pattern ? escapeGroup(pattern) : '[^' + escapeString(delimiter) + ']+?'\n });\n }\n // Push any remaining characters.\n if (path || index < str.length) {\n tokens.push(path + str.substr(index));\n }\n return tokens;\n};\n/**\n * Escape a regular expression string.\n */\nconst escapeString = (str) => {\n return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, '\\\\$1');\n};\n/**\n * Escape the capturing group by escaping special characters and meaning.\n */\nconst escapeGroup = (group) => {\n return group.replace(/([=!:$/()])/g, '\\\\$1');\n};\n/**\n * Get the flags for a regexp from the options.\n */\nconst flags = (options) => {\n return options && options.sensitive ? '' : 'i';\n};\n/**\n * Pull out keys from a regexp.\n */\nconst regexpToRegexp = (path, keys) => {\n if (!keys)\n return path;\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g);\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n pattern: null\n });\n }\n }\n return path;\n};\n/**\n * Transform an array into a regexp.\n */\nconst arrayToRegexp = (path, keys, options) => {\n var parts = [];\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source);\n }\n return new RegExp('(?:' + parts.join('|') + ')', flags(options));\n};\n/**\n * Create a path regexp from string input.\n */\nconst stringToRegexp = (path, keys, options) => {\n return tokensToRegExp(parse(path, options), keys, options);\n};\n/**\n * Expose a function for taking tokens and returning a RegExp.\n */\nconst tokensToRegExp = (tokens, keys, options) => {\n options = options || {};\n var strict = options.strict;\n var end = options.end !== false;\n var delimiter = escapeString(options.delimiter || DEFAULT_DELIMITER);\n var delimiters = options.delimiters || DEFAULT_DELIMITERS;\n var endsWith = [].concat(options.endsWith || []).map(escapeString).concat('$').join('|');\n var route = '';\n var isEndDelimited = false;\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (typeof token === 'string') {\n route += escapeString(token);\n isEndDelimited = i === tokens.length - 1 && delimiters.indexOf(token[token.length - 1]) > -1;\n }\n else {\n var prefix = escapeString(token.prefix || '');\n var capture = token.repeat\n ? '(?:' + token.pattern + ')(?:' + prefix + '(?:' + token.pattern + '))*'\n : token.pattern;\n if (keys)\n keys.push(token);\n if (token.optional) {\n if (token.partial) {\n route += prefix + '(' + capture + ')?';\n }\n else {\n route += '(?:' + prefix + '(' + capture + '))?';\n }\n }\n else {\n route += prefix + '(' + capture + ')';\n }\n }\n }\n if (end) {\n if (!strict)\n route += '(?:' + delimiter + ')?';\n route += endsWith === '$' ? '$' : '(?=' + endsWith + ')';\n }\n else {\n if (!strict)\n route += '(?:' + delimiter + '(?=' + endsWith + '))?';\n if (!isEndDelimited)\n route += '(?=' + delimiter + '|' + endsWith + ')';\n }\n return new RegExp('^' + route, flags(options));\n};\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n */\nconst pathToRegexp = (path, keys, options) => {\n if (path instanceof RegExp) {\n return regexpToRegexp(path, keys);\n }\n if (Array.isArray(path)) {\n return arrayToRegexp(path, keys, options);\n }\n return stringToRegexp(path, keys, options);\n};\n\nlet cacheCount = 0;\nconst patternCache = {};\nconst cacheLimit = 10000;\n// Memoized function for creating the path match regex\nconst compilePath = (pattern, options) => {\n const cacheKey = `${options.end}${options.strict}`;\n const cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n const cachePattern = JSON.stringify(pattern);\n if (cache[cachePattern]) {\n return cache[cachePattern];\n }\n const keys = [];\n const re = pathToRegexp(pattern, keys, options);\n const compiledPattern = { re, keys };\n if (cacheCount < cacheLimit) {\n cache[cachePattern] = compiledPattern;\n cacheCount += 1;\n }\n return compiledPattern;\n};\nconst match = (pathname, options = {}) => {\n const { exact = false, strict = false } = options;\n const { re, keys } = compilePath(pathname, { end: exact, strict });\n return (path) => {\n const match = re.exec(path);\n if (!match) {\n return undefined;\n }\n const [url, ...values] = match;\n const isExact = path === url;\n if (exact && !isExact) {\n return undefined;\n }\n return keys.reduce((memo, key, index) => {\n memo[key.name] = values[index];\n return memo;\n }, {});\n };\n};\n\nexport { NotFound, Route, createRouter, href, match };\n",".toolbar {\n display: flex;\n flex-direction: row;\n gap: 0;\n align-items: center;\n margin-left: 0.5rem;\n}\n\npos-navigation {\n flex-grow: 1;\n}\n","import { Component, Event, EventEmitter, h, Listen, Prop, State } from '@stencil/core';\n\nimport { createRouter } from 'stencil-router-v2';\n\nconst Router = createRouter();\n\n/**\n * The responsibility of pos-router is to handle the `uri` query param, that specifies the URI of the resource that is currently opened.\n * It reads this query param and informs other components about changes via the `pod-os:route-changed` event.\n * It also intercepts the URLs from `pod-os:link` events and pushes them as a new `uri` parameter.\n */\n@Component({\n tag: 'pos-router',\n styleUrl: 'pos-router.css',\n})\nexport class PosRouter {\n /**\n * The mode defines what default URI will be used, if no URI param is given\n *\n * - standalone: reroute to pod-os:dashboard\n * - pod: reroute to the URI that is shown in the actual browser\n */\n @Prop() mode: 'standalone' | 'pod' = 'standalone';\n\n @State() uri;\n\n /**\n * Emits the new URI that is active\n */\n @Event({ eventName: 'pod-os:route-changed' }) routeChanged: EventEmitter<string>;\n\n @Listen('pod-os:link')\n linkClicked(e) {\n this.navigate(e.detail);\n }\n\n @Listen('pod-os:session-restored', { target: 'window' })\n sessionRestored(e) {\n Router.push(e.detail.url);\n }\n\n componentWillLoad() {\n this.updateUri();\n Router.onChange('url', () => {\n this.updateUri();\n });\n }\n\n navigate(uri: string) {\n Router.push('?uri=' + encodeURIComponent(uri));\n }\n\n updateUri() {\n this.uri =\n new URLSearchParams(window.location.search).get('uri') ||\n (this.mode === 'standalone' ? 'pod-os:dashboard' : window.location.href);\n this.routeChanged.emit(this.uri);\n }\n\n render() {\n return <slot></slot>;\n }\n}\n",":host {\n display: block;\n}\n\ninput {\n background-color: transparent;\n color: var(--pos-normal-text-color);\n border: none;\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n\ninput:focus {\n outline: none;\n}\n","import { PodOS, Term } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { PodOsAware, PodOsEventEmitter, subscribePodOs } from '../events/PodOsAware';\n\n@Component({\n tag: 'pos-select-term',\n styleUrl: 'pos-select-term.css',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class PosSelectTerm implements PodOsAware {\n @State() os: PodOS;\n\n @Prop() placeholder: string = 'Type to search...';\n\n @Prop() value: string = '';\n\n @State() terms: Term[] = [];\n\n @Event({ eventName: 'pod-os:init' }) subscribePodOs: PodOsEventEmitter;\n\n /**\n * Fires when a term is entered or selected\n */\n @Event({ eventName: 'pod-os:term-selected' }) termSelected: EventEmitter;\n\n componentWillLoad() {\n subscribePodOs(this);\n }\n\n receivePodOs = async (os: PodOS) => {\n this.os = os;\n };\n\n @Watch('os')\n setTerms() {\n this.terms = this.os.listKnownTerms();\n }\n\n handleChange(event) {\n this.termSelected.emit({ uri: event.target.value });\n }\n\n render() {\n return (\n <Host>\n <input\n part=\"input\"\n list=\"terms\"\n placeholder={this.placeholder}\n value={this.value}\n onChange={ev => this.handleChange(ev)}\n ></input>\n <datalist part=\"terms\" id=\"terms\">\n {this.terms.map(term => (\n <option value={term.uri}>{term.shorthand}</option>\n ))}\n </datalist>\n </Host>\n );\n }\n}\n",":host {\n border: var(--size-px) solid var(--pos-border-color);\n border-radius: var(--radius-lg);\n box-shadow: var(--shadow-md);\n padding: var(--size-8);\n max-width: var(--size-96);\n background: var(--pos-card-background);\n}\n\nsvg {\n width: var(--size-8);\n}\n\nh2 {\n display: flex;\n align-items: center;\n}\n\np {\n padding: var(--size-2);\n}\n\n.info {\n color: var(--color-grey-900);\n background-color: var(--color-blue-200);\n}\n.warn {\n color: var(--color-grey-900);\n background-color: var(--color-yellow-200);\n}\n","import { Component, h, Host } from '@stencil/core';\nimport { localSettings } from '../../../store/settings';\n\n@Component({\n tag: 'pos-setting-offline-cache',\n styleUrl: 'pos-setting-offline-cache.css',\n shadow: true,\n})\nexport class PosSettingOfflineCache {\n render() {\n return (\n <Host>\n <div>\n <h2>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125\"\n />\n </svg>\n Cache Settings\n </h2>\n <p class=\"info\">ℹ Enable offline cache to be able to access previously loaded data while offline.</p>\n <p class=\"warn\">⚠ Private data may be stored on this device. Only enable it, if you trust this device.</p>\n <label>\n <input\n type=\"checkbox\"\n checked={localSettings.state.offlineCache}\n onChange={ev => (localSettings.state.offlineCache = (ev.target as HTMLInputElement).checked)}\n ></input>\n Enable offline cache\n </label>\n </div>\n </Host>\n );\n }\n}\n","import {\n SlIcon\n} from \"./chunk.YHLNUJ7P.js\";\n\n// src/components/icon/icon.ts\nvar icon_default = SlIcon;\nSlIcon.define(\"sl-icon\");\n\nexport {\n icon_default\n};\n",":host {\n --button-size: var(--size-16);\n display: block;\n position: sticky;\n align-self: flex-start;\n top: 0;\n overflow: auto;\n min-width: var(--button-size);\n z-index: var(--layer-1);\n}\n\naside {\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n button {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0;\n font-size: var(--size-6);\n position: relative;\n overflow: hidden;\n outline: none;\n border: none;\n width: var(--button-size);\n min-width: var(--button-size);\n height: var(--button-size);\n min-height: var(--button-size);\n background-color: var(--pos-background-color);\n\n &::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: 0;\n height: 0;\n border-radius: 100%;\n background: color-mix(in srgb, var(--pos-primary-color), transparent 50%);\n transform: translate(-50%, -50%);\n opacity: 1;\n }\n\n &:active::after,\n &:focus::after {\n width: calc(var(--button-size) * 1.5);\n height: calc(var(--button-size) * 1.5);\n opacity: 0;\n transition:\n width 0.5s ease-out,\n height 0.5s ease-out,\n opacity 1s ease-out;\n }\n\n &[aria-selected] {\n border-right: var(--size-1) solid var(--pos-primary-color);\n }\n\n .text {\n font-size: var(--size-3);\n white-space: nowrap;\n text-overflow: ellipsis;\n width: 100%;\n overflow: hidden;\n }\n }\n}\n\n@media (max-width: 640px) {\n :host {\n position: fixed;\n top: unset;\n bottom: 0;\n width: 100dvw;\n }\n aside {\n flex-direction: row;\n background-color: var(--pos-background-color);\n\n button {\n &[aria-selected] {\n border-right: none;\n border-top: var(--size-1) solid var(--pos-primary-color);\n }\n }\n }\n}\n","import { Component, h, Prop, Event, EventEmitter } from '@stencil/core';\nimport { ToolConfig } from '../pos-type-router/selectToolsForTypes';\n\nimport './shoelace';\n\n@Component({\n tag: 'pos-tool-select',\n styleUrl: 'pos-tool-select.css',\n shadow: true,\n})\nexport class PosToolSelect {\n /**\n * The tool that is currently selected\n */\n @Prop()\n selected: ToolConfig;\n\n /**\n * All tools that are available\n */\n @Prop()\n tools: ToolConfig[] = [];\n\n @Event({ eventName: 'pod-os:tool-selected' })\n toolSelected: EventEmitter<ToolConfig>;\n\n render() {\n if (this.tools.length > 1) {\n return (\n <aside>\n {this.tools.map(it => (\n <button\n role=\"tab\"\n aria-selected={this.selected?.element === it.element}\n onClick={() => this.toolSelected.emit(it)}\n >\n <sl-icon name={it.icon}></sl-icon>\n <span class=\"text\">{it.label}</span>\n </button>\n ))}\n </aside>\n );\n }\n return null;\n }\n}\n","import { RdfType } from '@pod-os/core';\n\nexport interface ToolConfig {\n element: string;\n label: string;\n icon: string;\n types: TypePriority[];\n}\n\ninterface TypePriority {\n uri: string;\n priority: number;\n}\n\ninterface ToolPriority {\n tool: ToolConfig;\n priority: number;\n}\n\nexport const AvailableTools: { [key: string]: ToolConfig } = {\n Generic: {\n element: 'pos-app-generic',\n label: 'Data',\n icon: 'list-ul',\n types: [], // since this is included everywhere, it does not need to specify types\n },\n RdfDocument: {\n element: 'pos-app-rdf-document',\n label: 'Things',\n icon: 'diagram-2',\n types: [\n {\n uri: 'http://www.w3.org/2007/ont/link#RDFDocument',\n priority: 20,\n },\n ],\n },\n DocumentViewer: {\n element: 'pos-app-document-viewer',\n label: 'Doc',\n icon: 'file-text',\n types: [\n {\n uri: mimeType('application/pdf'),\n priority: 30,\n },\n {\n uri: 'http://www.w3.org/2007/ont/link#Document',\n priority: 10,\n },\n ],\n },\n ImageViewer: {\n element: 'pos-app-image-viewer',\n label: 'Pic',\n icon: 'file-image',\n types: [\n {\n uri: 'http://purl.org/dc/terms/Image',\n priority: 20,\n },\n ],\n },\n LdpContainer: {\n element: 'pos-app-ldp-container',\n label: 'Content',\n icon: 'folder',\n types: [{ uri: 'http://www.w3.org/ns/ldp#Container', priority: 30 }],\n },\n};\n\nfunction mimeType(mimeType: string) {\n return 'http://www.w3.org/ns/iana/media-types/' + mimeType + '#Resource';\n}\n\nexport function selectToolsForTypes(types: RdfType[]) {\n const typeUris = new Set(types.map(type => type.uri));\n\n return Object.values(AvailableTools)\n .map(maxPriorityFor(typeUris))\n .filter(onlyRelevant)\n .toSorted(byPriority)\n .map(it => it.tool)\n .concat(AvailableTools.Generic);\n}\n\nconst maxPriorityFor = (typeUris: Set<string>) => tool =>\n ({\n tool,\n priority: maxPriority(tool.types, typeUris),\n }) as ToolPriority;\n\nfunction maxPriority(types: TypePriority[], typeUris: Set<string>): number {\n return types.filter(type => typeUris.has(type.uri)).reduce((max, type) => Math.max(max, type.priority), 0);\n}\n\nconst onlyRelevant = (it: ToolPriority) => it.priority > 0;\n\nconst byPriority = (a: ToolPriority, b: ToolPriority) => b.priority - a.priority;\n","section {\n display: flex;\n flex-direction: row;\n}\n\n.tools {\n position: relative;\n flex-grow: 1;\n}\n\n.tool {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n &.visible {\n animation: fadeIn 300ms ease-in;\n }\n &.hidden {\n animation: fadeOut 300ms ease-in;\n }\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n@media (max-width: 640px) {\n section {\n --toolbar-size: var(--size-16);\n flex-direction: column-reverse;\n padding-bottom: var(--toolbar-size);\n pos-tool-select {\n --button-size: var(--toolbar-size);\n }\n }\n}\n","import { Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, Listen, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\nimport { selectToolsForTypes, ToolConfig } from './selectToolsForTypes';\n\n@Component({\n tag: 'pos-type-router',\n shadow: true,\n styleUrl: 'pos-type-router.css',\n})\nexport class PosTypeRouter implements ResourceAware {\n @State() initialTool: string;\n @State() availableTools: ToolConfig[];\n @State() oldTool: ToolConfig;\n @State() currentTool: ToolConfig;\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n const urlParams = new URLSearchParams(window.location.search);\n const toolParam = urlParams.get('tool');\n if (toolParam) {\n this.initialTool = toolParam;\n }\n }\n\n @Listen('pod-os:tool-selected')\n handleToolSelected(event: CustomEvent<ToolConfig>) {\n this.oldTool = this.currentTool;\n this.currentTool = event.detail;\n const url = new URL(window.location.href);\n url.searchParams.set('tool', event.detail.element);\n window.history.replaceState({}, '', url.toString());\n }\n\n receiveResource = (resource: Thing) => {\n const types = resource.types();\n this.availableTools = selectToolsForTypes(types);\n this.currentTool = this.availableTools.find(it => it.element === this.initialTool) ?? this.availableTools[0];\n };\n\n render() {\n return this.availableTools ? this.renderApp() : null;\n }\n\n private renderApp() {\n const SelectedTool = this.currentTool.element;\n const OldTool = this.oldTool?.element;\n return (\n <section>\n <pos-tool-select selected={this.currentTool} tools={this.availableTools}></pos-tool-select>\n <div class=\"tools\" onAnimationEnd={() => this.removeOldTool()}>\n {OldTool && <OldTool class=\"tool hidden\"></OldTool>}\n <SelectedTool class=\"tool visible\"></SelectedTool>\n </div>\n </section>\n );\n }\n\n private removeOldTool() {\n this.oldTool = null;\n }\n}\n","// src/components/avatar/avatar.styles.ts\nimport { css } from \"lit\";\nvar avatar_styles_default = css`\n :host {\n display: inline-block;\n\n --size: 3rem;\n }\n\n .avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--size);\n height: var(--size);\n background-color: var(--sl-color-neutral-400);\n font-family: var(--sl-font-sans);\n font-size: calc(var(--size) * 0.5);\n font-weight: var(--sl-font-weight-normal);\n color: var(--sl-color-neutral-0);\n user-select: none;\n -webkit-user-select: none;\n vertical-align: middle;\n }\n\n .avatar--circle,\n .avatar--circle .avatar__image {\n border-radius: var(--sl-border-radius-circle);\n }\n\n .avatar--rounded,\n .avatar--rounded .avatar__image {\n border-radius: var(--sl-border-radius-medium);\n }\n\n .avatar--square {\n border-radius: 0;\n }\n\n .avatar__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .avatar__initials {\n line-height: 1;\n text-transform: uppercase;\n }\n\n .avatar__image {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n overflow: hidden;\n }\n`;\n\nexport {\n avatar_styles_default\n};\n","import {\n avatar_styles_default\n} from \"./chunk.K35GSB4N.js\";\nimport {\n SlIcon\n} from \"./chunk.YHLNUJ7P.js\";\nimport {\n watch\n} from \"./chunk.GMYPQTFK.js\";\nimport {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.4TUIT776.js\";\nimport {\n __decorateClass\n} from \"./chunk.KAW7D32O.js\";\n\n// src/components/avatar/avatar.component.ts\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nvar SlAvatar = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.hasError = false;\n this.image = \"\";\n this.label = \"\";\n this.initials = \"\";\n this.loading = \"eager\";\n this.shape = \"circle\";\n }\n handleImageChange() {\n this.hasError = false;\n }\n handleImageLoadError() {\n this.hasError = true;\n this.emit(\"sl-error\");\n }\n render() {\n const avatarWithImage = html`\n <img\n part=\"image\"\n class=\"avatar__image\"\n src=\"${this.image}\"\n loading=\"${this.loading}\"\n alt=\"\"\n @error=\"${this.handleImageLoadError}\"\n />\n `;\n let avatarWithoutImage = html``;\n if (this.initials) {\n avatarWithoutImage = html`<div part=\"initials\" class=\"avatar__initials\">${this.initials}</div>`;\n } else {\n avatarWithoutImage = html`\n <div part=\"icon\" class=\"avatar__icon\" aria-hidden=\"true\">\n <slot name=\"icon\">\n <sl-icon name=\"person-fill\" library=\"system\"></sl-icon>\n </slot>\n </div>\n `;\n }\n return html`\n <div\n part=\"base\"\n class=${classMap({\n avatar: true,\n \"avatar--circle\": this.shape === \"circle\",\n \"avatar--rounded\": this.shape === \"rounded\",\n \"avatar--square\": this.shape === \"square\"\n })}\n role=\"img\"\n aria-label=${this.label}\n >\n ${this.image && !this.hasError ? avatarWithImage : avatarWithoutImage}\n </div>\n `;\n }\n};\nSlAvatar.styles = [component_styles_default, avatar_styles_default];\nSlAvatar.dependencies = {\n \"sl-icon\": SlIcon\n};\n__decorateClass([\n state()\n], SlAvatar.prototype, \"hasError\", 2);\n__decorateClass([\n property()\n], SlAvatar.prototype, \"image\", 2);\n__decorateClass([\n property()\n], SlAvatar.prototype, \"label\", 2);\n__decorateClass([\n property()\n], SlAvatar.prototype, \"initials\", 2);\n__decorateClass([\n property()\n], SlAvatar.prototype, \"loading\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlAvatar.prototype, \"shape\", 2);\n__decorateClass([\n watch(\"image\")\n], SlAvatar.prototype, \"handleImageChange\", 1);\n\nexport {\n SlAvatar\n};\n","import {\n SlAvatar\n} from \"./chunk.WREZSXX4.js\";\n\n// src/components/avatar/avatar.ts\nvar avatar_default = SlAvatar;\nSlAvatar.define(\"sl-avatar\");\n\nexport {\n avatar_default\n};\n","// src/components/divider/divider.styles.ts\nimport { css } from \"lit\";\nvar divider_styles_default = css`\n :host {\n --color: var(--sl-panel-border-color);\n --width: var(--sl-panel-border-width);\n --spacing: var(--sl-spacing-medium);\n }\n\n :host(:not([vertical])) {\n display: block;\n border-top: solid var(--width) var(--color);\n margin: var(--spacing) 0;\n }\n\n :host([vertical]) {\n display: inline-block;\n height: 100%;\n border-left: solid var(--width) var(--color);\n margin: 0 var(--spacing);\n }\n`;\n\nexport {\n divider_styles_default\n};\n","import {\n divider_styles_default\n} from \"./chunk.SUSCR7CI.js\";\nimport {\n watch\n} from \"./chunk.GMYPQTFK.js\";\nimport {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.4TUIT776.js\";\nimport {\n __decorateClass\n} from \"./chunk.KAW7D32O.js\";\n\n// src/components/divider/divider.component.ts\nimport { property } from \"lit/decorators.js\";\nvar SlDivider = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.vertical = false;\n }\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute(\"role\", \"separator\");\n }\n handleVerticalChange() {\n this.setAttribute(\"aria-orientation\", this.vertical ? \"vertical\" : \"horizontal\");\n }\n};\nSlDivider.styles = [component_styles_default, divider_styles_default];\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlDivider.prototype, \"vertical\", 2);\n__decorateClass([\n watch(\"vertical\")\n], SlDivider.prototype, \"handleVerticalChange\", 1);\n\nexport {\n SlDivider\n};\n","import {\n SlDivider\n} from \"./chunk.5ZSXZIE6.js\";\n\n// src/components/divider/divider.ts\nvar divider_default = SlDivider;\nSlDivider.define(\"sl-divider\");\n\nexport {\n divider_default\n};\n","button {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n cursor: pointer;\n border-radius: 50%;\n pos-picture {\n --width: 40px;\n --height: 40px;\n --border-radius: 50%;\n }\n sl-avatar {\n --size: 40px;\n }\n}\n\nsl-dropdown {\n display: block;\n}\n","import { Component, Event, EventEmitter, h, Listen, Prop } from '@stencil/core';\n\nimport './shoelace';\n\n@Component({\n tag: 'pos-user-menu',\n shadow: true,\n styleUrl: 'pos-user-menu.css',\n})\nexport class PosUserMenu {\n @Prop()\n webId!: string;\n\n @Event({ eventName: 'pod-os:logout' })\n logout: EventEmitter;\n\n @Event({ eventName: 'pod-os:link' })\n link: EventEmitter;\n\n @Listen('sl-select')\n onSelect(e: CustomEvent<{ item: { value: 'profile' | 'logout' | 'dashboard' } }>) {\n const { value } = e.detail.item;\n if (value === 'logout') {\n this.logout.emit();\n } else if (value === 'profile') {\n this.link.emit(this.webId);\n } else if (value === 'dashboard') {\n this.link.emit('pod-os:dashboard');\n } else if (value === 'settings') {\n this.link.emit('pod-os:settings');\n }\n }\n\n render() {\n if (!this.webId) return null; //?\n return (\n <pos-resource uri={this.webId}>\n <sl-dropdown>\n <button slot=\"trigger\" aria-label=\"User menu\">\n <pos-picture>\n <sl-avatar></sl-avatar>\n </pos-picture>\n </button>\n <sl-menu>\n <sl-menu-item value=\"dashboard\">Dashboard</sl-menu-item>\n <sl-menu-item value=\"profile\">\n <pos-label></pos-label>\n </sl-menu-item>\n <sl-menu-item value=\"settings\">Settings</sl-menu-item>\n <sl-divider></sl-divider>\n <sl-menu-item value=\"logout\">Logout</sl-menu-item>\n </sl-menu>\n </sl-dropdown>\n </pos-resource>\n );\n }\n}\n"],"mappings":"i2BAAA,IAAIA,EAAYC,OAAOC,eACvB,IAAIC,EAAaF,OAAOG,iBACxB,IAAIC,EAAmBJ,OAAOK,yBAC9B,IAAIC,EAAoBN,OAAOO,0BAC/B,IAAIC,EAAsBR,OAAOS,sBACjC,IAAIC,EAAeV,OAAOW,UAAUC,eACpC,IAAIC,EAAeb,OAAOW,UAAUG,qBACpC,IAAIC,EAAgB,CAACC,EAAMC,KAAYA,EAASC,OAAOF,IAASC,EAASC,OAAOC,IAAI,UAAYH,GAChG,IAAII,GAAeC,IACjB,MAAMC,UAAUD,EAAI,EAEtB,IAAIE,GAAkB,CAACC,EAAKC,EAAKC,IAAUD,KAAOD,EAAMzB,EAAUyB,EAAKC,EAAK,CAAEE,WAAY,KAAMC,aAAc,KAAMC,SAAU,KAAMH,UAAWF,EAAIC,GAAOC,EAC1J,IAAII,GAAiB,CAACC,EAAGC,KACvB,IAAK,IAAIC,KAAQD,IAAMA,EAAI,IACzB,GAAItB,EAAawB,KAAKF,EAAGC,GACvBV,GAAgBQ,EAAGE,EAAMD,EAAEC,IAC/B,GAAIzB,EACF,IAAK,IAAIyB,KAAQ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