@saasbase-io/core-elements 1.1.17 → 1.1.18
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/components/renderers/renderElement.d.ts +1 -1
- package/dist/components/renderers/sb-otp-renderer.d.ts +15 -23
- package/dist/components/wrappers/layout/layout.d.ts +4 -5
- package/dist/index.js +361 -346
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2550 -2486
- package/dist/index.mjs.map +1 -1
- package/dist/utils/components.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function B(e,t,r,i){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function u(y){try{g(i.next(y))}catch(w){a(w)}}function p(y){try{g(i.throw(y))}catch(w){a(w)}}function g(y){y.done?s(y.value):o(y.value).then(u,p)}g((i=i.apply(e,t||[])).next())})}class wr{constructor(){this.data=new Map}static get Instance(){return wr.instance||(wr.instance=new wr),wr.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){const t=this.getConfig().domain;return t.startsWith("localhost")?`http://${t}`:`https://${t}`}remove(t){this.data.delete(t)}clear(){this.data.clear()}}const Lt=wr.Instance;class nt extends Error{constructor(t,r,i){super(r),this.name="LoginflowError",this.code=t,this.details=i}}class ye{constructor(){}static get Instance(){return ye.instance||(ye.instance=new ye),ye.instance}request(t){return B(this,arguments,void 0,function*(r,i={}){const o=Lt.getConfig(),s=`${Lt.getApiBaseUrl()}${r}`,a=5e4,u=new AbortController,p=setTimeout(()=>u.abort(),a);try{const g=yield fetch(s,Object.assign(Object.assign({},i),{signal:u.signal,headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},o.apiKey&&{Authorization:`Bearer ${o.apiKey}`}),o.headers),i.headers)}));if(clearTimeout(p),!g.ok){const y=yield g.json().catch(()=>({}));throw new nt(y.code||"API_ERROR",y.message||`HTTP ${g.status}: ${g.statusText}`,y.details)}return yield g.json()}catch(g){throw clearTimeout(p),g instanceof nt?g:g instanceof Error?g.name==="AbortError"?new nt("TIMEOUT","Request timeout"):new nt("NETWORK_ERROR",g.message):new nt("UNKNOWN_ERROR","An unknown error occurred")}})}post(t,r){return B(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})})}get(t){return B(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"GET"})})}}class yt{constructor(){this.AUTH_SESSION_STORAGE_KEY="saasbase_auth_session",this.refreshTimeoutId=null,this.refreshPromise=null}static get Instance(){return yt.instance||(yt.instance=new yt),yt.instance}setCurrentSession(t){localStorage.setItem(this.AUTH_SESSION_STORAGE_KEY,JSON.stringify(t))}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t||!t.id_token)return null;const r=this.decodeJWT(t.id_token);return r||null}cleanup(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null}clearSession(){localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=localStorage.getItem(this.AUTH_SESSION_STORAGE_KEY);if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}decodeJWT(t){try{const i=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(atob(i).split("").map(s=>"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(o)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at||!t.refresh_token)return!1;const r=Date.now(),i=t.expires_at,o=t.expires_in||3600,s=r+o*1e3*.2;return i<=s}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at||!t.refresh_token)return;const r=Date.now(),i=t.expires_at,o=t.expires_in||3600,s=i-r-o*1e3*.2;s>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},s))}triggerBackgroundRefresh(t){this.refreshPromise||t.refresh_token&&(this.refreshPromise=this.refreshTokens(t.refresh_token).then(r=>(r&&(this.setCurrentSession(r),this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}refreshTokens(t){return B(this,void 0,void 0,function*(){try{const r=yield ye.Instance.post("/login-flow/v1/refresh",{refresh_token:t});return{id_token:r.id_token,access_token:r.access_token,refresh_token:r.refresh_token,expires_in:r.expires_in,expires_at:Date.now()+r.expires_in*1e3}}catch(r){return r instanceof nt?console.error("Token refresh failed:",r.message,r.details):console.error("Token refresh failed:",r),this.clearSession(),null}})}}class Ml{constructor(t=sessionStorage){this.storage=t,this.FLOW_STATE_KEY="saasbase_loginflow_state",this.FLOW_EXPIRY_MS=540*1e3}getFlowState(){const t=this.storage.getItem(this.FLOW_STATE_KEY);if(!t)return null;try{const r=JSON.parse(t);return this.isExpired(r)?(this.clearFlowState(),null):r}catch{return this.clearFlowState(),null}}saveFlowState(t,r,i){const o=Date.now(),s=this.getFlowState(),a={flowType:t,flow_id:r,state:i.state,startedAt:(s==null?void 0:s.startedAt)||o,lastUpdatedAt:o,render_spec:i.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(a))}restoreFromHistory(t){const r={flowType:t.flowType,flow_id:t.flow_id,state:t.state,startedAt:t.timestamp,lastUpdatedAt:t.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(r))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(t){return Date.now()-t.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}}class Gi{static detect(t,r=window.location){const i=r.pathname.toLowerCase();return i.includes(t.signinUrl)?"signin":i.includes(t.signupUrl)?"signup":"custom"}}class ql{constructor(){this.listeners=new Map}on(t,r){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(r)}off(t,r){var i;(i=this.listeners.get(t))===null||i===void 0||i.delete(r)}emit(t,r){const i=this.listeners.get(t);i&&i.forEach(o=>{try{o(r)}catch(s){console.error(`[FlowEventBus] Error in event handler for ${t}:`,s)}})}clear(){this.listeners.clear()}clearEvent(t){this.listeners.delete(t)}}class Vd{getNavigationType(){const t=performance.getEntriesByType("navigation");if(t.length>0)return t[0].type;const r=performance.navigation;if(r)switch(r.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}}class Is{constructor(t,r,i=window.location,o,s){this.httpClient=ye.Instance,this.redirectTimeoutId=null,this.eventHandlers=new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)]]);const a=Lt.getConfig();if(!a.domain)throw new nt("CONFIG_ERROR","Domain is required");if(!a.appId)throw new nt("CONFIG_ERROR","App ID is required");if(!a.clientSecret)throw new nt("CONFIG_ERROR","Client Secret is required");this.flowId=t,this.location=i,this.flowStateManager=o||new Ml,this.flowEventBus=r||new ql,this.navigationTypeDetector=s||new Vd,yt.Instance.cleanExpiredSession(),yt.Instance.scheduleTokenRefresh()}static init(t,r,i,o,s){return B(this,void 0,void 0,function*(){const a=new Is(t,r,i,o,s),u=yield a.initializeFlowInternal();return{sdk:a,flowType:u.flowType,isResumed:u.isResumed,state:u.state,render_spec:u.render_spec,auth_result:u.auth_result}})}startFlow(t,r){return B(this,void 0,void 0,function*(){if(!r.app_id)throw new nt("VALIDATION_ERROR","Client ID is required");const i=`/v1/auth-flow/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(i,r),"START_FLOW_ERROR","Failed to start flow")})}resumeFlow(t){return B(this,void 0,void 0,function*(){const r=`/v1/auth-flow/${t}/resume`;return this.executeFlowRequest(()=>this.httpClient.post(r),"RESUME_FLOW_ERROR","Failed to resume flow")})}processEvent(t,r){return B(this,void 0,void 0,function*(){if(!t.event)throw new nt("VALIDATION_ERROR","Event type is required");const i=this.eventHandlers.get(t.event);return i?yield i():yield this.processServerEvent(t,r)})}executeFlowRequest(t,r,i,o){return B(this,void 0,void 0,function*(){try{const s=yield t();return o&&(yield o(s)),this.processAuthResult(s.auth_result),s.redirection&&this.redirect(s.redirection),s}catch(s){throw s instanceof nt?s:new nt(r,i,s instanceof Error?{originalError:s.message,stack:s.stack}:s)}})}processServerEvent(t,r){return B(this,void 0,void 0,function*(){let i=this.flowStateManager.getFlowState();if(!i&&(console.warn("Flow state expired, restarting flow before processing event"),yield this.initializeFlowInternal(),i=this.flowStateManager.getFlowState(),!i))throw new nt("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const o=i.state,s=`/v1/auth-flow/${i.flowType}/events`,a=yield this.executeFlowRequest(()=>this.httpClient.post(s,t),"PROCESS_EVENT_ERROR","Failed to process event",r);if(!a.auth_result){this.flowStateManager.saveFlowState(i.flowType,i.flow_id,a);const u=this.flowStateManager.getFlowState();if(u){const p=o!==a.state;this.flowEventBus.emit("flow:updated",{flowState:u,isNewStep:p})}}return a})}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};yt.Instance.setCurrentSession(r),yt.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState(),this.reloadPage()}}initializeFlowInternal(){return B(this,void 0,void 0,function*(){const t=Lt.getConfig(),r=Gi.detect(t,this.location);this.validateFlowType(r);const i=this.flowStateManager.getFlowState();return this.shouldResumeFlow(i,r)?yield this.resumeExistingFlow(i,r):yield this.startNewFlow(r)})}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new nt("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){if(!t)return!1;const o=new URLSearchParams(this.location.search).get("resume")==="true",s=this.navigationTypeDetector.getNavigationType();if(s==="navigate"&&!o)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${s}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const a=o?"explicit resume=true":`navigation type: ${s}`;return console.log(`Resuming existing flow (${a})`),!0}resumeExistingFlow(t,r){return B(this,void 0,void 0,function*(){try{const i=yield this.resumeFlow(r);if(!i.auth_result){this.flowStateManager.saveFlowState(r,t.flow_id,i);const o=this.flowStateManager.getFlowState();o&&this.flowEventBus.emit("flow:resumed",{flowState:o})}return{flowType:r,isResumed:!0,state:i.state,render_spec:i.render_spec,auth_result:i.auth_result}}catch(i){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",i),yield this.startNewFlow(r)}})}startNewFlow(t){return B(this,void 0,void 0,function*(){const r=Lt.getConfig(),i=new URLSearchParams(this.location.search),o={};i.forEach((u,p)=>{o[p]=u}),console.log("metadata",o);const s={app_id:r.appId,client_secret:r.clientSecret,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locale:r.locale||"en",flow_id:this.determineFlowId(t),metadata:o},a=yield this.startFlow(t,s);if(!a.auth_result){this.flowStateManager.saveFlowState(t,s.flow_id,a);const u=this.flowStateManager.getFlowState();u&&this.flowEventBus.emit("flow:started",{flowState:u})}return{flowType:t,isResumed:!1,state:a.state,render_spec:a.render_spec,auth_result:a.auth_result}})}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"custom":if(!this.flowId)throw new nt("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}handleSwitchToSignin(){return B(this,void 0,void 0,function*(){const t=Lt.getConfig();return this.redirect({url:t.signinUrl,redirect_delay:0}),{state:"End"}})}handleSwitchToSignup(){return B(this,void 0,void 0,function*(){const t=Lt.getConfig();return this.redirect({url:t.signupUrl,redirect_delay:0}),{state:"End"}})}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}}class Wd{constructor(t){this.delayMs=t,this.timerId=null}debounce(t){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{t(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}}class Gd{pushState(t,r,i){history.pushState(t,r,i)}replaceState(t,r,i){history.replaceState(t,r,i)}get state(){return history.state}}class Kd{constructor(t,r,i=!1,o=window.location,s,a){this.popstateListener=null,this.pageshowListener=null,this.isProcessing=!1,this.isHandlingNavigationEvent=!1,this.onFlowRestartNeeded=null,this.onFlowRestartNeeded=r,this.skipHistoryTracking=i,this.debouncer=new Wd(200),this.location=o,this.flowStateManager=s||new Ml,this.historyAdapter=a||new Gd,this.subscribeToFlowEvents(t),this.initializeListener()}subscribeToFlowEvents(t){t.on("flow:started",this.handleFlowStart.bind(this)),t.on("flow:updated",this.handleFlowUpdate.bind(this)),t.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=t=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(t)})},this.pageshowListener=t=>{t.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}handlePopState(t){return B(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const r=t.state,i=this.flowStateManager.getFlowState(),o=Lt.getConfig(),s=Gi.detect(o,this.location);if(r&&this.restoreHistoryStateToSession(r),this.shouldRestartFlow(r,i,s)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}handleBfcacheRestoration(){return B(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=this.historyAdapter.state,r=this.flowStateManager.getFlowState(),i=Lt.getConfig(),o=Gi.detect(i,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,o)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}restoreHistoryStateToSession(t){console.log("[NavigationManager] Restoring history state to session storage:",t),this.flowStateManager.restoreFromHistory(t)}shouldRestartFlow(t,r,i){return t&&t.flowType!==i?(console.log("[NavigationManager] Flow type changed via navigation:",t.flowType,"→",i),this.flowStateManager.clearFlowState(),!0):t?Date.now()-t.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}triggerFlowRestart(){return B(this,void 0,void 0,function*(){this.onFlowRestartNeeded&&(yield this.onFlowRestartNeeded())})}createHistoryState(t){return{flowType:t.flowType,flow_id:t.flow_id,state:t.state,timestamp:Date.now()}}updateBrowserHistory(t,r){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const i=this.createHistoryState(t);try{r==="push"?(this.historyAdapter.pushState(i,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(i,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(o){console.error("[NavigationManager] Failed to update history:",o)}}handleFlowStart(t){this.updateBrowserHistory(t.flowState,"replace")}handleFlowUpdate(t){const r=this.isHandlingNavigationEvent||!t.isNewStep?"replace":"push";this.updateBrowserHistory(t.flowState,r)}handleFlowResume(t){this.updateBrowserHistory(t.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}}let ke=new AbortController;class Yd{constructor(){this.httpClient=ye.Instance,this.capabilities={webauthn:!1},this.capabilitiesDetected=!1}detectCapabilities(){return B(this,void 0,void 0,function*(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const t=yield PublicKeyCredential.getClientCapabilities();this.capabilities=Object.assign(Object.assign({},this.capabilities),t);return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=yield PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=yield PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}})}fetchPublicKeyCredentialRequestOptions(t,r){return B(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/login/options",{conditional:r,flow_type:t})}catch(i){return console.error("error",i),null}})}fetchPublicKeyCredentialCreationOptions(t,r){return B(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/register/options",{conditional:r,flow_type:t})}catch(i){return console.error("error",i),null}})}startRegistration(t,r){return B(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;ke.abort(),ke=new AbortController;const i=this.toPublicKeyCredentialCreationOptions(t),o={signal:ke.signal,publicKey:i};if(r){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;o.mediation="conditional"}try{const s=yield navigator.credentials.create(o);if(!s){console.error("no credential returned by authenticator");return}const{id:a,rawId:u,response:p,type:g}=s;let y;typeof p.getTransports=="function"&&(y=p.getTransports());let w;if(typeof p.getPublicKeyAlgorithm=="function")try{w=p.getPublicKeyAlgorithm()}catch(_){$o("getPublicKeyAlgorithm()",_)}let C;if(typeof p.getPublicKey=="function")try{const _=p.getPublicKey();_!==null&&(C=this.bufferToBase64URLString(_))}catch(_){$o("getPublicKey()",_)}let $;if(typeof p.getAuthenticatorData=="function")try{$=this.bufferToBase64URLString(p.getAuthenticatorData())}catch(_){$o("getAuthenticatorData()",_)}return{id:a,rawId:this.bufferToBase64URLString(u),response:{attestationObject:this.bufferToBase64URLString(p.attestationObject),clientDataJSON:this.bufferToBase64URLString(p.clientDataJSON),transports:y,publicKeyAlgorithm:w,publicKey:C,authenticatorData:$},type:g,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(s.authenticatorAttachment)}}catch(s){const a=this.identifyAuthenticationError({error:s,options:o});return a instanceof Re?console.error(`WebAuthn authentication failed with code: ${a.code}, message: ${a.message}`):console.error("WebAuthn authentication failed with error:",s),null}})}startAuthentication(t,r){return B(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;ke.abort(),ke=new AbortController;const i=this.toPublicKeyCredentialRequestOptions(t),o={signal:ke.signal,publicKey:i};if(r){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;o.mediation="conditional",o.publicKey&&(o.publicKey.allowCredentials=[])}try{const s=yield navigator.credentials.get(o);return this.toPublicKeyCredentialJSON(s)}catch(s){const a=this.identifyAuthenticationError({error:s,options:o});return a instanceof Re?console.error(`WebAuthn authentication failed with code: ${a.code}, message: ${a.message}`):console.error("WebAuthn authentication failed with error:",s),null}})}signalUnknownCredential(t,r){return B(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{yield PublicKeyCredential.signalUnknownCredential({rpId:t,credentialId:r})}catch(i){console.error("Failed to signal unknown credential:",i)}else console.warn("signalUnknownCredential not supported in this browser")})}signalCurrentUserDetails(t){return B(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{yield PublicKeyCredential.signalCurrentUserDetails(t)}catch(r){console.error("Failed to signal current user details:",r)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")})}toPublicKeyCredentialDescriptor(t){const{id:r}=t;return Object.assign(Object.assign({},t),{id:this.base64URLStringToBuffer(r),type:t.type,transports:t.transports})}toAuthenticatorAttachment(t){const r=["cross-platform","platform"];if(t&&!(r.indexOf(t)<0))return t}bufferToBase64URLString(t){const r=new Uint8Array(t);let i="";for(const s of r)i+=String.fromCharCode(s);return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(t){const r=t.replace(/-/g,"+").replace(/_/g,"/"),i=(4-r.length%4)%4,o=r.padEnd(r.length+i,"="),s=atob(o),a=new ArrayBuffer(s.length),u=new Uint8Array(a);for(let p=0;p<s.length;p++)u[p]=s.charCodeAt(p);return a}toPublicKeyCredentialJSON(t){if(typeof t.toJSON=="function")return t.toJSON();const r=t.response;return{id:t.id,type:t.type,rawId:this.bufferToBase64URLString(t.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(t.authenticatorAttachment),clientExtensionResults:t==null?void 0:t.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(r.clientDataJSON),authenticatorData:this.bufferToBase64URLString(r.authenticatorData),signature:this.bufferToBase64URLString(r.signature),userHandle:r.userHandle?this.bufferToBase64URLString(r.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(t){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const i={challenge:this.base64URLStringToBuffer(t.challenge),rp:{id:t.rp.id,name:t.rp.name},user:{displayName:t.user.displayName,id:this.base64URLStringToBuffer(t.user.id),name:t.user.name},pubKeyCredParams:t.pubKeyCredParams.map(o=>({alg:o.alg,type:o.type})),timeout:t.timeout};if(t.attestation&&(i.attestation=t.attestation),t.extensions!==void 0&&(i.extensions=t.extensions),t.authenticatorSelection){const o={};t.authenticatorSelection.authenticatorAttachment&&(o.authenticatorAttachment=t.authenticatorSelection.authenticatorAttachment),t.authenticatorSelection.requireResidentKey&&(o.requireResidentKey=t.authenticatorSelection.requireResidentKey),t.authenticatorSelection.residentKey&&(o.residentKey=t.authenticatorSelection.residentKey),t.authenticatorSelection.userVerification&&(o.userVerification=t.authenticatorSelection.userVerification),i.authenticatorSelection=o}return!((r=t.excludeCredentials)===null||r===void 0)&&r.length&&(i.excludeCredentials=t.excludeCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),i}toPublicKeyCredentialRequestOptions(t){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const i={challenge:this.base64URLStringToBuffer(t.challenge)};return t.rpId!==void 0&&(i.rpId=t.rpId),t.timeout!==void 0&&(i.timeout=t.timeout),t.userVerification!==void 0&&(i.userVerification=t.userVerification),t.extensions!==void 0&&(i.extensions=t.extensions),!((r=t.allowCredentials)===null||r===void 0)&&r.length&&(i.allowCredentials=t.allowCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),i}identifyAuthenticationError({error:t,options:r}){const{publicKey:i}=r;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(r.signal instanceof AbortSignal)return new Re({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Re({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(Xd(o)){if(i.rpId!==o)return new Re({message:`The RP ID "${i.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Re({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Re({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return t}isPublicKeyCredentialRequestOptionsJSON(t){return typeof t=="object"&&t!==null&&"challenge"in t}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){ke.abort()}}function $o(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
2
|
-
`,t)}class
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function B(e,t,r,i){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function u(y){try{g(i.next(y))}catch(w){a(w)}}function p(y){try{g(i.throw(y))}catch(w){a(w)}}function g(y){y.done?s(y.value):o(y.value).then(u,p)}g((i=i.apply(e,t||[])).next())})}class xr{constructor(){this.data=new Map}static get Instance(){return xr.instance||(xr.instance=new xr),xr.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){const t=this.getConfig().domain;return t.startsWith("localhost")?`http://${t}`:`https://${t}`}remove(t){this.data.delete(t)}clear(){this.data.clear()}}const Tt=xr.Instance;class nt extends Error{constructor(t,r,i){super(r),this.name="LoginflowError",this.code=t,this.details=i}}class we{constructor(){}static get Instance(){return we.instance||(we.instance=new we),we.instance}request(t){return B(this,arguments,void 0,function*(r,i={}){const o=Tt.getConfig(),s=`${Tt.getApiBaseUrl()}${r}`,a=5e4,u=new AbortController,p=setTimeout(()=>u.abort(),a);try{const g=yield fetch(s,Object.assign(Object.assign({},i),{signal:u.signal,headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},o.apiKey&&{Authorization:`Bearer ${o.apiKey}`}),o.headers),i.headers)}));if(clearTimeout(p),!g.ok){const y=yield g.json().catch(()=>({}));throw new nt(y.code||"API_ERROR",y.message||`HTTP ${g.status}: ${g.statusText}`,y.details)}return yield g.json()}catch(g){throw clearTimeout(p),g instanceof nt?g:g instanceof Error?g.name==="AbortError"?new nt("TIMEOUT","Request timeout"):new nt("NETWORK_ERROR",g.message):new nt("UNKNOWN_ERROR","An unknown error occurred")}})}post(t,r){return B(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})})}get(t){return B(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"GET"})})}}class yt{constructor(){this.AUTH_SESSION_STORAGE_KEY="saasbase_auth_session",this.refreshTimeoutId=null,this.refreshPromise=null}static get Instance(){return yt.instance||(yt.instance=new yt),yt.instance}setCurrentSession(t){localStorage.setItem(this.AUTH_SESSION_STORAGE_KEY,JSON.stringify(t))}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t||!t.id_token)return null;const r=this.decodeJWT(t.id_token);return r||null}cleanup(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null}clearSession(){localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=localStorage.getItem(this.AUTH_SESSION_STORAGE_KEY);if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}decodeJWT(t){try{const i=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(atob(i).split("").map(s=>"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(o)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at||!t.refresh_token)return!1;const r=Date.now(),i=t.expires_at,o=t.expires_in||3600,s=r+o*1e3*.2;return i<=s}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at||!t.refresh_token)return;const r=Date.now(),i=t.expires_at,o=t.expires_in||3600,s=i-r-o*1e3*.2;s>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},s))}triggerBackgroundRefresh(t){this.refreshPromise||t.refresh_token&&(this.refreshPromise=this.refreshTokens(t.refresh_token).then(r=>(r&&(this.setCurrentSession(r),this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}refreshTokens(t){return B(this,void 0,void 0,function*(){try{const r=yield we.Instance.post("/login-flow/v1/refresh",{refresh_token:t});return{id_token:r.id_token,access_token:r.access_token,refresh_token:r.refresh_token,expires_in:r.expires_in,expires_at:Date.now()+r.expires_in*1e3}}catch(r){return r instanceof nt?console.error("Token refresh failed:",r.message,r.details):console.error("Token refresh failed:",r),this.clearSession(),null}})}}class Hl{constructor(t=sessionStorage){this.storage=t,this.FLOW_STATE_KEY="saasbase_loginflow_state",this.FLOW_EXPIRY_MS=540*1e3}getFlowState(){const t=this.storage.getItem(this.FLOW_STATE_KEY);if(!t)return null;try{const r=JSON.parse(t);return this.isExpired(r)?(this.clearFlowState(),null):r}catch{return this.clearFlowState(),null}}saveFlowState(t,r,i){const o=Date.now(),s=this.getFlowState(),a={flowType:t,flow_id:r,state:i.state,startedAt:(s==null?void 0:s.startedAt)||o,lastUpdatedAt:o,render_spec:i.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(a))}restoreFromHistory(t){const r={flowType:t.flowType,flow_id:t.flow_id,state:t.state,startedAt:t.timestamp,lastUpdatedAt:t.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(r))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(t){return Date.now()-t.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}}class Ki{static detect(t,r=window.location){const i=r.pathname.toLowerCase();return i.includes(t.signinUrl)?"signin":i.includes(t.signupUrl)?"signup":"custom"}}class Vl{constructor(){this.listeners=new Map}on(t,r){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(r)}off(t,r){var i;(i=this.listeners.get(t))===null||i===void 0||i.delete(r)}emit(t,r){const i=this.listeners.get(t);i&&i.forEach(o=>{try{o(r)}catch(s){console.error(`[FlowEventBus] Error in event handler for ${t}:`,s)}})}clear(){this.listeners.clear()}clearEvent(t){this.listeners.delete(t)}}class Vd{getNavigationType(){const t=performance.getEntriesByType("navigation");if(t.length>0)return t[0].type;const r=performance.navigation;if(r)switch(r.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}}class Ls{constructor(t,r,i=window.location,o,s){this.httpClient=we.Instance,this.redirectTimeoutId=null,this.eventHandlers=new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)]]);const a=Tt.getConfig();if(!a.domain)throw new nt("CONFIG_ERROR","Domain is required");if(!a.appId)throw new nt("CONFIG_ERROR","App ID is required");if(!a.clientSecret)throw new nt("CONFIG_ERROR","Client Secret is required");this.flowId=t,this.location=i,this.flowStateManager=o||new Hl,this.flowEventBus=r||new Vl,this.navigationTypeDetector=s||new Vd,yt.Instance.cleanExpiredSession(),yt.Instance.scheduleTokenRefresh()}static init(t,r,i,o,s){return B(this,void 0,void 0,function*(){const a=new Ls(t,r,i,o,s),u=yield a.initializeFlowInternal();return{sdk:a,flowType:u.flowType,isResumed:u.isResumed,state:u.state,render_spec:u.render_spec,auth_result:u.auth_result}})}startFlow(t,r){return B(this,void 0,void 0,function*(){if(!r.app_id)throw new nt("VALIDATION_ERROR","Client ID is required");const i=`/v1/auth-flow/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(i,r),"START_FLOW_ERROR","Failed to start flow")})}resumeFlow(t){return B(this,void 0,void 0,function*(){const r=`/v1/auth-flow/${t}/resume`;return this.executeFlowRequest(()=>this.httpClient.post(r),"RESUME_FLOW_ERROR","Failed to resume flow")})}processEvent(t,r){return B(this,void 0,void 0,function*(){if(!t.event)throw new nt("VALIDATION_ERROR","Event type is required");const i=this.eventHandlers.get(t.event);return i?yield i():yield this.processServerEvent(t,r)})}executeFlowRequest(t,r,i,o){return B(this,void 0,void 0,function*(){try{const s=yield t();return o&&(yield o(s)),this.processAuthResult(s.auth_result),s.redirection&&this.redirect(s.redirection),s}catch(s){throw s instanceof nt?s:new nt(r,i,s instanceof Error?{originalError:s.message,stack:s.stack}:s)}})}processServerEvent(t,r){return B(this,void 0,void 0,function*(){let i=this.flowStateManager.getFlowState();if(!i&&(console.warn("Flow state expired, restarting flow before processing event"),yield this.initializeFlowInternal(),i=this.flowStateManager.getFlowState(),!i))throw new nt("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const o=i.state,s=`/v1/auth-flow/${i.flowType}/events`,a=yield this.executeFlowRequest(()=>this.httpClient.post(s,t),"PROCESS_EVENT_ERROR","Failed to process event",r);if(!a.auth_result){this.flowStateManager.saveFlowState(i.flowType,i.flow_id,a);const u=this.flowStateManager.getFlowState();if(u){const p=o!==a.state;this.flowEventBus.emit("flow:updated",{flowState:u,isNewStep:p})}}return a})}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};yt.Instance.setCurrentSession(r),yt.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState(),this.reloadPage()}}initializeFlowInternal(){return B(this,void 0,void 0,function*(){const t=Tt.getConfig(),r=Ki.detect(t,this.location);this.validateFlowType(r);const i=this.flowStateManager.getFlowState();return this.shouldResumeFlow(i,r)?yield this.resumeExistingFlow(i,r):yield this.startNewFlow(r)})}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new nt("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){if(!t)return!1;const o=new URLSearchParams(this.location.search).get("resume")==="true",s=this.navigationTypeDetector.getNavigationType();if(s==="navigate"&&!o)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${s}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const a=o?"explicit resume=true":`navigation type: ${s}`;return console.log(`Resuming existing flow (${a})`),!0}resumeExistingFlow(t,r){return B(this,void 0,void 0,function*(){try{const i=yield this.resumeFlow(r);if(!i.auth_result){this.flowStateManager.saveFlowState(r,t.flow_id,i);const o=this.flowStateManager.getFlowState();o&&this.flowEventBus.emit("flow:resumed",{flowState:o})}return{flowType:r,isResumed:!0,state:i.state,render_spec:i.render_spec,auth_result:i.auth_result}}catch(i){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",i),yield this.startNewFlow(r)}})}startNewFlow(t){return B(this,void 0,void 0,function*(){const r=Tt.getConfig(),i=new URLSearchParams(this.location.search),o={};i.forEach((u,p)=>{o[p]=u}),console.log("metadata",o);const s={app_id:r.appId,client_secret:r.clientSecret,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locale:r.locale||"en",flow_id:this.determineFlowId(t),metadata:o},a=yield this.startFlow(t,s);if(!a.auth_result){this.flowStateManager.saveFlowState(t,s.flow_id,a);const u=this.flowStateManager.getFlowState();u&&this.flowEventBus.emit("flow:started",{flowState:u})}return{flowType:t,isResumed:!1,state:a.state,render_spec:a.render_spec,auth_result:a.auth_result}})}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"custom":if(!this.flowId)throw new nt("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}handleSwitchToSignin(){return B(this,void 0,void 0,function*(){const t=Tt.getConfig();return this.redirect({url:t.signinUrl,redirect_delay:0}),{state:"End"}})}handleSwitchToSignup(){return B(this,void 0,void 0,function*(){const t=Tt.getConfig();return this.redirect({url:t.signupUrl,redirect_delay:0}),{state:"End"}})}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}}class Wd{constructor(t){this.delayMs=t,this.timerId=null}debounce(t){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{t(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}}class Gd{pushState(t,r,i){history.pushState(t,r,i)}replaceState(t,r,i){history.replaceState(t,r,i)}get state(){return history.state}}class Kd{constructor(t,r,i=!1,o=window.location,s,a){this.popstateListener=null,this.pageshowListener=null,this.isProcessing=!1,this.isHandlingNavigationEvent=!1,this.onFlowRestartNeeded=null,this.onFlowRestartNeeded=r,this.skipHistoryTracking=i,this.debouncer=new Wd(200),this.location=o,this.flowStateManager=s||new Hl,this.historyAdapter=a||new Gd,this.subscribeToFlowEvents(t),this.initializeListener()}subscribeToFlowEvents(t){t.on("flow:started",this.handleFlowStart.bind(this)),t.on("flow:updated",this.handleFlowUpdate.bind(this)),t.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=t=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(t)})},this.pageshowListener=t=>{t.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}handlePopState(t){return B(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const r=t.state,i=this.flowStateManager.getFlowState(),o=Tt.getConfig(),s=Ki.detect(o,this.location);if(r&&this.restoreHistoryStateToSession(r),this.shouldRestartFlow(r,i,s)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}handleBfcacheRestoration(){return B(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=this.historyAdapter.state,r=this.flowStateManager.getFlowState(),i=Tt.getConfig(),o=Ki.detect(i,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,o)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}restoreHistoryStateToSession(t){console.log("[NavigationManager] Restoring history state to session storage:",t),this.flowStateManager.restoreFromHistory(t)}shouldRestartFlow(t,r,i){return t&&t.flowType!==i?(console.log("[NavigationManager] Flow type changed via navigation:",t.flowType,"→",i),this.flowStateManager.clearFlowState(),!0):t?Date.now()-t.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}triggerFlowRestart(){return B(this,void 0,void 0,function*(){this.onFlowRestartNeeded&&(yield this.onFlowRestartNeeded())})}createHistoryState(t){return{flowType:t.flowType,flow_id:t.flow_id,state:t.state,timestamp:Date.now()}}updateBrowserHistory(t,r){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const i=this.createHistoryState(t);try{r==="push"?(this.historyAdapter.pushState(i,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(i,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(o){console.error("[NavigationManager] Failed to update history:",o)}}handleFlowStart(t){this.updateBrowserHistory(t.flowState,"replace")}handleFlowUpdate(t){const r=this.isHandlingNavigationEvent||!t.isNewStep?"replace":"push";this.updateBrowserHistory(t.flowState,r)}handleFlowResume(t){this.updateBrowserHistory(t.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}}let Re=new AbortController;class Yd{constructor(){this.httpClient=we.Instance,this.capabilities={webauthn:!1},this.capabilitiesDetected=!1}detectCapabilities(){return B(this,void 0,void 0,function*(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const t=yield PublicKeyCredential.getClientCapabilities();this.capabilities=Object.assign(Object.assign({},this.capabilities),t);return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=yield PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=yield PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}})}fetchPublicKeyCredentialRequestOptions(t,r){return B(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/login/options",{conditional:r,flow_type:t})}catch(i){return console.error("error",i),null}})}fetchPublicKeyCredentialCreationOptions(t,r){return B(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/register/options",{conditional:r,flow_type:t})}catch(i){return console.error("error",i),null}})}startRegistration(t,r){return B(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;Re.abort(),Re=new AbortController;const i=this.toPublicKeyCredentialCreationOptions(t),o={signal:Re.signal,publicKey:i};if(r){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;o.mediation="conditional"}try{const s=yield navigator.credentials.create(o);if(!s){console.error("no credential returned by authenticator");return}const{id:a,rawId:u,response:p,type:g}=s;let y;typeof p.getTransports=="function"&&(y=p.getTransports());let w;if(typeof p.getPublicKeyAlgorithm=="function")try{w=p.getPublicKeyAlgorithm()}catch(_){Co("getPublicKeyAlgorithm()",_)}let C;if(typeof p.getPublicKey=="function")try{const _=p.getPublicKey();_!==null&&(C=this.bufferToBase64URLString(_))}catch(_){Co("getPublicKey()",_)}let $;if(typeof p.getAuthenticatorData=="function")try{$=this.bufferToBase64URLString(p.getAuthenticatorData())}catch(_){Co("getAuthenticatorData()",_)}return{id:a,rawId:this.bufferToBase64URLString(u),response:{attestationObject:this.bufferToBase64URLString(p.attestationObject),clientDataJSON:this.bufferToBase64URLString(p.clientDataJSON),transports:y,publicKeyAlgorithm:w,publicKey:C,authenticatorData:$},type:g,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(s.authenticatorAttachment)}}catch(s){const a=this.identifyAuthenticationError({error:s,options:o});return a instanceof Oe?console.error(`WebAuthn authentication failed with code: ${a.code}, message: ${a.message}`):console.error("WebAuthn authentication failed with error:",s),null}})}startAuthentication(t,r){return B(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;Re.abort(),Re=new AbortController;const i=this.toPublicKeyCredentialRequestOptions(t),o={signal:Re.signal,publicKey:i};if(r){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;o.mediation="conditional",o.publicKey&&(o.publicKey.allowCredentials=[])}try{const s=yield navigator.credentials.get(o);return this.toPublicKeyCredentialJSON(s)}catch(s){const a=this.identifyAuthenticationError({error:s,options:o});return a instanceof Oe?console.error(`WebAuthn authentication failed with code: ${a.code}, message: ${a.message}`):console.error("WebAuthn authentication failed with error:",s),null}})}signalUnknownCredential(t,r){return B(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{yield PublicKeyCredential.signalUnknownCredential({rpId:t,credentialId:r})}catch(i){console.error("Failed to signal unknown credential:",i)}else console.warn("signalUnknownCredential not supported in this browser")})}signalCurrentUserDetails(t){return B(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{yield PublicKeyCredential.signalCurrentUserDetails(t)}catch(r){console.error("Failed to signal current user details:",r)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")})}toPublicKeyCredentialDescriptor(t){const{id:r}=t;return Object.assign(Object.assign({},t),{id:this.base64URLStringToBuffer(r),type:t.type,transports:t.transports})}toAuthenticatorAttachment(t){const r=["cross-platform","platform"];if(t&&!(r.indexOf(t)<0))return t}bufferToBase64URLString(t){const r=new Uint8Array(t);let i="";for(const s of r)i+=String.fromCharCode(s);return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(t){const r=t.replace(/-/g,"+").replace(/_/g,"/"),i=(4-r.length%4)%4,o=r.padEnd(r.length+i,"="),s=atob(o),a=new ArrayBuffer(s.length),u=new Uint8Array(a);for(let p=0;p<s.length;p++)u[p]=s.charCodeAt(p);return a}toPublicKeyCredentialJSON(t){if(typeof t.toJSON=="function")return t.toJSON();const r=t.response;return{id:t.id,type:t.type,rawId:this.bufferToBase64URLString(t.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(t.authenticatorAttachment),clientExtensionResults:t==null?void 0:t.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(r.clientDataJSON),authenticatorData:this.bufferToBase64URLString(r.authenticatorData),signature:this.bufferToBase64URLString(r.signature),userHandle:r.userHandle?this.bufferToBase64URLString(r.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(t){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const i={challenge:this.base64URLStringToBuffer(t.challenge),rp:{id:t.rp.id,name:t.rp.name},user:{displayName:t.user.displayName,id:this.base64URLStringToBuffer(t.user.id),name:t.user.name},pubKeyCredParams:t.pubKeyCredParams.map(o=>({alg:o.alg,type:o.type})),timeout:t.timeout};if(t.attestation&&(i.attestation=t.attestation),t.extensions!==void 0&&(i.extensions=t.extensions),t.authenticatorSelection){const o={};t.authenticatorSelection.authenticatorAttachment&&(o.authenticatorAttachment=t.authenticatorSelection.authenticatorAttachment),t.authenticatorSelection.requireResidentKey&&(o.requireResidentKey=t.authenticatorSelection.requireResidentKey),t.authenticatorSelection.residentKey&&(o.residentKey=t.authenticatorSelection.residentKey),t.authenticatorSelection.userVerification&&(o.userVerification=t.authenticatorSelection.userVerification),i.authenticatorSelection=o}return!((r=t.excludeCredentials)===null||r===void 0)&&r.length&&(i.excludeCredentials=t.excludeCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),i}toPublicKeyCredentialRequestOptions(t){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const i={challenge:this.base64URLStringToBuffer(t.challenge)};return t.rpId!==void 0&&(i.rpId=t.rpId),t.timeout!==void 0&&(i.timeout=t.timeout),t.userVerification!==void 0&&(i.userVerification=t.userVerification),t.extensions!==void 0&&(i.extensions=t.extensions),!((r=t.allowCredentials)===null||r===void 0)&&r.length&&(i.allowCredentials=t.allowCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),i}identifyAuthenticationError({error:t,options:r}){const{publicKey:i}=r;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(r.signal instanceof AbortSignal)return new Oe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Oe({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(Xd(o)){if(i.rpId!==o)return new Oe({message:`The RP ID "${i.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Oe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Oe({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return t}isPublicKeyCredentialRequestOptionsJSON(t){return typeof t=="object"&&t!==null&&"challenge"in t}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){Re.abort()}}function Co(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
2
|
+
`,t)}class Oe extends Error{constructor({message:t,code:r,cause:i,name:o}){super(t),this.name=o??i.name,this.code=r}}function Xd(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class _r{constructor(){this.configured=!1,this.loginflow=null,this.navigationManager=null,this.flowEventBus=null,this.webauthnService=null}static get Instance(){return _r.instance||(_r.instance=new _r),_r.instance}ensureConfigured(){if(!this.configured)throw new nt("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new nt("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}startLoginflowInternal(t){return B(this,arguments,void 0,function*(r,i=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new Yd,this.webauthnService.detectCapabilities(),this.flowEventBus=new Vl,this.navigationManager=new Kd(this.flowEventBus,()=>B(this,void 0,void 0,function*(){console.log("[AuthService] Navigation restart triggered, restarting loginflow"),yield this.startLoginflowInternal(void 0,!1)}),i);const o=yield Ls.init(r,this.flowEventBus),s=Tt.getConfig();this.startPasskeyAuthentication(o.flowType,!0),this.loginflow=o.sdk;const a={flowType:o.flowType,isResumed:o.isResumed,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result};return s.onFlowStateChange&&s.onFlowStateChange({eventType:o.isResumed?"flow_resumed":"flow_started",flowType:o.flowType,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result,isResumed:o.isResumed}),a})}configure(t){if(!t.domain||!t.appId||!t.clientSecret)throw new nt("CONFIG_ERROR","domain, appId, and clientSecret are required");Tt.setConfig(t),this.configured=!0}isAuthenticated(){return this.ensureConfigured(),yt.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),yt.Instance.getCurrentSession()}getAuthenticatedUser(){return this.ensureConfigured(),yt.Instance.getAuthenticatedUser()}startLoginflow(t){return B(this,void 0,void 0,function*(){return this.startLoginflowInternal(t,!1)})}processLoginflowEvent(t){return B(this,void 0,void 0,function*(){var r,i;this.ensureConfigured(),this.ensureLoginflowInitialized();const o=Tt.getConfig(),s=Ki.detect(o,location);if(t.event==="signin_with_passkey"&&!(!((r=t.data)===null||r===void 0)&&r.credential_request)){const u=yield this.getPasskeyCredential(s,!1);if(!u||!u.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:u.cred}}if(t.event==="register_passkey"&&!(!((i=t.data)===null||i===void 0)&&i.conditional)){console.log("attempt to register a passkey");const u=yield this.createPasskeyCredential(s,!1);if(!u)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:u,conditional:!1}}const a=yield this.loginflow.processEvent(t,u=>B(this,void 0,void 0,function*(){var p;if(!((p=u.data)===null||p===void 0)&&p.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const g=yield this.registerPasskey(s,!0);g&&(g.render_spec=void 0,u.render_spec=void 0)}}));if(console.log("render spec",a.render_spec),o.onFlowStateChange){const u=sessionStorage.getItem("saasbase_loginflow_state");let p="custom";if(u)try{p=JSON.parse(u).flowType}catch(g){console.error("Failed to parse flow state:",g)}o.onFlowStateChange({eventType:"flow_updated",flowType:p,state:a.state,render_spec:a.render_spec,auth_result:a.auth_result})}return a})}getPasskeyCredential(t,r){return B(this,void 0,void 0,function*(){var i,o;const s=yield(i=this.webauthnService)===null||i===void 0?void 0:i.fetchPublicKeyCredentialRequestOptions(t,r);if(!s)return console.error("failed to fetch public key request options"),null;try{return{cred:yield(o=this.webauthnService)===null||o===void 0?void 0:o.startAuthentication(s,r),options:s}}catch(a){return console.error("error starting authentication",a),null}})}startPasskeyAuthentication(t){return B(this,arguments,void 0,function*(r,i=!1){var o,s;const a=yield this.getPasskeyCredential(r,i);if(!a||!a.cred){console.error("no credential found");return}const{cred:u,options:p}=a;try{((o=(yield this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:u}})).data)===null||o===void 0?void 0:o.error)==="CredentialNotFound"&&(p.rpId&&u.id?(s=this.webauthnService)===null||s===void 0||s.signalUnknownCredential(p.rpId,u.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(g){console.error("failed to signin with passkey",g)}})}createPasskeyCredential(t,r){return B(this,void 0,void 0,function*(){var i,o;try{const s=yield(i=this.webauthnService)===null||i===void 0?void 0:i.fetchPublicKeyCredentialCreationOptions(t,r);if(!s){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(o=this.webauthnService)===null||o===void 0?void 0:o.startRegistration(s,r)}catch(s){console.log("error",s)}})}registerPasskey(t){return B(this,arguments,void 0,function*(r,i=!1){try{const o=yield this.createPasskeyCredential(r,i),s=yield this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:o,conditional:i}});return console.log("passkey creation res",s),s}catch(o){console.log("error",o)}})}signOut(){this.ensureConfigured(),yt.Instance.clearSession(),yt.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),window.location.reload(),console.log("Refreshed the page to clear any in-memory state")}}const gt=_r.Instance;/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2019 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/const
|
|
6
|
+
*/const Pi=globalThis,Ps=Pi.ShadowRoot&&(Pi.ShadyCSS===void 0||Pi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zs=Symbol(),pn=new WeakMap;let Wl=class{constructor(t,r,i){if(this._$cssResult$=!0,i!==zs)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o;const r=this.t;if(Ps&&t===void 0){const i=r!==void 0&&r.length===1;i&&(t=pn.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&pn.set(r,t))}return t}toString(){return this.cssText}};const Zd=e=>new Wl(typeof e=="string"?e:e+"",void 0,zs),Gl=(e,...t)=>{const r=e.length===1?e[0]:t.reduce((i,o,s)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[s+1],e[0]);return new Wl(r,e,zs)},Jd=(e,t)=>{if(Ps)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(const r of t){const i=document.createElement("style"),o=Pi.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=r.cssText,e.appendChild(i)}},hn=Ps?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const i of t.cssRules)r+=i.cssText;return Zd(r)})(e):e;/**
|
|
7
7
|
* @license
|
|
8
8
|
* Copyright 2017 Google LLC
|
|
9
9
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
10
|
-
*/const{is:Qd,defineProperty:tc,getOwnPropertyDescriptor:ec,getOwnPropertyNames:rc,getOwnPropertySymbols:ic,getPrototypeOf:oc}=Object,
|
|
10
|
+
*/const{is:Qd,defineProperty:tc,getOwnPropertyDescriptor:ec,getOwnPropertyNames:rc,getOwnPropertySymbols:ic,getPrototypeOf:oc}=Object,xe=globalThis,gn=xe.trustedTypes,sc=gn?gn.emptyScript:"",Eo=xe.reactiveElementPolyfillSupport,Yr=(e,t)=>e,Yi={toAttribute(e,t){switch(t){case Boolean:e=e?sc:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},js=(e,t)=>!Qd(e,t),mn={attribute:!0,type:String,converter:Yi,reflect:!1,useDefault:!1,hasChanged:js};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),xe.litPropertyMetadata??(xe.litPropertyMetadata=new WeakMap);let wr=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=mn){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,r);o!==void 0&&tc(this.prototype,t,o)}}static getPropertyDescriptor(t,r,i){const{get:o,set:s}=ec(this.prototype,t)??{get(){return this[r]},set(a){this[r]=a}};return{get:o,set(a){const u=o==null?void 0:o.call(this);s==null||s.call(this,a),this.requestUpdate(t,u,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??mn}static _$Ei(){if(this.hasOwnProperty(Yr("elementProperties")))return;const t=oc(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Yr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Yr("properties"))){const r=this.properties,i=[...rc(r),...ic(r)];for(const o of i)this.createProperty(o,r[o])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[i,o]of r)this.elementProperties.set(i,o)}this._$Eh=new Map;for(const[r,i]of this.elementProperties){const o=this._$Eu(r,i);o!==void 0&&this._$Eh.set(o,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)r.unshift(hn(o))}else t!==void 0&&r.push(hn(t));return r}static _$Eu(t,r){const i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(r=>r(this))}addController(t){var r;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var r;(r=this._$EO)==null||r.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const i of r.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 Jd(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(r=>{var i;return(i=r.hostConnected)==null?void 0:i.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(r=>{var i;return(i=r.hostDisconnected)==null?void 0:i.call(r)})}attributeChangedCallback(t,r,i){this._$AK(t,i)}_$ET(t,r){var s;const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(o!==void 0&&i.reflect===!0){const a=(((s=i.converter)==null?void 0:s.toAttribute)!==void 0?i.converter:Yi).toAttribute(r,i.type);this._$Em=t,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._$Em=null}}_$AK(t,r){var s,a;const i=this.constructor,o=i._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const u=i.getPropertyOptions(o),p=typeof u.converter=="function"?{fromAttribute:u.converter}:((s=u.converter)==null?void 0:s.fromAttribute)!==void 0?u.converter:Yi;this._$Em=o;const g=p.fromAttribute(r,u.type);this[o]=g??((a=this._$Ej)==null?void 0:a.get(o))??g,this._$Em=null}}requestUpdate(t,r,i,o=!1,s){var a;if(t!==void 0){const u=this.constructor;if(o===!1&&(s=this[t]),i??(i=u.getPropertyOptions(t)),!((i.hasChanged??js)(s,r)||i.useDefault&&i.reflect&&s===((a=this._$Ej)==null?void 0:a.get(t))&&!this.hasAttribute(u._$Eu(t,i))))return;this.C(t,r,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:i,reflect:o,wrapped:s},a){i&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,a??r??this[t]),s!==!0||a!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(r=void 0),this._$AL.set(t,r)),o===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,a]of this._$Ep)this[s]=a;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[s,a]of o){const{wrapped:u}=a,p=this[s];u!==!0||this._$AL.has(s)||p===void 0||this.C(s,void 0,a,p)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(i=this._$EO)==null||i.forEach(o=>{var s;return(s=o.hostUpdate)==null?void 0:s.call(o)}),this.update(r)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(r)}willUpdate(t){}_$AE(t){var r;(r=this._$EO)==null||r.forEach(i=>{var o;return(o=i.hostUpdated)==null?void 0:o.call(i)}),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=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};wr.elementStyles=[],wr.shadowRootOptions={mode:"open"},wr[Yr("elementProperties")]=new Map,wr[Yr("finalized")]=new Map,Eo==null||Eo({ReactiveElement:wr}),(xe.reactiveElementVersions??(xe.reactiveElementVersions=[])).push("2.1.2");/**
|
|
11
11
|
* @license
|
|
12
12
|
* Copyright 2017 Google LLC
|
|
13
13
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
|
-
*/const
|
|
15
|
-
\f\r]`,
|
|
16
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
14
|
+
*/const Xr=globalThis,bn=e=>e,Xi=Xr.trustedTypes,fn=Xi?Xi.createPolicy("lit-html",{createHTML:e=>e}):void 0,Kl="$lit$",ye=`lit$${Math.random().toFixed(9).slice(2)}$`,Yl="?"+ye,nc=`<${Yl}>`,ir=document,ii=()=>ir.createComment(""),oi=e=>e===null||typeof e!="object"&&typeof e!="function",Ns=Array.isArray,ac=e=>Ns(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",ko=`[
|
|
15
|
+
\f\r]`,Nr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,vn=/-->/g,yn=/>/g,Ae=RegExp(`>|${ko}(?:([^\\s"'>=/]+)(${ko}*=${ko}*(?:[^
|
|
16
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),wn=/'/g,xn=/"/g,Xl=/^(?:script|style|textarea|title)$/i,Zl=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),c=Zl(1),qt=Zl(2),or=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),_n=new WeakMap,Fe=ir.createTreeWalker(ir,129);function Jl(e,t){if(!Ns(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return fn!==void 0?fn.createHTML(t):t}const lc=(e,t)=>{const r=e.length-1,i=[];let o,s=t===2?"<svg>":t===3?"<math>":"",a=Nr;for(let u=0;u<r;u++){const p=e[u];let g,y,w=-1,C=0;for(;C<p.length&&(a.lastIndex=C,y=a.exec(p),y!==null);)C=a.lastIndex,a===Nr?y[1]==="!--"?a=vn:y[1]!==void 0?a=yn:y[2]!==void 0?(Xl.test(y[2])&&(o=RegExp("</"+y[2],"g")),a=Ae):y[3]!==void 0&&(a=Ae):a===Ae?y[0]===">"?(a=o??Nr,w=-1):y[1]===void 0?w=-2:(w=a.lastIndex-y[2].length,g=y[1],a=y[3]===void 0?Ae:y[3]==='"'?xn:wn):a===xn||a===wn?a=Ae:a===vn||a===yn?a=Nr:(a=Ae,o=void 0);const $=a===Ae&&e[u+1].startsWith("/>")?" ":"";s+=a===Nr?p+nc:w>=0?(i.push(g),p.slice(0,w)+Kl+p.slice(w)+ye+$):p+ye+(w===-2?u:$)}return[Jl(e,s+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};let _s=class Ql{constructor({strings:t,_$litType$:r},i){let o;this.parts=[];let s=0,a=0;const u=t.length-1,p=this.parts,[g,y]=lc(t,r);if(this.el=Ql.createElement(g,i),Fe.currentNode=this.el.content,r===2||r===3){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(o=Fe.nextNode())!==null&&p.length<u;){if(o.nodeType===1){if(o.hasAttributes())for(const w of o.getAttributeNames())if(w.endsWith(Kl)){const C=y[a++],$=o.getAttribute(w).split(ye),_=/([.?@])?(.*)/.exec(C);p.push({type:1,index:s,name:_[2],strings:$,ctor:_[1]==="."?cc:_[1]==="?"?uc:_[1]==="@"?pc:to}),o.removeAttribute(w)}else w.startsWith(ye)&&(p.push({type:6,index:s}),o.removeAttribute(w));if(Xl.test(o.tagName)){const w=o.textContent.split(ye),C=w.length-1;if(C>0){o.textContent=Xi?Xi.emptyScript:"";for(let $=0;$<C;$++)o.append(w[$],ii()),Fe.nextNode(),p.push({type:2,index:++s});o.append(w[C],ii())}}}else if(o.nodeType===8)if(o.data===Yl)p.push({type:2,index:s});else{let w=-1;for(;(w=o.data.indexOf(ye,w+1))!==-1;)p.push({type:7,index:s}),w+=ye.length-1}s++}}static createElement(t,r){const i=ir.createElement("template");return i.innerHTML=t,i}};function Or(e,t,r=e,i){var a,u;if(t===or)return t;let o=i!==void 0?(a=r._$Co)==null?void 0:a[i]:r._$Cl;const s=oi(t)?void 0:t._$litDirective$;return(o==null?void 0:o.constructor)!==s&&((u=o==null?void 0:o._$AO)==null||u.call(o,!1),s===void 0?o=void 0:(o=new s(e),o._$AT(e,r,i)),i!==void 0?(r._$Co??(r._$Co=[]))[i]=o:r._$Cl=o),o!==void 0&&(t=Or(e,o._$AS(e,t.values),o,i)),t}let dc=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:i}=this._$AD,o=((t==null?void 0:t.creationScope)??ir).importNode(r,!0);Fe.currentNode=o;let s=Fe.nextNode(),a=0,u=0,p=i[0];for(;p!==void 0;){if(a===p.index){let g;p.type===2?g=new Us(s,s.nextSibling,this,t):p.type===1?g=new p.ctor(s,p.name,p.strings,this,t):p.type===6&&(g=new hc(s,this,t)),this._$AV.push(g),p=i[++u]}a!==(p==null?void 0:p.index)&&(s=Fe.nextNode(),a++)}return Fe.currentNode=ir,o}p(t){let r=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,r),r+=i.strings.length-2):i._$AI(t[r])),r++}},Us=class td{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,r,i,o){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=i,this.options=o,this._$Cv=(o==null?void 0:o.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Or(this,t,r),oi(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==or&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ac(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!==f&&oi(this._$AH)?this._$AA.nextSibling.data=t:this.T(ir.createTextNode(t)),this._$AH=t}$(t){var s;const{values:r,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=_s.createElement(Jl(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===o)this._$AH.p(r);else{const a=new dc(o,this),u=a.u(this.options);a.p(r),this.T(u),this._$AH=a}}_$AC(t){let r=_n.get(t.strings);return r===void 0&&_n.set(t.strings,r=new _s(t)),r}k(t){Ns(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let i,o=0;for(const s of t)o===r.length?r.push(i=new td(this.O(ii()),this.O(ii()),this,this.options)):i=r[o],i._$AI(s),o++;o<r.length&&(this._$AR(i&&i._$AB.nextSibling,o),r.length=o)}_$AR(t=this._$AA.nextSibling,r){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,r);t!==this._$AB;){const o=bn(t).nextSibling;bn(t).remove(),t=o}}setConnected(t){var r;this._$AM===void 0&&(this._$Cv=t,(r=this._$AP)==null||r.call(this,t))}},to=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,i,o,s){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=r,this._$AM=o,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=f}_$AI(t,r=this,i,o){const s=this.strings;let a=!1;if(s===void 0)t=Or(this,t,r,0),a=!oi(t)||t!==this._$AH&&t!==or,a&&(this._$AH=t);else{const u=t;let p,g;for(t=s[0],p=0;p<s.length-1;p++)g=Or(this,u[i+p],r,p),g===or&&(g=this._$AH[p]),a||(a=!oi(g)||g!==this._$AH[p]),g===f?t=f:t!==f&&(t+=(g??"")+s[p+1]),this._$AH[p]=g}a&&!o&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},cc=class extends to{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},uc=class extends to{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},pc=class extends to{constructor(t,r,i,o,s){super(t,r,i,o,s),this.type=5}_$AI(t,r=this){if((t=Or(this,t,r,0)??f)===or)return;const i=this._$AH,o=t===f&&i!==f||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,s=t!==f&&(i===f||o);o&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,t):this._$AH.handleEvent(t)}},hc=class{constructor(t,r,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Or(this,t)}};const Ro=Xr.litHtmlPolyfillSupport;Ro==null||Ro(_s,Us),(Xr.litHtmlVersions??(Xr.litHtmlVersions=[])).push("3.3.2");const gc=(e,t,r)=>{const i=(r==null?void 0:r.renderBefore)??t;let o=i._$litPart$;if(o===void 0){const s=(r==null?void 0:r.renderBefore)??null;i._$litPart$=o=new Us(t.insertBefore(ii(),s),s,void 0,r??{})}return o._$AI(e),o};/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2017 Google LLC
|
|
19
19
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
|
-
*/const
|
|
20
|
+
*/const Me=globalThis;let v=class extends wr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=gc(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return or}};var ql;v._$litElement$=!0,v.finalized=!0,(ql=Me.litElementHydrateSupport)==null||ql.call(Me,{LitElement:v});const Oo=Me.litElementPolyfillSupport;Oo==null||Oo({LitElement:v});(Me.litElementVersions??(Me.litElementVersions=[])).push("4.2.2");/**
|
|
21
21
|
* @license
|
|
22
22
|
* Copyright 2017 Google LLC
|
|
23
23
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/const mc={attribute:!0,type:String,converter:
|
|
28
|
+
*/const mc={attribute:!0,type:String,converter:Yi,reflect:!1,hasChanged:js},bc=(e=mc,t,r)=>{const{kind:i,metadata:o}=r;let s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),i==="setter"&&((e=Object.create(e)).wrapped=!0),s.set(r.name,e),i==="accessor"){const{name:a}=r;return{set(u){const p=t.get.call(this);t.set.call(this,u),this.requestUpdate(a,p,e,!0,u)},init(u){return u!==void 0&&this.C(a,void 0,e,u),u}}}if(i==="setter"){const{name:a}=r;return function(u){const p=this[a];t.call(this,u),this.requestUpdate(a,p,e,!0,u)}}throw Error("Unsupported decorator location: "+i)};function l(e){return(t,r)=>typeof r=="object"?bc(e,t,r):((i,o,s)=>{const a=o.hasOwnProperty(s);return o.constructor.createProperty(s,i),a?Object.getOwnPropertyDescriptor(o,s):void 0})(e,t,r)}/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2017 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright 2017 Google LLC
|
|
39
39
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
|
-
*/function
|
|
40
|
+
*/function li(e,t){return(r,i,o)=>{const s=a=>{var u;return((u=a.renderRoot)==null?void 0:u.querySelector(e))??null};return fc(r,i,{get(){return s(this)}})}}var vc=Object.defineProperty,yc=(e,t,r,i)=>{for(var o=void 0,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=a(t,r,o)||o);return o&&vc(t,r,o),o};class ed extends v{constructor(){super(),this.shadow=!1}getAttributesToExclude(){return[]}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,i=""){var o,s;t.some(a=>this.isCustomPropertySet(a))&&((s=(o=this.shadowRoot)==null?void 0:o.querySelector(r))==null||s.classList.add(i))}removeDuplicateContent(){var s;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{var u;return a.nodeType===Node.COMMENT_NODE||a.nodeType===Node.TEXT_NODE&&!((u=a.textContent)!=null&&u.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,i=[];let o;for(;o=t.nextNode();){let a;if(o.nodeType===Node.TEXT_NODE){const u=(s=o.textContent)==null?void 0:s.trim();if(!u)continue;a=`text:${u}`}else if(o instanceof HTMLElement){const u=Array.from(o.attributes).map(p=>`${p.name}=${p.value}`).sort().join(":");a=`element:${o.tagName}:${u}`}else continue;if(r.has(a)){const u=r.get(a);u!=null&&u.parentNode&&i.push(u),r.set(a,o)}else r.set(a,o)}i.forEach(a=>{var u;return(u=a.parentNode)==null?void 0:u.removeChild(a)})}moveLightDomChildrenInto(t,r){let i;r!=null&&r.length?(i=r.filter(o=>this.contains(o)&&o!==t&&!o.contains(t)),i.forEach(o=>{const s=Array.from(t.childNodes).find(a=>{var u;return(u=a.isEqualNode)==null?void 0:u.call(a,o)});s&&t.removeChild(s)})):i=Array.from(this.childNodes).filter(o=>o!==t&&!t.contains(o)&&!o.contains(t)),i.forEach(o=>t.appendChild(o))}}yc([l({type:Boolean})],ed.prototype,"shadow");/**
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright 2017 Google LLC
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
|
-
*/const
|
|
44
|
+
*/const rd={CHILD:2},eo=e=>(...t)=>({_$litDirective$:e,values:t});let id=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,i){this._$Ct=t,this._$AM=r,this._$Ci=i}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}};/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2020 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
* @license
|
|
50
50
|
* Copyright 2017 Google LLC
|
|
51
51
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
|
-
*/const
|
|
52
|
+
*/const Zr=(e,t)=>{var i;const r=e._$AN;if(r===void 0)return!1;for(const o of r)(i=o._$AO)==null||i.call(o,t,!1),Zr(o,t);return!0},Zi=e=>{let t,r;do{if((t=e._$AM)===void 0)break;r=t._$AN,r.delete(e),e=t}while((r==null?void 0:r.size)===0)},od=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(r===void 0)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),Sc(t)}};function xc(e){this._$AN!==void 0?(Zi(this),this._$AM=e,od(this)):this._$AM=e}function _c(e,t=!1,r=0){const i=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(i))for(let s=r;s<i.length;s++)Zr(i[s],!1),Zi(i[s]);else i!=null&&(Zr(i,!1),Zi(i));else Zr(this,e)}const Sc=e=>{e.type==rd.CHILD&&(e._$AP??(e._$AP=_c),e._$AQ??(e._$AQ=xc))};class sd extends id{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,r,i){super._$AT(t,r,i),od(this),this.isConnected=t._$AU}_$AO(t,r=!0){var i,o;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(o=this.disconnected)==null||o.call(this)),r&&(Zr(this,t),Zi(this))}setValue(t){if(wc(this._$Ct))this._$Ct._$AI(t,this);else{const r=[...this._$Ct._$AH];r[this._$Ci]=t,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}}/**
|
|
53
53
|
* @license
|
|
54
54
|
* Copyright 2017 Google LLC
|
|
55
55
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
56
|
-
*/let
|
|
56
|
+
*/let Ji=class extends id{constructor(t){if(super(t),this.it=f,t.type!==rd.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===f||t==null)return this._t=void 0,this.it=t;if(t===or)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};Ji.directiveName="unsafeHTML",Ji.resultType=1;const Ds=eo(Ji);/**
|
|
57
57
|
* @license
|
|
58
58
|
* Copyright 2021 Google LLC
|
|
59
59
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
60
|
-
*/let
|
|
60
|
+
*/let nd=class extends Event{constructor(t,r,i,o){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=i,this.subscribe=o??!1}};/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2021 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
* @license
|
|
66
66
|
* Copyright 2021 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
|
-
*/let
|
|
68
|
+
*/let Sn=class{constructor(t,r,i,o){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(s,a)=>{this.unsubscribe&&(this.unsubscribe!==a&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=s,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(s,a)),this.unsubscribe=a},this.host=t,r.context!==void 0){const s=r;this.context=s.context,this.callback=s.callback,this.subscribe=s.subscribe??!1}else this.context=r,this.callback=i,this.subscribe=o??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new nd(this.context,this.host,this.t,this.subscribe))}};/**
|
|
69
69
|
* @license
|
|
70
70
|
* Copyright 2021 Google LLC
|
|
71
71
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
* @license
|
|
74
74
|
* Copyright 2021 Google LLC
|
|
75
75
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
76
|
-
*/let Cc=class extends Event{constructor(t,r){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r}};class
|
|
76
|
+
*/let Cc=class extends Event{constructor(t,r){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r}};class $n extends $c{constructor(t,r,i){var o,s;super(r.context!==void 0?r.initialValue:i),this.onContextRequest=a=>{if(a.context!==this.context)return;const u=a.contextTarget??a.composedPath()[0];u!==this.host&&(a.stopPropagation(),this.addCallback(a.callback,u,a.subscribe))},this.onProviderRequest=a=>{if(a.context!==this.context||(a.contextTarget??a.composedPath()[0])===this.host)return;const u=new Set;for(const[p,{consumerHost:g}]of this.subscriptions)u.has(p)||(u.add(p),g.dispatchEvent(new nd(this.context,g,p,!0)));a.stopPropagation()},this.host=t,r.context!==void 0?this.context=r.context:this.context=r,this.attachListeners(),(s=(o=this.host).addController)==null||s.call(o,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Cc(this.context,this.host))}}/**
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2017 Google LLC
|
|
79
79
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
80
|
-
*/function
|
|
80
|
+
*/function Ce({context:e}){return(t,r)=>{const i=new WeakMap;if(typeof r=="object")return{get(){return t.get.call(this)},set(o){return i.get(this).setValue(o),t.set.call(this,o)},init(o){return i.set(this,new $n(this,{context:e,initialValue:o})),o}};{t.constructor.addInitializer((a=>{i.set(a,new $n(a,{context:e}))}));const o=Object.getOwnPropertyDescriptor(t,r);let s;if(o===void 0){const a=new WeakMap;s={get(){return a.get(this)},set(u){i.get(this).setValue(u),a.set(this,u)},configurable:!0,enumerable:!0}}else{const a=o.set;s={...o,set(u){i.get(this).setValue(u),a==null||a.call(this,u)}}}return void Object.defineProperty(t,r,s)}}}/**
|
|
81
81
|
* @license
|
|
82
82
|
* Copyright 2022 Google LLC
|
|
83
83
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
84
|
-
*/function Ct({context:e,subscribe:t}){return(r,i)=>{typeof i=="object"?i.addInitializer((function(){new
|
|
84
|
+
*/function Ct({context:e,subscribe:t}){return(r,i)=>{typeof i=="object"?i.addInitializer((function(){new Sn(this,{context:e,callback:o=>{r.set.call(this,o)},subscribe:t})})):r.constructor.addInitializer((o=>{new Sn(o,{context:e,callback:s=>{o[i]=s},subscribe:t})}))}}const Ao=new WeakMap,Ec=eo(class extends sd{render(e){return f}update(e,[t]){var i;const r=t!==this.G;return r&&this.G!==void 0&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=(i=e.options)==null?void 0:i.host,this.rt(this.ct=e.element)),f}rt(e){if(this.isConnected||(e=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let r=Ao.get(t);r===void 0&&(r=new WeakMap,Ao.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.ht,void 0),r.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return typeof this.G=="function"?(e=Ao.get(this.ht??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var kc=Object.create,Qi=Object.defineProperty,Rc=Object.getOwnPropertyDescriptor,Oc=Object.getOwnPropertyNames,Ac=Object.getPrototypeOf,Ic=Object.prototype.hasOwnProperty,ad=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tc=(e,t)=>{let r={};for(var i in e)Qi(r,i,{get:e[i],enumerable:!0});return Qi(r,Symbol.toStringTag,{value:"Module"}),r},Lc=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Oc(t),s=0,a=o.length,u;s<a;s++)u=o[s],!Ic.call(e,u)&&u!==r&&Qi(e,u,{get:(p=>t[p]).bind(null,u),enumerable:!(i=Rc(t,u))||i.enumerable});return e},Pc=(e,t,r)=>(r=e==null?{}:kc(Ac(e)),Lc(Qi(r,"default",{value:e,enumerable:!0}),e));function d(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function n(e,t,r,i){var o=arguments.length,s=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var u=e.length-1;u>=0;u--)(a=e[u])&&(s=(o<3?a(s):o>3?a(t,r,s):a(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}var x=class extends v{constructor(){super(),this.customClass="",this.customStyle=""}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class"]}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.mutationObserver)==null||e.disconnect()}removeParentAttributes(){this.getAttributesToRemoveFromParent().forEach(e=>{e==="class"&&this.hasAttribute("class")&&(this.customClass=this.getAttribute("class")||""),e==="style"&&this.hasAttribute("style")&&(this.customStyle=this.getAttribute("style")||""),this.hasAttribute(e)&&this.removeAttribute(e)})}getFilteredAttributes(){let e={};return Array.from(this.attributes).forEach(t=>{this.getAttributesToExclude().includes(t.name)||(e[t.name]=t.value??"")}),e}isCustomPropertySet(e){let t=getComputedStyle(this).getPropertyValue(e).trim();return t!=="inherit"&&t.length>0}applyCustomClass(e,t,r=""){var o,s;let i="";e.some(a=>this.isCustomPropertySet(a))&&(i=r),i&&((s=(o=this.shadowRoot)==null?void 0:o.querySelector(t))==null||s.classList.add(i))}removeDuplicateContent(){var o;let e=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{var a;return s.nodeType===Node.COMMENT_NODE||s.nodeType===Node.TEXT_NODE&&!((a=s.textContent)!=null&&a.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),t=new Map,r=[],i;for(;i=e.nextNode();){let s;if(i.nodeType===Node.TEXT_NODE){let a=(o=i.textContent)==null?void 0:o.trim();if(!a)continue;s=`text:${a}`}else if(i instanceof HTMLElement){let a=Array.from(i.attributes).map(u=>`${u.name}=${u.value}`).sort().join(":");s=`element:${i.tagName}:${a}`}else continue;if(t.has(s)){let a=t.get(s);a&&a.parentNode&&r.push(a),t.set(s,i)}else t.set(s,i)}r.forEach(s=>{s.parentNode&&(console.log("Removing duplicate:",s),s.parentNode.removeChild(s))})}moveLightDomChildrenInto(e,t){let r;if(t&&t.length>0){r=t.filter(i=>this.contains(i)&&i!==e&&!i.contains(e));for(let i of r){let o=Array.from(e.childNodes).find(s=>{var a;return(a=s.isEqualNode)==null?void 0:a.call(s,i)});o&&e.removeChild(o)}}else r=Array.from(this.childNodes).filter(i=>i!==e&&!e.contains(i)&&!i.contains(e));for(let i of r)e.appendChild(i)}normalizeEnum(e,t,r){if(!e)return r;let i=Object.values(t),o=Object.keys(t);return i.includes(e)?e:o.includes(e)?t[e]:r}observeStyleAndClassSync(e){this.mutationObserver=new MutationObserver(t=>{for(let r of t)if(r.type==="attributes"){if(r.attributeName==="style"){let i=this.getAttribute("style")||"";i&&(this.customStyle=i,this.removeAttribute("style"))}if(r.attributeName==="class"){let i=this.getAttribute("class")||"";i&&(e.className=i,this.removeAttribute("class"))}}}),this.mutationObserver.observe(this,{attributes:!0,attributeFilter:["style","class"]})}};n([l({type:String,reflect:!0}),d("design:type",Object)],x.prototype,"customClass",void 0),n([l({type:String,reflect:!0}),d("design:type",Object)],x.prototype,"customStyle",void 0);function Bs(){let e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let r=(e+Math.random()*16)%16|0;return(t=="x"?r:r&3|8).toString(16)})}var Cn=Gl`
|
|
85
85
|
@font-face {
|
|
86
86
|
font-family: 'GeistSans';
|
|
87
87
|
|
|
@@ -2941,7 +2941,7 @@ body {
|
|
|
2941
2941
|
.\\[\\&_svg\\]\\:shrink-0 svg {
|
|
2942
2942
|
flex-shrink: 0;
|
|
2943
2943
|
}
|
|
2944
|
-
`,
|
|
2944
|
+
`,ld=new CSSStyleSheet;ld.replaceSync(Cn.cssText||Cn.toString());var Rr,zc=(Rr=class extends v{constructor(){super()}connectedCallback(){super.connectedCallback(),this.shadowRoot?this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,ld]:console.error("Shadow root not available in ShadowWrapper")}render(){return c`<div><slot></slot></div>`}},Rr.styles=Gl`
|
|
2945
2945
|
:host {
|
|
2946
2946
|
display: block;
|
|
2947
2947
|
border: 2px solid black;
|
|
@@ -2950,21 +2950,21 @@ body {
|
|
|
2950
2950
|
.wrapper {
|
|
2951
2951
|
display: block;
|
|
2952
2952
|
}
|
|
2953
|
-
`,kr);customElements.define("shadow-wrapper",zc);function ad(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=ad(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function ld(){for(var e,t,r=0,i="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ad(e))&&(i&&(i+=" "),i+=t);return i}var Ds="-",jc=e=>{let t=Uc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:o=>{let s=o.split(Ds);return s[0]===""&&s.length!==1&&s.shift(),dd(s,t)||Nc(o)},getConflictingClassGroupIds:(o,s)=>{let a=r[o]||[];return s&&i[o]?[...a,...i[o]]:a}}},dd=(e,t)=>{var a;if(e.length===0)return t.classGroupId;let r=e[0],i=t.nextPart.get(r),o=i?dd(e.slice(1),i):void 0;if(o)return o;if(t.validators.length===0)return;let s=e.join(Ds);return(a=t.validators.find(({validator:u})=>u(s)))==null?void 0:a.classGroupId},$n=/^\[(.+)\]$/,Nc=e=>{if($n.test(e)){let t=$n.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Uc=e=>{let{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return Bc(Object.entries(e.classGroups),r).forEach(([o,s])=>{_s(s,i,o,t)}),i},_s=(e,t,r,i)=>{e.forEach(o=>{if(typeof o=="string"){let s=o===""?t:Cn(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(Dc(o)){_s(o(i),t,r,i);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{_s(a,Cn(t,s),r,i)})})},Cn=(e,t)=>{let r=e;return t.split(Ds).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},Dc=e=>e.isThemeGetter,Bc=(e,t)=>t?e.map(([r,i])=>[r,i.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[t+s,a])):o)]):e,Fc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,i=new Map,o=(s,a)=>{r.set(s,a),t++,t>e&&(t=0,i=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=i.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},cd="!",Mc=e=>{let{separator:t,experimentalParseClassName:r}=e,i=t.length===1,o=t[0],s=t.length,a=u=>{let p=[],g=0,y=0,w;for(let _=0;_<u.length;_++){let E=u[_];if(g===0){if(E===o&&(i||u.slice(_,_+s)===t)){p.push(u.slice(y,_)),y=_+s;continue}if(E==="/"){w=_;continue}}E==="["?g++:E==="]"&&g--}let C=p.length===0?u:u.substring(y),$=C.startsWith(cd);return{modifiers:p,hasImportantModifier:$,baseClassName:$?C.substring(1):C,maybePostfixModifierPosition:w&&w>y?w-y:void 0}};return r?u=>r({className:u,parseClassName:a}):a},qc=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(i=>{i[0]==="["?(t.push(...r.sort(),i),r=[]):r.push(i)}),t.push(...r.sort()),t},Hc=e=>({cache:Fc(e.cacheSize),parseClassName:Mc(e),...jc(e)}),Vc=/\s+/,Wc=(e,t)=>{let{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(Vc),u="";for(let p=a.length-1;p>=0;--p){let g=a[p],{modifiers:y,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:$}=r(g),_=!!$,E=i(_?C.substring(0,$):C);if(!E){if(!_){u=g+(u.length>0?" "+u:u);continue}if(E=i(C),!E){u=g+(u.length>0?" "+u:u);continue}_=!1}let O=qc(y).join(":"),I=w?O+cd:O,T=I+E;if(s.includes(T))continue;s.push(T);let H=o(E,_);for(let M=0;M<H.length;++M){let J=H[M];s.push(I+J)}u=g+(u.length>0?" "+u:u)}return u};function Gc(){let e=0,t,r,i="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ud(t))&&(i&&(i+=" "),i+=r);return i}var ud=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=ud(e[i]))&&(r&&(r+=" "),r+=t);return r};function Kc(e,...t){let r,i,o,s=a;function a(p){return r=Hc(t.reduce((g,y)=>y(g),e())),i=r.cache.get,o=r.cache.set,s=u,u(p)}function u(p){let g=i(p);if(g)return g;let y=Wc(p,r);return o(p,y),y}return function(){return s(Gc.apply(null,arguments))}}var X=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},pd=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yc=/^\d+\/\d+$/,Xc=new Set(["px","full","screen"]),Zc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Qc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qt=e=>_r(e)||Xc.has(e)||Yc.test(e),ne=e=>Or(e,"length",du),_r=e=>!!e&&!Number.isNaN(Number(e)),Oo=e=>Or(e,"number",_r),Nr=e=>!!e&&Number.isInteger(Number(e)),ru=e=>e.endsWith("%")&&_r(e.slice(0,-1)),N=e=>pd.test(e),ae=e=>Zc.test(e),iu=new Set(["length","size","percentage"]),ou=e=>Or(e,iu,hd),su=e=>Or(e,"position",hd),nu=new Set(["image","url"]),au=e=>Or(e,nu,uu),lu=e=>Or(e,"",cu),Ur=()=>!0,Or=(e,t,r)=>{let i=pd.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):r(i[2]):!1},du=e=>Jc.test(e)&&!Qc.test(e),hd=()=>!1,cu=e=>tu.test(e),uu=e=>eu.test(e),pu=Kc(()=>{let e=X("colors"),t=X("spacing"),r=X("blur"),i=X("brightness"),o=X("borderColor"),s=X("borderRadius"),a=X("borderSpacing"),u=X("borderWidth"),p=X("contrast"),g=X("grayscale"),y=X("hueRotate"),w=X("invert"),C=X("gap"),$=X("gradientColorStops"),_=X("gradientColorStopPositions"),E=X("inset"),O=X("margin"),I=X("opacity"),T=X("padding"),H=X("saturate"),M=X("scale"),J=X("sepia"),tt=X("skew"),et=X("space"),D=X("translate"),ct=()=>["auto","contain","none"],jt=()=>["auto","hidden","clip","visible","scroll"],Zt=()=>["auto",N,t],L=()=>[N,t],Ee=()=>["",Qt,ne],Et=()=>["auto",_r,N],Jt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Nt=()=>["solid","dashed","dotted","double","none"],kt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Rt=()=>["start","end","center","between","around","evenly","stretch"],St=()=>["","0",N],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],rt=()=>[_r,N];return{cacheSize:500,separator:":",theme:{colors:[Ur],spacing:[Qt,ne],blur:["none","",ae,N],brightness:rt(),borderColor:[e],borderRadius:["none","","full",ae,N],borderSpacing:L(),borderWidth:Ee(),contrast:rt(),grayscale:St(),hueRotate:rt(),invert:St(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[ru,ne],inset:Zt(),margin:Zt(),opacity:rt(),padding:L(),saturate:rt(),scale:rt(),sepia:St(),skew:rt(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[ae]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Jt(),N]}],overflow:[{overflow:jt()}],"overflow-x":[{"overflow-x":jt()}],"overflow-y":[{"overflow-y":jt()}],overscroll:[{overscroll:ct()}],"overscroll-x":[{"overscroll-x":ct()}],"overscroll-y":[{"overscroll-y":ct()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Nr,N]}],basis:[{basis:Zt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:St()}],shrink:[{shrink:St()}],order:[{order:["first","last","none",Nr,N]}],"grid-cols":[{"grid-cols":[Ur]}],"col-start-end":[{col:["auto",{span:["full",Nr,N]},N]}],"col-start":[{"col-start":Et()}],"col-end":[{"col-end":Et()}],"grid-rows":[{"grid-rows":[Ur]}],"row-start-end":[{row:["auto",{span:[Nr,N]},N]}],"row-start":[{"row-start":Et()}],"row-end":[{"row-end":Et()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...Rt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Rt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Rt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[et]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[et]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,t]}],"min-w":[{"min-w":[N,t,"min","max","fit"]}],"max-w":[{"max-w":[N,t,"none","full","min","max","fit","prose",{screen:[ae]},ae]}],h:[{h:[N,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ae,ne]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Oo]}],"font-family":[{font:[Ur]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",N]}],"line-clamp":[{"line-clamp":["none",_r,Oo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Qt,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[I]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Nt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Qt,ne]}],"underline-offset":[{"underline-offset":["auto",Qt,N]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[I]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Jt(),su]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ou]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},au]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[$]}],"gradient-via":[{via:[$]}],"gradient-to":[{to:[$]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[I]}],"border-style":[{border:[...Nt(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[I]}],"divide-style":[{divide:Nt()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...Nt()]}],"outline-offset":[{"outline-offset":[Qt,N]}],"outline-w":[{outline:[Qt,ne]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[I]}],"ring-offset-w":[{"ring-offset":[Qt,ne]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ae,lu]}],"shadow-color":[{shadow:[Ur]}],opacity:[{opacity:[I]}],"mix-blend":[{"mix-blend":[...kt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":kt()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",ae,N]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[H]}],sepia:[{sepia:[J]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[I]}],"backdrop-saturate":[{"backdrop-saturate":[H]}],"backdrop-sepia":[{"backdrop-sepia":[J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:rt()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:rt()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Nr,N]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[tt]}],"skew-y":[{"skew-y":[tt]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Qt,ne,Oo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function m(...e){return pu(ld(e))}var hu=class extends id{constructor(){super(...arguments),this.prevData={}}render(e){return f}update(e,[t]){var r;this.element!==e.element&&(this.element=e.element),this.host=((r=e.options)==null?void 0:r.host)||this.element,this.apply(t),this.groom(t),this.prevData={...t}}apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let o=e[i];o!==t[i]&&(r[i]=o)}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&(r[i]=void 0)}},gu=class extends hu{constructor(){super(...arguments),this.eventData={}}apply(e){if(e)for(let t in e){let r=e[t];r!==this.eventData[t]&&this.applyEvent(t,r)}}applyEvent(e,t){let{prevData:r,element:i}=this;this.eventData[e]=t,r[e]&&i.removeEventListener(e,this,t),i.addEventListener(e,this,t)}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&this.groomEvent(i,t[i])}groomEvent(e,t){let{element:r}=this;delete this.eventData[e],r.removeEventListener(e,this,t)}handleEvent(e){let t=this.eventData[e.type];typeof t=="function"?t.call(this.host,e):t.handleEvent(e)}disconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),o=e[r];t.removeEventListener(i,this,o)}}reconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),o=e[r];t.addEventListener(i,this,o)}}},pt=to(class extends gu{apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let o=e[i];if(o===t[i])continue;let s=i.slice(1);switch(i[0]){case"@":this.eventData[s]=o,this.applyEvent(s,o);break;case".":r[s]=o;break;case"?":o?r.setAttribute(s,""):r.removeAttribute(s);break;default:o==null?r.removeAttribute(i):r.setAttribute(i,String(o));break}}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t){let o=i.slice(1);if(!e||!(i in e)&&r[o]===t[i])switch(i[0]){case"@":this.groomEvent(o,t[i]);break;case".":r[o]=void 0;break;case"?":r.removeAttribute(o);break;default:r.removeAttribute(i);break}}}}),oi={base:[""],item:["rtg-border-b-accordion-item-width-border rtg-border-b-accordion-item-color-border"],trigger:["rtg-flex rtg-flex-1 rtg-gap-accordion-trigger-space-gap rtg-justify-between rtg-items-start","rtg-py-accordion-trigger-space-py","rtg-w-accordion-trigger-space-w","rtg-rounded-accordion-trigger-radius rtg-outline-none","rtg-text-accordion-trigger-font rtg-font-accordion-trigger-font-weight rtg-text-left","rtg-transition-all","hover:rtg-underline","focus-visible:rtg-border-accordion-trigger-width-border-focus focus-visible:rtg-border-accordion-trigger-color-border-focus","focus-visible:rtg-ring-accordion-trigger-width-ring-focus focus-visible:rtg-ring-accordion-trigger-color-ring-focus","disabled:rtg-pointer-events-none disabled:rtg-opacity-50","[&[data-state=open]>svg]:rtg-rotate-180"],chevron:["rtg-shrink-0","rtg-size-accordion-trigger-icon-space-size","rtg-text-accordion-trigger-icon-color-text","rtg-translate-y-0.5 rtg-transition-transform rtg-duration-200","rtg-pointer-events-none"],content:["rtg-overflow-hidden","rtg-text-accordion-content-font rtg-font-accordion-content-font-weight","data-[state=closed]:rtg-h-accordion-content-space-h-closed","data-[state=closed]:rtg-animate-accordion-content-animate-closed","data-[state=open]:rtg-animate-accordion-content-animate-open","data-[state=open]:rtg-h-fit","[&>div]:rtg-pt-accordion-content-div-space-pt [&>div]:rtg-pb-accordion-content-div-space-pb"]},Ss=class extends x{constructor(...e){super(...e),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof Sr);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof Gt);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var e;return c`
|
|
2953
|
+
`,Rr);customElements.define("shadow-wrapper",zc);function dd(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=dd(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function cd(){for(var e,t,r=0,i="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=dd(e))&&(i&&(i+=" "),i+=t);return i}var Fs="-",jc=e=>{let t=Uc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:o=>{let s=o.split(Fs);return s[0]===""&&s.length!==1&&s.shift(),ud(s,t)||Nc(o)},getConflictingClassGroupIds:(o,s)=>{let a=r[o]||[];return s&&i[o]?[...a,...i[o]]:a}}},ud=(e,t)=>{var a;if(e.length===0)return t.classGroupId;let r=e[0],i=t.nextPart.get(r),o=i?ud(e.slice(1),i):void 0;if(o)return o;if(t.validators.length===0)return;let s=e.join(Fs);return(a=t.validators.find(({validator:u})=>u(s)))==null?void 0:a.classGroupId},En=/^\[(.+)\]$/,Nc=e=>{if(En.test(e)){let t=En.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Uc=e=>{let{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return Bc(Object.entries(e.classGroups),r).forEach(([o,s])=>{Ss(s,i,o,t)}),i},Ss=(e,t,r,i)=>{e.forEach(o=>{if(typeof o=="string"){let s=o===""?t:kn(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(Dc(o)){Ss(o(i),t,r,i);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{Ss(a,kn(t,s),r,i)})})},kn=(e,t)=>{let r=e;return t.split(Fs).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},Dc=e=>e.isThemeGetter,Bc=(e,t)=>t?e.map(([r,i])=>[r,i.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[t+s,a])):o)]):e,Fc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,i=new Map,o=(s,a)=>{r.set(s,a),t++,t>e&&(t=0,i=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=i.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},pd="!",Mc=e=>{let{separator:t,experimentalParseClassName:r}=e,i=t.length===1,o=t[0],s=t.length,a=u=>{let p=[],g=0,y=0,w;for(let _=0;_<u.length;_++){let E=u[_];if(g===0){if(E===o&&(i||u.slice(_,_+s)===t)){p.push(u.slice(y,_)),y=_+s;continue}if(E==="/"){w=_;continue}}E==="["?g++:E==="]"&&g--}let C=p.length===0?u:u.substring(y),$=C.startsWith(pd);return{modifiers:p,hasImportantModifier:$,baseClassName:$?C.substring(1):C,maybePostfixModifierPosition:w&&w>y?w-y:void 0}};return r?u=>r({className:u,parseClassName:a}):a},qc=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(i=>{i[0]==="["?(t.push(...r.sort(),i),r=[]):r.push(i)}),t.push(...r.sort()),t},Hc=e=>({cache:Fc(e.cacheSize),parseClassName:Mc(e),...jc(e)}),Vc=/\s+/,Wc=(e,t)=>{let{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(Vc),u="";for(let p=a.length-1;p>=0;--p){let g=a[p],{modifiers:y,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:$}=r(g),_=!!$,E=i(_?C.substring(0,$):C);if(!E){if(!_){u=g+(u.length>0?" "+u:u);continue}if(E=i(C),!E){u=g+(u.length>0?" "+u:u);continue}_=!1}let A=qc(y).join(":"),I=w?A+pd:A,L=I+E;if(s.includes(L))continue;s.push(L);let H=o(E,_);for(let M=0;M<H.length;++M){let J=H[M];s.push(I+J)}u=g+(u.length>0?" "+u:u)}return u};function Gc(){let e=0,t,r,i="";for(;e<arguments.length;)(t=arguments[e++])&&(r=hd(t))&&(i&&(i+=" "),i+=r);return i}var hd=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=hd(e[i]))&&(r&&(r+=" "),r+=t);return r};function Kc(e,...t){let r,i,o,s=a;function a(p){return r=Hc(t.reduce((g,y)=>y(g),e())),i=r.cache.get,o=r.cache.set,s=u,u(p)}function u(p){let g=i(p);if(g)return g;let y=Wc(p,r);return o(p,y),y}return function(){return s(Gc.apply(null,arguments))}}var X=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},gd=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yc=/^\d+\/\d+$/,Xc=new Set(["px","full","screen"]),Zc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Qc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,te=e=>Sr(e)||Xc.has(e)||Yc.test(e),ae=e=>Ir(e,"length",du),Sr=e=>!!e&&!Number.isNaN(Number(e)),Io=e=>Ir(e,"number",Sr),Ur=e=>!!e&&Number.isInteger(Number(e)),ru=e=>e.endsWith("%")&&Sr(e.slice(0,-1)),N=e=>gd.test(e),le=e=>Zc.test(e),iu=new Set(["length","size","percentage"]),ou=e=>Ir(e,iu,md),su=e=>Ir(e,"position",md),nu=new Set(["image","url"]),au=e=>Ir(e,nu,uu),lu=e=>Ir(e,"",cu),Dr=()=>!0,Ir=(e,t,r)=>{let i=gd.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):r(i[2]):!1},du=e=>Jc.test(e)&&!Qc.test(e),md=()=>!1,cu=e=>tu.test(e),uu=e=>eu.test(e),pu=Kc(()=>{let e=X("colors"),t=X("spacing"),r=X("blur"),i=X("brightness"),o=X("borderColor"),s=X("borderRadius"),a=X("borderSpacing"),u=X("borderWidth"),p=X("contrast"),g=X("grayscale"),y=X("hueRotate"),w=X("invert"),C=X("gap"),$=X("gradientColorStops"),_=X("gradientColorStopPositions"),E=X("inset"),A=X("margin"),I=X("opacity"),L=X("padding"),H=X("saturate"),M=X("scale"),J=X("sepia"),tt=X("skew"),et=X("space"),D=X("translate"),ct=()=>["auto","contain","none"],jt=()=>["auto","hidden","clip","visible","scroll"],Jt=()=>["auto",N,t],T=()=>[N,t],ke=()=>["",te,ae],Et=()=>["auto",Sr,N],Qt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Nt=()=>["solid","dashed","dotted","double","none"],kt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Rt=()=>["start","end","center","between","around","evenly","stretch"],St=()=>["","0",N],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],rt=()=>[Sr,N];return{cacheSize:500,separator:":",theme:{colors:[Dr],spacing:[te,ae],blur:["none","",le,N],brightness:rt(),borderColor:[e],borderRadius:["none","","full",le,N],borderSpacing:T(),borderWidth:ke(),contrast:rt(),grayscale:St(),hueRotate:rt(),invert:St(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[ru,ae],inset:Jt(),margin:Jt(),opacity:rt(),padding:T(),saturate:rt(),scale:rt(),sepia:St(),skew:rt(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[le]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Qt(),N]}],overflow:[{overflow:jt()}],"overflow-x":[{"overflow-x":jt()}],"overflow-y":[{"overflow-y":jt()}],overscroll:[{overscroll:ct()}],"overscroll-x":[{"overscroll-x":ct()}],"overscroll-y":[{"overscroll-y":ct()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ur,N]}],basis:[{basis:Jt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:St()}],shrink:[{shrink:St()}],order:[{order:["first","last","none",Ur,N]}],"grid-cols":[{"grid-cols":[Dr]}],"col-start-end":[{col:["auto",{span:["full",Ur,N]},N]}],"col-start":[{"col-start":Et()}],"col-end":[{"col-end":Et()}],"grid-rows":[{"grid-rows":[Dr]}],"row-start-end":[{row:["auto",{span:[Ur,N]},N]}],"row-start":[{"row-start":Et()}],"row-end":[{"row-end":Et()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...Rt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Rt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Rt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],pe:[{pe:[L]}],pt:[{pt:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],m:[{m:[A]}],mx:[{mx:[A]}],my:[{my:[A]}],ms:[{ms:[A]}],me:[{me:[A]}],mt:[{mt:[A]}],mr:[{mr:[A]}],mb:[{mb:[A]}],ml:[{ml:[A]}],"space-x":[{"space-x":[et]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[et]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,t]}],"min-w":[{"min-w":[N,t,"min","max","fit"]}],"max-w":[{"max-w":[N,t,"none","full","min","max","fit","prose",{screen:[le]},le]}],h:[{h:[N,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,t,"auto","min","max","fit"]}],"font-size":[{text:["base",le,ae]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Io]}],"font-family":[{font:[Dr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",N]}],"line-clamp":[{"line-clamp":["none",Sr,Io]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",te,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[I]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Nt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",te,ae]}],"underline-offset":[{"underline-offset":["auto",te,N]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[I]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Qt(),su]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ou]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},au]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[$]}],"gradient-via":[{via:[$]}],"gradient-to":[{to:[$]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[I]}],"border-style":[{border:[...Nt(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[I]}],"divide-style":[{divide:Nt()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...Nt()]}],"outline-offset":[{"outline-offset":[te,N]}],"outline-w":[{outline:[te,ae]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ke()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[I]}],"ring-offset-w":[{"ring-offset":[te,ae]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",le,lu]}],"shadow-color":[{shadow:[Dr]}],opacity:[{opacity:[I]}],"mix-blend":[{"mix-blend":[...kt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":kt()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",le,N]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[H]}],sepia:[{sepia:[J]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[I]}],"backdrop-saturate":[{"backdrop-saturate":[H]}],"backdrop-sepia":[{"backdrop-sepia":[J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:rt()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:rt()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Ur,N]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[tt]}],"skew-y":[{"skew-y":[tt]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[te,ae,Io]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function m(...e){return pu(cd(e))}var hu=class extends sd{constructor(){super(...arguments),this.prevData={}}render(e){return f}update(e,[t]){var r;this.element!==e.element&&(this.element=e.element),this.host=((r=e.options)==null?void 0:r.host)||this.element,this.apply(t),this.groom(t),this.prevData={...t}}apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let o=e[i];o!==t[i]&&(r[i]=o)}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&(r[i]=void 0)}},gu=class extends hu{constructor(){super(...arguments),this.eventData={}}apply(e){if(e)for(let t in e){let r=e[t];r!==this.eventData[t]&&this.applyEvent(t,r)}}applyEvent(e,t){let{prevData:r,element:i}=this;this.eventData[e]=t,r[e]&&i.removeEventListener(e,this,t),i.addEventListener(e,this,t)}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&this.groomEvent(i,t[i])}groomEvent(e,t){let{element:r}=this;delete this.eventData[e],r.removeEventListener(e,this,t)}handleEvent(e){let t=this.eventData[e.type];typeof t=="function"?t.call(this.host,e):t.handleEvent(e)}disconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),o=e[r];t.removeEventListener(i,this,o)}}reconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),o=e[r];t.addEventListener(i,this,o)}}},pt=eo(class extends gu{apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let o=e[i];if(o===t[i])continue;let s=i.slice(1);switch(i[0]){case"@":this.eventData[s]=o,this.applyEvent(s,o);break;case".":r[s]=o;break;case"?":o?r.setAttribute(s,""):r.removeAttribute(s);break;default:o==null?r.removeAttribute(i):r.setAttribute(i,String(o));break}}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t){let o=i.slice(1);if(!e||!(i in e)&&r[o]===t[i])switch(i[0]){case"@":this.groomEvent(o,t[i]);break;case".":r[o]=void 0;break;case"?":r.removeAttribute(o);break;default:r.removeAttribute(i);break}}}}),si={base:[""],item:["rtg-border-b-accordion-item-width-border rtg-border-b-accordion-item-color-border"],trigger:["rtg-flex rtg-flex-1 rtg-gap-accordion-trigger-space-gap rtg-justify-between rtg-items-start","rtg-py-accordion-trigger-space-py","rtg-w-accordion-trigger-space-w","rtg-rounded-accordion-trigger-radius rtg-outline-none","rtg-text-accordion-trigger-font rtg-font-accordion-trigger-font-weight rtg-text-left","rtg-transition-all","hover:rtg-underline","focus-visible:rtg-border-accordion-trigger-width-border-focus focus-visible:rtg-border-accordion-trigger-color-border-focus","focus-visible:rtg-ring-accordion-trigger-width-ring-focus focus-visible:rtg-ring-accordion-trigger-color-ring-focus","disabled:rtg-pointer-events-none disabled:rtg-opacity-50","[&[data-state=open]>svg]:rtg-rotate-180"],chevron:["rtg-shrink-0","rtg-size-accordion-trigger-icon-space-size","rtg-text-accordion-trigger-icon-color-text","rtg-translate-y-0.5 rtg-transition-transform rtg-duration-200","rtg-pointer-events-none"],content:["rtg-overflow-hidden","rtg-text-accordion-content-font rtg-font-accordion-content-font-weight","data-[state=closed]:rtg-h-accordion-content-space-h-closed","data-[state=closed]:rtg-animate-accordion-content-animate-closed","data-[state=open]:rtg-animate-accordion-content-animate-open","data-[state=open]:rtg-h-fit","[&>div]:rtg-pt-accordion-content-div-space-pt [&>div]:rtg-pb-accordion-content-div-space-pb"]},$s=class extends x{constructor(...e){super(...e),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof $r);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof Kt);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var e;return c`
|
|
2954
2954
|
<div
|
|
2955
2955
|
part="accordion-content"
|
|
2956
2956
|
role="region"
|
|
2957
2957
|
data-state=${this.hasActiveState()?"open":"closed"}
|
|
2958
2958
|
data-orientation="vertical"
|
|
2959
|
-
class=${m(
|
|
2959
|
+
class=${m(si.content,this.className)}
|
|
2960
2960
|
@click=${t=>t.stopPropagation()}
|
|
2961
2961
|
>
|
|
2962
|
-
<div>${
|
|
2962
|
+
<div>${Ds(((e=this.textContent)==null?void 0:e.trim())||"")}</div>
|
|
2963
2963
|
</div>
|
|
2964
|
-
`}}
|
|
2964
|
+
`}};$s=n([h("rtg-accordion-content")],$s);var Kt=class extends x{constructor(...e){super(...e),this.value="",this.tabindex=0,this._initialChildren=[],this._onClick=t=>{let r=t.target.closest("rtg-accordion-trigger");!r||!this._accordion||(t.preventDefault(),t.stopPropagation(),this._accordion.raiseEvent(this.value),r.requestUpdate(),setTimeout(()=>this.requestUpdate(),0))},this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof $r);)e=e.parentElement;return e}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._initialChildren=this.filterChildren(),this.addEventListener("click",this._onClick),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeEventListener("click",this._onClick),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}filterChildren(){return Array.from(this.children).filter(e=>e instanceof Cs||e instanceof $s)}render(){var r;let e=(r=this._accordion)==null?void 0:r.selectedItems.includes(this.value),t=this._initialChildren.length?this._initialChildren:this.filterChildren();return c`
|
|
2965
2965
|
<div
|
|
2966
2966
|
data-state=${e?"open":"closed"}
|
|
2967
|
-
class="${m(
|
|
2967
|
+
class="${m(si.item,this.className)}"
|
|
2968
2968
|
value=${this.value}
|
|
2969
2969
|
role="tablist"
|
|
2970
2970
|
data-orientation="vertical"
|
|
@@ -2972,7 +2972,7 @@ body {
|
|
|
2972
2972
|
>
|
|
2973
2973
|
${t}
|
|
2974
2974
|
</div>
|
|
2975
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
2975
|
+
`}};n([l({type:String}),d("design:type",Object)],Kt.prototype,"value",void 0),n([l({type:Number}),d("design:type",Object)],Kt.prototype,"tabindex",void 0),Kt=n([h("rtg-accordion-item")],Kt);var Cs=class extends x{get _item(){let e=this.parentElement;for(;e&&!(e instanceof Kt);)e=e.parentElement;return e}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof $r);)e=e.parentElement;return e}getAttributesToExclude(){return["value","defaultValue"]}createRenderRoot(){return this}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var t;let e=this.hasActiveState();return c`
|
|
2976
2976
|
<button
|
|
2977
2977
|
type="button"
|
|
2978
2978
|
part="accordion-trigger"
|
|
@@ -2981,12 +2981,12 @@ body {
|
|
|
2981
2981
|
aria-selected=${e}
|
|
2982
2982
|
aria-expanded=${e}
|
|
2983
2983
|
data-state=${e?"open":"closed"}
|
|
2984
|
-
class="${m(
|
|
2984
|
+
class="${m(si.trigger,this.className)}"
|
|
2985
2985
|
tabindex="-1"
|
|
2986
2986
|
data-orientation="horizontal"
|
|
2987
2987
|
data-radix-collection-item
|
|
2988
2988
|
>
|
|
2989
|
-
${
|
|
2989
|
+
${Ds(this.textContent||"")}
|
|
2990
2990
|
|
|
2991
2991
|
<svg
|
|
2992
2992
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -2996,23 +2996,23 @@ body {
|
|
|
2996
2996
|
stroke-width="2"
|
|
2997
2997
|
stroke-linecap="round"
|
|
2998
2998
|
stroke-linejoin="round"
|
|
2999
|
-
class=${m(
|
|
2999
|
+
class=${m(si.chevron,"lucide lucide-chevron-down-icon lucide-chevron-down")}
|
|
3000
3000
|
>
|
|
3001
3001
|
<path d="m6 9 6 6 6-6" />
|
|
3002
3002
|
</svg>
|
|
3003
3003
|
</button>
|
|
3004
|
-
`}}
|
|
3004
|
+
`}};Cs=n([h("rtg-accordion-trigger")],Cs);var ve=(function(e){return e.MULTIPLE="multiple",e.SINGLE="single",e})({}),Rn,$r=class extends x{constructor(...e){super(...e),this.type=ve.MULTIPLE,this.selectedItems=[],this._initialChildren=[]}getAttributesToExclude(){return["variant","data-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._initialChildren=Array.from(this.children).filter(e=>e instanceof Kt)}willUpdate(e){e.has("type")&&(this.type===ve.SINGLE&&this.selectedItems.length>1&&(this.selectedItems=this.selectedItems.slice(0,1)),this._initialChildren.forEach(t=>{t instanceof Kt&&t.requestUpdate()}))}updated(e){e.has("type")&&this._initialChildren.forEach(t=>{t instanceof Kt&&t.requestUpdate()})}setSelectedItems(e){let t=this.selectedItems.indexOf(e);if(t>-1)if(this.type===ve.SINGLE)this.selectedItems=[];else if(this.type===ve.MULTIPLE)this.selectedItems.splice(t,1);else throw Error("Invalid accordion type");else if(this.type===ve.SINGLE)this.selectedItems=[e];else if(this.type===ve.MULTIPLE)this.selectedItems.push(e);else throw Error("Invalid accordion type")}raiseEvent(e){this.setSelectedItems(e),this.dispatchEvent(new CustomEvent("clicked-accordion",{bubbles:!0,composed:!0,detail:{selectedItems:this.selectedItems}}))}render(){let e=this._initialChildren.length?this._initialChildren:Array.from(this.children).filter(t=>t instanceof Kt);return c`
|
|
3005
3005
|
<div
|
|
3006
3006
|
data-orientation="vertical"
|
|
3007
3007
|
${pt(this.getFilteredAttributes())}
|
|
3008
3008
|
part="accordion"
|
|
3009
|
-
class="${m(
|
|
3009
|
+
class="${m(si.base,this.className)}"
|
|
3010
3010
|
>
|
|
3011
3011
|
${e}
|
|
3012
3012
|
</div>
|
|
3013
|
-
`}};n([l({type:String}),d("design:type",typeof(
|
|
3014
|
-
<div class="${m("aspect-ratio",
|
|
3015
|
-
`}};n([l({type:Number,reflect:!0}),d("design:type",Object)],Lo.prototype,"ratio",void 0),Lo=n([h("rtg-aspect-ratio")],Lo);var
|
|
3013
|
+
`}};n([l({type:String}),d("design:type",typeof(Rn=ve!==void 0&&ve)=="function"?Rn:Object)],$r.prototype,"type",void 0),$r=n([h("rtg-accordion")],$r);var To=class extends v{constructor(...e){super(...e),this.variant="default"}get _rootSlot(){return this.querySelector('[data-slot="alert"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<div data-slot="alert" data-variant=${this.variant}></div>`}};n([l({type:String}),d("design:type",Object)],To.prototype,"variant",void 0),To=n([h("rtg-alert")],To);var On=class extends v{get _titleSlot(){return this.querySelector('[data-slot="alert-title"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._titleSlot&&((r=this._titleSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<div data-slot="alert-title"></div>`}};On=n([h("rtg-alert-title")],On);var An=class extends v{get _descriptionSlot(){return this.querySelector('[data-slot="alert-description"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._descriptionSlot&&((r=this._descriptionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<div data-slot="alert-description"></div>`}};An=n([h("rtg-alert-description")],An);var In=class extends v{get _actionSlot(){return this.querySelector('[data-slot="alert-action"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._actionSlot&&((r=this._actionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<div data-slot="alert-action"></div>`}};In=n([h("rtg-alert-action")],In);var Tn={host:["rtg-block rtg-relative rtg-w-full"],self:["rtg-absolute rtg-inset-0"]},Lo=class extends v{constructor(...e){super(...e),this.ratio=1/1,this._userClass="",this._userStyle=""}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._userClass=this.getAttribute("class")??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=m(this.className,Tn.host)}updated(e){e.has("ratio")&&(this.style.paddingBottom=this.ratio>0?`${100/this.ratio}%`:"0%")}firstUpdated(){var t;this.style.paddingBottom=this.ratio>0?`${100/this.ratio}%`:"0%";let e=this.querySelector(".aspect-ratio");if(e){if(this._userClass&&(e.className=m(e.className,this._userClass)),this._userStyle){let r=(t=e.getAttribute("style"))==null?void 0:t.trim(),i=this._userStyle.trim();e.setAttribute("style",[r,i].filter(Boolean).join("; "))}Array.from(this.childNodes).forEach(r=>{r!==e&&e.appendChild(r)})}}render(){return c`
|
|
3014
|
+
<div class="${m("aspect-ratio",Tn.self)}"></div>
|
|
3015
|
+
`}};n([l({type:Number,reflect:!0}),d("design:type",Object)],Lo.prototype,"ratio",void 0),Lo=n([h("rtg-aspect-ratio")],Lo);var Br=class extends v{constructor(...e){super(...e),this.size="default",this._imageLoaded=!1,this._imageError=!1}get _rootSlot(){return this.querySelector('[data-slot="avatar"]')}get _avatarImageChild(){return this.querySelector("rtg-avatar-image")}get _avatarFallbackChild(){return this.querySelector("rtg-avatar-fallback")}_syncChildren(){let e=this._imageError||!this._imageLoaded;this._avatarImageChild&&(this._avatarImageChild.style.display=e?"none":""),this._avatarFallbackChild&&(this._avatarFallbackChild.style.display=e?"":"none")}_onImageLoad(){this._imageLoaded=!0,this._imageError=!1,this._syncChildren()}_onImageError(){this._imageLoaded=!1,this._imageError=!0,this._syncChildren()}connectedCallback(){super.connectedCallback(),this.addEventListener("rtg-avatar:image-load",this._onImageLoad),this.addEventListener("rtg-avatar:image-error",this._onImageError)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("rtg-avatar:image-load",this._onImageLoad),this.removeEventListener("rtg-avatar:image-error",this._onImageError)}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<span data-slot="avatar" data-size=${this.size}></span>`}};n([l({type:String}),d("design:type",Object)],Br.prototype,"size",void 0),n([k(),d("design:type",Object)],Br.prototype,"_imageLoaded",void 0),n([k(),d("design:type",Object)],Br.prototype,"_imageError",void 0),Br=n([h("rtg-avatar")],Br);var ci=class extends v{_onLoad(){this.dispatchEvent(new CustomEvent("rtg-avatar:image-load",{bubbles:!0,composed:!0}))}_onError(){this.dispatchEvent(new CustomEvent("rtg-avatar:image-error",{bubbles:!0,composed:!0}))}createRenderRoot(){return this}render(){return c`
|
|
3016
3016
|
<img
|
|
3017
3017
|
data-slot="avatar-image"
|
|
3018
3018
|
src=${this.src??""}
|
|
@@ -3020,7 +3020,7 @@ body {
|
|
|
3020
3020
|
@load=${this._onLoad}
|
|
3021
3021
|
@error=${this._onError}
|
|
3022
3022
|
/>
|
|
3023
|
-
`}};n([l({type:String}),d("design:type",String)],
|
|
3023
|
+
`}};n([l({type:String}),d("design:type",String)],ci.prototype,"src",void 0),n([l({type:String}),d("design:type",String)],ci.prototype,"alt",void 0),ci=n([h("rtg-avatar-image")],ci);var Ln=class extends v{get _fallbackSlot(){return this.querySelector('[data-slot="avatar-fallback"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._fallbackSlot&&((r=this._fallbackSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<span data-slot="avatar-fallback"></span>`}};Ln=n([h("rtg-avatar-fallback")],Ln);var Pn=class extends v{get _badgeSlot(){return this.querySelector('[data-slot="avatar-badge"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._badgeSlot&&((r=this._badgeSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<span data-slot="avatar-badge"></span>`}};Pn=n([h("rtg-avatar-badge")],Pn);var zn=class extends v{get _groupSlot(){return this.querySelector('[data-slot="avatar-group"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._groupSlot&&((r=this._groupSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<div data-slot="avatar-group"></div>`}};zn=n([h("rtg-avatar-group")],zn);var jn=class extends v{get _groupCountSlot(){return this.querySelector('[data-slot="avatar-group-count"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._groupCountSlot&&((r=this._groupCountSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<div data-slot="avatar-group-count"></div>`}};jn=n([h("rtg-avatar-group-count")],jn);var gr=class extends v{constructor(...e){super(...e),this.variant="default"}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="badge"]')}firstUpdated(){let e=this._rootSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return this.href?c`
|
|
3024
3024
|
<a
|
|
3025
3025
|
data-slot="badge"
|
|
3026
3026
|
data-variant=${this.variant}
|
|
@@ -3036,13 +3036,13 @@ body {
|
|
|
3036
3036
|
aria-label=${this.ariaLabel??f}
|
|
3037
3037
|
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":f}
|
|
3038
3038
|
></span>
|
|
3039
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
3039
|
+
`}};n([l({type:String}),d("design:type",Object)],gr.prototype,"variant",void 0),n([l({type:Boolean}),d("design:type",Boolean)],gr.prototype,"invalid",void 0),n([l({type:String}),d("design:type",String)],gr.prototype,"href",void 0),n([l({type:String}),d("design:type",Object)],gr.prototype,"target",void 0),gr=n([h("rtg-badge")],gr);var Tr={list:["rtg-flex rtg-flex-wrap rtg-gap-breadcrumb-list-space-gap-sm sm:rtg-gap-breadcrumb-list-space-gap rtg-items-center","rtg-text-breadcrumb-list-font rtg-font-breadcrumb-list-font-weight rtg-text-breadcrumb-list-color-text rtg-break-words"],item:["rtg-inline-flex rtg-gap-breadcrumb-item-space-gap rtg-items-center"],link:["rtg-transition-colors","hover:rtg-text-breadcrumb-link-color-text-hover"],page:["rtg-font-breadcrumb-page-font-weight rtg-text-breadcrumb-page-color-text"],separator:["[&>svg]:rtg-size-breadcrumb-separator-icon-space-size"],ellipsis:["rtg-flex rtg-justify-center rtg-items-center","rtg-size-breadcrumb-ellipsis-space-size","[&>svg]:rtg-size-breadcrumb-ellipsis-icon-space-size"]},Nn=class extends x{getAttributesToExclude(){return[""]}createRenderRoot(){return this}render(){return c`
|
|
3040
3040
|
<span
|
|
3041
3041
|
${pt(this.getFilteredAttributes())}
|
|
3042
3042
|
id="rtg-bread-crumb-ellipsis"
|
|
3043
3043
|
role="presentation"
|
|
3044
3044
|
aria-hidden="true"
|
|
3045
|
-
class="${m(
|
|
3045
|
+
class="${m(Tr.ellipsis,this.className)}"
|
|
3046
3046
|
part="breadcrumb-ellipsis"
|
|
3047
3047
|
>
|
|
3048
3048
|
<svg
|
|
@@ -3060,36 +3060,36 @@ body {
|
|
|
3060
3060
|
<circle cx="5" cy="12" r="1" />
|
|
3061
3061
|
</svg>
|
|
3062
3062
|
</span>
|
|
3063
|
-
`}};
|
|
3063
|
+
`}};Nn=n([h("rtg-bread-crumb-ellipsis")],Nn);var Un=class extends x{get _containerElement(){return this.querySelector("li[part=breadcrumb-item]")}getAttributesToExclude(){return["variant"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3064
3064
|
<li
|
|
3065
3065
|
${pt(this.getFilteredAttributes())}
|
|
3066
3066
|
id="rtg-bread-crumb-item"
|
|
3067
|
-
class="${m(
|
|
3067
|
+
class="${m(Tr.item,this.className)}"
|
|
3068
3068
|
part="breadcrumb-item"
|
|
3069
3069
|
></li>
|
|
3070
|
-
`}};
|
|
3070
|
+
`}};Un=n([h("rtg-bread-crumb-item")],Un);var Po=class extends x{constructor(...e){super(...e),this.href="/"}get _containerElement(){return this.querySelector("a[part=breadcrumb-link]")}getAttributesToExclude(){return[""]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3071
3071
|
<a
|
|
3072
3072
|
${pt(this.getFilteredAttributes())}
|
|
3073
3073
|
id="rtg-bread-crumb-link"
|
|
3074
|
-
class="${m(
|
|
3074
|
+
class="${m(Tr.link,this.className)}"
|
|
3075
3075
|
href="${this.href}"
|
|
3076
3076
|
part="breadcrumb-link"
|
|
3077
3077
|
>
|
|
3078
3078
|
</a>
|
|
3079
|
-
`}};n([l({type:String}),d("design:type",String)],
|
|
3079
|
+
`}};n([l({type:String}),d("design:type",String)],Po.prototype,"href",void 0),Po=n([h("rtg-bread-crumb-link")],Po);var Dn=class extends x{get _containerElement(){return this.querySelector("ol[part=breadcrumb-list]")}getAttributesToExclude(){return["variant"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3080
3080
|
<ol
|
|
3081
3081
|
${pt(this.getFilteredAttributes())}
|
|
3082
3082
|
id="rtg-bread-crumb-list"
|
|
3083
|
-
class="${m(
|
|
3083
|
+
class="${m(Tr.list,this.className)}"
|
|
3084
3084
|
part="breadcrumb-list"
|
|
3085
3085
|
></ol>
|
|
3086
|
-
`}};
|
|
3086
|
+
`}};Dn=n([h("rtg-bread-crumb-list")],Dn);var Bn=class extends x{getAttributesToExclude(){return[""]}createRenderRoot(){return this}render(){return c`
|
|
3087
3087
|
<li
|
|
3088
3088
|
${pt(this.getFilteredAttributes())}
|
|
3089
3089
|
id="rtg-bread-crumb-separator"
|
|
3090
3090
|
role="presentation"
|
|
3091
3091
|
aria-hidden="true"
|
|
3092
|
-
class="${m(
|
|
3092
|
+
class="${m(Tr.separator,this.className)}"
|
|
3093
3093
|
part="breadcrumb-separator"
|
|
3094
3094
|
>
|
|
3095
3095
|
<svg
|
|
@@ -3105,24 +3105,24 @@ body {
|
|
|
3105
3105
|
<path d="m9 18 6-6-6-6" />
|
|
3106
3106
|
</svg>
|
|
3107
3107
|
</li>
|
|
3108
|
-
`}};
|
|
3108
|
+
`}};Bn=n([h("rtg-bread-crumb-separator")],Bn);var Fn=class extends x{get _containerElement(){return this.querySelector("span[part=breadcrumb-text]")}getAttributesToExclude(){return[""]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3109
3109
|
<span
|
|
3110
3110
|
${pt(this.getFilteredAttributes())}
|
|
3111
3111
|
id="rtg-bread-crumb-text"
|
|
3112
3112
|
aria-disabled="true"
|
|
3113
3113
|
aria-current="page"
|
|
3114
|
-
class="${m(
|
|
3114
|
+
class="${m(Tr.page,this.className)}"
|
|
3115
3115
|
part="breadcrumb-text"
|
|
3116
3116
|
>
|
|
3117
3117
|
</span>
|
|
3118
|
-
`}};
|
|
3118
|
+
`}};Fn=n([h("rtg-bread-crumb-text")],Fn);var Mn=class extends x{get _containerElement(){return this.querySelector("nav[part=breadcrumb]")}getAttributesToExclude(){return[""]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3119
3119
|
<nav
|
|
3120
3120
|
${pt(this.getFilteredAttributes())}
|
|
3121
3121
|
part="breadcrumb"
|
|
3122
3122
|
class="${m(this.className)}"
|
|
3123
3123
|
aria-label="breadcrumb"
|
|
3124
3124
|
></nav>
|
|
3125
|
-
`}};
|
|
3125
|
+
`}};Mn=n([h("rtg-bread-crumb")],Mn);var Ut=class extends v{constructor(...e){super(...e),this.variant="default",this.size="default",this.type="button"}get _rootSlot(){return this.querySelector('[data-slot="button"]')}_handleClick(e){this.onClick&&this.onClick(e)}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return this.href?c`
|
|
3126
3126
|
<a
|
|
3127
3127
|
data-slot="button"
|
|
3128
3128
|
data-variant=${this.variant}
|
|
@@ -3145,7 +3145,7 @@ body {
|
|
|
3145
3145
|
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":f}
|
|
3146
3146
|
@click=${this._handleClick}
|
|
3147
3147
|
></button>
|
|
3148
|
-
`}};n([l({type:String}),d("design:type",Object)],Ut.prototype,"variant",void 0),n([l({type:String}),d("design:type",Object)],Ut.prototype,"size",void 0),n([l({type:String}),d("design:type",Object)],Ut.prototype,"type",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Ut.prototype,"disabled",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Ut.prototype,"invalid",void 0),n([l({type:String}),d("design:type",String)],Ut.prototype,"href",void 0),n([l({type:String}),d("design:type",Object)],Ut.prototype,"target",void 0),n([l({attribute:!1,type:Function}),d("design:type",Function)],Ut.prototype,"onClick",void 0),Ut=n([h("rtg-button")],Ut);var mu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function bu(e){let t=e%100;if(t>=11&&t<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function fu(e){let t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),r=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),i=e.getDate(),o=e.getFullYear();return`${t}, ${r} ${i}${bu(i)}, ${o}`}var Fn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Mn=ld,Bs=(e,t)=>r=>{var u;if((t==null?void 0:t.variants)==null)return Mn(e,r==null?void 0:r.class,r==null?void 0:r.className);let{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(p=>{let g=r==null?void 0:r[p],y=o==null?void 0:o[p];if(g===null)return null;let w=Fn(g)||Fn(y);return i[p][w]}),a=r&&Object.entries(r).reduce((p,g)=>{let[y,w]=g;return w===void 0||(p[y]=w),p},{});return Mn(e,s,(u=t==null?void 0:t.compoundVariants)==null?void 0:u.reduce((p,g)=>{let{class:y,className:w,...C}=g;return Object.entries(C).every($=>{let[_,E]=$;return Array.isArray(E)?E.includes({...o,...a}[_]):{...o,...a}[_]===E})?[...p,y,w]:p},[]),r==null?void 0:r.class,r==null?void 0:r.className)},Zr=Bs(["rtg-inline-flex rtg-items-center rtg-justify-center rtg-shrink-0","rtg-text-button-font-size rtg-font-button-font-weight rtg-whitespace-nowrap","rtg-rounded-button-radius rtg-outline-none","rtg-transition-all","disabled:rtg-opacity-button-opacity-disabled disabled:rtg-pointer-events-none","focus-visible:rtg-border-button-width-border-focus focus-visible:rtg-border-button-color-border-focus focus-visible:rtg-ring-button-width-ring-focus","aria-invalid:rtg-border-button-width-border-invalid aria-invalid:rtg-border-button-color-border-invalid","aria-invalid:rtg-ring-button-width-ring-invalid aria-invalid:rtg-ring-button-color-ring-invalid",'[&_svg]:rtg-pointer-events-none [&_svg:not([class*="rtg-size-"])]:rtg-size-button-icon-space-size [&_svg]:rtg-shrink-0'],{variants:{variant:{default:["rtg-bg-button-default-color-bg rtg-text-button-default-color-text","hover:rtg-bg-button-default-color-bg-hover","focus-visible:rtg-ring-button-default-color-ring-focus"],destructive:["rtg-bg-button-destructive-color-bg rtg-text-button-destructive-color-text","hover:rtg-bg-button-destructive-color-bg-hover","focus-visible:rtg-ring-button-destructive-color-ring-focus"],outline:["rtg-bg-button-outline-color-bg","rtg-border-button-outline-width-border rtg-border-button-outline-color-border","hover:rtg-bg-button-outline-color-bg-hover hover:rtg-text-button-outline-color-text-hover","focus-visible:rtg-ring-button-outline-color-ring-focus"],secondary:["rtg-bg-button-secondary-color-bg rtg-text-button-secondary-color-text","hover:rtg-bg-button-secondary-color-bg-hover","focus-visible:rtg-ring-button-secondary-color-ring-focus"],ghost:["hover:rtg-bg-button-ghost-color-bg-hover hover:rtg-text-button-ghost-color-text-hover","focus-visible:rtg-ring-button-ghost-color-ring-focus"],link:["rtg-text-button-link-color-text rtg-underline-offset-4","hover:rtg-underline","focus-visible:rtg-ring-button-link-color-ring-focus"]},size:{default:["rtg-h-button-space-h-default","rtg-gap-button-space-gap-default rtg-px-button-space-px-default rtg-py-button-space-py-default","has-[>svg]:rtg-px-button-space-px-default-has-icon"],sm:["rtg-h-button-space-h-sm","rtg-gap-button-space-gap-sm rtg-px-button-space-px-sm","has-[>svg]:rtg-px-button-space-px-sm-has-icon"],lg:["rtg-h-button-space-h-lg","rtg-gap-button-space-gap-lg rtg-px-button-space-px-lg","has-[>svg]:rtg-px-button-space-px-lg-has-icon"],icon:"rtg-size-button-space-size-icon","icon-sm":"rtg-size-button-space-size-icon-sm","icon-lg":"rtg-size-button-space-size-icon-lg"}},defaultVariants:{variant:"default",size:"default"}}),q={host:["rtg-contents"],root:["group/calendar","rtg-relative","rtg-p-calendar-space-p","rtg-w-fit","rtg-bg-calendar-color-bg"],months:["rtg-flex rtg-relative","rtg-flex-col md:rtg-flex-row rtg-gap-calendar-months-space-gap"],nav:["rtg-flex rtg-absolute rtg-top-0 rtg-inset-x-0","rtg-gap-calendar-nav-space-gap rtg-justify-between rtg-items-center","rtg-w-full"],month:["rtg-flex","rtg-flex-col rtg-gap-calendar-month-space-gap","rtg-w-full"],buttonPrevious:[m(Zr({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-previous-opacity-disabled"],buttonNext:[m(Zr({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-next-opacity-disabled"],chevron:["rtg-size-calendar-chevron-space-size"],monthCaption:["rtg-flex rtg-justify-center rtg-items-center","rtg-px-calendar-month-caption-space-px","rtg-w-full rtg-h-calendar-month-caption-space-h"],captionLabel:["rtg-text-calendar-caption-label-font rtg-font-calendar-caption-label-font-weight","rtg-select-none"],monthGrid:["rtg-w-full","rtg-border-collapse"],weekdays:["rtg-flex"],weekday:["rtg-flex-1","rtg-text-calendar-weekday-font rtg-font-calendar-weekday-font-weight rtg-text-calendar-weekday-color-text","rtg-rounded-calendar-weekday-radius","rtg-select-none"],weeks:[""],week:["rtg-flex","rtg-mt-calendar-week-space-mt","rtg-w-full"],day:{base:["group/day","rtg-aspect-square rtg-relative","rtg-w-full rtg-h-full","rtg-p-calendar-day-space-p","rtg-text-center","rtg-select-none"],today:["rtg-bg-calendar-day-today-color-bg","rtg-rounded-calendar-day-radius"],selected:{common:["rtg-bg-calendar-day-color-bg-selected"],single:["rtg-rounded-calendar-day-radius"],range:{start:["rtg-rounded-l-calendar-day-radius"],middle:["rtg-rounded-none"],end:["rtg-rounded-r-calendar-day-radius"]}},index:{first:["rtg-rounded-l-calendar-day-radius"],last:["rtg-rounded-r-calendar-day-radius"]}},dayButton:{base:[Zr({variant:"ghost",size:"icon"}),"rtg-aspect-square rtg-flex","rtg-flex-col rtg-gap-calendar-day-button-space-gap","rtg-size-auto rtg-w-full rtg-min-w-calendar-day-button-space-min-w","rtg-text-calendar-day-button-font rtg-font-calendar-day-button-font-weight","disabled:rtg-text-calendar-day-button-color-text-disabled disabled:rtg-opacity-calendar-day-button-opacity-disabled","data-[selected-single=true]:rtg-text-calendar-day-button-color-text-single-selected data-[selected-single=true]:rtg-bg-calendar-day-button-color-bg-single-selected","data-[range-start=true]:rtg-text-calendar-day-button-color-text-range-start data-[range-start=true]:rtg-bg-calendar-day-button-color-bg-range-start","data-[range-middle=true]:rtg-text-calendar-day-button-color-text-range-middle data-[range-middle=true]:rtg-bg-calendar-day-button-color-bg-range-middle","data-[range-end=true]:rtg-text-calendar-day-button-color-text-range-end data-[range-end=true]:rtg-bg-calendar-day-button-color-bg-range-end","[&>span]:rtg-text-calendar-day-button-span-font [&>span]:rtg-opacity-calendar-day-button-span-opacity","group-data-[focused=true]/day:rtg-relative group-data-[focused=true]/day:rtg-z-10","group-data-[focused=true]/day:rtg-border-calendar-day-width-border-focus group-data-[focused=true]/day:rtg-border-calendar-day-color-border-focus","group-data-[focused=true]/day:rtg-ring-calendar-day-width-ring-focus group-data-[focused=true]/day:rtg-ring-calendar-day-color-ring-focus"],outside:["rtg-text-calendar-day-button-outside-color-text"],today:["rtg-text-calendar-day-button-today-color-text","rtg-bg-calendar-day-button-today-color-bg"]}},qn,gr=class extends v{constructor(...e){super(...e),this.currentDate=new Date,this.selectedStartDate=null,this.selectedEndDate=null,this.mode="single",this._userClass="",this._userStyle=""}getDaysInMonth(e,t){return new Date(e,t+1,0).getDate()}previousMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()-1)}nextMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()+1)}selectDate(e,t){if(!t){let r=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),e);r.getMonth()===this.currentDate.getMonth()&&(this.mode==="single"?(this.selectedStartDate=r,this.selectedEndDate=null):this.mode==="range"&&(!this.selectedStartDate||this.selectedEndDate?(this.selectedStartDate=r,this.selectedEndDate=null):r>=this.selectedStartDate?this.selectedEndDate=r:(this.selectedEndDate=this.selectedStartDate,this.selectedStartDate=r)),this.dispatchEvent(new CustomEvent("date-selected",{detail:{startDate:this.selectedStartDate,endDate:this.selectedEndDate},bubbles:!0,composed:!0})))}}isDayInRange(e,t){return!this.selectedStartDate||!this.selectedEndDate||e.getMonth()!==this.currentDate.getMonth()?!1:t?e>this.selectedStartDate&&e<this.selectedEndDate:e>=this.selectedStartDate&&e<=this.selectedEndDate}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._userClass=((e=this.getAttribute("class"))==null?void 0:e.replace(m(q.host),""))??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=m(q.host)}firstUpdated(e){var r;let t=this.querySelector(".calendar");if(t&&(this._userClass&&(t.className=m("calendar",q.root,this._userClass)),this._userStyle)){let i=(r=t.getAttribute("style"))==null?void 0:r.trim(),o=this._userStyle.trim();t.setAttribute("style",[i,o].filter(Boolean).join("; "))}}render(){let e=this.currentDate.getFullYear(),t=this.currentDate.getMonth(),r=this.getDaysInMonth(e,t),i=new Date(e,t,1).getDay(),o=new Date(e,t,0).getDate(),s=[];for(let g=i-1;g>=0;g--)s.push({day:String(o-g),month:t-1,isOutside:!0});for(let g=1;g<=r;g++)s.push({day:String(g),month:t,isOutside:!1});let a=s.length%7;if(a!==0){let g=7-a;for(let y=1;y<=g;y++)s.push({day:String(y),month:t+1,isOutside:!0})}let u=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"}),p=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"});return c`
|
|
3148
|
+
`}};n([l({type:String}),d("design:type",Object)],Ut.prototype,"variant",void 0),n([l({type:String}),d("design:type",Object)],Ut.prototype,"size",void 0),n([l({type:String}),d("design:type",Object)],Ut.prototype,"type",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Ut.prototype,"disabled",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Ut.prototype,"invalid",void 0),n([l({type:String}),d("design:type",String)],Ut.prototype,"href",void 0),n([l({type:String}),d("design:type",Object)],Ut.prototype,"target",void 0),n([l({attribute:!1,type:Function}),d("design:type",Function)],Ut.prototype,"onClick",void 0),Ut=n([h("rtg-button")],Ut);var mu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function bu(e){let t=e%100;if(t>=11&&t<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function fu(e){let t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),r=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),i=e.getDate(),o=e.getFullYear();return`${t}, ${r} ${i}${bu(i)}, ${o}`}var qn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Hn=cd,Ms=(e,t)=>r=>{var u;if((t==null?void 0:t.variants)==null)return Hn(e,r==null?void 0:r.class,r==null?void 0:r.className);let{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(p=>{let g=r==null?void 0:r[p],y=o==null?void 0:o[p];if(g===null)return null;let w=qn(g)||qn(y);return i[p][w]}),a=r&&Object.entries(r).reduce((p,g)=>{let[y,w]=g;return w===void 0||(p[y]=w),p},{});return Hn(e,s,(u=t==null?void 0:t.compoundVariants)==null?void 0:u.reduce((p,g)=>{let{class:y,className:w,...C}=g;return Object.entries(C).every($=>{let[_,E]=$;return Array.isArray(E)?E.includes({...o,...a}[_]):{...o,...a}[_]===E})?[...p,y,w]:p},[]),r==null?void 0:r.class,r==null?void 0:r.className)},Jr=Ms(["rtg-inline-flex rtg-items-center rtg-justify-center rtg-shrink-0","rtg-text-button-font-size rtg-font-button-font-weight rtg-whitespace-nowrap","rtg-rounded-button-radius rtg-outline-none","rtg-transition-all","disabled:rtg-opacity-button-opacity-disabled disabled:rtg-pointer-events-none","focus-visible:rtg-border-button-width-border-focus focus-visible:rtg-border-button-color-border-focus focus-visible:rtg-ring-button-width-ring-focus","aria-invalid:rtg-border-button-width-border-invalid aria-invalid:rtg-border-button-color-border-invalid","aria-invalid:rtg-ring-button-width-ring-invalid aria-invalid:rtg-ring-button-color-ring-invalid",'[&_svg]:rtg-pointer-events-none [&_svg:not([class*="rtg-size-"])]:rtg-size-button-icon-space-size [&_svg]:rtg-shrink-0'],{variants:{variant:{default:["rtg-bg-button-default-color-bg rtg-text-button-default-color-text","hover:rtg-bg-button-default-color-bg-hover","focus-visible:rtg-ring-button-default-color-ring-focus"],destructive:["rtg-bg-button-destructive-color-bg rtg-text-button-destructive-color-text","hover:rtg-bg-button-destructive-color-bg-hover","focus-visible:rtg-ring-button-destructive-color-ring-focus"],outline:["rtg-bg-button-outline-color-bg","rtg-border-button-outline-width-border rtg-border-button-outline-color-border","hover:rtg-bg-button-outline-color-bg-hover hover:rtg-text-button-outline-color-text-hover","focus-visible:rtg-ring-button-outline-color-ring-focus"],secondary:["rtg-bg-button-secondary-color-bg rtg-text-button-secondary-color-text","hover:rtg-bg-button-secondary-color-bg-hover","focus-visible:rtg-ring-button-secondary-color-ring-focus"],ghost:["hover:rtg-bg-button-ghost-color-bg-hover hover:rtg-text-button-ghost-color-text-hover","focus-visible:rtg-ring-button-ghost-color-ring-focus"],link:["rtg-text-button-link-color-text rtg-underline-offset-4","hover:rtg-underline","focus-visible:rtg-ring-button-link-color-ring-focus"]},size:{default:["rtg-h-button-space-h-default","rtg-gap-button-space-gap-default rtg-px-button-space-px-default rtg-py-button-space-py-default","has-[>svg]:rtg-px-button-space-px-default-has-icon"],sm:["rtg-h-button-space-h-sm","rtg-gap-button-space-gap-sm rtg-px-button-space-px-sm","has-[>svg]:rtg-px-button-space-px-sm-has-icon"],lg:["rtg-h-button-space-h-lg","rtg-gap-button-space-gap-lg rtg-px-button-space-px-lg","has-[>svg]:rtg-px-button-space-px-lg-has-icon"],icon:"rtg-size-button-space-size-icon","icon-sm":"rtg-size-button-space-size-icon-sm","icon-lg":"rtg-size-button-space-size-icon-lg"}},defaultVariants:{variant:"default",size:"default"}}),q={host:["rtg-contents"],root:["group/calendar","rtg-relative","rtg-p-calendar-space-p","rtg-w-fit","rtg-bg-calendar-color-bg"],months:["rtg-flex rtg-relative","rtg-flex-col md:rtg-flex-row rtg-gap-calendar-months-space-gap"],nav:["rtg-flex rtg-absolute rtg-top-0 rtg-inset-x-0","rtg-gap-calendar-nav-space-gap rtg-justify-between rtg-items-center","rtg-w-full"],month:["rtg-flex","rtg-flex-col rtg-gap-calendar-month-space-gap","rtg-w-full"],buttonPrevious:[m(Jr({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-previous-opacity-disabled"],buttonNext:[m(Jr({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-next-opacity-disabled"],chevron:["rtg-size-calendar-chevron-space-size"],monthCaption:["rtg-flex rtg-justify-center rtg-items-center","rtg-px-calendar-month-caption-space-px","rtg-w-full rtg-h-calendar-month-caption-space-h"],captionLabel:["rtg-text-calendar-caption-label-font rtg-font-calendar-caption-label-font-weight","rtg-select-none"],monthGrid:["rtg-w-full","rtg-border-collapse"],weekdays:["rtg-flex"],weekday:["rtg-flex-1","rtg-text-calendar-weekday-font rtg-font-calendar-weekday-font-weight rtg-text-calendar-weekday-color-text","rtg-rounded-calendar-weekday-radius","rtg-select-none"],weeks:[""],week:["rtg-flex","rtg-mt-calendar-week-space-mt","rtg-w-full"],day:{base:["group/day","rtg-aspect-square rtg-relative","rtg-w-full rtg-h-full","rtg-p-calendar-day-space-p","rtg-text-center","rtg-select-none"],today:["rtg-bg-calendar-day-today-color-bg","rtg-rounded-calendar-day-radius"],selected:{common:["rtg-bg-calendar-day-color-bg-selected"],single:["rtg-rounded-calendar-day-radius"],range:{start:["rtg-rounded-l-calendar-day-radius"],middle:["rtg-rounded-none"],end:["rtg-rounded-r-calendar-day-radius"]}},index:{first:["rtg-rounded-l-calendar-day-radius"],last:["rtg-rounded-r-calendar-day-radius"]}},dayButton:{base:[Jr({variant:"ghost",size:"icon"}),"rtg-aspect-square rtg-flex","rtg-flex-col rtg-gap-calendar-day-button-space-gap","rtg-size-auto rtg-w-full rtg-min-w-calendar-day-button-space-min-w","rtg-text-calendar-day-button-font rtg-font-calendar-day-button-font-weight","disabled:rtg-text-calendar-day-button-color-text-disabled disabled:rtg-opacity-calendar-day-button-opacity-disabled","data-[selected-single=true]:rtg-text-calendar-day-button-color-text-single-selected data-[selected-single=true]:rtg-bg-calendar-day-button-color-bg-single-selected","data-[range-start=true]:rtg-text-calendar-day-button-color-text-range-start data-[range-start=true]:rtg-bg-calendar-day-button-color-bg-range-start","data-[range-middle=true]:rtg-text-calendar-day-button-color-text-range-middle data-[range-middle=true]:rtg-bg-calendar-day-button-color-bg-range-middle","data-[range-end=true]:rtg-text-calendar-day-button-color-text-range-end data-[range-end=true]:rtg-bg-calendar-day-button-color-bg-range-end","[&>span]:rtg-text-calendar-day-button-span-font [&>span]:rtg-opacity-calendar-day-button-span-opacity","group-data-[focused=true]/day:rtg-relative group-data-[focused=true]/day:rtg-z-10","group-data-[focused=true]/day:rtg-border-calendar-day-width-border-focus group-data-[focused=true]/day:rtg-border-calendar-day-color-border-focus","group-data-[focused=true]/day:rtg-ring-calendar-day-width-ring-focus group-data-[focused=true]/day:rtg-ring-calendar-day-color-ring-focus"],outside:["rtg-text-calendar-day-button-outside-color-text"],today:["rtg-text-calendar-day-button-today-color-text","rtg-bg-calendar-day-button-today-color-bg"]}},Vn,mr=class extends v{constructor(...e){super(...e),this.currentDate=new Date,this.selectedStartDate=null,this.selectedEndDate=null,this.mode="single",this._userClass="",this._userStyle=""}getDaysInMonth(e,t){return new Date(e,t+1,0).getDate()}previousMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()-1)}nextMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()+1)}selectDate(e,t){if(!t){let r=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),e);r.getMonth()===this.currentDate.getMonth()&&(this.mode==="single"?(this.selectedStartDate=r,this.selectedEndDate=null):this.mode==="range"&&(!this.selectedStartDate||this.selectedEndDate?(this.selectedStartDate=r,this.selectedEndDate=null):r>=this.selectedStartDate?this.selectedEndDate=r:(this.selectedEndDate=this.selectedStartDate,this.selectedStartDate=r)),this.dispatchEvent(new CustomEvent("date-selected",{detail:{startDate:this.selectedStartDate,endDate:this.selectedEndDate},bubbles:!0,composed:!0})))}}isDayInRange(e,t){return!this.selectedStartDate||!this.selectedEndDate||e.getMonth()!==this.currentDate.getMonth()?!1:t?e>this.selectedStartDate&&e<this.selectedEndDate:e>=this.selectedStartDate&&e<=this.selectedEndDate}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._userClass=((e=this.getAttribute("class"))==null?void 0:e.replace(m(q.host),""))??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=m(q.host)}firstUpdated(e){var r;let t=this.querySelector(".calendar");if(t&&(this._userClass&&(t.className=m("calendar",q.root,this._userClass)),this._userStyle)){let i=(r=t.getAttribute("style"))==null?void 0:r.trim(),o=this._userStyle.trim();t.setAttribute("style",[i,o].filter(Boolean).join("; "))}}render(){let e=this.currentDate.getFullYear(),t=this.currentDate.getMonth(),r=this.getDaysInMonth(e,t),i=new Date(e,t,1).getDay(),o=new Date(e,t,0).getDate(),s=[];for(let g=i-1;g>=0;g--)s.push({day:String(o-g),month:t-1,isOutside:!0});for(let g=1;g<=r;g++)s.push({day:String(g),month:t,isOutside:!1});let a=s.length%7;if(a!==0){let g=7-a;for(let y=1;y<=g;y++)s.push({day:String(y),month:t+1,isOutside:!0})}let u=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"}),p=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"});return c`
|
|
3149
3149
|
<div
|
|
3150
3150
|
class=${m("calendar",q.root,this._userClass)}
|
|
3151
3151
|
data-slot="calendar"
|
|
@@ -3234,9 +3234,9 @@ body {
|
|
|
3234
3234
|
<tbody class=${m("calendar-weeks",q.weeks)}>
|
|
3235
3235
|
${Array.from({length:Math.ceil(s.length/7)},(g,y)=>c`
|
|
3236
3236
|
<tr class=${m("calendar-week",q.week)}>
|
|
3237
|
-
${s.slice(y*7,(y+1)*7).map((w,C)=>{var et,D,ct;let $=new Date(this.currentDate.getFullYear(),w.month,Number(w.day)),_=$.toDateString()===new Date().toDateString(),E=this.mode==="range"&&$.toDateString()===((et=this.selectedStartDate)==null?void 0:et.toDateString()),
|
|
3237
|
+
${s.slice(y*7,(y+1)*7).map((w,C)=>{var et,D,ct;let $=new Date(this.currentDate.getFullYear(),w.month,Number(w.day)),_=$.toDateString()===new Date().toDateString(),E=this.mode==="range"&&$.toDateString()===((et=this.selectedStartDate)==null?void 0:et.toDateString()),A=this.mode==="range"&&this.isDayInRange($,!0),I=this.mode==="range"&&$.toDateString()===((D=this.selectedEndDate)==null?void 0:D.toDateString()),L=this.mode==="single"&&$.toDateString()===((ct=this.selectedStartDate)==null?void 0:ct.toDateString()),H=L||E||A||I,M=C===0,J=C===6,tt=_?"Today, ":"";return tt+=fu($),tt+=H?", selected":"",c`
|
|
3238
3238
|
<td
|
|
3239
|
-
class=${m("calendar-day",q.day.base,_&&!H&&q.day.today,H&&q.day.selected.common,
|
|
3239
|
+
class=${m("calendar-day",q.day.base,_&&!H&&q.day.today,H&&q.day.selected.common,L&&q.day.selected.single,E&&q.day.selected.range.start,A&&q.day.selected.range.middle,I&&q.day.selected.range.end,M&&q.day.index.first,J&&q.day.index.last,!1)}
|
|
3240
3240
|
role="gridcell"
|
|
3241
3241
|
data-day=${$.toISOString().slice(0,10)}
|
|
3242
3242
|
?data-disabled=${void 0}
|
|
@@ -3254,11 +3254,11 @@ body {
|
|
|
3254
3254
|
?disabled=${void 0}
|
|
3255
3255
|
data-variant="ghost"
|
|
3256
3256
|
data-size="icon"
|
|
3257
|
-
data-selected-single=${
|
|
3257
|
+
data-selected-single=${L.toString()}
|
|
3258
3258
|
data-range-start=${E.toString()}
|
|
3259
|
-
data-range-middle=${
|
|
3259
|
+
data-range-middle=${A.toString()}
|
|
3260
3260
|
data-range-end=${I.toString()}
|
|
3261
|
-
tabindex=${
|
|
3261
|
+
tabindex=${L||I?"0":"-1"}
|
|
3262
3262
|
type="button"
|
|
3263
3263
|
aria-label=${tt}
|
|
3264
3264
|
@click="${()=>this.selectDate(Number(w.day),w.isOutside)}"
|
|
@@ -3274,11 +3274,11 @@ body {
|
|
|
3274
3274
|
</div>
|
|
3275
3275
|
</div>
|
|
3276
3276
|
</div>
|
|
3277
|
-
`}};n([l({type:Object}),d("design:type",typeof(
|
|
3277
|
+
`}};n([l({type:Object}),d("design:type",typeof(Vn=typeof Date<"u"&&Date)=="function"?Vn:Object)],mr.prototype,"currentDate",void 0),n([l({type:Object}),d("design:type",Object)],mr.prototype,"selectedStartDate",void 0),n([l({type:Object}),d("design:type",Object)],mr.prototype,"selectedEndDate",void 0),n([l({type:String}),d("design:type",Object)],mr.prototype,"mode",void 0),mr=n([h("rtg-calendar")],mr);var zo=class extends v{constructor(...e){super(...e),this.size="default"}get _rootSlot(){return this.querySelector('[data-slot="card"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<div data-slot="card" data-size=${this.size}></div>`}};n([l({type:String}),d("design:type",Object)],zo.prototype,"size",void 0),zo=n([h("rtg-card")],zo);var jo=class extends v{get _headerSlot(){return this.querySelector('[data-slot="card-header"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._headerSlot&&((r=this._headerSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`
|
|
3278
3278
|
<div data-slot="card-header" ?data-border=${this.border}></div>
|
|
3279
|
-
`}};n([l({type:Boolean}),d("design:type",Boolean)],
|
|
3279
|
+
`}};n([l({type:Boolean}),d("design:type",Boolean)],jo.prototype,"border",void 0),jo=n([h("rtg-card-header")],jo);var Wn=class extends v{get _titleSlot(){return this.querySelector('[data-slot="card-title"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._titleSlot&&((r=this._titleSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<div data-slot="card-title"></div>`}};Wn=n([h("rtg-card-title")],Wn);var Gn=class extends v{get _descriptionSlot(){return this.querySelector('[data-slot="card-description"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._descriptionSlot&&((r=this._descriptionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<div data-slot="card-description"></div>`}};Gn=n([h("rtg-card-description")],Gn);var Kn=class extends v{get _actionSlot(){return this.querySelector('[data-slot="card-action"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._actionSlot&&((r=this._actionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<div data-slot="card-action"></div>`}};Kn=n([h("rtg-card-action")],Kn);var Yn=class extends v{get _contentSlot(){return this.querySelector('[data-slot="card-content"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._contentSlot&&((r=this._contentSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<div data-slot="card-content"></div>`}};Yn=n([h("rtg-card-content")],Yn);var No=class extends v{get _footerSlot(){return this.querySelector('[data-slot="card-footer"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._footerSlot&&((r=this._footerSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`
|
|
3280
3280
|
<div data-slot="card-footer" ?data-border=${this.border}></div>
|
|
3281
|
-
`}};n([l({type:Boolean}),d("design:type",Boolean)],
|
|
3281
|
+
`}};n([l({type:Boolean}),d("design:type",Boolean)],No.prototype,"border",void 0),No=n([h("rtg-card-footer")],No);function vu(){return qt` <svg
|
|
3282
3282
|
class="shrink-0 size-3.5 text-gray-500 dark:text-neutral-500"
|
|
3283
3283
|
xmlns="http://www.w3.org/2000/svg"
|
|
3284
3284
|
width="24"
|
|
@@ -3386,7 +3386,7 @@ body {
|
|
|
3386
3386
|
>
|
|
3387
3387
|
<path d="M20 6 9 17l-5-5"></path>
|
|
3388
3388
|
</svg>
|
|
3389
|
-
`}var $t={root:["rtg-relative rtg-mx-carousel-space-mx rtg-h-carousel-space-h rtg-w-carousel-space-w"],viewport:["rtg-w-carousel-viewport-space-w rtg-h-carousel-viewport-space-h rtg-overflow-hidden"],slidesWrapper:{base:["rtg-flex rtg-transition-transform rtg-duration-carousel-motion-duration rtg-ease-carousel-motion-fn"],orientation:{horizontal:["rtg-flex-row"],vertical:["rtg-flex-col"]}},slide:{base:["rtg-min-w-0 rtg-basis-full rtg-h-carousel-slide-space-h rtg-flex-shrink-0 rtg-flex-grow-0 rtg-transition-transform rtg-duration-carousel-motion-duration rtg-px-carousel-slide-space-px rtg-py-carousel-slide-space-py"],size:{true:["lg:rtg-basis-1/3 lg:rtg-h-1/2 md:rtg-basis-1/2 md:rtg-h-1/2"],false:[""]}},controls:{base:["rtg-absolute rtg-z-10 rtg-flex"],orientation:{horizontal:["rtg-top-1/2 rtg-left-carousel-control-horizontal-space-left rtg-right-carousel-control-horizontal-space-right rtg-justify-between"],vertical:["rtg-w-carousel-control-vertical-space-w rtg-h-carousel-control-vertical-space-h rtg-top-0 rtg-flex-col rtg-justify-between rtg-items-center"]}},controlButton:{base:["rtg-bg-carousel-button-color-bg rtg-text-carousel-button-color-text rtg-border-none rtg-px-carousel-button-space-px rtg-py-carousel-button-space-py rtg-cursor-pointer rtg-z-10 rtg-rounded-carousel-button-radius rtg-w-carousel-button-space-w rtg-h-carousel-button-space-h rtg-flex rtg-items-center rtg-justify-center hover:rtg-bg-carousel-button-color-bg-hover disabled:rtg-opacity-carousel-button-opacity-disabled"],orientation:{verticalPrev:["rtg-relative rtg-top-carousel-button-vertical-prev-space-top rtg-rotate-90"],verticalNext:["rtg-relative rtg-top-carousel-button-vertical-next-space-top rtg-rotate-90"]}}},
|
|
3389
|
+
`}var $t={root:["rtg-relative rtg-mx-carousel-space-mx rtg-h-carousel-space-h rtg-w-carousel-space-w"],viewport:["rtg-w-carousel-viewport-space-w rtg-h-carousel-viewport-space-h rtg-overflow-hidden"],slidesWrapper:{base:["rtg-flex rtg-transition-transform rtg-duration-carousel-motion-duration rtg-ease-carousel-motion-fn"],orientation:{horizontal:["rtg-flex-row"],vertical:["rtg-flex-col"]}},slide:{base:["rtg-min-w-0 rtg-basis-full rtg-h-carousel-slide-space-h rtg-flex-shrink-0 rtg-flex-grow-0 rtg-transition-transform rtg-duration-carousel-motion-duration rtg-px-carousel-slide-space-px rtg-py-carousel-slide-space-py"],size:{true:["lg:rtg-basis-1/3 lg:rtg-h-1/2 md:rtg-basis-1/2 md:rtg-h-1/2"],false:[""]}},controls:{base:["rtg-absolute rtg-z-10 rtg-flex"],orientation:{horizontal:["rtg-top-1/2 rtg-left-carousel-control-horizontal-space-left rtg-right-carousel-control-horizontal-space-right rtg-justify-between"],vertical:["rtg-w-carousel-control-vertical-space-w rtg-h-carousel-control-vertical-space-h rtg-top-0 rtg-flex-col rtg-justify-between rtg-items-center"]}},controlButton:{base:["rtg-bg-carousel-button-color-bg rtg-text-carousel-button-color-text rtg-border-none rtg-px-carousel-button-space-px rtg-py-carousel-button-space-py rtg-cursor-pointer rtg-z-10 rtg-rounded-carousel-button-radius rtg-w-carousel-button-space-w rtg-h-carousel-button-space-h rtg-flex rtg-items-center rtg-justify-center hover:rtg-bg-carousel-button-color-bg-hover disabled:rtg-opacity-carousel-button-opacity-disabled"],orientation:{verticalPrev:["rtg-relative rtg-top-carousel-button-vertical-prev-space-top rtg-rotate-90"],verticalNext:["rtg-relative rtg-top-carousel-button-vertical-next-space-top rtg-rotate-90"]}}},Xn,Ie=class extends v{constructor(...e){super(...e),this.currentIndex=0,this.items=[],this.orientation="horizontal",this.size=!1,this.handleResize=()=>{this.updateSlides(),this.currentIndex=0,this.querySelectorAll(".slide").forEach(t=>{t.className=this.getSlideClasses()})}}createRenderRoot(){return this}firstUpdated(){this.restructureSlides()}restructureSlides(){let e=this.querySelector(".slides");if(e)for(let t=0;t<this.items.length;t++){let r=`slide-${t}`,i=this.querySelector(`[slot="${r}"]`);if(i&&i.parentElement!==e){let o=document.createElement("div");o.className=this.getSlideClasses(),e.appendChild(o),o.appendChild(i)}}}getSlideClasses(){return m($t.slide.base,this.size?$t.slide.size.true:$t.slide.size.false)}nextSlide(){this.currentIndex<this.items.length-1&&(this.currentIndex+=1,this.updateSlides())}prevSlide(){this.currentIndex>0&&(--this.currentIndex,this.updateSlides())}updateSlides(){let e;e=this.size?window.innerWidth>=1024?33.3333:window.innerWidth>=768?50:100:100;let t=this.orientation==="vertical"?100/this.items.length:100;this.slides&&(this.slides.style.transform=this.orientation==="horizontal"?`translateX(-${this.currentIndex*e}%)`:`translateY(-${this.currentIndex*t}%)`)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.handleResize)}render(){let e=this.currentIndex===0,t=this.size?window.innerWidth>=1024?3:window.innerWidth>=768?2:1:1,r=this.currentIndex>=this.items.length-t,i=m($t.slidesWrapper.base,$t.slidesWrapper.orientation[this.orientation]),o=m($t.controls.base,$t.controls.orientation[this.orientation]),s=m($t.controlButton.base,this.orientation==="vertical"&&$t.controlButton.orientation.verticalPrev),a=m($t.controlButton.base,this.orientation==="vertical"&&$t.controlButton.orientation.verticalNext);return c`
|
|
3390
3390
|
<div
|
|
3391
3391
|
part="rtg-carousel"
|
|
3392
3392
|
class="${m($t.root,this.className)}"
|
|
@@ -3415,7 +3415,7 @@ body {
|
|
|
3415
3415
|
</div>
|
|
3416
3416
|
</div>
|
|
3417
3417
|
</div>
|
|
3418
|
-
`}};n([l({type:Number}),d("design:type",Object)],
|
|
3418
|
+
`}};n([l({type:Number}),d("design:type",Object)],Ie.prototype,"currentIndex",void 0),n([l({type:Array}),d("design:type",Array)],Ie.prototype,"items",void 0),n([l({type:String}),d("design:type",String)],Ie.prototype,"orientation",void 0),n([l({type:Boolean}),d("design:type",Object)],Ie.prototype,"size",void 0),n([li(".slides"),d("design:type",typeof(Xn=typeof HTMLElement<"u"&&HTMLElement)=="function"?Xn:Object)],Ie.prototype,"slides",void 0),Ie=n([h("rtg-carousel")],Ie);var At=class extends v{constructor(...e){super(...e),this.value="on"}createRenderRoot(){return this}_isControlled(){return this.checked!==void 0}_getState(){return this._checked?"checked":"unchecked"}updated(e){e.has("checked")&&this._isControlled()&&(this._checked=this.checked)}firstUpdated(e){this._checked=this.defaultChecked||this.checked}_handleClick(){if(this.disabled)return;let e=!this._checked;this._isControlled()||(this._checked=e),this.dispatchEvent(new CustomEvent("rtg-checkbox:checked-change",{detail:{checked:e},bubbles:!0,composed:!0})),this.onCheckedChange!==void 0&&this.onCheckedChange(e)}_renderIndicator(){return this._checked?c`
|
|
3419
3419
|
<span
|
|
3420
3420
|
data-slot="checkbox-indicator"
|
|
3421
3421
|
data-state=${this._getState()}
|
|
@@ -3453,26 +3453,26 @@ body {
|
|
|
3453
3453
|
</button>
|
|
3454
3454
|
|
|
3455
3455
|
${this._renderInput()}
|
|
3456
|
-
`}};n([l({attribute:"default-checked",type:Boolean}),d("design:type",Boolean)],
|
|
3456
|
+
`}};n([l({attribute:"default-checked",type:Boolean}),d("design:type",Boolean)],At.prototype,"defaultChecked",void 0),n([l({attribute:!0,type:Boolean}),d("design:type",Boolean)],At.prototype,"checked",void 0),n([l({attribute:!1,type:Function}),d("design:type",Function)],At.prototype,"onCheckedChange",void 0),n([l({type:Boolean}),d("design:type",Boolean)],At.prototype,"disabled",void 0),n([l({type:Boolean}),d("design:type",Boolean)],At.prototype,"required",void 0),n([l({type:Boolean}),d("design:type",Boolean)],At.prototype,"invalid",void 0),n([l({type:String}),d("design:type",String)],At.prototype,"name",void 0),n([l({type:String}),d("design:type",Object)],At.prototype,"value",void 0),n([k(),d("design:type",Boolean)],At.prototype,"_checked",void 0),At=n([h("rtg-checkbox")],At);var Zn=class extends x{getAttributesToExclude(){return[""]}get _containerElement(){return this.querySelector("div[part=collapsible-trigger]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}get _collapsible(){let e=this.parentElement;for(;e&&!(e instanceof zi);)e=e.parentElement;return e}onTrigger(){let e=this._collapsible;e&&(e.open=!e.open,this.dispatchEvent(new CustomEvent("click-collapsible-event",{bubbles:!0,composed:!0})))}render(){let e=this.getFilteredAttributes();return c`
|
|
3457
3457
|
<div
|
|
3458
3458
|
@click=${this.onTrigger}
|
|
3459
3459
|
${pt(e)}
|
|
3460
3460
|
part="collapsible-trigger"
|
|
3461
3461
|
></div>
|
|
3462
|
-
`}};
|
|
3462
|
+
`}};Zn=n([h("rtg-collapsible-trigger")],Zn);var Jn=class extends x{constructor(...e){super(...e),this._toggleHandler=t=>{let r=t;requestAnimationFrame(()=>{let i=this._containerElement;i&&(i.style.display=r.detail.open?"block":"none")})}}get _containerElement(){return this.querySelector("div[part=collapsible-content]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[""]}connectedCallback(){super.connectedCallback(),this.addEventListener("toggle-collapsible-content",this._toggleHandler)}disconnectedCallback(){this.removeEventListener("toggle-collapsible-content",this._toggleHandler),super.disconnectedCallback()}render(){return c`
|
|
3463
3463
|
<div
|
|
3464
3464
|
${pt(this.getFilteredAttributes())}
|
|
3465
3465
|
class="${m("",this.className)}"
|
|
3466
3466
|
style="display: none;--radix-collapsible-content-height: 100px; --radix-collapsible-content-width: 350px;"
|
|
3467
3467
|
part="collapsible-content"
|
|
3468
3468
|
></div>
|
|
3469
|
-
`}};
|
|
3469
|
+
`}};Jn=n([h("rtg-collapsible-content")],Jn);var zi=class extends x{constructor(...e){super(...e),this.open=!1,this._clickHandler=()=>{var t;(t=this.querySelector("rtg-collapsible-content"))==null||t.dispatchEvent(new CustomEvent("toggle-collapsible-content",{detail:{open:this.open}}))}}getAttributesToExclude(){return[""]}createRenderRoot(){return this}get _containerElement(){return this.querySelector("div[part=collapsible]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}connectedCallback(){super.connectedCallback(),this.addEventListener("click-collapsible-event",this._clickHandler)}disconnectedCallback(){this.removeEventListener("click-collapsible-event",this._clickHandler),super.disconnectedCallback()}render(){return c`
|
|
3470
3470
|
<div
|
|
3471
3471
|
${pt(this.getFilteredAttributes())}
|
|
3472
3472
|
class="${m("",this.className)}"
|
|
3473
3473
|
part="collapsible"
|
|
3474
3474
|
></div>
|
|
3475
|
-
`}};n([l({type:Boolean}),d("design:type",Object)],
|
|
3475
|
+
`}};n([l({type:Boolean}),d("design:type",Object)],zi.prototype,"open",void 0),zi=n([h("rtg-collapsible")],zi);var Lr={empty:["rtg-py-combo-box-empty-space-py","rtg-text-center","rtg-text-combo-box-empty-font"],group:{base:["rtg-pointer-events-none","rtg-invisible","rtg-absolute","rtg-z-50","rtg-mt-combo-box-group-space-mt","rtg-max-h-combo-box-group-space-max-h","rtg-w-combo-box-group-space-w","rtg-origin-top","rtg-scale-y-0","rtg-transform","rtg-overflow-hidden","rtg-overflow-y-auto","rtg-rounded-combo-box-group-radius","rtg-border-combo-box-group-width-border","rtg-border-combo-box-group-color-border","rtg-bg-combo-box-group-color-bg","rtg-px-combo-box-group-space-px","rtg-py-combo-box-group-space-py","rtg-opacity-0","rtg-shadow-combo-box-group-shadow","rtg-transition-opacity","rtg-duration-combo-box-group-motion-duration","rtg-ease-combo-box-group-motion-fn","[&::-webkit-scrollbar]:rtg-w-0"]},input:["rtg-flex","rtg-h-combo-box-input-space-h","rtg-w-combo-box-input-space-w","rtg-rounded-combo-box-input-radius","rtg-border-0","rtg-bg-combo-box-input-color-bg","rtg-px-combo-box-input-space-px","rtg-py-combo-box-input-space-py","rtg-text-combo-box-input-font","rtg-text-combo-box-input-color-text","rtg-shadow-none","placeholder:rtg-text-combo-box-input-color-text-placeholder","focus:rtg-outline-none","focus-visible:rtg-ring-0"],trigger:{base:["rtg-z-20","rtg-flex","rtg-h-combo-box-trigger-space-h","rtg-flex-row-reverse","rtg-items-center","rtg-justify-between","rtg-rounded-combo-box-trigger-radius","rtg-border-combo-box-trigger-width-border","rtg-border-combo-box-trigger-color-border","rtg-bg-combo-box-trigger-color-bg","rtg-px-combo-box-trigger-space-px","rtg-py-combo-box-trigger-space-py","rtg-text-combo-box-trigger-font","focus:rtg-outline-none","focus:rtg-ring-combo-box-trigger-width-ring-focus","focus:rtg-ring-combo-box-trigger-color-ring-focus","focus:rtg-ring-offset-combo-box-trigger-width-ring-offset-focus","disabled:rtg-cursor-not-allowed","disabled:rtg-opacity-combo-box-trigger-opacity-disabled"]},value:["rtg-line-clamp-1","rtg-flex","rtg-w-combo-box-value-space-w"],item:{base:["rtg-flex","rtg-w-combo-box-item-space-w","rtg-cursor-pointer","rtg-flex-row-reverse","rtg-items-center","rtg-justify-between","rtg-rounded-combo-box-item-radius","rtg-px-combo-box-item-space-px","rtg-py-combo-box-item-space-py","hover:rtg-bg-accent","focus:rtg-bg-combo-box-item-color-bg-hover","focus:rtg-outline-none"]}},Qn,Uo=class extends x{constructor(...e){super(...e),this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("rtg-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)}}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof vt);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this.buttonElement),this.addEventListener("click",t=>{t.stopPropagation()})}render(){return c`
|
|
3476
3476
|
<button
|
|
3477
3477
|
type="button"
|
|
3478
3478
|
part="combo-box-trigger-button"
|
|
@@ -3485,21 +3485,21 @@ body {
|
|
|
3485
3485
|
>
|
|
3486
3486
|
${vu()}
|
|
3487
3487
|
</button>
|
|
3488
|
-
`}};n([
|
|
3488
|
+
`}};n([li("button"),d("design:type",typeof(Qn=typeof HTMLButtonElement<"u"&&HTMLButtonElement)=="function"?Qn:Object)],Uo.prototype,"buttonElement",void 0),Uo=n([h("rtg-combo-box-trigger")],Uo);var Do=class extends v{constructor(...e){super(...e),this.placeholder="select a value",this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("rtg-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)},this.renderLabel=()=>this._comboBox&&this._comboBox.selectedValue.length>0?this._comboBox.selectedValue:this.placeholder}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof vt);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()})}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",t=>{t.stopPropagation()})}createRenderRoot(){return this}render(){return c`
|
|
3489
3489
|
<span
|
|
3490
3490
|
part="combo-box-value"
|
|
3491
3491
|
class="${m(Lr.value,this.className)}"
|
|
3492
3492
|
@click=${this.handleClick}
|
|
3493
3493
|
>${this.renderLabel()}</span
|
|
3494
3494
|
>
|
|
3495
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
3495
|
+
`}};n([l({type:String}),d("design:type",Object)],Do.prototype,"placeholder",void 0),Do=n([h("rtg-combo-box-value")],Do);var ui=class extends v{constructor(...e){super(...e),this.orientation="horizontal"}createRenderRoot(){return this}render(){return c`
|
|
3496
3496
|
<div
|
|
3497
3497
|
data-slot="separator"
|
|
3498
3498
|
data-orientation=${this.orientation}
|
|
3499
3499
|
role=${this.decorative?"none":"separator"}
|
|
3500
3500
|
aria-orientation=${this.decorative?f:this.orientation}
|
|
3501
3501
|
></div>
|
|
3502
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
3502
|
+
`}};n([l({type:String}),d("design:type",Object)],ui.prototype,"orientation",void 0),n([l({type:Boolean}),d("design:type",Boolean)],ui.prototype,"decorative",void 0),ui=n([h("rtg-separator")],ui);var De=class extends x{constructor(...t){super(...t),this.searchKey="",this.focusedIndex=0,this.selectedValue="",this.isOpen=!1,this.handleItemClicked=()=>{this.requestUpdate()},this.handleTriggerComboBox=r=>{var i,o;r.detail.isOpen!==((i=this._comboBox)==null?void 0:i.isOpen)&&this.requestUpdate(),r.detail.isOpen&&((o=this._comboBox)!=null&&o.selectedValue)&&(this.focusedIndex=this.comboBoxItems.findIndex(s=>{var a;return s.getAttribute("value")===((a=this._comboBox)==null?void 0:a.selectedValue)}),this.requestUpdate())},this.handleKeyDown=r=>{var o;if(!((o=this._comboBox)!=null&&o.isOpen))return;r.preventDefault();let i=this.filteredItems;switch(r.key){case"ArrowDown":if(i.length===0)return;this.focusedIndex=(this.focusedIndex+1)%i.length;break;case"ArrowUp":if(i.length===0)return;this.focusedIndex=(this.focusedIndex-1+i.length)%i.length;break;case"Enter":if(this.focusedIndex>=0&&this.focusedIndex<i.length){let s=i[this.focusedIndex].getAttribute("value");this.dispatchEvent(new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:s}}))}break}},this.handleMouseOver=(r,i)=>{r.preventDefault(),this.focusedIndex=i},this.onSelectedValue=(r,i)=>{this.focusedIndex=i,this.selectedValue=r},this.boundHandleComboBoxStateChanged=this.handleComboBoxStateChanged.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}get comboBoxItems(){return Array.from(this.querySelectorAll('[data-managed="true"][tag="rtg-combo-box-item"], rtg-combo-box-item')).filter(t=>t.hasAttribute("value"))}get comboBoxInput(){return this.querySelector("rtg-combo-box-input")}get comboBoxEmpty(){return this.querySelector("rtg-combo-box-empty")}get hasResults(){return!this.filteredItems.length}get filteredItems(){var r;let t=(r=this.searchKey)==null?void 0:r.toLowerCase();return this.comboBoxItems.filter(i=>{var o;return(o=i.getAttribute("value"))==null?void 0:o.toLowerCase().includes(t)})}get _comboBox(){let t=this.parentElement;for(;t&&!(t instanceof vt);)t=t.parentElement;return t}handleComboBoxStateChanged(t){var s;let{isOpen:r,targetComboBoxId:i}=t.detail;if(this.isOpen=r,i!==((s=this._comboBox)==null?void 0:s.uuid))return;let o=this.renderRoot.querySelector('[part="select-group"]');o&&(r?(clearTimeout(o._hideTimeout),o.classList.remove("rtg-scale-y-0","rtg-opacity-0"),o.classList.add("rtg-scale-y-100","rtg-opacity-100"),o.classList.remove("rtg-invisible","rtg-pointer-events-none"),o.classList.add("rtg-visible","rtg-pointer-events-auto")):(o.classList.remove("rtg-opacity-100"),o.classList.add("rtg-opacity-0"),o._hideTimeout=setTimeout(()=>{o.classList.remove("rtg-visible","rtg-pointer-events-auto","rtg-scale-y-100"),o.classList.add("rtg-invisible","rtg-pointer-events-none","rtg-scale-y-0")},300)))}moveChildren(){let t=this.renderRoot.querySelector('[part="select-group"]');if(!t)return;let r={top:t.querySelector("#topSlot"),empty:t.querySelector("#emptySlot"),list:t.querySelector("#listSlot")},i={"rtg-combo-box-input":"top","rtg-combo-box-empty":"empty","rtg-combo-box-item":"list"};Array.from(this.children).forEach(o=>{var a;let s=i[o.tagName.toLowerCase()];s&&(o.setAttribute("data-managed","true"),(a=r[s])==null||a.appendChild(o))})}renderFilteredItems(){return this.comboBoxItems.forEach(t=>t.setAttribute("hidden","true")),this.filteredItems.map((t,r)=>{var a;let i=t.getAttribute("value")??"",o=r===this.focusedIndex,s=i.toLowerCase()===((a=this._comboBox)==null?void 0:a.selectedValue.toLowerCase());return c`
|
|
3503
3503
|
<rtg-combo-box-item
|
|
3504
3504
|
@mouseover="${u=>this.handleMouseOver(u,r)}"
|
|
3505
3505
|
.value=${i}
|
|
@@ -3526,7 +3526,7 @@ body {
|
|
|
3526
3526
|
${this.renderFilteredItems()}
|
|
3527
3527
|
</div>
|
|
3528
3528
|
</div>
|
|
3529
|
-
`}};n([k(),d("design:type",Object)],
|
|
3529
|
+
`}};n([k(),d("design:type",Object)],De.prototype,"searchKey",void 0),n([k(),d("design:type",Object)],De.prototype,"focusedIndex",void 0),n([k(),d("design:type",Object)],De.prototype,"selectedValue",void 0),n([k(),d("design:type",Boolean)],De.prototype,"isOpen",void 0),De=n([h("rtg-combo-box-group")],De);var ta,Ot=class extends x{constructor(...e){super(...e),this.value="",this.key="",this.tabindex=0,this.isSelected=!1,this.isFocus=!1,this.class="",this.selectItemIndex=-1,this.onSelect=(t,r)=>{},this.onMouseOver=(t,r)=>{},this.handleClick=t=>{this.onSelect(this.value,this.selectItemIndex),t.stopPropagation();let r=new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.value}});this.dispatchEvent(r)}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this.itemDivContainer)}createRenderRoot(){return this}render(){return c`
|
|
3530
3530
|
<div
|
|
3531
3531
|
${pt(this.getFilteredAttributes())}
|
|
3532
3532
|
@click=${this.handleClick}
|
|
@@ -3542,7 +3542,7 @@ body {
|
|
|
3542
3542
|
${$u()}
|
|
3543
3543
|
</span>
|
|
3544
3544
|
</div>
|
|
3545
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
3545
|
+
`}};n([l({type:String}),d("design:type",Object)],Ot.prototype,"value",void 0),n([l({type:String}),d("design:type",Object)],Ot.prototype,"key",void 0),n([l({type:Number}),d("design:type",Object)],Ot.prototype,"tabindex",void 0),n([l({type:Boolean}),d("design:type",Object)],Ot.prototype,"isSelected",void 0),n([l({type:Boolean}),d("design:type",Object)],Ot.prototype,"isFocus",void 0),n([l({type:String}),d("design:type",Object)],Ot.prototype,"class",void 0),n([l({type:Number}),d("design:type",Object)],Ot.prototype,"selectItemIndex",void 0),n([l({type:Function}),d("design:type",Object)],Ot.prototype,"onSelect",void 0),n([l({type:Function}),d("design:type",Object)],Ot.prototype,"onMouseOver",void 0),n([li("#rtg-combo-box-item"),d("design:type",typeof(ta=typeof HTMLDivElement<"u"&&HTMLDivElement)=="function"?ta:Object)],Ot.prototype,"itemDivContainer",void 0),Ot=n([h("rtg-combo-box-item")],Ot);var pi=class extends v{constructor(...e){super(...e),this.placeholder="Search Item ...",this.searchValue=""}get _comboBoxGroup(){let e=this.parentElement;for(;e&&!(e instanceof De);)e=e.parentElement;return e}handleSearch(e){e.stopPropagation(),this.searchValue=e.target.value,this._comboBoxGroup&&(this._comboBoxGroup.searchKey=this.searchValue)}handleKeyDown(e){e.stopPropagation()}createRenderRoot(){return this}render(){return c`
|
|
3546
3546
|
<div class="rtg-flex rtg-items-center rtg-px-2">
|
|
3547
3547
|
${Su()}
|
|
3548
3548
|
<input
|
|
@@ -3560,41 +3560,41 @@ body {
|
|
|
3560
3560
|
@keydown="${this.handleKeyDown}"
|
|
3561
3561
|
/>
|
|
3562
3562
|
</div>
|
|
3563
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
3563
|
+
`}};n([l({type:String}),d("design:type",Object)],pi.prototype,"placeholder",void 0),n([k(),d("design:type",Object)],pi.prototype,"searchValue",void 0),pi=n([h("rtg-combo-box-input")],pi);var ea=class extends x{createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.removeDuplicateContent()}render(){return c`
|
|
3564
3564
|
<div
|
|
3565
3565
|
class="${m(Lr.empty,this.className)}"
|
|
3566
3566
|
role="presentation"
|
|
3567
3567
|
>
|
|
3568
3568
|
${Array.from(this.childNodes)[0].textContent}
|
|
3569
3569
|
</div>
|
|
3570
|
-
`}};
|
|
3570
|
+
`}};ea=n([h("rtg-combo-box-empty")],ea);var ra,vt=class extends x{constructor(){super(),this.isOpen=!1,this.selectedValue="",this.searchTerm="",this.focusedIndex=-1,this.filteredItems=[],this.uuid=Bs(),this.label="Select an item",this.items=[],this.handleClickOutside=e=>{var i;let t=(i=this.renderRoot)==null?void 0:i.querySelector("[data-combo-box-uuid]"),r=e.target;if(!r.tagName.includes("RTG-COMBO")&&!(r.shadowRoot&&r.shadowRoot.innerHTML.includes(t==null?void 0:t.innerHTML))){if(this.isOpen&&!t||!(t!=null&&t.contains(r)))this.isOpen=!1;else if(!(r!=null&&r.firstElementChild))return}}}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",e=>{this.isOpen&&(this.selectedValue=e.detail.selectedItem,this.isOpen=!1,this.requestUpdate())})}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this.parentDiveElement),this.items&&this.items.length>0&&(this.filteredItems=this.items.filter(t=>t.toLowerCase().includes(this.searchTerm)))}updated(e){super.updated(e),e.has("isOpen")&&(this.dispatchEvent(new CustomEvent("rtg-combo-box-state-changed",{detail:{isOpen:this.isOpen,targetComboBoxId:this.uuid},bubbles:!0,composed:!0})),this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}selectItem(e){let t=e.target;if(t instanceof HTMLElement){let r=t.closest("rtg-combo-box-item");r?(this.selectedValue=r.getAttribute("data-hs-combo-box-value")||"",this.isOpen=!1):console.log("No valid rtg-combo-box-item found")}else console.log("Event target is not an HTMLElement")}render(){return c`
|
|
3571
3571
|
<div
|
|
3572
3572
|
class="${m("rtg-relative",this.className)}"
|
|
3573
3573
|
data-hs-combo-box=""
|
|
3574
3574
|
data-combo-box-uuid=${this.uuid}
|
|
3575
3575
|
part="combo-box"
|
|
3576
3576
|
></div>
|
|
3577
|
-
`}};n([l({type:Boolean}),d("design:type",Object)],vt.prototype,"isOpen",void 0),n([k(),d("design:type",Object)],vt.prototype,"selectedValue",void 0),n([k(),d("design:type",Object)],vt.prototype,"searchTerm",void 0),n([k(),d("design:type",Object)],vt.prototype,"focusedIndex",void 0),n([k(),d("design:type",Array)],vt.prototype,"filteredItems",void 0),n([k(),d("design:type",Object)],vt.prototype,"uuid",void 0),n([l({type:String}),d("design:type",String)],vt.prototype,"label",void 0),n([l({type:Array}),d("design:type",Object)],vt.prototype,"items",void 0),n([
|
|
3577
|
+
`}};n([l({type:Boolean}),d("design:type",Object)],vt.prototype,"isOpen",void 0),n([k(),d("design:type",Object)],vt.prototype,"selectedValue",void 0),n([k(),d("design:type",Object)],vt.prototype,"searchTerm",void 0),n([k(),d("design:type",Object)],vt.prototype,"focusedIndex",void 0),n([k(),d("design:type",Array)],vt.prototype,"filteredItems",void 0),n([k(),d("design:type",Object)],vt.prototype,"uuid",void 0),n([l({type:String}),d("design:type",String)],vt.prototype,"label",void 0),n([l({type:Array}),d("design:type",Object)],vt.prototype,"items",void 0),n([li('[part="combo-box"]'),d("design:type",typeof(ra=typeof HTMLDivElement<"u"&&HTMLDivElement)=="function"?ra:Object)],vt.prototype,"parentDiveElement",void 0),vt=n([h("rtg-combo-box"),d("design:paramtypes",[])],vt);var Yt={root:["rtg-flex rtg-overflow-hidden","rtg-flex-col","rtg-w-command-space-w rtg-h-command-space-h","rtg-text-command-color-text","rtg-bg-command-color-bg","rtg-rounded-command-radius"],input:{wrapper:["rtg-flex","rtg-gap-command-input-wrapper-space-gap rtg-items-center","rtg-px-command-input-wrapper-space-px","rtg-h-command-input-wrapper-space-h","rtg-border-b-command-input-wrapper-width-border rtg-border-b-command-input-wrapper-color-border"],icon:["rtg-shrink-0","rtg-size-command-input-icon-space-size","rtg-opacity-command-input-icon-opacity"],input:["rtg-flex","rtg-py-command-input-space-py","rtg-w-command-input-space-w rtg-h-command-input-space-h","rtg-text-command-input-font","rtg-bg-command-input-color-bg","rtg-rounded-command-input-radius rtg-outline-hidden","focus:rtg-outline-none","disabled:rtg-opacity-command-input-opacity-disabled disabled:rtg-cursor-not-allowed","placeholder:rtg-text-command-input-placeholder-color-text"]},list:["rtg-overflow-x-hidden rtg-overflow-y-auto","rtg-max-h-command-list-space-max-h","rtg-scroll-py-1"],empty:["rtg-py-command-empty-space-py","rtg-text-command-empty-font rtg-text-center"],group:["rtg-overflow-hidden","rtg-p-command-group-space-p","rtg-text-command-group-color-text"],heading:["rtg-px-command-heading-space-px rtg-py-command-heading-space-py","rtg-text-command-heading-font rtg-font-command-heading-font-weight rtg-text-command-heading-color-text"],separator:["rtg-command-separator-space-mx","rtg-h-command-separator-space-h","rtg-bg-command-separator-color-bg"],item:["rtg-flex rtg-relative","rtg-gap-command-item-space-gap rtg-items-center","rtg-px-command-item-space-px rtg-py-command-item-space-py","rtg-text-command-item-font","rtg-rounded-command-item-radius rtg-outline-hidden","rtg-cursor-default rtg-select-none","hover:rtg-text-command-item-color-text-hover hover:rtg-bg-command-item-color-bg-hover","aria-selected:rtg-text-command-item-color-text-selected aria-selected:rtg-bg-command-item-color-bg-selected",'data-[disabled="true"]:rtg-opacity-command-item-opacity-disabled data-[disabled="true"]:rtg-pointer-events-none','[&_svg]:rtg-shrink-0 [&_svg:not([class*="rtg-size-"])]:rtg-size-command-item-icon-space-size [&_svg:not([class*="rtg-text-"])]:rtg-text-command-item-icon-color-text [&_svg]:rtg-pointer-events-none']},ji,qe,hi=(qe=class extends x{constructor(...t){super(...t),this._id="",this._hidden="true"}get containerElement(){return this.querySelector(`#${this.identifier}`)}get identifier(){if(this._id!=="")return this._id;let t=this.parentElement;return t?this._id=`${t.getAttribute("id")}e${ji._counter++}`:this._id=`rtgcmdrxlxe${ji._counter++}`,this._id}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this.containerElement)}render(){return c`
|
|
3578
3578
|
<div
|
|
3579
3579
|
rtgcmd-empty
|
|
3580
3580
|
id="${this.identifier}"
|
|
3581
3581
|
part="command-empty"
|
|
3582
3582
|
role="presentation"
|
|
3583
|
-
class=${m(
|
|
3583
|
+
class=${m(Yt.empty,this._hidden==="true"&&"rtg-hidden",this.className)}
|
|
3584
3584
|
></div>
|
|
3585
|
-
`}},
|
|
3585
|
+
`}},ji=qe,qe._counter=0,qe);n([l({type:String}),d("design:type",Object)],hi.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],hi.prototype,"_hidden",void 0),hi=ji=n([h("rtg-command-empty")],hi);var Ni,He,Fr=(He=class extends x{constructor(...t){super(...t),this.heading="",this._id="",this._hidden=""}get itemsContainerElement(){return this.querySelector(`#${this.identifier}g`)}get identifier(){if(this._id!=="")return this._id;let t=this.parentElement;return t?this._id=`${t.getAttribute("id")}g${Ni._counter++}`:this._id=`rtgcmdrxlxg${Ni._counter++}`,this._id}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(t){let r=this.itemsContainerElement;if(r){for(;r.firstChild;)r.removeChild(r.firstChild);this.moveLightDomChildrenInto(r)}}render(){return c`
|
|
3586
3586
|
<div
|
|
3587
3587
|
rtgcmd-group
|
|
3588
3588
|
id="${this.identifier}"
|
|
3589
3589
|
part="command-group"
|
|
3590
3590
|
role="presentation"
|
|
3591
|
-
class=${m(
|
|
3591
|
+
class=${m(Yt.group,this._hidden==="true"&&"rtg-hidden",this.className)}
|
|
3592
3592
|
>
|
|
3593
3593
|
<div
|
|
3594
3594
|
rtgcmd-group-heading
|
|
3595
3595
|
aria-hidden="true"
|
|
3596
3596
|
id="${this.identifier}h"
|
|
3597
|
-
class=${m(
|
|
3597
|
+
class=${m(Yt.heading)}
|
|
3598
3598
|
>
|
|
3599
3599
|
${this.heading}
|
|
3600
3600
|
</div>
|
|
@@ -3605,10 +3605,10 @@ body {
|
|
|
3605
3605
|
aria-labelledby="${this.identifier}h"
|
|
3606
3606
|
></div>
|
|
3607
3607
|
</div>
|
|
3608
|
-
`}},
|
|
3608
|
+
`}},Ni=He,He._counter=0,He);n([l({type:String}),d("design:type",Object)],Fr.prototype,"heading",void 0),n([l({attribute:"id",type:String}),d("design:type",Object)],Fr.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],Fr.prototype,"_hidden",void 0),Fr=Ni=n([h("rtg-command-group")],Fr);var gi=class extends v{constructor(...e){super(...e),this.placeholder="Type a command or search...",this._value=""}get identifier(){let e=this.parentElement;return e?`${e.getAttribute("id")}i`:"rtgcmdrxi"}filterItems(){let e=this.parentElement;if(e){let t=!0,r=e.querySelectorAll("rtg-command-group");r&&r.forEach(o=>{var p,g;let s=!0,a=o.querySelectorAll("rtg-command-item");a&&a.forEach(y=>{(y.value||"").toLowerCase().includes(this._value.toLowerCase())?(s=!1,t=!1,y._hidden="false"):y._hidden="true"}),o._hidden=s?"true":"false";let u=o.previousElementSibling;u&&(u._hidden=s||((p=u.previousElementSibling)==null?void 0:p.getAttribute("aria-hidden"))==="true"?"true":"false"),u=o.nextElementSibling,u&&(u._hidden=s||((g=u.nextElementSibling)==null?void 0:g.getAttribute("aria-hidden"))==="true"?"true":"false")});let i=e.querySelector("rtg-command-empty");i&&i.setAttribute("aria-hidden",t?"false":"true")}}handleChange(e){let t=e.target;t&&(this._value=t.value,this.filterItems())}createRenderRoot(){return this}render(){return c`
|
|
3609
3609
|
<div
|
|
3610
3610
|
part="command-input"
|
|
3611
|
-
class=${m(
|
|
3611
|
+
class=${m(Yt.input.wrapper,this.className)}
|
|
3612
3612
|
name="rtgcmd-input-container"
|
|
3613
3613
|
data-slot="rtg-command-input-wrapper"
|
|
3614
3614
|
>
|
|
@@ -3622,7 +3622,7 @@ body {
|
|
|
3622
3622
|
stroke-width="2"
|
|
3623
3623
|
stroke-linecap="round"
|
|
3624
3624
|
stroke-linejoin="round"
|
|
3625
|
-
class=${m(
|
|
3625
|
+
class=${m(Yt.input.icon,"lucide lucide-search-icon lucide-search")}
|
|
3626
3626
|
>
|
|
3627
3627
|
<path d="m21 21-4.34-4.34" />
|
|
3628
3628
|
<circle cx="11" cy="11" r="8" />
|
|
@@ -3643,10 +3643,10 @@ body {
|
|
|
3643
3643
|
aria-controls=":r1oe:"
|
|
3644
3644
|
aria-labelledby=":r1of:"
|
|
3645
3645
|
@input="${this.handleChange}"
|
|
3646
|
-
class=${m(
|
|
3646
|
+
class=${m(Yt.input.input)}
|
|
3647
3647
|
/>
|
|
3648
3648
|
</div>
|
|
3649
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
3649
|
+
`}};n([l({type:String}),d("design:type",Object)],gi.prototype,"placeholder",void 0),n([l({attribute:"value",type:String}),d("design:type",Object)],gi.prototype,"_value",void 0),gi=n([h("rtg-command-input")],gi);var Ui,Ve,Te=(Ve=class extends x{constructor(...t){super(...t),this.selected=!1,this._id="",this._hidden="false",this.onSelect=()=>{},this.disabled="false"}get containerElement(){return this.querySelector(`#${this.identifier}`)}get identifier(){if(this._id!=="")return this._id;let t=this.parentElement;return t?this._id=`${t.getAttribute("id")}li${Ui._counter++}`:this._id=`rtgcmdrxgxli${Ui._counter++}`,this._id}get value(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}handleMouseEvent(t){(t.type==="mouseover"||t.type==="focus")&&(this.selected=!0),t.type==="mouseleave"&&(this.selected=!1)}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(t){this.moveLightDomChildrenInto(this.containerElement)}updated(t){}render(){return c`
|
|
3650
3650
|
<div
|
|
3651
3651
|
rtgcmd-item
|
|
3652
3652
|
id="${this.identifier}"
|
|
@@ -3661,35 +3661,35 @@ body {
|
|
|
3661
3661
|
@mouseleave="${this.handleMouseEvent}"
|
|
3662
3662
|
@focus="${this.handleMouseEvent}"
|
|
3663
3663
|
@click="${this.onSelect}"
|
|
3664
|
-
class=${m(
|
|
3664
|
+
class=${m(Yt.item,this._hidden==="true"&&"rtg-hidden",this.className)}
|
|
3665
3665
|
></div>
|
|
3666
|
-
`}},
|
|
3666
|
+
`}},Ui=Ve,Ve._counter=0,Ve);n([l({type:String}),d("design:type",Object)],Te.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],Te.prototype,"_hidden",void 0),n([l({type:Function}),d("design:type",Object)],Te.prototype,"onSelect",void 0),n([l({attribute:"data-value",type:String}),l({type:Boolean}),d("design:type",Object),d("design:paramtypes",[])],Te.prototype,"containerElement",null),n([l({attribute:"data-disabled",type:String}),d("design:type",String)],Te.prototype,"disabled",void 0),Te=Ui=n([h("rtg-command-item")],Te);var ia=class extends x{get identifier(){let e=this.parentElement;return e?`${e.getAttribute("id")}l`:"rtgcmdrxl"}get containerElement(){return this.querySelector("div[rtgcmd-list]")}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.containerElement)}render(){return c`
|
|
3667
3667
|
<div
|
|
3668
3668
|
rtgcmd-list
|
|
3669
3669
|
id="${this.identifier}"
|
|
3670
3670
|
part="command-list"
|
|
3671
3671
|
role="listbox"
|
|
3672
|
-
class=${m(
|
|
3672
|
+
class=${m(Yt.list,this.className)}
|
|
3673
3673
|
>
|
|
3674
3674
|
<div></div>
|
|
3675
3675
|
</div>
|
|
3676
|
-
`}};
|
|
3676
|
+
`}};ia=n([h("rtg-command-list")],ia);var Di,We,mi=(We=class extends v{constructor(...t){super(...t),this._id="",this._hidden=""}get identifier(){if(this._id!=="")return this._id;let t=this.parentElement;return t?this._id=`${t.getAttribute("id")}s${Di._counter++}`:this._id=`rtgcmdrxlxs${Di._counter++}`,this._id}createRenderRoot(){return this}render(){return c`${this._hidden==="true"?f:c`
|
|
3677
3677
|
<div
|
|
3678
3678
|
rtgcmd-separator
|
|
3679
3679
|
id="${this.identifier}"
|
|
3680
3680
|
part="command-separator"
|
|
3681
3681
|
role="separator"
|
|
3682
|
-
class=${m(
|
|
3682
|
+
class=${m(Yt.separator,this.className)}
|
|
3683
3683
|
></div>
|
|
3684
|
-
`}`}},
|
|
3684
|
+
`}`}},Di=We,We._counter=0,We);n([l({type:String}),d("design:type",Object)],mi.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],mi.prototype,"_hidden",void 0),mi=Di=n([h("rtg-command-separator")],mi);var oa=class extends x{get containerElement(){return this.querySelector("div[rtgcmd-root]")}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class","style"]}createRenderRoot(){return this}firstUpdated(e){this.removeParentAttributes(),this.moveLightDomChildrenInto(this.containerElement),this.containerElement&&this.observeStyleAndClassSync(this.containerElement)}render(){let e=this.customClass||"",t=this.customStyle||"";return c`
|
|
3685
3685
|
<div
|
|
3686
3686
|
part="command"
|
|
3687
|
-
class="${m(
|
|
3687
|
+
class="${m(Yt.root,e)}"
|
|
3688
3688
|
style="${t}"
|
|
3689
3689
|
id="rtgcmdr1"
|
|
3690
3690
|
rtgcmd-root
|
|
3691
3691
|
></div>
|
|
3692
|
-
`}};
|
|
3692
|
+
`}};oa=n([h("rtg-command")],oa);var wt={root:[""],content:["rtg-overflow-x-hidden rtg-overflow-y-auto rtg-z-50","rtg-p-context-menu-content-space-p","rtg-min-w-context-menu-content-space-min-w","rtg-text-context-menu-content-color-text","rtg-bg-context-menu-content-color-bg","rtg-rounded-context-menu-content-radius rtg-border-context-menu-content-width-border rtg-border-context-menu-content-color-border","rtg-shadow-context-menu-content-shadow","rtg-translate-y-0.5","rtg-slide-in-from-top-2","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95"],group:[""],item:["rtg-flex rtg-relative","rtg-gap-context-menu-item-space-gap rtg-items-center","rtg-px-context-menu-item-space-px rtg-py-context-menu-item-space-py","rtg-text-context-menu-item-font","rtg-rounded-context-menu-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","hover:rtg-bg-context-menu-item-color-bg-hover hover:rtg-text-context-menu-item-color-text-hover","focus:rtg-bg-context-menu-item-color-bg-focus focus:rtg-text-context-menu-item-color-text-focus","data-[disabled]:rtg-opacity-context-menu-item-opacity-disabled data-[disabled]:rtg-pointer-events-none",'[&_svg]:rtg-shrink-0 [&_svg:not([class*="rtg-size-"])]:rtg-size-context-menu-item-icon-space-size [&_svg:not([class*="rtg-text-"])]:rtg-text-context-menu-item-icon-color-text [&_svg]:rtg-pointer-events-none'],checkboxItem:{base:["rtg-flex rtg-relative","rtg-gap-context-menu-checkbox-item-space-gap rtg-items-center","rtg-pl-context-menu-checkbox-item-space-pl rtg-pr-context-menu-checkbox-item-space-pr rtg-py-context-menu-checkbox-item-space-py","rtg-text-context-menu-checkbox-item-font","rtg-rounded-context-menu-checkbox-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","aria-selected:rtg-bg-context-menu-checkbox-item-color-bg-focus aria-selected:rtg-text-context-menu-checkbox-item-color-text-focus","data-[disabled]:rtg-opacity-context-menu-checkbox-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],span:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-context-menu-checkbox-item-icon-container-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-context-menu-checkbox-item-icon-space-size","rtg-pointer-events-none"]},radioItem:{base:["rtg-flex rtg-relative","rtg-gap-context-menu-radio-item-space-gap rtg-items-center","rtg-pl-context-menu-radio-item-space-pl rtg-pr-context-menu-radio-item-space-pr rtg-py-context-menu-radio-item-space-py","rtg-text-context-menu-radio-item-font","rtg-rounded-context-menu-radio-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","aria-selected:rtg-bg-context-menu-radio-item-color-bg-focus aria-selected:rtg-text-context-menu-radio-item-color-text-focus","data-[disabled]:rtg-opacity-context-menu-radio-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],span:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-context-menu-radio-item-icon-container-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-context-menu-radio-item-icon-space-size","rtg-pointer-events-none","rtg-fill-current"]},label:["rtg-px-context-menu-label-space-px rtg-py-context-menu-label-space-py","rtg-text-context-menu-label-font rtg-font-context-menu-label-font-weight"],separator:["rtg-mx-context-menu-separator-space-mx rtg-my-context-menu-separator-space-my","rtg-h-context-menu-separator-space-h","rtg-bg-context-menu-separator-color-bg"],shortcut:["rtg-ml-auto","rtg-text-context-menu-shortcut-font rtg-text-context-menu-shortcut-color-text"]},Le=class extends x{constructor(...e){super(...e),this._id="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=context-menu-checkbox-item-container]")}getAttributesToExclude(){return["data-testid"]}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked=!this.checked}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3693
3693
|
<div
|
|
3694
3694
|
rtgcmd-item
|
|
3695
3695
|
part="context-menu-checkbox"
|
|
@@ -3724,12 +3724,12 @@ body {
|
|
|
3724
3724
|
</span>
|
|
3725
3725
|
<div part="context-menu-checkbox-item-container"></div>
|
|
3726
3726
|
</div>
|
|
3727
|
-
`}};n([l({type:String}),d("design:type",Object)],Le.prototype,"_id",void 0),n([l({attribute:"data-value",type:String}),d("design:type",void 0),d("design:paramtypes",[])],Le.prototype,"value",null),n([l({type:Boolean}),d("design:type",Object)],Le.prototype,"selected",void 0),n([l({type:Boolean}),d("design:type",Object)],Le.prototype,"checked",void 0),n([l({attribute:"data-disabled",type:Boolean}),d("design:type",Object)],Le.prototype,"disabled",void 0),Le=n([h("rtg-context-menu-checkbox-item")],Le);var
|
|
3727
|
+
`}};n([l({type:String}),d("design:type",Object)],Le.prototype,"_id",void 0),n([l({attribute:"data-value",type:String}),d("design:type",void 0),d("design:paramtypes",[])],Le.prototype,"value",null),n([l({type:Boolean}),d("design:type",Object)],Le.prototype,"selected",void 0),n([l({type:Boolean}),d("design:type",Object)],Le.prototype,"checked",void 0),n([l({attribute:"data-disabled",type:Boolean}),d("design:type",Object)],Le.prototype,"disabled",void 0),Le=n([h("rtg-context-menu-checkbox-item")],Le);var Bo=class extends x{constructor(){super(),this.isOpen=!1,this.handleClickOutside=this.handleClickOutside.bind(this)}get _containerElement(){return this.querySelector("div[part=context-menu-content")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}handleClickOutside(e){let t=this==null?void 0:this.querySelector("button");!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&requestAnimationFrame(()=>{this._containerElement.style.display="none",this._containerElement.style.position="absolute",this._containerElement.dataset.state="closed",this.isOpen=!1})}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3728
3728
|
<div
|
|
3729
3729
|
part="context-menu-content"
|
|
3730
3730
|
class=${m(wt.content,this.className)}
|
|
3731
3731
|
></div>
|
|
3732
|
-
`}};n([k(),d("design:type",Object)],
|
|
3732
|
+
`}};n([k(),d("design:type",Object)],Bo.prototype,"isOpen",void 0),Bo=n([h("rtg-context-menu-content"),d("design:paramtypes",[])],Bo);var Fo=class extends x{constructor(...e){super(...e),this.heading=""}get _containerElement(){return this.querySelector("div[ rtgcontext-group-items]")}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3733
3733
|
<div
|
|
3734
3734
|
rtgcmd-group
|
|
3735
3735
|
part="context-menu-group"
|
|
@@ -3742,7 +3742,7 @@ body {
|
|
|
3742
3742
|
|
|
3743
3743
|
<div rtgcontext-group-items role="group"></div>
|
|
3744
3744
|
</div>
|
|
3745
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
3745
|
+
`}};n([l({type:String}),d("design:type",Object)],Fo.prototype,"heading",void 0),Fo=n([h("rtg-context-menu-group")],Fo);var bi=class extends x{constructor(...e){super(...e),this.disabled=!1}get _containerElement(){return this.querySelector("div[part=context-menu-item]")}getAttributesToExclude(){return[]}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}firstUpdated(e){var t;this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",()=>{this.dispatchEvent(new MouseEvent("click",{bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent("close-context-menu",{bubbles:!0,composed:!0}))})}connectedCallback(){super.connectedCallback()}disconnectedCallback(){}createRenderRoot(){return this}render(){return c`
|
|
3746
3746
|
<div
|
|
3747
3747
|
part="context-menu-item"
|
|
3748
3748
|
role="option"
|
|
@@ -3750,7 +3750,7 @@ body {
|
|
|
3750
3750
|
?data-disabled=${this.disabled}
|
|
3751
3751
|
class=${m(wt.item,this.className)}
|
|
3752
3752
|
></div>
|
|
3753
|
-
`}};n([l({attribute:"data-value",type:String}),d("design:type",void 0),d("design:paramtypes",[])],
|
|
3753
|
+
`}};n([l({attribute:"data-value",type:String}),d("design:type",void 0),d("design:paramtypes",[])],bi.prototype,"value",null),n([l({attribute:"data-disabled",type:Boolean}),d("design:type",Object)],bi.prototype,"disabled",void 0),bi=n([h("rtg-context-menu-item")],bi);var Pe=class extends x{constructor(...e){super(...e),this._id="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=context-menu-radio-item-container]")}getAttributesToExclude(){return["data-testid"]}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3754
3754
|
<div
|
|
3755
3755
|
rtgcmd-item
|
|
3756
3756
|
part="context-menu-radio"
|
|
@@ -3783,52 +3783,52 @@ body {
|
|
|
3783
3783
|
</span>
|
|
3784
3784
|
<div part="context-menu-radio-item-container"></div>
|
|
3785
3785
|
</div>
|
|
3786
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
3786
|
+
`}};n([l({type:String}),d("design:type",Object)],Pe.prototype,"_id",void 0),n([l({attribute:"data-value",type:String}),d("design:type",void 0),d("design:paramtypes",[])],Pe.prototype,"value",null),n([l({type:Boolean}),d("design:type",Object)],Pe.prototype,"selected",void 0),n([l({type:Boolean}),d("design:type",Object)],Pe.prototype,"checked",void 0),n([l({attribute:"data-disabled",type:Boolean}),d("design:type",Object)],Pe.prototype,"disabled",void 0),Pe=n([h("rtg-context-menu-radio-item")],Pe);var Mo=class extends v{constructor(...e){super(...e),this._id=""}createRenderRoot(){return this}render(){return c`
|
|
3787
3787
|
<div
|
|
3788
3788
|
rtgcmd-separator
|
|
3789
3789
|
part="context-menu-separator"
|
|
3790
3790
|
role="separator"
|
|
3791
3791
|
class=${m(wt.separator,this.className)}
|
|
3792
3792
|
></div>
|
|
3793
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
3793
|
+
`}};n([l({type:String}),d("design:type",Object)],Mo.prototype,"_id",void 0),Mo=n([h("rtg-context-menu-separator")],Mo);var sa=class extends x{get _containerElement(){return this.querySelector("span[part=context-menu-shortcut]")}getAttributesToExclude(){return[]}createRenderRoot(){return this.classList=m(wt.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3794
3794
|
<span
|
|
3795
3795
|
part="context-menu-shortcut"
|
|
3796
3796
|
class=${m(wt.shortcut,this.className)}
|
|
3797
3797
|
>
|
|
3798
3798
|
</span>
|
|
3799
|
-
`}};
|
|
3799
|
+
`}};sa=n([h("rtg-context-menu-shortcut")],sa);var na=class extends v{createRenderRoot(){return this}render(){return c``}};na=n([h("rtg-context-menu-trigger")],na);var qo=class extends x{constructor(...e){super(...e),this.isOpen=!1,this.handleClickOutside=t=>{let r=t.target;this!=null&&this.contains(r)||(this.isOpen=!1)}}get _containerElement(){return this.querySelector("div[part=context-menu]")}get _triggerElement(){return this.querySelector("rtg-context-menu-trigger")}get _content(){return this==null?void 0:this.querySelector("div[part=context-menu-content]")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected),this.addEventListener("close-context-menu",()=>{this.isOpen=!1,requestAnimationFrame(()=>{let e=this._content;e&&(e.style.display="none")})})}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}toggleDropdown(e){e.preventDefault(),e.stopPropagation();let{clientX:t,clientY:r}=e,i=e.target.getBoundingClientRect();requestAnimationFrame(()=>{let o=this._content;o&&(o.style.display="",o.style.position="absolute",o.style.left=`${t-i.left}px`,o.style.top=`${r-i.top}px`,o.dataset.state="open",this.isOpen=!0)})}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}_handleRadioSelected(e){this.querySelectorAll("rtg-context-menu-radio-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}getAttributesToExclude(){return[]}firstUpdated(e){var t;this.moveLightDomChildrenInto(this._containerElement),(t=this._triggerElement)==null||t.addEventListener("contextmenu",r=>{this.toggleDropdown(r)}),this.style.position="relative"}createRenderRoot(){return this}render(){return c`
|
|
3800
3800
|
<div
|
|
3801
3801
|
part="context-menu"
|
|
3802
3802
|
class=${m(wt.root,this.className)}
|
|
3803
3803
|
></div>
|
|
3804
|
-
`}};n([k(),d("design:type",Object)],
|
|
3804
|
+
`}};n([k(),d("design:type",Object)],qo.prototype,"isOpen",void 0),qo=n([h("rtg-context-menu")],qo);var qs={root:["rtg-relative"],trigger:[""],content:["rtg-absolute rtg-z-50","rtg-p-popover-content-space-p","rtg-w-popover-content-space-w","rtg-text-popover-content-color-text","rtg-bg-popover-content-color-bg","rtg-rounded-popover-content-radius rtg-border-popover-content-width-border rtg-border-popover-content-color-border rtg-outline-hidden","rtg-shadow-popover-content-shadow",'data-[state="open"]:rtg-block data-[state="closed"]:rtg-hidden','data-[state="open"]:rtg-animate-in data-[state="open"]:rtg-fade-in-0 data-[state="open"]:rtg-zoom-in-95','data-[state="closed"]:rtg-animate-out data-[state="closed"]:rtg-fade-out-0 data-[state="closed"]:rtg-zoom-out-95',"rtg-translate-y-0.5"]},br=class extends x{constructor(...e){super(...e),this.enableDefaultStyle=!0,this.styleContent=!0,this.side="bottom",this.state="closed"}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof Qr);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-content]")}handleClickOutside(e){let t=this._popover;t&&!t.contains(e.target)&&(t.isOpen=!1)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement),window.addEventListener("click",this.handleClickOutside.bind(this))}updated(e){var t;(t=this._popover)!=null&&t.isOpen||window.removeEventListener("click",this.handleClickOutside.bind(this))}preventClickPropagation(e){e.stopPropagation()}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return c`
|
|
3805
3805
|
<div
|
|
3806
3806
|
part="popover-content"
|
|
3807
3807
|
data-state=${this.state}
|
|
3808
|
-
class=${m(
|
|
3808
|
+
class=${m(qs.content,this.className)}
|
|
3809
3809
|
@click="${this.preventClickPropagation}"
|
|
3810
3810
|
></div>
|
|
3811
|
-
`}};n([l({type:Boolean}),d("design:type",Object)],
|
|
3811
|
+
`}};n([l({type:Boolean}),d("design:type",Object)],br.prototype,"enableDefaultStyle",void 0),n([l({type:Boolean}),d("design:type",Object)],br.prototype,"styleContent",void 0),n([l({type:String}),d("design:type",String)],br.prototype,"side",void 0),n([l({attribute:"data-state",type:String}),d("design:type",String)],br.prototype,"state",void 0),br=n([h("rtg-popover-content")],br);var aa=class extends x{constructor(...e){super(...e),this.handleClick=()=>{let t=this._popover;t&&(t.isOpen=!t.isOpen)}}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof Qr);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{this.handleClick(),t.stopPropagation()})}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}render(){return c`
|
|
3812
3812
|
<div
|
|
3813
3813
|
part="popover-trigger"
|
|
3814
|
-
class=${m(
|
|
3814
|
+
class=${m(qs.trigger,this.className)}
|
|
3815
3815
|
></div>
|
|
3816
|
-
`}};
|
|
3817
|
-
<div part="popover" class=${m(
|
|
3818
|
-
`}};n([k(),d("design:type",Boolean)],
|
|
3816
|
+
`}};aa=n([h("rtg-popover-trigger")],aa);var Qr=class extends x{constructor(...e){super(...e),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=popover]")}get _contentElement(){return this.querySelector("rtg-popover-content")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){this._contentElement.state=this.isOpen?"open":"closed",this._contentElement.requestUpdate()}render(){return c`
|
|
3817
|
+
<div part="popover" class=${m(qs.root,this.className)}></div>
|
|
3818
|
+
`}};n([k(),d("design:type",Boolean)],Qr.prototype,"isOpen",void 0),Qr=n([h("rtg-popover")],Qr);var fi={root:[""],trigger:[""],triggerButton:[Jr({variant:"outline"}).replace("rtg-justify-center",""),"rtg-justify-start","rtg-w-date-picker-trigger-button-space-w","rtg-text-left rtg-font-date-picker-trigger-button-font-weight","data-[empty=true]:rtg-text-date-picker-trigger-button-color-text-empty"],content:["rtg-p-date-picker-content-space-p","rtg-w-auto"]},Ho=class extends v{constructor(...e){super(...e),this.selectedDate=null}handleDateSelected(e){this.selectedDate=e.detail.startDate,this.requestUpdate()}createRenderRoot(){return this}render(){return c`
|
|
3819
3819
|
<rtg-popover
|
|
3820
|
-
class=${m("date-picker",
|
|
3820
|
+
class=${m("date-picker",fi.root,this.className)}
|
|
3821
3821
|
@date-selected=${this.handleDateSelected}
|
|
3822
3822
|
>
|
|
3823
3823
|
<rtg-popover-trigger
|
|
3824
3824
|
as-child
|
|
3825
|
-
class=${m("date-picker-trigger",
|
|
3825
|
+
class=${m("date-picker-trigger",fi.trigger)}
|
|
3826
3826
|
>
|
|
3827
3827
|
<button
|
|
3828
3828
|
data-variant="outline"
|
|
3829
3829
|
data-size="default"
|
|
3830
3830
|
data-empty=${this.selectedDate?"false":"true"}
|
|
3831
|
-
class=${m("date-picker-trigger-button",
|
|
3831
|
+
class=${m("date-picker-trigger-button",fi.triggerButton)}
|
|
3832
3832
|
>
|
|
3833
3833
|
<svg
|
|
3834
3834
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -3853,17 +3853,17 @@ body {
|
|
|
3853
3853
|
</rtg-popover-trigger>
|
|
3854
3854
|
|
|
3855
3855
|
<rtg-popover-content
|
|
3856
|
-
class=${m("date-picker-content",
|
|
3856
|
+
class=${m("date-picker-content",fi.content)}
|
|
3857
3857
|
>
|
|
3858
3858
|
<rtg-calendar mode="single"></rtg-calendar>
|
|
3859
3859
|
</rtg-popover-content>
|
|
3860
3860
|
</rtg-popover>
|
|
3861
|
-
`}};n([l({type:Object}),d("design:type",Object)],
|
|
3861
|
+
`}};n([l({type:Object}),d("design:type",Object)],Ho.prototype,"selectedDate",void 0),Ho=n([h("rtg-date-picker")],Ho);var Bt={root:[""],trigger:[""],close:[""],overlay:["rtg-fixed rtg-inset-0 rtg-z-50","rtg-bg-dialog-overlay-color-bg","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0"],content:{base:["rtg-fixed rtg-top-[50%] rtg-left-[50%] rtg-z-50","rtg-grid rtg-gap-dialog-content-space-gap","rtg-p-dialog-content-space-p","rtg-w-dialog-content-space-w rtg-max-w-dialog-content-space-max-w-sm sm:rtg-max-w-dialog-content-space-max-w","rtg-bg-dialog-content-color-bg","rtg-rounded-dialog-content-radius rtg-border-dialog-content-width-border rtg-border-dialog-content-color-border rtg-outline-none","rtg-shadow-dialog-content-shadow","rtg-duration-200","rtg-translate-x-[-50%] rtg-translate-y-[-50%]","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95"],close:{base:["rtg-absolute rtg-top-4 rtg-right-4","rtg-rounded-dialog-close-radius","rtg-ring-offset-dialog-close-color-ring-offset","rtg-transition-opacity","focus:rtg-ring-dialog-close-width-ring-focus focus:rtg-ring-dialog-close-color-ring-focus focus:rtg-ring-offset-dialog-close-width-ring-offset focus:rtg-outline-hidden","disabled:rtg-pointer-events-none","data-[state=open]:rtg-bg-dialog-close-color-bg data-[state=open]:rtg-text-dialog-close-color-text"],icon:["rtg-shrink-0","rtg-size-dialog-close-icon-space-size","rtg-pointer-events-none"]}},header:["rtg-flex rtg-flex-col rtg-gap-dialog-header-space-gap","rtg-text-center","sm:rtg-text-left"],footer:["rtg-flex rtg-flex-col-reverse rtg-gap-dialog-footer-space-gap","sm:rtg-flex-row sm:rtg-justify-end"],title:["rtg-text-dialog-title-font rtg-font-dialog-title-font-weight"],description:["rtg-text-dialog-description-font rtg-font-dialog-description-font-weight rtg-text-dialog-description-color-text"]},Cu="closed",la=class extends x{get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof Cr)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-close]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",()=>{let t=this._dialog;t&&(t.dataset.state=Cu)})}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return c`
|
|
3862
3862
|
<div
|
|
3863
3863
|
part="dialog-close"
|
|
3864
3864
|
class=${m(Bt.close,this.className)}
|
|
3865
3865
|
></div>
|
|
3866
|
-
`}};
|
|
3866
|
+
`}};la=n([h("rtg-dialog-close")],la);var Vo="closed",vi=class extends x{constructor(...e){super(...e),this.state=Vo,this.showCloseButton=!1,this.handleCloseButtonClick=()=>{let t=this._dialog;t&&(t.dataset.state=Vo)}}get _containerElement(){return this.querySelector("div[part=dialog-content-slot]")}get ـcomponentElement(){return this.querySelector("div[part=dialog-content]")}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof Cr)return e;e=e.parentElement}return e}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){requestAnimationFrame(()=>{e.get("state")===Vo?this.ـcomponentElement.style.display="grid":this.ـcomponentElement.style.display="none"})}render(){return c`
|
|
3867
3867
|
<div
|
|
3868
3868
|
rtgdlg-content
|
|
3869
3869
|
part="dialog-content"
|
|
@@ -3898,12 +3898,12 @@ body {
|
|
|
3898
3898
|
</button>
|
|
3899
3899
|
`:""}
|
|
3900
3900
|
</div>
|
|
3901
|
-
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],
|
|
3901
|
+
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],vi.prototype,"state",void 0),n([l({attribute:"show-close-button",type:Boolean}),d("design:type",Object)],vi.prototype,"showCloseButton",void 0),vi=n([h("rtg-dialog-content")],vi);var da=class extends x{get _containerElement(){return this.querySelector("div[part=dialog-footer]")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3902
3902
|
<div
|
|
3903
3903
|
part="dialog-footer"
|
|
3904
3904
|
class=${m(Bt.footer,this.className)}
|
|
3905
3905
|
></div>
|
|
3906
|
-
`}};
|
|
3906
|
+
`}};da=n([h("rtg-dialog-footer")],da);var yi=class extends v{constructor(...e){super(...e),this._title="",this.description=""}createRenderRoot(){return this}render(){return c`
|
|
3907
3907
|
<div
|
|
3908
3908
|
part="dialog-header"
|
|
3909
3909
|
class=${m(Bt.header,this.className)}
|
|
@@ -3914,17 +3914,17 @@ body {
|
|
|
3914
3914
|
${this.description}
|
|
3915
3915
|
</p>
|
|
3916
3916
|
</div>
|
|
3917
|
-
`}};n([l({attribute:"title",type:String}),d("design:type",Object)],
|
|
3917
|
+
`}};n([l({attribute:"title",type:String}),d("design:type",Object)],yi.prototype,"_title",void 0),n([l({type:String}),d("design:type",Object)],yi.prototype,"description",void 0),yi=n([h("rtg-dialog-header")],yi);var ca=class extends v{createRenderRoot(){return this}render(){return c`
|
|
3918
3918
|
<div
|
|
3919
3919
|
part="dialog-overly"
|
|
3920
3920
|
class=${m(Bt.overlay,this.className)}
|
|
3921
3921
|
></div>
|
|
3922
|
-
`}};
|
|
3922
|
+
`}};ca=n([h("rtg-dialog-overlay")],ca);var Eu="open",ua=class extends x{constructor(...e){super(...e),this.handleClick=()=>{let t=this._dialog;t&&(t.dataset.state=Eu)}}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof Cr)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{t.stopPropagation(),this.handleClick()})}getAttributesToExclude(){return[]}createRenderRoot(){return this}render(){return c`
|
|
3923
3923
|
<div
|
|
3924
3924
|
part="dialog-trigger"
|
|
3925
3925
|
class=${m(Bt.trigger,this.className)}
|
|
3926
3926
|
></div>
|
|
3927
|
-
`}};
|
|
3927
|
+
`}};ua=n([h("rtg-dialog-trigger")],ua);var ku="open",Ru="closed",Cr=class extends x{constructor(...e){super(...e),this.state=Ru}get _containerElement(){return this.querySelector("div[rtgdlg-root]")}get _content(){return this.querySelector("rtg-dialog-content")||null}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.state)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[]}render(){return c`
|
|
3928
3928
|
<div
|
|
3929
3929
|
rtgdlg-root
|
|
3930
3930
|
part="dialog"
|
|
@@ -3932,12 +3932,12 @@ body {
|
|
|
3932
3932
|
>
|
|
3933
3933
|
${this.state===ku?c` <rtg-dialog-overlay></rtg-dialog-overlay>`:f}
|
|
3934
3934
|
</div>
|
|
3935
|
-
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)]
|
|
3935
|
+
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],Cr.prototype,"state",void 0),Cr=n([h("rtg-dialog")],Cr);var Gt={open:"open",closed:"closed"},Xt={root:[""],trigger:[""],close:[""],overlay:["rtg-fixed rtg-inset-0 rtg-z-50","rtg-bg-drawer-overlay-color-bg","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0"],content:{base:["rtg-fixed rtg-inset-x-0 rtg-bottom-0 rtg-z-50","rtg-flex rtg-flex-col","rtg-mt-drawer-content-space-mt","rtg-h-auto rtg-max-h-[80vh]","rtg-bg-drawer-content-color-bg","rtg-rounded-t-drawer-content-radius rtg-border-t-drawer-content-width-border rtg-border-t-drawer-content-color-border"],thumb:["rtg-shrink-0","rtg-mx-auto rtg-mt-drawer-thumb-space-mt","rtg-w-drawer-thumb-space-w rtg-h-drawer-thumb-space-h","rtg-bg-drawer-thumb-color-bg","rtg-rounded-drawer-thumb-radius"]},header:["rtg-flex rtg-flex-col rtg-gap-drawer-header-space-gap-sm md:rtg-gap-drawer-header-space-gap","rtg-p-drawer-header-space-p","rtg-text-center"],footer:["rtg-flex rtg-flex-col rtg-gap-drawer-footer-space-gap","rtg-p-drawer-footer-space-p rtg-mt-auto"],title:["rtg-text-drawer-title-font rtg-font-drawer-title-font-weight rtg-text-drawer-title-color-text"],description:["rtg-text-drawer-description-font rtg-font-drawer-description-font-weight rtg-text-drawer-description-color-text"]},pa=class extends x{get _drawer(){let e=this.parentElement;for(;e;){if(e instanceof ti)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=drawer-close]")}async firstUpdated(e){super.firstUpdated(e),await this.updateComplete;let t=this._containerElement;if(t){this.moveLightDomChildrenInto(t);let r=t.querySelector("button, [data-close], [role=button]");r&&r.addEventListener("click",i=>{i.stopPropagation();let o=this._drawer;o&&(o.dataset.state=Gt.closed)})}}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return c`
|
|
3936
3936
|
<div
|
|
3937
3937
|
part="drawer-close"
|
|
3938
|
-
class=${m(
|
|
3938
|
+
class=${m(Xt.close,this.className)}
|
|
3939
3939
|
></div>
|
|
3940
|
-
`}};
|
|
3940
|
+
`}};pa=n([h("rtg-drawer-close")],pa);var Wo=class extends x{constructor(...e){super(...e),this.state=Gt.closed}connectedCallback(){super.connectedCallback();let e=document.createElement("style");e.textContent=`
|
|
3941
3941
|
@keyframes slideInUp {
|
|
3942
3942
|
from { transform: translateY(100%); }
|
|
3943
3943
|
to { transform: translateY(0); }
|
|
@@ -3957,54 +3957,54 @@ body {
|
|
|
3957
3957
|
.drawer-closed {
|
|
3958
3958
|
animation: slideOutDown 0.5s cubic-bezier(0.32, 0.72, 0, 1) forwards;
|
|
3959
3959
|
}
|
|
3960
|
-
`,this.querySelector("style[data-injected]")||(e.setAttribute("data-injected","true"),this.prepend(e))}get _containerElement(){return this.querySelector("div[part=drawer-content-slot]")}get ـcomponentElement(){return this.querySelector("div[part=drawer-content]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){requestAnimationFrame(()=>{e.get("state")===
|
|
3960
|
+
`,this.querySelector("style[data-injected]")||(e.setAttribute("data-injected","true"),this.prepend(e))}get _containerElement(){return this.querySelector("div[part=drawer-content-slot]")}get ـcomponentElement(){return this.querySelector("div[part=drawer-content]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){requestAnimationFrame(()=>{e.get("state")===Gt.closed?this.ـcomponentElement.style.display="flex":this.ـcomponentElement.style.display="none"})}render(){return c`
|
|
3961
3961
|
<div
|
|
3962
3962
|
rtgdlg-content
|
|
3963
3963
|
part="drawer-content"
|
|
3964
|
-
class=${m(
|
|
3964
|
+
class=${m(Xt.content.base,this.state===Gt.open?"drawer-open":"drawer-closed",this.className)}
|
|
3965
3965
|
>
|
|
3966
|
-
<div part="drawer-thumb" class=${m(
|
|
3966
|
+
<div part="drawer-thumb" class=${m(Xt.content.thumb)}></div>
|
|
3967
3967
|
<div part="drawer-content-slot"></div>
|
|
3968
3968
|
</div>
|
|
3969
|
-
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],
|
|
3969
|
+
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],Wo.prototype,"state",void 0),Wo=n([h("rtg-drawer-content")],Wo);var ha=class extends x{get _containerElement(){return this.querySelector("p[part=drawer-description")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3970
3970
|
<p
|
|
3971
3971
|
part="drawer-description"
|
|
3972
|
-
class=${m(
|
|
3972
|
+
class=${m(Xt.description,this.className)}
|
|
3973
3973
|
></p>
|
|
3974
|
-
`}};
|
|
3974
|
+
`}};ha=n([h("rtg-drawer-description")],ha);var ga=class extends x{get _containerElement(){return this.querySelector("div[part=drawer-footer]")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3975
3975
|
<div
|
|
3976
3976
|
part="drawer-footer"
|
|
3977
|
-
class=${m(
|
|
3977
|
+
class=${m(Xt.footer,this.className)}
|
|
3978
3978
|
></div>
|
|
3979
|
-
`}};
|
|
3979
|
+
`}};ga=n([h("rtg-drawer-footer")],ga);var ma=class extends x{get _containerElement(){return this.querySelector("div[part=drawer-header")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3980
3980
|
<div
|
|
3981
3981
|
part="drawer-header"
|
|
3982
|
-
class=${m(
|
|
3982
|
+
class=${m(Xt.header,this.className)}
|
|
3983
3983
|
></div>
|
|
3984
|
-
`}};
|
|
3984
|
+
`}};ma=n([h("rtg-drawer-header")],ma);var ba=class extends v{createRenderRoot(){return this}render(){return c`
|
|
3985
3985
|
<div
|
|
3986
3986
|
part="drawer-overly"
|
|
3987
|
-
class=${m(
|
|
3987
|
+
class=${m(Xt.overlay,this.className)}
|
|
3988
3988
|
></div>
|
|
3989
|
-
`}};
|
|
3989
|
+
`}};ba=n([h("rtg-drawer-overlay")],ba);var fa=class extends x{get _containerElement(){return this.querySelector("h2[part=drawer-title")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
3990
3990
|
<h2
|
|
3991
3991
|
part="drawer-title"
|
|
3992
|
-
class=${m(
|
|
3992
|
+
class=${m(Xt.title,this.className)}
|
|
3993
3993
|
></h2>
|
|
3994
|
-
`}};
|
|
3994
|
+
`}};fa=n([h("rtg-drawer-title")],fa);var va=class extends x{constructor(...e){super(...e),this.handleClick=()=>{let t=this._drawer;t&&(t.dataset.state=Gt.open)}}get _drawer(){let e=this.parentElement;for(;e;){if(e instanceof ti)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=drawer-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{t.stopPropagation(),this.handleClick()})}getAttributesToExclude(){return[]}createRenderRoot(){return this}render(){return c`
|
|
3995
3995
|
<div
|
|
3996
3996
|
part="drawer-trigger"
|
|
3997
|
-
class=${m(
|
|
3997
|
+
class=${m(Xt.trigger,this.className)}
|
|
3998
3998
|
></div>
|
|
3999
|
-
`}};
|
|
3999
|
+
`}};va=n([h("rtg-drawer-trigger")],va);var ti=class extends x{constructor(...e){super(...e),this.state=Gt.closed,this.handleOutsideClick=t=>{let r=this._content;this.state===Gt.open&&r&&(r.contains(t.target)||(this.state=Gt.closed,this.dispatchEvent(new CustomEvent("drawer-close"))))}}get _containerElement(){return this.querySelector("div[rtgdlg-root]")}get _content(){return this.querySelector("rtg-drawer-content")||null}connectedCallback(){super.connectedCallback(),this.setupOutsideClickHandler()}disconnectedCallback(){super.disconnectedCallback(),this.removeOutsideClickHandler()}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.state),e.has("state")&&this.setupOutsideClickHandler()}setupOutsideClickHandler(){this.state===Gt.open?document.addEventListener("click",this.handleOutsideClick):this.removeOutsideClickHandler()}removeOutsideClickHandler(){document.removeEventListener("click",this.handleOutsideClick)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[]}render(){return c`
|
|
4000
4000
|
<div
|
|
4001
4001
|
rtgdlg-root
|
|
4002
4002
|
part="drawer"
|
|
4003
|
-
class=${m(
|
|
4003
|
+
class=${m(Xt.root,this.className)}
|
|
4004
4004
|
>
|
|
4005
|
-
${this.state===
|
|
4005
|
+
${this.state===Gt.open?c` <rtg-drawer-overlay></rtg-drawer-overlay>`:f}
|
|
4006
4006
|
</div>
|
|
4007
|
-
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],
|
|
4007
|
+
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],ti.prototype,"state",void 0),ti=n([h("rtg-drawer")],ti);var xt={root:[""],content:["rtg-overflow-x-hidden rtg-overflow-y-auto rtg-z-50","rtg-p-dropdown-menu-content-space-p","rtg-min-w-dropdown-menu-content-space-min-w","rtg-text-dropdown-menu-content-color-text","rtg-bg-dropdown-menu-content-color-bg","rtg-rounded-dropdown-menu-content-radius rtg-border-dropdown-menu-content-width-border rtg-border-dropdown-menu-content-color-border","rtg-shadow-dropdown-menu-content-shadow","rtg-translate-y-0.5","rtg-slide-in-from-top-2","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95"],group:[""],item:["rtg-flex rtg-relative","rtg-gap-dropdown-menu-item-space-gap rtg-items-center","rtg-px-dropdown-menu-item-space-px rtg-py-dropdown-menu-item-space-py","rtg-text-dropdown-menu-item-font","rtg-rounded-dropdown-menu-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","hover:rtg-bg-dropdown-menu-item-color-bg-hover hover:rtg-text-dropdown-menu-item-color-text-hover","focus:rtg-bg-dropdown-menu-item-color-bg-focus focus:rtg-text-dropdown-menu-item-color-text-focus","data-[disabled]:rtg-opacity-dropdown-menu-item-opacity-disabled data-[disabled]:rtg-pointer-events-none",'[&_svg]:rtg-shrink-0 [&_svg:not([class*="rtg-size-"])]:rtg-size-dropdown-menu-item-icon-space-size [&_svg:not([class*="rtg-text-"])]:rtg-text-dropdown-menu-item-icon-color-text [&_svg]:rtg-pointer-events-none'],checkboxItem:{base:["rtg-flex rtg-relative","rtg-gap-dropdown-menu-checkbox-item-space-gap rtg-items-center","rtg-pl-dropdown-menu-checkbox-item-space-pl rtg-pr-dropdown-menu-checkbox-item-space-pr rtg-py-dropdown-menu-checkbox-item-space-py","rtg-text-dropdown-menu-checkbox-item-font","rtg-rounded-dropdown-menu-checkbox-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","aria-selected:rtg-bg-dropdown-menu-checkbox-item-color-bg-focus aria-selected:rtg-text-dropdown-menu-checkbox-item-color-text-focus","data-[disabled]:rtg-opacity-dropdown-menu-checkbox-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],span:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-dropdown-menu-checkbox-item-icon-container-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-dropdown-menu-checkbox-item-icon-space-size","rtg-pointer-events-none"]},radioItem:{base:["rtg-flex rtg-relative","rtg-gap-dropdown-menu-radio-item-space-gap rtg-items-center","rtg-pl-dropdown-menu-radio-item-space-pl rtg-pr-dropdown-menu-radio-item-space-pr rtg-py-dropdown-menu-radio-item-space-py","rtg-text-dropdown-menu-radio-item-font","rtg-rounded-dropdown-menu-radio-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","aria-selected:rtg-bg-dropdown-menu-radio-item-color-bg-focus aria-selected:rtg-text-dropdown-menu-radio-item-color-text-focus","data-[disabled]:rtg-opacity-dropdown-menu-radio-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],span:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-dropdown-menu-radio-item-icon-container-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-dropdown-menu-radio-item-icon-space-size","rtg-pointer-events-none","rtg-fill-current"]},label:["rtg-px-dropdown-menu-label-space-px rtg-py-dropdown-menu-label-space-py","rtg-text-dropdown-menu-label-font rtg-font-dropdown-menu-label-font-weight"],separator:["rtg-mx-dropdown-menu-separator-space-mx rtg-my-dropdown-menu-separator-space-my","rtg-h-dropdown-menu-separator-space-h","rtg-bg-dropdown-menu-separator-color-bg"],shortcut:["rtg-ml-auto","rtg-text-dropdown-menu-shortcut-font rtg-text-dropdown-menu-shortcut-color-text"]},ze=class extends x{constructor(...e){super(...e),this._id="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=dropdown-menu-checkbox-item-container]")}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof Er);)e=e.parentElement;return e}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this._dropdownMenu.isOpen=!1,this.checked=!this.checked}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4008
4008
|
<div
|
|
4009
4009
|
rtgcmd-item
|
|
4010
4010
|
part="dropdown-menu-item"
|
|
@@ -4041,14 +4041,14 @@ body {
|
|
|
4041
4041
|
</span>
|
|
4042
4042
|
<div part="dropdown-menu-checkbox-item-container"></div>
|
|
4043
4043
|
</div>
|
|
4044
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
4044
|
+
`}};n([l({type:String}),d("design:type",Object)],ze.prototype,"_id",void 0),n([l({attribute:"data-value",type:String}),d("design:type",void 0),d("design:paramtypes",[])],ze.prototype,"value",null),n([l({type:Boolean}),d("design:type",Object)],ze.prototype,"selected",void 0),n([l({type:Boolean}),d("design:type",Object)],ze.prototype,"checked",void 0),n([l({attribute:"data-disabled",type:Boolean}),d("design:type",Object)],ze.prototype,"disabled",void 0),ze=n([h("rtg-dropdown-menu-checkbox-item")],ze);var Hs="closed",wi=class extends x{constructor(...e){super(...e),this.state=Hs,this.isOpen=!1}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof Er);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=dropdown-menu-content]")}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4045
4045
|
<div
|
|
4046
4046
|
data-slot="dropdown-menu-content"
|
|
4047
4047
|
part="dropdown-menu-content"
|
|
4048
4048
|
style="display: ${this.isOpen?"block":"none"};"
|
|
4049
4049
|
class=${m(xt.content,this.className)}
|
|
4050
4050
|
></div>
|
|
4051
|
-
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],
|
|
4051
|
+
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],wi.prototype,"state",void 0),n([k(),d("design:type",Object)],wi.prototype,"isOpen",void 0),wi=n([h("rtg-dropdown-menu-content")],wi);var Mr=class extends x{constructor(...e){super(...e),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[rtgcmd-group-items]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`${this._hidden==="true"?f:c`
|
|
4052
4052
|
<div
|
|
4053
4053
|
rtgcmd-group
|
|
4054
4054
|
part="dropdown-menu-group"
|
|
@@ -4061,7 +4061,7 @@ body {
|
|
|
4061
4061
|
|
|
4062
4062
|
<div rtgcmd-group-items role="group"></div>
|
|
4063
4063
|
</div>
|
|
4064
|
-
`}`}};n([l({type:String}),d("design:type",Object)],
|
|
4064
|
+
`}`}};n([l({type:String}),d("design:type",Object)],Mr.prototype,"heading",void 0),n([l({attribute:"id",type:String}),d("design:type",Object)],Mr.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],Mr.prototype,"_hidden",void 0),Mr=n([h("rtg-dropdown-menu-group")],Mr);var je=class extends x{constructor(...e){super(...e),this._id="",this._hidden="",this.selected=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=dropdown-menu-item]")}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof Er);)e=e.parentElement;return e}handleMouseEvent(e){console.log(e,this.value),(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}handleClickDefault(){this._dropdownMenu.isOpen=!1}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c` ${this._hidden==="true"?f:c`
|
|
4065
4065
|
<div
|
|
4066
4066
|
rtgcmd-item
|
|
4067
4067
|
part="dropdown-menu-item"
|
|
@@ -4077,7 +4077,7 @@ body {
|
|
|
4077
4077
|
@click="${this.handleClickDefault}"
|
|
4078
4078
|
class=${m(xt.item,this.className)}
|
|
4079
4079
|
></div>
|
|
4080
|
-
`}`}};n([l({type:String}),d("design:type",Object)],
|
|
4080
|
+
`}`}};n([l({type:String}),d("design:type",Object)],je.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],je.prototype,"_hidden",void 0),n([l({attribute:"data-value",type:String}),d("design:type",void 0),d("design:paramtypes",[])],je.prototype,"value",null),n([l({type:Boolean}),d("design:type",Object)],je.prototype,"selected",void 0),n([l({attribute:"data-disabled",type:Boolean}),d("design:type",Object)],je.prototype,"disabled",void 0),je=n([h("rtg-dropdown-menu-item")],je);var de=class extends x{constructor(...e){super(...e),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=dropdown-menu-radio-item-container]")}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4081
4081
|
<div
|
|
4082
4082
|
rtgcmd-item
|
|
4083
4083
|
part="dropdown-menu-radio"
|
|
@@ -4112,27 +4112,27 @@ body {
|
|
|
4112
4112
|
</span>
|
|
4113
4113
|
<div part="dropdown-menu-radio-item-container"></div>
|
|
4114
4114
|
</div>
|
|
4115
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
4115
|
+
`}};n([l({type:String}),d("design:type",Object)],de.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],de.prototype,"_hidden",void 0),n([l({attribute:"data-value",type:String}),d("design:type",void 0),d("design:paramtypes",[])],de.prototype,"value",null),n([l({type:Boolean}),d("design:type",Object)],de.prototype,"selected",void 0),n([l({type:Boolean}),d("design:type",Object)],de.prototype,"checked",void 0),n([l({attribute:"data-disabled",type:Boolean}),d("design:type",Object)],de.prototype,"disabled",void 0),de=n([h("rtg-dropdown-menu-radio-item")],de);var ya=class extends x{get _containerElement(){return this.querySelector("div[part=dropdown-menu-seperator]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`<div
|
|
4116
4116
|
rtgcmd-separator
|
|
4117
4117
|
part="dropdown-menu-seperator"
|
|
4118
4118
|
role="separator"
|
|
4119
4119
|
class=${m(xt.separator,this.className)}
|
|
4120
|
-
></div>`}};
|
|
4120
|
+
></div>`}};ya=n([h("rtg-dropdown-menu-separator")],ya);var wa=class extends x{get _containerElement(){return this.querySelector("span[part=dropdown-menu-shortcut]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this.classList=m(xt.shortcut),this}render(){return c`
|
|
4121
4121
|
<span
|
|
4122
4122
|
part="dropdown-menu-shortcut"
|
|
4123
4123
|
class=${m(xt.shortcut,this.className)}
|
|
4124
4124
|
>
|
|
4125
4125
|
</span>
|
|
4126
|
-
`}};
|
|
4126
|
+
`}};wa=n([h("rtg-dropdown-menu-shortcut")],wa);var xa=class extends v{createRenderRoot(){return this}render(){return c``}};xa=n([h("rtg-dropdown-menu-trigger")],xa);var It,Ge,Er=(Ge=class extends x{constructor(...t){super(...t),this.isOpen=!1,this.handleClickOutside=r=>{var o,s;let i=r.target;!((o=this._containerElement)!=null&&o.contains(i))&&!((s=this._triggerElement)!=null&&s.contains(i))&&(this.isOpen=!1,It._openInstance===this&&(It._openInstance=null))}}get _triggerElement(){return this.querySelector("rtg-dropdown-menu-trigger")}get _containerElement(){return this.querySelector("div[part=dropdown-menu]")}get _content(){return this.querySelector("rtg-dropdown-menu-content")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}toggleDropdown(t){t.stopPropagation();let r=this.isOpen;this.isOpen=!this.isOpen,this.isOpen?(It._openInstance&&It._openInstance!==this&&(It._openInstance.isOpen=!1),It._openInstance=this):r&&It._openInstance===this&&(It._openInstance=null)}disconnectedCallback(){It._openInstance===this&&(It._openInstance=null),document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}updated(t){super.updated(t);let r=this._content;r&&(r.dataset.state=this.isOpen?"open":"close")}firstUpdated(t){var r;this.moveLightDomChildrenInto(this._containerElement),(r=this._triggerElement)==null||r.addEventListener("click",i=>this.toggleDropdown(i))}_handleRadioSelected(t){this.isOpen=!1,this.querySelectorAll("rtg-dropdown-menu-radio-item").forEach(r=>{r!==t.target&&(r.checked=!1)})}createRenderRoot(){return this}render(){return c`
|
|
4127
4127
|
<div
|
|
4128
4128
|
part="dropdown-menu"
|
|
4129
4129
|
class=${m(xt.root,this.className)}
|
|
4130
4130
|
></div>
|
|
4131
|
-
`}},It=
|
|
4131
|
+
`}},It=Ge,Ge._openInstance=null,Ge);n([k(),d("design:type",Object)],Er.prototype,"isOpen",void 0),Er=It=n([h("rtg-dropdown-menu")],Er);var Go=class extends v{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="empty"]')}firstUpdated(){let e=this._rootSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="empty" ?data-border="${this.border}"></div>`}};n([l({type:Boolean}),d("design:type",Boolean)],Go.prototype,"border",void 0),Go=n([h("rtg-empty")],Go);var _a=class extends v{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="empty-content"]')}firstUpdated(){let e=this._contentSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="empty-content"></div>`}};_a=n([h("rtg-empty-content")],_a);var Sa=class extends v{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="empty-description"]')}firstUpdated(){let e=this._descriptionSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="empty-description"></div>`}};Sa=n([h("rtg-empty-description")],Sa);var $a=class extends v{createRenderRoot(){return this}get _headerSlot(){return this.querySelector('[data-slot="empty-header"]')}firstUpdated(){let e=this._headerSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="empty-header"></div>`}};$a=n([h("rtg-empty-header")],$a);var Ko=class extends v{constructor(...e){super(...e),this.variant="default"}createRenderRoot(){return this}get _mediaSlot(){return this.querySelector('[data-slot="empty-media"]')}firstUpdated(){let e=this._mediaSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`
|
|
4132
4132
|
<div data-slot="empty-media" data-variant="${this.variant}"></div>
|
|
4133
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
4133
|
+
`}};n([l({type:String}),d("design:type",Object)],Ko.prototype,"variant",void 0),Ko=n([h("rtg-empty-media")],Ko);var Ca=class extends v{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="empty-title"]')}firstUpdated(){let e=this._titleSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="empty-title"></div>`}};Ca=n([h("rtg-empty-title")],Ca);var Ea=class extends v{createRenderRoot(){return this}get _setSlot(){return this.querySelector('[data-slot="field-set"]')}firstUpdated(){let e=this._setSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<fieldset data-slot="field-set"></fieldset>`}};Ea=n([h("rtg-field-set")],Ea);var Yo=class extends v{constructor(...e){super(...e),this.variant="legend"}createRenderRoot(){return this}get _legendSlot(){return this.querySelector('[data-slot="field-legend"]')}firstUpdated(){let e=this._legendSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`
|
|
4134
4134
|
<legend data-slot="field-legend" data-variant=${this.variant}></legend>
|
|
4135
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
4135
|
+
`}};n([l({type:String}),d("design:type",Object)],Yo.prototype,"variant",void 0),Yo=n([h("rtg-field-legend")],Yo);var Xo=class extends v{constructor(...e){super(...e),this.type="field"}createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="field-group"]')}firstUpdated(){let e=this._groupSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="field-group" data-type=${this.type}></div>`}};n([l({type:String}),d("design:type",Object)],Xo.prototype,"type",void 0),Xo=n([h("rtg-field-group")],Xo);var qr=class extends v{constructor(...e){super(...e),this.orientation="vertical"}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="field"]')}firstUpdated(){let e=this._rootSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`
|
|
4136
4136
|
<div
|
|
4137
4137
|
data-slot="field"
|
|
4138
4138
|
data-orientation=${this.orientation}
|
|
@@ -4140,83 +4140,83 @@ body {
|
|
|
4140
4140
|
data-invalid=${this.invalid?"true":f}
|
|
4141
4141
|
role="group"
|
|
4142
4142
|
></div>
|
|
4143
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
4143
|
+
`}};n([l({type:String}),d("design:type",Object)],qr.prototype,"orientation",void 0),n([l({type:Boolean}),d("design:type",Boolean)],qr.prototype,"disabled",void 0),n([l({type:Boolean}),d("design:type",Boolean)],qr.prototype,"invalid",void 0),qr=n([h("rtg-field")],qr);var ka=class extends v{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="field-content"]')}firstUpdated(){let e=this._contentSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="field-content"></div>`}};ka=n([h("rtg-field-content")],ka);var Zo=class extends v{get _rootSlot(){return this.querySelector('[data-slot="label"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return c`<label data-slot="label" for=${this.for??f}></label>`}};n([l({type:String}),d("design:type",String)],Zo.prototype,"for",void 0),Zo=n([h("rtg-label")],Zo);var Jo=class extends v{createRenderRoot(){return this}get _labelSlot(){return this.querySelector('[data-slot="field-label"]')}firstUpdated(){let e=this._labelSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`
|
|
4144
4144
|
<rtg-label data-slot="field-label" for=${this.for??f}></rtg-label>
|
|
4145
|
-
`}};n([l({type:String}),d("design:type",String)],
|
|
4145
|
+
`}};n([l({type:String}),d("design:type",String)],Jo.prototype,"for",void 0),Jo=n([h("rtg-field-label")],Jo);var Ra=class extends v{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="field-label"]')}firstUpdated(){let e=this._titleSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="field-label"></div>`}};Ra=n([h("rtg-field-title")],Ra);var Oa=class extends v{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="field-description"]')}firstUpdated(){let e=this._descriptionSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<p data-slot="field-description"></p>`}};Oa=n([h("rtg-field-description")],Oa);var Aa=class extends v{constructor(...e){super(...e),this._observer=null}createRenderRoot(){return this}get _separatorSlot(){return this.querySelector('[data-slot="field-separator"]')}get _contentSlot(){return this.querySelector('[data-slot="field-separator-content"]')}_getExternalNodes(){let e=this._separatorSlot;return Array.from(this.childNodes).filter(t=>{var r;return!(t===e||t.nodeType===Node.COMMENT_NODE||t.nodeType===Node.TEXT_NODE&&!((r=t.textContent)!=null&&r.trim()))})}_processChildren(){let e=this._separatorSlot;if(!e)return;let t=this._getExternalNodes();if(t.length>0){let r=this._contentSlot;r||(r=document.createElement("span"),r.setAttribute("data-slot","field-separator-content"),e.appendChild(r)),t.forEach(i=>r.appendChild(i)),e.setAttribute("data-content","true")}else{let r=this._contentSlot;r&&e.removeChild(r),e.setAttribute("data-content","false")}}firstUpdated(){this._processChildren(),this._observer=new MutationObserver(()=>{this._observer.disconnect(),this._processChildren(),this._observer.observe(this,{childList:!0})}),this._observer.observe(this,{childList:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._observer)==null||e.disconnect(),this._observer=null}render(){return c`
|
|
4146
4146
|
<div data-slot="field-separator">
|
|
4147
4147
|
<rtg-separator></rtg-separator>
|
|
4148
4148
|
<span data-slot="field-separator-content"></span>
|
|
4149
4149
|
</div>
|
|
4150
|
-
`}};
|
|
4150
|
+
`}};Aa=n([h("rtg-field-separator")],Aa);var Qo=class extends v{constructor(...e){super(...e),this._hasUserContent=!1}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._hasUserContent=this.innerHTML.trim().length>0}_renderContent(){var t,r;if(!((t=this.errors)!=null&&t.length))return null;let e=[...new Map(this.errors.map(i=>[i==null?void 0:i.message,i])).values()];return e.length===1?(r=e[0])!=null&&r.message?e[0].message:null:c`
|
|
4151
4151
|
<ul data-slot="field-error-content">
|
|
4152
4152
|
${e.map((i,o)=>i!=null&&i.message?c`<li key=${o}>${i.message}</li>`:f)}
|
|
4153
4153
|
</ul>
|
|
4154
|
-
`}render(){let e=this._hasUserContent,t=this._renderContent();return e?c` <div data-slot="field-error" role="alert">${Array.from(this.childNodes)}</div>`:t?c` <div data-slot="field-error" role="alert">${t}</div>`:(this.style.display="none",f)}};n([l({type:Array}),d("design:type",Array)],
|
|
4154
|
+
`}render(){let e=this._hasUserContent,t=this._renderContent();return e?c` <div data-slot="field-error" role="alert">${Array.from(this.childNodes)}</div>`:t?c` <div data-slot="field-error" role="alert">${t}</div>`:(this.style.display="none",f)}};n([l({type:Array}),d("design:type",Array)],Qo.prototype,"errors",void 0),Qo=n([h("rtg-field-error")],Qo);var Se=class{constructor(){this.values={},this.errors={},this.validators={},this.subscribers=new Set}registerField({name:e,defaultValue:t="",validator:r}){e in this.values||(this.values[e]=t),r&&(this.validators[e]=r)}unregisterField(e){delete this.values[e],delete this.errors[e],delete this.validators[e]}setValue(e,t){e in this.validators||console.warn(`[FormController] setValue called before validator was registered for "${e}"`),this.values[e]=t,this.validateField(e),this.notify()}getValue(e){return this.values[e]}getError(e){return this.errors[e]??null}validateField(e){let t=this.validators[e],r=this.values[e],i=t?t(r):null;return this.errors[e]=i,this.notify(),!i}validateAll(){let e=!0;return Object.keys(this.validators).forEach(t=>{this.validateField(t)||(e=!1)}),e}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}notify(){this.subscribers.forEach(e=>e())}getValues(){return{...this.values}}getErrors(){return{...this.errors}}},di="rtg-form-context",ts=class extends x{constructor(...e){super(...e),this.form=new Se,this.handleSubmit=t=>{if(t.preventDefault(),this.form.validateAll()){let r=this.form.getValues();alert(JSON.stringify(r,null,2))}}}createRenderRoot(){return this}async firstUpdated(e){await this.updateComplete,Array.from(this.childNodes).forEach(t=>{t!==this.formElement&&this.formElement.appendChild(t)}),this.querySelectorAll("rtg-form-field").forEach(t=>{var o;let r=t.getAttribute("name"),i=(o=t.validators)==null?void 0:o[0];this.form.registerField({name:r,validator:i})})}render(){return c`
|
|
4155
4155
|
<form
|
|
4156
4156
|
part="form-controller"
|
|
4157
4157
|
class="${m("",this.className)}"
|
|
4158
4158
|
@submit=${this.handleSubmit}
|
|
4159
4159
|
${Ec(e=>this.formElement=e)}
|
|
4160
4160
|
></form>
|
|
4161
|
-
`}};n([k()
|
|
4161
|
+
`}};n([k(),Ce({context:di}),d("design:type",Object)],ts.prototype,"form",void 0),ts=n([h("rtg-form-controller")],ts);var bd="rtg-form-item-context",Ou="rtg-space-form-space-y",Au="rtg-text-form-description-font rtg-text-form-description-color-text rtg-mt-form-description-space-mt",Iu="rtg-space-y-form-field-space-y",Tu="rtg-space-y-form-item-space-y",Lu="rtg-text-form-label-font rtg-mb-form-label-space-mb rtg-font-form-label-font-weight rtg-peer-disabled:rtg-cursor-not-allowed peer-disabled:rtg-opacity-form-label-opacity-peer-disabled",Pu="rtg-text-form-message-font-size rtg-text-form-message-color-text",es=class extends x{createRenderRoot(){return this}get _desc(){return this.querySelector("p[part=form-description]")}firstUpdated(){this.moveLightDomChildrenInto(this._desc)}render(){return c`
|
|
4162
4162
|
<p
|
|
4163
4163
|
id="${this.itemContext.id}-description"
|
|
4164
4164
|
part="form-description"
|
|
4165
|
-
class="${m(
|
|
4165
|
+
class="${m(Au,this.className)}"
|
|
4166
4166
|
></p>
|
|
4167
|
-
`}};n([Ct({context:
|
|
4167
|
+
`}};n([Ct({context:bd}),d("design:type",Object)],es.prototype,"itemContext",void 0),es=n([h("rtg-form-description")],es);var zu="rtg-form-field-context",Ia,se=class extends x{constructor(...e){super(...e),this.name="",this.validators=[],this.defaultValue="",this.fieldName="",this.registered=!1}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-field]")}updated(){var t;if(this.registered||!this.form||!this.name||!Array.isArray(this.validators)||this.validators.length===0)return;this.form.registerField({name:this.name,validator:r=>{for(let i of this.validators){let o=i(r);if(o)return o}return null},defaultValue:this.defaultValue}),this.registered=!0,this.moveLightDomChildrenInto(this._container);let e=(t=this._container)==null?void 0:t.querySelector("input, textarea, select");e&&(this.defaultValue!==void 0&&(e.value=this.defaultValue),e.addEventListener("input",()=>{this.form.setValue(this.name,e.value)}))}disconnectedCallback(){var e;super.disconnectedCallback(),this.isConnected||((e=this.form)==null||e.unregisterField(this.name))}render(){return c`<div
|
|
4168
4168
|
part="form-field"
|
|
4169
4169
|
class="${m(Iu,this.className)}"
|
|
4170
|
-
></div>`}};n([Ct({context:
|
|
4170
|
+
></div>`}};n([Ct({context:di}),d("design:type",typeof(Ia=Se!==void 0&&Se)=="function"?Ia:Object)],se.prototype,"form",void 0),n([l({type:String}),d("design:type",Object)],se.prototype,"name",void 0),n([l({type:Array}),d("design:type",Array)],se.prototype,"validators",void 0),n([l({type:String}),d("design:type",Object)],se.prototype,"defaultValue",void 0),n([Ce({context:zu}),d("design:type",Object)],se.prototype,"fieldName",void 0),se=n([h("rtg-form-field")],se);var rs=class extends x{constructor(...e){super(...e),this._generatedId=crypto.randomUUID(),this.itemContext={id:this._generatedId}}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-item]")}firstUpdated(){this.moveLightDomChildrenInto(this._container)}render(){return c`<div
|
|
4171
4171
|
part="form-item"
|
|
4172
|
-
class="${m(
|
|
4173
|
-
></div>`}};n([
|
|
4172
|
+
class="${m(Tu,this.className)}"
|
|
4173
|
+
></div>`}};n([Ce({context:bd}),d("design:type",Object)],rs.prototype,"itemContext",void 0),rs=n([h("rtg-form-item")],rs);var Ta,xi=class extends x{constructor(...e){super(...e),this.hasError=!1,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof se);)e=e.parentElement;return e}createRenderRoot(){return this}get _label(){return this.querySelector("label[part=form-label]")}firstUpdated(){this.moveLightDomChildrenInto(this._label)}connectedCallback(){super.connectedCallback();let e=this._field.name;this.hasError=!!this.form.getError(e),this.unsubscribe=this.form.subscribe(()=>{this.hasError=!!this.form.getError(e),this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return c`
|
|
4174
4174
|
<label
|
|
4175
4175
|
part="form-label"
|
|
4176
4176
|
for="${this._field.name}"
|
|
4177
|
-
class="${m(
|
|
4177
|
+
class="${m(Lu,this.hasError&&"rtg-text-form-label-color-text-error",this.className)}"
|
|
4178
4178
|
></label>
|
|
4179
|
-
`}};n([Ct({context:
|
|
4179
|
+
`}};n([Ct({context:di}),d("design:type",typeof(Ta=Se!==void 0&&Se)=="function"?Ta:Object)],xi.prototype,"form",void 0),n([k(),d("design:type",Object)],xi.prototype,"hasError",void 0),xi=n([h("rtg-form-label")],xi);var La,_i=class extends v{constructor(...e){super(...e),this.error=null,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof se);)e=e.parentElement;return e}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.error=this.form.getError(this._field.name),this.unsubscribe=this.form.subscribe(()=>{this.error=this.form.getErrors()[this._field.name],this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return this.error?c`<p
|
|
4180
4180
|
id="${this._field.name}-message"
|
|
4181
4181
|
class="${m(Pu,this.className)}"
|
|
4182
4182
|
>
|
|
4183
4183
|
${this.error}
|
|
4184
|
-
</p>`:null}};n([Ct({context:
|
|
4184
|
+
</p>`:null}};n([Ct({context:di}),d("design:type",typeof(La=Se!==void 0&&Se)=="function"?La:Object)],_i.prototype,"form",void 0),n([k(),d("design:type",Object)],_i.prototype,"error",void 0),_i=n([h("rtg-form-message")],_i);var Si=class extends x{constructor(...e){super(...e),this.form=new Se,this.onSubmit=()=>{},this.handleSubmit=t=>{t.preventDefault(),this.form.validateAll()&&(alert("form submitted successfully"),this.onSubmit(this.form.getValues()))}}createRenderRoot(){return this}get _formElement(){return this.querySelector("form[part=form-root]")}firstUpdated(){this.moveLightDomChildrenInto(this._formElement)}render(){return c`
|
|
4185
4185
|
<form
|
|
4186
4186
|
part="form-root"
|
|
4187
4187
|
id="rtg-form"
|
|
4188
4188
|
@submit=${this.handleSubmit}
|
|
4189
|
-
class="${m(
|
|
4189
|
+
class="${m(Ou,this.className)}"
|
|
4190
4190
|
></form>
|
|
4191
|
-
`}};n([
|
|
4191
|
+
`}};n([Ce({context:di}),d("design:type",Object)],Si.prototype,"form",void 0),n([l({type:Function}),d("design:type",Function)],Si.prototype,"onSubmit",void 0),Si=n([h("rtg-form")],Si);var Vs={root:[""],trigger:[""],content:["rtg-fixed rtg-z-50","rtg-p-hover-card-content-space-p","rtg-w-hover-card-content-space-w","rtg-text-hover-card-content-color-text","rtg-bg-hover-card-content-color-bg","rtg-rounded-hover-card-content-radius rtg-border-hover-card-content-width-border rtg-border-hover-card-content-color-border rtg-outline-hidden","rtg-shadow-hover-card-content-shadow","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95","data-[side=bottom]:rtg-slide-in-from-top-2 data-[side=left]:rtg-slide-in-from-right-2 data-[side=right]:rtg-slide-in-from-left-2 data-[side=top]:rtg-slide-in-from-bottom-2"]},$i=class extends x{constructor(...e){super(...e),this.state="closed",this.isOpen=!1,this.onStateChange=t=>{this.state=t.detail.isOpen?"open":"closed"},this.handlePointerLeaveCheck=t=>{this.contains(t.relatedTarget)||(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("hover-card-state-change",this.onStateChange),this.addEventListener("mouseenter",this.handlePointerLeaveCheck),this.addEventListener("mouseleave",this.handlePointerLeaveCheck)}disconnectedCallback(){document.removeEventListener("hover-card-state-change",this.onStateChange),this.removeEventListener("mouseenter",this.handlePointerLeaveCheck),this.removeEventListener("mouseleave",this.handlePointerLeaveCheck),super.disconnectedCallback()}updated(e){super.updated(e),this.isOpen=this.state==="open"}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.renderRoot.querySelector("#rtg-hover-card-content"))}render(){return c`
|
|
4192
4192
|
<div
|
|
4193
4193
|
id="rtg-hover-card-content"
|
|
4194
4194
|
part="hover-card-content"
|
|
4195
|
-
class=${m(
|
|
4195
|
+
class=${m(Vs.content,this.className)}
|
|
4196
4196
|
style="display: ${this.isOpen?"block":"none"};"
|
|
4197
4197
|
></div>
|
|
4198
|
-
`}};n([l({attribute:"data-state",type:String}),d("design:type",String)]
|
|
4198
|
+
`}};n([l({attribute:"data-state",type:String}),d("design:type",String)],$i.prototype,"state",void 0),n([k(),d("design:type",Object)],$i.prototype,"isOpen",void 0),$i=n([h("rtg-hover-card-content")],$i);var Pa=class extends x{getAttributesToExclude(){return["value","defaultValue"]}createRenderRoot(){return this}firstUpdated(e){this.removeDuplicateContent()}render(){return c`
|
|
4199
4199
|
<div
|
|
4200
4200
|
id="rtg-hover-card-trigger"
|
|
4201
4201
|
part="rtg-hover-card-trigger"
|
|
4202
|
-
class=${m(
|
|
4202
|
+
class=${m(Vs.trigger,this.className)}
|
|
4203
4203
|
>
|
|
4204
4204
|
${Array.from(this.children)}
|
|
4205
4205
|
</div>
|
|
4206
|
-
`}};
|
|
4206
|
+
`}};Pa=n([h("rtg-hover-card-trigger")],Pa);var is=class extends x{constructor(...e){super(...e),this.isOpen=!1,this.hoverTimeout=null,this.openCard=()=>{var t;this.hoverTimeout&&(this.hoverTimeout=(clearTimeout(this.hoverTimeout),null)),this.isOpen||(this.isOpen=!0,(t=this._content)==null||t.dispatchEvent(new CustomEvent("hover-card-state-change",{detail:{isOpen:!0}})))},this.closeCard=()=>{this.hoverTimeout=setTimeout(()=>{var t;this.isOpen=!1,(t=this._content)==null||t.dispatchEvent(new CustomEvent("hover-card-state-change",{detail:{isOpen:!1}}))},150)}}get _containerElement(){return this.renderRoot.querySelector("#rtg-hover-card-container")}get _content(){return this.renderRoot.querySelector("rtg-hover-card-content")}get _trigger(){return this.renderRoot.querySelector("rtg-hover-card-trigger")}getAttributesToExclude(){return[]}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}connectedCallback(){super.connectedCallback()}disconnectedCallback(){let e=this._trigger,t=this._content;e==null||e.removeEventListener("mouseenter",this.openCard),e==null||e.removeEventListener("mouseleave",this.closeCard),t==null||t.removeEventListener("mouseenter",this.openCard),t==null||t.removeEventListener("mouseleave",this.closeCard),this.hoverTimeout&&clearTimeout(this.hoverTimeout),super.disconnectedCallback()}createRenderRoot(){return this}firstUpdated(e){let t=this._containerElement;this.moveLightDomChildrenInto(t);let r=this._trigger,i=this._content;r==null||r.addEventListener("mouseenter",this.openCard),r==null||r.addEventListener("mouseleave",this.closeCard),i==null||i.addEventListener("mouseenter",this.openCard),i==null||i.addEventListener("mouseleave",this.closeCard)}render(){return c`
|
|
4207
4207
|
<div
|
|
4208
4208
|
id="rtg-hover-card-container"
|
|
4209
4209
|
part="hover-card"
|
|
4210
|
-
class=${m(
|
|
4210
|
+
class=${m(Vs.root,this.className)}
|
|
4211
4211
|
></div>
|
|
4212
|
-
`}};n([k(),d("design:type",Object)],
|
|
4212
|
+
`}};n([k(),d("design:type",Object)],is.prototype,"isOpen",void 0),is=n([h("rtg-hover-card")],is);var za=class extends v{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="input-group"]')}firstUpdated(){let e=this._rootSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="input-group" role="group"></div>`}};za=n([h("rtg-input-group")],za);var Ci=class extends v{constructor(...e){super(...e),this.align="inline-start"}createRenderRoot(){return this}get _addonSlot(){return this.querySelector('[data-slot="input-group-addon"]')}firstUpdated(){let e=this._addonSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`
|
|
4213
4213
|
<div
|
|
4214
4214
|
data-slot="input-group-addon"
|
|
4215
4215
|
data-align="${this.align}"
|
|
4216
4216
|
?data-border="${this.border}"
|
|
4217
4217
|
role="group"
|
|
4218
4218
|
></div>
|
|
4219
|
-
`}};n([l({type:String}),d("design:type",Object)]
|
|
4219
|
+
`}};n([l({type:String}),d("design:type",Object)],Ci.prototype,"align",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Ci.prototype,"border",void 0),Ci=n([h("rtg-input-group-addon")],Ci);var Wt=class extends v{constructor(...e){super(...e),this.variant="ghost",this.size="xs",this.type="button"}createRenderRoot(){return this}get _buttonSlot(){return this.querySelector('[data-slot="input-group-button"]')}firstUpdated(){let e=this._buttonSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`
|
|
4220
4220
|
<rtg-button
|
|
4221
4221
|
data-slot="input-group-button"
|
|
4222
4222
|
.variant=${this.variant}
|
|
@@ -4228,7 +4228,7 @@ body {
|
|
|
4228
4228
|
.target=${this.target}
|
|
4229
4229
|
.onclick=${this.onClick}
|
|
4230
4230
|
></rtg-button>
|
|
4231
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
4231
|
+
`}};n([l({type:String}),d("design:type",Object)],Wt.prototype,"variant",void 0),n([l({type:String}),d("design:type",Object)],Wt.prototype,"size",void 0),n([l({type:String}),d("design:type",Object)],Wt.prototype,"type",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Wt.prototype,"disabled",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Wt.prototype,"invalid",void 0),n([l({type:String}),d("design:type",String)],Wt.prototype,"href",void 0),n([l({type:String}),d("design:type",Object)],Wt.prototype,"target",void 0),n([l({attribute:!1,type:Function}),d("design:type",Function)],Wt.prototype,"onClick",void 0),Wt=n([h("rtg-input-group-button")],Wt);var G=class extends v{constructor(...e){super(...e),this.id="",this.type="text",this._onClick=t=>{this.onClick&&this.onClick(t)},this._onInput=t=>{this.value=t.target.value,this.onInput&&this.onInput(t)},this._onChange=t=>{this.value=t.target.value,this.onChange&&this.onChange(t)},this._onFocus=t=>{this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:t.relatedTarget})),this.onFocus&&this.onFocus(t)},this._onBlur=t=>{this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:t.relatedTarget})),this.onBlur&&this.onBlur(t)}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}render(){return c`
|
|
4232
4232
|
<input
|
|
4233
4233
|
data-slot="input"
|
|
4234
4234
|
accept=${this.type==="file"&&this.accept?this.accept:f}
|
|
@@ -4286,7 +4286,7 @@ body {
|
|
|
4286
4286
|
.onFocus=${this.onFocus}
|
|
4287
4287
|
.onBlur=${this.onBlur}
|
|
4288
4288
|
></rtg-input>
|
|
4289
|
-
`}};n([l({type:String}),d("design:type",String)],K.prototype,"accept",void 0),n([l({type:String}),d("design:type",Object)],K.prototype,"autocomplete",void 0),n([l({type:Boolean}),d("design:type",Boolean)],K.prototype,"disabled",void 0),n([l({type:String}),d("design:type",String)],K.prototype,"form",void 0),n([l({type:String}),d("design:type",Object)],K.prototype,"id",void 0),n([l({type:Boolean}),d("design:type",Boolean)],K.prototype,"invalid",void 0),n([l({type:Number}),d("design:type",Number)],K.prototype,"max",void 0),n([l({type:Number}),d("design:type",Number)],K.prototype,"maxlength",void 0),n([l({type:Number}),d("design:type",Number)],K.prototype,"min",void 0),n([l({type:Number}),d("design:type",Number)],K.prototype,"minlength",void 0),n([l({type:Boolean}),d("design:type",Boolean)],K.prototype,"multiple",void 0),n([l({type:String}),d("design:type",String)],K.prototype,"name",void 0),n([l({type:String}),d("design:type",String)],K.prototype,"pattern",void 0),n([l({type:String}),d("design:type",String)],K.prototype,"placeholder",void 0),n([l({type:Boolean}),d("design:type",Boolean)],K.prototype,"readonly",void 0),n([l({type:Boolean}),d("design:type",Boolean)],K.prototype,"required",void 0),n([l({type:Number}),d("design:type",Number)],K.prototype,"step",void 0),n([l({type:String}),d("design:type",Object)],K.prototype,"type",void 0),n([l({type:String}),d("design:type",String)],K.prototype,"value",void 0),n([l({attribute:!1}),d("design:type",Function)],K.prototype,"onClick",void 0),n([l({attribute:!1}),d("design:type",Function)],K.prototype,"onInput",void 0),n([l({attribute:!1}),d("design:type",Function)],K.prototype,"onChange",void 0),n([l({attribute:!1}),d("design:type",Function)],K.prototype,"onFocus",void 0),n([l({attribute:!1}),d("design:type",Function)],K.prototype,"onBlur",void 0),K=n([h("rtg-input-group-input")],K);var
|
|
4289
|
+
`}};n([l({type:String}),d("design:type",String)],K.prototype,"accept",void 0),n([l({type:String}),d("design:type",Object)],K.prototype,"autocomplete",void 0),n([l({type:Boolean}),d("design:type",Boolean)],K.prototype,"disabled",void 0),n([l({type:String}),d("design:type",String)],K.prototype,"form",void 0),n([l({type:String}),d("design:type",Object)],K.prototype,"id",void 0),n([l({type:Boolean}),d("design:type",Boolean)],K.prototype,"invalid",void 0),n([l({type:Number}),d("design:type",Number)],K.prototype,"max",void 0),n([l({type:Number}),d("design:type",Number)],K.prototype,"maxlength",void 0),n([l({type:Number}),d("design:type",Number)],K.prototype,"min",void 0),n([l({type:Number}),d("design:type",Number)],K.prototype,"minlength",void 0),n([l({type:Boolean}),d("design:type",Boolean)],K.prototype,"multiple",void 0),n([l({type:String}),d("design:type",String)],K.prototype,"name",void 0),n([l({type:String}),d("design:type",String)],K.prototype,"pattern",void 0),n([l({type:String}),d("design:type",String)],K.prototype,"placeholder",void 0),n([l({type:Boolean}),d("design:type",Boolean)],K.prototype,"readonly",void 0),n([l({type:Boolean}),d("design:type",Boolean)],K.prototype,"required",void 0),n([l({type:Number}),d("design:type",Number)],K.prototype,"step",void 0),n([l({type:String}),d("design:type",Object)],K.prototype,"type",void 0),n([l({type:String}),d("design:type",String)],K.prototype,"value",void 0),n([l({attribute:!1}),d("design:type",Function)],K.prototype,"onClick",void 0),n([l({attribute:!1}),d("design:type",Function)],K.prototype,"onInput",void 0),n([l({attribute:!1}),d("design:type",Function)],K.prototype,"onChange",void 0),n([l({attribute:!1}),d("design:type",Function)],K.prototype,"onFocus",void 0),n([l({attribute:!1}),d("design:type",Function)],K.prototype,"onBlur",void 0),K=n([h("rtg-input-group-input")],K);var ja=class extends v{createRenderRoot(){return this}get _textSlot(){return this.querySelector('[data-slot="input-group-text"]')}firstUpdated(){let e=this._textSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<span data-slot="input-group-text"></span>`}};ja=n([h("rtg-input-group-text")],ja);var it=class extends v{constructor(...e){super(...e),this.id="",this._onInput=t=>{this.value=t.target.value,this.onInput&&this.onInput(t)},this._onChange=t=>{this.value=t.target.value,this.onChange&&this.onChange(t)},this._onFocus=t=>{this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:t.relatedTarget})),this.onFocus&&this.onFocus(t)},this._onBlur=t=>{this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:t.relatedTarget})),this.onBlur&&this.onBlur(t)}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._textareaId=this.id),this.removeAttribute("id"))}firstUpdated(){this._textareaId=this.id,this.removeAttribute("id")}render(){return c`
|
|
4290
4290
|
<textarea
|
|
4291
4291
|
data-slot="textarea"
|
|
4292
4292
|
autocapitalize=${this.autocapitalize?this.autocapitalize:f}
|
|
@@ -4365,17 +4365,17 @@ body {
|
|
|
4365
4365
|
/>
|
|
4366
4366
|
</div>
|
|
4367
4367
|
</div>
|
|
4368
|
-
`}};n([l({type:String}),d("design:type",Object)],Q.prototype,"autocomplete",void 0),n([l({attribute:"default-value",type:String}),d("design:type",String)],Q.prototype,"defaultValue",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Q.prototype,"disabled",void 0),n([l({type:String}),d("design:type",String)],Q.prototype,"form",void 0),n([l({type:String}),d("design:type",Object)],Q.prototype,"id",void 0),n([l({type:String}),d("design:type",Object)],Q.prototype,"inputmode",void 0),n([l({type:Number}),d("design:type",Number)],Q.prototype,"maxlength",void 0),n([l({type:String}),d("design:type",String)],Q.prototype,"name",void 0),n([l({type:String}),d("design:type",String)],Q.prototype,"pattern",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Q.prototype,"required",void 0),n([l({type:String}),d("design:type",String)],Q.prototype,"value",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"onChange",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"onComplete",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"onBlur",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"onFocus",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"onPaste",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"pasteTransformer",void 0),n([k(),d("design:type",Object)],Q.prototype,"_activeSlot",void 0),n([k(),d("design:type",Object)],Q.prototype,"_hasFocus",void 0),n([k(),d("design:type",Object)],Q.prototype,"_value",void 0),Q=n([h("rtg-input-otp"),d("design:paramtypes",[])],Q);var
|
|
4368
|
+
`}};n([l({type:String}),d("design:type",Object)],Q.prototype,"autocomplete",void 0),n([l({attribute:"default-value",type:String}),d("design:type",String)],Q.prototype,"defaultValue",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Q.prototype,"disabled",void 0),n([l({type:String}),d("design:type",String)],Q.prototype,"form",void 0),n([l({type:String}),d("design:type",Object)],Q.prototype,"id",void 0),n([l({type:String}),d("design:type",Object)],Q.prototype,"inputmode",void 0),n([l({type:Number}),d("design:type",Number)],Q.prototype,"maxlength",void 0),n([l({type:String}),d("design:type",String)],Q.prototype,"name",void 0),n([l({type:String}),d("design:type",String)],Q.prototype,"pattern",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Q.prototype,"required",void 0),n([l({type:String}),d("design:type",String)],Q.prototype,"value",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"onChange",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"onComplete",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"onBlur",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"onFocus",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"onPaste",void 0),n([l({attribute:!1}),d("design:type",Function)],Q.prototype,"pasteTransformer",void 0),n([k(),d("design:type",Object)],Q.prototype,"_activeSlot",void 0),n([k(),d("design:type",Object)],Q.prototype,"_hasFocus",void 0),n([k(),d("design:type",Object)],Q.prototype,"_value",void 0),Q=n([h("rtg-input-otp"),d("design:paramtypes",[])],Q);var Na=class extends v{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="input-otp-group"]')}firstUpdated(){let e=this._groupSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="input-otp-group"></div>`}};Na=n([h("rtg-input-otp-group")],Na);var Ei=class extends v{constructor(...e){super(...e),this._handleClick=()=>{this.dispatchEvent(new CustomEvent("rtg-input-otp-slot:focus",{detail:{index:this.index},bubbles:!0}))}}createRenderRoot(){return this}get _slotSlot(){return this.querySelector('[data-slot="input-otp-slot"]')}render(){return c`
|
|
4369
4369
|
<div
|
|
4370
4370
|
data-slot="input-otp-slot"
|
|
4371
4371
|
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":f}
|
|
4372
4372
|
@click=${this._handleClick}
|
|
4373
4373
|
></div>
|
|
4374
|
-
`}};n([l({type:Number}),d("design:type",Number)],
|
|
4374
|
+
`}};n([l({type:Number}),d("design:type",Number)],Ei.prototype,"index",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Ei.prototype,"invalid",void 0),Ei=n([h("rtg-input-otp-slot")],Ei);var Ua=class extends v{createRenderRoot(){return this}render(){return c`
|
|
4375
4375
|
<div data-slot="input-otp-separator" role="separator">
|
|
4376
4376
|
${_u()}
|
|
4377
4377
|
</div>
|
|
4378
|
-
`}};
|
|
4378
|
+
`}};Ua=n([h("rtg-input-otp-separator")],Ua);var fr=class extends v{constructor(...e){super(...e),this.variant="default",this.size="default"}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="item"]')}firstUpdated(){let e=this._rootSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return this.href?c`
|
|
4379
4379
|
<a
|
|
4380
4380
|
data-slot="item"
|
|
4381
4381
|
data-variant="${this.variant}"
|
|
@@ -4389,14 +4389,14 @@ body {
|
|
|
4389
4389
|
data-variant="${this.variant}"
|
|
4390
4390
|
data-size="${this.size}"
|
|
4391
4391
|
></div>
|
|
4392
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
4392
|
+
`}};n([l({type:String}),d("design:type",Object)],fr.prototype,"variant",void 0),n([l({type:String}),d("design:type",Object)],fr.prototype,"size",void 0),n([l({type:String}),d("design:type",String)],fr.prototype,"href",void 0),n([l({type:String}),d("design:type",Object)],fr.prototype,"target",void 0),fr=n([h("rtg-item")],fr);var Da=class extends v{createRenderRoot(){return this}get _actionsSlot(){return this.querySelector('[data-slot="item-actions"]')}firstUpdated(){let e=this._actionsSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="item-actions"></div>`}};Da=n([h("rtg-item-actions")],Da);var Ba=class extends v{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="item-content"]')}firstUpdated(){let e=this._contentSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="item-content"></div>`}};Ba=n([h("rtg-item-content")],Ba);var Fa=class extends v{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="item-description"]')}firstUpdated(){let e=this._descriptionSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<p data-slot="item-description"></p>`}};Fa=n([h("rtg-item-description")],Fa);var Ma=class extends v{createRenderRoot(){return this}get _footerSlot(){return this.querySelector('[data-slot="item-footer"]')}firstUpdated(){let e=this._footerSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="item-footer"></div>`}};Ma=n([h("rtg-item-footer")],Ma);var qa=class extends v{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="item-group"]')}firstUpdated(){let e=this._groupSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="item-group" role="list"></div>`}};qa=n([h("rtg-item-group")],qa);var Ha=class extends v{createRenderRoot(){return this}get _headerSlot(){return this.querySelector('[data-slot="item-header"]')}firstUpdated(){let e=this._headerSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="item-header"></div>`}};Ha=n([h("rtg-item-header")],Ha);var os=class extends v{constructor(...e){super(...e),this.variant="default"}createRenderRoot(){return this}get _mediaSlot(){return this.querySelector('[data-slot="item-media"]')}firstUpdated(){let e=this._mediaSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`
|
|
4393
4393
|
<div data-slot="item-media" data-variant="${this.variant}"></div>
|
|
4394
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
4394
|
+
`}};n([l({type:String}),d("design:type",Object)],os.prototype,"variant",void 0),os=n([h("rtg-item-media")],os);var Va=class extends v{createRenderRoot(){return this}get _separatorSlot(){return this.querySelector('[data-slot="item-separator"]')}firstUpdated(){let e=this._separatorSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`
|
|
4395
4395
|
<rtg-separator
|
|
4396
4396
|
data-slot="item-separator"
|
|
4397
4397
|
orientation="horizontal"
|
|
4398
4398
|
></rtg-separator>
|
|
4399
|
-
`}};
|
|
4399
|
+
`}};Va=n([h("rtg-item-separator")],Va);var Wa=class extends v{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="item-title"]')}firstUpdated(){let e=this._titleSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="item-title"></div>`}};Wa=n([h("rtg-item-title")],Wa);var Ga=class extends v{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="kbd"]')}firstUpdated(){let e=this._rootSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<kbd data-slot="kbd"></kbd>`}};Ga=n([h("rtg-kbd")],Ga);var Ka=class extends v{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="kbd-group"]')}firstUpdated(){let e=this._groupSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<kbd data-slot="kbd-group"></kbd>`}};Ka=n([h("rtg-kbd-group")],Ka);var ut={root:["rtg-flex","rtg-gap-menubar-space-gap rtg-items-center","rtg-p-menubar-space-p","rtg-h-menubar-space-h","rtg-bg-menubar-color-bg","rtg-rounded-menubar-radius rtg-border-menubar-width-border rtg-border-menubar-color-border"],menu:[""],group:[""],trigger:["rtg-flex","rtg-items-center","rtg-px-menubar-trigger-space-px rtg-py-menubar-trigger-space-py","rtg-text-menubar-trigger-font rtg-font-menubar-trigger-font-weight","rtg-rounded-menubar-trigger-radius rtg-outline-hidden","rtg-select-none","focus:rtg-text-menubar-trigger-color-text-focus focus:rtg-bg-menubar-trigger-color-bg-focus","hover:rtg-text-menubar-trigger-color-text-active hover:rtg-bg-menubar-trigger-color-bg-active"],content:["rtg-absolute rtg-overflow-hidden rtg-z-50","rtg-p-menubar-content-space-p","rtg-min-w-menubar-content-space-min-w","rtg-text-menubar-content-color-text","rtg-bg-menubar-content-color-bg","rtg-rounded-menubar-content-radius rtg-border-menubar-content-width-border rtg-border-menubar-content-color-border","rtg-shadow-menubar-content-shadow","rtg-translate-y-2","rtg-slide-in-from-top-2","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95"],item:["rtg-flex rtg-relative","rtg-gap-menubar-item-space-gap rtg-items-center","rtg-px-menubar-item-space-px rtg-py-menubar-item-space-py","rtg-text-menubar-item-font","rtg-rounded-menubar-item-radius rtg-outline-hidden","rtg-cursor-default rtg-select-none","aria-selected:rtg-text-menubar-item-color-text-active aria-selected:rtg-bg-menubar-item-color-bg-active","data-[disabled]:rtg-opacity-menubar-item-opacity-disabled data-[disabled]:rtg-pointer-events-none",'[&_svg]:rtg-shrink-0 [&_svg:not([class*="rtg-size-"])]:rtg-size-menubar-item-icon-space-size [&_svg:not([class*="rtg-text-"])]:rtg-text-menubar-item-icon-color-text [&_svg]:rtg-pointer-events-none'],checkboxItem:{base:["rtg-flex rtg-relative","rtg-gap-menubar-checkbox-item-space-gap rtg-items-center","rtg-pl-menubar-checkbox-item-space-pl rtg-pr-menubar-checkbox-item-space-pr rtg-py-menubar-checkbox-item-space-py","rtg-text-menubar-checkbox-item-font","rtg-rounded-menubar-checkbox-item-radius rtg-outline-hidden","rtg-cursor-default rtg-select-none","aria-selected:rtg-text-menubar-checkbox-item-color-text-active aria-selected:rtg-bg-menubar-checkbox-item-color-bg-active","data-[disabled]:rtg-opacity-menubar-checkbox-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],indicator:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-menubar-checkbox-item-indicator-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-menubar-checkbox-item-icon-space-size","rtg-pointer-events-none"]},radioItem:{base:["rtg-flex rtg-relative","rtg-gap-menubar-radio-item-space-gap rtg-items-center","rtg-pl-menubar-radio-item-space-pl rtg-pr-menubar-radio-item-space-pr rtg-py-menubar-radio-item-space-py","rtg-text-menubar-radio-item-font","rtg-rounded-menubar-radio-item-radius rtg-outline-hidden","rtg-cursor-default rtg-select-none","aria-selected:rtg-text-menubar-radio-item-color-text-active aria-selected:rtg-bg-menubar-radio-item-color-bg-active","data-[disabled]:rtg-opacity-menubar-radio-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],indicator:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-menubar-radio-item-indicator-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-menubar-radio-item-icon-space-size","rtg-pointer-events-none","rtg-fill-current"]},label:["rtg-px-menubar-label-space-px rtg-py-menubar-label-space-py","rtg-text-menubar-label-font rtg-font-menubar-label-font-weight"],separator:["rtg-mx-menubar-separator-space-mx rtg-my-menubar-separator-space-my","rtg-h-menubar-separator-space-h","rtg-bg-menubar-separator-color-bg"],shortcut:["rtg-ml-auto","rtg-text-menubar-shortcut-font rtg-text-menubar-shortcut-color-text"]},Bi,Ke,ce=(Ke=class extends x{constructor(...t){super(...t),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-checkbox-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var r,i;if(this._id!=="")return this._id;let t=(i=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:i.querySelector("div[rtgcmd-group]");return t?this._id=`${t.getAttribute("id")}li${Bi._counter++}`:this._id=`rtgcmdrxgxli${Bi._counter++}`,this._id}get value(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}handleMouseEvent(t){(t.type==="mouseover"||t.type==="focus")&&(this.selected=!0),t.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked=!this.checked}render(){return c`
|
|
4400
4400
|
<div
|
|
4401
4401
|
part="menubar-checkbox-item"
|
|
4402
4402
|
class=${m(ut.checkboxItem.base,this.disabled&&"rtg-opacity-menubar-item-opacity-disabled rtg-pointer-events-none",this.className)}
|
|
@@ -4431,7 +4431,7 @@ body {
|
|
|
4431
4431
|
`:f}
|
|
4432
4432
|
</span>
|
|
4433
4433
|
</div>
|
|
4434
|
-
`}},
|
|
4434
|
+
`}},Bi=Ke,Ke._counter=0,Ke);n([l({type:String}),d("design:type",Object)],ce.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],ce.prototype,"_hidden",void 0),n([l({attribute:"data-value",type:String}),d("design:type",void 0),d("design:paramtypes",[])],ce.prototype,"value",null),n([l({type:Boolean}),d("design:type",Object)],ce.prototype,"selected",void 0),n([l({type:Boolean}),d("design:type",Object)],ce.prototype,"checked",void 0),n([l({type:Boolean}),d("design:type",Object)],ce.prototype,"disabled",void 0),ce=Bi=n([h("rtg-menubar-checkbox-item")],ce);var be=class extends x{constructor(...e){super(...e),this.isOpen=!1,this.uniqueIds=[],this.selectedMenu="",this.isHovering=!1,this.id="",this.closeTimeout=null,this.toggleMenubar=t=>{t.stopPropagation(),document.querySelectorAll("rtg-menubar-menu").forEach(r=>{r!==this&&(r.isOpen=!1)}),this.isOpen=!this.isOpen},this.handleClickOutside=t=>{let r=t.target;this.contains(r)||(this.isOpen=!1)},this.handleMenuMouseEnter=()=>{this.clearCloseTimeout(),this.closeAllMenus(),this.isOpen=!0,this.isHovering=!0},this.handleMenuMouseLeave=t=>{let r=t.relatedTarget;if(this.isDescendant(r,"rtg-menubar-content")){this.clearCloseTimeout();return}this.scheduleClose()}}get _content(){return this.querySelector("rtg-menubar-content")}get _button(){return this.querySelector("rtg-menubar-trigger")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),this.clearCloseTimeout(),super.disconnectedCallback()}clearCloseTimeout(){this.closeTimeout!==null&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("rtg-menubar-radio-item").forEach(t=>{let r=t;t!==e.target&&(r.checked=!1)})}firstUpdated(){this.setupContentListeners();let e=this.querySelector("div[part=menubar-menu-slot]"),t=this.querySelector("div[part=button-slot]");e&&this._content&&e.appendChild(this._content),t&&this._button&&t.appendChild(this._button)}raiseEvent(){let e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}closeAllMenus(){document.querySelectorAll("rtg-menubar-menu").forEach(e=>{e.isOpen=!1,e.isHovering=!1})}scheduleClose(){this.clearCloseTimeout(),this.closeTimeout=window.setTimeout(()=>{this.isOpen=!1,this.isHovering=!1,this.closeTimeout=null},150)}isDescendant(e,t){let r=e.parentElement;for(;r;){if(r.tagName.toLowerCase()===t.toLowerCase())return!0;r=r.parentElement}return!1}setupContentListeners(){let e=this._content;e&&(e.addEventListener("mouseenter",()=>{this.clearCloseTimeout(),this.isOpen=!0}),e.addEventListener("mouseleave",()=>{this.scheduleClose()}))}render(){return c`
|
|
4435
4435
|
<div class=${m(ut.menu,this.className)}>
|
|
4436
4436
|
<div
|
|
4437
4437
|
id="${this.id}"
|
|
@@ -4450,7 +4450,7 @@ body {
|
|
|
4450
4450
|
|
|
4451
4451
|
<div part="menubar-menu-slot"></div>
|
|
4452
4452
|
</div>
|
|
4453
|
-
`}};n([k(),d("design:type",Object)],
|
|
4453
|
+
`}};n([k(),d("design:type",Object)],be.prototype,"isOpen",void 0),n([k(),d("design:type",Array)],be.prototype,"uniqueIds",void 0),n([k(),d("design:type",String)],be.prototype,"selectedMenu",void 0),n([k(),d("design:type",Object)],be.prototype,"isHovering",void 0),n([l({type:String}),d("design:type",Object)],be.prototype,"id",void 0),be=n([h("rtg-menubar-menu")],be);var vr=class extends x{constructor(...e){super(...e),this.state=Hs,this.id="",this.side="bottom",this.isOpen=!1}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof be);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=menubar-content]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){requestAnimationFrame(()=>{this.moveLightDomChildrenInto(this._containerElement)})}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){let t=this.querySelector("button");this&&!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&(this.isOpen=!1)}render(){return c`
|
|
4454
4454
|
<div
|
|
4455
4455
|
class=${m(ut.content,this.className)}
|
|
4456
4456
|
id="${this.id}"
|
|
@@ -4464,7 +4464,7 @@ body {
|
|
|
4464
4464
|
dir="ltr"
|
|
4465
4465
|
style="display: ${this.isOpen?"block":"none"};"
|
|
4466
4466
|
></div>
|
|
4467
|
-
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],
|
|
4467
|
+
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],vr.prototype,"state",void 0),n([l({type:String}),d("design:type",Object)],vr.prototype,"id",void 0),n([l({type:String}),d("design:type",Object)],vr.prototype,"side",void 0),n([k(),d("design:type",Object)],vr.prototype,"isOpen",void 0),vr=n([h("rtg-menubar-content")],vr);var Fi,Ye,Hr=(Ye=class extends x{constructor(...t){super(...t),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-group-slot]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var r,i;if(this._id!=="")return this._id;let t=(i=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:i.querySelector("div[rtgcmd-list]");return t?this._id=`${t.getAttribute("id")}g${Fi._counter++}`:this._id=`rtgcmdrxlxg${Fi._counter++}`,this._id}render(){return c`${this._hidden==="true"?f:c`
|
|
4468
4468
|
<div
|
|
4469
4469
|
class=${m(ut.group,this.className)}
|
|
4470
4470
|
id="${this.identifier}"
|
|
@@ -4485,7 +4485,7 @@ body {
|
|
|
4485
4485
|
aria-labelledby="${this.identifier}h"
|
|
4486
4486
|
></div>
|
|
4487
4487
|
</div>
|
|
4488
|
-
`}`}},
|
|
4488
|
+
`}`}},Fi=Ye,Ye._counter=0,Ye);n([l({type:String}),d("design:type",Object)],Hr.prototype,"heading",void 0),n([l({attribute:"id",type:String}),d("design:type",Object)],Hr.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],Hr.prototype,"_hidden",void 0),Hr=Fi=n([h("rtg-menubar-group")],Hr);var Mi,Xe,Ne=(Xe=class extends x{constructor(...t){super(...t),this._id="",this._hidden="",this.disabled=!1,this.selected=!1}get _containerElement(){return this.querySelector("div[part=menubar-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var r,i;if(this._id!=="")return this._id;let t=(i=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:i.querySelector("div[rtgcmd-group]");return t?this._id=`${t.getAttribute("id")}li${Mi._counter++}`:this._id=`rtgcmdrxgxli${Mi._counter++}`,this._id}get value(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}handleMouseEvent(t){(t.type==="mouseover"||t.type==="focus")&&(this.selected=!0),t.type==="mouseleave"&&(this.selected=!1)}render(){return c` ${this._hidden==="true"?f:c`
|
|
4489
4489
|
<div
|
|
4490
4490
|
part="menubar-item"
|
|
4491
4491
|
class=${m(ut.item,this.disabled&&"rtg-opacity-menubar-item-opacity-disabled rtg-pointer-events-none",this.className)}
|
|
@@ -4499,7 +4499,7 @@ body {
|
|
|
4499
4499
|
id="${this.identifier}"
|
|
4500
4500
|
aria-hidden="${this.hidden}"
|
|
4501
4501
|
></div>
|
|
4502
|
-
`}`}},
|
|
4502
|
+
`}`}},Mi=Xe,Xe._counter=0,Xe);n([l({type:String}),d("design:type",Object)],Ne.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],Ne.prototype,"_hidden",void 0),n([l({type:Boolean}),d("design:type",Object)],Ne.prototype,"disabled",void 0),n([l({attribute:"data-value",type:String}),d("design:type",void 0),d("design:paramtypes",[])],Ne.prototype,"value",null),n([l({type:Boolean}),d("design:type",Object)],Ne.prototype,"selected",void 0),Ne=Mi=n([h("rtg-menubar-item")],Ne);var qi,Ze,ue=(Ze=class extends x{constructor(...t){super(...t),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-radio-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var r,i;if(this._id!=="")return this._id;let t=(i=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:i.querySelector("div[rtgcmd-group]");return t?this._id=`${t.getAttribute("id")}li${qi._counter++}`:this._id=`rtgcmdrxgxli${qi._counter++}`,this._id}get value(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}handleMouseEvent(t){(t.type==="mouseover"||t.type==="focus")&&(this.selected=!0),t.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return c`
|
|
4503
4503
|
<div
|
|
4504
4504
|
part="menubar-radio-item"
|
|
4505
4505
|
class=${m(ut.radioItem.base,this.disabled&&"rtg-opacity-menubar-item-opacity-disabled rtg-pointer-events-none",this.className)}
|
|
@@ -4532,7 +4532,7 @@ body {
|
|
|
4532
4532
|
</svg>`:f}
|
|
4533
4533
|
</span>
|
|
4534
4534
|
</div>
|
|
4535
|
-
`}},
|
|
4535
|
+
`}},qi=Ze,Ze._counter=0,Ze);n([l({type:String}),d("design:type",Object)],ue.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],ue.prototype,"_hidden",void 0),n([l({attribute:"data-value",type:String}),d("design:type",void 0),d("design:paramtypes",[])],ue.prototype,"value",null),n([l({type:Boolean}),d("design:type",Object)],ue.prototype,"selected",void 0),n([l({type:Boolean}),d("design:type",Object)],ue.prototype,"checked",void 0),n([l({type:Boolean}),d("design:type",Object)],ue.prototype,"disabled",void 0),ue=qi=n([h("rtg-menubar-radio-item")],ue);var Hi,Je,ki=(Je=class extends x{constructor(...t){super(...t),this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-separator]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}get identifier(){var r;if(this._id!=="")return this._id;let t=(r=this.parentElement)==null?void 0:r.querySelector("div[rtgcmd-list]");return t?this._id=`${t.getAttribute("id")}s${Hi._counter++}`:this._id=`rtgcmdrxlxs${Hi._counter++}`,this._id}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`${this._hidden==="true"?f:c`
|
|
4536
4536
|
<div
|
|
4537
4537
|
class=${m(ut.separator,this.className)}
|
|
4538
4538
|
id="${this.identifier}"
|
|
@@ -4540,20 +4540,20 @@ body {
|
|
|
4540
4540
|
part="menubar-separator"
|
|
4541
4541
|
rtgcmd-separator
|
|
4542
4542
|
></div>
|
|
4543
|
-
`}`}},
|
|
4543
|
+
`}`}},Hi=Je,Je._counter=0,Je);n([l({type:String}),d("design:type",Object)],ki.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],ki.prototype,"_hidden",void 0),ki=Hi=n([h("rtg-menubar-separator")],ki);var Ya=class extends x{get _containerElement(){return this.querySelector("span[part=menubar-shortcut]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this.classList=m(ut.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4544
4544
|
<span
|
|
4545
4545
|
class=${m(ut.shortcut,this.className)}
|
|
4546
4546
|
part="menubar-shortcut"
|
|
4547
4547
|
>
|
|
4548
4548
|
</span>
|
|
4549
|
-
`}};
|
|
4549
|
+
`}};Ya=n([h("rtg-menubar-shortcut")],Ya);var Xa=class extends x{get _containerElement(){return this.querySelector("button[part=menubar-trigger]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getAttributesToExclude(){return["data-testid"]}render(){return c`
|
|
4550
4550
|
<button
|
|
4551
4551
|
class=${m(ut.trigger,this.className)}
|
|
4552
4552
|
type="button"
|
|
4553
4553
|
role="menuitem"
|
|
4554
4554
|
part="menubar-trigger"
|
|
4555
4555
|
></button>
|
|
4556
|
-
`}};
|
|
4556
|
+
`}};Xa=n([h("rtg-menubar-trigger")],Xa);var Za=class extends x{get _containerElement(){return this.querySelector("div[part=menubar]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4557
4557
|
<div
|
|
4558
4558
|
role="menubar"
|
|
4559
4559
|
part="menubar"
|
|
@@ -4561,17 +4561,17 @@ body {
|
|
|
4561
4561
|
tabindex="0"
|
|
4562
4562
|
data-orientation="horizontal"
|
|
4563
4563
|
></div>
|
|
4564
|
-
`}};
|
|
4564
|
+
`}};Za=n([h("rtg-menubar")],Za);var sr={content:["rtg-absolute","rtg-top-navigation-menu-content-space-top","rtg-flex","rtg-justify-center"],menu:["rtg-relative","rtg-z-10","rtg-flex","rtg-max-w-navigation-menu-space-max-w","rtg-flex-1","rtg-items-center","rtg-justify-center"],menuList:["rtg-flex","rtg-flex-1","rtg-list-none","rtg-items-center","rtg-justify-center","rtg-space-x-navigation-menu-list-space-x","group"],menuItem:["rtg-flex","rtg-cursor-pointer","rtg-items-center","rtg-rounded-navigation-menu-item-radius","rtg-bg-navigation-menu-item-color-bg","rtg-py-navigation-menu-list-space-py","rtg-px-navigation-menu-list-space-px","hover:rtg-bg-navigation-menu-item-color-bg-hover"],menuItemIcon:["lucide","lucide-chevron-down","rtg-relative","rtg-ml-navigation-menu-item-icon-space-ml","rtg-h-navigation-menu-item-icon-space-h","rtg-w-navigation-menu-item-icon-space-w","rtg-transition-transform","rtg-duration-navigation-menu-item-icon-motion-duration"],link:["rtg-flex","rtg-h-navigation-menu-link-space-h","rtg-bg-navigation-menu-link-color-bg","hover:rtg-bg-navigation-menu-link-color-bg-hover","rtg-rounded-navigation-menu-link-radius","rtg-px-navigation-menu-link-space-px","rtg-py-navigation-menu-link-space-py","rtg-w-navigation-menu-link-space-w","rtg-select-none","rtg-flex-col","rtg-justify-end","rtg-no-underline","rtg-outline-none"],contentContainer:["rtg-bg-navigation-menu-content-container-color-bg","origin-top-center","rtg-relative","rtg-mt-navigation-menu-content-container-space-mt","rtg-w-navigation-menu-content-container-space-w","rtg-overflow-hidden","rtg-rounded-navigation-menu-content-container-radius","rtg-border-navigation-menu-content-container-width-border","rtg-border-navigation-menu-content-container-color-border","rtg-navigation-menu-content-container-shadow"]},Ja=class extends x{get _containerElement(){return this.querySelector("ul[part=navigation-menu-list]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4565
4565
|
<div class="${m("relative",this.className)}">
|
|
4566
4566
|
<ul
|
|
4567
4567
|
part="navigation-menu-list"
|
|
4568
4568
|
data-orientation="horizontal"
|
|
4569
|
-
class=${m(
|
|
4569
|
+
class=${m(sr.menuList)}
|
|
4570
4570
|
dir="ltr"
|
|
4571
4571
|
></ul>
|
|
4572
4572
|
<div></div>
|
|
4573
4573
|
</div>
|
|
4574
|
-
`}};
|
|
4574
|
+
`}};Ja=n([h("rtg-navigation-menu-list")],Ja);var fe=class extends x{constructor(...e){super(...e),this.value="",this.navigationLink=!0,this.isOpen=!1,this.uniqueIds=[],this.isHovering=!1,this.handleClickOutside=t=>{let r=t.target;this.contains(r)||(this.isOpen=!1)}}raiseEvent(){let e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(){this.moveLightDomChildrenInto(this.querySelector("div[part=content-slot]"),[this._content]),this.moveLightDomChildrenInto(this.querySelector("div[part=button-slot]"),[this._button])}closeAllMenus(){document.querySelectorAll("rtg-navigation-menu-item").forEach(e=>{e.isOpen=!1,e.isHovering=!1})}toggleMenubar(e){e.stopPropagation(),document.querySelectorAll("rtg-navigation-menu-item").forEach(t=>{t!==this&&(t.isOpen=!1)}),this.isOpen=!this.isOpen}get _content(){return this.querySelector("rtg-navigation-menu-content")}get _button(){return this.querySelector("rtg-navigation-menu-trigger")}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}handleHover(){this.closeAllMenus(),this.isHovering||(this.isHovering=!0,this.isOpen=!0)}handleMouseLeave(){this.isHovering=!1,this.isOpen=!1}createRenderRoot(){return this}render(){return c`
|
|
4575
4575
|
<li
|
|
4576
4576
|
@mouseenter="${this.handleHover}"
|
|
4577
4577
|
@mouseleave="${this.handleMouseLeave}"
|
|
@@ -4579,7 +4579,7 @@ body {
|
|
|
4579
4579
|
class="${m("rtg-relative",this.className)}"
|
|
4580
4580
|
>
|
|
4581
4581
|
${this.navigationLink?c`<div
|
|
4582
|
-
class=${m(
|
|
4582
|
+
class=${m(sr.menuItem)}
|
|
4583
4583
|
@click="${this.toggleMenubar}"
|
|
4584
4584
|
>
|
|
4585
4585
|
<div part="button-slot"></div>
|
|
@@ -4593,7 +4593,7 @@ body {
|
|
|
4593
4593
|
stroke-width="2"
|
|
4594
4594
|
stroke-linecap="round"
|
|
4595
4595
|
stroke-linejoin="round"
|
|
4596
|
-
class=${m(
|
|
4596
|
+
class=${m(sr.menuItemIcon,this.isOpen?"rtg-rotate-180":"")}
|
|
4597
4597
|
aria-hidden="true"
|
|
4598
4598
|
>
|
|
4599
4599
|
<path d="m6 9 6 6 6-6"></path>
|
|
@@ -4601,16 +4601,16 @@ body {
|
|
|
4601
4601
|
</div>
|
|
4602
4602
|
<div part="content-slot" style="position:absolute"></div>`:""}
|
|
4603
4603
|
</li>
|
|
4604
|
-
`}};n([l({type:String}),d("design:type",String)],
|
|
4604
|
+
`}};n([l({type:String}),d("design:type",String)],fe.prototype,"value",void 0),n([l({type:Boolean}),d("design:type",Boolean)],fe.prototype,"navigationLink",void 0),n([k(),d("design:type",Object)],fe.prototype,"isOpen",void 0),n([k(),d("design:type",Array)],fe.prototype,"uniqueIds",void 0),n([k(),d("design:type",Object)],fe.prototype,"isHovering",void 0),fe=n([h("rtg-navigation-menu-item")],fe);var yr=class extends x{constructor(...e){super(...e),this.state="close",this.id="",this.side="bottom",this.isOpen=!0}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof fe);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=navigation-menu-content-container]")}getAttributesToExclude(){return["data-testid"]}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){let t=this.querySelector("button");this&&!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&(this.isOpen=!1)}createRenderRoot(){return this}firstUpdated(e){requestAnimationFrame(()=>{this.moveLightDomChildrenInto(this._containerElement)})}render(){return c`
|
|
4605
4605
|
<div
|
|
4606
|
-
class="${m(
|
|
4606
|
+
class="${m(sr.content,this.className)}"
|
|
4607
4607
|
style="display: ${this.isOpen?"block":"none"};top:0px;left:0px;"
|
|
4608
4608
|
part="navigation-menu-content"
|
|
4609
4609
|
>
|
|
4610
4610
|
<div
|
|
4611
4611
|
data-state="${this.isOpen}"
|
|
4612
4612
|
data-orientation="horizontal"
|
|
4613
|
-
class="${m(
|
|
4613
|
+
class="${m(sr.contentContainer,this.className)}"
|
|
4614
4614
|
>
|
|
4615
4615
|
<div
|
|
4616
4616
|
id="${this.id}"
|
|
@@ -4621,33 +4621,33 @@ body {
|
|
|
4621
4621
|
></div>
|
|
4622
4622
|
</div>
|
|
4623
4623
|
</div>
|
|
4624
|
-
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],
|
|
4624
|
+
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],yr.prototype,"state",void 0),n([l({type:String}),d("design:type",Object)],yr.prototype,"id",void 0),n([l({type:String}),d("design:type",Object)],yr.prototype,"side",void 0),n([k(),d("design:type",Object)],yr.prototype,"isOpen",void 0),yr=n([h("rtg-navigation-menu-content")],yr);var ss=class extends x{constructor(...e){super(...e),this.href="/"}get _containerElement(){return this.querySelector("a[part=navigation-menu-link]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4625
4625
|
<a
|
|
4626
4626
|
part="navigation-menu-link"
|
|
4627
|
-
class="${m(
|
|
4627
|
+
class="${m(sr.link,this.className)}"
|
|
4628
4628
|
href="${this.href}"
|
|
4629
4629
|
data-radix-collection-item=""
|
|
4630
4630
|
data-tabindex=""
|
|
4631
4631
|
tabindex="-1"
|
|
4632
4632
|
>
|
|
4633
4633
|
</a>
|
|
4634
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
4634
|
+
`}};n([l({type:String}),d("design:type",Object)],ss.prototype,"href",void 0),ss=n([h("rtg-navigation-menu-link")],ss);var Qa=class extends x{get _containerElement(){return this.querySelector("div[part=navigation-menu-trigger]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getAttributesToExclude(){return["data-testid"]}render(){return c`
|
|
4635
4635
|
<div part="navigation-menu-trigger" class="${m(this.className)}"></div>
|
|
4636
|
-
`}};
|
|
4636
|
+
`}};Qa=n([h("rtg-navigation-menu-trigger")],Qa);var tl=class extends x{get _containerElement(){return this.querySelector("nav[part=navigation-menu]")}createRenderRoot(){return this}firstUpdated(e){}render(){return c`
|
|
4637
4637
|
<nav
|
|
4638
4638
|
part="navigation-menu"
|
|
4639
4639
|
aria-label="Main"
|
|
4640
4640
|
data-orientation="horizontal"
|
|
4641
4641
|
dir="ltr"
|
|
4642
|
-
class="${m(
|
|
4642
|
+
class="${m(sr.menu,this.className)}"
|
|
4643
4643
|
></nav>
|
|
4644
|
-
`}};
|
|
4644
|
+
`}};tl=n([h("rtg-navigation-menu")],tl);var Ft={root:["rtg-flex","rtg-justify-center","rtg-mx-auto","rtg-w-full"],content:["rtg-flex","rtg-flex-row rtg-gap-pagination-content-space-gap rtg-items-center"],item:[""],link:Jr,previous:{base:["rtg-gap-pagination-previous-space-gap","rtg-px-pagination-previous-space-px sm:rtg-pl-pagination-previous-space-px"],span:["rtg-hidden sm:rtg-block"]},next:{base:["rtg-gap-pagination-next-space-gap","rtg-px-pagination-next-space-px sm:rtg-pr-pagination-next-space-px"],span:["rtg-hidden sm:rtg-block"]},ellipsis:{base:["rtg-flex rtg-justify-center rtg-items-center","rtg-size-pagination-ellipsis-space-size"],icon:["rtg-size-pagination-ellipsis-icon-space-size"],span:["rtg-sr-only"]}},el=class extends x{get _containerElement(){return this.querySelector("ul[part=pagination-content]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4645
4645
|
<ul
|
|
4646
4646
|
data-slot="pagination-content"
|
|
4647
4647
|
part="pagination-content"
|
|
4648
4648
|
class=${m(Ft.content,this.className)}
|
|
4649
4649
|
></ul>
|
|
4650
|
-
`}};
|
|
4650
|
+
`}};el=n([h("rtg-pagination-content")],el);var rl=class extends x{get _containerElement(){return this.querySelector("span[part=pagination-ellipsis]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4651
4651
|
<span
|
|
4652
4652
|
aria-hidden
|
|
4653
4653
|
data-slot="pagination-ellipsis"
|
|
@@ -4673,7 +4673,7 @@ body {
|
|
|
4673
4673
|
|
|
4674
4674
|
<span class=${m(Ft.ellipsis.span)}>More pages</span>
|
|
4675
4675
|
</span>
|
|
4676
|
-
`}};
|
|
4676
|
+
`}};rl=n([h("rtg-pagination-ellipsis")],rl);var il,Be=class extends x{constructor(...e){super(...e),this.state="close",this.isActive=!1,this.size="icon",this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("a[part=pagination-link]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){super.updated(e),this.state==="open"?this.isActive=!0:this.isActive=!1}render(){return c`
|
|
4677
4677
|
<a
|
|
4678
4678
|
aria-current=${this.isActive?"page":void 0}
|
|
4679
4679
|
data-slot="pagination-link"
|
|
@@ -4684,14 +4684,14 @@ body {
|
|
|
4684
4684
|
class=${m(Ft.link({variant:this.isActive?"outline":"ghost",size:this.size}),this.className)}
|
|
4685
4685
|
>
|
|
4686
4686
|
</a>
|
|
4687
|
-
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],
|
|
4687
|
+
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],Be.prototype,"state",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Be.prototype,"isActive",void 0),n([l({type:String}),d("design:type",typeof(il=typeof Exclude<"u"&&Exclude)=="function"?il:Object)],Be.prototype,"size",void 0),n([l({type:String}),d("design:type",String)],Be.prototype,"href",void 0),Be=n([h("rtg-pagination-link")],Be);var Ri=class extends x{constructor(...e){super(...e),this.uniqueIds=[],this.isActive=!1}get _containerElement(){return this.querySelector("li[part=pagination-item]")}get _content(){var t;let e=(t=this._containerElement)==null?void 0:t.children;if(e){for(let r=0;r<e.length;r++)if(e[r]instanceof Be)return e[r]}return null}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isActive?"open":"close")}handleClick(e){e.stopPropagation(),document.querySelectorAll("rtg-pagination-item").forEach(t=>{t!==this&&(t.isActive=!1)}),this.isActive=!this.isActive}firstUpdated(){var r;this.moveLightDomChildrenInto(this._containerElement);let e=(r=this._containerElement)==null?void 0:r.children,t=[];for(let i=0;i<e.length-1;i+=1){let o=e[i],s=crypto.randomUUID();t.push(s),o.dataset.pairId=s}this.uniqueIds=t,this._content&&this._content.removeEventListener("unique-ids-generated",()=>{this.requestUpdate()})}raiseEvent(){let e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}createRenderRoot(){return this}render(){return c`
|
|
4688
4688
|
<li
|
|
4689
4689
|
data-slot="pagination-item"
|
|
4690
4690
|
part="pagination-item"
|
|
4691
4691
|
class=${m(Ft.item,this.className)}
|
|
4692
4692
|
@click="${this.handleClick}"
|
|
4693
4693
|
></li>
|
|
4694
|
-
`}};n([k(),d("design:type",Array)],
|
|
4694
|
+
`}};n([k(),d("design:type",Array)],Ri.prototype,"uniqueIds",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Ri.prototype,"isActive",void 0),Ri=n([h("rtg-pagination-item")],Ri);var ns=class extends x{constructor(...e){super(...e),this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("div[part=pagination-next]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4695
4695
|
<rtg-pagination-link
|
|
4696
4696
|
aria-label="Go to next page"
|
|
4697
4697
|
size="default"
|
|
@@ -4717,7 +4717,7 @@ body {
|
|
|
4717
4717
|
|
|
4718
4718
|
<div part="pagination-next"></div>
|
|
4719
4719
|
</rtg-pagination-link>
|
|
4720
|
-
`}};n([l({type:String}),d("design:type",String)],
|
|
4720
|
+
`}};n([l({type:String}),d("design:type",String)],ns.prototype,"href",void 0),ns=n([h("rtg-pagination-next")],ns);var as=class extends x{constructor(...e){super(...e),this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("div[part=pagination-previous]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4721
4721
|
<rtg-pagination-link
|
|
4722
4722
|
aria-label="Go to previous page"
|
|
4723
4723
|
size="default"
|
|
@@ -4743,7 +4743,7 @@ body {
|
|
|
4743
4743
|
|
|
4744
4744
|
<div part="pagination-previous"></div>
|
|
4745
4745
|
</rtg-pagination-link>
|
|
4746
|
-
`}};n([l({type:String}),d("design:type",String)],
|
|
4746
|
+
`}};n([l({type:String}),d("design:type",String)],as.prototype,"href",void 0),as=n([h("rtg-pagination-previous")],as);var ol=class extends x{get _containerElement(){return this.querySelector("nav[part=pagination]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4747
4747
|
<nav
|
|
4748
4748
|
role="navigation"
|
|
4749
4749
|
aria-label="pagination"
|
|
@@ -4751,7 +4751,7 @@ body {
|
|
|
4751
4751
|
part="pagination"
|
|
4752
4752
|
class=${m(Ft.root,this.className)}
|
|
4753
4753
|
></nav>
|
|
4754
|
-
`}};
|
|
4754
|
+
`}};ol=n([h("rtg-pagination")],ol);var st=class extends v{constructor(...e){super(...e),this.id="",this._showPassword=!1,this._handleToggle=()=>{this._showPassword=!this._showPassword}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}_renderIcon(){return this._showPassword?c`
|
|
4755
4755
|
<svg
|
|
4756
4756
|
data-slot="password-input-icon"
|
|
4757
4757
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4837,7 +4837,7 @@ body {
|
|
|
4837
4837
|
</rtg-input-group-button>
|
|
4838
4838
|
</rtg-input-group-addon>
|
|
4839
4839
|
</rtg-input-group>
|
|
4840
|
-
`}};n([l({type:String}),d("design:type",Object)],st.prototype,"autocomplete",void 0),n([l({type:Boolean}),d("design:type",Boolean)],st.prototype,"disabled",void 0),n([l({type:String}),d("design:type",String)],st.prototype,"form",void 0),n([l({type:String}),d("design:type",Object)],st.prototype,"id",void 0),n([l({type:Boolean}),d("design:type",Boolean)],st.prototype,"invalid",void 0),n([l({type:Number}),d("design:type",Number)],st.prototype,"maxlength",void 0),n([l({type:Number}),d("design:type",Number)],st.prototype,"minlength",void 0),n([l({type:String}),d("design:type",String)],st.prototype,"name",void 0),n([l({type:String}),d("design:type",String)],st.prototype,"pattern",void 0),n([l({type:String}),d("design:type",String)],st.prototype,"placeholder",void 0),n([l({type:Boolean}),d("design:type",Boolean)],st.prototype,"readonly",void 0),n([l({type:Boolean}),d("design:type",Boolean)],st.prototype,"required",void 0),n([l({type:String}),d("design:type",String)],st.prototype,"value",void 0),n([l({attribute:!1}),d("design:type",Function)],st.prototype,"onClick",void 0),n([l({attribute:!1}),d("design:type",Function)],st.prototype,"onInput",void 0),n([l({attribute:!1}),d("design:type",Function)],st.prototype,"onChange",void 0),n([l({attribute:!1}),d("design:type",Function)],st.prototype,"onFocus",void 0),n([l({attribute:!1}),d("design:type",Function)],st.prototype,"onBlur",void 0),n([k(),d("design:type",Object)],st.prototype,"_showPassword",void 0),st=n([h("rtg-password-input")],st);var
|
|
4840
|
+
`}};n([l({type:String}),d("design:type",Object)],st.prototype,"autocomplete",void 0),n([l({type:Boolean}),d("design:type",Boolean)],st.prototype,"disabled",void 0),n([l({type:String}),d("design:type",String)],st.prototype,"form",void 0),n([l({type:String}),d("design:type",Object)],st.prototype,"id",void 0),n([l({type:Boolean}),d("design:type",Boolean)],st.prototype,"invalid",void 0),n([l({type:Number}),d("design:type",Number)],st.prototype,"maxlength",void 0),n([l({type:Number}),d("design:type",Number)],st.prototype,"minlength",void 0),n([l({type:String}),d("design:type",String)],st.prototype,"name",void 0),n([l({type:String}),d("design:type",String)],st.prototype,"pattern",void 0),n([l({type:String}),d("design:type",String)],st.prototype,"placeholder",void 0),n([l({type:Boolean}),d("design:type",Boolean)],st.prototype,"readonly",void 0),n([l({type:Boolean}),d("design:type",Boolean)],st.prototype,"required",void 0),n([l({type:String}),d("design:type",String)],st.prototype,"value",void 0),n([l({attribute:!1}),d("design:type",Function)],st.prototype,"onClick",void 0),n([l({attribute:!1}),d("design:type",Function)],st.prototype,"onInput",void 0),n([l({attribute:!1}),d("design:type",Function)],st.prototype,"onChange",void 0),n([l({attribute:!1}),d("design:type",Function)],st.prototype,"onFocus",void 0),n([l({attribute:!1}),d("design:type",Function)],st.prototype,"onBlur",void 0),n([k(),d("design:type",Object)],st.prototype,"_showPassword",void 0),st=n([h("rtg-password-input")],st);var sl={root:["rtg-relative rtg-overflow-hidden","rtg-w-progress-space-w rtg-h-progress-space-h","rtg-bg-progress-color-bg","rtg-rounded-progress-radius"],indicator:["rtg-flex-1","rtg-w-progress-indicator-space-w rtg-h-progress-indicator-space-h","rtg-bg-progress-indicator-color-bg","rtg-transition-all"]},ls=class extends v{constructor(...e){super(...e),this.value=15}createRenderRoot(){return this}render(){return c`
|
|
4841
4841
|
<div
|
|
4842
4842
|
part="progress"
|
|
4843
4843
|
aria-valuenow="${this.value}"
|
|
@@ -4846,16 +4846,16 @@ body {
|
|
|
4846
4846
|
role="progressbar"
|
|
4847
4847
|
data-state="indeterminate"
|
|
4848
4848
|
data-max="100"
|
|
4849
|
-
class="${m(
|
|
4849
|
+
class="${m(sl.root,this.className)}"
|
|
4850
4850
|
>
|
|
4851
4851
|
<div
|
|
4852
4852
|
data-state="indeterminate"
|
|
4853
4853
|
data-max="100"
|
|
4854
|
-
class="${m(
|
|
4854
|
+
class="${m(sl.indicator,this.className)}"
|
|
4855
4855
|
style="transform: translateX(-${100-(this.value||0)}%);"
|
|
4856
4856
|
></div>
|
|
4857
4857
|
</div>
|
|
4858
|
-
`}};n([l({type:Number}),d("design:type",Number)],
|
|
4858
|
+
`}};n([l({type:Number}),d("design:type",Number)],ls.prototype,"value",void 0),ls=n([h("rtg-progress")],ls);var Kr={root:["rtg-grid","rtg-gap-radio-group-space-gap"],item:{wrapper:["rtg-inline-flex","rtg-justify-center rtg-items-center","rtg-size-radio-group-item-space-size"],item:["rtg-aspect-square","rtg-shrink-0","rtg-size-radio-group-item-space-size","rtg-bg-radio-group-item-color-bg","rtg-rounded-radio-group-item-radius rtg-border-radio-group-item-width-border rtg-border-radio-group-item-color-border rtg-outline-none","rtg-transition-[color,box-shadow]","focus-visible:rtg-border-radio-group-item-color-border-focus focus-visible:rtg-ring-radio-group-item-width-ring-focus focus-visible:rtg-ring-radio-group-item-color-ring-focus","disabled:rtg-opacity-radio-group-item-opacity-disabled disabled:rtg-cursor-not-allowed","aria-invalid:rtg-border-radio-group-item-color-border-invalid aria-invalid:rtg-ring-radio-group-item-width-ring-invalid aria-invalid:rtg-ring-radio-group-item-color-ring-invalid"],indicator:["rtg-flex rtg-relative","rtg-justify-center rtg-items-center"],icon:["rtg-absolute rtg-top-1/2 rtg-left-1/2","rtg-size-radio-group-indicator-space-size","rtg--translate-x-1/2 rtg--translate-y-1/2","rtg-fill-radio-group-indicator-color-fill"]}},ju="unChecked",ee=class extends x{constructor(...e){super(...e),this.checked=!1,this.tabindex=0,this.value="",this.id="radio-group-item",this.state=ju,this.disabled=!1,this.invalid=!1}get _containerElement(){return this.querySelector("button[part=radio-group-item]")}_onClick(e){e.defaultPrevented||this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this.classList=m(Kr.item.wrapper),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
4859
4859
|
<button
|
|
4860
4860
|
type="button"
|
|
4861
4861
|
part="radio-group-item"
|
|
@@ -4866,14 +4866,14 @@ body {
|
|
|
4866
4866
|
value="${this.value}"
|
|
4867
4867
|
?disabled=${this.disabled}
|
|
4868
4868
|
@click="${this._onClick}"
|
|
4869
|
-
class=${m(
|
|
4869
|
+
class=${m(Kr.item.item,this.className)}
|
|
4870
4870
|
id="${this.id}"
|
|
4871
4871
|
tabindex="${this.tabindex}"
|
|
4872
4872
|
>
|
|
4873
4873
|
${this.checked?c`<span
|
|
4874
4874
|
data-slot="radio-group-indicator"
|
|
4875
4875
|
part="radio-group-indicator"
|
|
4876
|
-
class=${m(
|
|
4876
|
+
class=${m(Kr.item.indicator)}
|
|
4877
4877
|
>
|
|
4878
4878
|
<svg
|
|
4879
4879
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4885,18 +4885,18 @@ body {
|
|
|
4885
4885
|
stroke-width="2"
|
|
4886
4886
|
stroke-linecap="round"
|
|
4887
4887
|
stroke-linejoin="round"
|
|
4888
|
-
class=${m(
|
|
4888
|
+
class=${m(Kr.item.icon,"lucide lucide-circle-icon lucide-circle")}
|
|
4889
4889
|
>
|
|
4890
4890
|
<circle cx="12" cy="12" r="10" />
|
|
4891
4891
|
</svg>
|
|
4892
4892
|
</span>`:f}
|
|
4893
4893
|
</button>
|
|
4894
|
-
`}};n([l({type:Boolean,reflect:!0}),d("design:type",Object)],
|
|
4894
|
+
`}};n([l({type:Boolean,reflect:!0}),d("design:type",Object)],ee.prototype,"checked",void 0),n([l({type:Number}),d("design:type",Object)],ee.prototype,"tabindex",void 0),n([l({type:String}),d("design:type",Object)],ee.prototype,"value",void 0),n([l({type:String}),d("design:type",Object)],ee.prototype,"id",void 0),n([l({attribute:"data-state",type:String}),d("design:type",Object)],ee.prototype,"state",void 0),n([l({type:Boolean}),d("design:type",Object)],ee.prototype,"disabled",void 0),n([l({attribute:"aria-invalid",type:Boolean}),d("design:type",Object)],ee.prototype,"invalid",void 0),ee=n([h("rtg-radio-group-item")],ee);var ds=class extends x{constructor(...e){super(...e),this.defaultValue=""}get _containerElement(){return this.querySelector("div[part=radio-group]")}connectedCallback(){super.connectedCallback(),this.addEventListener("radio-selected",this._handleRadioSelected)}_handleRadioSelected(e){this.querySelectorAll("rtg-radio-group-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return this.querySelectorAll("rtg-radio-group-item").forEach(e=>{e.checked=e.value==this.defaultValue}),c`
|
|
4895
4895
|
<div
|
|
4896
4896
|
part="radio-group"
|
|
4897
|
-
class=${m(
|
|
4897
|
+
class=${m(Kr.root,this.className)}
|
|
4898
4898
|
></div>
|
|
4899
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
4899
|
+
`}};n([l({type:String}),d("design:type",Object)],ds.prototype,"defaultValue",void 0),ds=n([h("rtg-radio-group")],ds);var Nu=["rtg-relative","rtg-border rtg-border-scrollarea-color-border","rtg-bg-scrollarea-color-bg"],nl,cs=class extends x{createRenderRoot(){return this}firstUpdated(){this.moveLightDomChildrenInto(this.viewportEl)}render(){return c`
|
|
4900
4900
|
<div
|
|
4901
4901
|
dir="ltr"
|
|
4902
4902
|
data-slot="scroll-area"
|
|
@@ -4933,7 +4933,7 @@ body {
|
|
|
4933
4933
|
style="overflow: hidden scroll;"
|
|
4934
4934
|
></div>
|
|
4935
4935
|
</div>
|
|
4936
|
-
`}};n([
|
|
4936
|
+
`}};n([li("[data-radix-scroll-area-viewport]"),d("design:type",typeof(nl=typeof HTMLElement<"u"&&HTMLElement)=="function"?nl:Object)],cs.prototype,"viewportEl",void 0),cs=n([h("rtg-scroll-area")],cs);var Uu=class{constructor(){this.state={isOpen:!1,selectedValue:"",selectedText:""},this.listeners=new Set}subscribe(e){this.listeners.add(e)}unsubscribe(e){this.listeners.delete(e)}notify(){this.listeners.forEach(e=>e())}get isOpen(){return this.state.isOpen}get selectedValue(){return this.state.selectedValue}get selectedText(){return this.state.selectedText}open(){this.state.isOpen||(this.state.isOpen=!0,this.notify())}close(){this.state.isOpen&&(this.state.isOpen=!1,this.notify())}toggle(){this.state.isOpen=!this.state.isOpen,this.notify()}select(e,t,r){this.state.selectedValue=e,this.state.selectedText=t,this.state.isOpen=!1,this.notify()}},Mt={root:[""],value:["rtg-flex","rtg-gap-select-value-space-gap rtg-items-center","rtg-line-clamp-1"],trigger:{trigger:["rtg-flex","rtg-gap-select-trigger-space-gap rtg-justify-between rtg-items-center","rtg-px-select-trigger-space-px rtg-py-select-trigger-space-py","rtg-w-full rtg-h-select-trigger-space-h","rtg-text-select-trigger-font rtg-whitespace-nowrap","rtg-bg-select-trigger-color-bg","rtg-rounded-select-trigger-radius rtg-border-select-trigger-width-border rtg-border-select-trigger-color-border rtg-outline-none","rtg-transition-[color,box-shadow]","hover:rtg-bg-select-trigger-color-bg-hover","focus-visible:rtg-border-select-trigger-color-border-focus focus-visible:rtg-ring-select-trigger-width-ring-focus focus-visible:rtg-ring-select-trigger-color-ring-focus","disabled:rtg-opacity-select-trigger-opacity-disabled disabled:rtg-cursor-not-allowed","aria-invalid:rtg-border-select-trigger-color-border-invalid aria-invalid:rtg-ring-select-trigger-width-ring-invalid aria-invalid:rtg-ring-select-trigger-color-ring-invalid","data-[placeholder]:rtg-text-select-trigger-placeholder-color-text"],icon:["rtg-shrink-0","rtg-size-select-trigger-icon-space-size","rtg-text-select-trigger-icon-color-text","rtg-opacity-select-trigger-icon-opacity","rtg-pointer-events-none"]},content:{content:["rtg-absolute rtg-overflow-x-hidden rtg-overflow-y-auto rtg-z-50","rtg-w-fit","rtg-text-select-content-color-text","rtg-bg-select-content-color-bg","rtg-rounded-select-content-radius rtg-border-select-content-width-border rtg-border-select-content-color-border","rtg-shadow-select-content-shadow","rtg-slide-in-from-top-2","rtg-translate-y-1","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95"],viewport:["rtg-p-select-content-viewport-space-p","rtg-w-full","rtg-scroll-my-1"]},label:["rtg-px-select-label-space-px rtg-py-select-label-space-py","rtg-text-select-label-font rtg-text-select-label-color-text"],item:{item:["rtg-flex rtg-relative","rtg-gap-select-item-space-gap rtg-items-center","rtg-pl-select-item-space-pl rtg-pr-select-item-space-pr rtg-py-select-item-space-py","rtg-w-full","rtg-text-select-item-font","rtg-rounded-select-item-radius rtg-outline-hidden","rtg-cursor-default rtg-select-none","hover:rtg-text-select-item-color-text-hover hover:rtg-bg-select-item-color-bg-hover","focus:rtg-text-select-item-color-text-focus focus:rtg-bg-select-item-color-bg-focus","data-[disabled]:rtg-opacity-select-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],indicator:["rtg-flex rtg-absolute rtg-right-2","rtg-justify-center rtg-items-center","rtg-size-select-item-indicator-space-size"],icon:["rtg-shrink-0","rtg-size-select-item-icon-space-size","rtg-text-select-item-icon-color-text","rtg-pointer-events-none"]},separator:["rtg-mx-select-separator-space-mx rtg-my-select-separator-space-my","rtg-h-select-separator-space-h","rtg-bg-select-separator-color-bg","rtg-pointer-events-none"]},us=class extends x{constructor(...e){super(...e),this.focusedIndex=0,this.childrenArray=[],this.onStoreChange=()=>{let t=this._containerElement;t&&(t.style.display=this._select.selectStore.isOpen?"block":"none",this._contentDiv&&(this._contentDiv.style.display=this._select.selectStore.isOpen?"block":"none",this._select.selectStore.isOpen&&requestAnimationFrame(()=>{this.updateTriggerWidth()}))),this._select.selectStore.isOpen&&this._select.selectStore.selectedValue&&(this.focusedIndex=this.childrenArray.findIndex(r=>r.value===this._select.selectStore.selectedValue)),this.updateFocusedItem(),this.requestUpdate()},this.handleKeyDown=t=>{var r;if(this._select.selectStore.isOpen)switch(t.preventDefault(),t.key){case"ArrowDown":this.focusedIndex=(this.focusedIndex+1)%this.childrenArray.length,this.updateFocusedItem();break;case"ArrowUp":this.focusedIndex=(this.focusedIndex-1+this.childrenArray.length)%this.childrenArray.length,this.updateFocusedItem();break;case"Enter":let i=this.childrenArray[this.focusedIndex],o=i.value,s=((r=i.textContent)==null?void 0:r.trim())||"";this._select.selectStore.select(o,s);break}}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Ar);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange),document.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback()}getTriggerButton(){let e=this._select;return e?e.querySelector("button[part=select-trigger]"):null}updateTriggerWidth(){let e=this.getTriggerButton(),t=this._contentDiv;if(e&&t){let r=e.offsetWidth;if(r>0){let i=Math.max(128,r);t.style.setProperty("--select-trigger-width",`${r}px`),t.style.setProperty("min-width",`${i}px`)}}}get _containerElement(){return this.querySelector("div[part=select-viewport]")}get _contentDiv(){return this.querySelector("div[data-slot=select-content]")}firstUpdated(){let e=Array.from(this.children).filter(t=>t.tagName.toLowerCase()==="rtg-select-item");this.childrenArray=e,e.forEach((t,r)=>{t.tabIndex=r,t.selectItemIndex=r,t.isFocus=r===this.focusedIndex||t.value===this._select.selectStore.selectedValue,t.addEventListener("mouseover",i=>this.handleMouseOver(i,r))}),this.moveLightDomChildrenInto(this._containerElement),requestAnimationFrame(()=>{this.updateTriggerWidth()})}updateFocusedItem(){this.childrenArray.forEach((e,t)=>{var r;e.isFocus=t===this.focusedIndex,(r=e.requestUpdate)==null||r.call(e)})}handleMouseOver(e,t){e.preventDefault(),this.focusedIndex=t}createRenderRoot(){return this}render(){return c`
|
|
4937
4937
|
<div
|
|
4938
4938
|
part="select-group"
|
|
4939
4939
|
data-slot="select-content"
|
|
@@ -4945,7 +4945,7 @@ body {
|
|
|
4945
4945
|
class=${m(Mt.content.viewport)}
|
|
4946
4946
|
></div>
|
|
4947
4947
|
</div>
|
|
4948
|
-
`}};n([k(),d("design:type",Object)],
|
|
4948
|
+
`}};n([k(),d("design:type",Object)],us.prototype,"focusedIndex",void 0),us=n([h("rtg-select-group")],us);var pe=class extends x{constructor(...e){super(...e),this.value="",this.isSelected=!1,this.isFocus=!1,this.selectItemIndex=-1,this.onSelect=(t,r)=>{},this.class="",this._onStoreChange=()=>{var t,r;this.isSelected=this.value.toLowerCase()===((r=(t=this._select.selectStore.selectedValue)==null?void 0:t.toLowerCase)==null?void 0:r.call(t)),this.requestUpdate()},this.handleClick=t=>{t.stopPropagation();let r=this.getTextContent();this._select.selectStore.select(this.value,r),this.onSelect(this.value,this.selectItemIndex),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Ar);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this._onStoreChange)}disconnectedCallback(){this._select.selectStore.unsubscribe(this._onStoreChange),super.disconnectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get _containerElement(){return this.querySelector("div[part=select-item-container]")}createRenderRoot(){return this}getTextContent(){var i,o;let e=this._containerElement;if(e&&e.textContent)return e.textContent.trim();let t=this.querySelector("[part=select-item-indicator]"),r=this.cloneNode(!0);return t&&((i=r.querySelector("[part=select-item-indicator]"))==null||i.remove()),((o=r.textContent)==null?void 0:o.trim())||""}render(){return c`
|
|
4949
4949
|
<div
|
|
4950
4950
|
${pt(this.getFilteredAttributes())}
|
|
4951
4951
|
part="select-item"
|
|
@@ -4979,12 +4979,12 @@ body {
|
|
|
4979
4979
|
|
|
4980
4980
|
<div part="select-item-container"></div>
|
|
4981
4981
|
</div>
|
|
4982
|
-
`}};n([l(),d("design:type",Object)],
|
|
4982
|
+
`}};n([l(),d("design:type",Object)],pe.prototype,"value",void 0),n([l(),d("design:type",Object)],pe.prototype,"isSelected",void 0),n([l(),d("design:type",Object)],pe.prototype,"isFocus",void 0),n([l(),d("design:type",Object)],pe.prototype,"selectItemIndex",void 0),n([l({type:Function}),d("design:type",Object)],pe.prototype,"onSelect",void 0),n([l(),d("design:type",Object)],pe.prototype,"class",void 0),pe=n([h("rtg-select-item")],pe);var al=class extends x{get _containerElement(){return this.querySelector("div[part=select-label]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return c`
|
|
4983
4983
|
<div
|
|
4984
4984
|
part="select-label"
|
|
4985
4985
|
class=${m(Mt.label,this.className)}
|
|
4986
4986
|
></div>
|
|
4987
|
-
`}};
|
|
4987
|
+
`}};al=n([h("rtg-select-label")],al);var Oi=class extends x{constructor(...e){super(...e),this.state=Hs,this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=select-list]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return c`
|
|
4988
4988
|
<div
|
|
4989
4989
|
part="select-list"
|
|
4990
4990
|
class="${m("rtg-absolute rtg-z-50 rtg-max-h-72 rtg-w-full rtg-overflow-hidden rtg-overflow-y-auto rtg-rounded-lg rtg-border rtg-border-input rtg-bg-background p-1 [&::-webkit-scrollbar-thumb]:rtg-rounded-full [&::-webkit-scrollbar-thumb]:rtg-bg-accent [&::-webkit-scrollbar-track]:rtg-bg-gray-100 [&::-webkit-scrollbar]:rtg-w-2",this.className)}"
|
|
@@ -4992,14 +4992,14 @@ body {
|
|
|
4992
4992
|
data-state="${this.state}"
|
|
4993
4993
|
style="display: ${this.isOpen?"block":"none"}; top:115%"
|
|
4994
4994
|
></div>
|
|
4995
|
-
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],
|
|
4995
|
+
`}};n([l({attribute:"data-state",type:String}),d("design:type",Object)],Oi.prototype,"state",void 0),n([k(),d("design:type",Object)],Oi.prototype,"isOpen",void 0),Oi=n([h("rtg-select-list")],Oi);var Ai=class extends v{constructor(...e){super(...e),this._id="",this._hidden=""}createRenderRoot(){return this}render(){return c`
|
|
4996
4996
|
<div
|
|
4997
4997
|
rtgcmd-separator
|
|
4998
4998
|
part="select-separator"
|
|
4999
4999
|
role="separator"
|
|
5000
5000
|
class=${m(Mt.separator,this.className)}
|
|
5001
5001
|
></div>
|
|
5002
|
-
`}};n([l({type:String}),d("design:type",Object)],Ai.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],Ai.prototype,"_hidden",void 0),Ai=n([h("rtg-select-separator")],Ai);var
|
|
5002
|
+
`}};n([l({type:String}),d("design:type",Object)],Ai.prototype,"_id",void 0),n([l({attribute:"aria-hidden",type:String}),d("design:type",Object)],Ai.prototype,"_hidden",void 0),Ai=n([h("rtg-select-separator")],Ai);var ll=class extends x{constructor(...e){super(...e),this.onStoreChange=()=>{this.requestUpdate()},this.handleClick=t=>{t.stopPropagation(),this._select&&this._select.selectStore.toggle()}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Ar);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),this.classObserver=new MutationObserver(()=>{this.requestUpdate()}),this.classObserver.observe(this,{attributes:!0,attributeFilter:["class"]})}disconnectedCallback(){var e;this._select.selectStore.unsubscribe(this.onStoreChange),(e=this.classObserver)==null||e.disconnect()}get _containerElement(){return this.querySelector("span[part=select-trigger-container]")}firstUpdated(e){var t;super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",this.handleClick)}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}getClassAttribute(){let e=this.getAttribute("class")||"",t=this.customClass||"",r=this.className||"";return e||t||r||""}filterConflictingWidthClasses(e,t){let r=/rtg-w-[\w-[\]]+/;return r.test(t)?e.map(i=>i.split(/\s+/).filter(o=>!r.test(o)).join(" ")):e}render(){let e=this.getClassAttribute();return c`
|
|
5003
5003
|
<button
|
|
5004
5004
|
type="button"
|
|
5005
5005
|
part="select-trigger"
|
|
@@ -5028,17 +5028,17 @@ body {
|
|
|
5028
5028
|
<path d="m6 9 6 6 6-6" />
|
|
5029
5029
|
</svg>
|
|
5030
5030
|
</button>
|
|
5031
|
-
`}};
|
|
5031
|
+
`}};ll=n([h("rtg-select-trigger")],ll);var ps=class extends x{constructor(...e){super(...e),this.placeholder="select a value",this.onStoreChange=()=>{this.requestUpdate()},this.renderLabel=()=>{if(this._select&&this._select.selectStore.selectedValue.length>0){let t=this._select.selectStore.selectedText;return t.length>0?t:this._select.selectStore.selectedValue}return this.placeholder}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Ar);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("clicked-select-item",()=>{this.requestUpdate()})}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange)}firstUpdated(e){super.firstUpdated(e)}createRenderRoot(){return this}render(){return c`
|
|
5032
5032
|
<span part="select-value" class=${m(Mt.value,this.className)}>
|
|
5033
5033
|
${this.renderLabel()}
|
|
5034
5034
|
</span>
|
|
5035
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
5035
|
+
`}};n([l({type:String}),d("design:type",Object)],ps.prototype,"placeholder",void 0),ps=n([h("rtg-select-value")],ps);var Ar=class extends x{constructor(...e){super(...e),this.uuid=Bs(),this.selectStore=new Uu,this.handleClickOutside=t=>{let r=this.querySelector("[data-select-uuid]"),i=t.target;r!=null&&r.contains(i)||this.selectStore.close()}}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}firstUpdated(){let e=this.querySelector("div[part=select]");this.moveLightDomChildrenInto(e)}createRenderRoot(){return this}render(){return c`
|
|
5036
5036
|
<div
|
|
5037
5037
|
part="select"
|
|
5038
5038
|
data-select-uuid=${this.uuid}
|
|
5039
5039
|
class=${m(Mt.root,this.className)}
|
|
5040
5040
|
></div>
|
|
5041
|
-
`}};Ar=n([h("rtg-select")],Ar);var Du="rtg-bg-skeleton-color-bg rtg-animate-skeleton-animate rtg-rounded-skeleton-radius",
|
|
5041
|
+
`}};Ar=n([h("rtg-select")],Ar);var Du="rtg-bg-skeleton-color-bg rtg-animate-skeleton-animate rtg-rounded-skeleton-radius",dl=class extends x{createRenderRoot(){return this}render(){return c` <div class=${m(Du,this.className)}></div> `}};dl=n([h("rtg-skeleton")],dl);var hs=class extends v{constructor(...e){super(...e),this.variant="circle"}createRenderRoot(){return this}render(){return this.variant==="basic"?c`
|
|
5042
5042
|
<svg
|
|
5043
5043
|
data-slot="spinner"
|
|
5044
5044
|
data-variant="basic"
|
|
@@ -5105,7 +5105,7 @@ body {
|
|
|
5105
5105
|
>
|
|
5106
5106
|
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
5107
5107
|
</svg>
|
|
5108
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
5108
|
+
`}};n([l({type:String}),d("design:type",Object)],hs.prototype,"variant",void 0),hs=n([h("rtg-spinner")],hs);var cl={root:["rtg-inline-flex","rtg-shrink-0 rtg-items-center","rtg-w-switch-space-w rtg-h-switch-space-h","rtg-rounded-switch-radius rtg-border-switch-width-border rtg-border-switch-color-border rtg-outline-none","rtg-transition-all","focus-visible:rtg-border-switch-color-border-focus focus-visible:rtg-ring-switch-width-ring-focus focus-visible:rtg-ring-switch-color-ring-focus",'data-[state="checked"]:rtg-bg-switch-color-bg-checked data-[state="unchecked"]:rtg-bg-switch-color-bg-unchecked','data-[disabled="true"]:rtg-opacity-switch-opacity-disabled data-[disabled="true"]:rtg-cursor-not-allowed'],thumb:["rtg-pointer-events-none","rtg-block","rtg-size-switch-thumb-space-size","rtg-rounded-switch-thumb-radius","rtg-ring-0","rtg-transition-transform",'data-[state="checked"]:rtg-bg-switch-thumb-color-bg-checked data-[state="unchecked"]:rtg-bg-switch-thumb-color-bg-unchecked','data-[state="checked"]:rtg-translate-x-[calc(100%-2px)] data-[state="unchecked"]:rtg-translate-x-0']},Ii=class extends v{constructor(...e){super(...e),this.disabled="false",this.state="unchecked"}_toggleChecked(){this.disabled==="false"&&(this.state=this.state==="checked"?"unchecked":"checked",this.dispatchEvent(new CustomEvent("change",{detail:this.state})))}createRenderRoot(){return this.classList="rtg-w-switch-space-w rtg-h-switch-space-h",this}render(){return c`
|
|
5109
5109
|
<div
|
|
5110
5110
|
part="switch"
|
|
5111
5111
|
role="switch"
|
|
@@ -5113,15 +5113,15 @@ body {
|
|
|
5113
5113
|
data-disabled=${this.disabled}
|
|
5114
5114
|
data-state=${this.state}
|
|
5115
5115
|
@click="${this._toggleChecked}"
|
|
5116
|
-
class=${m(
|
|
5116
|
+
class=${m(cl.root,this.className)}
|
|
5117
5117
|
>
|
|
5118
5118
|
<div
|
|
5119
5119
|
part="switch-thumb"
|
|
5120
5120
|
data-state=${this.state}
|
|
5121
|
-
class=${m(
|
|
5121
|
+
class=${m(cl.thumb)}
|
|
5122
5122
|
></div>
|
|
5123
5123
|
</div>
|
|
5124
|
-
`}};n([l({attribute:"data-disabled",type:String}),d("design:type",String)],
|
|
5124
|
+
`}};n([l({attribute:"data-disabled",type:String}),d("design:type",String)],Ii.prototype,"disabled",void 0),n([l({attribute:"data-state",type:String}),d("design:type",String)],Ii.prototype,"state",void 0),Ii=n([h("rtg-switch")],Ii);var lt={preview:["rtg-flex rtg-bg-table-preview-color-bg rtg-w-table-preview-space-w rtg-items-center rtg-justify-center rtg-px-table-preview-space-px rtg-py-table-preview-space-py"],container:["rtg-relative rtg-w-table-container-space-w rtg-overflow-auto"],table:["rtg-w-table-space-w rtg-caption-bottom rtg-text-table-font"],caption:["rtg-mt-table-caption-space-mt rtg-text-table-caption-font rtg-text-table-caption-color-text"],head:{root:["[&_tr]:rtg-border-table-head-color-border [&_tr]:rtg-border-b-table-head-width-border"],row:["rtg-border-b-table-head-width-border rtg-border-table-head-color-border rtg-transition-colors hover:rtg-bg-table-head-row-color-bg-hover"],cell:{base:["rtg-h-table-head-cell-space-h rtg-px-table-head-cell-space-px rtg-align-middle rtg-font-table-head-cell-font-weight rtg-text-table-head-cell-color-text"],align:{left:"rtg-text-left",right:"rtg-text-right"}}},body:{root:["[&_tr:last-child]:rtg-border-0"],row:["rtg-border-b-table-body-width-border rtg-border-table-body-color-border rtg-transition-colors hover:rtg-bg-table-body-row-color-bg-hover"],cell:{base:["rtg-px-table-body-cell-space-px rtg-py-table-body-cell-space-py rtg-align-middle"],align:{right:"rtg-text-right"}}},footer:{root:["rtg-border-t-table-footer-width-border rtg-border-table-footer-color-border rtg-bg-table-footer-color-bg rtg-font-table-footer-font-weight [&>tr]:rtg-last:border-b-0"],row:["rtg-border-b-table-footer-width-border rtg-border-table-footer-color-border rtg-transition-colors hover:rtg-bg-table-footer-row-color-bg-hover"],cell:{base:["rtg-px-table-footer-cell-space-px rtg-py-table-footer-cell-space-py rtg-align-middle"],align:{right:"rtg-text-right"}}}},ul,pl,Vr=class extends x{constructor(...e){super(...e),this.dataTable=[],this.footerData=[],this.captionText=""}get _containerElement(){return this.querySelector("table[part=table]")}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get columnKeys(){var t;let e=(t=this.dataTable)==null?void 0:t[0];return e?Object.keys(e).filter(r=>r!=="id"):[]}capitalizeLabel(e){return e.charAt(0).toUpperCase()+e.slice(1)}render(){let e=this.columnKeys;return c`
|
|
5125
5125
|
<div class=${m(lt.preview)}>
|
|
5126
5126
|
<div class=${m(lt.container)}>
|
|
5127
5127
|
<table part="table" class=${m(lt.table)}>
|
|
@@ -5176,20 +5176,20 @@ body {
|
|
|
5176
5176
|
</table>
|
|
5177
5177
|
</div>
|
|
5178
5178
|
</div>
|
|
5179
|
-
`}};n([l({type:Array}),d("design:type",typeof(
|
|
5179
|
+
`}};n([l({type:Array}),d("design:type",typeof(ul=typeof Array<"u"&&Array)=="function"?ul:Object)],Vr.prototype,"dataTable",void 0),n([l({type:Array}),d("design:type",typeof(pl=typeof Array<"u"&&Array)=="function"?pl:Object)],Vr.prototype,"footerData",void 0),n([l({type:String}),d("design:type",String)],Vr.prototype,"captionText",void 0),Vr=n([h("rtg-table")],Vr);function Bu(){return`rtg-${Date.now().toString(36)}${Math.random().toString(36).substring(2,7)}`}function Fu(e,t){return`${e}-trigger-${t}`}function Mu(e,t){return`${e}-content-${t}`}var re=class extends v{constructor(...e){super(...e),this.orientation="horizontal",this.dir="ltr",this.activationMode="automatic",this._baseId=Bu(),this._onTriggerSelect=t=>{var i;let r=t.detail.value;this._isControlled?(i=this.onValueChange)==null||i.call(this,r):this._activeValue=r}}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="tabs"]')}get _list(){return this.querySelector("rtg-tabs-list")}get _triggers(){return Array.from(this.querySelectorAll("rtg-tabs-trigger"))}get _contents(){return Array.from(this.querySelectorAll("rtg-tabs-content"))}get _isControlled(){return this.value!==void 0}get _currentValue(){return this._isControlled?this.value:this._activeValue}_sync(){if(this._list){let e=this._list._listSlot;e.setAttribute("data-orientation",this.orientation),e.setAttribute("aria-orientation",this.orientation)}this._triggers.forEach(e=>{var o;let t=e._triggerSlot;t.setAttribute("data-orientation",this.orientation),t.id||(t.id=Fu(this._baseId,e.value));let r=e.value===this._currentValue;t.setAttribute("data-state",r?"active":"inactive"),t.tabIndex=r?0:-1,t.setAttribute("aria-selected",String(r));let i=this._contents.find(s=>s.value===e.value);i!=null&&i._contentSlot&&((o=i._contentSlot).id||(o.id=Mu(this._baseId,i.value)),i._contentSlot.setAttribute("aria-labelledby",t.id),t.setAttribute("aria-controls",i._contentSlot.id))}),this._contents.forEach(e=>{let t=e._contentSlot;t.setAttribute("data-orientation",this.orientation);let r=e.value===this._currentValue;t.setAttribute("data-state",r?"active":"inactive"),t.toggleAttribute("hidden",!r)})}firstUpdated(){var e;Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))}),this._activeValue=this.value??this.defaultValue??((e=this._triggers[0])==null?void 0:e.value),this.addEventListener("rtg-tabs:trigger-select",this._onTriggerSelect),this._sync()}updated(e){e.has("value")&&this._isControlled&&(this._activeValue=this.value),this._sync()}render(){return c`
|
|
5180
5180
|
<div
|
|
5181
5181
|
data-slot="tabs"
|
|
5182
5182
|
data-orientation=${this.orientation}
|
|
5183
5183
|
dir=${this.dir}
|
|
5184
5184
|
></div>
|
|
5185
|
-
`}};n([l({attribute:"default-value",type:String}),d("design:type",String)],
|
|
5185
|
+
`}};n([l({attribute:"default-value",type:String}),d("design:type",String)],re.prototype,"defaultValue",void 0),n([l({type:String}),d("design:type",String)],re.prototype,"value",void 0),n([l({attribute:!1}),d("design:type",Function)],re.prototype,"onValueChange",void 0),n([l({type:String}),d("design:type",Object)],re.prototype,"orientation",void 0),n([l({type:String}),d("design:type",Object)],re.prototype,"dir",void 0),n([l({attribute:"activation-mode",type:String}),d("design:type",Object)],re.prototype,"activationMode",void 0),n([k(),d("design:type",String)],re.prototype,"_activeValue",void 0),re=n([h("rtg-tabs")],re);var gs=class extends v{constructor(...e){super(...e),this.variant="default"}createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="tabs-list"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._listSlot&&((r=this._listSlot)==null||r.appendChild(t))})}render(){return c`
|
|
5186
5186
|
<div
|
|
5187
5187
|
data-slot="tabs-list"
|
|
5188
5188
|
data-variant=${this.variant}
|
|
5189
5189
|
role="tablist"
|
|
5190
5190
|
tabindex="0"
|
|
5191
5191
|
></div>
|
|
5192
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
5192
|
+
`}};n([l({type:String}),d("design:type",Object)],gs.prototype,"variant",void 0),gs=n([h("rtg-tabs-list")],gs);var Ti=class extends v{constructor(...e){super(...e),this.value="",this._onClick=()=>{this._emitSelect()},this._onKeyDown=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._emitSelect())}}createRenderRoot(){return this}get _triggerSlot(){return this.querySelector('[data-slot="tabs-trigger"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._triggerSlot&&((r=this._triggerSlot)==null||r.appendChild(t))})}_emitSelect(){this.disabled||this.dispatchEvent(new CustomEvent("rtg-tabs:trigger-select",{detail:{value:this.value},bubbles:!0}))}render(){return c`
|
|
5193
5193
|
<button
|
|
5194
5194
|
data-slot="tabs-trigger"
|
|
5195
5195
|
?data-disabled=${this.disabled}
|
|
@@ -5199,18 +5199,18 @@ body {
|
|
|
5199
5199
|
@click=${this._onClick}
|
|
5200
5200
|
@keydown=${this._onKeyDown}
|
|
5201
5201
|
></button>
|
|
5202
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
5202
|
+
`}};n([l({type:String}),d("design:type",Object)],Ti.prototype,"value",void 0),n([l({type:Boolean}),d("design:type",Boolean)],Ti.prototype,"disabled",void 0),Ti=n([h("rtg-tabs-trigger")],Ti);var ms=class extends v{constructor(...e){super(...e),this.value=""}createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="tabs-content"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._contentSlot&&((r=this._contentSlot)==null||r.appendChild(t))})}render(){return c`
|
|
5203
5203
|
<div
|
|
5204
5204
|
data-slot="tabs-content"
|
|
5205
5205
|
role="tabpanel"
|
|
5206
5206
|
tabindex="0"
|
|
5207
5207
|
hidden
|
|
5208
5208
|
></div>
|
|
5209
|
-
`}};n([l({type:String}),d("design:type",Object)],
|
|
5209
|
+
`}};n([l({type:String}),d("design:type",Object)],ms.prototype,"value",void 0),ms=n([h("rtg-tabs-content")],ms);var ni={viewportRoot:["rtg-fixed rtg-top-0 rtg-z-[100] rtg-flex rtg-max-h-screen rtg-w-toast-viewport-root-space-w rtg-flex-col-reverse rtg-px-toast-viewport-root-space-px rtg-py-toast-viewport-root-space-py sm:rtg-bottom-0 sm:rtg-right-0 sm:rtg-top-auto sm:rtg-flex-col md:rtg-max-w-toast-viewport-root-space-w-md"],viewportItem:{base:["group rtg-pointer-events-auto rtg-relative rtg-flex rtg-w-toast-viewport-item-space-w rtg-items-center rtg-justify-between rtg-gap-toast-viewport-item-space-gap rtg-overflow-hidden rtg-rounded-toast-viewport-item-radius rtg-px-toast-viewport-item-space-px rtg-py-toast-viewport-item-space-py rtg-shadow-toast-viewport-item-shadow rtg-transition-all","data-[swipe=cancel]:rtg-translate-x-0","data-[swipe=end]:rtg-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:rtg-translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=move]:rtg-transition-none","data-[state=open]:rtg-animate-toast-animate-in","data-[state=closed]:rtg-animate-toast-animate-out","data-[swipe=end]:rtg-animate-toast-animate-out","data-[state=closed]:rtg-opacity-80","data-[state=open]:rtg-translate-y-toast-viewport-item-translate-y-enter-desktop","data-[state=open]:sm:rtg-translate-y-toast-viewport-item-translate-y-enter-mobile","data-[state=closed]:rtg-translate-x-toast-viewport-item-translate-x-exit"],variants:{default:["rtg-border rtg-border-toast-viewport-default-color-border rtg-bg-toast-viewport-default-color-bg rtg-text-toast-viewport-default-color-text"],destructive:["rtg-bg-toast-viewport-destructive-color-bg rtg-text-toast-viewport-destructive-color-text"]}},action:{base:["rtg-text-toast-action-font rtg-font-toast-action-font-weight rtg-text-toast-action-color-text","rtg-h-toast-action-space-h rtg-px-toast-action-space-px rtg-py-toast-action-space-py","rtg-inline-flex rtg-border rtg-border-toast-action-color-border rtg-shrink-0 rtg-items-center rtg-justify-center rtg-rounded-toast-action-radius rtg-transition-colors","focus:rtg-outline-none focus:rtg-ring-toast-action-width-ring-focus focus:rtg-ring-toast-action-color-ring-focus","disabled:rtg-pointer-events-none disabled:rtg-opacity-toast-action-opacity-disabled"],variants:{default:["rtg-bg-toast-action-default-color-bg hover:rtg-bg-toast-action-default-color-bg-hover"],destructive:["rtg-bg-toast-action-destructive-color-bg hover:rtg-bg-toast-action-destructive-color-bg-hover rtg-text-toast-action-destructive-color-text focus:rtg-ring-toast-action-destructive-color-ring-focus"]}},title:["rtg-text-toast-title-font rtg-font-toast-title-font-weight [&+div]:rtg-text-toast-title-font"],description:["rtg-text-toast-description-font rtg-opacity-toast-description-opacity"]},fd=Tc({}),hl,Vi,gl="closed",Qe,Li=(Qe=class extends x{constructor(...t){super(...t),this.variant="default",this.state=gl}get _containerElement(){return this.querySelector("li[part=toast-view-port-li]")}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}render(){return c` <ol
|
|
5210
5210
|
part="toast-view-port"
|
|
5211
5211
|
tabindex="-1"
|
|
5212
5212
|
@click="${t=>t.stopPropagation()}"
|
|
5213
|
-
class="${m(
|
|
5213
|
+
class="${m(ni.viewportRoot,this.className,`${this.state===gl?"hidden":"block"} `)}"
|
|
5214
5214
|
>
|
|
5215
5215
|
<li
|
|
5216
5216
|
part="toast-view-port-li"
|
|
@@ -5220,47 +5220,47 @@ body {
|
|
|
5220
5220
|
tabindex="0"
|
|
5221
5221
|
data-state="${this.state}"
|
|
5222
5222
|
data-swipe-direction="right"
|
|
5223
|
-
class="${m(
|
|
5223
|
+
class="${m(Vi.toastVariants.base,Vi.toastVariants.variants[this.variant],this.className)}"
|
|
5224
5224
|
data-radix-collection-item=""
|
|
5225
5225
|
style="user-select: none; touch-action: none;"
|
|
5226
5226
|
></li>
|
|
5227
|
-
</ol>`}},
|
|
5227
|
+
</ol>`}},Vi=Qe,Qe.toastVariants=ni.viewportItem,Qe);n([l({type:String}),d("design:type",typeof(hl=fd!==void 0&&void 0)=="function"?hl:Object)],Li.prototype,"variant",void 0),n([l({attribute:"data-state",type:String}),d("design:type",Object)],Li.prototype,"state",void 0),Li=Vi=n([h("rtg-toast-view-port")],Li);var ml,Wi,tr,bs=(tr=class extends x{constructor(...t){super(...t),this.variant="default"}get _containerElement(){return this.querySelector("button[part=toast-action]")}getAttributesToExclude(){return["click","type","variant"]}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}getFilteredAttributes(){let t=this.getAttributesToExclude(),r={};for(let i of this.attributes)t.includes(i.name)||(r[i.name]=i.value);return r}createRenderRoot(){return this}render(){return c`
|
|
5228
5228
|
<button
|
|
5229
5229
|
${pt(this.getFilteredAttributes())}
|
|
5230
5230
|
part="toast-action"
|
|
5231
5231
|
type="button"
|
|
5232
|
-
class="${m(
|
|
5232
|
+
class="${m(Wi.toastVariants.base,Wi.toastVariants.variants[this.variant],this.className,"rtg-w-max")}"
|
|
5233
5233
|
></button>
|
|
5234
|
-
`}},
|
|
5234
|
+
`}},Wi=tr,tr.toastVariants=ni.action,tr);n([l({type:String}),d("design:type",typeof(ml=fd!==void 0&&void 0)=="function"?ml:Object)],bs.prototype,"variant",void 0),bs=Wi=n([h("rtg-toast-action")],bs);var bl=class extends x{get _containerElement(){return this.querySelector("div[part=toast-description]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
5235
5235
|
<div
|
|
5236
|
-
class="${m(
|
|
5236
|
+
class="${m(ni.description,this.className)}"
|
|
5237
5237
|
part="toast-description"
|
|
5238
5238
|
>
|
|
5239
5239
|
<slot></slot>
|
|
5240
5240
|
</div>
|
|
5241
|
-
`}};
|
|
5241
|
+
`}};bl=n([h("rtg-toast-description")],bl);var fl=class extends x{get _containerElement(){return this.querySelector("div[part=toast-title]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return c`
|
|
5242
5242
|
<div
|
|
5243
5243
|
part="toast-title"
|
|
5244
|
-
class="${m(
|
|
5244
|
+
class="${m(ni.title,this.className)}"
|
|
5245
5245
|
></div>
|
|
5246
|
-
`}};
|
|
5246
|
+
`}};fl=n([h("rtg-toast-title")],fl);var vl=class extends x{constructor(){super(),this.handleClick=this.handleClick.bind(this)}get _containerElement(){return this.querySelector("div[part=toast-trigger]")}get _toast(){let e=this.parentElement;for(;e&&!(e instanceof Gi);)e=e.parentElement;return e}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}handleClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("open-toast",{bubbles:!0})),this._toast.isOpen=!0}render(){return c`
|
|
5247
5247
|
<div
|
|
5248
5248
|
@click=${this.handleClick}
|
|
5249
5249
|
part="toast-trigger"
|
|
5250
5250
|
class="${m(this.className)}"
|
|
5251
5251
|
></div>
|
|
5252
|
-
`}};
|
|
5252
|
+
`}};vl=n([h("rtg-toast-trigger"),d("design:paramtypes",[])],vl);var Gi=class extends x{constructor(...e){super(...e),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=toast]")}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1}),this.addEventListener("open-toast",()=>{this.isOpen=!0})}get _content(){return this.querySelector("rtg-toast-view-port")}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return c` <div class="${m("",this.className)}" part="toast"></div> `}};n([k(),d("design:type",Object)],Gi.prototype,"isOpen",void 0),Gi=n([h("rtg-toast")],Gi);var nr=(function(e){return e.MULTIPLE="multiple",e.SINGLE="single",e})({}),ar=(function(e){return e.DEFAULT="default",e.OUTLINE="outline",e})({}),lr=(function(e){return e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e})({}),qu=Ms("rtg-inline-flex rtg-items-center rtg-justify-center rtg-rounded-toggle-group-item-radius rtg-text-toggle-group-item-font rtg-font-toggle-group-item-font-weight rtg-transition-colors focus-visible:rtg-outline-none focus-visible:rtg-ring-toggle-group-item-width-ring-focus focus-visible:rtg-ring-toggle-group-item-color-ring-focus focus-visible:rtg-ring-offset-toggle-group-item-width-ring-offset-focus disabled:rtg-pointer-events-none disabled:rtg-opacity-toggle-group-item-opacity-disabled data-[state=on]:rtg-bg-toggle-group-item-color-bg-on data-[state=on]:rtg-text-toggle-group-item-color-text-on rtg-bg-transparent",{variants:{variant:{default:"hover:rtg-bg-toggle-group-item-default-color-bg-hover hover:rtg-text-toggle-group-item-default-color-text-hover",outline:"rtg-border rtg-border-toggle-group-item-outline-color-border hover:rtg-bg-toggle-group-item-outline-color-bg-hover hover:rtg-text-toggle-group-item-outline-color-text-hover"},size:{sm:"rtg-h-toggle-group-item-space-h-sm rtg-px-toggle-group-item-space-px-sm",md:"rtg-h-toggle-group-item-space-h-md rtg-px-toggle-group-item-space-px-md",lg:"rtg-h-toggle-group-item-space-h-lg rtg-px-toggle-group-item-space-px-lg"}}}),Hu="rtg-flex rtg-items-center rtg-justify-center rtg-gap-toggle-group-space-gap",yl,wl,xl,Es,er,he=(er=class extends x{get _parent(){let t=this.parentElement;for(;t&&!(t instanceof oe);)t=t.parentElement;return t}get _containerElement(){return this.querySelector("button[part=toggle-group-item]")}get _siblings(){var t;return Array.from(((t=this.parentElement)==null?void 0:t.children)||[]).filter(r=>r!==this)}getAttributesToExclude(){return["disabled","type"]}createRenderRoot(){return this}firstUpdated(t){this.syncFromParent(),this.moveLightDomChildrenInto(this._containerElement)}constructor(){super(),this.checked=!1,this.id=Bs(),this.variant=ar.DEFAULT,this.size=lr.SMALL,this.disabled=!1,this.type=nr.SINGLE,this.variant=ar.DEFAULT,this.size=lr.SMALL}syncFromParent(){let t=this._parent;if(!t)return;this.variant!==t.variant&&(this.variant=t.variant),this.size!==t.size&&(this.size=t.size);let r=t.selectedItems.includes(this.id);this.checked!==r&&(this.checked=r),this.type!==t.type&&(this.type=t.type)}syncSelection(){let t=this._parent;if(!t)return;let r=t.selectedItems.includes(this.id);this.checked!==r&&(this.checked=r)}toggleSelection(t){if(this.disabled||!this._parent)return;let r=this._parent,i=r.selectedItems.indexOf(t);this.type===nr.SINGLE?(i===-1?r.selectedItems[0]=t:r.selectedItems.splice(i,1),this._siblings.forEach(o=>o.syncSelection())):i===-1?r.selectedItems.push(t):r.selectedItems.splice(i,1),this.syncSelection()}render(){return console.log({variant:this.variant,size:this.size,className:this.className}),c`
|
|
5253
5253
|
<button
|
|
5254
5254
|
part="toggle-group-item"
|
|
5255
5255
|
id=${this.id}
|
|
5256
5256
|
type="button"
|
|
5257
|
-
class="${m(
|
|
5257
|
+
class="${m(Es.toggleGroupVariants({variant:this.variant,size:this.size,className:this.className}))}"
|
|
5258
5258
|
aria-pressed=${this.checked}
|
|
5259
5259
|
data-state="${this.checked?"on":"off"}"
|
|
5260
5260
|
?disabled=${this.disabled}
|
|
5261
5261
|
@click=${()=>this.toggleSelection(this.id)}
|
|
5262
5262
|
></button>
|
|
5263
|
-
`}},
|
|
5263
|
+
`}},Es=er,er.toggleGroupVariants=qu,er);n([l({attribute:!0,type:Boolean,reflect:!0}),d("design:type",Object)],he.prototype,"checked",void 0),n([l({attribute:!0,type:String,reflect:!0}),d("design:type",Object)],he.prototype,"id",void 0),n([l(),d("design:type",typeof(yl=ar!==void 0&&ar)=="function"?yl:Object)],he.prototype,"variant",void 0),n([l(),d("design:type",typeof(wl=lr!==void 0&&lr)=="function"?wl:Object)],he.prototype,"size",void 0),n([l({type:Boolean}),d("design:type",Object)],he.prototype,"disabled",void 0),n([l({type:String}),d("design:type",typeof(xl=nr!==void 0&&nr)=="function"?xl:Object)],he.prototype,"type",void 0),he=Es=n([h("rtg-toggle-group-item"),d("design:paramtypes",[])],he);var _l,Sl,$l,oe=class extends x{constructor(...e){super(...e),this.disabled=!1,this.type=nr.SINGLE,this.required=!1,this.variant=ar.DEFAULT,this.size=lr.SMALL,this.selectedItems=[]}get _containerElement(){return this.querySelector("div[part=toggle-group]")}getAttributesToExclude(){return["disabled","type","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement)}updated(e){(e.has("variant")||e.has("size")||e.has("disabled")||e.has("type"))&&this.querySelectorAll("rtg-toggle-group-item").forEach(t=>{t.variant=this.variant,t.size=this.size,t.disabled=this.disabled,t.type=this.type})}createRenderRoot(){return this}render(){let e=this.getFilteredAttributes();return console.log({variant:this.variant,size:this.size,className:this.className}),c`
|
|
5264
5264
|
<div
|
|
5265
5265
|
part="toggle-group"
|
|
5266
5266
|
role="group"
|
|
@@ -5268,11 +5268,11 @@ body {
|
|
|
5268
5268
|
class="${m(Hu,this.className)}"
|
|
5269
5269
|
?disable="${this.disabled}"
|
|
5270
5270
|
></div>
|
|
5271
|
-
`}};n([l({type:Boolean}),d("design:type",Object)],
|
|
5271
|
+
`}};n([l({type:Boolean}),d("design:type",Object)],oe.prototype,"disabled",void 0),n([l({type:String}),d("design:type",typeof(_l=nr!==void 0&&nr)=="function"?_l:Object)],oe.prototype,"type",void 0),n([l({attribute:!0,type:Boolean,reflect:!0}),d("design:type",Object)],oe.prototype,"required",void 0),n([l(),d("design:type",typeof(Sl=ar!==void 0&&ar)=="function"?Sl:Object)],oe.prototype,"variant",void 0),n([l(),d("design:type",typeof($l=lr!==void 0&&lr)=="function"?$l:Object)],oe.prototype,"size",void 0),n([l({type:Array}),d("design:type",Array)],oe.prototype,"selectedItems",void 0),oe=n([h("rtg-toggle-group")],oe);var ei=(function(e){return e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e})({}),ri=(function(e){return e.DEFAULT="default",e.OUTLINE="outline",e})({}),Vu=Ms("rtg-inline-flex rtg-items-center rtg-justify-center rtg-rounded-toggle-radius rtg-text-toggle-font rtg-font-toggle-font-weight rtg-transition-colors focus-visible:rtg-outline-none focus-visible:rtg-ring-toggle-width-ring-focus focus-visible:rtg-ring-toggle-color-ring-focus focus-visible:rtg-ring-offset-toggle-width-ring-offset-focus disabled:rtg-pointer-events-none disabled:rtg-opacity-toggle-opacity-disabled data-[state=on]:rtg-bg-toggle-color-bg-on data-[state=on]:rtg-text-toggle-color-text-on rtg-bg-transparent",{variants:{variant:{default:"hover:rtg-bg-toggle-default-color-bg-hover hover:rtg-text-toggle-default-color-text-hover",outline:"rtg-border rtg-border-toggle-outline-color-border hover:rtg-bg-toggle-outline-color-bg-hover hover:rtg-text-toggle-outline-color-text-hover"},size:{sm:"rtg-h-toggle-space-h-sm rtg-px-toggle-space-px-sm",md:"rtg-h-toggle-space-h-md rtg-px-toggle-space-px-md",lg:"rtg-h-toggle-space-h-lg rtg-px-toggle-space-px-lg"}}}),Cl,El,ks,rr,Ue=(rr=class extends x{constructor(...t){super(...t),this.disabled=!1,this.checked=!1,this.required=!1,this.variant=ri.DEFAULT,this.size=ei.SMALL}willUpdate(t){t.has("variant")&&(this.variant=this.normalizeEnum(this.variant,ri,ri.DEFAULT)),t.has("size")&&(this.size=this.normalizeEnum(this.size,ei,ei.SMALL))}get _containerElement(){return this.querySelector("button[part=toggle]")}getAttributesToExclude(){return["disabled","checked","variant","size","required","data-testid"]}toggle(){this.disabled||(this.checked=!this.checked)}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}render(){let t=this.getFilteredAttributes();return c`
|
|
5272
5272
|
<button
|
|
5273
5273
|
type="button"
|
|
5274
5274
|
part="toggle"
|
|
5275
|
-
class="${m(
|
|
5275
|
+
class="${m(ks.toggleVariants({variant:this.variant,size:this.size,className:this.className}))}"
|
|
5276
5276
|
aria-pressed=${this.checked}
|
|
5277
5277
|
data-state="${this.checked?"on":"off"}"
|
|
5278
5278
|
aria-label="Toggle bold"
|
|
@@ -5281,13 +5281,13 @@ body {
|
|
|
5281
5281
|
?disabled=${this.disabled}
|
|
5282
5282
|
${pt(t)}
|
|
5283
5283
|
></button>
|
|
5284
|
-
`}},
|
|
5284
|
+
`}},ks=rr,rr.toggleVariants=Vu,rr);n([l({type:Boolean}),d("design:type",Object)],Ue.prototype,"disabled",void 0),n([l({attribute:!0,type:Boolean,reflect:!0}),d("design:type",Object)],Ue.prototype,"checked",void 0),n([l({attribute:!0,type:Boolean,reflect:!0}),d("design:type",Object)],Ue.prototype,"required",void 0),n([l({attribute:!0,type:String}),d("design:type",typeof(Cl=ri!==void 0&&ri)=="function"?Cl:Object)],Ue.prototype,"variant",void 0),n([l({attribute:!0,type:String}),d("design:type",typeof(El=ei!==void 0&&ei)=="function"?El:Object)],Ue.prototype,"size",void 0),Ue=ks=n([h("rtg-toggle")],Ue);var kl=class extends v{createRenderRoot(){return this}get _blockquoteSlot(){return this.querySelector('[data-slot="typography-blockquote"]')}firstUpdated(){let e=this._blockquoteSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<blockquote data-slot="typography-blockquote"></blockquote>`}};kl=n([h("rtg-typography-blockquote")],kl);var Rl=class extends v{createRenderRoot(){return this}get _codeSlot(){return this.querySelector('[data-slot="typography-code"]')}firstUpdated(){let e=this._codeSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<code data-slot="typography-code"></code>`}};Rl=n([h("rtg-typography-code")],Rl);var fs=class extends v{constructor(...e){super(...e),this.level="h1"}createRenderRoot(){return this}get _hSlot(){return this.querySelector('[data-slot="typography-h"]')}firstUpdated(){let e=this._hSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return this.level==="h2"?c`
|
|
5285
5285
|
<h2 data-slot="typography-h" data-level="${this.level}"></h2>
|
|
5286
5286
|
`:this.level==="h3"?c`
|
|
5287
5287
|
<h3 data-slot="typography-h" data-level="${this.level}"></h3>
|
|
5288
5288
|
`:this.level==="h4"?c`
|
|
5289
5289
|
<h4 data-slot="typography-h" data-level="${this.level}"></h4>
|
|
5290
|
-
`:c`<h1 data-slot="typography-h" data-level="${this.level}"></h1>`}};n([l({type:String}),d("design:type",Object)],
|
|
5290
|
+
`:c`<h1 data-slot="typography-h" data-level="${this.level}"></h1>`}};n([l({type:String}),d("design:type",Object)],fs.prototype,"level",void 0),fs=n([h("rtg-typography-h")],fs);var Ol=class extends v{createRenderRoot(){return this}get _largeSlot(){return this.querySelector('[data-slot="typography-large"]')}firstUpdated(){let e=this._largeSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<div data-slot="typography-large"></div>`}};Ol=n([h("rtg-typography-large")],Ol);var Al=class extends v{createRenderRoot(){return this}get _leadSlot(){return this.querySelector('[data-slot="typography-lead"]')}firstUpdated(){let e=this._leadSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<p data-slot="typography-lead"></p>`}};Al=n([h("rtg-typography-lead")],Al);var Il=class extends v{createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="typography-list"]')}firstUpdated(){let e=this._listSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<ul data-slot="typography-list"></ul>`}};Il=n([h("rtg-typography-list")],Il);var Tl=class extends v{createRenderRoot(){return this}get _mutedSlot(){return this.querySelector('[data-slot="typography-muted"]')}firstUpdated(){let e=this._mutedSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<p data-slot="typography-muted"></p>`}};Tl=n([h("rtg-typography-muted")],Tl);var Ll=class extends v{createRenderRoot(){return this}get _pSlot(){return this.querySelector('[data-slot="typography-p"]')}firstUpdated(){let e=this._pSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<p data-slot="typography-p"></p>`}};Ll=n([h("rtg-typography-p")],Ll);var Pl=class extends v{createRenderRoot(){return this}get _smallSlot(){return this.querySelector('[data-slot="typography-small"]')}firstUpdated(){let e=this._smallSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return c`<small data-slot="typography-small"></small>`}};Pl=n([h("rtg-typography-small")],Pl);var zl=class extends v{createRenderRoot(){return this}};zl=n([h("rtg-typography-table")],zl);var vs=class extends x{constructor(){super(),this.defaultValue="account"}getAttributesToExclude(){return["disabled","type","placeholder","value","data-testid"]}createRenderRoot(){return this}render(){return c`
|
|
5291
5291
|
<div class="sb-flex sb-flex-col sb-gap-4">
|
|
5292
5292
|
<rtg-tabs .defaultValue=${this.defaultValue} class="rtg-w-[400px]">
|
|
5293
5293
|
<rtg-tabs-list customClass="rtg-h-10 rtg-rounded-2xl" slot="tab-list">
|
|
@@ -5507,8 +5507,8 @@ body {
|
|
|
5507
5507
|
</rtg-tabs-content>
|
|
5508
5508
|
</rtg-tabs>
|
|
5509
5509
|
</div>
|
|
5510
|
-
`}};n([l({type:String}),d("design:type",String)],fs.prototype,"defaultValue",void 0),fs=n([h("light-sample-demo"),d("design:paramtypes",[])],fs);var Wu=new Set(["children","localName","ref","style","className"]),Pl=new WeakMap,Gu=(e,t,r,i,o)=>{let s=o==null?void 0:o[t];s===void 0||r===i?r==null&&t in HTMLElement.prototype?e.removeAttribute(t):e[t]=r:((a,u,p)=>{let g=Pl.get(a);g===void 0&&Pl.set(a,g=new Map);let y=g.get(u);p===void 0?y!==void 0&&(g.delete(u),a.removeEventListener(u,y)):y===void 0?(g.set(u,y={handleEvent:p}),a.addEventListener(u,y)):y.handleEvent=p})(e,s,r)},Ku=(e,t)=>{typeof e=="function"?e(t):e.current=t};function bd(e=window.React,t,r,i,o){let s,a,u;{let $=e;({tagName:a,elementClass:u,events:i,displayName:o}=$),s=$.react}let p=s.Component,g=s.createElement,y=new Set(Object.keys(i??{}));class w extends p{constructor(){super(...arguments),this.o=null}t(_){if(this.o!==null)for(let E in this.i)Gu(this.o,E,this.props[E],_?_[E]:void 0,i)}componentDidMount(){var _;this.t(),(_=this.o)==null||_.removeAttribute("defer-hydration")}componentDidUpdate(_){this.t(_)}render(){let{_$Gl:_,...E}=this.props;this.h!==_&&(this.u=I=>{_!==null&&Ku(_,I),this.o=I,this.h=_}),this.i={};let O={ref:this.u};for(let[I,T]of Object.entries(E))Wu.has(I)?O[I==="className"?"class":I]=T:y.has(I)||I in u.prototype?this.i[I]=T:O[I]=T;return O.suppressHydrationWarning=!0,g(a,O)}}w.displayName=o??u.name;let C=s.forwardRef((($,_)=>g(w,{...$,_$Gl:_},$==null?void 0:$.children)));return C.displayName=w.displayName,C}var Yu=sd((e=>{var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),u=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),$=Symbol.iterator;function _(b){return typeof b!="object"||!b?null:(b=$&&b[$]||b["@@iterator"],typeof b=="function"?b:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,I={};function T(b,S,j){this.props=b,this.context=S,this.refs=I,this.updater=j||E}T.prototype.isReactComponent={},T.prototype.setState=function(b,S){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,S,"setState")},T.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function H(){}H.prototype=T.prototype;function M(b,S,j){this.props=b,this.context=S,this.refs=I,this.updater=j||E}var J=M.prototype=new H;J.constructor=M,O(J,T.prototype),J.isPureReactComponent=!0;var tt=Array.isArray;function et(){}var D={H:null,A:null,T:null,S:null},ct=Object.prototype.hasOwnProperty;function jt(b,S,j){var z=j.ref;return{$$typeof:t,type:b,key:S,ref:z===void 0?null:z,props:j}}function Zt(b,S){return jt(b.type,S,b.props)}function L(b){return typeof b=="object"&&!!b&&b.$$typeof===t}function Ee(b){var S={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(j){return S[j]})}var Et=/\/+/g;function Jt(b,S){return typeof b=="object"&&b&&b.key!=null?Ee(""+b.key):S.toString(36)}function Nt(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(et,et):(b.status="pending",b.then(function(S){b.status==="pending"&&(b.status="fulfilled",b.value=S)},function(S){b.status==="pending"&&(b.status="rejected",b.reason=S)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function kt(b,S,j,z,F){var V=typeof b;(V==="undefined"||V==="boolean")&&(b=null);var Y=!1;if(b===null)Y=!0;else switch(V){case"bigint":case"string":case"number":Y=!0;break;case"object":switch(b.$$typeof){case t:case r:Y=!0;break;case w:return Y=b._init,kt(Y(b._payload),S,j,z,F)}}if(Y)return F=F(b),Y=z===""?"."+Jt(b,0):z,tt(F)?(j="",Y!=null&&(j=Y.replace(Et,"$&/")+"/"),kt(F,S,j,"",function(Hd){return Hd})):F!=null&&(L(F)&&(F=Zt(F,j+(F.key==null||b&&b.key===F.key?"":(""+F.key).replace(Et,"$&/")+"/")+Y)),S.push(F)),1;Y=0;var Ht=z===""?".":z+":";if(tt(b))for(var ft=0;ft<b.length;ft++)z=b[ft],V=Ht+Jt(z,ft),Y+=kt(z,S,j,V,F);else if(ft=_(b),typeof ft=="function")for(b=ft.call(b),ft=0;!(z=b.next()).done;)z=z.value,V=Ht+Jt(z,ft++),Y+=kt(z,S,j,V,F);else if(V==="object"){if(typeof b.then=="function")return kt(Nt(b),S,j,z,F);throw S=String(b),Error("Objects are not valid as a React child (found: "+(S==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":S)+"). If you meant to render a collection of children, use an array instead.")}return Y}function Rt(b,S,j){if(b==null)return b;var z=[],F=0;return kt(b,z,"","",function(V){return S.call(j,V,F++)}),z}function St(b){if(b._status===-1){var S=b._result;S=S(),S.then(function(j){(b._status===0||b._status===-1)&&(b._status=1,b._result=j)},function(j){(b._status===0||b._status===-1)&&(b._status=2,b._result=j)}),b._status===-1&&(b._status=0,b._result=S)}if(b._status===1)return b._result.default;throw b._result}var se=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var S=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(S))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)},rt={map:Rt,forEach:function(b,S,j){Rt(b,function(){S.apply(this,arguments)},j)},count:function(b){var S=0;return Rt(b,function(){S++}),S},toArray:function(b){return Rt(b,function(S){return S})||[]},only:function(b){if(!L(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};e.Activity=C,e.Children=rt,e.Component=T,e.Fragment=i,e.Profiler=s,e.PureComponent=M,e.StrictMode=o,e.Suspense=g,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,e.__COMPILER_RUNTIME={__proto__:null,c:function(b){return D.H.useMemoCache(b)}},e.cache=function(b){return function(){return b.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(b,S,j){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var z=O({},b.props),F=b.key;if(S!=null)for(V in S.key!==void 0&&(F=""+S.key),S)!ct.call(S,V)||V==="key"||V==="__self"||V==="__source"||V==="ref"&&S.ref===void 0||(z[V]=S[V]);var V=arguments.length-2;if(V===1)z.children=j;else if(1<V){for(var Y=Array(V),Ht=0;Ht<V;Ht++)Y[Ht]=arguments[Ht+2];z.children=Y}return jt(b.type,F,z)},e.createContext=function(b){return b={$$typeof:u,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:a,_context:b},b},e.createElement=function(b,S,j){var z,F={},V=null;if(S!=null)for(z in S.key!==void 0&&(V=""+S.key),S)ct.call(S,z)&&z!=="key"&&z!=="__self"&&z!=="__source"&&(F[z]=S[z]);var Y=arguments.length-2;if(Y===1)F.children=j;else if(1<Y){for(var Ht=Array(Y),ft=0;ft<Y;ft++)Ht[ft]=arguments[ft+2];F.children=Ht}if(b&&b.defaultProps)for(z in Y=b.defaultProps,Y)F[z]===void 0&&(F[z]=Y[z]);return jt(b,V,F)},e.createRef=function(){return{current:null}},e.forwardRef=function(b){return{$$typeof:p,render:b}},e.isValidElement=L,e.lazy=function(b){return{$$typeof:w,_payload:{_status:-1,_result:b},_init:St}},e.memo=function(b,S){return{$$typeof:y,type:b,compare:S===void 0?null:S}},e.startTransition=function(b){var S=D.T,j={};D.T=j;try{var z=b(),F=D.S;F!==null&&F(j,z),typeof z=="object"&&z&&typeof z.then=="function"&&z.then(et,se)}catch(V){se(V)}finally{S!==null&&j.types!==null&&(S.types=j.types),D.T=S}},e.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},e.use=function(b){return D.H.use(b)},e.useActionState=function(b,S,j){return D.H.useActionState(b,S,j)},e.useCallback=function(b,S){return D.H.useCallback(b,S)},e.useContext=function(b){return D.H.useContext(b)},e.useDebugValue=function(){},e.useDeferredValue=function(b,S){return D.H.useDeferredValue(b,S)},e.useEffect=function(b,S){return D.H.useEffect(b,S)},e.useEffectEvent=function(b){return D.H.useEffectEvent(b)},e.useId=function(){return D.H.useId()},e.useImperativeHandle=function(b,S,j){return D.H.useImperativeHandle(b,S,j)},e.useInsertionEffect=function(b,S){return D.H.useInsertionEffect(b,S)},e.useLayoutEffect=function(b,S){return D.H.useLayoutEffect(b,S)},e.useMemo=function(b,S){return D.H.useMemo(b,S)},e.useOptimistic=function(b,S){return D.H.useOptimistic(b,S)},e.useReducer=function(b,S,j){return D.H.useReducer(b,S,j)},e.useRef=function(b){return D.H.useRef(b)},e.useState=function(b){return D.H.useState(b)},e.useSyncExternalStore=function(b,S,j){return D.H.useSyncExternalStore(b,S,j)},e.useTransition=function(){return D.H.useTransition()},e.version="19.2.4"})),fd=Pc(sd(((e,t)=>{t.exports=Yu()}))());bd({tagName:"rtg-button",elementClass:Ut,react:fd.default});bd({tagName:"rtg-checkbox",elementClass:Ot,react:fd.default});const Hs="",Xu="sb-relative sb-overflow-hidden sb-w-1/3 sb-h-2 sb-linear-bar",Zu="sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100%-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100%-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]",Ju="sb-h-[100%] sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100vw-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100vw-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]",Qu="sb-fixed sb-inset-0 sb-z-[9999] sb-flex sb-items-center sb-justify-center sb-p-4 sb-overflow-auto",tp="sb-w-fit sb-flex sb-max-h-[calc(100vh-60px)] sb-bg-background sb-shadow-2xl sb-ring-1 sb-ring-border sb-rounded-xl sb-overflow-hidden",ep="sb-justify-self-center sb-rotate-0",rp="sb-border-0 sb-bg-background !sb-m-0",ip="sb-border sb-rounded-2xl sb-relative sb-py-6",op="!sb-text-left sb-text-foreground sb-font-normal hover:!sb-bg-muted !sb-text-sm sb-rounded-md !sb-shadow-none data-[state=active]:!sb-bg-muted",sp="!sb-flex !sb-justify-start !sb-flex-nowrap !sb-w-full !rtg-grid-cols-2 !sb-gap-2 sb-mx-6",np="!sb-w-[160px] sb-gap-4 ";var P=(e=>(e.USER_PROFILE_CARD_HEADER_CONTAINER="sb-user-profile-card-header-container",e.USER_PROFILE_CONTAINER="sb-user-profile",e.USER_PROFILE_SIDEBAR="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_TABS="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_BURGER_MENU="sb-user-profile-sidebar-burger-menu",e.USER_PROFILE_INPUT_LABEL="sb-user-profile-input-label",e.USER_PROFILE_INPUT_FIELD="sb-user-profile-input-field",e.USER_PROFILE_EDIT_FORM="sb-user-profile-edit-form",e.USER_PROFILE_CARD_CONTAINER="sb-user-profile-card-container",e.USER_PROFILE_EDITABLE_INPUT_FIELD="sb-user-profile-editable-input-field",e.USER_PROFILE_DEFAULT_BUTTON="sb-user-profile-default-button",e.USER_PROFILE_OUTLINE_BUTTON="sb-user-profile-outline-button",e.USER_PROFILE_OTP="sb-user-profile-otp",e.USER_PROFILE_EDIT_BUTTON="sb-user-profile-edit-button",e))(P||{});const at={xs:"475px",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px","3xl":"1920px","4xl":"2560px"},ap=/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/,lp=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,dp=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;function vs(e,t,r){const i=e.formData[t],o=[],s=p=>{if(["input","checkbox","otp"].includes(p.element_type)&&"data_key"in p&&p.data_key===t)return p;if(p.element_type==="container")for(const g of p.properties.children){const y=s(g);if(y)return y}return null},a=e.renderSpec?s(e.renderSpec.root_container):null;if(!a||!("validation"in a.properties))return;const{validation:u}=a.properties;if(!(!u||r!=="submit"&&u.on_event!==r)){if(a.hidden){delete e.errors[t];return}for(const p of u.rules){if(a.hidden)continue;let g=!0;switch(p.type){case"required":g=vd(i,a);break;case"min_length":g=yd(i,p.length);break;case"max_length":g=wd(i,p.length);break;case"min_value":g=xd(i,p.value);break;case"max_value":g=_d(i,p.value);break;case"regex":g=Sd(i,p.regex);break;case"field_match":g=$d(i,p.field_match?e.formData[p.field_match]:void 0);break;case"email":g=Cd(i);break;case"phone":g=Ed(i);break;case"date":g=kd(i);break;default:g=!0}!g&&p.error_message&&o.push(p.error_message)}e.errors={...e.errors,[t]:o}}}function vd(e,t){return!(e===void 0||e===""||e===!1||t&&t.element_type==="input"&&t.properties.type==="tel"&&typeof e=="string"&&e.split("-")[1]==="")}function yd(e,t){return typeof e=="string"?e.length>=(t??0):!0}function wd(e,t){return typeof e=="string"?e.length<=(t??1/0):!0}function xd(e,t){const r=typeof t=="string"?parseFloat(t):t,i=typeof e=="string"?parseFloat(e):e;return typeof i=="number"&&typeof r=="number"&&!isNaN(i)&&!isNaN(r)?i>=r:!0}function _d(e,t){const r=typeof t=="string"?parseFloat(t):t,i=typeof e=="string"?parseFloat(e):e;return typeof i=="number"&&typeof r=="number"&&!isNaN(i)&&!isNaN(r)?i<=r:!0}function Sd(e,t){return typeof e=="string"&&t?new RegExp(t).test(e):!0}function $d(e,t){return t!==void 0?e===t:!0}function Cd(e){return typeof e=="string"?lp.test(e):!0}function Ed(e){return typeof e=="string"?ap.test(e):!0}function kd(e){return typeof e=="string"?dp.test(e):!0}const Rd="sb:env",eo="sb:auth",ro="customizations",Vs=Symbol("renderSpecContext");var Ad=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(Ad||{}),ks=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(ks||{}),xe=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(xe||{}),Tt=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(Tt||{}),Dt=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Dt||{}),_t=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(_t||{});function Od(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Od(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function cp(){for(var e,t,r=0,i="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Od(e))&&(i&&(i+=" "),i+=t);return i}const Ws="-",up=e=>{const t=hp(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:a=>{const u=a.split(Ws);return u[0]===""&&u.length!==1&&u.shift(),Id(u,t)||pp(a)},getConflictingClassGroupIds:(a,u)=>{const p=r[a]||[];return u&&i[a]?[...p,...i[a]]:p}}},Id=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],i=t.nextPart.get(r),o=i?Id(e.slice(1),i):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Ws);return(a=t.validators.find(({validator:u})=>u(s)))==null?void 0:a.classGroupId},zl=/^\[(.+)\]$/,pp=e=>{if(zl.test(e)){const t=zl.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},hp=e=>{const{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return mp(Object.entries(e.classGroups),r).forEach(([s,a])=>{Rs(a,i,s,t)}),i},Rs=(e,t,r,i)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:jl(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(gp(o)){Rs(o(i),t,r,i);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{Rs(a,jl(t,s),r,i)})})},jl=(e,t)=>{let r=e;return t.split(Ws).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},gp=e=>e.isThemeGetter,mp=(e,t)=>t?e.map(([r,i])=>{const o=i.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,u])=>[t+a,u])):s);return[r,o]}):e,bp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,i=new Map;const o=(s,a)=>{r.set(s,a),t++,t>e&&(t=0,i=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=i.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},Ld="!",fp=e=>{const{separator:t,experimentalParseClassName:r}=e,i=t.length===1,o=t[0],s=t.length,a=u=>{const p=[];let g=0,y=0,w;for(let O=0;O<u.length;O++){let I=u[O];if(g===0){if(I===o&&(i||u.slice(O,O+s)===t)){p.push(u.slice(y,O)),y=O+s;continue}if(I==="/"){w=O;continue}}I==="["?g++:I==="]"&&g--}const C=p.length===0?u:u.substring(y),$=C.startsWith(Ld),_=$?C.substring(1):C,E=w&&w>y?w-y:void 0;return{modifiers:p,hasImportantModifier:$,baseClassName:_,maybePostfixModifierPosition:E}};return r?u=>r({className:u,parseClassName:a}):a},vp=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(i=>{i[0]==="["?(t.push(...r.sort(),i),r=[]):r.push(i)}),t.push(...r.sort()),t},yp=e=>({cache:bp(e.cacheSize),parseClassName:fp(e),...up(e)}),wp=/\s+/,xp=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(wp);let u="";for(let p=a.length-1;p>=0;p-=1){const g=a[p],{modifiers:y,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:$}=r(g);let _=!!$,E=i(_?C.substring(0,$):C);if(!E){if(!_){u=g+(u.length>0?" "+u:u);continue}if(E=i(C),!E){u=g+(u.length>0?" "+u:u);continue}_=!1}const O=vp(y).join(":"),I=w?O+Ld:O,T=I+E;if(s.includes(T))continue;s.push(T);const H=o(E,_);for(let M=0;M<H.length;++M){const J=H[M];s.push(I+J)}u=g+(u.length>0?" "+u:u)}return u};function _p(){let e=0,t,r,i="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Td(t))&&(i&&(i+=" "),i+=r);return i}const Td=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=Td(e[i]))&&(r&&(r+=" "),r+=t);return r};function Sp(e,...t){let r,i,o,s=a;function a(p){const g=t.reduce((y,w)=>w(y),e());return r=yp(g),i=r.cache.get,o=r.cache.set,s=u,u(p)}function u(p){const g=i(p);if(g)return g;const y=xp(p,r);return o(p,y),y}return function(){return s(_p.apply(null,arguments))}}const Z=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Pd=/^\[(?:([a-z-]+):)?(.+)\]$/i,$p=/^\d+\/\d+$/,Cp=new Set(["px","full","screen"]),Ep=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Rp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ap=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Op=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,re=e=>Er(e)||Cp.has(e)||$p.test(e),he=e=>Tr(e,"length",Up),Er=e=>!!e&&!Number.isNaN(Number(e)),ys=e=>Tr(e,"number",Er),Vr=e=>!!e&&Number.isInteger(Number(e)),Ip=e=>e.endsWith("%")&&Er(e.slice(0,-1)),U=e=>Pd.test(e),ge=e=>Ep.test(e),Lp=new Set(["length","size","percentage"]),Tp=e=>Tr(e,Lp,zd),Pp=e=>Tr(e,"position",zd),zp=new Set(["image","url"]),jp=e=>Tr(e,zp,Bp),Np=e=>Tr(e,"",Dp),Wr=()=>!0,Tr=(e,t,r)=>{const i=Pd.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):r(i[2]):!1},Up=e=>kp.test(e)&&!Rp.test(e),zd=()=>!1,Dp=e=>Ap.test(e),Bp=e=>Op.test(e),Fp=()=>{const e=Z("colors"),t=Z("spacing"),r=Z("blur"),i=Z("brightness"),o=Z("borderColor"),s=Z("borderRadius"),a=Z("borderSpacing"),u=Z("borderWidth"),p=Z("contrast"),g=Z("grayscale"),y=Z("hueRotate"),w=Z("invert"),C=Z("gap"),$=Z("gradientColorStops"),_=Z("gradientColorStopPositions"),E=Z("inset"),O=Z("margin"),I=Z("opacity"),T=Z("padding"),H=Z("saturate"),M=Z("scale"),J=Z("sepia"),tt=Z("skew"),et=Z("space"),D=Z("translate"),ct=()=>["auto","contain","none"],jt=()=>["auto","hidden","clip","visible","scroll"],Zt=()=>["auto",U,t],L=()=>[U,t],Ee=()=>["",re,he],Et=()=>["auto",Er,U],Jt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Nt=()=>["solid","dashed","dotted","double","none"],kt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Rt=()=>["start","end","center","between","around","evenly","stretch"],St=()=>["","0",U],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],rt=()=>[Er,U];return{cacheSize:500,separator:":",theme:{colors:[Wr],spacing:[re,he],blur:["none","",ge,U],brightness:rt(),borderColor:[e],borderRadius:["none","","full",ge,U],borderSpacing:L(),borderWidth:Ee(),contrast:rt(),grayscale:St(),hueRotate:rt(),invert:St(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[Ip,he],inset:Zt(),margin:Zt(),opacity:rt(),padding:L(),saturate:rt(),scale:rt(),sepia:St(),skew:rt(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",U]}],container:["container"],columns:[{columns:[ge]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Jt(),U]}],overflow:[{overflow:jt()}],"overflow-x":[{"overflow-x":jt()}],"overflow-y":[{"overflow-y":jt()}],overscroll:[{overscroll:ct()}],"overscroll-x":[{"overscroll-x":ct()}],"overscroll-y":[{"overscroll-y":ct()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Vr,U]}],basis:[{basis:Zt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",U]}],grow:[{grow:St()}],shrink:[{shrink:St()}],order:[{order:["first","last","none",Vr,U]}],"grid-cols":[{"grid-cols":[Wr]}],"col-start-end":[{col:["auto",{span:["full",Vr,U]},U]}],"col-start":[{"col-start":Et()}],"col-end":[{"col-end":Et()}],"grid-rows":[{"grid-rows":[Wr]}],"row-start-end":[{row:["auto",{span:[Vr,U]},U]}],"row-start":[{"row-start":Et()}],"row-end":[{"row-end":Et()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",U]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",U]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...Rt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Rt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Rt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[et]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[et]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",U,t]}],"min-w":[{"min-w":[U,t,"min","max","fit"]}],"max-w":[{"max-w":[U,t,"none","full","min","max","fit","prose",{screen:[ge]},ge]}],h:[{h:[U,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[U,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[U,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[U,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ge,he]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ys]}],"font-family":[{font:[Wr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",U]}],"line-clamp":[{"line-clamp":["none",Er,ys]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",re,U]}],"list-image":[{"list-image":["none",U]}],"list-style-type":[{list:["none","disc","decimal",U]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[I]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Nt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",re,he]}],"underline-offset":[{"underline-offset":["auto",re,U]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[I]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Jt(),Pp]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Tp]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},jp]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[$]}],"gradient-via":[{via:[$]}],"gradient-to":[{to:[$]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[I]}],"border-style":[{border:[...Nt(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[I]}],"divide-style":[{divide:Nt()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...Nt()]}],"outline-offset":[{"outline-offset":[re,U]}],"outline-w":[{outline:[re,he]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[I]}],"ring-offset-w":[{"ring-offset":[re,he]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ge,Np]}],"shadow-color":[{shadow:[Wr]}],opacity:[{opacity:[I]}],"mix-blend":[{"mix-blend":[...kt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":kt()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",ge,U]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[H]}],sepia:[{sepia:[J]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[I]}],"backdrop-saturate":[{"backdrop-saturate":[H]}],"backdrop-sepia":[{"backdrop-sepia":[J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",U]}],duration:[{duration:rt()}],ease:[{ease:["linear","in","out","in-out",U]}],delay:[{delay:rt()}],animate:[{animate:["none","spin","ping","pulse","bounce",U]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Vr,U]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[tt]}],"skew-y":[{"skew-y":[tt]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",U]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",U]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",U]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[re,he,ys]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Mp=Sp(Fp);function W(...e){return Mp(cp(e))}function R(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function qp(e){document.documentElement.setAttribute("data-theme",e)}function Hp(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&qp("light")}function Nl(){return document.documentElement.getAttribute("data-theme")}function Gs(e,t){return e.includes("{{theme}}")?e.replace("{{theme}}",t):e}function mt(e){const t={},r={};for(const i in e){const o=e[i];o!=null&&(i in at&&typeof o=="object"?r[i]=o:t[i]=o)}return{base:t,responsive:r}}function Vp(e){return{...at,...e??{}}}function bt(e,t,r){const i=Vp(r);let o="";for(const a in t){const p=`(min-width: ${i[a]})`,g=Object.entries(t[a]).map(([y,w])=>`${y}: ${w} !important;`).join(" ");o+=`@media ${p} { #${e} { ${g} } }
|
|
5511
|
-
`}let s=document.getElementById(`responsive-style-${e}`);s||(s=document.createElement("style"),s.id=`responsive-style-${e}`,document.head.appendChild(s)),s.textContent=o}function As(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}async function Wp(e,t){if(!t.length)return;await As();const r=e.offsetWidth,i=t.length,o=60,s=8;let a=1,u=0,p=-1;for(let g=1;g<=i;g++){const y=s*(g-1),w=(r-y)/g,C=i%g;if(w<o)continue;let $=0;if(C===0&&g>a)$=p+1;else if(C>=2)$=2;else continue;($>p||$===p&&w>u)&&(a=g,u=w,p=$)}e.style.setProperty("--sso-cols",String(a)),e.style.setProperty("--sso-gap",`${s}px`),e.style.setProperty("--sso-item-width","calc(100% / var(--sso-cols) - var(--sso-gap) / var(--sso-cols) * (var(--sso-cols) - 1))")}function
|
|
5510
|
+
`}};n([l({type:String}),d("design:type",String)],vs.prototype,"defaultValue",void 0),vs=n([h("light-sample-demo"),d("design:paramtypes",[])],vs);var Wu=new Set(["children","localName","ref","style","className"]),jl=new WeakMap,Gu=(e,t,r,i,o)=>{let s=o==null?void 0:o[t];s===void 0||r===i?r==null&&t in HTMLElement.prototype?e.removeAttribute(t):e[t]=r:((a,u,p)=>{let g=jl.get(a);g===void 0&&jl.set(a,g=new Map);let y=g.get(u);p===void 0?y!==void 0&&(g.delete(u),a.removeEventListener(u,y)):y===void 0?(g.set(u,y={handleEvent:p}),a.addEventListener(u,y)):y.handleEvent=p})(e,s,r)},Ku=(e,t)=>{typeof e=="function"?e(t):e.current=t};function vd(e=window.React,t,r,i,o){let s,a,u;{let $=e;({tagName:a,elementClass:u,events:i,displayName:o}=$),s=$.react}let p=s.Component,g=s.createElement,y=new Set(Object.keys(i??{}));class w extends p{constructor(){super(...arguments),this.o=null}t(_){if(this.o!==null)for(let E in this.i)Gu(this.o,E,this.props[E],_?_[E]:void 0,i)}componentDidMount(){var _;this.t(),(_=this.o)==null||_.removeAttribute("defer-hydration")}componentDidUpdate(_){this.t(_)}render(){let{_$Gl:_,...E}=this.props;this.h!==_&&(this.u=I=>{_!==null&&Ku(_,I),this.o=I,this.h=_}),this.i={};let A={ref:this.u};for(let[I,L]of Object.entries(E))Wu.has(I)?A[I==="className"?"class":I]=L:y.has(I)||I in u.prototype?this.i[I]=L:A[I]=L;return A.suppressHydrationWarning=!0,g(a,A)}}w.displayName=o??u.name;let C=s.forwardRef((($,_)=>g(w,{...$,_$Gl:_},$==null?void 0:$.children)));return C.displayName=w.displayName,C}var Yu=ad((e=>{var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),u=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),$=Symbol.iterator;function _(b){return typeof b!="object"||!b?null:(b=$&&b[$]||b["@@iterator"],typeof b=="function"?b:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,I={};function L(b,S,j){this.props=b,this.context=S,this.refs=I,this.updater=j||E}L.prototype.isReactComponent={},L.prototype.setState=function(b,S){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,S,"setState")},L.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function H(){}H.prototype=L.prototype;function M(b,S,j){this.props=b,this.context=S,this.refs=I,this.updater=j||E}var J=M.prototype=new H;J.constructor=M,A(J,L.prototype),J.isPureReactComponent=!0;var tt=Array.isArray;function et(){}var D={H:null,A:null,T:null,S:null},ct=Object.prototype.hasOwnProperty;function jt(b,S,j){var z=j.ref;return{$$typeof:t,type:b,key:S,ref:z===void 0?null:z,props:j}}function Jt(b,S){return jt(b.type,S,b.props)}function T(b){return typeof b=="object"&&!!b&&b.$$typeof===t}function ke(b){var S={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(j){return S[j]})}var Et=/\/+/g;function Qt(b,S){return typeof b=="object"&&b&&b.key!=null?ke(""+b.key):S.toString(36)}function Nt(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(et,et):(b.status="pending",b.then(function(S){b.status==="pending"&&(b.status="fulfilled",b.value=S)},function(S){b.status==="pending"&&(b.status="rejected",b.reason=S)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function kt(b,S,j,z,F){var V=typeof b;(V==="undefined"||V==="boolean")&&(b=null);var Y=!1;if(b===null)Y=!0;else switch(V){case"bigint":case"string":case"number":Y=!0;break;case"object":switch(b.$$typeof){case t:case r:Y=!0;break;case w:return Y=b._init,kt(Y(b._payload),S,j,z,F)}}if(Y)return F=F(b),Y=z===""?"."+Qt(b,0):z,tt(F)?(j="",Y!=null&&(j=Y.replace(Et,"$&/")+"/"),kt(F,S,j,"",function(Hd){return Hd})):F!=null&&(T(F)&&(F=Jt(F,j+(F.key==null||b&&b.key===F.key?"":(""+F.key).replace(Et,"$&/")+"/")+Y)),S.push(F)),1;Y=0;var Vt=z===""?".":z+":";if(tt(b))for(var ft=0;ft<b.length;ft++)z=b[ft],V=Vt+Qt(z,ft),Y+=kt(z,S,j,V,F);else if(ft=_(b),typeof ft=="function")for(b=ft.call(b),ft=0;!(z=b.next()).done;)z=z.value,V=Vt+Qt(z,ft++),Y+=kt(z,S,j,V,F);else if(V==="object"){if(typeof b.then=="function")return kt(Nt(b),S,j,z,F);throw S=String(b),Error("Objects are not valid as a React child (found: "+(S==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":S)+"). If you meant to render a collection of children, use an array instead.")}return Y}function Rt(b,S,j){if(b==null)return b;var z=[],F=0;return kt(b,z,"","",function(V){return S.call(j,V,F++)}),z}function St(b){if(b._status===-1){var S=b._result;S=S(),S.then(function(j){(b._status===0||b._status===-1)&&(b._status=1,b._result=j)},function(j){(b._status===0||b._status===-1)&&(b._status=2,b._result=j)}),b._status===-1&&(b._status=0,b._result=S)}if(b._status===1)return b._result.default;throw b._result}var ne=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var S=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(S))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)},rt={map:Rt,forEach:function(b,S,j){Rt(b,function(){S.apply(this,arguments)},j)},count:function(b){var S=0;return Rt(b,function(){S++}),S},toArray:function(b){return Rt(b,function(S){return S})||[]},only:function(b){if(!T(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};e.Activity=C,e.Children=rt,e.Component=L,e.Fragment=i,e.Profiler=s,e.PureComponent=M,e.StrictMode=o,e.Suspense=g,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,e.__COMPILER_RUNTIME={__proto__:null,c:function(b){return D.H.useMemoCache(b)}},e.cache=function(b){return function(){return b.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(b,S,j){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var z=A({},b.props),F=b.key;if(S!=null)for(V in S.key!==void 0&&(F=""+S.key),S)!ct.call(S,V)||V==="key"||V==="__self"||V==="__source"||V==="ref"&&S.ref===void 0||(z[V]=S[V]);var V=arguments.length-2;if(V===1)z.children=j;else if(1<V){for(var Y=Array(V),Vt=0;Vt<V;Vt++)Y[Vt]=arguments[Vt+2];z.children=Y}return jt(b.type,F,z)},e.createContext=function(b){return b={$$typeof:u,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:a,_context:b},b},e.createElement=function(b,S,j){var z,F={},V=null;if(S!=null)for(z in S.key!==void 0&&(V=""+S.key),S)ct.call(S,z)&&z!=="key"&&z!=="__self"&&z!=="__source"&&(F[z]=S[z]);var Y=arguments.length-2;if(Y===1)F.children=j;else if(1<Y){for(var Vt=Array(Y),ft=0;ft<Y;ft++)Vt[ft]=arguments[ft+2];F.children=Vt}if(b&&b.defaultProps)for(z in Y=b.defaultProps,Y)F[z]===void 0&&(F[z]=Y[z]);return jt(b,V,F)},e.createRef=function(){return{current:null}},e.forwardRef=function(b){return{$$typeof:p,render:b}},e.isValidElement=T,e.lazy=function(b){return{$$typeof:w,_payload:{_status:-1,_result:b},_init:St}},e.memo=function(b,S){return{$$typeof:y,type:b,compare:S===void 0?null:S}},e.startTransition=function(b){var S=D.T,j={};D.T=j;try{var z=b(),F=D.S;F!==null&&F(j,z),typeof z=="object"&&z&&typeof z.then=="function"&&z.then(et,ne)}catch(V){ne(V)}finally{S!==null&&j.types!==null&&(S.types=j.types),D.T=S}},e.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},e.use=function(b){return D.H.use(b)},e.useActionState=function(b,S,j){return D.H.useActionState(b,S,j)},e.useCallback=function(b,S){return D.H.useCallback(b,S)},e.useContext=function(b){return D.H.useContext(b)},e.useDebugValue=function(){},e.useDeferredValue=function(b,S){return D.H.useDeferredValue(b,S)},e.useEffect=function(b,S){return D.H.useEffect(b,S)},e.useEffectEvent=function(b){return D.H.useEffectEvent(b)},e.useId=function(){return D.H.useId()},e.useImperativeHandle=function(b,S,j){return D.H.useImperativeHandle(b,S,j)},e.useInsertionEffect=function(b,S){return D.H.useInsertionEffect(b,S)},e.useLayoutEffect=function(b,S){return D.H.useLayoutEffect(b,S)},e.useMemo=function(b,S){return D.H.useMemo(b,S)},e.useOptimistic=function(b,S){return D.H.useOptimistic(b,S)},e.useReducer=function(b,S,j){return D.H.useReducer(b,S,j)},e.useRef=function(b){return D.H.useRef(b)},e.useState=function(b){return D.H.useState(b)},e.useSyncExternalStore=function(b,S,j){return D.H.useSyncExternalStore(b,S,j)},e.useTransition=function(){return D.H.useTransition()},e.version="19.2.4"})),yd=Pc(ad(((e,t)=>{t.exports=Yu()}))());vd({tagName:"rtg-button",elementClass:Ut,react:yd.default});vd({tagName:"rtg-checkbox",elementClass:At,react:yd.default});const Ws="",Xu="sb-relative sb-overflow-hidden sb-w-1/3 sb-h-2 sb-linear-bar",Zu="sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100%-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100%-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]",Ju="sb-h-[100%] sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100vw-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100vw-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]",Qu="sb-fixed sb-inset-0 sb-z-[9999] sb-flex sb-items-center sb-justify-center sb-p-4 sb-overflow-auto",tp="sb-w-fit sb-flex sb-max-h-[calc(100vh-60px)] sb-bg-background sb-shadow-2xl sb-ring-1 sb-ring-border sb-rounded-xl sb-overflow-hidden",ep="sb-justify-self-center sb-rotate-0",rp="sb-border-0 sb-bg-background !sb-m-0",ip="sb-border sb-rounded-2xl sb-relative sb-py-6",op="!sb-text-left sb-text-foreground sb-font-normal hover:!sb-bg-muted !sb-text-sm sb-rounded-md !sb-shadow-none data-[state=active]:!sb-bg-muted",sp="!sb-flex !sb-justify-start !sb-flex-nowrap !sb-w-full !rtg-grid-cols-2 !sb-gap-2 sb-mx-6",np="!sb-w-[160px] sb-gap-4 ";var P=(e=>(e.USER_PROFILE_CARD_HEADER_CONTAINER="sb-user-profile-card-header-container",e.USER_PROFILE_CONTAINER="sb-user-profile",e.USER_PROFILE_SIDEBAR="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_TABS="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_BURGER_MENU="sb-user-profile-sidebar-burger-menu",e.USER_PROFILE_INPUT_LABEL="sb-user-profile-input-label",e.USER_PROFILE_INPUT_FIELD="sb-user-profile-input-field",e.USER_PROFILE_EDIT_FORM="sb-user-profile-edit-form",e.USER_PROFILE_CARD_CONTAINER="sb-user-profile-card-container",e.USER_PROFILE_EDITABLE_INPUT_FIELD="sb-user-profile-editable-input-field",e.USER_PROFILE_DEFAULT_BUTTON="sb-user-profile-default-button",e.USER_PROFILE_OUTLINE_BUTTON="sb-user-profile-outline-button",e.USER_PROFILE_OTP="sb-user-profile-otp",e.USER_PROFILE_EDIT_BUTTON="sb-user-profile-edit-button",e))(P||{});const at={xs:"475px",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px","3xl":"1920px","4xl":"2560px"},ap=/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/,lp=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,dp=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;function ys(e,t,r){const i=e.formData[t],o=[],s=p=>{if(["input","checkbox","otp"].includes(p.element_type)&&"data_key"in p&&p.data_key===t)return p;if(p.element_type==="container")for(const g of p.properties.children){const y=s(g);if(y)return y}return null},a=e.renderSpec?s(e.renderSpec.root_container):null;if(!a||!("validation"in a.properties))return;const{validation:u}=a.properties;if(!(!u||r!=="submit"&&u.on_event!==r)){if(a.hidden){delete e.errors[t];return}for(const p of u.rules){if(a.hidden)continue;let g=!0;switch(p.type){case"required":g=wd(i,a);break;case"min_length":g=xd(i,p.length);break;case"max_length":g=_d(i,p.length);break;case"min_value":g=Sd(i,p.value);break;case"max_value":g=$d(i,p.value);break;case"regex":g=Cd(i,p.regex);break;case"field_match":g=Ed(i,p.field_match?e.formData[p.field_match]:void 0);break;case"email":g=kd(i);break;case"phone":g=Rd(i);break;case"date":g=Od(i);break;default:g=!0}!g&&p.error_message&&o.push(p.error_message)}e.errors={...e.errors,[t]:o}}}function wd(e,t){return!(e===void 0||e===""||e===!1||t&&t.element_type==="input"&&t.properties.type==="tel"&&typeof e=="string"&&e.split("-")[1]==="")}function xd(e,t){return typeof e=="string"?e.length>=(t??0):!0}function _d(e,t){return typeof e=="string"?e.length<=(t??1/0):!0}function Sd(e,t){const r=typeof t=="string"?parseFloat(t):t,i=typeof e=="string"?parseFloat(e):e;return typeof i=="number"&&typeof r=="number"&&!isNaN(i)&&!isNaN(r)?i>=r:!0}function $d(e,t){const r=typeof t=="string"?parseFloat(t):t,i=typeof e=="string"?parseFloat(e):e;return typeof i=="number"&&typeof r=="number"&&!isNaN(i)&&!isNaN(r)?i<=r:!0}function Cd(e,t){return typeof e=="string"&&t?new RegExp(t).test(e):!0}function Ed(e,t){return t!==void 0?e===t:!0}function kd(e){return typeof e=="string"?lp.test(e):!0}function Rd(e){return typeof e=="string"?ap.test(e):!0}function Od(e){return typeof e=="string"?dp.test(e):!0}const Ad="sb:env",ro="sb:auth",io="customizations",Gs=Symbol("renderSpecContext");var Id=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(Id||{}),Rs=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(Rs||{}),_e=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(_e||{}),Lt=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(Lt||{}),Dt=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Dt||{}),_t=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(_t||{});function Td(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Td(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function cp(){for(var e,t,r=0,i="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Td(e))&&(i&&(i+=" "),i+=t);return i}const Ks="-",up=e=>{const t=hp(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:a=>{const u=a.split(Ks);return u[0]===""&&u.length!==1&&u.shift(),Ld(u,t)||pp(a)},getConflictingClassGroupIds:(a,u)=>{const p=r[a]||[];return u&&i[a]?[...p,...i[a]]:p}}},Ld=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],i=t.nextPart.get(r),o=i?Ld(e.slice(1),i):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Ks);return(a=t.validators.find(({validator:u})=>u(s)))==null?void 0:a.classGroupId},Nl=/^\[(.+)\]$/,pp=e=>{if(Nl.test(e)){const t=Nl.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},hp=e=>{const{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return mp(Object.entries(e.classGroups),r).forEach(([s,a])=>{Os(a,i,s,t)}),i},Os=(e,t,r,i)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Ul(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(gp(o)){Os(o(i),t,r,i);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{Os(a,Ul(t,s),r,i)})})},Ul=(e,t)=>{let r=e;return t.split(Ks).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},gp=e=>e.isThemeGetter,mp=(e,t)=>t?e.map(([r,i])=>{const o=i.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,u])=>[t+a,u])):s);return[r,o]}):e,bp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,i=new Map;const o=(s,a)=>{r.set(s,a),t++,t>e&&(t=0,i=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=i.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},Pd="!",fp=e=>{const{separator:t,experimentalParseClassName:r}=e,i=t.length===1,o=t[0],s=t.length,a=u=>{const p=[];let g=0,y=0,w;for(let A=0;A<u.length;A++){let I=u[A];if(g===0){if(I===o&&(i||u.slice(A,A+s)===t)){p.push(u.slice(y,A)),y=A+s;continue}if(I==="/"){w=A;continue}}I==="["?g++:I==="]"&&g--}const C=p.length===0?u:u.substring(y),$=C.startsWith(Pd),_=$?C.substring(1):C,E=w&&w>y?w-y:void 0;return{modifiers:p,hasImportantModifier:$,baseClassName:_,maybePostfixModifierPosition:E}};return r?u=>r({className:u,parseClassName:a}):a},vp=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(i=>{i[0]==="["?(t.push(...r.sort(),i),r=[]):r.push(i)}),t.push(...r.sort()),t},yp=e=>({cache:bp(e.cacheSize),parseClassName:fp(e),...up(e)}),wp=/\s+/,xp=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(wp);let u="";for(let p=a.length-1;p>=0;p-=1){const g=a[p],{modifiers:y,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:$}=r(g);let _=!!$,E=i(_?C.substring(0,$):C);if(!E){if(!_){u=g+(u.length>0?" "+u:u);continue}if(E=i(C),!E){u=g+(u.length>0?" "+u:u);continue}_=!1}const A=vp(y).join(":"),I=w?A+Pd:A,L=I+E;if(s.includes(L))continue;s.push(L);const H=o(E,_);for(let M=0;M<H.length;++M){const J=H[M];s.push(I+J)}u=g+(u.length>0?" "+u:u)}return u};function _p(){let e=0,t,r,i="";for(;e<arguments.length;)(t=arguments[e++])&&(r=zd(t))&&(i&&(i+=" "),i+=r);return i}const zd=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=zd(e[i]))&&(r&&(r+=" "),r+=t);return r};function Sp(e,...t){let r,i,o,s=a;function a(p){const g=t.reduce((y,w)=>w(y),e());return r=yp(g),i=r.cache.get,o=r.cache.set,s=u,u(p)}function u(p){const g=i(p);if(g)return g;const y=xp(p,r);return o(p,y),y}return function(){return s(_p.apply(null,arguments))}}const Z=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},jd=/^\[(?:([a-z-]+):)?(.+)\]$/i,$p=/^\d+\/\d+$/,Cp=new Set(["px","full","screen"]),Ep=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Rp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Op=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ap=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ie=e=>kr(e)||Cp.has(e)||$p.test(e),ge=e=>Pr(e,"length",Up),kr=e=>!!e&&!Number.isNaN(Number(e)),ws=e=>Pr(e,"number",kr),Wr=e=>!!e&&Number.isInteger(Number(e)),Ip=e=>e.endsWith("%")&&kr(e.slice(0,-1)),U=e=>jd.test(e),me=e=>Ep.test(e),Tp=new Set(["length","size","percentage"]),Lp=e=>Pr(e,Tp,Nd),Pp=e=>Pr(e,"position",Nd),zp=new Set(["image","url"]),jp=e=>Pr(e,zp,Bp),Np=e=>Pr(e,"",Dp),Gr=()=>!0,Pr=(e,t,r)=>{const i=jd.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):r(i[2]):!1},Up=e=>kp.test(e)&&!Rp.test(e),Nd=()=>!1,Dp=e=>Op.test(e),Bp=e=>Ap.test(e),Fp=()=>{const e=Z("colors"),t=Z("spacing"),r=Z("blur"),i=Z("brightness"),o=Z("borderColor"),s=Z("borderRadius"),a=Z("borderSpacing"),u=Z("borderWidth"),p=Z("contrast"),g=Z("grayscale"),y=Z("hueRotate"),w=Z("invert"),C=Z("gap"),$=Z("gradientColorStops"),_=Z("gradientColorStopPositions"),E=Z("inset"),A=Z("margin"),I=Z("opacity"),L=Z("padding"),H=Z("saturate"),M=Z("scale"),J=Z("sepia"),tt=Z("skew"),et=Z("space"),D=Z("translate"),ct=()=>["auto","contain","none"],jt=()=>["auto","hidden","clip","visible","scroll"],Jt=()=>["auto",U,t],T=()=>[U,t],ke=()=>["",ie,ge],Et=()=>["auto",kr,U],Qt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Nt=()=>["solid","dashed","dotted","double","none"],kt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Rt=()=>["start","end","center","between","around","evenly","stretch"],St=()=>["","0",U],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],rt=()=>[kr,U];return{cacheSize:500,separator:":",theme:{colors:[Gr],spacing:[ie,ge],blur:["none","",me,U],brightness:rt(),borderColor:[e],borderRadius:["none","","full",me,U],borderSpacing:T(),borderWidth:ke(),contrast:rt(),grayscale:St(),hueRotate:rt(),invert:St(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[Ip,ge],inset:Jt(),margin:Jt(),opacity:rt(),padding:T(),saturate:rt(),scale:rt(),sepia:St(),skew:rt(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",U]}],container:["container"],columns:[{columns:[me]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Qt(),U]}],overflow:[{overflow:jt()}],"overflow-x":[{"overflow-x":jt()}],"overflow-y":[{"overflow-y":jt()}],overscroll:[{overscroll:ct()}],"overscroll-x":[{"overscroll-x":ct()}],"overscroll-y":[{"overscroll-y":ct()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wr,U]}],basis:[{basis:Jt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",U]}],grow:[{grow:St()}],shrink:[{shrink:St()}],order:[{order:["first","last","none",Wr,U]}],"grid-cols":[{"grid-cols":[Gr]}],"col-start-end":[{col:["auto",{span:["full",Wr,U]},U]}],"col-start":[{"col-start":Et()}],"col-end":[{"col-end":Et()}],"grid-rows":[{"grid-rows":[Gr]}],"row-start-end":[{row:["auto",{span:[Wr,U]},U]}],"row-start":[{"row-start":Et()}],"row-end":[{"row-end":Et()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",U]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",U]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...Rt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Rt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Rt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],pe:[{pe:[L]}],pt:[{pt:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],m:[{m:[A]}],mx:[{mx:[A]}],my:[{my:[A]}],ms:[{ms:[A]}],me:[{me:[A]}],mt:[{mt:[A]}],mr:[{mr:[A]}],mb:[{mb:[A]}],ml:[{ml:[A]}],"space-x":[{"space-x":[et]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[et]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",U,t]}],"min-w":[{"min-w":[U,t,"min","max","fit"]}],"max-w":[{"max-w":[U,t,"none","full","min","max","fit","prose",{screen:[me]},me]}],h:[{h:[U,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[U,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[U,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[U,t,"auto","min","max","fit"]}],"font-size":[{text:["base",me,ge]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ws]}],"font-family":[{font:[Gr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",U]}],"line-clamp":[{"line-clamp":["none",kr,ws]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ie,U]}],"list-image":[{"list-image":["none",U]}],"list-style-type":[{list:["none","disc","decimal",U]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[I]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Nt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ie,ge]}],"underline-offset":[{"underline-offset":["auto",ie,U]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[I]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Qt(),Pp]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Lp]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},jp]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[$]}],"gradient-via":[{via:[$]}],"gradient-to":[{to:[$]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[I]}],"border-style":[{border:[...Nt(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[I]}],"divide-style":[{divide:Nt()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...Nt()]}],"outline-offset":[{"outline-offset":[ie,U]}],"outline-w":[{outline:[ie,ge]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ke()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[I]}],"ring-offset-w":[{"ring-offset":[ie,ge]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",me,Np]}],"shadow-color":[{shadow:[Gr]}],opacity:[{opacity:[I]}],"mix-blend":[{"mix-blend":[...kt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":kt()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",me,U]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[H]}],sepia:[{sepia:[J]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[I]}],"backdrop-saturate":[{"backdrop-saturate":[H]}],"backdrop-sepia":[{"backdrop-sepia":[J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",U]}],duration:[{duration:rt()}],ease:[{ease:["linear","in","out","in-out",U]}],delay:[{delay:rt()}],animate:[{animate:["none","spin","ping","pulse","bounce",U]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Wr,U]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[tt]}],"skew-y":[{"skew-y":[tt]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",U]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",U]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",U]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ie,ge,ws]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Mp=Sp(Fp);function W(...e){return Mp(cp(e))}function R(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function qp(e){document.documentElement.setAttribute("data-theme",e)}function Hp(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&qp("light")}function Dl(){return document.documentElement.getAttribute("data-theme")}function Ys(e,t){return e.includes("{{theme}}")?e.replace("{{theme}}",t):e}function mt(e){const t={},r={};for(const i in e){const o=e[i];o!=null&&(i in at&&typeof o=="object"?r[i]=o:t[i]=o)}return{base:t,responsive:r}}function Vp(e){return{...at,...e??{}}}function bt(e,t,r){const i=Vp(r);let o="";for(const a in t){const p=`(min-width: ${i[a]})`,g=Object.entries(t[a]).map(([y,w])=>`${y}: ${w} !important;`).join(" ");o+=`@media ${p} { #${e} { ${g} } }
|
|
5511
|
+
`}let s=document.getElementById(`responsive-style-${e}`);s||(s=document.createElement("style"),s.id=`responsive-style-${e}`,document.head.appendChild(s)),s.textContent=o}function As(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}async function Wp(e,t){if(!t.length)return;await As();const r=e.offsetWidth,i=t.length,o=60,s=8;let a=1,u=0,p=-1;for(let g=1;g<=i;g++){const y=s*(g-1),w=(r-y)/g,C=i%g;if(w<o)continue;let $=0;if(C===0&&g>a)$=p+1;else if(C>=2)$=2;else continue;($>p||$===p&&w>u)&&(a=g,u=w,p=$)}e.style.setProperty("--sso-cols",String(a)),e.style.setProperty("--sso-gap",`${s}px`),e.style.setProperty("--sso-item-width","calc(100% / var(--sso-cols) - var(--sso-gap) / var(--sso-cols) * (var(--sso-cols) - 1))")}function oo(e,t){const r={...e};for(const i in t){const o=t[i],s=r[i];o&&typeof o=="object"&&!Array.isArray(o)?r[i]=oo(s??{},o):r[i]=o}return r}function Pt(e,t){var r,i,o,s,a,u,p,g,y,w,C,$;return{default:(i=(r=t.byType)==null?void 0:r.buttons)==null?void 0:i.defaultButton,secondary:(s=(o=t.byType)==null?void 0:o.buttons)==null?void 0:s.secondaryButton,link:(u=(a=t.byType)==null?void 0:a.buttons)==null?void 0:u.linkButton,destructive:(g=(p=t.byType)==null?void 0:p.buttons)==null?void 0:g.destructiveButton,ghost:(w=(y=t.byType)==null?void 0:y.buttons)==null?void 0:w.ghostButton,outline:($=(C=t.byType)==null?void 0:C.buttons)==null?void 0:$.outlineButton}[e]}function O(e,t,r,i,o,s=!1){var g,y;let a=e||"",u={...t};s&&((g=o==null?void 0:o.config)!=null&&g.font)&&(a=W(a,o.config.font));const p=w=>{if(!w)return;const{class:C,style:$,font:_,rule:E="merge"}=w;E==="override"?(a=_||C||"",u=$||{}):(a=W(a,C,_),u={...u,...$})};return p(r),i&&((y=o==null?void 0:o.byId)!=null&&y[i])&&p(o.byId[i]),{class:a,style:u}}function so(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function Ud(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function Gp(e){try{const t=e.replace(/^data:text\/html;base64,/,"");return decodeURIComponent(escape(atob(t)))}catch(t){return console.error("Failed to decode base64 html:",t),""}}function ai(){return qt`<svg
|
|
5512
5512
|
width="16"
|
|
5513
5513
|
height="16"
|
|
5514
5514
|
viewBox="0 0 16 16"
|
|
@@ -5594,7 +5594,7 @@ body {
|
|
|
5594
5594
|
<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5595
5595
|
<path d="M1 7H17M1 1H17M1 13H17" stroke="#0A0A0A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5596
5596
|
</svg>
|
|
5597
|
-
`}const
|
|
5597
|
+
`}const no="sb-w-full sb-flex sb-justify-between sb-border-b sb-px-4 sb-py-2",ao="sb-flex sb-items-center sb-text-[18px] sb-font-medium sb-gap-2 sb-text-muted-foreground !sb-min-w-9 !sb-min-h-9",lo="sb-w-full sb-basis-36 sb-shrink-0 sb-text-sm sb-text-foreground sb-font-medium sb-truncate sb-overflow-hidden sb-text-ellipsis",co="sb-w-full sb-border-none !sb-shadow-none !sb-px-0 disabled:!sb-opacity-100",uo="!sb-rounded-2xl !sb-p-0 !sb-bg-base-background",po="!sb-rounded-2xl !sb-p-0 sb-mb-4",ho="!sb-bg-background",go="sb-w-full md:sb-w-[120px]",mo="sb-w-full md:sb-w-[120px]",Xs="sb-text-muted-foreground sb-text-sm sb-mr-2 sb-flex sb-items-center sb-gap-1";var th=Object.defineProperty,eh=Object.getOwnPropertyDescriptor,ht=(e,t,r,i)=>{for(var o=i>1?void 0:i?eh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&th(t,r,o),o};const rh=(e,t)=>{const r=Array.from({length:t}).map((s,a)=>c`<rtg-input-otp-slot
|
|
5598
5598
|
class="sb-bg-background"
|
|
5599
5599
|
index=${a}
|
|
5600
5600
|
></rtg-input-otp-slot>`),i=s=>c`<rtg-input-otp-group>${s}</rtg-input-otp-group>`,o=()=>c`<rtg-input-otp-separator></rtg-input-otp-separator>`;switch(e){case"with_spacing":return c`<rtg-input-otp-group class="gap-2"
|
|
@@ -5602,7 +5602,7 @@ body {
|
|
|
5602
5602
|
>`;case"simple":return c`${i(r.slice(0,3))}${o()}${i(r.slice(3))}`;case"with_separator":return c`
|
|
5603
5603
|
${i(r.slice(0,2))}${o()}
|
|
5604
5604
|
${i(r.slice(2,4))}${o()} ${i(r.slice(4))}
|
|
5605
|
-
`;default:return i(r)}};exports.SbAccountInfo=class extends v{constructor(){super(...arguments),this.showAvatarMenu=!1,this.customizations=null,this.showIcons=!0,this.content=null,this.otpVariant="simple",this.otpLength=6,this.layout=_t.ROW,this.isEditingEmail=!1,this.isVerifyingEmail=!1,this.isEditingPhone=!1,this.isVerifyingPhone=!1}getButtonStyles(){const t=Pt("default",this.customizations),r=Pt("outline",this.customizations),i=
|
|
5605
|
+
`;default:return i(r)}};exports.SbAccountInfo=class extends v{constructor(){super(...arguments),this.showAvatarMenu=!1,this.customizations=null,this.showIcons=!0,this.content=null,this.otpVariant="simple",this.otpLength=6,this.layout=_t.ROW,this.isEditingEmail=!1,this.isVerifyingEmail=!1,this.isEditingPhone=!1,this.isVerifyingPhone=!1}getButtonStyles(){const t=Pt("default",this.customizations),r=Pt("outline",this.customizations),i=O(go,{},t,P.USER_PROFILE_DEFAULT_BUTTON,this.customizations),o=O(mo,{},r,P.USER_PROFILE_DEFAULT_BUTTON,this.customizations);return{defaultMapped:i,outlineMapped:o}}getInputStyles(t=!1){var i,o,s;const r=t?ho:W(co);return O(r,{},(s=(o=(i=this.customizations)==null?void 0:i.byType)==null?void 0:o.inputs)==null?void 0:s.inputField,t?P.USER_PROFILE_EDITABLE_INPUT_FIELD:P.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return O(W(lo,"sb-hidden md:sb-inline"),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,P.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,o,s,a,u,p,g;return O(t?uo:po,{},t?(s=(o=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:o.userProfileCard)==null?void 0:s.editForm:(g=(p=(u=(a=this.customizations)==null?void 0:a.byType)==null?void 0:u.userProfile)==null?void 0:p.userProfileCard)==null?void 0:g.container,t?P.USER_PROFILE_EDIT_FORM:P.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderDisplayRow(t,r,i){const{class:o,style:s}=this.getLabelStyles(),{class:a,style:u}=this.getInputStyles(),p=this.layout===_t.COLUMN;return c`
|
|
5606
5606
|
<div
|
|
5607
5607
|
class=${W("sb-w-full",p?"sb-flex sb-flex-row-reverse md:sb-flex-col sb-gap-2":"sb-flex sb-items-center sb-justify-between sb-gap-2")}
|
|
5608
5608
|
>
|
|
@@ -5612,7 +5612,7 @@ body {
|
|
|
5612
5612
|
${t}
|
|
5613
5613
|
</div>
|
|
5614
5614
|
<rtg-button variant="outline" size="sm" @click=${i}>
|
|
5615
|
-
${
|
|
5615
|
+
${ai()}
|
|
5616
5616
|
</rtg-button>
|
|
5617
5617
|
</div>
|
|
5618
5618
|
<div class="sb-flex-1 sb-min-w-0">
|
|
@@ -5636,7 +5636,7 @@ body {
|
|
|
5636
5636
|
></rtg-input>
|
|
5637
5637
|
</div>
|
|
5638
5638
|
<rtg-button variant="outline" size="sm" @click=${i}>
|
|
5639
|
-
${
|
|
5639
|
+
${ai()}
|
|
5640
5640
|
</rtg-button>
|
|
5641
5641
|
`}
|
|
5642
5642
|
</div>
|
|
@@ -5729,7 +5729,7 @@ body {
|
|
|
5729
5729
|
>
|
|
5730
5730
|
</rtg-card-footer>
|
|
5731
5731
|
</rtg-card>
|
|
5732
|
-
`}renderEmailSection(){return this.isVerifyingEmail?this.renderVerificationForm("email",()=>(this.isVerifyingEmail=!1,this.isEditingEmail=!0)):this.isEditingEmail?this.renderEditForm("email","Email",()=>(this.isVerifyingEmail=!0,this.isEditingEmail=!1),()=>this.isEditingEmail=!1):this.renderDisplayRow("Email",this.account.email,()=>this.isEditingEmail=!0)}renderPhoneSection(){return this.isVerifyingPhone?this.renderVerificationForm("phone",()=>(this.isVerifyingPhone=!1,this.isEditingPhone=!0)):this.isEditingPhone?this.renderEditForm("phone","Phone Number",()=>(this.isVerifyingPhone=!0,this.isEditingPhone=!1),()=>this.isEditingPhone=!1):this.renderDisplayRow("Phone number",this.account.phone,()=>this.isEditingPhone=!0)}renderHeader(){var s,a,u,p,g,y,w,C,$,_,E,
|
|
5732
|
+
`}renderEmailSection(){return this.isVerifyingEmail?this.renderVerificationForm("email",()=>(this.isVerifyingEmail=!1,this.isEditingEmail=!0)):this.isEditingEmail?this.renderEditForm("email","Email",()=>(this.isVerifyingEmail=!0,this.isEditingEmail=!1),()=>this.isEditingEmail=!1):this.renderDisplayRow("Email",this.account.email,()=>this.isEditingEmail=!0)}renderPhoneSection(){return this.isVerifyingPhone?this.renderVerificationForm("phone",()=>(this.isVerifyingPhone=!1,this.isEditingPhone=!0)):this.isEditingPhone?this.renderEditForm("phone","Phone Number",()=>(this.isVerifyingPhone=!0,this.isEditingPhone=!1),()=>this.isEditingPhone=!1):this.renderDisplayRow("Phone number",this.account.phone,()=>this.isEditingPhone=!0)}renderHeader(){var s,a,u,p,g,y,w,C,$,_,E,A;const{class:t,style:r}=O(no,{},(g=(p=(u=(a=(s=this.customizations)==null?void 0:s.byType)==null?void 0:a.userProfile)==null?void 0:u.userProfileCard)==null?void 0:p.header)==null?void 0:g.container,P.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),{class:i,style:o}=O(ao,{},(_=($=(C=(w=(y=this.customizations)==null?void 0:y.byType)==null?void 0:w.userProfile)==null?void 0:C.userProfileCard)==null?void 0:$.header)==null?void 0:_.title,P.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations);return c`
|
|
5733
5733
|
<rtg-card-header
|
|
5734
5734
|
customClass=${t}
|
|
5735
5735
|
customStyle=${R(r)}
|
|
@@ -5739,7 +5739,7 @@ body {
|
|
|
5739
5739
|
customStyle=${R(o)}
|
|
5740
5740
|
>
|
|
5741
5741
|
${((E=this.content)==null?void 0:E.icon)||Kp()}
|
|
5742
|
-
<span>${((
|
|
5742
|
+
<span>${((A=this.content)==null?void 0:A.title)||"Account"}</span>
|
|
5743
5743
|
</rtg-card-title>
|
|
5744
5744
|
</rtg-card-header>
|
|
5745
5745
|
`}renderAvatar(){return c`
|
|
@@ -5787,7 +5787,7 @@ body {
|
|
|
5787
5787
|
</div>
|
|
5788
5788
|
</rtg-card-content>
|
|
5789
5789
|
</rtg-card>
|
|
5790
|
-
`}createRenderRoot(){return this}};ht([l({type:Object})],exports.SbAccountInfo.prototype,"account",2);ht([l({type:Boolean})],exports.SbAccountInfo.prototype,"showAvatarMenu",2);ht([l({type:Object})],exports.SbAccountInfo.prototype,"customizations",2);ht([l({type:Function})],exports.SbAccountInfo.prototype,"toggleAvatarMenu",2);ht([l({type:Function})],exports.SbAccountInfo.prototype,"onAvatarChange",2);ht([l({type:Function})],exports.SbAccountInfo.prototype,"onAvatarRemove",2);ht([l({type:Boolean})],exports.SbAccountInfo.prototype,"showIcons",2);ht([l({type:Object})],exports.SbAccountInfo.prototype,"content",2);ht([l({type:String})],exports.SbAccountInfo.prototype,"otpVariant",2);ht([l({type:Number})],exports.SbAccountInfo.prototype,"otpLength",2);ht([l({type:String})],exports.SbAccountInfo.prototype,"layout",2);ht([k()],exports.SbAccountInfo.prototype,"isEditingEmail",2);ht([k()],exports.SbAccountInfo.prototype,"isVerifyingEmail",2);ht([k()],exports.SbAccountInfo.prototype,"isEditingPhone",2);ht([k()],exports.SbAccountInfo.prototype,"isVerifyingPhone",2);exports.SbAccountInfo=ht([h("sb-account-info")],exports.SbAccountInfo);var ih=Object.defineProperty,oh=Object.getOwnPropertyDescriptor,
|
|
5790
|
+
`}createRenderRoot(){return this}};ht([l({type:Object})],exports.SbAccountInfo.prototype,"account",2);ht([l({type:Boolean})],exports.SbAccountInfo.prototype,"showAvatarMenu",2);ht([l({type:Object})],exports.SbAccountInfo.prototype,"customizations",2);ht([l({type:Function})],exports.SbAccountInfo.prototype,"toggleAvatarMenu",2);ht([l({type:Function})],exports.SbAccountInfo.prototype,"onAvatarChange",2);ht([l({type:Function})],exports.SbAccountInfo.prototype,"onAvatarRemove",2);ht([l({type:Boolean})],exports.SbAccountInfo.prototype,"showIcons",2);ht([l({type:Object})],exports.SbAccountInfo.prototype,"content",2);ht([l({type:String})],exports.SbAccountInfo.prototype,"otpVariant",2);ht([l({type:Number})],exports.SbAccountInfo.prototype,"otpLength",2);ht([l({type:String})],exports.SbAccountInfo.prototype,"layout",2);ht([k()],exports.SbAccountInfo.prototype,"isEditingEmail",2);ht([k()],exports.SbAccountInfo.prototype,"isVerifyingEmail",2);ht([k()],exports.SbAccountInfo.prototype,"isEditingPhone",2);ht([k()],exports.SbAccountInfo.prototype,"isVerifyingPhone",2);exports.SbAccountInfo=ht([h("sb-account-info")],exports.SbAccountInfo);var ih=Object.defineProperty,oh=Object.getOwnPropertyDescriptor,dr=(e,t,r,i)=>{for(var o=i>1?void 0:i?oh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&ih(t,r,o),o};exports.SbPersonalInfo=class extends v{constructor(){super(...arguments),this.customizations=null,this.showIcons=!0,this.layout=_t.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=Pt("default",this.customizations),r=Pt("outline",this.customizations),i=Pt("ghost",this.customizations),o=O(go,{},t,P.USER_PROFILE_DEFAULT_BUTTON,this.customizations),s=O(mo,{},r,P.USER_PROFILE_DEFAULT_BUTTON,this.customizations),a=O(Xs,{},i,P.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:o,outlineMapped:s,ghostMapped:a}}getInputStyles(t=!1){var i,o,s;const r=t?ho:W(co);return O(r,{},(s=(o=(i=this.customizations)==null?void 0:i.byType)==null?void 0:o.inputs)==null?void 0:s.inputField,t?P.USER_PROFILE_EDITABLE_INPUT_FIELD:P.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return O(W(lo,this.layout!==_t.ROW?"sb-basis-auto":""),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,P.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,o,s,a,u,p,g;return O(W(t?uo+" sb-mb-4":po),{},t?(s=(o=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:o.userProfileCard)==null?void 0:s.editForm:(g=(p=(u=(a=this.customizations)==null?void 0:a.byType)==null?void 0:u.userProfile)==null?void 0:p.userProfileCard)==null?void 0:g.container,t?P.USER_PROFILE_EDIT_FORM:P.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const r=this.getInputStyles(this.isEditing);return c`
|
|
5791
5791
|
<rtg-input
|
|
5792
5792
|
customClass="${r.class}"
|
|
5793
5793
|
customStyle="${R(r.style)}"
|
|
@@ -5816,7 +5816,7 @@ body {
|
|
|
5816
5816
|
Cancel
|
|
5817
5817
|
</rtg-button>
|
|
5818
5818
|
</rtg-card-footer>
|
|
5819
|
-
`}render(){var w,C,$,_,E,
|
|
5819
|
+
`}render(){var w,C,$,_,E,A,I,L,H,M,J,tt,et,D;const t=[{label:"Username",value:this.personal.username},{label:"First name",value:this.personal.first},{label:"Middle name",value:this.personal.middle},{label:"Last name",value:this.personal.last},{label:"Nickname",value:this.personal.nickname},{label:"Gender",value:this.personal.gender},{label:"Bio",value:this.personal.bio}],r=this.getContainerStyles(!1),i=this.getContainerStyles(!0),{defaultMapped:o,outlineMapped:s,ghostMapped:a}=this.getButtonStyles(),u=O(no,{},(E=(_=($=(C=(w=this.customizations)==null?void 0:w.byType)==null?void 0:C.userProfile)==null?void 0:$.userProfileCard)==null?void 0:_.header)==null?void 0:E.container,P.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),p=O(ao,{},(M=(H=(L=(I=(A=this.customizations)==null?void 0:A.byType)==null?void 0:I.userProfile)==null?void 0:L.userProfileCard)==null?void 0:H.header)==null?void 0:M.title,P.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),g=this.getLabelStyles(),y=this.isEditing?i:r;return c`
|
|
5820
5820
|
<rtg-card
|
|
5821
5821
|
customClass=${y.class}
|
|
5822
5822
|
customStyle=${R(y.style)}
|
|
@@ -5845,7 +5845,7 @@ body {
|
|
|
5845
5845
|
customClass=${a.class}
|
|
5846
5846
|
customStyle=${R(a.style)}
|
|
5847
5847
|
>
|
|
5848
|
-
${
|
|
5848
|
+
${ai()}
|
|
5849
5849
|
</rtg-button>
|
|
5850
5850
|
`}
|
|
5851
5851
|
</rtg-card-header>
|
|
@@ -5872,7 +5872,7 @@ body {
|
|
|
5872
5872
|
<!-- Footer -->
|
|
5873
5873
|
${this.isEditing?this.renderFooter(o,s):null}
|
|
5874
5874
|
</rtg-card>
|
|
5875
|
-
`}};
|
|
5875
|
+
`}};dr([l({type:Object})],exports.SbPersonalInfo.prototype,"personal",2);dr([l({type:Object})],exports.SbPersonalInfo.prototype,"customizations",2);dr([l({type:Boolean})],exports.SbPersonalInfo.prototype,"showIcons",2);dr([l({type:String})],exports.SbPersonalInfo.prototype,"layout",2);dr([l({type:Object})],exports.SbPersonalInfo.prototype,"content",2);dr([k()],exports.SbPersonalInfo.prototype,"isEditing",2);exports.SbPersonalInfo=dr([h("sb-personal-info")],exports.SbPersonalInfo);var sh=Object.defineProperty,nh=Object.getOwnPropertyDescriptor,cr=(e,t,r,i)=>{for(var o=i>1?void 0:i?nh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&sh(t,r,o),o};exports.SbLocationInfo=class extends v{constructor(){super(...arguments),this.customizations=null,this.showIcons=!0,this.layout=_t.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=Pt("default",this.customizations),r=Pt("outline",this.customizations),i=Pt("ghost",this.customizations),o=O(go,{},t,P.USER_PROFILE_DEFAULT_BUTTON,this.customizations),s=O(mo,{},r,P.USER_PROFILE_DEFAULT_BUTTON,this.customizations),a=O(Xs,{},i,P.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:o,outlineMapped:s,ghostMapped:a}}getInputStyles(t=!1){var i,o,s;const r=t?ho:W(co);return O(r,{},(s=(o=(i=this.customizations)==null?void 0:i.byType)==null?void 0:o.inputs)==null?void 0:s.inputField,t?P.USER_PROFILE_EDITABLE_INPUT_FIELD:P.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return O(W(lo,this.layout!==_t.ROW?"sb-basis-auto":""),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,P.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,o,s,a,u,p,g;return O(W(t?uo+" sb-mb-4":po),{},t?(s=(o=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:o.userProfileCard)==null?void 0:s.editForm:(g=(p=(u=(a=this.customizations)==null?void 0:a.byType)==null?void 0:u.userProfile)==null?void 0:p.userProfileCard)==null?void 0:g.container,t?P.USER_PROFILE_EDIT_FORM:P.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const r=this.getInputStyles(this.isEditing);return c`
|
|
5876
5876
|
<rtg-input
|
|
5877
5877
|
customClass="${r.class}"
|
|
5878
5878
|
customStyle="${R(r.style)}"
|
|
@@ -5901,7 +5901,7 @@ body {
|
|
|
5901
5901
|
Cancel
|
|
5902
5902
|
</rtg-button>
|
|
5903
5903
|
</rtg-card-footer>
|
|
5904
|
-
`}render(){var w,C,$,_,E,
|
|
5904
|
+
`}render(){var w,C,$,_,E,A,I,L,H,M,J,tt;const t=[{label:"Location",value:this.locationInfo.location},{label:"Zone Info",value:this.locationInfo.zoneInfo}],r=this.getContainerStyles(!1),i=this.getContainerStyles(!0),{defaultMapped:o,outlineMapped:s,ghostMapped:a}=this.getButtonStyles(),u=O(no,{},(E=(_=($=(C=(w=this.customizations)==null?void 0:w.byType)==null?void 0:C.userProfile)==null?void 0:$.userProfileCard)==null?void 0:_.header)==null?void 0:E.container,P.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),p=O(ao,{},(M=(H=(L=(I=(A=this.customizations)==null?void 0:A.byType)==null?void 0:I.userProfile)==null?void 0:L.userProfileCard)==null?void 0:H.header)==null?void 0:M.title,P.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),g=this.getLabelStyles(),y=this.isEditing?i:r;return c`
|
|
5905
5905
|
<rtg-card
|
|
5906
5906
|
customClass=${y.class}
|
|
5907
5907
|
customStyle=${R(y.style)}
|
|
@@ -5929,7 +5929,7 @@ body {
|
|
|
5929
5929
|
customClass=${a.class}
|
|
5930
5930
|
customStyle=${R(a.style)}
|
|
5931
5931
|
>
|
|
5932
|
-
${
|
|
5932
|
+
${ai()}
|
|
5933
5933
|
</rtg-button>
|
|
5934
5934
|
`}
|
|
5935
5935
|
</rtg-card-header>
|
|
@@ -5957,7 +5957,7 @@ body {
|
|
|
5957
5957
|
<!-- Footer -->
|
|
5958
5958
|
${this.isEditing?this.renderFooter(o,s):null}
|
|
5959
5959
|
</rtg-card>
|
|
5960
|
-
`}};
|
|
5960
|
+
`}};cr([l({type:Object})],exports.SbLocationInfo.prototype,"locationInfo",2);cr([l({type:Object})],exports.SbLocationInfo.prototype,"customizations",2);cr([l({type:Boolean})],exports.SbLocationInfo.prototype,"showIcons",2);cr([l({type:String})],exports.SbLocationInfo.prototype,"layout",2);cr([l({type:Object})],exports.SbLocationInfo.prototype,"content",2);cr([k()],exports.SbLocationInfo.prototype,"isEditing",2);exports.SbLocationInfo=cr([h("sb-location-info")],exports.SbLocationInfo);var ah=Object.defineProperty,lh=Object.getOwnPropertyDescriptor,ur=(e,t,r,i)=>{for(var o=i>1?void 0:i?lh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&ah(t,r,o),o};exports.SbUrlsInfo=class extends v{constructor(){super(...arguments),this.showIcons=!0,this.customizations=null,this.layout=_t.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=Pt("default",this.customizations),r=Pt("outline",this.customizations),i=Pt("ghost",this.customizations),o=O(go,{},t,P.USER_PROFILE_DEFAULT_BUTTON,this.customizations),s=O(mo,{},r,P.USER_PROFILE_DEFAULT_BUTTON,this.customizations),a=O(Xs,{},i,P.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:o,outlineMapped:s,ghostMapped:a}}getInputStyles(t=!1){var i,o,s;const r=t?ho:W(co);return O(r,{},(s=(o=(i=this.customizations)==null?void 0:i.byType)==null?void 0:o.inputs)==null?void 0:s.inputField,t?P.USER_PROFILE_EDITABLE_INPUT_FIELD:P.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return O(W(lo,this.layout!==_t.ROW?"sb-basis-auto":""),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,P.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,o,s,a,u,p,g;return O(W(t?uo:po,"!sb-mb-0"),{},t?(s=(o=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:o.userProfileCard)==null?void 0:s.editForm:(g=(p=(u=(a=this.customizations)==null?void 0:a.byType)==null?void 0:u.userProfile)==null?void 0:p.userProfileCard)==null?void 0:g.container,t?P.USER_PROFILE_EDIT_FORM:P.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const r=this.getInputStyles(this.isEditing);return c`
|
|
5961
5961
|
<rtg-input
|
|
5962
5962
|
customClass="${r.class}"
|
|
5963
5963
|
customStyle="${R(r.style)}"
|
|
@@ -5986,7 +5986,7 @@ body {
|
|
|
5986
5986
|
Cancel
|
|
5987
5987
|
</rtg-button>
|
|
5988
5988
|
</rtg-card-footer>
|
|
5989
|
-
`}render(){var w,C,$,_,E,
|
|
5989
|
+
`}render(){var w,C,$,_,E,A,I,L,H,M,J,tt;const t=[{label:"Website",value:this.URLsInfo.website}],r=this.getContainerStyles(!1),i=this.getContainerStyles(!0),{defaultMapped:o,outlineMapped:s,ghostMapped:a}=this.getButtonStyles(),u=O(no,{},(E=(_=($=(C=(w=this.customizations)==null?void 0:w.byType)==null?void 0:C.userProfile)==null?void 0:$.userProfileCard)==null?void 0:_.header)==null?void 0:E.container,P.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),p=O(ao,{},(M=(H=(L=(I=(A=this.customizations)==null?void 0:A.byType)==null?void 0:I.userProfile)==null?void 0:L.userProfileCard)==null?void 0:H.header)==null?void 0:M.title,P.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),g=this.getLabelStyles(),y=this.isEditing?i:r;return c`
|
|
5990
5990
|
<rtg-card
|
|
5991
5991
|
customClass=${y.class}
|
|
5992
5992
|
customStyle=${R(y.style)}
|
|
@@ -6013,7 +6013,7 @@ body {
|
|
|
6013
6013
|
customClass=${a.class}
|
|
6014
6014
|
customStyle=${R(a.style)}
|
|
6015
6015
|
>
|
|
6016
|
-
${
|
|
6016
|
+
${ai()}
|
|
6017
6017
|
</rtg-button>
|
|
6018
6018
|
`}
|
|
6019
6019
|
</rtg-card-header>
|
|
@@ -6041,8 +6041,8 @@ body {
|
|
|
6041
6041
|
<!-- Footer -->
|
|
6042
6042
|
${this.isEditing?this.renderFooter(o,s):null}
|
|
6043
6043
|
</rtg-card>
|
|
6044
|
-
`}};
|
|
6045
|
-
${this.orientation===Dt.VERTICAL||this.sidebarDisplayType===
|
|
6044
|
+
`}};ur([l({type:Object})],exports.SbUrlsInfo.prototype,"URLsInfo",2);ur([l({type:Boolean})],exports.SbUrlsInfo.prototype,"showIcons",2);ur([l({type:Object})],exports.SbUrlsInfo.prototype,"customizations",2);ur([l({type:String})],exports.SbUrlsInfo.prototype,"layout",2);ur([l({type:Object})],exports.SbUrlsInfo.prototype,"content",2);ur([k()],exports.SbUrlsInfo.prototype,"isEditing",2);exports.SbUrlsInfo=ur([h("sb-urls-info")],exports.SbUrlsInfo);var dh=Object.defineProperty,ch=Object.getOwnPropertyDescriptor,dt=(e,t,r,i)=>{for(var o=i>1?void 0:i?ch(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&dh(t,r,o),o};exports.Profile=class extends v{constructor(){super(...arguments),this.showAvatarMenu=!1,this.customizations=null,this.showIcons=!0,this.orientation=Dt.HORIZONTAL,this.sidebarDisplayType=Lt.REGULAR,this.mode=_e==null?void 0:_e.PAGE,this.widgetsLayout=_t.ROW,this.content=null}createRenderRoot(){return this}render(){var i,o,s,a;return c`
|
|
6045
|
+
${this.orientation===Dt.VERTICAL||this.sidebarDisplayType===Lt.BURGER?null:c`
|
|
6046
6046
|
<div class=${"sb-flex sb-items-center sb-justify-between sb-mb-4"}>
|
|
6047
6047
|
<div class=${"sb-font-medium sb-text-[18px] sb-text-foreground"}>Profile</div>
|
|
6048
6048
|
</div>
|
|
@@ -6075,7 +6075,7 @@ body {
|
|
|
6075
6075
|
.URLsInfo=${this.urls}
|
|
6076
6076
|
.layout=${this.widgetsLayout}
|
|
6077
6077
|
></sb-urls-info>
|
|
6078
|
-
`}};dt([l({type:Object})],exports.Profile.prototype,"account",2);dt([l({type:Object})],exports.Profile.prototype,"personal",2);dt([l({type:Object})],exports.Profile.prototype,"location",2);dt([l({type:Object})],exports.Profile.prototype,"urls",2);dt([l({type:Boolean})],exports.Profile.prototype,"showAvatarMenu",2);dt([l({type:Object})],exports.Profile.prototype,"customizations",2);dt([l({type:Boolean})],exports.Profile.prototype,"showIcons",2);dt([l({attribute:!1})],exports.Profile.prototype,"modalIcon",2);dt([l({type:String})],exports.Profile.prototype,"orientation",2);dt([l({type:String})],exports.Profile.prototype,"sidebarDisplayType",2);dt([l({type:String})],exports.Profile.prototype,"mode",2);dt([l({type:String})],exports.Profile.prototype,"widgetsLayout",2);dt([l({type:Function})],exports.Profile.prototype,"toggleAvatarMenu",2);dt([l({type:Function})],exports.Profile.prototype,"onAvatarChange",2);dt([l({type:Function})],exports.Profile.prototype,"onAvatarRemove",2);dt([l({type:Object})],exports.Profile.prototype,"content",2);exports.Profile=dt([h("sb-profile")],exports.Profile);const uh="!sb-bg-background",
|
|
6078
|
+
`}};dt([l({type:Object})],exports.Profile.prototype,"account",2);dt([l({type:Object})],exports.Profile.prototype,"personal",2);dt([l({type:Object})],exports.Profile.prototype,"location",2);dt([l({type:Object})],exports.Profile.prototype,"urls",2);dt([l({type:Boolean})],exports.Profile.prototype,"showAvatarMenu",2);dt([l({type:Object})],exports.Profile.prototype,"customizations",2);dt([l({type:Boolean})],exports.Profile.prototype,"showIcons",2);dt([l({attribute:!1})],exports.Profile.prototype,"modalIcon",2);dt([l({type:String})],exports.Profile.prototype,"orientation",2);dt([l({type:String})],exports.Profile.prototype,"sidebarDisplayType",2);dt([l({type:String})],exports.Profile.prototype,"mode",2);dt([l({type:String})],exports.Profile.prototype,"widgetsLayout",2);dt([l({type:Function})],exports.Profile.prototype,"toggleAvatarMenu",2);dt([l({type:Function})],exports.Profile.prototype,"onAvatarChange",2);dt([l({type:Function})],exports.Profile.prototype,"onAvatarRemove",2);dt([l({type:Object})],exports.Profile.prototype,"content",2);exports.Profile=dt([h("sb-profile")],exports.Profile);const uh="!sb-bg-background",Bl={vertical:"sb-justify-between sb-w-full",horizontal:"sb-flex-col !sb-items-start sb-mx-4 md:sb-ml-6"},ph="sb-p-2 sb-mb-4 sb-rounded-lg sb-border-muted sb-bg-background",hh="sb-font-medium sb-ml-2 -sb-mt-4 sb-text-[18px] sb-text-foreground",gh="mobile-sidebar-drawer sb-fixed sb-top-0 sb-left-0 sb-h-full sb-max-w-xs sb-bg-background sb-shadow-lg sb-z-[9999] sb-transform sb-transition-all sb-duration-300 sb-ease-in-out",mh="mobile-sidebar-overlay sb-fixed sb-inset-0 sb-bg-black/50 sb-z-[9998] sb-transition-opacity sb-duration-300 sb-ease-in-out";var bh=Object.defineProperty,fh=Object.getOwnPropertyDescriptor,pr=(e,t,r,i)=>{for(var o=i>1?void 0:i?fh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&bh(t,r,o),o};const xs=[{label:"Profile",value:Rs.PROFILE},{label:"Security",value:Rs.SECURITY}];let $e=class extends v{constructor(){super(...arguments),this.orientation=Dt.HORIZONTAL,this.displayType=Lt.REGULAR,this.mode=_e.PAGE,this.config={showIcons:!0},this.customizations=null,this.isMenuOpen=!1}createRenderRoot(){return this}toggleMenu(){const e=this.closest('div[role="tab"]');e&&e.classList.toggle("sb-rotate-0"),this.isMenuOpen=!this.isMenuOpen,this.requestUpdate()}handleCloseProfile(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}renderTabs(e=xs,t=!1,r){var s,a,u;const{class:i,style:o}=O("",{},(u=(a=(s=this.customizations)==null?void 0:s.byType)==null?void 0:a.userProfile)==null?void 0:u.sidebarTabs,P.USER_PROFILE_SIDEBAR_TABS,this.customizations);return c`
|
|
6079
6079
|
<rtg-tab-list
|
|
6080
6080
|
orientation=${t?"vertical":"horizontal"}
|
|
6081
6081
|
class="sb-flex sb-w-full ${t?"":"sb-mb-4"}"
|
|
@@ -6097,7 +6097,7 @@ body {
|
|
|
6097
6097
|
`}renderWatermark(){return c`
|
|
6098
6098
|
<sb-watermark
|
|
6099
6099
|
customId="sb-watermark"
|
|
6100
|
-
class=${W(
|
|
6100
|
+
class=${W(Ws,"sb-text-sm")}
|
|
6101
6101
|
label="Powered by "
|
|
6102
6102
|
fontSize="14px"
|
|
6103
6103
|
image_url="https://i.postimg.cc/4NpJDMsz/SB-2.png"
|
|
@@ -6109,7 +6109,7 @@ body {
|
|
|
6109
6109
|
</div>
|
|
6110
6110
|
<div class="${hh}">Profile</div>
|
|
6111
6111
|
</div>
|
|
6112
|
-
`}renderMobileDrawer(){var r,i,o;const{class:e,style:t}=
|
|
6112
|
+
`}renderMobileDrawer(){var r,i,o;const{class:e,style:t}=O("",{},(o=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:o.sidebarBurgerMenu,P.USER_PROFILE_SIDEBAR_BURGER_MENU,this.customizations);return c`
|
|
6113
6113
|
<div
|
|
6114
6114
|
style="${R(t)}"
|
|
6115
6115
|
class="${W(gh,this.isMenuOpen?"sb-translate-x-0 sb-opacity-100":"sb-translate-x-[-100%] sb-opacity-0",e)}"
|
|
@@ -6118,7 +6118,7 @@ body {
|
|
|
6118
6118
|
class="sb-flex sb-flex-col sb-justify-between sb-h-[100%] sb-p-4 sb-w-min"
|
|
6119
6119
|
>
|
|
6120
6120
|
<div class="sb-flex sb-flex-col sb-gap-2 sb-w-min">
|
|
6121
|
-
${this.renderTabs(
|
|
6121
|
+
${this.renderTabs(xs,!0,this.toggleMenu.bind(this))}
|
|
6122
6122
|
</div>
|
|
6123
6123
|
${this.renderWatermark()}
|
|
6124
6124
|
</div>
|
|
@@ -6127,21 +6127,21 @@ body {
|
|
|
6127
6127
|
class="${mh} ${this.isMenuOpen?"sb-block sb-opacity-100":"sb-hidden sb-opacity-0"}"
|
|
6128
6128
|
@click=${this.toggleMenu}
|
|
6129
6129
|
></div>
|
|
6130
|
-
`}render(){var o,s,a;const e=this.orientation===Dt.VERTICAL,t=this.orientation===Dt.HORIZONTAL,{class:r,style:i}=
|
|
6130
|
+
`}render(){var o,s,a;const e=this.orientation===Dt.VERTICAL,t=this.orientation===Dt.HORIZONTAL,{class:r,style:i}=O("",{},(a=(s=(o=this.customizations)==null?void 0:o.byType)==null?void 0:s.userProfile)==null?void 0:a.sidebar,P.USER_PROFILE_SIDEBAR,this.customizations);return c`
|
|
6131
6131
|
<div
|
|
6132
6132
|
style="${R(i)}"
|
|
6133
|
-
class="${W("sb-overflow-x-auto sb-flex sb-items-center sb-h-[100%]",e?
|
|
6133
|
+
class="${W("sb-overflow-x-auto sb-flex sb-items-center sb-h-[100%]",e?Bl.vertical:Bl.horizontal,r)}"
|
|
6134
6134
|
>
|
|
6135
|
-
${this.displayType===
|
|
6135
|
+
${this.displayType===Lt.BURGER?this.renderBurger():null}
|
|
6136
6136
|
${e?this.renderTabs():null}
|
|
6137
|
-
${t&&this.displayType!==
|
|
6137
|
+
${t&&this.displayType!==Lt.BURGER?c`
|
|
6138
6138
|
<div class="sb-flex sb-flex-col sb-justify-between sb-flex-1">
|
|
6139
|
-
${this.renderTabs(
|
|
6139
|
+
${this.renderTabs(xs,!0)} ${this.renderWatermark()}
|
|
6140
6140
|
</div>
|
|
6141
6141
|
`:null}
|
|
6142
6142
|
</div>
|
|
6143
|
-
${this.displayType===
|
|
6144
|
-
`}};
|
|
6143
|
+
${this.displayType===Lt.BURGER?this.renderMobileDrawer():null}
|
|
6144
|
+
`}};pr([l({type:String})],$e.prototype,"orientation",2);pr([l({type:String})],$e.prototype,"displayType",2);pr([l({type:String})],$e.prototype,"mode",2);pr([l({type:Object})],$e.prototype,"config",2);pr([l({type:Object})],$e.prototype,"customizations",2);pr([k()],$e.prototype,"isMenuOpen",2);$e=pr([h("sb-profile-sidebar")],$e);var vh=Object.defineProperty,Zt=(e,t,r,i)=>{for(var o=void 0,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=a(t,r,o)||o);return o&&vh(t,r,o),o};const Fl={xs:640,sm:768};class zt extends v{constructor(){super(...arguments),this.showAvatarMenu=!1,this.orientation=Dt.HORIZONTAL,this.mobileDisplay=Lt.REGULAR,this.mode=_e.PAGE,this.widgetsLayout=_t.ROW,this.content=null,this.customizations=null,this.providedCustomizations=null,this.isOpen=!0,this.currentBreakpoint="md",this.account={email:"J.Doe@gmail.com",phone:"+989390717800",avatar:"https://github.com/shadcn.png"},this.personal={username:"@JaneeDoe",first:"Jane",middle:"Michelle",last:"Doe",nickname:"Janee",gender:"Female",bio:"-"},this.location={location:"Iran, Tehran",zoneInfo:"GMT+3:30"},this.urls={website:"www.janeedoe.com"},this.defaultTab="Profile",this._handleResize=()=>{this._updateBreakpoint()},this._handleClose=()=>{this.mode===_e.MODAL&&(this.isOpen=!1)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=r=>{var s;const i=(s=r.target.files)==null?void 0:s[0];if(!i)return;const o=new FileReader;o.onload=()=>{this.account.avatar=o.result,this.requestUpdate()},o.readAsDataURL(i)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const r=t.target,i=this.querySelector("sb-account-info"),o=this.querySelector("rtg-card");i!=null&&i.contains(r)||o!=null&&o.contains(r)||(this.showAvatarMenu=!1)}}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),this.addEventListener("close-user-profile",this._handleClose),this.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),this.removeEventListener("close-user-profile",this._handleClose),this.removeEventListener("change-avatar",this._handleAvatarChange)}firstUpdated(){this.style.width="100%"}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<Fl.xs?"xs":t<Fl.sm?"sm":"md"}get effectiveCustomizations(){return oo(this.providedCustomizations??{},this.customizations??{})}get isModal(){return this.mode===_e.MODAL}get sidebarDisplayType(){return this.orientation===Dt.VERTICAL||this.currentBreakpoint==="md"?Lt.REGULAR:Lt.BURGER}get containerClasses(){return W(ep,this.isModal?ip:rp,this.isModal?Ju:Zu,this.sidebarDisplayType===Lt.BURGER||this.orientation===Dt.VERTICAL?"!sb-flex-col":"!sb-flex-row")}get contentClasses(){return W("sb-flex-grow",this.isModal?"sb-max-h-[864px] sb-mx-4 sb-px-2 md:sb-mx-0 md:sb-px-6 md:sb-pl-0 sb-overflow-auto":"md:sb-max-h-[100%]",this.orientation===Dt.VERTICAL?"md:sb-pl-6 sb-mb-16":"")}renderCloseButton(){return this.isModal?c`
|
|
6145
6145
|
<button
|
|
6146
6146
|
class="sb-absolute sb-bg-background sb-right-8 sb-top-8 sb-z-10"
|
|
6147
6147
|
@click=${()=>this.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}
|
|
@@ -6154,13 +6154,13 @@ body {
|
|
|
6154
6154
|
>
|
|
6155
6155
|
<sb-watermark
|
|
6156
6156
|
customId="sb-watermark"
|
|
6157
|
-
class=${W(
|
|
6157
|
+
class=${W(Ws,"sb-text-sm")}
|
|
6158
6158
|
label="Powered by "
|
|
6159
6159
|
fontSize="14px"
|
|
6160
6160
|
image_url="https://i.postimg.cc/4NpJDMsz/SB-2.png"
|
|
6161
6161
|
></sb-watermark>
|
|
6162
6162
|
</div>
|
|
6163
|
-
`}renderProfileContent(){var o,s;const t=this.effectiveCustomizations,{class:r,style:i}=
|
|
6163
|
+
`}renderProfileContent(){var o,s;const t=this.effectiveCustomizations,{class:r,style:i}=O(this.containerClasses,{},(s=(o=t==null?void 0:t.byType)==null?void 0:o.userProfile)==null?void 0:s.container,P.USER_PROFILE_CONTAINER,t,!0);return c`
|
|
6164
6164
|
<rtg-tab
|
|
6165
6165
|
customStyle=${R(i)}
|
|
6166
6166
|
customClass=${r}
|
|
@@ -6179,7 +6179,7 @@ body {
|
|
|
6179
6179
|
|
|
6180
6180
|
<div class=${this.contentClasses}>
|
|
6181
6181
|
<div class="sb-relative sb-[transform:translateZ(0)]">
|
|
6182
|
-
<rtg-tab-content value=${
|
|
6182
|
+
<rtg-tab-content value=${Id.PROFILE}>
|
|
6183
6183
|
<sb-profile
|
|
6184
6184
|
.customizations=${t}
|
|
6185
6185
|
.content=${this.content}
|
|
@@ -6209,7 +6209,7 @@ body {
|
|
|
6209
6209
|
<div class=${Qu}>
|
|
6210
6210
|
<div class=${tp}>${this.renderProfileContent()}</div>
|
|
6211
6211
|
</div>
|
|
6212
|
-
`:this.renderProfileContent():f}createRenderRoot(){return this}}
|
|
6212
|
+
`:this.renderProfileContent():f}createRenderRoot(){return this}}Zt([l({type:Boolean})],zt.prototype,"showAvatarMenu");Zt([l({type:String})],zt.prototype,"orientation");Zt([l({type:String})],zt.prototype,"mobileDisplay");Zt([l({type:String})],zt.prototype,"mode");Zt([l({type:String})],zt.prototype,"widgetsLayout");Zt([l({type:Object})],zt.prototype,"content");Zt([l({type:Object})],zt.prototype,"customizations");Zt([Ct({context:io,subscribe:!0})],zt.prototype,"providedCustomizations");Zt([k()],zt.prototype,"isOpen");Zt([k()],zt.prototype,"currentBreakpoint");customElements.define("sb-user-profile",zt);var yh=Object.defineProperty,wh=Object.getOwnPropertyDescriptor,bo=(e,t,r,i)=>{for(var o=i>1?void 0:i?wh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&yh(t,r,o),o};exports.PreviewComponent=class extends v{constructor(){super(...arguments),this.loading=!1,this.renderSpec=null,this.customizations={byType:{},config:{font:"font-geist"}}}createRenderRoot(){return this}render(){return c`
|
|
6213
6213
|
${this.loading?c`<div class="sb-p-8 sb-text-center">Loading...</div>`:c`
|
|
6214
6214
|
<sb-provider>
|
|
6215
6215
|
<signed-out>
|
|
@@ -6221,7 +6221,7 @@ body {
|
|
|
6221
6221
|
</signed-out>
|
|
6222
6222
|
</sb-provider>
|
|
6223
6223
|
`}
|
|
6224
|
-
`}};
|
|
6224
|
+
`}};bo([l({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);bo([l({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);bo([l({type:Object})],exports.PreviewComponent.prototype,"customizations",2);exports.PreviewComponent=bo([h("sb-preview")],exports.PreviewComponent);var xh=Object.defineProperty,_h=Object.getOwnPropertyDescriptor,fo=(e,t,r,i)=>{for(var o=i>1?void 0:i?_h(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&xh(t,r,o),o};exports.SbSignIn=class extends v{constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.providedCustomizations=null,this.__flowStarted=!1,this.__flowInitAttempted=!1}get effectiveCustomizations(){const t=this.providedCustomizations??{},r=this.customizations??{};return oo(t,r)}createRenderRoot(){return this}async waitForAuthConfigured(t=5e3){var o;const r=gt??((o=window.__saasbaseCoreSdk)==null?void 0:o.Auth);if(!r||r.__configured)return;const i=r.__whenConfigured;i&&await Promise.race([i,new Promise(s=>setTimeout(s,t))])}async connectedCallback(){var t;if(super.connectedCallback(),!this.__flowInitAttempted&&(this.__flowInitAttempted=!0,await this.waitForAuthConfigured(),!this.__flowStarted)){this.__flowStarted=!0;try{const r=await gt.startLoginflow("signin-flow-passkey");console.log(r.isResumed?"Resumed login flow":"Started new login flow")}catch(r){if(console.error("Sign-in flow init failed:",r),r&&typeof r.message=="string"&&r.message.includes("Auth.configure() must be called")){this.__saasbaseFailedForConfig=!0;try{const i=gt??((t=window.__saasbaseCoreSdk)==null?void 0:t.Auth),o=i==null?void 0:i.__whenConfigured;if(o){await Promise.race([o,new Promise(s=>setTimeout(s,1e4))]);try{const s=await gt.startLoginflow("signin-flow-passkey");console.log(s.isResumed?"Resumed login flow":"Started new login flow")}catch(s){console.error("Sign-in retry failed:",s)}}}catch{}}else this.__flowStarted=!1}}}__saasbaseRetryInit(){this.__flowStarted||(this.__flowInitAttempted=!1,this.connectedCallback())}render(){var o,s;const t=this.effectiveCustomizations,{class:r,style:i}=O("",{},(s=(o=t==null?void 0:t.byType)==null?void 0:o.loader)==null?void 0:s.linear,"",t);return this.renderSpec?c`
|
|
6225
6225
|
<sb-layout
|
|
6226
6226
|
.renderSpec=${this.renderSpec}
|
|
6227
6227
|
.customizations=${t}
|
|
@@ -6232,7 +6232,7 @@ body {
|
|
|
6232
6232
|
customClass=${r}
|
|
6233
6233
|
.customStyle=${i}
|
|
6234
6234
|
></linear-loader>
|
|
6235
|
-
`}};
|
|
6235
|
+
`}};fo([Ct({context:Gs,subscribe:!0})],exports.SbSignIn.prototype,"renderSpec",2);fo([l({type:Object})],exports.SbSignIn.prototype,"customizations",2);fo([Ct({context:io,subscribe:!0})],exports.SbSignIn.prototype,"providedCustomizations",2);exports.SbSignIn=fo([h("sb-signin")],exports.SbSignIn);var Sh=Object.defineProperty,$h=Object.getOwnPropertyDescriptor,vo=(e,t,r,i)=>{for(var o=i>1?void 0:i?$h(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Sh(t,r,o),o};exports.SbSignUp=class extends v{constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.providedCustomizations=null,this.__flowStarted=!1,this.__flowInitAttempted=!1}get effectiveCustomizations(){const t=this.providedCustomizations??{},r=this.customizations??{};return oo(t,r)}createRenderRoot(){return this}async waitForAuthConfigured(t=5e3){var o;const r=gt??((o=window.__saasbaseCoreSdk)==null?void 0:o.Auth);if(!r||r.__configured)return;const i=r.__whenConfigured;i&&await Promise.race([i,new Promise(s=>setTimeout(s,t))])}async connectedCallback(){var t;if(super.connectedCallback(),!this.__flowInitAttempted&&(this.__flowInitAttempted=!0,await this.waitForAuthConfigured(),!this.__flowStarted)){this.__flowStarted=!0;try{const r=await gt.startLoginflow("signup-flow");console.log(r.isResumed?"Resumed signup flow":"Started new signup flow")}catch(r){if(console.error("Sign-up flow init failed:",r),r&&typeof r.message=="string"&&r.message.includes("Auth.configure() must be called")){this.__saasbaseFailedForConfig=!0;try{const i=gt??((t=window.__saasbaseCoreSdk)==null?void 0:t.Auth),o=i==null?void 0:i.__whenConfigured;if(o){await Promise.race([o,new Promise(s=>setTimeout(s,1e4))]);try{const s=await gt.startLoginflow("signup-flow");console.log(s.isResumed?"Resumed signup flow":"Started new signup flow")}catch(s){console.error("Sign-up retry failed:",s)}}}catch{}}else this.__flowStarted=!1}}}__saasbaseRetryInit(){this.__flowStarted||(this.__flowInitAttempted=!1,this.connectedCallback())}render(){var o,s;const t=this.effectiveCustomizations,{class:r,style:i}=O("",{},(s=(o=t==null?void 0:t.byType)==null?void 0:o.loader)==null?void 0:s.linear,"",t);return console.log(""),this.renderSpec?c`
|
|
6236
6236
|
<sb-layout
|
|
6237
6237
|
.renderSpec=${this.renderSpec}
|
|
6238
6238
|
.customizations=${t}
|
|
@@ -6243,15 +6243,15 @@ body {
|
|
|
6243
6243
|
customClass=${r}
|
|
6244
6244
|
.customStyle=${i}
|
|
6245
6245
|
></linear-loader>
|
|
6246
|
-
`}};
|
|
6246
|
+
`}};vo([Ct({context:Gs,subscribe:!0})],exports.SbSignUp.prototype,"renderSpec",2);vo([l({type:Object})],exports.SbSignUp.prototype,"customizations",2);vo([Ct({context:io,subscribe:!0})],exports.SbSignUp.prototype,"providedCustomizations",2);exports.SbSignUp=vo([h("sb-signup")],exports.SbSignUp);var Ch=Object.defineProperty,Eh=Object.getOwnPropertyDescriptor,Zs=(e,t,r,i)=>{for(var o=i>1?void 0:i?Eh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Ch(t,r,o),o};exports.SbTextRenderer=class extends v{createRenderRoot(){return this}render(){var s,a;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,{...this.element.style,textAlign:this.element.properties.text_alignment},void 0,this.element.id,void 0),{base:i,responsive:o}=mt(r);return bt(this.element.id,o,((a=(s=this.component.customizations)==null?void 0:s.config)==null?void 0:a.breakpoints)??at),c`
|
|
6247
6247
|
<p id=${this.element.id} class=${t} style=${R(i)}>
|
|
6248
6248
|
${this.element.properties.content}
|
|
6249
6249
|
</p>
|
|
6250
|
-
`}};
|
|
6250
|
+
`}};Zs([l({type:Object})],exports.SbTextRenderer.prototype,"element",2);Zs([l({attribute:!1})],exports.SbTextRenderer.prototype,"component",2);exports.SbTextRenderer=Zs([h("sb-text-renderer")],exports.SbTextRenderer);/**
|
|
6251
6251
|
* @license
|
|
6252
6252
|
* Copyright 2017 Google LLC
|
|
6253
6253
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6254
|
-
*/class
|
|
6254
|
+
*/class Is extends Ji{}Is.directiveName="unsafeSVG",Is.resultType=2;const yo=eo(Is);var kh=Object.defineProperty,Rh=Object.getOwnPropertyDescriptor,wo=(e,t,r,i)=>{for(var o=i>1?void 0:i?Rh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&kh(t,r,o),o};exports.SbButtonRenderer=class extends v{constructor(){super(...arguments),this.theme=Dl(),this._onClick=()=>{this._disabled||this.component.handleEvent(this.element.properties.event,this.element)}}createRenderRoot(){return this}get _disabled(){var t;return!this.component||!this.element?!1:((t=this.element.properties.requires_valid)==null?void 0:t.some(r=>{var o;const i=this.component.findElementByKey(r);return i&&"validation"in i.properties&&((o=i.properties.validation)==null?void 0:o.on_event)!=="submit"&&!this.component.isFieldValid(r)}))??!1}get _loading(){var t,r;return((r=(t=this.component)==null?void 0:t.loadingButtons)==null?void 0:r[this.element.id])??!1}patchComponentUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...r)=>{const i=t(...r);return this.requestUpdate(),i}}observeThemeChanges(){this.observer=new MutationObserver(()=>{this.theme=Dl()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}connectedCallback(){super.connectedCallback(),this.patchComponentUpdate(),this.observeThemeChanges()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.observer)==null||t.disconnect()}_renderIcon(){const t=this.element.properties.icon_url;if(!t)return null;const r=so(t);return r?c`${yo(r)}`:null}render(){var $,_;if(!this.element)return null;const{type:t,size:r,invalid:i,href:o,target:s,text:a,icon_position:u}=this.element.properties,p=Pt(t,this.component.customizations),{class:g,style:y}=O(this.element.class,this.element.style,p,this.element.id,this.component.customizations),{base:w,responsive:C}=mt(y);return bt(this.element.id,C,((_=($=this.component.customizations)==null?void 0:$.config)==null?void 0:_.breakpoints)??at),c`
|
|
6255
6255
|
<rtg-button
|
|
6256
6256
|
variant=${t}
|
|
6257
6257
|
size=${r??f}
|
|
@@ -6268,19 +6268,19 @@ body {
|
|
|
6268
6268
|
${a}
|
|
6269
6269
|
${u!=="start"?this._renderIcon():f}
|
|
6270
6270
|
</rtg-button>
|
|
6271
|
-
`}};
|
|
6271
|
+
`}};wo([l({type:Object})],exports.SbButtonRenderer.prototype,"element",2);wo([l({attribute:!1})],exports.SbButtonRenderer.prototype,"component",2);wo([k()],exports.SbButtonRenderer.prototype,"theme",2);exports.SbButtonRenderer=wo([h("sb-button-renderer")],exports.SbButtonRenderer);/**
|
|
6272
6272
|
* @license
|
|
6273
6273
|
* Copyright 2020 Google LLC
|
|
6274
6274
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6275
|
-
*/const
|
|
6275
|
+
*/const Dd=Symbol.for(""),Oh=e=>{if((e==null?void 0:e.r)===Dd)return e==null?void 0:e._$litStatic$},Js=e=>({_$litStatic$:e,r:Dd}),Ml=new Map,Ah=e=>(t,...r)=>{const i=r.length;let o,s;const a=[],u=[];let p,g=0,y=!1;for(;g<i;){for(p=t[g];g<i&&(s=r[g],(o=Oh(s))!==void 0);)p+=o+t[++g],y=!0;g!==i&&u.push(s),a.push(p),g++}if(g===i&&a.push(t[i]),y){const w=a.join("$$lit$$");(t=Ml.get(w))===void 0&&(a.raw=a,Ml.set(w,t=a)),r=u}return e(t,...r)},Ts=Ah(c);var Ih=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,Qs=(e,t,r,i)=>{for(var o=i>1?void 0:i?Th(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Ih(t,r,o),o};exports.SbDividerRenderer=class extends v{createRenderRoot(){return this}render(){var s,a,u,p;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.element.style,(a=(s=this.component.customizations)==null?void 0:s.byType)==null?void 0:a.divider,this.element.id,this.component.customizations),{base:i,responsive:o}=mt(r);return bt(this.element.id,o,((p=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:p.breakpoints)??at),Ts`
|
|
6276
6276
|
<rtg-field-separator
|
|
6277
6277
|
id=${this.element.id}
|
|
6278
6278
|
class=${t}
|
|
6279
6279
|
style=${R(i)}
|
|
6280
6280
|
>
|
|
6281
|
-
${
|
|
6281
|
+
${Js(this.element.properties.text??"")}
|
|
6282
6282
|
</rtg-field-separator>
|
|
6283
|
-
`}};
|
|
6283
|
+
`}};Qs([l({type:Object})],exports.SbDividerRenderer.prototype,"element",2);Qs([l({attribute:!1})],exports.SbDividerRenderer.prototype,"component",2);exports.SbDividerRenderer=Qs([h("sb-divider-renderer")],exports.SbDividerRenderer);var Lh=Object.defineProperty,Ph=Object.getOwnPropertyDescriptor,tn=(e,t,r,i)=>{for(var o=i>1?void 0:i?Ph(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Lh(t,r,o),o};exports.SbCheckboxRenderer=class extends v{constructor(){super(...arguments),this._handleChange=t=>{this.element.data_key&&(this.component.handleInputChange(this.element.data_key,t),this.component.handleFocus(this.element.data_key))},this._handleFocus=()=>{this.element.data_key&&this.component.handleFocus(this.element.data_key)},this._toggleCheckboxFromLabel=()=>{const t=this.querySelector(`#${this._fieldKey}`);t&&t.click()}}createRenderRoot(){return this}get _fieldKey(){return this.element.data_key||this.element.id}get _checked(){const{data_key:t,properties:r}=this.element;return t?this.component.formData[t]??r.initial_value??!1:r.initial_value||!1}get _errors(){return this.element.data_key?this.component.errors[this.element.data_key]||[]:[]}patchComponentUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...r)=>{const i=t(...r);return this.requestUpdate(),i}}connectedCallback(){super.connectedCallback(),this.patchComponentUpdate()}_renderLabel(){var i,o,s;const{class:t,style:r}=O("",{},(s=(o=(i=this.component.customizations)==null?void 0:i.byType)==null?void 0:o.labels)==null?void 0:s.checkboxLabel,"",this.component.customizations);return c`
|
|
6284
6284
|
<rtg-field-label
|
|
6285
6285
|
for=${this._fieldKey}
|
|
6286
6286
|
class=${t}
|
|
@@ -6289,13 +6289,13 @@ body {
|
|
|
6289
6289
|
>
|
|
6290
6290
|
${this.element.properties.label}
|
|
6291
6291
|
</rtg-field-label>
|
|
6292
|
-
`}_renderError(){var i,o,s;if(this._errors.length===0)return null;const{class:t,style:r}=
|
|
6292
|
+
`}_renderError(){var i,o,s;if(this._errors.length===0)return null;const{class:t,style:r}=O("",{},(s=(o=(i=this.component.customizations)==null?void 0:i.byType)==null?void 0:o.errors)==null?void 0:s.inputError,"",this.component.customizations);return c`
|
|
6293
6293
|
<rtg-field-error
|
|
6294
6294
|
.errors=${this._errors.map(a=>({message:a}))}
|
|
6295
6295
|
class=${W("sb-basis-full",t)}
|
|
6296
6296
|
style=${R(r)}
|
|
6297
6297
|
></rtg-field-error>
|
|
6298
|
-
`}render(){var s,a;if(!this.element)return null;const{class:t,style:r}=
|
|
6298
|
+
`}render(){var s,a;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.element.style,void 0,this.element.id,this.component.customizations),{base:i,responsive:o}=mt(r);return bt(this.element.id,o,((a=(s=this.component.customizations)==null?void 0:s.config)==null?void 0:a.breakpoints)??at),c`
|
|
6299
6299
|
<rtg-field
|
|
6300
6300
|
orientation="horizontal"
|
|
6301
6301
|
?invalid=${this._errors.length>0}
|
|
@@ -6314,7 +6314,7 @@ body {
|
|
|
6314
6314
|
${this._renderLabel()}
|
|
6315
6315
|
${this._renderError()}
|
|
6316
6316
|
</rtg-field>
|
|
6317
|
-
`}};
|
|
6317
|
+
`}};tn([l({type:Object})],exports.SbCheckboxRenderer.prototype,"element",2);tn([l({attribute:!1})],exports.SbCheckboxRenderer.prototype,"component",2);exports.SbCheckboxRenderer=tn([h("sb-checkbox-renderer")],exports.SbCheckboxRenderer);var zh=Object.defineProperty,jh=Object.getOwnPropertyDescriptor,Bd=(e,t,r,i)=>{for(var o=i>1?void 0:i?jh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&zh(t,r,o),o};exports.SbError=class extends v{constructor(){super(...arguments),this.content=""}createRenderRoot(){return this}render(){return c`<p>${this.content}</p>`}};Bd([l({type:String})],exports.SbError.prototype,"content",2);exports.SbError=Bd([h("sb-error")],exports.SbError);var Nh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,Fd=(e,t,r,i)=>{for(var o=i>1?void 0:i?Uh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Nh(t,r,o),o};exports.SbHint=class extends v{constructor(){super(...arguments),this.content=""}createRenderRoot(){return this}render(){return c`<p class="sb-mt-2">${this.content}</p>`}};Fd([l({type:String})],exports.SbHint.prototype,"content",2);exports.SbHint=Fd([h("sb-hint")],exports.SbHint);var Dh=Object.defineProperty,Bh=Object.getOwnPropertyDescriptor,zr=(e,t,r,i)=>{for(var o=i>1?void 0:i?Bh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Dh(t,r,o),o};exports.SbWatermark=class extends v{constructor(){super(...arguments),this.label="Powered by",this.image_url="",this.content="",this.customId="",this.fontSize="12px"}render(){const t=so(this.image_url);return c`
|
|
6318
6318
|
<style>
|
|
6319
6319
|
#${this.customId} {
|
|
6320
6320
|
display: flex;
|
|
@@ -6341,13 +6341,13 @@ body {
|
|
|
6341
6341
|
>
|
|
6342
6342
|
<p style="font-size: ${this.fontSize};">${this.label}</p>
|
|
6343
6343
|
<span style="margin-top: 8px">
|
|
6344
|
-
${t?
|
|
6345
|
-
src=${
|
|
6344
|
+
${t?yo(t):c`<img
|
|
6345
|
+
src=${Ud(this.image_url)}
|
|
6346
6346
|
alt="watermark"
|
|
6347
6347
|
/>`}
|
|
6348
6348
|
</span>
|
|
6349
6349
|
</div>
|
|
6350
|
-
`}};
|
|
6350
|
+
`}};zr([l()],exports.SbWatermark.prototype,"label",2);zr([l()],exports.SbWatermark.prototype,"image_url",2);zr([l({type:String})],exports.SbWatermark.prototype,"content",2);zr([l({type:String})],exports.SbWatermark.prototype,"customId",2);zr([l({type:String})],exports.SbWatermark.prototype,"fontSize",2);exports.SbWatermark=zr([h("sb-watermark")],exports.SbWatermark);var Fh=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,jr=(e,t,r,i)=>{for(var o=i>1?void 0:i?Mh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Fh(t,r,o),o};exports.SbSpinner=class extends v{constructor(){super(...arguments),this.size=16,this.strokeWidth=2,this.color="currentColor",this.label="Loading…",this.duration=1}createRenderRoot(){return this}render(){const t=Math.max(0,(this.size-this.strokeWidth)/2),r=2*Math.PI*t,i=t-this.strokeWidth/2;return c`
|
|
6351
6351
|
<style>
|
|
6352
6352
|
.chrome-spinner {
|
|
6353
6353
|
width: ${this.size}px;
|
|
@@ -6416,28 +6416,43 @@ body {
|
|
|
6416
6416
|
></circle>
|
|
6417
6417
|
</svg>
|
|
6418
6418
|
${this.label?c`<span class="sr-only">${this.label}</span>`:null}
|
|
6419
|
-
`}};
|
|
6419
|
+
`}};jr([l({type:Number})],exports.SbSpinner.prototype,"size",2);jr([l({type:Number,attribute:"stroke-width"})],exports.SbSpinner.prototype,"strokeWidth",2);jr([l()],exports.SbSpinner.prototype,"color",2);jr([l()],exports.SbSpinner.prototype,"label",2);jr([l({type:Number})],exports.SbSpinner.prototype,"duration",2);exports.SbSpinner=jr([h("sb-spinner")],exports.SbSpinner);var qh=Object.defineProperty,Hh=Object.getOwnPropertyDescriptor,en=(e,t,r,i)=>{for(var o=i>1?void 0:i?Hh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&qh(t,r,o),o};exports.LinearLoader=class extends v{constructor(){super(...arguments),this.customClass="",this.customStyle={}}createRenderRoot(){return this}render(){return c`
|
|
6420
6420
|
<div
|
|
6421
6421
|
class=${W(Xu,this.customClass)}
|
|
6422
6422
|
style=${R(this.customStyle)}
|
|
6423
6423
|
></div>
|
|
6424
|
-
`}};
|
|
6424
|
+
`}};en([l({type:String})],exports.LinearLoader.prototype,"customClass",2);en([l({type:Object})],exports.LinearLoader.prototype,"customStyle",2);exports.LinearLoader=en([h("linear-loader")],exports.LinearLoader);var Vh=Object.defineProperty,Wh=Object.getOwnPropertyDescriptor,Ht=(e,t,r,i)=>{for(var o=i>1?void 0:i?Wh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Vh(t,r,o),o};exports.SbOtp=class extends v{constructor(){super(...arguments),this.variant="with_separator",this.length=6,this.timeout=300,this.dataKey="",this.event="",this.resendText="",this.resendButtonText="",this.resendEvent="",this.id="otp",this.handleComplete=t=>{var r,i;this.dataKey&&((r=this.component)==null||r.handleInputChange(this.dataKey,t),this.event&&((i=this.component)==null||i.handleEvent(this.event,{id:this.id,element_type:"otp"})))},this.handleFocus=()=>{var t;this.dataKey&&((t=this.component)==null||t.handleFocus(this.dataKey,this.id))},this.handleBlur=()=>{var t;this.dataKey&&((t=this.component)==null||t.handleBlur(this.dataKey))},this.handleResend=()=>{var t;this.resendEvent&&((t=this.component)==null||t.handleEvent(this.resendEvent,{id:this.id,element_type:"otp"}))}}createRenderRoot(){return this}patchComponentRequestUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...r)=>{const i=t(...r);return this.requestUpdate(),i}}connectedCallback(){super.connectedCallback(),this.patchComponentRequestUpdate()}buildOTPContentHTML(){const t=this.variant,r=this.length,i=(a,u)=>Array.from({length:u-a},(p,g)=>`<rtg-input-otp-slot index="${a+g}"></rtg-input-otp-slot>`).join(""),o=a=>`<rtg-input-otp-group>${a}</rtg-input-otp-group>`,s="<rtg-input-otp-separator></rtg-input-otp-separator>";if(t==="simple"){const a=Math.ceil(r/2);return o(i(0,a))+s+o(i(a,r))}if(t==="with_separator"){const a=Math.ceil(r/3);return o(i(0,a))+s+o(i(a,a*2))+s+o(i(a*2,r))}return t==="with_spacing"?Array.from({length:r},(a,u)=>o(`<rtg-input-otp-slot index="${u}"></rtg-input-otp-slot>`)).join(""):o(i(0,r))}render(){var a,u,p,g,y;if(!this.component)return null;const{class:t,style:r}=O(this.classList.value,this.style,(p=(u=(a=this.component.customizations)==null?void 0:a.byType)==null?void 0:u.inputs)==null?void 0:p.inputField,this.id,this.component.customizations),{base:i,responsive:o}=mt(r);bt(this.id,o,((y=(g=this.component.customizations)==null?void 0:g.config)==null?void 0:y.breakpoints)??at);const s=this.variant||"digits_only";return Ts`
|
|
6425
6425
|
<rtg-input-otp
|
|
6426
|
-
id=${this.
|
|
6427
|
-
name=${this.
|
|
6428
|
-
maxlength=${this.
|
|
6426
|
+
id=${this.dataKey??this.id??f}
|
|
6427
|
+
name=${this.dataKey??this.id??f}
|
|
6428
|
+
maxlength=${this.length}
|
|
6429
6429
|
pattern=${s==="digits_only"?"\\d+":f}
|
|
6430
|
-
.value=${this.
|
|
6431
|
-
data-key=${this.
|
|
6430
|
+
.value=${this.dataKey&&this.component.formData[this.dataKey]||""}
|
|
6431
|
+
data-key=${this.dataKey||""}
|
|
6432
6432
|
class=${t}
|
|
6433
6433
|
style=${R(i)}
|
|
6434
|
-
.onComplete=${this.
|
|
6435
|
-
.onFocus=${this.
|
|
6436
|
-
.onBlur=${this.
|
|
6437
|
-
|
|
6438
|
-
|
|
6434
|
+
.onComplete=${this.handleComplete}
|
|
6435
|
+
.onFocus=${this.handleFocus}
|
|
6436
|
+
.onBlur=${this.handleBlur}
|
|
6437
|
+
>
|
|
6438
|
+
${Js(this.buildOTPContentHTML())}
|
|
6439
|
+
</rtg-input-otp>
|
|
6440
|
+
|
|
6441
|
+
${this.resendButtonText?Ts`
|
|
6442
|
+
<div class="sb-kit-otp-resend">
|
|
6443
|
+
<span class="sb-kit-otp-resend-text"> ${this.resendText} </span>
|
|
6444
|
+
|
|
6445
|
+
<button
|
|
6446
|
+
class="sb-kit-otp-resend-button"
|
|
6447
|
+
@click=${this.handleResend}
|
|
6448
|
+
>
|
|
6449
|
+
${this.resendButtonText}
|
|
6450
|
+
</button>
|
|
6451
|
+
</div>
|
|
6452
|
+
`:f}
|
|
6453
|
+
`}};Ht([l()],exports.SbOtp.prototype,"variant",2);Ht([l({type:Number})],exports.SbOtp.prototype,"length",2);Ht([l({type:Number})],exports.SbOtp.prototype,"timeout",2);Ht([l({attribute:"data-key"})],exports.SbOtp.prototype,"dataKey",2);Ht([l()],exports.SbOtp.prototype,"event",2);Ht([l({attribute:"resend-text"})],exports.SbOtp.prototype,"resendText",2);Ht([l({attribute:"resend-button-text"})],exports.SbOtp.prototype,"resendButtonText",2);Ht([l({attribute:"resend-event"})],exports.SbOtp.prototype,"resendEvent",2);Ht([l()],exports.SbOtp.prototype,"id",2);Ht([l({attribute:!1})],exports.SbOtp.prototype,"component",2);exports.SbOtp=Ht([h("sb-otp")],exports.SbOtp);var Gh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,rn=(e,t,r,i)=>{for(var o=i>1?void 0:i?Kh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Gh(t,r,o),o};exports.SbErrorRenderer=class extends v{createRenderRoot(){return this}_renderIcon(){const t=this.element.properties.icon_url;if(!t)return null;const r=so(t);return r?c`${yo(r)}`:null}_renderTitle(){const{title:t}=this.element.properties;return t?c`<rtg-alert-title>${t}</rtg-alert-title>`:null}_renderDescription(){const{description:t,message:r}=this.element.properties;return!t&&!r?null:c`
|
|
6439
6454
|
<rtg-alert-description>${t??r}</rtg-alert-description>
|
|
6440
|
-
`}render(){var s,a,u,p,g;if(!this.element)return null;const{class:t,style:r}=
|
|
6455
|
+
`}render(){var s,a,u,p,g;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.element.style,(u=(a=(s=this.component.customizations)==null?void 0:s.byType)==null?void 0:a.errors)==null?void 0:u.serviceError,this.element.id,this.component.customizations),{base:i,responsive:o}=mt(r);return bt(this.element.id,o,((g=(p=this.component.customizations)==null?void 0:p.config)==null?void 0:g.breakpoints)??at),c`
|
|
6441
6456
|
<rtg-alert
|
|
6442
6457
|
variant=${this.element.properties.variant??"destructive"}
|
|
6443
6458
|
class=${t??f}
|
|
@@ -6447,21 +6462,21 @@ body {
|
|
|
6447
6462
|
${this._renderTitle()}
|
|
6448
6463
|
${this._renderDescription()}
|
|
6449
6464
|
</rtg-alert>
|
|
6450
|
-
`}};
|
|
6465
|
+
`}};rn([l({type:Object})],exports.SbErrorRenderer.prototype,"element",2);rn([l({attribute:!1})],exports.SbErrorRenderer.prototype,"component",2);exports.SbErrorRenderer=rn([h("sb-error-renderer")],exports.SbErrorRenderer);var Yh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,on=(e,t,r,i)=>{for(var o=i>1?void 0:i?Xh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Yh(t,r,o),o};exports.SbHtmlRenderer=class extends v{constructor(){super(...arguments),this._onClick=t=>{if(!this.component||!this.element)return;const r=t.composedPath().find(i=>{var o;return i instanceof HTMLElement&&((o=i.dataset)==null?void 0:o.event)});r!=null&&r.dataset.event&&this.component.handleEvent(r.dataset.event,this.element)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._onClick)}render(){var s,a;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.element.style,void 0,this.element.id,void 0),{base:i,responsive:o}=mt(r);return bt(this.element.id,o,((a=(s=this.component.customizations)==null?void 0:s.config)==null?void 0:a.breakpoints)??at),c`
|
|
6451
6466
|
<div id=${this.element.id} class=${t} style=${R(i)}>
|
|
6452
|
-
${
|
|
6467
|
+
${Ds(Gp(this.element.properties.content))}
|
|
6453
6468
|
</div>
|
|
6454
|
-
`}};
|
|
6469
|
+
`}};on([l({type:Object})],exports.SbHtmlRenderer.prototype,"element",2);on([l({attribute:!1})],exports.SbHtmlRenderer.prototype,"component",2);exports.SbHtmlRenderer=on([h("sb-html-renderer")],exports.SbHtmlRenderer);var Zh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,sn=(e,t,r,i)=>{for(var o=i>1?void 0:i?Jh(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Zh(t,r,o),o};exports.SbGapRenderer=class extends v{createRenderRoot(){return this}render(){var u,p;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.element.style,void 0,this.element.id,void 0),i=this.element.style?this.element.style["flex-grow"]:"0";i!=null&&this.style.setProperty("flex-grow",String(i));let o={width:"0px",height:"0px"};this.element.properties.type==="vertical"?o={width:"1px",height:this.element.properties.size}:o={height:"1px",width:this.element.properties.size};const{base:s,responsive:a}=mt(r);return bt(this.element.id,a,((p=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:p.breakpoints)??at),c`
|
|
6455
6470
|
<div
|
|
6456
6471
|
id=${this.element.id}
|
|
6457
6472
|
class=${t}
|
|
6458
6473
|
style=${R({...s,...o})}
|
|
6459
6474
|
></div>
|
|
6460
|
-
`}};
|
|
6475
|
+
`}};sn([l({type:Object})],exports.SbGapRenderer.prototype,"element",2);sn([l({attribute:!1})],exports.SbGapRenderer.prototype,"component",2);exports.SbGapRenderer=sn([h("sb-gap-renderer")],exports.SbGapRenderer);var Qh=Object.defineProperty,tg=Object.getOwnPropertyDescriptor,xo=(e,t,r,i)=>{for(var o=i>1?void 0:i?tg(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Qh(t,r,o),o};exports.SbCountdownRenderer=class extends v{constructor(){super(...arguments),this.seconds=0,this.timerId=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){var r;const t=((r=this.element)==null?void 0:r.properties.duration)??5;this.seconds=Math.max(0,t),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer();const t=this.element.properties.redirect_url??"/";window.location.href=t}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.element.properties.content??""} ${this.seconds}s...`}render(){var s,a,u,p,g;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.element.style,(u=(a=(s=this.component.customizations)==null?void 0:s.byType)==null?void 0:a.timer)==null?void 0:u.countdowns,this.element.id,this.component.customizations),{base:i,responsive:o}=mt(r);return bt(this.element.id,o,((g=(p=this.component.customizations)==null?void 0:p.config)==null?void 0:g.breakpoints)??at),c`
|
|
6461
6476
|
<div id=${this.element.id} class=${t} style=${R(i)}>
|
|
6462
6477
|
<span>${this.renderContent()}</span>
|
|
6463
6478
|
</div>
|
|
6464
|
-
`}};
|
|
6479
|
+
`}};xo([l({type:Object})],exports.SbCountdownRenderer.prototype,"element",2);xo([l({attribute:!1})],exports.SbCountdownRenderer.prototype,"component",2);xo([k()],exports.SbCountdownRenderer.prototype,"seconds",2);exports.SbCountdownRenderer=xo([h("sb-countdown-renderer")],exports.SbCountdownRenderer);var eg=Object.defineProperty,rg=Object.getOwnPropertyDescriptor,nn=(e,t,r,i)=>{for(var o=i>1?void 0:i?rg(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&eg(t,r,o),o};exports.SbSpinnerRenderer=class extends v{createRenderRoot(){return this}render(){var s,a,u,p,g;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.element.style,(u=(a=(s=this.component.customizations)==null?void 0:s.byType)==null?void 0:a.loader)==null?void 0:u.spinner,this.element.id,this.component.customizations),{base:i,responsive:o}=mt(r);return bt(this.element.id,o,((g=(p=this.component.customizations)==null?void 0:p.config)==null?void 0:g.breakpoints)??at),c`
|
|
6465
6480
|
<sb-spinner
|
|
6466
6481
|
size="20"
|
|
6467
6482
|
stroke-width="2"
|
|
@@ -6470,30 +6485,34 @@ body {
|
|
|
6470
6485
|
class=${t}
|
|
6471
6486
|
style=${R(i)}
|
|
6472
6487
|
></sb-spinner>
|
|
6473
|
-
`}};
|
|
6488
|
+
`}};nn([l({type:Object})],exports.SbSpinnerRenderer.prototype,"element",2);nn([l({attribute:!1})],exports.SbSpinnerRenderer.prototype,"component",2);exports.SbSpinnerRenderer=nn([h("sb-spinner-renderer")],exports.SbSpinnerRenderer);function an(e,t,r="light"){if(!t)return c``;if(typeof t=="string")return c`${Js(t)}`;const i=t.hidden??!1;switch(t.element_type){case"container":return c`<sb-container-renderer
|
|
6474
6489
|
.component=${e}
|
|
6475
6490
|
.element=${t}
|
|
6476
6491
|
?hidden=${i}
|
|
6477
|
-
></sb-container-renderer>`;case"
|
|
6492
|
+
></sb-container-renderer>`;case"otp":return c`<sb-otp-renderer
|
|
6478
6493
|
.component=${e}
|
|
6479
6494
|
.element=${t}
|
|
6480
6495
|
?hidden=${i}
|
|
6481
|
-
></sb-
|
|
6496
|
+
></sb-otp-renderer>`;case"logo":return c`<sb-logo-renderer
|
|
6497
|
+
.component=${e}
|
|
6482
6498
|
.element=${t}
|
|
6483
6499
|
?hidden=${i}
|
|
6500
|
+
></sb-logo-renderer>`;case"input":return c`<sb-input-renderer
|
|
6484
6501
|
.component=${e}
|
|
6485
|
-
></sb-input-renderer>`;case"image":return c`<sb-image-renderer
|
|
6486
|
-
?hidden=${i}
|
|
6487
6502
|
.element=${t}
|
|
6488
|
-
.component=${e}
|
|
6489
|
-
></sb-image-renderer>`;case"gap":return c`<sb-gap-renderer
|
|
6490
6503
|
?hidden=${i}
|
|
6504
|
+
></sb-input-renderer>`;case"image":return c`<sb-image-renderer
|
|
6491
6505
|
.component=${e}
|
|
6492
6506
|
.element=${t}
|
|
6493
|
-
></sb-gap-renderer>`;case"text":return c`<sb-text-renderer
|
|
6494
6507
|
?hidden=${i}
|
|
6508
|
+
></sb-image-renderer>`;case"gap":return c`<sb-gap-renderer
|
|
6509
|
+
.component=${e}
|
|
6495
6510
|
.element=${t}
|
|
6511
|
+
?hidden=${i}
|
|
6512
|
+
></sb-gap-renderer>`;case"text":return c`<sb-text-renderer
|
|
6496
6513
|
.component=${e}
|
|
6514
|
+
.element=${t}
|
|
6515
|
+
?hidden=${i}
|
|
6497
6516
|
></sb-text-renderer>`;case"button":return c`<sb-button-renderer
|
|
6498
6517
|
.component=${e}
|
|
6499
6518
|
.element=${t}
|
|
@@ -6514,11 +6533,7 @@ body {
|
|
|
6514
6533
|
.component=${e}
|
|
6515
6534
|
.element=${t}
|
|
6516
6535
|
?hidden=${i}
|
|
6517
|
-
></sb-error-renderer>`;case"
|
|
6518
|
-
.component=${e}
|
|
6519
|
-
.element=${t}
|
|
6520
|
-
?hidden=${i}
|
|
6521
|
-
></sb-html-renderer>`;case"watermark":return c`<sb-watermark-renderer
|
|
6536
|
+
></sb-error-renderer>`;case"watermark":return c`<sb-watermark-renderer
|
|
6522
6537
|
.element=${t}
|
|
6523
6538
|
></sb-watermark-renderer>`;case"spinner":return c`<sb-spinner-renderer
|
|
6524
6539
|
.component=${e}
|
|
@@ -6532,44 +6547,44 @@ body {
|
|
|
6532
6547
|
.component=${e}
|
|
6533
6548
|
.element=${t}
|
|
6534
6549
|
?hidden=${i}
|
|
6535
|
-
></sb-countdown-renderer>`;default:return c`<p>Unknown element type
|
|
6550
|
+
></sb-countdown-renderer>`;default:return c`<p>Unknown element type</p>`}}var ig=Object.defineProperty,og=Object.getOwnPropertyDescriptor,ln=(e,t,r,i)=>{for(var o=i>1?void 0:i?og(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&ig(t,r,o),o};exports.SbContainerRenderer=class extends v{constructor(){super(...arguments),this.prevChildCount=0,this.prevContainerWidth=0,this.widthUpdateScheduled=!1}async firstUpdated(t){await this.updateComplete,await As(),this.updateWidthsIfNeeded()}async updated(t){await this.updateComplete,await As(),this.updateWidthsIfNeeded()}updateWidthsIfNeeded(){var o,s;if(!((s=(o=this.element)==null?void 0:o.class)!=null&&s.includes("sb_social_wrap")))return;const t=Array.from(this.querySelectorAll("sb-button-renderer")),r=t.length,i=this.offsetWidth;r===this.prevChildCount&&i===this.prevContainerWidth||(this.prevChildCount=r,this.prevContainerWidth=i,this.widthUpdateScheduled||(this.widthUpdateScheduled=!0,Wp(this.querySelector("div"),t).finally(()=>{this.widthUpdateScheduled=!1})))}createRenderRoot(){return this}get containerStyles(){const t=this.element.properties.type==="flex_column";return{...this.element.style,display:"flex","flex-direction":t?"column":"row"}}renderChildren(){return this.element.properties.children?this.element.properties.children.map(t=>an(this.component,t)):f}render(){var s,a,u,p;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.containerStyles,(a=(s=this.component.customizations)==null?void 0:s.byType)==null?void 0:a.container,this.element.id,this.component.customizations,!0),{base:i,responsive:o}=mt(r);return bt(this.element.id,o,((p=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:p.breakpoints)??at),c`
|
|
6536
6551
|
<div id=${this.element.id} class=${t} style=${R(i)}>
|
|
6537
6552
|
${this.renderChildren()}
|
|
6538
6553
|
</div>
|
|
6539
|
-
`}};
|
|
6554
|
+
`}};ln([l({type:Object})],exports.SbContainerRenderer.prototype,"element",2);ln([l({attribute:!1})],exports.SbContainerRenderer.prototype,"component",2);exports.SbContainerRenderer=ln([h("sb-container-renderer")],exports.SbContainerRenderer);var sg=Object.defineProperty,ng=Object.getOwnPropertyDescriptor,_o=(e,t,r,i)=>{for(var o=i>1?void 0:i?ng(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&sg(t,r,o),o};exports.SbImage=class extends v{constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){var a,u;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.element.style,void 0,this.element.id,void 0),i=Ys(this.element.properties.image_url,this.theme),{base:o,responsive:s}=mt(r);return bt(this.element.id,s,((u=(a=this.component.customizations)==null?void 0:a.config)==null?void 0:u.breakpoints)??at),c`
|
|
6540
6555
|
<img class=${t} src=${i} style=${R(o)} />
|
|
6541
|
-
`}};
|
|
6556
|
+
`}};_o([l({type:Object})],exports.SbImage.prototype,"element",2);_o([l({attribute:!1})],exports.SbImage.prototype,"component",2);_o([k()],exports.SbImage.prototype,"theme",2);exports.SbImage=_o([h("sb-image")],exports.SbImage);var ag=Object.defineProperty,lg=Object.getOwnPropertyDescriptor,dn=(e,t,r,i)=>{for(var o=i>1?void 0:i?lg(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&ag(t,r,o),o};exports.SbWatermarkRenderer=class extends v{constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){if(!this.element)return null;const{class:t}=O(this.element.class,void 0,void 0,this.element.id,void 0),r=Ys(this.element.properties.image_url,this.theme);return c`
|
|
6542
6557
|
<sb-watermark
|
|
6543
6558
|
customId=${this.element.id}
|
|
6544
|
-
class=${W(t,
|
|
6559
|
+
class=${W(t,Ws)}
|
|
6545
6560
|
label=${this.element.properties.label}
|
|
6546
6561
|
image_url=${r}
|
|
6547
6562
|
></sb-watermark>
|
|
6548
|
-
`}};
|
|
6563
|
+
`}};dn([l({type:Object})],exports.SbWatermarkRenderer.prototype,"element",2);dn([k()],exports.SbWatermarkRenderer.prototype,"theme",2);exports.SbWatermarkRenderer=dn([h("sb-watermark-renderer")],exports.SbWatermarkRenderer);var dg=Object.defineProperty,cg=Object.getOwnPropertyDescriptor,So=(e,t,r,i)=>{for(var o=i>1?void 0:i?cg(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&dg(t,r,o),o};exports.SbLogoRenderer=class extends v{constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.style.display="grid",this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){var u,p,g,y;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.element.style,(p=(u=this.component.customizations)==null?void 0:u.byType)==null?void 0:p.logo,this.element.id,this.component.customizations),{base:i,responsive:o}=mt(r);bt(this.element.id,o,((y=(g=this.component.customizations)==null?void 0:g.config)==null?void 0:y.breakpoints)??at);const s=Ys(this.element.properties.image_url,this.theme),a=s?so(s):null;return a?c`
|
|
6549
6564
|
<div class=${t} style=${R(i)}>
|
|
6550
|
-
${
|
|
6565
|
+
${yo(a)}
|
|
6551
6566
|
</div>
|
|
6552
6567
|
`:c`
|
|
6553
6568
|
<img
|
|
6554
6569
|
class=${t}
|
|
6555
6570
|
style=${R(i)}
|
|
6556
|
-
src=${
|
|
6571
|
+
src=${Ud(s)}
|
|
6557
6572
|
/>
|
|
6558
|
-
`}};
|
|
6573
|
+
`}};So([l({type:Object})],exports.SbLogoRenderer.prototype,"element",2);So([l({attribute:!1})],exports.SbLogoRenderer.prototype,"component",2);So([k()],exports.SbLogoRenderer.prototype,"theme",2);exports.SbLogoRenderer=So([h("sb-logo-renderer")],exports.SbLogoRenderer);var ug=Object.defineProperty,pg=Object.getOwnPropertyDescriptor,cn=(e,t,r,i)=>{for(var o=i>1?void 0:i?pg(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&ug(t,r,o),o};exports.SbInputRenderer=class extends v{constructor(){super(...arguments),this._onInput=t=>{const r=this.element.data_key;r&&this.component.handleInputChange(r,t.target.value)},this._onFocus=()=>{this.element.data_key&&this.component.handleFocus(this.element.data_key)},this._onBlur=()=>{const t=this.element.data_key;t&&this.component.handleBlur(t)}}createRenderRoot(){return this}get _key(){return this.element.data_key||this.element.id}get _errors(){return this.element.data_key?this.component.errors[this.element.data_key]||[]:[]}get _invalid(){return this._errors.length>0}patchComponentRequestUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...r)=>{const i=t(...r);return this.requestUpdate(),i}}_initValue(){this.element.data_key&&this.element.properties.initial_value&&this.component.handleInputChange(this.element.data_key,this.element.properties.initial_value)}connectedCallback(){super.connectedCallback(),this.patchComponentRequestUpdate()}updated(t){t.has("element")&&this._initValue()}_renderLabel(){var o,s,a;const{label:t}=this.element.properties;if(!t)return null;const{class:r,style:i}=O("",{},(a=(s=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:s.inputs)==null?void 0:a.inputLabel,this.element.id,this.component.customizations);return c`
|
|
6559
6574
|
<rtg-field-label for=${this._key} class=${r} style=${i}>
|
|
6560
6575
|
${t}
|
|
6561
6576
|
</rtg-field-label>
|
|
6562
|
-
`}_renderHint(){var o,s,a;const{hint:t}=this.element.properties;if(!t)return null;const{class:r,style:i}=
|
|
6577
|
+
`}_renderHint(){var o,s,a;const{hint:t}=this.element.properties;if(!t)return null;const{class:r,style:i}=O("",{},(a=(s=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:s.inputs)==null?void 0:a.inputHint,this.element.id,this.component.customizations);return c`
|
|
6563
6578
|
<rtg-field-description class=${r} style=${i}>
|
|
6564
6579
|
${t}
|
|
6565
6580
|
</rtg-field-description>
|
|
6566
|
-
`}_renderError(){var i,o,s;const{class:t,style:r}=
|
|
6581
|
+
`}_renderError(){var i,o,s;const{class:t,style:r}=O("",{},(s=(o=(i=this.component.customizations)==null?void 0:i.byType)==null?void 0:o.inputs)==null?void 0:s.inputError,this.element.id,this.component.customizations);return c`
|
|
6567
6582
|
<rtg-field-error
|
|
6568
6583
|
.errors=${this._errors.map(a=>({message:a}))}
|
|
6569
6584
|
class=${t}
|
|
6570
6585
|
style=${r}
|
|
6571
6586
|
></rtg-field-error>
|
|
6572
|
-
`}render(){var p,g,y,w,C,$,_,E;if(!this.element)return null;const{class:t,style:r}=
|
|
6587
|
+
`}render(){var p,g,y,w,C,$,_,E;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.element.style,(y=(g=(p=this.component.customizations)==null?void 0:p.byType)==null?void 0:g.inputs)==null?void 0:y.inputContainer,this.element.id,this.component.customizations),{base:i,responsive:o}=mt(r);bt(this.element.id,o,((C=(w=this.component.customizations)==null?void 0:w.config)==null?void 0:C.breakpoints)??at);const{class:s,style:a}=O("",{},(E=(_=($=this.component.customizations)==null?void 0:$.byType)==null?void 0:_.inputs)==null?void 0:E.inputField,this.element.id,this.component.customizations),u=this.element.data_key?this.component.formData[this.element.data_key]:"";return c`
|
|
6573
6588
|
<rtg-field
|
|
6574
6589
|
?invalid=${this._invalid}
|
|
6575
6590
|
class=${t}
|
|
@@ -6593,7 +6608,7 @@ body {
|
|
|
6593
6608
|
></rtg-input>
|
|
6594
6609
|
${this._invalid?this._renderError():this._renderHint()}
|
|
6595
6610
|
</rtg-field>
|
|
6596
|
-
`}};
|
|
6611
|
+
`}};cn([l({type:Object})],exports.SbInputRenderer.prototype,"element",2);cn([l({attribute:!1})],exports.SbInputRenderer.prototype,"component",2);exports.SbInputRenderer=cn([h("sb-input-renderer")],exports.SbInputRenderer);var hg=Object.defineProperty,gg=Object.getOwnPropertyDescriptor,un=(e,t,r,i)=>{for(var o=i>1?void 0:i?gg(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&hg(t,r,o),o};exports.SbLabelRenderer=class extends v{createRenderRoot(){return this}render(){var s,a,u,p,g;if(!this.element)return null;const{class:t,style:r}=O(this.element.class,this.element.style,(u=(a=(s=this.component.customizations)==null?void 0:s.byType)==null?void 0:a.labels)==null?void 0:u.inputLabel,this.element.id,this.component.customizations),{base:i,responsive:o}=mt(r);return bt(this.element.id,o,((g=(p=this.component.customizations)==null?void 0:p.config)==null?void 0:g.breakpoints)??at),c`
|
|
6597
6612
|
<rtg-label
|
|
6598
6613
|
for=${this.element.properties.for??f}
|
|
6599
6614
|
class=${t??f}
|
|
@@ -6601,7 +6616,7 @@ body {
|
|
|
6601
6616
|
>
|
|
6602
6617
|
${this.element.properties.content}
|
|
6603
6618
|
</rtg-label>
|
|
6604
|
-
`}};
|
|
6619
|
+
`}};un([l({type:Object})],exports.SbLabelRenderer.prototype,"element",2);un([l({attribute:!1})],exports.SbLabelRenderer.prototype,"component",2);exports.SbLabelRenderer=un([h("sb-label-renderer")],exports.SbLabelRenderer);var mg=Object.defineProperty,bg=Object.getOwnPropertyDescriptor,Ee=(e,t,r,i)=>{for(var o=i>1?void 0:i?bg(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&mg(t,r,o),o};exports.SaasBaseLayout=class extends v{constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.formData={},this.errors={},this._prevErrors={},this.loadingButtons={},this.eventEmitting=!1,this.theme=this.getTheme(),this.prevHeight=0,this.resizeRAF=null,this.isAnimating=!1}createRenderRoot(){return this}getTheme(){return document.documentElement.getAttribute("data-theme")}firstUpdated(t){this.hydrateSbComponents()}updated(t){this.hydrateSbComponents(),t.has("renderSpec")&&this.renderSpec&&(this.formData=this.collectDataKeys(this.renderSpec.root_container)),JSON.stringify(this._prevErrors)!==JSON.stringify(this.errors)&&Promise.resolve().then(()=>this.animateHeight()),this._prevErrors={...this.errors}}hydrateSbComponents(){const t=this.renderRoot;if(!t)return;t.querySelectorAll("sb-otp").forEach(i=>{const o=i;o.__hydrated||(o.component=this,o.__hydrated=!0)})}_findSubmitButton(t){const r=i=>{if(i.element_type==="button"&&i.properties.submit===!0)return i;if(i.element_type==="container")for(const o of i.properties.children){const s=r(o);if(s)return s}return null};return r(t)}_wrapSubmitButtons(t){return t}render(){var s,a,u;const{class:t,style:r}=O("",{},(u=(a=(s=this.customizations)==null?void 0:s.byType)==null?void 0:a.loader)==null?void 0:u.linear,"",this.customizations);if(!this.renderSpec)return c`<linear-loader
|
|
6605
6620
|
class="sb-fixed sb-w-full sb-top-0 sb-left-0"
|
|
6606
6621
|
customClass=${t}
|
|
6607
6622
|
.customStyle=${r}
|
|
@@ -6620,12 +6635,12 @@ body {
|
|
|
6620
6635
|
.customStyle=${r}
|
|
6621
6636
|
></linear-loader>
|
|
6622
6637
|
`:f}
|
|
6623
|
-
${this._wrapSubmitButtons(
|
|
6638
|
+
${this._wrapSubmitButtons(an(this,this.renderSpec.root_container,this.theme))}
|
|
6624
6639
|
</div>
|
|
6625
6640
|
</form>
|
|
6626
|
-
`}async _onSubmit(t,r){t.preventDefault();const i=t.submitter;if(!i||!r||this.loadingButtons[r]||i.id!==r)return;const o=this._findButtonById(r);o&&await this.handleEvent(o.properties.event,o)}_findButtonById(t){const r=i=>{if(i.element_type==="button"&&i.id===t)return i;if(i.element_type==="container")for(const o of i.properties.children){const s=r(o);if(s)return s}return null};return this.renderSpec?r(this.renderSpec.root_container):null}animateHeight(){var p,g;const r=(((g=(p=this.customizations)==null?void 0:p.config)==null?void 0:g.breakpoints)??at).sm,i=r?parseInt(r.toString().replace(/\D/g,""),10):640;if(window.innerWidth<=i)return;const s=this.renderRoot.querySelector("#root-container");if(!s)return;const a=s.scrollHeight;if(this.prevHeight===0){this.prevHeight=a,s.style.height="auto";return}if(a===this.prevHeight||this.isAnimating)return;const u=Math.abs(a-this.prevHeight);this.isAnimating=!0,this.resizeRAF&&cancelAnimationFrame(this.resizeRAF),this.resizeRAF=requestAnimationFrame(()=>{const y=Math.min(600,Math.max(200,u*1));s.style.transition="none",s.style.height=this.prevHeight+"px",s.offsetHeight,s.style.transition=`height ${y}ms ease`,s.style.height=a+"px";const w=()=>{s.style.transition="",s.style.height="auto",this.prevHeight=s.scrollHeight,this.isAnimating=!1};let C=!1;const $=()=>{C||(C=!0,w())};s.addEventListener("transitionend",$,{once:!0}),setTimeout($,y)})}collectDataKeys(t){const r={},i=o=>{if(o&&((o.element_type==="input"||o.element_type==="checkbox"||o.element_type==="otp")&&o.data_key&&!o.hidden&&(r[o.data_key]=""),o.element_type==="container"))for(const s of o.properties.children)i(s)};return i(t),r}handleInputChange(t,r){r!==void 0&&(this.formData={...this.formData,[t]:r},
|
|
6641
|
+
`}async _onSubmit(t,r){t.preventDefault();const i=t.submitter;if(!i||!r||this.loadingButtons[r]||i.id!==r)return;const o=this._findButtonById(r);o&&await this.handleEvent(o.properties.event,o)}_findButtonById(t){const r=i=>{if(i.element_type==="button"&&i.id===t)return i;if(i.element_type==="container")for(const o of i.properties.children){const s=r(o);if(s)return s}return null};return this.renderSpec?r(this.renderSpec.root_container):null}animateHeight(){var p,g;const r=(((g=(p=this.customizations)==null?void 0:p.config)==null?void 0:g.breakpoints)??at).sm,i=r?parseInt(r.toString().replace(/\D/g,""),10):640;if(window.innerWidth<=i)return;const s=this.renderRoot.querySelector("#root-container");if(!s)return;const a=s.scrollHeight;if(this.prevHeight===0){this.prevHeight=a,s.style.height="auto";return}if(a===this.prevHeight||this.isAnimating)return;const u=Math.abs(a-this.prevHeight);this.isAnimating=!0,this.resizeRAF&&cancelAnimationFrame(this.resizeRAF),this.resizeRAF=requestAnimationFrame(()=>{const y=Math.min(600,Math.max(200,u*1));s.style.transition="none",s.style.height=this.prevHeight+"px",s.offsetHeight,s.style.transition=`height ${y}ms ease`,s.style.height=a+"px";const w=()=>{s.style.transition="",s.style.height="auto",this.prevHeight=s.scrollHeight,this.isAnimating=!1};let C=!1;const $=()=>{C||(C=!0,w())};s.addEventListener("transitionend",$,{once:!0}),setTimeout($,y)})}collectDataKeys(t){const r={},i=o=>{if(o&&((o.element_type==="input"||o.element_type==="checkbox"||o.element_type==="otp")&&o.data_key&&!o.hidden&&(r[o.data_key]=""),o.element_type==="container"))for(const s of o.properties.children)i(s)};return i(t),r}handleInputChange(t,r){r!==void 0&&(this.formData={...this.formData,[t]:r},ys(this,t,"change"),this.requestUpdate())}handleBlur(t){ys(this,t,"blur"),this.requestUpdate()}handleFocus(t,r){var s;(s=this.errors[t])!=null&&s.length&&(this.errors={...this.errors,[t]:[]});const i=`${r}-error`,o=document.getElementById(i);o&&o.parentNode&&o.parentNode.removeChild(o)}async handleEvent(t,r){var i,o;if(r.element_type==="html")try{await gt.processLoginflowEvent({event:t,data:{}})}finally{this.eventEmitting=!1}else if(r.element_type==="otp")try{await gt.processLoginflowEvent({event:t,data:this.formData})}finally{this.eventEmitting=!1}else{if(this.loadingButtons[r.id])return;if((i=r.properties.requires_valid)==null||i.forEach(a=>{ys(this,a,"submit"),this.requestUpdate()}),!(((o=r.properties.requires_valid)==null?void 0:o.some(a=>{var u,p;return((p=(u=this.errors)==null?void 0:u[a])==null?void 0:p.length)>0}))??!1)){this.loadingButtons={...this.loadingButtons,[r.id]:!0},this.eventEmitting=!0;try{await gt.processLoginflowEvent({event:t,data:this.formData})}finally{this.loadingButtons={...this.loadingButtons,[r.id]:!1},this.eventEmitting=!1}}}}findElementByKey(t){const r=i=>{if((i.element_type==="input"||i.element_type==="checkbox"||i.element_type==="otp")&&i.data_key===t)return i;if(i.element_type==="container")for(const o of i.properties.children){const s=r(o);if(s)return s}return null};return this.renderSpec?r(this.renderSpec.root_container):null}isFieldValid(t){const r=this.findElementByKey(t);if(!r||!("validation"in r.properties))return!0;const{validation:i}=r.properties,{data_key:o}=r;if(!i||!o)return!0;const s=this.formData[o];return i.rules.every(u=>this.validateRule(u,s))}validateRule(t,r){switch(t.type){case"required":return wd(r);case"min_length":return xd(r,t.length);case"max_length":return _d(r,t.length);case"min_value":return Sd(r,t.value);case"max_value":return $d(r,t.value);case"regex":return Cd(r,t.regex);case"field_match":return Ed(r,t.field_match?this.formData[t.field_match]:void 0);case"email":return kd(r);case"phone":return Rd(r);case"date":return Od(r);default:return!0}}};Ee([l({type:Object})],exports.SaasBaseLayout.prototype,"renderSpec",2);Ee([l({type:Object})],exports.SaasBaseLayout.prototype,"customizations",2);Ee([k()],exports.SaasBaseLayout.prototype,"formData",2);Ee([k()],exports.SaasBaseLayout.prototype,"errors",2);Ee([k()],exports.SaasBaseLayout.prototype,"loadingButtons",2);Ee([k()],exports.SaasBaseLayout.prototype,"eventEmitting",2);Ee([k()],exports.SaasBaseLayout.prototype,"theme",2);exports.SaasBaseLayout=Ee([h("sb-layout")],exports.SaasBaseLayout);var fg=Object.defineProperty,vg=Object.getOwnPropertyDescriptor,hr=(e,t,r,i)=>{for(var o=i>1?void 0:i?vg(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&fg(t,r,o),o};exports.SbProvider=class extends v{constructor(){super(...arguments),this.customizations=null,this.providedCustomizations=this.customizations,this.env=null,this.auth={isAuthenticated:!1},this.renderSpec=null,this.autoRedirect=!0}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),Hp(),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));gt.configure({domain:this.env.domain,appId:this.env.appId,clientSecret:this.env.clientSecret??"",locale:this.env.locale,signinUrl:this.env.signinUrl,signupUrl:this.env.signupUrl,onFlowStateChange:r=>{r.render_spec&&(this.renderSpec=r.render_spec)}}),this.refreshAuthState()})().catch(r=>console.error("Error initializing SbProvider:",r))}updated(t){var r;super.updated(t),t.has("customizations")&&(this.providedCustomizations=this.customizations),t.has("env")&&(r=this.env)!=null&&r.domain&>.configure({domain:this.env.domain,appId:this.env.appId,clientSecret:this.env.clientSecret??"",locale:this.env.locale,signinUrl:this.env.signinUrl,signupUrl:this.env.signupUrl,onFlowStateChange:i=>{i.render_spec&&(this.renderSpec=i.render_spec)}}),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=window.location.pathname;if([this.env.signinUrl,this.env.signupUrl].some(o=>t.includes(o))){const a=new URLSearchParams(window.location.search).get("redirect_url")||this.env.signinRedirectUrl||"/";window.location.href=a}}refreshAuthState(){this.auth={isAuthenticated:gt.isAuthenticated()}}};hr([l({type:Object})],exports.SbProvider.prototype,"customizations",2);hr([Ce({context:io})],exports.SbProvider.prototype,"providedCustomizations",2);hr([l({type:Object}),Ce({context:Ad})],exports.SbProvider.prototype,"env",2);hr([k(),Ce({context:ro})],exports.SbProvider.prototype,"auth",2);hr([k(),Ce({context:Gs})],exports.SbProvider.prototype,"renderSpec",2);hr([l({type:Boolean})],exports.SbProvider.prototype,"autoRedirect",2);exports.SbProvider=hr([h("sb-provider")],exports.SbProvider);var yg=Object.defineProperty,wg=Object.getOwnPropertyDescriptor,Md=(e,t,r,i)=>{for(var o=i>1?void 0:i?wg(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&yg(t,r,o),o};exports.SignedOut=class extends v{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.auth?c`
|
|
6627
6642
|
<div ?hidden=${this.auth.isAuthenticated}>${this._cachedChildren}</div>
|
|
6628
|
-
`:f}};Md([Ct({context:
|
|
6643
|
+
`:f}};Md([Ct({context:ro,subscribe:!0}),l({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=Md([h("sb-signed-out")],exports.SignedOut);var xg=Object.defineProperty,_g=Object.getOwnPropertyDescriptor,qd=(e,t,r,i)=>{for(var o=i>1?void 0:i?_g(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&xg(t,r,o),o};exports.SignedIn=class extends v{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.auth?c`
|
|
6629
6644
|
<div ?hidden=${!this.auth.isAuthenticated}>${this._cachedChildren}</div>
|
|
6630
|
-
`:f}};qd([Ct({context:
|
|
6645
|
+
`:f}};qd([Ct({context:ro,subscribe:!0}),l({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=qd([h("sb-signed-in")],exports.SignedIn);var Sg=Object.defineProperty,$g=Object.getOwnPropertyDescriptor,$o=(e,t,r,i)=>{for(var o=i>1?void 0:i?$g(t,r):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(o=(i?a(t,r,o):a(o))||o);return i&&o&&Sg(t,r,o),o};exports.SbAuthenticated=class extends v{constructor(){super(...arguments),this._cachedChildren=[],this.redirectUrl=""}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){var t;return this.auth?this.auth.isAuthenticated?c`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),f):f}};$o([l({type:String})],exports.SbAuthenticated.prototype,"redirectUrl",2);$o([Ct({context:Ad}),l({attribute:!1})],exports.SbAuthenticated.prototype,"env",2);$o([Ct({context:ro,subscribe:!0}),l({attribute:!1})],exports.SbAuthenticated.prototype,"auth",2);exports.SbAuthenticated=$o([h("sb-authenticated")],exports.SbAuthenticated);function Cg(){return gt}exports.BaseElement=ed;exports.SbUserProfile=zt;exports.renderElement=an;exports.useAuthProvider=Cg;
|
|
6631
6646
|
//# sourceMappingURL=index.js.map
|