@genesislcap/foundation-rapid-cdn 15.66.0 → 15.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -248,9 +248,9 @@ function _v(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r
|
|
|
248
248
|
`)}}let e=c((o+a.decode()).trim());if(e)return e;throw Error(`${n} proxy stream ended without a terminal frame`)}finally{i.cancel().catch(()=>{})}})}let Dx=12e4,Ox=1e3;function kx(e){let t=(e?.get)?.call(e,`x-should-retry`);return typeof t==`string`&&t.trim().toLowerCase()===`false`}function Ax(e){let t=(e?.get)?.call(e,`retry-after`);if(typeof t!=`string`||t.trim()===``)return;let n=Number(t.trim());if(Number.isFinite(n))return Math.max(0,n*Ox);let r=Date.parse(t);if(!Number.isNaN(r))return Math.max(0,r-Date.now())}function jx(e){let t=typeof e==`object`&&e?e:{},n=typeof t.details==`object`&&t.details!==null?t.details:void 0;for(let e of[t.error,n?.error]){let t=e?.details;if(Array.isArray(t))for(let e of t){let t=e?.[`@type`];if(typeof t!=`string`||!t.endsWith(`google.rpc.RetryInfo`))continue;let n=e?.retryDelay;if(typeof n!=`string`)continue;let r=Number(n.replace(/s$/,``));if(Number.isFinite(r)&&r>=0)return r*Ox}}}function Mx(e,t,n,r=1/0){let i=t*2**e;return n==null||!Number.isFinite(n)?i:Math.max(i,Math.min(n,6e4,Math.max(0,r)))}function Nx(e,t){return Math.max(0,e-t)}function Px(e){return J(this,void 0,void 0,function*(){var t;let{url:n,headers:r,body:i,credentials:a,vendorLabel:o,retryableStatuses:s,timeout:c,stallTimeout:l,backoffBaseMs:u,signal:d}=e,f=jb(o),p=(e,t,n)=>(ub.error(`${o}Transport: the AI service refused the request (${t} ${e})${n?`: ${n}`:``}`),new yx(o,e,t,n)),m=0,h=(e,t)=>{let n=u*2**e,r=Dx-m,i=Mx(e,u,t,r);return m+=Nx(i,n),t!=null&&i>n?ub.warn(`${o}Transport: honouring the server's requested retry delay (${Math.round(i)}ms, asked ${Math.round(t)}ms)`):t!=null&&t>n&&ub.warn(`${o}Transport: declining the server's requested retry delay (asked ${Math.round(t)}ms; the ${Dx}ms sequence allowance is spent) — using the ladder's ${Math.round(i)}ms`),sx(i,d)};for(let e=0;e<=5;e+=1){let u=new AbortController,m=performance.now(),g,_,v=()=>{let e=Math.round(performance.now()-m);return g===void 0?`${o} request timed out after ${e}ms — no response headers (the service never answered; nothing was received to stall on)`:`${o} request timed out after ${e}ms — headers arrived in ${Math.round(g-m)}ms (content-type: ${_??`unknown`}) but no body followed`},y=setTimeout(()=>u.abort(new DOMException(v(),`TimeoutError`)),c),b=()=>{l<=0||(clearTimeout(y),y=setTimeout(()=>u.abort(new DOMException(`${o} request stalled (no data for ${l}ms)`,`TimeoutError`)),l))},{signal:ee,dispose:x}=sb([d,u.signal]);try{let c=yield fetch(n,{method:`POST`,headers:r,body:JSON.stringify(i),signal:ee,credentials:a});if(g=performance.now(),_=((t=c.headers)?.get)?.call(t,`content-type`)??void 0,!c.ok){let t=yield c.text(),n=_b(t),r=kb(f,vb(n),n);if(r)throw Ab(o,r,c.status,n,t||void 0);let i=Tx(f,c.status,n);if(i)throw new Cx(o,i.promptTokens,i.limitTokens,i.message??(t||void 0));if(gb(c.status,vb(n)))throw Sb(o,n,t||void 0);let a=ux(vb(n));if(a&&a!==cx.VENDOR_UNREACHABLE)throw p(a,c.status,bx(n));let l=mx(c.status,n,t);if(l)throw p(l,c.status,gx(n)??(t||void 0));if(hx(c.status,n))throw p(cx.REQUEST_TOO_LARGE,c.status,t||void 0);let u=kx(c.headers);if(s.includes(c.status)&&!u&&e<5){ub.warn(`${o}Transport: retryable status ${c.status}, retrying (attempt ${e+1}/5)`),clearTimeout(y),yield h(e,Ax(c.headers)||jx(n));continue}throw a?p(a,c.status,bx(n)):Error(`${o} request error ${c.status}: ${t}`)}if((c.headers?.get(`content-type`))?.toLowerCase().includes(`application/x-ndjson`)&&c.body){b();let t=yield Ex(c.body,b,o,l);if(t.t===`ok`)return t.body;if(t.code===`UPSTREAM_STALLED`)throw new DOMException(`${o} request stalled: ${t.error??`no upstream data`}`,`TimeoutError`);let n=kb(f,t.code,t);if(n)throw Ab(o,n,t.status,t,t.error);let r=Tx(f,t.status,t);if(r)throw new Cx(o,r.promptTokens,r.limitTokens,r.message??t.error);if(gb(t.status,t.code))throw Sb(o,t);let i=ux(t.code);if(i&&i!==cx.VENDOR_UNREACHABLE)throw p(i,t.status,bx(t));if(s.includes(t.status)&&e<5){ub.warn(`${o}Transport: retryable status ${t.status} (err frame), retrying (attempt ${e+1}/5)`),clearTimeout(y),yield h(e,jx(t));continue}throw i?p(i,t.status,bx(t)):Error(`${o} request error ${t.status}: ${t.error??JSON.stringify(t.details)}`)}return yield c.json()}catch(e){throw ox(e,u.signal,d)}finally{clearTimeout(y),x()}}throw Error(`${o} request failed: max retries exceeded`)})}function Fx(e){if(e&&e!==`auto`)return e===`required`?{type:`any`}:e===`none`?{type:`none`}:{type:`tool`,name:e.tool}}let Ix={"claude-fable-5":1e6,"claude-opus-4-8":1e6,"claude-opus-4-7":1e6,"claude-sonnet-5":1e6,"claude-sonnet-4-6":1e6,"claude-haiku-4-5-20251001":2e5},Lx=`emit_structured_response`;function Rx(e){if(!Nb.includes(e))throw Error(`AnthropicTransport: unsupported model "${e}". Use one of: ${Nb.join(`, `)}.`)}function zx(e){return e===`claude-fable-5`||e===`claude-opus-4-8`||e===`claude-opus-4-7`||e===`claude-sonnet-5`}function Bx(e){return e===`claude-fable-5`||e===`claude-opus-4-8`||e===`claude-sonnet-5`||e===`claude-haiku-4-5-20251001`}function Vx(e){return e!==`claude-haiku-4-5-20251001`}function Hx(e){return e===`claude-fable-5`}function Ux(e,t){let n=e===`claude-sonnet-5`||Hx(e),r={type:`adaptive`,display:`summarized`};return t===`off`?Hx(e)?r:n?{type:`disabled`}:void 0:t===`auto`||t!==void 0?Vx(e)?r:void 0:n?r:void 0}function Wx(e){return e===`claude-fable-5`||e===`claude-opus-4-8`||e===`claude-sonnet-5`}let Gx={minimal:`low`,low:`low`,medium:`medium`,high:`high`,max:`max`};function Kx(e,t){if(t!==void 0&&t!==`auto`&&t!==`off`&&Wx(e)&&Vx(e))return Gx[t]}let qx=`anthropic`;var Jx=class extends Error{constructor(e,t,n,r){super(`Response truncated at ${t==null?`the model's output-token limit`:`the max_tokens cap (${t})`} for model ${e}`+(r.length>0?` while emitting tool call(s): ${r.join(`, `)}`:``)+`. The output exceeds the per-response limit — raise the provider maxTokens (where configurable) or split the work into smaller outputs.`),this.model=e,this.maxTokens=t,this.outputTokens=n,this.toolNames=r,this.name=`ResponseTruncatedError`}},Yx=class e{warnIfThinkingUnclampable(e){if(this.warnedThinkingClamped)return;let t=this.clampWarning(e);t&&(this.warnedThinkingClamped=!0,ub.warn(t))}clampWarning(e){switch(e){case void 0:return;case`off`:return Hx(this.model)?`AnthropicTransport: thinkingPolicy 'off' ignored — ${this.model} always thinks and rejects an explicit disable. Reasoning tokens are still billed as output; switch model if you need them gone.`:void 0;case`auto`:return Vx(this.model)?void 0:`AnthropicTransport: thinkingPolicy 'auto' ignored — ${this.model} does not support adaptive thinking, so this turn runs without reasoning. Use a Sonnet or Opus tier if the agent needs it.`;case`minimal`:case`low`:case`medium`:case`high`:case`max`:return!Vx(this.model)||!Wx(this.model)?`AnthropicTransport: thinkingPolicy '${e}' ignored — ${this.model} predates output_config.effort, so this turn runs at its default posture. Use Opus 4.8, Sonnet 5, or Fable 5 to set reasoning depth.`:void 0;default:return e}}constructor(e={}){this.lifetimeCostUsd=0,this.lifetimeSavingsUsd=0,this.warnedThinkingClamped=!1,this.warnedUnknownServingModels=/* @__PURE__ */ new Set;let t=e.model??`claude-haiku-4-5-20251001`;Rx(t),this.model=t,t===`claude-sonnet-5`?ub.warn(`AnthropicTransport: using claude-sonnet-5 — standard Sonnet tier, higher cost than Haiku, and adaptive thinking runs by default so reasoning tokens add to output cost. Use for stronger reasoning or agent tasks.`):t===`claude-sonnet-4-6`?ub.warn(`AnthropicTransport: using claude-sonnet-4-6 — higher cost than Haiku; use for stronger reasoning or agent tasks.`):t===`claude-opus-4-7`||t===`claude-opus-4-8`?ub.warn(`AnthropicTransport: using ${t} — significantly higher cost; reserve for tasks where Sonnet reliability is insufficient.`):t===`claude-fable-5`&&ub.warn(`AnthropicTransport: using claude-fable-5 — Anthropic's most capable model, priced above Opus tier ($10 / $50 per MTok) with thinking always on. Reserve for the hardest reasoning/long-horizon work. Requires ≥30-day data retention (unavailable under ZDR) and may return stop_reason "refusal"; pair with an Opus 4.8 fallback.`),this.timeout=e.timeout??3e5,this.stallTimeout=e.stallTimeout??3e4,this.apiKey=e.apiKey,this.serverEndpoint=e.serverEndpoint,this.maxTokens=e.maxTokens??4096}getConfig(){return{provider:`anthropic`,model:this.model,contextLimit:Ix[this.model]}}getLifetimeCost(){return this.lifetimeCostUsd}getLifetimeSavings(){return this.lifetimeSavingsUsd}resetLifetimeCost(){this.lifetimeCostUsd=0,this.lifetimeSavingsUsd=0}sendStructuredPrompt(e){return J(this,void 0,void 0,function*(){let{systemPrompt:t,userPrompt:n,responseSchema:r}=e,i=[{role:`user`,content:n}],a={model:this.model,max_tokens:this.maxTokens,messages:i};t&&(a.system=t);let o=r!=null&&Bx(this.model),s=r!=null&&!o;o?a.output_config=Object.assign(Object.assign({},a.output_config),{format:{type:`json_schema`,schema:r}}):s&&(a.tools=[{name:Lx,description:`Emit the structured response that matches the required schema.`,input_schema:r}],a.tool_choice={type:`tool`,name:Lx}),this.model===`claude-sonnet-5`&&(a.thinking={type:`disabled`});let c=yield this.post(a);if(s){let e=(c.content??[]).find(e=>e.type===`tool_use`&&e.name===Lx);return e?JSON.stringify(e.input??{}):``}return(c.content??[]).filter(e=>e.type===`text`).map(e=>e.text).join(``)})}sendChatMessage(e,t,n){return J(this,void 0,void 0,function*(){let r=/* @__PURE__ */ new Set([this.model,...(n?.fallbacks??[]).map(e=>e.model)]),i=this.toAnthropicMessages(e,t,n?.attachments,r),a={model:this.model,max_tokens:n?.maxTokens??this.maxTokens,messages:i};if(n?.systemPrompt&&(a.system=n.systemPrompt),n?.tools?.length&&(a.tools=n.tools.map(e=>Object.assign({name:e.name,description:e.description,input_schema:e.enforceSchema?tx(e.parameters,e.name):e.parameters},e.enforceSchema?{strict:!0}:{}))),a.tools?.length){let e=Fx(n?.toolChoice);e&&(a.tool_choice=e)}this.warnIfThinkingUnclampable(n?.thinkingPolicy);let o=Ux(this.model,n?.thinkingPolicy);o&&(a.thinking=o);let s=Kx(this.model,n?.thinkingPolicy);s&&(a.output_config=Object.assign(Object.assign({},a.output_config),{effort:s}));let c=o?.type===`adaptive`;n?.temperature!=null&&!zx(this.model)&&!c&&(a.temperature=Lb(n.temperature,{defaultTemp:1,maxTemp:1})),n?.responseSchema&&Bx(this.model)&&(a.output_config=Object.assign(Object.assign({},a.output_config),{format:{type:`json_schema`,schema:n.responseSchema}})),n?.fallbacks?.length&&(a.fallbacks=n.fallbacks.map(e=>e.maxTokens==null?{model:e.model}:{model:e.model,max_tokens:e.maxTokens})),n?.cachePolicy&&this.applyCacheControl(a,n.cachePolicy),n?.tailContext&&this.appendTailContext(a,n.tailContext);let l=yield this.post(a,n?.signal);return this.fromAnthropicResponse(l,a.max_tokens)})}applyCacheControl(e,t){if(t.scope==="default")return;let n=t.ttl===`1h`?{type:`ephemeral`,ttl:`1h`}:{type:`ephemeral`};if(t.scope===`tools`){e.tools?.length&&(e.tools[e.tools.length-1].cache_control=n);return}if(typeof e.system==`string`&&e.system.length>0?e.system=[{type:`text`,text:e.system,cache_control:n}]:e.tools?.length&&(e.tools[e.tools.length-1].cache_control=n),t.scope===`history`){let t=e.messages[e.messages.length-1];t&&Array.isArray(t.content)&&t.content.length>0&&(t.content[t.content.length-1].cache_control=n)}}appendTailContext(e,t){let n={type:`text`,text:t},r=e.messages[e.messages.length-1];r?.role===`user`&&Array.isArray(r.content)?r.content.push(n):e.messages.push({role:`user`,content:[n]})}logTokenUsage(t,n,r,i,a,o){let{costUsd:s,savedUsd:c,breakdown:l}=Vb(t,{uncachedInputTokens:n,outputTokens:r,cacheReadTokens:i,cacheWriteTokens:a,cacheWrite1hTokens:o});this.lifetimeCostUsd+=s,this.lifetimeSavingsUsd+=c;let u=e.COST_DECIMAL_PLACES;return console.log(`--- Anthropic Token Usage (${t}) ---`),console.log(`Prompt Tokens: ${n} ($${l.promptUsd.toFixed(u)})`),console.log(`Cache Read: ${i} ($${l.cacheReadUsd.toFixed(u)})`),console.log(`Cache Write: ${a} ($${l.cacheWriteUsd.toFixed(u)})`),console.log(`Candidate Tokens: ${r} ($${l.candidateUsd.toFixed(u)})`),console.log(`Total Cost: $${s.toFixed(u)}`),console.log(`Cache Saved: $${c.toFixed(u)} (lifetime $${this.lifetimeSavingsUsd.toFixed(u)})`),console.log(`Lifetime Cost: $${this.lifetimeCostUsd.toFixed(u)}`),console.log(`--------------------------`),s}toAnthropicMessages(e,t,n,r=/* @__PURE__ */ new Set([this.model])){let i=[],a=(e,t)=>{let n=i[i.length-1];if(n&&n.role===e&&Array.isArray(n.content)){n.content.push(t);return}i.push({role:e,content:[t]})},o=e=>{let t=[],n=[];for(let r of e)r.kind===`image`?t.push({type:`image`,source:{type:`base64`,media_type:Pb(r.mimeType),data:Fb(r.data)}}):n.push({type:`text`,text:`[File: ${r.name}]\n${r.content}`});return{images:t,texts:n}};for(let t of e){if(t.role===`system`||t.role===`system-event`||t.role===`synthetic-user`||t.role===`compacted-summary`||t.category===`reasoning`||t.category===`narration`||t.excludeFromProvider||t.thinking)continue;if(t.toolResult){let e=t.toolResult.attachments??[];a(`user`,{type:`tool_result`,tool_use_id:t.toolResult.toolCallId,content:e.length?[...t.toolResult.content?[{type:`text`,text:t.toolResult.content}]:[],...e.map(e=>({type:`image`,source:{type:`base64`,media_type:Pb(e.mimeType),data:Fb(e.data)}}))]:t.toolResult.content});continue}if(t.toolCalls?.length){for(let e of this.reasoningToReplay(t.toolCalls[0],r))a(`assistant`,e);t.content&&a(`assistant`,{type:`text`,text:t.content});for(let e of t.toolCalls)a(`assistant`,{type:`tool_use`,id:e.id,name:e.name,input:e.args??{}});continue}let e=t.role===`user`?`user`:`assistant`;if(e===`user`&&t.attachments?.length){let{images:n,texts:r}=o(t.attachments);for(let t of n)a(e,t);t.content&&a(e,{type:`text`,text:t.content});for(let t of r)a(e,t)}else t.content&&a(e,{type:`text`,text:t.content})}if(t||n?.length){let{images:e,texts:r}=o(n??[]);for(let t of e)a(`user`,t);t&&a(`user`,{type:`text`,text:t});for(let e of r)a(`user`,e)}return i}reasoningToReplay(e,t){let n=e.providerMetadata?.[qx];if(!n)return[];let r=n.fallbacks??[],i=n.requestedModel===this.model&&t.has(n.model),a=n.model===this.model||i;return[...r,...a?n.reasoning??[]:[]]}servingModel(e){let t=e.model;return!t||t===this.model?this.model:Nb.includes(t)?t:(this.warnedUnknownServingModels.has(t)||(this.warnedUnknownServingModels.add(t),ub.warn(`AnthropicTransport: response was served by "${t}", which is not a known model — pricing it at the configured "${this.model}" rate instead of guessing. The reported cost for this request may be wrong; add the model to SUPPORTED_ANTHROPIC_MODEL_IDS.`)),this.model)}isUnbilledRefusal(e,t,n){return(t.output_tokens??0)>0?!1:e.type===`message`||n}costAttempt(e,t){let n=t.cache_read_input_tokens??0,r=t.cache_creation,i=r?.ephemeral_1h_input_tokens??0,a=t.cache_creation_input_tokens??(r?(r.ephemeral_5m_input_tokens??0)+i:0);return this.logTokenUsage(e,t.input_tokens??0,t.output_tokens??0,n,a,i)}fromAnthropicResponse(e,t=this.maxTokens){let n,r,i,a,o,s=this.servingModel(e);if(e.usage){let t=e.usage.input_tokens??0,c=e.usage.cache_read_input_tokens??0,l=e.usage.cache_creation,u=l?.ephemeral_1h_input_tokens??0,d=e.usage.cache_creation_input_tokens??(l?(l.ephemeral_5m_input_tokens??0)+u:0),f=e.usage.iterations;if(f?.length){let t=e.stop_reason===`refusal`;o=f.reduce((e,n,r)=>{let i=n.usage??n;if(this.isUnbilledRefusal(n,i,r===f.length-1&&t))return e;let a=n.model?this.servingModel({model:n.model}):this.model;return e+this.costAttempt(a,i)},0)}else o=this.isUnbilledRefusal({},e.usage,e.stop_reason===`refusal`)?0:this.costAttempt(s,e.usage);n=t+c+d,i=c,a=d,e.usage.output_tokens!=null&&(r=e.usage.output_tokens)}let c=e.content??[],l=[],u=[],d=[],f=[],p=c.map(e=>e.type).lastIndexOf(`fallback`),m=c.filter(e=>e.type===`fallback`);for(let[e,t]of c.entries()){let n=e>p;t.type===`tool_use`?n&&l.push({id:t.id,name:t.name,args:t.input??{}}):t.type===`thinking`?(n&&f.push(t),u.push(t.thinking)):t.type===`redacted_thinking`?n&&f.push(t):t.type===`text`&&d.push(t.text)}if(l.length>0&&(f.length>0||m.length>0)){let e={reasoning:f,model:s,requestedModel:this.model};m.length>0&&(e.fallbacks=m),l[0].providerMetadata=Object.assign(Object.assign({},l[0].providerMetadata),{[qx]:e})}if(e.stop_reason===`max_tokens`&&l.length>0)throw new Jx(this.model,t,r,l.map(e=>e.name));let h=u.join(``)||void 0,g=l.length>0?{role:`assistant`,content:d.join(``),reasoning:h,toolCalls:l}:{role:`assistant`,content:d.join(``),reasoning:h};n!=null&&(g.inputTokens=n),r!=null&&(g.outputTokens=r),i!=null&&(g.cacheReadTokens=i),a!=null&&(g.cacheWriteTokens=a),o!=null&&(g.cost=o),g.model=s;let _={parts:{functionCall:c.filter(e=>e.type===`tool_use`).length,thought:c.filter(e=>e.type===`thinking`||e.type===`redacted_thinking`).length,text:c.filter(e=>e.type===`text`).length}};return e.stop_reason&&(_.finishReason=e.stop_reason),g.responseMeta=_,g}buildEndpoint(){if(this.apiKey)return{url:`https://api.anthropic.com/v1/messages`,headers:{"Content-Type":`application/json`,"x-api-key":this.apiKey,"anthropic-version":`2023-06-01`,"anthropic-dangerous-direct-browser-access":`true`},credentials:`omit`};if(this.serverEndpoint)return{url:this.serverEndpoint,headers:{"Content-Type":`application/json`,Accept:`application/x-ndjson`},credentials:`include`};throw Error(`AnthropicTransport: no API key or server endpoint configured. Set ANTHROPIC_API_KEY in your .env or pass apiKey/serverEndpoint in AnthropicAIConfig.`)}post(t,n){return J(this,void 0,void 0,function*(){let{url:r,headers:i,credentials:a}=this.buildEndpoint();return yield Px({url:r,headers:t.fallbacks?.length?Object.assign(Object.assign({},i),{"anthropic-beta":[i[`anthropic-beta`],`server-side-fallback-2026-06-01`].filter(Boolean).join(`,`)}):i,body:t,credentials:a,vendorLabel:mb.anthropic,retryableStatuses:e.RETRYABLE_STATUSES,timeout:this.timeout,stallTimeout:this.stallTimeout,backoffBaseMs:e.BACKOFF_BASE_MS,signal:n})})}};Yx.TOKENS_PER_MILLION=1e6,Yx.COST_DECIMAL_PLACES=6,Yx.RATE_LIMIT_STATUS=429,Yx.SERVICE_UNAVAILABLE_STATUS=503,Yx.OVERLOADED_STATUS=529,Yx.RETRYABLE_STATUSES=[Yx.RATE_LIMIT_STATUS,Yx.SERVICE_UNAVAILABLE_STATUS,Yx.OVERLOADED_STATUS],Yx.BACKOFF_BASE_MS=1e3;let Xx=`default_api.`,Zx=/print\(\s*$/;var Qx=class{constructor(e){this.src=e,this.pos=0}parse(){let e=this.src.indexOf(Xx);e===-1&&this.bail();let t=Zx.test(this.src.slice(0,e));this.pos=e;let n=this.parseCall();return this.skipWhitespace(),t&&(this.expect(`)`),this.skipWhitespace()),this.pos!==this.src.length&&this.bail(),n}parseCall(){this.expectLiteral(Xx);let e=this.readIdentifier();this.expect(`(`);let t=this.parseKwargs();return this.expect(`)`),{name:e,args:t}}parseKwargs(){let e={};for(;this.skipWhitespace(),this.peek()!==`)`;){let t=this.readIdentifier();this.skipWhitespace(),this.expect(`=`),this.skipWhitespace();let n=this.parseValue();Object.prototype.hasOwnProperty.call(e,t)&&this.bail(),e[t]=n,this.skipWhitespace();let r=this.peek();if(r===`,`){this.pos+=1;continue}if(r===`)`)break;this.bail()}return e}parseValue(){let e=this.peek();return e===`"`||e===`'`?this.readString():e===`-`||e===`+`||this.isDigit(e)?this.readNumber():/[A-Za-z]/.test(e)?this.readBareword():this.bail()}readString(){let e=this.src[this.pos];this.pos+=1;let t=``;for(;;){this.pos>=this.src.length&&this.bail();let n=this.src[this.pos];if(this.pos+=1,n===e)return t;if(n===`\\`){t+=this.readEscape();continue}t+=n}}readEscape(){this.pos>=this.src.length&&this.bail();let e=this.src[this.pos];switch(this.pos+=1,e){case`n`:return`
|
|
249
249
|
`;case`t`:return` `;case`r`:return`\r`;case`b`:return`\b`;case`f`:return`\f`;case`\\`:return`\\`;case`"`:return`"`;case`'`:return`'`;case`/`:return`/`;case`u`:return this.readHexCodepoint(4);case`x`:return this.readHexCodepoint(2);default:return this.bail()}}readHexCodepoint(e){let t=this.src.slice(this.pos,this.pos+e);return(t.length!==e||!/^[0-9a-fA-F]+$/.test(t))&&this.bail(),this.pos+=e,String.fromCharCode(parseInt(t,16))}readNumber(){let e=this.pos;for((this.peek()===`-`||this.peek()===`+`)&&(this.pos+=1);this.pos<this.src.length&&/[0-9.eE+-]/.test(this.src[this.pos]);)this.pos+=1;let t=Number(this.src.slice(e,this.pos));return Number.isFinite(t)||this.bail(),t}readBareword(){switch(this.readIdentifier()){case`true`:case`True`:return!0;case`false`:case`False`:return!1;case`null`:case`None`:return null;default:return this.bail()}}readIdentifier(){let e=this.pos;for(/[A-Za-z_]/.test(this.peek())||this.bail();this.pos<this.src.length&&/[A-Za-z0-9_]/.test(this.src[this.pos]);)this.pos+=1;return this.src.slice(e,this.pos)}isDigit(e){return e>=`0`&&e<=`9`}peek(){return this.pos<this.src.length?this.src[this.pos]:``}skipWhitespace(){for(;this.pos<this.src.length&&/\s/.test(this.src[this.pos]);)this.pos+=1}expect(e){this.src[this.pos]!==e&&this.bail(),this.pos+=1}expectLiteral(e){this.src.slice(this.pos,this.pos+e.length)!==e&&this.bail(),this.pos+=e.length}bail(){throw Error(`MalformedFunctionCallParser: unexpected token`)}};function $x(e,t){if(!e)return null;let n;try{n=new Qx(e).parse()}catch{return null}return t.has(n.name)?n:null}let eS=e=>`https://generativelanguage.googleapis.com/v1beta/models/${e}:generateContent`,tS={"gemini-2.5-pro":1048576,"gemini-2.5-flash":1048576,"gemini-2.5-flash-lite":1048576,"gemini-3.8-flash":1048576,"gemini-3.5-flash":1048576,"gemini-3.1-flash-lite":1048576,"gemini-3.1-pro-preview":1048576};function nS(e){if(e&&e!==`auto`)return e===`required`?{functionCallingConfig:{mode:`ANY`}}:e===`none`?{functionCallingConfig:{mode:`NONE`}}:{functionCallingConfig:{mode:`ANY`,allowedFunctionNames:[e.tool]}}}function rS(e){if(!Mb.includes(e))throw Error(`GeminiTransport: unsupported model "${e}". Use one of: ${Mb.join(`, `)}.`)}let iS={"gemini-2.5-flash":`GeminiTransport: using gemini-2.5-flash — higher cost than flash-lite; use for harder reasoning or agent tasks.`,"gemini-2.5-pro":`GeminiTransport: using gemini-2.5-pro — significantly higher, prompt-size-tiered cost; reserve for tasks where flash reliability is insufficient.`,"gemini-3.5-flash":`GeminiTransport: using gemini-3.5-flash — frontier model, materially higher cost than flash-lite; use for harder reasoning or agent tasks.`,"gemini-3.8-flash":`GeminiTransport: using gemini-3.8-flash — frontier model, materially higher cost than flash-lite. Its $0.75/$3.75 per-MTok rate is introductory and DOUBLES to $1.50/$7.50 on 2027-01-01; re-check this tier choice before then.`,"gemini-3.1-pro-preview":`GeminiTransport: using gemini-3.1-pro-preview — PREVIEW model (no stability guarantee, may be withdrawn) with significantly higher, prompt-size-tiered cost; reserve for tasks where flash reliability is insufficient.`},aS=[`gemini-2.5-flash`,`gemini-2.5-flash-lite`],oS=[`gemini-3.8-flash`,`gemini-3.5-flash`,`gemini-3.1-flash-lite`,`gemini-3.1-pro-preview`],sS=[`minimal`,`low`,`medium`,`high`],cS={"gemini-3.8-flash":[`low`,`medium`,`high`],"gemini-3.5-flash":[`minimal`,`low`,`medium`,`high`],"gemini-3.1-flash-lite":[`minimal`,`low`,`medium`,`high`],"gemini-3.1-pro-preview":[`low`,`medium`,`high`]};function lS(e,t){if(!e?.length||e.includes(t))return t;let n=sS.indexOf(t),r=e=>Math.abs(sS.indexOf(e)-n),i=e[0];for(let t of e)r(t)<=r(i)&&(i=t);return i}let uS={minimal:`minimal`,low:`low`,medium:`medium`,high:`high`,max:`high`},dS=e=>e!==void 0&&e!==`auto`&&e!==`off`;function fS(e,t){if(dS(t)){let n=cS[e];if(n)return{includeThoughts:!0,thinkingLevel:lS(n,uS[t])}}return t===`off`&&aS.includes(e)?{includeThoughts:!1,thinkingBudget:0}:t===`auto`&&aS.includes(e)?{includeThoughts:!0,thinkingBudget:-1}:{includeThoughts:!0}}let pS=`gemini`;function mS(e){let t=[],n=[];for(let r of e)r.kind===`image`?t.push({inlineData:{mimeType:Pb(r.mimeType),data:Fb(r.data)}}):n.push({text:`[File: ${r.name}]\n${r.content}`});return{imageParts:t,textParts:n}}var hS=class extends Error{constructor(e){super(`Gemini returned MALFORMED_FUNCTION_CALL`),this.finishMessage=e,this.name=`MalformedFunctionCallError`}},gS=class e{warnIfThinkingUnclampable(e){if(!this.warnedThinkingClamped){if(e===`off`&&!aS.includes(this.model)){this.warnedThinkingClamped=!0,ub.warn(`GeminiTransport: thinkingPolicy 'off' ignored — ${this.model} runs its default thinking posture and takes no budget we can safely set. Reasoning tokens are still billed at the candidate rate; use a flash tier if you need them gone.`);return}if(dS(e)){let t=cS[this.model];if(!t){this.warnedThinkingClamped=!0,ub.warn(`GeminiTransport: thinkingPolicy '${e}' ignored — ${this.model} takes a numeric thinking budget, not the graded 'thinkingLevel' the Gemini 3 tiers use, so this turn runs at its default reasoning posture. Use a Gemini 3 tier to set reasoning depth.`);return}let n=uS[e],r=lS(t,n);r!==n&&(this.warnedThinkingClamped=!0,ub.warn(`GeminiTransport: thinkingPolicy '${e}' sent as thinkingLevel '${r}' — ${this.model} does not accept '${n}' (it takes ${t.join(`/`)}). Reasoning bills at the candidate rate, so an upward clamp costs more than you asked for.`))}}}constructor(e={}){this.lifetimeCostUsd=0,this.lifetimeSavingsUsd=0,this.warnedThinkingClamped=!1;let t=e.model??`gemini-2.5-flash-lite`;rS(t),this.model=t;let n=iS[t];n&&ub.warn(n),this.timeout=e.timeout??3e5,this.stallTimeout=e.stallTimeout??3e4,this.apiKey=e.apiKey,this.serverEndpoint=e.serverEndpoint}getConfig(){return{provider:`gemini`,model:this.model,contextLimit:tS[this.model]}}getLifetimeCost(){return this.lifetimeCostUsd}getLifetimeSavings(){return this.lifetimeSavingsUsd}resetLifetimeCost(){this.lifetimeCostUsd=0,this.lifetimeSavingsUsd=0}sendStructuredPrompt(e){return J(this,void 0,void 0,function*(){let{systemPrompt:t,userPrompt:n,responseSchema:r}=e,i=[];return t&&(i.push({role:`user`,parts:[{text:t}]}),i.push({role:`model`,parts:[{text:`Understood.`}]})),i.push({role:`user`,parts:[{text:n}]}),(yield this.post({model:this.model,contents:i,responseSchema:r}))?.content??``})}sendChatMessage(e,t,n){return J(this,void 0,void 0,function*(){let r=this.toGeminiContents(e,t,n?.attachments);n?.tailContext&&r.push({role:`user`,parts:[{text:n.tailContext}]});let i=n?.tools?.length?[{functionDeclarations:n.tools.map(e=>({name:e.name,description:e.description,parameters:ax(e.parameters)}))}]:void 0,a=n?.systemPrompt?{role:`system`,parts:[{text:n.systemPrompt}]}:void 0,o=i?nS(n?.toolChoice):void 0;this.warnIfThinkingUnclampable(n?.thinkingPolicy);let s={thinkingConfig:fS(this.model,n?.thinkingPolicy)};n?.maxTokens!=null&&(s.maxOutputTokens=n.maxTokens);let c=[...n?.attachments??[],...e.flatMap(e=>e.attachments??[]),...e.flatMap(e=>e.toolResult?.attachments??[])].find(e=>e.kind===`image`&&e.detail);c?.kind===`image`&&c.detail&&oS.includes(this.model)&&(s.mediaResolution=`MEDIA_RESOLUTION_${c.detail.toUpperCase()}`),n?.temperature!=null&&(s.temperature=Lb(n.temperature,{defaultTemp:1,maxTemp:2}));let l=new Set((n?.tools??[]).map(e=>e.name)),u=this.model.startsWith(`gemini-3`),d=n?.responseSchema!=null&&(!i||u),f=yield this.post(Object.assign({model:this.model,contents:r,tools:i,systemInstruction:a,toolConfig:o,generationConfig:s},d?{responseSchema:ax(n.responseSchema)}:{}),n?.signal);return this.fromGeminiResponse(f,l,s.maxOutputTokens)})}logTokenUsage(t,n,r,i){let{costUsd:a,savedUsd:o,breakdown:s}=Wb(this.model,{promptTokens:t,candidateTokens:n,thoughtTokens:r,cachedTokens:i});this.lifetimeCostUsd+=a,this.lifetimeSavingsUsd+=o;let c=e.COST_DECIMAL_PLACES;return console.log(`--- Gemini Token Usage (${this.model}) ---`),console.log(`Prompt Tokens: ${t} (${i} cached) ($${s.promptUsd.toFixed(c)} + $${s.cacheReadUsd.toFixed(c)})`),console.log(`Candidate Tokens: ${n} (+${r} thinking) ($${s.candidateUsd.toFixed(c)})`),console.log(`Total Cost: $${a.toFixed(c)}`),console.log(`Cache Saved: $${o.toFixed(c)} (lifetime $${this.lifetimeSavingsUsd.toFixed(c)})`),console.log(`Lifetime Cost: $${this.lifetimeCostUsd.toFixed(c)}`),console.log(`--------------------------`),a}toGeminiContents(e,t,n){let r=[],i=/* @__PURE__ */ new Map;for(let t of e){if(t.role===`system`||t.role===`system-event`||t.role===`synthetic-user`||t.role===`compacted-summary`||t.category===`reasoning`||t.category===`narration`||t.excludeFromProvider||t.thinking)continue;let e=t.role===`user`?`user`:`model`;if(t.toolResult){let e=i.get(t.toolResult.toolCallId)??t.toolResult.toolCallId;r.push({role:`user`,parts:[{functionResponse:{name:e,response:{content:t.toolResult.content}}}]});let n=t.toolResult.attachments??[];n.length&&r.push({role:`user`,parts:n.map(e=>({inlineData:{mimeType:Pb(e.mimeType),data:e.data}}))})}else if(t.toolCalls?.length){for(let e of t.toolCalls)i.set(e.id,e.name);r.push({role:`model`,parts:t.toolCalls.map((e,t)=>{let n={functionCall:{name:e.name,args:e.args}},r=e.providerMetadata?.[pS],i=r?.model===this.model?r.thoughtSignature:void 0;return i?n.thoughtSignature=i:t===0&&(n.thoughtSignature=`skip_thought_signature_validator`),n})})}else if(e===`user`&&t.attachments?.length){let{imageParts:e,textParts:n}=mS(t.attachments);r.push({role:`user`,parts:[...e,...t.content?[{text:t.content}]:[],...n]})}else r.push({role:e,parts:[{text:t.content}]})}let{imageParts:a,textParts:o}=mS(n??[]);return(t||a.length||o.length)&&r.push({role:`user`,parts:[...a,...t?[{text:t}]:[],...o]}),r}usageFromGemini(e){if(!e)return{};let t=e,n=this.logTokenUsage(t.promptTokenCount??0,t.candidatesTokenCount??0,t.thoughtsTokenCount??0,t.cachedContentTokenCount??0);return{inputTokens:t.promptTokenCount,outputTokens:t.candidatesTokenCount!=null||t.thoughtsTokenCount!=null?(t.candidatesTokenCount??0)+(t.thoughtsTokenCount??0):void 0,thoughtsTokens:t.thoughtsTokenCount,cacheReadTokens:t.cachedContentTokenCount,cost:n}}fromGeminiResponse(e,t=/* @__PURE__ */ new Set,n){let{inputTokens:r,outputTokens:i,thoughtsTokens:a,cacheReadTokens:o,cost:s}=this.usageFromGemini(e.usageMetadata),c=e?.candidates?.[0],l=c?.content?.parts??[],u=[],d=[],f=[];for(let e of l)if(e.functionCall){let t={model:this.model};e.thoughtSignature&&(t.thoughtSignature=e.thoughtSignature),u.push({id:crypto.randomUUID(),name:e.functionCall.name,args:e.functionCall.args??{},providerMetadata:{[pS]:t}})}else e.thought&&e.text?d.push(e.text):e.text&&f.push(e.text);if(c?.finishReason===`MALFORMED_FUNCTION_CALL`){let e=$x(c.finishMessage,t);if(!e)throw new hS(c.finishMessage);u.push({id:crypto.randomUUID(),name:e.name,args:e.args})}let p=d.join(``),m=f.join(``),h=u.length>0?{role:`assistant`,content:m,reasoning:p||void 0,toolCalls:u}:{role:`assistant`,content:m,reasoning:p||void 0},g=c?.finishReason;(u.length===0&&!p&&!m||g&&g!==`STOP`&&g!==`MALFORMED_FUNCTION_CALL`)&&this.logAbnormalResponse(e,{finishReason:g,functionCallParts:u.length,thoughtParts:d.length,textParts:f.length}),this.guardMaxTokensTruncation(g,u,m,i,n),r!=null&&(h.inputTokens=r),i!=null&&(h.outputTokens=i),o!=null&&(h.cacheReadTokens=o),s!=null&&(h.cost=s);let _=e.promptFeedback?.blockReason;return(g!=null||a!=null||_!=null)&&(h.responseMeta={finishReason:g,thoughtsTokens:a,parts:{functionCall:u.length,thought:d.length,text:f.length},blockReason:_}),h}guardMaxTokensTruncation(e,t,n,r,i){if(e===`MAX_TOKENS`&&(t.length!==0||n.trim()===``))throw new Jx(this.model,i,r,t.map(e=>e.name))}logAbnormalResponse(e,t){let n=e.usageMetadata??{},r=e.candidates?.[0]??{};ub.warn(`GeminiTransport: blank/non-STOP response`,{model:this.model,finishReason:t.finishReason,finishMessage:r.finishMessage,parts:{total:t.functionCallParts+t.thoughtParts+t.textParts,functionCall:t.functionCallParts,thought:t.thoughtParts,text:t.textParts},usage:{promptTokenCount:n.promptTokenCount,candidatesTokenCount:n.candidatesTokenCount,thoughtsTokenCount:n.thoughtsTokenCount,totalTokenCount:n.totalTokenCount},promptFeedback:e.promptFeedback,safetyRatings:r.safetyRatings,citationMetadata:r.citationMetadata})}buildEndpoint(e){if(this.apiKey)return{url:`${eS(this.model)}?key=${this.apiKey}`,payload:this.toDirectPayload(e),headers:{"Content-Type":`application/json`},credentials:`omit`};if(this.serverEndpoint)return{url:this.serverEndpoint,payload:e,headers:{"Content-Type":`application/json`,Accept:`application/x-ndjson`},credentials:`include`};throw Error(`GeminiTransport: no API key or server endpoint configured. Set GEMINI_API_KEY in your .env or pass apiKey/serverEndpoint in GeminiAIConfig.`)}post(t,n){return J(this,void 0,void 0,function*(){let{url:r,payload:i,headers:a,credentials:o}=this.buildEndpoint(t);return yield Px({url:r,headers:a,body:i,credentials:o,vendorLabel:mb.gemini,retryableStatuses:e.RETRYABLE_STATUSES,timeout:this.timeout,stallTimeout:this.stallTimeout,backoffBaseMs:e.BACKOFF_BASE_MS,signal:n})})}toDirectPayload(e){let t=Object.assign({},e);return delete t.model,t.responseSchema&&(t.generationConfig=Object.assign(Object.assign({},t.generationConfig),{responseMimeType:`application/json`,responseSchema:t.responseSchema}),delete t.responseSchema),t}};gS.TOKENS_PER_MILLION=1e6,gS.COST_DECIMAL_PLACES=6,gS.RATE_LIMIT_STATUS=429,gS.SERVICE_UNAVAILABLE_STATUS=503,gS.BAD_GATEWAY_STATUS=502,gS.RETRYABLE_STATUSES=[gS.RATE_LIMIT_STATUS,gS.SERVICE_UNAVAILABLE_STATUS,gS.BAD_GATEWAY_STATUS],gS.BACKOFF_BASE_MS=1e3;var _S=class e{constructor(){this.noopProvider=new pb}get(t){return t===e.DEFAULT_NAME?this.noopProvider:void 0}default(){return this.noopProvider}defaultName(){return e.DEFAULT_NAME}names(){return[e.DEFAULT_NAME]}getStatus(t){return J(this,void 0,void 0,function*(){var n;return t!==void 0&&t!==e.DEFAULT_NAME?null:(yield(n=this.noopProvider).getStatus?.call(n))??null})}listStatuses(){return J(this,void 0,void 0,function*(){var t;let n=(yield(t=this.noopProvider).getStatus?.call(t))??null;return[{name:e.DEFAULT_NAME,isDefault:!0,status:n}]})}};_S.DEFAULT_NAME=`default`;let vS=N.createInterface(e=>e.singleton(_S)),yS=6e4,bS=3e5;Object.freeze({anthropic:Object.freeze({low:Object.freeze({model:`claude-haiku-4-5-20251001`,maxTokens:16e3,stallTimeoutMs:yS,timeoutMs:bS}),high:Object.freeze({model:`claude-sonnet-5`,maxTokens:128e3,stallTimeoutMs:yS,timeoutMs:bS}),reasoning:Object.freeze({model:`claude-opus-4-8`,maxTokens:32e3,stallTimeoutMs:yS,timeoutMs:bS})}),gemini:Object.freeze({low:Object.freeze({model:`gemini-3.1-flash-lite`,stallTimeoutMs:yS,timeoutMs:bS}),high:Object.freeze({model:`gemini-3.8-flash`,stallTimeoutMs:yS,timeoutMs:bS}),reasoning:Object.freeze({model:`gemini-3.1-pro-preview`,stallTimeoutMs:yS,timeoutMs:bS})})});let xS=O` :host{display: block;width: 800px}.ai-criteria-search{display: flex;flex-direction: column;gap: calc(${B} * 2px)}.ai-criteria-search-row{display: flex;flex-direction: row;gap: calc(${B} * 2px);align-items: center}.criteria-input{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);flex: 1;min-width: 0}.criteria-chips-inline{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);flex: 1;min-width: 0;display: flex;align-items: center;gap: calc(${B} * 1px);overflow-x: auto;padding: 0 calc(${B} * 2px);background: var(--neutral-fill-input-rest);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px);scrollbar-width: none}.criteria-chips-inline::-webkit-scrollbar{display: none}.mic-icon{color: var(--neutral-foreground-rest);fill: currentColor}.criteria-toggle-button, .criteria-clear-button{flex-shrink: 0}.criteria-chip{display: inline-flex;align-items: center;flex-shrink: 0;gap: calc(${B} * 1px);padding: calc(${B} * 0.5px) calc(${B} * 2px);background: var(--neutral-fill-rest);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(${B} * 4px);font-size: var(--type-ramp-minus-1-font-size);color: var(--neutral-foreground-rest);white-space: nowrap}.criteria-chip-field{font-weight: 600}.criteria-chip-operator{color: var(--neutral-foreground-hint, var(--neutral-foreground-rest));font-style: italic}.criteria-chip-remove{display: inline-flex;align-items: center;justify-content: center;width: 14px;height: 14px;padding: 0;margin-left: calc(${B} * 0.5px);background: none;border: none;cursor: pointer;color: var(--neutral-foreground-hint, var(--neutral-foreground-rest));font-size: 10px;border-radius: 50%;line-height: 1}.criteria-chip-remove:hover{background: var(--neutral-fill-hover);color: var(--neutral-foreground-rest)}`,SS=e=>T` ${A(()=>lb(),T`<div class="ai-criteria-search"><div class="ai-criteria-search-row">${A(e=>!e.showingChips,T`<${e}-text-area ${k(`textAreaRef`)}class="criteria-input" placeholder="${e=>e.placeholder}" ?disabled=${e=>e.disabled||e.isInterpreting}:value=${Af(e=>e.inputValue,`string`,`input`)}@blur=${e=>e.handleBlur()}rows="1"></${e}-text-area>`)} ${A(e=>e.showingChips,T`<div class="criteria-chips-inline">${j(e=>e.criteriaChips,T`<span class="criteria-chip"><span class="criteria-chip-field">${e=>e.fieldLabel}</span><span class="criteria-chip-operator">${e=>e.operatorLabel}</span>${A(e=>!!e.valueLabel,T`<span class="criteria-chip-value">${e=>e.valueLabel}</span>`)}<button class="criteria-chip-remove" aria-label="Remove filter" @click=${(e,t)=>t.parent.removeChip(e.groupIndex,e.clauseIndex)}>
|
|
250
250
|
✕
|
|
251
|
-
</button></span>`)}</div>`)}<${e}-button class="criteria-toggle-button" appearance="outline" title=${e=>e.showingChips?`Add more criteria`:`View active filters`}?disabled=${e=>e.activeGroups.length===0||e.isInterpreting}@click=${e=>e.toggleCriteriaView()}><${e}-icon name="pen" size="sm"></${e}-icon></${e}-button><${e}-button class="criteria-clear-button" appearance="outline" title="Clear all filters" ?disabled=${e=>e.activeGroups.length===0||e.isInterpreting}@click=${e=>e.clearChips()}><${e}-icon name="trash-alt" size="sm"></${e}-icon></${e}-button>${A(e=>e.speechAvailable,T`<${e}-button class="mic-button" appearance="${e=>e.isRecording?`accent`:`outline`}" ?disabled=${e=>e.disabled||e.isInterpreting}@click=${e=>e.toggleSpeechInput()}title=${e=>e.isRecording?`Stop recording`:`Start voice input`}><${e}-icon class="mic-icon" name="microphone" size="lg" variant="solid"></${e}-icon></${e}-button>`)}</div></div>`)} `,CS=T` ${e=>SS(Py(e))} `,wS={contains:Gy.containsIgnoreCase,equals:Gy.EQ,startsWith:Gy.startsWith,endsWith:Gy.endsWith,greaterThan:Gy.GT,lessThan:Gy.LT,greaterThanOrEqual:Gy.GE,lessThanOrEqual:Gy.LE,notEqual:Gy.NE,dateIsToday:Gy.dateIsToday,dateIsAfter:Gy.dateIsGreaterEqual,dateIsGreaterEqual:Gy.dateIsGreaterEqual,dateIsBefore:Gy.dateIsLessEqual,dateIsLessEqual:Gy.dateIsLessEqual,dateIsEqual:Gy.dateIsEqual,dateTimeIsAfter:Gy.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:Gy.dateTimeIsGreaterEqual,dateTimeIsBefore:Gy.dateTimeIsLessEqual,dateTimeIsLessEqual:Gy.dateTimeIsLessEqual};function TS(e){let t=wS[e.operator];if(!t)throw Error(`Unknown criteria operator '${e.operator}'`);return new Xy().withField(e.field).withValue(e.value??null).withSerialiser(t).withGroup(`default`).build()}function ES(e,t){return e.length===1?e[0]:e.reduce((e,n,r)=>r===0?[n]:[...e,t,n],[])}function DS(e){let t=new Yy,n=!1;for(let r of e){if(!r.clauses?.length)continue;let e=r.clauses.map(TS),i=r.logic===`or`?Ry.Or():Ry.And(),a=ES(e,i),o=e.length>1?{join:i}:{};r.negated?t.And([Ry.Not(),a]):t.And(e.length===1?e[0]:e,o),n=!0}return n?t.build():``}let OS=[`contains`,`equals`,`startsWith`,`notEqual`],kS=[`equals`,`greaterThan`,`lessThan`,`greaterThanOrEqual`,`lessThanOrEqual`,`notEqual`],AS=[`dateIsToday`,`dateIsAfter`,`dateIsBefore`,`dateIsEqual`,`dateIsGreaterEqual`,`dateIsLessEqual`],jS=[`dateTimeIsAfter`,`dateTimeIsBefore`,`dateTimeIsGreaterEqual`,`dateTimeIsLessEqual`],MS={contains:`contains`,equals:`=`,startsWith:`starts with`,endsWith:`ends with`,notEqual:`≠`,greaterThan:`>`,lessThan:`<`,greaterThanOrEqual:`≥`,lessThanOrEqual:`≤`,dateIsToday:`is today`,dateIsAfter:`after`,dateIsBefore:`before`,dateIsEqual:`=`,dateIsGreaterEqual:`≥`,dateIsLessEqual:`≤`,dateTimeIsAfter:`after`,dateTimeIsBefore:`before`,dateTimeIsGreaterEqual:`≥`,dateTimeIsLessEqual:`≤`},NS=/* @__PURE__ */ new Set([`DATE`,`LOCALDATE`]),PS=/* @__PURE__ */ new Set([`DATETIME`,`NANO_TIMESTAMP`,`LOCALDATETIME`,`TIMESTAMP`]),FS=/* @__PURE__ */ new Set([`INT`,`INTEGER`,`LONG`,`SHORT`,`DOUBLE`,`BIGDECIMAL`,`DECIMAL`]);function IS(e){return(e||``).toUpperCase().trim().split(`(`)[0].trim()}function LS(e){let t=IS(e);return NS.has(t)?AS:PS.has(t)?jS:FS.has(t)?kS:OS}function uae(e){return FS.has(IS(e))}function dae(e){return e==null?!1:typeof e==`number`?!Number.isNaN(e)&&e>0:typeof e==`string`?/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e):!1}function fae(e){return e==null?!1:typeof e==`number`?!Number.isNaN(e):typeof e==`string`&&!Number.isNaN(Number(e))}function pae(e,t){let n=[],r=[],i=/* @__PURE__ */ new Map;Array.isArray(t)&&t.length>0&&(typeof t[0]==`string`?t.forEach(e=>i.set(e,void 0)):t.forEach(e=>i.set(e.NAME,e)));for(let t of e){let{field:e,operator:a,value:o}=t;if(!e||typeof e!=`string`){r.push({field:String(e),message:`Field name is required`});continue}let s=i.get(e),c=s&&`TYPE`in s?s.TYPE:`STRING`;if(!LS(c).includes(a)){r.push({field:e,operator:a,value:o,message:`Operator '${a}' is not allowed for field type ${c}`});continue}if((AS.includes(a)||jS.includes(a))&&a!==`dateIsToday`&&!dae(o)){r.push({field:e,operator:a,value:o,message:`Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch`});continue}if(uae(c)&&kS.includes(a)&&!fae(o)){r.push({field:e,operator:a,value:o,message:`Invalid numeric value`});continue}if(i.size>0&&!i.has(e)){r.push({field:e,operator:a,value:o,message:`Unknown field '${e}'`});continue}n.push(t)}return{valid:n,invalid:r}}function mae(e,t){let n=[],r=[];for(let i of e){if(!i?.clauses||!Array.isArray(i.clauses)){r.push({field:``,message:`Group must have a clauses array`});continue}let{valid:e,invalid:a}=pae(i.clauses,t);r.push(...a),e.length>0&&n.push({logic:i.logic??`and`,negated:i.negated,clauses:e})}return{valid:n,invalid:r}}let RS=Xd(`foundation-notifications`),zS=null,BS=/* @__PURE__ */ new Map,VS=e=>`${e?.title??`Error`}: ${e?.body??`Something went wrong`}`,hae=e=>e?.logLevel||e?.config?.logLevel||Ad.debug,HS=e=>{RS.log({message:VS(e),level:hae(e)})},US=(e,t)=>{let n=document.querySelector(`#${e}`);if(!n){if(BS.has(e))n=BS.get(e);else{let t=df(document).find(t=>t.id===e);t&&(n=t,BS.set(e,t))}}if(!n){n=document.createElement(`div`),n.setAttribute(`id`,e),n.style.zIndex=`9999`;let{element:t,prefix:r}=mf(document.body,`rapid`);if(t)t.appendChild(n),zS=t;else if(zS)zS.appendChild(n);else{let e=document.createElement(`${r}-design-system-provider`);e.appendChild(n),document.body.appendChild(e),zS=e}}return n},gae=e=>{for(;e&&!(e instanceof ShadowRoot);){let t=(e?.getRootNode())?.getElementById(`banner-anchor`);if(t)return t.style.position=`relative`,t;e=e?.getRootNode()?.host}return _ae()},_ae=()=>{let e=document.createElement(`div`);return e.setAttribute(`id`,`banner-anchor`),e.style.position=`relative`,document.body.insertBefore(e,document.body.firstChild),e},vae=e=>{HS(e),alert(VS(e))},yae=(e,t,n)=>{HS(e);let r=t.split(`-`)[0],i=document.createElement(`${r}-banner`),a=gae(n);a?.children?.length>0&&(i.style.position=`absolute`,i.style.top=`0`,i.style.left=`0`,i.style.width=`100%`),a.appendChild(i),i.notification=e},bae=e=>{let t=e.querySelector(`#dialog-container`);return t||(t=document.createElement(`div`),t.setAttribute(`id`,`dialog-container`),t.style.position=`relative`,e.appendChild(t)),t},xae=(e,t,n)=>{HS(e);let r=t.split(`-`)[0],i=document.createElement(`${r}-dialog`);(n?bae(n):US(`dialog-container`,t)).appendChild(i),i.notification=e,i.show()};var WS;(function(e){e.NOTIFICATION_EVENT=`notification-event`})(WS||(WS={}));var GS;(function(e){e.Top=`top`,e.Bottom=`bottom`})(GS||(GS={}));var KS;(function(e){e.Left=`left`,e.Right=`right`})(KS||(KS={}));let qS=`12px`,Sae=(e,t,n)=>{e.style.position=`fixed`,e.style.top=t===GS.Top?qS:``,e.style.bottom=t===GS.Bottom?qS:``,e.style.left=n===KS.Left?qS:``,e.style.right=n===KS.Right?qS:``},Cae=(e,t)=>{HS(e);let n=t.split(`-`)[0],r=document.createElement(`${n}-snackbar`),i=e.config?.snackbar?.verticalEdge??GS.Bottom,a=e.config?.snackbar?.horizontalEdge??KS.Left,o=US(`snack-container-${i}-${a}`,t);o&&Sae(o,i,a),o.appendChild(r),r.notification=e},wae=e=>df(document.body).find(t=>t.tagName.toLowerCase()===`notify-container`&&t.position===e);function Tae(e,t){switch(t.style.position=`fixed`,e?.config?.toast?.position){case`top-left`:t.style.top=`var(--nav-height, 0)`,t.style.left=`0`;break;case`bottom-left`:t.style.bottom=`0`,t.style.left=`0`;break;case`bottom-right`:t.style.bottom=`0`,t.style.right=`0`;break;default:t.style.top=`var(--nav-height, 0)`,t.style.right=`0`}}let JS=(e,t,n)=>{var r,i;HS(e);let a=t.split(`-`)[0],o=e?.config?.toast?.position||`top-right`,s=n??wae(o)??US(`notify-container`,t);s&&s.tagName.toLowerCase()!==`notify-container`&&Tae(e,s);let c=document.createElement(`${a}-toast`),l=document.createElement(`div`);l.setAttribute(`slot`,`top`),l.textContent=e.title;let u=document.createElement(`div`);u.setAttribute(`slot`,`content`),u.textContent=e?.body||``;let d=document.createElement(`div`);d.setAttribute(`slot`,`date`),d.textContent=(e?.createdAt)?.toLocaleTimeString()||``;let f;e?.config?.toast?.buttons&&e?.config?.toast?.buttons?.length&&(f=document.createElement(`div`),f.setAttribute(`slot`,`bottom`),e.config.toast.buttons.forEach(t=>{let n=document.createElement(`${a}-button`);n.textContent=t.placeholder||`example placeholder`,n.addEventListener(`click`,()=>{let{details:r}=e.config.toast;if(t.action)return t.action({details:r,buttonElement:n,toastElement:c})}),t.appearance&&n.setAttribute(`appearance`,t.appearance),f.appendChild(n)})),c.setAttribute(`notify`,e?.config?.toast?.type||``),e.iconName&&c.setAttribute(`notification-icon`,e.iconName),(r=e?.config?.toast)!=null&&r.autoClose&&c.setAttribute(`auto-close`,`${e?.config?.toast?.autoClose}`),(i=e?.config?.toast)!=null&&i.closeTimeout&&c.setAttribute(`close-timeout`,`${e?.config?.toast?.closeTimeout}`),c.appendChild(l),c.appendChild(u),c.appendChild(d),f&&c.appendChild(f),s.prepend(c)},YS=(e,t,n)=>{if(!e.title)throw Error(`Title is required`);if(!e.body)throw Error(`Missing required param 'body'`);let r={title:e.title,body:e.body,iconName:e.iconName},i={};e.createdAt&&(r=Object.assign({createdAt:e.createdAt},r)),e.logLevel!=null&&(r=Object.assign({logLevel:e.logLevel},r)),e.toast&&(i=Object.assign({toast:e.toast},i),r=Object.assign({config:i},r)),JS(r,t,n)},Eae=O` :host{position: fixed;z-index: 9999;display: flex;flex-direction: column;gap: 4px;box-sizing: border-box;pointer-events: none;/* Allow clicks to pass through empty space */ width: 415px}.toast-container{padding: 0 8px 12px 12px;position: relative}/* Expanded / List State: Allow scrolling if too many items */ :host(:not([stack-collapsed])){max-height: calc(100% - var(--nav-height));overflow: hidden;pointer-events: auto;/* Enable pointer events for scrolling */ slot{display: block;height: calc(100vh - var(--nav-height) - 54px);position: relative}.toast-container{flex: 1;height: 100%;overflow-y: auto;overflow-x: hidden;scrollbar-color: var(--neutral-layer-3) transparent;&:hover{scrollbar-color: var(--neutral-layer-4) transparent}}}.header{display: flex;gap: 12px;pointer-events: none;margin: 5px 24px;justify-content: space-between;visibility: hidden;align-items: center;box-sizing: border-box;.header-title{text-shadow: 0 0 10px #000}.notification-header-buttons{display: flex;gap: 4px;rapid-icon{color: var(--neutral-foreground-hint);margin-left: 4px;display: inline-flex;font-size: 14px;&.chevron-up.collapse{transform: rotate(180deg);transition: transform 0.3s ease}}}--base-height-multiplier: 8;*[appearance='neutral']{font-size: 11px;cursor: pointer;background: var(--neutral-fill-rest)}}.header.visible{visibility: visible;pointer-events: auto;/* Enable clicks on header buttons */}:host([position$='left']) .header{justify-content: space-between}:host([position^='bottom']) .header{margin-bottom: 0;margin-top: 4px}/* Ensure children (toasts) are clickable */ ::slotted(*){pointer-events: auto}:host([position='top-right']){top: var(--nav-height, 0);right: 0}:host([position='top-left']){top: var(--nav-height, 0);left: 0}:host([position='bottom-right']){bottom: 0;right: 0;flex-direction: column-reverse}:host([position='bottom-left']){bottom: 0;left: 0;flex-direction: column-reverse}/* Stacked / Collapsed State */ :host([stack-collapsed]){height: min-content;/* Host allows pointer events so they can reach the slot */ pointer-events: auto;cursor: pointer}/* Apply the grid layout to the slot itself so it acts as the container and click target */ :host([stack-collapsed]) slot{display: grid;grid-template-columns: auto;grid-template-rows: auto;align-items: end;/* Default to bottom-up stacking */ justify-items: center;/* The slot catches the click */ pointer-events: auto}/* Rotate when the collapse class is present */ :host([stack-collapsed][position^='top']) slot{align-items: start}:host([stack-collapsed][position$='right']) slot{justify-items: end}:host([stack-collapsed][position$='left']) slot{justify-items: start}:host([stack-collapsed]) ::slotted(*){grid-area: 1 / 1;transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;opacity: 0%;pointer-events: none !important;/* Disable interaction with toasts in collapsed state */ transform: scale(0.9);top: 0 !important}/* Show and offset the top 3 items in the stack */ :host([stack-collapsed]) ::slotted([data-stack-index='0']){opacity: 100%;pointer-events: auto;transform: translateY(0) scale(1);z-index: 3;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='1']){opacity: 100%;transform: translateY(var(--stack-offset-y, 8px)) scale(0.95);z-index: 2;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='2']){opacity: 100%;transform: translateY(var(--stack-offset-y-2, 16px)) scale(0.9);z-index: 1;position: relative !important}/* Adjust offset direction based on position */ :host([stack-collapsed][position^='top']){--stack-offset-y: 8px;--stack-offset-y-2: 16px}:host([stack-collapsed][position^='bottom']){--stack-offset-y: -8px;--stack-offset-y-2: -16px}`,Dae=e=>T`<div class="header ${e=>pn([`visible`,e.slottedNodes.length>1])}">${A(e=>e.showCount,T`<span class="header-title">${e=>e.slottedNodes.length}Notifications</span>`)}<div class="notification-header-buttons">${A(e=>e.allowManualCollapse,T`<${e}-button @click=${e=>e.handleToggleCollapse()}>${e=>e.stackCollapsed?`Expand`:`Collapse`}<${e}-icon class="chevron-up ${e=>pn([`collapse`,e.stackCollapsed])}" name="chevron-up"></${e}-icon></${e}-button>`)} ${A(e=>e.allowCloseAll,T`<${e}-button @click=${e=>e.handleCloseAll()}>
|
|
251
|
+
</button></span>`)}</div>`)}<${e}-button class="criteria-toggle-button" appearance="outline" title=${e=>e.showingChips?`Add more criteria`:`View active filters`}?disabled=${e=>e.activeGroups.length===0||e.isInterpreting}@click=${e=>e.toggleCriteriaView()}><${e}-icon name="pen" size="sm"></${e}-icon></${e}-button><${e}-button class="criteria-clear-button" appearance="outline" title="Clear all filters" ?disabled=${e=>e.activeGroups.length===0||e.isInterpreting}@click=${e=>e.clearChips()}><${e}-icon name="trash-alt" size="sm"></${e}-icon></${e}-button>${A(e=>e.speechAvailable,T`<${e}-button class="mic-button" appearance="${e=>e.isRecording?`accent`:`outline`}" ?disabled=${e=>e.disabled||e.isInterpreting}@click=${e=>e.toggleSpeechInput()}title=${e=>e.isRecording?`Stop recording`:`Start voice input`}><${e}-icon class="mic-icon" name="microphone" size="lg" variant="solid"></${e}-icon></${e}-button>`)}</div></div>`)} `,CS=T` ${e=>SS(Py(e))} `,wS={contains:Gy.containsIgnoreCase,equals:Gy.EQ,startsWith:Gy.startsWith,endsWith:Gy.endsWith,greaterThan:Gy.GT,lessThan:Gy.LT,greaterThanOrEqual:Gy.GE,lessThanOrEqual:Gy.LE,notEqual:Gy.NE,dateIsToday:Gy.dateIsToday,dateIsAfter:Gy.dateIsGreaterEqual,dateIsGreaterEqual:Gy.dateIsGreaterEqual,dateIsBefore:Gy.dateIsLessEqual,dateIsLessEqual:Gy.dateIsLessEqual,dateIsEqual:Gy.dateIsEqual,dateTimeIsAfter:Gy.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:Gy.dateTimeIsGreaterEqual,dateTimeIsBefore:Gy.dateTimeIsLessEqual,dateTimeIsLessEqual:Gy.dateTimeIsLessEqual};function TS(e){let t=wS[e.operator];if(!t)throw Error(`Unknown criteria operator '${e.operator}'`);return new Xy().withField(e.field).withValue(e.value??null).withSerialiser(t).withGroup(`default`).build()}function ES(e,t){return e.length===1?e[0]:e.reduce((e,n,r)=>r===0?[n]:[...e,t,n],[])}function DS(e){let t=new Yy,n=!1;for(let r of e){if(!r.clauses?.length)continue;let e=r.clauses.map(TS),i=r.logic===`or`?Ry.Or():Ry.And(),a=ES(e,i),o=e.length>1?{join:i}:{};r.negated?t.And([Ry.Not(),a]):t.And(e.length===1?e[0]:e,o),n=!0}return n?t.build():``}let OS=[`contains`,`equals`,`startsWith`,`notEqual`],kS=[`equals`,`greaterThan`,`lessThan`,`greaterThanOrEqual`,`lessThanOrEqual`,`notEqual`],AS=[`dateIsToday`,`dateIsAfter`,`dateIsBefore`,`dateIsEqual`,`dateIsGreaterEqual`,`dateIsLessEqual`],jS=[`dateTimeIsAfter`,`dateTimeIsBefore`,`dateTimeIsGreaterEqual`,`dateTimeIsLessEqual`],MS={contains:`contains`,equals:`=`,startsWith:`starts with`,endsWith:`ends with`,notEqual:`≠`,greaterThan:`>`,lessThan:`<`,greaterThanOrEqual:`≥`,lessThanOrEqual:`≤`,dateIsToday:`is today`,dateIsAfter:`after`,dateIsBefore:`before`,dateIsEqual:`=`,dateIsGreaterEqual:`≥`,dateIsLessEqual:`≤`,dateTimeIsAfter:`after`,dateTimeIsBefore:`before`,dateTimeIsGreaterEqual:`≥`,dateTimeIsLessEqual:`≤`},NS=/* @__PURE__ */ new Set([`DATE`,`LOCALDATE`]),PS=/* @__PURE__ */ new Set([`DATETIME`,`NANO_TIMESTAMP`,`LOCALDATETIME`,`TIMESTAMP`]),FS=/* @__PURE__ */ new Set([`INT`,`INTEGER`,`LONG`,`SHORT`,`DOUBLE`,`BIGDECIMAL`,`DECIMAL`]);function IS(e){return(e||``).toUpperCase().trim().split(`(`)[0].trim()}function LS(e){let t=IS(e);return NS.has(t)?AS:PS.has(t)?jS:FS.has(t)?kS:OS}function uae(e){return FS.has(IS(e))}function dae(e){return e==null?!1:typeof e==`number`?!Number.isNaN(e)&&e>0:typeof e==`string`?/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e):!1}function fae(e){return e==null?!1:typeof e==`number`?!Number.isNaN(e):typeof e==`string`&&!Number.isNaN(Number(e))}function pae(e,t){let n=[],r=[],i=/* @__PURE__ */ new Map;Array.isArray(t)&&t.length>0&&(typeof t[0]==`string`?t.forEach(e=>i.set(e,void 0)):t.forEach(e=>i.set(e.NAME,e)));for(let t of e){let{field:e,operator:a,value:o}=t;if(!e||typeof e!=`string`){r.push({field:String(e),message:`Field name is required`});continue}let s=i.get(e),c=s&&`TYPE`in s?s.TYPE:`STRING`;if(!LS(c).includes(a)){r.push({field:e,operator:a,value:o,message:`Operator '${a}' is not allowed for field type ${c}`});continue}if((AS.includes(a)||jS.includes(a))&&a!==`dateIsToday`&&!dae(o)){r.push({field:e,operator:a,value:o,message:`Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch`});continue}if(uae(c)&&kS.includes(a)&&!fae(o)){r.push({field:e,operator:a,value:o,message:`Invalid numeric value`});continue}if(i.size>0&&!i.has(e)){r.push({field:e,operator:a,value:o,message:`Unknown field '${e}'`});continue}n.push(t)}return{valid:n,invalid:r}}function mae(e,t){let n=[],r=[];for(let i of e){if(!i?.clauses||!Array.isArray(i.clauses)){r.push({field:``,message:`Group must have a clauses array`});continue}let{valid:e,invalid:a}=pae(i.clauses,t);r.push(...a),e.length>0&&n.push({logic:i.logic??`and`,negated:i.negated,clauses:e})}return{valid:n,invalid:r}}let RS=Xd(`foundation-notifications`),zS=null,BS=/* @__PURE__ */ new Map,VS=e=>`${e?.title??`Error`}: ${e?.body??`Something went wrong`}`,hae=e=>e?.logLevel||e?.config?.logLevel||Ad.debug,HS=e=>{RS.log({message:VS(e),level:hae(e)})},US=(e,t)=>{let n=document.querySelector(`#${e}`);if(!n){if(BS.has(e))n=BS.get(e);else{let t=df(document).find(t=>t.id===e);t&&(n=t,BS.set(e,t))}}if(!n){n=document.createElement(`div`),n.setAttribute(`id`,e),n.style.zIndex=`9999`;let{element:t,prefix:r}=mf(document.body,`rapid`);if(t)t.appendChild(n),zS=t;else if(zS)zS.appendChild(n);else{let e=document.createElement(`${r}-design-system-provider`);e.appendChild(n),document.body.appendChild(e),zS=e}}return n},gae=e=>{for(;e&&!(e instanceof ShadowRoot);){let t=(e?.getRootNode())?.getElementById(`banner-anchor`);if(t)return t.style.position=`relative`,t;e=e?.getRootNode()?.host}return _ae()},_ae=()=>{let e=document.createElement(`div`);return e.setAttribute(`id`,`banner-anchor`),e.style.position=`relative`,document.body.insertBefore(e,document.body.firstChild),e},vae=e=>{HS(e),alert(VS(e))},yae=(e,t,n)=>{HS(e);let r=t.split(`-`)[0],i=document.createElement(`${r}-banner`),a=gae(n);a?.children?.length>0&&(i.style.position=`absolute`,i.style.top=`0`,i.style.left=`0`,i.style.width=`100%`),a.appendChild(i),i.notification=e},bae=e=>{let t=e.querySelector(`#dialog-container`);return t||(t=document.createElement(`div`),t.setAttribute(`id`,`dialog-container`),t.style.position=`relative`,e.appendChild(t)),t},xae=(e,t,n)=>{HS(e);let r=t.split(`-`)[0],i=document.createElement(`${r}-dialog`);(n?bae(n):US(`dialog-container`,t)).appendChild(i),i.notification=e,i.show()};var WS;(function(e){e.NOTIFICATION_EVENT=`notification-event`})(WS||(WS={}));var GS;(function(e){e.Top=`top`,e.Bottom=`bottom`})(GS||(GS={}));var KS;(function(e){e.Left=`left`,e.Right=`right`})(KS||(KS={}));let qS=`12px`,Sae=(e,t,n)=>{e.style.position=`fixed`,e.style.top=t===GS.Top?qS:``,e.style.bottom=t===GS.Bottom?qS:``,e.style.left=n===KS.Left?qS:``,e.style.right=n===KS.Right?qS:``},Cae=(e,t)=>{HS(e);let n=t.split(`-`)[0],r=document.createElement(`${n}-snackbar`),i=e.config?.snackbar?.verticalEdge??GS.Bottom,a=e.config?.snackbar?.horizontalEdge??KS.Left,o=US(`snack-container-${i}-${a}`,t);o&&Sae(o,i,a),o.appendChild(r),r.notification=e},wae=e=>df(document.body).find(t=>t.tagName.toLowerCase()===`notify-container`&&t.position===e);function Tae(e,t){switch(t.style.position=`fixed`,e?.config?.toast?.position){case`top-left`:t.style.top=`var(--nav-height, 0)`,t.style.left=`0`;break;case`bottom-left`:t.style.bottom=`0`,t.style.left=`0`;break;case`bottom-right`:t.style.bottom=`0`,t.style.right=`0`;break;default:t.style.top=`var(--nav-height, 0)`,t.style.right=`0`}}let JS=(e,t,n)=>{var r,i;HS(e);let a=t.split(`-`)[0],o=e?.config?.toast?.position||`top-right`,s=n??wae(o)??US(`notify-container`,t);s&&s.tagName.toLowerCase()!==`notify-container`&&Tae(e,s);let c=document.createElement(`${a}-toast`),l=document.createElement(`div`);l.setAttribute(`slot`,`top`),l.textContent=e.title;let u=document.createElement(`div`);u.setAttribute(`slot`,`content`),u.textContent=e?.body||``;let d=document.createElement(`div`);d.setAttribute(`slot`,`date`),d.textContent=(e?.createdAt)?.toLocaleTimeString()||``;let f;e?.config?.toast?.buttons&&e?.config?.toast?.buttons?.length&&(f=document.createElement(`div`),f.setAttribute(`slot`,`bottom`),e.config.toast.buttons.forEach(t=>{let n=document.createElement(`${a}-button`);n.textContent=t.placeholder||`example placeholder`,n.addEventListener(`click`,()=>{let{details:r}=e.config.toast;if(t.action)return t.action({details:r,buttonElement:n,toastElement:c})}),t.appearance&&n.setAttribute(`appearance`,t.appearance),f.appendChild(n)})),c.setAttribute(`notify`,e?.config?.toast?.type||``),e.iconName&&c.setAttribute(`notification-icon`,e.iconName),(r=e?.config?.toast)!=null&&r.autoClose&&c.setAttribute(`auto-close`,`${e?.config?.toast?.autoClose}`),(i=e?.config?.toast)!=null&&i.closeTimeout&&c.setAttribute(`close-timeout`,`${e?.config?.toast?.closeTimeout}`),c.appendChild(l),c.appendChild(u),c.appendChild(d),f&&c.appendChild(f),s.prepend(c)},YS=(e,t,n)=>{if(!e.title)throw Error(`Title is required`);if(!e.body)throw Error(`Missing required param 'body'`);let r={title:e.title,body:e.body,iconName:e.iconName},i={};e.createdAt&&(r=Object.assign({createdAt:e.createdAt},r)),e.logLevel!=null&&(r=Object.assign({logLevel:e.logLevel},r)),e.toast&&(i=Object.assign({toast:e.toast},i),r=Object.assign({config:i},r)),JS(r,t,n)},Eae=O` :host{position: fixed;z-index: 9999;display: flex;flex-direction: column;gap: 4px;box-sizing: border-box;pointer-events: none;/* Allow clicks to pass through empty space */ width: 415px}.toast-container{padding: 0 8px 12px 12px;position: relative}/* Expanded / List State: Allow scrolling if too many items */ :host(:not([stack-collapsed])){max-height: calc(100% - var(--nav-height));overflow: hidden;pointer-events: auto;/* Enable pointer events for scrolling */ slot{display: block;height: calc(100vh - var(--nav-height) - 54px);position: relative}.toast-container{flex: 1;height: 100%;overflow: hidden auto;scrollbar-color: var(--neutral-layer-3) transparent;&:hover{scrollbar-color: var(--neutral-layer-4) transparent}}}.header{display: flex;gap: 12px;pointer-events: none;margin: 5px 24px;justify-content: space-between;visibility: hidden;align-items: center;box-sizing: border-box;.header-title{text-shadow: 0 0 10px #000}.notification-header-buttons{display: flex;gap: 4px;rapid-icon{color: var(--neutral-foreground-hint);margin-left: 4px;display: inline-flex;font-size: 14px;&.chevron-up.collapse{transform: rotate(180deg);transition: transform 0.3s ease}}}--base-height-multiplier: 8;*[appearance='neutral']{font-size: 11px;cursor: pointer;background: var(--neutral-fill-rest)}}.header.visible{visibility: visible;pointer-events: auto;/* Enable clicks on header buttons */}:host([position$='left']) .header{justify-content: space-between}:host([position^='bottom']) .header{margin-bottom: 0;margin-top: 4px}/* Ensure children (toasts) are clickable */ ::slotted(*){pointer-events: auto}:host([position='top-right']){top: var(--nav-height, 0);right: 0}:host([position='top-left']){top: var(--nav-height, 0);left: 0}:host([position='bottom-right']){bottom: 0;right: 0;flex-direction: column-reverse}:host([position='bottom-left']){bottom: 0;left: 0;flex-direction: column-reverse}/* Stacked / Collapsed State */ :host([stack-collapsed]){height: min-content;/* Host allows pointer events so they can reach the slot */ pointer-events: auto;cursor: pointer}/* Apply the grid layout to the slot itself so it acts as the container and click target */ :host([stack-collapsed]) slot{display: grid;grid-template-columns: auto;grid-template-rows: auto;place-items: end center;/* Default to bottom-up stacking */ /* The slot catches the click */ pointer-events: auto}/* Rotate when the collapse class is present */ :host([stack-collapsed][position^='top']) slot{align-items: start}:host([stack-collapsed][position$='right']) slot{justify-items: end}:host([stack-collapsed][position$='left']) slot{justify-items: start}:host([stack-collapsed]) ::slotted(*){grid-area: 1 / 1;transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;opacity: 0%;pointer-events: none !important;/* Disable interaction with toasts in collapsed state */ transform: scale(0.9);top: 0 !important}/* Show and offset the top 3 items in the stack */ :host([stack-collapsed]) ::slotted([data-stack-index='0']){opacity: 100%;pointer-events: auto;transform: translateY(0) scale(1);z-index: 3;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='1']){opacity: 100%;transform: translateY(var(--stack-offset-y, 8px)) scale(0.95);z-index: 2;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='2']){opacity: 100%;transform: translateY(var(--stack-offset-y-2, 16px)) scale(0.9);z-index: 1;position: relative !important}/* Adjust offset direction based on position */ :host([stack-collapsed][position^='top']){--stack-offset-y: 8px;--stack-offset-y-2: 16px}:host([stack-collapsed][position^='bottom']){--stack-offset-y: -8px;--stack-offset-y-2: -16px}`,Dae=e=>T`<div class="header ${e=>pn([`visible`,e.slottedNodes.length>1])}">${A(e=>e.showCount,T`<span class="header-title">${e=>e.slottedNodes.length}Notifications</span>`)}<div class="notification-header-buttons">${A(e=>e.allowManualCollapse,T`<${e}-button @click=${e=>e.handleToggleCollapse()}>${e=>e.stackCollapsed?`Expand`:`Collapse`}<${e}-icon class="chevron-up ${e=>pn([`collapse`,e.stackCollapsed])}" name="chevron-up"></${e}-icon></${e}-button>`)} ${A(e=>e.allowCloseAll,T`<${e}-button @click=${e=>e.handleCloseAll()}>
|
|
252
252
|
Close All <${e}-icon name="xmark"></${e}-icon></${e}-button>`)}</div></div>`,Oae=T` ${A(e=>e.allowCloseAll||e.allowManualCollapse,T` ${e=>Dae(e.designSystemPrefix)} `)}<div class="toast-container"><slot ${xt(`slottedNodes`)}@click="${e=>e.handleContainerClick()}"></slot></div>`,XS=class extends Qe{constructor(){super(...arguments),this.position=`top-right`,this.stackThreshold=5,this.allowManualCollapse=!0,this.allowCloseAll=!0,this.designSystemPrefix=`rapid`,this.showCount=!0,this.stackCollapsed=!1,this.notificationInterval=0,this.manuallyExpanded=!1,this.pendingQueue=[],this.queueTimer=null,this.queuedNodes=/* @__PURE__ */ new Set,this.mutationObserver=null,this.knownNodes=/* @__PURE__ */ new Set,this.peekingNode=null,this.peekTimer=null,this.routeSubscriber={handleChange:()=>this.checkRoute(cp.shared.pathName)},this.slottedNodes=[]}connectedCallback(){super.connectedCallback(),(this.position===`bottom-left`||this.position===`bottom-right`)&&RS.error(`NotifyContainer doesn't currently support bottom corner placements`),S.getNotifier(cp.shared).subscribe(this.routeSubscriber,`pathName`),this.checkRoute(cp.shared.pathName),this.mutationObserver=new MutationObserver(e=>this.handleMutation(e)),this.mutationObserver.observe(this,{childList:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),S.getNotifier(cp.shared).unsubscribe(this.routeSubscriber,`pathName`),(e=this.mutationObserver)==null||e.disconnect(),this.mutationObserver=null}checkRoute(e){(e.includes(`/login`)||e.includes(`/logout`))&&(this.pendingQueue=[],this.queuedNodes.clear(),clearTimeout(this.queueTimer),this.queueTimer=null,this.handleCloseAll())}slottedNodesChanged(){if(!this.manuallyExpanded&&!this.stackCollapsed&&this.slottedNodes.length>this.stackThreshold&&(this.stackCollapsed=!0),this.stackCollapsed&&this.slottedNodes.length<=1&&(this.stackCollapsed=!1,this.manuallyExpanded=!1,this.cancelPeek()),this.stackCollapsed){let e=this.slottedNodes.filter(e=>e instanceof HTMLElement&&!this.knownNodes.has(e)).shift();e&&this.maybePeek(e)}this.knownNodes=new Set(this.slottedNodes),this.applySort()}handleContainerClick(){this.stackCollapsed&&(this.stackCollapsed=!1,this.manuallyExpanded=!0,this.cancelPeek())}handleToggleCollapse(){this.stackCollapsed=!this.stackCollapsed,this.manuallyExpanded=!this.stackCollapsed,this.stackCollapsed||this.cancelPeek()}handleCloseAll(){for(this.cancelPeek();this.firstChild;)this.removeChild(this.firstChild);this.stackCollapsed=!1,this.manuallyExpanded=!1}notificationIntervalChanged(e,t){!t&&this.pendingQueue&&this.flushQueue()}handleMutation(e){this.notificationInterval&&(e.forEach(e=>{e.addedNodes.forEach(e=>{e instanceof HTMLElement&&(this.queuedNodes.has(e)?this.queuedNodes.delete(e):(this.removeChild(e),this.pendingQueue.push(e)))})}),this.queueTimer||this.processQueue())}processQueue(){if(!this.pendingQueue.length){this.queueTimer=null;return}let e=this.pendingQueue.shift();this.queuedNodes.add(e),this.prepend(e),this.queueTimer=setTimeout(()=>{this.queueTimer=null,this.processQueue()},this.notificationInterval)}flushQueue(){for(clearTimeout(this.queueTimer),this.queueTimer=null;this.pendingQueue.length;){let e=this.pendingQueue.shift();this.queuedNodes.add(e),this.prepend(e)}}sortFnChanged(){this.applySort()}applySort(){let e=this.slottedNodes.filter(e=>e instanceof HTMLElement);if(!e.length)return;let t=this.sortFn&&e.length>1?[...e].sort(this.sortFn):e;this.peekingNode&&t.includes(this.peekingNode)?this.handlePosition([this.peekingNode,...t.filter(e=>e!==this.peekingNode)]):this.handlePosition(t)}maybePeek(e){let t=this.slottedNodes.filter(e=>e instanceof HTMLElement);if((this.sortFn&&t.length>1?[...t].sort(this.sortFn):t).indexOf(e)===0)return;this.cancelPeek(),this.peekingNode=e;let n=this.notificationInterval?this.notificationInterval/2:1500;this.peekTimer=setTimeout(()=>{this.peekingNode=null,this.peekTimer=null,this.applySort()},n)}cancelPeek(){clearTimeout(this.peekTimer),this.peekTimer=null,this.peekingNode=null}handlePosition(e){if(!e.length)return;e.forEach((t,n)=>{t.style.position=`absolute`,t.style.transition=`all 0.3s ease-in`,t.style.right=`0px`,t.style.zIndex=(e.length-n).toString(),t.dataset.stackIndex=n.toString()});let t=e.map(e=>e.offsetHeight);e.reduce((e,n,r)=>(n.style.top=`${e}px`,e+t[r]),0)}};q([D],XS.prototype,`position`,void 0),q([D({attribute:`stack-threshold`})],XS.prototype,`stackThreshold`,void 0),q([D({attribute:`allow-manual-collapse`,mode:`boolean`})],XS.prototype,`allowManualCollapse`,void 0),q([D({attribute:`allow-close-all`,mode:`boolean`})],XS.prototype,`allowCloseAll`,void 0),q([D({attribute:`design-system-prefix`})],XS.prototype,`designSystemPrefix`,void 0),q([D({attribute:`show-count`,mode:`boolean`})],XS.prototype,`showCount`,void 0),q([D({attribute:`stack-collapsed`,mode:`boolean`})],XS.prototype,`stackCollapsed`,void 0),q([D({attribute:`notification-interval`})],XS.prototype,`notificationInterval`,void 0),q([C],XS.prototype,`sortFn`,void 0),q([C],XS.prototype,`slottedNodes`,void 0),XS=q([$e({name:`notify-container`,template:Oae,styles:Eae})],XS);let ZS={alert:vae,toast:JS,dialog:xae,snackbar:Cae,banner:yae},QS=(e,t,n)=>{Object.keys(e?.config||{}).forEach(r=>{ZS[r]&&ZS[r](e,t,n)})};function kae(e){return e.length===0?``:e.length===1?e[0].message:e.map(e=>e.message).join(`; `)}function $S(e,t,n){t?.trim()&&QS({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:`error`}}},n)}var eC=class extends P{constructor(){super(...arguments),this.placeholder=`Describe your search criteria in natural language...`,this.inputValue=``,this.isInterpreting=!1,this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null}get speechAvailable(){return db()}get criteriaChips(){return this.activeGroups.flatMap((e,t)=>e.clauses.map((e,n)=>({groupIndex:t,clauseIndex:n,fieldLabel:this.getFieldLabel(e.field),operatorLabel:MS[e.operator]??e.operator,valueLabel:e.operator===`dateIsToday`?``:String(e.value??``)})))}getFieldLabel(e){if(!Array.isArray(this.fieldMetadata)||this.fieldMetadata.length===0||typeof this.fieldMetadata[0]==`string`)return e;let t=this.fieldMetadata.find(t=>t.NAME===e);return t?.UI_LABEL??t?.NAME??e}toggleCriteriaView(){this.showingChips?(this.inputValue=``,this.showingChips=!1):this.showingChips=!0}removeChip(e,t){var n;let r=this.activeGroups.map(e=>Object.assign(Object.assign({},e),{clauses:[...e.clauses]}));(n=r[e])==null||n.clauses.splice(t,1);let i=r.filter(e=>e.clauses.length>0);if(this.activeGroups=i,i.length===0)this.showingChips=!1,this.lastValidCriteria=null,this.$emit(`criteria-changed`,null);else{let e=DS(i);this.lastValidCriteria=e,this.$emit(`criteria-changed`,e)}}clearChips(){this.activeGroups=[],this.showingChips=!1,this.lastValidCriteria=null,this.$emit(`criteria-changed`,null)}handleSubmit(){return J(this,void 0,void 0,function*(){let e=this.inputValue?.trim();if(!e||this.isInterpreting)return;let t=this.providerRegistry?.default();if(!t?.interpretCriteria){$S(`AI criteria search`,`AI provider not configured`,Py(this));return}this.isInterpreting=!0;try{let n=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],r=yield t.interpretCriteria(e,{fields:n});if(!(r?.groups)?.some(e=>e.clauses?.length)){$S(`AI criteria search`,`AI could not interpret the criteria`,Py(this)),this.isInterpreting=!1;return}let{valid:i,invalid:a}=mae(r.groups,this.fieldMetadata);if(a.length>0&&($S(`Criteria validation error`,kae(a),Py(this)),this.$emit(`validation-errors`,a)),i.length>0){let e=[...this.activeGroups,...i],t=DS(e);this.lastValidCriteria=t,this.activeGroups=e,this.inputValue=``,this.showingChips=!0,this.$emit(`criteria-changed`,t)}}catch(e){$S(`AI criteria search`,e instanceof Error?e.message:`Interpretation failed`,Py(this))}finally{this.isInterpreting=!1}})}handleBlur(){this.isRecording||(this.inputValue?.trim()?this.handleSubmit():this.activeGroups.length>0&&(this.showingChips=!0))}clear(){this.inputValue=``,this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.$emit(`criteria-changed`,null)}toggleSpeechInput(){if(this.isRecording&&this.stopRecording){this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,this.isRecording=!1;return}this.inputValue=``,this.showingChips=!1,this.stopRecording=fb((e,t)=>{this.inputValue=e,t&&e?.trim()&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}};q([vS],eC.prototype,`providerRegistry`,void 0),q([D],eC.prototype,`placeholder`,void 0),q([D({mode:`boolean`})],eC.prototype,`disabled`,void 0),q([C],eC.prototype,`inputValue`,void 0),q([C],eC.prototype,`isInterpreting`,void 0),q([C],eC.prototype,`lastValidCriteria`,void 0),q([C],eC.prototype,`activeGroups`,void 0),q([C],eC.prototype,`showingChips`,void 0),q([C],eC.prototype,`fieldMetadata`,void 0),q([C],eC.prototype,`isRecording`,void 0),q([w],eC.prototype,`speechAvailable`,null),q([w],eC.prototype,`criteriaChips`,null);let tC={};eC.compose(Object.assign({baseName:`ai-criteria-search`,template:CS,styles:xS,shadowOptions:void 0},tC));let nC=(e,t)=>O` :host{display: flex;justify-content: center;align-items: center;width: 100%;margin: calc(var(--design-unit) * 2px) 0;position: relative;/* Same as connection indicator */ --green: 50 164 49;--trafic-light-green: rgb(var(--green));--red: 187 30 16;--trafic-light-red: rgb(var(--red));--amber: 230 160 20;--trafic-light-amber: rgb(var(--amber))}.ai-indicator-container{display: flex;flex-direction: column;align-items: center;position: relative}.ai-indicator-badge{display: inline-flex;align-items: center;gap: calc(var(--design-unit) * 1.4px);font-size: 12px;line-height: 1;font-weight: 600;text-transform: uppercase;height: calc(var(--design-unit) * 6px);padding: calc(var(--design-unit) * 0.5px) calc(var(--design-unit) * 2px);border-radius: calc(var(--design-unit) * 1px);cursor: pointer;color: #fff}.ai-indicator-badge:hover{opacity: 90%}.ai-indicator-badge.green{background: var(--trafic-light-green)}.ai-indicator-badge.amber{background: var(--trafic-light-amber)}.ai-indicator-badge.red{background: var(--trafic-light-red)}.ai-indicator-badge .ai-indicator-icon{flex-shrink: 0;color: inherit}.ai-indicator-badge.pulsing{animation: ai-indicator-pulse 1.5s ease-in-out infinite}@keyframes ai-indicator-pulse{0%, 100%{opacity: 100%}50%{opacity: 50%}}.ai-indicator-dropdown{position: absolute;top: 100%;right: 0;margin-top: calc(var(--design-unit) * 2px);min-width: 200px;padding: calc(var(--design-unit) * 4px);background: var(--neutral-layer-floating, #fff);border: 1px solid var(--neutral-stroke-rest, #e0e0e0);border-radius: calc(var(--design-unit) * 2px);box-shadow: 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * 4px) rgb(0 0 0 / 12%);z-index: 1000}.ai-indicator-info{display: flex;flex-direction: column;gap: 0;margin: 0;padding: 0}.ai-indicator-info .info-row{display: grid;grid-template-columns: 72px 1fr;gap: calc(var(--design-unit) * 4px);align-items: baseline;padding: calc(var(--design-unit) * 1.5px) 0;border-bottom: 1px solid var(--neutral-stroke-subtle, #eee)}.ai-indicator-info .info-row:last-child{border-bottom: none}.ai-indicator-info .info-label{margin: 0;font-size: var(--type-ramp-base-font-size);font-weight: 500;color: var(--neutral-foreground-hint, #666)}.ai-indicator-info .info-value{margin: 0;font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-rest, #333);text-transform: capitalize;word-break: break-word}.install-button{margin-top: calc(var(--design-unit) * 3px);width: 100%}`,Aae=e=>T` ${A(()=>lb(),T`<div class="ai-indicator-container" part="ai-indicator-container"><div class=${e=>pn(`ai-indicator-badge`,[`green`,e.state===`available`||e.state===`server`],[`amber`,e.state===`downloading`||e.state===`downloadable`],[`red`,e.state===`unavailable`||e.state===`none`],[`pulsing`,e.state===`downloading`||e.isInstalling])}data-test-id="ai-indicator-badge" part="ai-indicator-badge" role="button" tabindex="0" aria-label="AI status" aria-haspopup="true" aria-expanded="${e=>e.open}" @click=${e=>e.toggleDropdown()}@keydown=${(e,t)=>{let n=t.event;(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),e.toggleDropdown())}}><${e}-icon class="ai-indicator-icon" name="wand-magic-sparkles" size="xs" variant="solid" part="ai-indicator-icon"></${e}-icon><span class="ai-indicator-text" data-test-id="ai-indicator-text" part="ai-indicator-text">AI</span></div>${A(e=>e.open,T`<div class="ai-indicator-dropdown" part="ai-indicator-dropdown"><dl class="ai-indicator-info"><div class="info-row"><dt class="info-label">Provider</dt><dd class="info-value">${e=>e.status?.provider??`none`}</dd></div><div class="info-row"><dt class="info-label">Model</dt><dd class="info-value">${e=>e.status?.model||`—`}</dd></div>${A(e=>e.chromeStatusLabel,T`<div class="info-row"><dt class="info-label">Status</dt><dd class="info-value">${e=>e.chromeStatusLabel}</dd></div>`)}</dl>${A(e=>e.canInstall,T`<${e}-button class="install-button" appearance="accent" @click=${(e,t)=>{t.event.preventDefault(),e.onInstall()}}>
|
|
253
|
-
Install model </${e}-button>`)}</div>`)}</div>`)} `,rC=T` ${e=>Aae(Py(e))} `;var iC=class extends P{constructor(){super(...arguments),this.status=null,this.open=!1,this.state=`none`,this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get aiProvider(){return this.providerRegistry?.default()}get chromeStatusLabel(){if(this.status?.provider!==`chrome`)return null;let e=this.status?.chromeAvailability;return e===`available`?`Installed`:e===`downloading`||this.isInstalling?`Downloading…`:e===`downloadable`?`Downloadable`:e===`unavailable`?`Unavailable`:null}get canInstall(){return!!this.aiProvider?.triggerDownload&&this.status?.provider===`chrome`&&this.status?.chromeAvailability===`downloadable`&&!this.isInstalling}get isDownloading(){return this.status?.chromeAvailability===`downloading`||this.isInstalling}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener(`mousedown`,this.clickOutside)}openChanged(){this.open?(document.addEventListener(`mousedown`,this.clickOutside),this.refreshStatus()):document.removeEventListener(`mousedown`,this.clickOutside)}handleClickOutside(e){My(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return J(this,void 0,void 0,function*(){if(!this.aiProvider?.getStatus){this.status=null,this.state=`none`;return}try{let e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),this.state===`available`&&(this.isInstalling=!1)}catch{this.status=null,this.state=`none`,this.isInstalling=!1}})}deriveState(e){if(!e||e.provider===`none`)return`none`;if(e.provider===`chrome`){let t=e.chromeAvailability;return t===`available`?`available`:t===`downloading`?`downloading`:t===`downloadable`?`downloadable`:`unavailable`}return`server`}maybeStartPolling(){this.status?.chromeAvailability===`downloading`||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return J(this,void 0,void 0,function*(){if(this.canInstall&&this.aiProvider?.triggerDownload){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch{this.isInstalling=!1}finally{yield this.refreshStatus()}}})}};q([vS],iC.prototype,`providerRegistry`,void 0),q([C],iC.prototype,`status`,void 0),q([C],iC.prototype,`open`,void 0),q([C],iC.prototype,`state`,void 0),q([C],iC.prototype,`isInstalling`,void 0),q([w],iC.prototype,`chromeStatusLabel`,null),q([w],iC.prototype,`canInstall`,null),q([w],iC.prototype,`isDownloading`,null),iC.compose({baseName:`ai-indicator`,template:rC,styles:nC});let aC=(e,t)=>Un(e,t),oC=(e,t)=>O` ${Jl(e,t)}`;var sC=class extends Yl{};let cC={delegatesFocus:!0,mode:`open`},lC={};sC.compose(Object.assign({baseName:`anchor`,template:aC,styles:oC,shadowOptions:cC},lC));let uC=(e,t)=>qn(e,t),dC=(e,t)=>O` ${Xl(e,t)}`;var fC=class extends Yn{};let pC={delegatesFocus:!0,mode:`open`},mC={};fC.compose(Object.assign({baseName:`anchored-region`,template:uC,styles:dC,shadowOptions:pC},mC));let hC=(e,t)=>rr(e,t),jae=T` ${A(e=>e.imgSrc,T`<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />`)} `,gC=(e,t)=>O` ${Zl(e,t)}`;var _C=class extends Ql{};let vC={delegatesFocus:!0,mode:`open`},yC={media:jae};_C.compose(Object.assign({baseName:`avatar`,template:hC,styles:gC,shadowOptions:vC},yC));let bC=(e,t)=>ar(e,t),xC=(e,t)=>O` ${$l(e,t)}`;var SC=class extends or{};let CC={};SC.compose(Object.assign({baseName:`badge`,template:bC,styles:xC,shadowOptions:void 0},CC));let wC=O` @keyframes delete-animate{from{height: 100px;opacity: 100%}to{height: 0;opacity: 0%}}@keyframes append-animate{from{height: 0;opacity: 0%}to{height: var(--banner-height);opacity: 100%}}:host{--banner-width: 100%;--banner-height: 65px;--flow: row}@media screen and (max-width: 640px){:host{--flow: column;--banner-height: 100px}}.banner{animation: append-animate 0.3s linear;width: var(--banner-width);height: var(--banner-height);background-color: var(--fill-color);display: flex;flex-direction: var(--flow);padding: 5px 8px;box-sizing: border-box;overflow: hidden}.banner-delete{animation: delete-animate 0.3s linear;opacity: 0%}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,Mae=e=>T`<div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${k(`banner`)}><div part="content" class="content"><slot name="content">${A(e=>e.notification,T`<div><div>${e=>e.notification?.body||`Place holder for notification message`}</div></div>`)}</slot></div><div part="action" class="action"><slot name="action" class="action">${A(e=>e.notification,T`<${e}-button slot="action" appearance="lightweight" @click=${e=>e.dismiss()}>${e=>e.notification?.config?.banner?.dismissingAction?.label||`Ignore`}</${e}-button>`)} ${j(e=>(e.notification?.config)?.banner.confirmingActions,T`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var n;e?.action(),(n=t.parent)==null||n.dismissNotification()}}>${e=>e.label}</${e}-button>`)}</slot></div></div>`,TC=T` ${e=>Mae(Py(e))} `,EC={mode:`open`,delegatesFocus:!0};var DC=class extends P{constructor(){super(...arguments),this.dismissAnimation=``}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation=`banner-delete`,new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return J(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){Ay.error(e)}})}};q([C],DC.prototype,`dismissAnimation`,void 0),q([C],DC.prototype,`notification`,void 0),DC.compose({baseName:`banner`,styles:wC,template:TC,shadowOptions:EC});let OC=(e,t)=>lr(e,t),kC=(e,t)=>O` ${tu(e,t)}`;var AC=class extends ur{};AC.compose(Object.assign({baseName:`breadcrumb`,template:OC,styles:kC,shadowOptions:void 0},{}));let jC=(e,t)=>sr(e,t),MC=(e,t)=>O` ${eu(e,t)}`;var NC=class extends cr{};let PC={separator:`/`};NC.compose(Object.assign({baseName:`breadcrumb-item`,template:jC,styles:MC,shadowOptions:void 0},PC));let FC=(e,t)=>dr(e,t),IC=(e,t)=>O` ${nu(e,t)}`;var LC=class extends ru{};let RC={delegatesFocus:!0,mode:`open`},zC={};LC.compose(Object.assign({baseName:`button`,template:FC,styles:IC,shadowOptions:RC},zC));let BC=()=>O` ${iu}`,VC=(e,t)=>Nr(e,t);var HC=class extends Cr{};let UC={delegatesFocus:!0,mode:`open`},WC={};HC.compose(Object.assign({baseName:`calendar`,template:VC,styles:BC,shadowOptions:UC},WC));let GC=(e,t)=>Pr(e,t),KC=(e,t)=>O` ${au(e,t)} :host{background-color: var(--fui-card-fill-color);color: var(--fui-card-foreground-color)}`;var qC=class extends ou{};let JC={};qC.compose(Object.assign({baseName:`card`,template:GC,styles:KC,shadowOptions:void 0},JC));var YC;(function(e){e.BELOW=`below`,e.ABOVE=`above`})(YC||(YC={}));var XC=/* @__PURE__ */ u((/* @__PURE__ */ s(((e,t)=>{var n=NaN,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=typeof global==`object`&&global&&global.Object===Object&&global,l=typeof self==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,h=!0;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=y(t)||0,g(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?f(y(n.maxWait)||0,t):a,h=`trailing`in n?!!n.trailing:h);function _(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function v(e){return l=e,s=setTimeout(x,t),u?_(e):o}function b(e){var n=e-c,r=e-l,i=t-n;return d?p(i,a-r):i}function ee(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function x(){var e=m();if(ee(e))return te(e);s=setTimeout(x,b(e))}function te(e){return s=void 0,h&&r?_(e):(r=i=void 0,o)}function ne(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function S(){return s===void 0?o:te(m())}function C(){var e=m(),n=ee(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return v(c);if(d)return s=setTimeout(x,t),_(c)}return s===void 0&&(s=setTimeout(x,t)),o}return C.cancel=ne,C.flush=S,C}function g(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function _(e){return!!e&&typeof e==`object`}function v(e){return typeof e==`symbol`||_(e)&&d.call(e)==`[object Symbol]`}function y(e){if(typeof e==`number`)return e;if(v(e))return n;if(g(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=g(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?n:+e}t.exports=h})))());let ZC=O` :host{--scrollbar-width: 12px;--scrollbar-thumb-width: 8px}.root{position: relative;width: inherit;min-width: 250px}.control{cursor: pointer;position: relative;display: flex;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}#display-field{width: 100%;cursor: pointer;color: var(--neutral-foreground-rest);min-height: 40px;padding: 0 calc(var(--design-unit) * 2.25px);border-width: 0;background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px)}#display-field[disabled]{cursor: not-allowed;opacity: 30%}#display-field:focus{outline: 1px solid var(--accent-fill-rest);background: var(--neutral-fill-input-rest);border-style: none;box-shadow: none}#display-field:hover:not(:focus):not([disabled]){outline: 1px solid var(--neutral-stroke-hover)}button{pointer-events: none}.indicator{position: absolute;left: calc(100% - 26px);padding: 0;cursor: pointer}#arrow-icon{width: 16px;fill: white;transform: rotate(0deg);transition: transform 0.2s linear 0s}#arrow-icon.flipped{transform: rotate(180deg)}.disabled-svg{pointer-events: none;opacity: 30%}.position-above{bottom: 100%}::-webkit-scrollbar{width: var(--scrollbar-width)}::-webkit-scrollbar-track{background: var(--neutral-layer-4)}::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}::-webkit-scrollbar-corner{background: var(--neutral-layer-4)}.multiselect-dropdown{display: flex;flex-direction: column;position: absolute;height: max-content;overflow: hidden;margin-top: calc(var(--design-unit) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;z-index: 999}.multiselect-dropdown:not(.is-resizing){transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s}.checkbox-container{display: flex;flex-direction: column;list-style: none;overflow-y: auto;height: 100%}.is-resizing .checkbox-container{overflow-y: hidden}.checkbox-container zero-checkbox{min-width: fit-content}.checkbox-container zero-checkbox[disabled], .checkbox-container foundation-checkbox[disabled]{cursor: not-allowed}.visible{visibility: visible;max-height: var(--custom-max-height, ${`230`}px);overflow: hidden}::slotted(foundation-checkbox), foundation-checkbox{border-bottom: 1px solid var(--neutral-layer-4);padding: 5px 0 5px 5px;margin: 0}::slotted(foundation-checkbox:hover), foundation-checkbox:hover{background-color: var(--neutral-layer-3);cursor: pointer}::slotted(foundation-checkbox)::part(label), foundation-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}ol, li{margin: 0;padding: 0}.checkbox{width: 100%}.select-all{width: 100%;margin-left: 0;margin-right: 0}.display-value{position: absolute;right: 40px;color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font)}.options-header-item-hidden{display: none}.resize-button{position: absolute;bottom: 0;right: 0;width: 12px;height: 12px;cursor: nw-resize;background: linear-gradient( -45deg, transparent 30%, var(--neutral-foreground-rest) 30%, var(--neutral-foreground-rest) 40%, transparent 40%, transparent 60%, var(--neutral-foreground-rest) 60%, var(--neutral-foreground-rest) 70%, transparent 70% );z-index: 1000;opacity: 60%;transition: opacity 0.2s ease}.resize-button:hover{opacity: 100%}.multiselect-dropdown.resizable{resize: none;overflow: hidden}`;var QC;let $C=QC=class extends jy{constructor(){super(...arguments),this.emptyDataLabel=`No matching records`,this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=QC.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria=``,this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{e.detail?.open&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{let e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{let t=e.target.value,n=this.options?.find(e=>String(e.label)===t);!n&&this.allowCustomOptions&&this.select instanceof du?this.select.$emit(`value-change`,{label:t,value:t}):this.select.$emit(`value-change`,n)}}initialSelectedValueChanged(e,t){if(t!==e){if(!t){this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData());return}this.select&&this.getDisplayForValue(t)===String(this.select.value||``)||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData())}}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?this.valueField?.concat(` `,this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=this.optionElement??`${Py(this.select)}-option`,this.select.addEventListener(`change`,this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:QC.defaultPageSize,this.select.addEventListener(`open-change`,this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;x.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||Ay.warn(`Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")`)})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),(e=this.listboxElement)==null||e.removeEventListener(`scroll`,this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener(`open-change`,this.selectOpenChangeHandler),this.select.removeEventListener(`change`,this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return J(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{let e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==Sg.DATASERVER}catch(e){Ay.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e;if(this.isConnected){if((e=this.listboxElement)==null||e.removeEventListener(`scroll`,this.listboxScrollHandler),this.listboxElement=this.select?.scrollableListbox??this.select?.listbox??(this.select?.shadowRoot)?.querySelector(`.listbox`),!this.listboxElement){Ay.warn(`Unable to locate listbox element, infinite scroll will not be available.`);return}this.listboxElement.addEventListener(`scroll`,this.listboxScrollHandler)}}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-QC.scrollLoadThresholdPx}loadNextPage(){return J(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;let e=this.datasource.resourceType===Sg.REQUEST_SERVER;try{yield this.requestMoreRows()}catch{this.loadingMoreRows=!1;return}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;let e=this.listboxElement;e&&e.clientHeight!==0&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof du&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return J(this,void 0,void 0,function*(){if(!(yield this.datasource.init(this.datasourceOptions(),!0))){this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:`error`});return}eb(this,this.initialSelectedValue)})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof QC||this.select.removeChild(e)}),this.select.value=``,this.select.initialValue=``)}checkOverflow(e){let t=e.shadowRoot.querySelector(`.content`);t&&(t.scrollWidth>t.clientWidth?e.setAttribute(`title`,e.textContent):e.removeAttribute(`title`))}rowToOption(e){return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],this.getFieldMetadata(this.labelField)?.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{let n=document.createElement(this.optionElement);n.textContent=t||e,n.value=e,this.select.appendChild(n),this.resizeObserver.observe(n)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;let t=e??Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));let e=this.renderedOptionsCount===0;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof du&&!this.select.async&&e){this.resetCombobox();let e=this.getInitialLabel();x.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof du&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof du&&!this.select.async)&&(this.resetCombobox(),x.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){let e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value=``,e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){if(e==null||e!==0&&!e)return``;let t=this.options?.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof du?String(t?t.label:e):t?String(t.label):``}resetCombobox(){this.select&&this.select instanceof du&&this.select.resetCombobox()}handleStreamInserts(e){if(this.loadingMoreRows=!1,!e?.length)return;this.removeEmptyDataOption();let t=new Set((this.options??[]).map(e=>String(e.value))),n=e.filter(e=>!t.has(String(e[this.valueField])));if(!n.length){Ay.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),this.moreRowsAvailable=!1;return}let r=n.map(e=>this.rowToOption(e));this.options=[...this.options??[],...r],this.renderListboxOptions(r),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){Ay.debug(`handleStreamDeletes - Method not implemented.`)}handleStreamUpdates(e){Ay.debug(`handleStreamUpdates - Method not implemented.`)}};$C.defaultPageSize=20,$C.scrollLoadThresholdPx=32,q([ay],$C.prototype,`resources`,void 0),q([D({attribute:`label-field`})],$C.prototype,`labelField`,void 0),q([D({attribute:`option-element`})],$C.prototype,`optionElement`,void 0),q([D({attribute:`value-field`})],$C.prototype,`valueField`,void 0),q([D({attribute:`empty-data-label`})],$C.prototype,`emptyDataLabel`,void 0),q([D({mode:`boolean`,attribute:`allow-custom-options`})],$C.prototype,`allowCustomOptions`,void 0),q([D({mode:`boolean`,attribute:`infinite-scroll`})],$C.prototype,`infiniteScroll`,void 0),q([D({attribute:`page-size`,converter:E})],$C.prototype,`pageSize`,void 0),q([C],$C.prototype,`labelFormatter`,void 0),q([C],$C.prototype,`labelRowFormatter`,void 0),q([C],$C.prototype,`initialSelectedValue`,void 0),$C=QC=q([$e({name:`options-datasource`})],$C);let ew=class extends jy{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=``}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?this.valueField?.concat(` `,this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||Ay.warn(`Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")`)})}clearData(){this.select.options=[]}syncComponentData(e){let t=(e??Array.from(this.rowsSyncedWithStream.values())).map(e=>({value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],this.getFieldMetadata(this.labelField)?.type)}));this.select?.async&&(this.select.loading=!1),this.select.options=t}handleStreamInserts(e){Ay.debug(`handleStreamInserts - Method not implemented.`)}handleStreamDeletes(e){Ay.debug(`handleStreamDeletes - Method not implemented.`)}handleStreamUpdates(e){Ay.debug(`handleStreamUpdates - Method not implemented.`)}};q([D({attribute:`value-field`})],ew.prototype,`valueField`,void 0),q([D({attribute:`label-field`})],ew.prototype,`labelField`,void 0),ew=q([$e({name:`multiselect-datasource`})],ew);let tw=(e=`foundation`)=>T`<label part="label" for="display-field" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot name="label" ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><div class="root" part="root" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control"><input id="display-field" part="filter-search" role="combobox" aria-haspopup="listbox" aria-controls="checkbox-container" aria-expanded=${e=>e.open?`true`:`false`}tabindex="${e=>e.tabindex}" ?readonly=${e=>!e.search}@click=${e=>e.toggle()}?disabled="${e=>e.disabled}" ${k(`filterSearchInput`)}value=${Af(e=>e.filterSearchValue,`string`,`input`)}placeholder="${e=>e.getDisplayValue}" autocomplete="off" @input=${(e,t)=>e.inputHandler()}@change=${(e,t)=>e.changeHandler(t.event)}/><div part="indicator" class="indicator" @click=${e=>!e.disabled&&e.toggle()}><svg viewBox="0 0 12 7" ${k(`arrowIcon`)}id="arrow-icon" class="${e=>pn([`disabled-svg`,e.disabled])}" xmlns="http://www.w3.org/2000/svg"><path d="${`M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z`}" /></svg></div>${A(e=>e.filterSearchValue&&e.selectedOptions.length,T`<div class="display-value">${e=>e.getDisplayValue}</div>`)}</div>${A(e=>e.loading,T`<${e}-progress slot="indicator"></${e}-progress>`)}<section class=${e=>pn(`multiselect-dropdown`,[`resizable`,e.resizable])} ${k(`multiselectDropdown`)}part="multiselect-dropdown">${A(e=>e.resizable,T`<div class="resize-button" @mousedown=${(e,t)=>e.handleResizeStart(t.event)}></div>`)} ${A(e=>e.all,T`<${e}-button class="select-all" @click=${e=>e.selectCheckboxAll()}?disabled="${(e,t)=>e.isAllOptionsDisabled}">${e=>e.areAllOptionsSelected?`Deselect All`:`Select All`} ${e=>e.name}</${e}-button>`)}<ol id="checkbox-container" class="checkbox-container options" aria-multiselectable="true" part="options-ol"><li part="options-header-item" class=${e=>pn(`options-header-item`,[`options-header-item-hidden`,!e.optionsHeaderSlottedNodes?.length])}><slot name="options-header" ${xt({property:`optionsHeaderSlottedNodes`,filter:xa})}></slot></li>${j(e=>e.filteredAvailableOptions,T`<li role="option" value=${(e,t)=>t.parent.getItemLabel(e)}part="option"><${e}-checkbox part="checkbox" class="checkbox" exportparts="label:checkbox-label" @keydown=${(e,t)=>t.parent.checkboxKeyDown(e,t.event)}@click=${(e,t)=>t.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parent.isOptionDisabled(e)}">${(e,t)=>{var n;return((n=t.parent)?.itemRenderer)?.call(n,e,t.parent)}}</${e}-checkbox></li>`)}</ol>${A(e=>e.showCreatable,T`<${e}-button @click=${e=>e.addOption()}>Create "${e=>e.filterSearchValue}"</${e}-button>`)}</section></div><slot ${xt({property:`slottedDatasource`,filter:e=>e instanceof ew})}></slot>`,Nae=T` ${tw()} `,nw={};var rw=class extends P{constructor(){super(...arguments),this.name=``,this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue=``,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=YC.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add(`is-resizing`),document.addEventListener(`mousemove`,this.handleResizeMove),document.addEventListener(`mouseup`,this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();let t=e.clientX-this.startX,n=e.clientY-this.startY,r=Math.max(250,this.startWidth+t),i=Math.max(100,this.startHeight+n);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${r}px`,this.multiselectDropdown.style.maxHeight=`${i}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener(`mousemove`,this.handleResizeMove),document.removeEventListener(`mouseup`,this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove(`is-resizing`),this.multiselectDropdown.style.setProperty(`--custom-max-height`,this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty(`max-height`))}}debounceChanged(e,t){this.debouncedInputHandler=(0,XC.default)(this.asyncSetFilter,t)}openChanged(e,t){var n,r,i,a;t?(document.addEventListener(`mousedown`,this.clickOutside),(n=this.arrowIcon)==null||n.classList.add(`flipped`),(r=this.multiselectDropdown)==null||r.classList.add(`visible`)):(document.removeEventListener(`mousedown`,this.clickOutside),(i=this.arrowIcon)==null||i.classList.remove(`flipped`),(a=this.multiselectDropdown)==null||a.classList.remove(`visible`))}connectedCallback(){var e;super.connectedCallback(),this.position===YC.ABOVE&&((e=this.multiselectDropdown)==null||e.classList.add(`position-above`))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`mousedown`,this.clickOutside),document.removeEventListener(`mousemove`,this.handleResizeMove),document.removeEventListener(`mouseup`,this.handleResizeEnd)}defaultItemRenderer(e,t){return T` ${typeof e==`string`?T`<span part="option-label">${()=>t.getItemLabel(e)}</span>`:T`<span data-option-label-text=${()=>e.optionLabelText}style=${()=>e.labelStyle}part="option-label">${()=>t.getItemLabel(e)}</span>`} `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){if(this.$fastController.isConnected){this.initialisedOptions=!0;return}}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.getBoundingClientRect(),n=window.innerHeight,r=t.top,i=n-t.bottom;e=i<230&&r>i?YC.ABOVE:YC.BELOW}this.multiselectDropdown.classList.toggle(`position-above`,e===YC.ABOVE),this.multiselectDropdown.classList.toggle(`position-below`,e===YC.BELOW)}optionValueGetter(e){return typeof e==`string`?e:e.value}optionLabelGetter(e){return typeof e==`string`?e:e.label}getItemLabel(e){let t;return e?(t=typeof e==`string`?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||``,this.valueFormatter?this.valueFormatter(t):t):``}isOptionDisabled(e){return!e||typeof e==`string`?!1:e.disabled||!1}get getDisplayValue(){let e=``;switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{let t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat(`...`)}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){let e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&this.findExactMatchOptions().length===0}isOptionSelected(e){let t=this.optionValueGetter(e);return this.selectedOptions.some(n=>{if(typeof e==`object`&&typeof e.value==`object`)try{return JSON.stringify(n)===JSON.stringify(t)}catch{return n===t}return n===t})}selectCheckboxOne(e){let t=this.optionValueGetter(e);this.selectedOptions=this.selectedOptions.includes(t)?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit(`selectionChange`,this.selectedOptions)}checkboxKeyDown(e,t){return t.key===` `&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){let e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit(`selectionChange`,this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){let e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>((typeof t==`string`?t:this.optionLabelGetter(t)??this.optionValueGetter(t))?.toLowerCase()??``)===e)}setFilter(){let e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if(typeof t==`string`)return t.toLowerCase().includes(e);let n=t.label.toLowerCase(),r=typeof t.value==`object`?(t=>Object.values(t).some(t=>t.toLowerCase().includes(e)))(t.value):String(t.value).toLowerCase().includes(e);return n.includes(e)||r})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?$y(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,Ay.warn(`Multiselect-datasource is not connected. Please add a datasource to use this functionality.`))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){My(e,this)&&(this.open=!1)}keydownHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Escape`:if(this.open){this.open=!1;break}break;case`ArrowUp`:case`ArrowDown`:if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){let{clearSelectedValues:t=!0,clearFilterText:n=!0}=e;t&&(this.selectedOptions=[],this.$emit(`selectionChange`,this.selectedOptions)),n&&(this.filterSearchValue=``,this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value=``)),this.$emit(`clear`,{clearSelectedValues:t,clearFilterText:n})}};q([D],rw.prototype,`name`,void 0),q([D({mode:`boolean`,attribute:`auto-position`})],rw.prototype,`autoPosition`,void 0),q([D({mode:`boolean`})],rw.prototype,`all`,void 0),q([D({mode:`boolean`})],rw.prototype,`allSelected`,void 0),q([D({mode:`boolean`})],rw.prototype,`search`,void 0),q([D({mode:`boolean`})],rw.prototype,`disabled`,void 0),q([D({mode:`boolean`})],rw.prototype,`creatable`,void 0),q([D({mode:`boolean`})],rw.prototype,`async`,void 0),q([D],rw.prototype,`debounce`,void 0),q([D({mode:`boolean`})],rw.prototype,`resizable`,void 0),q([D],rw.prototype,`tabindex`,void 0),q([D({mode:`boolean`,attribute:`filter-by-contains`})],rw.prototype,`filterByContains`,void 0),q([C],rw.prototype,`defaultSlottedNodes`,void 0),q([C],rw.prototype,`slottedDatasource`,void 0),q([C],rw.prototype,`valueFormatter`,void 0),q([C],rw.prototype,`loading`,void 0),q([C],rw.prototype,`filterSearchValue`,void 0),q([C],rw.prototype,`open`,void 0),q([C],rw.prototype,`options`,void 0),q([C],rw.prototype,`selectedOptions`,void 0),q([C],rw.prototype,`filteredAvailableOptions`,void 0),q([C],rw.prototype,`scrollContainer`,void 0),q([D],rw.prototype,`position`,void 0),q([C],rw.prototype,`onAllSelectedCallback`,void 0),q([C],rw.prototype,`itemRenderer`,void 0),q([w],rw.prototype,`getDisplayValue`,null),q([w],rw.prototype,`getPlaceholder`,null),q([w],rw.prototype,`isAllOptionsDisabled`,null),q([w],rw.prototype,`areAllOptionsSelected`,null),q([w],rw.prototype,`showCreatable`,null),q([C],rw.prototype,`optionsHeaderSlottedNodes`,void 0),rw.compose(Object.assign({baseName:`multiselect`,template:Nae,styles:ZC,shadowOptions:void 0},nw));let iw=O` .root{position: relative;width: 100%;min-width: 250px}.control-button{display: flex;justify-content: center;min-width: 31px;width: 31px;height: 31px;margin-left: calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}.control{cursor: pointer;position: relative;display: flex;justify-content: end;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}.control:hover .control-button, .control:hover .label{color: var(--neutral-foreground-rest)}button{pointer-events: none}.options{display: flex;flex-direction: column;position: absolute;height: max-content;overflow-y: hidden;margin-top: 5px;padding: calc((var(--design-unit) + 3) * 2px) calc((var(--design-unit) + 3) * 1px);border: 1px solid rgba(46 51 57 / 100%);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s;z-index: 999}.option-content{display: flex;align-items: center;gap: calc(var(--design-unit) * 4px);width: 100%}.icon-container{display: flex;align-items: center;justify-content: center;width: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px + 4px );height: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px );border-radius: calc((var(--control-corner-radius) - 1) * 2px);background: var(--neutral-layer-2);box-sizing: border-box;box-shadow: 0 0 5px 0 rgba(0 0 0 / 35%);flex-shrink: 0}.text-content{display: flex;flex-direction: column;flex: 1}.svg-icon{height: 2em}.position-above{bottom: 100%}.checkbox-container{display: flex;flex-direction: column;overflow-y: scroll;scrollbar-width: thin;scrollbar-color: rgb(46 48 53) rgb(31 33 38)}span{border-bottom: calc(var(--stroke-width) * 1px) solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 2) * 2px) calc((var(--design-unit) + 3) * 1px);font-size: calc((var(--type-ramp-base-font-size) - 1px));color: var(--neutral-foreground-hint)}.multiselect-checkbox{min-width: fit-content;flex-direction: row-reverse;justify-content: space-between;align-items: flex-start;border-bottom: 1px solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) 0;margin: 0}.multiselect-checkbox:hover{background-color: rgb(45 47 51);cursor: pointer}.multiselect-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis}.multiselect-checkbox::part(control){min-width: calc( ( (var(--base-height-multiplier) + var(--density)) * var(--design-unit) / 2 + var(--design-unit) ) * 1px )}.checkbox-container .multiselect-checkbox[disabled]{cursor: not-allowed}.description{text-wrap: wrap;font-size: calc((var(--type-ramp-base-font-size) - 1px));margin: calc((var(--design-unit) + 3) * 1px) 0}#filter-search{padding: 5px}::-webkit-scrollbar{width: 12px}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: rgb(46 48 53);border: 3px solid rgb(31 33 38)}.visible{visibility: visible;max-height: ${`450`}px}`,aw=(e=`foundation`)=>T`<div class="root" part="root"><div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}><label part="label" for="control" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><${e}-button class="control-button" part="control-button"><slot name="button-content"><${e}-icon name="plus" variant="solid" size="lg"></${e}-icon></slot></${e}-button></div><div ${k(`optionsElement`)}class="options" part="options">${A(e=>e.search,T`<${e}-text-field id="filter-search" part="filter-search" value=${Af(e=>e.filterSearchValue,`string`,`input`)}placeholder="${e=>e.getPlaceholder}" @input=${(e,t)=>e.setFilter()}@change=${(e,t)=>e.changeHandler(t.event)}></${e}-text-field>`)}<div class="checkbox-container" part="checkbox-container">${j(e=>e.filteredAvailableOptions,T`<span>${e=>e.type}</span>${j(e=>e.options,T`<${e}-checkbox class="multiselect-checkbox" part="multiselect-checkbox" @click=${(e,t)=>t.parentContext.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parentContext.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parentContext.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parentContext.parent.isOptionDisabled(e)}"><div class="option-content">${A(e=>e.icon||e.svg,T`<div class="icon-container">${A(e=>e.icon,T`<${e}-icon style="color:${e=>e.iconColor||`#fff`}" name="${e=>e.icon}" size="xl"></${e}-icon>`)} ${A(e=>e.svg,T`<img class="svg-icon" src="${e=>e.svg}" alt="${e=>e.label}" />`)}</div>`)}<div class="text-content"><div class="option-label">${(e,t)=>t.parentContext.parent.getItemLabel(e)}</div>${A(e=>e.description,T`<p class="description">${e=>e.description}</p>`)}</div></div></${e}-checkbox>`)} `)}</div></div></div>`,Pae=T` ${aw()} `,ow={};var sw=class extends P{constructor(){super(...arguments),this.name=``,this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=YC.BELOW}openChanged(e,t){var n,r;t?(document.addEventListener(`mousedown`,this.clickOutside),(n=this.optionsElement)==null||n.classList.add(`visible`)):(document.removeEventListener(`mousedown`,this.clickOutside),(r=this.optionsElement)==null||r.classList.remove(`visible`))}connectedCallback(){var e;super.connectedCallback(),this.position===YC.ABOVE&&((e=this.optionsElement)==null||e.classList.add(`position-above`))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`mousedown`,this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){let t=(e??this.options).reduce((e,t)=>{let n=t.type||`Other`;return e[n]?e[n].options.push(t):e[n]={type:n,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains(`content-wrapper`);)t=t.parentElement;if(t){let n=t.getBoundingClientRect(),r=this.getBoundingClientRect(),i=n.top+n.height/2;e=r.top<i?YC.BELOW:YC.ABOVE}else{let t=this.getBoundingClientRect(),n=window.innerHeight,r=t.top,i=n-t.bottom;e=i<t.height&&r>i?YC.ABOVE:YC.BELOW}}e===YC.ABOVE?(this.optionsElement.classList.add(`position-above`),this.optionsElement.classList.remove(`position-below`)):e===YC.BELOW&&(this.optionsElement.classList.add(`position-below`),this.optionsElement.classList.remove(`position-above`))}optionGetter(e){return e.value}getItemLabel(e){let t;if(e)t=e.label||e.value||``;else return``;return this.valueFormatter?this.valueFormatter(t):t}isOptionDisabled(e){return!e||typeof e==`string`?!1:e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat(`...`)}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){let t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit(`selectionChange`,this.selectedOptions)}setFilter(){let e=this.options.filter(e=>{let t=e.description,n=e.label??e.value;if(t?.toLowerCase().includes(this.filterSearchValue.toLowerCase())||n.toLowerCase().includes(this.filterSearchValue.toLowerCase()))return e});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){My(e,this)&&(this.open=!1)}};q([D],sw.prototype,`name`,void 0),q([D({mode:`boolean`,attribute:`auto-position`})],sw.prototype,`autoPosition`,void 0),q([D({mode:`boolean`})],sw.prototype,`search`,void 0),q([D({mode:`boolean`})],sw.prototype,`disabled`,void 0),q([C],sw.prototype,`defaultSlottedNodes`,void 0),q([C],sw.prototype,`valueFormatter`,void 0),q([C],sw.prototype,`filterSearchValue`,void 0),q([C],sw.prototype,`open`,void 0),q([C],sw.prototype,`options`,void 0),q([C],sw.prototype,`selectedOptions`,void 0),q([C],sw.prototype,`filteredAvailableOptions`,void 0),q([C],sw.prototype,`position`,void 0),q([w],sw.prototype,`getPlaceholder`,null),sw.compose(Object.assign({baseName:`categorized-multiselect`,template:Pae,styles:iw,shadowOptions:void 0},ow));let cw=(e,t)=>Ir(e,t),lw=(e,t)=>O` ${su(e,t)}`;var uw=class extends Lr{};let dw={checkedIndicator:`
|
|
253
|
+
Install model </${e}-button>`)}</div>`)}</div>`)} `,rC=T` ${e=>Aae(Py(e))} `;var iC=class extends P{constructor(){super(...arguments),this.status=null,this.open=!1,this.state=`none`,this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get aiProvider(){return this.providerRegistry?.default()}get chromeStatusLabel(){if(this.status?.provider!==`chrome`)return null;let e=this.status?.chromeAvailability;return e===`available`?`Installed`:e===`downloading`||this.isInstalling?`Downloading…`:e===`downloadable`?`Downloadable`:e===`unavailable`?`Unavailable`:null}get canInstall(){return!!this.aiProvider?.triggerDownload&&this.status?.provider===`chrome`&&this.status?.chromeAvailability===`downloadable`&&!this.isInstalling}get isDownloading(){return this.status?.chromeAvailability===`downloading`||this.isInstalling}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener(`mousedown`,this.clickOutside)}openChanged(){this.open?(document.addEventListener(`mousedown`,this.clickOutside),this.refreshStatus()):document.removeEventListener(`mousedown`,this.clickOutside)}handleClickOutside(e){My(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return J(this,void 0,void 0,function*(){if(!this.aiProvider?.getStatus){this.status=null,this.state=`none`;return}try{let e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),this.state===`available`&&(this.isInstalling=!1)}catch{this.status=null,this.state=`none`,this.isInstalling=!1}})}deriveState(e){if(!e||e.provider===`none`)return`none`;if(e.provider===`chrome`){let t=e.chromeAvailability;return t===`available`?`available`:t===`downloading`?`downloading`:t===`downloadable`?`downloadable`:`unavailable`}return`server`}maybeStartPolling(){this.status?.chromeAvailability===`downloading`||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return J(this,void 0,void 0,function*(){if(this.canInstall&&this.aiProvider?.triggerDownload){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch{this.isInstalling=!1}finally{yield this.refreshStatus()}}})}};q([vS],iC.prototype,`providerRegistry`,void 0),q([C],iC.prototype,`status`,void 0),q([C],iC.prototype,`open`,void 0),q([C],iC.prototype,`state`,void 0),q([C],iC.prototype,`isInstalling`,void 0),q([w],iC.prototype,`chromeStatusLabel`,null),q([w],iC.prototype,`canInstall`,null),q([w],iC.prototype,`isDownloading`,null),iC.compose({baseName:`ai-indicator`,template:rC,styles:nC});let aC=(e,t)=>Un(e,t),oC=(e,t)=>O` ${Jl(e,t)}`;var sC=class extends Yl{};let cC={delegatesFocus:!0,mode:`open`},lC={};sC.compose(Object.assign({baseName:`anchor`,template:aC,styles:oC,shadowOptions:cC},lC));let uC=(e,t)=>qn(e,t),dC=(e,t)=>O` ${Xl(e,t)}`;var fC=class extends Yn{};let pC={delegatesFocus:!0,mode:`open`},mC={};fC.compose(Object.assign({baseName:`anchored-region`,template:uC,styles:dC,shadowOptions:pC},mC));let hC=(e,t)=>rr(e,t),jae=T` ${A(e=>e.imgSrc,T`<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />`)} `,gC=(e,t)=>O` ${Zl(e,t)}`;var _C=class extends Ql{};let vC={delegatesFocus:!0,mode:`open`},yC={media:jae};_C.compose(Object.assign({baseName:`avatar`,template:hC,styles:gC,shadowOptions:vC},yC));let bC=(e,t)=>ar(e,t),xC=(e,t)=>O` ${$l(e,t)}`;var SC=class extends or{};let CC={};SC.compose(Object.assign({baseName:`badge`,template:bC,styles:xC,shadowOptions:void 0},CC));let wC=O` @keyframes delete-animate{from{height: 100px;opacity: 100%}to{height: 0;opacity: 0%}}@keyframes append-animate{from{height: 0;opacity: 0%}to{height: var(--banner-height);opacity: 100%}}:host{--banner-width: 100%;--banner-height: 65px;--flow: row}@media screen and (max-width: 640px){:host{--flow: column;--banner-height: 100px}}.banner{animation: append-animate 0.3s linear;width: var(--banner-width);height: var(--banner-height);background-color: var(--fill-color);display: flex;flex-direction: var(--flow);padding: 5px 8px;box-sizing: border-box;overflow: hidden}.banner-delete{animation: delete-animate 0.3s linear;opacity: 0%}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,Mae=e=>T`<div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${k(`banner`)}><div part="content" class="content"><slot name="content">${A(e=>e.notification,T`<div><div>${e=>e.notification?.body||`Place holder for notification message`}</div></div>`)}</slot></div><div part="action" class="action"><slot name="action" class="action">${A(e=>e.notification,T`<${e}-button slot="action" appearance="lightweight" @click=${e=>e.dismiss()}>${e=>e.notification?.config?.banner?.dismissingAction?.label||`Ignore`}</${e}-button>`)} ${j(e=>(e.notification?.config)?.banner.confirmingActions,T`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var n;e?.action(),(n=t.parent)==null||n.dismissNotification()}}>${e=>e.label}</${e}-button>`)}</slot></div></div>`,TC=T` ${e=>Mae(Py(e))} `,EC={mode:`open`,delegatesFocus:!0};var DC=class extends P{constructor(){super(...arguments),this.dismissAnimation=``}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation=`banner-delete`,new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return J(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){Ay.error(e)}})}};q([C],DC.prototype,`dismissAnimation`,void 0),q([C],DC.prototype,`notification`,void 0),DC.compose({baseName:`banner`,styles:wC,template:TC,shadowOptions:EC});let OC=(e,t)=>lr(e,t),kC=(e,t)=>O` ${tu(e,t)}`;var AC=class extends ur{};AC.compose(Object.assign({baseName:`breadcrumb`,template:OC,styles:kC,shadowOptions:void 0},{}));let jC=(e,t)=>sr(e,t),MC=(e,t)=>O` ${eu(e,t)}`;var NC=class extends cr{};let PC={separator:`/`};NC.compose(Object.assign({baseName:`breadcrumb-item`,template:jC,styles:MC,shadowOptions:void 0},PC));let FC=(e,t)=>dr(e,t),IC=(e,t)=>O` ${nu(e,t)}`;var LC=class extends ru{};let RC={delegatesFocus:!0,mode:`open`},zC={};LC.compose(Object.assign({baseName:`button`,template:FC,styles:IC,shadowOptions:RC},zC));let BC=()=>O` ${iu}`,VC=(e,t)=>Nr(e,t);var HC=class extends Cr{};let UC={delegatesFocus:!0,mode:`open`},WC={};HC.compose(Object.assign({baseName:`calendar`,template:VC,styles:BC,shadowOptions:UC},WC));let GC=(e,t)=>Pr(e,t),KC=(e,t)=>O` ${au(e,t)} :host{background-color: var(--fui-card-fill-color);color: var(--fui-card-foreground-color)}`;var qC=class extends ou{};let JC={};qC.compose(Object.assign({baseName:`card`,template:GC,styles:KC,shadowOptions:void 0},JC));var YC;(function(e){e.BELOW=`below`,e.ABOVE=`above`})(YC||(YC={}));var XC=/* @__PURE__ */ u((/* @__PURE__ */ s(((e,t)=>{var n=NaN,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=typeof global==`object`&&global&&global.Object===Object&&global,l=typeof self==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,h=!0;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=y(t)||0,g(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?f(y(n.maxWait)||0,t):a,h=`trailing`in n?!!n.trailing:h);function _(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function v(e){return l=e,s=setTimeout(x,t),u?_(e):o}function b(e){var n=e-c,r=e-l,i=t-n;return d?p(i,a-r):i}function ee(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function x(){var e=m();if(ee(e))return te(e);s=setTimeout(x,b(e))}function te(e){return s=void 0,h&&r?_(e):(r=i=void 0,o)}function ne(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function S(){return s===void 0?o:te(m())}function C(){var e=m(),n=ee(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return v(c);if(d)return s=setTimeout(x,t),_(c)}return s===void 0&&(s=setTimeout(x,t)),o}return C.cancel=ne,C.flush=S,C}function g(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function _(e){return!!e&&typeof e==`object`}function v(e){return typeof e==`symbol`||_(e)&&d.call(e)==`[object Symbol]`}function y(e){if(typeof e==`number`)return e;if(v(e))return n;if(g(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=g(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?n:+e}t.exports=h})))());let ZC=O` :host{--scrollbar-width: 12px;--scrollbar-thumb-width: 8px}.root{position: relative;width: inherit;min-width: 250px}.control{cursor: pointer;position: relative;display: flex;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}#display-field{width: 100%;cursor: pointer;color: var(--neutral-foreground-rest);min-height: 40px;padding: 0 calc(var(--design-unit) * 2.25px);border-width: 0;background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px)}#display-field[disabled]{cursor: not-allowed;opacity: 30%}#display-field:focus{outline: 1px solid var(--accent-fill-rest);background: var(--neutral-fill-input-rest);border-style: none;box-shadow: none}#display-field:hover:not(:focus):not([disabled]){outline: 1px solid var(--neutral-stroke-hover)}button{pointer-events: none}.indicator{position: absolute;left: calc(100% - 26px);padding: 0;cursor: pointer}#arrow-icon{width: 16px;fill: white;transform: rotate(0deg);transition: transform 0.2s linear 0s}#arrow-icon.flipped{transform: rotate(180deg)}.disabled-svg{pointer-events: none;opacity: 30%}.position-above{bottom: 100%}::-webkit-scrollbar{width: var(--scrollbar-width)}::-webkit-scrollbar-track{background: var(--neutral-layer-4)}::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}::-webkit-scrollbar-corner{background: var(--neutral-layer-4)}.multiselect-dropdown{display: flex;flex-direction: column;position: absolute;height: max-content;overflow: hidden;margin-top: calc(var(--design-unit) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;z-index: 999}.multiselect-dropdown:not(.is-resizing){transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s}.checkbox-container{display: flex;flex-direction: column;list-style: none;overflow-y: auto;height: 100%}.is-resizing .checkbox-container{overflow-y: hidden}.checkbox-container zero-checkbox{min-width: fit-content}.checkbox-container zero-checkbox[disabled], .checkbox-container foundation-checkbox[disabled]{cursor: not-allowed}.visible{visibility: visible;max-height: var(--custom-max-height, ${`230`}px);overflow: hidden}::slotted(foundation-checkbox), foundation-checkbox{border-bottom: 1px solid var(--neutral-layer-4);padding: 5px 0 5px 5px;margin: 0}::slotted(foundation-checkbox:hover), foundation-checkbox:hover{background-color: var(--neutral-layer-3);cursor: pointer}::slotted(foundation-checkbox)::part(label), foundation-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}ol, li{margin: 0;padding: 0}.checkbox{width: 100%}.select-all{width: 100%;margin-left: 0;margin-right: 0}.display-value{position: absolute;right: 40px;color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font)}.options-header-item-hidden{display: none}.resize-button{position: absolute;bottom: 0;right: 0;width: 12px;height: 12px;cursor: nw-resize;background: linear-gradient( -45deg, transparent 30%, var(--neutral-foreground-rest) 30%, var(--neutral-foreground-rest) 40%, transparent 40%, transparent 60%, var(--neutral-foreground-rest) 60%, var(--neutral-foreground-rest) 70%, transparent 70% );z-index: 1000;opacity: 60%;transition: opacity 0.2s ease}.resize-button:hover{opacity: 100%}.multiselect-dropdown.resizable{resize: none;overflow: hidden}`;var QC;let $C=QC=class extends jy{constructor(){super(...arguments),this.emptyDataLabel=`No matching records`,this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=QC.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria=``,this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{e.detail?.open&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{let e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{let t=e.target.value,n=this.options?.find(e=>String(e.label)===t);!n&&this.allowCustomOptions&&this.select instanceof du?this.select.$emit(`value-change`,{label:t,value:t}):this.select.$emit(`value-change`,n)}}initialSelectedValueChanged(e,t){if(t!==e){if(!t){this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData());return}this.select&&this.getDisplayForValue(t)===String(this.select.value||``)||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData())}}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?this.valueField?.concat(` `,this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=this.optionElement??`${Py(this.select)}-option`,this.select.addEventListener(`change`,this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:QC.defaultPageSize,this.select.addEventListener(`open-change`,this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;x.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||Ay.warn(`Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")`)})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),(e=this.listboxElement)==null||e.removeEventListener(`scroll`,this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener(`open-change`,this.selectOpenChangeHandler),this.select.removeEventListener(`change`,this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return J(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{let e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==Sg.DATASERVER}catch(e){Ay.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e;if(this.isConnected){if((e=this.listboxElement)==null||e.removeEventListener(`scroll`,this.listboxScrollHandler),this.listboxElement=this.select?.scrollableListbox??this.select?.listbox??(this.select?.shadowRoot)?.querySelector(`.listbox`),!this.listboxElement){Ay.warn(`Unable to locate listbox element, infinite scroll will not be available.`);return}this.listboxElement.addEventListener(`scroll`,this.listboxScrollHandler)}}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-QC.scrollLoadThresholdPx}loadNextPage(){return J(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;let e=this.datasource.resourceType===Sg.REQUEST_SERVER;try{yield this.requestMoreRows()}catch{this.loadingMoreRows=!1;return}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;let e=this.listboxElement;e&&e.clientHeight!==0&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof du&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return J(this,void 0,void 0,function*(){if(!(yield this.datasource.init(this.datasourceOptions(),!0))){this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:`error`});return}eb(this,this.initialSelectedValue)})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof QC||this.select.removeChild(e)}),this.select.value=``,this.select.initialValue=``)}checkOverflow(e){let t=e.shadowRoot.querySelector(`.content`);t&&(t.scrollWidth>t.clientWidth?e.setAttribute(`title`,e.textContent):e.removeAttribute(`title`))}rowToOption(e){return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],this.getFieldMetadata(this.labelField)?.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{let n=document.createElement(this.optionElement);n.textContent=t||e,n.value=e,this.select.appendChild(n),this.resizeObserver.observe(n)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;let t=e??Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));let e=this.renderedOptionsCount===0;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof du&&!this.select.async&&e){this.resetCombobox();let e=this.getInitialLabel();x.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof du&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof du&&!this.select.async)&&(this.resetCombobox(),x.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){let e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value=``,e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){if(e==null||e!==0&&!e)return``;let t=this.options?.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof du?String(t?t.label:e):t?String(t.label):``}resetCombobox(){this.select&&this.select instanceof du&&this.select.resetCombobox()}handleStreamInserts(e){if(this.loadingMoreRows=!1,!e?.length)return;this.removeEmptyDataOption();let t=new Set((this.options??[]).map(e=>String(e.value))),n=e.filter(e=>!t.has(String(e[this.valueField])));if(!n.length){Ay.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),this.moreRowsAvailable=!1;return}let r=n.map(e=>this.rowToOption(e));this.options=[...this.options??[],...r],this.renderListboxOptions(r),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){Ay.debug(`handleStreamDeletes - Method not implemented.`)}handleStreamUpdates(e){Ay.debug(`handleStreamUpdates - Method not implemented.`)}};$C.defaultPageSize=20,$C.scrollLoadThresholdPx=32,q([ay],$C.prototype,`resources`,void 0),q([D({attribute:`label-field`})],$C.prototype,`labelField`,void 0),q([D({attribute:`option-element`})],$C.prototype,`optionElement`,void 0),q([D({attribute:`value-field`})],$C.prototype,`valueField`,void 0),q([D({attribute:`empty-data-label`})],$C.prototype,`emptyDataLabel`,void 0),q([D({mode:`boolean`,attribute:`allow-custom-options`})],$C.prototype,`allowCustomOptions`,void 0),q([D({mode:`boolean`,attribute:`infinite-scroll`})],$C.prototype,`infiniteScroll`,void 0),q([D({attribute:`page-size`,converter:E})],$C.prototype,`pageSize`,void 0),q([C],$C.prototype,`labelFormatter`,void 0),q([C],$C.prototype,`labelRowFormatter`,void 0),q([C],$C.prototype,`initialSelectedValue`,void 0),$C=QC=q([$e({name:`options-datasource`})],$C);let ew=class extends jy{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=``}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?this.valueField?.concat(` `,this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||Ay.warn(`Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")`)})}clearData(){this.select.options=[]}syncComponentData(e){let t=(e??Array.from(this.rowsSyncedWithStream.values())).map(e=>({value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],this.getFieldMetadata(this.labelField)?.type)}));this.select?.async&&(this.select.loading=!1),this.select.options=t}handleStreamInserts(e){Ay.debug(`handleStreamInserts - Method not implemented.`)}handleStreamDeletes(e){Ay.debug(`handleStreamDeletes - Method not implemented.`)}handleStreamUpdates(e){Ay.debug(`handleStreamUpdates - Method not implemented.`)}};q([D({attribute:`value-field`})],ew.prototype,`valueField`,void 0),q([D({attribute:`label-field`})],ew.prototype,`labelField`,void 0),ew=q([$e({name:`multiselect-datasource`})],ew);let tw=(e=`foundation`)=>T`<label part="label" for="display-field" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot name="label" ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><div class="root" part="root" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control"><input id="display-field" part="filter-search" role="combobox" aria-haspopup="listbox" aria-controls="checkbox-container" aria-expanded=${e=>e.open?`true`:`false`}tabindex="${e=>e.tabindex}" ?readonly=${e=>!e.search}@click=${e=>e.toggle()}?disabled="${e=>e.disabled}" ${k(`filterSearchInput`)}value=${Af(e=>e.filterSearchValue,`string`,`input`)}placeholder="${e=>e.getDisplayValue}" autocomplete="off" @input=${(e,t)=>e.inputHandler()}@change=${(e,t)=>e.changeHandler(t.event)}/><div part="indicator" class="indicator" @click=${e=>!e.disabled&&e.toggle()}><svg viewBox="0 0 12 7" ${k(`arrowIcon`)}id="arrow-icon" class="${e=>pn([`disabled-svg`,e.disabled])}" xmlns="http://www.w3.org/2000/svg"><path d="${`M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z`}" /></svg></div>${A(e=>e.filterSearchValue&&e.selectedOptions.length,T`<div class="display-value">${e=>e.getDisplayValue}</div>`)}</div>${A(e=>e.loading,T`<${e}-progress slot="indicator"></${e}-progress>`)}<section class=${e=>pn(`multiselect-dropdown`,[`resizable`,e.resizable])} ${k(`multiselectDropdown`)}part="multiselect-dropdown">${A(e=>e.resizable,T`<div class="resize-button" @mousedown=${(e,t)=>e.handleResizeStart(t.event)}></div>`)} ${A(e=>e.all,T`<${e}-button class="select-all" @click=${e=>e.selectCheckboxAll()}?disabled="${(e,t)=>e.isAllOptionsDisabled}">${e=>e.areAllOptionsSelected?`Deselect All`:`Select All`} ${e=>e.name}</${e}-button>`)}<ol id="checkbox-container" class="checkbox-container options" aria-multiselectable="true" part="options-ol"><li part="options-header-item" class=${e=>pn(`options-header-item`,[`options-header-item-hidden`,!e.optionsHeaderSlottedNodes?.length])}><slot name="options-header" ${xt({property:`optionsHeaderSlottedNodes`,filter:xa})}></slot></li>${j(e=>e.filteredAvailableOptions,T`<li role="option" value=${(e,t)=>t.parent.getItemLabel(e)}part="option"><${e}-checkbox part="checkbox" class="checkbox" exportparts="label:checkbox-label" @keydown=${(e,t)=>t.parent.checkboxKeyDown(e,t.event)}@click=${(e,t)=>t.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parent.isOptionDisabled(e)}">${(e,t)=>{var n;return((n=t.parent)?.itemRenderer)?.call(n,e,t.parent)}}</${e}-checkbox></li>`)}</ol>${A(e=>e.showCreatable,T`<${e}-button @click=${e=>e.addOption()}>Create "${e=>e.filterSearchValue}"</${e}-button>`)}</section></div><slot ${xt({property:`slottedDatasource`,filter:e=>e instanceof ew})}></slot>`,Nae=T` ${tw()} `,nw={};var rw=class extends P{constructor(){super(...arguments),this.name=``,this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue=``,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=YC.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add(`is-resizing`),document.addEventListener(`mousemove`,this.handleResizeMove),document.addEventListener(`mouseup`,this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();let t=e.clientX-this.startX,n=e.clientY-this.startY,r=Math.max(250,this.startWidth+t),i=Math.max(100,this.startHeight+n);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${r}px`,this.multiselectDropdown.style.maxHeight=`${i}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener(`mousemove`,this.handleResizeMove),document.removeEventListener(`mouseup`,this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove(`is-resizing`),this.multiselectDropdown.style.setProperty(`--custom-max-height`,this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty(`max-height`))}}debounceChanged(e,t){this.debouncedInputHandler=(0,XC.default)(this.asyncSetFilter,t)}openChanged(e,t){var n,r,i,a;t?(document.addEventListener(`mousedown`,this.clickOutside),(n=this.arrowIcon)==null||n.classList.add(`flipped`),(r=this.multiselectDropdown)==null||r.classList.add(`visible`)):(document.removeEventListener(`mousedown`,this.clickOutside),(i=this.arrowIcon)==null||i.classList.remove(`flipped`),(a=this.multiselectDropdown)==null||a.classList.remove(`visible`))}connectedCallback(){var e;super.connectedCallback(),this.position===YC.ABOVE&&((e=this.multiselectDropdown)==null||e.classList.add(`position-above`))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`mousedown`,this.clickOutside),document.removeEventListener(`mousemove`,this.handleResizeMove),document.removeEventListener(`mouseup`,this.handleResizeEnd)}defaultItemRenderer(e,t){return T` ${typeof e==`string`?T`<span part="option-label">${()=>t.getItemLabel(e)}</span>`:T`<span data-option-label-text=${()=>e.optionLabelText}style=${()=>e.labelStyle}part="option-label">${()=>t.getItemLabel(e)}</span>`} `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){if(this.$fastController.isConnected){this.initialisedOptions=!0;return}}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.getBoundingClientRect(),n=window.innerHeight,r=t.top,i=n-t.bottom;e=i<230&&r>i?YC.ABOVE:YC.BELOW}this.multiselectDropdown.classList.toggle(`position-above`,e===YC.ABOVE),this.multiselectDropdown.classList.toggle(`position-below`,e===YC.BELOW)}optionValueGetter(e){return typeof e==`string`?e:e.value}optionLabelGetter(e){return typeof e==`string`?e:e.label}getItemLabel(e){let t;return e?(t=typeof e==`string`?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||``,this.valueFormatter?this.valueFormatter(t):t):``}isOptionDisabled(e){return!e||typeof e==`string`?!1:e.disabled||!1}get getDisplayValue(){let e=``;switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{let t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat(`...`)}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){let e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&this.findExactMatchOptions().length===0}isOptionSelected(e){let t=this.optionValueGetter(e);return this.selectedOptions.some(n=>{if(typeof e==`object`&&typeof e.value==`object`)try{return JSON.stringify(n)===JSON.stringify(t)}catch{return n===t}return n===t})}selectCheckboxOne(e){let t=this.optionValueGetter(e);this.selectedOptions=this.selectedOptions.includes(t)?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit(`selectionChange`,this.selectedOptions)}checkboxKeyDown(e,t){return t.key===` `&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){let e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit(`selectionChange`,this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){let e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>((typeof t==`string`?t:this.optionLabelGetter(t)??this.optionValueGetter(t))?.toLowerCase()??``)===e)}setFilter(){let e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if(typeof t==`string`)return t.toLowerCase().includes(e);let n=t.label.toLowerCase(),r=typeof t.value==`object`?(t=>Object.values(t).some(t=>t.toLowerCase().includes(e)))(t.value):String(t.value).toLowerCase().includes(e);return n.includes(e)||r})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?$y(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,Ay.warn(`Multiselect-datasource is not connected. Please add a datasource to use this functionality.`))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){My(e,this)&&(this.open=!1)}keydownHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Escape`:if(this.open){this.open=!1;break}break;case`ArrowUp`:case`ArrowDown`:if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){let{clearSelectedValues:t=!0,clearFilterText:n=!0}=e;t&&(this.selectedOptions=[],this.$emit(`selectionChange`,this.selectedOptions)),n&&(this.filterSearchValue=``,this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value=``)),this.$emit(`clear`,{clearSelectedValues:t,clearFilterText:n})}};q([D],rw.prototype,`name`,void 0),q([D({mode:`boolean`,attribute:`auto-position`})],rw.prototype,`autoPosition`,void 0),q([D({mode:`boolean`})],rw.prototype,`all`,void 0),q([D({mode:`boolean`})],rw.prototype,`allSelected`,void 0),q([D({mode:`boolean`})],rw.prototype,`search`,void 0),q([D({mode:`boolean`})],rw.prototype,`disabled`,void 0),q([D({mode:`boolean`})],rw.prototype,`creatable`,void 0),q([D({mode:`boolean`})],rw.prototype,`async`,void 0),q([D],rw.prototype,`debounce`,void 0),q([D({mode:`boolean`})],rw.prototype,`resizable`,void 0),q([D],rw.prototype,`tabindex`,void 0),q([D({mode:`boolean`,attribute:`filter-by-contains`})],rw.prototype,`filterByContains`,void 0),q([C],rw.prototype,`defaultSlottedNodes`,void 0),q([C],rw.prototype,`slottedDatasource`,void 0),q([C],rw.prototype,`valueFormatter`,void 0),q([C],rw.prototype,`loading`,void 0),q([C],rw.prototype,`filterSearchValue`,void 0),q([C],rw.prototype,`open`,void 0),q([C],rw.prototype,`options`,void 0),q([C],rw.prototype,`selectedOptions`,void 0),q([C],rw.prototype,`filteredAvailableOptions`,void 0),q([C],rw.prototype,`scrollContainer`,void 0),q([D],rw.prototype,`position`,void 0),q([C],rw.prototype,`onAllSelectedCallback`,void 0),q([C],rw.prototype,`itemRenderer`,void 0),q([w],rw.prototype,`getDisplayValue`,null),q([w],rw.prototype,`getPlaceholder`,null),q([w],rw.prototype,`isAllOptionsDisabled`,null),q([w],rw.prototype,`areAllOptionsSelected`,null),q([w],rw.prototype,`showCreatable`,null),q([C],rw.prototype,`optionsHeaderSlottedNodes`,void 0),rw.compose(Object.assign({baseName:`multiselect`,template:Nae,styles:ZC,shadowOptions:void 0},nw));let iw=O` .root{position: relative;width: 100%;min-width: 250px}.control-button{display: flex;justify-content: center;min-width: 31px;width: 31px;height: 31px;margin-left: calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}.control{cursor: pointer;position: relative;display: flex;justify-content: end;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}.control:hover .control-button, .control:hover .label{color: var(--neutral-foreground-rest)}button{pointer-events: none}.options{display: flex;flex-direction: column;position: absolute;height: max-content;overflow-y: hidden;margin-top: 5px;padding: calc((var(--design-unit) + 3) * 2px) calc((var(--design-unit) + 3) * 1px);border: 1px solid rgba(46 51 57 / 100%);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s;z-index: 999}.option-content{display: flex;align-items: center;gap: calc(var(--design-unit) * 4px);width: 100%}.icon-container{display: flex;align-items: center;justify-content: center;width: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px + 4px );height: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px );border-radius: calc((var(--control-corner-radius) - 1) * 2px);background: var(--neutral-layer-2);box-sizing: border-box;box-shadow: 0 0 5px 0 rgba(0 0 0 / 35%);flex-shrink: 0}.text-content{display: flex;flex-direction: column;flex: 1}.svg-icon{height: 2em}.position-above{bottom: 100%}.checkbox-container{display: flex;flex-direction: column;overflow-y: scroll;scrollbar-width: thin;scrollbar-color: rgb(46 48 53) rgb(31 33 38)}span{border-bottom: calc(var(--stroke-width) * 1px) solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 2) * 2px) calc((var(--design-unit) + 3) * 1px);font-size: calc((var(--type-ramp-base-font-size) - 1px));color: var(--neutral-foreground-hint)}.multiselect-checkbox{min-width: fit-content;flex-direction: row-reverse;justify-content: space-between;align-items: flex-start;border-bottom: 1px solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) 0;margin: 0}.multiselect-checkbox:hover{background-color: rgb(45 47 51);cursor: pointer}.multiselect-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis}.multiselect-checkbox::part(control){min-width: calc( ((var(--base-height-multiplier) + var(--density)) * var(--design-unit) / 2 + var(--design-unit)) * 1px )}.checkbox-container .multiselect-checkbox[disabled]{cursor: not-allowed}.description{text-wrap: wrap;font-size: calc((var(--type-ramp-base-font-size) - 1px));margin: calc((var(--design-unit) + 3) * 1px) 0}#filter-search{padding: 5px}::-webkit-scrollbar{width: 12px}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: rgb(46 48 53);border: 3px solid rgb(31 33 38)}.visible{visibility: visible;max-height: ${`450`}px}`,aw=(e=`foundation`)=>T`<div class="root" part="root"><div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}><label part="label" for="control" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><${e}-button class="control-button" part="control-button"><slot name="button-content"><${e}-icon name="plus" variant="solid" size="lg"></${e}-icon></slot></${e}-button></div><div ${k(`optionsElement`)}class="options" part="options">${A(e=>e.search,T`<${e}-text-field id="filter-search" part="filter-search" value=${Af(e=>e.filterSearchValue,`string`,`input`)}placeholder="${e=>e.getPlaceholder}" @input=${(e,t)=>e.setFilter()}@change=${(e,t)=>e.changeHandler(t.event)}></${e}-text-field>`)}<div class="checkbox-container" part="checkbox-container">${j(e=>e.filteredAvailableOptions,T`<span>${e=>e.type}</span>${j(e=>e.options,T`<${e}-checkbox class="multiselect-checkbox" part="multiselect-checkbox" @click=${(e,t)=>t.parentContext.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parentContext.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parentContext.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parentContext.parent.isOptionDisabled(e)}"><div class="option-content">${A(e=>e.icon||e.svg,T`<div class="icon-container">${A(e=>e.icon,T`<${e}-icon style="color:${e=>e.iconColor||`#fff`}" name="${e=>e.icon}" size="xl"></${e}-icon>`)} ${A(e=>e.svg,T`<img class="svg-icon" src="${e=>e.svg}" alt="${e=>e.label}" />`)}</div>`)}<div class="text-content"><div class="option-label">${(e,t)=>t.parentContext.parent.getItemLabel(e)}</div>${A(e=>e.description,T`<p class="description">${e=>e.description}</p>`)}</div></div></${e}-checkbox>`)} `)}</div></div></div>`,Pae=T` ${aw()} `,ow={};var sw=class extends P{constructor(){super(...arguments),this.name=``,this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=YC.BELOW}openChanged(e,t){var n,r;t?(document.addEventListener(`mousedown`,this.clickOutside),(n=this.optionsElement)==null||n.classList.add(`visible`)):(document.removeEventListener(`mousedown`,this.clickOutside),(r=this.optionsElement)==null||r.classList.remove(`visible`))}connectedCallback(){var e;super.connectedCallback(),this.position===YC.ABOVE&&((e=this.optionsElement)==null||e.classList.add(`position-above`))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`mousedown`,this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){let t=(e??this.options).reduce((e,t)=>{let n=t.type||`Other`;return e[n]?e[n].options.push(t):e[n]={type:n,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains(`content-wrapper`);)t=t.parentElement;if(t){let n=t.getBoundingClientRect(),r=this.getBoundingClientRect(),i=n.top+n.height/2;e=r.top<i?YC.BELOW:YC.ABOVE}else{let t=this.getBoundingClientRect(),n=window.innerHeight,r=t.top,i=n-t.bottom;e=i<t.height&&r>i?YC.ABOVE:YC.BELOW}}e===YC.ABOVE?(this.optionsElement.classList.add(`position-above`),this.optionsElement.classList.remove(`position-below`)):e===YC.BELOW&&(this.optionsElement.classList.add(`position-below`),this.optionsElement.classList.remove(`position-above`))}optionGetter(e){return e.value}getItemLabel(e){let t;if(e)t=e.label||e.value||``;else return``;return this.valueFormatter?this.valueFormatter(t):t}isOptionDisabled(e){return!e||typeof e==`string`?!1:e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat(`...`)}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){let t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit(`selectionChange`,this.selectedOptions)}setFilter(){let e=this.options.filter(e=>{let t=e.description,n=e.label??e.value;if(t?.toLowerCase().includes(this.filterSearchValue.toLowerCase())||n.toLowerCase().includes(this.filterSearchValue.toLowerCase()))return e});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){My(e,this)&&(this.open=!1)}};q([D],sw.prototype,`name`,void 0),q([D({mode:`boolean`,attribute:`auto-position`})],sw.prototype,`autoPosition`,void 0),q([D({mode:`boolean`})],sw.prototype,`search`,void 0),q([D({mode:`boolean`})],sw.prototype,`disabled`,void 0),q([C],sw.prototype,`defaultSlottedNodes`,void 0),q([C],sw.prototype,`valueFormatter`,void 0),q([C],sw.prototype,`filterSearchValue`,void 0),q([C],sw.prototype,`open`,void 0),q([C],sw.prototype,`options`,void 0),q([C],sw.prototype,`selectedOptions`,void 0),q([C],sw.prototype,`filteredAvailableOptions`,void 0),q([C],sw.prototype,`position`,void 0),q([w],sw.prototype,`getPlaceholder`,null),sw.compose(Object.assign({baseName:`categorized-multiselect`,template:Pae,styles:iw,shadowOptions:void 0},ow));let cw=(e,t)=>Ir(e,t),lw=(e,t)=>O` ${su(e,t)}`;var uw=class extends Lr{};let dw={checkedIndicator:`
|
|
254
254
|
<svg
|
|
255
255
|
aria-hidden="true"
|
|
256
256
|
part="checked-indicator"
|
|
@@ -882,9 +882,9 @@ let HP={prefix:`fas`,iconName:`0`,icon:[320,512,[],`30`,`M0 192C0 103.6 71.6 32
|
|
|
882
882
|
<path d="M 15.8825 14.185499999999998 L 9.697000000000001 8 L 14.825000000000001 2.872 L 15.8825 1.814499999999999 C 16.0385 1.6584999999999992 16.0385 1.4049999999999994 15.8825 1.2489999999999988 L 14.751 0.11749999999999972 C 14.594999999999999 -0.03850000000000087 14.3415 -0.03850000000000087 14.1855 0.11749999999999972 L 8 6.303000000000001 L 1.8145 0.11699999999999999 C 1.6585 -0.03900000000000059 1.4050000000000002 -0.03900000000000059 1.2489999999999999 0.11699999999999999 L 0.11699999999999999 1.2485 C -0.039000000000000014 1.4044999999999996 -0.039000000000000014 1.6579999999999995 0.11699999999999999 1.814 L 6.303000000000001 8 L 0.11699999999999999 14.185499999999998 C -0.039000000000000014 14.3415 -0.039000000000000014 14.594999999999999 0.11699999999999999 14.751000000000001 L 1.2485 15.8825 C 1.4045 16.0385 1.658 16.0385 1.814 15.8825 L 8 9.697 L 13.128 14.825 L 14.1855 15.8825 C 14.3415 16.0385 14.594999999999999 16.0385 14.751 15.8825 L 15.8825 14.751000000000001 C 16.0385 14.594999999999999 16.0385 14.3415 15.8825 14.185499999999998 Z " fill-rule="nonzero" fill="${t}" stroke="none" transform="matrix(1 0 0 1 1865 3576 )" />
|
|
883
883
|
</g>
|
|
884
884
|
</svg>
|
|
885
|
-
`,$je=(e,t,n)=>O` /* Host */ :host{display: flex;flex-direction: column;width: 100%;height: 100%;position: relative}.file-reader{display: flex;align-items: end;justify-content: start;position: relative}.file-reader > *:not(.processing-overlay){margin: 0}.file-reader > *:not(.processing-overlay):not(:last-child){margin-right: calc(var(--design-unit) * 2px)}input[type='file']{display: none}.file-name-input{flex: 1}.clear-icon{cursor: pointer}.processing-overlay{position: absolute;
|
|
885
|
+
`,$je=(e,t,n)=>O` /* Host */ :host{display: flex;flex-direction: column;width: 100%;height: 100%;position: relative}.file-reader{display: flex;align-items: end;justify-content: start;position: relative}.file-reader > *:not(.processing-overlay){margin: 0}.file-reader > *:not(.processing-overlay):not(:last-child){margin-right: calc(var(--design-unit) * 2px)}input[type='file']{display: none}.file-name-input{flex: 1}.clear-icon{cursor: pointer}.processing-overlay{position: absolute;inset: 0;background-color: rgba(0 0 0 / 20%);display: flex;flex-direction: column;align-items: center;justify-content: center;z-index: 2}`,P0=(e,t)=>O` ${$je(`foundation`,e,t)}`,eMe=e=>T`<template><div class="file-reader">${A(e=>e.isProcessing,T`<div class="processing-overlay" part="processing-overlay"><${e}-progress-ring class="processing-spinner"></${e}-progress-ring></div>`)}<input type="file" ${k(`fileInput`)}@change=${(e,t)=>e.onInputChange(t.event)}:accept="${e=>e.accept}"/><${e}-text-field readOnly type="text" id="fileName" class="file-name-input" :value="${e=>e.fileName}" part="file-name-input">${e=>e.label} ${A(e=>e.fileName,T`<${e}-icon slot="end" class="clear-icon" name="xmark" part="clear-icon" @click=${e=>e.clearSelection()}></${e}-icon>`)}</${e}-text-field><${e}-button @click=${e=>e.handleClick()}part="select-file-button">
|
|
886
886
|
Browse </${e}-button>${A(e=>e.fileName&&!e.autoProcess,T`<${e}-button @click=${e=>e.handleFileProcessing()}part="process-file-button" :disabled="${e=>!e.fileName}">Process file</${e}-button>`)}</div></template>`,F0=T` ${e=>eMe(Py(e))} `;var I0=class extends M0{constructor(){super(),this.processingTimeout=null,this.autoProcess=!1,this.processingDelayMs=1e3,this.fileContent=null,this.accept=`.json,application/json`}onFileSelected(e){let t=e[0];if(t&&this.accept.includes(`json`)&&!((t?.name)?.toLowerCase())?.endsWith(`.json`)){let e=`Selected file is not a JSON file`;this.showError(`File Type Error`,e),this.$emit(`error`,/* @__PURE__ */ Error(e));return}this.selectedFile=t,this.fileName=t.name,this.autoProcess&&this.handleFileProcessing()}onFileCleared(){this.fileContent=null,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}handleFileProcessing(){return J(this,void 0,void 0,function*(){var e;if(!this.getSelectedFile()){this.showError(`No File Selected`,`Please select a file to process`);return}this.processingTimeout&&clearTimeout(this.processingTimeout),this.isProcessing=!0;try{let t=yield this.getSelectedFile().text(),n;try{n=JSON.parse(t)}catch(e){this.showError(`Invalid JSON Format`,`The selected file contains invalid JSON`),this.$emit(`error`,e);return}this.fileContent=n,this.$emit(`file-read`,{fileName:this.fileName,content:this.fileContent,file:this.getSelectedFile()}),(e=this.onFileRead)==null||e.call(this,this.fileContent)}catch(e){this.showError(`File Processing Error`,`An error occurred while processing the file`),this.$emit(`error`,e)}finally{this.processingTimeout=window.setTimeout(()=>{this.isProcessing=!1,this.processingTimeout=null},this.processingDelayMs)}})}getFileContent(){return this.fileContent}disconnectedCallback(){super.disconnectedCallback(),this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}};q([D({attribute:`auto-process`,mode:`boolean`})],I0.prototype,`autoProcess`,void 0),q([D({attribute:`processing-delay-ms`})],I0.prototype,`processingDelayMs`,void 0),q([C],I0.prototype,`fileContent`,void 0),q([C],I0.prototype,`onFileRead`,void 0),I0.compose({baseName:`file-reader`,styles:P0,template:F0});let L0=O` /* Host */ :host{display: flex;flex-direction: column;width: 100%;height: 100%}.file-selection{display: flex;align-items: end;justify-content: start;padding-bottom: 10px}.file-selection :nth-last-child(-n + 2){margin: 0;margin-left: 10px}input[type='file']{display: none}.clear-icon{cursor: pointer}.uploader-grid{overflow-y: auto}.file-name-input{flex: 1}.download-button-container{display: flex}.download-button{height: 22px}fast-data-grid-row{align-items: center}`,R0=e=>T`<template><div class="file-selection"><input type="file" multiple ${k(`fileInput`)}@change=${(e,t)=>e.onInputChange(t.event)}:accept="${e=>e.accept}"/><${e}-text-field readOnly type="text" id="fileName" part="file-name-input" class="file-name-input" :label="${e=>e.label}" :value="${e=>e.fileName}">${e=>e.label} ${A(e=>e.fileName,T`<${e}-icon slot="end" class="clear-icon" name="xmark" @click=${e=>e.clearSelection()}></${e}-icon>`)}</${e}-text-field><${e}-button @click=${e=>e.handleClick()}part="select-file-button">Browse</${e}-button><${e}-button @click=${e=>e.handleFileUpload()}part="upload-file-button" :disabled="${e=>!e.fileName}">Upload</${e}-button></div><div class="uploader-grid"><${e}-data-grid generate-header="sticky" part="uploaded-files-grid" :rowsData="${e=>e.uploadedFilesList}" :columnDefinitions="${e=>e.filesGridColumnDefinitions}"></${e}-data-grid></div></template>`,tMe=T` ${e=>R0(Py(e))} `,nMe=e=>{let t=new FormData;return e.forEach(e=>{t.append(e.name,e)}),t},rMe=(e,t,n,r)=>{let i=new Headers;return i.append(`SESSION_AUTH_TOKEN`,n),r.post(e,{body:t,headers:i})},iMe=(e,t,n,r=`GET`,i,a,o=`zero`)=>{let s=new Headers;s.append(`SESSION_AUTH_TOKEN`,n),fetch(e,{method:r,body:a,headers:s,credentials:`include`}).then(e=>J(void 0,void 0,void 0,function*(){if(e.ok)return e.blob();{let t=yield e.json();i&&QS({title:t?.MESSAGE_TYPE,body:t?.DETAILS?.ERROR,config:{toast:{autoClose:!0,closeTimeout:5e3,type:`warning`}}},o),Ay.error(t||`An error occurred while downloading the file.`)}})).then(e=>{if(e){let n=window.URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),i&&QS({title:`Success`,body:`File downloaded successfully`,config:{toast:{autoClose:!0,closeTimeout:5e3,type:`success`}}},o),Ay.info(`File downloaded successfully`)}}).catch(e=>{Ay.error(e)})},aMe=[`image/png`,`image/bmp`,`image/gif`,`image/jpeg`,`image/jpg`],oMe=[`text/plain`,`text/csv`],sMe=[`application/vnd.ms-excel`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,`application/vnd.ms-powerpoint`,`application/vnd.openxmlformats-officedocument.presentationml.presentation`,`application/msword`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,`application/pdf`],cMe=T` ${A(e=>e.rowData,T` ${e=>e.columnDefinition.type===`DATETIME`?Xf(e.rowData[e.columnDefinition.columnDataKey]):e.rowData[e.columnDefinition.columnDataKey]} `)} `;var z0=class extends M0{constructor(){super(...arguments),this.acceptedFormats=[],this.selectedFiles=[],this.uploadedFilesResourceName=`ALL_FILE_ATTACHMENTS`,this.uploadEventName=`gwf/attachment-handler/upload`,this.gridFields=``,this.fileName=``,this.uploadedFilesList=[],this.filesGridColumnDefinitions=[]}acceptChanged(){let e=[];this.accept.length>0&&this.accept.split(`,`).forEach(t=>{t===`image/*`?e=[...e,...aMe]:t===`office/*`?e=[...e,...sMe]:t===`text/*`?e=[...e,...oMe]:e.push(t)}),this.acceptedFormats=e}fieldNameChanged(){this.setupGrid()}entityIdChanged(){this.setupGrid()}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.filesGridColumnDefinitions?.length||this.setColumnDefs()})}setupGrid(){this.entityId!==void 0&&this.fieldName!==void 0&&(this.gridCriteria=new Yy().withExpression(new Xy().withField(this.fieldName).withValue(this.entityId).build()).build(),this.setRowData())}handleStreamRowOperation(e){let t;for(let n of e.ROW)if(n.DETAILS)switch(n.DETAILS.OPERATION){case`INSERT`:this.uploadedFilesList.unshift(n);break;case`MODIFY`:t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===n.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1,n);break;case`DELETE`:t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===n.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1);break;default:Y.error(`Unsupported operation type: ${n.DETAILS.OPERATION}`)}}setRowData(){return J(this,void 0,void 0,function*(){yield this.connect.stream(this.uploadedFilesResourceName,e=>{e.SEQUENCE_ID===1?this.uploadedFilesList=e.ROW??[]:this.handleStreamRowOperation(e)},e=>{Y.error(e)},{CRITERIA_MATCH:this.gridCriteria})})}setColumnDefs(){return J(this,void 0,void 0,function*(){var e;let t=yield this.connect.getMetadata(this.uploadedFilesResourceName),n=[];this.gridFields.length>0?this.gridFields.split(` `).forEach(e=>{let r=t.FIELD?.find(t=>t.NAME===e);r?n.push(this.getColumnObject(r)):e===`DOWNLOAD`&&this.downloadEventName&&n.push(this.getDownloadColumn())}):((e=t.FIELD)==null||e.forEach(e=>{n.push(this.getColumnObject(e))}),this.downloadEventName&&n.push(this.getDownloadColumn())),this.filesGridColumnDefinitions=n})}getDownloadColumn(){let e=this.tagName.toLowerCase().split(`-`)[0];return{columnDataKey:`FILE_NAME`,title:`File`,cellTemplate:T`<template><div class="download-button-container"><${e}-button class="download-button" @click="${e=>this.handleFileDownload(e.rowData)}">
|
|
887
|
-
DOWNLOAD </${e}-button></div></template>`}}getColumnObject(e){return{columnDataKey:e.NAME,title:e.NAME.toLowerCase().split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `),type:e.TYPE,cellTemplate:cMe}}handleClick(){this.fileInput.value=null,this.fileInput.click()}onFileSelected(e){let t=Array.isArray(e)?e:[e];if(t.length>0&&this.acceptedFormats.length>0){for(let e of t)if(!(this.accept.split(`,`).includes(`.msg`)&&e.name&&e.name.endsWith(`msg`))&&!this.acceptedFormats.includes(e.type)){this.showError(`File Type Error`,`Not a valid file type. Accepted Formats are ${this.accept}`);return}}this.selectedFiles=t,this.fileName=this.selectedFiles.map(e=>e.name.trim()).join(),this.$emit(`file-selected`,{files:this.selectedFiles})}onFileCleared(){this.fileName=``,this.selectedFiles=[]}handleFileUpload(){return J(this,void 0,void 0,function*(){try{let e=nMe(this.selectedFiles);e.append(this.uploadKey,this.entityId);let t=yield rMe(this.uploadEventName,e,this.session.getItem(`authToken`,`session`),this.http);if(t.ERROR){Y.error(t.ERROR),this.$emit(`errorOut`,t.ERROR);return}Y.info(t),this.$emit(`success`,t),this.clearSelection()}catch(e){this.$emit(`errorOut`,e),Y.error(e)}})}handleFileDownload(e){let t=this.tagName.toLowerCase().split(`-`)[0];iMe(this.downloadEventName(e),e.FILE_NAME,this.session.getItem(`authToken`,`session`),`GET`,!0,void 0,t)}};q([C],z0.prototype,`gridCriteria`,void 0),q([mv],z0.prototype,`connect`,void 0),q([Pg],z0.prototype,`http`,void 0),q([Mg],z0.prototype,`session`,void 0),q([D({attribute:`uploaded-files-resource-name`})],z0.prototype,`uploadedFilesResourceName`,void 0),q([D({attribute:`upload-event-name`})],z0.prototype,`uploadEventName`,void 0),q([D({attribute:`field-name`})],z0.prototype,`fieldName`,void 0),q([D({attribute:`entity-id`})],z0.prototype,`entityId`,void 0),q([D({attribute:`upload-key`})],z0.prototype,`uploadKey`,void 0),q([D({attribute:`grid-fields`})],z0.prototype,`gridFields`,void 0),q([C],z0.prototype,`fileName`,void 0),q([C],z0.prototype,`uploadedFilesList`,void 0),q([C],z0.prototype,`filesGridColumnDefinitions`,void 0);let B0={};z0.compose(Object.assign({baseName:`file-upload`,styles:L0,template:tMe,shadowOptions:void 0},B0));let V0=O` .filter-wrapper{border: 1px solid gray;border-radius: calc(var(--design-unit) * 2px);padding: calc(var(--design-unit) * 1px)}.close-icon{display: flex;place-content: center;align-items: center;flex-direction: column;align-content: center;justify-content: center;margin: calc(var(--design-unit) * 1px);padding: calc(var(--design-unit) * 1px);border: 1px solid transparent;border-radius: calc(var(--design-unit) * 2px);cursor: pointer}.close-icon, .cloase-icon svg path{transition-property: all;transition-timing-function: linear;transition-duration: 300ms}.close-icon:hover{border-color: red;background: rgb(255 0 0 / 25%)}.close-icon:hover svg path{fill: red}.flex-row{display: flex;flex-direction: row;align-content: center;justify-content: space-between;align-items: center}.flex-row zero-text-field, .flex-row zero-select, .flex-row foundation-text-field, .flex-row foundation-select{flex: 1}`,H0=T`<div class="close-icon" @click=${e=>e.clear()}>${Qje()}</div>`,lMe=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${H0}</div><div class="flex-row"><${e}-text-field ${k(`textFilterField`)}type="text" :value=${Af(e=>e.textFilter)}/></div>`,uMe=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${H0}</div><div class="flex-row"><${e}-text-field ${k(`numFilterFieldMin`)}type="number" :value=${Af(e=>e.numFilterMin)}placeholder="min"></${e}-text-field><${e}-text-field ${k(`numFilterFieldMax`)}type="number" :value=${Af(e=>e.numFilterMax)}placeholder="max"></${e}-text-field></div>`,dMe=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${H0}</div><div class="flex-row"><${e}-text-field ${k(`dateFilterFieldMin`)}type="date" :value=${Af(e=>e.dateFilterMin)}></${e}-text-field><${e}-text-field ${k(`dateFilterFieldMax`)}type="date" :value=${Af(e=>e.dateFilterMax)}></${e}-text-field></div>`;function U0(e){return e?.event?.target?.value??`all`}let fMe=[{name:`All`,value:`all`,selected:!0},{name:`True`,value:`true`},{name:`False`,value:`false`},{name:`N/A`,value:`null`}],pMe=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${H0}</div><div class="flex-row"><${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(U0(t))}}">${j(()=>fMe,T`<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">${e=>e.name}</${e}-option>`)}</${e}-select></div>`,mMe=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${H0}</div><div class="flex-row"><${e}-select @change="${(e,t)=>e.onEnumFilterSelection(U0(t))}}">${j(e=>e.enumFilterOptions,T`<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">${e=>e.name}</${e}-option>`)}</${e}-select></div>`,hMe=(e,t)=>{switch(e.type){case`number`:return uMe(t);case`date`:return dMe(t);case`boolean`:return pMe(t);case`enum`:return mMe(t);default:return lMe(t)}},W0=e=>T`<div class="filter-wrapper">${t=>hMe(t,e)}</div>`,gMe=T` ${e=>W0(Py(e))}</div>`;var G0;(function(e){e.change=`filter-changed`,e.clear=`filter-cleared`})(G0||(G0={}));var K0=class extends P{constructor(){super(...arguments),this.type=`text`,this.textFilter=``,this.enumFilterOptions=[{name:`All`,value:`all`,selected:!0}]}textFilterChanged(e,t){if(!t?.length){this.$emit(G0.clear,{fieldName:this.fieldName,target:this.target});return}let n=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(G0.change,{fieldName:this.fieldName,filter:n,target:this.target})}numFilterMinChanged(e,t){this.numFilterMin=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}numFilterMaxChanged(e,t){this.numFilterMax=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}handleNumericFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t)){this.$emit(G0.clear,{fieldName:this.fieldName,target:this.target});return}let n=`${this.fieldName} >= ${e}`,r=`${this.fieldName} <= ${t}`,i=Number.isFinite(e)?Number.isFinite(t)?`(${n} && ${r})`:n:r;this.$emit(G0.change,{fieldName:this.fieldName,filter:i,target:this.target})}formatDate(e){if(Number.isFinite(e))return new Date(e).toISOString().slice(0,19).replace(/-/g,``).replace(`T`,`-`)}dateFilterMinChanged(e,t){this.dateMinMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}dateFilterMaxChanged(e,t){this.dateMaxMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}handleDateFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t)){this.$emit(G0.clear,{fieldName:this.fieldName});return}let n=`Expr.dateTimeIsAfter(${this.fieldName}, '${this.formatDate(e)}')`,r=`Expr.dateTimeIsBefore(${this.fieldName}, '${this.formatDate(t)}')`,i=Number.isFinite(e)?Number.isFinite(t)?`(${n} && ${r})`:n:r;this.$emit(G0.change,{fieldName:this.fieldName,filter:i,target:this.target})}connectedCallback(){if(super.connectedCallback(),this.enumOptions?.length){let e=this.enumOptions.includes(`|`)?`|`:`,`,t=this.enumOptions.split(e).map(e=>({name:e,value:e}));this.enumFilterOptions=[{name:`All`,value:`all`,selected:!0},...t]}}clear(){switch(this.type){case`number`:this.numFilterFieldMin.value=void 0,this.numFilterFieldMax.value=void 0,this.numFilterMin=void 0,this.numFilterMax=void 0;break;case`date`:this.dateFilterFieldMin.value=``,this.dateFilterFieldMax.value=``,this.dateMinMS=NaN,this.dateMaxMS=NaN;break;case`text`:this.textFilterField.value=``}this.$emit(G0.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){if(!e||e===`all`){this.$emit(G0.clear,{fieldName:this.fieldName,target:this.target});return}this.$emit(G0.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target})}onEnumFilterSelection(e){if(!e||e===`all`){this.$emit(G0.clear,{fieldName:this.fieldName,target:this.target});return}this.$emit(G0.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target})}};q([D],K0.prototype,`fieldName`,void 0),q([D],K0.prototype,`type`,void 0),q([D],K0.prototype,`label`,void 0),q([D],K0.prototype,`target`,void 0),q([C],K0.prototype,`textFilter`,void 0),q([C],K0.prototype,`numFilterMin`,void 0),q([C],K0.prototype,`numFilterMax`,void 0),q([C],K0.prototype,`dateFilterMin`,void 0),q([C],K0.prototype,`dateFilterMax`,void 0),q([D],K0.prototype,`enumOptions`,void 0),q([C],K0.prototype,`enumFilterOptions`,void 0),K0.compose({baseName:`filter`,template:gMe,styles:V0});let q0=(e,t)=>O` .filter-bar{background-color: #2c2f33;padding: calc(var(--design-unit) * 2px);transition: all 0.5s ease-out}.filter-grid{display: grid;grid-template-columns: repeat(3, 1fr);grid-auto-rows: minmax(64px, auto);gap: calc(var(--design-unit) * 1px);align-items: end;justify-items: stretch}.toggle{display: flex;justify-content: center;min-height: 20px;cursor: pointer;border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0 0;border-top: 2px solid;color: #f44378}.collapsed{max-height: 0;padding: 0;overflow: hidden}.toggle-collapsed{color: #48ed9c}`,_Me=e=>{switch(e){case`INT`:case`DOUBLE`:case`LONG`:return`number`;case`DATETIME`:return`date`;case`BOOLEAN`:return`boolean`;case`ENUM`:return`enum`;default:return`text`}},vMe=T`<p>Fetching metadata for ${e=>e.resource}...</p>`,yMe=e=>T` ${A(e=>e.collapsed,T`<${e}-icon name="chevron-up"></${e}-icon>`)} ${A(e=>!e.collapsed,T`<${e}-icon name="chevron-down"></${e}-icon>`)} `,J0=e=>T`<div class=${e=>pn([`toggle`,!0],[`toggle-collapsed`,e.collapsed])}@click="${e=>e.toggle()}">${yMe(e)}</div><div class=${e=>pn([`filter-bar`,!0],[`collapsed`,e.collapsed])}><div class="filter-grid" ${k(`filterGrid`)}>${j(e=>e.fields,T`<${e}-filter label="${e=>e.UI_LABEL}" target="${(e,t)=>t.parent?.target}" type="${e=>_Me(e.TYPE)}" fieldName="${e=>e.NAME}" enumOptions="${e=>e.VALID_VALUES}"></${e}-filter>`)}</div></div>`,bMe=T` ${e=>e.ready?J0(Py(e)):vMe} `;var Y0=class extends P{constructor(){super(...arguments),this.columns=5,this.ready=!1,this.collapsed=!0}connectedCallback(){super.connectedCallback(),this.init()}initLabels(){let e=!1,t=[];(this===null||this===void 0?void 0:this.labels)?.length&&(t=this.labels.split(`,`)?.map(e=>e.trim()),e=this.fields?.length===t?.length);for(let n=0;n<(this.fields?.length||0);n+=1){let r=e?t[n]:this.camelCasePreserveWhitespace(this.fields[n].NAME.replace(/_/g,` `));this.fields[n].UI_LABEL=r}}camelCasePreserveWhitespace(e){return e.split(` `).map(e=>zn(e)).join(` `)}resourceChanged(e,t){e!==t&&e?.length&&this.init()}init(){this.ready=!1,this.connect.getMetadata(this.resource).then(e=>{if(this.fields=e.FIELD,this.only?.length){let e=this.only.split(`,`).map(e=>e.trim()),t=(t,n)=>e.indexOf(t.NAME)>e.indexOf(n.NAME)?1:-1;this.fields=this.fields?.filter(t=>e.includes(t.NAME)).sort(t)}this.ready=!0}).then(()=>this.initLabels()).then(()=>window.requestAnimationFrame(()=>{this.adjustColumnStyles()})).catch(e=>Ay.error(e))}adjustColumnStyles(){this.filterGrid&&(this.filterGrid.style[`grid-template-columns`]=`repeat(${this.columns}, 1fr)`)}toggle(){this.ready&&(this.collapsed=!this.collapsed)}};q([D],Y0.prototype,`resource`,void 0),q([D],Y0.prototype,`only`,void 0),q([D],Y0.prototype,`labels`,void 0),q([D],Y0.prototype,`target`,void 0),q([D],Y0.prototype,`columns`,void 0),q([C],Y0.prototype,`ready`,void 0),q([C],Y0.prototype,`fields`,void 0),q([mv],Y0.prototype,`connect`,void 0),q([C],Y0.prototype,`collapsed`,void 0),Y0.compose({baseName:`filter-bar`,template:bMe,styles:q0});let xMe=T`<template><slot></slot></template>`;var X0;(function(e){e.sm=`(max-width: 640px)`,e.md=`(min-width: 641px) and (max-width: 1023px)`,e.lg=`(min-width: 1024px)`})(X0||(X0={}));let Z0=e=>{let t=e?`-${e}`:``;return O` ${t&&`@media only screen and ${X0[e]} {`} :host(.spacing${t}-1x) slot{gap: calc(var(--design-unit) * 2px)}:host(.spacing${t}-2x) slot{gap: calc(var(--design-unit) * 4px)}:host(.spacing${t}-3x) slot{gap: calc(var(--design-unit) * 6px)}:host(.spacing${t}-4x) slot{gap: calc(var(--design-unit) * 8px)}:host(.spacing${t}-5x) slot{gap: calc(var(--design-unit) * 10px)}:host(.spacing${t}-6x) slot{gap: calc(var(--design-unit) * 12px)}:host(.flex${t}-column) slot{flex-direction: column}:host(.flex${t}-column-reverse) slot{flex-direction: column-reverse}:host(.flex${t}-row) slot{flex-direction: row}:host(.flex${t}-row-reverse) slot{flex-direction: row-reverse}:host(.flex${t}-wrap) slot{flex-wrap: wrap}:host(.flex${t}-wrap-reverse) slot{flex-wrap: wrap-reverse}:host(.justify${t}-start) slot{justify-content: flex-start}:host(.justify${t}-end) slot{justify-content: flex-end}:host(.justify${t}-center) slot{justify-content: center}:host(.justify${t}-between) slot{justify-content: space-between}:host(.justify${t}-around) slot{justify-content: space-around}:host(.justify${t}-evenly) slot{justify-content: space-evenly}:host(.items${t}-start) slot{align-items: flex-start}:host(.items${t}-end) slot{align-items: flex-end}:host(.items${t}-center) slot{align-items: center}:host(.items${t}-stretch) slot{align-items: stretch}:host(.items${t}-baseline) slot{align-items: baseline}:host(.content${t}-start) slot{align-content: flex-start}:host(.content${t}-end) slot{align-content: flex-end}:host(.content${t}-center) slot{align-content: center}:host(.content${t}-between) slot{align-content: space-between}:host(.content${t}-around) slot{align-content: space-around}:host(.content${t}-evenly) slot{align-content: space-evenly}${t&&`}`} `},SMe=O` :host{width: 100%;height: 100%}slot{width: 100%;height: 100%;display: flex}${Z0()} ${Z0(`lg`)} ${Z0(`md`)} ${Z0(`sm`)}`,Q0=class extends P{}.compose(Object.assign({baseName:`flex-layout`,styles:SMe,template:xMe,shadowOptions:void 0},{})),$0=(e,t)=>Ji(e,t),e2=(e,t)=>O` ${bu(e,t)}`;var t2=class extends Yi{};let n2={next:`
|
|
887
|
+
DOWNLOAD </${e}-button></div></template>`}}getColumnObject(e){return{columnDataKey:e.NAME,title:e.NAME.toLowerCase().split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `),type:e.TYPE,cellTemplate:cMe}}handleClick(){this.fileInput.value=null,this.fileInput.click()}onFileSelected(e){let t=Array.isArray(e)?e:[e];if(t.length>0&&this.acceptedFormats.length>0){for(let e of t)if(!(this.accept.split(`,`).includes(`.msg`)&&e.name&&e.name.endsWith(`msg`))&&!this.acceptedFormats.includes(e.type)){this.showError(`File Type Error`,`Not a valid file type. Accepted Formats are ${this.accept}`);return}}this.selectedFiles=t,this.fileName=this.selectedFiles.map(e=>e.name.trim()).join(),this.$emit(`file-selected`,{files:this.selectedFiles})}onFileCleared(){this.fileName=``,this.selectedFiles=[]}handleFileUpload(){return J(this,void 0,void 0,function*(){try{let e=nMe(this.selectedFiles);e.append(this.uploadKey,this.entityId);let t=yield rMe(this.uploadEventName,e,this.session.getItem(`authToken`,`session`),this.http);if(t.ERROR){Y.error(t.ERROR),this.$emit(`errorOut`,t.ERROR);return}Y.info(t),this.$emit(`success`,t),this.clearSelection()}catch(e){this.$emit(`errorOut`,e),Y.error(e)}})}handleFileDownload(e){let t=this.tagName.toLowerCase().split(`-`)[0];iMe(this.downloadEventName(e),e.FILE_NAME,this.session.getItem(`authToken`,`session`),`GET`,!0,void 0,t)}};q([C],z0.prototype,`gridCriteria`,void 0),q([mv],z0.prototype,`connect`,void 0),q([Pg],z0.prototype,`http`,void 0),q([Mg],z0.prototype,`session`,void 0),q([D({attribute:`uploaded-files-resource-name`})],z0.prototype,`uploadedFilesResourceName`,void 0),q([D({attribute:`upload-event-name`})],z0.prototype,`uploadEventName`,void 0),q([D({attribute:`field-name`})],z0.prototype,`fieldName`,void 0),q([D({attribute:`entity-id`})],z0.prototype,`entityId`,void 0),q([D({attribute:`upload-key`})],z0.prototype,`uploadKey`,void 0),q([D({attribute:`grid-fields`})],z0.prototype,`gridFields`,void 0),q([C],z0.prototype,`fileName`,void 0),q([C],z0.prototype,`uploadedFilesList`,void 0),q([C],z0.prototype,`filesGridColumnDefinitions`,void 0);let B0={};z0.compose(Object.assign({baseName:`file-upload`,styles:L0,template:tMe,shadowOptions:void 0},B0));let V0=O` .filter-wrapper{border: 1px solid gray;border-radius: calc(var(--design-unit) * 2px);padding: calc(var(--design-unit) * 1px)}.close-icon{display: flex;place-content: center;align-items: center;flex-direction: column;margin: calc(var(--design-unit) * 1px);padding: calc(var(--design-unit) * 1px);border: 1px solid transparent;border-radius: calc(var(--design-unit) * 2px);cursor: pointer}.close-icon, .cloase-icon svg path{transition-property: all;transition-timing-function: linear;transition-duration: 300ms}.close-icon:hover{border-color: red;background: rgb(255 0 0 / 25%)}.close-icon:hover svg path{fill: red}.flex-row{display: flex;flex-direction: row;place-content: center space-between;align-items: center}.flex-row zero-text-field, .flex-row zero-select, .flex-row foundation-text-field, .flex-row foundation-select{flex: 1}`,H0=T`<div class="close-icon" @click=${e=>e.clear()}>${Qje()}</div>`,lMe=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${H0}</div><div class="flex-row"><${e}-text-field ${k(`textFilterField`)}type="text" :value=${Af(e=>e.textFilter)}/></div>`,uMe=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${H0}</div><div class="flex-row"><${e}-text-field ${k(`numFilterFieldMin`)}type="number" :value=${Af(e=>e.numFilterMin)}placeholder="min"></${e}-text-field><${e}-text-field ${k(`numFilterFieldMax`)}type="number" :value=${Af(e=>e.numFilterMax)}placeholder="max"></${e}-text-field></div>`,dMe=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${H0}</div><div class="flex-row"><${e}-text-field ${k(`dateFilterFieldMin`)}type="date" :value=${Af(e=>e.dateFilterMin)}></${e}-text-field><${e}-text-field ${k(`dateFilterFieldMax`)}type="date" :value=${Af(e=>e.dateFilterMax)}></${e}-text-field></div>`;function U0(e){return e?.event?.target?.value??`all`}let fMe=[{name:`All`,value:`all`,selected:!0},{name:`True`,value:`true`},{name:`False`,value:`false`},{name:`N/A`,value:`null`}],pMe=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${H0}</div><div class="flex-row"><${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(U0(t))}}">${j(()=>fMe,T`<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">${e=>e.name}</${e}-option>`)}</${e}-select></div>`,mMe=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${H0}</div><div class="flex-row"><${e}-select @change="${(e,t)=>e.onEnumFilterSelection(U0(t))}}">${j(e=>e.enumFilterOptions,T`<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">${e=>e.name}</${e}-option>`)}</${e}-select></div>`,hMe=(e,t)=>{switch(e.type){case`number`:return uMe(t);case`date`:return dMe(t);case`boolean`:return pMe(t);case`enum`:return mMe(t);default:return lMe(t)}},W0=e=>T`<div class="filter-wrapper">${t=>hMe(t,e)}</div>`,gMe=T` ${e=>W0(Py(e))}</div>`;var G0;(function(e){e.change=`filter-changed`,e.clear=`filter-cleared`})(G0||(G0={}));var K0=class extends P{constructor(){super(...arguments),this.type=`text`,this.textFilter=``,this.enumFilterOptions=[{name:`All`,value:`all`,selected:!0}]}textFilterChanged(e,t){if(!t?.length){this.$emit(G0.clear,{fieldName:this.fieldName,target:this.target});return}let n=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(G0.change,{fieldName:this.fieldName,filter:n,target:this.target})}numFilterMinChanged(e,t){this.numFilterMin=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}numFilterMaxChanged(e,t){this.numFilterMax=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}handleNumericFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t)){this.$emit(G0.clear,{fieldName:this.fieldName,target:this.target});return}let n=`${this.fieldName} >= ${e}`,r=`${this.fieldName} <= ${t}`,i=Number.isFinite(e)?Number.isFinite(t)?`(${n} && ${r})`:n:r;this.$emit(G0.change,{fieldName:this.fieldName,filter:i,target:this.target})}formatDate(e){if(Number.isFinite(e))return new Date(e).toISOString().slice(0,19).replace(/-/g,``).replace(`T`,`-`)}dateFilterMinChanged(e,t){this.dateMinMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}dateFilterMaxChanged(e,t){this.dateMaxMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}handleDateFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t)){this.$emit(G0.clear,{fieldName:this.fieldName});return}let n=`Expr.dateTimeIsAfter(${this.fieldName}, '${this.formatDate(e)}')`,r=`Expr.dateTimeIsBefore(${this.fieldName}, '${this.formatDate(t)}')`,i=Number.isFinite(e)?Number.isFinite(t)?`(${n} && ${r})`:n:r;this.$emit(G0.change,{fieldName:this.fieldName,filter:i,target:this.target})}connectedCallback(){if(super.connectedCallback(),this.enumOptions?.length){let e=this.enumOptions.includes(`|`)?`|`:`,`,t=this.enumOptions.split(e).map(e=>({name:e,value:e}));this.enumFilterOptions=[{name:`All`,value:`all`,selected:!0},...t]}}clear(){switch(this.type){case`number`:this.numFilterFieldMin.value=void 0,this.numFilterFieldMax.value=void 0,this.numFilterMin=void 0,this.numFilterMax=void 0;break;case`date`:this.dateFilterFieldMin.value=``,this.dateFilterFieldMax.value=``,this.dateMinMS=NaN,this.dateMaxMS=NaN;break;case`text`:this.textFilterField.value=``}this.$emit(G0.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){if(!e||e===`all`){this.$emit(G0.clear,{fieldName:this.fieldName,target:this.target});return}this.$emit(G0.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target})}onEnumFilterSelection(e){if(!e||e===`all`){this.$emit(G0.clear,{fieldName:this.fieldName,target:this.target});return}this.$emit(G0.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target})}};q([D],K0.prototype,`fieldName`,void 0),q([D],K0.prototype,`type`,void 0),q([D],K0.prototype,`label`,void 0),q([D],K0.prototype,`target`,void 0),q([C],K0.prototype,`textFilter`,void 0),q([C],K0.prototype,`numFilterMin`,void 0),q([C],K0.prototype,`numFilterMax`,void 0),q([C],K0.prototype,`dateFilterMin`,void 0),q([C],K0.prototype,`dateFilterMax`,void 0),q([D],K0.prototype,`enumOptions`,void 0),q([C],K0.prototype,`enumFilterOptions`,void 0),K0.compose({baseName:`filter`,template:gMe,styles:V0});let q0=(e,t)=>O` .filter-bar{background-color: #2c2f33;padding: calc(var(--design-unit) * 2px);transition: all 0.5s ease-out}.filter-grid{display: grid;grid-template-columns: repeat(3, 1fr);grid-auto-rows: minmax(64px, auto);gap: calc(var(--design-unit) * 1px);place-items: end stretch}.toggle{display: flex;justify-content: center;min-height: 20px;cursor: pointer;border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0 0;border-top: 2px solid;color: #f44378}.collapsed{max-height: 0;padding: 0;overflow: hidden}.toggle-collapsed{color: #48ed9c}`,_Me=e=>{switch(e){case`INT`:case`DOUBLE`:case`LONG`:return`number`;case`DATETIME`:return`date`;case`BOOLEAN`:return`boolean`;case`ENUM`:return`enum`;default:return`text`}},vMe=T`<p>Fetching metadata for ${e=>e.resource}...</p>`,yMe=e=>T` ${A(e=>e.collapsed,T`<${e}-icon name="chevron-up"></${e}-icon>`)} ${A(e=>!e.collapsed,T`<${e}-icon name="chevron-down"></${e}-icon>`)} `,J0=e=>T`<div class=${e=>pn([`toggle`,!0],[`toggle-collapsed`,e.collapsed])}@click="${e=>e.toggle()}">${yMe(e)}</div><div class=${e=>pn([`filter-bar`,!0],[`collapsed`,e.collapsed])}><div class="filter-grid" ${k(`filterGrid`)}>${j(e=>e.fields,T`<${e}-filter label="${e=>e.UI_LABEL}" target="${(e,t)=>t.parent?.target}" type="${e=>_Me(e.TYPE)}" fieldName="${e=>e.NAME}" enumOptions="${e=>e.VALID_VALUES}"></${e}-filter>`)}</div></div>`,bMe=T` ${e=>e.ready?J0(Py(e)):vMe} `;var Y0=class extends P{constructor(){super(...arguments),this.columns=5,this.ready=!1,this.collapsed=!0}connectedCallback(){super.connectedCallback(),this.init()}initLabels(){let e=!1,t=[];(this===null||this===void 0?void 0:this.labels)?.length&&(t=this.labels.split(`,`)?.map(e=>e.trim()),e=this.fields?.length===t?.length);for(let n=0;n<(this.fields?.length||0);n+=1){let r=e?t[n]:this.camelCasePreserveWhitespace(this.fields[n].NAME.replace(/_/g,` `));this.fields[n].UI_LABEL=r}}camelCasePreserveWhitespace(e){return e.split(` `).map(e=>zn(e)).join(` `)}resourceChanged(e,t){e!==t&&e?.length&&this.init()}init(){this.ready=!1,this.connect.getMetadata(this.resource).then(e=>{if(this.fields=e.FIELD,this.only?.length){let e=this.only.split(`,`).map(e=>e.trim()),t=(t,n)=>e.indexOf(t.NAME)>e.indexOf(n.NAME)?1:-1;this.fields=this.fields?.filter(t=>e.includes(t.NAME)).sort(t)}this.ready=!0}).then(()=>this.initLabels()).then(()=>window.requestAnimationFrame(()=>{this.adjustColumnStyles()})).catch(e=>Ay.error(e))}adjustColumnStyles(){this.filterGrid&&(this.filterGrid.style[`grid-template-columns`]=`repeat(${this.columns}, 1fr)`)}toggle(){this.ready&&(this.collapsed=!this.collapsed)}};q([D],Y0.prototype,`resource`,void 0),q([D],Y0.prototype,`only`,void 0),q([D],Y0.prototype,`labels`,void 0),q([D],Y0.prototype,`target`,void 0),q([D],Y0.prototype,`columns`,void 0),q([C],Y0.prototype,`ready`,void 0),q([C],Y0.prototype,`fields`,void 0),q([mv],Y0.prototype,`connect`,void 0),q([C],Y0.prototype,`collapsed`,void 0),Y0.compose({baseName:`filter-bar`,template:bMe,styles:q0});let xMe=T`<template><slot></slot></template>`;var X0;(function(e){e.sm=`(max-width: 640px)`,e.md=`(min-width: 641px) and (max-width: 1023px)`,e.lg=`(min-width: 1024px)`})(X0||(X0={}));let Z0=e=>{let t=e?`-${e}`:``;return O` ${t&&`@media only screen and ${X0[e]} {`} :host(.spacing${t}-1x) slot{gap: calc(var(--design-unit) * 2px)}:host(.spacing${t}-2x) slot{gap: calc(var(--design-unit) * 4px)}:host(.spacing${t}-3x) slot{gap: calc(var(--design-unit) * 6px)}:host(.spacing${t}-4x) slot{gap: calc(var(--design-unit) * 8px)}:host(.spacing${t}-5x) slot{gap: calc(var(--design-unit) * 10px)}:host(.spacing${t}-6x) slot{gap: calc(var(--design-unit) * 12px)}:host(.flex${t}-column) slot{flex-direction: column}:host(.flex${t}-column-reverse) slot{flex-direction: column-reverse}:host(.flex${t}-row) slot{flex-direction: row}:host(.flex${t}-row-reverse) slot{flex-direction: row-reverse}:host(.flex${t}-wrap) slot{flex-wrap: wrap}:host(.flex${t}-wrap-reverse) slot{flex-wrap: wrap-reverse}:host(.justify${t}-start) slot{justify-content: flex-start}:host(.justify${t}-end) slot{justify-content: flex-end}:host(.justify${t}-center) slot{justify-content: center}:host(.justify${t}-between) slot{justify-content: space-between}:host(.justify${t}-around) slot{justify-content: space-around}:host(.justify${t}-evenly) slot{justify-content: space-evenly}:host(.items${t}-start) slot{align-items: flex-start}:host(.items${t}-end) slot{align-items: flex-end}:host(.items${t}-center) slot{align-items: center}:host(.items${t}-stretch) slot{align-items: stretch}:host(.items${t}-baseline) slot{align-items: baseline}:host(.content${t}-start) slot{align-content: flex-start}:host(.content${t}-end) slot{align-content: flex-end}:host(.content${t}-center) slot{align-content: center}:host(.content${t}-between) slot{align-content: space-between}:host(.content${t}-around) slot{align-content: space-around}:host(.content${t}-evenly) slot{align-content: space-evenly}${t&&`}`} `},SMe=O` :host{width: 100%;height: 100%}slot{width: 100%;height: 100%;display: flex}${Z0()} ${Z0(`lg`)} ${Z0(`md`)} ${Z0(`sm`)}`,Q0=class extends P{}.compose(Object.assign({baseName:`flex-layout`,styles:SMe,template:xMe,shadowOptions:void 0},{})),$0=(e,t)=>Ji(e,t),e2=(e,t)=>O` ${bu(e,t)}`;var t2=class extends Yi{};let n2={next:`
|
|
888
888
|
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
889
889
|
<path
|
|
890
890
|
d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"
|
|
@@ -973,7 +973,7 @@ ${e?`<li><strong>Minutes:</strong> Runs at every interval of minutes from the ho
|
|
|
973
973
|
<li><strong>Selected Hours:</strong> allows you to choose specific hours of the day (e.g. 9, 10, and 14).</li>
|
|
974
974
|
</ul>
|
|
975
975
|
`,t)}</label><${t}-select data-test-id="hourly-during-select" :value=${Af(()=>n.during)}@change="${()=>n.handleDuringChange()}"><${t}-option value="every_hour">Interval</${t}-option><${t}-option value="specific_hours">Selected Hours</${t}-option></${t}-select></div>${A(()=>n.during===`every_hour`,t6(t,n,`Every`))} ${A(()=>n.isSpecificHours,T`<div class="break"></div><div class="input-container"><label class="label">
|
|
976
|
-
Hours ${tb(Y3,t)}</label><${t}-multiselect class="time-select" data-test-id="hours-multiselect" name="Hours" :options=${()=>n.hourOptions}:selectedOptions=${()=>n.selectedHours}@selectionChange="${(e,t)=>n.handleHoursChange(t.event)}"></${t}-multiselect></div>`)} ${n6(t,n,!1,!0)}</div>`;case Q.DAILY:return T` ${kPe(t,n)}<div class="row">${t6(t,n,`Every`)} ${n6(t,n,!0,!0)}</div>`;case Q.WEEKLY:return T`<div class="row">${APe(t,n)} ${n6(t,n,!0,!0)}</div>`;case Q.MONTHLY:return T`<div class="row">${t6(t,n,`Every`)} ${n6(t,n,!0,!0)}</div>${e6(t,n)} `;case Q.YEARLY:return T`<div class="row">${n6(t,n,!0,!0)}</div>${e6(t,n)} `;default:return T``}},r6=e=>T`<template><div class="container"><div class="input-container"><label class="label">Recurrence ${A(e=>!e.disableTooltips,T` ${t=>tb(_Pe(!t.minMinuteInterval||t.minMinuteInterval<30),e)} `)}</label><${e}-select data-test-id="select-recurrence" :value=${Af(e=>e.recurrence)}@change="${e=>e.handleRecurrenceChange()}">${A(e=>e.isMinutesRecurrenceEnabled,T`<${e}-option data-test-id="${Q.MINUTES}">${Q.MINUTES}</${e}-option>`)}<${e}-option data-test-id="${Q.HOURLY}">${Q.HOURLY}</${e}-option><${e}-option data-test-id="${Q.DAILY}">${Q.DAILY}</${e}-option><${e}-option data-test-id="${Q.WEEKLY}">${Q.WEEKLY}</${e}-option><${e}-option data-test-id="${Q.MONTHLY}">${Q.MONTHLY}</${e}-option><${e}-option data-test-id="${Q.YEARLY}">${Q.YEARLY}</${e}-option></${e}-select></div>${j(e=>[`${e.recurrence}-${e.during}`],T` ${(t,n)=>jPe(n.parent.recurrence,e,n.parent)} `,{recycle:!1})}</div></template>`,MPe=T` ${e=>r6(Py(e))} `;var i6=class extends P{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:lPe,buildConfigForHourlyRecurrence:cPe,buildConfigForDailyRecurrence:sPe,buildConfigForWeeklyRecurrence:uPe,buildConfigForMonthlyRecurrence:fPe,buildConfigForYearlyRecurrence:dPe},this.recurrence=Q.DAILY,this.cron=``,this.value=this.cron,this.cronConfig={type:Q.DAILY,weekType:R3.WEEK,hours:`0`,minutes:`0`,seconds:`0`},this.frequency=`1`,this.during=`every_hour`,this.hours=`0`,this.minutes=`0`,this.seconds=`0`,this.disableTooltips=!1,this.timezone=``}cronChanged(){if(this.cron)try{if(!oPe(this.cron)){YS({title:`Cron Scheduler`,body:`Invalid Cron Expression`,toast:{type:`critical`}},Py(this));return}this.setsFieldsFromCronEx()}catch(e){console.error(`Error:`,e),YS({title:`Cron Scheduler`,body:e,toast:{type:`critical`}},Py(this));return}}get duringOptions(){return[{label:`Every hour`,value:`every_hour`},{label:`Specific hours`,value:`specific_hours`}]}get frequencySuffix(){switch(this.cronConfig.type){case Q.MINUTES:return`Minute(s)`;case Q.HOURLY:return`Hour(s)`;case Q.DAILY:return`Day(s)`;case Q.MONTHLY:return`Month(s)`;default:return``}}get frequencyList(){switch(this.cronConfig.type){case Q.MINUTES:let e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case Q.HOURLY:return Array.from({length:23},(e,t)=>t+1);case Q.DAILY:return Array.from({length:31},(e,t)=>t+1);case Q.MONTHLY:return Array.from({length:12},(e,t)=>t+1);case Q.YEARLY:return Array.from({length:12},(e,t)=>t+1);case Q.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:24},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return!this.hours||this.hours===`*`||this.hours===`0`?this.hours===`*`?this.hourOptions.map(e=>e.value):[this.hours]:this.hours.split(`,`)}handleHoursChange(e){let t=e.detail;t.length===24?(this.hours=`*`,this.frequency=`1`,this.cronConfig.frequency=`1`):this.hours=!t||t.length===0?`0`:t.sort((e,t)=>Number(e)-Number(t)).join(`,`),this.handleChange(`hours`)}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return this.during===`specific_hours`}get isDailyFrequencyDisabled(){return this.cronConfig.type===Q.DAILY&&this.cronConfig.weekType===R3.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn(`Minimum minute interval has no effect on schedules with an hourly or longer recurrance`)}connectedCallback(){super.connectedCallback(),this.addEventListener(V3.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(V3.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case Q.MINUTES:let e=this.getBaseConfigFields(),{minutes:t}=e,n=hd(e,[`minutes`]);this.during=`every_hour`,this.hours=`*`;let r=[1,2,3,4,5,6,10,12,15,20,30],i=this.minMinuteInterval?Number(this.minMinuteInterval):1,a=r.find(e=>e>=i)||1;this.cronConfig=Object.assign(Object.assign({type:Q.MINUTES},n),{frequency:a.toString(),during:`every_hour`,hours:`*`}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.HOURLY:let o=this.getBaseConfigFields(),{hours:s}=o,c=hd(o,[`hours`]);this.during=`every_hour`,this.hours=`0`,this.cronConfig=Object.assign(Object.assign({type:Q.HOURLY},c),{frequency:`1`,during:`every_hour`,hours:`0`}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.DAILY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.DAILY},this.getBaseConfigFields()),{frequency:`1`,weekType:R3.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.WEEKLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.WEEKLY},this.getBaseConfigFields()),{frequency:`1`,selectedDays:/* @__PURE__ */ new Set([`2`])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.MONTHLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.MONTHLY},this.getBaseConfigFields()),{frequency:`1`,dateOrDay:{type:z3.DATE,dayDate:`1`}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.YEARLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.YEARLY},this.getBaseConfigFields()),{frequency:`1`,dateOrDay:{type:z3.DATE,dayDate:`1`,month:`1`}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:YS({title:`Cron Scheduler`,body:`Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly`,toast:{type:`critical`}},Py(this))}}handleChange(e){if(e===`frequency`&&Number(this.frequency)===0)throw Error(`Frequency must be greater than 0`);this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){this.during===`every_hour`?this.hours=`*`:this.hours===`*`&&(this.hours=`0`),(this.cronConfig.type===Q.MINUTES||this.cronConfig.type===Q.HOURLY)&&(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case Q.MINUTES:this.cron=ePe(e);break;case Q.HOURLY:this.cron=$Ne(e);break;case Q.DAILY:this.cron=tPe(e,H3);break;case Q.WEEKLY:this.cron=nPe(e);break;case Q.MONTHLY:this.cron=rPe(e,H3);break;case Q.YEARLY:this.cron=iPe(e);break;default:YS({title:`Cron Scheduler`,body:`Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly`,toast:{type:`critical`}},Py(this))}this.value=this.cron,this.$emit(`change`)}setsFieldsFromCronEx(){this.cronConfig=pPe(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;let e=this.cronConfig;`minutes`in e&&(this.minutes=e.minutes),(e.type===Q.MINUTES||e.type===Q.HOURLY)&&(this.during=e.during||`every_hour`,e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==Q.HOURLY&&e.type!==Q.MINUTES&&(this.hours=e.hours)}};q([C],i6.prototype,`recurrence`,void 0),q([C],i6.prototype,`cron`,void 0),q([C],i6.prototype,`cronConfig`,void 0),q([C],i6.prototype,`frequency`,void 0),q([C],i6.prototype,`during`,void 0),q([w],i6.prototype,`duringOptions`,null),q([C],i6.prototype,`hours`,void 0),q([C],i6.prototype,`minutes`,void 0),q([C],i6.prototype,`seconds`,void 0),q([w],i6.prototype,`frequencySuffix`,null),q([w],i6.prototype,`frequencyList`,null),q([w],i6.prototype,`hourOptions`,null),q([w],i6.prototype,`selectedHours`,null),q([D({attribute:`min-minute-interval`})],i6.prototype,`minMinuteInterval`,void 0),q([D({mode:`boolean`,attribute:`disable-tooltips`})],i6.prototype,`disableTooltips`,void 0),q([w],i6.prototype,`isMinutesRecurrenceEnabled`,null),q([w],i6.prototype,`isSpecificHours`,null),q([w],i6.prototype,`isDailyFrequencyDisabled`,null),q([D],i6.prototype,`timezone`,void 0);let a6={};i6.compose(Object.assign({baseName:`scheduler-cron-builder`,styles:K3,template:MPe,shadowOptions:void 0},a6));let o6=O` /* Host */ :host{display: flex;flex-direction: column;width: 100%}.container{padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);display: flex;flex-direction: column;gap: calc(var(--design-unit) * 2px)}.label{color: var(--neutral-foreground-hint);display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal}.timezone-combobox::part(listbox){max-height: 20vh}`,s6=e=>T`<template><div class="container"><label class="label">Time Zone</label><${e}-combobox data-test-id="cron-scheduler-timezone" autocomplete="both" class="timezone-combobox" value="${Af(e=>e.timezone)}">${j(e=>e.timeZones,T`<${e}-option value="${e=>e}">${e=>e}</${e}-option>`)}</${e}-combobox></div></template>`,NPe=T` ${e=>s6(Py(e))} `;var c6=class extends P{constructor(){super(...arguments),this.timezone=``,this.value=this.timezone}timezoneChanged(){this.value=this.timezone,this.$emit(`change`)}connectedCallback(){super.connectedCallback(),this.getTimeZones()}getTimeZones(){return J(this,void 0,void 0,function*(){let e=[`Europe/London`,`America/New_York`];try{let t=yield this.connect.request(`VALID_TIME_ZONE`,{REQUEST:{}});if(!t.REPLY||!Array.isArray(t.REPLY))throw Error(`Invalid data returned for Timezones`);this.timeZones=t.REPLY.map(e=>e.ZONE_ID).sort((t,n)=>e.includes(t)&&!e.includes(n)?-1:!e.includes(t)&&e.includes(n)?1:t.localeCompare(n))}catch(e){YS({title:`Cron Scheduler`,body:`Unable to fetch timezones data.`,toast:{type:`critical`}},`rapid`),Y.error(e)}})}};q([C],c6.prototype,`timezone`,void 0),q([mv],c6.prototype,`connect`,void 0),q([C],c6.prototype,`timeZones`,void 0);let l6={};c6.compose(Object.assign({baseName:`scheduler-timezone`,styles:o6,template:NPe,shadowOptions:void 0},l6));let u6=O` .search-bar-combobox{width: 100%;min-width: auto}.padding{padding-left: calc(${B} * 1px)}.selected-options{display: flex;align-items: center;overflow: hidden;gap: calc(${B} * 1px);padding-right: calc(${B} * 1px)}.selected-options:hover{overflow-x: overlay}.selected-options::-webkit-scrollbar{height: 7px}.selected-options::-webkit-scrollbar-thumb{border-radius: 10px;box-shadow: inset 0 0 6px rgb(0 0 0 / 30%);background-color: #484848;border: 1px solid #7e7e7e}.selected-options-divider{border-right: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}.options-button{height: fit-content;min-width: fit-content}.label{display: block;font-size: var(--type-ramp-base-font-size);margin: calc(${B} * 2px) 2px}.label-hidden{display: none}.search-clear-button{min-width: 28px;min-height: 28px;height: 28px;margin: 0}.search-clear-button svg{rotate: 45deg}.search-clear-button::part(control){padding: 0}.search-clear-button .svg-container{display: flex;align-items: center;justify-content: center}.close-icon{color: var(--accent-fill-rest)}`,d6=e=>T`<label part="label" for="control" data-test-id="label" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><${e}-search-bar-combobox ${k(`combobox`)}position="${e=>e.position}" placeholder=${e=>e.placeholder}disabled=${e=>e.disabled}:inputLocked="${e=>e.allSearchFieldsUsed}" autocomplete="none" minlength=${e=>e.minlength}@inputdeleted=${e=>e.inputdeleted()}@change=${e=>e.changeHandler()}@input=${e=>e.inputHandler()}@paste=${(e,t)=>e.pasteHandler(t.event)}class="search-bar-combobox ${e=>e.selectedOptions.length>0?`padding`:null}" data-test-id="search-bar"><div ${k(`selectedOptionsDiv`)}slot="selectedOptions" class="selected-options ${e=>e.selectedOptions.length>0?`selected-options-divider`:null}">${j(e=>e.selectedOptions,T`<${e}-button class="options-button" appearance=${(e,t)=>t.parent.appearance}disabled=${(e,t)=>t.parent.disabled}@click=${(e,t)=>t.parent.unselectOption(e)}>${e=>e.label}<${e}-icon class="close-icon" slot="end" name="circle-xmark" variant="regular"></${e}-icon></${e}-button>`)}</div>${j(e=>e.filteredOptions,T`<${e}-option value="${e=>e.field}" :disabled=${(e,t)=>!t.parent.isOptionEnabled(e)}>${(e,t)=>e.label(t.parent.searchTerm)}</${e}-option>`)} ${A(e=>e.showClearAffordance,T`<${e}-button class="search-clear-button" @click=${e=>e.clearSearch()}slot="end" data-test-id="clear-search" aria-label="Clear search terms" title="Clear search terms"><div class="svg-container"><svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="26px" height="26px" class="bi bi-plus" viewBox="0 0 16 16"><path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z" /></svg></div></${e}-button>`)}</${e}-search-bar-combobox>`,PPe=T` ${e=>d6(Py(e))} `;var f6=class extends P{constructor(){super(...arguments),this.searchTerm=``,this.appearance=`neutral`,this.minlength=3,this.position=YC.BELOW,this.placeholder=`Start typing to search`,this.clearButton=!0,this.selectedOptions=[],this.normalizeDelimiter=e=>e.trim().replace(/\t|\r\n|\n|\r|,/g,` `),this.addOrReplaceSelectedText=(e,t,n)=>t?.length>0?e.replace(t,n):e.concat(n)}clear(){this.selectedOptions=[],this.searchTerm=``,this.combobox&&(this.combobox.currentValue=``,this.combobox.value=``),this.$emit(`selectionChange`,[])}clearSearch(){this.clear()}get showClearAffordance(){if(!this.clearButton)return!1;let e=(this.searchTerm??this.combobox?.value??``).trim();return this.selectedOptions.length>0||e.length>0}get allSearchFieldsUsed(){return this.options?.length?this.options.every(e=>this.selectedOptions.some(t=>t.field===e.field)):!1}isOptionEnabled(e){return e.isEnabled?e.isEnabled(this.searchTerm,this.selectedOptions,this.minlength):this.searchTerm.length>=this.minlength&&!this.selectedOptions.some(t=>t.field===e.field)}selectedOptionsChanged(){this.applySearchInputLock()}optionsChanged(){this.applySearchInputLock()}applySearchInputLock(){this.combobox&&this.allSearchFieldsUsed&&(this.searchTerm=``,this.combobox.value=``,this.combobox.currentValue=``,this.combobox.open=!1,this.filteredOptions=[])}inputdeleted(){this.selectedOptions.length>0&&this.unselectOption(this.selectedOptions[this.selectedOptions.length-1])}changeHandler(){let e=[];this.combobox.selectedOptions.forEach(t=>{let n=t.value,r=this.searchTerm.trim();e.push({field:n,term:r,label:this.options.find(e=>e.field===n)?.label(r)||t.text,createCriteria:this.options.find(e=>e.field===n)?.createCriteria,resourceType:this.options.find(e=>e.field===n)?.resourceType})}),this.selectedOptions=[...this.selectedOptions,...e],this.selectedOptions=this.selectedOptions.filter((e,t,n)=>t===n.findIndex(t=>e.field===t.field&&e.term===t.term)),this.combobox.value=``,this.combobox.open=!1,this.$emit(`selectionChange`,this.selectedOptions),x.queueUpdate(()=>{setTimeout(()=>{this.selectedOptionsDiv.scrollTo(this.selectedOptionsDiv.scrollWidth,0)},10)})}pasteHandler(e){if(this.allSearchFieldsUsed){e.preventDefault();return}this.loading=!0;let t=e.clipboardData.getData(`text/plain`),n=this.normalizeDelimiter(t),r=window.getSelection()?.toString(),i=this.addOrReplaceSelectedText(this.combobox.value,r,n);i?.length>=this.minlength&&(this.combobox.value=i,this.searchTerm=i,this.options&&this.filterSelectedOptions(i),this.combobox.open=!0),this.loading=!1}hasSelectedOption(e,t){return this.selectedOptions.some(n=>n.term===e&&n.field===t)}unselectOption(e){this.selectedOptions=this.selectedOptions.filter(t=>t!==e),this.$emit(`selectionChange`,this.selectedOptions)}inputHandler(){return J(this,void 0,void 0,function*(){if(this.allSearchFieldsUsed){this.applySearchInputLock();return}this.loading=!0,this.searchTerm=this.combobox.value,this.combobox.value.length>=this.minlength&&this.filterSelectedOptions(this.combobox.value),this.loading=!1})}filterSelectedOptions(e){this.filteredOptions=this.options.filter(t=>!this.selectedOptions.find(n=>n.field===t.field&&n.term.trim()===e.trim()))}};q([C],f6.prototype,`defaultSlottedNodes`,void 0),q([C],f6.prototype,`options`,void 0),q([C],f6.prototype,`searchTerm`,void 0),q([D],f6.prototype,`appearance`,void 0),q([D],f6.prototype,`minlength`,void 0),q([D],f6.prototype,`position`,void 0),q([D],f6.prototype,`placeholder`,void 0),q([D],f6.prototype,`disabled`,void 0),q([D({attribute:`clear-button`,mode:`boolean`})],f6.prototype,`clearButton`,void 0),q([C],f6.prototype,`loading`,void 0),q([C],f6.prototype,`selectedOptions`,void 0),q([C],f6.prototype,`filteredOptions`,void 0);let p6={};f6.compose(Object.assign({baseName:`search-bar`,template:PPe,styles:u6,shadowOptions:void 0},p6));let m6=(e,t)=>O` ${fw(e,t)} .control{width: auto;padding-left: calc(${B} * 1px);padding-right: 0}.end{height: 100%;min-width: 36px;max-width: 36px;padding-right: 2px;display: flex;justify-content: flex-end;align-items: center}.selected-value{min-width: 150px;max-width: 169px}.input-locked .control, :host(.input-locked) .control{width: 0;min-width: 0;padding: 0;margin: 0;overflow: hidden;flex: 0}.input-locked .selected-value, :host(.input-locked) .selected-value{display: none}`,h6=(e,t)=>T`<template aria-disabled="${e=>e.ariaDisabled}" autocomplete="${e=>e.autocomplete}" class="${e=>e.open?`open`:``} ${e=>e.disabled?`disabled`:``} ${e=>e.position} ${e=>e.inputLocked?`input-locked`:``}body" ?open="${e=>e.open}" tabindex="${e=>e.disabled?null:`0`}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}" data-test-id="combobox"><slot name="selectedOptions" data-test-id="options"></slot><div class="control" part="control"><slot name="control"><input aria-activedescendant="${e=>e.open?e.ariaActiveDescendant:null}" aria-autocomplete="${e=>e.ariaAutoComplete}" aria-controls="${e=>e.ariaControls}" aria-disabled="${e=>e.ariaDisabled}" aria-expanded="${e=>e.ariaExpanded}" aria-haspopup="listbox" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${k(`control`)}data-test-id="selected-value" /></slot></div>${wt(e,t)}<div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${k(`listbox`)}data-test-id="listbox"><slot ${xt({filter:Vr.slottedOptionFilter,flatten:!0,property:`slottedOptions`})}></slot></div></template>`,FPe=/* @__PURE__ */ new Set([`Backspace`,`Delete`,`Tab`,`Escape`,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]);var g6=class extends du{constructor(){super(...arguments),this.minlength=1,this.previousLength=-1,this.changeListener=e=>{this.previousLength=0}}connectedCallback(){super.connectedCallback(),this.addEventListener(`change`,this.changeListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`change`,this.changeListener)}clickHandler(e){if(!this.disabled){if(this.open){let t=e.target.closest(`option,[role=option]`);if(!t||t.disabled)return;this.selectedOptions=[t],this.control.value=t.text,this.value=this.control.value,this.$emit(`change`)}this.control.focus()}}keyupHandler(e){switch(e.key){case`Backspace`:case`Delete`:this.previousLength<0?this.$emit(`inputdeleted`):--this.previousLength;break;case`Enter`:if(this.open&&this.selectedIndex!==-1){let e=this.slottedOptions[0];this.selectedOptions=[e],this.control.value=e.text,this.value=this.control.value,this.$emit(`change`)}}super.keyupHandler(e)}keydownHandler(e){let t=e.key;if(this.inputLocked){let n=e.ctrlKey||e.metaKey||e.altKey;if(!(FPe.has(t)||n))return e.preventDefault(),!1}switch(t){case`ArrowUp`:case`ArrowDown`:return this.control.value.length<this.minlength?void 0:super.keydownHandler(e);case`Enter`:return this.selectedIndex!==-1&&super.keydownHandler(e);case`Tab`:if(!this.open)return!0;e.shiftKey?this.selectPreviousOption():this.selectNextOption();break;default:return super.keydownHandler(e)}}inputHandler(e){if(this.inputLocked){this.control.value=``,this.value=``,this.open=!1,e.stopImmediatePropagation();return}this.control.value.length>=this.minlength?this.open=!0:(e.stopImmediatePropagation(),this.open=!1),this.value=this.control.value,this.previousLength=this.control.value.length}openChanged(){if(this.open){this.ariaControls=this.listboxId,this.ariaExpanded=`true`,this.setPositioning(),this.focusAndScrollOptionIntoView();return}this.ariaControls=``,this.ariaExpanded=`false`}};q([D],g6.prototype,`minlength`,void 0),q([C],g6.prototype,`inputLocked`,void 0);let _6={delegatesFocus:!0,mode:`open`},v6={};g6.compose(Object.assign({baseName:`search-bar-combobox`,template:h6,styles:m6,shadowOptions:_6},v6));let y6=O` :host{display: block;width: 100%;height: 100%;min-height: 400px;/* Section link marker CSS variables to allow customization of the marker */ --section-link-marker-width: 2px;--section-link-marker-height: 100%;--section-link-marker-left: 0;--section-link-marker-top: 0;--section-link-marker-transition: background-color 0.2s ease;--section-link-marker-background-color: transparent;--section-link-marker-background-color-hover: var(--neutral-layer-hover);--section-link-marker-background-color-active: var(--accent-fill-rest);/* Section link CSS variables to allow customization of the link */ --section-link-text-align: left;--section-link-text-white-space: initial}.section-navigator-container{display: flex;height: 100%;max-height: 100%;width: 100%}.section-navigation{background-color: var(--neutral-layer-2);border-right: 1px solid var(--neutral-stroke-divider);overflow-y: auto;height: 100%;min-width: 20%}.section-link{position: relative;display: block;width: 100%;color: var(--neutral-foreground-rest);text-decoration: none;border: none;background: none;text-align: left;transition: all 0.2s ease;cursor: pointer;font-family: inherit;font-size: inherit;margin: 0;border-radius: 0;vertical-align: top}.section-link.active:hover{color: var(--neutral-foreground-rest)}.section-link:hover{color: var(--accent-foreground-rest)}.section-link::part(control){vertical-align: top;white-space: inherit}.section-link::before{content: '';position: absolute;top: var(--section-link-marker-top);left: var(--section-link-marker-left);width: var(--section-link-marker-width);height: var(--section-link-marker-height);background-color: var(--section-link-marker-background-color);transition: var(--section-link-marker-transition);z-index: 1}.section-link:hover::before{background-color: var(--section-link-marker-background-color-hover)}.section-link.active::before{background-color: var(--section-link-marker-background-color-active)}.section-link::part(content){padding: 0;text-align: var(--section-link-text-align);white-space: var(--section-link-text-white-space)}.section-content-wrapper{flex: 1;height: 100%;overflow: hidden;display: flex;flex-direction: column}.section-content{flex: 1;overflow-y: auto;overflow-x: hidden;padding: calc(var(--design-unit) * 4px);background-color: var(--neutral-layer-1);min-height: 0}.section-content::-webkit-scrollbar{width: var(--scrollbar-width)}.section-content::-webkit-scrollbar-track{background: var(--neutral-layer-4)}.section-content::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);/* 8px */ border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}.content-section{background-color: var(--neutral-layer-1)}.state-icon{margin-left: calc(var(--design-unit) * 1px);width: 12px;height: 12px}.state-icon[data-state='active']{color: var(--accent-fill-rest)}.state-icon[data-state='inactive']{color: var(--neutral-foreground-rest)}.state-icon[data-state='pending']{color: var(--warning-fill-rest)}.state-icon[data-state='disabled']{color: var(--neutral-foreground-disabled)}.state-icon[data-state='error']{color: var(--error-fill-rest)}.state-icon[data-state='completed']{color: var(--success-fill-rest)}/* Section button state colors */ .section-link.state-active{color: var(--accent-foreground-rest)}.section-link.state-inactive{color: var(--neutral-foreground-hint)}.section-link.state-pending{color: var(--warning-color)}.section-link.state-disabled{color: var(--neutral-foreground-disabled)}.section-link.state-error{color: var(--error-color)}.section-link.state-completed{color: var(--success-color)}.section-link.state-multiple{color: var(--accent-foreground-rest)}.section-link.state-none{color: var(--neutral-foreground-rest)}`,IPe=e=>T`<template><div class="section-navigator-container" part="section-navigator-container" ${k(`sectionNavigatorContainer`)}><nav class="section-navigation" part="section-navigator-navigation">${j(e=>e.sectionItems,T`<${e}-button class="section-link ${(e,t)=>t.parent.activeSection===e.name?`active`:``} ${(e,t)=>t.parent.getSectionStateClass(e)}" part="section-navigator-section-link ${(e,t)=>t.parent.getSectionStateClass(e)}" @click="${(e,t)=>t.parent.handleSectionClick(e.name)}">${e=>e.label} ${j(e=>e.states||[],T`<${e}-icon class="state-icon" part="section-navigator-state-icon" title="${(e,t)=>t.parentContext.parent.getStateTooltip(e)}" data-state="${e=>e}" name="${(e,t)=>t.parentContext.parent.getStateIcon(e).name}" variant="${(e,t)=>t.parentContext.parent.getStateIcon(e).variant}"></${e}-icon>`)}</${e}-button>`)}</nav><div class="section-content-wrapper" part="section-navigator-content-wrapper"><section class="section-content" part="section-navigator-content" ${k(`sectionContent`)}>${j(e=>e.sectionItems,T`<div class="content-section" part="section-navigator-content-section" data-section="${e=>e.name}"><slot name="${e=>e.name}"></slot></div>`)}</section></div></div></template>`,b6=T` ${e=>IPe(Py(e))} `,x6=Xd(`SectionNavigator`),S6=`section-navigator`,C6={setState:`${S6}-set-state`,setStates:`${S6}-set-states`,clearState:`${S6}-clear-state`,clearAllStates:`${S6}-clear-all-states`},LPe={active:`Active`,inactive:`Inactive`,pending:`Pending`,disabled:`Disabled`,error:`Error`,completed:`Completed`},w6={active:{name:`circle-dot`,variant:`solid`},inactive:{name:`times-circle`,variant:`regular`},pending:{name:`clock`,variant:`solid`},disabled:{name:`ban`,variant:`solid`},error:{name:`times`,variant:`solid`},completed:{name:`check`,variant:`solid`}};var T6=class e extends P{constructor(){super(...arguments),this.sections=[],this.scrollBehavior=`top`,this.stateTooltips=LPe,this.stateIcons=w6,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=``}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections)){x6.warn(`Sections must be an array`),this.sectionItems=[];return}this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(!this.sectionContent){x6.warn(`Section content element not found`);return}if((e=this.spacerElement)==null||e.remove(),this.spacerElement=void 0,this.scrollBehavior===`top`)try{let e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(`.content-section:last-child`);if(t){let n=t.offsetHeight,r=Math.max(0,e-n-20);this.spacerElement=document.createElement(`div`),this.spacerElement.className=`scroll-spacer`,this.spacerElement.style.height=`${r}px`,this.spacerElement.style.pointerEvents=`none`,this.sectionContent.appendChild(this.spacerElement)}}catch(e){x6.error(`Error updating spacer:`,e)}}scrollToSection(e){if(!this.sectionContent){x6.warn(`Section content not available`);return}try{let t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t){x6.warn(`Section "${e}" not found`);return}let n=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:n,behavior:`smooth`}),this.setupScrollEndDetection()}catch(e){x6.error(`Error scrolling to section:`,e)}}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(!this.sectionContent){x6.warn(`Section content not available for scroll detection`);return}try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},e.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener(`scroll`,this.scrollCheckHandler,{passive:!0});let t=()=>{this.isUserScrolling=!0},n=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};this.sectionContent.addEventListener(`wheel`,t,{passive:!0}),this.sectionContent.addEventListener(`touchstart`,t,{passive:!0}),this.sectionContent.addEventListener(`mousedown`,t,{passive:!0}),this.sectionContent.addEventListener(`scrollend`,n,{passive:!0});let r;this.sectionContent.addEventListener(`scroll`,()=>{clearTimeout(r),r=window.setTimeout(n,e.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){x6.error(`Error setting up scroll detection:`,e)}}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;let e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2,t=null,n=1/0;this.sectionItems.forEach(r=>{let i=this.sectionContent.querySelector(`[data-section="${r.name}"]`);if(i){let a=i.offsetTop+i.clientHeight/2,o=Math.abs(a-e);o<n&&(n=o,t=r.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener(`scroll`,this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener(`scroll`,this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener(`scroll`,this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){if(!this.sectionContent){x6.warn(`Section content not available for event listeners`);return}this.handleSetStateRef=e=>{try{let{sectionName:t,stateName:n}=e.detail;this.addState(t,n)}catch(e){x6.error(`Error handling set-state event:`,e)}},this.handleSetStatesRef=e=>{try{let{sectionName:t,stateNames:n}=e.detail;this.addStates(t,n)}catch(e){x6.error(`Error handling set-states event:`,e)}},this.handleClearStateRef=e=>{try{let{sectionName:t,stateName:n}=e.detail;this.clearState(t,n)}catch(e){x6.error(`Error handling clear-state event:`,e)}},this.handleClearAllStatesRef=e=>{try{let{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){x6.error(`Error handling clear-all-states event:`,e)}},this.handleGenericStateEventRef=e=>{try{let t=e.type,n=e.detail;if(n?.sectionName)return;let r=e.target.closest(`[data-section]`)?.getAttribute(`data-section`);r||(r=e.target.closest(`[slot]`)?.getAttribute(`slot`)||this.activeSection),r||(r=this.activeSection),e.stopPropagation(),e.preventDefault();let i=Object.assign(Object.assign({},n),{sectionName:r}),a=new CustomEvent(t,{detail:i,bubbles:!0,cancelable:!0});this.dispatchEvent(a)}catch(e){x6.error(`Error handling generic state event:`,e)}},this.addEventListener(C6.setState,this.handleSetStateRef),this.addEventListener(C6.setStates,this.handleSetStatesRef),this.addEventListener(C6.clearState,this.handleClearStateRef),this.addEventListener(C6.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(C6.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(C6.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(C6.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(C6.clearAllStates,this.handleGenericStateEventRef,!0)}updateSectionStates(e,t){let n=this.sectionItems.findIndex(t=>t.name===e);if(n!==-1){let e=Object.assign(Object.assign({},this.sectionItems[n]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,n),e,...this.sectionItems.slice(n+1)]}}addState(e,t){if(!e||!t){x6.warn(`Section name and state name are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){x6.warn(`Section "${e}" not found`);return}let r=this.sectionItems[n].states||[];if(!r.includes(t)){let n=[...r,t];this.updateSectionStates(e,n)}}addStates(e,t){if(!e||!Array.isArray(t)){x6.warn(`Section name and state names array are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){x6.warn(`Section "${e}" not found`);return}let r=[...this.sectionItems[n].states||[]];t.forEach(e=>{r.includes(e)||r.push(e)}),this.updateSectionStates(e,r)}clearState(e,t){if(!e||!t){x6.warn(`Section name and state name are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){x6.warn(`Section "${e}" not found`);return}let r=this.sectionItems[n].states||[],i=r.indexOf(t);if(i>-1){let t=r.filter((e,t)=>t!==i);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e){x6.warn(`Section name is required`);return}if(this.sectionItems.findIndex(t=>t.name===e)===-1){x6.warn(`Section "${e}" not found`);return}this.updateSectionStates(e,[])}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||``:(x6.warn(`State name is required`),``)}getSectionStateClass(e){if(!e)return x6.warn(`Section is required`),`state-none`;let t=e.states||[];return t.length===0?`state-none`:t.length>1?`state-multiple`:`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||w6[e]:(x6.warn(`State name is required`),w6.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(C6.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(C6.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(C6.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(C6.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(C6.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(C6.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(C6.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(C6.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),(e=this.spacerElement)==null||e.remove(),this.spacerElement=void 0}};T6.SCROLL_END_TIMEOUT=150,T6.SCROLL_DEBOUNCE_TIMEOUT=100,q([C],T6.prototype,`sections`,void 0),q([D({attribute:`scroll-behavior`})],T6.prototype,`scrollBehavior`,void 0),q([D({attribute:`state-tooltips`})],T6.prototype,`stateTooltips`,void 0),q([D({attribute:`state-icons`})],T6.prototype,`stateIcons`,void 0),q([D({attribute:`disable-auto-scroll-detection`,mode:`boolean`})],T6.prototype,`disableAutoScrollDetection`,void 0),q([C],T6.prototype,`sectionItems`,void 0),q([C],T6.prototype,`activeSection`,void 0);let E6={mode:`open`},D6={};T6.compose(Object.assign({baseName:`foundation-section-navigator`,template:b6,styles:y6,shadowOptions:E6},D6));let O6=(e,t)=>ha(e,t),k6=(e,t)=>O` ${Mu(e,t)} ::slotted(foundation-segmented-item:first-of-type){border-radius: calc(var(--control-corner-radius) * 1px) 0 0 calc(var(--control-corner-radius) * 1px);border-right-width: 0}::slotted(foundation-segmented-item:last-of-type){border-radius: 0 calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0;border-left-width: 0}`;var A6=class extends ga{valueChanged(){this.value===void 0&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}};A6.compose(Object.assign({baseName:`segmented-control`,template:O6,styles:k6,shadowOptions:void 0},{}));let j6=(e,t)=>T`<template role="radio" aria-checked="${e=>e.checked}" aria-required="${e=>e.required}" aria-disabled="${e=>e.disabled}" aria-readonly="${e=>e.readOnly}" @keypress="${(e,t)=>e.keypressHandler(t.event)}" @click="${(e,t)=>e.clickHandler(t.event)}"><span><slot></slot></span></template>`,M6=(e,t)=>O` ${Nu(e,t)} :host{padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);cursor: pointer}:host([aria-checked='true']){background: var(--accent-foreground-rest)}`;(class extends va{}).compose(Object.assign({baseName:`segmented-item`,template:j6,styles:M6,shadowOptions:void 0},{}));let N6=(e,t)=>Ea(e,t),P6=(e,t)=>O` ${lu(e,t)} :host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible), .control:focus-visible{box-shadow: none;outline: none}`;var F6=class extends Fu{get scrollableListbox(){return this.listbox??this.shadowRoot?.querySelector(`.listbox`)}slottedOptionsChanged(e,t){let n=this.value;super.slottedOptionsChanged(e,t),this.selectedIndex=-1;let r=[];this.slottedOptions&&this.slottedOptions.forEach(e=>{let t=e.nodeName.toLowerCase();if(t.endsWith(`-optgroup`)){let t=Array.from(e.children).filter(e=>{let t=e.nodeName.toLowerCase();return e.getAttribute(`role`)===`option`||t.endsWith(`-option`)});r.push(...t)}else(e.getAttribute(`role`)===`option`||t.endsWith(`-option`))&&r.push(e)}),this.options=r,n&&(this.value=n),this.selectedIndex===-1&&this.options.length>0&&(this.selectedIndex=0)}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(Fy(this))&&e!==null&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:`nearest`})}))}openChanged(e,t){if(this.collapsible){if(this.$emit(`open-change`,{open:this.open}),this.open){this.ariaControls=this.listboxId,this.ariaExpanded=`true`,this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,x.queueUpdate(()=>this.focus());return}this.ariaControls=``,this.ariaExpanded=`false`}}keydownHandler(e){switch(e.key){case`ArrowDown`:case`ArrowUp`:this.open?this.options[this.selectedIndex]?.scrollIntoView({block:`center`,behavior:`auto`}):this.open=!0}return super.keydownHandler(e)}};let I6={indicator:`
|
|
976
|
+
Hours ${tb(Y3,t)}</label><${t}-multiselect class="time-select" data-test-id="hours-multiselect" name="Hours" :options=${()=>n.hourOptions}:selectedOptions=${()=>n.selectedHours}@selectionChange="${(e,t)=>n.handleHoursChange(t.event)}"></${t}-multiselect></div>`)} ${n6(t,n,!1,!0)}</div>`;case Q.DAILY:return T` ${kPe(t,n)}<div class="row">${t6(t,n,`Every`)} ${n6(t,n,!0,!0)}</div>`;case Q.WEEKLY:return T`<div class="row">${APe(t,n)} ${n6(t,n,!0,!0)}</div>`;case Q.MONTHLY:return T`<div class="row">${t6(t,n,`Every`)} ${n6(t,n,!0,!0)}</div>${e6(t,n)} `;case Q.YEARLY:return T`<div class="row">${n6(t,n,!0,!0)}</div>${e6(t,n)} `;default:return T``}},r6=e=>T`<template><div class="container"><div class="input-container"><label class="label">Recurrence ${A(e=>!e.disableTooltips,T` ${t=>tb(_Pe(!t.minMinuteInterval||t.minMinuteInterval<30),e)} `)}</label><${e}-select data-test-id="select-recurrence" :value=${Af(e=>e.recurrence)}@change="${e=>e.handleRecurrenceChange()}">${A(e=>e.isMinutesRecurrenceEnabled,T`<${e}-option data-test-id="${Q.MINUTES}">${Q.MINUTES}</${e}-option>`)}<${e}-option data-test-id="${Q.HOURLY}">${Q.HOURLY}</${e}-option><${e}-option data-test-id="${Q.DAILY}">${Q.DAILY}</${e}-option><${e}-option data-test-id="${Q.WEEKLY}">${Q.WEEKLY}</${e}-option><${e}-option data-test-id="${Q.MONTHLY}">${Q.MONTHLY}</${e}-option><${e}-option data-test-id="${Q.YEARLY}">${Q.YEARLY}</${e}-option></${e}-select></div>${j(e=>[`${e.recurrence}-${e.during}`],T` ${(t,n)=>jPe(n.parent.recurrence,e,n.parent)} `,{recycle:!1})}</div></template>`,MPe=T` ${e=>r6(Py(e))} `;var i6=class extends P{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:lPe,buildConfigForHourlyRecurrence:cPe,buildConfigForDailyRecurrence:sPe,buildConfigForWeeklyRecurrence:uPe,buildConfigForMonthlyRecurrence:fPe,buildConfigForYearlyRecurrence:dPe},this.recurrence=Q.DAILY,this.cron=``,this.value=this.cron,this.cronConfig={type:Q.DAILY,weekType:R3.WEEK,hours:`0`,minutes:`0`,seconds:`0`},this.frequency=`1`,this.during=`every_hour`,this.hours=`0`,this.minutes=`0`,this.seconds=`0`,this.disableTooltips=!1,this.timezone=``}cronChanged(){if(this.cron)try{if(!oPe(this.cron)){YS({title:`Cron Scheduler`,body:`Invalid Cron Expression`,toast:{type:`critical`}},Py(this));return}this.setsFieldsFromCronEx()}catch(e){console.error(`Error:`,e),YS({title:`Cron Scheduler`,body:e,toast:{type:`critical`}},Py(this));return}}get duringOptions(){return[{label:`Every hour`,value:`every_hour`},{label:`Specific hours`,value:`specific_hours`}]}get frequencySuffix(){switch(this.cronConfig.type){case Q.MINUTES:return`Minute(s)`;case Q.HOURLY:return`Hour(s)`;case Q.DAILY:return`Day(s)`;case Q.MONTHLY:return`Month(s)`;default:return``}}get frequencyList(){switch(this.cronConfig.type){case Q.MINUTES:let e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case Q.HOURLY:return Array.from({length:23},(e,t)=>t+1);case Q.DAILY:return Array.from({length:31},(e,t)=>t+1);case Q.MONTHLY:return Array.from({length:12},(e,t)=>t+1);case Q.YEARLY:return Array.from({length:12},(e,t)=>t+1);case Q.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:24},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return!this.hours||this.hours===`*`||this.hours===`0`?this.hours===`*`?this.hourOptions.map(e=>e.value):[this.hours]:this.hours.split(`,`)}handleHoursChange(e){let t=e.detail;t.length===24?(this.hours=`*`,this.frequency=`1`,this.cronConfig.frequency=`1`):this.hours=!t||t.length===0?`0`:t.sort((e,t)=>Number(e)-Number(t)).join(`,`),this.handleChange(`hours`)}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return this.during===`specific_hours`}get isDailyFrequencyDisabled(){return this.cronConfig.type===Q.DAILY&&this.cronConfig.weekType===R3.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn(`Minimum minute interval has no effect on schedules with an hourly or longer recurrance`)}connectedCallback(){super.connectedCallback(),this.addEventListener(V3.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(V3.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case Q.MINUTES:let e=this.getBaseConfigFields(),{minutes:t}=e,n=hd(e,[`minutes`]);this.during=`every_hour`,this.hours=`*`;let r=[1,2,3,4,5,6,10,12,15,20,30],i=this.minMinuteInterval?Number(this.minMinuteInterval):1,a=r.find(e=>e>=i)||1;this.cronConfig=Object.assign(Object.assign({type:Q.MINUTES},n),{frequency:a.toString(),during:`every_hour`,hours:`*`}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.HOURLY:let o=this.getBaseConfigFields(),{hours:s}=o,c=hd(o,[`hours`]);this.during=`every_hour`,this.hours=`0`,this.cronConfig=Object.assign(Object.assign({type:Q.HOURLY},c),{frequency:`1`,during:`every_hour`,hours:`0`}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.DAILY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.DAILY},this.getBaseConfigFields()),{frequency:`1`,weekType:R3.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.WEEKLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.WEEKLY},this.getBaseConfigFields()),{frequency:`1`,selectedDays:/* @__PURE__ */ new Set([`2`])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.MONTHLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.MONTHLY},this.getBaseConfigFields()),{frequency:`1`,dateOrDay:{type:z3.DATE,dayDate:`1`}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.YEARLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.YEARLY},this.getBaseConfigFields()),{frequency:`1`,dateOrDay:{type:z3.DATE,dayDate:`1`,month:`1`}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:YS({title:`Cron Scheduler`,body:`Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly`,toast:{type:`critical`}},Py(this))}}handleChange(e){if(e===`frequency`&&Number(this.frequency)===0)throw Error(`Frequency must be greater than 0`);this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){this.during===`every_hour`?this.hours=`*`:this.hours===`*`&&(this.hours=`0`),(this.cronConfig.type===Q.MINUTES||this.cronConfig.type===Q.HOURLY)&&(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case Q.MINUTES:this.cron=ePe(e);break;case Q.HOURLY:this.cron=$Ne(e);break;case Q.DAILY:this.cron=tPe(e,H3);break;case Q.WEEKLY:this.cron=nPe(e);break;case Q.MONTHLY:this.cron=rPe(e,H3);break;case Q.YEARLY:this.cron=iPe(e);break;default:YS({title:`Cron Scheduler`,body:`Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly`,toast:{type:`critical`}},Py(this))}this.value=this.cron,this.$emit(`change`)}setsFieldsFromCronEx(){this.cronConfig=pPe(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;let e=this.cronConfig;`minutes`in e&&(this.minutes=e.minutes),(e.type===Q.MINUTES||e.type===Q.HOURLY)&&(this.during=e.during||`every_hour`,e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==Q.HOURLY&&e.type!==Q.MINUTES&&(this.hours=e.hours)}};q([C],i6.prototype,`recurrence`,void 0),q([C],i6.prototype,`cron`,void 0),q([C],i6.prototype,`cronConfig`,void 0),q([C],i6.prototype,`frequency`,void 0),q([C],i6.prototype,`during`,void 0),q([w],i6.prototype,`duringOptions`,null),q([C],i6.prototype,`hours`,void 0),q([C],i6.prototype,`minutes`,void 0),q([C],i6.prototype,`seconds`,void 0),q([w],i6.prototype,`frequencySuffix`,null),q([w],i6.prototype,`frequencyList`,null),q([w],i6.prototype,`hourOptions`,null),q([w],i6.prototype,`selectedHours`,null),q([D({attribute:`min-minute-interval`})],i6.prototype,`minMinuteInterval`,void 0),q([D({mode:`boolean`,attribute:`disable-tooltips`})],i6.prototype,`disableTooltips`,void 0),q([w],i6.prototype,`isMinutesRecurrenceEnabled`,null),q([w],i6.prototype,`isSpecificHours`,null),q([w],i6.prototype,`isDailyFrequencyDisabled`,null),q([D],i6.prototype,`timezone`,void 0);let a6={};i6.compose(Object.assign({baseName:`scheduler-cron-builder`,styles:K3,template:MPe,shadowOptions:void 0},a6));let o6=O` /* Host */ :host{display: flex;flex-direction: column;width: 100%}.container{padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);display: flex;flex-direction: column;gap: calc(var(--design-unit) * 2px)}.label{color: var(--neutral-foreground-hint);display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal}.timezone-combobox::part(listbox){max-height: 20vh}`,s6=e=>T`<template><div class="container"><label class="label">Time Zone</label><${e}-combobox data-test-id="cron-scheduler-timezone" autocomplete="both" class="timezone-combobox" value="${Af(e=>e.timezone)}">${j(e=>e.timeZones,T`<${e}-option value="${e=>e}">${e=>e}</${e}-option>`)}</${e}-combobox></div></template>`,NPe=T` ${e=>s6(Py(e))} `;var c6=class extends P{constructor(){super(...arguments),this.timezone=``,this.value=this.timezone}timezoneChanged(){this.value=this.timezone,this.$emit(`change`)}connectedCallback(){super.connectedCallback(),this.getTimeZones()}getTimeZones(){return J(this,void 0,void 0,function*(){let e=[`Europe/London`,`America/New_York`];try{let t=yield this.connect.request(`VALID_TIME_ZONE`,{REQUEST:{}});if(!t.REPLY||!Array.isArray(t.REPLY))throw Error(`Invalid data returned for Timezones`);this.timeZones=t.REPLY.map(e=>e.ZONE_ID).sort((t,n)=>e.includes(t)&&!e.includes(n)?-1:!e.includes(t)&&e.includes(n)?1:t.localeCompare(n))}catch(e){YS({title:`Cron Scheduler`,body:`Unable to fetch timezones data.`,toast:{type:`critical`}},`rapid`),Y.error(e)}})}};q([C],c6.prototype,`timezone`,void 0),q([mv],c6.prototype,`connect`,void 0),q([C],c6.prototype,`timeZones`,void 0);let l6={};c6.compose(Object.assign({baseName:`scheduler-timezone`,styles:o6,template:NPe,shadowOptions:void 0},l6));let u6=O` .search-bar-combobox{width: 100%;min-width: auto}.padding{padding-left: calc(${B} * 1px)}.selected-options{display: flex;align-items: center;overflow: hidden;gap: calc(${B} * 1px);padding-right: calc(${B} * 1px)}.selected-options:hover{overflow-x: overlay}.selected-options::-webkit-scrollbar{height: 7px}.selected-options::-webkit-scrollbar-thumb{border-radius: 10px;box-shadow: inset 0 0 6px rgb(0 0 0 / 30%);background-color: #484848;border: 1px solid #7e7e7e}.selected-options-divider{border-right: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}.options-button{height: fit-content;min-width: fit-content}.label{display: block;font-size: var(--type-ramp-base-font-size);margin: calc(${B} * 2px) 2px}.label-hidden{display: none}.search-clear-button{min-width: 28px;min-height: 28px;height: 28px;margin: 0}.search-clear-button svg{rotate: 45deg}.search-clear-button::part(control){padding: 0}.search-clear-button .svg-container{display: flex;align-items: center;justify-content: center}.close-icon{color: var(--accent-fill-rest)}`,d6=e=>T`<label part="label" for="control" data-test-id="label" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><${e}-search-bar-combobox ${k(`combobox`)}position="${e=>e.position}" placeholder=${e=>e.placeholder}disabled=${e=>e.disabled}:inputLocked="${e=>e.allSearchFieldsUsed}" autocomplete="none" minlength=${e=>e.minlength}@inputdeleted=${e=>e.inputdeleted()}@change=${e=>e.changeHandler()}@input=${e=>e.inputHandler()}@paste=${(e,t)=>e.pasteHandler(t.event)}class="search-bar-combobox ${e=>e.selectedOptions.length>0?`padding`:null}" data-test-id="search-bar"><div ${k(`selectedOptionsDiv`)}slot="selectedOptions" class="selected-options ${e=>e.selectedOptions.length>0?`selected-options-divider`:null}">${j(e=>e.selectedOptions,T`<${e}-button class="options-button" appearance=${(e,t)=>t.parent.appearance}disabled=${(e,t)=>t.parent.disabled}@click=${(e,t)=>t.parent.unselectOption(e)}>${e=>e.label}<${e}-icon class="close-icon" slot="end" name="circle-xmark" variant="regular"></${e}-icon></${e}-button>`)}</div>${j(e=>e.filteredOptions,T`<${e}-option value="${e=>e.field}" :disabled=${(e,t)=>!t.parent.isOptionEnabled(e)}>${(e,t)=>e.label(t.parent.searchTerm)}</${e}-option>`)} ${A(e=>e.showClearAffordance,T`<${e}-button class="search-clear-button" @click=${e=>e.clearSearch()}slot="end" data-test-id="clear-search" aria-label="Clear search terms" title="Clear search terms"><div class="svg-container"><svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="26px" height="26px" class="bi bi-plus" viewBox="0 0 16 16"><path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z" /></svg></div></${e}-button>`)}</${e}-search-bar-combobox>`,PPe=T` ${e=>d6(Py(e))} `;var f6=class extends P{constructor(){super(...arguments),this.searchTerm=``,this.appearance=`neutral`,this.minlength=3,this.position=YC.BELOW,this.placeholder=`Start typing to search`,this.clearButton=!0,this.selectedOptions=[],this.normalizeDelimiter=e=>e.trim().replace(/\t|\r\n|\n|\r|,/g,` `),this.addOrReplaceSelectedText=(e,t,n)=>t?.length>0?e.replace(t,n):e.concat(n)}clear(){this.selectedOptions=[],this.searchTerm=``,this.combobox&&(this.combobox.currentValue=``,this.combobox.value=``),this.$emit(`selectionChange`,[])}clearSearch(){this.clear()}get showClearAffordance(){if(!this.clearButton)return!1;let e=(this.searchTerm??this.combobox?.value??``).trim();return this.selectedOptions.length>0||e.length>0}get allSearchFieldsUsed(){return this.options?.length?this.options.every(e=>this.selectedOptions.some(t=>t.field===e.field)):!1}isOptionEnabled(e){return e.isEnabled?e.isEnabled(this.searchTerm,this.selectedOptions,this.minlength):this.searchTerm.length>=this.minlength&&!this.selectedOptions.some(t=>t.field===e.field)}selectedOptionsChanged(){this.applySearchInputLock()}optionsChanged(){this.applySearchInputLock()}applySearchInputLock(){this.combobox&&this.allSearchFieldsUsed&&(this.searchTerm=``,this.combobox.value=``,this.combobox.currentValue=``,this.combobox.open=!1,this.filteredOptions=[])}inputdeleted(){this.selectedOptions.length>0&&this.unselectOption(this.selectedOptions[this.selectedOptions.length-1])}changeHandler(){let e=[];this.combobox.selectedOptions.forEach(t=>{let n=t.value,r=this.searchTerm.trim();e.push({field:n,term:r,label:this.options.find(e=>e.field===n)?.label(r)||t.text,createCriteria:this.options.find(e=>e.field===n)?.createCriteria,resourceType:this.options.find(e=>e.field===n)?.resourceType})}),this.selectedOptions=[...this.selectedOptions,...e],this.selectedOptions=this.selectedOptions.filter((e,t,n)=>t===n.findIndex(t=>e.field===t.field&&e.term===t.term)),this.combobox.value=``,this.combobox.open=!1,this.$emit(`selectionChange`,this.selectedOptions),x.queueUpdate(()=>{setTimeout(()=>{this.selectedOptionsDiv.scrollTo(this.selectedOptionsDiv.scrollWidth,0)},10)})}pasteHandler(e){if(this.allSearchFieldsUsed){e.preventDefault();return}this.loading=!0;let t=e.clipboardData.getData(`text/plain`),n=this.normalizeDelimiter(t),r=window.getSelection()?.toString(),i=this.addOrReplaceSelectedText(this.combobox.value,r,n);i?.length>=this.minlength&&(this.combobox.value=i,this.searchTerm=i,this.options&&this.filterSelectedOptions(i),this.combobox.open=!0),this.loading=!1}hasSelectedOption(e,t){return this.selectedOptions.some(n=>n.term===e&&n.field===t)}unselectOption(e){this.selectedOptions=this.selectedOptions.filter(t=>t!==e),this.$emit(`selectionChange`,this.selectedOptions)}inputHandler(){return J(this,void 0,void 0,function*(){if(this.allSearchFieldsUsed){this.applySearchInputLock();return}this.loading=!0,this.searchTerm=this.combobox.value,this.combobox.value.length>=this.minlength&&this.filterSelectedOptions(this.combobox.value),this.loading=!1})}filterSelectedOptions(e){this.filteredOptions=this.options.filter(t=>!this.selectedOptions.find(n=>n.field===t.field&&n.term.trim()===e.trim()))}};q([C],f6.prototype,`defaultSlottedNodes`,void 0),q([C],f6.prototype,`options`,void 0),q([C],f6.prototype,`searchTerm`,void 0),q([D],f6.prototype,`appearance`,void 0),q([D],f6.prototype,`minlength`,void 0),q([D],f6.prototype,`position`,void 0),q([D],f6.prototype,`placeholder`,void 0),q([D],f6.prototype,`disabled`,void 0),q([D({attribute:`clear-button`,mode:`boolean`})],f6.prototype,`clearButton`,void 0),q([C],f6.prototype,`loading`,void 0),q([C],f6.prototype,`selectedOptions`,void 0),q([C],f6.prototype,`filteredOptions`,void 0);let p6={};f6.compose(Object.assign({baseName:`search-bar`,template:PPe,styles:u6,shadowOptions:void 0},p6));let m6=(e,t)=>O` ${fw(e,t)} .control{width: auto;padding-left: calc(${B} * 1px);padding-right: 0}.end{height: 100%;min-width: 36px;max-width: 36px;padding-right: 2px;display: flex;justify-content: flex-end;align-items: center}.selected-value{min-width: 150px;max-width: 169px}.input-locked .control, :host(.input-locked) .control{width: 0;min-width: 0;padding: 0;margin: 0;overflow: hidden;flex: 0}.input-locked .selected-value, :host(.input-locked) .selected-value{display: none}`,h6=(e,t)=>T`<template aria-disabled="${e=>e.ariaDisabled}" autocomplete="${e=>e.autocomplete}" class="${e=>e.open?`open`:``} ${e=>e.disabled?`disabled`:``} ${e=>e.position} ${e=>e.inputLocked?`input-locked`:``}body" ?open="${e=>e.open}" tabindex="${e=>e.disabled?null:`0`}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}" data-test-id="combobox"><slot name="selectedOptions" data-test-id="options"></slot><div class="control" part="control"><slot name="control"><input aria-activedescendant="${e=>e.open?e.ariaActiveDescendant:null}" aria-autocomplete="${e=>e.ariaAutoComplete}" aria-controls="${e=>e.ariaControls}" aria-disabled="${e=>e.ariaDisabled}" aria-expanded="${e=>e.ariaExpanded}" aria-haspopup="listbox" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${k(`control`)}data-test-id="selected-value" /></slot></div>${wt(e,t)}<div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${k(`listbox`)}data-test-id="listbox"><slot ${xt({filter:Vr.slottedOptionFilter,flatten:!0,property:`slottedOptions`})}></slot></div></template>`,FPe=/* @__PURE__ */ new Set([`Backspace`,`Delete`,`Tab`,`Escape`,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]);var g6=class extends du{constructor(){super(...arguments),this.minlength=1,this.previousLength=-1,this.changeListener=e=>{this.previousLength=0}}connectedCallback(){super.connectedCallback(),this.addEventListener(`change`,this.changeListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`change`,this.changeListener)}clickHandler(e){if(!this.disabled){if(this.open){let t=e.target.closest(`option,[role=option]`);if(!t||t.disabled)return;this.selectedOptions=[t],this.control.value=t.text,this.value=this.control.value,this.$emit(`change`)}this.control.focus()}}keyupHandler(e){switch(e.key){case`Backspace`:case`Delete`:this.previousLength<0?this.$emit(`inputdeleted`):--this.previousLength;break;case`Enter`:if(this.open&&this.selectedIndex!==-1){let e=this.slottedOptions[0];this.selectedOptions=[e],this.control.value=e.text,this.value=this.control.value,this.$emit(`change`)}}super.keyupHandler(e)}keydownHandler(e){let t=e.key;if(this.inputLocked){let n=e.ctrlKey||e.metaKey||e.altKey;if(!(FPe.has(t)||n))return e.preventDefault(),!1}switch(t){case`ArrowUp`:case`ArrowDown`:return this.control.value.length<this.minlength?void 0:super.keydownHandler(e);case`Enter`:return this.selectedIndex!==-1&&super.keydownHandler(e);case`Tab`:if(!this.open)return!0;e.shiftKey?this.selectPreviousOption():this.selectNextOption();break;default:return super.keydownHandler(e)}}inputHandler(e){if(this.inputLocked){this.control.value=``,this.value=``,this.open=!1,e.stopImmediatePropagation();return}this.control.value.length>=this.minlength?this.open=!0:(e.stopImmediatePropagation(),this.open=!1),this.value=this.control.value,this.previousLength=this.control.value.length}openChanged(){if(this.open){this.ariaControls=this.listboxId,this.ariaExpanded=`true`,this.setPositioning(),this.focusAndScrollOptionIntoView();return}this.ariaControls=``,this.ariaExpanded=`false`}};q([D],g6.prototype,`minlength`,void 0),q([C],g6.prototype,`inputLocked`,void 0);let _6={delegatesFocus:!0,mode:`open`},v6={};g6.compose(Object.assign({baseName:`search-bar-combobox`,template:h6,styles:m6,shadowOptions:_6},v6));let y6=O` :host{display: block;width: 100%;height: 100%;min-height: 400px;/* Section link marker CSS variables to allow customization of the marker */ --section-link-marker-width: 2px;--section-link-marker-height: 100%;--section-link-marker-left: 0;--section-link-marker-top: 0;--section-link-marker-transition: background-color 0.2s ease;--section-link-marker-background-color: transparent;--section-link-marker-background-color-hover: var(--neutral-layer-hover);--section-link-marker-background-color-active: var(--accent-fill-rest);/* Section link CSS variables to allow customization of the link */ --section-link-text-align: left;--section-link-text-white-space: initial}.section-navigator-container{display: flex;height: 100%;max-height: 100%;width: 100%}.section-navigation{background-color: var(--neutral-layer-2);border-right: 1px solid var(--neutral-stroke-divider);overflow-y: auto;height: 100%;min-width: 20%}.section-link{position: relative;display: block;width: 100%;color: var(--neutral-foreground-rest);text-decoration: none;border: none;background: none;text-align: left;transition: all 0.2s ease;cursor: pointer;font-family: inherit;font-size: inherit;margin: 0;border-radius: 0;vertical-align: top}.section-link.active:hover{color: var(--neutral-foreground-rest)}.section-link:hover{color: var(--accent-foreground-rest)}.section-link::part(control){vertical-align: top;white-space: inherit}.section-link::before{content: '';position: absolute;top: var(--section-link-marker-top);left: var(--section-link-marker-left);width: var(--section-link-marker-width);height: var(--section-link-marker-height);background-color: var(--section-link-marker-background-color);transition: var(--section-link-marker-transition);z-index: 1}.section-link:hover::before{background-color: var(--section-link-marker-background-color-hover)}.section-link.active::before{background-color: var(--section-link-marker-background-color-active)}.section-link::part(content){padding: 0;text-align: var(--section-link-text-align);white-space: var(--section-link-text-white-space)}.section-content-wrapper{flex: 1;height: 100%;overflow: hidden;display: flex;flex-direction: column}.section-content{flex: 1;overflow: hidden auto;padding: calc(var(--design-unit) * 4px);background-color: var(--neutral-layer-1);min-height: 0}.section-content::-webkit-scrollbar{width: var(--scrollbar-width)}.section-content::-webkit-scrollbar-track{background: var(--neutral-layer-4)}.section-content::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);/* 8px */ border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}.content-section{background-color: var(--neutral-layer-1)}.state-icon{margin-left: calc(var(--design-unit) * 1px);width: 12px;height: 12px}.state-icon[data-state='active']{color: var(--accent-fill-rest)}.state-icon[data-state='inactive']{color: var(--neutral-foreground-rest)}.state-icon[data-state='pending']{color: var(--warning-fill-rest)}.state-icon[data-state='disabled']{color: var(--neutral-foreground-disabled)}.state-icon[data-state='error']{color: var(--error-fill-rest)}.state-icon[data-state='completed']{color: var(--success-fill-rest)}/* Section button state colors */ .section-link.state-active{color: var(--accent-foreground-rest)}.section-link.state-inactive{color: var(--neutral-foreground-hint)}.section-link.state-pending{color: var(--warning-color)}.section-link.state-disabled{color: var(--neutral-foreground-disabled)}.section-link.state-error{color: var(--error-color)}.section-link.state-completed{color: var(--success-color)}.section-link.state-multiple{color: var(--accent-foreground-rest)}.section-link.state-none{color: var(--neutral-foreground-rest)}`,IPe=e=>T`<template><div class="section-navigator-container" part="section-navigator-container" ${k(`sectionNavigatorContainer`)}><nav class="section-navigation" part="section-navigator-navigation">${j(e=>e.sectionItems,T`<${e}-button class="section-link ${(e,t)=>t.parent.activeSection===e.name?`active`:``} ${(e,t)=>t.parent.getSectionStateClass(e)}" part="section-navigator-section-link ${(e,t)=>t.parent.getSectionStateClass(e)}" @click="${(e,t)=>t.parent.handleSectionClick(e.name)}">${e=>e.label} ${j(e=>e.states||[],T`<${e}-icon class="state-icon" part="section-navigator-state-icon" title="${(e,t)=>t.parentContext.parent.getStateTooltip(e)}" data-state="${e=>e}" name="${(e,t)=>t.parentContext.parent.getStateIcon(e).name}" variant="${(e,t)=>t.parentContext.parent.getStateIcon(e).variant}"></${e}-icon>`)}</${e}-button>`)}</nav><div class="section-content-wrapper" part="section-navigator-content-wrapper"><section class="section-content" part="section-navigator-content" ${k(`sectionContent`)}>${j(e=>e.sectionItems,T`<div class="content-section" part="section-navigator-content-section" data-section="${e=>e.name}"><slot name="${e=>e.name}"></slot></div>`)}</section></div></div></template>`,b6=T` ${e=>IPe(Py(e))} `,x6=Xd(`SectionNavigator`),S6=`section-navigator`,C6={setState:`${S6}-set-state`,setStates:`${S6}-set-states`,clearState:`${S6}-clear-state`,clearAllStates:`${S6}-clear-all-states`},LPe={active:`Active`,inactive:`Inactive`,pending:`Pending`,disabled:`Disabled`,error:`Error`,completed:`Completed`},w6={active:{name:`circle-dot`,variant:`solid`},inactive:{name:`times-circle`,variant:`regular`},pending:{name:`clock`,variant:`solid`},disabled:{name:`ban`,variant:`solid`},error:{name:`times`,variant:`solid`},completed:{name:`check`,variant:`solid`}};var T6=class e extends P{constructor(){super(...arguments),this.sections=[],this.scrollBehavior=`top`,this.stateTooltips=LPe,this.stateIcons=w6,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=``}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections)){x6.warn(`Sections must be an array`),this.sectionItems=[];return}this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(!this.sectionContent){x6.warn(`Section content element not found`);return}if((e=this.spacerElement)==null||e.remove(),this.spacerElement=void 0,this.scrollBehavior===`top`)try{let e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(`.content-section:last-child`);if(t){let n=t.offsetHeight,r=Math.max(0,e-n-20);this.spacerElement=document.createElement(`div`),this.spacerElement.className=`scroll-spacer`,this.spacerElement.style.height=`${r}px`,this.spacerElement.style.pointerEvents=`none`,this.sectionContent.appendChild(this.spacerElement)}}catch(e){x6.error(`Error updating spacer:`,e)}}scrollToSection(e){if(!this.sectionContent){x6.warn(`Section content not available`);return}try{let t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t){x6.warn(`Section "${e}" not found`);return}let n=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:n,behavior:`smooth`}),this.setupScrollEndDetection()}catch(e){x6.error(`Error scrolling to section:`,e)}}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(!this.sectionContent){x6.warn(`Section content not available for scroll detection`);return}try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},e.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener(`scroll`,this.scrollCheckHandler,{passive:!0});let t=()=>{this.isUserScrolling=!0},n=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};this.sectionContent.addEventListener(`wheel`,t,{passive:!0}),this.sectionContent.addEventListener(`touchstart`,t,{passive:!0}),this.sectionContent.addEventListener(`mousedown`,t,{passive:!0}),this.sectionContent.addEventListener(`scrollend`,n,{passive:!0});let r;this.sectionContent.addEventListener(`scroll`,()=>{clearTimeout(r),r=window.setTimeout(n,e.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){x6.error(`Error setting up scroll detection:`,e)}}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;let e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2,t=null,n=1/0;this.sectionItems.forEach(r=>{let i=this.sectionContent.querySelector(`[data-section="${r.name}"]`);if(i){let a=i.offsetTop+i.clientHeight/2,o=Math.abs(a-e);o<n&&(n=o,t=r.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener(`scroll`,this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener(`scroll`,this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener(`scroll`,this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){if(!this.sectionContent){x6.warn(`Section content not available for event listeners`);return}this.handleSetStateRef=e=>{try{let{sectionName:t,stateName:n}=e.detail;this.addState(t,n)}catch(e){x6.error(`Error handling set-state event:`,e)}},this.handleSetStatesRef=e=>{try{let{sectionName:t,stateNames:n}=e.detail;this.addStates(t,n)}catch(e){x6.error(`Error handling set-states event:`,e)}},this.handleClearStateRef=e=>{try{let{sectionName:t,stateName:n}=e.detail;this.clearState(t,n)}catch(e){x6.error(`Error handling clear-state event:`,e)}},this.handleClearAllStatesRef=e=>{try{let{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){x6.error(`Error handling clear-all-states event:`,e)}},this.handleGenericStateEventRef=e=>{try{let t=e.type,n=e.detail;if(n?.sectionName)return;let r=e.target.closest(`[data-section]`)?.getAttribute(`data-section`);r||(r=e.target.closest(`[slot]`)?.getAttribute(`slot`)||this.activeSection),r||(r=this.activeSection),e.stopPropagation(),e.preventDefault();let i=Object.assign(Object.assign({},n),{sectionName:r}),a=new CustomEvent(t,{detail:i,bubbles:!0,cancelable:!0});this.dispatchEvent(a)}catch(e){x6.error(`Error handling generic state event:`,e)}},this.addEventListener(C6.setState,this.handleSetStateRef),this.addEventListener(C6.setStates,this.handleSetStatesRef),this.addEventListener(C6.clearState,this.handleClearStateRef),this.addEventListener(C6.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(C6.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(C6.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(C6.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(C6.clearAllStates,this.handleGenericStateEventRef,!0)}updateSectionStates(e,t){let n=this.sectionItems.findIndex(t=>t.name===e);if(n!==-1){let e=Object.assign(Object.assign({},this.sectionItems[n]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,n),e,...this.sectionItems.slice(n+1)]}}addState(e,t){if(!e||!t){x6.warn(`Section name and state name are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){x6.warn(`Section "${e}" not found`);return}let r=this.sectionItems[n].states||[];if(!r.includes(t)){let n=[...r,t];this.updateSectionStates(e,n)}}addStates(e,t){if(!e||!Array.isArray(t)){x6.warn(`Section name and state names array are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){x6.warn(`Section "${e}" not found`);return}let r=[...this.sectionItems[n].states||[]];t.forEach(e=>{r.includes(e)||r.push(e)}),this.updateSectionStates(e,r)}clearState(e,t){if(!e||!t){x6.warn(`Section name and state name are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){x6.warn(`Section "${e}" not found`);return}let r=this.sectionItems[n].states||[],i=r.indexOf(t);if(i>-1){let t=r.filter((e,t)=>t!==i);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e){x6.warn(`Section name is required`);return}if(this.sectionItems.findIndex(t=>t.name===e)===-1){x6.warn(`Section "${e}" not found`);return}this.updateSectionStates(e,[])}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||``:(x6.warn(`State name is required`),``)}getSectionStateClass(e){if(!e)return x6.warn(`Section is required`),`state-none`;let t=e.states||[];return t.length===0?`state-none`:t.length>1?`state-multiple`:`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||w6[e]:(x6.warn(`State name is required`),w6.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(C6.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(C6.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(C6.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(C6.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(C6.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(C6.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(C6.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(C6.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),(e=this.spacerElement)==null||e.remove(),this.spacerElement=void 0}};T6.SCROLL_END_TIMEOUT=150,T6.SCROLL_DEBOUNCE_TIMEOUT=100,q([C],T6.prototype,`sections`,void 0),q([D({attribute:`scroll-behavior`})],T6.prototype,`scrollBehavior`,void 0),q([D({attribute:`state-tooltips`})],T6.prototype,`stateTooltips`,void 0),q([D({attribute:`state-icons`})],T6.prototype,`stateIcons`,void 0),q([D({attribute:`disable-auto-scroll-detection`,mode:`boolean`})],T6.prototype,`disableAutoScrollDetection`,void 0),q([C],T6.prototype,`sectionItems`,void 0),q([C],T6.prototype,`activeSection`,void 0);let E6={mode:`open`},D6={};T6.compose(Object.assign({baseName:`foundation-section-navigator`,template:b6,styles:y6,shadowOptions:E6},D6));let O6=(e,t)=>ha(e,t),k6=(e,t)=>O` ${Mu(e,t)} ::slotted(foundation-segmented-item:first-of-type){border-radius: calc(var(--control-corner-radius) * 1px) 0 0 calc(var(--control-corner-radius) * 1px);border-right-width: 0}::slotted(foundation-segmented-item:last-of-type){border-radius: 0 calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0;border-left-width: 0}`;var A6=class extends ga{valueChanged(){this.value===void 0&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}};A6.compose(Object.assign({baseName:`segmented-control`,template:O6,styles:k6,shadowOptions:void 0},{}));let j6=(e,t)=>T`<template role="radio" aria-checked="${e=>e.checked}" aria-required="${e=>e.required}" aria-disabled="${e=>e.disabled}" aria-readonly="${e=>e.readOnly}" @keypress="${(e,t)=>e.keypressHandler(t.event)}" @click="${(e,t)=>e.clickHandler(t.event)}"><span><slot></slot></span></template>`,M6=(e,t)=>O` ${Nu(e,t)} :host{padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);cursor: pointer}:host([aria-checked='true']){background: var(--accent-foreground-rest)}`;(class extends va{}).compose(Object.assign({baseName:`segmented-item`,template:j6,styles:M6,shadowOptions:void 0},{}));let N6=(e,t)=>Ea(e,t),P6=(e,t)=>O` ${lu(e,t)} :host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible), .control:focus-visible{box-shadow: none;outline: none}`;var F6=class extends Fu{get scrollableListbox(){return this.listbox??this.shadowRoot?.querySelector(`.listbox`)}slottedOptionsChanged(e,t){let n=this.value;super.slottedOptionsChanged(e,t),this.selectedIndex=-1;let r=[];this.slottedOptions&&this.slottedOptions.forEach(e=>{let t=e.nodeName.toLowerCase();if(t.endsWith(`-optgroup`)){let t=Array.from(e.children).filter(e=>{let t=e.nodeName.toLowerCase();return e.getAttribute(`role`)===`option`||t.endsWith(`-option`)});r.push(...t)}else(e.getAttribute(`role`)===`option`||t.endsWith(`-option`))&&r.push(e)}),this.options=r,n&&(this.value=n),this.selectedIndex===-1&&this.options.length>0&&(this.selectedIndex=0)}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(Fy(this))&&e!==null&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:`nearest`})}))}openChanged(e,t){if(this.collapsible){if(this.$emit(`open-change`,{open:this.open}),this.open){this.ariaControls=this.listboxId,this.ariaExpanded=`true`,this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,x.queueUpdate(()=>this.focus());return}this.ariaControls=``,this.ariaExpanded=`false`}}keydownHandler(e){switch(e.key){case`ArrowDown`:case`ArrowUp`:this.open?this.options[this.selectedIndex]?.scrollIntoView({block:`center`,behavior:`auto`}):this.open=!0}return super.keydownHandler(e)}};let I6={indicator:`
|
|
977
977
|
<svg
|
|
978
978
|
class="select-indicator"
|
|
979
979
|
part="select-indicator"
|
|
@@ -986,7 +986,7 @@ ${e?`<li><strong>Minutes:</strong> Runs at every interval of minutes from the ho
|
|
|
986
986
|
</svg>
|
|
987
987
|
`};F6.compose(Object.assign({baseName:`select`,template:N6,styles:P6,shadowOptions:void 0},I6));let L6=(e,t)=>Da(e,t),R6=(e,t)=>O` ${Iu(e,t)}`;var z6=class extends Oa{};let B6={};z6.compose(Object.assign({baseName:`skeleton`,template:L6,styles:R6,shadowOptions:void 0},B6));let V6=(e,t)=>T`<template role="slider" class="${e=>e.readOnly?`readonly`:``} ${e=>e.orientation||dn.horizontal}" tabindex="${e=>e.disabled?null:0}" aria-valuetext="${e=>e.valueTextFormatter(e.value)}" aria-valuenow="${e=>e.value}" aria-valuemin="${e=>e.min}" aria-valuemax="${e=>e.max}" aria-disabled="${e=>e.disabled?!0:void 0}" aria-readonly="${e=>e.readOnly?!0:void 0}" aria-orientation="${e=>e.orientation}" class="${e=>e.orientation}"><div part="positioning-region" class="positioning-region"><div ${k(`track`)}part="track-container" class="track"><div class="track-progress" style="${e=>{let t=1-In(0,1,(parseInt(e.value)-e.min)/(e.max-e.min)),n=Math.round((1-t)*100);return e.orientation===`horizontal`?e.isDragging?`height: calc(var(--track-width) * 1px); width: ${n}%;`:`height: calc(var(--track-width) * 1px); width: ${n}%; transition: all 0.2s ease;`:e.isDragging?`width: calc(var(--track-width) * 1px); height: ${n}%;`:`width: calc(var(--track-width) * 1px); height: ${n}%; transition: all 0.2s ease;`}}"></div></div><slot></slot><div ${k(`thumb`)}part="thumb-container" class="thumb-container" style="${e=>e.position}"><slot name="thumb">${t.thumb||``}</slot></div></div></template>`,H6=(e,t)=>O` ${Vu(e,t)} .track-progress{background-color: var(--accent-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px)}`;var U6=class extends Na{};let W6={thumb:`
|
|
988
988
|
<div class="thumb-cursor"></div>
|
|
989
|
-
`};U6.compose(Object.assign({baseName:`slider`,template:V6,styles:H6,shadowOptions:void 0},W6));let G6=(e,t)=>ka(e,t),K6=(e,t)=>O` ${zu(e,t)}`;var q6=class extends Bu{};let J6={};q6.compose(Object.assign({baseName:`slider-label`,template:G6,styles:K6,shadowOptions:void 0},J6));let Y6=`default`,X6=1e4,Z6={DISMISS:`dismiss`,AUTO_DISMISS:`autoDismiss`},Q6=O` @keyframes append-from-left-animate{from{transform: translateX(100%);opacity: 0%}to{transform: translateX(0%);opacity: 100%}}@keyframes delete-from-left-animate{from{transform: translateX(0%);opacity: 100%}to{transform: translateX(100%);opacity: 0%}}@keyframes append-from-top-animate{from{transform: translateY(-100%);opacity: 0%}to{transform: translateY(0%);opacity: 100%}}@keyframes delete-from-top-animate{from{transform: translateY(0%);opacity: 100%}to{transform: translateY(-100%);opacity: 0%}}@keyframes delete-fade-animate{from{opacity: 100%}to{opacity: 0%}}:host{--snackbar-min-width: 356px;--snackbar-min-height: 55px;--snackbar-max-width: 496px;--snackbar-max-height: auto;--snackbar-animation-name: append-from-left-animate;--snackbar-animation-delete-name: delete-from-left-animate}.snackbar{animation: var(--snackbar-animation-name) 0.3s linear;max-width: var(--snackbar-max-width);min-width: var(--snackbar-min-width);min-height: var(--snackbar-min-height);max-height: var(--snackbar-max-height);background-color: var(--fill-color);border-radius: calc(var(--control-corner-radius) * 1px);border-width: thin;border-color: var(--neutral-fill-rest);box-shadow: 0 2px 5px 0 rgb(0 0 0 / 35%);box-sizing: border-box;display: flex;position: relative;bottom: 5px;flex-direction: row;padding: 2px 16px}.snackbar-delete{animation: var(--snackbar-animation-delete-name) 0.3s linear;opacity: 0%}.snackbar::after{content: '';position: absolute;top: 50%;transform: translateY(-50%);left: 0;height: calc(100% - 2px);width: 2px;border-radius: 2px}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;overflow-wrap: anywhere;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,$6=e=>T`<div role="alert" aria-live="polite" part="snackbar" class="snackbar ${e=>e.deleteAnimation}" ${k(`snackbar`)}><div part="content" class="content"><slot name="content">${e=>e.error?.errorDetails||e.notification?.body||`Place holder for error message`}</slot></div>${A(e=>e.error?.config?.snackbar?.confirmingActions?.length||e.notification?.config?.snackbar?.confirmingActions?.length,T`<div part="action" class="action"><slot name="action">${j(e=>e.error?.config?.snackbar?.confirmingActions||e.notification?.config?.snackbar?.confirmingActions,T`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var n;e?.action(),(n=t.parent)==null||n.dismiss()}}>${e=>e.label}</${e}-button>`)}</slot></div>`)}</div>`,RPe=T` ${e=>$6(Py(e))} `,e8={mode:`open`,delegatesFocus:!0};var t8=class extends P{constructor(){super(...arguments),this.deleteAnimation=``,this.closeTimeout=X6,this.autoClose=!0,this.type=Y6,this.dismissEventListener=this.handleDissmis.bind(this)}autoCloseChanged(){this.autoClose&&(this.timeoutRef=setTimeout(()=>{this.handleDissmis(!0)},this.closeTimeout)),!this.autoClose&&this.timeoutRef&&clearTimeout(this.timeoutRef)}connectedCallback(){super.connectedCallback(),this.addEventListener(Z6.DISMISS,this.dismissEventListener)}errorChanged(e,t){this.type=t?.config?.snackbar?.type??Y6}notificationChanged(e,t){this.type=t?.config?.snackbar?.type??Y6,this.autoClose=t?.config?.snackbar?.autoClose??!0,this.closeTimeout=t?.config?.snackbar?.closeTimeout??X6}handleDissmis(e=!1){this.deleteAnimation=`snackbar-delete`,this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(Z6.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Z6.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}};q([C],t8.prototype,`error`,void 0),q([C],t8.prototype,`notification`,void 0),q([C],t8.prototype,`deleteAnimation`,void 0),q([D({attribute:`identifier`})],t8.prototype,`identifier`,void 0),q([D({attribute:`close-timeout`})],t8.prototype,`closeTimeout`,void 0),q([D({attribute:`auto-close`,mode:`boolean`})],t8.prototype,`autoClose`,void 0),q([D({attribute:`type`})],t8.prototype,`type`,void 0),t8.compose({baseName:`snackbar`,styles:Q6,template:RPe,shadowOptions:e8});let n8=(e,t)=>O` ${M1()} .fa-stack{display: inline-block;text-align: center;line-height: 2em;height: 2em;position: relative;width: 2em}.fa-stack-1x, .fa-stack-2x{left: 50%;position: absolute;transform: translateX(-50%)}.fa-stack-2x{font-size: 2em}.fa-stack-1x{z-index: 1}`,r8=T`<span class=${e=>`fa-stack fa-${e.size}`}style=${e=>`vertical-align: ${e[`vertical-align`]};`}><slot></slot></span>`;var i8=class extends P{constructor(){super(...arguments),this.size=`1x`,this[`vertical-align`]=`baseline`}};q([D],i8.prototype,`size`,void 0),q([D],i8.prototype,`vertical-align`,void 0),i8.compose({baseName:`stacking-icons`,template:r8,styles:n8});let a8=O` .status-pill{font-size: var(--ag-data-font-size);display: inline-flex;align-items: center;gap: 5px;border-radius: 30px;height: 16px;background: grey;color: var(--neutral-foreground-rest);padding: 2px 8px;line-height: 1;font-weight: 500}.status-pill.lg{height: 32px;border-radius: 16px;padding: 2px 12px}.status-pill-initial{height: 14px;width: 14px;border-radius: 7px;font-weight: bold;font-size: 12px;display: flex;justify-content: center;align-items: center}.status-pill-image{height: 14px}`,zPe=e=>T` ${A(e=>e.isCountdownVisible&&!(e.hideWhenCountdownCompleted&&e.isCountdownExpired),T`<div data-test-id="status-pill" part="status-pill" class="status-pill" style="color:${e=>e.textColor||``}; background:${e=>e.backgroundColor||``};">${A(e=>e.iconName,T`<${e}-icon name="${e=>e.iconName}" size="${e=>e.iconSize}"></${e}-icon>`)} ${A(e=>e.iconSrc,T`<img alt="${e=>e.iconSrc}" class="status-pill-image" src="${e=>e.iconSrc}" />`)} ${A(e=>e.iconInitial,T`<div data-test-id="status-pill-initial" class="status-pill-initial" style="color:${e=>e.textColor}; background-color:${e=>e.iconInitialBackgroundColor}">${e=>e.iconInitial.substring(0,1)}</div>`)}<span data-test-id="status-pill-text">${e=>e.text}</span>${A(e=>e.countdown,T`<span data-test-id="status-pill-countdown">${e=>e.countdown}</span>`)}</div>`)} `,o8=T` ${e=>zPe(Py(e))} `,s8=1e3,c8=86400,l8=3600,BPe=(e,t=`second`)=>{let n=e/s8,r=Math.floor(n/c8);n%=c8;let i=Math.floor(n/l8);n%=l8;let a=Math.floor(n/60),o=Math.floor(n%60),s=[];switch(r&&s.push(`${r}d`),t){case`minute`:i&&s.push(`${i}h`),a&&s.push(`${a}m`),!a&&o&&s.push(`< 1m`);break;case`hour`:i&&s.push(`${i}h`),!i&&(a||o)&&s.push(`< 1h`);break;default:i&&s.push(`${i}h`),a&&s.push(`${a}m`),o&&s.push(`${o}s`)}return s.length?s.join(` `):`0s`};var u8=class extends P{constructor(){super(...arguments),this.iconSize=`sm`,this.dateCountdownCompletedMessage=`Expired`,this.dateCountdownUnit=`second`,this.hideWhenCountdownCompleted=!1,this.isCountdownExpired=!1,this.isCountdownVisible=!0}dateCountdownChanged(e,t){if(e!==t){if(!t){this.clearCountdownTimer();return}this.isCountdownExpired=!1,this.setUpDateCountdown(t)}}dateCountdownVisibleAfterChanged(e,t){e!==t&&this.updateVisibilityFromStartTime()}connectedCallback(){this.updateVisibilityFromStartTime(),super.connectedCallback()}disconnectedCallback(){this.clearCountdownTimer(),super.disconnectedCallback()}setUpDateCountdown(e){if(this.clearCountdownTimer(),isNaN(parseInt(e)))Ay.warn(`invalid date-countdown value passed. Must be a number`);else{e=parseInt(e);let t=new Date(e);this.updateCountdown(t),this.dateInterval=setInterval(()=>this.updateCountdown(t),s8)}}updateCountdown(e){let t=(/* @__PURE__ */ new Date()).getTime(),n=Math.floor(e.getTime()-t),r=this.dateCountdownVisibleAfter!==void 0&&this.dateCountdownVisibleAfter!==null?Number(this.dateCountdownVisibleAfter):void 0;if(r!==void 0&&!isNaN(r)&&t<r){this.isCountdownVisible=!1,this.countdown=null,this.isCountdownExpired=!1;return}this.isCountdownVisible=!0,n<=0?this.hideWhenCountdownCompleted?(this.isCountdownExpired=!0,this.clearCountdownTimer()):(this.countdown=this.dateCountdownCompletedMessage,clearInterval(this.dateInterval)):this.countdown=BPe(n,this.dateCountdownUnit)}updateVisibilityFromStartTime(){let e=this.dateCountdownVisibleAfter!==void 0&&this.dateCountdownVisibleAfter!==null?Number(this.dateCountdownVisibleAfter):void 0;if(e!==void 0&&!isNaN(e)){let t=Date.now();this.isCountdownVisible=t>=e}else this.isCountdownVisible=!0}clearCountdownTimer(){this.dateInterval&&(clearInterval(this.dateInterval),this.dateInterval=null),this.countdown=null}};q([D({attribute:`background-color`})],u8.prototype,`backgroundColor`,void 0),q([D({attribute:`icon-name`})],u8.prototype,`iconName`,void 0),q([D({attribute:`icon-src`})],u8.prototype,`iconSrc`,void 0),q([D({attribute:`icon-initial`})],u8.prototype,`iconInitial`,void 0),q([D({attribute:`icon-initial-background-color`})],u8.prototype,`iconInitialBackgroundColor`,void 0),q([D({attribute:`icon-size`})],u8.prototype,`iconSize`,void 0),q([D({attribute:`text-color`})],u8.prototype,`textColor`,void 0),q([D],u8.prototype,`text`,void 0),q([D({attribute:`date-countdown`})],u8.prototype,`dateCountdown`,void 0),q([D({attribute:`date-countdown-completed-message`})],u8.prototype,`dateCountdownCompletedMessage`,void 0),q([D({attribute:`date-countdown-unit`})],u8.prototype,`dateCountdownUnit`,void 0),q([D({attribute:`date-countdown-visible-after`})],u8.prototype,`dateCountdownVisibleAfter`,void 0),q([D({mode:`boolean`,attribute:`hide-when-countdown-completed`})],u8.prototype,`hideWhenCountdownCompleted`,void 0),q([C],u8.prototype,`countdown`,void 0),q([C],u8.prototype,`isCountdownExpired`,void 0),q([C],u8.prototype,`isCountdownVisible`,void 0),u8.compose({baseName:`status-pill`,styles:a8,template:o8});let d8=(e,t)=>{let n=[`step`,`step-${t}`];return e.selected&&n.push(`step-selected`),e.completed&&n.push(`step-completed`),e.error&&n.push(`step-error`),n.join(` `)},VPe=[`positioning-region: step-positioning-region`,`content-region: step-content-region`,`expand-collapse-button: step-expand-collapse-button`,`items: step-items`].join(`, `),f8=e=>T` ${jf(e=>e.orientation===Va.vertical,T`<${e}-tree-item ${k(`treeItem`)}class=${e=>pn(`tree-item`,[`cursor-pointer`,e.showCursorPointer])}part="${e=>d8(e,`vertical`)}" exportparts="${VPe}" @click="${(e,t)=>e.$emit(`tab-clicked`,e.tabPosition-1)}">${A(e=>e.completed,T`<${e}-icon name="check-circle" variant="regular" size="lg" class="stepper-icon completed-icon" part="step-icon step-icon-completed"></${e}-icon>`)} ${A(e=>e.error,T`<${e}-icon name="times-circle" variant="regular" size="lg" class="stepper-icon error-icon" part="step-icon step-icon-error"></${e}-icon>`)}<slot></slot></${e}-tree-item>`,T`<div class=${e=>pn(`step-container`,[`selected`,e.selected])}part="${e=>d8(e,`horizontal`)}"><div class=${e=>pn(`step-number-container`,[`cursor-pointer`,e.showCursorPointer])}part="step-number-container" @click="${e=>e.$emit(`tab-clicked`,e.tabPosition-1)}">${A(e=>!e.hideStepNumber,T`<span class="step-number" part="step-number">${e=>e.tabPosition}</span>`)}<slot class="step-title"></slot></div>${A(e=>!e.isLast,T`<${e}-icon class="stepper-icon angle-icon" part="step-icon step-icon-angle" name="angle-right" variant="solid" size="lg"></${e}-icon>`)}</div>`)} `,HPe=T` ${e=>f8(Py(e))} `,p8=(e,t)=>O` .tree-item{cursor: default}.tree-item::part(content-region){margin-inline-start: 0}.tree-item[selected]::part(positioning-region):hover{background: var(--neutral-fill-rest)}.tree-item::part(positioning-region):hover{background: var(--neutral-fill-stealth-rest)}.stepper-icon{margin-right: 5px}.completed-icon{color: #69cd70}.error-icon{color: #f14376}.step-number{display: flex;justify-content: center;align-items: center;margin: 0 5px 0 0;width: 24px;height: 24px;font-size: var(--type-ramp-minus-1-font-size);font-weight: 500;color: var(--focus-stroke-outer);background-color: var(--neutral-fill-input-rest);border-radius: 50%;border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-input-rest)}.step-number-container{display: flex;flex-direction: row;align-items: center;justify-content: center;width: 75%}.angle-icon{color: var(--neutral-fill-input-rest);margin: 0 calc(var(--design-unit) * 4px)}.step-title{font-size: var(--type-ramp-base-font-size);color: var(--focus-stroke-outer);font-weight: 600}:host([completed]) .step-number{border-color: #69cd70;color: white;background-color: #69cd70}:host([completed]) .step-title{color: #69cd70}:host([error]) .step-number{border-color: #f14376;color: white;background-color: #f14376}:host([error]) .step-title{color: #f14376}:host([orientation='horizontal']){flex: 1 1 0;height: 100%}.cursor-pointer{cursor: pointer}.step-container{position: relative;display: flex;align-items: center;justify-content: space-between;height: 100%}.step-container.selected::after{content: '';position: absolute;bottom: 0;left: calc(var(--design-unit) * -3px);/* This matches the left padding */ right: 28px;/* This matches the icon width + right margin */ height: 2px;width: calc(100% - 28px);background-color: var(--accent-fill-rest);/* Choose a color */}`;var m8=class extends P{constructor(){super(...arguments),this.slot=`tab`,this.orientation=Va.vertical}isCompleted(){return this.completed}selectedChanged(){this.treeItem&&(this.treeItem.selected=this.selected)}disconnectedCallback(){super.disconnectedCallback(),this.completed=void 0,this.error=void 0,this.selected=void 0}};q([D],m8.prototype,`slot`,void 0),q([D({mode:`boolean`})],m8.prototype,`selected`,void 0),q([D({mode:`boolean`})],m8.prototype,`completed`,void 0),q([D({mode:`boolean`})],m8.prototype,`error`,void 0),q([D({mode:`boolean`})],m8.prototype,`isLast`,void 0),q([D({mode:`boolean`})],m8.prototype,`hideStepNumber`,void 0),q([D({mode:`boolean`})],m8.prototype,`showCursorPointer`,void 0),q([D({attribute:`tab-position`})],m8.prototype,`tabPosition`,void 0),q([D],m8.prototype,`orientation`,void 0);let h8={};m8.compose(Object.assign({baseName:`stepper-tab`,template:HPe,styles:p8,shadowOptions:void 0},h8));let g8=()=>T`<template slot="tab-panel" role="stepper-tab-panel"><slot></slot></template>`;var _8=class extends P{};let v8={};_8.compose(Object.assign({baseName:`stepper-tab-panel`,template:g8,shadowOptions:void 0},v8));let y8=(e,t)=>Pa(e,t),b8=(e,t)=>O` ${Hu(e,t)} .checked-indicator{transform: scale(1.3)}.switch{border-radius: calc(var(--control-corner-radius) * 3px)}.checked-indicator{border-radius: calc(var(--control-corner-radius) * 2px)}`;var x8=class extends Fa{};x8.compose(Object.assign({baseName:`switch`,template:y8,styles:b8,shadowOptions:void 0},{switch:`<div class="checked-indicator" part="checked-indicator"></div>`}));let S8=(e,t)=>Ra(e,t),C8=(e,t)=>O` ${Wu(e,t)} :host{user-select: none}`;var w8=class extends za{constructor(){super(...arguments),this.alert=!1}alertChanged(){this.alert&&Zje()}};q([D({mode:`boolean`})],w8.prototype,`alert`,void 0);let T8={};w8.compose(Object.assign({baseName:`tab`,template:S8,styles:C8,shadowOptions:void 0},T8));let E8=(e,t)=>Ia(e,t),D8=(e,t)=>O` ${Gu(e,t)} :host{height: 100%;padding: 0}`;var O8=class extends La{};let k8={};O8.compose(Object.assign({baseName:`tab-panel`,template:E8,styles:D8,shadowOptions:void 0},k8));let A8=(e,t)=>Ba(e,t),j8=(e,t)=>O` ${Uu(e,t)} :host{height: 100%;width: 100%}:host([scrollable]) [part='tablist']{overflow-x: auto;overflow-y: hidden;white-space: nowrap}:host([scrollable]) ::slotted([role='tab']){flex: 0 0 auto}`;var M8=class extends Ha{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}};q([D({mode:`boolean`})],M8.prototype,`scrollable`,void 0);let N8={};M8.compose(Object.assign({baseName:`tabs`,template:A8,styles:j8,shadowOptions:void 0},N8));let P8=(e,t)=>Ka(e,t),F8=(e,t)=>O` ${Ku(e,t)} :host .control{padding: calc(var(--design-unit) * 3px)}`;var I8=class extends qu{};let L8={};I8.compose(Object.assign({baseName:`text-area`,template:P8,styles:F8,shadowOptions:void 0},L8));let R8=(e,t)=>T`<template class="${e=>pn([`readonly`,e.readOnly],[`has-prefix`,!!e.prefix],[`has-suffix`,!!e.suffix])}"><label part="label" for="${e=>e.id?e.id:`control`}" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?`label`:`label label-hidden`}"><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><div class="root" part="root">${Tt(e,t)}<div class="control-field">${A(e=>e.prefix,T`<span class="prefix" part="prefix" id="${e=>`${e.id||`control`}-prefix`}" ?aria-hidden="${e=>e.hideAffixFromScreenReader}">${e=>e.prefix}</span>`)}<input name="${e=>e.name}" autocomplete="${e=>e.autocomplete}" autocapitalize="${e=>e.autocapitalize}" id="${e=>e.id?e.id:`control`}" class="control" part="control" @input="${e=>e.handleTextInput()}" @change="${e=>e.handleChange()}" step="${e=>e.step}" ?autofocus="${e=>e.autofocus}" ?disabled="${e=>e.disabled}" list="${e=>e.list}" maxlength="${e=>e.maxlength}" minlength="${e=>e.minlength}" pattern="${e=>e.pattern}" placeholder="${e=>e.placeholder}" ?readonly="${e=>e.readOnly}" ?required="${e=>e.required}" size="${e=>e.size}" ?spellcheck="${e=>e.spellcheck}" :value="${e=>e.value}" type="${e=>e.type}" aria-atomic="${e=>e.ariaAtomic}" aria-busy="${e=>e.ariaBusy}" aria-controls="${e=>e.ariaControls}" aria-current="${e=>e.ariaCurrent}" aria-describedby="${e=>e.controlAriaDescribedby}" aria-details="${e=>e.ariaDetails}" aria-disabled="${e=>e.ariaDisabled}" aria-errormessage="${e=>e.ariaErrormessage}" aria-flowto="${e=>e.ariaFlowto}" aria-haspopup="${e=>e.ariaHaspopup}" aria-hidden="${e=>e.ariaHidden}" aria-invalid="${e=>e.ariaInvalid}" aria-keyshortcuts="${e=>e.ariaKeyshortcuts}" aria-label="${e=>e.ariaLabel}" aria-labelledby="${e=>e.ariaLabelledby}" aria-live="${e=>e.ariaLive}" aria-owns="${e=>e.ariaOwns}" aria-relevant="${e=>e.ariaRelevant}" aria-roledescription="${e=>e.ariaRoledescription}" ${k(`control`)}/>${A(e=>e.suffix,T`<span class="suffix" part="suffix" id="${e=>`${e.id||`control`}-suffix`}" ?aria-hidden="${e=>e.hideAffixFromScreenReader}">${e=>e.suffix}</span>`)}</div>${wt(e,t)}</div></template>`,z8=(e,t)=>O` ${Ju(e,t)} /* Override FAST .root align-items: baseline for this flex child so it still fills the row. */ ${N0} input{color-scheme: ${Xh}}`;var B8=class extends O0(Yu){constructor(){super(...arguments),this.autocomplete=`off`,this.autocapitalize=`off`}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}autocapitalizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocapitalize=this.autocapitalize)}};q([D],B8.prototype,`autocomplete`,void 0),q([D],B8.prototype,`autocapitalize`,void 0),q([D],B8.prototype,`step`,void 0);let V8={mode:`open`,delegatesFocus:!0},H8={};B8.compose(Object.assign({baseName:`text-field`,template:R8,styles:z8,shadowOptions:V8},H8));let U8=O` @keyframes append-animate{from{transform: translateX(100%);opacity: 0%}to{transform: translateX(0%);opacity: 100%}}@keyframes delete-animate{from{transform: translateX(0%);opacity: 100%}to{transform: translateX(100%);opacity: 0%}}:host{--toast-min-width: 356px;--toast-min-height: 128px;--toast-max-width: 356px;--toast-max-height: 272px}.toast{animation: append-animate 0.3s linear;max-width: var(--toast-max-width);min-width: var(--toast-min-width);background-color: var(--fill-color);border-radius: calc(var(--control-corner-radius) * 1px);border-width: thin;border-color: var(--neutral-stroke-rest);box-shadow: 0 2px 15px 0 rgb(0 0 0 / 35%);display: flex;position: relative;flex-direction: row;padding: 8px 8px 8px 15px;margin: 5px}.toast-delete{animation: delete-animate 0.3s linear;opacity: 0%}.toast::after{content: '';position: absolute;top: 50%;transform: translateY(-50%);left: 5px;height: calc(100% - 10px);width: 4px;border-radius: 2px;background-color: red}.content-wrapper{height: fit-content;width: 100%;display: flex;flex-direction: column;justify-content: space-between;align-items: stretch}.bottom{width: 70%}.top{width: 100%;display: flex;flex-direction: row;justify-content: space-between;align-items: center}.content{width: 85%;font-size: 12px;overflow-wrap: break-word}::slotted(*){white-space: pre-line}.date{color: var(--neutral-foreground-hint);font-size: 12px;margin: 0 0 5px}.notification-icon{margin-right: 6px}.close-icon{cursor: pointer;margin-left: auto;color: #879ba6}`,UPe=(e=`zero`)=>T`<${e}-icon class="close-icon" size="lg" name="xmark"></prefix-icon>`,WPe=(e=`zero`)=>T`<div role="alert" part="root" aria-live="polite" class="toast ${e=>e.deleteAnimation}" ${k(`toast`)}><div class="content-wrapper"><div part="top" class="top">${A(e=>e.notificationIcon,T`<${e}-icon class="notification-icon" name="${e=>e.notificationIcon}" size="lg"></prefix-icon>`)}<slot name="top"></slot><div class="close-icon" @click=${e=>e.close()}>${UPe(e)}</div></div><div part="content" class="content"><slot name="content"></slot></div><div part="date" class="date"><slot name="date"></slot></div><div part="bottom" class="bottom"><slot name="bottom"></slot></div></div></div>`,W8=T` ${e=>WPe(Py(e))} `,G8={mode:`open`,delegatesFocus:!0},K8={};var q8=class extends P{constructor(){super(...arguments),this.deleteAnimation=``,this.closeTimeout=1e4,this.autoClose=!1,this.closeTimer=null}connectedCallback(){super.connectedCallback(),this.autoClose&&(this.closeTimer=setTimeout(()=>{this.deleteAnimation=`toast-delete`,this.toast.onanimationend=()=>{this.remove()}},this.closeTimeout))}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.closeTimer),this.closeTimer=null}close(){this.remove()}};q([C],q8.prototype,`deleteAnimation`,void 0),q([D({attribute:`close-timeout`})],q8.prototype,`closeTimeout`,void 0),q([D({attribute:`auto-close`})],q8.prototype,`autoClose`,void 0),q([D({attribute:`notification-icon`})],q8.prototype,`notificationIcon`,void 0),q8.compose(Object.assign({baseName:`toast`,styles:U8,template:W8,shadowOptions:G8},K8));let J8=(e,t)=>Ja(e,t),Y8=(e,t)=>O` ${Xu(e,t)}`;var X8=class extends Zu{};let Z8={};X8.compose(Object.assign({baseName:`toolbar`,template:J8,styles:Y8,shadowOptions:void 0},Z8));let Q8=(e,t)=>$a(e,t),$8=(e,t)=>O` ${Qu(e,t)}`;var e5=class extends to{};let t5={};e5.compose(Object.assign({baseName:`tooltip`,template:Q8,styles:$8,shadowOptions:void 0},t5));let n5=(e,t)=>no(e,t),r5=(e,t)=>O` ${ed(e,t)} :host{--focus-stroke-width: 0;--tree-item-nested-width: 1em}:host([selected])::after{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);width: 5px;top: 0;border-radius: 0}.positioning-region{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px)}`;var i5=class extends io{};i5.compose(Object.assign({baseName:`tree-item`,template:n5,styles:r5,shadowOptions:void 0},{expandCollapseGlyph:`
|
|
989
|
+
`};U6.compose(Object.assign({baseName:`slider`,template:V6,styles:H6,shadowOptions:void 0},W6));let G6=(e,t)=>ka(e,t),K6=(e,t)=>O` ${zu(e,t)}`;var q6=class extends Bu{};let J6={};q6.compose(Object.assign({baseName:`slider-label`,template:G6,styles:K6,shadowOptions:void 0},J6));let Y6=`default`,X6=1e4,Z6={DISMISS:`dismiss`,AUTO_DISMISS:`autoDismiss`},Q6=O` @keyframes append-from-left-animate{from{transform: translateX(100%);opacity: 0%}to{transform: translateX(0%);opacity: 100%}}@keyframes delete-from-left-animate{from{transform: translateX(0%);opacity: 100%}to{transform: translateX(100%);opacity: 0%}}@keyframes append-from-top-animate{from{transform: translateY(-100%);opacity: 0%}to{transform: translateY(0%);opacity: 100%}}@keyframes delete-from-top-animate{from{transform: translateY(0%);opacity: 100%}to{transform: translateY(-100%);opacity: 0%}}@keyframes delete-fade-animate{from{opacity: 100%}to{opacity: 0%}}:host{--snackbar-min-width: 356px;--snackbar-min-height: 55px;--snackbar-max-width: 496px;--snackbar-max-height: auto;--snackbar-animation-name: append-from-left-animate;--snackbar-animation-delete-name: delete-from-left-animate}.snackbar{animation: var(--snackbar-animation-name) 0.3s linear;max-width: var(--snackbar-max-width);min-width: var(--snackbar-min-width);min-height: var(--snackbar-min-height);max-height: var(--snackbar-max-height);background-color: var(--fill-color);border-radius: calc(var(--control-corner-radius) * 1px);border-width: thin;border-color: var(--neutral-fill-rest);box-shadow: 0 2px 5px 0 rgb(0 0 0 / 35%);box-sizing: border-box;display: flex;position: relative;bottom: 5px;flex-direction: row;padding: 2px 16px}.snackbar-delete{animation: var(--snackbar-animation-delete-name) 0.3s linear;opacity: 0%}.snackbar::after{content: '';position: absolute;top: 50%;transform: translateY(-50%);left: 0;height: calc(100% - 2px);width: 2px;border-radius: 2px}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;overflow-wrap: anywhere;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,$6=e=>T`<div role="alert" aria-live="polite" part="snackbar" class="snackbar ${e=>e.deleteAnimation}" ${k(`snackbar`)}><div part="content" class="content"><slot name="content">${e=>e.error?.errorDetails||e.notification?.body||`Place holder for error message`}</slot></div>${A(e=>e.error?.config?.snackbar?.confirmingActions?.length||e.notification?.config?.snackbar?.confirmingActions?.length,T`<div part="action" class="action"><slot name="action">${j(e=>e.error?.config?.snackbar?.confirmingActions||e.notification?.config?.snackbar?.confirmingActions,T`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var n;e?.action(),(n=t.parent)==null||n.dismiss()}}>${e=>e.label}</${e}-button>`)}</slot></div>`)}</div>`,RPe=T` ${e=>$6(Py(e))} `,e8={mode:`open`,delegatesFocus:!0};var t8=class extends P{constructor(){super(...arguments),this.deleteAnimation=``,this.closeTimeout=X6,this.autoClose=!0,this.type=Y6,this.dismissEventListener=this.handleDissmis.bind(this)}autoCloseChanged(){this.autoClose&&(this.timeoutRef=setTimeout(()=>{this.handleDissmis(!0)},this.closeTimeout)),!this.autoClose&&this.timeoutRef&&clearTimeout(this.timeoutRef)}connectedCallback(){super.connectedCallback(),this.addEventListener(Z6.DISMISS,this.dismissEventListener)}errorChanged(e,t){this.type=t?.config?.snackbar?.type??Y6}notificationChanged(e,t){this.type=t?.config?.snackbar?.type??Y6,this.autoClose=t?.config?.snackbar?.autoClose??!0,this.closeTimeout=t?.config?.snackbar?.closeTimeout??X6}handleDissmis(e=!1){this.deleteAnimation=`snackbar-delete`,this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(Z6.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Z6.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}};q([C],t8.prototype,`error`,void 0),q([C],t8.prototype,`notification`,void 0),q([C],t8.prototype,`deleteAnimation`,void 0),q([D({attribute:`identifier`})],t8.prototype,`identifier`,void 0),q([D({attribute:`close-timeout`})],t8.prototype,`closeTimeout`,void 0),q([D({attribute:`auto-close`,mode:`boolean`})],t8.prototype,`autoClose`,void 0),q([D({attribute:`type`})],t8.prototype,`type`,void 0),t8.compose({baseName:`snackbar`,styles:Q6,template:RPe,shadowOptions:e8});let n8=(e,t)=>O` ${M1()} .fa-stack{display: inline-block;text-align: center;line-height: 2em;height: 2em;position: relative;width: 2em}.fa-stack-1x, .fa-stack-2x{left: 50%;position: absolute;transform: translateX(-50%)}.fa-stack-2x{font-size: 2em}.fa-stack-1x{z-index: 1}`,r8=T`<span class=${e=>`fa-stack fa-${e.size}`}style=${e=>`vertical-align: ${e[`vertical-align`]};`}><slot></slot></span>`;var i8=class extends P{constructor(){super(...arguments),this.size=`1x`,this[`vertical-align`]=`baseline`}};q([D],i8.prototype,`size`,void 0),q([D],i8.prototype,`vertical-align`,void 0),i8.compose({baseName:`stacking-icons`,template:r8,styles:n8});let a8=O` .status-pill{font-size: var(--ag-data-font-size);display: inline-flex;align-items: center;gap: 5px;border-radius: 30px;height: 16px;background: grey;color: var(--neutral-foreground-rest);padding: 2px 8px;line-height: 1;font-weight: 500}.status-pill.lg{height: 32px;border-radius: 16px;padding: 2px 12px}.status-pill-initial{height: 14px;width: 14px;border-radius: 7px;font-weight: bold;font-size: 12px;display: flex;justify-content: center;align-items: center}.status-pill-image{height: 14px}`,zPe=e=>T` ${A(e=>e.isCountdownVisible&&!(e.hideWhenCountdownCompleted&&e.isCountdownExpired),T`<div data-test-id="status-pill" part="status-pill" class="status-pill" style="color:${e=>e.textColor||``}; background:${e=>e.backgroundColor||``};">${A(e=>e.iconName,T`<${e}-icon name="${e=>e.iconName}" size="${e=>e.iconSize}"></${e}-icon>`)} ${A(e=>e.iconSrc,T`<img alt="${e=>e.iconSrc}" class="status-pill-image" src="${e=>e.iconSrc}" />`)} ${A(e=>e.iconInitial,T`<div data-test-id="status-pill-initial" class="status-pill-initial" style="color:${e=>e.textColor}; background-color:${e=>e.iconInitialBackgroundColor}">${e=>e.iconInitial.substring(0,1)}</div>`)}<span data-test-id="status-pill-text">${e=>e.text}</span>${A(e=>e.countdown,T`<span data-test-id="status-pill-countdown">${e=>e.countdown}</span>`)}</div>`)} `,o8=T` ${e=>zPe(Py(e))} `,s8=1e3,c8=86400,l8=3600,BPe=(e,t=`second`)=>{let n=e/s8,r=Math.floor(n/c8);n%=c8;let i=Math.floor(n/l8);n%=l8;let a=Math.floor(n/60),o=Math.floor(n%60),s=[];switch(r&&s.push(`${r}d`),t){case`minute`:i&&s.push(`${i}h`),a&&s.push(`${a}m`),!a&&o&&s.push(`< 1m`);break;case`hour`:i&&s.push(`${i}h`),!i&&(a||o)&&s.push(`< 1h`);break;default:i&&s.push(`${i}h`),a&&s.push(`${a}m`),o&&s.push(`${o}s`)}return s.length?s.join(` `):`0s`};var u8=class extends P{constructor(){super(...arguments),this.iconSize=`sm`,this.dateCountdownCompletedMessage=`Expired`,this.dateCountdownUnit=`second`,this.hideWhenCountdownCompleted=!1,this.isCountdownExpired=!1,this.isCountdownVisible=!0}dateCountdownChanged(e,t){if(e!==t){if(!t){this.clearCountdownTimer();return}this.isCountdownExpired=!1,this.setUpDateCountdown(t)}}dateCountdownVisibleAfterChanged(e,t){e!==t&&this.updateVisibilityFromStartTime()}connectedCallback(){this.updateVisibilityFromStartTime(),super.connectedCallback()}disconnectedCallback(){this.clearCountdownTimer(),super.disconnectedCallback()}setUpDateCountdown(e){if(this.clearCountdownTimer(),isNaN(parseInt(e)))Ay.warn(`invalid date-countdown value passed. Must be a number`);else{e=parseInt(e);let t=new Date(e);this.updateCountdown(t),this.dateInterval=setInterval(()=>this.updateCountdown(t),s8)}}updateCountdown(e){let t=(/* @__PURE__ */ new Date()).getTime(),n=Math.floor(e.getTime()-t),r=this.dateCountdownVisibleAfter!==void 0&&this.dateCountdownVisibleAfter!==null?Number(this.dateCountdownVisibleAfter):void 0;if(r!==void 0&&!isNaN(r)&&t<r){this.isCountdownVisible=!1,this.countdown=null,this.isCountdownExpired=!1;return}this.isCountdownVisible=!0,n<=0?this.hideWhenCountdownCompleted?(this.isCountdownExpired=!0,this.clearCountdownTimer()):(this.countdown=this.dateCountdownCompletedMessage,clearInterval(this.dateInterval)):this.countdown=BPe(n,this.dateCountdownUnit)}updateVisibilityFromStartTime(){let e=this.dateCountdownVisibleAfter!==void 0&&this.dateCountdownVisibleAfter!==null?Number(this.dateCountdownVisibleAfter):void 0;if(e!==void 0&&!isNaN(e)){let t=Date.now();this.isCountdownVisible=t>=e}else this.isCountdownVisible=!0}clearCountdownTimer(){this.dateInterval&&(clearInterval(this.dateInterval),this.dateInterval=null),this.countdown=null}};q([D({attribute:`background-color`})],u8.prototype,`backgroundColor`,void 0),q([D({attribute:`icon-name`})],u8.prototype,`iconName`,void 0),q([D({attribute:`icon-src`})],u8.prototype,`iconSrc`,void 0),q([D({attribute:`icon-initial`})],u8.prototype,`iconInitial`,void 0),q([D({attribute:`icon-initial-background-color`})],u8.prototype,`iconInitialBackgroundColor`,void 0),q([D({attribute:`icon-size`})],u8.prototype,`iconSize`,void 0),q([D({attribute:`text-color`})],u8.prototype,`textColor`,void 0),q([D],u8.prototype,`text`,void 0),q([D({attribute:`date-countdown`})],u8.prototype,`dateCountdown`,void 0),q([D({attribute:`date-countdown-completed-message`})],u8.prototype,`dateCountdownCompletedMessage`,void 0),q([D({attribute:`date-countdown-unit`})],u8.prototype,`dateCountdownUnit`,void 0),q([D({attribute:`date-countdown-visible-after`})],u8.prototype,`dateCountdownVisibleAfter`,void 0),q([D({mode:`boolean`,attribute:`hide-when-countdown-completed`})],u8.prototype,`hideWhenCountdownCompleted`,void 0),q([C],u8.prototype,`countdown`,void 0),q([C],u8.prototype,`isCountdownExpired`,void 0),q([C],u8.prototype,`isCountdownVisible`,void 0),u8.compose({baseName:`status-pill`,styles:a8,template:o8});let d8=(e,t)=>{let n=[`step`,`step-${t}`];return e.selected&&n.push(`step-selected`),e.completed&&n.push(`step-completed`),e.error&&n.push(`step-error`),n.join(` `)},VPe=[`positioning-region: step-positioning-region`,`content-region: step-content-region`,`expand-collapse-button: step-expand-collapse-button`,`items: step-items`].join(`, `),f8=e=>T` ${jf(e=>e.orientation===Va.vertical,T`<${e}-tree-item ${k(`treeItem`)}class=${e=>pn(`tree-item`,[`cursor-pointer`,e.showCursorPointer])}part="${e=>d8(e,`vertical`)}" exportparts="${VPe}" @click="${(e,t)=>e.$emit(`tab-clicked`,e.tabPosition-1)}">${A(e=>e.completed,T`<${e}-icon name="check-circle" variant="regular" size="lg" class="stepper-icon completed-icon" part="step-icon step-icon-completed"></${e}-icon>`)} ${A(e=>e.error,T`<${e}-icon name="times-circle" variant="regular" size="lg" class="stepper-icon error-icon" part="step-icon step-icon-error"></${e}-icon>`)}<slot></slot></${e}-tree-item>`,T`<div class=${e=>pn(`step-container`,[`selected`,e.selected])}part="${e=>d8(e,`horizontal`)}"><div class=${e=>pn(`step-number-container`,[`cursor-pointer`,e.showCursorPointer])}part="step-number-container" @click="${e=>e.$emit(`tab-clicked`,e.tabPosition-1)}">${A(e=>!e.hideStepNumber,T`<span class="step-number" part="step-number">${e=>e.tabPosition}</span>`)}<slot class="step-title"></slot></div>${A(e=>!e.isLast,T`<${e}-icon class="stepper-icon angle-icon" part="step-icon step-icon-angle" name="angle-right" variant="solid" size="lg"></${e}-icon>`)}</div>`)} `,HPe=T` ${e=>f8(Py(e))} `,p8=(e,t)=>O` .tree-item{cursor: default}.tree-item::part(content-region){margin-inline-start: 0}.tree-item[selected]::part(positioning-region):hover{background: var(--neutral-fill-rest)}.tree-item::part(positioning-region):hover{background: var(--neutral-fill-stealth-rest)}.stepper-icon{margin-right: 5px}.completed-icon{color: #69cd70}.error-icon{color: #f14376}.step-number{display: flex;justify-content: center;align-items: center;margin: 0 5px 0 0;width: 24px;height: 24px;font-size: var(--type-ramp-minus-1-font-size);font-weight: 500;color: var(--focus-stroke-outer);background-color: var(--neutral-fill-input-rest);border-radius: 50%;border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-input-rest)}.step-number-container{display: flex;flex-direction: row;align-items: center;justify-content: center;width: 75%}.angle-icon{color: var(--neutral-fill-input-rest);margin: 0 calc(var(--design-unit) * 4px)}.step-title{font-size: var(--type-ramp-base-font-size);color: var(--focus-stroke-outer);font-weight: 600}:host([completed]) .step-number{border-color: #69cd70;color: white;background-color: #69cd70}:host([completed]) .step-title{color: #69cd70}:host([error]) .step-number{border-color: #f14376;color: white;background-color: #f14376}:host([error]) .step-title{color: #f14376}:host([orientation='horizontal']){flex: 1 1 0;height: 100%}.cursor-pointer{cursor: pointer}.step-container{position: relative;display: flex;align-items: center;justify-content: space-between;height: 100%}.step-container.selected::after{content: '';position: absolute;bottom: 0;left: calc(var(--design-unit) * -3px);/* This matches the left padding */ right: 28px;/* This matches the icon width + right margin */ height: 2px;width: calc(100% - 28px);background-color: var(--accent-fill-rest);/* Choose a color */}`;var m8=class extends P{constructor(){super(...arguments),this.slot=`tab`,this.orientation=Va.vertical}isCompleted(){return this.completed}selectedChanged(){this.treeItem&&(this.treeItem.selected=this.selected)}disconnectedCallback(){super.disconnectedCallback(),this.completed=void 0,this.error=void 0,this.selected=void 0}};q([D],m8.prototype,`slot`,void 0),q([D({mode:`boolean`})],m8.prototype,`selected`,void 0),q([D({mode:`boolean`})],m8.prototype,`completed`,void 0),q([D({mode:`boolean`})],m8.prototype,`error`,void 0),q([D({mode:`boolean`})],m8.prototype,`isLast`,void 0),q([D({mode:`boolean`})],m8.prototype,`hideStepNumber`,void 0),q([D({mode:`boolean`})],m8.prototype,`showCursorPointer`,void 0),q([D({attribute:`tab-position`})],m8.prototype,`tabPosition`,void 0),q([D],m8.prototype,`orientation`,void 0);let h8={};m8.compose(Object.assign({baseName:`stepper-tab`,template:HPe,styles:p8,shadowOptions:void 0},h8));let g8=()=>T`<template slot="tab-panel" role="stepper-tab-panel"><slot></slot></template>`;var _8=class extends P{};let v8={};_8.compose(Object.assign({baseName:`stepper-tab-panel`,template:g8,shadowOptions:void 0},v8));let y8=(e,t)=>Pa(e,t),b8=(e,t)=>O` ${Hu(e,t)} .checked-indicator{transform: scale(1.3);border-radius: calc(var(--control-corner-radius) * 2px)}.switch{border-radius: calc(var(--control-corner-radius) * 3px)}`;var x8=class extends Fa{};x8.compose(Object.assign({baseName:`switch`,template:y8,styles:b8,shadowOptions:void 0},{switch:`<div class="checked-indicator" part="checked-indicator"></div>`}));let S8=(e,t)=>Ra(e,t),C8=(e,t)=>O` ${Wu(e,t)} :host{user-select: none}`;var w8=class extends za{constructor(){super(...arguments),this.alert=!1}alertChanged(){this.alert&&Zje()}};q([D({mode:`boolean`})],w8.prototype,`alert`,void 0);let T8={};w8.compose(Object.assign({baseName:`tab`,template:S8,styles:C8,shadowOptions:void 0},T8));let E8=(e,t)=>Ia(e,t),D8=(e,t)=>O` ${Gu(e,t)} :host{height: 100%;padding: 0}`;var O8=class extends La{};let k8={};O8.compose(Object.assign({baseName:`tab-panel`,template:E8,styles:D8,shadowOptions:void 0},k8));let A8=(e,t)=>Ba(e,t),j8=(e,t)=>O` ${Uu(e,t)} :host{height: 100%;width: 100%}:host([scrollable]) [part='tablist']{overflow: auto hidden;white-space: nowrap}:host([scrollable]) ::slotted([role='tab']){flex: 0 0 auto}`;var M8=class extends Ha{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}};q([D({mode:`boolean`})],M8.prototype,`scrollable`,void 0);let N8={};M8.compose(Object.assign({baseName:`tabs`,template:A8,styles:j8,shadowOptions:void 0},N8));let P8=(e,t)=>Ka(e,t),F8=(e,t)=>O` ${Ku(e,t)} :host .control{padding: calc(var(--design-unit) * 3px)}`;var I8=class extends qu{};let L8={};I8.compose(Object.assign({baseName:`text-area`,template:P8,styles:F8,shadowOptions:void 0},L8));let R8=(e,t)=>T`<template class="${e=>pn([`readonly`,e.readOnly],[`has-prefix`,!!e.prefix],[`has-suffix`,!!e.suffix])}"><label part="label" for="${e=>e.id?e.id:`control`}" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?`label`:`label label-hidden`}"><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><div class="root" part="root">${Tt(e,t)}<div class="control-field">${A(e=>e.prefix,T`<span class="prefix" part="prefix" id="${e=>`${e.id||`control`}-prefix`}" ?aria-hidden="${e=>e.hideAffixFromScreenReader}">${e=>e.prefix}</span>`)}<input name="${e=>e.name}" autocomplete="${e=>e.autocomplete}" autocapitalize="${e=>e.autocapitalize}" id="${e=>e.id?e.id:`control`}" class="control" part="control" @input="${e=>e.handleTextInput()}" @change="${e=>e.handleChange()}" step="${e=>e.step}" ?autofocus="${e=>e.autofocus}" ?disabled="${e=>e.disabled}" list="${e=>e.list}" maxlength="${e=>e.maxlength}" minlength="${e=>e.minlength}" pattern="${e=>e.pattern}" placeholder="${e=>e.placeholder}" ?readonly="${e=>e.readOnly}" ?required="${e=>e.required}" size="${e=>e.size}" ?spellcheck="${e=>e.spellcheck}" :value="${e=>e.value}" type="${e=>e.type}" aria-atomic="${e=>e.ariaAtomic}" aria-busy="${e=>e.ariaBusy}" aria-controls="${e=>e.ariaControls}" aria-current="${e=>e.ariaCurrent}" aria-describedby="${e=>e.controlAriaDescribedby}" aria-details="${e=>e.ariaDetails}" aria-disabled="${e=>e.ariaDisabled}" aria-errormessage="${e=>e.ariaErrormessage}" aria-flowto="${e=>e.ariaFlowto}" aria-haspopup="${e=>e.ariaHaspopup}" aria-hidden="${e=>e.ariaHidden}" aria-invalid="${e=>e.ariaInvalid}" aria-keyshortcuts="${e=>e.ariaKeyshortcuts}" aria-label="${e=>e.ariaLabel}" aria-labelledby="${e=>e.ariaLabelledby}" aria-live="${e=>e.ariaLive}" aria-owns="${e=>e.ariaOwns}" aria-relevant="${e=>e.ariaRelevant}" aria-roledescription="${e=>e.ariaRoledescription}" ${k(`control`)}/>${A(e=>e.suffix,T`<span class="suffix" part="suffix" id="${e=>`${e.id||`control`}-suffix`}" ?aria-hidden="${e=>e.hideAffixFromScreenReader}">${e=>e.suffix}</span>`)}</div>${wt(e,t)}</div></template>`,z8=(e,t)=>O` ${Ju(e,t)} /* Override FAST .root align-items: baseline for this flex child so it still fills the row. */ ${N0} input{color-scheme: ${Xh}}`;var B8=class extends O0(Yu){constructor(){super(...arguments),this.autocomplete=`off`,this.autocapitalize=`off`}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}autocapitalizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocapitalize=this.autocapitalize)}};q([D],B8.prototype,`autocomplete`,void 0),q([D],B8.prototype,`autocapitalize`,void 0),q([D],B8.prototype,`step`,void 0);let V8={mode:`open`,delegatesFocus:!0},H8={};B8.compose(Object.assign({baseName:`text-field`,template:R8,styles:z8,shadowOptions:V8},H8));let U8=O` @keyframes append-animate{from{transform: translateX(100%);opacity: 0%}to{transform: translateX(0%);opacity: 100%}}@keyframes delete-animate{from{transform: translateX(0%);opacity: 100%}to{transform: translateX(100%);opacity: 0%}}:host{--toast-min-width: 356px;--toast-min-height: 128px;--toast-max-width: 356px;--toast-max-height: 272px}.toast{animation: append-animate 0.3s linear;max-width: var(--toast-max-width);min-width: var(--toast-min-width);background-color: var(--fill-color);border-radius: calc(var(--control-corner-radius) * 1px);border-width: thin;border-color: var(--neutral-stroke-rest);box-shadow: 0 2px 15px 0 rgb(0 0 0 / 35%);display: flex;position: relative;flex-direction: row;padding: 8px 8px 8px 15px;margin: 5px}.toast-delete{animation: delete-animate 0.3s linear;opacity: 0%}.toast::after{content: '';position: absolute;top: 50%;transform: translateY(-50%);left: 5px;height: calc(100% - 10px);width: 4px;border-radius: 2px;background-color: red}.content-wrapper{height: fit-content;width: 100%;display: flex;flex-direction: column;justify-content: space-between;align-items: stretch}.bottom{width: 70%}.top{width: 100%;display: flex;flex-direction: row;justify-content: space-between;align-items: center}.content{width: 85%;font-size: 12px;overflow-wrap: break-word}::slotted(*){white-space: pre-line}.date{color: var(--neutral-foreground-hint);font-size: 12px;margin: 0 0 5px}.notification-icon{margin-right: 6px}.close-icon{cursor: pointer;margin-left: auto;color: #879ba6}`,UPe=(e=`zero`)=>T`<${e}-icon class="close-icon" size="lg" name="xmark"></prefix-icon>`,WPe=(e=`zero`)=>T`<div role="alert" part="root" aria-live="polite" class="toast ${e=>e.deleteAnimation}" ${k(`toast`)}><div class="content-wrapper"><div part="top" class="top">${A(e=>e.notificationIcon,T`<${e}-icon class="notification-icon" name="${e=>e.notificationIcon}" size="lg"></prefix-icon>`)}<slot name="top"></slot><div class="close-icon" @click=${e=>e.close()}>${UPe(e)}</div></div><div part="content" class="content"><slot name="content"></slot></div><div part="date" class="date"><slot name="date"></slot></div><div part="bottom" class="bottom"><slot name="bottom"></slot></div></div></div>`,W8=T` ${e=>WPe(Py(e))} `,G8={mode:`open`,delegatesFocus:!0},K8={};var q8=class extends P{constructor(){super(...arguments),this.deleteAnimation=``,this.closeTimeout=1e4,this.autoClose=!1,this.closeTimer=null}connectedCallback(){super.connectedCallback(),this.autoClose&&(this.closeTimer=setTimeout(()=>{this.deleteAnimation=`toast-delete`,this.toast.onanimationend=()=>{this.remove()}},this.closeTimeout))}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.closeTimer),this.closeTimer=null}close(){this.remove()}};q([C],q8.prototype,`deleteAnimation`,void 0),q([D({attribute:`close-timeout`})],q8.prototype,`closeTimeout`,void 0),q([D({attribute:`auto-close`})],q8.prototype,`autoClose`,void 0),q([D({attribute:`notification-icon`})],q8.prototype,`notificationIcon`,void 0),q8.compose(Object.assign({baseName:`toast`,styles:U8,template:W8,shadowOptions:G8},K8));let J8=(e,t)=>Ja(e,t),Y8=(e,t)=>O` ${Xu(e,t)}`;var X8=class extends Zu{};let Z8={};X8.compose(Object.assign({baseName:`toolbar`,template:J8,styles:Y8,shadowOptions:void 0},Z8));let Q8=(e,t)=>$a(e,t),$8=(e,t)=>O` ${Qu(e,t)}`;var e5=class extends to{};let t5={};e5.compose(Object.assign({baseName:`tooltip`,template:Q8,styles:$8,shadowOptions:void 0},t5));let n5=(e,t)=>no(e,t),r5=(e,t)=>O` ${ed(e,t)} :host{--focus-stroke-width: 0;--tree-item-nested-width: 1em}:host([selected])::after{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);width: 5px;top: 0;border-radius: 0}.positioning-region{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px)}`;var i5=class extends io{};i5.compose(Object.assign({baseName:`tree-item`,template:n5,styles:r5,shadowOptions:void 0},{expandCollapseGlyph:`
|
|
990
990
|
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="expand-collapse-glyph">
|
|
991
991
|
<path d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"></path>
|
|
992
992
|
</svg>`}));let a5=(e,t)=>ao(e,t),o5=(e,t)=>O` ${td(e,t)}`;var s5=class extends oo{};let c5={};s5.compose(Object.assign({baseName:`tree-view`,template:a5,styles:o5,shadowOptions:void 0},c5));let l5=(e,t)=>O` .container{position: relative;width: 100%}.url-input{position: relative;width: 100%}.url-input-link{position: absolute;left: 10px;top: 24px;max-width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis}`,u5=e=>T`<div class="container" value=${e=>e.value}><${e}-text-field class="url-input" required type="url" :value=${e=>e.focused&&!e.readOnly?e.value:``}@blur=${(e,t)=>e.readOnly?``:e.saveUrl(t.event?.target.value)}@focus=${e=>e.focus()}:readOnly=${e=>e.readOnly}></${e}-text-field>${A(e=>e.readOnly||!e.focused,T`<a class="url-input-link" href=${e=>e.value}target="_blank">${e=>e.value}</a>`)}</div>`,GPe=T` ${e=>u5(Py(e))} `,d5={};var f5=class extends Yu{constructor(){super(...arguments),this.value=``}saveUrl(e){this.value=e.startsWith(`http`)?e:`https://`+e,this.focused=!1}focus(){this.focused=!0}};q([C],f5.prototype,`value`,void 0),q([C],f5.prototype,`focused`,void 0),f5.compose(Object.assign({baseName:`url-input`,template:GPe,styles:l5,shadowOptions:void 0},d5));let p5=O` :host{display: block;font-family: var(--body-font);outline: none}.label{display: block;color: var(--neutral-foreground-rest);cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);margin-bottom: 4px}.label-hidden{display: none}:host([readonly]) .label{cursor: var(--disabled-cursor)}.container{display: flex;gap: calc(var(--design-unit) * 1px);align-items: center}.digit{display: inline-block;box-sizing: border-box;outline: none;min-width: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}.digit .root{box-sizing: border-box;position: relative;display: flex;flex-direction: row;align-items: center;color: var(--neutral-foreground-rest);background: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}.digit .control{appearance: none;font: inherit;background: transparent;border: 0;color: inherit;height: calc(100% - 4px);width: 100%;margin-top: auto;margin-bottom: auto;padding: 0 calc(var(--design-unit) * 2px + 1px);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);text-align: center;outline: none;color-scheme: ${Xh}}.digit[appearance='filled'] .root{background: var(--neutral-fill-rest)}.digit.error .root{border-color: var(--error-fill-rest)}.digit.disabled{opacity: var(--disabled-opacity);cursor: var(--disabled-cursor)}.digit.disabled .control{cursor: var(--disabled-cursor)}.digit:hover:not(.disabled) .root{background: var(--neutral-fill-input-hover);border-color: var(--accent-fill-hover)}.digit:focus-within:not(.disabled) .root{border-color: var(--focus-stroke-outer);box-shadow: 0 0 0 calc(var(--focus-stroke-width) * 1px) var(--focus-stroke-outer) inset}.digit[appearance='filled']:hover:not(.disabled) .root{background: var(--neutral-fill-hover)}${N0}`,m5=T`<label part="label" id="${e=>e.labelId}" for="${e=>e.getControlId(0)}" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?`label`:`label label-hidden`}"><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><div class="container" role="group" aria-labelledby="${e=>e.hasLabel?e.labelId:void 0}" aria-label="${e=>e.hasLabel?void 0:`Verification code`}">${j(e=>e.digitsIndexes,T`<div class="digit ${(e,t)=>t.parent.digitClassnames}" data-digit-index="${e=>e}" appearance="${(e,t)=>t.parent.appearance}"><div class="root" part="root"><div class="control-field"><input class="control" part="control" type="text" inputmode="numeric" pattern="[0-9]*" name="${(e,t)=>t.parent.getControlId(e)}" id="${(e,t)=>t.parent.getControlId(e)}" autocomplete="${e=>e===0?`one-time-code`:`off`}" data-test-id="${(e,t)=>t.parent.getControlId(e)}" title="Only numbers are allowed" maxlength="1" ?autofocus="${(e,t)=>t.parent.autofocus&&e===0}" ?readonly="${(e,t)=>t.parent.readOnly}" ?disabled="${(e,t)=>t.parent.disabled||t.parent.readOnly}" aria-required="${(e,t)=>t.parent.required}" aria-invalid="${(e,t)=>t.parent.error}" /></div></div></div>`)}</div>`,h5={mode:`open`,delegatesFocus:!0},g5={},_5=/^\d$/;var KPe=class extends P{},v5=class extends gr(KPe){constructor(){super(),this.values=[],this.controlListeners=/* @__PURE__ */ new Map,this.syncingFromDigits=!1,this.appearance=`outline`,this.digits=6,this.readOnly=!1,this.autofocus=!1,this.error=!1,this.proxy=document.createElement(`input`)}get digitsIndexes(){return Array.from({length:this.digits},(e,t)=>t)}get controlIdPrefix(){return this.id||`verification-code`}get labelId(){return`${this.controlIdPrefix}-label`}get hasLabel(){return!!this.defaultSlottedNodes?.length}getControlId(e){return`${this.controlIdPrefix}-${e}`}clear(){this.value=``,this.emitChange(),this.$fastController.isConnected&&this.focusDigit(0)}focus(){this.focusDigit(0)}valueChanged(e,t){let n=this.sanitizeCode(t);if(this.syncingFromDigits||this.syncDigitsFromValue(n),String(t??``)!==n){this.value=n;return}super.valueChanged(e,n)}validate(e){if(!(this.proxy instanceof HTMLElement))return;let t=e??this.getControlElement(0)??void 0;if(String(this.value??``).length>0&&!this.isComplete()){this.setValidity({patternMismatch:!0},`Please enter a ${this.digits}-digit code.`,t);return}if(this.required&&!this.isComplete()){this.setValidity({valueMissing:!0},`Please fill out this field.`,t);return}this.setValidity({},``,t)}connectedCallback(){super.connectedCallback(),this.proxy.type=`text`,this.proxy.inputMode=`numeric`,x.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners(),this.autofocus&&!this.readOnly&&this.focus()})}disconnectedCallback(){super.disconnectedCallback(),this.unbindControlListeners()}digitsChanged(){this.syncDigitsFromValue(this.sanitizeCode(this.value));let e=(this.values??[]).join(``);this.value===e?this.validate():this.value=e,x.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners()})}get digitClassnames(){return[this.error&&`error`,(this.disabled||this.readOnly)&&`disabled`].filter(Boolean).join(` `)}sanitizeCode(e){let t=Math.max(1,Number(this.digits)||6);return String(e??``).replace(/\D/g,``).slice(0,t)}bindControlListeners(){this.unbindControlListeners(),this.rootNode.querySelectorAll(`[data-digit-index] input.control`).forEach(e=>{let t=this.getIndexFromInput(e);if(t===null)return;let n={paste:e=>this.onPaste(e,t),keydown:e=>this.onKeyDown(e,t),input:e=>this.onInput(e,t)};e.addEventListener(`paste`,n.paste,!0),e.addEventListener(`keydown`,n.keydown),e.addEventListener(`input`,n.input),this.controlListeners.set(e,n)})}unbindControlListeners(){var e,t;(e=this.controlListeners)==null||e.forEach((e,t)=>{t.removeEventListener(`paste`,e.paste,!0),t.removeEventListener(`keydown`,e.keydown),t.removeEventListener(`input`,e.input)}),(t=this.controlListeners)==null||t.clear()}onKeyDown(e,t){if(!(this.readOnly||this.disabled)){if(_5.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey){e.preventDefault(),this.updateDigit(t,e.key),this.focusDigit(t+1);return}switch(e.key){case`Backspace`:e.preventDefault(),this.handleBackspace(t);break;case`Delete`:e.preventDefault(),this.handleDelete(t);break;case`ArrowLeft`:e.preventDefault(),this.focusDigit(t-1);break;case`ArrowRight`:e.preventDefault(),this.focusDigit(t+1);break;case`Tab`:case`Home`:case`End`:break;default:this.isBlockedCharacter(e)&&e.preventDefault()}}}isBlockedCharacter(e){return e.ctrlKey||e.metaKey||e.altKey?!1:e.key.length===1&&!_5.test(e.key)}onInput(e,t){if(this.readOnly||this.disabled)return;let n=e.target,r=n.value.replace(/\D/g,``);if(r.length>1){this.applyDigits(r,t);return}let i=r.slice(-1);n.value!==i&&(n.value=i),i&&this.values[t]!==i?(this.updateDigit(t,i),this.focusDigit(t+1)):!i&&this.values[t]&&this.updateDigit(t,``)}onPaste(e,t){if(this.readOnly||this.disabled)return;e.preventDefault();let n=e.clipboardData?.getData(`text`)??``;n&&this.applyDigits(n,t)}handleBackspace(e){if(this.values[e]){this.updateDigit(e,``);return}e>0&&(this.updateDigit(e-1,``),this.focusDigit(e-1))}handleDelete(e){this.values[e]&&this.updateDigit(e,``)}getIndexFromInput(e){let t=Number(e.closest(`[data-digit-index]`)?.getAttribute(`data-digit-index`));return Number.isNaN(t)?null:t}syncDigitsFromValue(e){let t=Math.max(1,Number(this.digits)||6),n=Array.from({length:t},(t,n)=>e[n]??``),r=this.values??[];n.length===r.length&&n.every((e,t)=>e===r[t])||(this.values=n,this.$fastController?.isConnected&&this.syncFieldValues())}updateDigit(e,t){if(e<0||e>=this.digits)return;let n=[...this.values];n[e]=t,this.values=n,this.syncFieldValue(e),this.commitValues(n)}applyDigits(e,t){let n=e.replace(/\D/g,``).slice(0,this.digits-t);if(!n.length)return;let r=[...this.values];for(let e=0;e<n.length;e+=1)r[t+e]=n[e];this.values=r,this.syncFieldValues(),this.commitValues(r),this.focusDigit(this.isComplete()?this.digits-1:t+n.length)}commitValues(e){let t=e.join(``);this.syncingFromDigits=!0;try{this.value===t?this.validate():this.value=t}finally{this.syncingFromDigits=!1}this.emitChange(),this.isComplete()&&this.$emit(`complete`,{value:this.value})}syncFieldValues(){for(let e=0;e<this.digits;e+=1)this.syncFieldValue(e)}syncFieldValue(e){let t=this.getControlElement(e);t&&(t.value=this.values[e]??``)}focusDigit(e){var t;e<0||e>=this.digits||(t=this.getControlElement(e))==null||t.focus()}get rootNode(){return this.shadowRoot??this}getControlElement(e){return this.rootNode.querySelector(`[data-digit-index="${e}"] input.control`)}isComplete(){let e=this.values??[];return e.length===this.digits&&e.every(e=>_5.test(e))}emitChange(){this.$emit(`change`,{value:this.value})}};q([C],v5.prototype,`values`,void 0),q([C],v5.prototype,`defaultSlottedNodes`,void 0),q([D],v5.prototype,`id`,void 0),q([D],v5.prototype,`appearance`,void 0),q([D],v5.prototype,`digits`,void 0),q([D({attribute:`readonly`,mode:`boolean`})],v5.prototype,`readOnly`,void 0),q([D({mode:`boolean`})],v5.prototype,`autofocus`,void 0),q([D({mode:`boolean`})],v5.prototype,`error`,void 0),v5.compose(Object.assign({baseName:`verification-code-input`,template:m5,styles:p5,shadowOptions:h5},g5));let y5=class extends jy{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()})}getColumnDefs(e){return e?.flatMap(e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name})}clearData(){Ay.debug(`clearData - Method not implemented.`)}syncComponentData(e){let t=e??Array.from(this.rowsSyncedWithStream.values()),n=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=n,this.dataGrid.rowsData=t}handleStreamInserts(e){Ay.debug(`handleStreamInserts - Method not implemented.`)}handleStreamDeletes(e){Ay.debug(`handleStreamDeletes - Method not implemented.`)}handleStreamUpdates(e){Ay.debug(`handleStreamUpdates - Method not implemented.`)}};y5=q([$e({name:`data-grid-datasource`})],y5);let b5={type:`NULL`,maxRules:1,invisible:!0},qPe=[`enum`],x5=[`int`,`short`,`long`,`bigdecimal`,`double`],JPe=[`string`],S5=[`date`,`date-time`],YPe=[`boolean`],C5=[...qPe,...x5,...JPe,...S5,...YPe];[...x5,...S5],[...x5,...S5],[...C5].filter(e=>e!==`boolean`),[...C5].filter(e=>e!==`boolean`),[...x5,...S5],[...x5,...S5],[...C5],[...C5];let XPe=(0,(/* @__PURE__ */ u((/* @__PURE__ */ s(((e,t)=>{t.exports=r;function n(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function r(e){if(e=e||{},e.circles)return i(e);let t=/* @__PURE__ */ new Map;if(t.set(Date,e=>new Date(e)),t.set(Map,(e,t)=>new Map(a(Array.from(e),t))),t.set(Set,(e,t)=>new Set(a(Array.from(e),t))),e.constructorHandlers)for(let n of e.constructorHandlers)t.set(n[0],n[1]);let r=null;return e.proto?s:o;function a(e,i){let a=Object.keys(e),o=Array(a.length);for(let s=0;s<a.length;s++){let c=a[s],l=e[c];o[c]=typeof l!=`object`||!l?l:l.constructor!==Object&&(r=t.get(l.constructor))?r(l,i):ArrayBuffer.isView(l)?n(l):i(l)}return o}function o(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return a(e,o);if(e.constructor!==Object&&(r=t.get(e.constructor)))return r(e,o);let i={};for(let a in e){if(Object.hasOwnProperty.call(e,a)===!1)continue;let s=e[a];i[a]=typeof s!=`object`||!s?s:s.constructor!==Object&&(r=t.get(s.constructor))?r(s,o):ArrayBuffer.isView(s)?n(s):o(s)}return i}function s(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return a(e,s);if(e.constructor!==Object&&(r=t.get(e.constructor)))return r(e,s);let i={};for(let a in e){let o=e[a];i[a]=typeof o!=`object`||!o?o:o.constructor!==Object&&(r=t.get(o.constructor))?r(o,s):ArrayBuffer.isView(o)?n(o):s(o)}return i}}function i(e){let t=[],r=[],i=/* @__PURE__ */ new Map;if(i.set(Date,e=>new Date(e)),i.set(Map,(e,t)=>new Map(o(Array.from(e),t))),i.set(Set,(e,t)=>new Set(o(Array.from(e),t))),e.constructorHandlers)for(let t of e.constructorHandlers)i.set(t[0],t[1]);let a=null;return e.proto?c:s;function o(e,o){let s=Object.keys(e),c=Array(s.length);for(let l=0;l<s.length;l++){let u=s[l],d=e[u];if(typeof d!=`object`||!d)c[u]=d;else if(d.constructor!==Object&&(a=i.get(d.constructor)))c[u]=a(d,o);else if(ArrayBuffer.isView(d))c[u]=n(d);else{let e=t.indexOf(d);c[u]=e===-1?o(d):r[e]}}return c}function s(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return o(e,s);if(e.constructor!==Object&&(a=i.get(e.constructor)))return a(e,s);let c={};t.push(e),r.push(c);for(let o in e){if(Object.hasOwnProperty.call(e,o)===!1)continue;let l=e[o];if(typeof l!=`object`||!l)c[o]=l;else if(l.constructor!==Object&&(a=i.get(l.constructor)))c[o]=a(l,s);else if(ArrayBuffer.isView(l))c[o]=n(l);else{let e=t.indexOf(l);c[o]=e===-1?s(l):r[e]}}return t.pop(),r.pop(),c}function c(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return o(e,c);if(e.constructor!==Object&&(a=i.get(e.constructor)))return a(e,c);let s={};t.push(e),r.push(s);for(let o in e){let l=e[o];if(typeof l!=`object`||!l)s[o]=l;else if(l.constructor!==Object&&(a=i.get(l.constructor)))s[o]=a(l,c);else if(ArrayBuffer.isView(l))s[o]=n(l);else{let e=t.indexOf(l);s[o]=e===-1?c(l):r[e]}}return t.pop(),r.pop(),s}}})))())).default)();function w5(e,t,n){function r(e){let i=XPe(e);if(i.groupId===t)return i.children=n(i.children),i;let a=[],o=!1;for(let e of i.children)if(`children`in e){let t=r(e);t?(a.push(t),o=!0):a.push(e)}else a.push(e);return i.children=a,o?i:null}let i=r(e);if(!i)throw Error(`Unable to find group with groupId ${t}`);return i}function T5(e,t,n){function r(e){for(let i of e.children){if(n(i,t))return e;if(`children`in i){let e=r(i);if(e)return e}}return null}return r(e)}function E5(e,t){let n=T5(e,t,(e,t)=>`children`in e&&e.groupId===t);if(!n)throw Error(`No parent group found for group with ID ${t}`);return n}function D5(e,t){let n=T5(e,t,(e,t)=>`ruleId`in e&&e.ruleId===t);if(!n)throw Error(`No parent group found for rule with ID ${t}`);return n}function O5(e,t,n){return w5(e,t,e=>[...e,n])}function ZPe(e,t){return w5(e,E5(e,t).groupId,e=>e.filter(e=>`groupId`in e?e.groupId!==t:!0))}function QPe(e,t){return w5(e,D5(e,t).groupId,e=>e.filter(e=>`ruleId`in e?e.ruleId!==t:!0))}let k5=`group-root`;function $Pe(e,t,n){return t===`group-root`?Object.assign(Object.assign({},e),n):w5(e,E5(e,t).groupId,e=>e.map(e=>`groupId`in e&&e.groupId===t?Object.assign(Object.assign({},e),n):e))}function eFe(e,t,n){return w5(e,D5(e,t).groupId,e=>e.map(e=>`ruleId`in e&&e.ruleId===t?Object.assign(Object.assign({},e),n):e))}function tFe(e,t){let n=(e,t)=>`children`in e?r(e,t):i(e);function r(e,r){return Object.assign(Object.assign({},e),{level:r,config:t.getConfig(),groupId:t.getGroupId(),children:e.children.map(e=>n(e,r+1))})}function i(e){return Object.assign(Object.assign({},e),{ruleId:t.getRuleId(),config:t.getConfig()})}return Object.assign(Object.assign({},e),{config:t.getConfig(),level:1,groupId:k5,children:e.children.map(e=>n(e,2))})}function A5(e){let t=e.children.map(e=>`children`in e?A5(e):nFe(e));return{combinator:e.combinator,children:t}}function nFe(e){let{operator:t,field:n,value:r}=e;return{operator:t,field:n,value:r}}let j5=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,`0`)}-${String(e.getUTCDate()).padStart(2,`0`)}`,M5=e=>`${j5(e)}T${String(e.getUTCHours()).padStart(2,`0`)}:${String(e.getUTCMinutes()).padStart(2,`0`)}:${String(e.getUTCSeconds()).padStart(2,`0`)}`,N5=e=>e.operator?.valueType?.input??e.field.input,P5=e=>e.operator?.valueType?.type??e.field.type,F5=e=>{let t={},n=[],r=e=>[...e].sort((e,t)=>`fieldId`in e&&`fieldId`in t?e.fieldId.localeCompare(t.fieldId):`type`in e&&`type`in t?e.type.localeCompare(t.type):0);e.forEach(e=>{if(e.optgroup){let n=e.optgroup;t[n]||(t[n]=[]),t[n].push(e)}else n.push(e)});let i=[];return Object.keys(t).sort().forEach(e=>{i.push({optgroup:e,xs:r(t[e])})}),[...i,...r(n)]};function I5(e,t,n){if(!e.shadowRoot||!t?.customStyles)return;let r=t.customStyles[n];if(r){let t=document.createElement(`style`);t.textContent=r,e.shadowRoot.firstChild?e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild):e.shadowRoot.appendChild(t)}}var L5;(function(e){e.AddGroup=`add-group`,e.DelGroup=`del-group`,e.AddRule=`add-rule`,e.DelRule=`del-rule`,e.UpdateGroup=`update-group`,e.UpdateRule=`update-rule`,e.FieldSelected=`field-selected`,e.OperatorSelected=`operator-selected`,e.ValueUpdated=`value-updated`,e.RemoveVarArg=`remove-variadic-operand`})(L5||(L5={}));let R5=O` :host{--item-vertical-spacing: 4px;--item-border-radius: 5px;--group-background-color: rgb(250 240 210 / 50%);--group-border-color: #dcc896;--group-border: 1px solid var(--group-border-color);--group-padding: 10px;--rule-background-color: rgb(255 255 255 / 90%);--rule-border-color: #eee;--rule-border: 1px solid var(--rule-border-color);--rule-padding: 5px;--rule-value-separator: 1px solid #ddd;--error-icon-color: #f00;--error-border-color: #f99;--error-background-color: #fdd;--ticks-width: 2px;--ticks-color: #ccc}p.test{color: black}.query-builder{font-family: sans-serif}.rules-group-container{position: relative;margin: var(--item-vertical-spacing) 0;border-radius: var(--item-border-radius);padding: var(--group-padding);border: var(--group-border);background: var(--group-background-color)}.rules-group-header{margin-bottom: var(--group-padding)}.group-conditions{display: inline-block}.group-conditions .btn{padding: 0.25rem 0.5rem;font-size: 0.875rem;line-height: 1.5;border-radius: 0.2rem;border: 1px solid #007bff;color: #007bff;background-color: transparent;cursor: pointer}.group-conditions .btn:hover{background-color: #007bff;color: #fff}.group-conditions .btn.active{background-color: #007bff;color: #fff}.group-actions{display: inline-block;float: right}.rules-list{list-style: none;padding: 0 0 0 20px;/* Adjusted ticks position */ margin: 0}.rule-container{position: relative;margin: var(--item-vertical-spacing) 0;border-radius: var(--item-border-radius);padding: var(--rule-padding);border: var(--rule-border);background: var(--rule-background-color)}.rule-header{margin-bottom: 5px}.rule-actions{display: inline-block;float: right}.rule-field-container, .rule-operator-container, .rule-value-container{display: inline-block;margin: 0 5px 0 0;vertical-align: middle}.rule-value-container{border-left: var(--rule-value-separator);padding-left: 5px}.rule-value-container label{margin-bottom: 0;font-weight: normal}.rule-value-container label.block{display: block}.error-container{display: none;cursor: help;color: var(--error-icon-color);margin-left: 5px}.rule-container.has-error, .rules-group-container.has-error{background-color: var(--error-background-color);border-color: var(--error-border-color)}.rule-container.has-error .error-container, .rules-group-container.has-error .error-container{display: inline-block !important}/* Ticks */ .rules-list > *{position: relative}.rules-list > *::before, .rules-list > *::after{content: '';position: absolute;left: -10px;/* Adjusted ticks position */ width: 10px;/* Adjusted ticks position */ border-color: var(--ticks-color);border-style: solid}.rules-list > *::before{top: -2px;/* Adjusted ticks position */ height: calc(50% + var(--item-vertical-spacing));border-width: 0 0 var(--ticks-width) var(--ticks-width)}.rules-list > *::after{top: 50%;border-width: 0 0 0 var(--ticks-width);height: 50%}.rules-list > *:first-child::before{top: calc(-1 * var(--group-padding) - var(--ticks-width));height: calc(50% + var(--group-padding) + var(--item-vertical-spacing))}.rules-list > *:last-child::before{border-radius: 0 0 0 calc(2 * var(--ticks-width))}.rules-list > *:last-child::after{display: none}`,rFe=O` .rules-group-container{border: 1px solid #ccc;margin-bottom: 10px;padding: 10px}.rules-group-header{margin-bottom: 5px}.btn-group{margin-right: 5px}.btn{padding: 0.25rem 0.5rem;font-size: 0.875rem;line-height: 1.5;border-radius: 0.2rem;cursor: pointer}.btn-success{color: #fff;background-color: #28a745;border-color: #28a745}.btn-danger{color: #fff;background-color: #dc3545;border-color: #dc3545}.radio-group-container{display: flex}.rules-list{list-style: none;padding-left: 0}`,iFe=T` ${e=>{let t=e.styles?.customElements?.radio,{radioTag:n,radioGroupTag:r}=t?{radioTag:t.input,radioGroupTag:t.group}:{radioTag:`input`,radioGroupTag:`div`};return T`<div class="btn-group group-conditions">${Jg(e=>n!==`input`,T`<${r}class="radio-group-container" name="combinator" @change="${(e,t)=>e.handleCombinatorChange(t.event)}" value="${e=>e.model?.combinator?.type}">${j(e=>e.config?.combinators??[],T` ${A(e=>!e.invisible,T`<${n}value="${e=>e.type}" ?checked=${(e,t)=>t.parent.model?.combinator?.type===e.type}>${e=>e.label??e.type}</${n}>`)} `)}</${r}>`,T`<div class="radio-group-container">${j(e=>e.config.combinators,T` ${A(e=>!e.invisible,T`<label class="btn btn-sm btn-primary"><input type="radio" name="combinator" value="${e=>e.type}" @change="${(e,t)=>t.parent.handleCombinatorChange(t.event)}" ?checked=${(e,t)=>t.parent.model?.combinator?.type===e.type}/>${e=>e.label??e.type}</label>`)} `)}</div>`)}</div>`}} `,aFe=T`<div class="rules-group-container"><div class="rules-group-header">${T` ${e=>{let t=e.styles?.customElements?.button||`button`,n=`Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${e.config?.combinators?.[0]?.type})`,r=`Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${e.config?.combinators?.[0]?.type})`;return T`<div class="btn-group float-end group-actions">${A(e=>e.allowAddRule,T`<${t}type="button" class="btn btn-sm btn-success" data-add="rule" @click="${(e,t)=>e.dispatchAddRule(t.event)}" title=${e=>n}>
|
|
@@ -999,7 +999,7 @@ ${e?`<li><strong>Minutes:</strong> Runs at every interval of minutes from the ho
|
|
|
999
999
|
+
|
|
1000
1000
|
</${t}>`)}</div><div class="rule-header"><div class="btn-group rule-actions"><${t}type="button" class="btn btn-sm btn-danger" data-delete="rule" @click="${(e,t)=>e.dispatchDeleteRule(t.event)}">
|
|
1001
1001
|
Delete Rule </${t}></div></div></div>`}} `,q5=class extends Qe{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),I5(this,this.styles,`rule`),this.config.partialRuleValidationWarning&&(this.error=xFe(this.model))}variadicRule(e){return e.operator.nbInputs===`many`&&`value`in e&&Array.isArray(e.value)}get operandIterator(){if(this.model.operator?.nbInputs===`many`){if(!this.variadicRule(this.model))throw Error(`Varargs disabled for many nbInputs`);return Array(this.model.value.length).fill(!0)}return Array(this.model.operator?.nbInputs??0).fill(!0)}operandValue(e){if(this.model.operator){if(this.model.operator.nbInputs===1&&`value`in this.model)return this.model.value;if((this.model.operator.nbInputs===2||this.model.operator.nbInputs===`many`)&&`value`in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw Error(`Invalid operand lookup`)}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw Error(`Cannot add inputs for non-variadic operator, or invalid format`);let e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,K5(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(L5.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){let{index:t}=e.detail;if(!this.variadicRule(this.model))throw Error(`Cannot remove inputs for non-variadic operator, or invalid format`);let n={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,n)=>n!==t)}};this.dispatchEvent(new CustomEvent(L5.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();let t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(L5.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){e.stopPropagation();let{fieldId:t}=e.detail,n=this.config.fields.find(e=>e.fieldId===t)??null,r={ruleId:this.model.ruleId,newData:{field:n,value:null,operator:null}};this.dispatchEvent(new CustomEvent(L5.UpdateRule,{detail:r,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();let{value:t,index:n}=e.detail,r={ruleId:this.model.ruleId,newData:yFe(this.model,t,n)};this.dispatchEvent(new CustomEvent(L5.UpdateRule,{detail:r,bubbles:!0,composed:!0}))}handleOperatorSelected(e){e.stopPropagation();let{operatorId:t}=e.detail;if(!t)return;let n=this.config.operators.find(e=>e.type===t)??null;if(!n)throw Error(`Unable to find operator of type ${t}`);this.dispatchEvent(new CustomEvent(L5.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:vFe(n,this.model)},bubbles:!0,composed:!0}))}};q([C],q5.prototype,`config`,void 0),q([C],q5.prototype,`styles`,void 0),q([C],q5.prototype,`model`,void 0),q([C],q5.prototype,`index`,void 0),q([D({mode:`boolean`})],q5.prototype,`error`,void 0),q([w],q5.prototype,`operandIterator`,null),q5=q([$e({name:`expression-rule`,template:CFe,styles:SFe,shadowOptions:{delegatesFocus:!0}})],q5);let J5=class extends Qe{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){if(!this.isValidConfig(t)){console.warn(`Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.`);return}t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=tFe(t.model,this),this.userUpdatingModel=!1):this.model===null&&this.initBaseModel()}modelChanged(e,t){if(!t||this.userUpdatingModel)return;let n=A5(t);this.dispatchChangeEvent(n)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent(`change`,{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener(L5.AddGroup,this.handleAddGroup),this.addEventListener(L5.DelGroup,this.handleDeleteGroup),this.addEventListener(L5.AddRule,this.handleAddRule),this.addEventListener(L5.DelRule,this.handleDeleteRule),this.addEventListener(L5.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(L5.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config)){this.config&&console.warn(`Config detected during connectedCallback but it isn't valid`),this.config=null;return}this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(L5.AddGroup,this.handleAddGroup),this.removeEventListener(L5.DelGroup,this.handleDeleteGroup),this.removeEventListener(L5.AddRule,this.handleAddRule),this.removeEventListener(L5.DelRule,this.handleDeleteRule),this.removeEventListener(L5.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(L5.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){return!!(e&&e.combinators?.length&&e.operators?.length&&e.fields?.length)}initBaseModel(){if(!this.isValidConfig(this.config))throw Error(`Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.`);this.model={children:[],level:1,groupId:k5,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){let{parentGroupId:t,newGroup:n}=e.detail,r={groupId:this.getGroupId(),level:n.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=O5(this.model,t,r)}_handleAddRule(e){let{parentGroupId:t}=e.detail,n={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=O5(this.model,t,n)}_handleDeleteGroup(e){let{groupId:t}=e.detail;this.model=ZPe(this.model,t)}_handleDeleteRule(e){let{ruleId:t}=e.detail;this.model=QPe(this.model,t)}_handleUpdateGroupData(e){let{groupId:t,newData:n}=e.detail;this.model=$Pe(this.model,t,n)}_handleUpdateRuleData(e){let{ruleId:t,newData:n}=e.detail;this.model=eFe(this.model,t,n)}};q([C],J5.prototype,`config`,void 0),q([C],J5.prototype,`styles`,void 0),q([C],J5.prototype,`model`,void 0),J5=q([$e({name:`expression-builder`,template:B5,styles:R5})],J5);let Y5=class extends J5{};Y5=q([$e({name:`foundation-expression-builder`,styles:R5,template:B5})],Y5);let X5=[`int`,`short`,`long`],Z5=[`double`,`bigdecimal`],Q5=[...X5,...Z5],$5=[`date`,`date-time`],e7=[`string`,`enum`],t7=[`boolean`],n7=e=>e.operator?.valueType?.type??e.field.type;function r7(e){switch(n7(e)){case`int`:case`long`:case`double`:case`bigdecimal`:case`date`:case`date-time`:case`short`:return`NUMBER`;case`string`:case`enum`:return`STRING`;case`boolean`:return`BOOLEAN`}}function i7(e,t,n){return`value`in e?{TYPE:`BINARY_EXPRESSION`,LEFT:{TYPE:`FIELD`,NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:n,VALUE:e.value}}:null}function a7(e,t,n){return{TYPE:`BINARY_EXPRESSION`,LEFT:{TYPE:`FIELD`,NAME:e.field.fieldId},OPERATION:t,RIGHT:n}}function o7(e,t,n=[]){return`value`in e?{TYPE:`METHOD_EXPRESSION`,PARAMETERS:[{TYPE:`FIELD`,NAME:e.field.fieldId},...n],METHOD:t}:null}function s7(e){let t=t=>{let n=n7(e);if(e7.includes(n))return t;if(Q5.includes(n))return t.toString();if(t7.includes(n))return t;if(Array.isArray(t))throw Error(`Not implemented TernararyOperator or VariadicOperator args in rule value transformer`);if($5.includes(n))return new Date(t).getTime().toString();throw Error(`Unhandled transformRuleValue case`)},n=!(!(`value`in e)||e.value===void 0||e.value===null);return Object.assign(Object.assign({},e),n?{value:t(e.value)}:{})}function c7(e,t){return{TYPE:`PREDICATE_EXPRESSION`,OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>`children`in e?c7(e,t):t(e)).filter(Boolean)}}function l7(e,t){let n=t=>{let n=n7(e);if(e7.includes(n))return t;if(X5.includes(n))return parseInt(t);if(Z5.includes(n))return parseFloat(t);if(t7.includes(n))return t;if($5.includes(n)){let e=new Date(parseInt(t));return n===`date`?j5(e):M5(e)}throw Error(`Unhandled rebuildRuleValue case`)},r=e.operator.nbInputs;if(r===`many`||r===2)throw Error(`Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue`);return Object.assign(Object.assign({},e),r===0?{}:{value:n(t.VALUE)})}let u7={template:B5,styles:R5};var d7;(function(e){e.methodCall={CONTAINS_IGNORE_CASE:`CONTAINS_IGNORE_CASE`,CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:`CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE`,IS_NULL_OR_BLANK:`IS_NULL_OR_BLANK`,NOT_NULL_OR_BLANK:`NOT_NULL_OR_BLANK`,TRIM:`TRIM`,LONG_TO_DATE:`LONG_TO_DATE`,LONG_TO_DATE_TIME:`LONG_TO_DATE_TIME`,DATE_TIME_IS_IN_RANGE:`DATE_TIME_IS_IN_RANGE`},e.logicalOperations={AND:`AND`,OR:`OR`},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:`GREATER_THAN`,LESS_THAN:`LESS_THAN`,GREATER_THAN_OR_EQUAL:`GREATER_THAN_OR_EQUAL`,LESS_THAN_OR_EQUAL:`LESS_THAN_OR_EQUAL`,EQUALS:`EQUALS`,NOT_EQUALS:`NOT_EQUALS`,PLUS:`PLUS`,MINUS:`MINUS`,MULTIPLY:`MULTIPLY`,DIVIDE:`DIVIDE`,BITWISE_AND:`BITWISE_AND`,BITWISE_OR:`BITWISE_OR`,ASSIGNMENT:`ASSIGNMENT`,IS_CURRENT:`IS_CURRENT`,IS_PREVIOUS:`IS_PREVIOUS`})})(d7||(d7={}));let f7=[{type:d7.logicalOperations.AND,maxRules:`many`},{type:d7.logicalOperations.OR,maxRules:`many`}],$={EQUALS:d7.operations.EQUALS,NOT_EQUALS:d7.operations.NOT_EQUALS,IS_NULL:`IS_NULL`,NOT_NULL:`NOT_NULL`,IS_NULL_OR_BLANK:`IS_NULL_OR_BLANK`,NOT_NULL_OR_BLANK:`NOT_NULL_OR_BLANK`,CONTAINS:`CONTAINS`,CONTAINS_WORDS_STARTING_WITH:`CONTAINS_WORDS_STARTING_WITH`,CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:`CONTAINS_WORDS_STARTING_SPLIT_DELIMITER`,GREATER_THAN:d7.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:d7.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:d7.operations.LESS_THAN,LESS_THAN_OR_EQUAL:d7.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:`IS_BEFORE`,IS_AFTER:`IS_AFTER`,ON_OR_BEFORE:`ON_OR_BEFORE`,ON_OR_AFTER:`ON_OR_AFTER`,IS_CURRENT:d7.operations.IS_CURRENT,IS_PREVIOUS:d7.operations.IS_PREVIOUS},p7=e=>({type:`enum`,input:`select`,values:e}),wFe=p7({HOUR:{label:`Hour`,tooltip:`Beginning of the hour immediately preceding the current one to the current hour.`},DAY:{label:`Day`,tooltip:`Midnight on the day before today to midnight of the current day.`},WEEK_DAY:{label:`Week day`,tooltip:`Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday.`},WEEK:{label:`Week`,tooltip:`Midnight on the Monday of the previous week to midnight on the Monday of the current week.`},MONTH:{label:`Month`,tooltip:`Midnight on the 1st of the previous month to midnight on the 1st of the current month.`},YEAR:{label:`Year`,tooltip:`Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year.`}}),TFe=p7({HOUR:{label:`Hour`,tooltip:`Beginning of the current hour to beginning of the next hour.`},DAY:{label:`Day`,tooltip:`Midnight on the current day day to midnight of the next day.`},WEEK_DAY:{label:`Week day`,tooltip:`Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends.`},WEEK:{label:`Week`,tooltip:`Midnight on the Monday of the current week to midnight on the Monday of the next week.`},MONTH:{label:`Month`,tooltip:`Midnight on the 1st of the current month to midnight on the 1st of the next month.`},YEAR:{label:`Year`,tooltip:`Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year.`}}),m7=[{type:$.EQUALS,label:`Equals`,nbInputs:1,applyTo:[...e7,...t7,...Q5,...$5],tooltip:`Check the equality of the field compared to a set value`},{type:$.NOT_EQUALS,label:`Not equals`,nbInputs:1,applyTo:[...e7,...t7,...Q5,...$5],tooltip:`Check that the field is different from a set value`},{type:$.IS_NULL,label:`Is null`,nbInputs:0,applyTo:[`enum`,...t7,...Q5,...$5],tooltip:`Check if the field value is null`},{type:$.NOT_NULL,label:`Not null`,nbInputs:0,applyTo:[`enum`,...t7,...Q5,...$5],tooltip:`Check if the field value is not null`},{type:$.IS_NULL_OR_BLANK,label:`Is null or blank`,nbInputs:0,applyTo:[`string`],tooltip:`Check if the field value is null or an empty string`},{type:$.NOT_NULL_OR_BLANK,label:`Not null or blank`,nbInputs:0,applyTo:[`string`],tooltip:`Check if the field value is not null and not an empty string`},{type:$.CONTAINS,label:`Contains`,nbInputs:1,applyTo:[`string`],tooltip:`Check if the field contains the specified text (case insensitive)`},{type:$.CONTAINS_WORDS_STARTING_WITH,label:`Contains words starting with`,nbInputs:1,applyTo:[`string`],tooltip:`Check if the field contains words that start with the specified text, split by whitespace (case insensitive)`},{type:$.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:`Contains words starting with (split)`,nbInputs:2,applyTo:[`string`],tooltip:`Check if field contains words starting with text, split by a delimiter (case insensitive)`},{type:$.GREATER_THAN,label:`Greater than`,nbInputs:1,applyTo:[...Q5],tooltip:`Check if the field value is greater than a specified number`},{type:$.GREATER_THAN_OR_EQUAL,label:`Greater than or equal to`,nbInputs:1,applyTo:[...Q5],tooltip:`Check if the field value is greater than or equal to a specified number`},{type:$.LESS_THAN,label:`Less than`,nbInputs:1,applyTo:[...Q5],tooltip:`Check if the field value is less than a specified number`},{type:$.LESS_THAN_OR_EQUAL,label:`Less than or equal to`,nbInputs:1,applyTo:[...Q5],tooltip:`Check if the field value is less than or equal to a specified number`},{type:$.IS_BEFORE,label:`Is before`,nbInputs:1,applyTo:[...$5],tooltip:`Check if the field is before a specified date/time`},{type:$.IS_AFTER,label:`Is after`,nbInputs:1,applyTo:[...$5],tooltip:`Check if the field is after a specified date/time`},{type:$.ON_OR_BEFORE,label:`On or before`,nbInputs:1,applyTo:[...$5],tooltip:`Check if the field is on or before a specified date/time`},{type:$.ON_OR_AFTER,label:`On or after`,nbInputs:1,applyTo:[...$5],tooltip:`Check if the field is on or after a specified date/time`},{type:$.IS_CURRENT,label:`Is current`,nbInputs:1,applyTo:[...$5],tooltip:`Check whether the current date/time matches the current hour/day/work day/week/month/year.`,valueType:TFe,optgroup:`Relative Period`},{type:$.IS_PREVIOUS,label:`Is previous`,nbInputs:1,applyTo:[...$5],tooltip:`Check whether the current date/time matches the previous hour/day/work day/week/month/year`,valueType:wFe,optgroup:`Relative Period`}];function EFe(e){switch(e){case`IS_BEFORE`:return`LESS_THAN`;case`IS_AFTER`:return`GREATER_THAN`;case`ON_OR_BEFORE`:return`LESS_THAN_OR_EQUAL`;case`ON_OR_AFTER`:return`GREATER_THAN_OR_EQUAL`;default:return e}}function DFe(e,t){switch(t){case $.IS_NULL_OR_BLANK:return o7(e,d7.methodCall.IS_NULL_OR_BLANK,[]);case $.NOT_NULL_OR_BLANK:return o7(e,d7.methodCall.NOT_NULL_OR_BLANK,[]);case $.CONTAINS:if(!(`value`in e))throw Error(`Invalid shape for operator CONTAINS`);return o7(e,d7.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:`STRING`,VALUE:e.value}]);case $.CONTAINS_WORDS_STARTING_WITH:if(!(`value`in e))throw Error(`Invalid shape for operator CONTAINS_WORDS_STARTING_WITH`);return o7(e,d7.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:`STRING`,VALUE:e.value}]);case $.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!(`value`in e)||!Array.isArray(e.value)||e.value.length!==2)throw Error(`Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER`);return o7(e,d7.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:`STRING`,VALUE:e})));case $.IS_CURRENT:case $.IS_PREVIOUS:if(!(`value`in e))throw Error(`Invalid shape for operator IS_CURRENT | IS_PREVIOUS`);return o7(e,d7.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:`STRING`,VALUE:e.value},{TYPE:`STRING`,VALUE:t===$.IS_CURRENT?`CURRENT`:`PREVIOUS`}]);default:throw Error(`Unreachable default case`)}}function OFe(e){if(!(e.operator?.type&&e.field?.fieldId))return null;let t=s7(e),n=r7(t),r=EFe(t.operator.type);switch(r){case $.EQUALS:case $.NOT_EQUALS:case $.GREATER_THAN:case $.GREATER_THAN_OR_EQUAL:case $.LESS_THAN:case $.LESS_THAN_OR_EQUAL:return i7(t,r,n);case $.IS_NULL:return a7(t,d7.operations.EQUALS,{TYPE:`NULL`});case $.NOT_NULL:return a7(t,d7.operations.NOT_EQUALS,{TYPE:`NULL`});case $.IS_NULL_OR_BLANK:case $.NOT_NULL_OR_BLANK:case $.CONTAINS:case $.CONTAINS_WORDS_STARTING_WITH:case $.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case $.IS_CURRENT:case $.IS_PREVIOUS:return DFe(t,r);default:throw Error(`Unmatched case for operator name: ${r}`)}}function kFe(e,t){if(t.field.type!==`date`&&t.field.type!==`date-time`)return e;switch(e){case`LESS_THAN`:return`IS_BEFORE`;case`GREATER_THAN`:return`IS_AFTER`;case`LESS_THAN_OR_EQUAL`:return`ON_OR_BEFORE`;case`GREATER_THAN_OR_EQUAL`:return`ON_OR_AFTER`;default:return e}}function AFe(e,t){let n=(()=>{if(t.RIGHT.TYPE===`NULL`){let e=t.OPERATION===`EQUALS`?$[$.IS_NULL]:$[$.NOT_NULL];return m7.find(t=>t.type===e)}let n=kFe(t.OPERATION,e);return m7.find(e=>e.type===n)})();return Object.assign(Object.assign({},e),{operator:n})}function jFe(e,t){if(t.LEFT.TYPE!==`FIELD`)throw Error(`BinaryExpression LHS must be TYPE === FIELD`);if(![`STRING`,`NUMBER`,`BOOLEAN`,`NULL`].includes(t.RIGHT.TYPE))throw Error(`BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL`);return l7(AFe({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function MFe(e,t){let[n,r]=(()=>{switch(!0){case t.METHOD===`IS_NULL_OR_BLANK`:return[$[$.IS_NULL_OR_BLANK],void 0];case t.METHOD===`NOT_NULL_OR_BLANK`:return[$[$.NOT_NULL_OR_BLANK],void 0];case t.METHOD===`CONTAINS_IGNORE_CASE`:return[$[$.CONTAINS],t.PARAMETERS[1].VALUE];case t.METHOD===`CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE`&&t.PARAMETERS.length===2:return[$[$.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case t.METHOD===`CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE`&&t.PARAMETERS.length===3:return[$[$.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===d7.methodCall.DATE_TIME_IS_IN_RANGE&&t.PARAMETERS.length===3&&t.PARAMETERS[2].TYPE===`STRING`&&(t.PARAMETERS[2].VALUE===`CURRENT`||t.PARAMETERS[2].VALUE===`PREVIOUS`):return[$[t.PARAMETERS[2].VALUE===`CURRENT`?$.IS_CURRENT:$.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw Error(`Unhandled fromMethodExpression case`)}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:m7.find(e=>e.type===n),value:r}}function h7(e,t){return{combinator:f7.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!(`TYPE`in t))throw Error(`RuleExpression format not yet supported - no TYPE`);if(t.TYPE===`PREDICATE_EXPRESSION`)return h7(e,t);if(t.TYPE===`BINARY_EXPRESSION`)return jFe(e,t);if(t.TYPE===`METHOD_EXPRESSION`)return MFe(e,t);throw Error(`RuleExpression format not yet supported - unsupported TYPE`)})}}let g7=class extends J5{ruleConfigChanged(e,t){this.config=Object.assign({combinators:f7,operators:m7,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},t?.model?{model:h7(t.fields,t.model)}:{})}configChanged(e,t){if(t!==null){if(!t.operators||!t.combinators)throw Error(`Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead`);super.configChanged(e,t)}}dispatchChangeEvent(e){let t=c7(e,OFe);this.dispatchEvent(new CustomEvent(`change`,{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};q([C],g7.prototype,`ruleConfig`,void 0),g7=q([$e({name:`foundation-rule-expression-builder`,styles:R5,template:B5})],g7);let _7={TRIM:`TRIM`,PLUS:`PLUS`,MINUS:`MINUS`,MULTIPLY:`MULTIPLY`,DIVIDE:`DIVIDE`,CONVERT_TO_DATE:`CONVERT_TO_DATE`,CONVERT_TO_DATE_TIME:`CONVERT_TO_DATE_TIME`},v7=[{type:_7.PLUS,label:`Add (+)`,applyTo:[...Q5],nbInputs:1,tooltip:`Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE`},{type:_7.MINUS,label:`Subtract (-)`,applyTo:[...Q5],nbInputs:1,tooltip:`Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE`},{type:_7.MULTIPLY,label:`Multiply (*)`,applyTo:[...Q5],nbInputs:1,tooltip:`Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE`},{type:_7.DIVIDE,label:`Divide (/)`,applyTo:[...Q5],nbInputs:1,tooltip:`Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE`},{type:_7.CONVERT_TO_DATE,label:`Convert to date`,applyTo:[`date`],nbInputs:0,tooltip:`Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm`},{type:_7.CONVERT_TO_DATE_TIME,label:`Convert to date time`,applyTo:[`date-time`],nbInputs:0,tooltip:`Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss`}];function NFe(e){return e}function PFe(e,t){switch(t){case _7.TRIM:return o7(e,d7.methodCall.TRIM,[]);case _7.CONVERT_TO_DATE:return o7(e,d7.methodCall.LONG_TO_DATE,[]);case _7.CONVERT_TO_DATE_TIME:return o7(e,d7.methodCall.LONG_TO_DATE_TIME,[])}}function FFe(e){if(!(e.operator?.type&&e.field?.fieldId))return null;let t=s7(e),n=r7(t),r=NFe(t.operator.type);switch(r){case _7.TRIM:case _7.CONVERT_TO_DATE:case _7.CONVERT_TO_DATE_TIME:return PFe(t,r);case _7.PLUS:case _7.MINUS:case _7.DIVIDE:case _7.MULTIPLY:return i7(t,r,n);default:throw Error(`Unmatched case for operator name: ${r}`)}}function IFe(e,t){return t.field.type!==`date`&&t.field.type,e}function LFe(e,t){let n=(()=>{let n=IFe(t.OPERATION,e);return v7.find(e=>e.type===n)})();return Object.assign(Object.assign({},e),{operator:n})}function RFe(e,t){if(t.LEFT.TYPE!==`FIELD`)throw Error(`BinaryExpression LHS must be TYPE === FIELD`);if(![`STRING`,`NUMBER`,`BOOLEAN`,`NULL`].includes(t.RIGHT.TYPE))throw Error(`BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL`);return l7(LFe({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function zFe(e,t){let[n,r]=(()=>{switch(!0){case t.METHOD===`TRIM`:return[_7[_7.TRIM],void 0];case t.METHOD===`LONG_TO_DATE`:return[_7[_7.CONVERT_TO_DATE],void 0];case t.METHOD===`LONG_TO_DATE_TIME`:return[_7[_7.CONVERT_TO_DATE_TIME],void 0];default:throw Error(`Unhandled fromMethodExpression case`)}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:v7.find(e=>e.type===n),value:r}}function y7(e,t){return{combinator:b5,children:t.EXPRESSIONS.map(t=>{if(!(`TYPE`in t))throw Error(`RuleExpression format not yet supported - no TYPE`);if(t.TYPE===`PREDICATE_EXPRESSION`)return y7(e,t);if(t.TYPE===`BINARY_EXPRESSION`)return RFe(e,t);if(t.TYPE===`METHOD_EXPRESSION`)return zFe(e,t);throw Error(`RuleExpression format not yet supported - unsupported TYPE`)})}}let b7=class extends J5{valueConfigChanged(e,t){let n={TYPE:`PREDICATE_EXPRESSION`,OPERATION:`NULL`,EXPRESSIONS:t.model?[t.model]:[]},r=y7(t.fields,n);this.config={combinators:[b5],operators:v7,fields:t.fields,model:r,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(t!==null){if(!t.operators||!t.combinators)throw Error(`Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead`);super.configChanged(e,t)}}dispatchChangeEvent(e){if(!(`children`in e))throw Error(`Invalid top level group hierarchy`);if(e.children.length>1)throw Error(`Value expressions should not have multiple rules`);if(e.children[0]&&`children`in e.children[0])throw Error(`Trying to convert group to rule`);let t=e.children.length===0?void 0:FFe(e.children[0]);this.dispatchEvent(new CustomEvent(`change`,{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};q([C],b7.prototype,`valueConfig`,void 0),b7=q([$e({name:`foundation-value-expression-builder`,styles:R5,template:B5})],b7);let x7=T`<template ${k(`notificationListener`)}><slot></slot></template>`,BFe={mode:`open`,delegatesFocus:!0};var S7=class extends P{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(WS.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),QS(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>J(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return J(this,void 0,void 0,function*(){var e;this.resourceName&&((e=this.dataSub)==null||e.unsubscribe(),this.dataSub=void 0,yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return J(this,void 0,void 0,function*(){if(this.datasource?.initialized&&this.datasource.destroy(),!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){if(!this.datasource.stream){Ay.warn(`No stream available for ${this.resourceName}`);return}this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate(Gv(e))})}disconnectedCallback(){var e,t,n;super.disconnectedCallback(),(e=this.dataSub)==null||e.unsubscribe(),delete this.dataSub,(t=this.connectionSub)==null||t.unsubscribe(),delete this.connectionSub,(n=this.datasource)==null||n.destroy(),delete this.datasource}handleStreamUpdate(e){let t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){let{HEADER:t,MESSAGE:n,NOTIFY_SEVERITY:r}=e,i=e.CREATED_AT?new Date(e.CREATED_AT):void 0,a=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0,o=[];this.toastButtons&&this.toastButtons.length>0&&(o=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));let s={title:t,body:n,createdAt:i,toast:{details:e,type:r?.toLowerCase(),buttons:o,autoClose:a===void 0?!!this.closeTimeout:!!a,closeTimeout:a??this.closeTimeout,position:this.toastPosition}};YS(s,this.tagName)}};q([C],S7.prototype,`notificationListener`,void 0),q([mv],S7.prototype,`connect`,void 0),q([D({attribute:`resource-name`})],S7.prototype,`resourceName`,void 0),q([D({attribute:`close-timeout`,converter:E})],S7.prototype,`closeTimeout`,void 0),q([C],S7.prototype,`toastButtons`,void 0),q([D({attribute:`toast-position`})],S7.prototype,`toastPosition`,void 0),q([sy],S7.prototype,`datasource`,void 0),S7.compose({baseName:`notification-listener`,template:x7,shadowOptions:BFe});let C7=Xd(`foundation-router`),w7=`$router`,T7=Object.freeze({getOrCreateFor:e=>{let t=e[w7];return t===void 0?e[w7]=new VFe(e):t},find:e=>m_.find(e),from:e=>m_.from(e)});var VFe=class extends h_{};let HFe=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function E7(e){return HFe.test(e)}function D7(e){return e.config instanceof M_?e:T7.find(e)}function UFe(e,t=`/`,n=!1){let r=e.join(t).replace(RegExp(t+`{1,}`,`g`),t);return!n&&r.endsWith(t)?r.slice(0,-1):r}function WFe(e){return e.replace(`/*${c_}`,``)}function O7(){document.querySelector(`foundation-router, fast-router`)===null&&window.dispatchEvent(new PopStateEvent(`popstate`))}let k7=Object.freeze({path:Object.freeze({get current(){return $g.path.current},generateRoute:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={}){let r=D7(e);for(;r!==null;){let e=yield r.config.generateRouteFromPath(t,n);if(e!==null)return e;r=r.parent}return null}),push:(e,t=!0)=>{if(e&&E7(e)){location.href=e;return}history.pushState({},document.title,e),O7(),t&&k7.path.trigger(e)},replace:(e,t=!0)=>{if(e&&E7(e)){location.href=e;return}history.replaceState({},document.title,e),O7(),t&&k7.path.trigger(e)},trigger:e=>{$g.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={}){let r=D7(e);for(;r!==null;){let e=yield r.config.generateRouteFromName(t,n);if(e!==null)return e;r=r.parent}return null}),push:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={},r=!0){let i=yield k7.name.generateRoute(e,t,n);i!==null&&k7.path.push(i,r)}),replace:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={},r=!0){let i=yield k7.name.generateRoute(e,t,n);i!==null&&k7.path.replace(i,r)}),trigger:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={}){let r=yield k7.name.generateRoute(e,t,n);r!==null&&k7.path.trigger(r)})})}),A7=e=>!e.navId||e.navId===`header`||e.navId===`side-nav`;function GFe(e,t=A7,n=10){let r=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,i)=>{e.navItems.filter(t).map((t,r)=>{let a=t.placementIndex??i*n+r;return Object.assign(Object.assign({},t),{navId:t.navId??`header`,placementIndex:a,routePath:t.routePath??e.path,routeName:t.routeName??e.name})}).forEach(e=>r.push(e))}),r.sort((e,t)=>e.placementIndex-t.placementIndex)}var j7=class extends d_{constructor(){super(...arguments),this.definitions=[]}map(...e){let t=this.owner,n=!t.parent,r=t.basename;n&&r!==``&&r!==`/`&&(C7.debug(`Route paths remap required due to detected sub-path deployment`),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(r))return C7.debug(`'${e.path}' path okay as is`),e;let t=e.path.charAt(0)===`/`?``:`/`,n=`${r}${t}${e.path}`;return C7.debug(`'${e.path}' path modified to '${n}'`),Object.assign(Object.assign({},e),{path:n})})),this.definitions=[...e,...this.definitions],super.map(...e)}};q([C],j7.prototype,`definitions`,void 0);var M7=class extends M_{constructor(){super(),this.logger=C7,this.loginPath=`login`,this.notFoundPath=`not-found`,this.notPermittedPath=`not-permitted`,this.routes=new j7(this),this.basename=zf,this.routes=new j7(this)}getNavItems(e=A7){return GFe(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>J(this,void 0,void 0,function*(){this.analytics.trackEvent(Qd.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>J(this,void 0,void 0,function*(){let{settings:t}=e.route;(t?.isPermitted)?.call(t)===!1&&e.cancel(()=>{if(!this.user.isAuthenticated)this.user.trackPath(),k7.name.replace(e.router,this.loginPath);else{let n=t.notPermittedPath?.call(t)??this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${n}.`),k7.name.replace(e.router,n)}})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),k7.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){let n=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return J(this,void 0,void 0,function*(){let r=yield n.generateRouteFromName.call(this,e,t);return r?this.generateNavigationPath(r):null})}navigateTo(e){return J(this,void 0,void 0,function*(){if(e.name){this.relativeTo||this.logger.error(`unable to navigate by name as the relativeTo router is not set`),yield k7.name.push(this.relativeTo,e.name,e.params,e.trigger);return}if(e.path){k7.path.push(this.generateNavigationPath(e.path,e.params),e.trigger);return}})}generateNavigationPath(e,t){let n=this.getNavigationPathBasename(),r=r_.build(t),i=n&&!e.startsWith(n)?UFe([n,e]):e;return i=r?`${i}?${r}`:i,i}getNavigationPathBasename(){let e=(this.parent?.relativeTo?.route)?.endpoint.route.path;return e?WFe(e):this.basename?this.basename:``}construct(e){return this.container.get(e)}};q([Nt],M7.prototype,`container`,void 0),q([ef],M7.prototype,`analytics`,void 0),q([yg],M7.prototype,`user`,void 0),q([Mg],M7.prototype,`_session`,void 0);let N7=`navigate-to`,P7=`generate-navigation-path`,F7=class extends T7.from(Qe){constructor(){super(...arguments),this.logger=C7,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();let{path:t,params:n,callback:r}=e.detail;r&&r(this.config.generateNavigationPath(t,n))}}get router(){return this[w7]}connectedCallback(){var e;super.connectedCallback(),!this.config.isConfigured&&((e=this.config).relativeTo??(e.relativeTo=this.router),x.queueUpdate(()=>J(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(N7,this.onNavigateTo),this.addEventListener(P7,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(N7,this.onNavigateTo),this.removeEventListener(P7,this.onGenerateNavigationPath)}};F7=q([$e({name:`foundation-router`})],F7);let I7=e=>`control: ${e}-control, content: ${e}-content`,KFe=[`background: progress-ring-background`,`progress: progress-ring-progress`,`indeterminate-indicator-1: progress-ring-indeterminate`].join(`, `),L7=e=>T`<${e}-card class=${e=>pn(`stepper-tab`,[`stepper-tab-hidden`,e.hideTabs])}part="stepper-tab" @tab-clicked="${(e,t)=>e.handleStepClick(t.event.detail)}" role="stepper-tab" data-test-id="stepper-tab"><div class=${e=>pn(`stepper-tab-menu`,[`stepper-tab-menu-hidden`,e.hideTabs])}part="stepper-tab-menu"><slot name="tab" ${xt(`tabs`)}></slot></div>${A(e=>e.orientation===Va.vertical&&!e.hideProgress,T`<div class="stepper-tab-progress" part="stepper-tab-progress"><${e}-progress-ring class="progress-ring" part="progress-ring" exportparts="${KFe}" value=${e=>e.progressValue}></${e}-progress-ring><label part="progress-label">You have completed ${e=>e.progressValue}% of the fields required to create a project</label></div>`)}</${e}-card>${A(e=>!e.indicatorOnly,T`<${e}-card class="stepper-tab-panel" part="stepper-tab-panel" data-test-id="stepper-tab-panel"><div class="stepper-panel-container" part="stepper-panel-container"><slot name="tab-panel" ${xt(`tabpanels`)}></slot></div>${A(e=>!e.hideAllButtons,T`<div class="action-buttons-container" part="action-buttons-container"><slot name="action-buttons"><${e}-button part="back-button" exportparts="${I7(`back-button`)}" @click=${e=>e.previousStep()}?disabled=${e=>e.disabledPreviousStep}>Back</${e}-button>${A(e=>e.isLastStep&&!e.hideSubmitButton,T`<${e}-button part="submit-button" exportparts="${I7(`submit-button`)}" @click=${e=>e._submit()}?disabled=${e=>e.islastStepValid}data-test-id="submit-button">
|
|
1002
|
-
Submit </${e}-button>`)} ${A(e=>!e.isLastStep,T`<${e}-button part="next-button" exportparts="${I7(`next-button`)}" @click=${e=>e.nextStep()}data-test-id="next-button">Next</${e}-button>`)}</slot></div>`)}</${e}-card>`)} `,qFe=T` ${e=>L7(Py(e))} `,R7=O` :host{display: flex;height: 100%;width: 100%}:host([orientation='horizontal']){flex-direction: column}.stepper-tab{display: flex;flex-direction: column;width: 100%;height: 100%;max-width: 280px;border-radius: 0}.action-buttons-container{width: 100%;display: flex;justify-content: flex-end}.stepper-panel-container{height: 100%;overflow: hidden;padding: 15px}.stepper-tab-menu{display: flex;flex-direction: column;width: 100%;margin-bottom: 30px}.stepper-tab-menu-hidden{display: none}.stepper-tab-progress{display: flex;flex-direction: column;align-items: center;justify-content: start;flex: 1}.stepper-tab-progress .progress-ring{--design-unit: 10;margin: 0}.stepper-tab-panel{display: flex;flex-direction: column;justify-content: space-between;width: 100%;min-width: 370px;border-radius: 0}label{padding: 0 10px;color: rgb(135 155 166);display: block;cursor: pointer;text-align: center;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}:host([orientation='horizontal']) .stepper-tab-menu{height: 100%;width: 100%;display: flex;flex-direction: row;margin-bottom: 0;align-items: center;justify-content: center;gap: calc(var(--design-unit) * 4px);padding: 0 calc(var(--design-unit) * 4px)}:host([orientation='horizontal']) .stepper-tab-hidden{display: none}:host([orientation='horizontal']) .stepper-tab{max-width: 100%;max-height: 70px;height: 70px}`;var z7=class extends P{constructor(){super(...arguments),this.hideProgress=!1,this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=Va.vertical,this.tabs=[],this.tabpanels=[],this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if(e.slot===`tab`){let n=this.activeTabIndex===t,r=t+1===this.tabIds.length,i=this.tabIds[t],a=this.tabpanelIds[t];e.setAttribute(`id`,i),e.setAttribute(`aria-selected`,n?`true`:`false`),e.setAttribute(`aria-disabled`,n?`false`:`true`),x.setBooleanAttribute(e,`selected`,n),e.setAttribute(`orientation`,this.orientation),a&&e.setAttribute(`aria-controls`,a),e.setAttribute(`tab-position`,String(t+1)),x.setBooleanAttribute(e,`isLast`,r),x.setBooleanAttribute(e,`hideStepNumber`,this.hideStepNumber===!0),e.setAttribute(`tabindex`,n?`0`:`-1`),x.setBooleanAttribute(e,`showCursorPointer`,t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps),n&&(this.activetab=e,this.activeid=i)}}),this.activeTabIndex===0&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)});let t=this.indicatorOnly?this.tabs.length:this.tabpanels.length;this.progressValue=t?Math.round(e/t*100):0},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{let n=this.tabIds[t],r=this.tabpanelIds[t];e.setAttribute(`id`,r),e.setAttribute(`aria-labelledby`,n),this.activeTabIndex===t?e.removeAttribute(`hidden`):e.setAttribute(`hidden`,``)})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&(this.indicatorOnly||this.tabpanels.length>0)}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return this.activeid===void 0||this.tabIds.indexOf(this.activeid)===-1?0:this.tabIds.indexOf(this.activeid)}goToStep(e,t=!1){let n=e-1;if(e<1||e>this.tabs.length)return Ay.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(n===this.activeTabIndex)return!1;if(t){if(n<this.activeTabIndex)return this.handleBackwardJump(n);if(n>this.activeTabIndex)return this.handleForwardJump(n)}return n<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(n):n>this.activeTabIndex&&this.allowForwardJumps?this.handleForwardJump(n):n===this.activeTabIndex+1?(this.nextStep(),!0):(Ay.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit(`step-click`,{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit(`validation-failure`,{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit(`step-click`,{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return this.activeTabIndex===0}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){let e=this.tabs.length-1;return this.activeTabIndex===e&&(this.validation&&this.validation[e]?.isValid()||!this.validation||!this.validation[e])?(this.tabs[e].completed=!0,this.getCompletedTabs(),!1):(this.tabs[e].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit(`submit`)}nextStep(){if(!this.slotsInitialized){this.pendingNextStep=!0;return}if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid()){this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,this.getCompletedTabs();return}this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex+=1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit(`next-step`),this.$emit(`validation-success`));let e=this.tabs.length-1,t=this.activeTabIndex===e;this.hideSubmitButton&&t&&(this.validation&&this.validation[e]?.isValid()||!this.validation||!this.validation[e])?(this.tabs[e].completed=!0,this.getCompletedTabs()):(this.tabs[e].completed=!1,this.getCompletedTabs())}previousStep(){this.activeTabIndex!==0&&(this.tabs[this.activeTabIndex].completed=!1,--this.activeTabIndex,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>e.getAttribute(`id`)??`tab-${Rn()}`)}getTabPanelIds(){return this.tabpanels.map(e=>e.getAttribute(`id`)??`panel-${Rn()}`)}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}};q([D({attribute:`hide-submit-button`,mode:`boolean`})],z7.prototype,`hideSubmitButton`,void 0),q([D({attribute:`hide-progress`,mode:`boolean`})],z7.prototype,`hideProgress`,void 0),q([D({attribute:`hide-step-number`,mode:`boolean`})],z7.prototype,`hideStepNumber`,void 0),q([D({attribute:`allow-backward-jumps`,mode:`boolean`})],z7.prototype,`allowBackwardJumps`,void 0),q([D({attribute:`allow-forward-jumps`,mode:`boolean`})],z7.prototype,`allowForwardJumps`,void 0),q([D({attribute:`hide-all-buttons`,mode:`boolean`})],z7.prototype,`hideAllButtons`,void 0),q([D({attribute:`hide-tabs`,mode:`boolean`})],z7.prototype,`hideTabs`,void 0),q([D({attribute:`indicator-only`,mode:`boolean`})],z7.prototype,`indicatorOnly`,void 0),q([D],z7.prototype,`orientation`,void 0),q([D],z7.prototype,`activeid`,void 0),q([C],z7.prototype,`tabs`,void 0),q([C],z7.prototype,`tabpanels`,void 0),q([C],z7.prototype,`validation`,void 0),q([C],z7.prototype,`progressValue`,void 0),q([C],z7.prototype,`activeTabIndex`,void 0),q([w],z7.prototype,`disabledPreviousStep`,null),q([w],z7.prototype,`isLastStep`,null),q([w],z7.prototype,`islastStepValid`,null);let B7={};z7.compose(Object.assign({baseName:`stepper`,template:qFe,styles:R7,shadowOptions:void 0},B7));let JFe=class extends rd{}.compose(Object.assign({baseName:`accordion`,template:(e,t)=>mo(e,t),styles:(e,t)=>O` ${nd(e,t)} :host{border-top: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest)}.heading{height: calc(var(--base-height-multiplier) * 4px)}`,shadowOptions:id},ad)),YFe=class extends cd{}.compose(Object.assign({baseName:`accordion-item`,template:(e,t)=>od(e,t),styles:(e,t)=>O` ${sd(e,t)} :host{--icon-container-calculator: calc( (6 + (var(--design-unit) * 6)) * 1px );/* height of section - (padding top +padding-bottom) */ --icon-margin-calculation: calc((6 + (var(--design-unit) * 2 * var(--density))) * 1px)}.region{padding: 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px);color: var(--accent-foreground-rest)}:host([expanded]) .region{color: var(--accent-foreground-rest)}slot[name='expanded-icon']{display: none;stroke: none}slot[name='collapsed-icon'] path.plus-sign, slot[name='expanded-icon'] path.minus-sign{stroke: white}slot[name='expanded-icon'], slot[name='collapsed-icon']{background: var(--neutral-fill-rest);fill: none;stroke: none;height: calc(((var(--design-unit) * 4)) * 1px);width: calc(((var(--design-unit) * 4)) * 1px)}svg:not(:root){height: calc(((var(--design-unit) * 4)) * 1px);width: calc(((var(--design-unit) * 4)) * 1px)}.icon{height: var( --icon-container-calculator );/* UX 30px* for now it's 30 on default design unit - 4/ */ width: var(--icon-container-calculator);/* UX 30px */ margin: var(--icon-margin-calculation) var(--icon-margin-calculation) var(--icon-margin-calculation) 0}.button{padding: 0 calc((8 + (var(--design-unit) * 2 * var(--density))) * 1px) 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px)}.heading{grid-template-columns: auto 1fr auto;align-items: center}`,shadowOptions:ld},ud)),XFe=class extends ab{}.compose({baseName:`actions-menu`,styles:(e,t)=>O` :host{--actions-opener-height-multiplier: 0.6px;--menu-item-height-multiplier: 0.5px}${dd(e,t)} rapid-menu-item{display: flex;user-select: none}rapid-menu-item::part(content){margin-inline: calc(var(--design-unit) * 3px)}rapid-menu-item[disabled]{pointer-events: none}.actions-vertical .actions-menu{padding: 0}.actions-vertical .menu-item{margin: 0;padding: calc(var(--design-unit) * 4px);border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}.actions-vertical .menu-item:last-child{border-bottom: none}.actions-vertical .menu-item:focus{border: calc(var(--stroke-width) * 1px) solid var(--accent-foreground-focus)}`,template:ib}),ZFe=O` ${xS}`,QFe=class extends eC{}.compose(Object.assign({baseName:`ai-criteria-search`,template:(e,t)=>CS,styles:ZFe,shadowOptions:void 0},tC)),$Fe=class extends iC{}.compose({baseName:`ai-indicator`,template:rC,styles:(e,t)=>O` ${nC(e,t)} :host{--green: var(--success-color);--trafic-light-green: var(--success-color);--red: var(--error-color);--trafic-light-red: var(--error-color);--amber: var(--warning-color);--trafic-light-amber: var(--warning-color)}`});function V7(e,t){return new uo(`appearance`,e,t)}let eIe=[`baseClass`,`baseName`,`shadowOptions`,`styles`,`template`],tIe=(e,t=eIe)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{}),H7=e=>{let{definition:t}=e(),{shadowOptions:n,styles:r,template:i}=t;return{shadowOptions:n,styles:r,template:i,defaultConfig:tIe(t)}},nIe=O` :host([appearance='primary']){background: var(--accent-fill-rest);color: var(--foreground-on-accent-rest)}:host([appearance='primary']:hover){background: var(--accent-fill-hover);color: var(--foreground-on-accent-hover)}:host([appearance='primary']:active){background: var(--accent-fill-active);color: var(--foreground-on-accent-active)}:host([appearance='primary'][disabled]), :host([appearance='primary'][disabled]):hover, :host([appearance='primary'][disabled]):active{opacity: 50%}`,rIe=O` :host([appearance='secondary']){background: var(--secondary-fill-rest);color: contrast-color(var(--secondary-fill-rest))}:host([appearance='secondary']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary'][disabled]), :host([appearance='secondary'][disabled]):hover, :host([appearance='secondary'][disabled]):active{opacity: 50%}`,iIe=O` :host([appearance='neutral']){background: var(--neutral-button-fill, var(--neutral-fill-rest));border: var(--neutral-button-border, 0);color: var(--neutral-button-foreground, var(--neutral-foreground-rest))}:host([appearance='neutral']:hover){background: color-mix( in srgb, var(--neutral-button-fill, var(--neutral-fill-hover)), transparent 20% )}:host([appearance='neutral']:active){background: color-mix( in srgb, var(--neutral-button-fill, var(--neutral-fill-active)), transparent 30% )}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{opacity: 50%;background: var(--neutral-button-fill, var(--neutral-fill-rest));color: var(--neutral-button-foreground, var(--neutral-foreground-rest));border: var(--neutral-button-border, 0)}`,aIe=O` :host([appearance='danger']){background: var(--error-fill-rest);color: contrast-color(var(--error-fill-rest));border: 0}:host([appearance='danger']:hover){background: var(--error-fill-hover);color: contrast-color(var(--error-fill-hover))}:host([appearance='danger']:active){background: var(--error-fill-active);color: contrast-color(var(--error-fill-active))}:host([appearance='danger'][disabled]), :host([appearance='danger'][disabled]):hover, :host([appearance='danger'][disabled]):active{opacity: 50%}`,oIe=O` :host([appearance='success']){background: var(--success-fill-rest);color: contrast-color(var(--success-fill-rest));border: 0}:host([appearance='success']:hover){background: var(--success-fill-hover);color: contrast-color(var(--success-fill-hover))}:host([appearance='success']:active){background: var(--success-fill-active);color: contrast-color(var(--success-fill-active))}:host([appearance='success'][disabled]), :host([appearance='success'][disabled]):hover, :host([appearance='success'][disabled]):active{opacity: 50%}`,sIe=O` :host([appearance='warning']){background: var(--warning-fill-rest);color: contrast-color(var(--warning-fill-rest));border: 0}:host([appearance='warning']:hover){background: var(--warning-fill-hover);color: contrast-color(var(--warning-fill-hover))}:host([appearance='warning']:active){background: var(--warning-fill-active);color: contrast-color(var(--warning-fill-active))}:host([appearance='warning'][disabled]), :host([appearance='warning'][disabled]):hover, :host([appearance='warning'][disabled]):active{opacity: 50%}`,cIe=O` :host([appearance='tertiary']){background: var(--tertiary-fill-rest);color: contrast-color(var(--tertiary-fill-rest));border: 0}:host([appearance='tertiary']:hover){background: var(--tertiary-fill-hover);color: contrast-color(var(--tertiary-fill-hover))}:host([appearance='tertiary']:active){background: var(--tertiary-fill-active);color: contrast-color(var(--tertiary-fill-active))}:host([appearance='tertiary'][disabled]), :host([appearance='tertiary'][disabled]):hover, :host([appearance='tertiary'][disabled]):active{opacity: 50%}`,lIe=O` :host([appearance='primary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest)}:host([appearance='primary-outline']:hover){background: var(--accent-fill-hover);color: contrast-color(var(--accent-fill-hover))}:host([appearance='primary-outline']:active){background: var(--accent-fill-active);color: contrast-color(var(--accent-fill-active))}:host([appearance='primary-outline'][disabled]), :host([appearance='primary-outline'][disabled]):hover, :host([appearance='primary-outline'][disabled]):active{opacity: 50%}`,uIe=O` :host([appearance='secondary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--secondary-fill-rest)}:host([appearance='secondary-outline']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary-outline']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary-outline'][disabled]), :host([appearance='secondary-outline'][disabled]):hover, :host([appearance='secondary-outline'][disabled]):active{opacity: 50%}`,dIe=O` :host([appearance='neutral-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host([appearance='neutral-outline']:hover){background: var(--neutral-fill-hover);color: contrast-color(var(--neutral-fill-hover))}:host([appearance='neutral-outline']:active){background: var(--neutral-fill-active);color: contrast-color(var(--neutral-fill-active))}:host([appearance='neutral-outline'][disabled]), :host([appearance='neutral-outline'][disabled]):hover, :host([appearance='neutral-outline'][disabled]):active{opacity: 50%}`,fIe=O` :host([appearance='link']){background: none;border: none;color: var(--accent-foreground-rest)}:host([appearance='link']) .control{padding: 0}:host([appearance='link']:hover){color: var(--accent-foreground-hover)}:host([appearance='link'][disabled]), :host([appearance='link'][disabled]):hover, :host([appearance='link'][disabled]):active{opacity: 50%}`,pIe=(e,t)=>O` :host{font-weight: 500;color: var(--neutral-foreground-rest);box-sizing: border-box;font-size: var(--type-ramp-base-font-size);height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px)}.control{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px)}.start{margin-inline-end: calc(var(--design-unit) * 2px)}.end{margin-inline-start: calc(var(--design-unit) * 2px)}.control:has(.start){padding-left: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}.control:has(.end){padding-right: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}:host([appearance='neutral']){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral']:hover){background: var(--neutral-fill-rest)}:host([appearance='neutral']:active){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%));border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest);color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%);opacity: 100%}:host([appearance='accent']){color: contrast-color(var(--accent-fill-rest))}`,U7=(e,t)=>O` ${IC(e,t)} ${pIe(e,t)} `.withBehaviors(V7(`primary`,nIe),V7(`secondary`,rIe),V7(`tertiary`,cIe),V7(`neutral`,iIe),V7(`danger`,aIe),V7(`success`,oIe),V7(`warning`,sIe),V7(`primary-outline`,lIe),V7(`secondary-outline`,uIe),V7(`neutral-outline`,dIe),V7(`link`,fIe)),mIe=class extends sC{}.compose(Object.assign({baseName:`anchor`,template:(e,t)=>aC(e,t),styles:(e,t)=>O` ${oC(e,t)} ${U7(e,t)} `.withBehaviors(...U7(e,t).behaviors),shadowOptions:cC},lC)),hIe=class extends fC{}.compose(Object.assign({baseName:`anchored-region`,template:(e,t)=>uC(e,t),styles:(e,t)=>O` ${dC(e,t)}`,shadowOptions:pC},mC)),gIe=class extends _C{}.compose(Object.assign({baseName:`avatar`,template:(e,t)=>hC(e,t),styles:(e,t)=>O` ${gC(e,t)}`,shadowOptions:vC},yC)),_Ie=class extends SC{}.compose(Object.assign({baseName:`badge`,template:(e,t)=>bC(e,t),styles:(e,t)=>O` ${xC(e,t)} :host{--badge-fill-primary: var(--accent-fill-rest);--badge-fill-neutral: var(--neutral-fill-rest);--badge-fill-success: var(--success-color);--badge-fill-danger: var(--error-color);--badge-fill-warning: var(--warning-color);--badge-fill-buy: var(--buy-color);--badge-fill-sell: var(--sell-color);--badge-color-text: var(--neutral-foreground-rest);font-size: var(--type-ramp-minus-2-font-size)}:host .control{padding: calc(${B} * 1px) calc(${B} * 2px);border: none}`,shadowOptions:void 0},CC)),vIe=O` ${wC} :host{--banner-height: calc( ((var(--design-unit) + 2) * var(--base-height-multiplier)) + (var(--design-unit) * var(--design-unit)) * 1px )}.banner{background-color: var(--neutral-layer-1);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}.content{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}`,yIe=EC,bIe=class extends DC{}.compose({baseName:`banner`,shadowOptions:yIe,styles:vIe,template:TC}),xIe=class extends AC{}.compose(Object.assign({baseName:`breadcrumb`,template:(e,t)=>OC(e,t),styles:(e,t)=>O` ${kC(e,t)}`,shadowOptions:void 0},{})),SIe=class extends NC{}.compose(Object.assign({baseName:`breadcrumb-item`,template:(e,t)=>jC(e,t),styles:(e,t)=>O` ${MC(e,t)} .listitem{color: var(--accent-foreground-rest)}.control{color: var(--neutral-foreground-rest)}.control:hover{color: var(--neutral-foreground-rest)}.separator{color: var(--neutral-stroke-rest);margin: 0 12px}.control:hover .content::before{background: var(--neutral-foreground-rest)}.control .start{width: calc(var(--base-height-multiplier) * 3px);height: calc(var(--base-height-multiplier) * 3px);display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);margin: 0 -4px 0 0}.control:hover .start{background: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}`,shadowOptions:void 0},PC)),CIe=class extends LC{}.compose(Object.assign({baseName:`button`,template:(e,t)=>FC(e,t),styles:U7,shadowOptions:RC},zC)),wIe=class extends HC{}.compose(Object.assign({baseName:`calendar`,template:(e,t)=>VC(e,t),styles:()=>O` ${BC()}`,shadowOptions:UC},WC)),TIe=class extends qC{}.compose(Object.assign({baseName:`card`,template:(e,t)=>GC(e,t),styles:(e,t)=>O` ${KC(e,t)} :host{background: var(--neutral-layer-card-container);color: ${H};border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));box-shadow: var(--card-box-shadow, none);border: var( --card-border, 1px solid var(--neutral-stroke-rest) );/** uses a token instead of #2E3339 value available in ux docs */ /* box-shadow and border-radius are being calculated at host level by using design-tokens */}::slotted(rapid-card){background: var(--neutral-layer-3)}`,shadowOptions:void 0},JC)),EIe=O` ${iw} .label{color: var(--neutral-foreground-hint)}.options{background: var(--neutral-layer-4)}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}`,DIe=T` ${aw(`rapid`)} `;var OIe=class extends sw{};let kIe=ow,AIe=OIe.compose(Object.assign({baseName:`categorized-multiselect`,template:DIe,styles:EIe,shadowOptions:void 0},kIe)),jIe=class extends uw{}.compose(Object.assign({baseName:`checkbox`,template:(e,t)=>cw(e,t),styles:(e,t)=>O` ${lw(e,t)} :host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{fill: var(--neutral-foreground-rest)}.checked-indicator{fill: contrast-color(var(--accent-fill-rest));box-shadow: 2px 1000px 1px rgb(0 0 0 / 20%) inset;border-radius: calc(var(--control-corner-radius) * 1px)}.label{padding-inline-start: calc(var(--design-unit) * 2px)}`,shadowOptions:void 0},dw)),MIe=class extends gw{}.compose(Object.assign({baseName:`combobox`,template:(e,t)=>pw(e,t),styles:(e,t)=>O` ${fw(e,t)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-width: 0}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.combo-box-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s}.selected-value{height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .combo-box-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:_w},vw)),NIe=class extends xw{}.compose({baseName:`connection-indicator`,template:bw,styles:(e,t)=>O` ${yw(e,t)} :host{--light-size: calc(var(--design-unit) * 3px);--red: var(--error-color);--trafic-light-red: color-mix(in srgb, var(--red), transparent 0%);--trafic-light-red-glow: color-mix(in srgb, var(--red), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--red), transparent 80%) 0 0 8px 8px;--green: var(--success-color);--trafic-light-green: color-mix(in srgb, var(--green), transparent 0%);--trafic-light-green-glow: color-mix(in srgb, var(--green), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--green), transparent 80%) 0 0 8px 8px}.light{margin: calc(var(--design-unit) * 4px)}.label{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);color: var(--neutral-stroke-rest)}`}),{defaultConfig:PIe,shadowOptions:FIe,styles:IIe,template:LIe}=H7(Sw),RIe=()=>Sw(),{defaultConfig:zIe,shadowOptions:BIe,styles:VIe,template:HIe}=H7(Cw),UIe=()=>Cw(),{defaultConfig:WIe,shadowOptions:GIe,styles:KIe,template:qIe}=H7(ww),JIe=()=>ww(),YIe=()=>O` ${Tw} :host{--primary-gradient-angle: -113.5deg;display: inline-block}.calendar-dropdown{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.input-icon-container{display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px)}.input-icon-container:hover{background-color: var(--neutral-fill-rest)}.date-toggle::part(end){margin-inline-end: calc(var(--design-unit) * 1px)}.date-toggle{margin-bottom: 0}.month-day{width: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px);height: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px)}.week-days span{font-size: var(--type-ramp-minus-2-font-size)}`,XIe=T` ${Dw(`rapid`)} `,ZIe=class extends zw{}.compose(Object.assign({baseName:`date-picker`,template:XIe,styles:YIe,shadowOptions:void 0},{}));var W7;(function(e){e.primary=`#11C9FC`,e.neutral=`#7C909B`,e.error=`#F9644D`,e.success=`#7ACC79`,e.warning=`#FFB660`,e.tertiary=`#7B2FBE`,e.info=`#11C9FC`,e.buy=`#7ACC79`,e.sell=`#F14376`,e.chartPink=`#fb8176`,e.longGreen=`#7acc79`,e.shortPink=`#f14376`,e.warningYellow=`#fcb35f`,e.green=`#44c14c`,e.lightGreen=`#69cd70`,e.red=`#ef4d28`,e.lightRed=`#ee6588`,e.dodgerBlue=`#33a9ff`,e.lightDodgerBlue=`#5cbaff`,e.violet=`#9b1e74`,e.lightViolet=`#b528af`,e.white=`#f9f9f9`,e.silver=`#c1c1c1`,e.salomie=`#ffdf94`,e.lightSalomie=`#ccb276`,e.melon=`#ffbbb2`,e.lightMelon=`#cc968e`,e.portage=`#8a99f5`,e.lightPortage=`#adb8f8`,e.ice=`#97f4eb`,e.lightIce=`#6befe2`})(W7||(W7={}));let{create:G7}=ci,K7=rs(W7.error),q7=ss.create(K7.r,K7.g,K7.b),J7=G7(`error-color`).withDefault(q7),Y7=rs(W7.success),X7=ss.create(Y7.r,Y7.g,Y7.b),Z7=G7(`success-color`).withDefault(X7),Q7=rs(W7.warning),$7=ss.create(Q7.r,Q7.g,Q7.b),e9=G7(`warning-color`).withDefault($7),t9=rs(W7.buy),n9=ss.create(t9.r,t9.g,t9.b),r9=G7(`buy-color`).withDefault(n9),i9=rs(W7.sell),a9=ss.create(i9.r,i9.g,i9.b),o9=G7(`sell-color`).withDefault(a9),s9=rs(W7.info),c9=ss.create(s9.r,s9.g,s9.b),l9=G7(`info-color`).withDefault(c9),u9=rs(W7.error),d9=ss.create(u9.r,u9.g,u9.b),f9=G7(`serious-notify-color`).withDefault(d9),{create:p9}=ci,m9=e=>ci.create({name:e,cssCustomPropertyName:null}),h9=ss.create(1,1,1),QIe=ss.create(0,0,0),g9=4.5;function $Ie(e,t,n,r,i,a,o,s,c){let l=e.source,u=t.closestIndexOf(n)>=Math.max(o,s,c)?-1:1,d=e.closestIndexOf(l),f=d+u*-1*r,p=f+u*i,m=f+u*a;return{rest:e.get(f),hover:e.get(d),active:e.get(p),focus:e.get(m)}}function eLe(e,t,n,r,i,a,o){let s=e.source,c=e.closestIndexOf(s),l=us(t)?-1:1,u=c+(l===1?Math.min(r,i):Math.max(l*r,l*i)),d=e.colorContrast(t,n,u,l),f=e.closestIndexOf(d),p=f+l*Math.abs(r-i),m=l===1?r<i:l*r>l*i,h=m?f:p,g=m?p:f;return{rest:e.get(h),hover:e.get(g),active:e.get(h+l*a),focus:e.get(h+l*o)}}function tLe(e,t){return e.contrast(h9)>=t?h9:QIe}function _9(e,t){let n=e,r=m9(`${n}-palette`).withDefault(e=>fs.from(t.getValueFor(e))),i=m9(`${n}-fill-rest-delta`).withDefault(0),a=m9(`${n}-fill-hover-delta`).withDefault(4),o=m9(`${n}-fill-active-delta`).withDefault(-5),s=m9(`${n}-fill-focus-delta`).withDefault(0),c=m9(`${n}-foreground-rest-delta`).withDefault(0),l=m9(`${n}-foreground-hover-delta`).withDefault(6),u=m9(`${n}-foreground-active-delta`).withDefault(-4),d=m9(`${n}-foreground-focus-delta`).withDefault(0),f=m9(`${n}-fill-recipe`).withDefault({evaluate:(e,t)=>$Ie(r.getValueFor(e),bc.getValueFor(e),t??Fc.getValueFor(e),a.getValueFor(e),o.getValueFor(e),s.getValueFor(e),Zs.getValueFor(e),Qs.getValueFor(e),$s.getValueFor(e))}),p=p9(`${n}-fill-rest`).withDefault(e=>f.getValueFor(e).evaluate(e).rest),m=p9(`${n}-fill-hover`).withDefault(e=>f.getValueFor(e).evaluate(e).hover),h=p9(`${n}-fill-active`).withDefault(e=>f.getValueFor(e).evaluate(e).active),g=p9(`${n}-fill-focus`).withDefault(e=>f.getValueFor(e).evaluate(e).focus),_=e=>(t,n)=>tLe(n??p.getValueFor(t),e),v=m9(`foreground-on-${n}-recipe`).withDefault({evaluate:(e,t)=>_(g9)(e,t)}),y=p9(`foreground-on-${n}-rest`).withDefault(e=>v.getValueFor(e).evaluate(e,p.getValueFor(e))),b=p9(`foreground-on-${n}-hover`).withDefault(e=>v.getValueFor(e).evaluate(e,m.getValueFor(e))),ee=p9(`foreground-on-${n}-active`).withDefault(e=>v.getValueFor(e).evaluate(e,h.getValueFor(e))),x=p9(`foreground-on-${n}-focus`).withDefault(e=>v.getValueFor(e).evaluate(e,g.getValueFor(e))),te=m9(`foreground-on-${n}-large-recipe`).withDefault({evaluate:(e,t)=>_(7)(e,t)}),ne=p9(`foreground-on-${n}-rest-large`).withDefault(e=>te.getValueFor(e).evaluate(e,p.getValueFor(e))),S=p9(`foreground-on-${n}-hover-large`).withDefault(e=>te.getValueFor(e).evaluate(e,m.getValueFor(e))),C=p9(`foreground-on-${n}-active-large`).withDefault(e=>te.getValueFor(e).evaluate(e,h.getValueFor(e))),w=p9(`foreground-on-${n}-focus-large`).withDefault(e=>te.getValueFor(e).evaluate(e,g.getValueFor(e))),re=m9(`${n}-foreground-recipe`).withDefault({evaluate:(e,t)=>eLe(r.getValueFor(e),t??Fc.getValueFor(e),g9,c.getValueFor(e),l.getValueFor(e),u.getValueFor(e),d.getValueFor(e))});return{palette:r,fillRestDelta:i,fillHoverDelta:a,fillActiveDelta:o,fillFocusDelta:s,foregroundRestDelta:c,foregroundHoverDelta:l,foregroundActiveDelta:u,foregroundFocusDelta:d,fillRecipe:f,fillRest:p,fillHover:m,fillActive:h,fillFocus:g,foregroundOnRecipe:v,foregroundOnRest:y,foregroundOnHover:b,foregroundOnActive:ee,foregroundOnFocus:x,foregroundOnLargeRecipe:te,foregroundOnRestLarge:ne,foregroundOnHoverLarge:S,foregroundOnActiveLarge:C,foregroundOnFocusLarge:w,foregroundRecipe:re,foregroundRest:p9(`${n}-foreground-rest`).withDefault(e=>re.getValueFor(e).evaluate(e).rest),foregroundHover:p9(`${n}-foreground-hover`).withDefault(e=>re.getValueFor(e).evaluate(e).hover),foregroundActive:p9(`${n}-foreground-active`).withDefault(e=>re.getValueFor(e).evaluate(e).active),foregroundFocus:p9(`${n}-foreground-focus`).withDefault(e=>re.getValueFor(e).evaluate(e).focus)}}let v9=rs(W7.green),y9=ss.create(v9.r,v9.g,v9.b),b9=ci.create(`secondary-color`).withDefault(y9),{palette:nLe,fillRestDelta:rLe,fillHoverDelta:iLe,fillActiveDelta:aLe,fillFocusDelta:oLe,foregroundRestDelta:sLe,foregroundHoverDelta:cLe,foregroundActiveDelta:lLe,foregroundFocusDelta:uLe,fillRecipe:dLe,fillRest:fLe,fillHover:pLe,fillActive:mLe,fillFocus:hLe,foregroundOnRecipe:gLe,foregroundOnRest:_Le,foregroundOnHover:vLe,foregroundOnActive:yLe,foregroundOnFocus:bLe,foregroundOnLargeRecipe:xLe,foregroundOnRestLarge:SLe,foregroundOnHoverLarge:CLe,foregroundOnActiveLarge:wLe,foregroundOnFocusLarge:TLe,foregroundRecipe:ELe,foregroundRest:DLe,foregroundHover:OLe,foregroundActive:kLe,foregroundFocus:ALe}=_9(`secondary`,b9),x9=rs(W7.tertiary),S9=ss.create(x9.r,x9.g,x9.b),C9=ci.create(`tertiary-color`).withDefault(S9),{palette:jLe,fillRestDelta:MLe,fillHoverDelta:NLe,fillActiveDelta:PLe,fillFocusDelta:FLe,foregroundRestDelta:ILe,foregroundHoverDelta:LLe,foregroundActiveDelta:RLe,foregroundFocusDelta:zLe,fillRecipe:BLe,fillRest:VLe,fillHover:HLe,fillActive:ULe,fillFocus:WLe,foregroundOnRecipe:GLe,foregroundOnRest:KLe,foregroundOnHover:qLe,foregroundOnActive:JLe,foregroundOnFocus:YLe,foregroundOnLargeRecipe:XLe,foregroundOnRestLarge:ZLe,foregroundOnHoverLarge:QLe,foregroundOnActiveLarge:$Le,foregroundOnFocusLarge:eRe,foregroundRecipe:tRe,foregroundRest:nRe,foregroundHover:rRe,foregroundActive:iRe,foregroundFocus:aRe}=_9(`tertiary`,C9),{palette:oRe,fillRestDelta:sRe,fillHoverDelta:cRe,fillActiveDelta:lRe,fillFocusDelta:uRe,foregroundRestDelta:dRe,foregroundHoverDelta:fRe,foregroundActiveDelta:pRe,foregroundFocusDelta:mRe,fillRecipe:hRe,fillRest:gRe,fillHover:_Re,fillActive:vRe,fillFocus:yRe,foregroundOnRecipe:bRe,foregroundOnRest:xRe,foregroundOnHover:SRe,foregroundOnActive:CRe,foregroundOnFocus:wRe,foregroundOnLargeRecipe:TRe,foregroundOnRestLarge:ERe,foregroundOnHoverLarge:DRe,foregroundOnActiveLarge:ORe,foregroundOnFocusLarge:kRe,foregroundRecipe:ARe,foregroundRest:jRe,foregroundHover:MRe,foregroundActive:NRe,foregroundFocus:PRe}=_9(`error`,J7),{palette:FRe,fillRestDelta:IRe,fillHoverDelta:LRe,fillActiveDelta:RRe,fillFocusDelta:zRe,foregroundRestDelta:BRe,foregroundHoverDelta:VRe,foregroundActiveDelta:HRe,foregroundFocusDelta:URe,fillRecipe:WRe,fillRest:GRe,fillHover:KRe,fillActive:qRe,fillFocus:JRe,foregroundOnRecipe:YRe,foregroundOnRest:XRe,foregroundOnHover:ZRe,foregroundOnActive:QRe,foregroundOnFocus:$Re,foregroundOnLargeRecipe:eze,foregroundOnRestLarge:tze,foregroundOnHoverLarge:nze,foregroundOnActiveLarge:rze,foregroundOnFocusLarge:ize,foregroundRecipe:aze,foregroundRest:oze,foregroundHover:sze,foregroundActive:cze,foregroundFocus:lze}=_9(`success`,Z7),{palette:uze,fillRestDelta:dze,fillHoverDelta:fze,fillActiveDelta:pze,fillFocusDelta:mze,foregroundRestDelta:hze,foregroundHoverDelta:gze,foregroundActiveDelta:_ze,foregroundFocusDelta:vze,fillRecipe:yze,fillRest:bze,fillHover:xze,fillActive:Sze,fillFocus:Cze,foregroundOnRecipe:wze,foregroundOnRest:Tze,foregroundOnHover:Eze,foregroundOnActive:Dze,foregroundOnFocus:Oze,foregroundOnLargeRecipe:kze,foregroundOnRestLarge:Aze,foregroundOnHoverLarge:jze,foregroundOnActiveLarge:Mze,foregroundOnFocusLarge:Nze,foregroundRecipe:Pze,foregroundRest:Fze,foregroundHover:Ize,foregroundActive:Lze,foregroundFocus:Rze}=_9(`warning`,e9);var w9=/* @__PURE__ */ c({accentFillActive:()=>Bc,accentFillActiveDelta:()=>Gs,accentFillFocus:()=>Vc,accentFillFocusDelta:()=>Ks,accentFillHover:()=>zc,accentFillHoverDelta:()=>Ws,accentFillRest:()=>Rc,accentFillRestDelta:()=>Us,accentForegroundActive:()=>rl,accentForegroundActiveDelta:()=>Ys,accentForegroundFocus:()=>il,accentForegroundFocusDelta:()=>Xs,accentForegroundHover:()=>nl,accentForegroundHoverDelta:()=>Js,accentForegroundRest:()=>tl,accentForegroundRestDelta:()=>qs,accentPalette:()=>Sc,baseHeightMultiplier:()=>ys,baseLayerLuminance:()=>bs,bodyFont:()=>vs,buyColor:()=>r9,controlCornerRadius:()=>z,defaultBuyColor:()=>n9,defaultErrorColor:()=>q7,defaultInfoColor:()=>c9,defaultSecondaryColor:()=>y9,defaultSellColor:()=>a9,defaultSeriousNotifyColor:()=>d9,defaultSuccessColor:()=>X7,defaultTertiaryColor:()=>S9,defaultWarningColor:()=>$7,density:()=>xs,designUnit:()=>B,direction:()=>Ss,disabledOpacity:()=>Cs,errorColor:()=>J7,errorFillActive:()=>vRe,errorFillActiveDelta:()=>lRe,errorFillFocus:()=>yRe,errorFillFocusDelta:()=>uRe,errorFillHover:()=>_Re,errorFillHoverDelta:()=>cRe,errorFillRecipe:()=>hRe,errorFillRest:()=>gRe,errorFillRestDelta:()=>sRe,errorForegroundActive:()=>NRe,errorForegroundActiveDelta:()=>pRe,errorForegroundFocus:()=>PRe,errorForegroundFocusDelta:()=>mRe,errorForegroundHover:()=>MRe,errorForegroundHoverDelta:()=>fRe,errorForegroundRecipe:()=>ARe,errorForegroundRest:()=>jRe,errorForegroundRestDelta:()=>dRe,errorPalette:()=>oRe,fillColor:()=>Fc,focusStrokeInner:()=>kl,focusStrokeOuter:()=>Ol,focusStrokeWidth:()=>ws,foregroundOnAccentActive:()=>Kc,foregroundOnAccentActiveLarge:()=>Zc,foregroundOnAccentFocus:()=>qc,foregroundOnAccentFocusLarge:()=>Qc,foregroundOnAccentHover:()=>Gc,foregroundOnAccentHoverLarge:()=>Xc,foregroundOnAccentRest:()=>Wc,foregroundOnAccentRestLarge:()=>Yc,foregroundOnErrorActive:()=>CRe,foregroundOnErrorActiveLarge:()=>ORe,foregroundOnErrorFocus:()=>wRe,foregroundOnErrorFocusLarge:()=>kRe,foregroundOnErrorHover:()=>SRe,foregroundOnErrorHoverLarge:()=>DRe,foregroundOnErrorLargeRecipe:()=>TRe,foregroundOnErrorRecipe:()=>bRe,foregroundOnErrorRest:()=>xRe,foregroundOnErrorRestLarge:()=>ERe,foregroundOnSecondaryActive:()=>yLe,foregroundOnSecondaryActiveLarge:()=>wLe,foregroundOnSecondaryFocus:()=>bLe,foregroundOnSecondaryFocusLarge:()=>TLe,foregroundOnSecondaryHover:()=>vLe,foregroundOnSecondaryHoverLarge:()=>CLe,foregroundOnSecondaryLargeRecipe:()=>xLe,foregroundOnSecondaryRecipe:()=>gLe,foregroundOnSecondaryRest:()=>_Le,foregroundOnSecondaryRestLarge:()=>SLe,foregroundOnSuccessActive:()=>QRe,foregroundOnSuccessActiveLarge:()=>rze,foregroundOnSuccessFocus:()=>$Re,foregroundOnSuccessFocusLarge:()=>ize,foregroundOnSuccessHover:()=>ZRe,foregroundOnSuccessHoverLarge:()=>nze,foregroundOnSuccessLargeRecipe:()=>eze,foregroundOnSuccessRecipe:()=>YRe,foregroundOnSuccessRest:()=>XRe,foregroundOnSuccessRestLarge:()=>tze,foregroundOnTertiaryActive:()=>JLe,foregroundOnTertiaryActiveLarge:()=>$Le,foregroundOnTertiaryFocus:()=>YLe,foregroundOnTertiaryFocusLarge:()=>eRe,foregroundOnTertiaryHover:()=>qLe,foregroundOnTertiaryHoverLarge:()=>QLe,foregroundOnTertiaryLargeRecipe:()=>XLe,foregroundOnTertiaryRecipe:()=>GLe,foregroundOnTertiaryRest:()=>KLe,foregroundOnTertiaryRestLarge:()=>ZLe,foregroundOnWarningActive:()=>Dze,foregroundOnWarningActiveLarge:()=>Mze,foregroundOnWarningFocus:()=>Oze,foregroundOnWarningFocusLarge:()=>Nze,foregroundOnWarningHover:()=>Eze,foregroundOnWarningHoverLarge:()=>jze,foregroundOnWarningLargeRecipe:()=>kze,foregroundOnWarningRecipe:()=>wze,foregroundOnWarningRest:()=>Tze,foregroundOnWarningRestLarge:()=>Aze,infoColor:()=>l9,neutralFillActive:()=>cl,neutralFillActiveDelta:()=>$s,neutralFillFocus:()=>ll,neutralFillFocusDelta:()=>ec,neutralFillHover:()=>sl,neutralFillHoverDelta:()=>Qs,neutralFillInputActive:()=>pl,neutralFillInputActiveDelta:()=>rc,neutralFillInputFocus:()=>ml,neutralFillInputFocusDelta:()=>ic,neutralFillInputHover:()=>fl,neutralFillInputHoverDelta:()=>nc,neutralFillInputRest:()=>dl,neutralFillInputRestDelta:()=>tc,neutralFillLayerRest:()=>El,neutralFillLayerRestDelta:()=>pc,neutralFillRest:()=>ol,neutralFillRestDelta:()=>Zs,neutralFillStealthActive:()=>vl,neutralFillStealthActiveDelta:()=>sc,neutralFillStealthFocus:()=>yl,neutralFillStealthFocusDelta:()=>cc,neutralFillStealthHover:()=>_l,neutralFillStealthHoverDelta:()=>oc,neutralFillStealthRest:()=>gl,neutralFillStealthRestDelta:()=>ac,neutralFillStrongActive:()=>Cl,neutralFillStrongActiveDelta:()=>dc,neutralFillStrongFocus:()=>wl,neutralFillStrongFocusDelta:()=>fc,neutralFillStrongHover:()=>Sl,neutralFillStrongHoverDelta:()=>uc,neutralFillStrongRest:()=>xl,neutralFillStrongRestDelta:()=>lc,neutralForegroundHint:()=>Al,neutralForegroundRest:()=>H,neutralLayer1:()=>Oc,neutralLayer2:()=>Ac,neutralLayer3:()=>Mc,neutralLayer4:()=>Pc,neutralLayerCardContainer:()=>wc,neutralLayerFloating:()=>Ec,neutralPalette:()=>bc,neutralStrokeActive:()=>Pl,neutralStrokeActiveDelta:()=>gc,neutralStrokeDividerRest:()=>Il,neutralStrokeDividerRestDelta:()=>vc,neutralStrokeFocus:()=>Fl,neutralStrokeFocusDelta:()=>_c,neutralStrokeHover:()=>Nl,neutralStrokeHoverDelta:()=>hc,neutralStrokeRest:()=>Ml,neutralStrokeRestDelta:()=>mc,secondaryColor:()=>b9,secondaryFillActive:()=>mLe,secondaryFillActiveDelta:()=>aLe,secondaryFillFocus:()=>hLe,secondaryFillFocusDelta:()=>oLe,secondaryFillHover:()=>pLe,secondaryFillHoverDelta:()=>iLe,secondaryFillRecipe:()=>dLe,secondaryFillRest:()=>fLe,secondaryFillRestDelta:()=>rLe,secondaryForegroundActive:()=>kLe,secondaryForegroundActiveDelta:()=>lLe,secondaryForegroundFocus:()=>ALe,secondaryForegroundFocusDelta:()=>uLe,secondaryForegroundHover:()=>OLe,secondaryForegroundHoverDelta:()=>cLe,secondaryForegroundRecipe:()=>ELe,secondaryForegroundRest:()=>DLe,secondaryForegroundRestDelta:()=>sLe,secondaryPalette:()=>nLe,sellColor:()=>o9,seriousNotifyColor:()=>f9,strokeWidth:()=>V,successColor:()=>Z7,successFillActive:()=>qRe,successFillActiveDelta:()=>RRe,successFillFocus:()=>JRe,successFillFocusDelta:()=>zRe,successFillHover:()=>KRe,successFillHoverDelta:()=>LRe,successFillRecipe:()=>WRe,successFillRest:()=>GRe,successFillRestDelta:()=>IRe,successForegroundActive:()=>cze,successForegroundActiveDelta:()=>HRe,successForegroundFocus:()=>lze,successForegroundFocusDelta:()=>URe,successForegroundHover:()=>sze,successForegroundHoverDelta:()=>VRe,successForegroundRecipe:()=>aze,successForegroundRest:()=>oze,successForegroundRestDelta:()=>BRe,successPalette:()=>FRe,tertiaryColor:()=>C9,tertiaryFillActive:()=>ULe,tertiaryFillActiveDelta:()=>PLe,tertiaryFillFocus:()=>WLe,tertiaryFillFocusDelta:()=>FLe,tertiaryFillHover:()=>HLe,tertiaryFillHoverDelta:()=>NLe,tertiaryFillRecipe:()=>BLe,tertiaryFillRest:()=>VLe,tertiaryFillRestDelta:()=>MLe,tertiaryForegroundActive:()=>iRe,tertiaryForegroundActiveDelta:()=>RLe,tertiaryForegroundFocus:()=>aRe,tertiaryForegroundFocusDelta:()=>zLe,tertiaryForegroundHover:()=>rRe,tertiaryForegroundHoverDelta:()=>LLe,tertiaryForegroundRecipe:()=>tRe,tertiaryForegroundRest:()=>nRe,tertiaryForegroundRestDelta:()=>ILe,tertiaryPalette:()=>jLe,typeRampBaseFontSize:()=>Ts,typeRampBaseLineHeight:()=>Es,typeRampMinus1FontSize:()=>Ds,typeRampMinus1LineHeight:()=>Os,typeRampMinus2FontSize:()=>ks,typeRampMinus2LineHeight:()=>As,typeRampPlus1FontSize:()=>js,typeRampPlus1LineHeight:()=>Ms,typeRampPlus2FontSize:()=>Ns,typeRampPlus2LineHeight:()=>Ps,typeRampPlus3FontSize:()=>Fs,typeRampPlus3LineHeight:()=>Is,typeRampPlus4FontSize:()=>Ls,typeRampPlus4LineHeight:()=>Rs,typeRampPlus5FontSize:()=>zs,typeRampPlus5LineHeight:()=>Bs,typeRampPlus6FontSize:()=>Vs,typeRampPlus6LineHeight:()=>Hs,warningColor:()=>e9,warningFillActive:()=>Sze,warningFillActiveDelta:()=>pze,warningFillFocus:()=>Cze,warningFillFocusDelta:()=>mze,warningFillHover:()=>xze,warningFillHoverDelta:()=>fze,warningFillRecipe:()=>yze,warningFillRest:()=>bze,warningFillRestDelta:()=>dze,warningForegroundActive:()=>Lze,warningForegroundActiveDelta:()=>_ze,warningForegroundFocus:()=>Rze,warningForegroundFocusDelta:()=>vze,warningForegroundHover:()=>Ize,warningForegroundHoverDelta:()=>gze,warningForegroundRecipe:()=>Pze,warningForegroundRest:()=>Fze,warningForegroundRestDelta:()=>hze,warningPalette:()=>uze});let T9=Ww(W7.primary),E9=Ww(W7.neutral),D9=Ww(W7.green),O9=Ww(W7.tertiary),k9=Ww(W7.error),A9=Ww(W7.success),j9=Ww(W7.warning),M9=gs.DarkMode,zze=Fn.ltr,N9=`"Segoe UI", Arial, Helvetica, sans-serif`,P9=`14px`,F9=`20px`,Bze={design_tokens:{color:{accent:{$value:T9.source.toColorString(),$type:`color`},neutral:{$value:E9.source.toColorString(),$type:`color`},secondary:{$value:D9.source.toColorString(),$type:`color`},tertiary:{$value:O9.source.toColorString(),$type:`color`},error:{$value:k9.source.toColorString(),$type:`color`},success:{$value:A9.source.toColorString(),$type:`color`},warning:{$value:j9.source.toColorString(),$type:`color`}},fontFamily:{bodyFont:{$value:N9,$type:`fontFamily`}},typography:{baseFontSize:{$value:P9,$type:`dimension`},baseLineHeight:{$value:F9,$type:`dimension`}},mode:{luminance:{$value:M9,$type:`number`}},style:{density:{$value:0,$type:`number`},baseHeightMultiplier:{$value:10,$type:`number`},borderRadius:{$value:4,$type:`number`},strokeWidth:{$value:1,$type:`number`}},space:{designUnit:{$value:4,$type:`number`}}}};var I9=/* @__PURE__ */ c({accentFillActiveDeltaValue:()=>-5,accentFillFocusDeltaValue:()=>0,accentFillHoverDeltaValue:()=>4,accentFillRestDeltaValue:()=>0,accentForegroundActiveDeltaValue:()=>-4,accentForegroundFocusDeltaValue:()=>0,accentForegroundHoverDeltaValue:()=>6,accentForegroundRestDeltaValue:()=>0,accentPaletteValue:()=>T9,baseHeightMultiplierValue:()=>10,baseLayerLuminanceValue:()=>M9,bodyFontValue:()=>N9,controlCornerRadiusValue:()=>4,densityValue:()=>0,designTokens:()=>Bze,designUnitValue:()=>4,directionValue:()=>zze,disabledOpacityValue:()=>.3,errorPaletteValue:()=>k9,focusStrokeWidthValue:()=>2,neutralFillActiveDeltaValue:()=>5,neutralFillFocusDeltaValue:()=>0,neutralFillHoverDeltaValue:()=>10,neutralFillInputActiveDeltaValue:()=>0,neutralFillInputFocusDeltaValue:()=>10,neutralFillInputHoverDeltaValue:()=>5,neutralFillInputRestDeltaValue:()=>0,neutralFillLayerRestDeltaValue:()=>3,neutralFillRestDeltaValue:()=>7,neutralFillStealthActiveDeltaValue:()=>3,neutralFillStealthFocusDeltaValue:()=>0,neutralFillStealthHoverDeltaValue:()=>5,neutralFillStealthRestDeltaValue:()=>0,neutralFillStrongActiveDeltaValue:()=>-5,neutralFillStrongFocusDeltaValue:()=>0,neutralFillStrongHoverDeltaValue:()=>8,neutralFillStrongRestDeltaValue:()=>0,neutralPaletteValue:()=>E9,neutralStrokeActiveDeltaValue:()=>16,neutralStrokeDividerRestDeltaValue:()=>8,neutralStrokeFocusDeltaValue:()=>25,neutralStrokeHoverDeltaValue:()=>40,neutralStrokeRestDeltaValue:()=>25,prefix:()=>`rapid`,secondaryPaletteValue:()=>D9,strokeWidthValue:()=>1,successPaletteValue:()=>A9,tertiaryPaletteValue:()=>O9,typeRampBaseFontSizeValue:()=>P9,typeRampBaseLineHeightValue:()=>F9,typeRampMinus1FontSizeValue:()=>`13px`,typeRampMinus1LineHeightValue:()=>`19px`,typeRampMinus2FontSizeValue:()=>`12px`,typeRampMinus2LineHeightValue:()=>`18px`,typeRampPlus1FontSizeValue:()=>`15px`,typeRampPlus1LineHeightValue:()=>`21px`,typeRampPlus2FontSizeValue:()=>`16px`,typeRampPlus2LineHeightValue:()=>`22px`,typeRampPlus3FontSizeValue:()=>`17px`,typeRampPlus3LineHeightValue:()=>`23px`,typeRampPlus4FontSizeValue:()=>`18px`,typeRampPlus4LineHeightValue:()=>`24px`,typeRampPlus5FontSizeValue:()=>`19px`,typeRampPlus5LineHeightValue:()=>`25px`,typeRampPlus6FontSizeValue:()=>`20px`,typeRampPlus6LineHeightValue:()=>`26px`,warningPaletteValue:()=>j9});let Vze=class extends K{constructor(){super(),Vw(w9,I9,this)}}.compose({baseName:`design-system-provider`,template:T`<slot></slot>`}),L9=O` ${F1} :host{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}dialog{position: var(--dialog-position, fixed);top: 0;bottom: 0;border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest));text-align: left;line-height: normal;box-shadow: 0 2px 15px 0 rgb(0 0 0 / 35%);background-color: var(--dialog-background, var(--neutral-layer-1))}.top{display: flex;align-items: center;justify-content: space-between;color: var(--neutral-foreground-rest);margin-bottom: calc(var(--design-unit) * 2px);font-weight: 500}.bottom{display: flex;flex-wrap: wrap;justify-content: flex-end;color: var(--neutral-foreground-rest);gap: calc(var(--design-unit) * 2px)}:host slot:first-of-type{color: ${H}}::slotted(rapid-button){margin-top: calc(var(--design-unit) * 4px - 1px)}slot[name='top']::slotted(*){margin: 0;font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-hint);font-weight: 700}.content-wrapper{min-width: var(--dialog-min-width);min-height: var(--dialog-min-height);height: fit-content;width: fit-content;max-width: var(--dialog-max-width);max-height: var(--dialog-max-height);display: flex;flex-direction: column;justify-content: space-between;align-items: stretch}.close-icon:hover svg{background-color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}.close-icon svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%)}.close-icon:hover svg g path{fill: var(--neutral-foreground-rest)}.close-icon:active svg{background-color: var(--neutral-layer-4)}.close-icon:active svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 67%)}.header-controls{rapid-button{--base-height-multiplier: 8}rapid-button::part(control){padding: 0 calc((8 + var(--design-unit) * 1 * var(--density)) * 1px)}}`,Hze=Z1,Uze=L1,Wze=X1,Gze=class extends $1{}.compose(Object.assign({baseName:`dialog`,shadowOptions:Wze,styles:L9,template:Uze},Hze)),Kze=class extends n0{}.compose(Object.assign({baseName:`disclosure`,template:(e,t)=>e0(e,t),styles:(e,t)=>O` ${t0(e,t)} :host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}:host([appearance='accent']) .invoker{padding: calc((10 + (var(--design-unit) * 2 * var(--density))) * 1px)}#disclosure-content{padding: 0 calc(var(--design-unit) * 4px) calc(var(--design-unit) * 4px);text-align: center}`,shadowOptions:X1},r0)),qze=class extends o0{}.compose(Object.assign({baseName:`divider`,template:(e,t)=>i0(e,t),styles:(e,t)=>O` ${a0(e,t)}`,shadowOptions:void 0},s0)),Jze=class extends d0{}.compose({baseName:`dropdown-menu`,styles:(e,t)=>O` ${c0(`rapid`,e,t)} .actions-menu{border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);gap: 0;margin: calc(var(--design-unit) * 1px) 0}rapid-menu{margin: 0 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * -2px);border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}`,template:u0}),Yze=O` ${f0}`,Xze=class extends v0{}.compose({baseName:`environment-indicator`,styles:Yze,template:p0}),{defaultConfig:Zze,shadowOptions:Qze,styles:$ze,template:eBe}=H7(E0),tBe=()=>E0(),nBe=P0,rBe=I0.compose({baseName:`file-reader`,styles:nBe,template:F0}),iBe=O` ${L0} ::-webkit-scrollbar{width: calc(var(--design-unit) * 3px)}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-fill-rest);border: calc(var(--stroke-width) * 3px) solid var(--neutral-layer-4)}:host::part(select-file-button), :host::part(upload-file-button){margin: 0 0 calc(var(--design-unit) * 2px) calc(var(--design-unit) * 2px)}`,aBe=T` ${R0(`rapid`)} `,oBe=B0,sBe=class extends z0{}.compose(Object.assign({baseName:`file-upload`,shadowOptions:void 0,styles:iBe,template:aBe},oBe)),cBe=(e,t)=>O` ${V0} .filter-wrapper{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.close-icon{border: calc(var(--stroke-width) * 1px) solid transparent}.close-icon:hover{border-color: var(--error-color);background: color-mix(in srgb, var(--error-color), transparent 75%)}.close-icon:hover svg path{fill: var(--error-color)}rapid-select{margin-bottom: calc(var(--design-unit) * 2px)}.flex-row rapid-text-field, .flex-row rapid-select{flex: 1}`,lBe=T` ${W0(`rapid`)} `,uBe=class extends K0{}.compose({baseName:`filter`,template:lBe,styles:cBe}),dBe=(e,t)=>O` ${q0(e,t)} .toggle, .toggle-collapsed{background: var(--neutral-layer-4);color: var(--neutral-foreground-hint)}.toggle{border-top: calc(var(--stroke-width) * 2px) solid}.toggle:hover, .toggle-collapsed:hover{color: var(--accent-foreground-rest)}.filter-bar{background: var(--neutral-layer-3)}`,fBe=T` ${J0(`rapid`)} `,pBe=class extends Y0{}.compose({baseName:`filter-bar`,template:fBe,styles:dBe}),{defaultConfig:mBe,shadowOptions:hBe,styles:gBe,template:_Be}=H7(Q0),vBe=()=>Q0(),yBe=class extends t2{}.compose(Object.assign({baseName:`flipper`,template:(e,t)=>$0(e,t),styles:(e,t)=>O` ${e2(e,t)} :host{color: var(--neutral-foreground-rest)}:host(:hover){color: var(--neutral-foreground-rest)}:host::before{background: color-mix(in srgb, var(--accent-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest);color: var(--neutral-foreground-rest)}:host(:hover)::before{background: var(--accent-fill-rest);color: var(--neutral-foreground-rest)}`,shadowOptions:void 0},n2)),bBe=O` ${r2} div.flyout{background-color: var(--neutral-layer-1);border-color: var(--neutral-stroke-rest);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}div.background{padding: calc(var(--design-unit) * 4px) 0}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}:host([position='left']) div.flyout{border-right-style: solid;border-right-width: calc(var(--stroke-width) * 1px)}:host([position='right']) div.flyout{border-left-style: solid;border-left-width: calc(var(--stroke-width) * 1px)}div.exit{cursor: pointer;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);display: flex;justify-content: center;align-items: center}div.content, div.footer{padding: 0 0 calc(var(--design-unit) * 2px)}div.exit:hover{background-color: var(--neutral-fill-hover);border-radius: calc(var(--stroke-width) * 3px)}`,xBe=T` ${i2(`rapid`)} `,SBe=o2,CBe=class extends a2{}.compose(Object.assign({baseName:`flyout`,shadowOptions:void 0,styles:bBe,template:xBe},SBe)),{defaultConfig:wBe,shadowOptions:TBe,styles:EBe,template:DBe}=H7(u2),OBe=()=>u2(),{defaultConfig:kBe,shadowOptions:ABe,styles:jBe,template:MBe}=H7(f2),NBe=()=>f2(),PBe=(e,t)=>O` ${m2(e,t)}`,FBe=(e,t)=>p2(e,t);var IBe=class extends h2{};let LBe={nextFlipper:T`<rapid-flipper @click="${e=>e.scrollToNext()}" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`,previousFlipper:T`<rapid-flipper @click="${e=>e.scrollToPrevious()}" direction="previous" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`},RBe=IBe.compose(Object.assign({baseName:`horizontal-scroll`,template:FBe,styles:PBe,shadowOptions:g2},LBe)),zBe=(e,t)=>O` ${_2(e,t)}`,BBe=T` ${v2(`rapid`)} `;var VBe=class extends S2{};let HBe=b2,UBe=y2,WBe=VBe.compose(Object.assign({baseName:`icon`,template:BBe,styles:zBe,shadowOptions:UBe},HBe)),GBe=class extends T2{}.compose(Object.assign({baseName:`listbox`,template:(e,t)=>C2(e,t),styles:(e,t)=>O` ${w2(e,t)} :host{padding: 0;max-width: 300px;/** if removed max-width will be fit-content */}::slotted(*:last-child){border-bottom: none}`,shadowOptions:void 0},E2)),KBe=class extends k2{}.compose(Object.assign({baseName:`option`,template:(e,t)=>D2(e,t),styles:(e,t)=>O` ${O2(e,t)} :host{border-radius: 0;padding: 0 calc(var(--design-unit) * 4px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host(.selected), :host(:not([disabled])[aria-selected='true']:active), :host(:not([disabled])[aria-selected='true']:hover){background: var(--neutral-layer-2);color: var(--accent-fill-rest);font-weight: 500}`,shadowOptions:void 0},A2)),qBe=class extends N2{}.compose(Object.assign({baseName:`menu`,template:(e,t)=>j2(e,t),styles:(e,t)=>O` ${M2(e,t)} :host{border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${_l}, transparent 15%);padding: 0}`,shadowOptions:void 0},P2)),JBe=class extends L2{}.compose(Object.assign({baseName:`menu-item`,template:(e,t)=>F2(e,t),styles:(e,t)=>O` ${I2(e,t)} :host{margin: 0;--control-corner-radius: 0;background: var(--neutral-fill-stealth-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:hover){background: color-mix(in srgb, ${_l}, transparent 15%);border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${_l}, transparent 15%)}:host(:focus){background: var(--neutral-fill-stealth-hover)}:host(.indent-0){border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}/* UX team wants border: solid 1px #2E3339;background: #2E3339 */ /* tokens being used by fast background: ${_l} color: ${H} */`,shadowOptions:void 0},R2)),YBe=O` ${L9}`,XBe=V2,ZBe=z2,QBe=B2,$Be=class extends H2{}.compose(Object.assign({baseName:`modal`,shadowOptions:QBe,styles:YBe,template:ZBe},XBe)),eVe=O` ${ZC} .root{min-width: 0}.control{height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-height: 0;outline: none;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font);box-sizing: border-box}:host(:focus-within:not([disabled])) .control{outline: none;border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}.control:hover:not(:focus):not([disabled]){outline: none;border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}#display-field{min-height: unset;padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px);font-family: var(--body-font), sans-serif;font-size: var(--type-ramp-base-font-size);background-color: transparent}#display-field:focus{outline: none;background: unset}#display-field:hover:not(:focus):not([disabled]){outline: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);left: calc( 100% - ((var(--base-height-multiplier) * (var(--design-unit) - 1)) + (var(--design-unit) - 2)) * 1px );background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}#arrow-icon{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);fill: var(--neutral-foreground-rest)}.label{color: var(--neutral-foreground-hint)}.options{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);overflow-x: hidden}rapid-checkbox{border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);padding: calc((var(--design-unit) + 1) * 1px) 0 calc((var(--design-unit) + 1) * 1px) calc((var(--design-unit) + 1) * 1px);margin: 0}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}rapid-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}rapid-checkbox[disabled]{cursor: not-allowed}`,tVe=T` ${tw(`rapid`)} `;var nVe=class extends rw{};let rVe=nw,iVe=nVe.compose(Object.assign({baseName:`multiselect`,template:tVe,styles:eVe,shadowOptions:void 0},rVe)),aVe=class extends S7{}.compose({baseName:`notification-listener`,template:x7,shadowOptions:{mode:`open`,delegatesFocus:!0}}),oVe=(e,t)=>O` :host{flex: 1 1 auto;box-sizing: border-box}:host([disabled]){opacity: var(--disabled-opacity);cursor: not-allowed}:host .control{height: 100%;width: 100%;border: none;background-color: transparent;padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);font-family: var(--body-font)}:host .root{display: flex;box-sizing: border-box;position: relative;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:focus-within:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{display: block;color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0;font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.label-hidden{margin: 0}.controls{position: absolute;right: 3px;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center;flex-direction: column;cursor: pointer}.step-down, .step-up{width: 1em;height: 1em;margin: -2px}.step-up-glyph, .step-down-glyph{fill: var(--neutral-foreground-hint)}.control:focus-visible{outline: none}:host .control-field .control{width: 100%}${N0}`;var sVe=class extends a4{};let cVe=s4,lVe=U2,uVe=o4,dVe=sVe.compose(Object.assign({baseName:`number-field`,template:lVe,styles:oVe,shadowOptions:uVe},cVe)),fVe=class extends u4{}.compose({baseName:`optgroup`,template:(e,t)=>l4(e,t),styles:(e,t)=>O` ${c4(e,t)}`}),pVe=class extends _4{}.compose(Object.assign({baseName:`system-health-overlay`,template:v4,styles:y4,shadowOptions:void 0},b4)),mVe=O` ${x4} :host{--pill-fill: ${ol};--pill-fill-hover: ${sl};--pill-foreground: ${H}}`,hVe=S4,gVe=class extends w4{}.compose(Object.assign({baseName:`pill`,template:hVe,styles:mVe,shadowOptions:void 0},C4)),_Ve=class extends p4{}.compose(Object.assign({baseName:`progress`,template:(e,t)=>d4(e,t),styles:(e,t)=>O` ${f4(e,t)}`,shadowOptions:void 0},m4)),vVe=class extends w3{}.compose(Object.assign({baseName:`progress-ring`,template:(e,t)=>S3(e,t),styles:(e,t)=>O` ${C3(e,t)}`,shadowOptions:void 0},T3)),yVe=class extends O3{}.compose(Object.assign({baseName:`radio`,template:(e,t)=>E3(e,t),styles:(e,t)=>O` ${D3(e,t)} :host{margin: 0}:host .control{background: transparent}:host([aria-checked='true']) .control{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host .label{padding-inline-start: calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:hover{background: transparent}:host([aria-checked='true']:not([disabled])) .control:hover{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-hover)}.checked-indicator, :host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:void 0},k3)),bVe=class extends M3{}.compose(Object.assign({baseName:`radio-group`,template:(e,t)=>A3(e,t),styles:(e,t)=>O` ${j3(e,t)}`,shadowOptions:void 0},N3)),xVe=O` ${P3} :host{font-family: var(--body-font)}`,SVe=T` ${F3(`rapid`)} `,CVe=class extends I3{}.compose(Object.assign({baseName:`scheduler`,template:SVe,styles:xVe,shadowOptions:void 0},L3)),wVe=O` ${K3} :host{font-family: var(--body-font)}`,TVe=T` ${r6(`rapid`)} `,EVe=class extends i6{}.compose(Object.assign({baseName:`scheduler-cron-builder`,template:TVe,styles:wVe,shadowOptions:void 0},a6)),DVe=O` ${o6} :host{font-family: var(--body-font)}`,OVe=T` ${s6(`rapid`)} `,kVe=class extends c6{}.compose(Object.assign({baseName:`scheduler-timezone`,template:OVe,styles:DVe,shadowOptions:void 0},l6)),AVe=O` ${u6}`,jVe=T` ${d6(`rapid`)} `,MVe=class extends f6{}.compose(Object.assign({baseName:`search-bar`,template:jVe,styles:AVe,shadowOptions:void 0},p6)),NVe=class extends g6{}.compose(Object.assign({baseName:`search-bar-combobox`,template:(e,t)=>h6(e,t),styles:(e,t)=>O` ${m6(e,t)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--neutral-stroke-rest));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}`,shadowOptions:_6},v6)),PVe=class extends T6{}.compose(Object.assign({baseName:`section-navigator`,template:b6,styles:(e,t)=>y6,shadowOptions:E6},D6)),FVe=class extends A6{}.compose(Object.assign({baseName:`segmented-control`,template:(e,t)=>O6(e,t),styles:(e,t)=>O` ${k6(e,t)} :host{font-family: var(--body-font);margin: 0}:host ::slotted(*){transition: color 0.4s ease 0s}:host ::slotted(label){color: var(--neutral-foreground-rest)}:host ::slotted(rapid-segmented-item:first-of-type){border-radius: calc(var(--control-corner-radius) * 1px) 0 0 calc(var(--control-corner-radius) * 1px);border-right-width: 0}:host ::slotted(rapid-segmented-item:last-of-type){border-radius: 0 calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0;border-left-width: 0}:host ::slotted(rapid-segmented-item:only-of-type){border-radius: calc(var(--control-corner-radius) * 1px);border-left-width: 1px;border-right-width: 1px}:host ::slotted(*[aria-checked='true']){background: var(--neutral-fill-rest);box-shadow: none;color: var(--neutral-foreground-rest)}:host([appearance='primary']) ::slotted(*[aria-checked='true']){background: var(--accent-fill-rest);border-color: transparent;box-shadow: none;color: var(--foreground-on-accent-rest)}`,shadowOptions:void 0},{})),IVe=class extends O3{}.compose(Object.assign({baseName:`segmented-item`,template:(e,t)=>j6(e,t),styles:(e,t)=>O` ${M6(e,t)} :host{color: var(--neutral-fill-strong-rest);font-size: var(--type-ramp-minus-2-font-size);font-weight: 500;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);box-sizing: border-box;height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin: 0}:host([aria-checked='true']){color: color-mix(in srgb, white, transparent 10%)}`,shadowOptions:void 0},{})),LVe=class extends F6{}.compose(Object.assign({baseName:`select`,template:(e,t)=>N6(e,t),styles:(e,t)=>O` ${P6(e,t)} :host{border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not(.open)){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.select-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s;min-width: unset;min-height: unset}.selected-value{display: flex;align-items: center;height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .select-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:void 0},I6)),RVe=class extends z6{}.compose(Object.assign({baseName:`skeleton`,template:(e,t)=>L6(e,t),styles:(e,t)=>O` ${R6(e,t)} :host{--skeleton-fill: var( --neutral-fill-stealth-rest );/** value in ux doc rgba(242 242 242 / 0.1) */}`,shadowOptions:void 0},B6)),zVe=class extends U6{}.compose(Object.assign({baseName:`slider`,template:(e,t)=>V6(e,t),styles:(e,t)=>O` ${H6(e,t)} .thumb-cursor{background: var(--accent-fill-rest);border-radius: calc(var(--control-corner-radius) * 2px)}.thumb-cursor:hover, .thumb-cursor:focus, .thumb-cursor:active{background: var(--accent-fill-rest);border-radius: transparent}:host(:focus-visible) .thumb-cursor{box-shadow: 0 0 0 0}.thumb-cursor:hover::after, .thumb-cursor:focus::after, .thumb-cursor:active::after{content: '';height: calc(var(--thumb-size) * 2px);width: calc(var(--thumb-size) * 2px);border-radius: calc(var(--control-corner-radius) * 4px);position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: -1}.thumb-cursor:hover::after{background-color: color-mix(in srgb, ${Rc}, transparent 90%)}.thumb-cursor:focus::after{background-color: color-mix(in srgb, ${Rc}, transparent 80%)}.thumb-cursor:active::after{background-color: color-mix(in srgb, ${Rc}, transparent 70%)}.track{background-color: var(--neutral-fill-rest)}:host([orientation='horizontal']) .track .track-progress{background-color: var(--neutral-stroke-rest);height: calc((var(--track-width) + 2) * 1px) !important}:host([orientation='vertical']) .track .track-progress{background-color: var(--neutral-stroke-rest);width: calc((var(--track-width) + 2) * 1px) !important}`,shadowOptions:void 0},W6)),BVe=class extends q6{}.compose(Object.assign({baseName:`slider-label`,template:(e,t)=>G6(e,t),styles:(e,t)=>O` ${K6(e,t)} .label{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-4);background-color: var(--neutral-fill-strong-hover);color: var(--neutral-layer-4);text-align: center;font-size: var(--type-ramp-minus-1-font-size, 12px)}`,shadowOptions:void 0},J6)),VVe=O` ${Q6} .snackbar{border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);background-color: var(--neutral-layer-1);padding: calc((var(--design-unit) - 2) * 1px) calc(var(--design-unit) * 4px)}:host([type='error']) .snackbar::after{background-color: var(--error-color)}.content{font-family: var(--body-font);font-size: var(--type-ramp-minus-2-font-size);color: var(--neutral-foreground-rest)}.action{gap: calc(var(--design-unit) * 2px)}`,HVe=T` ${$6(`rapid`)} `,UVe=e8,WVe=class extends t8{}.compose({baseName:`snackbar`,shadowOptions:UVe,styles:VVe,template:HVe}),GVe=class extends i8{}.compose({baseName:`stacking-icons`,template:r8,styles:(e,t)=>O` ${n8(e,t)}`}),KVe=class extends u8{}.compose({baseName:`status-pill`,template:o8,styles:a8}),qVe=O` ${R7} :host{font-family: var(--body-font)}:host([orientation='horizontal']){height: 100%}.stepper-tab-panel{border: none;height: auto}:host([orientation='horizontal']) .stepper-tab-panel{height: 100%}.stepper-tab{background-color: var(--neutral-layer-3);border: none}.stepper-panel-container{padding: calc(var(--design-unit) * 4px)}.action-buttons-container{padding: calc(var(--design-unit) * 2px);width: auto;gap: calc(var(--design-unit) * 2px)}.stepper-tab-menu{margin-bottom: calc(var(--design-unit) * 4px)}.stepper-tab-progress{padding: calc(var(--design-unit) * 4px) 0}label{padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}`,R9=T` ${L7(`rapid`)} `,JVe=class extends z7{}.compose(Object.assign({baseName:`stepper`,template:R9,styles:qVe,shadowOptions:void 0},B7)),YVe=(e,t)=>O` ${p8(e,t)} rapid-tree-item{--design-unit: 2.5;--neutral-fill-stealth-rest: var(--neutral-layer-3);--neutral-fill-stealth-hover: var(--fill-color);--neutral-fill-rest: var(--fill-color);--base-height-multiplier: 14.5;border-bottom: calc(var(--stroke-width) * 1px) solid var(--fill-color)}.completed-icon{color: var(--success-color)}.tree-item::part(positioning-region)::before{width: var(--tree-item-nested-width)}.stepper-icon{margin-right: calc(var(--design-unit) * 2px)}.error-icon{color: var(--error-color)}.step-number{font-size: var(--type-ramp-minus-1-font-size);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-input-rest)}.step-title{font-size: var(--type-ramp-base-font-size)}.angle-icon{margin: 0 calc(var(--design-unit) * 4px)}:host([completed]) .step-number{border-color: var(--success-color);color: white;background-color: var(--success-color)}:host([completed]) .step-title{color: var(--success-color)}:host([error]) .step-number{border-color: var(--error-color);color: white;background-color: var(--error-color)}:host([error]) .step-title{color: var(--error-color)}`,XVe=T` ${f8(`rapid`)} `,ZVe=class extends m8{}.compose(Object.assign({baseName:`stepper-tab`,template:XVe,styles:YVe,shadowOptions:void 0},h8)),QVe=class extends _8{}.compose(Object.assign({baseName:`stepper-tab-panel`,template:(e,t)=>g8(e,t),shadowOptions:void 0},v8)),$Ve=class extends x8{}.compose(Object.assign({baseName:`switch`,template:(e,t)=>y8(e,t),styles:(e,t)=>O` ${b8(e,t)} :host{--primary-gradient-angle: -113.5deg}.switch{background: none;border-color: var(--neutral-stroke-rest)}.checked-indicator{background-color: var(--neutral-stroke-rest)}.switch:hover{border-color: var(--neutral-stroke-rest);background: none}:host([aria-checked='true']) .switch{background: none}:host([aria-checked='true']) .checked-indicator{background: var(--accent-fill-rest)}:host([aria-checked='true']:not([disabled])) .switch:hover, :host([aria-checked='true']:not([disabled])) .switch:active{background: none}:host([aria-checked='true']:not([disabled])) .switch:hover .checked-indicator, :host([aria-checked='true']:not([disabled])) .switch:active .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:void 0},{switch:`<div class="checked-indicator" part="checked-indicator"></div>`})),eHe=class extends w8{}.compose(Object.assign({baseName:`tab`,template:(e,t)=>S8(e,t),styles:(e,t)=>O` ${C8(e,t)} :host{background-color: var(--neutral-layer-2);border-radius: calc(var(--control-corner-radius) * 2px) calc(var(--control-corner-radius) * 2px);box-shadow: 0 0 15px 0 rgb(0 0 0 / 30%);margin-right: calc(var(--design-unit) * 5px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host([aria-selected='true']), :host([aria-selected='true']:hover){background-color: var(--neutral-layer-4);font-weight: 700}/* * Sustained alert, sampling the flash phase the platform animates on the document. Every * alerting surface reads that one value, so tabs and grid rows brighten and fade together * however long ago each of them started alerting. * * Mixing towards transparent and currentColor lets the tab fade back to its own resting * colours, so selected and unselected tabs each return to the right background. * * !important because a :host rule loses to any app stylesheet that colours tabs from the light * DOM, and an alert nobody can see is worse than no alert. */ :host([alert]){background-color: color-mix( in srgb, var(--tab-alert-color, var(--error-fill-rest)) calc(var(${k0}, 0) * 100%), transparent ) !important;color: color-mix( in srgb, contrast-color(var(--tab-alert-color, var(--error-fill-rest))) calc(var(${k0}, 0) * 100%), currentColor ) !important}/* Reduced motion stops the clock, leaving the phase at 0, so paint a steady alert instead. */ @media (prefers-reduced-motion: reduce){:host([alert]){background-color: var(--tab-alert-color, var(--error-fill-rest)) !important;color: contrast-color(var(--tab-alert-color, var(--error-fill-rest))) !important}}`,shadowOptions:void 0},T8)),tHe=class extends O8{}.compose(Object.assign({baseName:`tab-panel`,template:(e,t)=>E8(e,t),styles:(e,t)=>O` ${D8(e,t)} :host{padding: 0;background-color: var(--neutral-layer-card-container);border-radius: 0 0 var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px)) var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));border-style: solid;border-width: var(--tabs-border-width, 1px);border-color: var(--tabs-border-color, var(--neutral-stroke-rest))}`,shadowOptions:void 0},k8)),nHe=class extends M8{}.compose(Object.assign({baseName:`tabs`,template:(e,t)=>A8(e,t),styles:(e,t)=>O` ${j8(e,t)} :host{background: var(--neutral-layer-3);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:not([appearance='secondary'])){background: var(--rapid-layout-item-background, var(--neutral-layer-3));border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, 0)}:host([appearance='secondary']){background: transparent}:host .tablist{padding: 0;display: grid;width: max-content;margin-top: 0}:host .tabpanel{height: 100%;min-height: 0}:host([appearance='secondary']) .tablist{margin-bottom: 0}:host .end, :host .start{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);height: calc(100% - 1px);display: flex;align-items: center}::slotted([slot='tab']:hover){color: var(--neutral-foreground-rest);background: var(--neutral-layer-1)}::slotted([role='tab']){border-radius: calc(var(--control-corner-radius) * 1.5px) calc(var(--control-corner-radius) * 1.5px) 0 0;background: var(--tab-rest-background-color, var(--neutral-layer-4));padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin-right: 2px;box-shadow: none;font-size: var(--type-ramp-minus-1-font-size);border-style: solid;border-width: var(--tab-rest-border-width, 1px);border-color: var(--tab-rest-border-color, transparent)}::slotted([role='tab'][aria-selected='true']:not([appearance='secondary'])){border-style: solid;border-width: var(--tab-active-border-width, 1px 1px 0 1px);border-color: var(--tab-active-border-color, var(--neutral-stroke-rest));background: var(--tab-active-background-color, var(--neutral-layer-card-container))}::slotted([role='tab'][aria-selected='true']){color: var(--accent-foreground-rest);background: var(--neutral-layer-card-container)}/* stylelint-disable selector-class-pattern */ .activeIndicator{display: none}:host([appearance='secondary']) .tablist .activeIndicator{display: block;height: 1px;margin-top: unset}::slotted([role='tab'][aria-selected='true'][appearance='secondary']){background: none}::slotted([role='tab'][appearance='secondary']){margin-left: 0;box-shadow: none;background: none}:host([appearance='secondary']:hover){color: var(--neutral-foreground-rest);background: none}:host([appearance='secondary']) ::slotted([role='tabpanel']){border: 0}`,shadowOptions:void 0},N8)),rHe=class extends I8{}.compose(Object.assign({baseName:`text-area`,template:(e,t)=>P8(e,t),styles:(e,t)=>O` ${F8(e,t)} :host{display: grid;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px);padding: calc(var(--design-unit) * 2px)}:host(:hover:not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}`,shadowOptions:void 0},L8)),iHe=class extends B8{}.compose(Object.assign({baseName:`text-field`,template:(e,t)=>R8(e,t),styles:(e,t)=>O` ${z8(e,t)} :host{display: block;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-radius: calc(var(--control-corner-radius) * 1px);padding: 0 calc(var(--design-unit) * 2px)}:host .control-field .control{width: 100%}:host .root{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover);box-shadow: none}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{margin: 0}:host input::placeholder{color: var(--neutral-foreground-hint);opacity: 75%}`,shadowOptions:V8},H8)),aHe=O` ${U8} .toast{background-color: ${Oc};border-radius: calc(var(--control-corner-radius) * 2px) calc(var(--control-corner-radius) * 2px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.top{align-items: flex-start}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}.content{font-size: var(--type-ramp-minus-1-font-size)}.date{margin: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}.content-wrapper{padding: calc(var(--design-unit) * 2px)}.toast::after{background-color: var(--accent-fill-rest);border-radius: 0;height: calc(100% - calc(var(--design-unit) * 5px));margin: calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}:host([notify='warning']) .toast::after{background-color: var(--warning-color)}:host([notify='success']) .toast::after{background-color: var(--success-color)}:host([notify='critical']) .toast::after, :host([notify='serious']) .toast::after, :host([notify='error']) .toast::after{background-color: var(--error-color)}`,oHe=K8,sHe=G8,cHe=class extends q8{}.compose(Object.assign({baseName:`toast`,shadowOptions:sHe,styles:aHe,template:W8},oHe)),lHe=class extends X8{}.compose(Object.assign({baseName:`toolbar`,template:(e,t)=>J8(e,t),styles:(e,t)=>O` ${Y8(e,t)} :host{align-items: center;color: var(--neutral-foreground-rest)}.positioning-region{align-items: center}`,shadowOptions:void 0},Z8)),uHe=class extends e5{}.compose(Object.assign({baseName:`tooltip`,template:(e,t)=>Q8(e,t),styles:(e,t)=>O` ${$8(e,t)} :host{visibility: visible}.tooltip{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);text-align: center;white-space: inherit;font-weight: 400}rapid-anchored-region.bottom .tooltip{margin-top: calc(var(--design-unit) * 1px);margin-left: calc(var(--design-unit) * 2px)}rapid-anchored-region.top.right .tooltip, rapid-anchored-region.bottom.right .tooltip{margin-left: 0}`,shadowOptions:void 0},t5)),dHe=class extends i5{}.compose(Object.assign({baseName:`tree-item`,template:(e,t)=>n5(e,t),styles:(e,t)=>O` ${r5(e,t)} :host{font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-rest);background-color: transparent}:host(.nested) .expand-collapse-button{background: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);width: calc(var(--design-unit) * 5px);height: calc(var(--design-unit) * 5px);margin-left: calc(var(--design-unit) * 2px)}:host([selected]) .positioning-region{background: var(--neutral-fill-stealth-active)}.positioning-region::before{width: calc(var(--design-unit) * 1px)}:host([selected])::after{background: var(--accent-fill-rest);background-origin: border-box;background-size: cover;background-repeat: no-repeat}:host([slot='item']) .content-region{margin-inline-start: calc(var(--design-unit) * 4px + var(--expand-collapse-button-size))}.expand-collapse-glyph{width: calc(var(--design-unit) * 3px);height: calc(var(--design-unit) * 3px)}`,shadowOptions:void 0},{expandCollapseGlyph:`
|
|
1002
|
+
Submit </${e}-button>`)} ${A(e=>!e.isLastStep,T`<${e}-button part="next-button" exportparts="${I7(`next-button`)}" @click=${e=>e.nextStep()}data-test-id="next-button">Next</${e}-button>`)}</slot></div>`)}</${e}-card>`)} `,qFe=T` ${e=>L7(Py(e))} `,R7=O` :host{display: flex;height: 100%;width: 100%}:host([orientation='horizontal']){flex-direction: column}.stepper-tab{display: flex;flex-direction: column;width: 100%;height: 100%;max-width: 280px;border-radius: 0}.action-buttons-container{width: 100%;display: flex;justify-content: flex-end}.stepper-panel-container{height: 100%;overflow: hidden;padding: 15px}.stepper-tab-menu{display: flex;flex-direction: column;width: 100%;margin-bottom: 30px}.stepper-tab-menu-hidden{display: none}.stepper-tab-progress{display: flex;flex-direction: column;align-items: center;justify-content: start;flex: 1}.stepper-tab-progress .progress-ring{--design-unit: 10;margin: 0}.stepper-tab-panel{display: flex;flex-direction: column;justify-content: space-between;width: 100%;min-width: 370px;border-radius: 0}label{padding: 0 10px;color: rgb(135 155 166);display: block;cursor: pointer;text-align: center;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}:host([orientation='horizontal']) .stepper-tab-menu{height: 100%;width: 100%;display: flex;flex-direction: row;margin-bottom: 0;align-items: center;justify-content: center;gap: calc(var(--design-unit) * 4px);padding: 0 calc(var(--design-unit) * 4px)}:host([orientation='horizontal']) .stepper-tab-hidden{display: none}:host([orientation='horizontal']) .stepper-tab{max-width: 100%;max-height: 70px;height: 70px}`;var z7=class extends P{constructor(){super(...arguments),this.hideProgress=!1,this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=Va.vertical,this.tabs=[],this.tabpanels=[],this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if(e.slot===`tab`){let n=this.activeTabIndex===t,r=t+1===this.tabIds.length,i=this.tabIds[t],a=this.tabpanelIds[t];e.setAttribute(`id`,i),e.setAttribute(`aria-selected`,n?`true`:`false`),e.setAttribute(`aria-disabled`,n?`false`:`true`),x.setBooleanAttribute(e,`selected`,n),e.setAttribute(`orientation`,this.orientation),a&&e.setAttribute(`aria-controls`,a),e.setAttribute(`tab-position`,String(t+1)),x.setBooleanAttribute(e,`isLast`,r),x.setBooleanAttribute(e,`hideStepNumber`,this.hideStepNumber===!0),e.setAttribute(`tabindex`,n?`0`:`-1`),x.setBooleanAttribute(e,`showCursorPointer`,t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps),n&&(this.activetab=e,this.activeid=i)}}),this.activeTabIndex===0&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)});let t=this.indicatorOnly?this.tabs.length:this.tabpanels.length;this.progressValue=t?Math.round(e/t*100):0},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{let n=this.tabIds[t],r=this.tabpanelIds[t];e.setAttribute(`id`,r),e.setAttribute(`aria-labelledby`,n),this.activeTabIndex===t?e.removeAttribute(`hidden`):e.setAttribute(`hidden`,``)})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&(this.indicatorOnly||this.tabpanels.length>0)}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return this.activeid===void 0||this.tabIds.indexOf(this.activeid)===-1?0:this.tabIds.indexOf(this.activeid)}goToStep(e,t=!1){let n=e-1;if(e<1||e>this.tabs.length)return Ay.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(n===this.activeTabIndex)return!1;if(t){if(n<this.activeTabIndex)return this.handleBackwardJump(n);if(n>this.activeTabIndex)return this.handleForwardJump(n)}return n<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(n):n>this.activeTabIndex&&this.allowForwardJumps?this.handleForwardJump(n):n===this.activeTabIndex+1?(this.nextStep(),!0):(Ay.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit(`step-click`,{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit(`validation-failure`,{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit(`step-click`,{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return this.activeTabIndex===0}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){let e=this.tabs.length-1;return this.activeTabIndex===e&&(this.validation&&this.validation[e]?.isValid()||!this.validation||!this.validation[e])?(this.tabs[e].completed=!0,this.getCompletedTabs(),!1):(this.tabs[e].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit(`submit`)}nextStep(){if(!this.slotsInitialized){this.pendingNextStep=!0;return}if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid()){this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,this.getCompletedTabs();return}this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex+=1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit(`next-step`),this.$emit(`validation-success`));let e=this.tabs.length-1,t=this.activeTabIndex===e;this.hideSubmitButton&&t&&(this.validation&&this.validation[e]?.isValid()||!this.validation||!this.validation[e])?(this.tabs[e].completed=!0,this.getCompletedTabs()):(this.tabs[e].completed=!1,this.getCompletedTabs())}previousStep(){this.activeTabIndex!==0&&(this.tabs[this.activeTabIndex].completed=!1,--this.activeTabIndex,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>e.getAttribute(`id`)??`tab-${Rn()}`)}getTabPanelIds(){return this.tabpanels.map(e=>e.getAttribute(`id`)??`panel-${Rn()}`)}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}};q([D({attribute:`hide-submit-button`,mode:`boolean`})],z7.prototype,`hideSubmitButton`,void 0),q([D({attribute:`hide-progress`,mode:`boolean`})],z7.prototype,`hideProgress`,void 0),q([D({attribute:`hide-step-number`,mode:`boolean`})],z7.prototype,`hideStepNumber`,void 0),q([D({attribute:`allow-backward-jumps`,mode:`boolean`})],z7.prototype,`allowBackwardJumps`,void 0),q([D({attribute:`allow-forward-jumps`,mode:`boolean`})],z7.prototype,`allowForwardJumps`,void 0),q([D({attribute:`hide-all-buttons`,mode:`boolean`})],z7.prototype,`hideAllButtons`,void 0),q([D({attribute:`hide-tabs`,mode:`boolean`})],z7.prototype,`hideTabs`,void 0),q([D({attribute:`indicator-only`,mode:`boolean`})],z7.prototype,`indicatorOnly`,void 0),q([D],z7.prototype,`orientation`,void 0),q([D],z7.prototype,`activeid`,void 0),q([C],z7.prototype,`tabs`,void 0),q([C],z7.prototype,`tabpanels`,void 0),q([C],z7.prototype,`validation`,void 0),q([C],z7.prototype,`progressValue`,void 0),q([C],z7.prototype,`activeTabIndex`,void 0),q([w],z7.prototype,`disabledPreviousStep`,null),q([w],z7.prototype,`isLastStep`,null),q([w],z7.prototype,`islastStepValid`,null);let B7={};z7.compose(Object.assign({baseName:`stepper`,template:qFe,styles:R7,shadowOptions:void 0},B7));let JFe=class extends rd{}.compose(Object.assign({baseName:`accordion`,template:(e,t)=>mo(e,t),styles:(e,t)=>O` ${nd(e,t)} :host{border-top: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest)}.heading{height: calc(var(--base-height-multiplier) * 4px)}`,shadowOptions:id},ad)),YFe=class extends cd{}.compose(Object.assign({baseName:`accordion-item`,template:(e,t)=>od(e,t),styles:(e,t)=>O` ${sd(e,t)} :host{--icon-container-calculator: calc( (6 + (var(--design-unit) * 6)) * 1px );/* height of section - (padding top +padding-bottom) */ --icon-margin-calculation: calc((6 + (var(--design-unit) * 2 * var(--density))) * 1px)}.region{padding: 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px);color: var(--accent-foreground-rest)}:host([expanded]) .region{color: var(--accent-foreground-rest)}slot[name='expanded-icon']{display: none;stroke: none}slot[name='collapsed-icon'] path.plus-sign, slot[name='expanded-icon'] path.minus-sign{stroke: white}slot[name='expanded-icon'], slot[name='collapsed-icon']{background: var(--neutral-fill-rest);fill: none;stroke: none;height: calc((var(--design-unit) * 4) * 1px);width: calc((var(--design-unit) * 4) * 1px)}svg:not(:root){height: calc((var(--design-unit) * 4) * 1px);width: calc((var(--design-unit) * 4) * 1px)}.icon{height: var( --icon-container-calculator );/* UX 30px* for now it's 30 on default design unit - 4/ */ width: var(--icon-container-calculator);/* UX 30px */ margin: var(--icon-margin-calculation) var(--icon-margin-calculation) var(--icon-margin-calculation) 0}.button{padding: 0 calc((8 + (var(--design-unit) * 2 * var(--density))) * 1px) 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px)}.heading{grid-template-columns: auto 1fr auto;align-items: center}`,shadowOptions:ld},ud)),XFe=class extends ab{}.compose({baseName:`actions-menu`,styles:(e,t)=>O` :host{--actions-opener-height-multiplier: 0.6px;--menu-item-height-multiplier: 0.5px}${dd(e,t)} rapid-menu-item{display: flex;user-select: none}rapid-menu-item::part(content){margin-inline: calc(var(--design-unit) * 3px)}rapid-menu-item[disabled]{pointer-events: none}.actions-vertical .actions-menu{padding: 0}.actions-vertical .menu-item{margin: 0;padding: calc(var(--design-unit) * 4px);border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}.actions-vertical .menu-item:last-child{border-bottom: none}.actions-vertical .menu-item:focus{border: calc(var(--stroke-width) * 1px) solid var(--accent-foreground-focus)}`,template:ib}),ZFe=O` ${xS}`,QFe=class extends eC{}.compose(Object.assign({baseName:`ai-criteria-search`,template:(e,t)=>CS,styles:ZFe,shadowOptions:void 0},tC)),$Fe=class extends iC{}.compose({baseName:`ai-indicator`,template:rC,styles:(e,t)=>O` ${nC(e,t)} :host{--green: var(--success-color);--trafic-light-green: var(--success-color);--red: var(--error-color);--trafic-light-red: var(--error-color);--amber: var(--warning-color);--trafic-light-amber: var(--warning-color)}`});function V7(e,t){return new uo(`appearance`,e,t)}let eIe=[`baseClass`,`baseName`,`shadowOptions`,`styles`,`template`],tIe=(e,t=eIe)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{}),H7=e=>{let{definition:t}=e(),{shadowOptions:n,styles:r,template:i}=t;return{shadowOptions:n,styles:r,template:i,defaultConfig:tIe(t)}},nIe=O` :host([appearance='primary']){background: var(--accent-fill-rest);color: var(--foreground-on-accent-rest)}:host([appearance='primary']:hover){background: var(--accent-fill-hover);color: var(--foreground-on-accent-hover)}:host([appearance='primary']:active){background: var(--accent-fill-active);color: var(--foreground-on-accent-active)}:host([appearance='primary'][disabled]), :host([appearance='primary'][disabled]):hover, :host([appearance='primary'][disabled]):active{opacity: 50%}`,rIe=O` :host([appearance='secondary']){background: var(--secondary-fill-rest);color: contrast-color(var(--secondary-fill-rest))}:host([appearance='secondary']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary'][disabled]), :host([appearance='secondary'][disabled]):hover, :host([appearance='secondary'][disabled]):active{opacity: 50%}`,iIe=O` :host([appearance='neutral']){background: var(--neutral-button-fill, var(--neutral-fill-rest));border: var(--neutral-button-border, 0);color: var(--neutral-button-foreground, var(--neutral-foreground-rest))}:host([appearance='neutral']:hover){background: color-mix( in srgb, var(--neutral-button-fill, var(--neutral-fill-hover)), transparent 20% )}:host([appearance='neutral']:active){background: color-mix( in srgb, var(--neutral-button-fill, var(--neutral-fill-active)), transparent 30% )}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{opacity: 50%;background: var(--neutral-button-fill, var(--neutral-fill-rest));color: var(--neutral-button-foreground, var(--neutral-foreground-rest));border: var(--neutral-button-border, 0)}`,aIe=O` :host([appearance='danger']){background: var(--error-fill-rest);color: contrast-color(var(--error-fill-rest));border: 0}:host([appearance='danger']:hover){background: var(--error-fill-hover);color: contrast-color(var(--error-fill-hover))}:host([appearance='danger']:active){background: var(--error-fill-active);color: contrast-color(var(--error-fill-active))}:host([appearance='danger'][disabled]), :host([appearance='danger'][disabled]):hover, :host([appearance='danger'][disabled]):active{opacity: 50%}`,oIe=O` :host([appearance='success']){background: var(--success-fill-rest);color: contrast-color(var(--success-fill-rest));border: 0}:host([appearance='success']:hover){background: var(--success-fill-hover);color: contrast-color(var(--success-fill-hover))}:host([appearance='success']:active){background: var(--success-fill-active);color: contrast-color(var(--success-fill-active))}:host([appearance='success'][disabled]), :host([appearance='success'][disabled]):hover, :host([appearance='success'][disabled]):active{opacity: 50%}`,sIe=O` :host([appearance='warning']){background: var(--warning-fill-rest);color: contrast-color(var(--warning-fill-rest));border: 0}:host([appearance='warning']:hover){background: var(--warning-fill-hover);color: contrast-color(var(--warning-fill-hover))}:host([appearance='warning']:active){background: var(--warning-fill-active);color: contrast-color(var(--warning-fill-active))}:host([appearance='warning'][disabled]), :host([appearance='warning'][disabled]):hover, :host([appearance='warning'][disabled]):active{opacity: 50%}`,cIe=O` :host([appearance='tertiary']){background: var(--tertiary-fill-rest);color: contrast-color(var(--tertiary-fill-rest));border: 0}:host([appearance='tertiary']:hover){background: var(--tertiary-fill-hover);color: contrast-color(var(--tertiary-fill-hover))}:host([appearance='tertiary']:active){background: var(--tertiary-fill-active);color: contrast-color(var(--tertiary-fill-active))}:host([appearance='tertiary'][disabled]), :host([appearance='tertiary'][disabled]):hover, :host([appearance='tertiary'][disabled]):active{opacity: 50%}`,lIe=O` :host([appearance='primary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest)}:host([appearance='primary-outline']:hover){background: var(--accent-fill-hover);color: contrast-color(var(--accent-fill-hover))}:host([appearance='primary-outline']:active){background: var(--accent-fill-active);color: contrast-color(var(--accent-fill-active))}:host([appearance='primary-outline'][disabled]), :host([appearance='primary-outline'][disabled]):hover, :host([appearance='primary-outline'][disabled]):active{opacity: 50%}`,uIe=O` :host([appearance='secondary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--secondary-fill-rest)}:host([appearance='secondary-outline']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary-outline']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary-outline'][disabled]), :host([appearance='secondary-outline'][disabled]):hover, :host([appearance='secondary-outline'][disabled]):active{opacity: 50%}`,dIe=O` :host([appearance='neutral-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host([appearance='neutral-outline']:hover){background: var(--neutral-fill-hover);color: contrast-color(var(--neutral-fill-hover))}:host([appearance='neutral-outline']:active){background: var(--neutral-fill-active);color: contrast-color(var(--neutral-fill-active))}:host([appearance='neutral-outline'][disabled]), :host([appearance='neutral-outline'][disabled]):hover, :host([appearance='neutral-outline'][disabled]):active{opacity: 50%}`,fIe=O` :host([appearance='link']){background: none;border: none;color: var(--accent-foreground-rest)}:host([appearance='link']) .control{padding: 0}:host([appearance='link']:hover){color: var(--accent-foreground-hover)}:host([appearance='link'][disabled]), :host([appearance='link'][disabled]):hover, :host([appearance='link'][disabled]):active{opacity: 50%}`,pIe=(e,t)=>O` :host{font-weight: 500;color: var(--neutral-foreground-rest);box-sizing: border-box;font-size: var(--type-ramp-base-font-size);height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px)}.control{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px)}.start{margin-inline-end: calc(var(--design-unit) * 2px)}.end{margin-inline-start: calc(var(--design-unit) * 2px)}.control:has(.start){padding-left: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}.control:has(.end){padding-right: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}:host([appearance='neutral']){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral']:hover){background: var(--neutral-fill-rest)}:host([appearance='neutral']:active){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%));border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest);color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%);opacity: 100%}:host([appearance='accent']){color: contrast-color(var(--accent-fill-rest))}`,U7=(e,t)=>O` ${IC(e,t)} ${pIe(e,t)} `.withBehaviors(V7(`primary`,nIe),V7(`secondary`,rIe),V7(`tertiary`,cIe),V7(`neutral`,iIe),V7(`danger`,aIe),V7(`success`,oIe),V7(`warning`,sIe),V7(`primary-outline`,lIe),V7(`secondary-outline`,uIe),V7(`neutral-outline`,dIe),V7(`link`,fIe)),mIe=class extends sC{}.compose(Object.assign({baseName:`anchor`,template:(e,t)=>aC(e,t),styles:(e,t)=>O` ${oC(e,t)} ${U7(e,t)} `.withBehaviors(...U7(e,t).behaviors),shadowOptions:cC},lC)),hIe=class extends fC{}.compose(Object.assign({baseName:`anchored-region`,template:(e,t)=>uC(e,t),styles:(e,t)=>O` ${dC(e,t)}`,shadowOptions:pC},mC)),gIe=class extends _C{}.compose(Object.assign({baseName:`avatar`,template:(e,t)=>hC(e,t),styles:(e,t)=>O` ${gC(e,t)}`,shadowOptions:vC},yC)),_Ie=class extends SC{}.compose(Object.assign({baseName:`badge`,template:(e,t)=>bC(e,t),styles:(e,t)=>O` ${xC(e,t)} :host{--badge-fill-primary: var(--accent-fill-rest);--badge-fill-neutral: var(--neutral-fill-rest);--badge-fill-success: var(--success-color);--badge-fill-danger: var(--error-color);--badge-fill-warning: var(--warning-color);--badge-fill-buy: var(--buy-color);--badge-fill-sell: var(--sell-color);--badge-color-text: var(--neutral-foreground-rest);font-size: var(--type-ramp-minus-2-font-size)}:host .control{padding: calc(${B} * 1px) calc(${B} * 2px);border: none}`,shadowOptions:void 0},CC)),vIe=O` ${wC} :host{--banner-height: calc( ((var(--design-unit) + 2) * var(--base-height-multiplier)) + (var(--design-unit) * var(--design-unit)) * 1px )}.banner{background-color: var(--neutral-layer-1);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}.content{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}`,yIe=EC,bIe=class extends DC{}.compose({baseName:`banner`,shadowOptions:yIe,styles:vIe,template:TC}),xIe=class extends AC{}.compose(Object.assign({baseName:`breadcrumb`,template:(e,t)=>OC(e,t),styles:(e,t)=>O` ${kC(e,t)}`,shadowOptions:void 0},{})),SIe=class extends NC{}.compose(Object.assign({baseName:`breadcrumb-item`,template:(e,t)=>jC(e,t),styles:(e,t)=>O` ${MC(e,t)} .listitem{color: var(--accent-foreground-rest)}.control{color: var(--neutral-foreground-rest)}.control:hover{color: var(--neutral-foreground-rest)}.separator{color: var(--neutral-stroke-rest);margin: 0 12px}.control:hover .content::before{background: var(--neutral-foreground-rest)}.control .start{width: calc(var(--base-height-multiplier) * 3px);height: calc(var(--base-height-multiplier) * 3px);display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);margin: 0 -4px 0 0}.control:hover .start{background: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}`,shadowOptions:void 0},PC)),CIe=class extends LC{}.compose(Object.assign({baseName:`button`,template:(e,t)=>FC(e,t),styles:U7,shadowOptions:RC},zC)),wIe=class extends HC{}.compose(Object.assign({baseName:`calendar`,template:(e,t)=>VC(e,t),styles:()=>O` ${BC()}`,shadowOptions:UC},WC)),TIe=class extends qC{}.compose(Object.assign({baseName:`card`,template:(e,t)=>GC(e,t),styles:(e,t)=>O` ${KC(e,t)} :host{background: var(--neutral-layer-card-container);color: ${H};border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));box-shadow: var(--card-box-shadow, none);border: var( --card-border, 1px solid var(--neutral-stroke-rest) );/** uses a token instead of #2E3339 value available in ux docs */ /* box-shadow and border-radius are being calculated at host level by using design-tokens */}::slotted(rapid-card){background: var(--neutral-layer-3)}`,shadowOptions:void 0},JC)),EIe=O` ${iw} .label{color: var(--neutral-foreground-hint)}.options{background: var(--neutral-layer-4)}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}`,DIe=T` ${aw(`rapid`)} `;var OIe=class extends sw{};let kIe=ow,AIe=OIe.compose(Object.assign({baseName:`categorized-multiselect`,template:DIe,styles:EIe,shadowOptions:void 0},kIe)),jIe=class extends uw{}.compose(Object.assign({baseName:`checkbox`,template:(e,t)=>cw(e,t),styles:(e,t)=>O` ${lw(e,t)} .checked-indicator{fill: contrast-color(var(--accent-fill-rest));box-shadow: 2px 1000px 1px rgb(0 0 0 / 20%) inset;border-radius: calc(var(--control-corner-radius) * 1px)}:host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{fill: var(--neutral-foreground-rest)}.label{padding-inline-start: calc(var(--design-unit) * 2px)}`,shadowOptions:void 0},dw)),MIe=class extends gw{}.compose(Object.assign({baseName:`combobox`,template:(e,t)=>pw(e,t),styles:(e,t)=>O` ${fw(e,t)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-width: 0}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.combo-box-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s}.selected-value{height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .combo-box-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:_w},vw)),NIe=class extends xw{}.compose({baseName:`connection-indicator`,template:bw,styles:(e,t)=>O` ${yw(e,t)} :host{--light-size: calc(var(--design-unit) * 3px);--red: var(--error-color);--trafic-light-red: color-mix(in srgb, var(--red), transparent 0%);--trafic-light-red-glow: color-mix(in srgb, var(--red), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--red), transparent 80%) 0 0 8px 8px;--green: var(--success-color);--trafic-light-green: color-mix(in srgb, var(--green), transparent 0%);--trafic-light-green-glow: color-mix(in srgb, var(--green), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--green), transparent 80%) 0 0 8px 8px}.light{margin: calc(var(--design-unit) * 4px)}.label{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);color: var(--neutral-stroke-rest)}`}),{defaultConfig:PIe,shadowOptions:FIe,styles:IIe,template:LIe}=H7(Sw),RIe=()=>Sw(),{defaultConfig:zIe,shadowOptions:BIe,styles:VIe,template:HIe}=H7(Cw),UIe=()=>Cw(),{defaultConfig:WIe,shadowOptions:GIe,styles:KIe,template:qIe}=H7(ww),JIe=()=>ww(),YIe=()=>O` ${Tw} :host{--primary-gradient-angle: -113.5deg;display: inline-block}.calendar-dropdown{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.input-icon-container{display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px)}.input-icon-container:hover{background-color: var(--neutral-fill-rest)}.date-toggle::part(end){margin-inline-end: calc(var(--design-unit) * 1px)}.date-toggle{margin-bottom: 0}.month-day{width: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px);height: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px)}.week-days span{font-size: var(--type-ramp-minus-2-font-size)}`,XIe=T` ${Dw(`rapid`)} `,ZIe=class extends zw{}.compose(Object.assign({baseName:`date-picker`,template:XIe,styles:YIe,shadowOptions:void 0},{}));var W7;(function(e){e.primary=`#11C9FC`,e.neutral=`#7C909B`,e.error=`#F9644D`,e.success=`#7ACC79`,e.warning=`#FFB660`,e.tertiary=`#7B2FBE`,e.info=`#11C9FC`,e.buy=`#7ACC79`,e.sell=`#F14376`,e.chartPink=`#fb8176`,e.longGreen=`#7acc79`,e.shortPink=`#f14376`,e.warningYellow=`#fcb35f`,e.green=`#44c14c`,e.lightGreen=`#69cd70`,e.red=`#ef4d28`,e.lightRed=`#ee6588`,e.dodgerBlue=`#33a9ff`,e.lightDodgerBlue=`#5cbaff`,e.violet=`#9b1e74`,e.lightViolet=`#b528af`,e.white=`#f9f9f9`,e.silver=`#c1c1c1`,e.salomie=`#ffdf94`,e.lightSalomie=`#ccb276`,e.melon=`#ffbbb2`,e.lightMelon=`#cc968e`,e.portage=`#8a99f5`,e.lightPortage=`#adb8f8`,e.ice=`#97f4eb`,e.lightIce=`#6befe2`})(W7||(W7={}));let{create:G7}=ci,K7=rs(W7.error),q7=ss.create(K7.r,K7.g,K7.b),J7=G7(`error-color`).withDefault(q7),Y7=rs(W7.success),X7=ss.create(Y7.r,Y7.g,Y7.b),Z7=G7(`success-color`).withDefault(X7),Q7=rs(W7.warning),$7=ss.create(Q7.r,Q7.g,Q7.b),e9=G7(`warning-color`).withDefault($7),t9=rs(W7.buy),n9=ss.create(t9.r,t9.g,t9.b),r9=G7(`buy-color`).withDefault(n9),i9=rs(W7.sell),a9=ss.create(i9.r,i9.g,i9.b),o9=G7(`sell-color`).withDefault(a9),s9=rs(W7.info),c9=ss.create(s9.r,s9.g,s9.b),l9=G7(`info-color`).withDefault(c9),u9=rs(W7.error),d9=ss.create(u9.r,u9.g,u9.b),f9=G7(`serious-notify-color`).withDefault(d9),{create:p9}=ci,m9=e=>ci.create({name:e,cssCustomPropertyName:null}),h9=ss.create(1,1,1),QIe=ss.create(0,0,0),g9=4.5;function $Ie(e,t,n,r,i,a,o,s,c){let l=e.source,u=t.closestIndexOf(n)>=Math.max(o,s,c)?-1:1,d=e.closestIndexOf(l),f=d+u*-1*r,p=f+u*i,m=f+u*a;return{rest:e.get(f),hover:e.get(d),active:e.get(p),focus:e.get(m)}}function eLe(e,t,n,r,i,a,o){let s=e.source,c=e.closestIndexOf(s),l=us(t)?-1:1,u=c+(l===1?Math.min(r,i):Math.max(l*r,l*i)),d=e.colorContrast(t,n,u,l),f=e.closestIndexOf(d),p=f+l*Math.abs(r-i),m=l===1?r<i:l*r>l*i,h=m?f:p,g=m?p:f;return{rest:e.get(h),hover:e.get(g),active:e.get(h+l*a),focus:e.get(h+l*o)}}function tLe(e,t){return e.contrast(h9)>=t?h9:QIe}function _9(e,t){let n=e,r=m9(`${n}-palette`).withDefault(e=>fs.from(t.getValueFor(e))),i=m9(`${n}-fill-rest-delta`).withDefault(0),a=m9(`${n}-fill-hover-delta`).withDefault(4),o=m9(`${n}-fill-active-delta`).withDefault(-5),s=m9(`${n}-fill-focus-delta`).withDefault(0),c=m9(`${n}-foreground-rest-delta`).withDefault(0),l=m9(`${n}-foreground-hover-delta`).withDefault(6),u=m9(`${n}-foreground-active-delta`).withDefault(-4),d=m9(`${n}-foreground-focus-delta`).withDefault(0),f=m9(`${n}-fill-recipe`).withDefault({evaluate:(e,t)=>$Ie(r.getValueFor(e),bc.getValueFor(e),t??Fc.getValueFor(e),a.getValueFor(e),o.getValueFor(e),s.getValueFor(e),Zs.getValueFor(e),Qs.getValueFor(e),$s.getValueFor(e))}),p=p9(`${n}-fill-rest`).withDefault(e=>f.getValueFor(e).evaluate(e).rest),m=p9(`${n}-fill-hover`).withDefault(e=>f.getValueFor(e).evaluate(e).hover),h=p9(`${n}-fill-active`).withDefault(e=>f.getValueFor(e).evaluate(e).active),g=p9(`${n}-fill-focus`).withDefault(e=>f.getValueFor(e).evaluate(e).focus),_=e=>(t,n)=>tLe(n??p.getValueFor(t),e),v=m9(`foreground-on-${n}-recipe`).withDefault({evaluate:(e,t)=>_(g9)(e,t)}),y=p9(`foreground-on-${n}-rest`).withDefault(e=>v.getValueFor(e).evaluate(e,p.getValueFor(e))),b=p9(`foreground-on-${n}-hover`).withDefault(e=>v.getValueFor(e).evaluate(e,m.getValueFor(e))),ee=p9(`foreground-on-${n}-active`).withDefault(e=>v.getValueFor(e).evaluate(e,h.getValueFor(e))),x=p9(`foreground-on-${n}-focus`).withDefault(e=>v.getValueFor(e).evaluate(e,g.getValueFor(e))),te=m9(`foreground-on-${n}-large-recipe`).withDefault({evaluate:(e,t)=>_(7)(e,t)}),ne=p9(`foreground-on-${n}-rest-large`).withDefault(e=>te.getValueFor(e).evaluate(e,p.getValueFor(e))),S=p9(`foreground-on-${n}-hover-large`).withDefault(e=>te.getValueFor(e).evaluate(e,m.getValueFor(e))),C=p9(`foreground-on-${n}-active-large`).withDefault(e=>te.getValueFor(e).evaluate(e,h.getValueFor(e))),w=p9(`foreground-on-${n}-focus-large`).withDefault(e=>te.getValueFor(e).evaluate(e,g.getValueFor(e))),re=m9(`${n}-foreground-recipe`).withDefault({evaluate:(e,t)=>eLe(r.getValueFor(e),t??Fc.getValueFor(e),g9,c.getValueFor(e),l.getValueFor(e),u.getValueFor(e),d.getValueFor(e))});return{palette:r,fillRestDelta:i,fillHoverDelta:a,fillActiveDelta:o,fillFocusDelta:s,foregroundRestDelta:c,foregroundHoverDelta:l,foregroundActiveDelta:u,foregroundFocusDelta:d,fillRecipe:f,fillRest:p,fillHover:m,fillActive:h,fillFocus:g,foregroundOnRecipe:v,foregroundOnRest:y,foregroundOnHover:b,foregroundOnActive:ee,foregroundOnFocus:x,foregroundOnLargeRecipe:te,foregroundOnRestLarge:ne,foregroundOnHoverLarge:S,foregroundOnActiveLarge:C,foregroundOnFocusLarge:w,foregroundRecipe:re,foregroundRest:p9(`${n}-foreground-rest`).withDefault(e=>re.getValueFor(e).evaluate(e).rest),foregroundHover:p9(`${n}-foreground-hover`).withDefault(e=>re.getValueFor(e).evaluate(e).hover),foregroundActive:p9(`${n}-foreground-active`).withDefault(e=>re.getValueFor(e).evaluate(e).active),foregroundFocus:p9(`${n}-foreground-focus`).withDefault(e=>re.getValueFor(e).evaluate(e).focus)}}let v9=rs(W7.green),y9=ss.create(v9.r,v9.g,v9.b),b9=ci.create(`secondary-color`).withDefault(y9),{palette:nLe,fillRestDelta:rLe,fillHoverDelta:iLe,fillActiveDelta:aLe,fillFocusDelta:oLe,foregroundRestDelta:sLe,foregroundHoverDelta:cLe,foregroundActiveDelta:lLe,foregroundFocusDelta:uLe,fillRecipe:dLe,fillRest:fLe,fillHover:pLe,fillActive:mLe,fillFocus:hLe,foregroundOnRecipe:gLe,foregroundOnRest:_Le,foregroundOnHover:vLe,foregroundOnActive:yLe,foregroundOnFocus:bLe,foregroundOnLargeRecipe:xLe,foregroundOnRestLarge:SLe,foregroundOnHoverLarge:CLe,foregroundOnActiveLarge:wLe,foregroundOnFocusLarge:TLe,foregroundRecipe:ELe,foregroundRest:DLe,foregroundHover:OLe,foregroundActive:kLe,foregroundFocus:ALe}=_9(`secondary`,b9),x9=rs(W7.tertiary),S9=ss.create(x9.r,x9.g,x9.b),C9=ci.create(`tertiary-color`).withDefault(S9),{palette:jLe,fillRestDelta:MLe,fillHoverDelta:NLe,fillActiveDelta:PLe,fillFocusDelta:FLe,foregroundRestDelta:ILe,foregroundHoverDelta:LLe,foregroundActiveDelta:RLe,foregroundFocusDelta:zLe,fillRecipe:BLe,fillRest:VLe,fillHover:HLe,fillActive:ULe,fillFocus:WLe,foregroundOnRecipe:GLe,foregroundOnRest:KLe,foregroundOnHover:qLe,foregroundOnActive:JLe,foregroundOnFocus:YLe,foregroundOnLargeRecipe:XLe,foregroundOnRestLarge:ZLe,foregroundOnHoverLarge:QLe,foregroundOnActiveLarge:$Le,foregroundOnFocusLarge:eRe,foregroundRecipe:tRe,foregroundRest:nRe,foregroundHover:rRe,foregroundActive:iRe,foregroundFocus:aRe}=_9(`tertiary`,C9),{palette:oRe,fillRestDelta:sRe,fillHoverDelta:cRe,fillActiveDelta:lRe,fillFocusDelta:uRe,foregroundRestDelta:dRe,foregroundHoverDelta:fRe,foregroundActiveDelta:pRe,foregroundFocusDelta:mRe,fillRecipe:hRe,fillRest:gRe,fillHover:_Re,fillActive:vRe,fillFocus:yRe,foregroundOnRecipe:bRe,foregroundOnRest:xRe,foregroundOnHover:SRe,foregroundOnActive:CRe,foregroundOnFocus:wRe,foregroundOnLargeRecipe:TRe,foregroundOnRestLarge:ERe,foregroundOnHoverLarge:DRe,foregroundOnActiveLarge:ORe,foregroundOnFocusLarge:kRe,foregroundRecipe:ARe,foregroundRest:jRe,foregroundHover:MRe,foregroundActive:NRe,foregroundFocus:PRe}=_9(`error`,J7),{palette:FRe,fillRestDelta:IRe,fillHoverDelta:LRe,fillActiveDelta:RRe,fillFocusDelta:zRe,foregroundRestDelta:BRe,foregroundHoverDelta:VRe,foregroundActiveDelta:HRe,foregroundFocusDelta:URe,fillRecipe:WRe,fillRest:GRe,fillHover:KRe,fillActive:qRe,fillFocus:JRe,foregroundOnRecipe:YRe,foregroundOnRest:XRe,foregroundOnHover:ZRe,foregroundOnActive:QRe,foregroundOnFocus:$Re,foregroundOnLargeRecipe:eze,foregroundOnRestLarge:tze,foregroundOnHoverLarge:nze,foregroundOnActiveLarge:rze,foregroundOnFocusLarge:ize,foregroundRecipe:aze,foregroundRest:oze,foregroundHover:sze,foregroundActive:cze,foregroundFocus:lze}=_9(`success`,Z7),{palette:uze,fillRestDelta:dze,fillHoverDelta:fze,fillActiveDelta:pze,fillFocusDelta:mze,foregroundRestDelta:hze,foregroundHoverDelta:gze,foregroundActiveDelta:_ze,foregroundFocusDelta:vze,fillRecipe:yze,fillRest:bze,fillHover:xze,fillActive:Sze,fillFocus:Cze,foregroundOnRecipe:wze,foregroundOnRest:Tze,foregroundOnHover:Eze,foregroundOnActive:Dze,foregroundOnFocus:Oze,foregroundOnLargeRecipe:kze,foregroundOnRestLarge:Aze,foregroundOnHoverLarge:jze,foregroundOnActiveLarge:Mze,foregroundOnFocusLarge:Nze,foregroundRecipe:Pze,foregroundRest:Fze,foregroundHover:Ize,foregroundActive:Lze,foregroundFocus:Rze}=_9(`warning`,e9);var w9=/* @__PURE__ */ c({accentFillActive:()=>Bc,accentFillActiveDelta:()=>Gs,accentFillFocus:()=>Vc,accentFillFocusDelta:()=>Ks,accentFillHover:()=>zc,accentFillHoverDelta:()=>Ws,accentFillRest:()=>Rc,accentFillRestDelta:()=>Us,accentForegroundActive:()=>rl,accentForegroundActiveDelta:()=>Ys,accentForegroundFocus:()=>il,accentForegroundFocusDelta:()=>Xs,accentForegroundHover:()=>nl,accentForegroundHoverDelta:()=>Js,accentForegroundRest:()=>tl,accentForegroundRestDelta:()=>qs,accentPalette:()=>Sc,baseHeightMultiplier:()=>ys,baseLayerLuminance:()=>bs,bodyFont:()=>vs,buyColor:()=>r9,controlCornerRadius:()=>z,defaultBuyColor:()=>n9,defaultErrorColor:()=>q7,defaultInfoColor:()=>c9,defaultSecondaryColor:()=>y9,defaultSellColor:()=>a9,defaultSeriousNotifyColor:()=>d9,defaultSuccessColor:()=>X7,defaultTertiaryColor:()=>S9,defaultWarningColor:()=>$7,density:()=>xs,designUnit:()=>B,direction:()=>Ss,disabledOpacity:()=>Cs,errorColor:()=>J7,errorFillActive:()=>vRe,errorFillActiveDelta:()=>lRe,errorFillFocus:()=>yRe,errorFillFocusDelta:()=>uRe,errorFillHover:()=>_Re,errorFillHoverDelta:()=>cRe,errorFillRecipe:()=>hRe,errorFillRest:()=>gRe,errorFillRestDelta:()=>sRe,errorForegroundActive:()=>NRe,errorForegroundActiveDelta:()=>pRe,errorForegroundFocus:()=>PRe,errorForegroundFocusDelta:()=>mRe,errorForegroundHover:()=>MRe,errorForegroundHoverDelta:()=>fRe,errorForegroundRecipe:()=>ARe,errorForegroundRest:()=>jRe,errorForegroundRestDelta:()=>dRe,errorPalette:()=>oRe,fillColor:()=>Fc,focusStrokeInner:()=>kl,focusStrokeOuter:()=>Ol,focusStrokeWidth:()=>ws,foregroundOnAccentActive:()=>Kc,foregroundOnAccentActiveLarge:()=>Zc,foregroundOnAccentFocus:()=>qc,foregroundOnAccentFocusLarge:()=>Qc,foregroundOnAccentHover:()=>Gc,foregroundOnAccentHoverLarge:()=>Xc,foregroundOnAccentRest:()=>Wc,foregroundOnAccentRestLarge:()=>Yc,foregroundOnErrorActive:()=>CRe,foregroundOnErrorActiveLarge:()=>ORe,foregroundOnErrorFocus:()=>wRe,foregroundOnErrorFocusLarge:()=>kRe,foregroundOnErrorHover:()=>SRe,foregroundOnErrorHoverLarge:()=>DRe,foregroundOnErrorLargeRecipe:()=>TRe,foregroundOnErrorRecipe:()=>bRe,foregroundOnErrorRest:()=>xRe,foregroundOnErrorRestLarge:()=>ERe,foregroundOnSecondaryActive:()=>yLe,foregroundOnSecondaryActiveLarge:()=>wLe,foregroundOnSecondaryFocus:()=>bLe,foregroundOnSecondaryFocusLarge:()=>TLe,foregroundOnSecondaryHover:()=>vLe,foregroundOnSecondaryHoverLarge:()=>CLe,foregroundOnSecondaryLargeRecipe:()=>xLe,foregroundOnSecondaryRecipe:()=>gLe,foregroundOnSecondaryRest:()=>_Le,foregroundOnSecondaryRestLarge:()=>SLe,foregroundOnSuccessActive:()=>QRe,foregroundOnSuccessActiveLarge:()=>rze,foregroundOnSuccessFocus:()=>$Re,foregroundOnSuccessFocusLarge:()=>ize,foregroundOnSuccessHover:()=>ZRe,foregroundOnSuccessHoverLarge:()=>nze,foregroundOnSuccessLargeRecipe:()=>eze,foregroundOnSuccessRecipe:()=>YRe,foregroundOnSuccessRest:()=>XRe,foregroundOnSuccessRestLarge:()=>tze,foregroundOnTertiaryActive:()=>JLe,foregroundOnTertiaryActiveLarge:()=>$Le,foregroundOnTertiaryFocus:()=>YLe,foregroundOnTertiaryFocusLarge:()=>eRe,foregroundOnTertiaryHover:()=>qLe,foregroundOnTertiaryHoverLarge:()=>QLe,foregroundOnTertiaryLargeRecipe:()=>XLe,foregroundOnTertiaryRecipe:()=>GLe,foregroundOnTertiaryRest:()=>KLe,foregroundOnTertiaryRestLarge:()=>ZLe,foregroundOnWarningActive:()=>Dze,foregroundOnWarningActiveLarge:()=>Mze,foregroundOnWarningFocus:()=>Oze,foregroundOnWarningFocusLarge:()=>Nze,foregroundOnWarningHover:()=>Eze,foregroundOnWarningHoverLarge:()=>jze,foregroundOnWarningLargeRecipe:()=>kze,foregroundOnWarningRecipe:()=>wze,foregroundOnWarningRest:()=>Tze,foregroundOnWarningRestLarge:()=>Aze,infoColor:()=>l9,neutralFillActive:()=>cl,neutralFillActiveDelta:()=>$s,neutralFillFocus:()=>ll,neutralFillFocusDelta:()=>ec,neutralFillHover:()=>sl,neutralFillHoverDelta:()=>Qs,neutralFillInputActive:()=>pl,neutralFillInputActiveDelta:()=>rc,neutralFillInputFocus:()=>ml,neutralFillInputFocusDelta:()=>ic,neutralFillInputHover:()=>fl,neutralFillInputHoverDelta:()=>nc,neutralFillInputRest:()=>dl,neutralFillInputRestDelta:()=>tc,neutralFillLayerRest:()=>El,neutralFillLayerRestDelta:()=>pc,neutralFillRest:()=>ol,neutralFillRestDelta:()=>Zs,neutralFillStealthActive:()=>vl,neutralFillStealthActiveDelta:()=>sc,neutralFillStealthFocus:()=>yl,neutralFillStealthFocusDelta:()=>cc,neutralFillStealthHover:()=>_l,neutralFillStealthHoverDelta:()=>oc,neutralFillStealthRest:()=>gl,neutralFillStealthRestDelta:()=>ac,neutralFillStrongActive:()=>Cl,neutralFillStrongActiveDelta:()=>dc,neutralFillStrongFocus:()=>wl,neutralFillStrongFocusDelta:()=>fc,neutralFillStrongHover:()=>Sl,neutralFillStrongHoverDelta:()=>uc,neutralFillStrongRest:()=>xl,neutralFillStrongRestDelta:()=>lc,neutralForegroundHint:()=>Al,neutralForegroundRest:()=>H,neutralLayer1:()=>Oc,neutralLayer2:()=>Ac,neutralLayer3:()=>Mc,neutralLayer4:()=>Pc,neutralLayerCardContainer:()=>wc,neutralLayerFloating:()=>Ec,neutralPalette:()=>bc,neutralStrokeActive:()=>Pl,neutralStrokeActiveDelta:()=>gc,neutralStrokeDividerRest:()=>Il,neutralStrokeDividerRestDelta:()=>vc,neutralStrokeFocus:()=>Fl,neutralStrokeFocusDelta:()=>_c,neutralStrokeHover:()=>Nl,neutralStrokeHoverDelta:()=>hc,neutralStrokeRest:()=>Ml,neutralStrokeRestDelta:()=>mc,secondaryColor:()=>b9,secondaryFillActive:()=>mLe,secondaryFillActiveDelta:()=>aLe,secondaryFillFocus:()=>hLe,secondaryFillFocusDelta:()=>oLe,secondaryFillHover:()=>pLe,secondaryFillHoverDelta:()=>iLe,secondaryFillRecipe:()=>dLe,secondaryFillRest:()=>fLe,secondaryFillRestDelta:()=>rLe,secondaryForegroundActive:()=>kLe,secondaryForegroundActiveDelta:()=>lLe,secondaryForegroundFocus:()=>ALe,secondaryForegroundFocusDelta:()=>uLe,secondaryForegroundHover:()=>OLe,secondaryForegroundHoverDelta:()=>cLe,secondaryForegroundRecipe:()=>ELe,secondaryForegroundRest:()=>DLe,secondaryForegroundRestDelta:()=>sLe,secondaryPalette:()=>nLe,sellColor:()=>o9,seriousNotifyColor:()=>f9,strokeWidth:()=>V,successColor:()=>Z7,successFillActive:()=>qRe,successFillActiveDelta:()=>RRe,successFillFocus:()=>JRe,successFillFocusDelta:()=>zRe,successFillHover:()=>KRe,successFillHoverDelta:()=>LRe,successFillRecipe:()=>WRe,successFillRest:()=>GRe,successFillRestDelta:()=>IRe,successForegroundActive:()=>cze,successForegroundActiveDelta:()=>HRe,successForegroundFocus:()=>lze,successForegroundFocusDelta:()=>URe,successForegroundHover:()=>sze,successForegroundHoverDelta:()=>VRe,successForegroundRecipe:()=>aze,successForegroundRest:()=>oze,successForegroundRestDelta:()=>BRe,successPalette:()=>FRe,tertiaryColor:()=>C9,tertiaryFillActive:()=>ULe,tertiaryFillActiveDelta:()=>PLe,tertiaryFillFocus:()=>WLe,tertiaryFillFocusDelta:()=>FLe,tertiaryFillHover:()=>HLe,tertiaryFillHoverDelta:()=>NLe,tertiaryFillRecipe:()=>BLe,tertiaryFillRest:()=>VLe,tertiaryFillRestDelta:()=>MLe,tertiaryForegroundActive:()=>iRe,tertiaryForegroundActiveDelta:()=>RLe,tertiaryForegroundFocus:()=>aRe,tertiaryForegroundFocusDelta:()=>zLe,tertiaryForegroundHover:()=>rRe,tertiaryForegroundHoverDelta:()=>LLe,tertiaryForegroundRecipe:()=>tRe,tertiaryForegroundRest:()=>nRe,tertiaryForegroundRestDelta:()=>ILe,tertiaryPalette:()=>jLe,typeRampBaseFontSize:()=>Ts,typeRampBaseLineHeight:()=>Es,typeRampMinus1FontSize:()=>Ds,typeRampMinus1LineHeight:()=>Os,typeRampMinus2FontSize:()=>ks,typeRampMinus2LineHeight:()=>As,typeRampPlus1FontSize:()=>js,typeRampPlus1LineHeight:()=>Ms,typeRampPlus2FontSize:()=>Ns,typeRampPlus2LineHeight:()=>Ps,typeRampPlus3FontSize:()=>Fs,typeRampPlus3LineHeight:()=>Is,typeRampPlus4FontSize:()=>Ls,typeRampPlus4LineHeight:()=>Rs,typeRampPlus5FontSize:()=>zs,typeRampPlus5LineHeight:()=>Bs,typeRampPlus6FontSize:()=>Vs,typeRampPlus6LineHeight:()=>Hs,warningColor:()=>e9,warningFillActive:()=>Sze,warningFillActiveDelta:()=>pze,warningFillFocus:()=>Cze,warningFillFocusDelta:()=>mze,warningFillHover:()=>xze,warningFillHoverDelta:()=>fze,warningFillRecipe:()=>yze,warningFillRest:()=>bze,warningFillRestDelta:()=>dze,warningForegroundActive:()=>Lze,warningForegroundActiveDelta:()=>_ze,warningForegroundFocus:()=>Rze,warningForegroundFocusDelta:()=>vze,warningForegroundHover:()=>Ize,warningForegroundHoverDelta:()=>gze,warningForegroundRecipe:()=>Pze,warningForegroundRest:()=>Fze,warningForegroundRestDelta:()=>hze,warningPalette:()=>uze});let T9=Ww(W7.primary),E9=Ww(W7.neutral),D9=Ww(W7.green),O9=Ww(W7.tertiary),k9=Ww(W7.error),A9=Ww(W7.success),j9=Ww(W7.warning),M9=gs.DarkMode,zze=Fn.ltr,N9=`"Segoe UI", Arial, Helvetica, sans-serif`,P9=`14px`,F9=`20px`,Bze={design_tokens:{color:{accent:{$value:T9.source.toColorString(),$type:`color`},neutral:{$value:E9.source.toColorString(),$type:`color`},secondary:{$value:D9.source.toColorString(),$type:`color`},tertiary:{$value:O9.source.toColorString(),$type:`color`},error:{$value:k9.source.toColorString(),$type:`color`},success:{$value:A9.source.toColorString(),$type:`color`},warning:{$value:j9.source.toColorString(),$type:`color`}},fontFamily:{bodyFont:{$value:N9,$type:`fontFamily`}},typography:{baseFontSize:{$value:P9,$type:`dimension`},baseLineHeight:{$value:F9,$type:`dimension`}},mode:{luminance:{$value:M9,$type:`number`}},style:{density:{$value:0,$type:`number`},baseHeightMultiplier:{$value:10,$type:`number`},borderRadius:{$value:4,$type:`number`},strokeWidth:{$value:1,$type:`number`}},space:{designUnit:{$value:4,$type:`number`}}}};var I9=/* @__PURE__ */ c({accentFillActiveDeltaValue:()=>-5,accentFillFocusDeltaValue:()=>0,accentFillHoverDeltaValue:()=>4,accentFillRestDeltaValue:()=>0,accentForegroundActiveDeltaValue:()=>-4,accentForegroundFocusDeltaValue:()=>0,accentForegroundHoverDeltaValue:()=>6,accentForegroundRestDeltaValue:()=>0,accentPaletteValue:()=>T9,baseHeightMultiplierValue:()=>10,baseLayerLuminanceValue:()=>M9,bodyFontValue:()=>N9,controlCornerRadiusValue:()=>4,densityValue:()=>0,designTokens:()=>Bze,designUnitValue:()=>4,directionValue:()=>zze,disabledOpacityValue:()=>.3,errorPaletteValue:()=>k9,focusStrokeWidthValue:()=>2,neutralFillActiveDeltaValue:()=>5,neutralFillFocusDeltaValue:()=>0,neutralFillHoverDeltaValue:()=>10,neutralFillInputActiveDeltaValue:()=>0,neutralFillInputFocusDeltaValue:()=>10,neutralFillInputHoverDeltaValue:()=>5,neutralFillInputRestDeltaValue:()=>0,neutralFillLayerRestDeltaValue:()=>3,neutralFillRestDeltaValue:()=>7,neutralFillStealthActiveDeltaValue:()=>3,neutralFillStealthFocusDeltaValue:()=>0,neutralFillStealthHoverDeltaValue:()=>5,neutralFillStealthRestDeltaValue:()=>0,neutralFillStrongActiveDeltaValue:()=>-5,neutralFillStrongFocusDeltaValue:()=>0,neutralFillStrongHoverDeltaValue:()=>8,neutralFillStrongRestDeltaValue:()=>0,neutralPaletteValue:()=>E9,neutralStrokeActiveDeltaValue:()=>16,neutralStrokeDividerRestDeltaValue:()=>8,neutralStrokeFocusDeltaValue:()=>25,neutralStrokeHoverDeltaValue:()=>40,neutralStrokeRestDeltaValue:()=>25,prefix:()=>`rapid`,secondaryPaletteValue:()=>D9,strokeWidthValue:()=>1,successPaletteValue:()=>A9,tertiaryPaletteValue:()=>O9,typeRampBaseFontSizeValue:()=>P9,typeRampBaseLineHeightValue:()=>F9,typeRampMinus1FontSizeValue:()=>`13px`,typeRampMinus1LineHeightValue:()=>`19px`,typeRampMinus2FontSizeValue:()=>`12px`,typeRampMinus2LineHeightValue:()=>`18px`,typeRampPlus1FontSizeValue:()=>`15px`,typeRampPlus1LineHeightValue:()=>`21px`,typeRampPlus2FontSizeValue:()=>`16px`,typeRampPlus2LineHeightValue:()=>`22px`,typeRampPlus3FontSizeValue:()=>`17px`,typeRampPlus3LineHeightValue:()=>`23px`,typeRampPlus4FontSizeValue:()=>`18px`,typeRampPlus4LineHeightValue:()=>`24px`,typeRampPlus5FontSizeValue:()=>`19px`,typeRampPlus5LineHeightValue:()=>`25px`,typeRampPlus6FontSizeValue:()=>`20px`,typeRampPlus6LineHeightValue:()=>`26px`,warningPaletteValue:()=>j9});let Vze=class extends K{constructor(){super(),Vw(w9,I9,this)}}.compose({baseName:`design-system-provider`,template:T`<slot></slot>`}),L9=O` ${F1} :host{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}dialog{position: var(--dialog-position, fixed);top: 0;bottom: 0;border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest));text-align: left;line-height: normal;box-shadow: 0 2px 15px 0 rgb(0 0 0 / 35%);background-color: var(--dialog-background, var(--neutral-layer-1))}.top{display: flex;align-items: center;justify-content: space-between;color: var(--neutral-foreground-rest);margin-bottom: calc(var(--design-unit) * 2px);font-weight: 500}.bottom{display: flex;flex-wrap: wrap;justify-content: flex-end;color: var(--neutral-foreground-rest);gap: calc(var(--design-unit) * 2px)}:host slot:first-of-type{color: ${H}}::slotted(rapid-button){margin-top: calc(var(--design-unit) * 4px - 1px)}slot[name='top']::slotted(*){margin: 0;font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-hint);font-weight: 700}.content-wrapper{min-width: var(--dialog-min-width);min-height: var(--dialog-min-height);height: fit-content;width: fit-content;max-width: var(--dialog-max-width);max-height: var(--dialog-max-height);display: flex;flex-direction: column;justify-content: space-between;align-items: stretch}.close-icon:hover svg{background-color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}.close-icon svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%)}.close-icon:hover svg g path{fill: var(--neutral-foreground-rest)}.close-icon:active svg{background-color: var(--neutral-layer-4)}.close-icon:active svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 67%)}.header-controls{rapid-button{--base-height-multiplier: 8}rapid-button::part(control){padding: 0 calc((8 + var(--design-unit) * 1 * var(--density)) * 1px)}}`,Hze=Z1,Uze=L1,Wze=X1,Gze=class extends $1{}.compose(Object.assign({baseName:`dialog`,shadowOptions:Wze,styles:L9,template:Uze},Hze)),Kze=class extends n0{}.compose(Object.assign({baseName:`disclosure`,template:(e,t)=>e0(e,t),styles:(e,t)=>O` ${t0(e,t)} :host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}:host([appearance='accent']) .invoker{padding: calc((10 + (var(--design-unit) * 2 * var(--density))) * 1px)}#disclosure-content{padding: 0 calc(var(--design-unit) * 4px) calc(var(--design-unit) * 4px);text-align: center}`,shadowOptions:X1},r0)),qze=class extends o0{}.compose(Object.assign({baseName:`divider`,template:(e,t)=>i0(e,t),styles:(e,t)=>O` ${a0(e,t)}`,shadowOptions:void 0},s0)),Jze=class extends d0{}.compose({baseName:`dropdown-menu`,styles:(e,t)=>O` ${c0(`rapid`,e,t)} .actions-menu{border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);gap: 0;margin: calc(var(--design-unit) * 1px) 0}rapid-menu{margin: 0 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * -2px);border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}`,template:u0}),Yze=O` ${f0}`,Xze=class extends v0{}.compose({baseName:`environment-indicator`,styles:Yze,template:p0}),{defaultConfig:Zze,shadowOptions:Qze,styles:$ze,template:eBe}=H7(E0),tBe=()=>E0(),nBe=P0,rBe=I0.compose({baseName:`file-reader`,styles:nBe,template:F0}),iBe=O` ${L0} ::-webkit-scrollbar{width: calc(var(--design-unit) * 3px)}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-fill-rest);border: calc(var(--stroke-width) * 3px) solid var(--neutral-layer-4)}:host::part(select-file-button), :host::part(upload-file-button){margin: 0 0 calc(var(--design-unit) * 2px) calc(var(--design-unit) * 2px)}`,aBe=T` ${R0(`rapid`)} `,oBe=B0,sBe=class extends z0{}.compose(Object.assign({baseName:`file-upload`,shadowOptions:void 0,styles:iBe,template:aBe},oBe)),cBe=(e,t)=>O` ${V0} .filter-wrapper{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.close-icon{border: calc(var(--stroke-width) * 1px) solid transparent}.close-icon:hover{border-color: var(--error-color);background: color-mix(in srgb, var(--error-color), transparent 75%)}.close-icon:hover svg path{fill: var(--error-color)}rapid-select{margin-bottom: calc(var(--design-unit) * 2px)}.flex-row rapid-text-field, .flex-row rapid-select{flex: 1}`,lBe=T` ${W0(`rapid`)} `,uBe=class extends K0{}.compose({baseName:`filter`,template:lBe,styles:cBe}),dBe=(e,t)=>O` ${q0(e,t)} .toggle, .toggle-collapsed{background: var(--neutral-layer-4);color: var(--neutral-foreground-hint)}.toggle{border-top: calc(var(--stroke-width) * 2px) solid}.toggle:hover, .toggle-collapsed:hover{color: var(--accent-foreground-rest)}.filter-bar{background: var(--neutral-layer-3)}`,fBe=T` ${J0(`rapid`)} `,pBe=class extends Y0{}.compose({baseName:`filter-bar`,template:fBe,styles:dBe}),{defaultConfig:mBe,shadowOptions:hBe,styles:gBe,template:_Be}=H7(Q0),vBe=()=>Q0(),yBe=class extends t2{}.compose(Object.assign({baseName:`flipper`,template:(e,t)=>$0(e,t),styles:(e,t)=>O` ${e2(e,t)} :host{color: var(--neutral-foreground-rest)}:host(:hover){color: var(--neutral-foreground-rest)}:host::before{background: color-mix(in srgb, var(--accent-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest);color: var(--neutral-foreground-rest)}:host(:hover)::before{background: var(--accent-fill-rest);color: var(--neutral-foreground-rest)}`,shadowOptions:void 0},n2)),bBe=O` ${r2} div.flyout{background-color: var(--neutral-layer-1);border-color: var(--neutral-stroke-rest);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}div.background{padding: calc(var(--design-unit) * 4px) 0}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}:host([position='left']) div.flyout{border-right-style: solid;border-right-width: calc(var(--stroke-width) * 1px)}:host([position='right']) div.flyout{border-left-style: solid;border-left-width: calc(var(--stroke-width) * 1px)}div.exit{cursor: pointer;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);display: flex;justify-content: center;align-items: center}div.content, div.footer{padding: 0 0 calc(var(--design-unit) * 2px)}div.exit:hover{background-color: var(--neutral-fill-hover);border-radius: calc(var(--stroke-width) * 3px)}`,xBe=T` ${i2(`rapid`)} `,SBe=o2,CBe=class extends a2{}.compose(Object.assign({baseName:`flyout`,shadowOptions:void 0,styles:bBe,template:xBe},SBe)),{defaultConfig:wBe,shadowOptions:TBe,styles:EBe,template:DBe}=H7(u2),OBe=()=>u2(),{defaultConfig:kBe,shadowOptions:ABe,styles:jBe,template:MBe}=H7(f2),NBe=()=>f2(),PBe=(e,t)=>O` ${m2(e,t)}`,FBe=(e,t)=>p2(e,t);var IBe=class extends h2{};let LBe={nextFlipper:T`<rapid-flipper @click="${e=>e.scrollToNext()}" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`,previousFlipper:T`<rapid-flipper @click="${e=>e.scrollToPrevious()}" direction="previous" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`},RBe=IBe.compose(Object.assign({baseName:`horizontal-scroll`,template:FBe,styles:PBe,shadowOptions:g2},LBe)),zBe=(e,t)=>O` ${_2(e,t)}`,BBe=T` ${v2(`rapid`)} `;var VBe=class extends S2{};let HBe=b2,UBe=y2,WBe=VBe.compose(Object.assign({baseName:`icon`,template:BBe,styles:zBe,shadowOptions:UBe},HBe)),GBe=class extends T2{}.compose(Object.assign({baseName:`listbox`,template:(e,t)=>C2(e,t),styles:(e,t)=>O` ${w2(e,t)} :host{padding: 0;max-width: 300px;/** if removed max-width will be fit-content */}::slotted(*:last-child){border-bottom: none}`,shadowOptions:void 0},E2)),KBe=class extends k2{}.compose(Object.assign({baseName:`option`,template:(e,t)=>D2(e,t),styles:(e,t)=>O` ${O2(e,t)} :host{border-radius: 0;padding: 0 calc(var(--design-unit) * 4px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host(.selected), :host(:not([disabled])[aria-selected='true']:active), :host(:not([disabled])[aria-selected='true']:hover){background: var(--neutral-layer-2);color: var(--accent-fill-rest);font-weight: 500}`,shadowOptions:void 0},A2)),qBe=class extends N2{}.compose(Object.assign({baseName:`menu`,template:(e,t)=>j2(e,t),styles:(e,t)=>O` ${M2(e,t)} :host{border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${_l}, transparent 15%);padding: 0}`,shadowOptions:void 0},P2)),JBe=class extends L2{}.compose(Object.assign({baseName:`menu-item`,template:(e,t)=>F2(e,t),styles:(e,t)=>O` ${I2(e,t)} :host{margin: 0;--control-corner-radius: 0;background: var(--neutral-fill-stealth-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:hover){background: color-mix(in srgb, ${_l}, transparent 15%);border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${_l}, transparent 15%)}:host(:focus){background: var(--neutral-fill-stealth-hover)}:host(.indent-0){border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}/* UX team wants border: solid 1px #2E3339;background: #2E3339 */ /* tokens being used by fast background: ${_l} color: ${H} */`,shadowOptions:void 0},R2)),YBe=O` ${L9}`,XBe=V2,ZBe=z2,QBe=B2,$Be=class extends H2{}.compose(Object.assign({baseName:`modal`,shadowOptions:QBe,styles:YBe,template:ZBe},XBe)),eVe=O` ${ZC} .root{min-width: 0}.control{height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-height: 0;outline: none;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font);box-sizing: border-box}:host(:focus-within:not([disabled])) .control{outline: none;border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}.control:hover:not(:focus):not([disabled]){outline: none;border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}#display-field{min-height: unset;padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px);font-family: var(--body-font), sans-serif;font-size: var(--type-ramp-base-font-size);background-color: transparent}#display-field:focus{outline: none;background: unset}#display-field:hover:not(:focus):not([disabled]){outline: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);left: calc( 100% - ((var(--base-height-multiplier) * (var(--design-unit) - 1)) + (var(--design-unit) - 2)) * 1px );background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}#arrow-icon{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);fill: var(--neutral-foreground-rest)}.label{color: var(--neutral-foreground-hint)}.options{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);overflow-x: hidden}rapid-checkbox{border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);padding: calc((var(--design-unit) + 1) * 1px) 0 calc((var(--design-unit) + 1) * 1px) calc((var(--design-unit) + 1) * 1px);margin: 0}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}rapid-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}rapid-checkbox[disabled]{cursor: not-allowed}`,tVe=T` ${tw(`rapid`)} `;var nVe=class extends rw{};let rVe=nw,iVe=nVe.compose(Object.assign({baseName:`multiselect`,template:tVe,styles:eVe,shadowOptions:void 0},rVe)),aVe=class extends S7{}.compose({baseName:`notification-listener`,template:x7,shadowOptions:{mode:`open`,delegatesFocus:!0}}),oVe=(e,t)=>O` :host{flex: 1 1 auto;box-sizing: border-box}:host([disabled]){opacity: var(--disabled-opacity);cursor: not-allowed}:host .control{height: 100%;width: 100%;border: none;background-color: transparent;padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);font-family: var(--body-font)}:host .root{display: flex;box-sizing: border-box;position: relative;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:focus-within:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{display: block;color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0;font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.label-hidden{margin: 0}.controls{position: absolute;right: 3px;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center;flex-direction: column;cursor: pointer}.step-down, .step-up{width: 1em;height: 1em;margin: -2px}.step-up-glyph, .step-down-glyph{fill: var(--neutral-foreground-hint)}.control:focus-visible{outline: none}:host .control-field .control{width: 100%}${N0}`;var sVe=class extends a4{};let cVe=s4,lVe=U2,uVe=o4,dVe=sVe.compose(Object.assign({baseName:`number-field`,template:lVe,styles:oVe,shadowOptions:uVe},cVe)),fVe=class extends u4{}.compose({baseName:`optgroup`,template:(e,t)=>l4(e,t),styles:(e,t)=>O` ${c4(e,t)}`}),pVe=class extends _4{}.compose(Object.assign({baseName:`system-health-overlay`,template:v4,styles:y4,shadowOptions:void 0},b4)),mVe=O` ${x4} :host{--pill-fill: ${ol};--pill-fill-hover: ${sl};--pill-foreground: ${H}}`,hVe=S4,gVe=class extends w4{}.compose(Object.assign({baseName:`pill`,template:hVe,styles:mVe,shadowOptions:void 0},C4)),_Ve=class extends p4{}.compose(Object.assign({baseName:`progress`,template:(e,t)=>d4(e,t),styles:(e,t)=>O` ${f4(e,t)}`,shadowOptions:void 0},m4)),vVe=class extends w3{}.compose(Object.assign({baseName:`progress-ring`,template:(e,t)=>S3(e,t),styles:(e,t)=>O` ${C3(e,t)}`,shadowOptions:void 0},T3)),yVe=class extends O3{}.compose(Object.assign({baseName:`radio`,template:(e,t)=>E3(e,t),styles:(e,t)=>O` ${D3(e,t)} :host{margin: 0}:host .control{background: transparent}:host([aria-checked='true']) .control{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host .label{padding-inline-start: calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:hover{background: transparent}:host([aria-checked='true']:not([disabled])) .control:hover{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-hover)}.checked-indicator, :host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:void 0},k3)),bVe=class extends M3{}.compose(Object.assign({baseName:`radio-group`,template:(e,t)=>A3(e,t),styles:(e,t)=>O` ${j3(e,t)}`,shadowOptions:void 0},N3)),xVe=O` ${P3} :host{font-family: var(--body-font)}`,SVe=T` ${F3(`rapid`)} `,CVe=class extends I3{}.compose(Object.assign({baseName:`scheduler`,template:SVe,styles:xVe,shadowOptions:void 0},L3)),wVe=O` ${K3} :host{font-family: var(--body-font)}`,TVe=T` ${r6(`rapid`)} `,EVe=class extends i6{}.compose(Object.assign({baseName:`scheduler-cron-builder`,template:TVe,styles:wVe,shadowOptions:void 0},a6)),DVe=O` ${o6} :host{font-family: var(--body-font)}`,OVe=T` ${s6(`rapid`)} `,kVe=class extends c6{}.compose(Object.assign({baseName:`scheduler-timezone`,template:OVe,styles:DVe,shadowOptions:void 0},l6)),AVe=O` ${u6}`,jVe=T` ${d6(`rapid`)} `,MVe=class extends f6{}.compose(Object.assign({baseName:`search-bar`,template:jVe,styles:AVe,shadowOptions:void 0},p6)),NVe=class extends g6{}.compose(Object.assign({baseName:`search-bar-combobox`,template:(e,t)=>h6(e,t),styles:(e,t)=>O` ${m6(e,t)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--neutral-stroke-rest));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}`,shadowOptions:_6},v6)),PVe=class extends T6{}.compose(Object.assign({baseName:`section-navigator`,template:b6,styles:(e,t)=>y6,shadowOptions:E6},D6)),FVe=class extends A6{}.compose(Object.assign({baseName:`segmented-control`,template:(e,t)=>O6(e,t),styles:(e,t)=>O` ${k6(e,t)} :host{font-family: var(--body-font);margin: 0}:host ::slotted(*){transition: color 0.4s ease 0s}:host ::slotted(label){color: var(--neutral-foreground-rest)}:host ::slotted(rapid-segmented-item:first-of-type){border-radius: calc(var(--control-corner-radius) * 1px) 0 0 calc(var(--control-corner-radius) * 1px);border-right-width: 0}:host ::slotted(rapid-segmented-item:last-of-type){border-radius: 0 calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0;border-left-width: 0}:host ::slotted(rapid-segmented-item:only-of-type){border-radius: calc(var(--control-corner-radius) * 1px);border-left-width: 1px;border-right-width: 1px}:host ::slotted(*[aria-checked='true']){background: var(--neutral-fill-rest);box-shadow: none;color: var(--neutral-foreground-rest)}:host([appearance='primary']) ::slotted(*[aria-checked='true']){background: var(--accent-fill-rest);border-color: transparent;box-shadow: none;color: var(--foreground-on-accent-rest)}`,shadowOptions:void 0},{})),IVe=class extends O3{}.compose(Object.assign({baseName:`segmented-item`,template:(e,t)=>j6(e,t),styles:(e,t)=>O` ${M6(e,t)} :host{color: var(--neutral-fill-strong-rest);font-size: var(--type-ramp-minus-2-font-size);font-weight: 500;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);box-sizing: border-box;height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin: 0}:host([aria-checked='true']){color: color-mix(in srgb, white, transparent 10%)}`,shadowOptions:void 0},{})),LVe=class extends F6{}.compose(Object.assign({baseName:`select`,template:(e,t)=>N6(e,t),styles:(e,t)=>O` ${P6(e,t)} :host{border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not(.open)){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.select-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s;min-width: unset;min-height: unset}.selected-value{display: flex;align-items: center;height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .select-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:void 0},I6)),RVe=class extends z6{}.compose(Object.assign({baseName:`skeleton`,template:(e,t)=>L6(e,t),styles:(e,t)=>O` ${R6(e,t)} :host{--skeleton-fill: var( --neutral-fill-stealth-rest );/** value in ux doc rgba(242 242 242 / 0.1) */}`,shadowOptions:void 0},B6)),zVe=class extends U6{}.compose(Object.assign({baseName:`slider`,template:(e,t)=>V6(e,t),styles:(e,t)=>O` ${H6(e,t)} .thumb-cursor{background: var(--accent-fill-rest);border-radius: calc(var(--control-corner-radius) * 2px)}.thumb-cursor:hover, .thumb-cursor:focus, .thumb-cursor:active{background: var(--accent-fill-rest);border-radius: transparent}:host(:focus-visible) .thumb-cursor{box-shadow: 0 0 0 0}.thumb-cursor:hover::after, .thumb-cursor:focus::after, .thumb-cursor:active::after{content: '';height: calc(var(--thumb-size) * 2px);width: calc(var(--thumb-size) * 2px);border-radius: calc(var(--control-corner-radius) * 4px);position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: -1}.thumb-cursor:hover::after{background-color: color-mix(in srgb, ${Rc}, transparent 90%)}.thumb-cursor:focus::after{background-color: color-mix(in srgb, ${Rc}, transparent 80%)}.thumb-cursor:active::after{background-color: color-mix(in srgb, ${Rc}, transparent 70%)}.track{background-color: var(--neutral-fill-rest)}:host([orientation='horizontal']) .track .track-progress{background-color: var(--neutral-stroke-rest);height: calc((var(--track-width) + 2) * 1px) !important}:host([orientation='vertical']) .track .track-progress{background-color: var(--neutral-stroke-rest);width: calc((var(--track-width) + 2) * 1px) !important}`,shadowOptions:void 0},W6)),BVe=class extends q6{}.compose(Object.assign({baseName:`slider-label`,template:(e,t)=>G6(e,t),styles:(e,t)=>O` ${K6(e,t)} .label{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-4);background-color: var(--neutral-fill-strong-hover);color: var(--neutral-layer-4);text-align: center;font-size: var(--type-ramp-minus-1-font-size, 12px)}`,shadowOptions:void 0},J6)),VVe=O` ${Q6} .snackbar{border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);background-color: var(--neutral-layer-1);padding: calc((var(--design-unit) - 2) * 1px) calc(var(--design-unit) * 4px)}:host([type='error']) .snackbar::after{background-color: var(--error-color)}.content{font-family: var(--body-font);font-size: var(--type-ramp-minus-2-font-size);color: var(--neutral-foreground-rest)}.action{gap: calc(var(--design-unit) * 2px)}`,HVe=T` ${$6(`rapid`)} `,UVe=e8,WVe=class extends t8{}.compose({baseName:`snackbar`,shadowOptions:UVe,styles:VVe,template:HVe}),GVe=class extends i8{}.compose({baseName:`stacking-icons`,template:r8,styles:(e,t)=>O` ${n8(e,t)}`}),KVe=class extends u8{}.compose({baseName:`status-pill`,template:o8,styles:a8}),qVe=O` ${R7} :host{font-family: var(--body-font)}:host([orientation='horizontal']){height: 100%}.stepper-tab-panel{border: none;height: auto}:host([orientation='horizontal']) .stepper-tab-panel{height: 100%}.stepper-tab{background-color: var(--neutral-layer-3);border: none}.stepper-panel-container{padding: calc(var(--design-unit) * 4px)}.action-buttons-container{padding: calc(var(--design-unit) * 2px);width: auto;gap: calc(var(--design-unit) * 2px)}.stepper-tab-menu{margin-bottom: calc(var(--design-unit) * 4px)}.stepper-tab-progress{padding: calc(var(--design-unit) * 4px) 0}label{padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}`,R9=T` ${L7(`rapid`)} `,JVe=class extends z7{}.compose(Object.assign({baseName:`stepper`,template:R9,styles:qVe,shadowOptions:void 0},B7)),YVe=(e,t)=>O` ${p8(e,t)} rapid-tree-item{--design-unit: 2.5;--neutral-fill-stealth-rest: var(--neutral-layer-3);--neutral-fill-stealth-hover: var(--fill-color);--neutral-fill-rest: var(--fill-color);--base-height-multiplier: 14.5;border-bottom: calc(var(--stroke-width) * 1px) solid var(--fill-color)}.completed-icon{color: var(--success-color)}.tree-item::part(positioning-region)::before{width: var(--tree-item-nested-width)}.stepper-icon{margin-right: calc(var(--design-unit) * 2px)}.error-icon{color: var(--error-color)}.step-number{font-size: var(--type-ramp-minus-1-font-size);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-input-rest)}.step-title{font-size: var(--type-ramp-base-font-size)}.angle-icon{margin: 0 calc(var(--design-unit) * 4px)}:host([completed]) .step-number{border-color: var(--success-color);color: white;background-color: var(--success-color)}:host([completed]) .step-title{color: var(--success-color)}:host([error]) .step-number{border-color: var(--error-color);color: white;background-color: var(--error-color)}:host([error]) .step-title{color: var(--error-color)}`,XVe=T` ${f8(`rapid`)} `,ZVe=class extends m8{}.compose(Object.assign({baseName:`stepper-tab`,template:XVe,styles:YVe,shadowOptions:void 0},h8)),QVe=class extends _8{}.compose(Object.assign({baseName:`stepper-tab-panel`,template:(e,t)=>g8(e,t),shadowOptions:void 0},v8)),$Ve=class extends x8{}.compose(Object.assign({baseName:`switch`,template:(e,t)=>y8(e,t),styles:(e,t)=>O` ${b8(e,t)} :host{--primary-gradient-angle: -113.5deg}.switch{background: none;border-color: var(--neutral-stroke-rest)}.checked-indicator{background-color: var(--neutral-stroke-rest)}.switch:hover{border-color: var(--neutral-stroke-rest);background: none}:host([aria-checked='true']) .switch{background: none}:host([aria-checked='true']) .checked-indicator{background: var(--accent-fill-rest)}:host([aria-checked='true']:not([disabled])) .switch:hover, :host([aria-checked='true']:not([disabled])) .switch:active{background: none}:host([aria-checked='true']:not([disabled])) .switch:hover .checked-indicator, :host([aria-checked='true']:not([disabled])) .switch:active .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:void 0},{switch:`<div class="checked-indicator" part="checked-indicator"></div>`})),eHe=class extends w8{}.compose(Object.assign({baseName:`tab`,template:(e,t)=>S8(e,t),styles:(e,t)=>O` ${C8(e,t)} :host{background-color: var(--neutral-layer-2);border-radius: calc(var(--control-corner-radius) * 2px);box-shadow: 0 0 15px 0 rgb(0 0 0 / 30%);margin-right: calc(var(--design-unit) * 5px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host([aria-selected='true']), :host([aria-selected='true']:hover){background-color: var(--neutral-layer-4);font-weight: 700}/* * Sustained alert, sampling the flash phase the platform animates on the document. Every * alerting surface reads that one value, so tabs and grid rows brighten and fade together * however long ago each of them started alerting. * * Mixing towards transparent and currentColor lets the tab fade back to its own resting * colours, so selected and unselected tabs each return to the right background. * * !important because a :host rule loses to any app stylesheet that colours tabs from the light * DOM, and an alert nobody can see is worse than no alert. */ :host([alert]){background-color: color-mix( in srgb, var(--tab-alert-color, var(--error-fill-rest)) calc(var(${k0}, 0) * 100%), transparent ) !important;color: color-mix( in srgb, contrast-color(var(--tab-alert-color, var(--error-fill-rest))) calc(var(${k0}, 0) * 100%), currentColor ) !important}/* Reduced motion stops the clock, leaving the phase at 0, so paint a steady alert instead. */ @media (prefers-reduced-motion: reduce){:host([alert]){background-color: var(--tab-alert-color, var(--error-fill-rest)) !important;color: contrast-color(var(--tab-alert-color, var(--error-fill-rest))) !important}}`,shadowOptions:void 0},T8)),tHe=class extends O8{}.compose(Object.assign({baseName:`tab-panel`,template:(e,t)=>E8(e,t),styles:(e,t)=>O` ${D8(e,t)} :host{padding: 0;background-color: var(--neutral-layer-card-container);border-radius: 0 0 var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px)) var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));border-style: solid;border-width: var(--tabs-border-width, 1px);border-color: var(--tabs-border-color, var(--neutral-stroke-rest))}`,shadowOptions:void 0},k8)),nHe=class extends M8{}.compose(Object.assign({baseName:`tabs`,template:(e,t)=>A8(e,t),styles:(e,t)=>O` ${j8(e,t)} :host{background: var(--neutral-layer-3);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:not([appearance='secondary'])){background: var(--rapid-layout-item-background, var(--neutral-layer-3));border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, 0)}:host([appearance='secondary']){background: transparent}:host .tablist{padding: 0;display: grid;width: max-content;margin-top: 0}:host .tabpanel{height: 100%;min-height: 0}:host([appearance='secondary']) .tablist{margin-bottom: 0}:host .end, :host .start{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);height: calc(100% - 1px);display: flex;align-items: center}::slotted([slot='tab']:hover){color: var(--neutral-foreground-rest);background: var(--neutral-layer-1)}::slotted([role='tab']){border-radius: calc(var(--control-corner-radius) * 1.5px) calc(var(--control-corner-radius) * 1.5px) 0 0;background: var(--tab-rest-background-color, var(--neutral-layer-4));padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin-right: 2px;box-shadow: none;font-size: var(--type-ramp-minus-1-font-size);border-style: solid;border-width: var(--tab-rest-border-width, 1px);border-color: var(--tab-rest-border-color, transparent)}::slotted([role='tab'][aria-selected='true']:not([appearance='secondary'])){border-style: solid;border-width: var(--tab-active-border-width, 1px 1px 0 1px);border-color: var(--tab-active-border-color, var(--neutral-stroke-rest));background: var(--tab-active-background-color, var(--neutral-layer-card-container))}::slotted([role='tab'][aria-selected='true']){color: var(--accent-foreground-rest);background: var(--neutral-layer-card-container)}/* stylelint-disable selector-class-pattern */ .activeIndicator{display: none}:host([appearance='secondary']) .tablist .activeIndicator{display: block;height: 1px;margin-top: unset}::slotted([role='tab'][aria-selected='true'][appearance='secondary']){background: none}::slotted([role='tab'][appearance='secondary']){margin-left: 0;box-shadow: none;background: none}:host([appearance='secondary']:hover){color: var(--neutral-foreground-rest);background: none}:host([appearance='secondary']) ::slotted([role='tabpanel']){border: 0}`,shadowOptions:void 0},N8)),rHe=class extends I8{}.compose(Object.assign({baseName:`text-area`,template:(e,t)=>P8(e,t),styles:(e,t)=>O` ${F8(e,t)} :host{display: grid;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px);padding: calc(var(--design-unit) * 2px)}:host(:hover:not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}`,shadowOptions:void 0},L8)),iHe=class extends B8{}.compose(Object.assign({baseName:`text-field`,template:(e,t)=>R8(e,t),styles:(e,t)=>O` ${z8(e,t)} :host{display: block;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-radius: calc(var(--control-corner-radius) * 1px);padding: 0 calc(var(--design-unit) * 2px)}:host .control-field .control{width: 100%}:host .root{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover);box-shadow: none}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{margin: 0}:host input::placeholder{color: var(--neutral-foreground-hint);opacity: 75%}`,shadowOptions:V8},H8)),aHe=O` ${U8} .toast{background-color: ${Oc};border-radius: calc(var(--control-corner-radius) * 2px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.top{align-items: flex-start}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}.content{font-size: var(--type-ramp-minus-1-font-size)}.date{margin: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}.content-wrapper{padding: calc(var(--design-unit) * 2px)}.toast::after{background-color: var(--accent-fill-rest);border-radius: 0;height: calc(100% - calc(var(--design-unit) * 5px));margin: calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}:host([notify='warning']) .toast::after{background-color: var(--warning-color)}:host([notify='success']) .toast::after{background-color: var(--success-color)}:host([notify='critical']) .toast::after, :host([notify='serious']) .toast::after, :host([notify='error']) .toast::after{background-color: var(--error-color)}`,oHe=K8,sHe=G8,cHe=class extends q8{}.compose(Object.assign({baseName:`toast`,shadowOptions:sHe,styles:aHe,template:W8},oHe)),lHe=class extends X8{}.compose(Object.assign({baseName:`toolbar`,template:(e,t)=>J8(e,t),styles:(e,t)=>O` ${Y8(e,t)} :host{align-items: center;color: var(--neutral-foreground-rest)}.positioning-region{align-items: center}`,shadowOptions:void 0},Z8)),uHe=class extends e5{}.compose(Object.assign({baseName:`tooltip`,template:(e,t)=>Q8(e,t),styles:(e,t)=>O` ${$8(e,t)} :host{visibility: visible}.tooltip{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);text-align: center;white-space: inherit;font-weight: 400}rapid-anchored-region.bottom .tooltip{margin-top: calc(var(--design-unit) * 1px);margin-left: calc(var(--design-unit) * 2px)}rapid-anchored-region.top.right .tooltip, rapid-anchored-region.bottom.right .tooltip{margin-left: 0}`,shadowOptions:void 0},t5)),dHe=class extends i5{}.compose(Object.assign({baseName:`tree-item`,template:(e,t)=>n5(e,t),styles:(e,t)=>O` ${r5(e,t)} :host{font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-rest);background-color: transparent}:host(.nested) .expand-collapse-button{background: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);width: calc(var(--design-unit) * 5px);height: calc(var(--design-unit) * 5px);margin-left: calc(var(--design-unit) * 2px)}:host([selected]) .positioning-region{background: var(--neutral-fill-stealth-active)}.positioning-region::before{width: calc(var(--design-unit) * 1px)}:host([selected])::after{background: var(--accent-fill-rest);background-origin: border-box;background-size: cover;background-repeat: no-repeat}:host([slot='item']) .content-region{margin-inline-start: calc(var(--design-unit) * 4px + var(--expand-collapse-button-size))}.expand-collapse-glyph{width: calc(var(--design-unit) * 3px);height: calc(var(--design-unit) * 3px)}`,shadowOptions:void 0},{expandCollapseGlyph:`
|
|
1003
1003
|
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="expand-collapse-glyph">
|
|
1004
1004
|
<path d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"/>
|
|
1005
1005
|
</svg>`})),fHe=class extends s5{}.compose(Object.assign({baseName:`tree-view`,template:(e,t)=>a5(e,t),styles:(e,t)=>O` ${o5(e,t)}`,shadowOptions:void 0},c5)),pHe=(e,t)=>O` ${l5(e,t)} a{color: var(--accent-fill-rest);opacity: 65%}a:hover{opacity: 100%}.url-input-link{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);top: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) / 2 * 1px)}`,mHe=T` ${u5(`rapid`)} `,hHe=class extends f5{}.compose(Object.assign({baseName:`url-input`,template:mHe,styles:pHe,shadowOptions:void 0},d5)),gHe=O` ${p5} .digit .control{height: 100%;border-radius: calc(var(--control-corner-radius) * 1px);padding: 0 calc(var(--design-unit) * 2px)}.digit .control-field .control{width: 100%}.digit .root{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}.digit:hover:not(.disabled) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover);box-shadow: none}.digit:focus-within:not(.disabled) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{margin: 0}`,_He=m5;var vHe=class extends v5{};let yHe=g5,bHe=h5,z9={designSystemProvider:Vze,rapidAccordion:JFe,rapidAccordionItem:YFe,rapidAiCriteriaSearch:QFe,rapidAiIndicator:$Fe,rapidActionsMenu:XFe,rapidAnchor:mIe,rapidSectionNavigator:PVe,rapidAnchoredRegion:hIe,rapidAvatar:gIe,rapidBadge:_Ie,rapidBanner:bIe,rapidBreadcrumb:xIe,rapidBreadcrumbItem:SIe,rapidButton:CIe,rapidCalendar:wIe,rapidCard:TIe,rapidCategorizedMultiselect:AIe,rapidCheckbox:jIe,rapidCombobox:MIe,rapidConnectionIndicator:NIe,rapidDataGrid:RIe,rapidDataGridCell:UIe,rapidDataGridRow:JIe,rapidDatePicker:ZIe,rapidDialog:Gze,rapidDisclosure:Kze,rapidDivider:qze,rapidDropdownMenu:Jze,rapidEnvironmentIndicator:Xze,rapidErrorBoundary:tBe,rapidFileReader:rBe,rapidFileUpload:sBe,rapidFilter:uBe,rapidFilterBar:pBe,rapidFlexLayout:vBe,rapidFlipper:yBe,rapidFlyout:CBe,rapidGridLayout:OBe,rapidGridLayoutItem:NBe,rapidHorizontalScroll:RBe,rapidIcon:WBe,rapidListbox:GBe,rapidListboxOption:KBe,rapidMenu:qBe,rapidMenuItem:JBe,rapidModal:$Be,rapidMultiselect:iVe,rapidNotificationListener:aVe,rapidNumberField:dVe,rapidOptgroup:fVe,rapidPill:gVe,rapidProgress:_Ve,rapidProgressRing:vVe,rapidRadio:yVe,rapidRadioGroup:bVe,rapidScheduler:CVe,rapidSchedulerCronBuilder:EVe,rapidSchedulerTimezone:kVe,rapidSearchBar:MVe,rapidSearchBarCombobox:NVe,rapidSegmentedControl:FVe,rapidSegmentedItem:IVe,rapidSelect:LVe,rapidSkeleton:RVe,rapidSlider:zVe,rapidSliderLabel:BVe,rapidSnackbar:WVe,rapidStackingIcons:GVe,rapidStatusPill:KVe,rapidStepper:JVe,rapidStepperTab:ZVe,rapidStepperTabPanel:QVe,rapidSwitch:$Ve,rapidSystemHealthOverlay:pVe,rapidTab:eHe,rapidTabPanel:tHe,rapidTabs:nHe,rapidTextArea:rHe,rapidTextField:iHe,rapidToast:cHe,rapidToolbar:lHe,rapidTooltip:uHe,rapidTreeItem:dHe,rapidTreeView:fHe,rapidUrlInput:hHe,rapidVerificationCodeInput:vHe.compose(Object.assign({baseName:`verification-code-input`,template:_He,styles:gHe,shadowOptions:bHe},yHe)),register(e,...t){if(e)for(let n in this)n!==`register`&&this[n]().register(e,...t)}},B9=(e,t=`rapid`)=>h4(e,t,I9,w9),V9=rs(`#585858`);ss.create(V9.r,V9.g,V9.b);let H9=rs(`#202126`),xHe=ss.create(H9.r,H9.g,H9.b);fs.from(xHe);function U9(e,...t){let n=``;return e.forEach((e,r)=>{n+=e,r<t.length&&(n+=t[r])}),n}let W9={number:`rapid-number-field`,text:`rapid-text-field`,date:`rapid-text-field`,datetimeLocal:`rapid-text-field`,checkbox:`rapid-checkbox`,button:`rapid-button`,select:`rapid-select`,option:`rapid-option`,optgroup:`rapid-optgroup`,radio:{input:`rapid-radio`,group:`rapid-radio-group`}},G9=U9` rapid-select, rapid-text-field, rapid-number-field{min-width: 180px}rapid-button.btn{padding: 0}rapid-button.btn-success{background-color: var(--accent-fill-active);border-color: var(--accent-fill-active)}rapid-button.btn-danger{background-color: var(--error-color);border-color: var(--error-border-color)}rapid-select::part(listbox){max-height: 15vh}`,K9=U9` border: unset;border: 1px solid var(--focus-stroke-outer);padding: calc(var(--design-unit) * 2.5px);border-radius: 10px;margin: calc(var(--design-unit) * 1px);`,q9={value:U9` ${G9} rapid-number-field, rapid-text-field{margin-bottom: 0}rapid-number-field::part(label){display: none}p.validation-msg{color: var(--neutral-foreground-rest)}`,rule:U9` ${G9} div.rule-container{${K9}}div.rule-container.error{border-color: var(--error-border-color)}`,operator:U9` ${G9} rapid-select{min-width: 350px}`,field:U9` ${G9} rapid-select{min-width: 350px}`,group:U9` ${G9} div.rules-group-container{${K9}}p.group-combinator-link{padding-left: calc(var(--design-unit) * 2.5px);color: var(--neutral-foreground-rest)}`},J9=class extends Y5{constructor(){super(...arguments),this.styles={customElements:W9,customStyles:q9}}};q([C],J9.prototype,`styles`,void 0),J9=q([$e({name:`rapid-expression-builder`,styles:u7.styles,template:u7.template})],J9);let Y9=class extends g7{constructor(){super(...arguments),this.styles={customElements:W9,customStyles:q9}}};q([C],Y9.prototype,`styles`,void 0),Y9=q([$e({name:`rapid-rule-expression-builder`,styles:u7.styles,template:u7.template})],Y9);let X9=class extends b7{constructor(){super(...arguments),this.styles={customElements:W9,customStyles:q9}}};q([C],X9.prototype,`styles`,void 0),X9=q([$e({name:`rapid-value-expression-builder`,styles:u7.styles,template:u7.template})],X9),O` ${`/* ============================================================================
|