@processmaker/screen-builder 2.85.0 → 2.85.2

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.
@@ -257,7 +257,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
257
257
  }));
258
258
  `),r.run_onload&&this.addMounted(t,`
259
259
  this.queueWatcher(${JSON.stringify(r)});
260
- `)}))}},mounted(){this.extensions.push({onbuild({screen:t,definition:e}){this.watchers(t,e)},onparse({definition:t}){this.addWatcherVariables(t)}})}}},Symbol.toStringTag,{value:"Module"})),ov=[];Object.entries(Object.assign({"./AccordionContainer.js":QE,"./ComputedFields.js":KE,"./CustomCss.js":JE,"./DataManager.js":ZE,"./DefaultValues.js":XE,"./InputText.js":eM,"./LoadFieldComponents.js":tM,"./LoopContainer.js":rM,"./MultiColumn.js":aM,"./PageNavigate.js":iM,"./Submit.js":nM,"./ValidationRules.js":Dq,"./VisibilityRule.js":Iq,"./Watchers.js":jq})).forEach(([t,e])=>{ov.push(e.default)});const il={in:"Invalid value",notIn:"Invalid value",accepted:"Field must be accepted",required:"Field is required",requiredIf:"Field is required",requiredUnless:"Field is required",minLength:"Must have at least {min}",maxLength:"Must have at most {max}",min:"Must have at least {min}",max:"Must have at most {max}",minValue:"Must have a minimum value of {min}",maxValue:"Must have a maximum value of {max}",between:"Must have a value between {min} and {max}",alpha:"Accepts only alphabet characters",alphaNum:"Accepts only alphanumerics",numeric:"Accepts only numerics",integer:"Must be a positive or negative integer",decimal:"Must be a positive or negative decimal number",email:"Must be a valid email address",ipAddress:"Must be a valid IPv4 address",macAddress:"Must be a valid MAC address",sameAs:"Must be same as {field}",same:"Must be same as {field}",url:"Must be a valid URL",after:"Must be after {after}",afterOrEqual:"Must be equal or after {after_or_equal}",before:"Must be before {before}",beforeOrEqual:"Must be equal or before {before_or_equal}",invalid_default_value:"Invalid default value",customDate:"Must be a valid Date",regex:"Invalid value",maxItems:"Should NOT have more than {max} items",minItems:"Must have at least {min}",type:"Invalid type"},Nq=t=>{let e="MM/DD/YYYY";return typeof window.ProcessMaker<"u"&&window.ProcessMaker.user&&window.ProcessMaker.user.datetime_format&&(e=window.ProcessMaker.user.datetime_format.replace(/[\sHh:msaAzZ]/g,"")),Ze(t,[e,Ze.ISO_8601],!0).isValid()},Rq=(t,e)=>Ae.helpers.withParams({after:t},function(r,a){const i=e.split(".").length-1,n=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(a),i);n.today=Ze().format("YYYY-MM-DD");const s=Ze(H.get(n,t,t));if(!s.isValid())return!1;const o=Ze(r).toISOString(),u=s.toISOString();return o>u}),Fq=(t,e)=>Ae.helpers.withParams({after_or_equal:t},function(r,a){const i=e.split(".").length-1,n=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(a),i);n.today=Ze().format("YYYY-MM-DD");const s=Ze(H.get(n,t,t));if(!s.isValid())return!1;const o=Ze(r).toISOString(),u=s.toISOString();return o>=u}),qq=(t,e)=>Ae.helpers.withParams({before:t},function(r,a){const i=e.split(".").length-1,n=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(a),i);n.today=Ze().format("YYYY-MM-DD");const s=Ze(H.get(n,t,t));if(!s.isValid())return!1;const o=Ze(r).toISOString(),u=s.toISOString();return o<u}),Bq=(t,e)=>Ae.helpers.withParams({before_or_equal:t},function(r,a){const i=e.split(".").length-1,n=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(a),i);n.today=Ze().format("YYYY-MM-DD");const s=Ze(H.get(n,t,t));if(!s.isValid())return!1;const o=Ze(r).toISOString(),u=s.toISOString();return o<=u}),Wq=t=>t==="yes"||t==="on"||t===!0||t===1||t==="1",Vq=t=>Ae.helpers.withParams({list:t},e=>(t=t instanceof Array?t:t.split(","),t.findIndex(r=>r==e)>-1)),Uq=t=>Ae.helpers.withParams({list:t},e=>(t=t instanceof Array?t:t.split(","),t.findIndex(r=>r==e)===-1)),Gq=t=>Ae.helpers.withParams({expression:t},e=>{const r=t.match(/(\/?)(.+)\1([a-z]*)/i),a=r[2],i=r[3],n=new RegExp(a,i);return!!String(e).match(n)}),Hq=t=>t instanceof Array?t.length>0:!!t,Yq=(t,e,r)=>Ae.helpers.withParams({variable:t,expected:e},function(a,i){const n=r.split(".").length-1,s=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(i),n),o=H.get(s,t),u=o===!0||o===!1;let l=e;return u&&(l=e==="true"||e==="1"),o!=l?!0:a instanceof Array?a.length>0:!!a}),Qq=(t,e,r)=>Ae.helpers.withParams({variable:t,expected:e},function(a,i){const n=r.split(".").length-1,s=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(i),n),o=H.get(s,t),u=o===!0||o===!1;let l=e;return u&&(l=e==="true"||e==="1"),o==l?!0:a instanceof Array?a.length>0:!!a}),lv=(t,e)=>Ae.helpers.withParams({field:t},function(r,a){const i=e.split(".").length-1,n=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(a),i),s=H.get(n,t);return r==s}),nl={required:Hq,requiredIf:Yq,requiredUnless:Qq,minLength:Ae.minLength,maxLength:Ae.maxLength,min:Ae.minLength,max:Ae.maxLength,minValue:Ae.minValue,maxValue:Ae.maxValue,between:Ae.between,alpha:Ae.alpha,alphaNum:Ae.alphaNum,numeric:Ae.numeric,integer:Ae.integer,decimal:Ae.decimal,email:Ae.email,ipAddress:Ae.ipAddress,macAddress:Ae.macAddress,sameAs:lv,same:lv,url:Ae.url,not:Ae.not,or:Ae.or,and:Ae.and,customDate:Nq,before:qq,after:Rq,beforeOrEqual:Bq,accepted:Wq,in:Vq,notIn:Uq,regex:Gq,afterOrEqual:Fq,maxItems:Ae.maxItems,minItems:Ae.minItems,type:Ae.type},Kq=["string","datetime","date","password"],ad={name:"ScreenContent",mixins:[uh,sh],schema:[function(){if(window.ProcessMaker&&window.ProcessMaker.packages&&window.ProcessMaker.packages.includes("package-vocabularies")){if(window.ProcessMaker.VocabulariesSchemaUrl)return window.ProcessMaker.apiClient.get(window.ProcessMaker.VocabulariesSchemaUrl).then(e=>e.data);if(window.ProcessMaker.VocabulariesPreview)return window.ProcessMaker.VocabulariesPreview}return{}}],data(){return{ValidationRules__:{},hiddenFields__:[]}},props:{vdata:{type:Object,required:!0},_parent:null,_initialPage:{default:0}},computed:{...Pt.mapState("globalErrorsModule",{valid__:"valid",message__:"message",locked__:"locked",disableSubmit__:"disableSubmit"}),...Pt.mapGetters("globalErrorsModule",["showValidationErrors"]),references__(){return this.$parent&&this.$parent.references__}},methods:{...Pt.mapActions("globalErrorsModule",["validateNow","hasSubmitted","disableSubmit"]),getDataAccordingToFieldLevel(t,e){return e===0||!t?t:this.getDataAccordingToFieldLevel(t._parent,e-1)},addReferenceToParents(t){if(!t)return;const e=this.addReferenceToParents(this.findParent(t));return new Proxy({},{get:(r,a)=>a==="_parent"&&e?e:a in r?r[a]:t[a],has:(r,a)=>a==="_parent"?e!==void 0:t[a]!==void 0||r[a]!==void 0,set:(r,a,i)=>(r[a]=i,!0)})},findParent(t,e=this.vdata,r=this._parent){if(t===e)return r;for(const a in e)if(a!=="_parent"){if(e[a]instanceof Array)for(const i of e[a]){const n=this.findParent(t,i,e);if(n)return n}else if(e[a]instanceof Object){const i=this.findParent(t,e[a],e);if(i)return i}else if(t===e[a])return r}},getRootScreen(t=this){const e=t.$parent.$parent;return e&&e.getRootScreen instanceof Function?e.getRootScreen(e):t},tryFormField(t,e,r=null){try{let a=e();return a===void 0?null:a}catch{return H.set(this.$v,`${t}.$invalid`,!0),H.set(this.$v,`${t}.invalid_default_value`,!1),r}},mustache(t){try{const e=this.getDataReference();return t&&_r.render(t,e)}catch(e){return"MUSTACHE: "+e.message}},async submitForm(t,e=!1){if(await this.validateNow(ch(this)),this.hasSubmitted(!0),!this.valid__||this.disableSubmit__){this.message__&&window.ProcessMaker.alert(this.message__,"danger");return}this.$emit("submit",this.vdata,e)},resetValue(t,e){this.setValue(t,null),this.updateScreenDataNow(t,e,!1)},getValidationData(){return this.vdata},initialValue(t,e,r){let a=null;return t==="FormInput"?Kq.includes(e)?a="":e==="currency"&&(a=0):t==="FormTextArea"?a="":t==="FormSelectList"&&r.options.allowMultiSelect?a=[]:t==="FormSelectList"&&!r.options.allowMultiSelect?a=null:t==="FormLoop"&&(a=this.emptyLoopValue(r)),a},emptyLoopValue(t){if(t.settings.type==="existing")return[];const e=Number(t.settings.times),r=[];for(let a=0;a<e;a++)r.push({});return r},updateScreenData(t,e){this[`${t}_was_filled__`]=!0,this.blockUpdate(t,210),this.setValueDebounced(e,this[t],this.vdata)},updateScreenDataNow(t,e,r=!0){r&&(this[`${t}_was_filled__`]=!0),this.setValue(e,this[t],this.vdata),this.unblockUpdate(t)},blockUpdate(t,e){this.blockedUpdates[t]=new Date().getTime()+e},unblockUpdate(t){this.blockUpdate(t,0)},canUpdate(t){return!this.blockedUpdates[t]||this.blockedUpdates[t]<new Date().getTime()},getValue(t,e=this){return e?H.get(e,t):void 0},setValue(t,e,r=this,a=r){if(r&&e!==void 0){const i=t.split(".");for(const n of i){let s,u=i.indexOf(n)===i.length-1;const l=H.get(r,n);if(u?s=e:(s=l,s||(s=H.get(a,n)),s||(s={})),u&&H.isEqual(s,l))return;r instanceof Object&&this.$set(r,n,s),r=H.get(r,n),a=H.get(a,n)}}},addNonDefinedComputedAttributes(t,e,r=null){if(t instanceof Array)t.forEach((a,i)=>{this.addNonDefinedComputedAttributes(a,i,t)});else if(t instanceof Object)Object.keys(t).forEach(a=>{this.addNonDefinedComputedAttributes(t[a],a,t)});else if(r&&r instanceof Object&&!(t instanceof Array)){const a=Object.getOwnPropertyDescriptor(r,e);a&&a.get||(delete r[e],this.$set(r,e,t))}return t},validationMessage(t){const e=[];return Object.keys(il).forEach(r=>{t[r]!==void 0&&!t[r]&&e.push(this.$t(il[r]).replace(/\{(.+?)\}/g,(i,n)=>t.$params[r][n]));const a="schema"+r.charAt(0).toUpperCase()+r.slice(1);t[a]!==void 0&&!t[a]&&e.push(this.$t(il[r]).replace(/\{(.+?)\}/g,(i,n)=>t.$params[a][n]))}),e.join(`.
260
+ `)}))}},mounted(){this.extensions.push({onbuild({screen:t,definition:e}){this.watchers(t,e)},onparse({definition:t}){this.addWatcherVariables(t)}})}}},Symbol.toStringTag,{value:"Module"})),ov=[];Object.entries(Object.assign({"./AccordionContainer.js":QE,"./ComputedFields.js":KE,"./CustomCss.js":JE,"./DataManager.js":ZE,"./DefaultValues.js":XE,"./InputText.js":eM,"./LoadFieldComponents.js":tM,"./LoopContainer.js":rM,"./MultiColumn.js":aM,"./PageNavigate.js":iM,"./Submit.js":nM,"./ValidationRules.js":Dq,"./VisibilityRule.js":Iq,"./Watchers.js":jq})).forEach(([t,e])=>{ov.push(e.default)});const il={in:"Invalid value",notIn:"Invalid value",accepted:"Field must be accepted",required:"Field is required",requiredIf:"Field is required",requiredUnless:"Field is required",minLength:"Must have at least {min}",maxLength:"Must have at most {max}",min:"Must have at least {min}",max:"Must have at most {max}",minValue:"Must have a minimum value of {min}",maxValue:"Must have a maximum value of {max}",between:"Must have a value between {min} and {max}",alpha:"Accepts only alphabet characters",alphaNum:"Accepts only alphanumerics",numeric:"Accepts only numerics",integer:"Must be a positive or negative integer",decimal:"Must be a positive or negative decimal number",email:"Must be a valid email address",ipAddress:"Must be a valid IPv4 address",macAddress:"Must be a valid MAC address",sameAs:"Must be same as {field}",same:"Must be same as {field}",url:"Must be a valid URL",after:"Must be after {after}",afterOrEqual:"Must be equal or after {after_or_equal}",before:"Must be before {before}",beforeOrEqual:"Must be equal or before {before_or_equal}",invalid_default_value:"Invalid default value",customDate:"Must be a valid Date",regex:"Invalid value",maxItems:"Should NOT have more than {max} items",minItems:"Must have at least {min}",type:"Invalid type"},Nq=t=>{let e="MM/DD/YYYY";return typeof window.ProcessMaker<"u"&&window.ProcessMaker.user&&window.ProcessMaker.user.datetime_format&&(e=window.ProcessMaker.user.datetime_format.replace(/[\sHh:msaAzZ]/g,"")),Ze(t,[e,Ze.ISO_8601],!0).isValid()},Rq=(t,e)=>Ae.helpers.withParams({after:t},function(r,a){const i=e.split(".").length-1,n=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(a),i);n.today=Ze().format("YYYY-MM-DD");const s=Ze(H.get(n,t,t));if(!s.isValid())return!1;const o=Ze(r).toISOString(),u=s.toISOString();return o>u}),Fq=(t,e)=>Ae.helpers.withParams({after_or_equal:t},function(r,a){const i=e.split(".").length-1,n=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(a),i);n.today=Ze().format("YYYY-MM-DD");const s=Ze(H.get(n,t,t));if(!s.isValid())return!1;const o=Ze(r).toISOString(),u=s.toISOString();return o>=u}),qq=(t,e)=>Ae.helpers.withParams({before:t},function(r,a){const i=e.split(".").length-1,n=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(a),i);n.today=Ze().format("YYYY-MM-DD");const s=Ze(H.get(n,t,t));if(!s.isValid())return!1;const o=Ze(r).toISOString(),u=s.toISOString();return o<u}),Bq=(t,e)=>Ae.helpers.withParams({before_or_equal:t},function(r,a){const i=e.split(".").length-1,n=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(a),i);n.today=Ze().format("YYYY-MM-DD");const s=Ze(H.get(n,t,t));if(!s.isValid())return!1;const o=Ze(r).toISOString(),u=s.toISOString();return o<=u}),Wq=t=>t==="yes"||t==="on"||t===!0||t===1||t==="1",Vq=t=>Ae.helpers.withParams({list:t},e=>(t=t instanceof Array?t:t.split(","),t.findIndex(r=>r==e)>-1)),Uq=t=>Ae.helpers.withParams({list:t},e=>(t=t instanceof Array?t:t.split(","),t.findIndex(r=>r==e)===-1)),Gq=t=>Ae.helpers.withParams({expression:t},e=>{const r=t.match(/(\/?)(.+)\1([a-z]*)/i),a=r[2],i=r[3],n=new RegExp(a,i);return!!String(e).match(n)}),Hq=t=>t instanceof Array?t.length>0:!!t,Yq=(t,e,r)=>Ae.helpers.withParams({variable:t,expected:e},function(a,i){const n=r.split(".").length-1,s=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(i),n),o=H.get(s,t),u=o===!0||o===!1;let l=e;return u&&(l=e==="true"||e==="1"),o!=l?!0:a instanceof Array?a.length>0:!!a}),Qq=(t,e,r)=>Ae.helpers.withParams({variable:t,expected:e},function(a,i){const n=r.split(".").length-1,s=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(i),n),o=H.get(s,t),u=o===!0||o===!1;let l=e;return u&&(l=e==="true"||e==="1"),o==l?!0:a instanceof Array?a.length>0:!!a}),lv=(t,e)=>Ae.helpers.withParams({field:t},function(r,a){const i=e.split(".").length-1,n=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(a),i),s=H.get(n,t);return r==s}),nl={required:Hq,requiredIf:Yq,requiredUnless:Qq,minLength:Ae.minLength,maxLength:Ae.maxLength,min:Ae.minLength,max:Ae.maxLength,minValue:Ae.minValue,maxValue:Ae.maxValue,between:Ae.between,alpha:Ae.alpha,alphaNum:Ae.alphaNum,numeric:Ae.numeric,integer:Ae.integer,decimal:Ae.decimal,email:Ae.email,ipAddress:Ae.ipAddress,macAddress:Ae.macAddress,sameAs:lv,same:lv,url:Ae.url,not:Ae.not,or:Ae.or,and:Ae.and,customDate:Nq,before:qq,after:Rq,beforeOrEqual:Bq,accepted:Wq,in:Vq,notIn:Uq,regex:Gq,afterOrEqual:Fq,maxItems:Ae.maxItems,minItems:Ae.minItems,type:Ae.type},Kq=["string","datetime","date","password"],ad={name:"ScreenContent",mixins:[uh,sh],schema:[function(){if(window.ProcessMaker&&window.ProcessMaker.packages&&window.ProcessMaker.packages.includes("package-vocabularies")){if(window.ProcessMaker.VocabulariesSchemaUrl)return window.ProcessMaker.apiClient.get(window.ProcessMaker.VocabulariesSchemaUrl).then(e=>e.data);if(window.ProcessMaker.VocabulariesPreview)return window.ProcessMaker.VocabulariesPreview}return{}}],data(){return{ValidationRules__:{},hiddenFields__:[]}},props:{vdata:{type:Object,required:!0},_parent:null,_initialPage:{default:0}},computed:{...Pt.mapState("globalErrorsModule",{valid__:"valid",message__:"message",locked__:"locked",disableSubmit__:"disableSubmit"}),...Pt.mapGetters("globalErrorsModule",["showValidationErrors"]),references__(){return this.$parent&&this.$parent.references__}},methods:{...Pt.mapActions("globalErrorsModule",["validateNow","hasSubmitted","disableSubmit"]),getDataAccordingToFieldLevel(t,e){return e===0||!t?t:this.getDataAccordingToFieldLevel(t._parent,e-1)},addReferenceToParents(t){if(!t)return;const e=this.addReferenceToParents(this.findParent(t));return new Proxy({},{get:(r,a)=>a==="_parent"&&e?e:a in r?r[a]:t[a],has:(r,a)=>a==="_parent"?e!==void 0:t[a]!==void 0||r[a]!==void 0,set:(r,a,i)=>(r[a]=i,!0)})},findParent(t,e=this.vdata,r=this._parent){if(t===e)return r;for(const a in e)if(a!=="_parent"){if(e[a]instanceof Array)for(const i of e[a]){const n=this.findParent(t,i,e);if(n)return n}else if(e[a]instanceof Object){const i=this.findParent(t,e[a],e);if(i)return i}else if(t===e[a])return r}},getRootScreen(t=this){const e=t.$parent.$parent;return e&&e.getRootScreen instanceof Function?e.getRootScreen(e):t},tryFormField(t,e,r=null){try{let a=e();return a===void 0?null:a}catch{return H.set(this.$v,`${t}.$invalid`,!0),H.set(this.$v,`${t}.invalid_default_value`,!1),r}},mustache(t){try{const e=this.getDataReference();return t&&_r.render(t,e)}catch(e){return"MUSTACHE: "+e.message}},async submitForm(t,e=!1,r=null){if(await this.validateNow(ch(this)),this.hasSubmitted(!0),!this.valid__||this.disableSubmit__){this.message__&&window.ProcessMaker.alert(this.message__,"danger");return}this.$emit("submit",this.vdata,e,r)},resetValue(t,e){this.setValue(t,null),this.updateScreenDataNow(t,e,!1)},getValidationData(){return this.vdata},initialValue(t,e,r){let a=null;return t==="FormInput"?Kq.includes(e)?a="":e==="currency"&&(a=0):t==="FormTextArea"?a="":t==="FormSelectList"&&r.options.allowMultiSelect?a=[]:t==="FormSelectList"&&!r.options.allowMultiSelect?a=null:t==="FormLoop"&&(a=this.emptyLoopValue(r)),a},emptyLoopValue(t){if(t.settings.type==="existing")return[];const e=Number(t.settings.times),r=[];for(let a=0;a<e;a++)r.push({});return r},updateScreenData(t,e){this[`${t}_was_filled__`]=!0,this.blockUpdate(t,210),this.setValueDebounced(e,this[t],this.vdata)},updateScreenDataNow(t,e,r=!0){r&&(this[`${t}_was_filled__`]=!0),this.setValue(e,this[t],this.vdata),this.unblockUpdate(t)},blockUpdate(t,e){this.blockedUpdates[t]=new Date().getTime()+e},unblockUpdate(t){this.blockUpdate(t,0)},canUpdate(t){return!this.blockedUpdates[t]||this.blockedUpdates[t]<new Date().getTime()},getValue(t,e=this){return e?H.get(e,t):void 0},setValue(t,e,r=this,a=r){if(r&&e!==void 0){const i=t.split(".");for(const n of i){let s,u=i.indexOf(n)===i.length-1;const l=H.get(r,n);if(u?s=e:(s=l,s||(s=H.get(a,n)),s||(s={})),u&&H.isEqual(s,l))return;r instanceof Object&&this.$set(r,n,s),r=H.get(r,n),a=H.get(a,n)}}},addNonDefinedComputedAttributes(t,e,r=null){if(t instanceof Array)t.forEach((a,i)=>{this.addNonDefinedComputedAttributes(a,i,t)});else if(t instanceof Object)Object.keys(t).forEach(a=>{this.addNonDefinedComputedAttributes(t[a],a,t)});else if(r&&r instanceof Object&&!(t instanceof Array)){const a=Object.getOwnPropertyDescriptor(r,e);a&&a.get||(delete r[e],this.$set(r,e,t))}return t},validationMessage(t){const e=[];return Object.keys(il).forEach(r=>{t[r]!==void 0&&!t[r]&&e.push(this.$t(il[r]).replace(/\{(.+?)\}/g,(i,n)=>t.$params[r][n]));const a="schema"+r.charAt(0).toUpperCase()+r.slice(1);t[a]!==void 0&&!t[a]&&e.push(this.$t(il[r]).replace(/\{(.+?)\}/g,(i,n)=>t.$params[a][n]))}),e.join(`.
261
261
  `)},getCurrentPage(){return this.currentPage__},setCurrentPage(t){this.currentPage__=t},setValueAsync(t,e,r=this,a=r){}},validations(){return{vdata:this.ValidationRules__}},created(){this.blockedUpdates={};const t=[],e=H.debounce(()=>{t.forEach(r=>{this.setValue(...r)})},210);this.setValueDebounced=(...r)=>{t.push(r),e()},this.setValueAsync=(r,a,i=this,n=i)=>Promise.resolve().then(()=>{this.setValue(r,a,i,n)})}};function uv(t,e){return function(){return t.apply(e,arguments)}}const{toString:Jq}=Object.prototype,{getPrototypeOf:id}=Object,sl=(t=>e=>{const r=Jq.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Tr=t=>(t=t.toLowerCase(),e=>sl(e)===t),ol=t=>e=>typeof e===t,{isArray:xi}=Array,Fn=ol("undefined");function Zq(t){return t!==null&&!Fn(t)&&t.constructor!==null&&!Fn(t.constructor)&&Qt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const cv=Tr("ArrayBuffer");function Xq(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&cv(t.buffer),e}const e3=ol("string"),Qt=ol("function"),dv=ol("number"),ll=t=>t!==null&&typeof t=="object",t3=t=>t===!0||t===!1,ul=t=>{if(sl(t)!=="object")return!1;const e=id(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},r3=Tr("Date"),a3=Tr("File"),i3=Tr("Blob"),n3=Tr("FileList"),s3=t=>ll(t)&&Qt(t.pipe),o3=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Qt(t.append)&&((e=sl(t))==="formdata"||e==="object"&&Qt(t.toString)&&t.toString()==="[object FormData]"))},l3=Tr("URLSearchParams"),u3=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function qn(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let a,i;if(typeof t!="object"&&(t=[t]),xi(t))for(a=0,i=t.length;a<i;a++)e.call(null,t[a],a,t);else{const n=r?Object.getOwnPropertyNames(t):Object.keys(t),s=n.length;let o;for(a=0;a<s;a++)o=n[a],e.call(null,t[o],o,t)}}function pv(t,e){e=e.toLowerCase();const r=Object.keys(t);let a=r.length,i;for(;a-- >0;)if(i=r[a],e===i.toLowerCase())return i;return null}const fv=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),hv=t=>!Fn(t)&&t!==fv;function nd(){const{caseless:t}=hv(this)&&this||{},e={},r=(a,i)=>{const n=t&&pv(e,i)||i;ul(e[n])&&ul(a)?e[n]=nd(e[n],a):ul(a)?e[n]=nd({},a):xi(a)?e[n]=a.slice():e[n]=a};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&qn(arguments[a],r);return e}const c3=(t,e,r,{allOwnKeys:a}={})=>(qn(e,(i,n)=>{r&&Qt(i)?t[n]=uv(i,r):t[n]=i},{allOwnKeys:a}),t),d3=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),p3=(t,e,r,a)=>{t.prototype=Object.create(e.prototype,a),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},f3=(t,e,r,a)=>{let i,n,s;const o={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),n=i.length;n-- >0;)s=i[n],(!a||a(s,t,e))&&!o[s]&&(e[s]=t[s],o[s]=!0);t=r!==!1&&id(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},h3=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const a=t.indexOf(e,r);return a!==-1&&a===r},m3=t=>{if(!t)return null;if(xi(t))return t;let e=t.length;if(!dv(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},g3=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&id(Uint8Array)),v3=(t,e)=>{const a=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=a.next())&&!i.done;){const n=i.value;e.call(t,n[0],n[1])}},b3=(t,e)=>{let r;const a=[];for(;(r=t.exec(e))!==null;)a.push(r);return a},y3=Tr("HTMLFormElement"),S3=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,a,i){return a.toUpperCase()+i}),mv=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),x3=Tr("RegExp"),gv=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),a={};qn(r,(i,n)=>{let s;(s=e(i,n,t))!==!1&&(a[n]=s||i)}),Object.defineProperties(t,a)},k3=t=>{gv(t,(e,r)=>{if(Qt(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const a=t[r];if(Qt(a)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},_3=(t,e)=>{const r={},a=i=>{i.forEach(n=>{r[n]=!0})};return xi(t)?a(t):a(String(t).split(e)),r},w3=()=>{},C3=(t,e)=>(t=+t,Number.isFinite(t)?t:e),sd="abcdefghijklmnopqrstuvwxyz",vv="0123456789",bv={DIGIT:vv,ALPHA:sd,ALPHA_DIGIT:sd+sd.toUpperCase()+vv},T3=(t=16,e=bv.ALPHA_DIGIT)=>{let r="";const{length:a}=e;for(;t--;)r+=e[Math.random()*a|0];return r};function A3(t){return!!(t&&Qt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const O3=t=>{const e=new Array(10),r=(a,i)=>{if(ll(a)){if(e.indexOf(a)>=0)return;if(!("toJSON"in a)){e[i]=a;const n=xi(a)?[]:{};return qn(a,(s,o)=>{const u=r(s,i+1);!Fn(u)&&(n[o]=u)}),e[i]=void 0,n}}return a};return r(t,0)},E3=Tr("AsyncFunction"),X={isArray:xi,isArrayBuffer:cv,isBuffer:Zq,isFormData:o3,isArrayBufferView:Xq,isString:e3,isNumber:dv,isBoolean:t3,isObject:ll,isPlainObject:ul,isUndefined:Fn,isDate:r3,isFile:a3,isBlob:i3,isRegExp:x3,isFunction:Qt,isStream:s3,isURLSearchParams:l3,isTypedArray:g3,isFileList:n3,forEach:qn,merge:nd,extend:c3,trim:u3,stripBOM:d3,inherits:p3,toFlatObject:f3,kindOf:sl,kindOfTest:Tr,endsWith:h3,toArray:m3,forEachEntry:v3,matchAll:b3,isHTMLForm:y3,hasOwnProperty:mv,hasOwnProp:mv,reduceDescriptors:gv,freezeMethods:k3,toObjectSet:_3,toCamelCase:S3,noop:w3,toFiniteNumber:C3,findKey:pv,global:fv,isContextDefined:hv,ALPHABET:bv,generateString:T3,isSpecCompliantForm:A3,toJSONObject:O3,isAsyncFn:E3,isThenable:t=>t&&(ll(t)||Qt(t))&&Qt(t.then)&&Qt(t.catch)};function Oe(t,e,r,a,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i)}X.inherits(Oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const yv=Oe.prototype,Sv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Sv[t]={value:t}}),Object.defineProperties(Oe,Sv),Object.defineProperty(yv,"isAxiosError",{value:!0}),Oe.from=(t,e,r,a,i,n)=>{const s=Object.create(yv);return X.toFlatObject(t,s,function(u){return u!==Error.prototype},o=>o!=="isAxiosError"),Oe.call(s,t.message,e,r,a,i),s.cause=t,s.name=t.name,n&&Object.assign(s,n),s};const M3=null;function od(t){return X.isPlainObject(t)||X.isArray(t)}function xv(t){return X.endsWith(t,"[]")?t.slice(0,-2):t}function kv(t,e,r){return t?t.concat(e).map(function(i,n){return i=xv(i),!r&&n?"["+i+"]":i}).join(r?".":""):e}function $3(t){return X.isArray(t)&&!t.some(od)}const P3=X.toFlatObject(X,{},null,function(e){return/^is[A-Z]/.test(e)});function cl(t,e,r){if(!X.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=X.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!X.isUndefined(y[h])});const a=r.metaTokens,i=r.visitor||c,n=r.dots,s=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&X.isSpecCompliantForm(e);if(!X.isFunction(i))throw new TypeError("visitor must be a function");function l(_){if(_===null)return"";if(X.isDate(_))return _.toISOString();if(!u&&X.isBlob(_))throw new Oe("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(_)||X.isTypedArray(_)?u&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function c(_,h,y){let S=_;if(_&&!y&&typeof _=="object"){if(X.endsWith(h,"{}"))h=a?h:h.slice(0,-2),_=JSON.stringify(_);else if(X.isArray(_)&&$3(_)||(X.isFileList(_)||X.endsWith(h,"[]"))&&(S=X.toArray(_)))return h=xv(h),S.forEach(function(b,f){!(X.isUndefined(b)||b===null)&&e.append(s===!0?kv([h],f,n):s===null?h:h+"[]",l(b))}),!1}return od(_)?!0:(e.append(kv(y,h,n),l(_)),!1)}const d=[],p=Object.assign(P3,{defaultVisitor:c,convertValue:l,isVisitable:od});function v(_,h){if(!X.isUndefined(_)){if(d.indexOf(_)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(_),X.forEach(_,function(S,x){(!(X.isUndefined(S)||S===null)&&i.call(e,S,X.isString(x)?x.trim():x,h,p))===!0&&v(S,h?h.concat(x):[x])}),d.pop()}}if(!X.isObject(t))throw new TypeError("data must be an object");return v(t),e}function _v(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(a){return e[a]})}function ld(t,e){this._pairs=[],t&&cl(t,this,e)}const wv=ld.prototype;wv.append=function(e,r){this._pairs.push([e,r])},wv.toString=function(e){const r=e?function(a){return e.call(this,a,_v)}:_v;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function D3(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ud(t,e,r){if(!e)return t;const a=r&&r.encode||D3,i=r&&r.serialize;let n;if(i?n=i(e,r):n=X.isURLSearchParams(e)?e.toString():new ld(e,r).toString(a),n){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+n}return t}class I3{constructor(){this.handlers=[]}use(e,r,a){return this.handlers.push({fulfilled:e,rejected:r,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){X.forEach(this.handlers,function(a){a!==null&&e(a)})}}const Cv=I3,Tv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},z3={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ld,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Av=typeof window<"u"&&typeof document<"u",L3=(t=>Av&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),j3=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Ar={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Av,hasStandardBrowserEnv:L3,hasStandardBrowserWebWorkerEnv:j3},Symbol.toStringTag,{value:"Module"})),...z3};function N3(t,e){return cl(t,new Ar.classes.URLSearchParams,Object.assign({visitor:function(r,a,i,n){return Ar.isNode&&X.isBuffer(r)?(this.append(a,r.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}function R3(t){return X.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function F3(t){const e={},r=Object.keys(t);let a;const i=r.length;let n;for(a=0;a<i;a++)n=r[a],e[n]=t[n];return e}function Ov(t){function e(r,a,i,n){let s=r[n++];if(s==="__proto__")return!0;const o=Number.isFinite(+s),u=n>=r.length;return s=!s&&X.isArray(i)?i.length:s,u?(X.hasOwnProp(i,s)?i[s]=[i[s],a]:i[s]=a,!o):((!i[s]||!X.isObject(i[s]))&&(i[s]=[]),e(r,a,i[s],n)&&X.isArray(i[s])&&(i[s]=F3(i[s])),!o)}if(X.isFormData(t)&&X.isFunction(t.entries)){const r={};return X.forEachEntry(t,(a,i)=>{e(R3(a),i,r,0)}),r}return null}function q3(t,e,r){if(X.isString(t))try{return(e||JSON.parse)(t),X.trim(t)}catch(a){if(a.name!=="SyntaxError")throw a}return(r||JSON.stringify)(t)}const cd={transitional:Tv,adapter:["xhr","http"],transformRequest:[function(e,r){const a=r.getContentType()||"",i=a.indexOf("application/json")>-1,n=X.isObject(e);if(n&&X.isHTMLForm(e)&&(e=new FormData(e)),X.isFormData(e))return i?JSON.stringify(Ov(e)):e;if(X.isArrayBuffer(e)||X.isBuffer(e)||X.isStream(e)||X.isFile(e)||X.isBlob(e))return e;if(X.isArrayBufferView(e))return e.buffer;if(X.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(n){if(a.indexOf("application/x-www-form-urlencoded")>-1)return N3(e,this.formSerializer).toString();if((o=X.isFileList(e))||a.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return cl(o?{"files[]":e}:e,u&&new u,this.formSerializer)}}return n||i?(r.setContentType("application/json",!1),q3(e)):e}],transformResponse:[function(e){const r=this.transitional||cd.transitional,a=r&&r.forcedJSONParsing,i=this.responseType==="json";if(e&&X.isString(e)&&(a&&!this.responseType||i)){const s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?Oe.from(o,Oe.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ar.classes.FormData,Blob:Ar.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};X.forEach(["delete","get","head","post","put","patch"],t=>{cd.headers[t]={}});const dd=cd,B3=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),W3=t=>{const e={};let r,a,i;return t&&t.split(`
262
262
  `).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),a=s.substring(i+1).trim(),!(!r||e[r]&&B3[r])&&(r==="set-cookie"?e[r]?e[r].push(a):e[r]=[a]:e[r]=e[r]?e[r]+", "+a:a)}),e},Ev=Symbol("internals");function Bn(t){return t&&String(t).trim().toLowerCase()}function dl(t){return t===!1||t==null?t:X.isArray(t)?t.map(dl):String(t)}function V3(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=r.exec(t);)e[a[1]]=a[2];return e}const U3=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function pd(t,e,r,a,i){if(X.isFunction(a))return a.call(this,e,r);if(i&&(e=r),!!X.isString(e)){if(X.isString(a))return e.indexOf(a)!==-1;if(X.isRegExp(a))return a.test(e)}}function G3(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,a)=>r.toUpperCase()+a)}function H3(t,e){const r=X.toCamelCase(" "+e);["get","set","has"].forEach(a=>{Object.defineProperty(t,a+r,{value:function(i,n,s){return this[a].call(this,e,i,n,s)},configurable:!0})})}class pl{constructor(e){e&&this.set(e)}set(e,r,a){const i=this;function n(o,u,l){const c=Bn(u);if(!c)throw new Error("header name must be a non-empty string");const d=X.findKey(i,c);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(i[d||u]=dl(o))}const s=(o,u)=>X.forEach(o,(l,c)=>n(l,c,u));return X.isPlainObject(e)||e instanceof this.constructor?s(e,r):X.isString(e)&&(e=e.trim())&&!U3(e)?s(W3(e),r):e!=null&&n(r,e,a),this}get(e,r){if(e=Bn(e),e){const a=X.findKey(this,e);if(a){const i=this[a];if(!r)return i;if(r===!0)return V3(i);if(X.isFunction(r))return r.call(this,i,a);if(X.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Bn(e),e){const a=X.findKey(this,e);return!!(a&&this[a]!==void 0&&(!r||pd(this,this[a],a,r)))}return!1}delete(e,r){const a=this;let i=!1;function n(s){if(s=Bn(s),s){const o=X.findKey(a,s);o&&(!r||pd(a,a[o],o,r))&&(delete a[o],i=!0)}}return X.isArray(e)?e.forEach(n):n(e),i}clear(e){const r=Object.keys(this);let a=r.length,i=!1;for(;a--;){const n=r[a];(!e||pd(this,this[n],n,e,!0))&&(delete this[n],i=!0)}return i}normalize(e){const r=this,a={};return X.forEach(this,(i,n)=>{const s=X.findKey(a,n);if(s){r[s]=dl(i),delete r[n];return}const o=e?G3(n):String(n).trim();o!==n&&delete r[n],r[o]=dl(i),a[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return X.forEach(this,(a,i)=>{a!=null&&a!==!1&&(r[i]=e&&X.isArray(a)?a.join(", "):a)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
263
263
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const a=new this(e);return r.forEach(i=>a.set(i)),a}static accessor(e){const a=(this[Ev]=this[Ev]={accessors:{}}).accessors,i=this.prototype;function n(s){const o=Bn(s);a[o]||(H3(i,s),a[o]=!0)}return X.isArray(e)?e.forEach(n):n(e),this}}pl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(pl.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(a){this[r]=a}}}),X.freezeMethods(pl);const Wr=pl;function fd(t,e){const r=this||dd,a=e||r,i=Wr.from(a.headers);let n=a.data;return X.forEach(t,function(o){n=o.call(r,n,i.normalize(),e?e.status:void 0)}),i.normalize(),n}function Mv(t){return!!(t&&t.__CANCEL__)}function Wn(t,e,r){Oe.call(this,t??"canceled",Oe.ERR_CANCELED,e,r),this.name="CanceledError"}X.inherits(Wn,Oe,{__CANCEL__:!0});function Y3(t,e,r){const a=r.config.validateStatus;!r.status||!a||a(r.status)?t(r):e(new Oe("Request failed with status code "+r.status,[Oe.ERR_BAD_REQUEST,Oe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const Q3=Ar.hasStandardBrowserEnv?{write(t,e,r,a,i,n){const s=[t+"="+encodeURIComponent(e)];X.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),X.isString(a)&&s.push("path="+a),X.isString(i)&&s.push("domain="+i),n===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function K3(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function J3(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function $v(t,e){return t&&!K3(e)?J3(t,e):e}const Z3=Ar.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let a;function i(n){let s=n;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return a=i(window.location.href),function(s){const o=X.isString(s)?i(s):s;return o.protocol===a.protocol&&o.host===a.host}}():function(){return function(){return!0}}();function X3(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function eB(t,e){t=t||10;const r=new Array(t),a=new Array(t);let i=0,n=0,s;return e=e!==void 0?e:1e3,function(u){const l=Date.now(),c=a[n];s||(s=l),r[i]=u,a[i]=l;let d=n,p=0;for(;d!==i;)p+=r[d++],d=d%t;if(i=(i+1)%t,i===n&&(n=(n+1)%t),l-s<e)return;const v=c&&l-c;return v?Math.round(p*1e3/v):void 0}}function Pv(t,e){let r=0;const a=eB(50,250);return i=>{const n=i.loaded,s=i.lengthComputable?i.total:void 0,o=n-r,u=a(o),l=n<=s;r=n;const c={loaded:n,total:s,progress:s?n/s:void 0,bytes:o,rate:u||void 0,estimated:u&&s&&l?(s-n)/u:void 0,event:i};c[e?"download":"upload"]=!0,t(c)}}const hd={http:M3,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,a){let i=t.data;const n=Wr.from(t.headers).normalize();let{responseType:s,withXSRFToken:o}=t,u;function l(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}let c;if(X.isFormData(i)){if(Ar.hasStandardBrowserEnv||Ar.hasStandardBrowserWebWorkerEnv)n.setContentType(!1);else if((c=n.getContentType())!==!1){const[h,...y]=c?c.split(";").map(S=>S.trim()).filter(Boolean):[];n.setContentType([h||"multipart/form-data",...y].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const h=t.auth.username||"",y=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";n.set("Authorization","Basic "+btoa(h+":"+y))}const p=$v(t.baseURL,t.url);d.open(t.method.toUpperCase(),ud(p,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const h=Wr.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),S={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:h,config:t,request:d};Y3(function(b){r(b),l()},function(b){a(b),l()},S),d=null}if("onloadend"in d?d.onloadend=v:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(v)},d.onabort=function(){d&&(a(new Oe("Request aborted",Oe.ECONNABORTED,t,d)),d=null)},d.onerror=function(){a(new Oe("Network Error",Oe.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let y=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const S=t.transitional||Tv;t.timeoutErrorMessage&&(y=t.timeoutErrorMessage),a(new Oe(y,S.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,t,d)),d=null},Ar.hasStandardBrowserEnv&&(o&&X.isFunction(o)&&(o=o(t)),o||o!==!1&&Z3(p))){const h=t.xsrfHeaderName&&t.xsrfCookieName&&Q3.read(t.xsrfCookieName);h&&n.set(t.xsrfHeaderName,h)}i===void 0&&n.setContentType(null),"setRequestHeader"in d&&X.forEach(n.toJSON(),function(y,S){d.setRequestHeader(S,y)}),X.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",Pv(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",Pv(t.onUploadProgress)),(t.cancelToken||t.signal)&&(u=h=>{d&&(a(!h||h.type?new Wn(null,t,d):h),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(u),t.signal&&(t.signal.aborted?u():t.signal.addEventListener("abort",u)));const _=X3(p);if(_&&Ar.protocols.indexOf(_)===-1){a(new Oe("Unsupported protocol "+_+":",Oe.ERR_BAD_REQUEST,t));return}d.send(i||null)})}};X.forEach(hd,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Dv=t=>`- ${t}`,tB=t=>X.isFunction(t)||t===null||t===!1,Iv={getAdapter:t=>{t=X.isArray(t)?t:[t];const{length:e}=t;let r,a;const i={};for(let n=0;n<e;n++){r=t[n];let s;if(a=r,!tB(r)&&(a=hd[(s=String(r)).toLowerCase()],a===void 0))throw new Oe(`Unknown adapter '${s}'`);if(a)break;i[s||"#"+n]=a}if(!a){const n=Object.entries(i).map(([o,u])=>`adapter ${o} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=e?n.length>1?`since :
@@ -265,7 +265,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
265
265
  `):" "+Dv(n[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return a},adapters:hd};function md(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Wn(null,t)}function zv(t){return md(t),t.headers=Wr.from(t.headers),t.data=fd.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Iv.getAdapter(t.adapter||dd.adapter)(t).then(function(a){return md(t),a.data=fd.call(t,t.transformResponse,a),a.headers=Wr.from(a.headers),a},function(a){return Mv(a)||(md(t),a&&a.response&&(a.response.data=fd.call(t,t.transformResponse,a.response),a.response.headers=Wr.from(a.response.headers))),Promise.reject(a)})}const Lv=t=>t instanceof Wr?t.toJSON():t;function ki(t,e){e=e||{};const r={};function a(l,c,d){return X.isPlainObject(l)&&X.isPlainObject(c)?X.merge.call({caseless:d},l,c):X.isPlainObject(c)?X.merge({},c):X.isArray(c)?c.slice():c}function i(l,c,d){if(X.isUndefined(c)){if(!X.isUndefined(l))return a(void 0,l,d)}else return a(l,c,d)}function n(l,c){if(!X.isUndefined(c))return a(void 0,c)}function s(l,c){if(X.isUndefined(c)){if(!X.isUndefined(l))return a(void 0,l)}else return a(void 0,c)}function o(l,c,d){if(d in e)return a(l,c);if(d in t)return a(void 0,l)}const u={url:n,method:n,data:n,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(l,c)=>i(Lv(l),Lv(c),!0)};return X.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=u[c]||i,p=d(t[c],e[c],c);X.isUndefined(p)&&d!==o||(r[c]=p)}),r}const jv="1.6.7",gd={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{gd[t]=function(a){return typeof a===t||"a"+(e<1?"n ":" ")+t}});const Nv={};gd.transitional=function(e,r,a){function i(n,s){return"[Axios v"+jv+"] Transitional option '"+n+"'"+s+(a?". "+a:"")}return(n,s,o)=>{if(e===!1)throw new Oe(i(s," has been removed"+(r?" in "+r:"")),Oe.ERR_DEPRECATED);return r&&!Nv[s]&&(Nv[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(n,s,o):!0}};function rB(t,e,r){if(typeof t!="object")throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);const a=Object.keys(t);let i=a.length;for(;i-- >0;){const n=a[i],s=e[n];if(s){const o=t[n],u=o===void 0||s(o,n,t);if(u!==!0)throw new Oe("option "+n+" must be "+u,Oe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Oe("Unknown option "+n,Oe.ERR_BAD_OPTION)}}const vd={assertOptions:rB,validators:gd},ca=vd.validators;class fl{constructor(e){this.defaults=e,this.interceptors={request:new Cv,response:new Cv}}async request(e,r){try{return await this._request(e,r)}catch(a){if(a instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const n=i.stack?i.stack.replace(/^.+\n/,""):"";a.stack?n&&!String(a.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(a.stack+=`
266
266
  `+n):a.stack=n}throw a}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=ki(this.defaults,r);const{transitional:a,paramsSerializer:i,headers:n}=r;a!==void 0&&vd.assertOptions(a,{silentJSONParsing:ca.transitional(ca.boolean),forcedJSONParsing:ca.transitional(ca.boolean),clarifyTimeoutError:ca.transitional(ca.boolean)},!1),i!=null&&(X.isFunction(i)?r.paramsSerializer={serialize:i}:vd.assertOptions(i,{encode:ca.function,serialize:ca.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=n&&X.merge(n.common,n[r.method]);n&&X.forEach(["delete","get","head","post","put","patch","common"],_=>{delete n[_]}),r.headers=Wr.concat(s,n);const o=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(u=u&&h.synchronous,o.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let c,d=0,p;if(!u){const _=[zv.bind(this),void 0];for(_.unshift.apply(_,o),_.push.apply(_,l),p=_.length,c=Promise.resolve(r);d<p;)c=c.then(_[d++],_[d++]);return c}p=o.length;let v=r;for(d=0;d<p;){const _=o[d++],h=o[d++];try{v=_(v)}catch(y){h.call(this,y);break}}try{c=zv.call(this,v)}catch(_){return Promise.reject(_)}for(d=0,p=l.length;d<p;)c=c.then(l[d++],l[d++]);return c}getUri(e){e=ki(this.defaults,e);const r=$v(e.baseURL,e.url);return ud(r,e.params,e.paramsSerializer)}}X.forEach(["delete","get","head","options"],function(e){fl.prototype[e]=function(r,a){return this.request(ki(a||{},{method:e,url:r,data:(a||{}).data}))}}),X.forEach(["post","put","patch"],function(e){function r(a){return function(n,s,o){return this.request(ki(o||{},{method:e,headers:a?{"Content-Type":"multipart/form-data"}:{},url:n,data:s}))}}fl.prototype[e]=r(),fl.prototype[e+"Form"]=r(!0)});const hl=fl;class bd{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(n){r=n});const a=this;this.promise.then(i=>{if(!a._listeners)return;let n=a._listeners.length;for(;n-- >0;)a._listeners[n](i);a._listeners=null}),this.promise.then=i=>{let n;const s=new Promise(o=>{a.subscribe(o),n=o}).then(i);return s.cancel=function(){a.unsubscribe(n)},s},e(function(n,s,o){a.reason||(a.reason=new Wn(n,s,o),r(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new bd(function(i){e=i}),cancel:e}}}const aB=bd;function iB(t){return function(r){return t.apply(null,r)}}function nB(t){return X.isObject(t)&&t.isAxiosError===!0}const yd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yd).forEach(([t,e])=>{yd[e]=t});const sB=yd;function Rv(t){const e=new hl(t),r=uv(hl.prototype.request,e);return X.extend(r,hl.prototype,e,{allOwnKeys:!0}),X.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return Rv(ki(t,i))},r}const tt=Rv(dd);tt.Axios=hl,tt.CanceledError=Wn,tt.CancelToken=aB,tt.isCancel=Mv,tt.VERSION=jv,tt.toFormData=cl,tt.AxiosError=Oe,tt.Cancel=tt.CanceledError,tt.all=function(e){return Promise.all(e)},tt.spread=iB,tt.isAxiosError=nB,tt.mergeConfig=ki,tt.AxiosHeaders=Wr,tt.formToJSON=t=>Ov(X.isHTMLForm(t)?new FormData(t):t),tt.getAdapter=Iv.getAdapter,tt.HttpStatusCode=sB,tt.default=tt;const Vn=tt,Un=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ml=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new Fv}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},oB=typeof AbortSignal=="function",lB=typeof ml.AbortSignal=="function",Fv=oB?AbortSignal:lB?ml.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(r=>r(e),this))}onabort(){}addEventListener(e,r){e==="abort"&&this._listeners.push(r)}removeEventListener(e,r){e==="abort"&&(this._listeners=this._listeners.filter(a=>a!==r))}},Sd=new Set,xd=(t,e)=>{const r=`LRU_CACHE_OPTION_${t}`;gl(r)&&_d(r,`${t} option`,`options.${e}`,bl)},kd=(t,e)=>{const r=`LRU_CACHE_METHOD_${t}`;if(gl(r)){const{prototype:a}=bl,{get:i}=Object.getOwnPropertyDescriptor(a,t);_d(r,`${t} method`,`cache.${e}()`,i)}},uB=(t,e)=>{const r=`LRU_CACHE_PROPERTY_${t}`;if(gl(r)){const{prototype:a}=bl,{get:i}=Object.getOwnPropertyDescriptor(a,t);_d(r,`${t} property`,`cache.${e}`,i)}},qv=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},gl=t=>!Sd.has(t),_d=(t,e,r,a)=>{Sd.add(t);const i=`The ${e} is deprecated. Please use ${r} instead.`;qv(i,"DeprecationWarning",t,a)},da=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Bv=t=>da(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?vl:null:null;let vl=class extends Array{constructor(e){super(e),this.fill(0)}},cB=class{constructor(e){if(e===0)return[];const r=Bv(e);this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},bl=class pf{constructor(e={}){const{max:r=0,ttl:a,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:s,updateAgeOnHas:o,allowStale:u,dispose:l,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:p,maxSize:v=0,maxEntrySize:_=0,sizeCalculation:h,fetchMethod:y,fetchContext:S,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:k,ignoreFetchAbort:g}=e,{length:m,maxAge:w,stale:O}=e instanceof pf?{}:e;if(r!==0&&!da(r))throw new TypeError("max option must be a nonnegative integer");const C=r?Bv(r):Array;if(!C)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=v,this.maxEntrySize=_||this.maxSize,this.sizeCalculation=h||m,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=y||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=S,!this.fetchMethod&&S!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new C(r),this.prev=new C(r),this.head=0,this.tail=0,this.free=new cB(r),this.initialFill=1,this.size=0,typeof l=="function"&&(this.dispose=l),typeof c=="function"?(this.disposeAfter=c,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!f,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!g,this.maxEntrySize!==0){if(this.maxSize!==0&&!da(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!da(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!O,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!o,this.ttlResolution=da(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=a||w||0,this.ttl){if(!da(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const M="LRU_CACHE_UNBOUNDED";gl(M)&&(Sd.add(M),qv("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",M,pf))}O&&xd("stale","allowStale"),w&&xd("maxAge","ttl"),m&&xd("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new vl(this.max),this.starts=new vl(this.max),this.setItemTTL=(a,i,n=Un.now())=>{if(this.starts[a]=i!==0?n:0,this.ttls[a]=i,i!==0&&this.ttlAutopurge){const s=setTimeout(()=>{this.isStale(a)&&this.delete(this.keyList[a])},i+1);s.unref&&s.unref()}},this.updateItemAge=a=>{this.starts[a]=this.ttls[a]!==0?Un.now():0},this.statusTTL=(a,i)=>{a&&(a.ttl=this.ttls[i],a.start=this.starts[i],a.now=e||r(),a.remainingTTL=a.now+a.ttl-a.start)};let e=0;const r=()=>{const a=Un.now();if(this.ttlResolution>0){e=a;const i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return a};this.getRemainingTTL=a=>{const i=this.keyMap.get(a);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||r())},this.isStale=a=>this.ttls[a]!==0&&this.starts[a]!==0&&(e||r())-this.starts[a]>this.ttls[a]}updateItemAge(e){}statusTTL(e,r){}setItemTTL(e,r,a){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new vl(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,r,a,i)=>{if(this.isBackgroundFetch(r))return 0;if(!da(a))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(a=i(r,e),!da(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a},this.addItemSize=(e,r,a)=>{if(this.sizes[e]=r,this.maxSize){const i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e],a&&(a.entrySize=r,a.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,r){}requireSize(e,r,a,i){if(a||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(const e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(const e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(const e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(const e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(const e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,r){for(const a of this.indexes()){const i=this.valList[a],n=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,this.keyList[a],this))return this.get(this.keyList[a],r)}}forEach(e,r=this){for(const a of this.indexes()){const i=this.valList[a],n=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.keyList[a],this)}}rforEach(e,r=this){for(const a of this.rindexes()){const i=this.valList[a],n=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.keyList[a],this)}}get prune(){return kd("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),e=!0);return e}dump(){const e=[];for(const r of this.indexes({allowStale:!0})){const a=this.keyList[r],i=this.valList[r],n=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(n===void 0)continue;const s={value:n};if(this.ttls){s.ttl=this.ttls[r];const o=Un.now()-this.starts[r];s.start=Math.floor(Date.now()-o)}this.sizes&&(s.size=this.sizes[r]),e.unshift([a,s])}return e}load(e){this.clear();for(const[r,a]of e){if(a.start){const i=Date.now()-a.start;a.start=Un.now()-i}this.set(r,a.value,a)}}dispose(e,r,a){}set(e,r,{ttl:a=this.ttl,start:i,noDisposeOnSet:n=this.noDisposeOnSet,size:s=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,status:l}={}){if(s=this.requireSize(e,r,s,o),this.maxEntrySize&&s>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let c=this.size===0?void 0:this.keyMap.get(e);if(c===void 0)c=this.newIndex(),this.keyList[c]=e,this.valList[c]=r,this.keyMap.set(e,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,s,l),l&&(l.set="add"),u=!1;else{this.moveToTail(c);const d=this.valList[c];if(r!==d){if(this.isBackgroundFetch(d)?d.__abortController.abort(new Error("replaced")):n||(this.dispose(d,e,"set"),this.disposeAfter&&this.disposed.push([d,e,"set"])),this.removeItemSize(c),this.valList[c]=r,this.addItemSize(c,s,l),l){l.set="replace";const p=d&&this.isBackgroundFetch(d)?d.__staleWhileFetching:d;p!==void 0&&(l.oldValue=p)}}else l&&(l.set="update")}if(a!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(c,a,i),this.statusTTL(l,c),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const r=this.head,a=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort(new Error("evicted")):(this.dispose(i,a,"evict"),this.disposeAfter&&this.disposed.push([i,a,"evict"])),this.removeItemSize(r),e&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(a),this.size--,r}has(e,{updateAgeOnHas:r=this.updateAgeOnHas,status:a}={}){const i=this.keyMap.get(e);if(i!==void 0)if(this.isStale(i))a&&(a.has="stale",this.statusTTL(a,i));else return r&&this.updateItemAge(i),a&&(a.has="hit"),this.statusTTL(a,i),!0;else a&&(a.has="miss");return!1}peek(e,{allowStale:r=this.allowStale}={}){const a=this.keyMap.get(e);if(a!==void 0&&(r||!this.isStale(a))){const i=this.valList[a];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(e,r,a,i){const n=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(n))return n;const s=new ml;a.signal&&a.signal.addEventListener("abort",()=>s.abort(a.signal.reason));const o={signal:s.signal,options:a,context:i},u=(v,_=!1)=>{const{aborted:h}=s.signal,y=a.ignoreFetchAbort&&v!==void 0;return a.status&&(h&&!_?(a.status.fetchAborted=!0,a.status.fetchError=s.signal.reason,y&&(a.status.fetchAbortIgnored=!0)):a.status.fetchResolved=!0),h&&!y&&!_?c(s.signal.reason):(this.valList[r]===p&&(v===void 0?p.__staleWhileFetching?this.valList[r]=p.__staleWhileFetching:this.delete(e):(a.status&&(a.status.fetchUpdated=!0),this.set(e,v,o.options))),v)},l=v=>(a.status&&(a.status.fetchRejected=!0,a.status.fetchError=v),c(v)),c=v=>{const{aborted:_}=s.signal,h=_&&a.allowStaleOnFetchAbort,y=h||a.allowStaleOnFetchRejection,S=y||a.noDeleteOnFetchRejection;if(this.valList[r]===p&&(!S||p.__staleWhileFetching===void 0?this.delete(e):h||(this.valList[r]=p.__staleWhileFetching)),y)return a.status&&p.__staleWhileFetching!==void 0&&(a.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw v},d=(v,_)=>{this.fetchMethod(e,n,o).then(h=>v(h),_),s.signal.addEventListener("abort",()=>{(!a.ignoreFetchAbort||a.allowStaleOnFetchAbort)&&(v(),a.allowStaleOnFetchAbort&&(v=h=>u(h,!0)))})};a.status&&(a.status.fetchDispatched=!0);const p=new Promise(d).then(u,l);return p.__abortController=s,p.__staleWhileFetching=n,p.__returned=null,r===void 0?(this.set(e,p,{...o.options,status:void 0}),r=this.keyMap.get(e)):this.valList[r]=p,p}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:r=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:v=this.allowStaleOnFetchAbort,fetchContext:_=this.fetchContext,forceRefresh:h=!1,status:y,signal:S}={}){if(!this.fetchMethod)return y&&(y.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:a,noDeleteOnStaleGet:i,status:y});const x={allowStale:r,updateAgeOnGet:a,noDeleteOnStaleGet:i,ttl:n,noDisposeOnSet:s,size:o,sizeCalculation:u,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:v,ignoreFetchAbort:p,status:y,signal:S};let b=this.keyMap.get(e);if(b===void 0){y&&(y.fetch="miss");const f=this.backgroundFetch(e,b,x,_);return f.__returned=f}else{const f=this.valList[b];if(this.isBackgroundFetch(f)){const O=r&&f.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",O&&(y.returnedStale=!0)),O?f.__staleWhileFetching:f.__returned=f}const k=this.isStale(b);if(!h&&!k)return y&&(y.fetch="hit"),this.moveToTail(b),a&&this.updateItemAge(b),this.statusTTL(y,b),f;const g=this.backgroundFetch(e,b,x,_),m=g.__staleWhileFetching!==void 0,w=m&&r;return y&&(y.fetch=m&&k?"stale":"refresh",w&&k&&(y.returnedStale=!0)),w?g.__staleWhileFetching:g.__returned=g}}get(e,{allowStale:r=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:n}={}){const s=this.keyMap.get(e);if(s!==void 0){const o=this.valList[s],u=this.isBackgroundFetch(o);return this.statusTTL(n,s),this.isStale(s)?(n&&(n.get="stale"),u?(n&&(n.returnedStale=r&&o.__staleWhileFetching!==void 0),r?o.__staleWhileFetching:void 0):(i||this.delete(e),n&&(n.returnedStale=r),r?o:void 0)):(n&&(n.get="hit"),u?o.__staleWhileFetching:(this.moveToTail(s),a&&this.updateItemAge(s),o))}else n&&(n.get="miss")}connect(e,r){this.prev[r]=e,this.next[e]=r}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return kd("del","delete"),this.delete}delete(e){let r=!1;if(this.size!==0){const a=this.keyMap.get(e);if(a!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(a);const i=this.valList[a];this.isBackgroundFetch(i)?i.__abortController.abort(new Error("deleted")):(this.dispose(i,e,"delete"),this.disposeAfter&&this.disposed.push([i,e,"delete"])),this.keyMap.delete(e),this.keyList[a]=null,this.valList[a]=null,a===this.tail?this.tail=this.prev[a]:a===this.head?this.head=this.next[a]:(this.next[this.prev[a]]=this.next[a],this.prev[this.next[a]]=this.prev[a]),this.size--,this.free.push(a)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(const e of this.rindexes({allowStale:!0})){const r=this.valList[e];if(this.isBackgroundFetch(r))r.__abortController.abort(new Error("deleted"));else{const a=this.keyList[e];this.dispose(r,a,"delete"),this.disposeAfter&&this.disposed.push([r,a,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return kd("reset","clear"),this.clear}get length(){return uB("length","size"),this.size}static get AbortController(){return ml}static get AbortSignal(){return Fv}};const dB=bl;function pB(t,e,r,a){function i(n){return n instanceof r?n:new r(function(s){s(n)})}return new(r||(r=Promise))(function(n,s){function o(c){try{l(a.next(c))}catch(d){s(d)}}function u(c){try{l(a.throw(c))}catch(d){s(d)}}function l(c){c.done?n(c.value):i(c.value).then(o,u)}l((a=a.apply(t,e||[])).next())})}function fB(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,i,n,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(l){return function(c){return u([l,c])}}function u(l){if(a)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(r=0)),r;)try{if(a=1,i&&(n=l[0]&2?i.return:l[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,l[1])).done)return n;switch(i=0,n&&(l=[l[0]&2,n.value]),l[0]){case 0:case 1:n=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(n=r.trys,!(n=n.length>0&&n[n.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!n||l[1]>n[0]&&l[1]<n[3])){r.label=l[1];break}if(l[0]===6&&r.label<n[1]){r.label=n[1],n=l;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(l);break}n[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(c){l=[6,c],i=0}finally{a=n=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;function hB(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ud.apply(void 0,t),a=r.split("?"),i=a[0],n=a[1];if(n){var s=n.split("&");return"".concat(i,"?").concat(s.sort().join("&"))}return r}function mB(t){return typeof t.get=="function"&&typeof t.set=="function"&&(typeof t.delete=="function"||typeof t.del=="function")}var gB=1e3*60*5,vB=100;function Wv(t,e){var r=this;e===void 0&&(e={});var a=e.enabledByDefault,i=a===void 0?!0:a,n=e.cacheFlag,s=n===void 0?"cache":n,o=e.defaultCache,u=o===void 0?new dB({ttl:gB,max:vB}):o;return function(l){var c=l.url,d=l.method,p=l.params,v=l.paramsSerializer,_=l.forceUpdate,h=l[s]!==void 0&&l[s]!==null?l[s]:i;if(d==="get"&&h){var y=mB(h)?h:u,S=hB(c,p,v),x=y.get(S);return!x||_?(x=function(){return pB(r,void 0,void 0,function(){var b;return fB(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,t(l)];case 1:return[2,f.sent()];case 2:throw b=f.sent(),"delete"in y?y.delete(S):y.del(S),b;case 3:return[2]}})})}(),y.set(S,x),x):({}.LOGGER_LEVEL==="info"&&console.info("[axios-extensions] request cached by cache adapter --> url: ".concat(S)),x)}return t(l)}}const _i=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Vv=new Set,wd=typeof process=="object"&&process?process:{},Uv=(t,e,r,a)=>{typeof wd.emitWarning=="function"?wd.emitWarning(t,e,r,a):console.error(`[${r}] ${e}: ${t}`)};let yl=globalThis.AbortController,Gv=globalThis.AbortSignal;if(typeof yl>"u"){Gv=class{constructor(){se(this,"onabort");se(this,"_onabort",[]);se(this,"reason");se(this,"aborted",!1)}addEventListener(a,i){this._onabort.push(i)}},yl=class{constructor(){se(this,"signal",new Gv);e()}abort(a){var i,n;if(!this.signal.aborted){this.signal.reason=a,this.signal.aborted=!0;for(const s of this.signal._onabort)s(a);(n=(i=this.signal).onabort)==null||n.call(i,a)}}};let t=((uk=wd.env)==null?void 0:uk.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Uv("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const bB=t=>!Vv.has(t),pa=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Hv=t=>pa(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Sl:null:null;class Sl extends Array{constructor(e){super(e),this.fill(0)}}const Ka=class Ka{constructor(e,r){se(this,"heap");se(this,"length");if(!V(Ka,Qi))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=Hv(e);if(!r)return[];ge(Ka,Qi,!0);const a=new Ka(e,r);return ge(Ka,Qi,!1),a}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Qi=new WeakMap,we(Ka,Qi,!1);let Cd=Ka;const of=class of{constructor(e){we(this,Os);we(this,Su);we(this,Pr);we(this,Dr);we(this,$s);we(this,Zi);we(this,Xi);we(this,ze);we(this,Ps);we(this,Xa);we(this,pr,void 0);we(this,Ft,void 0);we(this,fr,void 0);we(this,hr,void 0);we(this,Ki,void 0);se(this,"ttl");se(this,"ttlResolution");se(this,"ttlAutopurge");se(this,"updateAgeOnGet");se(this,"updateAgeOnHas");se(this,"allowStale");se(this,"noDisposeOnSet");se(this,"noUpdateTTL");se(this,"maxEntrySize");se(this,"sizeCalculation");se(this,"noDeleteOnFetchRejection");se(this,"noDeleteOnStaleGet");se(this,"allowStaleOnFetchAbort");se(this,"allowStaleOnFetchRejection");se(this,"ignoreFetchAbort");we(this,nt,void 0);we(this,mr,void 0);we(this,at,void 0);we(this,Be,void 0);we(this,ke,void 0);we(this,xt,void 0);we(this,qt,void 0);we(this,gt,void 0);we(this,st,void 0);we(this,gr,void 0);we(this,ot,void 0);we(this,vr,void 0);we(this,br,void 0);we(this,Bt,void 0);we(this,yr,void 0);we(this,Sa,void 0);we(this,kt,void 0);we(this,Ja,()=>{});we(this,ra,()=>{});we(this,Es,()=>{});we(this,Wt,()=>!1);we(this,Za,e=>{});we(this,Ji,(e,r,a)=>{});we(this,Ms,(e,r,a,i)=>{if(a||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:r=0,ttl:a,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:s,updateAgeOnHas:o,allowStale:u,dispose:l,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:p,maxSize:v=0,maxEntrySize:_=0,sizeCalculation:h,fetchMethod:y,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:f,ignoreFetchAbort:k}=e;if(r!==0&&!pa(r))throw new TypeError("max option must be a nonnegative integer");const g=r?Hv(r):Array;if(!g)throw new Error("invalid max value: "+r);if(ge(this,pr,r),ge(this,Ft,v),this.maxEntrySize=_||V(this,Ft),this.sizeCalculation=h,this.sizeCalculation){if(!V(this,Ft)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(ge(this,Ki,y),ge(this,Sa,!!y),ge(this,at,new Map),ge(this,Be,new Array(r).fill(void 0)),ge(this,ke,new Array(r).fill(void 0)),ge(this,xt,new g(r)),ge(this,qt,new g(r)),ge(this,gt,0),ge(this,st,0),ge(this,gr,Cd.create(r)),ge(this,nt,0),ge(this,mr,0),typeof l=="function"&&ge(this,fr,l),typeof c=="function"?(ge(this,hr,c),ge(this,ot,[])):(ge(this,hr,void 0),ge(this,ot,void 0)),ge(this,yr,!!V(this,fr)),ge(this,kt,!!V(this,hr)),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!f,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(V(this,Ft)!==0&&!pa(V(this,Ft)))throw new TypeError("maxSize must be a positive integer if specified");if(!pa(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");fe(this,Su,pk).call(this)}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!o,this.ttlResolution=pa(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=a||0,this.ttl){if(!pa(this.ttl))throw new TypeError("ttl must be a positive integer if specified");fe(this,Os,ff).call(this)}if(V(this,pr)===0&&this.ttl===0&&V(this,Ft)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!V(this,pr)&&!V(this,Ft)){const m="LRU_CACHE_UNBOUNDED";bB(m)&&(Vv.add(m),Uv("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",m,of))}}static unsafeExposeInternals(e){return{starts:V(e,br),ttls:V(e,Bt),sizes:V(e,vr),keyMap:V(e,at),keyList:V(e,Be),valList:V(e,ke),next:V(e,xt),prev:V(e,qt),get head(){return V(e,gt)},get tail(){return V(e,st)},free:V(e,gr),isBackgroundFetch:r=>{var a;return fe(a=e,ze,We).call(a,r)},backgroundFetch:(r,a,i,n)=>{var s;return fe(s=e,Xi,Cu).call(s,r,a,i,n)},moveToTail:r=>{var a;return fe(a=e,Xa,Is).call(a,r)},indexes:r=>{var a;return fe(a=e,Pr,xa).call(a,r)},rindexes:r=>{var a;return fe(a=e,Dr,ka).call(a,r)},isStale:r=>{var a;return V(a=e,Wt).call(a,r)}}}get max(){return V(this,pr)}get maxSize(){return V(this,Ft)}get calculatedSize(){return V(this,mr)}get size(){return V(this,nt)}get fetchMethod(){return V(this,Ki)}get dispose(){return V(this,fr)}get disposeAfter(){return V(this,hr)}getRemainingTTL(e){return V(this,at).has(e)?1/0:0}*entries(){for(const e of fe(this,Pr,xa).call(this))V(this,ke)[e]!==void 0&&V(this,Be)[e]!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield[V(this,Be)[e],V(this,ke)[e]])}*rentries(){for(const e of fe(this,Dr,ka).call(this))V(this,ke)[e]!==void 0&&V(this,Be)[e]!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield[V(this,Be)[e],V(this,ke)[e]])}*keys(){for(const e of fe(this,Pr,xa).call(this)){const r=V(this,Be)[e];r!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield r)}}*rkeys(){for(const e of fe(this,Dr,ka).call(this)){const r=V(this,Be)[e];r!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield r)}}*values(){for(const e of fe(this,Pr,xa).call(this))V(this,ke)[e]!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield V(this,ke)[e])}*rvalues(){for(const e of fe(this,Dr,ka).call(this))V(this,ke)[e]!==void 0&&!fe(this,ze,We).call(this,V(this,ke)[e])&&(yield V(this,ke)[e])}[Symbol.iterator](){return this.entries()}find(e,r={}){for(const a of fe(this,Pr,xa).call(this)){const i=V(this,ke)[a],n=fe(this,ze,We).call(this,i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,V(this,Be)[a],this))return this.get(V(this,Be)[a],r)}}forEach(e,r=this){for(const a of fe(this,Pr,xa).call(this)){const i=V(this,ke)[a],n=fe(this,ze,We).call(this,i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,V(this,Be)[a],this)}}rforEach(e,r=this){for(const a of fe(this,Dr,ka).call(this)){const i=V(this,ke)[a],n=fe(this,ze,We).call(this,i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,V(this,Be)[a],this)}}purgeStale(){let e=!1;for(const r of fe(this,Dr,ka).call(this,{allowStale:!0}))V(this,Wt).call(this,r)&&(this.delete(V(this,Be)[r]),e=!0);return e}info(e){const r=V(this,at).get(e);if(r===void 0)return;const a=V(this,ke)[r],i=fe(this,ze,We).call(this,a)?a.__staleWhileFetching:a;if(i===void 0)return;const n={value:i};if(V(this,Bt)&&V(this,br)){const s=V(this,Bt)[r],o=V(this,br)[r];if(s&&o){const u=s-(_i.now()-o);n.ttl=u,n.start=Date.now()}}return V(this,vr)&&(n.size=V(this,vr)[r]),n}dump(){const e=[];for(const r of fe(this,Pr,xa).call(this,{allowStale:!0})){const a=V(this,Be)[r],i=V(this,ke)[r],n=fe(this,ze,We).call(this,i)?i.__staleWhileFetching:i;if(n===void 0||a===void 0)continue;const s={value:n};if(V(this,Bt)&&V(this,br)){s.ttl=V(this,Bt)[r];const o=_i.now()-V(this,br)[r];s.start=Math.floor(Date.now()-o)}V(this,vr)&&(s.size=V(this,vr)[r]),e.unshift([a,s])}return e}load(e){this.clear();for(const[r,a]of e){if(a.start){const i=Date.now()-a.start;a.start=_i.now()-i}this.set(r,a.value,a)}}set(e,r,a={}){var p,v,_,h,y;if(r===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:n,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:u}=a;let{noUpdateTTL:l=this.noUpdateTTL}=a;const c=V(this,Ms).call(this,e,r,a.size||0,o);if(this.maxEntrySize&&c>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.delete(e),this;let d=V(this,nt)===0?void 0:V(this,at).get(e);if(d===void 0)d=V(this,nt)===0?V(this,st):V(this,gr).length!==0?V(this,gr).pop():V(this,nt)===V(this,pr)?fe(this,Zi,wu).call(this,!1):V(this,nt),V(this,Be)[d]=e,V(this,ke)[d]=r,V(this,at).set(e,d),V(this,xt)[V(this,st)]=d,V(this,qt)[d]=V(this,st),ge(this,st,d),_u(this,nt)._++,V(this,Ji).call(this,d,c,u),u&&(u.set="add"),l=!1;else{fe(this,Xa,Is).call(this,d);const S=V(this,ke)[d];if(r!==S){if(V(this,Sa)&&fe(this,ze,We).call(this,S)){S.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:x}=S;x!==void 0&&!s&&(V(this,yr)&&((p=V(this,fr))==null||p.call(this,x,e,"set")),V(this,kt)&&((v=V(this,ot))==null||v.push([x,e,"set"])))}else s||(V(this,yr)&&((_=V(this,fr))==null||_.call(this,S,e,"set")),V(this,kt)&&((h=V(this,ot))==null||h.push([S,e,"set"])));if(V(this,Za).call(this,d),V(this,Ji).call(this,d,c,u),V(this,ke)[d]=r,u){u.set="replace";const x=S&&fe(this,ze,We).call(this,S)?S.__staleWhileFetching:S;x!==void 0&&(u.oldValue=x)}}else u&&(u.set="update")}if(i!==0&&!V(this,Bt)&&fe(this,Os,ff).call(this),V(this,Bt)&&(l||V(this,Es).call(this,d,i,n),u&&V(this,ra).call(this,u,d)),!s&&V(this,kt)&&V(this,ot)){const S=V(this,ot);let x;for(;x=S==null?void 0:S.shift();)(y=V(this,hr))==null||y.call(this,...x)}return this}pop(){var e;try{for(;V(this,nt);){const r=V(this,ke)[V(this,gt)];if(fe(this,Zi,wu).call(this,!0),fe(this,ze,We).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(V(this,kt)&&V(this,ot)){const r=V(this,ot);let a;for(;a=r==null?void 0:r.shift();)(e=V(this,hr))==null||e.call(this,...a)}}}has(e,r={}){const{updateAgeOnHas:a=this.updateAgeOnHas,status:i}=r,n=V(this,at).get(e);if(n!==void 0){const s=V(this,ke)[n];if(fe(this,ze,We).call(this,s)&&s.__staleWhileFetching===void 0)return!1;if(V(this,Wt).call(this,n))i&&(i.has="stale",V(this,ra).call(this,i,n));else return a&&V(this,Ja).call(this,n),i&&(i.has="hit",V(this,ra).call(this,i,n)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){const{allowStale:a=this.allowStale}=r,i=V(this,at).get(e);if(i===void 0||!a&&V(this,Wt).call(this,i))return;const n=V(this,ke)[i];return fe(this,ze,We).call(this,n)?n.__staleWhileFetching:n}async fetch(e,r={}){const{allowStale:a=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:u=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:h,forceRefresh:y=!1,status:S,signal:x}=r;if(!V(this,Sa))return S&&(S.fetch="get"),this.get(e,{allowStale:a,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:S});const b={allowStale:a,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:s,noDisposeOnSet:o,size:u,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:_,ignoreFetchAbort:v,status:S,signal:x};let f=V(this,at).get(e);if(f===void 0){S&&(S.fetch="miss");const k=fe(this,Xi,Cu).call(this,e,f,b,h);return k.__returned=k}else{const k=V(this,ke)[f];if(fe(this,ze,We).call(this,k)){const C=a&&k.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",C&&(S.returnedStale=!0)),C?k.__staleWhileFetching:k.__returned=k}const g=V(this,Wt).call(this,f);if(!y&&!g)return S&&(S.fetch="hit"),fe(this,Xa,Is).call(this,f),i&&V(this,Ja).call(this,f),S&&V(this,ra).call(this,S,f),k;const m=fe(this,Xi,Cu).call(this,e,f,b,h),O=m.__staleWhileFetching!==void 0&&a;return S&&(S.fetch=g?"stale":"refresh",O&&g&&(S.returnedStale=!0)),O?m.__staleWhileFetching:m.__returned=m}}get(e,r={}){const{allowStale:a=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:s}=r,o=V(this,at).get(e);if(o!==void 0){const u=V(this,ke)[o],l=fe(this,ze,We).call(this,u);return s&&V(this,ra).call(this,s,o),V(this,Wt).call(this,o)?(s&&(s.get="stale"),l?(s&&a&&u.__staleWhileFetching!==void 0&&(s.returnedStale=!0),a?u.__staleWhileFetching:void 0):(n||this.delete(e),s&&a&&(s.returnedStale=!0),a?u:void 0)):(s&&(s.get="hit"),l?u.__staleWhileFetching:(fe(this,Xa,Is).call(this,o),i&&V(this,Ja).call(this,o),u))}else s&&(s.get="miss")}delete(e){var a,i,n,s;let r=!1;if(V(this,nt)!==0){const o=V(this,at).get(e);if(o!==void 0)if(r=!0,V(this,nt)===1)this.clear();else{V(this,Za).call(this,o);const u=V(this,ke)[o];if(fe(this,ze,We).call(this,u)?u.__abortController.abort(new Error("deleted")):(V(this,yr)||V(this,kt))&&(V(this,yr)&&((a=V(this,fr))==null||a.call(this,u,e,"delete")),V(this,kt)&&((i=V(this,ot))==null||i.push([u,e,"delete"]))),V(this,at).delete(e),V(this,Be)[o]=void 0,V(this,ke)[o]=void 0,o===V(this,st))ge(this,st,V(this,qt)[o]);else if(o===V(this,gt))ge(this,gt,V(this,xt)[o]);else{const l=V(this,qt)[o];V(this,xt)[l]=V(this,xt)[o];const c=V(this,xt)[o];V(this,qt)[c]=V(this,qt)[o]}_u(this,nt)._--,V(this,gr).push(o)}}if(V(this,kt)&&((n=V(this,ot))!=null&&n.length)){const o=V(this,ot);let u;for(;u=o==null?void 0:o.shift();)(s=V(this,hr))==null||s.call(this,...u)}return r}clear(){var e,r,a;for(const i of fe(this,Dr,ka).call(this,{allowStale:!0})){const n=V(this,ke)[i];if(fe(this,ze,We).call(this,n))n.__abortController.abort(new Error("deleted"));else{const s=V(this,Be)[i];V(this,yr)&&((e=V(this,fr))==null||e.call(this,n,s,"delete")),V(this,kt)&&((r=V(this,ot))==null||r.push([n,s,"delete"]))}}if(V(this,at).clear(),V(this,ke).fill(void 0),V(this,Be).fill(void 0),V(this,Bt)&&V(this,br)&&(V(this,Bt).fill(0),V(this,br).fill(0)),V(this,vr)&&V(this,vr).fill(0),ge(this,gt,0),ge(this,st,0),V(this,gr).length=0,ge(this,mr,0),ge(this,nt,0),V(this,kt)&&V(this,ot)){const i=V(this,ot);let n;for(;n=i==null?void 0:i.shift();)(a=V(this,hr))==null||a.call(this,...n)}}};pr=new WeakMap,Ft=new WeakMap,fr=new WeakMap,hr=new WeakMap,Ki=new WeakMap,nt=new WeakMap,mr=new WeakMap,at=new WeakMap,Be=new WeakMap,ke=new WeakMap,xt=new WeakMap,qt=new WeakMap,gt=new WeakMap,st=new WeakMap,gr=new WeakMap,ot=new WeakMap,vr=new WeakMap,br=new WeakMap,Bt=new WeakMap,yr=new WeakMap,Sa=new WeakMap,kt=new WeakMap,Os=new WeakSet,ff=function(){const e=new Sl(V(this,pr)),r=new Sl(V(this,pr));ge(this,Bt,e),ge(this,br,r),ge(this,Es,(n,s,o=_i.now())=>{if(r[n]=s!==0?o:0,e[n]=s,s!==0&&this.ttlAutopurge){const u=setTimeout(()=>{V(this,Wt).call(this,n)&&this.delete(V(this,Be)[n])},s+1);u.unref&&u.unref()}}),ge(this,Ja,n=>{r[n]=e[n]!==0?_i.now():0}),ge(this,ra,(n,s)=>{if(e[s]){const o=e[s],u=r[s];if(!o||!u)return;n.ttl=o,n.start=u,n.now=a||i();const l=n.now-u;n.remainingTTL=o-l}});let a=0;const i=()=>{const n=_i.now();if(this.ttlResolution>0){a=n;const s=setTimeout(()=>a=0,this.ttlResolution);s.unref&&s.unref()}return n};this.getRemainingTTL=n=>{const s=V(this,at).get(n);if(s===void 0)return 0;const o=e[s],u=r[s];if(!o||!u)return 1/0;const l=(a||i())-u;return o-l},ge(this,Wt,n=>{const s=r[n],o=e[n];return!!o&&!!s&&(a||i())-s>o})},Ja=new WeakMap,ra=new WeakMap,Es=new WeakMap,Wt=new WeakMap,Su=new WeakSet,pk=function(){const e=new Sl(V(this,pr));ge(this,mr,0),ge(this,vr,e),ge(this,Za,r=>{ge(this,mr,V(this,mr)-e[r]),e[r]=0}),ge(this,Ms,(r,a,i,n)=>{if(fe(this,ze,We).call(this,a))return 0;if(!pa(i))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(i=n(a,r),!pa(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),ge(this,Ji,(r,a,i)=>{if(e[r]=a,V(this,Ft)){const n=V(this,Ft)-e[r];for(;V(this,mr)>n;)fe(this,Zi,wu).call(this,!0)}ge(this,mr,V(this,mr)+e[r]),i&&(i.entrySize=a,i.totalCalculatedSize=V(this,mr))})},Za=new WeakMap,Ji=new WeakMap,Ms=new WeakMap,Pr=new WeakSet,xa=function*({allowStale:e=this.allowStale}={}){if(V(this,nt))for(let r=V(this,st);!(!fe(this,$s,hf).call(this,r)||((e||!V(this,Wt).call(this,r))&&(yield r),r===V(this,gt)));)r=V(this,qt)[r]},Dr=new WeakSet,ka=function*({allowStale:e=this.allowStale}={}){if(V(this,nt))for(let r=V(this,gt);!(!fe(this,$s,hf).call(this,r)||((e||!V(this,Wt).call(this,r))&&(yield r),r===V(this,st)));)r=V(this,xt)[r]},$s=new WeakSet,hf=function(e){return e!==void 0&&V(this,at).get(V(this,Be)[e])===e},Zi=new WeakSet,wu=function(e){var n,s;const r=V(this,gt),a=V(this,Be)[r],i=V(this,ke)[r];return V(this,Sa)&&fe(this,ze,We).call(this,i)?i.__abortController.abort(new Error("evicted")):(V(this,yr)||V(this,kt))&&(V(this,yr)&&((n=V(this,fr))==null||n.call(this,i,a,"evict")),V(this,kt)&&((s=V(this,ot))==null||s.push([i,a,"evict"]))),V(this,Za).call(this,r),e&&(V(this,Be)[r]=void 0,V(this,ke)[r]=void 0,V(this,gr).push(r)),V(this,nt)===1?(ge(this,gt,ge(this,st,0)),V(this,gr).length=0):ge(this,gt,V(this,xt)[r]),V(this,at).delete(a),_u(this,nt)._--,r},Xi=new WeakSet,Cu=function(e,r,a,i){const n=r===void 0?void 0:V(this,ke)[r];if(fe(this,ze,We).call(this,n))return n;const s=new yl,{signal:o}=a;o==null||o.addEventListener("abort",()=>s.abort(o.reason),{signal:s.signal});const u={signal:s.signal,options:a,context:i},l=(h,y=!1)=>{const{aborted:S}=s.signal,x=a.ignoreFetchAbort&&h!==void 0;if(a.status&&(S&&!y?(a.status.fetchAborted=!0,a.status.fetchError=s.signal.reason,x&&(a.status.fetchAbortIgnored=!0)):a.status.fetchResolved=!0),S&&!x&&!y)return d(s.signal.reason);const b=v;return V(this,ke)[r]===v&&(h===void 0?b.__staleWhileFetching?V(this,ke)[r]=b.__staleWhileFetching:this.delete(e):(a.status&&(a.status.fetchUpdated=!0),this.set(e,h,u.options))),h},c=h=>(a.status&&(a.status.fetchRejected=!0,a.status.fetchError=h),d(h)),d=h=>{const{aborted:y}=s.signal,S=y&&a.allowStaleOnFetchAbort,x=S||a.allowStaleOnFetchRejection,b=x||a.noDeleteOnFetchRejection,f=v;if(V(this,ke)[r]===v&&(!b||f.__staleWhileFetching===void 0?this.delete(e):S||(V(this,ke)[r]=f.__staleWhileFetching)),x)return a.status&&f.__staleWhileFetching!==void 0&&(a.status.returnedStale=!0),f.__staleWhileFetching;if(f.__returned===f)throw h},p=(h,y)=>{var x;const S=(x=V(this,Ki))==null?void 0:x.call(this,e,n,u);S&&S instanceof Promise&&S.then(b=>h(b===void 0?void 0:b),y),s.signal.addEventListener("abort",()=>{(!a.ignoreFetchAbort||a.allowStaleOnFetchAbort)&&(h(void 0),a.allowStaleOnFetchAbort&&(h=b=>l(b,!0)))})};a.status&&(a.status.fetchDispatched=!0);const v=new Promise(p).then(l,c),_=Object.assign(v,{__abortController:s,__staleWhileFetching:n,__returned:void 0});return r===void 0?(this.set(e,_,{...u.options,status:void 0}),r=V(this,at).get(e)):V(this,ke)[r]=_,_},ze=new WeakSet,We=function(e){if(!V(this,Sa))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof yl},Ps=new WeakSet,mf=function(e,r){V(this,qt)[r]=e,V(this,xt)[e]=r},Xa=new WeakSet,Is=function(e){e!==V(this,st)&&(e===V(this,gt)?ge(this,gt,V(this,xt)[e]):fe(this,Ps,mf).call(this,V(this,qt)[e],V(this,xt)[e]),fe(this,Ps,mf).call(this,V(this,st),e),ge(this,st,e))};let xl=of;function ur(t){"@babel/helpers - typeof";return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ur(t)}function yB(t,e){if(ur(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e||"default");if(ur(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yv(t){var e=yB(t,"string");return ur(e)=="symbol"?e:String(e)}function SB(t,e,r){return e=Yv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&a.push.apply(a,Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),a.forEach(function(i){SB(t,i,r[i])})}return t}function Vr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qv(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Yv(a.key),a)}}function Ur(t,e,r){return e&&Qv(t.prototype,e),r&&Qv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Nt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gn(t,e){if(e&&(ur(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nt(t)}function wi(t){return wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wi(t)}function Td(t,e){return Td=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,i){return a.__proto__=i,a},Td(t,e)}function kl(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Td(t,e)}function Ad(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function xB(t){if(Array.isArray(t))return Ad(t)}function kB(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Kv(t,e){if(t){if(typeof t=="string")return Ad(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ad(t,e)}}function _B(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
267
267
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wB(t){return xB(t)||kB(t)||Kv(t)||_B()}var CB={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,r){var a;console&&console[e]&&(a=console)[e].apply(a,wB(r))}},TB=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Vr(this,t),this.init(e,r)}return Ur(t,[{key:"init",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=a.prefix||"i18next:",this.logger=r||CB,this.options=a,this.debug=a.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return this.forward(a,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return this.forward(a,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return this.forward(a,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,a,i,n){return n&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(i).concat(this.prefix," ").concat(r[0])),this.logger[a](r))}},{key:"create",value:function(r){return new t(this.logger,jt({},{prefix:"".concat(this.prefix,":").concat(r,":")},this.options))}}]),t}();const Gr=new TB;var fa=function(){function t(){Vr(this,t),this.observers={}}return Ur(t,[{key:"on",value:function(r,a){var i=this;return r.split(" ").forEach(function(n){i.observers[n]=i.observers[n]||[],i.observers[n].push(a)}),this}},{key:"off",value:function(r,a){var i=this;this.observers[r]&&this.observers[r].forEach(function(){if(!a)delete i.observers[r];else{var n=i.observers[r].indexOf(a);n>-1&&i.observers[r].splice(n,1)}})}},{key:"emit",value:function(r){for(var a=arguments.length,i=new Array(a>1?a-1:0),n=1;n<a;n++)i[n-1]=arguments[n];if(this.observers[r]){var s=[].concat(this.observers[r]);s.forEach(function(u){u.apply(void 0,i)})}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach(function(u){u.apply(u,[r].concat(i))})}}}]),t}();function Hn(){var t,e,r=new Promise(function(a,i){t=a,e=i});return r.resolve=t,r.reject=e,r}function Jv(t){return t==null?"":""+t}function AB(t,e,r){t.forEach(function(a){e[a]&&(r[a]=e[a])})}function Od(t,e,r){function a(o){return o&&o.indexOf("###")>-1?o.replace(/###/g,"."):o}function i(){return!t||typeof t=="string"}for(var n=typeof e!="string"?[].concat(e):e.split(".");n.length>1;){if(i())return{};var s=a(n.shift());!t[s]&&r&&(t[s]=new r),t=t[s]}return i()?{}:{obj:t,k:a(n.shift())}}function Zv(t,e,r){var a=Od(t,e,Object),i=a.obj,n=a.k;i[n]=r}function OB(t,e,r,a){var i=Od(t,e,Object),n=i.obj,s=i.k;n[s]=n[s]||[],a&&(n[s]=n[s].concat(r)),a||n[s].push(r)}function _l(t,e){var r=Od(t,e),a=r.obj,i=r.k;if(a)return a[i]}function Xv(t,e,r){for(var a in e)a in t?typeof t[a]=="string"||t[a]instanceof String||typeof e[a]=="string"||e[a]instanceof String?r&&(t[a]=e[a]):Xv(t[a],e[a],r):t[a]=e[a];return t}function Ci(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var EB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function MB(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return EB[e]}):t}var $B=function(t){kl(e,t);function e(r){var a,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Vr(this,e),a=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(a))),a.data=r||{},a.options=i,a.options.keySeparator===void 0&&(a.options.keySeparator="."),a}return Ur(e,[{key:"addNamespaces",value:function(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}},{key:"removeNamespaces",value:function(a){var i=this.options.ns.indexOf(a);i>-1&&this.options.ns.splice(i,1)}},{key:"getResource",value:function(a,i,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=[a,i];return n&&typeof n!="string"&&(u=u.concat(n)),n&&typeof n=="string"&&(u=u.concat(o?n.split(o):n)),a.indexOf(".")>-1&&(u=a.split(".")),_l(this.data,u)}},{key:"addResource",value:function(a,i,n,s){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var l=[a,i];n&&(l=l.concat(u?n.split(u):n)),a.indexOf(".")>-1&&(l=a.split("."),s=i,i=l[1]),this.addNamespaces(i),Zv(this.data,l,s),o.silent||this.emit("added",a,i,n,s)}},{key:"addResources",value:function(a,i,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var o in n)(typeof n[o]=="string"||Object.prototype.toString.apply(n[o])==="[object Array]")&&this.addResource(a,i,o,n[o],{silent:!0});s.silent||this.emit("added",a,i,n)}},{key:"addResourceBundle",value:function(a,i,n,s,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},l=[a,i];a.indexOf(".")>-1&&(l=a.split("."),s=n,n=i,i=l[1]),this.addNamespaces(i);var c=_l(this.data,l)||{};s?Xv(c,n,o):c=jt({},c,n),Zv(this.data,l,c),u.silent||this.emit("added",a,i,n)}},{key:"removeResourceBundle",value:function(a,i){this.hasResourceBundle(a,i)&&delete this.data[a][i],this.removeNamespaces(i),this.emit("removed",a,i)}},{key:"hasResourceBundle",value:function(a,i){return this.getResource(a,i)!==void 0}},{key:"getResourceBundle",value:function(a,i){return i||(i=this.options.defaultNS),this.options.compatibilityAPI==="v1"?jt({},{},this.getResource(a,i)):this.getResource(a,i)}},{key:"getDataByLanguage",value:function(a){return this.data[a]}},{key:"toJSON",value:function(){return this.data}}]),e}(fa);const eb={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,r,a,i,n){var s=this;return e.forEach(function(o){s.processors[o]&&(r=s.processors[o].process(r,a,i,n))}),r}};var tb=function(t){kl(e,t);function e(r){var a,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Vr(this,e),a=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(a))),AB(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],r,Nt(Nt(a))),a.options=i,a.options.keySeparator===void 0&&(a.options.keySeparator="."),a.logger=Gr.create("translator"),a}return Ur(e,[{key:"changeLanguage",value:function(a){a&&(this.language=a)}},{key:"exists",value:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},n=this.resolve(a,i);return n&&n.res!==void 0}},{key:"extractFromKey",value:function(a,i){var n=i.nsSeparator||this.options.nsSeparator;n===void 0&&(n=":");var s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ns||this.options.defaultNS;if(n&&a.indexOf(n)>-1){var u=a.split(n);(n!==s||n===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),a=u.join(s)}return typeof o=="string"&&(o=[o]),{key:a,namespaces:o}}},{key:"translate",value:function(a,i){var n=this;if(ur(i)!=="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),a==null)return"";Array.isArray(a)||(a=[String(a)]);var s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=this.extractFromKey(a[a.length-1],i),u=o.key,l=o.namespaces,c=l[l.length-1],d=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(p){var v=i.nsSeparator||this.options.nsSeparator;return c+v+u}return u}var _=this.resolve(a,i),h=_&&_.res,y=_&&_.usedKey||u,S=_&&_.exactUsedKey||u,x=Object.prototype.toString.apply(h),b=["[object Number]","[object Function]","[object RegExp]"],f=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,g=typeof h!="string"&&typeof h!="boolean"&&typeof h!="number";if(k&&h&&g&&b.indexOf(x)<0&&!(typeof f=="string"&&x==="[object Array]")){if(!i.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,h,i):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(s){var m=x==="[object Array]",w=m?[]:{},O=m?S:y;for(var C in h)if(Object.prototype.hasOwnProperty.call(h,C)){var M="".concat(O).concat(s).concat(C);w[C]=this.translate(M,jt({},i,{joinArrays:!1,ns:l})),w[C]===M&&(w[C]=h[C])}h=w}}else if(k&&typeof f=="string"&&x==="[object Array]")h=h.join(f),h&&(h=this.extendTranslation(h,a,i));else{var T=!1,E=!1;if(!this.isValidLookup(h)&&i.defaultValue!==void 0){if(T=!0,i.count!==void 0){var z=this.pluralResolver.getSuffix(d,i.count);h=i["defaultValue".concat(z)]}h||(h=i.defaultValue)}this.isValidLookup(h)||(E=!0,h=u);var F=i.defaultValue&&i.defaultValue!==h&&this.options.updateMissing;if(E||T||F){this.logger.log(F?"updateKey":"missingKey",d,c,u,F?i.defaultValue:h);var N=[],U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(var q=0;q<U.length;q++)N.push(U[q]);else this.options.saveMissingTo==="all"?N=this.languageUtils.toResolveHierarchy(i.lng||this.language):N.push(i.lng||this.language);var P=function(L,W){n.options.missingKeyHandler?n.options.missingKeyHandler(L,c,W,F?i.defaultValue:h,F,i):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(L,c,W,F?i.defaultValue:h,F,i),n.emit("missingKey",L,c,W,h)};if(this.options.saveMissing){var D=i.count!==void 0&&typeof i.count!="string";this.options.saveMissingPlurals&&D?N.forEach(function(I){var L=n.pluralResolver.getPluralFormsOfKey(I,u);L.forEach(function(W){return P([I],W)})}):P(N,u)}}h=this.extendTranslation(h,a,i,_),E&&h===u&&this.options.appendNamespaceToMissingKey&&(h="".concat(c,":").concat(u)),E&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(a,i,n,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)a=this.i18nFormat.parse(a,n,s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(jt({},n,{interpolation:jt({},this.options.interpolation,n.interpolation)}));var u=n.replace&&typeof n.replace!="string"?n.replace:n;this.options.interpolation.defaultVariables&&(u=jt({},this.options.interpolation.defaultVariables,u)),a=this.interpolator.interpolate(a,u,n.lng||this.language,n),n.nest!==!1&&(a=this.interpolator.nest(a,function(){return o.translate.apply(o,arguments)},n)),n.interpolation&&this.interpolator.reset()}var l=n.postProcess||this.options.postProcess,c=typeof l=="string"?[l]:l;return a!=null&&c&&c.length&&n.applyPostProcessor!==!1&&(a=eb.handle(c,a,i,n,this)),a}},{key:"resolve",value:function(a){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,o,u,l,c;return typeof a=="string"&&(a=[a]),a.forEach(function(d){if(!i.isValidLookup(s)){var p=i.extractFromKey(d,n),v=p.key;o=v;var _=p.namespaces;i.options.fallbackNS&&(_=_.concat(i.options.fallbackNS));var h=n.count!==void 0&&typeof n.count!="string",y=n.context!==void 0&&typeof n.context=="string"&&n.context!=="",S=n.lngs?n.lngs:i.languageUtils.toResolveHierarchy(n.lng||i.language,n.fallbackLng);_.forEach(function(x){i.isValidLookup(s)||(c=x,S.forEach(function(b){if(!i.isValidLookup(s)){l=b;var f=v,k=[f];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(k,v,b,x,n);else{var g;h&&(g=i.pluralResolver.getSuffix(b,n.count)),h&&y&&k.push(f+g),y&&k.push(f+="".concat(i.options.contextSeparator).concat(n.context)),h&&k.push(f+=g)}for(var m;m=k.pop();)i.isValidLookup(s)||(u=m,s=i.getResource(b,x,m,n))}}))})}}),{res:s,usedKey:o,exactUsedKey:u,usedLng:l,usedNS:c}}},{key:"isValidLookup",value:function(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}},{key:"getResource",value:function(a,i,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(a,i,n,s):this.resourceStore.getResource(a,i,n,s)}}]),e}(fa);function Ed(t){return t.charAt(0).toUpperCase()+t.slice(1)}var PB=function(){function t(e){Vr(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=Gr.create("languageUtils")}return Ur(t,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var a=r.split("-");return a.length===2?null:(a.pop(),this.formatLanguageCode(a.join("-")))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var a=r.split("-");return this.formatLanguageCode(a[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var a=["hans","hant","latn","cyrl","cans","mong","arab"],i=r.split("-");return this.options.lowerCaseLng?i=i.map(function(n){return n.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),a.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ed(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),a.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ed(i[1].toLowerCase())),a.indexOf(i[2].toLowerCase())>-1&&(i[2]=Ed(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isWhitelisted",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitWhitelist)&&(r=this.getLanguagePartFromCode(r)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(r)>-1}},{key:"getFallbackCodes",value:function(r,a){if(!r)return[];if(typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!a)return r.default||[];var i=r[a];return i||(i=r[this.getScriptPartFromCode(a)]),i||(i=r[this.formatLanguageCode(a)]),i||(i=r.default),i||[]}},{key:"toResolveHierarchy",value:function(r,a){var i=this,n=this.getFallbackCodes(a||this.options.fallbackLng||[],r),s=[],o=function(l){l&&(i.isWhitelisted(l)?s.push(l):i.logger.warn("rejecting non-whitelisted language code: ".concat(l)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(r))):typeof r=="string"&&o(this.formatLanguageCode(r)),n.forEach(function(u){s.indexOf(u)<0&&o(i.formatLanguageCode(u))}),s}}]),t}(),DB=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],IB={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e===0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e===0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e===0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e===1?0:e===2?1:(e<0||e>10)&&e%10==0?2:3}};function zB(){var t={};return DB.forEach(function(e){e.lngs.forEach(function(r){t[r]={numbers:e.nr,plurals:IB[e.fc]}})}),t}var LB=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Vr(this,t),this.languageUtils=e,this.options=r,this.logger=Gr.create("pluralResolver"),this.rules=zB()}return Ur(t,[{key:"addRule",value:function(r,a){this.rules[r]=a}},{key:"getRule",value:function(r){return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var a=this.getRule(r);return a&&a.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,a){var i=this,n=[],s=this.getRule(r);return s&&s.numbers.forEach(function(o){var u=i.getSuffix(r,o);n.push("".concat(a).concat(u))}),n}},{key:"getSuffix",value:function(r,a){var i=this,n=this.getRule(r);if(n){var s=n.noAbs?n.plurals(a):n.plurals(Math.abs(a)),o=n.numbers[s];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var u=function(){return i.options.prepend&&o.toString()?i.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):u():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?u():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}return this.logger.warn("no plural rule found for: ".concat(r)),""}}]),t}(),jB=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vr(this,t),this.logger=Gr.create("interpolator"),this.init(e,!0)}return Ur(t,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;a&&(this.options=r,this.format=r.interpolation&&r.interpolation.format||function(n){return n}),r.interpolation||(r.interpolation={escapeValue:!0});var i=r.interpolation;this.escape=i.escape!==void 0?i.escape:MB,this.escapeValue=i.escapeValue!==void 0?i.escapeValue:!0,this.useRawValueToEscape=i.useRawValueToEscape!==void 0?i.useRawValueToEscape:!1,this.prefix=i.prefix?Ci(i.prefix):i.prefixEscaped||"{{",this.suffix=i.suffix?Ci(i.suffix):i.suffixEscaped||"}}",this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||",",this.unescapePrefix=i.unescapeSuffix?"":i.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":i.unescapeSuffix||"",this.nestingPrefix=i.nestingPrefix?Ci(i.nestingPrefix):i.nestingPrefixEscaped||Ci("$t("),this.nestingSuffix=i.nestingSuffix?Ci(i.nestingSuffix):i.nestingSuffixEscaped||Ci(")"),this.maxReplaces=i.maxReplaces?i.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var a="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(a,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(r,a,i,n){var s=this,o,u,l;function c(_){return _.replace(/\$/g,"$$$$")}var d=function(h){if(h.indexOf(s.formatSeparator)<0)return _l(a,h);var y=h.split(s.formatSeparator),S=y.shift().trim(),x=y.join(s.formatSeparator).trim();return s.format(_l(a,S),x,i)};this.resetRegExp();var p=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(l=0;(o=this.regexpUnescape.exec(r))&&(u=d(o[1].trim()),r=r.replace(o[0],u),this.regexpUnescape.lastIndex=0,l++,!(l>=this.maxReplaces)););for(l=0;o=this.regexp.exec(r);){if(u=d(o[1].trim()),u===void 0)if(typeof p=="function"){var v=p(r,o,n);u=typeof v=="string"?v:""}else this.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(r)),u="";else typeof u!="string"&&!this.useRawValueToEscape&&(u=Jv(u));if(u=this.escapeValue?c(this.escape(u)):c(u),r=r.replace(o[0],u),this.regexp.lastIndex=0,l++,l>=this.maxReplaces)break}return r}},{key:"nest",value:function(r,a){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n,s,o=jt({},i);o.applyPostProcessor=!1;function u(l,c){if(l.indexOf(",")<0)return l;var d=l.split(",");l=d.shift();var p=d.join(",");p=this.interpolate(p,o),p=p.replace(/'/g,'"');try{o=JSON.parse(p),c&&(o=jt({},c,o))}catch(v){this.logger.error("failed parsing options string in nesting for key ".concat(l),v)}return l}for(;n=this.nestingRegexp.exec(r);){if(s=a(u.call(this,n[1].trim(),o),o),s&&n[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=Jv(s)),s||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(r)),s=""),r=r.replace(n[0],s),this.regexp.lastIndex=0}return r}}]),t}();function NB(t){if(Array.isArray(t))return t}function RB(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a,i,n,s,o=[],u=!0,l=!1;try{if(n=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(a=n.call(r)).done)&&(o.push(a.value),o.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function FB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
268
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rb(t,e){return NB(t)||RB(t,e)||Kv(t,e)||FB()}function qB(t,e){for(var r=t.indexOf(e);r!==-1;)t.splice(r,1),r=t.indexOf(e)}var BB=function(t){kl(e,t);function e(r,a,i){var n,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Vr(this,e),n=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(n))),n.backend=r,n.store=a,n.languageUtils=i.languageUtils,n.options=s,n.logger=Gr.create("backendConnector"),n.state={},n.queue=[],n.backend&&n.backend.init&&n.backend.init(i,s.backend,s),n}return Ur(e,[{key:"queueLoad",value:function(a,i,n,s){var o=this,u=[],l=[],c=[],d=[];return a.forEach(function(p){var v=!0;i.forEach(function(_){var h="".concat(p,"|").concat(_);!n.reload&&o.store.hasResourceBundle(p,_)?o.state[h]=2:o.state[h]<0||(o.state[h]===1?l.indexOf(h)<0&&l.push(h):(o.state[h]=1,v=!1,l.indexOf(h)<0&&l.push(h),u.indexOf(h)<0&&u.push(h),d.indexOf(_)<0&&d.push(_)))}),v||c.push(p)}),(u.length||l.length)&&this.queue.push({pending:l,loaded:{},errors:[],callback:s}),{toLoad:u,pending:l,toLoadLanguages:c,toLoadNamespaces:d}}},{key:"loaded",value:function(a,i,n){var s=a.split("|"),o=rb(s,2),u=o[0],l=o[1];i&&this.emit("failedLoading",u,l,i),n&&this.store.addResourceBundle(u,l,n),this.state[a]=i?-1:2;var c={};this.queue.forEach(function(d){OB(d.loaded,[u],l),qB(d.pending,a),i&&d.errors.push(i),d.pending.length===0&&!d.done&&(Object.keys(d.loaded).forEach(function(p){c[p]||(c[p]=[]),d.loaded[p].length&&d.loaded[p].forEach(function(v){c[p].indexOf(v)<0&&c[p].push(v)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(a,i,n){var s=this,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:250,l=arguments.length>5?arguments[5]:void 0;return a.length?this.backend[n](a,i,function(c,d){if(c&&d&&o<5){setTimeout(function(){s.read.call(s,a,i,n,o+1,u*2,l)},u);return}l(c,d)}):l(null,{})}},{key:"prepareLoading",value:function(a,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof a=="string"&&(a=this.languageUtils.toResolveHierarchy(a)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(a,i,s,o);if(!u.toLoad.length)return u.pending.length||o(),null;u.toLoad.forEach(function(l){n.loadOne(l)})}},{key:"load",value:function(a,i,n){this.prepareLoading(a,i,{},n)}},{key:"reload",value:function(a,i,n){this.prepareLoading(a,i,{reload:!0},n)}},{key:"loadOne",value:function(a){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=a.split("|"),o=rb(s,2),u=o[0],l=o[1];this.read(u,l,"read",null,null,function(c,d){c&&i.logger.warn("".concat(n,"loading namespace ").concat(l," for language ").concat(u," failed"),c),!c&&d&&i.logger.log("".concat(n,"loaded namespace ").concat(l," for language ").concat(u),d),i.loaded(a,c,d)})}},{key:"saveMissing",value:function(a,i,n,s,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(a,i,n,s,null,jt({},u,{isUpdate:o})),!(!a||!a[0])&&this.store.addResource(a[0],i,n,s)}}]),e}(fa);function WB(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var r={};if(ur(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),ur(e[2])==="object"||ur(e[3])==="object"){var a=e[3]||e[2];Object.keys(a).forEach(function(i){r[i]=a[i]})}return r},interpolation:{escapeValue:!0,format:function(e,r,a){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function ab(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}function wl(){}var VB=function(t){kl(e,t);function e(){var r,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Vr(this,e),r=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(r))),r.options=ab(a),r.services={},r.logger=Gr,r.modules={external:[]},i&&!r.isInitialized&&!a.isClone){if(!r.options.initImmediate)return r.init(a,i),Gn(r,Nt(Nt(r)));setTimeout(function(){r.init(a,i)},0)}return r}return Ur(e,[{key:"init",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(n=i,i={}),this.options=jt({},WB(),this.options,ab(i)),this.format=this.options.interpolation.format,n||(n=wl);function s(p){return p?typeof p=="function"?new p:p:null}if(!this.options.isClone){this.modules.logger?Gr.init(s(this.modules.logger),this.options):Gr.init(null,this.options);var o=new PB(this.options);this.store=new $B(this.options.resources,this.options);var u=this.services;u.logger=Gr,u.resourceStore=this.store,u.languageUtils=o,u.pluralResolver=new LB(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u.interpolator=new jB(this.options),u.backendConnector=new BB(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(p){for(var v=arguments.length,_=new Array(v>1?v-1:0),h=1;h<v;h++)_[h-1]=arguments[h];a.emit.apply(a,[p].concat(_))}),this.modules.languageDetector&&(u.languageDetector=s(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=s(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new tb(this.services,this.options),this.translator.on("*",function(p){for(var v=arguments.length,_=new Array(v>1?v-1:0),h=1;h<v;h++)_[h-1]=arguments[h];a.emit.apply(a,[p].concat(_))}),this.modules.external.forEach(function(p){p.init&&p.init(a)})}var l=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach(function(p){a[p]=function(){var v;return(v=a.store)[p].apply(v,arguments)}});var c=Hn(),d=function(){a.changeLanguage(a.options.lng,function(v,_){a.isInitialized=!0,a.logger.log("initialized",a.options),a.emit("initialized",a.options),c.resolve(_),n(v,_)})};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),c}},{key:"loadResources",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wl;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&this.language.toLowerCase()==="cimode")return i();var n=[],s=function(l){if(l){var c=a.services.languageUtils.toResolveHierarchy(l);c.forEach(function(d){n.indexOf(d)<0&&n.push(d)})}};if(this.language)s(this.language);else{var o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.forEach(function(u){return s(u)})}this.options.preload&&this.options.preload.forEach(function(u){return s(u)}),this.services.backendConnector.load(n,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(a,i,n){var s=Hn();return a||(a=this.languages),i||(i=this.options.ns),n||(n=wl),this.services.backendConnector.reload(a,i,function(o){s.resolve(),n(o)}),s}},{key:"use",value:function(a){return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&eb.addPostProcessor(a),a.type==="3rdParty"&&this.modules.external.push(a),this}},{key:"changeLanguage",value:function(a,i){var n=this,s=Hn();this.emit("languageChanging",a);var o=function(c,d){n.translator.changeLanguage(d),d&&(n.emit("languageChanged",d),n.logger.log("languageChanged",d)),s.resolve(function(){return n.t.apply(n,arguments)}),i&&i(c,function(){return n.t.apply(n,arguments)})},u=function(c){c&&(n.language=c,n.languages=n.services.languageUtils.toResolveHierarchy(c),n.translator.language||n.translator.changeLanguage(c),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(c)),n.loadResources(function(d){o(d,c)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(a),s}},{key:"getFixedT",value:function(a,i){var n=this,s=function o(u,l){var c=jt({},l);if(ur(l)!=="object"){for(var d=arguments.length,p=new Array(d>2?d-2:0),v=2;v<d;v++)p[v-2]=arguments[v];c=n.options.overloadTranslationOptionHandler([u,l].concat(p))}return c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,n.t(u,c)};return typeof a=="string"?s.lng=a:s.lngs=a,s.ns=i,s}},{key:"t",value:function(){var a;return this.translator&&(a=this.translator).translate.apply(a,arguments)}},{key:"exists",value:function(){var a;return this.translator&&(a=this.translator).exists.apply(a,arguments)}},{key:"setDefaultNamespace",value:function(a){this.options.defaultNS=a}},{key:"loadNamespaces",value:function(a,i){var n=this,s=Hn();return this.options.ns?(typeof a=="string"&&(a=[a]),a.forEach(function(o){n.options.ns.indexOf(o)<0&&n.options.ns.push(o)}),this.loadResources(function(o){s.resolve(),i&&i(o)}),s):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(a,i){var n=Hn();typeof a=="string"&&(a=[a]);var s=this.options.preload||[],o=a.filter(function(u){return s.indexOf(u)<0});return o.length?(this.options.preload=s.concat(o),this.loadResources(function(u){n.resolve(),i&&i(u)}),n):(i&&i(),Promise.resolve())}},{key:"dir",value:function(a){if(a||(a=this.languages&&this.languages.length>0?this.languages[0]:this.language),!a)return"rtl";var i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return i.indexOf(this.services.languageUtils.getLanguagePartFromCode(a))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return new e(a,i)}},{key:"cloneInstance",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wl,s=jt({},this.options,i,{isClone:!0}),o=new e(s),u=["store","services","language"];return u.forEach(function(l){o[l]=a[l]}),o.translator=new tb(o.services,o.options),o.translator.on("*",function(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),p=1;p<c;p++)d[p-1]=arguments[p];o.emit.apply(o,[l].concat(d))}),o.init(s,n),o.translator.options=o.options,o}}]),e}(fa);const Me=new VB;Me.changeLanguage.bind(Me),Me.cloneInstance.bind(Me),Me.createInstance.bind(Me),Me.dir.bind(Me),Me.exists.bind(Me),Me.getFixedT.bind(Me),Me.init.bind(Me),Me.loadLanguages.bind(Me),Me.loadNamespaces.bind(Me),Me.loadResources.bind(Me),Me.off.bind(Me),Me.on.bind(Me),Me.setDefaultNamespace.bind(Me),Me.t.bind(Me),Me.use.bind(Me);const Cl={screensCache:[],cachedScreenPromises:[],install(t){t.prototype.$dataProvider=this},apiInstance(){return H.has(window,"ProcessMaker.apiClient")&&!window.ProcessMaker.isStub?window.ProcessMaker.apiClient:this.token()?(Vn.defaults.baseURL=this.baseURL(),Vn.defaults.headers.common={Authorization:`Bearer ${this.token()}`},Vn.defaults.adapter=Wv(Vn.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new xl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})}),Vn):H.has(window,"ProcessMaker.apiClient")&&window.ProcessMaker.isStub?window.ProcessMaker.apiClient:{get(){return Promise.resolve({data:{data:[]}})}}},get(...t){return this.apiInstance().get(...t)},post(...t){return this.apiInstance().post(...t)},delete(...t){return this.apiInstance().delete(...t)},token(){return localStorage.getItem("token")},baseURL(){return localStorage.getItem("baseURL")},getTasks(t){const e=H.get(window,"PM4ConfigOverrides.getTasksEndpoint","/tasks");return this.get(e+t).then(r=>(r.data.screen&&r.data.screen.nested&&this.addNestedScreenCache(r.data.screen.nested),r))},addNestedScreenCache(t){t.forEach(e=>{e.screen_id&&(e.id=e.screen_id);const r=this.screensCache.findIndex(a=>a.id===e.id);r>-1?this.screensCache.splice(r,1,e):this.screensCache.push(e)})},getScreen(t,e=""){if(!t)return null;const r=this.cachedScreenPromises.find(s=>s.id===t&&s.query===e);if(r)return r.screenPromise;const a=H.get(window,"PM4ConfigOverrides.getScreenEndpoint","/screens"),i=this.screensCache.find(s=>s.id===t);if(i)return Promise.resolve({data:i});const n=new Promise((s,o)=>{this.get(`${a}/${t}${e}`).then(u=>{u.data.nested&&this.addNestedScreenCache(u.data.nested),s(u)}).catch(u=>o(u))});return this.cachedScreenPromises.push({id:t,query:e,screenPromise:n}),n},flushScreenCache(){this.cachedScreenPromises.splice(0,this.cachedScreenPromises.length)},postScript(t,e,r={}){const a=H.get(window,"PM4ConfigOverrides.postScriptEndpoint","/scripts/execute/{id}");return this.post(a.replace("{id}",t)+this.authQueryString(),e,r)},postDataSource(t,e,r){let a;return e?a=`/requests/${e}/data_sources/${t}`:a=`/requests/data_sources/${t}`,a+=this.authQueryString(),this.post(a,r,{timeout:0})},getDataSource(t,e){if(!window.ProcessMaker.screen.cacheEnabled&&!window.ProcessMaker.screen.cacheTimeout)return this.postDataSource(t,null,e);let r=`/requests/data_sources/${t}/resources/${e.config.endpoint}/data`;return r+=this.authQueryString(),this.get(r,{useCache:window.ProcessMaker.screen.cacheEnabled,params:{pmds_config:JSON.stringify(e.config),pmds_data:JSON.stringify(e.data)}}).then(a=>a)},authQueryString(){const t=H.get(window,"PM4ConfigOverrides.authParams",null);let e="";return t&&(e=`?${new URLSearchParams(t).toString()}`),e},deleteFile(t,e=null){let r=`files/${t}`;return e&&(r+=`?token=${e}`),this.delete(r)},download(t){return this.apiInstance().get(t,{responseType:"blob"})},getCollections(){return this.get("/collections?per_page=1000").catch(t=>{throw t.response&&t.response.status===404?new Error(Me.t("Collections package not installed")):t})},getCollectionFields(t){return this.get(`/collections/${t}/columns?per_page=1000`).catch(e=>{throw e.response&&e.response.status===404?new Error(Me.t("Collection id not found")):e})},getCollectionRecords(t,e,r=null){return e.useCache=window.ProcessMaker.screen.cacheEnabled,this.get(`/collections/${t}/records${this.authQueryString()}`,e).then(a=>{const i=a?a.data:null;if(!i)throw new Error(Me.t("No data returned"));return[i,r]}).catch(a=>{if(a.response&&a.response.status===404)return[{data:[]},r];throw a})}};let Yn=typeof window>"u"?global:window;class Ti{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);this.element=e,Object.assign(this,r)}async countItems(e){throw e}}class UB extends Ti{async countItems(e){for(const r of this.element)await Ai(r,{screen:this.screen}).countItems(e)}}class GB extends Ti{async countItems(e){for(let r=0,a=this.element.config.length;r<a;r++)await Ai(this.element.config[r].items,{screen:this.element}).countItems(e)}}class HB extends Ti{async countItems(e){e.push(this.element);const r=await this.loadScreen(this.element.config.screen);r&&r[0]&&r[0].items&&await Ai(r[0].items,{screen:this.screen}).countItems(e)}async loadScreen(e){try{if(Yn.nestedScreens||(Yn.nestedScreens={}),Yn.nestedScreens["id_"+e])return Yn.nestedScreens["id_"+e];const r=await Cl.getScreen(e);return Yn.nestedScreens["id_"+e]=r.data.config,r.data.config}catch{return!1}}}class YB extends Ti{async countItems(e){e.push(this.element),await Ai(this.element.items,{screen:this.screen}).countItems(e)}}class QB extends Ti{async countItems(e){await Ai(this.element.items,{screen:this.screen}).countItems(e)}}class KB extends Ti{async countItems(e){e.push(this.element)}}function Ai(t,e){return t instanceof Array?new UB(t,e):t.config instanceof Array?new GB(t,e):t.component==="FormNestedScreen"?new HB(t,e):t.component==="FormMultiColumn"?new QB(t,e):t.component==="FormLoop"?new YB(t,e):new KB(t,e)}let Or=typeof window>"u"?global:window,Qn=[];class Fa{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);se(this,"data",{});se(this,"insideLoop",!1);this.element=e,Object.assign(this,r)}async addValidations(e){throw e}isVisible(){if(!(this.element.visibleInDevice===null||this.element.visibleInDevice===void 0?!0:this.element.visibleInDevice))return!1;let r=!0;if(this.element.config.conditionalHide)try{r=!!At.evaluate(this.element.config.conditionalHide,this.data)}catch{r=!1}return r}}class JB extends Fa{async addValidations(e){for(const r of this.element)await ha(r,{screen:this.screen,data:this.data,parentVisibilityRule:this.parentVisibilityRule,insideLoop:this.insideLoop}).addValidations(e)}}class ZB extends Fa{async addValidations(e){this.element.config[this.firstPage]&&(Qn=[this.firstPage],await ha(this.element.config[this.firstPage].items,{screen:this.element,data:this.data}).addValidations(e),Qn=[])}}class XB extends Fa{async addValidations(e){if(!this.isVisible())return;const r=await this.loadNestedScreen(this.element.config.screen);if(r&&r.config){const a=r.config;let i=this.parentVisibilityRule?this.parentVisibilityRule:this.element.config.conditionalHide;a&&a[0]&&a[0].items&&await ha(a[0].items,{screen:r,data:this.data,parentVisibilityRule:i}).addValidations(e)}}async loadNestedScreen(e){if(!e)return null;if(Or.nestedScreens||(Or.nestedScreens={}),Or.nestedScreens["id_"+e])return{config:Or.nestedScreens["id_"+e]};const r=await Cl.getScreen(e);return Or.nestedScreens["id_"+e]=r.data.config,{config:r.data}}async loadScreen(e){if(!e)return null;if(Or.nestedScreens||(Or.nestedScreens={}),Or.nestedScreens["id_"+e])return Or.nestedScreens["id_"+e];const r=await Cl.getScreen(e);return Or.nestedScreens["id_"+e]=r.data.config,r.data.config}}class eW extends Fa{async addValidations(e){if(!this.isVisible())return;H.set(e,this.element.config.name,{});const r=H.get(e,this.element.config.name);r.$each={},this.checkForSiblings(e);const a=(H.get(this.data,this.element.config.name)||[{}])[0];await ha(this.element.items,{screen:this.screen,data:{_parent:this.data,...a},parentVisibilityRule:this.element.config.conditionalHide,insideLoop:!0}).addValidations(r.$each)}checkForSiblings(e){const r=[],a=[];if(this.screen.config.forEach(i=>{!i||!i.items||(i.items.filter(n=>{n.component==="FormLoop"&&n.config.name===this.element.config.name&&r.push(n)}),r&&r.forEach(n=>{n.items.filter(s=>{s.config.validation&&s.config.validation.forEach(o=>{const u=this.camelCase(o.value.split(":")[0]),l=nl[u],c={};let d={};d[u]=l,c[s.config.name]=d,H.merge(a,c)})})}))}),Object.keys(a).length!=0){const i=H.get(e,this.element.config.name);i.hasOwnProperty("$each")&&H.merge(i.$each,a),H.set(e[this.element.config.name].$each,i)}}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}class tW extends Fa{async addValidations(e){this.isVisible()&&await ha(this.element.items,{screen:this.screen,data:this.data,parentVisibilityRule:this.element.config.conditionalHide}).addValidations(e)}}class rW extends Fa{async addValidations(e){if(!this.isVisible())return;const r=this.element.config.eventData;let a="Empty Screen";this.screen.config[r]&&this.screen.config[r].name&&(a=this.screen.config[r].name);const i=`${a}-${r}`;Qn.length>0&&!Qn.includes(i)&&this.screen.config[r]&&this.screen.config[r].items&&(Qn.push(i),await ha(this.screen.config[this.element.config.eventData].items,{screen:this.screen,data:this.data}).addValidations(e))}}class aW extends Fa{async addValidations(e){if(this.element.config&&this.element.config.readonly||this.element.config&&this.element.config.disabled||!(this.element.config&&this.element.config.name&&typeof this.element.config.name=="string"&&this.element.config.name.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)))return;const r=this.element.config.name,a=this.element.config.validation,i=this.element.config.conditionalHide,n=this.parentVisibilityRule,s=this.insideLoop||!1,o=this.element.config.deviceVisibility?this.element.config.deviceVisibility:{showForDesktop:!0,showForMobile:!0};H.set(e,r,H.get(e,r,{}));const u=H.get(e,r);if(a instanceof Array)a.forEach(l=>{const c=this.camelCase(l.value.split(":")[0]);if(!c)return;let d=nl[c];if(d){if(l.configs instanceof Array){const p=[];l.configs.forEach(v=>{p.push(v.value)}),p.push(r),d=d(...p)}u[c]=function(...p){const v=p[1],_=r.split(".").length-1,h=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(v),_);if(n){const x=s?1:0,b=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(v),_+x);let f=!0;try{f=!!At.evaluate(n,b)}catch{f=!1}if(!f)return!0}let y=!0;try{const x=this.$root.$children[0].$refs.renderer.definition.isMobile;y=x&&o.showForMobile||!x&&o.showForDesktop}catch{y=!0}if(!y)return!0;let S=!0;if(i)try{S=!!At.evaluate(i,h)}catch{S=!1}return S?d.apply(this,p):!0}}});else if(typeof a=="string"&&a){let l=nl[a];if(!l)return;u[a]=function(...c){const d=c[1],p=r.split(".").length-1,v=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),p);if(n){const h=s?1:0,y=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),p+h);let S=!0;try{S=!!At.evaluate(n,y)}catch{S=!1}if(!S)return!0}let _=!0;if(i)try{_=!!At.evaluate(i,v)}catch{_=!1}return _?l.apply(this,c):!0}}this.element.items&&ha(this.element.items,{screen:this.screen,data:this.data}).addValidations(e)}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}function ha(t,e){return t instanceof Array?new JB(t,e):t.config instanceof Array?new ZB(t,e):t.component==="FormNestedScreen"?new XB(t,e):t.component==="FormMultiColumn"?new tW(t,e):t.component==="FormLoop"?new eW(t,e):(t.component,t.component==="FormButton"&&t.config.event==="pageNavigate"?new rW(t,e):new aW(t,e))}let Kn;const ib={mixins:ov,props:{value:Object,_parent:null,definition:Object,components:{type:Object,default(){return{}}},showErrors:{type:Boolean,default:!1},testScreenDefinition:{type:Boolean,default:!1}},data(){return{references__:[],debugCmp:null,component:null,alias:{},extensions:[],nodeNameProperty:"component",variables:[],variablesTree:[],initialize:[],ownerDocument:window.document,updatedConfigs:[],building:{show:!1,error:"",component:"",errors:[]}}},methods:{dot2bracket(t){return t.replace(/\.\d/g,e=>`[${e.substr(1)}]`)},submit(t,e=!1){this.$emit("submit",this.value,e)},buildComponent(t){window.ProcessMaker&&window.ProcessMaker.EventBus&&window.ProcessMaker.EventBus.$emit("screen-renderer-build-component",this);const e=this.componentDefinition(t);if(!this.testScreenDefinition)return e;const r=this.$root.constructor,a=r.config.warnHandler,i=r.config.errorHandler,n=[];this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;let s;try{r.config.warnHandler=u=>{n.push(u)},r.config.errorHandler=u=>{n.push(u)},s=r.component("ScreenRendered",e);const o=new s({propsData:{vdata:{}}});if(o.$parent=this,o.$mount(),n.length>0)throw this.$t("Building error");return this.codigo=e,e}catch(o){return console.error(o),this.building.error=o,this.building.component=e,this.building.errors=n,this.building.show=!0,e||{template:"<div></div>"}}finally{r.config.warnHandler=a,r.config.errorHandler=i}},parse(t,e){const r=this.ownerDocument.createElement("div");return this.loadPages(e,r,t),"<div>"+r.innerHTML+"</div>"},loadPages(t,e,r){const a=t.config;this.variables.splice(0),this.extensions.forEach(i=>i.beforeload instanceof Function&&i.beforeload.bind(this)({pages:a,owner:e,definition:t})),a.forEach((i,n)=>{if(i){const s=this.createComponent("div",{name:i.name,class:"page","v-if":`currentPage__==${n}`,key:`page-${n}`});this.loadItems(i.items,s,r,t,n),e.appendChild(s)}})},escapeVuePropertyName(t){return t.substr(0,1)==="@"?t.replace("@","v-on:"):this.snakeCase(t)},snakeCase(t){return t.replace(/[A-Z]/g,e=>`-${e}`).toLowerCase().replace(/^-/,"")},camelCase(t){return t.replace(/_\w/g,e=>e.substr(1,1).toUpperCase())},updateComponentConfig(t,e){this.updatedConfigs.push({name:t,properties:e})},mergeUpdatedConfig(t,e){let r=this.updatedConfigs.find(a=>a.name===t);if(r){let a=r.properties;for(let i in a)e[i]===void 0&&(e[i]=a[i])}return e},createComponent(t,e){e=this.mergeUpdatedConfig(t,this.setDefaultPropertyValues(e)),t=this.snakeCase(t);const r=this.ownerDocument.createElement(t);for(let a in e){const i=e[a];i!==!1&&i!==null&&i!==void 0&&(a.substr(0,1)===":"||typeof i=="string"&&i.indexOf("{{")===-1?r.setAttribute(this.escapeVuePropertyName(a),i):typeof i=="string"&&i.indexOf("{{")!==-1&&!e.ignoreMustache?r.setAttribute(":"+this.escapeVuePropertyName(a),"mustache("+this.byValue(i)+")"):i!==void 0&&r.setAttribute(":"+this.escapeVuePropertyName(a),this.byRef(i)))}return r},byValue(t){return JSON.stringify(t).replace("{{","{{").replace("}}","}}")},byRef(t){const r=`references__[${this.references__.indexOf(t)>-1?this.references__.indexOf(t):this.references__.length}]`;return this.references__.push(t),r},loadItems(t,e,r,a,i){t.forEach(n=>{const s=n[this.nodeNameProperty],o=this.alias[s]||s,u={...n.config};this.extensions.forEach(d=>d.onloadproperties instanceof Function&&d.onloadproperties.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,screen:r,definition:a,formIndex:i}));const l=this.createComponent(o,u),c=this.ownerDocument.createElement("div");c.appendChild(l),this.extensions.forEach(d=>d.onloaditems instanceof Function&&d.onloaditems.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,node:l,wrapper:c,screen:r,definition:a,formIndex:i})),e.appendChild(c)})},setDefaultPropertyValues(t){let e={...t};return(typeof e.ariaLabel>"u"||e.ariaLabel===null||e.ariaLabel==="")&&e.label&&(e.ariaLabel=e.label),e.tabindex&&(e.tabindex=parseInt(e.tabindex)),e},validVariableName(t){return t&&typeof t=="string"&&t.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)},isComputedVariable(t,e){return e.computed&&e.computed.some(r=>new RegExp(`^${r.property}(\\.|$)`,"i").test(t))},registerVariable(t,e={}){if(t&&t.startsWith("_parent.")||t&&t.includes("._parent.")||!this.validVariableName(t))return;const r=H.get(e,"config",{});this.variables.find(i=>i.name===t)||(this.variables.push({name:t,config:r,element:e}),this.variablesTree.push({name:t,config:r,element:e}))},registerNestedVariable(t,e,r){const a=Kn.getVariablesTree(r);this.variablesTree.push({name:t,prefix:e,config:{},items:a}),Kn.getVariablesTree({config:[]})},getVariablesTree(t){let e;try{e={mixins:[ad],components:{},props:{},computed:{},methods:{},data:{},watch:{},mounted:[]},this.variablesTree=[];const r=this.parse(e,t);return this.extensions.forEach(a=>{a.onparse instanceof Function&&a.onparse.bind(this)({screen:e,template:r,definition:t})}),this.variablesTree}catch(r){return console.error(r),this.variablesTree}},elementCssClass(t){const e=[];return t.config.bgcolor&&e.push(t.config.bgcolor),t.config.color&&e.push(t.config.color),e.join(" ")},componentDefinition(t){let e;this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;try{e={mixins:[ad],components:{},props:{},computed:{},methods:{},created:[],data:{},watch:{},mounted:[]};const r=this.parse(e,t);this.extensions.forEach(n=>{n.onparse instanceof Function&&n.onparse.bind(this)({screen:e,template:r,definition:t})}),e.template=r,this.extensions.forEach(n=>{n.onbuild instanceof Function&&n.onbuild.bind(this)({screen:e,definition:t})});const a=["currentPage__"],i=`let value;const data = {};
268
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rb(t,e){return NB(t)||RB(t,e)||Kv(t,e)||FB()}function qB(t,e){for(var r=t.indexOf(e);r!==-1;)t.splice(r,1),r=t.indexOf(e)}var BB=function(t){kl(e,t);function e(r,a,i){var n,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Vr(this,e),n=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(n))),n.backend=r,n.store=a,n.languageUtils=i.languageUtils,n.options=s,n.logger=Gr.create("backendConnector"),n.state={},n.queue=[],n.backend&&n.backend.init&&n.backend.init(i,s.backend,s),n}return Ur(e,[{key:"queueLoad",value:function(a,i,n,s){var o=this,u=[],l=[],c=[],d=[];return a.forEach(function(p){var v=!0;i.forEach(function(_){var h="".concat(p,"|").concat(_);!n.reload&&o.store.hasResourceBundle(p,_)?o.state[h]=2:o.state[h]<0||(o.state[h]===1?l.indexOf(h)<0&&l.push(h):(o.state[h]=1,v=!1,l.indexOf(h)<0&&l.push(h),u.indexOf(h)<0&&u.push(h),d.indexOf(_)<0&&d.push(_)))}),v||c.push(p)}),(u.length||l.length)&&this.queue.push({pending:l,loaded:{},errors:[],callback:s}),{toLoad:u,pending:l,toLoadLanguages:c,toLoadNamespaces:d}}},{key:"loaded",value:function(a,i,n){var s=a.split("|"),o=rb(s,2),u=o[0],l=o[1];i&&this.emit("failedLoading",u,l,i),n&&this.store.addResourceBundle(u,l,n),this.state[a]=i?-1:2;var c={};this.queue.forEach(function(d){OB(d.loaded,[u],l),qB(d.pending,a),i&&d.errors.push(i),d.pending.length===0&&!d.done&&(Object.keys(d.loaded).forEach(function(p){c[p]||(c[p]=[]),d.loaded[p].length&&d.loaded[p].forEach(function(v){c[p].indexOf(v)<0&&c[p].push(v)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(a,i,n){var s=this,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:250,l=arguments.length>5?arguments[5]:void 0;return a.length?this.backend[n](a,i,function(c,d){if(c&&d&&o<5){setTimeout(function(){s.read.call(s,a,i,n,o+1,u*2,l)},u);return}l(c,d)}):l(null,{})}},{key:"prepareLoading",value:function(a,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof a=="string"&&(a=this.languageUtils.toResolveHierarchy(a)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(a,i,s,o);if(!u.toLoad.length)return u.pending.length||o(),null;u.toLoad.forEach(function(l){n.loadOne(l)})}},{key:"load",value:function(a,i,n){this.prepareLoading(a,i,{},n)}},{key:"reload",value:function(a,i,n){this.prepareLoading(a,i,{reload:!0},n)}},{key:"loadOne",value:function(a){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=a.split("|"),o=rb(s,2),u=o[0],l=o[1];this.read(u,l,"read",null,null,function(c,d){c&&i.logger.warn("".concat(n,"loading namespace ").concat(l," for language ").concat(u," failed"),c),!c&&d&&i.logger.log("".concat(n,"loaded namespace ").concat(l," for language ").concat(u),d),i.loaded(a,c,d)})}},{key:"saveMissing",value:function(a,i,n,s,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(a,i,n,s,null,jt({},u,{isUpdate:o})),!(!a||!a[0])&&this.store.addResource(a[0],i,n,s)}}]),e}(fa);function WB(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var r={};if(ur(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),ur(e[2])==="object"||ur(e[3])==="object"){var a=e[3]||e[2];Object.keys(a).forEach(function(i){r[i]=a[i]})}return r},interpolation:{escapeValue:!0,format:function(e,r,a){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function ab(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}function wl(){}var VB=function(t){kl(e,t);function e(){var r,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Vr(this,e),r=Gn(this,wi(e).call(this)),fa.call(Nt(Nt(r))),r.options=ab(a),r.services={},r.logger=Gr,r.modules={external:[]},i&&!r.isInitialized&&!a.isClone){if(!r.options.initImmediate)return r.init(a,i),Gn(r,Nt(Nt(r)));setTimeout(function(){r.init(a,i)},0)}return r}return Ur(e,[{key:"init",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(n=i,i={}),this.options=jt({},WB(),this.options,ab(i)),this.format=this.options.interpolation.format,n||(n=wl);function s(p){return p?typeof p=="function"?new p:p:null}if(!this.options.isClone){this.modules.logger?Gr.init(s(this.modules.logger),this.options):Gr.init(null,this.options);var o=new PB(this.options);this.store=new $B(this.options.resources,this.options);var u=this.services;u.logger=Gr,u.resourceStore=this.store,u.languageUtils=o,u.pluralResolver=new LB(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u.interpolator=new jB(this.options),u.backendConnector=new BB(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(p){for(var v=arguments.length,_=new Array(v>1?v-1:0),h=1;h<v;h++)_[h-1]=arguments[h];a.emit.apply(a,[p].concat(_))}),this.modules.languageDetector&&(u.languageDetector=s(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=s(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new tb(this.services,this.options),this.translator.on("*",function(p){for(var v=arguments.length,_=new Array(v>1?v-1:0),h=1;h<v;h++)_[h-1]=arguments[h];a.emit.apply(a,[p].concat(_))}),this.modules.external.forEach(function(p){p.init&&p.init(a)})}var l=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach(function(p){a[p]=function(){var v;return(v=a.store)[p].apply(v,arguments)}});var c=Hn(),d=function(){a.changeLanguage(a.options.lng,function(v,_){a.isInitialized=!0,a.logger.log("initialized",a.options),a.emit("initialized",a.options),c.resolve(_),n(v,_)})};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),c}},{key:"loadResources",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wl;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&this.language.toLowerCase()==="cimode")return i();var n=[],s=function(l){if(l){var c=a.services.languageUtils.toResolveHierarchy(l);c.forEach(function(d){n.indexOf(d)<0&&n.push(d)})}};if(this.language)s(this.language);else{var o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.forEach(function(u){return s(u)})}this.options.preload&&this.options.preload.forEach(function(u){return s(u)}),this.services.backendConnector.load(n,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(a,i,n){var s=Hn();return a||(a=this.languages),i||(i=this.options.ns),n||(n=wl),this.services.backendConnector.reload(a,i,function(o){s.resolve(),n(o)}),s}},{key:"use",value:function(a){return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&eb.addPostProcessor(a),a.type==="3rdParty"&&this.modules.external.push(a),this}},{key:"changeLanguage",value:function(a,i){var n=this,s=Hn();this.emit("languageChanging",a);var o=function(c,d){n.translator.changeLanguage(d),d&&(n.emit("languageChanged",d),n.logger.log("languageChanged",d)),s.resolve(function(){return n.t.apply(n,arguments)}),i&&i(c,function(){return n.t.apply(n,arguments)})},u=function(c){c&&(n.language=c,n.languages=n.services.languageUtils.toResolveHierarchy(c),n.translator.language||n.translator.changeLanguage(c),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(c)),n.loadResources(function(d){o(d,c)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(a),s}},{key:"getFixedT",value:function(a,i){var n=this,s=function o(u,l){var c=jt({},l);if(ur(l)!=="object"){for(var d=arguments.length,p=new Array(d>2?d-2:0),v=2;v<d;v++)p[v-2]=arguments[v];c=n.options.overloadTranslationOptionHandler([u,l].concat(p))}return c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,n.t(u,c)};return typeof a=="string"?s.lng=a:s.lngs=a,s.ns=i,s}},{key:"t",value:function(){var a;return this.translator&&(a=this.translator).translate.apply(a,arguments)}},{key:"exists",value:function(){var a;return this.translator&&(a=this.translator).exists.apply(a,arguments)}},{key:"setDefaultNamespace",value:function(a){this.options.defaultNS=a}},{key:"loadNamespaces",value:function(a,i){var n=this,s=Hn();return this.options.ns?(typeof a=="string"&&(a=[a]),a.forEach(function(o){n.options.ns.indexOf(o)<0&&n.options.ns.push(o)}),this.loadResources(function(o){s.resolve(),i&&i(o)}),s):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(a,i){var n=Hn();typeof a=="string"&&(a=[a]);var s=this.options.preload||[],o=a.filter(function(u){return s.indexOf(u)<0});return o.length?(this.options.preload=s.concat(o),this.loadResources(function(u){n.resolve(),i&&i(u)}),n):(i&&i(),Promise.resolve())}},{key:"dir",value:function(a){if(a||(a=this.languages&&this.languages.length>0?this.languages[0]:this.language),!a)return"rtl";var i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return i.indexOf(this.services.languageUtils.getLanguagePartFromCode(a))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return new e(a,i)}},{key:"cloneInstance",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wl,s=jt({},this.options,i,{isClone:!0}),o=new e(s),u=["store","services","language"];return u.forEach(function(l){o[l]=a[l]}),o.translator=new tb(o.services,o.options),o.translator.on("*",function(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),p=1;p<c;p++)d[p-1]=arguments[p];o.emit.apply(o,[l].concat(d))}),o.init(s,n),o.translator.options=o.options,o}}]),e}(fa);const Me=new VB;Me.changeLanguage.bind(Me),Me.cloneInstance.bind(Me),Me.createInstance.bind(Me),Me.dir.bind(Me),Me.exists.bind(Me),Me.getFixedT.bind(Me),Me.init.bind(Me),Me.loadLanguages.bind(Me),Me.loadNamespaces.bind(Me),Me.loadResources.bind(Me),Me.off.bind(Me),Me.on.bind(Me),Me.setDefaultNamespace.bind(Me),Me.t.bind(Me),Me.use.bind(Me);const Cl={screensCache:[],cachedScreenPromises:[],install(t){t.prototype.$dataProvider=this},apiInstance(){return H.has(window,"ProcessMaker.apiClient")&&!window.ProcessMaker.isStub?window.ProcessMaker.apiClient:this.token()?(Vn.defaults.baseURL=this.baseURL(),Vn.defaults.headers.common={Authorization:`Bearer ${this.token()}`},Vn.defaults.adapter=Wv(Vn.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new xl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})}),Vn):H.has(window,"ProcessMaker.apiClient")&&window.ProcessMaker.isStub?window.ProcessMaker.apiClient:{get(){return Promise.resolve({data:{data:[]}})}}},get(...t){return this.apiInstance().get(...t)},post(...t){return this.apiInstance().post(...t)},delete(...t){return this.apiInstance().delete(...t)},token(){return localStorage.getItem("token")},baseURL(){return localStorage.getItem("baseURL")},getTasks(t){const e=H.get(window,"PM4ConfigOverrides.getTasksEndpoint","/tasks");return this.get(e+t).then(r=>(r.data.screen&&r.data.screen.nested&&this.addNestedScreenCache(r.data.screen.nested),r))},addNestedScreenCache(t){t.forEach(e=>{e.screen_id&&(e.id=e.screen_id);const r=this.screensCache.findIndex(a=>a.id===e.id);r>-1?this.screensCache.splice(r,1,e):this.screensCache.push(e)})},getScreen(t,e=""){if(!t)return null;const r=this.cachedScreenPromises.find(s=>s.id===t&&s.query===e);if(r)return r.screenPromise;const a=H.get(window,"PM4ConfigOverrides.getScreenEndpoint","/screens"),i=this.screensCache.find(s=>s.id===t);if(i)return Promise.resolve({data:i});const n=new Promise((s,o)=>{this.get(`${a}/${t}${e}`).then(u=>{u.data.nested&&this.addNestedScreenCache(u.data.nested),s(u)}).catch(u=>o(u))});return this.cachedScreenPromises.push({id:t,query:e,screenPromise:n}),n},flushScreenCache(){this.cachedScreenPromises.splice(0,this.cachedScreenPromises.length)},postScript(t,e,r={}){const a=H.get(window,"PM4ConfigOverrides.postScriptEndpoint","/scripts/execute/{id}");return this.post(a.replace("{id}",t)+this.authQueryString(),e,r)},postDataSource(t,e,r){let a;return e?a=`/requests/${e}/data_sources/${t}`:a=`/requests/data_sources/${t}`,a+=this.authQueryString(),this.post(a,r,{timeout:0})},getDataSource(t,e){if(!window.ProcessMaker.screen.cacheEnabled&&!window.ProcessMaker.screen.cacheTimeout)return this.postDataSource(t,null,e);let r=`/requests/data_sources/${t}/resources/${e.config.endpoint}/data`;return r+=this.authQueryString(),this.get(r,{useCache:window.ProcessMaker.screen.cacheEnabled,params:{pmds_config:JSON.stringify(e.config),pmds_data:JSON.stringify(e.data)}}).then(a=>a)},authQueryString(){const t=H.get(window,"PM4ConfigOverrides.authParams",null);let e="";return t&&(e=`?${new URLSearchParams(t).toString()}`),e},deleteFile(t,e=null){let r=`files/${t}`;return e&&(r+=`?token=${e}`),this.delete(r)},download(t){return this.apiInstance().get(t,{responseType:"blob"})},getCollections(){return this.get("/collections?per_page=1000").catch(t=>{throw t.response&&t.response.status===404?new Error(Me.t("Collections package not installed")):t})},getCollectionFields(t){return this.get(`/collections/${t}/columns?per_page=1000`).catch(e=>{throw e.response&&e.response.status===404?new Error(Me.t("Collection id not found")):e})},getCollectionRecords(t,e,r=null){return e.useCache=window.ProcessMaker.screen.cacheEnabled,this.get(`/collections/${t}/records${this.authQueryString()}`,e).then(a=>{const i=a?a.data:null;if(!i)throw new Error(Me.t("No data returned"));return[i,r]}).catch(a=>{if(a.response&&a.response.status===404)return[{data:[]},r];throw a})}};let Yn=typeof window>"u"?global:window;class Ti{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);this.element=e,Object.assign(this,r)}async countItems(e){throw e}}class UB extends Ti{async countItems(e){for(const r of this.element)await Ai(r,{screen:this.screen}).countItems(e)}}class GB extends Ti{async countItems(e){for(let r=0,a=this.element.config.length;r<a;r++)await Ai(this.element.config[r].items,{screen:this.element}).countItems(e)}}class HB extends Ti{async countItems(e){e.push(this.element);const r=await this.loadScreen(this.element.config.screen);r&&r[0]&&r[0].items&&await Ai(r[0].items,{screen:this.screen}).countItems(e)}async loadScreen(e){try{if(Yn.nestedScreens||(Yn.nestedScreens={}),Yn.nestedScreens["id_"+e])return Yn.nestedScreens["id_"+e];const r=await Cl.getScreen(e);return Yn.nestedScreens["id_"+e]=r.data.config,r.data.config}catch{return!1}}}class YB extends Ti{async countItems(e){e.push(this.element),await Ai(this.element.items,{screen:this.screen}).countItems(e)}}class QB extends Ti{async countItems(e){await Ai(this.element.items,{screen:this.screen}).countItems(e)}}class KB extends Ti{async countItems(e){e.push(this.element)}}function Ai(t,e){return t instanceof Array?new UB(t,e):t.config instanceof Array?new GB(t,e):t.component==="FormNestedScreen"?new HB(t,e):t.component==="FormMultiColumn"?new QB(t,e):t.component==="FormLoop"?new YB(t,e):new KB(t,e)}let Or=typeof window>"u"?global:window,Qn=[];class Fa{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);se(this,"data",{});se(this,"insideLoop",!1);this.element=e,Object.assign(this,r)}async addValidations(e){throw e}isVisible(){if(!(this.element.visibleInDevice===null||this.element.visibleInDevice===void 0?!0:this.element.visibleInDevice))return!1;let r=!0;if(this.element.config.conditionalHide)try{r=!!At.evaluate(this.element.config.conditionalHide,this.data)}catch{r=!1}return r}}class JB extends Fa{async addValidations(e){for(const r of this.element)await ha(r,{screen:this.screen,data:this.data,parentVisibilityRule:this.parentVisibilityRule,insideLoop:this.insideLoop}).addValidations(e)}}class ZB extends Fa{async addValidations(e){this.element.config[this.firstPage]&&(Qn=[this.firstPage],await ha(this.element.config[this.firstPage].items,{screen:this.element,data:this.data}).addValidations(e),Qn=[])}}class XB extends Fa{async addValidations(e){if(!this.isVisible())return;const r=await this.loadNestedScreen(this.element.config.screen);if(r&&r.config){const a=r.config;let i=this.parentVisibilityRule?this.parentVisibilityRule:this.element.config.conditionalHide;a&&a[0]&&a[0].items&&await ha(a[0].items,{screen:r,data:this.data,parentVisibilityRule:i}).addValidations(e)}}async loadNestedScreen(e){if(!e)return null;if(Or.nestedScreens||(Or.nestedScreens={}),Or.nestedScreens["id_"+e])return{config:Or.nestedScreens["id_"+e]};const r=await Cl.getScreen(e);return Or.nestedScreens["id_"+e]=r.data.config,{config:r.data}}async loadScreen(e){if(!e)return null;if(Or.nestedScreens||(Or.nestedScreens={}),Or.nestedScreens["id_"+e])return Or.nestedScreens["id_"+e];const r=await Cl.getScreen(e);return Or.nestedScreens["id_"+e]=r.data.config,r.data.config}}class eW extends Fa{async addValidations(e){if(!this.isVisible())return;H.set(e,this.element.config.name,{});const r=H.get(e,this.element.config.name);r.$each={},this.checkForSiblings(e);const a=(H.get(this.data,this.element.config.name)||[{}])[0];await ha(this.element.items,{screen:this.screen,data:{_parent:this.data,...a},parentVisibilityRule:this.element.config.conditionalHide,insideLoop:!0}).addValidations(r.$each)}checkForSiblings(e){const r=[],a=[];if(this.screen.config.forEach(i=>{!i||!i.items||(i.items.filter(n=>{n.component==="FormLoop"&&n.config.name===this.element.config.name&&r.push(n)}),r&&r.forEach(n=>{n.items.filter(s=>{s.config.validation&&s.config.validation.forEach(o=>{const u=this.camelCase(o.value.split(":")[0]),l=nl[u],c={};let d={};d[u]=l,c[s.config.name]=d,H.merge(a,c)})})}))}),Object.keys(a).length!=0){const i=H.get(e,this.element.config.name);i.hasOwnProperty("$each")&&H.merge(i.$each,a),H.set(e[this.element.config.name].$each,i)}}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}class tW extends Fa{async addValidations(e){this.isVisible()&&await ha(this.element.items,{screen:this.screen,data:this.data,parentVisibilityRule:this.element.config.conditionalHide}).addValidations(e)}}class rW extends Fa{async addValidations(e){if(!this.isVisible())return;const r=this.element.config.eventData;let a="Empty Screen";this.screen.config[r]&&this.screen.config[r].name&&(a=this.screen.config[r].name);const i=`${a}-${r}`;Qn.length>0&&!Qn.includes(i)&&this.screen.config[r]&&this.screen.config[r].items&&(Qn.push(i),await ha(this.screen.config[this.element.config.eventData].items,{screen:this.screen,data:this.data}).addValidations(e))}}class aW extends Fa{async addValidations(e){if(this.element.config&&this.element.config.readonly||this.element.config&&this.element.config.disabled||!(this.element.config&&this.element.config.name&&typeof this.element.config.name=="string"&&this.element.config.name.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)))return;const r=this.element.config.name,a=this.element.config.validation,i=this.element.config.conditionalHide,n=this.parentVisibilityRule,s=this.insideLoop||!1,o=this.element.config.deviceVisibility?this.element.config.deviceVisibility:{showForDesktop:!0,showForMobile:!0};H.set(e,r,H.get(e,r,{}));const u=H.get(e,r);if(a instanceof Array)a.forEach(l=>{const c=this.camelCase(l.value.split(":")[0]);if(!c)return;let d=nl[c];if(d){if(l.configs instanceof Array){const p=[];l.configs.forEach(v=>{p.push(v.value)}),p.push(r),d=d(...p)}u[c]=function(...p){const v=p[1],_=r.split(".").length-1,h=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(v),_);if(n){const x=s?1:0,b=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(v),_+x);let f=!0;try{f=!!At.evaluate(n,b)}catch{f=!1}if(!f)return!0}let y=!0;try{const x=this.$root.$children[0].$refs.renderer.definition.isMobile;y=x&&o.showForMobile||!x&&o.showForDesktop}catch{y=!0}if(!y)return!0;let S=!0;if(i)try{S=!!At.evaluate(i,h)}catch{S=!1}return S?d.apply(this,p):!0}}});else if(typeof a=="string"&&a){let l=nl[a];if(!l)return;u[a]=function(...c){const d=c[1],p=r.split(".").length-1,v=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),p);if(n){const h=s?1:0,y=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),p+h);let S=!0;try{S=!!At.evaluate(n,y)}catch{S=!1}if(!S)return!0}let _=!0;if(i)try{_=!!At.evaluate(i,v)}catch{_=!1}return _?l.apply(this,c):!0}}this.element.items&&ha(this.element.items,{screen:this.screen,data:this.data}).addValidations(e)}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}function ha(t,e){return t instanceof Array?new JB(t,e):t.config instanceof Array?new ZB(t,e):t.component==="FormNestedScreen"?new XB(t,e):t.component==="FormMultiColumn"?new tW(t,e):t.component==="FormLoop"?new eW(t,e):(t.component,t.component==="FormButton"&&t.config.event==="pageNavigate"?new rW(t,e):new aW(t,e))}let Kn;const ib={mixins:ov,props:{value:Object,_parent:null,definition:Object,components:{type:Object,default(){return{}}},showErrors:{type:Boolean,default:!1},testScreenDefinition:{type:Boolean,default:!1}},data(){return{references__:[],debugCmp:null,component:null,alias:{},extensions:[],nodeNameProperty:"component",variables:[],variablesTree:[],initialize:[],ownerDocument:window.document,updatedConfigs:[],building:{show:!1,error:"",component:"",errors:[]}}},methods:{dot2bracket(t){return t.replace(/\.\d/g,e=>`[${e.substr(1)}]`)},submit(t,e=!1,r=null){this.$emit("submit",this.value,e,r)},buildComponent(t){window.ProcessMaker&&window.ProcessMaker.EventBus&&window.ProcessMaker.EventBus.$emit("screen-renderer-build-component",this);const e=this.componentDefinition(t);if(!this.testScreenDefinition)return e;const r=this.$root.constructor,a=r.config.warnHandler,i=r.config.errorHandler,n=[];this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;let s;try{r.config.warnHandler=u=>{n.push(u)},r.config.errorHandler=u=>{n.push(u)},s=r.component("ScreenRendered",e);const o=new s({propsData:{vdata:{}}});if(o.$parent=this,o.$mount(),n.length>0)throw this.$t("Building error");return this.codigo=e,e}catch(o){return console.error(o),this.building.error=o,this.building.component=e,this.building.errors=n,this.building.show=!0,e||{template:"<div></div>"}}finally{r.config.warnHandler=a,r.config.errorHandler=i}},parse(t,e){const r=this.ownerDocument.createElement("div");return this.loadPages(e,r,t),"<div>"+r.innerHTML+"</div>"},loadPages(t,e,r){const a=t.config;this.variables.splice(0),this.extensions.forEach(i=>i.beforeload instanceof Function&&i.beforeload.bind(this)({pages:a,owner:e,definition:t})),a.forEach((i,n)=>{if(i){const s=this.createComponent("div",{name:i.name,class:"page","v-if":`currentPage__==${n}`,key:`page-${n}`});this.loadItems(i.items,s,r,t,n),e.appendChild(s)}})},escapeVuePropertyName(t){return t.substr(0,1)==="@"?t.replace("@","v-on:"):this.snakeCase(t)},snakeCase(t){return t.replace(/[A-Z]/g,e=>`-${e}`).toLowerCase().replace(/^-/,"")},camelCase(t){return t.replace(/_\w/g,e=>e.substr(1,1).toUpperCase())},updateComponentConfig(t,e){this.updatedConfigs.push({name:t,properties:e})},mergeUpdatedConfig(t,e){let r=this.updatedConfigs.find(a=>a.name===t);if(r){let a=r.properties;for(let i in a)e[i]===void 0&&(e[i]=a[i])}return e},createComponent(t,e){e=this.mergeUpdatedConfig(t,this.setDefaultPropertyValues(e)),t=this.snakeCase(t);const r=this.ownerDocument.createElement(t);for(let a in e){const i=e[a];i!==!1&&i!==null&&i!==void 0&&(a.substr(0,1)===":"||typeof i=="string"&&i.indexOf("{{")===-1?r.setAttribute(this.escapeVuePropertyName(a),i):typeof i=="string"&&i.indexOf("{{")!==-1&&!e.ignoreMustache?r.setAttribute(":"+this.escapeVuePropertyName(a),"mustache("+this.byValue(i)+")"):i!==void 0&&r.setAttribute(":"+this.escapeVuePropertyName(a),this.byRef(i)))}return r},byValue(t){return JSON.stringify(t).replace("{{","{{").replace("}}","}}")},byRef(t){const r=`references__[${this.references__.indexOf(t)>-1?this.references__.indexOf(t):this.references__.length}]`;return this.references__.push(t),r},loadItems(t,e,r,a,i){t.forEach(n=>{const s=n[this.nodeNameProperty],o=this.alias[s]||s,u={...n.config};this.extensions.forEach(d=>d.onloadproperties instanceof Function&&d.onloadproperties.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,screen:r,definition:a,formIndex:i}));const l=this.createComponent(o,u),c=this.ownerDocument.createElement("div");c.appendChild(l),this.extensions.forEach(d=>d.onloaditems instanceof Function&&d.onloaditems.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,node:l,wrapper:c,screen:r,definition:a,formIndex:i})),e.appendChild(c)})},setDefaultPropertyValues(t){let e={...t};return(typeof e.ariaLabel>"u"||e.ariaLabel===null||e.ariaLabel==="")&&e.label&&(e.ariaLabel=e.label),e.tabindex&&(e.tabindex=parseInt(e.tabindex)),e},validVariableName(t){return t&&typeof t=="string"&&t.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)},isComputedVariable(t,e){return e.computed&&e.computed.some(r=>new RegExp(`^${r.property}(\\.|$)`,"i").test(t))},registerVariable(t,e={}){if(t&&t.startsWith("_parent.")||t&&t.includes("._parent.")||!this.validVariableName(t))return;const r=H.get(e,"config",{});this.variables.find(i=>i.name===t)||(this.variables.push({name:t,config:r,element:e}),this.variablesTree.push({name:t,config:r,element:e}))},registerNestedVariable(t,e,r){const a=Kn.getVariablesTree(r);this.variablesTree.push({name:t,prefix:e,config:{},items:a}),Kn.getVariablesTree({config:[]})},getVariablesTree(t){let e;try{e={mixins:[ad],components:{},props:{},computed:{},methods:{},data:{},watch:{},mounted:[]},this.variablesTree=[];const r=this.parse(e,t);return this.extensions.forEach(a=>{a.onparse instanceof Function&&a.onparse.bind(this)({screen:e,template:r,definition:t})}),this.variablesTree}catch(r){return console.error(r),this.variablesTree}},elementCssClass(t){const e=[];return t.config.bgcolor&&e.push(t.config.bgcolor),t.config.color&&e.push(t.config.color),e.join(" ")},componentDefinition(t){let e;this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;try{e={mixins:[ad],components:{},props:{},computed:{},methods:{},created:[],data:{},watch:{},mounted:[]};const r=this.parse(e,t);this.extensions.forEach(n=>{n.onparse instanceof Function&&n.onparse.bind(this)({screen:e,template:r,definition:t})}),e.template=r,this.extensions.forEach(n=>{n.onbuild instanceof Function&&n.onbuild.bind(this)({screen:e,definition:t})});const a=["currentPage__"],i=`let value;const data = {};
269
269
  ${Object.keys(e.data).map(n=>{const{code:s,variable:o}=e.data[n];return`value = ${s};
270
270
  data.${this.safeDotName(n)} = value;
271
271
  ${!o||a.includes(o)||o.endsWith("__")?"":`this.setValue(${JSON.stringify(o)}, value, this.vdata);`}`}).join(`
@@ -273,7 +273,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
273
273
  return data;`;return e.data=new Function(i),Object.keys(e.watch).forEach(n=>{const s={deep:!0};e.watch[n].forEach(o=>Object.assign(s,o.options)),s.handler=new Function("value",e.watch[n].map(o=>`try{${o.code}}catch(e){console.warn(e)}`).join(`
274
274
  `)),e.watch[n]=s}),this.addValidationRulesLoader(e,t),e.created=new Function(e.created.join(`
275
275
  `)),e.mounted=new Function(e.mounted.join(`
276
- `)),e}catch(r){return console.error(r),this.building.error=r,this.building.component=e,this.building.errors=[],this.building.show=!0,e||{template:"<div></div>"}}},addProp(t,e,r){t.props[e]=r},addData(t,e,r,a=null){t.data[e]={code:r,variable:a}},addComputed(t,e,r,a){t.computed[e]={get:new Function(r),set:new Function("value",a)}},addWatch(t,e,r,a={}){t.watch[e]?t.watch[e].push({code:r,options:a}):t.watch[e]=[{code:r,options:a}]},addMounted(t,e){t.mounted.push(e)},addCreated(t,e){t.created.push(e)},addEvent(t,e,r){t[`@${e}`]=r},addValidationRulesLoader(t,e){const r=parseInt(this.currentPage)||0,a=(i,n)=>new Promise(s=>{i.ValidationRules__=n,i.$nextTick(()=>{try{i.$v&&i.$v.$touch()}catch(o){this.getMode()==="preview"&&console.warn("There was a problem rendering the screen",o)}finally{s()}})});t.methods.loadValidationRules=async function(){const i={};await ha(e,{screen:e,firstPage:r,data:{_parent:this._parent,...this.vdata}}).addValidations(i),await a(this,i)},t.mounted.push("this.loadValidationRules(true)")},countElements(t){return new Promise(e=>{const r=[];Ai(t,{screen:t}).countItems(r).then(()=>{e(r)})})}},mounted(){Kn||(Kn=new this.constructor({propsData:{value:{},definition:{config:[]}}}),Kn.$mount())}},nb={props:{value:null,placeholder:String,trackBy:{type:String,default:"id"},label:{type:String,default:"name"},api:{type:String,default:"process"},multiple:{type:Boolean,default:!1},storeId:{type:Boolean,default:!0}},data(){return{pmql:null,options:[],selectedOption:null,fields:null}},watch:{value:{immediate:!0,handler(t){this.selectedOption=this.storeId?this.options.find(e=>H.get(e,this.trackBy)==t):t,t&&!this.selectedOption&&this.loadSelected(t)}}},methods:{change(t){this.$emit("input",this.storeId?H.get(t,this.trackBy):t)},loadOptions(t){const e=this.pmql,r=this.fields||void 0;window.ProcessMaker.apiClient.get(this.api,{params:{filter:t,pmql:e,fields:r}}).then(a=>{this.options=a.data.data||[]})},loadSelected(t){window.ProcessMaker.apiClient.get(`${this.api}/${t}`).then(e=>{this.selectedOption=e.data})}},mounted(){this.loadOptions=cm(this.loadOptions,1e3)}},Md={methods:{mustache(t,e){const r=H.get(e,t);try{return t.indexOf("{{")>-1?_r.render(t,e):r}catch{return r}}}},sb={methods:{shouldElementBeVisible(t){const{conditionalHide:e}=t.config;if(!e)return!0;try{return!!At.evaluate(e,this.transientData)}catch{return!1}}}};let ob;window.testing={builder:null,onready:new Promise(t=>ob=t),addControlByType(t,e=null){const r=this.builder.controls.find(a=>a.component===t);this.builder.testingAddControl(r,e)},addControlByLabel(t,e=null){const r=this.builder.controls.find(a=>a.label===t);this.builder.testingAddControl(r,e)},removeControl(t){this.builder.testingDeleteItem(t)},showControlsTypes(){const t=this.builder.controls.map(e=>e.component);console.log(t)},showControlsLabels(){const t=this.builder.controls.map(e=>e.label);console.log(t)}};const lb={data(){return window.testing.builder=this,{}},methods:{testingAddControl(t,e){const r=this.cloneControl(t);e?H.get(this,e).push(r):this.config[this.currentPage].items.push(r),this.updateState(),this.inspect(r)},testingDeleteItem(t){this.config[this.currentPage].items.splice(t,1),this.updateState()}},mounted(){this.$nextTick(()=>ob())}},iW={mixins:[$c],props:["variant","label","event","eventData","name","fieldValue","value","tooltip","transientData","loading","loadingLabel"],data(){return{showSpinner:!1}},computed:{...Pt.mapState("globalErrorsModule",["valid"]),classList(){return{btn:!0,["btn-"+(this.variant||"primary")]:!0,disabled:this.event==="submit"&&!this.valid}},options(){if(!this.tooltip||this.event==="submit")return{};let t="";try{t=_r.render(this.tooltip.content||"",this.transientData)}catch{}return{title:t,html:!0,placement:this.tooltip.position||"",trigger:"hover",variant:this.tooltip.variant||"",boundary:"window"}}},methods:{setValue(t,e,r){t&&(t.items?this.setValue(t.$parent,e,r):this.setValue(t.data,this.getValidPath(e),r))},async click(){if(this.event==="script"){const t=this.fieldValue||"1",e=this.value==t?null:t;this.$emit("input",e)}if(this.event!=="pageNavigate"&&this.name&&this.setValue(this.$parent,this.name,this.fieldValue),this.event==="submit"){this.loading&&this.valid&&(this.showSpinner=!0),this.$emit("input",this.fieldValue),this.$nextTick(()=>{this.$emit("submit",this.eventData,this.loading)});return}this.$emit(this.event,this.eventData),this.event==="pageNavigate"&&this.$emit("page-navigate",this.eventData)}}};var nW=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group",staticStyle:{"overflow-x":"hidden"}},[r("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip",value:e.options,expression:"options"}],class:e.classList,attrs:{name:e.name,"aria-label":e.$attrs["aria-label"],tabindex:e.$attrs.tabindex,disabled:e.showSpinner},on:{click:e.click}},[e.showSpinner?r("b-spinner",{attrs:{small:""}}):e._e(),e._v(" "+e._s(e.showSpinner?e.loadingLabel?e.loadingLabel:"Loading...":e.label)+" ")],1)])},sW=[],oW=oe(iW,nW,sW,!1,null,null,null,null);const qa=oW.exports,WX="",lW={props:["id","image","width","height","name","renderImage","variableName","validationData","imageName"],data(){return{mode:this.$root.$children[0].mode}},computed:{imageUrl(){if(this.mode!=="editor")return H.get(this.getScreenDataReference(),this.variableName||this.imageName)}}};var uW=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group form-image",staticStyle:{"overflow-x":"hidden"}},[e.renderImage?r("img",{attrs:{src:e.imageUrl,width:e.width,height:e.height,name:e.variableName}}):!e.renderImage&&e.image?r("img",{attrs:{src:e.image,width:e.width,height:e.height,id:e.id}}):e.mode=="editor"?r("i",{staticClass:"empty-image far fa-image"}):e._e()])},cW=[],dW=oe(lW,uW,cW,!1,null,"44c7823c",null,null);const Jn=dW.exports;var ub={exports:{}};(function(t,e){(function(r,a){t.exports=a()})(wt,function(){return function(r){function a(n){if(i[n])return i[n].exports;var s=i[n]={i:n,l:!1,exports:{}};return r[n].call(s.exports,s,s.exports,a),s.l=!0,s.exports}var i={};return a.m=r,a.c=i,a.i=function(n){return n},a.d=function(n,s,o){a.o(n,s)||Object.defineProperty(n,s,{configurable:!1,enumerable:!0,get:o})},a.n=function(n){var s=n&&n.__esModule?function(){return n.default}:function(){return n};return a.d(s,"a",s),s},a.o=function(n,s){return Object.prototype.hasOwnProperty.call(n,s)},a.p=".",a(a.s=10)}([function(r,a){r.exports={"#":{pattern:/\d/},X:{pattern:/[0-9a-zA-Z]/},S:{pattern:/[a-zA-Z]/},A:{pattern:/[a-zA-Z]/,transform:function(i){return i.toLocaleUpperCase()}},a:{pattern:/[a-zA-Z]/,transform:function(i){return i.toLocaleLowerCase()}},"!":{escape:!0}}},function(r,a,i){function n(l){var c=document.createEvent("Event");return c.initEvent(l,!0,!0),c}var s=i(2),o=i(0),u=i.n(o);a.a=function(l,c){var d=c.value;if((Array.isArray(d)||typeof d=="string")&&(d={mask:d,tokens:u.a}),l.tagName.toLocaleUpperCase()!=="INPUT"){var p=l.getElementsByTagName("input");if(p.length!==1)throw new Error("v-mask directive requires 1 input, found "+p.length);l=p[0]}l.oninput=function(_){if(_.isTrusted){var h=l.selectionEnd,y=l.value[h-1];for(l.value=i.i(s.a)(l.value,d.mask,!0,d.tokens);h<l.value.length&&l.value.charAt(h-1)!==y;)h++;l===document.activeElement&&(l.setSelectionRange(h,h),setTimeout(function(){l.setSelectionRange(h,h)},0)),l.dispatchEvent(n("input"))}};var v=i.i(s.a)(l.value,d.mask,!0,d.tokens);v!==l.value&&(l.value=v,l.dispatchEvent(n("input")))}},function(r,a,i){var n=i(6),s=i(5);a.a=function(o,u){var l=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],c=arguments[3];return Array.isArray(u)?i.i(s.a)(n.a,u,c)(o,u,l,c):i.i(n.a)(o,u,l,c)}},function(r,a,i){function n(p){p.component(c.a.name,c.a),p.directive("mask",u.a)}Object.defineProperty(a,"__esModule",{value:!0});var s=i(0),o=i.n(s),u=i(1),l=i(7),c=i.n(l);i.d(a,"TheMask",function(){return c.a}),i.d(a,"mask",function(){return u.a}),i.d(a,"tokens",function(){return o.a}),i.d(a,"version",function(){return d});var d="0.11.1";a.default=n,typeof window<"u"&&window.Vue&&window.Vue.use(n)},function(r,a,i){Object.defineProperty(a,"__esModule",{value:!0});var n=i(1),s=i(0),o=i.n(s),u=i(2);a.default={name:"TheMask",props:{value:[String,Number],mask:{type:[String,Array],required:!0},masked:{type:Boolean,default:!1},tokens:{type:Object,default:function(){return o.a}}},directives:{mask:n.a},data:function(){return{lastValue:null,display:this.value}},watch:{value:function(l){l!==this.lastValue&&(this.display=l)},masked:function(){this.refresh(this.display)}},computed:{config:function(){return{mask:this.mask,tokens:this.tokens,masked:this.masked}}},methods:{onInput:function(l){l.isTrusted||this.refresh(l.target.value)},refresh:function(c){this.display=c;var c=i.i(u.a)(c,this.mask,this.masked,this.tokens);c!==this.lastValue&&(this.lastValue=c,this.$emit("input",c))}}}},function(r,a,i){function n(s,o,u){return o=o.sort(function(l,c){return l.length-c.length}),function(l,c){for(var d=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],p=0;p<o.length;){var v=o[p];p++;var _=o[p];if(!(_&&s(l,_,!0,u).length>v.length))return s(l,v,d,u)}return""}}a.a=n},function(r,a,i){function n(s,o){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],l=arguments[3];s=s||"",o=o||"";for(var c=0,d=0,p="";c<o.length&&d<s.length;){var v=o[c],_=l[v],h=s[d];_&&!_.escape?(_.pattern.test(h)&&(p+=_.transform?_.transform(h):h,c++),d++):(_&&_.escape&&(c++,v=o[c]),u&&(p+=v),h===v&&d++,c++)}for(var y="";c<o.length&&u;){var v=o[c];if(l[v]){y="";break}y+=v,c++}return p+y}a.a=n},function(r,a,i){var n=i(8)(i(4),i(9),null,null);r.exports=n.exports},function(r,a){r.exports=function(i,n,s,o){var u,l=i=i||{},c=typeof i.default;c!=="object"&&c!=="function"||(u=i,l=i.default);var d=typeof l=="function"?l.options:l;if(n&&(d.render=n.render,d.staticRenderFns=n.staticRenderFns),s&&(d._scopeId=s),o){var p=d.computed||(d.computed={});Object.keys(o).forEach(function(v){var _=o[v];p[v]=function(){return _}})}return{esModule:u,exports:l,options:d}}},function(r,a){r.exports={render:function(){var i=this,n=i.$createElement;return(i._self._c||n)("input",{directives:[{name:"mask",rawName:"v-mask",value:i.config,expression:"config"}],attrs:{type:"text"},domProps:{value:i.display},on:{input:i.onInput}})},staticRenderFns:[]}},function(r,a,i){r.exports=i(3)}])})})(ub);var pW=ub.exports,cb={exports:{}};/*!
276
+ `)),e}catch(r){return console.error(r),this.building.error=r,this.building.component=e,this.building.errors=[],this.building.show=!0,e||{template:"<div></div>"}}},addProp(t,e,r){t.props[e]=r},addData(t,e,r,a=null){t.data[e]={code:r,variable:a}},addComputed(t,e,r,a){t.computed[e]={get:new Function(r),set:new Function("value",a)}},addWatch(t,e,r,a={}){t.watch[e]?t.watch[e].push({code:r,options:a}):t.watch[e]=[{code:r,options:a}]},addMounted(t,e){t.mounted.push(e)},addCreated(t,e){t.created.push(e)},addEvent(t,e,r){t[`@${e}`]=r},addValidationRulesLoader(t,e){const r=parseInt(this.currentPage)||0,a=(i,n)=>new Promise(s=>{i.ValidationRules__=n,i.$nextTick(()=>{try{i.$v&&i.$v.$touch()}catch(o){this.getMode()==="preview"&&console.warn("There was a problem rendering the screen",o)}finally{s()}})});t.methods.loadValidationRules=async function(){const i={};await ha(e,{screen:e,firstPage:r,data:{_parent:this._parent,...this.vdata}}).addValidations(i),await a(this,i)},t.mounted.push("this.loadValidationRules(true)")},countElements(t){return new Promise(e=>{const r=[];Ai(t,{screen:t}).countItems(r).then(()=>{e(r)})})}},mounted(){Kn||(Kn=new this.constructor({propsData:{value:{},definition:{config:[]}}}),Kn.$mount())}},nb={props:{value:null,placeholder:String,trackBy:{type:String,default:"id"},label:{type:String,default:"name"},api:{type:String,default:"process"},multiple:{type:Boolean,default:!1},storeId:{type:Boolean,default:!0}},data(){return{pmql:null,options:[],selectedOption:null,fields:null}},watch:{value:{immediate:!0,handler(t){this.selectedOption=this.storeId?this.options.find(e=>H.get(e,this.trackBy)==t):t,t&&!this.selectedOption&&this.loadSelected(t)}}},methods:{change(t){this.$emit("input",this.storeId?H.get(t,this.trackBy):t)},loadOptions(t){const e=this.pmql,r=this.fields||void 0;window.ProcessMaker.apiClient.get(this.api,{params:{filter:t,pmql:e,fields:r}}).then(a=>{this.options=a.data.data||[]})},loadSelected(t){window.ProcessMaker.apiClient.get(`${this.api}/${t}`).then(e=>{this.selectedOption=e.data})}},mounted(){this.loadOptions=cm(this.loadOptions,1e3)}},Md={methods:{mustache(t,e){const r=H.get(e,t);try{return t.indexOf("{{")>-1?_r.render(t,e):r}catch{return r}}}},sb={methods:{shouldElementBeVisible(t){const{conditionalHide:e}=t.config;if(!e)return!0;try{return!!At.evaluate(e,this.transientData)}catch{return!1}}}};let ob;window.testing={builder:null,onready:new Promise(t=>ob=t),addControlByType(t,e=null){const r=this.builder.controls.find(a=>a.component===t);this.builder.testingAddControl(r,e)},addControlByLabel(t,e=null){const r=this.builder.controls.find(a=>a.label===t);this.builder.testingAddControl(r,e)},removeControl(t){this.builder.testingDeleteItem(t)},showControlsTypes(){const t=this.builder.controls.map(e=>e.component);console.log(t)},showControlsLabels(){const t=this.builder.controls.map(e=>e.label);console.log(t)}};const lb={data(){return window.testing.builder=this,{}},methods:{testingAddControl(t,e){const r=this.cloneControl(t);e?H.get(this,e).push(r):this.config[this.currentPage].items.push(r),this.updateState(),this.inspect(r)},testingDeleteItem(t){this.config[this.currentPage].items.splice(t,1),this.updateState()}},mounted(){this.$nextTick(()=>ob())}},iW={mixins:[$c],props:["variant","label","event","eventData","name","fieldValue","value","tooltip","transientData","loading","loadingLabel"],data(){return{showSpinner:!1}},computed:{...Pt.mapState("globalErrorsModule",["valid"]),classList(){return{btn:!0,["btn-"+(this.variant||"primary")]:!0,disabled:this.event==="submit"&&!this.valid}},options(){if(!this.tooltip||this.event==="submit")return{};let t="";try{t=_r.render(this.tooltip.content||"",this.transientData)}catch{}return{title:t,html:!0,placement:this.tooltip.position||"",trigger:"hover",variant:this.tooltip.variant||"",boundary:"window"}},buttonInfo(){return{name:this.name,label:this.label,value:this.fieldValue}}},methods:{setValue(t,e,r){t&&(t.items?this.setValue(t.$parent,e,r):this.setValue(t.data,this.getValidPath(e),r))},async click(){if(this.event==="script"){const t=this.fieldValue||"1",e=this.value==t?null:t;this.$emit("input",e)}if(this.event!=="pageNavigate"&&this.name&&this.setValue(this.$parent,this.name,this.fieldValue),this.event==="submit"){this.loading&&this.valid&&(this.showSpinner=!0),this.$emit("input",this.fieldValue),this.$nextTick(()=>{this.$emit("submit",this.eventData,this.loading,this.buttonInfo)});return}this.$emit(this.event,this.eventData),this.event==="pageNavigate"&&this.$emit("page-navigate",this.eventData)}}};var nW=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group",staticStyle:{"overflow-x":"hidden"}},[r("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip",value:e.options,expression:"options"}],class:e.classList,attrs:{name:e.name,"aria-label":e.$attrs["aria-label"],tabindex:e.$attrs.tabindex,disabled:e.showSpinner},on:{click:e.click}},[e.showSpinner?r("b-spinner",{attrs:{small:""}}):e._e(),e._v(" "+e._s(e.showSpinner?e.loadingLabel?e.loadingLabel:"Loading...":e.label)+" ")],1)])},sW=[],oW=oe(iW,nW,sW,!1,null,null,null,null);const qa=oW.exports,WX="",lW={props:["id","image","width","height","name","renderImage","variableName","validationData","imageName"],data(){return{mode:this.$root.$children[0].mode}},computed:{imageUrl(){if(this.mode!=="editor")return H.get(this.getScreenDataReference(),this.variableName||this.imageName)}}};var uW=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group form-image",staticStyle:{"overflow-x":"hidden"}},[e.renderImage?r("img",{attrs:{src:e.imageUrl,width:e.width,height:e.height,name:e.variableName}}):!e.renderImage&&e.image?r("img",{attrs:{src:e.image,width:e.width,height:e.height,id:e.id}}):e.mode=="editor"?r("i",{staticClass:"empty-image far fa-image"}):e._e()])},cW=[],dW=oe(lW,uW,cW,!1,null,"44c7823c",null,null);const Jn=dW.exports;var ub={exports:{}};(function(t,e){(function(r,a){t.exports=a()})(wt,function(){return function(r){function a(n){if(i[n])return i[n].exports;var s=i[n]={i:n,l:!1,exports:{}};return r[n].call(s.exports,s,s.exports,a),s.l=!0,s.exports}var i={};return a.m=r,a.c=i,a.i=function(n){return n},a.d=function(n,s,o){a.o(n,s)||Object.defineProperty(n,s,{configurable:!1,enumerable:!0,get:o})},a.n=function(n){var s=n&&n.__esModule?function(){return n.default}:function(){return n};return a.d(s,"a",s),s},a.o=function(n,s){return Object.prototype.hasOwnProperty.call(n,s)},a.p=".",a(a.s=10)}([function(r,a){r.exports={"#":{pattern:/\d/},X:{pattern:/[0-9a-zA-Z]/},S:{pattern:/[a-zA-Z]/},A:{pattern:/[a-zA-Z]/,transform:function(i){return i.toLocaleUpperCase()}},a:{pattern:/[a-zA-Z]/,transform:function(i){return i.toLocaleLowerCase()}},"!":{escape:!0}}},function(r,a,i){function n(l){var c=document.createEvent("Event");return c.initEvent(l,!0,!0),c}var s=i(2),o=i(0),u=i.n(o);a.a=function(l,c){var d=c.value;if((Array.isArray(d)||typeof d=="string")&&(d={mask:d,tokens:u.a}),l.tagName.toLocaleUpperCase()!=="INPUT"){var p=l.getElementsByTagName("input");if(p.length!==1)throw new Error("v-mask directive requires 1 input, found "+p.length);l=p[0]}l.oninput=function(_){if(_.isTrusted){var h=l.selectionEnd,y=l.value[h-1];for(l.value=i.i(s.a)(l.value,d.mask,!0,d.tokens);h<l.value.length&&l.value.charAt(h-1)!==y;)h++;l===document.activeElement&&(l.setSelectionRange(h,h),setTimeout(function(){l.setSelectionRange(h,h)},0)),l.dispatchEvent(n("input"))}};var v=i.i(s.a)(l.value,d.mask,!0,d.tokens);v!==l.value&&(l.value=v,l.dispatchEvent(n("input")))}},function(r,a,i){var n=i(6),s=i(5);a.a=function(o,u){var l=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],c=arguments[3];return Array.isArray(u)?i.i(s.a)(n.a,u,c)(o,u,l,c):i.i(n.a)(o,u,l,c)}},function(r,a,i){function n(p){p.component(c.a.name,c.a),p.directive("mask",u.a)}Object.defineProperty(a,"__esModule",{value:!0});var s=i(0),o=i.n(s),u=i(1),l=i(7),c=i.n(l);i.d(a,"TheMask",function(){return c.a}),i.d(a,"mask",function(){return u.a}),i.d(a,"tokens",function(){return o.a}),i.d(a,"version",function(){return d});var d="0.11.1";a.default=n,typeof window<"u"&&window.Vue&&window.Vue.use(n)},function(r,a,i){Object.defineProperty(a,"__esModule",{value:!0});var n=i(1),s=i(0),o=i.n(s),u=i(2);a.default={name:"TheMask",props:{value:[String,Number],mask:{type:[String,Array],required:!0},masked:{type:Boolean,default:!1},tokens:{type:Object,default:function(){return o.a}}},directives:{mask:n.a},data:function(){return{lastValue:null,display:this.value}},watch:{value:function(l){l!==this.lastValue&&(this.display=l)},masked:function(){this.refresh(this.display)}},computed:{config:function(){return{mask:this.mask,tokens:this.tokens,masked:this.masked}}},methods:{onInput:function(l){l.isTrusted||this.refresh(l.target.value)},refresh:function(c){this.display=c;var c=i.i(u.a)(c,this.mask,this.masked,this.tokens);c!==this.lastValue&&(this.lastValue=c,this.$emit("input",c))}}}},function(r,a,i){function n(s,o,u){return o=o.sort(function(l,c){return l.length-c.length}),function(l,c){for(var d=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],p=0;p<o.length;){var v=o[p];p++;var _=o[p];if(!(_&&s(l,_,!0,u).length>v.length))return s(l,v,d,u)}return""}}a.a=n},function(r,a,i){function n(s,o){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],l=arguments[3];s=s||"",o=o||"";for(var c=0,d=0,p="";c<o.length&&d<s.length;){var v=o[c],_=l[v],h=s[d];_&&!_.escape?(_.pattern.test(h)&&(p+=_.transform?_.transform(h):h,c++),d++):(_&&_.escape&&(c++,v=o[c]),u&&(p+=v),h===v&&d++,c++)}for(var y="";c<o.length&&u;){var v=o[c];if(l[v]){y="";break}y+=v,c++}return p+y}a.a=n},function(r,a,i){var n=i(8)(i(4),i(9),null,null);r.exports=n.exports},function(r,a){r.exports=function(i,n,s,o){var u,l=i=i||{},c=typeof i.default;c!=="object"&&c!=="function"||(u=i,l=i.default);var d=typeof l=="function"?l.options:l;if(n&&(d.render=n.render,d.staticRenderFns=n.staticRenderFns),s&&(d._scopeId=s),o){var p=d.computed||(d.computed={});Object.keys(o).forEach(function(v){var _=o[v];p[v]=function(){return _}})}return{esModule:u,exports:l,options:d}}},function(r,a){r.exports={render:function(){var i=this,n=i.$createElement;return(i._self._c||n)("input",{directives:[{name:"mask",rawName:"v-mask",value:i.config,expression:"config"}],attrs:{type:"text"},domProps:{value:i.display},on:{input:i.onInput}})},staticRenderFns:[]}},function(r,a,i){r.exports=i(3)}])})})(ub);var pW=ub.exports,cb={exports:{}};/*!
277
277
  * dist/inputmask
278
278
  * https://github.com/RobinHerbots/Inputmask
279
279
  * Copyright (c) 2010 - 2023 Robin Herbots
@@ -336,10 +336,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
336
336
  }`},"keyframe-block-list":{syntax:"<keyframe-block>+"},"keyframe-selector":{syntax:"from | to | <percentage>"},"leader()":{syntax:"leader( <leader-type> )"},"leader-type":{syntax:"dotted | solid | space | <string>"},"length-percentage":{syntax:"<length> | <percentage>"},"line-names":{syntax:"'[' <custom-ident>* ']'"},"line-name-list":{syntax:"[ <line-names> | <name-repeat> ]+"},"line-style":{syntax:"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset"},"line-width":{syntax:"<length> | thin | medium | thick"},"linear-color-hint":{syntax:"<length-percentage>"},"linear-color-stop":{syntax:"<color> <color-stop-length>?"},"linear-gradient()":{syntax:"linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )"},"mask-layer":{syntax:"<mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || <geometry-box> || [ <geometry-box> | no-clip ] || <compositing-operator> || <masking-mode>"},"mask-position":{syntax:"[ <length-percentage> | left | center | right ] [ <length-percentage> | top | center | bottom ]?"},"mask-reference":{syntax:"none | <image> | <mask-source>"},"mask-source":{syntax:"<url>"},"masking-mode":{syntax:"alpha | luminance | match-source"},"matrix()":{syntax:"matrix( <number>#{6} )"},"matrix3d()":{syntax:"matrix3d( <number>#{16} )"},"max()":{syntax:"max( <calc-sum># )"},"media-and":{syntax:"<media-in-parens> [ and <media-in-parens> ]+"},"media-condition":{syntax:"<media-not> | <media-and> | <media-or> | <media-in-parens>"},"media-condition-without-or":{syntax:"<media-not> | <media-and> | <media-in-parens>"},"media-feature":{syntax:"( [ <mf-plain> | <mf-boolean> | <mf-range> ] )"},"media-in-parens":{syntax:"( <media-condition> ) | <media-feature> | <general-enclosed>"},"media-not":{syntax:"not <media-in-parens>"},"media-or":{syntax:"<media-in-parens> [ or <media-in-parens> ]+"},"media-query":{syntax:"<media-condition> | [ not | only ]? <media-type> [ and <media-condition-without-or> ]?"},"media-query-list":{syntax:"<media-query>#"},"media-type":{syntax:"<ident>"},"mf-boolean":{syntax:"<mf-name>"},"mf-name":{syntax:"<ident>"},"mf-plain":{syntax:"<mf-name> : <mf-value>"},"mf-range":{syntax:`<mf-name> [ '<' | '>' ]? '='? <mf-value>
337
337
  | <mf-value> [ '<' | '>' ]? '='? <mf-name>
338
338
  | <mf-value> '<' '='? <mf-name> '<' '='? <mf-value>
339
- | <mf-value> '>' '='? <mf-name> '>' '='? <mf-value>`},"mf-value":{syntax:"<number> | <dimension> | <ident> | <ratio>"},"min()":{syntax:"min( <calc-sum># )"},"minmax()":{syntax:"minmax( [ <length> | <percentage> | min-content | max-content | auto ] , [ <length> | <percentage> | <flex> | min-content | max-content | auto ] )"},"named-color":{syntax:"transparent | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen"},"namespace-prefix":{syntax:"<ident>"},"ns-prefix":{syntax:"[ <ident-token> | '*' ]? '|'"},"number-percentage":{syntax:"<number> | <percentage>"},"numeric-figure-values":{syntax:"[ lining-nums | oldstyle-nums ]"},"numeric-fraction-values":{syntax:"[ diagonal-fractions | stacked-fractions ]"},"numeric-spacing-values":{syntax:"[ proportional-nums | tabular-nums ]"},nth:{syntax:"<an-plus-b> | even | odd"},"opacity()":{syntax:"opacity( [ <number-percentage> ] )"},"overflow-position":{syntax:"unsafe | safe"},"outline-radius":{syntax:"<length> | <percentage>"},"page-body":{syntax:"<declaration>? [ ; <page-body> ]? | <page-margin-box> <page-body>"},"page-margin-box":{syntax:"<page-margin-box-type> '{' <declaration-list> '}'"},"page-margin-box-type":{syntax:"@top-left-corner | @top-left | @top-center | @top-right | @top-right-corner | @bottom-left-corner | @bottom-left | @bottom-center | @bottom-right | @bottom-right-corner | @left-top | @left-middle | @left-bottom | @right-top | @right-middle | @right-bottom"},"page-selector-list":{syntax:"[ <page-selector># ]?"},"page-selector":{syntax:"<pseudo-page>+ | <ident> <pseudo-page>*"},"path()":{syntax:"path( [ <fill-rule>, ]? <string> )"},"paint()":{syntax:"paint( <ident>, <declaration-value>? )"},"perspective()":{syntax:"perspective( <length> )"},"polygon()":{syntax:"polygon( <fill-rule>? , [ <length-percentage> <length-percentage> ]# )"},position:{syntax:"[ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]"},"pseudo-class-selector":{syntax:"':' <ident-token> | ':' <function-token> <any-value> ')'"},"pseudo-element-selector":{syntax:"':' <pseudo-class-selector>"},"pseudo-page":{syntax:": [ left | right | first | blank ]"},quote:{syntax:"open-quote | close-quote | no-open-quote | no-close-quote"},"radial-gradient()":{syntax:"radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"},"relative-selector":{syntax:"<combinator>? <complex-selector>"},"relative-selector-list":{syntax:"<relative-selector>#"},"relative-size":{syntax:"larger | smaller"},"repeat-style":{syntax:"repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}"},"repeating-linear-gradient()":{syntax:"repeating-linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )"},"repeating-radial-gradient()":{syntax:"repeating-radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"},"rgb()":{syntax:"rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )"},"rgba()":{syntax:"rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )"},"rotate()":{syntax:"rotate( [ <angle> | <zero> ] )"},"rotate3d()":{syntax:"rotate3d( <number> , <number> , <number> , [ <angle> | <zero> ] )"},"rotateX()":{syntax:"rotateX( [ <angle> | <zero> ] )"},"rotateY()":{syntax:"rotateY( [ <angle> | <zero> ] )"},"rotateZ()":{syntax:"rotateZ( [ <angle> | <zero> ] )"},"saturate()":{syntax:"saturate( <number-percentage> )"},"scale()":{syntax:"scale( <number> , <number>? )"},"scale3d()":{syntax:"scale3d( <number> , <number> , <number> )"},"scaleX()":{syntax:"scaleX( <number> )"},"scaleY()":{syntax:"scaleY( <number> )"},"scaleZ()":{syntax:"scaleZ( <number> )"},"self-position":{syntax:"center | start | end | self-start | self-end | flex-start | flex-end"},"shape-radius":{syntax:"<length-percentage> | closest-side | farthest-side"},"skew()":{syntax:"skew( [ <angle> | <zero> ] , [ <angle> | <zero> ]? )"},"skewX()":{syntax:"skewX( [ <angle> | <zero> ] )"},"skewY()":{syntax:"skewY( [ <angle> | <zero> ] )"},"sepia()":{syntax:"sepia( <number-percentage> )"},shadow:{syntax:"inset? && <length>{2,4} && <color>?"},"shadow-t":{syntax:"[ <length>{2,3} && <color>? ]"},shape:{syntax:"rect(<top>, <right>, <bottom>, <left>)"},"shape-box":{syntax:"<box> | margin-box"},"side-or-corner":{syntax:"[ left | right ] || [ top | bottom ]"},"single-animation":{syntax:"<time> || <timing-function> || <time> || <single-animation-iteration-count> || <single-animation-direction> || <single-animation-fill-mode> || <single-animation-play-state> || [ none | <keyframes-name> ]"},"single-animation-direction":{syntax:"normal | reverse | alternate | alternate-reverse"},"single-animation-fill-mode":{syntax:"none | forwards | backwards | both"},"single-animation-iteration-count":{syntax:"infinite | <number>"},"single-animation-play-state":{syntax:"running | paused"},"single-transition":{syntax:"[ none | <single-transition-property> ] || <time> || <timing-function> || <time>"},"single-transition-property":{syntax:"all | <custom-ident>"},size:{syntax:"closest-side | farthest-side | closest-corner | farthest-corner | <length> | <length-percentage>{2}"},"step-position":{syntax:"jump-start | jump-end | jump-none | jump-both | start | end"},"step-timing-function":{syntax:"step-start | step-end | steps(<integer>[, <step-position>]?)"},"subclass-selector":{syntax:"<id-selector> | <class-selector> | <attribute-selector> | <pseudo-class-selector>"},"supports-condition":{syntax:"not <supports-in-parens> | <supports-in-parens> [ and <supports-in-parens> ]* | <supports-in-parens> [ or <supports-in-parens> ]*"},"supports-in-parens":{syntax:"( <supports-condition> ) | <supports-feature> | <general-enclosed>"},"supports-feature":{syntax:"<supports-decl> | <supports-selector-fn>"},"supports-decl":{syntax:"( <declaration> )"},"supports-selector-fn":{syntax:"selector( <complex-selector> )"},symbol:{syntax:"<string> | <image> | <custom-ident>"},target:{syntax:"<target-counter()> | <target-counters()> | <target-text()>"},"target-counter()":{syntax:"target-counter( [ <string> | <url> ] , <custom-ident> , <counter-style>? )"},"target-counters()":{syntax:"target-counters( [ <string> | <url> ] , <custom-ident> , <string> , <counter-style>? )"},"target-text()":{syntax:"target-text( [ <string> | <url> ] , [ content | before | after | first-letter ]? )"},"time-percentage":{syntax:"<time> | <percentage>"},"timing-function":{syntax:"linear | <cubic-bezier-timing-function> | <step-timing-function>"},"track-breadth":{syntax:"<length-percentage> | <flex> | min-content | max-content | auto"},"track-list":{syntax:"[ <line-names>? [ <track-size> | <track-repeat> ] ]+ <line-names>?"},"track-repeat":{syntax:"repeat( [ <positive-integer> ] , [ <line-names>? <track-size> ]+ <line-names>? )"},"track-size":{syntax:"<track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )"},"transform-function":{syntax:"<matrix()> | <translate()> | <translateX()> | <translateY()> | <scale()> | <scaleX()> | <scaleY()> | <rotate()> | <skew()> | <skewX()> | <skewY()> | <matrix3d()> | <translate3d()> | <translateZ()> | <scale3d()> | <scaleZ()> | <rotate3d()> | <rotateX()> | <rotateY()> | <rotateZ()> | <perspective()>"},"transform-list":{syntax:"<transform-function>+"},"translate()":{syntax:"translate( <length-percentage> , <length-percentage>? )"},"translate3d()":{syntax:"translate3d( <length-percentage> , <length-percentage> , <length> )"},"translateX()":{syntax:"translateX( <length-percentage> )"},"translateY()":{syntax:"translateY( <length-percentage> )"},"translateZ()":{syntax:"translateZ( <length> )"},"type-or-unit":{syntax:"string | color | url | integer | number | length | angle | time | frequency | cap | ch | em | ex | ic | lh | rlh | rem | vb | vi | vw | vh | vmin | vmax | mm | Q | cm | in | pt | pc | px | deg | grad | rad | turn | ms | s | Hz | kHz | %"},"type-selector":{syntax:"<wq-name> | <ns-prefix>? '*'"},"var()":{syntax:"var( <custom-property-name> , <declaration-value>? )"},"viewport-length":{syntax:"auto | <length-percentage>"},"wq-name":{syntax:"<ns-prefix>? <ident-token>"}},r5={atrules:{charset:{prelude:"<string>"},"font-face":{descriptors:{"unicode-range":{comment:"replaces <unicode-range>, an old production name",syntax:"<urange>#"}}}},properties:{"-moz-background-clip":{comment:"deprecated syntax in old Firefox, https://developer.mozilla.org/en/docs/Web/CSS/background-clip",syntax:"padding | border"},"-moz-border-radius-bottomleft":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius",syntax:"<'border-bottom-left-radius'>"},"-moz-border-radius-bottomright":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",syntax:"<'border-bottom-right-radius'>"},"-moz-border-radius-topleft":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius",syntax:"<'border-top-left-radius'>"},"-moz-border-radius-topright":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",syntax:"<'border-bottom-right-radius'>"},"-moz-control-character-visibility":{comment:"firefox specific keywords, https://bugzilla.mozilla.org/show_bug.cgi?id=947588",syntax:"visible | hidden"},"-moz-osx-font-smoothing":{comment:"misssed old syntax https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",syntax:"auto | grayscale"},"-moz-user-select":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",syntax:"none | text | all | -moz-none"},"-ms-flex-align":{comment:"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",syntax:"start | end | center | baseline | stretch"},"-ms-flex-item-align":{comment:"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",syntax:"auto | start | end | center | baseline | stretch"},"-ms-flex-line-pack":{comment:"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-line-pack",syntax:"start | end | center | justify | distribute | stretch"},"-ms-flex-negative":{comment:"misssed old syntax implemented in IE; TODO: find references for comfirmation",syntax:"<'flex-shrink'>"},"-ms-flex-pack":{comment:"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-pack",syntax:"start | end | center | justify | distribute"},"-ms-flex-order":{comment:"misssed old syntax implemented in IE; https://msdn.microsoft.com/en-us/library/jj127303(v=vs.85).aspx",syntax:"<integer>"},"-ms-flex-positive":{comment:"misssed old syntax implemented in IE; TODO: find references for comfirmation",syntax:"<'flex-grow'>"},"-ms-flex-preferred-size":{comment:"misssed old syntax implemented in IE; TODO: find references for comfirmation",syntax:"<'flex-basis'>"},"-ms-interpolation-mode":{comment:"https://msdn.microsoft.com/en-us/library/ff521095(v=vs.85).aspx",syntax:"nearest-neighbor | bicubic"},"-ms-grid-column-align":{comment:"add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466338.aspx",syntax:"start | end | center | stretch"},"-ms-grid-row-align":{comment:"add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466348.aspx",syntax:"start | end | center | stretch"},"-ms-hyphenate-limit-last":{comment:"misssed old syntax implemented in IE; https://www.w3.org/TR/css-text-4/#hyphenate-line-limits",syntax:"none | always | column | page | spread"},"-webkit-appearance":{comment:"webkit specific keywords",references:["http://css-infos.net/property/-webkit-appearance"],syntax:"none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button"},"-webkit-background-clip":{comment:"https://developer.mozilla.org/en/docs/Web/CSS/background-clip",syntax:"[ <box> | border | padding | content | text ]#"},"-webkit-column-break-after":{comment:"added, http://help.dottoro.com/lcrthhhv.php",syntax:"always | auto | avoid"},"-webkit-column-break-before":{comment:"added, http://help.dottoro.com/lcxquvkf.php",syntax:"always | auto | avoid"},"-webkit-column-break-inside":{comment:"added, http://help.dottoro.com/lclhnthl.php",syntax:"always | auto | avoid"},"-webkit-font-smoothing":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",syntax:"auto | none | antialiased | subpixel-antialiased"},"-webkit-mask-box-image":{comment:"missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",syntax:"[ <url> | <gradient> | none ] [ <length-percentage>{4} <-webkit-mask-box-repeat>{2} ]?"},"-webkit-print-color-adjust":{comment:"missed",references:["https://developer.mozilla.org/en/docs/Web/CSS/-webkit-print-color-adjust"],syntax:"economy | exact"},"-webkit-text-security":{comment:"missed; http://help.dottoro.com/lcbkewgt.php",syntax:"none | circle | disc | square"},"-webkit-user-drag":{comment:"missed; http://help.dottoro.com/lcbixvwm.php",syntax:"none | element | auto"},"-webkit-user-select":{comment:"auto is supported by old webkit, https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",syntax:"auto | none | text | all"},"alignment-baseline":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty"],syntax:"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical"},"baseline-shift":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#BaselineShiftProperty"],syntax:"baseline | sub | super | <svg-length>"},behavior:{comment:"added old IE property https://msdn.microsoft.com/en-us/library/ms530723(v=vs.85).aspx",syntax:"<url>+"},"clip-rule":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/masking.html#ClipRuleProperty"],syntax:"nonzero | evenodd"},cue:{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<'cue-before'> <'cue-after'>?"},"cue-after":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<url> <decibel>? | none"},"cue-before":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<url> <decibel>? | none"},cursor:{comment:"added legacy keywords: hand, -webkit-grab. -webkit-grabbing, -webkit-zoom-in, -webkit-zoom-out, -moz-grab, -moz-grabbing, -moz-zoom-in, -moz-zoom-out",references:["https://www.sitepoint.com/css3-cursor-styles/"],syntax:"[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]"},display:{comment:"extended with -ms-flexbox",syntax:"| <-non-standard-display>"},position:{comment:"extended with -webkit-sticky",syntax:"| -webkit-sticky"},"dominant-baseline":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#DominantBaselineProperty"],syntax:"auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge"},"image-rendering":{comment:"extended with <-non-standard-image-rendering>, added SVG keywords optimizeSpeed and optimizeQuality",references:["https://developer.mozilla.org/en/docs/Web/CSS/image-rendering","https://www.w3.org/TR/SVG/painting.html#ImageRenderingProperty"],syntax:"| optimizeSpeed | optimizeQuality | <-non-standard-image-rendering>"},fill:{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#FillProperty"],syntax:"<paint>"},"fill-opacity":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#FillProperty"],syntax:"<number-zero-one>"},"fill-rule":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#FillProperty"],syntax:"nonzero | evenodd"},filter:{comment:"extend with IE legacy syntaxes",syntax:"| <-ms-filter-function-list>"},"glyph-orientation-horizontal":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#GlyphOrientationHorizontalProperty"],syntax:"<angle>"},"glyph-orientation-vertical":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#GlyphOrientationVerticalProperty"],syntax:"<angle>"},kerning:{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#KerningProperty"],syntax:"auto | <svg-length>"},"letter-spacing":{comment:"fix syntax <length> -> <length-percentage>",references:["https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/letter-spacing"],syntax:"normal | <length-percentage>"},marker:{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],syntax:"none | <url>"},"marker-end":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],syntax:"none | <url>"},"marker-mid":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],syntax:"none | <url>"},"marker-start":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],syntax:"none | <url>"},"max-width":{comment:"fix auto -> none (https://github.com/mdn/data/pull/431); extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/max-width",syntax:"none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"},width:{comment:"per spec fit-content should be a function, however browsers are supporting it as a keyword (https://github.com/csstree/stylelint-validator/issues/29)",syntax:"| fit-content | -moz-fit-content | -webkit-fit-content"},"min-width":{comment:"extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",syntax:"auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"},overflow:{comment:"extend by vendor keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",syntax:"| <-non-standard-overflow>"},pause:{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<'pause-before'> <'pause-after'>?"},"pause-after":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<time> | none | x-weak | weak | medium | strong | x-strong"},"pause-before":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<time> | none | x-weak | weak | medium | strong | x-strong"},rest:{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<'rest-before'> <'rest-after'>?"},"rest-after":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<time> | none | x-weak | weak | medium | strong | x-strong"},"rest-before":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<time> | none | x-weak | weak | medium | strong | x-strong"},"shape-rendering":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#ShapeRenderingPropert"],syntax:"auto | optimizeSpeed | crispEdges | geometricPrecision"},src:{comment:"added @font-face's src property https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src",syntax:"[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#"},speak:{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"auto | none | normal"},"speak-as":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"normal | spell-out || digits || [ literal-punctuation | no-punctuation ]"},stroke:{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"<paint>"},"stroke-dasharray":{comment:"added SVG property; a list of comma and/or white space separated <length>s and <percentage>s",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"none | [ <svg-length>+ ]#"},"stroke-dashoffset":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"<svg-length>"},"stroke-linecap":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"butt | round | square"},"stroke-linejoin":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"miter | round | bevel"},"stroke-miterlimit":{comment:"added SVG property (<miterlimit> = <number-one-or-greater>) ",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"<number-one-or-greater>"},"stroke-opacity":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"<number-zero-one>"},"stroke-width":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"<svg-length>"},"text-anchor":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#TextAlignmentProperties"],syntax:"start | middle | end"},"unicode-bidi":{comment:"added prefixed keywords https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi",syntax:"| -moz-isolate | -moz-isolate-override | -moz-plaintext | -webkit-isolate | -webkit-isolate-override | -webkit-plaintext"},"unicode-range":{comment:"added missed property https://developer.mozilla.org/en-US/docs/Web/CSS/%40font-face/unicode-range",syntax:"<urange>#"},"voice-balance":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<number> | left | center | right | leftwards | rightwards"},"voice-duration":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"auto | <time>"},"voice-family":{comment:"<name> -> <family-name>, https://www.w3.org/TR/css3-speech/#property-index",syntax:"[ [ <family-name> | <generic-voice> ] , ]* [ <family-name> | <generic-voice> ] | preserve"},"voice-pitch":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"},"voice-range":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"},"voice-rate":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"[ normal | x-slow | slow | medium | fast | x-fast ] || <percentage>"},"voice-stress":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"normal | strong | moderate | none | reduced"},"voice-volume":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"silent | [ [ x-soft | soft | medium | loud | x-loud ] || <decibel> ]"},"writing-mode":{comment:"extend with SVG keywords",syntax:"| <svg-writing-mode>"}},syntaxes:{"-legacy-gradient":{comment:"added collection of legacy gradient syntaxes",syntax:"<-webkit-gradient()> | <-legacy-linear-gradient> | <-legacy-repeating-linear-gradient> | <-legacy-radial-gradient> | <-legacy-repeating-radial-gradient>"},"-legacy-linear-gradient":{comment:"like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",syntax:"-moz-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-linear-gradient( <-legacy-linear-gradient-arguments> )"},"-legacy-repeating-linear-gradient":{comment:"like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",syntax:"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )"},"-legacy-linear-gradient-arguments":{comment:"like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",syntax:"[ <angle> | <side-or-corner> ]? , <color-stop-list>"},"-legacy-radial-gradient":{comment:"deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",syntax:"-moz-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-radial-gradient( <-legacy-radial-gradient-arguments> )"},"-legacy-repeating-radial-gradient":{comment:"deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",syntax:"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )"},"-legacy-radial-gradient-arguments":{comment:"deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",syntax:"[ <position> , ]? [ [ [ <-legacy-radial-gradient-shape> || <-legacy-radial-gradient-size> ] | [ <length> | <percentage> ]{2} ] , ]? <color-stop-list>"},"-legacy-radial-gradient-size":{comment:"before a standard it contains 2 extra keywords (`contain` and `cover`) https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltsize",syntax:"closest-side | closest-corner | farthest-side | farthest-corner | contain | cover"},"-legacy-radial-gradient-shape":{comment:"define to double sure it doesn't extends in future https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltshape",syntax:"circle | ellipse"},"-non-standard-font":{comment:"non standard fonts",references:["https://webkit.org/blog/3709/using-the-system-font-in-web-content/"],syntax:"-apple-system-body | -apple-system-headline | -apple-system-subheadline | -apple-system-caption1 | -apple-system-caption2 | -apple-system-footnote | -apple-system-short-body | -apple-system-short-headline | -apple-system-short-subheadline | -apple-system-short-caption1 | -apple-system-short-footnote | -apple-system-tall-body"},"-non-standard-color":{comment:"non standard colors",references:["http://cssdot.ru/%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_CSS/color-i305.html","https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Mozilla_Color_Preference_Extensions"],syntax:"-moz-ButtonDefault | -moz-ButtonHoverFace | -moz-ButtonHoverText | -moz-CellHighlight | -moz-CellHighlightText | -moz-Combobox | -moz-ComboboxText | -moz-Dialog | -moz-DialogText | -moz-dragtargetzone | -moz-EvenTreeRow | -moz-Field | -moz-FieldText | -moz-html-CellHighlight | -moz-html-CellHighlightText | -moz-mac-accentdarkestshadow | -moz-mac-accentdarkshadow | -moz-mac-accentface | -moz-mac-accentlightesthighlight | -moz-mac-accentlightshadow | -moz-mac-accentregularhighlight | -moz-mac-accentregularshadow | -moz-mac-chrome-active | -moz-mac-chrome-inactive | -moz-mac-focusring | -moz-mac-menuselect | -moz-mac-menushadow | -moz-mac-menutextselect | -moz-MenuHover | -moz-MenuHoverText | -moz-MenuBarText | -moz-MenuBarHoverText | -moz-nativehyperlinktext | -moz-OddTreeRow | -moz-win-communicationstext | -moz-win-mediatext | -moz-activehyperlinktext | -moz-default-background-color | -moz-default-color | -moz-hyperlinktext | -moz-visitedhyperlinktext | -webkit-activelink | -webkit-focus-ring-color | -webkit-link | -webkit-text"},"-non-standard-image-rendering":{comment:"non-standard keywords http://phrogz.net/tmp/canvas_image_zoom.html",syntax:"optimize-contrast | -moz-crisp-edges | -o-crisp-edges | -webkit-optimize-contrast"},"-non-standard-overflow":{comment:"non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",syntax:"-moz-scrollbars-none | -moz-scrollbars-horizontal | -moz-scrollbars-vertical | -moz-hidden-unscrollable"},"-non-standard-width":{comment:"non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",syntax:"fill-available | min-intrinsic | intrinsic | -moz-available | -moz-fit-content | -moz-min-content | -moz-max-content | -webkit-min-content | -webkit-max-content"},"-webkit-gradient()":{comment:"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/ - TODO: simplify when after match algorithm improvement ( [, point, radius | , point] -> [, radius]? , point )",syntax:"-webkit-gradient( <-webkit-gradient-type>, <-webkit-gradient-point> [, <-webkit-gradient-point> | , <-webkit-gradient-radius>, <-webkit-gradient-point> ] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )"},"-webkit-gradient-color-stop":{comment:"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",syntax:"from( <color> ) | color-stop( [ <number-zero-one> | <percentage> ] , <color> ) | to( <color> )"},"-webkit-gradient-point":{comment:"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",syntax:"[ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]"},"-webkit-gradient-radius":{comment:"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",syntax:"<length> | <percentage>"},"-webkit-gradient-type":{comment:"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",syntax:"linear | radial"},"-webkit-mask-box-repeat":{comment:"missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",syntax:"repeat | stretch | round"},"-webkit-mask-clip-style":{comment:"missed; there is no enough information about `-webkit-mask-clip` property, but looks like all those keywords are working",syntax:"border | border-box | padding | padding-box | content | content-box | text"},"-ms-filter-function-list":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",syntax:"<-ms-filter-function>+"},"-ms-filter-function":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",syntax:"<-ms-filter-function-progid> | <-ms-filter-function-legacy>"},"-ms-filter-function-progid":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",syntax:"'progid:' [ <ident-token> '.' ]* [ <ident-token> | <function-token> <any-value>? ) ]"},"-ms-filter-function-legacy":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",syntax:"<ident-token> | <function-token> <any-value>? )"},"-ms-filter":{syntax:"<string>"},age:{comment:"https://www.w3.org/TR/css3-speech/#voice-family",syntax:"child | young | old"},"attr-name":{syntax:"<wq-name>"},"attr-fallback":{syntax:"<any-value>"},"border-radius":{comment:"missed, https://drafts.csswg.org/css-backgrounds-3/#the-border-radius",syntax:"<length-percentage>{1,2}"},bottom:{comment:"missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",syntax:"<length> | auto"},"content-list":{comment:"missed -> https://drafts.csswg.org/css-content/#typedef-content-list (document-url, <target> and leader() is omitted util stabilization)",syntax:"[ <string> | contents | <image> | <quote> | <target> | <leader()> | <attr()> | counter( <ident>, <'list-style-type'>? ) ]+"},"element()":{comment:"https://drafts.csswg.org/css-gcpm/#element-syntax & https://drafts.csswg.org/css-images-4/#element-notation",syntax:"element( <custom-ident> , [ first | start | last | first-except ]? ) | element( <id-selector> )"},"generic-voice":{comment:"https://www.w3.org/TR/css3-speech/#voice-family",syntax:"[ <age>? <gender> <integer>? ]"},gender:{comment:"https://www.w3.org/TR/css3-speech/#voice-family",syntax:"male | female | neutral"},"generic-family":{comment:"added -apple-system",references:["https://webkit.org/blog/3709/using-the-system-font-in-web-content/"],syntax:"| -apple-system"},gradient:{comment:"added legacy syntaxes support",syntax:"| <-legacy-gradient>"},left:{comment:"missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",syntax:"<length> | auto"},"mask-image":{comment:"missed; https://drafts.fxtf.org/css-masking-1/#the-mask-image",syntax:"<mask-reference>#"},"name-repeat":{comment:"missed, and looks like obsolete, keep it as is since other property syntaxes should be changed too; https://www.w3.org/TR/2015/WD-css-grid-1-20150917/#typedef-name-repeat",syntax:"repeat( [ <positive-integer> | auto-fill ], <line-names>+)"},"named-color":{comment:"added non standard color names",syntax:"| <-non-standard-color>"},paint:{comment:"used by SVG https://www.w3.org/TR/SVG/painting.html#SpecifyingPaint",syntax:"none | <color> | <url> [ none | <color> ]? | context-fill | context-stroke"},"page-size":{comment:"https://www.w3.org/TR/css-page-3/#typedef-page-size-page-size",syntax:"A5 | A4 | A3 | B5 | B4 | JIS-B5 | JIS-B4 | letter | legal | ledger"},ratio:{comment:"missed, https://drafts.csswg.org/mediaqueries-4/#typedef-ratio",syntax:"<integer> / <integer>"},right:{comment:"missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",syntax:"<length> | auto"},shape:{comment:"missed spaces in function body and add backwards compatible syntax",syntax:"rect( <top>, <right>, <bottom>, <left> ) | rect( <top> <right> <bottom> <left> )"},"svg-length":{comment:"All coordinates and lengths in SVG can be specified with or without a unit identifier",references:["https://www.w3.org/TR/SVG11/coords.html#Units"],syntax:"<percentage> | <length> | <number>"},"svg-writing-mode":{comment:"SVG specific keywords (deprecated for CSS)",references:["https://developer.mozilla.org/en/docs/Web/CSS/writing-mode","https://www.w3.org/TR/SVG/text.html#WritingModeProperty"],syntax:"lr-tb | rl-tb | tb-rl | lr | rl | tb"},top:{comment:"missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",syntax:"<length> | auto"},"track-group":{comment:"used by old grid-columns and grid-rows syntax v0",syntax:"'(' [ <string>* <track-minmax> <string>* ]+ ')' [ '[' <positive-integer> ']' ]? | <track-minmax>"},"track-list-v0":{comment:"used by old grid-columns and grid-rows syntax v0",syntax:"[ <string>* <track-group> <string>* ]+ | none"},"track-minmax":{comment:"used by old grid-columns and grid-rows syntax v0",syntax:"minmax( <track-breadth> , <track-breadth> ) | auto | <track-breadth> | fit-content"},x:{comment:"missed; not sure we should add it, but no others except `cursor` is using it so it's ok for now; https://drafts.csswg.org/css-ui-3/#cursor",syntax:"<number>"},y:{comment:"missed; not sure we should add it, but no others except `cursor` is using so it's ok for now; https://drafts.csswg.org/css-ui-3/#cursor",syntax:"<number>"},declaration:{comment:"missed, restored by https://drafts.csswg.org/css-syntax",syntax:"<ident-token> : <declaration-value>? [ '!' important ]?"},"declaration-list":{comment:"missed, restored by https://drafts.csswg.org/css-syntax",syntax:"[ <declaration>? ';' ]* <declaration>?"},url:{comment:"https://drafts.csswg.org/css-values-4/#urls",syntax:"url( <string> <url-modifier>* ) | <url-token>"},"url-modifier":{comment:"https://drafts.csswg.org/css-values-4/#typedef-url-modifier",syntax:"<ident> | <function-token> <any-value> )"},"number-zero-one":{syntax:"<number [0,1]>"},"number-one-or-greater":{syntax:"<number [1,∞]>"},"positive-integer":{syntax:"<integer [0,∞]>"},"-non-standard-display":{syntax:"-ms-inline-flexbox | -ms-grid | -ms-inline-grid | -webkit-flex | -webkit-inline-flex | -webkit-box | -webkit-inline-box | -moz-inline-stack | -moz-box | -moz-inline-box"}}},a5=XU,i5=e5,n5=t5,$p=r5,gS=/^\s*\|\s*/;function s5(t){const e=Object.create(null);for(const r in t){const a=t[r];let i=null;if(a.descriptors){i=Object.create(null);for(const n in a.descriptors)i[n]=a.descriptors[n].syntax}e[r.substr(1)]={prelude:a.syntax.trim().match(/^@\S+\s+([^;\{]*)/)[1].trim()||null,descriptors:i}}return e}function Pp(t,e){const r={};for(const a in t)r[a]=t[a].syntax||t[a];for(const a in e)a in t?e[a].syntax?r[a]=gS.test(e[a].syntax)?r[a]+" "+e[a].syntax.trim():e[a].syntax:delete r[a]:e[a].syntax&&(r[a]=e[a].syntax.replace(gS,""));return r}function vS(t){const e={};for(const r in t)e[r]=t[r].syntax;return e}function o5(t,e){const r={};for(const a in t){const i=e[a]&&e[a].descriptors||null;r[a]={prelude:a in e&&"prelude"in e[a]?e[a].prelude:t[a].prelude||null,descriptors:t[a].descriptors?Pp(t[a].descriptors,i||{}):i&&vS(i)}}for(const a in e)hasOwnProperty.call(t,a)||(r[a]={prelude:e[a].prelude||null,descriptors:e[a].descriptors&&vS(e[a].descriptors)});return r}var l5={types:Pp(n5,$p.syntaxes),atrules:o5(s5(a5),$p.atrules),properties:Pp(i5,$p.properties)},bS=ce.cmpChar,yS=ce.isDigit,ms=ce.TYPE,SS=ms.WhiteSpace,xS=ms.Comment,Dp=ms.Ident,Xr=ms.Number,u5=ms.Dimension,$r=43,Rt=45,tu=110,Ua=!0,c5=!1;function ru(t,e){var r=this.scanner.tokenStart+t,a=this.scanner.source.charCodeAt(r);for((a===$r||a===Rt)&&(e&&this.error("Number sign is not allowed"),r++);r<this.scanner.tokenEnd;r++)yS(this.scanner.source.charCodeAt(r))||this.error("Integer is expected",r)}function Bi(t){return ru.call(this,0,t)}function ba(t,e){if(!bS(this.scanner.source,this.scanner.tokenStart+t,e)){var r="";switch(e){case tu:r="N is expected";break;case Rt:r="HyphenMinus is expected";break}this.error(r,this.scanner.tokenStart+t)}}function Ip(){for(var t=0,e=0,r=this.scanner.tokenType;r===SS||r===xS;)r=this.scanner.lookupType(++t);if(r!==Xr)if(this.scanner.isDelim($r,t)||this.scanner.isDelim(Rt,t)){e=this.scanner.isDelim($r,t)?$r:Rt;do r=this.scanner.lookupType(++t);while(r===SS||r===xS);r!==Xr&&(this.scanner.skip(t),Bi.call(this,Ua))}else return null;return t>0&&this.scanner.skip(t),e===0&&(r=this.scanner.source.charCodeAt(this.scanner.tokenStart),r!==$r&&r!==Rt&&this.error("Number sign is expected")),Bi.call(this,e!==0),e===Rt?"-"+this.consume(Xr):this.consume(Xr)}var d5={name:"AnPlusB",structure:{a:[String,null],b:[String,null]},parse:function(){var t=this.scanner.tokenStart,e=null,r=null;if(this.scanner.tokenType===Xr)Bi.call(this,c5),r=this.consume(Xr);else if(this.scanner.tokenType===Dp&&bS(this.scanner.source,this.scanner.tokenStart,Rt))switch(e="-1",ba.call(this,1,tu),this.scanner.getTokenLength()){case 2:this.scanner.next(),r=Ip.call(this);break;case 3:ba.call(this,2,Rt),this.scanner.next(),this.scanner.skipSC(),Bi.call(this,Ua),r="-"+this.consume(Xr);break;default:ba.call(this,2,Rt),ru.call(this,3,Ua),this.scanner.next(),r=this.scanner.substrToCursor(t+2)}else if(this.scanner.tokenType===Dp||this.scanner.isDelim($r)&&this.scanner.lookupType(1)===Dp){var a=0;switch(e="1",this.scanner.isDelim($r)&&(a=1,this.scanner.next()),ba.call(this,0,tu),this.scanner.getTokenLength()){case 1:this.scanner.next(),r=Ip.call(this);break;case 2:ba.call(this,1,Rt),this.scanner.next(),this.scanner.skipSC(),Bi.call(this,Ua),r="-"+this.consume(Xr);break;default:ba.call(this,1,Rt),ru.call(this,2,Ua),this.scanner.next(),r=this.scanner.substrToCursor(t+a+1)}}else if(this.scanner.tokenType===u5){for(var i=this.scanner.source.charCodeAt(this.scanner.tokenStart),a=i===$r||i===Rt,n=this.scanner.tokenStart+a;n<this.scanner.tokenEnd&&yS(this.scanner.source.charCodeAt(n));n++);n===this.scanner.tokenStart+a&&this.error("Integer is expected",this.scanner.tokenStart+a),ba.call(this,n-this.scanner.tokenStart,tu),e=this.scanner.source.substring(t,n),n+1===this.scanner.tokenEnd?(this.scanner.next(),r=Ip.call(this)):(ba.call(this,n-this.scanner.tokenStart+1,Rt),n+2===this.scanner.tokenEnd?(this.scanner.next(),this.scanner.skipSC(),Bi.call(this,Ua),r="-"+this.consume(Xr)):(ru.call(this,n-this.scanner.tokenStart+2,Ua),this.scanner.next(),r=this.scanner.substrToCursor(n+1)))}else this.error();return e!==null&&e.charCodeAt(0)===$r&&(e=e.substr(1)),r!==null&&r.charCodeAt(0)===$r&&(r=r.substr(1)),{type:"AnPlusB",loc:this.getLocation(t,this.scanner.tokenStart),a:e,b:r}},generate:function(t){var e=t.a!==null&&t.a!==void 0,r=t.b!==null&&t.b!==void 0;e?(this.chunk(t.a==="+1"?"+n":t.a==="1"?"n":t.a==="-1"?"-n":t.a+"n"),r&&(r=String(t.b),r.charAt(0)==="-"||r.charAt(0)==="+"?(this.chunk(r.charAt(0)),this.chunk(r.substr(1))):(this.chunk("+"),this.chunk(r)))):this.chunk(String(t.b))}},p5=ce,au=p5.TYPE,f5=au.WhiteSpace,zp=au.Semicolon,kS=au.LeftCurlyBracket,h5=au.Delim,m5=33;function g5(){return this.scanner.tokenIndex>0&&this.scanner.lookupType(-1)===f5?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function _S(){return 0}function v5(t){return t===kS?1:0}function b5(t){return t===kS||t===zp?1:0}function y5(t,e,r){return t===h5&&e.charCodeAt(r)===m5||t===zp?1:0}function S5(t){return t===zp?2:0}var Ga={name:"Raw",structure:{value:String},parse:function(t,e,r){var a=this.scanner.getTokenStart(t),i;return this.scanner.skip(this.scanner.getRawLength(t,e||_S)),r&&this.scanner.tokenStart>a?i=g5.call(this):i=this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(a,i),value:this.scanner.source.substring(a,i)}},generate:function(t){this.chunk(t.value)},mode:{default:_S,leftCurlyBracket:v5,leftCurlyBracketOrSemicolon:b5,exclamationMarkOrSemicolon:y5,semicolonIncluded:S5}},iu=ce.TYPE,x5=Ga.mode,wS=iu.AtKeyword,CS=iu.Semicolon,Lp=iu.LeftCurlyBracket,k5=iu.RightCurlyBracket;function TS(t){return this.Raw(t,x5.leftCurlyBracketOrSemicolon,!0)}function _5(){for(var t=1,e;e=this.scanner.lookupType(t);t++){if(e===k5)return!0;if(e===Lp||e===wS)return!1}return!1}var w5={name:"Atrule",structure:{name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]},parse:function(){var t=this.scanner.tokenStart,e,r,a=null,i=null;switch(this.eat(wS),e=this.scanner.substrToCursor(t+1),r=e.toLowerCase(),this.scanner.skipSC(),this.scanner.eof===!1&&this.scanner.tokenType!==Lp&&this.scanner.tokenType!==CS&&(this.parseAtrulePrelude?(a=this.parseWithFallback(this.AtrulePrelude.bind(this,e),TS),a.type==="AtrulePrelude"&&a.children.head===null&&(a=null)):a=TS.call(this,this.scanner.tokenIndex),this.scanner.skipSC()),this.scanner.tokenType){case CS:this.scanner.next();break;case Lp:this.atrule.hasOwnProperty(r)&&typeof this.atrule[r].block=="function"?i=this.atrule[r].block.call(this):i=this.Block(_5.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.scanner.tokenStart),name:e,prelude:a,block:i}},generate:function(t){this.chunk("@"),this.chunk(t.name),t.prelude!==null&&(this.chunk(" "),this.node(t.prelude)),t.block?this.node(t.block):this.chunk(";")},walkContext:"atrule"},AS=ce.TYPE,C5=AS.Semicolon,T5=AS.LeftCurlyBracket,A5={name:"AtrulePrelude",structure:{children:[[]]},parse:function(t){var e=null;return t!==null&&(t=t.toLowerCase()),this.scanner.skipSC(),this.atrule.hasOwnProperty(t)&&typeof this.atrule[t].prelude=="function"?e=this.atrule[t].prelude.call(this):e=this.readSequence(this.scope.AtrulePrelude),this.scanner.skipSC(),this.scanner.eof!==!0&&this.scanner.tokenType!==T5&&this.scanner.tokenType!==C5&&this.error("Semicolon or block is expected"),e===null&&(e=this.createList()),{type:"AtrulePrelude",loc:this.getLocationFromList(e),children:e}},generate:function(t){this.children(t)},walkContext:"atrulePrelude"},gs=ce.TYPE,vs=gs.Ident,O5=gs.String,E5=gs.Colon,M5=gs.LeftSquareBracket,OS=gs.RightSquareBracket,$5=36,ES=42,nu=61,P5=94,jp=124,D5=126;function I5(){this.scanner.eof&&this.error("Unexpected end of input");var t=this.scanner.tokenStart,e=!1,r=!0;return this.scanner.isDelim(ES)?(e=!0,r=!1,this.scanner.next()):this.scanner.isDelim(jp)||this.eat(vs),this.scanner.isDelim(jp)?this.scanner.source.charCodeAt(this.scanner.tokenStart+1)!==nu?(this.scanner.next(),this.eat(vs)):e&&this.error("Identifier is expected",this.scanner.tokenEnd):e&&this.error("Vertical line is expected"),r&&this.scanner.tokenType===E5&&(this.scanner.next(),this.eat(vs)),{type:"Identifier",loc:this.getLocation(t,this.scanner.tokenStart),name:this.scanner.substrToCursor(t)}}function z5(){var t=this.scanner.tokenStart,e=this.scanner.source.charCodeAt(t);return e!==nu&&e!==D5&&e!==P5&&e!==$5&&e!==ES&&e!==jp&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.scanner.next(),e!==nu&&(this.scanner.isDelim(nu)||this.error("Equal sign is expected"),this.scanner.next()),this.scanner.substrToCursor(t)}var L5={name:"AttributeSelector",structure:{name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]},parse:function(){var t=this.scanner.tokenStart,e,r=null,a=null,i=null;return this.eat(M5),this.scanner.skipSC(),e=I5.call(this),this.scanner.skipSC(),this.scanner.tokenType!==OS&&(this.scanner.tokenType!==vs&&(r=z5.call(this),this.scanner.skipSC(),a=this.scanner.tokenType===O5?this.String():this.Identifier(),this.scanner.skipSC()),this.scanner.tokenType===vs&&(i=this.scanner.getTokenValue(),this.scanner.next(),this.scanner.skipSC())),this.eat(OS),{type:"AttributeSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:e,matcher:r,value:a,flags:i}},generate:function(t){var e=" ";this.chunk("["),this.node(t.name),t.matcher!==null&&(this.chunk(t.matcher),t.value!==null&&(this.node(t.value),t.value.type==="String"&&(e=""))),t.flags!==null&&(this.chunk(e),this.chunk(t.flags)),this.chunk("]")}},Wi=ce.TYPE,j5=Ga.mode,N5=Wi.WhiteSpace,R5=Wi.Comment,MS=Wi.Semicolon,F5=Wi.AtKeyword,q5=Wi.LeftCurlyBracket,$S=Wi.RightCurlyBracket;function PS(t){return this.Raw(t,null,!0)}function B5(){return this.parseWithFallback(this.Rule,PS)}function DS(t){return this.Raw(t,j5.semicolonIncluded,!0)}function W5(){if(this.scanner.tokenType===MS)return DS.call(this,this.scanner.tokenIndex);var t=this.parseWithFallback(this.Declaration,DS);return this.scanner.tokenType===MS&&this.scanner.next(),t}var V5={name:"Block",structure:{children:[["Atrule","Rule","Declaration"]]},parse:function(t){var e=t?W5:B5,r=this.scanner.tokenStart,a=this.createList();this.eat(q5);e:for(;!this.scanner.eof;)switch(this.scanner.tokenType){case $S:break e;case N5:case R5:this.scanner.next();break;case F5:a.push(this.parseWithFallback(this.Atrule,PS));break;default:a.push(e.call(this))}return this.scanner.eof||this.eat($S),{type:"Block",loc:this.getLocation(r,this.scanner.tokenStart),children:a}},generate:function(t){this.chunk("{"),this.children(t,function(e){e.type==="Declaration"&&this.chunk(";")}),this.chunk("}")},walkContext:"block"},IS=ce.TYPE,U5=IS.LeftSquareBracket,G5=IS.RightSquareBracket,H5={name:"Brackets",structure:{children:[[]]},parse:function(t,e){var r=this.scanner.tokenStart,a=null;return this.eat(U5),a=t.call(this,e),this.scanner.eof||this.eat(G5),{type:"Brackets",loc:this.getLocation(r,this.scanner.tokenStart),children:a}},generate:function(t){this.chunk("["),this.children(t),this.chunk("]")}},Y5=ce.TYPE.CDC,Q5={name:"CDC",structure:[],parse:function(){var t=this.scanner.tokenStart;return this.eat(Y5),{type:"CDC",loc:this.getLocation(t,this.scanner.tokenStart)}},generate:function(){this.chunk("-->")}},K5=ce.TYPE.CDO,J5={name:"CDO",structure:[],parse:function(){var t=this.scanner.tokenStart;return this.eat(K5),{type:"CDO",loc:this.getLocation(t,this.scanner.tokenStart)}},generate:function(){this.chunk("<!--")}},Z5=ce.TYPE,X5=Z5.Ident,e8=46,t8={name:"ClassSelector",structure:{name:String},parse:function(){return this.scanner.isDelim(e8)||this.error("Full stop is expected"),this.scanner.next(),{type:"ClassSelector",loc:this.getLocation(this.scanner.tokenStart-1,this.scanner.tokenEnd),name:this.consume(X5)}},generate:function(t){this.chunk("."),this.chunk(t.name)}},r8=ce.TYPE,a8=r8.Ident,i8=43,zS=47,n8=62,s8=126,o8={name:"Combinator",structure:{name:String},parse:function(){var t=this.scanner.tokenStart,e=this.scanner.source.charCodeAt(this.scanner.tokenStart);switch(e){case n8:case i8:case s8:this.scanner.next();break;case zS:this.scanner.next(),(this.scanner.tokenType!==a8||this.scanner.lookupValue(0,"deep")===!1)&&this.error("Identifier `deep` is expected"),this.scanner.next(),this.scanner.isDelim(zS)||this.error("Solidus is expected"),this.scanner.next();break;default:this.error("Combinator is expected")}return{type:"Combinator",loc:this.getLocation(t,this.scanner.tokenStart),name:this.scanner.substrToCursor(t)}},generate:function(t){this.chunk(t.name)}},l8=ce.TYPE,u8=l8.Comment,c8=42,d8=47,p8={name:"Comment",structure:{value:String},parse:function(){var t=this.scanner.tokenStart,e=this.scanner.tokenEnd;return this.eat(u8),e-t+2>=2&&this.scanner.source.charCodeAt(e-2)===c8&&this.scanner.source.charCodeAt(e-1)===d8&&(e-=2),{type:"Comment",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.source.substring(t+2,e)}},generate:function(t){this.chunk("/*"),this.chunk(t.value),this.chunk("*/")}},f8=Vd.isCustomProperty,Vi=ce.TYPE,LS=Ga.mode,jS=Vi.Ident,NS=Vi.Hash,h8=Vi.Colon,RS=Vi.Semicolon,FS=Vi.Delim,m8=Vi.WhiteSpace,qS=33,g8=35,v8=36,b8=38,y8=42,S8=43,BS=47;function x8(t){return this.Raw(t,LS.exclamationMarkOrSemicolon,!0)}function k8(t){return this.Raw(t,LS.exclamationMarkOrSemicolon,!1)}function _8(){var t=this.scanner.tokenIndex,e=this.Value();return e.type!=="Raw"&&this.scanner.eof===!1&&this.scanner.tokenType!==RS&&this.scanner.isDelim(qS)===!1&&this.scanner.isBalanceEdge(t)===!1&&this.error(),e}var w8={name:"Declaration",structure:{important:[Boolean,String],property:String,value:["Value","Raw"]},parse:function(){var t=this.scanner.tokenStart,e=this.scanner.tokenIndex,r=C8.call(this),a=f8(r),i=a?this.parseCustomProperty:this.parseValue,n=a?k8:x8,s=!1,o;this.scanner.skipSC(),this.eat(h8);const u=this.scanner.tokenIndex;if(a||this.scanner.skipSC(),i?o=this.parseWithFallback(_8,n):o=n.call(this,this.scanner.tokenIndex),a&&o.type==="Value"&&o.children.isEmpty()){for(let l=u-this.scanner.tokenIndex;l<=0;l++)if(this.scanner.lookupType(l)===m8){o.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.scanner.isDelim(qS)&&(s=T8.call(this),this.scanner.skipSC()),this.scanner.eof===!1&&this.scanner.tokenType!==RS&&this.scanner.isBalanceEdge(e)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.scanner.tokenStart),important:s,property:r,value:o}},generate:function(t){this.chunk(t.property),this.chunk(":"),this.node(t.value),t.important&&this.chunk(t.important===!0?"!important":"!"+t.important)},walkContext:"declaration"};function C8(){var t=this.scanner.tokenStart;if(this.scanner.tokenType===FS)switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case y8:case v8:case S8:case g8:case b8:this.scanner.next();break;case BS:this.scanner.next(),this.scanner.isDelim(BS)&&this.scanner.next();break}return this.scanner.tokenType===NS?this.eat(NS):this.eat(jS),this.scanner.substrToCursor(t)}function T8(){this.eat(FS),this.scanner.skipSC();var t=this.consume(jS);return t==="important"?!0:t}var Np=ce.TYPE,A8=Ga.mode,O8=Np.WhiteSpace,E8=Np.Comment,M8=Np.Semicolon;function $8(t){return this.Raw(t,A8.semicolonIncluded,!0)}var P8={name:"DeclarationList",structure:{children:[["Declaration"]]},parse:function(){for(var t=this.createList();!this.scanner.eof;)switch(this.scanner.tokenType){case O8:case E8:case M8:this.scanner.next();break;default:t.push(this.parseWithFallback(this.Declaration,$8))}return{type:"DeclarationList",loc:this.getLocationFromList(t),children:t}},generate:function(t){this.children(t,function(e){e.type==="Declaration"&&this.chunk(";")})}},D8=Xn.consumeNumber,I8=ce.TYPE,z8=I8.Dimension,L8={name:"Dimension",structure:{value:String,unit:String},parse:function(){var t=this.scanner.tokenStart,e=D8(this.scanner.source,t);return this.eat(z8),{type:"Dimension",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.source.substring(t,e),unit:this.scanner.source.substring(e,this.scanner.tokenStart)}},generate:function(t){this.chunk(t.value),this.chunk(t.unit)}},j8=ce.TYPE,N8=j8.RightParenthesis,R8={name:"Function",structure:{name:String,children:[[]]},parse:function(t,e){var r=this.scanner.tokenStart,a=this.consumeFunctionName(),i=a.toLowerCase(),n;return n=e.hasOwnProperty(i)?e[i].call(this,e):t.call(this,e),this.scanner.eof||this.eat(N8),{type:"Function",loc:this.getLocation(r,this.scanner.tokenStart),name:a,children:n}},generate:function(t){this.chunk(t.name),this.chunk("("),this.children(t),this.chunk(")")},walkContext:"function"},F8=ce.TYPE,q8=F8.Hash,B8={name:"Hash",structure:{value:String},parse:function(){var t=this.scanner.tokenStart;return this.eat(q8),{type:"Hash",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.substrToCursor(t+1)}},generate:function(t){this.chunk("#"),this.chunk(t.value)}},W8=ce.TYPE,V8=W8.Ident,U8={name:"Identifier",structure:{name:String},parse:function(){return{type:"Identifier",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),name:this.consume(V8)}},generate:function(t){this.chunk(t.name)}},G8=ce.TYPE,H8=G8.Hash,Y8={name:"IdSelector",structure:{name:String},parse:function(){var t=this.scanner.tokenStart;return this.eat(H8),{type:"IdSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:this.scanner.substrToCursor(t+1)}},generate:function(t){this.chunk("#"),this.chunk(t.name)}},Ha=ce.TYPE,WS=Ha.Ident,Q8=Ha.Number,K8=Ha.Dimension,J8=Ha.LeftParenthesis,VS=Ha.RightParenthesis,Z8=Ha.Colon,X8=Ha.Delim,e6={name:"MediaFeature",structure:{name:String,value:["Identifier","Number","Dimension","Ratio",null]},parse:function(){var t=this.scanner.tokenStart,e,r=null;if(this.eat(J8),this.scanner.skipSC(),e=this.consume(WS),this.scanner.skipSC(),this.scanner.tokenType!==VS){switch(this.eat(Z8),this.scanner.skipSC(),this.scanner.tokenType){case Q8:this.lookupNonWSType(1)===X8?r=this.Ratio():r=this.Number();break;case K8:r=this.Dimension();break;case WS:r=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.scanner.skipSC()}return this.eat(VS),{type:"MediaFeature",loc:this.getLocation(t,this.scanner.tokenStart),name:e,value:r}},generate:function(t){this.chunk("("),this.chunk(t.name),t.value!==null&&(this.chunk(":"),this.node(t.value)),this.chunk(")")}},su=ce.TYPE,t6=su.WhiteSpace,r6=su.Comment,a6=su.Ident,i6=su.LeftParenthesis,n6={name:"MediaQuery",structure:{children:[["Identifier","MediaFeature","WhiteSpace"]]},parse:function(){this.scanner.skipSC();var t=this.createList(),e=null,r=null;e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case r6:this.scanner.next();continue;case t6:r=this.WhiteSpace();continue;case a6:e=this.Identifier();break;case i6:e=this.MediaFeature();break;default:break e}r!==null&&(t.push(r),r=null),t.push(e)}return e===null&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(t),children:t}},generate:function(t){this.children(t)}},s6=ce.TYPE.Comma,o6={name:"MediaQueryList",structure:{children:[["MediaQuery"]]},parse:function(t){var e=this.createList();for(this.scanner.skipSC();!this.scanner.eof&&(e.push(this.MediaQuery(t)),this.scanner.tokenType===s6);)this.scanner.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}},generate:function(t){this.children(t,function(){this.chunk(",")})}},l6={name:"Nth",structure:{nth:["AnPlusB","Identifier"],selector:["SelectorList",null]},parse:function(t){this.scanner.skipSC();var e=this.scanner.tokenStart,r=e,a=null,i;return this.scanner.lookupValue(0,"odd")||this.scanner.lookupValue(0,"even")?i=this.Identifier():i=this.AnPlusB(),this.scanner.skipSC(),t&&this.scanner.lookupValue(0,"of")?(this.scanner.next(),a=this.SelectorList(),this.needPositions&&(r=this.getLastListNode(a.children).loc.end.offset)):this.needPositions&&(r=i.loc.end.offset),{type:"Nth",loc:this.getLocation(e,r),nth:i,selector:a}},generate:function(t){this.node(t.nth),t.selector!==null&&(this.chunk(" of "),this.node(t.selector))}},u6=ce.TYPE.Number,c6={name:"Number",structure:{value:String},parse:function(){return{type:"Number",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(u6)}},generate:function(t){this.chunk(t.value)}},d6={name:"Operator",structure:{value:String},parse:function(){var t=this.scanner.tokenStart;return this.scanner.next(),{type:"Operator",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.substrToCursor(t)}},generate:function(t){this.chunk(t.value)}},US=ce.TYPE,p6=US.LeftParenthesis,f6=US.RightParenthesis,h6={name:"Parentheses",structure:{children:[[]]},parse:function(t,e){var r=this.scanner.tokenStart,a=null;return this.eat(p6),a=t.call(this,e),this.scanner.eof||this.eat(f6),{type:"Parentheses",loc:this.getLocation(r,this.scanner.tokenStart),children:a}},generate:function(t){this.chunk("("),this.children(t),this.chunk(")")}},m6=Xn.consumeNumber,g6=ce.TYPE,v6=g6.Percentage,b6={name:"Percentage",structure:{value:String},parse:function(){var t=this.scanner.tokenStart,e=m6(this.scanner.source,t);return this.eat(v6),{type:"Percentage",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.source.substring(t,e)}},generate:function(t){this.chunk(t.value),this.chunk("%")}},ou=ce.TYPE,y6=ou.Ident,S6=ou.Function,x6=ou.Colon,k6=ou.RightParenthesis,_6={name:"PseudoClassSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var t=this.scanner.tokenStart,e=null,r,a;return this.eat(x6),this.scanner.tokenType===S6?(r=this.consumeFunctionName(),a=r.toLowerCase(),this.pseudo.hasOwnProperty(a)?(this.scanner.skipSC(),e=this.pseudo[a].call(this),this.scanner.skipSC()):(e=this.createList(),e.push(this.Raw(this.scanner.tokenIndex,null,!1))),this.eat(k6)):r=this.consume(y6),{type:"PseudoClassSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:r,children:e}},generate:function(t){this.chunk(":"),this.chunk(t.name),t.children!==null&&(this.chunk("("),this.children(t),this.chunk(")"))},walkContext:"function"},lu=ce.TYPE,w6=lu.Ident,C6=lu.Function,GS=lu.Colon,T6=lu.RightParenthesis,A6={name:"PseudoElementSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var t=this.scanner.tokenStart,e=null,r,a;return this.eat(GS),this.eat(GS),this.scanner.tokenType===C6?(r=this.consumeFunctionName(),a=r.toLowerCase(),this.pseudo.hasOwnProperty(a)?(this.scanner.skipSC(),e=this.pseudo[a].call(this),this.scanner.skipSC()):(e=this.createList(),e.push(this.Raw(this.scanner.tokenIndex,null,!1))),this.eat(T6)):r=this.consume(w6),{type:"PseudoElementSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:r,children:e}},generate:function(t){this.chunk("::"),this.chunk(t.name),t.children!==null&&(this.chunk("("),this.children(t),this.chunk(")"))},walkContext:"function"},O6=ce.isDigit,HS=ce.TYPE,E6=HS.Number,M6=HS.Delim,$6=47,P6=46;function YS(){this.scanner.skipWS();for(var t=this.consume(E6),e=0;e<t.length;e++){var r=t.charCodeAt(e);!O6(r)&&r!==P6&&this.error("Unsigned number is expected",this.scanner.tokenStart-t.length+e)}return Number(t)===0&&this.error("Zero number is not allowed",this.scanner.tokenStart-t.length),t}var D6={name:"Ratio",structure:{left:String,right:String},parse:function(){var t=this.scanner.tokenStart,e=YS.call(this),r;return this.scanner.skipWS(),this.scanner.isDelim($6)||this.error("Solidus is expected"),this.eat(M6),r=YS.call(this),{type:"Ratio",loc:this.getLocation(t,this.scanner.tokenStart),left:e,right:r}},generate:function(t){this.chunk(t.left),this.chunk("/"),this.chunk(t.right)}},I6=ce.TYPE,z6=Ga.mode,L6=I6.LeftCurlyBracket;function QS(t){return this.Raw(t,z6.leftCurlyBracket,!0)}function j6(){var t=this.SelectorList();return t.type!=="Raw"&&this.scanner.eof===!1&&this.scanner.tokenType!==L6&&this.error(),t}var N6={name:"Rule",structure:{prelude:["SelectorList","Raw"],block:["Block"]},parse:function(){var t=this.scanner.tokenIndex,e=this.scanner.tokenStart,r,a;return this.parseRulePrelude?r=this.parseWithFallback(j6,QS):r=QS.call(this,t),a=this.Block(!0),{type:"Rule",loc:this.getLocation(e,this.scanner.tokenStart),prelude:r,block:a}},generate:function(t){this.node(t.prelude),this.node(t.block)},walkContext:"rule"},R6={name:"Selector",structure:{children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]},parse:function(){var t=this.readSequence(this.scope.Selector);return this.getFirstListNode(t)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(t),children:t}},generate:function(t){this.children(t)}},F6=ce.TYPE,q6=F6.Comma,B6={name:"SelectorList",structure:{children:[["Selector","Raw"]]},parse:function(){for(var t=this.createList();!this.scanner.eof;){if(t.push(this.Selector()),this.scanner.tokenType===q6){this.scanner.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(t),children:t}},generate:function(t){this.children(t,function(){this.chunk(",")})},walkContext:"selector"},W6=ce.TYPE.String,V6={name:"String",structure:{value:String},parse:function(){return{type:"String",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(W6)}},generate:function(t){this.chunk(t.value)}},bs=ce.TYPE,U6=bs.WhiteSpace,G6=bs.Comment,H6=bs.AtKeyword,Y6=bs.CDO,Q6=bs.CDC,K6=33;function KS(t){return this.Raw(t,null,!1)}var J6={name:"StyleSheet",structure:{children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]},parse:function(){for(var t=this.scanner.tokenStart,e=this.createList(),r;!this.scanner.eof;){switch(this.scanner.tokenType){case U6:this.scanner.next();continue;case G6:if(this.scanner.source.charCodeAt(this.scanner.tokenStart+2)!==K6){this.scanner.next();continue}r=this.Comment();break;case Y6:r=this.CDO();break;case Q6:r=this.CDC();break;case H6:r=this.parseWithFallback(this.Atrule,KS);break;default:r=this.parseWithFallback(this.Rule,KS)}e.push(r)}return{type:"StyleSheet",loc:this.getLocation(t,this.scanner.tokenStart),children:e}},generate:function(t){this.children(t)},walkContext:"stylesheet"},Z6=ce.TYPE,X6=Z6.Ident,eG=42,JS=124;function Rp(){this.scanner.tokenType!==X6&&this.scanner.isDelim(eG)===!1&&this.error("Identifier or asterisk is expected"),this.scanner.next()}var tG={name:"TypeSelector",structure:{name:String},parse:function(){var t=this.scanner.tokenStart;return this.scanner.isDelim(JS)?(this.scanner.next(),Rp.call(this)):(Rp.call(this),this.scanner.isDelim(JS)&&(this.scanner.next(),Rp.call(this))),{type:"TypeSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:this.scanner.substrToCursor(t)}},generate:function(t){this.chunk(t.name)}},rG=ce.isHexDigit,ZS=ce.cmpChar,Fp=ce.TYPE,aG=ce.NAME,iG=Fp.Ident,XS=Fp.Number,ex=Fp.Dimension,uu=43,tx=45,qp=63,nG=117;function ys(t,e){for(var r=this.scanner.tokenStart+t,a=0;r<this.scanner.tokenEnd;r++){var i=this.scanner.source.charCodeAt(r);if(i===tx&&e&&a!==0)return ys.call(this,t+a+1,!1)===0&&this.error(),-1;rG(i)||this.error(e&&a!==0?"HyphenMinus"+(a<6?" or hex digit":"")+" is expected":a<6?"Hex digit is expected":"Unexpected input",r),++a>6&&this.error("Too many hex digits",r)}return this.scanner.next(),a}function cu(t){for(var e=0;this.scanner.isDelim(qp);)++e>t&&this.error("Too many question marks"),this.scanner.next()}function Bp(t){this.scanner.source.charCodeAt(this.scanner.tokenStart)!==t&&this.error(aG[t]+" is expected")}function sG(){var t=0;if(this.scanner.isDelim(uu)){if(this.scanner.next(),this.scanner.tokenType===iG){t=ys.call(this,0,!0),t>0&&cu.call(this,6-t);return}if(this.scanner.isDelim(qp)){this.scanner.next(),cu.call(this,5);return}this.error("Hex digit or question mark is expected");return}if(this.scanner.tokenType===XS){if(Bp.call(this,uu),t=ys.call(this,1,!0),this.scanner.isDelim(qp)){cu.call(this,6-t);return}if(this.scanner.tokenType===ex||this.scanner.tokenType===XS){Bp.call(this,tx),ys.call(this,1,!1);return}return}if(this.scanner.tokenType===ex){Bp.call(this,uu),t=ys.call(this,1,!0),t>0&&cu.call(this,6-t);return}this.error()}var oG={name:"UnicodeRange",structure:{value:String},parse:function(){var t=this.scanner.tokenStart;return ZS(this.scanner.source,t,nG)||this.error("U is expected"),ZS(this.scanner.source,t+1,uu)||this.error("Plus sign is expected"),this.scanner.next(),sG.call(this),{type:"UnicodeRange",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.substrToCursor(t)}},generate:function(t){this.chunk(t.value)}},rx=ce.isWhiteSpace,lG=ce.cmpStr,Wp=ce.TYPE,ax=Wp.Function,ix=Wp.Url,uG=Wp.RightParenthesis,cG={name:"Url",structure:{value:["String","Raw"]},parse:function(){var t=this.scanner.tokenStart,e;switch(this.scanner.tokenType){case ix:for(var r=t+4,a=this.scanner.tokenEnd-1;r<a&&rx(this.scanner.source.charCodeAt(r));)r++;for(;r<a&&rx(this.scanner.source.charCodeAt(a-1));)a--;e={type:"Raw",loc:this.getLocation(r,a),value:this.scanner.source.substring(r,a)},this.eat(ix);break;case ax:lG(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(ax),this.scanner.skipSC(),e=this.String(),this.scanner.skipSC(),this.eat(uG);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(t,this.scanner.tokenStart),value:e}},generate:function(t){this.chunk("url"),this.chunk("("),this.node(t.value),this.chunk(")")}},dG={name:"Value",structure:{children:[[]]},parse:function(){var t=this.scanner.tokenStart,e=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(t,this.scanner.tokenStart),children:e}},generate:function(t){this.children(t)}},pG=ce.TYPE.WhiteSpace,fG=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),hG={name:"WhiteSpace",structure:{value:String},parse:function(){return this.eat(pG),fG},generate:function(t){this.chunk(t.value)}},Vp={AnPlusB:d5,Atrule:w5,AtrulePrelude:A5,AttributeSelector:L5,Block:V5,Brackets:H5,CDC:Q5,CDO:J5,ClassSelector:t8,Combinator:o8,Comment:p8,Declaration:w8,DeclarationList:P8,Dimension:L8,Function:R8,Hash:B8,Identifier:U8,IdSelector:Y8,MediaFeature:e6,MediaQuery:n6,MediaQueryList:o6,Nth:l6,Number:c6,Operator:d6,Parentheses:h6,Percentage:b6,PseudoClassSelector:_6,PseudoElementSelector:A6,Ratio:D6,Raw:Ga,Rule:N6,Selector:R6,SelectorList:B6,String:V6,StyleSheet:J6,TypeSelector:tG,UnicodeRange:oG,Url:cG,Value:dG,WhiteSpace:hG},Up=l5,mG={generic:!0,types:Up.types,atrules:Up.atrules,properties:Up.properties,node:Vp},nx=ce.cmpChar,gG=ce.cmpStr,tr=ce.TYPE,vG=tr.Ident,bG=tr.String,yG=tr.Number,SG=tr.Function,xG=tr.Url,kG=tr.Hash,_G=tr.Dimension,wG=tr.Percentage,CG=tr.LeftParenthesis,TG=tr.LeftSquareBracket,AG=tr.Comma,OG=tr.Delim,EG=35,MG=42,sx=43,$G=45,PG=47,DG=117,ox=function(e){switch(this.scanner.tokenType){case kG:return this.Hash();case AG:return e.space=null,e.ignoreWSAfter=!0,this.Operator();case CG:return this.Parentheses(this.readSequence,e.recognizer);case TG:return this.Brackets(this.readSequence,e.recognizer);case bG:return this.String();case _G:return this.Dimension();case wG:return this.Percentage();case yG:return this.Number();case SG:return gG(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case xG:return this.Url();case vG:return nx(this.scanner.source,this.scanner.tokenStart,DG)&&nx(this.scanner.source,this.scanner.tokenStart+1,sx)?this.UnicodeRange():this.Identifier();case OG:var r=this.scanner.source.charCodeAt(this.scanner.tokenStart);if(r===PG||r===MG||r===sx||r===$G)return this.Operator();r===EG&&this.error("Hex or identifier is expected",this.scanner.tokenStart+1);break}},IG={getNode:ox},ya=ce.TYPE,zG=ya.Delim,LG=ya.Ident,jG=ya.Dimension,NG=ya.Percentage,RG=ya.Number,FG=ya.Hash,lx=ya.Colon,qG=ya.LeftSquareBracket,BG=35,WG=42,VG=43,UG=47,ux=46,GG=62,HG=124,YG=126;function QG(t){switch(this.scanner.tokenType){case qG:return this.AttributeSelector();case FG:return this.IdSelector();case lx:return this.scanner.lookupType(1)===lx?this.PseudoElementSelector():this.PseudoClassSelector();case LG:return this.TypeSelector();case RG:case NG:return this.Percentage();case jG:this.scanner.source.charCodeAt(this.scanner.tokenStart)===ux&&this.error("Identifier is expected",this.scanner.tokenStart+1);break;case zG:var e=this.scanner.source.charCodeAt(this.scanner.tokenStart);switch(e){case VG:case GG:case YG:return t.space=null,t.ignoreWSAfter=!0,this.Combinator();case UG:return this.Combinator();case ux:return this.ClassSelector();case WG:case HG:return this.TypeSelector();case BG:return this.IdSelector()}break}}var KG={getNode:QG},JG=function(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))},cx=ce.TYPE,ZG=Ga.mode,XG=cx.Comma,eH=cx.WhiteSpace,tH=function(){var t=this.createList();if(this.scanner.skipSC(),t.push(this.Identifier()),this.scanner.skipSC(),this.scanner.tokenType===XG){t.push(this.Operator());const e=this.scanner.tokenIndex,r=this.parseCustomProperty?this.Value(null):this.Raw(this.scanner.tokenIndex,ZG.exclamationMarkOrSemicolon,!1);if(r.type==="Value"&&r.children.isEmpty()){for(let a=e-this.scanner.tokenIndex;a<=0;a++)if(this.scanner.lookupType(a)===eH){r.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}t.push(r)}return t},rH={getNode:ox,expression:JG,var:tH},aH={AtrulePrelude:IG,Selector:KG,Value:rH},iH={parse:{prelude:null,block:function(){return this.Block(!0)}}},Ss=ce.TYPE,nH=Ss.String,sH=Ss.Ident,oH=Ss.Url,lH=Ss.Function,uH=Ss.LeftParenthesis,cH={parse:{prelude:function(){var t=this.createList();switch(this.scanner.skipSC(),this.scanner.tokenType){case nH:t.push(this.String());break;case oH:case lH:t.push(this.Url());break;default:this.error("String or url() is expected")}return(this.lookupNonWSType(0)===sH||this.lookupNonWSType(0)===uH)&&(t.push(this.WhiteSpace()),t.push(this.MediaQueryList())),t},block:null}},dH={parse:{prelude:function(){return this.createSingleNodeList(this.MediaQueryList())},block:function(){return this.Block(!1)}}},pH={parse:{prelude:function(){return this.createSingleNodeList(this.SelectorList())},block:function(){return this.Block(!0)}}},Ui=ce.TYPE,fH=Ui.WhiteSpace,hH=Ui.Comment,dx=Ui.Ident,mH=Ui.Function,gH=Ui.Colon,vH=Ui.LeftParenthesis;function bH(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))}function yH(){return this.scanner.skipSC(),this.scanner.tokenType===dx&&this.lookupNonWSType(1)===gH?this.createSingleNodeList(this.Declaration()):px.call(this)}function px(){var t=this.createList(),e=null,r;this.scanner.skipSC();e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case fH:e=this.WhiteSpace();continue;case hH:this.scanner.next();continue;case mH:r=this.Function(bH,this.scope.AtrulePrelude);break;case dx:r=this.Identifier();break;case vH:r=this.Parentheses(yH,this.scope.AtrulePrelude);break;default:break e}e!==null&&(t.push(e),e=null),t.push(r)}return t}var SH={parse:{prelude:function(){var t=px.call(this);return this.getFirstListNode(t)===null&&this.error("Condition is expected"),t},block:function(){return this.Block(!1)}}},xH={"font-face":iH,import:cH,media:dH,page:pH,supports:SH},kH={parse:function(){return this.createSingleNodeList(this.Identifier())}},_H={parse:function(){return this.createSingleNodeList(this.SelectorList())}},wH={parse:function(){return this.createSingleNodeList(this.Identifier())}},fx={parse:function(){return this.createSingleNodeList(this.SelectorList())}},CH=fx,TH=fx,AH=!0,hx={parse:function(){return this.createSingleNodeList(this.Nth(AH))}},OH=hx,EH=hx,MH=!1,mx={parse:function(){return this.createSingleNodeList(this.Nth(MH))}},$H=mx,PH=mx,DH={parse:function(){return this.createSingleNodeList(this.Selector())}},IH={dir:kH,has:_H,lang:wH,matches:CH,not:TH,"nth-child":OH,"nth-last-child":EH,"nth-last-of-type":$H,"nth-of-type":PH,slotted:DH},zH={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude:function(t){return this.AtrulePrelude(t.atrule?String(t.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block:function(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:aH,atrule:xH,pseudo:IH,node:Vp},LH={node:Vp};const jH={name:"css-tree",version:"1.1.3",description:"A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations",author:"Roman Dvornov <rdvornov@gmail.com> (https://github.com/lahmatiy)",license:"MIT",repository:"csstree/csstree",keywords:["css","ast","tokenizer","parser","walker","lexer","generator","utils","syntax","validation"],main:"lib/index.js",unpkg:"dist/csstree.min.js",jsdelivr:"dist/csstree.min.js",scripts:{build:"rollup --config",lint:"eslint data lib scripts test && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint","lint-and-test":"npm run lint && npm test","update:docs":"node scripts/update-docs","review:syntax-patch":"node scripts/review-syntax-patch",test:"mocha --reporter progress",coverage:"nyc npm test",travis:"nyc npm run lint-and-test && npm run coveralls",coveralls:"nyc report --reporter=text-lcov | coveralls",prepublishOnly:"npm run build",hydrogen:"node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/parse --stat -o /dev/null"},dependencies:{"mdn-data":"2.0.14","source-map":"^0.6.1"},devDependencies:{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-json":"^4.0.2","@rollup/plugin-node-resolve":"^7.1.1",coveralls:"^3.0.9",eslint:"^6.8.0","json-to-ast":"^2.1.0",mocha:"^6.2.3",nyc:"^14.1.1",rollup:"^1.32.1","rollup-plugin-terser":"^5.3.0"},engines:{node:">=8.0.0"},files:["data","dist","lib"]};function NH(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var a in r)t[a]=r[a]}return t}$d.exports=hb.create(NH(mG,zH,LH)),$d.exports.version=jH.version;var RH=$d.exports,Ya=RH,gx={exports:{}};(function(t){(function(e,r){t.exports?t.exports=r():e.Scrollparent=r()})(wt,function(){function e(a){var i=getComputedStyle(a,null).getPropertyValue("overflow");return i.indexOf("scroll")>-1||i.indexOf("auto")>-1}function r(a){if(a instanceof HTMLElement||a instanceof SVGElement){for(var i=a.parentNode;i.parentNode;){if(e(i))return i;i=i.parentNode}return document.scrollingElement||document.documentElement}}return r})})(gx);var FH=gx.exports;const qH=ar(FH),BH={name:"custom-css-output",render(t){return t("style",this.$slots.default)}},du=[{code:"AFN",name:"Afghanistan Afghani",format:"####.##",symbol:""},{code:"ALL",name:"Albanian Lek",format:"####.##",symbol:""},{code:"DZD",name:"Algerian Dinar",format:"####.##",symbol:"دج (Arabic) or DA (Latin)"},{code:"AOA",name:"Angolan Kwanza",format:"####.##",symbol:"Kz"},{code:"ARS",name:"Argentine Peso",format:"#.###,##",symbol:""},{code:"AMD",name:"Armenian Dram",format:"#,###.##",symbol:"֏"},{code:"AWG",name:"Aruban Guilder",format:"#,###.##",symbol:""},{code:"AUD",name:"Australian Dollar",format:"# ###.##",symbol:""},{code:"AZN",name:"Azerbaijanian Manat",format:"####.##",symbol:""},{code:"BSD",name:"Bahamian Dollar",format:"#,###.##",symbol:""},{code:"BHD",name:"Bahraini Dinar",format:"#,###.###",symbol:".د.ب (Arabic) or BD (Latin"},{code:"BDT",name:"Bangladesh Taka",format:"#,###.##",symbol:"৳"},{code:"BBD",name:"Barbados Dollar",format:"####.##",symbol:""},{code:"BYN",name:"Belarussian Ruble",format:"####",symbol:""},{code:"BZD",name:"Belize Dollar",format:"#,###.##",symbol:""},{code:"BMD",name:"Bermudian Dollar",format:"#,###.##",symbol:""},{code:"BTN",name:"Bhutan Ngultrum",format:"####.##",symbol:"Nu"},{code:"BOB",name:"Bolivia, Boliviano",format:"#,###.##",symbol:""},{code:"BAM",name:"Bosnia and Herzegovina, Convertible Marks",format:"#,###.##",symbol:""},{code:"BWP",name:"Botswana, Pula",format:"#,###.##",symbol:""},{code:"BRL",name:"Brazilian Real",format:"#.###,##",symbol:""},{code:"BND",name:"Brunei Dollar",format:"#,###.##",symbol:""},{code:"BGN",name:"Bulgarian Lev",format:"####.##",symbol:""},{code:"BIF",name:"Burundi Franc",format:"####",symbol:"FBu"},{code:"KHR",name:"Cambodia, Riel",format:"####.##",symbol:""},{code:"CAD",name:"Canadian Dollar",format:"#,###.##",symbol:""},{code:"CVE",name:"Cape Verde Escudo",format:"####.##",symbol:""},{code:"KYD",name:"Cayman Islands Dollar",format:"#,###.##",symbol:""},{code:"XPF",name:"CFP Franc",format:"####",symbol:"₣"},{code:"CLP",name:"Chilean Peso",format:"#.###",symbol:""},{code:"CNY",name:"China Yuan Renminbi",format:"#,###.##",symbol:""},{code:"COP",name:"Colombian Peso",format:"#.###,##",symbol:""},{code:"KMF",name:"Comoro Franc",format:"####",symbol:"CF"},{code:"CRC",name:"Costa Rican Colon",format:"#.###,##",symbol:""},{code:"HRK",name:"Croatian Kuna",format:"#.###,##",symbol:""},{code:"CUP",name:"Cuban Peso",format:"#,###.##",symbol:""},{code:"CZK",name:"Czech Koruna",format:"#.###,##",symbol:""},{code:"DKK",name:"Danish Krone",format:"#.###,##",symbol:""},{code:"DJF",name:"Djibouti Franc",format:"####",symbol:"Fdj"},{code:"DOP",name:"Dominican Peso",format:"#,###.##",symbol:""},{code:"XCD",name:"East Caribbean Dollar",format:"#,###.##",symbol:""},{code:"EGP",name:"Egyptian Pound",format:"#,###.##",symbol:""},{code:"SVC",name:"El Salvador Colon",format:"#,###.##",symbol:""},{code:"ERN",name:"Eritrea Nakfa",format:"####.##",symbol:"Nkf (Latin script) ናቕፋ (Ge'ez script) ناكفا (Arabic script)"},{code:"ETB",name:"Ethiopian Birr",format:"####.##",symbol:"Br (Latin Script) ብር (Ethiopic Script)"},{code:"EUR",name:"Euro",format:"#,###.##",symbol:""},{code:"FKP",name:"Falkland Islands Pound",format:"####.##",symbol:""},{code:"FJD",name:"Fiji Dollar",format:"####.##",symbol:""},{code:"CDF",name:"Congolais Franc",format:"####.##",symbol:"FC"},{code:"GMD",name:"Gambia Dalasi",format:"####.##",symbol:"D"},{code:"GEL",name:"Georgia Lari",format:"####.##",symbol:"ლ (Lasi) of the Georgian script"},{code:"GHC",name:"Ghana Cedi",format:"#,###.##",symbol:""},{code:"GIP",name:"Gibraltar Pound",format:"#,###.##",symbol:""},{code:"GTQ",name:"Guatemala, Quetzal",format:"#,###.##",symbol:""},{code:"GWP",name:"Guinea-Bissau Peso",format:"####.##",symbol:"$ or COL$"},{code:"GYD",name:"Guyana Dollar",format:"####.##",symbol:""},{code:"HTG",name:"Haitian Gourde",format:"####.##",symbol:"G"},{code:"HNL",name:"Honduran Lempira",format:"#,###.##",symbol:""},{code:"HKD",name:"Hong Kong Dollar",format:"#,###.##",symbol:""},{code:"HUF",name:"Hungary Forint",format:"#.###",symbol:""},{code:"ISK",name:"Iceland Krona",format:"#.###",symbol:""},{code:"INR",name:"Indian Rupee",format:"#,##,###.##",symbol:"₹"},{code:"IDR",name:"Indonesian Rupiah",format:"#.###,##",symbol:""},{code:"IRR",name:"Iranian Rial",format:"#,###.##",symbol:""},{code:"IQD",name:"Iraqi Dinar",format:"####.###",symbol:"ع.د"},{code:"JMD",name:"Jamaican Dollar",format:"#,###.##",symbol:""},{code:"JPY",name:"Japanese Yen",format:"#,###",symbol:""},{code:"JOD",name:"Jordanian Dinar",format:"#,###.###",symbol:"د.ا"},{code:"KZT",name:"Kazakhstan Tenge",format:"####.##",symbol:""},{code:"KES",name:"Kenyan Shilling",format:"#,###.##",symbol:"KES"},{code:"KWD",name:"Kuwaiti Dinar",format:"#,###.###",symbol:"د.ك or KD"},{code:"KGS",name:"Kyrgyzstan Som",format:"####.##",symbol:""},{code:"LAK",name:"Laos, Kip",format:"####.##",symbol:""},{code:"LVL",name:"Latvian Lats",format:"#,###.##",symbol:"Ls"},{code:"LBP",name:"Lebanese Pound",format:"# ###",symbol:""},{code:"LSL",name:"Lesotho Loti",format:"####.##",symbol:"L (singular) or M (plural)"},{code:"LRD",name:"Liberian Dollar",format:"####.##",symbol:""},{code:"LYD",name:"Libyan Dinar",format:"####.###",symbol:"LD and ل.د"},{code:"LTL",name:"Lithuanian Litas",format:"# ###,##",symbol:"Lt"},{code:"MOP",name:"Macao Pataca",format:"####.##",symbol:"MOP$"},{code:"MKD",name:"Macedonia, Denar",format:"#,###.##",symbol:""},{code:"MGA",name:"Malagasy Ariary",format:"####",symbol:"Ar"},{code:"MWK",name:"Malawi Kwacha",format:"####.##",symbol:"MK"},{code:"MYR",name:"Malaysian Ringgit",format:"#,###.##",symbol:""},{code:"MVR",name:"Maldives Rufiyaa",format:"####.##",symbol:"Rf"},{code:"MTL",name:"Maltese Lira",format:"#,###.##",symbol:"₤ and Lm"},{code:"MRO",name:"Mauritanian Ouguiya",format:"####.##",symbol:"UM"},{code:"MUR",name:"Mauritius Rupee",format:"#,###",symbol:""},{code:"MXN",name:"Mexican Peso",format:"#,###.##",symbol:""},{code:"MDL",name:"Moldovan Leu",format:"####.##",symbol:"L"},{code:"MNT",name:"Mongolian Tugrik",format:"####.##",symbol:""},{code:"MAD",name:"Moroccan Dirham",format:"####.##",symbol:"MAD"},{code:"MZM",name:"Mozambique Metical",format:"#.###,##",symbol:""},{code:"MMK",name:"Myanmar Kyat",format:"####.##",symbol:"K"},{code:"NAD",name:"Namibian Dollar",format:"####.##",symbol:""},{code:"NPR",name:"Nepalese Rupee",format:"#,###.##",symbol:""},{code:"ANG",name:"Netherlands Antillian Guilder",format:"#.###,##",symbol:""},{code:"ILS",name:"New Israeli Shekel",format:"#,###.##",symbol:""},{code:"TWD",name:"New Taiwan Dollar",format:"####.##",symbol:""},{code:"TRY",name:"New Turkish Lira",format:"#,###.##",symbol:"₺"},{code:"NZD",name:"New Zealand Dollar",format:"#,###.##",symbol:""},{code:"NIO",name:"Nicaragua, Cordoba Oro",format:"####.##",symbol:""},{code:"NGN",name:"Nigeria, Naira",format:"#,###.##",symbol:""},{code:"KPW",name:"North Korean Won",format:"####.##",symbol:""},{code:"NOK",name:"Norwegian Krone",format:"#.###,##",symbol:""},{code:"PKR",name:"Pakistan Rupee",format:"#,###.##",symbol:""},{code:"PAB",name:"Panama Balboa",format:"####.##",symbol:""},{code:"PGK",name:"Papua New Guinea Kina",format:"####.##",symbol:"K"},{code:"PYG",name:"Paraguay Guarani",format:"####",symbol:""},{code:"PEN",name:"Peru Nuevo Sol",format:"#,###.##",symbol:""},{code:"UYU",name:"Uruguay Peso",format:"#.###,##",symbol:""},{code:"PHP",name:"Philippine Peso",format:"#,###.##",symbol:""},{code:"PLN",name:"Poland Zloty",format:"# ###,##",symbol:""},{code:"GBP",name:"United Kingdom Pound Sterling",format:"#,###.##",symbol:""},{code:"QAR",name:"Qatari Rial",format:"####.##",symbol:""},{code:"OMR",name:"Rial Omani",format:"#,###.###",symbol:"ر.ع."},{code:"RON",name:"Romania, New Leu",format:"#.###,##",symbol:""},{code:"RUB",name:"Russian Ruble",format:"#.###,##",symbol:""},{code:"RWF",name:"Rwanda Franc",format:"####",symbol:"FRw"},{code:"SHP",name:"Saint Helena Pound",format:"####.##",symbol:""},{code:"WST",name:"Samoa Tala",format:"####.##",symbol:"SAT"},{code:"STN",name:"Sao Tome and Principe Dobra",format:"####.##",symbol:"Db"},{code:"SAR",name:"Saudi Riyal",format:"#,###.##",symbol:""},{code:"RSD",name:"Serbian Dinar",format:"####.##",symbol:""},{code:"SCR",name:"Seychelles Rupee",format:"####.##",symbol:""},{code:"SLL",name:"Sierra Leone Leone",format:"####.##",symbol:"Le"},{code:"SGD",name:"Singapore Dollar",format:"#,###.##",symbol:""},{code:"SKK",name:"Slovak Koruna",format:"# ###,##",symbol:"Sk"},{code:"SIT",name:"Slovenia Tolar",format:"#.###,##",symbol:"SlT"},{code:"SBD",name:"Solomon Islands Dollar",format:"####.##",symbol:""},{code:"SOS",name:"Somali Shilling",format:"####.##",symbol:""},{code:"ZAR",name:"South Africa Rand",format:"# ###.##",symbol:""},{code:"KRW",name:"South Korea Won",format:"#,###",symbol:""},{code:"LKR",name:"Sri Lanka Rupee",format:"####.##",symbol:""},{code:"SDD",name:"Sudanese Dinar",format:"####.##",symbol:"LSd"},{code:"SRD",name:"Surinam Dollar",format:"####.##",symbol:"$"},{code:"SZL",name:"Swaziland Lilangeni",format:"#, ###.##",symbol:"L (singular) or E (plural)"},{code:"SEK",name:"Swedish Krona",format:"# ###,##",symbol:""},{code:"CHF",name:"Swiss Franc",format:"#'###.##",symbol:""},{code:"SYP",name:"Syrian Pound",format:"####.##",symbol:""},{code:"TZS",name:"Tanzanian Shilling",format:"#,###.##",symbol:"TSh"},{code:"THB",name:"Thailand, Baht",format:"#,###.##",symbol:""},{code:"TOP",name:"Tongan Paanga",format:"#,###.##",symbol:"T$"},{code:"TTD",name:"Trinidad and Tobago Dollar",format:"####.##",symbol:""},{code:"TND",name:"Tunisian Dinar",format:"####.###",symbol:"د.ت (Tunisian Arabic) or DT (Latin)"},{code:"TMT",name:"Turkmenistani New Manat",format:"####.##",symbol:"T"},{code:"AED",name:"UAE Dirham",format:"#,###.##",symbol:"د.إ"},{code:"UGX",name:"Uganda Shilling",format:"####.##",symbol:"USh"},{code:"UAH",name:"Ukraine Hryvnia",format:"# ###,##",symbol:""},{code:"CLF",name:"Unidad de Fomento",format:"####.##",symbol:"CLF"},{code:"USD",name:"US Dollar",format:"#,###.##",symbol:"$"},{code:"UZS",name:"Uzbekistan Sum",format:"####.##",symbol:""},{code:"VUV",name:"Vanuatu Vatu",format:"#,###",symbol:"VT"},{code:"VES",name:"Venezuela Bolivares Fuertes",format:"#.###,##",symbol:""},{code:"VND",name:"Viet Nam Dong",format:"#.###",symbol:""},{code:"YER",name:"Yemeni Rial",format:"####.##",symbol:""},{code:"ZMK",name:"Zambian Kwacha",format:"####.##",symbol:"ZK"},{code:"ZWD",name:"Zimbabwe Dollar",format:"# ###.##",symbol:""}],WH=Object.freeze(Object.defineProperty({__proto__:null,default:du},Symbol.toStringTag,{value:"Module"}));function vx(t){return t.component!=="FormMultiColumn"?t:t.items.flatMap(vx)}function VH(t){return t.flatMap(e=>e.items).flatMap(vx)}Lt.register("custom-same",function(t,e){let r;const a=t;return e.includes(".")?r=e.split(".").reduce((i,n)=>i[n],this.validator.input):r=this.validator._flattenObject(this.validator.input)[e],r===a},"The :attribute and :custom-same fields must match."),Lt.register("after",function(t,e){const r=xr(t).toISOString(),a=xr(e).toISOString();return r>a},"The :attribute must be after :after."),Lt.register("after_or_equal",function(t,e){const r=xr(t).toISOString(),a=xr(e).toISOString();return r>=a},"The :attribute must be equal or after :after_or_equal."),Lt.register("before",function(t,e){const r=xr(t).toISOString(),a=xr(e).toISOString();return r<a},"The :attribute must be before :before."),Lt.register("before_or_equal",function(t,e){const r=xr(t).toISOString(),a=xr(e).toISOString();return r<=a},"The :attribute must be equal or before :before_or_equal."),Lt.register("custom_date",function(t){let e="MM/DD/YYYY";return typeof window.ProcessMaker<"u"&&window.ProcessMaker.user&&window.ProcessMaker.user.datetime_format&&(e=window.ProcessMaker.user.datetime_format.replace(/[\sHh:msaAzZ]/g,"")),xr(t,[e,xr.ISO_8601],!0).isValid()},"The :attribute must be a valid date.");function UH(t,e){const r={},a={int:"integer",boolean:"boolean",string:"string",datetime:"custom-datetime",date:"custom-date",float:"regex:/^[+-]?\\d+(\\.\\d+)?$/",currency:"regex:/^[+-]?\\d+(\\.\\d+)?$/",array:"array",percentage:"regex:/^[+-]?\\d+(\\.\\d+)?$/",password:"string"};return r.validator=null,r.config=t,r.data=e,r.elements={},r.rules={},r.getDataAndRules=i=>{i.forEach(n=>{if(n){if(Array.isArray(n)&&r.getDataAndRules(n),n.items&&(n.component==="FormLoop"?r.ruleFormLoop(n.config.name,n.items):r.getDataAndRules(n.items)),n.component==="FormNestedScreen"){const s=H.get(window,`nestedScreens.id_${n.config.screen}`);s&&r.getDataAndRules(s)}n.config&&n.config.name&&n.config.validation&&r.addRule(n.config.name,n.config.validation),n.component==="FormInput"&&n.config&&n.config.name&&n.config.dataFormat&&r.addRuleFormat(n.config.name,n.config.dataFormat)}})},r.addRule=(i,n)=>{const s=[];typeof n=="string"?s.push(n):n.forEach(o=>{s.push(o.value)}),r.rules[i]=s},r.addRuleFormat=(i,n)=>{r.rules[i]||(r.rules[i]=[]),r.rules[i].push(a[n])},r.ruleFormLoop=(i,n)=>{n.forEach(s=>{Array.isArray(s)&&r.ruleFormLoop(i,s),s.items&&(s.component==="FormLoop"?r.ruleFormLoop(`${i}.*.${s.config.name}`,s.items):r.ruleFormLoop(i,s.items)),s.config&&s.config.name&&s.config.validation&&(Array.isArray(s.config.validation)&&s.config.validation.forEach(o=>{if(!o.value.includes(":"))return;const u=o.value.split(":")[0];let l=o.value.split(":")[1],c;if(u.includes("required_")||u.includes("same")){if(l.includes("_parent"))l=l.split("_parent.").pop(),c=`${u}:${l}`;else if(!l.includes(","))c=`${u}:${i}.*.${l}`;else{l=l.split(",")[0];const d=o.value.split(":")[1].split(",")[1];c=`${u}:${i}.*.${l},${d}`}o.value=c}}),r.addRule(`${i}.*.${s.config.name}`,s.config.validation)),s.component==="FormInput"&&s.config&&s.config.name&&s.config.dataFormat&&r.addRuleFormat(`${i}.*.${s.config.name}`,s.config.dataFormat)})},r.getValidator=()=>{r.getDataAndRules(r.config),r.validator=new Lt(r.data,r.rules)},r.getErrors=()=>r.failed()?r.validator.errors.errors:{},r.failed=()=>(r.getValidator(),r.validator.fails()),r}const GH={props:["value"],data(){return{display:"running",errorMessage:"",showMessage:!1,variables:[]}},computed:{message(){return this.$t("{{variable}} running.",{variable:this.variables.join(", ")})}},methods:{error(t){this.display="error",this.errorMessage=t},show(t){this.variables.indexOf(t)===-1&&this.variables.push(t),this.display="running",this.errorMessage="",this.showMessage=!1,this.$refs.modal.show()},hide(t){t===-1&&this.variables.splice(0);const e=this.variables.indexOf(t);e>-1&&this.variables.splice(e,1),this.variables.length===0&&this.$refs.modal.hide()}}};var HH=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"watchers-synchronous",title:"","hide-header":"","no-close-on-esc":"","hide-header-close":"","no-close-on-backdrop":""}},[e.display==="running"?r("div",{staticClass:"container text-center"},[r("div",{staticClass:"icon-container m-4"},[r("svg",{staticClass:"lds-gear",attrs:{width:"50%",height:"50%",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"}},[r("g",{attrs:{transform:"translate(50 50)"}},[r("g",{attrs:{transform:"rotate(248.825)"}},[r("animateTransform",{attrs:{attributeName:"transform",type:"rotate",values:"0;360",keyTimes:"0;1",dur:"4.7s",repeatCount:"indefinite"}}),r("path",{attrs:{d:"M37.43995192304605 -6.5 L47.43995192304605 -6.5 L47.43995192304605 6.5 L37.43995192304605 6.5 A38 38 0 0 1 35.67394948182593 13.090810836924174 L35.67394948182593 13.090810836924174 L44.33420351967032 18.090810836924174 L37.83420351967032 29.34914108612188 L29.17394948182593 24.34914108612188 A38 38 0 0 1 24.34914108612188 29.17394948182593 L24.34914108612188 29.17394948182593 L29.34914108612188 37.83420351967032 L18.090810836924184 44.33420351967032 L13.090810836924183 35.67394948182593 A38 38 0 0 1 6.5 37.43995192304605 L6.5 37.43995192304605 L6.500000000000001 47.43995192304605 L-6.499999999999995 47.43995192304606 L-6.499999999999996 37.43995192304606 A38 38 0 0 1 -13.09081083692417 35.67394948182593 L-13.09081083692417 35.67394948182593 L-18.09081083692417 44.33420351967032 L-29.34914108612187 37.834203519670325 L-24.349141086121872 29.173949481825936 A38 38 0 0 1 -29.17394948182592 24.34914108612189 L-29.17394948182592 24.34914108612189 L-37.83420351967031 29.349141086121893 L-44.33420351967031 18.0908108369242 L-35.67394948182592 13.090810836924193 A38 38 0 0 1 -37.43995192304605 6.5000000000000036 L-37.43995192304605 6.5000000000000036 L-47.43995192304605 6.500000000000004 L-47.43995192304606 -6.499999999999993 L-37.43995192304606 -6.499999999999994 A38 38 0 0 1 -35.67394948182593 -13.090810836924167 L-35.67394948182593 -13.090810836924167 L-44.33420351967032 -18.090810836924163 L-37.834203519670325 -29.34914108612187 L-29.173949481825936 -24.34914108612187 A38 38 0 0 1 -24.349141086121893 -29.17394948182592 L-24.349141086121893 -29.17394948182592 L-29.349141086121897 -37.834203519670304 L-18.0908108369242 -44.334203519670304 L-13.090810836924195 -35.67394948182592 A38 38 0 0 1 -6.500000000000005 -37.43995192304605 L-6.500000000000005 -37.43995192304605 L-6.500000000000007 -47.43995192304605 L6.49999999999999 -47.43995192304606 L6.499999999999992 -37.43995192304606 A38 38 0 0 1 13.090810836924149 -35.67394948182594 L13.090810836924149 -35.67394948182594 L18.090810836924142 -44.33420351967033 L29.349141086121847 -37.83420351967034 L24.349141086121854 -29.17394948182595 A38 38 0 0 1 29.17394948182592 -24.349141086121893 L29.17394948182592 -24.349141086121893 L37.834203519670304 -29.349141086121897 L44.334203519670304 -18.0908108369242 L35.67394948182592 -13.090810836924197 A38 38 0 0 1 37.43995192304605 -6.500000000000007 M0 -20A20 20 0 1 0 0 20 A20 20 0 1 0 0 -20"}})],1)])])]),r("h3",{staticClass:"display-6"},[e._v(e._s(e.message))]),r("p",{staticClass:"lead"},[e._v(e._s(e.$t("This window will automatically close when complete.")))])]):r("div",{staticClass:"container text-center"},[r("div",{staticClass:"icon-container m-4"},[r("i",{staticClass:"fas fa-sad-tear fa-10x"})]),r("h3",{staticClass:"display-6"},[e._v(e._s(e.$t("Something has gone wrong.")))]),r("p",{staticClass:"lead"},[e._v(e._s(e.$t("Unfortunately this screen has had an issue. We've notified the administrator."))+" "),r("a",{attrs:{href:"javascript:void(0)","data-cy":"watchers-show-error-message"},on:{click:function(a){e.showMessage=!e.showMessage}}},[r("i",{staticClass:"fas fa-info-circle"})])]),e.showMessage?r("small",{staticClass:"text-danger text-left small"},[e._v(e._s(e.errorMessage))]):e._e()]),r("div",{staticClass:"w-100 text-right",attrs:{slot:"modal-footer"},slot:"modal-footer"},[e.display==="error"?r("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:function(a){return e.hide(-1)}}},[e._v(e._s(e.$t("Close")))]):e._e()])])},YH=[],QH=oe(GH,HH,YH,!1,null,null,null,null);const bx=QH.exports,KH={props:{value:Object}};var JH=function(){var e=this,r=e._self._c;return r("b-alert",{ref:"alert",attrs:{variant:"danger",dismissible:""},model:{value:e.value.show,callback:function(a){e.$set(e.value,"show",a)},expression:"value.show"}},[r("b",[e._v(" "+e._s(e.value.error)+" ")]),r("ul",e._l(e.value.errors,function(a,i){return r("li",{key:`error-${i}`},[e._v(e._s(a))])}),0)])},ZH=[],XH=oe(KH,JH,ZH,!1,null,null,null,null);const Gp=XH.exports,_te="",e7={name:"ScreenRenderer",components:{WatchersSynchronous:bx,ScreenRendererError:Gp},mixins:[ib,ac],props:{loopContext:{type:String,default:""}},data(){return{currentDefinition:null,codigo:"",displayAsyncLoading:!1}},watch:{definition:{deep:!0,handler(t){H.isEmpty(t.config)||this.rebuildScreen(t)}}},mounted(){this.currentDefinition=H.cloneDeep(this.definition),this.component=this.buildComponent(this.currentDefinition)},methods:{rebuildScreen(t){H.isEqual(t,this.currentDefinition)||(this.currentDefinition=H.cloneDeep(t),this.component=this.buildComponent(this.currentDefinition))},onAsyncWatcherOn(){this.displayAsyncLoading=typeof this._parent>"u"},onAsyncWatcherOff(){this.displayAsyncLoading=!1},getCurrentPage(){return this.$refs.component.getCurrentPage()},setCurrentPage(t){this.$refs.component.setCurrentPage(t)}}};var t7=function(){var e=this,r=e._self._c;return r("b-container",{attrs:{fluid:""}},[e.displayAsyncLoading?r("div",{ref:"watchersAsynchronous",staticClass:"alert alert-light",attrs:{role:"alert"}},[r("svg",{staticClass:"lds-gear",attrs:{width:"20px",height:"20px",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"}},[r("g",{attrs:{transform:"translate(50 50)"}},[r("g",{attrs:{transform:"rotate(248.825)"}},[r("animateTransform",{attrs:{attributeName:"transform",type:"rotate",values:"0;360",keyTimes:"0;1",dur:"4.7s",repeatCount:"indefinite"}}),r("path",{attrs:{d:"M37.43995192304605 -6.5 L47.43995192304605 -6.5 L47.43995192304605 6.5 L37.43995192304605 6.5 A38 38 0 0 1 35.67394948182593 13.090810836924174 L35.67394948182593 13.090810836924174 L44.33420351967032 18.090810836924174 L37.83420351967032 29.34914108612188 L29.17394948182593 24.34914108612188 A38 38 0 0 1 24.34914108612188 29.17394948182593 L24.34914108612188 29.17394948182593 L29.34914108612188 37.83420351967032 L18.090810836924184 44.33420351967032 L13.090810836924183 35.67394948182593 A38 38 0 0 1 6.5 37.43995192304605 L6.5 37.43995192304605 L6.500000000000001 47.43995192304605 L-6.499999999999995 47.43995192304606 L-6.499999999999996 37.43995192304606 A38 38 0 0 1 -13.09081083692417 35.67394948182593 L-13.09081083692417 35.67394948182593 L-18.09081083692417 44.33420351967032 L-29.34914108612187 37.834203519670325 L-24.349141086121872 29.173949481825936 A38 38 0 0 1 -29.17394948182592 24.34914108612189 L-29.17394948182592 24.34914108612189 L-37.83420351967031 29.349141086121893 L-44.33420351967031 18.0908108369242 L-35.67394948182592 13.090810836924193 A38 38 0 0 1 -37.43995192304605 6.5000000000000036 L-37.43995192304605 6.5000000000000036 L-47.43995192304605 6.500000000000004 L-47.43995192304606 -6.499999999999993 L-37.43995192304606 -6.499999999999994 A38 38 0 0 1 -35.67394948182593 -13.090810836924167 L-35.67394948182593 -13.090810836924167 L-44.33420351967032 -18.090810836924163 L-37.834203519670325 -29.34914108612187 L-29.173949481825936 -24.34914108612187 A38 38 0 0 1 -24.349141086121893 -29.17394948182592 L-24.349141086121893 -29.17394948182592 L-29.349141086121897 -37.834203519670304 L-18.0908108369242 -44.334203519670304 L-13.090810836924195 -35.67394948182592 A38 38 0 0 1 -6.500000000000005 -37.43995192304605 L-6.500000000000005 -37.43995192304605 L-6.500000000000007 -47.43995192304605 L6.49999999999999 -47.43995192304606 L6.499999999999992 -37.43995192304606 A38 38 0 0 1 13.090810836924149 -35.67394948182594 L13.090810836924149 -35.67394948182594 L18.090810836924142 -44.33420351967033 L29.349141086121847 -37.83420351967034 L24.349141086121854 -29.17394948182595 A38 38 0 0 1 29.17394948182592 -24.349141086121893 L29.17394948182592 -24.349141086121893 L37.834203519670304 -29.349141086121897 L44.334203519670304 -18.0908108369242 L35.67394948182592 -13.090810836924197 A38 38 0 0 1 37.43995192304605 -6.500000000000007 M0 -20A20 20 0 1 0 0 20 A20 20 0 1 0 0 -20"}})],1)])]),e._v(" "+e._s(e.$t("Loading..."))+" ")]):e._e(),r(e.component,{ref:"component",tag:"component",attrs:{vdata:e.value,_parent:e._parent,"_initial-page":e.currentPage},on:{submit:e.submit,asyncWatcherTriggered:e.onAsyncWatcherOn,asyncWatcherCompleted:e.onAsyncWatcherOff}}),e.showErrors&&e.building.error?r("screen-renderer-error",{model:{value:e.building,callback:function(a){e.building=a},expression:"building"}}):e._e(),r("watchers-synchronous",{ref:"watchersSynchronous"})],1)},r7=[],a7=oe(e7,t7,r7,!1,null,null,null,null);const yx=a7.exports,wte="",i7={name:"VueFormRenderer",components:{ScreenRenderer:yx,CustomCssOutput:BH},mixins:[ac,ph],model:{prop:"data",event:"update"},props:["config","data","_parent","page","computed","customCss","mode","watchers","isLoop","ancestorScreens","loopContext","showErrors","testScreenDefinition","deviceScreen"],data(){return{definition:{config:this.config,computed:this.computed,customCss:this.customCss,watchers:this.watchers,isMobile:!1},formSubmitErrorClass:"",watchers_config:{api:{execute:null,execution:null}},customCssWrapped:"",customFunctions:{formatCurrency(){const t=(e,r)=>{const a=du.find(n=>n.code===r),i={alias:"currency"};if(a){const n=a.format.match(/[.,]/g);n.length===0?n.push("","."):n.length===1&&n.push(n[0]==="."?",":"."),i.digits=(a.format.split(n[1])[1]||"").length,i.radixPoint=n[1],i.groupSeparator=n[0],i.prefix=`${a.symbol} `,i.suffix=` ${a.code}`}return db.format(e,i)};return function(e){const r=JSON.parse(`[${e}]`);return t(H.get(this,r[0]),r[1])}}},scrollable:null,containerObserver:null}},computed:{containerClass(){return this.parentScreen?`screen-${this.parentScreen}`:"custom-css-scope"},cssDevice(){return{"--mobile-width":dh}},containerDeviceClass(){return this.deviceScreen==="mobile"?"container-mobile":"container-desktop"}},watch:{customCss(t){this.definition.customCss=t,this.parseCss()},config:{deep:!0,handler(t){this.definition.config=t,this.$nextTick(()=>{this.registerCustomFunctions()})}},data:{deep:!0,handler(){this.$emit("update",this.data);const t=this.getMainScreen();t&&this.validate(t)}},computed:{deep:!0,handler(t){this.definition.computed=t}},watchers:{deep:!0,handler(t){this.definition.watchers=t}}},created(){this.parseCss=H.debounce(this.parseCss,500,{leading:!0}),this.containerObserver=new ResizeObserver(this.onContainerObserver)},mounted(){this.registerCustomFunctions(),window.ProcessMaker&&window.ProcessMaker.EventBus&&window.ProcessMaker.EventBus.$emit("screen-renderer-init",this),this.scrollable=qH(this.$el),this.containerObserver.observe(this.$refs.formRendererContainer)},methods:{...Pt.mapActions("globalErrorsModule",["validate","hasSubmitted","showValidationOnLoad","restartValidation"]),getMainScreen(){return this.$refs.renderer&&this.$refs.renderer.$refs.component},countElements(t){const e={config:t};return this.$refs.renderer.countElements(e)},checkForRecordList(t,e){return t.forEach(r=>{r.items&&this.checkForRecordList(r.items,e),r.component==="FormRecordList"&&this.removeRecordListForms(r,e)}),e},removeRecordListForms(t,e){const r=t.config.form;return delete e[r],e},checkForNestedScreenErrors(t){if(t.$options._componentTag==="FormNestedScreen")return t.errors()},isValid(){const t=VH(this.definition.config),e=H.cloneDeep(this.definition.config);return this.checkForRecordList(t,e),this.dataTypeValidator=UH(e,this.data),this.errors=this.dataTypeValidator.getErrors(),this.errors&&(this.formSubmitErrorClass="invalid-form-submission"),H.size(this.errors)===0},registerCustomFunctions(t=this){t.registerCustomFunction instanceof Function&&Object.keys(this.customFunctions).forEach(e=>{t.registerCustomFunction(e,this.customFunctions[e])}),t.$children instanceof Array&&t.$children.forEach(e=>this.registerCustomFunctions(e))},submit(t,e=!1){this.$emit("submit",this.data,e)},parseCss(){const t=`.${this.containerClass}`;try{const e=Ya.parse(this.customCss,{onParseError(i){throw i.formattedMessage}});let r=0;Ya.walk(e,function(i,n,s){if(i.type.match(/^.+Selector$/)&&i.name!==t&&s&&(n.prev||(s.prependData({type:"WhiteSpace",loc:null,value:" "}),s.prependData({type:"TypeSelector",loc:null,name:t}))),r>5e3)throw Error("CSS is too long");r+=1});const a=[];Ya.walk(e,{visit:"Atrule",enter:(i,n,s)=>{if(!n.prev&&i.name==="media"){const o={minWidth:0,maxWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),rules:[]};Ya.walk(i.prelude,{visit:"MediaFeature",enter:u=>{["min-width","max-width"].includes(u.name)&&(o[H.camelCase(u.name)]=parseInt(u.value.value,10),o.rules.length===0&&Ya.walk(i.block,{visit:"Rule",enter:l=>{const c=Ya.generate(l);o.rules.push(c)}}),a.push(o))}}),s.remove(n)}}}),this.customCssWrapped=Ya.generate(e),a.forEach(i=>{const{width:n}=this.$refs.formRendererContainer.getBoundingClientRect();n>=i.minWidth&&n<=i.maxWidth&&(this.customCssWrapped+=i.rules.join(" "))}),this.$emit("css-errors","")}catch(e){this.$emit("css-errors",e)}},getCurrentPage(){return this.$refs.renderer.getCurrentPage()},setCurrentPage(t){this.$refs.renderer.setCurrentPage(t)},onContainerObserver(t){t[0].target.getBoundingClientRect(),this.parseCss()}}};var n7=function(){var e=this,r=e._self._c;return r("div",{ref:"formRendererContainer",class:[e.containerClass,e.containerDeviceClass],style:e.cssDevice,attrs:{id:"vue-form-renderer","data-cy":"screen-renderer-container"}},[r("custom-css-output",[e._v(e._s(e.customCssWrapped))]),r("screen-renderer",{ref:"renderer",staticClass:"p-0",attrs:{value:e.data,_parent:e._parent,definition:e.definition,"current-page":e.currentPage,"data-cy":"screen-renderer","show-errors":e.showErrors,"test-screen-definition":e.testScreenDefinition||!1,"loop-context":e.loopContext},on:{submit:e.submit}})],1)},s7=[],o7=oe(i7,n7,s7,!1,null,"5c027fb6",null,null);const Gi=o7.exports,l7={name:"FormLoop",components:{VueFormRenderer:Gi},mixins:[],props:["value","config","transientData","name","mode","formConfig"],data(){return{matrix:[],items:[],additionalItems:0,transientDataCopy:null,parentObjectChanges:[]}},computed:{parentLoopContext(){let t=this.$parent,e=0,r="";for(;!t.loopContext;){if(t=t.$parent,t===this.$root){t=null;break}if(e>100)throw new Error("Loop Error");e++}return t&&(r=t.loopContext),r},rendererConfig(){const{items:t}=this;return[{name:"LoopItem",items:t}]},times(){if(!this.config||!this.config.settings)return[];if(this.config.settings.type==="existing"){const e=H.get(this.transientData,this.name,null);return e?[...e.keys()]:[]}let{times:t}=this.config.settings;try{t=_r.render(t,this.transientData)}catch(e){throw new Error(e)}return t=parseInt(t),Number.isNaN(t)?[]:(t>100&&(t=100),t+=this.additionalItems,[...Array(t).keys()])}},watch:{transientData:{handler(){this.transientDataCopy=H.cloneDeep(this.transientData),this.$delete(this.transientDataCopy,this.name);const t=H.get(this,`transientData.${this.name}`,null);t&&Array.isArray(t)?this.matrix=t:this.matrix=[],this.setupMatrix()},immediate:!0},value:{handler(){this.items=this.value},immediate:!0},matrix:{handler(){H.isEqual(this.$parent.transientData[this.name],this.matrix)||this.$set(this.$parent.transientData,this.name,H.cloneDeep(this.matrix))},deep:!0},times(){this.setupMatrix()},"config.settings.times":{handler(){this.additionalItems=0}}},mounted(){this.$set(this.$parent.transientData,this.name,H.cloneDeep(this.matrix))},methods:{getLoopContext(t){let e=`${this.name}.${t.toString()}`;return this.parentLoopContext!==""&&(e=`${this.parentLoopContext}.${e}`),e},add(){this.config.settings.type==="existing"?this.setMatrixValue(this.matrix.length,{}):this.additionalItems++},remove(){this.config.settings.type==="existing"?this.$delete(this.matrix,this.matrix.length-1):this.additionalItems--},removeConfirm(){const t=this.$t("Are you sure you want to delete this?");window.ProcessMaker.confirmModal(this.$t("Caution!"),t,"",()=>{this.remove()})},setMatrixValue(t,e){const r=H.omit(e,"_parent");this.registerParentVariableChanges(e),this.$set(this.matrix,t,r),this.setChagnedParentVariables()},registerParentVariableChanges(t){t._parent&&Object.keys(t._parent).forEach(e=>{H.isEqual(this.transientDataCopy[e],t._parent[e])||this.parentObjectChanges.push({key:e,value:t._parent[e]})})},setChagnedParentVariables(){this.parentObjectChanges.forEach(t=>{this.$set(this.$parent.transientData,t.key,t.value)}),this.parentObjectChanges=[]},getMatrixValue(t){let e=H.cloneDeep(this.matrix[t]);return e||(e={}),e._parent=H.cloneDeep(this.transientDataCopy),e},setupMatrix(){for(const t of this.times)typeof this.matrix[t]>"u"&&this.setMatrixValue(t,{});this.matrix.length!==this.times.length&&(this.matrix=this.matrix.slice(0,this.times.length))},submit(){this.$emit("submit")}}};var u7=function(){var e=this,r=e._self._c;return r("div",[e._l(e.times,function(a){return r("form",{key:a,on:{submit:function(i){i.preventDefault()}}},[r("vue-form-renderer",{attrs:{data:e.getMatrixValue(a),config:e.rendererConfig,computed:null,"custom-css":null,watchers:null,"is-loop":!0,"debug-context":"Loop #"+a,mode:e.mode,"loop-context":e.getLoopContext(a),"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:function(i){return e.$emit("pageNavigate",i)},update:function(i){return e.setMatrixValue(a,i)}}})],1)}),e.config.settings.add?r("b-row",{staticClass:"justify-content-md-center"},[r("b-col",{attrs:{md:"auto"}},[r("b-button",{staticClass:"ml-1 mr-1",attrs:{size:"sm",variant:"secondary",title:e.$t("Add Item")},on:{click:e.add}},[r("i",{staticClass:"fas fa-plus"})]),e.times.length>0?r("b-button",{staticClass:"ml-1 mr-1",attrs:{size:"sm",variant:"outline-danger",title:e.$t("Delete Item")},on:{click:e.removeConfirm}},[r("i",{staticClass:"fas fa-minus"})]):e._e()],1)],1):e._e()],2)},c7=[],d7=oe(l7,u7,c7,!1,null,null,null,null);const xs=d7.exports,Cte="",pu=typeof window>"u"?global:window,Hp=[{name:"empty",items:[]}],p7={components:{VueFormRenderer:Gi},props:{name:String,screen:Number,value:null,validationData:null,_parent:null,ancestorScreens:{type:Array,default:()=>[]}},data(){return{localData:{},config:Hp,computed:[],customCSS:null,watchers:[],screenTitle:null}},computed:{validatedConfig(){return this.config&&this.config[0]?this.config:Hp},data:{get(){return this.validationData||this.localData},set(t){Object.keys(t).forEach(e=>{this.validationData&&this.$set(this.validationData,e,t[e])})}},placeholder(){return this.screen?"":this.$t("Select a screen to nest")}},methods:{isSubmitButton(t){return t.config&&t.component==="FormButton"&&t.config.event==="submit"},hideSubmitButtons(t){t.forEach(e=>{Array.isArray(e)&&this.hideSubmitButtons(e),e.items&&this.hideSubmitButtons(e.items),this.isSubmitButton(e)&&(e.config.hidden=!0)})},disableForm(t){t.forEach(e=>{Array.isArray(e)&&this.disableForm(e),e.items&&this.disableForm(e.items),e&&e.config&&(e.config.disabled=!0,e.config.readonly=!0,e.config.editable=!1)})},loadScreen(t){this.config=Hp,this.computed=[],this.customCSS=null,this.watchers=[],this.screenTitle=null,t&&this.$dataProvider.getScreen(t).then(e=>{this.config=e.data.config,this.hideSubmitButtons(this.config),this.computed=e.data.computed,this.customCSS=e.data.custom_css,this.watchers=e.data.watchers,this.screenTitle=e.data.title,this.$attrs.disabled&&this.disableForm(this.config),this.ancestorScreens.includes(this.screenTitle)?pu.ProcessMaker.alert(`Rendering of nested "${this.screenTitle}" screen was disallowed to prevent loop.`,"warning"):(pu.nestedScreens||(pu.nestedScreens={}),pu.nestedScreens["id_"+t]=this.config,this.$root.$emit("nested-screen-updated"))})},errors(){return this.$refs.nestedScreen.isValid(),this.$refs.nestedScreen.errors}},watch:{screen(t){this.loadScreen(t)}},mounted(){this.loadScreen(this.screen)}};var f7=function(){var e=this,r=e._self._c;return e.ancestorScreens.includes(e.screenTitle)?e._e():r("vue-form-renderer",{ref:"nestedScreen",staticClass:"form-nested-screen",attrs:{placeholder:e.placeholder,config:e.validatedConfig,"ancestor-screens":[...e.ancestorScreens,e.screenTitle],mode:"preview",computed:e.computed,"custom-css":e.customCSS,watchers:e.watchers,"debug-context":"Nested Screen",_parent:e._parent},on:{"css-errors":function(a){e.cssErrors=a}},model:{value:e.data,callback:function(a){e.data=a},expression:"data"}})},h7=[],m7=oe(p7,f7,h7,!1,null,null,null,null);const ks=m7.exports,Tte="",g7={key:"__actions",label:"Actions",thClass:"text-right",tdClass:"text-right"},v7={components:{VueFormRenderer:Gi},mixins:[Md],props:["name","label","fields","value","editable","_config","form","validationData","formConfig","formComputed","formWatchers","_perPage"],data(){return{editFormVersion:0,single:"",plural:"",addItem:{},editItem:{},editIndex:null,currentPage:1,paginatorPage:1,perPageSelectEnabled:!1,perPage:5,lastPage:1,css:{tableClass:"table table-hover table-responsive text-break mb-0 d-table",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending",renderIcon(t){return`<i class="${t.join(" ")}"></i>`}},initFormValues:{},currentRowIndex:null}},computed:{popupConfig(){const t=[];return t[this.form]=this.formConfig[this.form],t},debug(){return{perPageSelectEnabled:this.perPageSelectEnabled,perPageSelectEnabled2:this.$refs.pagination&&this.$refs.pagination.perPageSelectEnabled}},parentObj(){let t=this.$parent;for(;"transientData"in t.$props;)t=t.$parent;return t},dataManager(){if(this.$refs.vuetable){const t=this.$refs.vuetable.makePagination(this.value.length);return{pagination:t,data:this.value.slice(t.from-1,t.to)}}console.log("refs vuetable not exists")},tableData(){const t=this.value||[],e=this.paginatorPage-1;return this.lastPage=Math.ceil(t.length/this.perPage),{total:t.length,per_page:this.perPage,current_page:this.paginatorPage,last_page:this.lastPage,next_page_url:null,prev_page_url:null,from:e,to:t.length,data:t,lastSortConfig:!1}},tableFields(){const t=this.getTableFieldsFromDataSource();return this.editable&&!this.selfReferenced&&t.push(g7),t},selfReferenced(){return this.form&&this.form===this.$parent.currentPage}},watch:{"tableData.total":{deep:!0,handler(t){const e=Math.ceil(t/this.perPage);this.currentPage=this.currentPage>e?e:this.currentPage,this.currentPage=this.currentPage==0?1:this.currentPage}}},mounted(){this._perPage&&(this.perPage=this._perPage),this.updateRowDataNamePrefix=H.debounce(this.updateRowDataNamePrefix,100)},methods:{updateRowDataNamePrefix(){this.setUploadDataNamePrefix(this.currentRowIndex)},emitShownEvent(){window.ProcessMaker.EventBus.$emit("modal-shown")},formatIfDate(t){return ee.dateUtils.formatIfDate(t)},isImage(t,e){const r=H.get(e,t.key);return typeof r=="string"&&r.substr(0,11)==="data:image/"},isWebEntryFile(t,e){const r=H.get(e,t.key),a=/^webentry_.*:*$/;let i=r;return Array.isArray(r)&&(i=r[0].file),a.test(i)},formatIfWebEntryFile(t,e){return H.get(window,"PM4ConfigOverrides.requestFiles",{})[`${t.key}.${e.row_id}`].map(i=>i.file_name).join(", ")},isFiledownload(t){return t.key==="__filedownload"},setUploadDataNamePrefix(t=null){this.currentRowIndex=t;let e=null;t!==null&&this.editItem?e=this.editItem.row_id:this.addItem&&(e=this.addItem.row_id),this.$root.$emit("set-upload-data-name",this,t,e)},getTableFieldsFromDataSource(){const{jsonData:t,key:e,value:r,dataName:a}=this.fields,i=n=>({key:n[e||"value"],sortable:!0,label:n[r||"content"],tdClass:"table-column"});return this.getValidFieldData(t,a).map(i)},getValidFieldData(t,e){let r=this.validationData[e];if(t)try{r=JSON.parse(t)}catch{r=[]}return Array.isArray(r)?r:[]},hideInformation(){this.$refs.infoModal.hide()},onPaginationData(t){this.$refs.pagination.setPaginationData(t)},onChangePerPage(t){this.perPage=parseInt(t)},onChangePage(t){t=="next"?this.paginatorPage+=1:t=="prev"?this.paginatorPage-=1:this.paginatorPage=t,this.paginatorPage<=0&&(this.paginatorPage=1),this.paginatorPage>this.lastPage&&(this.paginatorPage=this.lastPage)},showEditForm(t,e){const r=(this.currentPage-1)*this.perPage+t;this.editItem=JSON.parse(JSON.stringify(H.find(this.tableData.data,{row_id:e}))),this.editIndex=r,this.editFormVersion++,this.$nextTick(()=>{this.setUploadDataNamePrefix(r),this.$refs.editModal.show()})},edit(t){if(this.$refs.addRenderer.hasSubmitted(!0),this.$refs.editRenderer.$refs.renderer.$refs.component.$v.vdata.$invalid){t.preventDefault();return}const e=this.tableData.data?JSON.parse(JSON.stringify(this.tableData.data)):[],r=H.findIndex(e,{row_id:this.editItem.row_id});e[r]=JSON.parse(JSON.stringify(this.editItem)),delete e[r]._parent,this.$emit("input",e)},showAddForm(){const t=Math.random().toString(36).substring(2)+Date.now().toString(36);if(this.$set(this.addItem,"row_id",t),this.setUploadDataNamePrefix(),!this.form){this.$refs.infoModal.show();return}this.$refs.addModal.show();const{_parent:e,...r}=this.addItem;this.initFormValues=H.cloneDeep(r)},handleHideAddModal(){this.addItem=this.initFormValues,this.$refs.addRenderer.hasSubmitted(!1)},async handleOk(t){if(this.$refs.addRenderer.hasSubmitted(!0),t.preventDefault(),this.$refs.addRenderer.$refs.renderer.$refs.component.$v.vdata.$invalid)return;const e=this.value?JSON.parse(JSON.stringify(this.value)):[],r=JSON.parse(JSON.stringify({...this.addItem,_parent:void 0}));delete r._parent,e[e.length]=r,this.$emit("input",e),this.addItem={},this.$nextTick(()=>{this.$refs.addModal.hide()})},showDeleteConfirmation(t,e){this.deleteIndex=H.find(this.tableData.data,{row_id:e}),this.$refs.deleteModal.show()},downloadFile(t,e,r){const a=this.$root.task.request_data._request.id,i=`${this.name}.${r}.${e}`;window.ProcessMaker.apiClient.get(`requests/${a}/files?name=${i}`).then(n=>{const s=n.data;if(s&&s.data&&s.data.length){const o=s.data[0];this.downloadRecordListFile(o,a)}})},downloadRecordListFile(t,e){window.ProcessMaker.apiClient({baseURL:"/",url:`/request/${e}/files/${t.id}`,method:"GET",responseType:"blob"}).then(r=>{const a=window.URL.createObjectURL(new Blob([r.data])),i=document.createElement("a");i.href=a,i.setAttribute("download",t.file_name),document.body.appendChild(i),i.click()})},remove(){const t=this.tableData.data?JSON.parse(JSON.stringify(this.tableData.data)):[],e=this.deleteIndex;H.remove(t,{row_id:this.deleteIndex.row_id}),this.$emit("input",t),this.$root.$emit("removed-record",this,e)}}};var b7=function(){var e=this,r=e._self._c;return r("div",{staticClass:"data-table overflow-auto"},[r("div",{staticClass:"row mb-2 ml-0 mr-0"},[r("div",{staticClass:"col"},[r("h4",[e._v(e._s(e.label))])]),r("div",{staticClass:"col text-right"},[e.editable&&!e.selfReferenced?r("button",{staticClass:"btn btn-primary",attrs:{"data-cy":"add-row"},on:{click:e.showAddForm}},[e._v(" "+e._s(e.$t("Add"))+" ")]):e._e()])]),e.value?[r("b-table",{ref:"vuetable",attrs:{"per-page":e.perPage,"data-manager":e.dataManager,fields:e.tableFields,items:e.tableData.data,"sort-compare-options":{numeric:!1},"sort-null-last":!0,"sort-icon-left":"",css:e.css,"empty-text":e.$t("No Data Available"),"current-page":e.currentPage,"data-cy":"table"},scopedSlots:e._u([{key:"cell()",fn:function({index:a,field:i,item:n}){return[e.isFiledownload(i,n)?[r("span",{attrs:{href:"#"},on:{click:function(s){return e.downloadFile(n,i.key,a)}}},[e._v(e._s(e.mustache(i.key,n)))])]:e.isImage(i,n)?[r("img",{staticStyle:{},attrs:{src:e.mustache(i.key,n)}})]:e.isWebEntryFile(i,n)?[e._v(" "+e._s(e.formatIfWebEntryFile(i,n))+" ")]:[e._v(" "+e._s(e.formatIfDate(e.mustache(i.key,n)))+" ")]]}},{key:"cell(__actions)",fn:function({index:a,item:i}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"btn-group btn-group-sm",attrs:{role:"group","aria-label":"Actions"}},[r("button",{staticClass:"btn btn-primary",attrs:{title:e.$t("Edit"),"data-cy":"edit-row"},on:{click:function(n){return e.showEditForm(a,i.row_id)}}},[r("i",{staticClass:"fas fa-edit"})]),r("button",{staticClass:"btn btn-danger",attrs:{title:e.$t("Delete"),"data-cy":"remove-row"},on:{click:function(n){return e.showDeleteConfirmation(a,i.row_id)}}},[r("i",{staticClass:"fas fa-trash-alt"})])])])]}}])}),e.tableData.total>e.perPage?r("b-pagination",{attrs:{"data-cy":"table-pagination","total-rows":e.tableData.total,"per-page":e.perPage,"aria-label":e.$t("Pagination"),"aria-controls":"vuetable"},on:{change:e.onChangePage},model:{value:e.currentPage,callback:function(a){e.currentPage=a},expression:"currentPage"}}):e._e()]:r("div",[e._v(" "+e._s(e.$t("This record list is empty or contains no data."))+" ")]),e.editable&&!e.selfReferenced?r("b-modal",{ref:"addModal",attrs:{static:!0,size:"lg","ok-title":e.$t("Ok"),"cancel-title":e.$t("Cancel"),title:e.$t("Add"),"header-close-content":"&times;","data-cy":"modal-add"},on:{ok:e.handleOk,hidden:e.handleHideAddModal,shown:e.emitShownEvent}},[r("vue-form-renderer",{key:Array.isArray(e.value)?e.value.length:0,ref:"addRenderer",attrs:{page:0,config:e.popupConfig,"current-page":e.form,computed:e.formComputed,watchers:e.formWatchers,"debug-context":"Record List Add",_parent:e.validationData},on:{update:e.updateRowDataNamePrefix},model:{value:e.addItem,callback:function(a){e.addItem=a},expression:"addItem"}})],1):e._e(),e.editable&&!e.selfReferenced?r("b-modal",{ref:"editModal",attrs:{static:!0,size:"lg","ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),title:e.$t("Edit Record"),"header-close-content":"&times;","data-cy":"modal-edit"},on:{ok:e.edit,hidden:function(a){return e.$refs.addRenderer.hasSubmitted(!1)},shown:e.emitShownEvent}},[r("vue-form-renderer",{key:e.editFormVersion,ref:"editRenderer",attrs:{page:0,config:e.popupConfig,"current-page":e.form,computed:e.formComputed,watchers:e.formWatchers,"debug-context":"Record List Edit",_parent:e.validationData},on:{update:e.updateRowDataNamePrefix},model:{value:e.editItem,callback:function(a){e.editItem=a},expression:"editItem"}})],1):e._e(),e.editable&&!e.selfReferenced?r("b-modal",{ref:"deleteModal",attrs:{size:"lg","ok-title":e.$t("Delete"),"cancel-title":e.$t("Cancel"),title:e.$t("Delete Record"),"header-close-content":"&times;","data-cy":"modal-remove"},on:{ok:e.remove}},[r("p",[e._v(e._s(e.$t("Are you sure you want to remove this record?")))])]):e._e(),e.editable&&!e.selfReferenced?r("b-modal",{ref:"infoModal",attrs:{size:"sm","ok-title":e.$t("OK"),title:e.$t("Information form"),"header-close-content":"&times;","ok-only":"","data-cy":"modal-not-assigned"},on:{ok:e.hideInformation}},[r("p",[e._v(e._s(e.$t("The form to be displayed is not assigned.")))])]):e._e(),e.editable&&e.selfReferenced?r("div",{staticClass:"alert alert-danger"},[e._v(" "+e._s(e.$t("The Record List control is not allowed to reference other controls on its own page to add or edit records. Specify a secondary page with controls to enter records."))+" ")]):e._e()],2)},y7=[],S7=oe(v7,b7,y7,!1,null,null,null,null);const fu=S7.exports,x7={name:"FormRecordListStatic",components:{},mixins:[Md],props:["label","fields","value","editable","_config","form"],mounted(){},methods:{formatIfDate(t){return ee.formatIfDate(t)}}};var k7=function(){var e=this,r=e._self._c;return r("div",{staticClass:"record-list"},[r("h4",[e._v(e._s(e.$t(e.label)))]),r("table",[r("thead",[r("tr",e._l(e.fields,function(a,i){return r("th",{key:i},[e._v(" "+e._s(a.content)+" ")])}),0)]),r("tbody",e._l(e.value,function(a,i){return r("tr",{key:i},e._l(e.fields,function(n,s){return r("td",{key:s},[e._v(" "+e._s(e.formatIfDate(e.mustache(n.value,a)))+" ")])}),0)}),0)])])},_7=[],w7=oe(x7,k7,_7,!1,null,null,null,null);const Sx=w7.exports,C7={props:["label","fontSize","fontWeight","textAlign","verticalAlign","validationData","color","name"],computed:{styles(){return{fontSize:this.fontSize,fontWeight:this.fontWeight,textAlign:this.textAlign,verticalAlign:this.verticalAlign,color:this.color}},rendered(){if(!this.validationData)return this.label;try{return _r.render(this.label,this.validationData)}catch{return this.label}}}};var T7=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",{style:e.styles,domProps:{innerHTML:e._s(e.rendered)}})])},A7=[],O7=oe(C7,T7,A7,!1,null,null,null,null);const hu=O7.exports,E7={};var M7=function(){var e=this,r=e._self._c;return r("div",{staticClass:"row"},[e._t("default")],2)},$7=[],P7=oe(E7,M7,$7,!1,null,null,null,null);const Yp=P7.exports,D7="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ2IiBoZWlnaHQ9IjE1MyIgdmlld0JveD0iMCAwIDE0NiAxNTMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMTUuMDAxIDMzLjQ5OTZDMTE1LjAwMSA0MC4xMjczIDEyMC4zNzQgNDUuNSAxMjcuMDAxIDQ1LjVDMTMzLjYyOCA0NS41IDEzOS4wMDEgNDAuMTI3MyAxMzkuMDAxIDMzLjQ5OTZDMTM5LjAwMSAyNi44NzI3IDEzMy42MjggMjEuNSAxMjcuMDAxIDIxLjVDMTIwLjM3NCAyMS41IDExNS4wMDEgMjYuODcyNyAxMTUuMDAxIDMzLjQ5OTZaIiBmaWxsPSIjN0NEMEIwIi8+CjxwYXRoIGQ9Ik0xMjcuOTA3IDI2LjkzMjNMMTI5LjEwOCAzMC42MzA0SDEzMi45OThDMTMzLjYwMyAzMC42MzA0IDEzMy44NTYgMzEuNDA1MyAxMzMuMzY1IDMxLjc2MjFMMTMwLjIxOSAzNC4wNDc0TDEzMS40MjEgMzcuNzQ2NEMxMzEuNjA4IDM4LjMyMTkgMTMwLjk0OSAzOC44MDA3IDEzMC40NTkgMzguNDQ1N0wxMjcuMzEyIDM2LjE1ODdMMTI0LjE2NiAzOC40NDU3QzEyMy42NzcgMzguODAwNyAxMjMuMDE3IDM4LjMyMTkgMTIzLjIwNCAzNy43NDY0TDEyNC40MDYgMzQuMDQ3NEwxMjEuMjYgMzEuNzYyMUMxMjAuNzcgMzEuNDA1MyAxMjEuMDIyIDMwLjYzMDQgMTIxLjYyNyAzMC42MzA0SDEyNS41MTZMMTI2LjcxOCAyNi45MzIzQzEyNi45MDYgMjYuMzU1OSAxMjcuNzIgMjYuMzU1OSAxMjcuOTA3IDI2LjkzMjNaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNODIuMzQ5MSAwLjc5Mjk2OUM3OS44NTk3IDguMjYwOTcgNzQuMTkwNCA5LjA5MDI5IDc0LjE5MDQgOS4wOTAyOUM3NC4xOTA0IDkuMDkwMjkgNzkuODU5NyA5LjkyMDk3IDgyLjM0OTEgMTcuMzg3NkM4NC44Mzg0IDkuOTIwOTcgOTAuNTA3OCA5LjA5MDI5IDkwLjUwNzggOS4wOTAyOUM5MC41MDc4IDkuMDkwMjkgODQuODM4NCA4LjI2MDk3IDgyLjM0OTEgMC43OTI5NjlaIiBmaWxsPSIjREVFRkZBIi8+CjxwYXRoIGQ9Ik00OS4zNTA0IDEzNS43OTNDNDYuODU5OCAxNDMuMjYxIDQxLjE5MDQgMTQ0LjA5IDQxLjE5MDQgMTQ0LjA5QzQxLjE5MDQgMTQ0LjA5IDQ2Ljg1OTggMTQ0LjkyIDQ5LjM1MDQgMTUyLjM4OEM1MS44Mzg0IDE0NC45MiA1Ny41MDkxIDE0NC4wOSA1Ny41MDkxIDE0NC4wOUM1Ny41MDkxIDE0NC4wOSA1MS44Mzg0IDE0My4yNjEgNDkuMzUwNCAxMzUuNzkzWiIgZmlsbD0iI0RFRUZGQSIvPgo8cGF0aCBkPSJNMTM5LjkwMiA5My43OTNDMTM4LjE1OCA5OS4wMjEgMTM0LjE5IDk5LjYwMjMgMTM0LjE5IDk5LjYwMjNDMTM0LjE5IDk5LjYwMjMgMTM4LjE1OCAxMDAuMTgyIDEzOS45MDIgMTA1LjQwOUMxNDEuNjQ1IDEwMC4xODIgMTQ1LjYxMyA5OS42MDIzIDE0NS42MTMgOTkuNjAyM0MxNDUuNjEzIDk5LjYwMjMgMTQxLjY0NSA5OS4wMjEgMTM5LjkwMiA5My43OTNaIiBmaWxsPSIjREVFRkZBIi8+CjxwYXRoIGQ9Ik04LjkwMTEyIDMwLjc5M0M3LjE1OTc5IDM2LjAxOTYgMy4xOTA0MyAzNi42MDEgMy4xOTA0MyAzNi42MDFDMy4xOTA0MyAzNi42MDEgNy4xNTk3OSAzNy4xODEgOC45MDExMiA0Mi40MDc2QzEwLjY0MzggMzcuMTgxIDE0LjYxMzEgMzYuNjAxIDE0LjYxMzEgMzYuNjAxQzE0LjYxMzEgMzYuNjAxIDEwLjY0MzggMzYuMDE5NiA4LjkwMTEyIDMwLjc5M1oiIGZpbGw9IiNERUVGRkEiLz4KPHBhdGggZD0iTTEyMS45NTYgNzUuNjcwMkMxMjEuOTU2IDEwNC44NzYgOTguMjc4NSAxMjguNTUzIDY5LjA3MzIgMTI4LjU1M0MzOS44Njc5IDEyOC41NTMgMTYuMTkwNCAxMDQuODc2IDE2LjE5MDQgNzUuNjcwMkMxNi4xOTA0IDQ2LjQ2NDkgMzkuODY3OSAyMi43OTMgNjkuMDczMiAyMi43OTNDOTguMjc4NSAyMi43OTMgMTIxLjk1NiA0Ni40NjQ5IDEyMS45NTYgNzUuNjcwMloiIGZpbGw9IiNERUVGRkEiLz4KPHBhdGggZD0iTTQ3LjYzNjQgODEuOTYyNUw2My4yNDYzIDkzLjM2ODdDNjQuNzg5NyA5NC40OTYyIDY2Ljk1NyA5NC4yMDA3IDY4LjEzOTMgOTIuNjk1NUw5MS42OTA4IDYyLjc4NDFDOTIuOTA1OCA2MS4yMzUxIDkyLjY0MzEgNTkuMDAyMSA5MS4wOTQxIDU3Ljc4N0M4OS41NTA3IDU2LjU3MTkgODcuMzE3NiA1Ni44MzQ3IDg2LjEwMjYgNTguMzc4MUw2NC42NzQ3IDg1LjYwMjFMNTEuODM0NiA3Ni4yMTU1QzUwLjI0NzMgNzUuMDYwNiA0OC4wMTk2IDc1LjQwNTUgNDYuODU5MiA3Ni45OTI3QzQ1LjcwNDQgNzguNTc5OSA0Ni4wNDkyIDgwLjgwMjEgNDcuNjM2NCA4MS45NjI1WiIgZmlsbD0iIzREODJDNiIvPgo8cGF0aCBkPSJNMC40MDAzOTEgMTI1Ljc1QzAuNDAwMzkxIDEzMy42MiA2Ljc4MDM5IDE0MCAxNC42NTEgMTQwQzIyLjUyMjUgMTQwIDI4LjkwMzQgMTMzLjYyIDI4LjkwMzQgMTI1Ljc1QzI4LjkwMzQgMTE3Ljg3OSAyMi41MjI1IDExMS41IDE0LjY1MSAxMTEuNUM2Ljc4MDM5IDExMS41IDAuNDAwMzkxIDExNy44NzkgMC40MDAzOTEgMTI1Ljc1WiIgZmlsbD0iIzc3QTlGMiIvPgo8cGF0aCBkPSJNMTYuMzE4NyAxMzAuMzI5QzE0LjE2MjUgMTMwLjM2NiAxMS45Nzk0IDEzMC4zOTUgOS45OTY5NSAxMzAuMjU4QzkuMzY5ODggMTMwLjIxNSA4LjgyNyAxMjkuMjE3IDkuNTg5MzQgMTI4LjkwM0M5LjI2ODY0IDEyOC43MzggOC45NDM1IDEyOC41NzkgOC44MDM3NSAxMjguMjE5QzguNjcxMTcgMTI3Ljg4IDguODI5NyAxMjcuNDE3IDkuMTg1MzQgMTI3LjMzQzguNDM3MzMgMTI3LjUxNCA4LjE0MjYxIDEyNi4zMjggOC43MjU3OCAxMjUuOTQ1QzguNDE2NzMgMTI1LjY4MiA4LjE1OTY1IDEyNS4zMzUgOC4wOTUxNSAxMjQuOTM1QzguMDI5NzUgMTI0LjUzNCA4LjE5MzY4IDEyNC4wODIgOC41NTAyMiAxMjMuODg4QzguNzg0MDMgMTIzLjc2MSA5LjA2MDg0IDEyMy43NTcgOS4zMjY4OSAxMjMuNzU1QzEwLjIyMzYgMTIzLjc0OCAxMS4xMjAzIDEyMy43NDEgMTIuMDE3IDEyMy43MzRDMTEuNzc0MiAxMjIuMzMyIDExLjcwMDggMTIwLjgwMyAxMi40MTM4IDExOS41NzFDMTIuNjI4OCAxMTkuMTk5IDEzLjIwNTggMTE4Ljc1NSAxMy42NjM1IDExOS4wNEMxNC4wOTI2IDExOS4zMDggMTMuOTc0MyAxMTkuOTczIDEzLjk1MTkgMTIwLjM5M0MxMy44NjMzIDEyMi4xMzggMTQuODU1OSAxMjMuODkzIDE2LjM5NzYgMTI0LjcxNUMxNi4zOTc2IDEyNC43MTUgMTYuMjk1NCAxMjguNDMzIDE2LjMxODcgMTMwLjMyOVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xNy4xMDI1IDEzMC4zMTVIMjAuMzYxNVYxMjQuNzA3SDE3LjEwMjVWMTMwLjMxNVoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=",Ate="",I7={props:["title","link","url"],data(){return{linkText:`View All ${this.link}`}},methods:{openLink(){window.open(this.url,"_blank")}}};var z7=function(){var e=this,r=e._self._c;return r("div",{staticClass:"container content"},[r("img",{attrs:{src:D7,alt:"empty table"}}),r("span",{staticClass:"title"},[e._v(" "+e._s(e.$t(e.title))+" ")]),e.url!==""?r("b-link",{on:{click:function(a){return e.openLink()}}},[e._v(" "+e._s(e.$t(e.linkText))+" ")]):e._e()],1)},L7=[],j7=oe(I7,z7,L7,!1,null,"7665402d",null,null);const Qp=j7.exports,N7=vn(),R7={components:{formEmpty:Qp},mixins:[N7,ic],data(){return{countInProgress:"0",countOverdue:"0",countResponse:"0",fields:[],data:[],tableData:[],orderBy:"ID",order_direction:"DESC",status:"",showTable:!0,sortOrder:[{field:"ID",sortField:"ID",direction:"DESC"}],tasksPreview:window.SharedComponents&&window.SharedComponents.TasksHome||{}}},computed:{noDataUrl(){var t,e;return`${(e=(t=window.ProcessMaker)==null?void 0:t.app)==null?void 0:e.url}/tasks`}},mounted(){this.setFields(),this.pmql=`(user_id = ${ProcessMaker.user.id}) AND (status = "In Progress")`,this.fetch(),this.$root.$on("dropdownSelectionTask",this.fetchData),this.$root.$on("searchTask",this.fetchSearch)},methods:{getSortParam(){return this.sortOrder instanceof Array&&this.sortOrder.length>0?`&order_by=${this.sortOrder[0].sortField}&order_direction=${this.sortOrder[0].direction}`:""},fetch(){Vue.nextTick(()=>{let t="",e="";this.pmql!==void 0&&(t=this.pmql),this.filterDropdowns!==void 0&&(e=this.filterDropdowns);let{filter:r}=this,a="";r&&r.length&&(r.isPMQL()?(t=`(${t}) and (${r})`,r=""):a=`&user_id=${window.ProcessMaker.user.id}&filter=${r}&statusfilter=ACTIVE,CLOSED`),this.previousFilter!==r&&(this.page=1),this.previousFilter=r,this.previousPmql!==t&&(this.page=1),this.previousPmql=t;const i=[];ProcessMaker.apiClient.get(`tasks?page=${this.page}&include=process,processRequest,processRequest.user,user,data&pmql=${encodeURIComponent(t)}&per_page=${this.perPage}${a}${this.getSortParam()}&non_system=true&${e}`).then(n=>{this.showTable=n.data.data.length!==0,this.tableData=n.data,this.countResponse=this.tableData.meta.total,this.countOverdue=`${this.tableData.meta.in_overdue}`,i.push(this.countOverdue),this.countInProgress=`${this.tableData.meta.total}`,i.push(this.countInProgress);const s={count:`${this.countResponse}`,showControl:!0,showAvatar:!0,variant:"warning",textColor:"text-warning",colorText:"color: #ff9900",url:"/tasks",dropdownShow:"tasks"};this.$emit("tasksCount",{dataControls:s,tasksDropdown:i})}).catch(()=>{this.tableData=[]})})},getColumns(){const t=[{label:"Task",field:"task",sortable:!0,default:!0},{label:"Request",field:"request",sortable:!0,default:!0}];return this.status==="CLOSED"?t.push({label:"Completed",field:"completed_at",sortable:!0,default:!0}):t.push({label:"Due",field:"due_at",sortable:!0,default:!0}),t},setFields(){this.getColumns().forEach(e=>{const r={title:()=>this.$t(e.label)};switch(e.field){case"task":r.name="__slot:name",r.field="element_name",r.sortField="element_name";break;case"request":r.name="__slot:requestName",r.sortField="process_requests.id,process_requests.name";break;case"due_at":r.name="__slot:dueDate";break;case"completed_at":r.name="__slot:completedDate";break;default:r.name=e.field}r.field||(r.field=e.field),(e.format==="datetime"||e.format==="date")&&(r.callback="formatDate"),e.sortable&&!r.sortField&&(r.sortField=e.field),this.fields.push(r)}),this.fields.push({name:"__slot:preview",title:""}),this.$nextTick(()=>{this.$refs.vuetable.normalizeFields()})},formatDate(t,e){return e=e||"",t?window.moment(t).format(e):"n/a"},onAction(t,e,r){let a="";return t==="edit"&&(a=`/tasks/${e.id}/edit`),t==="showRequestSummary"&&(a=`/requests/${e.process_request.id}`),a},previewTasks(t){this.$refs["preview-sidebar"].showSideBar(t,this.tableData.data,!0)},classDueDate(t){const e=moment(t),r=moment(),a=e.diff(r,"hours");return a<0?"text-danger":a<=1?"text-warning":"text-dark"},fetchData(t){(t==="In Progress"||t==="all")&&(this.filterDropdowns="",this.pmql=`(user_id = ${ProcessMaker.user.id}) AND (status = "In Progress")`),t==="Overdue"&&(this.filterDropdowns="overdue=true"),this.fetch()},fetchSearch(t){this.pmql="",this.pmql=t,this.fetch()}}};var F7=function(){var e=this,r=e._self._c;return e.showTable?r("div",[r("vuetable",{ref:"vuetable",attrs:{"data-manager":e.dataManager,"sort-order":e.sortOrder,"api-mode":!1,fields:e.fields,data:e.tableData,css:e.css,"data-path":"data","pagination-path":"meta"},scopedSlots:e._u([{key:"name",fn:function(a){return[r("b-link",{directives:[{name:"uni-id",rawName:"v-uni-id",value:a.rowData.id.toString(),expression:"props.rowData.id.toString()"}],attrs:{href:e.onAction("edit",a.rowData,a.rowIndex)}},[e._v(" "+e._s(a.rowData.element_name)+" ")])]}},{key:"requestName",fn:function(a){return[r("b-link",{attrs:{href:e.onAction("showRequestSummary",a.rowData,a.rowIndex)}},[e._v(" #"+e._s(a.rowData.process_request.id)+" "+e._s(a.rowData.process_request.name)+" ")])]}},{key:"dueDate",fn:function(a){return[r("span",{class:e.classDueDate(a.rowData.due_at)},[e._v(" "+e._s(e.formatDate(a.rowData.due_at))+" ")])]}},{key:"completedDate",fn:function(a){return[r("span",{staticClass:"text-dark"},[e._v(" "+e._s(e.formatDate(a.rowData.completed_at))+" ")])]}},{key:"preview",fn:function(a){return[r("span",[r("i",{staticClass:"fa fa-eye",on:{click:function(i){return e.previewTasks(a.rowData)}}})])]}}],null,!1,4211731584)}),r(e.tasksPreview,{ref:"preview-sidebar",tag:"component"})],1):r("div",[r("formEmpty",{attrs:{link:"Tasks",title:"No tasks in sight",url:e.noDataUrl}})],1)},q7=[],B7=oe(R7,F7,q7,!1,null,null,null,null);const Kp=B7.exports,W7=vn(),V7={components:{formEmpty:Qp},mixins:[W7,ic],data(){return{countResponse:"0",fields:[],filter:"",data:[],tableData:[],orderBy:"id",orderDirection:"DESC",additionalParams:"",showTable:!0,sortOrder:[{field:"id",sortField:"id",direction:"desc"}]}},computed:{noDataUrl(){var t,e;return`${(e=(t=window.ProcessMaker)==null?void 0:t.app)==null?void 0:e.url}/requests`}},mounted(){this.setFields(),this.pmql=`requester = "${Processmaker.user.username}"`,this.fetch(),this.$root.$on("dropdownSelectionRequest",this.fetchData),this.$root.$on("searchRequest",this.fetchSearch)},methods:{fetch(){Vue.nextTick(()=>{let t="";this.pmql!==void 0&&(t=this.pmql);let{filter:e}=this;e&&e.length&&e.isPMQL()&&(t=`(${t}) and (${e})`,e=""),this.previousFilter!==e&&(this.page=1),this.previousFilter=e,this.previousPmql!==t&&(this.page=1),this.previousPmql=t,ProcessMaker.apiClient.get(`requests?page=${this.page}&include=process,participants,data&pmql=${encodeURIComponent(t)}
339
+ | <mf-value> '>' '='? <mf-name> '>' '='? <mf-value>`},"mf-value":{syntax:"<number> | <dimension> | <ident> | <ratio>"},"min()":{syntax:"min( <calc-sum># )"},"minmax()":{syntax:"minmax( [ <length> | <percentage> | min-content | max-content | auto ] , [ <length> | <percentage> | <flex> | min-content | max-content | auto ] )"},"named-color":{syntax:"transparent | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen"},"namespace-prefix":{syntax:"<ident>"},"ns-prefix":{syntax:"[ <ident-token> | '*' ]? '|'"},"number-percentage":{syntax:"<number> | <percentage>"},"numeric-figure-values":{syntax:"[ lining-nums | oldstyle-nums ]"},"numeric-fraction-values":{syntax:"[ diagonal-fractions | stacked-fractions ]"},"numeric-spacing-values":{syntax:"[ proportional-nums | tabular-nums ]"},nth:{syntax:"<an-plus-b> | even | odd"},"opacity()":{syntax:"opacity( [ <number-percentage> ] )"},"overflow-position":{syntax:"unsafe | safe"},"outline-radius":{syntax:"<length> | <percentage>"},"page-body":{syntax:"<declaration>? [ ; <page-body> ]? | <page-margin-box> <page-body>"},"page-margin-box":{syntax:"<page-margin-box-type> '{' <declaration-list> '}'"},"page-margin-box-type":{syntax:"@top-left-corner | @top-left | @top-center | @top-right | @top-right-corner | @bottom-left-corner | @bottom-left | @bottom-center | @bottom-right | @bottom-right-corner | @left-top | @left-middle | @left-bottom | @right-top | @right-middle | @right-bottom"},"page-selector-list":{syntax:"[ <page-selector># ]?"},"page-selector":{syntax:"<pseudo-page>+ | <ident> <pseudo-page>*"},"path()":{syntax:"path( [ <fill-rule>, ]? <string> )"},"paint()":{syntax:"paint( <ident>, <declaration-value>? )"},"perspective()":{syntax:"perspective( <length> )"},"polygon()":{syntax:"polygon( <fill-rule>? , [ <length-percentage> <length-percentage> ]# )"},position:{syntax:"[ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]"},"pseudo-class-selector":{syntax:"':' <ident-token> | ':' <function-token> <any-value> ')'"},"pseudo-element-selector":{syntax:"':' <pseudo-class-selector>"},"pseudo-page":{syntax:": [ left | right | first | blank ]"},quote:{syntax:"open-quote | close-quote | no-open-quote | no-close-quote"},"radial-gradient()":{syntax:"radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"},"relative-selector":{syntax:"<combinator>? <complex-selector>"},"relative-selector-list":{syntax:"<relative-selector>#"},"relative-size":{syntax:"larger | smaller"},"repeat-style":{syntax:"repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}"},"repeating-linear-gradient()":{syntax:"repeating-linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )"},"repeating-radial-gradient()":{syntax:"repeating-radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"},"rgb()":{syntax:"rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )"},"rgba()":{syntax:"rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )"},"rotate()":{syntax:"rotate( [ <angle> | <zero> ] )"},"rotate3d()":{syntax:"rotate3d( <number> , <number> , <number> , [ <angle> | <zero> ] )"},"rotateX()":{syntax:"rotateX( [ <angle> | <zero> ] )"},"rotateY()":{syntax:"rotateY( [ <angle> | <zero> ] )"},"rotateZ()":{syntax:"rotateZ( [ <angle> | <zero> ] )"},"saturate()":{syntax:"saturate( <number-percentage> )"},"scale()":{syntax:"scale( <number> , <number>? )"},"scale3d()":{syntax:"scale3d( <number> , <number> , <number> )"},"scaleX()":{syntax:"scaleX( <number> )"},"scaleY()":{syntax:"scaleY( <number> )"},"scaleZ()":{syntax:"scaleZ( <number> )"},"self-position":{syntax:"center | start | end | self-start | self-end | flex-start | flex-end"},"shape-radius":{syntax:"<length-percentage> | closest-side | farthest-side"},"skew()":{syntax:"skew( [ <angle> | <zero> ] , [ <angle> | <zero> ]? )"},"skewX()":{syntax:"skewX( [ <angle> | <zero> ] )"},"skewY()":{syntax:"skewY( [ <angle> | <zero> ] )"},"sepia()":{syntax:"sepia( <number-percentage> )"},shadow:{syntax:"inset? && <length>{2,4} && <color>?"},"shadow-t":{syntax:"[ <length>{2,3} && <color>? ]"},shape:{syntax:"rect(<top>, <right>, <bottom>, <left>)"},"shape-box":{syntax:"<box> | margin-box"},"side-or-corner":{syntax:"[ left | right ] || [ top | bottom ]"},"single-animation":{syntax:"<time> || <timing-function> || <time> || <single-animation-iteration-count> || <single-animation-direction> || <single-animation-fill-mode> || <single-animation-play-state> || [ none | <keyframes-name> ]"},"single-animation-direction":{syntax:"normal | reverse | alternate | alternate-reverse"},"single-animation-fill-mode":{syntax:"none | forwards | backwards | both"},"single-animation-iteration-count":{syntax:"infinite | <number>"},"single-animation-play-state":{syntax:"running | paused"},"single-transition":{syntax:"[ none | <single-transition-property> ] || <time> || <timing-function> || <time>"},"single-transition-property":{syntax:"all | <custom-ident>"},size:{syntax:"closest-side | farthest-side | closest-corner | farthest-corner | <length> | <length-percentage>{2}"},"step-position":{syntax:"jump-start | jump-end | jump-none | jump-both | start | end"},"step-timing-function":{syntax:"step-start | step-end | steps(<integer>[, <step-position>]?)"},"subclass-selector":{syntax:"<id-selector> | <class-selector> | <attribute-selector> | <pseudo-class-selector>"},"supports-condition":{syntax:"not <supports-in-parens> | <supports-in-parens> [ and <supports-in-parens> ]* | <supports-in-parens> [ or <supports-in-parens> ]*"},"supports-in-parens":{syntax:"( <supports-condition> ) | <supports-feature> | <general-enclosed>"},"supports-feature":{syntax:"<supports-decl> | <supports-selector-fn>"},"supports-decl":{syntax:"( <declaration> )"},"supports-selector-fn":{syntax:"selector( <complex-selector> )"},symbol:{syntax:"<string> | <image> | <custom-ident>"},target:{syntax:"<target-counter()> | <target-counters()> | <target-text()>"},"target-counter()":{syntax:"target-counter( [ <string> | <url> ] , <custom-ident> , <counter-style>? )"},"target-counters()":{syntax:"target-counters( [ <string> | <url> ] , <custom-ident> , <string> , <counter-style>? )"},"target-text()":{syntax:"target-text( [ <string> | <url> ] , [ content | before | after | first-letter ]? )"},"time-percentage":{syntax:"<time> | <percentage>"},"timing-function":{syntax:"linear | <cubic-bezier-timing-function> | <step-timing-function>"},"track-breadth":{syntax:"<length-percentage> | <flex> | min-content | max-content | auto"},"track-list":{syntax:"[ <line-names>? [ <track-size> | <track-repeat> ] ]+ <line-names>?"},"track-repeat":{syntax:"repeat( [ <positive-integer> ] , [ <line-names>? <track-size> ]+ <line-names>? )"},"track-size":{syntax:"<track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )"},"transform-function":{syntax:"<matrix()> | <translate()> | <translateX()> | <translateY()> | <scale()> | <scaleX()> | <scaleY()> | <rotate()> | <skew()> | <skewX()> | <skewY()> | <matrix3d()> | <translate3d()> | <translateZ()> | <scale3d()> | <scaleZ()> | <rotate3d()> | <rotateX()> | <rotateY()> | <rotateZ()> | <perspective()>"},"transform-list":{syntax:"<transform-function>+"},"translate()":{syntax:"translate( <length-percentage> , <length-percentage>? )"},"translate3d()":{syntax:"translate3d( <length-percentage> , <length-percentage> , <length> )"},"translateX()":{syntax:"translateX( <length-percentage> )"},"translateY()":{syntax:"translateY( <length-percentage> )"},"translateZ()":{syntax:"translateZ( <length> )"},"type-or-unit":{syntax:"string | color | url | integer | number | length | angle | time | frequency | cap | ch | em | ex | ic | lh | rlh | rem | vb | vi | vw | vh | vmin | vmax | mm | Q | cm | in | pt | pc | px | deg | grad | rad | turn | ms | s | Hz | kHz | %"},"type-selector":{syntax:"<wq-name> | <ns-prefix>? '*'"},"var()":{syntax:"var( <custom-property-name> , <declaration-value>? )"},"viewport-length":{syntax:"auto | <length-percentage>"},"wq-name":{syntax:"<ns-prefix>? <ident-token>"}},r5={atrules:{charset:{prelude:"<string>"},"font-face":{descriptors:{"unicode-range":{comment:"replaces <unicode-range>, an old production name",syntax:"<urange>#"}}}},properties:{"-moz-background-clip":{comment:"deprecated syntax in old Firefox, https://developer.mozilla.org/en/docs/Web/CSS/background-clip",syntax:"padding | border"},"-moz-border-radius-bottomleft":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius",syntax:"<'border-bottom-left-radius'>"},"-moz-border-radius-bottomright":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",syntax:"<'border-bottom-right-radius'>"},"-moz-border-radius-topleft":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius",syntax:"<'border-top-left-radius'>"},"-moz-border-radius-topright":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",syntax:"<'border-bottom-right-radius'>"},"-moz-control-character-visibility":{comment:"firefox specific keywords, https://bugzilla.mozilla.org/show_bug.cgi?id=947588",syntax:"visible | hidden"},"-moz-osx-font-smoothing":{comment:"misssed old syntax https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",syntax:"auto | grayscale"},"-moz-user-select":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",syntax:"none | text | all | -moz-none"},"-ms-flex-align":{comment:"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",syntax:"start | end | center | baseline | stretch"},"-ms-flex-item-align":{comment:"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",syntax:"auto | start | end | center | baseline | stretch"},"-ms-flex-line-pack":{comment:"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-line-pack",syntax:"start | end | center | justify | distribute | stretch"},"-ms-flex-negative":{comment:"misssed old syntax implemented in IE; TODO: find references for comfirmation",syntax:"<'flex-shrink'>"},"-ms-flex-pack":{comment:"misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-pack",syntax:"start | end | center | justify | distribute"},"-ms-flex-order":{comment:"misssed old syntax implemented in IE; https://msdn.microsoft.com/en-us/library/jj127303(v=vs.85).aspx",syntax:"<integer>"},"-ms-flex-positive":{comment:"misssed old syntax implemented in IE; TODO: find references for comfirmation",syntax:"<'flex-grow'>"},"-ms-flex-preferred-size":{comment:"misssed old syntax implemented in IE; TODO: find references for comfirmation",syntax:"<'flex-basis'>"},"-ms-interpolation-mode":{comment:"https://msdn.microsoft.com/en-us/library/ff521095(v=vs.85).aspx",syntax:"nearest-neighbor | bicubic"},"-ms-grid-column-align":{comment:"add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466338.aspx",syntax:"start | end | center | stretch"},"-ms-grid-row-align":{comment:"add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466348.aspx",syntax:"start | end | center | stretch"},"-ms-hyphenate-limit-last":{comment:"misssed old syntax implemented in IE; https://www.w3.org/TR/css-text-4/#hyphenate-line-limits",syntax:"none | always | column | page | spread"},"-webkit-appearance":{comment:"webkit specific keywords",references:["http://css-infos.net/property/-webkit-appearance"],syntax:"none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button"},"-webkit-background-clip":{comment:"https://developer.mozilla.org/en/docs/Web/CSS/background-clip",syntax:"[ <box> | border | padding | content | text ]#"},"-webkit-column-break-after":{comment:"added, http://help.dottoro.com/lcrthhhv.php",syntax:"always | auto | avoid"},"-webkit-column-break-before":{comment:"added, http://help.dottoro.com/lcxquvkf.php",syntax:"always | auto | avoid"},"-webkit-column-break-inside":{comment:"added, http://help.dottoro.com/lclhnthl.php",syntax:"always | auto | avoid"},"-webkit-font-smoothing":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",syntax:"auto | none | antialiased | subpixel-antialiased"},"-webkit-mask-box-image":{comment:"missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",syntax:"[ <url> | <gradient> | none ] [ <length-percentage>{4} <-webkit-mask-box-repeat>{2} ]?"},"-webkit-print-color-adjust":{comment:"missed",references:["https://developer.mozilla.org/en/docs/Web/CSS/-webkit-print-color-adjust"],syntax:"economy | exact"},"-webkit-text-security":{comment:"missed; http://help.dottoro.com/lcbkewgt.php",syntax:"none | circle | disc | square"},"-webkit-user-drag":{comment:"missed; http://help.dottoro.com/lcbixvwm.php",syntax:"none | element | auto"},"-webkit-user-select":{comment:"auto is supported by old webkit, https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",syntax:"auto | none | text | all"},"alignment-baseline":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty"],syntax:"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical"},"baseline-shift":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#BaselineShiftProperty"],syntax:"baseline | sub | super | <svg-length>"},behavior:{comment:"added old IE property https://msdn.microsoft.com/en-us/library/ms530723(v=vs.85).aspx",syntax:"<url>+"},"clip-rule":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/masking.html#ClipRuleProperty"],syntax:"nonzero | evenodd"},cue:{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<'cue-before'> <'cue-after'>?"},"cue-after":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<url> <decibel>? | none"},"cue-before":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<url> <decibel>? | none"},cursor:{comment:"added legacy keywords: hand, -webkit-grab. -webkit-grabbing, -webkit-zoom-in, -webkit-zoom-out, -moz-grab, -moz-grabbing, -moz-zoom-in, -moz-zoom-out",references:["https://www.sitepoint.com/css3-cursor-styles/"],syntax:"[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]"},display:{comment:"extended with -ms-flexbox",syntax:"| <-non-standard-display>"},position:{comment:"extended with -webkit-sticky",syntax:"| -webkit-sticky"},"dominant-baseline":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#DominantBaselineProperty"],syntax:"auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge"},"image-rendering":{comment:"extended with <-non-standard-image-rendering>, added SVG keywords optimizeSpeed and optimizeQuality",references:["https://developer.mozilla.org/en/docs/Web/CSS/image-rendering","https://www.w3.org/TR/SVG/painting.html#ImageRenderingProperty"],syntax:"| optimizeSpeed | optimizeQuality | <-non-standard-image-rendering>"},fill:{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#FillProperty"],syntax:"<paint>"},"fill-opacity":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#FillProperty"],syntax:"<number-zero-one>"},"fill-rule":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#FillProperty"],syntax:"nonzero | evenodd"},filter:{comment:"extend with IE legacy syntaxes",syntax:"| <-ms-filter-function-list>"},"glyph-orientation-horizontal":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#GlyphOrientationHorizontalProperty"],syntax:"<angle>"},"glyph-orientation-vertical":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#GlyphOrientationVerticalProperty"],syntax:"<angle>"},kerning:{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#KerningProperty"],syntax:"auto | <svg-length>"},"letter-spacing":{comment:"fix syntax <length> -> <length-percentage>",references:["https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/letter-spacing"],syntax:"normal | <length-percentage>"},marker:{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],syntax:"none | <url>"},"marker-end":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],syntax:"none | <url>"},"marker-mid":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],syntax:"none | <url>"},"marker-start":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#MarkerProperties"],syntax:"none | <url>"},"max-width":{comment:"fix auto -> none (https://github.com/mdn/data/pull/431); extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/max-width",syntax:"none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"},width:{comment:"per spec fit-content should be a function, however browsers are supporting it as a keyword (https://github.com/csstree/stylelint-validator/issues/29)",syntax:"| fit-content | -moz-fit-content | -webkit-fit-content"},"min-width":{comment:"extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",syntax:"auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"},overflow:{comment:"extend by vendor keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",syntax:"| <-non-standard-overflow>"},pause:{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<'pause-before'> <'pause-after'>?"},"pause-after":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<time> | none | x-weak | weak | medium | strong | x-strong"},"pause-before":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<time> | none | x-weak | weak | medium | strong | x-strong"},rest:{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<'rest-before'> <'rest-after'>?"},"rest-after":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<time> | none | x-weak | weak | medium | strong | x-strong"},"rest-before":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<time> | none | x-weak | weak | medium | strong | x-strong"},"shape-rendering":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#ShapeRenderingPropert"],syntax:"auto | optimizeSpeed | crispEdges | geometricPrecision"},src:{comment:"added @font-face's src property https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src",syntax:"[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#"},speak:{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"auto | none | normal"},"speak-as":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"normal | spell-out || digits || [ literal-punctuation | no-punctuation ]"},stroke:{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"<paint>"},"stroke-dasharray":{comment:"added SVG property; a list of comma and/or white space separated <length>s and <percentage>s",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"none | [ <svg-length>+ ]#"},"stroke-dashoffset":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"<svg-length>"},"stroke-linecap":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"butt | round | square"},"stroke-linejoin":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"miter | round | bevel"},"stroke-miterlimit":{comment:"added SVG property (<miterlimit> = <number-one-or-greater>) ",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"<number-one-or-greater>"},"stroke-opacity":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"<number-zero-one>"},"stroke-width":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/painting.html#StrokeProperties"],syntax:"<svg-length>"},"text-anchor":{comment:"added SVG property",references:["https://www.w3.org/TR/SVG/text.html#TextAlignmentProperties"],syntax:"start | middle | end"},"unicode-bidi":{comment:"added prefixed keywords https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi",syntax:"| -moz-isolate | -moz-isolate-override | -moz-plaintext | -webkit-isolate | -webkit-isolate-override | -webkit-plaintext"},"unicode-range":{comment:"added missed property https://developer.mozilla.org/en-US/docs/Web/CSS/%40font-face/unicode-range",syntax:"<urange>#"},"voice-balance":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<number> | left | center | right | leftwards | rightwards"},"voice-duration":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"auto | <time>"},"voice-family":{comment:"<name> -> <family-name>, https://www.w3.org/TR/css3-speech/#property-index",syntax:"[ [ <family-name> | <generic-voice> ] , ]* [ <family-name> | <generic-voice> ] | preserve"},"voice-pitch":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"},"voice-range":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"},"voice-rate":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"[ normal | x-slow | slow | medium | fast | x-fast ] || <percentage>"},"voice-stress":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"normal | strong | moderate | none | reduced"},"voice-volume":{comment:"https://www.w3.org/TR/css3-speech/#property-index",syntax:"silent | [ [ x-soft | soft | medium | loud | x-loud ] || <decibel> ]"},"writing-mode":{comment:"extend with SVG keywords",syntax:"| <svg-writing-mode>"}},syntaxes:{"-legacy-gradient":{comment:"added collection of legacy gradient syntaxes",syntax:"<-webkit-gradient()> | <-legacy-linear-gradient> | <-legacy-repeating-linear-gradient> | <-legacy-radial-gradient> | <-legacy-repeating-radial-gradient>"},"-legacy-linear-gradient":{comment:"like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",syntax:"-moz-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-linear-gradient( <-legacy-linear-gradient-arguments> )"},"-legacy-repeating-linear-gradient":{comment:"like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",syntax:"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )"},"-legacy-linear-gradient-arguments":{comment:"like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",syntax:"[ <angle> | <side-or-corner> ]? , <color-stop-list>"},"-legacy-radial-gradient":{comment:"deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",syntax:"-moz-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-radial-gradient( <-legacy-radial-gradient-arguments> )"},"-legacy-repeating-radial-gradient":{comment:"deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",syntax:"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )"},"-legacy-radial-gradient-arguments":{comment:"deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",syntax:"[ <position> , ]? [ [ [ <-legacy-radial-gradient-shape> || <-legacy-radial-gradient-size> ] | [ <length> | <percentage> ]{2} ] , ]? <color-stop-list>"},"-legacy-radial-gradient-size":{comment:"before a standard it contains 2 extra keywords (`contain` and `cover`) https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltsize",syntax:"closest-side | closest-corner | farthest-side | farthest-corner | contain | cover"},"-legacy-radial-gradient-shape":{comment:"define to double sure it doesn't extends in future https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltshape",syntax:"circle | ellipse"},"-non-standard-font":{comment:"non standard fonts",references:["https://webkit.org/blog/3709/using-the-system-font-in-web-content/"],syntax:"-apple-system-body | -apple-system-headline | -apple-system-subheadline | -apple-system-caption1 | -apple-system-caption2 | -apple-system-footnote | -apple-system-short-body | -apple-system-short-headline | -apple-system-short-subheadline | -apple-system-short-caption1 | -apple-system-short-footnote | -apple-system-tall-body"},"-non-standard-color":{comment:"non standard colors",references:["http://cssdot.ru/%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_CSS/color-i305.html","https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Mozilla_Color_Preference_Extensions"],syntax:"-moz-ButtonDefault | -moz-ButtonHoverFace | -moz-ButtonHoverText | -moz-CellHighlight | -moz-CellHighlightText | -moz-Combobox | -moz-ComboboxText | -moz-Dialog | -moz-DialogText | -moz-dragtargetzone | -moz-EvenTreeRow | -moz-Field | -moz-FieldText | -moz-html-CellHighlight | -moz-html-CellHighlightText | -moz-mac-accentdarkestshadow | -moz-mac-accentdarkshadow | -moz-mac-accentface | -moz-mac-accentlightesthighlight | -moz-mac-accentlightshadow | -moz-mac-accentregularhighlight | -moz-mac-accentregularshadow | -moz-mac-chrome-active | -moz-mac-chrome-inactive | -moz-mac-focusring | -moz-mac-menuselect | -moz-mac-menushadow | -moz-mac-menutextselect | -moz-MenuHover | -moz-MenuHoverText | -moz-MenuBarText | -moz-MenuBarHoverText | -moz-nativehyperlinktext | -moz-OddTreeRow | -moz-win-communicationstext | -moz-win-mediatext | -moz-activehyperlinktext | -moz-default-background-color | -moz-default-color | -moz-hyperlinktext | -moz-visitedhyperlinktext | -webkit-activelink | -webkit-focus-ring-color | -webkit-link | -webkit-text"},"-non-standard-image-rendering":{comment:"non-standard keywords http://phrogz.net/tmp/canvas_image_zoom.html",syntax:"optimize-contrast | -moz-crisp-edges | -o-crisp-edges | -webkit-optimize-contrast"},"-non-standard-overflow":{comment:"non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",syntax:"-moz-scrollbars-none | -moz-scrollbars-horizontal | -moz-scrollbars-vertical | -moz-hidden-unscrollable"},"-non-standard-width":{comment:"non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",syntax:"fill-available | min-intrinsic | intrinsic | -moz-available | -moz-fit-content | -moz-min-content | -moz-max-content | -webkit-min-content | -webkit-max-content"},"-webkit-gradient()":{comment:"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/ - TODO: simplify when after match algorithm improvement ( [, point, radius | , point] -> [, radius]? , point )",syntax:"-webkit-gradient( <-webkit-gradient-type>, <-webkit-gradient-point> [, <-webkit-gradient-point> | , <-webkit-gradient-radius>, <-webkit-gradient-point> ] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )"},"-webkit-gradient-color-stop":{comment:"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",syntax:"from( <color> ) | color-stop( [ <number-zero-one> | <percentage> ] , <color> ) | to( <color> )"},"-webkit-gradient-point":{comment:"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",syntax:"[ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]"},"-webkit-gradient-radius":{comment:"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",syntax:"<length> | <percentage>"},"-webkit-gradient-type":{comment:"first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",syntax:"linear | radial"},"-webkit-mask-box-repeat":{comment:"missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",syntax:"repeat | stretch | round"},"-webkit-mask-clip-style":{comment:"missed; there is no enough information about `-webkit-mask-clip` property, but looks like all those keywords are working",syntax:"border | border-box | padding | padding-box | content | content-box | text"},"-ms-filter-function-list":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",syntax:"<-ms-filter-function>+"},"-ms-filter-function":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",syntax:"<-ms-filter-function-progid> | <-ms-filter-function-legacy>"},"-ms-filter-function-progid":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",syntax:"'progid:' [ <ident-token> '.' ]* [ <ident-token> | <function-token> <any-value>? ) ]"},"-ms-filter-function-legacy":{comment:"https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",syntax:"<ident-token> | <function-token> <any-value>? )"},"-ms-filter":{syntax:"<string>"},age:{comment:"https://www.w3.org/TR/css3-speech/#voice-family",syntax:"child | young | old"},"attr-name":{syntax:"<wq-name>"},"attr-fallback":{syntax:"<any-value>"},"border-radius":{comment:"missed, https://drafts.csswg.org/css-backgrounds-3/#the-border-radius",syntax:"<length-percentage>{1,2}"},bottom:{comment:"missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",syntax:"<length> | auto"},"content-list":{comment:"missed -> https://drafts.csswg.org/css-content/#typedef-content-list (document-url, <target> and leader() is omitted util stabilization)",syntax:"[ <string> | contents | <image> | <quote> | <target> | <leader()> | <attr()> | counter( <ident>, <'list-style-type'>? ) ]+"},"element()":{comment:"https://drafts.csswg.org/css-gcpm/#element-syntax & https://drafts.csswg.org/css-images-4/#element-notation",syntax:"element( <custom-ident> , [ first | start | last | first-except ]? ) | element( <id-selector> )"},"generic-voice":{comment:"https://www.w3.org/TR/css3-speech/#voice-family",syntax:"[ <age>? <gender> <integer>? ]"},gender:{comment:"https://www.w3.org/TR/css3-speech/#voice-family",syntax:"male | female | neutral"},"generic-family":{comment:"added -apple-system",references:["https://webkit.org/blog/3709/using-the-system-font-in-web-content/"],syntax:"| -apple-system"},gradient:{comment:"added legacy syntaxes support",syntax:"| <-legacy-gradient>"},left:{comment:"missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",syntax:"<length> | auto"},"mask-image":{comment:"missed; https://drafts.fxtf.org/css-masking-1/#the-mask-image",syntax:"<mask-reference>#"},"name-repeat":{comment:"missed, and looks like obsolete, keep it as is since other property syntaxes should be changed too; https://www.w3.org/TR/2015/WD-css-grid-1-20150917/#typedef-name-repeat",syntax:"repeat( [ <positive-integer> | auto-fill ], <line-names>+)"},"named-color":{comment:"added non standard color names",syntax:"| <-non-standard-color>"},paint:{comment:"used by SVG https://www.w3.org/TR/SVG/painting.html#SpecifyingPaint",syntax:"none | <color> | <url> [ none | <color> ]? | context-fill | context-stroke"},"page-size":{comment:"https://www.w3.org/TR/css-page-3/#typedef-page-size-page-size",syntax:"A5 | A4 | A3 | B5 | B4 | JIS-B5 | JIS-B4 | letter | legal | ledger"},ratio:{comment:"missed, https://drafts.csswg.org/mediaqueries-4/#typedef-ratio",syntax:"<integer> / <integer>"},right:{comment:"missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",syntax:"<length> | auto"},shape:{comment:"missed spaces in function body and add backwards compatible syntax",syntax:"rect( <top>, <right>, <bottom>, <left> ) | rect( <top> <right> <bottom> <left> )"},"svg-length":{comment:"All coordinates and lengths in SVG can be specified with or without a unit identifier",references:["https://www.w3.org/TR/SVG11/coords.html#Units"],syntax:"<percentage> | <length> | <number>"},"svg-writing-mode":{comment:"SVG specific keywords (deprecated for CSS)",references:["https://developer.mozilla.org/en/docs/Web/CSS/writing-mode","https://www.w3.org/TR/SVG/text.html#WritingModeProperty"],syntax:"lr-tb | rl-tb | tb-rl | lr | rl | tb"},top:{comment:"missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",syntax:"<length> | auto"},"track-group":{comment:"used by old grid-columns and grid-rows syntax v0",syntax:"'(' [ <string>* <track-minmax> <string>* ]+ ')' [ '[' <positive-integer> ']' ]? | <track-minmax>"},"track-list-v0":{comment:"used by old grid-columns and grid-rows syntax v0",syntax:"[ <string>* <track-group> <string>* ]+ | none"},"track-minmax":{comment:"used by old grid-columns and grid-rows syntax v0",syntax:"minmax( <track-breadth> , <track-breadth> ) | auto | <track-breadth> | fit-content"},x:{comment:"missed; not sure we should add it, but no others except `cursor` is using it so it's ok for now; https://drafts.csswg.org/css-ui-3/#cursor",syntax:"<number>"},y:{comment:"missed; not sure we should add it, but no others except `cursor` is using so it's ok for now; https://drafts.csswg.org/css-ui-3/#cursor",syntax:"<number>"},declaration:{comment:"missed, restored by https://drafts.csswg.org/css-syntax",syntax:"<ident-token> : <declaration-value>? [ '!' important ]?"},"declaration-list":{comment:"missed, restored by https://drafts.csswg.org/css-syntax",syntax:"[ <declaration>? ';' ]* <declaration>?"},url:{comment:"https://drafts.csswg.org/css-values-4/#urls",syntax:"url( <string> <url-modifier>* ) | <url-token>"},"url-modifier":{comment:"https://drafts.csswg.org/css-values-4/#typedef-url-modifier",syntax:"<ident> | <function-token> <any-value> )"},"number-zero-one":{syntax:"<number [0,1]>"},"number-one-or-greater":{syntax:"<number [1,∞]>"},"positive-integer":{syntax:"<integer [0,∞]>"},"-non-standard-display":{syntax:"-ms-inline-flexbox | -ms-grid | -ms-inline-grid | -webkit-flex | -webkit-inline-flex | -webkit-box | -webkit-inline-box | -moz-inline-stack | -moz-box | -moz-inline-box"}}},a5=XU,i5=e5,n5=t5,$p=r5,gS=/^\s*\|\s*/;function s5(t){const e=Object.create(null);for(const r in t){const a=t[r];let i=null;if(a.descriptors){i=Object.create(null);for(const n in a.descriptors)i[n]=a.descriptors[n].syntax}e[r.substr(1)]={prelude:a.syntax.trim().match(/^@\S+\s+([^;\{]*)/)[1].trim()||null,descriptors:i}}return e}function Pp(t,e){const r={};for(const a in t)r[a]=t[a].syntax||t[a];for(const a in e)a in t?e[a].syntax?r[a]=gS.test(e[a].syntax)?r[a]+" "+e[a].syntax.trim():e[a].syntax:delete r[a]:e[a].syntax&&(r[a]=e[a].syntax.replace(gS,""));return r}function vS(t){const e={};for(const r in t)e[r]=t[r].syntax;return e}function o5(t,e){const r={};for(const a in t){const i=e[a]&&e[a].descriptors||null;r[a]={prelude:a in e&&"prelude"in e[a]?e[a].prelude:t[a].prelude||null,descriptors:t[a].descriptors?Pp(t[a].descriptors,i||{}):i&&vS(i)}}for(const a in e)hasOwnProperty.call(t,a)||(r[a]={prelude:e[a].prelude||null,descriptors:e[a].descriptors&&vS(e[a].descriptors)});return r}var l5={types:Pp(n5,$p.syntaxes),atrules:o5(s5(a5),$p.atrules),properties:Pp(i5,$p.properties)},bS=ce.cmpChar,yS=ce.isDigit,ms=ce.TYPE,SS=ms.WhiteSpace,xS=ms.Comment,Dp=ms.Ident,Xr=ms.Number,u5=ms.Dimension,$r=43,Rt=45,tu=110,Ua=!0,c5=!1;function ru(t,e){var r=this.scanner.tokenStart+t,a=this.scanner.source.charCodeAt(r);for((a===$r||a===Rt)&&(e&&this.error("Number sign is not allowed"),r++);r<this.scanner.tokenEnd;r++)yS(this.scanner.source.charCodeAt(r))||this.error("Integer is expected",r)}function Bi(t){return ru.call(this,0,t)}function ba(t,e){if(!bS(this.scanner.source,this.scanner.tokenStart+t,e)){var r="";switch(e){case tu:r="N is expected";break;case Rt:r="HyphenMinus is expected";break}this.error(r,this.scanner.tokenStart+t)}}function Ip(){for(var t=0,e=0,r=this.scanner.tokenType;r===SS||r===xS;)r=this.scanner.lookupType(++t);if(r!==Xr)if(this.scanner.isDelim($r,t)||this.scanner.isDelim(Rt,t)){e=this.scanner.isDelim($r,t)?$r:Rt;do r=this.scanner.lookupType(++t);while(r===SS||r===xS);r!==Xr&&(this.scanner.skip(t),Bi.call(this,Ua))}else return null;return t>0&&this.scanner.skip(t),e===0&&(r=this.scanner.source.charCodeAt(this.scanner.tokenStart),r!==$r&&r!==Rt&&this.error("Number sign is expected")),Bi.call(this,e!==0),e===Rt?"-"+this.consume(Xr):this.consume(Xr)}var d5={name:"AnPlusB",structure:{a:[String,null],b:[String,null]},parse:function(){var t=this.scanner.tokenStart,e=null,r=null;if(this.scanner.tokenType===Xr)Bi.call(this,c5),r=this.consume(Xr);else if(this.scanner.tokenType===Dp&&bS(this.scanner.source,this.scanner.tokenStart,Rt))switch(e="-1",ba.call(this,1,tu),this.scanner.getTokenLength()){case 2:this.scanner.next(),r=Ip.call(this);break;case 3:ba.call(this,2,Rt),this.scanner.next(),this.scanner.skipSC(),Bi.call(this,Ua),r="-"+this.consume(Xr);break;default:ba.call(this,2,Rt),ru.call(this,3,Ua),this.scanner.next(),r=this.scanner.substrToCursor(t+2)}else if(this.scanner.tokenType===Dp||this.scanner.isDelim($r)&&this.scanner.lookupType(1)===Dp){var a=0;switch(e="1",this.scanner.isDelim($r)&&(a=1,this.scanner.next()),ba.call(this,0,tu),this.scanner.getTokenLength()){case 1:this.scanner.next(),r=Ip.call(this);break;case 2:ba.call(this,1,Rt),this.scanner.next(),this.scanner.skipSC(),Bi.call(this,Ua),r="-"+this.consume(Xr);break;default:ba.call(this,1,Rt),ru.call(this,2,Ua),this.scanner.next(),r=this.scanner.substrToCursor(t+a+1)}}else if(this.scanner.tokenType===u5){for(var i=this.scanner.source.charCodeAt(this.scanner.tokenStart),a=i===$r||i===Rt,n=this.scanner.tokenStart+a;n<this.scanner.tokenEnd&&yS(this.scanner.source.charCodeAt(n));n++);n===this.scanner.tokenStart+a&&this.error("Integer is expected",this.scanner.tokenStart+a),ba.call(this,n-this.scanner.tokenStart,tu),e=this.scanner.source.substring(t,n),n+1===this.scanner.tokenEnd?(this.scanner.next(),r=Ip.call(this)):(ba.call(this,n-this.scanner.tokenStart+1,Rt),n+2===this.scanner.tokenEnd?(this.scanner.next(),this.scanner.skipSC(),Bi.call(this,Ua),r="-"+this.consume(Xr)):(ru.call(this,n-this.scanner.tokenStart+2,Ua),this.scanner.next(),r=this.scanner.substrToCursor(n+1)))}else this.error();return e!==null&&e.charCodeAt(0)===$r&&(e=e.substr(1)),r!==null&&r.charCodeAt(0)===$r&&(r=r.substr(1)),{type:"AnPlusB",loc:this.getLocation(t,this.scanner.tokenStart),a:e,b:r}},generate:function(t){var e=t.a!==null&&t.a!==void 0,r=t.b!==null&&t.b!==void 0;e?(this.chunk(t.a==="+1"?"+n":t.a==="1"?"n":t.a==="-1"?"-n":t.a+"n"),r&&(r=String(t.b),r.charAt(0)==="-"||r.charAt(0)==="+"?(this.chunk(r.charAt(0)),this.chunk(r.substr(1))):(this.chunk("+"),this.chunk(r)))):this.chunk(String(t.b))}},p5=ce,au=p5.TYPE,f5=au.WhiteSpace,zp=au.Semicolon,kS=au.LeftCurlyBracket,h5=au.Delim,m5=33;function g5(){return this.scanner.tokenIndex>0&&this.scanner.lookupType(-1)===f5?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function _S(){return 0}function v5(t){return t===kS?1:0}function b5(t){return t===kS||t===zp?1:0}function y5(t,e,r){return t===h5&&e.charCodeAt(r)===m5||t===zp?1:0}function S5(t){return t===zp?2:0}var Ga={name:"Raw",structure:{value:String},parse:function(t,e,r){var a=this.scanner.getTokenStart(t),i;return this.scanner.skip(this.scanner.getRawLength(t,e||_S)),r&&this.scanner.tokenStart>a?i=g5.call(this):i=this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(a,i),value:this.scanner.source.substring(a,i)}},generate:function(t){this.chunk(t.value)},mode:{default:_S,leftCurlyBracket:v5,leftCurlyBracketOrSemicolon:b5,exclamationMarkOrSemicolon:y5,semicolonIncluded:S5}},iu=ce.TYPE,x5=Ga.mode,wS=iu.AtKeyword,CS=iu.Semicolon,Lp=iu.LeftCurlyBracket,k5=iu.RightCurlyBracket;function TS(t){return this.Raw(t,x5.leftCurlyBracketOrSemicolon,!0)}function _5(){for(var t=1,e;e=this.scanner.lookupType(t);t++){if(e===k5)return!0;if(e===Lp||e===wS)return!1}return!1}var w5={name:"Atrule",structure:{name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]},parse:function(){var t=this.scanner.tokenStart,e,r,a=null,i=null;switch(this.eat(wS),e=this.scanner.substrToCursor(t+1),r=e.toLowerCase(),this.scanner.skipSC(),this.scanner.eof===!1&&this.scanner.tokenType!==Lp&&this.scanner.tokenType!==CS&&(this.parseAtrulePrelude?(a=this.parseWithFallback(this.AtrulePrelude.bind(this,e),TS),a.type==="AtrulePrelude"&&a.children.head===null&&(a=null)):a=TS.call(this,this.scanner.tokenIndex),this.scanner.skipSC()),this.scanner.tokenType){case CS:this.scanner.next();break;case Lp:this.atrule.hasOwnProperty(r)&&typeof this.atrule[r].block=="function"?i=this.atrule[r].block.call(this):i=this.Block(_5.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.scanner.tokenStart),name:e,prelude:a,block:i}},generate:function(t){this.chunk("@"),this.chunk(t.name),t.prelude!==null&&(this.chunk(" "),this.node(t.prelude)),t.block?this.node(t.block):this.chunk(";")},walkContext:"atrule"},AS=ce.TYPE,C5=AS.Semicolon,T5=AS.LeftCurlyBracket,A5={name:"AtrulePrelude",structure:{children:[[]]},parse:function(t){var e=null;return t!==null&&(t=t.toLowerCase()),this.scanner.skipSC(),this.atrule.hasOwnProperty(t)&&typeof this.atrule[t].prelude=="function"?e=this.atrule[t].prelude.call(this):e=this.readSequence(this.scope.AtrulePrelude),this.scanner.skipSC(),this.scanner.eof!==!0&&this.scanner.tokenType!==T5&&this.scanner.tokenType!==C5&&this.error("Semicolon or block is expected"),e===null&&(e=this.createList()),{type:"AtrulePrelude",loc:this.getLocationFromList(e),children:e}},generate:function(t){this.children(t)},walkContext:"atrulePrelude"},gs=ce.TYPE,vs=gs.Ident,O5=gs.String,E5=gs.Colon,M5=gs.LeftSquareBracket,OS=gs.RightSquareBracket,$5=36,ES=42,nu=61,P5=94,jp=124,D5=126;function I5(){this.scanner.eof&&this.error("Unexpected end of input");var t=this.scanner.tokenStart,e=!1,r=!0;return this.scanner.isDelim(ES)?(e=!0,r=!1,this.scanner.next()):this.scanner.isDelim(jp)||this.eat(vs),this.scanner.isDelim(jp)?this.scanner.source.charCodeAt(this.scanner.tokenStart+1)!==nu?(this.scanner.next(),this.eat(vs)):e&&this.error("Identifier is expected",this.scanner.tokenEnd):e&&this.error("Vertical line is expected"),r&&this.scanner.tokenType===E5&&(this.scanner.next(),this.eat(vs)),{type:"Identifier",loc:this.getLocation(t,this.scanner.tokenStart),name:this.scanner.substrToCursor(t)}}function z5(){var t=this.scanner.tokenStart,e=this.scanner.source.charCodeAt(t);return e!==nu&&e!==D5&&e!==P5&&e!==$5&&e!==ES&&e!==jp&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.scanner.next(),e!==nu&&(this.scanner.isDelim(nu)||this.error("Equal sign is expected"),this.scanner.next()),this.scanner.substrToCursor(t)}var L5={name:"AttributeSelector",structure:{name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]},parse:function(){var t=this.scanner.tokenStart,e,r=null,a=null,i=null;return this.eat(M5),this.scanner.skipSC(),e=I5.call(this),this.scanner.skipSC(),this.scanner.tokenType!==OS&&(this.scanner.tokenType!==vs&&(r=z5.call(this),this.scanner.skipSC(),a=this.scanner.tokenType===O5?this.String():this.Identifier(),this.scanner.skipSC()),this.scanner.tokenType===vs&&(i=this.scanner.getTokenValue(),this.scanner.next(),this.scanner.skipSC())),this.eat(OS),{type:"AttributeSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:e,matcher:r,value:a,flags:i}},generate:function(t){var e=" ";this.chunk("["),this.node(t.name),t.matcher!==null&&(this.chunk(t.matcher),t.value!==null&&(this.node(t.value),t.value.type==="String"&&(e=""))),t.flags!==null&&(this.chunk(e),this.chunk(t.flags)),this.chunk("]")}},Wi=ce.TYPE,j5=Ga.mode,N5=Wi.WhiteSpace,R5=Wi.Comment,MS=Wi.Semicolon,F5=Wi.AtKeyword,q5=Wi.LeftCurlyBracket,$S=Wi.RightCurlyBracket;function PS(t){return this.Raw(t,null,!0)}function B5(){return this.parseWithFallback(this.Rule,PS)}function DS(t){return this.Raw(t,j5.semicolonIncluded,!0)}function W5(){if(this.scanner.tokenType===MS)return DS.call(this,this.scanner.tokenIndex);var t=this.parseWithFallback(this.Declaration,DS);return this.scanner.tokenType===MS&&this.scanner.next(),t}var V5={name:"Block",structure:{children:[["Atrule","Rule","Declaration"]]},parse:function(t){var e=t?W5:B5,r=this.scanner.tokenStart,a=this.createList();this.eat(q5);e:for(;!this.scanner.eof;)switch(this.scanner.tokenType){case $S:break e;case N5:case R5:this.scanner.next();break;case F5:a.push(this.parseWithFallback(this.Atrule,PS));break;default:a.push(e.call(this))}return this.scanner.eof||this.eat($S),{type:"Block",loc:this.getLocation(r,this.scanner.tokenStart),children:a}},generate:function(t){this.chunk("{"),this.children(t,function(e){e.type==="Declaration"&&this.chunk(";")}),this.chunk("}")},walkContext:"block"},IS=ce.TYPE,U5=IS.LeftSquareBracket,G5=IS.RightSquareBracket,H5={name:"Brackets",structure:{children:[[]]},parse:function(t,e){var r=this.scanner.tokenStart,a=null;return this.eat(U5),a=t.call(this,e),this.scanner.eof||this.eat(G5),{type:"Brackets",loc:this.getLocation(r,this.scanner.tokenStart),children:a}},generate:function(t){this.chunk("["),this.children(t),this.chunk("]")}},Y5=ce.TYPE.CDC,Q5={name:"CDC",structure:[],parse:function(){var t=this.scanner.tokenStart;return this.eat(Y5),{type:"CDC",loc:this.getLocation(t,this.scanner.tokenStart)}},generate:function(){this.chunk("-->")}},K5=ce.TYPE.CDO,J5={name:"CDO",structure:[],parse:function(){var t=this.scanner.tokenStart;return this.eat(K5),{type:"CDO",loc:this.getLocation(t,this.scanner.tokenStart)}},generate:function(){this.chunk("<!--")}},Z5=ce.TYPE,X5=Z5.Ident,e8=46,t8={name:"ClassSelector",structure:{name:String},parse:function(){return this.scanner.isDelim(e8)||this.error("Full stop is expected"),this.scanner.next(),{type:"ClassSelector",loc:this.getLocation(this.scanner.tokenStart-1,this.scanner.tokenEnd),name:this.consume(X5)}},generate:function(t){this.chunk("."),this.chunk(t.name)}},r8=ce.TYPE,a8=r8.Ident,i8=43,zS=47,n8=62,s8=126,o8={name:"Combinator",structure:{name:String},parse:function(){var t=this.scanner.tokenStart,e=this.scanner.source.charCodeAt(this.scanner.tokenStart);switch(e){case n8:case i8:case s8:this.scanner.next();break;case zS:this.scanner.next(),(this.scanner.tokenType!==a8||this.scanner.lookupValue(0,"deep")===!1)&&this.error("Identifier `deep` is expected"),this.scanner.next(),this.scanner.isDelim(zS)||this.error("Solidus is expected"),this.scanner.next();break;default:this.error("Combinator is expected")}return{type:"Combinator",loc:this.getLocation(t,this.scanner.tokenStart),name:this.scanner.substrToCursor(t)}},generate:function(t){this.chunk(t.name)}},l8=ce.TYPE,u8=l8.Comment,c8=42,d8=47,p8={name:"Comment",structure:{value:String},parse:function(){var t=this.scanner.tokenStart,e=this.scanner.tokenEnd;return this.eat(u8),e-t+2>=2&&this.scanner.source.charCodeAt(e-2)===c8&&this.scanner.source.charCodeAt(e-1)===d8&&(e-=2),{type:"Comment",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.source.substring(t+2,e)}},generate:function(t){this.chunk("/*"),this.chunk(t.value),this.chunk("*/")}},f8=Vd.isCustomProperty,Vi=ce.TYPE,LS=Ga.mode,jS=Vi.Ident,NS=Vi.Hash,h8=Vi.Colon,RS=Vi.Semicolon,FS=Vi.Delim,m8=Vi.WhiteSpace,qS=33,g8=35,v8=36,b8=38,y8=42,S8=43,BS=47;function x8(t){return this.Raw(t,LS.exclamationMarkOrSemicolon,!0)}function k8(t){return this.Raw(t,LS.exclamationMarkOrSemicolon,!1)}function _8(){var t=this.scanner.tokenIndex,e=this.Value();return e.type!=="Raw"&&this.scanner.eof===!1&&this.scanner.tokenType!==RS&&this.scanner.isDelim(qS)===!1&&this.scanner.isBalanceEdge(t)===!1&&this.error(),e}var w8={name:"Declaration",structure:{important:[Boolean,String],property:String,value:["Value","Raw"]},parse:function(){var t=this.scanner.tokenStart,e=this.scanner.tokenIndex,r=C8.call(this),a=f8(r),i=a?this.parseCustomProperty:this.parseValue,n=a?k8:x8,s=!1,o;this.scanner.skipSC(),this.eat(h8);const u=this.scanner.tokenIndex;if(a||this.scanner.skipSC(),i?o=this.parseWithFallback(_8,n):o=n.call(this,this.scanner.tokenIndex),a&&o.type==="Value"&&o.children.isEmpty()){for(let l=u-this.scanner.tokenIndex;l<=0;l++)if(this.scanner.lookupType(l)===m8){o.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.scanner.isDelim(qS)&&(s=T8.call(this),this.scanner.skipSC()),this.scanner.eof===!1&&this.scanner.tokenType!==RS&&this.scanner.isBalanceEdge(e)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.scanner.tokenStart),important:s,property:r,value:o}},generate:function(t){this.chunk(t.property),this.chunk(":"),this.node(t.value),t.important&&this.chunk(t.important===!0?"!important":"!"+t.important)},walkContext:"declaration"};function C8(){var t=this.scanner.tokenStart;if(this.scanner.tokenType===FS)switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case y8:case v8:case S8:case g8:case b8:this.scanner.next();break;case BS:this.scanner.next(),this.scanner.isDelim(BS)&&this.scanner.next();break}return this.scanner.tokenType===NS?this.eat(NS):this.eat(jS),this.scanner.substrToCursor(t)}function T8(){this.eat(FS),this.scanner.skipSC();var t=this.consume(jS);return t==="important"?!0:t}var Np=ce.TYPE,A8=Ga.mode,O8=Np.WhiteSpace,E8=Np.Comment,M8=Np.Semicolon;function $8(t){return this.Raw(t,A8.semicolonIncluded,!0)}var P8={name:"DeclarationList",structure:{children:[["Declaration"]]},parse:function(){for(var t=this.createList();!this.scanner.eof;)switch(this.scanner.tokenType){case O8:case E8:case M8:this.scanner.next();break;default:t.push(this.parseWithFallback(this.Declaration,$8))}return{type:"DeclarationList",loc:this.getLocationFromList(t),children:t}},generate:function(t){this.children(t,function(e){e.type==="Declaration"&&this.chunk(";")})}},D8=Xn.consumeNumber,I8=ce.TYPE,z8=I8.Dimension,L8={name:"Dimension",structure:{value:String,unit:String},parse:function(){var t=this.scanner.tokenStart,e=D8(this.scanner.source,t);return this.eat(z8),{type:"Dimension",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.source.substring(t,e),unit:this.scanner.source.substring(e,this.scanner.tokenStart)}},generate:function(t){this.chunk(t.value),this.chunk(t.unit)}},j8=ce.TYPE,N8=j8.RightParenthesis,R8={name:"Function",structure:{name:String,children:[[]]},parse:function(t,e){var r=this.scanner.tokenStart,a=this.consumeFunctionName(),i=a.toLowerCase(),n;return n=e.hasOwnProperty(i)?e[i].call(this,e):t.call(this,e),this.scanner.eof||this.eat(N8),{type:"Function",loc:this.getLocation(r,this.scanner.tokenStart),name:a,children:n}},generate:function(t){this.chunk(t.name),this.chunk("("),this.children(t),this.chunk(")")},walkContext:"function"},F8=ce.TYPE,q8=F8.Hash,B8={name:"Hash",structure:{value:String},parse:function(){var t=this.scanner.tokenStart;return this.eat(q8),{type:"Hash",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.substrToCursor(t+1)}},generate:function(t){this.chunk("#"),this.chunk(t.value)}},W8=ce.TYPE,V8=W8.Ident,U8={name:"Identifier",structure:{name:String},parse:function(){return{type:"Identifier",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),name:this.consume(V8)}},generate:function(t){this.chunk(t.name)}},G8=ce.TYPE,H8=G8.Hash,Y8={name:"IdSelector",structure:{name:String},parse:function(){var t=this.scanner.tokenStart;return this.eat(H8),{type:"IdSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:this.scanner.substrToCursor(t+1)}},generate:function(t){this.chunk("#"),this.chunk(t.name)}},Ha=ce.TYPE,WS=Ha.Ident,Q8=Ha.Number,K8=Ha.Dimension,J8=Ha.LeftParenthesis,VS=Ha.RightParenthesis,Z8=Ha.Colon,X8=Ha.Delim,e6={name:"MediaFeature",structure:{name:String,value:["Identifier","Number","Dimension","Ratio",null]},parse:function(){var t=this.scanner.tokenStart,e,r=null;if(this.eat(J8),this.scanner.skipSC(),e=this.consume(WS),this.scanner.skipSC(),this.scanner.tokenType!==VS){switch(this.eat(Z8),this.scanner.skipSC(),this.scanner.tokenType){case Q8:this.lookupNonWSType(1)===X8?r=this.Ratio():r=this.Number();break;case K8:r=this.Dimension();break;case WS:r=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.scanner.skipSC()}return this.eat(VS),{type:"MediaFeature",loc:this.getLocation(t,this.scanner.tokenStart),name:e,value:r}},generate:function(t){this.chunk("("),this.chunk(t.name),t.value!==null&&(this.chunk(":"),this.node(t.value)),this.chunk(")")}},su=ce.TYPE,t6=su.WhiteSpace,r6=su.Comment,a6=su.Ident,i6=su.LeftParenthesis,n6={name:"MediaQuery",structure:{children:[["Identifier","MediaFeature","WhiteSpace"]]},parse:function(){this.scanner.skipSC();var t=this.createList(),e=null,r=null;e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case r6:this.scanner.next();continue;case t6:r=this.WhiteSpace();continue;case a6:e=this.Identifier();break;case i6:e=this.MediaFeature();break;default:break e}r!==null&&(t.push(r),r=null),t.push(e)}return e===null&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(t),children:t}},generate:function(t){this.children(t)}},s6=ce.TYPE.Comma,o6={name:"MediaQueryList",structure:{children:[["MediaQuery"]]},parse:function(t){var e=this.createList();for(this.scanner.skipSC();!this.scanner.eof&&(e.push(this.MediaQuery(t)),this.scanner.tokenType===s6);)this.scanner.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}},generate:function(t){this.children(t,function(){this.chunk(",")})}},l6={name:"Nth",structure:{nth:["AnPlusB","Identifier"],selector:["SelectorList",null]},parse:function(t){this.scanner.skipSC();var e=this.scanner.tokenStart,r=e,a=null,i;return this.scanner.lookupValue(0,"odd")||this.scanner.lookupValue(0,"even")?i=this.Identifier():i=this.AnPlusB(),this.scanner.skipSC(),t&&this.scanner.lookupValue(0,"of")?(this.scanner.next(),a=this.SelectorList(),this.needPositions&&(r=this.getLastListNode(a.children).loc.end.offset)):this.needPositions&&(r=i.loc.end.offset),{type:"Nth",loc:this.getLocation(e,r),nth:i,selector:a}},generate:function(t){this.node(t.nth),t.selector!==null&&(this.chunk(" of "),this.node(t.selector))}},u6=ce.TYPE.Number,c6={name:"Number",structure:{value:String},parse:function(){return{type:"Number",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(u6)}},generate:function(t){this.chunk(t.value)}},d6={name:"Operator",structure:{value:String},parse:function(){var t=this.scanner.tokenStart;return this.scanner.next(),{type:"Operator",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.substrToCursor(t)}},generate:function(t){this.chunk(t.value)}},US=ce.TYPE,p6=US.LeftParenthesis,f6=US.RightParenthesis,h6={name:"Parentheses",structure:{children:[[]]},parse:function(t,e){var r=this.scanner.tokenStart,a=null;return this.eat(p6),a=t.call(this,e),this.scanner.eof||this.eat(f6),{type:"Parentheses",loc:this.getLocation(r,this.scanner.tokenStart),children:a}},generate:function(t){this.chunk("("),this.children(t),this.chunk(")")}},m6=Xn.consumeNumber,g6=ce.TYPE,v6=g6.Percentage,b6={name:"Percentage",structure:{value:String},parse:function(){var t=this.scanner.tokenStart,e=m6(this.scanner.source,t);return this.eat(v6),{type:"Percentage",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.source.substring(t,e)}},generate:function(t){this.chunk(t.value),this.chunk("%")}},ou=ce.TYPE,y6=ou.Ident,S6=ou.Function,x6=ou.Colon,k6=ou.RightParenthesis,_6={name:"PseudoClassSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var t=this.scanner.tokenStart,e=null,r,a;return this.eat(x6),this.scanner.tokenType===S6?(r=this.consumeFunctionName(),a=r.toLowerCase(),this.pseudo.hasOwnProperty(a)?(this.scanner.skipSC(),e=this.pseudo[a].call(this),this.scanner.skipSC()):(e=this.createList(),e.push(this.Raw(this.scanner.tokenIndex,null,!1))),this.eat(k6)):r=this.consume(y6),{type:"PseudoClassSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:r,children:e}},generate:function(t){this.chunk(":"),this.chunk(t.name),t.children!==null&&(this.chunk("("),this.children(t),this.chunk(")"))},walkContext:"function"},lu=ce.TYPE,w6=lu.Ident,C6=lu.Function,GS=lu.Colon,T6=lu.RightParenthesis,A6={name:"PseudoElementSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var t=this.scanner.tokenStart,e=null,r,a;return this.eat(GS),this.eat(GS),this.scanner.tokenType===C6?(r=this.consumeFunctionName(),a=r.toLowerCase(),this.pseudo.hasOwnProperty(a)?(this.scanner.skipSC(),e=this.pseudo[a].call(this),this.scanner.skipSC()):(e=this.createList(),e.push(this.Raw(this.scanner.tokenIndex,null,!1))),this.eat(T6)):r=this.consume(w6),{type:"PseudoElementSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:r,children:e}},generate:function(t){this.chunk("::"),this.chunk(t.name),t.children!==null&&(this.chunk("("),this.children(t),this.chunk(")"))},walkContext:"function"},O6=ce.isDigit,HS=ce.TYPE,E6=HS.Number,M6=HS.Delim,$6=47,P6=46;function YS(){this.scanner.skipWS();for(var t=this.consume(E6),e=0;e<t.length;e++){var r=t.charCodeAt(e);!O6(r)&&r!==P6&&this.error("Unsigned number is expected",this.scanner.tokenStart-t.length+e)}return Number(t)===0&&this.error("Zero number is not allowed",this.scanner.tokenStart-t.length),t}var D6={name:"Ratio",structure:{left:String,right:String},parse:function(){var t=this.scanner.tokenStart,e=YS.call(this),r;return this.scanner.skipWS(),this.scanner.isDelim($6)||this.error("Solidus is expected"),this.eat(M6),r=YS.call(this),{type:"Ratio",loc:this.getLocation(t,this.scanner.tokenStart),left:e,right:r}},generate:function(t){this.chunk(t.left),this.chunk("/"),this.chunk(t.right)}},I6=ce.TYPE,z6=Ga.mode,L6=I6.LeftCurlyBracket;function QS(t){return this.Raw(t,z6.leftCurlyBracket,!0)}function j6(){var t=this.SelectorList();return t.type!=="Raw"&&this.scanner.eof===!1&&this.scanner.tokenType!==L6&&this.error(),t}var N6={name:"Rule",structure:{prelude:["SelectorList","Raw"],block:["Block"]},parse:function(){var t=this.scanner.tokenIndex,e=this.scanner.tokenStart,r,a;return this.parseRulePrelude?r=this.parseWithFallback(j6,QS):r=QS.call(this,t),a=this.Block(!0),{type:"Rule",loc:this.getLocation(e,this.scanner.tokenStart),prelude:r,block:a}},generate:function(t){this.node(t.prelude),this.node(t.block)},walkContext:"rule"},R6={name:"Selector",structure:{children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]},parse:function(){var t=this.readSequence(this.scope.Selector);return this.getFirstListNode(t)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(t),children:t}},generate:function(t){this.children(t)}},F6=ce.TYPE,q6=F6.Comma,B6={name:"SelectorList",structure:{children:[["Selector","Raw"]]},parse:function(){for(var t=this.createList();!this.scanner.eof;){if(t.push(this.Selector()),this.scanner.tokenType===q6){this.scanner.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(t),children:t}},generate:function(t){this.children(t,function(){this.chunk(",")})},walkContext:"selector"},W6=ce.TYPE.String,V6={name:"String",structure:{value:String},parse:function(){return{type:"String",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(W6)}},generate:function(t){this.chunk(t.value)}},bs=ce.TYPE,U6=bs.WhiteSpace,G6=bs.Comment,H6=bs.AtKeyword,Y6=bs.CDO,Q6=bs.CDC,K6=33;function KS(t){return this.Raw(t,null,!1)}var J6={name:"StyleSheet",structure:{children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]},parse:function(){for(var t=this.scanner.tokenStart,e=this.createList(),r;!this.scanner.eof;){switch(this.scanner.tokenType){case U6:this.scanner.next();continue;case G6:if(this.scanner.source.charCodeAt(this.scanner.tokenStart+2)!==K6){this.scanner.next();continue}r=this.Comment();break;case Y6:r=this.CDO();break;case Q6:r=this.CDC();break;case H6:r=this.parseWithFallback(this.Atrule,KS);break;default:r=this.parseWithFallback(this.Rule,KS)}e.push(r)}return{type:"StyleSheet",loc:this.getLocation(t,this.scanner.tokenStart),children:e}},generate:function(t){this.children(t)},walkContext:"stylesheet"},Z6=ce.TYPE,X6=Z6.Ident,eG=42,JS=124;function Rp(){this.scanner.tokenType!==X6&&this.scanner.isDelim(eG)===!1&&this.error("Identifier or asterisk is expected"),this.scanner.next()}var tG={name:"TypeSelector",structure:{name:String},parse:function(){var t=this.scanner.tokenStart;return this.scanner.isDelim(JS)?(this.scanner.next(),Rp.call(this)):(Rp.call(this),this.scanner.isDelim(JS)&&(this.scanner.next(),Rp.call(this))),{type:"TypeSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:this.scanner.substrToCursor(t)}},generate:function(t){this.chunk(t.name)}},rG=ce.isHexDigit,ZS=ce.cmpChar,Fp=ce.TYPE,aG=ce.NAME,iG=Fp.Ident,XS=Fp.Number,ex=Fp.Dimension,uu=43,tx=45,qp=63,nG=117;function ys(t,e){for(var r=this.scanner.tokenStart+t,a=0;r<this.scanner.tokenEnd;r++){var i=this.scanner.source.charCodeAt(r);if(i===tx&&e&&a!==0)return ys.call(this,t+a+1,!1)===0&&this.error(),-1;rG(i)||this.error(e&&a!==0?"HyphenMinus"+(a<6?" or hex digit":"")+" is expected":a<6?"Hex digit is expected":"Unexpected input",r),++a>6&&this.error("Too many hex digits",r)}return this.scanner.next(),a}function cu(t){for(var e=0;this.scanner.isDelim(qp);)++e>t&&this.error("Too many question marks"),this.scanner.next()}function Bp(t){this.scanner.source.charCodeAt(this.scanner.tokenStart)!==t&&this.error(aG[t]+" is expected")}function sG(){var t=0;if(this.scanner.isDelim(uu)){if(this.scanner.next(),this.scanner.tokenType===iG){t=ys.call(this,0,!0),t>0&&cu.call(this,6-t);return}if(this.scanner.isDelim(qp)){this.scanner.next(),cu.call(this,5);return}this.error("Hex digit or question mark is expected");return}if(this.scanner.tokenType===XS){if(Bp.call(this,uu),t=ys.call(this,1,!0),this.scanner.isDelim(qp)){cu.call(this,6-t);return}if(this.scanner.tokenType===ex||this.scanner.tokenType===XS){Bp.call(this,tx),ys.call(this,1,!1);return}return}if(this.scanner.tokenType===ex){Bp.call(this,uu),t=ys.call(this,1,!0),t>0&&cu.call(this,6-t);return}this.error()}var oG={name:"UnicodeRange",structure:{value:String},parse:function(){var t=this.scanner.tokenStart;return ZS(this.scanner.source,t,nG)||this.error("U is expected"),ZS(this.scanner.source,t+1,uu)||this.error("Plus sign is expected"),this.scanner.next(),sG.call(this),{type:"UnicodeRange",loc:this.getLocation(t,this.scanner.tokenStart),value:this.scanner.substrToCursor(t)}},generate:function(t){this.chunk(t.value)}},rx=ce.isWhiteSpace,lG=ce.cmpStr,Wp=ce.TYPE,ax=Wp.Function,ix=Wp.Url,uG=Wp.RightParenthesis,cG={name:"Url",structure:{value:["String","Raw"]},parse:function(){var t=this.scanner.tokenStart,e;switch(this.scanner.tokenType){case ix:for(var r=t+4,a=this.scanner.tokenEnd-1;r<a&&rx(this.scanner.source.charCodeAt(r));)r++;for(;r<a&&rx(this.scanner.source.charCodeAt(a-1));)a--;e={type:"Raw",loc:this.getLocation(r,a),value:this.scanner.source.substring(r,a)},this.eat(ix);break;case ax:lG(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(ax),this.scanner.skipSC(),e=this.String(),this.scanner.skipSC(),this.eat(uG);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(t,this.scanner.tokenStart),value:e}},generate:function(t){this.chunk("url"),this.chunk("("),this.node(t.value),this.chunk(")")}},dG={name:"Value",structure:{children:[[]]},parse:function(){var t=this.scanner.tokenStart,e=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(t,this.scanner.tokenStart),children:e}},generate:function(t){this.children(t)}},pG=ce.TYPE.WhiteSpace,fG=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),hG={name:"WhiteSpace",structure:{value:String},parse:function(){return this.eat(pG),fG},generate:function(t){this.chunk(t.value)}},Vp={AnPlusB:d5,Atrule:w5,AtrulePrelude:A5,AttributeSelector:L5,Block:V5,Brackets:H5,CDC:Q5,CDO:J5,ClassSelector:t8,Combinator:o8,Comment:p8,Declaration:w8,DeclarationList:P8,Dimension:L8,Function:R8,Hash:B8,Identifier:U8,IdSelector:Y8,MediaFeature:e6,MediaQuery:n6,MediaQueryList:o6,Nth:l6,Number:c6,Operator:d6,Parentheses:h6,Percentage:b6,PseudoClassSelector:_6,PseudoElementSelector:A6,Ratio:D6,Raw:Ga,Rule:N6,Selector:R6,SelectorList:B6,String:V6,StyleSheet:J6,TypeSelector:tG,UnicodeRange:oG,Url:cG,Value:dG,WhiteSpace:hG},Up=l5,mG={generic:!0,types:Up.types,atrules:Up.atrules,properties:Up.properties,node:Vp},nx=ce.cmpChar,gG=ce.cmpStr,tr=ce.TYPE,vG=tr.Ident,bG=tr.String,yG=tr.Number,SG=tr.Function,xG=tr.Url,kG=tr.Hash,_G=tr.Dimension,wG=tr.Percentage,CG=tr.LeftParenthesis,TG=tr.LeftSquareBracket,AG=tr.Comma,OG=tr.Delim,EG=35,MG=42,sx=43,$G=45,PG=47,DG=117,ox=function(e){switch(this.scanner.tokenType){case kG:return this.Hash();case AG:return e.space=null,e.ignoreWSAfter=!0,this.Operator();case CG:return this.Parentheses(this.readSequence,e.recognizer);case TG:return this.Brackets(this.readSequence,e.recognizer);case bG:return this.String();case _G:return this.Dimension();case wG:return this.Percentage();case yG:return this.Number();case SG:return gG(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case xG:return this.Url();case vG:return nx(this.scanner.source,this.scanner.tokenStart,DG)&&nx(this.scanner.source,this.scanner.tokenStart+1,sx)?this.UnicodeRange():this.Identifier();case OG:var r=this.scanner.source.charCodeAt(this.scanner.tokenStart);if(r===PG||r===MG||r===sx||r===$G)return this.Operator();r===EG&&this.error("Hex or identifier is expected",this.scanner.tokenStart+1);break}},IG={getNode:ox},ya=ce.TYPE,zG=ya.Delim,LG=ya.Ident,jG=ya.Dimension,NG=ya.Percentage,RG=ya.Number,FG=ya.Hash,lx=ya.Colon,qG=ya.LeftSquareBracket,BG=35,WG=42,VG=43,UG=47,ux=46,GG=62,HG=124,YG=126;function QG(t){switch(this.scanner.tokenType){case qG:return this.AttributeSelector();case FG:return this.IdSelector();case lx:return this.scanner.lookupType(1)===lx?this.PseudoElementSelector():this.PseudoClassSelector();case LG:return this.TypeSelector();case RG:case NG:return this.Percentage();case jG:this.scanner.source.charCodeAt(this.scanner.tokenStart)===ux&&this.error("Identifier is expected",this.scanner.tokenStart+1);break;case zG:var e=this.scanner.source.charCodeAt(this.scanner.tokenStart);switch(e){case VG:case GG:case YG:return t.space=null,t.ignoreWSAfter=!0,this.Combinator();case UG:return this.Combinator();case ux:return this.ClassSelector();case WG:case HG:return this.TypeSelector();case BG:return this.IdSelector()}break}}var KG={getNode:QG},JG=function(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))},cx=ce.TYPE,ZG=Ga.mode,XG=cx.Comma,eH=cx.WhiteSpace,tH=function(){var t=this.createList();if(this.scanner.skipSC(),t.push(this.Identifier()),this.scanner.skipSC(),this.scanner.tokenType===XG){t.push(this.Operator());const e=this.scanner.tokenIndex,r=this.parseCustomProperty?this.Value(null):this.Raw(this.scanner.tokenIndex,ZG.exclamationMarkOrSemicolon,!1);if(r.type==="Value"&&r.children.isEmpty()){for(let a=e-this.scanner.tokenIndex;a<=0;a++)if(this.scanner.lookupType(a)===eH){r.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}t.push(r)}return t},rH={getNode:ox,expression:JG,var:tH},aH={AtrulePrelude:IG,Selector:KG,Value:rH},iH={parse:{prelude:null,block:function(){return this.Block(!0)}}},Ss=ce.TYPE,nH=Ss.String,sH=Ss.Ident,oH=Ss.Url,lH=Ss.Function,uH=Ss.LeftParenthesis,cH={parse:{prelude:function(){var t=this.createList();switch(this.scanner.skipSC(),this.scanner.tokenType){case nH:t.push(this.String());break;case oH:case lH:t.push(this.Url());break;default:this.error("String or url() is expected")}return(this.lookupNonWSType(0)===sH||this.lookupNonWSType(0)===uH)&&(t.push(this.WhiteSpace()),t.push(this.MediaQueryList())),t},block:null}},dH={parse:{prelude:function(){return this.createSingleNodeList(this.MediaQueryList())},block:function(){return this.Block(!1)}}},pH={parse:{prelude:function(){return this.createSingleNodeList(this.SelectorList())},block:function(){return this.Block(!0)}}},Ui=ce.TYPE,fH=Ui.WhiteSpace,hH=Ui.Comment,dx=Ui.Ident,mH=Ui.Function,gH=Ui.Colon,vH=Ui.LeftParenthesis;function bH(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))}function yH(){return this.scanner.skipSC(),this.scanner.tokenType===dx&&this.lookupNonWSType(1)===gH?this.createSingleNodeList(this.Declaration()):px.call(this)}function px(){var t=this.createList(),e=null,r;this.scanner.skipSC();e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case fH:e=this.WhiteSpace();continue;case hH:this.scanner.next();continue;case mH:r=this.Function(bH,this.scope.AtrulePrelude);break;case dx:r=this.Identifier();break;case vH:r=this.Parentheses(yH,this.scope.AtrulePrelude);break;default:break e}e!==null&&(t.push(e),e=null),t.push(r)}return t}var SH={parse:{prelude:function(){var t=px.call(this);return this.getFirstListNode(t)===null&&this.error("Condition is expected"),t},block:function(){return this.Block(!1)}}},xH={"font-face":iH,import:cH,media:dH,page:pH,supports:SH},kH={parse:function(){return this.createSingleNodeList(this.Identifier())}},_H={parse:function(){return this.createSingleNodeList(this.SelectorList())}},wH={parse:function(){return this.createSingleNodeList(this.Identifier())}},fx={parse:function(){return this.createSingleNodeList(this.SelectorList())}},CH=fx,TH=fx,AH=!0,hx={parse:function(){return this.createSingleNodeList(this.Nth(AH))}},OH=hx,EH=hx,MH=!1,mx={parse:function(){return this.createSingleNodeList(this.Nth(MH))}},$H=mx,PH=mx,DH={parse:function(){return this.createSingleNodeList(this.Selector())}},IH={dir:kH,has:_H,lang:wH,matches:CH,not:TH,"nth-child":OH,"nth-last-child":EH,"nth-last-of-type":$H,"nth-of-type":PH,slotted:DH},zH={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude:function(t){return this.AtrulePrelude(t.atrule?String(t.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block:function(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:aH,atrule:xH,pseudo:IH,node:Vp},LH={node:Vp};const jH={name:"css-tree",version:"1.1.3",description:"A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations",author:"Roman Dvornov <rdvornov@gmail.com> (https://github.com/lahmatiy)",license:"MIT",repository:"csstree/csstree",keywords:["css","ast","tokenizer","parser","walker","lexer","generator","utils","syntax","validation"],main:"lib/index.js",unpkg:"dist/csstree.min.js",jsdelivr:"dist/csstree.min.js",scripts:{build:"rollup --config",lint:"eslint data lib scripts test && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint","lint-and-test":"npm run lint && npm test","update:docs":"node scripts/update-docs","review:syntax-patch":"node scripts/review-syntax-patch",test:"mocha --reporter progress",coverage:"nyc npm test",travis:"nyc npm run lint-and-test && npm run coveralls",coveralls:"nyc report --reporter=text-lcov | coveralls",prepublishOnly:"npm run build",hydrogen:"node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/parse --stat -o /dev/null"},dependencies:{"mdn-data":"2.0.14","source-map":"^0.6.1"},devDependencies:{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-json":"^4.0.2","@rollup/plugin-node-resolve":"^7.1.1",coveralls:"^3.0.9",eslint:"^6.8.0","json-to-ast":"^2.1.0",mocha:"^6.2.3",nyc:"^14.1.1",rollup:"^1.32.1","rollup-plugin-terser":"^5.3.0"},engines:{node:">=8.0.0"},files:["data","dist","lib"]};function NH(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var a in r)t[a]=r[a]}return t}$d.exports=hb.create(NH(mG,zH,LH)),$d.exports.version=jH.version;var RH=$d.exports,Ya=RH,gx={exports:{}};(function(t){(function(e,r){t.exports?t.exports=r():e.Scrollparent=r()})(wt,function(){function e(a){var i=getComputedStyle(a,null).getPropertyValue("overflow");return i.indexOf("scroll")>-1||i.indexOf("auto")>-1}function r(a){if(a instanceof HTMLElement||a instanceof SVGElement){for(var i=a.parentNode;i.parentNode;){if(e(i))return i;i=i.parentNode}return document.scrollingElement||document.documentElement}}return r})})(gx);var FH=gx.exports;const qH=ar(FH),BH={name:"custom-css-output",render(t){return t("style",this.$slots.default)}},du=[{code:"AFN",name:"Afghanistan Afghani",format:"####.##",symbol:""},{code:"ALL",name:"Albanian Lek",format:"####.##",symbol:""},{code:"DZD",name:"Algerian Dinar",format:"####.##",symbol:"دج (Arabic) or DA (Latin)"},{code:"AOA",name:"Angolan Kwanza",format:"####.##",symbol:"Kz"},{code:"ARS",name:"Argentine Peso",format:"#.###,##",symbol:""},{code:"AMD",name:"Armenian Dram",format:"#,###.##",symbol:"֏"},{code:"AWG",name:"Aruban Guilder",format:"#,###.##",symbol:""},{code:"AUD",name:"Australian Dollar",format:"# ###.##",symbol:""},{code:"AZN",name:"Azerbaijanian Manat",format:"####.##",symbol:""},{code:"BSD",name:"Bahamian Dollar",format:"#,###.##",symbol:""},{code:"BHD",name:"Bahraini Dinar",format:"#,###.###",symbol:".د.ب (Arabic) or BD (Latin"},{code:"BDT",name:"Bangladesh Taka",format:"#,###.##",symbol:"৳"},{code:"BBD",name:"Barbados Dollar",format:"####.##",symbol:""},{code:"BYN",name:"Belarussian Ruble",format:"####",symbol:""},{code:"BZD",name:"Belize Dollar",format:"#,###.##",symbol:""},{code:"BMD",name:"Bermudian Dollar",format:"#,###.##",symbol:""},{code:"BTN",name:"Bhutan Ngultrum",format:"####.##",symbol:"Nu"},{code:"BOB",name:"Bolivia, Boliviano",format:"#,###.##",symbol:""},{code:"BAM",name:"Bosnia and Herzegovina, Convertible Marks",format:"#,###.##",symbol:""},{code:"BWP",name:"Botswana, Pula",format:"#,###.##",symbol:""},{code:"BRL",name:"Brazilian Real",format:"#.###,##",symbol:""},{code:"BND",name:"Brunei Dollar",format:"#,###.##",symbol:""},{code:"BGN",name:"Bulgarian Lev",format:"####.##",symbol:""},{code:"BIF",name:"Burundi Franc",format:"####",symbol:"FBu"},{code:"KHR",name:"Cambodia, Riel",format:"####.##",symbol:""},{code:"CAD",name:"Canadian Dollar",format:"#,###.##",symbol:""},{code:"CVE",name:"Cape Verde Escudo",format:"####.##",symbol:""},{code:"KYD",name:"Cayman Islands Dollar",format:"#,###.##",symbol:""},{code:"XPF",name:"CFP Franc",format:"####",symbol:"₣"},{code:"CLP",name:"Chilean Peso",format:"#.###",symbol:""},{code:"CNY",name:"China Yuan Renminbi",format:"#,###.##",symbol:""},{code:"COP",name:"Colombian Peso",format:"#.###,##",symbol:""},{code:"KMF",name:"Comoro Franc",format:"####",symbol:"CF"},{code:"CRC",name:"Costa Rican Colon",format:"#.###,##",symbol:""},{code:"HRK",name:"Croatian Kuna",format:"#.###,##",symbol:""},{code:"CUP",name:"Cuban Peso",format:"#,###.##",symbol:""},{code:"CZK",name:"Czech Koruna",format:"#.###,##",symbol:""},{code:"DKK",name:"Danish Krone",format:"#.###,##",symbol:""},{code:"DJF",name:"Djibouti Franc",format:"####",symbol:"Fdj"},{code:"DOP",name:"Dominican Peso",format:"#,###.##",symbol:""},{code:"XCD",name:"East Caribbean Dollar",format:"#,###.##",symbol:""},{code:"EGP",name:"Egyptian Pound",format:"#,###.##",symbol:""},{code:"SVC",name:"El Salvador Colon",format:"#,###.##",symbol:""},{code:"ERN",name:"Eritrea Nakfa",format:"####.##",symbol:"Nkf (Latin script) ናቕፋ (Ge'ez script) ناكفا (Arabic script)"},{code:"ETB",name:"Ethiopian Birr",format:"####.##",symbol:"Br (Latin Script) ብር (Ethiopic Script)"},{code:"EUR",name:"Euro",format:"#,###.##",symbol:""},{code:"FKP",name:"Falkland Islands Pound",format:"####.##",symbol:""},{code:"FJD",name:"Fiji Dollar",format:"####.##",symbol:""},{code:"CDF",name:"Congolais Franc",format:"####.##",symbol:"FC"},{code:"GMD",name:"Gambia Dalasi",format:"####.##",symbol:"D"},{code:"GEL",name:"Georgia Lari",format:"####.##",symbol:"ლ (Lasi) of the Georgian script"},{code:"GHC",name:"Ghana Cedi",format:"#,###.##",symbol:""},{code:"GIP",name:"Gibraltar Pound",format:"#,###.##",symbol:""},{code:"GTQ",name:"Guatemala, Quetzal",format:"#,###.##",symbol:""},{code:"GWP",name:"Guinea-Bissau Peso",format:"####.##",symbol:"$ or COL$"},{code:"GYD",name:"Guyana Dollar",format:"####.##",symbol:""},{code:"HTG",name:"Haitian Gourde",format:"####.##",symbol:"G"},{code:"HNL",name:"Honduran Lempira",format:"#,###.##",symbol:""},{code:"HKD",name:"Hong Kong Dollar",format:"#,###.##",symbol:""},{code:"HUF",name:"Hungary Forint",format:"#.###",symbol:""},{code:"ISK",name:"Iceland Krona",format:"#.###",symbol:""},{code:"INR",name:"Indian Rupee",format:"#,##,###.##",symbol:"₹"},{code:"IDR",name:"Indonesian Rupiah",format:"#.###,##",symbol:""},{code:"IRR",name:"Iranian Rial",format:"#,###.##",symbol:""},{code:"IQD",name:"Iraqi Dinar",format:"####.###",symbol:"ع.د"},{code:"JMD",name:"Jamaican Dollar",format:"#,###.##",symbol:""},{code:"JPY",name:"Japanese Yen",format:"#,###",symbol:""},{code:"JOD",name:"Jordanian Dinar",format:"#,###.###",symbol:"د.ا"},{code:"KZT",name:"Kazakhstan Tenge",format:"####.##",symbol:""},{code:"KES",name:"Kenyan Shilling",format:"#,###.##",symbol:"KES"},{code:"KWD",name:"Kuwaiti Dinar",format:"#,###.###",symbol:"د.ك or KD"},{code:"KGS",name:"Kyrgyzstan Som",format:"####.##",symbol:""},{code:"LAK",name:"Laos, Kip",format:"####.##",symbol:""},{code:"LVL",name:"Latvian Lats",format:"#,###.##",symbol:"Ls"},{code:"LBP",name:"Lebanese Pound",format:"# ###",symbol:""},{code:"LSL",name:"Lesotho Loti",format:"####.##",symbol:"L (singular) or M (plural)"},{code:"LRD",name:"Liberian Dollar",format:"####.##",symbol:""},{code:"LYD",name:"Libyan Dinar",format:"####.###",symbol:"LD and ل.د"},{code:"LTL",name:"Lithuanian Litas",format:"# ###,##",symbol:"Lt"},{code:"MOP",name:"Macao Pataca",format:"####.##",symbol:"MOP$"},{code:"MKD",name:"Macedonia, Denar",format:"#,###.##",symbol:""},{code:"MGA",name:"Malagasy Ariary",format:"####",symbol:"Ar"},{code:"MWK",name:"Malawi Kwacha",format:"####.##",symbol:"MK"},{code:"MYR",name:"Malaysian Ringgit",format:"#,###.##",symbol:""},{code:"MVR",name:"Maldives Rufiyaa",format:"####.##",symbol:"Rf"},{code:"MTL",name:"Maltese Lira",format:"#,###.##",symbol:"₤ and Lm"},{code:"MRO",name:"Mauritanian Ouguiya",format:"####.##",symbol:"UM"},{code:"MUR",name:"Mauritius Rupee",format:"#,###",symbol:""},{code:"MXN",name:"Mexican Peso",format:"#,###.##",symbol:""},{code:"MDL",name:"Moldovan Leu",format:"####.##",symbol:"L"},{code:"MNT",name:"Mongolian Tugrik",format:"####.##",symbol:""},{code:"MAD",name:"Moroccan Dirham",format:"####.##",symbol:"MAD"},{code:"MZM",name:"Mozambique Metical",format:"#.###,##",symbol:""},{code:"MMK",name:"Myanmar Kyat",format:"####.##",symbol:"K"},{code:"NAD",name:"Namibian Dollar",format:"####.##",symbol:""},{code:"NPR",name:"Nepalese Rupee",format:"#,###.##",symbol:""},{code:"ANG",name:"Netherlands Antillian Guilder",format:"#.###,##",symbol:""},{code:"ILS",name:"New Israeli Shekel",format:"#,###.##",symbol:""},{code:"TWD",name:"New Taiwan Dollar",format:"####.##",symbol:""},{code:"TRY",name:"New Turkish Lira",format:"#,###.##",symbol:"₺"},{code:"NZD",name:"New Zealand Dollar",format:"#,###.##",symbol:""},{code:"NIO",name:"Nicaragua, Cordoba Oro",format:"####.##",symbol:""},{code:"NGN",name:"Nigeria, Naira",format:"#,###.##",symbol:""},{code:"KPW",name:"North Korean Won",format:"####.##",symbol:""},{code:"NOK",name:"Norwegian Krone",format:"#.###,##",symbol:""},{code:"PKR",name:"Pakistan Rupee",format:"#,###.##",symbol:""},{code:"PAB",name:"Panama Balboa",format:"####.##",symbol:""},{code:"PGK",name:"Papua New Guinea Kina",format:"####.##",symbol:"K"},{code:"PYG",name:"Paraguay Guarani",format:"####",symbol:""},{code:"PEN",name:"Peru Nuevo Sol",format:"#,###.##",symbol:""},{code:"UYU",name:"Uruguay Peso",format:"#.###,##",symbol:""},{code:"PHP",name:"Philippine Peso",format:"#,###.##",symbol:""},{code:"PLN",name:"Poland Zloty",format:"# ###,##",symbol:""},{code:"GBP",name:"United Kingdom Pound Sterling",format:"#,###.##",symbol:""},{code:"QAR",name:"Qatari Rial",format:"####.##",symbol:""},{code:"OMR",name:"Rial Omani",format:"#,###.###",symbol:"ر.ع."},{code:"RON",name:"Romania, New Leu",format:"#.###,##",symbol:""},{code:"RUB",name:"Russian Ruble",format:"#.###,##",symbol:""},{code:"RWF",name:"Rwanda Franc",format:"####",symbol:"FRw"},{code:"SHP",name:"Saint Helena Pound",format:"####.##",symbol:""},{code:"WST",name:"Samoa Tala",format:"####.##",symbol:"SAT"},{code:"STN",name:"Sao Tome and Principe Dobra",format:"####.##",symbol:"Db"},{code:"SAR",name:"Saudi Riyal",format:"#,###.##",symbol:""},{code:"RSD",name:"Serbian Dinar",format:"####.##",symbol:""},{code:"SCR",name:"Seychelles Rupee",format:"####.##",symbol:""},{code:"SLL",name:"Sierra Leone Leone",format:"####.##",symbol:"Le"},{code:"SGD",name:"Singapore Dollar",format:"#,###.##",symbol:""},{code:"SKK",name:"Slovak Koruna",format:"# ###,##",symbol:"Sk"},{code:"SIT",name:"Slovenia Tolar",format:"#.###,##",symbol:"SlT"},{code:"SBD",name:"Solomon Islands Dollar",format:"####.##",symbol:""},{code:"SOS",name:"Somali Shilling",format:"####.##",symbol:""},{code:"ZAR",name:"South Africa Rand",format:"# ###.##",symbol:""},{code:"KRW",name:"South Korea Won",format:"#,###",symbol:""},{code:"LKR",name:"Sri Lanka Rupee",format:"####.##",symbol:""},{code:"SDD",name:"Sudanese Dinar",format:"####.##",symbol:"LSd"},{code:"SRD",name:"Surinam Dollar",format:"####.##",symbol:"$"},{code:"SZL",name:"Swaziland Lilangeni",format:"#, ###.##",symbol:"L (singular) or E (plural)"},{code:"SEK",name:"Swedish Krona",format:"# ###,##",symbol:""},{code:"CHF",name:"Swiss Franc",format:"#'###.##",symbol:""},{code:"SYP",name:"Syrian Pound",format:"####.##",symbol:""},{code:"TZS",name:"Tanzanian Shilling",format:"#,###.##",symbol:"TSh"},{code:"THB",name:"Thailand, Baht",format:"#,###.##",symbol:""},{code:"TOP",name:"Tongan Paanga",format:"#,###.##",symbol:"T$"},{code:"TTD",name:"Trinidad and Tobago Dollar",format:"####.##",symbol:""},{code:"TND",name:"Tunisian Dinar",format:"####.###",symbol:"د.ت (Tunisian Arabic) or DT (Latin)"},{code:"TMT",name:"Turkmenistani New Manat",format:"####.##",symbol:"T"},{code:"AED",name:"UAE Dirham",format:"#,###.##",symbol:"د.إ"},{code:"UGX",name:"Uganda Shilling",format:"####.##",symbol:"USh"},{code:"UAH",name:"Ukraine Hryvnia",format:"# ###,##",symbol:""},{code:"CLF",name:"Unidad de Fomento",format:"####.##",symbol:"CLF"},{code:"USD",name:"US Dollar",format:"#,###.##",symbol:"$"},{code:"UZS",name:"Uzbekistan Sum",format:"####.##",symbol:""},{code:"VUV",name:"Vanuatu Vatu",format:"#,###",symbol:"VT"},{code:"VES",name:"Venezuela Bolivares Fuertes",format:"#.###,##",symbol:""},{code:"VND",name:"Viet Nam Dong",format:"#.###",symbol:""},{code:"YER",name:"Yemeni Rial",format:"####.##",symbol:""},{code:"ZMK",name:"Zambian Kwacha",format:"####.##",symbol:"ZK"},{code:"ZWD",name:"Zimbabwe Dollar",format:"# ###.##",symbol:""}],WH=Object.freeze(Object.defineProperty({__proto__:null,default:du},Symbol.toStringTag,{value:"Module"}));function vx(t){return t.component!=="FormMultiColumn"?t:t.items.flatMap(vx)}function VH(t){return t.flatMap(e=>e.items).flatMap(vx)}Lt.register("custom-same",function(t,e){let r;const a=t;return e.includes(".")?r=e.split(".").reduce((i,n)=>i[n],this.validator.input):r=this.validator._flattenObject(this.validator.input)[e],r===a},"The :attribute and :custom-same fields must match."),Lt.register("after",function(t,e){const r=xr(t).toISOString(),a=xr(e).toISOString();return r>a},"The :attribute must be after :after."),Lt.register("after_or_equal",function(t,e){const r=xr(t).toISOString(),a=xr(e).toISOString();return r>=a},"The :attribute must be equal or after :after_or_equal."),Lt.register("before",function(t,e){const r=xr(t).toISOString(),a=xr(e).toISOString();return r<a},"The :attribute must be before :before."),Lt.register("before_or_equal",function(t,e){const r=xr(t).toISOString(),a=xr(e).toISOString();return r<=a},"The :attribute must be equal or before :before_or_equal."),Lt.register("custom_date",function(t){let e="MM/DD/YYYY";return typeof window.ProcessMaker<"u"&&window.ProcessMaker.user&&window.ProcessMaker.user.datetime_format&&(e=window.ProcessMaker.user.datetime_format.replace(/[\sHh:msaAzZ]/g,"")),xr(t,[e,xr.ISO_8601],!0).isValid()},"The :attribute must be a valid date.");function UH(t,e){const r={},a={int:"integer",boolean:"boolean",string:"string",datetime:"custom-datetime",date:"custom-date",float:"regex:/^[+-]?\\d+(\\.\\d+)?$/",currency:"regex:/^[+-]?\\d+(\\.\\d+)?$/",array:"array",percentage:"regex:/^[+-]?\\d+(\\.\\d+)?$/",password:"string"};return r.validator=null,r.config=t,r.data=e,r.elements={},r.rules={},r.getDataAndRules=i=>{i.forEach(n=>{if(n){if(Array.isArray(n)&&r.getDataAndRules(n),n.items&&(n.component==="FormLoop"?r.ruleFormLoop(n.config.name,n.items):r.getDataAndRules(n.items)),n.component==="FormNestedScreen"){const s=H.get(window,`nestedScreens.id_${n.config.screen}`);s&&r.getDataAndRules(s)}n.config&&n.config.name&&n.config.validation&&r.addRule(n.config.name,n.config.validation),n.component==="FormInput"&&n.config&&n.config.name&&n.config.dataFormat&&r.addRuleFormat(n.config.name,n.config.dataFormat)}})},r.addRule=(i,n)=>{const s=[];typeof n=="string"?s.push(n):n.forEach(o=>{s.push(o.value)}),r.rules[i]=s},r.addRuleFormat=(i,n)=>{r.rules[i]||(r.rules[i]=[]),r.rules[i].push(a[n])},r.ruleFormLoop=(i,n)=>{n.forEach(s=>{Array.isArray(s)&&r.ruleFormLoop(i,s),s.items&&(s.component==="FormLoop"?r.ruleFormLoop(`${i}.*.${s.config.name}`,s.items):r.ruleFormLoop(i,s.items)),s.config&&s.config.name&&s.config.validation&&(Array.isArray(s.config.validation)&&s.config.validation.forEach(o=>{if(!o.value.includes(":"))return;const u=o.value.split(":")[0];let l=o.value.split(":")[1],c;if(u.includes("required_")||u.includes("same")){if(l.includes("_parent"))l=l.split("_parent.").pop(),c=`${u}:${l}`;else if(!l.includes(","))c=`${u}:${i}.*.${l}`;else{l=l.split(",")[0];const d=o.value.split(":")[1].split(",")[1];c=`${u}:${i}.*.${l},${d}`}o.value=c}}),r.addRule(`${i}.*.${s.config.name}`,s.config.validation)),s.component==="FormInput"&&s.config&&s.config.name&&s.config.dataFormat&&r.addRuleFormat(`${i}.*.${s.config.name}`,s.config.dataFormat)})},r.getValidator=()=>{r.getDataAndRules(r.config),r.validator=new Lt(r.data,r.rules)},r.getErrors=()=>r.failed()?r.validator.errors.errors:{},r.failed=()=>(r.getValidator(),r.validator.fails()),r}const GH={props:["value"],data(){return{display:"running",errorMessage:"",showMessage:!1,variables:[]}},computed:{message(){return this.$t("{{variable}} running.",{variable:this.variables.join(", ")})}},methods:{error(t){this.display="error",this.errorMessage=t},show(t){this.variables.indexOf(t)===-1&&this.variables.push(t),this.display="running",this.errorMessage="",this.showMessage=!1,this.$refs.modal.show()},hide(t){t===-1&&this.variables.splice(0);const e=this.variables.indexOf(t);e>-1&&this.variables.splice(e,1),this.variables.length===0&&this.$refs.modal.hide()}}};var HH=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"watchers-synchronous",title:"","hide-header":"","no-close-on-esc":"","hide-header-close":"","no-close-on-backdrop":""}},[e.display==="running"?r("div",{staticClass:"container text-center"},[r("div",{staticClass:"icon-container m-4"},[r("svg",{staticClass:"lds-gear",attrs:{width:"50%",height:"50%",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"}},[r("g",{attrs:{transform:"translate(50 50)"}},[r("g",{attrs:{transform:"rotate(248.825)"}},[r("animateTransform",{attrs:{attributeName:"transform",type:"rotate",values:"0;360",keyTimes:"0;1",dur:"4.7s",repeatCount:"indefinite"}}),r("path",{attrs:{d:"M37.43995192304605 -6.5 L47.43995192304605 -6.5 L47.43995192304605 6.5 L37.43995192304605 6.5 A38 38 0 0 1 35.67394948182593 13.090810836924174 L35.67394948182593 13.090810836924174 L44.33420351967032 18.090810836924174 L37.83420351967032 29.34914108612188 L29.17394948182593 24.34914108612188 A38 38 0 0 1 24.34914108612188 29.17394948182593 L24.34914108612188 29.17394948182593 L29.34914108612188 37.83420351967032 L18.090810836924184 44.33420351967032 L13.090810836924183 35.67394948182593 A38 38 0 0 1 6.5 37.43995192304605 L6.5 37.43995192304605 L6.500000000000001 47.43995192304605 L-6.499999999999995 47.43995192304606 L-6.499999999999996 37.43995192304606 A38 38 0 0 1 -13.09081083692417 35.67394948182593 L-13.09081083692417 35.67394948182593 L-18.09081083692417 44.33420351967032 L-29.34914108612187 37.834203519670325 L-24.349141086121872 29.173949481825936 A38 38 0 0 1 -29.17394948182592 24.34914108612189 L-29.17394948182592 24.34914108612189 L-37.83420351967031 29.349141086121893 L-44.33420351967031 18.0908108369242 L-35.67394948182592 13.090810836924193 A38 38 0 0 1 -37.43995192304605 6.5000000000000036 L-37.43995192304605 6.5000000000000036 L-47.43995192304605 6.500000000000004 L-47.43995192304606 -6.499999999999993 L-37.43995192304606 -6.499999999999994 A38 38 0 0 1 -35.67394948182593 -13.090810836924167 L-35.67394948182593 -13.090810836924167 L-44.33420351967032 -18.090810836924163 L-37.834203519670325 -29.34914108612187 L-29.173949481825936 -24.34914108612187 A38 38 0 0 1 -24.349141086121893 -29.17394948182592 L-24.349141086121893 -29.17394948182592 L-29.349141086121897 -37.834203519670304 L-18.0908108369242 -44.334203519670304 L-13.090810836924195 -35.67394948182592 A38 38 0 0 1 -6.500000000000005 -37.43995192304605 L-6.500000000000005 -37.43995192304605 L-6.500000000000007 -47.43995192304605 L6.49999999999999 -47.43995192304606 L6.499999999999992 -37.43995192304606 A38 38 0 0 1 13.090810836924149 -35.67394948182594 L13.090810836924149 -35.67394948182594 L18.090810836924142 -44.33420351967033 L29.349141086121847 -37.83420351967034 L24.349141086121854 -29.17394948182595 A38 38 0 0 1 29.17394948182592 -24.349141086121893 L29.17394948182592 -24.349141086121893 L37.834203519670304 -29.349141086121897 L44.334203519670304 -18.0908108369242 L35.67394948182592 -13.090810836924197 A38 38 0 0 1 37.43995192304605 -6.500000000000007 M0 -20A20 20 0 1 0 0 20 A20 20 0 1 0 0 -20"}})],1)])])]),r("h3",{staticClass:"display-6"},[e._v(e._s(e.message))]),r("p",{staticClass:"lead"},[e._v(e._s(e.$t("This window will automatically close when complete.")))])]):r("div",{staticClass:"container text-center"},[r("div",{staticClass:"icon-container m-4"},[r("i",{staticClass:"fas fa-sad-tear fa-10x"})]),r("h3",{staticClass:"display-6"},[e._v(e._s(e.$t("Something has gone wrong.")))]),r("p",{staticClass:"lead"},[e._v(e._s(e.$t("Unfortunately this screen has had an issue. We've notified the administrator."))+" "),r("a",{attrs:{href:"javascript:void(0)","data-cy":"watchers-show-error-message"},on:{click:function(a){e.showMessage=!e.showMessage}}},[r("i",{staticClass:"fas fa-info-circle"})])]),e.showMessage?r("small",{staticClass:"text-danger text-left small"},[e._v(e._s(e.errorMessage))]):e._e()]),r("div",{staticClass:"w-100 text-right",attrs:{slot:"modal-footer"},slot:"modal-footer"},[e.display==="error"?r("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:function(a){return e.hide(-1)}}},[e._v(e._s(e.$t("Close")))]):e._e()])])},YH=[],QH=oe(GH,HH,YH,!1,null,null,null,null);const bx=QH.exports,KH={props:{value:Object}};var JH=function(){var e=this,r=e._self._c;return r("b-alert",{ref:"alert",attrs:{variant:"danger",dismissible:""},model:{value:e.value.show,callback:function(a){e.$set(e.value,"show",a)},expression:"value.show"}},[r("b",[e._v(" "+e._s(e.value.error)+" ")]),r("ul",e._l(e.value.errors,function(a,i){return r("li",{key:`error-${i}`},[e._v(e._s(a))])}),0)])},ZH=[],XH=oe(KH,JH,ZH,!1,null,null,null,null);const Gp=XH.exports,_te="",e7={name:"ScreenRenderer",components:{WatchersSynchronous:bx,ScreenRendererError:Gp},mixins:[ib,ac],props:{loopContext:{type:String,default:""}},data(){return{currentDefinition:null,codigo:"",displayAsyncLoading:!1}},watch:{definition:{deep:!0,handler(t){H.isEmpty(t.config)||this.rebuildScreen(t)}}},mounted(){this.currentDefinition=H.cloneDeep(this.definition),this.component=this.buildComponent(this.currentDefinition)},methods:{rebuildScreen(t){H.isEqual(t,this.currentDefinition)||(this.currentDefinition=H.cloneDeep(t),this.component=this.buildComponent(this.currentDefinition))},onAsyncWatcherOn(){this.displayAsyncLoading=typeof this._parent>"u"},onAsyncWatcherOff(){this.displayAsyncLoading=!1},getCurrentPage(){return this.$refs.component.getCurrentPage()},setCurrentPage(t){this.$refs.component.setCurrentPage(t)}}};var t7=function(){var e=this,r=e._self._c;return r("b-container",{attrs:{fluid:""}},[e.displayAsyncLoading?r("div",{ref:"watchersAsynchronous",staticClass:"alert alert-light",attrs:{role:"alert"}},[r("svg",{staticClass:"lds-gear",attrs:{width:"20px",height:"20px",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"}},[r("g",{attrs:{transform:"translate(50 50)"}},[r("g",{attrs:{transform:"rotate(248.825)"}},[r("animateTransform",{attrs:{attributeName:"transform",type:"rotate",values:"0;360",keyTimes:"0;1",dur:"4.7s",repeatCount:"indefinite"}}),r("path",{attrs:{d:"M37.43995192304605 -6.5 L47.43995192304605 -6.5 L47.43995192304605 6.5 L37.43995192304605 6.5 A38 38 0 0 1 35.67394948182593 13.090810836924174 L35.67394948182593 13.090810836924174 L44.33420351967032 18.090810836924174 L37.83420351967032 29.34914108612188 L29.17394948182593 24.34914108612188 A38 38 0 0 1 24.34914108612188 29.17394948182593 L24.34914108612188 29.17394948182593 L29.34914108612188 37.83420351967032 L18.090810836924184 44.33420351967032 L13.090810836924183 35.67394948182593 A38 38 0 0 1 6.5 37.43995192304605 L6.5 37.43995192304605 L6.500000000000001 47.43995192304605 L-6.499999999999995 47.43995192304606 L-6.499999999999996 37.43995192304606 A38 38 0 0 1 -13.09081083692417 35.67394948182593 L-13.09081083692417 35.67394948182593 L-18.09081083692417 44.33420351967032 L-29.34914108612187 37.834203519670325 L-24.349141086121872 29.173949481825936 A38 38 0 0 1 -29.17394948182592 24.34914108612189 L-29.17394948182592 24.34914108612189 L-37.83420351967031 29.349141086121893 L-44.33420351967031 18.0908108369242 L-35.67394948182592 13.090810836924193 A38 38 0 0 1 -37.43995192304605 6.5000000000000036 L-37.43995192304605 6.5000000000000036 L-47.43995192304605 6.500000000000004 L-47.43995192304606 -6.499999999999993 L-37.43995192304606 -6.499999999999994 A38 38 0 0 1 -35.67394948182593 -13.090810836924167 L-35.67394948182593 -13.090810836924167 L-44.33420351967032 -18.090810836924163 L-37.834203519670325 -29.34914108612187 L-29.173949481825936 -24.34914108612187 A38 38 0 0 1 -24.349141086121893 -29.17394948182592 L-24.349141086121893 -29.17394948182592 L-29.349141086121897 -37.834203519670304 L-18.0908108369242 -44.334203519670304 L-13.090810836924195 -35.67394948182592 A38 38 0 0 1 -6.500000000000005 -37.43995192304605 L-6.500000000000005 -37.43995192304605 L-6.500000000000007 -47.43995192304605 L6.49999999999999 -47.43995192304606 L6.499999999999992 -37.43995192304606 A38 38 0 0 1 13.090810836924149 -35.67394948182594 L13.090810836924149 -35.67394948182594 L18.090810836924142 -44.33420351967033 L29.349141086121847 -37.83420351967034 L24.349141086121854 -29.17394948182595 A38 38 0 0 1 29.17394948182592 -24.349141086121893 L29.17394948182592 -24.349141086121893 L37.834203519670304 -29.349141086121897 L44.334203519670304 -18.0908108369242 L35.67394948182592 -13.090810836924197 A38 38 0 0 1 37.43995192304605 -6.500000000000007 M0 -20A20 20 0 1 0 0 20 A20 20 0 1 0 0 -20"}})],1)])]),e._v(" "+e._s(e.$t("Loading..."))+" ")]):e._e(),r(e.component,{ref:"component",tag:"component",attrs:{vdata:e.value,_parent:e._parent,"_initial-page":e.currentPage},on:{submit:e.submit,asyncWatcherTriggered:e.onAsyncWatcherOn,asyncWatcherCompleted:e.onAsyncWatcherOff}}),e.showErrors&&e.building.error?r("screen-renderer-error",{model:{value:e.building,callback:function(a){e.building=a},expression:"building"}}):e._e(),r("watchers-synchronous",{ref:"watchersSynchronous"})],1)},r7=[],a7=oe(e7,t7,r7,!1,null,null,null,null);const yx=a7.exports,wte="",i7={name:"VueFormRenderer",components:{ScreenRenderer:yx,CustomCssOutput:BH},mixins:[ac,ph],model:{prop:"data",event:"update"},props:["config","data","_parent","page","computed","customCss","mode","watchers","isLoop","ancestorScreens","loopContext","showErrors","testScreenDefinition","deviceScreen"],data(){return{definition:{config:this.config,computed:this.computed,customCss:this.customCss,watchers:this.watchers,isMobile:!1},formSubmitErrorClass:"",watchers_config:{api:{execute:null,execution:null}},customCssWrapped:"",customFunctions:{formatCurrency(){const t=(e,r)=>{const a=du.find(n=>n.code===r),i={alias:"currency"};if(a){const n=a.format.match(/[.,]/g);n.length===0?n.push("","."):n.length===1&&n.push(n[0]==="."?",":"."),i.digits=(a.format.split(n[1])[1]||"").length,i.radixPoint=n[1],i.groupSeparator=n[0],i.prefix=`${a.symbol} `,i.suffix=` ${a.code}`}return db.format(e,i)};return function(e){const r=JSON.parse(`[${e}]`);return t(H.get(this,r[0]),r[1])}}},scrollable:null,containerObserver:null}},computed:{containerClass(){return this.parentScreen?`screen-${this.parentScreen}`:"custom-css-scope"},cssDevice(){return{"--mobile-width":dh}},containerDeviceClass(){return this.deviceScreen==="mobile"?"container-mobile":"container-desktop"}},watch:{customCss(t){this.definition.customCss=t,this.parseCss()},config:{deep:!0,handler(t){this.definition.config=t,this.$nextTick(()=>{this.registerCustomFunctions()})}},data:{deep:!0,handler(){this.$emit("update",this.data);const t=this.getMainScreen();t&&this.validate(t)}},computed:{deep:!0,handler(t){this.definition.computed=t}},watchers:{deep:!0,handler(t){this.definition.watchers=t}}},created(){this.parseCss=H.debounce(this.parseCss,500,{leading:!0}),this.containerObserver=new ResizeObserver(this.onContainerObserver)},mounted(){this.registerCustomFunctions(),window.ProcessMaker&&window.ProcessMaker.EventBus&&window.ProcessMaker.EventBus.$emit("screen-renderer-init",this),this.scrollable=qH(this.$el),this.containerObserver.observe(this.$refs.formRendererContainer)},methods:{...Pt.mapActions("globalErrorsModule",["validate","hasSubmitted","showValidationOnLoad","restartValidation"]),getMainScreen(){return this.$refs.renderer&&this.$refs.renderer.$refs.component},countElements(t){const e={config:t};return this.$refs.renderer.countElements(e)},checkForRecordList(t,e){return t.forEach(r=>{r.items&&this.checkForRecordList(r.items,e),r.component==="FormRecordList"&&this.removeRecordListForms(r,e)}),e},removeRecordListForms(t,e){const r=t.config.form;return delete e[r],e},checkForNestedScreenErrors(t){if(t.$options._componentTag==="FormNestedScreen")return t.errors()},isValid(){const t=VH(this.definition.config),e=H.cloneDeep(this.definition.config);return this.checkForRecordList(t,e),this.dataTypeValidator=UH(e,this.data),this.errors=this.dataTypeValidator.getErrors(),this.errors&&(this.formSubmitErrorClass="invalid-form-submission"),H.size(this.errors)===0},registerCustomFunctions(t=this){t.registerCustomFunction instanceof Function&&Object.keys(this.customFunctions).forEach(e=>{t.registerCustomFunction(e,this.customFunctions[e])}),t.$children instanceof Array&&t.$children.forEach(e=>this.registerCustomFunctions(e))},submit(t,e=!1,r=null){this.$emit("submit",this.data,e,r)},parseCss(){const t=`.${this.containerClass}`;try{const e=Ya.parse(this.customCss,{onParseError(i){throw i.formattedMessage}});let r=0;Ya.walk(e,function(i,n,s){if(i.type.match(/^.+Selector$/)&&i.name!==t&&s&&(n.prev||(s.prependData({type:"WhiteSpace",loc:null,value:" "}),s.prependData({type:"TypeSelector",loc:null,name:t}))),r>5e3)throw Error("CSS is too long");r+=1});const a=[];Ya.walk(e,{visit:"Atrule",enter:(i,n,s)=>{if(!n.prev&&i.name==="media"){const o={minWidth:0,maxWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),rules:[]};Ya.walk(i.prelude,{visit:"MediaFeature",enter:u=>{["min-width","max-width"].includes(u.name)&&(o[H.camelCase(u.name)]=parseInt(u.value.value,10),o.rules.length===0&&Ya.walk(i.block,{visit:"Rule",enter:l=>{const c=Ya.generate(l);o.rules.push(c)}}),a.push(o))}}),s.remove(n)}}}),this.customCssWrapped=Ya.generate(e),a.forEach(i=>{const{width:n}=this.$refs.formRendererContainer.getBoundingClientRect();n>=i.minWidth&&n<=i.maxWidth&&(this.customCssWrapped+=i.rules.join(" "))}),this.$emit("css-errors","")}catch(e){this.$emit("css-errors",e)}},getCurrentPage(){return this.$refs.renderer.getCurrentPage()},setCurrentPage(t){this.$refs.renderer.setCurrentPage(t)},onContainerObserver(t){t[0].target.getBoundingClientRect(),this.parseCss()}}};var n7=function(){var e=this,r=e._self._c;return r("div",{ref:"formRendererContainer",class:[e.containerClass,e.containerDeviceClass],style:e.cssDevice,attrs:{id:"vue-form-renderer","data-cy":"screen-renderer-container"}},[r("custom-css-output",[e._v(e._s(e.customCssWrapped))]),r("screen-renderer",{ref:"renderer",staticClass:"p-0",attrs:{value:e.data,_parent:e._parent,definition:e.definition,"current-page":e.currentPage,"data-cy":"screen-renderer","show-errors":e.showErrors,"test-screen-definition":e.testScreenDefinition||!1,"loop-context":e.loopContext},on:{submit:e.submit}})],1)},s7=[],o7=oe(i7,n7,s7,!1,null,"caa03b53",null,null);const Gi=o7.exports,l7={name:"FormLoop",components:{VueFormRenderer:Gi},mixins:[],props:["value","config","transientData","name","mode","formConfig"],data(){return{matrix:[],items:[],additionalItems:0,transientDataCopy:null,parentObjectChanges:[]}},computed:{parentLoopContext(){let t=this.$parent,e=0,r="";for(;!t.loopContext;){if(t=t.$parent,t===this.$root){t=null;break}if(e>100)throw new Error("Loop Error");e++}return t&&(r=t.loopContext),r},rendererConfig(){const{items:t}=this;return[{name:"LoopItem",items:t}]},times(){if(!this.config||!this.config.settings)return[];if(this.config.settings.type==="existing"){const e=H.get(this.transientData,this.name,null);return e?[...e.keys()]:[]}let{times:t}=this.config.settings;try{t=_r.render(t,this.transientData)}catch(e){throw new Error(e)}return t=parseInt(t),Number.isNaN(t)?[]:(t>100&&(t=100),t+=this.additionalItems,[...Array(t).keys()])}},watch:{transientData:{handler(){this.transientDataCopy=H.cloneDeep(this.transientData),this.$delete(this.transientDataCopy,this.name);const t=H.get(this,`transientData.${this.name}`,null);t&&Array.isArray(t)?this.matrix=t:this.matrix=[],this.setupMatrix()},immediate:!0},value:{handler(){this.items=this.value},immediate:!0},matrix:{handler(){H.isEqual(this.$parent.transientData[this.name],this.matrix)||this.$set(this.$parent.transientData,this.name,H.cloneDeep(this.matrix))},deep:!0},times(){this.setupMatrix()},"config.settings.times":{handler(){this.additionalItems=0}}},mounted(){this.$set(this.$parent.transientData,this.name,H.cloneDeep(this.matrix))},methods:{getLoopContext(t){let e=`${this.name}.${t.toString()}`;return this.parentLoopContext!==""&&(e=`${this.parentLoopContext}.${e}`),e},add(){this.config.settings.type==="existing"?this.setMatrixValue(this.matrix.length,{}):this.additionalItems++},remove(){this.config.settings.type==="existing"?this.$delete(this.matrix,this.matrix.length-1):this.additionalItems--},removeConfirm(){const t=this.$t("Are you sure you want to delete this?");window.ProcessMaker.confirmModal(this.$t("Caution!"),t,"",()=>{this.remove()})},setMatrixValue(t,e){const r=H.omit(e,"_parent");this.registerParentVariableChanges(e),this.$set(this.matrix,t,r),this.setChagnedParentVariables()},registerParentVariableChanges(t){t._parent&&Object.keys(t._parent).forEach(e=>{H.isEqual(this.transientDataCopy[e],t._parent[e])||this.parentObjectChanges.push({key:e,value:t._parent[e]})})},setChagnedParentVariables(){this.parentObjectChanges.forEach(t=>{this.$set(this.$parent.transientData,t.key,t.value)}),this.parentObjectChanges=[]},getMatrixValue(t){let e=H.cloneDeep(this.matrix[t]);return e||(e={}),e._parent=H.cloneDeep(this.transientDataCopy),e},setupMatrix(){for(const t of this.times)typeof this.matrix[t]>"u"&&this.setMatrixValue(t,{});this.matrix.length!==this.times.length&&(this.matrix=this.matrix.slice(0,this.times.length))},submit(){this.$emit("submit")}}};var u7=function(){var e=this,r=e._self._c;return r("div",[e._l(e.times,function(a){return r("form",{key:a,on:{submit:function(i){i.preventDefault()}}},[r("vue-form-renderer",{attrs:{data:e.getMatrixValue(a),config:e.rendererConfig,computed:null,"custom-css":null,watchers:null,"is-loop":!0,"debug-context":"Loop #"+a,mode:e.mode,"loop-context":e.getLoopContext(a),"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:function(i){return e.$emit("pageNavigate",i)},update:function(i){return e.setMatrixValue(a,i)}}})],1)}),e.config.settings.add?r("b-row",{staticClass:"justify-content-md-center"},[r("b-col",{attrs:{md:"auto"}},[r("b-button",{staticClass:"ml-1 mr-1",attrs:{size:"sm",variant:"secondary",title:e.$t("Add Item")},on:{click:e.add}},[r("i",{staticClass:"fas fa-plus"})]),e.times.length>0?r("b-button",{staticClass:"ml-1 mr-1",attrs:{size:"sm",variant:"outline-danger",title:e.$t("Delete Item")},on:{click:e.removeConfirm}},[r("i",{staticClass:"fas fa-minus"})]):e._e()],1)],1):e._e()],2)},c7=[],d7=oe(l7,u7,c7,!1,null,null,null,null);const xs=d7.exports,Cte="",pu=typeof window>"u"?global:window,Hp=[{name:"empty",items:[]}],p7={components:{VueFormRenderer:Gi},props:{name:String,screen:Number,value:null,validationData:null,_parent:null,ancestorScreens:{type:Array,default:()=>[]}},data(){return{localData:{},config:Hp,computed:[],customCSS:null,watchers:[],screenTitle:null}},computed:{validatedConfig(){return this.config&&this.config[0]?this.config:Hp},data:{get(){return this.validationData||this.localData},set(t){Object.keys(t).forEach(e=>{this.validationData&&this.$set(this.validationData,e,t[e])})}},placeholder(){return this.screen?"":this.$t("Select a screen to nest")}},methods:{isSubmitButton(t){return t.config&&t.component==="FormButton"&&t.config.event==="submit"},hideSubmitButtons(t){t.forEach(e=>{Array.isArray(e)&&this.hideSubmitButtons(e),e.items&&this.hideSubmitButtons(e.items),this.isSubmitButton(e)&&(e.config.hidden=!0)})},disableForm(t){t.forEach(e=>{Array.isArray(e)&&this.disableForm(e),e.items&&this.disableForm(e.items),e&&e.config&&(e.config.disabled=!0,e.config.readonly=!0,e.config.editable=!1)})},loadScreen(t){this.config=Hp,this.computed=[],this.customCSS=null,this.watchers=[],this.screenTitle=null,t&&this.$dataProvider.getScreen(t).then(e=>{this.config=e.data.config,this.hideSubmitButtons(this.config),this.computed=e.data.computed,this.customCSS=e.data.custom_css,this.watchers=e.data.watchers,this.screenTitle=e.data.title,this.$attrs.disabled&&this.disableForm(this.config),this.ancestorScreens.includes(this.screenTitle)?pu.ProcessMaker.alert(`Rendering of nested "${this.screenTitle}" screen was disallowed to prevent loop.`,"warning"):(pu.nestedScreens||(pu.nestedScreens={}),pu.nestedScreens["id_"+t]=this.config,this.$root.$emit("nested-screen-updated"))})},errors(){return this.$refs.nestedScreen.isValid(),this.$refs.nestedScreen.errors}},watch:{screen(t){this.loadScreen(t)}},mounted(){this.loadScreen(this.screen)}};var f7=function(){var e=this,r=e._self._c;return e.ancestorScreens.includes(e.screenTitle)?e._e():r("vue-form-renderer",{ref:"nestedScreen",staticClass:"form-nested-screen",attrs:{placeholder:e.placeholder,config:e.validatedConfig,"ancestor-screens":[...e.ancestorScreens,e.screenTitle],mode:"preview",computed:e.computed,"custom-css":e.customCSS,watchers:e.watchers,"debug-context":"Nested Screen",_parent:e._parent},on:{"css-errors":function(a){e.cssErrors=a}},model:{value:e.data,callback:function(a){e.data=a},expression:"data"}})},h7=[],m7=oe(p7,f7,h7,!1,null,null,null,null);const ks=m7.exports,Tte="",g7={key:"__actions",label:"Actions",thClass:"text-right",tdClass:"text-right"},v7={components:{VueFormRenderer:Gi},mixins:[Md],props:["name","label","fields","value","editable","_config","form","validationData","formConfig","formComputed","formWatchers","_perPage"],data(){return{editFormVersion:0,single:"",plural:"",addItem:{},editItem:{},editIndex:null,currentPage:1,paginatorPage:1,perPageSelectEnabled:!1,perPage:5,lastPage:1,css:{tableClass:"table table-hover table-responsive text-break mb-0 d-table",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending",renderIcon(t){return`<i class="${t.join(" ")}"></i>`}},initFormValues:{},currentRowIndex:null}},computed:{popupConfig(){const t=[];return t[this.form]=this.formConfig[this.form],t},debug(){return{perPageSelectEnabled:this.perPageSelectEnabled,perPageSelectEnabled2:this.$refs.pagination&&this.$refs.pagination.perPageSelectEnabled}},parentObj(){let t=this.$parent;for(;"transientData"in t.$props;)t=t.$parent;return t},dataManager(){if(this.$refs.vuetable){const t=this.$refs.vuetable.makePagination(this.value.length);return{pagination:t,data:this.value.slice(t.from-1,t.to)}}console.log("refs vuetable not exists")},tableData(){const t=this.value||[],e=this.paginatorPage-1;return this.lastPage=Math.ceil(t.length/this.perPage),{total:t.length,per_page:this.perPage,current_page:this.paginatorPage,last_page:this.lastPage,next_page_url:null,prev_page_url:null,from:e,to:t.length,data:t,lastSortConfig:!1}},tableFields(){const t=this.getTableFieldsFromDataSource();return this.editable&&!this.selfReferenced&&t.push(g7),t},selfReferenced(){return this.form&&this.form===this.$parent.currentPage}},watch:{"tableData.total":{deep:!0,handler(t){const e=Math.ceil(t/this.perPage);this.currentPage=this.currentPage>e?e:this.currentPage,this.currentPage=this.currentPage==0?1:this.currentPage}}},mounted(){this._perPage&&(this.perPage=this._perPage),this.updateRowDataNamePrefix=H.debounce(this.updateRowDataNamePrefix,100)},methods:{updateRowDataNamePrefix(){this.setUploadDataNamePrefix(this.currentRowIndex)},emitShownEvent(){window.ProcessMaker.EventBus.$emit("modal-shown")},formatIfDate(t){return ee.dateUtils.formatIfDate(t)},isImage(t,e){const r=H.get(e,t.key);return typeof r=="string"&&r.substr(0,11)==="data:image/"},isWebEntryFile(t,e){const r=H.get(e,t.key),a=/^webentry_.*:*$/;let i=r;return Array.isArray(r)&&(i=r[0].file),a.test(i)},formatIfWebEntryFile(t,e){return H.get(window,"PM4ConfigOverrides.requestFiles",{})[`${t.key}.${e.row_id}`].map(i=>i.file_name).join(", ")},isFiledownload(t){return t.key==="__filedownload"},setUploadDataNamePrefix(t=null){this.currentRowIndex=t;let e=null;t!==null&&this.editItem?e=this.editItem.row_id:this.addItem&&(e=this.addItem.row_id),this.$root.$emit("set-upload-data-name",this,t,e)},getTableFieldsFromDataSource(){const{jsonData:t,key:e,value:r,dataName:a}=this.fields,i=n=>({key:n[e||"value"],sortable:!0,label:n[r||"content"],tdClass:"table-column"});return this.getValidFieldData(t,a).map(i)},getValidFieldData(t,e){let r=this.validationData[e];if(t)try{r=JSON.parse(t)}catch{r=[]}return Array.isArray(r)?r:[]},hideInformation(){this.$refs.infoModal.hide()},onPaginationData(t){this.$refs.pagination.setPaginationData(t)},onChangePerPage(t){this.perPage=parseInt(t)},onChangePage(t){t=="next"?this.paginatorPage+=1:t=="prev"?this.paginatorPage-=1:this.paginatorPage=t,this.paginatorPage<=0&&(this.paginatorPage=1),this.paginatorPage>this.lastPage&&(this.paginatorPage=this.lastPage)},showEditForm(t,e){const r=(this.currentPage-1)*this.perPage+t;this.editItem=JSON.parse(JSON.stringify(H.find(this.tableData.data,{row_id:e}))),this.editIndex=r,this.editFormVersion++,this.$nextTick(()=>{this.setUploadDataNamePrefix(r),this.$refs.editModal.show()})},edit(t){if(this.$refs.addRenderer.hasSubmitted(!0),this.$refs.editRenderer.$refs.renderer.$refs.component.$v.vdata.$invalid){t.preventDefault();return}const e=this.tableData.data?JSON.parse(JSON.stringify(this.tableData.data)):[],r=H.findIndex(e,{row_id:this.editItem.row_id});e[r]=JSON.parse(JSON.stringify(this.editItem)),delete e[r]._parent,this.$emit("input",e)},showAddForm(){const t=Math.random().toString(36).substring(2)+Date.now().toString(36);if(this.$set(this.addItem,"row_id",t),this.setUploadDataNamePrefix(),!this.form){this.$refs.infoModal.show();return}this.$refs.addModal.show();const{_parent:e,...r}=this.addItem;this.initFormValues=H.cloneDeep(r)},handleHideAddModal(){this.addItem=this.initFormValues,this.$refs.addRenderer.hasSubmitted(!1)},async handleOk(t){if(this.$refs.addRenderer.hasSubmitted(!0),t.preventDefault(),this.$refs.addRenderer.$refs.renderer.$refs.component.$v.vdata.$invalid)return;const e=this.value?JSON.parse(JSON.stringify(this.value)):[],r=JSON.parse(JSON.stringify({...this.addItem,_parent:void 0}));delete r._parent,e[e.length]=r,this.$emit("input",e),this.addItem={},this.$nextTick(()=>{this.$refs.addModal.hide()})},showDeleteConfirmation(t,e){this.deleteIndex=H.find(this.tableData.data,{row_id:e}),this.$refs.deleteModal.show()},downloadFile(t,e,r){const a=this.$root.task.request_data._request.id,i=`${this.name}.${r}.${e}`;window.ProcessMaker.apiClient.get(`requests/${a}/files?name=${i}`).then(n=>{const s=n.data;if(s&&s.data&&s.data.length){const o=s.data[0];this.downloadRecordListFile(o,a)}})},downloadRecordListFile(t,e){window.ProcessMaker.apiClient({baseURL:"/",url:`/request/${e}/files/${t.id}`,method:"GET",responseType:"blob"}).then(r=>{const a=window.URL.createObjectURL(new Blob([r.data])),i=document.createElement("a");i.href=a,i.setAttribute("download",t.file_name),document.body.appendChild(i),i.click()})},remove(){const t=this.tableData.data?JSON.parse(JSON.stringify(this.tableData.data)):[],e=this.deleteIndex;H.remove(t,{row_id:this.deleteIndex.row_id}),this.$emit("input",t),this.$root.$emit("removed-record",this,e)}}};var b7=function(){var e=this,r=e._self._c;return r("div",{staticClass:"data-table overflow-auto"},[r("div",{staticClass:"row mb-2 ml-0 mr-0"},[r("div",{staticClass:"col"},[r("h4",[e._v(e._s(e.label))])]),r("div",{staticClass:"col text-right"},[e.editable&&!e.selfReferenced?r("button",{staticClass:"btn btn-primary",attrs:{"data-cy":"add-row"},on:{click:e.showAddForm}},[e._v(" "+e._s(e.$t("Add"))+" ")]):e._e()])]),e.value?[r("b-table",{ref:"vuetable",attrs:{"per-page":e.perPage,"data-manager":e.dataManager,fields:e.tableFields,items:e.tableData.data,"sort-compare-options":{numeric:!1},"sort-null-last":!0,"sort-icon-left":"",css:e.css,"empty-text":e.$t("No Data Available"),"current-page":e.currentPage,"data-cy":"table"},scopedSlots:e._u([{key:"cell()",fn:function({index:a,field:i,item:n}){return[e.isFiledownload(i,n)?[r("span",{attrs:{href:"#"},on:{click:function(s){return e.downloadFile(n,i.key,a)}}},[e._v(e._s(e.mustache(i.key,n)))])]:e.isImage(i,n)?[r("img",{staticStyle:{},attrs:{src:e.mustache(i.key,n)}})]:e.isWebEntryFile(i,n)?[e._v(" "+e._s(e.formatIfWebEntryFile(i,n))+" ")]:[e._v(" "+e._s(e.formatIfDate(e.mustache(i.key,n)))+" ")]]}},{key:"cell(__actions)",fn:function({index:a,item:i}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"btn-group btn-group-sm",attrs:{role:"group","aria-label":"Actions"}},[r("button",{staticClass:"btn btn-primary",attrs:{title:e.$t("Edit"),"data-cy":"edit-row"},on:{click:function(n){return e.showEditForm(a,i.row_id)}}},[r("i",{staticClass:"fas fa-edit"})]),r("button",{staticClass:"btn btn-danger",attrs:{title:e.$t("Delete"),"data-cy":"remove-row"},on:{click:function(n){return e.showDeleteConfirmation(a,i.row_id)}}},[r("i",{staticClass:"fas fa-trash-alt"})])])])]}}])}),e.tableData.total>e.perPage?r("b-pagination",{attrs:{"data-cy":"table-pagination","total-rows":e.tableData.total,"per-page":e.perPage,"aria-label":e.$t("Pagination"),"aria-controls":"vuetable"},on:{change:e.onChangePage},model:{value:e.currentPage,callback:function(a){e.currentPage=a},expression:"currentPage"}}):e._e()]:r("div",[e._v(" "+e._s(e.$t("This record list is empty or contains no data."))+" ")]),e.editable&&!e.selfReferenced?r("b-modal",{ref:"addModal",attrs:{static:!0,size:"lg","ok-title":e.$t("Ok"),"cancel-title":e.$t("Cancel"),title:e.$t("Add"),"header-close-content":"&times;","data-cy":"modal-add"},on:{ok:e.handleOk,hidden:e.handleHideAddModal,shown:e.emitShownEvent}},[r("vue-form-renderer",{key:Array.isArray(e.value)?e.value.length:0,ref:"addRenderer",attrs:{page:0,config:e.popupConfig,"current-page":e.form,computed:e.formComputed,watchers:e.formWatchers,"debug-context":"Record List Add",_parent:e.validationData},on:{update:e.updateRowDataNamePrefix},model:{value:e.addItem,callback:function(a){e.addItem=a},expression:"addItem"}})],1):e._e(),e.editable&&!e.selfReferenced?r("b-modal",{ref:"editModal",attrs:{static:!0,size:"lg","ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),title:e.$t("Edit Record"),"header-close-content":"&times;","data-cy":"modal-edit"},on:{ok:e.edit,hidden:function(a){return e.$refs.addRenderer.hasSubmitted(!1)},shown:e.emitShownEvent}},[r("vue-form-renderer",{key:e.editFormVersion,ref:"editRenderer",attrs:{page:0,config:e.popupConfig,"current-page":e.form,computed:e.formComputed,watchers:e.formWatchers,"debug-context":"Record List Edit",_parent:e.validationData},on:{update:e.updateRowDataNamePrefix},model:{value:e.editItem,callback:function(a){e.editItem=a},expression:"editItem"}})],1):e._e(),e.editable&&!e.selfReferenced?r("b-modal",{ref:"deleteModal",attrs:{size:"lg","ok-title":e.$t("Delete"),"cancel-title":e.$t("Cancel"),title:e.$t("Delete Record"),"header-close-content":"&times;","data-cy":"modal-remove"},on:{ok:e.remove}},[r("p",[e._v(e._s(e.$t("Are you sure you want to remove this record?")))])]):e._e(),e.editable&&!e.selfReferenced?r("b-modal",{ref:"infoModal",attrs:{size:"sm","ok-title":e.$t("OK"),title:e.$t("Information form"),"header-close-content":"&times;","ok-only":"","data-cy":"modal-not-assigned"},on:{ok:e.hideInformation}},[r("p",[e._v(e._s(e.$t("The form to be displayed is not assigned.")))])]):e._e(),e.editable&&e.selfReferenced?r("div",{staticClass:"alert alert-danger"},[e._v(" "+e._s(e.$t("The Record List control is not allowed to reference other controls on its own page to add or edit records. Specify a secondary page with controls to enter records."))+" ")]):e._e()],2)},y7=[],S7=oe(v7,b7,y7,!1,null,null,null,null);const fu=S7.exports,x7={name:"FormRecordListStatic",components:{},mixins:[Md],props:["label","fields","value","editable","_config","form"],mounted(){},methods:{formatIfDate(t){return ee.formatIfDate(t)}}};var k7=function(){var e=this,r=e._self._c;return r("div",{staticClass:"record-list"},[r("h4",[e._v(e._s(e.$t(e.label)))]),r("table",[r("thead",[r("tr",e._l(e.fields,function(a,i){return r("th",{key:i},[e._v(" "+e._s(a.content)+" ")])}),0)]),r("tbody",e._l(e.value,function(a,i){return r("tr",{key:i},e._l(e.fields,function(n,s){return r("td",{key:s},[e._v(" "+e._s(e.formatIfDate(e.mustache(n.value,a)))+" ")])}),0)}),0)])])},_7=[],w7=oe(x7,k7,_7,!1,null,null,null,null);const Sx=w7.exports,C7={props:["label","fontSize","fontWeight","textAlign","verticalAlign","validationData","color","name"],computed:{styles(){return{fontSize:this.fontSize,fontWeight:this.fontWeight,textAlign:this.textAlign,verticalAlign:this.verticalAlign,color:this.color}},rendered(){if(!this.validationData)return this.label;try{return _r.render(this.label,this.validationData)}catch{return this.label}}}};var T7=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",{style:e.styles,domProps:{innerHTML:e._s(e.rendered)}})])},A7=[],O7=oe(C7,T7,A7,!1,null,null,null,null);const hu=O7.exports,E7={};var M7=function(){var e=this,r=e._self._c;return r("div",{staticClass:"row"},[e._t("default")],2)},$7=[],P7=oe(E7,M7,$7,!1,null,null,null,null);const Yp=P7.exports,D7="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ2IiBoZWlnaHQ9IjE1MyIgdmlld0JveD0iMCAwIDE0NiAxNTMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMTUuMDAxIDMzLjQ5OTZDMTE1LjAwMSA0MC4xMjczIDEyMC4zNzQgNDUuNSAxMjcuMDAxIDQ1LjVDMTMzLjYyOCA0NS41IDEzOS4wMDEgNDAuMTI3MyAxMzkuMDAxIDMzLjQ5OTZDMTM5LjAwMSAyNi44NzI3IDEzMy42MjggMjEuNSAxMjcuMDAxIDIxLjVDMTIwLjM3NCAyMS41IDExNS4wMDEgMjYuODcyNyAxMTUuMDAxIDMzLjQ5OTZaIiBmaWxsPSIjN0NEMEIwIi8+CjxwYXRoIGQ9Ik0xMjcuOTA3IDI2LjkzMjNMMTI5LjEwOCAzMC42MzA0SDEzMi45OThDMTMzLjYwMyAzMC42MzA0IDEzMy44NTYgMzEuNDA1MyAxMzMuMzY1IDMxLjc2MjFMMTMwLjIxOSAzNC4wNDc0TDEzMS40MjEgMzcuNzQ2NEMxMzEuNjA4IDM4LjMyMTkgMTMwLjk0OSAzOC44MDA3IDEzMC40NTkgMzguNDQ1N0wxMjcuMzEyIDM2LjE1ODdMMTI0LjE2NiAzOC40NDU3QzEyMy42NzcgMzguODAwNyAxMjMuMDE3IDM4LjMyMTkgMTIzLjIwNCAzNy43NDY0TDEyNC40MDYgMzQuMDQ3NEwxMjEuMjYgMzEuNzYyMUMxMjAuNzcgMzEuNDA1MyAxMjEuMDIyIDMwLjYzMDQgMTIxLjYyNyAzMC42MzA0SDEyNS41MTZMMTI2LjcxOCAyNi45MzIzQzEyNi45MDYgMjYuMzU1OSAxMjcuNzIgMjYuMzU1OSAxMjcuOTA3IDI2LjkzMjNaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNODIuMzQ5MSAwLjc5Mjk2OUM3OS44NTk3IDguMjYwOTcgNzQuMTkwNCA5LjA5MDI5IDc0LjE5MDQgOS4wOTAyOUM3NC4xOTA0IDkuMDkwMjkgNzkuODU5NyA5LjkyMDk3IDgyLjM0OTEgMTcuMzg3NkM4NC44Mzg0IDkuOTIwOTcgOTAuNTA3OCA5LjA5MDI5IDkwLjUwNzggOS4wOTAyOUM5MC41MDc4IDkuMDkwMjkgODQuODM4NCA4LjI2MDk3IDgyLjM0OTEgMC43OTI5NjlaIiBmaWxsPSIjREVFRkZBIi8+CjxwYXRoIGQ9Ik00OS4zNTA0IDEzNS43OTNDNDYuODU5OCAxNDMuMjYxIDQxLjE5MDQgMTQ0LjA5IDQxLjE5MDQgMTQ0LjA5QzQxLjE5MDQgMTQ0LjA5IDQ2Ljg1OTggMTQ0LjkyIDQ5LjM1MDQgMTUyLjM4OEM1MS44Mzg0IDE0NC45MiA1Ny41MDkxIDE0NC4wOSA1Ny41MDkxIDE0NC4wOUM1Ny41MDkxIDE0NC4wOSA1MS44Mzg0IDE0My4yNjEgNDkuMzUwNCAxMzUuNzkzWiIgZmlsbD0iI0RFRUZGQSIvPgo8cGF0aCBkPSJNMTM5LjkwMiA5My43OTNDMTM4LjE1OCA5OS4wMjEgMTM0LjE5IDk5LjYwMjMgMTM0LjE5IDk5LjYwMjNDMTM0LjE5IDk5LjYwMjMgMTM4LjE1OCAxMDAuMTgyIDEzOS45MDIgMTA1LjQwOUMxNDEuNjQ1IDEwMC4xODIgMTQ1LjYxMyA5OS42MDIzIDE0NS42MTMgOTkuNjAyM0MxNDUuNjEzIDk5LjYwMjMgMTQxLjY0NSA5OS4wMjEgMTM5LjkwMiA5My43OTNaIiBmaWxsPSIjREVFRkZBIi8+CjxwYXRoIGQ9Ik04LjkwMTEyIDMwLjc5M0M3LjE1OTc5IDM2LjAxOTYgMy4xOTA0MyAzNi42MDEgMy4xOTA0MyAzNi42MDFDMy4xOTA0MyAzNi42MDEgNy4xNTk3OSAzNy4xODEgOC45MDExMiA0Mi40MDc2QzEwLjY0MzggMzcuMTgxIDE0LjYxMzEgMzYuNjAxIDE0LjYxMzEgMzYuNjAxQzE0LjYxMzEgMzYuNjAxIDEwLjY0MzggMzYuMDE5NiA4LjkwMTEyIDMwLjc5M1oiIGZpbGw9IiNERUVGRkEiLz4KPHBhdGggZD0iTTEyMS45NTYgNzUuNjcwMkMxMjEuOTU2IDEwNC44NzYgOTguMjc4NSAxMjguNTUzIDY5LjA3MzIgMTI4LjU1M0MzOS44Njc5IDEyOC41NTMgMTYuMTkwNCAxMDQuODc2IDE2LjE5MDQgNzUuNjcwMkMxNi4xOTA0IDQ2LjQ2NDkgMzkuODY3OSAyMi43OTMgNjkuMDczMiAyMi43OTNDOTguMjc4NSAyMi43OTMgMTIxLjk1NiA0Ni40NjQ5IDEyMS45NTYgNzUuNjcwMloiIGZpbGw9IiNERUVGRkEiLz4KPHBhdGggZD0iTTQ3LjYzNjQgODEuOTYyNUw2My4yNDYzIDkzLjM2ODdDNjQuNzg5NyA5NC40OTYyIDY2Ljk1NyA5NC4yMDA3IDY4LjEzOTMgOTIuNjk1NUw5MS42OTA4IDYyLjc4NDFDOTIuOTA1OCA2MS4yMzUxIDkyLjY0MzEgNTkuMDAyMSA5MS4wOTQxIDU3Ljc4N0M4OS41NTA3IDU2LjU3MTkgODcuMzE3NiA1Ni44MzQ3IDg2LjEwMjYgNTguMzc4MUw2NC42NzQ3IDg1LjYwMjFMNTEuODM0NiA3Ni4yMTU1QzUwLjI0NzMgNzUuMDYwNiA0OC4wMTk2IDc1LjQwNTUgNDYuODU5MiA3Ni45OTI3QzQ1LjcwNDQgNzguNTc5OSA0Ni4wNDkyIDgwLjgwMjEgNDcuNjM2NCA4MS45NjI1WiIgZmlsbD0iIzREODJDNiIvPgo8cGF0aCBkPSJNMC40MDAzOTEgMTI1Ljc1QzAuNDAwMzkxIDEzMy42MiA2Ljc4MDM5IDE0MCAxNC42NTEgMTQwQzIyLjUyMjUgMTQwIDI4LjkwMzQgMTMzLjYyIDI4LjkwMzQgMTI1Ljc1QzI4LjkwMzQgMTE3Ljg3OSAyMi41MjI1IDExMS41IDE0LjY1MSAxMTEuNUM2Ljc4MDM5IDExMS41IDAuNDAwMzkxIDExNy44NzkgMC40MDAzOTEgMTI1Ljc1WiIgZmlsbD0iIzc3QTlGMiIvPgo8cGF0aCBkPSJNMTYuMzE4NyAxMzAuMzI5QzE0LjE2MjUgMTMwLjM2NiAxMS45Nzk0IDEzMC4zOTUgOS45OTY5NSAxMzAuMjU4QzkuMzY5ODggMTMwLjIxNSA4LjgyNyAxMjkuMjE3IDkuNTg5MzQgMTI4LjkwM0M5LjI2ODY0IDEyOC43MzggOC45NDM1IDEyOC41NzkgOC44MDM3NSAxMjguMjE5QzguNjcxMTcgMTI3Ljg4IDguODI5NyAxMjcuNDE3IDkuMTg1MzQgMTI3LjMzQzguNDM3MzMgMTI3LjUxNCA4LjE0MjYxIDEyNi4zMjggOC43MjU3OCAxMjUuOTQ1QzguNDE2NzMgMTI1LjY4MiA4LjE1OTY1IDEyNS4zMzUgOC4wOTUxNSAxMjQuOTM1QzguMDI5NzUgMTI0LjUzNCA4LjE5MzY4IDEyNC4wODIgOC41NTAyMiAxMjMuODg4QzguNzg0MDMgMTIzLjc2MSA5LjA2MDg0IDEyMy43NTcgOS4zMjY4OSAxMjMuNzU1QzEwLjIyMzYgMTIzLjc0OCAxMS4xMjAzIDEyMy43NDEgMTIuMDE3IDEyMy43MzRDMTEuNzc0MiAxMjIuMzMyIDExLjcwMDggMTIwLjgwMyAxMi40MTM4IDExOS41NzFDMTIuNjI4OCAxMTkuMTk5IDEzLjIwNTggMTE4Ljc1NSAxMy42NjM1IDExOS4wNEMxNC4wOTI2IDExOS4zMDggMTMuOTc0MyAxMTkuOTczIDEzLjk1MTkgMTIwLjM5M0MxMy44NjMzIDEyMi4xMzggMTQuODU1OSAxMjMuODkzIDE2LjM5NzYgMTI0LjcxNUMxNi4zOTc2IDEyNC43MTUgMTYuMjk1NCAxMjguNDMzIDE2LjMxODcgMTMwLjMyOVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xNy4xMDI1IDEzMC4zMTVIMjAuMzYxNVYxMjQuNzA3SDE3LjEwMjVWMTMwLjMxNVoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=",Ate="",I7={props:["title","link","url"],data(){return{linkText:`View All ${this.link}`}},methods:{openLink(){window.open(this.url,"_blank")}}};var z7=function(){var e=this,r=e._self._c;return r("div",{staticClass:"container content"},[r("img",{attrs:{src:D7,alt:"empty table"}}),r("span",{staticClass:"title"},[e._v(" "+e._s(e.$t(e.title))+" ")]),e.url!==""?r("b-link",{on:{click:function(a){return e.openLink()}}},[e._v(" "+e._s(e.$t(e.linkText))+" ")]):e._e()],1)},L7=[],j7=oe(I7,z7,L7,!1,null,"7665402d",null,null);const Qp=j7.exports,N7=vn(),R7={components:{formEmpty:Qp},mixins:[N7,ic],data(){return{countInProgress:"0",countOverdue:"0",countResponse:"0",fields:[],data:[],tableData:[],orderBy:"ID",order_direction:"DESC",status:"",showTable:!0,sortOrder:[{field:"ID",sortField:"ID",direction:"DESC"}],tasksPreview:window.SharedComponents&&window.SharedComponents.TasksHome||{}}},computed:{noDataUrl(){var t,e;return`${(e=(t=window.ProcessMaker)==null?void 0:t.app)==null?void 0:e.url}/tasks`}},mounted(){this.setFields(),this.pmql=`(user_id = ${ProcessMaker.user.id}) AND (status = "In Progress")`,this.fetch(),this.$root.$on("dropdownSelectionTask",this.fetchData),this.$root.$on("searchTask",this.fetchSearch)},methods:{getSortParam(){return this.sortOrder instanceof Array&&this.sortOrder.length>0?`&order_by=${this.sortOrder[0].sortField}&order_direction=${this.sortOrder[0].direction}`:""},fetch(){Vue.nextTick(()=>{let t="",e="";this.pmql!==void 0&&(t=this.pmql),this.filterDropdowns!==void 0&&(e=this.filterDropdowns);let{filter:r}=this,a="";r&&r.length&&(r.isPMQL()?(t=`(${t}) and (${r})`,r=""):a=`&user_id=${window.ProcessMaker.user.id}&filter=${r}&statusfilter=ACTIVE,CLOSED`),this.previousFilter!==r&&(this.page=1),this.previousFilter=r,this.previousPmql!==t&&(this.page=1),this.previousPmql=t;const i=[];ProcessMaker.apiClient.get(`tasks?page=${this.page}&include=process,processRequest,processRequest.user,user,data&pmql=${encodeURIComponent(t)}&per_page=${this.perPage}${a}${this.getSortParam()}&non_system=true&${e}`).then(n=>{this.showTable=n.data.data.length!==0,this.tableData=n.data,this.countResponse=this.tableData.meta.total,this.countOverdue=`${this.tableData.meta.in_overdue}`,i.push(this.countOverdue),this.countInProgress=`${this.tableData.meta.total}`,i.push(this.countInProgress);const s={count:`${this.countResponse}`,showControl:!0,showAvatar:!0,variant:"warning",textColor:"text-warning",colorText:"color: #ff9900",url:"/tasks",dropdownShow:"tasks"};this.$emit("tasksCount",{dataControls:s,tasksDropdown:i})}).catch(()=>{this.tableData=[]})})},getColumns(){const t=[{label:"Task",field:"task",sortable:!0,default:!0},{label:"Request",field:"request",sortable:!0,default:!0}];return this.status==="CLOSED"?t.push({label:"Completed",field:"completed_at",sortable:!0,default:!0}):t.push({label:"Due",field:"due_at",sortable:!0,default:!0}),t},setFields(){this.getColumns().forEach(e=>{const r={title:()=>this.$t(e.label)};switch(e.field){case"task":r.name="__slot:name",r.field="element_name",r.sortField="element_name";break;case"request":r.name="__slot:requestName",r.sortField="process_requests.id,process_requests.name";break;case"due_at":r.name="__slot:dueDate";break;case"completed_at":r.name="__slot:completedDate";break;default:r.name=e.field}r.field||(r.field=e.field),(e.format==="datetime"||e.format==="date")&&(r.callback="formatDate"),e.sortable&&!r.sortField&&(r.sortField=e.field),this.fields.push(r)}),this.fields.push({name:"__slot:preview",title:""}),this.$nextTick(()=>{this.$refs.vuetable.normalizeFields()})},formatDate(t,e){return e=e||"",t?window.moment(t).format(e):"n/a"},onAction(t,e,r){let a="";return t==="edit"&&(a=`/tasks/${e.id}/edit`),t==="showRequestSummary"&&(a=`/requests/${e.process_request.id}`),a},previewTasks(t){this.$refs["preview-sidebar"].showSideBar(t,this.tableData.data,!0)},classDueDate(t){const e=moment(t),r=moment(),a=e.diff(r,"hours");return a<0?"text-danger":a<=1?"text-warning":"text-dark"},fetchData(t){(t==="In Progress"||t==="all")&&(this.filterDropdowns="",this.pmql=`(user_id = ${ProcessMaker.user.id}) AND (status = "In Progress")`),t==="Overdue"&&(this.filterDropdowns="overdue=true"),this.fetch()},fetchSearch(t){this.pmql="",this.pmql=t,this.fetch()}}};var F7=function(){var e=this,r=e._self._c;return e.showTable?r("div",[r("vuetable",{ref:"vuetable",attrs:{"data-manager":e.dataManager,"sort-order":e.sortOrder,"api-mode":!1,fields:e.fields,data:e.tableData,css:e.css,"data-path":"data","pagination-path":"meta"},scopedSlots:e._u([{key:"name",fn:function(a){return[r("b-link",{directives:[{name:"uni-id",rawName:"v-uni-id",value:a.rowData.id.toString(),expression:"props.rowData.id.toString()"}],attrs:{href:e.onAction("edit",a.rowData,a.rowIndex)}},[e._v(" "+e._s(a.rowData.element_name)+" ")])]}},{key:"requestName",fn:function(a){return[r("b-link",{attrs:{href:e.onAction("showRequestSummary",a.rowData,a.rowIndex)}},[e._v(" #"+e._s(a.rowData.process_request.id)+" "+e._s(a.rowData.process_request.name)+" ")])]}},{key:"dueDate",fn:function(a){return[r("span",{class:e.classDueDate(a.rowData.due_at)},[e._v(" "+e._s(e.formatDate(a.rowData.due_at))+" ")])]}},{key:"completedDate",fn:function(a){return[r("span",{staticClass:"text-dark"},[e._v(" "+e._s(e.formatDate(a.rowData.completed_at))+" ")])]}},{key:"preview",fn:function(a){return[r("span",[r("i",{staticClass:"fa fa-eye",on:{click:function(i){return e.previewTasks(a.rowData)}}})])]}}],null,!1,4211731584)}),r(e.tasksPreview,{ref:"preview-sidebar",tag:"component"})],1):r("div",[r("formEmpty",{attrs:{link:"Tasks",title:"No tasks in sight",url:e.noDataUrl}})],1)},q7=[],B7=oe(R7,F7,q7,!1,null,null,null,null);const Kp=B7.exports,W7=vn(),V7={components:{formEmpty:Qp},mixins:[W7,ic],data(){return{countResponse:"0",fields:[],filter:"",data:[],tableData:[],orderBy:"id",orderDirection:"DESC",additionalParams:"",showTable:!0,sortOrder:[{field:"id",sortField:"id",direction:"desc"}]}},computed:{noDataUrl(){var t,e;return`${(e=(t=window.ProcessMaker)==null?void 0:t.app)==null?void 0:e.url}/requests`}},mounted(){this.setFields(),this.pmql=`requester = "${Processmaker.user.username}"`,this.fetch(),this.$root.$on("dropdownSelectionRequest",this.fetchData),this.$root.$on("searchRequest",this.fetchSearch)},methods:{fetch(){Vue.nextTick(()=>{let t="";this.pmql!==void 0&&(t=this.pmql);let{filter:e}=this;e&&e.length&&e.isPMQL()&&(t=`(${t}) and (${e})`,e=""),this.previousFilter!==e&&(this.page=1),this.previousFilter=e,this.previousPmql!==t&&(this.page=1),this.previousPmql=t,ProcessMaker.apiClient.get(`requests?page=${this.page}&include=process,participants,data&pmql=${encodeURIComponent(t)}
340
340
  &per_page=${this.perPage}&filter=${e}&order_by=${this.orderBy==="__slot:ids"?"id":this.orderBy}&order_direction=${this.orderDirection}${this.additionalParams}`).then(r=>{this.showTable=r.data.data.length!==0;for(const n of r.data.data)n.status=this.formatStatus(n.status);this.tableData=r.data,this.countResponse=this.tableData.meta.total;const a={count:`${this.countResponse}`,showControl:!0,showAvatar:!0,variant:"primary",textColor:"text-primary",colorText:"color: #1572C2",url:"/requests",dropdownShow:"requests"},i=[];this.$emit("requestsCount",{dataControls:a,tasksDropdown:i})}).catch(()=>{this.tableData=[]})})},setFields(){this.fields.push({name:"__slot:ids",field:"id",sortField:"id",sortable:!0,title:"#"}),this.fields.push({name:"__slot:name",field:"name",sortField:"name",sortable:!0,title:()=>this.$t("Name")}),this.fields.push({name:"__slot:status",field:"status",sortField:"status",sortable:!0,title:()=>this.$t("Status")}),this.fields.push({name:"__slot:actions",title:""}),this.$nextTick(()=>{this.$refs.vuetable.normalizeFields()})},formatStatus(t){let e="",r="";switch(t){case"DRAFT":e="danger",r="Draft";break;case"CANCELED":e="danger",r="Canceled";break;case"COMPLETED":e="primary",r="Completed";break;case"ERROR":e="danger",r="Error";break;default:e="success",r="In Progress"}return{color:e,label:r}},openRequest(t,e){return`/requests/${t.id}`},classDueDate(t){const e=moment(t),r=moment(),a=e.diff(r,"hours");return a<0?"text-danger":a<=1?"text-warning":"text-dark"},fetchData(t){t[0]==="by_me"&&t[1]!=="all"&&(this.pmql=`(user_id = ${ProcessMaker.user.id}) AND (status = "${t[1]}")`),t[0]==="as_participant"&&t[1]!=="all"&&(this.pmql=`(status = "${t[1]}") AND (participant = "${Processmaker.user.username}")`),t[1]==="all"&&(this.pmql=`(user_id = ${ProcessMaker.user.id}) AND ((status = "In Progress") OR (status = "Completed"))`),this.fetch()},fetchSearch(t){this.pmql="",this.pmql=t,this.fetch()}}};var U7=function(){var e=this,r=e._self._c;return e.showTable?r("div",[r("vuetable",{ref:"vuetable",attrs:{"data-manager":e.dataManager,"sort-order":e.sortOrder,"api-mode":!1,fields:e.fields,data:e.tableData,css:e.css,"data-path":"data","pagination-path":"meta"},scopedSlots:e._u([{key:"ids",fn:function(a){return[r("b-link",{staticClass:"text-nowrap",attrs:{href:e.openRequest(a.rowData,a.rowIndex)}},[e._v(" #"+e._s(a.rowData.id)+" ")])]}},{key:"name",fn:function(a){return[r("span",{directives:[{name:"uni-id",rawName:"v-uni-id",value:a.rowData.id.toString(),expression:"props.rowData.id.toString()"}]},[e._v(e._s(a.rowData.name))])]}},{key:"status",fn:function(a){return[r("span",[r("i",{class:`fas fa-circle text-${a.rowData.status.color}`}),e._v(" "+e._s(a.rowData.status.label)+" ")])]}},{key:"actions",fn:function(a){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}},{name:"uni-aria-describedby",rawName:"v-uni-aria-describedby",value:a.rowData.id.toString(),expression:"props.rowData.id.toString()"}],attrs:{variant:"link",href:e.openRequest(a.rowData,a.rowIndex),title:e.$t("Open Request")}},[r("i",{staticClass:"fas fa-caret-square-right fa-lg fa-fw"})])],1)])]}}],null,!1,3091698390)})],1):r("div",[r("formEmpty",{attrs:{link:"Requests",title:"No Requests to Show",url:e.noDataUrl}})],1)},G7=[],H7=oe(V7,U7,G7,!1,null,null,null,null);const Jp=H7.exports,Ote="",Y7={mixins:[vn()],props:["name","description","filter","id","process"],data(){return{disabled:!1,spin:0,showtip:!0,showdetail:!1}},computed:{ariaHidden(){return this.showdetail?"false":"true"},ariaExpanded(){return this.showdetail?"true":"false"},emptyStartEvents(){return this.process.startEvents.filter(t=>!t.eventDefinitions||t.eventDefinitions.length===0)},transformedName(){return this.process.name.replace(new RegExp(this.filter,"gi"),t=>t)},truncatedDescription(){if(!this.process.description)return'<span class="text-primary"></span>';let t="";const e=this.process.description.split(" "),r=100;let a=null;for(;a=e.shift();)t.length+a.length+1<=r&&(t=`${t} ${a}`);return t.replace(new RegExp(this.filter,"gi"),i=>`<span class="text-primary"> ${i} </span>`)}},methods:{newRequestLink(t,e){if(this.disabled)return;this.disabled=!0,this.spin=`${t.id}.${e.id}`;const r=e.id;window.ProcessMaker.apiClient.post(`/process_events/${this.process.id}?event=${r}`).then(a=>{this.spin=0;const i=a.data;this.$cookies.set("fromTriggerStartEvent",!0,"1min"),window.location=`/requests/${i.id}?fromTriggerStartEvent=`}).catch(a=>{this.disabled=!1;const{data:i}=a.response;i.message&&ProcessMaker.alert(i.message,"danger")})},showRequestDetails(t,e){this.showdetail===!1?this.showdetail=!0:this.showdetail=!1,this.$root.$emit("bv::toggle::collapse",this.getComputedId(t,e))},getNewRequestLinkHref(t,e){const{id:r}=t,a=e.id;return`/process_events/${r}?event=${a}`},getComputedId(t,e){return`process-${t.id}-${e.id}`}}};var Q7=function(){var e=this,r=e._self._c;return r("div",[e._l(e.emptyStartEvents,function(a){return[r("div",{key:a.id,staticClass:"mb-3 card-request"},[r("div",{staticClass:"card-body"},[r("div",{staticClass:"d-flex justify-content-between"},[r("div",[r("span",{directives:[{name:"uni-id",rawName:"v-uni-id",value:a.id.toString(),expression:"event.id.toString()"}],staticClass:"card-info card-title"},[e._v(" "+e._s(e.transformedName)+" ")]),r("span",{staticClass:"card-info"},[e._v(" "+e._s(a.name)+" ")])]),r("div",{staticClass:"d-flex align-items-center"},[r("button",{staticClass:"btn btn-ellipsis btn-sm mr-1",attrs:{"aria-expanded":e.ariaExpanded,"aria-controls":e.getComputedId(e.process,a)},on:{click:function(i){return e.showRequestDetails(e.process,a)}}},[r("i",{staticClass:"fas fa-ellipsis-v"})]),r("button",{directives:[{name:"uni-aria-describedby",rawName:"v-uni-aria-describedby",value:a.id.toString(),expression:"event.id.toString()"}],staticClass:"btn btn-custom btn-sm",attrs:{href:e.getNewRequestLinkHref(e.process,a)},on:{click:function(i){return i.preventDefault(),e.newRequestLink(e.process,a)}}},[e._v(" "+e._s(e.$t("Start"))+" "),r("i",{staticClass:"fas fa-play mr-1 card-icon"})])])]),r("b-collapse",{attrs:{id:e.getComputedId(e.process,a),"aria-hidden":e.ariaHidden}},[r("hr"),r("p",{staticClass:"card-text text-muted card-description"},[e._v(" "+e._s(e.process.description)+" ")])])],1)])]})],2)},K7=[],J7=oe(Y7,Q7,K7,!1,null,"6935b2c4",null,null);const Z7={components:{ProcessCard:J7.exports,formEmpty:Qp},data(){return{filter:"",loading:!1,error:!1,loaded:!1,processes:{},perPage:10,page:1}},mounted(){this.fetch(),this.$root.$on("dropdownSelectionStart",this.fetchData)},methods:{hasEmptyStartEvents(t){return!!t.events.find(e=>!e.eventDefinitions||e.eventDefinitions.length===0)},fetch(){Vue.nextTick(()=>{window.ProcessMaker.apiClient.get(`start_processes?page=${this.page}&per_page=${this.perPage}&filter=${this.filter}&order_by=category.name,name&order_direction=asc,asc&include=events&without_event_definitions=true`).then(t=>{const{data:e}=t;this.processes=e.data}).catch(()=>{this.error=!0})})},fetchData(t){this.filter=t,this.fetch()}}};var X7=function(){var e=this,r=e._self._c;return r("div",[Object.keys(e.processes).length&&!e.loading?r("div",{staticClass:"process-list"},[r("b-container",{attrs:{fluid:""}},e._l(e.processes,function(a,i){return r("div",{key:`process-${i}`},[e.hasEmptyStartEvents(a)?r("ProcessCard",{attrs:{filter:e.filter,process:a}}):e._e()],1)}),0)],1):r("div",[r("formEmpty",{attrs:{link:"",title:"No Request to Start",url:""}})],1)])},eY=[],tY=oe(Z7,X7,eY,!1,null,null,null,null);const rY=tY.exports,$te="",aY={components:{FormTasks:Kp,FormRequests:Jp,FormNewRequest:rY},mixins:[],props:["listOption"],data(){return{optionRequest:"by_me",dropdownRequest:"In Progress",titleDropdown:"View All",viewAll:"View All",title:this.$t("List Table"),dataControl:{},searchCriteria:"",showInput:!1,pmql:"",badgeVariant:"",typeSelected:"",showBadge:!1,customStyle:{"border-radius":"8px"}}},watch:{listOption(){this.title=this.listOption,this.dataControl={}}},mounted(){this.title=this.listOption},methods:{getData(t){this.dataControl=t.dataControls},openExternalLink(){window.open(this.dataControl.url,"_blank")},handleDropdownSelection(t,e){const r=[];this.typeSelected=t,t==="tasks"?(this.$root.$emit("dropdownSelectionTask",e),this.titleDropdown=e==="all"?this.viewAll:e,this.colorBadge()):(t==="requests_filter"&&(this.optionRequest=e,e==="by_me"&&(this.title="Request Started By Me"),e==="as_participant"&&(this.title="With Me as Participant")),t==="requests_dropdown"&&(this.titleDropdown=e==="all"?this.viewAll:e,this.colorBadge(),this.dropdownRequest=e),r.push(this.optionRequest),r.push(this.dropdownRequest),this.$root.$emit("dropdownSelectionRequest",r))},toggleInput(t){this.showInput&&this.searchCriteria!==""&&this.performSearch(t),this.showInput=!this.showInput},performSearch(t){this.pmql=`(fulltext LIKE "%${this.searchCriteria}%")`,t==="tasks"&&this.$root.$emit("searchTask",this.pmql),t==="requests"&&this.$root.$emit("searchRequest",this.pmql),t===void 0&&this.$root.$emit("dropdownSelectionStart",`${this.searchCriteria}`)},clearSearch(t){this.searchCriteria="",this.toggleInput(t)},colorBadge(){this.titleDropdown==="In Progress"&&(this.typeSelected==="tasks"&&(this.badgeVariant="warning"),this.typeSelected==="requests_dropdown"&&(this.badgeVariant="success"),this.showBadge=!0),this.titleDropdown==="Overdue"&&(this.badgeVariant="danger",this.showBadge=!0),this.titleDropdown==="Overdue"&&(this.badgeVariant="danger",this.showBadge=!0),this.titleDropdown==="Completed"&&(this.badgeVariant="primary",this.showBadge=!0),(this.titleDropdown==="View All"||this.titleDropdown==="all")&&(this.badgeVariant="",this.showBadge=!1)}}};var iY=function(){var e=this,r=e._self._c;return r("div",{staticClass:"card",style:e.customStyle},[r("div",{staticClass:"card-header d-flex justify-content-between align-items-center"},[e.dataControl.showControl?[r("div",{staticClass:"mb-1 mt-1"},[e.dataControl.showAvatar?r("b-avatar",{staticClass:"avatar-text",attrs:{size:"2em",variant:e.dataControl.variant,text:e.dataControl.count}}):e._e(),r("p",{staticClass:"control-text mb-0",style:e.dataControl.colorText},[e._v(" "+e._s(e.$t(e.title))+" ")]),e.dataControl.dropdownShow==="requests"?[r("b-dropdown",{attrs:{variant:"outline-secondary","no-caret":""},scopedSlots:e._u([{key:"button-content",fn:function(){return[r("i",{staticClass:"fas fa-caret-down"})]},proxy:!0}],null,!1,2500479221)},[r("b-dropdown-item",{on:{click:function(a){return e.handleDropdownSelection("requests_filter","by_me")}}},[e._v(" "+e._s(e.$t("As Requester"))+" ")]),r("b-dropdown-item",{on:{click:function(a){return e.handleDropdownSelection("requests_filter","as_participant")}}},[e._v(" "+e._s(e.$t("As Participant"))+" ")])],1)]:e._e()],2)]:[r("span",{staticClass:"control-text"},[e._v(e._s(e.$t(e.title)))])],r("div",{staticClass:"ml-auto d-flex align-items-center"},[e.dataControl.dropdownShow==="requests"?[r("div",{staticClass:"mr-4"},[r("b-dropdown",{attrs:{variant:"outline-secondary",size:"sm"},scopedSlots:e._u([{key:"button-content",fn:function(){return[r("span",[e.showBadge?r("b-icon",{attrs:{icon:"circle-fill",variant:e.badgeVariant}}):e._e(),e._v(" "+e._s(e.$t(e.titleDropdown))+" ")],1)]},proxy:!0}],null,!1,3897299558)},[r("b-dropdown-item",{attrs:{variant:"success"},on:{click:function(a){return e.handleDropdownSelection("requests_dropdown","In Progress")}}},[r("i",{staticClass:"fas fa-circle mr-2"}),e._v(e._s(e.$t("In Progress"))+" ")]),r("b-dropdown-item",{attrs:{variant:"primary"},on:{click:function(a){return e.handleDropdownSelection("requests_dropdown","Completed")}}},[r("i",{staticClass:"fas fa-circle mr-2"}),e._v(e._s(e.$t("Completed"))+" ")]),r("b-dropdown-item",{on:{click:function(a){return e.handleDropdownSelection("requests_dropdown","all")}}},[e._v(" "+e._s(e.$t("View All"))+" ")])],1)],1)]:e._e(),e.dataControl.dropdownShow==="tasks"?[r("div",{staticClass:"mr-4"},[r("b-dropdown",{attrs:{variant:"outline-secondary",size:"sm"},scopedSlots:e._u([{key:"button-content",fn:function(){return[r("span",[e.showBadge?r("b-icon",{attrs:{icon:"circle-fill",variant:e.badgeVariant}}):e._e(),e._v(" "+e._s(e.$t(e.titleDropdown))+" ")],1)]},proxy:!0}],null,!1,3897299558)},[r("b-dropdown-item",{attrs:{variant:"warning"},on:{click:function(a){return e.handleDropdownSelection("tasks","In Progress")}}},[r("i",{staticClass:"fas fa-circle mr-2"}),e._v(e._s(e.$t("In Progress"))+" ")]),r("b-dropdown-item",{attrs:{variant:"danger"},on:{click:function(a){return e.handleDropdownSelection("tasks","Overdue")}}},[r("i",{staticClass:"fas fa-circle mr-2"}),e._v(e._s(e.$t("Overdue"))+" ")]),r("b-dropdown-item",{on:{click:function(a){return e.handleDropdownSelection("tasks","all")}}},[e._v(" "+e._s(e.$t("View All"))+" ")])],1)],1)]:e._e(),r("div",[r("div",{staticClass:"d-flex justify-content-end"},[r("button",{staticClass:"btn btn-outline-secondary border-0 mr-1",on:{click:function(a){return e.toggleInput(e.dataControl.dropdownShow)}}},[r("i",{staticClass:"fas fa-search"})]),e.showInput?r("input",{directives:[{name:"model",rawName:"v-model",value:e.searchCriteria,expression:"searchCriteria"}],ref:"input",staticClass:"form-control narrow-input",attrs:{type:"text"},domProps:{value:e.searchCriteria},on:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.performSearch(e.dataControl.dropdownShow)},input:function(a){a.target.composing||(e.searchCriteria=a.target.value)}}}):e._e(),e.showInput?r("button",{staticClass:"btn btn-clear",on:{click:function(a){return e.clearSearch(e.dataControl.dropdownShow)}}},[r("i",{staticClass:"fas fa-times"})]):e._e()])])],2),e.listOption!=="Start New Request"?r("div",[r("b-link",{on:{click:e.openExternalLink}},[r("i",{staticClass:"fas fa-external-link-alt custom-icon"})])],1):e._e()],2),r("div",{staticClass:"card-body list-table"},[e.listOption==="My Tasks"?[r("FormTasks",{on:{tasksCount:e.getData}})]:e._e(),e.listOption==="My Requests"?[r("FormRequests",{on:{requestsCount:e.getData}})]:e._e(),e.listOption==="Start New Request"?[r("FormNewRequest",{on:{startControl:e.getData}})]:e._e()],2)])},nY=[],sY=oe(aY,iY,nY,!1,null,"fd3adc7b",null,null);const _s=sY.exports,Pte="",oY={props:["listChartOption"],data(){return{title:this.$t("Analytics Chart"),graphic:[],customStyle:{"border-radius":"8px"}}},watch:{listChartOption(){this.listChartOption&&this.listChartOption.name&&(this.graphic=this.listChartOption)}},mounted(){this.listChartOption&&this.listChartOption.name&&(this.graphic=this.listChartOption)},methods:{openExternalLink(){window.open("/package-analytics-reporting","_blank")}}};var lY=function(){var e=this,r=e._self._c;return r("div",{staticClass:"card",style:e.customStyle},[r("div",{staticClass:"card-header d-flex justify-content-between align-items-center"},[r("span",{staticClass:"mb-2 mt-2 control-text"},[e._v(e._s(e.title))]),r("b-link",{on:{click:e.openExternalLink}},[r("i",{staticClass:"fas fa-external-link-alt custom-icon"})])],1),r("div",[r("div",{staticClass:"d-flex flex-wrap p-2"},[r("b-col",{attrs:{cols:"12"}},[r("b-card-text",[r("b-embed",{attrs:{type:"iframe",src:e.graphic.link}})],1)],1)],1)])])},uY=[],cY=oe(oY,lY,uY,!1,null,"54713fad",null,null);const ws=cY.exports,Cs=Object.freeze(Object.defineProperty({__proto__:null,AddLoopRow:Hu,FileDownload:Xs,FileUpload:bn,FormAnalyticsChart:ws,FormAvatar:yn,FormButton:qa,FormImage:Jn,FormInputMasked:Ba,FormListTable:_s,FormLoop:xs,FormMaskedInput:Ba,FormNestedScreen:ks,FormRecordList:fu,FormRecordListStatic:Sx,FormRequests:Jp,FormTasks:Kp,FormText:hu,NewFormMultiColumn:Yp,ScreenRendererError:Gp},Symbol.toStringTag,{value:"Module"})),Dte="",dY={name:"MustacheHelper"};var pY=function(){var e=this,r=e._self._c;return r("div",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"mustache",attrs:{title:e.$t("This field accepts mustache syntax")}},[e._v(" {} ")])},fY=[],hY=oe(dY,pY,fY,!1,null,"8cef93f7",null,null);const Hi=hY.exports,mY={props:["name","label","value","helper","validation","dataCy"],components:{FormMultiSelect:ee.FormMultiSelect},data(){return{variables:[],newTags:[]}},computed:{selectedVariable:{get(){return this.value},set(t){this.$emit("input",t)}}},methods:{addTag(t){this.newTags.push(t),this.selectedVariable=t,this.variables=this.newTags.concat(this.variables)},loadVariables(){this.variables=[],this.findElements(this.$root.$children[0].config),this.variables=this.newTags.concat(this.variables),this.selectedVariable&&!this.variables.includes(this.selectedVariable)&&this.variables.unshift(this.selectedVariable)},findElements(t,e=[]){t.forEach(r=>{Array.isArray(r)&&this.findElements(r),r.items&&this.findElements(r.items),r.config&&r.config.name&&this.variables.push(r.config.name),r.component==="FormNestedScreen"&&this.loadVariablesFromScreen(r.config.screen,e)})},loadVariablesFromScreen(t,e){e.indexOf(t)===-1&&(e.push(t),t&&this.$dataProvider.getScreen(t).then(r=>{this.findElements(r.data.config)}))}}};var gY=function(){var e=this,r=e._self._c;return r("form-multi-select",{attrs:{name:e.$t("Variable to Watch"),label:e.$t("Variable to Watch")+" *",options:e.variables,taggable:!0,placeholder:e.$t("None"),multiple:!1,"show-labels":!1,"internal-search":!0,validation:e.validation,helper:e.helper,"tag-placeholder":e.$t("Press enter to use this variable"),"data-cy":e.dataCy},on:{open:e.loadVariables,tag:e.addTag},model:{value:e.selectedVariable,callback:function(a){e.selectedVariable=a},expression:"selectedVariable"}})},vY=[],bY=oe(mY,gY,vY,!1,null,null,null,null);const xx=bY.exports,kx=["collectionId","labelField","valueField","pmql","unique"],yY={components:{MustacheHelper:Hi,ScreenVariableSelector:xx},props:["value"],data(){return{collections:[],fields:[],collectionId:null,labelField:null,valueField:null,pmql:"",unique:!1}},computed:{options(){return Object.fromEntries(kx.map(t=>[t,this[t]]))}},watch:{value:{handler(t){t&&kx.forEach(e=>this[e]=t[e])},immediate:!0},collectionId:{handler(){this.getFields()}},options:{handler(){this.$emit("input",this.options)},deep:!0}},created(){this.onDebouncedPmqlChange=H.debounce(t=>{this.onPmqlChange(t)},1e3)},mounted(){this.getCollections(),this.collectionId&&this.getFields()},methods:{resetFields(){this.labelField=null,this.valueField=null},getCollections(){this.$dataProvider.getCollections().then(t=>{this.collections=[{value:null,text:this.$t("Select a collection")},...t.data.data.map(e=>({text:e.name,value:e.id}))]})},getFields(){this.collectionId&&this.$dataProvider.getCollectionFields(this.collectionId).then(t=>{this.fields=[{value:null,text:this.$t("Select a field")},{value:"id",text:this.$t("Collection Record ID")},...t.data.data.map(e=>({text:e.label,value:e.field}))]})},onNLQConversion(t){this.pmql=t},onPmqlChange(t){this.pmql=t}}};var SY=function(){var e=this,r=e._self._c;return r("div",[r("div",[r("label",{attrs:{for:"collection"}},[e._v(e._s(e.$t("Collection")))]),r("b-form-select",{attrs:{id:"collection",options:e.collections,"data-cy":"inspector-collection"},on:{change:e.resetFields},model:{value:e.collectionId,callback:function(a){e.collectionId=a},expression:"collectionId"}})],1),e.fields.length>1?r("div",{staticClass:"mt-3"},[r("label",{attrs:{for:"label"}},[e._v(e._s(e.$t("Label")))]),r("b-form-select",{attrs:{id:"label",options:e.fields,"data-cy":"inspector-collection-label"},model:{value:e.labelField,callback:function(a){e.labelField=a},expression:"labelField"}})],1):e._e(),e.fields.length>1?r("div",{staticClass:"mt-3"},[r("label",{attrs:{for:"value"}},[e._v(e._s(e.$t("Value")))]),r("b-form-select",{attrs:{id:"value",options:e.fields,"data-cy":"inspector-collection-value"},model:{value:e.valueField,callback:function(a){e.valueField=a},expression:"valueField"}})],1):e._e(),e.fields.length>1?r("div",{staticClass:"mt-3"},[r("pmql-input",{staticClass:"mb-1",attrs:{"search-type":"collections_w_mustaches","data-cy":"inspector-collection-pmql","input-label":"PMQL",condensed:!0,"ai-enabled":!0,placeholder:e.$t("PMQL")},model:{value:e.pmql,callback:function(a){e.pmql=a},expression:"pmql"}}),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Advanced data search")))])],1):e._e(),e.fields.length>1?r("div",{staticClass:"mt-3"},[r("form-checkbox",{attrs:{label:e.$t("Ignore duplicates in list"),helper:e.$t("Select to show only distinct list entries if labels are repeated. Only the first value will be used if duplicate labels have different values."),"data-cy":"inspector-collection-isDependent"},model:{value:e.unique,callback:function(a){e.unique=a},expression:"unique"}})],1):e._e()])},xY=[],kY=oe(yY,SY,xY,!1,null,null,null,null);const Zp=kY.exports,Ite="",_Y={components:{},props:{label:{},value:{},helper:{},options:{}},data(){return{newColor:""}},computed:{hasColor(){return!!this.value}},methods:{emitChanges(t){this.$emit("input",t),this.$emit("update-state")},checkColor(){this.hasColor&&this.emitChanges("")},selectColor(t){this.emitChanges(t)},parsedColor(t){return t.split("-")[1]}}};var wY=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",[r("label",[e._v(e._s(e.label))]),r("b-button-toolbar",[r("b-button-group",{attrs:{size:"sm"}},e._l(e.options,function(a){return r("b-button",{key:a.value,staticClass:"btn btn-sm mr-1 pr-1 pl-1 pt-0 pb-0 btn-outline-none",class:["bg-"+e.parsedColor(a.value)],attrs:{size:"sm",variant:"outline-light",title:a.content}},[r("i",{staticClass:"fas fa-check",class:[a.value===e.value?"text-light":"text-"+e.parsedColor(a.value)],on:{click:function(i){return e.selectColor(a.value)}}})])}),1)],1),r("small",{on:{click:function(a){return e.checkColor()}}},[r("i",{staticClass:"fas fa-ban"}),e._v(" "+e._s(e.$t("Clear Color Selection"))+" ")])],1)])},CY=[],TY=oe(_Y,wY,CY,!1,null,"7de98bb3",null,null);const _x=TY.exports,Ts=[{value:"provideData",text:"Provide Values"},{value:"dataObject",text:"Request Data"},{value:"dataConnector",text:"Data Connector"},{value:"collection",text:"Collection"}],ea=Ts.reduce((t,e)=>(t[e.value]=e.value,t),{}),zte="",AY={components:{draggable:Oa,MonacoEditor:_a},props:["options"],model:{prop:"options",event:"change"},data(){return{jsonError:"",optionError:"",dragging:!1,dataSourceValues:ea,dataSources:Ts,dataSource:ea.provideData,jsonData:"",key:null,value:null,dataName:"",pmqlQuery:"",optionsList:[],showOptionCard:!1,showRemoveWarning:!1,showJsonEditor:!1,optionCardType:"",editIndex:null,removeIndex:null,optionValue:"",optionContent:"",showRenderAs:!1,renderAs:"dropdown",allowMultiSelect:!1,defaultOptionKey:!1,selectedOptions:[],renderAsOptions:[{text:"Dropdown/Multiselect",value:"dropdown"},{text:"Radio/Checkbox Group",value:"checkbox"}],monacoOptions:{automaticLayout:!0,fontSize:8},monacoLargeOptions:{automaticLayout:!0},showPopup:!1}},watch:{options:{handler(){this.dataSource=this.options.dataSource,this.jsonData=this.options.jsonData,this.dataName=this.options.dataName,this.key=this.options.key,this.value=this.options.value,this.pmqlQuery=this.options.pmqlQuery,this.defaultOptionKey=this.options.defaultOptionKey,this.selectedOptions=this.options.selectedOptions,this.optionsList=this.options.optionsList,this.showRenderAs=this.options.showRenderAs,this.renderAs=this.options.renderAs,this.allowMultiSelect=this.options.allowMultiSelect,this.showOptionCard=this.options.showOptionCard,this.showRemoveWarning=this.options.showRemoveWarning,this.showJsonEditor=this.options.showJsonEditor,this.editIndex=this.options.editIndex,this.removeIndex=this.options.removeIndex}},dataSource(){this.jsonData="",this.dataName=""},dataObjectOptions(t){this.$emit("change",t)}},computed:{jsonDataClass(){return this.jsonError?"is-invalid":""},optionKeyClass(){return this.optionError?"is-invalid":""},keyField(){return this.key||"value"},valueField(){return this.value||"content"},currentItemToDelete(){if(this.removeIndex!==null&&this.optionsList.length>0&&this.optionsList[this.removeIndex]!==void 0){let t=this.optionsList[this.removeIndex][this.valueField];return this.$t('Are you sure you want to delete "{{item}}"?',{item:t})}return""},dataObjectOptions(){return{dataSource:this.dataSource,jsonData:this.jsonData,dataName:this.dataName,key:this.key,value:this.value,pmqlQuery:this.pmqlQuery,defaultOptionKey:this.defaultOptionKey,selectedOptions:this.selectedOptions,optionsList:this.optionsList,showRenderAs:this.showRenderAs,renderAs:this.renderAs,allowMultiSelect:this.allowMultiSelect,showOptionCard:this.showOptionCard,showRemoveWarning:this.showRemoveWarning,showJsonEditor:this.showJsonEditor,editIndex:this.editIndex,removeIndex:this.removeIndex}}},mounted(){this.initData()},methods:{initData(){this.dataSource=this.options.dataSource,this.jsonData=this.options.jsonData,this.dataName=this.options.dataName,this.key=this.options.key,this.value=this.options.value,this.pmqlQuery=this.options.pmqlQuery,this.defaultOptionKey=this.options.defaultOptionKey,this.selectedOptions=this.options.selectedOptions,this.optionsList=this.options.optionsList?this.options.optionsList:[],this.jsonData=JSON.stringify(this.optionsList),this.showRenderAs=this.options.showRenderAs,this.renderAs=this.options.renderAs,this.allowMultiSelect=this.options.allowMultiSelect},defaultOptionClick(){this.defaultOptionKey===event.target.value&&(this.defaultOptionKey=!1)},rowCss(t){return t%2===0?"striped":"bg-default"},keyChanged(){this.jsonDataChange()},valueChanged(){this.jsonDataChange()},jsonDataChange(){let t=[];try{if(t=JSON.parse(this.jsonData),t.constructor!==Array&&t.constructor!==Object)throw Error("String does not represent a valid JSON")}catch(r){this.jsonError=r.message;return}this.optionsList=[];const e=this;t.forEach(r=>{e.optionsList.push({[e.keyField]:r[e.keyField],[e.valueField]:r[e.valueField]})}),this.jsonError=""},updateSort(){this.jsonData=JSON.stringify(this.optionsList),this.$emit("change",this.dataObjectOptions)},editAsJson(){this.showJsonEditor=!0},editAsOptionList(){this.showJsonEditor=!1},showEditOption(t){this.optionCardType="edit",this.editIndex=t,this.optionContent=this.optionsList[t][this.valueField],this.optionValue=this.optionsList[t][this.keyField],this.optionError=""},showAddOption(){this.optionCardType="insert",this.optionContent="",this.optionValue="",this.showOptionCard=!0,this.optionError="",this.editIndex=null},addOption(){const t=this;if(this.optionsList===void 0&&this.initData(),this.optionCardType==="insert"){if(this.optionsList.find(e=>e[t.keyField]===this.optionValue)){this.optionError="An item with the same key already exists";return}this.optionsList.push({[this.valueField]:this.optionContent,[this.keyField]:this.optionValue})}else{if(this.optionsList.find((e,r)=>e[t.keyField]===this.optionValue&&r!==this.editIndex)){this.optionError="An item with the same key already exists";return}this.optionsList[this.editIndex][this.keyField]=this.optionValue,this.optionsList[this.editIndex][this.valueField]=this.optionContent}this.jsonError="",this.jsonData=JSON.stringify(this.optionsList),this.showOptionCard=!1,this.optionError="",this.editIndex=null},deleteOption(){this.optionsList.splice(this.removeIndex,1),this.jsonData=JSON.stringify(this.optionsList),this.showRemoveWarning=!1,this.removeIndex=null},removeOption(t){this.removeIndex=t,this.showRemoveWarning=!0},expandEditor(){this.showPopup=!0},closePopup(){this.showPopup=!1}}};var OY=function(){var e=this,r=e._self._c;return r("div",[!e.showJsonEditor&&e.dataSource===e.dataSourceValues.provideData?r("div",[r("div",{staticClass:"row"},[r("div",{staticClass:"col-10"},[r("label",{attrs:{for:"data-sources"}},[r("b",[e._v(e._s(e.$t("Column")))])])]),r("div",{staticClass:"col-2"},[r("a",{staticClass:"fas fa-plus-square",on:{click:e.showAddOption}})])]),e.showOptionCard?r("div",{staticClass:"card mb-2"},[e.optionCardType=="insert"?r("div",{staticClass:"card-header"},[e._v(" "+e._s(e.$t("Add Column"))+" ")]):r("div",{staticClass:"card-header"},[e._v(" "+e._s(e.$t("Edit Column"))+" ")]),r("div",{staticClass:"card-body p-2"},[r("label",{staticClass:"mt-3",attrs:{for:"option-content"}},[e._v(e._s(e.$t("Column Header")))]),r("b-form-input",{attrs:{id:"option-content"},model:{value:e.optionContent,callback:function(a){e.optionContent=a},expression:"optionContent"}}),r("label",{attrs:{for:"option-value"}},[e._v(e._s(e.$t("Value")))]),r("b-form-input",{attrs:{id:"option-value",classs:e.optionKeyClass},model:{value:e.optionValue,callback:function(a){e.optionValue=a},expression:"optionValue"}}),e.optionError?r("div",{staticClass:"invalid-feedback d-block text-right"},[r("div",[e._v(e._s(e.optionError))])]):e._e()],1),r("div",{staticClass:"card-footer text-right p-2"},[r("button",{staticClass:"btn btn-sm btn-outline-secondary mr-2",attrs:{type:"button"},on:{click:function(a){e.showOptionCard=!1}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-sm btn-secondary",attrs:{type:"button"},on:{click:function(a){return e.addOption()}}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e._e(),r("div",{staticClass:"row"},[r("div",{staticClass:"col"},[r("draggable",{attrs:{element:"div",group:"options"},on:{update:e.updateSort,start:function(a){e.drag=!0},end:function(a){e.drag=!1}},model:{value:e.optionsList,callback:function(a){e.optionsList=a},expression:"optionsList"}},e._l(e.optionsList,function(a,i){return r("div",{key:a.value},[e.removeIndex===i?r("div",[r("div",{staticClass:"card mb-3 bg-danger text-white text-right"},[r("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.currentItemToDelete)+" ")]),r("div",{staticClass:"card-footer text-right p-2"},[r("button",{staticClass:"btn btn-sm btn-light mr-2",attrs:{type:"button"},on:{click:function(n){e.removeIndex=null}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{type:"button"},on:{click:function(n){return e.deleteOption()}}},[e._v(" "+e._s(e.$t("Delete"))+" ")])])])]):e._e(),e.editIndex===i?r("div",[r("div",{staticClass:"card my-2"},[e.optionCardType=="insert"?r("div",{staticClass:"card-header"},[e._v(" "+e._s(e.$t("Add Option"))+" ")]):r("div",{staticClass:"card-header"},[e._v(" "+e._s(e.$t("Edit Option"))+" ")]),r("div",{staticClass:"card-body p-2"},[r("label",{staticClass:"mt-3",attrs:{for:"option-content"}},[e._v(e._s(e.$t("Column Header")))]),r("b-form-input",{attrs:{id:"option-content"},model:{value:e.optionContent,callback:function(n){e.optionContent=n},expression:"optionContent"}}),r("label",{attrs:{for:"option-value"}},[e._v(e._s(e.$t("Value")))]),r("b-form-input",{attrs:{id:"option-value",classs:e.optionKeyClass},model:{value:e.optionValue,callback:function(n){e.optionValue=n},expression:"optionValue"}}),e.optionError?r("div",{staticClass:"invalid-feedback d-block text-right"},[r("div",[e._v(e._s(e.optionError))])]):e._e()],1),r("div",{staticClass:"card-footer text-right p-2"},[r("button",{staticClass:"btn btn-sm btn-outline-secondary mr-2",attrs:{type:"button"},on:{click:function(n){e.editIndex=null}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-sm btn-secondary",attrs:{type:"button"},on:{click:function(n){return e.addOption()}}},[e._v(" "+e._s(e.$t("Update"))+" ")])])])]):e._e(),r("div",{staticClass:"row border-top",class:e.rowCss(i)},[r("div",{staticClass:"col-1",staticStyle:{cursor:"grab"}},[r("span",{staticClass:"fas fa-arrows-alt-v"})]),r("div",{staticClass:"col-1 d-flex align-items-center"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.defaultOptionKey,expression:"defaultOptionKey"}],staticClass:"form-check",attrs:{type:"radio",name:"defaultOptionGroup"},domProps:{value:a[e.keyField],checked:e._q(e.defaultOptionKey,a[e.keyField])},on:{click:e.defaultOptionClick,change:function(n){e.defaultOptionKey=a[e.keyField]}}})]),r("div",{staticClass:"col-5",staticStyle:{cursor:"grab"}},[e._v(" "+e._s(a[e.valueField])+" ")]),r("div",{staticClass:"col-1"},[r("a",{staticClass:"fas fa-cog",staticStyle:{cursor:"pointer"},on:{click:function(n){return e.showEditOption(i)}}})]),r("div",{staticClass:"col-1"},[r("a",{staticClass:"fas fa-trash-alt",staticStyle:{cursor:"pointer"},on:{click:function(n){return e.removeOption(i)}}})])])])}),0)],1)]),r("div",{staticClass:"row"},[r("div",{staticClass:"col text-right"},[r("a",{attrs:{href:"#"},on:{click:function(a){return e.editAsJson()}}},[r("small",{staticClass:"form-text text-muted mb-3"},[r("b",[e._v("</>")]),e._v(" "+e._s(e.$t("Edit as JSON")))])])])]),e.showRenderAs?r("div",{staticClass:"row mb-3"},[r("div",{staticClass:"col-12"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.allowMultiSelect,expression:"allowMultiSelect"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.allowMultiSelect)?e._i(e.allowMultiSelect,null)>-1:e.allowMultiSelect},on:{change:function(a){var i=e.allowMultiSelect,n=a.target,s=!!n.checked;if(Array.isArray(i)){var o=null,u=e._i(i,o);n.checked?u<0&&(e.allowMultiSelect=i.concat([o])):u>-1&&(e.allowMultiSelect=i.slice(0,u).concat(i.slice(u+1)))}else e.allowMultiSelect=s}}}),e._v(" Allow multiple selections ")])]):e._e(),e.showRenderAs?r("div",{staticClass:"row mb-3"},[r("div",{staticClass:"col"},[r("label",{attrs:{for:"render-as"}},[e._v(e._s(e.$t("Render Options As")))]),r("b-form-select",{attrs:{id:"render-as",options:e.renderAsOptions},model:{value:e.renderAs,callback:function(a){e.renderAs=a},expression:"renderAs"}})],1)]):e._e()]):e._e(),e.showJsonEditor&&e.dataSource===e.dataSourceValues.provideData?r("div",[e.dataSource===e.dataSourceValues.provideData?r("div",[r("div",{staticClass:"mb-2"},[r("label",{attrs:{for:"json-data"}},[e._v(e._s(e.$t("JSON Data")))]),r("button",{staticClass:"btn-sm float-right",attrs:{type:"button","aria-label":e.$t("Expand Editor")},on:{click:e.expandEditor}},[r("i",{staticClass:"fas fa-expand"})])]),r("div",{staticClass:"small-editor-container"},[r("MonacoEditor",{staticClass:"editor",attrs:{options:e.monacoOptions,language:"json"},on:{change:e.jsonDataChange},model:{value:e.jsonData,callback:function(a){e.jsonData=a},expression:"jsonData"}})],1),r("b-modal",{attrs:{size:"lg",centered:"",title:e.$t("Script Config Editor"),"header-close-content":"&times;"},model:{value:e.showPopup,callback:function(a){e.showPopup=a},expression:"showPopup"}},[r("div",{staticClass:"editor-container"},[r("MonacoEditor",{staticClass:"editor",attrs:{options:e.monacoLargeOptions,language:"json"},on:{change:e.jsonDataChange},model:{value:e.jsonData,callback:function(a){e.jsonData=a},expression:"jsonData"}})],1),r("div",{attrs:{slot:"modal-footer"},slot:"modal-footer"},[r("b-button",{staticClass:"btn btn-secondary text-uppercase",on:{click:e.closePopup}},[e._v(" "+e._s(e.$t("Close"))+" ")])],1)])],1):e._e(),e.jsonError?r("div",{staticClass:"invalid-feedback d-block text-right"},[r("div",[e._v(e._s(e.jsonError))])]):e._e(),r("a",{staticClass:"text-right",attrs:{href:"#"},on:{click:function(a){return e.editAsOptionList()}}},[r("small",{staticClass:"form-text text-muted mb-3"},[r("b",[e._v("</>")]),e._v(" "+e._s(e.$t("Edit as Option List")))])])]):e._e(),e.dataSource===e.dataSourceValues.dataObject?r("div",[r("label",{attrs:{for:"data-name"}},[e._v(e._s(e.$t("Data Name")))]),r("b-form-input",{attrs:{id:"data-name"},model:{value:e.dataName,callback:function(a){e.dataName=a},expression:"dataName"}}),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(e._s(e.$t("Data source to populate select")))])],1):e._e(),e.dataSource===e.dataSourceValues.dataObject||e.showJsonEditor?r("div",[r("label",{attrs:{for:"key"}},[e._v(e._s(e.$t("Value")))]),r("b-form-input",{attrs:{id:"key"},on:{change:e.keyChanged},model:{value:e.key,callback:function(a){e.key=a},expression:"key"}}),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(e._s(e.$t("Field to save to the data object")))]),r("label",{attrs:{for:"value"}},[e._v(e._s(e.$t("Content")))]),r("b-form-input",{attrs:{id:"value"},on:{change:e.valueChanged},model:{value:e.value,callback:function(a){e.value=a},expression:"value"}}),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(e._s(e.$t("Field to show in the select box")))])],1):e._e(),e.dataSource===e.dataSourceValues.dataObject?r("div",[r("label",{attrs:{for:"pmql-query"}},[e._v(e._s(e.$t("PMQL")))]),r("b-form-textarea",{attrs:{id:"json-data",rows:"4"},model:{value:e.pmqlQuery,callback:function(a){e.pmqlQuery=a},expression:"pmqlQuery"}}),r("small",{staticClass:"form-text text-muted"},[e._v("Advanced data search")])],1):e._e()])},EY=[],MY=oe(AY,OY,EY,!1,null,"d454ec3c",null,null);const wx=MY.exports,$Y={components:{FormInput:ee.FormInput,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,draggable:Oa},data(){return{addValue:"",addContent:"",addError:"",existingOptions:[],dataJson:[],displayList:!1}},mounted(){this.existingOptions=JSON.parse(JSON.stringify(this.options))},watch:{displayList(){this.displayList&&(this.dataJson=this.options?JSON.stringify(this.options):"")},options(){this.existingOptions=JSON.parse(JSON.stringify(this.options))}},props:["label","options","helper"],model:{prop:"options",event:"change"},computed:{deleteIf(){return this.options.length>1},isValidJson(){try{return JSON.parse(this.dataJson),!0}catch{return!1}}},methods:{saveDataJson(){this.isValidJson&&this.$emit("change",JSON.parse(this.dataJson))},updateSort(){this.existingOptions.forEach((e,r)=>{e.value=r+1});let t=JSON.parse(JSON.stringify(this.existingOptions));this.$emit("change",t)},resetAdd(){this.addValue="",this.addContent="",this.addError=""},addNewOption(t){let e=JSON.parse(JSON.stringify(this.options));if(isNaN(this.addContent)){this.addError=this.$t("This value must be numeric"),t.preventDefault();return}if(!(0<this.addContent&&this.addContent<13)){this.addError=this.$t("This value must be between 1-12"),t.preventDefault();return}let r=0,a=0;if(this.existingOptions.forEach(i=>{r++,a+=Number(i.content),i.value=r}),a+Number(this.addContent)>12){this.addError=this.$t("The total size of the columns exceeds 12"),t.preventDefault();return}e.push({value:r+1,content:this.addContent}),this.$emit("change",e),this.resetAdd()},removeOption(t){let e=JSON.parse(JSON.stringify(this.options));e.splice(t,1),e.forEach((r,a)=>{r.value=a+1}),this.$emit("change",e)}}};var PY=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("h3",[e._v(e._s(e.label))]),r("form-checkbox",{attrs:{name:"type",toggle:"true",label:e.$t("Show in Json Format"),helper:"","data-cy":"inspector-jsonFormat"},model:{value:e.displayList,callback:function(a){e.displayList=a},expression:"displayList"}}),e.displayList?[r("div",{staticClass:"alert",class:{"alert-success":e.isValidJson,"alert-danger":!e.isValidJson}},[e.isValidJson?r("span",[e._v("Valid JSON Data Object")]):r("span",[e._v("Invalid JSON Data Object")])]),r("form-text-area",{attrs:{name:"dataJson",label:e.$t("Json Options"),rows:"8",helper:e.$t("It must be a correct json format"),"data-cy":"inspector-dataJson"},model:{value:e.dataJson,callback:function(a){e.dataJson=a},expression:"dataJson"}}),r("b-btn",{attrs:{disabled:!e.isValidJson,"data-cy":"inspector-dataJson-save"},on:{click:e.saveDataJson}},[e._v(e._s(e.$t("Save")))])]:[r("table",{staticClass:"table table-sm"},[r("thead",{staticClass:"thead-dark"},[r("tr",[r("th",[e._v(e._s(e.$t("Column")))]),r("th",[e._v(e._s(e.$t("Colspan")))]),r("th",[e._v(e._s(e.$t("Remove")))])])]),r("draggable",{attrs:{element:"tbody",group:"options"},on:{update:e.updateSort},model:{value:e.existingOptions,callback:function(a){e.existingOptions=a},expression:"existingOptions"}},e._l(e.existingOptions,function(a,i){return r("tr",{key:i,attrs:{"data-cy":`inspector-columns-tr-${i}`}},[r("td",[e._v(e._s(a.value))]),r("td",[e._v(e._s(a.content))]),r("td",[e.deleteIf?r("button",{staticClass:"btn btn-danger btn-sm",attrs:{"data-cy":"inspector-columns-remove","aria-label":e.$t("Delete")},on:{click:function(n){return e.removeOption(i)}}},[e._v("x ")]):e._e()])])}),0)],1),r("b-btn",{directives:[{name:"b-modal",rawName:"v-b-modal.addOptionModal",modifiers:{addOptionModal:!0}}],attrs:{"data-cy":"inspector-columns-add"}},[e._v(e._s(e.$t("Add Column")))]),e.helper?r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.helper)))]):e._e(),r("b-modal",{attrs:{"ok-title":e.$t("Ok"),"cancel-title":e.$t("Cancel"),id:"addOptionModal",title:e.$t("Add New Column"),"data-cy":"inspector-add-column-modal"},on:{cancel:e.resetAdd,ok:e.addNewOption}},[r("form-input",{attrs:{label:e.$t("Column Width"),validate:"required|numeric|between:1,12",error:this.addError,"data-cy":"inspector-add-column-width"},model:{value:e.addContent,callback:function(a){e.addContent=a},expression:"addContent"}})],1)]],2)},DY=[],IY=oe($Y,PY,DY,!1,null,null,null,null);const Cx=IY.exports,Lte="",zY={components:{MustacheHelper:Hi},mixins:[],props:{value:String},data(){return{field:"",dataMapping:[],options:[]}},methods:{loadOptions(){const t=this.getConfig();let e=t.endpoint;this.options=[],window.ProcessMaker.apiClient.get(`/data_sources/${t.dataSource}`).then(r=>{let a=window._.get(r,`data.endpoints.${e}`,null);if(this.dsEndpoint=a,a===null)return;let i=window._.get(a,"dataMapping",[]);this.options=i.map(n=>n.key)})},getConfig(){try{return JSON.parse(this.value)}catch{return{}}},setConfig(t,e){const r=this.getConfig();JSON.stringify(r[t])!==JSON.stringify(e)&&(r[t]=e,this.$emit("input",JSON.stringify(r)))},removeRowIndex(t){this.dataMapping.splice(t,1)},addMapping(){this.dataMapping.push({key:"",value:""})}},watch:{dataMapping:{deep:!0,immediate:!0,handler(t){this.setConfig("dataMapping",t)}},value:{immediate:!0,handler(){const t=this.getConfig().dataMapping;t&&(this.dataMapping.splice(0),t.forEach(e=>{this.dataMapping.push(e)}))}}}};var LY=function(){var e=this,r=e._self._c;return r("div",[r("div",{staticClass:"d-flex mb-1"},[r("label",{staticClass:"flex-grow-1 m-0"},[e._v(e._s(e.$t("Output Variable Property Mapping")))]),r("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm px-2",attrs:{type:"button"},on:{click:e.addMapping}},[e._v("+ "+e._s(e.$t("Property"))+" ")])]),r("table",{staticClass:"table table-striped table-sm border mb-1"},[r("thead",[r("tr",[r("th",{attrs:{scope:"col"}},[r("div",{staticClass:"float-left"},[e._v(e._s(e.$t("Source")))]),e._v(" "),r("mustache-helper",{staticClass:"float-left ml-2"})],1),r("th",{attrs:{scope:"col"}},[r("div",{staticClass:"float-left"},[e._v(e._s(e.$t("Form Variable")))]),e._v(" "),r("mustache-helper",{staticClass:"float-left ml-2"})],1),r("th",{attrs:{scope:"col"}},[e._v(" ")])])]),r("tbody",e._l(e.dataMapping,function(a,i){return r("tr",{key:i},[r("td",{staticClass:"p-1"},[r("input",{directives:[{name:"model",rawName:"v-model",value:a.value,expression:"row.value"}],staticClass:"form-control",attrs:{name:"value",placeholder:e.$t("Leave blank to map all response data"),type:"text"},domProps:{value:a.value},on:{input:function(n){n.target.composing||e.$set(a,"value",n.target.value)}}})]),r("td",{staticClass:"p-1"},[r("input",{directives:[{name:"model",rawName:"v-model",value:a.key,expression:"row.key"}],staticClass:"form-control",attrs:{name:"key",placeholder:e.$t("The Request variable is a new/existing variable"),type:"text"},domProps:{value:a.key},on:{input:function(n){n.target.composing||e.$set(a,"key",n.target.value)}}})]),r("td",{staticClass:"align-middle text-right p-1"},[r("a",{staticClass:"btn btn-sm btn-danger",attrs:{href:"javascript:void(0)"},on:{click:function(n){return e.removeRowIndex(i)}}},[r("i",{staticClass:"fa fa-trash-alt"})])])])}),0)]),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(" "+e._s(e.$t("Properties to map from the Data Connector into the output variable"))+" "),r("br"),e._v(" "+e._s(e.$t("(If empty, all data returned will be mapped to the output variable)"))+" ")])])},jY=[],NY=oe(zY,LY,jY,!1,null,"831d025b",null,null);const Xp=NY.exports,jte="",RY={props:["value","helper"],components:{MonacoEditor:_a},data(){return{mode:"basic",jsValue:"",basicValue:"",monacoOptions:{lineNumbers:"off",glyphMargin:!1,folding:!1,lineDecorationsWidth:0,lineNumbersMinChars:0,minimap:{enabled:!1},fixedOverflowWidgets:!0,automaticLayout:!0}}},watch:{value:{handler(){H.isEqual(this.configValue,this.value)||(this.mode="basic",this.basicValue="",this.jsValue="",this.value&&(typeof this.value=="string"?(this.mode="basic",this.effectiveValue=this.value):(this.mode=this.value.mode,this.effectiveValue=this.value.value)))},immediate:!0},mode(){this.emit()},jsValue(){this.emit()},basicValue(){this.emit()}},computed:{effectiveValue:{get(){return this.mode==="js"?this.jsValue:this.basicValue},set(t){this.mode==="js"?this.jsValue=t:this.basicValue=t}},configValue(){return{mode:this.mode,value:this.effectiveValue}}},methods:{emit(){this.$emit("input",this.configValue)}}};var FY=function(){var e=this,r=e._self._c;return r("div",[r("label",[e._v(e._s(e.$t("Default Value"))+" ")]),r("div",{staticClass:"float-right buttons"},[r("b-button",{class:{active:e.mode==="basic"},attrs:{title:e.$t("Basic Mode"),variant:"light",size:"sm","data-cy":"inspector-defaultValue-basic"},on:{click:function(a){e.mode="basic"}}},[r("i",{staticClass:"fas fa-i-cursor"})]),r("b-button",{class:{active:e.mode==="js"},attrs:{title:e.$t("Javascript"),variant:"light",size:"sm","data-cy":"inspector-defaultValue-js"},on:{click:function(a){e.mode="js"}}},[r("i",{staticClass:"fab fa-js-square"})])],1),e.mode==="basic"?r("div",[r("b-form-input",{attrs:{"data-cy":"inspector-defaultValue-basicValue"},model:{value:e.basicValue,callback:function(a){e.basicValue=a},expression:"basicValue"}}),e.helper?r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.helper)))]):e._e()],1):e._e(),e.mode==="js"?r("div",[r("MonacoEditor",{staticClass:"editor",attrs:{options:e.monacoOptions,language:"javascript","data-cy":"inspector-defaultValue-jsValue"},model:{value:e.jsValue,callback:function(a){e.jsValue=a},expression:"jsValue"}}),e.helper?r("small",{staticClass:"form-text text-muted mt-2"},[e._v(e._s(e.$t(e.helper)))]):e._e()],1):e._e()])},qY=[],BY=oe(RY,FY,qY,!1,null,"ae4176b8",null,null);const ef=BY.exports,WY={props:["optionValue","optionContent"],data(){},watch:{},computed:{},mounted(){},methods:{}};var VY=function(){var e=this,r=e._self._c;return e.showOptionCard?r("div",{staticClass:"card"},[e.optionCardType=="insert"?r("div",{staticClass:"card-header pl-2"},[e._v(" "+e._s(e.$t("Add Option"))+" ")]):r("div",{staticClass:"card-header"},[e._v(" "+e._s(e.$t("Edit Option"))+" ")]),r("div",{staticClass:"card-body p-2"},[r("label",{attrs:{for:"option-value"}},[e._v(e._s(e.$t("Value")))]),r("b-form-input",{attrs:{id:"option-value",classs:e.optionKeyClass},model:{value:e.optionValue,callback:function(a){e.optionValue=a},expression:"optionValue"}}),e.optionError?r("div",{staticClass:"invalid-feedback d-block text-right"},[r("div",[e._v(e._s(e.optionError))])]):e._e(),r("label",{staticClass:"mt-3",attrs:{for:"option-content"}},[e._v(e._s(e.$t("Content")))]),r("b-form-input",{attrs:{id:"option-content"},model:{value:e.optionContent,callback:function(a){e.optionContent=a},expression:"optionContent"}}),r("div",{staticClass:"card-footer pr-1 mt-3 text-right"},[r("button",{staticClass:"btn btn-sm btn-outline-secondary mr-3",attrs:{type:"button"},on:{click:function(a){e.showOptionCard=!1}}},[e._v(" "+e._s(e.$t("Close"))+" ")]),r("button",{staticClass:"btn btn-sm btn-secondary",attrs:{type:"button"},on:{click:function(a){return e.addOption()}}},[e._v(" "+e._s(e.$t("Save"))+" ")])])],1)]):e._e()},UY=[],GY=oe(WY,VY,UY,!1,null,null,null,null);const Tx=GY.exports,Nte="",HY={components:{RequiredAsterisk:ee.RequiredAsterisk},mixins:[ee.ValidationMixin],inheritAttrs:!1,props:["label","error","options","helper","name","value","selectedControl"],computed:{classList(){return{"has-errors":this.validator&&this.validator.errorCount||this.error}}},methods:{getLabelFromValue(t){const e=this.options.find(r=>r.value==t);return e?e.content:null}}};var YY=function(){var e=this,r=e._self._c;return r("div",[r("required-asterisk"),r("label",{staticClass:"typo__label"},[e._v(e._s(e.label))]),r("multiselect",e._g(e._b({class:e.classList,attrs:{value:e.value,placeholder:e.$t("Select..."),"show-labels":!1,options:e.options.map(a=>a.value),"custom-label":e.getLabelFromValue}},"multiselect",e.$attrs,!1),e.$listeners),[r("template",{slot:"noResult"},[e._v(" "+e._s(e.$t("No elements found. Consider changing the search query."))+" ")]),r("template",{slot:"noOptions"},[e._v(" "+e._s(e.$t("No Data Available"))+" ")])],2),e.validator&&e.validator.errorCount||e.error?r("div",{staticClass:"invalid-feedback d-block"},[e._l(e.validator.errors.get(e.name),function(a,i){return r("div",{key:i},[e._v(" "+e._s(a)+" ")])}),e.error?r("div",[e._v(e._s(e.error))]):e._e()],2):e._e(),e.helper?r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.helper))]):e._e()],1)},QY=[],KY=oe(HY,YY,QY,!1,null,null,null,null);const tf=KY.exports,Rte="",JY={props:["value"],components:{FileUpload:Gf},data(){return{files:[]}},computed:{owner(){return this.$parent.$parent.inspection.config}},methods:{editSave(t){let e=new FileReader;e.readAsDataURL(t.file),e.addEventListener("load",()=>{let r=t.file.name.split(".");this.owner.name=escape(r[0]),this.$emit("input",e.result)},!1)}}};var ZY=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("file-upload",{ref:"upload",staticClass:"btn btn-sm btn-primary",attrs:{extensions:"gif,jpg,jpeg,png,webp",accept:"image/png,image/gif,image/jpeg,image/webp",name:"avatar"},on:{"input-file":e.editSave},model:{value:e.files,callback:function(a){e.files=a},expression:"files"}},[e._v(" "+e._s(e.$t("Upload"))+" ")]),r("small",{staticClass:"form-text text-muted",attrs:{"data-v-7779e22f":""}},[e._v(e._s(e.$t("Preview")))]),r("div",{staticClass:"image-preview"},[r("img",{staticStyle:{height:"4em"},attrs:{src:e.value}})])],1)},XY=[],eQ=oe(JY,ZY,XY,!1,null,"70a59c9a",null,null);const Ax=eQ.exports,tQ={props:["value","selectedControl"],components:{FormInput:ee.FormInput,FormCheckbox:ee.FormCheckbox},data(){return{imageName:null}},computed:{renderImage:{get(){return this.selectedControl.config.renderImage},set(t){this.selectedControl.config.renderImage=t}},mode(){return this.$root.$children[0].mode}},watch:{value(){this.value==null?this.renderImage=!1:(this.renderImage=!0,this.imageName=this.value)},imageName(){this.$emit("input",this.imageName)},renderImage(){this.renderImage||(this.renderImage=!1,this.imageName=null,this.$emit("input",this.imageName))}},mounted(){this.value&&(this.renderImage=!0,this.imageName=this.value)}};var rQ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("form-checkbox",{attrs:{label:e.$t("Render image from a variable name"),"data-cy":"inspector-renderImage"},model:{value:e.renderImage,callback:function(a){e.renderImage=a},expression:"renderImage"}}),e.renderImage?r("form-input",{attrs:{label:e.$t("Variable Name"),"data-cy":"inspector-variableName"},model:{value:e.imageName,callback:function(a){e.imageName=a},expression:"imageName"}}):e._e()],1)},aQ=[],iQ=oe(tQ,rQ,aQ,!1,null,null,null,null);const Ox=iQ.exports,Fte="",nQ={props:{builder:Object,selectedControl:Object,formConfig:Array,value:null},data(){return{suggestVariables:!1,localValue:this.value||"",open:!1}},computed:{allOptions(){const t=this.builder.variablesTree,{variables:e,prefix:r,parent_prefix:a}=this.loadVariables({items:t}),i=r.length,n=a.length;return r?[...Object.keys(e).filter(s=>s.substr(0,i)===r).map(s=>s.substr(i)),...Object.keys(e).filter(s=>s.substr(0,n)===a).map(s=>`_parent.${s.substr(n)}`)]:Object.keys(e)},options(){if(!this.localValue)return;const t=new RegExp(this.localValue.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\.\d+/g,".index"),"g");return this.allOptions.filter(e=>e.match(t)).splice(0,5).map(e=>({value:e.replace(t,this.localValue),text:e.replace(t,`<b>${this.localValue}</b>`)}))}},methods:{loadVariables(t,e="",r={},a={prefix:"",parent_prefix:""}){const i=e;return t.items?(e+=t.prefix||"",t.items.forEach(n=>{n.config===this.selectedControl.config&&(a.prefix=e,a.parent_prefix=i),this.loadVariables(n,e,r,a)})):r[`${e}${t.name}`]=null,{variables:r,...a}},choose(t){this.localValue=t.value,this.$emit("input",this.localValue),this.$emit("change",this.localValue),this.open=!1},blur(){setTimeout(()=>this.open=!1,500)},focus(){this.open=!0},input(){this.$emit("input",this.localValue)},change(){this.open=!0,this.$emit("change",this.localValue)}},watch:{value(t){t!=this.localValue&&(this.localValue=t)}}};var sQ=function(){var e=this,r=e._self._c;return r("b-input-group",{scopedSlots:e._u([e.suggestVariables?{key:"append",fn:function(){return[r("b-dropdown",{ref:"dropdown",attrs:{text:"(x)",right:"","no-caret":"",variant:"outline-secondary","menu-class":{"input-variable-open":e.open}}},e._l(e.options,function(a){return r("b-dropdown-item",{key:a.value,staticClass:"text-small",on:{click:function(i){return e.choose(a)}}},[r("small",[r("code",{domProps:{innerHTML:e._s(a.text)}})])])}),1)]},proxy:!0}:null],null,!0)},[r("b-form-input",e._b({on:{focus:e.focus,input:e.input,blur:e.blur,change:e.change},model:{value:e.localValue,callback:function(a){e.localValue=a},expression:"localValue"}},"b-form-input",e.$attrs,!1))],1)},oQ=[],lQ=oe(nQ,sQ,oQ,!1,null,null,null,null);const rf=lQ.exports,qte="",uQ={props:["value","screenType"],inheritAttrs:!1,components:{FormInput:ee.FormInput,FormCheckbox:ee.FormCheckbox},data(){return{options:[{value:"new",text:this.$t("New Array of Objects")},{value:"existing",text:this.$t("Existing Array")}],settings:{type:"new",varname:"",times:"3",add:!1}}},watch:{settings:{handler(){this.$emit("input",this.settings),this.$emit("setName",this.settings.varname)},deep:!0},value:{handler(){this.settings=this.value},immediate:!0}},computed:{}};var cQ=function(){var e=this,r=e._self._c;return r("div",[e.screenType=="form"?r("div",{staticClass:"form-group border-bottom pb-3"},[r("label",{attrs:{for:"type"}},[e._v(e._s(e.$t("Data Source")))]),r("b-form-select",{attrs:{id:"type",options:e.options,"data-cy":"inspector-source"},model:{value:e.settings.type,callback:function(a){e.$set(e.settings,"type",a)},expression:"settings.type"}})],1):e._e(),r("div",{staticClass:"form-group border-bottom"},[r("FormInput",{attrs:{label:e.$t("Variable Name"),name:e.$t("Variable Name"),helper:e.$t("This variable will contain an array of objects"),validation:"regex:/^(?:[A-Z_.a-z])(?:[0-9A-Z_.a-z])*$/|required","data-cy":"inspector-name"},model:{value:e.settings.varname,callback:function(a){e.$set(e.settings,"varname",a)},expression:"settings.varname"}})],1),e.screenType=="form"&&e.settings.type==="new"?r("div",{staticClass:"form-group border-bottom"},[r("FormInput",{attrs:{label:e.$t("Default Loop Count"),name:e.$t("Default Loop Count"),helper:e.$t("Number of times to show the loop. Value must be greater than zero."),validation:"required|integer|min:1|max:100","data-cy":"inspector-times"},model:{value:e.settings.times,callback:function(a){e.$set(e.settings,"times",a)},expression:"settings.times"}})],1):e._e(),e.screenType=="form"?r("form-checkbox",{attrs:{name:"add",label:e.$t("Allow additional loops"),helper:e.$t("Check this box to allow task assignee to add additional loops"),"data-cy":"inspector-add"},model:{value:e.settings.add,callback:function(a){e.$set(e.settings,"add",a)},expression:"settings.add"}}):e._e()],1)},dQ=[],pQ=oe(uQ,cQ,dQ,!1,null,null,null,null);const Ex=pQ.exports,Bte="",fQ={components:{draggable:Oa,MonacoEditor:_a,MustacheHelper:Hi,CollectionSelectList:Zp},props:["options","selectedControl"],model:{prop:"options",event:"change"},data(){return{optionError:"",dragging:!1,dataSourceValues:ea,dataSources:Ts,dataSource:ea.provideData,jsonData:"",key:null,value:null,dataName:"",collectionOptions:null,selectedDataSource:"",dataSourcesList:[],selectedEndPoint:"",endpoints:{},pmqlQuery:"",optionsList:[],showOptionCard:!1,showRemoveWarning:!1,showJsonEditor:!1,optionCardType:"",editIndex:null,removeIndex:null,optionValue:"",optionContent:"",showRenderAs:!1,renderAs:"dropdown",allowMultiSelect:!1,defaultOptionKey:!1,selectedOptions:[],renderAsOptions:[{text:this.$t("Dropdown/Multiselect"),value:"dropdown"},{text:this.$t("Radio/Checkbox Group"),value:"checkbox"}],monacoOptions:{automaticLayout:!0,fontSize:8,language:"json",formatOnPaste:!0,formatOnType:!0},monacoLargeOptions:{automaticLayout:!0},showPopup:!1,returnValueOptions:[{text:this.$t("Single Value"),value:"single"},{text:this.$t("Object"),value:"object"}],valueTypeReturned:""}},watch:{allowMultiSelect(t){this.selectedControl.config.dataFormat=t?"array":"string"},options(t){Object.keys(t).forEach(e=>{typeof t[e]<"u"&&this.$set(this,e,t[e])})},dataSource(t){switch(this.showRenderAs=!0,t){case"dataConnector":this.jsonData="",this.dataName="",this.collectionOptions=null,this.getDataSourceList();break;case"dataObject":this.jsonData="",this.selectedDataSource="",this.collectionOptions=null;break;case"provideData":this.dataName="",this.selectedDataSource="",this.collectionOptions=null;break;case"collection":this.showRenderAs=!1,this.jsonData="",this.dataName="",this.selectedDataSource="";break}},dataObjectOptions(t){this.$emit("change",t)},dataSourcesList(){this.dataSourcesList.some(t=>t.value===this.selectedDataSource)||this.dataSourcesList.length>0&&(this.selectedDataSource=this.dataSourcesList[0].value)},endPointList(){this.endPointList.some(t=>t.value===this.selectedEndPoint)||this.endPointList.length>0&&(this.selectedEndPoint=this.endPointList[0].value)}},computed:{showTypeOfValueReturned(){return this.dataSource!==ea.collection},endPointList(){return H.get(this.endpoints,this.selectedDataSource,[])},dataSourceTypes(){return typeof this.options.allowMultiSelect>"u"?[this.dataSources[0],this.$t(this.dataSources[1])]:this.dataSources.map(t=>({value:t.value,text:this.$t(t.text)}))},optionKeyClass(){return this.optionError?"is-invalid":""},keyField(){return this.key||"value"},valueField(){return this.value||"content"},currentItemToDelete(){if(this.removeIndex!==null&&this.optionsList.length>0&&this.optionsList[this.removeIndex]!==void 0){let t=this.optionsList[this.removeIndex][this.valueField];return this.$t('Are you sure you want to delete "{{item}}" option?',{item:t})}return""},dataObjectOptions(){return this.dataName||(this.dataName=this.options.dataName?this.options.dataName:"response"),{dataSource:this.dataSource,jsonData:this.jsonData,dataName:this.dataName,collectionOptions:this.collectionOptions,selectedDataSource:this.selectedDataSource,selectedEndPoint:this.selectedEndPoint,key:this.key,value:this.value,pmqlQuery:this.pmqlQuery,defaultOptionKey:this.defaultOptionKey,selectedOptions:this.selectedOptions,optionsList:this.optionsList,showRenderAs:this.showRenderAs,renderAs:this.renderAs,allowMultiSelect:this.allowMultiSelect,showOptionCard:this.showOptionCard,showRemoveWarning:this.showRemoveWarning,showJsonEditor:this.showJsonEditor,editIndex:this.editIndex,removeIndex:this.removeIndex,valueTypeReturned:this.valueTypeReturned}}},created(){this.onDebouncedPmqlChange=H.debounce(t=>{this.onPmqlChange(t)},1500)},mounted(){this.dataSource=this.options.dataSource,this.jsonData=this.options.jsonData,this.dataName=this.options.dataName,this.collectionOptions=this.options.collectionOptions,this.selectedDataSource=this.options.selectedDataSource,this.selectedEndPoint=this.options.selectedEndPoint,this.key=this.options.key,this.value=this.options.value,this.pmqlQuery=this.options.pmqlQuery,this.defaultOptionKey=this.options.defaultOptionKey,this.selectedOptions=this.options.selectedOptions,this.optionsList=this.options.optionsList?this.options.optionsList:[],this.jsonData=JSON.stringify(this.optionsList),this.showRenderAs=this.options.showRenderAs,this.renderAs=this.options.renderAs,this.allowMultiSelect=this.options.allowMultiSelect,this.valueTypeReturned=this.options.valueTypeReturned},methods:{monacoMounted(t){t.getAction("editor.action.formatDocument").run()},getDataSourceList(){this.$dataProvider.get("/data_sources").then(t=>{let e=t.data.data;this.dataSourcesList=[{value:null,text:this.$t("Select...")}].concat(e.map(this.convertToSelectOptions)),this.setEndpointList(e)})},setEndpointList(t){const e={};t.forEach(r=>{const a=r.endpoints?r.endpoints:[];e[r.id]=[{value:null,text:this.$t("Select...")}].concat(Object.keys(a).map(i=>({text:i,value:i})))}),this.endpoints=e},convertToSelectOptions(t){return{value:t.id,text:t.name}},jsonDataChange(){let t=[];try{if(t=JSON.parse(this.jsonData),t.constructor!==Array&&t.constructor!==Object)throw Error("String does not represent a valid JSON")}catch(r){this.jsonError=r.message;return}this.optionsList=[];const e=this;t.forEach(r=>{e.optionsList.push({[e.keyField]:r[e.keyField],[e.valueField]:r[e.valueField]})}),this.jsonError=""},defaultOptionClick(){this.defaultOptionKey===event.target.value&&(this.defaultOptionKey=!1)},rowCss(t){return t%2===0?"striped":"bg-default"},keyChanged(){this.jsonDataChange()},valueChanged(){this.jsonDataChange()},updateSort(){this.jsonData=JSON.stringify(this.optionsList),this.$emit("change",this.dataObjectOptions)},showEditOption(t){this.optionCardType="edit",this.editIndex=t,this.optionContent=this.optionsList[t][this.valueField],this.optionValue=this.optionsList[t][this.keyField],this.optionError=""},showAddOption(){this.optionCardType="insert",this.optionContent="",this.optionValue="",this.showOptionCard=!0,this.optionError="",this.editIndex=null},addOption(){const t=this;if(this.optionCardType==="insert"){if(this.optionsList.find(e=>e[t.keyField]===this.optionValue)){this.optionError="An item with the same key already exists";return}this.optionsList.push({[this.valueField]:this.optionContent,[this.keyField]:this.optionValue})}else{if(this.optionsList.find((e,r)=>e[t.keyField]===this.optionValue&&r!==this.editIndex)){this.optionError="An item with the same key already exists";return}this.optionsList[this.editIndex][this.keyField]=this.optionValue,this.optionsList[this.editIndex][this.valueField]=this.optionContent}this.jsonData=JSON.stringify(this.optionsList),this.showOptionCard=!1,this.optionError="",this.editIndex=null},deleteOption(){this.optionsList.splice(this.removeIndex,1),this.jsonData=JSON.stringify(this.optionsList),this.showRemoveWarning=!1,this.removeIndex=null},removeOption(t){this.removeIndex=t,this.showRemoveWarning=!0},expandEditor(){this.showPopup=!0},closePopup(){this.showPopup=!1},onNLQConversion(t){this.pmqlQuery=t},onPmqlChange(t){this.pmqlQuery=t}}};var hQ=function(){var e=this,r=e._self._c;return r("div",[r("label",{attrs:{for:"data-sources"}},[e._v(e._s(e.$t("Data Source")))]),r("b-form-select",{staticClass:"mb-3",attrs:{id:"data-sources",options:e.dataSourceTypes,"data-cy":"inspector-data-sources"},model:{value:e.dataSource,callback:function(a){e.dataSource=a},expression:"dataSource"}}),!e.showJsonEditor&&e.dataSource===e.dataSourceValues.provideData?r("div",[r("div",{staticClass:"row"},[r("div",{staticClass:"col-10"},[r("label",{attrs:{for:"data-sources"}},[r("b",[e._v(e._s(e.$t("Options")))])])]),r("div",{staticClass:"col-2"},[r("a",{staticClass:"fas fa-plus-square",attrs:{"data-cy":"inspector-add-option"},on:{click:e.showAddOption}})])]),e.showOptionCard?r("div",{staticClass:"card mb-2"},[e.optionCardType=="insert"?r("div",{staticClass:"card-header"},[e._v(" "+e._s(e.$t("Add Option"))+" ")]):r("div",{staticClass:"card-header"},[e._v(" "+e._s(e.$t("Edit Option"))+" ")]),r("div",{staticClass:"card-body p-2"},[r("label",{attrs:{for:"option-value"}},[e._v(e._s(e.$t("Value")))]),r("b-form-input",{attrs:{id:"option-value",classs:e.optionKeyClass,"data-cy":"inspector-option-value"},model:{value:e.optionValue,callback:function(a){e.optionValue=a},expression:"optionValue"}}),e.optionError?r("div",{staticClass:"invalid-feedback d-block text-right"},[r("div",[e._v(e._s(e.optionError))])]):e._e(),r("label",{staticClass:"mt-3",attrs:{for:"option-content"}},[e._v(e._s(e.$t("Content")))]),r("b-form-input",{attrs:{id:"option-content","data-cy":"inspector-option-content"},model:{value:e.optionContent,callback:function(a){e.optionContent=a},expression:"optionContent"}})],1),r("div",{staticClass:"card-footer text-right p-2"},[r("button",{staticClass:"btn btn-sm btn-outline-secondary mr-2",attrs:{type:"button","data-cy":"inspector-option-cancel"},on:{click:function(a){e.showOptionCard=!1}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-sm btn-secondary",attrs:{type:"button","data-cy":"inspector-option-save"},on:{click:function(a){return e.addOption()}}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e._e(),r("div",{staticClass:"row"},[r("div",{staticClass:"col"},[r("draggable",{attrs:{element:"div",group:"options"},on:{update:e.updateSort,start:function(a){e.drag=!0},end:function(a){e.drag=!1}},model:{value:e.optionsList,callback:function(a){e.optionsList=a},expression:"optionsList"}},e._l(e.optionsList,function(a,i){return r("div",{key:a.value},[e.removeIndex===i?r("div",[r("div",{staticClass:"card mb-3 bg-danger text-white text-left mt-2"},[r("div",{staticClass:"card-body p-2",domProps:{innerHTML:e._s(e.currentItemToDelete)}}),r("div",{staticClass:"card-footer text-right p-2"},[r("button",{staticClass:"btn btn-sm btn-light mr-2",attrs:{type:"button","data-cy":"inspector-options-remove-cancel"},on:{click:function(n){e.removeIndex=null}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{type:"button","data-cy":"inspector-options-remove-confirm"},on:{click:function(n){return e.deleteOption()}}},[e._v(" "+e._s(e.$t("Delete"))+" ")])])])]):e._e(),e.editIndex===i?r("div",[r("div",{staticClass:"card my-2"},[e.optionCardType=="insert"?r("div",{staticClass:"card-header"},[e._v(" "+e._s(e.$t("Add Option"))+" ")]):r("div",{staticClass:"card-header"},[e._v(" "+e._s(e.$t("Edit Option"))+" ")]),r("div",{staticClass:"card-body p-2"},[r("label",{attrs:{for:"option-value"}},[e._v(e._s(e.$t("Value")))]),r("b-form-input",{attrs:{id:"option-value",classs:e.optionKeyClass,"data-cy":"inspector-option-value"},model:{value:e.optionValue,callback:function(n){e.optionValue=n},expression:"optionValue"}}),e.optionError?r("div",{staticClass:"invalid-feedback d-block text-right"},[r("div",[e._v(e._s(e.optionError))])]):e._e(),r("label",{staticClass:"mt-3",attrs:{for:"option-content"}},[e._v(e._s(e.$t("Content")))]),r("b-form-input",{attrs:{id:"option-content","data-cy":"inspector-option-content"},model:{value:e.optionContent,callback:function(n){e.optionContent=n},expression:"optionContent"}})],1),r("div",{staticClass:"card-footer text-right p-2"},[r("button",{staticClass:"btn btn-sm btn-outline-secondary mr-2",attrs:{type:"button"},on:{click:function(n){e.editIndex=null}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-sm btn-secondary",attrs:{type:"button","data-cy":"inspector-option-save"},on:{click:function(n){return e.addOption()}}},[e._v(" "+e._s(e.$t("Update"))+" ")])])])]):e._e(),r("div",{staticClass:"row border-top",class:e.rowCss(i)},[r("div",{staticClass:"col-1",staticStyle:{cursor:"grab"}},[r("span",{staticClass:"fas fa-arrows-alt-v"})]),r("div",{staticClass:"col-1 d-flex align-items-center"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.defaultOptionKey,expression:"defaultOptionKey"}],staticClass:"form-check",attrs:{type:"radio",name:"defaultOptionGroup"},domProps:{value:a[e.keyField],checked:e._q(e.defaultOptionKey,a[e.keyField])},on:{click:e.defaultOptionClick,change:function(n){e.defaultOptionKey=a[e.keyField]}}})]),r("div",{staticClass:"col-5",staticStyle:{cursor:"grab"}},[e._v(" "+e._s(a[e.valueField])+" ")]),r("div",{staticClass:"col-1"},[r("a",{staticClass:"fas fa-cog",staticStyle:{cursor:"pointer"},attrs:{"data-cy":"inspector-options-edit"},on:{click:function(n){return e.showEditOption(i)}}})]),r("div",{staticClass:"col-1"},[r("a",{staticClass:"fas fa-trash-alt",staticStyle:{cursor:"pointer"},attrs:{"data-cy":"inspector-options-remove"},on:{click:function(n){return e.removeOption(i)}}})])])])}),0)],1)]),r("div",{staticClass:"row"},[r("div",{staticClass:"col text-right"},[r("button",{staticClass:"edit-json text-muted mt-1 mb-3",attrs:{type:"button","data-cy":"inspector-edit-json"},on:{click:function(a){e.showJsonEditor=!0}}},[r("i",{staticClass:"fas fa-code",attrs:{"aria-hidden":"true"}}),e._v(" "+e._s(e.$t("Edit as JSON"))+" ")])])])]):e._e(),e.dataSource===e.dataSourceValues.dataObject||e.dataSource===e.dataSourceValues.dataConnector?r("div",[r("label",{attrs:{for:"element-name"}},[e._v(e._s(e.$t("Options Variable")))]),r("mustache-helper"),r("b-form-input",{attrs:{id:"element-name",placeholder:"Request Variable Name","data-cy":"inspector-options-variable"},model:{value:e.dataName,callback:function(a){e.dataName=a},expression:"dataName"}}),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(e._s(e.$t("Get options from this variable. Must be an array.")))])],1):e._e(),e.dataSource===e.dataSourceValues.dataObject?r("div",[r("label",{attrs:{for:"value"}},[e._v(e._s(e.$t("Option Label Shown")))]),r("b-form-input",{attrs:{id:"value",placeholder:"Request Variable Property","data-cy":"inspector-options-label"},on:{change:e.valueChanged},model:{value:e.value,callback:function(a){e.value=a},expression:"value"}}),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(e._s(e.$t("Enter the property name from the Request data variable that displays to the user on the screen.")))])],1):e._e(),e.dataSource===e.dataSourceValues.collection?r("div",[r("collection-select-list",{model:{value:e.collectionOptions,callback:function(a){e.collectionOptions=a},expression:"collectionOptions"}})],1):e._e(),e.showRenderAs?r("div",[r("div",{staticClass:"row mb-3"},[r("div",{staticClass:"col"},[r("label",{attrs:{for:"render-as"}},[e._v(e._s(e.$t("Show Control As")))]),r("b-form-select",{attrs:{id:"render-as",options:e.renderAsOptions,"data-cy":"inspector-render-as"},model:{value:e.renderAs,callback:function(a){e.renderAs=a},expression:"renderAs"}})],1)]),r("div",{staticClass:"row mb-3"},[r("div",{staticClass:"col-12"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.allowMultiSelect,expression:"allowMultiSelect"}],attrs:{type:"checkbox","data-cy":"inspector-allow-multi-select"},domProps:{checked:Array.isArray(e.allowMultiSelect)?e._i(e.allowMultiSelect,null)>-1:e.allowMultiSelect},on:{change:function(a){var i=e.allowMultiSelect,n=a.target,s=!!n.checked;if(Array.isArray(i)){var o=null,u=e._i(i,o);n.checked?u<0&&(e.allowMultiSelect=i.concat([o])):u>-1&&(e.allowMultiSelect=i.slice(0,u).concat(i.slice(u+1)))}else e.allowMultiSelect=s}}}),e._v(" "+e._s(e.$t("Allow Multiple Selections"))+" ")])])]):e._e(),e.showJsonEditor&&e.dataSource===e.dataSourceValues.provideData?r("div",[r("div",{staticClass:"mb-2"},[r("label",{attrs:{for:"json-data"}},[e._v(e._s(e.$t("JSON Data")))]),r("button",{staticClass:"btn-sm float-right",attrs:{type:"button","data-cy":"inspector-monaco-json-expand"},on:{click:e.expandEditor}},[r("i",{staticClass:"fas fa-expand"})])]),r("div",{staticClass:"small-editor-container"},[r("monaco-editor",{staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"inspector-monaco-json"},on:{change:e.jsonDataChange,editorDidMount:e.monacoMounted},model:{value:e.jsonData,callback:function(a){e.jsonData=a},expression:"jsonData"}})],1),r("b-modal",{attrs:{size:"lg",centered:"",title:e.$t("Script Config Editor")},model:{value:e.showPopup,callback:function(a){e.showPopup=a},expression:"showPopup"}},[r("div",{staticClass:"editor-container"},[r("monaco-editor",{staticClass:"editor",attrs:{options:e.monacoLargeOptions,language:"json","data-cy":"inspector-monaco-json-expanded"},on:{change:e.jsonDataChange},model:{value:e.jsonData,callback:function(a){e.jsonData=a},expression:"jsonData"}})],1),r("div",{attrs:{slot:"modal-footer"},slot:"modal-footer"},[r("b-button",{staticClass:"btn btn-secondary text-uppercase",attrs:{"data-cy":"inspector-monaco-json-expanded-close"},on:{click:e.closePopup}},[e._v(" "+e._s(e.$t("Close"))+" ")])],1)]),r("button",{staticClass:"edit-json text-muted mt-1 mb-3",attrs:{type:"button"},on:{click:function(a){e.showJsonEditor=!1}}},[r("i",{staticClass:"fas fa-code",attrs:{"aria-hidden":"true"}}),e._v(" "+e._s(e.$t("Edit as Option List"))+" ")])],1):e._e(),e.showTypeOfValueReturned?r("div",[r("label",{attrs:{for:"value-type-returned"}},[e._v(e._s(e.$t("Type of Value Returned")))]),r("b-form-select",{attrs:{id:"value-type-returded",options:e.returnValueOptions,"data-cy":"inspector-value-returned"},model:{value:e.valueTypeReturned,callback:function(a){e.valueTypeReturned=a},expression:"valueTypeReturned"}}),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(e._s(e.$t("Select 'Single Value' to use parts of the selected object. Select 'Object' to use the entire selected value.")))])],1):e._e(),e.dataSource===e.dataSourceValues.dataConnector?r("div",[e.valueTypeReturned==="single"?r("div",[r("label",{attrs:{for:"key"}},[e._v(e._s(e.$t("Value")))]),r("mustache-helper"),r("b-form-input",{attrs:{id:"key","data-cy":"inspector-datasource-value"},on:{change:e.keyChanged},model:{value:e.key,callback:function(a){e.key=a},expression:"key"}}),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(e._s(e.$t("Key name in the selected object to use as the value of this control. Leave blank to use the entire selected value.")))])],1):e._e(),r("label",{attrs:{for:"value"}},[e._v(e._s(e.$t("Content")))]),r("mustache-helper"),r("b-form-input",{attrs:{id:"value","data-cy":"inspector-datasource-content"},on:{change:e.valueChanged},model:{value:e.value,callback:function(a){e.value=a},expression:"value"}}),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(e._s(e.$t("Content to display to the user in the select list.")))])],1):e._e(),e.valueTypeReturned==="single"&&e.dataSource===e.dataSourceValues.dataObject?r("div",[r("label",{attrs:{for:"key"}},[e._v(e._s(e.$t("Variable Data Property")))]),r("b-form-input",{attrs:{id:"key",placeholder:"Request Variable Property","data-cy":"inspector-options-value"},on:{change:e.keyChanged},model:{value:e.key,callback:function(a){e.key=a},expression:"key"}}),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(e._s(e.$t("Enter the property name from the Request data variable that will be passed as the value when selected.")))])],1):e._e(),e.dataSource===e.dataSourceValues.dataConnector?r("div",[r("label",{attrs:{for:"data-sources-list"}},[e._v(e._s(e.$t("Data Connector")))]),r("b-form-select",{class:e.selectedDataSource?"":"is-invalid",attrs:{id:"data-sources-list",options:e.dataSourcesList,"data-cy":"inspector-data-connector"},model:{value:e.selectedDataSource,callback:function(a){e.selectedDataSource=a},expression:"selectedDataSource"}}),e.selectedDataSource?e._e():r("div",{staticClass:"invalid-feedback"},[e._v(e._s(e.$t("An Data Connector must be selected")))]),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(e._s(e.$t("Data Connector to use")))])],1):e._e(),e.dataSource===e.dataSourceValues.dataConnector?r("div",[r("label",{attrs:{for:"endpoint-list"}},[e._v(e._s(e.$t("End Point")))]),r("b-form-select",{class:e.selectedDataSource&&!e.selectedEndPoint?"is-invalid":"",attrs:{id:"endpoint-list",options:e.endPointList,"data-cy":"inspector-endpoint"},model:{value:e.selectedEndPoint,callback:function(a){e.selectedEndPoint=a},expression:"selectedEndPoint"}}),e.selectedDataSource&&!e.selectedEndPoint?r("div",{staticClass:"invalid-feedback"},[e._v(e._s(e.$t("An Endpoint must be selected")))]):e._e(),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(e._s(e.$t("Endpoint to populate select")))])],1):e._e(),e.dataSource===e.dataSourceValues.dataConnector?r("div",[r("pmql-input",{staticClass:"mb-1",attrs:{"search-type":"collections","input-label":"PMQL",condensed:!0,"ai-enabled":!0,placeholder:e.$t("PMQL")},model:{value:e.pmqlQuery,callback:function(a){e.pmqlQuery=a},expression:"pmqlQuery"}}),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Advanced data search")))])],1):e._e()],1)},mQ=[],gQ=oe(fQ,hQ,mQ,!1,null,"e0acf8b1",null,null);const Mx=gQ.exports,Wte="",vQ={components:{MustacheHelper:Hi},mixins:[],props:{value:String},data(){return{field:"",outboundConfig:[],types:["PARAM","HEADER","BODY"],apiProperties:[],type:null}},watch:{outboundConfig:{deep:!0,immediate:!0,handler(t){this.setConfig("outboundConfig",t)}},value:{immediate:!0,handler(){const{outboundConfig:t}=this.getConfig();t&&(this.outboundConfig.splice(0),t.forEach(e=>{this.outboundConfig.push(e)}))}}},methods:{getConfig(){try{return JSON.parse(this.value)}catch{return{}}},setConfig(t,e){const r=this.getConfig();JSON.stringify(r[t])!==JSON.stringify(e)&&(r[t]=e,this.$emit("input",JSON.stringify(r)))},removeRowIndex(t){this.outboundConfig.splice(t,1)},addMapping(){this.outboundConfig.push({type:"PARAM",key:"",value:""})},loadOptions(t){const e=this.getConfig();if(this.apiProperties=[],H.isNil(e.dataSource)||H.isNil(e.endpoint))return;let{endpoint:r}=e;const a=e.endpoint.split(":");a.length>1&&(a.shift(),r=a.join("").trim()),window.ProcessMaker.apiClient.get(`/data_sources/${e.dataSource}`).then(i=>{const n=this.outboundConfig[t].type,s=H.get(i,`data.endpoints.${r}`,null);if(s!==null){if(this.apiProperties=[],n==="HEADER"){const o=H.get(s,"headers",[]);this.apiProperties=o.reduce((u,l)=>(H.findIndex(this.apiProperties,{key:l.key})<0&&u.push(l.key),u),[])}if(n==="PARAM"){const o=H.get(s,"params",[]);this.apiProperties=o.reduce((l,c)=>(H.findIndex(this.apiProperties,{key:c.key})<0&&l.push(c.key),l),[]);const u=(s.url||"").matchAll(/\{\{(.+?)}}/gm);for(const l of u){const c=l[1];this.apiProperties.every(d=>d!==c)&&this.apiProperties.push(c)}}if(n==="BODY"){const o=(s.body||"").matchAll(/\{\{(.+?)}}/gm);for(const u of o){const l=u[1];this.apiProperties.every(c=>c!==l)&&this.apiProperties.push(l)}}}})}}};var bQ=function(){var e=this,r=e._self._c;return r("div",[r("div",{staticClass:"d-flex mb-1"},[r("label",{staticClass:"flex-grow-1 m-0"},[e._v(e._s(e.$t("Outbound Configuration")))]),r("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm px-2",attrs:{type:"button"},on:{click:e.addMapping}},[e._v(" + "+e._s(e.$t("Property"))+" ")])]),r("table",{staticClass:"table table-striped table-sm border mb-1"},[r("thead",[r("tr",[r("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("Type")))]),r("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("Key")))]),r("th",{attrs:{scope:"col"}},[r("div",{staticClass:"float-left"},[e._v(e._s(e.$t("Value")))]),r("mustache-helper",{staticClass:"float-left ml-2"})],1),r("th",{attrs:{scope:"col"}},[e._v(" ")])])]),r("tbody",e._l(e.outboundConfig,function(a,i){return r("tr",{key:i},[r("td",{staticClass:"p-1"},[r("multiselect",{attrs:{placeholder:e.$t("Select a parameter type"),options:e.types,multiple:!1,"show-labels":!1,searchable:!0,"internal-search":!1},model:{value:a.type,callback:function(n){e.$set(a,"type",n)},expression:"row.type"}})],1),r("td",{staticClass:"p-1"},[r("multiselect",{attrs:{placeholder:e.$t("Select a connector property"),options:e.apiProperties,multiple:!1,"show-labels":!1,searchable:!0,"internal-search":!1},on:{"search-change":function(n){return e.loadOptions(i)},open:function(n){return e.loadOptions(i)}},model:{value:a.key,callback:function(n){e.$set(a,"key",n)},expression:"row.key"}},[r("template",{slot:"noResult"},[e._t("noResult",function(){return[e._v(e._s(e.$t("Not found")))]})],2),r("template",{slot:"noOptions"},[e._t("noOptions",function(){return[e._v(e._s(e.$t("Not available")))]})],2)],2)],1),r("td",{staticClass:"p-1"},[r("input",{directives:[{name:"model",rawName:"v-model",value:a.value,expression:"row.value"}],staticClass:"form-control",attrs:{name:"value",placeholder:e.$t("New Value"),type:"text"},domProps:{value:a.value},on:{input:function(n){n.target.composing||e.$set(a,"value",n.target.value)}}})]),r("td",{staticClass:"align-middle text-right p-1"},[r("a",{staticClass:"btn btn-sm btn-danger",attrs:{href:"javascript:void(0)"},on:{click:function(n){return e.removeRowIndex(i)}}},[r("i",{staticClass:"fa fa-trash-alt"})])])])}),0)]),r("small",{staticClass:"form-text text-muted mb-3"},[e._v(" "+e._s(e.$t("Properties to map from a request variable to a Data Connector property"))+" "),r("br"),e._v(" "+e._s(e.$t("The value can be a string or a mustache expression."))+" "+e._s(e.$t("For example"))+" "),r("span",{pre:!0},[e._v(" {{ var1 }} ")]),e._v(" "+e._s(e.$t("will use the value stored in variable var1"))+" ")])])},yQ=[],SQ=oe(vQ,bQ,yQ,!1,null,"8e9c415d",null,null);const af=SQ.exports,xQ={inheritAttrs:!1,props:["label","helper","formConfig","currentPage"],methods:{getLabelFromValue(t){const e=this.options.find(r=>r.value==t);return e?e.content:null}},computed:{options(){return Object.keys(this.formConfig).filter(t=>t!=this.currentPage).map(t=>({value:t,content:this.formConfig[t].name}))}}};var kQ=function(){var e=this,r=e._self._c;return r("div",[r("label",{staticClass:"typo__label"},[e._v(e._s(e.label))]),r("multiselect",e._g(e._b({attrs:{placeholder:e.$t("Select..."),"show-labels":!1,options:e.options.map(a=>a.value),"custom-label":e.getLabelFromValue}},"multiselect",e.$attrs,!1),e.$listeners),[r("template",{slot:"noResult"},[e._v(" "+e._s(e.$t("No elements found. Consider changing the search query."))+" ")]),r("template",{slot:"noOptions"},[e._v(" "+e._s(e.$t("No Data Available"))+" ")])],2),e.helper?r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.helper))]):e._e()],1)},_Q=[],wQ=oe(xQ,kQ,_Q,!1,null,null,null,null);const $x=wQ.exports,As={form:"form",display:"display"},CQ=[{inspector:[{type:"FormInput",field:"conditionalHide",config:{label:"Visibility Rule",helper:"This control is hidden until this expression is true"}},{type:"DeviceVisibility",field:"deviceVisibility",config:{label:"Device Visibility",helper:"This control is hidden until this expression is true"}},{type:"FormInput",field:"customFormatter",config:{label:"Custom Format String",helper:"Use the Mask Pattern format <br> Date ##/##/#### <br> SSN ###-##-#### <br> Phone (###) ###-####",validation:""}},{type:"FormInput",field:"customCssSelector",config:{label:"CSS Selector Name",helper:"Use this in your custom css rules",validation:"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{type:"FormInput",field:"ariaLabel",config:{label:"Aria Label",helper:"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{type:"FormInput",field:"tabindex",config:{label:"Tab Order",helper:"Order in which a user will move focus from one control to another by pressing the Tab key",validation:"regex: [0-9]*"}}]}],TQ=typeof window>"u"?global:window,AQ={mixins:[nb],props:{api:{type:String,default:"screens"},builder:{type:Object,required:!0},screenType:{type:String,default:As.form},validateNested:{type:Boolean,default:!1}},mounted(){this.$root.$on("remove-nested",e=>{this.value===e&&this.$emit("input",null)});let t='(type = "FORM" or type = "DISPLAY")';this.screenType===As.display&&(t='(type = "DISPLAY")'),this.builder.screen&&(t+=` and id != ${this.builder.screen.id}`),this.pmql=t,this.fields="screens.id,title"},methods:{isNavButton(t){return t.config&&t.component==="FormButton"&&t.config.event==="pageNavigate"},containsNavbutton(t){t.forEach(e=>{Array.isArray(e)&&this.containsNavbutton(e),e.items&&this.containsNavbutton(e.items),this.isNavButton(e)&&(this.nav=!0)})},change(t){if(t&&this.validateNested&&(this.nav=!1,this.containsNavbutton(t.config),this.nav))return TQ.ProcessMaker.alert(this.$t("The nested form contains navigation buttons"),"warning"),!1;const e=this.storeId?H.get(t,this.trackBy):t;this.$dataProvider.flushScreenCache(),this.$emit("input",e)}}};var OQ=function(){var e=this,r=e._self._c;return r("div",[r("label",{staticClass:"typo__label"},[e._v(e._s(e.label))]),r("multiselect",{attrs:{value:e.selectedOption,placeholder:e.placeholder,options:e.options,multiple:e.multiple,"track-by":e.trackBy,"show-labels":!1,searchable:!0,"internal-search":!1,label:"title"},on:{input:e.change,"search-change":e.loadOptions,open:function(a){return e.loadOptions()}}},[r("template",{slot:"noResult"},[e._t("noResult",function(){return[e._v(e._s(e.$t("Not found")))]})],2),r("template",{slot:"noOptions"},[e._t("noOptions",function(){return[e._v(e._s(e.$t("No Data Available")))]})],2)],2),e.value?r("div",{staticClass:"screen-link mt-2"},[r("a",{attrs:{href:`/designer/screen-builder/${e.value}/edit`,target:"_blank"}},[e._v(" "+e._s(e.$t("Open Screen"))+" "),r("i",{staticClass:"ml-1 fas fa-external-link-alt"})])]):e._e()],1)},EQ=[],MQ=oe(AQ,OQ,EQ,!1,null,null,null,null);const Px=MQ.exports,Dx={defaultMask:{label:"Data Format",options:[],config:{}},currency:{label:"Currency Format",options:du,optionsLabel:"code",config:du}},$Q={extends:tf,computed:{isVisible(){return this.selectedControl.config.dataFormat==="currency"},maskConfig(){return Dx[this.selectedControl.config.dataFormat]||Dx.defaultMask},maskLabel(){return this.$t(this.maskConfig.label||"Data Format")},maskOptions(){return this.maskConfig.options},maskOptionsLabel(){return this.maskConfig.optionsLabel}}};var PQ=function(){var e=this,r=e._self._c;return r("div",{directives:[{name:"show",rawName:"v-show",value:e.isVisible,expression:"isVisible"}]},[r("label",{staticClass:"typo__label"},[e._v(e._s(e.maskLabel))]),r("multiselect",e._g(e._b({class:e.classList,attrs:{value:e.value,placeholder:e.$t("Select..."),"show-labels":!1,options:e.maskOptions,label:e.maskOptionsLabel}},"multiselect",e.$attrs,!1),e.$listeners),[r("template",{slot:"noResult"},[e._v(e._s(e.$t("No elements found. Consider changing the search query.")))]),r("template",{slot:"noOptions"},[e._v(e._s(e.$t("No Data Available")))])],2),e.validator&&e.validator.errorCount||e.error?r("div",{staticClass:"invalid-feedback d-block"},[e._l(e.validator.errors.get(this.name),function(a,i){return r("div",{key:i},[e._v(e._s(a))])}),e.error?r("div",[e._v(e._s(e.error))]):e._e()],2):e._e(),e.helper?r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.helper))]):e._e()],1)},DQ=[],IQ=oe($Q,PQ,DQ,!1,null,null,null,null);const nf=IQ.exports,Vte="",zQ={components:{FormInput:ee.FormInput,InputVariable:rf,FormCheckbox:ee.FormCheckbox},props:["label","value","helper","name","builder","selectedControl","formConfig"],data(){return{rules:[],showCard:!1,showDeleteConfirmCard:!1,selectedOption:"",confirmMessage:"",removeIndex:null,optionError:"",disableBtn:!1,cloneRules:[],options:[{value:"accepted",content:this.$t("Accepted"),helper:this.$t("The field under validation must be yes, on, 1 or true.")},{value:"alpha",content:this.$t("Alpha"),helper:this.$t("The field under validation must be entirely alphabetic characters.")},{value:"alpha_num",content:this.$t("Alpha-Numeric"),helper:this.$t("The field under validation must be entirely alpha-numeric characters.")},{value:"",field:"between:",content:this.$t("Between Min & Max"),helper:this.$t("The field under validation must have a size between the given min and max."),visible:!0,configs:[{type:"FormInput",label:this.$t("Min"),helper:"",validation:"required|integer"},{type:"FormInput",label:this.$t("Max"),helper:"",validation:"required|integer"}]},{value:"email",content:this.$t("Email"),helper:this.$t("The field under validation must be formatted as an e-mail address.")},{value:"",field:"in:",content:this.$t("In"),helper:this.$t("The field under validation must be included in the given list of values. The field can be an array or string."),visible:!0,configs:[{type:"FormInput",label:this.$t("Values"),helper:"",validation:"required"}]},{value:"",field:"max:",content:this.$t("Max Length"),helper:"",visible:!0,configs:[{type:"FormInput",label:this.$t("Max Input"),helper:this.$t("Validate that an attribute is no greater than a given length."),validation:"required|integer"}]},{value:"",field:"min:",content:this.$t("Min Length"),helper:"",visible:!0,configs:[{type:"FormInput",label:this.$t("Min Input"),helper:this.$t("Validate that an attribute is at least a given length."),validation:"required|integer"}]},{value:"",field:"not_in:",content:this.$t("Not In"),helper:this.$t("The field under validation must not be included in the given list of values."),visible:!0,configs:[{type:"FormInput",label:this.$t("Values"),helper:"",validation:"required"}]},{value:"required",content:this.$t("Required"),helper:this.$t("Checks if the length of the String representation of the value is >")},{value:"",field:"required_if:",content:this.$t("Required If"),helper:this.$t("The field under validation must be present and not empty if the Variable Name field is equal to any value."),visible:!0,configs:[{type:"InputVariable",name:"variable-name",label:this.$t("Variable Name"),helper:"",validation:"required"},{type:"FormInput",name:"variable-value",label:this.$t("Variable Value"),helper:"",validation:""}]},{value:"",field:"required_unless:",content:this.$t("Required Unless"),helper:this.$t("The field under validation must be present and not empty unless the Variable Name field is equal to any value."),visible:!0,configs:[{type:"InputVariable",name:"variable-name",label:this.$t("Variable Name"),helper:"",validation:"required"},{type:"FormInput",name:"variable-value",label:this.$t("Variable Value"),helper:""}]},{value:"",field:"same:",content:this.$t("Same"),helper:this.$t("The given field must match the field under validation."),visible:!0,configs:[{type:"InputVariable",name:"variable-name",label:this.$t("Variable Name"),helper:"",validation:"required"}]},{value:"url",content:"URL",helper:this.$t("Validate that an attribute has a valid URL format.")},{value:"custom_date",content:"Date",helper:this.$t("The field under validation must be a valid date format which is acceptable by Javascript's Date object.")},{value:"",field:"after:",content:this.$t("After Date"),helper:this.$t("The field under validation must be after the given date."),visible:!0,configs:[{type:"FormInput",label:this.$t("Date"),helper:"",validation:"required"}]},{value:"",field:"after_or_equal:",content:this.$t("After or Equal to Date"),helper:this.$t("The field unter validation must be after or equal to the given field."),visible:!0,configs:[{type:"FormInput",label:this.$t("Date"),helper:"",validation:"required"}]},{value:"",field:"before:",content:this.$t("Before Date"),helper:this.$t("The field unter validation must be before the given date."),visible:!0,configs:[{type:"FormInput",label:this.$t("Date"),helper:"",validation:"required"}]},{value:"",field:"before_or_equal:",content:this.$t("Before or Equal to Date"),helper:this.$t("The field unter validation must be before or equal to the given field."),visible:!0,configs:[{type:"FormInput",label:this.$t("Date"),helper:"",validation:"required"}]},{value:"",field:"regex:",content:this.$t("Regex"),helper:this.$t("The field under validation must match the given regular expression."),visible:!0,configs:[{type:"FormInput",label:this.$t("Regex Pattern"),helper:"",validation:"required"}]}].sort((t,e)=>t.content>e.content?1:-1)}},computed:{fieldClass(){return this.optionError?"is-invalid":""},hasRules(){return!!(this.rules&&this.rules.length)},requiredCheckbox:{get(){return this.rules.some(t=>t.value==="required")},set(t){t?this.rules.push(this.options.find(e=>e.value==="required")):this.rules=this.rules.filter(e=>e.value!=="required")}}},watch:{rules:{deep:!0,handler(t){this.showCard=!1,this.selectedOption="",(typeof t=="string"||t===void 0)&&(this.rules=[]),this.rules&&this.setRuleConfigs(),this.$emit("input",t)}},value(){this.rules=this.value||[],this.cloneSetRules()},selectedOption:{deep:!0,handler(t){var e;this.disableBtn=!0,this.optionError="",t&&((e=this.rules)!=null&&e.find(r=>r.content===t.content)?(this.optionError=this.$t("This field already exists"),this.disableBtn=!0):this.disableBtn=!1)}}},mounted(){this.rules=this.value||[],this.cloneSetRules()},methods:{showAddCard(){this.showCard=!0,this.selectedOption||(this.disableBtn=!0)},hideCard(){this.showCard=!1,this.selectedOption="",this.optionError=""},saveRule(){const t=H.cloneDeep(this.selectedOption);this.rules.push(t),this.hideCard(),this.selectedOption=""},confirmDelete(t){this.removeIndex=t,this.showDeleteConfirmCard=!0,this.confirmMessage=H.unescape(this.$t('Are you sure you want to delete the "{{item}}" rule?',{item:this.rules[t].content}))},hideDeleteConfirmCard(){this.removeIndex=null,this.showDeleteConfirmCard=!1},deleteRule(t){this.rules.splice(t,1),this.cloneRules.splice(t,1),this.hideDeleteConfirmCard()},setRuleConfigs(){this.rules.forEach(t=>{if(t.configs){let e=[];t.configs.forEach(r=>{r.value&&e.push(r.value)}),e.length>1&&(e=e.join(",")),e.length&&(t.value=t.field+e)}})},onUpdate(t,e){const r=this.formatRuleContentAsId(t.content);this.$root.$emit("bv::toggle::collapse",r),this.$set(this.rules[e],"visible",!1),this.cloneRules=JSON.parse(JSON.stringify(this.rules))},onCancel(t,e){const r=this.formatRuleContentAsId(t.content);this.cloneRules&&this.cloneRules[e]?H.isEqual(t,this.cloneRules[e])||Object.assign(this.rules[e],JSON.parse(JSON.stringify(this.cloneRules[e]))):(t.configs.forEach(a=>{a.value&&(a.value="")}),this.rules[e].configs=t.configs),this.$root.$emit("bv::toggle::collapse",r)},formatRuleContentAsId(t){return t.toLowerCase().split(" ").join("-")},cloneSetRules(){this.cloneRules=JSON.parse(JSON.stringify(this.rules))}}};var LQ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",{staticClass:"d-flex justify-content-between align-items-center mb-3"},[r("label",{staticClass:"m-0"},[e._v(e._s(e.label))]),r("b-button",{attrs:{variant:"secondary",size:"sm","data-cy":"add-rule"},on:{click:e.showAddCard}},[e._v(e._s(e.$t("Add Rule")))])],1),e.showCard?r("div",{staticClass:"card mb-2"},[r("div",{staticClass:"card-body p-2"},[r("multiselect",{class:e.fieldClass,attrs:{label:"content","track-by":"content",placeholder:e.$t("Select..."),"show-labels":!1,options:e.options,"data-cy":"select-rule"},model:{value:e.selectedOption,callback:function(a){e.selectedOption=a},expression:"selectedOption"}},[r("template",{slot:"noResult"},[e._v(e._s(e.$t("No elements found. Consider changing the search query.")))]),r("template",{slot:"noOptions"},[e._v(e._s(e.$t("No Data Available")))])],2),e.optionError?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.optionError))])]):e._e()],1),r("div",{staticClass:"card-footer text-right p-2"},[r("b-button",{staticClass:"mr-2",attrs:{variant:"outline-secondary",size:"sm","data-cy":"cancel-rule"},on:{click:e.hideCard}},[e._v(e._s(e.$t("Cancel")))]),r("b-button",{attrs:{disabled:e.disableBtn,variant:"secondary",size:"sm","data-cy":"save-rule"},on:{click:e.saveRule}},[e._v(e._s(e.$t("Save")))])],1)]):e._e(),!e.hasRules&&!e.showCard?r("p",[e._v(e._s(e.$t("No validation rule(s)")))]):e._e(),e.hasRules?r("div",[r("div",{attrs:{role:"tablist"}},e._l(e.rules,function(a,i){return r("b-card",{key:i,staticClass:"mb-2 border-1",class:{"border-0":e.showDeleteConfirmCard,"border-top-1":e.showDeleteConfirmCard,"border-1":!e.showDeleteConfirmCard}},[e.showDeleteConfirmCard&&e.removeIndex==i?r("div",{staticClass:"card mb-3 bg-danger text-white text-right"},[r("div",{staticClass:"card-body p-2 text-left"},[e._v(" "+e._s(e.confirmMessage)+" ")]),r("div",{staticClass:"card-footer text-right p-2"},[r("button",{staticClass:"btn btn-sm btn-light mr-2",attrs:{type:"button","data-cy":"cancel-confirm-delete-rule"},on:{click:e.hideDeleteConfirmCard}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{type:"button","data-cy":"confirm-delete-rule"},on:{click:function(n){return e.deleteRule(i)}}},[e._v(" "+e._s(e.$t("Delete"))+" ")])])]):e._e(),r("b-card-header",{staticClass:"p-0",attrs:{"header-tag":"header",role:"tab"}},[r("div",{staticClass:"p-1 d-flex justify-content-between align-items-center"},[e._v(" "+e._s(a.content)+" "),r("div",{staticClass:"actions"},[a.configs?r("b-button",{directives:[{name:"b-toggle",rawName:"v-b-toggle",value:e.formatRuleContentAsId(a.content),expression:"formatRuleContentAsId(rule.content)"}],staticClass:"p-0 mr-1 secondary",attrs:{"aria-label":e.$t("Toggle Configuration"),variant:"link","data-cy":"edit-rule"}},[r("i",{staticClass:"fas fa-cog fa-fw text-secondary"})]):e._e(),r("b-button",{staticClass:"p-0",attrs:{"aria-label":e.$t("Delete"),variant:"link","data-cy":"remove-rule"},on:{click:function(n){return e.confirmDelete(i)}}},[r("i",{staticClass:"fas fa-trash-alt fa-fw text-secondary"})])],1)])]),r("b-collapse",{attrs:{id:e.formatRuleContentAsId(a.content),accordion:e.formatRuleContentAsId(a.content),visible:a.visible,role:"tabpanel"}},[r("b-card-body",[r("div",{staticClass:"p-2"},[e._l(a.configs,function(n){return r("div",{key:n.label,staticClass:"mb-2"},[n.type==="FormInput"?r("div",[r("form-input",{attrs:{label:n.label,name:n.name||n.label,validation:n.validation,helper:n.helper},model:{value:n.value,callback:function(s){e.$set(n,"value",s)},expression:"config.value"}})],1):r(n.type,{tag:"component",attrs:{label:n.label,name:n.name||n.label,validation:n.validation,helper:n.helper,builder:e.builder,"selected-control":e.selectedControl,"form-config":e.formConfig},model:{value:n.value,callback:function(s){e.$set(n,"value",s)},expression:"config.value"}})],1)}),r("div",[r("small",{staticClass:"form-text text-muted"},[e._v(e._s(a.helper))])])],2),r("b-card-footer",{staticClass:"text-right"},[r("b-button",{staticClass:"mr-2",attrs:{variant:"outline-secondary",size:"sm","data-cy":"cancel-rule"},on:{click:function(n){return e.onCancel(a,i)}}},[e._v(e._s(e.$t("Cancel")))]),r("b-button",{attrs:{variant:"secondary",size:"sm","data-cy":"update-rule"},on:{click:function(n){return e.onUpdate(a,i)}}},[e._v(e._s(e.$t("Update")))])],1)],1)],1)],1)}),1)]):e._e(),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.helper))]),r("div",{staticClass:"mt-4 required-checkbox"},[r("form-checkbox",{attrs:{label:e.$t("Make Required")},model:{value:e.requiredCheckbox,callback:function(a){e.requiredCheckbox=a},expression:"requiredCheckbox"}})],1)])},jQ=[],NQ=oe(zQ,LQ,jQ,!1,null,"a2315d60",null,null);const Ix=NQ.exports,RQ={components:{FormCheckbox:ee.FormCheckbox},props:["value","selectedControl"],data(){return{event:"",loading:null}},computed:{mode(){return this.$root.$children[0].mode}},watch:{loading(){this.$emit("input",this.loading)},value(){this.loading=this.value},"selectedControl.config.event":function(t){this.event=t}},mounted(){this.event=this.selectedControl.config.event,this.loading=this.value}};var FQ=function(){var e=this,r=e._self._c;return e.event==="submit"?r("div",{staticStyle:{"border-style":"none !important"}},[r("div",[r("form-checkbox",{attrs:{label:e.$t("Loading Submit Button"),toggle:!1,helper:e.$t("Loading Submit Button")},model:{value:e.loading,callback:function(a){e.loading=a},expression:"loading"}})],1)]):e._e()},qQ=[],BQ=oe(RQ,FQ,qQ,!1,null,null,null,null);const zx=BQ.exports,WQ={components:{FormInput:ee.FormInput},props:["value","selectedControl"],data(){return{event:"",loadingLabel:null}},computed:{mode(){return this.$root.$children[0].mode}},watch:{loadingLabel(){this.$emit("input",this.loadingLabel)},value(){this.loadingLabel=this.value},"selectedControl.config.event":function(t){this.event=t}},mounted(){this.event=this.selectedControl.config.event,this.loadingLabel=this.value}};var VQ=function(){var e=this,r=e._self._c;return e.event==="submit"?r("div",{staticStyle:{"padding-top":"0px !important"}},[r("div",[r("form-input",{staticClass:"mb-3",attrs:{type:"text",label:e.$t("Loading Label")},model:{value:e.loadingLabel,callback:function(a){e.loadingLabel=a},expression:"loadingLabel"}})],1)]):e._e()},UQ=[],GQ=oe(WQ,VQ,UQ,!1,null,null,null,null);const Lx=GQ.exports,HQ={props:["value"],data(){return{selectedOption:null,formattedOptions:[{name:"",link:""}]}},watch:{selectedOption(t){this.$emit("input",t)},value(){this.selectedOption=this.value}},mounted(){this.fetchChartData(),this.selectedOption=this.value},methods:{fetchChartData(){try{ProcessMaker.apiClient.get("analytics-reporting-all").then(t=>{this.formattedOptions=t.data.data.map(e=>({name:e.name,link:e.link}))})}catch(t){console.error("Error fetching data:",t)}}}};var YQ=function(){var e=this,r=e._self._c;return r("div",[r("label",{staticClass:"typo__label"},[e._v(e._s(e.$t("Analytics Management")))]),r("multiselect",{attrs:{placeholder:e.$t("Select Chart"),"internal-search":!1,"show-labels":!1,options:e.formattedOptions,label:"name","track-by":"link",multiple:!1,"allow-empty":!1},model:{value:e.selectedOption,callback:function(a){e.selectedOption=a},expression:"selectedOption"}})],1)},QQ=[],KQ=oe(HQ,YQ,QQ,!1,null,null,null,null);const jx=KQ.exports,Nx=Object.freeze(Object.defineProperty({__proto__:null,AnalyticsSelector:jx,CollectionSelectList:Zp,ColorSelect:_x,ColumnSetup:wx,ContainerColumns:Cx,DataMapping:Xp,DefaultValueEditor:ef,DeviceVisibility:ed,EditOption:Tx,FormMultiselect:tf,ImageUpload:Ax,ImageVariable:Ox,InputVariable:rf,LabelSubmitButton:Lx,LoadingSubmitButton:zx,LoopInspector:Ex,MustacheHelper:Hi,OptionsList:Mx,OutboundConfig:af,PageSelect:$x,ScreenSelector:Px,SelectDataTypeMask:nf,Tooltip:Xc,ValidationSelect:Ix,dataSourceValues:ea,dataSources:Ts},Symbol.toStringTag,{value:"Module"})),Ute="",Rx=[{name:"Variable",fields:[{name:"name",hideFor:"FormImage"},"fieldValue","label","dataFormat","dataMask","validation","readonly","disabled","initiallyChecked","screen","multipleUpload"],open:!0},{name:"Configuration",fields:[{name:"name",showFor:"FormImage"},"image","eventData","tooltip","type","placeholder","content","helper","Multiselect checkbox (doesn’t exist)","richtext","rows",{name:"options",showFor:"FormMultiColumn"},"form","editable"],open:!1},{name(t){return t.component==="AiSection"?"AI Section":t.component==="FormRecordList"?"Columns":"Data Source"},fields:["fields",{name:"options",hideFor:"FormMultiColumn"}],open:!1},{name:"Design",fields:["color","bgcolor","variant","toggle","height","width"],open:!1},{name:"Advanced",fields:["conditionalHide","deviceVisibility","customCssSelector","defaultValue","showForDesktop",{name:"customFormatter",showFor:"FormInput"},{name:"ariaLabel",showFor:"FormInput"},{name:"ariaLabel",showFor:"FormSelectList"},{name:"ariaLabel",showFor:"FormDatePicker"},{name:"ariaLabel",showFor:"FormCheckbox"},{name:"ariaLabel",showFor:"FormDatePicker"},{name:"ariaLabel",showFor:"FileUpload"},{name:"ariaLabel",showFor:"FileDownload"},{name:"ariaLabel",showFor:"FormSelectList"},{name:"ariaLabel",showFor:"FormButton"},{name:"ariaLabel",showFor:"FormTextArea"},{name:"tabindex",showFor:"FormInput"},{name:"tabindex",showFor:"FormSelectList"},{name:"tabindex",showFor:"FormDatePicker"},{name:"tabindex",showFor:"FormCheckbox"},{name:"tabindex",showFor:"FormDatePicker"},{name:"tabindex",showFor:"FileUpload"},{name:"tabindex",showFor:"FileDownload"},{name:"tabindex",showFor:"FormSelectList"},{name:"tabindex",showFor:"FormButton"},{name:"tabindex",showFor:"FormTextArea"}],open:!1}];class Fx{constructor(){se(this,"names",[]);se(this,"generateNameId",(e,r)=>{let a=e+"_"+r;return this.names.indexOf(a)!==-1&&(r++,a=this.generateNameId(e,r)),a})}GetVariableNames(e){e.forEach(r=>{Array.isArray(r)&&this.GetVariableNames(r),r.items&&this.GetVariableNames(r.items),r.config&&r.config.name&&this.names.push(`${r.config.name}`)})}generate(e,r){this.names=[],this.GetVariableNames(e);let a=this.generateNameId(this.snakeCase(r),1);return this.names.push(a),[this.names,a]}snakeCase(e){return e.replace(/\W+/g," ").split(/ |\B(?=[A-Z])/).map(r=>r.toLowerCase()).join("_")}}const Gte="",JQ={name:"PagesDropdown",props:{data:{type:Array,default:null},boundary:{type:String,default:"viewport"}},methods:{onAddPage(){this.$emit("addPage")},onSeeAllPages(){this.$emit("seeAllPages")},onClickPage(t){this.$emit("clickPage",this.data[t])}}};var ZQ=function(){var e=this,r=e._self._c;return r("b-dropdown",{ref:"pageDropdown",attrs:{"data-test":"page-dropdown",variant:"platform",boundary:e.boundary,"menu-class":"page-dropdown-menu"},scopedSlots:e._u([{key:"button-content",fn:function(){return[r("i",{staticClass:"fa fa-file"})]},proxy:!0}])},[r("b-dropdown-item",{attrs:{"data-test":"add-page"},on:{click:e.onAddPage}},[r("i",{staticClass:"fa fa-plus platform-dropdown-item-icon"}),e._v(" "+e._s(e.$t("Create Page"))+" ")]),r("b-dropdown-item",{attrs:{"data-test":"see-all-pages"},on:{click:e.onSeeAllPages}},[r("i",{staticClass:"fa fa-eye platform-dropdown-item-icon"}),e._v(" "+e._s(e.$t("See all pages"))+" ")]),r("b-dropdown-divider"),e._l(e.data,function(a,i){return r("b-dropdown-item",{key:i,attrs:{"data-test":"page-"+a.name,"data-cy":"page-"+i},on:{click:function(n){return e.onClickPage(i)}}},[e._v(" "+e._s(a.name)+" ")])})],2)},XQ=[],eK=oe(JQ,ZQ,XQ,!1,null,"18f6828f",null,null);const tK=eK.exports,rK={name:"required-checkbox",props:["value"],data(){return{required:!1}},watch:{value:{handler(){this.value&&this.value==="required"?this.required=!0:this.required=!1},immediate:!0},required:{handler(){this.$emit("input",this.required?"required":"")}}}};var aK=function(){var e=this,r=e._self._c;return r("div",[r("b-form-checkbox",{model:{value:e.required,callback:function(a){e.required=a},expression:"required"}},[e._v(e._s(e.$t("Required")))])],1)},iK=[],nK=oe(rK,aK,iK,!1,null,null,null,null);const qx=nK.exports,sK={name:"multiple-upload-checkbox",props:["value"],data(){return{selected:!1}},watch:{value:{handler(){this.value?this.selected=!0:this.selected=!1},immediate:!0},selected:{handler(){this.$emit("input",this.selected)}}}};var oK=function(){var e=this,r=e._self._c;return r("div",[r("b-form-checkbox",{model:{value:e.selected,callback:function(a){e.selected=a},expression:"selected"}},[e._v(e._s(e.$t("Upload multiple files")))])],1)},lK=[],uK=oe(sK,oK,lK,!1,null,null,null,null);const Bx=uK.exports,Wx=200,cK={props:{pages:{type:Array,required:!0},initialOpenedPages:{type:Array,default:()=>[0]},buttonIcon:{type:String,default:()=>"fa fa-file"}},data(){return{tabsListOverflow:!1,showLeftScroll:!0,showRightScroll:!0,updates:0,activeTab:0,localOpenedPages:this.initialOpenedPages}},computed:{validLocalOpenedPages(){return this.localOpenedPages.filter(t=>this.pages[t])}},watch:{openedPages:{handler(t){this.localOpenedPages=t},deep:!0},pages:{handler(){this.localOpenedPages=this.localOpenedPages.filter(t=>this.pages[t])},deep:!0}},mounted(){this.$nextTick(()=>{window.addEventListener("resize",this.checkTabsOverflow),this.$refs.tabs.$el.querySelector(".nav-tabs").addEventListener("scroll",this.checkScrollPosition),Promise.resolve().then(()=>{this.checkTabsOverflow(),this.checkScrollPosition()})})},beforeDestroy(){window.removeEventListener("resize",this.checkTabsOverflow)},updated(){this.checkTabsOverflow()},methods:{tabOpened(){const t=this.localOpenedPages[this.activeTab];this.$emit("tab-opened",t)},pageNumber(t){return t+1},checkScrollPosition(){const t=this.$refs.tabs.$el.querySelector(".nav-tabs");this.showLeftScroll=t.scrollLeft>0,this.showRightScroll=t.scrollWidth-t.clientWidth>t.scrollLeft},scrollTabsLeft(){const t=this.$refs.tabs.$el.querySelector(".nav-tabs");t.scrollLeft-=Wx},scrollTabsRight(){const t=this.$refs.tabs.$el.querySelector(".nav-tabs");t.scrollLeft+=Wx},tabsUpdated(){this.updates++},waitUpdates(t,e,r=80){return new Promise(a=>{const i=Date.now(),n=setInterval(()=>{(this.updates>=t||Date.now()-i>e)&&(clearInterval(n),a())},r)})},closeTab(t){const e=this.localOpenedPages[t];this.localOpenedPages.splice(t,1),this.$emit("tab-closed",this.pages[e],this.localOpenedPages)},updateTabsReferences(t){this.localOpenedPages=this.localOpenedPages.map(e=>e>t?e-1:e)},async openPageByIndex(t){if(t===-1)return;const e=this.localOpenedPages.indexOf(t*1);e===-1?(this.localOpenedPages.push(t),await this.waitUpdates(this.updates+2,1e3),this.activeTab=this.localOpenedPages.length-1):this.activeTab=e},closePageByIndex(t){const e=this.localOpenedPages.indexOf(t);e!==-1&&this.localOpenedPages.splice(e,1)},checkTabsOverflow(){const t=this.$refs.tabs.$el.querySelector(".nav-tabs");this.tabsListOverflow=t.scrollWidth>t.clientWidth}}};var dK=function(){var e=this,r=e._self._c;return r("b-tabs",{ref:"tabs",staticClass:"h-100 w-100 flat-tabs",attrs:{"content-class":"h-tab","nav-class":"nav-tabs-nowrap",lazy:""},on:{changed:e.tabsUpdated,input:e.tabOpened},scopedSlots:e._u([{key:"tabs-start",fn:function(){return[r("div",{staticClass:"tabs-sticky d-flex flex-row tabs-start"},[r("div",{directives:[{name:"show",rawName:"v-show",value:e.tabsListOverflow,expression:"tabsListOverflow"}],staticClass:"position-relative overflow-visible"},[r("div",{staticClass:"nav-scroll nav-scroll-left",attrs:{role:"link","data-test":"scroll-left"},on:{click:e.scrollTabsLeft}},[r("i",{staticClass:"fas fa-chevron-left"})])])]),r("div",{class:{"dd-ml":e.tabsListOverflow}},[e._t("tabs-start")],2)]},proxy:!0},{key:"tabs-end",fn:function(){return[e.tabsListOverflow?r("div",{staticClass:"tabs-sticky overflow-visible"},[r("div",{staticClass:"nav-scroll nav-scroll-right",attrs:{role:"link","data-test":"scroll-right"},on:{click:e.scrollTabsRight}},[r("i",{staticClass:"fas fa-chevron-right"})])]):e._e()]},proxy:!0},{key:"empty",fn:function(){return[r("p",{staticClass:"text-center m-5 text-secondary",attrs:{"data-test":"tab-content"}},[e._v(" "+e._s(e.$t("There are no open pages."))),r("br"),e._v(" "+e._s(e.$t("Open a new page above using the button"))+" "),r("i",{class:e.buttonIcon})])]},proxy:!0}],null,!0),model:{value:e.activeTab,callback:function(a){e.activeTab=a},expression:"activeTab"}},e._l(e.validLocalOpenedPages,function(a,i){return r("b-tab",{key:`tab-${i}`,staticClass:"h-100 w-100",scopedSlots:e._u([{key:"title",fn:function(){var n;return[r("b-badge",{staticClass:"mr-1",attrs:{variant:"primary"}},[e._v(" "+e._s(e.pageNumber(a))+" ")]),r("span",{attrs:{"data-test":`tab-${i}`}},[e._v(" "+e._s((n=e.pages[a])==null?void 0:n.name)+" ")]),r("span",{staticClass:"close-tab",attrs:{"data-test":`close-tab-${i}`,role:"link"},on:{click:function(s){return s.stopPropagation(),e.closeTab(i)}}},[r("i",{staticClass:"fas fa-times"})])]},proxy:!0},{key:"default",fn:function(){return[r("div",{staticClass:"h-100 w-100",attrs:{"data-test":"tab-content"}},[e._t("default",null,{currentPage:a})],2)]},proxy:!0}],null,!0)})}),1)},pK=[],fK=oe(cK,dK,pK,!1,null,null,null,null);const hK=fK.exports,Hte="",mK={name:"SortableList",props:{items:{type:Array,required:!0},filteredItems:{type:Array,required:!0}},data(){return{newName:"",draggedItem:0,draggedOverItem:0,editRowIndex:null}},computed:{sortedItems(){return[...this.filteredItems].sort((e,r)=>e.order-r.order)}},methods:{validateState(t,e){const r=!(t!=null&&t.trim()),a=this.items.filter(i=>i!==e).find(i=>i.name===t);return r||a?!1:null},validateError(t,e){return t!=null&&t.trim()?this.$t("The Page Name field is required."):this.items.filter(i=>i!==e).find(i=>i.name===t)?this.$t("Must be unique."):""},onFocus(t){this.newName=t.name},async onBlur(t,e){this.validateState(t,e)===!1?this.newName=e.name:e.name=t,await this.$nextTick(),setTimeout(()=>{this.editRowIndex=null},250)},async onCancel(t){this.newName=t.name,this.editRowIndex=null},onClick(t,e){this.editRowIndex=e,this.$emit("item-edit",t)},dragStart(t,e){this.editRowIndex=null,this.draggedItem=e,t.target.classList.add("dragging")},dragEnter(t,e){this.draggedOverItem=e},dragEnd(t){t.target.classList.remove("dragging");const e=[...this.items].sort((i,n)=>i.order-n.order),r=e.findIndex(i=>i.order===this.draggedItem),a=e.findIndex(i=>i.order===this.draggedOverItem);if(r!==a){const i=e[a].order,n=this.draggedItem>this.draggedOverItem?1:-1;if(r<a){for(let o=r+1;o<=a;o++){const u=e[o].order;e[o].order=u+n}e[r].order=i}else if(r>a){for(let o=a;o<=r-1;o++){const u=e[o].order;e[o].order=u+n}e[r].order=i}const s=[...e];s.sort((o,u)=>o.order-u.order),s.forEach((o,u)=>{o.order=u+1})}this.$emit("ordered",e)},dragOver(t){t.preventDefault()}}};var gK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"row mt-3"},[r("div",{staticClass:"col p-0 border rounded-lg sortable-list"},[e._m(0),r("div",{staticClass:"sortable-container",on:{dragover:e.dragOver}},e._l(e.sortedItems,function(a,i){return r("div",{key:i,staticClass:"sortable-item sortable-draggable",attrs:{"data-order":a.order,"data-test":`item-${a.order}`,title:a.name,draggable:"true"},on:{dragstart:n=>e.dragStart(n,a.order),dragenter:n=>e.dragEnter(n,a.order),dragend:e.dragEnd}},[e._m(1,!0),r("div",{staticClass:"rounded sortable-item-name"},[e.editRowIndex===i?r("b-form-input",{attrs:{type:"text",autofocus:"",required:"",state:e.validateState(e.newName,a),error:e.validateError(e.newName,a)},on:{blur:function(n){return n.stopPropagation(),e.onBlur(e.newName,a)},keydown:[function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:(n.stopPropagation(),e.onBlur(e.newName,a))},function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:(n.stopPropagation(),e.onCancel(a))}],focus:function(n){return e.onFocus(a)}},model:{value:e.newName,callback:function(n){e.newName=n},expression:"newName"}}):r("span",[e._v(e._s(a.name))])],1),r("div",{staticClass:"border rounded-lg sortable-item-action"},[e.editRowIndex===i?r("button",{staticClass:"btn"},[r("i",{staticClass:"fas fa-check"})]):r("button",{staticClass:"btn",on:{click:function(n){return n.stopPropagation(),e.onClick(a,i)}}},[r("i",{staticClass:"fas fa-edit"})]),r("div",{staticClass:"sortable-item-vr"}),r("button",{staticClass:"btn",on:{click:function(n){return e.$emit("item-delete",a)}}},[r("i",{staticClass:"fas fa-trash-alt"})])])])}),0)])])},vK=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"sortable-list-header"},[e("div",{staticClass:"sortable-item-icon"}),e("div",{staticClass:"sortable-list-title"},[t._v("PAGE NAME")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"sortable-item-icon"},[e("i",{staticClass:"fas fa-bars"})])}],bK=oe(mK,gK,vK,!1,null,"783e3808",null,null);const yK=bK.exports,Yte="",SK={name:"Sortable",components:{SortableList:yK},props:{items:{type:Array,required:!0},filterKey:{type:String,required:!0}},data(){return{search:"",filteredItems:[...this.items]}},watch:{search(t){this.filteredItems=this.filterItems(t,this.items)},items:{handler(t){this.filteredItems=[...t],this.search.length>0&&(this.filteredItems=this.filterItems(this.search,t))},deep:!0}},methods:{clearSearch(t){return t.trim().toLowerCase()},filterItems(t,e){const r=this.clearSearch(t);return e.filter(a=>a[this.filterKey].toLowerCase().includes(r))}}};var xK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"container sortable-box"},[r("div",{staticClass:"row"},[r("div",{staticClass:"col-sm border rounded-lg p-0 mr-3 sortable-search-box"},[r("i",{staticClass:"fa fa-search sortable-search-icon"}),r("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],staticClass:"form-control border-0 shadow-none px-0",attrs:{id:"search",placeholder:e.$t("Search here"),"data-test":"search"},domProps:{value:e.search},on:{input:function(a){a.target.composing||(e.search=a.target.value)}}})]),r("div",[r("button",{staticClass:"btn sortable-btn-new",attrs:{type:"button"},on:{click:function(a){return e.$emit("add-page",a)}}},[r("i",{staticClass:"fa fa-plus"})])])]),r("SortableList",{attrs:{items:e.items,"filtered-items":e.filteredItems},on:{ordered:function(a){return e.$emit("ordered",a)},"item-edit":function(a){return e.$emit("item-edit",a)},"item-delete":function(a){return e.$emit("item-delete",a)}}})],1)},kK=[],_K=oe(SK,xK,kK,!1,null,"787061e3",null,null);const wK=_K.exports,Qte="",Kte="",Jte="",Qa=typeof window>"u"?global:window;Qa.ProcessMaker&&Qa.ProcessMaker.user&&Qa.ProcessMaker.user.lang&&Lt.useLang(Qa.ProcessMaker.user.lang),Lt.register("columns-adds-to-12",t=>t.reduce((r,a)=>r+parseInt(a.content),0)===12,"Columns must add to 12");const CK=[{name:"Default",items:[]}],TK={"Input Fields":1,"Content Fields":2,Dashboards:2.5,Navigation:3,Files:4,Advanced:5},AK="Advanced",OK={components:{TabsBar:hK,draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,RequiredCheckbox:qx,MultipleUploadsCheckbox:Bx,defaultValueEditor:ef,...Nx,...Cs,PagesDropdown:tK,Sortable:wK},mixins:[gn,lb],props:{renderControls:{type:Boolean,default:!0},validationErrors:{type:Array},initialConfig:{type:Array},title:{type:String},screenType:{type:String,default:As.form},screen:{type:Object},processId:{default:0}},data(){const t=this.initialConfig||CK;this.migrateConfig(t);const e=new Fx,r=e.GetVariableNames(t);return this.title&&t[0].name==="Default"&&(t[0].name=this.title),{showAddPageValidations:!1,openedPages:[0],currentPage:0,selected:null,display:"editor",inspection:{},controls:[],pageAddModal:!1,addPageName:"",editPageIndex:null,editPageName:"",originalPageName:null,config:t,confirmMessage:"",pageDelete:0,translated:[],showAssignment:!1,showVariable:!1,showDesign:!1,filterQuery:"",accordions:Rx,variables:r,generator:e,variablesTree:[],language:"en",collator:null,editorContentKey:0,cancelledJobs:[],collapse:{},groupOrder:{}}},computed:{sortedPages(){return[...this.config].sort((t,e)=>t.order-e.order)},builder(){return this},displayDelete(){return this.config.length>1},filteredControls(){return this.controls.filter(e=>e.label.toLowerCase().includes(this.filterQuery.toLowerCase()))},filteredControlsGrouped(){const t=this.filteredControls.reduce((e,r)=>{let a=H.get(r,"group",null);a||(a=AK);let i=e.findIndex(n=>n.name===a);return i===-1&&(e.push({name:a,order:this.getGroupOrder(a),elements:[]}),i=e.length-1),e[i].elements.push(r),e},[]);return t.sort((e,r)=>e.order-r.order),t.forEach((e,r)=>{t[r].elements.sort((a,i)=>{const n=a.order!==void 0?a.order:Number.POSITIVE_INFINITY,s=i.order!==void 0?i.order:Number.POSITIVE_INFINITY;return n-s})}),t},showToolbar(){return this.screenType===As.form}},watch:{config:{handler(){this.checkForCaptchaInLoops(),this.$emit("change",this.config)},deep:!0},currentPage(){this.inspect()},inspection(t){if(!this.translated.includes(t)){for(const e in t.inspector)if(t.inspector[e].config.label=this.$t(t.inspector[e].config.label),t.inspector[e].config.helper=this.$t(t.inspector[e].config.helper),t.inspector[e].config.options)for(const r in t.inspector[e].config.options)t.inspector[e].config.options[r].content=this.$t(t.inspector[e].config.options[r].content);this.translated.push(t)}},controls(){this.processId!==0&&this.processId!==void 0&&!this.config[this.currentPage].items.length&&this.addDefaultAiControl()}},created(){this.$store.dispatch("undoRedoModule/pushState",{config:JSON.stringify(this.config),currentPage:this.currentPage}),this.initiateLanguageSupport()},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.checkForCaptchaInLoops(),this.$root.$on("nested-screen-updated",()=>{this.checkForCaptchaInLoops()}),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("apply-ai-changes",t=>{this.applyAiChanges(t)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)}),this.setGroupOrder(TK)},methods:{isCurrentPageEmpty(t){var e,r;return((r=(e=this.config[t])==null?void 0:e.items)==null?void 0:r.length)===0},onClick(t){this.$refs.tabsBar.openPageByIndex(this.config.indexOf(t))},checkPageName(t,e=!1){return!e&&!this.showAddPageValidations?null:t.trim()?this.config.map(a=>a.name).filter(a=>a!==this.originalPageName).includes(t)?this.$t("Must be unique."):"":this.$t("The Page Name field is required.")},getGroupOrder(t){return H.get(this.groupOrder,t,Number.POSITIVE_INFINITY)},setGroupOrder(t){this.groupOrder={...this.groupOrder,...t}},toggleCollapse(t){this.collapse[t]&&this.collapse[t]===!0?this.collapse[t]=!1:this.collapse[t]=!0},isCollapsed(t){return this.collapse[t]},refreshContent(){this.editorContentKey++},checkForCaptchaInLoops(){this.config.forEach(t=>{this.checkForCaptcha(t.items)})},checkForCaptcha(t,e=!1,r=null){t.forEach(a=>{if(!a.items&&a.component==="Captcha"&&e&&(r&&r.config.screen?(this.$root.$emit("remove-nested",r.config.screen),r.config.screen=null,Qa.ProcessMaker.alert(this.$t("You are trying to place a nested screen within CAPTCHA elements inside a loop. CAPTCHA controls cannot be placed within a Loop control."),"danger")):(t.splice(t.indexOf(a),1),Qa.ProcessMaker.alert(this.$t("CAPTCHA controls cannot be placed within a Loop control."),"danger"))),a.items&&this.checkForCaptcha(a.items,!0,r),a.component==="FormNestedScreen"&&a.config.screen&&window.nestedScreens){const i=window.nestedScreens[`id_${a.config.screen}`];i&&i.forEach(n=>{this.checkForCaptcha(n.items,e,a)})}})},loadVariablesTree(){const t={config:this.$parent.config,computed:this.$parent.computed,customCSS:this.$parent.customCSS,watchers:this.$parent.watchers};this.variablesTree=this.$refs.treeOfVariables.getVariablesTree(t),this.$refs.treeOfVariables.getVariablesTree({config:[]})},accordionName(t){return t.name instanceof Function?t.name(this.inspection):t.name},toggleAccordion(t){this.accordions.forEach(e=>{e!==t&&(e.open=!1)}),t.open=!t.open},openAccordion(t){this.accordions.forEach(e=>{e.open=!1}),t.open=!0},migrateConfig(t=this.config){t.forEach(e=>this.replaceFormText(e.items)),t.forEach(e=>this.migrateFormSubmit(e.items)),t.forEach(e=>this.updateFieldNameValidation(e.items)),this.updatePageOrder(t),t.forEach(e=>this.removeDataVariableFromNestedScreens(e.items)),t.forEach((e,r)=>{e.order=e.order||r+1})},updatePageOrder(t){const e=[...t];e.sort((r,a)=>{const i=r.order||t.indexOf(r)+1,n=a.order||t.indexOf(a)+1;return i-n}),e.forEach((r,a)=>{r.order=a+1})},updateFieldNameValidation(t){t.forEach(e=>{e.inspector&&e.inspector.forEach(r=>{r.field==="name"&&"validation"in r.config&&r.config.name!=="DataVariable"&&e.component!=="FileUpload"&&e.component!=="FormButton"&&(r.config.validation=Yt.config.validation)}),e.items instanceof Array&&this.replaceFormText(e.items)})},removeDataVariableFromNestedScreens(t){t.forEach(e=>{if(e.inspector){const r=e.inspector.find(a=>a.config.name==="DataVariable");e.inspector=e.inspector.filter(a=>a.config.name!=="DataVariable"),r&&delete e.config.name}})},replaceFormText(t){t.forEach(e=>{if(e.component==="FormText"){e.component="FormHtmlEditor",e["editor-component"]="FormHtmlEditor";const r=(e.config.fontSize?`font-size: ${e.config.fontSize};`:"")+(e.config.fontWeight?`font-weight: ${e.config.fontWeight};`:"")+(e.config.textAlign?`text-align: ${e.config.textAlign};`:"");e.config={content:'<div style="'+r+'">'+e.config.label+"</div>",interactive:!0}}e.items instanceof Array&&this.replaceFormText(e.items)})},migrateFormSubmit(t){t.forEach(e=>{e["editor-control"]!=="FormSubmit"&&(e["editor-control"]=e["editor-component"]),e.config.event==="submit"&&(e["editor-component"]==="FormNestedScreen"?(delete e.config.event,e["editor-control"]="FormNestedScreen",e.config.name="Nested Screen"):e["editor-control"]!=="FormImage"&&(e["editor-control"]="FormSubmit")),e.config.event==="pageNavigate"&&(e["editor-control"]="PageNavigation"),e.items instanceof Array&&e.component==="FormMultiColumn"&&(e["editor-control"]="FormMultiColumn",e.items.forEach(r=>this.migrateFormSubmit(r)))})},getAllAccordionizedFields(){return this._allAccordionizedFields?this._allAccordionizedFields:(this._allAccordionizedFields=this.accordions.flatMap(t=>t.fields.map(e=>typeof e=="string"?e:e.name)),this._allAccordionizedFields)},knownField(t){return this.getAllAccordionizedFields().includes(t)},getInspectorFields(t){if(!this.inspection.inspector)return[];const e=t.fields.filter(a=>{if(typeof a!="string"){const{component:i}=this.inspection,{showFor:n,hideFor:s}=a;if(n)return n===i;if(s)return s!==i}return!0}).map(a=>typeof a!="string"?a.name:a);return(this.controls.find(a=>a["editor-control"]===this.inspection["editor-control"])||this.controls.find(a=>a.component===this.inspection.component)||{inspector:[]}).inspector.filter(a=>!!(e.includes(a.field)||!this.knownField(a.field)&&t.name==="Configuration"))},updateState(){this.$store.dispatch("undoRedoModule/pushState",{config:JSON.stringify(this.config),currentPage:this.currentPage})},async undo(){this.inspect(),this.$store.dispatch("undoRedoModule/undo"),this.config=JSON.parse(this.$store.getters["undoRedoModule/currentState"].config),await this.$nextTick(),this.$refs.tabsBar.openPageByIndex(this.$store.getters["undoRedoModule/currentState"].currentPage)},async redo(){this.inspect(),this.$store.dispatch("undoRedoModule/redo"),this.config=JSON.parse(this.$store.getters["undoRedoModule/currentState"].config),await this.$nextTick(),this.$refs.tabsBar.openPageByIndex(this.$store.getters["undoRedoModule/currentState"].currentPage)},updateConfig(t){this.config[this.currentPage].items=t,this.updateState()},hasError(t){return this.validationErrors.some(({item:e})=>e===t)},focusInspector(t){this.showConfiguration=!0,this.$refs.tabsBar.openPageByIndex(this.config.indexOf(t.page)),this.$nextTick(()=>{this.inspect(t.item),this.$nextTick(()=>{const e=this.$el.querySelector(`[field-name="${t.field}"]`);if(e){const r=this.$el.querySelector(`[accordion-name="${e.getAttribute("field-accordion")}"]`);r&&r.getAttribute("is-open")==="0"&&r.click(),e.focus instanceof Function&&e.focus()}})})},confirmDelete(t=this.config[this.currentPage]){this.confirmMessage=this.$t("Are you sure you want to delete {{item}}?",{item:t.name}),this.config.length!==1&&(this.pageDelete=this.config.indexOf(t),this.$refs.confirm.show())},hideConfirmModal(){this.$refs.confirm.hide()},addControl(t){this.controls.push(t)},deleteItem(t){this.config[this.currentPage].items.splice(t,1),this.inspection.inspector.splice(0,this.inspection.inspector.length),this.updateState()},duplicateItem(t){const e=H.cloneDeep(this.config[this.currentPage].items[t]);this.config[this.currentPage].items.push(e)},openEditPageModal(t){this.editPageIndex=t;const e=this.config[t].name;this.originalPageName=e,this.editPageName=e,this.$refs.editPageModal.show()},editPage(t){if(this.$refs.editPageInput.validator.errorCount){t.preventDefault();return}this.config[this.editPageIndex].name=this.editPageName,this.updateState()},addPage(t){if(this.checkPageName(this.addPageName,!0)){this.showAddPageValidations=!0,t.preventDefault();return}const r=this.config.reduce((a,i)=>i.order>a?i.order:a,0);this.config.push({name:this.addPageName,order:r+1,items:[]}),this.addPageName="",this.currentPage=this.config.length-1,this.updateState(),this.$refs.tabsBar.openPageByIndex(this.config.length-1)},calcNewIndexFor(t,e){if(t===this.pageDelete)throw new Error(`${this.$t("Can not delete this page, it is referenced by")}: ${e}`);return t>this.pageDelete?t-1:t},updateRecordListReferences(){this.config.forEach(t=>{t.items.forEach(e=>{e.component==="FormRecordList"&&(e.config.form=this.calcNewIndexFor(e.config.form*1,e.config.label))})})},updateNavigationButtonsReferences(){this.config.forEach(t=>{t.items.forEach(e=>{e.component==="FormButton"&&e.config.event==="pageNavigate"&&(e.config.eventData=this.calcNewIndexFor(e.config.eventData*1,e.config.label))})})},async deletePage(){const t=H.cloneDeep(this.config);try{this.updateRecordListReferences(),this.updateNavigationButtonsReferences(),this.$refs.tabsBar.closePageByIndex(this.pageDelete),this.$refs.tabsBar.updateTabsReferences(this.pageDelete),await this.$nextTick(),this.config.splice(this.pageDelete,1)}catch(e){this.config=t,Qa.ProcessMaker.alert(e.message,"danger");return}this.updatePageOrder(this.config),this.$store.dispatch("undoRedoModule/pushState",{config:JSON.stringify(this.config),currentPage:this.currentPage,deletedPage:!0})},inspect(t={}){this.inspection=t,this.selected=t;const e=this.accordions.find(r=>this.getInspectorFields(r).length>0);e&&this.openAccordion(e)},cloneControl(t){const e={config:JSON.parse(JSON.stringify(t.config)),inspector:JSON.parse(JSON.stringify(t.inspector)),component:t.component,"editor-component":t["editor-component"],"editor-control":t["editor-control"],label:t.label,value:t.value};if(t.component==="FormDatePicker"&&e.config.phrases&&(e.config.phrases.ok=this.$t(e.config.phrases.ok),e.config.phrases.cancel=this.$t(e.config.phrases.cancel)),e.config.label=this.$t(e.config.label),Array.isArray(e.config.options))for(const r in e.config.options)e.config.options[r].content=this.$t(e.config.options[r].content);return t.container&&(e.items=JSON.parse(JSON.stringify(t.items)),e.container=!0),(H.findIndex(t.inspector,Yt)!==-1||t.component==="FormLoop")&&([this.variables,e.config.name]=this.generator.generate(this.config,e["editor-control"]?e["editor-control"]:e.component),H.has(e,"config.settings.varname")&&(e.config.settings.varname=e.config.name)),e},initiateLanguageSupport(){document.documentElement.lang&&(this.language=document.documentElement.lang),this.collator=Intl.Collator(this.language)},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},previewAiChanges(t,e){this.config.forEach((r,a)=>{r.items.forEach((i,n)=>{i.component==="AiSection"&&e===i.config.aiConfig.nonce&&this.$set(i,"items",JSON.parse(JSON.stringify(t)))})})},applyAiChanges(t){t.component="FormMultiColumn",t.label="Multicolumn / Table",t["editor-control"]="MultiColumn",t["editor-component"]="MultiColumn",t.inspector=[{type:"ContainerColumns",field:"options",config:{label:"Column Width",validation:"columns-adds-to-12"}}],t.config={icon:"fas fa-table",options:[{value:"1",content:"12"}]}},updateProgress(t,e){this.config.forEach(r=>{r.items.forEach(a=>{if(a.component==="AiSection"&&e===a.config.aiConfig.nonce){if(this.cancelledJobs.some(i=>i===e))return;this.$set(a.config.aiConfig,"progress",t)}})})},addDefaultAiControl(){const t=this.builder.controls.find(r=>r.component==="AiSection"),e=this.cloneControl(t);e.config.aiConfig.autofocus=!0,e.config.aiConfig.screenTitle=this.screen.title,e.config.aiConfig.screenDescription=this.screen.description,this.config[this.currentPage].items.push(e),this.updateState(),this.inspect(e)}}};var EK=function(){var e=this,r=e._self._c;return r("b-row",{staticClass:"custom-row h-100 m-0"},[r("b-col",{staticClass:"overflow-hidden h-100 p-0 controls-column"},[r("b-card",{staticClass:"h-100 rounded-0 border-top-0 border-bottom-0 border-left-0",attrs:{"no-body":""}},[r("b-input-group",{staticStyle:{height:"42px"},attrs:{size:"sm"}},[r("b-input-group-prepend",[r("span",{staticClass:"input-group-text rounded-0 border-left-0 border-top-0 border-bottom-0"},[r("i",{staticClass:"fas fa-search icon"})])]),r("b-form-input",{staticClass:"border-0 rounded-0",staticStyle:{height:"42px"},attrs:{type:"text",size:"lg",placeholder:e.$t("Search Here")},model:{value:e.filterQuery,callback:function(a){e.filterQuery=a},expression:"filterQuery"}})],1),r("b-card-body",{staticClass:"p-0 overflow-auto",attrs:{"no-body":""}},[e._l(e.filteredControlsGrouped,function({name:a,elements:i},n){return[r("b-button",{staticClass:"w-100 rounded-0 text-left",staticStyle:{"font-size":"smaller",height:"42px",color:"grey","border-color":"rgb(224, 224, 224)","background-color":"rgb(235, 238, 242)"},attrs:{"aria-controls":`collapse-${n+1}`},on:{click:function(s){return e.toggleCollapse(n)}}},[r("strong",[e._v(e._s(e.$t(a)))]),r("b-icon",{staticClass:"float-right",attrs:{icon:e.isCollapsed(n)?"chevron-down":"chevron-up"}})],1),r("b-collapse",{staticClass:"mt-2",model:{value:e.collapse[n],callback:function(s){e.$set(e.collapse,n,s)},expression:"collapse[index]"}},[r("b-list-group",[e.renderControls?r("draggable",e._b({staticClass:"controls list-group w-auto list-group-flush",attrs:{id:"controls","data-cy":"controls",clone:e.cloneControl},model:{value:e.filteredControlsGrouped[n].elements,callback:function(s){e.$set(e.filteredControlsGrouped[n],"elements",s)},expression:"filteredControlsGrouped[index].elements"}},"draggable",{sort:!1,group:{name:"controls",pull:"clone",put:!1}},!1),e._l(i,function(s,o){return r("b-list-group-item",{directives:[{name:"b-popover",rawName:"v-b-popover.hover.right",value:{content:e.$t(s.popoverContent),customClass:"custom-popover",boundaryPadding:16},expression:`{
341
341
  content: $t(element.popoverContent),
342
342
  customClass: 'custom-popover',
343
343
  boundaryPadding: 16
344
- }`,modifiers:{hover:!0,right:!0}}],key:o,staticClass:"gray-text",attrs:{boundary:"viewport","data-cy":`controls-${s.component}`}},[s.config&&s.config.icon?r("i",{class:s.config.icon}):e._e(),r("span",{staticClass:"svg-icon",staticStyle:{width:"12px",height:"12px"},domProps:{innerHTML:e._s(s.config.svg)}}),e._v(" "+e._s(e.$t(s.label))+" ")])}),1):e._e()],1)],1)]})],2)],1)],1),r("b-col",{ref:"screen-container",staticClass:"overflow-auto mh-100 p-0 d-flex flex-column position-relative",attrs:{id:"screen-container"}},[r("tabs-bar",{ref:"tabsBar",attrs:{pages:e.config},on:{"tab-opened":function(a){e.currentPage=a}},scopedSlots:e._u([{key:"tabs-start",fn:function(){return[e.showToolbar?r("pages-dropdown",{attrs:{data:e.sortedPages},on:{addPage:function(a){return e.$bvModal.show("addPageModal")},clickPage:e.onClick,seeAllPages:function(a){return e.$bvModal.show("openSortable")}}}):e._e()]},proxy:!0},{key:"default",fn:function({currentPage:a}){return[e.isCurrentPageEmpty(a)?r("div",{staticClass:"d-flex justify-content-center align-items-center drag-placeholder text-center position-absolute rounded mt-4 flex-column",attrs:{"data-cy":"screen-drop-zone"}},[r("svg",{attrs:{width:"81",height:"107",viewBox:"0 0 81 107",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{d:"M47.125 28.6562V0.5H5.71875C2.96523 0.5 0.75 2.71523 0.75 5.46875V101.531C0.75 104.285 2.96523 106.5 5.71875 106.5H75.2812C78.0348 106.5 80.25 104.285 80.25 101.531V33.625H52.0938C49.3609 33.625 47.125 31.3891 47.125 28.6562ZM60.375 77.5156C60.375 78.882 59.257 80 57.8906 80H23.1094C21.743 80 20.625 78.882 20.625 77.5156V75.8594C20.625 74.493 21.743 73.375 23.1094 73.375H57.8906C59.257 73.375 60.375 74.493 60.375 75.8594V77.5156ZM60.375 64.2656C60.375 65.632 59.257 66.75 57.8906 66.75H23.1094C21.743 66.75 20.625 65.632 20.625 64.2656V62.6094C20.625 61.243 21.743 60.125 23.1094 60.125H57.8906C59.257 60.125 60.375 61.243 60.375 62.6094V64.2656ZM60.375 49.3594V51.0156C60.375 52.382 59.257 53.5 57.8906 53.5H23.1094C21.743 53.5 20.625 52.382 20.625 51.0156V49.3594C20.625 47.993 21.743 46.875 23.1094 46.875H57.8906C59.257 46.875 60.375 47.993 60.375 49.3594ZM80.25 25.7371V27H53.75V0.5H55.0129C56.3379 0.5 57.6008 1.01758 58.5324 1.94922L78.8008 22.2383C79.7324 23.1699 80.25 24.4328 80.25 25.7371Z",fill:"#699CFF"}})]),r("h3",[e._v(e._s(e.$t("Place your controls here.")))]),r("p",[e._v(" "+e._s(e.$t("To begin creating a screen, drag and drop items from the Controls Menu on the left."))+" ")])]):e._e(),e.renderControls?r("draggable",e._b({key:e.editorContentKey,staticClass:"h-100",attrs:{"data-cy":"editor-content","ghost-class":"form-control-ghost",value:e.config[a].items},on:{input:e.updateConfig}},"draggable",{group:{name:"controls"},swapThreshold:.5},!1),e._l(e.config[a].items,function(i,n){return r("div",{key:n,staticClass:"control-item mt-4 mb-4",class:{selected:e.selected===i,hasError:e.hasError(i)},attrs:{selector:i.config.customCssSelector},on:{click:function(s){return e.inspect(i)}}},[i.container?r("div",{staticClass:"card container-lement",class:{"ai-section-card":e.isAiSection(i)},attrs:{"data-cy":"screen-element-container"},on:{click:function(s){return e.inspect(i)}}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center",class:{pulse:e.isAiSection(i)&&e.aiPreview(i)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||i.label||e.$t("Field Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(i)&&e.aiPreview(i)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{"data-test":"apply-ai-btn",title:e.$t("Apply Changes")},on:{click:function(s){return e.applyAiChanges(i)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(i)&&e.aiPreview(i)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"data-test":"copy-control-btn",title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"data-test":"delete-control-btn",title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],{tag:"component",staticClass:"card-body",class:e.elementCssClass(i),attrs:{"validation-errors":e.validationErrors,selected:e.selected,config:i.config,"ai-element":i},on:{inspect:e.inspect,"update-state":e.updateState},model:{value:i.items,callback:function(s){e.$set(i,"items",s)},expression:"element.items"}})],1):r("div",{staticClass:"card",attrs:{"data-cy":"screen-element-container"}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],e._b({tag:"component",staticClass:"card-body m-0 pb-4 pt-4",class:[e.elementCssClass(i),{"prevent-interaction":!i.config.interactive}],attrs:{tabindex:i.config.interactive?0:-1},on:{input:function(s){i.config.interactive&&(i.config.content=s)}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}}},"component",i.config,!1))],1)])}),0):e._e(),e.isCurrentPageEmpty(a)?e._e():r("div",{attrs:{"data-cy":"screen-drop-zone"}},[e._v("   ")])]}}])})],1),e.renderControls?r("b-col",{staticClass:"overflow-hidden h-100 p-0 inspector-column"},[r("b-card",{staticClass:"p-0 h-100 border-top-0 border-bottom-0 border-right-0 rounded-0",attrs:{"no-body":""}},[r("b-card-body",{staticClass:"p-0 h-100 overflow-auto"},[e._l(e.accordions,function(a){return[e.getInspectorFields(a)&&e.getInspectorFields(a).length>0?r("b-button",{key:`${e.accordionName(a)}-button`,staticClass:"text-left card-header d-flex align-items-center w-100 outline-0 text-capitalize shadow-none",attrs:{variant:"outline","data-cy":`accordion-${e.accordionName(a).replace(" ","")}`,"accordion-name":`accordion-${e.accordionName(a).replace(" ","")}`,"is-open":a.open?"1":"0"},on:{click:function(i){return e.toggleAccordion(a)}}},[r("i",{staticClass:"fas fa-cog mr-2"}),e._v(" "+e._s(e.$t(e.accordionName(a)))+" "),r("i",{staticClass:"fas fa-angle-down ml-auto",class:{"fas fa-angle-right":!a.open}})]):e._e(),r("b-collapse",{key:`${e.accordionName(a)}-collapse`,attrs:{id:e.accordionName(a)},model:{value:a.open,callback:function(i){e.$set(a,"open",i)},expression:"accordion.open"}},e._l(e.getInspectorFields(a),function(i,n){return r(i.type,e._b({key:n,tag:"component",staticClass:"border-bottom m-0 p-4",attrs:{"data-cy":"inspector-"+(i.field||i.config.name),"field-name":i.field,"field-accordion":`accordion-${e.accordionName(a).replace(" ","")}`,builder:e.builder,"form-config":e.config,"screen-type":e.screenType,"current-page":e.currentPage,"selected-control":e.selected},on:{"update-state":e.updateState,setName:function(s){e.inspection.config.name=s}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}},model:{value:e.inspection.config[i.field],callback:function(s){e.$set(e.inspection.config,i.field,s)},expression:"inspection.config[item.field]"}},"component",i.config,!1))}),1)]})],2)],1)],1):e._e(),r("b-modal",{ref:"openSortable",attrs:{id:"openSortable","header-close-content":"&times;",role:"dialog",size:"lg",title:e.$t("Edit Pages"),"ok-title":e.$t("DONE"),"ok-only":"","ok-variant":"secondary","header-class":"modal-header-custom"},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Edit Pages")))]),r("span",{staticClass:"modal-subtitle"},[e._v(e._s(e.$t("Change pages order and name")))])]},proxy:!0},{key:"modal-header-close",fn:function({close:a}){return[r("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close"},on:{click:function(i){return a()}}},[e._v("×")])]}}])},[r("Sortable",{attrs:{items:e.config,"filter-key":"name"},on:{"item-edit":()=>{},"item-delete":e.confirmDelete,"add-page":function(a){return e.$bvModal.show("addPageModal")}}})],1),r("b-modal",{ref:"addPageModal",attrs:{id:"addPageModal","header-class":"pb-2",size:"lg","ok-title":e.$t("SAVE"),"cancel-title":e.$t("CANCEL"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;","data-cy":"add-page-modal","ok-disabled":!e.addPageName||!!e.checkPageName(e.addPageName)},on:{ok:e.addPage,show:function(a){e.addPageName="",e.showAddPageValidations=!1}},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Create New Page")))]),r("small",{staticClass:"modal-subtitle mb-n2"},[e._v(e._s(e.$t("Create a new page in your screen")))])]},proxy:!0}])},[r("form-input",{ref:"addPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The name of the new page to add"),error:e.checkPageName(e.addPageName),"data-cy":"add-page-name","aria-required":"true"},model:{value:e.addPageName,callback:function(a){e.addPageName=a},expression:"addPageName"}})],1),r("b-modal",{ref:"editPageModal",attrs:{title:e.$t("Edit Page Title"),"ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.editPage}},[r("required"),r("form-input",{ref:"editPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The new name of the page"),validation:"required",error:e.checkPageName(e.editPageName),required:"","aria-required":"true"},model:{value:e.editPageName,callback:function(a){e.editPageName=a},expression:"editPageName"}})],1),r("b-modal",{ref:"confirm",attrs:{title:e.$t("Caution!"),"ok-title":e.$t("Delete"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.deletePage,cancel:e.hideConfirmModal}},[r("p",[e._v(e._s(e.confirmMessage))]),r("div",{attrs:{slot:"modal-ok"},slot:"modal-ok"},[e._v(e._s(e.$t("Delete")))])])],1)},MK=[],$K=oe(OK,EK,MK,!1,null,"fdf4961e",null,null);const Vx=$K.exports,PK=1,DK={name:"FormMultiColumn",mixins:[gn,sb,$c],props:["value","selected","name","config","transientData","formConfig"],components:{draggable:Oa,FormInput:Ba,FormSelectList:ee.FormSelectList,FormTextArea:ee.FormTextArea,FormCheckbox:ee.FormCheckbox,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},data(){return{items:[]}},computed:{model(){return this.$parent.model}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},methods:{classColumn(t){let e=PK;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e} ${this.columnVerticalAlign(t)}`},columnVerticalAlign(t){let e="";if(this.items.length>0&&this.items[t].length===1){let r=this.items[0].filter(n=>n.component==="FormText");if(r.length===0)return"";let a=r[0],i=" justify-content-"+(a.config.textAlign==="right"?"end":a.config.textAlign);switch(a.config.verticalAlign){case"top":e="d-flex align-items-start"+i;break;case"middle":e="d-flex align-items-center"+i;break;case"bottom":e="d-flex align-items-end"+i;break}}return e},inspect(t){this.$emit("inspect",t)},submit(){this.$emit("submit")},pageNavigate(t){this.$emit("pageNavigate",t)}}};var IK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",{staticClass:"row"},e._l(e.items,function(a,i){return r("div",{key:i,staticClass:"column-draggable",class:e.classColumn(i)},[e._l(a.filter(e.shouldElementBeVisible),function(n,s){return[n.container?r(n.component,{key:s,ref:"container",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{transientData:e.transientData,config:n.config,name:n.config.name!==void 0?n.config.name:null,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}}):r("div",{key:s,staticClass:"w-100",attrs:{id:n.config.name?n.config.name:void 0,selector:n.config.customCssSelector}},[r(n.component,e._b({ref:"elements",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{validationData:e.transientData,disabled:n.config.interactive||n.config.disabled,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:e.model[e.getValidPath(n.config.name)],callback:function(o){e.$set(e.model,e.getValidPath(n.config.name),o)},expression:"model[getValidPath(element.config.name)]"}},"component",n.config,!1))],1)]})],2)}),0)])},zK=[],LK=oe(DK,IK,zK,!1,null,null,null,null);const mu=LK.exports,Ux={value:"string",content:"Text"},Gx={value:"int",content:"Integer"},jK={value:"currency",content:"Currency"},NK={value:"password",content:"Password"},RK={value:"percentage",content:"Percentage"},Hx={value:"float",content:"Decimal"},Yx={value:"datetime",content:"Datetime"},Qx={value:"date",content:"Date"},FK={value:"boolean",content:"Boolean"},qK=[Ux,Gx,jK,RK,Hx,Yx,Qx,NK],BK=[Ux,Gx,Hx];function gu(t){return{type:"FormMultiselect",field:"dataFormat",config:{label:"Data Type",name:"Data Type",helper:"The data type specifies what kind of data is stored in the variable.",validation:"required",options:t}}}function WK(){return{type:nf,field:"dataMask",config:{label:"Data Format",name:"Data Format",helper:"The data format for the selected type."}}}const Kx=gu(qK),VK=gu(BK),UK=gu([FK]),Jx=gu([Qx,Yx]),Zx=WK(),GK=[{editorComponent:ee.FormHtmlEditor,editorBinding:"FormHtmlEditor",rendererComponent:ee.FormHtmlEditor,rendererBinding:"FormHtmlEditor",control:{popoverContent:"Use a Rich Text Editor to add HTML-formatted",order:1,group:"Content Fields",label:"Rich Text",component:"FormHtmlViewer","editor-component":"FormHtmlEditor","editor-control":"FormHtmlEditor",config:{icon:"fas fa-pencil-ruler",interactive:!0,content:"<p>Rich text editor</p>",renderVarHtml:null},inspector:[{type:"FormTextArea",field:"content",config:{rows:5,label:"Content",helper:"The HTML text to display",value:""}},{type:"FormCheckbox",field:"renderVarHtml",config:{label:"Render HTML from a Variable",helper:"",value:""}}]}},{builderComponent:ee.FormInput,builderBinding:"FormInput",rendererComponent:Ba,rendererBinding:"FormMaskedInput",control:{popoverContent:"Collect a string of text and format it as one of several data types",order:1,group:"Input Fields",label:"Line Input",component:"FormInput","editor-component":"FormInput","editor-control":"FormInput",config:{icon:"far fa-square",label:"New Input",name:"",placeholder:"",validation:"",helper:null,type:"text",dataFormat:"string"},inspector:[Yt,Br,Kx,Zx,Ra,Nn,Si,al,ua,la,Rn]}},{editorComponent:ee.FormTextArea,editorBinding:"FormTextArea",rendererComponent:ee.FormTextArea,rendererBinding:"FormTextArea",control:{popoverContent:"Collect a multi-line string of text, to allow for extensive, richly formatted responses",order:4,group:"Input Fields",label:"Textarea",component:"FormTextArea","editor-component":"FormTextArea","editor-control":"FormTextArea","fa-icon":"fas fa-paragraph",config:{icon:"fas fa-paragraph",label:"New Textarea",placeholder:"",helper:null,rows:2,richtext:!1,currency:{code:"USD",name:"US Dollar",format:"#,###.##",symbol:"$"}},inspector:[Yt,Br,Nn,Si,{type:"FormCheckbox",field:"richtext",config:{label:"Rich Text",helper:""}},Ra,{type:"FormInput",field:"rows",config:{label:"Rows",helper:"The number of rows to provide for input",validation:"integer"}},al,ua,la,Rn]}},{editorComponent:ee.FormSelectList,editorBinding:"FormSelectList",rendererComponent:ee.FormSelectList,rendererBinding:"FormSelectList",control:{popoverContent:"Collect options from a list, as radio butttons or dropdowns",order:2,group:"Input Fields",label:"Select List",component:"FormSelectList","editor-component":"FormSelectList","editor-control":"FormSelectList",config:{icon:"fas fa-angle-double-down",label:"New Select List",placeholder:"",validation:"",dataSourceUrl:"",dataSourceEndpoint:"",rootElement:"response",options:{showRenderAs:!0,dataSource:ea.provideData,jsonData:"",pmqlQuery:"",dataName:"response",renderAs:"dropdown",allowMultiSelect:!1,selectedOptions:[],optionsList:[],key:"value",value:"content",valueTypeReturned:"single"},helper:null},inspector:[Yt,Br,Nn,Ra,Si,{type:"OptionsList",field:"options",config:{}},ua,la,Rn,al]}},{editorComponent:ee.FormCheckbox,editorBinding:"FormCheckbox",rendererComponent:ee.FormCheckbox,rendererBinding:"FormCheckbox",control:{popoverContent:"Add a checkbox or toggle for true/false responses",order:6,group:"Input Fields",label:"Checkbox",component:"FormCheckbox","editor-component":"FormCheckbox","editor-control":"FormCheckbox",config:{icon:"fas fa-check-square",label:"New Checkbox",helper:null,name:null,initiallyChecked:!1,validation:"",toggle:!1},inspector:[Yt,Br,Si,Ra,{type:"FormCheckbox",field:"initiallyChecked",config:{label:"Checked by default",helper:"Should the checkbox be checked by default"}},ua,la,ev,td]}},{editorComponent:ee.FormDatePicker,editorBinding:"FormDatePicker",rendererComponent:ee.FormDatePicker,rendererBinding:"FormDatePicker",control:{popoverContent:"Collect a date or date/time",order:5,group:"Input Fields",label:"Date Picker",component:"FormDatePicker","editor-component":"FormDatePicker","editor-control":"FormDatePicker",config:{icon:"far fa-calendar-alt",label:"New Date Picker",type:"datetime",name:"",placeholder:"",minDate:"",maxDate:""},inspector:[{type:"FormInput",field:"minDate",config:{name:"Minimum Date",label:"Minimum Date",validation:"date_or_mustache"}},{type:"FormInput",field:"maxDate",config:{name:"Maximum Date",label:"Maximum Date",validation:"after_min_date|date_or_mustache"}},Yt,Br,Jx,Ra,Nn,Si,ua,la,td,Rn]}},{editorComponent:qa,editorBinding:"FormButton",rendererComponent:qa,rendererBinding:"FormButton",control:{popoverContent:"Add special buttons that link between subpages within this Form",order:1,group:"Navigation",label:"Page Navigation",component:"FormButton","editor-component":"FormButton","editor-control":"PageNavigation",config:{icon:"far fa-compass",label:"Page Navigation",variant:"primary",event:"pageNavigate",eventData:null},inspector:[{type:"PageSelect",field:"eventData",config:{label:"Destination Screen",helper:"The destination page to navigate to"}},Xg,rd]}},{editorComponent:mu,editorBinding:"FormMultiColumn",rendererComponent:mu,rendererBinding:"FormMultiColumn",control:{popoverContent:"Organize and group your content in columns",order:2,group:"Content Fields",label:"Multicolumn / Table",component:"FormMultiColumn","editor-component":"MultiColumn","editor-control":"MultiColumn",container:!0,items:[[],[]],config:{icon:"fas fa-table",options:[{value:"1",content:"6"},{value:"2",content:"6"}]},inspector:[{type:"ContainerColumns",field:"options",config:{label:"Column Width",validation:"columns-adds-to-12"}},ua,la]}},{editorComponent:xs,editorBinding:"FormLoop",rendererComponent:xs,rendererBinding:"FormLoop",control:{popoverContent:"Add a repeatable section of content",order:5,group:"Content Fields",label:"Loop",component:"FormLoop","editor-component":"Loop","editor-control":"Loop",container:!0,items:[],config:{name:"",icon:"fas fa-redo",settings:{type:"new",varname:"loop",times:"3",add:!1}},inspector:[{type:"LoopInspector",field:"settings",config:{}}]}},{editorComponent:hu,editorBinding:"FormText",rendererComponent:fu,rendererBinding:"FormRecordList",control:{popoverContent:"Format content in a table structure and allow for adding rows",order:4,group:"Content Fields",label:"Record List",component:"FormRecordList","editor-component":"FormText","editor-control":"FormRecordList",config:{name:"",icon:"fas fa-th-list",label:"New Record List",editable:!1,fields:{dataSource:ea.provideData,jsonData:""},form:""},inspector:[Yt,{type:"FormInput",field:"label",config:{label:"List Label",helper:"The label describes this record list"}},{type:"FormCheckbox",field:"editable",config:{label:"Editable?",helper:"Should records be editable/removable and can new records be added"}},{type:"ColumnSetup",field:"fields",config:{label:"Columns",helper:"List of columns to display in the record list"}},{type:"PageSelect",field:"form",config:{label:"Record Form",helper:"The form to use for adding/editing records"}},ua,la]}},{editorComponent:Jn,editorBinding:"FormImage",rendererComponent:Jn,rendererBinding:"FormImage",control:{popoverContent:"Upload an image to your screen",order:3,group:"Content Fields",label:"Image",component:"FormImage","editor-component":"FormImage","editor-control":"FormImage",config:{label:"Image",icon:"fas fa-image",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"name",config:{label:"Name",helper:"Image name"}},{type:"ImageUpload",field:"image",config:{label:"Upload",helper:"Upload image"}},{type:"ImageVariable",field:"imageName",config:{label:"Render from a variable name",helper:null}},{type:"FormInput",field:"height",config:{label:"Height",helper:"Image height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"image width",type:"number"}}]}},{editorComponent:yn,editorBinding:"FormAvatar",rendererComponent:yn,rendererBinding:"FormAvatar",control:{popoverContent:"User avatar",order:3,group:"Dashboards",label:"User Avatar",component:"FormAvatar","editor-component":"FormAvatar","editor-control":"FormAvatar",config:{label:"User Avatar",icon:"fas fa-user-circle",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"height",config:{label:"Height",helper:"Avatar height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"Avatar width",type:"number"}}]}},{editorComponent:qa,editorBinding:"FormSubmit",rendererComponent:qa,rendererBinding:"FormButton",control:{popoverContent:"Add an action to submit your form or update a field",order:3,group:"Input Fields",label:"Submit Button",component:"FormButton","editor-component":"FormButton","editor-control":"FormSubmit",config:{icon:"fas fa-share-square",label:"New Submit",variant:"primary",event:"submit",loading:!1,loadingLabel:"Loading...",defaultSubmit:!0,name:null,fieldValue:null,tooltip:{}},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the button's text"}},{type:"FormInput",field:"name",config:{label:"Variable Name",name:"Variable Name",helper:"A variable name is a symbolic name to reference information.",validation:"regex:/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*(?<![.])$/|not_in:"+rl}},tv,av,iv,rv,{type:"FormInput",field:"fieldValue",config:{label:"Value",helper:"The value being submitted"}},rd]}},{editorComponent:ks,editorBinding:"FormNestedScreen",rendererComponent:ks,rendererBinding:"FormNestedScreen",control:{popoverContent:"Add and reuse another Form within this Form",order:6,group:"Content Fields",label:"Nested Screen",component:"FormNestedScreen","editor-component":"FormNestedScreen","editor-control":"FormNestedScreen",config:{label:"Nested Screen",icon:"fas fa-file-invoice",variant:"primary",name:"Nested Screen",value:null},inspector:[{type:"ScreenSelector",field:"screen",config:{label:"Screen",name:"SelectScreen","validate-nested":!1,helper:"Select a screen"}}]}},{rendererComponent:bn,rendererBinding:"FileUpload",builderComponent:bn,builderBinding:"FileUpload",control:{group:"Files",popoverContent:"Collect files uploaded into the Form",order:1,label:"File Upload",component:"FileUpload","editor-component":"FileUpload","editor-control":"FileUpload",config:{label:"New File Upload",icon:"fas fa-file-upload"},inspector:[Yt,{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the field's name"}},{type:"MultipleUploadsCheckbox",field:"multipleUpload",config:{label:"Upload multiple files"}},{type:"FormInput",field:"accept",config:{label:"File Accepted",helper:"Common file types: application/msword, image/gif, image/jpeg, application/pdf, application/vnd.ms-powerpoint, application/vnd.ms-excel, text/plain"}},{type:"RequiredCheckbox",field:"validation",config:{label:"Required",helper:"Prevent form from being submitted unless a file is uploaded"}}]}},{rendererComponent:hu,rendererBinding:"FormText",builderComponent:Xs,builderBinding:"FileDownload",control:{popoverContent:"Offer a File download",order:2,group:"Files",label:"File Download",component:"FileDownload","editor-component":"FormText","editor-control":"FileDownload",config:{label:"New File Download",icon:"fas fa-file-download"},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The text to display"}},{type:"FormInput",field:"name",config:{label:"Name",helper:"The name of the Download"}}]}},{rendererComponent:ee.BFormComponent,rendererBinding:"BFormComponent",builderComponent:ee.BFormComponent,builderBinding:"BFormComponent",control:{popoverContent:"Add one of several Bootstrap Vue components",order:1,group:"Advanced",label:"Bootstrap Component",component:"BFormComponent","editor-component":"BFormComponent","editor-control":"BFormComponent",config:{bootstrapComponent:"b-form-tags",bootstrapConfig:"{}",label:"New Bootstrap Component",icon:"fab fa-bootstrap"},inspector:[Yt,Br,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-embed",content:"Embed"},{value:"b-img",content:"Image"},{value:"b-form-rating",content:"Form Rating"},{value:"b-form-spinbutton",content:"Form Spinbutton"},{value:"b-form-tags",content:"Form Tags"},{value:"b-form-timepicker",content:"Form Timepicker"},{value:"b-table",content:"Table"}]}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}},Ra]}},{rendererComponent:ee.BWrapperComponent,rendererBinding:"BWrapperComponent",builderComponent:ee.BWrapperComponent,builderBinding:"BWrapperComponent",control:{popoverContent:"Wrap an existing subpage within this Form into a Bootstrap Vue component",order:2,group:"Advanced",label:"Bootstrap Wrapper",component:"BWrapperComponent","editor-component":"BWrapperComponent","editor-control":"BWrapperComponent",config:{bootstrapComponent:"b-modal",bootstrapConfig:"{}",label:"New Bootstrap Wrapper",icon:"fab fa-bootstrap",name:"",form:""},inspector:[Yt,Br,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-alert",content:"Alert"},{value:"b-card",content:"Card"},{value:"b-collapse",content:"Collapse"},{value:"b-jumbotron",content:"Jumbotron"},{value:"b-modal",content:"Modal"}]}},{type:"PageSelect",field:"form",config:{label:"Page",helper:"The page to use inside the component"}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}}]}},{editorComponent:_s,editorBinding:"FormListTable",rendererComponent:_s,rendererBinding:"FormListTable",control:{popoverContent:"Create List Table",order:6.5,group:"Dashboards",label:"List Table",component:"FormListTable","editor-component":"FormListTable","editor-control":"FormListTable",config:{label:"List Table",icon:"fas fa-list",variant:"primary"},inspector:[{type:"FormMultiselect",field:"listOption",config:{icon:"fas fa-list",label:"List Table",options:[{value:"My Tasks",content:"My Tasks"},{value:"My Requests",content:"My Requests"},{value:"Start New Request",content:"Start New Request"}]}}]}},{editorComponent:ws,editorBinding:"FormAnalyticsChart",rendererComponent:ws,rendererBinding:"FormAnalyticsChart",control:{popoverContent:"Add a chart from the Analytics Reports",order:6,group:"Dashboards",label:"Analytics Chart",component:"FormAnalyticsChart","editor-component":"FormAnalyticsChart","editor-control":"FormAnalyticsChart",config:{label:"Analytics Chart",icon:"fas fa-chart-area",variant:"primary"},inspector:[{type:"AnalyticsSelector",field:"listChartOption",config:{label:"Chart"}}]}}],HK="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgxIiBoZWlnaHQ9IjI4MCIgdmlld0JveD0iMCAwIDI4MSAyODAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04NS4wNTYyIDczLjg4NkM4NS4wNTYyIDczLjg4NiAxMTUuMDggOTYuNjcgMTYwLjcyNCA1NC4wNjhDMjAxLjI2IDE2LjIzNDMgMjM0LjM1OSA3NS45Mjc1IDIzNC41OSAxMDQuNTEzQzIzNC44OSAxNDEuNTQzIDE5NC4wNTQgMTcxLjE3MyAyMTMuODcyIDE5NS40OTVDMjMzLjY5IDIxOS44MTcgMTc0LjU3IDI1OS45ODEgMTQyLjcwOCAyMjUuMjIyQzEwMy4wNzIgMTgxLjk4MyA5Mi4zMzQ1IDIxNy4xMTQgNjkuNzQyNSAyMTcuMTE0QzUzLjUyNzggMjE3LjExNCAyMC4yMzc2IDE3Ni44MjUgNDIuNzE4MSAxNDYuODUxQzYxLjYzNTIgMTIxLjYyOSA1MS4zMTgyIDExMy4yNTggNDYuMzIyIDEwNC41MTNDMzkuMTE0OSA5MS45MDIxIDU2LjIzMDQgNTcuNjcxNSA4NS4wNTYyIDczLjg4NloiIGZpbGw9IiNERUVFRkEiLz4KPHBhdGggZD0iTTIwNS41OTIgMTI0LjIzNUMyMDcuMjA2IDEyNC44MzUgMjA4Ljk2OSAxMjQuODc1IDIxMC42NDcgMTI0LjQ4OUMyMTcuNjc3IDEyMi44NzYgMjQxLjg1IDExOC42MDMgMjM3LjY1IDEzNy4zMzVDMjM2LjczNSAxNDEuMDUxIDIyMi41NzggMTYxLjg2NCAyNDIuNzM5IDE2OS40NjJDMjQ0LjIxNyAxNzAuMDI2IDI0NS43NzkgMTcwLjMzNCAyNDcuMzYgMTcwLjM3MkMyNTMuNTY4IDE3MC41IDI2NS44NjkgMTY5LjAzNCAyNzEuMDE3IDE2My43OTRDMjc3LjIzNyAxNTcuNDYzIDI3MC40NDIgMTYwLjQ2NSAyNzAuNDQyIDE2MC40NjVDMjcwLjQ0MiAxNjAuNDY1IDI0Ni43OTggMTcwLjc4MyAyMzguNDQ2IDE1OS44MzZDMjM3LjUxNyAxNTguNjE4IDIzNi45MjUgMTU2Ljg0OSAyMzYuNzU2IDE1NS4zMjZDMjM2LjQ2MiAxNTIuNjg2IDIzNy42MzQgMTQ5LjE5NyAyMzkuMTc0IDE0Ni4xNTlDMjQxLjI1OSAxNDIuMDQ4IDI1MS4yNjYgMTIzLjU1NSAyMjkuNTM5IDExOC4xNjhDMjI0LjUzMyAxMTYuOTc2IDIxNy4yNjMgMTE1LjkwNiAyMDcuODkgMTE5Ljg1MkMyMDIuNDIyIDEyMi4xNTQgMjAzLjYzMyAxMjMuNTA3IDIwNS41OTIgMTI0LjIzNVoiIGZpbGw9IiNCQ0RDRjgiLz4KPHBhdGggZD0iTTIxMC40MyAxMTcuMzMxTDIwNC4xMzcgMTE5LjY4N0MyMDEuOTY1IDEyMC41IDIwMC44NjMgMTIyLjkyIDIwMS42NzYgMTI1LjA5MkwyMDEuOTg4IDEyNS45MjZDMjAyLjgwMSAxMjguMDk4IDIwNS4yMjEgMTI5LjIgMjA3LjM5MyAxMjguMzg3TDIxMy42ODcgMTI2LjAzMkMyMTUuODU5IDEyNS4yMTkgMjE2Ljk2MSAxMjIuNzk5IDIxNi4xNDggMTIwLjYyNkwyMTUuODM2IDExOS43OTNDMjE1LjAyMyAxMTcuNjIgMjEyLjYwMyAxMTYuNTE4IDIxMC40MyAxMTcuMzMxWiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTcxLjgwMSAxMjQuMTQ3TDE1MS4wNDYgMTMxLjkxNEMxNDkuOTYgMTMyLjMyMSAxNDkuNDA5IDEzMy41MzEgMTQ5LjgxNSAxMzQuNjE3TDE0OS44OTcgMTM0LjgzNkMxNTAuMzAzIDEzNS45MjIgMTUxLjUxMyAxMzYuNDczIDE1Mi42IDEzNi4wNjZMMTczLjM1NSAxMjguMjk5QzE3NC40NDEgMTI3Ljg5MiAxNzQuOTkyIDEyNi42ODIgMTc0LjU4NSAxMjUuNTk2TDE3NC41MDMgMTI1LjM3N0MxNzQuMDk3IDEyNC4yOTEgMTcyLjg4NyAxMjMuNzQgMTcxLjgwMSAxMjQuMTQ3WiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTc3LjU5MyAxMzkuNjI0TDE1Ni44MzggMTQ3LjM5MUMxNTUuNzUyIDE0Ny43OTggMTU1LjIwMSAxNDkuMDA4IDE1NS42MDggMTUwLjA5NEwxNTUuNjg5IDE1MC4zMTNDMTU2LjA5NiAxNTEuMzk5IDE1Ny4zMDYgMTUxLjk1IDE1OC4zOTIgMTUxLjU0M0wxNzkuMTQ3IDE0My43NzZDMTgwLjIzMyAxNDMuMzY5IDE4MC43ODQgMTQyLjE1OSAxODAuMzc4IDE0MS4wNzNMMTgwLjI5NiAxNDAuODU0QzE3OS44OSAxMzkuNzY4IDE3OC42NzkgMTM5LjIxNyAxNzcuNTkzIDEzOS42MjRaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xOTYuNzU1IDExMy41ODVMMTc5LjkzNCAxMTkuODhDMTc3Ljc2MSAxMjAuNjkzIDE3Ni42NTkgMTIzLjExNCAxNzcuNDcyIDEyNS4yODZMMTgzLjIxNiAxNDAuNjMxQzE4NC4wMjkgMTQyLjgwMyAxODYuNDQ5IDE0My45MDUgMTg4LjYyMSAxNDMuMDkyTDIwNS40NDMgMTM2Ljc5N0MyMDcuNjE1IDEzNS45ODQgMjA4LjcxNyAxMzMuNTY0IDIwNy45MDQgMTMxLjM5MUwyMDIuMTYxIDExNi4wNDZDMjAxLjM0OCAxMTMuODc0IDE5OC45MjggMTEyLjc3MiAxOTYuNzU1IDExMy41ODVaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xODEuNjcyIDExNy42MUwxNjQuODUgMTIzLjkwNkMxNjIuNjc4IDEyNC43MTkgMTYxLjU3NiAxMjcuMTM5IDE2Mi4zODkgMTI5LjMxMkwxNjkuMjQxIDE0Ny42MTlDMTcwLjA1NCAxNDkuNzkxIDE3Mi40NzQgMTUwLjg5MyAxNzQuNjQ2IDE1MC4wOEwxOTEuNDY4IDE0My43ODVDMTkzLjY0IDE0Mi45NzIgMTk0Ljc0MiAxNDAuNTUxIDE5My45MjkgMTM4LjM3OUwxODcuMDc3IDEyMC4wNzJDMTg2LjI2NCAxMTcuODk5IDE4My44NDQgMTE2Ljc5NyAxODEuNjcyIDExNy42MVoiIGZpbGw9IiMxNTcyQzIiLz4KPHBhdGggZD0iTTE4NC4zMDUgMTEzLjg5NUwxODQuMTczIDExMy45NDRDMTgyLjcyNSAxMTQuNDg2IDE4MS45OSAxMTYuMSAxODIuNTMyIDExNy41NDhMMTkyLjEzMSAxNDMuMTk1QzE5Mi42NzMgMTQ0LjY0MyAxOTQuMjg2IDE0NS4zNzggMTk1LjczNCAxNDQuODM2TDE5NS44NjYgMTQ0Ljc4NkMxOTcuMzE1IDE0NC4yNDQgMTk4LjA0OSAxNDIuNjMxIDE5Ny41MDcgMTQxLjE4MkwxODcuOTA5IDExNS41MzZDMTg3LjM2NyAxMTQuMDg4IDE4NS43NTMgMTEzLjM1MyAxODQuMzA1IDExMy44OTVaIiBmaWxsPSIjMTU3MkMyIi8+CjxwYXRoIGQ9Ik0xMi43ODE2IDEzMC4yOTJDMTIuNzgxNiAxMzAuMjkyIDQ2LjU2NDggMTIwLjc5OCA0MS42NiAxNDIuNjcyQzQwLjgwODMgMTQ2LjEzMyAyOC41NDcyIDE2My45NTMgNDMuMTUyIDE3Mi41MDlDNDYuMjg4IDE3NC4zNDYgNDkuOTA3IDE3NS4xNiA1My41NDEzIDE3NS4xNDFDNjAuMDU3MyAxNzUuMTA3IDcwLjM4NzIgMTczLjg1MyA3NS4wMjc4IDE2OS4xM0M4MS4yNDcxIDE2Mi43OTkgNzQuNDUyNiAxNjUuODAxIDc0LjQ1MjYgMTY1LjgwMUM3NC40NTI2IDE2NS44MDEgNTUuMDUwNCAxNzMuNzgyIDQ1LjA2ODcgMTY3LjQyQzQxLjY2MDQgMTY1LjI0OCA0MC4xMTU1IDE2MS4wNDIgNDEuMDQxMSAxNTcuMTA3QzQxLjUxNDEgMTU1LjE1MyA0Mi4yMzQ1IDE1My4yNjcgNDMuMTg0NyAxNTEuNDk1QzQ1LjM1NTYgMTQ3LjQyOSA1NS4yNzY4IDEyOC44OTEgMzMuNTQ4OCAxMjMuNTA0QzI4LjU0MzYgMTIyLjMxMiAyMS4yNzM4IDEyMS4yNDIgMTEuOTAwMSAxMjUuMTg4QzIuNTI2MzcgMTI5LjEzNSAxMi43ODE2IDEzMC4yOTIgMTIuNzgxNiAxMzAuMjkyWiIgZmlsbD0iI0JDRENGOCIvPgo8cGF0aCBkPSJNNzkuNTcwNCAxNjAuOTA2TDczLjI3NzIgMTYzLjI2MkM3MS4xMDQ4IDE2NC4wNzUgNzAuMDAyOCAxNjYuNDk1IDcwLjgxNTggMTY4LjY2N0w3MS4xMjc4IDE2OS41MDFDNzEuOTQwOCAxNzEuNjczIDc0LjM2MTEgMTcyLjc3NSA3Ni41MzM1IDE3MS45NjJMODIuODI2OCAxNjkuNjA3Qzg0Ljk5OTIgMTY4Ljc5NCA4Ni4xMDEyIDE2Ni4zNzQgODUuMjg4MSAxNjQuMjAxTDg0Ljk3NjIgMTYzLjM2OEM4NC4xNjMxIDE2MS4xOTUgODEuNzQyOSAxNjAuMDkzIDc5LjU3MDQgMTYwLjkwNloiIGZpbGw9IiMxNTcyQzIiLz4KPHBhdGggZD0iTTkwLjIwMzEgMTUwLjU1Mkw4MC44NzYyIDE1NC4wNDNDNzguNzAzNyAxNTQuODU2IDc3LjYwMTcgMTU3LjI3NiA3OC40MTQ4IDE1OS40NDlMODIuOTEyMiAxNzEuNDY1QzgzLjcyNTMgMTczLjYzOCA4Ni4xNDU1IDE3NC43NCA4OC4zMTc5IDE3My45MjdMOTcuNjQ0OCAxNzAuNDM2Qzk5LjgxNzMgMTY5LjYyMyAxMDAuOTE5IDE2Ny4yMDMgMTAwLjEwNiAxNjUuMDNMOTUuNjA4OCAxNTMuMDEzQzk0Ljc5NTcgMTUwLjg0MSA5Mi4zNzU1IDE0OS43MzkgOTAuMjAzMSAxNTAuNTUyWiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTA1LjczIDE0MS4zTDkxLjgyMTMgMTQ2LjUwNkM4OS42NDg5IDE0Ny4zMTkgODguNTQ2OSAxNDkuNzM5IDg5LjM2IDE1MS45MTJMOTYuMjExNyAxNzAuMjE5Qzk3LjAyNDggMTcyLjM5MiA5OS40NDUgMTczLjQ5NCAxMDEuNjE3IDE3Mi42OEwxMTUuNTI2IDE2Ny40NzVDMTE3LjY5OSAxNjYuNjYyIDExOC44MDEgMTY0LjI0MiAxMTcuOTg4IDE2Mi4wNjlMMTExLjEzNiAxNDMuNzYyQzExMC4zMjMgMTQxLjU4OSAxMDcuOTAzIDE0MC40ODcgMTA1LjczIDE0MS4zWiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTA4LjY3NyAxMzcuNTA5TDEwOC41NDUgMTM3LjU1OEMxMDcuMDk2IDEzOC4xIDEwNi4zNjIgMTM5LjcxNCAxMDYuOTA0IDE0MS4xNjJMMTE2LjUwMiAxNjYuODA5QzExNy4wNDQgMTY4LjI1NyAxMTguNjU4IDE2OC45OTIgMTIwLjEwNiAxNjguNDVMMTIwLjIzOCAxNjguNEMxMjEuNjg2IDE2Ny44NTggMTIyLjQyMSAxNjYuMjQ1IDEyMS44NzkgMTY0Ljc5NkwxMTIuMjggMTM5LjE1QzExMS43MzggMTM3LjcwMiAxMTAuMTI1IDEzNi45NjcgMTA4LjY3NyAxMzcuNTA5WiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTQ0LjE5NCAxMjEuMTdDMTQzLjY5MyAxMjEuMTE0IDE0My4yMzMgMTIwLjg2NyAxNDIuOTExIDEyMC40NzlDMTQyLjU5IDEyMC4wOTEgMTQyLjQzMSAxMTkuNTk0IDE0Mi40NjggMTE5LjA5MUwxNDMuNTA2IDEwMC4xMzVDMTQzLjU2OCA5OS4wMDI3IDE0NC41MjQgOTguMTQyNCAxNDUuNjA5IDk4LjI0MjVMMTQ3LjEyMSA5OC4zODI1QzE0OC4yMDYgOTguNDgyNiAxNDguOTgzIDk5LjUwMjUgMTQ4LjgzMSAxMDAuNjI3TDE0Ni4yODEgMTE5LjQ0M0MxNDYuMjIzIDExOS45NDQgMTQ1Ljk3MyAxMjAuNDAzIDE0NS41ODQgMTIwLjcyNUMxNDUuMTk1IDEyMS4wNDcgMTQ0LjY5NyAxMjEuMjA2IDE0NC4xOTQgMTIxLjE3VjEyMS4xN1oiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTEzNS4yMzMgMTIyLjgwNEMxMzUuMDc3IDEyMi44NSAxMzQuOTE0IDEyMi44NjUgMTM0Ljc1MiAxMjIuODQ4QzEzNC41OTEgMTIyLjgzIDEzNC40MzQgMTIyLjc4MSAxMzQuMjkyIDEyMi43MDNDMTM0LjE0OSAxMjIuNjI2IDEzNC4wMjQgMTIyLjUyMSAxMzMuOTIyIDEyMi4zOTRDMTMzLjgyIDEyMi4yNjggMTMzLjc0NCAxMjIuMTIyIDEzMy42OTggMTIxLjk2N0wxMjkuOTkyIDExMC4xNzVDMTI5Ljg4NCAxMDkuODQgMTI5LjkxNCAxMDkuNDc1IDEzMC4wNzQgMTA5LjE2MkMxMzAuMjM1IDEwOC44NDggMTMwLjUxMyAxMDguNjExIDEzMC44NDkgMTA4LjUwM0wxMzEuODA4IDEwOC4yMTNDMTMxLjk3MyAxMDguMTY1IDEzMi4xNDYgMTA4LjE1MiAxMzIuMzE2IDEwOC4xNzRDMTMyLjQ4NiAxMDguMTk2IDEzMi42NDkgMTA4LjI1MyAxMzIuNzk2IDEwOC4zNDJDMTMyLjk0MyAxMDguNDMgMTMzLjA3IDEwOC41NDggMTMzLjE2OSAxMDguNjg4QzEzMy4yNjggMTA4LjgyOCAxMzMuMzM3IDEwOC45ODcgMTMzLjM3MSAxMDkuMTU1TDEzNi4xMTggMTIxLjIzN0MxMzYuMTk1IDEyMS41NjEgMTM2LjE0NiAxMjEuOTAzIDEzNS45ODIgMTIyLjE5NEMxMzUuODE4IDEyMi40ODQgMTM1LjU1MSAxMjIuNzAyIDEzNS4yMzMgMTIyLjgwNFYxMjIuODA0WiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTMwLjIzMiAxMjkuNjA0QzEyOS41NjggMTMwLjQyNyAxMjguMjMzIDEzMC40MTcgMTI3LjIwNCAxMjkuNTgyTDEwOC45NTMgMTE0Ljc1M0MxMDcuODYzIDExMy44NjcgMTA3LjU0MSAxMTIuNDAxIDEwOC4yNDUgMTExLjUyOUwxMDkuMjI3IDExMC4zMTNDMTA5LjkzMiAxMDkuNDQgMTExLjM3OCAxMDkuNTEyIDExMi40MSAxMTAuNDdMMTI5LjY4IDEyNi41MTVDMTMwLjY1MyAxMjcuNDE5IDEzMC44OTYgMTI4Ljc4MiAxMzAuMjMyIDEyOS42MDRaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xMzguNjY5IDE2Ny45MDZDMTM5LjEzOSAxNjguMDg4IDEzOS41MiAxNjguNDQ1IDEzOS43MzIgMTY4LjkwMkMxMzkuOTQ1IDE2OS4zNTkgMTM5Ljk3MSAxNjkuODgxIDEzOS44MDcgMTcwLjM1N0wxMzMuOTYyIDE4OC40MTlDMTMzLjYxMyAxODkuNDk4IDEzMi40NjkgMTkwLjA4NSAxMzEuNDQ1IDE4OS43MTFMMTMwLjAxOCAxODkuMTlDMTI4Ljk5NSAxODguODE2IDEyOC41MDQgMTg3LjYzMSAxMjguOTM4IDE4Ni41ODRMMTM2LjIwOSAxNjkuMDQzQzEzNi4zOTQgMTY4LjU3MyAxMzYuNzUyIDE2OC4xOTMgMTM3LjIxMSAxNjcuOTgxQzEzNy42NjkgMTY3Ljc2OSAxMzguMTkxIDE2Ny43NDIgMTM4LjY2OSAxNjcuOTA2VjE2Ny45MDZaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xNDcuNzUgMTY4LjYxNUMxNDcuOTEyIDE2OC42MSAxNDguMDc0IDE2OC42MzggMTQ4LjIyNiAxNjguNjk2QzE0OC4zNzcgMTY4Ljc1NCAxNDguNTE2IDE2OC44NDEgMTQ4LjYzNCAxNjguOTUzQzE0OC43NTIgMTY5LjA2NCAxNDguODQ3IDE2OS4xOTggMTQ4LjkxMyAxNjkuMzQ2QzE0OC45NzkgMTY5LjQ5NCAxNDkuMDE2IDE2OS42NTQgMTQ5LjAyIDE2OS44MTdMMTQ5LjU5MiAxODIuMTY0QzE0OS42MSAxODIuNTE2IDE0OS40ODkgMTgyLjg2IDE0OS4yNTMgMTgzLjEyMkMxNDkuMDE4IDE4My4zODUgMTQ4LjY4OCAxODMuNTQzIDE0OC4zMzcgMTgzLjU2MkwxNDcuMzM1IDE4My41OTdDMTQ3LjE2MyAxODMuNjAxIDE0Ni45OTMgMTgzLjU3IDE0Ni44MzQgMTgzLjUwNUMxNDYuNjc1IDE4My40NCAxNDYuNTMyIDE4My4zNDMgMTQ2LjQxMiAxODMuMjJDMTQ2LjI5MyAxODMuMDk3IDE0Ni4yIDE4Mi45NTEgMTQ2LjE0IDE4Mi43OUMxNDYuMDggMTgyLjYyOSAxNDYuMDU1IDE4Mi40NTggMTQ2LjA2NCAxODIuMjg3TDE0Ni40OTQgMTY5LjkwNUMxNDYuNTAzIDE2OS41NzEgMTQ2LjYzNyAxNjkuMjUzIDE0Ni44NyAxNjkuMDE0QzE0Ny4xMDMgMTY4Ljc3NSAxNDcuNDE3IDE2OC42MzMgMTQ3Ljc1IDE2OC42MTVWMTY4LjYxNVoiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTE1NC4zMjIgMTYzLjMxN0MxNTUuMTc0IDE2Mi42OTEgMTU2LjQ2MyAxNjMuMDQyIDE1Ny4yNDMgMTY0LjExMkwxNzEuMTAzIDE4My4xMUMxNzEuOTMxIDE4NC4yNDUgMTcxLjg2NyAxODUuNzQ0IDE3MC45NjMgMTg2LjQwOEwxNjkuNzAzIDE4Ny4zMzNDMTY4Ljc5OSAxODcuOTk3IDE2Ny40MTggMTg3LjU1OCAxNjYuNjY2IDE4Ni4zNjhMMTU0LjA2NSAxNjYuNDQ0QzE1My4zNTcgMTY1LjMyMyAxNTMuNDcgMTYzLjk0MyAxNTQuMzIyIDE2My4zMTdaIiBmaWxsPSIjNTJBNUVDIi8+Cjwvc3ZnPgo=",Zte="",YK={data(){return{title:"We're Sorry",message:"An error has occurred. Please try again. If the problem persists, please contact your administrator."}}};var QK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"simple-error-message-main"},[e._m(0),r("p",[r("span",{staticClass:"simple-error-message-title"},[e._v(" "+e._s(e.$t(e.title))+" ")])]),r("p",[r("span",{staticClass:"simple-error-message-message"},[e._v(e._s(e.$t(e.message)))])])])},KK=[function(){var t=this,e=t._self._c;return e("p",[e("img",{staticClass:"simple-error-message-icon",attrs:{src:HK}})])}],JK=oe(YK,QK,KK,!1,null,null,null,null);const ZK={components:{simpleErrorMessage:JK.exports,VueFormRenderer:Gi},props:{initialTaskId:{type:Number,default:null},initialScreenId:{type:Number,default:null},initialRequestId:{type:Number,default:null},initialProcessId:{type:Number,default:null},initialNodeId:{type:String,default:null},userId:{type:Number,default:null},csrfToken:{type:String,default:null},value:{type:Object,default:()=>{}},beforeLoadTask:{type:Function,default:()=>new Promise(t=>{t()})},initialLoopContext:{type:String,default:""},taskPreview:{type:Boolean,default:!1},loading:{type:Number,default:null}},data(){return{task:null,taskId:null,request:null,requestId:null,screen:null,screenId:null,renderComponent:"task-screen",processId:null,nodeId:null,disabled:!1,socketListeners:[],requestData:{},hasErrors:!1,refreshScreen:0,redirecting:null,loadingButton:!1}},watch:{initialScreenId:{handler(){this.screenId=this.initialScreenId}},initialTaskId:{handler(){this.taskId=this.initialTaskId}},initialRequestId:{handler(){this.requestId=this.initialRequestId}},initialProcessId:{handler(){this.processId=this.initialProcessId}},initialNodeId:{handler(){this.nodeId=this.initialNodeId}},screenId:{handler(){this.screenId&&this.loadScreen(this.screenId)}},taskId:{handler(){this.taskId&&(!this.task||this.task.id!==this.taskId)&&this.loadTask()}},requestId:{handler(){this.requestId?(this.setMetaValue(),this.initSocketListeners()):this.unsubscribeSocketListeners()}},task:{handler(){this.screen||(this.screen=this.task&&this.task.interstitial_screen),this.taskId=this.task.id,this.nodeId=this.task.element_id,this.listenForParentChanges(),this.task.process_request.status==="COMPLETED"&&(this.taskPreview||this.$emit("completed",this.task.process_request.id)),this.taskPreview&&this.task.status==="CLOSED"&&(this.task.interstitial_screen._interstitial=!1,this.task.screen.config=this.disableForm(this.task.screen.config),this.screen=this.task.screen)}},value:{handler(){this.requestData=this.value}},screen:{handler(){if(this.screen&&this.renderComponent!=="ConversationalForm")if(this.screen.type==="CONVERSATIONAL")this.renderComponent="ConversationalForm";else{const t=H.get(this.screen,"_interstitial",!1);let e=H.get(this,"task.component","task-screen");(e===null||t)&&(e="task-screen"),this.renderComponent=e}}}},computed:{shouldAddSubmitButton(){return this.task?this.task.bpmn_tag_name==="manualTask"||!this.task.screen&&this.task.element_type!=="startEvent":!1},showTaskIsCompleted(){return this.task&&this.task.advanceStatus==="completed"&&!this.screen},screenTypeClass(){return this.screen?this.screen.type.toLowerCase()+"-screen":void 0},parentRequest(){return H.get(this.task,"process_request.parent_request_id",null)}},methods:{disableForm(t){if(t instanceof Array)for(let e of t)e.component==="FormButton"&&e.config.event==="submit"?t.splice(t.indexOf(e),1):this.disableForm(e);return t.config!==void 0&&(t.config.disabled=!0),t.items!==void 0&&this.disableForm(t.items),t},showSimpleErrorMessage(){this.renderComponent="simpleErrorMessage"},loadScreen(t){let e="?include=nested";this.requestId&&(e+="&request_id="+this.requestId),this.$dataProvider.getScreen(t,e).then(r=>{this.screen=r.data})},reload(){this.taskId?this.loadTask():this.loadNextAssignedTask()},loadTask(){const t=`/${this.taskId}?include=data,user,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission`;return window.ProcessMaker&&window.ProcessMaker.packages&&window.ProcessMaker.packages.includes("package-vocabularies")&&(window.ProcessMaker.VocabulariesSchemaUrl=`vocabularies/task_schema/${this.taskId}`),this.beforeLoadTask(this.taskId,this.nodeId).then(()=>{this.$dataProvider.getTasks(t).then(e=>{if(this.task=e.data,this.checkTaskStatus(),window.PM4ConfigOverrides&&window.PM4ConfigOverrides.getScreenEndpoint&&window.PM4ConfigOverrides.getScreenEndpoint.includes("tasks/")){const r=window.PM4ConfigOverrides.getScreenEndpoint.split("/");r[1]=this.task.id,window.PM4ConfigOverrides.getScreenEndpoint=r.join("/")}}).catch(()=>{this.hasErrors=!0})})},prepareTask(){(!this.loadingButton||this.task.status==="ACTIVE")&&(this.resetScreenState(),this.requestData=H.get(this.task,"request_data",{}),this.loopContext=H.get(this.task,"loop_context",""),this.refreshScreen++),this.$emit("task-updated",this.task),this.task.process_request.status==="ERROR"?(this.hasErrors=!0,this.$emit("error",this.requestId)):this.hasErrors=!1},resetScreenState(){this.loadingButton=!1,this.disabled=!1,this.$refs.renderer&&this.$refs.renderer.$children[0]&&(this.$refs.renderer.$children[0].currentPage=0,this.$refs.renderer.restartValidation())},checkTaskStatus(){this.task.status=="COMPLETED"||this.task.status=="CLOSED"||this.task.status=="TRIGGERED"?this.closeTask():this.screen=this.task.screen,this.prepareTask()},disableForSelfService(){this.$nextTick(()=>{window.ProcessMaker.isSelfService?this.disabled=!0:this.disabled=!1})},closeTask(t=null){if(this.hasErrors){this.$emit("error",this.requestId);return}this.task.process_request.status==="COMPLETED"?this.loadNextAssignedTask(t):this.loadingButton?this.loadNextAssignedTask(t):this.task.allow_interstitial?(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen,this.loadNextAssignedTask(t)):this.taskPreview||this.$emit("closed",this.task.id)},loadNextAssignedTask(t=null){t||(t=this.requestId);const e=window.Cypress?"":`&t=${Date.now()}`,r=`?user_id=${this.userId}&status=ACTIVE&process_request_id=${t}&include_sub_tasks=1${e}`;return this.$dataProvider.getTasks(r).then(a=>{if(a.data.data.length>0){let i=a.data.data[0];if(i.process_request_id!==this.requestId){if(this.redirecting===i.process_request_id)return;this.unsubscribeSocketListeners(),this.redirecting=i.process_request_id,this.$emit("redirect",i.id,!0);return}else this.emitIfTaskCompleted(t);this.taskId=i.id,this.nodeId=i.element_id}else this.parentRequest&&["COMPLETED","CLOSED"].includes(this.task.process_request.status)&&this.$emit("completed",this.getAllowedRequestId())})},emitIfTaskCompleted(t){this.task&&this.parentRequest&&t==this.task.process_request_id&&this.task.process_request.status==="COMPLETED"&&this.$emit("completed",this.parentRequest)},classHeaderCard(t){let e="bg-success";switch(t){case"completed":e="bg-secondary";break;case"overdue":e="bg-danger";break}return"card-header text-capitalize text-white "+e},submit(t=null,e=!1){this.disabled||(this.disabled=!0,t&&this.onUpdate(Object.assign({},this.requestData,t)),e?this.loadingButton=!0:this.loadingButton=!1,this.$emit("submit",this.task,e),this.task&&this.task.allow_interstitial&&!this.loadingButton&&(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen))},onUpdate(t){this.$emit("input",t),this.disableForSelfService()},activityAssigned(){},processCompleted(){let t;this.parentRequest&&(t=this.getAllowedRequestId(),this.$emit("completed",t)),t!==this.requestId&&this.$emit("completed",this.requestId)},getAllowedRequestId(){const e=(this.task.user_request_permission||[]).find(a=>a.process_request_id===this.parentRequest);return e&&e.allowed?this.parentRequest:this.requestId},processUpdated:H.debounce(function(t){(t.event==="ACTIVITY_COMPLETED"||t.event==="ACTIVITY_ACTIVATED")&&this.reload(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)},300),initSocketListeners(){this.addSocketListener(`completed-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessCompleted",t=>{this.processCompleted(t)}),this.addSocketListener(`updated-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessUpdated",t=>{this.processUpdated(t)}),this.taskId||this.reload()},listenForParentChanges(){this.parentRequest&&this.addSocketListener(`parent-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.parentRequest}`,".ProcessUpdated",t=>{["ACTIVITY_ACTIVATED"].includes(t.event)&&this.closeTask(this.parentRequest),["ACTIVITY_COMPLETED"].includes(t.event)&&this.task.process_request.status==="COMPLETED"&&this.processCompleted(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)})},addSocketListener(t,e,r,a){t in this.socketListeners||(this.socketListeners[t]={channel:e,event:r},window.Echo.private(e).listen(r,i=>{a(i)}))},unsubscribeSocketListeners(){Object.values(this.socketListeners).forEach(t=>{window.Echo.private(t.channel).stopListening(t.event)}),this.socketListeners={}},obtainPayload(t){return new Promise(e=>{window.ProcessMaker.apiClient.get(t).then(r=>{e(r.data)}).catch(()=>{})})},setMetaValue(){const t=document.head.querySelector('meta[name="request-id"]');t&&t.setAttribute("content",this.requestId)}},mounted(){this.screenId=this.initialScreenId,this.taskId=this.initialTaskId,this.requestId=this.initialRequestId,this.processId=this.initialProcessId,this.nodeId=this.initialNodeId,this.requestData=this.value,this.loopContext=this.initialLoopContext},destroyed(){this.unsubscribeSocketListeners()}};var XK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"tab-pane active show h-100",attrs:{id:"tab-form",role:"tabpanel","aria-labelledby":"tab-form"}},[e.screen?[r("b-overlay",{attrs:{show:e.disabled,id:"overlay-background",variant:"white",cardStyles:"pointer-events: none;pointer-events: none;inset: 1px",rounded:"sm"},scopedSlots:e._u([{key:"overlay",fn:function(){return[r("div",{staticClass:"text-center"},[r("p",[e._v("Please claim this task to continue.")])])]},proxy:!0}],null,!1,2499821482)},[r("div",{staticClass:"card card-body border-top-0 h-100",class:e.screenTypeClass},[e.renderComponent==="task-screen"?r("div",[r("vue-form-renderer",{key:e.refreshScreen,ref:"renderer",attrs:{config:e.screen.config,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,"loop-context":e.loopContext},on:{update:e.onUpdate,submit:e.submit},model:{value:e.requestData,callback:function(a){e.requestData=a},expression:"requestData"}})],1):r("div",[r(e.renderComponent,{tag:"component",attrs:{"process-id":e.processId,"instance-id":e.requestId,"token-id":e.taskId,screen:e.screen.config,"csrf-token":e.csrfToken,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,data:e.requestData,type:e.screen.type},on:{submit:e.submit}})],1)]),e.shouldAddSubmitButton?r("div",{staticClass:"card-footer"},[r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(a){return e.submit(null)}}},[e._v(" "+e._s(e.$t("Complete Task"))+" ")])]):e._e()])]:e._e(),e.showTaskIsCompleted?[r("div",{staticClass:"card card-body text-center"},[r("h1",[e._v(" "+e._s(e.$t("Task Completed"))+" "),r("i",{staticClass:"fas fa-clipboard-check"})])])]:e._e()],2)},eJ=[],tJ=oe(ZK,XK,eJ,!1,null,null,null,null);const Xx=tJ.exports,tre="",rJ={name:"Loop",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors?this.validationErrors.some(({item:e})=>e===t):!1},inspect(t){this.$emit("inspect",t)},deleteItem(t){this.items.splice(t,1),this.$emit("update-state")},duplicateItem(t){const e=H.cloneDeep(this.items[t]);this.items.push(e),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.component==="AiSection"&&e===r.config.aiConfig.nonce&&this.$set(r,"items",JSON.parse(JSON.stringify(t)))})},updateProgress(t,e){this.value.forEach(r=>{if(r.component==="AiSection"&&e===r.config.aiConfig.nonce){if(this.cancelledJobs.some(a=>a===e))return;this.$set(r.config.aiConfig,"progress",t)}})}}};var aJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"column-draggable",attrs:{selector:e.config.customCssSelector}},[r("draggable",{staticStyle:{"min-height":"80px"},attrs:{list:e.items,group:"controls"}},e._l(e.items,function(a,i){return r("div",{key:i,staticClass:"control-item",class:{selected:e.selected===a,hasError:e.hasError(a)},on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[a.container?r("div",{on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(a)&&e.selected===a}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(a)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(a)&&e.aiPreview(a)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(n){return e.applyAiChanges(a)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(a)&&e.aiPreview(a)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(i)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(a),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":a,config:a.config},on:{inspect:e.inspect,"update-state":function(n){return e.$emit("update-state")}},model:{value:a.items,callback:function(n){e.$set(a,"items",n)},expression:"element.items"}})],1)]):r("div",{attrs:{id:a.config.name?a.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===a}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(i)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(a),{"prevent-interaction":!a.config.interactive}],attrs:{tabindex:a.config.interactive?0:-1,config:a.config},on:{input:function(n){a.config.interactive&&(a.config.content=n)}}},"component",a.config,!1))],1)])])}),0)],1)},iJ=[],nJ=oe(rJ,aJ,iJ,!1,null,"06c4d69f",null,null);const ek=nJ.exports,rre="",sJ=1,oJ={name:"MultiColumn",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},computed:{classContainer(){return this.items.length>0?"form-group":"column-draggable"}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)},"config.options":function(t){this.items=t.map((e,r)=>this.items[r]?this.items[r]:[])}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors.some(({item:e})=>e===t)},updateContainerConfig(t,e){this.items[e]=t,this.$emit("update-state")},classColumn(t){let e=sJ;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e}`},inspect(t){this.$emit("inspect",t)},deleteItem(t,e){this.items[t].splice(e,1),this.$emit("update-state")},duplicateItem(t,e){const r=H.cloneDeep(this.items[t][e]);this.items[t].push(r),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.forEach(a=>{a.component==="AiSection"&&e===a.config.aiConfig.nonce&&this.$set(a,"items",JSON.parse(JSON.stringify(t)))})})},updateProgress(t,e){this.value.forEach(r=>{r.forEach(a=>{if(a.component==="AiSection"&&e===a.config.aiConfig.nonce){if(this.cancelledJobs.some(i=>i===e))return;this.$set(a.config.aiConfig,"progress",t)}})})}}};var lJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"mb-1 mt-1 pb-0 pt-0",class:e.classContainer},[r("div",{attrs:{selector:e.config.customCssSelector}},[r("div",{staticClass:"row"},[e._l(e.items,function(a,i){return[r("draggable",{key:i,staticClass:"column-draggable",class:e.classColumn(i),attrs:{value:e.items[i],group:"controls"},on:{input:function(n){return e.updateContainerConfig(n,i)}},model:{value:e.items[i],callback:function(n){e.$set(e.items,i,n)},expression:"items[index]"}},e._l(a,function(n,s){return r("div",{key:s,staticClass:"control-item",class:{selected:e.selected===n,hasError:e.hasError(n)},on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[n.container?r("div",{on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(n)&&e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(n)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(n)&&e.aiPreview(n)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(o){return e.applyAiChanges(n)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(n)&&e.aiPreview(n)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"aria-label":e.$t("Duplicate")},on:{click:function(o){return e.duplicateItem(i,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(i,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(n),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":n,config:n.config},on:{inspect:e.inspect,"update-state":function(o){return e.$emit("update-state")}},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}})],1)]):r("div",{attrs:{id:n.config.name?n.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(o){return e.duplicateItem(i,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(i,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(n),{"prevent-interaction":!n.config.interactive}],attrs:{tabindex:n.config.interactive?0:-1,config:n.config},on:{input:function(o){n.config.interactive&&(n.config.content=o)}}},"component",n.config,!1))],1)])])}),0)]})],2)])])},uJ=[],cJ=oe(oJ,lJ,uJ,!1,null,"eaf6f1c4",null,null);const tk=cJ.exports,dJ={name:"default-loading-spinner"};var pJ=function(){var e=this,r=e._self._c;return r("div",[e._v("Loading Data...")])},fJ=[],hJ=oe(dJ,pJ,fJ,!1,null,null,null,null);const rk=hJ.exports,mJ=!0;function vu(t){let e=0;return typeof t!="object"||Object.entries(t).forEach(([r,a])=>{if(a){if(typeof a=="object"&&"$each"in a){e+=vu(a.$each.$iter);return}r!=="$iter"&&typeof a=="object"&&"$invalid"in a&&a.$invalid&&Number.isNaN(Number(r))&&e++,r!=="$iter"&&a&&(e+=vu(a))}}),e}const ak=async(t,e)=>{if(t.length===0)return;const r=ch(t[0]),a=[];t.forEach(n=>{r!==n&&a.push(n.loadValidationRules())}),await Promise.all(a);try{await r.loadValidationRules()}catch(n){console.warn("There was a problem rendering the screen",n)}const i=r.$v;if(i){let n=0,s="";i.$invalid&&(n+=vu(i.vdata),n+=vu(i.schema),s=n===1?"There is a validation error in your form.":"There are {{items}} validation errors in your form.",s=r.$t(s,{items:n})),e("basic",{key:"valid",value:!i.$invalid}),e("basic",{key:"message",value:s})}},gJ=async(t,e)=>{t("basic",{key:"valid",value:!e.value}),t("disableSubmit",{key:"disableSubmit",value:e.value})},vJ=H.debounce(ak,500),bu=[],bJ=(t,e)=>{bu.includes(t)||bu.push(t),vJ(bu,e)},ik={namespaced:mJ,state:()=>({locked:!1,valid:!0,message:"",mode:"",submitted:!1,showValidationOnLoad:!1,disableSubmit:!1}),getters:{isValidScreen(t){return t.valid},getErrorMessage(t){return t.message},getMode(t){return t.mode},showValidationErrors(t){return t.showValidationOnLoad||t.submitted}},mutations:{basic(t,e){t[e.key]=e.value},setMode(t,e){t.mode=e},disableSubmit(t,e){t.disableSubmit=e.value,t.message=e.message}},actions:{restartValidation(){bu.length=0},validate({commit:t},e){bJ(e,t)},async validateNow({commit:t},e){await ak([e],t)},close({commit:t}){t("basic",{key:"valid",value:!0})},hasSubmitted({commit:t},e){t("basic",{key:"submitted",value:e})},showValidationOnLoad({commit:t},e){t("basic",{key:"showValidationOnLoad",value:e})},async disableSubmitOnPhotoVideoUpload({commit:t},e){await gJ(t,e)}}},yu={namespaced:!0,state(){return{stack:[],position:null}},getters:{canUndo(t){return t.position>0},canRedo(t){return t.position<t.stack.length-1},currentState(t,e){const r=t.stack[t.position];return e.nextState&&e.nextState.deletedPage&&(r.currentPage=e.nextState.currentPage),r},nextState(t,e){return e.canRedo?t.stack[t.position+1]:!1}},mutations:{setPosition(t,e){t.position=e},setState(t,e){t.stack.push(e)}},methods:{emitChanges(){window.ProcessMaker.EventBus.$emit("screen-change")}},actions:{pushState({state:t,getters:e,commit:r},a){a.config!==e.currentState&&(r("setState",a),r("setPosition",t.stack.length-1),yu.methods.emitChanges())},undo({state:t,getters:e,commit:r}){e.canUndo&&(r("setPosition",t.position-1),yu.methods.emitChanges())},redo({state:t,getters:e,commit:r}){e.canRedo&&(r("setPosition",t.position+1),yu.methods.emitChanges())}}},are="",yJ={props:{placeholder:{type:String},value:{type:String}},data(){return{query:""}},watch:{query(t){this.$emit("input",t)}},methods:{runSearch(t){this.$emit("submit",this.query)}},mounted(){this.query=this.value}};var SJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"basic-search"},[r("div",{staticClass:"d-flex"},[r("div",{staticClass:"flex-grow-1"},[r("div",{staticClass:"search-bar-basic d-flex w-100"},[r("div",{staticClass:"search-bar-inputs flex-grow w-100"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.query,expression:"query"}],ref:"search_input",staticClass:"search-bar-manual-input form-control",attrs:{type:"text",placeholder:e.placeholder?e.placeholder:e.$t("Search"),"data-cy":"watchers-table-search"},domProps:{value:e.query},on:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.runSearch.apply(null,arguments)},input:function(a){a.target.composing||(e.query=a.target.value)}}})]),r("div",{staticClass:"search-bar-actions d-flex flex-shrink"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn-search-run",attrs:{variant:"primary",title:e.$t("Search")},on:{click:e.runSearch}},[r("i",{staticClass:"fas fa-search",attrs:{"data-cy":"watchers-table-search-button"}})])],1)])]),r("div",{staticClass:"search-bar-buttons"},[e._t("buttons")],2)])])},xJ=[],kJ=oe(yJ,SJ,xJ,!1,null,"d660c896",null,null);const nk=kJ.exports,ire="",_J={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a},mixins:[nc],props:["value"],data(){return{required:!0,numberItem:0,displayList:!0,ruleDescription:"",ruleFormula:"",rulePropName:"",editorInvalid:!1,existsProperty:!1,current:[],add:{id:0,name:"",property:"",type:"expression",formula:""},css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Property Name"),key:"property"},{label:this.$t("Description"),key:"name"},{key:"__actions",label:"",class:"text-right"}],monacoOptions:{automaticLayout:!0,lineNumbers:"off",minimap:!1},monacoEditor:null,errors:{}}},computed:{javascriptTypeClass(){const{isJS:t}=this;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},expressionTypeClass(){const t=!this.isJS;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},isJS(){return this.add.type==="javascript"}},watch:{value(){this.value.forEach(t=>{this.numberItem++,t.id=this.numberItem}),this.current=this.value}},created(){Lt.register("exists-property",()=>{let t=!0;return this.current.forEach(e=>{e.property===this.add.property&&e.id!==this.add.id&&(t=!1)}),t},this.$t("Property already exists"))},methods:{switchExpressionType(t){this.add.type=t},show(){this.$refs.modal.show()},emptyForm(){this.add.id=0,this.add.name="",this.add.property="",this.add.type="expression",this.add.formula="",this.editorInvalid=!1,this.existsProperty=!1,this.ruleDescription="",this.ruleFormula="",this.rulePropName=""},displayTableList(){this.emptyForm(),this.displayList=!0},displayFormProperty(){this.emptyForm(),this.displayList=!1},validateData(){this.errors=[];const t={property:"required|exists-property",name:"required",formula:"required"},e={property:this.add.property,name:this.add.name,formula:this.add.formula},r=new Lt(e,t),a=r.passes();this.errors=Object.fromEntries(Object.keys(r.errors.all()).map(i=>[i,r.errors.first(i)])),a?this.saveProperty():this.focusFirstCalculatedPropertiesError()},saveProperty(){this.add.id===0?(this.numberItem++,this.current.push({id:this.numberItem,property:this.add.property,name:this.add.name,formula:this.add.formula,type:this.add.type})):this.current.forEach(t=>{t.id===this.add.id&&(t.name=this.add.name,t.property=this.add.property,t.formula=this.add.formula,t.type=this.add.type)}),this.$emit("input",this.current),this.displayTableList()},editProperty(t){this.add.id=t.id,this.add.name=t.name,this.add.property=t.property,this.add.type=t.type?t.type:"expression",this.add.formula=t.formula,this.displayList=!1},deleteProperty(t){this.current=this.current.filter(e=>e.id!==t.id),this.$emit("input",this.current),this.displayTableList()},editorMounted(t){this.monacoEditor=t}}};var wJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{id:"computed-properties",size:"lg",title:e.$t("Calculated Properties"),"content-class":"p-3","header-class":"m-0 p-0 mb-3","body-class":"m-0 p-0","title-class":"m-0","footer-class":"m-0 p-0","no-close-on-backdrop":"","header-close-content":"&times;","data-cy":"calcs-modal"},on:{hidden:e.displayTableList}},[e.displayList?[r("div",{staticClass:"d-flex align-items-end flex-column mb-3"},[r("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-cy":"calcs-add-property"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Property"))+" ")])]),r("div",{staticClass:"card card-body table-card"},[r("b-table",{attrs:{css:e.css,fields:e.fields,items:e.current,"empty-text":e.$t("No Data Available"),"data-cy":"calcs-table"},scopedSlots:e._u([{key:"cell(__actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"calcs-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"calcs-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}],null,!1,3545130899)})],1),r("template",{slot:"modal-footer"},[r("span")])]:[r("required"),r("form-input",{ref:"property",staticClass:"mb-3",attrs:{label:e.$t("Property Name")+" *",name:"property",error:e.errors.property,"data-cy":"calcs-property-name",required:"","aria-required":"true"},model:{value:e.add.property,callback:function(a){e.$set(e.add,"property",a)},expression:"add.property"}}),r("form-text-area",{ref:"name",staticClass:"mb-3",attrs:{label:e.$t("Description")+" *",name:"name",error:e.errors.name,"data-cy":"calcs-property-description",required:"","aria-required":"true"},model:{value:e.add.name,callback:function(a){e.$set(e.add,"name",a)},expression:"add.name"}}),r("div",{staticClass:"form-group mb-3",staticStyle:{position:"relative"}},[r("label",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}]},[e._v(e._s(e.$t("Formula")+" *"))]),r("div",{staticClass:"float-right"},[r("a",{staticClass:"btn btn-sm",class:e.expressionTypeClass,attrs:{"data-cy":"calcs-switch-formula"},on:{click:function(a){return e.switchExpressionType("expression")}}},[r("i",{staticClass:"fas fa-square-root-alt"})]),r("a",{staticClass:"btn btn-sm",class:e.javascriptTypeClass,attrs:{"data-cy":"calcs-switch-javascript"},on:{click:function(a){return e.switchExpressionType("javascript")}}},[r("i",{staticClass:"fab fa-js-square"})])]),r("form-text-area",{directives:[{name:"show",rawName:"v-show",value:!e.isJS,expression:"!isJS"}],ref:"formula",attrs:{rows:"5",label:e.$t("Formula")+" *",name:"formula",error:e.errors.formula,"data-cy":"calcs-property-formula",required:"","aria-required":"true"},model:{value:e.add.formula,callback:function(a){e.$set(e.add,"formula",a)},expression:"add.formula"}}),r("div",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor-border",class:{"is-invalid":!!e.errors.formula}}),r("monaco-editor",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor",attrs:{options:e.monacoOptions,language:"javascript","data-cy":"calcs-property-javascript",required:"","aria-required":"true"},on:{editorDidMount:e.editorMounted},model:{value:e.add.formula,callback:function(a){e.$set(e.add,"formula",a)},expression:"add.formula"}}),e.isJS&&e.errors.formula?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.errors.formula))])]):e._e()],1),r("template",{slot:"modal-footer"},[r("div",{staticClass:"d-flex align-items-end"},[r("button",{staticClass:"btn btn-outline-secondary",attrs:{"data-cy":"calcs-button-cancel"},on:{click:e.displayTableList}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3",attrs:{"data-cy":"calcs-button-save"},on:{click:e.validateData}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])]],2)},CJ=[],TJ=oe(_J,wJ,CJ,!1,null,"5efce491",null,null);const AJ=TJ.exports,nre="",OJ={props:["value","cssErrors"],components:{MonacoEditor:_a},data(){return{saveValue:"",innerValue:"",monacoOptions:{language:"css",automaticLayout:!0,minimap:{enabled:!1}}}},watch:{innerValue(t){this.$emit("input",t)}},methods:{show(){this.innerValue=this.value,this.saveValue=this.value,this.$refs.modal.show()},close(){this.$refs.modal.hide()},hide(){this.innerValue=this.saveValue,this.$emit("input",this.innerValue)},save(){this.saveValue=this.innerValue,this.$refs.modal.hide()}}};var EJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"custom-css",title:e.$t("Custom CSS"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","no-close-on-backdrop":"","ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"header-close-content":"&times;"},on:{ok:e.save,cancel:e.close,hide:e.hide}},[r("p",[e._v(e._s(e.$t("You can set CSS Selector names in the inspector. Use them here with [selector='my-selector']")))]),r("div",{staticClass:"editor"},[r("monaco-editor",{staticClass:"monaco",attrs:{options:e.monacoOptions,"data-cy":"monaco-editor"},model:{value:e.innerValue,callback:function(a){e.innerValue=a},expression:"innerValue"}})],1),r("b-alert",{attrs:{show:e.cssErrors!="",variant:"danger"}},[r("pre",[e._v(e._s(e.cssErrors))])]),r("div",{attrs:{slot:"modal-cancel","data-cy":"cancel-button"},slot:"modal-cancel"},[e._v(e._s(e.$t("Cancel")))]),r("div",{attrs:{slot:"modal-ok","data-cy":"save-button"},slot:"modal-ok"},[e._v(e._s(e.$t("Save")))])],1)},MJ=[],$J=oe(OJ,EJ,MJ,!1,null,"3824b29b",null,null);const PJ=$J.exports,sre="",DJ=typeof window>"u"?global:window,IJ={name:"WatchersForm",components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,FormMultiSelect:ee.FormMultiSelect,FormCheckbox:ee.FormCheckbox,MonacoEditor:_a,DataMapping:Xp,OutboundConfig:af,ScreenVariableSelector:xx},mixins:[nc],props:{config:{type:Object,default(){return{name:"",watching:"",script:"",script_id:"",script_key:"",input_data:"{}",script_configuration:"{}",output_variable:"",synchronous:!1,run_onload:!1,show_async_loading:!1}}}},data(){return{scriptConfig:"",endpoint:null,endpoints:[],ruleWatcherName:"",ruleWatcherVariable:"",ruleWatcherScript:"",ruleWatcherOutputVariable:"",required:!0,inputDataInvalid:!1,scriptConfigurationInvalid:!1,scripts:[],script:null,monacoOptions:{automaticLayout:!0,lineNumbers:"on",minimap:{enabled:!1}},endpointError:null,inputDataEditor:null,scriptConfigEditor:null}},computed:{dataSourceLink(){const t=this.selectedDataSourceId(),e=this.endpoint;return t&&e?`/designer/data-sources/${t}/resources/${e}`:""},dataSourceConfigWarning(){const t=this.selectedDataSourceId(),e=this.scripts.find(a=>a.type==="Data Connectors");if(typeof e>"u"||e===null)return"";const r=e.items.find(a=>a.id===`data_source-${t}`);return typeof r>"u"||e===null?"":r.validationStatus.length>0?r.validationStatus:""},isDatasource(){return this.config.script&&this.config.script.id.substr(0,11)==="data_source"},isScript(){return!this.config.script||this.config.script.id.substr(0,6)==="script"},hasInputData(){let t;try{t=JSON.parse(this.config.script_configuration)}catch{return!1}return typeof t.input_data>"u"||t.input_data==null?!1:Object.keys(t.input_data).length===0&&t.input_data.constructor===Object},outputVarLabel(){const t=this.ruleWatcherOutputVariable=="required"?" *":"";return this.$t("Output Variable")+t}},watch:{scriptConfig(t){try{const e=JSON.parse(this.config.script_configuration),r=JSON.parse(t);this.config.script_configuration=JSON.stringify({...e,...r},null," ")}catch{}},endpoint(t){this.setConfig("endpoint",t);const e=this.scriptConfig?JSON.parse(this.scriptConfig):{},r=e.dataMapping||[],a=this.scripts.find(i=>i.items&&i.items.length>0&&i.items[0].id&&i.items[0].id.substr(0,11)==="data_source");if(a&&r.length===0){const i=a.items.find(s=>`data_source-${e.dataSource}`===s.id),n=(i.endpoints&&i.endpoints[t]?i.endpoints[t].dataMapping:[])||[];e.dataMapping=[],n.forEach(s=>{e.dataMapping.push({key:s.key,value:s.value})}),this.scriptConfig=JSON.stringify(e)}},config:{deep:!0,immediate:!0,handler(t){t.input_data||(t.input_data="{}"),t.script_configuration?this.scriptConfig=this.config.script_configuration:t.script_configuration="{}",this.endpoint=this.getConfig().endpoint}},"config.script":{handler(t,e){if(!t)this.config.script_id="",this.config.script_key="",this.config.datasource_script_id="";else if(typeof t=="object"){const r=t.id.split("-"),a=e&&e.id&&e.id.split("-").length>0?e.id.split("-")[0]:"";this.config.script_id=r[1],this.config.script_key=t.key,a!==r[0]&&(this.config.script_configuration="{}"),r[0]==="data_source"&&this.setConfig("dataSource",this.config.script_id),this.config.datasource_script_id=t.dataSourceScriptId}return t}}},methods:{selectedDataSourceId(){let t=null;try{t=JSON.parse(this.scriptConfig).dataSource}catch{t=null}return t},setValidations(){this.ruleWatcherName="required",this.ruleWatcherVariable="required",this.ruleWatcherScript="required",this.hasInputData&&(this.ruleWatcherOutputVariable="required")},getConfig(){try{return JSON.parse(this.config.script_configuration)}catch{return{}}},setConfig(t,e){const r=this.getConfig();JSON.stringify(r[t])!==JSON.stringify(e)&&(r[t]=e,this.config.script_configuration=JSON.stringify(r),this.scriptConfig=this.config.script_configuration)},loadEndpoints(){const t=this.config.script.id.substr(0,11)==="data_source"?this.config.script.id.substr(12):null;this.endpoints.splice(0),t&&window.ProcessMaker&&window.ProcessMaker.apiClient&&window.ProcessMaker.apiClient.get(`/data_sources/${t}`).then(e=>{for(const r in e.data.endpoints)this.endpoints.push(r)})},loadSources(){this.scripts=[],this.$root.$children[0].watchers_config.api.scripts.forEach(t=>{t(this.scripts)})},displayTableList(){this.$emit("display-list")},jsonIsValid(t){try{JSON.parse(this.config[t])}catch{return!1}return!0},isFormValid(){this.isDatasource&&!this.endpoint?this.endpointError=this.$t("Endpoint is required"):this.endpointError=null;for(const t in this.$refs)if(this.$refs[t]&&this.$refs[t].name&&this.$refs[t].validator&&this.$refs[t].validator.errorCount!==0)return!1;return!(!this.config.watching||!this.config.script||this.endpointError||!this.jsonIsValid("input_data")||!this.jsonIsValid("script_configuration"))},validateDataAndSave(){this.setValidations(),this.$nextTick(()=>{if(!this.isFormValid()){DJ.ProcessMaker.alert(this.$t("An error occurred. Check the form for errors in red text."),"danger"),this.focusFirstWatcherError();return}this.config.uid||(this.config.uid=H.uniqueId(new Date().getTime())),this.save()})},save(){this.$emit("save-form")},inputDataEditorMounted(t){this.inputDataEditor=t},scriptConfigEditorMounted(t){this.scriptConfigEditor=t}}};var zJ=function(){var e=this,r=e._self._c;return r("div",[r("div",{staticClass:"accordion",attrs:{id:"watcherAccordion"}},[r("div",{staticClass:"card card-overflow"},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherConfigButton",staticClass:"p-3 btn btn-link d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherConfig","data-cy":"watchers-accordion-configuration"}},[e._m(0),e._m(1)])])]),r("div",{staticClass:"collapse show",attrs:{id:"watcherConfig","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-input",{ref:"name",attrs:{label:e.$t("Watcher Name")+" *",name:e.$t("Watcher Name"),validation:e.ruleWatcherName,helper:e.$t("A name to describe this Watcher"),"data-cy":"watchers-watcher-name",required:"","aria-required":"true"},model:{value:e.config.name,callback:function(a){e.$set(e.config,"name",a)},expression:"config.name"}}),r("screen-variable-selector",{ref:"watching",attrs:{name:e.$t("Variable to Watch"),label:e.$t("Variable to Watch")+" *",validation:e.ruleWatcherVariable,helper:e.$t("Select the variable to watch on this screen or type any request variable name"),"data-cy":"watchers-watcher-variable"},model:{value:e.config.watching,callback:function(a){e.$set(e.config,"watching",a)},expression:"config.watching"}}),r("form-checkbox",{attrs:{name:e.$t("Run Synchronously"),label:e.$t("Run Synchronously"),toggle:!0,helper:e.$t("Wait for the Watcher to run before accepting more input"),"data-cy":"watchers-watcher-synchronous"},model:{value:e.config.synchronous,callback:function(a){e.$set(e.config,"synchronous",a)},expression:"config.synchronous"}}),r("form-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.config.synchronous,expression:"!config.synchronous"}],attrs:{name:e.$t("Show message while loading remote data"),label:e.$t("Show message while loading remote data"),toggle:!0,"data-cy":"watchers-watcher-show-loading"},model:{value:e.config.show_async_loading,callback:function(a){e.$set(e.config,"show_async_loading",a)},expression:"config.show_async_loading"}}),r("form-checkbox",{attrs:{name:e.$t("Run Watcher on Screen Load"),label:e.$t("Run watcher on Screen Load"),toggle:!0,"data-cy":"watchers-watcher-run-onload"},model:{value:e.config.run_onload,callback:function(a){e.$set(e.config,"run_onload",a)},expression:"config.run_onload"}})],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherSourceButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherSource","data-cy":"watchers-accordion-source"}},[e._m(2),e._m(3)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherSource","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-multi-select",{ref:"script",attrs:{name:e.$t("Source"),label:e.$t("Source")+" *",options:e.scripts,placeholder:e.$t("None"),multiple:!1,"show-labels":!1,searchable:!0,"option-value":"id","option-content":"title","group-values":"items","group-label":"type",validation:e.ruleWatcherScript,helper:e.$t("The source to access when this Watcher runs"),"data-cy":"watchers-watcher-source"},on:{open:e.loadSources},model:{value:e.config.script,callback:function(a){e.$set(e.config,"script",a)},expression:"config.script"}}),e.isScript?r("div",[e.config.script?r("b-alert",{attrs:{show:"",variant:"warning"}},[r("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.$t("Using watchers with Scripts can slow the performance of your screen."))+" ")]):e._e(),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{ref:"input_data",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},on:{editorDidMount:e.inputDataEditorMounted},model:{value:e.config.input_data,callback:function(a){e.$set(e.config,"input_data",a)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the script (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])]),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Script Configuration")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("script_configuration")}},[r("monaco-editor",{ref:"script_configuration",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-script_configuration"},on:{editorDidMount:e.scriptConfigEditorMounted},model:{value:e.config.script_configuration,callback:function(a){e.$set(e.config,"script_configuration",a)},expression:"config.script_configuration"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Configuration data for the script (valid JSON object, variables supported)")))]),e.scriptConfigurationInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(" "+e._s(e.$t("The Script Configuration field is required"))+" ")])]):e._e(),e.jsonIsValid("script_configuration")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])],1):e._e(),e.isDatasource?r("div",[r("div",{staticClass:"form-group"},[r("form-multi-select",{ref:"endpoint",attrs:{name:e.$t("Resource"),label:e.$t("Resource"),options:e.endpoints,placeholder:e.$t("Select a resource"),multiple:!1,"show-labels":!1,searchable:!0,"internal-search":!1,helper:e.$t("The Data Connector resource to access when this Watcher runs"),"data-cy":"watchers-watcher-endpoint"},on:{"search-change":e.loadEndpoints,open:function(a){return e.loadEndpoints()}},model:{value:e.endpoint,callback:function(a){e.endpoint=a},expression:"endpoint"}}),e.endpointError?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.endpointError))])]):e._e(),e.dataSourceConfigWarning.length>0?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.dataSourceConfigWarning))])]):e._e(),r("a",{directives:[{name:"show",rawName:"v-show",value:e.dataSourceLink.length>0,expression:"dataSourceLink.length > 0"}],staticClass:"link-primary",attrs:{href:e.dataSourceLink,target:"_blank"}},[e._v(" "+e._s(e.$t("Open Data Connector"))+" "),r("i",{staticClass:"ml-1 fas fa-external-link-alt"})])],1),e.hasInputData?e._e():r("outbound-config",{model:{value:e.scriptConfig,callback:function(a){e.scriptConfig=a},expression:"scriptConfig"}}),e.hasInputData?r("div",{staticClass:"form-group"},[e._m(4),r("div",{staticClass:"row pl-3 mt-1"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},model:{value:e.config.input_data,callback:function(a){e.$set(e.config,"input_data",a)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the Data Connector (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])]):e._e()],1):e._e()],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherOutputButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherOutput","data-cy":"watchers-accordion-output"}},[e._m(5),e._m(6)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherOutput","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[e.hasInputData||e.isScript?r("form-input",{ref:"propOutputVariableName",attrs:{label:e.outputVarLabel,name:e.$t("Output Variable"),helper:e.$t("The variable that will store the output of the Watcher"),validation:e.ruleWatcherOutputVariable,"data-cy":"watchers-watcher-output_variable",required:e.ruleWatcherOutputVariable=="required","aria-required":e.ruleWatcherOutputVariable=="required"},model:{value:e.config.output_variable,callback:function(a){e.$set(e.config,"output_variable",a)},expression:"config.output_variable"}}):e._e(),e.isDatasource?r("data-mapping",{model:{value:e.scriptConfig,callback:function(a){e.scriptConfig=a},expression:"scriptConfig"}}):e._e()],1)])])]),r("div",{staticClass:"d-flex justify-content-end mt-3"},[r("button",{staticClass:"btn btn-outline-secondary",attrs:{"data-cy":"watchers-button-cancel"},on:{click:function(a){return a.stopPropagation(),e.displayTableList.apply(null,arguments)}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3",attrs:{"data-cy":"watchers-button-save"},on:{click:e.validateDataAndSave}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])},LJ=[function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-cog"}),t._v(" Configuration")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-upload"}),t._v(" Source")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row pl-3"},[e("span",{staticClass:"text-danger"},[t._v(" * Deprecation Warning: Recreate the watcher to use the new format. Version 4.2 will not support Input Data as a JSON object. ")])])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-download"}),t._v(" Output")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])}],jJ=oe(IJ,zJ,LJ,!1,null,"60e1dcd1",null,null);const sk=jJ.exports,ore="",NJ={components:{BasicSearch:nk,FormInput:ee.FormInput,FormTextArea:ee.FormTextArea},props:{value:{type:Array,default(){return[]}}},data(){return{filter:"",css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Name"),key:"name",tdClass:"break-word"},{label:this.$t("Watching Variable"),key:"watching"},{label:this.$t("Output Variable"),key:"output_variable",tdClass:"break-word"},{label:this.$t("Source"),key:"script.title"},{key:"actions",label:""}]}},computed:{filtered(){const t=this.getValuesWithOutputVarsNames(this.value);if(!this.filter)return t;const e=[];return t.forEach(r=>{Object.keys(r).find(a=>typeof r[a]=="string"?r[a].indexOf(this.filter)>=0:!1)&&e.push(r)}),e}},methods:{search(){},displayFormProperty(){this.$emit("display-form")},editProperty(t){this.$emit("edit-form",t)},deleteProperty(t){this.$emit("delete-form",t)},getValuesWithOutputVarsNames(t){return t.map(r=>{let a=Object.assign({},r);if(a.script&&a.script.id&&a.script.id.substr(0,11)==="data_source"){let i=JSON.parse(a.script_configuration),n=i&&i.dataMapping?i.dataMapping.map(o=>o.key).join(", "):"";const s=50;a.output_variable=n.length>s?n.substr(0,s)+"...":n}return a})}}};var RJ=function(){var e=this,r=e._self._c;return r("div",[r("b-row",{staticClass:"mb-3"},[r("b-col",[r("basic-search",{on:{submit:e.search},model:{value:e.filter,callback:function(a){e.filter=a},expression:"filter"}},[r("template",{slot:"buttons"},[r("b-btn",{staticClass:"text-nowrap",attrs:{variant:"secondary","data-cy":"watchers-add-watcher"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Watcher"))+" ")])],1)],2)],1)],1),r("div",{staticClass:"card card-body table-card watchers-list"},[r("b-table",{attrs:{items:e.filtered,fields:e.fields,"empty-text":e.$t("No Data Available"),"data-cy":"watchers-table","sort-icon-left":""},scopedSlots:e._u([{key:"cell(actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"watchers-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"watchers-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}])})],1),r("template",{slot:"modal-footer"},[r("span")])],2)},FJ=[],qJ=oe(NJ,RJ,FJ,!1,null,null,null,null);const ok=qJ.exports,lk=typeof window>"u"?global:window,BJ={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a,WatchersList:ok,WatchersForm:sk},props:["value"],data(){return{enableList:!0,current:[],add:{uid:"",name:"",variable:"",script_id:"",script_key:"",input_data:"",script_configuration:"",synchronous:!1}}},watch:{value:{handler(t){this.current=t}}},computed:{},methods:{show(){this.$refs.modal.show()},displayList(){this.add={},this.enableList=!0},displayForm(){this.add={},this.enableList=!1},save(){let t=this.$t("Watcher Saved"),e=this.current.findIndex(r=>r.uid===this.add.uid);e===-1?this.current.push(this.add):(t=this.$t("Watcher Updated"),this.current[e]=this.add),this.showAlert(t),this.$emit("input",this.current),this.displayList()},edit(t){this.displayForm(),this.$set(this,"add",H.cloneDeep(t))},confirmRemoval(t){lk.ProcessMaker.confirmModal(this.$t("Caution!"),this.$t("Are you sure you want to delete the Watcher?"),"",()=>{this.remove(t)})},remove(t){this.current=this.current.filter(e=>e.uid!==t.uid),this.$emit("input",this.current),this.showAlert(this.$t("Watcher deleted")),this.displayList()},showAlert(t){lk.ProcessMaker.alert(t,"success")}}};var WJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"watchers-popup",title:e.$t("Watchers"),"hide-footer":"","header-close-content":"&times;","no-close-on-backdrop":"","data-cy":"watchers-modal"},on:{hidden:e.displayList}},[e.enableList?[r("watchers-list",{on:{"display-form":e.displayForm,"edit-form":e.edit,"delete-form":e.confirmRemoval},model:{value:e.current,callback:function(a){e.current=a},expression:"current"}})]:[r("required"),r("watchers-form",{attrs:{refs:"form",config:e.add},on:{"display-list":e.displayList,"save-form":e.save}})]],2)},VJ=[],UJ=oe(BJ,WJ,VJ,!1,null,null,null,null);const GJ=UJ.exports,lre="",HJ={...Cs,FormMultiColumn:mu};function YJ(t){let e=t.$parent;for(;e;){if(e.$options.name==="ScreenContent")return e;e=e.$parent}return null}const QJ={install(t){if(t._processMakerVueFormBuilderInstalled)return;t._processMakerVueFormBuilderInstalled=!0,t.component("AddLoopRow",Hu),t.component("FormImage",Jn),t.component("FormAvatar",yn),t.component("FormLoop",xs),t.component("FormMultiColumn",mu),t.component("FormNestedScreen",ks),t.component("FormRecordList",fu),t.component("Loop",ek),t.component("MultiColumn",tk),t.component("NewFormMultiColumn",Yp),t.component("ScreenRenderer",yx),t.component("Task",Xx),t.component("VueFormBuilder",Vx),t.component("VueFormRenderer",Gi),t.component("DefaultLoadingSpinner",rk),t.use(ee),t.component("FormButton",qa),t.component("FileUpload",bn),t.component("FileDownload",Xs),t.component("FormAnalyticsChart",ws),t.component("FormMaskedInput",Ba),t.use(Cl),t.use(Pt),t.component("FormListTable",_s);const e=new Pt.Store({modules:{globalErrorsModule:ik,undoRedoModule:yu}});t.mixin({store:e}),t.mixin({methods:{getScreenDataReference(r=null,a=null){return YJ(this).getDataReference(r,a)}}})}};function KJ(t,e){t.defaults.adapter=Wv(t.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new xl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})})}K.AddLoopRow=Hu,K.AnalyticsSelector=jx,K.BasicSearch=nk,K.CollectionSelectList=Zp,K.ColorSelect=_x,K.ColumnSetup=wx,K.ComputedProperties=AJ,K.ContainerColumns=Cx,K.Currencies=WH,K.CurrentPageProperty=ac,K.CustomCSS=PJ,K.DataFormatProperty=Zx,K.DataMapping=Xp,K.DataReference=uh,K.DataTypeBooleanProperty=UK,K.DataTypeDateTimeProperty=Jx,K.DataTypeProperty=Kx,K.DataTypeWithoutDateProperty=VK,K.DefaultLoadingSpinner=rk,K.DefaultValueEditor=ef,K.DeviceDetector=ph,K.DeviceVisibility=ed,K.EditOption=Tx,K.FileDownload=Xs,K.FileUpload=bn,K.FormAnalyticsChart=ws,K.FormAvatar=yn,K.FormBuilderControls=GK,K.FormButton=qa,K.FormImage=Jn,K.FormInputMasked=Ba,K.FormListTable=_s,K.FormLoop=xs,K.FormMaskedInput=Ba,K.FormMultiselect=tf,K.FormNestedScreen=ks,K.FormRecordList=fu,K.FormRecordListStatic=Sx,K.FormRequests=Jp,K.FormTasks=Kp,K.FormText=hu,K.HasColorProperty=gn,K.ImageUpload=Ax,K.ImageVariable=Ox,K.InputVariable=rf,K.Json2Vue=ib,K.LabelSubmitButton=Lx,K.LabelSubmitButtonProperty=iv,K.LoadingSubmitButton=zx,K.LoadingSubmitButtonProperty=av,K.Loop=ek,K.LoopInspector=Ex,K.MultiColumn=tk,K.MultipleUploadsCheckbox=Bx,K.MustacheHelper=Hi,K.NewFormMultiColumn=Yp,K.OptionsList=Mx,K.OutboundConfig=af,K.PageSelect=$x,K.RequiredCheckbox=qx,K.ScreenBase=ad,K.ScreenRendererError=Gp,K.ScreenSelector=Px,K.SelectDataTypeMask=nf,K.Task=Xx,K.Tooltip=Xc,K.ValidationMsg=il,K.ValidationSelect=Ix,K.VariableNameGenerator=Fx,K.VisibilityRule=nv,K.VueFormBuilder=Vx,K.VueFormRenderer=Gi,K.WatchersForm=sk,K.WatchersList=ok,K.WatchersPopup=GJ,K.WatchersSynchronous=bx,K.accordions=Rx,K.bgcolorProperty=la,K.buttonLabelProperty=Xg,K.buttonTypeEvent=tv,K.buttonVariantStyleProperty=rd,K.canOpenJsonFile=L_,K.colorProperty=ua,K.computedFields=sh,K.dataSourceValues=ea,K.dataSources=Ts,K.datatable=ic,K.default=QJ,K.defaultValueProperty=Rn,K.defaultValues=Pw,K.deviceVisibilityProperty=$q,K.disabledProperty=td,K.focusErrors=nc,K.formTypes=As,K.formWatchers=YE,K.getValidPath=$c,K.globalErrorsModule=ik,K.globalProperties=CQ,K.helperTextProperty=Si,K.initializeScreenCache=KJ,K.inspector=Nx,K.javascriptReservedKeywords=rl,K.keyNameProperty=Yt,K.labelProperty=Br,K.multiselectApi=nb,K.mustacheEvaluation=Md,K.placeholderProperty=Nn,K.readonlyProperty=al,K.renderer=HJ,K.shouldElementBeVisible=sb,K.testing=lb,K.toggleStyleProperty=ev,K.tooltipProperty=rv,K.validationRulesProperty=Ra,K.validators=nl,K.watchers=sv,Object.defineProperties(K,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
344
+ }`,modifiers:{hover:!0,right:!0}}],key:o,staticClass:"gray-text",attrs:{boundary:"viewport","data-cy":`controls-${s.component}`}},[s.config&&s.config.icon?r("i",{class:s.config.icon}):e._e(),r("span",{staticClass:"svg-icon",staticStyle:{width:"12px",height:"12px"},domProps:{innerHTML:e._s(s.config.svg)}}),e._v(" "+e._s(e.$t(s.label))+" ")])}),1):e._e()],1)],1)]})],2)],1)],1),r("b-col",{ref:"screen-container",staticClass:"overflow-auto mh-100 p-0 d-flex flex-column position-relative",attrs:{id:"screen-container"}},[r("tabs-bar",{ref:"tabsBar",attrs:{pages:e.config},on:{"tab-opened":function(a){e.currentPage=a}},scopedSlots:e._u([{key:"tabs-start",fn:function(){return[e.showToolbar?r("pages-dropdown",{attrs:{data:e.sortedPages},on:{addPage:function(a){return e.$bvModal.show("addPageModal")},clickPage:e.onClick,seeAllPages:function(a){return e.$bvModal.show("openSortable")}}}):e._e()]},proxy:!0},{key:"default",fn:function({currentPage:a}){return[e.isCurrentPageEmpty(a)?r("div",{staticClass:"d-flex justify-content-center align-items-center drag-placeholder text-center position-absolute rounded mt-4 flex-column",attrs:{"data-cy":"screen-drop-zone"}},[r("svg",{attrs:{width:"81",height:"107",viewBox:"0 0 81 107",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{d:"M47.125 28.6562V0.5H5.71875C2.96523 0.5 0.75 2.71523 0.75 5.46875V101.531C0.75 104.285 2.96523 106.5 5.71875 106.5H75.2812C78.0348 106.5 80.25 104.285 80.25 101.531V33.625H52.0938C49.3609 33.625 47.125 31.3891 47.125 28.6562ZM60.375 77.5156C60.375 78.882 59.257 80 57.8906 80H23.1094C21.743 80 20.625 78.882 20.625 77.5156V75.8594C20.625 74.493 21.743 73.375 23.1094 73.375H57.8906C59.257 73.375 60.375 74.493 60.375 75.8594V77.5156ZM60.375 64.2656C60.375 65.632 59.257 66.75 57.8906 66.75H23.1094C21.743 66.75 20.625 65.632 20.625 64.2656V62.6094C20.625 61.243 21.743 60.125 23.1094 60.125H57.8906C59.257 60.125 60.375 61.243 60.375 62.6094V64.2656ZM60.375 49.3594V51.0156C60.375 52.382 59.257 53.5 57.8906 53.5H23.1094C21.743 53.5 20.625 52.382 20.625 51.0156V49.3594C20.625 47.993 21.743 46.875 23.1094 46.875H57.8906C59.257 46.875 60.375 47.993 60.375 49.3594ZM80.25 25.7371V27H53.75V0.5H55.0129C56.3379 0.5 57.6008 1.01758 58.5324 1.94922L78.8008 22.2383C79.7324 23.1699 80.25 24.4328 80.25 25.7371Z",fill:"#699CFF"}})]),r("h3",[e._v(e._s(e.$t("Place your controls here.")))]),r("p",[e._v(" "+e._s(e.$t("To begin creating a screen, drag and drop items from the Controls Menu on the left."))+" ")])]):e._e(),e.renderControls?r("draggable",e._b({key:e.editorContentKey,staticClass:"h-100",attrs:{"data-cy":"editor-content","ghost-class":"form-control-ghost",value:e.config[a].items},on:{input:e.updateConfig}},"draggable",{group:{name:"controls"},swapThreshold:.5},!1),e._l(e.config[a].items,function(i,n){return r("div",{key:n,staticClass:"control-item mt-4 mb-4",class:{selected:e.selected===i,hasError:e.hasError(i)},attrs:{selector:i.config.customCssSelector},on:{click:function(s){return e.inspect(i)}}},[i.container?r("div",{staticClass:"card container-lement",class:{"ai-section-card":e.isAiSection(i)},attrs:{"data-cy":"screen-element-container"},on:{click:function(s){return e.inspect(i)}}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center",class:{pulse:e.isAiSection(i)&&e.aiPreview(i)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||i.label||e.$t("Field Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(i)&&e.aiPreview(i)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{"data-test":"apply-ai-btn",title:e.$t("Apply Changes")},on:{click:function(s){return e.applyAiChanges(i)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(i)&&e.aiPreview(i)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"data-test":"copy-control-btn",title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"data-test":"delete-control-btn",title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],{tag:"component",staticClass:"card-body",class:e.elementCssClass(i),attrs:{"validation-errors":e.validationErrors,selected:e.selected,config:i.config,"ai-element":i},on:{inspect:e.inspect,"update-state":e.updateState},model:{value:i.items,callback:function(s){e.$set(i,"items",s)},expression:"element.items"}})],1):r("div",{staticClass:"card",attrs:{"data-cy":"screen-element-container"}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],e._b({tag:"component",staticClass:"card-body m-0 pb-4 pt-4",class:[e.elementCssClass(i),{"prevent-interaction":!i.config.interactive}],attrs:{tabindex:i.config.interactive?0:-1},on:{input:function(s){i.config.interactive&&(i.config.content=s)}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}}},"component",i.config,!1))],1)])}),0):e._e(),e.isCurrentPageEmpty(a)?e._e():r("div",{attrs:{"data-cy":"screen-drop-zone"}},[e._v("   ")])]}}])})],1),e.renderControls?r("b-col",{staticClass:"overflow-hidden h-100 p-0 inspector-column"},[r("b-card",{staticClass:"p-0 h-100 border-top-0 border-bottom-0 border-right-0 rounded-0",attrs:{"no-body":""}},[r("b-card-body",{staticClass:"p-0 h-100 overflow-auto"},[e._l(e.accordions,function(a){return[e.getInspectorFields(a)&&e.getInspectorFields(a).length>0?r("b-button",{key:`${e.accordionName(a)}-button`,staticClass:"text-left card-header d-flex align-items-center w-100 outline-0 text-capitalize shadow-none",attrs:{variant:"outline","data-cy":`accordion-${e.accordionName(a).replace(" ","")}`,"accordion-name":`accordion-${e.accordionName(a).replace(" ","")}`,"is-open":a.open?"1":"0"},on:{click:function(i){return e.toggleAccordion(a)}}},[r("i",{staticClass:"fas fa-cog mr-2"}),e._v(" "+e._s(e.$t(e.accordionName(a)))+" "),r("i",{staticClass:"fas fa-angle-down ml-auto",class:{"fas fa-angle-right":!a.open}})]):e._e(),r("b-collapse",{key:`${e.accordionName(a)}-collapse`,attrs:{id:e.accordionName(a)},model:{value:a.open,callback:function(i){e.$set(a,"open",i)},expression:"accordion.open"}},e._l(e.getInspectorFields(a),function(i,n){return r(i.type,e._b({key:n,tag:"component",staticClass:"border-bottom m-0 p-4",attrs:{"data-cy":"inspector-"+(i.field||i.config.name),"field-name":i.field,"field-accordion":`accordion-${e.accordionName(a).replace(" ","")}`,builder:e.builder,"form-config":e.config,"screen-type":e.screenType,"current-page":e.currentPage,"selected-control":e.selected},on:{"update-state":e.updateState,setName:function(s){e.inspection.config.name=s}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}},model:{value:e.inspection.config[i.field],callback:function(s){e.$set(e.inspection.config,i.field,s)},expression:"inspection.config[item.field]"}},"component",i.config,!1))}),1)]})],2)],1)],1):e._e(),r("b-modal",{ref:"openSortable",attrs:{id:"openSortable","header-close-content":"&times;",role:"dialog",size:"lg",title:e.$t("Edit Pages"),"ok-title":e.$t("DONE"),"ok-only":"","ok-variant":"secondary","header-class":"modal-header-custom"},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Edit Pages")))]),r("span",{staticClass:"modal-subtitle"},[e._v(e._s(e.$t("Change pages order and name")))])]},proxy:!0},{key:"modal-header-close",fn:function({close:a}){return[r("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close"},on:{click:function(i){return a()}}},[e._v("×")])]}}])},[r("Sortable",{attrs:{items:e.config,"filter-key":"name"},on:{"item-edit":()=>{},"item-delete":e.confirmDelete,"add-page":function(a){return e.$bvModal.show("addPageModal")}}})],1),r("b-modal",{ref:"addPageModal",attrs:{id:"addPageModal","header-class":"pb-2",size:"lg","ok-title":e.$t("SAVE"),"cancel-title":e.$t("CANCEL"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;","data-cy":"add-page-modal","ok-disabled":!e.addPageName||!!e.checkPageName(e.addPageName)},on:{ok:e.addPage,show:function(a){e.addPageName="",e.showAddPageValidations=!1}},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Create New Page")))]),r("small",{staticClass:"modal-subtitle mb-n2"},[e._v(e._s(e.$t("Create a new page in your screen")))])]},proxy:!0}])},[r("form-input",{ref:"addPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The name of the new page to add"),error:e.checkPageName(e.addPageName),"data-cy":"add-page-name","aria-required":"true"},model:{value:e.addPageName,callback:function(a){e.addPageName=a},expression:"addPageName"}})],1),r("b-modal",{ref:"editPageModal",attrs:{title:e.$t("Edit Page Title"),"ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.editPage}},[r("required"),r("form-input",{ref:"editPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The new name of the page"),validation:"required",error:e.checkPageName(e.editPageName),required:"","aria-required":"true"},model:{value:e.editPageName,callback:function(a){e.editPageName=a},expression:"editPageName"}})],1),r("b-modal",{ref:"confirm",attrs:{title:e.$t("Caution!"),"ok-title":e.$t("Delete"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.deletePage,cancel:e.hideConfirmModal}},[r("p",[e._v(e._s(e.confirmMessage))]),r("div",{attrs:{slot:"modal-ok"},slot:"modal-ok"},[e._v(e._s(e.$t("Delete")))])])],1)},MK=[],$K=oe(OK,EK,MK,!1,null,"fdf4961e",null,null);const Vx=$K.exports,PK=1,DK={name:"FormMultiColumn",mixins:[gn,sb,$c],props:["value","selected","name","config","transientData","formConfig"],components:{draggable:Oa,FormInput:Ba,FormSelectList:ee.FormSelectList,FormTextArea:ee.FormTextArea,FormCheckbox:ee.FormCheckbox,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},data(){return{items:[]}},computed:{model(){return this.$parent.model}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},methods:{classColumn(t){let e=PK;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e} ${this.columnVerticalAlign(t)}`},columnVerticalAlign(t){let e="";if(this.items.length>0&&this.items[t].length===1){let r=this.items[0].filter(n=>n.component==="FormText");if(r.length===0)return"";let a=r[0],i=" justify-content-"+(a.config.textAlign==="right"?"end":a.config.textAlign);switch(a.config.verticalAlign){case"top":e="d-flex align-items-start"+i;break;case"middle":e="d-flex align-items-center"+i;break;case"bottom":e="d-flex align-items-end"+i;break}}return e},inspect(t){this.$emit("inspect",t)},submit(){this.$emit("submit")},pageNavigate(t){this.$emit("pageNavigate",t)}}};var IK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",{staticClass:"row"},e._l(e.items,function(a,i){return r("div",{key:i,staticClass:"column-draggable",class:e.classColumn(i)},[e._l(a.filter(e.shouldElementBeVisible),function(n,s){return[n.container?r(n.component,{key:s,ref:"container",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{transientData:e.transientData,config:n.config,name:n.config.name!==void 0?n.config.name:null,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}}):r("div",{key:s,staticClass:"w-100",attrs:{id:n.config.name?n.config.name:void 0,selector:n.config.customCssSelector}},[r(n.component,e._b({ref:"elements",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{validationData:e.transientData,disabled:n.config.interactive||n.config.disabled,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:e.model[e.getValidPath(n.config.name)],callback:function(o){e.$set(e.model,e.getValidPath(n.config.name),o)},expression:"model[getValidPath(element.config.name)]"}},"component",n.config,!1))],1)]})],2)}),0)])},zK=[],LK=oe(DK,IK,zK,!1,null,null,null,null);const mu=LK.exports,Ux={value:"string",content:"Text"},Gx={value:"int",content:"Integer"},jK={value:"currency",content:"Currency"},NK={value:"password",content:"Password"},RK={value:"percentage",content:"Percentage"},Hx={value:"float",content:"Decimal"},Yx={value:"datetime",content:"Datetime"},Qx={value:"date",content:"Date"},FK={value:"boolean",content:"Boolean"},qK=[Ux,Gx,jK,RK,Hx,Yx,Qx,NK],BK=[Ux,Gx,Hx];function gu(t){return{type:"FormMultiselect",field:"dataFormat",config:{label:"Data Type",name:"Data Type",helper:"The data type specifies what kind of data is stored in the variable.",validation:"required",options:t}}}function WK(){return{type:nf,field:"dataMask",config:{label:"Data Format",name:"Data Format",helper:"The data format for the selected type."}}}const Kx=gu(qK),VK=gu(BK),UK=gu([FK]),Jx=gu([Qx,Yx]),Zx=WK(),GK=[{editorComponent:ee.FormHtmlEditor,editorBinding:"FormHtmlEditor",rendererComponent:ee.FormHtmlEditor,rendererBinding:"FormHtmlEditor",control:{popoverContent:"Use a Rich Text Editor to add HTML-formatted",order:1,group:"Content Fields",label:"Rich Text",component:"FormHtmlViewer","editor-component":"FormHtmlEditor","editor-control":"FormHtmlEditor",config:{icon:"fas fa-pencil-ruler",interactive:!0,content:"<p>Rich text editor</p>",renderVarHtml:null},inspector:[{type:"FormTextArea",field:"content",config:{rows:5,label:"Content",helper:"The HTML text to display",value:""}},{type:"FormCheckbox",field:"renderVarHtml",config:{label:"Render HTML from a Variable",helper:"",value:""}}]}},{builderComponent:ee.FormInput,builderBinding:"FormInput",rendererComponent:Ba,rendererBinding:"FormMaskedInput",control:{popoverContent:"Collect a string of text and format it as one of several data types",order:1,group:"Input Fields",label:"Line Input",component:"FormInput","editor-component":"FormInput","editor-control":"FormInput",config:{icon:"far fa-square",label:"New Input",name:"",placeholder:"",validation:"",helper:null,type:"text",dataFormat:"string"},inspector:[Yt,Br,Kx,Zx,Ra,Nn,Si,al,ua,la,Rn]}},{editorComponent:ee.FormTextArea,editorBinding:"FormTextArea",rendererComponent:ee.FormTextArea,rendererBinding:"FormTextArea",control:{popoverContent:"Collect a multi-line string of text, to allow for extensive, richly formatted responses",order:4,group:"Input Fields",label:"Textarea",component:"FormTextArea","editor-component":"FormTextArea","editor-control":"FormTextArea","fa-icon":"fas fa-paragraph",config:{icon:"fas fa-paragraph",label:"New Textarea",placeholder:"",helper:null,rows:2,richtext:!1,currency:{code:"USD",name:"US Dollar",format:"#,###.##",symbol:"$"}},inspector:[Yt,Br,Nn,Si,{type:"FormCheckbox",field:"richtext",config:{label:"Rich Text",helper:""}},Ra,{type:"FormInput",field:"rows",config:{label:"Rows",helper:"The number of rows to provide for input",validation:"integer"}},al,ua,la,Rn]}},{editorComponent:ee.FormSelectList,editorBinding:"FormSelectList",rendererComponent:ee.FormSelectList,rendererBinding:"FormSelectList",control:{popoverContent:"Collect options from a list, as radio butttons or dropdowns",order:2,group:"Input Fields",label:"Select List",component:"FormSelectList","editor-component":"FormSelectList","editor-control":"FormSelectList",config:{icon:"fas fa-angle-double-down",label:"New Select List",placeholder:"",validation:"",dataSourceUrl:"",dataSourceEndpoint:"",rootElement:"response",options:{showRenderAs:!0,dataSource:ea.provideData,jsonData:"",pmqlQuery:"",dataName:"response",renderAs:"dropdown",allowMultiSelect:!1,selectedOptions:[],optionsList:[],key:"value",value:"content",valueTypeReturned:"single"},helper:null},inspector:[Yt,Br,Nn,Ra,Si,{type:"OptionsList",field:"options",config:{}},ua,la,Rn,al]}},{editorComponent:ee.FormCheckbox,editorBinding:"FormCheckbox",rendererComponent:ee.FormCheckbox,rendererBinding:"FormCheckbox",control:{popoverContent:"Add a checkbox or toggle for true/false responses",order:6,group:"Input Fields",label:"Checkbox",component:"FormCheckbox","editor-component":"FormCheckbox","editor-control":"FormCheckbox",config:{icon:"fas fa-check-square",label:"New Checkbox",helper:null,name:null,initiallyChecked:!1,validation:"",toggle:!1},inspector:[Yt,Br,Si,Ra,{type:"FormCheckbox",field:"initiallyChecked",config:{label:"Checked by default",helper:"Should the checkbox be checked by default"}},ua,la,ev,td]}},{editorComponent:ee.FormDatePicker,editorBinding:"FormDatePicker",rendererComponent:ee.FormDatePicker,rendererBinding:"FormDatePicker",control:{popoverContent:"Collect a date or date/time",order:5,group:"Input Fields",label:"Date Picker",component:"FormDatePicker","editor-component":"FormDatePicker","editor-control":"FormDatePicker",config:{icon:"far fa-calendar-alt",label:"New Date Picker",type:"datetime",name:"",placeholder:"",minDate:"",maxDate:""},inspector:[{type:"FormInput",field:"minDate",config:{name:"Minimum Date",label:"Minimum Date",validation:"date_or_mustache"}},{type:"FormInput",field:"maxDate",config:{name:"Maximum Date",label:"Maximum Date",validation:"after_min_date|date_or_mustache"}},Yt,Br,Jx,Ra,Nn,Si,ua,la,td,Rn]}},{editorComponent:qa,editorBinding:"FormButton",rendererComponent:qa,rendererBinding:"FormButton",control:{popoverContent:"Add special buttons that link between subpages within this Form",order:1,group:"Navigation",label:"Page Navigation",component:"FormButton","editor-component":"FormButton","editor-control":"PageNavigation",config:{icon:"far fa-compass",label:"Page Navigation",variant:"primary",event:"pageNavigate",eventData:null},inspector:[{type:"PageSelect",field:"eventData",config:{label:"Destination Screen",helper:"The destination page to navigate to"}},Xg,rd]}},{editorComponent:mu,editorBinding:"FormMultiColumn",rendererComponent:mu,rendererBinding:"FormMultiColumn",control:{popoverContent:"Organize and group your content in columns",order:2,group:"Content Fields",label:"Multicolumn / Table",component:"FormMultiColumn","editor-component":"MultiColumn","editor-control":"MultiColumn",container:!0,items:[[],[]],config:{icon:"fas fa-table",options:[{value:"1",content:"6"},{value:"2",content:"6"}]},inspector:[{type:"ContainerColumns",field:"options",config:{label:"Column Width",validation:"columns-adds-to-12"}},ua,la]}},{editorComponent:xs,editorBinding:"FormLoop",rendererComponent:xs,rendererBinding:"FormLoop",control:{popoverContent:"Add a repeatable section of content",order:5,group:"Content Fields",label:"Loop",component:"FormLoop","editor-component":"Loop","editor-control":"Loop",container:!0,items:[],config:{name:"",icon:"fas fa-redo",settings:{type:"new",varname:"loop",times:"3",add:!1}},inspector:[{type:"LoopInspector",field:"settings",config:{}}]}},{editorComponent:hu,editorBinding:"FormText",rendererComponent:fu,rendererBinding:"FormRecordList",control:{popoverContent:"Format content in a table structure and allow for adding rows",order:4,group:"Content Fields",label:"Record List",component:"FormRecordList","editor-component":"FormText","editor-control":"FormRecordList",config:{name:"",icon:"fas fa-th-list",label:"New Record List",editable:!1,fields:{dataSource:ea.provideData,jsonData:""},form:""},inspector:[Yt,{type:"FormInput",field:"label",config:{label:"List Label",helper:"The label describes this record list"}},{type:"FormCheckbox",field:"editable",config:{label:"Editable?",helper:"Should records be editable/removable and can new records be added"}},{type:"ColumnSetup",field:"fields",config:{label:"Columns",helper:"List of columns to display in the record list"}},{type:"PageSelect",field:"form",config:{label:"Record Form",helper:"The form to use for adding/editing records"}},ua,la]}},{editorComponent:Jn,editorBinding:"FormImage",rendererComponent:Jn,rendererBinding:"FormImage",control:{popoverContent:"Upload an image to your screen",order:3,group:"Content Fields",label:"Image",component:"FormImage","editor-component":"FormImage","editor-control":"FormImage",config:{label:"Image",icon:"fas fa-image",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"name",config:{label:"Name",helper:"Image name"}},{type:"ImageUpload",field:"image",config:{label:"Upload",helper:"Upload image"}},{type:"ImageVariable",field:"imageName",config:{label:"Render from a variable name",helper:null}},{type:"FormInput",field:"height",config:{label:"Height",helper:"Image height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"image width",type:"number"}}]}},{editorComponent:yn,editorBinding:"FormAvatar",rendererComponent:yn,rendererBinding:"FormAvatar",control:{popoverContent:"User avatar",order:3,group:"Dashboards",label:"User Avatar",component:"FormAvatar","editor-component":"FormAvatar","editor-control":"FormAvatar",config:{label:"User Avatar",icon:"fas fa-user-circle",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"height",config:{label:"Height",helper:"Avatar height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"Avatar width",type:"number"}}]}},{editorComponent:qa,editorBinding:"FormSubmit",rendererComponent:qa,rendererBinding:"FormButton",control:{popoverContent:"Add an action to submit your form or update a field",order:3,group:"Input Fields",label:"Submit Button",component:"FormButton","editor-component":"FormButton","editor-control":"FormSubmit",config:{icon:"fas fa-share-square",label:"New Submit",variant:"primary",event:"submit",loading:!1,loadingLabel:"Loading...",defaultSubmit:!0,name:null,fieldValue:null,tooltip:{}},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the button's text"}},{type:"FormInput",field:"name",config:{label:"Variable Name",name:"Variable Name",helper:"A variable name is a symbolic name to reference information.",validation:"regex:/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*(?<![.])$/|not_in:"+rl}},tv,av,iv,rv,{type:"FormInput",field:"fieldValue",config:{label:"Value",helper:"The value being submitted"}},rd]}},{editorComponent:ks,editorBinding:"FormNestedScreen",rendererComponent:ks,rendererBinding:"FormNestedScreen",control:{popoverContent:"Add and reuse another Form within this Form",order:6,group:"Content Fields",label:"Nested Screen",component:"FormNestedScreen","editor-component":"FormNestedScreen","editor-control":"FormNestedScreen",config:{label:"Nested Screen",icon:"fas fa-file-invoice",variant:"primary",name:"Nested Screen",value:null},inspector:[{type:"ScreenSelector",field:"screen",config:{label:"Screen",name:"SelectScreen","validate-nested":!1,helper:"Select a screen"}}]}},{rendererComponent:bn,rendererBinding:"FileUpload",builderComponent:bn,builderBinding:"FileUpload",control:{group:"Files",popoverContent:"Collect files uploaded into the Form",order:1,label:"File Upload",component:"FileUpload","editor-component":"FileUpload","editor-control":"FileUpload",config:{label:"New File Upload",icon:"fas fa-file-upload"},inspector:[Yt,{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the field's name"}},{type:"MultipleUploadsCheckbox",field:"multipleUpload",config:{label:"Upload multiple files"}},{type:"FormInput",field:"accept",config:{label:"File Accepted",helper:"Common file types: application/msword, image/gif, image/jpeg, application/pdf, application/vnd.ms-powerpoint, application/vnd.ms-excel, text/plain"}},{type:"RequiredCheckbox",field:"validation",config:{label:"Required",helper:"Prevent form from being submitted unless a file is uploaded"}}]}},{rendererComponent:hu,rendererBinding:"FormText",builderComponent:Xs,builderBinding:"FileDownload",control:{popoverContent:"Offer a File download",order:2,group:"Files",label:"File Download",component:"FileDownload","editor-component":"FormText","editor-control":"FileDownload",config:{label:"New File Download",icon:"fas fa-file-download"},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The text to display"}},{type:"FormInput",field:"name",config:{label:"Name",helper:"The name of the Download"}}]}},{rendererComponent:ee.BFormComponent,rendererBinding:"BFormComponent",builderComponent:ee.BFormComponent,builderBinding:"BFormComponent",control:{popoverContent:"Add one of several Bootstrap Vue components",order:1,group:"Advanced",label:"Bootstrap Component",component:"BFormComponent","editor-component":"BFormComponent","editor-control":"BFormComponent",config:{bootstrapComponent:"b-form-tags",bootstrapConfig:"{}",label:"New Bootstrap Component",icon:"fab fa-bootstrap"},inspector:[Yt,Br,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-embed",content:"Embed"},{value:"b-img",content:"Image"},{value:"b-form-rating",content:"Form Rating"},{value:"b-form-spinbutton",content:"Form Spinbutton"},{value:"b-form-tags",content:"Form Tags"},{value:"b-form-timepicker",content:"Form Timepicker"},{value:"b-table",content:"Table"}]}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}},Ra]}},{rendererComponent:ee.BWrapperComponent,rendererBinding:"BWrapperComponent",builderComponent:ee.BWrapperComponent,builderBinding:"BWrapperComponent",control:{popoverContent:"Wrap an existing subpage within this Form into a Bootstrap Vue component",order:2,group:"Advanced",label:"Bootstrap Wrapper",component:"BWrapperComponent","editor-component":"BWrapperComponent","editor-control":"BWrapperComponent",config:{bootstrapComponent:"b-modal",bootstrapConfig:"{}",label:"New Bootstrap Wrapper",icon:"fab fa-bootstrap",name:"",form:""},inspector:[Yt,Br,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-alert",content:"Alert"},{value:"b-card",content:"Card"},{value:"b-collapse",content:"Collapse"},{value:"b-jumbotron",content:"Jumbotron"},{value:"b-modal",content:"Modal"}]}},{type:"PageSelect",field:"form",config:{label:"Page",helper:"The page to use inside the component"}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}}]}},{editorComponent:_s,editorBinding:"FormListTable",rendererComponent:_s,rendererBinding:"FormListTable",control:{popoverContent:"Create List Table",order:6.5,group:"Dashboards",label:"List Table",component:"FormListTable","editor-component":"FormListTable","editor-control":"FormListTable",config:{label:"List Table",icon:"fas fa-list",variant:"primary"},inspector:[{type:"FormMultiselect",field:"listOption",config:{icon:"fas fa-list",label:"List Table",options:[{value:"My Tasks",content:"My Tasks"},{value:"My Requests",content:"My Requests"},{value:"Start New Request",content:"Start New Request"}]}}]}},{editorComponent:ws,editorBinding:"FormAnalyticsChart",rendererComponent:ws,rendererBinding:"FormAnalyticsChart",control:{popoverContent:"Add a chart from the Analytics Reports",order:6,group:"Dashboards",label:"Analytics Chart",component:"FormAnalyticsChart","editor-component":"FormAnalyticsChart","editor-control":"FormAnalyticsChart",config:{label:"Analytics Chart",icon:"fas fa-chart-area",variant:"primary"},inspector:[{type:"AnalyticsSelector",field:"listChartOption",config:{label:"Chart"}}]}}],HK="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgxIiBoZWlnaHQ9IjI4MCIgdmlld0JveD0iMCAwIDI4MSAyODAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04NS4wNTYyIDczLjg4NkM4NS4wNTYyIDczLjg4NiAxMTUuMDggOTYuNjcgMTYwLjcyNCA1NC4wNjhDMjAxLjI2IDE2LjIzNDMgMjM0LjM1OSA3NS45Mjc1IDIzNC41OSAxMDQuNTEzQzIzNC44OSAxNDEuNTQzIDE5NC4wNTQgMTcxLjE3MyAyMTMuODcyIDE5NS40OTVDMjMzLjY5IDIxOS44MTcgMTc0LjU3IDI1OS45ODEgMTQyLjcwOCAyMjUuMjIyQzEwMy4wNzIgMTgxLjk4MyA5Mi4zMzQ1IDIxNy4xMTQgNjkuNzQyNSAyMTcuMTE0QzUzLjUyNzggMjE3LjExNCAyMC4yMzc2IDE3Ni44MjUgNDIuNzE4MSAxNDYuODUxQzYxLjYzNTIgMTIxLjYyOSA1MS4zMTgyIDExMy4yNTggNDYuMzIyIDEwNC41MTNDMzkuMTE0OSA5MS45MDIxIDU2LjIzMDQgNTcuNjcxNSA4NS4wNTYyIDczLjg4NloiIGZpbGw9IiNERUVFRkEiLz4KPHBhdGggZD0iTTIwNS41OTIgMTI0LjIzNUMyMDcuMjA2IDEyNC44MzUgMjA4Ljk2OSAxMjQuODc1IDIxMC42NDcgMTI0LjQ4OUMyMTcuNjc3IDEyMi44NzYgMjQxLjg1IDExOC42MDMgMjM3LjY1IDEzNy4zMzVDMjM2LjczNSAxNDEuMDUxIDIyMi41NzggMTYxLjg2NCAyNDIuNzM5IDE2OS40NjJDMjQ0LjIxNyAxNzAuMDI2IDI0NS43NzkgMTcwLjMzNCAyNDcuMzYgMTcwLjM3MkMyNTMuNTY4IDE3MC41IDI2NS44NjkgMTY5LjAzNCAyNzEuMDE3IDE2My43OTRDMjc3LjIzNyAxNTcuNDYzIDI3MC40NDIgMTYwLjQ2NSAyNzAuNDQyIDE2MC40NjVDMjcwLjQ0MiAxNjAuNDY1IDI0Ni43OTggMTcwLjc4MyAyMzguNDQ2IDE1OS44MzZDMjM3LjUxNyAxNTguNjE4IDIzNi45MjUgMTU2Ljg0OSAyMzYuNzU2IDE1NS4zMjZDMjM2LjQ2MiAxNTIuNjg2IDIzNy42MzQgMTQ5LjE5NyAyMzkuMTc0IDE0Ni4xNTlDMjQxLjI1OSAxNDIuMDQ4IDI1MS4yNjYgMTIzLjU1NSAyMjkuNTM5IDExOC4xNjhDMjI0LjUzMyAxMTYuOTc2IDIxNy4yNjMgMTE1LjkwNiAyMDcuODkgMTE5Ljg1MkMyMDIuNDIyIDEyMi4xNTQgMjAzLjYzMyAxMjMuNTA3IDIwNS41OTIgMTI0LjIzNVoiIGZpbGw9IiNCQ0RDRjgiLz4KPHBhdGggZD0iTTIxMC40MyAxMTcuMzMxTDIwNC4xMzcgMTE5LjY4N0MyMDEuOTY1IDEyMC41IDIwMC44NjMgMTIyLjkyIDIwMS42NzYgMTI1LjA5MkwyMDEuOTg4IDEyNS45MjZDMjAyLjgwMSAxMjguMDk4IDIwNS4yMjEgMTI5LjIgMjA3LjM5MyAxMjguMzg3TDIxMy42ODcgMTI2LjAzMkMyMTUuODU5IDEyNS4yMTkgMjE2Ljk2MSAxMjIuNzk5IDIxNi4xNDggMTIwLjYyNkwyMTUuODM2IDExOS43OTNDMjE1LjAyMyAxMTcuNjIgMjEyLjYwMyAxMTYuNTE4IDIxMC40MyAxMTcuMzMxWiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTcxLjgwMSAxMjQuMTQ3TDE1MS4wNDYgMTMxLjkxNEMxNDkuOTYgMTMyLjMyMSAxNDkuNDA5IDEzMy41MzEgMTQ5LjgxNSAxMzQuNjE3TDE0OS44OTcgMTM0LjgzNkMxNTAuMzAzIDEzNS45MjIgMTUxLjUxMyAxMzYuNDczIDE1Mi42IDEzNi4wNjZMMTczLjM1NSAxMjguMjk5QzE3NC40NDEgMTI3Ljg5MiAxNzQuOTkyIDEyNi42ODIgMTc0LjU4NSAxMjUuNTk2TDE3NC41MDMgMTI1LjM3N0MxNzQuMDk3IDEyNC4yOTEgMTcyLjg4NyAxMjMuNzQgMTcxLjgwMSAxMjQuMTQ3WiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTc3LjU5MyAxMzkuNjI0TDE1Ni44MzggMTQ3LjM5MUMxNTUuNzUyIDE0Ny43OTggMTU1LjIwMSAxNDkuMDA4IDE1NS42MDggMTUwLjA5NEwxNTUuNjg5IDE1MC4zMTNDMTU2LjA5NiAxNTEuMzk5IDE1Ny4zMDYgMTUxLjk1IDE1OC4zOTIgMTUxLjU0M0wxNzkuMTQ3IDE0My43NzZDMTgwLjIzMyAxNDMuMzY5IDE4MC43ODQgMTQyLjE1OSAxODAuMzc4IDE0MS4wNzNMMTgwLjI5NiAxNDAuODU0QzE3OS44OSAxMzkuNzY4IDE3OC42NzkgMTM5LjIxNyAxNzcuNTkzIDEzOS42MjRaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xOTYuNzU1IDExMy41ODVMMTc5LjkzNCAxMTkuODhDMTc3Ljc2MSAxMjAuNjkzIDE3Ni42NTkgMTIzLjExNCAxNzcuNDcyIDEyNS4yODZMMTgzLjIxNiAxNDAuNjMxQzE4NC4wMjkgMTQyLjgwMyAxODYuNDQ5IDE0My45MDUgMTg4LjYyMSAxNDMuMDkyTDIwNS40NDMgMTM2Ljc5N0MyMDcuNjE1IDEzNS45ODQgMjA4LjcxNyAxMzMuNTY0IDIwNy45MDQgMTMxLjM5MUwyMDIuMTYxIDExNi4wNDZDMjAxLjM0OCAxMTMuODc0IDE5OC45MjggMTEyLjc3MiAxOTYuNzU1IDExMy41ODVaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xODEuNjcyIDExNy42MUwxNjQuODUgMTIzLjkwNkMxNjIuNjc4IDEyNC43MTkgMTYxLjU3NiAxMjcuMTM5IDE2Mi4zODkgMTI5LjMxMkwxNjkuMjQxIDE0Ny42MTlDMTcwLjA1NCAxNDkuNzkxIDE3Mi40NzQgMTUwLjg5MyAxNzQuNjQ2IDE1MC4wOEwxOTEuNDY4IDE0My43ODVDMTkzLjY0IDE0Mi45NzIgMTk0Ljc0MiAxNDAuNTUxIDE5My45MjkgMTM4LjM3OUwxODcuMDc3IDEyMC4wNzJDMTg2LjI2NCAxMTcuODk5IDE4My44NDQgMTE2Ljc5NyAxODEuNjcyIDExNy42MVoiIGZpbGw9IiMxNTcyQzIiLz4KPHBhdGggZD0iTTE4NC4zMDUgMTEzLjg5NUwxODQuMTczIDExMy45NDRDMTgyLjcyNSAxMTQuNDg2IDE4MS45OSAxMTYuMSAxODIuNTMyIDExNy41NDhMMTkyLjEzMSAxNDMuMTk1QzE5Mi42NzMgMTQ0LjY0MyAxOTQuMjg2IDE0NS4zNzggMTk1LjczNCAxNDQuODM2TDE5NS44NjYgMTQ0Ljc4NkMxOTcuMzE1IDE0NC4yNDQgMTk4LjA0OSAxNDIuNjMxIDE5Ny41MDcgMTQxLjE4MkwxODcuOTA5IDExNS41MzZDMTg3LjM2NyAxMTQuMDg4IDE4NS43NTMgMTEzLjM1MyAxODQuMzA1IDExMy44OTVaIiBmaWxsPSIjMTU3MkMyIi8+CjxwYXRoIGQ9Ik0xMi43ODE2IDEzMC4yOTJDMTIuNzgxNiAxMzAuMjkyIDQ2LjU2NDggMTIwLjc5OCA0MS42NiAxNDIuNjcyQzQwLjgwODMgMTQ2LjEzMyAyOC41NDcyIDE2My45NTMgNDMuMTUyIDE3Mi41MDlDNDYuMjg4IDE3NC4zNDYgNDkuOTA3IDE3NS4xNiA1My41NDEzIDE3NS4xNDFDNjAuMDU3MyAxNzUuMTA3IDcwLjM4NzIgMTczLjg1MyA3NS4wMjc4IDE2OS4xM0M4MS4yNDcxIDE2Mi43OTkgNzQuNDUyNiAxNjUuODAxIDc0LjQ1MjYgMTY1LjgwMUM3NC40NTI2IDE2NS44MDEgNTUuMDUwNCAxNzMuNzgyIDQ1LjA2ODcgMTY3LjQyQzQxLjY2MDQgMTY1LjI0OCA0MC4xMTU1IDE2MS4wNDIgNDEuMDQxMSAxNTcuMTA3QzQxLjUxNDEgMTU1LjE1MyA0Mi4yMzQ1IDE1My4yNjcgNDMuMTg0NyAxNTEuNDk1QzQ1LjM1NTYgMTQ3LjQyOSA1NS4yNzY4IDEyOC44OTEgMzMuNTQ4OCAxMjMuNTA0QzI4LjU0MzYgMTIyLjMxMiAyMS4yNzM4IDEyMS4yNDIgMTEuOTAwMSAxMjUuMTg4QzIuNTI2MzcgMTI5LjEzNSAxMi43ODE2IDEzMC4yOTIgMTIuNzgxNiAxMzAuMjkyWiIgZmlsbD0iI0JDRENGOCIvPgo8cGF0aCBkPSJNNzkuNTcwNCAxNjAuOTA2TDczLjI3NzIgMTYzLjI2MkM3MS4xMDQ4IDE2NC4wNzUgNzAuMDAyOCAxNjYuNDk1IDcwLjgxNTggMTY4LjY2N0w3MS4xMjc4IDE2OS41MDFDNzEuOTQwOCAxNzEuNjczIDc0LjM2MTEgMTcyLjc3NSA3Ni41MzM1IDE3MS45NjJMODIuODI2OCAxNjkuNjA3Qzg0Ljk5OTIgMTY4Ljc5NCA4Ni4xMDEyIDE2Ni4zNzQgODUuMjg4MSAxNjQuMjAxTDg0Ljk3NjIgMTYzLjM2OEM4NC4xNjMxIDE2MS4xOTUgODEuNzQyOSAxNjAuMDkzIDc5LjU3MDQgMTYwLjkwNloiIGZpbGw9IiMxNTcyQzIiLz4KPHBhdGggZD0iTTkwLjIwMzEgMTUwLjU1Mkw4MC44NzYyIDE1NC4wNDNDNzguNzAzNyAxNTQuODU2IDc3LjYwMTcgMTU3LjI3NiA3OC40MTQ4IDE1OS40NDlMODIuOTEyMiAxNzEuNDY1QzgzLjcyNTMgMTczLjYzOCA4Ni4xNDU1IDE3NC43NCA4OC4zMTc5IDE3My45MjdMOTcuNjQ0OCAxNzAuNDM2Qzk5LjgxNzMgMTY5LjYyMyAxMDAuOTE5IDE2Ny4yMDMgMTAwLjEwNiAxNjUuMDNMOTUuNjA4OCAxNTMuMDEzQzk0Ljc5NTcgMTUwLjg0MSA5Mi4zNzU1IDE0OS43MzkgOTAuMjAzMSAxNTAuNTUyWiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTA1LjczIDE0MS4zTDkxLjgyMTMgMTQ2LjUwNkM4OS42NDg5IDE0Ny4zMTkgODguNTQ2OSAxNDkuNzM5IDg5LjM2IDE1MS45MTJMOTYuMjExNyAxNzAuMjE5Qzk3LjAyNDggMTcyLjM5MiA5OS40NDUgMTczLjQ5NCAxMDEuNjE3IDE3Mi42OEwxMTUuNTI2IDE2Ny40NzVDMTE3LjY5OSAxNjYuNjYyIDExOC44MDEgMTY0LjI0MiAxMTcuOTg4IDE2Mi4wNjlMMTExLjEzNiAxNDMuNzYyQzExMC4zMjMgMTQxLjU4OSAxMDcuOTAzIDE0MC40ODcgMTA1LjczIDE0MS4zWiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTA4LjY3NyAxMzcuNTA5TDEwOC41NDUgMTM3LjU1OEMxMDcuMDk2IDEzOC4xIDEwNi4zNjIgMTM5LjcxNCAxMDYuOTA0IDE0MS4xNjJMMTE2LjUwMiAxNjYuODA5QzExNy4wNDQgMTY4LjI1NyAxMTguNjU4IDE2OC45OTIgMTIwLjEwNiAxNjguNDVMMTIwLjIzOCAxNjguNEMxMjEuNjg2IDE2Ny44NTggMTIyLjQyMSAxNjYuMjQ1IDEyMS44NzkgMTY0Ljc5NkwxMTIuMjggMTM5LjE1QzExMS43MzggMTM3LjcwMiAxMTAuMTI1IDEzNi45NjcgMTA4LjY3NyAxMzcuNTA5WiIgZmlsbD0iIzE1NzJDMiIvPgo8cGF0aCBkPSJNMTQ0LjE5NCAxMjEuMTdDMTQzLjY5MyAxMjEuMTE0IDE0My4yMzMgMTIwLjg2NyAxNDIuOTExIDEyMC40NzlDMTQyLjU5IDEyMC4wOTEgMTQyLjQzMSAxMTkuNTk0IDE0Mi40NjggMTE5LjA5MUwxNDMuNTA2IDEwMC4xMzVDMTQzLjU2OCA5OS4wMDI3IDE0NC41MjQgOTguMTQyNCAxNDUuNjA5IDk4LjI0MjVMMTQ3LjEyMSA5OC4zODI1QzE0OC4yMDYgOTguNDgyNiAxNDguOTgzIDk5LjUwMjUgMTQ4LjgzMSAxMDAuNjI3TDE0Ni4yODEgMTE5LjQ0M0MxNDYuMjIzIDExOS45NDQgMTQ1Ljk3MyAxMjAuNDAzIDE0NS41ODQgMTIwLjcyNUMxNDUuMTk1IDEyMS4wNDcgMTQ0LjY5NyAxMjEuMjA2IDE0NC4xOTQgMTIxLjE3VjEyMS4xN1oiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTEzNS4yMzMgMTIyLjgwNEMxMzUuMDc3IDEyMi44NSAxMzQuOTE0IDEyMi44NjUgMTM0Ljc1MiAxMjIuODQ4QzEzNC41OTEgMTIyLjgzIDEzNC40MzQgMTIyLjc4MSAxMzQuMjkyIDEyMi43MDNDMTM0LjE0OSAxMjIuNjI2IDEzNC4wMjQgMTIyLjUyMSAxMzMuOTIyIDEyMi4zOTRDMTMzLjgyIDEyMi4yNjggMTMzLjc0NCAxMjIuMTIyIDEzMy42OTggMTIxLjk2N0wxMjkuOTkyIDExMC4xNzVDMTI5Ljg4NCAxMDkuODQgMTI5LjkxNCAxMDkuNDc1IDEzMC4wNzQgMTA5LjE2MkMxMzAuMjM1IDEwOC44NDggMTMwLjUxMyAxMDguNjExIDEzMC44NDkgMTA4LjUwM0wxMzEuODA4IDEwOC4yMTNDMTMxLjk3MyAxMDguMTY1IDEzMi4xNDYgMTA4LjE1MiAxMzIuMzE2IDEwOC4xNzRDMTMyLjQ4NiAxMDguMTk2IDEzMi42NDkgMTA4LjI1MyAxMzIuNzk2IDEwOC4zNDJDMTMyLjk0MyAxMDguNDMgMTMzLjA3IDEwOC41NDggMTMzLjE2OSAxMDguNjg4QzEzMy4yNjggMTA4LjgyOCAxMzMuMzM3IDEwOC45ODcgMTMzLjM3MSAxMDkuMTU1TDEzNi4xMTggMTIxLjIzN0MxMzYuMTk1IDEyMS41NjEgMTM2LjE0NiAxMjEuOTAzIDEzNS45ODIgMTIyLjE5NEMxMzUuODE4IDEyMi40ODQgMTM1LjU1MSAxMjIuNzAyIDEzNS4yMzMgMTIyLjgwNFYxMjIuODA0WiIgZmlsbD0iIzUyQTVFQyIvPgo8cGF0aCBkPSJNMTMwLjIzMiAxMjkuNjA0QzEyOS41NjggMTMwLjQyNyAxMjguMjMzIDEzMC40MTcgMTI3LjIwNCAxMjkuNTgyTDEwOC45NTMgMTE0Ljc1M0MxMDcuODYzIDExMy44NjcgMTA3LjU0MSAxMTIuNDAxIDEwOC4yNDUgMTExLjUyOUwxMDkuMjI3IDExMC4zMTNDMTA5LjkzMiAxMDkuNDQgMTExLjM3OCAxMDkuNTEyIDExMi40MSAxMTAuNDdMMTI5LjY4IDEyNi41MTVDMTMwLjY1MyAxMjcuNDE5IDEzMC44OTYgMTI4Ljc4MiAxMzAuMjMyIDEyOS42MDRaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xMzguNjY5IDE2Ny45MDZDMTM5LjEzOSAxNjguMDg4IDEzOS41MiAxNjguNDQ1IDEzOS43MzIgMTY4LjkwMkMxMzkuOTQ1IDE2OS4zNTkgMTM5Ljk3MSAxNjkuODgxIDEzOS44MDcgMTcwLjM1N0wxMzMuOTYyIDE4OC40MTlDMTMzLjYxMyAxODkuNDk4IDEzMi40NjkgMTkwLjA4NSAxMzEuNDQ1IDE4OS43MTFMMTMwLjAxOCAxODkuMTlDMTI4Ljk5NSAxODguODE2IDEyOC41MDQgMTg3LjYzMSAxMjguOTM4IDE4Ni41ODRMMTM2LjIwOSAxNjkuMDQzQzEzNi4zOTQgMTY4LjU3MyAxMzYuNzUyIDE2OC4xOTMgMTM3LjIxMSAxNjcuOTgxQzEzNy42NjkgMTY3Ljc2OSAxMzguMTkxIDE2Ny43NDIgMTM4LjY2OSAxNjcuOTA2VjE2Ny45MDZaIiBmaWxsPSIjNTJBNUVDIi8+CjxwYXRoIGQ9Ik0xNDcuNzUgMTY4LjYxNUMxNDcuOTEyIDE2OC42MSAxNDguMDc0IDE2OC42MzggMTQ4LjIyNiAxNjguNjk2QzE0OC4zNzcgMTY4Ljc1NCAxNDguNTE2IDE2OC44NDEgMTQ4LjYzNCAxNjguOTUzQzE0OC43NTIgMTY5LjA2NCAxNDguODQ3IDE2OS4xOTggMTQ4LjkxMyAxNjkuMzQ2QzE0OC45NzkgMTY5LjQ5NCAxNDkuMDE2IDE2OS42NTQgMTQ5LjAyIDE2OS44MTdMMTQ5LjU5MiAxODIuMTY0QzE0OS42MSAxODIuNTE2IDE0OS40ODkgMTgyLjg2IDE0OS4yNTMgMTgzLjEyMkMxNDkuMDE4IDE4My4zODUgMTQ4LjY4OCAxODMuNTQzIDE0OC4zMzcgMTgzLjU2MkwxNDcuMzM1IDE4My41OTdDMTQ3LjE2MyAxODMuNjAxIDE0Ni45OTMgMTgzLjU3IDE0Ni44MzQgMTgzLjUwNUMxNDYuNjc1IDE4My40NCAxNDYuNTMyIDE4My4zNDMgMTQ2LjQxMiAxODMuMjJDMTQ2LjI5MyAxODMuMDk3IDE0Ni4yIDE4Mi45NTEgMTQ2LjE0IDE4Mi43OUMxNDYuMDggMTgyLjYyOSAxNDYuMDU1IDE4Mi40NTggMTQ2LjA2NCAxODIuMjg3TDE0Ni40OTQgMTY5LjkwNUMxNDYuNTAzIDE2OS41NzEgMTQ2LjYzNyAxNjkuMjUzIDE0Ni44NyAxNjkuMDE0QzE0Ny4xMDMgMTY4Ljc3NSAxNDcuNDE3IDE2OC42MzMgMTQ3Ljc1IDE2OC42MTVWMTY4LjYxNVoiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTE1NC4zMjIgMTYzLjMxN0MxNTUuMTc0IDE2Mi42OTEgMTU2LjQ2MyAxNjMuMDQyIDE1Ny4yNDMgMTY0LjExMkwxNzEuMTAzIDE4My4xMUMxNzEuOTMxIDE4NC4yNDUgMTcxLjg2NyAxODUuNzQ0IDE3MC45NjMgMTg2LjQwOEwxNjkuNzAzIDE4Ny4zMzNDMTY4Ljc5OSAxODcuOTk3IDE2Ny40MTggMTg3LjU1OCAxNjYuNjY2IDE4Ni4zNjhMMTU0LjA2NSAxNjYuNDQ0QzE1My4zNTcgMTY1LjMyMyAxNTMuNDcgMTYzLjk0MyAxNTQuMzIyIDE2My4zMTdaIiBmaWxsPSIjNTJBNUVDIi8+Cjwvc3ZnPgo=",Zte="",YK={data(){return{title:"We're Sorry",message:"An error has occurred. Please try again. If the problem persists, please contact your administrator."}}};var QK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"simple-error-message-main"},[e._m(0),r("p",[r("span",{staticClass:"simple-error-message-title"},[e._v(" "+e._s(e.$t(e.title))+" ")])]),r("p",[r("span",{staticClass:"simple-error-message-message"},[e._v(e._s(e.$t(e.message)))])])])},KK=[function(){var t=this,e=t._self._c;return e("p",[e("img",{staticClass:"simple-error-message-icon",attrs:{src:HK}})])}],JK=oe(YK,QK,KK,!1,null,null,null,null);const ZK={components:{simpleErrorMessage:JK.exports,VueFormRenderer:Gi},props:{initialTaskId:{type:Number,default:null},initialScreenId:{type:Number,default:null},initialRequestId:{type:Number,default:null},initialProcessId:{type:Number,default:null},initialNodeId:{type:String,default:null},userId:{type:Number,default:null},csrfToken:{type:String,default:null},value:{type:Object,default:()=>{}},beforeLoadTask:{type:Function,default:()=>new Promise(t=>{t()})},initialLoopContext:{type:String,default:""},taskPreview:{type:Boolean,default:!1},loading:{type:Number,default:null}},data(){return{task:null,taskId:null,request:null,requestId:null,screen:null,screenId:null,renderComponent:"task-screen",processId:null,nodeId:null,disabled:!1,socketListeners:[],requestData:{},hasErrors:!1,refreshScreen:0,redirecting:null,loadingButton:!1}},watch:{initialScreenId:{handler(){this.screenId=this.initialScreenId}},initialTaskId:{handler(){this.taskId=this.initialTaskId}},initialRequestId:{handler(){this.requestId=this.initialRequestId}},initialProcessId:{handler(){this.processId=this.initialProcessId}},initialNodeId:{handler(){this.nodeId=this.initialNodeId}},screenId:{handler(){this.screenId&&this.loadScreen(this.screenId)}},taskId:{handler(){this.taskId&&(!this.task||this.task.id!==this.taskId)&&this.loadTask()}},requestId:{handler(){this.requestId?(this.setMetaValue(),this.initSocketListeners()):this.unsubscribeSocketListeners()}},task:{handler(){this.screen||(this.screen=this.task&&this.task.interstitial_screen),this.taskId=this.task.id,this.nodeId=this.task.element_id,this.listenForParentChanges(),this.task.process_request.status==="COMPLETED"&&(this.taskPreview||this.$emit("completed",this.task.process_request.id)),this.taskPreview&&this.task.status==="CLOSED"&&(this.task.interstitial_screen._interstitial=!1,this.task.screen.config=this.disableForm(this.task.screen.config),this.screen=this.task.screen)}},value:{handler(){this.requestData=this.value}},screen:{handler(){if(this.screen&&this.renderComponent!=="ConversationalForm")if(this.screen.type==="CONVERSATIONAL")this.renderComponent="ConversationalForm";else{const t=H.get(this.screen,"_interstitial",!1);let e=H.get(this,"task.component","task-screen");(e===null||t)&&(e="task-screen"),this.renderComponent=e}}}},computed:{shouldAddSubmitButton(){return this.task?this.task.bpmn_tag_name==="manualTask"||!this.task.screen&&this.task.element_type!=="startEvent":!1},showTaskIsCompleted(){return this.task&&this.task.advanceStatus==="completed"&&!this.screen},screenTypeClass(){return this.screen?this.screen.type.toLowerCase()+"-screen":void 0},parentRequest(){return H.get(this.task,"process_request.parent_request_id",null)}},methods:{disableForm(t){if(t instanceof Array)for(let e of t)e.component==="FormButton"&&e.config.event==="submit"?t.splice(t.indexOf(e),1):this.disableForm(e);return t.config!==void 0&&(t.config.disabled=!0),t.items!==void 0&&this.disableForm(t.items),t},showSimpleErrorMessage(){this.renderComponent="simpleErrorMessage"},loadScreen(t){let e="?include=nested";this.requestId&&(e+="&request_id="+this.requestId),this.$dataProvider.getScreen(t,e).then(r=>{this.screen=r.data})},reload(){this.taskId?this.loadTask():this.loadNextAssignedTask()},loadTask(){const t=`/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission`;return window.ProcessMaker&&window.ProcessMaker.packages&&window.ProcessMaker.packages.includes("package-vocabularies")&&(window.ProcessMaker.VocabulariesSchemaUrl=`vocabularies/task_schema/${this.taskId}`),this.beforeLoadTask(this.taskId,this.nodeId).then(()=>{this.$dataProvider.getTasks(t).then(e=>{if(this.task=e.data,this.checkTaskStatus(),window.PM4ConfigOverrides&&window.PM4ConfigOverrides.getScreenEndpoint&&window.PM4ConfigOverrides.getScreenEndpoint.includes("tasks/")){const r=window.PM4ConfigOverrides.getScreenEndpoint.split("/");r[1]=this.task.id,window.PM4ConfigOverrides.getScreenEndpoint=r.join("/")}}).catch(()=>{this.hasErrors=!0})})},prepareTask(){(!this.loadingButton||this.task.status==="ACTIVE")&&(this.resetScreenState(),this.requestData=H.get(this.task,"request_data",{}),this.loopContext=H.get(this.task,"loop_context",""),this.task.draft&&(this.requestData=H.merge({},this.requestData,this.task.draft.data)),this.refreshScreen++),this.$emit("task-updated",this.task),this.task.process_request.status==="ERROR"?(this.hasErrors=!0,this.$emit("error",this.requestId)):this.hasErrors=!1},resetScreenState(){this.loadingButton=!1,this.disabled=!1,this.$refs.renderer&&this.$refs.renderer.$children[0]&&(this.$refs.renderer.$children[0].currentPage=0,this.$refs.renderer.restartValidation())},checkTaskStatus(){this.task.status=="COMPLETED"||this.task.status=="CLOSED"||this.task.status=="TRIGGERED"?this.closeTask():this.screen=this.task.screen,this.prepareTask()},disableForSelfService(){this.$nextTick(()=>{window.ProcessMaker.isSelfService?this.disabled=!0:this.disabled=!1})},closeTask(t=null){if(this.hasErrors){this.$emit("error",this.requestId);return}this.task.process_request.status==="COMPLETED"?this.loadNextAssignedTask(t):this.loadingButton?this.loadNextAssignedTask(t):this.task.allow_interstitial?(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen,this.loadNextAssignedTask(t)):this.taskPreview||this.$emit("closed",this.task.id)},loadNextAssignedTask(t=null){t||(t=this.requestId);const e=window.Cypress?"":`&t=${Date.now()}`,r=`?user_id=${this.userId}&status=ACTIVE&process_request_id=${t}&include_sub_tasks=1${e}`;return this.$dataProvider.getTasks(r).then(a=>{if(a.data.data.length>0){let i=a.data.data[0];if(i.process_request_id!==this.requestId){if(this.redirecting===i.process_request_id)return;this.unsubscribeSocketListeners(),this.redirecting=i.process_request_id,this.$emit("redirect",i.id,!0);return}else this.emitIfTaskCompleted(t);this.taskId=i.id,this.nodeId=i.element_id}else this.parentRequest&&["COMPLETED","CLOSED"].includes(this.task.process_request.status)&&this.$emit("completed",this.getAllowedRequestId())})},emitIfTaskCompleted(t){this.task&&this.parentRequest&&t==this.task.process_request_id&&this.task.process_request.status==="COMPLETED"&&this.$emit("completed",this.parentRequest)},classHeaderCard(t){let e="bg-success";switch(t){case"completed":e="bg-secondary";break;case"overdue":e="bg-danger";break}return"card-header text-capitalize text-white "+e},submit(t=null,e=!1,r=null){this.disabled||(this.disabled=!0,t&&this.onUpdate(Object.assign({},this.requestData,t)),e?this.loadingButton=!0:this.loadingButton=!1,this.$emit("submit",this.task,e,r),this.task&&this.task.allow_interstitial&&!this.loadingButton&&(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen))},onUpdate(t){this.$emit("input",t),this.disableForSelfService()},activityAssigned(){},processCompleted(){let t;this.parentRequest&&(t=this.getAllowedRequestId(),this.$emit("completed",t)),t!==this.requestId&&this.$emit("completed",this.requestId)},getAllowedRequestId(){const e=(this.task.user_request_permission||[]).find(a=>a.process_request_id===this.parentRequest);return e&&e.allowed?this.parentRequest:this.requestId},processUpdated:H.debounce(function(t){(t.event==="ACTIVITY_COMPLETED"||t.event==="ACTIVITY_ACTIVATED")&&this.reload(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)},300),initSocketListeners(){this.addSocketListener(`completed-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessCompleted",t=>{this.processCompleted(t)}),this.addSocketListener(`updated-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessUpdated",t=>{this.processUpdated(t)}),this.taskId||this.reload()},listenForParentChanges(){this.parentRequest&&this.addSocketListener(`parent-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.parentRequest}`,".ProcessUpdated",t=>{["ACTIVITY_ACTIVATED"].includes(t.event)&&this.closeTask(this.parentRequest),["ACTIVITY_COMPLETED"].includes(t.event)&&this.task.process_request.status==="COMPLETED"&&this.processCompleted(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)})},addSocketListener(t,e,r,a){t in this.socketListeners||(this.socketListeners[t]={channel:e,event:r},window.Echo.private(e).listen(r,i=>{a(i)}))},unsubscribeSocketListeners(){Object.values(this.socketListeners).forEach(t=>{window.Echo.private(t.channel).stopListening(t.event)}),this.socketListeners={}},obtainPayload(t){return new Promise(e=>{window.ProcessMaker.apiClient.get(t).then(r=>{e(r.data)}).catch(()=>{})})},setMetaValue(){const t=document.head.querySelector('meta[name="request-id"]');t&&t.setAttribute("content",this.requestId)}},mounted(){this.screenId=this.initialScreenId,this.taskId=this.initialTaskId,this.requestId=this.initialRequestId,this.processId=this.initialProcessId,this.nodeId=this.initialNodeId,this.requestData=this.value,this.loopContext=this.initialLoopContext},destroyed(){this.unsubscribeSocketListeners()}};var XK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"tab-pane active show h-100",attrs:{id:"tab-form",role:"tabpanel","aria-labelledby":"tab-form"}},[e.screen?[r("b-overlay",{attrs:{show:e.disabled,id:"overlay-background",variant:"white",cardStyles:"pointer-events: none;pointer-events: none;inset: 1px",rounded:"sm"},scopedSlots:e._u([{key:"overlay",fn:function(){return[r("div",{staticClass:"text-center"},[r("p",[e._v("Please claim this task to continue.")])])]},proxy:!0}],null,!1,2499821482)},[r("div",{staticClass:"card card-body border-top-0 h-100",class:e.screenTypeClass},[e.renderComponent==="task-screen"?r("div",[r("vue-form-renderer",{key:e.refreshScreen,ref:"renderer",attrs:{config:e.screen.config,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,"loop-context":e.loopContext},on:{update:e.onUpdate,submit:e.submit},model:{value:e.requestData,callback:function(a){e.requestData=a},expression:"requestData"}})],1):r("div",[r(e.renderComponent,{tag:"component",attrs:{"process-id":e.processId,"instance-id":e.requestId,"token-id":e.taskId,screen:e.screen.config,"csrf-token":e.csrfToken,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,data:e.requestData,type:e.screen.type},on:{submit:e.submit}})],1)]),e.shouldAddSubmitButton?r("div",{staticClass:"card-footer"},[r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(a){return e.submit(null)}}},[e._v(" "+e._s(e.$t("Complete Task"))+" ")])]):e._e()])]:e._e(),e.showTaskIsCompleted?[r("div",{staticClass:"card card-body text-center"},[r("h1",[e._v(" "+e._s(e.$t("Task Completed"))+" "),r("i",{staticClass:"fas fa-clipboard-check"})])])]:e._e()],2)},eJ=[],tJ=oe(ZK,XK,eJ,!1,null,null,null,null);const Xx=tJ.exports,tre="",rJ={name:"Loop",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors?this.validationErrors.some(({item:e})=>e===t):!1},inspect(t){this.$emit("inspect",t)},deleteItem(t){this.items.splice(t,1),this.$emit("update-state")},duplicateItem(t){const e=H.cloneDeep(this.items[t]);this.items.push(e),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.component==="AiSection"&&e===r.config.aiConfig.nonce&&this.$set(r,"items",JSON.parse(JSON.stringify(t)))})},updateProgress(t,e){this.value.forEach(r=>{if(r.component==="AiSection"&&e===r.config.aiConfig.nonce){if(this.cancelledJobs.some(a=>a===e))return;this.$set(r.config.aiConfig,"progress",t)}})}}};var aJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"column-draggable",attrs:{selector:e.config.customCssSelector}},[r("draggable",{staticStyle:{"min-height":"80px"},attrs:{list:e.items,group:"controls"}},e._l(e.items,function(a,i){return r("div",{key:i,staticClass:"control-item",class:{selected:e.selected===a,hasError:e.hasError(a)},on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[a.container?r("div",{on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(a)&&e.selected===a}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(a)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(a)&&e.aiPreview(a)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(n){return e.applyAiChanges(a)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(a)&&e.aiPreview(a)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(i)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(a),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":a,config:a.config},on:{inspect:e.inspect,"update-state":function(n){return e.$emit("update-state")}},model:{value:a.items,callback:function(n){e.$set(a,"items",n)},expression:"element.items"}})],1)]):r("div",{attrs:{id:a.config.name?a.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===a}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(i)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(a),{"prevent-interaction":!a.config.interactive}],attrs:{tabindex:a.config.interactive?0:-1,config:a.config},on:{input:function(n){a.config.interactive&&(a.config.content=n)}}},"component",a.config,!1))],1)])])}),0)],1)},iJ=[],nJ=oe(rJ,aJ,iJ,!1,null,"06c4d69f",null,null);const ek=nJ.exports,rre="",sJ=1,oJ={name:"MultiColumn",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},computed:{classContainer(){return this.items.length>0?"form-group":"column-draggable"}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)},"config.options":function(t){this.items=t.map((e,r)=>this.items[r]?this.items[r]:[])}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors.some(({item:e})=>e===t)},updateContainerConfig(t,e){this.items[e]=t,this.$emit("update-state")},classColumn(t){let e=sJ;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e}`},inspect(t){this.$emit("inspect",t)},deleteItem(t,e){this.items[t].splice(e,1),this.$emit("update-state")},duplicateItem(t,e){const r=H.cloneDeep(this.items[t][e]);this.items[t].push(r),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.forEach(a=>{a.component==="AiSection"&&e===a.config.aiConfig.nonce&&this.$set(a,"items",JSON.parse(JSON.stringify(t)))})})},updateProgress(t,e){this.value.forEach(r=>{r.forEach(a=>{if(a.component==="AiSection"&&e===a.config.aiConfig.nonce){if(this.cancelledJobs.some(i=>i===e))return;this.$set(a.config.aiConfig,"progress",t)}})})}}};var lJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"mb-1 mt-1 pb-0 pt-0",class:e.classContainer},[r("div",{attrs:{selector:e.config.customCssSelector}},[r("div",{staticClass:"row"},[e._l(e.items,function(a,i){return[r("draggable",{key:i,staticClass:"column-draggable",class:e.classColumn(i),attrs:{value:e.items[i],group:"controls"},on:{input:function(n){return e.updateContainerConfig(n,i)}},model:{value:e.items[i],callback:function(n){e.$set(e.items,i,n)},expression:"items[index]"}},e._l(a,function(n,s){return r("div",{key:s,staticClass:"control-item",class:{selected:e.selected===n,hasError:e.hasError(n)},on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[n.container?r("div",{on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(n)&&e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(n)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(n)&&e.aiPreview(n)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(o){return e.applyAiChanges(n)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(n)&&e.aiPreview(n)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"aria-label":e.$t("Duplicate")},on:{click:function(o){return e.duplicateItem(i,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(i,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(n),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":n,config:n.config},on:{inspect:e.inspect,"update-state":function(o){return e.$emit("update-state")}},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}})],1)]):r("div",{attrs:{id:n.config.name?n.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(o){return e.duplicateItem(i,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(i,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(n),{"prevent-interaction":!n.config.interactive}],attrs:{tabindex:n.config.interactive?0:-1,config:n.config},on:{input:function(o){n.config.interactive&&(n.config.content=o)}}},"component",n.config,!1))],1)])])}),0)]})],2)])])},uJ=[],cJ=oe(oJ,lJ,uJ,!1,null,"eaf6f1c4",null,null);const tk=cJ.exports,dJ={name:"default-loading-spinner"};var pJ=function(){var e=this,r=e._self._c;return r("div",[e._v("Loading Data...")])},fJ=[],hJ=oe(dJ,pJ,fJ,!1,null,null,null,null);const rk=hJ.exports,mJ=!0;function vu(t){let e=0;return typeof t!="object"||Object.entries(t).forEach(([r,a])=>{if(a){if(typeof a=="object"&&"$each"in a){e+=vu(a.$each.$iter);return}r!=="$iter"&&typeof a=="object"&&"$invalid"in a&&a.$invalid&&Number.isNaN(Number(r))&&e++,r!=="$iter"&&a&&(e+=vu(a))}}),e}const ak=async(t,e)=>{if(t.length===0)return;const r=ch(t[0]),a=[];t.forEach(n=>{r!==n&&a.push(n.loadValidationRules())}),await Promise.all(a);try{await r.loadValidationRules()}catch(n){console.warn("There was a problem rendering the screen",n)}const i=r.$v;if(i){let n=0,s="";i.$invalid&&(n+=vu(i.vdata),n+=vu(i.schema),s=n===1?"There is a validation error in your form.":"There are {{items}} validation errors in your form.",s=r.$t(s,{items:n})),e("basic",{key:"valid",value:!i.$invalid}),e("basic",{key:"message",value:s})}},gJ=async(t,e)=>{t("basic",{key:"valid",value:!e.value}),t("disableSubmit",{key:"disableSubmit",value:e.value})},vJ=H.debounce(ak,500),bu=[],bJ=(t,e)=>{bu.includes(t)||bu.push(t),vJ(bu,e)},ik={namespaced:mJ,state:()=>({locked:!1,valid:!0,message:"",mode:"",submitted:!1,showValidationOnLoad:!1,disableSubmit:!1}),getters:{isValidScreen(t){return t.valid},getErrorMessage(t){return t.message},getMode(t){return t.mode},showValidationErrors(t){return t.showValidationOnLoad||t.submitted}},mutations:{basic(t,e){t[e.key]=e.value},setMode(t,e){t.mode=e},disableSubmit(t,e){t.disableSubmit=e.value,t.message=e.message}},actions:{restartValidation(){bu.length=0},validate({commit:t},e){bJ(e,t)},async validateNow({commit:t},e){await ak([e],t)},close({commit:t}){t("basic",{key:"valid",value:!0})},hasSubmitted({commit:t},e){t("basic",{key:"submitted",value:e})},showValidationOnLoad({commit:t},e){t("basic",{key:"showValidationOnLoad",value:e})},async disableSubmitOnPhotoVideoUpload({commit:t},e){await gJ(t,e)}}},yu={namespaced:!0,state(){return{stack:[],position:null}},getters:{canUndo(t){return t.position>0},canRedo(t){return t.position<t.stack.length-1},currentState(t,e){const r=t.stack[t.position];return e.nextState&&e.nextState.deletedPage&&(r.currentPage=e.nextState.currentPage),r},nextState(t,e){return e.canRedo?t.stack[t.position+1]:!1}},mutations:{setPosition(t,e){t.position=e},setState(t,e){t.stack.push(e)}},methods:{emitChanges(){window.ProcessMaker.EventBus.$emit("screen-change")}},actions:{pushState({state:t,getters:e,commit:r},a){a.config!==e.currentState&&(r("setState",a),r("setPosition",t.stack.length-1),yu.methods.emitChanges())},undo({state:t,getters:e,commit:r}){e.canUndo&&(r("setPosition",t.position-1),yu.methods.emitChanges())},redo({state:t,getters:e,commit:r}){e.canRedo&&(r("setPosition",t.position+1),yu.methods.emitChanges())}}},are="",yJ={props:{placeholder:{type:String},value:{type:String}},data(){return{query:""}},watch:{query(t){this.$emit("input",t)}},methods:{runSearch(t){this.$emit("submit",this.query)}},mounted(){this.query=this.value}};var SJ=function(){var e=this,r=e._self._c;return r("div",{staticClass:"basic-search"},[r("div",{staticClass:"d-flex"},[r("div",{staticClass:"flex-grow-1"},[r("div",{staticClass:"search-bar-basic d-flex w-100"},[r("div",{staticClass:"search-bar-inputs flex-grow w-100"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.query,expression:"query"}],ref:"search_input",staticClass:"search-bar-manual-input form-control",attrs:{type:"text",placeholder:e.placeholder?e.placeholder:e.$t("Search"),"data-cy":"watchers-table-search"},domProps:{value:e.query},on:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.runSearch.apply(null,arguments)},input:function(a){a.target.composing||(e.query=a.target.value)}}})]),r("div",{staticClass:"search-bar-actions d-flex flex-shrink"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn-search-run",attrs:{variant:"primary",title:e.$t("Search")},on:{click:e.runSearch}},[r("i",{staticClass:"fas fa-search",attrs:{"data-cy":"watchers-table-search-button"}})])],1)])]),r("div",{staticClass:"search-bar-buttons"},[e._t("buttons")],2)])])},xJ=[],kJ=oe(yJ,SJ,xJ,!1,null,"d660c896",null,null);const nk=kJ.exports,ire="",_J={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a},mixins:[nc],props:["value"],data(){return{required:!0,numberItem:0,displayList:!0,ruleDescription:"",ruleFormula:"",rulePropName:"",editorInvalid:!1,existsProperty:!1,current:[],add:{id:0,name:"",property:"",type:"expression",formula:""},css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Property Name"),key:"property"},{label:this.$t("Description"),key:"name"},{key:"__actions",label:"",class:"text-right"}],monacoOptions:{automaticLayout:!0,lineNumbers:"off",minimap:!1},monacoEditor:null,errors:{}}},computed:{javascriptTypeClass(){const{isJS:t}=this;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},expressionTypeClass(){const t=!this.isJS;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},isJS(){return this.add.type==="javascript"}},watch:{value(){this.value.forEach(t=>{this.numberItem++,t.id=this.numberItem}),this.current=this.value}},created(){Lt.register("exists-property",()=>{let t=!0;return this.current.forEach(e=>{e.property===this.add.property&&e.id!==this.add.id&&(t=!1)}),t},this.$t("Property already exists"))},methods:{switchExpressionType(t){this.add.type=t},show(){this.$refs.modal.show()},emptyForm(){this.add.id=0,this.add.name="",this.add.property="",this.add.type="expression",this.add.formula="",this.editorInvalid=!1,this.existsProperty=!1,this.ruleDescription="",this.ruleFormula="",this.rulePropName=""},displayTableList(){this.emptyForm(),this.displayList=!0},displayFormProperty(){this.emptyForm(),this.displayList=!1},validateData(){this.errors=[];const t={property:"required|exists-property",name:"required",formula:"required"},e={property:this.add.property,name:this.add.name,formula:this.add.formula},r=new Lt(e,t),a=r.passes();this.errors=Object.fromEntries(Object.keys(r.errors.all()).map(i=>[i,r.errors.first(i)])),a?this.saveProperty():this.focusFirstCalculatedPropertiesError()},saveProperty(){this.add.id===0?(this.numberItem++,this.current.push({id:this.numberItem,property:this.add.property,name:this.add.name,formula:this.add.formula,type:this.add.type})):this.current.forEach(t=>{t.id===this.add.id&&(t.name=this.add.name,t.property=this.add.property,t.formula=this.add.formula,t.type=this.add.type)}),this.$emit("input",this.current),this.displayTableList()},editProperty(t){this.add.id=t.id,this.add.name=t.name,this.add.property=t.property,this.add.type=t.type?t.type:"expression",this.add.formula=t.formula,this.displayList=!1},deleteProperty(t){this.current=this.current.filter(e=>e.id!==t.id),this.$emit("input",this.current),this.displayTableList()},editorMounted(t){this.monacoEditor=t}}};var wJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{id:"computed-properties",size:"lg",title:e.$t("Calculated Properties"),"content-class":"p-3","header-class":"m-0 p-0 mb-3","body-class":"m-0 p-0","title-class":"m-0","footer-class":"m-0 p-0","no-close-on-backdrop":"","header-close-content":"&times;","data-cy":"calcs-modal"},on:{hidden:e.displayTableList}},[e.displayList?[r("div",{staticClass:"d-flex align-items-end flex-column mb-3"},[r("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-cy":"calcs-add-property"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Property"))+" ")])]),r("div",{staticClass:"card card-body table-card"},[r("b-table",{attrs:{css:e.css,fields:e.fields,items:e.current,"empty-text":e.$t("No Data Available"),"data-cy":"calcs-table"},scopedSlots:e._u([{key:"cell(__actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"calcs-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"calcs-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}],null,!1,3545130899)})],1),r("template",{slot:"modal-footer"},[r("span")])]:[r("required"),r("form-input",{ref:"property",staticClass:"mb-3",attrs:{label:e.$t("Property Name")+" *",name:"property",error:e.errors.property,"data-cy":"calcs-property-name",required:"","aria-required":"true"},model:{value:e.add.property,callback:function(a){e.$set(e.add,"property",a)},expression:"add.property"}}),r("form-text-area",{ref:"name",staticClass:"mb-3",attrs:{label:e.$t("Description")+" *",name:"name",error:e.errors.name,"data-cy":"calcs-property-description",required:"","aria-required":"true"},model:{value:e.add.name,callback:function(a){e.$set(e.add,"name",a)},expression:"add.name"}}),r("div",{staticClass:"form-group mb-3",staticStyle:{position:"relative"}},[r("label",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}]},[e._v(e._s(e.$t("Formula")+" *"))]),r("div",{staticClass:"float-right"},[r("a",{staticClass:"btn btn-sm",class:e.expressionTypeClass,attrs:{"data-cy":"calcs-switch-formula"},on:{click:function(a){return e.switchExpressionType("expression")}}},[r("i",{staticClass:"fas fa-square-root-alt"})]),r("a",{staticClass:"btn btn-sm",class:e.javascriptTypeClass,attrs:{"data-cy":"calcs-switch-javascript"},on:{click:function(a){return e.switchExpressionType("javascript")}}},[r("i",{staticClass:"fab fa-js-square"})])]),r("form-text-area",{directives:[{name:"show",rawName:"v-show",value:!e.isJS,expression:"!isJS"}],ref:"formula",attrs:{rows:"5",label:e.$t("Formula")+" *",name:"formula",error:e.errors.formula,"data-cy":"calcs-property-formula",required:"","aria-required":"true"},model:{value:e.add.formula,callback:function(a){e.$set(e.add,"formula",a)},expression:"add.formula"}}),r("div",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor-border",class:{"is-invalid":!!e.errors.formula}}),r("monaco-editor",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor",attrs:{options:e.monacoOptions,language:"javascript","data-cy":"calcs-property-javascript",required:"","aria-required":"true"},on:{editorDidMount:e.editorMounted},model:{value:e.add.formula,callback:function(a){e.$set(e.add,"formula",a)},expression:"add.formula"}}),e.isJS&&e.errors.formula?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.errors.formula))])]):e._e()],1),r("template",{slot:"modal-footer"},[r("div",{staticClass:"d-flex align-items-end"},[r("button",{staticClass:"btn btn-outline-secondary",attrs:{"data-cy":"calcs-button-cancel"},on:{click:e.displayTableList}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3",attrs:{"data-cy":"calcs-button-save"},on:{click:e.validateData}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])]],2)},CJ=[],TJ=oe(_J,wJ,CJ,!1,null,"5efce491",null,null);const AJ=TJ.exports,nre="",OJ={props:["value","cssErrors"],components:{MonacoEditor:_a},data(){return{saveValue:"",innerValue:"",monacoOptions:{language:"css",automaticLayout:!0,minimap:{enabled:!1}}}},watch:{innerValue(t){this.$emit("input",t)}},methods:{show(){this.innerValue=this.value,this.saveValue=this.value,this.$refs.modal.show()},close(){this.$refs.modal.hide()},hide(){this.innerValue=this.saveValue,this.$emit("input",this.innerValue)},save(){this.saveValue=this.innerValue,this.$refs.modal.hide()}}};var EJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"custom-css",title:e.$t("Custom CSS"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","no-close-on-backdrop":"","ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"header-close-content":"&times;"},on:{ok:e.save,cancel:e.close,hide:e.hide}},[r("p",[e._v(e._s(e.$t("You can set CSS Selector names in the inspector. Use them here with [selector='my-selector']")))]),r("div",{staticClass:"editor"},[r("monaco-editor",{staticClass:"monaco",attrs:{options:e.monacoOptions,"data-cy":"monaco-editor"},model:{value:e.innerValue,callback:function(a){e.innerValue=a},expression:"innerValue"}})],1),r("b-alert",{attrs:{show:e.cssErrors!="",variant:"danger"}},[r("pre",[e._v(e._s(e.cssErrors))])]),r("div",{attrs:{slot:"modal-cancel","data-cy":"cancel-button"},slot:"modal-cancel"},[e._v(e._s(e.$t("Cancel")))]),r("div",{attrs:{slot:"modal-ok","data-cy":"save-button"},slot:"modal-ok"},[e._v(e._s(e.$t("Save")))])],1)},MJ=[],$J=oe(OJ,EJ,MJ,!1,null,"3824b29b",null,null);const PJ=$J.exports,sre="",DJ=typeof window>"u"?global:window,IJ={name:"WatchersForm",components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,FormMultiSelect:ee.FormMultiSelect,FormCheckbox:ee.FormCheckbox,MonacoEditor:_a,DataMapping:Xp,OutboundConfig:af,ScreenVariableSelector:xx},mixins:[nc],props:{config:{type:Object,default(){return{name:"",watching:"",script:"",script_id:"",script_key:"",input_data:"{}",script_configuration:"{}",output_variable:"",synchronous:!1,run_onload:!1,show_async_loading:!1}}}},data(){return{scriptConfig:"",endpoint:null,endpoints:[],ruleWatcherName:"",ruleWatcherVariable:"",ruleWatcherScript:"",ruleWatcherOutputVariable:"",required:!0,inputDataInvalid:!1,scriptConfigurationInvalid:!1,scripts:[],script:null,monacoOptions:{automaticLayout:!0,lineNumbers:"on",minimap:{enabled:!1}},endpointError:null,inputDataEditor:null,scriptConfigEditor:null}},computed:{dataSourceLink(){const t=this.selectedDataSourceId(),e=this.endpoint;return t&&e?`/designer/data-sources/${t}/resources/${e}`:""},dataSourceConfigWarning(){const t=this.selectedDataSourceId(),e=this.scripts.find(a=>a.type==="Data Connectors");if(typeof e>"u"||e===null)return"";const r=e.items.find(a=>a.id===`data_source-${t}`);return typeof r>"u"||e===null?"":r.validationStatus.length>0?r.validationStatus:""},isDatasource(){return this.config.script&&this.config.script.id.substr(0,11)==="data_source"},isScript(){return!this.config.script||this.config.script.id.substr(0,6)==="script"},hasInputData(){let t;try{t=JSON.parse(this.config.script_configuration)}catch{return!1}return typeof t.input_data>"u"||t.input_data==null?!1:Object.keys(t.input_data).length===0&&t.input_data.constructor===Object},outputVarLabel(){const t=this.ruleWatcherOutputVariable=="required"?" *":"";return this.$t("Output Variable")+t}},watch:{scriptConfig(t){try{const e=JSON.parse(this.config.script_configuration),r=JSON.parse(t);this.config.script_configuration=JSON.stringify({...e,...r},null," ")}catch{}},endpoint(t){this.setConfig("endpoint",t);const e=this.scriptConfig?JSON.parse(this.scriptConfig):{},r=e.dataMapping||[],a=this.scripts.find(i=>i.items&&i.items.length>0&&i.items[0].id&&i.items[0].id.substr(0,11)==="data_source");if(a&&r.length===0){const i=a.items.find(s=>`data_source-${e.dataSource}`===s.id),n=(i.endpoints&&i.endpoints[t]?i.endpoints[t].dataMapping:[])||[];e.dataMapping=[],n.forEach(s=>{e.dataMapping.push({key:s.key,value:s.value})}),this.scriptConfig=JSON.stringify(e)}},config:{deep:!0,immediate:!0,handler(t){t.input_data||(t.input_data="{}"),t.script_configuration?this.scriptConfig=this.config.script_configuration:t.script_configuration="{}",this.endpoint=this.getConfig().endpoint}},"config.script":{handler(t,e){if(!t)this.config.script_id="",this.config.script_key="",this.config.datasource_script_id="";else if(typeof t=="object"){const r=t.id.split("-"),a=e&&e.id&&e.id.split("-").length>0?e.id.split("-")[0]:"";this.config.script_id=r[1],this.config.script_key=t.key,a!==r[0]&&(this.config.script_configuration="{}"),r[0]==="data_source"&&this.setConfig("dataSource",this.config.script_id),this.config.datasource_script_id=t.dataSourceScriptId}return t}}},methods:{selectedDataSourceId(){let t=null;try{t=JSON.parse(this.scriptConfig).dataSource}catch{t=null}return t},setValidations(){this.ruleWatcherName="required",this.ruleWatcherVariable="required",this.ruleWatcherScript="required",this.hasInputData&&(this.ruleWatcherOutputVariable="required")},getConfig(){try{return JSON.parse(this.config.script_configuration)}catch{return{}}},setConfig(t,e){const r=this.getConfig();JSON.stringify(r[t])!==JSON.stringify(e)&&(r[t]=e,this.config.script_configuration=JSON.stringify(r),this.scriptConfig=this.config.script_configuration)},loadEndpoints(){const t=this.config.script.id.substr(0,11)==="data_source"?this.config.script.id.substr(12):null;this.endpoints.splice(0),t&&window.ProcessMaker&&window.ProcessMaker.apiClient&&window.ProcessMaker.apiClient.get(`/data_sources/${t}`).then(e=>{for(const r in e.data.endpoints)this.endpoints.push(r)})},loadSources(){this.scripts=[],this.$root.$children[0].watchers_config.api.scripts.forEach(t=>{t(this.scripts)})},displayTableList(){this.$emit("display-list")},jsonIsValid(t){try{JSON.parse(this.config[t])}catch{return!1}return!0},isFormValid(){this.isDatasource&&!this.endpoint?this.endpointError=this.$t("Endpoint is required"):this.endpointError=null;for(const t in this.$refs)if(this.$refs[t]&&this.$refs[t].name&&this.$refs[t].validator&&this.$refs[t].validator.errorCount!==0)return!1;return!(!this.config.watching||!this.config.script||this.endpointError||!this.jsonIsValid("input_data")||!this.jsonIsValid("script_configuration"))},validateDataAndSave(){this.setValidations(),this.$nextTick(()=>{if(!this.isFormValid()){DJ.ProcessMaker.alert(this.$t("An error occurred. Check the form for errors in red text."),"danger"),this.focusFirstWatcherError();return}this.config.uid||(this.config.uid=H.uniqueId(new Date().getTime())),this.save()})},save(){this.$emit("save-form")},inputDataEditorMounted(t){this.inputDataEditor=t},scriptConfigEditorMounted(t){this.scriptConfigEditor=t}}};var zJ=function(){var e=this,r=e._self._c;return r("div",[r("div",{staticClass:"accordion",attrs:{id:"watcherAccordion"}},[r("div",{staticClass:"card card-overflow"},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherConfigButton",staticClass:"p-3 btn btn-link d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherConfig","data-cy":"watchers-accordion-configuration"}},[e._m(0),e._m(1)])])]),r("div",{staticClass:"collapse show",attrs:{id:"watcherConfig","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-input",{ref:"name",attrs:{label:e.$t("Watcher Name")+" *",name:e.$t("Watcher Name"),validation:e.ruleWatcherName,helper:e.$t("A name to describe this Watcher"),"data-cy":"watchers-watcher-name",required:"","aria-required":"true"},model:{value:e.config.name,callback:function(a){e.$set(e.config,"name",a)},expression:"config.name"}}),r("screen-variable-selector",{ref:"watching",attrs:{name:e.$t("Variable to Watch"),label:e.$t("Variable to Watch")+" *",validation:e.ruleWatcherVariable,helper:e.$t("Select the variable to watch on this screen or type any request variable name"),"data-cy":"watchers-watcher-variable"},model:{value:e.config.watching,callback:function(a){e.$set(e.config,"watching",a)},expression:"config.watching"}}),r("form-checkbox",{attrs:{name:e.$t("Run Synchronously"),label:e.$t("Run Synchronously"),toggle:!0,helper:e.$t("Wait for the Watcher to run before accepting more input"),"data-cy":"watchers-watcher-synchronous"},model:{value:e.config.synchronous,callback:function(a){e.$set(e.config,"synchronous",a)},expression:"config.synchronous"}}),r("form-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.config.synchronous,expression:"!config.synchronous"}],attrs:{name:e.$t("Show message while loading remote data"),label:e.$t("Show message while loading remote data"),toggle:!0,"data-cy":"watchers-watcher-show-loading"},model:{value:e.config.show_async_loading,callback:function(a){e.$set(e.config,"show_async_loading",a)},expression:"config.show_async_loading"}}),r("form-checkbox",{attrs:{name:e.$t("Run Watcher on Screen Load"),label:e.$t("Run watcher on Screen Load"),toggle:!0,"data-cy":"watchers-watcher-run-onload"},model:{value:e.config.run_onload,callback:function(a){e.$set(e.config,"run_onload",a)},expression:"config.run_onload"}})],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherSourceButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherSource","data-cy":"watchers-accordion-source"}},[e._m(2),e._m(3)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherSource","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-multi-select",{ref:"script",attrs:{name:e.$t("Source"),label:e.$t("Source")+" *",options:e.scripts,placeholder:e.$t("None"),multiple:!1,"show-labels":!1,searchable:!0,"option-value":"id","option-content":"title","group-values":"items","group-label":"type",validation:e.ruleWatcherScript,helper:e.$t("The source to access when this Watcher runs"),"data-cy":"watchers-watcher-source"},on:{open:e.loadSources},model:{value:e.config.script,callback:function(a){e.$set(e.config,"script",a)},expression:"config.script"}}),e.isScript?r("div",[e.config.script?r("b-alert",{attrs:{show:"",variant:"warning"}},[r("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.$t("Using watchers with Scripts can slow the performance of your screen."))+" ")]):e._e(),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{ref:"input_data",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},on:{editorDidMount:e.inputDataEditorMounted},model:{value:e.config.input_data,callback:function(a){e.$set(e.config,"input_data",a)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the script (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])]),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Script Configuration")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("script_configuration")}},[r("monaco-editor",{ref:"script_configuration",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-script_configuration"},on:{editorDidMount:e.scriptConfigEditorMounted},model:{value:e.config.script_configuration,callback:function(a){e.$set(e.config,"script_configuration",a)},expression:"config.script_configuration"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Configuration data for the script (valid JSON object, variables supported)")))]),e.scriptConfigurationInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(" "+e._s(e.$t("The Script Configuration field is required"))+" ")])]):e._e(),e.jsonIsValid("script_configuration")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])],1):e._e(),e.isDatasource?r("div",[r("div",{staticClass:"form-group"},[r("form-multi-select",{ref:"endpoint",attrs:{name:e.$t("Resource"),label:e.$t("Resource"),options:e.endpoints,placeholder:e.$t("Select a resource"),multiple:!1,"show-labels":!1,searchable:!0,"internal-search":!1,helper:e.$t("The Data Connector resource to access when this Watcher runs"),"data-cy":"watchers-watcher-endpoint"},on:{"search-change":e.loadEndpoints,open:function(a){return e.loadEndpoints()}},model:{value:e.endpoint,callback:function(a){e.endpoint=a},expression:"endpoint"}}),e.endpointError?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.endpointError))])]):e._e(),e.dataSourceConfigWarning.length>0?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.dataSourceConfigWarning))])]):e._e(),r("a",{directives:[{name:"show",rawName:"v-show",value:e.dataSourceLink.length>0,expression:"dataSourceLink.length > 0"}],staticClass:"link-primary",attrs:{href:e.dataSourceLink,target:"_blank"}},[e._v(" "+e._s(e.$t("Open Data Connector"))+" "),r("i",{staticClass:"ml-1 fas fa-external-link-alt"})])],1),e.hasInputData?e._e():r("outbound-config",{model:{value:e.scriptConfig,callback:function(a){e.scriptConfig=a},expression:"scriptConfig"}}),e.hasInputData?r("div",{staticClass:"form-group"},[e._m(4),r("div",{staticClass:"row pl-3 mt-1"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},model:{value:e.config.input_data,callback:function(a){e.$set(e.config,"input_data",a)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the Data Connector (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])]):e._e()],1):e._e()],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherOutputButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherOutput","data-cy":"watchers-accordion-output"}},[e._m(5),e._m(6)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherOutput","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[e.hasInputData||e.isScript?r("form-input",{ref:"propOutputVariableName",attrs:{label:e.outputVarLabel,name:e.$t("Output Variable"),helper:e.$t("The variable that will store the output of the Watcher"),validation:e.ruleWatcherOutputVariable,"data-cy":"watchers-watcher-output_variable",required:e.ruleWatcherOutputVariable=="required","aria-required":e.ruleWatcherOutputVariable=="required"},model:{value:e.config.output_variable,callback:function(a){e.$set(e.config,"output_variable",a)},expression:"config.output_variable"}}):e._e(),e.isDatasource?r("data-mapping",{model:{value:e.scriptConfig,callback:function(a){e.scriptConfig=a},expression:"scriptConfig"}}):e._e()],1)])])]),r("div",{staticClass:"d-flex justify-content-end mt-3"},[r("button",{staticClass:"btn btn-outline-secondary",attrs:{"data-cy":"watchers-button-cancel"},on:{click:function(a){return a.stopPropagation(),e.displayTableList.apply(null,arguments)}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3",attrs:{"data-cy":"watchers-button-save"},on:{click:e.validateDataAndSave}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])},LJ=[function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-cog"}),t._v(" Configuration")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-upload"}),t._v(" Source")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row pl-3"},[e("span",{staticClass:"text-danger"},[t._v(" * Deprecation Warning: Recreate the watcher to use the new format. Version 4.2 will not support Input Data as a JSON object. ")])])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-download"}),t._v(" Output")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])}],jJ=oe(IJ,zJ,LJ,!1,null,"60e1dcd1",null,null);const sk=jJ.exports,ore="",NJ={components:{BasicSearch:nk,FormInput:ee.FormInput,FormTextArea:ee.FormTextArea},props:{value:{type:Array,default(){return[]}}},data(){return{filter:"",css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Name"),key:"name",tdClass:"break-word"},{label:this.$t("Watching Variable"),key:"watching"},{label:this.$t("Output Variable"),key:"output_variable",tdClass:"break-word"},{label:this.$t("Source"),key:"script.title"},{key:"actions",label:""}]}},computed:{filtered(){const t=this.getValuesWithOutputVarsNames(this.value);if(!this.filter)return t;const e=[];return t.forEach(r=>{Object.keys(r).find(a=>typeof r[a]=="string"?r[a].indexOf(this.filter)>=0:!1)&&e.push(r)}),e}},methods:{search(){},displayFormProperty(){this.$emit("display-form")},editProperty(t){this.$emit("edit-form",t)},deleteProperty(t){this.$emit("delete-form",t)},getValuesWithOutputVarsNames(t){return t.map(r=>{let a=Object.assign({},r);if(a.script&&a.script.id&&a.script.id.substr(0,11)==="data_source"){let i=JSON.parse(a.script_configuration),n=i&&i.dataMapping?i.dataMapping.map(o=>o.key).join(", "):"";const s=50;a.output_variable=n.length>s?n.substr(0,s)+"...":n}return a})}}};var RJ=function(){var e=this,r=e._self._c;return r("div",[r("b-row",{staticClass:"mb-3"},[r("b-col",[r("basic-search",{on:{submit:e.search},model:{value:e.filter,callback:function(a){e.filter=a},expression:"filter"}},[r("template",{slot:"buttons"},[r("b-btn",{staticClass:"text-nowrap",attrs:{variant:"secondary","data-cy":"watchers-add-watcher"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Watcher"))+" ")])],1)],2)],1)],1),r("div",{staticClass:"card card-body table-card watchers-list"},[r("b-table",{attrs:{items:e.filtered,fields:e.fields,"empty-text":e.$t("No Data Available"),"data-cy":"watchers-table","sort-icon-left":""},scopedSlots:e._u([{key:"cell(actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"watchers-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"watchers-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}])})],1),r("template",{slot:"modal-footer"},[r("span")])],2)},FJ=[],qJ=oe(NJ,RJ,FJ,!1,null,null,null,null);const ok=qJ.exports,lk=typeof window>"u"?global:window,BJ={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a,WatchersList:ok,WatchersForm:sk},props:["value"],data(){return{enableList:!0,current:[],add:{uid:"",name:"",variable:"",script_id:"",script_key:"",input_data:"",script_configuration:"",synchronous:!1}}},watch:{value:{handler(t){this.current=t}}},computed:{},methods:{show(){this.$refs.modal.show()},displayList(){this.add={},this.enableList=!0},displayForm(){this.add={},this.enableList=!1},save(){let t=this.$t("Watcher Saved"),e=this.current.findIndex(r=>r.uid===this.add.uid);e===-1?this.current.push(this.add):(t=this.$t("Watcher Updated"),this.current[e]=this.add),this.showAlert(t),this.$emit("input",this.current),this.displayList()},edit(t){this.displayForm(),this.$set(this,"add",H.cloneDeep(t))},confirmRemoval(t){lk.ProcessMaker.confirmModal(this.$t("Caution!"),this.$t("Are you sure you want to delete the Watcher?"),"",()=>{this.remove(t)})},remove(t){this.current=this.current.filter(e=>e.uid!==t.uid),this.$emit("input",this.current),this.showAlert(this.$t("Watcher deleted")),this.displayList()},showAlert(t){lk.ProcessMaker.alert(t,"success")}}};var WJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"watchers-popup",title:e.$t("Watchers"),"hide-footer":"","header-close-content":"&times;","no-close-on-backdrop":"","data-cy":"watchers-modal"},on:{hidden:e.displayList}},[e.enableList?[r("watchers-list",{on:{"display-form":e.displayForm,"edit-form":e.edit,"delete-form":e.confirmRemoval},model:{value:e.current,callback:function(a){e.current=a},expression:"current"}})]:[r("required"),r("watchers-form",{attrs:{refs:"form",config:e.add},on:{"display-list":e.displayList,"save-form":e.save}})]],2)},VJ=[],UJ=oe(BJ,WJ,VJ,!1,null,null,null,null);const GJ=UJ.exports,lre="",HJ={...Cs,FormMultiColumn:mu};function YJ(t){let e=t.$parent;for(;e;){if(e.$options.name==="ScreenContent")return e;e=e.$parent}return null}const QJ={install(t){if(t._processMakerVueFormBuilderInstalled)return;t._processMakerVueFormBuilderInstalled=!0,t.component("AddLoopRow",Hu),t.component("FormImage",Jn),t.component("FormAvatar",yn),t.component("FormLoop",xs),t.component("FormMultiColumn",mu),t.component("FormNestedScreen",ks),t.component("FormRecordList",fu),t.component("Loop",ek),t.component("MultiColumn",tk),t.component("NewFormMultiColumn",Yp),t.component("ScreenRenderer",yx),t.component("Task",Xx),t.component("VueFormBuilder",Vx),t.component("VueFormRenderer",Gi),t.component("DefaultLoadingSpinner",rk),t.use(ee),t.component("FormButton",qa),t.component("FileUpload",bn),t.component("FileDownload",Xs),t.component("FormAnalyticsChart",ws),t.component("FormMaskedInput",Ba),t.use(Cl),t.use(Pt),t.component("FormListTable",_s);const e=new Pt.Store({modules:{globalErrorsModule:ik,undoRedoModule:yu}});t.mixin({store:e}),t.mixin({methods:{getScreenDataReference(r=null,a=null){return YJ(this).getDataReference(r,a)}}})}};function KJ(t,e){t.defaults.adapter=Wv(t.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new xl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})})}K.AddLoopRow=Hu,K.AnalyticsSelector=jx,K.BasicSearch=nk,K.CollectionSelectList=Zp,K.ColorSelect=_x,K.ColumnSetup=wx,K.ComputedProperties=AJ,K.ContainerColumns=Cx,K.Currencies=WH,K.CurrentPageProperty=ac,K.CustomCSS=PJ,K.DataFormatProperty=Zx,K.DataMapping=Xp,K.DataReference=uh,K.DataTypeBooleanProperty=UK,K.DataTypeDateTimeProperty=Jx,K.DataTypeProperty=Kx,K.DataTypeWithoutDateProperty=VK,K.DefaultLoadingSpinner=rk,K.DefaultValueEditor=ef,K.DeviceDetector=ph,K.DeviceVisibility=ed,K.EditOption=Tx,K.FileDownload=Xs,K.FileUpload=bn,K.FormAnalyticsChart=ws,K.FormAvatar=yn,K.FormBuilderControls=GK,K.FormButton=qa,K.FormImage=Jn,K.FormInputMasked=Ba,K.FormListTable=_s,K.FormLoop=xs,K.FormMaskedInput=Ba,K.FormMultiselect=tf,K.FormNestedScreen=ks,K.FormRecordList=fu,K.FormRecordListStatic=Sx,K.FormRequests=Jp,K.FormTasks=Kp,K.FormText=hu,K.HasColorProperty=gn,K.ImageUpload=Ax,K.ImageVariable=Ox,K.InputVariable=rf,K.Json2Vue=ib,K.LabelSubmitButton=Lx,K.LabelSubmitButtonProperty=iv,K.LoadingSubmitButton=zx,K.LoadingSubmitButtonProperty=av,K.Loop=ek,K.LoopInspector=Ex,K.MultiColumn=tk,K.MultipleUploadsCheckbox=Bx,K.MustacheHelper=Hi,K.NewFormMultiColumn=Yp,K.OptionsList=Mx,K.OutboundConfig=af,K.PageSelect=$x,K.RequiredCheckbox=qx,K.ScreenBase=ad,K.ScreenRendererError=Gp,K.ScreenSelector=Px,K.SelectDataTypeMask=nf,K.Task=Xx,K.Tooltip=Xc,K.ValidationMsg=il,K.ValidationSelect=Ix,K.VariableNameGenerator=Fx,K.VisibilityRule=nv,K.VueFormBuilder=Vx,K.VueFormRenderer=Gi,K.WatchersForm=sk,K.WatchersList=ok,K.WatchersPopup=GJ,K.WatchersSynchronous=bx,K.accordions=Rx,K.bgcolorProperty=la,K.buttonLabelProperty=Xg,K.buttonTypeEvent=tv,K.buttonVariantStyleProperty=rd,K.canOpenJsonFile=L_,K.colorProperty=ua,K.computedFields=sh,K.dataSourceValues=ea,K.dataSources=Ts,K.datatable=ic,K.default=QJ,K.defaultValueProperty=Rn,K.defaultValues=Pw,K.deviceVisibilityProperty=$q,K.disabledProperty=td,K.focusErrors=nc,K.formTypes=As,K.formWatchers=YE,K.getValidPath=$c,K.globalErrorsModule=ik,K.globalProperties=CQ,K.helperTextProperty=Si,K.initializeScreenCache=KJ,K.inspector=Nx,K.javascriptReservedKeywords=rl,K.keyNameProperty=Yt,K.labelProperty=Br,K.multiselectApi=nb,K.mustacheEvaluation=Md,K.placeholderProperty=Nn,K.readonlyProperty=al,K.renderer=HJ,K.shouldElementBeVisible=sb,K.testing=lb,K.toggleStyleProperty=ev,K.tooltipProperty=rv,K.validationRulesProperty=Ra,K.validators=nl,K.watchers=sv,Object.defineProperties(K,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
345
345
  //# sourceMappingURL=vue-form-builder.umd.js.map