@unvired/turboforms-embed-sdk 2.0.87 → 2.0.89

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.
@@ -27590,6 +27590,78 @@ span[role=link] {
27590
27590
  background: #f1f5f9;
27591
27591
  color: #1e293b;
27592
27592
  }
27593
+ #sdc-form-loader,
27594
+ .sdc-modal-overlay {
27595
+ position: fixed;
27596
+ top: 0;
27597
+ left: 0;
27598
+ width: 100%;
27599
+ height: 100%;
27600
+ background-color: rgba(15, 23, 42, 0.45);
27601
+ backdrop-filter: blur(5px);
27602
+ -webkit-backdrop-filter: blur(5px);
27603
+ display: flex;
27604
+ flex-direction: column;
27605
+ justify-content: center;
27606
+ align-items: center;
27607
+ z-index: 10050;
27608
+ pointer-events: auto;
27609
+ transition: opacity 0.25s ease, visibility 0.25s ease;
27610
+ }
27611
+ #sdc-form-loader.hidden,
27612
+ .sdc-modal-overlay.hidden {
27613
+ opacity: 0;
27614
+ visibility: hidden;
27615
+ pointer-events: none;
27616
+ }
27617
+ .sdc-loader-modal {
27618
+ background: var(--tf-app-card-bg, #ffffff);
27619
+ padding: 28px 36px;
27620
+ border-radius: 16px;
27621
+ box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
27622
+ display: flex;
27623
+ flex-direction: column;
27624
+ align-items: center;
27625
+ justify-content: center;
27626
+ text-align: center;
27627
+ min-width: 260px;
27628
+ max-width: 90vw;
27629
+ box-sizing: border-box;
27630
+ animation: sdc-modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
27631
+ }
27632
+ .sdc-loader-modal .sdk-loader-spinner {
27633
+ width: 44px;
27634
+ height: 44px;
27635
+ border: 4px solid var(--tf-primary-color-transparent, rgba(37, 134, 199, 0.18));
27636
+ border-top: 4px solid var(--tf-primary-color, #2586c7);
27637
+ border-radius: 50%;
27638
+ animation: sdk-spin 0.9s linear infinite;
27639
+ margin-bottom: 14px;
27640
+ }
27641
+ .sdc-loader-text {
27642
+ font-family: var(--tf-app-font-family);
27643
+ font-size: 1.05rem;
27644
+ font-weight: 600;
27645
+ color: #1e293b;
27646
+ margin-bottom: 6px;
27647
+ animation: sdk-pulse 1.5s ease-in-out infinite;
27648
+ }
27649
+ .sdc-loader-subtext {
27650
+ font-family: var(--tf-app-font-family);
27651
+ font-size: 0.85rem;
27652
+ color: #64748b;
27653
+ opacity: 0.9;
27654
+ }
27655
+ @keyframes sdc-modal-pop {
27656
+ 0% {
27657
+ opacity: 0;
27658
+ transform: scale(0.92) translateY(8px);
27659
+ }
27660
+ 100% {
27661
+ opacity: 1;
27662
+ transform: scale(1) translateY(0);
27663
+ }
27664
+ }
27593
27665
  @keyframes sdk-spin {
27594
27666
  0% {
27595
27667
  transform: rotate(0deg);
@@ -33532,9 +33604,6 @@ span.flatpickr-weekday {
33532
33604
  };
33533
33605
  </script>
33534
33606
 
33535
- <script>(function(L,qe){"use strict";typeof module=="object"&&typeof module.exports=="object"?module.exports=L.document?qe(L,!0):function(fe){if(!fe.document)throw new Error("jQuery requires a window with a document");return qe(fe)}:qe(L)})(typeof window!="undefined"?window:this,function(L,qe){"use strict";var fe=[],P=L.document,jn=Object.getPrototypeOf,ye=fe.slice,kt=fe.concat,ut=fe.push,Le=fe.indexOf,ze={},jt=ze.toString,Ue=ze.hasOwnProperty,qt=Ue.toString,qn=qt.call(Object),B={};function Lt(e,t){t=t||P;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}var Ht="3.2.1",r=function(e,t){return new r.fn.init(e,t)},Ln=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,Hn=/^-ms-/,On=/-([a-z])/g,Pn=function(e,t){return t.toUpperCase()};r.fn=r.prototype={jquery:Ht,constructor:r,length:0,toArray:function(){return ye.call(this)},get:function(e){return e==null?ye.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=r.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return r.each(this,e)},map:function(e){return this.pushStack(r.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ye.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ut,sort:fe.sort,splice:fe.splice},r.extend=r.fn.extend=function(){var e,t,n,i,u,o,a=arguments[0]||{},c=1,d=arguments.length,h=!1;for(typeof a=="boolean"&&(h=a,a=arguments[c]||{},c++),typeof a!="object"&&!r.isFunction(a)&&(a={}),c===d&&(a=this,c--);c<d;c++)if((e=arguments[c])!=null)for(t in e)n=a[t],i=e[t],a!==i&&(h&&i&&(r.isPlainObject(i)||(u=Array.isArray(i)))?(u?(u=!1,o=n&&Array.isArray(n)?n:[]):o=n&&r.isPlainObject(n)?n:{},a[t]=r.extend(h,o,i)):i!==void 0&&(a[t]=i));return a},r.extend({expando:"jQuery"+(Ht+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return r.type(e)==="function"},isWindow:function(e){return e!=null&&e===e.window},isNumeric:function(e){var t=r.type(e);return(t==="number"||t==="string")&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!e||jt.call(e)!=="[object Object]"?!1:(t=jn(e),t?(n=Ue.call(t,"constructor")&&t.constructor,typeof n=="function"&&qt.call(n)===qn):!0)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return e==null?e+"":typeof e=="object"||typeof e=="function"?ze[jt.call(e)]||"object":typeof e},globalEval:function(e){Lt(e)},camelCase:function(e){return e.replace(Hn,"ms-").replace(On,Pn)},each:function(e,t){var n,i=0;if(at(e))for(n=e.length;i<n&&t.call(e[i],i,e[i])!==!1;i++);else for(i in e)if(t.call(e[i],i,e[i])===!1)break;return e},trim:function(e){return e==null?"":(e+"").replace(Ln,"")},makeArray:function(e,t){var n=t||[];return e!=null&&(at(Object(e))?r.merge(n,typeof e=="string"?[e]:e):ut.call(n,e)),n},inArray:function(e,t,n){return t==null?-1:Le.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,u=e.length;i<n;i++)e[u++]=t[i];return e.length=u,e},grep:function(e,t,n){for(var i,u=[],o=0,a=e.length,c=!n;o<a;o++)i=!t(e[o],o),i!==c&&u.push(e[o]);return u},map:function(e,t,n){var i,u,o=0,a=[];if(at(e))for(i=e.length;o<i;o++)u=t(e[o],o,n),u!=null&&a.push(u);else for(o in e)u=t(e[o],o,n),u!=null&&a.push(u);return kt.apply([],a)},guid:1,proxy:function(e,t){var n,i,u;if(typeof t=="string"&&(n=e[t],t=e,e=n),!!r.isFunction(e))return i=ye.call(arguments,2),u=function(){return e.apply(t||this,i.concat(ye.call(arguments)))},u.guid=e.guid=e.guid||r.guid++,u},now:Date.now,support:B}),typeof Symbol=="function"&&(r.fn[Symbol.iterator]=fe[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ze["[object "+t+"]"]=t.toLowerCase()});function at(e){var t=!!e&&"length"in e&&e.length,n=r.type(e);return n==="function"||r.isWindow(e)?!1:n==="array"||t===0||typeof t=="number"&&t>0&&t-1 in e}var ve=function(e){var t,n,i,u,o,a,c,d,h,v,T,g,b,A,q,S,U,z,Z,M="sizzle"+1*new Date,j=e.document,K=0,F=0,_=wt(),Re=wt(),je=wt(),ae=function(s,f){return s===f&&(T=!0),0},We={}.hasOwnProperty,ee=[],he=ee.pop,ge=ee.push,V=ee.push,Cn=ee.slice,Te=function(s,f){for(var l=0,y=s.length;l<y;l++)if(s[l]===f)return l;return-1},xt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",Ce="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",wn="\\["+I+"*("+Ce+")(?:"+I+"*([*^$|!~]?=)"+I+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+Ce+"))|)"+I+"*\\]",Tt=":("+Ce+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+wn+")*)|.*)\\)|)",ki=new RegExp(I+"+","g"),tt=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),ji=new RegExp("^"+I+"*,"+I+"*"),qi=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),Li=new RegExp("="+I+`*([^\\]'"]*?)`+I+"*\\]","g"),Hi=new RegExp(Tt),Oi=new RegExp("^"+Ce+"$"),nt={ID:new RegExp("^#("+Ce+")"),CLASS:new RegExp("^\\.("+Ce+")"),TAG:new RegExp("^("+Ce+"|[*])"),ATTR:new RegExp("^"+wn),PSEUDO:new RegExp("^"+Tt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+xt+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Pi=/^(?:input|select|textarea|button)$/i,Fi=/^h\d$/i,Be=/^[^{]+\{\s*\[native \w/,Mi=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Ct=/[+~]/,de=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),pe=function(s,f,l){var y="0x"+f-65536;return y!==y||l?f:y<0?String.fromCharCode(y+65536):String.fromCharCode(y>>10|55296,y&1023|56320)},Sn=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Nn=function(s,f){return f?s==="\0"?"\uFFFD":s.slice(0,-1)+"\\"+s.charCodeAt(s.length-1).toString(16)+" ":"\\"+s},En=function(){g()},Ii=rt(function(s){return s.disabled===!0&&("form"in s||"label"in s)},{dir:"parentNode",next:"legend"});try{V.apply(ee=Cn.call(j.childNodes),j.childNodes),ee[j.childNodes.length].nodeType}catch(s){V={apply:ee.length?function(f,l){ge.apply(f,Cn.call(l))}:function(f,l){for(var y=f.length,p=0;f[y++]=l[p++];);f.length=y-1}}}function R(s,f,l,y){var p,m,x,C,w,E,N,k=f&&f.ownerDocument,O=f?f.nodeType:9;if(l=l||[],typeof s!="string"||!s||O!==1&&O!==9&&O!==11)return l;if(!y&&((f?f.ownerDocument||f:j)!==b&&g(f),f=f||b,q)){if(O!==11&&(w=Mi.exec(s)))if(p=w[1]){if(O===9)if(x=f.getElementById(p)){if(x.id===p)return l.push(x),l}else return l;else if(k&&(x=k.getElementById(p))&&Z(f,x)&&x.id===p)return l.push(x),l}else{if(w[2])return V.apply(l,f.getElementsByTagName(s)),l;if((p=w[3])&&n.getElementsByClassName&&f.getElementsByClassName)return V.apply(l,f.getElementsByClassName(p)),l}if(n.qsa&&!je[s+" "]&&(!S||!S.test(s))){if(O!==1)k=f,N=s;else if(f.nodeName.toLowerCase()!=="object"){for((C=f.getAttribute("id"))?C=C.replace(Sn,Nn):f.setAttribute("id",C=M),E=a(s),m=E.length;m--;)E[m]="#"+C+" "+it(E[m]);N=E.join(","),k=Ct.test(s)&&Nt(f.parentNode)||f}if(N)try{return V.apply(l,k.querySelectorAll(N)),l}catch(W){}finally{C===M&&f.removeAttribute("id")}}}return d(s.replace(tt,"$1"),f,l,y)}function wt(){var s=[];function f(l,y){return s.push(l+" ")>i.cacheLength&&delete f[s.shift()],f[l+" "]=y}return f}function se(s){return s[M]=!0,s}function ce(s){var f=b.createElement("fieldset");try{return!!s(f)}catch(l){return!1}finally{f.parentNode&&f.parentNode.removeChild(f),f=null}}function St(s,f){for(var l=s.split("|"),y=l.length;y--;)i.attrHandle[l[y]]=f}function Dn(s,f){var l=f&&s,y=l&&s.nodeType===1&&f.nodeType===1&&s.sourceIndex-f.sourceIndex;if(y)return y;if(l){for(;l=l.nextSibling;)if(l===f)return-1}return s?1:-1}function Ri(s){return function(f){var l=f.nodeName.toLowerCase();return l==="input"&&f.type===s}}function Wi(s){return function(f){var l=f.nodeName.toLowerCase();return(l==="input"||l==="button")&&f.type===s}}function An(s){return function(f){return"form"in f?f.parentNode&&f.disabled===!1?"label"in f?"label"in f.parentNode?f.parentNode.disabled===s:f.disabled===s:f.isDisabled===s||f.isDisabled!==!s&&Ii(f)===s:f.disabled===s:"label"in f?f.disabled===s:!1}}function we(s){return se(function(f){return f=+f,se(function(l,y){for(var p,m=s([],l.length,f),x=m.length;x--;)l[p=m[x]]&&(l[p]=!(y[p]=l[p]))})})}function Nt(s){return s&&typeof s.getElementsByTagName!="undefined"&&s}n=R.support={},o=R.isXML=function(s){var f=s&&(s.ownerDocument||s).documentElement;return f?f.nodeName!=="HTML":!1},g=R.setDocument=function(s){var f,l,y=s?s.ownerDocument||s:j;return y===b||y.nodeType!==9||!y.documentElement||(b=y,A=b.documentElement,q=!o(b),j!==b&&(l=b.defaultView)&&l.top!==l&&(l.addEventListener?l.addEventListener("unload",En,!1):l.attachEvent&&l.attachEvent("onunload",En)),n.attributes=ce(function(p){return p.className="i",!p.getAttribute("className")}),n.getElementsByTagName=ce(function(p){return p.appendChild(b.createComment("")),!p.getElementsByTagName("*").length}),n.getElementsByClassName=Be.test(b.getElementsByClassName),n.getById=ce(function(p){return A.appendChild(p).id=M,!b.getElementsByName||!b.getElementsByName(M).length}),n.getById?(i.filter.ID=function(p){var m=p.replace(de,pe);return function(x){return x.getAttribute("id")===m}},i.find.ID=function(p,m){if(typeof m.getElementById!="undefined"&&q){var x=m.getElementById(p);return x?[x]:[]}}):(i.filter.ID=function(p){var m=p.replace(de,pe);return function(x){var C=typeof x.getAttributeNode!="undefined"&&x.getAttributeNode("id");return C&&C.value===m}},i.find.ID=function(p,m){if(typeof m.getElementById!="undefined"&&q){var x,C,w,E=m.getElementById(p);if(E){if(x=E.getAttributeNode("id"),x&&x.value===p)return[E];for(w=m.getElementsByName(p),C=0;E=w[C++];)if(x=E.getAttributeNode("id"),x&&x.value===p)return[E]}return[]}}),i.find.TAG=n.getElementsByTagName?function(p,m){if(typeof m.getElementsByTagName!="undefined")return m.getElementsByTagName(p);if(n.qsa)return m.querySelectorAll(p)}:function(p,m){var x,C=[],w=0,E=m.getElementsByTagName(p);if(p==="*"){for(;x=E[w++];)x.nodeType===1&&C.push(x);return C}return E},i.find.CLASS=n.getElementsByClassName&&function(p,m){if(typeof m.getElementsByClassName!="undefined"&&q)return m.getElementsByClassName(p)},U=[],S=[],(n.qsa=Be.test(b.querySelectorAll))&&(ce(function(p){A.appendChild(p).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",p.querySelectorAll("[msallowcapture^='']").length&&S.push("[*^$]="+I+`*(?:''|"")`),p.querySelectorAll("[selected]").length||S.push("\\["+I+"*(?:value|"+xt+")"),p.querySelectorAll("[id~="+M+"-]").length||S.push("~="),p.querySelectorAll(":checked").length||S.push(":checked"),p.querySelectorAll("a#"+M+"+*").length||S.push(".#.+[+~]")}),ce(function(p){p.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var m=b.createElement("input");m.setAttribute("type","hidden"),p.appendChild(m).setAttribute("name","D"),p.querySelectorAll("[name=d]").length&&S.push("name"+I+"*[*^$|!~]?="),p.querySelectorAll(":enabled").length!==2&&S.push(":enabled",":disabled"),A.appendChild(p).disabled=!0,p.querySelectorAll(":disabled").length!==2&&S.push(":enabled",":disabled"),p.querySelectorAll("*,:x"),S.push(",.*:")})),(n.matchesSelector=Be.test(z=A.matches||A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&ce(function(p){n.disconnectedMatch=z.call(p,"*"),z.call(p,"[s!='']:x"),U.push("!=",Tt)}),S=S.length&&new RegExp(S.join("|")),U=U.length&&new RegExp(U.join("|")),f=Be.test(A.compareDocumentPosition),Z=f||Be.test(A.contains)?function(p,m){var x=p.nodeType===9?p.documentElement:p,C=m&&m.parentNode;return p===C||!!(C&&C.nodeType===1&&(x.contains?x.contains(C):p.compareDocumentPosition&&p.compareDocumentPosition(C)&16))}:function(p,m){if(m){for(;m=m.parentNode;)if(m===p)return!0}return!1},ae=f?function(p,m){if(p===m)return T=!0,0;var x=!p.compareDocumentPosition-!m.compareDocumentPosition;return x||(x=(p.ownerDocument||p)===(m.ownerDocument||m)?p.compareDocumentPosition(m):1,x&1||!n.sortDetached&&m.compareDocumentPosition(p)===x?p===b||p.ownerDocument===j&&Z(j,p)?-1:m===b||m.ownerDocument===j&&Z(j,m)?1:v?Te(v,p)-Te(v,m):0:x&4?-1:1)}:function(p,m){if(p===m)return T=!0,0;var x,C=0,w=p.parentNode,E=m.parentNode,N=[p],k=[m];if(!w||!E)return p===b?-1:m===b?1:w?-1:E?1:v?Te(v,p)-Te(v,m):0;if(w===E)return Dn(p,m);for(x=p;x=x.parentNode;)N.unshift(x);for(x=m;x=x.parentNode;)k.unshift(x);for(;N[C]===k[C];)C++;return C?Dn(N[C],k[C]):N[C]===j?-1:k[C]===j?1:0}),b},R.matches=function(s,f){return R(s,null,null,f)},R.matchesSelector=function(s,f){if((s.ownerDocument||s)!==b&&g(s),f=f.replace(Li,"='$1']"),n.matchesSelector&&q&&!je[f+" "]&&(!U||!U.test(f))&&(!S||!S.test(f)))try{var l=z.call(s,f);if(l||n.disconnectedMatch||s.document&&s.document.nodeType!==11)return l}catch(y){}return R(f,b,null,[s]).length>0},R.contains=function(s,f){return(s.ownerDocument||s)!==b&&g(s),Z(s,f)},R.attr=function(s,f){(s.ownerDocument||s)!==b&&g(s);var l=i.attrHandle[f.toLowerCase()],y=l&&We.call(i.attrHandle,f.toLowerCase())?l(s,f,!q):void 0;return y!==void 0?y:n.attributes||!q?s.getAttribute(f):(y=s.getAttributeNode(f))&&y.specified?y.value:null},R.escape=function(s){return(s+"").replace(Sn,Nn)},R.error=function(s){throw new Error("Syntax error, unrecognized expression: "+s)},R.uniqueSort=function(s){var f,l=[],y=0,p=0;if(T=!n.detectDuplicates,v=!n.sortStable&&s.slice(0),s.sort(ae),T){for(;f=s[p++];)f===s[p]&&(y=l.push(p));for(;y--;)s.splice(l[y],1)}return v=null,s},u=R.getText=function(s){var f,l="",y=0,p=s.nodeType;if(p){if(p===1||p===9||p===11){if(typeof s.textContent=="string")return s.textContent;for(s=s.firstChild;s;s=s.nextSibling)l+=u(s)}else if(p===3||p===4)return s.nodeValue}else for(;f=s[y++];)l+=u(f);return l},i=R.selectors={cacheLength:50,createPseudo:se,match:nt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(s){return s[1]=s[1].replace(de,pe),s[3]=(s[3]||s[4]||s[5]||"").replace(de,pe),s[2]==="~="&&(s[3]=" "+s[3]+" "),s.slice(0,4)},CHILD:function(s){return s[1]=s[1].toLowerCase(),s[1].slice(0,3)==="nth"?(s[3]||R.error(s[0]),s[4]=+(s[4]?s[5]+(s[6]||1):2*(s[3]==="even"||s[3]==="odd")),s[5]=+(s[7]+s[8]||s[3]==="odd")):s[3]&&R.error(s[0]),s},PSEUDO:function(s){var f,l=!s[6]&&s[2];return nt.CHILD.test(s[0])?null:(s[3]?s[2]=s[4]||s[5]||"":l&&Hi.test(l)&&(f=a(l,!0))&&(f=l.indexOf(")",l.length-f)-l.length)&&(s[0]=s[0].slice(0,f),s[2]=l.slice(0,f)),s.slice(0,3))}},filter:{TAG:function(s){var f=s.replace(de,pe).toLowerCase();return s==="*"?function(){return!0}:function(l){return l.nodeName&&l.nodeName.toLowerCase()===f}},CLASS:function(s){var f=_[s+" "];return f||(f=new RegExp("(^|"+I+")"+s+"("+I+"|$)"))&&_(s,function(l){return f.test(typeof l.className=="string"&&l.className||typeof l.getAttribute!="undefined"&&l.getAttribute("class")||"")})},ATTR:function(s,f,l){return function(y){var p=R.attr(y,s);return p==null?f==="!=":f?(p+="",f==="="?p===l:f==="!="?p!==l:f==="^="?l&&p.indexOf(l)===0:f==="*="?l&&p.indexOf(l)>-1:f==="$="?l&&p.slice(-l.length)===l:f==="~="?(" "+p.replace(ki," ")+" ").indexOf(l)>-1:f==="|="?p===l||p.slice(0,l.length+1)===l+"-":!1):!0}},CHILD:function(s,f,l,y,p){var m=s.slice(0,3)!=="nth",x=s.slice(-4)!=="last",C=f==="of-type";return y===1&&p===0?function(w){return!!w.parentNode}:function(w,E,N){var k,O,W,D,X,Q,te=m!==x?"nextSibling":"previousSibling",$=w.parentNode,$e=C&&w.nodeName.toLowerCase(),_e=!N&&!C,ne=!1;if($){if(m){for(;te;){for(D=w;D=D[te];)if(C?D.nodeName.toLowerCase()===$e:D.nodeType===1)return!1;Q=te=s==="only"&&!Q&&"nextSibling"}return!0}if(Q=[x?$.firstChild:$.lastChild],x&&_e){for(D=$,W=D[M]||(D[M]={}),O=W[D.uniqueID]||(W[D.uniqueID]={}),k=O[s]||[],X=k[0]===K&&k[1],ne=X&&k[2],D=X&&$.childNodes[X];D=++X&&D&&D[te]||(ne=X=0)||Q.pop();)if(D.nodeType===1&&++ne&&D===w){O[s]=[K,X,ne];break}}else if(_e&&(D=w,W=D[M]||(D[M]={}),O=W[D.uniqueID]||(W[D.uniqueID]={}),k=O[s]||[],X=k[0]===K&&k[1],ne=X),ne===!1)for(;(D=++X&&D&&D[te]||(ne=X=0)||Q.pop())&&!((C?D.nodeName.toLowerCase()===$e:D.nodeType===1)&&++ne&&(_e&&(W=D[M]||(D[M]={}),O=W[D.uniqueID]||(W[D.uniqueID]={}),O[s]=[K,ne]),D===w)););return ne-=p,ne===y||ne%y===0&&ne/y>=0}}},PSEUDO:function(s,f){var l,y=i.pseudos[s]||i.setFilters[s.toLowerCase()]||R.error("unsupported pseudo: "+s);return y[M]?y(f):y.length>1?(l=[s,s,"",f],i.setFilters.hasOwnProperty(s.toLowerCase())?se(function(p,m){for(var x,C=y(p,f),w=C.length;w--;)x=Te(p,C[w]),p[x]=!(m[x]=C[w])}):function(p){return y(p,0,l)}):y}},pseudos:{not:se(function(s){var f=[],l=[],y=c(s.replace(tt,"$1"));return y[M]?se(function(p,m,x,C){for(var w,E=y(p,null,C,[]),N=p.length;N--;)(w=E[N])&&(p[N]=!(m[N]=w))}):function(p,m,x){return f[0]=p,y(f,null,x,l),f[0]=null,!l.pop()}}),has:se(function(s){return function(f){return R(s,f).length>0}}),contains:se(function(s){return s=s.replace(de,pe),function(f){return(f.textContent||f.innerText||u(f)).indexOf(s)>-1}}),lang:se(function(s){return Oi.test(s||"")||R.error("unsupported lang: "+s),s=s.replace(de,pe).toLowerCase(),function(f){var l;do if(l=q?f.lang:f.getAttribute("xml:lang")||f.getAttribute("lang"))return l=l.toLowerCase(),l===s||l.indexOf(s+"-")===0;while((f=f.parentNode)&&f.nodeType===1);return!1}}),target:function(s){var f=e.location&&e.location.hash;return f&&f.slice(1)===s.id},root:function(s){return s===A},focus:function(s){return s===b.activeElement&&(!b.hasFocus||b.hasFocus())&&!!(s.type||s.href||~s.tabIndex)},enabled:An(!1),disabled:An(!0),checked:function(s){var f=s.nodeName.toLowerCase();return f==="input"&&!!s.checked||f==="option"&&!!s.selected},selected:function(s){return s.parentNode&&s.parentNode.selectedIndex,s.selected===!0},empty:function(s){for(s=s.firstChild;s;s=s.nextSibling)if(s.nodeType<6)return!1;return!0},parent:function(s){return!i.pseudos.empty(s)},header:function(s){return Fi.test(s.nodeName)},input:function(s){return Pi.test(s.nodeName)},button:function(s){var f=s.nodeName.toLowerCase();return f==="input"&&s.type==="button"||f==="button"},text:function(s){var f;return s.nodeName.toLowerCase()==="input"&&s.type==="text"&&((f=s.getAttribute("type"))==null||f.toLowerCase()==="text")},first:we(function(){return[0]}),last:we(function(s,f){return[f-1]}),eq:we(function(s,f,l){return[l<0?l+f:l]}),even:we(function(s,f){for(var l=0;l<f;l+=2)s.push(l);return s}),odd:we(function(s,f){for(var l=1;l<f;l+=2)s.push(l);return s}),lt:we(function(s,f,l){for(var y=l<0?l+f:l;--y>=0;)s.push(y);return s}),gt:we(function(s,f,l){for(var y=l<0?l+f:l;++y<f;)s.push(y);return s})}},i.pseudos.nth=i.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=Ri(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=Wi(t);function kn(){}kn.prototype=i.filters=i.pseudos,i.setFilters=new kn,a=R.tokenize=function(s,f){var l,y,p,m,x,C,w,E=Re[s+" "];if(E)return f?0:E.slice(0);for(x=s,C=[],w=i.preFilter;x;){(!l||(y=ji.exec(x)))&&(y&&(x=x.slice(y[0].length)||x),C.push(p=[])),l=!1,(y=qi.exec(x))&&(l=y.shift(),p.push({value:l,type:y[0].replace(tt," ")}),x=x.slice(l.length));for(m in i.filter)(y=nt[m].exec(x))&&(!w[m]||(y=w[m](y)))&&(l=y.shift(),p.push({value:l,type:m,matches:y}),x=x.slice(l.length));if(!l)break}return f?x.length:x?R.error(s):Re(s,C).slice(0)};function it(s){for(var f=0,l=s.length,y="";f<l;f++)y+=s[f].value;return y}function rt(s,f,l){var y=f.dir,p=f.next,m=p||y,x=l&&m==="parentNode",C=F++;return f.first?function(w,E,N){for(;w=w[y];)if(w.nodeType===1||x)return s(w,E,N);return!1}:function(w,E,N){var k,O,W,D=[K,C];if(N){for(;w=w[y];)if((w.nodeType===1||x)&&s(w,E,N))return!0}else for(;w=w[y];)if(w.nodeType===1||x)if(W=w[M]||(w[M]={}),O=W[w.uniqueID]||(W[w.uniqueID]={}),p&&p===w.nodeName.toLowerCase())w=w[y]||w;else{if((k=O[m])&&k[0]===K&&k[1]===C)return D[2]=k[2];if(O[m]=D,D[2]=s(w,E,N))return!0}return!1}}function Et(s){return s.length>1?function(f,l,y){for(var p=s.length;p--;)if(!s[p](f,l,y))return!1;return!0}:s[0]}function Bi(s,f,l){for(var y=0,p=f.length;y<p;y++)R(s,f[y],l);return l}function ot(s,f,l,y,p){for(var m,x=[],C=0,w=s.length,E=f!=null;C<w;C++)(m=s[C])&&(!l||l(m,y,p))&&(x.push(m),E&&f.push(C));return x}function Dt(s,f,l,y,p,m){return y&&!y[M]&&(y=Dt(y)),p&&!p[M]&&(p=Dt(p,m)),se(function(x,C,w,E){var N,k,O,W=[],D=[],X=C.length,Q=x||Bi(f||"*",w.nodeType?[w]:w,[]),te=s&&(x||!f)?ot(Q,W,s,w,E):Q,$=l?p||(x?s:X||y)?[]:C:te;if(l&&l(te,$,w,E),y)for(N=ot($,D),y(N,[],w,E),k=N.length;k--;)(O=N[k])&&($[D[k]]=!(te[D[k]]=O));if(x){if(p||s){if(p){for(N=[],k=$.length;k--;)(O=$[k])&&N.push(te[k]=O);p(null,$=[],N,E)}for(k=$.length;k--;)(O=$[k])&&(N=p?Te(x,O):W[k])>-1&&(x[N]=!(C[N]=O))}}else $=ot($===C?$.splice(X,$.length):$),p?p(null,C,$,E):V.apply(C,$)})}function At(s){for(var f,l,y,p=s.length,m=i.relative[s[0].type],x=m||i.relative[" "],C=m?1:0,w=rt(function(k){return k===f},x,!0),E=rt(function(k){return Te(f,k)>-1},x,!0),N=[function(k,O,W){var D=!m&&(W||O!==h)||((f=O).nodeType?w(k,O,W):E(k,O,W));return f=null,D}];C<p;C++)if(l=i.relative[s[C].type])N=[rt(Et(N),l)];else{if(l=i.filter[s[C].type].apply(null,s[C].matches),l[M]){for(y=++C;y<p&&!i.relative[s[y].type];y++);return Dt(C>1&&Et(N),C>1&&it(s.slice(0,C-1).concat({value:s[C-2].type===" "?"*":""})).replace(tt,"$1"),l,C<y&&At(s.slice(C,y)),y<p&&At(s=s.slice(y)),y<p&&it(s))}N.push(l)}return Et(N)}function $i(s,f){var l=f.length>0,y=s.length>0,p=function(m,x,C,w,E){var N,k,O,W=0,D="0",X=m&&[],Q=[],te=h,$=m||y&&i.find.TAG("*",E),$e=K+=te==null?1:Math.random()||.1,_e=$.length;for(E&&(h=x===b||x||E);D!==_e&&(N=$[D])!=null;D++){if(y&&N){for(k=0,!x&&N.ownerDocument!==b&&(g(N),C=!q);O=s[k++];)if(O(N,x||b,C)){w.push(N);break}E&&(K=$e)}l&&((N=!O&&N)&&W--,m&&X.push(N))}if(W+=D,l&&D!==W){for(k=0;O=f[k++];)O(X,Q,x,C);if(m){if(W>0)for(;D--;)X[D]||Q[D]||(Q[D]=he.call(w));Q=ot(Q)}V.apply(w,Q),E&&!m&&Q.length>0&&W+f.length>1&&R.uniqueSort(w)}return E&&(K=$e,h=te),X};return l?se(p):p}return c=R.compile=function(s,f){var l,y=[],p=[],m=je[s+" "];if(!m){for(f||(f=a(s)),l=f.length;l--;)m=At(f[l]),m[M]?y.push(m):p.push(m);m=je(s,$i(p,y)),m.selector=s}return m},d=R.select=function(s,f,l,y){var p,m,x,C,w,E=typeof s=="function"&&s,N=!y&&a(s=E.selector||s);if(l=l||[],N.length===1){if(m=N[0]=N[0].slice(0),m.length>2&&(x=m[0]).type==="ID"&&f.nodeType===9&&q&&i.relative[m[1].type]){if(f=(i.find.ID(x.matches[0].replace(de,pe),f)||[])[0],f)E&&(f=f.parentNode);else return l;s=s.slice(m.shift().value.length)}for(p=nt.needsContext.test(s)?0:m.length;p--&&(x=m[p],!i.relative[C=x.type]);)if((w=i.find[C])&&(y=w(x.matches[0].replace(de,pe),Ct.test(m[0].type)&&Nt(f.parentNode)||f))){if(m.splice(p,1),s=y.length&&it(m),!s)return V.apply(l,y),l;break}}return(E||c(s,N))(y,f,!q,l,!f||Ct.test(s)&&Nt(f.parentNode)||f),l},n.sortStable=M.split("").sort(ae).join("")===M,n.detectDuplicates=!!T,g(),n.sortDetached=ce(function(s){return s.compareDocumentPosition(b.createElement("fieldset"))&1}),ce(function(s){return s.innerHTML="<a href='#'></a>",s.firstChild.getAttribute("href")==="#"})||St("type|href|height|width",function(s,f,l){if(!l)return s.getAttribute(f,f.toLowerCase()==="type"?1:2)}),(!n.attributes||!ce(function(s){return s.innerHTML="<input/>",s.firstChild.setAttribute("value",""),s.firstChild.getAttribute("value")===""}))&&St("value",function(s,f,l){if(!l&&s.nodeName.toLowerCase()==="input")return s.defaultValue}),ce(function(s){return s.getAttribute("disabled")==null})||St(xt,function(s,f,l){var y;if(!l)return s[f]===!0?f.toLowerCase():(y=s.getAttributeNode(f))&&y.specified?y.value:null}),R}(L);r.find=ve,r.expr=ve.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=ve.uniqueSort,r.text=ve.getText,r.isXMLDoc=ve.isXML,r.contains=ve.contains,r.escapeSelector=ve.escape;var Se=function(e,t,n){for(var i=[],u=n!==void 0;(e=e[t])&&e.nodeType!==9;)if(e.nodeType===1){if(u&&r(e).is(n))break;i.push(e)}return i},Ot=function(e,t){for(var n=[];e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n},Pt=r.expr.match.needsContext;function oe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var Ft=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Fn=/^.[^:#\[\.,]*$/;function st(e,t,n){return r.isFunction(t)?r.grep(e,function(i,u){return!!t.call(i,u,i)!==n}):t.nodeType?r.grep(e,function(i){return i===t!==n}):typeof t!="string"?r.grep(e,function(i){return Le.call(t,i)>-1!==n}):Fn.test(t)?r.filter(t,e,n):(t=r.filter(t,e),r.grep(e,function(i){return Le.call(t,i)>-1!==n&&i.nodeType===1}))}r.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),t.length===1&&i.nodeType===1?r.find.matchesSelector(i,e)?[i]:[]:r.find.matches(e,r.grep(t,function(u){return u.nodeType===1}))},r.fn.extend({find:function(e){var t,n,i=this.length,u=this;if(typeof e!="string")return this.pushStack(r(e).filter(function(){for(t=0;t<i;t++)if(r.contains(u[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)r.find(e,u[t],n);return i>1?r.uniqueSort(n):n},filter:function(e){return this.pushStack(st(this,e||[],!1))},not:function(e){return this.pushStack(st(this,e||[],!0))},is:function(e){return!!st(this,typeof e=="string"&&Pt.test(e)?r(e):e||[],!1).length}});var Mt,Mn=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,In=r.fn.init=function(e,t,n){var i,u;if(!e)return this;if(n=n||Mt,typeof e=="string")if(e[0]==="<"&&e[e.length-1]===">"&&e.length>=3?i=[null,e,null]:i=Mn.exec(e),i&&(i[1]||!t))if(i[1]){if(t=t instanceof r?t[0]:t,r.merge(this,r.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:P,!0)),Ft.test(i[1])&&r.isPlainObject(t))for(i in t)r.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}else return u=P.getElementById(i[2]),u&&(this[0]=u,this.length=1),this;else return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);else{if(e.nodeType)return this[0]=e,this.length=1,this;if(r.isFunction(e))return n.ready!==void 0?n.ready(e):e(r)}return r.makeArray(e,this)};In.prototype=r.fn,Mt=r(P);var Rn=/^(?:parents|prev(?:Until|All))/,Wn={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(e){var t=r(e,this),n=t.length;return this.filter(function(){for(var i=0;i<n;i++)if(r.contains(this,t[i]))return!0})},closest:function(e,t){var n,i=0,u=this.length,o=[],a=typeof e!="string"&&r(e);if(!Pt.test(e)){for(;i<u;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:n.nodeType===1&&r.find.matchesSelector(n,e))){o.push(n);break}}return this.pushStack(o.length>1?r.uniqueSort(o):o)},index:function(e){return e?typeof e=="string"?Le.call(r(e),this[0]):Le.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(e,t))))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});function It(e,t){for(;(e=e[t])&&e.nodeType!==1;);return e}r.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return Se(e,"parentNode")},parentsUntil:function(e,t,n){return Se(e,"parentNode",n)},next:function(e){return It(e,"nextSibling")},prev:function(e){return It(e,"previousSibling")},nextAll:function(e){return Se(e,"nextSibling")},prevAll:function(e){return Se(e,"previousSibling")},nextUntil:function(e,t,n){return Se(e,"nextSibling",n)},prevUntil:function(e,t,n){return Se(e,"previousSibling",n)},siblings:function(e){return Ot((e.parentNode||{}).firstChild,e)},children:function(e){return Ot(e.firstChild)},contents:function(e){return oe(e,"iframe")?e.contentDocument:(oe(e,"template")&&(e=e.content||e),r.merge([],e.childNodes))}},function(e,t){r.fn[e]=function(n,i){var u=r.map(this,t,n);return e.slice(-5)!=="Until"&&(i=n),i&&typeof i=="string"&&(u=r.filter(i,u)),this.length>1&&(Wn[e]||r.uniqueSort(u),Rn.test(e)&&u.reverse()),this.pushStack(u)}});var ie=/[^\x20\t\r\n\f]+/g;function Bn(e){var t={};return r.each(e.match(ie)||[],function(n,i){t[i]=!0}),t}r.Callbacks=function(e){e=typeof e=="string"?Bn(e):r.extend({},e);var t,n,i,u,o=[],a=[],c=-1,d=function(){for(u=u||e.once,i=t=!0;a.length;c=-1)for(n=a.shift();++c<o.length;)o[c].apply(n[0],n[1])===!1&&e.stopOnFalse&&(c=o.length,n=!1);e.memory||(n=!1),t=!1,u&&(n?o=[]:o="")},h={add:function(){return o&&(n&&!t&&(c=o.length-1,a.push(n)),function v(T){r.each(T,function(g,b){r.isFunction(b)?(!e.unique||!h.has(b))&&o.push(b):b&&b.length&&r.type(b)!=="string"&&v(b)})}(arguments),n&&!t&&d()),this},remove:function(){return r.each(arguments,function(v,T){for(var g;(g=r.inArray(T,o,g))>-1;)o.splice(g,1),g<=c&&c--}),this},has:function(v){return v?r.inArray(v,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return u=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return u=a=[],!n&&!t&&(o=n=""),this},locked:function(){return!!u},fireWith:function(v,T){return u||(T=T||[],T=[v,T.slice?T.slice():T],a.push(T),t||d()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h};function Ne(e){return e}function Ve(e){throw e}function Rt(e,t,n,i){var u;try{e&&r.isFunction(u=e.promise)?u.call(e).done(t).fail(n):e&&r.isFunction(u=e.then)?u.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(o){n.apply(void 0,[o])}}r.extend({Deferred:function(e){var t=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return u.done(arguments).fail(arguments),this},catch:function(o){return i.then(null,o)},pipe:function(){var o=arguments;return r.Deferred(function(a){r.each(t,function(c,d){var h=r.isFunction(o[d[4]])&&o[d[4]];u[d[1]](function(){var v=h&&h.apply(this,arguments);v&&r.isFunction(v.promise)?v.promise().progress(a.notify).done(a.resolve).fail(a.reject):a[d[0]+"With"](this,h?[v]:arguments)})}),o=null}).promise()},then:function(o,a,c){var d=0;function h(v,T,g,b){return function(){var A=this,q=arguments,S=function(){var z,Z;if(!(v<d)){if(z=g.apply(A,q),z===T.promise())throw new TypeError("Thenable self-resolution");Z=z&&(typeof z=="object"||typeof z=="function")&&z.then,r.isFunction(Z)?b?Z.call(z,h(d,T,Ne,b),h(d,T,Ve,b)):(d++,Z.call(z,h(d,T,Ne,b),h(d,T,Ve,b),h(d,T,Ne,T.notifyWith))):(g!==Ne&&(A=void 0,q=[z]),(b||T.resolveWith)(A,q))}},U=b?S:function(){try{S()}catch(z){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(z,U.stackTrace),v+1>=d&&(g!==Ve&&(A=void 0,q=[z]),T.rejectWith(A,q))}};v?U():(r.Deferred.getStackHook&&(U.stackTrace=r.Deferred.getStackHook()),L.setTimeout(U))}}return r.Deferred(function(v){t[0][3].add(h(0,v,r.isFunction(c)?c:Ne,v.notifyWith)),t[1][3].add(h(0,v,r.isFunction(o)?o:Ne)),t[2][3].add(h(0,v,r.isFunction(a)?a:Ve))}).promise()},promise:function(o){return o!=null?r.extend(o,i):i}},u={};return r.each(t,function(o,a){var c=a[2],d=a[5];i[a[1]]=c.add,d&&c.add(function(){n=d},t[3-o][2].disable,t[0][2].lock),c.add(a[3].fire),u[a[0]]=function(){return u[a[0]+"With"](this===u?void 0:this,arguments),this},u[a[0]+"With"]=c.fireWith}),i.promise(u),e&&e.call(u,u),u},when:function(e){var t=arguments.length,n=t,i=Array(n),u=ye.call(arguments),o=r.Deferred(),a=function(c){return function(d){i[c]=this,u[c]=arguments.length>1?ye.call(arguments):d,--t||o.resolveWith(i,u)}};if(t<=1&&(Rt(e,o.done(a(n)).resolve,o.reject,!t),o.state()==="pending"||r.isFunction(u[n]&&u[n].then)))return o.then();for(;n--;)Rt(u[n],a(n),o.reject);return o.promise()}});var $n=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(e,t){L.console&&L.console.warn&&e&&$n.test(e.name)&&L.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},r.readyException=function(e){L.setTimeout(function(){throw e})};var ft=r.Deferred();r.fn.ready=function(e){return ft.then(e).catch(function(t){r.readyException(t)}),this},r.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--r.readyWait:r.isReady)||(r.isReady=!0,!(e!==!0&&--r.readyWait>0)&&ft.resolveWith(P,[r]))}}),r.ready.then=ft.then;function Xe(){P.removeEventListener("DOMContentLoaded",Xe),L.removeEventListener("load",Xe),r.ready()}P.readyState==="complete"||P.readyState!=="loading"&&!P.documentElement.doScroll?L.setTimeout(r.ready):(P.addEventListener("DOMContentLoaded",Xe),L.addEventListener("load",Xe));var le=function(e,t,n,i,u,o,a){var c=0,d=e.length,h=n==null;if(r.type(n)==="object"){u=!0;for(c in n)le(e,t,c,n[c],!0,o,a)}else if(i!==void 0&&(u=!0,r.isFunction(i)||(a=!0),h&&(a?(t.call(e,i),t=null):(h=t,t=function(v,T,g){return h.call(r(v),g)})),t))for(;c<d;c++)t(e[c],n,a?i:i.call(e[c],c,t(e[c],n)));return u?e:h?t.call(e):d?t(e[0],n):o},Qe=function(e){return e.nodeType===1||e.nodeType===9||!+e.nodeType};function He(){this.expando=r.expando+He.uid++}He.uid=1,He.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Qe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,u=this.cache(e);if(typeof t=="string")u[r.camelCase(t)]=n;else for(i in t)u[r.camelCase(i)]=t[i];return u},get:function(e,t){return t===void 0?this.cache(e):e[this.expando]&&e[this.expando][r.camelCase(t)]},access:function(e,t,n){return t===void 0||t&&typeof t=="string"&&n===void 0?this.get(e,t):(this.set(e,t,n),n!==void 0?n:t)},remove:function(e,t){var n,i=e[this.expando];if(i!==void 0){if(t!==void 0)for(Array.isArray(t)?t=t.map(r.camelCase):(t=r.camelCase(t),t=t in i?[t]:t.match(ie)||[]),n=t.length;n--;)delete i[t[n]];(t===void 0||r.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return t!==void 0&&!r.isEmptyObject(t)}};var H=new He,G=new He,_n=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,zn=/[A-Z]/g;function Un(e){return e==="true"?!0:e==="false"?!1:e==="null"?null:e===+e+""?+e:_n.test(e)?JSON.parse(e):e}function Wt(e,t,n){var i;if(n===void 0&&e.nodeType===1)if(i="data-"+t.replace(zn,"-$&").toLowerCase(),n=e.getAttribute(i),typeof n=="string"){try{n=Un(n)}catch(u){}G.set(e,t,n)}else n=void 0;return n}r.extend({hasData:function(e){return G.hasData(e)||H.hasData(e)},data:function(e,t,n){return G.access(e,t,n)},removeData:function(e,t){G.remove(e,t)},_data:function(e,t,n){return H.access(e,t,n)},_removeData:function(e,t){H.remove(e,t)}}),r.fn.extend({data:function(e,t){var n,i,u,o=this[0],a=o&&o.attributes;if(e===void 0){if(this.length&&(u=G.get(o),o.nodeType===1&&!H.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,i.indexOf("data-")===0&&(i=r.camelCase(i.slice(5)),Wt(o,i,u[i])));H.set(o,"hasDataAttrs",!0)}return u}return typeof e=="object"?this.each(function(){G.set(this,e)}):le(this,function(c){var d;if(o&&c===void 0)return d=G.get(o,e),d!==void 0||(d=Wt(o,e),d!==void 0)?d:void 0;this.each(function(){G.set(this,e,c)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){G.remove(this,e)})}}),r.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=H.get(e,t),n&&(!i||Array.isArray(n)?i=H.access(e,t,r.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=r.queue(e,t),i=n.length,u=n.shift(),o=r._queueHooks(e,t),a=function(){r.dequeue(e,t)};u==="inprogress"&&(u=n.shift(),i--),u&&(t==="fx"&&n.unshift("inprogress"),delete o.stop,u.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return H.get(e,n)||H.access(e,n,{empty:r.Callbacks("once memory").add(function(){H.remove(e,[t+"queue",n])})})}}),r.fn.extend({queue:function(e,t){var n=2;return typeof e!="string"&&(t=e,e="fx",n--),arguments.length<n?r.queue(this[0],e):t===void 0?this:this.each(function(){var i=r.queue(this,e,t);r._queueHooks(this,e),e==="fx"&&i[0]!=="inprogress"&&r.dequeue(this,e)})},dequeue:function(e){return this.each(function(){r.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,u=r.Deferred(),o=this,a=this.length,c=function(){--i||u.resolveWith(o,[o])};for(typeof e!="string"&&(t=e,e=void 0),e=e||"fx";a--;)n=H.get(o[a],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(c));return c(),u.promise(t)}});var Bt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Oe=new RegExp("^(?:([+-])=|)("+Bt+")([a-z%]*)$","i"),me=["Top","Right","Bottom","Left"],Ge=function(e,t){return e=t||e,e.style.display==="none"||e.style.display===""&&r.contains(e.ownerDocument,e)&&r.css(e,"display")==="none"},$t=function(e,t,n,i){var u,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];u=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return u};function _t(e,t,n,i){var u,o=1,a=20,c=i?function(){return i.cur()}:function(){return r.css(e,t,"")},d=c(),h=n&&n[3]||(r.cssNumber[t]?"":"px"),v=(r.cssNumber[t]||h!=="px"&&+d)&&Oe.exec(r.css(e,t));if(v&&v[3]!==h){h=h||v[3],n=n||[],v=+d||1;do o=o||".5",v=v/o,r.style(e,t,v+h);while(o!==(o=c()/d)&&o!==1&&--a)}return n&&(v=+v||+d||0,u=n[1]?v+(n[1]+1)*n[2]:+n[2],i&&(i.unit=h,i.start=v,i.end=u)),u}var zt={};function Vn(e){var t,n=e.ownerDocument,i=e.nodeName,u=zt[i];return u||(t=n.body.appendChild(n.createElement(i)),u=r.css(t,"display"),t.parentNode.removeChild(t),u==="none"&&(u="block"),zt[i]=u,u)}function Ee(e,t){for(var n,i,u=[],o=0,a=e.length;o<a;o++)i=e[o],i.style&&(n=i.style.display,t?(n==="none"&&(u[o]=H.get(i,"display")||null,u[o]||(i.style.display="")),i.style.display===""&&Ge(i)&&(u[o]=Vn(i))):n!=="none"&&(u[o]="none",H.set(i,"display",n)));for(o=0;o<a;o++)u[o]!=null&&(e[o].style.display=u[o]);return e}r.fn.extend({show:function(){return Ee(this,!0)},hide:function(){return Ee(this)},toggle:function(e){return typeof e=="boolean"?e?this.show():this.hide():this.each(function(){Ge(this)?r(this).show():r(this).hide()})}});var Ut=/^(?:checkbox|radio)$/i,Vt=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Xt=/^$|\/(?:java|ecma)script/i,re={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};re.optgroup=re.option,re.tbody=re.tfoot=re.colgroup=re.caption=re.thead,re.th=re.td;function Y(e,t){var n;return typeof e.getElementsByTagName!="undefined"?n=e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!="undefined"?n=e.querySelectorAll(t||"*"):n=[],t===void 0||t&&oe(e,t)?r.merge([e],n):n}function ct(e,t){for(var n=0,i=e.length;n<i;n++)H.set(e[n],"globalEval",!t||H.get(t[n],"globalEval"))}var Xn=/<|&#?\w+;/;function Qt(e,t,n,i,u){for(var o,a,c,d,h,v,T=t.createDocumentFragment(),g=[],b=0,A=e.length;b<A;b++)if(o=e[b],o||o===0)if(r.type(o)==="object")r.merge(g,o.nodeType?[o]:o);else if(!Xn.test(o))g.push(t.createTextNode(o));else{for(a=a||T.appendChild(t.createElement("div")),c=(Vt.exec(o)||["",""])[1].toLowerCase(),d=re[c]||re._default,a.innerHTML=d[1]+r.htmlPrefilter(o)+d[2],v=d[0];v--;)a=a.lastChild;r.merge(g,a.childNodes),a=T.firstChild,a.textContent=""}for(T.textContent="",b=0;o=g[b++];){if(i&&r.inArray(o,i)>-1){u&&u.push(o);continue}if(h=r.contains(o.ownerDocument,o),a=Y(T.appendChild(o),"script"),h&&ct(a),n)for(v=0;o=a[v++];)Xt.test(o.type||"")&&n.push(o)}return T}(function(){var e=P.createDocumentFragment(),t=e.appendChild(P.createElement("div")),n=P.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),B.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",B.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue})();var Ye=P.documentElement,Qn=/^key/,Gn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gt=/^([^.]*)(?:\.(.+)|)/;function Je(){return!0}function De(){return!1}function Yt(){try{return P.activeElement}catch(e){}}function lt(e,t,n,i,u,o){var a,c;if(typeof t=="object"){typeof n!="string"&&(i=i||n,n=void 0);for(c in t)lt(e,c,n,i,t[c],o);return e}if(i==null&&u==null?(u=n,i=n=void 0):u==null&&(typeof n=="string"?(u=i,i=void 0):(u=i,i=n,n=void 0)),u===!1)u=De;else if(!u)return e;return o===1&&(a=u,u=function(d){return r().off(d),a.apply(this,arguments)},u.guid=a.guid||(a.guid=r.guid++)),e.each(function(){r.event.add(this,t,u,i,n)})}r.event={global:{},add:function(e,t,n,i,u){var o,a,c,d,h,v,T,g,b,A,q,S=H.get(e);if(S)for(n.handler&&(o=n,n=o.handler,u=o.selector),u&&r.find.matchesSelector(Ye,u),n.guid||(n.guid=r.guid++),(d=S.events)||(d=S.events={}),(a=S.handle)||(a=S.handle=function(U){return typeof r!="undefined"&&r.event.triggered!==U.type?r.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ie)||[""],h=t.length;h--;)c=Gt.exec(t[h])||[],b=q=c[1],A=(c[2]||"").split(".").sort(),b&&(T=r.event.special[b]||{},b=(u?T.delegateType:T.bindType)||b,T=r.event.special[b]||{},v=r.extend({type:b,origType:q,data:i,handler:n,guid:n.guid,selector:u,needsContext:u&&r.expr.match.needsContext.test(u),namespace:A.join(".")},o),(g=d[b])||(g=d[b]=[],g.delegateCount=0,(!T.setup||T.setup.call(e,i,A,a)===!1)&&e.addEventListener&&e.addEventListener(b,a)),T.add&&(T.add.call(e,v),v.handler.guid||(v.handler.guid=n.guid)),u?g.splice(g.delegateCount++,0,v):g.push(v),r.event.global[b]=!0)},remove:function(e,t,n,i,u){var o,a,c,d,h,v,T,g,b,A,q,S=H.hasData(e)&&H.get(e);if(!(!S||!(d=S.events))){for(t=(t||"").match(ie)||[""],h=t.length;h--;){if(c=Gt.exec(t[h])||[],b=q=c[1],A=(c[2]||"").split(".").sort(),!b){for(b in d)r.event.remove(e,b+t[h],n,i,!0);continue}for(T=r.event.special[b]||{},b=(i?T.delegateType:T.bindType)||b,g=d[b]||[],c=c[2]&&new RegExp("(^|\\.)"+A.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=g.length;o--;)v=g[o],(u||q===v.origType)&&(!n||n.guid===v.guid)&&(!c||c.test(v.namespace))&&(!i||i===v.selector||i==="**"&&v.selector)&&(g.splice(o,1),v.selector&&g.delegateCount--,T.remove&&T.remove.call(e,v));a&&!g.length&&((!T.teardown||T.teardown.call(e,A,S.handle)===!1)&&r.removeEvent(e,b,S.handle),delete d[b])}r.isEmptyObject(d)&&H.remove(e,"handle events")}},dispatch:function(e){var t=r.event.fix(e),n,i,u,o,a,c,d=new Array(arguments.length),h=(H.get(this,"events")||{})[t.type]||[],v=r.event.special[t.type]||{};for(d[0]=t,n=1;n<arguments.length;n++)d[n]=arguments[n];if(t.delegateTarget=this,!(v.preDispatch&&v.preDispatch.call(this,t)===!1)){for(c=r.event.handlers.call(this,t,h),n=0;(o=c[n++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,i=0;(a=o.handlers[i++])&&!t.isImmediatePropagationStopped();)(!t.rnamespace||t.rnamespace.test(a.namespace))&&(t.handleObj=a,t.data=a.data,u=((r.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,d),u!==void 0&&(t.result=u)===!1&&(t.preventDefault(),t.stopPropagation()));return v.postDispatch&&v.postDispatch.call(this,t),t.result}},handlers:function(e,t){var n,i,u,o,a,c=[],d=t.delegateCount,h=e.target;if(d&&h.nodeType&&!(e.type==="click"&&e.button>=1)){for(;h!==this;h=h.parentNode||this)if(h.nodeType===1&&!(e.type==="click"&&h.disabled===!0)){for(o=[],a={},n=0;n<d;n++)i=t[n],u=i.selector+" ",a[u]===void 0&&(a[u]=i.needsContext?r(u,this).index(h)>-1:r.find(u,this,null,[h]).length),a[u]&&o.push(i);o.length&&c.push({elem:h,handlers:o})}}return h=this,d<t.length&&c.push({elem:h,handlers:t.slice(d)}),c},addProp:function(e,t){Object.defineProperty(r.Event.prototype,e,{enumerable:!0,configurable:!0,get:r.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(n){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:n})}})},fix:function(e){return e[r.expando]?e:new r.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Yt()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Yt()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&oe(this,"input"))return this.click(),!1},_default:function(e){return oe(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==void 0&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},r.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},r.Event=function(e,t){if(!(this instanceof r.Event))return new r.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.defaultPrevented===void 0&&e.returnValue===!1?Je:De,this.target=e.target&&e.target.nodeType===3?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&r.extend(this,t),this.timeStamp=e&&e.timeStamp||r.now(),this[r.expando]=!0},r.Event.prototype={constructor:r.Event,isDefaultPrevented:De,isPropagationStopped:De,isImmediatePropagationStopped:De,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Je,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Je,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Je,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return e.which==null&&Qn.test(e.type)?e.charCode!=null?e.charCode:e.keyCode:!e.which&&t!==void 0&&Gn.test(e.type)?t&1?1:t&2?3:t&4?2:0:e.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){r.event.special[e]={delegateType:t,bindType:t,handle:function(n){var i,u=this,o=n.relatedTarget,a=n.handleObj;return(!o||o!==u&&!r.contains(u,o))&&(n.type=a.origType,i=a.handler.apply(this,arguments),n.type=t),i}}}),r.fn.extend({on:function(e,t,n,i){return lt(this,e,t,n,i)},one:function(e,t,n,i){return lt(this,e,t,n,i,1)},off:function(e,t,n){var i,u;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,r(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(u in e)this.off(u,t,e[u]);return this}return(t===!1||typeof t=="function")&&(n=t,t=void 0),n===!1&&(n=De),this.each(function(){r.event.remove(this,e,n,t)})}});var Yn=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Jn=/<script|<style|<link/i,Kn=/checked\s*(?:[^=]|=\s*.checked.)/i,Zn=/^true\/(.*)/,ei=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Jt(e,t){return oe(e,"table")&&oe(t.nodeType!==11?t:t.firstChild,"tr")&&r(">tbody",e)[0]||e}function ti(e){return e.type=(e.getAttribute("type")!==null)+"/"+e.type,e}function ni(e){var t=Zn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Kt(e,t){var n,i,u,o,a,c,d,h;if(t.nodeType===1){if(H.hasData(e)&&(o=H.access(e),a=H.set(t,o),h=o.events,h)){delete a.handle,a.events={};for(u in h)for(n=0,i=h[u].length;n<i;n++)r.event.add(t,u,h[u][n])}G.hasData(e)&&(c=G.access(e),d=r.extend({},c),G.set(t,d))}}function ii(e,t){var n=t.nodeName.toLowerCase();n==="input"&&Ut.test(e.type)?t.checked=e.checked:(n==="input"||n==="textarea")&&(t.defaultValue=e.defaultValue)}function Ae(e,t,n,i){t=kt.apply([],t);var u,o,a,c,d,h,v=0,T=e.length,g=T-1,b=t[0],A=r.isFunction(b);if(A||T>1&&typeof b=="string"&&!B.checkClone&&Kn.test(b))return e.each(function(q){var S=e.eq(q);A&&(t[0]=b.call(this,q,S.html())),Ae(S,t,n,i)});if(T&&(u=Qt(t,e[0].ownerDocument,!1,e,i),o=u.firstChild,u.childNodes.length===1&&(u=o),o||i)){for(a=r.map(Y(u,"script"),ti),c=a.length;v<T;v++)d=u,v!==g&&(d=r.clone(d,!0,!0),c&&r.merge(a,Y(d,"script"))),n.call(e[v],d,v);if(c)for(h=a[a.length-1].ownerDocument,r.map(a,ni),v=0;v<c;v++)d=a[v],Xt.test(d.type||"")&&!H.access(d,"globalEval")&&r.contains(h,d)&&(d.src?r._evalUrl&&r._evalUrl(d.src):Lt(d.textContent.replace(ei,""),h))}return e}function Zt(e,t,n){for(var i,u=t?r.filter(t,e):e,o=0;(i=u[o])!=null;o++)!n&&i.nodeType===1&&r.cleanData(Y(i)),i.parentNode&&(n&&r.contains(i.ownerDocument,i)&&ct(Y(i,"script")),i.parentNode.removeChild(i));return e}r.extend({htmlPrefilter:function(e){return e.replace(Yn,"<$1></$2>")},clone:function(e,t,n){var i,u,o,a,c=e.cloneNode(!0),d=r.contains(e.ownerDocument,e);if(!B.noCloneChecked&&(e.nodeType===1||e.nodeType===11)&&!r.isXMLDoc(e))for(a=Y(c),o=Y(e),i=0,u=o.length;i<u;i++)ii(o[i],a[i]);if(t)if(n)for(o=o||Y(e),a=a||Y(c),i=0,u=o.length;i<u;i++)Kt(o[i],a[i]);else Kt(e,c);return a=Y(c,"script"),a.length>0&&ct(a,!d&&Y(e,"script")),c},cleanData:function(e){for(var t,n,i,u=r.event.special,o=0;(n=e[o])!==void 0;o++)if(Qe(n)){if(t=n[H.expando]){if(t.events)for(i in t.events)u[i]?r.event.remove(n,i):r.removeEvent(n,i,t.handle);n[H.expando]=void 0}n[G.expando]&&(n[G.expando]=void 0)}}}),r.fn.extend({detach:function(e){return Zt(this,e,!0)},remove:function(e){return Zt(this,e)},text:function(e){return le(this,function(t){return t===void 0?r.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=t)})},null,e,arguments.length)},append:function(){return Ae(this,arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=Jt(this,e);t.appendChild(e)}})},prepend:function(){return Ae(this,arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=Jt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ae(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ae(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;(e=this[t])!=null;t++)e.nodeType===1&&(r.cleanData(Y(e,!1)),e.textContent="");return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return r.clone(this,e,t)})},html:function(e){return le(this,function(t){var n=this[0]||{},i=0,u=this.length;if(t===void 0&&n.nodeType===1)return n.innerHTML;if(typeof t=="string"&&!Jn.test(t)&&!re[(Vt.exec(t)||["",""])[1].toLowerCase()]){t=r.htmlPrefilter(t);try{for(;i<u;i++)n=this[i]||{},n.nodeType===1&&(r.cleanData(Y(n,!1)),n.innerHTML=t);n=0}catch(o){}}n&&this.empty().append(t)},null,e,arguments.length)},replaceWith:function(){var e=[];return Ae(this,arguments,function(t){var n=this.parentNode;r.inArray(this,e)<0&&(r.cleanData(Y(this)),n&&n.replaceChild(t,this))},e)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){r.fn[e]=function(n){for(var i,u=[],o=r(n),a=o.length-1,c=0;c<=a;c++)i=c===a?this:this.clone(!0),r(o[c])[t](i),ut.apply(u,i.get());return this.pushStack(u)}});var en=/^margin/,dt=new RegExp("^("+Bt+")(?!px)[a-z%]+$","i"),Ke=function(e){var t=e.ownerDocument.defaultView;return(!t||!t.opener)&&(t=L),t.getComputedStyle(e)};(function(){function e(){if(a){a.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Ye.appendChild(o);var c=L.getComputedStyle(a);t=c.top!=="1%",u=c.marginLeft==="2px",n=c.width==="4px",a.style.marginRight="50%",i=c.marginRight==="4px",Ye.removeChild(o),a=null}}var t,n,i,u,o=P.createElement("div"),a=P.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",B.clearCloneStyle=a.style.backgroundClip==="content-box",o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(a),r.extend(B,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),n},pixelMarginRight:function(){return e(),i},reliableMarginLeft:function(){return e(),u}}))})();function Pe(e,t,n){var i,u,o,a,c=e.style;return n=n||Ke(e),n&&(a=n.getPropertyValue(t)||n[t],a===""&&!r.contains(e.ownerDocument,e)&&(a=r.style(e,t)),!B.pixelMarginRight()&&dt.test(a)&&en.test(t)&&(i=c.width,u=c.minWidth,o=c.maxWidth,c.minWidth=c.maxWidth=c.width=a,a=n.width,c.width=i,c.minWidth=u,c.maxWidth=o)),a!==void 0?a+"":a}function tn(e,t){return{get:function(){if(e()){delete this.get;return}return(this.get=t).apply(this,arguments)}}}var ri=/^(none|table(?!-c[ea]).+)/,nn=/^--/,oi={position:"absolute",visibility:"hidden",display:"block"},rn={letterSpacing:"0",fontWeight:"400"},on=["Webkit","Moz","ms"],un=P.createElement("div").style;function ui(e){if(e in un)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=on.length;n--;)if(e=on[n]+t,e in un)return e}function an(e){var t=r.cssProps[e];return t||(t=r.cssProps[e]=ui(e)||e),t}function sn(e,t,n){var i=Oe.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function fn(e,t,n,i,u){var o,a=0;for(n===(i?"border":"content")?o=4:o=t==="width"?1:0;o<4;o+=2)n==="margin"&&(a+=r.css(e,n+me[o],!0,u)),i?(n==="content"&&(a-=r.css(e,"padding"+me[o],!0,u)),n!=="margin"&&(a-=r.css(e,"border"+me[o]+"Width",!0,u))):(a+=r.css(e,"padding"+me[o],!0,u),n!=="padding"&&(a+=r.css(e,"border"+me[o]+"Width",!0,u)));return a}function cn(e,t,n){var i,u=Ke(e),o=Pe(e,t,u),a=r.css(e,"boxSizing",!1,u)==="border-box";return dt.test(o)?o:(i=a&&(B.boxSizingReliable()||o===e.style[t]),o==="auto"&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),o=parseFloat(o)||0,o+fn(e,t,n||(a?"border":"content"),i,u)+"px")}r.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Pe(e,"opacity");return n===""?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,i){if(!(!e||e.nodeType===3||e.nodeType===8||!e.style)){var u,o,a,c=r.camelCase(t),d=nn.test(t),h=e.style;if(d||(t=an(c)),a=r.cssHooks[t]||r.cssHooks[c],n!==void 0){if(o=typeof n,o==="string"&&(u=Oe.exec(n))&&u[1]&&(n=_t(e,t,u),o="number"),n==null||n!==n)return;o==="number"&&(n+=u&&u[3]||(r.cssNumber[c]?"":"px")),!B.clearCloneStyle&&n===""&&t.indexOf("background")===0&&(h[t]="inherit"),(!a||!("set"in a)||(n=a.set(e,n,i))!==void 0)&&(d?h.setProperty(t,n):h[t]=n)}else return a&&"get"in a&&(u=a.get(e,!1,i))!==void 0?u:h[t]}},css:function(e,t,n,i){var u,o,a,c=r.camelCase(t),d=nn.test(t);return d||(t=an(c)),a=r.cssHooks[t]||r.cssHooks[c],a&&"get"in a&&(u=a.get(e,!0,n)),u===void 0&&(u=Pe(e,t,i)),u==="normal"&&t in rn&&(u=rn[t]),n===""||n?(o=parseFloat(u),n===!0||isFinite(o)?o||0:u):u}}),r.each(["height","width"],function(e,t){r.cssHooks[t]={get:function(n,i,u){if(i)return ri.test(r.css(n,"display"))&&(!n.getClientRects().length||!n.getBoundingClientRect().width)?$t(n,oi,function(){return cn(n,t,u)}):cn(n,t,u)},set:function(n,i,u){var o,a=u&&Ke(n),c=u&&fn(n,t,u,r.css(n,"boxSizing",!1,a)==="border-box",a);return c&&(o=Oe.exec(i))&&(o[3]||"px")!=="px"&&(n.style[t]=i,i=r.css(n,t)),sn(n,i,c)}}}),r.cssHooks.marginLeft=tn(B.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Pe(e,"marginLeft"))||e.getBoundingClientRect().left-$t(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(e,t){r.cssHooks[e+t]={expand:function(n){for(var i=0,u={},o=typeof n=="string"?n.split(" "):[n];i<4;i++)u[e+me[i]+t]=o[i]||o[i-2]||o[0];return u}},en.test(e)||(r.cssHooks[e+t].set=sn)}),r.fn.extend({css:function(e,t){return le(this,function(n,i,u){var o,a,c={},d=0;if(Array.isArray(i)){for(o=Ke(n),a=i.length;d<a;d++)c[i[d]]=r.css(n,i[d],!1,o);return c}return u!==void 0?r.style(n,i,u):r.css(n,i)},e,t,arguments.length>1)}});function J(e,t,n,i,u){return new J.prototype.init(e,t,n,i,u)}r.Tween=J,J.prototype={constructor:J,init:function(e,t,n,i,u,o){this.elem=e,this.prop=n,this.easing=u||r.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(r.cssNumber[n]?"":"px")},cur:function(){var e=J.propHooks[this.prop];return e&&e.get?e.get(this):J.propHooks._default.get(this)},run:function(e){var t,n=J.propHooks[this.prop];return this.options.duration?this.pos=t=r.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):J.propHooks._default.set(this),this}},J.prototype.init.prototype=J.prototype,J.propHooks={_default:{get:function(e){var t;return e.elem.nodeType!==1||e.elem[e.prop]!=null&&e.elem.style[e.prop]==null?e.elem[e.prop]:(t=r.css(e.elem,e.prop,""),!t||t==="auto"?0:t)},set:function(e){r.fx.step[e.prop]?r.fx.step[e.prop](e):e.elem.nodeType===1&&(e.elem.style[r.cssProps[e.prop]]!=null||r.cssHooks[e.prop])?r.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},J.propHooks.scrollTop=J.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},r.easing={linear:function(e){return e},swing:function(e){return .5-Math.cos(e*Math.PI)/2},_default:"swing"},r.fx=J.prototype.init,r.fx.step={};var ke,Ze,ai=/^(?:toggle|show|hide)$/,si=/queueHooks$/;function pt(){Ze&&(P.hidden===!1&&L.requestAnimationFrame?L.requestAnimationFrame(pt):L.setTimeout(pt,r.fx.interval),r.fx.tick())}function ln(){return L.setTimeout(function(){ke=void 0}),ke=r.now()}function et(e,t){var n,i=0,u={height:e};for(t=t?1:0;i<4;i+=2-t)n=me[i],u["margin"+n]=u["padding"+n]=e;return t&&(u.opacity=u.width=e),u}function dn(e,t,n){for(var i,u=(ue.tweeners[t]||[]).concat(ue.tweeners["*"]),o=0,a=u.length;o<a;o++)if(i=u[o].call(n,t,e))return i}function fi(e,t,n){var i,u,o,a,c,d,h,v,T="width"in t||"height"in t,g=this,b={},A=e.style,q=e.nodeType&&Ge(e),S=H.get(e,"fxshow");n.queue||(a=r._queueHooks(e,"fx"),a.unqueued==null&&(a.unqueued=0,c=a.empty.fire,a.empty.fire=function(){a.unqueued||c()}),a.unqueued++,g.always(function(){g.always(function(){a.unqueued--,r.queue(e,"fx").length||a.empty.fire()})}));for(i in t)if(u=t[i],ai.test(u)){if(delete t[i],o=o||u==="toggle",u===(q?"hide":"show"))if(u==="show"&&S&&S[i]!==void 0)q=!0;else continue;b[i]=S&&S[i]||r.style(e,i)}if(d=!r.isEmptyObject(t),!(!d&&r.isEmptyObject(b))){T&&e.nodeType===1&&(n.overflow=[A.overflow,A.overflowX,A.overflowY],h=S&&S.display,h==null&&(h=H.get(e,"display")),v=r.css(e,"display"),v==="none"&&(h?v=h:(Ee([e],!0),h=e.style.display||h,v=r.css(e,"display"),Ee([e]))),(v==="inline"||v==="inline-block"&&h!=null)&&r.css(e,"float")==="none"&&(d||(g.done(function(){A.display=h}),h==null&&(v=A.display,h=v==="none"?"":v)),A.display="inline-block")),n.overflow&&(A.overflow="hidden",g.always(function(){A.overflow=n.overflow[0],A.overflowX=n.overflow[1],A.overflowY=n.overflow[2]})),d=!1;for(i in b)d||(S?"hidden"in S&&(q=S.hidden):S=H.access(e,"fxshow",{display:h}),o&&(S.hidden=!q),q&&Ee([e],!0),g.done(function(){q||Ee([e]),H.remove(e,"fxshow");for(i in b)r.style(e,i,b[i])})),d=dn(q?S[i]:0,i,g),i in S||(S[i]=d.start,q&&(d.end=d.start,d.start=0))}}function ci(e,t){var n,i,u,o,a;for(n in e)if(i=r.camelCase(n),u=t[i],o=e[n],Array.isArray(o)&&(u=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=r.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=u)}else t[i]=u}function ue(e,t,n){var i,u,o=0,a=ue.prefilters.length,c=r.Deferred().always(function(){delete d.elem}),d=function(){if(u)return!1;for(var T=ke||ln(),g=Math.max(0,h.startTime+h.duration-T),b=g/h.duration||0,A=1-b,q=0,S=h.tweens.length;q<S;q++)h.tweens[q].run(A);return c.notifyWith(e,[h,A,g]),A<1&&S?g:(S||c.notifyWith(e,[h,1,0]),c.resolveWith(e,[h]),!1)},h=c.promise({elem:e,props:r.extend({},t),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},n),originalProperties:t,originalOptions:n,startTime:ke||ln(),duration:n.duration,tweens:[],createTween:function(T,g){var b=r.Tween(e,h.opts,T,g,h.opts.specialEasing[T]||h.opts.easing);return h.tweens.push(b),b},stop:function(T){var g=0,b=T?h.tweens.length:0;if(u)return this;for(u=!0;g<b;g++)h.tweens[g].run(1);return T?(c.notifyWith(e,[h,1,0]),c.resolveWith(e,[h,T])):c.rejectWith(e,[h,T]),this}}),v=h.props;for(ci(v,h.opts.specialEasing);o<a;o++)if(i=ue.prefilters[o].call(h,e,v,h.opts),i)return r.isFunction(i.stop)&&(r._queueHooks(h.elem,h.opts.queue).stop=r.proxy(i.stop,i)),i;return r.map(v,dn,h),r.isFunction(h.opts.start)&&h.opts.start.call(e,h),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always),r.fx.timer(r.extend(d,{elem:e,anim:h,queue:h.opts.queue})),h}r.Animation=r.extend(ue,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return _t(n.elem,e,Oe.exec(t),n),n}]},tweener:function(e,t){r.isFunction(e)?(t=e,e=["*"]):e=e.match(ie);for(var n,i=0,u=e.length;i<u;i++)n=e[i],ue.tweeners[n]=ue.tweeners[n]||[],ue.tweeners[n].unshift(t)},prefilters:[fi],prefilter:function(e,t){t?ue.prefilters.unshift(e):ue.prefilters.push(e)}}),r.speed=function(e,t,n){var i=e&&typeof e=="object"?r.extend({},e):{complete:n||!n&&t||r.isFunction(e)&&e,duration:e,easing:n&&t||t&&!r.isFunction(t)&&t};return r.fx.off?i.duration=0:typeof i.duration!="number"&&(i.duration in r.fx.speeds?i.duration=r.fx.speeds[i.duration]:i.duration=r.fx.speeds._default),(i.queue==null||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){r.isFunction(i.old)&&i.old.call(this),i.queue&&r.dequeue(this,i.queue)},i},r.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Ge).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var u=r.isEmptyObject(e),o=r.speed(t,n,i),a=function(){var c=ue(this,r.extend({},e),o);(u||H.get(this,"finish"))&&c.stop(!0)};return a.finish=a,u||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(u){var o=u.stop;delete u.stop,o(n)};return typeof e!="string"&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var u=!0,o=e!=null&&e+"queueHooks",a=r.timers,c=H.get(this);if(o)c[o]&&c[o].stop&&i(c[o]);else for(o in c)c[o]&&c[o].stop&&si.test(o)&&i(c[o]);for(o=a.length;o--;)a[o].elem===this&&(e==null||a[o].queue===e)&&(a[o].anim.stop(n),u=!1,a.splice(o,1));(u||!n)&&r.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=H.get(this),i=n[e+"queue"],u=n[e+"queueHooks"],o=r.timers,a=i?i.length:0;for(n.finish=!0,r.queue(this,e,[]),u&&u.stop&&u.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),r.each(["toggle","show","hide"],function(e,t){var n=r.fn[t];r.fn[t]=function(i,u,o){return i==null||typeof i=="boolean"?n.apply(this,arguments):this.animate(et(t,!0),i,u,o)}}),r.each({slideDown:et("show"),slideUp:et("hide"),slideToggle:et("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){r.fn[e]=function(n,i,u){return this.animate(t,n,i,u)}}),r.timers=[],r.fx.tick=function(){var e,t=0,n=r.timers;for(ke=r.now();t<n.length;t++)e=n[t],!e()&&n[t]===e&&n.splice(t--,1);n.length||r.fx.stop(),ke=void 0},r.fx.timer=function(e){r.timers.push(e),r.fx.start()},r.fx.interval=13,r.fx.start=function(){Ze||(Ze=!0,pt())},r.fx.stop=function(){Ze=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(e,t){return e=r.fx&&r.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(n,i){var u=L.setTimeout(n,e);i.stop=function(){L.clearTimeout(u)}})},function(){var e=P.createElement("input"),t=P.createElement("select"),n=t.appendChild(P.createElement("option"));e.type="checkbox",B.checkOn=e.value!=="",B.optSelected=n.selected,e=P.createElement("input"),e.value="t",e.type="radio",B.radioValue=e.value==="t"}();var pn,Fe=r.expr.attrHandle;r.fn.extend({attr:function(e,t){return le(this,r.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){r.removeAttr(this,e)})}}),r.extend({attr:function(e,t,n){var i,u,o=e.nodeType;if(!(o===3||o===8||o===2)){if(typeof e.getAttribute=="undefined")return r.prop(e,t,n);if((o!==1||!r.isXMLDoc(e))&&(u=r.attrHooks[t.toLowerCase()]||(r.expr.match.bool.test(t)?pn:void 0)),n!==void 0){if(n===null){r.removeAttr(e,t);return}return u&&"set"in u&&(i=u.set(e,n,t))!==void 0?i:(e.setAttribute(t,n+""),n)}return u&&"get"in u&&(i=u.get(e,t))!==null?i:(i=r.find.attr(e,t),i==null?void 0:i)}},attrHooks:{type:{set:function(e,t){if(!B.radioValue&&t==="radio"&&oe(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,u=t&&t.match(ie);if(u&&e.nodeType===1)for(;n=u[i++];)e.removeAttribute(n)}}),pn={set:function(e,t,n){return t===!1?r.removeAttr(e,n):e.setAttribute(n,n),n}},r.each(r.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Fe[t]||r.find.attr;Fe[t]=function(i,u,o){var a,c,d=u.toLowerCase();return o||(c=Fe[d],Fe[d]=a,a=n(i,u,o)!=null?d:null,Fe[d]=c),a}});var li=/^(?:input|select|textarea|button)$/i,di=/^(?:a|area)$/i;r.fn.extend({prop:function(e,t){return le(this,r.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[r.propFix[e]||e]})}}),r.extend({prop:function(e,t,n){var i,u,o=e.nodeType;if(!(o===3||o===8||o===2))return(o!==1||!r.isXMLDoc(e))&&(t=r.propFix[t]||t,u=r.propHooks[t]),n!==void 0?u&&"set"in u&&(i=u.set(e,n,t))!==void 0?i:e[t]=n:u&&"get"in u&&(i=u.get(e,t))!==null?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=r.find.attr(e,"tabindex");return t?parseInt(t,10):li.test(e.nodeName)||di.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),B.optSelected||(r.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function be(e){var t=e.match(ie)||[];return t.join(" ")}function xe(e){return e.getAttribute&&e.getAttribute("class")||""}r.fn.extend({addClass:function(e){var t,n,i,u,o,a,c,d=0;if(r.isFunction(e))return this.each(function(h){r(this).addClass(e.call(this,h,xe(this)))});if(typeof e=="string"&&e){for(t=e.match(ie)||[];n=this[d++];)if(u=xe(n),i=n.nodeType===1&&" "+be(u)+" ",i){for(a=0;o=t[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");c=be(i),u!==c&&n.setAttribute("class",c)}}return this},removeClass:function(e){var t,n,i,u,o,a,c,d=0;if(r.isFunction(e))return this.each(function(h){r(this).removeClass(e.call(this,h,xe(this)))});if(!arguments.length)return this.attr("class","");if(typeof e=="string"&&e){for(t=e.match(ie)||[];n=this[d++];)if(u=xe(n),i=n.nodeType===1&&" "+be(u)+" ",i){for(a=0;o=t[a++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");c=be(i),u!==c&&n.setAttribute("class",c)}}return this},toggleClass:function(e,t){var n=typeof e;return typeof t=="boolean"&&n==="string"?t?this.addClass(e):this.removeClass(e):r.isFunction(e)?this.each(function(i){r(this).toggleClass(e.call(this,i,xe(this),t),t)}):this.each(function(){var i,u,o,a;if(n==="string")for(u=0,o=r(this),a=e.match(ie)||[];i=a[u++];)o.hasClass(i)?o.removeClass(i):o.addClass(i);else(e===void 0||n==="boolean")&&(i=xe(this),i&&H.set(this,"__className__",i),this.setAttribute&&this.setAttribute("class",i||e===!1?"":H.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(n.nodeType===1&&(" "+be(xe(n))+" ").indexOf(t)>-1)return!0;return!1}});var pi=/\r/g;r.fn.extend({val:function(e){var t,n,i,u=this[0];return arguments.length?(i=r.isFunction(e),this.each(function(o){var a;this.nodeType===1&&(i?a=e.call(this,o,r(this).val()):a=e,a==null?a="":typeof a=="number"?a+="":Array.isArray(a)&&(a=r.map(a,function(c){return c==null?"":c+""})),t=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],(!t||!("set"in t)||t.set(this,a,"value")===void 0)&&(this.value=a))})):u?(t=r.valHooks[u.type]||r.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(u,"value"))!==void 0?n:(n=u.value,typeof n=="string"?n.replace(pi,""):n==null?"":n)):void 0}}),r.extend({valHooks:{option:{get:function(e){var t=r.find.attr(e,"value");return t!=null?t:be(r.text(e))}},select:{get:function(e){var t,n,i,u=e.options,o=e.selectedIndex,a=e.type==="select-one",c=a?null:[],d=a?o+1:u.length;for(o<0?i=d:i=a?o:0;i<d;i++)if(n=u[i],(n.selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!oe(n.parentNode,"optgroup"))){if(t=r(n).val(),a)return t;c.push(t)}return c},set:function(e,t){for(var n,i,u=e.options,o=r.makeArray(t),a=u.length;a--;)i=u[a],(i.selected=r.inArray(r.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=r.inArray(r(e).val(),t)>-1}},B.checkOn||(r.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value})});var hn=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(e,t,n,i){var u,o,a,c,d,h,v,T=[n||P],g=Ue.call(e,"type")?e.type:e,b=Ue.call(e,"namespace")?e.namespace.split("."):[];if(o=a=n=n||P,!(n.nodeType===3||n.nodeType===8)&&!hn.test(g+r.event.triggered)&&(g.indexOf(".")>-1&&(b=g.split("."),g=b.shift(),b.sort()),d=g.indexOf(":")<0&&"on"+g,e=e[r.expando]?e:new r.Event(g,typeof e=="object"&&e),e.isTrigger=i?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=t==null?[e]:r.makeArray(t,[e]),v=r.event.special[g]||{},!(!i&&v.trigger&&v.trigger.apply(n,t)===!1))){if(!i&&!v.noBubble&&!r.isWindow(n)){for(c=v.delegateType||g,hn.test(c+g)||(o=o.parentNode);o;o=o.parentNode)T.push(o),a=o;a===(n.ownerDocument||P)&&T.push(a.defaultView||a.parentWindow||L)}for(u=0;(o=T[u++])&&!e.isPropagationStopped();)e.type=u>1?c:v.bindType||g,h=(H.get(o,"events")||{})[e.type]&&H.get(o,"handle"),h&&h.apply(o,t),h=d&&o[d],h&&h.apply&&Qe(o)&&(e.result=h.apply(o,t),e.result===!1&&e.preventDefault());return e.type=g,!i&&!e.isDefaultPrevented()&&(!v._default||v._default.apply(T.pop(),t)===!1)&&Qe(n)&&d&&r.isFunction(n[g])&&!r.isWindow(n)&&(a=n[d],a&&(n[d]=null),r.event.triggered=g,n[g](),r.event.triggered=void 0,a&&(n[d]=a)),e.result}},simulate:function(e,t,n){var i=r.extend(new r.Event,n,{type:e,isSimulated:!0});r.event.trigger(i,null,t)}}),r.fn.extend({trigger:function(e,t){return this.each(function(){r.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return r.event.trigger(e,t,n,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){r.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}}),r.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),B.focusin="onfocusin"in L,B.focusin||r.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(i){r.event.simulate(t,i.target,r.event.fix(i))};r.event.special[t]={setup:function(){var i=this.ownerDocument||this,u=H.access(i,t);u||i.addEventListener(e,n,!0),H.access(i,t,(u||0)+1)},teardown:function(){var i=this.ownerDocument||this,u=H.access(i,t)-1;u?H.access(i,t,u):(i.removeEventListener(e,n,!0),H.remove(i,t))}}});var Me=L.location,gn=r.now(),ht=/\?/;r.parseXML=function(e){var t;if(!e||typeof e!="string")return null;try{t=new L.DOMParser().parseFromString(e,"text/xml")}catch(n){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&r.error("Invalid XML: "+e),t};var hi=/\[\]$/,yn=/\r?\n/g,gi=/^(?:submit|button|image|reset|file)$/i,yi=/^(?:input|select|textarea|keygen)/i;function gt(e,t,n,i){var u;if(Array.isArray(t))r.each(t,function(o,a){n||hi.test(e)?i(e,a):gt(e+"["+(typeof a=="object"&&a!=null?o:"")+"]",a,n,i)});else if(!n&&r.type(t)==="object")for(u in t)gt(e+"["+u+"]",t[u],n,i);else i(e,t)}r.param=function(e,t){var n,i=[],u=function(o,a){var c=r.isFunction(a)?a():a;i[i.length]=encodeURIComponent(o)+"="+encodeURIComponent(c==null?"":c)};if(Array.isArray(e)||e.jquery&&!r.isPlainObject(e))r.each(e,function(){u(this.name,this.value)});else for(n in e)gt(n,e[n],t,u);return i.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=r.prop(this,"elements");return e?r.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!r(this).is(":disabled")&&yi.test(this.nodeName)&&!gi.test(e)&&(this.checked||!Ut.test(e))}).map(function(e,t){var n=r(this).val();return n==null?null:Array.isArray(n)?r.map(n,function(i){return{name:t.name,value:i.replace(yn,`\r
33536
- `)}}):{name:t.name,value:n.replace(yn,`\r
33537
- `)}}).get()}});var vi=/%20/g,mi=/#.*$/,bi=/([?&])_=[^&]*/,xi=/^(.*?):[ \t]*([^\r\n]*)$/mg,Ti=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ci=/^(?:GET|HEAD)$/,wi=/^\/\//,vn={},yt={},mn="*/".concat("*"),vt=P.createElement("a");vt.href=Me.href;function bn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var i,u=0,o=t.toLowerCase().match(ie)||[];if(r.isFunction(n))for(;i=o[u++];)i[0]==="+"?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function xn(e,t,n,i){var u={},o=e===yt;function a(c){var d;return u[c]=!0,r.each(e[c]||[],function(h,v){var T=v(t,n,i);if(typeof T=="string"&&!o&&!u[T])return t.dataTypes.unshift(T),a(T),!1;if(o)return!(d=T)}),d}return a(t.dataTypes[0])||!u["*"]&&a("*")}function mt(e,t){var n,i,u=r.ajaxSettings.flatOptions||{};for(n in t)t[n]!==void 0&&((u[n]?e:i||(i={}))[n]=t[n]);return i&&r.extend(!0,e,i),e}function Si(e,t,n){for(var i,u,o,a,c=e.contents,d=e.dataTypes;d[0]==="*";)d.shift(),i===void 0&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i){for(u in c)if(c[u]&&c[u].test(i)){d.unshift(u);break}}if(d[0]in n)o=d[0];else{for(u in n){if(!d[0]||e.converters[u+" "+d[0]]){o=u;break}a||(a=u)}o=o||a}if(o)return o!==d[0]&&d.unshift(o),n[o]}function Ni(e,t,n,i){var u,o,a,c,d,h={},v=e.dataTypes.slice();if(v[1])for(a in e.converters)h[a.toLowerCase()]=e.converters[a];for(o=v.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!d&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),d=o,o=v.shift(),o){if(o==="*")o=d;else if(d!=="*"&&d!==o){if(a=h[d+" "+o]||h["* "+o],!a){for(u in h)if(c=u.split(" "),c[1]===o&&(a=h[d+" "+c[0]]||h["* "+c[0]],a)){a===!0?a=h[u]:h[u]!==!0&&(o=c[0],v.unshift(c[1]));break}}if(a!==!0)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(T){return{state:"parsererror",error:a?T:"No conversion from "+d+" to "+o}}}}return{state:"success",data:t}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Me.href,type:"GET",isLocal:Ti.test(Me.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":mn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?mt(mt(e,r.ajaxSettings),t):mt(r.ajaxSettings,e)},ajaxPrefilter:bn(vn),ajaxTransport:bn(yt),ajax:function(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};var n,i,u,o,a,c,d,h,v,T,g=r.ajaxSetup({},t),b=g.context||g,A=g.context&&(b.nodeType||b.jquery)?r(b):r.event,q=r.Deferred(),S=r.Callbacks("once memory"),U=g.statusCode||{},z={},Z={},M="canceled",j={readyState:0,getResponseHeader:function(F){var _;if(d){if(!o)for(o={};_=xi.exec(u);)o[_[1].toLowerCase()]=_[2];_=o[F.toLowerCase()]}return _==null?null:_},getAllResponseHeaders:function(){return d?u:null},setRequestHeader:function(F,_){return d==null&&(F=Z[F.toLowerCase()]=Z[F.toLowerCase()]||F,z[F]=_),this},overrideMimeType:function(F){return d==null&&(g.mimeType=F),this},statusCode:function(F){var _;if(F)if(d)j.always(F[j.status]);else for(_ in F)U[_]=[U[_],F[_]];return this},abort:function(F){var _=F||M;return n&&n.abort(_),K(0,_),this}};if(q.promise(j),g.url=((e||g.url||Me.href)+"").replace(wi,Me.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(ie)||[""],g.crossDomain==null){c=P.createElement("a");try{c.href=g.url,c.href=c.href,g.crossDomain=vt.protocol+"//"+vt.host!=c.protocol+"//"+c.host}catch(F){g.crossDomain=!0}}if(g.data&&g.processData&&typeof g.data!="string"&&(g.data=r.param(g.data,g.traditional)),xn(vn,g,t,j),d)return j;h=r.event&&g.global,h&&r.active++===0&&r.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!Ci.test(g.type),i=g.url.replace(mi,""),g.hasContent?g.data&&g.processData&&(g.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(g.data=g.data.replace(vi,"+")):(T=g.url.slice(i.length),g.data&&(i+=(ht.test(i)?"&":"?")+g.data,delete g.data),g.cache===!1&&(i=i.replace(bi,"$1"),T=(ht.test(i)?"&":"?")+"_="+gn+++T),g.url=i+T),g.ifModified&&(r.lastModified[i]&&j.setRequestHeader("If-Modified-Since",r.lastModified[i]),r.etag[i]&&j.setRequestHeader("If-None-Match",r.etag[i])),(g.data&&g.hasContent&&g.contentType!==!1||t.contentType)&&j.setRequestHeader("Content-Type",g.contentType),j.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+(g.dataTypes[0]!=="*"?", "+mn+"; q=0.01":""):g.accepts["*"]);for(v in g.headers)j.setRequestHeader(v,g.headers[v]);if(g.beforeSend&&(g.beforeSend.call(b,j,g)===!1||d))return j.abort();if(M="abort",S.add(g.complete),j.done(g.success),j.fail(g.error),n=xn(yt,g,t,j),!n)K(-1,"No Transport");else{if(j.readyState=1,h&&A.trigger("ajaxSend",[j,g]),d)return j;g.async&&g.timeout>0&&(a=L.setTimeout(function(){j.abort("timeout")},g.timeout));try{d=!1,n.send(z,K)}catch(F){if(d)throw F;K(-1,F)}}function K(F,_,Re,je){var ae,We,ee,he,ge,V=_;d||(d=!0,a&&L.clearTimeout(a),n=void 0,u=je||"",j.readyState=F>0?4:0,ae=F>=200&&F<300||F===304,Re&&(he=Si(g,j,Re)),he=Ni(g,he,j,ae),ae?(g.ifModified&&(ge=j.getResponseHeader("Last-Modified"),ge&&(r.lastModified[i]=ge),ge=j.getResponseHeader("etag"),ge&&(r.etag[i]=ge)),F===204||g.type==="HEAD"?V="nocontent":F===304?V="notmodified":(V=he.state,We=he.data,ee=he.error,ae=!ee)):(ee=V,(F||!V)&&(V="error",F<0&&(F=0))),j.status=F,j.statusText=(_||V)+"",ae?q.resolveWith(b,[We,V,j]):q.rejectWith(b,[j,V,ee]),j.statusCode(U),U=void 0,h&&A.trigger(ae?"ajaxSuccess":"ajaxError",[j,g,ae?We:ee]),S.fireWith(b,[j,V]),h&&(A.trigger("ajaxComplete",[j,g]),--r.active||r.event.trigger("ajaxStop")))}return j},getJSON:function(e,t,n){return r.get(e,t,n,"json")},getScript:function(e,t){return r.get(e,void 0,t,"script")}}),r.each(["get","post"],function(e,t){r[t]=function(n,i,u,o){return r.isFunction(i)&&(o=o||u,u=i,i=void 0),r.ajax(r.extend({url:n,type:t,dataType:o,data:i,success:u},r.isPlainObject(n)&&n))}}),r._evalUrl=function(e){return r.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},r.fn.extend({wrapAll:function(e){var t;return this[0]&&(r.isFunction(e)&&(e=e.call(this[0])),t=r(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var n=this;n.firstElementChild;)n=n.firstElementChild;return n}).append(this)),this},wrapInner:function(e){return r.isFunction(e)?this.each(function(t){r(this).wrapInner(e.call(this,t))}):this.each(function(){var t=r(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=r.isFunction(e);return this.each(function(n){r(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(e){return!r.expr.pseudos.visible(e)},r.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new L.XMLHttpRequest}catch(e){}};var Ei={0:200,1223:204},Ie=r.ajaxSettings.xhr();B.cors=!!Ie&&"withCredentials"in Ie,B.ajax=Ie=!!Ie,r.ajaxTransport(function(e){var t,n;if(B.cors||Ie&&!e.crossDomain)return{send:function(i,u){var o,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),!e.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");for(o in i)a.setRequestHeader(o,i[o]);t=function(c){return function(){t&&(t=n=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,c==="abort"?a.abort():c==="error"?typeof a.status!="number"?u(0,"error"):u(a.status,a.statusText):u(Ei[a.status]||a.status,a.statusText,(a.responseType||"text")!=="text"||typeof a.responseText!="string"?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),n=a.onerror=t("error"),a.onabort!==void 0?a.onabort=n:a.onreadystatechange=function(){a.readyState===4&&L.setTimeout(function(){t&&n()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(c){if(t)throw c}},abort:function(){t&&t()}}}),r.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return r.globalEval(e),e}}}),r.ajaxPrefilter("script",function(e){e.cache===void 0&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),r.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,u){t=r("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(o){t.remove(),n=null,o&&u(o.type==="error"?404:200,o.type)}),P.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Tn=[],bt=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Tn.pop()||r.expando+"_"+gn++;return this[e]=!0,e}}),r.ajaxPrefilter("json jsonp",function(e,t,n){var i,u,o,a=e.jsonp!==!1&&(bt.test(e.url)?"url":typeof e.data=="string"&&(e.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&bt.test(e.data)&&"data");if(a||e.dataTypes[0]==="jsonp")return i=e.jsonpCallback=r.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(bt,"$1"+i):e.jsonp!==!1&&(e.url+=(ht.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return o||r.error(i+" was not called"),o[0]},e.dataTypes[0]="json",u=L[i],L[i]=function(){o=arguments},n.always(function(){u===void 0?r(L).removeProp(i):L[i]=u,e[i]&&(e.jsonpCallback=t.jsonpCallback,Tn.push(i)),o&&r.isFunction(u)&&u(o[0]),o=u=void 0}),"script"}),B.createHTMLDocument=function(){var e=P.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",e.childNodes.length===2}(),r.parseHTML=function(e,t,n){if(typeof e!="string")return[];typeof t=="boolean"&&(n=t,t=!1);var i,u,o;return t||(B.createHTMLDocument?(t=P.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=P.location.href,t.head.appendChild(i)):t=P),u=Ft.exec(e),o=!n&&[],u?[t.createElement(u[1])]:(u=Qt([e],t,o),o&&o.length&&r(o).remove(),r.merge([],u.childNodes))},r.fn.load=function(e,t,n){var i,u,o,a=this,c=e.indexOf(" ");return c>-1&&(i=be(e.slice(c)),e=e.slice(0,c)),r.isFunction(t)?(n=t,t=void 0):t&&typeof t=="object"&&(u="POST"),a.length>0&&r.ajax({url:e,type:u||"GET",dataType:"html",data:t}).done(function(d){o=arguments,a.html(i?r("<div>").append(r.parseHTML(d)).find(i):d)}).always(n&&function(d,h){a.each(function(){n.apply(this,o||[d.responseText,h,d])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){r.fn[t]=function(n){return this.on(t,n)}}),r.expr.pseudos.animated=function(e){return r.grep(r.timers,function(t){return e===t.elem}).length},r.offset={setOffset:function(e,t,n){var i,u,o,a,c,d,h,v=r.css(e,"position"),T=r(e),g={};v==="static"&&(e.style.position="relative"),c=T.offset(),o=r.css(e,"top"),d=r.css(e,"left"),h=(v==="absolute"||v==="fixed")&&(o+d).indexOf("auto")>-1,h?(i=T.position(),a=i.top,u=i.left):(a=parseFloat(o)||0,u=parseFloat(d)||0),r.isFunction(t)&&(t=t.call(e,n,r.extend({},c))),t.top!=null&&(g.top=t.top-c.top+a),t.left!=null&&(g.left=t.left-c.left+u),"using"in t?t.using.call(e,g):T.css(g)}},r.fn.extend({offset:function(e){if(arguments.length)return e===void 0?this:this.each(function(a){r.offset.setOffset(this,e,a)});var t,n,i,u,o=this[0];if(o)return o.getClientRects().length?(i=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,u=t.defaultView,{top:i.top+u.pageYOffset-n.clientTop,left:i.left+u.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return r.css(n,"position")==="fixed"?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),oe(e[0],"html")||(i=e.offset()),i={top:i.top+r.css(e[0],"borderTopWidth",!0),left:i.left+r.css(e[0],"borderLeftWidth",!0)}),{top:t.top-i.top-r.css(n,"marginTop",!0),left:t.left-i.left-r.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&r.css(e,"position")==="static";)e=e.offsetParent;return e||Ye})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=t==="pageYOffset";r.fn[e]=function(i){return le(this,function(u,o,a){var c;if(r.isWindow(u)?c=u:u.nodeType===9&&(c=u.defaultView),a===void 0)return c?c[t]:u[o];c?c.scrollTo(n?c.pageXOffset:a,n?a:c.pageYOffset):u[o]=a},e,i,arguments.length)}}),r.each(["top","left"],function(e,t){r.cssHooks[t]=tn(B.pixelPosition,function(n,i){if(i)return i=Pe(n,t),dt.test(i)?r(n).position()[t]+"px":i})}),r.each({Height:"height",Width:"width"},function(e,t){r.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){r.fn[i]=function(u,o){var a=arguments.length&&(n||typeof u!="boolean"),c=n||(u===!0||o===!0?"margin":"border");return le(this,function(d,h,v){var T;return r.isWindow(d)?i.indexOf("outer")===0?d["inner"+e]:d.document.documentElement["client"+e]:d.nodeType===9?(T=d.documentElement,Math.max(d.body["scroll"+e],T["scroll"+e],d.body["offset"+e],T["offset"+e],T["client"+e])):v===void 0?r.css(d,h,c):r.style(d,h,v,c)},t,a?u:void 0,a)}})}),r.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)}}),r.holdReady=function(e){e?r.readyWait++:r.ready(!0)},r.isArray=Array.isArray,r.parseJSON=JSON.parse,r.nodeName=oe,typeof define=="function"&&define.amd&&define("jquery",[],function(){return r});var Di=L.jQuery,Ai=L.$;return r.noConflict=function(e){return L.$===r&&(L.$=Ai),e&&L.jQuery===r&&(L.jQuery=Di),r},qe||(L.jQuery=L.$=r),r});</script>
33538
33607
  <script>(function(Er,tn){typeof exports=="object"&&typeof module=="object"?module.exports=tn():typeof define=="function"&&define.amd?define("Recogito",[],tn):typeof exports=="object"?exports.Recogito=tn():Er.Recogito=tn()})(self,function(){return(()=>{var Er={2768:(C,v,d)=>{"use strict";var p=d(7701),c=d(593),O=p("%TypeError%"),S=d(5589),_=d(7473),A=d(1564),N=d(4293),V=d(9946),I=d(9541),X=d(4597),L=d(1753),P=c("String.prototype.split"),b=Object("a"),x=b[0]!=="a"||!(0 in b);C.exports=function(R){var $,G=I(this),Q=x&&L(this)?P(this,""):G,F=V(Q);if(!N(R))throw new O("Array.prototype.forEach callback must be a function");arguments.length>1&&($=arguments[1]);for(var H=0;H<F;){var nt=X(H),U=A(Q,nt);if(U){var ut=_(Q,nt);S(R,$,[ut,H,Q])}H+=1}}},2867:(C,v,d)=>{"use strict";var p=d(4347),c=d(4373),O=d(593),S=d(8866),_=d(2768),A=d(683),N=A(),V=d(4635),I=O("Array.prototype.slice"),X=c.apply(N),L=function(P,b){return S(P),X(P,I(arguments,1))};p(L,{getPolyfill:A,implementation:_,shim:V}),C.exports=L},683:(C,v,d)=>{"use strict";var p=d(3206),c=d(2768);C.exports=function(){var O=Array.prototype.forEach;return p(O)?O:c}},4635:(C,v,d)=>{"use strict";var p=d(4347),c=d(683);C.exports=function(){var O=c();return p(Array.prototype,{forEach:O},{forEach:function(){return Array.prototype.forEach!==O}}),O}},9584:function(C,v){var d,p;d=function(c,O){"use strict";var S,_,A=typeof Map=="function"?new Map:(S=[],_=[],{has:function(P){return S.indexOf(P)>-1},get:function(P){return _[S.indexOf(P)]},set:function(P,b){S.indexOf(P)===-1&&(S.push(P),_.push(b))},delete:function(P){var b=S.indexOf(P);b>-1&&(S.splice(b,1),_.splice(b,1))}}),N=function(P){return new Event(P,{bubbles:!0})};try{new Event("test")}catch(P){N=function(b){var x=document.createEvent("Event");return x.initEvent(b,!0,!1),x}}function V(P){if(P&&P.nodeName&&P.nodeName==="TEXTAREA"&&!A.has(P)){var b=null,x=null,R=null,$=function(){P.clientWidth!==x&&nt()},G=function(U){window.removeEventListener("resize",$,!1),P.removeEventListener("input",nt,!1),P.removeEventListener("keyup",nt,!1),P.removeEventListener("autosize:destroy",G,!1),P.removeEventListener("autosize:update",nt,!1),Object.keys(U).forEach(function(ut){P.style[ut]=U[ut]}),A.delete(P)}.bind(P,{height:P.style.height,resize:P.style.resize,overflowY:P.style.overflowY,overflowX:P.style.overflowX,wordWrap:P.style.wordWrap});P.addEventListener("autosize:destroy",G,!1),"onpropertychange"in P&&"oninput"in P&&P.addEventListener("keyup",nt,!1),window.addEventListener("resize",$,!1),P.addEventListener("input",nt,!1),P.addEventListener("autosize:update",nt,!1),P.style.overflowX="hidden",P.style.wordWrap="break-word",A.set(P,{destroy:G,update:nt}),(Q=window.getComputedStyle(P,null)).resize==="vertical"?P.style.resize="none":Q.resize==="both"&&(P.style.resize="horizontal"),b=Q.boxSizing==="content-box"?-(parseFloat(Q.paddingTop)+parseFloat(Q.paddingBottom)):parseFloat(Q.borderTopWidth)+parseFloat(Q.borderBottomWidth),isNaN(b)&&(b=0),nt()}var Q;function F(U){var ut=P.style.width;P.style.width="0px",P.offsetWidth,P.style.width=ut,P.style.overflowY=U}function H(){if(P.scrollHeight!==0){var U=function(Z){for(var M=[];Z&&Z.parentNode&&Z.parentNode instanceof Element;)Z.parentNode.scrollTop&&M.push({node:Z.parentNode,scrollTop:Z.parentNode.scrollTop}),Z=Z.parentNode;return M}(P),ut=document.documentElement&&document.documentElement.scrollTop;P.style.height="",P.style.height=P.scrollHeight+b+"px",x=P.clientWidth,U.forEach(function(Z){Z.node.scrollTop=Z.scrollTop}),ut&&(document.documentElement.scrollTop=ut)}}function nt(){H();var U=Math.round(parseFloat(P.style.height)),ut=window.getComputedStyle(P,null),Z=ut.boxSizing==="content-box"?Math.round(parseFloat(ut.height)):P.offsetHeight;if(Z<U?ut.overflowY==="hidden"&&(F("scroll"),H(),Z=ut.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(P,null).height)):P.offsetHeight):ut.overflowY!=="hidden"&&(F("hidden"),H(),Z=ut.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(P,null).height)):P.offsetHeight),R!==Z){R=Z;var M=N("autosize:resized");try{P.dispatchEvent(M)}catch(J){}}}}function I(P){var b=A.get(P);b&&b.destroy()}function X(P){var b=A.get(P);b&&b.update()}var L=null;typeof window=="undefined"||typeof window.getComputedStyle!="function"?((L=function(P){return P}).destroy=function(P){return P},L.update=function(P){return P}):((L=function(P,b){return P&&Array.prototype.forEach.call(P.length?P:[P],function(x){return V(x)}),P}).destroy=function(P){return P&&Array.prototype.forEach.call(P.length?P:[P],I),P},L.update=function(P){return P&&Array.prototype.forEach.call(P.length?P:[P],X),P}),O.default=L,c.exports=O.default},(p=d.apply(v,[C,v]))===void 0||(C.exports=p)},593:(C,v,d)=>{"use strict";var p=d(7701),c=d(4373),O=c(p("String.prototype.indexOf"));C.exports=function(S,_){var A=p(S,!!_);return typeof A=="function"&&O(S,".prototype.")>-1?c(A):A}},4373:(C,v,d)=>{"use strict";var p=d(3767),c=d(7701),O=c("%Function.prototype.apply%"),S=c("%Function.prototype.call%"),_=c("%Reflect.apply%",!0)||p.call(S,O),A=c("%Object.getOwnPropertyDescriptor%",!0),N=c("%Object.defineProperty%",!0),V=c("%Math.max%");if(N)try{N({},"a",{value:1})}catch(X){N=null}C.exports=function(X){var L=_(p,S,arguments);if(A&&N){var P=A(L,"length");P.configurable&&N(L,"length",{value:1+V(0,X.length-(arguments.length-1))})}return L};var I=function(){return _(p,O,arguments)};N?N(C.exports,"apply",{value:I}):C.exports.apply=I},8344:(C,v,d)=>{"use strict";function p(S){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},p(S)}function c(S){var _,A,N="";if(typeof S=="string"||typeof S=="number")N+=S;else if(p(S)==="object")if(Array.isArray(S))for(_=0;_<S.length;_++)S[_]&&(A=c(S[_]))&&(N&&(N+=" "),N+=A);else for(_ in S)S[_]&&(N&&(N+=" "),N+=_);return N}function O(){for(var S,_,A=0,N="";A<arguments.length;)(S=arguments[A++])&&(_=c(S))&&(N&&(N+=" "),N+=_);return N}d.r(v),d.d(v,{default:()=>O})},6286:C=>{C.exports=function(v,d,p){return((p=window.getComputedStyle)?p(v):v.currentStyle)[d.replace(/-(\w)/gi,function(c,O){return O.toUpperCase()})]}},4347:(C,v,d)=>{"use strict";function p(X){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},p(X)}var c=d(8204),O=typeof Symbol=="function"&&p(Symbol("foo"))==="symbol",S=Object.prototype.toString,_=Array.prototype.concat,A=Object.defineProperty,N=A&&function(){var X={};try{for(var L in A(X,"x",{enumerable:!1,value:X}),X)return!1;return X.x===X}catch(P){return!1}}(),V=function(X,L,P,b){var x;(!(L in X)||typeof(x=b)=="function"&&S.call(x)==="[object Function]"&&b())&&(N?A(X,L,{configurable:!0,enumerable:!1,value:P,writable:!0}):X[L]=P)},I=function(X,L){var P=arguments.length>2?arguments[2]:{},b=c(L);O&&(b=_.call(b,Object.getOwnPropertySymbols(L)));for(var x=0;x<b.length;x+=1)V(X,b[x],L[b[x]],P[b[x]])};I.supportsDescriptors=!!N,C.exports=I},3206:C=>{function v(d){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},v(d)}C.exports=function(d){var p=!0,c=!0,O=!1;if(typeof d=="function"){try{d.call("f",function(S,_,A){v(A)!=="object"&&(p=!1)}),d.call([null],function(){"use strict";c=typeof this=="string"},"x")}catch(S){O=!0}return!O&&p&&c}return!1}},2358:(C,v,d)=>{"use strict";function p(I){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},p(I)}var c=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol",O=d(9739),S=d(1493),_=d(3258),A=d(8247),N=function(I,X){if(I==null)throw new TypeError("Cannot call method on "+I);if(typeof X!="string"||X!=="number"&&X!=="string")throw new TypeError('hint must be "string" or "number"');var L,P,b,x=X==="string"?["toString","valueOf"]:["valueOf","toString"];for(b=0;b<x.length;++b)if(L=I[x[b]],S(L)&&(P=L.call(I),O(P)))return P;throw new TypeError("No default value")},V=function(I,X){var L=I[X];if(L!=null){if(!S(L))throw new TypeError(L+" returned for property "+X+" of object "+I+" is not a function");return L}};C.exports=function(I){if(O(I))return I;var X,L="default";if(arguments.length>1&&(arguments[1]===String?L="string":arguments[1]===Number&&(L="number")),c&&(Symbol.toPrimitive?X=V(I,Symbol.toPrimitive):A(I)&&(X=Symbol.prototype.valueOf)),X!==void 0){var P=X.call(I,L);if(O(P))return P;throw new TypeError("unable to convert exotic object to primitive")}return L==="default"&&(_(I)||A(I))&&(L="string"),N(I,L==="default"?"number":L)}},6391:(C,v,d)=>{"use strict";var p=Object.prototype.toString,c=d(9739),O=d(1493),S=function(_){var A;if((A=arguments.length>1?arguments[1]:p.call(_)==="[object Date]"?String:Number)===String||A===Number){var N,V,I=A===String?["toString","valueOf"]:["valueOf","toString"];for(V=0;V<I.length;++V)if(O(_[I[V]])&&(N=_[I[V]](),c(N)))return N;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")};C.exports=function(_){return c(_)?_:arguments.length>1?S(_,arguments[1]):S(_)}},9739:C=>{"use strict";function v(d){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},v(d)}C.exports=function(d){return d===null||typeof d!="function"&&v(d)!=="object"}},3094:C=>{"use strict";function v(d){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},v(d)}C.exports=function d(p,c){if(p===c)return!0;if(p&&c&&v(p)=="object"&&v(c)=="object"){if(p.constructor!==c.constructor)return!1;var O,S,_;if(Array.isArray(p)){if((O=p.length)!=c.length)return!1;for(S=O;S--!=0;)if(!d(p[S],c[S]))return!1;return!0}if(p.constructor===RegExp)return p.source===c.source&&p.flags===c.flags;if(p.valueOf!==Object.prototype.valueOf)return p.valueOf()===c.valueOf();if(p.toString!==Object.prototype.toString)return p.toString()===c.toString();if((O=(_=Object.keys(p)).length)!==Object.keys(c).length)return!1;for(S=O;S--!=0;)if(!Object.prototype.hasOwnProperty.call(c,_[S]))return!1;for(S=O;S--!=0;){var A=_[S];if(!d(p[A],c[A]))return!1}return!0}return p!=p&&c!=c}},3161:C=>{"use strict";var v="Function.prototype.bind called on incompatible ",d=Array.prototype.slice,p=Object.prototype.toString,c="[object Function]";C.exports=function(O){var S=this;if(typeof S!="function"||p.call(S)!==c)throw new TypeError(v+S);for(var _,A=d.call(arguments,1),N=function(){if(this instanceof _){var P=S.apply(this,A.concat(d.call(arguments)));return Object(P)===P?P:this}return S.apply(O,A.concat(d.call(arguments)))},V=Math.max(0,S.length-A.length),I=[],X=0;X<V;X++)I.push("$"+X);if(_=Function("binder","return function ("+I.join(",")+"){ return binder.apply(this,arguments); }")(N),S.prototype){var L=function(){};L.prototype=S.prototype,_.prototype=new L,L.prototype=null}return _}},3767:(C,v,d)=>{"use strict";var p=d(3161);C.exports=Function.prototype.bind||p},7701:(C,v,d)=>{"use strict";function p(K){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},p(K)}var c,O=SyntaxError,S=Function,_=TypeError,A=function(K){try{return S('"use strict"; return ('+K+").constructor;")()}catch(rt){}},N=Object.getOwnPropertyDescriptor;if(N)try{N({},"")}catch(K){N=null}var V=function(){throw new _},I=N?function(){try{return V}catch(K){try{return N(arguments,"callee").get}catch(rt){return V}}}():V,X=d(8489)(),L=Object.getPrototypeOf||function(K){return K.__proto__},P={},b=typeof Uint8Array=="undefined"?c:L(Uint8Array),x={"%AggregateError%":typeof AggregateError=="undefined"?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?c:ArrayBuffer,"%ArrayIteratorPrototype%":X?L([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":typeof Atomics=="undefined"?c:Atomics,"%BigInt%":typeof BigInt=="undefined"?c:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?c:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?c:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?c:FinalizationRegistry,"%Function%":S,"%GeneratorFunction%":P,"%Int8Array%":typeof Int8Array=="undefined"?c:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?c:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":X?L(L([][Symbol.iterator]())):c,"%JSON%":(typeof JSON=="undefined"?"undefined":p(JSON))==="object"?JSON:c,"%Map%":typeof Map=="undefined"?c:Map,"%MapIteratorPrototype%":typeof Map!="undefined"&&X?L(new Map()[Symbol.iterator]()):c,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?c:Promise,"%Proxy%":typeof Proxy=="undefined"?c:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?c:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?c:Set,"%SetIteratorPrototype%":typeof Set!="undefined"&&X?L(new Set()[Symbol.iterator]()):c,"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":X?L(""[Symbol.iterator]()):c,"%Symbol%":X?Symbol:c,"%SyntaxError%":O,"%ThrowTypeError%":I,"%TypedArray%":b,"%TypeError%":_,"%Uint8Array%":typeof Uint8Array=="undefined"?c:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?c:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?c:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?c:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?c:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?c:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?c:WeakSet},R=function K(rt){var Ot;if(rt==="%AsyncFunction%")Ot=A("async function () {}");else if(rt==="%GeneratorFunction%")Ot=A("function* () {}");else if(rt==="%AsyncGeneratorFunction%")Ot=A("async function* () {}");else if(rt==="%AsyncGenerator%"){var mt=K("%AsyncGeneratorFunction%");mt&&(Ot=mt.prototype)}else if(rt==="%AsyncIteratorPrototype%"){var Y=K("%AsyncGenerator%");Y&&(Ot=L(Y.prototype))}return x[rt]=Ot,Ot},$={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},G=d(3767),Q=d(1888),F=G.call(Function.call,Array.prototype.concat),H=G.call(Function.apply,Array.prototype.splice),nt=G.call(Function.call,String.prototype.replace),U=G.call(Function.call,String.prototype.slice),ut=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Z=/\\(\\)?/g,M=function(K){var rt=U(K,0,1),Ot=U(K,-1);if(rt==="%"&&Ot!=="%")throw new O("invalid intrinsic syntax, expected closing `%`");if(Ot==="%"&&rt!=="%")throw new O("invalid intrinsic syntax, expected opening `%`");var mt=[];return nt(K,ut,function(Y,vt,dt,ft){mt[mt.length]=dt?nt(ft,Z,"$1"):vt||Y}),mt},J=function(K,rt){var Ot,mt=K;if(Q($,mt)&&(mt="%"+(Ot=$[mt])[0]+"%"),Q(x,mt)){var Y=x[mt];if(Y===P&&(Y=R(mt)),Y===void 0&&!rt)throw new _("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:Ot,name:mt,value:Y}}throw new O("intrinsic "+K+" does not exist!")};C.exports=function(K,rt){if(typeof K!="string"||K.length===0)throw new _("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof rt!="boolean")throw new _('"allowMissing" argument must be a boolean');var Ot=M(K),mt=Ot.length>0?Ot[0]:"",Y=J("%"+mt+"%",rt),vt=Y.name,dt=Y.value,ft=!1,yt=Y.alias;yt&&(mt=yt[0],H(Ot,F([0,1],yt)));for(var wt=1,kt=!0;wt<Ot.length;wt+=1){var Tt=Ot[wt],Dt=U(Tt,0,1),ht=U(Tt,-1);if((Dt==='"'||Dt==="'"||Dt==="`"||ht==='"'||ht==="'"||ht==="`")&&Dt!==ht)throw new O("property names with quotes must have matching quotes");if(Tt!=="constructor"&&kt||(ft=!0),Q(x,vt="%"+(mt+="."+Tt)+"%"))dt=x[vt];else if(dt!=null){if(!(Tt in dt)){if(!rt)throw new _("base intrinsic for "+K+" exists, but the property is not available.");return}if(N&&wt+1>=Ot.length){var et=N(dt,Tt);dt=(kt=!!et)&&"get"in et&&!("originalValue"in et.get)?et.get:dt[Tt]}else kt=Q(dt,Tt),dt=dt[Tt];kt&&!ft&&(x[vt]=dt)}}return dt}},8489:(C,v,d)=>{"use strict";function p(S){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},p(S)}var c=typeof Symbol!="undefined"&&Symbol,O=d(7027);C.exports=function(){return typeof c=="function"&&typeof Symbol=="function"&&p(c("foo"))==="symbol"&&p(Symbol("bar"))==="symbol"&&O()}},7027:C=>{"use strict";function v(d){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},v(d)}C.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(v(Symbol.iterator)==="symbol")return!0;var d={},p=Symbol("test"),c=Object(p);if(typeof p=="string"||Object.prototype.toString.call(p)!=="[object Symbol]"||Object.prototype.toString.call(c)!=="[object Symbol]")return!1;for(p in d[p]=42,d)return!1;if(typeof Object.keys=="function"&&Object.keys(d).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(d).length!==0)return!1;var O=Object.getOwnPropertySymbols(d);if(O.length!==1||O[0]!==p||!Object.prototype.propertyIsEnumerable.call(d,p))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var S=Object.getOwnPropertyDescriptor(d,p);if(S.value!==42||S.enumerable!==!0)return!1}return!0}},1191:(C,v,d)=>{"use strict";var p=d(7027);C.exports=function(){return p()&&!!Symbol.toStringTag}},1888:(C,v,d)=>{"use strict";var p=d(3767);C.exports=p.call(Function.call,Object.prototype.hasOwnProperty)},7480:(C,v,d)=>{"use strict";var p=d(1069),c={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},O={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},S={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_={};function A(b){return p.isMemo(b)?S:_[b.$$typeof]||c}_[p.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},_[p.Memo]=S;var N=Object.defineProperty,V=Object.getOwnPropertyNames,I=Object.getOwnPropertySymbols,X=Object.getOwnPropertyDescriptor,L=Object.getPrototypeOf,P=Object.prototype;C.exports=function b(x,R,$){if(typeof R!="string"){if(P){var G=L(R);G&&G!==P&&b(x,G,$)}var Q=V(R);I&&(Q=Q.concat(I(R)));for(var F=A(x),H=A(R),nt=0;nt<Q.length;++nt){var U=Q[nt];if(!(O[U]||$&&$[U]||H&&H[U]||F&&F[U])){var ut=X(R,U);try{N(x,U,ut)}catch(Z){}}}}return x}},7995:(C,v)=>{"use strict";function d(U){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ut){return typeof ut}:function(ut){return ut&&typeof Symbol=="function"&&ut.constructor===Symbol&&ut!==Symbol.prototype?"symbol":typeof ut},d(U)}var p=typeof Symbol=="function"&&Symbol.for,c=p?Symbol.for("react.element"):60103,O=p?Symbol.for("react.portal"):60106,S=p?Symbol.for("react.fragment"):60107,_=p?Symbol.for("react.strict_mode"):60108,A=p?Symbol.for("react.profiler"):60114,N=p?Symbol.for("react.provider"):60109,V=p?Symbol.for("react.context"):60110,I=p?Symbol.for("react.async_mode"):60111,X=p?Symbol.for("react.concurrent_mode"):60111,L=p?Symbol.for("react.forward_ref"):60112,P=p?Symbol.for("react.suspense"):60113,b=p?Symbol.for("react.suspense_list"):60120,x=p?Symbol.for("react.memo"):60115,R=p?Symbol.for("react.lazy"):60116,$=p?Symbol.for("react.block"):60121,G=p?Symbol.for("react.fundamental"):60117,Q=p?Symbol.for("react.responder"):60118,F=p?Symbol.for("react.scope"):60119;function H(U){if(d(U)==="object"&&U!==null){var ut=U.$$typeof;switch(ut){case c:switch(U=U.type){case I:case X:case S:case A:case _:case P:return U;default:switch(U=U&&U.$$typeof){case V:case L:case R:case x:case N:return U;default:return ut}}case O:return ut}}}function nt(U){return H(U)===X}v.AsyncMode=I,v.ConcurrentMode=X,v.ContextConsumer=V,v.ContextProvider=N,v.Element=c,v.ForwardRef=L,v.Fragment=S,v.Lazy=R,v.Memo=x,v.Portal=O,v.Profiler=A,v.StrictMode=_,v.Suspense=P,v.isAsyncMode=function(U){return nt(U)||H(U)===I},v.isConcurrentMode=nt,v.isContextConsumer=function(U){return H(U)===V},v.isContextProvider=function(U){return H(U)===N},v.isElement=function(U){return d(U)==="object"&&U!==null&&U.$$typeof===c},v.isForwardRef=function(U){return H(U)===L},v.isFragment=function(U){return H(U)===S},v.isLazy=function(U){return H(U)===R},v.isMemo=function(U){return H(U)===x},v.isPortal=function(U){return H(U)===O},v.isProfiler=function(U){return H(U)===A},v.isStrictMode=function(U){return H(U)===_},v.isSuspense=function(U){return H(U)===P},v.isValidElementType=function(U){return typeof U=="string"||typeof U=="function"||U===S||U===X||U===A||U===_||U===P||U===b||d(U)==="object"&&U!==null&&(U.$$typeof===R||U.$$typeof===x||U.$$typeof===N||U.$$typeof===V||U.$$typeof===L||U.$$typeof===G||U.$$typeof===Q||U.$$typeof===F||U.$$typeof===$)},v.typeOf=H},1069:(C,v,d)=>{"use strict";C.exports=d(7995)},1493:C=>{"use strict";function v(I){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},v(I)}var d,p,c=Function.prototype.toString,O=(typeof Reflect=="undefined"?"undefined":v(Reflect))==="object"&&Reflect!==null&&Reflect.apply;if(typeof O=="function"&&typeof Object.defineProperty=="function")try{d=Object.defineProperty({},"length",{get:function(){throw p}}),p={},O(function(){throw 42},null,d)}catch(I){I!==p&&(O=null)}else O=null;var S=/^\s*class\b/,_=function(I){try{var X=c.call(I);return S.test(X)}catch(L){return!1}},A=Object.prototype.toString,N=typeof Symbol=="function"&&!!Symbol.toStringTag,V=(typeof document=="undefined"?"undefined":v(document))==="object"&&document.all===void 0&&document.all!==void 0?document.all:{};C.exports=O?function(I){if(I===V)return!0;if(!I||typeof I!="function"&&v(I)!=="object")return!1;if(typeof I=="function"&&!I.prototype)return!0;try{O(I,null,d)}catch(X){if(X!==p)return!1}return!_(I)}:function(I){if(I===V)return!0;if(!I||typeof I!="function"&&v(I)!=="object")return!1;if(typeof I=="function"&&!I.prototype)return!0;if(N)return function(L){try{return!_(L)&&(c.call(L),!0)}catch(P){return!1}}(I);if(_(I))return!1;var X=A.call(I);return X==="[object Function]"||X==="[object GeneratorFunction]"}},3258:(C,v,d)=>{"use strict";function p(_){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},p(_)}var c=Date.prototype.getDay,O=Object.prototype.toString,S=d(1191)();C.exports=function(_){return p(_)==="object"&&_!==null&&(S?function(A){try{return c.call(A),!0}catch(N){return!1}}(_):O.call(_)==="[object Date]")}},1753:(C,v,d)=>{"use strict";function p(_){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},p(_)}var c=String.prototype.valueOf,O=Object.prototype.toString,S=d(1191)();C.exports=function(_){return typeof _=="string"||p(_)==="object"&&(S?function(A){try{return c.call(A),!0}catch(N){return!1}}(_):O.call(_)==="[object String]")}},8247:(C,v,d)=>{"use strict";function p(_){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},p(_)}var c=Object.prototype.toString;if(d(8489)()){var O=Symbol.prototype.toString,S=/^Symbol\(.*\)$/;C.exports=function(_){if(p(_)==="symbol")return!0;if(c.call(_)!=="[object Symbol]")return!1;try{return function(A){return p(A.valueOf())==="symbol"&&S.test(O.call(A))}(_)}catch(A){return!1}}}else C.exports=function(_){return!1}},7e3:(C,v,d)=>{var p=d(6286);C.exports=function(c){var O=p(c,"line-height"),S=parseFloat(O,10);if(O===S+""){var _=c.style.lineHeight;c.style.lineHeight=O+"em",O=p(c,"line-height"),S=parseFloat(O,10),_?c.style.lineHeight=_:delete c.style.lineHeight}if(O.indexOf("pt")!==-1?(S*=4,S/=3):O.indexOf("mm")!==-1?(S*=96,S/=25.4):O.indexOf("cm")!==-1?(S*=96,S/=2.54):O.indexOf("in")!==-1?S*=96:O.indexOf("pc")!==-1&&(S*=16),S=Math.round(S),O==="normal"){var A=c.nodeName,N=document.createElement(A);N.innerHTML="&nbsp;",A.toUpperCase()==="TEXTAREA"&&N.setAttribute("rows","1");var V=p(c,"font-size");N.style.fontSize=V,N.style.padding="0px",N.style.border="0px";var I=document.body;I.appendChild(N),S=N.offsetHeight,I.removeChild(N)}return S}},8436:(C,v,d)=>{"use strict";function p(F){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},p(F)}var c=d(2867),O=d(2940),S=d(2459),_=d(1888),A=d(2293),N=function(F){S(!1,F)},V=String.prototype.replace,I=String.prototype.split,X="||||",L=function(F){var H=F%100,nt=H%10;return H!==11&&nt===1?0:2<=nt&&nt<=4&&!(H>=12&&H<=14)?1:2},P={pluralTypes:{arabic:function(F){if(F<3)return F;var H=F%100;return H>=3&&H<=10?3:H>=11?4:5},bosnian_serbian:L,chinese:function(){return 0},croatian:L,french:function(F){return F>=2?1:0},german:function(F){return F!==1?1:0},russian:L,lithuanian:function(F){return F%10==1&&F%100!=11?0:F%10>=2&&F%10<=9&&(F%100<11||F%100>19)?1:2},czech:function(F){return F===1?0:F>=2&&F<=4?1:2},polish:function(F){if(F===1)return 0;var H=F%10;return 2<=H&&H<=4&&(F%100<10||F%100>=20)?1:2},icelandic:function(F){return F%10!=1||F%100==11?1:0},slovenian:function(F){var H=F%100;return H===1?0:H===2?1:H===3||H===4?2:3}},pluralTypeToLanguages:{arabic:["ar"],bosnian_serbian:["bs-Latn-BA","bs-Cyrl-BA","srl-RS","sr-RS"],chinese:["id","id-ID","ja","ko","ko-KR","lo","ms","th","th-TH","zh"],croatian:["hr","hr-HR"],german:["fa","da","de","en","es","fi","el","he","hi-IN","hu","hu-HU","it","nl","no","pt","sv","tr"],french:["fr","tl","pt-br"],russian:["ru","ru-RU"],lithuanian:["lt"],czech:["cs","cs-CZ","sk"],polish:["pl"],icelandic:["is"],slovenian:["sl-SL"]}};function b(F){return F.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var x,R=(x={},function(F,H){var nt=x[H];return nt&&!F.pluralTypes[nt]&&(nt=null,x[H]=nt),nt||(nt=function(U,ut){var Z,M,J=(Z=U.pluralTypeToLanguages,M={},c(O(Z),function(K){var rt=K[0],Ot=K[1];c(Ot,function(mt){M[mt]=rt})}),M);return J[ut]||J[I.call(ut,/-/,1)[0]]||J.en}(F,H))&&(x[H]=nt),nt}),$=/%\{(.*?)\}/g;function G(F,H,nt,U,ut){if(typeof F!="string")throw new TypeError("Polyglot.transformPhrase expects argument #1 to be string");if(H==null)return F;var Z=F,M=U||$,J=typeof H=="number"?{smart_count:H}:H;if(J.smart_count!=null&&F){var K=ut||P,rt=I.call(F,X),Ot=function(mt,Y,vt){return mt.pluralTypes[Y](vt)}(K,R(K,nt||"en"),J.smart_count);Z=A(rt[Ot]||rt[0])}return V.call(Z,M,function(mt,Y){return _(J,Y)&&J[Y]!=null?J[Y]:mt})}function Q(F){var H=F||{};this.phrases={},this.extend(H.phrases||{}),this.currentLocale=H.locale||"en";var nt=H.allowMissing?G:null;this.onMissingKey=typeof H.onMissingKey=="function"?H.onMissingKey:nt,this.warn=H.warn||N,this.tokenRegex=function(U){var ut=U&&U.prefix||"%{",Z=U&&U.suffix||"}";if(ut===X||Z===X)throw new RangeError('"||||" token is reserved for pluralization');return new RegExp(b(ut)+"(.*?)"+b(Z),"g")}(H.interpolation),this.pluralRules=H.pluralRules||P}Q.prototype.locale=function(F){return F&&(this.currentLocale=F),this.currentLocale},Q.prototype.extend=function(F,H){c(O(F||{}),function(nt){var U=nt[0],ut=nt[1],Z=H?H+"."+U:U;p(ut)==="object"?this.extend(ut,Z):this.phrases[Z]=ut},this)},Q.prototype.unset=function(F,H){typeof F=="string"?delete this.phrases[F]:c(O(F||{}),function(nt){var U=nt[0],ut=nt[1],Z=H?H+"."+U:U;p(ut)==="object"?this.unset(ut,Z):delete this.phrases[Z]},this)},Q.prototype.clear=function(){this.phrases={}},Q.prototype.replace=function(F){this.clear(),this.extend(F)},Q.prototype.t=function(F,H){var nt,U,ut=H==null?{}:H;return typeof this.phrases[F]=="string"?nt=this.phrases[F]:typeof ut._=="string"?nt=ut._:this.onMissingKey?U=(0,this.onMissingKey)(F,ut,this.currentLocale,this.tokenRegex,this.pluralRules):(this.warn('Missing translation for key: "'+F+'"'),U=F),typeof nt=="string"&&(U=G(nt,ut,this.currentLocale,this.tokenRegex,this.pluralRules)),U},Q.prototype.has=function(F){return _(this.phrases,F)},Q.transformPhrase=function(F,H,nt){return G(F,H,nt)},C.exports=Q},7594:(C,v,d)=>{function p(et){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},p(et)}var c=typeof Map=="function"&&Map.prototype,O=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,S=c&&O&&typeof O.get=="function"?O.get:null,_=c&&Map.prototype.forEach,A=typeof Set=="function"&&Set.prototype,N=Object.getOwnPropertyDescriptor&&A?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,V=A&&N&&typeof N.get=="function"?N.get:null,I=A&&Set.prototype.forEach,X=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,L=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,P=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,x=Object.prototype.toString,R=Function.prototype.toString,$=String.prototype.match,G=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Q=Object.getOwnPropertySymbols,F=typeof Symbol=="function"&&p(Symbol.iterator)==="symbol"?Symbol.prototype.toString:null,H=typeof Symbol=="function"&&p(Symbol.iterator)==="object",nt=Object.prototype.propertyIsEnumerable,U=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(et){return et.__proto__}:null),ut=d(4654).custom,Z=ut&&Ot(ut)?ut:null,M=typeof Symbol=="function"&&Symbol.toStringTag!==void 0?Symbol.toStringTag:null;function J(et,W,jt){var Nt=(jt.quoteStyle||W)==="double"?'"':"'";return Nt+et+Nt}function K(et){return String(et).replace(/"/g,"&quot;")}function rt(et){return!(vt(et)!=="[object Array]"||M&&p(et)==="object"&&M in et)}function Ot(et){if(H)return et&&p(et)==="object"&&et instanceof Symbol;if(p(et)==="symbol")return!0;if(!et||p(et)!=="object"||!F)return!1;try{return F.call(et),!0}catch(W){}return!1}C.exports=function et(W,jt,Nt,Qt){var bt=jt||{};if(Y(bt,"quoteStyle")&&bt.quoteStyle!=="single"&&bt.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(bt,"maxStringLength")&&(typeof bt.maxStringLength=="number"?bt.maxStringLength<0&&bt.maxStringLength!==1/0:bt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Zt=!Y(bt,"customInspect")||bt.customInspect;if(typeof Zt!="boolean"&&Zt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(bt,"indent")&&bt.indent!==null&&bt.indent!==" "&&!(parseInt(bt.indent,10)===bt.indent&&bt.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(W===void 0)return"undefined";if(W===null)return"null";if(typeof W=="boolean")return W?"true":"false";if(typeof W=="string")return ft(W,bt);if(typeof W=="number")return W===0?1/0/W>0?"0":"-0":String(W);if(typeof W=="bigint")return String(W)+"n";var Yt=bt.depth===void 0?5:bt.depth;if(Nt===void 0&&(Nt=0),Nt>=Yt&&Yt>0&&p(W)==="object")return rt(W)?"[Array]":"[Object]";var zt,Xt=function(lt,Wt){var Pe;if(lt.indent===" ")Pe=" ";else{if(!(typeof lt.indent=="number"&&lt.indent>0))return null;Pe=Array(lt.indent+1).join(" ")}return{base:Pe,prev:Array(Wt+1).join(Pe)}}(bt,Nt);if(Qt===void 0)Qt=[];else if(dt(Qt,W)>=0)return"[Circular]";function qt(lt,Wt,Pe){if(Wt&&(Qt=Qt.slice()).push(Wt),Pe){var Ye={depth:bt.depth};return Y(bt,"quoteStyle")&&(Ye.quoteStyle=bt.quoteStyle),et(lt,Ye,Nt+1,Qt)}return et(lt,bt,Nt+1,Qt)}if(typeof W=="function"){var ae=function(lt){if(lt.name)return lt.name;var Wt=$.call(R.call(lt),/^function\s*([\w$]+)/);return Wt?Wt[1]:null}(W),Se=ht(W,qt);return"[Function"+(ae?": "+ae:" (anonymous)")+"]"+(Se.length>0?" { "+Se.join(", ")+" }":"")}if(Ot(W)){var Oe=H?String(W).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(W);return p(W)!=="object"||H?Oe:wt(Oe)}if((zt=W)&&p(zt)==="object"&&(typeof HTMLElement!="undefined"&&zt instanceof HTMLElement||typeof zt.nodeName=="string"&&typeof zt.getAttribute=="function")){for(var we="<"+String(W.nodeName).toLowerCase(),je=W.attributes||[],ce=0;ce<je.length;ce++)we+=" "+je[ce].name+"="+J(K(je[ce].value),"double",bt);return we+=">",W.childNodes&&W.childNodes.length&&(we+="..."),we+"</"+String(W.nodeName).toLowerCase()+">"}if(rt(W)){if(W.length===0)return"[]";var _e=ht(W,qt);return Xt&&!function(lt){for(var Wt=0;Wt<lt.length;Wt++)if(dt(lt[Wt],`
33539
33608
  `)>=0)return!1;return!0}(_e)?"["+Dt(_e,Xt)+"]":"[ "+_e.join(", ")+" ]"}if(function(lt){return!(vt(lt)!=="[object Error]"||M&&p(lt)==="object"&&M in lt)}(W)){var ke=ht(W,qt);return ke.length===0?"["+String(W)+"]":"{ ["+String(W)+"] "+ke.join(", ")+" }"}if(p(W)==="object"&&Zt){if(Z&&typeof W[Z]=="function")return W[Z]();if(Zt!=="symbol"&&typeof W.inspect=="function")return W.inspect()}if(function(lt){if(!S||!lt||p(lt)!=="object")return!1;try{S.call(lt);try{V.call(lt)}catch(Wt){return!0}return lt instanceof Map}catch(Wt){}return!1}(W)){var De=[];return _.call(W,function(lt,Wt){De.push(qt(Wt,W,!0)+" => "+qt(lt,W))}),Tt("Map",S.call(W),De,Xt)}if(function(lt){if(!V||!lt||p(lt)!=="object")return!1;try{V.call(lt);try{S.call(lt)}catch(Wt){return!0}return lt instanceof Set}catch(Wt){}return!1}(W)){var cn=[];return I.call(W,function(lt){cn.push(qt(lt,W))}),Tt("Set",V.call(W),cn,Xt)}if(function(lt){if(!X||!lt||p(lt)!=="object")return!1;try{X.call(lt,X);try{L.call(lt,L)}catch(Wt){return!0}return lt instanceof WeakMap}catch(Wt){}return!1}(W))return kt("WeakMap");if(function(lt){if(!L||!lt||p(lt)!=="object")return!1;try{L.call(lt,L);try{X.call(lt,X)}catch(Wt){return!0}return lt instanceof WeakSet}catch(Wt){}return!1}(W))return kt("WeakSet");if(function(lt){if(!P||!lt||p(lt)!=="object")return!1;try{return P.call(lt),!0}catch(Wt){}return!1}(W))return kt("WeakRef");if(function(lt){return!(vt(lt)!=="[object Number]"||M&&p(lt)==="object"&&M in lt)}(W))return wt(qt(Number(W)));if(function(lt){if(!lt||p(lt)!=="object"||!G)return!1;try{return G.call(lt),!0}catch(Wt){}return!1}(W))return wt(qt(G.call(W)));if(function(lt){return!(vt(lt)!=="[object Boolean]"||M&&p(lt)==="object"&&M in lt)}(W))return wt(b.call(W));if(function(lt){return!(vt(lt)!=="[object String]"||M&&p(lt)==="object"&&M in lt)}(W))return wt(qt(String(W)));if(!function(lt){return!(vt(lt)!=="[object Date]"||M&&p(lt)==="object"&&M in lt)}(W)&&!function(lt){return!(vt(lt)!=="[object RegExp]"||M&&p(lt)==="object"&&M in lt)}(W)){var en=ht(W,qt),nn=U?U(W)===Object.prototype:W instanceof Object||W.constructor===Object,Me=W instanceof Object?"":"null prototype",$e=!nn&&M&&Object(W)===W&&M in W?vt(W).slice(8,-1):Me?"Object":"",Fe=(nn||typeof W.constructor!="function"?"":W.constructor.name?W.constructor.name+" ":"")+($e||Me?"["+[].concat($e||[],Me||[]).join(": ")+"] ":"");return en.length===0?Fe+"{}":Xt?Fe+"{"+Dt(en,Xt)+"}":Fe+"{ "+en.join(", ")+" }"}return String(W)};var mt=Object.prototype.hasOwnProperty||function(et){return et in this};function Y(et,W){return mt.call(et,W)}function vt(et){return x.call(et)}function dt(et,W){if(et.indexOf)return et.indexOf(W);for(var jt=0,Nt=et.length;jt<Nt;jt++)if(et[jt]===W)return jt;return-1}function ft(et,W){if(et.length>W.maxStringLength){var jt=et.length-W.maxStringLength,Nt="... "+jt+" more character"+(jt>1?"s":"");return ft(et.slice(0,W.maxStringLength),W)+Nt}return J(et.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,yt),"single",W)}function yt(et){var W=et.charCodeAt(0),jt={8:"b",9:"t",10:"n",12:"f",13:"r"}[W];return jt?"\\"+jt:"\\x"+(W<16?"0":"")+W.toString(16).toUpperCase()}function wt(et){return"Object("+et+")"}function kt(et){return et+" { ? }"}function Tt(et,W,jt,Nt){return et+" ("+W+") {"+(Nt?Dt(jt,Nt):jt.join(", "))+"}"}function Dt(et,W){if(et.length===0)return"";var jt=`
33540
33609
  `+W.prev+W.base;return jt+et.join(","+jt)+`
@@ -37202,7 +37271,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
37202
37271
  <script>(function(){window.openImagePreviewModal=function(W,$){let L="var(--tf-primary-color, #2586c7)",v="white",I="white";document.querySelector(".tf-embed-sdk")&&window.__unviredThemeData&&(window.__unviredThemeData.primaryColor&&(L=window.__unviredThemeData.primaryColor),window.__unviredThemeData.secondaryColor&&(v=window.__unviredThemeData.secondaryColor),window.__unviredThemeData.backgroundColor&&(I=window.__unviredThemeData.backgroundColor));const l=document.createElement("div");l.style.position="fixed",l.style.top="0",l.style.left="0",l.style.width="100vw",l.style.height="100vh",l.style.backgroundColor="rgba(0, 0, 0, 0.85)",l.style.display="flex",l.style.alignItems="center",l.style.justifyContent="center",l.style.zIndex="999999";const r=document.createElement("div");r.style.width="90vw",r.style.height="90vh",r.style.backgroundColor="#fff",r.style.borderRadius="8px",r.style.display="flex",r.style.flexDirection="column",r.style.overflow="hidden",r.style.boxShadow="0 4px 12px rgba(0,0,0,0.5)";const p=document.createElement("div");p.style.backgroundColor=L,p.style.color=v,p.style.padding="10px 15px",p.style.display="flex",p.style.justifyContent="space-between",p.style.alignItems="center",p.style.position="relative";const y=document.createElement("button");y.innerHTML="Reset",y.title="Reset Zoom",y.style.background="transparent",y.style.border=`1px solid ${v}`,y.style.borderRadius="4px",y.style.color=v,y.style.fontSize="12px",y.style.cursor="pointer",y.style.padding="4px 10px",p.appendChild(y);const d=document.createElement("span");d.textContent=$||"Preview",d.style.fontSize="16px",d.style.fontWeight="500",d.style.whiteSpace="nowrap",d.style.overflow="hidden",d.style.setProperty("color",v,"important"),d.style.textOverflow="ellipsis",d.style.position="absolute",d.style.left="50%",d.style.transform="translateX(-50%)",d.style.maxWidth="50%",p.appendChild(d);const h=document.createElement("button");h.innerHTML="\u2715",h.style.background="transparent",h.style.border="none",h.style.color=v,h.style.fontSize="20px",h.style.cursor="pointer",h.style.padding="0",h.style.lineHeight="1",h.addEventListener("click",t=>{t.stopPropagation(),document.body.removeChild(l)}),p.appendChild(h);const i=document.createElement("div");i.style.flex="1",i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.backgroundColor=I,i.style.overflow="hidden";const u=document.createElement("img");u.src=W,u.style.maxWidth="100%",u.style.maxHeight="100%",u.style.objectFit="contain",u.style.transition="transform 0.2s ease-in-out",i.appendChild(u);let a=1,m=0,f=0;function x(t=!1){const o=i.offsetWidth,e=i.offsetHeight,s=u.offsetWidth*a,g=u.offsetHeight*a,n=Math.abs(s-o)/2,C=Math.abs(g-e)/2;m=Math.max(-n,Math.min(m,n)),f=Math.max(-C,Math.min(f,C)),t?u.style.transition="transform 0.2s ease-in-out":u.style.transition="none",u.style.transform=`translate(${m}px, ${f}px) scale(${a})`}x(),i.addEventListener("wheel",t=>{t.preventDefault();const e=Math.exp((t.deltaY<0?1:-1)*.1);let s=a*e;s<.5&&(s=.5),s>50&&(s=50);const g=s/a,n=i.getBoundingClientRect(),C=n.width/2,D=n.height/2,T=t.clientX-n.left-C,k=t.clientY-n.top-D;m=T-(T-m)*g,f=k-(k-f)*g,a=s,x(!1)},{passive:!1});let b=null;i.addEventListener("touchstart",t=>{t.touches.length===2&&(t.preventDefault(),b=Math.hypot(t.touches[0].clientX-t.touches[1].clientX,t.touches[0].clientY-t.touches[1].clientY))},{passive:!1}),i.addEventListener("touchmove",t=>{if(t.touches.length===2&&b!==null){t.preventDefault();const o=Math.hypot(t.touches[0].clientX-t.touches[1].clientX,t.touches[0].clientY-t.touches[1].clientY),e=o/b;let s=a*e;s<.5&&(s=.5),s>50&&(s=50);const g=s/a,n=i.getBoundingClientRect(),C=n.width/2,D=n.height/2,T=(t.touches[0].clientX+t.touches[1].clientX)/2,k=(t.touches[0].clientY+t.touches[1].clientY)/2,H=T-n.left-C,j=k-n.top-D;m=H-(H-m)*g,f=j-(j-f)*g,a=s,b=o,x(!1)}},{passive:!1}),i.addEventListener("touchend",t=>{t.touches.length<2&&(b=null)});const c=document.createElement("div");c.style.backgroundColor=L,c.style.color=v,c.style.padding="10px 15px",c.style.display="flex",c.style.justifyContent="center",c.style.alignItems="center",c.style.gap="15px";const w=(t,o)=>{const e=document.createElement("button");return e.innerHTML=t,e.title=o,e.style.background="transparent",e.style.border=`1px solid ${v}`,e.style.borderRadius="4px",e.style.color=v,e.style.fontSize="18px",e.style.fontWeight="bold",e.style.cursor="pointer",e.style.width="35px",e.style.height="35px",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center",e},_=w("+","Zoom In"),P=w("\u2212","Zoom Out"),B=w("\u2190","Move Left"),S=w("\u2192","Move Right"),X=w("\u2191","Move Up"),Y=w("\u2193","Move Down");c.appendChild(_),c.appendChild(P),c.appendChild(B),c.appendChild(S),c.appendChild(X),c.appendChild(Y);const E=50;_.addEventListener("click",t=>{t.stopPropagation();let o=a+.5;o>50&&(o=50),a=o,x(!0)}),P.addEventListener("click",t=>{t.stopPropagation();let o=a-.5;o<.5&&(o=.5),a=o,x(!0)});let z=null,R=null;const M=(t,o,e)=>{const s=n=>{n.type==="touchstart"&&n.cancelable&&n.preventDefault(),n.stopPropagation(),m+=o,f+=e,x(!0),R=setTimeout(()=>{z=setInterval(()=>{m+=o*.4,f+=e*.4,x(!1)},20)},300)},g=()=>{clearTimeout(R),clearInterval(z)};t.addEventListener("mousedown",s),t.addEventListener("touchstart",s,{passive:!1}),["mouseup","mouseleave","touchend","touchcancel"].forEach(n=>{t.addEventListener(n,g)})};M(B,E,0),M(S,-E,0),M(X,0,E),M(Y,0,-E),y.addEventListener("click",t=>{t.stopPropagation(),a=1,m=0,f=0,x(!0)}),r.appendChild(p),r.appendChild(i),r.appendChild(c),l.addEventListener("click",t=>{t.target===l&&document.body.removeChild(l)}),l.appendChild(r),document.body.appendChild(l)}})();</script>
37203
37272
  <script>(function(){const n=typeof Formio!="undefined"?Formio:typeof window!="undefined"?window.Formio:void 0,a=n&&n.Components&&n.Components.components?n.Components.components.textfield:class{static schema(){return{}}};class i extends a{constructor(o,e,r){super(o,e,r)}static schema(...o){return a.schema({type:"smartId",label:"Smart ID",input:!0,key:"smartId",inputType:"text",inputFormat:"plain",disabled:!0},...o)}static get builderInfo(){return{title:"Smart Id",group:"premium",icon:"id-card-o",weight:40,documentation:"http://help.form.io/userguide/#textfield",schema:i.schema()}}static addTemplate(o,e){Templates.templates[o]=e}get defaultSchema(){return i.schema()}render(){return super.render(this.renderTemplate("input",{input:this.inputInfo}))}attach(o){let e=new Date,r="",s="";if(Number(e.getDate())<=9&&this.component.addLeadingZeros?r="0"+e.getDate():r=e.getDate(),Number(e.getMonth())<=9&&this.component.addLeadingZeros?s="0"+Number(e.getMonth()+1):s=Number(e.getMonth()+1),this.component.addLeadingZeros&&this.component.startCounter!="undefined"&&((this.component.startCounter=="undefined"||this.component.startCounter==null)&&(this.component.startCounter=1),this.component.digitsInConter&&(this.component.startCounter=String(this.component.startCounter).padStart(this.component.digitsInConter,0))),this.component.pattern){let t=this.component.pattern;t.includes("${counter}")?(t=t.replace("${day}",r),t=t.replace("${month}",s),t=t.replace("${year}",e.getFullYear()),t=t.replace("${day}",r),t=t.replace("${counter}",this.component.startCounter),this.setValue(t)):this.resetValue()}return super.attach(o)}}n&&n.Components?n.Components.addComponent("smartId",i):typeof Formio!="undefined"&&Formio.Components&&Formio.Components.addComponent("smartId",i)})();</script>
37204
37273
  <script>(function(){const m=Formio.Components.components.nested;class r extends m{static schema(...t){return m.schema({label:"Columns",key:"columns",type:"columns",columns:[{components:[],width:8,offset:0,push:0,pull:0,size:"md"},{components:[],width:8,offset:0,push:0,pull:0,size:"md"}],clearOnHide:!1,input:!1,tableView:!1,persistent:!1,autoAdjust:!1},...t)}static get builderInfo(){return{title:"Columns",icon:"columns",group:"layout",documentation:"/userguide/form-building/layout-components#columns",showPreview:!1,weight:10,schema:r.schema()}}constructor(t,e,o){super(t,e,o),this.rows=[]}get schema(){var e;const t=_.omit(super.schema,["components"]);return(e=t.columns)==null||e.map((o,s)=>{o.components.map((n,c)=>{const i=_.clone(n);i.internal=!0;const u=this.createComponent(i);delete u.component.internal,t.columns[s].components[c]=u.schema})}),t}get defaultSchema(){return r.schema()}get className(){return`row ${super.className}`}get columnKey(){return`column-${this.id}`}init(){super.init(),this.columns=[],_.each(this.component.columns,(t,e)=>{this.columns[e]=[],t.size||(t.size="md"),t.currentWidth=t.width||0,Array.isArray(t.components)||(t.components=[]),_.each(t.components,o=>{const s=this.createComponent(o);s.column=e,this.columns[e].push(s)})}),this.component.autoAdjust&&this.options.display!=="pdf"&&this.justify(),this.rows=this.groupByRow()}labelIsHidden(){return!0}render(){return super.render(this.renderTemplate("columns",{columnKey:this.columnKey,columnComponents:this.columns.map(t=>this.renderComponents(t))}))}justifyColumn(t,e){const o=_.every(t,i=>!i.visible),s=this.component.columns[e],n=o&&t.length?0:s.width,c=!_.isEqual(n,s.currentWidth);return s.currentWidth=n,c}justify(){return this.columns.reduce((t,e,o)=>this.justifyColumn(e,o)||t,!1)}attach(t){this.loadRefs(t,{[this.columnKey]:"multiple"});const e=super.attach(t);return this.refs[this.columnKey]&&this.refs[this.columnKey].forEach((o,s)=>this.attachComponents(o,this.columns[s],this.component.columns[s].components)),e}get gridSize(){return 12}groupByRow(){const t={stack:[],rows:[]},e=s=>s.component.width,o=_.reduce(this.components,(s,n)=>{const c=[...s.stack,n];return _.sumBy(c,e)<=this.gridSize?(s.stack=c,s):(s.rows=[...s.rows,s.stack],s.stack=[n],s)},t);return _.concat(o.rows,[o.stack])}checkData(t,e,o,s){const n=super.checkData(t,e,o,s);if(this.component.autoAdjust&&this.options.display!=="pdf"&&this.justify()){const i=document.activeElement;i&&(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.classList.contains("choices__input"))||this.redraw()}return n}detach(t){super.detach(t)}destroy(){super.destroy(),this.columns=[]}}Formio.Components.addComponent("columns",r)})();</script>
37205
- <script>(function(){var w=Formio.Components;const u=w.components.htmlelement;class g extends u{constructor(o,e,i){super(o,e,i)}static schema(...o){return u.schema({label:"Smart Data Component",key:"sdc",type:"smartdata",tag:"h5",attrs:[{attr:"style",value:"padding: 15px;text-align: center;border: 2px dashed #ddd;"}],content:"Smart Data Component",input:!1,persistent:!1,hidden:!0},...o)}get key(){return _.get(this.component,"key","")}static get builderInfo(){return{title:"Smart Data",icon:"cloud",group:"premium",documentation:"http://help.form.io/userguide/#sdc",weight:30,schema:g.schema()}}get defaultSchema(){return g.schema()}get content(){if(this.builderMode)return this.component.content;const o=_.get(this.root,"submission",{});return this.component.content?this.interpolate(this.component.content,{metadata:o.metadata||{},submission:o,data:this.rootValue,row:this.data}):""}get singleTags(){return["br","img","hr"]}renderContent(){const o=_.get(this.root,"submission",{});return this.renderTemplate("html",{component:this.component,tag:this.component.tag,attrs:(this.component.attrs||[]).map(e=>({attr:e.attr,value:this.interpolate(e.value,{metadata:o.metadata||{},submission:o,data:this.rootValue,row:this.data})})),content:this.component.label,singleTags:this.singleTags})}render(){return this.component.hidden=!0,super.render(this.renderContent())}async attach(o){this.loadRefs(o,{html:"single"}),logger.info("[TF_SDK:195] \u2705 attach called");let e=this;switch(this.component.dataSrc){case"url":logger.info("[TF_SDK:196] \u2705 inside switch url"),(_.get(this.component,"trigger.prefetch.triggerSDC")==="onFormLoad"||_.get(this.component,"trigger.prefetch.init"))&&await this.executeJS()&&Formio.makeStaticRequest(this.interpolate(this.component.fetchapi.url),(this.component.fetchapi.method||"get").toUpperCase(),null,{headers:this.requestHeaders,noToken:!(this.component.fetchapi&&this.component.fetchapi.authenticate)}).then(function(f){e.assign(f)}),this.on(this.key,async c=>{e.component.trigger&&e.component.trigger.beforefetch&&(logger.info("[TF_SDK:198] \u2705 Executing beforefetch Javascript URL - Button Click"),this.evaluate(e.component.trigger.beforefetch.panel.javascript)),await this.executeJS()&&Formio.makeStaticRequest(this.interpolate(this.component.fetchapi.url),(this.component.fetchapi.method||"get").toUpperCase(),null,{headers:this.requestHeaders,noToken:!(this.component.fetchapi&&this.component.fetchapi.authenticate)}).then(function(l){e.assign(l)})},!0);break;case"workflow":logger.info("[TF_SDK:199] \u2705 inside switch workflow");const s=_.get(this.component,"trigger.prefetch.triggerSDC")==="onFormLoad"||_.get(this.component,"trigger.prefetch.init");s&&(e.component.trigger&&e.component.trigger.beforefetch&&(logger.info("[TF_SDK:200] \u2705 Executing beforefetch Javascript workflow - Init"),this.evaluate(e.component.trigger.beforefetch.panel.javascript)),this.builderMode||await this.executeJS()&&await this.executeworkflow(this.component,this.data,void 0)),(_.get(this.component,"trigger.prefetch.triggerSDC")==="onComponentAction"||_.get(this.component,"trigger.prefetch.triggerbycomponent")||!s)&&this.on(this.key,async c=>{e.component.trigger&&e.component.trigger.beforefetch?(logger.info("[TF_SDK:202] \u2705 Executing beforefetch Javascript workflow - Button Click"),this.builderMode||await this.executeJS()&&await this.executeworkflow(this.component,this.data,c?c.detail:void 0)):this.builderMode||await this.executeworkflow(this.component,this.data,c?c.detail:void 0)},!0);break}return super.attach(o)}assign(o){this.data=o;const e=_.get(this.component,"trigger.postfetch.event","SmartDataEvent");this.emitcustomformioevent(e,this.component,o)}async executeJS(){return this.component.trigger&&this.component.trigger.beforefetch&&(logger.info("[TF_SDK:203] \u2705 Executing beforefetch Javascript code"),await this.evaluate(this.component.trigger.beforefetch.panel.javascript)),!0}executeworkflow(o,e,i){let s=document.getElementsByClassName("sdc-spinner");s&&s.length>0&&(s[0].style.display="flex",s[0].style.justifyContent="center"),i||(i=e?e.equipNr:void 0);let r=this,c="",f="";if(window.formId)c=window.formId;else if(this.root&&this.root.form&&this.root.form.formId)c=this.root.form.formId;else if(this.root&&this.root._form&&this.root._form.formId)c=this.root._form.formId;else if(e&&e.formId)c=e.formId;else if(window.location&&window.location.pathname){const t=window.location.pathname.split("/");t.length>3&&t[3]&&(c=t[3].split(";")[0]||"")}o.fetchapi&&(f=o.fetchapi.workflowname||"");let l="";if(window.UMP_url)l=window.UMP_url;else if(this.root&&this.root.options&&this.root.options.umpUrl)l=this.root.options.umpUrl;else if(localStorage.getItem("UMP_url"))l=localStorage.getItem("UMP_url");else if(localStorage.getItem("sso_ump_url"))l=localStorage.getItem("sso_ump_url");else if(localStorage.getItem("login"))try{const t=JSON.parse(localStorage.getItem("login"));t&&t.umpUrl&&(l=t.umpUrl)}catch(t){}l&&(l=l.replace(/\/UMP\/?$/,"").replace(/\/$/,""));let a="";if(window.jwtToken?a=window.jwtToken:window.token?a=window.token:this.root&&this.root.options&&this.root.options.token?a=this.root.options.token:localStorage.getItem("token")?a=localStorage.getItem("token"):localStorage.getItem("sso_token")?a=localStorage.getItem("sso_token"):localStorage.getItem("UNVIRED_JWT_TOKEN_DIGITAL_FORMS")?a=localStorage.getItem("UNVIRED_JWT_TOKEN_DIGITAL_FORMS"):localStorage.getItem("UNVIRED_JWT_TOKEN_undefined")&&(a=localStorage.getItem("UNVIRED_JWT_TOKEN_undefined")),!a||a.trim().length===0)for(let t=0;t<localStorage.length;t++){const m=localStorage.key(t);if(m){const p=localStorage.getItem(m);if(p&&typeof p=="string"&&p.trim().startsWith("eyJ")){a=p.trim();break}}}a&&(a=a.replace(/^Bearer\s+/i,"").trim()),console.log("[SDC] \u{1F680} Executing workflow:",{workflowName:f,componentKey:o.key,formId:c,eventData:i,formData:e,umpUrl:l||"(not configured)",hasToken:!!a});let h=`formdata=${encodeURIComponent(JSON.stringify(e||{}))}`;if(i)if(typeof i=="object"){const t=encodeURIComponent(JSON.stringify(i));h=h+`&flowinput=${t}&eventdata=${t}`}else{const t=encodeURIComponent(i);h=h+`&flowinput=${t}&eventdata=${t}`}window.ump&&typeof window.ump.logInfo=="function"&&window.ump.logInfo("sdc","executeworkflow()","jwt token - "+a);const d=`${l}/UMP/API/v3/applications/DIGITAL_FORMS/workflow/${f}?${h}`;console.log("[SDC] \u{1F310} Request URL:",d),Formio.makeStaticRequest(d,"POST",null,{headers:{Authorization:a?"Bearer "+a:"",Accept:"application/json","Content-type":"application/json"}}).then(function(t){if(console.log("[SDC] \u2705 Workflow response received:",t),window.ump&&typeof window.ump.logInfo=="function"&&window.ump.logInfo("sdc","executeworkflow()","workflowdata - "+JSON.stringify(t)),s&&s.length>0&&(s[0].style.display="none",s[0].style.justifyContent=""),t){try{r.data.error=t.error,t.data!==""?r.data=Object.assign(r.data||{},typeof t.data=="string"?JSON.parse(t.data):t.data):r.data=Object.assign(r.data||{},t.data)}catch(m){t.data!==""&&(r.data=Object.assign(r.data||{},t.data))}r.root&&typeof r.root.redraw=="function"?r.root.redraw():typeof r.triggerChange=="function"&&r.triggerChange(),r.emitcustomformioevent(r.component.trigger.postfetch.event,r.component,r.data)}}).catch(t=>{console.warn("[SDC] \u26A0\uFE0F Workflow fetch failed (expected in local testing without live UMP backend):",t),window.ump&&typeof window.ump.logInfo=="function"&&window.ump.logInfo("sdc","executeworkflow()","workflowdata error- "+JSON.stringify(t)),s&&s.length>0&&(s[0].style.display="none",s[0].style.justifyContent=""),logger.error("[TF_SDK:205] \u274C Error occured while fetching workflow data:",t),this.emitcustomformioevent("WorkflowExecuteError",this.component,t)})}emitcustomformioevent(o,e,i){if(console.log("[SDC] \u{1F4E2} Emitting custom SDC event:",o,{component:e,data:i}),window.eventtype=i,this.emit(o,{component:e,data:i}),this.component.trigger&&this.component.trigger.postfetch&&this.component.trigger.postfetch.panel&&this.component.trigger.postfetch.panel.javascript)try{this.evaluate(this.component.trigger.postfetch.panel.javascript)}catch(r){console.error("[SDC] Error evaluating postfetch JS:",r)}let s=new CustomEvent("sdcDoneEvent",{detail:{type:o,component:e,data:i}});document.dispatchEvent(s),typeof window.sendEventCallback=="function"&&window.sendEventCallback({type:o,message:o==="WorkflowExecuteError"?"SDC workflow execution failed.":"SDC workflow completed successfully.",errorMessage:o==="WorkflowExecuteError"?i&&i.message?i.message:"SDC workflow error":"",data:{component:e,sdcData:i,key:e?e.key:""}})}}g.requestHeaders={get:function(){let S=this,o=new Formio.Headers;if(this.component.fetchapi&&this.component.fetchapi.headers)try{this.component.fetchapi.headers.forEach(function(e){e.key&&o.set(n.key,S.interpolate(e.value))})}catch(e){logger.warn(e.message)}return o},enumerable:!0,configurable:!0},Formio.Components.addComponent("smartdata",g)})();</script>
37274
+ <script>(function(){function w(g="Loading Data...",t="Please wait while we process your request"){let e=document.getElementById("sdc-form-loader");if(!e)e=document.createElement("div"),e.id="sdc-form-loader",e.className="sdc-modal-overlay",e.innerHTML=`
37275
+ <div class="sdc-loader-modal">
37276
+ <div class="sdk-loader-spinner"></div>
37277
+ <div class="sdc-loader-text">${g}</div>
37278
+ <div class="sdc-loader-subtext">${t}</div>
37279
+ </div>
37280
+ `,(document.querySelector(".tf-embed-sdk")||document.body).appendChild(e);else{e.classList.remove("hidden");const i=e.querySelector(".sdc-loader-text");i&&(i.textContent=g);const r=e.querySelector(".sdc-loader-subtext");r&&(r.textContent=t)}}function m(){const g=document.getElementById("sdc-form-loader");g&&(g.classList.add("hidden"),g.parentNode&&g.parentNode.removeChild(g))}window.showSDCLoader=w,window.hideSDCLoader=m;var I=Formio.Components;const k=I.components.htmlelement;class u extends k{constructor(t,e,i){super(t,e,i)}static schema(...t){return k.schema({label:"Smart Data Component",key:"sdc",type:"smartdata",tag:"h5",attrs:[{attr:"style",value:"padding: 15px;text-align: center;border: 2px dashed #ddd;"}],content:"Smart Data Component",input:!1,persistent:!1,hidden:!0},...t)}get key(){return _.get(this.component,"key","")}static get builderInfo(){return{title:"Smart Data",icon:"cloud",group:"premium",documentation:"http://help.form.io/userguide/#sdc",weight:30,schema:u.schema()}}get defaultSchema(){return u.schema()}get content(){if(this.builderMode)return this.component.content;const t=_.get(this.root,"submission",{});return this.component.content?this.interpolate(this.component.content,{metadata:t.metadata||{},submission:t,data:this.rootValue,row:this.data}):""}get singleTags(){return["br","img","hr"]}renderContent(){const t=_.get(this.root,"submission",{});return this.renderTemplate("html",{component:this.component,tag:this.component.tag,attrs:(this.component.attrs||[]).map(e=>({attr:e.attr,value:this.interpolate(e.value,{metadata:t.metadata||{},submission:t,data:this.rootValue,row:this.data})})),content:this.component.label,singleTags:this.singleTags})}render(){return this.component.hidden=!0,super.render(this.renderContent())}async attach(t){this.loadRefs(t,{html:"single"}),logger.info("[TF_SDK:195] \u2705 attach called");let e=this;switch(this.component.dataSrc){case"url":logger.info("[TF_SDK:196] \u2705 inside switch url"),(_.get(this.component,"trigger.prefetch.triggerSDC")==="onFormLoad"||_.get(this.component,"trigger.prefetch.init"))&&await this.executeJS()&&(w("Fetching Data...","Please wait while we retrieve information"),Formio.makeStaticRequest(this.interpolate(this.component.fetchapi.url),(this.component.fetchapi.method||"get").toUpperCase(),null,{headers:this.requestHeaders,noToken:!(this.component.fetchapi&&this.component.fetchapi.authenticate)}).then(function(h){m(),e.assign(h)}).catch(function(h){m(),logger.error("[TF_SDK:197] \u274C Error in SDC URL fetch:",h)})),this.on(this.key,async a=>{e.component.trigger&&e.component.trigger.beforefetch&&(logger.info("[TF_SDK:198] \u2705 Executing beforefetch Javascript URL - Button Click"),this.evaluate(e.component.trigger.beforefetch.panel.javascript)),await this.executeJS()&&(w("Fetching Data...","Please wait while we retrieve information"),Formio.makeStaticRequest(this.interpolate(this.component.fetchapi.url),(this.component.fetchapi.method||"get").toUpperCase(),null,{headers:this.requestHeaders,noToken:!(this.component.fetchapi&&this.component.fetchapi.authenticate)}).then(function(l){m(),e.assign(l)}).catch(function(l){m(),logger.error("[TF_SDK:197] \u274C Error in SDC URL fetch:",l)}))},!0);break;case"workflow":logger.info("[TF_SDK:199] \u2705 inside switch workflow");const r=_.get(this.component,"trigger.prefetch.triggerSDC")==="onFormLoad"||_.get(this.component,"trigger.prefetch.init");r&&(e.component.trigger&&e.component.trigger.beforefetch&&(logger.info("[TF_SDK:200] \u2705 Executing beforefetch Javascript workflow - Init"),this.evaluate(e.component.trigger.beforefetch.panel.javascript)),this.builderMode||await this.executeJS()&&await this.executeworkflow(this.component,this.data,void 0)),(_.get(this.component,"trigger.prefetch.triggerSDC")==="onComponentAction"||_.get(this.component,"trigger.prefetch.triggerbycomponent")||!r)&&this.on(this.key,async a=>{e.component.trigger&&e.component.trigger.beforefetch?(logger.info("[TF_SDK:202] \u2705 Executing beforefetch Javascript workflow - Button Click"),this.builderMode||await this.executeJS()&&await this.executeworkflow(this.component,this.data,a?a.detail:void 0)):this.builderMode||await this.executeworkflow(this.component,this.data,a?a.detail:void 0)},!0);break}return super.attach(t)}assign(t){let e=t;if(typeof t=="string")try{e=JSON.parse(t)}catch(r){}e&&typeof e=="object"&&!Array.isArray(e)?(this.data=Object.assign(this.data||{},e),this.root&&Object.entries(e).forEach(([r,s])=>{const a=this.root.getComponent(r);a&&typeof a.setValue=="function"&&a.setValue(s)})):this.data=t,typeof this.triggerChange=="function"?this.triggerChange():this.root&&typeof this.root.triggerChange=="function"&&this.root.triggerChange();const i=_.get(this.component,"trigger.postfetch.event","SmartDataEvent");this.emitcustomformioevent(i,this.component,this.data)}async executeJS(){return this.component.trigger&&this.component.trigger.beforefetch&&(logger.info("[TF_SDK:203] \u2705 Executing beforefetch Javascript code"),await this.evaluate(this.component.trigger.beforefetch.panel.javascript)),!0}executeworkflow(t,e,i){w("Executing Workflow...","Please wait while fetching workflow data");let r=document.getElementsByClassName("sdc-spinner");r&&r.length>0&&(r[0].style.display="flex",r[0].style.justifyContent="center"),i||(i=e?e.equipNr:void 0);let s=this,a="",h="";if(window.formId)a=window.formId;else if(this.root&&this.root.form&&this.root.form.formId)a=this.root.form.formId;else if(this.root&&this.root._form&&this.root._form.formId)a=this.root._form.formId;else if(e&&e.formId)a=e.formId;else if(window.location&&window.location.pathname){const o=window.location.pathname.split("/");o.length>3&&o[3]&&(a=o[3].split(";")[0]||"")}t.fetchapi&&(h=t.fetchapi.workflowname||"");let l="";if(window.UMP_url)l=window.UMP_url;else if(this.root&&this.root.options&&this.root.options.umpUrl)l=this.root.options.umpUrl;else if(localStorage.getItem("UMP_url"))l=localStorage.getItem("UMP_url");else if(localStorage.getItem("sso_ump_url"))l=localStorage.getItem("sso_ump_url");else if(localStorage.getItem("login"))try{const o=JSON.parse(localStorage.getItem("login"));o&&o.umpUrl&&(l=o.umpUrl)}catch(o){}l&&(l=l.replace(/\/UMP\/?$/,"").replace(/\/$/,""));let c="";if(window.jwtToken?c=window.jwtToken:window.token?c=window.token:this.root&&this.root.options&&this.root.options.token?c=this.root.options.token:localStorage.getItem("token")?c=localStorage.getItem("token"):localStorage.getItem("sso_token")?c=localStorage.getItem("sso_token"):localStorage.getItem("UNVIRED_JWT_TOKEN_DIGITAL_FORMS")?c=localStorage.getItem("UNVIRED_JWT_TOKEN_DIGITAL_FORMS"):localStorage.getItem("UNVIRED_JWT_TOKEN_undefined")&&(c=localStorage.getItem("UNVIRED_JWT_TOKEN_undefined")),!c||c.trim().length===0)for(let o=0;o<localStorage.length;o++){const f=localStorage.key(o);if(f){const d=localStorage.getItem(f);if(d&&typeof d=="string"&&d.trim().startsWith("eyJ")){c=d.trim();break}}}c&&(c=c.replace(/^Bearer\s+/i,"").trim());let y=window.taskId||window.FORM_CONTROL_DATA&&window.FORM_CONTROL_DATA.taskId||"";console.log("[SDC] \u{1F680} Executing workflow:",{workflowName:h,componentKey:t.key,formId:a,taskId:y,eventData:i,formData:e,umpUrl:l||"(not configured)",hasToken:!!c});let p=`formdata=${encodeURIComponent(JSON.stringify(e||{}))}`;if(y&&(p+=`&taskId=${encodeURIComponent(y)}`),i)if(typeof i=="object"){const o=encodeURIComponent(JSON.stringify(i));p=p+`&flowinput=${o}&eventdata=${o}`}else{const o=encodeURIComponent(i);p=p+`&flowinput=${o}&eventdata=${o}`}window.ump&&typeof window.ump.logInfo=="function"&&window.ump.logInfo("sdc","executeworkflow()","jwt token - "+c);const C=`${l}/UMP/API/v3/applications/DIGITAL_FORMS/workflow/${h}?${p}`;console.log("[SDC] \u{1F310} Request URL:",C),Formio.makeStaticRequest(C,"POST",null,{headers:{Authorization:c?"Bearer "+c:"",Accept:"application/json","Content-type":"application/json"}}).then(function(o){if(m(),console.log("[SDC] \u2705 Workflow response received:",o),window.ump&&typeof window.ump.logInfo=="function"&&window.ump.logInfo("sdc","executeworkflow()","workflowdata - "+JSON.stringify(o)),r&&r.length>0&&(r[0].style.display="none",r[0].style.justifyContent=""),o){let f=o.data;try{s.data.error=o.error,typeof o.data=="string"&&o.data.trim()!==""&&(f=JSON.parse(o.data))}catch(d){f=o.data}f&&typeof f=="object"&&!Array.isArray(f)?(s.data=Object.assign(s.data||{},f),s.root&&Object.entries(f).forEach(([d,D])=>{const S=s.root.getComponent(d);S&&typeof S.setValue=="function"&&S.setValue(D)})):f!==void 0&&f!==""&&(s.data=Object.assign(s.data||{},f)),typeof s.triggerChange=="function"?s.triggerChange():s.root&&typeof s.root.triggerChange=="function"&&s.root.triggerChange(),s.emitcustomformioevent(s.component.trigger.postfetch.event,s.component,s.data)}}).catch(o=>{m(),console.warn("[SDC] \u26A0\uFE0F Workflow fetch failed (expected in local testing without live UMP backend):",o),window.ump&&typeof window.ump.logInfo=="function"&&window.ump.logInfo("sdc","executeworkflow()","workflowdata error- "+JSON.stringify(o)),r&&r.length>0&&(r[0].style.display="none",r[0].style.justifyContent=""),logger.error("[TF_SDK:205] \u274C Error occured while fetching workflow data:",o),this.emitcustomformioevent("WorkflowExecuteError",this.component,o)})}emitcustomformioevent(t,e,i){if(console.log("[SDC] \u{1F4E2} Emitting custom SDC event:",t,{component:e,data:i}),window.eventtype=i,this.emit(t,{component:e,data:i}),this.component.trigger&&this.component.trigger.postfetch&&this.component.trigger.postfetch.panel&&this.component.trigger.postfetch.panel.javascript)try{this.evaluate(this.component.trigger.postfetch.panel.javascript)}catch(s){console.error("[SDC] Error evaluating postfetch JS:",s)}let r=new CustomEvent("sdcDoneEvent",{detail:{type:t,component:e,data:i}});document.dispatchEvent(r),typeof window.sendEventCallback=="function"&&window.sendEventCallback({type:t,message:t==="WorkflowExecuteError"?"SDC workflow execution failed.":"SDC workflow completed successfully.",errorMessage:t==="WorkflowExecuteError"?i&&i.message?i.message:"SDC workflow error":"",data:{component:e,sdcData:i,key:e?e.key:""}})}}u.requestHeaders={get:function(){let g=this,t=new Formio.Headers;if(this.component.fetchapi&&this.component.fetchapi.headers)try{this.component.fetchapi.headers.forEach(function(e){e.key&&t.set(n.key,g.interpolate(e.value))})}catch(e){logger.warn(e.message)}return t},enumerable:!0,configurable:!0},Formio.Components.addComponent("smartdata",u)})();</script>
37206
37281
  <script>(function(){(function(y){typeof exports=="object"&&typeof module!="undefined"?module.exports=y():typeof define=="function"&&define.amd?define([],y):(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this).EventEmitter3=y()})(function(){return function y(p,x,w){function o(v,_){if(!x[v]){if(!p[v]){var i=typeof require=="function"&&require;if(!_&&i)return i(v,!0);if(h)return h(v,!0);var e=new Error("Cannot find module '"+v+"'");throw e.code="MODULE_NOT_FOUND",e}var t=x[v]={exports:{}};p[v][0].call(t.exports,function(n){return o(p[v][1][n]||n)},t,t.exports,y,p,x,w)}return x[v].exports}for(var h=typeof require=="function"&&require,m=0;m<w.length;m++)o(w[m]);return o}({1:[function(y,p,x){"use strict";var w=Object.prototype.hasOwnProperty,o="~";function h(){}function m(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function v(e,t,n,u,a){if(typeof n!="function")throw new TypeError("The listener must be a function");var f=new m(n,u||e,a),c=o?o+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],f]:e._events[c].push(f):(e._events[c]=f,e._eventsCount++),e}function _(e,t){--e._eventsCount==0?e._events=new h:delete e._events[t]}function i(){this._events=new h,this._eventsCount=0}Object.create&&(h.prototype=Object.create(null),new h().__proto__||(o=!1)),i.prototype.eventNames=function(){var e,t,n=[];if(this._eventsCount===0)return n;for(t in e=this._events)w.call(e,t)&&n.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},i.prototype.listeners=function(e){var t=o?o+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var u=0,a=n.length,f=new Array(a);u<a;u++)f[u]=n[u].fn;return f},i.prototype.listenerCount=function(e){var t=o?o+e:e,n=this._events[t];return n?n.fn?1:n.length:0},i.prototype.emit=function(e,t,n,u,a,f){var c=o?o+e:e;if(!this._events[c])return!1;var l,r=this._events[c],d=arguments.length;if(r.fn){switch(r.once&&this.removeListener(e,r.fn,void 0,!0),d){case 1:return r.fn.call(r.context),!0;case 2:return r.fn.call(r.context,t),!0;case 3:return r.fn.call(r.context,t,n),!0;case 4:return r.fn.call(r.context,t,n,u),!0;case 5:return r.fn.call(r.context,t,n,u,a),!0;case 6:return r.fn.call(r.context,t,n,u,a,f),!0}for(s=1,l=new Array(d-1);s<d;s++)l[s-1]=arguments[s];r.fn.apply(r.context,l)}else for(var b,g=r.length,s=0;s<g;s++)switch(r[s].once&&this.removeListener(e,r[s].fn,void 0,!0),d){case 1:r[s].fn.call(r[s].context);break;case 2:r[s].fn.call(r[s].context,t);break;case 3:r[s].fn.call(r[s].context,t,n);break;case 4:r[s].fn.call(r[s].context,t,n,u);break;default:if(!l)for(b=1,l=new Array(d-1);b<d;b++)l[b-1]=arguments[b];r[s].fn.apply(r[s].context,l)}return!0},i.prototype.on=function(e,t,n){return v(this,e,t,n,!1)},i.prototype.once=function(e,t,n){return v(this,e,t,n,!0)},i.prototype.removeListener=function(e,t,n,u){var a=o?o+e:e;if(!this._events[a])return this;if(!t)return _(this,a),this;var f=this._events[a];if(f.fn)f.fn!==t||u&&!f.once||n&&f.context!==n||_(this,a);else{for(var c=0,l=[],r=f.length;c<r;c++)(f[c].fn!==t||u&&!f[c].once||n&&f[c].context!==n)&&l.push(f[c]);l.length?this._events[a]=l.length===1?l[0]:l:_(this,a)}return this},i.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&_(this,t)):(this._events=new h,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=o,i.EventEmitter=i,p!==void 0&&(p.exports=i)},{}]},{},[1])(1)})})();</script>
37207
37282
 
37208
37283
  <script>(function(Y,fe){typeof exports=="object"&&typeof module!="undefined"?module.exports=fe():typeof define=="function"&&define.amd?define(fe):(Y=typeof globalThis!="undefined"?globalThis:Y||self).bootstrap=fe()})(this,function(){"use strict";const Y=new Map,fe={set(i,e,t){Y.has(i)||Y.set(i,new Map);const n=Y.get(i);n.has(e)||n.size===0?n.set(e,t):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(i,e)=>Y.has(i)&&Y.get(i).get(e)||null,remove(i,e){if(!Y.has(i))return;const t=Y.get(i);t.delete(e),t.size===0&&Y.delete(i)}},Et="transitionend",hi=i=>(i&&window.CSS&&window.CSS.escape&&(i=i.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),i),ns=i=>i==null?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase(),di=i=>{i.dispatchEvent(new Event(Et))},ie=i=>!(!i||typeof i!="object")&&(i.jquery!==void 0&&(i=i[0]),i.nodeType!==void 0),ae=i=>ie(i)?i.jquery?i[0]:i:typeof i=="string"&&i.length>0?document.querySelector(hi(i)):null,Ce=i=>{if(!ie(i)||i.getClientRects().length===0)return!1;const e=getComputedStyle(i).getPropertyValue("visibility")==="visible",t=i.closest("details:not([open])");if(!t)return e;if(t!==i){const n=i.closest("summary");if(n&&n.parentNode!==t||n===null)return!1}return e},le=i=>!i||i.nodeType!==Node.ELEMENT_NODE||!!i.classList.contains("disabled")||(i.disabled!==void 0?i.disabled:i.hasAttribute("disabled")&&i.getAttribute("disabled")!=="false"),ui=i=>{if(!document.documentElement.attachShadow)return null;if(typeof i.getRootNode=="function"){const e=i.getRootNode();return e instanceof ShadowRoot?e:null}return i instanceof ShadowRoot?i:i.parentNode?ui(i.parentNode):null},et=()=>{},ze=i=>{i.offsetHeight},fi=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,At=[],B=()=>document.documentElement.dir==="rtl",z=i=>{var e;e=()=>{const t=fi();if(t){const n=i.NAME,s=t.fn[n];t.fn[n]=i.jQueryInterface,t.fn[n].Constructor=i,t.fn[n].noConflict=()=>(t.fn[n]=s,i.jQueryInterface)}},document.readyState==="loading"?(At.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of At)t()}),At.push(e)):e()},M=(i,e=[],t=i)=>typeof i=="function"?i.call(...e):t,pi=(i,e,t=!0)=>{if(!t)return void M(i);const n=(r=>{if(!r)return 0;let{transitionDuration:a,transitionDelay:c}=window.getComputedStyle(r);const d=Number.parseFloat(a),u=Number.parseFloat(c);return d||u?(a=a.split(",")[0],c=c.split(",")[0],1e3*(Number.parseFloat(a)+Number.parseFloat(c))):0})(e)+5;let s=!1;const o=({target:r})=>{r===e&&(s=!0,e.removeEventListener(Et,o),M(i))};e.addEventListener(Et,o),setTimeout(()=>{s||di(e)},n)},Tt=(i,e,t,n)=>{const s=i.length;let o=i.indexOf(e);return o===-1?!t&&n?i[s-1]:i[0]:(o+=t?1:-1,n&&(o=(o+s)%s),i[Math.max(0,Math.min(o,s-1))])},ss=/[^.]*(?=\..*)\.|.*/,os=/\..*/,rs=/::\d+$/,Ct={};let mi=1;const gi={mouseenter:"mouseover",mouseleave:"mouseout"},as=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function _i(i,e){return e&&`${e}::${mi++}`||i.uidEvent||mi++}function bi(i){const e=_i(i);return i.uidEvent=e,Ct[e]=Ct[e]||{},Ct[e]}function vi(i,e,t=null){return Object.values(i).find(n=>n.callable===e&&n.delegationSelector===t)}function yi(i,e,t){const n=typeof e=="string",s=n?t:e||t;let o=Ei(i);return as.has(o)||(o=i),[n,s,o]}function wi(i,e,t,n,s){if(typeof e!="string"||!i)return;let[o,r,a]=yi(e,t,n);e in gi&&(r=(g=>function(m){if(!m.relatedTarget||m.relatedTarget!==m.delegateTarget&&!m.delegateTarget.contains(m.relatedTarget))return g.call(this,m)})(r));const c=bi(i),d=c[a]||(c[a]={}),u=vi(d,r,o?t:null);if(u)return void(u.oneOff=u.oneOff&&s);const h=_i(r,e.replace(ss,"")),b=o?function(p,g,m){return function _(C){const k=p.querySelectorAll(g);for(let{target:y}=C;y&&y!==this;y=y.parentNode)for(const E of k)if(E===y)return xt(C,{delegateTarget:y}),_.oneOff&&l.off(p,C.type,g,m),m.apply(y,[C])}}(i,t,r):function(p,g){return function m(_){return xt(_,{delegateTarget:p}),m.oneOff&&l.off(p,_.type,g),g.apply(p,[_])}}(i,r);b.delegationSelector=o?t:null,b.callable=r,b.oneOff=s,b.uidEvent=h,d[h]=b,i.addEventListener(a,b,o)}function Ot(i,e,t,n,s){const o=vi(e[t],n,s);o&&(i.removeEventListener(t,o,!!s),delete e[t][o.uidEvent])}function ls(i,e,t,n){const s=e[t]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&Ot(i,e,t,r.callable,r.delegationSelector)}function Ei(i){return i=i.replace(os,""),gi[i]||i}const l={on(i,e,t,n){wi(i,e,t,n,!1)},one(i,e,t,n){wi(i,e,t,n,!0)},off(i,e,t,n){if(typeof e!="string"||!i)return;const[s,o,r]=yi(e,t,n),a=r!==e,c=bi(i),d=c[r]||{},u=e.startsWith(".");if(o===void 0){if(u)for(const h of Object.keys(c))ls(i,c,h,e.slice(1));for(const[h,b]of Object.entries(d)){const p=h.replace(rs,"");a&&!e.includes(p)||Ot(i,c,r,b.callable,b.delegationSelector)}}else{if(!Object.keys(d).length)return;Ot(i,c,r,o,s?t:null)}},trigger(i,e,t){if(typeof e!="string"||!i)return null;const n=fi();let s=null,o=!0,r=!0,a=!1;e!==Ei(e)&&n&&(s=n.Event(e,t),n(i).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const c=xt(new Event(e,{bubbles:o,cancelable:!0}),t);return a&&c.preventDefault(),r&&i.dispatchEvent(c),c.defaultPrevented&&s&&s.preventDefault(),c}};function xt(i,e={}){for(const[t,n]of Object.entries(e))try{i[t]=n}catch(s){Object.defineProperty(i,t,{configurable:!0,get:()=>n})}return i}function Ai(i){if(i==="true")return!0;if(i==="false")return!1;if(i===Number(i).toString())return Number(i);if(i===""||i==="null")return null;if(typeof i!="string")return i;try{return JSON.parse(decodeURIComponent(i))}catch(e){return i}}function kt(i){return i.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const ne={setDataAttribute(i,e,t){i.setAttribute(`data-bs-${kt(e)}`,t)},removeDataAttribute(i,e){i.removeAttribute(`data-bs-${kt(e)}`)},getDataAttributes(i){if(!i)return{};const e={},t=Object.keys(i.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(const n of t){let s=n.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1),e[s]=Ai(i.dataset[n])}return e},getDataAttribute:(i,e)=>Ai(i.getAttribute(`data-bs-${kt(e)}`))};class Re{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=ie(t)?ne.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof n=="object"?n:{},...ie(t)?ne.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,s]of Object.entries(t)){const o=e[n],r=ie(o)?"element":ns(o);if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}}}class U extends Re{constructor(e,t){super(),(e=ae(e))&&(this._element=e,this._config=this._getConfig(t),fe.set(this._element,this.constructor.DATA_KEY,this))}dispose(){fe.remove(this._element,this.constructor.DATA_KEY),l.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){pi(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return fe.get(ae(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Lt=i=>{let e=i.getAttribute("data-bs-target");if(!e||e==="#"){let t=i.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return e?e.split(",").map(t=>hi(t)).join(","):null},f={find:(i,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,i)),findOne:(i,e=document.documentElement)=>Element.prototype.querySelector.call(e,i),children:(i,e)=>[].concat(...i.children).filter(t=>t.matches(e)),parents(i,e){const t=[];let n=i.parentNode.closest(e);for(;n;)t.push(n),n=n.parentNode.closest(e);return t},prev(i,e){let t=i.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(i,e){let t=i.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(i){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,i).filter(t=>!le(t)&&Ce(t))},getSelectorFromElement(i){const e=Lt(i);return e&&f.findOne(e)?e:null},getElementFromSelector(i){const e=Lt(i);return e?f.findOne(e):null},getMultipleElementsFromSelector(i){const e=Lt(i);return e?f.find(e):[]}},tt=(i,e="hide")=>{const t=`click.dismiss${i.EVENT_KEY}`,n=i.NAME;l.on(document,t,`[data-bs-dismiss="${n}"]`,function(s){if(["A","AREA"].includes(this.tagName)&&s.preventDefault(),le(this))return;const o=f.getElementFromSelector(this)||this.closest(`.${n}`);i.getOrCreateInstance(o)[e]()})},Ti=".bs.alert",cs=`close${Ti}`,hs=`closed${Ti}`;class qe extends U{static get NAME(){return"alert"}close(){if(l.trigger(this._element,cs).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),l.trigger(this._element,hs),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=qe.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}tt(qe,"close"),z(qe);const Ci='[data-bs-toggle="button"]';class Ve extends U{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each(function(){const t=Ve.getOrCreateInstance(this);e==="toggle"&&t[e]()})}}l.on(document,"click.bs.button.data-api",Ci,i=>{i.preventDefault();const e=i.target.closest(Ci);Ve.getOrCreateInstance(e).toggle()}),z(Ve);const Oe=".bs.swipe",ds=`touchstart${Oe}`,us=`touchmove${Oe}`,fs=`touchend${Oe}`,ps=`pointerdown${Oe}`,ms=`pointerup${Oe}`,gs={endCallback:null,leftCallback:null,rightCallback:null},_s={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class it extends Re{constructor(e,t){super(),this._element=e,e&&it.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return gs}static get DefaultType(){return _s}static get NAME(){return"swipe"}dispose(){l.off(this._element,Oe)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),M(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&M(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(l.on(this._element,ps,e=>this._start(e)),l.on(this._element,ms,e=>this._end(e)),this._element.classList.add("pointer-event")):(l.on(this._element,ds,e=>this._start(e)),l.on(this._element,us,e=>this._move(e)),l.on(this._element,fs,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType==="pen"||e.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ce=".bs.carousel",Oi=".data-api",bs="ArrowLeft",vs="ArrowRight",Ke="next",xe="prev",ke="left",nt="right",ys=`slide${ce}`,St=`slid${ce}`,ws=`keydown${ce}`,Es=`mouseenter${ce}`,As=`mouseleave${ce}`,Ts=`dragstart${ce}`,Cs=`load${ce}${Oi}`,Os=`click${ce}${Oi}`,xi="carousel",st="active",ki=".active",Li=".carousel-item",xs=ki+Li,ks={[bs]:nt,[vs]:ke},Ls={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Ss={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Le extends U{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=f.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===xi&&this.cycle()}static get Default(){return Ls}static get DefaultType(){return Ss}static get NAME(){return"carousel"}next(){this._slide(Ke)}nextWhenVisible(){!document.hidden&&Ce(this._element)&&this.next()}prev(){this._slide(xe)}pause(){this._isSliding&&di(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?l.one(this._element,St,()=>this.cycle()):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void l.one(this._element,St,()=>this.to(e));const n=this._getItemIndex(this._getActive());if(n===e)return;const s=e>n?Ke:xe;this._slide(s,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&l.on(this._element,ws,e=>this._keydown(e)),this._config.pause==="hover"&&(l.on(this._element,Es,()=>this.pause()),l.on(this._element,As,()=>this._maybeEnableCycle())),this._config.touch&&it.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of f.find(".carousel-item img",this._element))l.on(t,Ts,n=>n.preventDefault());const e={leftCallback:()=>this._slide(this._directionToOrder(ke)),rightCallback:()=>this._slide(this._directionToOrder(nt)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new it(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=ks[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=f.findOne(ki,this._indicatorsElement);t.classList.remove(st),t.removeAttribute("aria-current");const n=f.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(st),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),s=e===Ke,o=t||Tt(this._getItems(),n,s,this._config.wrap);if(o===n)return;const r=this._getItemIndex(o),a=h=>l.trigger(this._element,h,{relatedTarget:o,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:r});if(a(ys).defaultPrevented||!n||!o)return;const c=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(r),this._activeElement=o;const d=s?"carousel-item-start":"carousel-item-end",u=s?"carousel-item-next":"carousel-item-prev";o.classList.add(u),ze(o),n.classList.add(d),o.classList.add(d),this._queueCallback(()=>{o.classList.remove(d,u),o.classList.add(st),n.classList.remove(st,u,d),this._isSliding=!1,a(St)},n,this._isAnimated()),c&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return f.findOne(xs,this._element)}_getItems(){return f.find(Li,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return B()?e===ke?xe:Ke:e===ke?Ke:xe}_orderToDirection(e){return B()?e===xe?ke:nt:e===xe?nt:ke}static jQueryInterface(e){return this.each(function(){const t=Le.getOrCreateInstance(this,e);if(typeof e!="number"){if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)})}}l.on(document,Os,"[data-bs-slide], [data-bs-slide-to]",function(i){const e=f.getElementFromSelector(this);if(!e||!e.classList.contains(xi))return;i.preventDefault();const t=Le.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(t.to(n),void t._maybeEnableCycle()):ne.getDataAttribute(this,"slide")==="next"?(t.next(),void t._maybeEnableCycle()):(t.prev(),void t._maybeEnableCycle())}),l.on(window,Cs,()=>{const i=f.find('[data-bs-ride="carousel"]');for(const e of i)Le.getOrCreateInstance(e)}),z(Le);const Xe=".bs.collapse",Ds=`show${Xe}`,$s=`shown${Xe}`,Is=`hide${Xe}`,Ns=`hidden${Xe}`,Ps=`click${Xe}.data-api`,Dt="show",Se="collapse",ot="collapsing",Ms=`:scope .${Se} .${Se}`,$t='[data-bs-toggle="collapse"]',js={parent:null,toggle:!0},Fs={parent:"(null|element)",toggle:"boolean"};class De extends U{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=f.find($t);for(const s of n){const o=f.getSelectorFromElement(s),r=f.find(o).filter(a=>a===this._element);o!==null&&r.length&&this._triggerArray.push(s)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return js}static get DefaultType(){return Fs}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(s=>s!==this._element).map(s=>De.getOrCreateInstance(s,{toggle:!1}))),e.length&&e[0]._isTransitioning||l.trigger(this._element,Ds).defaultPrevented)return;for(const s of e)s.hide();const t=this._getDimension();this._element.classList.remove(Se),this._element.classList.add(ot),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ot),this._element.classList.add(Se,Dt),this._element.style[t]="",l.trigger(this._element,$s)},this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown()||l.trigger(this._element,Is).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,ze(this._element),this._element.classList.add(ot),this._element.classList.remove(Se,Dt);for(const t of this._triggerArray){const n=f.getElementFromSelector(t);n&&!this._isShown(n)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[e]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ot),this._element.classList.add(Se),l.trigger(this._element,Ns)},this._element,!0)}_isShown(e=this._element){return e.classList.contains(Dt)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=ae(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren($t);for(const t of e){const n=f.getElementFromSelector(t);n&&this._addAriaAndCollapsedClass([t],this._isShown(n))}}_getFirstLevelChildren(e){const t=f.find(Ms,this._config.parent);return f.find(e,this._config.parent).filter(n=>!t.includes(n))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const n=De.getOrCreateInstance(this,t);if(typeof e=="string"){if(n[e]===void 0)throw new TypeError(`No method named "${e}"`);n[e]()}})}}l.on(document,Ps,$t,function(i){(i.target.tagName==="A"||i.delegateTarget&&i.delegateTarget.tagName==="A")&&i.preventDefault();for(const e of f.getMultipleElementsFromSelector(this))De.getOrCreateInstance(e,{toggle:!1}).toggle()}),z(De);var $="top",j="bottom",F="right",I="left",rt="auto",$e=[$,j,F,I],pe="start",Ie="end",Si="clippingParents",It="viewport",Ne="popper",Di="reference",Nt=$e.reduce(function(i,e){return i.concat([e+"-"+pe,e+"-"+Ie])},[]),Pt=[].concat($e,[rt]).reduce(function(i,e){return i.concat([e,e+"-"+pe,e+"-"+Ie])},[]),$i="beforeRead",Ii="read",Ni="afterRead",Pi="beforeMain",Mi="main",ji="afterMain",Fi="beforeWrite",Hi="write",Wi="afterWrite",Bi=[$i,Ii,Ni,Pi,Mi,ji,Fi,Hi,Wi];function J(i){return i?(i.nodeName||"").toLowerCase():null}function H(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var e=i.ownerDocument;return e&&e.defaultView||window}return i}function me(i){return i instanceof H(i).Element||i instanceof Element}function R(i){return i instanceof H(i).HTMLElement||i instanceof HTMLElement}function Mt(i){return typeof ShadowRoot!="undefined"&&(i instanceof H(i).ShadowRoot||i instanceof ShadowRoot)}const jt={name:"applyStyles",enabled:!0,phase:"write",fn:function(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},s=e.attributes[t]||{},o=e.elements[t];R(o)&&J(o)&&(Object.assign(o.style,n),Object.keys(s).forEach(function(r){var a=s[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})},effect:function(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var s=e.elements[n],o=e.attributes[n]||{},r=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]).reduce(function(a,c){return a[c]="",a},{});R(s)&&J(s)&&(Object.assign(s.style,r),Object.keys(o).forEach(function(a){s.removeAttribute(a)}))})}},requires:["computeStyles"]};function Z(i){return i.split("-")[0]}var ge=Math.max,at=Math.min,Pe=Math.round;function Ft(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function zi(){return!/^((?!chrome|android).)*safari/i.test(Ft())}function Me(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=i.getBoundingClientRect(),s=1,o=1;e&&R(i)&&(s=i.offsetWidth>0&&Pe(n.width)/i.offsetWidth||1,o=i.offsetHeight>0&&Pe(n.height)/i.offsetHeight||1);var r=(me(i)?H(i):window).visualViewport,a=!zi()&&t,c=(n.left+(a&&r?r.offsetLeft:0))/s,d=(n.top+(a&&r?r.offsetTop:0))/o,u=n.width/s,h=n.height/o;return{width:u,height:h,top:d,right:c+u,bottom:d+h,left:c,x:c,y:d}}function Ht(i){var e=Me(i),t=i.offsetWidth,n=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:n}}function Ri(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&Mt(t)){var n=e;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function se(i){return H(i).getComputedStyle(i)}function Hs(i){return["table","td","th"].indexOf(J(i))>=0}function he(i){return((me(i)?i.ownerDocument:i.document)||window.document).documentElement}function lt(i){return J(i)==="html"?i:i.assignedSlot||i.parentNode||(Mt(i)?i.host:null)||he(i)}function qi(i){return R(i)&&se(i).position!=="fixed"?i.offsetParent:null}function Ye(i){for(var e=H(i),t=qi(i);t&&Hs(t)&&se(t).position==="static";)t=qi(t);return t&&(J(t)==="html"||J(t)==="body"&&se(t).position==="static")?e:t||function(n){var s=/firefox/i.test(Ft());if(/Trident/i.test(Ft())&&R(n)&&se(n).position==="fixed")return null;var o=lt(n);for(Mt(o)&&(o=o.host);R(o)&&["html","body"].indexOf(J(o))<0;){var r=se(o);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||s&&r.willChange==="filter"||s&&r.filter&&r.filter!=="none")return o;o=o.parentNode}return null}(i)||e}function Wt(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function Ue(i,e,t){return ge(i,at(e,t))}function Vi(i){return Object.assign({},{top:0,right:0,bottom:0,left:0},i)}function Ki(i,e){return e.reduce(function(t,n){return t[n]=i,t},{})}const Xi={name:"arrow",enabled:!0,phase:"main",fn:function(i){var e,t=i.state,n=i.name,s=i.options,o=t.elements.arrow,r=t.modifiersData.popperOffsets,a=Z(t.placement),c=Wt(a),d=[I,F].indexOf(a)>=0?"height":"width";if(o&&r){var u=function(O,T){return Vi(typeof(O=typeof O=="function"?O(Object.assign({},T.rects,{placement:T.placement})):O)!="number"?O:Ki(O,$e))}(s.padding,t),h=Ht(o),b=c==="y"?$:I,p=c==="y"?j:F,g=t.rects.reference[d]+t.rects.reference[c]-r[c]-t.rects.popper[d],m=r[c]-t.rects.reference[c],_=Ye(o),C=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,k=g/2-m/2,y=u[b],E=C-h[d]-u[p],v=C/2-h[d]/2+k,w=Ue(y,v,E),A=c;t.modifiersData[n]=((e={})[A]=w,e.centerOffset=w-v,e)}},effect:function(i){var e=i.state,t=i.options.element,n=t===void 0?"[data-popper-arrow]":t;n!=null&&(typeof n!="string"||(n=e.elements.popper.querySelector(n)))&&Ri(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function je(i){return i.split("-")[1]}var Ws={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yi(i){var e,t=i.popper,n=i.popperRect,s=i.placement,o=i.variation,r=i.offsets,a=i.position,c=i.gpuAcceleration,d=i.adaptive,u=i.roundOffsets,h=i.isFixed,b=r.x,p=b===void 0?0:b,g=r.y,m=g===void 0?0:g,_=typeof u=="function"?u({x:p,y:m}):{x:p,y:m};p=_.x,m=_.y;var C=r.hasOwnProperty("x"),k=r.hasOwnProperty("y"),y=I,E=$,v=window;if(d){var w=Ye(t),A="clientHeight",O="clientWidth";w===H(t)&&se(w=he(t)).position!=="static"&&a==="absolute"&&(A="scrollHeight",O="scrollWidth"),(s===$||(s===I||s===F)&&o===Ie)&&(E=j,m-=(h&&w===v&&v.visualViewport?v.visualViewport.height:w[A])-n.height,m*=c?1:-1),s!==I&&(s!==$&&s!==j||o!==Ie)||(y=F,p-=(h&&w===v&&v.visualViewport?v.visualViewport.width:w[O])-n.width,p*=c?1:-1)}var T,S=Object.assign({position:a},d&&Ws),W=u===!0?function(G,N){var V=G.x,K=G.y,L=N.devicePixelRatio||1;return{x:Pe(V*L)/L||0,y:Pe(K*L)/L||0}}({x:p,y:m},H(t)):{x:p,y:m};return p=W.x,m=W.y,c?Object.assign({},S,((T={})[E]=k?"0":"",T[y]=C?"0":"",T.transform=(v.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",T)):Object.assign({},S,((e={})[E]=k?m+"px":"",e[y]=C?p+"px":"",e.transform="",e))}const Bt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(i){var e=i.state,t=i.options,n=t.gpuAcceleration,s=n===void 0||n,o=t.adaptive,r=o===void 0||o,a=t.roundOffsets,c=a===void 0||a,d={placement:Z(e.placement),variation:je(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Yi(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Yi(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ct={passive:!0};const zt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(i){var e=i.state,t=i.instance,n=i.options,s=n.scroll,o=s===void 0||s,r=n.resize,a=r===void 0||r,c=H(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&d.forEach(function(u){u.addEventListener("scroll",t.update,ct)}),a&&c.addEventListener("resize",t.update,ct),function(){o&&d.forEach(function(u){u.removeEventListener("scroll",t.update,ct)}),a&&c.removeEventListener("resize",t.update,ct)}},data:{}};var Bs={left:"right",right:"left",bottom:"top",top:"bottom"};function ht(i){return i.replace(/left|right|bottom|top/g,function(e){return Bs[e]})}var zs={start:"end",end:"start"};function Ui(i){return i.replace(/start|end/g,function(e){return zs[e]})}function Rt(i){var e=H(i);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function qt(i){return Me(he(i)).left+Rt(i).scrollLeft}function Vt(i){var e=se(i),t=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+n)}function Qi(i){return["html","body","#document"].indexOf(J(i))>=0?i.ownerDocument.body:R(i)&&Vt(i)?i:Qi(lt(i))}function Qe(i,e){var t;e===void 0&&(e=[]);var n=Qi(i),s=n===((t=i.ownerDocument)==null?void 0:t.body),o=H(n),r=s?[o].concat(o.visualViewport||[],Vt(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Qe(lt(r)))}function Kt(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Gi(i,e,t){return e===It?Kt(function(n,s){var o=H(n),r=he(n),a=o.visualViewport,c=r.clientWidth,d=r.clientHeight,u=0,h=0;if(a){c=a.width,d=a.height;var b=zi();(b||!b&&s==="fixed")&&(u=a.offsetLeft,h=a.offsetTop)}return{width:c,height:d,x:u+qt(n),y:h}}(i,t)):me(e)?function(n,s){var o=Me(n,!1,s==="fixed");return o.top=o.top+n.clientTop,o.left=o.left+n.clientLeft,o.bottom=o.top+n.clientHeight,o.right=o.left+n.clientWidth,o.width=n.clientWidth,o.height=n.clientHeight,o.x=o.left,o.y=o.top,o}(e,t):Kt(function(n){var s,o=he(n),r=Rt(n),a=(s=n.ownerDocument)==null?void 0:s.body,c=ge(o.scrollWidth,o.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),d=ge(o.scrollHeight,o.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),u=-r.scrollLeft+qt(n),h=-r.scrollTop;return se(a||o).direction==="rtl"&&(u+=ge(o.clientWidth,a?a.clientWidth:0)-c),{width:c,height:d,x:u,y:h}}(he(i)))}function Ji(i){var e,t=i.reference,n=i.element,s=i.placement,o=s?Z(s):null,r=s?je(s):null,a=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2;switch(o){case $:e={x:a,y:t.y-n.height};break;case j:e={x:a,y:t.y+t.height};break;case F:e={x:t.x+t.width,y:c};break;case I:e={x:t.x-n.width,y:c};break;default:e={x:t.x,y:t.y}}var d=o?Wt(o):null;if(d!=null){var u=d==="y"?"height":"width";switch(r){case pe:e[d]=e[d]-(t[u]/2-n[u]/2);break;case Ie:e[d]=e[d]+(t[u]/2-n[u]/2)}}return e}function Fe(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=n===void 0?i.placement:n,o=t.strategy,r=o===void 0?i.strategy:o,a=t.boundary,c=a===void 0?Si:a,d=t.rootBoundary,u=d===void 0?It:d,h=t.elementContext,b=h===void 0?Ne:h,p=t.altBoundary,g=p!==void 0&&p,m=t.padding,_=m===void 0?0:m,C=Vi(typeof _!="number"?_:Ki(_,$e)),k=b===Ne?Di:Ne,y=i.rects.popper,E=i.elements[g?k:b],v=function(N,V,K,L){var ee=V==="clippingParents"?function(x){var P=Qe(lt(x)),X=["absolute","fixed"].indexOf(se(x).position)>=0&&R(x)?Ye(x):x;return me(X)?P.filter(function(ue){return me(ue)&&Ri(ue,X)&&J(ue)!=="body"}):[]}(N):[].concat(V),te=[].concat(ee,[K]),Be=te[0],D=te.reduce(function(x,P){var X=Gi(N,P,L);return x.top=ge(X.top,x.top),x.right=at(X.right,x.right),x.bottom=at(X.bottom,x.bottom),x.left=ge(X.left,x.left),x},Gi(N,Be,L));return D.width=D.right-D.left,D.height=D.bottom-D.top,D.x=D.left,D.y=D.top,D}(me(E)?E:E.contextElement||he(i.elements.popper),c,u,r),w=Me(i.elements.reference),A=Ji({reference:w,element:y,placement:s}),O=Kt(Object.assign({},y,A)),T=b===Ne?O:w,S={top:v.top-T.top+C.top,bottom:T.bottom-v.bottom+C.bottom,left:v.left-T.left+C.left,right:T.right-v.right+C.right},W=i.modifiersData.offset;if(b===Ne&&W){var G=W[s];Object.keys(S).forEach(function(N){var V=[F,j].indexOf(N)>=0?1:-1,K=[$,j].indexOf(N)>=0?"y":"x";S[N]+=G[K]*V})}return S}function Rs(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=t.boundary,o=t.rootBoundary,r=t.padding,a=t.flipVariations,c=t.allowedAutoPlacements,d=c===void 0?Pt:c,u=je(n),h=u?a?Nt:Nt.filter(function(g){return je(g)===u}):$e,b=h.filter(function(g){return d.indexOf(g)>=0});b.length===0&&(b=h);var p=b.reduce(function(g,m){return g[m]=Fe(i,{placement:m,boundary:s,rootBoundary:o,padding:r})[Z(m)],g},{});return Object.keys(p).sort(function(g,m){return p[g]-p[m]})}const Zi={name:"flip",enabled:!0,phase:"main",fn:function(i){var e=i.state,t=i.options,n=i.name;if(!e.modifiersData[n]._skip){for(var s=t.mainAxis,o=s===void 0||s,r=t.altAxis,a=r===void 0||r,c=t.fallbackPlacements,d=t.padding,u=t.boundary,h=t.rootBoundary,b=t.altBoundary,p=t.flipVariations,g=p===void 0||p,m=t.allowedAutoPlacements,_=e.options.placement,C=Z(_),k=c||(C!==_&&g?function(x){if(Z(x)===rt)return[];var P=ht(x);return[Ui(x),P,Ui(P)]}(_):[ht(_)]),y=[_].concat(k).reduce(function(x,P){return x.concat(Z(P)===rt?Rs(e,{placement:P,boundary:u,rootBoundary:h,padding:d,flipVariations:g,allowedAutoPlacements:m}):P)},[]),E=e.rects.reference,v=e.rects.popper,w=new Map,A=!0,O=y[0],T=0;T<y.length;T++){var S=y[T],W=Z(S),G=je(S)===pe,N=[$,j].indexOf(W)>=0,V=N?"width":"height",K=Fe(e,{placement:S,boundary:u,rootBoundary:h,altBoundary:b,padding:d}),L=N?G?F:I:G?j:$;E[V]>v[V]&&(L=ht(L));var ee=ht(L),te=[];if(o&&te.push(K[W]<=0),a&&te.push(K[L]<=0,K[ee]<=0),te.every(function(x){return x})){O=S,A=!1;break}w.set(S,te)}if(A)for(var Be=function(x){var P=y.find(function(X){var ue=w.get(X);if(ue)return ue.slice(0,x).every(function(vt){return vt})});if(P)return O=P,"break"},D=g?3:1;D>0&&Be(D)!=="break";D--);e.placement!==O&&(e.modifiersData[n]._skip=!0,e.placement=O,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function en(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function tn(i){return[$,F,j,I].some(function(e){return i[e]>=0})}const nn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(i){var e=i.state,t=i.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=Fe(e,{elementContext:"reference"}),a=Fe(e,{altBoundary:!0}),c=en(r,n),d=en(a,s,o),u=tn(c),h=tn(d);e.modifiersData[t]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}},sn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(i){var e=i.state,t=i.options,n=i.name,s=t.offset,o=s===void 0?[0,0]:s,r=Pt.reduce(function(u,h){return u[h]=function(b,p,g){var m=Z(b),_=[I,$].indexOf(m)>=0?-1:1,C=typeof g=="function"?g(Object.assign({},p,{placement:b})):g,k=C[0],y=C[1];return k=k||0,y=(y||0)*_,[I,F].indexOf(m)>=0?{x:y,y:k}:{x:k,y}}(h,e.rects,o),u},{}),a=r[e.placement],c=a.x,d=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=d),e.modifiersData[n]=r}},Xt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(i){var e=i.state,t=i.name;e.modifiersData[t]=Ji({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},on={name:"preventOverflow",enabled:!0,phase:"main",fn:function(i){var e=i.state,t=i.options,n=i.name,s=t.mainAxis,o=s===void 0||s,r=t.altAxis,a=r!==void 0&&r,c=t.boundary,d=t.rootBoundary,u=t.altBoundary,h=t.padding,b=t.tether,p=b===void 0||b,g=t.tetherOffset,m=g===void 0?0:g,_=Fe(e,{boundary:c,rootBoundary:d,padding:h,altBoundary:u}),C=Z(e.placement),k=je(e.placement),y=!k,E=Wt(C),v=E==="x"?"y":"x",w=e.modifiersData.popperOffsets,A=e.rects.reference,O=e.rects.popper,T=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,S=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),W=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,G={x:0,y:0};if(w){if(o){var N,V=E==="y"?$:I,K=E==="y"?j:F,L=E==="y"?"height":"width",ee=w[E],te=ee+_[V],Be=ee-_[K],D=p?-O[L]/2:0,x=k===pe?A[L]:O[L],P=k===pe?-O[L]:-A[L],X=e.elements.arrow,ue=p&&X?Ht(X):{width:0,height:0},vt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Vn=vt[V],Kn=vt[K],yt=Ue(0,A[L],ue[L]),Er=y?A[L]/2-D-yt-Vn-S.mainAxis:x-yt-Vn-S.mainAxis,Ar=y?-A[L]/2+D+yt+Kn+S.mainAxis:P+yt+Kn+S.mainAxis,ai=e.elements.arrow&&Ye(e.elements.arrow),Tr=ai?E==="y"?ai.clientTop||0:ai.clientLeft||0:0,Xn=(N=W==null?void 0:W[E])!=null?N:0,Cr=ee+Ar-Xn,Yn=Ue(p?at(te,ee+Er-Xn-Tr):te,ee,p?ge(Be,Cr):Be);w[E]=Yn,G[E]=Yn-ee}if(a){var Un,Or=E==="x"?$:I,xr=E==="x"?j:F,Te=w[v],wt=v==="y"?"height":"width",Qn=Te+_[Or],Gn=Te-_[xr],li=[$,I].indexOf(C)!==-1,Jn=(Un=W==null?void 0:W[v])!=null?Un:0,Zn=li?Qn:Te-A[wt]-O[wt]-Jn+S.altAxis,es=li?Te+A[wt]+O[wt]-Jn-S.altAxis:Gn,ts=p&&li?function(kr,Lr,ci){var is=Ue(kr,Lr,ci);return is>ci?ci:is}(Zn,Te,es):Ue(p?Zn:Qn,Te,p?es:Gn);w[v]=ts,G[v]=ts-Te}e.modifiersData[n]=G}},requiresIfExists:["offset"]};function qs(i,e,t){t===void 0&&(t=!1);var n,s,o=R(e),r=R(e)&&function(h){var b=h.getBoundingClientRect(),p=Pe(b.width)/h.offsetWidth||1,g=Pe(b.height)/h.offsetHeight||1;return p!==1||g!==1}(e),a=he(e),c=Me(i,r,t),d={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!t)&&((J(e)!=="body"||Vt(a))&&(d=(n=e)!==H(n)&&R(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Rt(n)),R(e)?((u=Me(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=qt(a))),{x:c.left+d.scrollLeft-u.x,y:c.top+d.scrollTop-u.y,width:c.width,height:c.height}}function Vs(i){var e=new Map,t=new Set,n=[];function s(o){t.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(r){if(!t.has(r)){var a=e.get(r);a&&s(a)}}),n.push(o)}return i.forEach(function(o){e.set(o.name,o)}),i.forEach(function(o){t.has(o.name)||s(o)}),n}var rn={placement:"bottom",modifiers:[],strategy:"absolute"};function an(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function dt(i){i===void 0&&(i={});var e=i,t=e.defaultModifiers,n=t===void 0?[]:t,s=e.defaultOptions,o=s===void 0?rn:s;return function(r,a,c){c===void 0&&(c=o);var d,u,h={placement:"bottom",orderedModifiers:[],options:Object.assign({},rn,o),modifiersData:{},elements:{reference:r,popper:a},attributes:{},styles:{}},b=[],p=!1,g={state:h,setOptions:function(_){var C=typeof _=="function"?_(h.options):_;m(),h.options=Object.assign({},o,h.options,C),h.scrollParents={reference:me(r)?Qe(r):r.contextElement?Qe(r.contextElement):[],popper:Qe(a)};var k,y,E=function(v){var w=Vs(v);return Bi.reduce(function(A,O){return A.concat(w.filter(function(T){return T.phase===O}))},[])}((k=[].concat(n,h.options.modifiers),y=k.reduce(function(v,w){var A=v[w.name];return v[w.name]=A?Object.assign({},A,w,{options:Object.assign({},A.options,w.options),data:Object.assign({},A.data,w.data)}):w,v},{}),Object.keys(y).map(function(v){return y[v]})));return h.orderedModifiers=E.filter(function(v){return v.enabled}),h.orderedModifiers.forEach(function(v){var w=v.name,A=v.options,O=A===void 0?{}:A,T=v.effect;if(typeof T=="function"){var S=T({state:h,name:w,instance:g,options:O});b.push(S||function(){})}}),g.update()},forceUpdate:function(){if(!p){var _=h.elements,C=_.reference,k=_.popper;if(an(C,k)){h.rects={reference:qs(C,Ye(k),h.options.strategy==="fixed"),popper:Ht(k)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(T){return h.modifiersData[T.name]=Object.assign({},T.data)});for(var y=0;y<h.orderedModifiers.length;y++)if(h.reset!==!0){var E=h.orderedModifiers[y],v=E.fn,w=E.options,A=w===void 0?{}:w,O=E.name;typeof v=="function"&&(h=v({state:h,options:A,name:O,instance:g})||h)}else h.reset=!1,y=-1}}},update:(d=function(){return new Promise(function(_){g.forceUpdate(),_(h)})},function(){return u||(u=new Promise(function(_){Promise.resolve().then(function(){u=void 0,_(d())})})),u}),destroy:function(){m(),p=!0}};if(!an(r,a))return g;function m(){b.forEach(function(_){return _()}),b=[]}return g.setOptions(c).then(function(_){!p&&c.onFirstUpdate&&c.onFirstUpdate(_)}),g}}var Ks=dt(),Xs=dt({defaultModifiers:[zt,Xt,Bt,jt]}),Yt=dt({defaultModifiers:[zt,Xt,Bt,jt,sn,Zi,on,Xi,nn]});const ln=Object.freeze(Object.defineProperty({__proto__:null,afterMain:ji,afterRead:Ni,afterWrite:Wi,applyStyles:jt,arrow:Xi,auto:rt,basePlacements:$e,beforeMain:Pi,beforeRead:$i,beforeWrite:Fi,bottom:j,clippingParents:Si,computeStyles:Bt,createPopper:Yt,createPopperBase:Ks,createPopperLite:Xs,detectOverflow:Fe,end:Ie,eventListeners:zt,flip:Zi,hide:nn,left:I,main:Mi,modifierPhases:Bi,offset:sn,placements:Pt,popper:Ne,popperGenerator:dt,popperOffsets:Xt,preventOverflow:on,read:Ii,reference:Di,right:F,start:pe,top:$,variationPlacements:Nt,viewport:It,write:Hi},Symbol.toStringTag,{value:"Module"})),cn="dropdown",_e=".bs.dropdown",Ut=".data-api",Ys="ArrowUp",hn="ArrowDown",Us=`hide${_e}`,Qs=`hidden${_e}`,Gs=`show${_e}`,Js=`shown${_e}`,dn=`click${_e}${Ut}`,un=`keydown${_e}${Ut}`,Zs=`keyup${_e}${Ut}`,He="show",be='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',eo=`${be}.${He}`,ut=".dropdown-menu",to=B()?"top-end":"top-start",io=B()?"top-start":"top-end",no=B()?"bottom-end":"bottom-start",so=B()?"bottom-start":"bottom-end",oo=B()?"left-start":"right-start",ro=B()?"right-start":"left-start",ao={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},lo={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Q extends U{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=f.next(this._element,ut)[0]||f.prev(this._element,ut)[0]||f.findOne(ut,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return ao}static get DefaultType(){return lo}static get NAME(){return cn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(le(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!l.trigger(this._element,Gs,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))l.on(t,"mouseover",et);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(He),this._element.classList.add(He),l.trigger(this._element,Js,e)}}hide(){if(le(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!l.trigger(this._element,Us,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))l.off(t,"mouseover",et);this._popper&&this._popper.destroy(),this._menu.classList.remove(He),this._element.classList.remove(He),this._element.setAttribute("aria-expanded","false"),ne.removeDataAttribute(this._menu,"popper"),l.trigger(this._element,Qs,e)}}_getConfig(e){if(typeof(e=super._getConfig(e)).reference=="object"&&!ie(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${cn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(ln===void 0)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let e=this._element;this._config.reference==="parent"?e=this._parent:ie(this._config.reference)?e=ae(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Yt(e,this._menu,t)}_isShown(){return this._menu.classList.contains(He)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return oo;if(e.classList.contains("dropstart"))return ro;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains("dropup")?t?io:to:t?so:no}_detectNavbar(){return this._element.closest(".navbar")!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(ne.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...M(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:t}){const n=f.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(s=>Ce(s));n.length&&Tt(n,t,e===hn,!n.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=Q.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0)throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===2||e.type==="keyup"&&e.key!=="Tab")return;const t=f.find(eo);for(const n of t){const s=Q.getInstance(n);if(!s||s._config.autoClose===!1)continue;const o=e.composedPath(),r=o.includes(s._menu);if(o.includes(s._element)||s._config.autoClose==="inside"&&!r||s._config.autoClose==="outside"&&r||s._menu.contains(e.target)&&(e.type==="keyup"&&e.key==="Tab"||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const a={relatedTarget:s._element};e.type==="click"&&(a.clickEvent=e),s._completeHide(a)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n=e.key==="Escape",s=[Ys,hn].includes(e.key);if(!s&&!n||t&&!n)return;e.preventDefault();const o=this.matches(be)?this:f.prev(this,be)[0]||f.next(this,be)[0]||f.findOne(be,e.delegateTarget.parentNode),r=Q.getOrCreateInstance(o);if(s)return e.stopPropagation(),r.show(),void r._selectMenuItem(e);r._isShown()&&(e.stopPropagation(),r.hide(),o.focus())}}l.on(document,un,be,Q.dataApiKeydownHandler),l.on(document,un,ut,Q.dataApiKeydownHandler),l.on(document,dn,Q.clearMenus),l.on(document,Zs,Q.clearMenus),l.on(document,dn,be,function(i){i.preventDefault(),Q.getOrCreateInstance(this).toggle()}),z(Q);const fn="backdrop",pn="show",mn=`mousedown.bs.${fn}`,co={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ho={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class gn extends Re{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return co}static get DefaultType(){return ho}static get NAME(){return fn}show(e){if(!this._config.isVisible)return void M(e);this._append();const t=this._getElement();this._config.isAnimated&&ze(t),t.classList.add(pn),this._emulateAnimation(()=>{M(e)})}hide(e){this._config.isVisible?(this._getElement().classList.remove(pn),this._emulateAnimation(()=>{this.dispose(),M(e)})):M(e)}dispose(){this._isAppended&&(l.off(this._element,mn),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=ae(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),l.on(e,mn,()=>{M(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){pi(e,this._getElement(),this._config.isAnimated)}}const ft=".bs.focustrap",uo=`focusin${ft}`,fo=`keydown.tab${ft}`,_n="backward",po={autofocus:!0,trapElement:null},mo={autofocus:"boolean",trapElement:"element"};class bn extends Re{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return po}static get DefaultType(){return mo}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),l.off(document,ft),l.on(document,uo,e=>this._handleFocusin(e)),l.on(document,fo,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,l.off(document,ft))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=f.focusableChildren(t);n.length===0?t.focus():this._lastTabNavDirection===_n?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){e.key==="Tab"&&(this._lastTabNavDirection=e.shiftKey?_n:"forward")}}const vn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",yn=".sticky-top",pt="padding-right",wn="margin-right";class Qt{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,pt,t=>t+e),this._setElementAttributes(vn,pt,t=>t+e),this._setElementAttributes(yn,wn,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,pt),this._resetElementAttributes(vn,pt),this._resetElementAttributes(yn,wn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const s=this.getWidth();this._applyManipulationCallback(e,o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+s)return;this._saveInitialAttribute(o,t);const r=window.getComputedStyle(o).getPropertyValue(t);o.style.setProperty(t,`${n(Number.parseFloat(r))}px`)})}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&ne.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,n=>{const s=ne.getDataAttribute(n,t);s!==null?(ne.removeDataAttribute(n,t),n.style.setProperty(t,s)):n.style.removeProperty(t)})}_applyManipulationCallback(e,t){if(ie(e))t(e);else for(const n of f.find(e,this._element))t(n)}}const q=".bs.modal",go=`hide${q}`,_o=`hidePrevented${q}`,En=`hidden${q}`,An=`show${q}`,bo=`shown${q}`,vo=`resize${q}`,yo=`click.dismiss${q}`,wo=`mousedown.dismiss${q}`,Eo=`keydown.dismiss${q}`,Ao=`click${q}.data-api`,Tn="modal-open",Cn="show",Gt="modal-static",To={backdrop:!0,focus:!0,keyboard:!0},Co={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class ve extends U{constructor(e,t){super(e,t),this._dialog=f.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Qt,this._addEventListeners()}static get Default(){return To}static get DefaultType(){return Co}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||l.trigger(this._element,An,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Tn),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){this._isShown&&!this._isTransitioning&&(l.trigger(this._element,go).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Cn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){l.off(window,q),l.off(this._dialog,q),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new gn({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new bn({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=f.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),ze(this._element),this._element.classList.add(Cn),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,l.trigger(this._element,bo,{relatedTarget:e})},this._dialog,this._isAnimated())}_addEventListeners(){l.on(this._element,Eo,e=>{e.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),l.on(window,vo,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),l.on(this._element,wo,e=>{l.one(this._element,yo,t=>{this._element===e.target&&this._element===t.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Tn),this._resetAdjustments(),this._scrollBar.reset(),l.trigger(this._element,En)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(l.trigger(this._element,_o).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;t==="hidden"||this._element.classList.contains(Gt)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(Gt),this._queueCallback(()=>{this._element.classList.remove(Gt),this._queueCallback(()=>{this._element.style.overflowY=t},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const s=B()?"paddingLeft":"paddingRight";this._element.style[s]=`${t}px`}if(!n&&e){const s=B()?"paddingRight":"paddingLeft";this._element.style[s]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const n=ve.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0)throw new TypeError(`No method named "${e}"`);n[e](t)}})}}l.on(document,Ao,'[data-bs-toggle="modal"]',function(i){const e=f.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&i.preventDefault(),l.one(e,An,n=>{n.defaultPrevented||l.one(e,En,()=>{Ce(this)&&this.focus()})});const t=f.findOne(".modal.show");t&&ve.getInstance(t).hide(),ve.getOrCreateInstance(e).toggle(this)}),tt(ve),z(ve);const oe=".bs.offcanvas",On=".data-api",Oo=`load${oe}${On}`,xn="show",kn="showing",Ln="hiding",Sn=".offcanvas.show",xo=`show${oe}`,ko=`shown${oe}`,Lo=`hide${oe}`,Dn=`hidePrevented${oe}`,$n=`hidden${oe}`,So=`resize${oe}`,Do=`click${oe}${On}`,$o=`keydown.dismiss${oe}`,Io={backdrop:!0,keyboard:!0,scroll:!1},No={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class re extends U{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Io}static get DefaultType(){return No}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||l.trigger(this._element,xo,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new Qt().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(kn),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(xn),this._element.classList.remove(kn),l.trigger(this._element,ko,{relatedTarget:e})},this._element,!0))}hide(){this._isShown&&(l.trigger(this._element,Lo).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Ln),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(xn,Ln),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Qt().reset(),l.trigger(this._element,$n)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=!!this._config.backdrop;return new gn({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{this._config.backdrop!=="static"?this.hide():l.trigger(this._element,Dn)}:null})}_initializeFocusTrap(){return new bn({trapElement:this._element})}_addEventListeners(){l.on(this._element,$o,e=>{e.key==="Escape"&&(this._config.keyboard?this.hide():l.trigger(this._element,Dn))})}static jQueryInterface(e){return this.each(function(){const t=re.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}l.on(document,Do,'[data-bs-toggle="offcanvas"]',function(i){const e=f.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),le(this))return;l.one(e,$n,()=>{Ce(this)&&this.focus()});const t=f.findOne(Sn);t&&t!==e&&re.getInstance(t).hide(),re.getOrCreateInstance(e).toggle(this)}),l.on(window,Oo,()=>{for(const i of f.find(Sn))re.getOrCreateInstance(i).show()}),l.on(window,So,()=>{for(const i of f.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(i).position!=="fixed"&&re.getOrCreateInstance(i).hide()}),tt(re),z(re);const In={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Po=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Mo=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,jo=(i,e)=>{const t=i.nodeName.toLowerCase();return e.includes(t)?!Po.has(t)||!!Mo.test(i.nodeValue):e.filter(n=>n instanceof RegExp).some(n=>n.test(t))},Fo={allowList:In,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Ho={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Wo={entry:"(string|element|function|null)",selector:"(string|element)"};class Bo extends Re{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Fo}static get DefaultType(){return Ho}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[s,o]of Object.entries(this._config.content))this._setContent(e,o,s);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},Wo)}_setContent(e,t,n){const s=f.findOne(n,e);s&&((t=this._resolvePossibleFunction(t))?ie(t)?this._putElementInTemplate(ae(t),s):this._config.html?s.innerHTML=this._maybeSanitize(t):s.textContent=t:s.remove())}_maybeSanitize(e){return this._config.sanitize?function(t,n,s){if(!t.length)return t;if(s&&typeof s=="function")return s(t);const o=new window.DOMParser().parseFromString(t,"text/html"),r=[].concat(...o.body.querySelectorAll("*"));for(const a of r){const c=a.nodeName.toLowerCase();if(!Object.keys(n).includes(c)){a.remove();continue}const d=[].concat(...a.attributes),u=[].concat(n["*"]||[],n[c]||[]);for(const h of d)jo(h,u)||a.removeAttribute(h.nodeName)}return o.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return M(e,[void 0,this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const zo=new Set(["sanitize","allowList","sanitizeFn"]),Jt="fade",mt="show",Ro=".tooltip-inner",Nn=".modal",Pn="hide.bs.modal",Ge="hover",Zt="focus",ei="click",qo={AUTO:"auto",TOP:"top",RIGHT:B()?"left":"right",BOTTOM:"bottom",LEFT:B()?"right":"left"},Vo={allowList:In,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Ko={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class ye extends U{constructor(e,t){if(ln===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Vo}static get DefaultType(){return Ko}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),l.off(this._element.closest(Nn),Pn,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=l.trigger(this._element,this.constructor.eventName("show")),t=(ui(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(n),l.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(mt),"ontouchstart"in document.documentElement)for(const o of[].concat(...document.body.children))l.on(o,"mouseover",et);this._queueCallback(()=>{l.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!l.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(mt),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))l.off(e,"mouseover",et);this._activeTrigger[ei]=!1,this._activeTrigger[Zt]=!1,this._activeTrigger[Ge]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),l.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Jt,mt),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(s=>{do s+=Math.floor(1e6*Math.random());while(document.getElementById(s));return s})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(Jt),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new Bo({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Ro]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Jt)}_isShown(){return this.tip&&this.tip.classList.contains(mt)}_createPopper(e){const t=M(this._config.placement,[this,e,this._element]),n=qo[t.toUpperCase()];return Yt(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return M(e,[this._element,this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:n=>{this._getTipElement().setAttribute("data-popper-placement",n.state.placement)}}]};return{...t,...M(this._config.popperConfig,[void 0,t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if(t==="click")l.on(this._element,this.constructor.eventName("click"),this._config.selector,n=>{const s=this._initializeOnDelegatedTarget(n);s._activeTrigger[ei]=!(s._isShown()&&s._activeTrigger[ei]),s.toggle()});else if(t!=="manual"){const n=t===Ge?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),s=t===Ge?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");l.on(this._element,n,this._config.selector,o=>{const r=this._initializeOnDelegatedTarget(o);r._activeTrigger[o.type==="focusin"?Zt:Ge]=!0,r._enter()}),l.on(this._element,s,this._config.selector,o=>{const r=this._initializeOnDelegatedTarget(o);r._activeTrigger[o.type==="focusout"?Zt:Ge]=r._element.contains(o.relatedTarget),r._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},l.on(this._element.closest(Nn),Pn,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=ne.getDataAttributes(this._element);for(const n of Object.keys(t))zo.has(n)&&delete t[n];return e={...t,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:ae(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=ye.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0)throw new TypeError(`No method named "${e}"`);t[e]()}})}}z(ye);const Xo=".popover-header",Yo=".popover-body",Uo={...ye.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Qo={...ye.DefaultType,content:"(null|string|element|function)"};class gt extends ye{static get Default(){return Uo}static get DefaultType(){return Qo}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Xo]:this._getTitle(),[Yo]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=gt.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0)throw new TypeError(`No method named "${e}"`);t[e]()}})}}z(gt);const ti=".bs.scrollspy",Go=`activate${ti}`,Mn=`click${ti}`,Jo=`load${ti}.data-api`,We="active",ii="[href]",jn=".nav-link",Zo=`${jn}, .nav-item > ${jn}, .list-group-item`,er={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},tr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Je extends U{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return er}static get DefaultType(){return tr}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=ae(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(l.off(this._config.target,Mn),l.on(this._config.target,Mn,ii,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,s=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:s,behavior:"smooth"});n.scrollTop=s}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),e)}_observerCallback(e){const t=r=>this._targetLinks.get(`#${r.target.id}`),n=r=>{this._previousScrollData.visibleEntryTop=r.target.offsetTop,this._process(t(r))},s=(this._rootElement||document.documentElement).scrollTop,o=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const r of e){if(!r.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(r));continue}const a=r.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&a){if(n(r),!s)return}else o||a||n(r)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=f.find(ii,this._config.target);for(const t of e){if(!t.hash||le(t))continue;const n=f.findOne(decodeURI(t.hash),this._element);Ce(n)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,n))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(We),this._activateParents(e),l.trigger(this._element,Go,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))f.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(We);else for(const t of f.parents(e,".nav, .list-group"))for(const n of f.prev(t,Zo))n.classList.add(We)}_clearActiveClass(e){e.classList.remove(We);const t=f.find(`${ii}.${We}`,e);for(const n of t)n.classList.remove(We)}static jQueryInterface(e){return this.each(function(){const t=Je.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}l.on(window,Jo,()=>{for(const i of f.find('[data-bs-spy="scroll"]'))Je.getOrCreateInstance(i)}),z(Je);const we=".bs.tab",ir=`hide${we}`,nr=`hidden${we}`,sr=`show${we}`,or=`shown${we}`,rr=`click${we}`,ar=`keydown${we}`,lr=`load${we}`,cr="ArrowLeft",Fn="ArrowRight",hr="ArrowUp",Hn="ArrowDown",ni="Home",Wn="End",Ee="active",Bn="fade",si="show",zn=".dropdown-toggle",oi=`:not(${zn})`,Rn='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',ri=`.nav-link${oi}, .list-group-item${oi}, [role="tab"]${oi}, ${Rn}`,dr=`.${Ee}[data-bs-toggle="tab"], .${Ee}[data-bs-toggle="pill"], .${Ee}[data-bs-toggle="list"]`;class Ae extends U{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),l.on(this._element,ar,t=>this._keydown(t)))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?l.trigger(t,ir,{relatedTarget:e}):null;l.trigger(e,sr,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){e&&(e.classList.add(Ee),this._activate(f.getElementFromSelector(e)),this._queueCallback(()=>{e.getAttribute("role")==="tab"?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),l.trigger(e,or,{relatedTarget:t})):e.classList.add(si)},e,e.classList.contains(Bn)))}_deactivate(e,t){e&&(e.classList.remove(Ee),e.blur(),this._deactivate(f.getElementFromSelector(e)),this._queueCallback(()=>{e.getAttribute("role")==="tab"?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),l.trigger(e,nr,{relatedTarget:t})):e.classList.remove(si)},e,e.classList.contains(Bn)))}_keydown(e){if(![cr,Fn,hr,Hn,ni,Wn].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter(s=>!le(s));let n;if([ni,Wn].includes(e.key))n=t[e.key===ni?0:t.length-1];else{const s=[Fn,Hn].includes(e.key);n=Tt(t,e.target,s,!0)}n&&(n.focus({preventScroll:!0}),Ae.getOrCreateInstance(n).show())}_getChildren(){return f.find(ri,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const n of t)this._setInitialAttributesOnChild(n)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=f.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const s=(o,r)=>{const a=f.findOne(o,n);a&&a.classList.toggle(r,t)};s(zn,Ee),s(".dropdown-menu",si),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Ee)}_getInnerElement(e){return e.matches(ri)?e:f.findOne(ri,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each(function(){const t=Ae.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}l.on(document,rr,Rn,function(i){["A","AREA"].includes(this.tagName)&&i.preventDefault(),le(this)||Ae.getOrCreateInstance(this).show()}),l.on(window,lr,()=>{for(const i of f.find(dr))Ae.getOrCreateInstance(i)}),z(Ae);const de=".bs.toast",ur=`mouseover${de}`,fr=`mouseout${de}`,pr=`focusin${de}`,mr=`focusout${de}`,gr=`hide${de}`,_r=`hidden${de}`,br=`show${de}`,vr=`shown${de}`,qn="hide",_t="show",bt="showing",yr={animation:"boolean",autohide:"boolean",delay:"number"},wr={animation:!0,autohide:!0,delay:5e3};class Ze extends U{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return wr}static get DefaultType(){return yr}static get NAME(){return"toast"}show(){l.trigger(this._element,br).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(qn),ze(this._element),this._element.classList.add(_t,bt),this._queueCallback(()=>{this._element.classList.remove(bt),l.trigger(this._element,vr),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(l.trigger(this._element,gr).defaultPrevented||(this._element.classList.add(bt),this._queueCallback(()=>{this._element.classList.add(qn),this._element.classList.remove(bt,_t),l.trigger(this._element,_r)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(_t),super.dispose()}isShown(){return this._element.classList.contains(_t)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){l.on(this._element,ur,e=>this._onInteraction(e,!0)),l.on(this._element,fr,e=>this._onInteraction(e,!1)),l.on(this._element,pr,e=>this._onInteraction(e,!0)),l.on(this._element,mr,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=Ze.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}return tt(Ze),z(Ze),{Alert:qe,Button:Ve,Carousel:Le,Collapse:De,Dropdown:Q,Modal:ve,Offcanvas:re,Popover:gt,ScrollSpy:Je,Tab:Ae,Toast:Ze,Tooltip:ye}});</script>
@@ -38853,29 +38928,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
38853
38928
  Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on line "+(o+1)+": Unexpected "+(y==1?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[y]||y,line:this.lexer.yylineno,loc:E,expected:b})}if(v==3){if(y==J)throw new Error(x||"Parsing halted.");T=this.lexer.yyleng,_=this.lexer.yytext,o=this.lexer.yylineno,E=this.lexer.yylloc,y=Y()}for(;!(N.toString()in r[g]);){if(g===0)throw new Error(x||"Parsing halted.");H(1),g=a[a.length-1]}O=y==2?null:y,y=N,g=a[a.length-1],m=r[g]&&r[g][N],v=3}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+y);switch(m[0]){case 1:a.push(y),f.push(this.lexer.yytext),l.push(this.lexer.yylloc),a.push(m[1]),y=null,O?(y=O,O=null):(T=this.lexer.yyleng,_=this.lexer.yytext,o=this.lexer.yylineno,E=this.lexer.yylloc,v>0&&v--);break;case 2:if(u=this.productions_[m[1]][1],k.$=f[f.length-u],k._$={first_line:l[l.length-(u||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(u||1)].first_column,last_column:l[l.length-1].last_column},W&&(k._$.range=[l[l.length-(u||1)].range[0],l[l.length-1].range[1]]),z=this.performAction.call(k,_,T,o,this.yy,m[1],f,l),typeof z!="undefined")return z;u&&(a=a.slice(0,-1*u*2),f=f.slice(0,-1*u),l=l.slice(0,-1*u)),a.push(this.productions_[m[1]][0]),f.push(k.$),l.push(k._$),h=r[a[a.length-2]][a[a.length-1]],a.push(h);break;case 3:return!0}}return!0}},e=function(){var i={EOF:1,parseError:function(s,a){if(this.yy.parser)this.yy.parser.parseError(s,a);else throw new Error(s)},setInput:function(s){return this._input=s,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var a=s.length,f=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===l.length?this.yylloc.first_column:0)+l[l.length-f.length].length-f[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-a]),this},more:function(){return this._more=!0,this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
38854
38929
  `+a+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,a,f,l,r;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),o=0;o<_.length&&(f=this._input.match(this.rules[_[o]]),!(f&&(!a||f[0].length>a[0].length)&&(a=f,l=o,!this.options.flex)));o++);return a?(r=a[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],s=this.performAction.call(this,this.yy,this,_[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
38855
38930
  `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return typeof s!="undefined"?s:this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(s){this.begin(s)}};return i.options={},i.performAction=function(s,a,f,l){switch(f){case 0:return"*";case 1:return"/";case 2:return"-";case 3:return"+";case 4:return"^";case 5:return"(";case 6:return")";case 7:return",";case 8:return"==";case 9:return"!=";case 10:return"~=";case 11:return">=";case 12:return"<=";case 13:return"<";case 14:return">";case 15:return"notIn";case 16:return"and";case 17:return"or";case 18:return"not";case 19:return"in";case 20:return"of";case 21:return"if";case 22:return"then";case 23:return"else";case 24:return"mod";case 25:break;case 26:return"Number";case 27:return a.yytext=JSON.stringify({name:a.yytext,type:"unescaped"}),"Symbol";case 28:return a.yytext=JSON.stringify({name:s.buildString("'",a.yytext),type:"single-quoted"}),"Symbol";case 29:return a.yytext=JSON.stringify(s.buildString('"',a.yytext)),"String";case 30:return"%";case 31:return"?";case 32:return":";case 33:return"EndOfExpression"}},i.rules=[/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\))/,/^(?:\,)/,/^(?:==)/,/^(?:\!=)/,/^(?:\~=)/,/^(?:>=)/,/^(?:<=)/,/^(?:<)/,/^(?:>)/,/^(?:not\s+in[^\w])/,/^(?:and[^\w])/,/^(?:or[^\w])/,/^(?:not[^\w])/,/^(?:in[^\w])/,/^(?:of[^\w])/,/^(?:if[^\w])/,/^(?:then[^\w])/,/^(?:else[^\w])/,/^(?:mod[^\w])/,/^(?:\s+)/,/^(?:[0-9]+(?:\.[0-9]+)?(?![0-9\.]))/,/^(?:[a-zA-Z$_][\.a-zA-Z0-9$_]*)/,/^(?:'(?:\\'|\\\\|[^'\\])*')/,/^(?:"(?:\\"|\\\\|[^"\\])*")/,/^(?:\%)/,/^(?:\?)/,/^(?::)/,/^(?:$)/],i.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],inclusive:!0}},i}();t.lexer=e;function n(){this.yy={}}return n.prototype=t,t.Parser=n,new n}(),a1=s1;s1.Parser;var c1=function(t){function e(n){var i;return U(this,e),i=R(this,e,["Unknown function: ".concat(n,"()")]),C(i,"I18N_STRING","UNKNOWN_FUNCTION"),i.functionName=n,i}return B(e,t),M(e)}(S(ReferenceError)),V=function(t){function e(n){var i;return U(this,e),i=R(this,e,["Property \u201C".concat(n,"\u201D does not exist.")]),C(i,"I18N_STRING","UNKNOWN_PROPERTY"),i.propertyName=n,i}return B(e,t),M(e)}(S(ReferenceError)),w1=function(t){function e(n){var i;return U(this,e),i=R(this,e,["Unknown option: ".concat(n)]),C(i,"I18N_STRING","UNKNOWN_OPTION"),i.keyName=n,i}return B(e,t),M(e)}(S(TypeError)),D=function(t){function e(n,i){var c;return U(this,e),c=R(this,e,["Expected a ".concat(n,", but got a ").concat(i," instead.")]),C(c,"I18N_STRING","UNEXPECTED_TYPE"),c.expectedType=n,c.recievedType=i,c}return B(e,t),M(e)}(S(TypeError)),K=function(t){function e(n){var i;return U(this,e),i=R(this,e,[n]),C(i,"I18N_STRING","INTERNAL"),i}return B(e,t),M(e)}(S(Error));function I(t,e){return P(t)==="object"||typeof t=="function"?Object.prototype.hasOwnProperty.call(t,e):!1}function _1(t,e){return(t%e+e)%e}function v1(t){if(P(t)!=="object")return t;if(t instanceof Number||t instanceof String||t instanceof Boolean)return t.valueOf()}function G(t){return Array.isArray(t)&&t.length===1&&(t=t[0]),v1(t)}function L(t){return t=G(t),t===void 0?"undefined":t===null?"null":t===!0?"true":t===!1?"false":typeof t=="number"?"number":typeof t=="string"?"text":P(t)!=="object"&&typeof t!="function"?"unknown type":Array.isArray(t)?"list":"object"}function d(t){if(t=G(t),typeof t=="number")return t;throw new D("number",L(t))}function u1(t){if(t=G(t),typeof t=="string")return t;throw new D("text",L(t))}function $(t){if(t=G(t),typeof t=="string"||typeof t=="number")return t;throw new D("text or number",L(t))}function x1(t){if(t=G(t),typeof t=="boolean")return t;throw new D("logical value (\u201Ctrue\u201D or \u201Cfalse\u201D)",L(t))}function t1(t){if(t==null)throw new D("list",L(t));return Array.isArray(t)?t:[t]}function e1(t){for(var e=Q(t),n=[];e.length;){var i=e.pop();Array.isArray(i)?e.push.apply(e,Q(i)):n.push(i)}return n.reverse()}var l1={isfn:function(e,n){return I(e,n)&&typeof e[n]=="function"},unknown:function(e){throw new c1(e)},coerceArray:t1,coerceNumber:d,coerceNumberOrString:$,coerceBoolean:x1,isSubset:function(e,n){var i=t1(e),c=t1(n);return i.every(function(s){return c.includes(s)})},warnDeprecated:function(){var t=3,e={ternary:0,modulo:0};return function(n,i){switch(n){case"ternary":if(e.ternary++>=t)break;console.warn("The use of ? and : as conditional operators has been deprecated in Filtrex v3 in favor of the if..then..else ternary operator. See issue #34 for more information.");break;case"modulo":if(e.modulo++>=t)break;console.warn("The use of '%' as a modulo operator has been deprecated in Filtrex v3 in favor of the 'mod' operator. You can use it like this: '3 mod 2 == 1'. See issue #48 for more information.");break}return i}}(),buildString:function(e,n){e=String(e)[0],n=String(n);var i="";if(n[0]!==e||n[n.length-1]!==e)throw new K("Unexpected internal error: String literal doesn't begin/end with the right quotation mark.");for(var c=1;c<n.length-1;c++)if(n[c]==="\\"){if(c++,c>=n.length-1)throw new K("Unexpected internal error: Unescaped backslash at the end of string literal.");if(n[c]==="\\")i+="\\";else if(n[c]===e)i+=e;else throw new K("Unexpected internal error: Invalid escaped character in string literal: ".concat(n[c]))}else{if(n[c]===e)throw new K("Unexpected internal error: String literal contains unescaped quotation mark.");i+=n[c]}return i},reduceRelation:function(e){for(var n=[],i=[],c=e1([e[0]]).join(""),s=0,a=1;a<e.length-1;a+=2){var f=e1([e[a+1]]).join(""),l="tmp".concat(s++);i.push('ops["'.concat(e[a],'"](').concat(c,", ").concat(l," = ").concat(f,")")),c=l,n.push(l)}return"(function(){ var ".concat(n.join(", "),"; return ").concat(i.join(" && "),";})()")}};a1.yy=Object.create(l1);function k1(t,e,n,i){return n==null?n:e(t)}function S1(t,e,n,i){if(i==="single-quoted")return e(t);var c=t.split("."),s=r1(c),a;try{for(s.s();!(a=s.n()).done;){var f,l=a.value;if(I((f=n)!==null&&f!==void 0?f:{},l))n=n[l];else throw new V(l)}}catch(r){s.e(r)}finally{s.f()}return n}function E1(t,e,n,i){if(n==null)return n;if(i==="single-quoted")return e(t);var c=t.split("."),s=r1(c),a;try{for(s.s();!(a=s.n()).done;){var f=a.value;if(n==null)return n;n=n[f]}}catch(l){s.e(l)}finally{s.f()}return n}function O1(t,e){var n;if(arguments.length>2)throw new TypeError("Too many arguments.");e=P(e)==="object"?e:{};for(var i=["extraFunctions","constants","customProp","operators"],c=e,s=c.extraFunctions,a=c.constants,f=c.customProp,l=c.operators,r=0,_=Object.keys(e);r<_.length;r++){var o=_[r];if(!i.includes(o))throw new w1(o)}var T={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,log:Math.log,log2:Math.log2,log10:Math.log10,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,exists:function(u){return u!=null},empty:function(u){return u==null||u===""||Array.isArray(u)&&u.length===0}};if(s)for(var v=0,N=Object.keys(s);v<N.length;v++){var J=N[v];T[J]=s[J]}var E={"+":function(u,h){return $(u)+$(h)},"-":function(u,h){return h===void 0?-d(u):d(u)-d(h)},"*":function(u,h){return d(u)*d(h)},"/":function(u,h){return d(u)/d(h)},"^":function(u,h){return Math.pow(d(u),d(h))},mod:function(u,h){return _1(d(u),d(h))},"==":function(u,h){return u===h},"!=":function(u,h){return u!==h},"<":function(u,h){return d(u)<d(h)},"<=":function(u,h){return d(u)<=d(h)},">=":function(u,h){return d(u)>=d(h)},">":function(u,h){return d(u)>d(h)},"~=":function(u,h){return RegExp(u1(h)).test(u1(u))}};if(l)for(var W=0,H=Object.keys(l);W<H.length;W++){var Y=H[W];E[Y]=l[Y]}l=E,a=(n=a)!==null&&n!==void 0?n:{};var y=e1(a1.parse(t));y.unshift("return "),y.push(";");function O(p,u,h){if(I(u!=null?u:{},p))return u[p];throw new V(p)}function g(p){return function(h){if(I(p!=null?p:{},h))return p[h];throw new V(h)}}typeof f=="function"&&(O=function(u,h,b){return f(u,g(h),h,b)});function m(p){return function(h){for(var b=h.name,x=arguments.length,w=new Array(x>1?x-1:0),Z=1;Z<x;Z++)w[Z-1]=arguments[Z];if(I(p,b)&&typeof p[b]=="function")return p[b].apply(p,w);throw new c1(b)}}function z(p,u){var h=p.name,b=p.type;return b==="unescaped"&&I(a,h)?a[h]:O(h,u,b)}var k=new Function("call","ops","std","prop","data",y.join(""));return function(p){try{return k(m(T),l,l1,z,p)}catch(u){return u}}}return A.compileExpression=O1,A.useDotAccessOperator=S1,A.useDotAccessOperatorAndOptionalChaining=E1,A.useOptionalChaining=k1,Object.defineProperty(A,"__esModule",{value:!0}),A}({})})();</script>
38856
- <script>(function(){const b=typeof Formio!="undefined"?Formio:typeof window!="undefined"?window.Formio:void 0,v=typeof FormioUtils!="undefined"?FormioUtils:b?b.Utils:typeof window!="undefined"?window.FormioUtils:void 0,C=b&&b.Components&&b.Components.components?b.Components.components.list:class{static schema(){return{}}},D=v&&v.getRandomComponentId?v.getRandomComponentId:()=>Math.random().toString(36).substring(7),F=v&&v.boolValue?v.boolValue:V=>!!V,L=V=>!!V&&typeof V.then=="function";var E=window.platform==="web";class I extends C{static schema(...e){return C.schema({type:"select",label:"Select",key:"select",idPath:"id",data:{values:[{label:"",value:""}],json:"",url:"",resource:"",custom:""},clearOnRefresh:!1,limit:100,dataSrc:"values",valueProperty:"",lazyLoad:!0,filter:"",searchEnabled:!0,searchDebounce:.3,searchField:"",minSearch:0,readOnlyValue:!1,authenticate:!1,ignoreCache:!1,template:"<span>{{ item.label }}</span>",selectFields:"",searchThreshold:.3,uniqueOptions:!1,tableView:!0,fuseOptions:{include:"score",threshold:.3},indexeddb:{filter:{}},customOptions:{},useExactSearch:!1},...e)}static get builderInfo(){return{title:"Select",group:"basic",icon:"th-list",weight:70,documentation:"/userguide/#select",schema:I.schema()}}static get serverConditionSettings(){return SelectComponent.conditionOperatorsSettings}static get conditionOperatorsSettings(){return{...super.conditionOperatorsSettings,valueComponent(e){const t={...e,type:"select"};return isSelectResourceWithObjectValue(e)&&(t.reference=!1,t.onSetItems=`
38931
+ <script>(function(){const b=typeof Formio!="undefined"?Formio:typeof window!="undefined"?window.Formio:void 0,v=typeof FormioUtils!="undefined"?FormioUtils:b?b.Utils:typeof window!="undefined"?window.FormioUtils:void 0,C=b&&b.Components&&b.Components.components?b.Components.components.list:class{static schema(){return{}}},D=v&&v.getRandomComponentId?v.getRandomComponentId:()=>Math.random().toString(36).substring(7),F=v&&v.boolValue?v.boolValue:V=>!!V,E=V=>!!V&&typeof V.then=="function";var L=window.platform==="web";class I extends C{static schema(...e){return C.schema({type:"select",label:"Select",key:"select",idPath:"id",data:{values:[{label:"",value:""}],json:"",url:"",resource:"",custom:""},clearOnRefresh:!1,limit:100,dataSrc:"values",valueProperty:"",lazyLoad:!0,filter:"",searchEnabled:!0,searchDebounce:.3,searchField:"",minSearch:0,readOnlyValue:!1,authenticate:!1,ignoreCache:!1,template:"<span>{{ item.label }}</span>",selectFields:"",searchThreshold:.3,uniqueOptions:!1,tableView:!0,fuseOptions:{include:"score",threshold:.3},indexeddb:{filter:{}},customOptions:{},useExactSearch:!1},...e)}static get builderInfo(){return{title:"Select",group:"basic",icon:"th-list",weight:70,documentation:"/userguide/#select",schema:I.schema()}}static get serverConditionSettings(){return SelectComponent.conditionOperatorsSettings}static get conditionOperatorsSettings(){return{...super.conditionOperatorsSettings,valueComponent(e){const t={...e,type:"select"};return isSelectResourceWithObjectValue(e)&&(t.reference=!1,t.onSetItems=`
38857
38932
  var templateKeys = FormioUtils.getItemTemplateKeys(component.template) || [];
38858
38933
  items = _.map(items || [], i => {
38859
38934
  var item = {};
38860
38935
  _.each(templateKeys, k => _.set(item, k, _.get(i, k)));
38861
38936
  return item;
38862
38937
  })
38863
- `),t}}}static savedValueTypes(e){const{boolean:t,string:n,number:o,object:r,array:s}=componentValueTypes,{dataType:h,reference:a}=e,l=getComponentSavedTypes(e);return l||(a?[r]:h==="object"?[r,s]:componentValueTypes[h]?[componentValueTypes[h]]:[t,n,o,r,s])}init(){super.init(),this.templateData={},this.validators=(this.validators||[]).concat(["select","onlyAvailableItems"]);let e=[];const t=_.debounce((...n)=>(e=[],this.updateItems.apply(this,n)),100);this.triggerUpdate=(...n)=>(typeof this.itemsLoadedResolve=="function"&&this.itemsLoadedResolve(),this.itemsLoaded=new Promise(o=>{this.itemsLoadedResolve=o}),n.length&&(e=n),t(...e)),this.selectOptions=[],this.itemsFromUrl&&(this.isFromSearch=!1,this.searchServerCount=null,this.defaultServerCount=null,this.isScrollLoading=!1,this.searchDownloadedResources=[],this.defaultDownloadedResources=[]),this.activated=!1,this.itemsLoaded=new Promise(n=>{this.itemsLoadedResolve=n}),this.shouldPositionDropdown=this.hasDataGridAncestor(),this.isHtmlRenderMode()&&this.activate(),this.getTemplateKeys()}getTemplateKeys(){const e=this.component.template;this.templateKeys=this.options.readOnly&&e?FormioUtils.getItemTemplateKeys(e):[]}get dataReady(){return this.root&&this.root.submissionSet&&!this.attached?Promise.resolve():this.itemsLoaded}get defaultSchema(){return I.schema()}get emptyValue(){if(this.component.multiple)return[];if(this.component.dataSrc==="json"&&this.component.data.json){const e=this.component.data.json[0];let t;return this.valueProperty?t=_.get(e,this.valueProperty):t=e,t&&typeof t=="string"?"":{}}return this.valueProperty?"":{}}get valueProperty(){return this.component.valueProperty?this.component.valueProperty:this.component.dataSrc==="values"?"value":""}get inputInfo(){const e=super.elementInfo();return e.type="select",e.changeEvent="change",e}get isSelectResource(){return this.component.dataSrc==="resource"}get isSelectMaterdata(){return this.component.dataSrc==="masterdata"}get isSelectURL(){return this.component.dataSrc==="url"}get itemsFromUrl(){return this.isSelectResource||this.isSelectURL||this.isSelectMaterdata}get isInfiniteScrollProvided(){return this.itemsFromUrl}get shouldDisabled(){return super.shouldDisabled||this.parentDisabled}get shouldInitialLoad(){return this.component.widget==="html5"&&this.isEntireObjectDisplay()&&this.component.searchField&&this.dataValue?!1:super.shouldLoad}isEntireObjectDisplay(){return(this.component.dataSrc==="resource"||this.component.dataSrc==="masterdata")&&(this.valueProperty==="data"||this.component.valueProperty==="data")}findMasterdataItem(e){if(!this.component.masterdata||e==null)return null;const t=String(e),n=this.component.valueProperty||this.valueProperty;return this.component.masterdata.find(o=>{if(!o||typeof o!="object")return!1;if(n){let s=_.get(o,n);if(s!=null&&String(s)===t||n.startsWith("data.")&&(s=_.get(o,n.replace(/^data\./,"")),s!=null&&String(s)===t)||o[n]!==void 0&&o[n]!==null&&String(o[n])===t)return!0}const r=o.data||o;for(const s of Object.keys(r))if((/id$/i.test(s)||s==="value"||s==="_id"||s==="id")&&r[s]!==void 0&&r[s]!==null&&String(r[s])===t)return!0;return!1})}selectValueAndLabel(e){if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const n=this.findMasterdataItem(e);n&&(e=n)}const t=this.getOptionValue(this.isEntireObjectDisplay()&&!this.itemValue(e)?e:this.itemValue(e));return{value:t,label:this.itemTemplate(this.isEntireObjectDisplay()&&!_.isObject(e.data)?{data:e}:e,t)}}itemTemplate(e,t){if(!_.isNumber(e)&&_.isEmpty(e))return"";if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const r=this.findMasterdataItem(e);r&&(e=r)}if(this.options.readOnly&&this.component.readOnlyValue&&!this.component.template&&!this.component.labelProperty)return this.itemValue(e);if(e&&!this.component.template){const r=e.label||e,s=typeof r=="string"?this.t(r,{_userInput:!0}):r;return this.sanitize(s,this.shouldSanitizeValue)}if(this.component.multiple&&_.isArray(this.dataValue)?this.dataValue.find(r=>t===r):this.dataValue===t){const r=this.selectData;if(r){const s=this.component.reference&&t&&(t._id?t._id.toString():t);(!this.templateData||!this.templateData[s])&&this.getOptionTemplate(e,t),this.component.multiple?r[s]&&(e=r[s]):e=r}}if(typeof e=="string"||typeof e=="number")return this.sanitize(this.t(e,{_userInput:!0}),this.shouldSanitizeValue);if(Array.isArray(e))return e.map(r=>typeof r=="string"||typeof r=="number"?this.sanitize(this.t(r,{_userInput:!0}),this.shouldSanitizeValue):r);if(e.data){const r=/item\.data\.\w*/g.test(this.component.template);e.data=this.isEntireObjectDisplay()&&_.isObject(e.data)&&!r?JSON.stringify(e.data):e.data}let n=e;typeof e=="object"&&e!==null&&!e.data&&(n=Object.assign({data:e},e));const o=this.sanitize(this.component.template?this.interpolate(this.component.template,{item:n}):e.label);if(o){const r=o.replace(/<\/?[^>]+(>|$)/g,"");let s;return this.i18next&&this.i18next.translator&&(s=this.i18next.translator),!r||s&&!this.t(r,{_userInput:!0})?void 0:s?o.replace(r,this.t(r,{_userInput:!0})):r}else return JSON.stringify(e)}addOption(e,t,n={},o=D()){if(_.isNil(t))return;const r=this.component.idPath?this.component.idPath.split(".").reduceRight((a,l)=>({[l]:a}),o):{},s=Object.assign({value:this.getOptionValue(e),label:t},r);if(!(this.component.uniqueOptions&&this.selectOptions.find(a=>_.isEqual(a.value,s.value)))&&(e&&this.selectOptions.push(s),this.refs.selectContainer&&this.component.widget==="html5")){s.value&&_.isObject(s.value)&&_.isEmpty(s.value)&&(s.value="");const a=document.createElement("div");a.innerHTML=this.sanitize(this.renderTemplate("selectOption",{selected:_.isEqual(this.getOptionValue(this.dataValue),s.value),option:s,attrs:n,id:o,useId:(this.valueProperty===""||this.isEntireObjectDisplay())&&_.isObject(e)&&o}),this.shouldSanitizeValue).trim(),s.element=a.firstChild,this.refs.selectContainer.appendChild(s.element)}}addValueOptions(e){e=e||[];let t=!1,n=this.dataValue;if(this.options.pdf&&!e.length&&this.component.dataSrc==="url"&&this.valueProperty&&(n=Array.isArray(n)?n.map(o=>_.set({},this.valueProperty,o)):_.set({},this.valueProperty,n)),!this.selectOptions.length){const o=Array.isArray(n)&&this.component.multiple?n:[n];t=this.addCurrentChoices(o,e),!t&&!this.component.multiple&&this.addPlaceholder()}return t}disableInfiniteScroll(){this.downloadedResources&&(this.downloadedResources.serverCount=this.downloadedResources.length,this.serverCount=this.downloadedResources.length)}setItems(e,t){if(logger.info(`[TF_SDK:171] \u2705 setItems() called for '${this.key}'. Items length:`,e?e.length:0,"fromSearch:",t),this.selectItems=e,typeof e=="string")try{e=JSON.parse(e)}catch(l){logger.warn(l.message),e=[]}if(this.component.onSetItems){const l=typeof this.component.onSetItems=="function"?this.component.onSetItems(this,e):this.evaluate(this.component.onSetItems,{items:e},"items");l&&(e=l)}!this.choices&&this.refs.selectContainer&&this.empty(this.refs.selectContainer),this.component.selectValues&&(e=_.get(e,this.component.selectValues,e)||[]);let n;if(this.itemsFromUrl){n=this.isSelectURL?_.isEqual(e,this.downloadedResources):!1;const l=this.component.limit>e.length,i=n&&this.downloadedResources&&this.downloadedResources.length===e.length;l?this.disableInfiniteScroll():i?this.selectOptions=[]:this.serverCount=e.serverCount}if(this.isScrollLoading&&e)n||(this.downloadedResources=this.downloadedResources?this.downloadedResources.concat(e):e),this.downloadedResources.serverCount=e.serverCount||this.downloadedResources.serverCount;else if(this.downloadedResources=e||[],this.selectOptions=[],!_.isEmpty(this.dataValue)&&this.component.idPath){const l=_.get(this.dataValue,this.component.idPath,null),i=!_.isNil(l)&&e.find(c=>_.get(c,this.component.idPath)===l);i&&this.setValue(i)}if(t||this.addValueOptions(e),this.component.widget==="html5"&&!this.component.placeholder&&this.addOption(null,""),_.each(e,(l,i)=>{if(this.root&&this.root.options.editForm&&this.root.options.editForm._id&&this.root.options.editForm._id===l._id)return;const c=this.selectValueAndLabel(l);this.addOption(c.value,c.label,{},_.get(l,this.component.idPath,String(i)))}),logger.info(`[TF_SDK:172] \u2705 selectOptions generated for '${this.key}', length:`,this.selectOptions.length),this.choices)if(logger.info(`[TF_SDK:173] \u2705 this.choices is true for '${this.key}', dataSrc:`,this.component.dataSrc),this.component.dataSrc==="masterdata"&&this.component.masterdata)if(this.selectOptions.sort(function(l,i){const c=typeof l.label=="string"?l.label:typeof l.value=="string"?l.value:"",d=typeof i.label=="string"?i.label:typeof i.value=="string"?i.value:"";return c.localeCompare?c.localeCompare(d):c>d?1:c<d?-1:0}),this.isScrollLoading){let l=[];for(let i=0;i<e.length;i++)for(let c=0;c<this.selectOptions.length;c++)this.selectOptions[c].value===e[i][this.component.valueProperty]&&l.push(this.selectOptions[c]);logger.info(`[TF_SDK:175] \u2705 setChoices called (scrollLoading) for '${this.key}' with array length:`,l.length),this.choices.setChoices(l,"value","label",!1)}else logger.info(`[TF_SDK:176] \u2705 setChoices called (normal masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else logger.info(`[TF_SDK:177] \u2705 setChoices called (non-masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else this.loading;this.isScrollLoading=!1,this.loading=!1;let o=!1;if(this.choices&&this.choices.input&&this.choices.input.isFocussed&&(o=this.choices.input.isFocussed),!(t&&o))if(this.isEmpty()){if(this.shouldAddDefaultValue&&!this.options.readOnly){const l=this.defaultValue;this.isEmpty(l)||this.setValue(l)}}else if(localStorage.getItem("renderMode")==="html"){var s=this.component.template,h=s.substring(s.lastIndexOf(".")+1,s.length),a=h.substring(0,h.indexOf("}"),h.length);if(a=a.trim(),e.length>0&&this.component.multiple){let l=[];for(let i=0;i<e.length;i++)l.push(e[i][a]);this.setValue(l,{noUpdateEvent:!1})}}else this.setValue(this.dataValue,{noUpdateEvent:!0});this.itemsLoadedResolve()}getSingleItemValueForHTMLMode(e){const t=this.selectOptions&&this.selectOptions.find(({value:n})=>_.isEqual(n,e));return t&&t.label||e}itemValueForHTMLMode(e){return this.isHtmlRenderMode()?Array.isArray(e)?e.map(n=>Array.isArray(n)?this.itemValueForHTMLMode(n):this.getSingleItemValueForHTMLMode(n)).join(", "):this.getSingleItemValueForHTMLMode(e):super.itemValueForHTMLMode(e)}get defaultValue(){let e=super.defaultValue;return!e&&(this.component.defaultValue===!1||this.component.defaultValue===0)&&(e=this.component.defaultValue),e}get loadingError(){return!this.component.refreshOn&&!this.component.refreshOnBlur&&this.networkError}loadItems(e,t,n,o,r,s){if(o=o||{},!this.shouldLoad||!this.itemsFromUrl&&this.options.readOnly){this.isScrollLoading=!1,this.loading=!1,this.itemsLoadedResolve();return}const h=parseInt(this.component.minSearch,10);if(this.component.searchField&&h>0&&(!t||t.length<h))return this.setItems([]);r=r||"GET",r.toUpperCase()==="GET"&&(s=null);const a=this.component.limit||100,l=this.isScrollLoading?this.selectOptions.length:0,i=this.component.disableLimit?{}:{limit:a,skip:l};if(e=this.interpolate(e,{formioBase:Formio.getBaseUrl(),search:t,limit:a,skip:l,page:Math.abs(Math.floor(l/a))}),this.component.searchField&&t){const c=Array.isArray(t)?t.join(","):typeof t=="object"?JSON.stringify(t):t;i[this.component.searchField]=this.component.searchField.endsWith("__regex")?_.escapeRegExp(c):c}this.component.selectFields&&(i.select=this.component.selectFields),this.component.sort&&(i.sort=this.component.sort),_.isEmpty(i)||(e+=(e.includes("?")?"&":"?")+Formio.serialize(i,c=>this.interpolate(c))),this.component.filter&&(e+=(e.includes("?")?"&":"?")+this.interpolate(this.component.filter)),o.ignoreCache=this.component.ignoreCache,o.header=n,this.loading=!0,Formio.makeRequest(this.options.formio,"select",e,r,s,o).then(c=>{this.loading=!1,this.error=null,this.setItems(c,!!t)}).catch(c=>{this.itemsFromUrl&&(this.setItems([]),this.disableInfiniteScroll()),this.isScrollLoading=!1,this.handleLoadingError(c)})}handleLoadingError(e){this.loading=!1,e.networkError&&(this.networkError=!0),this.itemsLoadedResolve(),this.emit("componentError",{component:this.component,message:e.toString()}),logger.warn(`[TF_SDK:178] \u26A0\uFE0F Unable to load resources for ${this.key}`)}get requestHeaders(){const e=new Formio.Headers;if(this.component.data&&this.component.data.headers)try{_.each(this.component.data.headers,t=>{t.key&&e.set(t.key,this.interpolate(t.value))})}catch(t){logger.warn(t.message)}return e}getCustomItems(){const e=this.evaluate(this.component.data.custom,{values:[]},"values");return this.asyncValues=L(e),e}asyncCustomValues(){return _.isBoolean(this.asyncValues)||this.getCustomItems(),this.asyncValues}updateCustomItems(e){if(this.asyncCustomValues()){if(!e&&!this.active){this.itemsLoadedResolve();return}this.loading=!0,this.getCustomItems().then(t=>{this.loading=!1,this.setItems(t||[])}).catch(t=>{this.handleLoadingError(t)})}else this.setItems(this.getCustomItems()||[])}isEmpty(e=this.dataValue){return super.isEmpty(e)||e===void 0}refresh(e,t){if(this.component.clearOnRefresh){const n=t?t.instance:null;n&&!n.pristine&&this.setValue(this.emptyValue)}this.updateItems(null,!0)}get additionalResourcesAvailable(){return _.isNil(this.serverCount)||this.serverCount>this.downloadedResources.length}get serverCount(){return this.isFromSearch?this.searchServerCount:this.defaultServerCount}set serverCount(e){this.isFromSearch?this.searchServerCount=e:this.defaultServerCount=e}get downloadedResources(){return this.isFromSearch?this.searchDownloadedResources:this.defaultDownloadedResources}set downloadedResources(e){this.isFromSearch?this.searchDownloadedResources=e:this.defaultDownloadedResources=e}get filteredMasterdata(){if(!this.component.masterdata)return[];let e=[...this.component.masterdata];if(this.component.filter)try{const t=this.component.filter.replace(/(~=\s*)(\{\{.*?\}\})/g,'$1"$2"'),n=this.interpolate(t,{data:this.data}),o=filtrex.compileExpression(n,{customProp:filtrex.useDotAccessOperatorAndOptionalChaining,extraFunctions:{equalsIgnoreCase:(r,s)=>String(r).toLowerCase()===String(s).toLowerCase(),matchIgnoreCase:(r,s)=>new RegExp(s,"i").test(String(r))}});e=e.filter(r=>o({data:r}))}catch(t){return console.warn("[TF_SDK:153] \u26A0\uFE0F Filter error:",t),[]}return e}updateItems(e,t){if(logger.info(`[TF_SDK:179] \u2705 updateItems() called for '${this.key}'. searchInput:`,e,"forceUpdate:",t,"dataSrc:",this.component.dataSrc),this.itemsLoaded=new Promise(n=>{this.itemsLoadedResolve=n}),!this.component.data){logger.warn(`[TF_SDK:180] \u26A0\uFE0F Select component ${this.key} does not have data configuration.`),this.itemsLoadedResolve();return}if(!this.visible){this.itemsLoadedResolve();return}switch(this.component.dataSrc){case"values":this.setItems(this.component.data.values);break;case"json":this.setItems(this.component.data.json);break;case"custom":this.updateCustomItems();break;case"masterdata":logger.info(`[TF_SDK:181] \u2705 masterdata case for '${this.key}'. masterdata length:`,this.filteredMasterdata?this.filteredMasterdata.length:0);let n=this.filteredMasterdata||[];if(n.length>0&&(n=n.map(o=>o&&typeof o=="object"&&!o.data?Object.assign({data:o},o):o)),!this.isFromSearch&&!this.isScrollLoading&&!this.component.dropdownOpened)if(logger.info(`[TF_SDK:182] \u2705 masterdata: Initial/Unopened State for '${this.key}'`),this.defaultDownloadedResources&&this.defaultDownloadedResources.length>0&&this.defaultDownloadedResources.length<n.length)logger.info(`[TF_SDK:183] \u2705 masterdata: defaultDownloadedResources > 0 for '${this.key}'`),this.setItems(this.defaultDownloadedResources);else if(!this.component.dropdownOpened&&this.data[this.key]&&String(this.data[this.key]).trim().length>0){logger.info(`[TF_SDK:184] \u2705 masterdata: Has pre-existing value for '${this.key}'`,this.data[this.key]);let o=[];this.component.multiple&&n.length>0?this.data[this.key].forEach(s=>n.filter(h=>{const a=_.get(h,this.component.valueProperty);(typeof a!="string"?String(a):a).includes(s)&&o.push(h)})):n.length>0&&(o=n.filter(s=>{const h=_.get(s,this.component.valueProperty),a=typeof h!="string"?String(h):h;return a==null?void 0:a.includes(this.data[this.key])}));const r=o.filter((s,h)=>h===o.findIndex(a=>_.get(s,this.component.valueProperty)===_.get(a,this.component.valueProperty)));this.setItems(r)}else logger.info(`[TF_SDK:185] \u2705 masterdata: No pre-existing value, loading full list for '${this.key}' (length: ${n.length})`),this.setItems(n);else logger.info(`[TF_SDK:186/187] \u2705 masterdata: Search/Scroll/Opened State for '${this.key}', loading list (length: ${n.length})`),this.setItems(n);break;case"resource":{if(!this.component.data.resource||!t&&!this.active){this.itemsLoadedResolve();return}let o=this.options.formio?this.options.formio.formsUrl:`${Formio.getProjectUrl()}/form`;if(o+=`/${this.component.data.resource}/submission`,t||this.additionalResourcesAvailable||!this.serverCount)try{this.loadItems(o,e,this.requestHeaders)}catch(r){logger.warn(`[TF_SDK:188] \u26A0\uFE0F Unable to load resources for ${this.key}`)}else this.setItems(this.downloadedResources);break}case"url":{if(!t&&!this.active&&!this.calculatedValue){this.itemsLoadedResolve();return}let{url:o}=this.component.data,r,s;o.startsWith("/")&&(o=(o.startsWith("/project")?Formio.getBaseUrl():Formio.getProjectUrl()||Formio.getBaseUrl())+o),this.component.data.method?(r=this.component.data.method,r.toUpperCase()==="POST"?s=this.component.data.body:s=null):r="GET";const h=this.component.authenticate?{}:{noToken:!0};this.loadItems(o,e,this.requestHeaders,h,r,s);break}case"indexeddb":{if(typeof window=="undefined")return;if(window.indexedDB||window.alert("Your browser doesn't support current version of indexedDB"),this.component.indexeddb&&this.component.indexeddb.database&&this.component.indexeddb.table){const o=window.indexedDB.open(this.component.indexeddb.database);o.onupgradeneeded=r=>{if(this.component.customOptions){const s=r.target.result,h=s.createObjectStore(this.component.indexeddb.table,{keyPath:"myKey",autoIncrement:!0});h.transaction.oncomplete=()=>{const a=s.transaction(this.component.indexeddb.table,"readwrite");this.component.customOptions.forEach(l=>{a.objectStore(this.component.indexeddb.table).put(l)})}}},o.onerror=()=>{window.alert(o.errorCode)},o.onsuccess=r=>{const a=r.target.result.transaction(this.component.indexeddb.table,"readwrite").objectStore(this.component.indexeddb.table);new Promise(l=>{const i=[];a.getAll().onsuccess=c=>{c.target.result.forEach(d=>{i.push(d)}),l(i)}}).then(l=>{_.isEmpty(this.component.indexeddb.filter)||(l=_.filter(l,this.component.indexeddb.filter)),this.setItems(l)})}}}}}addPlaceholder(){!this.component.placeholder||!this.component.placeholder.trim()||this.addOption("",this.component.placeholder,{placeholder:!0})}activate(){(this.loading||!this.active)&&this.setLoadingItem(),!this.active&&(this.activated=!0,this.triggerUpdate())}setLoadingItem(e=!1){this.choices?e?this.choices.setChoices([{value:`${this.id}-loading`,label:"Loading...",disabled:!0}],"value","label"):this.choices.setChoices([{value:"",label:`<i class="${this.iconClass("refresh")}" style="font-size:1.3em;"></i>`,disabled:!0}],"value","label",!0):(this.component.dataSrc==="url"||this.component.dataSrc==="resource")&&this.addOption("",this.t("loading..."))}get active(){return this.component.dataSrc==="masterdata"&&this.component.masterdata?!this.component.lazyLoad||this.activated:!this.component.lazyLoad||this.activated}render(){const e=this.inputInfo;return e.attr=e.attr||{},e.multiple=this.component.multiple,super.render(this.wrapElement(this.renderTemplate("select",{input:e,selectOptions:"",index:null})))}wrapElement(e){return this.component.addResource&&!this.options.readOnly?this.renderTemplate("resourceAdd",{element:e}):e}choicesOptions(){const e=this.component.hasOwnProperty("searchEnabled")?this.component.searchEnabled:!0,t=this.t(this.component.placeholder,{_userInput:!0});let n=this.component.customOptions||{};if(typeof n=="string")try{n=JSON.parse(n)}catch(a){logger.warn(a.message),n={}}const o={maxPatternLength:1e3,distance:1e3};let r={tokenize:!0,matchAllTokens:!0},s={include:"score",threshold:_.get(this,"component.searchThreshold",.3)},h={removeItemButton:this.component.disabled?!1:_.get(this.component,"removeItemButton",!0),itemSelectText:"",classNames:{containerOuter:"choices form-group formio-choices",containerInner:this.transform("class","form-control ui fluid selection dropdown")},addItemText:!1,allowHTML:!0,placeholder:!!this.component.placeholder,placeholderValue:t,noResultsText:this.t("No results found"),noChoicesText:this.t("No choices to choose from"),searchPlaceholderValue:this.t("Type to search"),shouldSort:!1,position:this.component.dropdown?this.component.dropdown:window.platform&&window.platform.iosPlatform?"bottom":"auto",searchEnabled:e,searchChoices:!this.component.searchField,searchFields:_.get(this,"component.searchFields",["label"]),searchResultLimit:_.get(this,"component.searchResultLimit",this.component.limit||100),fuseOptions:this.component.useExactSearch?Object.assign(r,o):Object.assign({},_.get(this,"component.fuseOptions",{}),Object.assign(s,o)),valueComparer:(a,l)=>{if(_.isEqual(a,l))return!0;if(a==null||l==null)return!1;if((typeof a=="string"||typeof a=="number")&&typeof l=="object"){const i=l.data||l;return i.id===a||i._id===a||i.value===a||this.component.valueProperty&&_.get(i,this.component.valueProperty)===a?!0:Object.values(i).some(c=>c===a||String(c)===String(a))}if((typeof l=="string"||typeof l=="number")&&typeof a=="object"){const i=a.data||a;return i.id===l||i._id===l||i.value===l||this.component.valueProperty&&_.get(i,this.component.valueProperty)===l?!0:Object.values(i).some(c=>c===l||String(c)===String(l))}if(typeof a=="object"&&typeof l=="object"){const i=a.data||a,c=l.data||l;if(_.isEqual(i,c))return!0;if(this.component.idPath){const d=_.get(a,this.component.idPath)||_.get(i,this.component.idPath),g=_.get(l,this.component.idPath)||_.get(c,this.component.idPath);if(d&&g&&d===g)return!0}if(i.id&&c.id&&String(i.id)===String(c.id)||i._id&&c._id&&String(i._id)===String(c._id))return!0}return!1},resetScrollPosition:!1};return Object.assign(h,n)}attach(e){this.component.dropdownOpened=!1;const t=super.attach(e);this.loadRefs(e,{selectContainer:"single",addResource:"single",autocompleteInput:"single"});const n=this.refs.autocompleteInput;n&&this.addEventListener(n,"change",a=>{this.setValue(a.target.value)});const o=this.refs.selectContainer;if(!o)return;if(this.addEventListener(o,this.inputInfo.changeEvent,()=>{if(this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic change event on '${this.key}'`);return}this.updateValue(null,{modified:!0})}),this.attachRefreshOnBlur(),this.component.widget==="html5"){this.addFocusBlurEvents(o),this.triggerUpdate(null,!0),this.visible&&this.setItems(this.selectOptions||[]),this.focusableElement=o,this.addEventListener(o,"focus",()=>this.update()),this.addEventListener(o,"keydown",a=>{const{key:l}=a;["Backspace","Delete"].includes(l)&&this.setValue(this.emptyValue)});return}const r=o.tabIndex;this.addPlaceholder(),o.setAttribute("dir",this.i18next.dir()),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy();const s=this.choicesOptions();if(Choices&&(this.choices=new Choices(o,s),["setChoices","setValue","removeActiveItems","clearStore","removeItemsByValue","setChoiceByValue"].forEach(l=>{if(typeof this.choices[l]=="function"){const i=this.choices[l];this.choices[l]=(...c)=>{this.isUpdatingChoices=(this.isUpdatingChoices||0)+1;try{return i.apply(this.choices,c)}finally{this.isUpdatingChoices--}}}}),this.selectOptions&&this.selectOptions.length&&this.choices.setChoices(this.selectOptions,"value","label",!0),this.component.multiple?this.focusableElement=this.choices.input.element:(s.searchEnabled&&window.platform&&window.platform.iosPlatform?this.focusableElement=this.choices.input.element:this.focusableElement=this.choices.containerInner.element,this.choices.containerOuter.element.setAttribute("tabIndex","-1"),s.searchEnabled&&this.addEventListener(this.choices.containerOuter.element,"mousedown",()=>this.positionDropdown())),this.addFocusBlurEvents(this.focusableElement),this.itemsFromUrl&&!this.component.noRefreshOnScroll&&(this.scrollList=this.choices.choiceList.element,this.addEventListener(this.scrollList,"scroll",l=>{this.onScroll(l)})),s.removeItemButton&&this.addEventListener(o,"removeItem",()=>{if(this.isRemoveButtonPressed=!0,this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (standard list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),window&&this.choices&&this.shouldPositionDropdown){const a=document.getElementById("formio-wrapper");a&&this.addEventListener(a,"scroll",()=>{this.positionDropdown(!0)},!1,!0),this.addEventListener(window.document,"scroll",()=>{this.positionDropdown(!0)},!1,!0)}if(this.focusableElement.setAttribute("tabIndex",r),this.component.searchField){if(this.choices&&this.choices.input&&this.choices.input.element){var h=(c,d)=>{let g;return function(){const u=this,p=arguments;clearTimeout(g),g=setTimeout(()=>c.apply(u,p),d)}};let i=this;this.addEventListener(this.choices.input.element,"input",h(function(c){if(logger.info(`[TF_SDK:INPUT] \u2328\uFE0F Choices input event triggered for '${i.key}'. Search input:`,c.target.value),i.isFromSearch=!!c.target.value,i.component.dataSrc==="masterdata"&&i.component.masterdata)if(c.target.value.length==0)logger.info(`[TF_SDK:INPUT] Search cleared for '${i.key}'`),i.triggerUpdate(),i.searchDownloadedResources=[],i.component.totalSearchResults=[],i.isFromSearch=!1,i.setItems(i.defaultDownloadedResources);else{let m=[];var d=i.component.template||"",g=d.lastIndexOf("."),u="label";if(g!==-1){var p=d.substring(g+1,d.length),y=p.indexOf("}");y!==-1&&(u=p.substring(0,y).trim())}if(logger.info(`[TF_SDK:INPUT] Parsed label key: '${u}', labelProperty: '${i.component.labelProperty}', limit: ${i.component.limit}, uniqueOptions: ${i.component.uniqueOptions}`),m=i.component.masterdata.filter(S=>{if(!S)return!1;let O;const f=[];i.component.labelProperty&&f.push(i.component.labelProperty),u&&!f.includes(u)&&f.push(u);const R=["Name","label","value","text","title"];for(const w of R)f.includes(w)||f.push(w);for(const w of f)if(S[w]!==void 0&&S[w]!==null){O=S[w];break}return O==null?Object.values(S).some(w=>w&&String(w).toLowerCase().includes(c.target.value.toLowerCase())):String(O).toLowerCase().includes(c.target.value.toLowerCase())}),logger.info(`[TF_SDK:INPUT] Found ${m.length} items matching '${c.target.value}' out of ${i.component.masterdata.length}`),m.length>i.component.limit){logger.info(`[TF_SDK:INPUT] Found items count ${m.length} exceeds limit ${i.component.limit}. Slicing.`),i.component.totalSearchResults=[],i.component.totalSearchResults=m;let S=i.component.totalSearchResults.slice(0,i.component.limit);i.setItems(S)}else logger.info(`[TF_SDK:INPUT] Setting items directly. Count: ${m.length}`),i.setItems(m)}else c.target.value?(i.serverCount=null,i.downloadedResources=[]):i.triggerUpdate()},1e3))}this.addEventListener(o,"choice",()=>{this.component.multiple&&this.component.dataSrc==="resource"&&this.isFromSearch&&this.triggerUpdate(),this.isFromSearch=!1});const a=this.component.searchField&&(this.isSelectResource||this.isSelectURL)?(this.component.searchDebounce===0?0:this.component.searchDebounce||this.defaultSchema.searchDebounce)*1e3:0,l=i=>{this.triggerUpdate(i.detail.value)};this.addEventListener(o,"search",_.debounce(i=>{l(i),this.positionDropdown()},a)),this.addEventListener(o,"stopSearch",()=>this.triggerUpdate()),this.addEventListener(o,"hideDropdown",()=>{if(this.component.dropdownOpened=!1,this.component.totalSearchResults=[],this.component.searchDownloadedResources=[],this.isFromSearch=!1,this.component.dataSrc==="masterdata"&&this.component.masterdata){let i,c={};c.limit=this.component.limit;const d=this.filteredMasterdata;this.data[this.key]&&String(this.data[this.key]).length>0&&(i=d.filter(u=>{const p=u[this.component.valueProperty],y=typeof p!="string"?String(p):p;return y==null?void 0:y.includes(this.data[this.key])})),this.defaultDownloadedResources.findIndex(u=>u[this.component.valueProperty]===String(this.data[this.key]))>-1||i&&i.length>0&&this.defaultDownloadedResources.push(i[0]),c=this.defaultDownloadedResources,c.serverCount=d.length,c.skip=this.defaultDownloadedResources.length+this.component.limit,this.setItems(this.defaultDownloadedResources)}}),this.addEventListener(o,"hideDropdown",()=>{const i=document.getElementById("form-container"),c=i?i.scrollTop:0;this.choices&&this.choices.input&&this.choices.input.element&&(this.choices.input.element.value=""),this.component.dataSrc==="masterdata"&&this.updateItems(null,!0),i&&c>0&&requestAnimationFrame(()=>{i.scrollTop===0&&!window._unv_selecting&&(i.scrollTop=c)})})}return this.addEventListener(o,"mousedown",()=>{window._unv_selecting=!0,window.platform&&window.platform.iosPlatform&&document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.classList.contains("choices__input"))&&document.activeElement.blur(),setTimeout(()=>{window._unv_selecting=!1},500),this.positionDropdown()}),this.addEventListener(o,"showDropdown",()=>{this.activated||this.update(),this.positionDropdown(),this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!0,(!this.defaultDownloadedResources||this.defaultDownloadedResources.length<this.filteredMasterdata.length)&&this.updateItems(null,!0))}),this.shouldPositionDropdown&&this.addEventListener(o,"highlightChoice",()=>{this.positionDropdown()}),this.addEventListener(o,"hideDropdown",()=>{this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!1)}),this.addEventListener(o,"search",a=>{if(logger.info(`[TF_SDK:SEARCH] \u{1F50D} Choices search event triggered for '${this.key}'. Search input:`,a.detail.value),this.component.dataSrc==="masterdata"&&this.component.masterdata){var l=this.component.template||"",i=l.lastIndexOf("."),c="label";if(i!==-1){var d=l.substring(i+1,l.length),g=d.indexOf("}");g!==-1&&(c=d.substring(0,g).trim())}const u=this.component.searchField?this.component.searchField.replace(/__regex$/,""):"";logger.info(`[TF_SDK:SEARCH] Configured searchField: '${this.component.searchField}', clean: '${u}', parsedLabel: '${c}', limit: ${this.component.limit}, uniqueOptions: ${this.component.uniqueOptions}`),this.searchDownloadedResources=this.filteredMasterdata.filter(p=>{if(!p)return!1;let y;const m=[];this.component.searchField&&m.push(this.component.searchField),u&&!m.includes(u)&&m.push(u),this.component.labelProperty&&!m.includes(this.component.labelProperty)&&m.push(this.component.labelProperty),c&&!m.includes(c)&&m.push(c);const S=["Name","label","value","text","title"];for(const f of S)m.includes(f)||m.push(f);for(const f of m)if(p[f]!==void 0&&p[f]!==null){y=p[f];break}let O=!1;return y==null?O=Object.values(p).some(f=>f&&String(f).toLowerCase().includes(a.detail.value.toLowerCase())):O=String(y).toLowerCase().includes(a.detail.value.toLowerCase()),O}),logger.info(`[TF_SDK:SEARCH] Found ${this.searchDownloadedResources.length} matching resources out of ${this.filteredMasterdata.length}`),this.isFromSearch=!0}}),this.choices&&s.placeholderValue&&this.choices._isSelectOneElement&&(this.addPlaceholderItem(s.placeholderValue),this.addEventListener(o,"removeItem",()=>{if(this.addPlaceholderItem(s.placeholderValue),this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (placeholder list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),this.addValueOptions(),this.setChoicesValue(this.dataValue),this.isSelectResource&&this.refs.addResource&&this.addEventListener(this.refs.addResource,"click",a=>{a.preventDefault();const l=this.ce("div"),i=this.createModal(l),d=`${_.get(this.root,"formio.projectUrl",Formio.getProjectUrl())}/form/${this.component.data.resource}`;new Form(l,d,{}).ready.then(g=>{g.on("submit",u=>{let p=this.valueProperty?_.get(u,this.valueProperty):u;this.component.multiple&&(p=[...this.dataValue,p]),this.setValue(p),this.triggerUpdate(),i.close()})})}),this.disabled=this.shouldDisabled,this.updateItems(),this.triggerUpdate(),this.component.lazyLoad||(this.activated=!0),t}setDropdownPosition(){let e,t;if(this.choices&&this.choices.dropdown&&this.choices.dropdown.element&&(e=this.choices.dropdown.element),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&(t=this.choices.containerOuter.element),!e||!t){console.warn("[TF_SELECT_LOG:ERR] \u26A0\uFE0F dropdown or container element not found in setDropdownPosition");return}const n=t.getBoundingClientRect(),o=window.visualViewport?window.visualViewport.height:window.innerHeight,r=o-(n.top+n.height),s=n.top;let h=t.classList.contains("is-flipped");!h&&r<180&&s>r?(h=!0,t.classList.add("is-flipped"),e.classList.add("is-flipped")):h&&r>=200&&(h=!1,t.classList.remove("is-flipped"),e.classList.remove("is-flipped"));const a=e.offsetHeight||220;let l,i;h?(i=Math.min(a,Math.max(120,s-20)),l=Math.max(10,n.top-i)):(l=n.top+n.height,i=Math.max(120,Math.min(a,o-l-15)));const c={left:`${n.left}px`,width:`${n.width}px`,position:"fixed",bottom:"unset",right:"unset",top:`${l}px`,maxHeight:`${i}px`};_.assign(e.style,c)}hasDataGridAncestor(e){return e=e||this,e.inDataGrid||e.type==="datagrid"?!0:e.parent?this.hasDataGridAncestor(e.parent):!1}positionDropdown(e){!this.shouldPositionDropdown||!this.choices||this.choices.dropdown&&!this.choices.dropdown.isActive&&e||(this.setDropdownPosition(),this.itemsLoaded.then(()=>{this.setDropdownPosition()}))}get isLoadingAvailable(){return!this.isScrollLoading&&this.additionalResourcesAvailable}onScroll(e){if(!this.isFromSearch)if(this.component.dataSrc==="masterdata"&&this.component.masterdata&&this.defaultDownloadedResources.length<this.filteredMasterdata.length){var t=e.target;E?t.scrollHeight-t.scrollTop===t.clientHeight&&(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata()):(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata())}else this.isLoadingAvailable&&(this.isScrollLoading=!0,this.setLoadingItem(!0),this.triggerUpdate(this.choices.input.element.value))}setMasterdata(){if(this.component.dataSrc==="masterdata"&&this.component.masterdata){let e={},t;e.limit=this.component.limit;let n;const o=this.filteredMasterdata;if(this.data[this.key]&&String(this.data[this.key]).trim().length>0&&(n=o.filter(r=>{const s=_.get(r,this.component.valueProperty),h=typeof s!="string"?String(s):s;return h==null?void 0:h.includes(this.data[this.key])})),this.isFromSearch&&this.searchDownloadedResources&&this.searchDownloadedResources.length>0){const r=this.component.totalSearchResults||this.searchDownloadedResources||[];t=r.slice(this.searchDownloadedResources.length,this.searchDownloadedResources.length+this.component.limit),e=t,e.serverCount=r.length,e.skip=this.searchDownloadedResources.length+this.component.limit}else{t=o.slice(this.defaultDownloadedResources.length,this.defaultDownloadedResources.length+this.component.limit);let r=this.defaultDownloadedResources.filter(a=>t.includes(a));if(r&&r.length>0){let a=t.findIndex(l=>_.get(l,this.component.valueProperty)===_.get(r[0],this.component.valueProperty));a>-1&&t.splice(a,1)}let s=t.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]));s>-1&&t.splice(s,1),this.defaultDownloadedResources.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]))>-1||n&&n.length>0&&t.push(n[0]),e=t,e.serverCount=o.length,e.skip=this.defaultDownloadedResources.length+this.component.limit}this.setItems(e)}}attachRefreshOnBlur(){this.component.refreshOnBlur&&this.on("blur",e=>{this.checkRefreshOn([{instance:e,value:e.dataValue}],{fromBlur:!0})})}addPlaceholderItem(e){this.choices._store.activeItems.length||this.choices._addItem({value:e,label:e,choiceId:0,groupId:-1,customProperties:null,placeholder:!0,keyCode:null})}update(){this.component.dataSrc==="custom"&&this.updateCustomItems(),this.activate()}set disabled(e){super.disabled=e,this.choices&&(e?(this.setDisabled(this.choices.containerInner.element,!0),this.focusableElement.removeAttribute("tabIndex"),this.choices.disable()):(this.setDisabled(this.choices.containerInner.element,!1),this.focusableElement.setAttribute("tabIndex",this.component.tabindex||0),this.choices.enable()))}get disabled(){return super.disabled}set visible(e){e&&!this._visible!=!e&&this.triggerUpdate(),super.visible=e}get visible(){return super.visible}addCurrentChoices(e,t,n){if(!e)return!1;const o=[],r=e.reduce((s,h)=>{if(!h||_.isEmpty(h))return s;let a=!1;const l=t===this.selectOptions;return t&&t.length&&_.each(t,i=>{if(i._id&&h._id&&i._id===h._id)return a=!0,!1;const c=n?i.value:this.itemValue(i,l);return a|=_.isEqual(c,h),!a}),a?a||s:(o.push(this.selectValueAndLabel(h)),!0)},!1);return this.component.dataSrc==="masterdata"&&this.component.masterdata?this.isFromSearch||o.length&&(this.choices&&this.choices.setChoices(o,"value","label"),o.map(s=>{this.addOption(s.value,s.label)})):o.length&&(this.choices&&this.choices.setChoices(o,"value","label"),o.map(s=>{this.addOption(s.value,s.label)})),r}getValueAsString(e,t){return this.component.multiple&&Array.isArray(e)?e.map(n=>this.asString(n,t)).join(", "):this.asString(e,t)}getValue(){if(this.viewOnly||this.loading||!this.component.lazyLoad&&!this.selectOptions.length||!this.element)return this.dataValue;let e=this.emptyValue;if(this.choices)e=this.choices.getValue(!0),!this.component.multiple&&this.component.placeholder&&e===this.t(this.component.placeholder,{_userInput:!0})&&(e=this.emptyValue);else if(this.refs.selectContainer){if(e=this.refs.selectContainer.value,this.valueProperty===""||this.isEntireObjectDisplay()){if(e==="")return{};const t=this.selectOptions[e]||this.selectOptions.find(n=>n.id===e);t&&_.isObject(t.value)&&(e=t.value)}}else e=this.dataValue;return e==null&&(e=""),e}redraw(){const e=super.redraw();return this.triggerUpdate(),e}normalizeSingleValue(e,t){if(_.isNil(e))return;const n=_.isObject(e);if(n&&Object.keys(e).length===0)return e;if(t){const s=this.component.reference&&e&&e._id?e._id.toString():e,h=!n||this.component.reference;if(s&&h&&this.templateData&&this.templateData[s]&&this.root&&this.root.submission){const a=this.root.submission;a.metadata||(a.metadata={}),a.metadata.selectData||(a.metadata.selectData={});let l=this.templateData[s];if(this.component.multiple){l={};const i=this.dataValue;i&&_.isArray(i)&&i.length&&i.forEach(c=>{const d=this.component.reference?c._id.toString():c;l[d]=this.templateData[d]}),l[e]=this.templateData[e]}_.set(a.metadata.selectData,this.path,l)}}const o=this.component.dataType||"auto",r={value:e,number(){const s=Number(this.value),h=e.toString()===s.toString();return!Number.isNaN(s)&&Number.isFinite(s)&&e!==""&&h&&(this.value=s),this},boolean(){return _.isString(this.value)&&(this.value.toLowerCase()==="true"||this.value.toLowerCase()==="false")&&(this.value=this.value.toLowerCase()==="true"),this},string(){return this.value=String(this.value),this},object(){return this},auto(){return _.isObject(this.value)?this.value=this.object().value:this.value=this.string().number().boolean().value,this}};try{return r[o]().value}catch(s){return logger.warn("[TF_SDK:189] \u26A0\uFE0F Failed to normalize value",s),e}}normalizeValue(e){return this.component.multiple&&Array.isArray(e)?e.map(t=>this.normalizeSingleValue(t,!0)):super.normalizeValue(this.normalizeSingleValue(e,!0))}updateValue(e,t){return this.isUpdatingChoices>0?(logger.debug(`[TF_SDK] \u2139\uFE0F Blocked updateValue call on '${this.key}' due to programmatic choices update.`),!1):super.updateValue(e,t)}setValue(e,t={}){if(e&&String(e).length>0&&$(".barcode-select-error").remove(),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="values"&&this.component.data.values.filter(i=>{(e&&i.value===e||e&&i.value===String(e))&&(e=i.label)}),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="masterdata"&&!this.component.multiple){var n=this.component.template,o=n.substring(n.lastIndexOf(".")+1,n.length),r=o.substring(0,o.indexOf("}"),o.length);r=r.trim(),this.component.masterdata.filter(i=>{(e&&i[this.component.valueProperty]===e||e&&i[this.component.valueProperty]===String(e))&&(e=i[r])})}const s=this.dataValue,h=this.updateValue(e,t);e=this.dataValue;const a=!this.isEmpty(s),l=!this.isEmpty(e);if(this.component.multiple&&Array.isArray(e)?e=e.map(i=>typeof i=="boolean"||typeof i=="number"?i.toString():i):(typeof e=="boolean"||typeof e=="number")&&(e=e.toString()),this.isHtmlRenderMode()&&t&&t.fromSubmission&&h)return this.itemsLoaded.then(()=>{this.redraw()}),h;if(this.loading)return h;if(this.isInitApiCallNeeded(l)){this.loading=!0,this.lazyLoadInit=!0;const i=this.component.searchField||this.component.valueProperty;return this.triggerUpdate(_.get(e.data||e,i,e),!0),h}return this.itemsLoaded.then(()=>{this.addValueOptions(),this.setChoicesValue(e,a,t)}),h}isInitApiCallNeeded(e){return this.component.lazyLoad&&!this.lazyLoadInit&&!this.active&&!this.selectOptions.length&&e&&this.shouldInitialLoad&&this.visible&&(this.component.searchField||this.component.valueProperty)}setChoicesValue(e,t,n={}){const o=!this.isEmpty(e)||n.fromSubmission;if(t=t===void 0?!0:t,this.choices)if(o)if(this.component.dataSrc==="masterdata"&&this.component.masterdata){if(!this.isFromSearch){this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}}else{this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}else(t||n.resetValue)&&this.choices.removeActiveItems();else if(o){const r=Array.isArray(e)?e:[e];if(!_.isEqual(this.dataValue,this.defaultValue)&&this.selectOptions.length<2||this.selectData&&n.fromSubmission){const{value:s,label:h}=this.selectValueAndLabel(this.dataValue);this.addOption(s,h)}_.each(this.selectOptions,s=>{_.each(r,h=>{if(s.value===""&&(s.value={}),_.isEqual(h,s.value)&&s.element)return s.element.selected=!0,s.element.setAttribute("selected","selected"),!1})})}else _.each(this.selectOptions,r=>{r.element&&(r.element.selected=!1,r.element.removeAttribute("selected"))})}get itemsLoaded(){return this._itemsLoaded||Promise.resolve()}set itemsLoaded(e){this._itemsLoaded=e}validateValueAvailability(e,t){if(!F(e)||!t)return!0;const n=this.getOptionsValues();if(n){if(_.isObject(t)){const o=r=>{const s=this.normalizeSingleValue(r,!0);if(!_.isObject(s))return!1;try{return JSON.stringify(s)===JSON.stringify(t)}catch(h){return logger.error("Error while comparing items",h),!1}};return n.findIndex(r=>o(r))!==-1}return n.findIndex(o=>this.normalizeSingleValue(o)===t)!==-1}return!1}getOptionValue(e){return _.isObject(e)&&this.isEntireObjectDisplay()?this.normalizeSingleValue(e):_.isObject(e)&&(this.valueProperty||this.component.key!=="resource")?e:_.isObject(e)&&!this.valueProperty?this.interpolate(this.component.template,{item:e}).replace(/<\/?[^>]+(>|$)/g,""):_.isNull(e)?this.emptyValue:String(this.normalizeSingleValue(e))}getOptionsValues(){let e=[];switch(this.component.dataSrc){case"values":e=this.component.data.values;break;case"json":e=this.component.data.json;break;case"custom":e=this.getCustomItems();break}if(typeof e=="string")try{e=JSON.parse(e)}catch(t){logger.warn(t.message),e=[]}if(Array.isArray(e))return e.map(t=>this.getOptionValue(this.itemValue(t)))}deleteValue(){this.setValue("",{noUpdateEvent:!0}),this.unset()}validateMultiple(){return!1}isBooleanOrNumber(e){return typeof e=="number"||typeof e=="boolean"}getNormalizedValues(){if(!(!this.component||!this.component.data||!this.component.data.values))return this.component.data.values.map(e=>({label:e.label,value:String(this.normalizeSingleValue(e.value))}))}asString(e,t={}){var r;e=e||this.getValue();const n=(s,h)=>h?(Array.isArray(s)?s.forEach(a=>a[h]=a[h].toString()):s[h]=s[h].toString(),s):(this.isBooleanOrNumber(s)&&(s=s.toString()),Array.isArray(s)&&s.some(a=>this.isBooleanOrNumber(a))&&(s=s.map(a=>{this.isBooleanOrNumber(a)&&(a=a.toString())})),s);if(e=n(e),this.component.dataSrc==="masterdata"&&this.component.masterdata){const s=h=>(typeof h=="string"||typeof h=="number")&&this.findMasterdataItem(h)||h;Array.isArray(e)?e=e.map(s):e!=null&&(e=s(e))}if(["values","custom"].includes(this.component.dataSrc)&&!this.asyncCustomValues()){const{items:s,valueProperty:h}=this.component.dataSrc==="values"?{items:n(this.getNormalizedValues(),"value"),valueProperty:"value"}:{items:n(this.getCustomItems(),this.valueProperty),valueProperty:this.valueProperty},a=()=>{const l=_.find(s,[h,e]),i=this.defaultSchema.data.values||[];return _.isEqual(l,i[0])?"-":l};e=this.component.multiple&&Array.isArray(e)?_.filter(s,l=>e.includes(l.value)):h?(r=a())!=null?r:{value:e,label:e}:e}if(_.isString(e)&&this.component.dataSrc!=="masterdata")return e;const o=s=>{const h=this.itemTemplate(s);return t.csv&&h?unescapeHTML(h):h};if(Array.isArray(e)){const s=[];return e.forEach(h=>s.push(o(h))),this.component.dataSrc==="resource"&&s.length>0?s.join(", "):s.length>0?s.join("<br />"):"-"}return this.isEntireObjectDisplay()&&_.isObject(e)?JSON.stringify(e):_.isNil(e)?"-":this.itemTemplate(e)}detach(){this.off("blur"),this.choices&&(this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy(),this.choices=null),super.detach()}focus(){this.focusableElement&&(super.focus.call(this),this.focusableElement.focus())}setErrorClasses(e,t,n,o,r=this.element){super.setErrorClasses(e,t,n,o,r),this.choices?super.setErrorClasses([this.choices.containerInner.element],t,n,o,r):super.setErrorClasses([this.refs.selectContainer],t,n,o,r)}addFocusBlurEvents(e){this.addEventListener(e,"focus",()=>{this.root.focusedComponent!==this?(this.root.pendingBlur&&this.root.pendingBlur(),this.root.focusedComponent=this,this.emit("focus",this)):this.root.focusedComponent===this&&this.root.pendingBlur&&(this.root.pendingBlur.cancel(),this.root.pendingBlur=null)}),this.addEventListener(e,"blur",()=>{this.root.pendingBlur=FormioUtils.delay(()=>{this.emit("blur",this),this.component.validateOn==="blur"&&this.root.triggerChange({fromBlur:!0},{instance:this,component:this.component,value:this.dataValue,flags:{fromBlur:!0}}),this.root.focusedComponent=null,this.root.pendingBlur=null})})}}b&&b.Components?b.Components.addComponent("select",I):typeof Formio!="undefined"&&Formio.Components&&Formio.Components.addComponent("select",I)})();</script>
38864
- <script>(function(){var n=window._;const E=Promise,u=window.Formio;var S=u.Components;const F=u.Components.components.base,v=u.Components.components.componentmodal,w=window.EventEmitter3?window.EventEmitter3.EventEmitter||window.EventEmitter3:window.EventEmitter,V=u.Form,g=u.Utils.isMongoId,C=u.Utils.eachComponent,R=u.Utils.getStringFromComponentPath,D=u.Utils.getArrayFromComponentPath,O=()=>({components:[]});class p extends F{static schema(...t){return F.schema({label:"Form",type:"form",key:"form",src:"",reference:!0,form:"",path:"",tableView:!0},...t)}static get builderInfo(){return{title:"Smart Nested Form",group:"premium",icon:"wpforms",documentation:"/userguide/#smartnestedform",weight:110,schema:p.schema()}}static savedValueTypes(){return[u.Utils.componentValueTypes.object]}init(){if(super.init(),window.formdesign=window.formdesign||[],this.component.form){this.component.formdesign&&window.formdesign&&!window.formdesign.some(o=>o.key===this.component.key)&&window.formdesign.push({key:this.component.key,formdesign:this.component.formdesign,data:!0});let t=[];t=window.formdesign.filter(o=>o.key===this.component.key);let e=this;const s=e.component.form;let i=e.component.selNestedFormVersion;if(t.length>0&&!t[0].data||t.length==0)u.makeStaticRequest(`${localStorage.getItem("UMP_url")}/UMP/API/v3/applications/DIGITAL_FORMS/execute/DIGITAL_FORMS_PA_GET_FORM_DATA?queuedExecute=false&messageFormat=custom&inputMessage=%7B%22formId%22%3A%22${s}%22%2C%22type%22%3A%22form%22%2C%22version%22%3A%22${i}%22%7D&sensitive=undefined&externalReference=undefined`,"POST",null,{headers:{Authorization:"Bearer "+localStorage.getItem("token"),Accept:"application/json","Content-type":"application/json"}}).then(function(o){if(o){typeof o!="object"&&(o=JSON.parse(o));let r=e.getMasterdDataresource(o.formData,"dataSrc","masterdata");const h={key:e.component.key,formdesign:r,category:o.category,data:!0};window.formdesign.push(h),e.createSubForm().then(()=>{e.element&&e.attach(e.element)})}}).catch(o=>{logger.error("[TF_SDK:55] \u274C Error getting form data",o)});else if(window.formdesign&&this.component.form){for(let o=0;o<window.formdesign.length;o++)if(window.formdesign[o].key==this.component.key){let r=this.getMasterdDataresource(window.formdesign[o].formdesign,"dataSrc","masterdata");window.formdesign[o].formdesign=r}}}if(this.formObj={display:this.component.display,settings:this.component.settings,components:this.component.components},this.valueChanged=!1,this.subForm=null,this.formSrc="",this.component.src&&(this.formSrc=this.component.src),!this.component.src&&!this.options.formio&&(this.component.form||this.component.path)&&(this.component.project?(this.formSrc=u.getBaseUrl(),g(this.component.project)&&(this.formSrc+="/project"),this.formSrc+=`/${this.component.project}`,this.options.project=this.formSrc):(this.formSrc=u.getProjectUrl(),this.options.project=this.formSrc),this.component.form?g(this.component.form)?this.formSrc+=`/form/${this.component.form}`:this.formSrc+=`/${this.component.form}`:this.component.path&&(this.formSrc+=`/${this.component.path}`)),!this.formSrc&&this.options.formio){const t=this.options.formio.formsUrl;if(this.component.form&&g(this.component.form))this.formSrc=`${t}/${this.component.form}`;else{const e=this.component.path||this.component.form;this.formSrc=`${t.replace(/\/form$/,"")}/${e}`}}return this.builderMode&&this.component.hasOwnProperty("formRevision")&&(this.component.revision=this.component.formRevision,delete this.component.formRevision),(this.component.revision||this.component.revision===0||this.component.formRevision||this.component.formRevision===0||this.component.revisionId)&&this.setFormRevision(this.component.revisionId||this.component.revision||this.component.formRevision),this.createSubForm()}get dataReady(){var t;return((t=this.subForm)==null?void 0:t.dataReady)||this.subFormReady||Promise.resolve()}get defaultValue(){return this.subForm?super.defaultValue:null}get defaultSchema(){return p.schema()}get emptyValue(){return{data:{}}}get hasDefaultValue(){return!0}get ready(){return this.subFormReady||Promise.resolve()}get useOriginalRevision(){var t,e;return((t=this.component)==null?void 0:t.useOriginalRevision)&&!!((e=this.formObj)!=null&&e.revisions)}setFormRevision(t){this.formSrc=this.formSrc.replace(/\/v\/[0-9a-z]+/,"");const e=Number.parseInt(t);isNaN(e)?this.subFormRevision=void 0:(this.subFormRevision=t,this.formSrc+=`/v/${t}`)}getComponent(t){return this.subForm?this.subForm.getComponent(t):null}getSubOptions(t={}){return t.events=this.createEmitter(),n.set(t,"buttonSettings.showSubmit",!1),t.parent=this,this.options&&(this.options.base&&(t.base=this.options.base),this.options.project&&(t.project=this.options.project),(this.options.readOnly||this.component.disabled)&&(t.readOnly=this.options.readOnly||this.component.disabled),this.options.breadcrumbSettings&&(t.breadcrumbSettings=this.options.breadcrumbSettings),this.options.buttonSettings&&(t.buttonSettings=n.clone(this.options.buttonSettings)),this.options.viewAsHtml&&(t.viewAsHtml=this.options.viewAsHtml),this.options.language&&(t.language=this.options.language),this.options.template&&(t.template=this.options.template),this.options.templates&&(t.templates=this.options.templates),this.options.renderMode&&(t.renderMode=this.options.renderMode),this.options.attachMode&&(t.attachMode=this.options.attachMode),this.options.iconset&&(t.iconset=this.options.iconset),this.options.fileService&&(t.fileService=this.options.fileService),this.options.onChange&&(t.onChange=this.options.onChange),this.options.preview&&(t.preview=this.options.preview),this.options.inEditGrid&&(t.inEditGrid=this.options.inEditGrid),this.options.saveDraft&&(t.saveDraft=this.options.saveDraft,t.formio=new u(this.formSrc)),this.options.saveDraftThrottle&&(t.saveDraftThrottle=this.options.saveDraftThrottle),this.options.skipDraftRestore&&(t.skipDraftRestore=this.options.skipDraftRestore),t.parent=this),t}render(){if(this.builderMode)return super.render(this.component.label||"Nested form");const t=this.subForm?this.subForm.render():this.renderTemplate("loading");return super.render(t)}getMasterdDataresource(t,e,s){let i=[];for(let o in t)if(typeof t[o]=="object")i=i.concat(this.getMasterdDataresource(t[o],e,s));else if(o===e&&t[e]===s){let r;t.data&&typeof t.data=="object"&&t.data!==void 0&&t.data.masterdata&&(r=t.data.masterdata);let h=[];const c=localStorage.getItem("resourceData");let a=[];try{a=c?JSON.parse(c):[]}catch(d){a=[]}if(Array.isArray(a)&&r!==void 0&&r!==""){for(let d=0;d<a.length;d++)if((a[d]?a[d].resourceName:null)===r&&a[d].data)try{h.push(JSON.parse(a[d].data).data)}catch(M){}}else h=[];const l=t.template;let m="";if(l!==""){const d=l.substring(l.lastIndexOf(".")+1,l.length);m=d.substring(0,d.indexOf("}"),d.length);const b="<span>{{item."+m.trim()+"}}</span>";t.template=b}const f=t.valueProperty;let y="";f!==""&&(y=f.substring(f.lastIndexOf(".")+1,f.length),t.valueProperty=y),m=m.trim(),h=h.sort(function(d,b){return d[m]>b[m]?1:d[m]<b[m]?-1:0}),t.masterdata=h}return t}asString(t){return this.getValueAsString(t)}getValueAsString(t,e){if(!t)return"No data provided";if(!t.data&&t._id)return t._id;if(this.component.modalEdit)return this.component.label;if(e!=null&&e.email){let s=`
38865
- <table border="1" style="width:100%">
38866
- <tbody>
38867
- `;return this.everyComponent(i=>{i.isInputComponent&&i.visible&&!i.skipInEmail&&(s+=`
38868
- <tr>
38869
- <th style="padding: 5px 10px;">${i.label}</th>
38870
- <td style="width:100%;padding:5px 10px;">${i.getView(i.dataValue,e)}</td>
38871
- </tr>
38872
- `)},{...e,fromRoot:!0}),s+=`
38873
- </tbody>
38874
- </table>
38875
- `,s}return n.isEmpty(t)?"":"[Complex Data]"}attach(t){return this.builderMode?super.attach(t):super.attach(t).then(()=>(this.isSubFormLazyLoad()&&!this.hasLoadedForm&&!this.subFormLoading&&this.createSubForm(!0),this.subFormReady?this.subFormReady.then(()=>{var s;if(this.empty(t),this.options.builder){this.setContent(t,this.ce("div",{class:"text-muted text-center p-2"},this.text(this.formObj.title)));return}this.setContent(t,this.render());const e=()=>{if(!this.builderMode&&this.component.modalEdit){const i=this.componentModal?this.componentModal.isOpened:!1,o=i?this.componentModal.currentValue:this.dataValue;this.componentModal=new v(this,t,i,o,this._referenceAttributeName),this.subForm.element=this.componentModal.refs.componentContent||this.subForm.element,this.setOpenModalElement()}this.calculateValue()};if(this.subForm)return this.isNestedWizard&&(t=(s=this.root)==null?void 0:s.element),this.subForm.attach(t).then(()=>{this.valueChanged=this.hasSetValue,this.shouldConditionallyClear()||(!this.valueChanged&&this.dataValue.state!=="submitted"?this.setDefaultValue():this.restoreValue()),e(),this.setComponentsMap()});e()}):Promise.resolve()))}detach(){this.subForm&&this.subForm.detach(),super.detach()}get currentForm(){return this._currentForm}get hasLoadedForm(){return this.formObj&&this.formObj.components&&Array.isArray(this.formObj.components)&&this.formObj.components.length}set currentForm(t){this._currentForm=t,this.subForm&&this.subForm.getComponents().forEach(e=>{e.currentForm=this})}get isRevisionChanged(){return n.isNumber(this.subFormRevision)&&n.isNumber(this.formObj._vid)&&this.formObj._vid!==this.subFormRevision}get subFormData(){var t;return((t=this.dataValue)==null?void 0:t.data)||{}}destroy(t=!1){this.subForm&&(this.subForm.destroy(t),this.subForm=null,this.subFormReady=null),super.destroy(t)}redraw(){return this.subForm&&(this.subForm.form=this.formObj,this.setSubFormDisabled(this.subForm)),super.redraw()}everyComponent(...t){this.subForm&&this.subForm.everyComponent(...t)}setSubFormDisabled(t){t.disabled=this.disabled}updateSubWizards(t){var e,s;if(this.isNestedWizard&&((e=this.root)!=null&&e.subWizards)&&((s=t==null?void 0:t._form)==null?void 0:s.display)==="wizard"){const i=this.root.subWizards.findIndex(o=>o.component.form===this.component.form);i!==-1?this.root.subWizards[i]=this:this.root.subWizards.push(this),this.emit("subWizardsUpdated",t)}}setComponentsMap(){if(!this.subForm)return;const t=this.componentsMap,e=this.subForm.componentsMap;n.assign(t,e)}createSubForm(t,e){return this.subFormReady=this.loadSubForm(t,e).then(s=>{if(window.formdesign&&this.component.form)for(let i=0;i<window.formdesign.length;i++)window.formdesign[i].key==this.component.key&&(s=window.formdesign[i].formdesign);if(!(!s||Object.keys(s).length===0&&s.constructor===Object))return s.components.length>0&&C(s.components,i=>{this.hideSubmitButton(i)}),this.subForm&&this.subForm.destroy(),new V(s,this.getSubOptions()).ready.then(i=>{var r,h;this.subForm=i,this.formObj=i._form,this.subForm.currentForm=this,this.subForm.parentVisible=this.visible,this.setComponentsMap(),this.component.components=(r=this.subForm._form)==null?void 0:r.components,this.component.display=(h=this.subForm._form)==null?void 0:h.display,this.subForm.on("change",()=>{var c;if(this.subForm&&!this.shouldConditionallyClear()){const a=this.subForm.getValue();this.isEqualValues(this.dataValue,a)||(this.dataValue=a,(c=this.triggerChange)==null||c.call(this,{noEmit:!0}))}}),this.subForm.url=this.formSrc,this.subForm.nosubmit=!0,this.subForm.root=this.root,this.subForm.localRoot=this.isNestedWizard?this.localRoot:this.subForm;const o=this.dataValue;return this.restoreValue(),this.valueChanged=this.hasSetValue,this.isEqualValues(o,this.getValue())||this.onChange(),this.subForm}).catch(i=>{logger.debug(i)})}).then(s=>(this.updateSubWizards(s),s)),this.subFormReady}hideSubmitButton(t){t.type==="button"&&(t.action==="submit"||!t.action)&&(t.hidden=!0,t.customConditional="show = false")}loadSubForm(t,e){var i,o,r,h,c;const s=e&&!this.component.clearOnHide;if(this.component.form&&window.formdesign&&this.component.form)for(let a=0;a<window.formdesign.length;a++)window.formdesign[a].key==this.component.key&&(this.formObj=window.formdesign[a].formdesign);if(this.builderMode||this.conditionallyHidden()&&!s||this.isSubFormLazyLoad()&&!t)return Promise.resolve();if(this.hasLoadedForm&&!this.isRevisionChanged&&!(this.options.pdf&&((i=this.component)!=null&&i.useOriginalRevision)&&n.isNull(this.subForm)&&!this.subFormLoading))return this.root&&this.root.form&&this.root.form.config&&!this.formObj.config&&(this.formObj.config=this.root.form.config),Promise.resolve(this.formObj);if(this.formSrc){this.subFormLoading=!0;const a=(r=(o=this.root)==null?void 0:o.formio)!=null&&r.base&&((c=(h=this.root)==null?void 0:h.formio)!=null&&c.projectUrl)?{base:this.root.formio.base,project:this.root.formio.projectUrl}:{};return new u(this.formSrc,a).loadForm({params:{live:1}}).then(l=>{if(this.formObj=l,this.options.pdf&&this.component.useOriginalRevision&&(this.formObj.display="form"),window.formdesign&&this.component.form)for(let m=0;m<window.formdesign.length;m++)window.formdesign[m].key==this.component.key&&(this.formObj=window.formdesign[m].formdesign);return this.subFormLoading=!1,l}).catch(l=>(logger.debug(l),null))}return Promise.resolve()}checkComponentConditions(t,e,s){const i=super.checkComponentConditions(t,e,s);return i&&(this.subForm?this.subForm.checkConditions(this.subFormData,e):(this.subFormReady&&this.subFormReady.then(()=>{if(this.subForm)return this.subForm.checkConditions(this.subFormData,e)}),i))}calculateValue(t,e,s){return this.subForm?this.subForm.calculateValue(this.subFormData,e):super.calculateValue(t,e,s)}setPristine(t){super.setPristine(t),this.subForm&&this.subForm.setPristine(t)}get shouldSubmit(){return this.subFormReady&&(!this.component.hasOwnProperty("reference")||this.component.reference)&&!this.shouldConditionallyClear()&&!(this.component.hidden&&this.component.clearOnHide)}getSubFormData(){return n.get(this.subForm,"form.display")==="pdf"?this.subForm.getSubmission():Promise.resolve(this.dataValue)}submitSubForm(){return this.shouldSubmit?this.subFormReady.then(()=>this.subForm?(this.subForm.nosubmit=!1,this.subForm.submitted=!0,this.subForm.submitForm({},!0).then(t=>(this.subForm.loading=!1,this.subForm.showAllErrors=!1,this.dataValue=t.submission,this.dataValue)).catch(t=>(this.subForm.showAllErrors=!0,this.subForm.onSubmissionError(t),Promise.reject(t)))):this.dataValue):this.getSubFormData()}beforePage(t){return t?this.submitSubForm(!0).then(()=>super.beforePage(t)):super.beforePage(t)}beforeSubmit(){var o,r,h;const t=this.dataValue;(o=this.subForm)!=null&&o.draftEnabled&&((r=this.subForm.triggerSaveDraft)!=null&&r.cancel)&&this.subForm.triggerSaveDraft.cancel();const e=t&&t._id&&t.form,s=this.options.saveDraft&&t.state==="draft";if(e&&!((h=this.subForm)!=null&&h.wizard)&&!s)return this.dataValue=t,Promise.resolve(this.dataValue);const i=!this.component.clearOnHide;return(this.isSubFormLazyLoad()||i)&&!this.subFormLoading&&!this.subForm?this.createSubForm(!0,!0).then(()=>this.submitSubForm(!1)).then(()=>this.dataValue).then(()=>super.beforeSubmit()):this.submitSubForm(!1).then(()=>this.dataValue).then(()=>super.beforeSubmit())}isSubFormLazyLoad(){var t,e;return((e=(t=this.root)==null?void 0:t._form)==null?void 0:e.display)==="wizard"&&this.component.lazyLoad}isHidden(){return this.visible?!super.checkConditions(this.rootValue):!0}setValue(t,e={}){var i;const s=super.setValue(t,e);if(this.valueChanged=!0,this.subForm){const o=t._frid?"_frid":"_vid";this.useOriginalRevision&&(n.isNumber(t[o])||n.isNumber(t._fvid))&&n.isNumber((i=this.subForm.form)==null?void 0:i[o])&&t._fvid!==this.subForm.form[o]?(this.setFormRevision(t._frid||t._fvid),this.createSubForm().then(()=>{this.attach(this.element)})):this.setSubFormValue(t,e)}return s}setSubFormValue(t,e){var o,r,h,c;const s=t&&t._id&&this.subForm.formio&&n.isEmpty(t.data),i=this.options.saveDraft&&n.isEmpty(t.data)&&n.get(this.subForm,"submission._id");if(s||i){const a=t.form||this.formObj.form||this.component.form,l=`${this.subForm.formio.formsUrl}/${a}/submission/${t._id||this.subForm.submission._id}`,m=(r=(o=this.root)==null?void 0:o.formio)!=null&&r.base&&((c=(h=this.root)==null?void 0:h.formio)!=null&&c.projectUrl)?{base:this.root.formio.base,project:this.root.formio.projectUrl}:{};this.subForm.setUrl(l,{...this.options,...m}),this.subForm.loadSubmission().catch(f=>{logger.error(`[TF_SDK:56] \u274C Unable to load subform submission ${t._id}:`,f)})}else this.onSetSubFormValue(t,e)}onSetSubFormValue(t,e){this.subForm.setValue(t,e),e!=null&&e.fromSubmission&&this.subForm.submissionReadyResolve(t)}isEmpty(t=this.dataValue){return t==null||t===""||n.isObject(t)&&(n.isEmpty(t)||n.isObject(t.data)&&n.isEmpty(t.data))?!0:n.isEqual(t,this.emptyValue)}isEqualValues(t,e){return this.isEmpty(t)&&this.isEmpty(e)?!0:n.isEqual(t,e)}getValue(){return this.subForm?this.subForm.getValue():this.dataValue}get errors(){let t=super.errors;return this.subForm&&(t=t.concat(this.subForm.errors)),t}conditionallyHidden(){const t=super.conditionallyHidden();return this.subForm&&(this.subForm._conditionallyHidden=t),t}updateSubFormVisibility(){this.subForm&&(this.subForm.parentVisible=this.visible)}get isNestedWizard(){var t,e,s,i,o;return((e=(t=this.subForm)==null?void 0:t._form)==null?void 0:e.display)==="wizard"&&((o=(i=(s=this.parent)==null?void 0:s.parent)==null?void 0:i._form)==null?void 0:o.display)==="wizard"}get visible(){return super.visible}set visible(t){var s;const e=this.isNestedWizard;if(this._visible!==t){if(this._visible=t,!this.subForm&&t){this.createSubForm(),this.subFormReady.then(()=>{this.updateSubFormVisibility(),this.clearOnHide()}),this.redraw();return}this.updateSubFormVisibility(),this.clearOnHide(),e?this.rebuild():this.redraw()}!t&&e&&((s=this.root)==null||s.redraw())}get parentVisible(){return super.parentVisible}set parentVisible(t){if(this._parentVisible!==t){if(this._parentVisible=t,this.clearOnHide(),!this.subForm&&t){this.createSubForm(),this.subFormReady.then(()=>{this.updateSubFormVisibility()}),this.redraw();return}this.updateSubFormVisibility(),this.redraw()}}isInternalEvent(t){switch(t){case"focus":case"blur":case"change":case"componentChange":case"componentError":case"error":case"formLoad":case"languageChanged":case"render":case"checkValidity":case"initialized":case"submit":case"submitButton":case"nosubmit":case"updateComponent":case"submitDone":case"submissionDeleted":case"requestDone":case"nextPage":case"prevPage":case"wizardNavigationClicked":case"updateWizardNav":case"restoreDraft":case"saveDraft":case"saveComponent":case"pdfUploaded":return!0;default:return!1}}createEmitter(){const t=new w,e=t.emit,s=this;return t.emit=function(i,...o){const r=i.replace(`${s.options.namespace}.`,"");e.call(this,i,...o),s.isInternalEvent(r)||s.emit(r,...o)},t}deleteValue(){super.setValue(null,{noUpdateEvent:!0,noDefault:!0}),this.unset()}}document.addEventListener("ApproveEvent",function(_){logger.info("[TF_SDK:57] \u2705 event listening")},!1),p.editForm=O,S.addComponent("form",p)})();</script>
38938
+ `),t}}}static savedValueTypes(e){const{boolean:t,string:n,number:o,object:r,array:s}=componentValueTypes,{dataType:h,reference:a}=e,l=getComponentSavedTypes(e);return l||(a?[r]:h==="object"?[r,s]:componentValueTypes[h]?[componentValueTypes[h]]:[t,n,o,r,s])}init(){super.init(),this.templateData={},this.validators=(this.validators||[]).concat(["select","onlyAvailableItems"]);let e=[];const t=_.debounce((...n)=>(e=[],this.updateItems.apply(this,n)),100);this.triggerUpdate=(...n)=>(typeof this.itemsLoadedResolve=="function"&&this.itemsLoadedResolve(),this.itemsLoaded=new Promise(o=>{this.itemsLoadedResolve=o}),n.length&&(e=n),t(...e)),this.selectOptions=[],this.itemsFromUrl&&(this.isFromSearch=!1,this.searchServerCount=null,this.defaultServerCount=null,this.isScrollLoading=!1,this.searchDownloadedResources=[],this.defaultDownloadedResources=[]),this.activated=!1,this.itemsLoaded=new Promise(n=>{this.itemsLoadedResolve=n}),this.shouldPositionDropdown=this.hasDataGridAncestor(),this.isHtmlRenderMode()&&this.activate(),this.getTemplateKeys()}getTemplateKeys(){const e=this.component.template;this.templateKeys=this.options.readOnly&&e?FormioUtils.getItemTemplateKeys(e):[]}get dataReady(){return this.root&&this.root.submissionSet&&!this.attached?Promise.resolve():this.itemsLoaded}get defaultSchema(){return I.schema()}get emptyValue(){if(this.component.multiple)return[];if(this.component.dataSrc==="json"&&this.component.data.json){const e=this.component.data.json[0];let t;return this.valueProperty?t=_.get(e,this.valueProperty):t=e,t&&typeof t=="string"?"":{}}return this.valueProperty?"":{}}get valueProperty(){return this.component.valueProperty?this.component.valueProperty:this.component.dataSrc==="values"?"value":""}get inputInfo(){const e=super.elementInfo();return e.type="select",e.changeEvent="change",e}get isSelectResource(){return this.component.dataSrc==="resource"}get isSelectMaterdata(){return this.component.dataSrc==="masterdata"}get isSelectURL(){return this.component.dataSrc==="url"}get itemsFromUrl(){return this.isSelectResource||this.isSelectURL||this.isSelectMaterdata}get isInfiniteScrollProvided(){return this.itemsFromUrl}get shouldDisabled(){return super.shouldDisabled||this.parentDisabled}get shouldInitialLoad(){return this.component.widget==="html5"&&this.isEntireObjectDisplay()&&this.component.searchField&&this.dataValue?!1:super.shouldLoad}isEntireObjectDisplay(){return(this.component.dataSrc==="resource"||this.component.dataSrc==="masterdata")&&(this.valueProperty==="data"||this.component.valueProperty==="data")}findMasterdataItem(e){if(!this.component.masterdata||e==null)return null;const t=String(e),n=this.component.valueProperty||this.valueProperty;return this.component.masterdata.find(o=>{if(!o||typeof o!="object")return!1;if(n){let s=_.get(o,n);if(s!=null&&String(s)===t||n.startsWith("data.")&&(s=_.get(o,n.replace(/^data\./,"")),s!=null&&String(s)===t)||o[n]!==void 0&&o[n]!==null&&String(o[n])===t)return!0}const r=o.data||o;for(const s of Object.keys(r))if((/id$/i.test(s)||s==="value"||s==="_id"||s==="id")&&r[s]!==void 0&&r[s]!==null&&String(r[s])===t)return!0;return!1})}selectValueAndLabel(e){if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const n=this.findMasterdataItem(e);n&&(e=n)}const t=this.getOptionValue(this.isEntireObjectDisplay()&&!this.itemValue(e)?e:this.itemValue(e));return{value:t,label:this.itemTemplate(this.isEntireObjectDisplay()&&!_.isObject(e.data)?{data:e}:e,t)}}itemTemplate(e,t){if(!_.isNumber(e)&&_.isEmpty(e))return"";if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const r=this.findMasterdataItem(e);r&&(e=r)}if(this.options.readOnly&&this.component.readOnlyValue&&!this.component.template&&!this.component.labelProperty)return this.itemValue(e);if(e&&!this.component.template){const r=e.label||e,s=typeof r=="string"?this.t(r,{_userInput:!0}):r;return this.sanitize(s,this.shouldSanitizeValue)}if(this.component.multiple&&_.isArray(this.dataValue)?this.dataValue.find(r=>t===r):this.dataValue===t){const r=this.selectData;if(r){const s=this.component.reference&&t&&(t._id?t._id.toString():t);(!this.templateData||!this.templateData[s])&&this.getOptionTemplate(e,t),this.component.multiple?r[s]&&(e=r[s]):e=r}}if(typeof e=="string"||typeof e=="number")return this.sanitize(this.t(e,{_userInput:!0}),this.shouldSanitizeValue);if(Array.isArray(e))return e.map(r=>typeof r=="string"||typeof r=="number"?this.sanitize(this.t(r,{_userInput:!0}),this.shouldSanitizeValue):r);if(e.data){const r=/item\.data\.\w*/g.test(this.component.template);e.data=this.isEntireObjectDisplay()&&_.isObject(e.data)&&!r?JSON.stringify(e.data):e.data}let n=e;typeof e=="object"&&e!==null&&!e.data&&(n=Object.assign({data:e},e));const o=this.sanitize(this.component.template?this.interpolate(this.component.template,{item:n}):e.label);if(o){const r=o.replace(/<\/?[^>]+(>|$)/g,"");let s;return this.i18next&&this.i18next.translator&&(s=this.i18next.translator),!r||s&&!this.t(r,{_userInput:!0})?void 0:s?o.replace(r,this.t(r,{_userInput:!0})):r}else return JSON.stringify(e)}addOption(e,t,n={},o=D()){if(_.isNil(t))return;const r=this.component.idPath?this.component.idPath.split(".").reduceRight((a,l)=>({[l]:a}),o):{},s=Object.assign({value:this.getOptionValue(e),label:t},r);if(!(this.component.uniqueOptions&&this.selectOptions.find(a=>_.isEqual(a.value,s.value)))&&(e&&this.selectOptions.push(s),this.refs.selectContainer&&this.component.widget==="html5")){s.value&&_.isObject(s.value)&&_.isEmpty(s.value)&&(s.value="");const a=document.createElement("div");a.innerHTML=this.sanitize(this.renderTemplate("selectOption",{selected:_.isEqual(this.getOptionValue(this.dataValue),s.value),option:s,attrs:n,id:o,useId:(this.valueProperty===""||this.isEntireObjectDisplay())&&_.isObject(e)&&o}),this.shouldSanitizeValue).trim(),s.element=a.firstChild,this.refs.selectContainer.appendChild(s.element)}}addValueOptions(e){e=e||[];let t=!1,n=this.dataValue;if(this.options.pdf&&!e.length&&this.component.dataSrc==="url"&&this.valueProperty&&(n=Array.isArray(n)?n.map(o=>_.set({},this.valueProperty,o)):_.set({},this.valueProperty,n)),!this.selectOptions.length){const o=Array.isArray(n)&&this.component.multiple?n:[n];t=this.addCurrentChoices(o,e),!t&&!this.component.multiple&&this.addPlaceholder()}return t}disableInfiniteScroll(){this.downloadedResources&&(this.downloadedResources.serverCount=this.downloadedResources.length,this.serverCount=this.downloadedResources.length)}setItems(e,t){if(logger.info(`[TF_SDK:171] \u2705 setItems() called for '${this.key}'. Items length:`,e?e.length:0,"fromSearch:",t),this.selectItems=e,typeof e=="string")try{e=JSON.parse(e)}catch(l){logger.warn(l.message),e=[]}if(this.component.onSetItems){const l=typeof this.component.onSetItems=="function"?this.component.onSetItems(this,e):this.evaluate(this.component.onSetItems,{items:e},"items");l&&(e=l)}!this.choices&&this.refs.selectContainer&&this.empty(this.refs.selectContainer),this.component.selectValues&&(e=_.get(e,this.component.selectValues,e)||[]);let n;if(this.itemsFromUrl){n=this.isSelectURL?_.isEqual(e,this.downloadedResources):!1;const l=this.component.limit>e.length,i=n&&this.downloadedResources&&this.downloadedResources.length===e.length;l?this.disableInfiniteScroll():i?this.selectOptions=[]:this.serverCount=e.serverCount}if(this.isScrollLoading&&e)n||(this.downloadedResources=this.downloadedResources?this.downloadedResources.concat(e):e),this.downloadedResources.serverCount=e.serverCount||this.downloadedResources.serverCount;else if(this.downloadedResources=e||[],this.selectOptions=[],!_.isEmpty(this.dataValue)&&this.component.idPath){const l=_.get(this.dataValue,this.component.idPath,null),i=!_.isNil(l)&&e.find(c=>_.get(c,this.component.idPath)===l);i&&this.setValue(i)}if(t||this.addValueOptions(e),this.component.widget==="html5"&&!this.component.placeholder&&this.addOption(null,""),_.each(e,(l,i)=>{if(this.root&&this.root.options.editForm&&this.root.options.editForm._id&&this.root.options.editForm._id===l._id)return;const c=this.selectValueAndLabel(l);this.addOption(c.value,c.label,{},_.get(l,this.component.idPath,String(i)))}),logger.info(`[TF_SDK:172] \u2705 selectOptions generated for '${this.key}', length:`,this.selectOptions.length),this.choices)if(logger.info(`[TF_SDK:173] \u2705 this.choices is true for '${this.key}', dataSrc:`,this.component.dataSrc),this.component.dataSrc==="masterdata"&&this.component.masterdata)if(this.selectOptions.sort(function(l,i){const c=typeof l.label=="string"?l.label:typeof l.value=="string"?l.value:"",d=typeof i.label=="string"?i.label:typeof i.value=="string"?i.value:"";return c.localeCompare?c.localeCompare(d):c>d?1:c<d?-1:0}),this.isScrollLoading){let l=[];for(let i=0;i<e.length;i++)for(let c=0;c<this.selectOptions.length;c++)this.selectOptions[c].value===e[i][this.component.valueProperty]&&l.push(this.selectOptions[c]);logger.info(`[TF_SDK:175] \u2705 setChoices called (scrollLoading) for '${this.key}' with array length:`,l.length),this.choices.setChoices(l,"value","label",!1)}else logger.info(`[TF_SDK:176] \u2705 setChoices called (normal masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else logger.info(`[TF_SDK:177] \u2705 setChoices called (non-masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else this.loading;this.isScrollLoading=!1,this.loading=!1;let o=!1;if(this.choices&&this.choices.input&&this.choices.input.isFocussed&&(o=this.choices.input.isFocussed),!(t&&o))if(this.isEmpty()){if(this.shouldAddDefaultValue&&!this.options.readOnly){const l=this.defaultValue;this.isEmpty(l)||this.setValue(l)}}else if(localStorage.getItem("renderMode")==="html"){var s=this.component.template,h=s.substring(s.lastIndexOf(".")+1,s.length),a=h.substring(0,h.indexOf("}"),h.length);if(a=a.trim(),e.length>0&&this.component.multiple){let l=[];for(let i=0;i<e.length;i++)l.push(e[i][a]);this.setValue(l,{noUpdateEvent:!1})}}else this.setValue(this.dataValue,{noUpdateEvent:!0});this.itemsLoadedResolve()}getSingleItemValueForHTMLMode(e){const t=this.selectOptions&&this.selectOptions.find(({value:n})=>_.isEqual(n,e));return t&&t.label||e}itemValueForHTMLMode(e){return this.isHtmlRenderMode()?Array.isArray(e)?e.map(n=>Array.isArray(n)?this.itemValueForHTMLMode(n):this.getSingleItemValueForHTMLMode(n)).join(", "):this.getSingleItemValueForHTMLMode(e):super.itemValueForHTMLMode(e)}get defaultValue(){let e=super.defaultValue;return!e&&(this.component.defaultValue===!1||this.component.defaultValue===0)&&(e=this.component.defaultValue),e}get loadingError(){return!this.component.refreshOn&&!this.component.refreshOnBlur&&this.networkError}loadItems(e,t,n,o,r,s){if(o=o||{},!this.shouldLoad||!this.itemsFromUrl&&this.options.readOnly){this.isScrollLoading=!1,this.loading=!1,this.itemsLoadedResolve();return}const h=parseInt(this.component.minSearch,10);if(this.component.searchField&&h>0&&(!t||t.length<h))return this.setItems([]);r=r||"GET",r.toUpperCase()==="GET"&&(s=null);const a=this.component.limit||100,l=this.isScrollLoading?this.selectOptions.length:0,i=this.component.disableLimit?{}:{limit:a,skip:l};if(e=this.interpolate(e,{formioBase:Formio.getBaseUrl(),search:t,limit:a,skip:l,page:Math.abs(Math.floor(l/a))}),this.component.searchField&&t){const c=Array.isArray(t)?t.join(","):typeof t=="object"?JSON.stringify(t):t;i[this.component.searchField]=this.component.searchField.endsWith("__regex")?_.escapeRegExp(c):c}this.component.selectFields&&(i.select=this.component.selectFields),this.component.sort&&(i.sort=this.component.sort),_.isEmpty(i)||(e+=(e.includes("?")?"&":"?")+Formio.serialize(i,c=>this.interpolate(c))),this.component.filter&&(e+=(e.includes("?")?"&":"?")+this.interpolate(this.component.filter)),o.ignoreCache=this.component.ignoreCache,o.header=n,this.loading=!0,Formio.makeRequest(this.options.formio,"select",e,r,s,o).then(c=>{this.loading=!1,this.error=null,this.setItems(c,!!t)}).catch(c=>{this.itemsFromUrl&&(this.setItems([]),this.disableInfiniteScroll()),this.isScrollLoading=!1,this.handleLoadingError(c)})}handleLoadingError(e){this.loading=!1,e.networkError&&(this.networkError=!0),this.itemsLoadedResolve(),this.emit("componentError",{component:this.component,message:e.toString()}),logger.warn(`[TF_SDK:178] \u26A0\uFE0F Unable to load resources for ${this.key}`)}get requestHeaders(){const e=new Formio.Headers;if(this.component.data&&this.component.data.headers)try{_.each(this.component.data.headers,t=>{t.key&&e.set(t.key,this.interpolate(t.value))})}catch(t){logger.warn(t.message)}return e}getCustomItems(){const e=this.evaluate(this.component.data.custom,{values:[]},"values");return this.asyncValues=E(e),e}asyncCustomValues(){return _.isBoolean(this.asyncValues)||this.getCustomItems(),this.asyncValues}updateCustomItems(e){if(this.asyncCustomValues()){if(!e&&!this.active){this.itemsLoadedResolve();return}this.loading=!0,this.getCustomItems().then(t=>{this.loading=!1,this.setItems(t||[])}).catch(t=>{this.handleLoadingError(t)})}else this.setItems(this.getCustomItems()||[])}isEmpty(e=this.dataValue){return super.isEmpty(e)||e===void 0}refresh(e,t){if(this.component.clearOnRefresh){const n=t?t.instance:null;n&&!n.pristine&&this.setValue(this.emptyValue)}this.updateItems(null,!0)}get additionalResourcesAvailable(){return _.isNil(this.serverCount)||this.serverCount>this.downloadedResources.length}get serverCount(){return this.isFromSearch?this.searchServerCount:this.defaultServerCount}set serverCount(e){this.isFromSearch?this.searchServerCount=e:this.defaultServerCount=e}get downloadedResources(){return this.isFromSearch?this.searchDownloadedResources:this.defaultDownloadedResources}set downloadedResources(e){this.isFromSearch?this.searchDownloadedResources=e:this.defaultDownloadedResources=e}get filteredMasterdata(){if(!this.component.masterdata)return[];let e=[...this.component.masterdata];if(this.component.filter)try{const t=this.component.filter.replace(/(~=\s*)(\{\{.*?\}\})/g,'$1"$2"'),n=this.interpolate(t,{data:this.data}),o=filtrex.compileExpression(n,{customProp:filtrex.useDotAccessOperatorAndOptionalChaining,extraFunctions:{equalsIgnoreCase:(r,s)=>String(r).toLowerCase()===String(s).toLowerCase(),matchIgnoreCase:(r,s)=>new RegExp(s,"i").test(String(r))}});e=e.filter(r=>o({data:r}))}catch(t){return console.warn("[TF_SDK:153] \u26A0\uFE0F Filter error:",t),[]}return e}updateItems(e,t){if(logger.info(`[TF_SDK:179] \u2705 updateItems() called for '${this.key}'. searchInput:`,e,"forceUpdate:",t,"dataSrc:",this.component.dataSrc),this.itemsLoaded=new Promise(n=>{this.itemsLoadedResolve=n}),!this.component.data){logger.warn(`[TF_SDK:180] \u26A0\uFE0F Select component ${this.key} does not have data configuration.`),this.itemsLoadedResolve();return}if(!this.visible){this.itemsLoadedResolve();return}switch(this.component.dataSrc){case"values":this.setItems(this.component.data.values);break;case"json":this.setItems(this.component.data.json);break;case"custom":this.updateCustomItems();break;case"masterdata":logger.info(`[TF_SDK:181] \u2705 masterdata case for '${this.key}'. masterdata length:`,this.filteredMasterdata?this.filteredMasterdata.length:0);let n=this.filteredMasterdata||[];if(n.length>0&&(n=n.map(o=>o&&typeof o=="object"&&!o.data?Object.assign({data:o},o):o)),!this.isFromSearch&&!this.isScrollLoading&&!this.component.dropdownOpened)if(logger.info(`[TF_SDK:182] \u2705 masterdata: Initial/Unopened State for '${this.key}'`),this.defaultDownloadedResources&&this.defaultDownloadedResources.length>0&&this.defaultDownloadedResources.length<n.length)logger.info(`[TF_SDK:183] \u2705 masterdata: defaultDownloadedResources > 0 for '${this.key}'`),this.setItems(this.defaultDownloadedResources);else if(!this.component.dropdownOpened&&this.data[this.key]&&String(this.data[this.key]).trim().length>0){logger.info(`[TF_SDK:184] \u2705 masterdata: Has pre-existing value for '${this.key}'`,this.data[this.key]);let o=[];this.component.multiple&&n.length>0?this.data[this.key].forEach(s=>n.filter(h=>{const a=_.get(h,this.component.valueProperty);(typeof a!="string"?String(a):a).includes(s)&&o.push(h)})):n.length>0&&(o=n.filter(s=>{const h=_.get(s,this.component.valueProperty),a=typeof h!="string"?String(h):h;return a==null?void 0:a.includes(this.data[this.key])}));const r=o.filter((s,h)=>h===o.findIndex(a=>_.get(s,this.component.valueProperty)===_.get(a,this.component.valueProperty)));this.setItems(r)}else logger.info(`[TF_SDK:185] \u2705 masterdata: No pre-existing value, loading full list for '${this.key}' (length: ${n.length})`),this.setItems(n);else logger.info(`[TF_SDK:186/187] \u2705 masterdata: Search/Scroll/Opened State for '${this.key}', loading list (length: ${n.length})`),this.setItems(n);break;case"resource":{if(!this.component.data.resource||!t&&!this.active){this.itemsLoadedResolve();return}let o=this.options.formio?this.options.formio.formsUrl:`${Formio.getProjectUrl()}/form`;if(o+=`/${this.component.data.resource}/submission`,t||this.additionalResourcesAvailable||!this.serverCount)try{this.loadItems(o,e,this.requestHeaders)}catch(r){logger.warn(`[TF_SDK:188] \u26A0\uFE0F Unable to load resources for ${this.key}`)}else this.setItems(this.downloadedResources);break}case"url":{if(!t&&!this.active&&!this.calculatedValue){this.itemsLoadedResolve();return}let{url:o}=this.component.data,r,s;o.startsWith("/")&&(o=(o.startsWith("/project")?Formio.getBaseUrl():Formio.getProjectUrl()||Formio.getBaseUrl())+o),this.component.data.method?(r=this.component.data.method,r.toUpperCase()==="POST"?s=this.component.data.body:s=null):r="GET";const h=this.component.authenticate?{}:{noToken:!0};this.loadItems(o,e,this.requestHeaders,h,r,s);break}case"indexeddb":{if(typeof window=="undefined")return;if(window.indexedDB||window.alert("Your browser doesn't support current version of indexedDB"),this.component.indexeddb&&this.component.indexeddb.database&&this.component.indexeddb.table){const o=window.indexedDB.open(this.component.indexeddb.database);o.onupgradeneeded=r=>{if(this.component.customOptions){const s=r.target.result,h=s.createObjectStore(this.component.indexeddb.table,{keyPath:"myKey",autoIncrement:!0});h.transaction.oncomplete=()=>{const a=s.transaction(this.component.indexeddb.table,"readwrite");this.component.customOptions.forEach(l=>{a.objectStore(this.component.indexeddb.table).put(l)})}}},o.onerror=()=>{window.alert(o.errorCode)},o.onsuccess=r=>{const a=r.target.result.transaction(this.component.indexeddb.table,"readwrite").objectStore(this.component.indexeddb.table);new Promise(l=>{const i=[];a.getAll().onsuccess=c=>{c.target.result.forEach(d=>{i.push(d)}),l(i)}}).then(l=>{_.isEmpty(this.component.indexeddb.filter)||(l=_.filter(l,this.component.indexeddb.filter)),this.setItems(l)})}}}}}addPlaceholder(){!this.component.placeholder||!this.component.placeholder.trim()||this.addOption("",this.component.placeholder,{placeholder:!0})}activate(){(this.loading||!this.active)&&this.setLoadingItem(),!this.active&&(this.activated=!0,this.triggerUpdate())}setLoadingItem(e=!1){this.choices?e?this.choices.setChoices([{value:`${this.id}-loading`,label:"Loading...",disabled:!0}],"value","label"):this.choices.setChoices([{value:"",label:`<i class="${this.iconClass("refresh")}" style="font-size:1.3em;"></i>`,disabled:!0}],"value","label",!0):(this.component.dataSrc==="url"||this.component.dataSrc==="resource")&&this.addOption("",this.t("loading..."))}get active(){return this.component.dataSrc==="masterdata"&&this.component.masterdata?!this.component.lazyLoad||this.activated:!this.component.lazyLoad||this.activated}render(){const e=this.inputInfo;return e.attr=e.attr||{},e.multiple=this.component.multiple,super.render(this.wrapElement(this.renderTemplate("select",{input:e,selectOptions:"",index:null})))}wrapElement(e){return this.component.addResource&&!this.options.readOnly?this.renderTemplate("resourceAdd",{element:e}):e}choicesOptions(){const e=this.component.hasOwnProperty("searchEnabled")?this.component.searchEnabled:!0,t=this.t(this.component.placeholder,{_userInput:!0});let n=this.component.customOptions||{};if(typeof n=="string")try{n=JSON.parse(n)}catch(a){logger.warn(a.message),n={}}const o={maxPatternLength:1e3,distance:1e3};let r={tokenize:!0,matchAllTokens:!0},s={include:"score",threshold:_.get(this,"component.searchThreshold",.3)},h={removeItemButton:this.component.disabled?!1:_.get(this.component,"removeItemButton",!0),itemSelectText:"",classNames:{containerOuter:"choices form-group formio-choices",containerInner:this.transform("class","form-control ui fluid selection dropdown")},addItemText:!1,allowHTML:!0,placeholder:!!this.component.placeholder,placeholderValue:t,noResultsText:this.t("No results found"),noChoicesText:this.t("No choices to choose from"),searchPlaceholderValue:this.t("Type to search"),shouldSort:!1,position:this.component.dropdown?this.component.dropdown:window.platform&&window.platform.iosPlatform?"bottom":"auto",searchEnabled:e,searchChoices:!this.component.searchField,searchFields:_.get(this,"component.searchFields",["label"]),searchResultLimit:_.get(this,"component.searchResultLimit",this.component.limit||100),fuseOptions:this.component.useExactSearch?Object.assign(r,o):Object.assign({},_.get(this,"component.fuseOptions",{}),Object.assign(s,o)),valueComparer:(a,l)=>{if(_.isEqual(a,l))return!0;if(a==null||l==null)return!1;if((typeof a=="string"||typeof a=="number")&&typeof l=="object"){const i=l.data||l;return i.id===a||i._id===a||i.value===a||this.component.valueProperty&&_.get(i,this.component.valueProperty)===a?!0:Object.values(i).some(c=>c===a||String(c)===String(a))}if((typeof l=="string"||typeof l=="number")&&typeof a=="object"){const i=a.data||a;return i.id===l||i._id===l||i.value===l||this.component.valueProperty&&_.get(i,this.component.valueProperty)===l?!0:Object.values(i).some(c=>c===l||String(c)===String(l))}if(typeof a=="object"&&typeof l=="object"){const i=a.data||a,c=l.data||l;if(_.isEqual(i,c))return!0;if(this.component.idPath){const d=_.get(a,this.component.idPath)||_.get(i,this.component.idPath),g=_.get(l,this.component.idPath)||_.get(c,this.component.idPath);if(d&&g&&d===g)return!0}if(i.id&&c.id&&String(i.id)===String(c.id)||i._id&&c._id&&String(i._id)===String(c._id))return!0}return!1},resetScrollPosition:!1};return Object.assign(h,n)}attach(e){this.component.dropdownOpened=!1;const t=super.attach(e);this.loadRefs(e,{selectContainer:"single",addResource:"single",autocompleteInput:"single"});const n=this.refs.autocompleteInput;n&&this.addEventListener(n,"change",a=>{this.setValue(a.target.value)});const o=this.refs.selectContainer;if(!o)return;if(this.addEventListener(o,this.inputInfo.changeEvent,()=>{if(this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic change event on '${this.key}'`);return}this.updateValue(null,{modified:!0})}),this.attachRefreshOnBlur(),this.component.widget==="html5"){this.addFocusBlurEvents(o),this.triggerUpdate(null,!0),this.visible&&this.setItems(this.selectOptions||[]),this.focusableElement=o,this.addEventListener(o,"focus",()=>this.update()),this.addEventListener(o,"keydown",a=>{const{key:l}=a;["Backspace","Delete"].includes(l)&&this.setValue(this.emptyValue)});return}const r=o.tabIndex;this.addPlaceholder(),o.setAttribute("dir",this.i18next.dir()),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy();const s=this.choicesOptions();if(Choices&&(this.choices=new Choices(o,s),["setChoices","setValue","removeActiveItems","clearStore","removeItemsByValue","setChoiceByValue"].forEach(l=>{if(typeof this.choices[l]=="function"){const i=this.choices[l];this.choices[l]=(...c)=>{this.isUpdatingChoices=(this.isUpdatingChoices||0)+1;try{return i.apply(this.choices,c)}finally{this.isUpdatingChoices--}}}}),this.selectOptions&&this.selectOptions.length&&this.choices.setChoices(this.selectOptions,"value","label",!0),this.component.multiple?this.focusableElement=this.choices.input.element:(s.searchEnabled&&window.platform&&window.platform.iosPlatform?this.focusableElement=this.choices.input.element:this.focusableElement=this.choices.containerInner.element,this.choices.containerOuter.element.setAttribute("tabIndex","-1"),s.searchEnabled&&this.addEventListener(this.choices.containerOuter.element,"mousedown",()=>this.positionDropdown())),this.addFocusBlurEvents(this.focusableElement),this.itemsFromUrl&&!this.component.noRefreshOnScroll&&(this.scrollList=this.choices.choiceList.element,this.addEventListener(this.scrollList,"scroll",l=>{this.onScroll(l)})),s.removeItemButton&&this.addEventListener(o,"removeItem",()=>{if(this.isRemoveButtonPressed=!0,this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (standard list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),window&&this.choices&&this.shouldPositionDropdown){const a=document.getElementById("formio-wrapper");a&&this.addEventListener(a,"scroll",()=>{this.positionDropdown(!0)},!1,!0),this.addEventListener(window.document,"scroll",()=>{this.positionDropdown(!0)},!1,!0)}if(this.focusableElement.setAttribute("tabIndex",r),this.component.searchField){if(this.choices&&this.choices.input&&this.choices.input.element){var h=(c,d)=>{let g;return function(){const u=this,p=arguments;clearTimeout(g),g=setTimeout(()=>c.apply(u,p),d)}};let i=this;this.addEventListener(this.choices.input.element,"input",h(function(c){if(logger.info(`[TF_SDK:INPUT] \u2328\uFE0F Choices input event triggered for '${i.key}'. Search input:`,c.target.value),i.isFromSearch=!!c.target.value,i.component.dataSrc==="masterdata"&&i.component.masterdata)if(c.target.value.length==0)logger.info(`[TF_SDK:INPUT] Search cleared for '${i.key}'`),i.triggerUpdate(),i.searchDownloadedResources=[],i.component.totalSearchResults=[],i.isFromSearch=!1,i.setItems(i.defaultDownloadedResources);else{let m=[];var d=i.component.template||"",g=d.lastIndexOf("."),u="label";if(g!==-1){var p=d.substring(g+1,d.length),y=p.indexOf("}");y!==-1&&(u=p.substring(0,y).trim())}if(logger.info(`[TF_SDK:INPUT] Parsed label key: '${u}', labelProperty: '${i.component.labelProperty}', limit: ${i.component.limit}, uniqueOptions: ${i.component.uniqueOptions}`),m=i.component.masterdata.filter(S=>{if(!S)return!1;let O;const f=[];i.component.labelProperty&&f.push(i.component.labelProperty),u&&!f.includes(u)&&f.push(u);const R=["Name","label","value","text","title"];for(const w of R)f.includes(w)||f.push(w);for(const w of f)if(S[w]!==void 0&&S[w]!==null){O=S[w];break}return O==null?Object.values(S).some(w=>w&&String(w).toLowerCase().includes(c.target.value.toLowerCase())):String(O).toLowerCase().includes(c.target.value.toLowerCase())}),logger.info(`[TF_SDK:INPUT] Found ${m.length} items matching '${c.target.value}' out of ${i.component.masterdata.length}`),m.length>i.component.limit){logger.info(`[TF_SDK:INPUT] Found items count ${m.length} exceeds limit ${i.component.limit}. Slicing.`),i.component.totalSearchResults=[],i.component.totalSearchResults=m;let S=i.component.totalSearchResults.slice(0,i.component.limit);i.setItems(S)}else logger.info(`[TF_SDK:INPUT] Setting items directly. Count: ${m.length}`),i.setItems(m)}else c.target.value?(i.serverCount=null,i.downloadedResources=[]):i.triggerUpdate()},1e3))}this.addEventListener(o,"choice",()=>{this.component.multiple&&this.component.dataSrc==="resource"&&this.isFromSearch&&this.triggerUpdate(),this.isFromSearch=!1});const a=this.component.searchField&&(this.isSelectResource||this.isSelectURL)?(this.component.searchDebounce===0?0:this.component.searchDebounce||this.defaultSchema.searchDebounce)*1e3:0,l=i=>{this.triggerUpdate(i.detail.value)};this.addEventListener(o,"search",_.debounce(i=>{l(i),this.positionDropdown()},a)),this.addEventListener(o,"stopSearch",()=>this.triggerUpdate()),this.addEventListener(o,"hideDropdown",()=>{if(this.component.dropdownOpened=!1,this.component.totalSearchResults=[],this.component.searchDownloadedResources=[],this.isFromSearch=!1,this.component.dataSrc==="masterdata"&&this.component.masterdata){let i,c={};c.limit=this.component.limit;const d=this.filteredMasterdata;this.data[this.key]&&String(this.data[this.key]).length>0&&(i=d.filter(u=>{const p=u[this.component.valueProperty],y=typeof p!="string"?String(p):p;return y==null?void 0:y.includes(this.data[this.key])})),this.defaultDownloadedResources.findIndex(u=>u[this.component.valueProperty]===String(this.data[this.key]))>-1||i&&i.length>0&&this.defaultDownloadedResources.push(i[0]),c=this.defaultDownloadedResources,c.serverCount=d.length,c.skip=this.defaultDownloadedResources.length+this.component.limit,this.setItems(this.defaultDownloadedResources)}}),this.addEventListener(o,"hideDropdown",()=>{const i=document.getElementById("form-container"),c=i?i.scrollTop:0;this.choices&&this.choices.input&&this.choices.input.element&&(this.choices.input.element.value=""),this.component.dataSrc==="masterdata"&&this.updateItems(null,!0),i&&c>0&&requestAnimationFrame(()=>{i.scrollTop===0&&!window._unv_selecting&&(i.scrollTop=c)})})}return this.addEventListener(o,"mousedown",()=>{window._unv_selecting=!0,window.platform&&window.platform.iosPlatform&&document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.classList.contains("choices__input"))&&document.activeElement.blur(),setTimeout(()=>{window._unv_selecting=!1},500),this.positionDropdown()}),this.addEventListener(o,"showDropdown",()=>{this.activated||this.update(),this.positionDropdown(),this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!0,(!this.defaultDownloadedResources||this.defaultDownloadedResources.length<this.filteredMasterdata.length)&&this.updateItems(null,!0))}),this.shouldPositionDropdown&&this.addEventListener(o,"highlightChoice",()=>{this.positionDropdown()}),this.addEventListener(o,"hideDropdown",()=>{this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!1)}),this.addEventListener(o,"search",a=>{if(logger.info(`[TF_SDK:SEARCH] \u{1F50D} Choices search event triggered for '${this.key}'. Search input:`,a.detail.value),this.component.dataSrc==="masterdata"&&this.component.masterdata){var l=this.component.template||"",i=l.lastIndexOf("."),c="label";if(i!==-1){var d=l.substring(i+1,l.length),g=d.indexOf("}");g!==-1&&(c=d.substring(0,g).trim())}const u=this.component.searchField?this.component.searchField.replace(/__regex$/,""):"";logger.info(`[TF_SDK:SEARCH] Configured searchField: '${this.component.searchField}', clean: '${u}', parsedLabel: '${c}', limit: ${this.component.limit}, uniqueOptions: ${this.component.uniqueOptions}`),this.searchDownloadedResources=this.filteredMasterdata.filter(p=>{if(!p)return!1;let y;const m=[];this.component.searchField&&m.push(this.component.searchField),u&&!m.includes(u)&&m.push(u),this.component.labelProperty&&!m.includes(this.component.labelProperty)&&m.push(this.component.labelProperty),c&&!m.includes(c)&&m.push(c);const S=["Name","label","value","text","title"];for(const f of S)m.includes(f)||m.push(f);for(const f of m)if(p[f]!==void 0&&p[f]!==null){y=p[f];break}let O=!1;return y==null?O=Object.values(p).some(f=>f&&String(f).toLowerCase().includes(a.detail.value.toLowerCase())):O=String(y).toLowerCase().includes(a.detail.value.toLowerCase()),O}),logger.info(`[TF_SDK:SEARCH] Found ${this.searchDownloadedResources.length} matching resources out of ${this.filteredMasterdata.length}`),this.isFromSearch=!0}}),this.choices&&s.placeholderValue&&this.choices._isSelectOneElement&&(this.addPlaceholderItem(s.placeholderValue),this.addEventListener(o,"removeItem",()=>{if(this.addPlaceholderItem(s.placeholderValue),this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (placeholder list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),this.addValueOptions(),this.setChoicesValue(this.dataValue),this.isSelectResource&&this.refs.addResource&&this.addEventListener(this.refs.addResource,"click",a=>{a.preventDefault();const l=this.ce("div"),i=this.createModal(l),d=`${_.get(this.root,"formio.projectUrl",Formio.getProjectUrl())}/form/${this.component.data.resource}`;new Form(l,d,{}).ready.then(g=>{g.on("submit",u=>{let p=this.valueProperty?_.get(u,this.valueProperty):u;this.component.multiple&&(p=[...this.dataValue,p]),this.setValue(p),this.triggerUpdate(),i.close()})})}),this.disabled=this.shouldDisabled,this.updateItems(),this.triggerUpdate(),this.component.lazyLoad||(this.activated=!0),t}setDropdownPosition(){let e,t;if(this.choices&&this.choices.dropdown&&this.choices.dropdown.element&&(e=this.choices.dropdown.element),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&(t=this.choices.containerOuter.element),!e||!t){console.warn("[TF_SELECT_LOG:ERR] \u26A0\uFE0F dropdown or container element not found in setDropdownPosition");return}const n=t.getBoundingClientRect(),o=window.visualViewport?window.visualViewport.height:window.innerHeight,r=o-(n.top+n.height),s=n.top;let h=t.classList.contains("is-flipped");!h&&r<180&&s>r?(h=!0,t.classList.add("is-flipped"),e.classList.add("is-flipped")):h&&r>=200&&(h=!1,t.classList.remove("is-flipped"),e.classList.remove("is-flipped"));const a=e.offsetHeight||220;let l,i;h?(i=Math.min(a,Math.max(120,s-20)),l=Math.max(10,n.top-i)):(l=n.top+n.height,i=Math.max(120,Math.min(a,o-l-15)));const c={left:`${n.left}px`,width:`${n.width}px`,position:"fixed",bottom:"unset",right:"unset",top:`${l}px`,maxHeight:`${i}px`};_.assign(e.style,c)}hasDataGridAncestor(e){return e=e||this,e.inDataGrid||e.type==="datagrid"?!0:e.parent?this.hasDataGridAncestor(e.parent):!1}positionDropdown(e){!this.shouldPositionDropdown||!this.choices||this.choices.dropdown&&!this.choices.dropdown.isActive&&e||(this.setDropdownPosition(),this.itemsLoaded.then(()=>{this.setDropdownPosition()}))}get isLoadingAvailable(){return!this.isScrollLoading&&this.additionalResourcesAvailable}onScroll(e){if(!this.isFromSearch)if(this.component.dataSrc==="masterdata"&&this.component.masterdata&&this.defaultDownloadedResources.length<this.filteredMasterdata.length){var t=e.target;L?t.scrollHeight-t.scrollTop===t.clientHeight&&(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata()):(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata())}else this.isLoadingAvailable&&(this.isScrollLoading=!0,this.setLoadingItem(!0),this.triggerUpdate(this.choices.input.element.value))}setMasterdata(){if(this.component.dataSrc==="masterdata"&&this.component.masterdata){let e={},t;e.limit=this.component.limit;let n;const o=this.filteredMasterdata;if(this.data[this.key]&&String(this.data[this.key]).trim().length>0&&(n=o.filter(r=>{const s=_.get(r,this.component.valueProperty),h=typeof s!="string"?String(s):s;return h==null?void 0:h.includes(this.data[this.key])})),this.isFromSearch&&this.searchDownloadedResources&&this.searchDownloadedResources.length>0){const r=this.component.totalSearchResults||this.searchDownloadedResources||[];t=r.slice(this.searchDownloadedResources.length,this.searchDownloadedResources.length+this.component.limit),e=t,e.serverCount=r.length,e.skip=this.searchDownloadedResources.length+this.component.limit}else{t=o.slice(this.defaultDownloadedResources.length,this.defaultDownloadedResources.length+this.component.limit);let r=this.defaultDownloadedResources.filter(a=>t.includes(a));if(r&&r.length>0){let a=t.findIndex(l=>_.get(l,this.component.valueProperty)===_.get(r[0],this.component.valueProperty));a>-1&&t.splice(a,1)}let s=t.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]));s>-1&&t.splice(s,1),this.defaultDownloadedResources.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]))>-1||n&&n.length>0&&t.push(n[0]),e=t,e.serverCount=o.length,e.skip=this.defaultDownloadedResources.length+this.component.limit}this.setItems(e)}}attachRefreshOnBlur(){this.component.refreshOnBlur&&this.on("blur",e=>{this.checkRefreshOn([{instance:e,value:e.dataValue}],{fromBlur:!0})})}addPlaceholderItem(e){this.choices._store.activeItems.length||this.choices._addItem({value:e,label:e,choiceId:0,groupId:-1,customProperties:null,placeholder:!0,keyCode:null})}update(){this.component.dataSrc==="custom"&&this.updateCustomItems(),this.activate()}set disabled(e){super.disabled=e,this.choices&&(e?(this.setDisabled(this.choices.containerInner.element,!0),this.focusableElement.removeAttribute("tabIndex"),this.choices.disable()):(this.setDisabled(this.choices.containerInner.element,!1),this.focusableElement.setAttribute("tabIndex",this.component.tabindex||0),this.choices.enable()))}get disabled(){return super.disabled}set visible(e){e&&!this._visible!=!e&&this.triggerUpdate(),super.visible=e}get visible(){return super.visible}addCurrentChoices(e,t,n){if(!e)return!1;const o=[],r=e.reduce((s,h)=>{if(!h||_.isEmpty(h))return s;let a=!1;const l=t===this.selectOptions;return t&&t.length&&_.each(t,i=>{if(i._id&&h._id&&i._id===h._id)return a=!0,!1;const c=n?i.value:this.itemValue(i,l);return a|=_.isEqual(c,h),!a}),a?a||s:(o.push(this.selectValueAndLabel(h)),!0)},!1);return this.component.dataSrc==="masterdata"&&this.component.masterdata?this.isFromSearch||o.length&&(this.choices&&this.choices.setChoices(o,"value","label"),o.map(s=>{this.addOption(s.value,s.label)})):o.length&&(this.choices&&this.choices.setChoices(o,"value","label"),o.map(s=>{this.addOption(s.value,s.label)})),r}getValueAsString(e,t){return this.component.multiple&&Array.isArray(e)?e.map(n=>this.asString(n,t)).join(", "):this.asString(e,t)}getValue(){if(this.viewOnly||this.loading||!this.component.lazyLoad&&!this.selectOptions.length||!this.element)return this.dataValue;let e=this.emptyValue;if(this.choices)e=this.choices.getValue(!0),!this.component.multiple&&this.component.placeholder&&e===this.t(this.component.placeholder,{_userInput:!0})&&(e=this.emptyValue);else if(this.refs.selectContainer){if(e=this.refs.selectContainer.value,this.valueProperty===""||this.isEntireObjectDisplay()){if(e==="")return{};const t=this.selectOptions[e]||this.selectOptions.find(n=>n.id===e);t&&_.isObject(t.value)&&(e=t.value)}}else e=this.dataValue;return e==null&&(e=""),e}redraw(){const e=super.redraw();return this.triggerUpdate(),e}normalizeSingleValue(e,t){if(_.isNil(e))return;const n=_.isObject(e);if(n&&Object.keys(e).length===0)return e;if(t){const s=this.component.reference&&e&&e._id?e._id.toString():e,h=!n||this.component.reference;if(s&&h&&this.templateData&&this.templateData[s]&&this.root&&this.root.submission){const a=this.root.submission;a.metadata||(a.metadata={}),a.metadata.selectData||(a.metadata.selectData={});let l=this.templateData[s];if(this.component.multiple){l={};const i=this.dataValue;i&&_.isArray(i)&&i.length&&i.forEach(c=>{const d=this.component.reference?c._id.toString():c;l[d]=this.templateData[d]}),l[e]=this.templateData[e]}_.set(a.metadata.selectData,this.path,l)}}const o=this.component.dataType||"auto",r={value:e,number(){const s=Number(this.value),h=e.toString()===s.toString();return!Number.isNaN(s)&&Number.isFinite(s)&&e!==""&&h&&(this.value=s),this},boolean(){return _.isString(this.value)&&(this.value.toLowerCase()==="true"||this.value.toLowerCase()==="false")&&(this.value=this.value.toLowerCase()==="true"),this},string(){return this.value=String(this.value),this},object(){return this},auto(){return _.isObject(this.value)?this.value=this.object().value:this.value=this.string().number().boolean().value,this}};try{return r[o]().value}catch(s){return logger.warn("[TF_SDK:189] \u26A0\uFE0F Failed to normalize value",s),e}}normalizeValue(e){return this.component.multiple&&Array.isArray(e)?e.map(t=>this.normalizeSingleValue(t,!0)):super.normalizeValue(this.normalizeSingleValue(e,!0))}updateValue(e,t){return this.isUpdatingChoices>0?(logger.debug(`[TF_SDK] \u2139\uFE0F Blocked updateValue call on '${this.key}' due to programmatic choices update.`),!1):super.updateValue(e,t)}setValue(e,t={}){if(e&&String(e).length>0&&document.querySelectorAll(".barcode-select-error").forEach(i=>i.remove()),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="values"&&this.component.data.values.filter(i=>{(e&&i.value===e||e&&i.value===String(e))&&(e=i.label)}),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="masterdata"&&!this.component.multiple){var n=this.component.template,o=n.substring(n.lastIndexOf(".")+1,n.length),r=o.substring(0,o.indexOf("}"),o.length);r=r.trim(),this.component.masterdata.filter(i=>{(e&&i[this.component.valueProperty]===e||e&&i[this.component.valueProperty]===String(e))&&(e=i[r])})}const s=this.dataValue,h=this.updateValue(e,t);e=this.dataValue;const a=!this.isEmpty(s),l=!this.isEmpty(e);if(this.component.multiple&&Array.isArray(e)?e=e.map(i=>typeof i=="boolean"||typeof i=="number"?i.toString():i):(typeof e=="boolean"||typeof e=="number")&&(e=e.toString()),this.isHtmlRenderMode()&&t&&t.fromSubmission&&h)return this.itemsLoaded.then(()=>{this.redraw()}),h;if(this.loading)return h;if(this.isInitApiCallNeeded(l)){this.loading=!0,this.lazyLoadInit=!0;const i=this.component.searchField||this.component.valueProperty;return this.triggerUpdate(_.get(e.data||e,i,e),!0),h}return this.itemsLoaded.then(()=>{this.addValueOptions(),this.setChoicesValue(e,a,t)}),h}isInitApiCallNeeded(e){return this.component.lazyLoad&&!this.lazyLoadInit&&!this.active&&!this.selectOptions.length&&e&&this.shouldInitialLoad&&this.visible&&(this.component.searchField||this.component.valueProperty)}setChoicesValue(e,t,n={}){const o=!this.isEmpty(e)||n.fromSubmission;if(t=t===void 0?!0:t,this.choices)if(o)if(this.component.dataSrc==="masterdata"&&this.component.masterdata){if(!this.isFromSearch){this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}}else{this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}else(t||n.resetValue)&&this.choices.removeActiveItems();else if(o){const r=Array.isArray(e)?e:[e];if(!_.isEqual(this.dataValue,this.defaultValue)&&this.selectOptions.length<2||this.selectData&&n.fromSubmission){const{value:s,label:h}=this.selectValueAndLabel(this.dataValue);this.addOption(s,h)}_.each(this.selectOptions,s=>{_.each(r,h=>{if(s.value===""&&(s.value={}),_.isEqual(h,s.value)&&s.element)return s.element.selected=!0,s.element.setAttribute("selected","selected"),!1})})}else _.each(this.selectOptions,r=>{r.element&&(r.element.selected=!1,r.element.removeAttribute("selected"))})}get itemsLoaded(){return this._itemsLoaded||Promise.resolve()}set itemsLoaded(e){this._itemsLoaded=e}validateValueAvailability(e,t){if(!F(e)||!t)return!0;const n=this.getOptionsValues();if(n){if(_.isObject(t)){const o=r=>{const s=this.normalizeSingleValue(r,!0);if(!_.isObject(s))return!1;try{return JSON.stringify(s)===JSON.stringify(t)}catch(h){return logger.error("Error while comparing items",h),!1}};return n.findIndex(r=>o(r))!==-1}return n.findIndex(o=>this.normalizeSingleValue(o)===t)!==-1}return!1}getOptionValue(e){return _.isObject(e)&&this.isEntireObjectDisplay()?this.normalizeSingleValue(e):_.isObject(e)&&(this.valueProperty||this.component.key!=="resource")?e:_.isObject(e)&&!this.valueProperty?this.interpolate(this.component.template,{item:e}).replace(/<\/?[^>]+(>|$)/g,""):_.isNull(e)?this.emptyValue:String(this.normalizeSingleValue(e))}getOptionsValues(){let e=[];switch(this.component.dataSrc){case"values":e=this.component.data.values;break;case"json":e=this.component.data.json;break;case"custom":e=this.getCustomItems();break}if(typeof e=="string")try{e=JSON.parse(e)}catch(t){logger.warn(t.message),e=[]}if(Array.isArray(e))return e.map(t=>this.getOptionValue(this.itemValue(t)))}deleteValue(){this.setValue("",{noUpdateEvent:!0}),this.unset()}validateMultiple(){return!1}isBooleanOrNumber(e){return typeof e=="number"||typeof e=="boolean"}getNormalizedValues(){if(!(!this.component||!this.component.data||!this.component.data.values))return this.component.data.values.map(e=>({label:e.label,value:String(this.normalizeSingleValue(e.value))}))}asString(e,t={}){var r;e=e||this.getValue();const n=(s,h)=>h?(Array.isArray(s)?s.forEach(a=>a[h]=a[h].toString()):s[h]=s[h].toString(),s):(this.isBooleanOrNumber(s)&&(s=s.toString()),Array.isArray(s)&&s.some(a=>this.isBooleanOrNumber(a))&&(s=s.map(a=>{this.isBooleanOrNumber(a)&&(a=a.toString())})),s);if(e=n(e),this.component.dataSrc==="masterdata"&&this.component.masterdata){const s=h=>(typeof h=="string"||typeof h=="number")&&this.findMasterdataItem(h)||h;Array.isArray(e)?e=e.map(s):e!=null&&(e=s(e))}if(["values","custom"].includes(this.component.dataSrc)&&!this.asyncCustomValues()){const{items:s,valueProperty:h}=this.component.dataSrc==="values"?{items:n(this.getNormalizedValues(),"value"),valueProperty:"value"}:{items:n(this.getCustomItems(),this.valueProperty),valueProperty:this.valueProperty},a=()=>{const l=_.find(s,[h,e]),i=this.defaultSchema.data.values||[];return _.isEqual(l,i[0])?"-":l};e=this.component.multiple&&Array.isArray(e)?_.filter(s,l=>e.includes(l.value)):h?(r=a())!=null?r:{value:e,label:e}:e}if(_.isString(e)&&this.component.dataSrc!=="masterdata")return e;const o=s=>{const h=this.itemTemplate(s);return t.csv&&h?unescapeHTML(h):h};if(Array.isArray(e)){const s=[];return e.forEach(h=>s.push(o(h))),this.component.dataSrc==="resource"&&s.length>0?s.join(", "):s.length>0?s.join("<br />"):"-"}return this.isEntireObjectDisplay()&&_.isObject(e)?JSON.stringify(e):_.isNil(e)?"-":this.itemTemplate(e)}detach(){this.off("blur"),this.choices&&(this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy(),this.choices=null),super.detach()}focus(){this.focusableElement&&(super.focus.call(this),this.focusableElement.focus())}setErrorClasses(e,t,n,o,r=this.element){super.setErrorClasses(e,t,n,o,r),this.choices?super.setErrorClasses([this.choices.containerInner.element],t,n,o,r):super.setErrorClasses([this.refs.selectContainer],t,n,o,r)}addFocusBlurEvents(e){this.addEventListener(e,"focus",()=>{this.root.focusedComponent!==this?(this.root.pendingBlur&&this.root.pendingBlur(),this.root.focusedComponent=this,this.emit("focus",this)):this.root.focusedComponent===this&&this.root.pendingBlur&&(this.root.pendingBlur.cancel(),this.root.pendingBlur=null)}),this.addEventListener(e,"blur",()=>{this.root.pendingBlur=FormioUtils.delay(()=>{this.emit("blur",this),this.component.validateOn==="blur"&&this.root.triggerChange({fromBlur:!0},{instance:this,component:this.component,value:this.dataValue,flags:{fromBlur:!0}}),this.root.focusedComponent=null,this.root.pendingBlur=null})})}}b&&b.Components?b.Components.addComponent("select",I):typeof Formio!="undefined"&&Formio.Components&&Formio.Components.addComponent("select",I)})();</script>
38876
38939
  <script>(function(){const w=Formio.Components.components.input,I=()=>({components:[]});var f=window._;const N=window.SignaturePad;var b=Formio.Utils;const R=b.getComponentSavedTypes,D=b.componentValueTypes;class o extends w{static schema(...t){return w.schema({type:"signature",label:"Signature",key:"signature",footer:"Sign Here",width:"100%",height:"150px",penColor:"black",backgroundColor:"rgb(245,245,235)",minWidth:"0.5",maxWidth:"2.5",keepOverlayRatio:!0,isEnableClicktoSign:!0},...t)}static get builderInfo(){return{title:"Signature",group:"advanced",icon:"pencil",weight:120,documentation:"/userguide/#signature",schema:o.schema()}}static get serverConditionSettings(){return o.conditionOperatorsSettings}static get conditionOperatorsSettings(){return{...super.conditionOperatorsSettings,operators:["isEmpty","isNotEmpty"]}}static savedValueTypes(t){return t=t||{},R(t)||[D.string]}init(){var t,a,s,i;super.init(),this.currentWidth=0,this.scale=1,this.component.width||(this.component.width="100%"),this.component.height||(this.component.height="200px"),this.component.keepOverlayRatio&&this.options.pdf&&((t=this.component.overlay)!=null&&t.width)&&((a=this.component.overlay)!=null&&a.height)&&(this.ratio=((s=this.component.overlay)==null?void 0:s.width)/((i=this.component.overlay)==null?void 0:i.height),this.component.width="100%",this.component.height="auto")}get emptyValue(){return""}get defaultSchema(){return o.schema()}get inputInfo(){const t=super.inputInfo;return t.type="input",t.attr.type="hidden",t}get className(){return`${super.className} signature-pad`}labelIsHidden(){return this.component.hideLabel}setValue(t,a={}){var i;const s=super.setValue(t,a);if(t&&this.refs.signatureImage&&(this.options.readOnly||this.disabled)&&(this.refs.signatureImage.src="",this.refs.signatureImage.setAttribute("src",t),this.showCanvas(!1)),this.signaturePad&&(t?s&&((i=this.triggerChange)==null||i.call(this)):this.signaturePad.clear()),this.signaturePad&&this.dataValue&&this.signaturePad.isEmpty()&&this.setDataToSigaturePad(),t&&this.refs&&this.refs.canvas){const e=this.refs.canvas.closest(".signature-pad-body");e&&e.classList.add("field-has-signature")}return s}showCanvas(t){t?(this.refs.canvas&&(this.refs.canvas.style.display="inherit"),this.refs.signatureImage&&(this.refs.signatureImage.style.display="none")):(this.refs.canvas&&(this.refs.canvas.style.display="none"),this.refs.signatureImage&&(this.refs.signatureImage.style.display="inherit",this.refs.signatureImage.style.maxHeight="100%"))}onDisabled(){this.showCanvas(!super.disabled),this.signaturePad&&(super.disabled?(this.signaturePad.off(),this.refs.refresh&&this.refs.refresh.classList.add("disabled"),this.refs.clicktoSign&&(this.refs.clicktoSign.disabled=!0),this.refs.signatureImage&&this.dataValue&&this.refs.signatureImage.setAttribute("src",this.dataValue)):(this.signaturePad.on(),this.refs.refresh&&this.refs.refresh.classList.remove("disabled"),this.refs.clicktoSign&&(this.refs.clicktoSign.disabled=!1)))}checkSize(t,a){if(this.refs.padBody&&(t||this.refs.padBody&&this.refs.padBody.offsetWidth!==this.currentWidth)){this.scale=t?a:this.scale,this.currentWidth=this.refs.padBody.offsetWidth;const s=this.currentWidth*this.scale,i=this.ratio?s/this.ratio:this.refs.padBody.offsetHeight*this.scale,e=this.ratio?i:this.refs.padBody.offsetHeight*this.scale;this.refs.canvas.width=s,this.refs.canvas.height=i>e?e:i,this.refs.canvas.style.maxWidth=`${this.currentWidth*this.scale}px`,this.refs.canvas.style.maxHeight=`${e}px`;const r=this.refs.canvas.getContext("2d");r.setTransform(1,0,0,1,0,0),r.scale(1/this.scale,1/this.scale),r.fillStyle=this.signaturePad.backgroundColor,r.fillRect(0,0,this.refs.canvas.width,this.refs.canvas.height),this.signaturePad.clear(),this.dataValue&&this.setDataToSigaturePad(),this.disabled||this.showCanvas(!0)}}renderElement(t,a){return this.renderTemplate("signature",{element:super.renderElement(t,a),required:f.get(this.component,"validate.required",!1)})}get hasModalSaveButton(){return!1}getModalPreviewTemplate(){return this.renderModalPreview({previewText:this.dataValue?`<img src=${this.dataValue} ${this._referenceAttributeName}='openModal' style="width: 100%;height: 100%;" />`:this.t("Click to Sign")})}attach(t){this.loadRefs(t,{canvas:"single",refresh:"single",padBody:"single",signatureImage:"single",clicktoSign:"single",value:"single"});const a=super.attach(t);return this.component.isEnableClicktoSign?this.refs.clicktoSign&&(this.refs.clicktoSign.style.display="inline-flex"):this.refs.clicktoSign&&(this.refs.clicktoSign.style.display="none"),this.refs.refresh&&this.options.readOnly&&(this.refs.refresh.classList.add("disabled"),this.refs.clicktoSign&&(this.refs.clicktoSign.disabled=!0)),this.refs.canvas&&(this.signaturePad=new N(this.refs.canvas,{minWidth:this.component.minWidth,maxWidth:this.component.maxWidth,penColor:this.component.penColor,backgroundColor:this.component.backgroundColor}),this.signaturePad.addEventListener("endStroke",()=>this.setValue(this.signaturePad.toDataURL())),this.signaturePad.onBegin=()=>{const s=this.refs.canvas.closest(".signature-pad-body");s&&s.classList.add("field-has-signature")},this.refs.signatureImage.setAttribute("src",this.signaturePad.toDataURL()),this.onDisabled(),this.refs.padBody&&(this.refs.padBody.style.maxWidth||(this.refs.padBody.style.maxWidth="100%"),!this.builderMode&&!this.options.preview&&(this.observer=new ResizeObserver(()=>{this.checkSize()}),this.observer.observe(this.refs.padBody)),this.addEventListener(window,"resize",f.debounce(()=>this.checkSize(),10)),setTimeout(function s(){this.refs.padBody&&this.refs.padBody.offsetWidth?this.checkSize():setTimeout(s.bind(this),20)}.bind(this),20))),this.addEventListener(this.refs.clicktoSign,"click",s=>{s.preventDefault(),!(this.options.readOnly||this.disabled)&&this.drawSignatureFromName()}),this.addEventListener(this.refs.refresh,"click",s=>{s.preventDefault(),this.showCanvas(!0),this.signaturePad.clear(),this.setValue(this.defaultValue)}),this.setValue(this.dataValue),a}async drawSignatureFromName(){var T,W,V,B;if(this.options.readOnly||this.disabled)return;const t=window.firstName||((T=window.form)==null?void 0:T.firstName)||((W=window.FORM_USER_DATA)==null?void 0:W.firstName)||"",a=window.lastName||((V=window.form)==null?void 0:V.lastName)||((B=window.FORM_USER_DATA)==null?void 0:B.lastName)||"",s=`${t} ${a}`.trim();if(!s){logger.warn("[TF_SDK:59] \u26A0\uFE0F Click to Sign: No user name found in global state.");return}const i=this.refs.canvas;if(!i)return;this.showCanvas(!0);const e=i.getContext("2d"),r=i.width,h=i.height;e.setTransform(1,0,0,1,0,0),e.fillStyle=this.component.backgroundColor||"rgb(245,245,235)",e.fillRect(0,0,r,h),this.showCanvas(!0),this.signaturePad.clear();const S="cursive";let n=48,d=`italic ${n}px '${S}', cursive`;e.font=d;let x=e.measureText(s).width;const k=r*.85,C=h*.65;if(x>k||n>C){const y=k/x,v=C/n,F=Math.min(y,v);n=Math.floor(n*F),n<12&&(n=12),d=`italic ${n}px '${S}', cursive`}try{await Promise.race([document.fonts.load(d,s),new Promise((y,v)=>setTimeout(()=>v("timeout"),1500))])}catch(y){logger.warn("[TF_SDK:60] \u26A0\uFE0F Font loading timed out or failed, using fallback.")}e.fillStyle=this.component.backgroundColor||"rgb(245,245,235)",e.fillRect(0,0,r,h),e.font=d,e.fillStyle=this.component.penColor||"#1a2e4a",e.textAlign="center",e.textBaseline="middle";const u=r/2,P=h/2;e.fillText(s,u,P);const c=e.measureText(s).width,g=Math.max(4,n*.15),p=u-c/2-g,L=u+c/2+g,l=P+n*.5;e.beginPath(),e.strokeStyle=this.component.penColor||"#1a2e4a",e.lineWidth=Math.max(1,n/24),e.lineCap="round",e.moveTo(p,l);const m=n*.1;e.bezierCurveTo(p+c*.3,l-m,p+c*.7,l+m,L+g/2,l-m/2),e.stroke();const E=i.toDataURL();this.setValue(E),this.refs.padBody&&this.refs.padBody.classList.add("field-has-signature")}detach(){this.observer&&(this.observer.disconnect(),this.observer=null),this.signaturePad&&this.signaturePad.off(),this.signaturePad=null,this.currentWidth=0,super.detach()}getValueAsString(t){return f.isUndefined(t)&&this.inDataTable?"":t?"Yes":"No"}focus(){this.refs.padBody.focus()}setDataToSigaturePad(){this.signaturePad.fromDataURL(this.dataValue,{ratio:1,width:this.refs.canvas.width,height:this.refs.canvas.height})}}o.editForm=I,Formio.Components.addComponent("signature",o)})();</script>
38877
- <script>(function(){const p=Formio.Components.components.textfield;var a="";class l extends p{constructor(t,e,n){super(t,e,n)}static schema(...t){return p.schema({type:"location",label:"Location",input:!0,key:"textfield",inputType:"text",inputFormat:"plain",disabled:!0},...t)}static get builderInfo(){return{title:"Location",group:"premium",icon:"map-marker",weight:50,documentation:"/userguide/#location",schema:l.schema()}}static addTemplate(t,e){Templates.templates[t]=e}get defaultSchema(){return l.schema()}get inputInfo(){const t=super.inputInfo;return t.type="input",this.component.hasOwnProperty("spellcheck")&&(t.attr.spellcheck=this.component.spellcheck),this.component.mask?t.attr.type="password":t.attr.type=this.component.inputType==="password"?"password":"text",t.changeEvent="input",t}get prefix(){if(this.component.type&&this.component.type==="location")return this.renderTemplate("icon",{ref:"icon",className:this.iconClass("map-marker"),styles:"",content:""}).trim()}get emptyValue(){return""}maskValue(t,e={}){if((!t||typeof t!="object")&&(t={value:t,maskName:this.component.inputMasks[0].label}),!t.value){const n=e.noDefault?this.emptyValue:this.defaultValue;t.value=Array.isArray(n)?n[0]:n}return t}normalizeValue(t,e={}){return this.isMultipleMasksField?Array.isArray(t)?super.normalizeValue(t.map(n=>this.maskValue(n,e))):super.normalizeValue(this.maskValue(t,e)):super.normalizeValue(t)}setValueAt(t,e,n={}){if(!this.isMultipleMasksField)return super.setValueAt(t,e,n);e=this.maskValue(e,n);const i=e.value||"",o=this.refs.mask?this.refs.mask[t]:null,r=this.refs.select?this.refs.select[t]:null,s=this.getMaskPattern(e.maskName);if(o&&r&&s)o.value=conformToMask(i,FormioUtils.getInputMask(s)).conformedValue,r.value=e.maskName;else return super.setValueAt(t,i,n)}getValueAt(t){if(!this.isMultipleMasksField)return super.getValueAt(t);const e=this.refs.mask?this.refs.mask[t]:null,n=this.refs.select?this.refs.select[t]:null;return{value:e?e.value:void 0,maskName:n?n.value:void 0}}isEmpty(t=this.dataValue){return this.isMultipleMasksField?super.isEmpty(t)||(this.component.multiple?t.length===0:!t.maskName||!t.value):super.isEmpty((t||"").toString().trim())}render(){return super.render(this.renderTemplate("input",{prefix:this.prefix,input:this.inputInfo}))}attach(t){this.loadRefs(t,{prefix:"icon"}),this.input=this.refs.prefix[0];let e=this;return this.input&&this.addEventListener(this.input,"click",n=>{setTimeout(()=>{$("#"+e.id+" :input").each(function(o){a=this.id,window.compId=a,logger.info("[TF_SDK:48] \u2705 id ="+a)});let i=new CustomEvent("getLocation",{detail:{compObj:e,controlId:a}});document.dispatchEvent(i)},200)}),this.addShortcut(this.input),super.attach(t)}}document.addEventListener("setLocationFromApp",u=>{logger.info("[TF_SDK:49] \u2705 ");const t=u.detail||{},e=t.componentID||t.controlId||t.data&&t.data.controlId,n=typeof t.data=="string"?t.data:t.location||t.data&&t.data.location;if(e&&n){if(logger.info("[TF_SDK:50] \u2705 setLocationFromApp received",{rawId:e,rawData:n}),!window.formObj){logger.error("[TF_SDK:51] \u274C formObj is not initialized");return}let i=e.split("-"),o=i[0],r=i[1],s=window.formObj.getComponentById(o);!s&&r&&(logger.warn(`[TF_SDK:52] \u2705 Component not found by ID (${o}), trying Key (${r})...`),s=window.formObj.getComponent(r)),s?(logger.info("[TF_SDK:53] \u2705 Component found, setting value:",n),s.setValue(n)):logger.warn("[TF_SDK:54] \u26A0\uFE0F Could not find component for ID/Key:",e)}},!1),Formio.registerComponent("location",l)})();</script>
38878
- <script>(function(){const p=Formio.Components.components.textfield;var i="";class a extends p{constructor(e,n,t){super(e,n,t)}static schema(...e){return p.schema({type:"barcode",label:"Barcode",input:!0,key:"textfield",inputType:"text",inputFormat:"plain",barcodeDataField:!0},...e)}static get builderInfo(){return{title:"Barcode",group:"premium",icon:"barcode",weight:40,documentation:"http://help.form.io/userguide/#textfield",schema:a.schema()}}static addTemplate(e,n){Templates.templates[e]=n}get defaultSchema(){return a.schema()}get inputInfo(){const e=super.inputInfo;return e.type="input",this.component.hasOwnProperty("spellcheck")&&(e.attr.spellcheck=this.component.spellcheck),this.component.mask?e.attr.type="password":e.attr.type=this.component.inputType==="password"?"password":"text",e.changeEvent="input",e}get prefix(){if(this.component.type&&this.component.type==="barcode")return this.renderTemplate("icon",{ref:"icon",className:this.iconClass("barcode"),styles:"",content:""}).trim()}render(){return super.render(this.renderTemplate("input",{prefix:this.prefix,input:this.inputInfo}))}attach(e){let n=super.attach(e);this.loadRefs(e,{prefix:"icon"}),this.input=this.refs.prefix[0];let t=this;return this.input&&this.addEventListener(this.input,"click",s=>{setTimeout(()=>{$("#"+t.id+" :input").each(function(c){i=this.id,window.compId=i,logger.info("[TF_SDK:42] \u2705 id ="+i)});let r=new CustomEvent("openBarcode",{detail:{compObj:t,controlId:i}});document.dispatchEvent(r)},200)}),this.addShortcut(this.input),n}}document.addEventListener("barcodeScannedData",d=>{const e=d.detail||{},n=e.componentID||e.controlId||e.data&&e.data.controlId,t=e.scannedData||e.data||e.data&&e.data.scannedData;if(n&&t){if(logger.info("[TF_SDK:43] \u2705 barcodeScannedData received",{rawId:n,rawData:t}),!window.formObj){logger.error("[TF_SDK:44] \u274C formObj is not initialized");return}let s=n.split("-"),r=s[0],c=s[1],o=window.formObj.getComponentById(r);!o&&c&&(logger.warn(`[TF_SDK:45] \u2705 Component not found by ID (${r}), trying Key (${c})...`),o=window.formObj.getComponent(c)),o?(logger.info("[TF_SDK:46] \u2705 Component found, setting value:",t),o.setValue(t),o.component&&o.component.publishEvents&&o.component.eventName&&(o.events.emit(o.component.eventName,t),document.dispatchEvent(new CustomEvent(o.component.eventName,{detail:{scannedData:t}})))):logger.warn("[TF_SDK:47] \u26A0\uFE0F Could not find component for ID/Key:",n)}},!1),Formio.Components.addComponent("barcode",a)})();</script>
38940
+ <script>(function(){const l=Formio.Components.components.textfield;class a extends l{constructor(t,n,e){super(t,n,e)}static schema(...t){return l.schema({type:"location",label:"Location",input:!0,key:"location",inputType:"text",inputFormat:"plain",disabled:!0},...t)}static get builderInfo(){return{title:"Location",group:"premium",icon:"map-marker",weight:50,documentation:"/userguide/#location",schema:a.schema()}}get defaultSchema(){return a.schema()}get inputInfo(){const t=super.inputInfo;return t.type="input",Object.prototype.hasOwnProperty.call(this.component,"spellcheck")&&(t.attr.spellcheck=this.component.spellcheck),this.component.mask?t.attr.type="password":t.attr.type=this.component.inputType==="password"?"password":"text",t.changeEvent="input",t}get prefix(){return this.component.type==="location"?this.renderTemplate("icon",{ref:"icon",className:this.iconClass("map-marker"),styles:"",content:""}).trim():super.prefix||""}get emptyValue(){return""}maskValue(t,n={}){if((!t||typeof t!="object")&&(t={value:t,maskName:this.component.inputMasks?this.component.inputMasks[0].label:""}),!t.value){const e=n.noDefault?this.emptyValue:this.defaultValue;t.value=Array.isArray(e)?e[0]:e}return t}normalizeValue(t,n={}){return this.isMultipleMasksField?Array.isArray(t)?super.normalizeValue(t.map(e=>this.maskValue(e,n))):super.normalizeValue(this.maskValue(t,n)):super.normalizeValue(t)}setValueAt(t,n,e={}){if(!this.isMultipleMasksField)return super.setValueAt(t,n,e);n=this.maskValue(n,e);const s=n.value||"",i=this.refs.mask?this.refs.mask[t]:null,r=this.refs.select?this.refs.select[t]:null,o=this.getMaskPattern(n.maskName);if(i&&r&&o)i.value=conformToMask(s,FormioUtils.getInputMask(o)).conformedValue,r.value=n.maskName;else return super.setValueAt(t,s,e)}getValueAt(t){if(!this.isMultipleMasksField)return super.getValueAt(t);const n=this.refs.mask?this.refs.mask[t]:null,e=this.refs.select?this.refs.select[t]:null;return{value:n?n.value:void 0,maskName:e?e.value:void 0}}isEmpty(t=this.dataValue){return this.isMultipleMasksField?super.isEmpty(t)||(this.component.multiple?t.length===0:!t.maskName||!t.value):super.isEmpty((t||"").toString().trim())}render(){return super.render(this.renderTemplate("input",{prefix:this.prefix,input:this.inputInfo}))}attach(t){const n=super.attach(t);this.loadRefs(t,{prefix:"icon"});const e=this.refs.prefix&&this.refs.prefix[0];return e&&this.addEventListener(e,"click",()=>{const s=this.element?this.element.querySelector("input"):null,i=s&&s.id?s.id:this.id?`${this.id}-${this.key}`:this.key;window.compId=i,logger.info("[TF_SDK:48] \u2705 Requesting location for controlId:",i);const r=new CustomEvent("getLocation",{detail:{compObj:this,controlId:i}});document.dispatchEvent(r)}),e&&this.addShortcut(e),n}}document.addEventListener("setLocationFromApp",p=>{const t=p.detail||{},n=t.componentID||t.controlId||t.data&&t.data.controlId,e=typeof t.data=="string"?t.data:t.location||t.data&&t.data.location;if(n&&e){if(logger.info("[TF_SDK:50] \u2705 setLocationFromApp received",{rawId:n,rawData:e}),!window.formObj){logger.error("[TF_SDK:51] \u274C formObj is not initialized");return}const s=n.split("-"),i=s[0],r=s[1];let o=window.formObj.getComponentById(i);!o&&r&&(logger.warn(`[TF_SDK:52] \u2705 Component not found by ID (${i}), trying Key (${r})...`),o=window.formObj.getComponent(r)),!o&&n&&(o=window.formObj.getComponent(n)),o?(logger.info("[TF_SDK:53] \u2705 Component found, setting location value:",e),o.setValue(e),o.component&&o.component.publishEvents&&o.component.eventName&&(o.events.emit(o.component.eventName,e),document.dispatchEvent(new CustomEvent(o.component.eventName,{detail:{locationData:e}})))):logger.warn("[TF_SDK:54] \u26A0\uFE0F Could not find component for ID/Key:",n)}},!1),Formio.registerComponent("location",a)})();</script>
38941
+ <script>(function(){const s=Formio.Components.components.textfield;class c extends s{constructor(e,o,t){super(e,o,t)}static schema(...e){return s.schema({type:"barcode",label:"Barcode",input:!0,key:"barcode",inputType:"text",inputFormat:"plain",barcodeDataField:!0},...e)}static get builderInfo(){return{title:"Barcode",group:"premium",icon:"barcode",weight:40,documentation:"http://help.form.io/userguide/#textfield",schema:c.schema()}}get defaultSchema(){return c.schema()}get inputInfo(){const e=super.inputInfo;return e.type="input",Object.prototype.hasOwnProperty.call(this.component,"spellcheck")&&(e.attr.spellcheck=this.component.spellcheck),this.component.mask?e.attr.type="password":e.attr.type=this.component.inputType==="password"?"password":"text",e.changeEvent="input",e}get prefix(){return this.component.type==="barcode"?this.renderTemplate("icon",{ref:"icon",className:this.iconClass("barcode"),styles:"",content:""}).trim():super.prefix||""}render(){return super.render(this.renderTemplate("input",{prefix:this.prefix,input:this.inputInfo}))}attach(e){const o=super.attach(e);this.loadRefs(e,{prefix:"icon"});const t=this.refs.prefix&&this.refs.prefix[0];return t&&this.addEventListener(t,"click",()=>{const i=this.element?this.element.querySelector("input"):null,r=i&&i.id?i.id:this.id?`${this.id}-${this.key}`:this.key;window.compId=r,logger.info("[TF_SDK:42] \u2705 Opening barcode scanner for controlId:",r);const a=new CustomEvent("openBarcode",{detail:{compObj:this,controlId:r}});document.dispatchEvent(a)}),t&&this.addShortcut(t),o}}document.addEventListener("barcodeScannedData",d=>{const e=d.detail||{},o=e.componentID||e.controlId||e.data&&e.data.controlId,t=e.scannedData||e.data||e.data&&e.data.scannedData;if(o&&t){if(logger.info("[TF_SDK:43] \u2705 barcodeScannedData received",{rawId:o,rawData:t}),!window.formObj){logger.error("[TF_SDK:44] \u274C formObj is not initialized");return}const i=o.split("-"),r=i[0],a=i[1];let n=window.formObj.getComponentById(r);!n&&a&&(logger.warn(`[TF_SDK:45] \u2705 Component not found by ID (${r}), trying Key (${a})...`),n=window.formObj.getComponent(a)),!n&&o&&(n=window.formObj.getComponent(o)),n?(logger.info("[TF_SDK:46] \u2705 Component found, setting scanned value:",t),n.setValue(t),n.component&&n.component.publishEvents&&n.component.eventName&&(n.events.emit(n.component.eventName,t),document.dispatchEvent(new CustomEvent(n.component.eventName,{detail:{scannedData:t}})))):logger.warn("[TF_SDK:47] \u26A0\uFE0F Could not find component for ID/Key:",o)}},!1),Formio.Components.addComponent("barcode",c)})();</script>
38879
38942
  <script>(function(){(function(l,h){typeof exports=="object"&&typeof module!="undefined"?module.exports=h():typeof define=="function"&&define.amd?define(h):l.ResizeObserver=h()})(this,function(){"use strict";var l=function(){if(typeof Map!="undefined")return Map;function e(t,n){var r=-1;return t.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(r){var i=e(this.__entries__,r),o=this.__entries__[i];return o&&o[1]},t.prototype.set=function(r,i){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=i:this.__entries__.push([r,i])},t.prototype.delete=function(r){var i=this.__entries__,o=e(i,r);~o&&i.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,i){var o=this;i===void 0&&(i=null);for(var s=0,u=o.__entries__;s<u.length;s+=1){var c=u[s];r.call(i,c[1],c[0])}},Object.defineProperties(t.prototype,n),t}()}(),h=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,v=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),M=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(v):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),x=2,A=function(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&u()}function s(){M(o)}function u(){var c=Date.now();if(n){if(c-i<x)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=c}return u},T=20,z=["top","right","bottom","left","width","height","size","weight"],C=typeof MutationObserver!="undefined",a=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=A(this.refresh.bind(this),T)};a.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},a.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},a.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},a.prototype.updateObservers_=function(){var e=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return e.forEach(function(t){return t.broadcastActive()}),e.length>0},a.prototype.connect_=function(){!h||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),C?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},a.prototype.disconnect_=function(){!h||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},a.prototype.onTransitionEnd_=function(e){var t=e.propertyName;t===void 0&&(t="");var n=z.some(function(r){return!!~t.indexOf(r)});n&&this.refresh()},a.getInstance=function(){return this.instance_||(this.instance_=new a),this.instance_},a.instance_=null;var y=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},d=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||v},g=_(0,0,0,0);function p(e){return parseFloat(e)||0}function w(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return t.reduce(function(r,i){var o=e["border-"+i+"-width"];return r+p(o)},0)}function S(e){for(var t=["top","right","bottom","left"],n={},r=0,i=t;r<i.length;r+=1){var o=i[r],s=e["padding-"+o];n[o]=p(s)}return n}function D(e){var t=e.getBBox();return _(0,0,t.width,t.height)}function G(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return g;var r=d(e).getComputedStyle(e),i=S(r),o=i.left+i.right,s=i.top+i.bottom,u=p(r.width),c=p(r.height);if(r.boxSizing==="border-box"&&(Math.round(u+o)!==t&&(u-=w(r,"left","right")+o),Math.round(c+s)!==n&&(c-=w(r,"top","bottom")+s)),!j(e)){var E=Math.round(u+o)-t,R=Math.round(c+s)-n;Math.abs(E)!==1&&(u-=E),Math.abs(R)!==1&&(c-=R)}return _(i.left,i.top,u,c)}var L=function(){return typeof SVGGraphicsElement!="undefined"?function(e){return e instanceof d(e).SVGGraphicsElement}:function(e){return e instanceof d(e).SVGElement&&typeof e.getBBox=="function"}}();function j(e){return e===d(e).document.documentElement}function P(e){return h?L(e)?D(e):G(e):g}function W(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,s=Object.create(o.prototype);return y(s,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),s}function _(e,t,n,r){return{x:e,y:t,width:n,height:r}}var m=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_(0,0,0,0),this.target=e};m.prototype.isActive=function(){var e=P(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},m.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var F=function(e,t){var n=W(t);y(this,{target:e,contentRect:n})},f=function(e,t,n){if(this.activeObservations_=[],this.observations_=new l,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n};f.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new m(e)),this.controller_.addObserver(this),this.controller_.refresh())}},f.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},f.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},f.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},f.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(n){return new F(n.target,n.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},f.prototype.clearActive=function(){this.activeObservations_.splice(0)},f.prototype.hasActive=function(){return this.activeObservations_.length>0};var O=typeof WeakMap!="undefined"?new WeakMap:new l,b=function(e){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=a.getInstance(),n=new f(e,t,this);O.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){b.prototype[e]=function(){return(t=O.get(this))[e].apply(t,arguments);var t}});var H=function(){return typeof v.ResizeObserver!="undefined"?v.ResizeObserver:(v.ResizeObserver=b,b)}();return H})})();</script>
38880
38943
 
38881
38944
  <script>(function(){function w(y="Do you want to save the data?",h=[],g=""){const s=o=>{const i=window.__unviredThemeData;if(!i||!o)return;const f={primaryColor:"--tf-primary-color",secondaryColor:"--tf-secondary-color",labelColor:"--tf-app-label-color",fontSize:"--tf-app-font-size-base",fontFamily:"--tf-app-font-family",backgroundColor:"--tf-app-bg-color",backgroundImage:"--tf-app-bg-image",cardBackground:"--tf-app-card-bg",headerBackground:"--tf-app-header-bg",borderColor:"--tf-border-color"};Object.keys(f).forEach(r=>{if(i[r]){let e=i[r];(r==="appBackgroundImage"||r==="backgroundImage")&&e&&!e.startsWith("url(")&&e!=="none"&&(e=`url(${e})`),r==="fontSize"&&typeof e=="number"&&(e=`${e}px`),o.style.setProperty(f[r],e,"important")}});const n=i.primaryColor||i.sdktheme;if(n&&n.startsWith("#")&&n.length===7){const r=parseInt(n.slice(1,3),16),e=parseInt(n.slice(3,5),16),C=parseInt(n.slice(5,7),16);o.style.setProperty("--tf-primary-color-transparent",`rgba(${r}, ${e}, ${C}, 0.12)`,"important")}};if(!document.getElementById("custom-bootstrap-modal-css")){const o=document.createElement("style");o.id="custom-bootstrap-modal-css",o.textContent=`
@@ -38999,7 +39062,7 @@ Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on
38999
39062
  </div>
39000
39063
  `,p=document.createElement("div");p.innerHTML=d.trim();const a=p.firstChild;s.appendChild(a);const u=setTimeout(()=>{a.parentNode&&(a.classList.remove("show"),a.style.transition="opacity 0.5s ease",a.style.opacity="0",setTimeout(()=>{a.parentNode&&a.remove()},500))},g),m=a.querySelector(".btn-close");m&&(m.onclick=()=>{clearTimeout(u),a.remove()})}window.showDynamicModal=w,window.showToast=x})();</script>
39001
39064
  <script>(function(){let v=!1,l=null;const g=window.innerHeight;function u(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1||!!(window.platform&&window.platform.iosPlatform)}logger.info("[TF_SDK:254] \u2705 Focus script initialized. Initial Height:",g,"isIOS:",u());function h(o){if(o&&o.target&&o.target.closest&&o.target.closest(".flatpickr-calendar"))return;document.querySelector(".flatpickr-calendar.open, .flatpickr-calendar.show")&&(document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),document.querySelectorAll("input").forEach(n=>{n._flatpickr&&typeof n._flatpickr.close=="function"&&n._flatpickr.close()}),document.body.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})))}window.addEventListener("scroll",h,!0),window.addEventListener("wheel",h,{capture:!0,passive:!0}),window.addEventListener("touchmove",h,{capture:!0,passive:!0});function w(o){if(!u())return;const e=document.getElementById("sticky-footer");e&&(o?e.style.display="none":e.style.display="flex")}function a(){if(!u()||!l)return;const o=l.closest(".formio-component")||l,e=window.visualViewport?window.visualViewport.height:window.innerHeight,n=o.getBoundingClientRect(),r=o.querySelector(".choices__list--dropdown.is-active, .choices__list--dropdown"),d=!!(r||o.querySelector(".choices")),s=d&&r?Math.max(140,r.offsetHeight||140):0,t=n.bottom+s>e-15,i=n.top<0;if(!t&&!i)return;if(typeof o.scrollIntoView=="function"){const m=d&&t?"center":"nearest";o.scrollIntoView({behavior:"smooth",block:m,inline:"nearest"})}const f=document.getElementById("formio-wrapper");if(f&&f.scrollHeight>f.clientHeight){let m=0,c=o;for(;c&&c!==f&&c!==null;)m+=c.offsetTop,c=c.offsetParent;if(t){const E=m-(e-o.offsetHeight-s-20);f.scrollTo({top:Math.max(0,E),behavior:"smooth"})}else i&&f.scrollTo({top:Math.max(0,m-20),behavior:"smooth"})}}document.addEventListener("focusin",o=>{if(!u())return;const e=o.target;if(!(!e||!["INPUT","TEXTAREA","SELECT"].includes(e.tagName))){if(w(!0),l=e,e.classList.contains("choices__input")||e.closest(".choices")){const n=e.closest(".choices")||e.closest(".formio-component-barcodeselect")||e.closest(".formio-component-select");n&&(l=n)}setTimeout(a,100),setTimeout(a,350)}}),document.addEventListener("focusout",o=>{u()&&setTimeout(()=>{const e=document.activeElement;!(e&&["INPUT","TEXTAREA","SELECT"].includes(e.tagName))&&!v&&w(!1)},250)}),window.visualViewport&&window.visualViewport.addEventListener("resize",()=>{if(!u())return;const e=window.visualViewport.height;e<g-60||e<screen.height-150?(v=!0,w(!0),l&&(setTimeout(a,150),setTimeout(a,350))):(v=!1,w(!1))}),document.addEventListener("showDropdown",o=>{if(!u())return;const e=o.target,n=e&&e.closest?e.closest(".formio-component-barcodeselect, .formio-component-select, .formio-component")||e:l;n&&(l=n,setTimeout(a,50),setTimeout(a,200),setTimeout(a,400))},!0),document.addEventListener("hideDropdown",()=>{u()&&setTimeout(a,80)},!0),document.addEventListener("FormRenderingComplete",()=>{const o=window.formObj;if(!o)return;let e=0;const n=setInterval(()=>{if(e++,e>8){clearInterval(n);return}let r=null;function d(s){if(!s)return null;for(let p=0;p<s.length;p++){const t=s[p];if(t){if(t.component&&t.component.autofocus){if(t.refs&&t.refs.input&&t.refs.input[0])return t.refs.input[0];if(t.element){const i=t.element.querySelector('input:not([type="hidden"]), textarea, select');if(i)return i}}if(t.components&&Array.isArray(t.components)){const i=d(t.components);if(i)return i}if(t.subForm&&t.subForm.components&&Array.isArray(t.subForm.components)){const i=d(t.subForm.components);if(i)return i}if(t.rows&&Array.isArray(t.rows))for(let i=0;i<t.rows.length;i++){const f=t.rows[i],m=Object.values(f||{}),c=d(m);if(c)return c}}}return null}if(r=d(o.components),r)if(document.activeElement!==r){if(logger.info(`[TF_SDK:262] \u2705 Forcing focus on schema-defined autofocus element (Attempt ${e})`),r.focus(),r.setSelectionRange&&r.value){const s=r.value.length;try{r.blur(),r.focus(),r.setSelectionRange(s,s)}catch(p){}}}else clearInterval(n)},500)})})();</script>
39002
- <script>(function(){var d=null,_=null,ne;let v=[],T=0,k=!1;function L(){sendEventCallback({type:FORM_EVENTS.BACK_NAVIGATION,message:"Back navigation triggered.",data:{}})}function W(e,t){var c,f;const o=document.getElementById("saveBtn"),n=document.getElementById("submitBtn"),r=document.getElementById("prevBtn"),i=document.getElementById("nextBtn"),l=document.getElementById("completeOption"),m=document.getElementById("saveOption"),p=document.getElementById("completeDivider"),y=document.getElementById("saveDivider");if(!o||!n)return;const s=e===!0||e==="true",g=e===!1||e==="false",u=String(t||"").toLowerCase(),a=(h,w,E)=>{h&&(E?h.style.setProperty("display","flex","important"):h.style.setProperty("display","none","important")),w&&(E?w.style.setProperty("display","block","important"):w.style.setProperty("display","none","important"))};a(l,p,!1),a(m,y,!1),u==="read"?(o.style.display="none",n.style.display="none"):g&&u==="writemultiple"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,a(l,p,!1),a(m,y,!1)):g&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0):s&&u==="writemultiple"?((c=window.__unviredFormsOptions)==null?void 0:c.showCompleteAlways)===!0||((f=window.__unviredFormsOptions)==null?void 0:f.showCompleteAlways)==="true"?(o.style.display="",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',o.disabled=!0,n.disabled=!0,a(l,p,!1),a(m,y,!1)):(o.style.display="",n.style.display="none",o.disabled=!0,a(l,p,!1)):s&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,a(m,y,!0)):(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}function U(e,t,o,n){var C,F,O,A;const r=document.getElementById("saveBtn"),i=document.getElementById("submitBtn"),l=document.getElementById("prevBtn"),m=document.getElementById("nextBtn");if(!r||!i)return;const p=o===!0||o==="true",y=o===!1||o==="false",s=String(n||"").toLowerCase(),g=document.getElementById("completeOption"),u=document.getElementById("saveOption"),a=document.getElementById("completeDivider"),c=document.getElementById("saveDivider"),f=(b,M,D)=>{b&&(D?b.style.setProperty("display","flex","important"):b.style.setProperty("display","none","important")),M&&(D?M.style.setProperty("display","block","important"):M.style.setProperty("display","none","important"))},h=Object.values(t||{}).some(b=>b!=null&&b!==""&&b!==!1&&!(Array.isArray(b)&&b.length===0)&&!(typeof b=="object"&&!Array.isArray(b)&&Object.keys(b).length===0)),w=e>=100,E=((C=window.__unviredFormsOptions)==null?void 0:C.requireCompleteForm)!==!1&&((F=window.__unviredFormsOptions)==null?void 0:F.requireCompleteForm)!=="false";if(s==="read"){r.style.display="none",i.style.display="none";return}if(p&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(u,c,!0),f(g,a,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(p&&s==="writemultiple"){((O=window.__unviredFormsOptions)==null?void 0:O.showCompleteAlways)===!0||((A=window.__unviredFormsOptions)==null?void 0:A.showCompleteAlways)==="true"?(r.style.display="",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',r.disabled=!h,i.disabled=!1,f(g,a,!1),f(u,c,!1)):w?(r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(u,c,!0),f(g,a,!1)):h?(r.style.display="",i.style.display="none",r.disabled=!1,f(g,a,!0),f(u,c,!1)):(r.style.display="",i.style.display="none",r.disabled=!0,f(g,a,!1),f(u,c,!1)),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writemultiple"){r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(g,a,!1),f(u,c,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(g,a,!1),f(u,c,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}r.style.display="none",i.style.display="",i.disabled=!1,typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}async function z(e,t,o,n,r,i,l,m,p,y){if(window.CURRENT_VIEW!=="comments"){if(H(),logger.info("[TF_SDK:296] \u2705 loadTRform() entered",{mode:n,permission:p,privateExternal:m,language:r}),v=y,typeof Formio=="undefined"){logger.error("[TF_SDK:297] \u274C Formio library not loaded"),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 016, Formio library not loaded",data:{reason:"Formio library not loaded"}});return}try{if(logger.info("[TF_SDK:297] \u2705 Initializing loadTRform"),typeof Formio!="undefined"&&Formio.Components&&Formio.Components.components&&Formio.Components.components.component){const c=Formio.Components.components.component;if(!c._requiredFixApplied){c._requiredFixApplied=!0;const f=c.prototype.setCustomValidity;c.prototype.setCustomValidity=function(w,E,C){var F,O,A,b;if(typeof w=="string"&&(w.trim().toLowerCase()==="required"||w.includes("{{field}}"))){const M=(O=(F=this.component)==null?void 0:F.validate)==null?void 0:O.customMessage,D=((A=this.component)==null?void 0:A.errorLabel)||((b=this.component)==null?void 0:b.label)||this.key||"Field";w=M||`${D} is required`}if(f)return f.call(this,w,E,C)};const h=c.prototype.t;c.prototype.t=function(w,E){var C,F,O,A;if(typeof w=="string"&&w.trim().toLowerCase()==="required"){const b=(F=(C=this.component)==null?void 0:C.validate)==null?void 0:F.customMessage;return b||`${(E==null?void 0:E.field)||((O=this.component)==null?void 0:O.errorLabel)||((A=this.component)==null?void 0:A.label)||this.key||"Field"} is required`}return h?h.apply(this,arguments):w}}}let s={noAlerts:!0,scroll:!1,language:window.FORMIO_LANGUAGE||"en",i18n:window.FORMIO_I18N};if(W(m,p),n=="form")s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;else if(n=="pdf"||n=="print"){s.readOnly=!0,s.flatten=!0,s.renderMode="flat",s.viewHtml=!0;const c=document.querySelector(".progress-container");c&&(c.style.display="none")}else if(n=="readOnly"||p=="read"){s.readOnly=!0,s.flatten=!1,s.viewHtml=!1;const c=document.querySelector(".progress-container");c&&(c.style.display="none");const f=document.getElementById("sticky-footer");f&&window.CURRENT_VIEW!=="comments"&&(f.style.display="none")}else s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;const g=document.getElementById("formio");if(!g)throw new Error("DOM Element #formio not found");logger.info("[TF_SDK:298] \u2705 Creating Formio form...",e);try{d=await Formio.createForm(g,e,s)}catch(c){throw logger.error("[TF_SDK:298-ERR] \u274C Error in Formio.createForm:",c),c}let u=!1;if(d.on("change",()=>{if(!u){if(!_)try{_=JSON.parse(JSON.stringify(d.getValue().data))}catch(c){_=d.getValue().data}u=!0}}),document.dispatchEvent(new CustomEvent("LessRenderingComplete")),window.formObj=d,window.FORMIO_I18N&&Object.keys(window.FORMIO_I18N).length>0){const c=document.getElementById("languageSubMenu"),f=document.getElementById("languageMainOption"),h=document.getElementById("languageDivider");if(c&&f){c.innerHTML="";let w=Object.keys(window.FORMIO_I18N).filter(F=>typeof window.FORMIO_I18N[F]=="object"&&window.FORMIO_I18N[F]!==null);const E=window.FORMIO_LANGUAGE||"en";!w.includes(E)&&typeof window.FORMIO_I18N[E]=="object"&&w.unshift(E);let C=null;try{window.Intl&&typeof Intl.DisplayNames=="function"&&(C=new Intl.DisplayNames(["en"],{type:"language"}))}catch(F){logger.warn("Intl.DisplayNames not supported",F)}w.forEach(F=>{const O=document.createElement("div");O.className=f.className,O.style.cursor="pointer",O.style.padding="0.5rem 1rem",O.style.borderTop="none";let A=F.toUpperCase();try{A=C.of(F)||A}catch(M){}let b=F===E?'<i class="bi bi-check2 text-primary" style="margin-right: 8px;"></i>':'<i class="bi bi-check2" style="margin-right: 8px; visibility: hidden;"></i>';f.innerHTML.includes("icon chevron")&&(b=F===E?'<i class="icon check" style="margin-right: 8px;"></i>':'<i class="icon check" style="margin-right: 8px; visibility: hidden;"></i>'),O.innerHTML=`${b}${A}`,O.onclick=function(M){M.stopPropagation(),window.changeFormLanguage&&(window.changeFormLanguage(F),window.FORMIO_LANGUAGE=F);const D=c.children;for(let N=0;N<D.length;N++){const S=D[N].querySelector("i");S&&(w[N]===F?(S.style.visibility="visible",S.className.includes("bi")&&S.classList.add("text-primary")):(S.style.visibility="hidden",S.className.includes("bi")&&S.classList.remove("text-primary")))}window.toggleLanguageSubMenu&&window.toggleLanguageSubMenu(),window.showToast&&window.showToast(`Language set to ${A}`,"success")},c.appendChild(O)}),w.length>1?(f.style.display=f.className.includes("d-flex")?"flex":"block",h&&(h.style.display="block")):(f.style.display="none",h&&(h.style.display="none"))}}else{const c=document.getElementById("languageMainOption"),f=document.getElementById("languageDivider");c&&(c.style.display="none"),f&&(f.style.display="none")}if(!d){logger.error("[TF_SDK:299] \u274C Form not initialized.");return}const a=()=>{['button[type="submit"]',".formio-component-submit"].forEach(h=>{d.element.querySelectorAll(h).forEach(E=>{E.style.display="none"})}),d.element.querySelectorAll('input:not([type="file"]), textarea').forEach(h=>{h.getAttribute("autocomplete")!=="new-password"&&(h.setAttribute("autocomplete","new-password"),h.setAttribute("data-lpignore","true"),h.setAttribute("spellcheck","false"))})};a(),d.on("render",a),Q(m,p),d.formReady.then(()=>{if(logger.info("[TF_SDK:300] \u2705 formReady.then() triggered"),typeof window.initializeWizardLogic=="function"&&window.initializeWizardLogic(d,m,p),t?(logger.info("[TF_SDK:301] \u2705 Previous form data found:",t),d.submission={data:typeof t=="string"?JSON.parse(t):t},logger.info("[TF_SDK:302] \u2705 Previous submission data applied")):logger.info("[TF_SDK:303] \u2705 No previous form data found"),logger.info("[TF_SDK:304] \u2705 Calculating initial progress..."),executeProgressCalculation(m,p),logger.info("[TF_SDK:305] \u2705 Progress calculation completed"),n=="readOnly"){logger.info("[TF_SDK:306] \u2705 ReadOnly mode detected");const w=document.querySelectorAll(".formio-component-submit");logger.info(`[TF_SDK:307] \u2705 Found ${w.length} submit components`),w.forEach((E,C)=>{E.style.display="none",logger.info(`[TF_SDK:308] \u2705 Hidden submit component ${C+1}`)})}else logger.info("[TF_SDK:309] \u2705 Editable mode detected");logger.info("[TF_SDK:310] \u2705 Sending FORM_RENDER callback..."),sendEventCallback({type:FORM_EVENTS.FORM_RENDER,message:"Success: Form rendered successfully.",data:{submissionData:t,formTemplate:e}}),logger.info("[TF_SDK:311] \u2705 FORM_RENDER callback sent");const c=document.getElementById("sdk-form-loader");c?(logger.info("[TF_SDK:312] \u2705 Loader found, hiding..."),c.classList.add("hidden"),logger.info("[TF_SDK:313] \u2705 Loader hidden")):logger.warn("[TF_SDK:314] \u2705 Loader element not found"),document.querySelectorAll(".tf-form-loading").forEach(w=>w.classList.remove("tf-form-loading")),logger.info("[TF_SDK:315] \u2705 Dispatching FormRenderingComplete event...");let f=0;typeof window.getMaxTableWidth=="function"&&(f=window.getMaxTableWidth(document.getElementById("formio")||document.querySelector(".tf-embed-sdk")||document.body).maxWidth),sendEventCallback({type:FORM_EVENTS.FORM_LOADED,message:"Success: Form rendered complete.",data:{maxTableWidth:`${f}px`}}),document.dispatchEvent(new CustomEvent("FormRenderingComplete",{detail:{timestamp:new Date().toISOString(),status:"success",maxTableWidth:f}})),logger.info("[TF_SDK:316] \u2705 FormRenderingComplete event dispatched successfully");const h=document.querySelector('input[type="file"]');h?(h.setAttribute("accept","*/*"),logger.info("[TF_SDK:317] \u2705 File input found, accept=*/* applied")):logger.info("[TF_SDK:318] \u2705 No file input found"),logger.info("[TF_SDK:319] \u2705 Full formReady process completed")}).catch(c=>{logger.error("[TF_SDK:320] \u274C formReady.then() failed:",c)})}catch(s){logger.error("[TF_SDK:321] \u274C Error creating form (after retries):",s?s.message:"Unknown error",s?s.stack:"");const g=document.getElementById("sdk-form-loader");g&&g.classList.add("hidden"),document.querySelectorAll(".tf-form-loading").forEach(u=>u.classList.remove("tf-form-loading")),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 005, Formio not rendered the forms",data:{reason:"Failed to render form after retries",technicalError:s}})}}}let B=null,V=null,I=null;function G(){if(I)return I;if(!d)return[];const e=[];function t(o,n=""){Array.isArray(o)&&o.forEach(r=>{var y;if(!r)return;const i=r.component||r;let l=n;if(["columns","panel","fieldset","well","table","tabs","content","htmlelement"].includes(i.type)||(l=n?`${n}.${i.key}`:i.key),["textfield","textarea","number","checkbox","radio","select","selectboxes","email","url","day","datetime","file","datamap","tree","survey","signature","datagrid","editgrid","container"].includes(i.type)&&((y=i.validate)!=null&&y.required)&&e.push({key:i.key,type:i.type,path:l,comp:i,instance:r}),Array.isArray(r.components)&&t(r.components,l),i.type==="form"){let s=l?`${l}.data`:"data";r.subForm&&Array.isArray(r.subForm.components)?t(r.subForm.components,s):Array.isArray(r.components)&&t(r.components,s)}Array.isArray(r.columns)&&r.columns.forEach(s=>{Array.isArray(s.components)&&t(s.components,l)})})}return t(d.components),I=e,e}window.executeProgressCalculation=function(e,t){if(!d)return;const o=d.data||{},n=JSON.stringify(o);if(!(d&&!!d.wizard)&&n===V)return;V=n;const i=G();let l=i.length,m=0;function p(u,a){if(Array.isArray(a)){if(!(["file","datagrid","editgrid","datamap","selectboxes"].includes(u.type)||u.multiple))return a.length>0&&a.every(h=>p(u,h));if(u.type==="file"&&a.length>0&&Array.isArray(a[0]))return a.every(h=>p(u,h))}switch(u.type){case"selectboxes":return Object.values(a||{}).some(Boolean);case"datamap":case"tree":return a&&Object.keys(a).length>0;case"survey":return u.questions&&Array.isArray(u.questions)?a&&Object.keys(a).length>=u.questions.length:a&&Object.keys(a).length>0;case"file":return Array.isArray(a)&&a.length>0;case"checkbox":return a===!0;case"editgrid":case"datagrid":return Array.isArray(a)&&a.length>0;case"signature":return!!a;default:return u.multiple?Array.isArray(a)&&a.length>0&&a.some(c=>c!=null&&c!==""):a!=null&&a!==""}}const y=[];i.forEach(u=>{let a=!0;u.instance&&(u.instance.visible===!1&&(a=!1),a&&typeof u.instance.checkCondition=="function"&&(u.instance.checkCondition(null,o)||(a=!1))),a&&(u.instance&&u.instance.parent&&u.instance.parent.visible===!1||y.push(u))}),l=y.length,m=0,y.forEach(({key:u,type:a,path:c,comp:f})=>{let h=x(o,c);p(f,h)&&m++});const s=l===0?100:Math.round(m/l*100);logger.info("[TF_SDK:322] \u2705 Progress:",{mandatory:l,filledMandatory:m,completion:s+"%"}),T=s,k=s>=100,U(s,d.data,e,t),typeof window.updateWizardNav=="function"&&window.updateWizardNav(d);const g=document.getElementById("progress-bar");if(g){const u=g.querySelector(".progress"),a=g.querySelector(".badge");u.style.width=`${s}%`,a.textContent=`${s}%`;let c=s;s<=0?(c=.5,u.style.width=`${.5}%`,window.innerWidth>768||window.innerWidth>480?a.style.transform="translateX(2%)":a.style.transform="translateX(1%)"):s>=100?(g.classList.add("complete"),c=99.5,window.innerWidth>768||window.innerWidth>480,a.style.transform="translateX(-100%)"):(g.classList.remove("complete"),a.style.transform="translateX(-50%)"),a.style.left=`${c-.25}%`}};function x(e,t){if(e==null||!t)return;if(t.indexOf(".")===-1)return Array.isArray(e)?e.map(r=>r[t]):e[t];const o=t.split(".");let n=e;for(let r=0;r<o.length;r++){const i=o[r];if(n==null)return;if(Array.isArray(n)){const l=o.slice(r).join(".");return n.map(m=>x(m,l))}n=n[i]}return n}function q(e){if(!e)return!0;let t=e.getValue?e.getValue():e.dataValue;return t==null||t===""||Array.isArray(t)&&(t.length===0||!t.some(n=>!(n==null||n===""||typeof n=="object"&&Object.keys(n).length===0)))||typeof t=="object"&&!Array.isArray(t)&&(Object.keys(t).length===0||!Object.values(t).some(n=>n!=null&&n!==""&&n!==!1))?!0:e.isEmpty?e.isEmpty(t):!1}function J(e,t){var r,i,l,m,p,y;if(!e||!t)return null;if(t.component&&t.component.element)return t.component;const o=t.path||((r=t.context)==null?void 0:r.path)||((i=t.context)==null?void 0:i.hasPath);if(o){let s=typeof e.getComponent=="function"?e.getComponent(o):null;if(s&&s.element)return s;const g=String(o).replace(/\[(\d+)\]/g,".$1");if(s=typeof e.getComponent=="function"?e.getComponent(g):null,s&&s.element)return s;const u=String(o).replace(/\.(\d+)\./g,"[$1].");if(s=typeof e.getComponent=="function"?e.getComponent(u):null,s&&s.element)return s}const n=((m=(l=t.context)==null?void 0:l.component)==null?void 0:m.key)||((p=t.component)==null?void 0:p.key)||(typeof((y=t.context)==null?void 0:y.component)=="string"?t.context.component:null);if(n&&typeof e.getComponent=="function"){const s=e.getComponent(n);if(s&&s.element)return s}return null}function P(e){if(!e||!e.element)return;e.error=null,typeof e.setCustomValidity=="function"&&e.setCustomValidity(""),e.element.classList.remove("has-error","formio-error-wrapper","is-invalid"),e.element.querySelectorAll(".choices__inner, .ui.selection.dropdown, .is-invalid").forEach(n=>{n.closest(".formio-component")===e.element&&n.classList.remove("is-invalid")}),e.element.querySelectorAll(".formio-errors, .invalid-feedback, [ref='messageContainer']").forEach(n=>{n.closest(".formio-component")===e.element&&(n.innerHTML="",n.style.display="none")})}function X(e){!e||typeof e.everyComponent!="function"||e.everyComponent(t=>{var l;if(!t||!t.element)return;const o=((l=t.component)==null?void 0:l.type)||t.type;if(["datagrid","editgrid","container","panel","columns","fieldset","well","tabs","form"].includes(o))return;const r=t.element.classList.contains("has-error")||t.element.classList.contains("formio-error-wrapper"),i=Array.from(t.element.querySelectorAll(".formio-errors, .invalid-feedback")).some(m=>m.style.display!=="none"&&m.innerHTML.trim()!==""&&m.closest(".formio-component")===t.element);(r||i)&&!q(t)&&P(t)})}function Y(e,t){var m,p,y,s;if(!e||!e.element)return;e.element.classList.add("has-error","formio-error-wrapper");const o=e.element.querySelector(".choices__inner, .ui.selection.dropdown");o&&o.closest(".formio-component")===e.element&&o.classList.add("is-invalid");const n=t.message||((p=(m=t.context)==null?void 0:m.component)!=null&&p.label?`${t.context.component.label} is required`:`${((y=e.component)==null?void 0:y.label)||e.key} is required`),i=`e-${e.id||((s=e.component)==null?void 0:s.id)||e.key}-${e.key}`;let l=Array.from(e.element.querySelectorAll(".formio-errors, [ref='messageContainer']")).find(g=>g.closest(".formio-component")===e.element);l?(l.setAttribute("ref","messageContainer"),l.classList.contains("invalid-feedback")||l.classList.add("invalid-feedback")):(l=document.createElement("div"),l.setAttribute("ref","messageContainer"),l.className="formio-errors invalid-feedback",e.element.appendChild(l)),l.innerHTML=`<div id="${i}" class="form-text error">${n}</div>`,l.style.display="block"}function Q(e,t){d&&d.on("change",o=>{var n,r;((r=(n=o.changed)==null?void 0:n.component)==null?void 0:r.type)==="datetime"&&document.activeElement.blur(),X(d),B&&clearTimeout(B),I=null,B=setTimeout(()=>{executeProgressCalculation(e,t)},300)})}function K(e,t=[]){let o={};if(!t||t.length===0||!e)return o;let n=e;if(typeof e=="string")try{n=JSON.parse(e)}catch(i){}const r=i=>{if(!(!i||typeof i!="object"))if(Array.isArray(i))i.forEach(r);else for(const l in i)t.includes(l)?o[l]?Array.isArray(o[l])&&Array.isArray(i[l])&&(o[l]=o[l].concat(i[l])):o[l]=i[l]:typeof i[l]=="object"&&r(i[l])};return r(n),o}function R(e,t=[]){if(!e||typeof e!="object")return e;const o=Array.isArray(e)?[...e]:{...e};for(const n in o){const r=o[n];Array.isArray(r)?t.length>0&&t.includes(n)?o[n]=r.map(i=>i&&typeof i=="object"&&(i.uid||i.id)?i.uid||i.id:i):r.length>0&&r.every(i=>i&&typeof i=="object"&&i.storage==="SmartStorage")?o[n]=r.map(i=>i.id||i.uid||i):o[n]=r.map(i=>typeof i=="object"&&i!==null?R(i,t):i):r&&typeof r=="object"&&(o[n]=R(r,t))}return o}function j(){var r,i;if(!d)return;const e=d.getValue(),t=R(e,v),o=K(e.data,v);if(!(((r=window.__unviredFormsOptions)==null?void 0:r.requireCompleteForm)!==!1&&((i=window.__unviredFormsOptions)==null?void 0:i.requireCompleteForm)!=="false")){showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully (Validation Bypassed).",data:{formData:t,completeFlag:k,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}})}},{label:"No",callback:()=>{}}]);return}d.errors=[],d.submit().then(l=>{showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:k,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:l,attachmentsData:o}})}},{label:"No",callback:()=>{}}])}).catch(l=>{let m=!1,p=[],y=[];if(d&&Array.isArray(d.errors)&&d.errors.length>0&&(y=y.concat(d.errors)),Array.isArray(l)?y=y.concat(l):l&&Array.isArray(l.errors)?y=y.concat(l.errors):l&&Array.isArray(l.details)?y=y.concat(l.details):l&&typeof l=="object"&&(l.message||l.context)&&y.push(l),y.length>0?y.forEach(g=>{const u=J(d,g);u&&u.element?q(u)?(m=!0,p.push(g),Y(u,g)):P(u):(m=!0,p.push(g))}):m=!0,!m){logger.warn("[TF_SDK:321a] \u26A0\uFE0F All reported errors were resolved/hallucinated. Forcing success submit."),showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:k,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}})}},{label:"No",callback:()=>{}}]);return}logger.error("Form submit errors:",p);let s="Please fill in all required fields.";p.length===1&&p[0].message&&(s=p[0].message),showDynamicModal("Error",[{label:"OK"}],s),sendEventCallback({type:FORM_EVENTS.SUBMIT_ERROR,errorMessage:"ErrorCode : 006, Formio not submit the form",data:{reason:"Form submission failed",formData:t,completeFlag:k,completionPercentage:T,technicalError:p.length>0?p:l}})})}function H(){B=null,V=null,I=null}async function Z(){if(!d){logger.error("[TF_SDK:323] \u274C Form object not initialized");return}let e=d.getValue();window.FORM_SUB_TEMP=e;const t=window.FORM_TEMPLATE||{display:"form",type:"form",components:[]};try{typeof window.loadCommentsform=="function"?(await window.loadCommentsform(t,window.FORM_USER_DATA,window.FORM_COMMENTS_DATA,window.FORM_VOB_ARR,window.FORM_USERS_LIST||[]),showCommentsView()):logger.error("[TF_SDK:324] \u274C loadCommentsform is not a function")}catch(o){logger.error("[TF_SDK:325] \u274C Error while loading comments:",o)}}function $(){if(!d)return;const e=d.getValue().data;if(!Object.values(e||{}).some(o=>o!=null&&o!==""&&o!==!1&&!(Array.isArray(o)&&o.length===0)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length===0))){showDynamicModal("Attention",[{label:"OK"}],"Please fill at least one field before saving.");return}showDynamicModal("Do you want to save the data?",[{label:"Yes",callback:()=>{const o=d.getValue(),n=R(o),r=K(o.data,v);sendEventCallback({type:FORM_EVENTS.SAVE,message:"Success: Data saved successfully.",data:{commentsData:FORM_COMMENTS_DATA,formData:n,completeFlag:k,completionPercentage:T,attachmentsData:r}})}},{label:"No",callback:()=>{}}])}function ee(){if(d&&d.options&&d.options.readOnly){L();return}let e;try{e=d?d.getValue().data:null}catch(o){e=null}JSON.stringify(e)===JSON.stringify(_)?L():showDynamicModal("Unsaved Form Data",[{label:"Discard",callback:L},{label:"Save",callback:$}],"Discard your changes or save them before leaving?")}function te(e,t,o){let n=new CustomEvent("capureImageData",{detail:{imageData:e,controlId:t,fileName:o}});document.dispatchEvent(n)}window.checkMoreButtonVisibility=function(){const e=document.getElementById("unvired-more-btn");if(!e)return;const t=window.__unviredFormsOptions||{};if(t.showMoreButton===!1){e.style.display="none";return}const o=document.getElementById("completeOption"),n=document.getElementById("saveOption"),r=document.getElementById("documentsOption"),i=document.getElementById("comments-item"),l=document.getElementById("help-item"),m=(y,s)=>y?s&&t[s]===!0?!0:y.style.display!=="none":!1;m(o)||m(n)||m(r)||t.showComments===!0||t.showHelp===!0?e.style.display="":e.style.display="none"},window.checkMoreButtonVisibility(),window.loadComments=Z,window.loadTRform=z,window.FormOnSave=$,window.FormOnBack=ee,window.setImageData=te,window.FormOnComplete=j,window.FormOnNext=function(){d&&typeof d.nextPage=="function"&&d.nextPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.FormOnPrevious=function(){d&&typeof d.prevPage=="function"&&d.prevPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.formOnCompleteFunction=j,window.resetFormCache=H,window.resetInitialFormData=function(){_=null},document.dispatchEvent(new CustomEvent("LoadRNformReady"))})();</script>
39065
+ <script>(function(){var d=null,_=null,ne;let v=[],k=0,T=!1;function L(){sendEventCallback({type:FORM_EVENTS.BACK_NAVIGATION,message:"Back navigation triggered.",data:{}})}function W(e,t){var a,f;const o=document.getElementById("saveBtn"),n=document.getElementById("submitBtn"),r=document.getElementById("prevBtn"),i=document.getElementById("nextBtn"),l=document.getElementById("completeOption"),m=document.getElementById("saveOption"),p=document.getElementById("completeDivider"),y=document.getElementById("saveDivider");if(!o||!n)return;const s=e===!0||e==="true",h=e===!1||e==="false",u=String(t||"").toLowerCase(),c=(g,w,E)=>{g&&(E?g.style.setProperty("display","flex","important"):g.style.setProperty("display","none","important")),w&&(E?w.style.setProperty("display","block","important"):w.style.setProperty("display","none","important"))};c(l,p,!1),c(m,y,!1),u==="read"?(o.style.display="none",n.style.display="none"):h&&u==="writemultiple"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,c(l,p,!1),c(m,y,!1)):h&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0):s&&u==="writemultiple"?((a=window.__unviredFormsOptions)==null?void 0:a.showCompleteAlways)===!0||((f=window.__unviredFormsOptions)==null?void 0:f.showCompleteAlways)==="true"?(o.style.display="",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',o.disabled=!0,n.disabled=!0,c(l,p,!1),c(m,y,!1)):(o.style.display="",n.style.display="none",o.disabled=!0,c(l,p,!1)):s&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,c(m,y,!0)):(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}function U(e,t,o,n){var A,F,O,C;const r=document.getElementById("saveBtn"),i=document.getElementById("submitBtn"),l=document.getElementById("prevBtn"),m=document.getElementById("nextBtn");if(!r||!i)return;const p=o===!0||o==="true",y=o===!1||o==="false",s=String(n||"").toLowerCase(),h=document.getElementById("completeOption"),u=document.getElementById("saveOption"),c=document.getElementById("completeDivider"),a=document.getElementById("saveDivider"),f=(b,M,S)=>{b&&(S?b.style.setProperty("display","flex","important"):b.style.setProperty("display","none","important")),M&&(S?M.style.setProperty("display","block","important"):M.style.setProperty("display","none","important"))},g=Object.values(t||{}).some(b=>b!=null&&b!==""&&b!==!1&&!(Array.isArray(b)&&b.length===0)&&!(typeof b=="object"&&!Array.isArray(b)&&Object.keys(b).length===0)),w=e>=100,E=((A=window.__unviredFormsOptions)==null?void 0:A.requireCompleteForm)!==!1&&((F=window.__unviredFormsOptions)==null?void 0:F.requireCompleteForm)!=="false";if(s==="read"){r.style.display="none",i.style.display="none";return}if(p&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(u,a,!0),f(h,c,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(p&&s==="writemultiple"){((O=window.__unviredFormsOptions)==null?void 0:O.showCompleteAlways)===!0||((C=window.__unviredFormsOptions)==null?void 0:C.showCompleteAlways)==="true"?(r.style.display="",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',r.disabled=!g,i.disabled=!1,f(h,c,!1),f(u,a,!1)):w?(r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(u,a,!0),f(h,c,!1)):g?(r.style.display="",i.style.display="none",r.disabled=!1,f(h,c,!0),f(u,a,!1)):(r.style.display="",i.style.display="none",r.disabled=!0,f(h,c,!1),f(u,a,!1)),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writemultiple"){r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(h,c,!1),f(u,a,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(h,c,!1),f(u,a,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}r.style.display="none",i.style.display="",i.disabled=!1,typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}async function z(e,t,o,n,r,i,l,m,p,y){if(window.CURRENT_VIEW!=="comments"){if(j(),logger.info("[TF_SDK:296] \u2705 loadTRform() entered",{mode:n,permission:p,privateExternal:m,language:r}),v=y,typeof Formio=="undefined"){logger.error("[TF_SDK:297] \u274C Formio library not loaded"),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 016, Formio library not loaded",data:{reason:"Formio library not loaded"}});return}try{if(logger.info("[TF_SDK:297] \u2705 Initializing loadTRform"),typeof Formio!="undefined"&&Formio.Components&&Formio.Components.components&&Formio.Components.components.component){const a=Formio.Components.components.component;if(!a._requiredFixApplied){a._requiredFixApplied=!0;const f=a.prototype.setCustomValidity;a.prototype.setCustomValidity=function(w,E,A){var F,O,C,b;if(typeof w=="string"&&(w.trim().toLowerCase()==="required"||w.includes("{{field}}"))){const M=(O=(F=this.component)==null?void 0:F.validate)==null?void 0:O.customMessage,S=((C=this.component)==null?void 0:C.errorLabel)||((b=this.component)==null?void 0:b.label)||this.key||"Field";w=M||`${S} is required`}if(f)return f.call(this,w,E,A)};const g=a.prototype.t;a.prototype.t=function(w,E){var A,F,O,C;if(typeof w=="string"&&w.trim().toLowerCase()==="required"){const b=(F=(A=this.component)==null?void 0:A.validate)==null?void 0:F.customMessage;return b||`${(E==null?void 0:E.field)||((O=this.component)==null?void 0:O.errorLabel)||((C=this.component)==null?void 0:C.label)||this.key||"Field"} is required`}return g?g.apply(this,arguments):w}}}let s={noAlerts:!0,scroll:!1,language:window.FORMIO_LANGUAGE||"en",i18n:window.FORMIO_I18N};if(W(m,p),n=="form")s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;else if(n=="pdf"||n=="print"){s.readOnly=!0,s.flatten=!0,s.renderMode="flat",s.viewHtml=!0;const a=document.querySelector(".progress-container");a&&(a.style.display="none")}else if(n=="readOnly"||p=="read"){s.readOnly=!0,s.flatten=!1,s.viewHtml=!1;const a=document.querySelector(".progress-container");a&&(a.style.display="none");const f=document.getElementById("sticky-footer");f&&window.CURRENT_VIEW!=="comments"&&(f.style.display="none")}else s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;const h=document.getElementById("formio");if(!h)throw new Error("DOM Element #formio not found");logger.info("[TF_SDK:298] \u2705 Creating Formio form...",e);try{d=await Formio.createForm(h,e,s)}catch(a){throw logger.error("[TF_SDK:298-ERR] \u274C Error in Formio.createForm:",a),a}let u=!1;if(d.on("change",()=>{if(!u){if(!_)try{_=JSON.parse(JSON.stringify(d.getValue().data))}catch(a){_=d.getValue().data}u=!0}}),document.dispatchEvent(new CustomEvent("LessRenderingComplete")),window.formObj=d,window.FORMIO_I18N&&Object.keys(window.FORMIO_I18N).length>0){const a=document.getElementById("languageSubMenu"),f=document.getElementById("languageMainOption"),g=document.getElementById("languageDivider");if(a&&f){a.innerHTML="";let w=Object.keys(window.FORMIO_I18N).filter(F=>typeof window.FORMIO_I18N[F]=="object"&&window.FORMIO_I18N[F]!==null);const E=window.FORMIO_LANGUAGE||"en";!w.includes(E)&&typeof window.FORMIO_I18N[E]=="object"&&w.unshift(E);let A=null;try{window.Intl&&typeof Intl.DisplayNames=="function"&&(A=new Intl.DisplayNames(["en"],{type:"language"}))}catch(F){logger.warn("Intl.DisplayNames not supported",F)}w.forEach(F=>{const O=document.createElement("div");O.className=f.className,O.style.cursor="pointer",O.style.padding="0.5rem 1rem",O.style.borderTop="none";let C=F.toUpperCase();try{C=A.of(F)||C}catch(M){}let b=F===E?'<i class="bi bi-check2 text-primary" style="margin-right: 8px;"></i>':'<i class="bi bi-check2" style="margin-right: 8px; visibility: hidden;"></i>';f.innerHTML.includes("icon chevron")&&(b=F===E?'<i class="icon check" style="margin-right: 8px;"></i>':'<i class="icon check" style="margin-right: 8px; visibility: hidden;"></i>'),O.innerHTML=`${b}${C}`,O.onclick=function(M){M.stopPropagation(),window.changeFormLanguage&&(window.changeFormLanguage(F),window.FORMIO_LANGUAGE=F);const S=a.children;for(let N=0;N<S.length;N++){const D=S[N].querySelector("i");D&&(w[N]===F?(D.style.visibility="visible",D.className.includes("bi")&&D.classList.add("text-primary")):(D.style.visibility="hidden",D.className.includes("bi")&&D.classList.remove("text-primary")))}window.toggleLanguageSubMenu&&window.toggleLanguageSubMenu(),window.showToast&&window.showToast(`Language set to ${C}`,"success")},a.appendChild(O)}),w.length>1?(f.style.display=f.className.includes("d-flex")?"flex":"block",g&&(g.style.display="block")):(f.style.display="none",g&&(g.style.display="none"))}}else{const a=document.getElementById("languageMainOption"),f=document.getElementById("languageDivider");a&&(a.style.display="none"),f&&(f.style.display="none")}if(!d){logger.error("[TF_SDK:299] \u274C Form not initialized.");return}const c=()=>{['button[type="submit"]',".formio-component-submit"].forEach(g=>{d.element.querySelectorAll(g).forEach(E=>{E.style.display="none"})}),d.element.querySelectorAll('input:not([type="file"]), textarea').forEach(g=>{g.getAttribute("autocomplete")!=="new-password"&&(g.setAttribute("autocomplete","new-password"),g.setAttribute("data-lpignore","true"),g.setAttribute("spellcheck","false"))})};c(),d.on("render",c),d.on("customEvent",a=>{logger.info("[TF_SDK:300-EVT] \u{1F4E2} Button customEvent triggered:",a),typeof sendEventCallback=="function"&&sendEventCallback({type:"CUSTOM_EVENT",message:`Custom event ${(a==null?void 0:a.type)||""} triggered`,data:a})}),Q(m,p),d.formReady.then(()=>{if(logger.info("[TF_SDK:300] \u2705 formReady.then() triggered"),typeof window.initializeWizardLogic=="function"&&window.initializeWizardLogic(d,m,p),t?(logger.info("[TF_SDK:301] \u2705 Previous form data found:",t),d.submission={data:typeof t=="string"?JSON.parse(t):t},logger.info("[TF_SDK:302] \u2705 Previous submission data applied")):logger.info("[TF_SDK:303] \u2705 No previous form data found"),logger.info("[TF_SDK:304] \u2705 Calculating initial progress..."),executeProgressCalculation(m,p),logger.info("[TF_SDK:305] \u2705 Progress calculation completed"),n=="readOnly"){logger.info("[TF_SDK:306] \u2705 ReadOnly mode detected");const w=document.querySelectorAll(".formio-component-submit");logger.info(`[TF_SDK:307] \u2705 Found ${w.length} submit components`),w.forEach((E,A)=>{E.style.display="none",logger.info(`[TF_SDK:308] \u2705 Hidden submit component ${A+1}`)})}else logger.info("[TF_SDK:309] \u2705 Editable mode detected");logger.info("[TF_SDK:310] \u2705 Sending FORM_RENDER callback..."),sendEventCallback({type:FORM_EVENTS.FORM_RENDER,message:"Success: Form rendered successfully.",data:{submissionData:t,formTemplate:e}}),logger.info("[TF_SDK:311] \u2705 FORM_RENDER callback sent");const a=document.getElementById("sdk-form-loader");a?(logger.info("[TF_SDK:312] \u2705 Loader found, hiding..."),a.classList.add("hidden"),logger.info("[TF_SDK:313] \u2705 Loader hidden")):logger.warn("[TF_SDK:314] \u2705 Loader element not found"),document.querySelectorAll(".tf-form-loading").forEach(w=>w.classList.remove("tf-form-loading")),logger.info("[TF_SDK:315] \u2705 Dispatching FormRenderingComplete event...");let f=0;typeof window.getMaxTableWidth=="function"&&(f=window.getMaxTableWidth(document.getElementById("formio")||document.querySelector(".tf-embed-sdk")||document.body).maxWidth),sendEventCallback({type:FORM_EVENTS.FORM_LOADED,message:"Success: Form rendered complete.",data:{maxTableWidth:`${f}px`}}),document.dispatchEvent(new CustomEvent("FormRenderingComplete",{detail:{timestamp:new Date().toISOString(),status:"success",maxTableWidth:f}})),logger.info("[TF_SDK:316] \u2705 FormRenderingComplete event dispatched successfully");const g=document.querySelector('input[type="file"]');g?(g.setAttribute("accept","*/*"),logger.info("[TF_SDK:317] \u2705 File input found, accept=*/* applied")):logger.info("[TF_SDK:318] \u2705 No file input found"),logger.info("[TF_SDK:319] \u2705 Full formReady process completed")}).catch(a=>{logger.error("[TF_SDK:320] \u274C formReady.then() failed:",a);const f=document.getElementById("sdk-form-loader");f&&f.classList.add("hidden"),document.querySelectorAll(".tf-form-loading").forEach(g=>g.classList.remove("tf-form-loading")),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 005, Form rendering failed: "+((a==null?void 0:a.message)||a),data:{technicalError:a}})})}catch(s){logger.error("[TF_SDK:321] \u274C Error creating form (after retries):",s?s.message:"Unknown error",s?s.stack:"");const h=document.getElementById("sdk-form-loader");h&&h.classList.add("hidden"),document.querySelectorAll(".tf-form-loading").forEach(u=>u.classList.remove("tf-form-loading")),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 005, Formio not rendered the forms",data:{reason:"Failed to render form after retries",technicalError:s}})}}}let B=null,V=null,I=null;function G(){if(I)return I;if(!d)return[];const e=[];function t(o,n=""){Array.isArray(o)&&o.forEach(r=>{var y;if(!r)return;const i=r.component||r;let l=n;if(["columns","panel","fieldset","well","table","tabs","content","htmlelement"].includes(i.type)||(l=n?`${n}.${i.key}`:i.key),["textfield","textarea","number","checkbox","radio","select","selectboxes","email","url","day","datetime","file","datamap","tree","survey","signature","datagrid","editgrid","container"].includes(i.type)&&((y=i.validate)!=null&&y.required)&&e.push({key:i.key,type:i.type,path:l,comp:i,instance:r}),Array.isArray(r.components)&&t(r.components,l),i.type==="form"){let s=l?`${l}.data`:"data";r.subForm&&Array.isArray(r.subForm.components)?t(r.subForm.components,s):Array.isArray(r.components)&&t(r.components,s)}Array.isArray(r.columns)&&r.columns.forEach(s=>{Array.isArray(s.components)&&t(s.components,l)})})}return t(d.components),I=e,e}window.executeProgressCalculation=function(e,t){if(!d)return;const o=d.data||{},n=JSON.stringify(o);if(!(d&&!!d.wizard)&&n===V)return;V=n;const i=G();let l=i.length,m=0;function p(u,c){if(Array.isArray(c)){if(!(["file","datagrid","editgrid","datamap","selectboxes"].includes(u.type)||u.multiple))return c.length>0&&c.every(g=>p(u,g));if(u.type==="file"&&c.length>0&&Array.isArray(c[0]))return c.every(g=>p(u,g))}switch(u.type){case"selectboxes":return Object.values(c||{}).some(Boolean);case"datamap":case"tree":return c&&Object.keys(c).length>0;case"survey":return u.questions&&Array.isArray(u.questions)?c&&Object.keys(c).length>=u.questions.length:c&&Object.keys(c).length>0;case"file":return Array.isArray(c)&&c.length>0;case"checkbox":return c===!0;case"editgrid":case"datagrid":return Array.isArray(c)&&c.length>0;case"signature":return!!c;default:return u.multiple?Array.isArray(c)&&c.length>0&&c.some(a=>a!=null&&a!==""):c!=null&&c!==""}}const y=[];i.forEach(u=>{let c=!0;u.instance&&(u.instance.visible===!1&&(c=!1),c&&typeof u.instance.checkCondition=="function"&&(u.instance.checkCondition(null,o)||(c=!1))),c&&(u.instance&&u.instance.parent&&u.instance.parent.visible===!1||y.push(u))}),l=y.length,m=0,y.forEach(({key:u,type:c,path:a,comp:f})=>{let g=q(o,a);p(f,g)&&m++});const s=l===0?100:Math.round(m/l*100);logger.info("[TF_SDK:322] \u2705 Progress:",{mandatory:l,filledMandatory:m,completion:s+"%"}),k=s,T=s>=100,U(s,d.data,e,t),typeof window.updateWizardNav=="function"&&window.updateWizardNav(d);const h=document.getElementById("progress-bar");if(h){const u=h.querySelector(".progress"),c=h.querySelector(".badge");u.style.width=`${s}%`,c.textContent=`${s}%`;let a=s;s<=0?(a=.5,u.style.width=`${.5}%`,window.innerWidth>768||window.innerWidth>480?c.style.transform="translateX(2%)":c.style.transform="translateX(1%)"):s>=100?(h.classList.add("complete"),a=99.5,window.innerWidth>768||window.innerWidth>480,c.style.transform="translateX(-100%)"):(h.classList.remove("complete"),c.style.transform="translateX(-50%)"),c.style.left=`${a-.25}%`}};function q(e,t){if(e==null||!t)return;if(t.indexOf(".")===-1)return Array.isArray(e)?e.map(r=>r[t]):e[t];const o=t.split(".");let n=e;for(let r=0;r<o.length;r++){const i=o[r];if(n==null)return;if(Array.isArray(n)){const l=o.slice(r).join(".");return n.map(m=>q(m,l))}n=n[i]}return n}function x(e){if(!e)return!0;let t=e.getValue?e.getValue():e.dataValue;return t==null||t===""||Array.isArray(t)&&(t.length===0||!t.some(n=>!(n==null||n===""||typeof n=="object"&&Object.keys(n).length===0)))||typeof t=="object"&&!Array.isArray(t)&&(Object.keys(t).length===0||!Object.values(t).some(n=>n!=null&&n!==""&&n!==!1))?!0:e.isEmpty?e.isEmpty(t):!1}function J(e,t){var r,i,l,m,p,y;if(!e||!t)return null;if(t.component&&t.component.element)return t.component;const o=t.path||((r=t.context)==null?void 0:r.path)||((i=t.context)==null?void 0:i.hasPath);if(o){let s=typeof e.getComponent=="function"?e.getComponent(o):null;if(s&&s.element)return s;const h=String(o).replace(/\[(\d+)\]/g,".$1");if(s=typeof e.getComponent=="function"?e.getComponent(h):null,s&&s.element)return s;const u=String(o).replace(/\.(\d+)\./g,"[$1].");if(s=typeof e.getComponent=="function"?e.getComponent(u):null,s&&s.element)return s}const n=((m=(l=t.context)==null?void 0:l.component)==null?void 0:m.key)||((p=t.component)==null?void 0:p.key)||(typeof((y=t.context)==null?void 0:y.component)=="string"?t.context.component:null);if(n&&typeof e.getComponent=="function"){const s=e.getComponent(n);if(s&&s.element)return s}return null}function P(e){if(!e||!e.element)return;e.error=null,typeof e.setCustomValidity=="function"&&e.setCustomValidity(""),e.element.classList.remove("has-error","formio-error-wrapper","is-invalid"),e.element.querySelectorAll(".choices__inner, .ui.selection.dropdown, .is-invalid").forEach(n=>{n.closest(".formio-component")===e.element&&n.classList.remove("is-invalid")}),e.element.querySelectorAll(".formio-errors, .invalid-feedback, [ref='messageContainer']").forEach(n=>{n.closest(".formio-component")===e.element&&(n.innerHTML="",n.style.display="none")})}function X(e){!e||typeof e.everyComponent!="function"||e.everyComponent(t=>{var l;if(!t||!t.element)return;const o=((l=t.component)==null?void 0:l.type)||t.type;if(["datagrid","editgrid","container","panel","columns","fieldset","well","tabs","form"].includes(o))return;const r=t.element.classList.contains("has-error")||t.element.classList.contains("formio-error-wrapper"),i=Array.from(t.element.querySelectorAll(".formio-errors, .invalid-feedback")).some(m=>m.style.display!=="none"&&m.innerHTML.trim()!==""&&m.closest(".formio-component")===t.element);(r||i)&&!x(t)&&P(t)})}function Y(e,t){var m,p,y,s;if(!e||!e.element)return;e.element.classList.add("has-error","formio-error-wrapper");const o=e.element.querySelector(".choices__inner, .ui.selection.dropdown");o&&o.closest(".formio-component")===e.element&&o.classList.add("is-invalid");const n=t.message||((p=(m=t.context)==null?void 0:m.component)!=null&&p.label?`${t.context.component.label} is required`:`${((y=e.component)==null?void 0:y.label)||e.key} is required`),i=`e-${e.id||((s=e.component)==null?void 0:s.id)||e.key}-${e.key}`;let l=Array.from(e.element.querySelectorAll(".formio-errors, [ref='messageContainer']")).find(h=>h.closest(".formio-component")===e.element);l?(l.setAttribute("ref","messageContainer"),l.classList.contains("invalid-feedback")||l.classList.add("invalid-feedback")):(l=document.createElement("div"),l.setAttribute("ref","messageContainer"),l.className="formio-errors invalid-feedback",e.element.appendChild(l)),l.innerHTML=`<div id="${i}" class="form-text error">${n}</div>`,l.style.display="block"}function Q(e,t){d&&d.on("change",o=>{var n,r;((r=(n=o.changed)==null?void 0:n.component)==null?void 0:r.type)==="datetime"&&document.activeElement.blur(),X(d),B&&clearTimeout(B),I=null,B=setTimeout(()=>{executeProgressCalculation(e,t)},300)})}function K(e,t=[]){let o={};if(!t||t.length===0||!e)return o;let n=e;if(typeof e=="string")try{n=JSON.parse(e)}catch(i){}const r=i=>{if(!(!i||typeof i!="object"))if(Array.isArray(i))i.forEach(r);else for(const l in i)t.includes(l)?o[l]?Array.isArray(o[l])&&Array.isArray(i[l])&&(o[l]=o[l].concat(i[l])):o[l]=i[l]:typeof i[l]=="object"&&r(i[l])};return r(n),o}function R(e,t=[]){if(!e||typeof e!="object")return e;const o=Array.isArray(e)?[...e]:{...e};for(const n in o){const r=o[n];Array.isArray(r)?t.length>0&&t.includes(n)?o[n]=r.map(i=>i&&typeof i=="object"&&(i.uid||i.id)?i.uid||i.id:i):r.length>0&&r.every(i=>i&&typeof i=="object"&&i.storage==="SmartStorage")?o[n]=r.map(i=>i.id||i.uid||i):o[n]=r.map(i=>typeof i=="object"&&i!==null?R(i,t):i):r&&typeof r=="object"&&(o[n]=R(r,t))}return o}function $(){var r,i;if(!d)return;const e=d.getValue(),t=R(e,v),o=K(e.data,v);if(!(((r=window.__unviredFormsOptions)==null?void 0:r.requireCompleteForm)!==!1&&((i=window.__unviredFormsOptions)==null?void 0:i.requireCompleteForm)!=="false")){showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully (Validation Bypassed).",data:{formData:t,completeFlag:T,completionPercentage:k,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}})}},{label:"No",callback:()=>{}}]);return}d.errors=[],d.submit().then(l=>{showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:T,completionPercentage:k,commentsData:FORM_COMMENTS_DATA,result:l,attachmentsData:o}})}},{label:"No",callback:()=>{}}])}).catch(l=>{let m=!1,p=[],y=[];if(d&&Array.isArray(d.errors)&&d.errors.length>0&&(y=y.concat(d.errors)),Array.isArray(l)?y=y.concat(l):l&&Array.isArray(l.errors)?y=y.concat(l.errors):l&&Array.isArray(l.details)?y=y.concat(l.details):l&&typeof l=="object"&&(l.message||l.context)&&y.push(l),y.length>0?y.forEach(h=>{const u=J(d,h);u&&u.element?x(u)?(m=!0,p.push(h),Y(u,h)):P(u):(m=!0,p.push(h))}):m=!0,!m){logger.warn("[TF_SDK:321a] \u26A0\uFE0F All reported errors were resolved/hallucinated. Forcing success submit."),showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:T,completionPercentage:k,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}})}},{label:"No",callback:()=>{}}]);return}logger.error("Form submit errors:",p);let s="Please fill in all required fields.";p.length===1&&p[0].message&&(s=p[0].message),showDynamicModal("Error",[{label:"OK"}],s),sendEventCallback({type:FORM_EVENTS.SUBMIT_ERROR,errorMessage:"ErrorCode : 006, Formio not submit the form",data:{reason:"Form submission failed",formData:t,completeFlag:T,completionPercentage:k,technicalError:p.length>0?p:l}})})}function j(){B=null,V=null,I=null}async function Z(){if(!d){logger.error("[TF_SDK:323] \u274C Form object not initialized");return}let e=d.getValue();window.FORM_SUB_TEMP=e;const t=window.FORM_TEMPLATE||{display:"form",type:"form",components:[]};try{typeof window.loadCommentsform=="function"?(await window.loadCommentsform(t,window.FORM_USER_DATA,window.FORM_COMMENTS_DATA,window.FORM_VOB_ARR,window.FORM_USERS_LIST||[]),showCommentsView()):logger.error("[TF_SDK:324] \u274C loadCommentsform is not a function")}catch(o){logger.error("[TF_SDK:325] \u274C Error while loading comments:",o)}}function H(){if(!d)return;const e=d.getValue().data;if(!Object.values(e||{}).some(o=>o!=null&&o!==""&&o!==!1&&!(Array.isArray(o)&&o.length===0)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length===0))){showDynamicModal("Attention",[{label:"OK"}],"Please fill at least one field before saving.");return}showDynamicModal("Do you want to save the data?",[{label:"Yes",callback:()=>{const o=d.getValue(),n=R(o),r=K(o.data,v);sendEventCallback({type:FORM_EVENTS.SAVE,message:"Success: Data saved successfully.",data:{commentsData:FORM_COMMENTS_DATA,formData:n,completeFlag:T,completionPercentage:k,attachmentsData:r}})}},{label:"No",callback:()=>{}}])}function ee(){if(d&&d.options&&d.options.readOnly){L();return}let e;try{e=d?d.getValue().data:null}catch(o){e=null}JSON.stringify(e)===JSON.stringify(_)?L():showDynamicModal("Unsaved Form Data",[{label:"Discard",callback:L},{label:"Save",callback:H}],"Discard your changes or save them before leaving?")}function te(e,t,o){let n=new CustomEvent("capureImageData",{detail:{imageData:e,controlId:t,fileName:o}});document.dispatchEvent(n)}window.checkMoreButtonVisibility=function(){const e=document.getElementById("unvired-more-btn");if(!e)return;const t=window.__unviredFormsOptions||{};if(t.showMoreButton===!1){e.style.display="none";return}const o=document.getElementById("completeOption"),n=document.getElementById("saveOption"),r=document.getElementById("documentsOption"),i=document.getElementById("comments-item"),l=document.getElementById("help-item"),m=(y,s)=>y?s&&t[s]===!0?!0:y.style.display!=="none":!1;m(o)||m(n)||m(r)||t.showComments===!0||t.showHelp===!0?e.style.display="":e.style.display="none"},window.checkMoreButtonVisibility(),window.loadComments=Z,window.loadTRform=z,window.FormOnSave=H,window.FormOnBack=ee,window.setImageData=te,window.FormOnComplete=$,window.FormOnNext=function(){d&&typeof d.nextPage=="function"&&d.nextPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.FormOnPrevious=function(){d&&typeof d.prevPage=="function"&&d.prevPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.formOnCompleteFunction=$,window.resetFormCache=j,window.resetInitialFormData=function(){_=null},document.dispatchEvent(new CustomEvent("LoadRNformReady"))})();</script>
39003
39066
  <script>(function(){function l(e){if(!e||([".formio-component-wizard_nav",".btn-wizard-nav-next",".btn-wizard-nav-previous",".btn-wizard-nav-cancel",".btn-wizard-nav-submit"].forEach(n=>{e.element.querySelectorAll(n).forEach(t=>{t.style.display="none"})}),typeof e.eachComponent=="function"&&e.eachComponent(n=>{if(n.type==="button"){const o=(n.component.action||"").toLowerCase(),t=(n.component.label||"").toLowerCase();(o==="next"||o==="previous"||o==="cancel"||t==="next"||t==="previous"||t==="cancel")&&(n.visible=!1,n.element&&(n.element.style.display="none"))}}),!e.wizard))return;const i=document.getElementById("prevBtn"),d=document.getElementById("nextBtn"),u=document.getElementById("submitBtn"),y=document.getElementById("saveBtn"),a=e.page||0,c=e.pages&&e.pages.length||0,g=a>=c-1;if(logger.info(`[TF_SDK:326] \u2705 Page: ${a+1}/${c}, isLastPage: ${g}`),i&&(i.style.display=a>0?"inline-block":"none"),d&&(d.style.display=a<c-1?"inline-block":"none"),g)logger.info("[TF_SDK:328] \u2705 Last page: Allowing normal button logic to take over"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();else{logger.info("[TF_SDK:327] \u2705 Intermediate page: Hiding save/complete actions"),u&&(u.style.display="none"),y&&(y.style.display="none");const n=document.getElementById("completeOption"),o=document.getElementById("saveOption"),t=document.getElementById("completeDivider"),p=document.getElementById("saveDivider");n&&(n.style.display="none"),o&&(o.style.display="none"),t&&(t.style.display="none"),p&&(p.style.display="none");const r=document.getElementById("quickCompleteBtn"),w=document.getElementById("quickSaveBtn");r&&(r.style.display="none"),w&&(w.style.display="none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}}function f(e,s,i){e&&(e.wizard&&(e.on("nextPage",()=>{l(e),typeof window.executeProgressCalculation=="function"&&window.executeProgressCalculation(s,i)}),e.on("prevPage",()=>{l(e),typeof window.executeProgressCalculation=="function"&&window.executeProgressCalculation(s,i)})),e.on("render",()=>{l(e)}))}window.updateWizardNav=l,window.initializeWizardLogic=function(e,s,i){logger.info("[TF_SDK:329] \u2705 Initializing wizard-specific logic..."),f(e,s,i),e.on("change",()=>{l(e)}),l(e)}})();</script>
39004
39067
  <script>(function(){async function d(o,e,n,w,i=[]){var a,c;logger.info("[TF_SDK:279] \u2705 loadCommentsform() called",{users:i==null?void 0:i.length,commentsData:n==null?void 0:n.length});const r=document.getElementById("formio-cmt");if(!r)return logger.error("[TF_SDK:280] \u274C formio-cmt container not found");if(window.commentsResponse){try{(c=(a=window.commentsResponse).destroy)==null||c.call(a)}catch(t){logger.warn("[TF_SDK:281] \u26A0\uFE0F Could not destroy previous Recogito instance",t)}window.commentsResponse=null}if(window.commentsFormObj&&window.commentsFormObj.destroy)try{await window.commentsFormObj.destroy()}catch(t){logger.warn("[TF_SDK:282] \u26A0\uFE0F Could not destroy previous comments Formio form",t)}r.innerHTML="",logger.info("[TF_SDK:283] \u2705 Creating Formio form in read-only mode for comments..."),window.commentsFormObj=await Formio.createForm(r,o,{renderMode:"html",flatten:!0,readOnly:!0,language:localStorage.getItem("language")||"en"}),window.commentsFormObj.nosubmit=!0,window.commentsFormObj.on("change",()=>{}),logger.info("[TF_SDK:284] \u2705 Initializing Recogito annotation overlay..."),window.commentsResponse=Recogito.init({content:document.getElementById("formio-cmt"),locale:localStorage.getItem("language"),widgets:[{widget:recogito.CommentsMention,userSuggestions:i,editable:"MINE_ONLY"},{widget:"TAG",vocabulary:w}],mode:"html"}),window.commentsResponse.setAuthInfo({id:e.email,displayName:e.firstName||e.email}),window.commentsResponse.on("createAnnotation",function(t){}),window.commentsResponse.on("updateAnnotation",function(t){}),window.commentsResponse.on("selectAnnotation",function(t){const g=new CustomEvent("annotateCss",{detail:!0});document.dispatchEvent(g)}),window.commentsFormObj.formReady.then(()=>{setTimeout(()=>{logger.info("[TF_SDK:285] \u2705 Annotations loaded",{count:n==null?void 0:n.length}),window.commentsResponse.setAnnotations(n)},500);const t=new CustomEvent("loadAnnotationComplete",{});document.dispatchEvent(t),logger.info("[TF_SDK:286] \u2705 loadAnnotationComplete dispatched")})}async function m(){logger.info("[TF_SDK:287] \u2705 goToformRender() \u2014 returning to form view");const o=document.getElementById("formio-cmt");if(o&&(o.innerHTML=""),typeof window.resetFormCache=="function"&&window.resetFormCache(),typeof window.showFormView=="function")try{window.commentsResponse&&window.commentsResponse.destroy&&(window.commentsResponse.destroy(),logger.info("[TF_SDK:288] \u2705 Previous Recogito instance destroyed")),window.commentsFormObj&&window.commentsFormObj.destroy&&(await window.commentsFormObj.destroy(),window.commentsFormObj=null),logger.info("[TF_SDK:289] \u2705 Instantly switching back to form view..."),window.showFormView()}catch(e){logger.error("[TF_SDK:290] \u274C Error restoring form view:",e),typeof sendEventCallback=="function"&&sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 005, Formio not rendered the forms",data:{reason:"Failed to restore form view",technicalError:e}})}else logger.error("[TF_SDK:291] \u274C showFormView is not defined")}function l(){logger.info("[TF_SDK:292] \u2705 CommentOnBack() \u2014 checking for unsaved changes");let o=window.commentsResponse.getAnnotations(),e=window.FORM_COMMENTS_DATA;const n=JSON.stringify(o)===JSON.stringify(e);logger.info("[TF_SDK:293] \u2705 Annotations changed:",!n),n?m():showDynamicModal("Unsaved Comments",[{label:"Discard",callback:m},{label:"Save",callback:s}],"Discard your comments or save them before leaving?")}function s(){logger.info("[TF_SDK:294] \u2705 submitComments() \u2014 sending annotation data to app");let o=window.commentsResponse.getAnnotations();logger.info("[TF_SDK:295] \u2705 Annotations collected",{count:o==null?void 0:o.length}),sendEventCallback({type:"COMMENTS_DATA",message:"Success: getcomments data.",data:{commentsData:o}}),window.FORM_COMMENTS_DATA=o,m()}window.submitComments=s,window.loadCommentsform=d,window.CommentOnBack=l})();</script>
39005
39068
 
@@ -39089,7 +39152,7 @@ Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on
39089
39152
 
39090
39153
 
39091
39154
  <div id="sticky-footer" class="footer-hidden" style="display: none;">
39092
- <div class="build-version">SDK v2.0.87</div>
39155
+ <div class="build-version">SDK v2.0.89</div>
39093
39156
 
39094
39157
  <button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
39095
39158
  <i class="bi bi-chevron-left"></i> Previous