@genesislcap/foundation-rapid-cdn 15.72.0 → 15.73.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.
@@ -243,7 +243,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
243
243
  /*! js-cookie v3.0.7 | MIT */
244
244
  function Ev(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)r!==`__proto__`&&(e[r]=n[r])}return e}var Dv={read:function(e){return e[0]===`"`&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ov(e,t){function n(n,r,i){if(typeof document<`u`){i=Ev({},t,i),typeof i.expires==`number`&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a=``;for(var o in i)i[o]&&(a+=`; `+o,i[o]!==!0&&(a+=`=`+i[o].split(`;`)[0]));return document.cookie=n+`=`+e.write(r,n)+a}}function r(t){if(!(typeof document>`u`||arguments.length&&!t)){for(var n=document.cookie?document.cookie.split(`; `):[],r={},i=0;i<n.length;i++){var a=n[i].split(`=`),o=a.slice(1).join(`=`);try{var s=decodeURIComponent(a[0]);if(s in r||(r[s]=e.read(o,s)),t===s)break}catch{}}return t?r[t]:r}}return Object.create({set:n,get:r,remove:function(e,t){n(e,``,Ev({},t,{expires:-1}))},withAttributes:function(e){return Ov(this.converter,Ev({},this.attributes,e))},withConverter:function(e){return Ov(Ev({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var kv=Ov(Dv,{path:`/`});let Av=N.createInterface();function jv(){return navigator!=null&&navigator.credentials?`PasswordCredential`in window||(Y.warn(`PasswordCredential not available in this browser.`),!1):(Y.warn(`CredentialsContainer not available in this browser.`),!1)}function Mv(e=``,t=`:`,n){return e.split(t,n).map(e=>e.trim()).filter(e=>e!==``)}function Nv(e,t=`:`){let n=typeof e==`string`&&e.trim();return n?n.includes(t):!1}function Pv(e,t=`:`){return typeof e==`string`&&e.trim()?(e.match(new RegExp(t,`g`))||[]).length:0}function Fv(e,t=`:`){for(let n of e)if(Nv(n,t))return n;return e.find(e=>typeof e==`string`&&e.trim()!==``)}function Iv(e,t,n){let r=typeof e==`string`&&e.trim();return!r||n&&!r.includes(n)||Pv(r)>1?n&&t&&n!==t?`${t}:${n}`:t||n:r}function Lv(e=`credential`){Y.warn(`Unable to migrate legacy ${e} to latest format. Please remove from your browser.`)}let Rv={password:!0,mediation:`optional`},zv={cookie:{path:`/`,name:`credentials`,expires:7300,storePasswords:!1}},Bv=class{constructor(e,t=zv){this.session=e,this.config=t}createBasicCredentials(e){return{type:Fg.BASIC,username:e.username,password:e.password,mfaToken:this.getMFAToken()}}createRefreshCredentials(e){return{type:Fg.REFRESH,username:e?.username??this.getUsername(),refreshToken:e?.refreshToken??this.getRefreshToken(),mfaToken:e?.mfaToken??this.getMFAToken()}}createSSOCredentials(e){return{type:Fg.SSO,ssoToken:e?.ssoToken??this.getSSOToken()}}validateBasicCredentials(e){return e&&!!e.username&&!!e.password}validateRefreshCredentials(e){return e&&!!e.refreshToken&&!!e.username}validateSSOCredentials(e){return e&&!!e.ssoToken}validateUserCredentialData(e,t){let n=e&&!!e.id&&!!e.name&&!e.name.includes(`:`)&&Pv(e.id)<=1;return t?n&&!!e.password:n}normaliseLegacyCredentialData(e,t){if(this.validateUserCredentialData(e,!0))return[e,!0];if(this.validateUserCredentialData(t))return[t,!1];if(e)try{let t=e,[n]=Mv(t.name||t.id),[r,i]=Mv(Fv([t.id,t.name]));return[{id:Iv(t.id||t.name,n,i),name:n,password:t.password||``},!0]}catch{Lv(`PasswordCredential`)}if(t)try{let e=t,[n]=Mv(e.name||e.username||e.organisation),[r,i]=Mv(Fv([e.organisation||e.username||e.name]));return[{id:Iv(e.id||e.username||e.name,n,i),name:n,password:e.password||``},!1]}catch{Lv(`cookie`)}return[void 0,!1]}storeCredentialsInContainer(e){return J(this,void 0,void 0,function*(){if(!jv())return;let t=new PasswordCredential(e);return Y.debug(`Storing credentials in CredentialsContainer`),navigator.credentials.store(t)})}getCredentialsFromContainer(){return J(this,arguments,void 0,function*(e=Rv){if(jv())return Y.debug(`Getting credentials from CredentialsContainer`),yield navigator.credentials.get(e)})}storeCredentialsInCookie(e){let{password:t}=e,n=fd(e,[`password`]),r=this.config.cookie.storePasswords?e:n;return Y.debug(`Storing credentials in cookie`),!!kv.set(this.config.cookie.name,JSON.stringify(r),{expires:this.config.cookie.expires,domain:location.hostname,path:this.config.cookie.path,secure:!0})}getCredentialsFromCookie(){Y.debug(`Getting credentials from cookie`);let e=kv.get(this.config.cookie.name);return e?JSON.parse(e):void 0}storeCredentials(e){return J(this,void 0,void 0,function*(){if(jv()){let t=yield this.storeCredentialsInContainer(e);return Promise.resolve(!!t)}return Promise.resolve(this.storeCredentialsInCookie(e))})}getCredentials(e){return J(this,void 0,void 0,function*(){return jv()?this.getCredentialsFromContainer(e):Promise.resolve(this.getCredentialsFromCookie())})}getSSOToken(){return this.session.getSessionStorageItem(`ssoToken`)}getUsername(){return this.session.getSessionStorageItem(`username`)||this.session.getLocalStorageItem(`username`)}getRefreshToken(){return this.session.getSessionStorageItem(`refreshToken`)||this.session.getLocalStorageItem(`refreshToken`)}getMFAToken(){return this.session.getSessionStorageItem(`mfaToken`)}removeCookie(){kv.remove(this.config.cookie.name,{domain:location.hostname,path:this.config.cookie.path})}removeSSOToken(){this.session.removeSessionStorageItem(`ssoToken`)}removeUsername(){this.session.removeSessionStorageItem(`username`),this.session.removeLocalStorageItem(`username`)}removeRefreshToken(){this.session.removeSessionStorageItem(`refreshToken`),this.session.removeLocalStorageItem(`refreshToken`)}removeMFAToken(){this.session.removeSessionStorageItem(`mfaToken`)}removeAll(){this.removeCookie(),this.removeSSOToken(),this.removeUsername(),this.removeRefreshToken(),this.removeMFAToken()}preventSilentAccess(){return jv()&&navigator.credentials.preventSilentAccess()}};Bv=q([pd(0,Mg),pd(1,Lt(Av))],Bv);let Vv=N.createInterface(e=>e.singleton(Bv)),Hv=e=>e?{date:e.DATE}:null,Uv=e=>e?e.map(e=>({name:e.NAME,version:e.VERSION})):[],Wv=e=>Array.isArray(e)?e.map(e=>e??``):[],Gv=e=>{try{if(e?.MESSAGE_TYPE===`EVENT_LOGIN_AUTH_ACK`){let{DETAILS:t}=e,n=e.UPDATE_QUEUE_DETAILS;return{messageType:e.MESSAGE_TYPE,sourceRef:e.SOURCE_REF,userName:e.USER_NAME,updateQueue:n?.UPDATE_QUEUE,zeroMqProxyModeEnabled:n?.ZERO_MQ_PROXY_MODE_ENABLED,zeroMqProxyInboundPort:n?.ZERO_MQ_PROXY_INBOUND_PORT,zeroMqProxyOutboundPort:n?.ZERO_MQ_PROXY_OUTBOUND_PORT,userKVs:e.USER,details:t?{system:Hv(t.SYSTEM),heartbeatIntervalSecs:t.HEARTBEAT_INTERVAL_SECONDS,failedLoginAttempts:t.FAILED_LOGIN_ATTEMPTS,rejectedLoginAttempts:t.REJECTED_LOGIN_ATTEMPTS,lastLoginDatetime:t.LAST_LOGIN_DATE_TIME,daysToPasswordExpiry:t.DAYS_TO_PASSWORD_EXPIRY,product:Uv(t.PRODUCT)}:null,permission:Wv(e.PERMISSION),profile:Wv(e.PROFILE)}}throw Error(`No Entity mapping implementation for provided DTO`)}catch(e){throw Y.error(e),e}},Kv=class{loggedUserResultChanged(){var e;(e=this.isLoggedInSubject)==null||e.next(this.isLoggedIn)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}get isLoggedIn(){return this.currentUser.isAuthenticated}constructor(e,t,n,r,i){this.session=e,this.connect=t,this.messageBuilder=n,this.credentialManager=r,this.currentUser=i,this.isWorking=!1,this.isLoggedInSubject=new Zm(this.isLoggedIn),this.currentUser.addAuthenticationChangeListener(e=>{var t;(t=this.isLoggedInSubject)==null||t.next(e.detail)})}login(e){return J(this,void 0,void 0,function*(){this.isWorking=!0;try{let t=this.messageBuilder.createLoginMessage(e),n=yield this.connect.send(t);if(!n||n.ERROR||n.DETAILS?.ERROR)throw new Ig(t,n);this.applyAuthResults({authToken:n.SESSION_AUTH_TOKEN,refreshToken:n.REFRESH_AUTH_TOKEN,profiles:n.PROFILE,username:n.USER_NAME,permissions:n.PERMISSION,sessionId:n.SESSION_ID}),this.currentUser.set(Gv(n)),this.session.setAuthResult(n),Y.debug(`Login Authentication Result:`,n)}catch(e){if(Y.error(Eg(`Login Authentication Error:`,e?.received),e),e instanceof Ig&&e.isIgnorableError())Y.warn(`Ignoring authentication error as it is a known edge case.`);else throw this.removeAuthResults(),this.currentUser.unset(),e}finally{this.isWorking=!1}return this.loggedUserResult})}logout(){return J(this,void 0,void 0,function*(){this.isWorking=!0;let e={success:!1};try{let t=this.messageBuilder.createLogoutMessage(this.loggedUserResult);this.session.deleteUserFromSessionStorage();let{CODE:n,DETAILS:r,ERROR:i,MESSAGE_TYPE:a,OIDC_LOGOUT_URL:o}=yield this.connect.send(t),s=r?.ERROR??i,c=a===Lg.LOGOUT_NACK;c&&Y.warn(`Unexpected Logout NACK received during logout.`,s),e={success:a===Lg.LOGOUT_ACK||n===zg.SESSION_NOT_FOUND||!c,error:s},o&&window.open(o,`_self`)}catch(t){let n=new Ig(t.sentMessage,t.receivedMessage);if(Y.error(Eg(`Logout Authentication Error:`,n.received),n),n.isIgnorableError())Y.warn(`Ignoring authentication error as it is a known edge case.`),e.success=!0;else throw t}finally{this.removeAuthResults(),this.currentUser.unset(),this.isWorking=!1}return e})}reAuthFromSession(){return J(this,void 0,void 0,function*(){let e=yield this.ensureConnection(),t=this.credentialManager.createRefreshCredentials();if(e&&this.credentialManager.validateRefreshCredentials(t)){let e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.connect.send(e);if(t?.MESSAGE_TYPE===Rg.EVENT_LOGIN_AUTH_ACK)return this.session.setAuthResult(t),this.currentUser.set(Gv(t)),this.applyAuthResults(this.getLoggedUserFromMessage(t)),!0}return this.session.deleteUserFromSessionStorage(),this.currentUser.unset(),!1})}ensureConnection(){return J(this,void 0,void 0,function*(){if(this.connect.isConnected)return!0;let e=this.session.getSessionStorageItem(`hostUrl`);return e?this.connect.connect(e):!1})}getLoggedUserFromMessage(e){let t=e.USER_NAME,n=e.SESSION_AUTH_TOKEN,r=e.REFRESH_AUTH_TOKEN;return!t||!n||!r?null:{username:t,authToken:n,refreshToken:r,profiles:e.PROFILE,permissions:e.PERMISSION,sessionId:e.SESSION_ID}}applyAuthResults(e){if(!e){this.removeAuthResults();return}this.loggedUserResult={authToken:e.authToken,refreshToken:e.refreshToken,profiles:e.profiles,username:e.username,permissions:e.permissions,sessionId:e.sessionId}}removeAuthResults(){this.loggedUserResult=null}};q([C],Kv.prototype,`isWorking`,void 0),q([C],Kv.prototype,`loggedUserResult`,void 0),Kv=q([pd(0,Mg),pd(1,Cv),pd(2,Wg),pd(3,Vv),pd(4,yg)],Kv);let qv=N.createInterface(e=>e.singleton(Kv));function Jv(e,t){let n=new Date(e),r=n.getUTCFullYear(),i=String(n.getUTCMonth()+1).padStart(2,`0`),a=String(n.getUTCDate()).padStart(2,`0`);return t?`${r}${i}${a}`:`${r}${i}${a}-${String(n.getUTCHours()).padStart(2,`0`)}:${String(n.getUTCMinutes()).padStart(2,`0`)}`}let Yv={n:`
245
245
  `,r:`\r`,t:` `,b:`\b`,f:`\f`};function Xv(e){let t=e.trim(),n=/^(['"])([\s\S]*)\1$/.exec(t);return n?n[2].replace(/\\([\s\S])/g,(e,t)=>Yv[t]??t):t}function Zv(e,t){let n=e.match(/Expr\.(\w+)\(/);if(n)switch(n[1]){case`dateIsToday`:{let n=e.match(/Expr\.dateIsToday\((\w+)\)/);if(n){let[,e]=n,r=/* @__PURE__ */ new Date;t[`${e}_FROM`]=`${r.toISOString().replace(/-/g,``).split(`T`)[0]}-00:00`,r.setDate(r.getDate()+1),t[`${e}_TO`]=`${r.toISOString().replace(/-/g,``).split(`T`)[0]}-00:00`}break}case`dateTimeIsGreaterEqual`:{let n=e.match(/Expr\.dateTimeIsGreaterEqual\((\w+), ?(['"].+['"])\)/);if(n){let[,e,r]=n;t[`${e}_FROM`]=Xv(r)}break}case`dateTimeIsLessEqual`:{let n=e.match(/Expr\.dateTimeIsLessEqual\((\w+), ?(['"].+['"])\)/);if(n){let[,e,r]=n;t[`${e}_TO`]=Xv(r)}break}case`dateIsGreaterEqual`:{let n=e.match(/Expr\.dateIsGreaterEqual\((\w+), ?(['"].+['"])\)/);if(n){let[,e,r]=n;t[`${e}_FROM`]=Xv(r)}break}case`dateIsLessEqual`:{let n=e.match(/Expr\.dateIsLessEqual\((\w+), ?(['"].+['"])\)/);if(n){let[,e,r]=n;t[`${e}_TO`]=Xv(r)}break}case`containsIgnoreCase`:{let n=e.match(/Expr\.containsIgnoreCase\((\w+), ?(['"].+['"])\)/);if(n){let[,e,r]=n;t[e]=`*${Xv(r)}*`}break}}}function Qv(e,t){let n=e.indexOf(`=`),r=e.substr(0,n).trim().replace(/["']/g,``);t[r]=Xv(e.slice(n).replace(/^==?/,``))}function $v(e){if(!e)return{};let t=e.split(`&&`).map(e=>e.trim()),n={};return t.forEach(e=>{if(e){if(e.startsWith(`Expr`))Zv(e,n);else if(/[A-Z_]+\s*(>=|<=)\s*\d+/.test(e)){let t=e.match(/([A-Z_]+)\s*>=\s*(\d+)/);if(t){let[,e,r]=t,i=parseInt(r,10),a=e.toUpperCase(),o=a.includes(`DATE`)&&!a.includes(`DATETIME`);n[`${e}_FROM`]=Jv(i,o)}let r=e.match(/([A-Z_]+)\s*<=\s*(\d+)/);if(r){let[,e,t]=r,i=parseInt(t,10),a=e.toUpperCase(),o=a.includes(`DATE`)&&!a.includes(`DATETIME`);n[`${e}_TO`]=Jv(i,o)}}else Qv(e,n)}}),n}function ey(e,t=`ROW_REF`){let n=e=>{let n=e.DETAILS[t]??e[t],r=Object.assign(Object.assign({},e),{[t]:n});return delete r.DETAILS,r},r=[],i=[],a=[];for(let t of e.ROW)if(t.DETAILS)switch(t.DETAILS.OPERATION){case`INSERT`:r.push(n(t));break;case`MODIFY`:a.push(n(t));break;case`DELETE`:i.push(n(t));break;default:Y.error(`Unsupported operation type: '${t.DETAILS.OPERATION}'`)}return{inserts:r,deletes:i,updates:a,SOURCE_REF:e.SOURCE_REF}}var ty=class{};ty.MAX_ROWS_250=250,ty.MAX_VIEW_1000=1e3,ty.REQ_REP_POLLING_INTERVAL_MS=1e4,ty.DATASERVER_ROW_ID=`ROW_REF`,ty.REQUEST_SERVER_ROW_ID=`RECORD_ID`,ty.DEFAULT_PAGINATION_PAGE_SIZE=25,ty.DEFAULT_REQ_REP_OFFSET=0;let ny={options:{criteria:``,isSnapshot:!1,maxRows:ty.MAX_ROWS_250,maxView:ty.MAX_VIEW_1000,pollingInterval:ty.REQ_REP_POLLING_INTERVAL_MS,movingView:!1,orderBy:``,resourceName:``,reverse:!1,pollTriggerEvents:[]},criteriaToFields:$v,dataServerResultFilter:ey},ry=N.createInterface(e=>e.instance(ny));function iy(e){let t=e==null?NaN:Number(e);return Number.isFinite(t)?t===0?1/0:t:ty.MAX_VIEW_1000}function ay(e){return e.moreRows===!1?`end`:e.rowsHeld>=iy(e.maxView)?e.movingView?`more`:`view-full`:e.emptyReply?`stalled`:`more`}function oy(e){let t=iy(e.maxView),n=sy(e.maxView)?`${t}, the server default`:`${t}`,r=e.totalRows;if(e.status===`stalled`)return`${e.resourceName} stopped at ${e.rowsHeld} rows: the server answered MORE_ROWS with an empty page while still reporting more rows, with room left in the view (MAX_VIEW ${n}). This is not the MAX_VIEW cap; check the data server log for "Problem building client message".`;if(!e.emptyReply&&r!==void 0&&r<=e.rowsHeld)return;let i=r!==void 0&&r>e.rowsHeld,a=i?` of ${r}`:``,o=e.emptyReply||i?` and the server holds more rows past it`:`, so any rows past it are not loaded`;return`${e.resourceName} stopped at ${e.rowsHeld}${a} rows: the DATASERVER view is full at MAX_VIEW (${n})${o}. Raise ${e.attribute} past the row count to reach the rest.`}function sy(e){return e==null||!Number.isFinite(Number(e))}let cy=e=>{class t extends e{constructor(){super(),this.hasOwnProperty(`onDatasourceStatusChanged`)||(this.onDatasourceStatusChanged=e=>{let t=this.data!==void 0;!this.resourceName&&!t&&Y.warn(`Target classes must have a resourceName or data property to use the DatasourceEventHandler mixin.`);let n=e.detail;if(n.name===this.resourceName){let e=this.datasourceStatus??{isInitialized:!1,hasMetadata:!1};(e.isInitialized!==n.isInitialized||n.metadataRequired&&e.hasMetadata!==n.hasMetadata)&&(this.datasourceStatus=n)}})}datasourceStatusChanged(e,t){Y.debug(`Target classes should override the datasourceStatusChanged method of the DatasourceEventHandler mixin to respond to changes in the target datasource.`)}connectedCallback(){super.connectedCallback(),document.addEventListener(Cg,this.onDatasourceStatusChanged,{passive:!0,capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(Cg,this.onDatasourceStatusChanged,{capture:!0})}}return q([C],t.prototype,`datasourceStatus`,void 0),t},ly={throwWhenUnavailable:!0,throwWhenUnknown:!1},uy=N.createInterface(e=>e.instance(ly)),dy=ef(`genesis-resources`);function fy(){return N.getOrCreateDOMContainer().get(dy)}let py=class{constructor(e,t){this.connect=e,this.config=t}isValidResource(e){return J(this,void 0,void 0,function*(){return e=e?.trim(),e?(yield this.fetchResources(),!!this.resources.find(t=>t.RESOURCE_NAME===e)):!1})}getResourceTypeFor(e){return J(this,void 0,void 0,function*(){yield this.fetchResources();let t=this.resources.find(t=>t.RESOURCE_NAME===e);if(t)return t.RESOURCE_TYPE;let n=`${e} resource does not exist.`;if(Y.error(n),this.config.throwWhenUnknown)throw Error(n)})}getAllResources(){return J(this,void 0,void 0,function*(){return this.resources||(yield this.fetchResources()),this.resources})}destroy(){this.resources=void 0,this.resourcesPromise=void 0}fetchResources(){return J(this,void 0,void 0,function*(){if(this.resources)return Promise.resolve();if(this.resourcesPromise)yield this.resourcesPromise;else{this.resourcesPromise=this.connect.getAvailableResources();let e=yield this.resourcesPromise;if(this.resources=e?.RESOURCES,!this.resources?.length){let e=`Genesis resources unavailable.`;if(Y.error(e),this.config.throwWhenUnavailable)throw Error(e)}this.postLoadedMessage(),this.resourcesPromise=void 0}})}postLoadedMessage(){let e=fy();e.postMessage(`resources-loaded`,this.resources),e.close()}};py=q([pd(0,Cv),pd(1,uy)],py);let my=N.createInterface(e=>e.singleton(py)),hy=class{get initialized(){return!!this.status?.isInitialized}constructor(e,t,n,r,i){this.connect=e,this.auth=t,this.resources=n,this.config=r,this.connectEvents=i,this.fetchMetadataRequired=!0,this.startStreamRequired=!0,this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.customRequestFields=[],this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.criteriaOnlyRequest=!1,this.loadMoreCount=0,this.readOnly=!0,this._allParams=null,this.pollTrigger$=new Ym}triggerPoll(){this.pollTrigger$.next()}validResourceName(e){return Y.deprecated(`Datasource.validResourceName`,"Use `GenesisResources.isValidResource` instead."),!(!e||!e.trim().length)}init(e){return J(this,arguments,void 0,function*(e,t=this.fetchMetadataRequired,n=this.startStreamRequired){this.fetchMetadataRequired=t,this.options=Object.assign(Object.assign({},this.config.options),e),this.invalidateCache();let r=this.options.resourceName;return this.connect.isConnected||(yield this.connect.connect())?(yield this.resources.isValidResource(r))?(this.resourceType=yield this.resources.getResourceTypeFor(r),this.resourceType?(this.fetchMetadataRequired&&(yield this.fetchAndApplyMetadata(this.options.resourceName),this._allParams=null),Y.debug(`Initializing ${r} datasource from ${this.connect.host}`),!this.options.isSnapshot&&n&&(this.pollTrigger$=new Ym,this.stream=yield this.createStream()),Y.debug(`${r} datasource initialization ${this.initialized?`was successful.`:`has failed.`}`),this.reportStatus(),this.initialized):(Y.error(`Unable to get the resource type for ${r} datasource from ${this.connect.host}`),this.reportStatus(),!1)):(Y.error(`${r} datasource does not exist on ${this.connect.host}`),this.reportStatus(),!1):(Y.error(`Unable to connect to ${this.connect.host} to get ${r} datasource`),this.reportStatus(),!1)})}startStream(){return J(this,void 0,void 0,function*(){!this.options.isSnapshot&&this.stream===void 0&&(this.stream=yield this.createStream())})}destroy(){var e;Y.debug(`Datasource.destroy`,this.options?.resourceName),this.commitResponseUnsubscribe&&(this.commitResponseUnsubscribe(),this.commitResponseUnsubscribe=void 0),(e=this.pollTrigger$)==null||e.complete(),this.status=void 0,this.fetchMetadataRequired=!0,this.options={},this.resourceType=void 0,this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.criteriaOnlyRequest=!1,this.loadMoreCount=0,this.stream=void 0}get allResourceParams(){if(this._allParams)return this._allParams;let e;if(this.options.orderBy){if(this.criteriaOnlyRequest||this.availableIndexes?.findIndex(e=>e.NAME===this.options.orderBy)>-1)e=this.options.orderBy;else{let e=this.availableIndexes.map(e=>e.NAME);Y.warn(`Specified [orderBy] index is not valid and will not be used. See https://learn.genesis.global/docs/database/data-types/index-entities/ - Available indexes:`,e)}}return this._allParams={CRITERIA_MATCH:this.options.criteria,MAX_ROWS:this.options.maxRows,ORDER_BY:e,VIEW_NUMBER:this.options.viewNumber,FIELDS:this.options.fields,MAX_VIEW:this.options.maxView,MOVING_VIEW:this.options.movingView,REVERSE:this.options.reverse,DISABLE_POLLING:this.options.disablePolling,OFFSET:this.options.offset,POLLING_INTERVAL:this.options.pollingInterval,REQUEST:this.options.request},Y.debug(`Getting configured params:`,this._allParams),this._allParams}get dataserverOnlyParams(){return{CRITERIA_MATCH:this.allResourceParams.CRITERIA_MATCH,MAX_ROWS:this.allResourceParams.MAX_ROWS,VIEW_NUMBER:this.allResourceParams.VIEW_NUMBER,FIELDS:this.allResourceParams.FIELDS,MAX_VIEW:this.allResourceParams.MAX_VIEW,MOVING_VIEW:this.allResourceParams.MOVING_VIEW,ORDER_BY:this.allResourceParams.ORDER_BY,REVERSE:this.allResourceParams.REVERSE}}get requestOnlyParams(){let e=this.allResourceParams,{REQUEST:t}=e,n=fd(e,[`REQUEST`]);return{DETAILS:{CRITERIA_MATCH:this.options.requestAutoSetup?void 0:n.CRITERIA_MATCH,MAX_ROWS:n.MAX_ROWS,OFFSET:n.OFFSET,ORDER_BY:n.ORDER_BY,VIEW_NUMBER:n.VIEW_NUMBER},REQUEST:this.criteriaOnlyRequest?{}:t??this.buildRequestFields()}}buildRequestFields(){if(!this.options.requestAutoSetup)return{};let e=Object.fromEntries(this.requestFields.map(e=>[e.NAME,`*`])),t=this.options.criteria?this.config.criteriaToFields(this.options.criteria):{};return Object.assign(Object.assign({},e),t)}updateLoadMoreCount(e){this.loadMoreCount=e}snapshot(e){return J(this,void 0,void 0,function*(){switch(Y.debug(`Requesting snapshot for ${this.options.resourceName} (${this.resourceType}).`),this.resourceType){case Sg.DATASERVER:return this.connect.snapshot(this.options.resourceName,Object.assign(Object.assign({},this.dataserverOnlyParams),e));case Sg.REQUEST_SERVER:return this.connect.request(this.options.resourceName,Object.assign(Object.assign({},this.requestOnlyParams),e));default:throw Error(`Snapshot not supported for selected resource type: ${this.resourceType}`)}})}snapshotFiltered(){return J(this,arguments,void 0,function*(e=`ROW_REF`){let t=yield this.snapshot();if(Array.isArray(t))return t;if(t.REPLY)return t.REPLY;if(t.ROW)return this.config.dataServerResultFilter(t,e).inserts})}createStream(){return J(this,void 0,void 0,function*(){if(![Sg.DATASERVER,Sg.REQUEST_SERVER].includes(this.resourceType))throw Error(`Streaming not supported for selected resource type: ${this.resourceType}`);return this.resourceType===Sg.DATASERVER?this.createDataserverStream():(Y.debug(`Creating fake stream by polling ${this.options.resourceName} REQUEST_SERVER`),this.createReqRepStream())})}createDataserverStream(){return J(this,void 0,void 0,function*(){return this.connect.stream(this.options.resourceName,e=>{},e=>Y.error(Eg(`${this.options.resourceName} stream failed`,e),e),this.dataserverOnlyParams)})}createReqRepStream(){this.commitResponseUnsubscribe=this.connectEvents.addCommitResponseListener(e=>{let{eventName:t,response:n}=e.detail;this.options.pollTriggerEvents&&this.options.pollTriggerEvents.includes(t)&&n.MESSAGE_TYPE?.endsWith(`_ACK`)&&(Y.debug(`Received commit response for ${t}, triggering poll.`),this.triggerPoll())});let e=this.allResourceParams.DISABLE_POLLING?void 0:this.allResourceParams.POLLING_INTERVAL,t=()=>{let e=this.requestOnlyParams;if(this.resourceType===Sg.REQUEST_SERVER&&this.loadMoreCount>0){let t=(this.options.maxRows||25)*(this.loadMoreCount+1);e.DETAILS.MAX_ROWS=t}return sie([this.connect.isConnected$,this.auth.isLoggedIn$]).pipe(Hh(()=>this.connect.isConnected&&this.auth.isLoggedIn),Vh(()=>Oh(this.snapshot(e))))};return e?this.pollTrigger$.pipe(Bh(0),Vh(()=>Ih(0,e).pipe(Vh(t)))):this.pollTrigger$.pipe(Bh(0),Vh(t))}fetchAndApplyMetadata(e){return J(this,void 0,void 0,function*(){try{Y.debug(`Requesting metadata for ${this.options.resourceName} Datasource`);let e=yield this.connect.getMetadata(this.options.resourceName);e&&(this.availableIndexes=e.INDEXES??[],this.availableSortableFields=e.SORTABLE_FIELDS??[],this.availableCriteriaFields=e.CRITERIA_FIELDS??[],this.originalFieldDef=Tg(e),this.fieldMetadata=wg(this.originalFieldDef),this.requestFields=e.REQUEST_FIELD||[],this.customRequestFields=e.FIELD||[],this.criteriaOnlyRequest=e.CRITERIA_ONLY_REQUEST||!1,this.fetchMetadataRequired=!1),this.status=this.normaliseStatus({isInitialized:!0,metadataRequired:!0,hasMetadata:this.fieldMetadata?.length>0})}catch(t){Y.error(Eg(`Metadata Fetch failed for ${e}:`,t),t),this.status=this.normaliseStatus({isInitialized:!1,metadataRequired:!0,hasMetadata:!1})}})}reportStatus(e={}){let t=this.config.eventEmitter??document;this.status=this.normaliseStatus(e),Y.debug(`Dispatching '${Cg}'`,this.status),t?.dispatchEvent(new CustomEvent(`datasource-status-changed`,{detail:this.status,bubbles:t!==document,composed:!0}))}normaliseStatus(e){let t=e.isInitialized??this.initialized,n=e.metadataRequired??this.fetchMetadataRequired,r=e.hasMetadata??this.fieldMetadata?.length>0;return{name:this.options?.resourceName,type:this.resourceType,isInitialized:t,metadataRequired:n,hasMetadata:r}}invalidateCache(){this._allParams=null}};q([C],hy.prototype,`status`,void 0),q([C],hy.prototype,`fetchMetadataRequired`,void 0),q([C],hy.prototype,`startStreamRequired`,void 0),q([C],hy.prototype,`originalFieldDef`,void 0),q([C],hy.prototype,`fieldMetadata`,void 0),q([C],hy.prototype,`requestFields`,void 0),q([C],hy.prototype,`customRequestFields`,void 0),q([C],hy.prototype,`availableIndexes`,void 0),q([C],hy.prototype,`availableSortableFields`,void 0),q([C],hy.prototype,`availableCriteriaFields`,void 0),q([C],hy.prototype,`criteriaOnlyRequest`,void 0),q([C],hy.prototype,`loadMoreCount`,void 0),q([C],hy.prototype,`readOnly`,void 0),q([C],hy.prototype,`stream`,void 0),hy=q([pd(0,Cv),pd(1,qv),pd(2,my),pd(3,ry),pd(4,Dg)],hy);let gy=N.createInterface(e=>e.transient(hy));var _y=class extends hy{constructor(){super(...arguments),this.entityCache=[],this.entityMap=/* @__PURE__ */ new Map,this.rowId=`ROW_REF`,this.initialize=e=>J(this,void 0,void 0,function*(){return this.disconnect(),this.options=Object.assign({},e.options),this.mapper=e.mapper,this.initialized=yield this.init(this.options,e.fetchMeta),this.initialized?(this.subscription=this.stream.subscribe(e=>{this.sourceRef=e.SOURCE_REF,this.subscriptionLoggedOff=e.MESSAGE_TYPE===Lg.LOGOFF_ACK;let t=e.ROW;!this.subscriptionLoggedOff&&t&&this.updateCache(this.config.dataServerResultFilter(e,this.rowId))}),!0):(Y.debug(`EntityDatasource init failed for ${this.options.resourceName}`),!1)}),this.disconnect=()=>{var e;(e=this.subscription)==null||e.unsubscribe(),this.entityCache=[]}}get initialized(){return this._initialized}set initialized(e){this._initialized=e}get cache(){if(!this.initialized)throw Error(`Please initialize EntityDatasource before querying.`);return this.entityCache}get isEmpty(){return this.entityCache.length===0}updateCache(e){var t;this.isEmpty,(t=e.deletes)==null||t.forEach(e=>{let t=e[this.rowId];this.entityMap.delete(t)}),this.processRowDataUpdate(e.inserts,!0),this.processRowDataUpdate(e.updates);let n=[{}];this.entityCache=n.map(e=>this.mapper.fromDTO(e))}processRowDataUpdate(e,t=!1){e.forEach(e=>{let n=e[this.rowId],r=this.entityMap.get(n);if(r&&t)throw Error(`Existing entity found in map while inserting.`);let i=this.mapper.fromDTO(e),a=r?Object.assign(Object.assign({},r),i):i;this.entityMap.set(n,a)})}};N.createInterface(e=>e.transient(_y));function vy(e,t=`;`){return e&&e.split(t).map(e=>e.trim()).sort((e,t)=>e.localeCompare(t)).join(t)}let yy=`system-health-changed`,by={windowEvents:[`online`,`offline`,`pageshow`],documentEvents:[`visibilitychange`],genesisConnectEvents:[`stream`,`commit`],ignoredGenesisResources:[],startDelay:5e3,checkInterval:1e4,checkTimeout:3e3,resourceChecks:e=>J(void 0,void 0,void 0,function*(){let t=yield wv().getMoreColumns(e),n=Date.now(),r=t;return{isConnected:t.MESSAGE_TYPE===Lg.MORE_COLUMNS_ACK,lastUpdated:n,lastMessage:r}}),resourceDataLogon:({message:e,functions:t})=>{let{onMessage:n,onError:r}=t;yv().sendForStream(e,n,r)}},xy=N.createInterface(e=>e.instance(by));var Sy=/* @__PURE__ */ s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.bowser=r():n.bowser=r()})(e,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&typeof e==`object`&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&typeof e!=`string`)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18);t.default=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||``},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||``},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case`NT`:return`NT`;case`XP`:return`XP`;case`NT 5.0`:return`2000`;case`NT 5.1`:return`XP`;case`NT 5.2`:return`2003`;case`NT 6.0`:return`Vista`;case`NT 6.1`:return`7`;case`NT 6.2`:return`8`;case`NT 6.3`:return`8.1`;case`NT 10.0`:return`10`;default:return}},e.getMacOSVersionName=function(e){var t=e.split(`.`).splice(0,2).map((function(e){return parseInt(e,10)||0}));t.push(0);var n=t[0],r=t[1];if(n===10)switch(r){case 5:return`Leopard`;case 6:return`Snow Leopard`;case 7:return`Lion`;case 8:return`Mountain Lion`;case 9:return`Mavericks`;case 10:return`Yosemite`;case 11:return`El Capitan`;case 12:return`Sierra`;case 13:return`High Sierra`;case 14:return`Mojave`;case 15:return`Catalina`;default:return}switch(n){case 11:return`Big Sur`;case 12:return`Monterey`;case 13:return`Ventura`;case 14:return`Sonoma`;case 15:return`Sequoia`;default:return}},e.getAndroidVersionName=function(e){var t=e.split(`.`).splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(t[0]===1&&t[1]<5))return t[0]===1&&t[1]<6?`Cupcake`:t[0]===1&&t[1]>=6?`Donut`:t[0]===2&&t[1]<2?`Eclair`:t[0]===2&&t[1]===2?`Froyo`:t[0]===2&&t[1]>2?`Gingerbread`:t[0]===3?`Honeycomb`:t[0]===4&&t[1]<1?`Ice Cream Sandwich`:t[0]===4&&t[1]<4?`Jelly Bean`:t[0]===4&&t[1]>=4?`KitKat`:t[0]===5?`Lollipop`:t[0]===6?`Marshmallow`:t[0]===7?`Nougat`:t[0]===8?`Oreo`:t[0]===9?`Pie`:void 0},e.getVersionPrecision=function(e){return e.split(`.`).length},e.compareVersions=function(t,n,r){r===void 0&&(r=!1);var i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,c=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+Array(n+1).join(`.0`);return e.map(r.split(`.`),(function(e){return Array(20-e.length).join(`0`)+e})).reverse()}));for(r&&(s=o-Math.min(i,a)),--o;o>=s;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===s)return 0;--o}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,a=Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(a));var s=function(){var e=a[t];typeof e==`object`&&e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=a.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||``},e}(),e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={AmazonBot:`amazonbot`,"Amazon Silk":`amazon_silk`,"Android Browser":`android`,BaiduSpider:`baiduspider`,Bada:`bada`,BingCrawler:`bingcrawler`,Brave:`brave`,BlackBerry:`blackberry`,"ChatGPT-User":`chatgpt_user`,Chrome:`chrome`,ClaudeBot:`claudebot`,Chromium:`chromium`,Diffbot:`diffbot`,DuckDuckBot:`duckduckbot`,DuckDuckGo:`duckduckgo`,Electron:`electron`,Epiphany:`epiphany`,FacebookExternalHit:`facebookexternalhit`,Firefox:`firefox`,Focus:`focus`,Generic:`generic`,"Google Search":`google_search`,Googlebot:`googlebot`,GPTBot:`gptbot`,"Internet Explorer":`ie`,InternetArchiveCrawler:`internetarchivecrawler`,"K-Meleon":`k_meleon`,LibreWolf:`librewolf`,Linespider:`linespider`,Maxthon:`maxthon`,"Meta-ExternalAds":`meta_externalads`,"Meta-ExternalAgent":`meta_externalagent`,"Meta-ExternalFetcher":`meta_externalfetcher`,"Meta-WebIndexer":`meta_webindexer`,"Microsoft Edge":`edge`,"MZ Browser":`mz`,"NAVER Whale Browser":`naver`,"OAI-SearchBot":`oai_searchbot`,Omgilibot:`omgilibot`,Opera:`opera`,"Opera Coast":`opera_coast`,"Pale Moon":`pale_moon`,PerplexityBot:`perplexitybot`,"Perplexity-User":`perplexity_user`,PhantomJS:`phantomjs`,PingdomBot:`pingdombot`,Puffin:`puffin`,QQ:`qq`,QQLite:`qqlite`,QupZilla:`qupzilla`,Roku:`roku`,Safari:`safari`,Sailfish:`sailfish`,"Samsung Internet for Android":`samsung_internet`,SlackBot:`slackbot`,SeaMonkey:`seamonkey`,Sleipnir:`sleipnir`,"Sogou Browser":`sogou`,Swing:`swing`,Tizen:`tizen`,"UC Browser":`uc`,Vivaldi:`vivaldi`,"WebOS Browser":`webos`,WeChat:`wechat`,YahooSlurp:`yahooslurp`,"Yandex Browser":`yandex`,YandexBot:`yandexbot`,YouBot:`youbot`},t.BROWSER_MAP={amazonbot:`AmazonBot`,amazon_silk:`Amazon Silk`,android:`Android Browser`,baiduspider:`BaiduSpider`,bada:`Bada`,bingcrawler:`BingCrawler`,blackberry:`BlackBerry`,brave:`Brave`,chatgpt_user:`ChatGPT-User`,chrome:`Chrome`,claudebot:`ClaudeBot`,chromium:`Chromium`,diffbot:`Diffbot`,duckduckbot:`DuckDuckBot`,duckduckgo:`DuckDuckGo`,edge:`Microsoft Edge`,electron:`Electron`,epiphany:`Epiphany`,facebookexternalhit:`FacebookExternalHit`,firefox:`Firefox`,focus:`Focus`,generic:`Generic`,google_search:`Google Search`,googlebot:`Googlebot`,gptbot:`GPTBot`,ie:`Internet Explorer`,internetarchivecrawler:`InternetArchiveCrawler`,k_meleon:`K-Meleon`,librewolf:`LibreWolf`,linespider:`Linespider`,maxthon:`Maxthon`,meta_externalads:`Meta-ExternalAds`,meta_externalagent:`Meta-ExternalAgent`,meta_externalfetcher:`Meta-ExternalFetcher`,meta_webindexer:`Meta-WebIndexer`,mz:`MZ Browser`,naver:`NAVER Whale Browser`,oai_searchbot:`OAI-SearchBot`,omgilibot:`Omgilibot`,opera:`Opera`,opera_coast:`Opera Coast`,pale_moon:`Pale Moon`,perplexitybot:`PerplexityBot`,perplexity_user:`Perplexity-User`,phantomjs:`PhantomJS`,pingdombot:`PingdomBot`,puffin:`Puffin`,qq:`QQ Browser`,qqlite:`QQ Browser Lite`,qupzilla:`QupZilla`,roku:`Roku`,safari:`Safari`,sailfish:`Sailfish`,samsung_internet:`Samsung Internet for Android`,seamonkey:`SeaMonkey`,slackbot:`SlackBot`,sleipnir:`Sleipnir`,sogou:`Sogou Browser`,swing:`Swing`,tizen:`Tizen`,uc:`UC Browser`,vivaldi:`Vivaldi`,webos:`WebOS Browser`,wechat:`WeChat`,yahooslurp:`YahooSlurp`,yandex:`Yandex Browser`,yandexbot:`YandexBot`,youbot:`YouBot`},t.PLATFORMS_MAP={bot:`bot`,desktop:`desktop`,mobile:`mobile`,tablet:`tablet`,tv:`tv`},t.OS_MAP={Android:`Android`,Bada:`Bada`,BlackBerry:`BlackBerry`,ChromeOS:`Chrome OS`,HarmonyOS:`HarmonyOS`,iOS:`iOS`,Linux:`Linux`,MacOS:`macOS`,PlayStation4:`PlayStation 4`,Roku:`Roku`,Tizen:`Tizen`,WebOS:`WebOS`,Windows:`Windows`,WindowsPhone:`Windows Phone`},t.ENGINE_MAP={Blink:`Blink`,EdgeHTML:`EdgeHTML`,Gecko:`Gecko`,Presto:`Presto`,Trident:`Trident`,WebKit:`WebKit`}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},a=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.default=function(){function e(){}var t,n,r;return e.getParser=function(e,t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),typeof e!=`string`)throw Error(`UserAgent should be a string`);return new i.default(e,t,n)},e.parse=function(e,t){return t===void 0&&(t=null),new i.default(e,t).getResult()},t=e,r=[{key:`BROWSER_MAP`,get:function(){return a.BROWSER_MAP}},{key:`ENGINE_MAP`,get:function(){return a.ENGINE_MAP}},{key:`OS_MAP`,get:function(){return a.OS_MAP}},{key:`PLATFORMS_MAP`,get:function(){return a.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}(),e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),a=c(n(94)),o=c(n(95)),s=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}t.default=function(){function e(e,t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),e==null||e===``)throw Error(`UserAgent parameter can't be empty`);this._ua=e;var r=!1;typeof t==`boolean`?(r=t,this._hints=n):this._hints=typeof t==`object`&&t?t:null,this.parsedResult={},!0!==r&&this.parse()}var t=e.prototype;return t.getHints=function(){return this._hints},t.hasBrand=function(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var t=e.toLowerCase();return this._hints.brands.some((function(e){return e.brand&&e.brand.toLowerCase()===t}))},t.getBrandVersion=function(e){if(this._hints&&Array.isArray(this._hints.brands)){var t=e.toLowerCase(),n=this._hints.brands.find((function(e){return e.brand&&e.brand.toLowerCase()===t}));return n?n.version:void 0}},t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(r.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(Array.isArray(t.test))return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.browser=t.describe(this.getUA(),this)),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||``:this.getBrowser().name||``},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(Array.isArray(t.test))return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||``:t||``},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){e===void 0&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||``:t||``},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(a.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(Array.isArray(t.test))return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||``:this.getEngine().name||``},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(o.default,(function(t){if(typeof t.test==`function`)return t.test(e);if(Array.isArray(t.test))return t.test.some((function(t){return e.test(t)}));throw Error(`Browser's test function is not valid`)}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},a=0;if(Object.keys(e).forEach((function(t){var o=e[t];typeof o==`string`?(i[t]=o,a+=1):typeof o==`object`&&(n[t]=o,r+=1)})),r>0){var o=Object.keys(n),c=s.default.find(o,(function(e){return t.isOS(e)}));if(c){var l=this.satisfies(n[c]);if(l!==void 0)return l}var u=s.default.find(o,(function(e){return t.isPlatform(e)}));if(u){var d=this.satisfies(n[u]);if(d!==void 0)return d}}if(a>0){var f=Object.keys(i),p=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(p!==void 0)return this.compareVersion(i[p])}},t.isBrowser=function(e,t){t===void 0&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if(typeof i==`string`)return e[0]===`>`||e[0]===`<`?(n=e.substr(1),e[1]===`=`?(r=!0,n=e.substr(2)):t=[],e[0]===`>`?t.push(1):t.push(-1)):e[0]===`=`?n=e.substr(1):e[0]===`~`&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return t===void 0&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return e===void 0&&(e=[]),e.some((function(e){return t.is(e)}))},e}(),e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=/version\/(\d+(\.?_?\d+)+)/i;t.default=[{test:[/gptbot/i],describe:function(e){var t={name:`GPTBot`},n=i.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:`ChatGPT-User`},n=i.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:`OAI-SearchBot`},n=i.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:`ClaudeBot`},n=i.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:`Omgilibot`},n=i.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe:function(e){var t={name:`Diffbot`},n=i.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:`PerplexityBot`},n=i.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:`Perplexity-User`},n=i.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe:function(e){var t={name:`YouBot`},n=i.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:`Meta-WebIndexer`},n=i.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:`Meta-ExternalAds`},n=i.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:`Meta-ExternalAgent`},n=i.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:`Meta-ExternalFetcher`},n=i.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe:function(e){var t={name:`Googlebot`},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/linespider/i],describe:function(e){var t={name:`Linespider`},n=i.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe:function(e){var t={name:`AmazonBot`},n=i.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe:function(e){var t={name:`BingCrawler`},n=i.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe:function(e){var t={name:`BaiduSpider`},n=i.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:`DuckDuckBot`},n=i.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:`InternetArchiveCrawler`},n=i.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:`FacebookExternalHit`}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:`SlackBot`},n=i.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:`YahooSlurp`}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:`YandexBot`}}},{test:[/pingdom/i],describe:function(){return{name:`PingdomBot`}}},{test:[/opera/i],describe:function(e){var t={name:`Opera`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:`Opera`},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:`Samsung Internet for Android`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:`NAVER Whale Browser`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:`Pale Moon`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:`MZ Browser`},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:`Focus`},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:`Swing`},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:`Opera Coast`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:`Opera Touch`},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:`Yandex Browser`},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:`UC Browser`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:`Maxthon`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:`Epiphany`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:`Puffin`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:`Sleipnir`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:`K-Meleon`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:`WeChat`},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?`QQ Browser Lite`:`QQ Browser`},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:`Internet Explorer`},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:`Microsoft Edge`},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:`Microsoft Edge`},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:`Vivaldi`},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:`SeaMonkey`},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:`Sailfish`},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:`Amazon Silk`},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:`PhantomJS`},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:`SlimerJS`},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:`BlackBerry`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:`WebOS Browser`},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:`Bada`},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:`Tizen`},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:`QupZilla`},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe:function(e){var t={name:`LibreWolf`},n=i.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:`Firefox`},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:`Electron`},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:`Sogou Browser`},n=i.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),a=i.default.getFirstMatch(/se ([\d.]+)x/i,e),o=n||r||a;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:`Miui`},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return!!e.hasBrand(`DuckDuckGo`)||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var n={name:`DuckDuckGo`};if(t){var r=t.getBrandVersion(`DuckDuckGo`);if(r)return n.version=r,n}var a=i.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return a&&(n.version=a),n}},{test:function(e){return e.hasBrand(`Brave`)},describe:function(e,t){var n={name:`Brave`};if(t){var r=t.getBrandVersion(`Brave`);if(r)return n.version=r,n}return n}},{test:[/chromium/i],describe:function(e){var t={name:`Chromium`},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:`Chrome`},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:`Google Search`},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:`Android Browser`},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:`PlayStation 4`},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:`Safari`},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=e.search(`\\(`)===-1?/^(.*)\/(.*) /:/^(.*)\/(.*)[ \t]\((.*)/;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}],e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18);t.default=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:a.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,`.`),n=i.default.getMacOSVersionName(t),r={name:a.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,`.`);return{name:a.OS_MAP.iOS,version:t}}},{test:[/OpenHarmony/i],describe:function(e){var t=i.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:a.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:a.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}],e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18);t.default=[{test:[/googlebot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Google`}}},{test:[/linespider/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Line`}}},{test:[/amazonbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Amazon`}}},{test:[/gptbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`OpenAI`}}},{test:[/chatgpt-user/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`OpenAI`}}},{test:[/oai-searchbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`OpenAI`}}},{test:[/baiduspider/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Baidu`}}},{test:[/bingbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Bing`}}},{test:[/duckduckbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`DuckDuckGo`}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Anthropic`}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Webz.io`}}},{test:[/diffbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Diffbot`}}},{test:[/perplexitybot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Perplexity AI`}}},{test:[/perplexity-user/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Perplexity AI`}}},{test:[/youbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`You.com`}}},{test:[/ia_archiver/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Internet Archive`}}},{test:[/meta-webindexer/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Meta`}}},{test:[/meta-externalads/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Meta`}}},{test:[/meta-externalagent/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Meta`}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Meta`}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Meta`}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Slack`}}},{test:[/yahoo/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Yahoo`}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Yandex`}}},{test:[/pingdom/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:`Pingdom`}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&`Nova`,n={type:a.PLATFORMS_MAP.mobile,vendor:`Huawei`};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Nexus`}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Apple`,model:`iPad`}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Apple`,model:`iPad`}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Amazon`,model:`Kindle Fire HD 7`}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:`Amazon`}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:`Apple`,model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:`Nexus`}}},{test:[/Nokia/i],describe:function(e){var t=i.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:a.PLATFORMS_MAP.mobile,vendor:`Nokia`};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return e.getBrowserName(!0)===`blackberry`},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:`BlackBerry`}}},{test:function(e){return e.getBrowserName(!0)===`bada`},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return e.getBrowserName()===`windows phone`},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:`Microsoft`}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(`.`)[0]);return e.getOSName(!0)===`android`&&t>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){return e.getOSName(!0)===`android`},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:[/smart-?tv|smarttv/i],describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return e.getOSName(!0)===`macos`},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:`Apple`}}},{test:function(e){return e.getOSName(!0)===`windows`},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return e.getOSName(!0)===`linux`},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return e.getOSName(!0)===`playstation 4`},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return e.getOSName(!0)===`roku`},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}],e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18);t.default=[{test:function(e){return e.getBrowserName(!0)===`microsoft edge`},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],e.exports=t.default}})}))})),Cy=/* @__PURE__ */ s(((e,t)=>{t.exports=s,s.default=s,s.stable=d,s.stableStringify=d;var n=`[...]`,r=`[Circular]`,i=[],a=[];function o(){return{depthLimit:2**53-1,edgesLimit:2**53-1}}function s(e,t,n,r){r===void 0&&(r=o()),l(e,``,0,[],void 0,0,r);var s;try{s=a.length===0?JSON.stringify(e,t,n):JSON.stringify(e,p(t),n)}catch{return JSON.stringify(`[unable to serialize, circular reference is too complex to analyze]`)}finally{for(;i.length!==0;){var c=i.pop();c.length===4?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function c(e,t,n,r){var o=Object.getOwnPropertyDescriptor(r,n);o.get===void 0?(r[n]=e,i.push([r,n,t])):o.configurable?(Object.defineProperty(r,n,{value:e}),i.push([r,n,t,o])):a.push([t,n,e])}function l(e,t,i,a,o,s,u){s+=1;var d;if(typeof e==`object`&&e){for(d=0;d<a.length;d++)if(a[d]===e){c(r,e,t,o);return}if(u.depthLimit!==void 0&&s>u.depthLimit){c(n,e,t,o);return}if(u.edgesLimit!==void 0&&i+1>u.edgesLimit){c(n,e,t,o);return}if(a.push(e),Array.isArray(e))for(d=0;d<e.length;d++)l(e[d],d,d,a,e,s,u);else{var f=Object.keys(e);for(d=0;d<f.length;d++){var p=f[d];l(e[p],p,d,a,e,s,u)}}a.pop()}}function u(e,t){return e<t?-1:+(e>t)}function d(e,t,n,r){r===void 0&&(r=o());var s=f(e,``,0,[],void 0,0,r)||e,c;try{c=a.length===0?JSON.stringify(s,t,n):JSON.stringify(s,p(t),n)}catch{return JSON.stringify(`[unable to serialize, circular reference is too complex to analyze]`)}finally{for(;i.length!==0;){var l=i.pop();l.length===4?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return c}function f(e,t,a,o,s,l,d){l+=1;var p;if(typeof e==`object`&&e){for(p=0;p<o.length;p++)if(o[p]===e){c(r,e,t,s);return}try{if(typeof e.toJSON==`function`)return}catch{return}if(d.depthLimit!==void 0&&l>d.depthLimit){c(n,e,t,s);return}if(d.edgesLimit!==void 0&&a+1>d.edgesLimit){c(n,e,t,s);return}if(o.push(e),Array.isArray(e))for(p=0;p<e.length;p++)f(e[p],p,p,o,e,l,d);else{var m={},h=Object.keys(e).sort(u);for(p=0;p<h.length;p++){var g=h[p];f(e[g],g,p,o,e,l,d),m[g]=e[g]}if(s!==void 0)i.push([s,t,e]),s[t]=m;else return m}o.pop()}}function p(e){return e=e===void 0?function(e,t){return t}:e,function(t,n){if(a.length>0)for(var r=0;r<a.length;r++){var i=a[r];if(i[1]===t&&i[0]===n){n=i[2],a.splice(r,1);break}}return e.call(this,t,n)}}})),wy=/* @__PURE__ */ u(Sy()),Ty=/* @__PURE__ */ u(Cy());let Ey=Jd(`network-monitor`,{level:Dd.info}),Dy=Date.now(),Oy=window.navigator?.userAgent?wy.default.parse(window.navigator.userAgent):void 0,ky=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:typeof e==`string`?e:(0,Ty.default)(e,void 0,2,t);var Ay=class{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>J(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;Ey.info(`Run health checks, triggered by`,ky(e),`| Active resources`,this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let n=this.getFormattedTimestamp(this.getNowTimestamp()),r=yield this.isOnlineCheck();r?Ey.debug(`Network connected at ${n}`):Ey.warn(`Network disconnected at ${n}`);let i=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),r),a=this.preFlightSocketChecks(i);if(a||Ey.debug(`Socket pre-flight checks failed`),!r||!a){Ey.debug(`Aborting remaining health checks`);let e=[...this.resources].reduce((e,[t,n])=>{let i=e[n.resourceName];return i?(i.sourceRef=[...i.sourceRef,n.message.SOURCE_REF],e):Object.assign(Object.assign({},e),{[n.resourceName]:this.normaliseResourceHealth({name:n.resourceName,sourceRef:[n.message.SOURCE_REF],isConnected:n.isConnected,lastUpdated:n.lastUpdated},r)})},{});this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:r,resources:e,resourcesAllConnected:!1,socket:i}),this.isRunningChecks=!1;return}let o=!0,s=[];this.resources.forEach((e,t)=>{let{resourceName:r,message:i,functions:a}=e,{resourceChecks:c=this.config.resourceChecks,resourceDataLogon:l=this.config.resourceDataLogon}=a,{SOURCE_REF:u}=i,d=!1,f,p,m,h,g;s.push(J(this,void 0,void 0,function*(){try{Ey.debug(`Running health check against ${r}`);let e=yield Promise.race([c(u,t),dp(this.config.checkTimeout,()=>({isConnected:!1,lastUpdated:this.getNowTimestamp(),timeout:!0}))]);d=e.isConnected,f=e.lastUpdated,p=e.lastMessage,h=e.timeout}catch(e){d=!1,f=this.getNowTimestamp(),m=e,p=e?.receivedMessage??e}return g=p?.MESSAGE_TYPE===Lg.MSG_NACK||Hg(p,kg.NOT_FOUND),n=this.getFormattedTimestamp(f??this.getNowTimestamp()),d?Ey.debug(`${r} is healthy at ${n}`):Ey.warn(`${r} is not healthy at ${n}`),p&&Ey.debug(`${r} messaged at ${n}`,ky(p)),m&&Ey.error(`${r} errored at ${n}`,ky(m)),h&&Ey.warn(`${r} timed out at ${n}`),g&&(Ey.error(`${r} issue, re-attempting data logon at ${n}`),l(e)),o&&(o=d),{name:r,sourceRef:[u],isConnected:d,lastUpdated:f,lastError:m}}))});let c=(yield Promise.allSettled(s)).reduce((e,t)=>{if(t.status===`fulfilled`){let n=e[t.value.name];return n?(n.sourceRef=[...n.sourceRef,...t.value.sourceRef],e):Object.assign(Object.assign({},e),{[t.value.name]:this.normaliseResourceHealth(t.value)})}return Ey.warn(`Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult.`),e},{});Ey.debug(`Health checks complete`),this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:r,resources:c,resourcesAllConnected:o,socket:i}),this.isRunningChecks=!1}),this.config.logLevel!==void 0&&(Ey.level=this.config.logLevel)}create(){if(this.resources){Ey.warn(`NetworkMonitor already created. If this is intentional, please call NetworkMonitor.destroy first.`);return}this.addListeners(),this.resources=/* @__PURE__ */ new Map,setTimeout(()=>{this.isReady=!0,this.synchroniseCheckInterval(),this.runAllChecks(`NetworkMonitor.create()`)},this.config.startDelay)}destroy(){this.removeListeners(),clearInterval(this.internalId),this.resources.clear(),this.resources=void 0,this.status=void 0,this.isReady=void 0}isOnlineCheck(){return Promise.resolve(navigator.onLine)}addResource(e,t){this.resources||this.create(),this.resources.set(e,t)}removeResource(e){this.resources.delete(e)}addListeners(){var e,t;(e=this.config.windowEvents)==null||e.forEach(e=>window.addEventListener(e,this.runAllChecks)),(t=this.config.documentEvents)==null||t.forEach(e=>document.addEventListener(e,this.runAllChecks)),this.config.genesisConnectEvents.includes(`stream`)&&this.unsubscribableObservers.push(this.connectEvents.addStreamListener(({detail:e})=>{let{functions:t,message:n,resourceName:r,stream:i}=e;this.config.ignoredGenesisResources.includes(r)||this.addResource(i,{functions:t,message:n,resourceName:r})},({detail:e})=>{let{resourceName:t,stream:n}=e;this.config.ignoredGenesisResources.includes(t)||this.removeResource(n)},({detail:e})=>{let{resourceName:t,stream:n,error:r}=e,i=r.receivedMessage??r,a=``;Hg(i,kg.NOT_FOUND)?a=`Please check the resource is running.`:Hg(i,kg.FORBIDDEN)&&(a=`You are not authorised to access this resource, removing it from monitoring.`,this.removeResource(n)),Ey.error(`${t} errored at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,a,r)})),this.config.genesisConnectEvents.includes(`commit`)&&this.unsubscribableObservers.push(this.connectEvents.addCommitListener(e=>{this.config.ignoredGenesisResources.includes(e.detail.eventName)||this.runAllChecks(e)})),this.unsubscribableObservers.push(this.connectEvents.addMetadataListener(({detail:e})=>{let{resourceName:t,error:n}=e;if(n){Ey.error(`${t} had an unrecoverable error at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,`Please check the resource is running.`,n);return}}))}removeListeners(){var e,t;(e=this.config.windowEvents)==null||e.forEach(e=>window.removeEventListener(e,this.runAllChecks)),(t=this.config.documentEvents)==null||t.forEach(e=>document.removeEventListener(e,this.runAllChecks)),this.unsubscribableObservers.forEach(e=>e()),this.unsubscribableObservers.length=0}reportSystemHealth(e){let t=this.config.eventEmitter??document;this.status=this.normaliseEventDetail(e),(this.status.isHealthy?Ey.debug:Ey.warn)(`Emitting 'system-health-changed' event`,ky(this.status)),t?.dispatchEvent(new CustomEvent(`system-health-changed`,{detail:this.status,bubbles:t!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(Ey.debug(`Network monitoring no longer required. Please check your network and reload your application.`),this.destroy())}reportStabilityToGenesis(e){return J(this,void 0,void 0,function*(){return Ey.debug(`User requested report stability to Genesis.`),Ey.info(`Please attach this data to your Genesis Support request:
246
- `,JSON.stringify(e,null,2)),!0})}normaliseResourceHealth(e,t=!0){let n=t?e.isConnected:!1,r=e.lastUpdated??this.getNowTimestamp();return Object.assign(Object.assign({},e),{isConnected:n,lastUpdated:r})}normaliseSerializedSocketStatus(e,t=!0){let n=t?e.isConnected:!1,r=!n;return Object.assign(Object.assign({},e),{isConnected:n,isDisconnected:r})}normaliseEventDetail(e){let t=!!(e.socket?.isConfigured?e.isOnline&&e.socket?.isConnected&&e.resourcesAllConnected:e.isOnline),n=e.lastUpdated??this.getNowTimestamp(),r=e.nextUpdate??this.getNextTimestamp(),i=e.isAuthenticated&&this.user?this.user.username:void 0,a=Object.assign(Object.assign({},e),{browserInformation:Oy,username:i,isHealthy:t,lastUpdated:n,nextUpdate:r,firstUpdated:Dy,runAllChecks:()=>{Ey.debug(`User activated run checks command starting.`),this.runAllChecks(`user requested`)},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(a)});return a}preFlightSocketChecks(e){if(!e.isConfigured)return Ey.debug(`Socket not configured`),!1;if(e.isReconnecting)return Ey.debug(`Socket reconnecting`),!1;if(e.isConnecting)return Ey.debug(`Socket connecting`),!1;if(e.isDisconnected){let t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:``;return Ey.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&Ey.debug(`Socket reconnection limit reached`),!1}let t=this.user.isAuthenticated?`with`:`without`;return Ey.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return tp(e)}getNowTimestamp(){return Date.now()}getNextTimestamp(){return new Date(Date.now()+this.config.checkInterval).getTime()}synchroniseCheckInterval(){clearInterval(this.internalId),this.internalId=setInterval(()=>this.runAllChecks(`check interval`),this.config.checkInterval)}};q([xy],Ay.prototype,`config`,void 0),q([fv],Ay.prototype,`socketStatus`,void 0),q([Dg],Ay.prototype,`connectEvents`,void 0),q([yg],Ay.prototype,`user`,void 0),q([C],Ay.prototype,`status`,void 0);let jy=N.createInterface(e=>e.singleton(Ay)),My={account:`genesis`,namespace:`default`,authKey:`kv-default`,authEmail:void 0},Ny=N.createInterface();var Py;(function(e){e.REQ_KEY_VALUE_LIST=`REQ_KEY_VALUE_LIST`,e.REQ_KEY_VALUE_READ=`REQ_KEY_VALUE_READ`})(Py||(Py={}));var Fy;(function(e){e.EVENT_KEY_VALUE_PUT=`EVENT_KEY_VALUE_PUT`,e.EVENT_KEY_VALUE_DELETE=`EVENT_KEY_VALUE_DELETE`})(Fy||(Fy={}));let Iy=class{constructor(e,t,n=My){this.connect=e,this.user=t,this.kvStorageConfig=n}delete(e){return J(this,void 0,void 0,function*(){let t={DETAILS:{KEYS:e}},n=yield this.connect.commitEvent(Fy.EVENT_KEY_VALUE_DELETE,t);return n&&n.MESSAGE_TYPE===`EVENT_ACK`?!0:{ERROR:n.ERROR,WARNING:n.WARNING}})}get(e){return J(this,void 0,void 0,function*(){let t={REQUEST:{USER_NAME:this.kvStorageConfig.authEmail??this.user.userName,KEY:e}},n=yield this.connect.request(Py.REQ_KEY_VALUE_READ,t);if(n&&n.REPLY&&n.REPLY.length>0){let t=n.REPLY.map(e=>{let t=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:t}}});return e?t[0]:t}return e?void 0:[]})}getDecodedValue(e){!e.startsWith(`str:`)&&!e.startsWith(`bin:`)&&(e=`str:${e}`);let t=zf(e);return typeof t==`string`&&t.startsWith(`str:`)&&(t=zf(t)),typeof t==`string`&&t.startsWith(`bin:`)&&(t=zf(t)),t}list(){return J(this,void 0,void 0,function*(){let e={REQUEST:{USER_NAME:this.kvStorageConfig.authEmail??this.user.userName}},t=yield this.connect.request(Py.REQ_KEY_VALUE_LIST,e);return t&&t.REPLY&&t.REPLY.length>0?t.REPLY.map(e=>e.KEY):[]})}put(e){return J(this,void 0,void 0,function*(){let t={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?Vf(e.value):e.value}))}},n=yield this.connect.commitEvent(Fy.EVENT_KEY_VALUE_PUT,t);return n&&n.MESSAGE_TYPE===`EVENT_ACK`?!0:{ERROR:n.ERROR,WARNING:n.WARNING}})}};Iy=q([pd(0,Cv),pd(1,yg),pd(2,Lt(Ny))],Iy),N.createInterface(e=>e.singleton(Iy));var Ly=class{constructor(){this.isWorking=!1,this.loggedUserResult=null,this.currentUser=null,this.isLoggedIn=!1,this.isLoggedInSubject=new Zm(!1)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}login(e){return J(this,void 0,void 0,function*(){return Promise.resolve(this.nextLoginResult)})}logout(){return J(this,void 0,void 0,function*(){return Promise.resolve(this.nextLogoutResult)})}reAuthFromSession(){return J(this,void 0,void 0,function*(){return Promise.resolve(this.nextReAuthResult)})}setTestUser(e={}){this.currentUser=new vg,this.currentUser.set(Object.assign({userName:`JaneDee`,profile:[`USER`],permission:[`CreateRules`]},e)),this.isLoggedIn=!0,this.isLoggedInSubject.next(!0)}resetTestUser(){this.currentUser=null,this.isLoggedIn=!1,this.isLoggedInSubject.next(!1)}};q([C],Ly.prototype,`isWorking`,void 0),q([C],Ly.prototype,`loggedUserResult`,void 0),q([C],Ly.prototype,`currentUser`,void 0),q([C],Ly.prototype,`isLoggedIn`,void 0);var Ry=class{constructor(){this.fetchMetadataRequired=!0,this.fetchingMetadata=!1,this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.customRequestFields=[],this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.criteriaOnlyRequest=!1}init(e,t){return Promise.resolve(this.initialized)}startStream(){return Promise.resolve()}setMetadata(e){this.availableIndexes=e.INDEXES??[],this.availableSortableFields=e.SORTABLE_FIELDS??[],this.availableCriteriaFields=e.CRITERIA_FIELDS??[],this.originalFieldDef=Tg(e),this.fieldMetadata=wg(this.originalFieldDef),this.requestFields=e.REQUEST_FIELD||[],this.customRequestFields=e.FIELD||[],this.fetchMetadataRequired=!1}unsetMedata(){this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.fetchMetadataRequired=!0}setStream(e){this.stream=Oh(Promise.resolve(e))}unsetStream(){this.stream=void 0}deinit(){}destroy(){}validResourceName(e){return!(!e||!e.trim().length)}getMetadata(e){return Promise.resolve(this.fieldMetadata)}snapshot(e){return Promise.resolve(null)}snapshotFiltered(e){return Promise.resolve(null)}updateData(e){return Promise.resolve()}dataHandler(e){return[]}addView(e){}dropView(e){}setFilter(e,t,n){return Promise.resolve()}clearFilter(e){return Promise.resolve()}createItem(e){return Promise.resolve(``)}deleteItem(e){return Promise.resolve()}updateItem(e,t){return Promise.resolve()}get dataserverOnlyParams(){return{}}get requestOnlyParams(){return{}}updateLoadMoreCount(e){}};q([C],Ry.prototype,`status`,void 0),q([C],Ry.prototype,`fetchMetadataRequired`,void 0),q([C],Ry.prototype,`originalFieldDef`,void 0),q([C],Ry.prototype,`fieldMetadata`,void 0),q([C],Ry.prototype,`requestFields`,void 0),q([C],Ry.prototype,`customRequestFields`,void 0),q([C],Ry.prototype,`availableIndexes`,void 0),q([C],Ry.prototype,`availableSortableFields`,void 0),q([C],Ry.prototype,`availableCriteriaFields`,void 0),q([C],Ry.prototype,`criteriaOnlyRequest`,void 0),N.createInterface(e=>e.aliasTo(yg));let zy=Jd(`foundation-ui`);var By=class extends cy(P){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=ty.MAX_ROWS_250,this.maxView=ty.MAX_VIEW_1000,this.resourceName=``,this.reverse=!1,this.withTimestampFormatting=!0,this.appliedDatasourceConfig={},this.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.pendingMoreRows=0,this.viewRowCount=0,this.nextRequestOffset=0,this.rowsSyncedWithStream=/* @__PURE__ */ new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=/* @__PURE__ */ new Map,this.update=new Zm(/* @__PURE__ */ new Map),this.fetchGeneration=0}criteriaChanged(e,t){let n=e!==vy(t,`;`);this.refetchIfInitializedAndChanged(n)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){let n=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(n)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&this.fetchGenesisData(null)}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{let n=e[t];n!==void 0&&n!==this.appliedDatasourceConfig[t]&&(this.appliedDatasourceConfig[t]=n,this[t]=n)})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),(e=this.dataSub)==null||e.unsubscribe(),(t=this.update)==null||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}get effectiveRowId(){return this.rowId?this.rowId:this.datasource?.resourceType===Sg.REQUEST_SERVER?ty.REQUEST_SERVER_ROW_ID:ty.DATASERVER_ROW_ID}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return J(this,arguments,void 0,function*(e=!0){var t;(t=this.dataSub)==null||t.unsubscribe(),this.dataSub=void 0,this.moreRowsAvailable=!1,this.pendingMoreRows=0,this.serverMoreRows=void 0,this.viewRowCount=0,this.pagingStopped=void 0,this.nextRequestOffset=0,this.fetchGeneration+=1;let n=this.fetchGeneration,r=()=>n!==this.fetchGeneration;if(this.data){this.syncComponentData(this.data);return}let i=e||!this.datasource.initialized;i||(this.connect.dataLogoff(this.sourceRef),this.clearData()),this.sourceRef=void 0;let a=yield this.datasource.init(this.datasourceOptions(),i);if(!r()){if(!a){this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:`error`});return}if(this.isSnapshot){let e=yield this.datasource.snapshot();if(r())return;let t=this.filterSnapshotResult(e);this.updateRequestPagingState(e,t?.length??0,this.initialRequestOffset()),this.syncComponentData(t);return}zy.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(r())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:`error`}),this.sourceRef=e.SOURCE_REF;let t=e.ROW?ey(e):void 0;this.updateStreamPagingState(e,t);let n=e.MESSAGE_TYPE;if(n&&n===Lg.LOGOFF_ACK){this.dataSubWasLoggedOff=!0;return}this.dataSubWasLoggedOff=!1,t?this.handleStreamUpdate(t):this.handleStreamUpdate(e)})}})}initDatasource(){return J(this,void 0,void 0,function*(){yield this.datasource.init(this.datasourceOptions(),!0)})}canRequestMoreRows(){if(!this.isConnected||!this.datasource||!this.moreRowsAvailable)return!1;switch(this.datasource.resourceType){case Sg.REQUEST_SERVER:return!0;case Sg.DATASERVER:return!!this.sourceRef&&!this.dataSubWasLoggedOff;default:return!1}}requestMoreRows(){return J(this,void 0,void 0,function*(){if(this.canRequestMoreRows())try{if(this.datasource.resourceType===Sg.DATASERVER){this.pendingMoreRows+=1,yield this.connect.getMoreRows(this.sourceRef);return}let e=this.fetchGeneration,t=this.nextRequestOffset;this.moreRowsAvailable=!1;let n=yield this.datasource.snapshot({DETAILS:Object.assign(Object.assign({},this.datasource.requestOnlyParams?.DETAILS),{OFFSET:t})});if(e!==this.fetchGeneration)return;let r=Array.isArray(n?.REPLY)?n.REPLY:[];this.updateRequestPagingState(n,r.length,t),r.length>0&&this.handleStreamInserts(r)}catch(e){throw this.moreRowsAvailable=!0,this.pendingMoreRows=Math.max(0,this.pendingMoreRows-1),this.handleError({message:`Failed to request more rows for ${this.resourceName}`,loggerType:`error`,loggerArgs:[e]}),e}})}filterSnapshotResult(e){if(e){if(Array.isArray(e))return e;if(e.REPLY)return e.REPLY;if(e.ROW)return ey(e).inserts}}updateStreamPagingState(e,t){let n=typeof e?.MORE_ROWS==`boolean`;if(this.datasource.resourceType!==Sg.DATASERVER){n&&(this.moreRowsAvailable=e.MORE_ROWS);return}this.viewRowCount=Math.max(0,this.viewRowCount+(t?.inserts?.length??0)-(t?.deletes?.length??0));let r=!1;if(n&&(r=this.pendingMoreRows>0,this.pendingMoreRows=Math.max(0,this.pendingMoreRows-1),this.serverMoreRows=e.MORE_ROWS),this.serverMoreRows===void 0)return;let i=r&&e.MORE_ROWS===!0&&!e.ROW?.length,a=ay({moreRows:this.serverMoreRows,emptyReply:i,rowsHeld:this.viewRowCount,maxView:this.maxView});if(a===`more`&&this.pagingStopped===`view-full`)this.pagingStopped=void 0;else if((a===`view-full`||a===`stalled`)&&!this.pagingStopped){this.pagingStopped=a;let e=oy({status:a,resourceName:this.resourceName,rowsHeld:this.viewRowCount,maxView:this.maxView,emptyReply:i,attribute:`maxView`});e&&zy.warn(e)}this.moreRowsAvailable=a===`more`&&!this.pagingStopped}updateRequestPagingState(e,t,n){if(Array.isArray(e)||!e){this.moreRowsAvailable=!1;return}let r=e,i=r.NEXT_OFFSET,a=typeof i==`number`&&i>n,o=Number(this.maxRows)||0,s=t>0&&o>0&&t>=o;this.moreRowsAvailable=typeof r.MORE_ROWS==`boolean`?r.MORE_ROWS:i!==-1&&(a||s),this.nextRequestOffset=a?i:n+t}initialRequestOffset(){return Number(this.datasource.requestOnlyParams?.DETAILS?.OFFSET)||0}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){e&&(e.hasOwnProperty(`REPLY`)?this.applyRequestServerData(e):this.applyDataserverData(e))}applyRequestServerData(e){var t;if(!Array.isArray(e.REPLY)||!e.MESSAGE_TYPE?.startsWith(`REP_`)){this.handleError({message:`received invalid RequestServerResult`,loggerType:`error`,loggerArgs:[e]});return}if(this.requiresFullDataRefresh){(t=e.REPLY)==null||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)}),this.syncComponentData(Array.from(this.rowsSyncedWithStream.values()));return}this.handleStreamInserts(e.REPLY);let n=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(n)}applyDataserverData(e){var t;if(this.requiresFullDataRefresh){(t=e.inserts)==null||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)});let n=Array.from(this.rowsSyncedWithStream.values());this.syncComponentData(n);return}e.inserts?.length>0&&this.handleStreamInserts(e.inserts),e.deletes?.length>0&&this.handleStreamDeletes(e.deletes),e.updates?.length>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){return vy((this.criteria?.split(`;`)||[]).join(` && `),`;`)}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}handleError(e={}){let{message:t,loggerType:n,loggerArgs:r=[]}=e;t&&zy[n](t,...r)}getFieldMetadata(e){return this.datasource.fieldMetadata?.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===xg.DATE||t===xg.DATETIME?np(e,t===xg.DATETIME):e}};q([Cv],By.prototype,`connect`,void 0),q([gy],By.prototype,`datasource`,void 0),q([D({mode:`boolean`})],By.prototype,`withGridInit`,void 0),q([D],By.prototype,`criteria`,void 0),q([C],By.prototype,`data`,void 0),q([D],By.prototype,`fields`,void 0),q([D({mode:`boolean`})],By.prototype,`isSnapshot`,void 0),q([D],By.prototype,`maxRows`,void 0),q([D],By.prototype,`maxView`,void 0),q([D],By.prototype,`orderBy`,void 0),q([D],By.prototype,`request`,void 0),q([D],By.prototype,`resourceName`,void 0),q([D({mode:`boolean`})],By.prototype,`reverse`,void 0),q([D],By.prototype,`rowId`,void 0),q([D({mode:`boolean`,attribute:`with-timestamp-formatting`})],By.prototype,`withTimestampFormatting`,void 0);let Vy=(e,t)=>!e.composedPath().includes(t),Hy=(e,t)=>e.composedPath().includes(t),Uy=e=>e.tagName.toLowerCase().split(`-`)[0];function Wy(e){let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement:document.activeElement}let Gy=Jd(`foundation-criteria`);var Ky;(function(e){e.AND=`&&`,e.OR=`||`,e.NOT=`!`,e.GT=`>`,e.GE=`>=`,e.LT=`<`,e.LE=`<=`,e.NE=`!=`,e.EQ=`==`})(Ky||(Ky={}));var qy=class e{constructor(e){this.$$operator=e}static And(){return new e(Ky.AND)}static Or(){return new e(Ky.OR)}static Not(){return new e(Ky.NOT)}static GreaterThan(){return new e(Ky.GT)}static GreaterThanOrEqual(){return new e(Ky.GE)}static LessThan(){return new e(Ky.LT)}static LessThanOrEqual(){return new e(Ky.LE)}static NotEqual(){return new e(Ky.NE)}static Equal(){return new e(Ky.EQ)}get operator(){return this.$$operator}};let Jy=e=>e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`),Yy=e=>`'${Jy(e)}'`,Xy=e=>{let{value:t}=e;return e.valueGetter?e.valueGetter(t):typeof t==`function`?t(e):Array.isArray(t)?t.join(`,`):typeof t==`string`?Yy(t):t},Zy=e=>t=>`${t.field} ${e} ${Xy(t)}`,Qy=e=>Zy(Ky.NE)(e),$y=e=>`${e.field}.contains(${Xy(e)})`,eb={AND:e=>Zy(Ky.AND)(e),OR:e=>Zy(Ky.OR)(e),NOT:Qy,GT:e=>Zy(Ky.GT)(e),GE:e=>Zy(Ky.GE)(e),LT:e=>Zy(Ky.LT)(e),LE:e=>Zy(Ky.LE)(e),NE:Qy,EQ:e=>Zy(Ky.EQ)(e),equals:e=>`${e.field}.equals(${Xy(e)})`,equalsIgnoreCase:e=>`${e.field}.equalsIgnoreCase(${Xy(e)})`,contains:$y,fieldContains:$y,containsIgnoreCase:e=>`Expr.containsIgnoreCase(${e.field}, ${Xy(e)})`,startsWith:e=>`${e.field}.startsWith(${Xy(e)})`,endsWith:e=>`${e.field}.endsWith(${Xy(e)})`,dateIsToday:e=>`Expr.dateIsToday(${e.field})`,dateIsEqual:e=>`Expr.dateIsEqual(${e.field}, ${Xy(e)})`,dateIsGreaterEqual:e=>`Expr.dateIsGreaterEqual(${e.field}, ${Xy(e)})`,dateIsLessEqual:e=>`Expr.dateIsLessEqual(${e.field}, ${Xy(e)})`,dateTimeIsGreaterEqual:e=>`Expr.dateTimeIsGreaterEqual(${e.field}, ${Xy(e)})`,dateTimeIsLessEqual:e=>`Expr.dateTimeIsLessEqual(${e.field}, ${Xy(e)})`},tb=(e,t)=>e.flat().flatMap((e,n,r)=>r.length-1===n?e:[e,t]),nb=e=>Array.isArray(e)?e:[e],rb=`default`;var ib=class{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,qy.And()),this.Or=(e,t={})=>this.withExpression(e,t,qy.Or()),this.Not=(e,t={})=>this.withExpression(e,t,qy.Not())}withExpression(e,t={},n=qy.And()){let{condition:r,join:i,groupName:a}=t,o=(e,t=rb)=>{let a=this.expressions[t]??[];this.expressions[t]=[...a,{join:n||i,condition:r,expression:e}]};if(Array.isArray(e)){if(i){let t=e.filter(e=>{let t=e instanceof qy;return t&&Gy.warn(`Inline joins will be discarded when join is defined in ExpressionOptions`),!t});a?t.forEach(e=>{o(e,a)}):o(tb(t,i),rb)}else o(e,rb)}else typeof e==`string`?o(e,rb):o(e,e.group);return this}build(e){let t=Object.entries(this.expressions).reduce((e,[t,n])=>Object.assign(Object.assign({},e),{[t]:`(${n.filter(({condition:e})=>!e||e()).map(({expression:e,join:t},n,r)=>this.parseExpression(e,r[n-1],t)).join(``)})`}),{});return e?e(t):`(${Object.values(t).join(` && `)})`}reset(){this.expressions={}}parseExpression(e,t,n){let r=[];return n&&t&&r.push(` ${n.operator} `),typeof e==`string`?r.push(e):Array.isArray(e)?(e.forEach((e,t,n)=>{if(e instanceof qy&&n[t-1]instanceof qy)throw Error(`Adjacent Join operations detected`)}),r.push(`(${e.map(e=>this.parseExpression(e,void 0)).join(``)})`)):e instanceof qy?r.push(` ${e.operator} `):e&&r.push(e.serialiser(e)),r.join(``)}},ab=class{constructor(e){this.serialiser=eb.EQ,this.build=()=>{if(!this.field)throw Error(`Missing required param 'field'`);if(this.value===void 0)throw Error(`Missing required param 'value'`);if(!this.serialiser)throw Error(`Missing required param 'serialise'`);return{field:this.field,value:this.value,serialiser:this.serialiser,params:this.params,valueGetter:this.valueGetter,group:this.group}},e&&(this.field=e.field,this.value=e.value,this.serialiser=e.serialiser,this.params=e.params,this.valueGetter=e.valueGetter,this.group=e.group)}withField(e){return this.field=e,this}withValue(e){return this.value=e,this}withSerialiser(e){return this.serialiser=e,this}withParams(e){return this.params=e,this}withValueGetter(e){return this.valueGetter=e,this}withGroup(e){return this.group=e,this}};let ob=(e=`rapid`)=>T`<${e}-segmented-control :value="${Ff(e=>e.selectedLabel)}"><slot name="label" slot='label'></slot>${j(e=>e.criteriaOptions,T`<${e}-segmented-item @click=${(e,t)=>t.parent.itemClickHandler(e.label)}value=${e=>e.label}>${e=>e.label}</${e}-segmented-item>`)}</${e}-segmented-control>`,sb=class extends Qe{constructor(){super(...arguments),this.criteriaOptions=[],this.createCriteria=e=>{let t=new ib,{field:n,serialiser:r,value:i}=e;return Array.isArray(n)||Array.isArray(i)?t.And(nb(i).map(e=>nb(n).map(t=>new ab().withField(t).withValue(e).withSerialiser(r).build())),{join:qy.Or()}):t.And(new ab().withField(n).withValue(i).withSerialiser(r).build()),t}}valueChanged(){this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))}selectedLabelChanged(){let e=this.criteriaOptions.find(e=>e.label===this.selectedLabel);this.value=e?this.createCriteria(e).build():``}itemClickHandler(e){this.selectedLabel===e&&(this.selectedLabel=void 0)}};q([C],sb.prototype,`criteriaOptions`,void 0),q([C],sb.prototype,`prefix`,void 0),q([C],sb.prototype,`value`,void 0),q([C],sb.prototype,`selectedLabel`,void 0),sb=q([$e({name:`criteria-segmented-control`,template:ob(),styles:O``})],sb);function cb(e,t){let n=new ib;n.withExpression(new ab().withField(e.labelField??e.valueField).withValue(t).withSerialiser(eb.containsIgnoreCase).build()),e.criteria=e.baseCriteria?`${e.baseCriteria} && ${n.build()}`:n.build()}function lb(e,t){let n=new ib;n.withExpression(new ab().withField(e.valueField).withValue(t).withSerialiser(eb.equals).build()),e.criteria=e.baseCriteria?`${e.baseCriteria} && ${n.build()}`:n.build()}let ub=(e,t,n)=>T`<${t}-icon tooltip="${()=>e}" name="${()=>n}"></${t}-icon>`,db=e=>T`<${e}-button ${k(`actionsOpener`)}id="actiosnMenuTrigger" class="actions-opener${e=>e.open?` opened`:``}" appearance="${e=>e.buttonAppearance}" part="actions-opener" @click=${e=>e.toggleActionsMenuVisibility()}>${e=>e.open?`✖`:T` ${e.name} `}</${e}-button><${e}-menu ${k(`actionsMenu`)}popover="manual" class="actions-menu ${e=>e.classNames}" part="actions-menu">${j(e=>e.allActions,T` ${A((e,t)=>e.isDisabled&&e.isDisabled(t.parent.rowData),T`<${e}-menu-item class="menu-item" tabindex="${(e,t)=>t.index}" disabled style=${(e,t)=>t.parent.hideDisabled?`display:none`:``}>${(e,t)=>t.parent.getLabel(e.name)}</${e}-menu-item>`)} ${A((e,t)=>!e.isDisabled||!e.isDisabled(t.parent.rowData),T`<${e}-menu-item class="menu-item" tabindex="${(e,t)=>t.index}" @click=${(e,t)=>t.parent.onActionMenuItemClick(e.callback)}style="${e=>e.color?`color: ${e.color};`:``}">${(e,t)=>t.parent.getLabel(e.name)}</${e}-menu-item>`)} `,{positioning:!0})}</${e}-menu>`,fb=e=>T`<${e}-button appearance="${e=>e.buttonAppearance}" part="actions-opener" class="actions-opener" @click=${e=>e?.singleOption.callback(e.rowData)}?disabled=${e=>e?.singleOption.isDisabled&&e?.singleOption.isDisabled(e.rowData)}>${e=>e.getLabel(e?.singleOption.name)}</${e}-button>`,pb=T`<div class="actions-container${e=>e.isVertical?` actions-vertical`:``}" part="actions-container">${e=>e.getTemplate(Uy(e))}</div>`;var mb=class extends P{constructor(){super(...arguments),this.isVertical=!1,this.addDefaultActions=!0,this.autoCloseOnAction=!0,this.name=`Actions`,this.open=!1,this.hideDisabled=!1,this.hideMenuSingleOption=!1}disconnectedCallback(){this.actionsMenu?.matches(`:popover-open`)&&this.actionsMenu.hidePopover(),super.disconnectedCallback()}updateMenuPosition(){let e=this.actionsOpener.getBoundingClientRect();this.actionsMenu.style.position=`fixed`,this.actionsMenu.style.top=`${e.top}px`,this.actionsMenu.style.left=`auto`,this.actionsMenu.style.right=`${window.innerWidth-e.right}px`}definitionChanged(e,t){this.actions=t?.actions??[],delete this.definition.actions,t.buttonText&&(this.name=t.buttonText,delete this.definition.customButtonText),t.isVertical&&(this.isVertical=t.isVertical,delete this.definition.isVertical),t.buttonAppearance&&(this.buttonAppearance=t.buttonAppearance,delete this.definition.buttonAppearance),t.hideMenuSingleOption&&(this.hideMenuSingleOption=t.hideMenuSingleOption,delete this.definition.hideMenuSingleOption)}openChanged(){this.classNames=dn([`visible`,this.open],[`hidden`,!this.open]),this.open?(this.updateMenuPosition(),this.actionsMenu.showPopover()):this.actionsMenu?.matches(`:popover-open`)&&this.actionsMenu.hidePopover()}toggleActionsMenuVisibility(){this.open=!this.open}onActionMenuItemClick(e){this.autoCloseOnAction&&(this.open=!1),e(this.rowData)}get allActions(){let e=[{name:`✖`,callback:()=>this.open=!1}];return this.addDefaultActions?[...this.actions??[],...e]:this.actions}get rowData(){if(!this.definition)return;let{node:e,data:t}=this.definition;return e?.data||t}getLabel(e){return typeof e==`function`?e(this.rowData):e}getTemplate(e){if(!this.hideMenuSingleOption)return db(e);let t=this.actions.filter(e=>!e.isDisabled||!e.isDisabled(this.rowData));if(this.singleOption=null,t.length!==0)return t.length===1?(this.singleOption=t[0],fb(e)):db(e)}};q([C],mb.prototype,`actions`,void 0),q([D({attribute:`is-vertical`,mode:`boolean`})],mb.prototype,`isVertical`,void 0),q([D({attribute:`add-default-actions`,mode:`boolean`})],mb.prototype,`addDefaultActions`,void 0),q([D({attribute:`auto-close-on-action`,mode:`boolean`})],mb.prototype,`autoCloseOnAction`,void 0),q([C],mb.prototype,`classNames`,void 0),q([C],mb.prototype,`definition`,void 0),q([D],mb.prototype,`name`,void 0),q([D({attribute:`open`,mode:`boolean`})],mb.prototype,`open`,void 0),q([D],mb.prototype,`buttonAppearance`,void 0),q([D({attribute:`hide-disabled`,mode:`boolean`})],mb.prototype,`hideDisabled`,void 0),q([D({attribute:`hide-menu-single-option`,mode:`boolean`})],mb.prototype,`hideMenuSingleOption`,void 0),q([C],mb.prototype,`singleOption`,void 0),mb.compose({baseName:`actions-menu`,styles:Lne,template:pb});let hb=()=>{};function gb(e){let t=new AbortController,n=e.filter(e=>e!=null),r=n.find(e=>e.aborted);if(r)return t.abort(r.reason),{signal:t.signal,dispose:hb};function i(){for(let e of n)e.removeEventListener(`abort`,a)}function a(){t.abort(this.reason),i()}for(let e of n)e.addEventListener(`abort`,a);return{signal:t.signal,dispose:i}}let _b=!1;try{typeof GENX_ENABLE_AI<`u`&&(_b=GENX_ENABLE_AI===`true`)}catch{}let vb=()=>_b||Uf(`ai`),yb=Jd(`foundation-ai`);function bb(){return typeof window<`u`&&(`SpeechRecognition`in window||`webkitSpeechRecognition`in window)}function xb(e,t){if(!bb())return null;let n=new(window.SpeechRecognition||window.webkitSpeechRecognition);n.continuous=!0,n.interimResults=!0,n.lang=`en-US`;let r=``;return n.onresult=t=>{let n=``,i=``;for(let e=t.resultIndex;e<t.results.length;e+=1){let r=t.results[e][0].transcript;t.results[e].isFinal?i+=r:n+=r}i?(r+=i,e(r,!0)):n&&e(r+n,!1)},n.onerror=e=>{e.error!==`aborted`&&t?.(e.error||`Speech recognition error`)},n.start(),()=>{try{n.stop()}catch{}}}var Sb=class{getStatus(){return J(this,void 0,void 0,function*(){return{provider:`none`,model:``}})}interpretCriteria(e,t){return J(this,void 0,void 0,function*(){return null})}};let Cb=Object.freeze({anthropic:`Anthropic`,gemini:`Gemini`,openai:`OpenAI`,chrome:`Chrome`});Object.freeze([`anthropic`,`gemini`]),new Map(Object.entries(Cb).map(([e,t])=>[t.toLowerCase(),e]));var wb=class extends Error{constructor(e,t,n,r,i){super(`${e} request refused: the AI usage budget is exhausted`+(t==null?``:` (spent ${n==null?`an unknown amount`:`$${n}`} of a $${t} budget)`)+(r?`: ${r}`:``)+`. Retrying will not clear this — the budget must be raised.`),this.vendorLabel=e,this.budgetUsd=t,this.spentUsd=n,this.detail=r,this.name=`BudgetExhaustedError`,this.otherVendorAvailable=i?.otherVendorAvailable,this.serverVendor=i?.serverVendor}};let Tb=(e,t)=>e===402||t===`BUDGET_EXCEEDED`,Eb=e=>{try{return JSON.parse(e)}catch{return}},Db=e=>{let t=e?.code;return typeof t==`string`?t:void 0},Ob=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,kb=e=>typeof e==`boolean`?e:void 0,Ab=e=>typeof e==`string`&&e.trim()!==``?e:void 0;function jb(e,t,n){let r=typeof t==`object`&&t?t:{},i=typeof r.details==`object`&&r.details!==null?r.details:{},a=typeof r.error==`string`?r.error:n;return new wb(e,Ob(r.budgetUsd)??Ob(i.budgetUsd),Ob(r.spentUsd)??Ob(i.spentUsd),a,{otherVendorAvailable:kb(r.otherVendorAvailable)??kb(i.otherVendorAvailable),serverVendor:Ab(r.vendor)??Ab(i.vendor)})}var Mb=class extends Error{constructor(e,t,n,r,i){super(`${e} refused the request (${t})`+(n==null?``:` — HTTP ${n}`)+(r?` ${r}`:``)+(i?`: ${i}`:``)+`. Retrying will not clear this — the provider account must be fixed.`),this.vendorLabel=e,this.kind=t,this.upstreamStatus=n,this.upstreamType=r,this.detail=i,this.name=`ProviderRefusedError`}};let Nb=Object.freeze([/credit balance/i,/usage limit/i,/spend limit/i,/insufficient (credit|funds|balance)/i]),Pb=Object.freeze([`authentication_error`,`permission_error`]);function Fb(e){let t=typeof e==`object`&&e?e:{};for(let e of[t.error,t.details?.error])if(typeof e==`object`&&e){let{type:t,message:n}=e;return{type:typeof t==`string`?t:void 0,message:typeof n==`string`?n:void 0}}}function Ib(e){let t=typeof e==`object`&&e?e:{},n=typeof t.details==`object`&&t.details!==null?t.details:{};for(let e of[t.kind,n.kind])if(e===`auth`||e===`spend`)return e}function Lb(e){let t=Fb(e);if(t?.type){if(Pb.includes(t.type))return`auth`;if(t.type===`billing_error`)return`spend`}}function Rb(e,t,n){if(t===`PROVIDER_REFUSED`)return Ib(n)??Lb(n)??`spend`;if(e!==`anthropic`)return;let r=Lb(n);if(r)return r;let i=Fb(n);if(i?.type===`invalid_request_error`&&i.message){let e=i.message;if(Nb.some(t=>t.test(e)))return`spend`}}function zb(e,t,n,r,i){let a=Fb(r);return new Mb(e,t,n,a?.type,a?.message??i)}function Bb(e){return Object.entries(Cb).find(([,t])=>t===e)?.[0]}let Vb=[`gemini-2.5-pro`,`gemini-2.5-flash`,`gemini-2.5-flash-lite`,`gemini-3.8-flash`,`gemini-3.5-flash`,`gemini-3.1-flash-lite`,`gemini-3.1-pro-preview`],Hb=[`claude-fable-5`,`claude-opus-4-8`,`claude-opus-4-7`,`claude-sonnet-5`,`claude-sonnet-4-6`,`claude-haiku-4-5-20251001`];function Ub(e){return e===`image/jpg`?`image/jpeg`:e}function Wb(e){return e.replace(/^data:[^,]*;base64,/,``)}let Gb=.5;function Kb(e,{defaultTemp:t,maxTemp:n}){let r=Math.min(Math.max(e,0),1);return r<=Gb?r/Gb*t:t+(r-Gb)/.5*(n-t)}let qb=1e6,Jb={"claude-haiku-4-5-20251001":{promptPerMillion:1,candidatePerMillion:5},"claude-fable-5":{promptPerMillion:10,candidatePerMillion:50},"claude-opus-4-8":{promptPerMillion:5,candidatePerMillion:25},"claude-opus-4-7":{promptPerMillion:5,candidatePerMillion:25},"claude-sonnet-5":{promptPerMillion:2,candidatePerMillion:10},"claude-sonnet-4-6":{promptPerMillion:3,candidatePerMillion:15}};function Yb(e){return Jb[e]}function Xb(e,t){let{promptPerMillion:n,candidatePerMillion:r}=Yb(e),i=qb,a=Math.max(0,t.cacheWriteTokens-t.cacheWrite1hTokens),o=t.uncachedInputTokens/i*n,s=t.cacheReadTokens/i*n*.1,c=a/i*n*1.25+t.cacheWrite1hTokens/i*n*2,l=t.outputTokens/i*r,u=t.cacheReadTokens/i*n,d=t.cacheWriteTokens/i*n;return{costUsd:o+s+c+l,savedUsd:u-s+(d-c),breakdown:{promptUsd:o,cacheReadUsd:s,cacheWriteUsd:c,candidateUsd:l}}}let Zb={"gemini-2.5-flash-lite":{kind:`flat`,rate:{promptPerMillion:.1,candidatePerMillion:.4}},"gemini-2.5-flash":{kind:`flat`,rate:{promptPerMillion:.3,candidatePerMillion:2.5}},"gemini-2.5-pro":{kind:`tiered`,standard:{promptPerMillion:1.25,candidatePerMillion:10},longContext:{promptPerMillion:2.5,candidatePerMillion:15}},"gemini-3.1-flash-lite":{kind:`flat`,rate:{promptPerMillion:.25,candidatePerMillion:1.5}},"gemini-3.5-flash":{kind:`flat`,rate:{promptPerMillion:1.5,candidatePerMillion:9}},"gemini-3.8-flash":{kind:`flat`,rate:{promptPerMillion:.75,candidatePerMillion:3.75}},"gemini-3.1-pro-preview":{kind:`tiered`,standard:{promptPerMillion:2,candidatePerMillion:12},longContext:{promptPerMillion:4,candidatePerMillion:18}}};function Qb(e,t){let n=Zb[e];return n.kind===`flat`?n.rate:t>2e5?n.longContext:n.standard}function $b(e,t){let{promptPerMillion:n,candidatePerMillion:r}=Qb(e,t.promptTokens),i=qb,a=Math.max(0,t.promptTokens-t.cachedTokens)/i*n,o=t.cachedTokens/i*n*.1,s=(t.candidateTokens+t.thoughtTokens)/i*r;return{costUsd:a+o+s,savedUsd:t.cachedTokens/i*n-o,breakdown:{promptUsd:a,cacheReadUsd:o,cacheWriteUsd:0,candidateUsd:s}}}let ex=[`properties`,`patternProperties`,`$defs`,`definitions`],tx=[`anyOf`,`oneOf`,`allOf`,`prefixItems`],nx=[`items`,`not`,`additionalProperties`,`propertyNames`,`contains`],rx=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function ix(e){if(Array.isArray(e))return e.map(ix);if(rx(e)){let t={};for(let[n,r]of Object.entries(e))t[n]=ix(r);return t}return e}function ax(e,t,n){let r={};for(let[i,a]of Object.entries(e)){let e=`${n}/${i}`;r[i]=ex.includes(i)&&rx(a)?Object.fromEntries(Object.entries(a).map(([n,r])=>[n,rx(r)?t(r,`${e}/${n}`):ix(r)])):tx.includes(i)&&Array.isArray(a)?a.map((n,r)=>rx(n)?t(n,`${e}/${r}`):ix(n)):nx.includes(i)?rx(a)?t(a,e):Array.isArray(a)?a.map((n,r)=>rx(n)?t(n,`${e}/${r}`):ix(n)):ix(a):ix(a)}return r}function ox(e,t,n=``){return t(ax(e,(e,n)=>ox(e,t,n),n),n)}let sx=[`minimum`,`maximum`,`exclusiveMinimum`,`exclusiveMaximum`,`multipleOf`,`maxItems`,`uniqueItems`,`minProperties`,`maxProperties`],cx=[`oneOf`,`not`];function lx(e){let t=[],n=[],r=[];return{schema:ox(e,(e,i)=>{for(let n of sx)n in e&&(delete e[n],t.push(`${i}/${n}`));typeof e.minItems==`number`&&e.minItems>1&&(delete e.minItems,t.push(`${i}/minItems`));for(let t of cx)t in e&&r.push(`${i}/${t}`);return(e.type===`object`||Array.isArray(e.type)&&e.type.includes(`object`)||rx(e.properties))&&e.additionalProperties!==!1&&(e.additionalProperties!==void 0&&n.push(`${i}/additionalProperties`),e.additionalProperties=!1),e}),stripped:t,overridden:n,undroppable:r}}function ux(e,t){let{schema:n,stripped:r,overridden:i,undroppable:a}=lx(e);return r.length&&yb.warn(`AnthropicTransport: tool "${t}" requested schema enforcement; these keywords cannot be enforced and were removed — validate them yourself: ${r.join(`, `)}`),i.length&&yb.warn(`AnthropicTransport: tool "${t}" requested schema enforcement, which requires closed objects; \`additionalProperties\` was set to false at: ${i.join(`, `)}. The tool now accepts fewer inputs than its schema declared.`),a.length&&yb.warn(`AnthropicTransport: tool "${t}" uses schema keywords enforcement cannot express (${a.join(`, `)}). They cannot be removed without changing the schema's meaning, so the request will be rejected. Rewrite them or drop enforceSchema for this tool.`),n}let dx=[`additionalProperties`,`examples`,`multipleOf`,`patternProperties`,`$defs`,`definitions`];function fx(e,t){if(!t.startsWith(`#/`))return;let n=e;for(let e of t.slice(2).split(`/`)){if(!rx(n))return;n=n[e.replace(/~1/g,`/`).replace(/~0/g,`~`)]}return rx(n)?n:void 0}function px(e,t,n,r){let i=t,a=n,o=typeof i.$ref==`string`?i.$ref:void 0;for(;o&&!a.has(o);){let t=fx(e,o);if(!t)break;let{$ref:n}=i,r=fd(i,[`$ref`]);i=Object.assign(Object.assign({},ix(t)),r),a=/* @__PURE__ */ new Set([...a,o]),o=typeof i.$ref==`string`?i.$ref:void 0}return typeof i.$ref==`string`&&r.push(i.$ref),ax(i,t=>px(e,t,a,r),``)}function mx(e){let t=[],n=px(e,e,/* @__PURE__ */ new Set,t);return t.length&&yb.warn(`GeminiTransport: these \`$ref\` pointers could not be inlined — a cycle, a typo, or an external ref: ${[...new Set(t)].join(`, `)}. They are left in the schema, so Gemini will reject this declaration; that is deliberate, because dropping them would send a node that constrains nothing.`),ox(n,e=>{if(Array.isArray(e.type)){let t=e.type.filter(e=>e!==`null`);t.length===1&&e.type.length!==t.length&&(e.type=t[0],e.nullable=!0)}if(Array.isArray(e.anyOf)){let t=e.anyOf.filter(rx),n=t.filter(e=>e.type!==`null`);if(t.length===2&&n.length===1){let{anyOf:t}=e,r=fd(e,[`anyOf`]);return Object.assign(Object.assign(Object.assign({},n[0]),r),{nullable:!0})}}`const`in e&&(e.enum=[e.const],delete e.const);for(let t of dx)delete e[t];for(let t of Object.keys(e))t.startsWith(`$`)&&t!==`$ref`&&delete e[t];return e})}function hx(e,t,n){return(e instanceof DOMException||e instanceof Error)&&(e.name===`AbortError`||e.name===`TimeoutError`)?n?.aborted?n.reason:t.aborted?t.reason:e:e}function gx(e,t){return new Promise((n,r)=>{let i=()=>t?.reason??new DOMException(`The operation was aborted.`,`AbortError`);if(t?.aborted){r(i());return}let a=()=>{clearTimeout(o),r(i())},o=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e);t?.addEventListener(`abort`,a,{once:!0})})}let _x=Object.freeze({NO_API_KEY:`NO_API_KEY`,BAD_API_KEY:`BAD_API_KEY`,KEY_UNREADABLE:`KEY_UNREADABLE`,MODEL_NOT_ALLOWED:`MODEL_NOT_ALLOWED`,BAD_REQUEST:`BAD_REQUEST`,FALLBACKS_NOT_SUPPORTED:`FALLBACKS_NOT_SUPPORTED`,REQUEST_TOO_LARGE:`REQUEST_TOO_LARGE`,VENDOR_UNREACHABLE:`VENDOR_UNREACHABLE`}),vx=new Set(Object.values(_x));function yx(e){return typeof e==`string`&&vx.has(e)?e:void 0}let bx=Object.freeze({SIGNED_OUT:`SIGNED_OUT`,ACCESS_DENIED:`ACCESS_DENIED`}),xx=e=>{if(!e||typeof e!=`object`)return!1;let{MESSAGE_TYPE:t,ERROR:n}=e;return t===`MSG_NACK`||Array.isArray(n)},Sx=e=>e?.code!==void 0;function Cx(e,t,n){if(e!==401&&e!==403||Sx(t))return;let r=typeof n==`string`&&n.trim()===``;if(xx(t)||r)return e===401?bx.SIGNED_OUT:bx.ACCESS_DENIED}function wx(e,t){return e===413&&t===void 0}function Tx(e){let t=e?.ERROR,n=Array.isArray(t)?t[0]?.TEXT:void 0;return typeof n==`string`&&n?n:void 0}let Ex=`The AI service refused the assistant's request. An administrator can find the details in the browser console.`;Object.freeze({NO_API_KEY:`The assistant isn't set up yet. An administrator needs to add an API key for its AI service.`,BAD_API_KEY:`The assistant can't use its AI service key. An administrator needs to check the key.`,KEY_UNREADABLE:`The assistant can't read its AI service key. An administrator needs to check how the key is stored.`,MODEL_NOT_ALLOWED:`The assistant asked for an AI model this app doesn't allow. An administrator needs to check the app's allowed models.`,BAD_REQUEST:Ex,FALLBACKS_NOT_SUPPORTED:Ex,REQUEST_TOO_LARGE:`This request is too large to send. Start a new conversation or send a shorter message, and if you attached a file, try a smaller one.`,VENDOR_UNREACHABLE:`The AI service can't be reached right now. Please try again in a few minutes. If it keeps happening, tell an administrator.`,SIGNED_OUT:`Your session has ended. Sign in again to use the assistant.`,ACCESS_DENIED:`You don't have access to the assistant. An administrator can give you access.`});let Dx=e=>e!==_x.VENDOR_UNREACHABLE;var Ox=class extends Error{constructor(e,t,n,r){super(`${e} AI service refused the request (${n} ${t})`),this.vendorLabel=e,this.code=t,this.status=n,this.detail=r,this.name=`AIServiceError`}get terminal(){return Dx(this.code)}};function kx(e){let t=e?.error;return typeof t==`string`&&t?t:void 0}let Ax=Object.freeze([/prompt is too long/i,/input token count .* exceeds/i,/maximum context length/i,/context[_ ]length[_ ]exceeded/i,/too many (input )?tokens/i]),jx=/(\d[\d,]{2,})\D{0,40}?(?:>|exceeds)\D{0,80}?(\d[\d,]{2,})/i;var Mx=class extends Error{constructor(e,t,n,r){super(`${e} rejected the request — the prompt exceeds the model context window`+(t!=null&&n!=null?` (${t} > ${n})`:``)+(r?`: ${r}`:``)+`. Retrying will not clear this — the conversation must be compacted.`),this.vendorLabel=e,this.promptTokens=t,this.limitTokens=n,this.detail=r,this.name=`ContextOverflowError`}};function Nx(e){if(!e||typeof e!=`object`)return[];let t=[],n=(e,r)=>{if(!(r>4||!e||typeof e!=`object`))for(let i of Object.values(e))typeof i==`string`?t.push(i):typeof i==`object`&&n(i,r+1)};return n(e,0),t}function Px(e,t,n){if(t===400)for(let e of Nx(n)){if(!Ax.some(t=>t.test(e)))continue;let t=jx.exec(e);return{promptTokens:t?Number(t[1].replace(/,/g,``)):void 0,limitTokens:t?Number(t[2].replace(/,/g,``)):void 0,message:e}}}function Fx(e,t,n,r){return J(this,void 0,void 0,function*(){let i=e.getReader(),a=new TextDecoder,o=``,s=e=>/* @__PURE__ */ Error(`${n} proxy sent a malformed frame: ${e.slice(0,120)}`),c=e=>{if(!e)return;let t;try{t=JSON.parse(e)}catch{throw s(e)}if(typeof t!=`object`||!t||Array.isArray(t))throw s(e);let i=t;if(i.t===`ok`){if(i.body==null)throw Error(`${n} proxy sent an ok frame without a body`);return i}if(i.t===`err`){if(typeof i.status!=`number`)throw Error(`${n} proxy sent an err frame without a numeric status`);return i}if(i.t===`ping`){if(r>0&&typeof i.sinceLastEventMs==`number`&&i.sinceLastEventMs>r)throw new DOMException(`${n} request stalled: proxy reported ${i.sinceLastEventMs}ms since the last upstream event (exceeds ${r}ms)`,`TimeoutError`);return}};try{for(;;){let{done:e,value:n}=yield i.read();if(e)break;t(),o+=a.decode(n,{stream:!0});let r=o.indexOf(`
246
+ `,JSON.stringify(e,null,2)),!0})}normaliseResourceHealth(e,t=!0){let n=t?e.isConnected:!1,r=e.lastUpdated??this.getNowTimestamp();return Object.assign(Object.assign({},e),{isConnected:n,lastUpdated:r})}normaliseSerializedSocketStatus(e,t=!0){let n=t?e.isConnected:!1,r=!n;return Object.assign(Object.assign({},e),{isConnected:n,isDisconnected:r})}normaliseEventDetail(e){let t=!!(e.socket?.isConfigured?e.isOnline&&e.socket?.isConnected&&e.resourcesAllConnected:e.isOnline),n=e.lastUpdated??this.getNowTimestamp(),r=e.nextUpdate??this.getNextTimestamp(),i=e.isAuthenticated&&this.user?this.user.username:void 0,a=Object.assign(Object.assign({},e),{browserInformation:Oy,username:i,isHealthy:t,lastUpdated:n,nextUpdate:r,firstUpdated:Dy,runAllChecks:()=>{Ey.debug(`User activated run checks command starting.`),this.runAllChecks(`user requested`)},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(a)});return a}preFlightSocketChecks(e){if(!e.isConfigured)return Ey.debug(`Socket not configured`),!1;if(e.isReconnecting)return Ey.debug(`Socket reconnecting`),!1;if(e.isConnecting)return Ey.debug(`Socket connecting`),!1;if(e.isDisconnected){let t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:``;return Ey.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&Ey.debug(`Socket reconnection limit reached`),!1}let t=this.user.isAuthenticated?`with`:`without`;return Ey.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return tp(e)}getNowTimestamp(){return Date.now()}getNextTimestamp(){return new Date(Date.now()+this.config.checkInterval).getTime()}synchroniseCheckInterval(){clearInterval(this.internalId),this.internalId=setInterval(()=>this.runAllChecks(`check interval`),this.config.checkInterval)}};q([xy],Ay.prototype,`config`,void 0),q([fv],Ay.prototype,`socketStatus`,void 0),q([Dg],Ay.prototype,`connectEvents`,void 0),q([yg],Ay.prototype,`user`,void 0),q([C],Ay.prototype,`status`,void 0);let jy=N.createInterface(e=>e.singleton(Ay)),My={account:`genesis`,namespace:`default`,authKey:`kv-default`,authEmail:void 0},Ny=N.createInterface();var Py;(function(e){e.REQ_KEY_VALUE_LIST=`REQ_KEY_VALUE_LIST`,e.REQ_KEY_VALUE_READ=`REQ_KEY_VALUE_READ`})(Py||(Py={}));var Fy;(function(e){e.EVENT_KEY_VALUE_PUT=`EVENT_KEY_VALUE_PUT`,e.EVENT_KEY_VALUE_DELETE=`EVENT_KEY_VALUE_DELETE`})(Fy||(Fy={}));let Iy=class{constructor(e,t,n=My){this.connect=e,this.user=t,this.kvStorageConfig=n}delete(e){return J(this,void 0,void 0,function*(){let t={DETAILS:{KEYS:e}},n=yield this.connect.commitEvent(Fy.EVENT_KEY_VALUE_DELETE,t);return n&&n.MESSAGE_TYPE===`EVENT_ACK`?!0:{ERROR:n.ERROR,WARNING:n.WARNING}})}get(e){return J(this,void 0,void 0,function*(){let t={REQUEST:{USER_NAME:this.kvStorageConfig.authEmail??this.user.userName,KEY:e}},n=yield this.connect.request(Py.REQ_KEY_VALUE_READ,t);if(n&&n.REPLY&&n.REPLY.length>0){let t=n.REPLY.map(e=>{let t=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:t}}});return e?t[0]:t}return e?void 0:[]})}getDecodedValue(e){!e.startsWith(`str:`)&&!e.startsWith(`bin:`)&&(e=`str:${e}`);let t=zf(e);return typeof t==`string`&&t.startsWith(`str:`)&&(t=zf(t)),typeof t==`string`&&t.startsWith(`bin:`)&&(t=zf(t)),t}list(){return J(this,void 0,void 0,function*(){let e={REQUEST:{USER_NAME:this.kvStorageConfig.authEmail??this.user.userName}},t=yield this.connect.request(Py.REQ_KEY_VALUE_LIST,e);return t&&t.REPLY&&t.REPLY.length>0?t.REPLY.map(e=>e.KEY):[]})}put(e){return J(this,void 0,void 0,function*(){let t={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?Vf(e.value):e.value}))}},n=yield this.connect.commitEvent(Fy.EVENT_KEY_VALUE_PUT,t);return n&&n.MESSAGE_TYPE===`EVENT_ACK`?!0:{ERROR:n.ERROR,WARNING:n.WARNING}})}};Iy=q([pd(0,Cv),pd(1,yg),pd(2,Lt(Ny))],Iy),N.createInterface(e=>e.singleton(Iy));var Ly=class{constructor(){this.isWorking=!1,this.loggedUserResult=null,this.currentUser=null,this.isLoggedIn=!1,this.isLoggedInSubject=new Zm(!1)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}login(e){return J(this,void 0,void 0,function*(){return Promise.resolve(this.nextLoginResult)})}logout(){return J(this,void 0,void 0,function*(){return Promise.resolve(this.nextLogoutResult)})}reAuthFromSession(){return J(this,void 0,void 0,function*(){return Promise.resolve(this.nextReAuthResult)})}setTestUser(e={}){this.currentUser=new vg,this.currentUser.set(Object.assign({userName:`JaneDee`,profile:[`USER`],permission:[`CreateRules`]},e)),this.isLoggedIn=!0,this.isLoggedInSubject.next(!0)}resetTestUser(){this.currentUser=null,this.isLoggedIn=!1,this.isLoggedInSubject.next(!1)}};q([C],Ly.prototype,`isWorking`,void 0),q([C],Ly.prototype,`loggedUserResult`,void 0),q([C],Ly.prototype,`currentUser`,void 0),q([C],Ly.prototype,`isLoggedIn`,void 0);var Ry=class{constructor(){this.fetchMetadataRequired=!0,this.fetchingMetadata=!1,this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.customRequestFields=[],this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.criteriaOnlyRequest=!1}init(e,t){return Promise.resolve(this.initialized)}startStream(){return Promise.resolve()}setMetadata(e){this.availableIndexes=e.INDEXES??[],this.availableSortableFields=e.SORTABLE_FIELDS??[],this.availableCriteriaFields=e.CRITERIA_FIELDS??[],this.originalFieldDef=Tg(e),this.fieldMetadata=wg(this.originalFieldDef),this.requestFields=e.REQUEST_FIELD||[],this.customRequestFields=e.FIELD||[],this.fetchMetadataRequired=!1}unsetMedata(){this.availableIndexes=[],this.availableSortableFields=[],this.availableCriteriaFields=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.fetchMetadataRequired=!0}setStream(e){this.stream=Oh(Promise.resolve(e))}unsetStream(){this.stream=void 0}deinit(){}destroy(){}validResourceName(e){return!(!e||!e.trim().length)}getMetadata(e){return Promise.resolve(this.fieldMetadata)}snapshot(e){return Promise.resolve(null)}snapshotFiltered(e){return Promise.resolve(null)}updateData(e){return Promise.resolve()}dataHandler(e){return[]}addView(e){}dropView(e){}setFilter(e,t,n){return Promise.resolve()}clearFilter(e){return Promise.resolve()}createItem(e){return Promise.resolve(``)}deleteItem(e){return Promise.resolve()}updateItem(e,t){return Promise.resolve()}get dataserverOnlyParams(){return{}}get requestOnlyParams(){return{}}updateLoadMoreCount(e){}};q([C],Ry.prototype,`status`,void 0),q([C],Ry.prototype,`fetchMetadataRequired`,void 0),q([C],Ry.prototype,`originalFieldDef`,void 0),q([C],Ry.prototype,`fieldMetadata`,void 0),q([C],Ry.prototype,`requestFields`,void 0),q([C],Ry.prototype,`customRequestFields`,void 0),q([C],Ry.prototype,`availableIndexes`,void 0),q([C],Ry.prototype,`availableSortableFields`,void 0),q([C],Ry.prototype,`availableCriteriaFields`,void 0),q([C],Ry.prototype,`criteriaOnlyRequest`,void 0),N.createInterface(e=>e.aliasTo(yg));let zy=Jd(`foundation-ui`);var By=class extends cy(P){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=ty.MAX_ROWS_250,this.maxView=ty.MAX_VIEW_1000,this.resourceName=``,this.reverse=!1,this.withTimestampFormatting=!0,this.appliedDatasourceConfig={},this.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.pendingMoreRows=0,this.viewRowCount=0,this.nextRequestOffset=0,this.rowsSyncedWithStream=/* @__PURE__ */ new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=/* @__PURE__ */ new Map,this.update=new Zm(/* @__PURE__ */ new Map),this.fetchGeneration=0}criteriaChanged(e,t){let n=e!==vy(t,`;`);this.refetchIfInitializedAndChanged(n)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){let n=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(n)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&this.fetchGenesisData(null)}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{let n=e[t];n!==void 0&&n!==this.appliedDatasourceConfig[t]&&(this.appliedDatasourceConfig[t]=n,this[t]=n)})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),(e=this.dataSub)==null||e.unsubscribe(),(t=this.update)==null||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}get effectiveRowId(){return this.rowId?this.rowId:this.datasource?.resourceType===Sg.REQUEST_SERVER?ty.REQUEST_SERVER_ROW_ID:ty.DATASERVER_ROW_ID}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return J(this,arguments,void 0,function*(e=!0){var t;(t=this.dataSub)==null||t.unsubscribe(),this.dataSub=void 0,this.moreRowsAvailable=!1,this.pendingMoreRows=0,this.serverMoreRows=void 0,this.viewRowCount=0,this.pagingStopped=void 0,this.nextRequestOffset=0,this.fetchGeneration+=1;let n=this.fetchGeneration,r=()=>n!==this.fetchGeneration;if(this.data){this.syncComponentData(this.data);return}let i=e||!this.datasource.initialized;i||this.clearData(),this.sourceRef=void 0;let a=yield this.datasource.init(this.datasourceOptions(),i);if(!r()){if(!a){this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:`error`});return}if(this.isSnapshot){let e=yield this.datasource.snapshot();if(r())return;let t=this.filterSnapshotResult(e);this.updateRequestPagingState(e,t?.length??0,this.initialRequestOffset()),this.syncComponentData(t);return}zy.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(r())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:`error`}),this.sourceRef=e.SOURCE_REF;let t=e.ROW?ey(e):void 0;this.updateStreamPagingState(e,t);let n=e.MESSAGE_TYPE;if(n&&n===Lg.LOGOFF_ACK){this.dataSubWasLoggedOff=!0;return}this.dataSubWasLoggedOff=!1,t?this.handleStreamUpdate(t):this.handleStreamUpdate(e)})}})}initDatasource(){return J(this,void 0,void 0,function*(){yield this.datasource.init(this.datasourceOptions(),!0)})}canRequestMoreRows(){if(!this.isConnected||!this.datasource||!this.moreRowsAvailable)return!1;switch(this.datasource.resourceType){case Sg.REQUEST_SERVER:return!0;case Sg.DATASERVER:return!!this.sourceRef&&!this.dataSubWasLoggedOff;default:return!1}}requestMoreRows(){return J(this,void 0,void 0,function*(){if(this.canRequestMoreRows())try{if(this.datasource.resourceType===Sg.DATASERVER){this.pendingMoreRows+=1,yield this.connect.getMoreRows(this.sourceRef);return}let e=this.fetchGeneration,t=this.nextRequestOffset;this.moreRowsAvailable=!1;let n=yield this.datasource.snapshot({DETAILS:Object.assign(Object.assign({},this.datasource.requestOnlyParams?.DETAILS),{OFFSET:t})});if(e!==this.fetchGeneration)return;let r=Array.isArray(n?.REPLY)?n.REPLY:[];this.updateRequestPagingState(n,r.length,t),r.length>0&&this.handleStreamInserts(r)}catch(e){throw this.moreRowsAvailable=!0,this.pendingMoreRows=Math.max(0,this.pendingMoreRows-1),this.handleError({message:`Failed to request more rows for ${this.resourceName}`,loggerType:`error`,loggerArgs:[e]}),e}})}filterSnapshotResult(e){if(e){if(Array.isArray(e))return e;if(e.REPLY)return e.REPLY;if(e.ROW)return ey(e).inserts}}updateStreamPagingState(e,t){let n=typeof e?.MORE_ROWS==`boolean`;if(this.datasource.resourceType!==Sg.DATASERVER){n&&(this.moreRowsAvailable=e.MORE_ROWS);return}this.viewRowCount=Math.max(0,this.viewRowCount+(t?.inserts?.length??0)-(t?.deletes?.length??0));let r=!1;if(n&&(r=this.pendingMoreRows>0,this.pendingMoreRows=Math.max(0,this.pendingMoreRows-1),this.serverMoreRows=e.MORE_ROWS),this.serverMoreRows===void 0)return;let i=r&&e.MORE_ROWS===!0&&!e.ROW?.length,a=ay({moreRows:this.serverMoreRows,emptyReply:i,rowsHeld:this.viewRowCount,maxView:this.maxView});if(a===`more`&&this.pagingStopped===`view-full`)this.pagingStopped=void 0;else if((a===`view-full`||a===`stalled`)&&!this.pagingStopped){this.pagingStopped=a;let e=oy({status:a,resourceName:this.resourceName,rowsHeld:this.viewRowCount,maxView:this.maxView,emptyReply:i,attribute:`maxView`});e&&zy.warn(e)}this.moreRowsAvailable=a===`more`&&!this.pagingStopped}updateRequestPagingState(e,t,n){if(Array.isArray(e)||!e){this.moreRowsAvailable=!1;return}let r=e,i=r.NEXT_OFFSET,a=typeof i==`number`&&i>n,o=Number(this.maxRows)||0,s=t>0&&o>0&&t>=o;this.moreRowsAvailable=typeof r.MORE_ROWS==`boolean`?r.MORE_ROWS:i!==-1&&(a||s),this.nextRequestOffset=a?i:n+t}initialRequestOffset(){return Number(this.datasource.requestOnlyParams?.DETAILS?.OFFSET)||0}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){e&&(e.hasOwnProperty(`REPLY`)?this.applyRequestServerData(e):this.applyDataserverData(e))}applyRequestServerData(e){var t;if(!Array.isArray(e.REPLY)||!e.MESSAGE_TYPE?.startsWith(`REP_`)){this.handleError({message:`received invalid RequestServerResult`,loggerType:`error`,loggerArgs:[e]});return}if(this.requiresFullDataRefresh){(t=e.REPLY)==null||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)}),this.syncComponentData(Array.from(this.rowsSyncedWithStream.values()));return}this.handleStreamInserts(e.REPLY);let n=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(n)}applyDataserverData(e){var t;if(this.requiresFullDataRefresh){(t=e.inserts)==null||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)});let n=Array.from(this.rowsSyncedWithStream.values());this.syncComponentData(n);return}e.inserts?.length>0&&this.handleStreamInserts(e.inserts),e.deletes?.length>0&&this.handleStreamDeletes(e.deletes),e.updates?.length>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){return vy((this.criteria?.split(`;`)||[]).join(` && `),`;`)}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}handleError(e={}){let{message:t,loggerType:n,loggerArgs:r=[]}=e;t&&zy[n](t,...r)}getFieldMetadata(e){return this.datasource.fieldMetadata?.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===xg.DATE||t===xg.DATETIME?np(e,t===xg.DATETIME):e}};q([Cv],By.prototype,`connect`,void 0),q([gy],By.prototype,`datasource`,void 0),q([D({mode:`boolean`})],By.prototype,`withGridInit`,void 0),q([D],By.prototype,`criteria`,void 0),q([C],By.prototype,`data`,void 0),q([D],By.prototype,`fields`,void 0),q([D({mode:`boolean`})],By.prototype,`isSnapshot`,void 0),q([D],By.prototype,`maxRows`,void 0),q([D],By.prototype,`maxView`,void 0),q([D],By.prototype,`orderBy`,void 0),q([D],By.prototype,`request`,void 0),q([D],By.prototype,`resourceName`,void 0),q([D({mode:`boolean`})],By.prototype,`reverse`,void 0),q([D],By.prototype,`rowId`,void 0),q([D({mode:`boolean`,attribute:`with-timestamp-formatting`})],By.prototype,`withTimestampFormatting`,void 0);let Vy=(e,t)=>!e.composedPath().includes(t),Hy=(e,t)=>e.composedPath().includes(t),Uy=e=>e.tagName.toLowerCase().split(`-`)[0];function Wy(e){let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement:document.activeElement}let Gy=Jd(`foundation-criteria`);var Ky;(function(e){e.AND=`&&`,e.OR=`||`,e.NOT=`!`,e.GT=`>`,e.GE=`>=`,e.LT=`<`,e.LE=`<=`,e.NE=`!=`,e.EQ=`==`})(Ky||(Ky={}));var qy=class e{constructor(e){this.$$operator=e}static And(){return new e(Ky.AND)}static Or(){return new e(Ky.OR)}static Not(){return new e(Ky.NOT)}static GreaterThan(){return new e(Ky.GT)}static GreaterThanOrEqual(){return new e(Ky.GE)}static LessThan(){return new e(Ky.LT)}static LessThanOrEqual(){return new e(Ky.LE)}static NotEqual(){return new e(Ky.NE)}static Equal(){return new e(Ky.EQ)}get operator(){return this.$$operator}};let Jy=e=>e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`),Yy=e=>`'${Jy(e)}'`,Xy=e=>{let{value:t}=e;return e.valueGetter?e.valueGetter(t):typeof t==`function`?t(e):Array.isArray(t)?t.join(`,`):typeof t==`string`?Yy(t):t},Zy=e=>t=>`${t.field} ${e} ${Xy(t)}`,Qy=e=>Zy(Ky.NE)(e),$y=e=>`${e.field}.contains(${Xy(e)})`,eb={AND:e=>Zy(Ky.AND)(e),OR:e=>Zy(Ky.OR)(e),NOT:Qy,GT:e=>Zy(Ky.GT)(e),GE:e=>Zy(Ky.GE)(e),LT:e=>Zy(Ky.LT)(e),LE:e=>Zy(Ky.LE)(e),NE:Qy,EQ:e=>Zy(Ky.EQ)(e),equals:e=>`${e.field}.equals(${Xy(e)})`,equalsIgnoreCase:e=>`${e.field}.equalsIgnoreCase(${Xy(e)})`,contains:$y,fieldContains:$y,containsIgnoreCase:e=>`Expr.containsIgnoreCase(${e.field}, ${Xy(e)})`,startsWith:e=>`${e.field}.startsWith(${Xy(e)})`,endsWith:e=>`${e.field}.endsWith(${Xy(e)})`,dateIsToday:e=>`Expr.dateIsToday(${e.field})`,dateIsEqual:e=>`Expr.dateIsEqual(${e.field}, ${Xy(e)})`,dateIsGreaterEqual:e=>`Expr.dateIsGreaterEqual(${e.field}, ${Xy(e)})`,dateIsLessEqual:e=>`Expr.dateIsLessEqual(${e.field}, ${Xy(e)})`,dateTimeIsGreaterEqual:e=>`Expr.dateTimeIsGreaterEqual(${e.field}, ${Xy(e)})`,dateTimeIsLessEqual:e=>`Expr.dateTimeIsLessEqual(${e.field}, ${Xy(e)})`},tb=(e,t)=>e.flat().flatMap((e,n,r)=>r.length-1===n?e:[e,t]),nb=e=>Array.isArray(e)?e:[e],rb=`default`;var ib=class{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,qy.And()),this.Or=(e,t={})=>this.withExpression(e,t,qy.Or()),this.Not=(e,t={})=>this.withExpression(e,t,qy.Not())}withExpression(e,t={},n=qy.And()){let{condition:r,join:i,groupName:a}=t,o=(e,t=rb)=>{let a=this.expressions[t]??[];this.expressions[t]=[...a,{join:n||i,condition:r,expression:e}]};if(Array.isArray(e)){if(i){let t=e.filter(e=>{let t=e instanceof qy;return t&&Gy.warn(`Inline joins will be discarded when join is defined in ExpressionOptions`),!t});a?t.forEach(e=>{o(e,a)}):o(tb(t,i),rb)}else o(e,rb)}else typeof e==`string`?o(e,rb):o(e,e.group);return this}build(e){let t=Object.entries(this.expressions).reduce((e,[t,n])=>Object.assign(Object.assign({},e),{[t]:`(${n.filter(({condition:e})=>!e||e()).map(({expression:e,join:t},n,r)=>this.parseExpression(e,r[n-1],t)).join(``)})`}),{});return e?e(t):`(${Object.values(t).join(` && `)})`}reset(){this.expressions={}}parseExpression(e,t,n){let r=[];return n&&t&&r.push(` ${n.operator} `),typeof e==`string`?r.push(e):Array.isArray(e)?(e.forEach((e,t,n)=>{if(e instanceof qy&&n[t-1]instanceof qy)throw Error(`Adjacent Join operations detected`)}),r.push(`(${e.map(e=>this.parseExpression(e,void 0)).join(``)})`)):e instanceof qy?r.push(` ${e.operator} `):e&&r.push(e.serialiser(e)),r.join(``)}},ab=class{constructor(e){this.serialiser=eb.EQ,this.build=()=>{if(!this.field)throw Error(`Missing required param 'field'`);if(this.value===void 0)throw Error(`Missing required param 'value'`);if(!this.serialiser)throw Error(`Missing required param 'serialise'`);return{field:this.field,value:this.value,serialiser:this.serialiser,params:this.params,valueGetter:this.valueGetter,group:this.group}},e&&(this.field=e.field,this.value=e.value,this.serialiser=e.serialiser,this.params=e.params,this.valueGetter=e.valueGetter,this.group=e.group)}withField(e){return this.field=e,this}withValue(e){return this.value=e,this}withSerialiser(e){return this.serialiser=e,this}withParams(e){return this.params=e,this}withValueGetter(e){return this.valueGetter=e,this}withGroup(e){return this.group=e,this}};let ob=(e=`rapid`)=>T`<${e}-segmented-control :value="${Ff(e=>e.selectedLabel)}"><slot name="label" slot='label'></slot>${j(e=>e.criteriaOptions,T`<${e}-segmented-item @click=${(e,t)=>t.parent.itemClickHandler(e.label)}value=${e=>e.label}>${e=>e.label}</${e}-segmented-item>`)}</${e}-segmented-control>`,sb=class extends Qe{constructor(){super(...arguments),this.criteriaOptions=[],this.createCriteria=e=>{let t=new ib,{field:n,serialiser:r,value:i}=e;return Array.isArray(n)||Array.isArray(i)?t.And(nb(i).map(e=>nb(n).map(t=>new ab().withField(t).withValue(e).withSerialiser(r).build())),{join:qy.Or()}):t.And(new ab().withField(n).withValue(i).withSerialiser(r).build()),t}}valueChanged(){this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))}selectedLabelChanged(){let e=this.criteriaOptions.find(e=>e.label===this.selectedLabel);this.value=e?this.createCriteria(e).build():``}itemClickHandler(e){this.selectedLabel===e&&(this.selectedLabel=void 0)}};q([C],sb.prototype,`criteriaOptions`,void 0),q([C],sb.prototype,`prefix`,void 0),q([C],sb.prototype,`value`,void 0),q([C],sb.prototype,`selectedLabel`,void 0),sb=q([$e({name:`criteria-segmented-control`,template:ob(),styles:O``})],sb);function cb(e,t){let n=new ib;n.withExpression(new ab().withField(e.labelField??e.valueField).withValue(t).withSerialiser(eb.containsIgnoreCase).build()),e.criteria=e.baseCriteria?`${e.baseCriteria} && ${n.build()}`:n.build()}function lb(e,t){let n=new ib;n.withExpression(new ab().withField(e.valueField).withValue(t).withSerialiser(eb.equals).build()),e.criteria=e.baseCriteria?`${e.baseCriteria} && ${n.build()}`:n.build()}let ub=(e,t,n)=>T`<${t}-icon tooltip="${()=>e}" name="${()=>n}"></${t}-icon>`,db=e=>T`<${e}-button ${k(`actionsOpener`)}id="actiosnMenuTrigger" class="actions-opener${e=>e.open?` opened`:``}" appearance="${e=>e.buttonAppearance}" part="actions-opener" @click=${e=>e.toggleActionsMenuVisibility()}>${e=>e.open?`✖`:T` ${e.name} `}</${e}-button><${e}-menu ${k(`actionsMenu`)}popover="manual" class="actions-menu ${e=>e.classNames}" part="actions-menu">${j(e=>e.allActions,T` ${A((e,t)=>e.isDisabled&&e.isDisabled(t.parent.rowData),T`<${e}-menu-item class="menu-item" tabindex="${(e,t)=>t.index}" disabled style=${(e,t)=>t.parent.hideDisabled?`display:none`:``}>${(e,t)=>t.parent.getLabel(e.name)}</${e}-menu-item>`)} ${A((e,t)=>!e.isDisabled||!e.isDisabled(t.parent.rowData),T`<${e}-menu-item class="menu-item" tabindex="${(e,t)=>t.index}" @click=${(e,t)=>t.parent.onActionMenuItemClick(e.callback)}style="${e=>e.color?`color: ${e.color};`:``}">${(e,t)=>t.parent.getLabel(e.name)}</${e}-menu-item>`)} `,{positioning:!0})}</${e}-menu>`,fb=e=>T`<${e}-button appearance="${e=>e.buttonAppearance}" part="actions-opener" class="actions-opener" @click=${e=>e?.singleOption.callback(e.rowData)}?disabled=${e=>e?.singleOption.isDisabled&&e?.singleOption.isDisabled(e.rowData)}>${e=>e.getLabel(e?.singleOption.name)}</${e}-button>`,pb=T`<div class="actions-container${e=>e.isVertical?` actions-vertical`:``}" part="actions-container">${e=>e.getTemplate(Uy(e))}</div>`;var mb=class extends P{constructor(){super(...arguments),this.isVertical=!1,this.addDefaultActions=!0,this.autoCloseOnAction=!0,this.name=`Actions`,this.open=!1,this.hideDisabled=!1,this.hideMenuSingleOption=!1}disconnectedCallback(){this.actionsMenu?.matches(`:popover-open`)&&this.actionsMenu.hidePopover(),super.disconnectedCallback()}updateMenuPosition(){let e=this.actionsOpener.getBoundingClientRect();this.actionsMenu.style.position=`fixed`,this.actionsMenu.style.top=`${e.top}px`,this.actionsMenu.style.left=`auto`,this.actionsMenu.style.right=`${window.innerWidth-e.right}px`}definitionChanged(e,t){this.actions=t?.actions??[],delete this.definition.actions,t.buttonText&&(this.name=t.buttonText,delete this.definition.customButtonText),t.isVertical&&(this.isVertical=t.isVertical,delete this.definition.isVertical),t.buttonAppearance&&(this.buttonAppearance=t.buttonAppearance,delete this.definition.buttonAppearance),t.hideMenuSingleOption&&(this.hideMenuSingleOption=t.hideMenuSingleOption,delete this.definition.hideMenuSingleOption)}openChanged(){this.classNames=dn([`visible`,this.open],[`hidden`,!this.open]),this.open?(this.updateMenuPosition(),this.actionsMenu.showPopover()):this.actionsMenu?.matches(`:popover-open`)&&this.actionsMenu.hidePopover()}toggleActionsMenuVisibility(){this.open=!this.open}onActionMenuItemClick(e){this.autoCloseOnAction&&(this.open=!1),e(this.rowData)}get allActions(){let e=[{name:`✖`,callback:()=>this.open=!1}];return this.addDefaultActions?[...this.actions??[],...e]:this.actions}get rowData(){if(!this.definition)return;let{node:e,data:t}=this.definition;return e?.data||t}getLabel(e){return typeof e==`function`?e(this.rowData):e}getTemplate(e){if(!this.hideMenuSingleOption)return db(e);let t=this.actions.filter(e=>!e.isDisabled||!e.isDisabled(this.rowData));if(this.singleOption=null,t.length!==0)return t.length===1?(this.singleOption=t[0],fb(e)):db(e)}};q([C],mb.prototype,`actions`,void 0),q([D({attribute:`is-vertical`,mode:`boolean`})],mb.prototype,`isVertical`,void 0),q([D({attribute:`add-default-actions`,mode:`boolean`})],mb.prototype,`addDefaultActions`,void 0),q([D({attribute:`auto-close-on-action`,mode:`boolean`})],mb.prototype,`autoCloseOnAction`,void 0),q([C],mb.prototype,`classNames`,void 0),q([C],mb.prototype,`definition`,void 0),q([D],mb.prototype,`name`,void 0),q([D({attribute:`open`,mode:`boolean`})],mb.prototype,`open`,void 0),q([D],mb.prototype,`buttonAppearance`,void 0),q([D({attribute:`hide-disabled`,mode:`boolean`})],mb.prototype,`hideDisabled`,void 0),q([D({attribute:`hide-menu-single-option`,mode:`boolean`})],mb.prototype,`hideMenuSingleOption`,void 0),q([C],mb.prototype,`singleOption`,void 0),mb.compose({baseName:`actions-menu`,styles:Lne,template:pb});let hb=()=>{};function gb(e){let t=new AbortController,n=e.filter(e=>e!=null),r=n.find(e=>e.aborted);if(r)return t.abort(r.reason),{signal:t.signal,dispose:hb};function i(){for(let e of n)e.removeEventListener(`abort`,a)}function a(){t.abort(this.reason),i()}for(let e of n)e.addEventListener(`abort`,a);return{signal:t.signal,dispose:i}}let _b=!1;try{typeof GENX_ENABLE_AI<`u`&&(_b=GENX_ENABLE_AI===`true`)}catch{}let vb=()=>_b||Uf(`ai`),yb=Jd(`foundation-ai`);function bb(){return typeof window<`u`&&(`SpeechRecognition`in window||`webkitSpeechRecognition`in window)}function xb(e,t){if(!bb())return null;let n=new(window.SpeechRecognition||window.webkitSpeechRecognition);n.continuous=!0,n.interimResults=!0,n.lang=`en-US`;let r=``;return n.onresult=t=>{let n=``,i=``;for(let e=t.resultIndex;e<t.results.length;e+=1){let r=t.results[e][0].transcript;t.results[e].isFinal?i+=r:n+=r}i?(r+=i,e(r,!0)):n&&e(r+n,!1)},n.onerror=e=>{e.error!==`aborted`&&t?.(e.error||`Speech recognition error`)},n.start(),()=>{try{n.stop()}catch{}}}var Sb=class{getStatus(){return J(this,void 0,void 0,function*(){return{provider:`none`,model:``}})}interpretCriteria(e,t){return J(this,void 0,void 0,function*(){return null})}};let Cb=Object.freeze({anthropic:`Anthropic`,gemini:`Gemini`,openai:`OpenAI`,chrome:`Chrome`});Object.freeze([`anthropic`,`gemini`]),new Map(Object.entries(Cb).map(([e,t])=>[t.toLowerCase(),e]));var wb=class extends Error{constructor(e,t,n,r,i){super(`${e} request refused: the AI usage budget is exhausted`+(t==null?``:` (spent ${n==null?`an unknown amount`:`$${n}`} of a $${t} budget)`)+(r?`: ${r}`:``)+`. Retrying will not clear this — the budget must be raised.`),this.vendorLabel=e,this.budgetUsd=t,this.spentUsd=n,this.detail=r,this.name=`BudgetExhaustedError`,this.otherVendorAvailable=i?.otherVendorAvailable,this.serverVendor=i?.serverVendor}};let Tb=(e,t)=>e===402||t===`BUDGET_EXCEEDED`,Eb=e=>{try{return JSON.parse(e)}catch{return}},Db=e=>{let t=e?.code;return typeof t==`string`?t:void 0},Ob=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,kb=e=>typeof e==`boolean`?e:void 0,Ab=e=>typeof e==`string`&&e.trim()!==``?e:void 0;function jb(e,t,n){let r=typeof t==`object`&&t?t:{},i=typeof r.details==`object`&&r.details!==null?r.details:{},a=typeof r.error==`string`?r.error:n;return new wb(e,Ob(r.budgetUsd)??Ob(i.budgetUsd),Ob(r.spentUsd)??Ob(i.spentUsd),a,{otherVendorAvailable:kb(r.otherVendorAvailable)??kb(i.otherVendorAvailable),serverVendor:Ab(r.vendor)??Ab(i.vendor)})}var Mb=class extends Error{constructor(e,t,n,r,i){super(`${e} refused the request (${t})`+(n==null?``:` — HTTP ${n}`)+(r?` ${r}`:``)+(i?`: ${i}`:``)+`. Retrying will not clear this — the provider account must be fixed.`),this.vendorLabel=e,this.kind=t,this.upstreamStatus=n,this.upstreamType=r,this.detail=i,this.name=`ProviderRefusedError`}};let Nb=Object.freeze([/credit balance/i,/usage limit/i,/spend limit/i,/insufficient (credit|funds|balance)/i]),Pb=Object.freeze([`authentication_error`,`permission_error`]);function Fb(e){let t=typeof e==`object`&&e?e:{};for(let e of[t.error,t.details?.error])if(typeof e==`object`&&e){let{type:t,message:n}=e;return{type:typeof t==`string`?t:void 0,message:typeof n==`string`?n:void 0}}}function Ib(e){let t=typeof e==`object`&&e?e:{},n=typeof t.details==`object`&&t.details!==null?t.details:{};for(let e of[t.kind,n.kind])if(e===`auth`||e===`spend`)return e}function Lb(e){let t=Fb(e);if(t?.type){if(Pb.includes(t.type))return`auth`;if(t.type===`billing_error`)return`spend`}}function Rb(e,t,n){if(t===`PROVIDER_REFUSED`)return Ib(n)??Lb(n)??`spend`;if(e!==`anthropic`)return;let r=Lb(n);if(r)return r;let i=Fb(n);if(i?.type===`invalid_request_error`&&i.message){let e=i.message;if(Nb.some(t=>t.test(e)))return`spend`}}function zb(e,t,n,r,i){let a=Fb(r);return new Mb(e,t,n,a?.type,a?.message??i)}function Bb(e){return Object.entries(Cb).find(([,t])=>t===e)?.[0]}let Vb=[`gemini-2.5-pro`,`gemini-2.5-flash`,`gemini-2.5-flash-lite`,`gemini-3.8-flash`,`gemini-3.5-flash`,`gemini-3.1-flash-lite`,`gemini-3.1-pro-preview`],Hb=[`claude-fable-5`,`claude-opus-4-8`,`claude-opus-4-7`,`claude-sonnet-5`,`claude-sonnet-4-6`,`claude-haiku-4-5-20251001`];function Ub(e){return e===`image/jpg`?`image/jpeg`:e}function Wb(e){return e.replace(/^data:[^,]*;base64,/,``)}let Gb=.5;function Kb(e,{defaultTemp:t,maxTemp:n}){let r=Math.min(Math.max(e,0),1);return r<=Gb?r/Gb*t:t+(r-Gb)/.5*(n-t)}let qb=1e6,Jb={"claude-haiku-4-5-20251001":{promptPerMillion:1,candidatePerMillion:5},"claude-fable-5":{promptPerMillion:10,candidatePerMillion:50},"claude-opus-4-8":{promptPerMillion:5,candidatePerMillion:25},"claude-opus-4-7":{promptPerMillion:5,candidatePerMillion:25},"claude-sonnet-5":{promptPerMillion:2,candidatePerMillion:10},"claude-sonnet-4-6":{promptPerMillion:3,candidatePerMillion:15}};function Yb(e){return Jb[e]}function Xb(e,t){let{promptPerMillion:n,candidatePerMillion:r}=Yb(e),i=qb,a=Math.max(0,t.cacheWriteTokens-t.cacheWrite1hTokens),o=t.uncachedInputTokens/i*n,s=t.cacheReadTokens/i*n*.1,c=a/i*n*1.25+t.cacheWrite1hTokens/i*n*2,l=t.outputTokens/i*r,u=t.cacheReadTokens/i*n,d=t.cacheWriteTokens/i*n;return{costUsd:o+s+c+l,savedUsd:u-s+(d-c),breakdown:{promptUsd:o,cacheReadUsd:s,cacheWriteUsd:c,candidateUsd:l}}}let Zb={"gemini-2.5-flash-lite":{kind:`flat`,rate:{promptPerMillion:.1,candidatePerMillion:.4}},"gemini-2.5-flash":{kind:`flat`,rate:{promptPerMillion:.3,candidatePerMillion:2.5}},"gemini-2.5-pro":{kind:`tiered`,standard:{promptPerMillion:1.25,candidatePerMillion:10},longContext:{promptPerMillion:2.5,candidatePerMillion:15}},"gemini-3.1-flash-lite":{kind:`flat`,rate:{promptPerMillion:.25,candidatePerMillion:1.5}},"gemini-3.5-flash":{kind:`flat`,rate:{promptPerMillion:1.5,candidatePerMillion:9}},"gemini-3.8-flash":{kind:`flat`,rate:{promptPerMillion:.75,candidatePerMillion:3.75}},"gemini-3.1-pro-preview":{kind:`tiered`,standard:{promptPerMillion:2,candidatePerMillion:12},longContext:{promptPerMillion:4,candidatePerMillion:18}}};function Qb(e,t){let n=Zb[e];return n.kind===`flat`?n.rate:t>2e5?n.longContext:n.standard}function $b(e,t){let{promptPerMillion:n,candidatePerMillion:r}=Qb(e,t.promptTokens),i=qb,a=Math.max(0,t.promptTokens-t.cachedTokens)/i*n,o=t.cachedTokens/i*n*.1,s=(t.candidateTokens+t.thoughtTokens)/i*r;return{costUsd:a+o+s,savedUsd:t.cachedTokens/i*n-o,breakdown:{promptUsd:a,cacheReadUsd:o,cacheWriteUsd:0,candidateUsd:s}}}let ex=[`properties`,`patternProperties`,`$defs`,`definitions`],tx=[`anyOf`,`oneOf`,`allOf`,`prefixItems`],nx=[`items`,`not`,`additionalProperties`,`propertyNames`,`contains`],rx=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function ix(e){if(Array.isArray(e))return e.map(ix);if(rx(e)){let t={};for(let[n,r]of Object.entries(e))t[n]=ix(r);return t}return e}function ax(e,t,n){let r={};for(let[i,a]of Object.entries(e)){let e=`${n}/${i}`;r[i]=ex.includes(i)&&rx(a)?Object.fromEntries(Object.entries(a).map(([n,r])=>[n,rx(r)?t(r,`${e}/${n}`):ix(r)])):tx.includes(i)&&Array.isArray(a)?a.map((n,r)=>rx(n)?t(n,`${e}/${r}`):ix(n)):nx.includes(i)?rx(a)?t(a,e):Array.isArray(a)?a.map((n,r)=>rx(n)?t(n,`${e}/${r}`):ix(n)):ix(a):ix(a)}return r}function ox(e,t,n=``){return t(ax(e,(e,n)=>ox(e,t,n),n),n)}let sx=[`minimum`,`maximum`,`exclusiveMinimum`,`exclusiveMaximum`,`multipleOf`,`maxItems`,`uniqueItems`,`minProperties`,`maxProperties`],cx=[`oneOf`,`not`];function lx(e){let t=[],n=[],r=[];return{schema:ox(e,(e,i)=>{for(let n of sx)n in e&&(delete e[n],t.push(`${i}/${n}`));typeof e.minItems==`number`&&e.minItems>1&&(delete e.minItems,t.push(`${i}/minItems`));for(let t of cx)t in e&&r.push(`${i}/${t}`);return(e.type===`object`||Array.isArray(e.type)&&e.type.includes(`object`)||rx(e.properties))&&e.additionalProperties!==!1&&(e.additionalProperties!==void 0&&n.push(`${i}/additionalProperties`),e.additionalProperties=!1),e}),stripped:t,overridden:n,undroppable:r}}function ux(e,t){let{schema:n,stripped:r,overridden:i,undroppable:a}=lx(e);return r.length&&yb.warn(`AnthropicTransport: tool "${t}" requested schema enforcement; these keywords cannot be enforced and were removed — validate them yourself: ${r.join(`, `)}`),i.length&&yb.warn(`AnthropicTransport: tool "${t}" requested schema enforcement, which requires closed objects; \`additionalProperties\` was set to false at: ${i.join(`, `)}. The tool now accepts fewer inputs than its schema declared.`),a.length&&yb.warn(`AnthropicTransport: tool "${t}" uses schema keywords enforcement cannot express (${a.join(`, `)}). They cannot be removed without changing the schema's meaning, so the request will be rejected. Rewrite them or drop enforceSchema for this tool.`),n}let dx=[`additionalProperties`,`examples`,`multipleOf`,`patternProperties`,`$defs`,`definitions`];function fx(e,t){if(!t.startsWith(`#/`))return;let n=e;for(let e of t.slice(2).split(`/`)){if(!rx(n))return;n=n[e.replace(/~1/g,`/`).replace(/~0/g,`~`)]}return rx(n)?n:void 0}function px(e,t,n,r){let i=t,a=n,o=typeof i.$ref==`string`?i.$ref:void 0;for(;o&&!a.has(o);){let t=fx(e,o);if(!t)break;let{$ref:n}=i,r=fd(i,[`$ref`]);i=Object.assign(Object.assign({},ix(t)),r),a=/* @__PURE__ */ new Set([...a,o]),o=typeof i.$ref==`string`?i.$ref:void 0}return typeof i.$ref==`string`&&r.push(i.$ref),ax(i,t=>px(e,t,a,r),``)}function mx(e){let t=[],n=px(e,e,/* @__PURE__ */ new Set,t);return t.length&&yb.warn(`GeminiTransport: these \`$ref\` pointers could not be inlined — a cycle, a typo, or an external ref: ${[...new Set(t)].join(`, `)}. They are left in the schema, so Gemini will reject this declaration; that is deliberate, because dropping them would send a node that constrains nothing.`),ox(n,e=>{if(Array.isArray(e.type)){let t=e.type.filter(e=>e!==`null`);t.length===1&&e.type.length!==t.length&&(e.type=t[0],e.nullable=!0)}if(Array.isArray(e.anyOf)){let t=e.anyOf.filter(rx),n=t.filter(e=>e.type!==`null`);if(t.length===2&&n.length===1){let{anyOf:t}=e,r=fd(e,[`anyOf`]);return Object.assign(Object.assign(Object.assign({},n[0]),r),{nullable:!0})}}`const`in e&&(e.enum=[e.const],delete e.const);for(let t of dx)delete e[t];for(let t of Object.keys(e))t.startsWith(`$`)&&t!==`$ref`&&delete e[t];return e})}function hx(e,t,n){return(e instanceof DOMException||e instanceof Error)&&(e.name===`AbortError`||e.name===`TimeoutError`)?n?.aborted?n.reason:t.aborted?t.reason:e:e}function gx(e,t){return new Promise((n,r)=>{let i=()=>t?.reason??new DOMException(`The operation was aborted.`,`AbortError`);if(t?.aborted){r(i());return}let a=()=>{clearTimeout(o),r(i())},o=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e);t?.addEventListener(`abort`,a,{once:!0})})}let _x=Object.freeze({NO_API_KEY:`NO_API_KEY`,BAD_API_KEY:`BAD_API_KEY`,KEY_UNREADABLE:`KEY_UNREADABLE`,MODEL_NOT_ALLOWED:`MODEL_NOT_ALLOWED`,BAD_REQUEST:`BAD_REQUEST`,FALLBACKS_NOT_SUPPORTED:`FALLBACKS_NOT_SUPPORTED`,REQUEST_TOO_LARGE:`REQUEST_TOO_LARGE`,VENDOR_UNREACHABLE:`VENDOR_UNREACHABLE`}),vx=new Set(Object.values(_x));function yx(e){return typeof e==`string`&&vx.has(e)?e:void 0}let bx=Object.freeze({SIGNED_OUT:`SIGNED_OUT`,ACCESS_DENIED:`ACCESS_DENIED`}),xx=e=>{if(!e||typeof e!=`object`)return!1;let{MESSAGE_TYPE:t,ERROR:n}=e;return t===`MSG_NACK`||Array.isArray(n)},Sx=e=>e?.code!==void 0;function Cx(e,t,n){if(e!==401&&e!==403||Sx(t))return;let r=typeof n==`string`&&n.trim()===``;if(xx(t)||r)return e===401?bx.SIGNED_OUT:bx.ACCESS_DENIED}function wx(e,t){return e===413&&t===void 0}function Tx(e){let t=e?.ERROR,n=Array.isArray(t)?t[0]?.TEXT:void 0;return typeof n==`string`&&n?n:void 0}let Ex=`The AI service refused the assistant's request. An administrator can find the details in the browser console.`;Object.freeze({NO_API_KEY:`The assistant isn't set up yet. An administrator needs to add an API key for its AI service.`,BAD_API_KEY:`The assistant can't use its AI service key. An administrator needs to check the key.`,KEY_UNREADABLE:`The assistant can't read its AI service key. An administrator needs to check how the key is stored.`,MODEL_NOT_ALLOWED:`The assistant asked for an AI model this app doesn't allow. An administrator needs to check the app's allowed models.`,BAD_REQUEST:Ex,FALLBACKS_NOT_SUPPORTED:Ex,REQUEST_TOO_LARGE:`This request is too large to send. Start a new conversation or send a shorter message, and if you attached a file, try a smaller one.`,VENDOR_UNREACHABLE:`The AI service can't be reached right now. Please try again in a few minutes. If it keeps happening, tell an administrator.`,SIGNED_OUT:`Your session has ended. Sign in again to use the assistant.`,ACCESS_DENIED:`You don't have access to the assistant. An administrator can give you access.`});let Dx=e=>e!==_x.VENDOR_UNREACHABLE;var Ox=class extends Error{constructor(e,t,n,r){super(`${e} AI service refused the request (${n} ${t})`),this.vendorLabel=e,this.code=t,this.status=n,this.detail=r,this.name=`AIServiceError`}get terminal(){return Dx(this.code)}};function kx(e){let t=e?.error;return typeof t==`string`&&t?t:void 0}let Ax=Object.freeze([/prompt is too long/i,/input token count .* exceeds/i,/maximum context length/i,/context[_ ]length[_ ]exceeded/i,/too many (input )?tokens/i]),jx=/(\d[\d,]{2,})\D{0,40}?(?:>|exceeds)\D{0,80}?(\d[\d,]{2,})/i;var Mx=class extends Error{constructor(e,t,n,r){super(`${e} rejected the request — the prompt exceeds the model context window`+(t!=null&&n!=null?` (${t} > ${n})`:``)+(r?`: ${r}`:``)+`. Retrying will not clear this — the conversation must be compacted.`),this.vendorLabel=e,this.promptTokens=t,this.limitTokens=n,this.detail=r,this.name=`ContextOverflowError`}};function Nx(e){if(!e||typeof e!=`object`)return[];let t=[],n=(e,r)=>{if(!(r>4||!e||typeof e!=`object`))for(let i of Object.values(e))typeof i==`string`?t.push(i):typeof i==`object`&&n(i,r+1)};return n(e,0),t}function Px(e,t,n){if(t===400)for(let e of Nx(n)){if(!Ax.some(t=>t.test(e)))continue;let t=jx.exec(e);return{promptTokens:t?Number(t[1].replace(/,/g,``)):void 0,limitTokens:t?Number(t[2].replace(/,/g,``)):void 0,message:e}}}function Fx(e,t,n,r){return J(this,void 0,void 0,function*(){let i=e.getReader(),a=new TextDecoder,o=``,s=e=>/* @__PURE__ */ Error(`${n} proxy sent a malformed frame: ${e.slice(0,120)}`),c=e=>{if(!e)return;let t;try{t=JSON.parse(e)}catch{throw s(e)}if(typeof t!=`object`||!t||Array.isArray(t))throw s(e);let i=t;if(i.t===`ok`){if(i.body==null)throw Error(`${n} proxy sent an ok frame without a body`);return i}if(i.t===`err`){if(typeof i.status!=`number`)throw Error(`${n} proxy sent an err frame without a numeric status`);return i}if(i.t===`ping`){if(r>0&&typeof i.sinceLastEventMs==`number`&&i.sinceLastEventMs>r)throw new DOMException(`${n} request stalled: proxy reported ${i.sinceLastEventMs}ms since the last upstream event (exceeds ${r}ms)`,`TimeoutError`);return}};try{for(;;){let{done:e,value:n}=yield i.read();if(e)break;t(),o+=a.decode(n,{stream:!0});let r=o.indexOf(`
247
247
  `);for(;r!==-1;){let e=o.slice(0,r).trim();o=o.slice(r+1);let t=c(e);if(t)return t;r=o.indexOf(`
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 Ix=12e4,Lx=1e3;function Rx(e){let t=(e?.get)?.call(e,`x-should-retry`);return typeof t==`string`&&t.trim().toLowerCase()===`false`}function zx(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*Lx);let r=Date.parse(t);if(!Number.isNaN(r))return Math.max(0,r-Date.now())}function Bx(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*Lx}}}function Vx(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 Hx(e,t){return Math.max(0,e-t)}function Ux(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=Bb(o),p=(e,t,n)=>(yb.error(`${o}Transport: the AI service refused the request (${t} ${e})${n?`: ${n}`:``}`),new Ox(o,e,t,n)),m=0,h=(e,t)=>{let n=u*2**e,r=Ix-m,i=Vx(e,u,t,r);return m+=Hx(i,n),t!=null&&i>n?yb.warn(`${o}Transport: honouring the server's requested retry delay (${Math.round(i)}ms, asked ${Math.round(t)}ms)`):t!=null&&t>n&&yb.warn(`${o}Transport: declining the server's requested retry delay (asked ${Math.round(t)}ms; the ${Ix}ms sequence allowance is spent) — using the ladder's ${Math.round(i)}ms`),gx(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}=gb([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=Eb(t),r=Rb(f,Db(n),n);if(r)throw zb(o,r,c.status,n,t||void 0);let i=Px(f,c.status,n);if(i)throw new Mx(o,i.promptTokens,i.limitTokens,i.message??(t||void 0));if(Tb(c.status,Db(n)))throw jb(o,n,t||void 0);let a=yx(Db(n));if(a&&a!==_x.VENDOR_UNREACHABLE)throw p(a,c.status,kx(n));let l=Cx(c.status,n,t);if(l)throw p(l,c.status,Tx(n)??(t||void 0));if(wx(c.status,n))throw p(_x.REQUEST_TOO_LARGE,c.status,t||void 0);let u=Rx(c.headers);if(s.includes(c.status)&&!u&&e<5){yb.warn(`${o}Transport: retryable status ${c.status}, retrying (attempt ${e+1}/5)`),clearTimeout(y),yield h(e,zx(c.headers)||Bx(n));continue}throw a?p(a,c.status,kx(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 Fx(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=Rb(f,t.code,t);if(n)throw zb(o,n,t.status,t,t.error);let r=Px(f,t.status,t);if(r)throw new Mx(o,r.promptTokens,r.limitTokens,r.message??t.error);if(Tb(t.status,t.code))throw jb(o,t);let i=yx(t.code);if(i&&i!==_x.VENDOR_UNREACHABLE)throw p(i,t.status,kx(t));if(s.includes(t.status)&&e<5){yb.warn(`${o}Transport: retryable status ${t.status} (err frame), retrying (attempt ${e+1}/5)`),clearTimeout(y),yield h(e,Bx(t));continue}throw i?p(i,t.status,kx(t)):Error(`${o} request error ${t.status}: ${t.error??JSON.stringify(t.details)}`)}return yield c.json()}catch(e){throw hx(e,u.signal,d)}finally{clearTimeout(y),x()}}throw Error(`${o} request failed: max retries exceeded`)})}function Wx(e){if(e&&e!==`auto`)return e===`required`?{type:`any`}:e===`none`?{type:`none`}:{type:`tool`,name:e.tool}}let Gx={"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},Kx=`emit_structured_response`;function qx(e){if(!Hb.includes(e))throw Error(`AnthropicTransport: unsupported model "${e}". Use one of: ${Hb.join(`, `)}.`)}function Jx(e){return e===`claude-fable-5`||e===`claude-opus-4-8`||e===`claude-opus-4-7`||e===`claude-sonnet-5`}function Yx(e){return e===`claude-fable-5`||e===`claude-opus-4-8`||e===`claude-sonnet-5`||e===`claude-haiku-4-5-20251001`}function Xx(e){return e!==`claude-haiku-4-5-20251001`}function Zx(e){return e===`claude-fable-5`}function Qx(e,t){let n=e===`claude-sonnet-5`||Zx(e),r={type:`adaptive`,display:`summarized`};return t===`off`?Zx(e)?r:n?{type:`disabled`}:void 0:t===`auto`||t!==void 0?Xx(e)?r:void 0:n?r:void 0}function $x(e){return e===`claude-fable-5`||e===`claude-opus-4-8`||e===`claude-sonnet-5`}let eS={minimal:`low`,low:`low`,medium:`medium`,high:`high`,max:`max`};function tS(e,t){if(t!==void 0&&t!==`auto`&&t!==`off`&&$x(e)&&Xx(e))return eS[t]}let nS=`anthropic`;var rS=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`}},iS=class e{warnIfThinkingUnclampable(e){if(this.warnedThinkingClamped)return;let t=this.clampWarning(e);t&&(this.warnedThinkingClamped=!0,yb.warn(t))}clampWarning(e){switch(e){case void 0:return;case`off`:return Zx(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 Xx(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!Xx(this.model)||!$x(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`;qx(t),this.model=t,t===`claude-sonnet-5`?yb.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`?yb.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`?yb.warn(`AnthropicTransport: using ${t} — significantly higher cost; reserve for tasks where Sonnet reliability is insufficient.`):t===`claude-fable-5`&&yb.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:Gx[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&&Yx(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:Kx,description:`Emit the structured response that matches the required schema.`,input_schema:r}],a.tool_choice={type:`tool`,name:Kx}),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===Kx);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?ux(e.parameters,e.name):e.parameters},e.enforceSchema?{strict:!0}:{}))),a.tools?.length){let e=Wx(n?.toolChoice);e&&(a.tool_choice=e)}this.warnIfThinkingUnclampable(n?.thinkingPolicy);let o=Qx(this.model,n?.thinkingPolicy);o&&(a.thinking=o);let s=tS(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&&!Jx(this.model)&&!c&&(a.temperature=Kb(n.temperature,{defaultTemp:1,maxTemp:1})),n?.responseSchema&&Yx(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}=Xb(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:Ub(r.mimeType),data:Wb(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:Ub(e.mimeType),data:Wb(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?.[nS];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:Hb.includes(t)?t:(this.warnedUnknownServingModels.has(t)||(this.warnedUnknownServingModels.add(t),yb.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),{[nS]:e})}if(e.stop_reason===`max_tokens`&&l.length>0)throw new rS(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 Ux({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:Cb.anthropic,retryableStatuses:e.RETRYABLE_STATUSES,timeout:this.timeout,stallTimeout:this.stallTimeout,backoffBaseMs:e.BACKOFF_BASE_MS,signal:n})})}};iS.TOKENS_PER_MILLION=1e6,iS.COST_DECIMAL_PLACES=6,iS.RATE_LIMIT_STATUS=429,iS.SERVICE_UNAVAILABLE_STATUS=503,iS.OVERLOADED_STATUS=529,iS.RETRYABLE_STATUSES=[iS.RATE_LIMIT_STATUS,iS.SERVICE_UNAVAILABLE_STATUS,iS.OVERLOADED_STATUS],iS.BACKOFF_BASE_MS=1e3;let aS=`default_api.`,oS=/print\(\s*$/;var sS=class{constructor(e){this.src=e,this.pos=0}parse(){let e=this.src.indexOf(aS);e===-1&&this.bail();let t=oS.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(aS);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 cS(e,t){if(!e)return null;let n;try{n=new sS(e).parse()}catch{return null}return t.has(n.name)?n:null}let lS=e=>`https://generativelanguage.googleapis.com/v1beta/models/${e}:generateContent`,uS={"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 dS(e){if(e&&e!==`auto`)return e===`required`?{functionCallingConfig:{mode:`ANY`}}:e===`none`?{functionCallingConfig:{mode:`NONE`}}:{functionCallingConfig:{mode:`ANY`,allowedFunctionNames:[e.tool]}}}function fS(e){if(!Vb.includes(e))throw Error(`GeminiTransport: unsupported model "${e}". Use one of: ${Vb.join(`, `)}.`)}let pS={"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.`},mS=[`gemini-2.5-flash`,`gemini-2.5-flash-lite`],hS=[`gemini-3.8-flash`,`gemini-3.5-flash`,`gemini-3.1-flash-lite`,`gemini-3.1-pro-preview`],gS=[`minimal`,`low`,`medium`,`high`],_S={"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 vS(e,t){if(!e?.length||e.includes(t))return t;let n=gS.indexOf(t),r=e=>Math.abs(gS.indexOf(e)-n),i=e[0];for(let t of e)r(t)<=r(i)&&(i=t);return i}let yS={minimal:`minimal`,low:`low`,medium:`medium`,high:`high`,max:`high`},bS=e=>e!==void 0&&e!==`auto`&&e!==`off`;function xS(e,t){if(bS(t)){let n=_S[e];if(n)return{includeThoughts:!0,thinkingLevel:vS(n,yS[t])}}return t===`off`&&mS.includes(e)?{includeThoughts:!1,thinkingBudget:0}:t===`auto`&&mS.includes(e)?{includeThoughts:!0,thinkingBudget:-1}:{includeThoughts:!0}}let SS=`gemini`;function CS(e){let t=[],n=[];for(let r of e)r.kind===`image`?t.push({inlineData:{mimeType:Ub(r.mimeType),data:Wb(r.data)}}):n.push({text:`[File: ${r.name}]\n${r.content}`});return{imageParts:t,textParts:n}}var wS=class extends Error{constructor(e){super(`Gemini returned MALFORMED_FUNCTION_CALL`),this.finishMessage=e,this.name=`MalformedFunctionCallError`}},TS=class e{warnIfThinkingUnclampable(e){if(!this.warnedThinkingClamped){if(e===`off`&&!mS.includes(this.model)){this.warnedThinkingClamped=!0,yb.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(bS(e)){let t=_S[this.model];if(!t){this.warnedThinkingClamped=!0,yb.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=yS[e],r=vS(t,n);r!==n&&(this.warnedThinkingClamped=!0,yb.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`;fS(t),this.model=t;let n=pS[t];n&&yb.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:uS[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:mx(e.parameters)}))}]:void 0,a=n?.systemPrompt?{role:`system`,parts:[{text:n.systemPrompt}]}:void 0,o=i?dS(n?.toolChoice):void 0;this.warnIfThinkingUnclampable(n?.thinkingPolicy);let s={thinkingConfig:xS(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&&hS.includes(this.model)&&(s.mediaResolution=`MEDIA_RESOLUTION_${c.detail.toUpperCase()}`),n?.temperature!=null&&(s.temperature=Kb(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:mx(n.responseSchema)}:{}),n?.signal);return this.fromGeminiResponse(f,l,s.maxOutputTokens)})}logTokenUsage(t,n,r,i){let{costUsd:a,savedUsd:o,breakdown:s}=$b(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:Ub(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?.[SS],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}=CS(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}=CS(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:{[SS]:t}})}else e.thought&&e.text?d.push(e.text):e.text&&f.push(e.text);if(c?.finishReason===`MALFORMED_FUNCTION_CALL`){let e=cS(c.finishMessage,t);if(!e)throw new wS(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 rS(this.model,i,r,t.map(e=>e.name))}logAbnormalResponse(e,t){let n=e.usageMetadata??{},r=e.candidates?.[0]??{};yb.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:`${lS(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 Ux({url:r,headers:a,body:i,credentials:o,vendorLabel:Cb.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}};TS.TOKENS_PER_MILLION=1e6,TS.COST_DECIMAL_PLACES=6,TS.RATE_LIMIT_STATUS=429,TS.SERVICE_UNAVAILABLE_STATUS=503,TS.BAD_GATEWAY_STATUS=502,TS.RETRYABLE_STATUSES=[TS.RATE_LIMIT_STATUS,TS.SERVICE_UNAVAILABLE_STATUS,TS.BAD_GATEWAY_STATUS],TS.BACKOFF_BASE_MS=1e3;var ES=class e{constructor(){this.noopProvider=new Sb}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}]})}};ES.DEFAULT_NAME=`default`;let DS=N.createInterface(e=>e.singleton(ES)),OS=6e4,kS=3e5;Object.freeze({anthropic:Object.freeze({low:Object.freeze({model:`claude-haiku-4-5-20251001`,maxTokens:16e3,stallTimeoutMs:OS,timeoutMs:kS}),high:Object.freeze({model:`claude-sonnet-5`,maxTokens:128e3,stallTimeoutMs:OS,timeoutMs:kS}),reasoning:Object.freeze({model:`claude-opus-4-8`,maxTokens:32e3,stallTimeoutMs:OS,timeoutMs:kS})}),gemini:Object.freeze({low:Object.freeze({model:`gemini-3.1-flash-lite`,stallTimeoutMs:OS,timeoutMs:kS}),high:Object.freeze({model:`gemini-3.8-flash`,stallTimeoutMs:OS,timeoutMs:kS}),reasoning:Object.freeze({model:`gemini-3.1-pro-preview`,stallTimeoutMs:OS,timeoutMs:kS})})});let AS=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)}`,hae=e=>T` ${A(()=>vb(),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=${Ff(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)}>
@@ -998,8 +998,8 @@ ${e?`<li><strong>Minutes:</strong> Runs at every interval of minutes from the ho
998
998
  </${t}>`}} `)} `}} `,T`<div>Select a field to set value</div>`)} `,r7=class extends Qe{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),J5(this,this.styles,`value`)}validateInput(e){return this.field&&[`validation`in this.field?this.field.validation(e):null,iFe(K5(this),e)].filter(e=>!!e).join(`, `)||null}handleInputChange(e){e.stopPropagation();let t=e.target;if(t.type!==`checkbox`&&t.type!==`select-one`){let e=this.validateInput(t.value);if(e){this.validationError=!0,this.validationMsg=e;return}this.validationError=!1,this.validationMsg=null}let n;n=t.getAttribute(`role`)===`checkbox`?t.checked:t.type===`select-one`?e.target.value:this.field&&t7(K5(this))?parseInt(t.value):this.field&&n7(K5(this))?parseFloat(t.value):t.value,this.value=n;let r={value:n,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(Y5.ValueUpdated,{detail:r,bubbles:!0,composed:!0}))}handleRemoveVariadicOperand(){if(!this.variadic)throw Error(`Cannot remove inputs for non-variadic operator`);let e={index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(Y5.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};q([D({attribute:`value-index`})],r7.prototype,`valueIndex`,void 0),q([D({mode:`boolean`})],r7.prototype,`variadic`,void 0),q([D({mode:`boolean`,attribute:`validation-error`})],r7.prototype,`validationError`,void 0),q([D({attribute:`validation-msg`})],r7.prototype,`validationMsg`,void 0),q([C],r7.prototype,`field`,void 0),q([C],r7.prototype,`operator`,void 0),q([C],r7.prototype,`value`,void 0),q([C],r7.prototype,`config`,void 0),q([C],r7.prototype,`styles`,void 0),r7=q([$e({name:`expression-rule-value`,template:uFe,styles:aFe,shadowOptions:{delegatesFocus:!0}})],r7);let i7=(e,t)=>t.field.defaultValue===void 0?fFe(e,t):t.field.defaultValue,dFe=(e,t)=>n=>{if(e?.valueType?.type!==t.operator?.valueType?.type||!(`value`in t)||!t.value||!t.operator)return null;let r=t.operator.nbInputs===1?[t.value]:t.value;return n>=r.length?null:r[n]},fFe=(e,t)=>{switch(K5(Object.assign(Object.assign({},t),{operator:e}))){case`string`:return``;case`boolean`:return!1;case`date`:return U5(/* @__PURE__ */ new Date);case`date-time`:return W5(/* @__PURE__ */ new Date);case`double`:case`int`:case`bigdecimal`:case`short`:case`long`:return 0;case`enum`:{let n=e?.valueType?.type===`enum`?e?.valueType?.values:t.field.type===`enum`?t.field.values:{};if(Object.keys(n).length===0)throw Error(`Enums require configured values`);return Object.keys(n)[0]}}},pFe=(e,t)=>{let n=dFe(e,t);switch(e.nbInputs){case 0:return{field:t.field,operator:e,value:void 0};case 1:return{field:t.field,operator:e,value:n(0)??i7(e,t)};case 2:return{field:t.field,operator:e,value:[n(0)??i7(e,t),n(1)??i7(e,t)]};case`many`:return{field:t.field,operator:e,value:[n(0)??i7(e,t)]}}},mFe=(e,t,n)=>{switch(e.operator.nbInputs){case 0:throw Error(`Cannot set the value for a UniraryOperator`);case 1:return{field:e.field,operator:e.operator,value:t};case 2:case`many`:if(!(`value`in e)||!Array.isArray(e.value))throw Error(`Invalid value shape for rule`);return{field:e.field,operator:e.operator,value:e.value.map((e,r)=>r===n?t:e)}}},hFe=e=>!e&&e!==0,gFe=e=>{if(!e.field||!e.operator)return!0;if(e.operator.nbInputs===0)return!1;if(!(`value`in e))throw Error(`No value set as required for operator`);return K5(e)!==`boolean`&&!!(Array.isArray(e.value)?e.value:[e.value]).some(hFe)},_Fe=O` .rule-container{border: 1px solid #eee;margin-bottom: 5px;padding: 5px;display: grid;grid-template-columns: auto 1fr}.rule-container.error{border-color: red}.margin{margin-left: calc(var(--design-unit) * 1px);margin-right: calc(var(--design-unit) * 1px)}.rule-header{margin-bottom: 5px;display: flex;justify-content: flex-end}.rule-actions{display: inline-block}.rule-content{display: flex;flex-wrap: wrap;align-items: center}.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}expression-rule-value{display: flex}`,vFe=T` ${e=>{let t=e.styles?.customElements?.button||`button`;return T`<div class="rule-container ${e=>dn([`error`,e.error])}"><div class="rule-content"><expression-rule-field class="margin" :fields=${e=>e.config.fields}:field=${e=>e.model?.field}:config=${e=>e.config}:styles=${e=>e.styles}@field-selected=${(e,t)=>e.handleFieldSelected(t.event)}></expression-rule-field><expression-rule-operator class="margin" :operators=${e=>e.config.operators}:field=${e=>e.model.field}:operator=${e=>e.model?.operator}:config=${e=>e.config}:styles=${e=>e.styles}@operator-selected=${(e,t)=>e.handleOperatorSelected(t.event)}></expression-rule-operator>${j(e=>e.operandIterator,T`<expression-rule-value class="margin" :config=${(e,t)=>t.parent.config}:styles=${(e,t)=>t.parent.styles}:field=${(e,t)=>t.parent.model.field}:operator=${(e,t)=>t.parent.model.operator}:value=${(e,t)=>t.parent.operandValue(t.index)}value-index=${(e,t)=>t.index}?variadic=${(e,t)=>t.parent.model?.operator?.nbInputs===`many`}@value-updated=${(e,t)=>t.parent.handleValueChanged(t.event)}@remove-variadic-operand=${(e,t)=>t.parent.handleRemoveVarArg(t.event)}></expression-rule-value>`,{positioning:!0,recycle:!1})} ${A(e=>e.model?.operator?.nbInputs===`many`,T`<${t}type="button" class="btn btn-sm btn-accept" @click="${e=>e.dispatchAddVarArg()}">
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
- Delete Rule </${t}></div></div></div>`}} `,a7=class extends Qe{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),J5(this,this.styles,`rule`),this.config.partialRuleValidationWarning&&(this.error=gFe(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,i7(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(Y5.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(Y5.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();let t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(Y5.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(Y5.UpdateRule,{detail:r,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();let{value:t,index:n}=e.detail,r={ruleId:this.model.ruleId,newData:mFe(this.model,t,n)};this.dispatchEvent(new CustomEvent(Y5.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(Y5.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:pFe(n,this.model)},bubbles:!0,composed:!0}))}};q([C],a7.prototype,`config`,void 0),q([C],a7.prototype,`styles`,void 0),q([C],a7.prototype,`model`,void 0),q([C],a7.prototype,`index`,void 0),q([D({mode:`boolean`})],a7.prototype,`error`,void 0),q([w],a7.prototype,`operandIterator`,null),a7=q([$e({name:`expression-rule`,template:vFe,styles:_Fe,shadowOptions:{delegatesFocus:!0}})],a7);let o7=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=XPe(t.model,this),this.userUpdatingModel=!1):this.model===null&&this.initBaseModel()}modelChanged(e,t){if(!t||this.userUpdatingModel)return;let n=H5(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(Y5.AddGroup,this.handleAddGroup),this.addEventListener(Y5.DelGroup,this.handleDeleteGroup),this.addEventListener(Y5.AddRule,this.handleAddRule),this.addEventListener(Y5.DelRule,this.handleDeleteRule),this.addEventListener(Y5.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(Y5.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(Y5.AddGroup,this.handleAddGroup),this.removeEventListener(Y5.DelGroup,this.handleDeleteGroup),this.removeEventListener(Y5.AddRule,this.handleAddRule),this.removeEventListener(Y5.DelRule,this.handleDeleteRule),this.removeEventListener(Y5.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(Y5.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:V5,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=B5(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=B5(this.model,t,n)}_handleDeleteGroup(e){let{groupId:t}=e.detail;this.model=KPe(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=JPe(this.model,t,n)}_handleUpdateRuleData(e){let{ruleId:t,newData:n}=e.detail;this.model=YPe(this.model,t,n)}};q([C],o7.prototype,`config`,void 0),q([C],o7.prototype,`styles`,void 0),q([C],o7.prototype,`model`,void 0),o7=q([$e({name:`expression-builder`,template:Q5,styles:X5})],o7);let s7=class extends o7{};s7=q([$e({name:`foundation-expression-builder`,styles:X5,template:Q5})],s7);let c7=[`int`,`short`,`long`],l7=[`double`,`bigdecimal`],u7=[...c7,...l7],d7=[`date`,`date-time`],f7=[`string`,`enum`],p7=[`boolean`],m7=e=>e.operator?.valueType?.type??e.field.type;function h7(e){switch(m7(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 g7(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 _7(e,t,n){return{TYPE:`BINARY_EXPRESSION`,LEFT:{TYPE:`FIELD`,NAME:e.field.fieldId},OPERATION:t,RIGHT:n}}function v7(e,t,n=[]){return`value`in e?{TYPE:`METHOD_EXPRESSION`,PARAMETERS:[{TYPE:`FIELD`,NAME:e.field.fieldId},...n],METHOD:t}:null}function y7(e){let t=t=>{let n=m7(e);if(f7.includes(n))return t;if(u7.includes(n))return t.toString();if(p7.includes(n))return t;if(Array.isArray(t))throw Error(`Not implemented TernararyOperator or VariadicOperator args in rule value transformer`);if(d7.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 b7(e,t){return{TYPE:`PREDICATE_EXPRESSION`,OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>`children`in e?b7(e,t):t(e)).filter(Boolean)}}function x7(e,t){let n=t=>{let n=m7(e);if(f7.includes(n))return t;if(c7.includes(n))return parseInt(t);if(l7.includes(n))return parseFloat(t);if(p7.includes(n))return t;if(d7.includes(n)){let e=new Date(parseInt(t));return n===`date`?U5(e):W5(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 S7={template:Q5,styles:X5};var C7;(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`})})(C7||(C7={}));let w7=[{type:C7.logicalOperations.AND,maxRules:`many`},{type:C7.logicalOperations.OR,maxRules:`many`}],$={EQUALS:C7.operations.EQUALS,NOT_EQUALS:C7.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:C7.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:C7.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:C7.operations.LESS_THAN,LESS_THAN_OR_EQUAL:C7.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:C7.operations.IS_CURRENT,IS_PREVIOUS:C7.operations.IS_PREVIOUS},T7=e=>({type:`enum`,input:`select`,values:e}),yFe=T7({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.`}}),bFe=T7({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.`}}),E7=[{type:$.EQUALS,label:`Equals`,nbInputs:1,applyTo:[...f7,...p7,...u7,...d7],tooltip:`Check the equality of the field compared to a set value`},{type:$.NOT_EQUALS,label:`Not equals`,nbInputs:1,applyTo:[...f7,...p7,...u7,...d7],tooltip:`Check that the field is different from a set value`},{type:$.IS_NULL,label:`Is null`,nbInputs:0,applyTo:[`enum`,...p7,...u7,...d7],tooltip:`Check if the field value is null`},{type:$.NOT_NULL,label:`Not null`,nbInputs:0,applyTo:[`enum`,...p7,...u7,...d7],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:[...u7],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:[...u7],tooltip:`Check if the field value is greater than or equal to a specified number`},{type:$.LESS_THAN,label:`Less than`,nbInputs:1,applyTo:[...u7],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:[...u7],tooltip:`Check if the field value is less than or equal to a specified number`},{type:$.IS_BEFORE,label:`Is before`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is before a specified date/time`},{type:$.IS_AFTER,label:`Is after`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is after a specified date/time`},{type:$.ON_OR_BEFORE,label:`On or before`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is on or before a specified date/time`},{type:$.ON_OR_AFTER,label:`On or after`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is on or after a specified date/time`},{type:$.IS_CURRENT,label:`Is current`,nbInputs:1,applyTo:[...d7],tooltip:`Check whether the current date/time matches the current hour/day/work day/week/month/year.`,valueType:bFe,optgroup:`Relative Period`},{type:$.IS_PREVIOUS,label:`Is previous`,nbInputs:1,applyTo:[...d7],tooltip:`Check whether the current date/time matches the previous hour/day/work day/week/month/year`,valueType:yFe,optgroup:`Relative Period`}];function xFe(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 SFe(e,t){switch(t){case $.IS_NULL_OR_BLANK:return v7(e,C7.methodCall.IS_NULL_OR_BLANK,[]);case $.NOT_NULL_OR_BLANK:return v7(e,C7.methodCall.NOT_NULL_OR_BLANK,[]);case $.CONTAINS:if(!(`value`in e))throw Error(`Invalid shape for operator CONTAINS`);return v7(e,C7.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 v7(e,C7.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 v7(e,C7.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 v7(e,C7.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 CFe(e){if(!(e.operator?.type&&e.field?.fieldId))return null;let t=y7(e),n=h7(t),r=xFe(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 g7(t,r,n);case $.IS_NULL:return _7(t,C7.operations.EQUALS,{TYPE:`NULL`});case $.NOT_NULL:return _7(t,C7.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 SFe(t,r);default:throw Error(`Unmatched case for operator name: ${r}`)}}function wFe(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 TFe(e,t){let n=(()=>{if(t.RIGHT.TYPE===`NULL`){let e=t.OPERATION===`EQUALS`?$[$.IS_NULL]:$[$.NOT_NULL];return E7.find(t=>t.type===e)}let n=wFe(t.OPERATION,e);return E7.find(e=>e.type===n)})();return Object.assign(Object.assign({},e),{operator:n})}function EFe(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 x7(TFe({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function DFe(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===C7.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:E7.find(e=>e.type===n),value:r}}function D7(e,t){return{combinator:w7.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 D7(e,t);if(t.TYPE===`BINARY_EXPRESSION`)return EFe(e,t);if(t.TYPE===`METHOD_EXPRESSION`)return DFe(e,t);throw Error(`RuleExpression format not yet supported - unsupported TYPE`)})}}let O7=class extends o7{ruleConfigChanged(e,t){this.config=Object.assign({combinators:w7,operators:E7,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},t?.model?{model:D7(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=b7(e,CFe);this.dispatchEvent(new CustomEvent(`change`,{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};q([C],O7.prototype,`ruleConfig`,void 0),O7=q([$e({name:`foundation-rule-expression-builder`,styles:X5,template:Q5})],O7);let k7={TRIM:`TRIM`,PLUS:`PLUS`,MINUS:`MINUS`,MULTIPLY:`MULTIPLY`,DIVIDE:`DIVIDE`,CONVERT_TO_DATE:`CONVERT_TO_DATE`,CONVERT_TO_DATE_TIME:`CONVERT_TO_DATE_TIME`},A7=[{type:k7.PLUS,label:`Add (+)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE`},{type:k7.MINUS,label:`Subtract (-)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE`},{type:k7.MULTIPLY,label:`Multiply (*)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE`},{type:k7.DIVIDE,label:`Divide (/)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE`},{type:k7.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:k7.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 OFe(e){return e}function kFe(e,t){switch(t){case k7.TRIM:return v7(e,C7.methodCall.TRIM,[]);case k7.CONVERT_TO_DATE:return v7(e,C7.methodCall.LONG_TO_DATE,[]);case k7.CONVERT_TO_DATE_TIME:return v7(e,C7.methodCall.LONG_TO_DATE_TIME,[])}}function AFe(e){if(!(e.operator?.type&&e.field?.fieldId))return null;let t=y7(e),n=h7(t),r=OFe(t.operator.type);switch(r){case k7.TRIM:case k7.CONVERT_TO_DATE:case k7.CONVERT_TO_DATE_TIME:return kFe(t,r);case k7.PLUS:case k7.MINUS:case k7.DIVIDE:case k7.MULTIPLY:return g7(t,r,n);default:throw Error(`Unmatched case for operator name: ${r}`)}}function jFe(e,t){return t.field.type!==`date`&&t.field.type,e}function MFe(e,t){let n=(()=>{let n=jFe(t.OPERATION,e);return A7.find(e=>e.type===n)})();return Object.assign(Object.assign({},e),{operator:n})}function NFe(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 x7(MFe({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function PFe(e,t){let[n,r]=(()=>{switch(!0){case t.METHOD===`TRIM`:return[k7[k7.TRIM],void 0];case t.METHOD===`LONG_TO_DATE`:return[k7[k7.CONVERT_TO_DATE],void 0];case t.METHOD===`LONG_TO_DATE_TIME`:return[k7[k7.CONVERT_TO_DATE_TIME],void 0];default:throw Error(`Unhandled fromMethodExpression case`)}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:A7.find(e=>e.type===n),value:r}}function j7(e,t){return{combinator:M5,children:t.EXPRESSIONS.map(t=>{if(!(`TYPE`in t))throw Error(`RuleExpression format not yet supported - no TYPE`);if(t.TYPE===`PREDICATE_EXPRESSION`)return j7(e,t);if(t.TYPE===`BINARY_EXPRESSION`)return NFe(e,t);if(t.TYPE===`METHOD_EXPRESSION`)return PFe(e,t);throw Error(`RuleExpression format not yet supported - unsupported TYPE`)})}}let M7=class extends o7{valueConfigChanged(e,t){let n={TYPE:`PREDICATE_EXPRESSION`,OPERATION:`NULL`,EXPRESSIONS:t.model?[t.model]:[]},r=j7(t.fields,n);this.config={combinators:[M5],operators:A7,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:AFe(e.children[0]);this.dispatchEvent(new CustomEvent(`change`,{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};q([C],M7.prototype,`valueConfig`,void 0),M7=q([$e({name:`foundation-value-expression-builder`,styles:X5,template:Q5})],M7);let N7=T`<template ${k(`notificationListener`)}><slot></slot></template>`,FFe={mode:`open`,delegatesFocus:!0};var P7=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){zy.warn(`No stream available for ${this.resourceName}`);return}this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate(ey(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],P7.prototype,`notificationListener`,void 0),q([Cv],P7.prototype,`connect`,void 0),q([D({attribute:`resource-name`})],P7.prototype,`resourceName`,void 0),q([D({attribute:`close-timeout`,converter:E})],P7.prototype,`closeTimeout`,void 0),q([C],P7.prototype,`toastButtons`,void 0),q([D({attribute:`toast-position`})],P7.prototype,`toastPosition`,void 0),q([gy],P7.prototype,`datasource`,void 0),P7.compose({baseName:`notification-listener`,template:N7,shadowOptions:FFe});let F7=Jd(`foundation-router`),I7=`$router`,L7=Object.freeze({getOrCreateFor:e=>{let t=e[I7];return t===void 0?e[I7]=new IFe(e):t},find:e=>m_.find(e),from:e=>m_.from(e)});var IFe=class extends g_{};let LFe=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function R7(e){return LFe.test(e)}function z7(e){return e.config instanceof L_?e:L7.find(e)}function RFe(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 zFe(e){return e.replace(`/*${c_}`,``)}function B7(){document.querySelector(`foundation-router, fast-router`)===null&&window.dispatchEvent(new PopStateEvent(`popstate`))}let V7=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=z7(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&&R7(e)){location.href=e;return}history.pushState({},document.title,e),B7(),t&&V7.path.trigger(e)},replace:(e,t=!0)=>{if(e&&R7(e)){location.href=e;return}history.replaceState({},document.title,e),B7(),t&&V7.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=z7(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 V7.name.generateRoute(e,t,n);i!==null&&V7.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 V7.name.generateRoute(e,t,n);i!==null&&V7.path.replace(i,r)}),trigger:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={}){let r=yield V7.name.generateRoute(e,t,n);r!==null&&V7.path.trigger(r)})})}),H7=e=>!e.navId||e.navId===`header`||e.navId===`side-nav`;function BFe(e,t=H7,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 U7=class extends d_{constructor(){super(...arguments),this.definitions=[]}map(...e){let t=this.owner,n=!t.parent,r=t.basename;n&&r!==``&&r!==`/`&&(F7.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 F7.debug(`'${e.path}' path okay as is`),e;let t=e.path.charAt(0)===`/`?``:`/`,n=`${r}${t}${e.path}`;return F7.debug(`'${e.path}' path modified to '${n}'`),Object.assign(Object.assign({},e),{path:n})})),this.definitions=[...e,...this.definitions],super.map(...e)}};q([C],U7.prototype,`definitions`,void 0);var W7=class extends L_{constructor(){super(),this.logger=F7,this.loginPath=`login`,this.notFoundPath=`not-found`,this.notPermittedPath=`not-permitted`,this.routes=new U7(this),this.basename=Wf,this.routes=new U7(this)}getNavItems(e=H7){return BFe(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>J(this,void 0,void 0,function*(){this.analytics.trackEvent(Xd.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(),V7.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}.`),V7.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(),V7.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 V7.name.push(this.relativeTo,e.name,e.params,e.trigger);return}if(e.path){V7.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)?RFe([n,e]):e;return i=r?`${i}?${r}`:i,i}getNavigationPathBasename(){let e=(this.parent?.relativeTo?.route)?.endpoint.route.path;return e?zFe(e):this.basename?this.basename:``}construct(e){return this.container.get(e)}};q([Nt],W7.prototype,`container`,void 0),q([Qd],W7.prototype,`analytics`,void 0),q([yg],W7.prototype,`user`,void 0),q([Mg],W7.prototype,`_session`,void 0);let G7=`navigate-to`,K7=`generate-navigation-path`,q7=class extends L7.from(Qe){constructor(){super(...arguments),this.logger=F7,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[I7]}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(G7,this.onNavigateTo),this.addEventListener(K7,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(G7,this.onNavigateTo),this.removeEventListener(K7,this.onGenerateNavigationPath)}};q7=q([$e({name:`foundation-router`})],q7);let J7=e=>`control: ${e}-control, content: ${e}-content`,VFe=[`background: progress-ring-background`,`progress: progress-ring-progress`,`indeterminate-indicator-1: progress-ring-indeterminate`].join(`, `),Y7=e=>T`<${e}-card class=${e=>dn(`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=>dn(`stepper-tab-menu`,[`stepper-tab-menu-hidden`,e.hideTabs])}part="stepper-tab-menu"><slot name="tab" ${xt(`tabs`)}></slot></div>${A(e=>e.orientation===za.vertical&&!e.hideProgress,T`<div class="stepper-tab-progress" part="stepper-tab-progress"><${e}-progress-ring class="progress-ring" part="progress-ring" exportparts="${VFe}" 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="${J7(`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="${J7(`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="${J7(`next-button`)}" @click=${e=>e.nextStep()}data-test-id="next-button">Next</${e}-button>`)}</slot></div>`)}</${e}-card>`)} `,HFe=T` ${e=>Y7(Uy(e))} `,X7=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=za.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 zy.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):(zy.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-${In()}`)}getTabPanelIds(){return this.tabpanels.map(e=>e.getAttribute(`id`)??`panel-${In()}`)}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 Q7={};Z7.compose(Object.assign({baseName:`stepper`,template:HFe,styles:X7,shadowOptions:void 0},Q7)),class extends ad{}.compose(Object.assign({baseName:`accordion-item`,template:(e,t)=>rd(e,t),styles:(e,t)=>O` ${id(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:od},sd)),class extends ed{}.compose(Object.assign({baseName:`accordion`,template:(e,t)=>fo(e,t),styles:(e,t)=>O` ${$u(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:td},nd)),class extends mb{}.compose({baseName:`actions-menu`,styles:(e,t)=>O` :host{--actions-opener-height-multiplier: 0.6px;--menu-item-height-multiplier: 0.5px}${cd(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:pb});let UFe=O` ${AS}`;(class extends eC{}).compose(Object.assign({baseName:`ai-criteria-search`,template:(e,t)=>jS,styles:UFe,shadowOptions:void 0},tC)),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 $7(e,t){return new co(`appearance`,e,t)}let WFe=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%}`,GFe=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%}`,KFe=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)}`,qFe=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%}`,JFe=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%}`,YFe=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%}`,XFe=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%}`,ZFe=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%}`,QFe=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%}`,$Fe=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%}`,eIe=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%}`,tIe=(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))}`,e9=(e,t)=>O` ${IC(e,t)} ${tIe(e,t)} `.withBehaviors($7(`primary`,WFe),$7(`secondary`,GFe),$7(`tertiary`,XFe),$7(`neutral`,KFe),$7(`danger`,qFe),$7(`success`,JFe),$7(`warning`,YFe),$7(`primary-outline`,ZFe),$7(`secondary-outline`,QFe),$7(`neutral-outline`,$Fe),$7(`link`,eIe));(class extends sC{}).compose(Object.assign({baseName:`anchor`,template:(e,t)=>aC(e,t),styles:(e,t)=>O` ${oC(e,t)} ${e9(e,t)} `.withBehaviors(...e9(e,t).behaviors),shadowOptions:cC},lC)),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)),class extends _C{}.compose(Object.assign({baseName:`avatar`,template:(e,t)=>hC(e,t),styles:(e,t)=>O` ${gC(e,t)}`,shadowOptions:vC},yC)),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));let nIe=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)}`,rIe=EC;(class extends DC{}).compose({baseName:`banner`,shadowOptions:rIe,styles:nIe,template:TC}),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)),class extends AC{}.compose(Object.assign({baseName:`breadcrumb`,template:(e,t)=>OC(e,t),styles:(e,t)=>O` ${kC(e,t)}`,shadowOptions:void 0},{})),class extends LC{}.compose(Object.assign({baseName:`button`,template:(e,t)=>FC(e,t),styles:e9,shadowOptions:RC},zC)),class extends HC{}.compose(Object.assign({baseName:`calendar`,template:(e,t)=>VC(e,t),styles:()=>O` ${BC()}`,shadowOptions:UC},WC)),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));let iIe=O` ${iw} .label{color: var(--neutral-foreground-hint)}.options{background: var(--neutral-layer-4)}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}`,aIe=T` ${aw(`rapid`)} `;var oIe=class extends sw{};let sIe=ow;oIe.compose(Object.assign({baseName:`categorized-multiselect`,template:aIe,styles:iIe,shadowOptions:void 0},sIe)),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)),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)),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)}`});let cIe=()=>O` ${Sw} :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)}`,lIe=T` ${ww(`rapid`)} `;(class extends Iw{}).compose(Object.assign({baseName:`date-picker`,template:lIe,styles:cIe,shadowOptions:void 0},{}));var t9;(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`})(t9||(t9={}));let{create:n9}=oi,r9=ts(t9.error),i9=as.create(r9.r,r9.g,r9.b),a9=n9(`error-color`).withDefault(i9),o9=ts(t9.success),s9=as.create(o9.r,o9.g,o9.b),c9=n9(`success-color`).withDefault(s9),l9=ts(t9.warning),u9=as.create(l9.r,l9.g,l9.b),d9=n9(`warning-color`).withDefault(u9),f9=ts(t9.buy),p9=as.create(f9.r,f9.g,f9.b),uIe=n9(`buy-color`).withDefault(p9),m9=ts(t9.sell),h9=as.create(m9.r,m9.g,m9.b),dIe=n9(`sell-color`).withDefault(h9),g9=ts(t9.info),_9=as.create(g9.r,g9.g,g9.b),fIe=n9(`info-color`).withDefault(_9),v9=ts(t9.error),y9=as.create(v9.r,v9.g,v9.b),pIe=n9(`serious-notify-color`).withDefault(y9),{create:b9}=oi,x9=e=>oi.create({name:e,cssCustomPropertyName:null}),S9=as.create(1,1,1),mIe=as.create(0,0,0),C9=4.5;function hIe(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 gIe(e,t,n,r,i,a,o){let s=e.source,c=e.closestIndexOf(s),l=cs(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 _Ie(e,t){return e.contrast(S9)>=t?S9:mIe}function w9(e,t){let n=e,r=x9(`${n}-palette`).withDefault(e=>us.from(t.getValueFor(e))),i=x9(`${n}-fill-rest-delta`).withDefault(0),a=x9(`${n}-fill-hover-delta`).withDefault(4),o=x9(`${n}-fill-active-delta`).withDefault(-5),s=x9(`${n}-fill-focus-delta`).withDefault(0),c=x9(`${n}-foreground-rest-delta`).withDefault(0),l=x9(`${n}-foreground-hover-delta`).withDefault(6),u=x9(`${n}-foreground-active-delta`).withDefault(-4),d=x9(`${n}-foreground-focus-delta`).withDefault(0),f=x9(`${n}-fill-recipe`).withDefault({evaluate:(e,t)=>hIe(r.getValueFor(e),vc.getValueFor(e),t??Nc.getValueFor(e),a.getValueFor(e),o.getValueFor(e),s.getValueFor(e),Ys.getValueFor(e),Xs.getValueFor(e),Zs.getValueFor(e))}),p=b9(`${n}-fill-rest`).withDefault(e=>f.getValueFor(e).evaluate(e).rest),m=b9(`${n}-fill-hover`).withDefault(e=>f.getValueFor(e).evaluate(e).hover),h=b9(`${n}-fill-active`).withDefault(e=>f.getValueFor(e).evaluate(e).active),g=b9(`${n}-fill-focus`).withDefault(e=>f.getValueFor(e).evaluate(e).focus),_=e=>(t,n)=>_Ie(n??p.getValueFor(t),e),v=x9(`foreground-on-${n}-recipe`).withDefault({evaluate:(e,t)=>_(C9)(e,t)}),y=b9(`foreground-on-${n}-rest`).withDefault(e=>v.getValueFor(e).evaluate(e,p.getValueFor(e))),b=b9(`foreground-on-${n}-hover`).withDefault(e=>v.getValueFor(e).evaluate(e,m.getValueFor(e))),ee=b9(`foreground-on-${n}-active`).withDefault(e=>v.getValueFor(e).evaluate(e,h.getValueFor(e))),x=b9(`foreground-on-${n}-focus`).withDefault(e=>v.getValueFor(e).evaluate(e,g.getValueFor(e))),te=x9(`foreground-on-${n}-large-recipe`).withDefault({evaluate:(e,t)=>_(7)(e,t)}),ne=b9(`foreground-on-${n}-rest-large`).withDefault(e=>te.getValueFor(e).evaluate(e,p.getValueFor(e))),S=b9(`foreground-on-${n}-hover-large`).withDefault(e=>te.getValueFor(e).evaluate(e,m.getValueFor(e))),C=b9(`foreground-on-${n}-active-large`).withDefault(e=>te.getValueFor(e).evaluate(e,h.getValueFor(e))),w=b9(`foreground-on-${n}-focus-large`).withDefault(e=>te.getValueFor(e).evaluate(e,g.getValueFor(e))),re=x9(`${n}-foreground-recipe`).withDefault({evaluate:(e,t)=>gIe(r.getValueFor(e),t??Nc.getValueFor(e),C9,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:b9(`${n}-foreground-rest`).withDefault(e=>re.getValueFor(e).evaluate(e).rest),foregroundHover:b9(`${n}-foreground-hover`).withDefault(e=>re.getValueFor(e).evaluate(e).hover),foregroundActive:b9(`${n}-foreground-active`).withDefault(e=>re.getValueFor(e).evaluate(e).active),foregroundFocus:b9(`${n}-foreground-focus`).withDefault(e=>re.getValueFor(e).evaluate(e).focus)}}let T9=ts(t9.green),E9=as.create(T9.r,T9.g,T9.b),D9=oi.create(`secondary-color`).withDefault(E9),{palette:vIe,fillRestDelta:yIe,fillHoverDelta:bIe,fillActiveDelta:xIe,fillFocusDelta:SIe,foregroundRestDelta:CIe,foregroundHoverDelta:wIe,foregroundActiveDelta:TIe,foregroundFocusDelta:EIe,fillRecipe:DIe,fillRest:OIe,fillHover:kIe,fillActive:AIe,fillFocus:jIe,foregroundOnRecipe:MIe,foregroundOnRest:NIe,foregroundOnHover:PIe,foregroundOnActive:FIe,foregroundOnFocus:IIe,foregroundOnLargeRecipe:LIe,foregroundOnRestLarge:RIe,foregroundOnHoverLarge:zIe,foregroundOnActiveLarge:BIe,foregroundOnFocusLarge:VIe,foregroundRecipe:HIe,foregroundRest:UIe,foregroundHover:WIe,foregroundActive:GIe,foregroundFocus:KIe}=w9(`secondary`,D9),O9=ts(t9.tertiary),k9=as.create(O9.r,O9.g,O9.b),A9=oi.create(`tertiary-color`).withDefault(k9),{palette:qIe,fillRestDelta:JIe,fillHoverDelta:YIe,fillActiveDelta:XIe,fillFocusDelta:ZIe,foregroundRestDelta:QIe,foregroundHoverDelta:$Ie,foregroundActiveDelta:eLe,foregroundFocusDelta:tLe,fillRecipe:nLe,fillRest:rLe,fillHover:iLe,fillActive:aLe,fillFocus:oLe,foregroundOnRecipe:sLe,foregroundOnRest:cLe,foregroundOnHover:lLe,foregroundOnActive:uLe,foregroundOnFocus:dLe,foregroundOnLargeRecipe:fLe,foregroundOnRestLarge:pLe,foregroundOnHoverLarge:mLe,foregroundOnActiveLarge:hLe,foregroundOnFocusLarge:gLe,foregroundRecipe:_Le,foregroundRest:vLe,foregroundHover:yLe,foregroundActive:bLe,foregroundFocus:xLe}=w9(`tertiary`,A9),{palette:SLe,fillRestDelta:CLe,fillHoverDelta:wLe,fillActiveDelta:TLe,fillFocusDelta:ELe,foregroundRestDelta:DLe,foregroundHoverDelta:OLe,foregroundActiveDelta:kLe,foregroundFocusDelta:ALe,fillRecipe:jLe,fillRest:MLe,fillHover:NLe,fillActive:PLe,fillFocus:FLe,foregroundOnRecipe:ILe,foregroundOnRest:LLe,foregroundOnHover:RLe,foregroundOnActive:zLe,foregroundOnFocus:BLe,foregroundOnLargeRecipe:VLe,foregroundOnRestLarge:HLe,foregroundOnHoverLarge:ULe,foregroundOnActiveLarge:WLe,foregroundOnFocusLarge:GLe,foregroundRecipe:KLe,foregroundRest:qLe,foregroundHover:JLe,foregroundActive:YLe,foregroundFocus:XLe}=w9(`error`,a9),{palette:ZLe,fillRestDelta:QLe,fillHoverDelta:$Le,fillActiveDelta:eRe,fillFocusDelta:tRe,foregroundRestDelta:nRe,foregroundHoverDelta:rRe,foregroundActiveDelta:iRe,foregroundFocusDelta:aRe,fillRecipe:oRe,fillRest:sRe,fillHover:cRe,fillActive:lRe,fillFocus:uRe,foregroundOnRecipe:dRe,foregroundOnRest:fRe,foregroundOnHover:pRe,foregroundOnActive:mRe,foregroundOnFocus:hRe,foregroundOnLargeRecipe:gRe,foregroundOnRestLarge:_Re,foregroundOnHoverLarge:vRe,foregroundOnActiveLarge:yRe,foregroundOnFocusLarge:bRe,foregroundRecipe:xRe,foregroundRest:SRe,foregroundHover:CRe,foregroundActive:wRe,foregroundFocus:TRe}=w9(`success`,c9),{palette:ERe,fillRestDelta:DRe,fillHoverDelta:ORe,fillActiveDelta:kRe,fillFocusDelta:ARe,foregroundRestDelta:jRe,foregroundHoverDelta:MRe,foregroundActiveDelta:NRe,foregroundFocusDelta:PRe,fillRecipe:FRe,fillRest:IRe,fillHover:LRe,fillActive:RRe,fillFocus:zRe,foregroundOnRecipe:BRe,foregroundOnRest:VRe,foregroundOnHover:HRe,foregroundOnActive:URe,foregroundOnFocus:WRe,foregroundOnLargeRecipe:GRe,foregroundOnRestLarge:KRe,foregroundOnHoverLarge:qRe,foregroundOnActiveLarge:JRe,foregroundOnFocusLarge:YRe,foregroundRecipe:XRe,foregroundRest:ZRe,foregroundHover:QRe,foregroundActive:$Re,foregroundFocus:eze}=w9(`warning`,d9);var tze=/* @__PURE__ */ c({accentFillActive:()=>Rc,accentFillActiveDelta:()=>Us,accentFillFocus:()=>zc,accentFillFocusDelta:()=>Ws,accentFillHover:()=>Lc,accentFillHoverDelta:()=>Hs,accentFillRest:()=>Ic,accentFillRestDelta:()=>Vs,accentForegroundActive:()=>tl,accentForegroundActiveDelta:()=>qs,accentForegroundFocus:()=>nl,accentForegroundFocusDelta:()=>Js,accentForegroundHover:()=>el,accentForegroundHoverDelta:()=>Ks,accentForegroundRest:()=>$c,accentForegroundRestDelta:()=>Gs,accentPalette:()=>bc,baseHeightMultiplier:()=>_s,baseLayerLuminance:()=>vs,bodyFont:()=>gs,buyColor:()=>uIe,controlCornerRadius:()=>z,defaultBuyColor:()=>p9,defaultErrorColor:()=>i9,defaultInfoColor:()=>_9,defaultSecondaryColor:()=>E9,defaultSellColor:()=>h9,defaultSeriousNotifyColor:()=>y9,defaultSuccessColor:()=>s9,defaultTertiaryColor:()=>k9,defaultWarningColor:()=>u9,density:()=>ys,designUnit:()=>B,direction:()=>bs,disabledOpacity:()=>xs,errorColor:()=>a9,errorFillActive:()=>PLe,errorFillActiveDelta:()=>TLe,errorFillFocus:()=>FLe,errorFillFocusDelta:()=>ELe,errorFillHover:()=>NLe,errorFillHoverDelta:()=>wLe,errorFillRecipe:()=>jLe,errorFillRest:()=>MLe,errorFillRestDelta:()=>CLe,errorForegroundActive:()=>YLe,errorForegroundActiveDelta:()=>kLe,errorForegroundFocus:()=>XLe,errorForegroundFocusDelta:()=>ALe,errorForegroundHover:()=>JLe,errorForegroundHoverDelta:()=>OLe,errorForegroundRecipe:()=>KLe,errorForegroundRest:()=>qLe,errorForegroundRestDelta:()=>DLe,errorPalette:()=>SLe,fillColor:()=>Nc,focusStrokeInner:()=>El,focusStrokeOuter:()=>Tl,focusStrokeWidth:()=>Ss,foregroundOnAccentActive:()=>Wc,foregroundOnAccentActiveLarge:()=>Yc,foregroundOnAccentFocus:()=>Gc,foregroundOnAccentFocusLarge:()=>Xc,foregroundOnAccentHover:()=>Uc,foregroundOnAccentHoverLarge:()=>Jc,foregroundOnAccentRest:()=>Hc,foregroundOnAccentRestLarge:()=>qc,foregroundOnErrorActive:()=>zLe,foregroundOnErrorActiveLarge:()=>WLe,foregroundOnErrorFocus:()=>BLe,foregroundOnErrorFocusLarge:()=>GLe,foregroundOnErrorHover:()=>RLe,foregroundOnErrorHoverLarge:()=>ULe,foregroundOnErrorLargeRecipe:()=>VLe,foregroundOnErrorRecipe:()=>ILe,foregroundOnErrorRest:()=>LLe,foregroundOnErrorRestLarge:()=>HLe,foregroundOnSecondaryActive:()=>FIe,foregroundOnSecondaryActiveLarge:()=>BIe,foregroundOnSecondaryFocus:()=>IIe,foregroundOnSecondaryFocusLarge:()=>VIe,foregroundOnSecondaryHover:()=>PIe,foregroundOnSecondaryHoverLarge:()=>zIe,foregroundOnSecondaryLargeRecipe:()=>LIe,foregroundOnSecondaryRecipe:()=>MIe,foregroundOnSecondaryRest:()=>NIe,foregroundOnSecondaryRestLarge:()=>RIe,foregroundOnSuccessActive:()=>mRe,foregroundOnSuccessActiveLarge:()=>yRe,foregroundOnSuccessFocus:()=>hRe,foregroundOnSuccessFocusLarge:()=>bRe,foregroundOnSuccessHover:()=>pRe,foregroundOnSuccessHoverLarge:()=>vRe,foregroundOnSuccessLargeRecipe:()=>gRe,foregroundOnSuccessRecipe:()=>dRe,foregroundOnSuccessRest:()=>fRe,foregroundOnSuccessRestLarge:()=>_Re,foregroundOnTertiaryActive:()=>uLe,foregroundOnTertiaryActiveLarge:()=>hLe,foregroundOnTertiaryFocus:()=>dLe,foregroundOnTertiaryFocusLarge:()=>gLe,foregroundOnTertiaryHover:()=>lLe,foregroundOnTertiaryHoverLarge:()=>mLe,foregroundOnTertiaryLargeRecipe:()=>fLe,foregroundOnTertiaryRecipe:()=>sLe,foregroundOnTertiaryRest:()=>cLe,foregroundOnTertiaryRestLarge:()=>pLe,foregroundOnWarningActive:()=>URe,foregroundOnWarningActiveLarge:()=>JRe,foregroundOnWarningFocus:()=>WRe,foregroundOnWarningFocusLarge:()=>YRe,foregroundOnWarningHover:()=>HRe,foregroundOnWarningHoverLarge:()=>qRe,foregroundOnWarningLargeRecipe:()=>GRe,foregroundOnWarningRecipe:()=>BRe,foregroundOnWarningRest:()=>VRe,foregroundOnWarningRestLarge:()=>KRe,infoColor:()=>fIe,neutralFillActive:()=>ol,neutralFillActiveDelta:()=>Zs,neutralFillFocus:()=>sl,neutralFillFocusDelta:()=>Qs,neutralFillHover:()=>al,neutralFillHoverDelta:()=>Xs,neutralFillInputActive:()=>dl,neutralFillInputActiveDelta:()=>tc,neutralFillInputFocus:()=>fl,neutralFillInputFocusDelta:()=>nc,neutralFillInputHover:()=>ul,neutralFillInputHoverDelta:()=>ec,neutralFillInputRest:()=>ll,neutralFillInputRestDelta:()=>$s,neutralFillLayerRest:()=>wl,neutralFillLayerRestDelta:()=>dc,neutralFillRest:()=>il,neutralFillRestDelta:()=>Ys,neutralFillStealthActive:()=>gl,neutralFillStealthActiveDelta:()=>ac,neutralFillStealthFocus:()=>_l,neutralFillStealthFocusDelta:()=>oc,neutralFillStealthHover:()=>hl,neutralFillStealthHoverDelta:()=>ic,neutralFillStealthRest:()=>ml,neutralFillStealthRestDelta:()=>rc,neutralFillStrongActive:()=>xl,neutralFillStrongActiveDelta:()=>lc,neutralFillStrongFocus:()=>Sl,neutralFillStrongFocusDelta:()=>uc,neutralFillStrongHover:()=>bl,neutralFillStrongHoverDelta:()=>cc,neutralFillStrongRest:()=>yl,neutralFillStrongRestDelta:()=>sc,neutralForegroundHint:()=>Dl,neutralForegroundRest:()=>H,neutralLayer1:()=>Ec,neutralLayer2:()=>Oc,neutralLayer3:()=>Ac,neutralLayer4:()=>Mc,neutralLayerCardContainer:()=>Sc,neutralLayerFloating:()=>wc,neutralPalette:()=>vc,neutralStrokeActive:()=>jl,neutralStrokeActiveDelta:()=>mc,neutralStrokeDividerRest:()=>Nl,neutralStrokeDividerRestDelta:()=>gc,neutralStrokeFocus:()=>Ml,neutralStrokeFocusDelta:()=>hc,neutralStrokeHover:()=>Al,neutralStrokeHoverDelta:()=>pc,neutralStrokeRest:()=>kl,neutralStrokeRestDelta:()=>fc,secondaryColor:()=>D9,secondaryFillActive:()=>AIe,secondaryFillActiveDelta:()=>xIe,secondaryFillFocus:()=>jIe,secondaryFillFocusDelta:()=>SIe,secondaryFillHover:()=>kIe,secondaryFillHoverDelta:()=>bIe,secondaryFillRecipe:()=>DIe,secondaryFillRest:()=>OIe,secondaryFillRestDelta:()=>yIe,secondaryForegroundActive:()=>GIe,secondaryForegroundActiveDelta:()=>TIe,secondaryForegroundFocus:()=>KIe,secondaryForegroundFocusDelta:()=>EIe,secondaryForegroundHover:()=>WIe,secondaryForegroundHoverDelta:()=>wIe,secondaryForegroundRecipe:()=>HIe,secondaryForegroundRest:()=>UIe,secondaryForegroundRestDelta:()=>CIe,secondaryPalette:()=>vIe,sellColor:()=>dIe,seriousNotifyColor:()=>pIe,strokeWidth:()=>V,successColor:()=>c9,successFillActive:()=>lRe,successFillActiveDelta:()=>eRe,successFillFocus:()=>uRe,successFillFocusDelta:()=>tRe,successFillHover:()=>cRe,successFillHoverDelta:()=>$Le,successFillRecipe:()=>oRe,successFillRest:()=>sRe,successFillRestDelta:()=>QLe,successForegroundActive:()=>wRe,successForegroundActiveDelta:()=>iRe,successForegroundFocus:()=>TRe,successForegroundFocusDelta:()=>aRe,successForegroundHover:()=>CRe,successForegroundHoverDelta:()=>rRe,successForegroundRecipe:()=>xRe,successForegroundRest:()=>SRe,successForegroundRestDelta:()=>nRe,successPalette:()=>ZLe,tertiaryColor:()=>A9,tertiaryFillActive:()=>aLe,tertiaryFillActiveDelta:()=>XIe,tertiaryFillFocus:()=>oLe,tertiaryFillFocusDelta:()=>ZIe,tertiaryFillHover:()=>iLe,tertiaryFillHoverDelta:()=>YIe,tertiaryFillRecipe:()=>nLe,tertiaryFillRest:()=>rLe,tertiaryFillRestDelta:()=>JIe,tertiaryForegroundActive:()=>bLe,tertiaryForegroundActiveDelta:()=>eLe,tertiaryForegroundFocus:()=>xLe,tertiaryForegroundFocusDelta:()=>tLe,tertiaryForegroundHover:()=>yLe,tertiaryForegroundHoverDelta:()=>$Ie,tertiaryForegroundRecipe:()=>_Le,tertiaryForegroundRest:()=>vLe,tertiaryForegroundRestDelta:()=>QIe,tertiaryPalette:()=>qIe,typeRampBaseFontSize:()=>Cs,typeRampBaseLineHeight:()=>ws,typeRampMinus1FontSize:()=>Ts,typeRampMinus1LineHeight:()=>Es,typeRampMinus2FontSize:()=>Ds,typeRampMinus2LineHeight:()=>Os,typeRampPlus1FontSize:()=>ks,typeRampPlus1LineHeight:()=>As,typeRampPlus2FontSize:()=>js,typeRampPlus2LineHeight:()=>Ms,typeRampPlus3FontSize:()=>Ns,typeRampPlus3LineHeight:()=>Ps,typeRampPlus4FontSize:()=>Fs,typeRampPlus4LineHeight:()=>Is,typeRampPlus5FontSize:()=>Ls,typeRampPlus5LineHeight:()=>Rs,typeRampPlus6FontSize:()=>zs,typeRampPlus6LineHeight:()=>Bs,warningColor:()=>d9,warningFillActive:()=>RRe,warningFillActiveDelta:()=>kRe,warningFillFocus:()=>zRe,warningFillFocusDelta:()=>ARe,warningFillHover:()=>LRe,warningFillHoverDelta:()=>ORe,warningFillRecipe:()=>FRe,warningFillRest:()=>IRe,warningFillRestDelta:()=>DRe,warningForegroundActive:()=>$Re,warningForegroundActiveDelta:()=>NRe,warningForegroundFocus:()=>eze,warningForegroundFocusDelta:()=>PRe,warningForegroundHover:()=>QRe,warningForegroundHoverDelta:()=>MRe,warningForegroundRecipe:()=>XRe,warningForegroundRest:()=>ZRe,warningForegroundRestDelta:()=>jRe,warningPalette:()=>ERe});let j9=Vw(t9.primary),M9=Vw(t9.neutral),N9=Vw(t9.green),P9=Vw(t9.tertiary),F9=Vw(t9.error),I9=Vw(t9.success),L9=Vw(t9.warning),R9=ms.DarkMode,nze=Nn.ltr,z9=`"Segoe UI", Arial, Helvetica, sans-serif`,B9=`14px`,V9=`20px`,rze={design_tokens:{color:{accent:{$value:j9.source.toColorString(),$type:`color`},neutral:{$value:M9.source.toColorString(),$type:`color`},secondary:{$value:N9.source.toColorString(),$type:`color`},tertiary:{$value:P9.source.toColorString(),$type:`color`},error:{$value:F9.source.toColorString(),$type:`color`},success:{$value:I9.source.toColorString(),$type:`color`},warning:{$value:L9.source.toColorString(),$type:`color`}},fontFamily:{bodyFont:{$value:z9,$type:`fontFamily`}},typography:{baseFontSize:{$value:B9,$type:`dimension`},baseLineHeight:{$value:V9,$type:`dimension`}},mode:{luminance:{$value:R9,$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 ize=/* @__PURE__ */ c({accentFillActiveDeltaValue:()=>-5,accentFillFocusDeltaValue:()=>0,accentFillHoverDeltaValue:()=>4,accentFillRestDeltaValue:()=>0,accentForegroundActiveDeltaValue:()=>-4,accentForegroundFocusDeltaValue:()=>0,accentForegroundHoverDeltaValue:()=>6,accentForegroundRestDeltaValue:()=>0,accentPaletteValue:()=>j9,baseHeightMultiplierValue:()=>10,baseLayerLuminanceValue:()=>R9,bodyFontValue:()=>z9,controlCornerRadiusValue:()=>4,densityValue:()=>0,designTokens:()=>rze,designUnitValue:()=>4,directionValue:()=>nze,disabledOpacityValue:()=>.3,errorPaletteValue:()=>F9,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:()=>M9,neutralStrokeActiveDeltaValue:()=>16,neutralStrokeDividerRestDeltaValue:()=>8,neutralStrokeFocusDeltaValue:()=>25,neutralStrokeHoverDeltaValue:()=>40,neutralStrokeRestDeltaValue:()=>25,prefix:()=>`rapid`,secondaryPaletteValue:()=>N9,strokeWidthValue:()=>1,successPaletteValue:()=>I9,tertiaryPaletteValue:()=>P9,typeRampBaseFontSizeValue:()=>B9,typeRampBaseLineHeightValue:()=>V9,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:()=>L9});(class extends K{constructor(){super(),Rw(tze,ize,this)}}).compose({baseName:`design-system-provider`,template:T`<slot></slot>`});let H9=O` ${e0} :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)}}`,aze=g0,oze=n0,sze=h0;(class extends v0{}).compose(Object.assign({baseName:`dialog`,shadowOptions:sze,styles:H9,template:oze},aze)),class extends x0{}.compose(Object.assign({baseName:`disclosure`,template:(e,t)=>y0(e,t),styles:(e,t)=>O` ${b0(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:h0},S0)),class extends T0{}.compose(Object.assign({baseName:`divider`,template:(e,t)=>C0(e,t),styles:(e,t)=>O` ${w0(e,t)}`,shadowOptions:void 0},E0)),class extends A0{}.compose({baseName:`dropdown-menu`,styles:(e,t)=>O` ${D0(`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:k0});let cze=O` ${j0}`;(class extends L0{}).compose({baseName:`environment-indicator`,styles:cze,template:M0});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 s7{constructor(){super(...arguments),this.styles={customElements:W9,customStyles:q9}}};q([C],J9.prototype,`styles`,void 0),J9=q([$e({name:`rapid-expression-builder`,styles:S7.styles,template:S7.template})],J9);let Y9=class extends O7{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:S7.styles,template:S7.template})],Y9);let X9=class extends M7{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:S7.styles,template:S7.template})],X9);let lze=O` ${$0} ::-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)}`,uze=T` ${e2(`rapid`)} `,dze=n2;(class extends t2{}).compose(Object.assign({baseName:`file-upload`,shadowOptions:void 0,styles:lze,template:uze},dze));let fze=(e,t)=>O` ${l2(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)}`,pze=T` ${u2(`rapid`)} `;(class extends d2{}).compose({baseName:`filter-bar`,template:pze,styles:fze});let mze=(e,t)=>O` ${r2} .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}`,hze=T` ${o2(`rapid`)} `;(class extends c2{}).compose({baseName:`filter`,template:hze,styles:mze}),class extends g2{}.compose(Object.assign({baseName:`flipper`,template:(e,t)=>m2(e,t),styles:(e,t)=>O` ${h2(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},_2));let gze=O` ${v2} 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)}`,_ze=T` ${y2(`rapid`)} `,vze=x2;(class extends b2{}).compose(Object.assign({baseName:`flyout`,shadowOptions:void 0,styles:gze,template:_ze},vze));let yze=(e,t)=>O` ${D2(e,t)}`,bze=(e,t)=>E2(e,t);var xze=class extends O2{};let Sze={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>`};xze.compose(Object.assign({baseName:`horizontal-scroll`,template:bze,styles:yze,shadowOptions:k2},Sze));let Cze=(e,t)=>O` ${A2(e,t)}`,wze=T` ${j2(`rapid`)} `;var Tze=class extends F2{};let Eze=N2,Dze=M2;Tze.compose(Object.assign({baseName:`icon`,template:wze,styles:Cze,shadowOptions:Dze},Eze)),class extends H2{}.compose(Object.assign({baseName:`option`,template:(e,t)=>B2(e,t),styles:(e,t)=>O` ${V2(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},U2)),class extends R2{}.compose(Object.assign({baseName:`listbox`,template:(e,t)=>I2(e,t),styles:(e,t)=>O` ${L2(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},z2)),class extends X2{}.compose(Object.assign({baseName:`menu-item`,template:(e,t)=>J2(e,t),styles:(e,t)=>O` ${Y2(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, ${hl}, transparent 15%);border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${hl}, 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: ${hl} color: ${H} */`,shadowOptions:void 0},Z2)),class extends K2{}.compose(Object.assign({baseName:`menu`,template:(e,t)=>W2(e,t),styles:(e,t)=>O` ${G2(e,t)} :host{border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${hl}, transparent 15%);padding: 0}`,shadowOptions:void 0},q2));let Oze=O` ${H9}`,kze=e4,Aze=Q2,jze=$2;(class extends t4{}).compose(Object.assign({baseName:`modal`,shadowOptions:jze,styles:Oze,template:Aze},kze));let Mze=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}`,Nze=T` ${tw(`rapid`)} `;var Pze=class extends rw{};let Fze=nw;Pze.compose(Object.assign({baseName:`multiselect`,template:Nze,styles:Mze,shadowOptions:void 0},Fze)),class extends P7{}.compose({baseName:`notification-listener`,template:N7,shadowOptions:{mode:`open`,delegatesFocus:!0}});let Ize=(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%}${Z0}`;var Lze=class extends v4{};let Rze=b4,zze=n4,Bze=y4;Lze.compose(Object.assign({baseName:`number-field`,template:zze,styles:Ize,shadowOptions:Bze},Rze)),class extends C4{}.compose({baseName:`optgroup`,template:(e,t)=>S4(e,t),styles:(e,t)=>O` ${x4(e,t)}`}),class extends k4{}.compose(Object.assign({baseName:`system-health-overlay`,template:A4,styles:j4,shadowOptions:void 0},M4));let Vze=O` ${N4} :host{--pill-fill: ${il};--pill-fill-hover: ${al};--pill-foreground: ${H}}`,Hze=P4;(class extends I4{}).compose(Object.assign({baseName:`pill`,template:Hze,styles:Vze,shadowOptions:void 0},F4)),class extends I3{}.compose(Object.assign({baseName:`progress-ring`,template:(e,t)=>P3(e,t),styles:(e,t)=>O` ${F3(e,t)}`,shadowOptions:void 0},L3)),class extends E4{}.compose(Object.assign({baseName:`progress`,template:(e,t)=>w4(e,t),styles:(e,t)=>O` ${T4(e,t)}`,shadowOptions:void 0},D4)),class extends W3{}.compose(Object.assign({baseName:`radio-group`,template:(e,t)=>H3(e,t),styles:(e,t)=>O` ${U3(e,t)}`,shadowOptions:void 0},G3)),class extends B3{}.compose(Object.assign({baseName:`radio`,template:(e,t)=>R3(e,t),styles:(e,t)=>O` ${z3(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},V3));let Z9=class extends m_.from(Qe){connectedCallback(){super.connectedCallback(),x.queueUpdate(()=>J(this,void 0,void 0,function*(){this.$router.config=this.config}))}};Z9=q([$e({name:`rapid-router`})],Z9);let Uze=O` ${i6} :host{font-family: var(--body-font)}`,Wze=T` ${h6(`rapid`)} `;(class extends g6{}).compose(Object.assign({baseName:`scheduler-cron-builder`,template:Wze,styles:Uze,shadowOptions:void 0},_6));let Gze=O` ${v6} :host{font-family: var(--body-font)}`,Kze=T` ${y6(`rapid`)} `;(class extends b6{}).compose(Object.assign({baseName:`scheduler-timezone`,template:Kze,styles:Gze,shadowOptions:void 0},x6));let qze=O` ${K3} :host{font-family: var(--body-font)}`,Jze=T` ${q3(`rapid`)} `;(class extends J3{}).compose(Object.assign({baseName:`scheduler`,template:Jze,styles:qze,shadowOptions:void 0},Y3)),class extends O6{}.compose(Object.assign({baseName:`search-bar-combobox`,template:(e,t)=>D6(e,t),styles:(e,t)=>O` ${E6(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:k6},A6));let Yze=O` ${S6}`,Xze=T` ${C6(`rapid`)} `;(class extends w6{}).compose(Object.assign({baseName:`search-bar`,template:Xze,styles:Yze,shadowOptions:void 0},T6)),class extends L6{}.compose(Object.assign({baseName:`section-navigator`,template:M6,styles:(e,t)=>j6,shadowOptions:R6},z6)),class extends H6{}.compose(Object.assign({baseName:`segmented-control`,template:(e,t)=>B6(e,t),styles:(e,t)=>O` ${V6(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},{})),class extends B3{}.compose(Object.assign({baseName:`segmented-item`,template:(e,t)=>U6(e,t),styles:(e,t)=>O` ${W6(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},{})),class extends q6{}.compose(Object.assign({baseName:`select`,template:(e,t)=>G6(e,t),styles:(e,t)=>O` ${K6(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},J6)),class extends Z6{}.compose(Object.assign({baseName:`skeleton`,template:(e,t)=>Y6(e,t),styles:(e,t)=>O` ${X6(e,t)} :host{--skeleton-fill: var( --neutral-fill-stealth-rest );/** value in ux doc rgba(242 242 242 / 0.1) */}`,shadowOptions:void 0},Q6)),class extends a8{}.compose(Object.assign({baseName:`slider-label`,template:(e,t)=>r8(e,t),styles:(e,t)=>O` ${i8(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},o8)),class extends t8{}.compose(Object.assign({baseName:`slider`,template:(e,t)=>$6(e,t),styles:(e,t)=>O` ${e8(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, ${Ic}, transparent 90%)}.thumb-cursor:focus::after{background-color: color-mix(in srgb, ${Ic}, transparent 80%)}.thumb-cursor:active::after{background-color: color-mix(in srgb, ${Ic}, 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},n8));let Zze=O` ${u8} .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)}`,Qze=T` ${d8(`rapid`)} `,$ze=f8;(class extends p8{}).compose({baseName:`snackbar`,shadowOptions:$ze,styles:Zze,template:Qze}),class extends g8{}.compose({baseName:`stacking-icons`,template:h8,styles:(e,t)=>O` ${m8(e,t)}`}),class extends S8{}.compose({baseName:`status-pill`,template:v8,styles:_8}),class extends k8{}.compose(Object.assign({baseName:`stepper-tab-panel`,template:(e,t)=>O8(e,t),shadowOptions:void 0},A8));let eBe=(e,t)=>O` ${T8(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)}`,tBe=T` ${w8(`rapid`)} `;(class extends E8{}).compose(Object.assign({baseName:`stepper-tab`,template:tBe,styles:eBe,shadowOptions:void 0},D8));let nBe=O` ${X7} :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)}`,rBe=T` ${Y7(`rapid`)} `;(class extends Z7{}).compose(Object.assign({baseName:`stepper`,template:rBe,styles:nBe,shadowOptions:void 0},Q7)),class extends N8{}.compose(Object.assign({baseName:`switch`,template:(e,t)=>j8(e,t),styles:(e,t)=>O` ${M8(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>`})),class extends B8{}.compose(Object.assign({baseName:`tab-panel`,template:(e,t)=>R8(e,t),styles:(e,t)=>O` ${z8(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},V8)),class extends I8{}.compose(Object.assign({baseName:`tab`,template:(e,t)=>P8(e,t),styles:(e,t)=>O` ${F8(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(${q0}, 0) * 100%), transparent ) !important;color: color-mix( in srgb, contrast-color(var(--tab-alert-color, var(--error-fill-rest))) calc(var(${q0}, 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},L8)),class extends W8{}.compose(Object.assign({baseName:`tabs`,template:(e,t)=>H8(e,t),styles:(e,t)=>O` ${U8(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},G8)),class extends J8{}.compose(Object.assign({baseName:`text-area`,template:(e,t)=>K8(e,t),styles:(e,t)=>O` ${q8(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},Y8)),class extends Q8{}.compose(Object.assign({baseName:`text-field`,template:(e,t)=>X8(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:$8},e5));let iBe=O` ${t5} .toast{background-color: ${Ec};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)}`,aBe=i5,oBe=r5;(class extends a5{}).compose(Object.assign({baseName:`toast`,shadowOptions:oBe,styles:iBe,template:n5},aBe)),class extends c5{}.compose(Object.assign({baseName:`toolbar`,template:(e,t)=>o5(e,t),styles:(e,t)=>O` ${s5(e,t)} :host{align-items: center;color: var(--neutral-foreground-rest)}.positioning-region{align-items: center}`,shadowOptions:void 0},l5)),class extends f5{}.compose(Object.assign({baseName:`tooltip`,template:(e,t)=>u5(e,t),styles:(e,t)=>O` ${d5(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},p5)),class extends g5{}.compose(Object.assign({baseName:`tree-item`,template:(e,t)=>m5(e,t),styles:(e,t)=>O` ${h5(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:`
1001
+ Delete Rule </${t}></div></div></div>`}} `,a7=class extends Qe{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),J5(this,this.styles,`rule`),this.config.partialRuleValidationWarning&&(this.error=gFe(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,i7(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(Y5.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(Y5.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();let t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(Y5.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(Y5.UpdateRule,{detail:r,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();let{value:t,index:n}=e.detail,r={ruleId:this.model.ruleId,newData:mFe(this.model,t,n)};this.dispatchEvent(new CustomEvent(Y5.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(Y5.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:pFe(n,this.model)},bubbles:!0,composed:!0}))}};q([C],a7.prototype,`config`,void 0),q([C],a7.prototype,`styles`,void 0),q([C],a7.prototype,`model`,void 0),q([C],a7.prototype,`index`,void 0),q([D({mode:`boolean`})],a7.prototype,`error`,void 0),q([w],a7.prototype,`operandIterator`,null),a7=q([$e({name:`expression-rule`,template:vFe,styles:_Fe,shadowOptions:{delegatesFocus:!0}})],a7);let o7=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=XPe(t.model,this),this.userUpdatingModel=!1):this.model===null&&this.initBaseModel()}modelChanged(e,t){if(!t||this.userUpdatingModel)return;let n=H5(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(Y5.AddGroup,this.handleAddGroup),this.addEventListener(Y5.DelGroup,this.handleDeleteGroup),this.addEventListener(Y5.AddRule,this.handleAddRule),this.addEventListener(Y5.DelRule,this.handleDeleteRule),this.addEventListener(Y5.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(Y5.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(Y5.AddGroup,this.handleAddGroup),this.removeEventListener(Y5.DelGroup,this.handleDeleteGroup),this.removeEventListener(Y5.AddRule,this.handleAddRule),this.removeEventListener(Y5.DelRule,this.handleDeleteRule),this.removeEventListener(Y5.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(Y5.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:V5,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=B5(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=B5(this.model,t,n)}_handleDeleteGroup(e){let{groupId:t}=e.detail;this.model=KPe(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=JPe(this.model,t,n)}_handleUpdateRuleData(e){let{ruleId:t,newData:n}=e.detail;this.model=YPe(this.model,t,n)}};q([C],o7.prototype,`config`,void 0),q([C],o7.prototype,`styles`,void 0),q([C],o7.prototype,`model`,void 0),o7=q([$e({name:`expression-builder`,template:Q5,styles:X5})],o7);let s7=class extends o7{};s7=q([$e({name:`foundation-expression-builder`,styles:X5,template:Q5})],s7);let c7=[`int`,`short`,`long`],l7=[`double`,`bigdecimal`],u7=[...c7,...l7],d7=[`date`,`date-time`],f7=[`string`,`enum`],p7=[`boolean`],m7=e=>e.operator?.valueType?.type??e.field.type;function h7(e){switch(m7(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 g7(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 _7(e,t,n){return{TYPE:`BINARY_EXPRESSION`,LEFT:{TYPE:`FIELD`,NAME:e.field.fieldId},OPERATION:t,RIGHT:n}}function v7(e,t,n=[]){return`value`in e?{TYPE:`METHOD_EXPRESSION`,PARAMETERS:[{TYPE:`FIELD`,NAME:e.field.fieldId},...n],METHOD:t}:null}function y7(e){let t=t=>{let n=m7(e);if(f7.includes(n))return t;if(u7.includes(n))return t.toString();if(p7.includes(n))return t;if(Array.isArray(t))throw Error(`Not implemented TernararyOperator or VariadicOperator args in rule value transformer`);if(d7.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 b7(e,t){return{TYPE:`PREDICATE_EXPRESSION`,OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>`children`in e?b7(e,t):t(e)).filter(Boolean)}}function x7(e,t){let n=t=>{let n=m7(e);if(f7.includes(n))return t;if(c7.includes(n))return parseInt(t);if(l7.includes(n))return parseFloat(t);if(p7.includes(n))return t;if(d7.includes(n)){let e=new Date(parseInt(t));return n===`date`?U5(e):W5(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 S7={template:Q5,styles:X5};var C7;(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`})})(C7||(C7={}));let w7=[{type:C7.logicalOperations.AND,maxRules:`many`},{type:C7.logicalOperations.OR,maxRules:`many`}],$={EQUALS:C7.operations.EQUALS,NOT_EQUALS:C7.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:C7.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:C7.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:C7.operations.LESS_THAN,LESS_THAN_OR_EQUAL:C7.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:C7.operations.IS_CURRENT,IS_PREVIOUS:C7.operations.IS_PREVIOUS},T7=e=>({type:`enum`,input:`select`,values:e}),yFe=T7({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.`}}),bFe=T7({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.`}}),E7=[{type:$.EQUALS,label:`Equals`,nbInputs:1,applyTo:[...f7,...p7,...u7,...d7],tooltip:`Check the equality of the field compared to a set value`},{type:$.NOT_EQUALS,label:`Not equals`,nbInputs:1,applyTo:[...f7,...p7,...u7,...d7],tooltip:`Check that the field is different from a set value`},{type:$.IS_NULL,label:`Is null`,nbInputs:0,applyTo:[`enum`,...p7,...u7,...d7],tooltip:`Check if the field value is null`},{type:$.NOT_NULL,label:`Not null`,nbInputs:0,applyTo:[`enum`,...p7,...u7,...d7],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:[...u7],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:[...u7],tooltip:`Check if the field value is greater than or equal to a specified number`},{type:$.LESS_THAN,label:`Less than`,nbInputs:1,applyTo:[...u7],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:[...u7],tooltip:`Check if the field value is less than or equal to a specified number`},{type:$.IS_BEFORE,label:`Is before`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is before a specified date/time`},{type:$.IS_AFTER,label:`Is after`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is after a specified date/time`},{type:$.ON_OR_BEFORE,label:`On or before`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is on or before a specified date/time`},{type:$.ON_OR_AFTER,label:`On or after`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is on or after a specified date/time`},{type:$.IS_CURRENT,label:`Is current`,nbInputs:1,applyTo:[...d7],tooltip:`Check whether the current date/time matches the current hour/day/work day/week/month/year.`,valueType:bFe,optgroup:`Relative Period`},{type:$.IS_PREVIOUS,label:`Is previous`,nbInputs:1,applyTo:[...d7],tooltip:`Check whether the current date/time matches the previous hour/day/work day/week/month/year`,valueType:yFe,optgroup:`Relative Period`}];function xFe(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 SFe(e,t){switch(t){case $.IS_NULL_OR_BLANK:return v7(e,C7.methodCall.IS_NULL_OR_BLANK,[]);case $.NOT_NULL_OR_BLANK:return v7(e,C7.methodCall.NOT_NULL_OR_BLANK,[]);case $.CONTAINS:if(!(`value`in e))throw Error(`Invalid shape for operator CONTAINS`);return v7(e,C7.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 v7(e,C7.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 v7(e,C7.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 v7(e,C7.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 CFe(e){if(!(e.operator?.type&&e.field?.fieldId))return null;let t=y7(e),n=h7(t),r=xFe(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 g7(t,r,n);case $.IS_NULL:return _7(t,C7.operations.EQUALS,{TYPE:`NULL`});case $.NOT_NULL:return _7(t,C7.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 SFe(t,r);default:throw Error(`Unmatched case for operator name: ${r}`)}}function wFe(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 TFe(e,t){let n=(()=>{if(t.RIGHT.TYPE===`NULL`){let e=t.OPERATION===`EQUALS`?$[$.IS_NULL]:$[$.NOT_NULL];return E7.find(t=>t.type===e)}let n=wFe(t.OPERATION,e);return E7.find(e=>e.type===n)})();return Object.assign(Object.assign({},e),{operator:n})}function EFe(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 x7(TFe({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function DFe(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===C7.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:E7.find(e=>e.type===n),value:r}}function D7(e,t){return{combinator:w7.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 D7(e,t);if(t.TYPE===`BINARY_EXPRESSION`)return EFe(e,t);if(t.TYPE===`METHOD_EXPRESSION`)return DFe(e,t);throw Error(`RuleExpression format not yet supported - unsupported TYPE`)})}}let O7=class extends o7{ruleConfigChanged(e,t){this.config=Object.assign({combinators:w7,operators:E7,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},t?.model?{model:D7(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=b7(e,CFe);this.dispatchEvent(new CustomEvent(`change`,{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};q([C],O7.prototype,`ruleConfig`,void 0),O7=q([$e({name:`foundation-rule-expression-builder`,styles:X5,template:Q5})],O7);let k7={TRIM:`TRIM`,PLUS:`PLUS`,MINUS:`MINUS`,MULTIPLY:`MULTIPLY`,DIVIDE:`DIVIDE`,CONVERT_TO_DATE:`CONVERT_TO_DATE`,CONVERT_TO_DATE_TIME:`CONVERT_TO_DATE_TIME`},A7=[{type:k7.PLUS,label:`Add (+)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE`},{type:k7.MINUS,label:`Subtract (-)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE`},{type:k7.MULTIPLY,label:`Multiply (*)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE`},{type:k7.DIVIDE,label:`Divide (/)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE`},{type:k7.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:k7.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 OFe(e){return e}function kFe(e,t){switch(t){case k7.TRIM:return v7(e,C7.methodCall.TRIM,[]);case k7.CONVERT_TO_DATE:return v7(e,C7.methodCall.LONG_TO_DATE,[]);case k7.CONVERT_TO_DATE_TIME:return v7(e,C7.methodCall.LONG_TO_DATE_TIME,[])}}function AFe(e){if(!(e.operator?.type&&e.field?.fieldId))return null;let t=y7(e),n=h7(t),r=OFe(t.operator.type);switch(r){case k7.TRIM:case k7.CONVERT_TO_DATE:case k7.CONVERT_TO_DATE_TIME:return kFe(t,r);case k7.PLUS:case k7.MINUS:case k7.DIVIDE:case k7.MULTIPLY:return g7(t,r,n);default:throw Error(`Unmatched case for operator name: ${r}`)}}function jFe(e,t){return t.field.type!==`date`&&t.field.type,e}function MFe(e,t){let n=(()=>{let n=jFe(t.OPERATION,e);return A7.find(e=>e.type===n)})();return Object.assign(Object.assign({},e),{operator:n})}function NFe(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 x7(MFe({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function PFe(e,t){let[n,r]=(()=>{switch(!0){case t.METHOD===`TRIM`:return[k7[k7.TRIM],void 0];case t.METHOD===`LONG_TO_DATE`:return[k7[k7.CONVERT_TO_DATE],void 0];case t.METHOD===`LONG_TO_DATE_TIME`:return[k7[k7.CONVERT_TO_DATE_TIME],void 0];default:throw Error(`Unhandled fromMethodExpression case`)}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:A7.find(e=>e.type===n),value:r}}function j7(e,t){return{combinator:M5,children:t.EXPRESSIONS.map(t=>{if(!(`TYPE`in t))throw Error(`RuleExpression format not yet supported - no TYPE`);if(t.TYPE===`PREDICATE_EXPRESSION`)return j7(e,t);if(t.TYPE===`BINARY_EXPRESSION`)return NFe(e,t);if(t.TYPE===`METHOD_EXPRESSION`)return PFe(e,t);throw Error(`RuleExpression format not yet supported - unsupported TYPE`)})}}let M7=class extends o7{valueConfigChanged(e,t){let n={TYPE:`PREDICATE_EXPRESSION`,OPERATION:`NULL`,EXPRESSIONS:t.model?[t.model]:[]},r=j7(t.fields,n);this.config={combinators:[M5],operators:A7,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:AFe(e.children[0]);this.dispatchEvent(new CustomEvent(`change`,{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};q([C],M7.prototype,`valueConfig`,void 0),M7=q([$e({name:`foundation-value-expression-builder`,styles:X5,template:Q5})],M7);let N7=T`<template ${k(`notificationListener`)}><slot></slot></template>`,FFe={mode:`open`,delegatesFocus:!0};var P7=class extends P{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[],this.reconnections=0,this.reconnection=Promise.resolve(),this.reconnectionWaitMs=1e4}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=>{if(!e)return;let t=this.reconnections+=1;this.reconnection=IFe(this.reconnection,this.reconnectionWaitMs).then(()=>this.handleReconnection(t)).catch(e=>zy.error(e))})})}handleReconnection(e){return J(this,void 0,void 0,function*(){var t;let n=()=>e===this.reconnections&&this.isConnected;if(!this.resourceName||!n())return;(t=this.dataSub)==null||t.unsubscribe(),this.dataSub=void 0;let r=yield this.initializeDatasource();if(n()){if(!r)throw Error(`Failed to initialize datasource for ${this.resourceName}`);this.setupDataSubscription()}})}initializeDatasource(){return J(this,void 0,void 0,function*(){return this.datasource?.initialized&&this.datasource.destroy(),this.datasource.init({resourceName:this.resourceName},!0)})}setupDataSubscription(){if(!this.datasource.stream){zy.warn(`No stream available for ${this.resourceName}`);return}this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate(ey(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],P7.prototype,`notificationListener`,void 0),q([Cv],P7.prototype,`connect`,void 0),q([D({attribute:`resource-name`})],P7.prototype,`resourceName`,void 0),q([D({attribute:`close-timeout`,converter:E})],P7.prototype,`closeTimeout`,void 0),q([C],P7.prototype,`toastButtons`,void 0),q([D({attribute:`toast-position`})],P7.prototype,`toastPosition`,void 0),q([gy],P7.prototype,`datasource`,void 0);function IFe(e,t){return new Promise(n=>{let r=setTimeout(n,t);e.finally(()=>{clearTimeout(r),n()})})}P7.compose({baseName:`notification-listener`,template:N7,shadowOptions:FFe});let F7=Jd(`foundation-router`),I7=`$router`,L7=Object.freeze({getOrCreateFor:e=>{let t=e[I7];return t===void 0?e[I7]=new LFe(e):t},find:e=>m_.find(e),from:e=>m_.from(e)});var LFe=class extends g_{};let RFe=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function R7(e){return RFe.test(e)}function z7(e){return e.config instanceof L_?e:L7.find(e)}function zFe(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 BFe(e){return e.replace(`/*${c_}`,``)}function B7(){document.querySelector(`foundation-router, fast-router`)===null&&window.dispatchEvent(new PopStateEvent(`popstate`))}let V7=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=z7(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&&R7(e)){location.href=e;return}history.pushState({},document.title,e),B7(),t&&V7.path.trigger(e)},replace:(e,t=!0)=>{if(e&&R7(e)){location.href=e;return}history.replaceState({},document.title,e),B7(),t&&V7.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=z7(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 V7.name.generateRoute(e,t,n);i!==null&&V7.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 V7.name.generateRoute(e,t,n);i!==null&&V7.path.replace(i,r)}),trigger:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={}){let r=yield V7.name.generateRoute(e,t,n);r!==null&&V7.path.trigger(r)})})}),H7=e=>!e.navId||e.navId===`header`||e.navId===`side-nav`;function VFe(e,t=H7,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 U7=class extends d_{constructor(){super(...arguments),this.definitions=[]}map(...e){let t=this.owner,n=!t.parent,r=t.basename;n&&r!==``&&r!==`/`&&(F7.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 F7.debug(`'${e.path}' path okay as is`),e;let t=e.path.charAt(0)===`/`?``:`/`,n=`${r}${t}${e.path}`;return F7.debug(`'${e.path}' path modified to '${n}'`),Object.assign(Object.assign({},e),{path:n})})),this.definitions=[...e,...this.definitions],super.map(...e)}};q([C],U7.prototype,`definitions`,void 0);var W7=class extends L_{constructor(){super(),this.logger=F7,this.loginPath=`login`,this.notFoundPath=`not-found`,this.notPermittedPath=`not-permitted`,this.routes=new U7(this),this.basename=Wf,this.routes=new U7(this)}getNavItems(e=H7){return VFe(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>J(this,void 0,void 0,function*(){this.analytics.trackEvent(Xd.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(),V7.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}.`),V7.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(),V7.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 V7.name.push(this.relativeTo,e.name,e.params,e.trigger);return}if(e.path){V7.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)?zFe([n,e]):e;return i=r?`${i}?${r}`:i,i}getNavigationPathBasename(){let e=(this.parent?.relativeTo?.route)?.endpoint.route.path;return e?BFe(e):this.basename?this.basename:``}construct(e){return this.container.get(e)}};q([Nt],W7.prototype,`container`,void 0),q([Qd],W7.prototype,`analytics`,void 0),q([yg],W7.prototype,`user`,void 0),q([Mg],W7.prototype,`_session`,void 0);let G7=`navigate-to`,K7=`generate-navigation-path`,q7=class extends L7.from(Qe){constructor(){super(...arguments),this.logger=F7,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[I7]}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(G7,this.onNavigateTo),this.addEventListener(K7,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(G7,this.onNavigateTo),this.removeEventListener(K7,this.onGenerateNavigationPath)}};q7=q([$e({name:`foundation-router`})],q7);let J7=e=>`control: ${e}-control, content: ${e}-content`,HFe=[`background: progress-ring-background`,`progress: progress-ring-progress`,`indeterminate-indicator-1: progress-ring-indeterminate`].join(`, `),Y7=e=>T`<${e}-card class=${e=>dn(`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=>dn(`stepper-tab-menu`,[`stepper-tab-menu-hidden`,e.hideTabs])}part="stepper-tab-menu"><slot name="tab" ${xt(`tabs`)}></slot></div>${A(e=>e.orientation===za.vertical&&!e.hideProgress,T`<div class="stepper-tab-progress" part="stepper-tab-progress"><${e}-progress-ring class="progress-ring" part="progress-ring" exportparts="${HFe}" 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="${J7(`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="${J7(`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="${J7(`next-button`)}" @click=${e=>e.nextStep()}data-test-id="next-button">Next</${e}-button>`)}</slot></div>`)}</${e}-card>`)} `,UFe=T` ${e=>Y7(Uy(e))} `,X7=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=za.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 zy.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):(zy.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-${In()}`)}getTabPanelIds(){return this.tabpanels.map(e=>e.getAttribute(`id`)??`panel-${In()}`)}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 Q7={};Z7.compose(Object.assign({baseName:`stepper`,template:UFe,styles:X7,shadowOptions:void 0},Q7)),class extends ad{}.compose(Object.assign({baseName:`accordion-item`,template:(e,t)=>rd(e,t),styles:(e,t)=>O` ${id(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:od},sd)),class extends ed{}.compose(Object.assign({baseName:`accordion`,template:(e,t)=>fo(e,t),styles:(e,t)=>O` ${$u(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:td},nd)),class extends mb{}.compose({baseName:`actions-menu`,styles:(e,t)=>O` :host{--actions-opener-height-multiplier: 0.6px;--menu-item-height-multiplier: 0.5px}${cd(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:pb});let WFe=O` ${AS}`;(class extends eC{}).compose(Object.assign({baseName:`ai-criteria-search`,template:(e,t)=>jS,styles:WFe,shadowOptions:void 0},tC)),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 $7(e,t){return new co(`appearance`,e,t)}let GFe=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%}`,KFe=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%}`,qFe=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)}`,JFe=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%}`,YFe=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%}`,XFe=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%}`,ZFe=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%}`,QFe=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%}`,$Fe=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%}`,eIe=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%}`,tIe=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%}`,nIe=(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))}`,e9=(e,t)=>O` ${IC(e,t)} ${nIe(e,t)} `.withBehaviors($7(`primary`,GFe),$7(`secondary`,KFe),$7(`tertiary`,ZFe),$7(`neutral`,qFe),$7(`danger`,JFe),$7(`success`,YFe),$7(`warning`,XFe),$7(`primary-outline`,QFe),$7(`secondary-outline`,$Fe),$7(`neutral-outline`,eIe),$7(`link`,tIe));(class extends sC{}).compose(Object.assign({baseName:`anchor`,template:(e,t)=>aC(e,t),styles:(e,t)=>O` ${oC(e,t)} ${e9(e,t)} `.withBehaviors(...e9(e,t).behaviors),shadowOptions:cC},lC)),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)),class extends _C{}.compose(Object.assign({baseName:`avatar`,template:(e,t)=>hC(e,t),styles:(e,t)=>O` ${gC(e,t)}`,shadowOptions:vC},yC)),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));let rIe=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)}`,iIe=EC;(class extends DC{}).compose({baseName:`banner`,shadowOptions:iIe,styles:rIe,template:TC}),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)),class extends AC{}.compose(Object.assign({baseName:`breadcrumb`,template:(e,t)=>OC(e,t),styles:(e,t)=>O` ${kC(e,t)}`,shadowOptions:void 0},{})),class extends LC{}.compose(Object.assign({baseName:`button`,template:(e,t)=>FC(e,t),styles:e9,shadowOptions:RC},zC)),class extends HC{}.compose(Object.assign({baseName:`calendar`,template:(e,t)=>VC(e,t),styles:()=>O` ${BC()}`,shadowOptions:UC},WC)),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));let aIe=O` ${iw} .label{color: var(--neutral-foreground-hint)}.options{background: var(--neutral-layer-4)}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}`,oIe=T` ${aw(`rapid`)} `;var sIe=class extends sw{};let cIe=ow;sIe.compose(Object.assign({baseName:`categorized-multiselect`,template:oIe,styles:aIe,shadowOptions:void 0},cIe)),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)),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)),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)}`});let lIe=()=>O` ${Sw} :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)}`,uIe=T` ${ww(`rapid`)} `;(class extends Iw{}).compose(Object.assign({baseName:`date-picker`,template:uIe,styles:lIe,shadowOptions:void 0},{}));var t9;(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`})(t9||(t9={}));let{create:n9}=oi,r9=ts(t9.error),i9=as.create(r9.r,r9.g,r9.b),a9=n9(`error-color`).withDefault(i9),o9=ts(t9.success),s9=as.create(o9.r,o9.g,o9.b),c9=n9(`success-color`).withDefault(s9),l9=ts(t9.warning),u9=as.create(l9.r,l9.g,l9.b),d9=n9(`warning-color`).withDefault(u9),f9=ts(t9.buy),p9=as.create(f9.r,f9.g,f9.b),dIe=n9(`buy-color`).withDefault(p9),m9=ts(t9.sell),h9=as.create(m9.r,m9.g,m9.b),fIe=n9(`sell-color`).withDefault(h9),g9=ts(t9.info),_9=as.create(g9.r,g9.g,g9.b),pIe=n9(`info-color`).withDefault(_9),v9=ts(t9.error),y9=as.create(v9.r,v9.g,v9.b),mIe=n9(`serious-notify-color`).withDefault(y9),{create:b9}=oi,x9=e=>oi.create({name:e,cssCustomPropertyName:null}),S9=as.create(1,1,1),hIe=as.create(0,0,0),C9=4.5;function gIe(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 _Ie(e,t,n,r,i,a,o){let s=e.source,c=e.closestIndexOf(s),l=cs(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 vIe(e,t){return e.contrast(S9)>=t?S9:hIe}function w9(e,t){let n=e,r=x9(`${n}-palette`).withDefault(e=>us.from(t.getValueFor(e))),i=x9(`${n}-fill-rest-delta`).withDefault(0),a=x9(`${n}-fill-hover-delta`).withDefault(4),o=x9(`${n}-fill-active-delta`).withDefault(-5),s=x9(`${n}-fill-focus-delta`).withDefault(0),c=x9(`${n}-foreground-rest-delta`).withDefault(0),l=x9(`${n}-foreground-hover-delta`).withDefault(6),u=x9(`${n}-foreground-active-delta`).withDefault(-4),d=x9(`${n}-foreground-focus-delta`).withDefault(0),f=x9(`${n}-fill-recipe`).withDefault({evaluate:(e,t)=>gIe(r.getValueFor(e),vc.getValueFor(e),t??Nc.getValueFor(e),a.getValueFor(e),o.getValueFor(e),s.getValueFor(e),Ys.getValueFor(e),Xs.getValueFor(e),Zs.getValueFor(e))}),p=b9(`${n}-fill-rest`).withDefault(e=>f.getValueFor(e).evaluate(e).rest),m=b9(`${n}-fill-hover`).withDefault(e=>f.getValueFor(e).evaluate(e).hover),h=b9(`${n}-fill-active`).withDefault(e=>f.getValueFor(e).evaluate(e).active),g=b9(`${n}-fill-focus`).withDefault(e=>f.getValueFor(e).evaluate(e).focus),_=e=>(t,n)=>vIe(n??p.getValueFor(t),e),v=x9(`foreground-on-${n}-recipe`).withDefault({evaluate:(e,t)=>_(C9)(e,t)}),y=b9(`foreground-on-${n}-rest`).withDefault(e=>v.getValueFor(e).evaluate(e,p.getValueFor(e))),b=b9(`foreground-on-${n}-hover`).withDefault(e=>v.getValueFor(e).evaluate(e,m.getValueFor(e))),ee=b9(`foreground-on-${n}-active`).withDefault(e=>v.getValueFor(e).evaluate(e,h.getValueFor(e))),x=b9(`foreground-on-${n}-focus`).withDefault(e=>v.getValueFor(e).evaluate(e,g.getValueFor(e))),te=x9(`foreground-on-${n}-large-recipe`).withDefault({evaluate:(e,t)=>_(7)(e,t)}),ne=b9(`foreground-on-${n}-rest-large`).withDefault(e=>te.getValueFor(e).evaluate(e,p.getValueFor(e))),S=b9(`foreground-on-${n}-hover-large`).withDefault(e=>te.getValueFor(e).evaluate(e,m.getValueFor(e))),C=b9(`foreground-on-${n}-active-large`).withDefault(e=>te.getValueFor(e).evaluate(e,h.getValueFor(e))),w=b9(`foreground-on-${n}-focus-large`).withDefault(e=>te.getValueFor(e).evaluate(e,g.getValueFor(e))),re=x9(`${n}-foreground-recipe`).withDefault({evaluate:(e,t)=>_Ie(r.getValueFor(e),t??Nc.getValueFor(e),C9,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:b9(`${n}-foreground-rest`).withDefault(e=>re.getValueFor(e).evaluate(e).rest),foregroundHover:b9(`${n}-foreground-hover`).withDefault(e=>re.getValueFor(e).evaluate(e).hover),foregroundActive:b9(`${n}-foreground-active`).withDefault(e=>re.getValueFor(e).evaluate(e).active),foregroundFocus:b9(`${n}-foreground-focus`).withDefault(e=>re.getValueFor(e).evaluate(e).focus)}}let T9=ts(t9.green),E9=as.create(T9.r,T9.g,T9.b),D9=oi.create(`secondary-color`).withDefault(E9),{palette:yIe,fillRestDelta:bIe,fillHoverDelta:xIe,fillActiveDelta:SIe,fillFocusDelta:CIe,foregroundRestDelta:wIe,foregroundHoverDelta:TIe,foregroundActiveDelta:EIe,foregroundFocusDelta:DIe,fillRecipe:OIe,fillRest:kIe,fillHover:AIe,fillActive:jIe,fillFocus:MIe,foregroundOnRecipe:NIe,foregroundOnRest:PIe,foregroundOnHover:FIe,foregroundOnActive:IIe,foregroundOnFocus:LIe,foregroundOnLargeRecipe:RIe,foregroundOnRestLarge:zIe,foregroundOnHoverLarge:BIe,foregroundOnActiveLarge:VIe,foregroundOnFocusLarge:HIe,foregroundRecipe:UIe,foregroundRest:WIe,foregroundHover:GIe,foregroundActive:KIe,foregroundFocus:qIe}=w9(`secondary`,D9),O9=ts(t9.tertiary),k9=as.create(O9.r,O9.g,O9.b),A9=oi.create(`tertiary-color`).withDefault(k9),{palette:JIe,fillRestDelta:YIe,fillHoverDelta:XIe,fillActiveDelta:ZIe,fillFocusDelta:QIe,foregroundRestDelta:$Ie,foregroundHoverDelta:eLe,foregroundActiveDelta:tLe,foregroundFocusDelta:nLe,fillRecipe:rLe,fillRest:iLe,fillHover:aLe,fillActive:oLe,fillFocus:sLe,foregroundOnRecipe:cLe,foregroundOnRest:lLe,foregroundOnHover:uLe,foregroundOnActive:dLe,foregroundOnFocus:fLe,foregroundOnLargeRecipe:pLe,foregroundOnRestLarge:mLe,foregroundOnHoverLarge:hLe,foregroundOnActiveLarge:gLe,foregroundOnFocusLarge:_Le,foregroundRecipe:vLe,foregroundRest:yLe,foregroundHover:bLe,foregroundActive:xLe,foregroundFocus:SLe}=w9(`tertiary`,A9),{palette:CLe,fillRestDelta:wLe,fillHoverDelta:TLe,fillActiveDelta:ELe,fillFocusDelta:DLe,foregroundRestDelta:OLe,foregroundHoverDelta:kLe,foregroundActiveDelta:ALe,foregroundFocusDelta:jLe,fillRecipe:MLe,fillRest:NLe,fillHover:PLe,fillActive:FLe,fillFocus:ILe,foregroundOnRecipe:LLe,foregroundOnRest:RLe,foregroundOnHover:zLe,foregroundOnActive:BLe,foregroundOnFocus:VLe,foregroundOnLargeRecipe:HLe,foregroundOnRestLarge:ULe,foregroundOnHoverLarge:WLe,foregroundOnActiveLarge:GLe,foregroundOnFocusLarge:KLe,foregroundRecipe:qLe,foregroundRest:JLe,foregroundHover:YLe,foregroundActive:XLe,foregroundFocus:ZLe}=w9(`error`,a9),{palette:QLe,fillRestDelta:$Le,fillHoverDelta:eRe,fillActiveDelta:tRe,fillFocusDelta:nRe,foregroundRestDelta:rRe,foregroundHoverDelta:iRe,foregroundActiveDelta:aRe,foregroundFocusDelta:oRe,fillRecipe:sRe,fillRest:cRe,fillHover:lRe,fillActive:uRe,fillFocus:dRe,foregroundOnRecipe:fRe,foregroundOnRest:pRe,foregroundOnHover:mRe,foregroundOnActive:hRe,foregroundOnFocus:gRe,foregroundOnLargeRecipe:_Re,foregroundOnRestLarge:vRe,foregroundOnHoverLarge:yRe,foregroundOnActiveLarge:bRe,foregroundOnFocusLarge:xRe,foregroundRecipe:SRe,foregroundRest:CRe,foregroundHover:wRe,foregroundActive:TRe,foregroundFocus:ERe}=w9(`success`,c9),{palette:DRe,fillRestDelta:ORe,fillHoverDelta:kRe,fillActiveDelta:ARe,fillFocusDelta:jRe,foregroundRestDelta:MRe,foregroundHoverDelta:NRe,foregroundActiveDelta:PRe,foregroundFocusDelta:FRe,fillRecipe:IRe,fillRest:LRe,fillHover:RRe,fillActive:zRe,fillFocus:BRe,foregroundOnRecipe:VRe,foregroundOnRest:HRe,foregroundOnHover:URe,foregroundOnActive:WRe,foregroundOnFocus:GRe,foregroundOnLargeRecipe:KRe,foregroundOnRestLarge:qRe,foregroundOnHoverLarge:JRe,foregroundOnActiveLarge:YRe,foregroundOnFocusLarge:XRe,foregroundRecipe:ZRe,foregroundRest:QRe,foregroundHover:$Re,foregroundActive:eze,foregroundFocus:tze}=w9(`warning`,d9);var nze=/* @__PURE__ */ c({accentFillActive:()=>Rc,accentFillActiveDelta:()=>Us,accentFillFocus:()=>zc,accentFillFocusDelta:()=>Ws,accentFillHover:()=>Lc,accentFillHoverDelta:()=>Hs,accentFillRest:()=>Ic,accentFillRestDelta:()=>Vs,accentForegroundActive:()=>tl,accentForegroundActiveDelta:()=>qs,accentForegroundFocus:()=>nl,accentForegroundFocusDelta:()=>Js,accentForegroundHover:()=>el,accentForegroundHoverDelta:()=>Ks,accentForegroundRest:()=>$c,accentForegroundRestDelta:()=>Gs,accentPalette:()=>bc,baseHeightMultiplier:()=>_s,baseLayerLuminance:()=>vs,bodyFont:()=>gs,buyColor:()=>dIe,controlCornerRadius:()=>z,defaultBuyColor:()=>p9,defaultErrorColor:()=>i9,defaultInfoColor:()=>_9,defaultSecondaryColor:()=>E9,defaultSellColor:()=>h9,defaultSeriousNotifyColor:()=>y9,defaultSuccessColor:()=>s9,defaultTertiaryColor:()=>k9,defaultWarningColor:()=>u9,density:()=>ys,designUnit:()=>B,direction:()=>bs,disabledOpacity:()=>xs,errorColor:()=>a9,errorFillActive:()=>FLe,errorFillActiveDelta:()=>ELe,errorFillFocus:()=>ILe,errorFillFocusDelta:()=>DLe,errorFillHover:()=>PLe,errorFillHoverDelta:()=>TLe,errorFillRecipe:()=>MLe,errorFillRest:()=>NLe,errorFillRestDelta:()=>wLe,errorForegroundActive:()=>XLe,errorForegroundActiveDelta:()=>ALe,errorForegroundFocus:()=>ZLe,errorForegroundFocusDelta:()=>jLe,errorForegroundHover:()=>YLe,errorForegroundHoverDelta:()=>kLe,errorForegroundRecipe:()=>qLe,errorForegroundRest:()=>JLe,errorForegroundRestDelta:()=>OLe,errorPalette:()=>CLe,fillColor:()=>Nc,focusStrokeInner:()=>El,focusStrokeOuter:()=>Tl,focusStrokeWidth:()=>Ss,foregroundOnAccentActive:()=>Wc,foregroundOnAccentActiveLarge:()=>Yc,foregroundOnAccentFocus:()=>Gc,foregroundOnAccentFocusLarge:()=>Xc,foregroundOnAccentHover:()=>Uc,foregroundOnAccentHoverLarge:()=>Jc,foregroundOnAccentRest:()=>Hc,foregroundOnAccentRestLarge:()=>qc,foregroundOnErrorActive:()=>BLe,foregroundOnErrorActiveLarge:()=>GLe,foregroundOnErrorFocus:()=>VLe,foregroundOnErrorFocusLarge:()=>KLe,foregroundOnErrorHover:()=>zLe,foregroundOnErrorHoverLarge:()=>WLe,foregroundOnErrorLargeRecipe:()=>HLe,foregroundOnErrorRecipe:()=>LLe,foregroundOnErrorRest:()=>RLe,foregroundOnErrorRestLarge:()=>ULe,foregroundOnSecondaryActive:()=>IIe,foregroundOnSecondaryActiveLarge:()=>VIe,foregroundOnSecondaryFocus:()=>LIe,foregroundOnSecondaryFocusLarge:()=>HIe,foregroundOnSecondaryHover:()=>FIe,foregroundOnSecondaryHoverLarge:()=>BIe,foregroundOnSecondaryLargeRecipe:()=>RIe,foregroundOnSecondaryRecipe:()=>NIe,foregroundOnSecondaryRest:()=>PIe,foregroundOnSecondaryRestLarge:()=>zIe,foregroundOnSuccessActive:()=>hRe,foregroundOnSuccessActiveLarge:()=>bRe,foregroundOnSuccessFocus:()=>gRe,foregroundOnSuccessFocusLarge:()=>xRe,foregroundOnSuccessHover:()=>mRe,foregroundOnSuccessHoverLarge:()=>yRe,foregroundOnSuccessLargeRecipe:()=>_Re,foregroundOnSuccessRecipe:()=>fRe,foregroundOnSuccessRest:()=>pRe,foregroundOnSuccessRestLarge:()=>vRe,foregroundOnTertiaryActive:()=>dLe,foregroundOnTertiaryActiveLarge:()=>gLe,foregroundOnTertiaryFocus:()=>fLe,foregroundOnTertiaryFocusLarge:()=>_Le,foregroundOnTertiaryHover:()=>uLe,foregroundOnTertiaryHoverLarge:()=>hLe,foregroundOnTertiaryLargeRecipe:()=>pLe,foregroundOnTertiaryRecipe:()=>cLe,foregroundOnTertiaryRest:()=>lLe,foregroundOnTertiaryRestLarge:()=>mLe,foregroundOnWarningActive:()=>WRe,foregroundOnWarningActiveLarge:()=>YRe,foregroundOnWarningFocus:()=>GRe,foregroundOnWarningFocusLarge:()=>XRe,foregroundOnWarningHover:()=>URe,foregroundOnWarningHoverLarge:()=>JRe,foregroundOnWarningLargeRecipe:()=>KRe,foregroundOnWarningRecipe:()=>VRe,foregroundOnWarningRest:()=>HRe,foregroundOnWarningRestLarge:()=>qRe,infoColor:()=>pIe,neutralFillActive:()=>ol,neutralFillActiveDelta:()=>Zs,neutralFillFocus:()=>sl,neutralFillFocusDelta:()=>Qs,neutralFillHover:()=>al,neutralFillHoverDelta:()=>Xs,neutralFillInputActive:()=>dl,neutralFillInputActiveDelta:()=>tc,neutralFillInputFocus:()=>fl,neutralFillInputFocusDelta:()=>nc,neutralFillInputHover:()=>ul,neutralFillInputHoverDelta:()=>ec,neutralFillInputRest:()=>ll,neutralFillInputRestDelta:()=>$s,neutralFillLayerRest:()=>wl,neutralFillLayerRestDelta:()=>dc,neutralFillRest:()=>il,neutralFillRestDelta:()=>Ys,neutralFillStealthActive:()=>gl,neutralFillStealthActiveDelta:()=>ac,neutralFillStealthFocus:()=>_l,neutralFillStealthFocusDelta:()=>oc,neutralFillStealthHover:()=>hl,neutralFillStealthHoverDelta:()=>ic,neutralFillStealthRest:()=>ml,neutralFillStealthRestDelta:()=>rc,neutralFillStrongActive:()=>xl,neutralFillStrongActiveDelta:()=>lc,neutralFillStrongFocus:()=>Sl,neutralFillStrongFocusDelta:()=>uc,neutralFillStrongHover:()=>bl,neutralFillStrongHoverDelta:()=>cc,neutralFillStrongRest:()=>yl,neutralFillStrongRestDelta:()=>sc,neutralForegroundHint:()=>Dl,neutralForegroundRest:()=>H,neutralLayer1:()=>Ec,neutralLayer2:()=>Oc,neutralLayer3:()=>Ac,neutralLayer4:()=>Mc,neutralLayerCardContainer:()=>Sc,neutralLayerFloating:()=>wc,neutralPalette:()=>vc,neutralStrokeActive:()=>jl,neutralStrokeActiveDelta:()=>mc,neutralStrokeDividerRest:()=>Nl,neutralStrokeDividerRestDelta:()=>gc,neutralStrokeFocus:()=>Ml,neutralStrokeFocusDelta:()=>hc,neutralStrokeHover:()=>Al,neutralStrokeHoverDelta:()=>pc,neutralStrokeRest:()=>kl,neutralStrokeRestDelta:()=>fc,secondaryColor:()=>D9,secondaryFillActive:()=>jIe,secondaryFillActiveDelta:()=>SIe,secondaryFillFocus:()=>MIe,secondaryFillFocusDelta:()=>CIe,secondaryFillHover:()=>AIe,secondaryFillHoverDelta:()=>xIe,secondaryFillRecipe:()=>OIe,secondaryFillRest:()=>kIe,secondaryFillRestDelta:()=>bIe,secondaryForegroundActive:()=>KIe,secondaryForegroundActiveDelta:()=>EIe,secondaryForegroundFocus:()=>qIe,secondaryForegroundFocusDelta:()=>DIe,secondaryForegroundHover:()=>GIe,secondaryForegroundHoverDelta:()=>TIe,secondaryForegroundRecipe:()=>UIe,secondaryForegroundRest:()=>WIe,secondaryForegroundRestDelta:()=>wIe,secondaryPalette:()=>yIe,sellColor:()=>fIe,seriousNotifyColor:()=>mIe,strokeWidth:()=>V,successColor:()=>c9,successFillActive:()=>uRe,successFillActiveDelta:()=>tRe,successFillFocus:()=>dRe,successFillFocusDelta:()=>nRe,successFillHover:()=>lRe,successFillHoverDelta:()=>eRe,successFillRecipe:()=>sRe,successFillRest:()=>cRe,successFillRestDelta:()=>$Le,successForegroundActive:()=>TRe,successForegroundActiveDelta:()=>aRe,successForegroundFocus:()=>ERe,successForegroundFocusDelta:()=>oRe,successForegroundHover:()=>wRe,successForegroundHoverDelta:()=>iRe,successForegroundRecipe:()=>SRe,successForegroundRest:()=>CRe,successForegroundRestDelta:()=>rRe,successPalette:()=>QLe,tertiaryColor:()=>A9,tertiaryFillActive:()=>oLe,tertiaryFillActiveDelta:()=>ZIe,tertiaryFillFocus:()=>sLe,tertiaryFillFocusDelta:()=>QIe,tertiaryFillHover:()=>aLe,tertiaryFillHoverDelta:()=>XIe,tertiaryFillRecipe:()=>rLe,tertiaryFillRest:()=>iLe,tertiaryFillRestDelta:()=>YIe,tertiaryForegroundActive:()=>xLe,tertiaryForegroundActiveDelta:()=>tLe,tertiaryForegroundFocus:()=>SLe,tertiaryForegroundFocusDelta:()=>nLe,tertiaryForegroundHover:()=>bLe,tertiaryForegroundHoverDelta:()=>eLe,tertiaryForegroundRecipe:()=>vLe,tertiaryForegroundRest:()=>yLe,tertiaryForegroundRestDelta:()=>$Ie,tertiaryPalette:()=>JIe,typeRampBaseFontSize:()=>Cs,typeRampBaseLineHeight:()=>ws,typeRampMinus1FontSize:()=>Ts,typeRampMinus1LineHeight:()=>Es,typeRampMinus2FontSize:()=>Ds,typeRampMinus2LineHeight:()=>Os,typeRampPlus1FontSize:()=>ks,typeRampPlus1LineHeight:()=>As,typeRampPlus2FontSize:()=>js,typeRampPlus2LineHeight:()=>Ms,typeRampPlus3FontSize:()=>Ns,typeRampPlus3LineHeight:()=>Ps,typeRampPlus4FontSize:()=>Fs,typeRampPlus4LineHeight:()=>Is,typeRampPlus5FontSize:()=>Ls,typeRampPlus5LineHeight:()=>Rs,typeRampPlus6FontSize:()=>zs,typeRampPlus6LineHeight:()=>Bs,warningColor:()=>d9,warningFillActive:()=>zRe,warningFillActiveDelta:()=>ARe,warningFillFocus:()=>BRe,warningFillFocusDelta:()=>jRe,warningFillHover:()=>RRe,warningFillHoverDelta:()=>kRe,warningFillRecipe:()=>IRe,warningFillRest:()=>LRe,warningFillRestDelta:()=>ORe,warningForegroundActive:()=>eze,warningForegroundActiveDelta:()=>PRe,warningForegroundFocus:()=>tze,warningForegroundFocusDelta:()=>FRe,warningForegroundHover:()=>$Re,warningForegroundHoverDelta:()=>NRe,warningForegroundRecipe:()=>ZRe,warningForegroundRest:()=>QRe,warningForegroundRestDelta:()=>MRe,warningPalette:()=>DRe});let j9=Vw(t9.primary),M9=Vw(t9.neutral),N9=Vw(t9.green),P9=Vw(t9.tertiary),F9=Vw(t9.error),I9=Vw(t9.success),L9=Vw(t9.warning),R9=ms.DarkMode,rze=Nn.ltr,z9=`"Segoe UI", Arial, Helvetica, sans-serif`,B9=`14px`,V9=`20px`,ize={design_tokens:{color:{accent:{$value:j9.source.toColorString(),$type:`color`},neutral:{$value:M9.source.toColorString(),$type:`color`},secondary:{$value:N9.source.toColorString(),$type:`color`},tertiary:{$value:P9.source.toColorString(),$type:`color`},error:{$value:F9.source.toColorString(),$type:`color`},success:{$value:I9.source.toColorString(),$type:`color`},warning:{$value:L9.source.toColorString(),$type:`color`}},fontFamily:{bodyFont:{$value:z9,$type:`fontFamily`}},typography:{baseFontSize:{$value:B9,$type:`dimension`},baseLineHeight:{$value:V9,$type:`dimension`}},mode:{luminance:{$value:R9,$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 aze=/* @__PURE__ */ c({accentFillActiveDeltaValue:()=>-5,accentFillFocusDeltaValue:()=>0,accentFillHoverDeltaValue:()=>4,accentFillRestDeltaValue:()=>0,accentForegroundActiveDeltaValue:()=>-4,accentForegroundFocusDeltaValue:()=>0,accentForegroundHoverDeltaValue:()=>6,accentForegroundRestDeltaValue:()=>0,accentPaletteValue:()=>j9,baseHeightMultiplierValue:()=>10,baseLayerLuminanceValue:()=>R9,bodyFontValue:()=>z9,controlCornerRadiusValue:()=>4,densityValue:()=>0,designTokens:()=>ize,designUnitValue:()=>4,directionValue:()=>rze,disabledOpacityValue:()=>.3,errorPaletteValue:()=>F9,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:()=>M9,neutralStrokeActiveDeltaValue:()=>16,neutralStrokeDividerRestDeltaValue:()=>8,neutralStrokeFocusDeltaValue:()=>25,neutralStrokeHoverDeltaValue:()=>40,neutralStrokeRestDeltaValue:()=>25,prefix:()=>`rapid`,secondaryPaletteValue:()=>N9,strokeWidthValue:()=>1,successPaletteValue:()=>I9,tertiaryPaletteValue:()=>P9,typeRampBaseFontSizeValue:()=>B9,typeRampBaseLineHeightValue:()=>V9,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:()=>L9});(class extends K{constructor(){super(),Rw(nze,aze,this)}}).compose({baseName:`design-system-provider`,template:T`<slot></slot>`});let H9=O` ${e0} :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)}}`,oze=g0,sze=n0,cze=h0;(class extends v0{}).compose(Object.assign({baseName:`dialog`,shadowOptions:cze,styles:H9,template:sze},oze)),class extends x0{}.compose(Object.assign({baseName:`disclosure`,template:(e,t)=>y0(e,t),styles:(e,t)=>O` ${b0(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:h0},S0)),class extends T0{}.compose(Object.assign({baseName:`divider`,template:(e,t)=>C0(e,t),styles:(e,t)=>O` ${w0(e,t)}`,shadowOptions:void 0},E0)),class extends A0{}.compose({baseName:`dropdown-menu`,styles:(e,t)=>O` ${D0(`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:k0});let lze=O` ${j0}`;(class extends L0{}).compose({baseName:`environment-indicator`,styles:lze,template:M0});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 s7{constructor(){super(...arguments),this.styles={customElements:W9,customStyles:q9}}};q([C],J9.prototype,`styles`,void 0),J9=q([$e({name:`rapid-expression-builder`,styles:S7.styles,template:S7.template})],J9);let Y9=class extends O7{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:S7.styles,template:S7.template})],Y9);let X9=class extends M7{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:S7.styles,template:S7.template})],X9);let uze=O` ${$0} ::-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)}`,dze=T` ${e2(`rapid`)} `,fze=n2;(class extends t2{}).compose(Object.assign({baseName:`file-upload`,shadowOptions:void 0,styles:uze,template:dze},fze));let pze=(e,t)=>O` ${l2(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)}`,mze=T` ${u2(`rapid`)} `;(class extends d2{}).compose({baseName:`filter-bar`,template:mze,styles:pze});let hze=(e,t)=>O` ${r2} .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}`,gze=T` ${o2(`rapid`)} `;(class extends c2{}).compose({baseName:`filter`,template:gze,styles:hze}),class extends g2{}.compose(Object.assign({baseName:`flipper`,template:(e,t)=>m2(e,t),styles:(e,t)=>O` ${h2(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},_2));let _ze=O` ${v2} 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)}`,vze=T` ${y2(`rapid`)} `,yze=x2;(class extends b2{}).compose(Object.assign({baseName:`flyout`,shadowOptions:void 0,styles:_ze,template:vze},yze));let bze=(e,t)=>O` ${D2(e,t)}`,xze=(e,t)=>E2(e,t);var Sze=class extends O2{};let Cze={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>`};Sze.compose(Object.assign({baseName:`horizontal-scroll`,template:xze,styles:bze,shadowOptions:k2},Cze));let wze=(e,t)=>O` ${A2(e,t)}`,Tze=T` ${j2(`rapid`)} `;var Eze=class extends F2{};let Dze=N2,Oze=M2;Eze.compose(Object.assign({baseName:`icon`,template:Tze,styles:wze,shadowOptions:Oze},Dze)),class extends H2{}.compose(Object.assign({baseName:`option`,template:(e,t)=>B2(e,t),styles:(e,t)=>O` ${V2(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},U2)),class extends R2{}.compose(Object.assign({baseName:`listbox`,template:(e,t)=>I2(e,t),styles:(e,t)=>O` ${L2(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},z2)),class extends X2{}.compose(Object.assign({baseName:`menu-item`,template:(e,t)=>J2(e,t),styles:(e,t)=>O` ${Y2(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, ${hl}, transparent 15%);border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${hl}, 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: ${hl} color: ${H} */`,shadowOptions:void 0},Z2)),class extends K2{}.compose(Object.assign({baseName:`menu`,template:(e,t)=>W2(e,t),styles:(e,t)=>O` ${G2(e,t)} :host{border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${hl}, transparent 15%);padding: 0}`,shadowOptions:void 0},q2));let kze=O` ${H9}`,Aze=e4,jze=Q2,Mze=$2;(class extends t4{}).compose(Object.assign({baseName:`modal`,shadowOptions:Mze,styles:kze,template:jze},Aze));let Nze=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}`,Pze=T` ${tw(`rapid`)} `;var Fze=class extends rw{};let Ize=nw;Fze.compose(Object.assign({baseName:`multiselect`,template:Pze,styles:Nze,shadowOptions:void 0},Ize)),class extends P7{}.compose({baseName:`notification-listener`,template:N7,shadowOptions:{mode:`open`,delegatesFocus:!0}});let Lze=(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%}${Z0}`;var Rze=class extends v4{};let zze=b4,Bze=n4,Vze=y4;Rze.compose(Object.assign({baseName:`number-field`,template:Bze,styles:Lze,shadowOptions:Vze},zze)),class extends C4{}.compose({baseName:`optgroup`,template:(e,t)=>S4(e,t),styles:(e,t)=>O` ${x4(e,t)}`}),class extends k4{}.compose(Object.assign({baseName:`system-health-overlay`,template:A4,styles:j4,shadowOptions:void 0},M4));let Hze=O` ${N4} :host{--pill-fill: ${il};--pill-fill-hover: ${al};--pill-foreground: ${H}}`,Uze=P4;(class extends I4{}).compose(Object.assign({baseName:`pill`,template:Uze,styles:Hze,shadowOptions:void 0},F4)),class extends I3{}.compose(Object.assign({baseName:`progress-ring`,template:(e,t)=>P3(e,t),styles:(e,t)=>O` ${F3(e,t)}`,shadowOptions:void 0},L3)),class extends E4{}.compose(Object.assign({baseName:`progress`,template:(e,t)=>w4(e,t),styles:(e,t)=>O` ${T4(e,t)}`,shadowOptions:void 0},D4)),class extends W3{}.compose(Object.assign({baseName:`radio-group`,template:(e,t)=>H3(e,t),styles:(e,t)=>O` ${U3(e,t)}`,shadowOptions:void 0},G3)),class extends B3{}.compose(Object.assign({baseName:`radio`,template:(e,t)=>R3(e,t),styles:(e,t)=>O` ${z3(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},V3));let Z9=class extends m_.from(Qe){connectedCallback(){super.connectedCallback(),x.queueUpdate(()=>J(this,void 0,void 0,function*(){this.$router.config=this.config}))}};Z9=q([$e({name:`rapid-router`})],Z9);let Wze=O` ${i6} :host{font-family: var(--body-font)}`,Gze=T` ${h6(`rapid`)} `;(class extends g6{}).compose(Object.assign({baseName:`scheduler-cron-builder`,template:Gze,styles:Wze,shadowOptions:void 0},_6));let Kze=O` ${v6} :host{font-family: var(--body-font)}`,qze=T` ${y6(`rapid`)} `;(class extends b6{}).compose(Object.assign({baseName:`scheduler-timezone`,template:qze,styles:Kze,shadowOptions:void 0},x6));let Jze=O` ${K3} :host{font-family: var(--body-font)}`,Yze=T` ${q3(`rapid`)} `;(class extends J3{}).compose(Object.assign({baseName:`scheduler`,template:Yze,styles:Jze,shadowOptions:void 0},Y3)),class extends O6{}.compose(Object.assign({baseName:`search-bar-combobox`,template:(e,t)=>D6(e,t),styles:(e,t)=>O` ${E6(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:k6},A6));let Xze=O` ${S6}`,Zze=T` ${C6(`rapid`)} `;(class extends w6{}).compose(Object.assign({baseName:`search-bar`,template:Zze,styles:Xze,shadowOptions:void 0},T6)),class extends L6{}.compose(Object.assign({baseName:`section-navigator`,template:M6,styles:(e,t)=>j6,shadowOptions:R6},z6)),class extends H6{}.compose(Object.assign({baseName:`segmented-control`,template:(e,t)=>B6(e,t),styles:(e,t)=>O` ${V6(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},{})),class extends B3{}.compose(Object.assign({baseName:`segmented-item`,template:(e,t)=>U6(e,t),styles:(e,t)=>O` ${W6(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},{})),class extends q6{}.compose(Object.assign({baseName:`select`,template:(e,t)=>G6(e,t),styles:(e,t)=>O` ${K6(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},J6)),class extends Z6{}.compose(Object.assign({baseName:`skeleton`,template:(e,t)=>Y6(e,t),styles:(e,t)=>O` ${X6(e,t)} :host{--skeleton-fill: var( --neutral-fill-stealth-rest );/** value in ux doc rgba(242 242 242 / 0.1) */}`,shadowOptions:void 0},Q6)),class extends a8{}.compose(Object.assign({baseName:`slider-label`,template:(e,t)=>r8(e,t),styles:(e,t)=>O` ${i8(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},o8)),class extends t8{}.compose(Object.assign({baseName:`slider`,template:(e,t)=>$6(e,t),styles:(e,t)=>O` ${e8(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, ${Ic}, transparent 90%)}.thumb-cursor:focus::after{background-color: color-mix(in srgb, ${Ic}, transparent 80%)}.thumb-cursor:active::after{background-color: color-mix(in srgb, ${Ic}, 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},n8));let Qze=O` ${u8} .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)}`,$ze=T` ${d8(`rapid`)} `,eBe=f8;(class extends p8{}).compose({baseName:`snackbar`,shadowOptions:eBe,styles:Qze,template:$ze}),class extends g8{}.compose({baseName:`stacking-icons`,template:h8,styles:(e,t)=>O` ${m8(e,t)}`}),class extends S8{}.compose({baseName:`status-pill`,template:v8,styles:_8}),class extends k8{}.compose(Object.assign({baseName:`stepper-tab-panel`,template:(e,t)=>O8(e,t),shadowOptions:void 0},A8));let tBe=(e,t)=>O` ${T8(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)}`,nBe=T` ${w8(`rapid`)} `;(class extends E8{}).compose(Object.assign({baseName:`stepper-tab`,template:nBe,styles:tBe,shadowOptions:void 0},D8));let rBe=O` ${X7} :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)}`,iBe=T` ${Y7(`rapid`)} `;(class extends Z7{}).compose(Object.assign({baseName:`stepper`,template:iBe,styles:rBe,shadowOptions:void 0},Q7)),class extends N8{}.compose(Object.assign({baseName:`switch`,template:(e,t)=>j8(e,t),styles:(e,t)=>O` ${M8(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>`})),class extends B8{}.compose(Object.assign({baseName:`tab-panel`,template:(e,t)=>R8(e,t),styles:(e,t)=>O` ${z8(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},V8)),class extends I8{}.compose(Object.assign({baseName:`tab`,template:(e,t)=>P8(e,t),styles:(e,t)=>O` ${F8(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(${q0}, 0) * 100%), transparent ) !important;color: color-mix( in srgb, contrast-color(var(--tab-alert-color, var(--error-fill-rest))) calc(var(${q0}, 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},L8)),class extends W8{}.compose(Object.assign({baseName:`tabs`,template:(e,t)=>H8(e,t),styles:(e,t)=>O` ${U8(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},G8)),class extends J8{}.compose(Object.assign({baseName:`text-area`,template:(e,t)=>K8(e,t),styles:(e,t)=>O` ${q8(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},Y8)),class extends Q8{}.compose(Object.assign({baseName:`text-field`,template:(e,t)=>X8(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:$8},e5));let aBe=O` ${t5} .toast{background-color: ${Ec};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)}`,oBe=i5,sBe=r5;(class extends a5{}).compose(Object.assign({baseName:`toast`,shadowOptions:sBe,styles:aBe,template:n5},oBe)),class extends c5{}.compose(Object.assign({baseName:`toolbar`,template:(e,t)=>o5(e,t),styles:(e,t)=>O` ${s5(e,t)} :host{align-items: center;color: var(--neutral-foreground-rest)}.positioning-region{align-items: center}`,shadowOptions:void 0},l5)),class extends f5{}.compose(Object.assign({baseName:`tooltip`,template:(e,t)=>u5(e,t),styles:(e,t)=>O` ${d5(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},p5)),class extends g5{}.compose(Object.assign({baseName:`tree-item`,template:(e,t)=>m5(e,t),styles:(e,t)=>O` ${h5(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
- </svg>`})),class extends y5{}.compose(Object.assign({baseName:`tree-view`,template:(e,t)=>_5(e,t),styles:(e,t)=>O` ${v5(e,t)}`,shadowOptions:void 0},b5));let sBe=(e,t)=>O` ${x5(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)}`,cBe=T` ${S5(`rapid`)} `;(class extends w5{}).compose(Object.assign({baseName:`url-input`,template:cBe,styles:sBe,shadowOptions:void 0},C5));let lBe=O` ${T5} .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}`,uBe=E5;var dBe=class extends A5{};let fBe=O5,pBe=D5;dBe.compose(Object.assign({baseName:`verification-code-input`,template:uBe,styles:lBe,shadowOptions:pBe},fBe));var mBe=/* @__PURE__ */ c({Accordion:()=>hBe,AccordionItem:()=>gBe,ActionsMenu:()=>_Be,AiCriteriaSearch:()=>vBe,AiIndicator:()=>yBe,Anchor:()=>bBe,AnchoredRegion:()=>xBe,Avatar:()=>SBe,Badge:()=>CBe,Banner:()=>wBe,Breadcrumb:()=>TBe,BreadcrumbItem:()=>EBe,Button:()=>DBe,Calendar:()=>OBe,Card:()=>kBe,CategorizedMultiselect:()=>ABe,Checkbox:()=>jBe,Combobox:()=>MBe,ConnectionIndicator:()=>NBe,DatePicker:()=>PBe,DesignSystemProvider:()=>IBe,Dialog:()=>FBe,Disclosure:()=>LBe,Divider:()=>RBe,DropdownMenu:()=>zBe,EnvironmentIndicator:()=>BBe,FileUpload:()=>WBe,Filter:()=>GBe,FilterBar:()=>KBe,Flipper:()=>qBe,Flyout:()=>JBe,HorizontalScroll:()=>YBe,Icon:()=>XBe,Listbox:()=>ZBe,ListboxOption:()=>$9,Menu:()=>QBe,MenuItem:()=>$Be,Modal:()=>eVe,Multiselect:()=>tVe,NotificationListener:()=>nVe,NumberField:()=>rVe,Optgroup:()=>iVe,Pill:()=>aVe,Progress:()=>oVe,ProgressRing:()=>sVe,Radio:()=>cVe,RadioGroup:()=>lVe,RapidExpressionBuilder:()=>VBe,RapidRouter:()=>uVe,RapidRuleExpressionBuilder:()=>HBe,RapidValueExpressionBuilder:()=>UBe,Scheduler:()=>dVe,SchedulerCronBuilder:()=>fVe,SchedulerTimezone:()=>pVe,SearchBar:()=>hVe,SearchBarCombobox:()=>mVe,SectionNavigator:()=>gVe,SegmentedControl:()=>_Ve,SegmentedItem:()=>vVe,Select:()=>yVe,Skeleton:()=>bVe,Slider:()=>xVe,SliderLabel:()=>SVe,Snackbar:()=>CVe,StackingIcons:()=>wVe,StatusPill:()=>TVe,Stepper:()=>EVe,StepperTab:()=>DVe,StepperTabPanel:()=>OVe,Switch:()=>kVe,SystemHealthOverlay:()=>HVe,Tab:()=>AVe,TabPanel:()=>jVe,Tabs:()=>MVe,TextArea:()=>NVe,TextField:()=>PVe,Toast:()=>FVe,Toolbar:()=>IVe,Tooltip:()=>LVe,TreeItem:()=>RVe,TreeView:()=>zVe,UrlInput:()=>BVe,VerificationCodeInput:()=>VVe});function Q9(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n!=null&&(n.current=t)}}let hBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-accordion`,{...i,ref:n},r)}),gBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-accordion-item`,{...i,ref:n},r)}),_Be=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-actions-menu`,{...i,ref:n},r)}),vBe=e.default.forwardRef(function(t,n){let{onCriteriaChanged:r,onValidationErrors:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`criteria-changed`,t);let n=e=>l.current?.(e);return e.addEventListener(`validation-errors`,n),()=>{e.removeEventListener(`criteria-changed`,t),e.removeEventListener(`validation-errors`,n)}},[]),e.default.createElement(`rapid-ai-criteria-search`,{...o,ref:Q9(s,n)},a)}),yBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-ai-indicator`,{...i,ref:n},r)}),bBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-anchor`,{...i,ref:n},r)}),xBe=e.default.forwardRef(function(t,n){let{onLoaded:r,onPositionchange:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`loaded`,t);let n=e=>l.current?.(e);return e.addEventListener(`positionchange`,n),()=>{e.removeEventListener(`loaded`,t),e.removeEventListener(`positionchange`,n)}},[]),e.default.createElement(`rapid-anchored-region`,{...o,ref:Q9(s,n)},a)}),SBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-avatar`,{...i,ref:n},r)}),CBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-badge`,{...i,ref:n},r)}),wBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-banner`,{...i,ref:n},r)}),TBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-breadcrumb`,{...i,ref:n},r)}),EBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-breadcrumb-item`,{...i,ref:n},r)}),DBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-button`,{...i,ref:n},r)}),OBe=e.default.forwardRef(function(t,n){let{onDateselected:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`dateselected`,t),()=>{e.removeEventListener(`dateselected`,t)}},[]),e.default.createElement(`rapid-calendar`,{...a,ref:Q9(o,n)},i)}),kBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-card`,{...i,ref:n},r)}),ABe=e.default.forwardRef(function(t,n){let{onSelectionChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`selectionChange`,t),()=>{e.removeEventListener(`selectionChange`,t)}},[]),e.default.createElement(`rapid-categorized-multiselect`,{...a,ref:Q9(o,n)},i)}),jBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-checkbox`,{...i,ref:n},r)}),MBe=e.default.forwardRef(function(t,n){let{onOpenChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`open-change`,t),()=>{e.removeEventListener(`open-change`,t)}},[]),e.default.createElement(`rapid-combobox`,{...a,ref:Q9(o,n)},i)}),NBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-connection-indicator`,{...i,ref:n},r)}),PBe=e.default.forwardRef(function(t,n){let{onValueChanged:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`value-changed`,t),()=>{e.removeEventListener(`value-changed`,t)}},[]),e.default.createElement(`rapid-date-picker`,{...a,ref:Q9(o,n)},i)}),FBe=e.default.forwardRef(function(t,n){let{onClose:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`close`,t),()=>{e.removeEventListener(`close`,t)}},[]),e.default.createElement(`rapid-dialog`,{...a,ref:Q9(o,n)},i)}),IBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-design-system-provider`,{...i,ref:n},r)}),LBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-disclosure`,{...i,ref:n},r)}),RBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-divider`,{...i,ref:n},r)}),zBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-dropdown-menu`,{...i,ref:n},r)}),BBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-environment-indicator`,{...i,ref:n},r)}),VBe=e.default.forwardRef(function(t,n){let{onAddGroup:r,onDelGroup:i,onAddRule:a,onDelRule:o,onUpdateGroup:s,onUpdateRule:c,children:l,...u}=t,d=e.default.useRef(null),f=e.default.useRef(r);f.current=r;let p=e.default.useRef(i);p.current=i;let m=e.default.useRef(a);m.current=a;let h=e.default.useRef(o);h.current=o;let g=e.default.useRef(s);g.current=s;let _=e.default.useRef(c);return _.current=c,e.default.useLayoutEffect(()=>{let e=d.current;if(!e)return;let t=e=>f.current?.(e);e.addEventListener(`add-group`,t);let n=e=>p.current?.(e);e.addEventListener(`del-group`,n);let r=e=>m.current?.(e);e.addEventListener(`add-rule`,r);let i=e=>h.current?.(e);e.addEventListener(`del-rule`,i);let a=e=>g.current?.(e);e.addEventListener(`update-group`,a);let o=e=>_.current?.(e);return e.addEventListener(`update-rule`,o),()=>{e.removeEventListener(`add-group`,t),e.removeEventListener(`del-group`,n),e.removeEventListener(`add-rule`,r),e.removeEventListener(`del-rule`,i),e.removeEventListener(`update-group`,a),e.removeEventListener(`update-rule`,o)}},[]),e.default.createElement(customElements.getName(J9)??`rapid-expression-builder`,{...u,ref:Q9(d,n)},l)}),HBe=e.default.forwardRef(function(t,n){let{onAddGroup:r,onDelGroup:i,onAddRule:a,onDelRule:o,onUpdateGroup:s,onUpdateRule:c,children:l,...u}=t,d=e.default.useRef(null),f=e.default.useRef(r);f.current=r;let p=e.default.useRef(i);p.current=i;let m=e.default.useRef(a);m.current=a;let h=e.default.useRef(o);h.current=o;let g=e.default.useRef(s);g.current=s;let _=e.default.useRef(c);return _.current=c,e.default.useLayoutEffect(()=>{let e=d.current;if(!e)return;let t=e=>f.current?.(e);e.addEventListener(`add-group`,t);let n=e=>p.current?.(e);e.addEventListener(`del-group`,n);let r=e=>m.current?.(e);e.addEventListener(`add-rule`,r);let i=e=>h.current?.(e);e.addEventListener(`del-rule`,i);let a=e=>g.current?.(e);e.addEventListener(`update-group`,a);let o=e=>_.current?.(e);return e.addEventListener(`update-rule`,o),()=>{e.removeEventListener(`add-group`,t),e.removeEventListener(`del-group`,n),e.removeEventListener(`add-rule`,r),e.removeEventListener(`del-rule`,i),e.removeEventListener(`update-group`,a),e.removeEventListener(`update-rule`,o)}},[]),e.default.createElement(customElements.getName(Y9)??`rapid-rule-expression-builder`,{...u,ref:Q9(d,n)},l)}),UBe=e.default.forwardRef(function(t,n){let{onAddGroup:r,onDelGroup:i,onAddRule:a,onDelRule:o,onUpdateGroup:s,onUpdateRule:c,children:l,...u}=t,d=e.default.useRef(null),f=e.default.useRef(r);f.current=r;let p=e.default.useRef(i);p.current=i;let m=e.default.useRef(a);m.current=a;let h=e.default.useRef(o);h.current=o;let g=e.default.useRef(s);g.current=s;let _=e.default.useRef(c);return _.current=c,e.default.useLayoutEffect(()=>{let e=d.current;if(!e)return;let t=e=>f.current?.(e);e.addEventListener(`add-group`,t);let n=e=>p.current?.(e);e.addEventListener(`del-group`,n);let r=e=>m.current?.(e);e.addEventListener(`add-rule`,r);let i=e=>h.current?.(e);e.addEventListener(`del-rule`,i);let a=e=>g.current?.(e);e.addEventListener(`update-group`,a);let o=e=>_.current?.(e);return e.addEventListener(`update-rule`,o),()=>{e.removeEventListener(`add-group`,t),e.removeEventListener(`del-group`,n),e.removeEventListener(`add-rule`,r),e.removeEventListener(`del-rule`,i),e.removeEventListener(`update-group`,a),e.removeEventListener(`update-rule`,o)}},[]),e.default.createElement(customElements.getName(X9)??`rapid-value-expression-builder`,{...u,ref:Q9(d,n)},l)}),WBe=e.default.forwardRef(function(t,n){let{onFileSelected:r,onSuccess:i,onErrorOut:a,onClear:o,children:s,...c}=t,l=e.default.useRef(null),u=e.default.useRef(r);u.current=r;let d=e.default.useRef(i);d.current=i;let f=e.default.useRef(a);f.current=a;let p=e.default.useRef(o);return p.current=o,e.default.useLayoutEffect(()=>{let e=l.current;if(!e)return;let t=e=>u.current?.(e);e.addEventListener(`file-selected`,t);let n=e=>d.current?.(e);e.addEventListener(`success`,n);let r=e=>f.current?.(e);e.addEventListener(`errorOut`,r);let i=e=>p.current?.(e);return e.addEventListener(`clear`,i),()=>{e.removeEventListener(`file-selected`,t),e.removeEventListener(`success`,n),e.removeEventListener(`errorOut`,r),e.removeEventListener(`clear`,i)}},[]),e.default.createElement(`rapid-file-upload`,{...c,ref:Q9(l,n)},s)}),GBe=e.default.forwardRef(function(t,n){let{onFilterChanged:r,onFilterCleared:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`filter-changed`,t);let n=e=>l.current?.(e);return e.addEventListener(`filter-cleared`,n),()=>{e.removeEventListener(`filter-changed`,t),e.removeEventListener(`filter-cleared`,n)}},[]),e.default.createElement(`rapid-filter`,{...o,ref:Q9(s,n)},a)}),KBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-filter-bar`,{...i,ref:n},r)}),qBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-flipper`,{...i,ref:n},r)}),JBe=e.default.forwardRef(function(t,n){let{onClosed:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`closed`,t),()=>{e.removeEventListener(`closed`,t)}},[]),e.default.createElement(`rapid-flyout`,{...a,ref:Q9(o,n)},i)}),YBe=e.default.forwardRef(function(t,n){let{onScrollstart:r,onScrollend:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`scrollstart`,t);let n=e=>l.current?.(e);return e.addEventListener(`scrollend`,n),()=>{e.removeEventListener(`scrollstart`,t),e.removeEventListener(`scrollend`,n)}},[]),e.default.createElement(`rapid-horizontal-scroll`,{...o,ref:Q9(s,n)},a)}),XBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-icon`,{...i,ref:n},r)}),ZBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-listbox`,{...i,ref:n},r)}),$9=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-option`,{...i,ref:n},r)}),QBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-menu`,{...i,ref:n},r)}),$Be=e.default.forwardRef(function(t,n){let{onOnMenuClick:r,onExpandedChange:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`onMenuClick`,t);let n=e=>l.current?.(e);return e.addEventListener(`expanded-change`,n),()=>{e.removeEventListener(`onMenuClick`,t),e.removeEventListener(`expanded-change`,n)}},[]),e.default.createElement(`rapid-menu-item`,{...o,ref:Q9(s,n)},a)}),eVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-modal`,{...i,ref:n},r)}),tVe=e.default.forwardRef(function(t,n){let{onSelectionChange:r,onClear:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`selectionChange`,t);let n=e=>l.current?.(e);return e.addEventListener(`clear`,n),()=>{e.removeEventListener(`selectionChange`,t),e.removeEventListener(`clear`,n)}},[]),e.default.createElement(`rapid-multiselect`,{...o,ref:Q9(s,n)},a)}),nVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-notification-listener`,{...i,ref:n},r)}),rVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-number-field`,{...i,ref:n},r)}),iVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-optgroup`,{...i,ref:n},r)}),aVe=e.default.forwardRef(function(t,n){let{onRemove:r,onPillClick:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`remove`,t);let n=e=>l.current?.(e);return e.addEventListener(`pill-click`,n),()=>{e.removeEventListener(`remove`,t),e.removeEventListener(`pill-click`,n)}},[]),e.default.createElement(`rapid-pill`,{...o,ref:Q9(s,n)},a)}),oVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-progress`,{...i,ref:n},r)}),sVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-progress-ring`,{...i,ref:n},r)}),cVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-radio`,{...i,ref:n},r)}),lVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-radio-group`,{...i,ref:n},r)}),uVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(customElements.getName(Z9)??`rapid-router`,{...i,ref:n},r)}),dVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-scheduler`,{...i,ref:n},r)}),fVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-scheduler-cron-builder`,{...i,ref:n},r)}),pVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-scheduler-timezone`,{...i,ref:n},r)}),mVe=e.default.forwardRef(function(t,n){let{onOpenChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`open-change`,t),()=>{e.removeEventListener(`open-change`,t)}},[]),e.default.createElement(`rapid-search-bar-combobox`,{...a,ref:Q9(o,n)},i)}),hVe=e.default.forwardRef(function(t,n){let{onSelectionChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`selectionChange`,t),()=>{e.removeEventListener(`selectionChange`,t)}},[]),e.default.createElement(`rapid-search-bar`,{...a,ref:Q9(o,n)},i)}),gVe=e.default.forwardRef(function(t,n){let{onSectionNavigatorSetState:r,onSectionNavigatorSetStates:i,onSectionNavigatorClearState:a,onSectionNavigatorClearAllStates:o,children:s,...c}=t,l=e.default.useRef(null),u=e.default.useRef(r);u.current=r;let d=e.default.useRef(i);d.current=i;let f=e.default.useRef(a);f.current=a;let p=e.default.useRef(o);return p.current=o,e.default.useLayoutEffect(()=>{let e=l.current;if(!e)return;let t=e=>u.current?.(e);e.addEventListener(`section-navigator-set-state`,t);let n=e=>d.current?.(e);e.addEventListener(`section-navigator-set-states`,n);let r=e=>f.current?.(e);e.addEventListener(`section-navigator-clear-state`,r);let i=e=>p.current?.(e);return e.addEventListener(`section-navigator-clear-all-states`,i),()=>{e.removeEventListener(`section-navigator-set-state`,t),e.removeEventListener(`section-navigator-set-states`,n),e.removeEventListener(`section-navigator-clear-state`,r),e.removeEventListener(`section-navigator-clear-all-states`,i)}},[]),e.default.createElement(`rapid-section-navigator`,{...c,ref:Q9(l,n)},s)}),_Ve=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-segmented-control`,{...i,ref:n},r)}),vVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-segmented-item`,{...i,ref:n},r)}),yVe=e.default.forwardRef(function(t,n){let{onOpenChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`open-change`,t),()=>{e.removeEventListener(`open-change`,t)}},[]),e.default.createElement(`rapid-select`,{...a,ref:Q9(o,n)},i)}),bVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-skeleton`,{...i,ref:n},r)}),xVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-slider`,{...i,ref:n},r)}),SVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-slider-label`,{...i,ref:n},r)}),CVe=e.default.forwardRef(function(t,n){let{onAutoDismiss:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`autoDismiss`,t),()=>{e.removeEventListener(`autoDismiss`,t)}},[]),e.default.createElement(`rapid-snackbar`,{...a,ref:Q9(o,n)},i)}),wVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-stacking-icons`,{...i,ref:n},r)}),TVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-status-pill`,{...i,ref:n},r)}),EVe=e.default.forwardRef(function(t,n){let{onStepClick:r,onValidationFailure:i,onNextStep:a,onValidationSuccess:o,children:s,...c}=t,l=e.default.useRef(null),u=e.default.useRef(r);u.current=r;let d=e.default.useRef(i);d.current=i;let f=e.default.useRef(a);f.current=a;let p=e.default.useRef(o);return p.current=o,e.default.useLayoutEffect(()=>{let e=l.current;if(!e)return;let t=e=>u.current?.(e);e.addEventListener(`step-click`,t);let n=e=>d.current?.(e);e.addEventListener(`validation-failure`,n);let r=e=>f.current?.(e);e.addEventListener(`next-step`,r);let i=e=>p.current?.(e);return e.addEventListener(`validation-success`,i),()=>{e.removeEventListener(`step-click`,t),e.removeEventListener(`validation-failure`,n),e.removeEventListener(`next-step`,r),e.removeEventListener(`validation-success`,i)}},[]),e.default.createElement(`rapid-stepper`,{...c,ref:Q9(l,n)},s)}),DVe=e.default.forwardRef(function(t,n){let{onTabClicked:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`tab-clicked`,t),()=>{e.removeEventListener(`tab-clicked`,t)}},[]),e.default.createElement(`rapid-stepper-tab`,{...a,ref:Q9(o,n)},i)}),OVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-stepper-tab-panel`,{...i,ref:n},r)}),kVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-switch`,{...i,ref:n},r)}),AVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tab`,{...i,ref:n},r)}),jVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tab-panel`,{...i,ref:n},r)}),MVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tabs`,{...i,ref:n},r)}),NVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-text-area`,{...i,ref:n},r)}),PVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-text-field`,{...i,ref:n},r)}),FVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-toast`,{...i,ref:n},r)}),IVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-toolbar`,{...i,ref:n},r)}),LVe=e.default.forwardRef(function(t,n){let{onDismiss:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`dismiss`,t),()=>{e.removeEventListener(`dismiss`,t)}},[]),e.default.createElement(`rapid-tooltip`,{...a,ref:Q9(o,n)},i)}),RVe=e.default.forwardRef(function(t,n){let{onExpandedChange:r,onSelectedChange:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`expanded-change`,t);let n=e=>l.current?.(e);return e.addEventListener(`selected-change`,n),()=>{e.removeEventListener(`expanded-change`,t),e.removeEventListener(`selected-change`,n)}},[]),e.default.createElement(`rapid-tree-item`,{...o,ref:Q9(s,n)},a)}),zVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tree-view`,{...i,ref:n},r)}),BVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-url-input`,{...i,ref:n},r)}),VVe=e.default.forwardRef(function(t,n){let{onComplete:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`complete`,t),()=>{e.removeEventListener(`complete`,t)}},[]),e.default.createElement(`rapid-verification-code-input`,{...a,ref:Q9(o,n)},i)}),HVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-system-health-overlay`,{...i,ref:n},r)});if(typeof window<`u`){let e=window;e.rapid||(e.rapid={}),e.rapid.react=mBe}})(React);
1005
+ </svg>`})),class extends y5{}.compose(Object.assign({baseName:`tree-view`,template:(e,t)=>_5(e,t),styles:(e,t)=>O` ${v5(e,t)}`,shadowOptions:void 0},b5));let cBe=(e,t)=>O` ${x5(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)}`,lBe=T` ${S5(`rapid`)} `;(class extends w5{}).compose(Object.assign({baseName:`url-input`,template:lBe,styles:cBe,shadowOptions:void 0},C5));let uBe=O` ${T5} .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}`,dBe=E5;var fBe=class extends A5{};let pBe=O5,mBe=D5;fBe.compose(Object.assign({baseName:`verification-code-input`,template:dBe,styles:uBe,shadowOptions:mBe},pBe));var hBe=/* @__PURE__ */ c({Accordion:()=>gBe,AccordionItem:()=>_Be,ActionsMenu:()=>vBe,AiCriteriaSearch:()=>yBe,AiIndicator:()=>bBe,Anchor:()=>xBe,AnchoredRegion:()=>SBe,Avatar:()=>CBe,Badge:()=>wBe,Banner:()=>TBe,Breadcrumb:()=>EBe,BreadcrumbItem:()=>DBe,Button:()=>OBe,Calendar:()=>kBe,Card:()=>ABe,CategorizedMultiselect:()=>jBe,Checkbox:()=>MBe,Combobox:()=>NBe,ConnectionIndicator:()=>PBe,DatePicker:()=>FBe,DesignSystemProvider:()=>IBe,Dialog:()=>LBe,Disclosure:()=>RBe,Divider:()=>zBe,DropdownMenu:()=>BBe,EnvironmentIndicator:()=>VBe,FileUpload:()=>GBe,Filter:()=>KBe,FilterBar:()=>qBe,Flipper:()=>JBe,Flyout:()=>YBe,HorizontalScroll:()=>XBe,Icon:()=>ZBe,Listbox:()=>$9,ListboxOption:()=>QBe,Menu:()=>$Be,MenuItem:()=>eVe,Modal:()=>tVe,Multiselect:()=>nVe,NotificationListener:()=>rVe,NumberField:()=>iVe,Optgroup:()=>aVe,Pill:()=>oVe,Progress:()=>sVe,ProgressRing:()=>cVe,Radio:()=>lVe,RadioGroup:()=>uVe,RapidExpressionBuilder:()=>HBe,RapidRouter:()=>dVe,RapidRuleExpressionBuilder:()=>UBe,RapidValueExpressionBuilder:()=>WBe,Scheduler:()=>fVe,SchedulerCronBuilder:()=>pVe,SchedulerTimezone:()=>mVe,SearchBar:()=>gVe,SearchBarCombobox:()=>hVe,SectionNavigator:()=>_Ve,SegmentedControl:()=>vVe,SegmentedItem:()=>yVe,Select:()=>bVe,Skeleton:()=>xVe,Slider:()=>SVe,SliderLabel:()=>CVe,Snackbar:()=>wVe,StackingIcons:()=>TVe,StatusPill:()=>EVe,Stepper:()=>DVe,StepperTab:()=>OVe,StepperTabPanel:()=>kVe,Switch:()=>AVe,SystemHealthOverlay:()=>UVe,Tab:()=>jVe,TabPanel:()=>MVe,Tabs:()=>NVe,TextArea:()=>PVe,TextField:()=>FVe,Toast:()=>IVe,Toolbar:()=>LVe,Tooltip:()=>RVe,TreeItem:()=>zVe,TreeView:()=>BVe,UrlInput:()=>VVe,VerificationCodeInput:()=>HVe});function Q9(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n!=null&&(n.current=t)}}let gBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-accordion`,{...i,ref:n},r)}),_Be=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-accordion-item`,{...i,ref:n},r)}),vBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-actions-menu`,{...i,ref:n},r)}),yBe=e.default.forwardRef(function(t,n){let{onCriteriaChanged:r,onValidationErrors:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`criteria-changed`,t);let n=e=>l.current?.(e);return e.addEventListener(`validation-errors`,n),()=>{e.removeEventListener(`criteria-changed`,t),e.removeEventListener(`validation-errors`,n)}},[]),e.default.createElement(`rapid-ai-criteria-search`,{...o,ref:Q9(s,n)},a)}),bBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-ai-indicator`,{...i,ref:n},r)}),xBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-anchor`,{...i,ref:n},r)}),SBe=e.default.forwardRef(function(t,n){let{onLoaded:r,onPositionchange:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`loaded`,t);let n=e=>l.current?.(e);return e.addEventListener(`positionchange`,n),()=>{e.removeEventListener(`loaded`,t),e.removeEventListener(`positionchange`,n)}},[]),e.default.createElement(`rapid-anchored-region`,{...o,ref:Q9(s,n)},a)}),CBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-avatar`,{...i,ref:n},r)}),wBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-badge`,{...i,ref:n},r)}),TBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-banner`,{...i,ref:n},r)}),EBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-breadcrumb`,{...i,ref:n},r)}),DBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-breadcrumb-item`,{...i,ref:n},r)}),OBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-button`,{...i,ref:n},r)}),kBe=e.default.forwardRef(function(t,n){let{onDateselected:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`dateselected`,t),()=>{e.removeEventListener(`dateselected`,t)}},[]),e.default.createElement(`rapid-calendar`,{...a,ref:Q9(o,n)},i)}),ABe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-card`,{...i,ref:n},r)}),jBe=e.default.forwardRef(function(t,n){let{onSelectionChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`selectionChange`,t),()=>{e.removeEventListener(`selectionChange`,t)}},[]),e.default.createElement(`rapid-categorized-multiselect`,{...a,ref:Q9(o,n)},i)}),MBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-checkbox`,{...i,ref:n},r)}),NBe=e.default.forwardRef(function(t,n){let{onOpenChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`open-change`,t),()=>{e.removeEventListener(`open-change`,t)}},[]),e.default.createElement(`rapid-combobox`,{...a,ref:Q9(o,n)},i)}),PBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-connection-indicator`,{...i,ref:n},r)}),FBe=e.default.forwardRef(function(t,n){let{onValueChanged:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`value-changed`,t),()=>{e.removeEventListener(`value-changed`,t)}},[]),e.default.createElement(`rapid-date-picker`,{...a,ref:Q9(o,n)},i)}),IBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-design-system-provider`,{...i,ref:n},r)}),LBe=e.default.forwardRef(function(t,n){let{onClose:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`close`,t),()=>{e.removeEventListener(`close`,t)}},[]),e.default.createElement(`rapid-dialog`,{...a,ref:Q9(o,n)},i)}),RBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-disclosure`,{...i,ref:n},r)}),zBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-divider`,{...i,ref:n},r)}),BBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-dropdown-menu`,{...i,ref:n},r)}),VBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-environment-indicator`,{...i,ref:n},r)}),HBe=e.default.forwardRef(function(t,n){let{onAddGroup:r,onDelGroup:i,onAddRule:a,onDelRule:o,onUpdateGroup:s,onUpdateRule:c,children:l,...u}=t,d=e.default.useRef(null),f=e.default.useRef(r);f.current=r;let p=e.default.useRef(i);p.current=i;let m=e.default.useRef(a);m.current=a;let h=e.default.useRef(o);h.current=o;let g=e.default.useRef(s);g.current=s;let _=e.default.useRef(c);return _.current=c,e.default.useLayoutEffect(()=>{let e=d.current;if(!e)return;let t=e=>f.current?.(e);e.addEventListener(`add-group`,t);let n=e=>p.current?.(e);e.addEventListener(`del-group`,n);let r=e=>m.current?.(e);e.addEventListener(`add-rule`,r);let i=e=>h.current?.(e);e.addEventListener(`del-rule`,i);let a=e=>g.current?.(e);e.addEventListener(`update-group`,a);let o=e=>_.current?.(e);return e.addEventListener(`update-rule`,o),()=>{e.removeEventListener(`add-group`,t),e.removeEventListener(`del-group`,n),e.removeEventListener(`add-rule`,r),e.removeEventListener(`del-rule`,i),e.removeEventListener(`update-group`,a),e.removeEventListener(`update-rule`,o)}},[]),e.default.createElement(customElements.getName(J9)??`rapid-expression-builder`,{...u,ref:Q9(d,n)},l)}),UBe=e.default.forwardRef(function(t,n){let{onAddGroup:r,onDelGroup:i,onAddRule:a,onDelRule:o,onUpdateGroup:s,onUpdateRule:c,children:l,...u}=t,d=e.default.useRef(null),f=e.default.useRef(r);f.current=r;let p=e.default.useRef(i);p.current=i;let m=e.default.useRef(a);m.current=a;let h=e.default.useRef(o);h.current=o;let g=e.default.useRef(s);g.current=s;let _=e.default.useRef(c);return _.current=c,e.default.useLayoutEffect(()=>{let e=d.current;if(!e)return;let t=e=>f.current?.(e);e.addEventListener(`add-group`,t);let n=e=>p.current?.(e);e.addEventListener(`del-group`,n);let r=e=>m.current?.(e);e.addEventListener(`add-rule`,r);let i=e=>h.current?.(e);e.addEventListener(`del-rule`,i);let a=e=>g.current?.(e);e.addEventListener(`update-group`,a);let o=e=>_.current?.(e);return e.addEventListener(`update-rule`,o),()=>{e.removeEventListener(`add-group`,t),e.removeEventListener(`del-group`,n),e.removeEventListener(`add-rule`,r),e.removeEventListener(`del-rule`,i),e.removeEventListener(`update-group`,a),e.removeEventListener(`update-rule`,o)}},[]),e.default.createElement(customElements.getName(Y9)??`rapid-rule-expression-builder`,{...u,ref:Q9(d,n)},l)}),WBe=e.default.forwardRef(function(t,n){let{onAddGroup:r,onDelGroup:i,onAddRule:a,onDelRule:o,onUpdateGroup:s,onUpdateRule:c,children:l,...u}=t,d=e.default.useRef(null),f=e.default.useRef(r);f.current=r;let p=e.default.useRef(i);p.current=i;let m=e.default.useRef(a);m.current=a;let h=e.default.useRef(o);h.current=o;let g=e.default.useRef(s);g.current=s;let _=e.default.useRef(c);return _.current=c,e.default.useLayoutEffect(()=>{let e=d.current;if(!e)return;let t=e=>f.current?.(e);e.addEventListener(`add-group`,t);let n=e=>p.current?.(e);e.addEventListener(`del-group`,n);let r=e=>m.current?.(e);e.addEventListener(`add-rule`,r);let i=e=>h.current?.(e);e.addEventListener(`del-rule`,i);let a=e=>g.current?.(e);e.addEventListener(`update-group`,a);let o=e=>_.current?.(e);return e.addEventListener(`update-rule`,o),()=>{e.removeEventListener(`add-group`,t),e.removeEventListener(`del-group`,n),e.removeEventListener(`add-rule`,r),e.removeEventListener(`del-rule`,i),e.removeEventListener(`update-group`,a),e.removeEventListener(`update-rule`,o)}},[]),e.default.createElement(customElements.getName(X9)??`rapid-value-expression-builder`,{...u,ref:Q9(d,n)},l)}),GBe=e.default.forwardRef(function(t,n){let{onFileSelected:r,onSuccess:i,onErrorOut:a,onClear:o,children:s,...c}=t,l=e.default.useRef(null),u=e.default.useRef(r);u.current=r;let d=e.default.useRef(i);d.current=i;let f=e.default.useRef(a);f.current=a;let p=e.default.useRef(o);return p.current=o,e.default.useLayoutEffect(()=>{let e=l.current;if(!e)return;let t=e=>u.current?.(e);e.addEventListener(`file-selected`,t);let n=e=>d.current?.(e);e.addEventListener(`success`,n);let r=e=>f.current?.(e);e.addEventListener(`errorOut`,r);let i=e=>p.current?.(e);return e.addEventListener(`clear`,i),()=>{e.removeEventListener(`file-selected`,t),e.removeEventListener(`success`,n),e.removeEventListener(`errorOut`,r),e.removeEventListener(`clear`,i)}},[]),e.default.createElement(`rapid-file-upload`,{...c,ref:Q9(l,n)},s)}),KBe=e.default.forwardRef(function(t,n){let{onFilterChanged:r,onFilterCleared:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`filter-changed`,t);let n=e=>l.current?.(e);return e.addEventListener(`filter-cleared`,n),()=>{e.removeEventListener(`filter-changed`,t),e.removeEventListener(`filter-cleared`,n)}},[]),e.default.createElement(`rapid-filter`,{...o,ref:Q9(s,n)},a)}),qBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-filter-bar`,{...i,ref:n},r)}),JBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-flipper`,{...i,ref:n},r)}),YBe=e.default.forwardRef(function(t,n){let{onClosed:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`closed`,t),()=>{e.removeEventListener(`closed`,t)}},[]),e.default.createElement(`rapid-flyout`,{...a,ref:Q9(o,n)},i)}),XBe=e.default.forwardRef(function(t,n){let{onScrollstart:r,onScrollend:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`scrollstart`,t);let n=e=>l.current?.(e);return e.addEventListener(`scrollend`,n),()=>{e.removeEventListener(`scrollstart`,t),e.removeEventListener(`scrollend`,n)}},[]),e.default.createElement(`rapid-horizontal-scroll`,{...o,ref:Q9(s,n)},a)}),ZBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-icon`,{...i,ref:n},r)}),$9=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-listbox`,{...i,ref:n},r)}),QBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-option`,{...i,ref:n},r)}),$Be=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-menu`,{...i,ref:n},r)}),eVe=e.default.forwardRef(function(t,n){let{onOnMenuClick:r,onExpandedChange:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`onMenuClick`,t);let n=e=>l.current?.(e);return e.addEventListener(`expanded-change`,n),()=>{e.removeEventListener(`onMenuClick`,t),e.removeEventListener(`expanded-change`,n)}},[]),e.default.createElement(`rapid-menu-item`,{...o,ref:Q9(s,n)},a)}),tVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-modal`,{...i,ref:n},r)}),nVe=e.default.forwardRef(function(t,n){let{onSelectionChange:r,onClear:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`selectionChange`,t);let n=e=>l.current?.(e);return e.addEventListener(`clear`,n),()=>{e.removeEventListener(`selectionChange`,t),e.removeEventListener(`clear`,n)}},[]),e.default.createElement(`rapid-multiselect`,{...o,ref:Q9(s,n)},a)}),rVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-notification-listener`,{...i,ref:n},r)}),iVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-number-field`,{...i,ref:n},r)}),aVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-optgroup`,{...i,ref:n},r)}),oVe=e.default.forwardRef(function(t,n){let{onRemove:r,onPillClick:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`remove`,t);let n=e=>l.current?.(e);return e.addEventListener(`pill-click`,n),()=>{e.removeEventListener(`remove`,t),e.removeEventListener(`pill-click`,n)}},[]),e.default.createElement(`rapid-pill`,{...o,ref:Q9(s,n)},a)}),sVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-progress`,{...i,ref:n},r)}),cVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-progress-ring`,{...i,ref:n},r)}),lVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-radio`,{...i,ref:n},r)}),uVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-radio-group`,{...i,ref:n},r)}),dVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(customElements.getName(Z9)??`rapid-router`,{...i,ref:n},r)}),fVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-scheduler`,{...i,ref:n},r)}),pVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-scheduler-cron-builder`,{...i,ref:n},r)}),mVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-scheduler-timezone`,{...i,ref:n},r)}),hVe=e.default.forwardRef(function(t,n){let{onOpenChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`open-change`,t),()=>{e.removeEventListener(`open-change`,t)}},[]),e.default.createElement(`rapid-search-bar-combobox`,{...a,ref:Q9(o,n)},i)}),gVe=e.default.forwardRef(function(t,n){let{onSelectionChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`selectionChange`,t),()=>{e.removeEventListener(`selectionChange`,t)}},[]),e.default.createElement(`rapid-search-bar`,{...a,ref:Q9(o,n)},i)}),_Ve=e.default.forwardRef(function(t,n){let{onSectionNavigatorSetState:r,onSectionNavigatorSetStates:i,onSectionNavigatorClearState:a,onSectionNavigatorClearAllStates:o,children:s,...c}=t,l=e.default.useRef(null),u=e.default.useRef(r);u.current=r;let d=e.default.useRef(i);d.current=i;let f=e.default.useRef(a);f.current=a;let p=e.default.useRef(o);return p.current=o,e.default.useLayoutEffect(()=>{let e=l.current;if(!e)return;let t=e=>u.current?.(e);e.addEventListener(`section-navigator-set-state`,t);let n=e=>d.current?.(e);e.addEventListener(`section-navigator-set-states`,n);let r=e=>f.current?.(e);e.addEventListener(`section-navigator-clear-state`,r);let i=e=>p.current?.(e);return e.addEventListener(`section-navigator-clear-all-states`,i),()=>{e.removeEventListener(`section-navigator-set-state`,t),e.removeEventListener(`section-navigator-set-states`,n),e.removeEventListener(`section-navigator-clear-state`,r),e.removeEventListener(`section-navigator-clear-all-states`,i)}},[]),e.default.createElement(`rapid-section-navigator`,{...c,ref:Q9(l,n)},s)}),vVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-segmented-control`,{...i,ref:n},r)}),yVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-segmented-item`,{...i,ref:n},r)}),bVe=e.default.forwardRef(function(t,n){let{onOpenChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`open-change`,t),()=>{e.removeEventListener(`open-change`,t)}},[]),e.default.createElement(`rapid-select`,{...a,ref:Q9(o,n)},i)}),xVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-skeleton`,{...i,ref:n},r)}),SVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-slider`,{...i,ref:n},r)}),CVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-slider-label`,{...i,ref:n},r)}),wVe=e.default.forwardRef(function(t,n){let{onAutoDismiss:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`autoDismiss`,t),()=>{e.removeEventListener(`autoDismiss`,t)}},[]),e.default.createElement(`rapid-snackbar`,{...a,ref:Q9(o,n)},i)}),TVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-stacking-icons`,{...i,ref:n},r)}),EVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-status-pill`,{...i,ref:n},r)}),DVe=e.default.forwardRef(function(t,n){let{onStepClick:r,onValidationFailure:i,onNextStep:a,onValidationSuccess:o,children:s,...c}=t,l=e.default.useRef(null),u=e.default.useRef(r);u.current=r;let d=e.default.useRef(i);d.current=i;let f=e.default.useRef(a);f.current=a;let p=e.default.useRef(o);return p.current=o,e.default.useLayoutEffect(()=>{let e=l.current;if(!e)return;let t=e=>u.current?.(e);e.addEventListener(`step-click`,t);let n=e=>d.current?.(e);e.addEventListener(`validation-failure`,n);let r=e=>f.current?.(e);e.addEventListener(`next-step`,r);let i=e=>p.current?.(e);return e.addEventListener(`validation-success`,i),()=>{e.removeEventListener(`step-click`,t),e.removeEventListener(`validation-failure`,n),e.removeEventListener(`next-step`,r),e.removeEventListener(`validation-success`,i)}},[]),e.default.createElement(`rapid-stepper`,{...c,ref:Q9(l,n)},s)}),OVe=e.default.forwardRef(function(t,n){let{onTabClicked:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`tab-clicked`,t),()=>{e.removeEventListener(`tab-clicked`,t)}},[]),e.default.createElement(`rapid-stepper-tab`,{...a,ref:Q9(o,n)},i)}),kVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-stepper-tab-panel`,{...i,ref:n},r)}),AVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-switch`,{...i,ref:n},r)}),jVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tab`,{...i,ref:n},r)}),MVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tab-panel`,{...i,ref:n},r)}),NVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tabs`,{...i,ref:n},r)}),PVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-text-area`,{...i,ref:n},r)}),FVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-text-field`,{...i,ref:n},r)}),IVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-toast`,{...i,ref:n},r)}),LVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-toolbar`,{...i,ref:n},r)}),RVe=e.default.forwardRef(function(t,n){let{onDismiss:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`dismiss`,t),()=>{e.removeEventListener(`dismiss`,t)}},[]),e.default.createElement(`rapid-tooltip`,{...a,ref:Q9(o,n)},i)}),zVe=e.default.forwardRef(function(t,n){let{onExpandedChange:r,onSelectedChange:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`expanded-change`,t);let n=e=>l.current?.(e);return e.addEventListener(`selected-change`,n),()=>{e.removeEventListener(`expanded-change`,t),e.removeEventListener(`selected-change`,n)}},[]),e.default.createElement(`rapid-tree-item`,{...o,ref:Q9(s,n)},a)}),BVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tree-view`,{...i,ref:n},r)}),VVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-url-input`,{...i,ref:n},r)}),HVe=e.default.forwardRef(function(t,n){let{onComplete:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`complete`,t),()=>{e.removeEventListener(`complete`,t)}},[]),e.default.createElement(`rapid-verification-code-input`,{...a,ref:Q9(o,n)},i)}),UVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-system-health-overlay`,{...i,ref:n},r)});if(typeof window<`u`){let e=window;e.rapid||(e.rapid={}),e.rapid.react=hBe}})(React);