@genesislcap/design-system-configurator 15.46.3 → 15.46.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/966.0d5feb07930f8c53831abe8e3640a072.js.map +1 -0
- package/dist/{966.966.02f16fb447a3cd3bd423.js → 966.966.c8760f286fe842f01d88.js} +215 -215
- package/dist/{designSystemConfigurator.bd39dc7bf1cffc5d4dd1b35825883360.js.map → designSystemConfigurator.3aa30d3c557b52dc9247259b81b025e6.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.5faa0edb094f340d0c325a2598d3389a.js.map → main.662ae2a0009a0b0f7d1eb300db799e02.js.map} +1 -1
- package/dist/{main.f1ad6d2f4e839b88a8bd.js → main.b3040b7bbb6b9be49e9f.js} +2 -2
- package/dist/remoteEntry.js +2 -2
- package/package.json +11 -11
- package/dist/966.e88852e1c3195090580c0c06d6ce93c5.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[966],{8420(e,t,i){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),o={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}};return i.default.locale(o,null,!0),o}(i(94343))},58915(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,n=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},r=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],c=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var i,o=a.meridiem;if(o){for(var n=1;n<=24;n+=1)if(e.indexOf(o(n,0,t))>-1){i=n>12;break}}else i=e===(t?"pm":"PM");return i},h={A:[s,function(e){this.afternoon=u(e,!1)}],a:[s,function(e){this.afternoon=u(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[o,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,l("seconds")],ss:[n,l("seconds")],m:[n,l("minutes")],mm:[n,l("minutes")],H:[n,l("hours")],h:[n,l("hours")],HH:[n,l("hours")],hh:[n,l("hours")],D:[n,l("day")],DD:[o,l("day")],Do:[s,function(e){var t=a.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var o=1;o<=31;o+=1)t(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[n,l("week")],ww:[o,l("week")],M:[n,l("month")],MM:[o,l("month")],MMM:[s,function(e){var t=c("months"),i=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[s,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[o,function(e){this.year=r(e)}],YYYY:[/\d{4}/,l("year")],Z:d,ZZ:d};function p(i){var o,n;o=i,n=a&&a.formats;for(var s=(i=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,o){var s=o&&o.toUpperCase();return i||n[o]||e[o]||n[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),r=s.length,l=0;l<r;l+=1){var d=s[l],c=h[d],u=c&&c[0],p=c&&c[1];s[l]=p?{regex:u,parser:p}:d.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,o=0;i<r;i+=1){var n=s[i];if("string"==typeof n)o+=n.length;else{var a=n.regex,l=n.parser,d=e.slice(o),c=a.exec(d)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(r=e.parseTwoDigitYear);var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date,o=e.utc,s=e.args;this.$u=o;var r=s[1];if("string"==typeof r){var l=!0===s[2],d=!0===s[3],c=l||d,u=s[2];d&&(u=s[2]),a=this.$locale(),!l&&u&&(a=i.Ls[u]),this.$d=function(e,t,i,o){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var n=p(t)(e),s=n.year,a=n.month,r=n.day,l=n.hours,d=n.minutes,c=n.seconds,u=n.milliseconds,h=n.zone,m=n.week,v=new Date,g=r||(s||a?1:v.getDate()),f=s||v.getFullYear(),b=0;s&&!a||(b=a>0?a-1:v.getMonth());var y,w=l||0,C=d||0,x=c||0,$=u||0;return h?new Date(Date.UTC(f,b,g,w,C,x,$+60*h.offset*1e3)):i?new Date(Date.UTC(f,b,g,w,C,x,$)):(y=new Date(f,b,g,w,C,x,$),m&&(y=o(y).week(m).toDate()),y)}catch(e){return new Date("")}}(t,r,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),c&&t!=this.format(r)&&(this.$d=new Date("")),a={}}else if(r instanceof Array)for(var h=r.length,m=1;m<=h;m+=1){s[1]=r[m-1];var v=i.apply(this,s);if(v.isValid()){this.$d=v.$d,this.$L=v.$L,this.init();break}m===h&&(this.$d=new Date(""))}else n.call(this,e)}}}()},33839(e){e.exports=function(){"use strict";return function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}}()},7554(e){e.exports=function(){"use strict";return function(e,t,i){var o=t.prototype,n=function(e){return e&&(e.indexOf?e:e.s)},s=function(e,t,i,o,s){var a=e.name?e:e.$locale(),r=n(a[t]),l=n(a[i]),d=r||l.map(function(e){return e.slice(0,o)});if(!s)return d;var c=a.weekStart;return d.map(function(e,t){return d[(t+(c||0))%7]})},a=function(){return i.Ls[i.locale()]},r=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})}(e.formats[t.toUpperCase()])},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):s(e,"months")},monthsShort:function(t){return t?t.format("MMM"):s(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):s(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):s(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):s(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return r(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return l.bind(this)()},i.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return r(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return s(a(),"months")},i.monthsShort=function(){return s(a(),"monthsShort","months",3)},i.weekdays=function(e){return s(a(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return s(a(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return s(a(),"weekdaysMin","weekdays",2,e)}}}()},49916(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,i,o){var n=i.prototype,s=n.format;o.en.formats=e,n.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,o=function(t,i){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,o,n){var s=n&&n.toUpperCase();return o||i[n]||e[n]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(t,void 0===i?{}:i);return s.call(this,o)}}}()},57565(e){e.exports=a,a.default=a,a.stable=c,a.stableStringify=c;var t="[...]",i="[Circular]",o=[],n=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,i,a){var r;void 0===a&&(a=s()),l(e,"",0,[],void 0,0,a);try{r=0===n.length?JSON.stringify(e,t,i):JSON.stringify(e,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function r(e,t,i,s){var a=Object.getOwnPropertyDescriptor(s,i);void 0!==a.get?a.configurable?(Object.defineProperty(s,i,{value:e}),o.push([s,i,t,a])):n.push([t,i,e]):(s[i]=e,o.push([s,i,t]))}function l(e,o,n,s,a,d,c){var u;if(d+=1,"object"==typeof e&&null!==e){for(u=0;u<s.length;u++)if(s[u]===e)return void r(i,e,o,a);if(void 0!==c.depthLimit&&d>c.depthLimit)return void r(t,e,o,a);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void r(t,e,o,a);if(s.push(e),Array.isArray(e))for(u=0;u<e.length;u++)l(e[u],u,u,s,e,d,c);else{var h=Object.keys(e);for(u=0;u<h.length;u++){var p=h[u];l(e[p],p,u,s,e,d,c)}}s.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function c(e,t,i,a){void 0===a&&(a=s());var r,l=u(e,"",0,[],void 0,0,a)||e;try{r=0===n.length?JSON.stringify(l,t,i):JSON.stringify(l,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function u(e,n,s,a,l,c,h){var p;if(c+=1,"object"==typeof e&&null!==e){for(p=0;p<a.length;p++)if(a[p]===e)return void r(i,e,n,l);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&c>h.depthLimit)return void r(t,e,n,l);if(void 0!==h.edgesLimit&&s+1>h.edgesLimit)return void r(t,e,n,l);if(a.push(e),Array.isArray(e))for(p=0;p<e.length;p++)u(e[p],p,p,a,e,c,h);else{var m={},v=Object.keys(e).sort(d);for(p=0;p<v.length;p++){var g=v[p];u(e[g],g,p,a,e,c,h),m[g]=e[g]}if(void 0===l)return m;o.push([l,n,e]),l[n]=m}a.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,i){if(n.length>0)for(var o=0;o<n.length;o++){var s=n[o];if(s[1]===t&&s[0]===i){i=s[2],n.splice(o,1);break}}return e.call(this,t,i)}}},93678(e){"use strict";function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles)return function(e){const i=[],o=[],n=new Map;if(n.set(Date,e=>new Date(e)),n.set(Map,(e,t)=>new Map(a(Array.from(e),t))),n.set(Set,(e,t)=>new Set(a(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)n.set(t[0],t[1]);let s=null;return e.proto?l:r;function a(e,a){const r=Object.keys(e),l=new Array(r.length);for(let d=0;d<r.length;d++){const c=r[d],u=e[c];if("object"!=typeof u||null===u)l[c]=u;else if(u.constructor!==Object&&(s=n.get(u.constructor)))l[c]=s(u,a);else if(ArrayBuffer.isView(u))l[c]=t(u);else{const e=i.indexOf(u);l[c]=-1!==e?o[e]:a(u)}}return l}function r(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,r);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,r);const l={};i.push(e),o.push(l);for(const a in e){if(!1===Object.hasOwnProperty.call(e,a))continue;const d=e[a];if("object"!=typeof d||null===d)l[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))l[a]=s(d,r);else if(ArrayBuffer.isView(d))l[a]=t(d);else{const e=i.indexOf(d);l[a]=-1!==e?o[e]:r(d)}}return i.pop(),o.pop(),l}function l(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,l);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,l);const r={};i.push(e),o.push(r);for(const a in e){const d=e[a];if("object"!=typeof d||null===d)r[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))r[a]=s(d,l);else if(ArrayBuffer.isView(d))r[a]=t(d);else{const e=i.indexOf(d);r[a]=-1!==e?o[e]:l(d)}}return i.pop(),o.pop(),r}}(e);const i=new Map;if(i.set(Date,e=>new Date(e)),i.set(Map,(e,t)=>new Map(n(Array.from(e),t))),i.set(Set,(e,t)=>new Set(n(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)i.set(t[0],t[1]);let o=null;return e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a}:function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){if(!1===Object.hasOwnProperty.call(s,n))continue;const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a};function n(e,n){const s=Object.keys(e),a=new Array(s.length);for(let r=0;r<s.length;r++){const l=s[r],d=e[l];"object"!=typeof d||null===d?a[l]=d:d.constructor!==Object&&(o=i.get(d.constructor))?a[l]=o(d,n):ArrayBuffer.isView(d)?a[l]=t(d):a[l]=n(d)}return a}}},31274(e,t,i){"use strict";i.d(t,{u:()=>n});var o=i(60416);const n=(e,t,i)=>{(0,o.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-dialog`),a=i?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(i):(0,o.jE)("dialog-container",t);a.appendChild(s),s.notification=e,s.show()}},60416(e,t,i){"use strict";i.d(t,{cL:()=>h,jE:()=>u,uP:()=>d,u_:()=>c});var o=i(66506),n=i(52945),s=i(68424);const a=(0,o.createLogger)("foundation-notifications");let r=null;const l=new Map,d=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},c=e=>{var t,i;a.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.logLevel)||o.LogLevels.debug)})},u=(e,t)=>{let i=document.querySelector(`#${e}`);if(!i)if(l.has(e))i=l.get(e);else{const t=(0,n.fI)(document).find(t=>t.id===e);t&&(i=t,l.set(e,t))}if(!i){i=document.createElement("div"),i.setAttribute("id",e),i.style.zIndex="9999";const{element:t,prefix:o}=(0,s.DW)(document.body,"rapid");if(t)t.appendChild(i),r=t;else if(r)r.appendChild(i);else{const e=document.createElement(`${o}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),r=e}}return i},h=e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return p()},p=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},78966(e,t,i){"use strict";i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>R,AffixMixin:()=>wl,AiCriteriaSearch:()=>$e,AiIndicator:()=>De,Anchor:()=>Le,AnchoredRegion:()=>Pe,Avatar:()=>Ye,BASE_EDITABLE_ELEMENT_SELECTORS:()=>Ef,Badge:()=>Qe,Banner:()=>lt,BaseDatasource:()=>vi,BaseFileComponent:()=>Hs,Breadcrumb:()=>ht,BreadcrumbItem:()=>bt,Button:()=>St,COMBO_INPUT_MIN_LENGTH:()=>Eu,CRON_LENGTH:()=>Cc,CSSVarsTokenMapper:()=>Ym,Calendar:()=>It,Card:()=>Mt,CategorizedMultiselect:()=>Wt,Checkbox:()=>Jt,Combobox:()=>$i,ConnectionIndicator:()=>Ii,CronBuilderEvents:()=>Tc,DATETIME_OPERATORS:()=>ee,DATE_OPERATORS:()=>Z,DATE_PICKER_VALUE_FORMAT:()=>fo,DEFUALT_FILTER_BAR_COLUMNS:()=>Sa,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Tf,DataGrid:()=>Fi,DataGridCell:()=>Pi,DataGridDatasource:()=>Wm,DataGridRow:()=>Gi,DateOrDay:()=>vc,DatePicker:()=>So,DefaultRouter:()=>Jg,DesignTokensObservable:()=>Ko,Dialog:()=>An,DialogElement:()=>Rn,Disclosure:()=>Mn,Divider:()=>Bn,DropdownMenu:()=>Jn,EnvironmentIndicator:()=>us,ErrorBanner:()=>gs,ErrorBoundary:()=>Is,ErrorBoundaryEvent:()=>bs,ErrorDialog:()=>Ms,ExpressionBuilderConfig:()=>s,ExpressionBuilderCore:()=>ug,FaPrefixFromStyle:()=>Or,FileReader:()=>Vs,FileUpload:()=>oa,Filter:()=>ga,FilterBar:()=>Ea,FilterEvents:()=>va,FlexLayout:()=>La,FlexMediaQueriesEnum:()=>Ta,Flipper:()=>_a,Flyout:()=>ja,FoundationDesignSystemProvider:()=>Cn,FoundationExpressionBuilder:()=>Xv,FoundationRouteCollection:()=>hf,FoundationRouteNav:()=>lf,FoundationRouter:()=>gf,FoundationRouterConfiguration:()=>pf,FoundationRuleExpressionBuilder:()=>Tg,FoundationValueExpressionBuilder:()=>Lg,GenerateNavigationPathEventType:()=>vf,GridLayout:()=>ir,GridLayoutItem:()=>rr,GridMediaQueriesEnum:()=>Ka,HorizontalScroll:()=>ur,INPUT_MIN_LENGTH:()=>Su,Icon:()=>Dr,Listbox:()=>Lr,ListboxOption:()=>Pr,MAX_DAYS:()=>wc,MAX_HOURS:()=>$c,MAX_MINS_SEC:()=>Sc,MAX_MINUTE_RECURRENCE:()=>Oc,MAX_MONTHS:()=>yc,MAX_WEEK_DAYS:()=>xc,MAX_WEEK_NUMBER:()=>Ec,Menu:()=>jr,MenuItem:()=>Jr,Modal:()=>sl,Multiselect:()=>ml,MultiselectDatasource:()=>dl,NUMERIC_OPERATORS:()=>Q,NavigateToEventType:()=>mf,NotificationListener:()=>Mg,NumberField:()=>Pl,OPERATOR_DISPLAY_LABEL:()=>te,Optgroup:()=>jl,OptionsDatasource:()=>bi,Pill:()=>Ld,Popper:()=>_d,Position:()=>zt,Progress:()=>md,ProgressRing:()=>Vd,Radio:()=>Kd,RadioGroup:()=>tc,RecurrenceType:()=>pc,Router:()=>Xg,RuleExpression:()=>hg,SCROLL_TIMEOUT:()=>$u,SECTION_NAVIGATOR_EVENTS:()=>Bu,SNACKBAR_CLOSE_TIMEOUT:()=>Nh,SNACKBAR_EVENTS_NAMES:()=>Mh,SNACKBAR_TYPES:()=>Fh,SNACKBAR_TYPE_DEFAULT:()=>Lh,STRING_OPERATORS:()=>J,Scheduler:()=>lc,SchedulerCronBuilder:()=>ru,SchedulerTimezone:()=>mu,SearchBar:()=>Tu,SearchBarCombobox:()=>Fu,SectionNavigator:()=>ju,SegmentedControl:()=>Ju,SegmentedItem:()=>oh,Select:()=>dh,Skeleton:()=>vh,Slider:()=>$h,SliderLabel:()=>Dh,Snackbar:()=>Uh,StackingIcons:()=>jh,StatusPill:()=>Xh,Stepper:()=>wf,StepperTab:()=>tp,StepperTabPanel:()=>ap,Switch:()=>hp,SystemHealthOverlay:()=>xd,Tab:()=>$p,TabPanel:()=>Dp,Tabs:()=>Np,TextArea:()=>Up,TextField:()=>Kp,Toast:()=>nm,Toolbar:()=>lm,Tooltip:()=>mm,TreeItem:()=>wm,TreeView:()=>Om,UrlInput:()=>Nm,VerificationCodeInput:()=>Vm,WeekType:()=>mc,accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,accentPaletteValue:()=>cn,actionsMenuBaseStyles:()=>$,alertFlashDurationProperty:()=>fp,alertFlashPhaseProperty:()=>gp,applyCustomTokens:()=>tn,baseComponents:()=>jm,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>hn,black:()=>ko,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>kf,categorizedMultiselectStyles:()=>Bt,categorizedMultiselectTemplate:()=>Gt,clientOperators:()=>mg,closeIcon:()=>la,configureDesignSystem:()=>dn,configureEnvironmentIndicator:()=>ds,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>mn,createDesignSystemProxy:()=>bd,createFormData:()=>Xs,crossIcon:()=>yu,daysOfWeek:()=>gc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>Ee,defaultAnchorConfig:()=>Ne,defaultAnchoredRegionConfig:()=>Ue,defaultAvatarConfig:()=>qe,defaultBadgeConfig:()=>et,defaultBreadcrumbConfig:()=>mt,defaultBreadcrumbItemConfig:()=>wt,defaultButtonConfig:()=>Ot,defaultCalendarConfig:()=>At,defaultCardConfig:()=>Ht,defaultCategorizedMultiselectConfig:()=>Yt,defaultCheckboxConfig:()=>Zt,defaultComboboxConfig:()=>Ei,defaultConfig:()=>cc,defaultCronBuilderConfig:()=>du,defaultDataGridCellConfig:()=>Ui,defaultDataGridConfig:()=>Mi,defaultDataGridRowConfig:()=>Yi,defaultDatePickerConfig:()=>$o,defaultDialogConfig:()=>In,defaultDisclosureConfig:()=>Hn,defaultDividerConfig:()=>Gn,defaultFileUploadConfig:()=>sa,defaultFillColor:()=>Io,defaultFlexLayoutConfig:()=>Aa,defaultFlipperConfig:()=>Pa,defaultFlyoutConfig:()=>Wa,defaultGridLayoutConfig:()=>er,defaultGridLayoutItemConfig:()=>ar,defaultHorizontalScrollConfig:()=>pr,defaultIconConfig:()=>Er,defaultListboxConfig:()=>Nr,defaultListboxOptionConfig:()=>Ur,defaultMenuConfig:()=>Wr,defaultMenuItemConfig:()=>Zr,defaultModalConfig:()=>nl,defaultMultiselectConfig:()=>pl,defaultNavItemPredicate:()=>df,defaultNeutralForegroundContrast:()=>Vo,defaultNumberFieldConfig:()=>Ul,defaultPillConfig:()=>Ad,defaultPlacementIndexPadding:()=>cf,defaultProgressConfig:()=>gd,defaultProgressRingConfig:()=>jd,defaultRadioConfig:()=>Jd,defaultRadioGroupConfig:()=>oc,defaultSearchBarComboboxConfig:()=>Mu,defaultSearchBarConfig:()=>Du,defaultSectionNavigatorConfig:()=>Wu,defaultSegmentedControlConfig:()=>Zu,defaultSegmentedItemConfig:()=>sh,defaultSelectConfig:()=>uh,defaultSkeletonConfig:()=>fh,defaultSliderConfig:()=>Eh,defaultSliderLabelConfig:()=>Rh,defaultStepperConfig:()=>xf,defaultStepperTabConfig:()=>op,defaultStepperTabPanelConfig:()=>lp,defaultSwitchConfig:()=>mp,defaultSystemHealthOverlayConfig:()=>Od,defaultTabConfig:()=>Ep,defaultTabPanelConfig:()=>Rp,defaultTabsConfig:()=>_p,defaultTextAreaConfig:()=>Vp,defaultTextFieldConfig:()=>Jp,defaultTimezoneConfig:()=>gu,defaultToastConfig:()=>om,defaultToolbarConfig:()=>cm,defaultTooltipConfig:()=>gm,defaultTreeItemConfig:()=>xm,defaultTreeViewConfig:()=>km,defaultUrlInputConfig:()=>Fm,defaultVerificationCodeInputConfig:()=>zm,defineFactory:()=>Hg,density:()=>r.density,designToken:()=>Qo,designTokensMap:()=>rn,designUnit:()=>r.designUnit,designUnitValue:()=>vn,direction:()=>r.direction,directionValue:()=>pn,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>Qs,dropdownMenuBaseStyles:()=>Yn,environmentIndicatorStyles:()=>es,errorDialogTemplate:()=>Fs,extractMenuItems:()=>qn,faSizeValueDefault:()=>Tr,faSizeValues:()=>kr,fileReaderStyles:()=>Ps,fileReaderTemplate:()=>Bs,fillColor:()=>r.fillColor,filterBarTemplate:()=>xa,findParentRouter:()=>tf,findRouter:()=>ef,findTopLevelRouter:()=>of,flyoutAnimationTime:()=>Ua,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,formatTimeForCountDown:()=>Kh,formatToPlaceholder:()=>vo,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>v,foundationAccordionItemTemplate:()=>g,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>A,foundationActionsMenuStyles:()=>S,foundationActionsMenuTemplate:()=>I,foundationAiCriteriaSearch:()=>Oe,foundationAiCriteriaSearchShadowOptions:()=>Se,foundationAiCriteriaSearchStyles:()=>_,foundationAiCriteriaSearchTemplate:()=>B,foundationAiIndicator:()=>Ie,foundationAiIndicatorStyles:()=>Te,foundationAiIndicatorTemplate:()=>ke,foundationAnchor:()=>Me,foundationAnchorShadowOptions:()=>Fe,foundationAnchorStyles:()=>Re,foundationAnchorTemplate:()=>Ae,foundationAnchoredRegion:()=>Be,foundationAnchoredRegionShadowOptions:()=>ze,foundationAnchoredRegionStyles:()=>He,foundationAnchoredRegionTemplate:()=>_e,foundationAvatar:()=>Ke,foundationAvatarShadowOptions:()=>We,foundationAvatarStyles:()=>Ve,foundationAvatarTemplate:()=>Ge,foundationBadge:()=>tt,foundationBadgeShadowOptions:()=>Ze,foundationBadgeStyles:()=>Xe,foundationBadgeTemplate:()=>Je,foundationBanner:()=>dt,foundationBannerShadowOptions:()=>rt,foundationBannerStyles:()=>nt,foundationBannerTemplate:()=>at,foundationBreadcrumb:()=>vt,foundationBreadcrumbItem:()=>Ct,foundationBreadcrumbItemShadowOptions:()=>yt,foundationBreadcrumbItemStyles:()=>gt,foundationBreadcrumbItemTemplate:()=>ft,foundationBreadcrumbShadowOptions:()=>pt,foundationBreadcrumbStyles:()=>ct,foundationBreadcrumbTemplate:()=>ut,foundationButton:()=>Tt,foundationButtonShadowOptions:()=>Et,foundationButtonStyles:()=>xt,foundationButtonTemplate:()=>$t,foundationCalendar:()=>Lt,foundationCalendarShadowOptions:()=>Rt,foundationCalendarStyles:()=>kt,foundationCalendarTemplate:()=>Dt,foundationCard:()=>Pt,foundationCardShadowOptions:()=>_t,foundationCardStyles:()=>Ft,foundationCardTemplate:()=>Nt,foundationCategorizedMultiselect:()=>qt,foundationCategorizedMultiselectShadowOptions:()=>jt,foundationCheckbox:()=>ei,foundationCheckboxShadowOptions:()=>Qt,foundationCheckboxStyles:()=>Kt,foundationCheckboxTemplate:()=>Xt,foundationCombobox:()=>Oi,foundationComboboxShadowOptions:()=>Si,foundationComboboxStyles:()=>yi,foundationComboboxTemplate:()=>wi,foundationConnectionIndicator:()=>Ri,foundationConnectionIndicatorStyles:()=>ki,foundationConnectionIndicatorTemplate:()=>Di,foundationDataGrid:()=>_i,foundationDataGridCell:()=>Bi,foundationDataGridCellShadowOptions:()=>zi,foundationDataGridCellStyles:()=>Hi,foundationDataGridCellTemplate:()=>a.dataGridCellTemplate,foundationDataGridRow:()=>Wi,foundationDataGridRowShadowOptions:()=>ji,foundationDataGridRowStyles:()=>Vi,foundationDataGridRowTemplate:()=>a.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Ni,foundationDataGridStyles:()=>Ai,foundationDataGridTemplate:()=>Li,foundationDatePicker:()=>Eo,foundationDatePickerShadowOptions:()=>xo,foundationDatePickerStyles:()=>ro,foundationDatePickerTemplate:()=>uo,foundationDesignSystemProvider:()=>xn,foundationDialog:()=>Ln,foundationDialogShadowOptions:()=>Dn,foundationDialogStyles:()=>Sn,foundationDialogTemplate:()=>kn,foundationDisclosure:()=>Pn,foundationDisclosureShadowOptions:()=>_n,foundationDisclosureStyles:()=>Fn,foundationDisclosureTemplate:()=>Nn,foundationDivider:()=>jn,foundationDividerShadowOptions:()=>Vn,foundationDividerStyles:()=>zn,foundationDividerTemplate:()=>Un,foundationDropdownMenu:()=>Qn,foundationDropdownMenuStyles:()=>Wn,foundationDropdownMenuTemplate:()=>Xn,foundationEnvironmentIndicator:()=>hs,foundationEnvironmentIndicatorTemplate:()=>ts,foundationErrorBanner:()=>fs,foundationErrorBannerShadowOptions:()=>vs,foundationErrorBannerTemplate:()=>ms,foundationErrorBoundary:()=>Rs,foundationErrorBoundaryShadowOptions:()=>Ds,foundationErrorBoundaryTemplate:()=>ks,foundationErrorDialog:()=>_s,foundationErrorDialogShadowOptions:()=>Ns,foundationErrorDialogStyles:()=>As,foundationFileReader:()=>Gs,foundationFileReaderStyles:()=>zs,foundationFileUpload:()=>aa,foundationFileUploadShadowOptions:()=>na,foundationFileUploadStyles:()=>Ws,foundationFileUploadTemplate:()=>Ks,foundationFilter:()=>fa,foundationFilterBar:()=>Oa,foundationFilterBarStyles:()=>ya,foundationFilterBarTemplate:()=>$a,foundationFilterStyles:()=>ra,foundationFilterTemplate:()=>ma,foundationFlexLayout:()=>Fa,foundationFlexLayoutShadowOptions:()=>Ra,foundationFlexLayoutStyles:()=>Da,foundationFlexLayoutTemplate:()=>Ia,foundationFlipper:()=>za,foundationFlipperShadowOptions:()=>Ha,foundationFlipperStyles:()=>Na,foundationFlipperTemplate:()=>Ma,foundationFlyout:()=>qa,foundationFlyoutShadowOptions:()=>Ya,foundationFlyoutStyles:()=>Ba,foundationFlyoutTemplate:()=>Ga,foundationGridLayout:()=>or,foundationGridLayoutItem:()=>lr,foundationGridLayoutItemShadowOptions:()=>sr,foundationGridLayoutItemTemplate:()=>nr,foundationGridLayoutShadowOptions:()=>Za,foundationGridLayoutStyles:()=>Ja,foundationGridLayoutTemplate:()=>Qa,foundationHorizontalScroll:()=>mr,foundationHorizontalScrollShadowOptions:()=>hr,foundationHorizontalScrollStyles:()=>dr,foundationHorizontalScrollTemplate:()=>cr,foundationIcon:()=>Ir,foundationIconShadowOptions:()=>Sr,foundationIconStyles:()=>Cr,foundationIconTemplate:()=>$r,foundationListbox:()=>Mr,foundationListboxOption:()=>Br,foundationListboxOptionShadowOptions:()=>zr,foundationListboxOptionStyles:()=>_r,foundationListboxOptionTemplate:()=>Hr,foundationListboxShadowOptions:()=>Fr,foundationListboxStyles:()=>Rr,foundationListboxTemplate:()=>Ar,foundationMenu:()=>qr,foundationMenuItem:()=>el,foundationMenuItemShadowOptions:()=>Qr,foundationMenuItemStyles:()=>Kr,foundationMenuItemTemplate:()=>Xr,foundationMenuShadowOptions:()=>Yr,foundationMenuStyles:()=>Vr,foundationMenuTemplate:()=>Gr,foundationModal:()=>al,foundationModalShadowOptions:()=>ol,foundationModalStyles:()=>tl,foundationModalTemplate:()=>il,foundationMultiselect:()=>vl,foundationMultiselectShadowOptions:()=>hl,foundationNotificationListener:()=>_g,foundationNotificationListenerShadowOptions:()=>Ng,foundationNotificationListenerTemplate:()=>Fg,foundationNumberField:()=>Bl,foundationNumberFieldShadowOptions:()=>zl,foundationNumberFieldStyles:()=>xl,foundationNumberFieldTemplate:()=>$l,foundationOptgroup:()=>Yl,foundationOptgroupStyles:()=>Vl,foundationOptgroupTemplate:()=>Gl,foundationPill:()=>Fd,foundationPillShadowOptions:()=>Rd,foundationPillTemplate:()=>Id,foundationPopper:()=>zd,foundationProgress:()=>fd,foundationProgressRing:()=>Yd,foundationProgressRingShadowOptions:()=>Gd,foundationProgressRingStyles:()=>Ud,foundationProgressRingTemplate:()=>Bd,foundationProgressShadowOptions:()=>vd,foundationProgressStyles:()=>hd,foundationProgressTemplate:()=>pd,foundationRadio:()=>Qd,foundationRadioGroup:()=>nc,foundationRadioGroupShadowOptions:()=>ic,foundationRadioGroupStyles:()=>Zd,foundationRadioGroupTemplate:()=>ec,foundationRadioShadowOptions:()=>Xd,foundationRadioStyles:()=>Wd,foundationRadioTemplate:()=>qd,foundationScheduler:()=>uc,foundationSchedulerCronBuilder:()=>cu,foundationSchedulerCronBuilderShadowOptions:()=>lu,foundationSchedulerCronBuilderTemplate:()=>au,foundationSchedulerShadowOptions:()=>dc,foundationSchedulerTemplate:()=>rc,foundationSchedulerTimezone:()=>fu,foundationSchedulerTimezoneShadowOptions:()=>vu,foundationSchedulerTimezoneTemplate:()=>pu,foundationSearchBar:()=>Iu,foundationSearchBarCombobox:()=>_u,foundationSearchBarComboboxShadowOptions:()=>Nu,foundationSearchBarComboboxStyles:()=>Ru,foundationSearchBarComboboxTemplate:()=>Au,foundationSearchBarShadowOptions:()=>ku,foundationSearchBarStyles:()=>bu,foundationSearchBarTemplate:()=>xu,foundationSectionNavigator:()=>qu,foundationSectionNavigatorShadowOptions:()=>Yu,foundationSectionNavigatorStyles:()=>Hu,foundationSectionNavigatorTemplate:()=>Pu,foundationSegmentedControl:()=>eh,foundationSegmentedControlShadowOptions:()=>Qu,foundationSegmentedControlStyles:()=>Ku,foundationSegmentedControlTemplate:()=>Xu,foundationSegmentedItem:()=>ah,foundationSegmentedItemShadowOptions:()=>nh,foundationSegmentedItemStyles:()=>th,foundationSegmentedItemTemplate:()=>ih,foundationSelect:()=>hh,foundationSelectShadowOptions:()=>ch,foundationSelectStyles:()=>rh,foundationSelectTemplate:()=>lh,foundationSkeleton:()=>bh,foundationSkeletonShadowOptions:()=>gh,foundationSkeletonStyles:()=>ph,foundationSkeletonTemplate:()=>mh,foundationSlider:()=>Oh,foundationSliderLabel:()=>Ah,foundationSliderLabelShadowOptions:()=>Ih,foundationSliderLabelStyles:()=>Th,foundationSliderLabelTemplate:()=>kh,foundationSliderShadowOptions:()=>Sh,foundationSliderStyles:()=>yh,foundationSliderTemplate:()=>xh,foundationSnackbar:()=>Bh,foundationSnackbarShadowOptions:()=>zh,foundationSnackbarStyles:()=>_h,foundationSnackbarTemplate:()=>Ph,foundationStackingIcons:()=>Yh,foundationStackingIconsStyles:()=>Vh,foundationStackingIconsTemplate:()=>Gh,foundationStatusPill:()=>Jh,foundationStatusPillTemplate:()=>qh,foundationStepper:()=>$f,foundationStepperShadowOptions:()=>Cf,foundationStepperStyles:()=>yf,foundationStepperTab:()=>np,foundationStepperTabPanel:()=>dp,foundationStepperTabPanelShadowOptions:()=>rp,foundationStepperTabPanelTemplate:()=>sp,foundationStepperTabShadowOptions:()=>ip,foundationStepperTabStyles:()=>Qh,foundationStepperTabTemplate:()=>ep,foundationStepperTemplate:()=>bf,foundationSwitch:()=>vp,foundationSwitchShadowOptions:()=>pp,foundationSwitchStyles:()=>cp,foundationSwitchTemplate:()=>up,foundationSystemHealthOverlay:()=>Td,foundationSystemHealthOverlayShadowOptions:()=>Ed,foundationSystemHealthOverlayStyles:()=>Sd,foundationSystemHealthOverlayTemplate:()=>$d,foundationTab:()=>Op,foundationTabPanel:()=>Ap,foundationTabPanelShadowOptions:()=>Ip,foundationTabPanelStyles:()=>Tp,foundationTabPanelTemplate:()=>kp,foundationTabShadowOptions:()=>Sp,foundationTabStyles:()=>Cp,foundationTabTemplate:()=>xp,foundationTabs:()=>Hp,foundationTabsShadowOptions:()=>Mp,foundationTabsStyles:()=>Lp,foundationTabsTemplate:()=>Fp,foundationTextArea:()=>Gp,foundationTextAreaShadowOptions:()=>Bp,foundationTextAreaStyles:()=>Pp,foundationTextAreaTemplate:()=>zp,foundationTextField:()=>Qp,foundationTextFieldShadowOptions:()=>Xp,foundationTextFieldStyles:()=>Wp,foundationTextFieldTemplate:()=>qp,foundationToast:()=>sm,foundationToastShadowOptions:()=>im,foundationToastStyles:()=>Zp,foundationToastTemplate:()=>tm,foundationToolbar:()=>um,foundationToolbarShadowOptions:()=>dm,foundationToolbarStyles:()=>am,foundationToolbarTemplate:()=>rm,foundationTooltip:()=>fm,foundationTooltipShadowOptions:()=>vm,foundationTooltipStyles:()=>hm,foundationTooltipTemplate:()=>pm,foundationTreeItem:()=>$m,foundationTreeItemShadowOptions:()=>Cm,foundationTreeItemStyles:()=>bm,foundationTreeItemTemplate:()=>ym,foundationTreeView:()=>Dm,foundationTreeViewShadowOptions:()=>Tm,foundationTreeViewStyles:()=>Sm,foundationTreeViewTemplate:()=>Em,foundationUrlInput:()=>Mm,foundationUrlInputShadowOptions:()=>Lm,foundationUrlInputStyles:()=>Im,foundationUrlInputTemplate:()=>Am,foundationVerificationCodeInput:()=>Gm,foundationVerificationCodeInputShadowOptions:()=>Pm,foundationVerificationCodeInputStyles:()=>_m,foundationVerificationCodeInputTemplate:()=>Hm,fromBinaryExpression:()=>Sg,fromMethodExpression:()=>Eg,fuiAccentPalette:()=>Po,fuiAccentSwatch:()=>Ho,fuiCardFillColor:()=>Bo,fuiCardForegroundColor:()=>jo,fuiDefaultCardFillColor:()=>Ao,fuiDefaultCardPalette:()=>Lo,fuiFillColor:()=>Uo,fuiNeutralPalette:()=>Mo,fuiNeutralSwatch:()=>No,getBannerTemplate:()=>st,getBrowserLocale:()=>po,getCriteriaBuilder:()=>Ou,getDefaultConfig:()=>nn,getDesignSystemPrefix:()=>T,getDialogTemplate:()=>Tn,getDisplayFormatForLang:()=>mo,getDropdownMenuTemplate:()=>Kn,getErrorDialogTemplate:()=>Ls,getExports:()=>sn,getFontawesomeIconsCss:()=>wr,getNavItems:()=>uf,getPrefixedCategorizedMultiselect:()=>Vt,getPrefixedCronBuilder:()=>su,getPrefixedDatePicker:()=>co,getPrefixedErrorBanner:()=>ps,getPrefixedFileReader:()=>Us,getPrefixedFileUpload:()=>qs,getPrefixedFilterTemplate:()=>pa,getPrefixedFlyout:()=>Va,getPrefixedIcon:()=>xr,getPrefixedMultiselect:()=>cl,getPrefixedScheduler:()=>ac,getPrefixedSchedulerTimezone:()=>hu,getPrefixedSearchBar:()=>Cu,getPrefixedSnackbar:()=>Hh,getPrefixedStepper:()=>ff,getPrefixedStepperTab:()=>Zh,getPrefixedToast:()=>em,getPrefixedUrlInput:()=>Rm,getTypeRampValue:()=>an,groupsToCriteria:()=>X,hasDateValue:()=>go,inputControls:()=>Hc,installAlertFlashClock:()=>wp,isAbsoluteUrl:()=>Zg,jsonConverter:()=>Md,mapType:()=>wa,maxheight:()=>rl,media:()=>je,menuTemplate:()=>k,mixinFoundationFontFamily:()=>fn,months:()=>bc,multiselectStyles:()=>ll,multiselectTemplate:()=>ul,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>Go,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralPaletteValue:()=>un,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,optionsMaxheight:()=>Ut,paletteFromHex:()=>en,parseDatePickerValue:()=>bo,pathJoin:()=>nf,pillStyles:()=>kd,plusIcon:()=>wu,provideDesignSystem:()=>yd,provideTokens:()=>Jo,rebuildOperator:()=>$g,registerFoundationDesignSystem:()=>Df,removeChildRouteParameter:()=>af,removeLastPathSegment:()=>sf,resolveDayjsLocale:()=>ho,routerLogger:()=>jg,routerProperty:()=>Kg,ruleExpressionToGroup:()=>Og,ruleToRuleExpression:()=>Cg,ruleToRuleMethodExpression:()=>wg,schedulerCronBuilderStyles:()=>Pc,schedulerStyles:()=>sc,schedulerTimezoneStyles:()=>uu,selectCustomToken:()=>ln,sharedFieldStyles:()=>Cl,singleOptionTemplate:()=>D,statusPillStyles:()=>Wh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>Zo,tagFor:()=>Pg,toIntlNumberFormat:()=>Ll,transformOperatorNameToServerName:()=>yg,transformServerNameToOperatorName:()=>xg,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight,uploadFiles:()=>Js,validateClauses:()=>ce,validateGroups:()=>ue,weekNumber:()=>fc,white:()=>To});var o={};i.r(o),i.d(o,{accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,bodyFont:()=>r.bodyFont,controlCornerRadius:()=>r.controlCornerRadius,defaultNeutralForegroundContrast:()=>Vo,density:()=>r.density,designUnit:()=>r.designUnit,direction:()=>r.direction,disabledOpacity:()=>r.disabledOpacity,fillColor:()=>r.fillColor,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,fuiCardFillColor:()=>Bo,fuiCardForegroundColor:()=>jo,fuiFillColor:()=>Uo,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>Go,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,strokeWidth:()=>r.strokeWidth,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight});var n={};i.r(n),i.d(n,{accentPaletteValue:()=>cn,baseLayerLuminanceValue:()=>hn,controlCornerRadiusValue:()=>mn,designUnitValue:()=>vn,directionValue:()=>pn,neutralPaletteValue:()=>un});var s={};i.r(s),i.d(s,{BASE_LOGICAL_COMBINATORS:()=>qm,BASE_OPERATORS:()=>ev,LOGICAL_COMBINATORS:()=>Km,NULL_COMBINATOR:()=>Xm});var a=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
|
|
1
|
+
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[966],{8420(e,t,i){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),o={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}};return i.default.locale(o,null,!0),o}(i(94343))},58915(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,n=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},r=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],c=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var i,o=a.meridiem;if(o){for(var n=1;n<=24;n+=1)if(e.indexOf(o(n,0,t))>-1){i=n>12;break}}else i=e===(t?"pm":"PM");return i},h={A:[s,function(e){this.afternoon=u(e,!1)}],a:[s,function(e){this.afternoon=u(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[o,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,l("seconds")],ss:[n,l("seconds")],m:[n,l("minutes")],mm:[n,l("minutes")],H:[n,l("hours")],h:[n,l("hours")],HH:[n,l("hours")],hh:[n,l("hours")],D:[n,l("day")],DD:[o,l("day")],Do:[s,function(e){var t=a.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var o=1;o<=31;o+=1)t(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[n,l("week")],ww:[o,l("week")],M:[n,l("month")],MM:[o,l("month")],MMM:[s,function(e){var t=c("months"),i=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[s,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[o,function(e){this.year=r(e)}],YYYY:[/\d{4}/,l("year")],Z:d,ZZ:d};function p(i){var o,n;o=i,n=a&&a.formats;for(var s=(i=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,o){var s=o&&o.toUpperCase();return i||n[o]||e[o]||n[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),r=s.length,l=0;l<r;l+=1){var d=s[l],c=h[d],u=c&&c[0],p=c&&c[1];s[l]=p?{regex:u,parser:p}:d.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,o=0;i<r;i+=1){var n=s[i];if("string"==typeof n)o+=n.length;else{var a=n.regex,l=n.parser,d=e.slice(o),c=a.exec(d)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(r=e.parseTwoDigitYear);var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date,o=e.utc,s=e.args;this.$u=o;var r=s[1];if("string"==typeof r){var l=!0===s[2],d=!0===s[3],c=l||d,u=s[2];d&&(u=s[2]),a=this.$locale(),!l&&u&&(a=i.Ls[u]),this.$d=function(e,t,i,o){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var n=p(t)(e),s=n.year,a=n.month,r=n.day,l=n.hours,d=n.minutes,c=n.seconds,u=n.milliseconds,h=n.zone,m=n.week,g=new Date,v=r||(s||a?1:g.getDate()),f=s||g.getFullYear(),b=0;s&&!a||(b=a>0?a-1:g.getMonth());var y,w=l||0,C=d||0,x=c||0,$=u||0;return h?new Date(Date.UTC(f,b,v,w,C,x,$+60*h.offset*1e3)):i?new Date(Date.UTC(f,b,v,w,C,x,$)):(y=new Date(f,b,v,w,C,x,$),m&&(y=o(y).week(m).toDate()),y)}catch(e){return new Date("")}}(t,r,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),c&&t!=this.format(r)&&(this.$d=new Date("")),a={}}else if(r instanceof Array)for(var h=r.length,m=1;m<=h;m+=1){s[1]=r[m-1];var g=i.apply(this,s);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}m===h&&(this.$d=new Date(""))}else n.call(this,e)}}}()},33839(e){e.exports=function(){"use strict";return function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}}()},7554(e){e.exports=function(){"use strict";return function(e,t,i){var o=t.prototype,n=function(e){return e&&(e.indexOf?e:e.s)},s=function(e,t,i,o,s){var a=e.name?e:e.$locale(),r=n(a[t]),l=n(a[i]),d=r||l.map(function(e){return e.slice(0,o)});if(!s)return d;var c=a.weekStart;return d.map(function(e,t){return d[(t+(c||0))%7]})},a=function(){return i.Ls[i.locale()]},r=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})}(e.formats[t.toUpperCase()])},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):s(e,"months")},monthsShort:function(t){return t?t.format("MMM"):s(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):s(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):s(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):s(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return r(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return l.bind(this)()},i.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return r(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return s(a(),"months")},i.monthsShort=function(){return s(a(),"monthsShort","months",3)},i.weekdays=function(e){return s(a(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return s(a(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return s(a(),"weekdaysMin","weekdays",2,e)}}}()},49916(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,i,o){var n=i.prototype,s=n.format;o.en.formats=e,n.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,o=function(t,i){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,o,n){var s=n&&n.toUpperCase();return o||i[n]||e[n]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(t,void 0===i?{}:i);return s.call(this,o)}}}()},57565(e){e.exports=a,a.default=a,a.stable=c,a.stableStringify=c;var t="[...]",i="[Circular]",o=[],n=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,i,a){var r;void 0===a&&(a=s()),l(e,"",0,[],void 0,0,a);try{r=0===n.length?JSON.stringify(e,t,i):JSON.stringify(e,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function r(e,t,i,s){var a=Object.getOwnPropertyDescriptor(s,i);void 0!==a.get?a.configurable?(Object.defineProperty(s,i,{value:e}),o.push([s,i,t,a])):n.push([t,i,e]):(s[i]=e,o.push([s,i,t]))}function l(e,o,n,s,a,d,c){var u;if(d+=1,"object"==typeof e&&null!==e){for(u=0;u<s.length;u++)if(s[u]===e)return void r(i,e,o,a);if(void 0!==c.depthLimit&&d>c.depthLimit)return void r(t,e,o,a);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void r(t,e,o,a);if(s.push(e),Array.isArray(e))for(u=0;u<e.length;u++)l(e[u],u,u,s,e,d,c);else{var h=Object.keys(e);for(u=0;u<h.length;u++){var p=h[u];l(e[p],p,u,s,e,d,c)}}s.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function c(e,t,i,a){void 0===a&&(a=s());var r,l=u(e,"",0,[],void 0,0,a)||e;try{r=0===n.length?JSON.stringify(l,t,i):JSON.stringify(l,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function u(e,n,s,a,l,c,h){var p;if(c+=1,"object"==typeof e&&null!==e){for(p=0;p<a.length;p++)if(a[p]===e)return void r(i,e,n,l);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&c>h.depthLimit)return void r(t,e,n,l);if(void 0!==h.edgesLimit&&s+1>h.edgesLimit)return void r(t,e,n,l);if(a.push(e),Array.isArray(e))for(p=0;p<e.length;p++)u(e[p],p,p,a,e,c,h);else{var m={},g=Object.keys(e).sort(d);for(p=0;p<g.length;p++){var v=g[p];u(e[v],v,p,a,e,c,h),m[v]=e[v]}if(void 0===l)return m;o.push([l,n,e]),l[n]=m}a.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,i){if(n.length>0)for(var o=0;o<n.length;o++){var s=n[o];if(s[1]===t&&s[0]===i){i=s[2],n.splice(o,1);break}}return e.call(this,t,i)}}},93678(e){"use strict";function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles)return function(e){const i=[],o=[],n=new Map;if(n.set(Date,e=>new Date(e)),n.set(Map,(e,t)=>new Map(a(Array.from(e),t))),n.set(Set,(e,t)=>new Set(a(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)n.set(t[0],t[1]);let s=null;return e.proto?l:r;function a(e,a){const r=Object.keys(e),l=new Array(r.length);for(let d=0;d<r.length;d++){const c=r[d],u=e[c];if("object"!=typeof u||null===u)l[c]=u;else if(u.constructor!==Object&&(s=n.get(u.constructor)))l[c]=s(u,a);else if(ArrayBuffer.isView(u))l[c]=t(u);else{const e=i.indexOf(u);l[c]=-1!==e?o[e]:a(u)}}return l}function r(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,r);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,r);const l={};i.push(e),o.push(l);for(const a in e){if(!1===Object.hasOwnProperty.call(e,a))continue;const d=e[a];if("object"!=typeof d||null===d)l[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))l[a]=s(d,r);else if(ArrayBuffer.isView(d))l[a]=t(d);else{const e=i.indexOf(d);l[a]=-1!==e?o[e]:r(d)}}return i.pop(),o.pop(),l}function l(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,l);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,l);const r={};i.push(e),o.push(r);for(const a in e){const d=e[a];if("object"!=typeof d||null===d)r[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))r[a]=s(d,l);else if(ArrayBuffer.isView(d))r[a]=t(d);else{const e=i.indexOf(d);r[a]=-1!==e?o[e]:l(d)}}return i.pop(),o.pop(),r}}(e);const i=new Map;if(i.set(Date,e=>new Date(e)),i.set(Map,(e,t)=>new Map(n(Array.from(e),t))),i.set(Set,(e,t)=>new Set(n(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)i.set(t[0],t[1]);let o=null;return e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a}:function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){if(!1===Object.hasOwnProperty.call(s,n))continue;const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a};function n(e,n){const s=Object.keys(e),a=new Array(s.length);for(let r=0;r<s.length;r++){const l=s[r],d=e[l];"object"!=typeof d||null===d?a[l]=d:d.constructor!==Object&&(o=i.get(d.constructor))?a[l]=o(d,n):ArrayBuffer.isView(d)?a[l]=t(d):a[l]=n(d)}return a}}},31274(e,t,i){"use strict";i.d(t,{u:()=>n});var o=i(60416);const n=(e,t,i)=>{(0,o.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-dialog`),a=i?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(i):(0,o.jE)("dialog-container",t);a.appendChild(s),s.notification=e,s.show()}},60416(e,t,i){"use strict";i.d(t,{cL:()=>h,jE:()=>u,uP:()=>d,u_:()=>c});var o=i(66506),n=i(52945),s=i(68424);const a=(0,o.createLogger)("foundation-notifications");let r=null;const l=new Map,d=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},c=e=>{var t,i;a.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.logLevel)||o.LogLevels.debug)})},u=(e,t)=>{let i=document.querySelector(`#${e}`);if(!i)if(l.has(e))i=l.get(e);else{const t=(0,n.fI)(document).find(t=>t.id===e);t&&(i=t,l.set(e,t))}if(!i){i=document.createElement("div"),i.setAttribute("id",e),i.style.zIndex="9999";const{element:t,prefix:o}=(0,s.DW)(document.body,"rapid");if(t)t.appendChild(i),r=t;else if(r)r.appendChild(i);else{const e=document.createElement(`${o}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),r=e}}return i},h=e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return p()},p=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},78966(e,t,i){"use strict";i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>R,AffixMixin:()=>wl,AiCriteriaSearch:()=>$e,AiIndicator:()=>De,Anchor:()=>Le,AnchoredRegion:()=>Pe,Avatar:()=>Ye,BASE_EDITABLE_ELEMENT_SELECTORS:()=>Df,Badge:()=>Qe,Banner:()=>lt,BaseDatasource:()=>gi,BaseFileComponent:()=>Hs,Breadcrumb:()=>ht,BreadcrumbItem:()=>bt,Button:()=>St,COMBO_INPUT_MIN_LENGTH:()=>Du,CRON_LENGTH:()=>Ec,CSSVarsTokenMapper:()=>Xm,Calendar:()=>It,Card:()=>Mt,CategorizedMultiselect:()=>Wt,Checkbox:()=>Jt,Combobox:()=>$i,ConnectionIndicator:()=>Ii,CronBuilderEvents:()=>Rc,DATETIME_OPERATORS:()=>ee,DATE_OPERATORS:()=>Z,DATE_PICKER_VALUE_FORMAT:()=>fo,DEFUALT_FILTER_BAR_COLUMNS:()=>Sa,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Rf,DataGrid:()=>Fi,DataGridCell:()=>Pi,DataGridDatasource:()=>Jm,DataGridRow:()=>Gi,DateOrDay:()=>yc,DatePicker:()=>So,DefaultRouter:()=>tf,DesignTokensObservable:()=>Ko,Dialog:()=>An,DialogElement:()=>Rn,Disclosure:()=>Mn,Divider:()=>Bn,DropdownMenu:()=>Jn,EnvironmentIndicator:()=>us,ErrorBanner:()=>vs,ErrorBoundary:()=>Is,ErrorBoundaryEvent:()=>bs,ErrorDialog:()=>Ms,ExpressionBuilderConfig:()=>s,ExpressionBuilderCore:()=>gv,FaPrefixFromStyle:()=>Or,FileReader:()=>Vs,FileUpload:()=>oa,Filter:()=>va,FilterBar:()=>Ea,FilterEvents:()=>ga,FlexLayout:()=>La,FlexMediaQueriesEnum:()=>Ta,Flipper:()=>_a,Flyout:()=>ja,FoundationDesignSystemProvider:()=>Cn,FoundationExpressionBuilder:()=>ev,FoundationRouteCollection:()=>vf,FoundationRouteNav:()=>hf,FoundationRouter:()=>wf,FoundationRouterConfiguration:()=>ff,FoundationRuleExpressionBuilder:()=>Rv,FoundationValueExpressionBuilder:()=>_v,GenerateNavigationPathEventType:()=>yf,GridLayout:()=>ir,GridLayoutItem:()=>rr,GridMediaQueriesEnum:()=>Ka,HorizontalScroll:()=>ur,INPUT_MIN_LENGTH:()=>ku,Icon:()=>Dr,Listbox:()=>Lr,ListboxOption:()=>Pr,MAX_DAYS:()=>Sc,MAX_HOURS:()=>Tc,MAX_MINS_SEC:()=>kc,MAX_MINUTE_RECURRENCE:()=>Ic,MAX_MONTHS:()=>$c,MAX_WEEK_DAYS:()=>Oc,MAX_WEEK_NUMBER:()=>Dc,Menu:()=>jr,MenuItem:()=>Jr,Modal:()=>sl,Multiselect:()=>ml,MultiselectDatasource:()=>dl,NUMERIC_OPERATORS:()=>Q,NavigateToEventType:()=>bf,NotificationListener:()=>zv,NumberField:()=>Vl,OPERATOR_DISPLAY_LABEL:()=>te,Optgroup:()=>Kl,OptionsDatasource:()=>bi,Pill:()=>_d,Popper:()=>Ud,Position:()=>zt,Progress:()=>bd,ProgressRing:()=>Wd,Radio:()=>Zd,RadioGroup:()=>sc,RecurrenceType:()=>fc,Router:()=>ef,RuleExpression:()=>vv,SCROLL_TIMEOUT:()=>Tu,SECTION_NAVIGATOR_EVENTS:()=>Yu,SNACKBAR_CLOSE_TIMEOUT:()=>Ph,SNACKBAR_EVENTS_NAMES:()=>zh,SNACKBAR_TYPES:()=>Hh,SNACKBAR_TYPE_DEFAULT:()=>_h,STRING_OPERATORS:()=>J,Scheduler:()=>hc,SchedulerCronBuilder:()=>uu,SchedulerTimezone:()=>bu,SearchBar:()=>Ru,SearchBarCombobox:()=>Hu,SectionNavigator:()=>Ku,SegmentedControl:()=>th,SegmentedItem:()=>rh,Select:()=>ph,Skeleton:()=>yh,Slider:()=>Th,SliderLabel:()=>Lh,Snackbar:()=>jh,StackingIcons:()=>Kh,StatusPill:()=>ep,Stepper:()=>Sf,StepperTab:()=>sp,StepperTabPanel:()=>cp,Switch:()=>vp,SystemHealthOverlay:()=>Od,Tab:()=>Tp,TabPanel:()=>Lp,Tabs:()=>Pp,TextArea:()=>jp,TextField:()=>Zp,Toast:()=>lm,Toolbar:()=>hm,Tooltip:()=>bm,TreeItem:()=>Sm,TreeView:()=>Im,UrlInput:()=>Pm,VerificationCodeInput:()=>Wm,WeekType:()=>bc,accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,accentPaletteValue:()=>cn,actionsMenuBaseStyles:()=>$,alertFlashDurationProperty:()=>Cp,alertFlashPhaseProperty:()=>wp,applyCustomTokens:()=>tn,baseComponents:()=>Km,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>hn,black:()=>ko,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>Af,categorizedMultiselectStyles:()=>Bt,categorizedMultiselectTemplate:()=>Gt,clientOperators:()=>bv,closeIcon:()=>la,configureDesignSystem:()=>dn,configureEnvironmentIndicator:()=>ds,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>mn,createDesignSystemProxy:()=>xd,createFormData:()=>Xs,crossIcon:()=>$u,daysOfWeek:()=>wc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>Ee,defaultAnchorConfig:()=>Ne,defaultAnchoredRegionConfig:()=>Ue,defaultAvatarConfig:()=>qe,defaultBadgeConfig:()=>et,defaultBreadcrumbConfig:()=>mt,defaultBreadcrumbItemConfig:()=>wt,defaultButtonConfig:()=>Ot,defaultCalendarConfig:()=>At,defaultCardConfig:()=>Ht,defaultCategorizedMultiselectConfig:()=>Yt,defaultCheckboxConfig:()=>Zt,defaultComboboxConfig:()=>Ei,defaultConfig:()=>mc,defaultCronBuilderConfig:()=>pu,defaultDataGridCellConfig:()=>Ui,defaultDataGridConfig:()=>Mi,defaultDataGridRowConfig:()=>Yi,defaultDatePickerConfig:()=>$o,defaultDialogConfig:()=>In,defaultDisclosureConfig:()=>Hn,defaultDividerConfig:()=>Gn,defaultFileUploadConfig:()=>sa,defaultFillColor:()=>Io,defaultFlexLayoutConfig:()=>Aa,defaultFlipperConfig:()=>Pa,defaultFlyoutConfig:()=>Wa,defaultGridLayoutConfig:()=>er,defaultGridLayoutItemConfig:()=>ar,defaultHorizontalScrollConfig:()=>pr,defaultIconConfig:()=>Er,defaultListboxConfig:()=>Nr,defaultListboxOptionConfig:()=>Ur,defaultMenuConfig:()=>Wr,defaultMenuItemConfig:()=>Zr,defaultModalConfig:()=>nl,defaultMultiselectConfig:()=>pl,defaultNavItemPredicate:()=>pf,defaultNeutralForegroundContrast:()=>Vo,defaultNumberFieldConfig:()=>jl,defaultPillConfig:()=>Md,defaultPlacementIndexPadding:()=>mf,defaultProgressConfig:()=>wd,defaultProgressRingConfig:()=>Kd,defaultRadioConfig:()=>tc,defaultRadioGroupConfig:()=>rc,defaultSearchBarComboboxConfig:()=>zu,defaultSearchBarConfig:()=>Lu,defaultSectionNavigatorConfig:()=>Ju,defaultSegmentedControlConfig:()=>oh,defaultSegmentedItemConfig:()=>dh,defaultSelectConfig:()=>gh,defaultSkeletonConfig:()=>Ch,defaultSliderConfig:()=>Dh,defaultSliderLabelConfig:()=>Nh,defaultStepperConfig:()=>Of,defaultStepperTabConfig:()=>rp,defaultStepperTabPanelConfig:()=>hp,defaultSwitchConfig:()=>bp,defaultSystemHealthOverlayConfig:()=>Id,defaultTabConfig:()=>Dp,defaultTabPanelConfig:()=>Np,defaultTabsConfig:()=>Up,defaultTextAreaConfig:()=>Wp,defaultTextFieldConfig:()=>tm,defaultTimezoneConfig:()=>wu,defaultToastConfig:()=>rm,defaultToolbarConfig:()=>mm,defaultTooltipConfig:()=>wm,defaultTreeItemConfig:()=>Om,defaultTreeViewConfig:()=>Am,defaultUrlInputConfig:()=>Hm,defaultVerificationCodeInputConfig:()=>Gm,defineFactory:()=>Bv,density:()=>r.density,designToken:()=>Qo,designTokensMap:()=>rn,designUnit:()=>r.designUnit,designUnitValue:()=>gn,direction:()=>r.direction,directionValue:()=>pn,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>Qs,dropdownMenuBaseStyles:()=>Yn,environmentIndicatorStyles:()=>es,errorDialogTemplate:()=>Fs,extractMenuItems:()=>qn,faSizeValueDefault:()=>Tr,faSizeValues:()=>kr,fileReaderStyles:()=>Ps,fileReaderTemplate:()=>Bs,fillColor:()=>r.fillColor,filterBarTemplate:()=>xa,findParentRouter:()=>af,findRouter:()=>sf,findTopLevelRouter:()=>rf,flyoutAnimationTime:()=>Ua,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,formatTimeForCountDown:()=>Zh,formatToPlaceholder:()=>go,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>g,foundationAccordionItemTemplate:()=>v,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>A,foundationActionsMenuStyles:()=>S,foundationActionsMenuTemplate:()=>I,foundationAiCriteriaSearch:()=>Oe,foundationAiCriteriaSearchShadowOptions:()=>Se,foundationAiCriteriaSearchStyles:()=>_,foundationAiCriteriaSearchTemplate:()=>B,foundationAiIndicator:()=>Ie,foundationAiIndicatorStyles:()=>Te,foundationAiIndicatorTemplate:()=>ke,foundationAnchor:()=>Me,foundationAnchorShadowOptions:()=>Fe,foundationAnchorStyles:()=>Re,foundationAnchorTemplate:()=>Ae,foundationAnchoredRegion:()=>Be,foundationAnchoredRegionShadowOptions:()=>ze,foundationAnchoredRegionStyles:()=>He,foundationAnchoredRegionTemplate:()=>_e,foundationAvatar:()=>Ke,foundationAvatarShadowOptions:()=>We,foundationAvatarStyles:()=>Ve,foundationAvatarTemplate:()=>Ge,foundationBadge:()=>tt,foundationBadgeShadowOptions:()=>Ze,foundationBadgeStyles:()=>Xe,foundationBadgeTemplate:()=>Je,foundationBanner:()=>dt,foundationBannerShadowOptions:()=>rt,foundationBannerStyles:()=>nt,foundationBannerTemplate:()=>at,foundationBreadcrumb:()=>gt,foundationBreadcrumbItem:()=>Ct,foundationBreadcrumbItemShadowOptions:()=>yt,foundationBreadcrumbItemStyles:()=>vt,foundationBreadcrumbItemTemplate:()=>ft,foundationBreadcrumbShadowOptions:()=>pt,foundationBreadcrumbStyles:()=>ct,foundationBreadcrumbTemplate:()=>ut,foundationButton:()=>Tt,foundationButtonShadowOptions:()=>Et,foundationButtonStyles:()=>xt,foundationButtonTemplate:()=>$t,foundationCalendar:()=>Lt,foundationCalendarShadowOptions:()=>Rt,foundationCalendarStyles:()=>kt,foundationCalendarTemplate:()=>Dt,foundationCard:()=>Pt,foundationCardShadowOptions:()=>_t,foundationCardStyles:()=>Ft,foundationCardTemplate:()=>Nt,foundationCategorizedMultiselect:()=>qt,foundationCategorizedMultiselectShadowOptions:()=>jt,foundationCheckbox:()=>ei,foundationCheckboxShadowOptions:()=>Qt,foundationCheckboxStyles:()=>Kt,foundationCheckboxTemplate:()=>Xt,foundationCombobox:()=>Oi,foundationComboboxShadowOptions:()=>Si,foundationComboboxStyles:()=>yi,foundationComboboxTemplate:()=>wi,foundationConnectionIndicator:()=>Ri,foundationConnectionIndicatorStyles:()=>ki,foundationConnectionIndicatorTemplate:()=>Di,foundationDataGrid:()=>_i,foundationDataGridCell:()=>Bi,foundationDataGridCellShadowOptions:()=>zi,foundationDataGridCellStyles:()=>Hi,foundationDataGridCellTemplate:()=>a.dataGridCellTemplate,foundationDataGridRow:()=>Wi,foundationDataGridRowShadowOptions:()=>ji,foundationDataGridRowStyles:()=>Vi,foundationDataGridRowTemplate:()=>a.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Ni,foundationDataGridStyles:()=>Ai,foundationDataGridTemplate:()=>Li,foundationDatePicker:()=>Eo,foundationDatePickerShadowOptions:()=>xo,foundationDatePickerStyles:()=>ro,foundationDatePickerTemplate:()=>uo,foundationDesignSystemProvider:()=>xn,foundationDialog:()=>Ln,foundationDialogShadowOptions:()=>Dn,foundationDialogStyles:()=>Sn,foundationDialogTemplate:()=>kn,foundationDisclosure:()=>Pn,foundationDisclosureShadowOptions:()=>_n,foundationDisclosureStyles:()=>Fn,foundationDisclosureTemplate:()=>Nn,foundationDivider:()=>jn,foundationDividerShadowOptions:()=>Vn,foundationDividerStyles:()=>zn,foundationDividerTemplate:()=>Un,foundationDropdownMenu:()=>Qn,foundationDropdownMenuStyles:()=>Wn,foundationDropdownMenuTemplate:()=>Xn,foundationEnvironmentIndicator:()=>hs,foundationEnvironmentIndicatorTemplate:()=>ts,foundationErrorBanner:()=>fs,foundationErrorBannerShadowOptions:()=>gs,foundationErrorBannerTemplate:()=>ms,foundationErrorBoundary:()=>Rs,foundationErrorBoundaryShadowOptions:()=>Ds,foundationErrorBoundaryTemplate:()=>ks,foundationErrorDialog:()=>_s,foundationErrorDialogShadowOptions:()=>Ns,foundationErrorDialogStyles:()=>As,foundationFileReader:()=>Gs,foundationFileReaderStyles:()=>zs,foundationFileUpload:()=>aa,foundationFileUploadShadowOptions:()=>na,foundationFileUploadStyles:()=>Ws,foundationFileUploadTemplate:()=>Ks,foundationFilter:()=>fa,foundationFilterBar:()=>Oa,foundationFilterBarStyles:()=>ya,foundationFilterBarTemplate:()=>$a,foundationFilterStyles:()=>ra,foundationFilterTemplate:()=>ma,foundationFlexLayout:()=>Fa,foundationFlexLayoutShadowOptions:()=>Ra,foundationFlexLayoutStyles:()=>Da,foundationFlexLayoutTemplate:()=>Ia,foundationFlipper:()=>za,foundationFlipperShadowOptions:()=>Ha,foundationFlipperStyles:()=>Na,foundationFlipperTemplate:()=>Ma,foundationFlyout:()=>qa,foundationFlyoutShadowOptions:()=>Ya,foundationFlyoutStyles:()=>Ba,foundationFlyoutTemplate:()=>Ga,foundationGridLayout:()=>or,foundationGridLayoutItem:()=>lr,foundationGridLayoutItemShadowOptions:()=>sr,foundationGridLayoutItemTemplate:()=>nr,foundationGridLayoutShadowOptions:()=>Za,foundationGridLayoutStyles:()=>Ja,foundationGridLayoutTemplate:()=>Qa,foundationHorizontalScroll:()=>mr,foundationHorizontalScrollShadowOptions:()=>hr,foundationHorizontalScrollStyles:()=>dr,foundationHorizontalScrollTemplate:()=>cr,foundationIcon:()=>Ir,foundationIconShadowOptions:()=>Sr,foundationIconStyles:()=>Cr,foundationIconTemplate:()=>$r,foundationListbox:()=>Mr,foundationListboxOption:()=>Br,foundationListboxOptionShadowOptions:()=>zr,foundationListboxOptionStyles:()=>_r,foundationListboxOptionTemplate:()=>Hr,foundationListboxShadowOptions:()=>Fr,foundationListboxStyles:()=>Rr,foundationListboxTemplate:()=>Ar,foundationMenu:()=>qr,foundationMenuItem:()=>el,foundationMenuItemShadowOptions:()=>Qr,foundationMenuItemStyles:()=>Kr,foundationMenuItemTemplate:()=>Xr,foundationMenuShadowOptions:()=>Yr,foundationMenuStyles:()=>Vr,foundationMenuTemplate:()=>Gr,foundationModal:()=>al,foundationModalShadowOptions:()=>ol,foundationModalStyles:()=>tl,foundationModalTemplate:()=>il,foundationMultiselect:()=>gl,foundationMultiselectShadowOptions:()=>hl,foundationNotificationListener:()=>Uv,foundationNotificationListenerShadowOptions:()=>Pv,foundationNotificationListenerTemplate:()=>Hv,foundationNumberField:()=>Yl,foundationNumberFieldShadowOptions:()=>Gl,foundationNumberFieldStyles:()=>xl,foundationNumberFieldTemplate:()=>$l,foundationOptgroup:()=>Xl,foundationOptgroupStyles:()=>Wl,foundationOptgroupTemplate:()=>ql,foundationPill:()=>Hd,foundationPillShadowOptions:()=>Nd,foundationPillTemplate:()=>Fd,foundationPopper:()=>Gd,foundationProgress:()=>Cd,foundationProgressRing:()=>Xd,foundationProgressRingShadowOptions:()=>qd,foundationProgressRingStyles:()=>jd,foundationProgressRingTemplate:()=>Yd,foundationProgressShadowOptions:()=>yd,foundationProgressStyles:()=>vd,foundationProgressTemplate:()=>fd,foundationRadio:()=>ic,foundationRadioGroup:()=>lc,foundationRadioGroupShadowOptions:()=>ac,foundationRadioGroupStyles:()=>oc,foundationRadioGroupTemplate:()=>nc,foundationRadioShadowOptions:()=>ec,foundationRadioStyles:()=>Jd,foundationRadioTemplate:()=>Qd,foundationScheduler:()=>gc,foundationSchedulerCronBuilder:()=>mu,foundationSchedulerCronBuilderShadowOptions:()=>hu,foundationSchedulerCronBuilderTemplate:()=>cu,foundationSchedulerShadowOptions:()=>pc,foundationSchedulerTemplate:()=>uc,foundationSchedulerTimezone:()=>Cu,foundationSchedulerTimezoneShadowOptions:()=>yu,foundationSchedulerTimezoneTemplate:()=>fu,foundationSearchBar:()=>Fu,foundationSearchBarCombobox:()=>Uu,foundationSearchBarComboboxShadowOptions:()=>Pu,foundationSearchBarComboboxStyles:()=>Nu,foundationSearchBarComboboxTemplate:()=>Mu,foundationSearchBarShadowOptions:()=>Au,foundationSearchBarStyles:()=>xu,foundationSearchBarTemplate:()=>Ou,foundationSectionNavigator:()=>Qu,foundationSectionNavigatorShadowOptions:()=>Xu,foundationSectionNavigatorStyles:()=>Bu,foundationSectionNavigatorTemplate:()=>Vu,foundationSegmentedControl:()=>nh,foundationSegmentedControlShadowOptions:()=>ih,foundationSegmentedControlStyles:()=>Zu,foundationSegmentedControlTemplate:()=>eh,foundationSegmentedItem:()=>ch,foundationSegmentedItemShadowOptions:()=>lh,foundationSegmentedItemStyles:()=>sh,foundationSegmentedItemTemplate:()=>ah,foundationSelect:()=>vh,foundationSelectShadowOptions:()=>mh,foundationSelectStyles:()=>uh,foundationSelectTemplate:()=>hh,foundationSkeleton:()=>xh,foundationSkeletonShadowOptions:()=>wh,foundationSkeletonStyles:()=>fh,foundationSkeletonTemplate:()=>bh,foundationSlider:()=>Ih,foundationSliderLabel:()=>Mh,foundationSliderLabelShadowOptions:()=>Fh,foundationSliderLabelStyles:()=>Rh,foundationSliderLabelTemplate:()=>Ah,foundationSliderShadowOptions:()=>kh,foundationSliderStyles:()=>$h,foundationSliderTemplate:()=>Oh,foundationSnackbar:()=>Yh,foundationSnackbarShadowOptions:()=>Gh,foundationSnackbarStyles:()=>Uh,foundationSnackbarTemplate:()=>Vh,foundationStackingIcons:()=>Xh,foundationStackingIconsStyles:()=>Wh,foundationStackingIconsTemplate:()=>qh,foundationStatusPill:()=>tp,foundationStatusPillTemplate:()=>Qh,foundationStepper:()=>Tf,foundationStepperShadowOptions:()=>Ef,foundationStepperStyles:()=>$f,foundationStepperTab:()=>lp,foundationStepperTabPanel:()=>pp,foundationStepperTabPanelShadowOptions:()=>up,foundationStepperTabPanelTemplate:()=>dp,foundationStepperTabShadowOptions:()=>ap,foundationStepperTabStyles:()=>ip,foundationStepperTabTemplate:()=>np,foundationStepperTemplate:()=>xf,foundationSwitch:()=>yp,foundationSwitchShadowOptions:()=>fp,foundationSwitchStyles:()=>mp,foundationSwitchTemplate:()=>gp,foundationSystemHealthOverlay:()=>Rd,foundationSystemHealthOverlayShadowOptions:()=>Dd,foundationSystemHealthOverlayStyles:()=>kd,foundationSystemHealthOverlayTemplate:()=>Td,foundationTab:()=>Ip,foundationTabPanel:()=>Mp,foundationTabPanelShadowOptions:()=>Fp,foundationTabPanelStyles:()=>Rp,foundationTabPanelTemplate:()=>Ap,foundationTabShadowOptions:()=>kp,foundationTabStyles:()=>Ep,foundationTabTemplate:()=>Op,foundationTabs:()=>Bp,foundationTabsShadowOptions:()=>zp,foundationTabsStyles:()=>_p,foundationTabsTemplate:()=>Hp,foundationTextArea:()=>qp,foundationTextAreaShadowOptions:()=>Yp,foundationTextAreaStyles:()=>Vp,foundationTextAreaTemplate:()=>Gp,foundationTextField:()=>im,foundationTextFieldShadowOptions:()=>em,foundationTextFieldStyles:()=>Jp,foundationTextFieldTemplate:()=>Qp,foundationToast:()=>dm,foundationToastShadowOptions:()=>am,foundationToastStyles:()=>om,foundationToastTemplate:()=>sm,foundationToolbar:()=>gm,foundationToolbarShadowOptions:()=>pm,foundationToolbarStyles:()=>cm,foundationToolbarTemplate:()=>um,foundationTooltip:()=>Cm,foundationTooltipShadowOptions:()=>ym,foundationTooltipStyles:()=>vm,foundationTooltipTemplate:()=>fm,foundationTreeItem:()=>Tm,foundationTreeItemShadowOptions:()=>Em,foundationTreeItemStyles:()=>xm,foundationTreeItemTemplate:()=>$m,foundationTreeView:()=>Lm,foundationTreeViewShadowOptions:()=>Rm,foundationTreeViewStyles:()=>km,foundationTreeViewTemplate:()=>Dm,foundationUrlInput:()=>zm,foundationUrlInputShadowOptions:()=>_m,foundationUrlInputStyles:()=>Fm,foundationUrlInputTemplate:()=>Mm,foundationVerificationCodeInput:()=>qm,foundationVerificationCodeInputShadowOptions:()=>Vm,foundationVerificationCodeInputStyles:()=>Um,foundationVerificationCodeInputTemplate:()=>Bm,fromBinaryExpression:()=>kv,fromMethodExpression:()=>Dv,fuiAccentPalette:()=>Po,fuiAccentSwatch:()=>Ho,fuiCardFillColor:()=>Bo,fuiCardForegroundColor:()=>jo,fuiDefaultCardFillColor:()=>Ao,fuiDefaultCardPalette:()=>Lo,fuiFillColor:()=>Uo,fuiNeutralPalette:()=>Mo,fuiNeutralSwatch:()=>No,getBannerTemplate:()=>st,getBrowserLocale:()=>po,getCriteriaBuilder:()=>Iu,getDefaultConfig:()=>nn,getDesignSystemPrefix:()=>T,getDialogTemplate:()=>Tn,getDisplayFormatForLang:()=>mo,getDropdownMenuTemplate:()=>Kn,getErrorDialogTemplate:()=>Ls,getExports:()=>sn,getFontawesomeIconsCss:()=>wr,getNavItems:()=>gf,getPrefixedCategorizedMultiselect:()=>Vt,getPrefixedCronBuilder:()=>du,getPrefixedDatePicker:()=>co,getPrefixedErrorBanner:()=>ps,getPrefixedFileReader:()=>Us,getPrefixedFileUpload:()=>qs,getPrefixedFilterTemplate:()=>pa,getPrefixedFlyout:()=>Va,getPrefixedIcon:()=>xr,getPrefixedMultiselect:()=>cl,getPrefixedScheduler:()=>cc,getPrefixedSchedulerTimezone:()=>vu,getPrefixedSearchBar:()=>Eu,getPrefixedSnackbar:()=>Bh,getPrefixedStepper:()=>Cf,getPrefixedStepperTab:()=>op,getPrefixedToast:()=>nm,getPrefixedUrlInput:()=>Nm,getTypeRampValue:()=>an,groupsToCriteria:()=>X,hasDateValue:()=>vo,inputControls:()=>Bc,installAlertFlashClock:()=>Sp,isAbsoluteUrl:()=>nf,jsonConverter:()=>zd,mapType:()=>wa,maxheight:()=>rl,media:()=>je,menuTemplate:()=>k,mixinFoundationFontFamily:()=>fn,months:()=>xc,multiselectStyles:()=>ll,multiselectTemplate:()=>ul,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>Go,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralPaletteValue:()=>un,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,optionsMaxheight:()=>Ut,paletteFromHex:()=>en,parseDatePickerValue:()=>bo,pathJoin:()=>lf,pillStyles:()=>Ad,plusIcon:()=>Su,provideDesignSystem:()=>$d,provideTokens:()=>Jo,rebuildOperator:()=>Tv,registerFoundationDesignSystem:()=>Lf,removeChildRouteParameter:()=>cf,removeLastPathSegment:()=>df,resolveDayjsLocale:()=>ho,routerLogger:()=>Kv,routerProperty:()=>Zv,ruleExpressionToGroup:()=>Iv,ruleToRuleExpression:()=>Ev,ruleToRuleMethodExpression:()=>Sv,schedulerCronBuilderStyles:()=>Vc,schedulerStyles:()=>dc,schedulerTimezoneStyles:()=>gu,selectCustomToken:()=>ln,sharedFieldStyles:()=>Cl,singleOptionTemplate:()=>D,statusPillStyles:()=>Jh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>Zo,tagFor:()=>Vv,toIntlNumberFormat:()=>_l,transformOperatorNameToServerName:()=>$v,transformServerNameToOperatorName:()=>Ov,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight,uploadFiles:()=>Js,validateClauses:()=>ce,validateGroups:()=>ue,weekNumber:()=>Cc,white:()=>To});var o={};i.r(o),i.d(o,{accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,bodyFont:()=>r.bodyFont,controlCornerRadius:()=>r.controlCornerRadius,defaultNeutralForegroundContrast:()=>Vo,density:()=>r.density,designUnit:()=>r.designUnit,direction:()=>r.direction,disabledOpacity:()=>r.disabledOpacity,fillColor:()=>r.fillColor,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,fuiCardFillColor:()=>Bo,fuiCardForegroundColor:()=>jo,fuiFillColor:()=>Uo,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>Go,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,strokeWidth:()=>r.strokeWidth,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight});var n={};i.r(n),i.d(n,{accentPaletteValue:()=>cn,baseLayerLuminanceValue:()=>hn,controlCornerRadiusValue:()=>mn,designUnitValue:()=>gn,directionValue:()=>pn,neutralPaletteValue:()=>un});var s={};i.r(s),i.d(s,{BASE_LOGICAL_COMBINATORS:()=>Qm,BASE_OPERATORS:()=>ng,LOGICAL_COMBINATORS:()=>Zm,NULL_COMBINATOR:()=>eg});var a=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
|
|
2
2
|
${(0,r.accordionStyles)(e,t)}
|
|
3
|
-
`,c=(e,t)=>(0,a.accordionTemplate)(e,t);class u extends a.Accordion{}const h={delegatesFocus:!0,mode:"open"},p={},m=u.compose(Object.assign({baseName:"accordion",template:c,styles:d,shadowOptions:h},p)),
|
|
3
|
+
`,c=(e,t)=>(0,a.accordionTemplate)(e,t);class u extends a.Accordion{}const h={delegatesFocus:!0,mode:"open"},p={},m=u.compose(Object.assign({baseName:"accordion",template:c,styles:d,shadowOptions:h},p)),g=(e,t)=>l.css`
|
|
4
4
|
${(0,r.accordionItemStyles)(e,t)}
|
|
5
5
|
|
|
6
6
|
slot[name='collapsed-icon'] {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
stroke: var(--accent-foreground-rest);
|
|
15
15
|
fill: none;
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
17
|
+
`,v=(e,t)=>(0,a.accordionItemTemplate)(e,t);class f extends r.AccordionItem{}const b={delegatesFocus:!0,mode:"open"},y={collapsedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="collapsed-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M9 5.44446V12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>',expandedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="expanded-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="minus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>'},w=f.compose(Object.assign({baseName:"accordion-item",template:v,styles:g,shadowOptions:b},y));var C=i(55823),x=i(31679);const $=(e,t)=>l.css`
|
|
18
18
|
:host {
|
|
19
19
|
--actions-opener-height-multiplier: 0.7px;
|
|
20
20
|
--actions-opener-bg-color: 249 254 255;
|
|
@@ -260,7 +260,7 @@
|
|
|
260
260
|
background: var(--neutral-fill-hover);
|
|
261
261
|
color: var(--neutral-foreground-rest);
|
|
262
262
|
}
|
|
263
|
-
`;var H=i(77679);let P=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(P="true"===GENX_ENABLE_AI)}catch(
|
|
263
|
+
`;var H=i(77679);let P=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(P="true"===GENX_ENABLE_AI)}catch(dd){}const z=()=>P||(0,H.m4)("ai");var U=i(40729);const B=l.html`
|
|
264
264
|
${e=>{return t=T(e),l.html`
|
|
265
265
|
${(0,l.when)(()=>z(),l.html`
|
|
266
266
|
<div class="ai-criteria-search">
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
</div>
|
|
335
335
|
`)}
|
|
336
336
|
`;var t}}
|
|
337
|
-
`;var V=i(95553),G=i(58749),j=i(14609),Y=i(86636);const W={contains:V.n.containsIgnoreCase,equals:V.n.EQ,startsWith:V.n.startsWith,endsWith:V.n.endsWith,greaterThan:V.n.GT,lessThan:V.n.LT,greaterThanOrEqual:V.n.GE,lessThanOrEqual:V.n.LE,notEqual:V.n.NE,dateIsToday:V.n.dateIsToday,dateIsAfter:V.n.dateIsGreaterEqual,dateIsGreaterEqual:V.n.dateIsGreaterEqual,dateIsBefore:V.n.dateIsLessEqual,dateIsLessEqual:V.n.dateIsLessEqual,dateIsEqual:V.n.dateIsEqual,dateTimeIsAfter:V.n.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:V.n.dateTimeIsGreaterEqual,dateTimeIsBefore:V.n.dateTimeIsLessEqual,dateTimeIsLessEqual:V.n.dateTimeIsLessEqual};function q(e){var t,i;const o=null!==(t=W[e.operator])&&void 0!==t?t:V.n.containsIgnoreCase;return(new G.K).withField(e.field).withValue(null!==(i=e.value)&&void 0!==i?i:null).withSerialiser(o).withGroup("default").build()}function K(e,t){return 1===e.length?e[0]:e.reduce((e,i,o)=>0===o?[i]:[...e,t,i],[])}function X(e){var t;const i=new j.b;let o=!1;for(const n of e){if(!(null===(t=n.clauses)||void 0===t?void 0:t.length))continue;const e=n.clauses.map(q),s="or"===n.logic?Y.r.Or():Y.r.And(),a=K(e,s),r=e.length>1?{join:s}:{};n.negated?i.And([Y.r.Not(),a]):i.And(1===e.length?e[0]:e,r),o=!0}return o?i.build():""}const J=["contains","equals","startsWith","endsWith","notEqual"],Q=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],Z=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],ee=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],te={contains:"contains",equals:"=",startsWith:"starts with",endsWith:"ends with",notEqual:"≠",greaterThan:">",lessThan:"<",greaterThanOrEqual:"≥",lessThanOrEqual:"≤",dateIsToday:"is today",dateIsAfter:"after",dateIsBefore:"before",dateIsEqual:"=",dateIsGreaterEqual:"≥",dateIsLessEqual:"≤",dateTimeIsAfter:"after",dateTimeIsBefore:"before",dateTimeIsGreaterEqual:"≥",dateTimeIsLessEqual:"≤"},ie=new Set(["DATE","LOCALDATE"]),oe=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),ne=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function se(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function ae(e){const t=se(e);return ie.has(t)?Z:oe.has(t)?ee:ne.has(t)?Q:J}function re(e){return ne.has(se(e))}function le(e){return null!=e&&("number"==typeof e?!Number.isNaN(e)&&e>0:"string"==typeof e&&(/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e)))}function de(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function ce(e,t){const i=[],o=[],n=new Map;if(Array.isArray(t)&&t.length>0){"string"==typeof t[0]?t.forEach(e=>n.set(e,void 0)):t.forEach(e=>n.set(e.NAME,e))}for(const t of e){const{field:e,operator:s,value:a}=t;if(!e||"string"!=typeof e){o.push({field:String(e),message:"Field name is required"});continue}const r=n.get(e),l=r&&"TYPE"in r?r.TYPE:"STRING";ae(l).includes(s)?!Z.includes(s)&&!ee.includes(s)||"dateIsToday"===s||le(a)?re(l)&&Q.includes(s)&&!de(a)?o.push({field:e,operator:s,value:a,message:"Invalid numeric value"}):n.size>0&&!n.has(e)?o.push({field:e,operator:s,value:a,message:`Unknown field '${e}'`}):i.push(t):o.push({field:e,operator:s,value:a,message:"Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch"}):o.push({field:e,operator:s,value:a,message:`Operator '${s}' is not allowed for field type ${l}`})}return{valid:i,invalid:o}}function ue(e,t){var i;const o=[],n=[];for(const s of e){if(!(null==s?void 0:s.clauses)||!Array.isArray(s.clauses)){n.push({field:"",message:"Group must have a clauses array"});continue}const{valid:e,invalid:a}=ce(s.clauses,t);n.push(...a),e.length>0&&o.push({logic:null!==(i=s.logic)&&void 0!==i?i:"and",negated:s.negated,clauses:e})}return{valid:o,invalid:n}}var he=i(60416);var pe,me,ve,ge=i(31274);!function(e){e.NOTIFICATION_EVENT="notification-event"}(pe||(pe={})),function(e){e.Top="top",e.Bottom="bottom"}(me||(me={})),function(e){e.Left="left",e.Right="right"}(ve||(ve={}));const fe="12px";var be=i(52945);const ye=(e,t,i)=>{var o,n,s,a,r,l,d,c,u,h,p,m,v,g,f,b,y,w,C;(0,he.u_)(e);const x=t.split("-")[0],$=(null===(n=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.toast)||void 0===n?void 0:n.position)||"top-right",S=null!==(s=null!=i?i:(e=>(0,be.fI)(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))($))&&void 0!==s?s:(0,he.jE)("notify-container",t);S&&"notify-container"!==S.tagName.toLowerCase()&&function(e,t){var i,o;switch(t.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.toast)||void 0===o?void 0:o.position){case"top-left":t.style.top="var(--nav-height, 0)",t.style.left="0";break;case"bottom-left":t.style.bottom="0",t.style.left="0";break;case"bottom-right":t.style.bottom="0",t.style.right="0";break;default:t.style.top="var(--nav-height, 0)",t.style.right="0"}}(e,S);const E=document.createElement(`${x}-toast`),O=document.createElement("div");O.setAttribute("slot","top"),O.textContent=e.title;const T=document.createElement("div");T.setAttribute("slot","content"),T.textContent=(null==e?void 0:e.body)||"";const k=document.createElement("div");let D;k.setAttribute("slot","date"),k.textContent=(null===(a=null==e?void 0:e.createdAt)||void 0===a?void 0:a.toLocaleTimeString())||"",(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.toast)||void 0===l?void 0:l.buttons)&&(null===(u=null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.toast)||void 0===c?void 0:c.buttons)||void 0===u?void 0:u.length)&&(D=document.createElement("div"),D.setAttribute("slot","bottom"),e.config.toast.buttons.forEach(t=>{const i=document.createElement(`${x}-button`);i.textContent=t.placeholder||"example placeholder",i.addEventListener("click",()=>{const{details:o}=e.config.toast;if(t.action)return t.action({details:o,buttonElement:i,toastElement:E})}),t.appearance&&i.setAttribute("appearance",t.appearance),D.appendChild(i)})),E.setAttribute("notify",(null===(p=null===(h=null==e?void 0:e.config)||void 0===h?void 0:h.toast)||void 0===p?void 0:p.type)||""),e.iconName&&E.setAttribute("notification-icon",e.iconName),(null===(v=null===(m=null==e?void 0:e.config)||void 0===m?void 0:m.toast)||void 0===v?void 0:v.autoClose)&&E.setAttribute("auto-close",`${null===(f=null===(g=null==e?void 0:e.config)||void 0===g?void 0:g.toast)||void 0===f?void 0:f.autoClose}`),(null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout)&&E.setAttribute("close-timeout",`${null===(C=null===(w=null==e?void 0:e.config)||void 0===w?void 0:w.toast)||void 0===C?void 0:C.closeTimeout}`),E.appendChild(O),E.appendChild(T),E.appendChild(k),D&&E.appendChild(D),S.prepend(E)},we={alert:e=>{(0,he.u_)(e),alert((0,he.uP)(e))},toast:ye,dialog:ge.u,snackbar:(e,t)=>{var i,o,n,s,a,r;(0,he.u_)(e);const l=t.split("-")[0],d=document.createElement(`${l}-snackbar`),c=null!==(n=null===(o=null===(i=e.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.verticalEdge)&&void 0!==n?n:me.Bottom,u=null!==(r=null===(a=null===(s=e.config)||void 0===s?void 0:s.snackbar)||void 0===a?void 0:a.horizontalEdge)&&void 0!==r?r:ve.Left,h=(0,he.jE)(`snack-container-${c}-${u}`,t);h&&((e,t,i)=>{e.style.position="fixed",e.style.top=t===me.Top?fe:"",e.style.bottom=t===me.Bottom?fe:"",e.style.left=i===ve.Left?fe:"",e.style.right=i===ve.Right?fe:""})(h,c,u),h.appendChild(d),d.notification=e},banner:(e,t,i)=>{var o;(0,he.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-banner`),a=(0,he.cL)(i);(null===(o=null==a?void 0:a.children)||void 0===o?void 0:o.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),a.appendChild(s),s.notification=e}},Ce=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{we[o]&&we[o](e,t,i)})};function xe(e,t,i){(null==t?void 0:t.trim())&&Ce({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class $e extends a.FoundationElement{constructor(){super(...arguments),this.placeholder="Describe your search criteria in natural language...",this.inputValue="",this.isInterpreting=!1,this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null}get speechAvailable(){return L()}get criteriaChips(){return this.activeGroups.flatMap((e,t)=>e.clauses.map((e,i)=>{var o,n;return{groupIndex:t,clauseIndex:i,fieldLabel:this.getFieldLabel(e.field),operatorLabel:null!==(o=te[e.operator])&&void 0!==o?o:e.operator,valueLabel:"dateIsToday"===e.operator?"":String(null!==(n=e.value)&&void 0!==n?n:"")}}))}getFieldLabel(e){var t,i;if(!Array.isArray(this.fieldMetadata)||0===this.fieldMetadata.length)return e;if("string"==typeof this.fieldMetadata[0])return e;const o=this.fieldMetadata.find(t=>t.NAME===e);return null!==(i=null!==(t=null==o?void 0:o.UI_LABEL)&&void 0!==t?t:null==o?void 0:o.NAME)&&void 0!==i?i:e}toggleCriteriaView(){this.showingChips?(this.inputValue="",this.showingChips=!1):this.showingChips=!0}removeChip(e,t){var i;const o=this.activeGroups.map(e=>Object.assign(Object.assign({},e),{clauses:[...e.clauses]}));null===(i=o[e])||void 0===i||i.clauses.splice(t,1);const n=o.filter(e=>e.clauses.length>0);if(this.activeGroups=n,0===n.length)this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null);else{const e=X(n);this.lastValidCriteria=e,this.$emit("criteria-changed",e)}}clearChips(){this.activeGroups=[],this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null)}handleSubmit(){return(0,C.sH)(this,void 0,void 0,function*(){var e,t,i;const o=null===(e=this.inputValue)||void 0===e?void 0:e.trim();if(!o||this.isInterpreting)return;const n=null===(t=this.providerRegistry)||void 0===t?void 0:t.default();if(null==n?void 0:n.interpretCriteria){this.isInterpreting=!0;try{const e=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],t=yield n.interpretCriteria(o,{fields:e});if(!(null===(i=null==t?void 0:t.groups)||void 0===i?void 0:i.some(e=>{var t;return null===(t=e.clauses)||void 0===t?void 0:t.length})))return xe("AI criteria search","AI could not interpret the criteria",T(this)),void(this.isInterpreting=!1);const{valid:a,invalid:r}=ue(t.groups,this.fieldMetadata);if(r.length>0&&(xe("Criteria validation error",0===(s=r).length?"":1===s.length?s[0].message:s.map(e=>e.message).join("; "),T(this)),this.$emit("validation-errors",r)),a.length>0){const e=[...this.activeGroups,...a],t=X(e);this.lastValidCriteria=t,this.activeGroups=e,this.inputValue="",this.showingChips=!0,this.$emit("criteria-changed",t)}}catch(e){xe("AI criteria search",e instanceof Error?e.message:"Interpretation failed",T(this))}finally{this.isInterpreting=!1}var s}else xe("AI criteria search","AI provider not configured",T(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.activeGroups.length>0&&(this.showingChips=!0)}clear(){this.inputValue="",this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.$emit("criteria-changed",null)}toggleSpeechInput(){if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,void(this.isRecording=!1);this.inputValue="",this.showingChips=!1,this.stopRecording=function(e,t){if(!L())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let o="";return i.onresult=t=>{let i="",n="";for(let e=t.resultIndex;e<t.results.length;e+=1){const o=t.results[e][0].transcript;t.results[e].isFinal?n+=o:i+=o}n?(o+=n,e(o,!0)):i&&e(o+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}(0,C.Cg)([M],$e.prototype,"providerRegistry",void 0),(0,C.Cg)([l.attr],$e.prototype,"placeholder",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],$e.prototype,"disabled",void 0),(0,C.Cg)([l.observable],$e.prototype,"inputValue",void 0),(0,C.Cg)([l.observable],$e.prototype,"isInterpreting",void 0),(0,C.Cg)([l.observable],$e.prototype,"lastValidCriteria",void 0),(0,C.Cg)([l.observable],$e.prototype,"activeGroups",void 0),(0,C.Cg)([l.observable],$e.prototype,"showingChips",void 0),(0,C.Cg)([l.observable],$e.prototype,"fieldMetadata",void 0),(0,C.Cg)([l.observable],$e.prototype,"isRecording",void 0),(0,C.Cg)([l.volatile],$e.prototype,"speechAvailable",null),(0,C.Cg)([l.volatile],$e.prototype,"criteriaChips",null);const Se=void 0,Ee={},Oe=$e.compose(Object.assign({baseName:"ai-criteria-search",template:B,styles:_,shadowOptions:Se},Ee)),Te=(e,t)=>l.css`
|
|
337
|
+
`;var V=i(95553),G=i(58749),j=i(14609),Y=i(86636);const W={contains:V.n.containsIgnoreCase,equals:V.n.EQ,startsWith:V.n.startsWith,endsWith:V.n.endsWith,greaterThan:V.n.GT,lessThan:V.n.LT,greaterThanOrEqual:V.n.GE,lessThanOrEqual:V.n.LE,notEqual:V.n.NE,dateIsToday:V.n.dateIsToday,dateIsAfter:V.n.dateIsGreaterEqual,dateIsGreaterEqual:V.n.dateIsGreaterEqual,dateIsBefore:V.n.dateIsLessEqual,dateIsLessEqual:V.n.dateIsLessEqual,dateIsEqual:V.n.dateIsEqual,dateTimeIsAfter:V.n.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:V.n.dateTimeIsGreaterEqual,dateTimeIsBefore:V.n.dateTimeIsLessEqual,dateTimeIsLessEqual:V.n.dateTimeIsLessEqual};function q(e){var t,i;const o=null!==(t=W[e.operator])&&void 0!==t?t:V.n.containsIgnoreCase;return(new G.K).withField(e.field).withValue(null!==(i=e.value)&&void 0!==i?i:null).withSerialiser(o).withGroup("default").build()}function K(e,t){return 1===e.length?e[0]:e.reduce((e,i,o)=>0===o?[i]:[...e,t,i],[])}function X(e){var t;const i=new j.b;let o=!1;for(const n of e){if(!(null===(t=n.clauses)||void 0===t?void 0:t.length))continue;const e=n.clauses.map(q),s="or"===n.logic?Y.r.Or():Y.r.And(),a=K(e,s),r=e.length>1?{join:s}:{};n.negated?i.And([Y.r.Not(),a]):i.And(1===e.length?e[0]:e,r),o=!0}return o?i.build():""}const J=["contains","equals","startsWith","endsWith","notEqual"],Q=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],Z=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],ee=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],te={contains:"contains",equals:"=",startsWith:"starts with",endsWith:"ends with",notEqual:"≠",greaterThan:">",lessThan:"<",greaterThanOrEqual:"≥",lessThanOrEqual:"≤",dateIsToday:"is today",dateIsAfter:"after",dateIsBefore:"before",dateIsEqual:"=",dateIsGreaterEqual:"≥",dateIsLessEqual:"≤",dateTimeIsAfter:"after",dateTimeIsBefore:"before",dateTimeIsGreaterEqual:"≥",dateTimeIsLessEqual:"≤"},ie=new Set(["DATE","LOCALDATE"]),oe=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),ne=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function se(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function ae(e){const t=se(e);return ie.has(t)?Z:oe.has(t)?ee:ne.has(t)?Q:J}function re(e){return ne.has(se(e))}function le(e){return null!=e&&("number"==typeof e?!Number.isNaN(e)&&e>0:"string"==typeof e&&(/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e)))}function de(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function ce(e,t){const i=[],o=[],n=new Map;if(Array.isArray(t)&&t.length>0){"string"==typeof t[0]?t.forEach(e=>n.set(e,void 0)):t.forEach(e=>n.set(e.NAME,e))}for(const t of e){const{field:e,operator:s,value:a}=t;if(!e||"string"!=typeof e){o.push({field:String(e),message:"Field name is required"});continue}const r=n.get(e),l=r&&"TYPE"in r?r.TYPE:"STRING";ae(l).includes(s)?!Z.includes(s)&&!ee.includes(s)||"dateIsToday"===s||le(a)?re(l)&&Q.includes(s)&&!de(a)?o.push({field:e,operator:s,value:a,message:"Invalid numeric value"}):n.size>0&&!n.has(e)?o.push({field:e,operator:s,value:a,message:`Unknown field '${e}'`}):i.push(t):o.push({field:e,operator:s,value:a,message:"Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch"}):o.push({field:e,operator:s,value:a,message:`Operator '${s}' is not allowed for field type ${l}`})}return{valid:i,invalid:o}}function ue(e,t){var i;const o=[],n=[];for(const s of e){if(!(null==s?void 0:s.clauses)||!Array.isArray(s.clauses)){n.push({field:"",message:"Group must have a clauses array"});continue}const{valid:e,invalid:a}=ce(s.clauses,t);n.push(...a),e.length>0&&o.push({logic:null!==(i=s.logic)&&void 0!==i?i:"and",negated:s.negated,clauses:e})}return{valid:o,invalid:n}}var he=i(60416);var pe,me,ge,ve=i(31274);!function(e){e.NOTIFICATION_EVENT="notification-event"}(pe||(pe={})),function(e){e.Top="top",e.Bottom="bottom"}(me||(me={})),function(e){e.Left="left",e.Right="right"}(ge||(ge={}));const fe="12px";var be=i(52945);const ye=(e,t,i)=>{var o,n,s,a,r,l,d,c,u,h,p,m,g,v,f,b,y,w,C;(0,he.u_)(e);const x=t.split("-")[0],$=(null===(n=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.toast)||void 0===n?void 0:n.position)||"top-right",S=null!==(s=null!=i?i:(e=>(0,be.fI)(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))($))&&void 0!==s?s:(0,he.jE)("notify-container",t);S&&"notify-container"!==S.tagName.toLowerCase()&&function(e,t){var i,o;switch(t.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.toast)||void 0===o?void 0:o.position){case"top-left":t.style.top="var(--nav-height, 0)",t.style.left="0";break;case"bottom-left":t.style.bottom="0",t.style.left="0";break;case"bottom-right":t.style.bottom="0",t.style.right="0";break;default:t.style.top="var(--nav-height, 0)",t.style.right="0"}}(e,S);const E=document.createElement(`${x}-toast`),O=document.createElement("div");O.setAttribute("slot","top"),O.textContent=e.title;const T=document.createElement("div");T.setAttribute("slot","content"),T.textContent=(null==e?void 0:e.body)||"";const k=document.createElement("div");let D;k.setAttribute("slot","date"),k.textContent=(null===(a=null==e?void 0:e.createdAt)||void 0===a?void 0:a.toLocaleTimeString())||"",(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.toast)||void 0===l?void 0:l.buttons)&&(null===(u=null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.toast)||void 0===c?void 0:c.buttons)||void 0===u?void 0:u.length)&&(D=document.createElement("div"),D.setAttribute("slot","bottom"),e.config.toast.buttons.forEach(t=>{const i=document.createElement(`${x}-button`);i.textContent=t.placeholder||"example placeholder",i.addEventListener("click",()=>{const{details:o}=e.config.toast;if(t.action)return t.action({details:o,buttonElement:i,toastElement:E})}),t.appearance&&i.setAttribute("appearance",t.appearance),D.appendChild(i)})),E.setAttribute("notify",(null===(p=null===(h=null==e?void 0:e.config)||void 0===h?void 0:h.toast)||void 0===p?void 0:p.type)||""),e.iconName&&E.setAttribute("notification-icon",e.iconName),(null===(g=null===(m=null==e?void 0:e.config)||void 0===m?void 0:m.toast)||void 0===g?void 0:g.autoClose)&&E.setAttribute("auto-close",`${null===(f=null===(v=null==e?void 0:e.config)||void 0===v?void 0:v.toast)||void 0===f?void 0:f.autoClose}`),(null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout)&&E.setAttribute("close-timeout",`${null===(C=null===(w=null==e?void 0:e.config)||void 0===w?void 0:w.toast)||void 0===C?void 0:C.closeTimeout}`),E.appendChild(O),E.appendChild(T),E.appendChild(k),D&&E.appendChild(D),S.prepend(E)},we={alert:e=>{(0,he.u_)(e),alert((0,he.uP)(e))},toast:ye,dialog:ve.u,snackbar:(e,t)=>{var i,o,n,s,a,r;(0,he.u_)(e);const l=t.split("-")[0],d=document.createElement(`${l}-snackbar`),c=null!==(n=null===(o=null===(i=e.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.verticalEdge)&&void 0!==n?n:me.Bottom,u=null!==(r=null===(a=null===(s=e.config)||void 0===s?void 0:s.snackbar)||void 0===a?void 0:a.horizontalEdge)&&void 0!==r?r:ge.Left,h=(0,he.jE)(`snack-container-${c}-${u}`,t);h&&((e,t,i)=>{e.style.position="fixed",e.style.top=t===me.Top?fe:"",e.style.bottom=t===me.Bottom?fe:"",e.style.left=i===ge.Left?fe:"",e.style.right=i===ge.Right?fe:""})(h,c,u),h.appendChild(d),d.notification=e},banner:(e,t,i)=>{var o;(0,he.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-banner`),a=(0,he.cL)(i);(null===(o=null==a?void 0:a.children)||void 0===o?void 0:o.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),a.appendChild(s),s.notification=e}},Ce=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{we[o]&&we[o](e,t,i)})};function xe(e,t,i){(null==t?void 0:t.trim())&&Ce({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class $e extends a.FoundationElement{constructor(){super(...arguments),this.placeholder="Describe your search criteria in natural language...",this.inputValue="",this.isInterpreting=!1,this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null}get speechAvailable(){return L()}get criteriaChips(){return this.activeGroups.flatMap((e,t)=>e.clauses.map((e,i)=>{var o,n;return{groupIndex:t,clauseIndex:i,fieldLabel:this.getFieldLabel(e.field),operatorLabel:null!==(o=te[e.operator])&&void 0!==o?o:e.operator,valueLabel:"dateIsToday"===e.operator?"":String(null!==(n=e.value)&&void 0!==n?n:"")}}))}getFieldLabel(e){var t,i;if(!Array.isArray(this.fieldMetadata)||0===this.fieldMetadata.length)return e;if("string"==typeof this.fieldMetadata[0])return e;const o=this.fieldMetadata.find(t=>t.NAME===e);return null!==(i=null!==(t=null==o?void 0:o.UI_LABEL)&&void 0!==t?t:null==o?void 0:o.NAME)&&void 0!==i?i:e}toggleCriteriaView(){this.showingChips?(this.inputValue="",this.showingChips=!1):this.showingChips=!0}removeChip(e,t){var i;const o=this.activeGroups.map(e=>Object.assign(Object.assign({},e),{clauses:[...e.clauses]}));null===(i=o[e])||void 0===i||i.clauses.splice(t,1);const n=o.filter(e=>e.clauses.length>0);if(this.activeGroups=n,0===n.length)this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null);else{const e=X(n);this.lastValidCriteria=e,this.$emit("criteria-changed",e)}}clearChips(){this.activeGroups=[],this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null)}handleSubmit(){return(0,C.sH)(this,void 0,void 0,function*(){var e,t,i;const o=null===(e=this.inputValue)||void 0===e?void 0:e.trim();if(!o||this.isInterpreting)return;const n=null===(t=this.providerRegistry)||void 0===t?void 0:t.default();if(null==n?void 0:n.interpretCriteria){this.isInterpreting=!0;try{const e=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],t=yield n.interpretCriteria(o,{fields:e});if(!(null===(i=null==t?void 0:t.groups)||void 0===i?void 0:i.some(e=>{var t;return null===(t=e.clauses)||void 0===t?void 0:t.length})))return xe("AI criteria search","AI could not interpret the criteria",T(this)),void(this.isInterpreting=!1);const{valid:a,invalid:r}=ue(t.groups,this.fieldMetadata);if(r.length>0&&(xe("Criteria validation error",0===(s=r).length?"":1===s.length?s[0].message:s.map(e=>e.message).join("; "),T(this)),this.$emit("validation-errors",r)),a.length>0){const e=[...this.activeGroups,...a],t=X(e);this.lastValidCriteria=t,this.activeGroups=e,this.inputValue="",this.showingChips=!0,this.$emit("criteria-changed",t)}}catch(e){xe("AI criteria search",e instanceof Error?e.message:"Interpretation failed",T(this))}finally{this.isInterpreting=!1}var s}else xe("AI criteria search","AI provider not configured",T(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.activeGroups.length>0&&(this.showingChips=!0)}clear(){this.inputValue="",this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.$emit("criteria-changed",null)}toggleSpeechInput(){if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,void(this.isRecording=!1);this.inputValue="",this.showingChips=!1,this.stopRecording=function(e,t){if(!L())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let o="";return i.onresult=t=>{let i="",n="";for(let e=t.resultIndex;e<t.results.length;e+=1){const o=t.results[e][0].transcript;t.results[e].isFinal?n+=o:i+=o}n?(o+=n,e(o,!0)):i&&e(o+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}(0,C.Cg)([M],$e.prototype,"providerRegistry",void 0),(0,C.Cg)([l.attr],$e.prototype,"placeholder",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],$e.prototype,"disabled",void 0),(0,C.Cg)([l.observable],$e.prototype,"inputValue",void 0),(0,C.Cg)([l.observable],$e.prototype,"isInterpreting",void 0),(0,C.Cg)([l.observable],$e.prototype,"lastValidCriteria",void 0),(0,C.Cg)([l.observable],$e.prototype,"activeGroups",void 0),(0,C.Cg)([l.observable],$e.prototype,"showingChips",void 0),(0,C.Cg)([l.observable],$e.prototype,"fieldMetadata",void 0),(0,C.Cg)([l.observable],$e.prototype,"isRecording",void 0),(0,C.Cg)([l.volatile],$e.prototype,"speechAvailable",null),(0,C.Cg)([l.volatile],$e.prototype,"criteriaChips",null);const Se=void 0,Ee={},Oe=$e.compose(Object.assign({baseName:"ai-criteria-search",template:B,styles:_,shadowOptions:Se},Ee)),Te=(e,t)=>l.css`
|
|
338
338
|
:host {
|
|
339
339
|
display: flex;
|
|
340
340
|
justify-content: center;
|
|
@@ -638,9 +638,9 @@
|
|
|
638
638
|
${e=>st(T(e))}
|
|
639
639
|
`,rt={mode:"open",delegatesFocus:!0};class lt extends a.FoundationElement{constructor(){super(...arguments),this.dismissAnimation=""}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation="banner-delete",new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return(0,C.sH)(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){ot.error(e)}})}}(0,C.Cg)([l.observable],lt.prototype,"dismissAnimation",void 0),(0,C.Cg)([l.observable],lt.prototype,"notification",void 0);const dt=lt.compose({baseName:"banner",styles:nt,template:at,shadowOptions:rt}),ct=(e,t)=>l.css`
|
|
640
640
|
${(0,r.breadcrumbStyles)(e,t)}
|
|
641
|
-
`,ut=(e,t)=>(0,a.breadcrumbTemplate)(e,t);class ht extends r.Breadcrumb{}const pt=void 0,mt={},
|
|
641
|
+
`,ut=(e,t)=>(0,a.breadcrumbTemplate)(e,t);class ht extends r.Breadcrumb{}const pt=void 0,mt={},gt=ht.compose(Object.assign({baseName:"breadcrumb",template:ut,styles:ct,shadowOptions:pt},mt)),vt=(e,t)=>l.css`
|
|
642
642
|
${(0,r.breadcrumbItemStyles)(e,t)}
|
|
643
|
-
`,ft=(e,t)=>(0,a.breadcrumbItemTemplate)(e,t);class bt extends r.BreadcrumbItem{}const yt=void 0,wt={separator:"/"},Ct=bt.compose(Object.assign({baseName:"breadcrumb-item",template:ft,styles:
|
|
643
|
+
`,ft=(e,t)=>(0,a.breadcrumbItemTemplate)(e,t);class bt extends r.BreadcrumbItem{}const yt=void 0,wt={separator:"/"},Ct=bt.compose(Object.assign({baseName:"breadcrumb-item",template:ft,styles:vt,shadowOptions:yt},wt)),xt=(e,t)=>l.css`
|
|
644
644
|
${(0,r.buttonStyles)(e,t)}
|
|
645
645
|
`,$t=(e,t)=>(0,a.buttonTemplate)(e,t);class St extends r.Button{}const Et={delegatesFocus:!0,mode:"open"},Ot={},Tt=St.compose(Object.assign({baseName:"button",template:$t,styles:xt,shadowOptions:Et},Ot)),kt=()=>l.css`
|
|
646
646
|
${r.CalendarStyles}
|
|
@@ -913,7 +913,7 @@
|
|
|
913
913
|
${Vt()}
|
|
914
914
|
`,jt=void 0,Yt={};class Wt extends a.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=zt.BELOW}openChanged(e,t){var i,o;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.optionsElement)||void 0===i||i.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(o=this.optionsElement)||void 0===o||o.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===zt.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){const t=(null!=e?e:this.options).reduce((e,t)=>{const i=t.type||"Other";return e[i]?e[i].options.push(t):e[i]={type:i,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const i=t.getBoundingClientRect(),o=this.getBoundingClientRect(),n=i.top+i.height/2;e=o.top<n?zt.BELOW:zt.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<t.height&&o>n?zt.ABOVE:zt.BELOW}}e===zt.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===zt.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return e.value}getItemLabel(e){let t;return e?(t=e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){const t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}setFilter(){const e=this.options.filter(e=>{var t;const i=e.description,o=null!==(t=e.label)&&void 0!==t?t:e.value;return(null==i?void 0:i.toLowerCase().includes(this.filterSearchValue.toLowerCase()))||o.toLowerCase().includes(this.filterSearchValue.toLowerCase())?e:void 0});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){E(e,this)&&(this.open=!1)}}(0,C.Cg)([l.attr],Wt.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Wt.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wt.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wt.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Wt.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Wt.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Wt.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Wt.prototype,"open",void 0),(0,C.Cg)([l.observable],Wt.prototype,"options",void 0),(0,C.Cg)([l.observable],Wt.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Wt.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Wt.prototype,"position",void 0),(0,C.Cg)([l.volatile],Wt.prototype,"getPlaceholder",null);const qt=Wt.compose(Object.assign({baseName:"categorized-multiselect",template:Gt,styles:Bt,shadowOptions:jt},Yt)),Kt=(e,t)=>l.css`
|
|
915
915
|
${(0,r.checkboxStyles)(e,t)}
|
|
916
|
-
`,Xt=(e,t)=>(0,a.checkboxTemplate)(e,t);class Jt extends r.Checkbox{}const Qt=void 0,Zt={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '},ei=Jt.compose(Object.assign({baseName:"checkbox",template:Xt,styles:Kt,shadowOptions:Qt},Zt));var ti=i(62051),ii=i.n(ti),oi=i(39087),ni=i(87917),si=i(40370),ai=i(6884),ri=i(96730),li=i(21281),di=i(34193),ci=i(41119),ui=i(57963),hi=i(49964),pi=i(12066),mi=i(97156);class vi extends((0,si.C)(a.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=ai.OD.MAX_ROWS_250,this.maxView=ai.OD.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new mi.t(new Map),this.fetchGeneration=0}criteriaChanged(e,t){const i=e!==(0,ri.Q)(t,";");this.refetchIfInitializedAndChanged(i)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){const i=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(i)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&this.fetchGenesisData(null)}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{void 0!==e[t]&&(this[t]=e[t])})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}get effectiveRowId(){var e;return this.rowId?this.rowId:(null===(e=this.datasource)||void 0===e?void 0:e.resourceType)===oi.v.REQUEST_SERVER?ai.OD.REQUEST_SERVER_ROW_ID:ai.OD.DATASERVER_ROW_ID}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return(0,C.sH)(this,arguments,void 0,function*(e=!0){var t,i;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.fetchGeneration+=1;const o=this.fetchGeneration,n=()=>o!==this.fetchGeneration;if(this.data)return void this.syncComponentData(this.data);const s=e||!this.datasource.initialized;s||(this.connect.dataLogoff(this.sourceRef),this.clearData()),this.sourceRef=void 0;const a=yield this.datasource.init(this.datasourceOptions(),s);if(!n())if(a){if(this.isSnapshot){const e=yield this.datasource.snapshot();if(n())return;const t=this.filterSnapshotResult(e);return this.updateRequestPagingState(e,null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0,this.initialRequestOffset()),void this.syncComponentData(t)}ot.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(n())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF,"boolean"==typeof e.MORE_ROWS&&(this.moreRowsAvailable=e.MORE_ROWS);const t=e.MESSAGE_TYPE;if(t&&t===li.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,di.d)(e);this.handleStreamUpdate(t)}else this.handleStreamUpdate(e)})}else this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:"error"})})}initDatasource(){return(0,C.sH)(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 oi.v.REQUEST_SERVER:return!0;case oi.v.DATASERVER:return!!this.sourceRef&&!this.dataSubWasLoggedOff;default:return!1}}requestMoreRows(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.canRequestMoreRows())try{if(this.datasource.resourceType===oi.v.DATASERVER)return void(yield this.connect.getMoreRows(this.sourceRef));const t=this.fetchGeneration,i=this.nextRequestOffset;this.moreRowsAvailable=!1;const o=yield this.datasource.snapshot({DETAILS:Object.assign(Object.assign({},null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS),{OFFSET:i})});if(t!==this.fetchGeneration)return;const n=Array.isArray(null==o?void 0:o.REPLY)?o.REPLY:[];this.updateRequestPagingState(o,n.length,i),n.length>0&&this.handleStreamInserts(n)}catch(e){throw this.moreRowsAvailable=!0,this.handleError({message:`Failed to request more rows for ${this.resourceName}`,loggerType:"error",loggerArgs:[e]}),e}})}filterSnapshotResult(e){if(e)return Array.isArray(e)?e:e.REPLY?e.REPLY:e.ROW?(0,di.d)(e).inserts:void 0}updateRequestPagingState(e,t,i){if(Array.isArray(e)||!e)return void(this.moreRowsAvailable=!1);const o=e,n=o.NEXT_OFFSET,s="number"==typeof n&&n>i,a=Number(this.maxRows)||0,r=t>0&&a>0&&t>=a;this.moreRowsAvailable="boolean"==typeof o.MORE_ROWS?o.MORE_ROWS:-1!==n&&(s||r),this.nextRequestOffset=s?n:i+t}initialRequestOffset(){var e,t;return Number(null===(t=null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.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){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,i;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void this.handleError({message:"received invalid RequestServerResult",loggerType:"error",loggerArgs:[e]});if(this.requiresFullDataRefresh)return null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)}),void this.syncComponentData(Array.from(this.rowsSyncedWithStream.values()));this.handleStreamInserts(e.REPLY);const o=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(o)}applyDataserverData(e){var t,i,o,n;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)});const i=Array.from(this.rowsSyncedWithStream.values());return void this.syncComponentData(i)}(null===(i=e.inserts)||void 0===i?void 0:i.length)>0&&this.handleStreamInserts(e.inserts),(null===(o=e.deletes)||void 0===o?void 0:o.length)>0&&this.handleStreamDeletes(e.deletes),(null===(n=e.updates)||void 0===n?void 0:n.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;const t=(null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[];return(0,ri.Q)(t.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={}){const{message:t,loggerType:i,loggerArgs:o=[]}=e;t&&ot[i](t,...o)}getFieldMetadata(e){var t;return null===(t=this.datasource.fieldMetadata)||void 0===t?void 0:t.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===ci.w.DATE||t===ci.w.DATETIME?(0,pi.Ey)(e,t===ci.w.DATETIME):e}}function gi(e,t){var i;const o=new j.b;o.withExpression((new G.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(V.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var fi;(0,C.Cg)([ui.dm],vi.prototype,"connect",void 0),(0,C.Cg)([hi.yW],vi.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vi.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],vi.prototype,"criteria",void 0),(0,C.Cg)([l.observable],vi.prototype,"data",void 0),(0,C.Cg)([l.attr],vi.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vi.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],vi.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],vi.prototype,"maxView",void 0),(0,C.Cg)([l.attr],vi.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],vi.prototype,"request",void 0),(0,C.Cg)([l.attr],vi.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vi.prototype,"reverse",void 0),(0,C.Cg)([l.attr],vi.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],vi.prototype,"withTimestampFormatting",void 0);let bi=fi=class extends vi{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=fi.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.open)&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{const e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,o=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!o&&this.allowCustomOptions&&this.select instanceof r.Combobox?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",o)}}initialSelectedValueChanged(e,t){t!==e&&(t?this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()):this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t,i;if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${T(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:fi.defaultPageSize,this.select.addEventListener("open-change",this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;l.DOM.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||ot.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener("open-change",this.selectOpenChangeHandler),this.select.removeEventListener("change",this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{const e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==oi.v.DATASERVER}catch(e){ot.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e,t,i,o,n,s,a;this.isConnected&&(null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null!==(n=null!==(i=null===(t=this.select)||void 0===t?void 0:t.scrollableListbox)&&void 0!==i?i:null===(o=this.select)||void 0===o?void 0:o.listbox)&&void 0!==n?n:null===(a=null===(s=this.select)||void 0===s?void 0:s.shadowRoot)||void 0===a?void 0:a.querySelector(".listbox"),this.listboxElement?this.listboxElement.addEventListener("scroll",this.listboxScrollHandler):ot.warn("Unable to locate listbox element, infinite scroll will not be available."))}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-fi.scrollLoadThresholdPx}loadNextPage(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;const e=this.datasource.resourceType===oi.v.REQUEST_SERVER;try{yield this.requestMoreRows()}catch(e){return void(this.loadingMoreRows=!1)}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.listboxElement;e&&0!==e.clientHeight&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof r.Combobox&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return(0,C.sH)(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?function(e,t){const i=new j.b;i.withExpression((new G.K).withField(e.valueField).withValue(t).withSerialiser(V.n.equals).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${i.build()}`:e.criteria=i.build()}(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof fi||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}rowToOption(e){var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{const i=document.createElement(this.optionElement);i.textContent=t||e,i.value=e,this.select.appendChild(i),this.resizeObserver.observe(i)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));const e=0===this.renderedOptionsCount;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async&&e){this.resetCombobox();const e=this.getInitialLabel();l.DOM.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof r.Combobox&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async)&&(this.resetCombobox(),l.DOM.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof r.Combobox?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof r.Combobox&&this.select.resetCombobox()}handleStreamInserts(e){var t,i;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const o=new Set((null!==(t=this.options)&&void 0!==t?t:[]).map(e=>String(e.value))),n=e.filter(e=>!o.has(String(e[this.valueField])));if(!n.length)return ot.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),void(this.moreRowsAvailable=!1);const s=n.map(e=>this.rowToOption(e));this.options=[...null!==(i=this.options)&&void 0!==i?i:[],...s],this.renderListboxOptions(s),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};bi.defaultPageSize=20,bi.scrollLoadThresholdPx=32,(0,C.Cg)([ni.ME],bi.prototype,"resources",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],bi.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],bi.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],bi.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],bi.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],bi.prototype,"allowCustomOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"infinite-scroll"})],bi.prototype,"infiniteScroll",void 0),(0,C.Cg)([(0,l.attr)({attribute:"page-size",converter:l.nullableNumberConverter})],bi.prototype,"pageSize",void 0),(0,C.Cg)([l.observable],bi.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],bi.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],bi.prototype,"initialSelectedValue",void 0),bi=fi=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],bi);const yi=(e,t)=>l.css`
|
|
916
|
+
`,Xt=(e,t)=>(0,a.checkboxTemplate)(e,t);class Jt extends r.Checkbox{}const Qt=void 0,Zt={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '},ei=Jt.compose(Object.assign({baseName:"checkbox",template:Xt,styles:Kt,shadowOptions:Qt},Zt));var ti=i(62051),ii=i.n(ti),oi=i(39087),ni=i(87917),si=i(40370),ai=i(6884),ri=i(96730),li=i(21281),di=i(34193),ci=i(41119),ui=i(57963),hi=i(49964),pi=i(12066),mi=i(97156);class gi extends((0,si.C)(a.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=ai.OD.MAX_ROWS_250,this.maxView=ai.OD.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new mi.t(new Map),this.fetchGeneration=0}criteriaChanged(e,t){const i=e!==(0,ri.Q)(t,";");this.refetchIfInitializedAndChanged(i)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){const i=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(i)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&this.fetchGenesisData(null)}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{void 0!==e[t]&&(this[t]=e[t])})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}get effectiveRowId(){var e;return this.rowId?this.rowId:(null===(e=this.datasource)||void 0===e?void 0:e.resourceType)===oi.v.REQUEST_SERVER?ai.OD.REQUEST_SERVER_ROW_ID:ai.OD.DATASERVER_ROW_ID}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return(0,C.sH)(this,arguments,void 0,function*(e=!0){var t,i;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.fetchGeneration+=1;const o=this.fetchGeneration,n=()=>o!==this.fetchGeneration;if(this.data)return void this.syncComponentData(this.data);const s=e||!this.datasource.initialized;s||(this.connect.dataLogoff(this.sourceRef),this.clearData()),this.sourceRef=void 0;const a=yield this.datasource.init(this.datasourceOptions(),s);if(!n())if(a){if(this.isSnapshot){const e=yield this.datasource.snapshot();if(n())return;const t=this.filterSnapshotResult(e);return this.updateRequestPagingState(e,null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0,this.initialRequestOffset()),void this.syncComponentData(t)}ot.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(n())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF,"boolean"==typeof e.MORE_ROWS&&(this.moreRowsAvailable=e.MORE_ROWS);const t=e.MESSAGE_TYPE;if(t&&t===li.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,di.d)(e);this.handleStreamUpdate(t)}else this.handleStreamUpdate(e)})}else this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:"error"})})}initDatasource(){return(0,C.sH)(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 oi.v.REQUEST_SERVER:return!0;case oi.v.DATASERVER:return!!this.sourceRef&&!this.dataSubWasLoggedOff;default:return!1}}requestMoreRows(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.canRequestMoreRows())try{if(this.datasource.resourceType===oi.v.DATASERVER)return void(yield this.connect.getMoreRows(this.sourceRef));const t=this.fetchGeneration,i=this.nextRequestOffset;this.moreRowsAvailable=!1;const o=yield this.datasource.snapshot({DETAILS:Object.assign(Object.assign({},null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS),{OFFSET:i})});if(t!==this.fetchGeneration)return;const n=Array.isArray(null==o?void 0:o.REPLY)?o.REPLY:[];this.updateRequestPagingState(o,n.length,i),n.length>0&&this.handleStreamInserts(n)}catch(e){throw this.moreRowsAvailable=!0,this.handleError({message:`Failed to request more rows for ${this.resourceName}`,loggerType:"error",loggerArgs:[e]}),e}})}filterSnapshotResult(e){if(e)return Array.isArray(e)?e:e.REPLY?e.REPLY:e.ROW?(0,di.d)(e).inserts:void 0}updateRequestPagingState(e,t,i){if(Array.isArray(e)||!e)return void(this.moreRowsAvailable=!1);const o=e,n=o.NEXT_OFFSET,s="number"==typeof n&&n>i,a=Number(this.maxRows)||0,r=t>0&&a>0&&t>=a;this.moreRowsAvailable="boolean"==typeof o.MORE_ROWS?o.MORE_ROWS:-1!==n&&(s||r),this.nextRequestOffset=s?n:i+t}initialRequestOffset(){var e,t;return Number(null===(t=null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.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){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,i;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void this.handleError({message:"received invalid RequestServerResult",loggerType:"error",loggerArgs:[e]});if(this.requiresFullDataRefresh)return null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)}),void this.syncComponentData(Array.from(this.rowsSyncedWithStream.values()));this.handleStreamInserts(e.REPLY);const o=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(o)}applyDataserverData(e){var t,i,o,n;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)});const i=Array.from(this.rowsSyncedWithStream.values());return void this.syncComponentData(i)}(null===(i=e.inserts)||void 0===i?void 0:i.length)>0&&this.handleStreamInserts(e.inserts),(null===(o=e.deletes)||void 0===o?void 0:o.length)>0&&this.handleStreamDeletes(e.deletes),(null===(n=e.updates)||void 0===n?void 0:n.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;const t=(null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[];return(0,ri.Q)(t.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={}){const{message:t,loggerType:i,loggerArgs:o=[]}=e;t&&ot[i](t,...o)}getFieldMetadata(e){var t;return null===(t=this.datasource.fieldMetadata)||void 0===t?void 0:t.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===ci.w.DATE||t===ci.w.DATETIME?(0,pi.Ey)(e,t===ci.w.DATETIME):e}}function vi(e,t){var i;const o=new j.b;o.withExpression((new G.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(V.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var fi;(0,C.Cg)([ui.dm],gi.prototype,"connect",void 0),(0,C.Cg)([hi.yW],gi.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gi.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],gi.prototype,"criteria",void 0),(0,C.Cg)([l.observable],gi.prototype,"data",void 0),(0,C.Cg)([l.attr],gi.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gi.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],gi.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],gi.prototype,"maxView",void 0),(0,C.Cg)([l.attr],gi.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],gi.prototype,"request",void 0),(0,C.Cg)([l.attr],gi.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gi.prototype,"reverse",void 0),(0,C.Cg)([l.attr],gi.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],gi.prototype,"withTimestampFormatting",void 0);let bi=fi=class extends gi{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=fi.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.open)&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{const e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,o=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!o&&this.allowCustomOptions&&this.select instanceof r.Combobox?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",o)}}initialSelectedValueChanged(e,t){t!==e&&(t?this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()):this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t,i;if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${T(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:fi.defaultPageSize,this.select.addEventListener("open-change",this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;l.DOM.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||ot.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener("open-change",this.selectOpenChangeHandler),this.select.removeEventListener("change",this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{const e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==oi.v.DATASERVER}catch(e){ot.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e,t,i,o,n,s,a;this.isConnected&&(null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null!==(n=null!==(i=null===(t=this.select)||void 0===t?void 0:t.scrollableListbox)&&void 0!==i?i:null===(o=this.select)||void 0===o?void 0:o.listbox)&&void 0!==n?n:null===(a=null===(s=this.select)||void 0===s?void 0:s.shadowRoot)||void 0===a?void 0:a.querySelector(".listbox"),this.listboxElement?this.listboxElement.addEventListener("scroll",this.listboxScrollHandler):ot.warn("Unable to locate listbox element, infinite scroll will not be available."))}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-fi.scrollLoadThresholdPx}loadNextPage(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;const e=this.datasource.resourceType===oi.v.REQUEST_SERVER;try{yield this.requestMoreRows()}catch(e){return void(this.loadingMoreRows=!1)}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.listboxElement;e&&0!==e.clientHeight&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof r.Combobox&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return(0,C.sH)(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?function(e,t){const i=new j.b;i.withExpression((new G.K).withField(e.valueField).withValue(t).withSerialiser(V.n.equals).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${i.build()}`:e.criteria=i.build()}(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof fi||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}rowToOption(e){var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{const i=document.createElement(this.optionElement);i.textContent=t||e,i.value=e,this.select.appendChild(i),this.resizeObserver.observe(i)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));const e=0===this.renderedOptionsCount;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async&&e){this.resetCombobox();const e=this.getInitialLabel();l.DOM.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof r.Combobox&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async)&&(this.resetCombobox(),l.DOM.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof r.Combobox?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof r.Combobox&&this.select.resetCombobox()}handleStreamInserts(e){var t,i;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const o=new Set((null!==(t=this.options)&&void 0!==t?t:[]).map(e=>String(e.value))),n=e.filter(e=>!o.has(String(e[this.valueField])));if(!n.length)return ot.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),void(this.moreRowsAvailable=!1);const s=n.map(e=>this.rowToOption(e));this.options=[...null!==(i=this.options)&&void 0!==i?i:[],...s],this.renderListboxOptions(s),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};bi.defaultPageSize=20,bi.scrollLoadThresholdPx=32,(0,C.Cg)([ni.ME],bi.prototype,"resources",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],bi.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],bi.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],bi.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],bi.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],bi.prototype,"allowCustomOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"infinite-scroll"})],bi.prototype,"infiniteScroll",void 0),(0,C.Cg)([(0,l.attr)({attribute:"page-size",converter:l.nullableNumberConverter})],bi.prototype,"pageSize",void 0),(0,C.Cg)([l.observable],bi.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],bi.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],bi.prototype,"initialSelectedValue",void 0),bi=fi=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],bi);const yi=(e,t)=>l.css`
|
|
917
917
|
.combo-box-indicator {
|
|
918
918
|
transition-property: transform;
|
|
919
919
|
transition-duration: 0.2s;
|
|
@@ -979,7 +979,7 @@
|
|
|
979
979
|
></slot>
|
|
980
980
|
</div>
|
|
981
981
|
</template>
|
|
982
|
-
`;var Ci,xi;class $i extends r.Combobox{constructor(){super(...arguments),Ci.set(this,void 0),xi.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode="startsWith",this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:"auto",block:"nearest"},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:"auto",block:"center"},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}debounceChanged(e,t){this.debouncedInputHandler=ii()(this.asyncSetFilter,t)}get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}openChanged(){super.openChanged(),this.$emit("open-change",{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions())}get value(){return l.Observable.track(this,"value"),this._ourValue}set value(e){var t,i,o;if(void 0===e)return;const n=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const n=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),s=this.options?this.options.findIndex(n):-1,a=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,r=null===(i=this.options[s])||void 0===i?void 0:i.text;this.selectedIndex=r&&r!==a?s:this.selectedIndex,e&&""!==e.trim()&&-1===s&&(e=(null===(o=this.firstSelectedOption)||void 0===o?void 0:o.text)||e)}n!==e&&(this._ourValue=e,super.valueChanged(n,e),l.Observable.notify(this,"value"))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){var e;if(this.async)return;const t=null===(e=this.slottedDatasource)||void 0===e?void 0:e.assignedNodes().find(e=>e instanceof bi);(null==t?void 0:t.infiniteScroll)&&(this.async=!0)}filterOptions(){if(this.async)return this.filteredOptions=[...this._options],void this._options.forEach(e=>e.hidden=!1);this.autocomplete&&this.autocomplete!==a.ComboboxAutocomplete.none||(this.filter="");const e=this.filter,t=this.caseSensitive?e:e.toLowerCase();this.filteredOptions=this._options.filter(e=>{const i=this.caseSensitive?e.text:e.text.toLowerCase();return"contains"===this.filterMode?i.includes(t):i.startsWith(t)}),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled)if(E(e,this))this.open=!1;else{if(O(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!O(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if((0,C.GG)(this,xi,this.open,"f"),!this.open)return this.open=!0,!0;break;case"ArrowDown":case"ArrowUp":if(!this.open)return this.open=!0,!0;if(this.scrollWhenSelectionChanges){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollWhenSelectionChangesOptions)}break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const i=super.keydownHandler(e);return"Enter"!==t?i:void 0}keyupHandler(e){var t;const i=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(i){case"Enter":return!(0,C.gn)(this,xi,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===a.ComboboxAutocomplete.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const i=super.keyupHandler(e);return this.selectItemByValue(this.control.value),i}return super.keyupHandler(e)}get indicator(){return(0,C.gn)(this,Ci,"f")||(0,C.GG)(this,Ci,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,C.gn)(this,Ci,"f")}selectItemByValue(e){var t,i,o;this.selectedIndex=null!==(i=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>t.text===e))&&void 0!==i?i:-1,null===(o=this.options)||void 0===o||o.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?(this.selectedIndex=this.options.map(e=>e.text).indexOf(this.control.value),this.debouncedInputHandler()):super.inputHandler(e)}asyncSetFilter(){const e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof bi);if(t.length>0){const i=t[0];null==e||""===e?i.criteria=i.baseCriteria||"":
|
|
982
|
+
`;var Ci,xi;class $i extends r.Combobox{constructor(){super(...arguments),Ci.set(this,void 0),xi.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode="startsWith",this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:"auto",block:"nearest"},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:"auto",block:"center"},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}debounceChanged(e,t){this.debouncedInputHandler=ii()(this.asyncSetFilter,t)}get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}openChanged(){super.openChanged(),this.$emit("open-change",{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions())}get value(){return l.Observable.track(this,"value"),this._ourValue}set value(e){var t,i,o;if(void 0===e)return;const n=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const n=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),s=this.options?this.options.findIndex(n):-1,a=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,r=null===(i=this.options[s])||void 0===i?void 0:i.text;this.selectedIndex=r&&r!==a?s:this.selectedIndex,e&&""!==e.trim()&&-1===s&&(e=(null===(o=this.firstSelectedOption)||void 0===o?void 0:o.text)||e)}n!==e&&(this._ourValue=e,super.valueChanged(n,e),l.Observable.notify(this,"value"))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){var e;if(this.async)return;const t=null===(e=this.slottedDatasource)||void 0===e?void 0:e.assignedNodes().find(e=>e instanceof bi);(null==t?void 0:t.infiniteScroll)&&(this.async=!0)}filterOptions(){if(this.async)return this.filteredOptions=[...this._options],void this._options.forEach(e=>e.hidden=!1);this.autocomplete&&this.autocomplete!==a.ComboboxAutocomplete.none||(this.filter="");const e=this.filter,t=this.caseSensitive?e:e.toLowerCase();this.filteredOptions=this._options.filter(e=>{const i=this.caseSensitive?e.text:e.text.toLowerCase();return"contains"===this.filterMode?i.includes(t):i.startsWith(t)}),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled)if(E(e,this))this.open=!1;else{if(O(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!O(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if((0,C.GG)(this,xi,this.open,"f"),!this.open)return this.open=!0,!0;break;case"ArrowDown":case"ArrowUp":if(!this.open)return this.open=!0,!0;if(this.scrollWhenSelectionChanges){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollWhenSelectionChangesOptions)}break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const i=super.keydownHandler(e);return"Enter"!==t?i:void 0}keyupHandler(e){var t;const i=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(i){case"Enter":return!(0,C.gn)(this,xi,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===a.ComboboxAutocomplete.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const i=super.keyupHandler(e);return this.selectItemByValue(this.control.value),i}return super.keyupHandler(e)}get indicator(){return(0,C.gn)(this,Ci,"f")||(0,C.GG)(this,Ci,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,C.gn)(this,Ci,"f")}selectItemByValue(e){var t,i,o;this.selectedIndex=null!==(i=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>t.text===e))&&void 0!==i?i:-1,null===(o=this.options)||void 0===o||o.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?(this.selectedIndex=this.options.map(e=>e.text).indexOf(this.control.value),this.debouncedInputHandler()):super.inputHandler(e)}asyncSetFilter(){const e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof bi);if(t.length>0){const i=t[0];null==e||""===e?i.criteria=i.baseCriteria||"":vi(i,e),l.DOM.queueUpdate(()=>{this.control.value=e})}else ot.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===a.ComboboxAutocomplete.both&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}Ci=new WeakMap,xi=new WeakMap,(0,C.Cg)([l.observable],$i.prototype,"activeDescendant",null),(0,C.Cg)([l.observable],$i.prototype,"slottedDatasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],$i.prototype,"async",void 0),(0,C.Cg)([l.attr],$i.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"case-sensitive"})],$i.prototype,"caseSensitive",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"ignore-input-click"})],$i.prototype,"ignoreInputClick",void 0),(0,C.Cg)([(0,l.attr)({attribute:"filter-mode"})],$i.prototype,"filterMode",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],$i.prototype,"scrollToSelectedWhenOpening",void 0),(0,C.Cg)([l.observable],$i.prototype,"scrollToSelectedWhenOpeningOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-when-selection-changes"})],$i.prototype,"scrollWhenSelectionChanges",void 0),(0,C.Cg)([l.observable],$i.prototype,"scrollWhenSelectionChangesOptions",void 0);const Si={delegatesFocus:!0,mode:"open"},Ei={indicator:'\n <svg\n class="combo-box-indicator"\n part="combo-box-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},Oi=$i.compose(Object.assign({baseName:"combobox",template:wi,styles:yi,shadowOptions:Si},Ei));var Ti=i(98316);const ki=(e,t)=>l.css`
|
|
983
983
|
:host {
|
|
984
984
|
--light-size: 12px;
|
|
985
985
|
--height: calc(var(--design-unit) * 2px + var(--light-size));
|
|
@@ -1249,7 +1249,7 @@
|
|
|
1249
1249
|
</div>
|
|
1250
1250
|
`,uo=l.html`
|
|
1251
1251
|
${e=>co(T(e))}
|
|
1252
|
-
`;i(8420);function ho(e){const t=((null==e?void 0:e.trim())||"en").toLowerCase().replace(/_/g,"-");return"en-us"===t||"en"===t?"en":"en-gb"===t?"en-gb":t}function po(){return"undefined"!=typeof navigator&&navigator.language?navigator.language:"en"}function mo(e="en"){const t=ho(e),i=Ki()().locale(t),o=i.locale();return(n=t)!==(s=o)&&s!==n.split("-")[0]?Ki()().locale("en").localeData().longDateFormat("L")||"MM/DD/YYYY":i.localeData().longDateFormat("L")||"MM/DD/YYYY";var n,s}function vo(e){return e.replace(/YYYY/g,"yyyy").replace(/YY(?!Y)/g,"yy").replace(/DD/g,"dd").replace(/D(?!D)/g,"d").replace(/MM/g,"mm").replace(/M(?!M)/g,"m")}function go(e){return null!=e&&""!==String(e).trim()}Ki().extend(Ji()),Ki().extend(Zi()),Ki().extend(to());const fo="MM-DD-YYYY";function bo(e,t){const i=String(e).trim(),o=Ki()(i,t,!0);if(o.isValid())return o;const n=Ki()(i,fo,!0);return n.isValid()?n:null}var yo=i(28745);const wo=[1,2,3,4,5,6,7],Co=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const n=wo.filter(t=>-1===e.indexOf(t));let s=n.find(e=>e>t.dayNumber);s||(s=Math.min(...n));const a=t.dayNumber<s?s-t.dayNumber:s-t.dayNumber+7;return n.length?new no(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,a),i):(yo.v.warn("Date picker disabled days - all days of week have been disabled"),t)},xo=void 0,$o={};class So extends a.FoundationElement{constructor(){super(...arguments),this.format=fo,this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[],this.suppressValueChanged=!1,this.cachedFormat=fo,this.clickOutside=e=>this.handleClickOutside(e),this.keydownOutside=e=>this.handleKeydownOutside(e)}formatChanged(e,t){!this.useLocaleFormat&&t&&this.cacheUserFormat(t),t&&this.calendar&&go(this.value)&&(this.formatDate=Ki()(this.currentDate.Date).format(t))}langChanged(){this.applyEffectiveLangChange()}useLocaleFormatChanged(e,t){this.calendar&&(t&&!e?this.cacheUserFormat(this.format):!t&&e&&this.restoreUserFormat(),this.applyEffectiveLangChange())}inlineCalendarChanged(){this.inlineCalendar?(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)):this.visible&&(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)),this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){this.suppressValueChanged||this.calendar&&(go(t)?this.applyValue(t):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate())}disconnectedCallback(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),Ki().extend(Ji()),Ki().extend(to()),Ki().extend(Zi()),this.substringNumber=3,this.useLocaleFormat&&(this.cacheUserFormat(this.format),this.applyLocaleFormat());const e=this.value;!this.allowEmpty||go(e)?go(e)?this.applyValue(e):this.initializeWithDefaultDate():this.initializeEmpty()}clear(){this.allowEmpty&&this.clearToEmpty(!0)}get inputValue(){return go(this.value)?this.formatDate:""}get inputPlaceholder(){var e;return!this.allowEmpty||go(this.value)?"":(null===(e=this.placeholder)||void 0===e?void 0:e.trim())||vo(this.format)}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?po():this.lang}applyLocaleFormat(){this.format=mo(this.effectiveLang)}cacheUserFormat(e){const t=null==e?void 0:e.trim();t&&(this.cachedFormat=t)}restoreUserFormat(){this.format=this.cachedFormat}applyEffectiveLangChange(){var e,t;if(!this.calendar)return;this.useLocaleFormat&&this.applyLocaleFormat();const i=this.calendar.year,o=this.calendar.month.number,n=null!==(t=null===(e=this.currentDate)||void 0===e?void 0:e.Date)&&void 0!==t?t:Ki()().toDate();this.currentDate=new no(n,this.effectiveLang),this.calendar=new ao(i,o,this.effectiveLang),go(this.value)&&(this.formatDate=Ki()(this.currentDate.Date).format(this.format)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}syncValueAttribute(e){this.suppressValueChanged=!0,this.value=e,this.suppressValueChanged=!1}initializeEmpty(){const e=Ki()();this.currentDate=new no(e.toDate(),this.effectiveLang),this.calendar=new ao(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate="",this.syncValueAttribute(""),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}initializeWithDefaultDate(){this.resetToDefaultDate(!0)}resetToDefaultDate(e=!1){var t;let i=new no(Ki()().toDate(),this.effectiveLang);(null===(t=this.disabledDaysOfWeek)||void 0===t?void 0:t.length)&&(i=Co(this.disabledDaysOfWeek,i,this.effectiveLang)),this.currentDate=i,e||!this.calendar?this.calendar=new ao(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang):this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(this.currentDate.Date).format(fo)),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}applyValue(e){const t=bo(e,this.format);t?(this.currentDate=new no(t.toDate(),this.effectiveLang),this.calendar?this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year):this.calendar=new ao(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(this.currentDate.Date).format(fo)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate()}clearToEmpty(e){const t=Ki()();this.currentDate=new no(t.toDate(),this.effectiveLang),this.calendar&&(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()),this.formatDate="",this.syncValueAttribute(""),e&&this.$emit("value-changed",void 0)}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}visibleChanged(e,t){this.inlineCalendar||(t?(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)):(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)))}handleKeydownOutside(e){!this.inlineCalendar&&this.visible&&"Escape"===e.key&&(e.preventDefault(),this.closeCalendar())}handleClickOutside(e){!this.inlineCalendar&&this.visible&&E(e,this)&&this.closeCalendar()}closeCalendar(){this.visible&&(this.visible=!1,this.toggleVisibility())}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=(0,x.x)(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return!(this.allowEmpty&&!go(this.value))&&Ki()(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){Ki()(e.Date).isSame(this.currentDate.Date,"day")&&go(this.value)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(e.Date).format(fo)),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,o=this.calendar.month.numberOfDays+i,n=Array.from({length:o});for(let e=i;e<o;e+=1)n[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const o=i-(e+1);n[e]=t.getDay(t.numberOfDays-o)}return n}}(0,C.Cg)([l.attr],So.prototype,"format",void 0),(0,C.Cg)([l.attr],So.prototype,"lang",void 0),(0,C.Cg)([(0,l.attr)({attribute:"use-locale-format",mode:"boolean"})],So.prototype,"useLocaleFormat",void 0),(0,C.Cg)([l.attr],So.prototype,"visible",void 0),(0,C.Cg)([(0,l.attr)({attribute:"inline-calendar",mode:"boolean"})],So.prototype,"inlineCalendar",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-weekends",mode:"boolean"})],So.prototype,"hideWeekends",void 0),(0,C.Cg)([l.attr],So.prototype,"position",void 0),(0,C.Cg)([l.attr],So.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-empty",mode:"boolean"})],So.prototype,"allowEmpty",void 0),(0,C.Cg)([l.attr],So.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],So.prototype,"value",void 0),(0,C.Cg)([l.observable],So.prototype,"currentDate",void 0),(0,C.Cg)([l.observable],So.prototype,"currentMonth",void 0),(0,C.Cg)([l.observable],So.prototype,"currentYear",void 0),(0,C.Cg)([l.observable],So.prototype,"calendarDropdownClasses",void 0),(0,C.Cg)([l.observable],So.prototype,"formatDate",void 0),(0,C.Cg)([l.observable],So.prototype,"monthList",void 0),(0,C.Cg)([l.observable],So.prototype,"disabledDaysOfWeek",void 0),(0,C.Cg)([l.observable],So.prototype,"calendar",void 0);const Eo=So.compose(Object.assign({baseName:"date-picker",styles:ro,template:uo,shadowOptions:xo},$o));var Oo=i(83912);const To=r.SwatchRGB.create(1,1,1),ko=r.SwatchRGB.create(0,0,0),Do=(0,Oo.parseColorHexRGB)("#585858"),Io=r.SwatchRGB.create(Do.r,Do.g,Do.b),Ro=(0,Oo.parseColorHexRGB)("#ffffff"),Ao=r.SwatchRGB.create(Ro.r,Ro.g,Ro.b),Lo=r.PaletteRGB.from(Ao),Fo=(0,Oo.parseColorHexRGB)("#eeeeee"),No=r.SwatchRGB.create(Fo.r,Fo.g,Fo.b),Mo=r.PaletteRGB.from(No),_o=(0,Oo.parseColorHexRGB)("#08c3a5"),Ho=r.SwatchRGB.create(_o.r,_o.g,_o.b),Po=r.PaletteRGB.from(Ho),{create:zo}=a.DesignToken,Uo=zo("fui-fill-color").withDefault(Io),Bo=zo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(Ao),Vo=14;function Go(e,t){return e.colorContrast(t,Vo)}const jo=zo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>Go(zo("fui-card-palette").withDefault(Lo).getValueFor(e),Bo.getValueFor(e))),Yo=(e,t)=>{const i=structuredClone(e);return!t||"object"!=typeof t||Array.isArray(t)?void 0!==t?t:i:(Object.keys(t).forEach(e=>{const o=t[e],n=i[e];if(null==o)return;const s=e=>e instanceof Date;!o||"object"!=typeof o||Array.isArray(o)||s(o)||!n||"object"!=typeof n||Array.isArray(n)||s(n)?i[e]=o:i[e]=Yo(n,o)}),i)};var Wo=i(80273);const qo={design_tokens:{color:{accent:{$value:"#0EAFE2",$type:"color"},neutral:{$value:"#7C909B",$type:"color"}},fontFamily:{bodyFont:{$value:'Roboto, "Segoe UI", Arial, Helvetica, sans-serif',$type:"fontFamily"}},typography:{baseFontSize:{$value:"14px",$type:"dimension"},baseLineHeight:{$value:"20px",$type:"dimension"}},mode:{luminance:{$value:.23,$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"}}}};class Ko{constructor(){this.value=null}}(0,C.Cg)([l.observable],Ko.prototype,"value",void 0);const Xo=new Ko,Jo=(e,t,i)=>{const o=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const n=`${i}Value`;t[n]&&o(e[i],t[n])})};function Qo(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const Zo={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,Oo.parseColorHexRGB)(e);return t?r.SwatchRGB.create(t.r,t.g,t.b):null}},en=e=>r.PaletteRGB.from(r.SwatchRGB.from((0,Oo.parseColorHexRGB)(e))),tn=(e,t,i="")=>{Object.entries(t).forEach(([t,o])=>{const n=i?`${i}-${t}`:t;o&&"object"==typeof o&&("$value"in o?e.style.setProperty(`--${n}`,String(o.$value)):tn(e,o,n))})},on=["baseClass","baseName","shadowOptions","styles","template"],nn=(e,t=on)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}),sn=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:nn(t)}},an=(e,t)=>{const i=e.match(/^(\d+)([a-z]+)/i),o=i[1],n=i[2];return Number(o)+t+n},rn=()=>Xo,ln=(...e)=>{const t=Xo.value;if(!(null==t?void 0:t.customTokens)||0===e.length)return null;return function e(t,i){const[o,...n]=t;if(0===n.length){const e=i[o];return e&&e.$value?e:null}const s=i[o];return s?e(n,s):null}(e,t.customTokens)},dn=(e,t)=>{const i=Yo(qo,t);const o=i.design_tokens;r.accentPalette.setValueFor(e,en(o.color.accent.$value)),r.neutralPalette.setValueFor(e,en(o.color.neutral.$value)),r.bodyFont.setValueFor(e,o.fontFamily.bodyFont.$value),r.baseLayerLuminance.setValueFor(e,o.mode.luminance.$value),r.density.setValueFor(e,o.style.density.$value),r.baseHeightMultiplier.setValueFor(e,o.style.baseHeightMultiplier.$value),r.controlCornerRadius.setValueFor(e,o.style.borderRadius.$value),r.strokeWidth.setValueFor(e,o.style.strokeWidth.$value),r.designUnit.setValueFor(e,o.space.designUnit.$value),r.typeRampBaseFontSize.setValueFor(e,o.typography.baseFontSize.$value),r.typeRampBaseLineHeight.setValueFor(e,o.typography.baseLineHeight.$value);const n=r.typeRampBaseFontSize.getValueFor(e),s=r.typeRampBaseLineHeight.getValueFor(e);r.typeRampMinus1FontSize.setValueFor(e,an(n,Wo.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,an(s,Wo.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,an(n,Wo.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,an(s,Wo.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,an(n,Wo.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,an(s,Wo.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,an(n,Wo.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,an(s,Wo.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,an(n,Wo.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,an(s,Wo.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,an(n,Wo.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,an(s,Wo.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,an(n,Wo.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,an(s,Wo.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,an(n,Wo.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,an(s,Wo.Du.plusSix)),i.customTokens&&tn(e,i.customTokens),Xo.value=structuredClone(i)},cn=en("#08c3a5"),un=en("#eeeeee"),hn=r.StandardLuminance.DarkMode;const pn=i(85109).O.ltr,mn=4,vn=4;var gn=i(85090);const fn=(e="normal",t="normal")=>`\n font-family: ${r.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,bn=l.css`
|
|
1252
|
+
`;i(8420);function ho(e){const t=((null==e?void 0:e.trim())||"en").toLowerCase().replace(/_/g,"-");return"en-us"===t||"en"===t?"en":"en-gb"===t?"en-gb":t}function po(){return"undefined"!=typeof navigator&&navigator.language?navigator.language:"en"}function mo(e="en"){const t=ho(e),i=Ki()().locale(t),o=i.locale();return(n=t)!==(s=o)&&s!==n.split("-")[0]?Ki()().locale("en").localeData().longDateFormat("L")||"MM/DD/YYYY":i.localeData().longDateFormat("L")||"MM/DD/YYYY";var n,s}function go(e){return e.replace(/YYYY/g,"yyyy").replace(/YY(?!Y)/g,"yy").replace(/DD/g,"dd").replace(/D(?!D)/g,"d").replace(/MM/g,"mm").replace(/M(?!M)/g,"m")}function vo(e){return null!=e&&""!==String(e).trim()}Ki().extend(Ji()),Ki().extend(Zi()),Ki().extend(to());const fo="MM-DD-YYYY";function bo(e,t){const i=String(e).trim(),o=Ki()(i,t,!0);if(o.isValid())return o;const n=Ki()(i,fo,!0);return n.isValid()?n:null}var yo=i(28745);const wo=[1,2,3,4,5,6,7],Co=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const n=wo.filter(t=>-1===e.indexOf(t));let s=n.find(e=>e>t.dayNumber);s||(s=Math.min(...n));const a=t.dayNumber<s?s-t.dayNumber:s-t.dayNumber+7;return n.length?new no(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,a),i):(yo.v.warn("Date picker disabled days - all days of week have been disabled"),t)},xo=void 0,$o={};class So extends a.FoundationElement{constructor(){super(...arguments),this.format=fo,this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[],this.suppressValueChanged=!1,this.cachedFormat=fo,this.clickOutside=e=>this.handleClickOutside(e),this.keydownOutside=e=>this.handleKeydownOutside(e)}formatChanged(e,t){!this.useLocaleFormat&&t&&this.cacheUserFormat(t),t&&this.calendar&&vo(this.value)&&(this.formatDate=Ki()(this.currentDate.Date).format(t))}langChanged(){this.applyEffectiveLangChange()}useLocaleFormatChanged(e,t){this.calendar&&(t&&!e?this.cacheUserFormat(this.format):!t&&e&&this.restoreUserFormat(),this.applyEffectiveLangChange())}inlineCalendarChanged(){this.inlineCalendar?(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)):this.visible&&(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)),this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){this.suppressValueChanged||this.calendar&&(vo(t)?this.applyValue(t):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate())}disconnectedCallback(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),Ki().extend(Ji()),Ki().extend(to()),Ki().extend(Zi()),this.substringNumber=3,this.useLocaleFormat&&(this.cacheUserFormat(this.format),this.applyLocaleFormat());const e=this.value;!this.allowEmpty||vo(e)?vo(e)?this.applyValue(e):this.initializeWithDefaultDate():this.initializeEmpty()}clear(){this.allowEmpty&&this.clearToEmpty(!0)}get inputValue(){return vo(this.value)?this.formatDate:""}get inputPlaceholder(){var e;return!this.allowEmpty||vo(this.value)?"":(null===(e=this.placeholder)||void 0===e?void 0:e.trim())||go(this.format)}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?po():this.lang}applyLocaleFormat(){this.format=mo(this.effectiveLang)}cacheUserFormat(e){const t=null==e?void 0:e.trim();t&&(this.cachedFormat=t)}restoreUserFormat(){this.format=this.cachedFormat}applyEffectiveLangChange(){var e,t;if(!this.calendar)return;this.useLocaleFormat&&this.applyLocaleFormat();const i=this.calendar.year,o=this.calendar.month.number,n=null!==(t=null===(e=this.currentDate)||void 0===e?void 0:e.Date)&&void 0!==t?t:Ki()().toDate();this.currentDate=new no(n,this.effectiveLang),this.calendar=new ao(i,o,this.effectiveLang),vo(this.value)&&(this.formatDate=Ki()(this.currentDate.Date).format(this.format)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}syncValueAttribute(e){this.suppressValueChanged=!0,this.value=e,this.suppressValueChanged=!1}initializeEmpty(){const e=Ki()();this.currentDate=new no(e.toDate(),this.effectiveLang),this.calendar=new ao(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate="",this.syncValueAttribute(""),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}initializeWithDefaultDate(){this.resetToDefaultDate(!0)}resetToDefaultDate(e=!1){var t;let i=new no(Ki()().toDate(),this.effectiveLang);(null===(t=this.disabledDaysOfWeek)||void 0===t?void 0:t.length)&&(i=Co(this.disabledDaysOfWeek,i,this.effectiveLang)),this.currentDate=i,e||!this.calendar?this.calendar=new ao(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang):this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(this.currentDate.Date).format(fo)),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}applyValue(e){const t=bo(e,this.format);t?(this.currentDate=new no(t.toDate(),this.effectiveLang),this.calendar?this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year):this.calendar=new ao(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(this.currentDate.Date).format(fo)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate()}clearToEmpty(e){const t=Ki()();this.currentDate=new no(t.toDate(),this.effectiveLang),this.calendar&&(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()),this.formatDate="",this.syncValueAttribute(""),e&&this.$emit("value-changed",void 0)}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}visibleChanged(e,t){this.inlineCalendar||(t?(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)):(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)))}handleKeydownOutside(e){!this.inlineCalendar&&this.visible&&"Escape"===e.key&&(e.preventDefault(),this.closeCalendar())}handleClickOutside(e){!this.inlineCalendar&&this.visible&&E(e,this)&&this.closeCalendar()}closeCalendar(){this.visible&&(this.visible=!1,this.toggleVisibility())}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=(0,x.x)(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return!(this.allowEmpty&&!vo(this.value))&&Ki()(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){Ki()(e.Date).isSame(this.currentDate.Date,"day")&&vo(this.value)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(e.Date).format(fo)),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,o=this.calendar.month.numberOfDays+i,n=Array.from({length:o});for(let e=i;e<o;e+=1)n[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const o=i-(e+1);n[e]=t.getDay(t.numberOfDays-o)}return n}}(0,C.Cg)([l.attr],So.prototype,"format",void 0),(0,C.Cg)([l.attr],So.prototype,"lang",void 0),(0,C.Cg)([(0,l.attr)({attribute:"use-locale-format",mode:"boolean"})],So.prototype,"useLocaleFormat",void 0),(0,C.Cg)([l.attr],So.prototype,"visible",void 0),(0,C.Cg)([(0,l.attr)({attribute:"inline-calendar",mode:"boolean"})],So.prototype,"inlineCalendar",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-weekends",mode:"boolean"})],So.prototype,"hideWeekends",void 0),(0,C.Cg)([l.attr],So.prototype,"position",void 0),(0,C.Cg)([l.attr],So.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-empty",mode:"boolean"})],So.prototype,"allowEmpty",void 0),(0,C.Cg)([l.attr],So.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],So.prototype,"value",void 0),(0,C.Cg)([l.observable],So.prototype,"currentDate",void 0),(0,C.Cg)([l.observable],So.prototype,"currentMonth",void 0),(0,C.Cg)([l.observable],So.prototype,"currentYear",void 0),(0,C.Cg)([l.observable],So.prototype,"calendarDropdownClasses",void 0),(0,C.Cg)([l.observable],So.prototype,"formatDate",void 0),(0,C.Cg)([l.observable],So.prototype,"monthList",void 0),(0,C.Cg)([l.observable],So.prototype,"disabledDaysOfWeek",void 0),(0,C.Cg)([l.observable],So.prototype,"calendar",void 0);const Eo=So.compose(Object.assign({baseName:"date-picker",styles:ro,template:uo,shadowOptions:xo},$o));var Oo=i(83912);const To=r.SwatchRGB.create(1,1,1),ko=r.SwatchRGB.create(0,0,0),Do=(0,Oo.parseColorHexRGB)("#585858"),Io=r.SwatchRGB.create(Do.r,Do.g,Do.b),Ro=(0,Oo.parseColorHexRGB)("#ffffff"),Ao=r.SwatchRGB.create(Ro.r,Ro.g,Ro.b),Lo=r.PaletteRGB.from(Ao),Fo=(0,Oo.parseColorHexRGB)("#eeeeee"),No=r.SwatchRGB.create(Fo.r,Fo.g,Fo.b),Mo=r.PaletteRGB.from(No),_o=(0,Oo.parseColorHexRGB)("#08c3a5"),Ho=r.SwatchRGB.create(_o.r,_o.g,_o.b),Po=r.PaletteRGB.from(Ho),{create:zo}=a.DesignToken,Uo=zo("fui-fill-color").withDefault(Io),Bo=zo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(Ao),Vo=14;function Go(e,t){return e.colorContrast(t,Vo)}const jo=zo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>Go(zo("fui-card-palette").withDefault(Lo).getValueFor(e),Bo.getValueFor(e))),Yo=(e,t)=>{const i=structuredClone(e);return!t||"object"!=typeof t||Array.isArray(t)?void 0!==t?t:i:(Object.keys(t).forEach(e=>{const o=t[e],n=i[e];if(null==o)return;const s=e=>e instanceof Date;!o||"object"!=typeof o||Array.isArray(o)||s(o)||!n||"object"!=typeof n||Array.isArray(n)||s(n)?i[e]=o:i[e]=Yo(n,o)}),i)};var Wo=i(80273);const qo={design_tokens:{color:{accent:{$value:"#0EAFE2",$type:"color"},neutral:{$value:"#7C909B",$type:"color"}},fontFamily:{bodyFont:{$value:'Roboto, "Segoe UI", Arial, Helvetica, sans-serif',$type:"fontFamily"}},typography:{baseFontSize:{$value:"14px",$type:"dimension"},baseLineHeight:{$value:"20px",$type:"dimension"}},mode:{luminance:{$value:.23,$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"}}}};class Ko{constructor(){this.value=null}}(0,C.Cg)([l.observable],Ko.prototype,"value",void 0);const Xo=new Ko,Jo=(e,t,i)=>{const o=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const n=`${i}Value`;t[n]&&o(e[i],t[n])})};function Qo(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const Zo={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,Oo.parseColorHexRGB)(e);return t?r.SwatchRGB.create(t.r,t.g,t.b):null}},en=e=>r.PaletteRGB.from(r.SwatchRGB.from((0,Oo.parseColorHexRGB)(e))),tn=(e,t,i="")=>{Object.entries(t).forEach(([t,o])=>{const n=i?`${i}-${t}`:t;o&&"object"==typeof o&&("$value"in o?e.style.setProperty(`--${n}`,String(o.$value)):tn(e,o,n))})},on=["baseClass","baseName","shadowOptions","styles","template"],nn=(e,t=on)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}),sn=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:nn(t)}},an=(e,t)=>{const i=e.match(/^(\d+)([a-z]+)/i),o=i[1],n=i[2];return Number(o)+t+n},rn=()=>Xo,ln=(...e)=>{const t=Xo.value;if(!(null==t?void 0:t.customTokens)||0===e.length)return null;return function e(t,i){const[o,...n]=t;if(0===n.length){const e=i[o];return e&&e.$value?e:null}const s=i[o];return s?e(n,s):null}(e,t.customTokens)},dn=(e,t)=>{const i=Yo(qo,t);const o=i.design_tokens;r.accentPalette.setValueFor(e,en(o.color.accent.$value)),r.neutralPalette.setValueFor(e,en(o.color.neutral.$value)),r.bodyFont.setValueFor(e,o.fontFamily.bodyFont.$value),r.baseLayerLuminance.setValueFor(e,o.mode.luminance.$value),r.density.setValueFor(e,o.style.density.$value),r.baseHeightMultiplier.setValueFor(e,o.style.baseHeightMultiplier.$value),r.controlCornerRadius.setValueFor(e,o.style.borderRadius.$value),r.strokeWidth.setValueFor(e,o.style.strokeWidth.$value),r.designUnit.setValueFor(e,o.space.designUnit.$value),r.typeRampBaseFontSize.setValueFor(e,o.typography.baseFontSize.$value),r.typeRampBaseLineHeight.setValueFor(e,o.typography.baseLineHeight.$value);const n=r.typeRampBaseFontSize.getValueFor(e),s=r.typeRampBaseLineHeight.getValueFor(e);r.typeRampMinus1FontSize.setValueFor(e,an(n,Wo.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,an(s,Wo.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,an(n,Wo.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,an(s,Wo.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,an(n,Wo.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,an(s,Wo.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,an(n,Wo.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,an(s,Wo.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,an(n,Wo.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,an(s,Wo.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,an(n,Wo.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,an(s,Wo.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,an(n,Wo.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,an(s,Wo.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,an(n,Wo.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,an(s,Wo.Du.plusSix)),i.customTokens&&tn(e,i.customTokens),Xo.value=structuredClone(i)},cn=en("#08c3a5"),un=en("#eeeeee"),hn=r.StandardLuminance.DarkMode;const pn=i(85109).O.ltr,mn=4,gn=4;var vn=i(85090);const fn=(e="normal",t="normal")=>`\n font-family: ${r.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,bn=l.css`
|
|
1253
1253
|
${(0,a.display)("flex")}
|
|
1254
1254
|
:host {
|
|
1255
1255
|
flex: 1;
|
|
@@ -1260,9 +1260,9 @@
|
|
|
1260
1260
|
}
|
|
1261
1261
|
`.withBehaviors((0,a.forcedColorsStylesheetBehavior)(l.css`
|
|
1262
1262
|
:host {
|
|
1263
|
-
background-color: ${
|
|
1264
|
-
box-shadow: 0 0 0 1px ${
|
|
1265
|
-
color: ${
|
|
1263
|
+
background-color: ${vn.A.ButtonFace};
|
|
1264
|
+
box-shadow: 0 0 0 1px ${vn.A.CanvasText};
|
|
1265
|
+
color: ${vn.A.ButtonText};
|
|
1266
1266
|
}
|
|
1267
1267
|
`)),wn=(e,t)=>l.css`
|
|
1268
1268
|
${e.name} ${"h"+t} {
|
|
@@ -1817,7 +1817,7 @@
|
|
|
1817
1817
|
</${e}-banner>
|
|
1818
1818
|
`,ms=l.html`
|
|
1819
1819
|
${e=>ps(T(e))}
|
|
1820
|
-
`,
|
|
1820
|
+
`,gs={mode:"open",delegatesFocus:!0};class vs extends a.FoundationElement{connectedCallback(){super.connectedCallback(),ot.deprecated("ErrorBanner","Use `${prefix}-banner` instead.")}dismiss(){return(0,C.sH)(this,void 0,void 0,function*(){try{yield this.banner.dismiss(),this.remove()}catch(e){ot.error(e)}})}}(0,C.Cg)([l.observable],vs.prototype,"error",void 0),(0,C.Cg)([l.observable],vs.prototype,"notification",void 0);const fs=vs.compose({baseName:"error-banner",template:ms,shadowOptions:gs});var bs;!function(e){e.ERROR_BOUNDARY_EVENT="error-boundary-event"}(bs||(bs={}));const ys=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.errorDetails)&&void 0!==i?i:"Something went wrong"}`},ws=e=>{var t;return(null==e?void 0:e.logLevel)||(null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.logLevel)||it.LogLevels.error},Cs=(e,t)=>{const i=t.split("-")[0];let o=document.querySelector(`#${e}`);if(!o){o=document.createElement("div"),o.setAttribute("id",e);const t=document.createElement(`${i}-design-system-provider`);t.appendChild(o),document.body.appendChild(t)}return o},xs=()=>{const e=document.createElement("div");return e.setAttribute("id","error-banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},$s=(0,it.createLogger)("foundation-error"),Ss={alert:e=>{alert(ys(e))},notification:(e,t)=>{var i,o,n,s,a,r,l,d,c,u,h,p,m;const g=t.split("-")[0],v=Cs("notify-container",t);if(v)switch(v.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.notification)||void 0===o?void 0:o.position){case"top-left":v.style.top="0",v.style.left="0";break;case"bottom-left":v.style.bottom="0",v.style.left="0";break;case"bottom-right":v.style.bottom="0",v.style.right="0";break;default:v.style.top="0",v.style.right="0"}const f=document.createElement(`${g}-toast`),b=document.createElement("div");b.setAttribute("slot","top"),b.textContent=null!==(n=e.title)&&void 0!==n?n:"Error";const y=document.createElement("div");y.setAttribute("slot","content"),y.textContent=(null==e?void 0:e.errorDetails)||"";const w=document.createElement("div");w.setAttribute("slot","date"),w.textContent=(new Date).toLocaleTimeString(),f.setAttribute("notify",(null===(a=null===(s=null==e?void 0:e.config)||void 0===s?void 0:s.notification)||void 0===a?void 0:a.type)||""),(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.notification)||void 0===l?void 0:l.autoClose)&&f.setAttribute("auto-close",`${null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.notification)||void 0===c?void 0:c.autoClose}`),(null===(h=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.notification)||void 0===h?void 0:h.closeTimeout)&&f.setAttribute("close-timeout",`${null===(m=null===(p=null==e?void 0:e.config)||void 0===p?void 0:p.notification)||void 0===m?void 0:m.closeTimeout}`),f.appendChild(b),f.appendChild(y),f.appendChild(w),v.appendChild(f)},dialog:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-error-dialog`);Cs("dialog-container",t).appendChild(o),o.error=e,o.show()},snackbar:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`);Cs("snack-container",t).appendChild(o),o.error=e},banner:(e,t,i)=>{var o;const n=t.split("-")[0],s=document.createElement(`${n}-error-banner`),a=(e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("error-banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return xs()})(i);(null===(o=null==a?void 0:a.children)||void 0===o?void 0:o.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),a.appendChild(s),s.error=e}},Es=(e,t,i)=>{$s.log({message:ys(e),level:ws(e)});Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{Ss[o]&&Ss[o](e,t,i)})};class Os{withTitle(e){return this.title=e,this}withErrorDetails(e){return this.errorDetails=e,this}withLogLevel(e){return this.logLevel=e,this}withAlert(e){return this.alert=e,this}withNotification(e){return this.notification=e,this}withBanner(e){return this.banner=e,this}withSnackbar(e){return this.snackbar=e,this}withDialog(e){return this.dialog=e,this}build(){if(!this.title)throw new Error("Title is required");if(!this.errorDetails)throw new Error("Missing required param 'errorDetails'");let e={title:this.title,errorDetails:this.errorDetails},t={};return null!=this.logLevel&&(e=Object.assign({logLevel:this.logLevel},e)),this.alert&&(t=Object.assign({alert:this.alert},t),e=Object.assign({config:t},e)),this.notification&&(t=Object.assign({notification:this.notification},t),e=Object.assign({config:t},e)),this.banner&&(t=Object.assign({banner:this.banner},t),e=Object.assign({config:t},e)),this.snackbar&&(t=Object.assign({snackbar:this.snackbar},t),e=Object.assign({config:t},e)),this.dialog&&(t=Object.assign({dialog:this.dialog},t),e=Object.assign({config:t},e)),e}}class Ts{withPosition(e){return this.position=e,this}withAutoClose(e){return this.autoClose=e,this}withCloseTimeout(e){return this.closeTimeout=e,this}withType(e){return this.type=e,this}build(){let e={};return this.position&&(e=Object.assign({position:this.position},e)),this.autoClose&&(e=Object.assign({autoClose:this.autoClose},e)),this.closeTimeout&&(e=Object.assign({closeTimeout:this.closeTimeout},e)),this.type&&(e=Object.assign({type:this.type},e)),e}}const ks=l.html`
|
|
1821
1821
|
<template ${(0,l.ref)("errorBoundary")}>
|
|
1822
1822
|
<slot></slot>
|
|
1823
1823
|
</template>
|
|
@@ -2173,7 +2173,7 @@
|
|
|
2173
2173
|
<div class="filter-wrapper">${t=>ha(t,e)}</div>
|
|
2174
2174
|
`,ma=l.html`
|
|
2175
2175
|
${e=>pa(T(e))}</div>
|
|
2176
|
-
`;var
|
|
2176
|
+
`;var ga;!function(e){e.change="filter-changed",e.clear="filter-cleared"}(ga||(ga={}));class va extends a.FoundationElement{constructor(){super(...arguments),this.type="text",this.textFilter="",this.enumFilterOptions=[{name:"All",value:"all",selected:!0}]}textFilterChanged(e,t){if(!(null==t?void 0:t.length))return void this.$emit(ga.clear,{fieldName:this.fieldName,target:this.target});const i=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(ga.change,{fieldName:this.fieldName,filter:i,target:this.target})}numFilterMinChanged(e,t){this.numFilterMin=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}numFilterMaxChanged(e,t){this.numFilterMax=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}handleNumericFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t))return void this.$emit(ga.clear,{fieldName:this.fieldName,target:this.target});const i=`${this.fieldName} >= ${e}`,o=`${this.fieldName} <= ${t}`,n=Number.isFinite(e)?Number.isFinite(t)?`(${i} && ${o})`:i:o;this.$emit(ga.change,{fieldName:this.fieldName,filter:n,target:this.target})}formatDate(e){if(Number.isFinite(e))return new Date(e).toISOString().slice(0,19).replace(/-/g,"").replace("T","-")}dateFilterMinChanged(e,t){this.dateMinMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}dateFilterMaxChanged(e,t){this.dateMaxMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}handleDateFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t))return void this.$emit(ga.clear,{fieldName:this.fieldName});const i=`Expr.dateTimeIsAfter(${this.fieldName}, '${this.formatDate(e)}')`,o=`Expr.dateTimeIsBefore(${this.fieldName}, '${this.formatDate(t)}')`,n=Number.isFinite(e)?Number.isFinite(t)?`(${i} && ${o})`:i:o;this.$emit(ga.change,{fieldName:this.fieldName,filter:n,target:this.target})}connectedCallback(){var e;if(super.connectedCallback(),null===(e=this.enumOptions)||void 0===e?void 0:e.length){const e=this.enumOptions.includes("|")?"|":",",t=this.enumOptions.split(e).map(e=>({name:e,value:e}));this.enumFilterOptions=[{name:"All",value:"all",selected:!0},...t]}}clear(){switch(this.type){case"number":this.numFilterFieldMin.value=void 0,this.numFilterFieldMax.value=void 0,this.numFilterMin=void 0,this.numFilterMax=void 0;break;case"date":this.dateFilterFieldMin.value="",this.dateFilterFieldMax.value="",this.dateMinMS=NaN,this.dateMaxMS=NaN;break;case"text":this.textFilterField.value=""}this.$emit(ga.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){e&&"all"!==e?this.$emit(ga.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target}):this.$emit(ga.clear,{fieldName:this.fieldName,target:this.target})}onEnumFilterSelection(e){e&&"all"!==e?this.$emit(ga.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target}):this.$emit(ga.clear,{fieldName:this.fieldName,target:this.target})}}(0,C.Cg)([l.attr],va.prototype,"fieldName",void 0),(0,C.Cg)([l.attr],va.prototype,"type",void 0),(0,C.Cg)([l.attr],va.prototype,"label",void 0),(0,C.Cg)([l.attr],va.prototype,"target",void 0),(0,C.Cg)([l.observable],va.prototype,"textFilter",void 0),(0,C.Cg)([l.observable],va.prototype,"numFilterMin",void 0),(0,C.Cg)([l.observable],va.prototype,"numFilterMax",void 0),(0,C.Cg)([l.observable],va.prototype,"dateFilterMin",void 0),(0,C.Cg)([l.observable],va.prototype,"dateFilterMax",void 0),(0,C.Cg)([l.attr],va.prototype,"enumOptions",void 0),(0,C.Cg)([l.observable],va.prototype,"enumFilterOptions",void 0);const fa=va.compose({baseName:"filter",template:ma,styles:ra});var ba=i(64324);const ya=(e,t)=>l.css`
|
|
2177
2177
|
.filter-bar {
|
|
2178
2178
|
background-color: #2c2f33;
|
|
2179
2179
|
padding: calc(var(--design-unit) * 2px);
|
|
@@ -2650,7 +2650,7 @@
|
|
|
2650
2650
|
direction="previous"
|
|
2651
2651
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
2652
2652
|
></foundation-flipper>
|
|
2653
|
-
`},mr=ur.compose(Object.assign({baseName:"horizontal-scroll",template:cr,styles:dr,shadowOptions:hr},pr));var
|
|
2653
|
+
`},mr=ur.compose(Object.assign({baseName:"horizontal-scroll",template:cr,styles:dr,shadowOptions:hr},pr));var gr=i(70623),vr=i(32808),fr=i(10463),br=i(19037),yr=i(22984);const wr=()=>(gr.Yv.add(yr.X7I,br.C91,fr.Cvc),gr.tT.css()),Cr=(e,t)=>l.css`
|
|
2654
2654
|
${wr()}
|
|
2655
2655
|
|
|
2656
2656
|
.fa-stack-1x {
|
|
@@ -2771,7 +2771,7 @@
|
|
|
2771
2771
|
</template>
|
|
2772
2772
|
`,$r=l.html`
|
|
2773
2773
|
${e=>xr(T(e))}
|
|
2774
|
-
`,Sr={mode:"open",delegatesFocus:!0},Er={};var Or;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(Or||(Or={}));const Tr="1x",kr=["2xs","xs","sm","lg","xl","2xl",Tr,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class Dr extends a.FoundationElement{constructor(){super(...arguments),this.isError=!1,this.tooltipShowTimer=null,this.size="sm",this.variant="solid",this.showTooltip=()=>{const e=this.tooltipElement;e&&null===this.tooltipShowTimer&&!e.matches(":popover-open")&&(this.tooltipShowTimer=window.setTimeout(()=>{this.tooltipShowTimer=null;const e=this.tooltipElement;(null==e?void 0:e.isConnected)&&(e.showPopover(),this.positionTooltip(e))},300))},this.hideTooltip=()=>{var e;null!==this.tooltipShowTimer&&(window.clearTimeout(this.tooltipShowTimer),this.tooltipShowTimer=null),(null===(e=this.tooltipElement)||void 0===e?void 0:e.matches(":popover-open"))&&this.tooltipElement.hidePopover()}}nameChanged(e,t){t&&this.loadIcon()}sizeChanged(e,t){t&&this.loadIcon()}variantChanged(e,t){t&&this.loadIcon()}connectedCallback(){var e,t,i,o;super.connectedCallback(),this.loadIcon(),null===(e=this.iElement)||void 0===e||e.addEventListener("mouseover",this.showTooltip,{passive:!0}),null===(t=this.iElement)||void 0===t||t.addEventListener("focusin",this.showTooltip,{passive:!0}),null===(i=this.iElement)||void 0===i||i.addEventListener("mouseout",this.hideTooltip,{passive:!0}),null===(o=this.iElement)||void 0===o||o.addEventListener("focusout",this.hideTooltip,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),this.iElement.replaceChildren(),this.iElement.removeEventListener("mouseover",this.showTooltip),this.iElement.removeEventListener("focusin",this.showTooltip),this.iElement.removeEventListener("mouseout",this.hideTooltip),this.iElement.removeEventListener("focusout",this.hideTooltip),this.hideTooltip()}positionTooltip(e){const t=this.iElement.getBoundingClientRect(),i=e.getBoundingClientRect(),o=Math.max(i.width,e.scrollWidth),n=Math.max(i.height,e.scrollHeight);let s=t.right;s+o>window.innerWidth-8&&(s=Math.max(8,t.left-o));const a=Math.max(8,window.innerHeight-n-8),r=Math.min(Math.max(t.top,8),a);e.style.top=`${r}px`,e.style.left=`${s}px`}getDefaultTooltipConfig(){this.name||(this.name="question-circle",this.size="1x",this.variant="regular")}loadIcon(){if(!this.iElement)return;this.tooltip&&(this.tooltipId||(this.tooltipId=this.uuid.createId()),this.getDefaultTooltipConfig());const e=(0,
|
|
2774
|
+
`,Sr={mode:"open",delegatesFocus:!0},Er={};var Or;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(Or||(Or={}));const Tr="1x",kr=["2xs","xs","sm","lg","xl","2xl",Tr,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class Dr extends a.FoundationElement{constructor(){super(...arguments),this.isError=!1,this.tooltipShowTimer=null,this.size="sm",this.variant="solid",this.showTooltip=()=>{const e=this.tooltipElement;e&&null===this.tooltipShowTimer&&!e.matches(":popover-open")&&(this.tooltipShowTimer=window.setTimeout(()=>{this.tooltipShowTimer=null;const e=this.tooltipElement;(null==e?void 0:e.isConnected)&&(e.showPopover(),this.positionTooltip(e))},300))},this.hideTooltip=()=>{var e;null!==this.tooltipShowTimer&&(window.clearTimeout(this.tooltipShowTimer),this.tooltipShowTimer=null),(null===(e=this.tooltipElement)||void 0===e?void 0:e.matches(":popover-open"))&&this.tooltipElement.hidePopover()}}nameChanged(e,t){t&&this.loadIcon()}sizeChanged(e,t){t&&this.loadIcon()}variantChanged(e,t){t&&this.loadIcon()}connectedCallback(){var e,t,i,o;super.connectedCallback(),this.loadIcon(),null===(e=this.iElement)||void 0===e||e.addEventListener("mouseover",this.showTooltip,{passive:!0}),null===(t=this.iElement)||void 0===t||t.addEventListener("focusin",this.showTooltip,{passive:!0}),null===(i=this.iElement)||void 0===i||i.addEventListener("mouseout",this.hideTooltip,{passive:!0}),null===(o=this.iElement)||void 0===o||o.addEventListener("focusout",this.hideTooltip,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),this.iElement.replaceChildren(),this.iElement.removeEventListener("mouseover",this.showTooltip),this.iElement.removeEventListener("focusin",this.showTooltip),this.iElement.removeEventListener("mouseout",this.hideTooltip),this.iElement.removeEventListener("focusout",this.hideTooltip),this.hideTooltip()}positionTooltip(e){const t=this.iElement.getBoundingClientRect(),i=e.getBoundingClientRect(),o=Math.max(i.width,e.scrollWidth),n=Math.max(i.height,e.scrollHeight);let s=t.right;s+o>window.innerWidth-8&&(s=Math.max(8,t.left-o));const a=Math.max(8,window.innerHeight-n-8),r=Math.min(Math.max(t.top,8),a);e.style.top=`${r}px`,e.style.left=`${s}px`}getDefaultTooltipConfig(){this.name||(this.name="question-circle",this.size="1x",this.variant="regular")}loadIcon(){if(!this.iElement)return;this.tooltip&&(this.tooltipId||(this.tooltipId=this.uuid.createId()),this.getDefaultTooltipConfig());const e=(0,gr.wu)({prefix:Or[this.variant],iconName:this.name}),t=(0,gr.Kk)(e);t&&t.node&&(this.iElement.innerHTML="",Array.from(t.node).map(e=>this.iElement.appendChild(e)))}}(0,C.Cg)([l.observable],Dr.prototype,"iElement",void 0),(0,C.Cg)([vr.k],Dr.prototype,"uuid",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tooltip-id"})],Dr.prototype,"tooltipId",void 0),(0,C.Cg)([l.attr],Dr.prototype,"tooltip",void 0),(0,C.Cg)([(0,l.attr)({attribute:"error",mode:"boolean"})],Dr.prototype,"isError",void 0),(0,C.Cg)([l.attr],Dr.prototype,"name",void 0),(0,C.Cg)([l.attr],Dr.prototype,"size",void 0),(0,C.Cg)([l.attr],Dr.prototype,"variant",void 0);const Ir=Dr.compose(Object.assign({baseName:"icon",template:$r,styles:Cr,shadowOptions:Sr},Er)),Rr=(e,t)=>l.css`
|
|
2775
2775
|
${(0,r.listboxStyles)(e,t)}
|
|
2776
2776
|
|
|
2777
2777
|
:host {
|
|
@@ -3045,7 +3045,7 @@
|
|
|
3045
3045
|
resize: none;
|
|
3046
3046
|
overflow: hidden;
|
|
3047
3047
|
}
|
|
3048
|
-
`;let dl=class extends
|
|
3048
|
+
`;let dl=class extends gi{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=""}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||ot.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')})}clearData(){this.select.options=[]}syncComponentData(e){var t;const i=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map(e=>{var t;return{value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});(null===(t=this.select)||void 0===t?void 0:t.async)&&(this.select.loading=!1),this.select.options=i}handleStreamInserts(e){ot.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],dl.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],dl.prototype,"labelField",void 0),dl=(0,C.Cg)([(0,l.customElement)({name:"multiselect-datasource"})],dl);const cl=(e="foundation")=>l.html`
|
|
3049
3049
|
<label
|
|
3050
3050
|
part="label"
|
|
3051
3051
|
for="display-field"
|
|
@@ -3168,7 +3168,7 @@
|
|
|
3168
3168
|
${()=>t.getItemLabel(e)}
|
|
3169
3169
|
</span>
|
|
3170
3170
|
`}
|
|
3171
|
-
`}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<rl&&o>n?zt.ABOVE:zt.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===zt.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===zt.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){const e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,o;const n="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(o=null==n?void 0:n.toLowerCase())&&void 0!==o?o:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),o="object"==typeof t.value?(n=t.value,Object.values(n).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var n;return i.includes(e)||o})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?
|
|
3171
|
+
`}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<rl&&o>n?zt.ABOVE:zt.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===zt.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===zt.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){const e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,o;const n="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(o=null==n?void 0:n.toLowerCase())&&void 0!==o?o:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),o="object"==typeof t.value?(n=t.value,Object.values(n).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var n;return i.includes(e)||o})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?vi(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,ot.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){E(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}(0,C.Cg)([l.attr],ml.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],ml.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"all",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"allSelected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"creatable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"async",void 0),(0,C.Cg)([l.attr],ml.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ml.prototype,"resizable",void 0),(0,C.Cg)([l.attr],ml.prototype,"tabindex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"filter-by-contains"})],ml.prototype,"filterByContains",void 0),(0,C.Cg)([l.observable],ml.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],ml.prototype,"slottedDatasource",void 0),(0,C.Cg)([l.observable],ml.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],ml.prototype,"loading",void 0),(0,C.Cg)([l.observable],ml.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],ml.prototype,"open",void 0),(0,C.Cg)([l.observable],ml.prototype,"options",void 0),(0,C.Cg)([l.observable],ml.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],ml.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],ml.prototype,"scrollContainer",void 0),(0,C.Cg)([l.attr],ml.prototype,"position",void 0),(0,C.Cg)([l.observable],ml.prototype,"onAllSelectedCallback",void 0),(0,C.Cg)([l.observable],ml.prototype,"itemRenderer",void 0),(0,C.Cg)([l.volatile],ml.prototype,"getDisplayValue",null),(0,C.Cg)([l.volatile],ml.prototype,"getPlaceholder",null),(0,C.Cg)([l.volatile],ml.prototype,"isAllOptionsDisabled",null),(0,C.Cg)([l.volatile],ml.prototype,"areAllOptionsSelected",null),(0,C.Cg)([l.volatile],ml.prototype,"showCreatable",null),(0,C.Cg)([l.observable],ml.prototype,"optionsHeaderSlottedNodes",void 0);const gl=ml.compose(Object.assign({baseName:"multiselect",template:ul,styles:ll,shadowOptions:hl},pl)),vl={k:1e3,m:1e6,b:1e9},fl=/^(.*?)([kmb])$/i;class bl{constructor(e){const t=new Intl.NumberFormat(e).formatToParts(12345.6),i=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),o=new Map(i.map((e,t)=>[e,t]));this._group=new RegExp(`[${t.find(e=>"group"===e.type).value}]`,"g"),this._decimal=new RegExp(`[${t.find(e=>"decimal"===e.type).value}]`),this._separator=new RegExp(`[$${t.find(e=>"decimal"===e.type).value}](?:0*$|[^0]0+$)`),this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._index=e=>o.get(e)}parse(e){const t=e.trim().match(fl),i=t?vl[t[2].toLowerCase()]:1;return(e=(t?t[1]:e).trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e*i:NaN}hasSeparator(e){return this._separator.test(e)}}var yl=i(6526);function wl(e){class t extends e{constructor(){super(...arguments),this.hideAffixFromScreenReader=!1}get controlAriaDescribedby(){var e;const t=null===(e=this.ariaDescribedby)||void 0===e?void 0:e.trim(),i=[];if(t&&i.push(...t.split(/\s+/).filter(Boolean)),!this.hideAffixFromScreenReader){const e=this.id||"control";this.prefix&&i.push(`${e}-prefix`),this.suffix&&i.push(`${e}-suffix`)}const o=new Set,n=[];for(const e of i)o.has(e)||(o.add(e),n.push(e));return n.join(" ")||void 0}}return(0,C.Cg)([l.attr],t.prototype,"prefix",void 0),(0,C.Cg)([l.attr],t.prototype,"suffix",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-affix-from-screen-reader",mode:"boolean"})],t.prototype,"hideAffixFromScreenReader",void 0),t}const Cl=l.css`
|
|
3172
3172
|
.label-hidden {
|
|
3173
3173
|
margin: 0;
|
|
3174
3174
|
}
|
|
@@ -3353,7 +3353,7 @@
|
|
|
3353
3353
|
${(0,a.endSlotTemplate)(e,t)}
|
|
3354
3354
|
</div>
|
|
3355
3355
|
</template>
|
|
3356
|
-
`,Sl=12345.6,El=9,Ol=(e,t)=>{var i;return{decimalSeparator:(null===(i=new Intl.NumberFormat(t).formatToParts(Sl).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)||"."}},Tl=(e,t)=>{var i,o,n;const s=new Intl.NumberFormat(t).formatToParts(Sl),a=null===(i=s.find(e=>"group"===e.type))||void 0===i?void 0:i.value,r=null!==(n=null===(o=s.find(e=>"decimal"===e.type))||void 0===o?void 0:o.value)&&void 0!==n?n:".";let l=e.trim();return a&&(l=l.split(a).join("")),"."!==r&&(l=l.replace(r,".")),l},kl=(e,t)=>{var i,o;const n=null!==(o=null===(i=new Intl.NumberFormat(t).formatToParts(Sl).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)&&void 0!==o?o:".";let s=0;for(const t of e)t===n&&(s+=1);return s},Dl=(e,t)=>kl(e,t)>1,Il=(e,t,i,o)=>((e,t,i)=>{const o=Tl(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&kl(t,i)>0,Rl=(e,t,i)=>{const o=e.startsWith("-"),n=o?e.slice(1):e,s=n.indexOf("."),a=-1===s?n:n.slice(0,s);let r=-1===s?"":n.slice(s+1);const l=i.minimumFractionDigits,d=i.maximumFractionDigits;void 0!==d&&r.length>d&&(r=r.slice(0,d)),void 0!==l&&r.length<l&&(r=r.padEnd(l,"0"));const c=((e,t)=>{var i,o;const n=e.startsWith("-"),s=n?e.slice(1):e,a=null!==(o=null===(i=new Intl.NumberFormat(t).formatToParts(1234567).find(e=>"group"===e.type))||void 0===i?void 0:i.value)&&void 0!==o?o:",",r=[];let l=s;for(;l.length>3;)r.unshift(l.slice(-3)),l=l.slice(0,-3);r.unshift(l);const d=r.join(a);return n?`-${d}`:d})(o?`-${a}`:a,t),{decimalSeparator:u}=Ol(0,t);return-1===s?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},Al=(e,t)=>{const{decimalSeparator:i}=Ol(0,t);return"."===i?e:e.replace(/\./g,i)},Ll=(e,t,i)=>""===e?"":(e=>{const t=e.replace(/^-/,""),i=t.indexOf(".");return(-1===i?t:t.slice(0,i)).length>15})(e)&&/^-?\d+(\.\d*)?$/.test(e)?Rl(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),Fl=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,s=n?e.length-o-1:0,a=t.minimumFractionDigits,r=t.maximumFractionDigits;if(s>=a&&s<=r)return e;let l=e;if(s<a){n||(l=e+".");l+="0".repeat(a-s)}if(s>r){const t=n?e.substring(0,o):e,i=(n?e.substring(o+1):"").substring(0,r);l=0===r?t:`${t}.${i}`}return l},Nl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,s=null!=o?o:12;if(Dl(n,t))return"";let a;if(i)a=((e,t)=>{const i=Tl(String(e),t),o=i.replace(/^-/,"").replace(".","").length;return/^-?\d+(\.\d+)?$/.test(i)&&o>15?i:String(new bl(t).parse(String(e)))})(n,t);else{const{decimalSeparator:e}=Ol(0,t);if("."!==e){a=n.replace(new RegExp(`\\${e}`,"g"),".");const t=a.indexOf(".");-1!==t&&(a=a.substring(0,t))}else a=n}a=String(a);if(!/^-?\d*\.?\d+$/.test(a))return"";if(void 0!==s){if(a.replace(".","").replace(/^0+/,"").length>s){const e=a.indexOf(".");if(-1!==e){const t=a.substring(0,e),i=t.length;if(i>=s)return a.substring(0,s);{const o=s-i;return`${t}.${a.substring(e+1).substring(0,o)}`}}return a.substring(0,s)}}return a},Ml=(e,t,i,o)=>{if(void 0!==i&&kl(e,t)>0){const n=Tl(e,t),s=n.indexOf("."),a=-1===s?n:n.slice(0,s);if(Il(void 0!==o?o:a,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=Ol(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp(`${n}(\\d*?)(0+)$`),a=e.match(s);if(a){const e=a[1],i=a[2],o=String(t);if(!isNaN(Number(t))){if(o.includes(".")){const t=o.split(".")[1],n=Math.max(0,i.length-(t.length-e.length));return o+"0".repeat(n)}return o+"."+e+i}}return String(t)})(e,Nl(e,t,!0,i),t)},_l=(e,t,i=!0,o,n,s)=>{const a=Nl(e,t,i,s);if(!a)return"";const r=a.replace(/^-/,"").replace(".","").length;if(/^-?\d+$/.test(a)&&r>15)try{return((e,t,i)=>{let o=BigInt(e);if(void 0!==i&&!Number.isNaN(i)){const e=BigInt(Math.trunc(i));o>e&&(o=e)}if(void 0!==t&&!Number.isNaN(t)){const e=BigInt(Math.trunc(t));o<e&&(o=e)}return o.toString()})(a,o,n)}catch(e){return a}let l=parseFloat(a);return isNaN(l)?l="":(l=Math.min(l,null!=n?n:l),l=Math.max(l,null!=o?o:l)),String(l)},Hl=e=>{try{const t="string"==typeof e?e:e.toString(),i=t.indexOf(".");if(-1===i)return 1;const o=t.substring(i+1).length;if(0===o)return 1;const n=Math.pow(10,-o);return parseFloat(n.toFixed(o))}catch(t){const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return 1;const n=i.substring(o+1).length;if(0===n)return 1;const s=Math.pow(10,-n);return parseFloat(s.toFixed(n))}};class Pl extends(wl(r.NumberField)){constructor(){super(...arguments),this.autocomplete="off",this.hideStep=!1,this.value="",this.withFormatting=!1,this.locale="en-US",this.autoStepPrecision=!1,this.maximumInputPrecision=12,this.options={maximumFractionDigits:3,minimumFractionDigits:0}}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}stepUp(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Hl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)+t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))+1;if(a<=El){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=El?(e=o+e,t=0):(e="0"+e,t=1)}return 1===t?parseInt(i.substring(0,o))+1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)+t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=_l(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}stepDown(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Hl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)-t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))-1;if(a>=0){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=El.toString()+e,t=1)}return 1===t?parseInt(i.substring(0,o))-1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)-t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=_l(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}restoreControlToCommittedValue(){if(!this.control)return;const e=this.value;if(!e)return this.control.value="",void(this.isUserInput=!1);this.control.value=this.withFormatting&&e?Ll(e,this.locale,this.options):Al(String(e),this.locale),this.isUserInput=!1}handleKeyDown(e){return e.key===yl.Mm&&(this.isUserInput=!1),super.handleKeyDown(e)}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(Dl(this.control.value,this.locale)||Il(this.value,this.control.value,this.locale,this.maximumInputPrecision)?this.restoreControlToCommittedValue():(this.isUserInput=!0,this.withFormatting&&!new bl(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=this.value,t=Ml(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?Ll(t,this.locale,this.options):Al(t,this.locale);this.control.value=Fl(e,this.options)}this.value=Fl(t,this.options),this.$emit("input")}else this.restoreControlToCommittedValue()}):this.withFormatting||this.hasSeparatorWithoutDecimals().test(this.control.value)||l.DOM.queueUpdate(()=>{var e;this.control&&(this.control.value=this.control.value.replace(/[^0-9\-+e.]/g,"")),this.value=(null===(e=this.control)||void 0===e?void 0:e.value)||"",this.$emit("input")})))}valueChanged(e,t){if(null!=t||!this.control)return null!=t&&t!==e?this.isUserInput?void 0:(this.value=_l(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.isUserInput||this.control&&(this.control.value=this.withFormatting&&this.value?Ll(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=_l(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?Fl(e,this.options):e),this.control.value=this.withFormatting&&this.value?Ll(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],Pl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],Pl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],Pl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],Pl.prototype,"maximumInputPrecision",void 0);const zl={delegatesFocus:!0,mode:"open"},Ul={stepDownGlyph:'\n <svg class="step-down-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z"/>\n </svg>\n ',stepUpGlyph:'\n <svg class="step-up-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z"/>\n </svg>\n '},Bl=Pl.compose(Object.assign({baseName:"number-field",template:$l,styles:xl,shadowOptions:zl},Ul)),Vl=(e,t)=>l.css`
|
|
3356
|
+
`,Sl=9,El=new Map,Ol=e=>{var t,i;const o=El.get(e);if(o)return o;const n=new Intl.NumberFormat(e).formatToParts(12345.6),s=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)],a={decimalSeparator:(null===(t=n.find(e=>"decimal"===e.type))||void 0===t?void 0:t.value)||".",groupSeparator:(null===(i=n.find(e=>"group"===e.type))||void 0===i?void 0:i.value)||"",digits:new Set([..."0123456789",...s]),zeroDigits:new Set(["0",s[s.length-1]])};return El.set(e,a),a},Tl=(e,t)=>{const{decimalSeparator:i,groupSeparator:o}=Ol(t);return{decimalSeparator:i,groupSeparator:o}},kl=/[kmb]\s*$/i,Dl=(e,t)=>{const{decimalSeparator:i,digits:o,zeroDigits:n}=Ol(t);let s=!0;return t=>{const a=e[t];return a===i?(s=!1,!0):"-"===a||"−"===a||!!o.has(a)&&((!s||!n.has(a))&&(s=!1,!0))}},Il=(e,t,i,o)=>{const n=Math.min(Math.max(i,0),e.length),s=e.length-t.length;if(s>0&&s<=n&&e.slice(0,n-s)+e.slice(n)===t)return n-s;if(n===e.length&&kl.test(e))return t.length;const a=Dl(e,o);let r=0;for(let e=0;e<n;e+=1)a(e)&&(r+=1);const l=Dl(t,o);if(0===r){for(let e=0;e<t.length;e+=1)if(l(e))return e;return n===e.length?t.length:0}let d=0;for(let e=0;e<t.length;e+=1)if(l(e)&&(d+=1,d===r))return e+1;return t.length},Rl=(e,t)=>{const{groupSeparator:i,decimalSeparator:o}=Ol(t);let n=e.trim();return i&&(n=n.split(i).join("")),"."!==o&&(n=n.replace(o,".")),n},Al=(e,t)=>{const{decimalSeparator:i}=Ol(t);let o=0;for(const t of e)t===i&&(o+=1);return o},Ll=(e,t)=>Al(e,t)>1,Fl=(e,t,i,o)=>((e,t,i)=>{const o=Rl(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&Al(t,i)>0,Nl=(e,t,i)=>{const o=e.startsWith("-"),n=o?e.slice(1):e,s=n.indexOf("."),a=-1===s?n:n.slice(0,s);let r=-1===s?"":n.slice(s+1);const l=i.minimumFractionDigits,d=i.maximumFractionDigits;void 0!==d&&r.length>d&&(r=r.slice(0,d)),void 0!==l&&r.length<l&&(r=r.padEnd(l,"0"));const c=((e,t)=>{const i=e.startsWith("-"),o=i?e.slice(1):e,n=Ol(t).groupSeparator||",",s=[];let a=o;for(;a.length>3;)s.unshift(a.slice(-3)),a=a.slice(0,-3);s.unshift(a);const r=s.join(n);return i?`-${r}`:r})(o?`-${a}`:a,t),{decimalSeparator:u}=Tl(0,t);return-1===s?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},Ml=(e,t)=>{const{decimalSeparator:i}=Tl(0,t);return"."===i?e:e.replace(/\./g,i)},_l=(e,t,i)=>""===e?"":(e=>{const t=e.replace(/^-/,""),i=t.indexOf(".");return(-1===i?t:t.slice(0,i)).length>15})(e)&&/^-?\d+(\.\d*)?$/.test(e)?Nl(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),Hl=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,s=n?e.length-o-1:0,a=t.minimumFractionDigits,r=t.maximumFractionDigits;if(s>=a&&s<=r)return e;let l=e;if(s<a){n||(l=e+".");l+="0".repeat(a-s)}if(s>r){const t=n?e.substring(0,o):e,i=(n?e.substring(o+1):"").substring(0,r);l=0===r?t:`${t}.${i}`}return l},Pl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,s=null!=o?o:12;if(Ll(n,t))return"";let a;if(i)a=((e,t)=>{const i=Rl(String(e),t),o=i.replace(/^-/,"").replace(".","").length;return/^-?\d+(\.\d+)?$/.test(i)&&o>15?i:String(new bl(t).parse(String(e)))})(n,t);else{const{decimalSeparator:e}=Tl(0,t);if("."!==e){a=n.replace(new RegExp(`\\${e}`,"g"),".");const t=a.indexOf(".");-1!==t&&(a=a.substring(0,t))}else a=n}a=String(a);if(!/^-?\d*\.?\d+$/.test(a))return"";if(void 0!==s){if(a.replace(".","").replace(/^0+/,"").length>s){const e=a.indexOf(".");if(-1!==e){const t=a.substring(0,e),i=t.length;if(i>=s)return a.substring(0,s);{const o=s-i;return`${t}.${a.substring(e+1).substring(0,o)}`}}return a.substring(0,s)}}return a},zl=(e,t,i,o)=>{if(void 0!==i&&Al(e,t)>0){const n=Rl(e,t),s=n.indexOf("."),a=-1===s?n:n.slice(0,s);if(Fl(void 0!==o?o:a,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=Tl(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp(`${n}(\\d*?)(0+)$`),a=e.match(s);if(a){const e=a[1],i=a[2],o=String(t);if(!isNaN(Number(t))){if(o.includes(".")){const t=o.split(".")[1],n=Math.max(0,i.length-(t.length-e.length));return o+"0".repeat(n)}return o+"."+e+i}}return String(t)})(e,Pl(e,t,!0,i),t)},Ul=(e,t,i=!0,o,n,s)=>{const a=Pl(e,t,i,s);if(!a)return"";const r=a.replace(/^-/,"").replace(".","").length;if(/^-?\d+$/.test(a)&&r>15)try{return((e,t,i)=>{let o=BigInt(e);if(void 0!==i&&!Number.isNaN(i)){const e=BigInt(Math.trunc(i));o>e&&(o=e)}if(void 0!==t&&!Number.isNaN(t)){const e=BigInt(Math.trunc(t));o<e&&(o=e)}return o.toString()})(a,o,n)}catch(e){return a}let l=parseFloat(a);return isNaN(l)?l="":(l=Math.min(l,null!=n?n:l),l=Math.max(l,null!=o?o:l)),String(l)},Bl=e=>{try{const t="string"==typeof e?e:e.toString(),i=t.indexOf(".");if(-1===i)return 1;const o=t.substring(i+1).length;if(0===o)return 1;const n=Math.pow(10,-o);return parseFloat(n.toFixed(o))}catch(t){const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return 1;const n=i.substring(o+1).length;if(0===n)return 1;const s=Math.pow(10,-n);return parseFloat(s.toFixed(n))}};class Vl extends(wl(r.NumberField)){constructor(){super(...arguments),this.autocomplete="off",this.hideStep=!1,this.value="",this.withFormatting=!1,this.locale="en-US",this.autoStepPrecision=!1,this.maximumInputPrecision=12,this.options={maximumFractionDigits:3,minimumFractionDigits:0}}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}stepUp(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Bl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)+t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))+1;if(a<=Sl){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=Sl?(e=o+e,t=0):(e="0"+e,t=1)}return 1===t?parseInt(i.substring(0,o))+1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)+t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=Ul(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}stepDown(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Bl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)-t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))-1;if(a>=0){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=Sl.toString()+e,t=1)}return 1===t?parseInt(i.substring(0,o))-1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)-t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=Ul(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}writeControlValue(e){const t=this.control,i=t.value;if(i===e)return;const{selectionStart:o,selectionEnd:n}=t;if(t.value=e,null===o||t.getRootNode().activeElement!==t)return;const s=Il(i,e,o,this.locale),a=null===n||n===o?s:Il(i,e,n,this.locale);t.setSelectionRange(s,a)}restoreControlToCommittedValue(){if(!this.control)return;const e=this.value;this.writeControlValue(e?this.withFormatting?_l(e,this.locale,this.options):Ml(String(e),this.locale):""),this.isUserInput=!1}skipGroupSeparator(e){if(!this.withFormatting||e.ctrlKey||e.metaKey||e.altKey)return;const{value:t,selectionStart:i,selectionEnd:o}=this.control;if(null===i||i!==o)return;const{groupSeparator:n}=Tl(0,this.locale);n&&(e.key===yl.R9&&t[i-1]===n?this.control.setSelectionRange(i-1,i-1):e.key===yl.De&&t[i]===n&&this.control.setSelectionRange(i+1,i+1))}handleKeyDown(e){return e.key===yl.Mm&&(this.isUserInput=!1),!this.control||e.key!==yl.R9&&e.key!==yl.De||this.skipGroupSeparator(e),super.handleKeyDown(e)}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(Ll(this.control.value,this.locale)||Fl(this.value,this.control.value,this.locale,this.maximumInputPrecision)?this.restoreControlToCommittedValue():(this.isUserInput=!0,this.withFormatting&&!new bl(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=this.value,t=zl(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?_l(t,this.locale,this.options):Ml(t,this.locale);this.writeControlValue(Hl(e,this.options))}this.value=Hl(t,this.options),this.$emit("input")}else this.restoreControlToCommittedValue()}):this.withFormatting||this.hasSeparatorWithoutDecimals().test(this.control.value)||l.DOM.queueUpdate(()=>{var e;this.control&&this.writeControlValue(this.control.value.replace(/[^0-9\-+e.]/g,"")),this.value=(null===(e=this.control)||void 0===e?void 0:e.value)||"",this.$emit("input")})))}valueChanged(e,t){if(null!=t||!this.control)return null!=t&&t!==e?this.isUserInput?void 0:(this.value=Ul(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.isUserInput||this.control&&(this.control.value=this.withFormatting&&this.value?_l(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=Ul(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?Hl(e,this.options):e),this.control.value=this.withFormatting&&this.value?_l(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],Vl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],Vl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],Vl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],Vl.prototype,"maximumInputPrecision",void 0);const Gl={delegatesFocus:!0,mode:"open"},jl={stepDownGlyph:'\n <svg class="step-down-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z"/>\n </svg>\n ',stepUpGlyph:'\n <svg class="step-up-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z"/>\n </svg>\n '},Yl=Vl.compose(Object.assign({baseName:"number-field",template:$l,styles:xl,shadowOptions:Gl},jl)),Wl=(e,t)=>l.css`
|
|
3357
3357
|
:host {
|
|
3358
3358
|
display: block;
|
|
3359
3359
|
}
|
|
@@ -3376,7 +3376,7 @@
|
|
|
3376
3376
|
::slotted(*) {
|
|
3377
3377
|
padding-left: 20px;
|
|
3378
3378
|
}
|
|
3379
|
-
`,
|
|
3379
|
+
`,ql=(e,t)=>l.html`
|
|
3380
3380
|
<template role="option">
|
|
3381
3381
|
<div class="label" part="label" role="presentation">${e=>e.groupLabel}</div>
|
|
3382
3382
|
|
|
@@ -3384,16 +3384,16 @@
|
|
|
3384
3384
|
<slot></slot>
|
|
3385
3385
|
</div>
|
|
3386
3386
|
</template>
|
|
3387
|
-
`;class
|
|
3387
|
+
`;class Kl extends a.ListboxOption{connectedCallback(){super.connectedCallback(),this.disabled=!0}}(0,C.Cg)([(0,l.attr)({attribute:"label"})],Kl.prototype,"groupLabel",void 0);const Xl=Kl.compose({baseName:"optgroup",template:ql,styles:Wl});var Jl=i(92277);var Ql=i(72154),Zl=i.n(Ql),ed=i(57565),td=i.n(ed),id=i(13160),od=i(24669),nd=i(5709),sd=i(45230);const ad={windowEvents:["online","offline","pageshow"],documentEvents:["visibilitychange"],genesisConnectEvents:["stream","commit"],ignoredGenesisResources:[],startDelay:5e3,checkInterval:1e4,checkTimeout:3e3,resourceChecks:e=>(0,C.sH)(void 0,void 0,void 0,function*(){const t=(0,ui.tn)(),i=yield t.getMoreColumns(e),o=Date.now(),n=i;return{isConnected:i.MESSAGE_TYPE===li.Go.MORE_COLUMNS_ACK,lastUpdated:o,lastMessage:n}}),resourceDataLogon:({message:e,functions:t})=>{const{onMessage:i,onError:o}=t;(0,sd.Ol)().sendForStream(e,i,o)}},rd=a.DI.createInterface(e=>e.instance(ad)),ld="system-health-changed";var dd;const cd=(0,it.createLogger)("network-monitor",{level:it.LogLevels.info}),ud=Date.now(),hd=(null===(dd=window.navigator)||void 0===dd?void 0:dd.userAgent)?Zl().parse(window.navigator.userAgent):void 0,pd=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:"string"==typeof e?e:td()(e,void 0,2,t);class md{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>(0,C.sH)(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;cd.info("Run health checks, triggered by",pd(e),"| Active resources",this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let i=this.getFormattedTimestamp(this.getNowTimestamp());const o=yield this.isOnlineCheck();o?cd.debug(`Network connected at ${i}`):cd.warn(`Network disconnected at ${i}`);const n=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),o),s=this.preFlightSocketChecks(n);if(s||cd.debug("Socket pre-flight checks failed"),!o||!s){cd.debug("Aborting remaining health checks");const e=[...this.resources].reduce((e,[t,i])=>{const n=e[i.resourceName];return n?(n.sourceRef=[...n.sourceRef,i.message.SOURCE_REF],e):Object.assign(Object.assign({},e),{[i.resourceName]:this.normaliseResourceHealth({name:i.resourceName,sourceRef:[i.message.SOURCE_REF],isConnected:i.isConnected,lastUpdated:i.lastUpdated},o)})},{});return this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:e,resourcesAllConnected:!1,socket:n}),void(this.isRunningChecks=!1)}let a=!0;const r=[];this.resources.forEach((e,t)=>{const{resourceName:o,message:n,functions:s}=e,{resourceChecks:l=this.config.resourceChecks,resourceDataLogon:d=this.config.resourceDataLogon}=s,{SOURCE_REF:c}=n;let u,h,p,m,g,v=!1;r.push((()=>(0,C.sH)(this,void 0,void 0,function*(){var n,s,r;try{cd.debug(`Running health check against ${o}`);const e=yield Promise.race([l(c,t),(s=this.config.checkTimeout,r=()=>({isConnected:!1,lastUpdated:this.getNowTimestamp(),timeout:!0}),new Promise(e=>{setTimeout(()=>{e(r())},s)}))]);v=e.isConnected,u=e.lastUpdated,h=e.lastMessage,m=e.timeout}catch(e){v=!1,u=this.getNowTimestamp(),p=e,h=null!==(n=null==e?void 0:e.receivedMessage)&&void 0!==n?n:e}return g=(null==h?void 0:h.MESSAGE_TYPE)===li.Go.MSG_NACK||(0,li.z2)(h,id.v.NOT_FOUND),i=this.getFormattedTimestamp(null!=u?u:this.getNowTimestamp()),v?cd.debug(`${o} is healthy at ${i}`):cd.warn(`${o} is not healthy at ${i}`),h&&cd.debug(`${o} messaged at ${i}`,pd(h)),p&&cd.error(`${o} errored at ${i}`,pd(p)),m&&cd.warn(`${o} timed out at ${i}`),g&&(cd.error(`${o} issue, re-attempting data logon at ${i}`),d(e)),a&&(a=v),{name:o,sourceRef:[c],isConnected:v,lastUpdated:u,lastError:p}}))())});const l=(yield Promise.allSettled(r)).reduce((e,t)=>{if("fulfilled"===t.status){const i=e[t.value.name];return i?(i.sourceRef=[...i.sourceRef,...t.value.sourceRef],e):Object.assign(Object.assign({},e),{[t.value.name]:this.normaliseResourceHealth(t.value)})}return cd.warn("Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult."),e},{});cd.debug("Health checks complete"),this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:l,resourcesAllConnected:a,socket:n}),this.isRunningChecks=!1}),void 0!==this.config.logLevel&&(cd.level=this.config.logLevel)}create(){this.resources?cd.warn("NetworkMonitor already created. If this is intentional, please call NetworkMonitor.destroy first."):(this.addListeners(),this.resources=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;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.addEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.addEventListener(e,this.runAllChecks)),this.config.genesisConnectEvents.includes("stream")&&this.unsubscribableObservers.push(this.connectEvents.addStreamListener(({detail:e})=>{const{functions:t,message:i,resourceName:o,stream:n}=e;this.config.ignoredGenesisResources.includes(o)||this.addResource(n,{functions:t,message:i,resourceName:o})},({detail:e})=>{const{resourceName:t,stream:i}=e;this.config.ignoredGenesisResources.includes(t)||this.removeResource(i)},({detail:e})=>{var t;const{resourceName:i,stream:o,error:n}=e,s=null!==(t=n.receivedMessage)&&void 0!==t?t:n;let a="";(0,li.z2)(s,id.v.NOT_FOUND)?a="Please check the resource is running.":(0,li.z2)(s,id.v.FORBIDDEN)&&(a="You are not authorised to access this resource, removing it from monitoring.",this.removeResource(o)),cd.error(`${i} errored at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,a,n)})),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})=>{const{resourceName:t,error:i}=e;i&&cd.error(`${t} had an unrecoverable error at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,"Please check the resource is running.",i)}))}removeListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.removeEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.removeEventListener(e,this.runAllChecks)),this.unsubscribableObservers.forEach(e=>e()),this.unsubscribableObservers.length=0}reportSystemHealth(e){var t;const i=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseEventDetail(e);(this.status.isHealthy?cd.debug:cd.warn)("Emitting 'system-health-changed' event",pd(this.status)),null==i||i.dispatchEvent(new CustomEvent(ld,{detail:this.status,bubbles:i!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(cd.debug("Network monitoring no longer required. Please check your network and reload your application."),this.destroy())}reportStabilityToGenesis(e){return(0,C.sH)(this,void 0,void 0,function*(){return cd.debug("User requested report stability to Genesis."),cd.info("Please attach this data to your Genesis Support request: \n",JSON.stringify(e,null,2)),!0})}normaliseResourceHealth(e,t=!0){var i;const o=!!t&&e.isConnected,n=null!==(i=e.lastUpdated)&&void 0!==i?i:this.getNowTimestamp();return Object.assign(Object.assign({},e),{isConnected:o,lastUpdated:n})}normaliseSerializedSocketStatus(e,t=!0){const i=!!t&&e.isConnected,o=!i;return Object.assign(Object.assign({},e),{isConnected:i,isDisconnected:o})}normaliseEventDetail(e){var t,i,o,n;const s=!!((null===(t=e.socket)||void 0===t?void 0:t.isConfigured)?e.isOnline&&(null===(i=e.socket)||void 0===i?void 0:i.isConnected)&&e.resourcesAllConnected:e.isOnline),a=null!==(o=e.lastUpdated)&&void 0!==o?o:this.getNowTimestamp(),r=null!==(n=e.nextUpdate)&&void 0!==n?n:this.getNextTimestamp(),l=e.isAuthenticated&&this.user?this.user.username:void 0,d=Object.assign(Object.assign({},e),{browserInformation:hd,username:l,isHealthy:s,lastUpdated:a,nextUpdate:r,firstUpdated:ud,runAllChecks:()=>{cd.debug("User activated run checks command starting."),this.runAllChecks("user requested")},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(d)});return d}preFlightSocketChecks(e){if(!e.isConfigured)return cd.debug("Socket not configured"),!1;if(e.isReconnecting)return cd.debug("Socket reconnecting"),!1;if(e.isConnecting)return cd.debug("Socket connecting"),!1;if(e.isDisconnected){const t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:"";return cd.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&cd.debug("Socket reconnection limit reached"),!1}const t=this.user.isAuthenticated?"with":"without";return cd.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return(0,pi.zT)(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)}}(0,C.Cg)([rd],md.prototype,"config",void 0),(0,C.Cg)([nd.S5],md.prototype,"socketStatus",void 0),(0,C.Cg)([od.a4],md.prototype,"connectEvents",void 0),(0,C.Cg)([Jl.KJ],md.prototype,"user",void 0),(0,C.Cg)([l.observable],md.prototype,"status",void 0);const gd=a.DI.createInterface(e=>e.singleton(md));const vd=(e,t)=>l.css`
|
|
3388
3388
|
${(0,r.progressStyles)(e,t)}
|
|
3389
3389
|
:host {
|
|
3390
3390
|
height: calc(var(--design-unit) * 2px);
|
|
3391
3391
|
}
|
|
3392
|
-
`,
|
|
3392
|
+
`,fd=(e,t)=>(0,a.progressTemplate)(e,t);class bd extends r.Progress{}const yd=void 0,wd={indeterminateIndicator1:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>',indeterminateIndicator2:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>'},Cd=bd.compose(Object.assign({baseName:"progress",template:fd,styles:vd,shadowOptions:yd},wd));function xd(e){return new Proxy(e,{get:(e,t,...i)=>{if(["withPrefix","withShadowRootMode","withElementDisambiguation"].includes(t))throw new Error("Modification of the Design System is not allowed.");return Reflect.get(e,t,...i)}})}const $d=(e,t="foundation",i,s)=>{e&&Jo(null!=i?i:o,null!=s?s:n,e);return xd(a.DesignSystem.getOrCreate(e).withPrefix(t))},Sd="app",Ed="component";$d().register(Cd({prefix:"next-update"}));class Od extends a.FoundationElement{constructor(){super(...arguments),this.timeTillNextUpdate={totalMs:1e4,remainMs:1e4,remainPercent:100},this.mode=Sd,this.status={isOnline:!0,isHealthy:!0,browserInformation:{},socket:{},resources:{}},this.onSystemHealthChanged=e=>{this.status=e.detail,this.resourceList=Object.values(this.status.resources).sort((e,t)=>Number(t.isConnected)-Number(e.isConnected))},this.onOpen=(e=!1)=>{this.isOpen=!0,this.wasOpenedByUser=e,this.isDismissed=!1},this.onClose=()=>{this.isOpen=!1,this.wasOpenedByUser=!1,this.isDismissed=!1},this.onDismiss=()=>{this.isDismissed||this.status.isHealthy?this.onClose():this.isDismissed=!0},this.onUpdateStatus=()=>{this.status.runAllChecks()},this.onReportStatus=()=>{this.status.reportStabilityToGenesis()},this.onReloadWindow=()=>{location.reload()},this.onDocumentKeydown=e=>{if(!e.defaultPrevented)switch(e.key){case yl.Is.ArrowUp:e.ctrlKey&&e.altKey&&!this.isOpen&&(this.onOpen(!0),e.preventDefault());break;case yl.Is.ArrowDown:e.ctrlKey&&e.altKey&&this.isOpen&&(this.onClose(),e.preventDefault());break;case yl.F9:this.isOpen&&(this.onDismiss(),e.preventDefault())}}}isOpenChanged(){this.updateTemplateClassNames()}isDismissedChanged(){this.updateTemplateClassNames()}modeChanged(){this.$fastController.isConnected&&this.mode===Ed&&ot.warn("SystemHealthOverlay has support for app overlays only right now.")}logLevelChanged(){cd.level=this.logLevel}statusChanged(e,t){this.updateClassNames(),this.$fastController.isConnected&&(!1!==(null==t?void 0:t.isHealthy)||this.isOpen||this.onOpen(),!0===(null==t?void 0:t.isHealthy)&&this.isOpen&&!this.wasOpenedByUser&&this.onClose(),this.startTimeTillNextUpdateCountdown())}updateClassNames(){this.isOnlineClassNames=(0,x.x)(["healthy",this.status.isOnline],["unhealthy",!this.status.isOnline]),this.isHealthyClassNames=(0,x.x)(["healthy",this.status.isHealthy],["unhealthy",!this.status.isHealthy]),this.isSocketHealthyClassNames=(0,x.x)(["healthy",this.isSocketHealthy],["unhealthy",!this.isSocketHealthy]),this.resourcesAllConnectedClassNames=(0,x.x)(["healthy",this.status.resourcesAllConnected],["unhealthy",!this.status.resourcesAllConnected],["hidden",!this.validResourceList]),this.updateTemplateClassNames()}updateTemplateClassNames(){this.templateClassNames=(0,x.x)(["open",this.isOpen],["dismissed",this.isDismissed]),this.containerClassNames=(0,x.x)(this.isHealthyClassNames,["open",this.isOpen],["dismissed",this.isDismissed])}startTimeTillNextUpdateCountdown(){const e=this.status.nextUpdate-Date.now();let t=e,i=100;clearInterval(this.timeTillNextUpdateInterval),this.timeTillNextUpdate={totalMs:e,remainMs:t,remainPercent:i},this.timeTillNextUpdateInterval=setInterval(()=>{t-=1e3,i=Math.floor(t/e*100),this.timeTillNextUpdate={totalMs:e,remainMs:t,remainPercent:i},t<0&&clearInterval(this.timeTillNextUpdateInterval)},1e3)}connectedCallback(){super.connectedCallback(),this.networkMonitor.create(),this.addEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.networkMonitor.destroy(),this.removeEventListeners()}get isSocketHealthy(){return this.status.isOnline&&(!this.status.socket.isConfigured||this.status.socket.isConfigured&&this.status.socket.isConnected)}get validResourceList(){var e;return(null===(e=this.resourceList)||void 0===e?void 0:e.length)>0}eventBridge(){var e;return null!==(e=this.config.eventEmitter)&&void 0!==e?e:document}addEventListeners(){this.eventBridge().addEventListener(ld,this.onSystemHealthChanged,!0),document.addEventListener("keydown",this.onDocumentKeydown)}removeEventListeners(){this.eventBridge().removeEventListener(ld,this.onSystemHealthChanged,!0),document.removeEventListener("keydown",this.onDocumentKeydown)}static getCheckmarkTemplate(e){return e?l.html`
|
|
3393
3393
|
<span class="checkmark">✔</span>
|
|
3394
3394
|
`:l.html`
|
|
3395
3395
|
<span class="checkmark">✘</span>
|
|
3396
|
-
`}}(0,C.Cg)([
|
|
3396
|
+
`}}(0,C.Cg)([rd],Od.prototype,"config",void 0),(0,C.Cg)([gd],Od.prototype,"networkMonitor",void 0),(0,C.Cg)([l.observable],Od.prototype,"resourceList",void 0),(0,C.Cg)([l.observable],Od.prototype,"isOpen",void 0),(0,C.Cg)([l.observable],Od.prototype,"wasOpenedByUser",void 0),(0,C.Cg)([l.observable],Od.prototype,"isDismissed",void 0),(0,C.Cg)([l.observable],Od.prototype,"templateClassNames",void 0),(0,C.Cg)([l.observable],Od.prototype,"containerClassNames",void 0),(0,C.Cg)([l.observable],Od.prototype,"isOnlineClassNames",void 0),(0,C.Cg)([l.observable],Od.prototype,"isHealthyClassNames",void 0),(0,C.Cg)([l.observable],Od.prototype,"isSocketHealthyClassNames",void 0),(0,C.Cg)([l.observable],Od.prototype,"resourcesAllConnectedClassNames",void 0),(0,C.Cg)([l.observable],Od.prototype,"timeTillNextUpdate",void 0),(0,C.Cg)([l.observable],Od.prototype,"saveDataCallback",void 0),(0,C.Cg)([l.attr],Od.prototype,"mode",void 0),(0,C.Cg)([(0,l.attr)({attribute:"log-level",converter:l.nullableNumberConverter})],Od.prototype,"logLevel",void 0),(0,C.Cg)([l.observable],Od.prototype,"status",void 0);const Td=(e,t)=>l.html`
|
|
3397
3397
|
<template class="${e=>e.templateClassNames}">
|
|
3398
3398
|
<header class="${e=>e.isHealthyClassNames}" part="header">
|
|
3399
3399
|
<h1>System ${e=>(0,ba.fL)(e.isHealthyClassNames)}</h1>
|
|
@@ -3489,7 +3489,7 @@
|
|
|
3489
3489
|
`)}
|
|
3490
3490
|
</div>
|
|
3491
3491
|
<div class="controls">
|
|
3492
|
-
${e=>
|
|
3492
|
+
${e=>Od.getCheckmarkTemplate(e.status.isOnline)}
|
|
3493
3493
|
</div>
|
|
3494
3494
|
</div>
|
|
3495
3495
|
</dl>
|
|
@@ -3535,7 +3535,7 @@
|
|
|
3535
3535
|
</div>
|
|
3536
3536
|
</div>
|
|
3537
3537
|
<div class="controls">
|
|
3538
|
-
${e=>
|
|
3538
|
+
${e=>Od.getCheckmarkTemplate(e.isSocketHealthy)}
|
|
3539
3539
|
</div>
|
|
3540
3540
|
</div>
|
|
3541
3541
|
</dl>
|
|
@@ -3571,7 +3571,7 @@
|
|
|
3571
3571
|
</div>
|
|
3572
3572
|
</div>
|
|
3573
3573
|
<div class="controls">
|
|
3574
|
-
${e=>
|
|
3574
|
+
${e=>Od.getCheckmarkTemplate(e.isConnected)}
|
|
3575
3575
|
</div>
|
|
3576
3576
|
</div>
|
|
3577
3577
|
`)}
|
|
@@ -3579,7 +3579,7 @@
|
|
|
3579
3579
|
</section>
|
|
3580
3580
|
</div>
|
|
3581
3581
|
</template>
|
|
3582
|
-
`,
|
|
3582
|
+
`,kd=(e,t)=>l.css`
|
|
3583
3583
|
:host {
|
|
3584
3584
|
--font-family: Menlo, Consolas, monospace;
|
|
3585
3585
|
|
|
@@ -3850,7 +3850,7 @@
|
|
|
3850
3850
|
padding: 0.2em 0.5em;
|
|
3851
3851
|
background-color: var(--color-unhealthy-opacity-20);
|
|
3852
3852
|
}
|
|
3853
|
-
`,
|
|
3853
|
+
`,Dd=void 0,Id={},Rd=Od.compose(Object.assign({baseName:"system-health-overlay",template:Td,styles:kd,shadowOptions:Dd},Id)),Ad=l.css`
|
|
3854
3854
|
:host {
|
|
3855
3855
|
--pill-fill: var(--neutral-fill-rest, #e5e5e5);
|
|
3856
3856
|
--pill-fill-hover: var(--neutral-fill-hover, #d9d9d9);
|
|
@@ -3928,7 +3928,7 @@
|
|
|
3928
3928
|
.pill-remove:hover:not(:disabled) {
|
|
3929
3929
|
background: var(--pill-fill-hover);
|
|
3930
3930
|
}
|
|
3931
|
-
`,
|
|
3931
|
+
`,Ld=e=>l.html`
|
|
3932
3932
|
<div class="pill" part="pill" ?disabled=${e=>e.disabled}>
|
|
3933
3933
|
<button
|
|
3934
3934
|
class="pill-body"
|
|
@@ -3962,9 +3962,9 @@
|
|
|
3962
3962
|
</button>
|
|
3963
3963
|
`)}
|
|
3964
3964
|
</div>
|
|
3965
|
-
`,
|
|
3966
|
-
${e=>
|
|
3967
|
-
`,
|
|
3965
|
+
`,Fd=l.html`
|
|
3966
|
+
${e=>Ld(T(e))}
|
|
3967
|
+
`,Nd=void 0,Md={};class _d extends a.FoundationElement{constructor(){super(...arguments),this.removable=!0,this.disabled=!1}handleBodyClick(){this.disabled||this.$emit("pill-click")}handleRemoveClick(e){null==e||e.stopPropagation(),this.disabled||this.$emit("remove")}}(0,C.Cg)([l.attr],_d.prototype,"label",void 0),(0,C.Cg)([l.attr],_d.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],_d.prototype,"removable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],_d.prototype,"disabled",void 0);const Hd=_d.compose(Object.assign({baseName:"pill",template:Fd,styles:Ad,shadowOptions:Nd},Md));var Pd=i(4934);const zd={toView:e=>JSON.stringify(e),fromView:e=>null==e?e:JSON.parse(e)};class Ud extends a.FoundationElement{constructor(){super(...arguments),this.show=!1,this.event="click",this.placement="bottom",this.flip=!1}selectorChanged(e,t){t!==e&&(this.popper&&this.popper.destroy(),this.target&&this.target.removeEventListener(this.event,this.toggle.bind(this)),this.target=this.getRootNode().querySelector(this.selector),this.target.addEventListener(this.event,this.toggle.bind(this)),this.popper=(0,Pd.n4)(this.target,this,this.buildOptions()))}placementChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}offsetChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}flipChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}buildOptions(){return{placement:this.placement,modifiers:[{name:"offset",options:{offset:this.offset||[0,0]}},{name:"flip",enabled:this.flip}]}}toggle(){this.show=!this.show}disconnectedCallback(){super.disconnectedCallback(),this.popper&&(this.popper.destroy(),this.popper=null)}}(0,C.Cg)([l.attr],Ud.prototype,"selector",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ud.prototype,"show",void 0),(0,C.Cg)([l.attr],Ud.prototype,"event",void 0),(0,C.Cg)([l.attr],Ud.prototype,"placement",void 0),(0,C.Cg)([(0,l.attr)({converter:zd})],Ud.prototype,"offset",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ud.prototype,"flip",void 0);const Bd=l.css`
|
|
3968
3968
|
:host {
|
|
3969
3969
|
display: none;
|
|
3970
3970
|
inset: unset !important;
|
|
@@ -3974,24 +3974,24 @@
|
|
|
3974
3974
|
:host([show]) {
|
|
3975
3975
|
display: block;
|
|
3976
3976
|
}
|
|
3977
|
-
`,
|
|
3977
|
+
`,Vd=l.html`
|
|
3978
3978
|
<template>
|
|
3979
3979
|
<slot></slot>
|
|
3980
3980
|
</template>
|
|
3981
|
-
`,
|
|
3981
|
+
`,Gd=Ud.compose({baseName:"popper",styles:Bd,template:Vd}),jd=(e,t)=>l.css`
|
|
3982
3982
|
${(0,r.progressRingStyles)(e,t)}
|
|
3983
|
-
`,
|
|
3983
|
+
`,Yd=(e,t)=>(0,a.progressRingTemplate)(e,t);class Wd extends r.Progress{}const qd=void 0,Kd={indeterminateIndicator:'\n <svg class="progress" part="progress" viewBox="0 0 16 16">\n <circle class="background" part="background" cx="8px" cy="8px" r="7px"></circle>\n <circle class="indeterminate-indicator-1" part="indeterminate-indicator-1" cx="8px" cy="8px" r="7px"></circle>\n </svg>\n '},Xd=Wd.compose(Object.assign({baseName:"progress-ring",template:Yd,styles:jd,shadowOptions:qd},Kd)),Jd=(e,t)=>l.css`
|
|
3984
3984
|
${(0,r.radioStyles)(e,t)}
|
|
3985
|
-
`,
|
|
3985
|
+
`,Qd=(e,t)=>(0,a.radioTemplate)(e,t);class Zd extends r.Radio{}const ec=void 0,tc={checkedIndicator:'\n <div part="checked-indicator" class="checked-indicator"></div>\n '},ic=Zd.compose(Object.assign({baseName:"radio",template:Qd,styles:Jd,shadowOptions:ec},tc)),oc=(e,t)=>l.css`
|
|
3986
3986
|
${(0,r.radioGroupStyles)(e,t)}
|
|
3987
|
-
`,
|
|
3987
|
+
`,nc=(e,t)=>(0,a.radioGroupTemplate)(e,t);class sc extends r.RadioGroup{}const ac=void 0,rc={},lc=sc.compose(Object.assign({baseName:"radio-group",template:nc,styles:oc,shadowOptions:ac},rc)),dc=l.css`
|
|
3988
3988
|
/* Host */
|
|
3989
3989
|
:host {
|
|
3990
3990
|
display: flex;
|
|
3991
3991
|
flex-direction: column;
|
|
3992
3992
|
width: 100%;
|
|
3993
3993
|
}
|
|
3994
|
-
`,
|
|
3994
|
+
`,cc=e=>l.html`
|
|
3995
3995
|
<template>
|
|
3996
3996
|
<${e}-scheduler-timezone
|
|
3997
3997
|
:timezone=${(0,U.O)(e=>e.timezone)}
|
|
@@ -4004,9 +4004,9 @@
|
|
|
4004
4004
|
?disable-tooltips=${e=>e.disableTooltips}
|
|
4005
4005
|
></${e}-scheduler-cron-builder>
|
|
4006
4006
|
</template>
|
|
4007
|
-
`,
|
|
4008
|
-
${e=>
|
|
4009
|
-
`;class
|
|
4007
|
+
`,uc=l.html`
|
|
4008
|
+
${e=>cc(T(e))}
|
|
4009
|
+
`;class hc extends a.FoundationElement{constructor(){super(...arguments),this.disableTooltips=!1,this.timezone="",this.cron=""}cronConfigChanged(){var e,t;this.timezone=(null===(e=this.cronConfig)||void 0===e?void 0:e.timezone)||"",this.cron=(null===(t=this.cronConfig)||void 0===t?void 0:t.cronExpression)||""}handleChange(e,t){e.stopPropagation();const{value:i}=e.target;this.cronConfig=Object.assign(Object.assign({},this.cronConfig),{[t]:i}),this.$emit("change",this.cronConfig)}}(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],hc.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],hc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],hc.prototype,"timezone",void 0),(0,C.Cg)([l.observable],hc.prototype,"cron",void 0),(0,C.Cg)([l.observable],hc.prototype,"cronConfig",void 0);const pc=void 0,mc={},gc=hc.compose(Object.assign({baseName:"scheduler",styles:dc,template:uc,shadowOptions:pc},mc)),vc=(e,t,i)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let o={title:e.title,body:e.body,iconName:e.iconName},n={};e.createdAt&&(o=Object.assign({createdAt:e.createdAt},o)),null!=e.logLevel&&(o=Object.assign({logLevel:e.logLevel},o)),e.toast&&(n=Object.assign({toast:e.toast},n),o=Object.assign({config:n},o)),ye(o,t,i)};var fc,bc,yc;!function(e){e.MINUTES="Minutes",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e.MONTHLY="Monthly",e.YEARLY="Yearly"}(fc||(fc={})),function(e){e.WEEK="Week",e.WORK_WEEK="Work week"}(bc||(bc={})),function(e){e.DATE="Date",e.DAY_OF_MONTH="Day of month"}(yc||(yc={}));const wc=[{value:"2",label:"Monday"},{value:"3",label:"Tuesday"},{value:"4",label:"Wednesday"},{value:"5",label:"Thursday"},{value:"6",label:"Friday"},{value:"7",label:"Saturday"},{value:"1",label:"Sunday"}],Cc=[{value:"1",label:"First"},{value:"2",label:"Second"},{value:"3",label:"Third"},{value:"4",label:"Fourth"},{value:"-1",label:"Last"}],xc=[{value:"1",label:"January"},{value:"2",label:"February"},{value:"3",label:"March"},{value:"4",label:"April"},{value:"5",label:"May"},{value:"6",label:"June"},{value:"7",label:"July"},{value:"8",label:"August"},{value:"9",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}],$c=12,Sc=31,Ec=6,Oc=7,Tc=24,kc=60,Dc=4,Ic=30;var Rc;!function(e){e.updateCronConfig="update-cron-config"}(Rc||(Rc={}));const Ac=e=>Number(e)>1?`/${e}`:"";const Lc=(e,t,i)=>{const o=Number(e);return!isNaN(o)&&o<=i&&o>=t};function Fc(e,t,i,o=!1,n=Lc){if("*"===e)return!0;if(o&&("?"===e||"L"===e))return!0;if(o&&e.endsWith("L"))return n(e.slice(0,-1),t,i);if(e.startsWith("*/"))return n(e.substring(2),1,i);if(e.startsWith("0/"))return n(e.substring(2),1,i);if(o&&e.includes("#")){const[o,s]=e.split("#");return n(o,t,i)&&n(s,1,Dc)}if(n(e,t,i))return!0;if(e.includes("-")){const[o,s]=e.split("-");return n(o,t,i)&&n(s,t,i)}return!!e.includes(",")&&e.split(",").every(e=>Fc(e,t,i,o,n))}function Nc(e,t){return{type:fc.DAILY,frequency:e.startsWith("*/")?e.split("*/")[1]:"1",weekType:"?"===t?bc.WEEK:bc.WORK_WEEK}}function Mc(e){const t=e.includes("/");return{type:fc.HOURLY,frequency:t?e.split("/")[1]:"1",during:t?"every_hour":"specific_hours",hours:t?void 0:e}}function _c(e,t="*"){const i="*"!==t&&"0/1"!==t;return{type:fc.MINUTES,frequency:e.includes("/")?e.split("/")[1]:"1",during:i?"specific_hours":"every_hour",hours:i?t:void 0}}function Hc(e){return{type:fc.WEEKLY,selectedDays:"*"!==e?new Set(e.split(",")):new Set}}const Pc=(e,t,i,o)=>{let n;return n="?"===t?{type:yc.DAY_OF_MONTH,day:o.split(/[L#]/)[0],weekNumber:o.includes("#")?o.split("#")[1]:"-1"}:{type:yc.DATE,dayDate:t},e===fc.YEARLY&&(n.month=i),n};function zc(e,t,i,o=Pc){return{type:fc.YEARLY,frequency:2===i.split("/").length?i.split("/")[1]:"1",dateOrDay:o(fc.YEARLY,e,t,i.split("/")[0])}}function Uc(e,t,i,o=Pc){return{type:fc.MONTHLY,frequency:t.startsWith("*/")?t.split("*/")[1]:"1",dateOrDay:o(fc.MONTHLY,e,t,i.split("/")[0])}}const Bc=l.css`
|
|
4010
4010
|
.input-container {
|
|
4011
4011
|
display: flex;
|
|
4012
4012
|
flex-direction: column;
|
|
@@ -4042,8 +4042,8 @@
|
|
|
4042
4042
|
width: 100%;
|
|
4043
4043
|
height: 0;
|
|
4044
4044
|
}
|
|
4045
|
-
`,
|
|
4046
|
-
${
|
|
4045
|
+
`,Vc=l.css`
|
|
4046
|
+
${Bc}
|
|
4047
4047
|
/* Host */
|
|
4048
4048
|
:host {
|
|
4049
4049
|
display: flex;
|
|
@@ -4103,32 +4103,32 @@
|
|
|
4103
4103
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
4104
4104
|
white-space: nowrap;
|
|
4105
4105
|
}
|
|
4106
|
-
`;var
|
|
4106
|
+
`;var Gc=i(20633);const jc=(e,t,i)=>l.html`
|
|
4107
4107
|
<${t}-icon tooltip="${()=>e}" name="${()=>i}"></${t}-icon>
|
|
4108
|
-
`,
|
|
4109
|
-
${
|
|
4110
|
-
`,
|
|
4108
|
+
`,Yc=e=>class extends e{$emit(...e){const[t,i,o]=((...e)=>{let[t,i,o]=e,n=i;var s;if(((null==(s=i)?void 0:s.hasOwnProperty("bubbles"))||(null==s?void 0:s.hasOwnProperty("cancelable"))||(null==s?void 0:s.hasOwnProperty("composed"))||(null==s?void 0:s.hasOwnProperty("broadcast")))&&(o=i,n=void 0),"string"!=typeof t)throw new Error("$emit event types must be typeof string.");return[t,n,o]})(...e);if(null==o?void 0:o.broadcast){const e=new CustomEvent(t,Object.assign({detail:i,bubbles:!0,composed:!0,cancelable:!0},o));return e.broadcast=!0,this.dispatchEvent(e)}return super.$emit(t,i,o)}},Wc=l.css`
|
|
4109
|
+
${Bc}
|
|
4110
|
+
`,qc="\n <p>Select one or more hours.</p>\n",Kc=l.html`
|
|
4111
4111
|
${e=>{return t=e.prefix,l.html`
|
|
4112
4112
|
<template>
|
|
4113
4113
|
<div class="input-container">
|
|
4114
|
-
<label class="label">Of ${e=>e.disableTooltips?"":
|
|
4114
|
+
<label class="label">Of ${e=>e.disableTooltips?"":jc("\n <p>Controls the daily frequency:</p>\n <ul>\n <li><strong>Week:</strong> allows you to configure the frequency of repeating days, including both weekdays and weekends.</li>\n <li><strong>Work week:</strong> runs the schedule at the specified time on every weekday (Monday - Friday). When this option is selected you cannot change the day frequency, it's every weekday.</li>\n </ul>\n",t)}</label>
|
|
4115
4115
|
<${t}-select
|
|
4116
4116
|
data-test-id="select-week-type"
|
|
4117
4117
|
:value=${(0,U.O)(e=>e.weekType)}
|
|
4118
4118
|
@change="${e=>e.updateCronConfig()}"
|
|
4119
4119
|
>
|
|
4120
|
-
<${t}-option data-test-id="${
|
|
4121
|
-
${
|
|
4120
|
+
<${t}-option data-test-id="${bc.WEEK}">
|
|
4121
|
+
${bc.WEEK}
|
|
4122
4122
|
</${t}-option>
|
|
4123
|
-
<${t}-option data-test-id="${
|
|
4124
|
-
${
|
|
4123
|
+
<${t}-option data-test-id="${bc.WORK_WEEK}">
|
|
4124
|
+
${bc.WORK_WEEK}
|
|
4125
4125
|
</${t}-option>
|
|
4126
4126
|
</${t}-select>
|
|
4127
4127
|
</div>
|
|
4128
4128
|
</template>
|
|
4129
4129
|
`;var t}}
|
|
4130
|
-
`;let
|
|
4131
|
-
${
|
|
4130
|
+
`;let Xc=class extends(Yc(a.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix=""}configChanged(){var e;this.weekType=(null===(e=this.config)||void 0===e?void 0:e.weekType)||bc.WORK_WEEK}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{weekType:this.weekType}),this.$emit(Rc.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Xc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],Xc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],Xc.prototype,"config",void 0),(0,C.Cg)([l.observable],Xc.prototype,"weekType",void 0),Xc=(0,C.Cg)([(0,l.customElement)({name:"daily-recurrence",template:Kc,styles:Wc})],Xc);const Jc=l.css`
|
|
4131
|
+
${Bc}
|
|
4132
4132
|
:host {
|
|
4133
4133
|
display: flex;
|
|
4134
4134
|
flex-direction: column;
|
|
@@ -4149,18 +4149,18 @@
|
|
|
4149
4149
|
.day-date-number-field::part(root) {
|
|
4150
4150
|
width: 40%;
|
|
4151
4151
|
}
|
|
4152
|
-
`,
|
|
4152
|
+
`,Qc=e=>l.html`
|
|
4153
4153
|
<div class="input-container">
|
|
4154
4154
|
<label class="label">Month</label>
|
|
4155
4155
|
<${e}-select data-test-id="month-dropdown" :value=${(0,U.O)(e=>e.selectedMonth)} @change="${e=>e.updateCronConfig()}" >
|
|
4156
|
-
${(0,l.repeat)(()=>
|
|
4156
|
+
${(0,l.repeat)(()=>xc,l.html`
|
|
4157
4157
|
<${e}-option value="${e=>e.value}">
|
|
4158
4158
|
${e=>e.label}
|
|
4159
4159
|
</${e}-option>
|
|
4160
4160
|
`)}
|
|
4161
4161
|
</${e}-select>
|
|
4162
4162
|
</div>
|
|
4163
|
-
`,
|
|
4163
|
+
`,Zc=e=>l.html`
|
|
4164
4164
|
${(e=>l.html`
|
|
4165
4165
|
<div class="input-container">
|
|
4166
4166
|
<label class="label">On</label>
|
|
@@ -4169,22 +4169,22 @@
|
|
|
4169
4169
|
:value=${(0,U.O)(e=>e.dayOrDate)}
|
|
4170
4170
|
@change="${e=>e.updateCronConfig()}"
|
|
4171
4171
|
>
|
|
4172
|
-
<${e}-option data-test-id="${
|
|
4173
|
-
${
|
|
4172
|
+
<${e}-option data-test-id="${yc.DATE}">
|
|
4173
|
+
${yc.DATE}
|
|
4174
4174
|
</${e}-option>
|
|
4175
|
-
<${e}-option data-test-id="${
|
|
4176
|
-
${
|
|
4175
|
+
<${e}-option data-test-id="${yc.DAY_OF_MONTH}">
|
|
4176
|
+
${yc.DAY_OF_MONTH}
|
|
4177
4177
|
</${e}-option>
|
|
4178
4178
|
</${e}-select>
|
|
4179
4179
|
</div>
|
|
4180
4180
|
`)(e)}
|
|
4181
|
-
${(0,En.q)(e=>e.dayOrDate===
|
|
4181
|
+
${(0,En.q)(e=>e.dayOrDate===yc.DATE,(e=>l.html`
|
|
4182
4182
|
<div class="row">
|
|
4183
|
-
${(0,l.when)(e=>e.config.type===
|
|
4184
|
-
${
|
|
4183
|
+
${(0,l.when)(e=>e.config.type===fc.YEARLY,l.html`
|
|
4184
|
+
${Qc(e)}
|
|
4185
4185
|
`)}
|
|
4186
4186
|
<div class="input-container">
|
|
4187
|
-
<label class="label"> ${e=>e.config.type===
|
|
4187
|
+
<label class="label"> ${e=>e.config.type===fc.MONTHLY?"Day date":"Day"}</label>
|
|
4188
4188
|
<${e}-select data-test-id="day-date-dropdown" :value=${(0,U.O)(e=>e.dayDate)} @change="${e=>e.updateCronConfig()}" >
|
|
4189
4189
|
${(0,l.repeat)(()=>Array.from({length:31},(e,t)=>t+1),l.html`
|
|
4190
4190
|
<${e}-option value="${e=>e}">
|
|
@@ -4197,8 +4197,8 @@
|
|
|
4197
4197
|
|
|
4198
4198
|
`)(e),(e=>l.html`
|
|
4199
4199
|
<div class="day-of-month-row">
|
|
4200
|
-
${(0,l.when)(e=>e.config.type===
|
|
4201
|
-
${
|
|
4200
|
+
${(0,l.when)(e=>e.config.type===fc.YEARLY,l.html`
|
|
4201
|
+
${Qc(e)}
|
|
4202
4202
|
`)}
|
|
4203
4203
|
<div class="input-container">
|
|
4204
4204
|
<label class="label">Day of Month</label>
|
|
@@ -4207,7 +4207,7 @@
|
|
|
4207
4207
|
:value=${(0,U.O)(e=>e.weekNumber)}
|
|
4208
4208
|
@change="${e=>e.updateCronConfig()}"
|
|
4209
4209
|
>
|
|
4210
|
-
${(0,l.repeat)(()=>
|
|
4210
|
+
${(0,l.repeat)(()=>Cc,l.html`
|
|
4211
4211
|
<${e}-option value="${e=>e.value}">
|
|
4212
4212
|
${e=>e.label}
|
|
4213
4213
|
</${e}-option>
|
|
@@ -4221,7 +4221,7 @@
|
|
|
4221
4221
|
:value=${(0,U.O)(e=>e.day)}
|
|
4222
4222
|
@change="${e=>e.updateCronConfig()}"
|
|
4223
4223
|
>
|
|
4224
|
-
${(0,l.repeat)(()=>
|
|
4224
|
+
${(0,l.repeat)(()=>wc,l.html`
|
|
4225
4225
|
<${e}-option value="${e=>e.value}">
|
|
4226
4226
|
${e=>e.label}
|
|
4227
4227
|
</${e}-option>
|
|
@@ -4230,24 +4230,24 @@
|
|
|
4230
4230
|
</div>
|
|
4231
4231
|
</div>
|
|
4232
4232
|
`)(e))}
|
|
4233
|
-
`,
|
|
4234
|
-
${e=>
|
|
4235
|
-
`;let
|
|
4236
|
-
${
|
|
4233
|
+
`,eu=l.html`
|
|
4234
|
+
${e=>Zc(e.prefix)}
|
|
4235
|
+
`;let tu=class extends(Yc(a.FoundationElement)){constructor(){super(...arguments),this.prefix="",this.dayOrDate=yc.DATE,this.weekNumber="1",this.day="1",this.selectedMonth="1"}configChanged(){this.config.type!==fc.YEARLY&&this.config.type!==fc.MONTHLY||(this.dayOrDate=this.config.dateOrDay.type||yc.DATE,this.setFieldsFromConfig())}setFieldsFromConfig(){this.config.type===fc.YEARLY&&(this.selectedMonth=this.config.dateOrDay.month),this.config.dateOrDay.type===yc.DAY_OF_MONTH?(this.weekNumber=this.config.dateOrDay.weekNumber||"1",this.day=this.config.dateOrDay.day||"1"):this.dayDate=this.config.dateOrDay.dayDate||"1"}getDayOrDateConfig(){let e;return e=this.dayOrDate===yc.DATE?{type:yc.DATE,dayDate:this.dayDate||"1"}:{type:yc.DAY_OF_MONTH,day:this.day||"1",weekNumber:this.weekNumber||"1"},e}updateCronConfig(){this.config.type===fc.MONTHLY?this.config=Object.assign(Object.assign({},this.config),{dateOrDay:this.getDayOrDateConfig()}):this.config=Object.assign(Object.assign({},this.config),{dateOrDay:Object.assign(Object.assign({},this.getDayOrDateConfig()),{month:this.selectedMonth||"1"})}),this.$emit(Rc.updateCronConfig,this.config)}};(0,C.Cg)([l.observable],tu.prototype,"prefix",void 0),(0,C.Cg)([l.observable],tu.prototype,"config",void 0),(0,C.Cg)([l.observable],tu.prototype,"dayOrDate",void 0),(0,C.Cg)([l.observable],tu.prototype,"dayDate",void 0),(0,C.Cg)([l.observable],tu.prototype,"weekNumber",void 0),(0,C.Cg)([l.observable],tu.prototype,"day",void 0),(0,C.Cg)([l.observable],tu.prototype,"selectedMonth",void 0),tu=(0,C.Cg)([(0,l.customElement)({name:"monthly-yearly-recurrence",template:eu,styles:Jc})],tu);const iu=l.css`
|
|
4236
|
+
${Bc}
|
|
4237
4237
|
.weekdays-row {
|
|
4238
4238
|
display: flex;
|
|
4239
4239
|
gap: calc(var(--design-unit) * 3px);
|
|
4240
4240
|
flex-wrap: wrap;
|
|
4241
4241
|
}
|
|
4242
|
-
`,
|
|
4242
|
+
`,ou=l.html`
|
|
4243
4243
|
${e=>{return t=e.prefix,l.html`
|
|
4244
4244
|
<template>
|
|
4245
4245
|
<div class="input-container">
|
|
4246
4246
|
<label class="label">
|
|
4247
|
-
On ${e=>e.disableTooltips?"":
|
|
4247
|
+
On ${e=>e.disableTooltips?"":jc("\n <p>Select which days to run this recurrence on. It's not valid to select no days, so if there is only a single day selected then its checkbox is disabled. </p>\n <p>If you need to change the day you can enable other days which will allow you to disable days until you only have a single day selected again.</p>\n",t)}
|
|
4248
4248
|
</label>
|
|
4249
4249
|
<div class="weekdays-row">
|
|
4250
|
-
${(0,l.repeat)(()=>
|
|
4250
|
+
${(0,l.repeat)(()=>wc,l.html`
|
|
4251
4251
|
<${t}-checkbox
|
|
4252
4252
|
part="weekdays-checkbox"
|
|
4253
4253
|
class="weekdays-checkbox"
|
|
@@ -4263,12 +4263,12 @@
|
|
|
4263
4263
|
</div>
|
|
4264
4264
|
</template>
|
|
4265
4265
|
`;var t}}
|
|
4266
|
-
`;let
|
|
4266
|
+
`;let nu=class extends(Yc(a.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix="",this.selectedDays=new Set}configChanged(){var e;this.selectedDays=(null===(e=this.config)||void 0===e?void 0:e.selectedDays)?new Set(this.config.selectedDays):new Set}isDisabled(e){return 1===this.selectedDays.size&&this.selectedDays.has(e)}checkboxChangeHandler(e){const{checked:t,value:i}=e.target;t?this.selectedDays.add(i):this.selectedDays.size>1&&this.selectedDays.delete(i),this.updateCronConfig()}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{selectedDays:this.selectedDays}),this.$emit(Rc.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],nu.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],nu.prototype,"prefix",void 0),(0,C.Cg)([l.observable],nu.prototype,"config",void 0),(0,C.Cg)([l.observable],nu.prototype,"selectedDays",void 0),nu=(0,C.Cg)([(0,l.customElement)({name:"weekly-recurrence",template:ou,styles:iu})],nu),(0,Gc.N)(Xc,nu,tu);const su=(e,t)=>l.html`
|
|
4267
4267
|
<monthly-yearly-recurrence
|
|
4268
4268
|
:prefix=${()=>e}
|
|
4269
4269
|
:config=${()=>t.cronConfig}
|
|
4270
4270
|
></monthly-yearly-recurrence>
|
|
4271
|
-
`,
|
|
4271
|
+
`,au=(e,t,i)=>l.html`
|
|
4272
4272
|
<div class="input-container">
|
|
4273
4273
|
${(0,l.when)(()=>i,l.html`
|
|
4274
4274
|
<label class="label">${i}</label>
|
|
@@ -4286,38 +4286,38 @@
|
|
|
4286
4286
|
<div slot="end" class="suffix-label">${()=>t.frequencySuffix}</div>
|
|
4287
4287
|
</${e}-select>
|
|
4288
4288
|
</div>
|
|
4289
|
-
`,
|
|
4289
|
+
`,ru=(e,t,i,o)=>l.html`
|
|
4290
4290
|
<div class="input-container">
|
|
4291
4291
|
<label class="label">Time </label>
|
|
4292
4292
|
<div class="flex-row">
|
|
4293
4293
|
${(0,l.when)(()=>i,l.html`
|
|
4294
4294
|
<${e}-select class="time-select" data-test-id="hours-dropdown" :value=${(0,U.O)(()=>t.hours)} @change="${()=>t.handleChange("hours")}" >
|
|
4295
|
-
${(0,l.repeat)(()=>Array.from({length
|
|
4295
|
+
${(0,l.repeat)(()=>Array.from({length:Tc},(e,t)=>t),l.html`
|
|
4296
4296
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4297
4297
|
`)}
|
|
4298
4298
|
<div slot="end" class="suffix-label">hr</div>
|
|
4299
4299
|
</${e}-select>`)}
|
|
4300
4300
|
${(0,l.when)(()=>o,l.html`
|
|
4301
4301
|
<${e}-select class="time-select" data-test-id="mins-dropdown" :value=${(0,U.O)(()=>t.minutes)} @change="${()=>t.handleChange("minutes")}" >
|
|
4302
|
-
${(0,l.repeat)(()=>Array.from({length:
|
|
4302
|
+
${(0,l.repeat)(()=>Array.from({length:kc},(e,t)=>t),l.html`
|
|
4303
4303
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4304
4304
|
`)}
|
|
4305
4305
|
<div slot="end" class="suffix-label">min</div>
|
|
4306
4306
|
</${e}-select>`)}
|
|
4307
4307
|
<${e}-select class="time-select" data-test-id="seconds-dropdown" :value=${(0,U.O)(()=>t.seconds)} @change="${()=>t.handleChange("seconds")}" >
|
|
4308
|
-
${(0,l.repeat)(()=>Array.from({length:
|
|
4308
|
+
${(0,l.repeat)(()=>Array.from({length:kc},(e,t)=>t),l.html`
|
|
4309
4309
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4310
4310
|
`)}
|
|
4311
4311
|
<div slot="end" class="suffix-label">sec</div>
|
|
4312
4312
|
</${e}-select>
|
|
4313
4313
|
</div>
|
|
4314
4314
|
</div>
|
|
4315
|
-
`,
|
|
4315
|
+
`,lu=(e,t,i)=>{switch(e){case fc.MINUTES:return l.html`
|
|
4316
4316
|
<div class="minutes-options-row">
|
|
4317
4317
|
<div class="input-container">
|
|
4318
4318
|
<label class="label"
|
|
4319
4319
|
>During
|
|
4320
|
-
${()=>i.disableTooltips?"":
|
|
4320
|
+
${()=>i.disableTooltips?"":jc("\n <p>Which hours in the day to run this schedule for:</p>\n <ul>\n <li><strong>Every hour:</strong> runs the minute schedule during every hour of the day.</li>\n <li><strong>Specific hours:</strong> specify which hours the minute schedule runs for. For example, just trading hours. Selecting every hour will configure the schedule as <strong>Every hour</strong>.</li>\n </ul>\n",t)}</label
|
|
4321
4321
|
>
|
|
4322
4322
|
<${t}-select
|
|
4323
4323
|
data-test-id="during-select"
|
|
@@ -4337,7 +4337,7 @@
|
|
|
4337
4337
|
${(0,l.when)(()=>i.isSpecificHours,l.html`
|
|
4338
4338
|
<div class="input-container">
|
|
4339
4339
|
<label class="label"
|
|
4340
|
-
>Hours ${
|
|
4340
|
+
>Hours ${jc(qc,t)}</label
|
|
4341
4341
|
>
|
|
4342
4342
|
<${t}-multiselect
|
|
4343
4343
|
class="time-select"
|
|
@@ -4352,15 +4352,15 @@
|
|
|
4352
4352
|
`)}
|
|
4353
4353
|
</div>
|
|
4354
4354
|
<div class="row">
|
|
4355
|
-
${
|
|
4356
|
-
${
|
|
4355
|
+
${au(t,i,"Every")}
|
|
4356
|
+
${ru(t,i,!1,!1)}
|
|
4357
4357
|
</div>
|
|
4358
|
-
`;case
|
|
4358
|
+
`;case fc.HOURLY:return l.html`
|
|
4359
4359
|
<div class="row">
|
|
4360
4360
|
<div class="input-container">
|
|
4361
4361
|
<label class="label"
|
|
4362
4362
|
>Mode
|
|
4363
|
-
${()=>i.disableTooltips?"":
|
|
4363
|
+
${()=>i.disableTooltips?"":jc("\n <p>Select the type of hourly recurrence:</p>\n <ul>\n <li><strong>Interval:</strong> runs at a repeating interval of hours (e.g. every 2 hours).</li>\n <li><strong>Selected Hours:</strong> allows you to choose specific hours of the day (e.g. 9, 10, and 14).</li>\n </ul>\n",t)}</label
|
|
4364
4364
|
>
|
|
4365
4365
|
<${t}-select
|
|
4366
4366
|
data-test-id="hourly-during-select"
|
|
@@ -4371,12 +4371,12 @@
|
|
|
4371
4371
|
<${t}-option value="specific_hours">Selected Hours</${t}-option>
|
|
4372
4372
|
</${t}-select>
|
|
4373
4373
|
</div>
|
|
4374
|
-
${(0,l.when)(()=>"every_hour"===i.during,
|
|
4374
|
+
${(0,l.when)(()=>"every_hour"===i.during,au(t,i,"Every"))}
|
|
4375
4375
|
${(0,l.when)(()=>i.isSpecificHours,l.html`
|
|
4376
4376
|
<div class="break"></div>
|
|
4377
4377
|
<div class="input-container">
|
|
4378
4378
|
<label class="label">
|
|
4379
|
-
Hours ${
|
|
4379
|
+
Hours ${jc(qc,t)}
|
|
4380
4380
|
</label>
|
|
4381
4381
|
<${t}-multiselect
|
|
4382
4382
|
class="time-select"
|
|
@@ -4388,9 +4388,9 @@
|
|
|
4388
4388
|
></${t}-multiselect>
|
|
4389
4389
|
</div>
|
|
4390
4390
|
`)}
|
|
4391
|
-
${
|
|
4391
|
+
${ru(t,i,!1,!0)}
|
|
4392
4392
|
</div>
|
|
4393
|
-
`;case
|
|
4393
|
+
`;case fc.DAILY:return l.html`
|
|
4394
4394
|
${((e,t)=>l.html`
|
|
4395
4395
|
<daily-recurrence
|
|
4396
4396
|
:prefix=${()=>e}
|
|
@@ -4399,10 +4399,10 @@
|
|
|
4399
4399
|
></daily-recurrence>
|
|
4400
4400
|
`)(t,i)}
|
|
4401
4401
|
<div class="row">
|
|
4402
|
-
${
|
|
4403
|
-
${
|
|
4402
|
+
${au(t,i,"Every")}
|
|
4403
|
+
${ru(t,i,!0,!0)}
|
|
4404
4404
|
</div>
|
|
4405
|
-
`;case
|
|
4405
|
+
`;case fc.WEEKLY:return l.html`
|
|
4406
4406
|
<div class="row">
|
|
4407
4407
|
${((e,t)=>l.html`
|
|
4408
4408
|
<weekly-recurrence
|
|
@@ -4410,25 +4410,25 @@
|
|
|
4410
4410
|
:config=${()=>t.cronConfig}
|
|
4411
4411
|
?disable-tooltips=${()=>t.disableTooltips}
|
|
4412
4412
|
></weekly-recurrence>
|
|
4413
|
-
`)(t,i)} ${
|
|
4413
|
+
`)(t,i)} ${ru(t,i,!0,!0)}
|
|
4414
4414
|
</div>
|
|
4415
|
-
`;case
|
|
4415
|
+
`;case fc.MONTHLY:return l.html`
|
|
4416
4416
|
<div class="row">
|
|
4417
|
-
${
|
|
4418
|
-
${
|
|
4417
|
+
${au(t,i,"Every")}
|
|
4418
|
+
${ru(t,i,!0,!0)}
|
|
4419
4419
|
</div>
|
|
4420
|
-
${
|
|
4421
|
-
`;case
|
|
4422
|
-
<div class="row">${
|
|
4423
|
-
${
|
|
4424
|
-
`;default:return l.html``}},
|
|
4420
|
+
${su(t,i)}
|
|
4421
|
+
`;case fc.YEARLY:return l.html`
|
|
4422
|
+
<div class="row">${ru(t,i,!0,!0)}</div>
|
|
4423
|
+
${su(t,i)}
|
|
4424
|
+
`;default:return l.html``}},du=e=>l.html`
|
|
4425
4425
|
<template>
|
|
4426
4426
|
<div class="container">
|
|
4427
4427
|
<div class="input-container">
|
|
4428
4428
|
<label class="label"
|
|
4429
4429
|
>Recurrence
|
|
4430
4430
|
${(0,l.when)(e=>!e.disableTooltips,l.html`
|
|
4431
|
-
${t=>
|
|
4431
|
+
${t=>jc(`\n <p>Select how often the event should occur:</p>\n <ul>\n${!t.minMinuteInterval||t.minMinuteInterval<Ic?"<li><strong>Minutes:</strong> Runs at every interval of minutes from the hour. Can be for every or specific hours.</li>":""}\n <li><strong>Hourly:</strong> Runs at a specific time in the hour, for one or more hours in the day.</li>\n <li><strong>Daily:</strong> Runs at a specific time of day, for a frequency interval of days per week (or work week).</li>\n <li><strong>Weekly:</strong> Runs at a specific time of day, for specific days of the week.</li>\n <li><strong>Monthly:</strong> Runs at a specific time of day in monthly intervals, on a specific date or day of month .</li>\n <li><strong>Yearly:</strong> Runs at a specific time, every year on a specific date or day of month.</li>\n </ul>\n`,e)}
|
|
4432
4432
|
`)}
|
|
4433
4433
|
</label>
|
|
4434
4434
|
<${e}-select
|
|
@@ -4437,36 +4437,36 @@
|
|
|
4437
4437
|
@change="${e=>e.handleRecurrenceChange()}"
|
|
4438
4438
|
>
|
|
4439
4439
|
${(0,l.when)(e=>e.isMinutesRecurrenceEnabled,l.html`
|
|
4440
|
-
<${e}-option data-test-id="${
|
|
4441
|
-
${
|
|
4440
|
+
<${e}-option data-test-id="${fc.MINUTES}">
|
|
4441
|
+
${fc.MINUTES}
|
|
4442
4442
|
</${e}-option>
|
|
4443
4443
|
`)}
|
|
4444
|
-
<${e}-option data-test-id="${
|
|
4445
|
-
${
|
|
4444
|
+
<${e}-option data-test-id="${fc.HOURLY}">
|
|
4445
|
+
${fc.HOURLY}
|
|
4446
4446
|
</${e}-option>
|
|
4447
|
-
<${e}-option data-test-id="${
|
|
4448
|
-
${
|
|
4447
|
+
<${e}-option data-test-id="${fc.DAILY}">
|
|
4448
|
+
${fc.DAILY}
|
|
4449
4449
|
</${e}-option>
|
|
4450
|
-
<${e}-option data-test-id="${
|
|
4451
|
-
${
|
|
4450
|
+
<${e}-option data-test-id="${fc.WEEKLY}">
|
|
4451
|
+
${fc.WEEKLY}
|
|
4452
4452
|
</${e}-option>
|
|
4453
|
-
<${e}-option data-test-id="${
|
|
4454
|
-
${
|
|
4453
|
+
<${e}-option data-test-id="${fc.MONTHLY}">
|
|
4454
|
+
${fc.MONTHLY}
|
|
4455
4455
|
</${e}-option>
|
|
4456
|
-
<${e}-option data-test-id="${
|
|
4457
|
-
${
|
|
4456
|
+
<${e}-option data-test-id="${fc.YEARLY}">
|
|
4457
|
+
${fc.YEARLY}
|
|
4458
4458
|
</${e}-option>
|
|
4459
4459
|
</${e}-select>
|
|
4460
4460
|
</div>
|
|
4461
4461
|
|
|
4462
4462
|
${(0,l.repeat)(e=>[`${e.recurrence}-${e.during}`],l.html`
|
|
4463
|
-
${(t,i)=>
|
|
4463
|
+
${(t,i)=>lu(i.parent.recurrence,e,i.parent)}
|
|
4464
4464
|
`,{recycle:!1})}
|
|
4465
4465
|
</div>
|
|
4466
4466
|
</template>
|
|
4467
|
-
`,
|
|
4468
|
-
${e=>
|
|
4469
|
-
`;class ru extends a.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Lc,buildConfigForHourlyRecurrence:Ac,buildConfigForDailyRecurrence:Rc,buildConfigForWeeklyRecurrence:Fc,buildConfigForMonthlyRecurrence:_c,buildConfigForYearlyRecurrence:Mc},this.recurrence=pc.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:pc.DAILY,weekType:mc.WEEK,hours:"0",minutes:"0",seconds:"0"},this.frequency="1",this.during="every_hour",this.hours="0",this.minutes="0",this.seconds="0",this.disableTooltips=!1,this.timezone=""}cronChanged(){if(this.cron)try{if(!((e,t=Ic)=>{const i=e.trim().split(" ");if(i.length!=Cc)return!1;const[o,n,s,a,r,l]=i;return t(o,0,Sc-1)&&t(n,0,Sc-1)&&t(s,0,$c-1)&&t(a,1,wc,!0)&&t(r,1,yc)&&t(l,0,xc,!0)})(this.cron))return void hc({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},T(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void hc({title:"Cron Scheduler",body:e,toast:{type:"critical"}},T(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case pc.MINUTES:return"Minute(s)";case pc.HOURLY:return"Hour(s)";case pc.DAILY:return"Day(s)";case pc.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case pc.MINUTES:const e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case pc.HOURLY:return Array.from({length:$c-1},(e,t)=>t+1);case pc.DAILY:return Array.from({length:wc},(e,t)=>t+1);case pc.MONTHLY:case pc.YEARLY:return Array.from({length:yc},(e,t)=>t+1);case pc.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:$c},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return this.hours&&"*"!==this.hours&&"0"!==this.hours?this.hours.split(","):"*"===this.hours?this.hourOptions.map(e=>e.value):[this.hours]}handleHoursChange(e){const t=e.detail;t.length===$c?(this.hours="*",this.frequency="1",this.cronConfig.frequency="1"):t&&0!==t.length?this.hours=t.sort((e,t)=>Number(e)-Number(t)).join(","):this.hours="0",this.handleChange("hours")}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return"specific_hours"===this.during}get isDailyFrequencyDisabled(){return this.cronConfig.type===pc.DAILY&&this.cronConfig.weekType===mc.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn("Minimum minute interval has no effect on schedules with an hourly or longer recurrance")}connectedCallback(){super.connectedCallback(),this.addEventListener(Tc.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Tc.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case pc.MINUTES:const e=this.getBaseConfigFields(),{minutes:t}=e,i=(0,C.Tt)(e,["minutes"]);this.during="every_hour",this.hours="*";const o=[1,2,3,4,5,6,10,12,15,20,30],n=this.minMinuteInterval?Number(this.minMinuteInterval):1,s=o.find(e=>e>=n)||1;this.cronConfig=Object.assign(Object.assign({type:pc.MINUTES},i),{frequency:s.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case pc.HOURLY:const a=this.getBaseConfigFields(),{hours:r}=a,l=(0,C.Tt)(a,["hours"]);this.during="every_hour",this.hours="0",this.cronConfig=Object.assign(Object.assign({type:pc.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case pc.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:pc.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:mc.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case pc.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:pc.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case pc.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:pc.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:vc.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case pc.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:pc.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:vc.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:hc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}}handleChange(e){if("frequency"===e&&0===Number(this.frequency))throw new Error("Frequency must be greater than 0");this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){"every_hour"===this.during?this.hours="*":"*"===this.hours&&(this.hours="0"),this.cronConfig.type!==pc.MINUTES&&this.cronConfig.type!==pc.HOURLY||(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case pc.MINUTES:this.cron=function(e){const t="specific_hours"===e.during&&e.hours?e.hours:"*";return`${e.seconds} 0/${e.frequency} ${t} ? * *`}(e);break;case pc.HOURLY:this.cron=function(e){return"specific_hours"===e.during&&e.hours&&"*"!==e.hours?`${e.seconds} ${e.minutes} ${e.hours} ? * *`:`${e.seconds} ${e.minutes} 0/${e.frequency} ? * *`}(e);break;case pc.DAILY:this.cron=function(e,t=kc){const i=e.weekType===mc.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===mc.WORK_WEEK?"2-6":"?"}`}(e,kc);break;case pc.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case pc.MONTHLY:this.cron=function(e,t=kc){const{dateOrDay:i,minutes:o,hours:n,seconds:s,frequency:a}=e,r=t(a);return i.type===vc.DATE?`${s} ${o} ${n} ${i.dayDate} *${r} ?`:"-1"===i.weekNumber?`${s} ${o} ${n} ? *${r} ${i.day}L`:`${e.seconds} ${o} ${n} ? *${r} ${i.day}#${i.weekNumber}`}(e,kc);break;case pc.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===vc.DATE?`${o} ${i} ${n} ${t.dayDate} ${t.month} ?`:"-1"===t.weekNumber?`${o} ${i} ${n} ? ${t.month} ${t.day}L`:`${o} ${i} ${n} ? ${t.month} ${t.day}#${t.weekNumber}`}(e);break;default:hc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}this.value=this.cron,this.$emit("change")}setsFieldsFromCronEx(){this.cronConfig=function(e,t){if(!e)return;const i=e.split(" "),[o,n,s,a,r,l]=i;if("?"!==l&&"?"!==a)throw new Error("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented");if(/^(0|\*)\/\d+$/.test(n))return Object.assign({seconds:o},t.buildConfigForMinutesRecurrence(n,s));if(/^(0|\*)\/\d+$/.test(s))return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("?"===a&&"*"===l)return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("2-6"===l||"?"===l&&("*"===a||a.startsWith("*")))return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForDailyRecurrence(a,l));if(/^([1-7](,[1-7])*)$/.test(l)||"*"===l)return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForWeeklyRecurrence(l));if(l.includes("L")||l.includes("#")||/^([1-9]|[12]\d|3[01])$/.test(a)&&"?"===l)return"*"==r||r.startsWith("*/")?Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForMonthlyRecurrence(a,r,l)):Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForYearlyRecurrence(a,r,l));throw new Error("Invalid Cron Expression")}(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;const e=this.cronConfig;"minutes"in e&&(this.minutes=e.minutes),e.type!==pc.MINUTES&&e.type!==pc.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==pc.HOURLY&&e.type!==pc.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],ru.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],ru.prototype,"cron",void 0),(0,C.Cg)([l.observable],ru.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],ru.prototype,"frequency",void 0),(0,C.Cg)([l.observable],ru.prototype,"during",void 0),(0,C.Cg)([l.volatile],ru.prototype,"duringOptions",null),(0,C.Cg)([l.observable],ru.prototype,"hours",void 0),(0,C.Cg)([l.observable],ru.prototype,"minutes",void 0),(0,C.Cg)([l.observable],ru.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],ru.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],ru.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],ru.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],ru.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],ru.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],ru.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],ru.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],ru.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],ru.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],ru.prototype,"timezone",void 0);const lu=void 0,du={},cu=ru.compose(Object.assign({baseName:"scheduler-cron-builder",styles:Pc,template:au,shadowOptions:lu},du)),uu=l.css`
|
|
4467
|
+
`,cu=l.html`
|
|
4468
|
+
${e=>du(T(e))}
|
|
4469
|
+
`;class uu extends a.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:_c,buildConfigForHourlyRecurrence:Mc,buildConfigForDailyRecurrence:Nc,buildConfigForWeeklyRecurrence:Hc,buildConfigForMonthlyRecurrence:Uc,buildConfigForYearlyRecurrence:zc},this.recurrence=fc.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:fc.DAILY,weekType:bc.WEEK,hours:"0",minutes:"0",seconds:"0"},this.frequency="1",this.during="every_hour",this.hours="0",this.minutes="0",this.seconds="0",this.disableTooltips=!1,this.timezone=""}cronChanged(){if(this.cron)try{if(!((e,t=Fc)=>{const i=e.trim().split(" ");if(i.length!=Ec)return!1;const[o,n,s,a,r,l]=i;return t(o,0,kc-1)&&t(n,0,kc-1)&&t(s,0,Tc-1)&&t(a,1,Sc,!0)&&t(r,1,$c)&&t(l,0,Oc,!0)})(this.cron))return void vc({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},T(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void vc({title:"Cron Scheduler",body:e,toast:{type:"critical"}},T(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case fc.MINUTES:return"Minute(s)";case fc.HOURLY:return"Hour(s)";case fc.DAILY:return"Day(s)";case fc.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case fc.MINUTES:const e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case fc.HOURLY:return Array.from({length:Tc-1},(e,t)=>t+1);case fc.DAILY:return Array.from({length:Sc},(e,t)=>t+1);case fc.MONTHLY:case fc.YEARLY:return Array.from({length:$c},(e,t)=>t+1);case fc.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:Tc},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return this.hours&&"*"!==this.hours&&"0"!==this.hours?this.hours.split(","):"*"===this.hours?this.hourOptions.map(e=>e.value):[this.hours]}handleHoursChange(e){const t=e.detail;t.length===Tc?(this.hours="*",this.frequency="1",this.cronConfig.frequency="1"):t&&0!==t.length?this.hours=t.sort((e,t)=>Number(e)-Number(t)).join(","):this.hours="0",this.handleChange("hours")}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return"specific_hours"===this.during}get isDailyFrequencyDisabled(){return this.cronConfig.type===fc.DAILY&&this.cronConfig.weekType===bc.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn("Minimum minute interval has no effect on schedules with an hourly or longer recurrance")}connectedCallback(){super.connectedCallback(),this.addEventListener(Rc.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Rc.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case fc.MINUTES:const e=this.getBaseConfigFields(),{minutes:t}=e,i=(0,C.Tt)(e,["minutes"]);this.during="every_hour",this.hours="*";const o=[1,2,3,4,5,6,10,12,15,20,30],n=this.minMinuteInterval?Number(this.minMinuteInterval):1,s=o.find(e=>e>=n)||1;this.cronConfig=Object.assign(Object.assign({type:fc.MINUTES},i),{frequency:s.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case fc.HOURLY:const a=this.getBaseConfigFields(),{hours:r}=a,l=(0,C.Tt)(a,["hours"]);this.during="every_hour",this.hours="0",this.cronConfig=Object.assign(Object.assign({type:fc.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case fc.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:fc.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:bc.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case fc.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:fc.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case fc.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:fc.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:yc.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case fc.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:fc.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:yc.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:vc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}}handleChange(e){if("frequency"===e&&0===Number(this.frequency))throw new Error("Frequency must be greater than 0");this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){"every_hour"===this.during?this.hours="*":"*"===this.hours&&(this.hours="0"),this.cronConfig.type!==fc.MINUTES&&this.cronConfig.type!==fc.HOURLY||(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case fc.MINUTES:this.cron=function(e){const t="specific_hours"===e.during&&e.hours?e.hours:"*";return`${e.seconds} 0/${e.frequency} ${t} ? * *`}(e);break;case fc.HOURLY:this.cron=function(e){return"specific_hours"===e.during&&e.hours&&"*"!==e.hours?`${e.seconds} ${e.minutes} ${e.hours} ? * *`:`${e.seconds} ${e.minutes} 0/${e.frequency} ? * *`}(e);break;case fc.DAILY:this.cron=function(e,t=Ac){const i=e.weekType===bc.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===bc.WORK_WEEK?"2-6":"?"}`}(e,Ac);break;case fc.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case fc.MONTHLY:this.cron=function(e,t=Ac){const{dateOrDay:i,minutes:o,hours:n,seconds:s,frequency:a}=e,r=t(a);return i.type===yc.DATE?`${s} ${o} ${n} ${i.dayDate} *${r} ?`:"-1"===i.weekNumber?`${s} ${o} ${n} ? *${r} ${i.day}L`:`${e.seconds} ${o} ${n} ? *${r} ${i.day}#${i.weekNumber}`}(e,Ac);break;case fc.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===yc.DATE?`${o} ${i} ${n} ${t.dayDate} ${t.month} ?`:"-1"===t.weekNumber?`${o} ${i} ${n} ? ${t.month} ${t.day}L`:`${o} ${i} ${n} ? ${t.month} ${t.day}#${t.weekNumber}`}(e);break;default:vc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}this.value=this.cron,this.$emit("change")}setsFieldsFromCronEx(){this.cronConfig=function(e,t){if(!e)return;const i=e.split(" "),[o,n,s,a,r,l]=i;if("?"!==l&&"?"!==a)throw new Error("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented");if(/^(0|\*)\/\d+$/.test(n))return Object.assign({seconds:o},t.buildConfigForMinutesRecurrence(n,s));if(/^(0|\*)\/\d+$/.test(s))return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("?"===a&&"*"===l)return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("2-6"===l||"?"===l&&("*"===a||a.startsWith("*")))return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForDailyRecurrence(a,l));if(/^([1-7](,[1-7])*)$/.test(l)||"*"===l)return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForWeeklyRecurrence(l));if(l.includes("L")||l.includes("#")||/^([1-9]|[12]\d|3[01])$/.test(a)&&"?"===l)return"*"==r||r.startsWith("*/")?Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForMonthlyRecurrence(a,r,l)):Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForYearlyRecurrence(a,r,l));throw new Error("Invalid Cron Expression")}(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;const e=this.cronConfig;"minutes"in e&&(this.minutes=e.minutes),e.type!==fc.MINUTES&&e.type!==fc.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==fc.HOURLY&&e.type!==fc.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],uu.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],uu.prototype,"cron",void 0),(0,C.Cg)([l.observable],uu.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],uu.prototype,"frequency",void 0),(0,C.Cg)([l.observable],uu.prototype,"during",void 0),(0,C.Cg)([l.volatile],uu.prototype,"duringOptions",null),(0,C.Cg)([l.observable],uu.prototype,"hours",void 0),(0,C.Cg)([l.observable],uu.prototype,"minutes",void 0),(0,C.Cg)([l.observable],uu.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],uu.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],uu.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],uu.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],uu.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],uu.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],uu.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],uu.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],uu.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],uu.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],uu.prototype,"timezone",void 0);const hu=void 0,pu={},mu=uu.compose(Object.assign({baseName:"scheduler-cron-builder",styles:Vc,template:cu,shadowOptions:hu},pu)),gu=l.css`
|
|
4470
4470
|
/* Host */
|
|
4471
4471
|
:host {
|
|
4472
4472
|
display: flex;
|
|
@@ -4493,7 +4493,7 @@
|
|
|
4493
4493
|
.timezone-combobox::part(listbox) {
|
|
4494
4494
|
max-height: 20vh;
|
|
4495
4495
|
}
|
|
4496
|
-
`,
|
|
4496
|
+
`,vu=e=>l.html`
|
|
4497
4497
|
<template>
|
|
4498
4498
|
<div class="container">
|
|
4499
4499
|
<label class="label">Time Zone</label>
|
|
@@ -4509,9 +4509,9 @@
|
|
|
4509
4509
|
</${e}-combobox>
|
|
4510
4510
|
</div>
|
|
4511
4511
|
</template>
|
|
4512
|
-
`,
|
|
4513
|
-
${e=>
|
|
4514
|
-
`;class
|
|
4512
|
+
`,fu=l.html`
|
|
4513
|
+
${e=>vu(T(e))}
|
|
4514
|
+
`;class bu extends a.FoundationElement{constructor(){super(...arguments),this.timezone="",this.value=this.timezone}timezoneChanged(){this.value=this.timezone,this.$emit("change")}connectedCallback(){super.connectedCallback(),this.getTimeZones()}getTimeZones(){return(0,C.sH)(this,void 0,void 0,function*(){const e=["Europe/London","America/New_York"];try{const t=yield this.connect.request("VALID_TIME_ZONE",{REQUEST:{}});if(!t.REPLY||!Array.isArray(t.REPLY))throw new Error("Invalid data returned for Timezones");this.timeZones=t.REPLY.map(e=>e.ZONE_ID).sort((t,i)=>e.includes(t)&&!e.includes(i)?-1:!e.includes(t)&&e.includes(i)?1:t.localeCompare(i))}catch(e){vc({title:"Cron Scheduler",body:"Unable to fetch timezones data.",toast:{type:"critical"}},"rapid"),js.v.error(e)}})}}(0,C.Cg)([l.observable],bu.prototype,"timezone",void 0),(0,C.Cg)([ui.dm],bu.prototype,"connect",void 0),(0,C.Cg)([l.observable],bu.prototype,"timeZones",void 0);const yu=void 0,wu={},Cu=bu.compose(Object.assign({baseName:"scheduler-timezone",styles:gu,template:fu,shadowOptions:yu},wu)),xu=l.css`
|
|
4515
4515
|
.search-bar-combobox {
|
|
4516
4516
|
width: 100%;
|
|
4517
4517
|
min-width: auto;
|
|
@@ -4587,7 +4587,7 @@
|
|
|
4587
4587
|
.close-icon {
|
|
4588
4588
|
color: var(--accent-fill-rest);
|
|
4589
4589
|
}
|
|
4590
|
-
|
|
4590
|
+
`,$u=(e="start")=>'\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="10px" height="10px">\n <g transform="matrix(1 0 0 1 -256 -14 )">\n <path class="cross-icon" fill="white" d="M 9.9265625 8.865937499999998 L 6.060625000000001 5 L 9.265625 1.795 L 9.9265625 1.1340624999999993 C 10.0240625 1.0365624999999996 10.0240625 0.8781249999999996 9.9265625 0.7806249999999992 L 9.219375 0.07343749999999982 C 9.121875 -0.024062500000000542 8.9634375 -0.024062500000000542 8.8659375 0.07343749999999982 L 5 3.9393750000000005 L 1.1340625 0.073125 C 1.0365625 -0.02437500000000037 0.8781250000000002 -0.02437500000000037 0.7806249999999999 0.073125 L 0.073125 0.7803125 C -0.024375000000000008 0.8778124999999998 -0.024375000000000008 1.0362499999999997 0.073125 1.13375 L 3.9393750000000005 5 L 0.073125 8.865937499999998 C -0.024375000000000008 8.9634375 -0.024375000000000008 9.121875 0.073125 9.219375000000001 L 0.7803125 9.9265625 C 0.8778125000000001 10.0240625 1.03625 10.0240625 1.13375 9.9265625 L 5 6.060625 L 8.205 9.265625 L 8.8659375 9.9265625 C 8.9634375 10.0240625 9.121875 10.0240625 9.219375 9.9265625 L 9.9265625 9.219375000000001 C 10.0240625 9.121875 10.0240625 8.9634375 9.9265625 8.865937499999998 Z " fill-rule="nonzero" fill="#c9c9c9" stroke="none" fill-opacity="0.8" transform="matrix(1 0 0 1 256 14 )"/>\n </g>\n</svg>\n',Su=()=>'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="30px" height="30px" class="bi bi-plus" viewBox="0 0 16 16">\n <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>\n</svg>',Eu=e=>l.html`
|
|
4591
4591
|
|
|
4592
4592
|
<label part="label" for="control" data-test-id="label" class=${e=>{var t;return(0,x.x)("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}
|
|
4593
4593
|
>
|
|
@@ -4667,9 +4667,9 @@
|
|
|
4667
4667
|
</${e}-button>
|
|
4668
4668
|
`)}
|
|
4669
4669
|
</${e}-search-bar-combobox>
|
|
4670
|
-
`,
|
|
4671
|
-
${e=>
|
|
4672
|
-
|
|
4670
|
+
`,Ou=l.html`
|
|
4671
|
+
${e=>Eu(T(e))}
|
|
4672
|
+
`,Tu=10,ku=3,Du=1,Iu=(e,t)=>(new j.b).withExpression((new G.K).withField(e).withValue(t).withSerialiser(V.n.containsIgnoreCase).build()).build();class Ru extends a.FoundationElement{constructor(){super(...arguments),this.searchTerm="",this.appearance="neutral",this.minlength=ku,this.position=zt.BELOW,this.placeholder="Start typing to search",this.clearButton=!0,this.selectedOptions=[],this.normalizeDelimiter=e=>e.trim().replace(/\t|\r\n|\n|\r|,/g," "),this.addOrReplaceSelectedText=(e,t,i)=>(null==t?void 0:t.length)>0?e.replace(t,i):e.concat(i)}clear(){this.selectedOptions=[],this.searchTerm="",this.combobox&&(this.combobox.currentValue="",this.combobox.value=""),this.$emit("selectionChange",[])}clearSearch(){this.clear()}get showClearAffordance(){var e,t,i;if(!this.clearButton)return!1;const o=(null!==(i=null!==(e=this.searchTerm)&&void 0!==e?e:null===(t=this.combobox)||void 0===t?void 0:t.value)&&void 0!==i?i:"").trim();return this.selectedOptions.length>0||o.length>0}get allSearchFieldsUsed(){var e;return!!(null===(e=this.options)||void 0===e?void 0:e.length)&&this.options.every(e=>this.selectedOptions.some(t=>t.field===e.field))}isOptionEnabled(e){return e.isEnabled?e.isEnabled(this.searchTerm,this.selectedOptions,this.minlength):this.searchTerm.length>=this.minlength&&!this.selectedOptions.some(t=>t.field===e.field)}selectedOptionsChanged(){this.applySearchInputLock()}optionsChanged(){this.applySearchInputLock()}applySearchInputLock(){this.combobox&&this.allSearchFieldsUsed&&(this.searchTerm="",this.combobox.value="",this.combobox.currentValue="",this.combobox.open=!1,this.filteredOptions=[])}inputdeleted(){this.selectedOptions.length>0&&this.unselectOption(this.selectedOptions[this.selectedOptions.length-1])}changeHandler(){const e=[];this.combobox.selectedOptions.forEach(t=>{var i,o,n;const s=t.value,a=this.searchTerm.trim();e.push({field:s,term:a,label:(null===(i=this.options.find(e=>e.field===s))||void 0===i?void 0:i.label(a))||t.text,createCriteria:null===(o=this.options.find(e=>e.field===s))||void 0===o?void 0:o.createCriteria,resourceType:null===(n=this.options.find(e=>e.field===s))||void 0===n?void 0:n.resourceType})}),this.selectedOptions=[...this.selectedOptions,...e],this.selectedOptions=this.selectedOptions.filter((e,t,i)=>t===i.findIndex(t=>e.field===t.field&&e.term===t.term)),this.combobox.value="",this.combobox.open=!1,this.$emit("selectionChange",this.selectedOptions),l.DOM.queueUpdate(()=>{setTimeout(()=>{this.selectedOptionsDiv.scrollTo(this.selectedOptionsDiv.scrollWidth,0)},Tu)})}pasteHandler(e){var t;if(this.allSearchFieldsUsed)return void e.preventDefault();this.loading=!0;const i=e.clipboardData.getData("text/plain"),o=this.normalizeDelimiter(i),n=null===(t=window.getSelection())||void 0===t?void 0:t.toString(),s=this.addOrReplaceSelectedText(this.combobox.value,n,o);(null==s?void 0:s.length)>=this.minlength&&(this.combobox.value=s,this.searchTerm=s,this.options&&this.filterSelectedOptions(s),this.combobox.open=!0),this.loading=!1}hasSelectedOption(e,t){return this.selectedOptions.some(i=>i.term===e&&i.field===t)}unselectOption(e){this.selectedOptions=this.selectedOptions.filter(t=>t!==e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){return(0,C.sH)(this,void 0,void 0,function*(){this.allSearchFieldsUsed?this.applySearchInputLock():(this.loading=!0,this.searchTerm=this.combobox.value,this.combobox.value.length>=this.minlength&&this.filterSelectedOptions(this.combobox.value),this.loading=!1)})}filterSelectedOptions(e){this.filteredOptions=this.options.filter(t=>!this.selectedOptions.find(i=>i.field===t.field&&i.term.trim()===e.trim()))}}(0,C.Cg)([l.observable],Ru.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Ru.prototype,"options",void 0),(0,C.Cg)([l.observable],Ru.prototype,"searchTerm",void 0),(0,C.Cg)([l.attr],Ru.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Ru.prototype,"minlength",void 0),(0,C.Cg)([l.attr],Ru.prototype,"position",void 0),(0,C.Cg)([l.attr],Ru.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],Ru.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({attribute:"clear-button",mode:"boolean"})],Ru.prototype,"clearButton",void 0),(0,C.Cg)([l.observable],Ru.prototype,"loading",void 0),(0,C.Cg)([l.observable],Ru.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Ru.prototype,"filteredOptions",void 0);const Au=void 0,Lu={},Fu=Ru.compose(Object.assign({baseName:"search-bar",template:Ou,styles:xu,shadowOptions:Au},Lu)),Nu=(e,t)=>l.css`
|
|
4673
4673
|
${yi(e,t)}
|
|
4674
4674
|
.control {
|
|
4675
4675
|
width: auto;
|
|
@@ -4706,7 +4706,7 @@
|
|
|
4706
4706
|
:host(.input-locked) .selected-value {
|
|
4707
4707
|
display: none;
|
|
4708
4708
|
}
|
|
4709
|
-
`,
|
|
4709
|
+
`,Mu=(e,t)=>l.html`
|
|
4710
4710
|
<template
|
|
4711
4711
|
aria-disabled="${e=>e.ariaDisabled}"
|
|
4712
4712
|
autocomplete="${e=>e.autocomplete}"
|
|
@@ -4758,7 +4758,7 @@
|
|
|
4758
4758
|
></slot>
|
|
4759
4759
|
</div>
|
|
4760
4760
|
</template>
|
|
4761
|
-
`,
|
|
4761
|
+
`,_u=new Set(["Backspace","Delete","Tab","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]);class Hu extends r.Combobox{constructor(){super(...arguments),this.minlength=Du,this.previousLength=-1,this.changeListener=e=>{this.previousLength=0}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",this.changeListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this.changeListener)}clickHandler(e){if(!this.disabled){if(this.open){const t=e.target.closest("option,[role=option]");if(!t||t.disabled)return;this.selectedOptions=[t],this.control.value=t.text,this.value=this.control.value,this.$emit("change")}this.control.focus()}}keyupHandler(e){switch(e.key){case"Backspace":case"Delete":this.previousLength<0?this.$emit("inputdeleted"):this.previousLength=this.previousLength-1;break;case"Enter":if(this.open&&-1!==this.selectedIndex){const e=this.slottedOptions[0];this.selectedOptions=[e],this.control.value=e.text,this.value=this.control.value,this.$emit("change")}}super.keyupHandler(e)}keydownHandler(e){const t=e.key;if(this.inputLocked){const i=e.ctrlKey||e.metaKey||e.altKey;if(!(_u.has(t)||i))return e.preventDefault(),!1}switch(t){case"ArrowUp":case"ArrowDown":return this.control.value.length<this.minlength?void 0:super.keydownHandler(e);case"Enter":return-1!==this.selectedIndex&&super.keydownHandler(e);case"Tab":if(!this.open)return!0;e.shiftKey?this.selectPreviousOption():this.selectNextOption();break;default:return super.keydownHandler(e)}}inputHandler(e){if(this.inputLocked)return this.control.value="",this.value="",this.open=!1,void e.stopImmediatePropagation();this.control.value.length>=this.minlength?this.open=!0:(e.stopImmediatePropagation(),this.open=!1),this.value=this.control.value,this.previousLength=this.control.value.length}openChanged(){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),void this.focusAndScrollOptionIntoView();this.ariaControls="",this.ariaExpanded="false"}}(0,C.Cg)([l.attr],Hu.prototype,"minlength",void 0),(0,C.Cg)([l.observable],Hu.prototype,"inputLocked",void 0);const Pu={delegatesFocus:!0,mode:"open"},zu={},Uu=Hu.compose(Object.assign({baseName:"search-bar-combobox",template:Mu,styles:Nu,shadowOptions:Pu},zu)),Bu=l.css`
|
|
4762
4762
|
:host {
|
|
4763
4763
|
display: block;
|
|
4764
4764
|
width: 100%;
|
|
@@ -4951,7 +4951,7 @@
|
|
|
4951
4951
|
.section-link.state-none {
|
|
4952
4952
|
color: var(--neutral-foreground-rest);
|
|
4953
4953
|
}
|
|
4954
|
-
`,
|
|
4954
|
+
`,Vu=l.html`
|
|
4955
4955
|
${e=>{return t=T(e),l.html`
|
|
4956
4956
|
<template>
|
|
4957
4957
|
<div
|
|
@@ -4996,7 +4996,7 @@
|
|
|
4996
4996
|
</div>
|
|
4997
4997
|
</template>
|
|
4998
4998
|
`;var t}}
|
|
4999
|
-
`,zu=(0,it.createLogger)("SectionNavigator"),Uu="section-navigator",Bu={setState:`${Uu}-set-state`,setStates:`${Uu}-set-states`,clearState:`${Uu}-clear-state`,clearAllStates:`${Uu}-clear-all-states`},Vu={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},Gu={active:{name:"circle-dot",variant:"solid"},inactive:{name:"times-circle",variant:"regular"},pending:{name:"clock",variant:"solid"},disabled:{name:"ban",variant:"solid"},error:{name:"times",variant:"solid"},completed:{name:"check",variant:"solid"}};class ju extends a.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=Vu,this.stateIcons=Gu,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=""}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections))return zu.warn("Sections must be an array"),void(this.sectionItems=[]);this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(this.sectionContent){if(null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0,"top"===this.scrollBehavior)try{const e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(".content-section:last-child");if(t){const i=t.offsetHeight,o=20,n=Math.max(0,e-i-o);this.spacerElement=document.createElement("div"),this.spacerElement.className="scroll-spacer",this.spacerElement.style.height=`${n}px`,this.spacerElement.style.pointerEvents="none",this.sectionContent.appendChild(this.spacerElement)}}catch(e){zu.error("Error updating spacer:",e)}}else zu.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void zu.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){zu.error("Error scrolling to section:",e)}else zu.warn("Section content not available")}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(this.sectionContent)try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},ju.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener("scroll",this.scrollCheckHandler,{passive:!0});const e=()=>{this.isUserScrolling=!0},t=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};let i;this.sectionContent.addEventListener("wheel",e,{passive:!0}),this.sectionContent.addEventListener("touchstart",e,{passive:!0}),this.sectionContent.addEventListener("mousedown",e,{passive:!0}),this.sectionContent.addEventListener("scrollend",t,{passive:!0}),this.sectionContent.addEventListener("scroll",()=>{clearTimeout(i),i=window.setTimeout(t,ju.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){zu.error("Error setting up scroll detection:",e)}else zu.warn("Section content not available for scroll detection")}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;const e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2;let t=null,i=1/0;this.sectionItems.forEach(o=>{const n=this.sectionContent.querySelector(`[data-section="${o.name}"]`);if(n){const s=n.offsetTop+n.clientHeight/2,a=Math.abs(s-e);a<i&&(i=a,t=o.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener("scroll",this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){this.sectionContent?(this.handleSetStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.addState(t,i)}catch(e){zu.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){zu.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){zu.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){zu.error("Error handling clear-all-states event:",e)}},this.handleGenericStateEventRef=e=>{try{const t=e.type,i=e.detail;if(null==i?void 0:i.sectionName)return;const o=e.target.closest("[data-section]");let n=null==o?void 0:o.getAttribute("data-section");if(!n){const t=e.target.closest("[slot]");n=(null==t?void 0:t.getAttribute("slot"))||this.activeSection}n||(n=this.activeSection),e.stopPropagation(),e.preventDefault();const s=Object.assign(Object.assign({},i),{sectionName:n}),a=new CustomEvent(t,{detail:s,bubbles:!0,cancelable:!0});this.dispatchEvent(a)}catch(e){zu.error("Error handling generic state event:",e)}},this.addEventListener(Bu.setState,this.handleSetStateRef),this.addEventListener(Bu.setStates,this.handleSetStatesRef),this.addEventListener(Bu.clearState,this.handleClearStateRef),this.addEventListener(Bu.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(Bu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Bu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Bu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Bu.clearAllStates,this.handleGenericStateEventRef,!0)):zu.warn("Section content not available for event listeners")}updateSectionStates(e,t){const i=this.sectionItems.findIndex(t=>t.name===e);if(-1!==i){const e=Object.assign(Object.assign({},this.sectionItems[i]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,i),e,...this.sectionItems.slice(i+1)]}}addState(e,t){if(!e||!t)return void zu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void zu.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[];if(!o.includes(t)){const i=[...o,t];this.updateSectionStates(e,i)}}addStates(e,t){if(!e||!Array.isArray(t))return void zu.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void zu.warn(`Section "${e}" not found`);const o=[...this.sectionItems[i].states||[]];t.forEach(e=>{o.includes(e)||o.push(e)}),this.updateSectionStates(e,o)}clearState(e,t){if(!e||!t)return void zu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void zu.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[],n=o.indexOf(t);if(n>-1){const t=o.filter((e,t)=>t!==n);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e)return void zu.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):zu.warn(`Section "${e}" not found`)}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||"":(zu.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return zu.warn("Section is required"),"state-none";const t=e.states||[];if(0===t.length)return"state-none";if(t.length>1)return"state-multiple";return`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||Gu[e]:(zu.warn("State name is required"),Gu.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(Bu.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(Bu.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(Bu.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(Bu.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(Bu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Bu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Bu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Bu.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}ju.SCROLL_END_TIMEOUT=150,ju.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],ju.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],ju.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],ju.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],ju.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],ju.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],ju.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],ju.prototype,"activeSection",void 0);const Yu={mode:"open"},Wu={},qu=ju.compose(Object.assign({baseName:"foundation-section-navigator",template:Pu,styles:Hu,shadowOptions:Yu},Wu)),Ku=(e,t)=>l.css`
|
|
4999
|
+
`,Gu=(0,it.createLogger)("SectionNavigator"),ju="section-navigator",Yu={setState:`${ju}-set-state`,setStates:`${ju}-set-states`,clearState:`${ju}-clear-state`,clearAllStates:`${ju}-clear-all-states`},Wu={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},qu={active:{name:"circle-dot",variant:"solid"},inactive:{name:"times-circle",variant:"regular"},pending:{name:"clock",variant:"solid"},disabled:{name:"ban",variant:"solid"},error:{name:"times",variant:"solid"},completed:{name:"check",variant:"solid"}};class Ku extends a.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=Wu,this.stateIcons=qu,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=""}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections))return Gu.warn("Sections must be an array"),void(this.sectionItems=[]);this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(this.sectionContent){if(null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0,"top"===this.scrollBehavior)try{const e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(".content-section:last-child");if(t){const i=t.offsetHeight,o=20,n=Math.max(0,e-i-o);this.spacerElement=document.createElement("div"),this.spacerElement.className="scroll-spacer",this.spacerElement.style.height=`${n}px`,this.spacerElement.style.pointerEvents="none",this.sectionContent.appendChild(this.spacerElement)}}catch(e){Gu.error("Error updating spacer:",e)}}else Gu.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void Gu.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){Gu.error("Error scrolling to section:",e)}else Gu.warn("Section content not available")}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(this.sectionContent)try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},Ku.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener("scroll",this.scrollCheckHandler,{passive:!0});const e=()=>{this.isUserScrolling=!0},t=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};let i;this.sectionContent.addEventListener("wheel",e,{passive:!0}),this.sectionContent.addEventListener("touchstart",e,{passive:!0}),this.sectionContent.addEventListener("mousedown",e,{passive:!0}),this.sectionContent.addEventListener("scrollend",t,{passive:!0}),this.sectionContent.addEventListener("scroll",()=>{clearTimeout(i),i=window.setTimeout(t,Ku.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){Gu.error("Error setting up scroll detection:",e)}else Gu.warn("Section content not available for scroll detection")}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;const e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2;let t=null,i=1/0;this.sectionItems.forEach(o=>{const n=this.sectionContent.querySelector(`[data-section="${o.name}"]`);if(n){const s=n.offsetTop+n.clientHeight/2,a=Math.abs(s-e);a<i&&(i=a,t=o.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener("scroll",this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){this.sectionContent?(this.handleSetStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.addState(t,i)}catch(e){Gu.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){Gu.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){Gu.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){Gu.error("Error handling clear-all-states event:",e)}},this.handleGenericStateEventRef=e=>{try{const t=e.type,i=e.detail;if(null==i?void 0:i.sectionName)return;const o=e.target.closest("[data-section]");let n=null==o?void 0:o.getAttribute("data-section");if(!n){const t=e.target.closest("[slot]");n=(null==t?void 0:t.getAttribute("slot"))||this.activeSection}n||(n=this.activeSection),e.stopPropagation(),e.preventDefault();const s=Object.assign(Object.assign({},i),{sectionName:n}),a=new CustomEvent(t,{detail:s,bubbles:!0,cancelable:!0});this.dispatchEvent(a)}catch(e){Gu.error("Error handling generic state event:",e)}},this.addEventListener(Yu.setState,this.handleSetStateRef),this.addEventListener(Yu.setStates,this.handleSetStatesRef),this.addEventListener(Yu.clearState,this.handleClearStateRef),this.addEventListener(Yu.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(Yu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Yu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Yu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Yu.clearAllStates,this.handleGenericStateEventRef,!0)):Gu.warn("Section content not available for event listeners")}updateSectionStates(e,t){const i=this.sectionItems.findIndex(t=>t.name===e);if(-1!==i){const e=Object.assign(Object.assign({},this.sectionItems[i]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,i),e,...this.sectionItems.slice(i+1)]}}addState(e,t){if(!e||!t)return void Gu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Gu.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[];if(!o.includes(t)){const i=[...o,t];this.updateSectionStates(e,i)}}addStates(e,t){if(!e||!Array.isArray(t))return void Gu.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Gu.warn(`Section "${e}" not found`);const o=[...this.sectionItems[i].states||[]];t.forEach(e=>{o.includes(e)||o.push(e)}),this.updateSectionStates(e,o)}clearState(e,t){if(!e||!t)return void Gu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Gu.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[],n=o.indexOf(t);if(n>-1){const t=o.filter((e,t)=>t!==n);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e)return void Gu.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):Gu.warn(`Section "${e}" not found`)}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||"":(Gu.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return Gu.warn("Section is required"),"state-none";const t=e.states||[];if(0===t.length)return"state-none";if(t.length>1)return"state-multiple";return`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||qu[e]:(Gu.warn("State name is required"),qu.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(Yu.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(Yu.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(Yu.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(Yu.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(Yu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Yu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Yu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Yu.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}Ku.SCROLL_END_TIMEOUT=150,Ku.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],Ku.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],Ku.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],Ku.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],Ku.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],Ku.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],Ku.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],Ku.prototype,"activeSection",void 0);const Xu={mode:"open"},Ju={},Qu=Ku.compose(Object.assign({baseName:"foundation-section-navigator",template:Vu,styles:Bu,shadowOptions:Xu},Ju)),Zu=(e,t)=>l.css`
|
|
5000
5000
|
${(0,r.radioGroupStyles)(e,t)}
|
|
5001
5001
|
::slotted(foundation-segmented-item:first-of-type) {
|
|
5002
5002
|
border-radius: calc(var(--control-corner-radius) * 1px) 0 0
|
|
@@ -5009,7 +5009,7 @@
|
|
|
5009
5009
|
calc(var(--control-corner-radius) * 1px) 0;
|
|
5010
5010
|
border-left-width: 0;
|
|
5011
5011
|
}
|
|
5012
|
-
`,
|
|
5012
|
+
`,eh=(e,t)=>(0,a.radioGroupTemplate)(e,t);class th extends a.RadioGroup{valueChanged(){void 0===this.value&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}}const ih=void 0,oh={},nh=th.compose(Object.assign({baseName:"segmented-control",template:eh,styles:Zu,shadowOptions:ih},oh)),sh=(e,t)=>l.css`
|
|
5013
5013
|
${(0,r.radioStyles)(e,t)}
|
|
5014
5014
|
:host {
|
|
5015
5015
|
padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);
|
|
@@ -5020,7 +5020,7 @@
|
|
|
5020
5020
|
:host([aria-checked='true']) {
|
|
5021
5021
|
background: var(--accent-foreground-rest);
|
|
5022
5022
|
}
|
|
5023
|
-
`,
|
|
5023
|
+
`,ah=(e,t)=>l.html`
|
|
5024
5024
|
<template
|
|
5025
5025
|
role="radio"
|
|
5026
5026
|
aria-checked="${e=>e.checked}"
|
|
@@ -5034,7 +5034,7 @@
|
|
|
5034
5034
|
<slot></slot>
|
|
5035
5035
|
</span>
|
|
5036
5036
|
</template>
|
|
5037
|
-
`;class
|
|
5037
|
+
`;class rh extends r.Radio{}const lh=void 0,dh={},ch=rh.compose(Object.assign({baseName:"segmented-item",template:ah,styles:sh,shadowOptions:lh},dh)),uh=(e,t)=>l.css`
|
|
5038
5038
|
${(0,r.selectStyles)(e,t)}
|
|
5039
5039
|
|
|
5040
5040
|
:host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible),
|
|
@@ -5042,19 +5042,19 @@
|
|
|
5042
5042
|
box-shadow: none;
|
|
5043
5043
|
outline: none;
|
|
5044
5044
|
}
|
|
5045
|
-
`,
|
|
5045
|
+
`,hh=(e,t)=>(0,a.selectTemplate)(e,t);class ph extends r.Select{get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}slottedOptionsChanged(e,t){const i=this.value;super.slottedOptionsChanged(e,t),this.selectedIndex=-1;const o=[];this.slottedOptions&&this.slottedOptions.forEach(e=>{const t=e.nodeName.toLowerCase();if(t.endsWith("-optgroup")){const t=Array.from(e.children).filter(e=>{const t=e.nodeName.toLowerCase();return"option"===e.getAttribute("role")||t.endsWith("-option")});o.push(...t)}else("option"===e.getAttribute("role")||t.endsWith("-option"))&&o.push(e)}),this.options=o,i&&(this.value=i),-1===this.selectedIndex&&this.options.length>0&&(this.selectedIndex=0)}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(function(e){const t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement:document.activeElement}(this))&&null!==e&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest"})}))}openChanged(e,t){if(this.collapsible){if(this.$emit("open-change",{open:this.open}),this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void l.DOM.queueUpdate(()=>this.focus());this.ariaControls="",this.ariaExpanded="false"}}keydownHandler(e){switch(e.key){case"ArrowDown":case"ArrowUp":if(this.open){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView({block:"center",behavior:"auto"})}else this.open=!0}return super.keydownHandler(e)}}const mh=void 0,gh={indicator:'\n <svg\n class="select-indicator"\n part="select-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},vh=ph.compose(Object.assign({baseName:"select",template:hh,styles:uh,shadowOptions:mh},gh)),fh=(e,t)=>l.css`
|
|
5046
5046
|
${(0,r.skeletonStyles)(e,t)}
|
|
5047
|
-
`,
|
|
5047
|
+
`,bh=(e,t)=>(0,a.skeletonTemplate)(e,t);class yh extends r.Skeleton{}const wh=void 0,Ch={},xh=yh.compose(Object.assign({baseName:"skeleton",template:bh,styles:fh,shadowOptions:wh},Ch)),$h=(e,t)=>l.css`
|
|
5048
5048
|
${(0,r.sliderStyles)(e,t)}
|
|
5049
5049
|
.track-progress {
|
|
5050
5050
|
background-color: var(--accent-fill-rest);
|
|
5051
5051
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
5052
5052
|
}
|
|
5053
|
-
`;var
|
|
5053
|
+
`;var Sh=i(17733),Eh=i(54120);const Oh=(e,t)=>l.html`
|
|
5054
5054
|
<template
|
|
5055
5055
|
role="slider"
|
|
5056
5056
|
class="${e=>e.readOnly?"readonly":""}
|
|
5057
|
-
${e=>e.orientation||
|
|
5057
|
+
${e=>e.orientation||Sh.t.horizontal}"
|
|
5058
5058
|
tabindex="${e=>e.disabled?null:0}"
|
|
5059
5059
|
aria-valuetext="${e=>e.valueTextFormatter(e.value)}"
|
|
5060
5060
|
aria-valuenow="${e=>e.value}"
|
|
@@ -5069,7 +5069,7 @@
|
|
|
5069
5069
|
<div ${(0,l.ref)("track")} part="track-container" class="track">
|
|
5070
5070
|
<div
|
|
5071
5071
|
class="track-progress"
|
|
5072
|
-
style="${e=>{const t=1-(0,
|
|
5072
|
+
style="${e=>{const t=1-(0,Eh.AB)(0,1,(parseInt(e.value)-e.min)/(e.max-e.min)),i=Math.round(100*(1-t));return"horizontal"===e.orientation?e.isDragging?`height: calc(var(--track-width) * 1px); width: ${i}%;`:`height: calc(var(--track-width) * 1px); width: ${i}%; transition: all 0.2s ease;`:e.isDragging?`width: calc(var(--track-width) * 1px); height: ${i}%;`:`width: calc(var(--track-width) * 1px); height: ${i}%; transition: all 0.2s ease;`}}"
|
|
5073
5073
|
></div>
|
|
5074
5074
|
</div>
|
|
5075
5075
|
<slot></slot>
|
|
@@ -5083,9 +5083,9 @@
|
|
|
5083
5083
|
</div>
|
|
5084
5084
|
</div>
|
|
5085
5085
|
</template>
|
|
5086
|
-
`;class
|
|
5086
|
+
`;class Th extends r.Slider{}const kh=void 0,Dh={thumb:'\n <div class="thumb-cursor"></div>\n '},Ih=Th.compose(Object.assign({baseName:"slider",template:Oh,styles:$h,shadowOptions:kh},Dh)),Rh=(e,t)=>l.css`
|
|
5087
5087
|
${(0,r.sliderLabelStyles)(e,t)}
|
|
5088
|
-
`,
|
|
5088
|
+
`,Ah=(e,t)=>(0,a.sliderLabelTemplate)(e,t);class Lh extends r.SliderLabel{}const Fh=void 0,Nh={},Mh=Lh.compose(Object.assign({baseName:"slider-label",template:Ah,styles:Rh,shadowOptions:Fh},Nh)),_h="default",Hh={DEFAULT:_h,ERROR:"error",SUCCESS:"success"},Ph=1e4,zh={DISMISS:"dismiss",AUTO_DISMISS:"autoDismiss"},Uh=l.css`
|
|
5089
5089
|
@keyframes append-from-left-animate {
|
|
5090
5090
|
from {
|
|
5091
5091
|
transform: translateX(100%);
|
|
@@ -5206,7 +5206,7 @@
|
|
|
5206
5206
|
flex: 1;
|
|
5207
5207
|
overflow: hidden;
|
|
5208
5208
|
}
|
|
5209
|
-
`,
|
|
5209
|
+
`,Bh=e=>l.html`
|
|
5210
5210
|
<div
|
|
5211
5211
|
role="alert"
|
|
5212
5212
|
aria-live="polite"
|
|
@@ -5235,9 +5235,9 @@
|
|
|
5235
5235
|
</div>
|
|
5236
5236
|
`)}
|
|
5237
5237
|
</div>
|
|
5238
|
-
`,
|
|
5239
|
-
${e=>
|
|
5240
|
-
`,
|
|
5238
|
+
`,Vh=l.html`
|
|
5239
|
+
${e=>Bh(T(e))}
|
|
5240
|
+
`,Gh={mode:"open",delegatesFocus:!0};class jh extends a.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=Ph,this.autoClose=!0,this.type=_h,this.dismissEventListener=this.handleDissmis.bind(this)}autoCloseChanged(){this.autoClose&&(this.timeoutRef=setTimeout(()=>{this.handleDissmis(!0)},this.closeTimeout)),!this.autoClose&&this.timeoutRef&&clearTimeout(this.timeoutRef)}connectedCallback(){super.connectedCallback(),this.addEventListener(zh.DISMISS,this.dismissEventListener)}errorChanged(e,t){var i,o,n;this.type=null!==(n=null===(o=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.type)&&void 0!==n?n:_h}notificationChanged(e,t){var i,o,n,s,a,r,l,d,c;this.type=null!==(n=null===(o=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.type)&&void 0!==n?n:_h,this.autoClose=null===(r=null===(a=null===(s=null==t?void 0:t.config)||void 0===s?void 0:s.snackbar)||void 0===a?void 0:a.autoClose)||void 0===r||r,this.closeTimeout=null!==(c=null===(d=null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.snackbar)||void 0===d?void 0:d.closeTimeout)&&void 0!==c?c:Ph}handleDissmis(e=!1){this.deleteAnimation="snackbar-delete",this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(zh.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(zh.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}}(0,C.Cg)([l.observable],jh.prototype,"error",void 0),(0,C.Cg)([l.observable],jh.prototype,"notification",void 0),(0,C.Cg)([l.observable],jh.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"identifier"})],jh.prototype,"identifier",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],jh.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],jh.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],jh.prototype,"type",void 0);const Yh=jh.compose({baseName:"snackbar",styles:Uh,template:Vh,shadowOptions:Gh}),Wh=(e,t)=>l.css`
|
|
5241
5241
|
${wr()}
|
|
5242
5242
|
|
|
5243
5243
|
.fa-stack {
|
|
@@ -5263,14 +5263,14 @@
|
|
|
5263
5263
|
.fa-stack-1x {
|
|
5264
5264
|
z-index: 1;
|
|
5265
5265
|
}
|
|
5266
|
-
`,
|
|
5266
|
+
`,qh=l.html`
|
|
5267
5267
|
<span
|
|
5268
5268
|
class=${e=>`fa-stack fa-${e.size}`}
|
|
5269
5269
|
style=${e=>`vertical-align: ${e["vertical-align"]};`}
|
|
5270
5270
|
>
|
|
5271
5271
|
<slot></slot>
|
|
5272
5272
|
</span>
|
|
5273
|
-
`;class
|
|
5273
|
+
`;class Kh extends a.FoundationElement{constructor(){super(...arguments),this.size=Tr,this["vertical-align"]="baseline"}}(0,C.Cg)([l.attr],Kh.prototype,"size",void 0),(0,C.Cg)([l.attr],Kh.prototype,"vertical-align",void 0);const Xh=Kh.compose({baseName:"stacking-icons",template:qh,styles:Wh}),Jh=l.css`
|
|
5274
5274
|
.status-pill {
|
|
5275
5275
|
font-size: var(--ag-data-font-size);
|
|
5276
5276
|
display: inline-flex;
|
|
@@ -5305,7 +5305,7 @@
|
|
|
5305
5305
|
.status-pill-image {
|
|
5306
5306
|
height: 14px;
|
|
5307
5307
|
}
|
|
5308
|
-
`,
|
|
5308
|
+
`,Qh=l.html`
|
|
5309
5309
|
${e=>{return t=T(e),l.html`
|
|
5310
5310
|
${(0,l.when)(e=>e.isCountdownVisible&&!(e.hideWhenCountdownCompleted&&e.isCountdownExpired),l.html`
|
|
5311
5311
|
<div
|
|
@@ -5336,7 +5336,7 @@
|
|
|
5336
5336
|
</div>
|
|
5337
5337
|
`)}
|
|
5338
5338
|
`;var t}}
|
|
5339
|
-
`,
|
|
5339
|
+
`,Zh=(e,t="second")=>{let i=e/1e3;const o=Math.floor(i/86400);i%=86400;const n=Math.floor(i/3600);i%=3600;const s=Math.floor(i/60),a=Math.floor(i%60),r=[];switch(o&&r.push(`${o}d`),t){case"minute":n&&r.push(`${n}h`),s&&r.push(`${s}m`),!s&&a&&r.push("< 1m");break;case"hour":n&&r.push(`${n}h`),n||!s&&!a||r.push("< 1h");break;default:n&&r.push(`${n}h`),s&&r.push(`${s}m`),a&&r.push(`${a}s`)}return r.length?r.join(" "):"0s"};class ep extends a.FoundationElement{constructor(){super(...arguments),this.iconSize="sm",this.dateCountdownCompletedMessage="Expired",this.dateCountdownUnit="second",this.hideWhenCountdownCompleted=!1,this.isCountdownExpired=!1,this.isCountdownVisible=!0}dateCountdownChanged(e,t){if(e!==t){if(!t)return void this.clearCountdownTimer();this.isCountdownExpired=!1,this.setUpDateCountdown(t)}}dateCountdownVisibleAfterChanged(e,t){e!==t&&this.updateVisibilityFromStartTime()}connectedCallback(){this.updateVisibilityFromStartTime(),super.connectedCallback()}disconnectedCallback(){this.clearCountdownTimer(),super.disconnectedCallback()}setUpDateCountdown(e){if(this.clearCountdownTimer(),isNaN(parseInt(e)))ot.warn("invalid date-countdown value passed. Must be a number");else{e=parseInt(e);const t=new Date(e);this.updateCountdown(t),this.dateInterval=setInterval(()=>this.updateCountdown(t),1e3)}}updateCountdown(e){const t=(new Date).getTime(),i=Math.floor(e.getTime()-t),o=void 0!==this.dateCountdownVisibleAfter&&null!==this.dateCountdownVisibleAfter?Number(this.dateCountdownVisibleAfter):void 0;if(void 0!==o&&!isNaN(o)&&t<o)return this.isCountdownVisible=!1,this.countdown=null,void(this.isCountdownExpired=!1);this.isCountdownVisible=!0,i<=0?this.hideWhenCountdownCompleted?(this.isCountdownExpired=!0,this.clearCountdownTimer()):(this.countdown=this.dateCountdownCompletedMessage,clearInterval(this.dateInterval)):this.countdown=Zh(i,this.dateCountdownUnit)}updateVisibilityFromStartTime(){const e=void 0!==this.dateCountdownVisibleAfter&&null!==this.dateCountdownVisibleAfter?Number(this.dateCountdownVisibleAfter):void 0;if(void 0===e||isNaN(e))this.isCountdownVisible=!0;else{const t=Date.now();this.isCountdownVisible=t>=e}}clearCountdownTimer(){this.dateInterval&&(clearInterval(this.dateInterval),this.dateInterval=null),this.countdown=null}}(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],ep.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-name"})],ep.prototype,"iconName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-src"})],ep.prototype,"iconSrc",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial"})],ep.prototype,"iconInitial",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial-background-color"})],ep.prototype,"iconInitialBackgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],ep.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],ep.prototype,"textColor",void 0),(0,C.Cg)([l.attr],ep.prototype,"text",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown"})],ep.prototype,"dateCountdown",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-completed-message"})],ep.prototype,"dateCountdownCompletedMessage",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-unit"})],ep.prototype,"dateCountdownUnit",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-visible-after"})],ep.prototype,"dateCountdownVisibleAfter",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"hide-when-countdown-completed"})],ep.prototype,"hideWhenCountdownCompleted",void 0),(0,C.Cg)([l.observable],ep.prototype,"countdown",void 0),(0,C.Cg)([l.observable],ep.prototype,"isCountdownExpired",void 0),(0,C.Cg)([l.observable],ep.prototype,"isCountdownVisible",void 0);const tp=ep.compose({baseName:"status-pill",styles:Jh,template:Qh}),ip=(e,t)=>l.css`
|
|
5340
5340
|
.tree-item {
|
|
5341
5341
|
cursor: default;
|
|
5342
5342
|
}
|
|
@@ -5446,7 +5446,7 @@
|
|
|
5446
5446
|
width: calc(100% - 28px);
|
|
5447
5447
|
background-color: var(--accent-fill-rest); /* Choose a color */
|
|
5448
5448
|
}
|
|
5449
|
-
`,
|
|
5449
|
+
`,op=e=>l.html`
|
|
5450
5450
|
${(0,En.q)(e=>e.orientation===a.TabsOrientation.vertical,l.html`
|
|
5451
5451
|
<${e}-tree-item ${(0,l.ref)("treeItem")}
|
|
5452
5452
|
class=${e=>(0,x.x)("tree-item",["cursor-pointer",e.showCursorPointer])}
|
|
@@ -5490,13 +5490,13 @@
|
|
|
5490
5490
|
`)}
|
|
5491
5491
|
</div>
|
|
5492
5492
|
`)}
|
|
5493
|
-
`,
|
|
5494
|
-
${e=>
|
|
5495
|
-
`;class
|
|
5493
|
+
`,np=l.html`
|
|
5494
|
+
${e=>op(T(e))}
|
|
5495
|
+
`;class sp extends a.FoundationElement{constructor(){super(...arguments),this.slot="tab",this.orientation=a.TabsOrientation.vertical}isCompleted(){return this.completed}selectedChanged(){this.treeItem&&(this.treeItem.selected=this.selected)}disconnectedCallback(){super.disconnectedCallback(),this.completed=void 0,this.error=void 0,this.selected=void 0}}(0,C.Cg)([l.attr],sp.prototype,"slot",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],sp.prototype,"selected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],sp.prototype,"completed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],sp.prototype,"error",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],sp.prototype,"isLast",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],sp.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],sp.prototype,"showCursorPointer",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tab-position"})],sp.prototype,"tabPosition",void 0),(0,C.Cg)([l.attr],sp.prototype,"orientation",void 0);const ap=void 0,rp={},lp=sp.compose(Object.assign({baseName:"stepper-tab",template:np,styles:ip,shadowOptions:ap},rp)),dp=()=>l.html`
|
|
5496
5496
|
<template slot="tab-panel" role="stepper-tab-panel">
|
|
5497
5497
|
<slot></slot>
|
|
5498
5498
|
</template>
|
|
5499
|
-
`;class
|
|
5499
|
+
`;class cp extends a.FoundationElement{}const up=void 0,hp={},pp=cp.compose(Object.assign({baseName:"stepper-tab-panel",template:dp,shadowOptions:up},hp)),mp=(e,t)=>l.css`
|
|
5500
5500
|
${(0,r.switchStyles)(e,t)}
|
|
5501
5501
|
.checked-indicator {
|
|
5502
5502
|
transform: scale(1.3);
|
|
@@ -5509,20 +5509,20 @@
|
|
|
5509
5509
|
.checked-indicator {
|
|
5510
5510
|
border-radius: calc(var(--control-corner-radius) * 2px);
|
|
5511
5511
|
}
|
|
5512
|
-
`,
|
|
5512
|
+
`,gp=(e,t)=>(0,a.switchTemplate)(e,t);class vp extends r.Switch{}const fp=void 0,bp={switch:'<div class="checked-indicator" part="checked-indicator"></div>'},yp=vp.compose(Object.assign({baseName:"switch",template:gp,styles:mp,shadowOptions:fp},bp)),wp="--alert-flash-t",Cp="--alert-flash-duration",xp="alert-flash-clock";let $p=!1;function Sp(){var e;if(!$p&&"undefined"!=typeof document){$p=!0;try{CSS.registerProperty({name:wp,syntax:"<number>",inherits:!0,initialValue:"0"});const t=new CSSStyleSheet;t.replaceSync(`\n @keyframes ${xp} {\n 0%, 100% { ${wp}: 0; }\n 50% { ${wp}: 1; }\n }\n\n :root {\n animation: ${xp} var(${Cp}, 1s) ease-in-out\n infinite;\n }\n\n @media (prefers-reduced-motion: reduce) {\n :root {\n animation: none;\n }\n }\n `),document.adoptedStyleSheets=[...null!==(e=document.adoptedStyleSheets)&&void 0!==e?e:[],t]}catch(e){}}}const Ep=(e,t)=>l.css`
|
|
5513
5513
|
${(0,r.tabStyles)(e,t)}
|
|
5514
5514
|
|
|
5515
5515
|
:host {
|
|
5516
5516
|
user-select: none;
|
|
5517
5517
|
}
|
|
5518
|
-
`,
|
|
5518
|
+
`,Op=(e,t)=>(0,a.tabTemplate)(e,t);class Tp extends r.Tab{constructor(){super(...arguments),this.alert=!1}alertChanged(){this.alert&&Sp()}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Tp.prototype,"alert",void 0);const kp=void 0,Dp={},Ip=Tp.compose(Object.assign({baseName:"tab",template:Op,styles:Ep,shadowOptions:kp},Dp)),Rp=(e,t)=>l.css`
|
|
5519
5519
|
${(0,r.tabPanelStyles)(e,t)}
|
|
5520
5520
|
|
|
5521
5521
|
:host {
|
|
5522
5522
|
height: 100%;
|
|
5523
5523
|
padding: 0;
|
|
5524
5524
|
}
|
|
5525
|
-
`,
|
|
5525
|
+
`,Ap=(e,t)=>(0,a.tabPanelTemplate)(e,t);class Lp extends r.TabPanel{}const Fp=void 0,Np={},Mp=Lp.compose(Object.assign({baseName:"tab-panel",template:Ap,styles:Rp,shadowOptions:Fp},Np)),_p=(e,t)=>l.css`
|
|
5526
5526
|
${(0,r.tabsStyles)(e,t)}
|
|
5527
5527
|
|
|
5528
5528
|
:host {
|
|
@@ -5539,20 +5539,20 @@
|
|
|
5539
5539
|
:host([scrollable]) ::slotted([role='tab']) {
|
|
5540
5540
|
flex: 0 0 auto;
|
|
5541
5541
|
}
|
|
5542
|
-
`,
|
|
5542
|
+
`,Hp=(e,t)=>(0,a.tabsTemplate)(e,t);class Pp extends r.Tabs{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pp.prototype,"scrollable",void 0);const zp=void 0,Up={},Bp=Pp.compose(Object.assign({baseName:"tabs",template:Hp,styles:_p,shadowOptions:zp},Up)),Vp=(e,t)=>l.css`
|
|
5543
5543
|
${(0,r.textAreaStyles)(e,t)}
|
|
5544
5544
|
:host .control {
|
|
5545
5545
|
padding: calc(var(--design-unit) * 3px);
|
|
5546
5546
|
}
|
|
5547
|
-
`,
|
|
5547
|
+
`,Gp=(e,t)=>(0,a.textAreaTemplate)(e,t);class jp extends r.TextArea{}const Yp=void 0,Wp={},qp=jp.compose(Object.assign({baseName:"text-area",template:Gp,styles:Vp,shadowOptions:Yp},Wp)),{create:Kp}=a.DesignToken,Xp=Kp("active-color-scheme").withDefault(e=>r.baseLayerLuminance.getValueFor(e)===r.StandardLuminance.LightMode?"light":"dark"),Jp=(e,t)=>l.css`
|
|
5548
5548
|
${(0,r.textFieldStyles)(e,t)}
|
|
5549
5549
|
/* Override FAST .root align-items: baseline for this flex child so it still fills the row. */
|
|
5550
5550
|
${Cl}
|
|
5551
5551
|
|
|
5552
5552
|
input {
|
|
5553
|
-
color-scheme: ${
|
|
5553
|
+
color-scheme: ${Xp};
|
|
5554
5554
|
}
|
|
5555
|
-
`,
|
|
5555
|
+
`,Qp=(e,t)=>l.html`
|
|
5556
5556
|
<template
|
|
5557
5557
|
class="${e=>(0,x.x)(["readonly",e.readOnly],["has-prefix",!!e.prefix],["has-suffix",!!e.suffix])}"
|
|
5558
5558
|
>
|
|
@@ -5634,7 +5634,7 @@
|
|
|
5634
5634
|
${(0,a.endSlotTemplate)(e,t)}
|
|
5635
5635
|
</div>
|
|
5636
5636
|
</template>
|
|
5637
|
-
`;class
|
|
5637
|
+
`;class Zp extends(wl(r.TextField)){constructor(){super(...arguments),this.autocomplete="off",this.autocapitalize="off"}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}autocapitalizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocapitalize=this.autocapitalize)}}(0,C.Cg)([l.attr],Zp.prototype,"autocomplete",void 0),(0,C.Cg)([l.attr],Zp.prototype,"autocapitalize",void 0),(0,C.Cg)([l.attr],Zp.prototype,"step",void 0);const em={mode:"open",delegatesFocus:!0},tm={},im=Zp.compose(Object.assign({baseName:"text-field",template:Qp,styles:Jp,shadowOptions:em},tm)),om=l.css`
|
|
5638
5638
|
@keyframes append-animate {
|
|
5639
5639
|
from {
|
|
5640
5640
|
transform: translateX(100%);
|
|
@@ -5745,7 +5745,7 @@
|
|
|
5745
5745
|
margin-left: auto;
|
|
5746
5746
|
color: #879ba6;
|
|
5747
5747
|
}
|
|
5748
|
-
`,
|
|
5748
|
+
`,nm=(e="zero")=>l.html`
|
|
5749
5749
|
<div
|
|
5750
5750
|
role="alert"
|
|
5751
5751
|
part="root"
|
|
@@ -5772,13 +5772,13 @@
|
|
|
5772
5772
|
</div>
|
|
5773
5773
|
</div>
|
|
5774
5774
|
</div>
|
|
5775
|
-
`,
|
|
5776
|
-
${e=>
|
|
5777
|
-
`,
|
|
5775
|
+
`,sm=l.html`
|
|
5776
|
+
${e=>nm(T(e))}
|
|
5777
|
+
`,am={mode:"open",delegatesFocus:!0},rm={};class lm extends a.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=1e4,this.autoClose=!1,this.closeTimer=null}connectedCallback(){super.connectedCallback(),this.autoClose&&(this.closeTimer=setTimeout(()=>{this.deleteAnimation="toast-delete",this.toast.onanimationend=()=>{this.remove()}},this.closeTimeout))}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.closeTimer),this.closeTimer=null}close(){this.remove()}}(0,C.Cg)([l.observable],lm.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],lm.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close"})],lm.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"notification-icon"})],lm.prototype,"notificationIcon",void 0);const dm=lm.compose(Object.assign({baseName:"toast",styles:om,template:sm,shadowOptions:am},rm)),cm=(e,t)=>l.css`
|
|
5778
5778
|
${(0,r.toolbarStyles)(e,t)}
|
|
5779
|
-
`,
|
|
5779
|
+
`,um=(e,t)=>(0,a.toolbarTemplate)(e,t);class hm extends r.Toolbar{}const pm=void 0,mm={},gm=hm.compose(Object.assign({baseName:"toolbar",template:um,styles:cm,shadowOptions:pm},mm)),vm=(e,t)=>l.css`
|
|
5780
5780
|
${(0,r.tooltipStyles)(e,t)}
|
|
5781
|
-
`,
|
|
5781
|
+
`,fm=(e,t)=>(0,a.tooltipTemplate)(e,t);class bm extends r.Tooltip{}const ym=void 0,wm={},Cm=bm.compose(Object.assign({baseName:"tooltip",template:fm,styles:vm,shadowOptions:ym},wm)),xm=(e,t)=>l.css`
|
|
5782
5782
|
${(0,r.treeItemStyles)(e,t)}
|
|
5783
5783
|
:host {
|
|
5784
5784
|
--focus-stroke-width: 0;
|
|
@@ -5795,9 +5795,9 @@
|
|
|
5795
5795
|
.positioning-region {
|
|
5796
5796
|
height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);
|
|
5797
5797
|
}
|
|
5798
|
-
|
|
5798
|
+
`,$m=(e,t)=>(0,a.treeItemTemplate)(e,t);class Sm extends r.TreeItem{}const Em=void 0,Om={expandCollapseGlyph:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="expand-collapse-glyph">\n <path d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"></path>\n </svg>'},Tm=Sm.compose(Object.assign({baseName:"tree-item",template:$m,styles:xm,shadowOptions:Em},Om)),km=(e,t)=>l.css`
|
|
5799
5799
|
${(0,r.treeViewStyles)(e,t)}
|
|
5800
|
-
`,
|
|
5800
|
+
`,Dm=(e,t)=>(0,a.treeViewTemplate)(e,t);class Im extends a.TreeView{}const Rm=void 0,Am={},Lm=Im.compose(Object.assign({baseName:"tree-view",template:Dm,styles:km,shadowOptions:Rm},Am)),Fm=(e,t)=>l.css`
|
|
5801
5801
|
.container {
|
|
5802
5802
|
position: relative;
|
|
5803
5803
|
width: 100%;
|
|
@@ -5817,7 +5817,7 @@
|
|
|
5817
5817
|
overflow: hidden;
|
|
5818
5818
|
text-overflow: ellipsis;
|
|
5819
5819
|
}
|
|
5820
|
-
`,
|
|
5820
|
+
`,Nm=e=>l.html`
|
|
5821
5821
|
<div class="container" value=${e=>e.value}>
|
|
5822
5822
|
<${e}-text-field
|
|
5823
5823
|
class="url-input"
|
|
@@ -5832,9 +5832,9 @@
|
|
|
5832
5832
|
<a class="url-input-link" href=${e=>e.value} target="_blank">${e=>e.value}</a>
|
|
5833
5833
|
`)}
|
|
5834
5834
|
</div>
|
|
5835
|
-
`,
|
|
5836
|
-
${e=>
|
|
5837
|
-
`,
|
|
5835
|
+
`,Mm=l.html`
|
|
5836
|
+
${e=>Nm(T(e))}
|
|
5837
|
+
`,_m=void 0,Hm={};class Pm extends r.TextField{constructor(){super(...arguments),this.value=""}saveUrl(e){this.value=e.startsWith("http")?e:"https://"+e,this.focused=!1}focus(){this.focused=!0}}(0,C.Cg)([l.observable],Pm.prototype,"value",void 0),(0,C.Cg)([l.observable],Pm.prototype,"focused",void 0);const zm=Pm.compose(Object.assign({baseName:"url-input",template:Mm,styles:Fm,shadowOptions:_m},Hm)),Um=l.css`
|
|
5838
5838
|
:host {
|
|
5839
5839
|
display: block;
|
|
5840
5840
|
font-family: var(--body-font);
|
|
@@ -5903,7 +5903,7 @@
|
|
|
5903
5903
|
line-height: var(--type-ramp-base-line-height);
|
|
5904
5904
|
text-align: center;
|
|
5905
5905
|
outline: none;
|
|
5906
|
-
color-scheme: ${
|
|
5906
|
+
color-scheme: ${Xp};
|
|
5907
5907
|
}
|
|
5908
5908
|
|
|
5909
5909
|
.digit[appearance='filled'] .root {
|
|
@@ -5938,7 +5938,7 @@
|
|
|
5938
5938
|
}
|
|
5939
5939
|
|
|
5940
5940
|
${Cl}
|
|
5941
|
-
`,
|
|
5941
|
+
`,Bm=l.html`
|
|
5942
5942
|
<label
|
|
5943
5943
|
part="label"
|
|
5944
5944
|
id="${e=>e.labelId}"
|
|
@@ -5986,7 +5986,7 @@
|
|
|
5986
5986
|
</div>
|
|
5987
5987
|
`)}
|
|
5988
5988
|
</div>
|
|
5989
|
-
`,Pm={mode:"open",delegatesFocus:!0},zm={},Um=/^\d$/;class Bm extends a.FoundationElement{}class Vm extends((0,a.FormAssociated)(Bm)){constructor(){super(),this.values=[],this.controlListeners=new Map,this.syncingFromDigits=!1,this.appearance="outline",this.digits=6,this.readOnly=!1,this.autofocus=!1,this.error=!1,this.proxy=document.createElement("input")}get digitsIndexes(){return Array.from({length:this.digits},(e,t)=>t)}get controlIdPrefix(){return this.id||"verification-code"}get labelId(){return`${this.controlIdPrefix}-label`}get hasLabel(){var e;return!!(null===(e=this.defaultSlottedNodes)||void 0===e?void 0:e.length)}getControlId(e){return`${this.controlIdPrefix}-${e}`}clear(){this.value="",this.emitChange(),this.$fastController.isConnected&&this.focusDigit(0)}focus(){this.focusDigit(0)}valueChanged(e,t){const i=this.sanitizeCode(t);this.syncingFromDigits||this.syncDigitsFromValue(i),String(null!=t?t:"")===i?super.valueChanged(e,i):this.value=i}validate(e){var t,i;if(!(this.proxy instanceof HTMLElement))return;const o=null!==(t=null!=e?e:this.getControlElement(0))&&void 0!==t?t:void 0;String(null!==(i=this.value)&&void 0!==i?i:"").length>0&&!this.isComplete()?this.setValidity({patternMismatch:!0},`Please enter a ${this.digits}-digit code.`,o):!this.required||this.isComplete()?this.setValidity({},"",o):this.setValidity({valueMissing:!0},"Please fill out this field.",o)}connectedCallback(){super.connectedCallback(),this.proxy.type="text",this.proxy.inputMode="numeric",l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners(),this.autofocus&&!this.readOnly&&this.focus()})}disconnectedCallback(){super.disconnectedCallback(),this.unbindControlListeners()}digitsChanged(){var e;this.syncDigitsFromValue(this.sanitizeCode(this.value));const t=(null!==(e=this.values)&&void 0!==e?e:[]).join("");this.value!==t?this.value=t:this.validate(),l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners()})}get digitClassnames(){return[this.error&&"error",(this.disabled||this.readOnly)&&"disabled"].filter(Boolean).join(" ")}sanitizeCode(e){const t=Math.max(1,Number(this.digits)||6);return String(null!=e?e:"").replace(/\D/g,"").slice(0,t)}bindControlListeners(){this.unbindControlListeners();this.rootNode.querySelectorAll("[data-digit-index] input.control").forEach(e=>{const t=this.getIndexFromInput(e);if(null===t)return;const i={paste:e=>this.onPaste(e,t),keydown:e=>this.onKeyDown(e,t),input:e=>this.onInput(e,t)};e.addEventListener("paste",i.paste,!0),e.addEventListener("keydown",i.keydown),e.addEventListener("input",i.input),this.controlListeners.set(e,i)})}unbindControlListeners(){var e,t;null===(e=this.controlListeners)||void 0===e||e.forEach((e,t)=>{t.removeEventListener("paste",e.paste,!0),t.removeEventListener("keydown",e.keydown),t.removeEventListener("input",e.input)}),null===(t=this.controlListeners)||void 0===t||t.clear()}onKeyDown(e,t){if(!this.readOnly&&!this.disabled){if(Um.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey)return e.preventDefault(),this.updateDigit(t,e.key),void this.focusDigit(t+1);switch(e.key){case"Backspace":e.preventDefault(),this.handleBackspace(t);break;case"Delete":e.preventDefault(),this.handleDelete(t);break;case"ArrowLeft":e.preventDefault(),this.focusDigit(t-1);break;case"ArrowRight":e.preventDefault(),this.focusDigit(t+1);break;case"Tab":case"Home":case"End":break;default:this.isBlockedCharacter(e)&&e.preventDefault()}}}isBlockedCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(1===e.key.length&&!Um.test(e.key))}onInput(e,t){if(this.readOnly||this.disabled)return;const i=e.target,o=i.value.replace(/\D/g,"");if(o.length>1)return void this.applyDigits(o,t);const n=o.slice(-1);i.value!==n&&(i.value=n),n&&this.values[t]!==n?(this.updateDigit(t,n),this.focusDigit(t+1)):!n&&this.values[t]&&this.updateDigit(t,"")}onPaste(e,t){var i,o;if(this.readOnly||this.disabled)return;e.preventDefault();const n=null!==(o=null===(i=e.clipboardData)||void 0===i?void 0:i.getData("text"))&&void 0!==o?o:"";n&&this.applyDigits(n,t)}handleBackspace(e){this.values[e]?this.updateDigit(e,""):e>0&&(this.updateDigit(e-1,""),this.focusDigit(e-1))}handleDelete(e){this.values[e]&&this.updateDigit(e,"")}getIndexFromInput(e){var t;const i=Number(null===(t=e.closest("[data-digit-index]"))||void 0===t?void 0:t.getAttribute("data-digit-index"));return Number.isNaN(i)?null:i}syncDigitsFromValue(e){var t,i;const o=Math.max(1,Number(this.digits)||6),n=Array.from({length:o},(t,i)=>{var o;return null!==(o=e[i])&&void 0!==o?o:""}),s=null!==(t=this.values)&&void 0!==t?t:[];n.length===s.length&&n.every((e,t)=>e===s[t])||(this.values=n,(null===(i=this.$fastController)||void 0===i?void 0:i.isConnected)&&this.syncFieldValues())}updateDigit(e,t){if(e<0||e>=this.digits)return;const i=[...this.values];i[e]=t,this.values=i,this.syncFieldValue(e),this.commitValues(i)}applyDigits(e,t){const i=e.replace(/\D/g,"").slice(0,this.digits-t);if(!i.length)return;const o=[...this.values];for(let e=0;e<i.length;e+=1)o[t+e]=i[e];this.values=o,this.syncFieldValues(),this.commitValues(o),this.focusDigit(this.isComplete()?this.digits-1:t+i.length)}commitValues(e){const t=e.join("");this.syncingFromDigits=!0;try{this.value!==t?this.value=t:this.validate()}finally{this.syncingFromDigits=!1}this.emitChange(),this.isComplete()&&this.$emit("complete",{value:this.value})}syncFieldValues(){for(let e=0;e<this.digits;e+=1)this.syncFieldValue(e)}syncFieldValue(e){var t;const i=this.getControlElement(e);i&&(i.value=null!==(t=this.values[e])&&void 0!==t?t:"")}focusDigit(e){var t;e<0||e>=this.digits||null===(t=this.getControlElement(e))||void 0===t||t.focus()}get rootNode(){var e;return null!==(e=this.shadowRoot)&&void 0!==e?e:this}getControlElement(e){return this.rootNode.querySelector(`[data-digit-index="${e}"] input.control`)}isComplete(){var e;const t=null!==(e=this.values)&&void 0!==e?e:[];return t.length===this.digits&&t.every(e=>Um.test(e))}emitChange(){this.$emit("change",{value:this.value})}}(0,C.Cg)([l.observable],Vm.prototype,"values",void 0),(0,C.Cg)([l.observable],Vm.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.attr],Vm.prototype,"id",void 0),(0,C.Cg)([l.attr],Vm.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Vm.prototype,"digits",void 0),(0,C.Cg)([(0,l.attr)({attribute:"readonly",mode:"boolean"})],Vm.prototype,"readOnly",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vm.prototype,"autofocus",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vm.prototype,"error",void 0);const Gm=Vm.compose(Object.assign({baseName:"verification-code-input",template:Hm,styles:_m,shadowOptions:Pm},zm)),jm={foundationAccordion:m,foundationAiCriteriaSearch:Oe,foundationAiIndicator:Ie,foundationAccordionItem:w,foundationActionsMenu:A,foundationAnchor:Me,foundationAnchoredRegion:Be,foundationAvatar:Ke,foundationBadge:tt,foundationBanner:dt,foundationBreadcrumb:vt,foundationBreadcrumbItem:Ct,foundationButton:Tt,foundationCalendar:Lt,foundationCard:Pt,foundationCategorizedMultiselect:qt,foundationCheckbox:ei,foundationCombobox:Oi,foundationConnectionIndicator:Ri,foundationDataGrid:_i,foundationDataGridCell:Bi,foundationDataGridRow:Wi,foundationDatePicker:Eo,foundationDesignSystemProvider:xn,foundationDialog:Ln,foundationDisclosure:Pn,foundationDivider:jn,foundationDropdownMenu:Qn,foundationErrorBanner:fs,foundationErrorBoundary:Rs,foundationErrorDialog:_s,foundationFileReader:Gs,foundationFileUpload:aa,foundationFilter:fa,foundationFilterBar:Oa,foundationFlexLayout:Fa,foundationFlipper:za,foundationFlyout:qa,foundationGridLayout:or,foundationGridLayoutItem:lr,foundationHorizontalScroll:mr,foundationIcon:Ir,foundationListbox:Mr,foundationListboxOption:Br,foundationMenu:qr,foundationMenuItem:el,foundationModal:al,foundationMultiselect:vl,foundationNumberField:Bl,foundationOptgroup:Yl,foundationPill:Fd,foundationPopper:zd,foundationProgress:fd,foundationProgressRing:Yd,foundationRadio:Qd,foundationRadioGroup:nc,foundationScheduler:uc,foundationSchedulerCronBuilder:cu,foundationSchedulerTimezone:fu,foundationSearchBar:Iu,foundationSearchBarCombobox:_u,foundationSegmentedControl:eh,foundationSegmentedItem:ah,foundationSelect:hh,foundationSkeleton:bh,foundationSlider:Oh,foundationSliderLabel:Ah,foundationSnackbar:Bh,foundationStackingIcons:Yh,foundationStatusPill:Jh,foundationEnvironmentIndicator:hs,foundationStepperTab:np,foundationStepperTabPanel:dp,foundationSwitch:vp,foundationSystemHealthOverlay:Td,foundationTab:Op,foundationTabPanel:Ap,foundationTabs:Hp,foundationTextArea:Gp,foundationTextField:Qp,foundationToast:sm,foundationToolbar:um,foundationTooltip:fm,foundationTreeItem:$m,foundationTreeView:Dm,foundationUrlInput:Mm,foundationVerificationCodeInput:Gm,foundationSectionNavigator:qu,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Ym extends l.CSSDirective{constructor(e){super(),this.tokenMap=e}createTokenPartial(e,t){return l.cssPartial`${e}: ${t}`}createTokensCSS(){const e=[];for(const[t,i]of Object.entries(this.tokenMap))e.push(this.createTokenPartial(t,i).createCSS());return e}createCSS(){return this.createTokensCSS().join(";")}}let Wm=class extends vi{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()})}getColumnDefs(e){return null==e?void 0:e.flatMap(e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name})}clearData(){ot.debug("clearData - Method not implemented.")}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values()),i=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=i,this.dataGrid.rowsData=t}handleStreamInserts(e){ot.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};Wm=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],Wm);const qm=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],Km=[...qm,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],Xm={type:"NULL",maxRules:1,invisible:!0},Jm=["int","short","long","bigdecimal","double"],Qm=["date","date-time"],Zm=["enum",...Jm,"string",...Qm,"boolean"],ev=[{type:"equal",nbInputs:1,applyTo:Zm,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:Zm,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...Jm,...Qm],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...Jm,...Qm],optgroup:"Comparison"},{type:"contains",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"starts_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"ends_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"one_of",nbInputs:"many",applyTo:[...Zm].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...Zm].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...Jm,...Qm],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...Jm,...Qm],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...Zm],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...Zm],optgroup:"Null"}];var tv=i(93678);const iv=i.n(tv)()();function ov(e,t,i){const o=function e(o){const n=iv(o);if(n.groupId===t)return n.children=i(n.children),n;const s=[];let a=!1;for(const t of n.children)if("children"in t){const i=e(t);i?(s.push(i),a=!0):s.push(t)}else s.push(t);return n.children=s,a?n:null}(e);if(!o)throw new Error(`Unable to find group with groupId ${t}`);return o}function nv(e,t,i){return function e(o){for(const n of o.children){if(i(n,t))return o;if("children"in n){const t=e(n);if(t)return t}}return null}(e)}function sv(e,t){const i=nv(e,t,(e,t)=>"children"in e&&e.groupId===t);if(!i)throw new Error(`No parent group found for group with ID ${t}`);return i}function av(e,t){const i=nv(e,t,(e,t)=>"ruleId"in e&&e.ruleId===t);if(!i)throw new Error(`No parent group found for rule with ID ${t}`);return i}function rv(e,t,i){return ov(e,t,e=>[...e,i])}const lv="group-root";function dv(e,t){const i=(e,o)=>{return"children"in e?function(e,o){return Object.assign(Object.assign({},e),{level:o,config:t.getConfig(),groupId:t.getGroupId(),children:e.children.map(e=>i(e,o+1))})}(e,o):(n=e,Object.assign(Object.assign({},n),{ruleId:t.getRuleId(),config:t.getConfig()}));var n};return Object.assign(Object.assign({},e),{config:t.getConfig(),level:1,groupId:lv,children:e.children.map(e=>i(e,2))})}function cv(e){const t=e.children.map(e=>"children"in e?cv(e):function(e){const{operator:t,field:i,value:o}=e;return{operator:t,field:i,value:o}}(e));return{combinator:e.combinator,children:t}}const uv=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,hv=e=>`${uv(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,pv=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.input)&&void 0!==o?o:e.field.input},mv=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type},vv=e=>{const t={},i=[],o=e=>[...e].sort((e,t)=>"fieldId"in e&&"fieldId"in t?e.fieldId.localeCompare(t.fieldId):"type"in e&&"type"in t?e.type.localeCompare(t.type):0);e.forEach(e=>{if(e.optgroup){const i=e.optgroup;t[i]||(t[i]=[]),t[i].push(e)}else i.push(e)});const n=[];return Object.keys(t).sort().forEach(e=>{n.push({optgroup:e,xs:o(t[e])})}),[...n,...o(i)]};function gv(e,t,i){if(!e.shadowRoot||!(null==t?void 0:t.customStyles))return;const o=t.customStyles[i];if(o){const t=document.createElement("style");t.textContent=o,e.shadowRoot.firstChild?e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild):e.shadowRoot.appendChild(t)}}var fv;!function(e){e.AddGroup="add-group",e.DelGroup="del-group",e.AddRule="add-rule",e.DelRule="del-rule",e.UpdateGroup="update-group",e.UpdateRule="update-rule",e.FieldSelected="field-selected",e.OperatorSelected="operator-selected",e.ValueUpdated="value-updated",e.RemoveVarArg="remove-variadic-operand"}(fv||(fv={}));const bv=l.css`
|
|
5989
|
+
`,Vm={mode:"open",delegatesFocus:!0},Gm={},jm=/^\d$/;class Ym extends a.FoundationElement{}class Wm extends((0,a.FormAssociated)(Ym)){constructor(){super(),this.values=[],this.controlListeners=new Map,this.syncingFromDigits=!1,this.appearance="outline",this.digits=6,this.readOnly=!1,this.autofocus=!1,this.error=!1,this.proxy=document.createElement("input")}get digitsIndexes(){return Array.from({length:this.digits},(e,t)=>t)}get controlIdPrefix(){return this.id||"verification-code"}get labelId(){return`${this.controlIdPrefix}-label`}get hasLabel(){var e;return!!(null===(e=this.defaultSlottedNodes)||void 0===e?void 0:e.length)}getControlId(e){return`${this.controlIdPrefix}-${e}`}clear(){this.value="",this.emitChange(),this.$fastController.isConnected&&this.focusDigit(0)}focus(){this.focusDigit(0)}valueChanged(e,t){const i=this.sanitizeCode(t);this.syncingFromDigits||this.syncDigitsFromValue(i),String(null!=t?t:"")===i?super.valueChanged(e,i):this.value=i}validate(e){var t,i;if(!(this.proxy instanceof HTMLElement))return;const o=null!==(t=null!=e?e:this.getControlElement(0))&&void 0!==t?t:void 0;String(null!==(i=this.value)&&void 0!==i?i:"").length>0&&!this.isComplete()?this.setValidity({patternMismatch:!0},`Please enter a ${this.digits}-digit code.`,o):!this.required||this.isComplete()?this.setValidity({},"",o):this.setValidity({valueMissing:!0},"Please fill out this field.",o)}connectedCallback(){super.connectedCallback(),this.proxy.type="text",this.proxy.inputMode="numeric",l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners(),this.autofocus&&!this.readOnly&&this.focus()})}disconnectedCallback(){super.disconnectedCallback(),this.unbindControlListeners()}digitsChanged(){var e;this.syncDigitsFromValue(this.sanitizeCode(this.value));const t=(null!==(e=this.values)&&void 0!==e?e:[]).join("");this.value!==t?this.value=t:this.validate(),l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners()})}get digitClassnames(){return[this.error&&"error",(this.disabled||this.readOnly)&&"disabled"].filter(Boolean).join(" ")}sanitizeCode(e){const t=Math.max(1,Number(this.digits)||6);return String(null!=e?e:"").replace(/\D/g,"").slice(0,t)}bindControlListeners(){this.unbindControlListeners();this.rootNode.querySelectorAll("[data-digit-index] input.control").forEach(e=>{const t=this.getIndexFromInput(e);if(null===t)return;const i={paste:e=>this.onPaste(e,t),keydown:e=>this.onKeyDown(e,t),input:e=>this.onInput(e,t)};e.addEventListener("paste",i.paste,!0),e.addEventListener("keydown",i.keydown),e.addEventListener("input",i.input),this.controlListeners.set(e,i)})}unbindControlListeners(){var e,t;null===(e=this.controlListeners)||void 0===e||e.forEach((e,t)=>{t.removeEventListener("paste",e.paste,!0),t.removeEventListener("keydown",e.keydown),t.removeEventListener("input",e.input)}),null===(t=this.controlListeners)||void 0===t||t.clear()}onKeyDown(e,t){if(!this.readOnly&&!this.disabled){if(jm.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey)return e.preventDefault(),this.updateDigit(t,e.key),void this.focusDigit(t+1);switch(e.key){case"Backspace":e.preventDefault(),this.handleBackspace(t);break;case"Delete":e.preventDefault(),this.handleDelete(t);break;case"ArrowLeft":e.preventDefault(),this.focusDigit(t-1);break;case"ArrowRight":e.preventDefault(),this.focusDigit(t+1);break;case"Tab":case"Home":case"End":break;default:this.isBlockedCharacter(e)&&e.preventDefault()}}}isBlockedCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(1===e.key.length&&!jm.test(e.key))}onInput(e,t){if(this.readOnly||this.disabled)return;const i=e.target,o=i.value.replace(/\D/g,"");if(o.length>1)return void this.applyDigits(o,t);const n=o.slice(-1);i.value!==n&&(i.value=n),n&&this.values[t]!==n?(this.updateDigit(t,n),this.focusDigit(t+1)):!n&&this.values[t]&&this.updateDigit(t,"")}onPaste(e,t){var i,o;if(this.readOnly||this.disabled)return;e.preventDefault();const n=null!==(o=null===(i=e.clipboardData)||void 0===i?void 0:i.getData("text"))&&void 0!==o?o:"";n&&this.applyDigits(n,t)}handleBackspace(e){this.values[e]?this.updateDigit(e,""):e>0&&(this.updateDigit(e-1,""),this.focusDigit(e-1))}handleDelete(e){this.values[e]&&this.updateDigit(e,"")}getIndexFromInput(e){var t;const i=Number(null===(t=e.closest("[data-digit-index]"))||void 0===t?void 0:t.getAttribute("data-digit-index"));return Number.isNaN(i)?null:i}syncDigitsFromValue(e){var t,i;const o=Math.max(1,Number(this.digits)||6),n=Array.from({length:o},(t,i)=>{var o;return null!==(o=e[i])&&void 0!==o?o:""}),s=null!==(t=this.values)&&void 0!==t?t:[];n.length===s.length&&n.every((e,t)=>e===s[t])||(this.values=n,(null===(i=this.$fastController)||void 0===i?void 0:i.isConnected)&&this.syncFieldValues())}updateDigit(e,t){if(e<0||e>=this.digits)return;const i=[...this.values];i[e]=t,this.values=i,this.syncFieldValue(e),this.commitValues(i)}applyDigits(e,t){const i=e.replace(/\D/g,"").slice(0,this.digits-t);if(!i.length)return;const o=[...this.values];for(let e=0;e<i.length;e+=1)o[t+e]=i[e];this.values=o,this.syncFieldValues(),this.commitValues(o),this.focusDigit(this.isComplete()?this.digits-1:t+i.length)}commitValues(e){const t=e.join("");this.syncingFromDigits=!0;try{this.value!==t?this.value=t:this.validate()}finally{this.syncingFromDigits=!1}this.emitChange(),this.isComplete()&&this.$emit("complete",{value:this.value})}syncFieldValues(){for(let e=0;e<this.digits;e+=1)this.syncFieldValue(e)}syncFieldValue(e){var t;const i=this.getControlElement(e);i&&(i.value=null!==(t=this.values[e])&&void 0!==t?t:"")}focusDigit(e){var t;e<0||e>=this.digits||null===(t=this.getControlElement(e))||void 0===t||t.focus()}get rootNode(){var e;return null!==(e=this.shadowRoot)&&void 0!==e?e:this}getControlElement(e){return this.rootNode.querySelector(`[data-digit-index="${e}"] input.control`)}isComplete(){var e;const t=null!==(e=this.values)&&void 0!==e?e:[];return t.length===this.digits&&t.every(e=>jm.test(e))}emitChange(){this.$emit("change",{value:this.value})}}(0,C.Cg)([l.observable],Wm.prototype,"values",void 0),(0,C.Cg)([l.observable],Wm.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.attr],Wm.prototype,"id",void 0),(0,C.Cg)([l.attr],Wm.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Wm.prototype,"digits",void 0),(0,C.Cg)([(0,l.attr)({attribute:"readonly",mode:"boolean"})],Wm.prototype,"readOnly",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wm.prototype,"autofocus",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wm.prototype,"error",void 0);const qm=Wm.compose(Object.assign({baseName:"verification-code-input",template:Bm,styles:Um,shadowOptions:Vm},Gm)),Km={foundationAccordion:m,foundationAiCriteriaSearch:Oe,foundationAiIndicator:Ie,foundationAccordionItem:w,foundationActionsMenu:A,foundationAnchor:Me,foundationAnchoredRegion:Be,foundationAvatar:Ke,foundationBadge:tt,foundationBanner:dt,foundationBreadcrumb:gt,foundationBreadcrumbItem:Ct,foundationButton:Tt,foundationCalendar:Lt,foundationCard:Pt,foundationCategorizedMultiselect:qt,foundationCheckbox:ei,foundationCombobox:Oi,foundationConnectionIndicator:Ri,foundationDataGrid:_i,foundationDataGridCell:Bi,foundationDataGridRow:Wi,foundationDatePicker:Eo,foundationDesignSystemProvider:xn,foundationDialog:Ln,foundationDisclosure:Pn,foundationDivider:jn,foundationDropdownMenu:Qn,foundationErrorBanner:fs,foundationErrorBoundary:Rs,foundationErrorDialog:_s,foundationFileReader:Gs,foundationFileUpload:aa,foundationFilter:fa,foundationFilterBar:Oa,foundationFlexLayout:Fa,foundationFlipper:za,foundationFlyout:qa,foundationGridLayout:or,foundationGridLayoutItem:lr,foundationHorizontalScroll:mr,foundationIcon:Ir,foundationListbox:Mr,foundationListboxOption:Br,foundationMenu:qr,foundationMenuItem:el,foundationModal:al,foundationMultiselect:gl,foundationNumberField:Yl,foundationOptgroup:Xl,foundationPill:Hd,foundationPopper:Gd,foundationProgress:Cd,foundationProgressRing:Xd,foundationRadio:ic,foundationRadioGroup:lc,foundationScheduler:gc,foundationSchedulerCronBuilder:mu,foundationSchedulerTimezone:Cu,foundationSearchBar:Fu,foundationSearchBarCombobox:Uu,foundationSegmentedControl:nh,foundationSegmentedItem:ch,foundationSelect:vh,foundationSkeleton:xh,foundationSlider:Ih,foundationSliderLabel:Mh,foundationSnackbar:Yh,foundationStackingIcons:Xh,foundationStatusPill:tp,foundationEnvironmentIndicator:hs,foundationStepperTab:lp,foundationStepperTabPanel:pp,foundationSwitch:yp,foundationSystemHealthOverlay:Rd,foundationTab:Ip,foundationTabPanel:Mp,foundationTabs:Bp,foundationTextArea:qp,foundationTextField:im,foundationToast:dm,foundationToolbar:gm,foundationTooltip:Cm,foundationTreeItem:Tm,foundationTreeView:Lm,foundationUrlInput:zm,foundationVerificationCodeInput:qm,foundationSectionNavigator:Qu,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Xm extends l.CSSDirective{constructor(e){super(),this.tokenMap=e}createTokenPartial(e,t){return l.cssPartial`${e}: ${t}`}createTokensCSS(){const e=[];for(const[t,i]of Object.entries(this.tokenMap))e.push(this.createTokenPartial(t,i).createCSS());return e}createCSS(){return this.createTokensCSS().join(";")}}let Jm=class extends gi{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()})}getColumnDefs(e){return null==e?void 0:e.flatMap(e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name})}clearData(){ot.debug("clearData - Method not implemented.")}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values()),i=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=i,this.dataGrid.rowsData=t}handleStreamInserts(e){ot.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};Jm=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],Jm);const Qm=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],Zm=[...Qm,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],eg={type:"NULL",maxRules:1,invisible:!0},tg=["int","short","long","bigdecimal","double"],ig=["date","date-time"],og=["enum",...tg,"string",...ig,"boolean"],ng=[{type:"equal",nbInputs:1,applyTo:og,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:og,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...tg,...ig],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...tg,...ig],optgroup:"Comparison"},{type:"contains",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"starts_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"ends_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"one_of",nbInputs:"many",applyTo:[...og].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...og].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...tg,...ig],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...tg,...ig],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...og],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...og],optgroup:"Null"}];var sg=i(93678);const ag=i.n(sg)()();function rg(e,t,i){const o=function e(o){const n=ag(o);if(n.groupId===t)return n.children=i(n.children),n;const s=[];let a=!1;for(const t of n.children)if("children"in t){const i=e(t);i?(s.push(i),a=!0):s.push(t)}else s.push(t);return n.children=s,a?n:null}(e);if(!o)throw new Error(`Unable to find group with groupId ${t}`);return o}function lg(e,t,i){return function e(o){for(const n of o.children){if(i(n,t))return o;if("children"in n){const t=e(n);if(t)return t}}return null}(e)}function dg(e,t){const i=lg(e,t,(e,t)=>"children"in e&&e.groupId===t);if(!i)throw new Error(`No parent group found for group with ID ${t}`);return i}function cg(e,t){const i=lg(e,t,(e,t)=>"ruleId"in e&&e.ruleId===t);if(!i)throw new Error(`No parent group found for rule with ID ${t}`);return i}function ug(e,t,i){return rg(e,t,e=>[...e,i])}const hg="group-root";function pg(e,t){const i=(e,o)=>{return"children"in e?function(e,o){return Object.assign(Object.assign({},e),{level:o,config:t.getConfig(),groupId:t.getGroupId(),children:e.children.map(e=>i(e,o+1))})}(e,o):(n=e,Object.assign(Object.assign({},n),{ruleId:t.getRuleId(),config:t.getConfig()}));var n};return Object.assign(Object.assign({},e),{config:t.getConfig(),level:1,groupId:hg,children:e.children.map(e=>i(e,2))})}function mg(e){const t=e.children.map(e=>"children"in e?mg(e):function(e){const{operator:t,field:i,value:o}=e;return{operator:t,field:i,value:o}}(e));return{combinator:e.combinator,children:t}}const gg=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,vg=e=>`${gg(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,fg=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.input)&&void 0!==o?o:e.field.input},bg=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type},yg=e=>{const t={},i=[],o=e=>[...e].sort((e,t)=>"fieldId"in e&&"fieldId"in t?e.fieldId.localeCompare(t.fieldId):"type"in e&&"type"in t?e.type.localeCompare(t.type):0);e.forEach(e=>{if(e.optgroup){const i=e.optgroup;t[i]||(t[i]=[]),t[i].push(e)}else i.push(e)});const n=[];return Object.keys(t).sort().forEach(e=>{n.push({optgroup:e,xs:o(t[e])})}),[...n,...o(i)]};function wg(e,t,i){if(!e.shadowRoot||!(null==t?void 0:t.customStyles))return;const o=t.customStyles[i];if(o){const t=document.createElement("style");t.textContent=o,e.shadowRoot.firstChild?e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild):e.shadowRoot.appendChild(t)}}var Cg;!function(e){e.AddGroup="add-group",e.DelGroup="del-group",e.AddRule="add-rule",e.DelRule="del-rule",e.UpdateGroup="update-group",e.UpdateRule="update-rule",e.FieldSelected="field-selected",e.OperatorSelected="operator-selected",e.ValueUpdated="value-updated",e.RemoveVarArg="remove-variadic-operand"}(Cg||(Cg={}));const xg=l.css`
|
|
5990
5990
|
:host {
|
|
5991
5991
|
--item-vertical-spacing: 4px;
|
|
5992
5992
|
--item-border-radius: 5px;
|
|
@@ -6160,7 +6160,7 @@
|
|
|
6160
6160
|
.rules-list > *:last-child::after {
|
|
6161
6161
|
display: none;
|
|
6162
6162
|
}
|
|
6163
|
-
|
|
6163
|
+
`,$g=l.css`
|
|
6164
6164
|
.rules-group-container {
|
|
6165
6165
|
border: 1px solid #ccc;
|
|
6166
6166
|
margin-bottom: 10px;
|
|
@@ -6203,10 +6203,10 @@
|
|
|
6203
6203
|
list-style: none;
|
|
6204
6204
|
padding-left: 0;
|
|
6205
6205
|
}
|
|
6206
|
-
`;function
|
|
6206
|
+
`;function Sg(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),s=o(i);return(t,i)=>e(t,i)?n(t,i):s(t,i)}const Eg=l.html`
|
|
6207
6207
|
${e=>{var t,i;const o=null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.radio,{radioTag:n,radioGroupTag:s}=o?{radioTag:o.input,radioGroupTag:o.group}:{radioTag:"input",radioGroupTag:"div"};return l.html`
|
|
6208
6208
|
<div class="btn-group group-conditions">
|
|
6209
|
-
${
|
|
6209
|
+
${Sg(e=>"input"!==n,l.html`
|
|
6210
6210
|
<${s}
|
|
6211
6211
|
class="radio-group-container"
|
|
6212
6212
|
name="combinator"
|
|
@@ -6244,7 +6244,7 @@
|
|
|
6244
6244
|
`)}
|
|
6245
6245
|
</div>
|
|
6246
6246
|
`}}
|
|
6247
|
-
`,
|
|
6247
|
+
`,Og=l.html`
|
|
6248
6248
|
${e=>{var t,i,o,n,s,a,r,d;const c=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button",u=`Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${null===(s=null===(n=null===(o=e.config)||void 0===o?void 0:o.combinators)||void 0===n?void 0:n[0])||void 0===s?void 0:s.type})`,h=`Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${null===(d=null===(r=null===(a=e.config)||void 0===a?void 0:a.combinators)||void 0===r?void 0:r[0])||void 0===d?void 0:d.type})`;return l.html`
|
|
6249
6249
|
<div class="btn-group float-end group-actions">
|
|
6250
6250
|
${(0,l.when)(e=>e.allowAddRule,l.html`
|
|
@@ -6281,13 +6281,13 @@
|
|
|
6281
6281
|
`)}
|
|
6282
6282
|
</div>
|
|
6283
6283
|
`}}
|
|
6284
|
-
|
|
6284
|
+
`,Tg=l.html`
|
|
6285
6285
|
<div class="rules-group-container">
|
|
6286
|
-
<div class="rules-group-header">${
|
|
6286
|
+
<div class="rules-group-header">${Og} ${Eg}</div>
|
|
6287
6287
|
<div class="rules-group-body">
|
|
6288
6288
|
<div class="rules-list">
|
|
6289
6289
|
${(0,l.repeat)(e=>{var t,i;return null!==(i=null===(t=e.model)||void 0===t?void 0:t.children)&&void 0!==i?i:[]},l.html`
|
|
6290
|
-
${
|
|
6290
|
+
${Sg(e=>"children"in e,l.html`
|
|
6291
6291
|
<expression-group
|
|
6292
6292
|
:config=${(e,t)=>t.parent.config}
|
|
6293
6293
|
:styles=${(e,t)=>t.parent.styles}
|
|
@@ -6311,7 +6311,7 @@
|
|
|
6311
6311
|
</div>
|
|
6312
6312
|
</div>
|
|
6313
6313
|
</div>
|
|
6314
|
-
`;let
|
|
6314
|
+
`;let kg=class extends l.FASTElement{connectedCallback(){super.connectedCallback(),wg(this,this.styles,"group")}get allowAddRule(){return!!this.model&&("many"===this.model.combinator.maxRules||this.model.children.length<this.model.combinator.maxRules)}get allowAddGroup(){var e,t;return!!this.model&&(1!==this.model.combinator.maxRules&&(!(2===this.model.combinator.maxRules&&this.model.children.length>=2)&&(!(null===(e=this.config)||void 0===e?void 0:e.maxNesting)||(null===(t=this.config)||void 0===t?void 0:t.maxNesting)<1||this.config.maxNesting>this.model.level)))}dispatchAddRule(e){if(e.stopPropagation(),!this.allowAddRule)throw new Error("Cannot add extra rules to group");const t={parentGroupId:this.model.groupId};this.dispatchEvent(new CustomEvent(Cg.AddRule,{detail:t,bubbles:!0,composed:!0}))}dispatchAddGroup(e){if(e.stopPropagation(),!this.allowAddGroup)throw new Error("Cannot add further nested groups");const t={parentGroupId:this.model.groupId,newGroup:{level:this.model.level+1}};this.dispatchEvent(new CustomEvent(Cg.AddGroup,{detail:t,bubbles:!0,composed:!0}))}dispatchDeleteGroup(e){e.stopPropagation();const t={groupId:this.model.groupId};this.dispatchEvent(new CustomEvent(Cg.DelGroup,{detail:t,bubbles:!0,composed:!0}))}handleCombinatorChange(e){e.stopPropagation();const t=e.target.value;this.updateCombinator(t)}handleCustomCombinatorChange(e){var t;if(e.stopPropagation(),!(null===(t=this.model)||void 0===t?void 0:t.groupId)||!e.target)return;const i=e.target.getAttribute("value");if(!i)throw new Error("No value found in the custom radio group event target");this.updateCombinator(i)}updateCombinator(e){var t,i;const o=this.config.combinators.find(({type:t})=>t===e);if(!o)throw new Error(`Cannot find selected combinator ${e}`);(null===(i=null===(t=this.model)||void 0===t?void 0:t.combinator)||void 0===i?void 0:i.type)!==o.type&&this.dispatchGroupDataUpdated(o)}dispatchGroupDataUpdated(e){const t={groupId:this.model.groupId,newData:{combinator:e}};this.dispatchEvent(new CustomEvent(Cg.UpdateGroup,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],kg.prototype,"config",void 0),(0,C.Cg)([l.observable],kg.prototype,"styles",void 0),(0,C.Cg)([l.observable],kg.prototype,"model",void 0),(0,C.Cg)([l.observable],kg.prototype,"index",void 0),(0,C.Cg)([l.volatile],kg.prototype,"allowAddRule",null),(0,C.Cg)([l.volatile],kg.prototype,"allowAddGroup",null),kg=(0,C.Cg)([(0,l.customElement)({name:"expression-group",template:Tg,styles:$g,shadowOptions:{delegatesFocus:!0}})],kg);const Dg=l.html`
|
|
6315
6315
|
<div class="query-builder">
|
|
6316
6316
|
${(0,l.when)(e=>null!==e.model,l.html`
|
|
6317
6317
|
<expression-group
|
|
@@ -6321,7 +6321,7 @@
|
|
|
6321
6321
|
></expression-group>
|
|
6322
6322
|
`)}
|
|
6323
6323
|
</div>
|
|
6324
|
-
`,
|
|
6324
|
+
`,Ig=l.html`
|
|
6325
6325
|
${e=>{var t,i,o,n,s,a;const r=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",d=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option",c=(null===(a=null===(s=e.styles)||void 0===s?void 0:s.customElements)||void 0===a?void 0:a.optgroup)||"optgroup";return l.html`
|
|
6326
6326
|
<${r}
|
|
6327
6327
|
class="form-select"
|
|
@@ -6352,7 +6352,7 @@
|
|
|
6352
6352
|
`)}
|
|
6353
6353
|
</${r}>
|
|
6354
6354
|
`}}
|
|
6355
|
-
`;let
|
|
6355
|
+
`;let Rg=class extends l.FASTElement{constructor(){super(...arguments),this.fields=[]}connectedCallback(){super.connectedCallback(),wg(this,this.styles,"field")}get groupedFieldss(){return yg(this.fields)}dispatchFieldsChanged(e){e.stopPropagation();const t={fieldId:e.target.value};this.dispatchEvent(new CustomEvent(Cg.FieldSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Rg.prototype,"fields",void 0),(0,C.Cg)([l.observable],Rg.prototype,"field",void 0),(0,C.Cg)([l.observable],Rg.prototype,"config",void 0),(0,C.Cg)([l.observable],Rg.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Rg.prototype,"groupedFieldss",null),Rg=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-field",template:Ig})],Rg);const Ag=l.html`
|
|
6356
6356
|
${e=>{var t,i,o,n,s,a;const r=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",d=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option",c=(null===(a=null===(s=e.styles)||void 0===s?void 0:s.customElements)||void 0===a?void 0:a.optgroup)||"optgroup";return l.html`
|
|
6357
6357
|
<${r}
|
|
6358
6358
|
class="form-select"
|
|
@@ -6385,7 +6385,7 @@
|
|
|
6385
6385
|
`)}
|
|
6386
6386
|
</${r}>
|
|
6387
6387
|
`}}
|
|
6388
|
-
`;let
|
|
6388
|
+
`;let Lg=class extends l.FASTElement{constructor(){super(...arguments),this.operators=[],this.field=null}connectedCallback(){super.connectedCallback(),wg(this,this.styles,"operator")}get allowedOperators(){const e=e=>{var t,i,o;return null===(o=null===(i=null===(t=this.field)||void 0===t?void 0:t.operators)||void 0===i?void 0:i.includes(e.type))||void 0===o||o},t=e=>{var t,i,o,n;return null===(n=null===(i=null===(t=null==e?void 0:e.applyTo)||void 0===t?void 0:t.includes)||void 0===i?void 0:i.call(t,null===(o=this.field)||void 0===o?void 0:o.type))||void 0===n||n};return this.operators.filter(i=>e(i)&&t(i))}get groupedOperators(){return yg(this.allowedOperators)}handleOperatorChange(e){e.stopPropagation();const t={operatorId:e.target.value};this.dispatchEvent(new CustomEvent(Cg.OperatorSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Lg.prototype,"operators",void 0),(0,C.Cg)([l.observable],Lg.prototype,"operator",void 0),(0,C.Cg)([l.observable],Lg.prototype,"field",void 0),(0,C.Cg)([l.observable],Lg.prototype,"config",void 0),(0,C.Cg)([l.observable],Lg.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Lg.prototype,"allowedOperators",null),(0,C.Cg)([l.volatile],Lg.prototype,"groupedOperators",null),Lg=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-operator",template:Ag})],Lg);const Fg=e=>["short","int","long"].includes(e),Ng=e=>["double","bigdecimal"].includes(e),Mg=(e,t)=>{var i,o;return null===(o=null===(i=(e=>Fg(e)?/^[+-]?[0-9]+$/:Ng(e)?/[+-]?([0-9]*[.])?[0-9]+/:null)(e))||void 0===i?void 0:i.test(t))||void 0===o||o?null:"Invalid number format"},_g=l.css`
|
|
6389
6389
|
.text-input.error {
|
|
6390
6390
|
color: red;
|
|
6391
6391
|
}
|
|
@@ -6394,8 +6394,8 @@
|
|
|
6394
6394
|
display: inline-grid;
|
|
6395
6395
|
align-items: center;
|
|
6396
6396
|
}
|
|
6397
|
-
`,
|
|
6398
|
-
${e=>{var t,i;const o=
|
|
6397
|
+
`,Hg=l.html`
|
|
6398
|
+
${e=>{var t,i;const o=fg(e),n="datetime-local"===o?"datetimeLocal":o,s=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i[n])||"input";return l.html`
|
|
6399
6399
|
<${s}
|
|
6400
6400
|
type="${o}"
|
|
6401
6401
|
class="text-input ${e=>(0,x.x)(["error",e.validationError])}"
|
|
@@ -6403,7 +6403,7 @@
|
|
|
6403
6403
|
@blur=${(e,t)=>e.handleInputChange(t.event)}
|
|
6404
6404
|
/>
|
|
6405
6405
|
`}}
|
|
6406
|
-
`,
|
|
6406
|
+
`,Pg=l.html`
|
|
6407
6407
|
${e=>{var t,i,o,n;const s=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",a=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option";return l.html`
|
|
6408
6408
|
<${s}
|
|
6409
6409
|
class="form-select"
|
|
@@ -6421,7 +6421,7 @@
|
|
|
6421
6421
|
`)}
|
|
6422
6422
|
</${s}>
|
|
6423
6423
|
`}}
|
|
6424
|
-
`,
|
|
6424
|
+
`,zg=l.html`
|
|
6425
6425
|
${e=>{var t,i;const o=null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.checkbox,n=o||"input";return l.html`
|
|
6426
6426
|
<label>
|
|
6427
6427
|
<${n}
|
|
@@ -6433,15 +6433,15 @@
|
|
|
6433
6433
|
True
|
|
6434
6434
|
</label>
|
|
6435
6435
|
`}}
|
|
6436
|
-
`,
|
|
6437
|
-
<div>Input type "${e=>
|
|
6438
|
-
`,
|
|
6439
|
-
${e=>{const t=
|
|
6436
|
+
`,Ug=l.html`
|
|
6437
|
+
<div>Input type "${e=>fg(e)}" not yet supported.</div>
|
|
6438
|
+
`,Bg=l.html`
|
|
6439
|
+
${e=>{const t=fg(e);return l.html`
|
|
6440
6440
|
<div class="value-and-validation">
|
|
6441
|
-
${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),
|
|
6442
|
-
${(0,l.when)(()=>"select"===t,
|
|
6443
|
-
${(0,l.when)(()=>"checkbox"===t,
|
|
6444
|
-
${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),
|
|
6441
|
+
${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),Hg)}
|
|
6442
|
+
${(0,l.when)(()=>"select"===t,Pg)}
|
|
6443
|
+
${(0,l.when)(()=>"checkbox"===t,zg)}
|
|
6444
|
+
${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),Ug)}
|
|
6445
6445
|
${(0,l.when)(e=>e.validationMsg,l.html`
|
|
6446
6446
|
<p class="validation-msg">${e=>e.validationMsg}</p>
|
|
6447
6447
|
`)}
|
|
@@ -6458,11 +6458,11 @@
|
|
|
6458
6458
|
`}}
|
|
6459
6459
|
`)}
|
|
6460
6460
|
`}}
|
|
6461
|
-
`,
|
|
6462
|
-
${
|
|
6461
|
+
`,Vg=l.html`
|
|
6462
|
+
${Sg(e=>e.field,Bg,l.html`
|
|
6463
6463
|
<div>Select a field to set value</div>
|
|
6464
6464
|
`)}
|
|
6465
|
-
`;let
|
|
6465
|
+
`;let Gg=class extends l.FASTElement{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),wg(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,Mg(bg(this),e)].filter(e=>!!e).join(", ")||null}handleInputChange(e){e.stopPropagation();const t=e.target;if("checkbox"!==t.type&&"select-one"!==t.type){const e=this.validateInput(t.value);if(e)return this.validationError=!0,void(this.validationMsg=e);this.validationError=!1,this.validationMsg=null}let i;i="checkbox"===t.getAttribute("role")?t.checked:"select-one"===t.type?e.target.value:this.field&&Fg(bg(this))?parseInt(t.value):this.field&&Ng(bg(this))?parseFloat(t.value):t.value,this.value=i;const o={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(Cg.ValueUpdated,{detail:o,bubbles:!0,composed:!0}))}handleRemoveVariadicOperand(){if(!this.variadic)throw new Error("Cannot remove inputs for non-variadic operator");const e={index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(Cg.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};(0,C.Cg)([(0,l.attr)({attribute:"value-index"})],Gg.prototype,"valueIndex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gg.prototype,"variadic",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"validation-error"})],Gg.prototype,"validationError",void 0),(0,C.Cg)([(0,l.attr)({attribute:"validation-msg"})],Gg.prototype,"validationMsg",void 0),(0,C.Cg)([l.observable],Gg.prototype,"field",void 0),(0,C.Cg)([l.observable],Gg.prototype,"operator",void 0),(0,C.Cg)([l.observable],Gg.prototype,"value",void 0),(0,C.Cg)([l.observable],Gg.prototype,"config",void 0),(0,C.Cg)([l.observable],Gg.prototype,"styles",void 0),Gg=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-value",template:Vg,styles:_g,shadowOptions:{delegatesFocus:!0}})],Gg);const jg=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:Yg(e,t),Yg=(e,t)=>{var i,o;switch(bg(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return gg(new Date);case"date-time":return vg(new Date);case"double":case"int":case"bigdecimal":case"short":case"long":return 0;case"enum":{const n="enum"===(null===(i=null==e?void 0:e.valueType)||void 0===i?void 0:i.type)?null===(o=null==e?void 0:e.valueType)||void 0===o?void 0:o.values:"enum"===t.field.type?t.field.values:{};if(0===Object.keys(n).length)throw new Error("Enums require configured values");return Object.keys(n)[0]}}},Wg=(e,t)=>{var i,o,n,s;const a=(r=e,l=t,e=>{var t,i,o;if((null===(t=null==r?void 0:r.valueType)||void 0===t?void 0:t.type)!==(null===(o=null===(i=l.operator)||void 0===i?void 0:i.valueType)||void 0===o?void 0:o.type))return null;if(!("value"in l)||!l.value||!l.operator)return null;const n=1===l.operator.nbInputs?[l.value]:l.value;return e>=n.length?null:n[e]});var r,l;switch(e.nbInputs){case 0:return{field:t.field,operator:e,value:void 0};case 1:return{field:t.field,operator:e,value:null!==(i=a(0))&&void 0!==i?i:jg(e,t)};case 2:return{field:t.field,operator:e,value:[null!==(o=a(0))&&void 0!==o?o:jg(e,t),null!==(n=a(1))&&void 0!==n?n:jg(e,t)]};case"many":return{field:t.field,operator:e,value:[null!==(s=a(0))&&void 0!==s?s:jg(e,t)]}}},qg=(e,t,i)=>{switch(e.operator.nbInputs){case 0:throw new 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 new Error("Invalid value shape for rule");return{field:e.field,operator:e.operator,value:e.value.map((e,o)=>o===i?t:e)}}},Kg=e=>!e&&0!==e,Xg=l.css`
|
|
6466
6466
|
.rule-container {
|
|
6467
6467
|
border: 1px solid #eee;
|
|
6468
6468
|
margin-bottom: 5px;
|
|
@@ -6521,7 +6521,7 @@
|
|
|
6521
6521
|
expression-rule-value {
|
|
6522
6522
|
display: flex;
|
|
6523
6523
|
}
|
|
6524
|
-
`,
|
|
6524
|
+
`,Jg=l.html`
|
|
6525
6525
|
${e=>{var t,i;const o=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button";return l.html`
|
|
6526
6526
|
<div class="rule-container ${e=>(0,x.x)(["error",e.error])}">
|
|
6527
6527
|
<div class="rule-content">
|
|
@@ -6581,11 +6581,11 @@ class="margin"
|
|
|
6581
6581
|
</div>
|
|
6582
6582
|
</div>
|
|
6583
6583
|
`}}
|
|
6584
|
-
`;let qv=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),gv(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==mv(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(jv)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,Uv(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(fv.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent(fv.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(fv.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,o=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,n={ruleId:this.model.ruleId,newData:{field:o,value:null,operator:null}};this.dispatchEvent(new CustomEvent(fv.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:Gv(this.model,t,i)};this.dispatchEvent(new CustomEvent(fv.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const o=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!o)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent(fv.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Vv(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],qv.prototype,"config",void 0),(0,C.Cg)([l.observable],qv.prototype,"styles",void 0),(0,C.Cg)([l.observable],qv.prototype,"model",void 0),(0,C.Cg)([l.observable],qv.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],qv.prototype,"error",void 0),(0,C.Cg)([l.volatile],qv.prototype,"operandIterator",null),qv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Wv,styles:Yv,shadowOptions:{delegatesFocus:!0}})],qv);let Kv=class extends l.FASTElement{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){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=dv(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=cv(t);this.dispatchChangeEvent(i)}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(fv.AddGroup,this.handleAddGroup),this.addEventListener(fv.DelGroup,this.handleDeleteGroup),this.addEventListener(fv.AddRule,this.handleAddRule),this.addEventListener(fv.DelRule,this.handleDeleteRule),this.addEventListener(fv.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(fv.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(fv.AddGroup,this.handleAddGroup),this.removeEventListener(fv.DelGroup,this.handleDeleteGroup),this.removeEventListener(fv.AddRule,this.handleAddRule),this.removeEventListener(fv.DelRule,this.handleDeleteRule),this.removeEventListener(fv.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(fv.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,o;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(o=e.fields)||void 0===o?void 0:o.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:lv,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,o={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=rv(this.model,t,o)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=rv(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=ov(i=this.model,sv(i,o=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==o))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,o;this.model=ov(i=this.model,av(i,o=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==o))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===lv?Object.assign(Object.assign({},e),i):ov(e,sv(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return ov(e,av(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};(0,C.Cg)([l.observable],Kv.prototype,"config",void 0),(0,C.Cg)([l.observable],Kv.prototype,"styles",void 0),(0,C.Cg)([l.observable],Kv.prototype,"model",void 0),Kv=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Ev,styles:bv})],Kv);let Xv=class extends Kv{};Xv=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:bv,template:Ev})],Xv);const Jv=["int","short","long"],Qv=["double","bigdecimal"],Zv=[...Jv,...Qv],eg=["date","date-time"],tg=["string","enum"],ig=["boolean"],og=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type};function ng(e){switch(og(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 sg(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function ag(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function rg(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function lg(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=og(e);if(tg.includes(i))return t;if(Zv.includes(i))return t.toString();if(ig.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(eg.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function dg(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?dg(e,t):t(e)).filter(Boolean)}}function cg(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=og(e);if(tg.includes(i))return t;if(Jv.includes(i))return parseInt(t);if(Qv.includes(i))return parseFloat(t);if(ig.includes(i))return t;if(eg.includes(i)){const e=new Date(parseInt(t));return"date"===i?uv(e):hv(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const ug={template:Ev,styles:bv};var hg;!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"})}(hg||(hg={}));const pg=[{type:hg.logicalOperations.AND,maxRules:"many"},{type:hg.logicalOperations.OR,maxRules:"many"}],mg={EQUALS:hg.operations.EQUALS,NOT_EQUALS:hg.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:hg.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:hg.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:hg.operations.LESS_THAN,LESS_THAN_OR_EQUAL:hg.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:hg.operations.IS_CURRENT,IS_PREVIOUS:hg.operations.IS_PREVIOUS},vg=e=>({type:"enum",input:"select",values:e}),gg=vg({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."}}),fg=vg({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."}}),bg=[{type:mg.EQUALS,label:"Equals",nbInputs:1,applyTo:[...tg,...ig,...Zv,...eg],tooltip:"Check the equality of the field compared to a set value"},{type:mg.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...tg,...ig,...Zv,...eg],tooltip:"Check that the field is different from a set value"},{type:mg.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...ig,...Zv,...eg],tooltip:"Check if the field value is null"},{type:mg.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...ig,...Zv,...eg],tooltip:"Check if the field value is not null"},{type:mg.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:mg.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:mg.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:mg.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:mg.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:mg.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...Zv],tooltip:"Check if the field value is greater than a specified number"},{type:mg.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...Zv],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:mg.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...Zv],tooltip:"Check if the field value is less than a specified number"},{type:mg.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...Zv],tooltip:"Check if the field value is less than or equal to a specified number"},{type:mg.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is before a specified date/time"},{type:mg.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is after a specified date/time"},{type:mg.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is on or before a specified date/time"},{type:mg.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is on or after a specified date/time"},{type:mg.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...eg],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:fg,optgroup:"Relative Period"},{type:mg.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...eg],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:gg,optgroup:"Relative Period"}];function yg(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 wg(e,t){switch(t){case mg.IS_NULL_OR_BLANK:return rg(e,hg.methodCall.IS_NULL_OR_BLANK,[]);case mg.NOT_NULL_OR_BLANK:return rg(e,hg.methodCall.NOT_NULL_OR_BLANK,[]);case mg.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return rg(e,hg.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case mg.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return rg(e,hg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case mg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return rg(e,hg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case mg.IS_CURRENT:case mg.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return rg(e,hg.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===mg.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function Cg(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=lg(e),n=ng(o),s=yg(o.operator.type);switch(s){case mg.EQUALS:case mg.NOT_EQUALS:case mg.GREATER_THAN:case mg.GREATER_THAN_OR_EQUAL:case mg.LESS_THAN:case mg.LESS_THAN_OR_EQUAL:return sg(o,s,n);case mg.IS_NULL:return ag(o,hg.operations.EQUALS,{TYPE:"NULL"});case mg.NOT_NULL:return ag(o,hg.operations.NOT_EQUALS,{TYPE:"NULL"});case mg.IS_NULL_OR_BLANK:case mg.NOT_NULL_OR_BLANK:case mg.CONTAINS:case mg.CONTAINS_WORDS_STARTING_WITH:case mg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case mg.IS_CURRENT:case mg.IS_PREVIOUS:return wg(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function xg(e,t){if(!("date"===t.field.type||"date-time"===t.field.type))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 $g(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?mg[mg.IS_NULL]:mg[mg.NOT_NULL];return bg.find(t=>t.type===e)}const i=xg(t.OPERATION,e);return bg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function Sg(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return cg($g({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Eg(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[mg[mg.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[mg[mg.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[mg[mg.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[mg[mg.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[mg[mg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===hg.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[mg["CURRENT"===t.PARAMETERS[2].VALUE?mg.IS_CURRENT:mg.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:bg.find(e=>e.type===i),value:o}}function Og(e,t){return{combinator:pg.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Og(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Sg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Eg(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Tg=class extends Kv{ruleConfigChanged(e,t){this.config=Object.assign({combinators:pg,operators:bg,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Og(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new 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){const t=dg(e,Cg);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Tg.prototype,"ruleConfig",void 0),Tg=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:bv,template:Ev})],Tg);const kg={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Dg=[{type:kg.PLUS,label:"Add (+)",applyTo:[...Zv],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:kg.MINUS,label:"Subtract (-)",applyTo:[...Zv],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:kg.MULTIPLY,label:"Multiply (*)",applyTo:[...Zv],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:kg.DIVIDE,label:"Divide (/)",applyTo:[...Zv],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:kg.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:kg.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 Ig(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=lg(e),n=ng(o),s=o.operator.type;switch(s){case kg.TRIM:case kg.CONVERT_TO_DATE:case kg.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case kg.TRIM:return rg(e,hg.methodCall.TRIM,[]);case kg.CONVERT_TO_DATE:return rg(e,hg.methodCall.LONG_TO_DATE,[]);case kg.CONVERT_TO_DATE_TIME:return rg(e,hg.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case kg.PLUS:case kg.MINUS:case kg.DIVIDE:case kg.MULTIPLY:return sg(o,s,n);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Rg(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return cg(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Dg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Ag(e,t){return{combinator:Xm,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Ag(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Rg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[kg[kg.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[kg[kg.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[kg[kg.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:Dg.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Lg=class extends Kv{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Ag(t.fields,i);this.config={combinators:[Xm],operators:Dg,fields:t.fields,model:o,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new 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 new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:Ig(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Lg.prototype,"valueConfig",void 0),Lg=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:bv,template:Ev})],Lg);const Fg=l.html`
|
|
6584
|
+
`;let Qg=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),wg(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==bg(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(Kg)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,jg(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(Cg.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent(Cg.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(Cg.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,o=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,n={ruleId:this.model.ruleId,newData:{field:o,value:null,operator:null}};this.dispatchEvent(new CustomEvent(Cg.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:qg(this.model,t,i)};this.dispatchEvent(new CustomEvent(Cg.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const o=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!o)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent(Cg.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Wg(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Qg.prototype,"config",void 0),(0,C.Cg)([l.observable],Qg.prototype,"styles",void 0),(0,C.Cg)([l.observable],Qg.prototype,"model",void 0),(0,C.Cg)([l.observable],Qg.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Qg.prototype,"error",void 0),(0,C.Cg)([l.volatile],Qg.prototype,"operandIterator",null),Qg=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Jg,styles:Xg,shadowOptions:{delegatesFocus:!0}})],Qg);let Zg=class extends l.FASTElement{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){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=pg(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=mg(t);this.dispatchChangeEvent(i)}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(Cg.AddGroup,this.handleAddGroup),this.addEventListener(Cg.DelGroup,this.handleDeleteGroup),this.addEventListener(Cg.AddRule,this.handleAddRule),this.addEventListener(Cg.DelRule,this.handleDeleteRule),this.addEventListener(Cg.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(Cg.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Cg.AddGroup,this.handleAddGroup),this.removeEventListener(Cg.DelGroup,this.handleDeleteGroup),this.removeEventListener(Cg.AddRule,this.handleAddRule),this.removeEventListener(Cg.DelRule,this.handleDeleteRule),this.removeEventListener(Cg.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(Cg.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,o;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(o=e.fields)||void 0===o?void 0:o.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:hg,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,o={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=ug(this.model,t,o)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=ug(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=rg(i=this.model,dg(i,o=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==o))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,o;this.model=rg(i=this.model,cg(i,o=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==o))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===hg?Object.assign(Object.assign({},e),i):rg(e,dg(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return rg(e,cg(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};(0,C.Cg)([l.observable],Zg.prototype,"config",void 0),(0,C.Cg)([l.observable],Zg.prototype,"styles",void 0),(0,C.Cg)([l.observable],Zg.prototype,"model",void 0),Zg=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Dg,styles:xg})],Zg);let ev=class extends Zg{};ev=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:xg,template:Dg})],ev);const tv=["int","short","long"],iv=["double","bigdecimal"],ov=[...tv,...iv],nv=["date","date-time"],sv=["string","enum"],av=["boolean"],rv=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type};function lv(e){switch(rv(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 dv(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function cv(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function uv(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function hv(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=rv(e);if(sv.includes(i))return t;if(ov.includes(i))return t.toString();if(av.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(nv.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function pv(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?pv(e,t):t(e)).filter(Boolean)}}function mv(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=rv(e);if(sv.includes(i))return t;if(tv.includes(i))return parseInt(t);if(iv.includes(i))return parseFloat(t);if(av.includes(i))return t;if(nv.includes(i)){const e=new Date(parseInt(t));return"date"===i?gg(e):vg(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const gv={template:Dg,styles:xg};var vv;!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"})}(vv||(vv={}));const fv=[{type:vv.logicalOperations.AND,maxRules:"many"},{type:vv.logicalOperations.OR,maxRules:"many"}],bv={EQUALS:vv.operations.EQUALS,NOT_EQUALS:vv.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:vv.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:vv.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:vv.operations.LESS_THAN,LESS_THAN_OR_EQUAL:vv.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:vv.operations.IS_CURRENT,IS_PREVIOUS:vv.operations.IS_PREVIOUS},yv=e=>({type:"enum",input:"select",values:e}),wv=yv({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."}}),Cv=yv({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."}}),xv=[{type:bv.EQUALS,label:"Equals",nbInputs:1,applyTo:[...sv,...av,...ov,...nv],tooltip:"Check the equality of the field compared to a set value"},{type:bv.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...sv,...av,...ov,...nv],tooltip:"Check that the field is different from a set value"},{type:bv.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...av,...ov,...nv],tooltip:"Check if the field value is null"},{type:bv.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...av,...ov,...nv],tooltip:"Check if the field value is not null"},{type:bv.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:bv.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:bv.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:bv.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:bv.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:bv.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...ov],tooltip:"Check if the field value is greater than a specified number"},{type:bv.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...ov],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:bv.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...ov],tooltip:"Check if the field value is less than a specified number"},{type:bv.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...ov],tooltip:"Check if the field value is less than or equal to a specified number"},{type:bv.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...nv],tooltip:"Check if the field is before a specified date/time"},{type:bv.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...nv],tooltip:"Check if the field is after a specified date/time"},{type:bv.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...nv],tooltip:"Check if the field is on or before a specified date/time"},{type:bv.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...nv],tooltip:"Check if the field is on or after a specified date/time"},{type:bv.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...nv],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:Cv,optgroup:"Relative Period"},{type:bv.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...nv],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:wv,optgroup:"Relative Period"}];function $v(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 Sv(e,t){switch(t){case bv.IS_NULL_OR_BLANK:return uv(e,vv.methodCall.IS_NULL_OR_BLANK,[]);case bv.NOT_NULL_OR_BLANK:return uv(e,vv.methodCall.NOT_NULL_OR_BLANK,[]);case bv.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return uv(e,vv.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case bv.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return uv(e,vv.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case bv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return uv(e,vv.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case bv.IS_CURRENT:case bv.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return uv(e,vv.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===bv.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function Ev(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=hv(e),n=lv(o),s=$v(o.operator.type);switch(s){case bv.EQUALS:case bv.NOT_EQUALS:case bv.GREATER_THAN:case bv.GREATER_THAN_OR_EQUAL:case bv.LESS_THAN:case bv.LESS_THAN_OR_EQUAL:return dv(o,s,n);case bv.IS_NULL:return cv(o,vv.operations.EQUALS,{TYPE:"NULL"});case bv.NOT_NULL:return cv(o,vv.operations.NOT_EQUALS,{TYPE:"NULL"});case bv.IS_NULL_OR_BLANK:case bv.NOT_NULL_OR_BLANK:case bv.CONTAINS:case bv.CONTAINS_WORDS_STARTING_WITH:case bv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case bv.IS_CURRENT:case bv.IS_PREVIOUS:return Sv(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Ov(e,t){if(!("date"===t.field.type||"date-time"===t.field.type))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 Tv(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?bv[bv.IS_NULL]:bv[bv.NOT_NULL];return xv.find(t=>t.type===e)}const i=Ov(t.OPERATION,e);return xv.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function kv(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return mv(Tv({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Dv(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[bv[bv.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[bv[bv.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[bv[bv.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[bv[bv.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[bv[bv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===vv.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[bv["CURRENT"===t.PARAMETERS[2].VALUE?bv.IS_CURRENT:bv.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:xv.find(e=>e.type===i),value:o}}function Iv(e,t){return{combinator:fv.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Iv(e,t);if("BINARY_EXPRESSION"===t.TYPE)return kv(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Dv(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Rv=class extends Zg{ruleConfigChanged(e,t){this.config=Object.assign({combinators:fv,operators:xv,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Iv(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new 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){const t=pv(e,Ev);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Rv.prototype,"ruleConfig",void 0),Rv=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:xg,template:Dg})],Rv);const Av={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Lv=[{type:Av.PLUS,label:"Add (+)",applyTo:[...ov],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Av.MINUS,label:"Subtract (-)",applyTo:[...ov],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Av.MULTIPLY,label:"Multiply (*)",applyTo:[...ov],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Av.DIVIDE,label:"Divide (/)",applyTo:[...ov],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Av.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:Av.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 Fv(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=hv(e),n=lv(o),s=o.operator.type;switch(s){case Av.TRIM:case Av.CONVERT_TO_DATE:case Av.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Av.TRIM:return uv(e,vv.methodCall.TRIM,[]);case Av.CONVERT_TO_DATE:return uv(e,vv.methodCall.LONG_TO_DATE,[]);case Av.CONVERT_TO_DATE_TIME:return uv(e,vv.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case Av.PLUS:case Av.MINUS:case Av.DIVIDE:case Av.MULTIPLY:return dv(o,s,n);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Nv(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return mv(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Lv.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Mv(e,t){return{combinator:eg,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Mv(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Nv(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Av[Av.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Av[Av.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Av[Av.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:Lv.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let _v=class extends Zg{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Mv(t.fields,i);this.config={combinators:[eg],operators:Lv,fields:t.fields,model:o,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new 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 new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:Fv(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],_v.prototype,"valueConfig",void 0),_v=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:xg,template:Dg})],_v);const Hv=l.html`
|
|
6585
6585
|
<template ${(0,l.ref)("notificationListener")}>
|
|
6586
6586
|
<slot></slot>
|
|
6587
6587
|
</template>
|
|
6588
|
-
`,Ng={mode:"open",delegatesFocus:!0};class Mg extends a.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(pe.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),Ce(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>(0,C.sH)(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return(0,C.sH)(this,void 0,void 0,function*(){var e;this.resourceName&&(null===(e=this.dataSub)||void 0===e||e.unsubscribe(),this.dataSub=void 0,yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,di.d)(e))}):ot.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:o}=e,n=e.CREATED_AT?new Date(e.CREATED_AT):void 0,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let a=[];this.toastButtons&&this.toastButtons.length>0&&(a=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const r={title:t,body:i,createdAt:n,toast:{details:e,type:null==o?void 0:o.toLowerCase(),buttons:a,autoClose:void 0!==s?!!s:!!this.closeTimeout,closeTimeout:null!=s?s:this.closeTimeout,position:this.toastPosition}};hc(r,this.tagName)}}(0,C.Cg)([l.observable],Mg.prototype,"notificationListener",void 0),(0,C.Cg)([ui.dm],Mg.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Mg.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Mg.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Mg.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Mg.prototype,"toastPosition",void 0),(0,C.Cg)([hi.yW],Mg.prototype,"datasource",void 0);const _g=Mg.compose({baseName:"notification-listener",template:Fg,shadowOptions:Ng}),Hg=(e,t)=>i=>{const o="function"==typeof t?t:(n=t,e=>Object.assign(Object.assign({},n),e));var n;return l.FASTElement.define(class extends e{},o(i))};function Pg(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=l.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}var zg;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(zg||(zg={}));class Ug{trackEvent(e,t){js.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const Bg=a.DI.createInterface(e=>e.singleton(Ug));var Vg=i(98647),Gg=i(35044);const jg=(0,it.createLogger)("foundation-router");var Yg=i(36132),Wg=i(80751),qg=i(3479);const Kg="$router",Xg=Object.freeze({getOrCreateFor:e=>{const t=e[Kg];return void 0!==t?t:e[Kg]=new Jg(e)},find:e=>qg.Ix.find(e),from:e=>qg.Ix.from(e)});class Jg extends qg.LK{}const Qg=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function Zg(e){return Qg.test(e)}function ef(e){return e.config instanceof Vg.Y?e:Xg.find(e)}function tf(e){return ef(e).parent}function of(e){let t=ef(e);for(;t&&t.level>0;)t=t.parent;return t}function nf(e,t="/",i=!1){const o=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&o.endsWith(t)?o.slice(0,-1):o}function sf(e,t="/"){const i=e.split(t);return 2===i.length&&""===i[0]&&""!==i[1]?e:(i.length>1&&i.pop(),i.join(t))}function af(e){return e.replace(`/*${Wg.N}`,"")}function rf(){null===document.querySelector("foundation-router, fast-router")&&window.dispatchEvent(new PopStateEvent("popstate"))}const lf=Object.freeze({path:Object.freeze({get current(){return Yg.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=ef(e);for(;null!==o;){const e=yield o.config.generateRouteFromPath(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t=!0)=>{e&&Zg(e)?location.href=e:(history.pushState({},document.title,e),rf(),t&&lf.path.trigger(e))},replace:(e,t=!0)=>{e&&Zg(e)?location.href=e:(history.replaceState({},document.title,e),rf(),t&&lf.path.trigger(e))},trigger:e=>{Yg.qh.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=ef(e);for(;null!==o;){const e=yield o.config.generateRouteFromName(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield lf.name.generateRoute(e,t,i);null!==n&&lf.path.push(n,o)}),replace:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield lf.name.generateRoute(e,t,i);null!==n&&lf.path.replace(n,o)}),trigger:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){const o=yield lf.name.generateRoute(e,t,i);null!==o&&lf.path.trigger(o)})})}),df=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,cf=10;function uf(e,t=df,i=cf){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,n)=>{e.navItems.filter(t).map((t,o)=>{var s,a,r,l;const d=null!==(s=t.placementIndex)&&void 0!==s?s:n*i+o;return Object.assign(Object.assign({},t),{navId:null!==(a=t.navId)&&void 0!==a?a:"header",placementIndex:d,routePath:null!==(r=t.routePath)&&void 0!==r?r:e.path,routeName:null!==(l=t.routeName)&&void 0!==l?l:e.name})}).forEach(e=>o.push(e))}),o.sort((e,t)=>e.placementIndex-t.placementIndex)}class hf extends Wg.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(jg.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return jg.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return jg.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}(0,C.Cg)([l.observable],hf.prototype,"definitions",void 0);class pf extends Vg.Y{constructor(){super(),this.logger=jg,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new hf(this),this.basename=Zn.OB,this.routes=new hf(this)}getNavItems(e=df){return uf(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(zg.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,o;if(this.user.isAuthenticated){const n=null!==(o=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==o?o:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${n}.`),lf.name.replace(e.router,n)}else this.user.trackPath(),lf.name.replace(e.router,this.loginPath)})})})}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(),lf.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return(0,C.sH)(this,void 0,void 0,function*(){const o=yield i.generateRouteFromName.call(this,e,t);return o?this.generateNavigationPath(o):null})}navigateTo(e){return(0,C.sH)(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield lf.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&lf.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Gg.C.build(t);let n=i&&!e.startsWith(i)?nf([i,e]):e;return n=o?`${n}?${o}`:n,n}getNavigationPathBasename(){var e,t;const i=this.parent,o=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return o?af(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([a.Container],pf.prototype,"container",void 0),(0,C.Cg)([Bg],pf.prototype,"analytics",void 0),(0,C.Cg)([Wl.KJ],pf.prototype,"user",void 0),(0,C.Cg)([Ti.N],pf.prototype,"_session",void 0);const mf="navigate-to",vf="generate-navigation-path";let gf=class extends(Xg.from(l.FASTElement)){constructor(){super(...arguments),this.logger=jg,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[Kg]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),l.DOM.queueUpdate(()=>(0,C.sH)(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(mf,this.onNavigateTo),this.addEventListener(vf,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(mf,this.onNavigateTo),this.removeEventListener(vf,this.onGenerateNavigationPath)}};gf=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],gf);const ff=e=>l.html`
|
|
6588
|
+
`,Pv={mode:"open",delegatesFocus:!0};class zv extends a.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(pe.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),Ce(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>(0,C.sH)(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return(0,C.sH)(this,void 0,void 0,function*(){var e;this.resourceName&&(null===(e=this.dataSub)||void 0===e||e.unsubscribe(),this.dataSub=void 0,yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,di.d)(e))}):ot.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:o}=e,n=e.CREATED_AT?new Date(e.CREATED_AT):void 0,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let a=[];this.toastButtons&&this.toastButtons.length>0&&(a=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const r={title:t,body:i,createdAt:n,toast:{details:e,type:null==o?void 0:o.toLowerCase(),buttons:a,autoClose:void 0!==s?!!s:!!this.closeTimeout,closeTimeout:null!=s?s:this.closeTimeout,position:this.toastPosition}};vc(r,this.tagName)}}(0,C.Cg)([l.observable],zv.prototype,"notificationListener",void 0),(0,C.Cg)([ui.dm],zv.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],zv.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],zv.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],zv.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],zv.prototype,"toastPosition",void 0),(0,C.Cg)([hi.yW],zv.prototype,"datasource",void 0);const Uv=zv.compose({baseName:"notification-listener",template:Hv,shadowOptions:Pv}),Bv=(e,t)=>i=>{const o="function"==typeof t?t:(n=t,e=>Object.assign(Object.assign({},n),e));var n;return l.FASTElement.define(class extends e{},o(i))};function Vv(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=l.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}var Gv;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Gv||(Gv={}));class jv{trackEvent(e,t){js.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const Yv=a.DI.createInterface(e=>e.singleton(jv));var Wv=i(98647),qv=i(35044);const Kv=(0,it.createLogger)("foundation-router");var Xv=i(36132),Jv=i(80751),Qv=i(3479);const Zv="$router",ef=Object.freeze({getOrCreateFor:e=>{const t=e[Zv];return void 0!==t?t:e[Zv]=new tf(e)},find:e=>Qv.Ix.find(e),from:e=>Qv.Ix.from(e)});class tf extends Qv.LK{}const of=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function nf(e){return of.test(e)}function sf(e){return e.config instanceof Wv.Y?e:ef.find(e)}function af(e){return sf(e).parent}function rf(e){let t=sf(e);for(;t&&t.level>0;)t=t.parent;return t}function lf(e,t="/",i=!1){const o=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&o.endsWith(t)?o.slice(0,-1):o}function df(e,t="/"){const i=e.split(t);return 2===i.length&&""===i[0]&&""!==i[1]?e:(i.length>1&&i.pop(),i.join(t))}function cf(e){return e.replace(`/*${Jv.N}`,"")}function uf(){null===document.querySelector("foundation-router, fast-router")&&window.dispatchEvent(new PopStateEvent("popstate"))}const hf=Object.freeze({path:Object.freeze({get current(){return Xv.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=sf(e);for(;null!==o;){const e=yield o.config.generateRouteFromPath(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t=!0)=>{e&&nf(e)?location.href=e:(history.pushState({},document.title,e),uf(),t&&hf.path.trigger(e))},replace:(e,t=!0)=>{e&&nf(e)?location.href=e:(history.replaceState({},document.title,e),uf(),t&&hf.path.trigger(e))},trigger:e=>{Xv.qh.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=sf(e);for(;null!==o;){const e=yield o.config.generateRouteFromName(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield hf.name.generateRoute(e,t,i);null!==n&&hf.path.push(n,o)}),replace:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield hf.name.generateRoute(e,t,i);null!==n&&hf.path.replace(n,o)}),trigger:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){const o=yield hf.name.generateRoute(e,t,i);null!==o&&hf.path.trigger(o)})})}),pf=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,mf=10;function gf(e,t=pf,i=mf){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,n)=>{e.navItems.filter(t).map((t,o)=>{var s,a,r,l;const d=null!==(s=t.placementIndex)&&void 0!==s?s:n*i+o;return Object.assign(Object.assign({},t),{navId:null!==(a=t.navId)&&void 0!==a?a:"header",placementIndex:d,routePath:null!==(r=t.routePath)&&void 0!==r?r:e.path,routeName:null!==(l=t.routeName)&&void 0!==l?l:e.name})}).forEach(e=>o.push(e))}),o.sort((e,t)=>e.placementIndex-t.placementIndex)}class vf extends Jv.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(Kv.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return Kv.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return Kv.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}(0,C.Cg)([l.observable],vf.prototype,"definitions",void 0);class ff extends Wv.Y{constructor(){super(),this.logger=Kv,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new vf(this),this.basename=Zn.OB,this.routes=new vf(this)}getNavItems(e=pf){return gf(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Gv.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,o;if(this.user.isAuthenticated){const n=null!==(o=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==o?o:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${n}.`),hf.name.replace(e.router,n)}else this.user.trackPath(),hf.name.replace(e.router,this.loginPath)})})})}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(),hf.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return(0,C.sH)(this,void 0,void 0,function*(){const o=yield i.generateRouteFromName.call(this,e,t);return o?this.generateNavigationPath(o):null})}navigateTo(e){return(0,C.sH)(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield hf.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&hf.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=qv.C.build(t);let n=i&&!e.startsWith(i)?lf([i,e]):e;return n=o?`${n}?${o}`:n,n}getNavigationPathBasename(){var e,t;const i=this.parent,o=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return o?cf(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([a.Container],ff.prototype,"container",void 0),(0,C.Cg)([Yv],ff.prototype,"analytics",void 0),(0,C.Cg)([Jl.KJ],ff.prototype,"user",void 0),(0,C.Cg)([Ti.N],ff.prototype,"_session",void 0);const bf="navigate-to",yf="generate-navigation-path";let wf=class extends(ef.from(l.FASTElement)){constructor(){super(...arguments),this.logger=Kv,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[Zv]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),l.DOM.queueUpdate(()=>(0,C.sH)(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(bf,this.onNavigateTo),this.addEventListener(yf,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(bf,this.onNavigateTo),this.removeEventListener(yf,this.onGenerateNavigationPath)}};wf=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],wf);const Cf=e=>l.html`
|
|
6589
6589
|
|
|
6590
6590
|
<${e}-card class=${e=>(0,x.x)("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">
|
|
6591
6591
|
<div class=${e=>(0,x.x)("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])} part="stepper-tab-menu">
|
|
@@ -6618,9 +6618,9 @@ class="margin"
|
|
|
6618
6618
|
`)}
|
|
6619
6619
|
</${e}-card>
|
|
6620
6620
|
`)}
|
|
6621
|
-
`,
|
|
6622
|
-
${e=>
|
|
6623
|
-
|
|
6621
|
+
`,xf=l.html`
|
|
6622
|
+
${e=>Cf(T(e))}
|
|
6623
|
+
`,$f=l.css`
|
|
6624
6624
|
:host {
|
|
6625
6625
|
display: flex;
|
|
6626
6626
|
height: 100%;
|
|
@@ -6719,5 +6719,5 @@ class="margin"
|
|
|
6719
6719
|
max-height: 70px;
|
|
6720
6720
|
height: 70px;
|
|
6721
6721
|
}
|
|
6722
|
-
`;class
|
|
6723
|
-
//# sourceMappingURL=966.
|
|
6722
|
+
`;class Sf extends a.FoundationElement{constructor(){super(...arguments),this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=a.TabsOrientation.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("tab"===e.slot){const i=this.activeTabIndex===t,o=t+1===this.tabIds.length,n=this.tabIds[t],s=this.tabpanelIds[t];e.setAttribute("id",n),e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("aria-disabled",i?"false":"true"),e.setAttribute("selected",i?"true":"false"),e.setAttribute("orientation",this.orientation),s&&e.setAttribute("aria-controls",s),e.setAttribute("tab-position",String(t+1)),e.setAttribute("isLast",String(o)),e.setAttribute("hideStepNumber",String(!0===this.hideStepNumber)),e.setAttribute("tabindex",i?"0":"-1"),e.setAttribute("showCursorPointer",String(t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps)),i&&(this.activetab=e,this.activeid=n)}}),0===this.activeTabIndex&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)});const 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)=>{const i=this.tabIds[t],o=this.tabpanelIds[t];e.setAttribute("id",o),e.setAttribute("aria-labelledby",i),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("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 void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}goToStep(e,t=!1){const i=e-1;if(e<1||e>this.tabs.length)return ot.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(i===this.activeTabIndex)return!1;if(t){if(i<this.activeTabIndex)return this.handleBackwardJump(i);if(i>this.activeTabIndex)return this.handleForwardJump(i)}if(i<this.activeTabIndex&&this.allowBackwardJumps){return this.handleBackwardJump(i)}if(i>this.activeTabIndex&&this.allowForwardJumps){return this.handleForwardJump(i)}return i===this.activeTabIndex+1?(this.nextStep(),!0):(ot.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 0===this.activeTabIndex}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){var e;const t=this.tabs.length-1;return this.activeTabIndex===t&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs(),!1):(this.tabs[t].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit("submit")}nextStep(){var e;if(!this.slotsInitialized)return void(this.pendingNextStep=!0);if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid())return this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,void this.getCompletedTabs();this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex=this.activeTabIndex+1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit("next-step"),this.$emit("validation-success"));const t=this.tabs.length-1,i=this.activeTabIndex===t;this.hideSubmitButton&&i&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs()):(this.tabs[t].completed=!1,this.getCompletedTabs())}previousStep(){0!==this.activeTabIndex&&(this.tabs[this.activeTabIndex].completed=!1,this.activeTabIndex=this.activeTabIndex-1,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`tab-${(0,ba.NF)()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${(0,ba.NF)()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}(0,C.Cg)([(0,l.attr)({attribute:"hide-submit-button",mode:"boolean"})],Sf.prototype,"hideSubmitButton",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-step-number",mode:"boolean"})],Sf.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-backward-jumps",mode:"boolean"})],Sf.prototype,"allowBackwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-forward-jumps",mode:"boolean"})],Sf.prototype,"allowForwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-all-buttons",mode:"boolean"})],Sf.prototype,"hideAllButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-tabs",mode:"boolean"})],Sf.prototype,"hideTabs",void 0),(0,C.Cg)([(0,l.attr)({attribute:"indicator-only",mode:"boolean"})],Sf.prototype,"indicatorOnly",void 0),(0,C.Cg)([l.attr],Sf.prototype,"orientation",void 0),(0,C.Cg)([l.attr],Sf.prototype,"activeid",void 0),(0,C.Cg)([l.observable],Sf.prototype,"tabs",void 0),(0,C.Cg)([l.observable],Sf.prototype,"tabpanels",void 0),(0,C.Cg)([l.observable],Sf.prototype,"validation",void 0),(0,C.Cg)([l.observable],Sf.prototype,"progressValue",void 0),(0,C.Cg)([l.observable],Sf.prototype,"activeTabIndex",void 0),(0,C.Cg)([l.volatile],Sf.prototype,"disabledPreviousStep",null),(0,C.Cg)([l.volatile],Sf.prototype,"isLastStep",null),(0,C.Cg)([l.volatile],Sf.prototype,"islastStepValid",null);const Ef=void 0,Of={},Tf=Sf.compose(Object.assign({baseName:"stepper",template:xf,styles:$f,shadowOptions:Ef},Of)),kf=["text-field","text-area","combobox"],Df=["input","textarea","select",'[contenteditable="true"]','[contenteditable=""]','[role="textbox"]','[role="searchbox"]','[role="combobox"]'],If=e=>kf.map(t=>`${e}-${t}`),Rf={rapid:If("rapid"),zero:If("zero")};function Af(e,t=[]){const i=e.flatMap(e=>{var t;return null!==(t=Rf[e])&&void 0!==t?t:[]}),o=t.filter(Boolean);return Array.from(new Set([...Df,...i,...o])).join(",")}const Lf=()=>$d().register(Km)},70997(e,t,i){"use strict";function o(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),s=o(i);return(t,i)=>e(t,i)?n(t,i):s(t,i)}i.d(t,{q:()=>o})},80273(e,t,i){"use strict";i.d(t,{Du:()=>l,IT:()=>a,WP:()=>n,f4:()=>r,zz:()=>s});var o=i(52945);const n=(e,t)=>{(0,o.O5)(e,t)};var s,a;!function(e){e.Italic="italic",e.Normal="normal"}(s||(s={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(a||(a={}));const r=(e,t=s.Normal,i=a.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${i};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}}}]);
|
|
6723
|
+
//# sourceMappingURL=966.0d5feb07930f8c53831abe8e3640a072.js.map
|