@opencitylabs/formio-custom-components 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +22 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5285 -4581
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Oc=Object.defineProperty;var Yc=(l,n,u)=>n in l?Oc(l,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[n]=u;var Tt=(l,n,u)=>Yc(l,typeof n!="symbol"?n+"":n,u);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),ot=require("@formio/react"),Ft=require("react-dom/client"),_r=require("react-day-picker"),qs=require("react-countdown"),he=require("moment"),le=require("design-react-kit"),Ge=require("sweetalert2");require("i18next");const Oe=require("dayjs"),_n=require("@formio/js"),pi=require("@event-calendar/core"),jc=require("react-dropzone"),Ut=require("axios"),Cc=require("mime"),Hs=require("dompurify"),Tc=require("jwt-decode"),At=require("leaflet"),gi=require("lodash");var pr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bn(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var gr={exports:{}},er={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var yi;function Pc(){if(yi)return er;yi=1;var l=G,n=Symbol.for("react.element"),u=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,x=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,D={key:!0,ref:!0,__self:!0,__source:!0};function F(o,y,r){var c,h={},f=null,g=null;r!==void 0&&(f=""+r),y.key!==void 0&&(f=""+y.key),y.ref!==void 0&&(g=y.ref);for(c in y)s.call(y,c)&&!D.hasOwnProperty(c)&&(h[c]=y[c]);if(o&&o.defaultProps)for(c in y=o.defaultProps,y)h[c]===void 0&&(h[c]=y[c]);return{$$typeof:n,type:o,key:f,ref:g,props:h,_owner:x.current}}return er.Fragment=u,er.jsx=F,er.jsxs=F,er}var tr={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+De[
|
|
17
|
+
*/var vi;function Nc(){return vi||(vi=1,process.env.NODE_ENV!=="production"&&(function(){var l=G,n=Symbol.for("react.element"),u=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),o=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),r=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),p=Symbol.iterator,C="@@iterator";function _(S){if(S===null||typeof S!="object")return null;var U=p&&S[p]||S[C];return typeof U=="function"?U:null}var O=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function T(S){{for(var U=arguments.length,X=new Array(U>1?U-1:0),oe=1;oe<U;oe++)X[oe-1]=arguments[oe];P("error",S,X)}}function P(S,U,X){{var oe=O.ReactDebugCurrentFrame,Me=oe.getStackAddendum();Me!==""&&(U+="%s",X=X.concat([Me]));var Ye=X.map(function(ke){return String(ke)});Ye.unshift("Warning: "+U),Function.prototype.apply.call(console[S],console,Ye)}}var z=!1,R=!1,Y=!1,v=!1,N=!1,w;w=Symbol.for("react.module.reference");function M(S){return!!(typeof S=="string"||typeof S=="function"||S===s||S===D||N||S===x||S===r||S===c||v||S===g||z||R||Y||typeof S=="object"&&S!==null&&(S.$$typeof===f||S.$$typeof===h||S.$$typeof===F||S.$$typeof===o||S.$$typeof===y||S.$$typeof===w||S.getModuleId!==void 0))}function W(S,U,X){var oe=S.displayName;if(oe)return oe;var Me=U.displayName||U.name||"";return Me!==""?X+"("+Me+")":X}function $(S){return S.displayName||"Context"}function L(S){if(S==null)return null;if(typeof S.tag=="number"&&T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof S=="function")return S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case s:return"Fragment";case u:return"Portal";case D:return"Profiler";case x:return"StrictMode";case r:return"Suspense";case c:return"SuspenseList"}if(typeof S=="object")switch(S.$$typeof){case o:var U=S;return $(U)+".Consumer";case F:var X=S;return $(X._context)+".Provider";case y:return W(S,S.render,"ForwardRef");case h:var oe=S.displayName||null;return oe!==null?oe:L(S.type)||"Memo";case f:{var Me=S,Ye=Me._payload,ke=Me._init;try{return L(ke(Ye))}catch{return null}}}return null}var A=Object.assign,B=0,J,ae,ee,fe,Z,ue,se;function ye(){}ye.__reactDisabledLog=!0;function ce(){{if(B===0){J=console.log,ae=console.info,ee=console.warn,fe=console.error,Z=console.group,ue=console.groupCollapsed,se=console.groupEnd;var S={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:S,log:S,warn:S,error:S,group:S,groupCollapsed:S,groupEnd:S})}B++}}function Q(){{if(B--,B===0){var S={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},S,{value:J}),info:A({},S,{value:ae}),warn:A({},S,{value:ee}),error:A({},S,{value:fe}),group:A({},S,{value:Z}),groupCollapsed:A({},S,{value:ue}),groupEnd:A({},S,{value:se})})}B<0&&T("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ve=O.ReactCurrentDispatcher,Pe;function _e(S,U,X){{if(Pe===void 0)try{throw Error()}catch(Me){var oe=Me.stack.trim().match(/\n( *(at )?)/);Pe=oe&&oe[1]||""}return`
|
|
18
|
+
`+Pe+S}}var Te=!1,Ae;{var ze=typeof WeakMap=="function"?WeakMap:Map;Ae=new ze}function E(S,U){if(!S||Te)return"";{var X=Ae.get(S);if(X!==void 0)return X}var oe;Te=!0;var Me=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ye;Ye=ve.current,ve.current=null,ce();try{if(U){var ke=function(){throw Error()};if(Object.defineProperty(ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ke,[])}catch(et){oe=et}Reflect.construct(S,[],ke)}else{try{ke.call()}catch(et){oe=et}S.call(ke.prototype)}}else{try{throw Error()}catch(et){oe=et}S()}}catch(et){if(et&&oe&&typeof et.stack=="string"){for(var De=et.stack.split(`
|
|
19
|
+
`),Ue=oe.stack.split(`
|
|
20
|
+
`),Le=De.length-1,$e=Ue.length-1;Le>=1&&$e>=0&&De[Le]!==Ue[$e];)$e--;for(;Le>=1&&$e>=0;Le--,$e--)if(De[Le]!==Ue[$e]){if(Le!==1||$e!==1)do if(Le--,$e--,$e<0||De[Le]!==Ue[$e]){var Ke=`
|
|
21
|
+
`+De[Le].replace(" at new "," at ");return S.displayName&&Ke.includes("<anonymous>")&&(Ke=Ke.replace("<anonymous>",S.displayName)),typeof S=="function"&&Ae.set(S,Ke),Ke}while(Le>=1&&$e>=0);break}}}finally{Te=!1,ve.current=Ye,Q(),Error.prepareStackTrace=Me}var dt=S?S.displayName||S.name:"",yt=dt?_e(dt):"";return typeof S=="function"&&Ae.set(S,yt),yt}function b(S,U,X){return E(S,!1)}function H(S){var U=S.prototype;return!!(U&&U.isReactComponent)}function j(S,U,X){if(S==null)return"";if(typeof S=="function")return E(S,H(S));if(typeof S=="string")return _e(S);switch(S){case r:return _e("Suspense");case c:return _e("SuspenseList")}if(typeof S=="object")switch(S.$$typeof){case y:return b(S.render);case h:return j(S.type,U,X);case f:{var oe=S,Me=oe._payload,Ye=oe._init;try{return j(Ye(Me),U,X)}catch{}}}return""}var I=Object.prototype.hasOwnProperty,V={},te=O.ReactDebugCurrentFrame;function ie(S){if(S){var U=S._owner,X=j(S.type,S._source,U?U.type:null);te.setExtraStackFrame(X)}else te.setExtraStackFrame(null)}function be(S,U,X,oe,Me){{var Ye=Function.call.bind(I);for(var ke in S)if(Ye(S,ke)){var De=void 0;try{if(typeof S[ke]!="function"){var Ue=Error((oe||"React class")+": "+X+" type `"+ke+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof S[ke]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ue.name="Invariant Violation",Ue}De=S[ke](U,ke,oe,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Le){De=Le}De&&!(De instanceof Error)&&(ie(Me),T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",oe||"React class",X,ke,typeof De),ie(null)),De instanceof Error&&!(De.message in V)&&(V[De.message]=!0,ie(Me),T("Failed %s type: %s",X,De.message),ie(null))}}}var de=Array.isArray;function me(S){return de(S)}function Se(S){{var U=typeof Symbol=="function"&&Symbol.toStringTag,X=U&&S[Symbol.toStringTag]||S.constructor.name||"Object";return X}}function Ee(S){try{return He(S),!1}catch{return!0}}function He(S){return""+S}function Ie(S){if(Ee(S))return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Se(S)),He(S)}var Je=O.ReactCurrentOwner,Ze={key:!0,ref:!0,__self:!0,__source:!0},ge,we;function Qe(S){if(I.call(S,"ref")){var U=Object.getOwnPropertyDescriptor(S,"ref").get;if(U&&U.isReactWarning)return!1}return S.ref!==void 0}function tt(S){if(I.call(S,"key")){var U=Object.getOwnPropertyDescriptor(S,"key").get;if(U&&U.isReactWarning)return!1}return S.key!==void 0}function ht(S,U){typeof S.ref=="string"&&Je.current}function vt(S,U){{var X=function(){ge||(ge=!0,T("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};X.isReactWarning=!0,Object.defineProperty(S,"key",{get:X,configurable:!0})}}function pt(S,U){{var X=function(){we||(we=!0,T("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};X.isReactWarning=!0,Object.defineProperty(S,"ref",{get:X,configurable:!0})}}var lt=function(S,U,X,oe,Me,Ye,ke){var De={$$typeof:n,type:S,key:U,ref:X,props:ke,_owner:Ye};return De._store={},Object.defineProperty(De._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(De,"_self",{configurable:!1,enumerable:!1,writable:!1,value:oe}),Object.defineProperty(De,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.freeze&&(Object.freeze(De.props),Object.freeze(De)),De};function _t(S,U,X,oe,Me){{var Ye,ke={},De=null,Ue=null;X!==void 0&&(Ie(X),De=""+X),tt(U)&&(Ie(U.key),De=""+U.key),Qe(U)&&(Ue=U.ref,ht(U,Me));for(Ye in U)I.call(U,Ye)&&!Ze.hasOwnProperty(Ye)&&(ke[Ye]=U[Ye]);if(S&&S.defaultProps){var Le=S.defaultProps;for(Ye in Le)ke[Ye]===void 0&&(ke[Ye]=Le[Ye])}if(De||Ue){var $e=typeof S=="function"?S.displayName||S.name||"Unknown":S;De&&vt(ke,$e),Ue&&pt(ke,$e)}return lt(S,De,Ue,Me,oe,Je.current,ke)}}var bt=O.ReactCurrentOwner,Be=O.ReactDebugCurrentFrame;function gt(S){if(S){var U=S._owner,X=j(S.type,S._source,U?U.type:null);Be.setExtraStackFrame(X)}else Be.setExtraStackFrame(null)}var ft;ft=!1;function ut(S){return typeof S=="object"&&S!==null&&S.$$typeof===n}function it(){{if(bt.current){var S=L(bt.current.type);if(S)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+S+"`."}return""}}function zt(S){return""}var re={};function Ar(S){{var U=it();if(!U){var X=typeof S=="string"?S:S.displayName||S.name;X&&(U=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+X+">.")}return U}}function ar(S,U){{if(!S._store||S._store.validated||S.key!=null)return;S._store.validated=!0;var X=Ar(U);if(re[X])return;re[X]=!0;var oe="";S&&S._owner&&S._owner!==bt.current&&(oe=" It was passed a child from "+L(S._owner.type)+"."),gt(S),T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X,oe),gt(null)}}function ct(S,U){{if(typeof S!="object")return;if(me(S))for(var X=0;X<S.length;X++){var oe=S[X];ut(oe)&&ar(oe,U)}else if(ut(S))S._store&&(S._store.validated=!0);else if(S){var Me=_(S);if(typeof Me=="function"&&Me!==S.entries)for(var Ye=Me.call(S),ke;!(ke=Ye.next()).done;)ut(ke.value)&&ar(ke.value,U)}}}function st(S){{var U=S.type;if(U==null||typeof U=="string")return;var X;if(typeof U=="function")X=U.propTypes;else if(typeof U=="object"&&(U.$$typeof===y||U.$$typeof===h))X=U.propTypes;else return;if(X){var oe=L(U);be(X,S.props,"prop",oe,S)}else if(U.PropTypes!==void 0&&!ft){ft=!0;var Me=L(U);T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Me||"Unknown")}typeof U.getDefaultProps=="function"&&!U.getDefaultProps.isReactClassApproved&&T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xe(S){{for(var U=Object.keys(S.props),X=0;X<U.length;X++){var oe=U[X];if(oe!=="children"&&oe!=="key"){gt(S),T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",oe),gt(null);break}}S.ref!==null&&(gt(S),T("Invalid attribute `ref` supplied to `React.Fragment`."),gt(null))}}var Vt={};function Re(S,U,X,oe,Me,Ye){{var ke=M(S);if(!ke){var De="";(S===void 0||typeof S=="object"&&S!==null&&Object.keys(S).length===0)&&(De+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ue=zt();Ue?De+=Ue:De+=it();var Le;S===null?Le="null":me(S)?Le="array":S!==void 0&&S.$$typeof===n?(Le="<"+(L(S.type)||"Unknown")+" />",De=" Did you accidentally export a JSX literal instead of a component?"):Le=typeof S,T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Le,De)}var $e=_t(S,U,X,Me,Ye);if($e==null)return $e;if(ke){var Ke=U.children;if(Ke!==void 0)if(oe)if(me(Ke)){for(var dt=0;dt<Ke.length;dt++)ct(Ke[dt],S);Object.freeze&&Object.freeze(Ke)}else T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ct(Ke,S)}if(I.call(U,"key")){var yt=L(S),et=Object.keys(U).filter(function(qe){return qe!=="key"}),Gt=et.length>0?"{key: someKey, "+et.join(": ..., ")+": ...}":"{key: someKey}";if(!Vt[yt+Gt]){var Fr=et.length>0?"{"+et.join(": ..., ")+": ...}":"{}";T(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,Gt,yt,Fr,yt),Vt[yt+Gt]=!0}}return S===s?xe($e):st($e),$e}}function Nt(S,U,X){return Re(S,U,X,!0)}function Ir(S,U,X){return Re(S,U,X,!1)}var Lt=Ir,Xe=Nt;tr.Fragment=s,tr.jsx=Lt,tr.jsxs=Xe})()),tr}var _i;function Rc(){return _i||(_i=1,process.env.NODE_ENV==="production"?gr.exports=Pc():gr.exports=Nc()),gr.exports}var m=Rc();const Ec=l=>{const n=G.useRef();return m.jsx("div",{ref:n,className:"row page-break-before pagebreak-container",children:m.jsx("div",{className:"col-12 text-center pagebreak-component",children:"Page break"})})},kr=class kr extends ot.ReactComponent{constructor(n,u,s){super(n,u,s)}static schema(){return ot.ReactComponent.schema({type:"pagebreak"})}render(){return super.render("<div></div>")}attach(n){return super.attach(n)}getValue(){return""}setValue(n){}attachReact(n,u){this.rootComponent=Ft.createRoot(n),this.rootComponent.render(m.jsx(Ec,{ref:u,...this,current:this}))}};Tt(kr,"builderInfo",{title:"PageBreak",group:"basic",icon:"bi bi-file-break",weight:70,schema:kr.schema()});let br=kr;const Fe=()=>{const l=window.location,n=new RegExp("qa.bugliano.pi.it|localhost|opencity-labs.gitlab.io","g");let u=null;if(n.test(l.hostname))u="https://servizi.comune-qa.bugliano.pi.it/lang";else if(window.BASE_URL)u=window.BASE_URL;else{const s=l.pathname.split("/");u=l.origin+"/"+s[1]}return u},Ac=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{type:"select",label:"Nome Calendario",key:"calendarId",input:!0,weight:1,placeholder:"Nome Calendario",tooltip:"Inserisci il nome del calendario",dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars?type=time_variable_slots"},valueProperty:"id",template:"<span>{{ item.title }}</span>",selectValues:"Results"},{type:"checkbox",label:"Seleziona orari di apertura",key:"select_opening_hours",input:!0,weight:1,tooltip:"Abilita per selezionare i singoli orari di apertura",defaultValue:!1},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1},{type:"select",label:"Orari di apertura",key:"opening_hours",input:!0,weight:1,placeholder:"Seleziona gli orari di apertura",tooltip:"Seleziona gli orari di apertura",multiple:!0,dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars/{{data.calendarId}}/opening-hours"},valueProperty:"id",template:"<span>{{ item.name }}</span>",selectValues:"results",conditional:{show:!0,when:"select_opening_hours",eq:"true"}},{label:"Api Url",redrawOn:"data",calculateValue:`if (data.calendarId) {
|
|
31
31
|
let url = data.url + '/api/calendars/' + data.calendarId + '/overlaps';
|
|
32
32
|
if (data.select_opening_hours && data.opening_hours.length > 0) {
|
|
33
33
|
let qs = "?opening_hours=" + data.opening_hours.join();
|
|
@@ -58,14 +58,14 @@ if(data.calendarId && data.api_url){
|
|
|
58
58
|
data.overlaps_validation = -1; document.querySelector("input[name^='data[overlaps_validation]']").value = -1;
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
|
-
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function fl(...f){return ot.Components.baseEditForm([{key:"display",components:hl}],...f)}function Yt(f){return(i={})=>{const g=i.width?String(i.width):f.defaultWidth;return f.formats[g]||f.formats[f.defaultWidth]}}function rt(f){return(i,g)=>{const l=g!=null&&g.context?String(g.context):"standalone";let V;if(l==="formatting"&&f.formattingValues){const X=f.defaultFormattingWidth||f.defaultWidth,s=g!=null&&g.width?String(g.width):X;V=f.formattingValues[s]||f.formattingValues[X]}else{const X=f.defaultWidth,s=g!=null&&g.width?String(g.width):f.defaultWidth;V=f.values[s]||f.values[X]}const B=f.argumentCallback?f.argumentCallback(i):i;return V[B]}}function nt(f){return(i,g={})=>{const l=g.width,V=l&&f.matchPatterns[l]||f.matchPatterns[f.defaultMatchWidth],B=i.match(V);if(!B)return null;const X=B[0],s=l&&f.parsePatterns[l]||f.parsePatterns[f.defaultParseWidth],x=Array.isArray(s)?pl(s,c=>c.test(X)):ml(s,c=>c.test(X));let a;a=f.valueCallback?f.valueCallback(x):x,a=g.valueCallback?g.valueCallback(a):a;const o=i.slice(X.length);return{value:a,rest:o}}}function ml(f,i){for(const g in f)if(Object.prototype.hasOwnProperty.call(f,g)&&i(f[g]))return g}function pl(f,i){for(let g=0;g<f.length;g++)if(i(f[g]))return g}function dr(f){return(i,g={})=>{const l=i.match(f.matchPattern);if(!l)return null;const V=l[0],B=i.match(f.parsePattern);if(!B)return null;let X=f.valueCallback?f.valueCallback(B[0]):B[0];X=g.valueCallback?g.valueCallback(X):X;const s=i.slice(V.length);return{value:X,rest:s}}}const nn=Symbol.for("constructDateFrom");function Sn(f,i){return typeof f=="function"?f(i):f&&typeof f=="object"&&nn in f?f[nn](i):f instanceof Date?new f.constructor(i):new Date(i)}function gl(f,...i){const g=Sn.bind(null,f||i.find(l=>typeof l=="object"));return i.map(g)}let yl={};function vl(){return yl}function bl(f,i){return Sn(i||f,f)}function sn(f,i){var s,x,a,o;const g=vl(),l=(i==null?void 0:i.weekStartsOn)??((x=(s=i==null?void 0:i.locale)==null?void 0:s.options)==null?void 0:x.weekStartsOn)??g.weekStartsOn??((o=(a=g.locale)==null?void 0:a.options)==null?void 0:o.weekStartsOn)??0,V=bl(f,i==null?void 0:i.in),B=V.getDay(),X=(B<l?7:0)+B-l;return V.setDate(V.getDate()-X),V.setHours(0,0,0,0),V}function on(f,i,g){const[l,V]=gl(g==null?void 0:g.in,f,i);return+sn(l,g)==+sn(V,g)}const ln={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},_l=(f,i,g)=>{let l;const V=g!=null&&g.addSuffix?ln[f].withPreposition:ln[f].standalone;return typeof V=="string"?l=V:i===1?l=V.one:l=V.other.replace("{{count}}",String(i)),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"in "+l:"vor "+l:l},wl={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},Ml={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},xl={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Sl={date:Yt({formats:wl,defaultWidth:"full"}),time:Yt({formats:Ml,defaultWidth:"full"}),dateTime:Yt({formats:xl,defaultWidth:"full"})},Dl={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},kl=(f,i,g,l)=>Dl[f],Yl={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},Ol={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},nr={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},jl={narrow:nr.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:nr.wide},Tl={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},Cl={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},Nl={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},Pl=f=>Number(f)+".",El={ordinalNumber:Pl,era:rt({values:Yl,defaultWidth:"wide"}),quarter:rt({values:Ol,defaultWidth:"wide",argumentCallback:f=>f-1}),month:rt({values:nr,formattingValues:jl,defaultWidth:"wide"}),day:rt({values:Tl,defaultWidth:"wide"}),dayPeriod:rt({values:Cl,defaultWidth:"wide",formattingValues:Nl,defaultFormattingWidth:"wide"})},Al=/^(\d+)(\.)?/i,Rl=/\d+/i,Il={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},Fl={any:[/^v/i,/^n/i]},zl={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},Ll={any:[/1/i,/2/i,/3/i,/4/i]},Wl={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},Vl={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Hl={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},$l={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},Bl={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},Ul={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},ql={ordinalNumber:dr({matchPattern:Al,parsePattern:Rl,valueCallback:f=>parseInt(f)}),era:nt({matchPatterns:Il,defaultMatchWidth:"wide",parsePatterns:Fl,defaultParseWidth:"any"}),quarter:nt({matchPatterns:zl,defaultMatchWidth:"wide",parsePatterns:Ll,defaultParseWidth:"any",valueCallback:f=>f+1}),month:nt({matchPatterns:Wl,defaultMatchWidth:"wide",parsePatterns:Vl,defaultParseWidth:"any"}),day:nt({matchPatterns:Hl,defaultMatchWidth:"wide",parsePatterns:$l,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:Bl,defaultMatchWidth:"wide",parsePatterns:Ul,defaultParseWidth:"any"})},Dn={code:"de",formatDistance:_l,formatLong:Sl,formatRelative:kl,localize:El,match:ql,options:{weekStartsOn:1,firstWeekContainsDate:4}},Jl={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Gl=(f,i,g)=>{let l;const V=Jl[f];return typeof V=="string"?l=V:i===1?l=V.one:l=V.other.replace("{{count}}",i.toString()),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"in "+l:l+" ago":l},Kl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xl=(f,i,g,l)=>Kl[f],Ql={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eu={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},tu={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},au={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ru={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},nu=(f,i)=>{const g=Number(f),l=g%100;if(l>20||l<10)switch(l%10){case 1:return g+"st";case 2:return g+"nd";case 3:return g+"rd"}return g+"th"},iu={ordinalNumber:nu,era:rt({values:Ql,defaultWidth:"wide"}),quarter:rt({values:Zl,defaultWidth:"wide",argumentCallback:f=>f-1}),month:rt({values:eu,defaultWidth:"wide"}),day:rt({values:tu,defaultWidth:"wide"}),dayPeriod:rt({values:au,defaultWidth:"wide",formattingValues:ru,defaultFormattingWidth:"wide"})},su=/^(\d+)(th|st|nd|rd)?/i,ou=/\d+/i,lu={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},uu={any:[/^b/i,/^(a|c)/i]},cu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},du={any:[/1/i,/2/i,/3/i,/4/i]},hu={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fu={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},mu={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pu={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},gu={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},yu={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},vu={ordinalNumber:dr({matchPattern:su,parsePattern:ou,valueCallback:f=>parseInt(f,10)}),era:nt({matchPatterns:lu,defaultMatchWidth:"wide",parsePatterns:uu,defaultParseWidth:"any"}),quarter:nt({matchPatterns:cu,defaultMatchWidth:"wide",parsePatterns:du,defaultParseWidth:"any",valueCallback:f=>f+1}),month:nt({matchPatterns:hu,defaultMatchWidth:"wide",parsePatterns:fu,defaultParseWidth:"any"}),day:nt({matchPatterns:mu,defaultMatchWidth:"wide",parsePatterns:pu,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:gu,defaultMatchWidth:"any",parsePatterns:yu,defaultParseWidth:"any"})},bu={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},_u={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},wu={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mu={date:Yt({formats:bu,defaultWidth:"full"}),time:Yt({formats:_u,defaultWidth:"full"}),dateTime:Yt({formats:wu,defaultWidth:"full"})},kn={code:"en-GB",formatDistance:Gl,formatLong:Mu,formatRelative:Xl,localize:iu,match:vu,options:{weekStartsOn:1,firstWeekContainsDate:4}},xu={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},Su=(f,i,g)=>{let l;const V=xu[f];return typeof V=="string"?l=V:i===1?l=V.one:l=V.other.replace("{{count}}",i.toString()),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"tra "+l:l+" fa":l},Du={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},ku={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Yu={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Ou={date:Yt({formats:Du,defaultWidth:"full"}),time:Yt({formats:ku,defaultWidth:"full"}),dateTime:Yt({formats:Yu,defaultWidth:"full"})},hr=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function ju(f){switch(f){case 0:return"'domenica scorsa alle' p";default:return"'"+hr[f]+" scorso alle' p"}}function un(f){return"'"+hr[f]+" alle' p"}function Tu(f){switch(f){case 0:return"'domenica prossima alle' p";default:return"'"+hr[f]+" prossimo alle' p"}}const Cu={lastWeek:(f,i,g)=>{const l=f.getDay();return on(f,i,g)?un(l):ju(l)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(f,i,g)=>{const l=f.getDay();return on(f,i,g)?un(l):Tu(l)},other:"P"},Nu=(f,i,g,l)=>{const V=Cu[f];return typeof V=="function"?V(i,g,l):V},Pu={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},Eu={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Au={narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},Ru={narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},Iu={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},Fu={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},zu=(f,i)=>{const g=Number(f);return String(g)},Lu={ordinalNumber:zu,era:rt({values:Pu,defaultWidth:"wide"}),quarter:rt({values:Eu,defaultWidth:"wide",argumentCallback:f=>f-1}),month:rt({values:Au,defaultWidth:"wide"}),day:rt({values:Ru,defaultWidth:"wide"}),dayPeriod:rt({values:Iu,defaultWidth:"wide",formattingValues:Fu,defaultFormattingWidth:"wide"})},Wu=/^(\d+)(º)?/i,Vu=/\d+/i,Hu={narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},$u={any:[/^a/i,/^(d|e)/i]},Bu={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},Uu={any:[/1/i,/2/i,/3/i,/4/i]},qu={narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},Ju={narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Gu={narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},Ku={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},Xu={narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},Qu={any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},Zu={ordinalNumber:dr({matchPattern:Wu,parsePattern:Vu,valueCallback:f=>parseInt(f,10)}),era:nt({matchPatterns:Hu,defaultMatchWidth:"wide",parsePatterns:$u,defaultParseWidth:"any"}),quarter:nt({matchPatterns:Bu,defaultMatchWidth:"wide",parsePatterns:Uu,defaultParseWidth:"any",valueCallback:f=>f+1}),month:nt({matchPatterns:qu,defaultMatchWidth:"wide",parsePatterns:Ju,defaultParseWidth:"any"}),day:nt({matchPatterns:Gu,defaultMatchWidth:"wide",parsePatterns:Ku,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:Xu,defaultMatchWidth:"any",parsePatterns:Qu,defaultParseWidth:"any"})},Yn={code:"it",formatDistance:Su,formatLong:Ou,formatRelative:Nu,localize:Lu,match:Zu,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Ca(f){throw new Error('Could not dynamically require "'+f+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ir={exports:{}},ga={exports:{}},ec=ga.exports,cn;function fr(){return cn||(cn=1,(function(f,i){(function(g,l){f.exports=l()})(ec,(function(){var g;function l(){return g.apply(null,arguments)}function V(e){g=e}function B(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function X(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(s(e,t))return!1;return!0}function a(e){return e===void 0}function o(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function c(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function d(e,t){var r=[],n,u=e.length;for(n=0;n<u;++n)r.push(t(e[n],n));return r}function p(e,t){for(var r in t)s(t,r)&&(e[r]=t[r]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,r,n){return Tr(e,t,r,n,!0).utc()}function T(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function v(e){return e._pf==null&&(e._pf=T()),e._pf}var D;Array.prototype.some?D=Array.prototype.some:D=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function O(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=v(e),r=D.call(t.parsedDateParts,function(u){return u!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function j(e){var t=m(NaN);return e!=null?p(v(t),e):v(t).userInvalidated=!0,t}var R=l.momentProperties=[],N=!1;function k(e,t){var r,n,u,S=R.length;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=v(t)),a(t._locale)||(e._locale=t._locale),S>0)for(r=0;r<S;r++)n=R[r],u=t[n],a(u)||(e[n]=u);return e}function y(e){k(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),N===!1&&(N=!0,l.updateOffset(this),N=!1)}function C(e){return e instanceof y||e!=null&&e._isAMomentObject!=null}function _(e){l.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function M(e,t){var r=!0;return p(function(){if(l.deprecationHandler!=null&&l.deprecationHandler(null,e),r){var n=[],u,S,L,ne=arguments.length;for(S=0;S<ne;S++){if(u="",typeof arguments[S]=="object"){u+=`
|
|
62
|
-
[`+
|
|
63
|
-
Arguments: `+Array.prototype.slice.call(
|
|
64
|
-
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var z={};function H(e,t){l.deprecationHandler!=null&&l.deprecationHandler(e,t),z[e]||(_(t),z[e]=!0)}l.suppressDeprecationWarnings=!1,l.deprecationHandler=null;function F(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function E(e){var t,r;for(r in e)s(e,r)&&(t=e[r],F(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function $(e,t){var r=p({},e),n;for(n in t)s(t,n)&&(X(e[n])&&X(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&X(e[n])&&(r[n]=p({},r[n]));return r}function J(e){e!=null&&this.set(e)}var re;Object.keys?re=Object.keys:re=function(e){var t,r=[];for(t in e)s(e,t)&&r.push(t);return r};var ee={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function fe(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return F(n)?n.call(t,r):n}function Q(e,t,r){var n=""+Math.abs(e),u=t-n.length,S=e>=0;return(S?r?"+":"":"-")+Math.pow(10,Math.max(0,u)).toString().substr(1)+n}var ue=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,se=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ye={},ce={};function Z(e,t,r,n){var u=n;typeof n=="string"&&(u=function(){return this[n]()}),e&&(ce[e]=u),t&&(ce[t[0]]=function(){return Q(u.apply(this,arguments),t[1],t[2])}),r&&(ce[r]=function(){return this.localeData().ordinal(u.apply(this,arguments),e)})}function ve(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ne(e){var t=e.match(ue),r,n;for(r=0,n=t.length;r<n;r++)ce[t[r]]?t[r]=ce[t[r]]:t[r]=ve(t[r]);return function(u){var S="",L;for(L=0;L<n;L++)S+=F(t[L])?t[L].call(u,e):t[L];return S}}function be(e,t){return e.isValid()?(t=Ce(t,e.localeData()),ye[t]=ye[t]||Ne(t),ye[t](e)):e.localeData().invalidDate()}function Ce(e,t){var r=5;function n(u){return t.longDateFormat(u)||u}for(se.lastIndex=0;r>=0&&se.test(e);)e=e.replace(se,n),se.lastIndex=0,r-=1;return e}var Re={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ze(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(ue).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var P="Invalid date";function b(){return this._invalidDate}var W="%d",Y=/\d{1,2}/;function A(e){return this._ordinal.replace("%d",e)}var I={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function te(e,t,r,n){var u=this._relativeTime[r];return F(u)?u(e,t,r,n):u.replace(/%d/i,e)}function ie(e,t){var r=this._relativeTime[e>0?"future":"past"];return F(r)?r(t):r.replace(/%s/i,t)}var _e={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function de(e){return typeof e=="string"?_e[e]||_e[e.toLowerCase()]:void 0}function me(e){var t={},r,n;for(n in e)s(e,n)&&(r=de(n),r&&(t[r]=e[n]));return t}var Me={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ae(e){var t=[],r;for(r in e)s(e,r)&&t.push({unit:r,priority:Me[r]});return t.sort(function(n,u){return n.priority-u.priority}),t}var $e=/\d/,Ie=/\d\d/,Ge=/\d{3}/,Qe=/\d{4}/,ge=/[+-]?\d{6}/,we=/\d\d?/,Ze=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,ht=/\d{1,3}/,vt=/\d{1,4}/,pt=/[+-]?\d{1,6}/,lt=/\d+/,bt=/[+-]?\d+/,_t=/Z|[+-]\d\d:?\d\d/gi,Ue=/Z|[+-]\d\d(?::?\d\d)?/gi,gt=/[+-]?\d+(\.\d{1,3})?/,ft=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut=/^[1-9]\d?/,it=/^([1-9]\d|\d)/,zt;zt={};function ae(e,t,r){zt[e]=F(t)?t:function(n,u){return n&&r?r:t}}function Na(e,t){return s(zt,e)?zt[e](t._strict,t._locale):new RegExp(ra(e))}function ra(e){return ct(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,u,S){return r||n||u||S}))}function ct(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function st(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Se(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=st(t)),r}var Lt={};function Ee(e,t){var r,n=t,u;for(typeof e=="string"&&(e=[e]),o(t)&&(n=function(S,L){L[t]=Se(S)}),u=e.length,r=0;r<u;r++)Lt[e[r]]=n}function Pt(e,t){Ee(e,function(r,n,u,S){u._w=u._w||{},t(r,u._w,u,S)})}function Pa(e,t,r){t!=null&&s(Lt,e)&&Lt[e](t,r._a,r,e)}function Wt(e){return e%4===0&&e%100!==0||e%400===0}var Xe=0,w=1,U=2,K=3,oe=4,xe=5,Oe=6,ke=7,De=8;Z("Y",0,0,function(){var e=this.year();return e<=9999?Q(e,4):"+"+e}),Z(0,["YY",2],0,function(){return this.year()%100}),Z(0,["YYYY",4],0,"year"),Z(0,["YYYYY",5],0,"year"),Z(0,["YYYYYY",6,!0],0,"year"),ae("Y",bt),ae("YY",we,Ie),ae("YYYY",vt,Qe),ae("YYYYY",pt,ge),ae("YYYYYY",pt,ge),Ee(["YYYYY","YYYYYY"],Xe),Ee("YYYY",function(e,t){t[Xe]=e.length===2?l.parseTwoDigitYear(e):Se(e)}),Ee("YY",function(e,t){t[Xe]=l.parseTwoDigitYear(e)}),Ee("Y",function(e,t){t[Xe]=parseInt(e,10)});function qe(e){return Wt(e)?366:365}l.parseTwoDigitYear=function(e){return Se(e)+(Se(e)>68?1900:2e3)};var We=Ke("FullYear",!0);function Be(){return Wt(this.year())}function Ke(e,t){return function(r){return r!=null?(yt(this,e,r),l.updateOffset(this,t),this):dt(this,e)}}function dt(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function yt(e,t,r){var n,u,S,L,ne;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,u=e._isUTC,t){case"Milliseconds":return void(u?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(u?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(u?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(u?n.setUTCHours(r):n.setHours(r));case"Date":return void(u?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}S=r,L=e.month(),ne=e.date(),ne=ne===29&&L===1&&!Wt(S)?28:ne,u?n.setUTCFullYear(S,L,ne):n.setFullYear(S,L,ne)}}function et(e){return e=de(e),F(this[e])?this[e]():this}function Jt(e,t){if(typeof e=="object"){e=me(e);var r=Ae(e),n,u=r.length;for(n=0;n<u;n++)this[r[n].unit](e[r[n].unit])}else if(e=de(e),F(this[e]))return this[e](t);return this}function Ea(e,t){return(e%t+t)%t}var He;Array.prototype.indexOf?He=Array.prototype.indexOf:He=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Aa(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Ea(t,12);return e+=(t-r)/12,r===1?Wt(e)?29:28:31-r%7%2}Z("M",["MM",2],"Mo",function(){return this.month()+1}),Z("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Z("MMMM",0,0,function(e){return this.localeData().months(this,e)}),ae("M",we,ut),ae("MM",we,Ie),ae("MMM",function(e,t){return t.monthsShortRegex(e)}),ae("MMMM",function(e,t){return t.monthsRegex(e)}),Ee(["M","MM"],function(e,t){t[w]=Se(e)-1}),Ee(["MMM","MMMM"],function(e,t,r,n){var u=r._locale.monthsParse(e,n,r._strict);u!=null?t[w]=u:v(r).invalidMonth=e});var Cn="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),gr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),yr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Nn=ft,Pn=ft;function En(e,t){return e?B(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||yr).test(t)?"format":"standalone"][e.month()]:B(this._months)?this._months:this._months.standalone}function An(e,t){return e?B(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[yr.test(t)?"format":"standalone"][e.month()]:B(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Rn(e,t,r){var n,u,S,L=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)S=m([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(S,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(S,"").toLocaleLowerCase();return r?t==="MMM"?(u=He.call(this._shortMonthsParse,L),u!==-1?u:null):(u=He.call(this._longMonthsParse,L),u!==-1?u:null):t==="MMM"?(u=He.call(this._shortMonthsParse,L),u!==-1?u:(u=He.call(this._longMonthsParse,L),u!==-1?u:null)):(u=He.call(this._longMonthsParse,L),u!==-1?u:(u=He.call(this._shortMonthsParse,L),u!==-1?u:null))}function In(e,t,r){var n,u,S;if(this._monthsParseExact)return Rn.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(u=m([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(u,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(u,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(S="^"+this.months(u,"")+"|^"+this.monthsShort(u,""),this._monthsParse[n]=new RegExp(S.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function vr(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Se(t);else if(t=e.localeData().monthsParse(t),!o(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Aa(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function br(e){return e!=null?(vr(this,e),l.updateOffset(this,!0),this):dt(this,"Month")}function Fn(){return Aa(this.year(),this.month())}function zn(e){return this._monthsParseExact?(s(this,"_monthsRegex")||_r.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=Nn),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ln(e){return this._monthsParseExact?(s(this,"_monthsRegex")||_r.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Pn),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function _r(){function e(pe,je){return je.length-pe.length}var t=[],r=[],n=[],u,S,L,ne;for(u=0;u<12;u++)S=m([2e3,u]),L=ct(this.monthsShort(S,"")),ne=ct(this.months(S,"")),t.push(L),r.push(ne),n.push(ne),n.push(L);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Wn(e,t,r,n,u,S,L){var ne;return e<100&&e>=0?(ne=new Date(e+400,t,r,n,u,S,L),isFinite(ne.getFullYear())&&ne.setFullYear(e)):ne=new Date(e,t,r,n,u,S,L),ne}function Gt(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function na(e,t,r){var n=7+t-r,u=(7+Gt(e,0,n).getUTCDay()-t)%7;return-u+n-1}function wr(e,t,r,n,u){var S=(7+r-n)%7,L=na(e,n,u),ne=1+7*(t-1)+S+L,pe,je;return ne<=0?(pe=e-1,je=qe(pe)+ne):ne>qe(e)?(pe=e+1,je=ne-qe(e)):(pe=e,je=ne),{year:pe,dayOfYear:je}}function Kt(e,t,r){var n=na(e.year(),t,r),u=Math.floor((e.dayOfYear()-n-1)/7)+1,S,L;return u<1?(L=e.year()-1,S=u+wt(L,t,r)):u>wt(e.year(),t,r)?(S=u-wt(e.year(),t,r),L=e.year()+1):(L=e.year(),S=u),{week:S,year:L}}function wt(e,t,r){var n=na(e,t,r),u=na(e+1,t,r);return(qe(e)-n+u)/7}Z("w",["ww",2],"wo","week"),Z("W",["WW",2],"Wo","isoWeek"),ae("w",we,ut),ae("ww",we,Ie),ae("W",we,ut),ae("WW",we,Ie),Pt(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Se(e)});function Vn(e){return Kt(e,this._week.dow,this._week.doy).week}var Hn={dow:0,doy:6};function $n(){return this._week.dow}function Bn(){return this._week.doy}function Un(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function qn(e){var t=Kt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Z("d",0,"do","day"),Z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Z("e",0,0,"weekday"),Z("E",0,0,"isoWeekday"),ae("d",we),ae("e",we),ae("E",we),ae("dd",function(e,t){return t.weekdaysMinRegex(e)}),ae("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ae("dddd",function(e,t){return t.weekdaysRegex(e)}),Pt(["dd","ddd","dddd"],function(e,t,r,n){var u=r._locale.weekdaysParse(e,n,r._strict);u!=null?t.d=u:v(r).invalidWeekday=e}),Pt(["d","e","E"],function(e,t,r,n){t[n]=Se(e)});function Jn(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Gn(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ra(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Kn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qn=ft,Zn=ft,ei=ft;function ti(e,t){var r=B(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Ra(r,this._week.dow):e?r[e.day()]:r}function ai(e){return e===!0?Ra(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ri(e){return e===!0?Ra(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ni(e,t,r){var n,u,S,L=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)S=m([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(S,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(S,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(S,"").toLocaleLowerCase();return r?t==="dddd"?(u=He.call(this._weekdaysParse,L),u!==-1?u:null):t==="ddd"?(u=He.call(this._shortWeekdaysParse,L),u!==-1?u:null):(u=He.call(this._minWeekdaysParse,L),u!==-1?u:null):t==="dddd"?(u=He.call(this._weekdaysParse,L),u!==-1||(u=He.call(this._shortWeekdaysParse,L),u!==-1)?u:(u=He.call(this._minWeekdaysParse,L),u!==-1?u:null)):t==="ddd"?(u=He.call(this._shortWeekdaysParse,L),u!==-1||(u=He.call(this._weekdaysParse,L),u!==-1)?u:(u=He.call(this._minWeekdaysParse,L),u!==-1?u:null)):(u=He.call(this._minWeekdaysParse,L),u!==-1||(u=He.call(this._weekdaysParse,L),u!==-1)?u:(u=He.call(this._shortWeekdaysParse,L),u!==-1?u:null))}function ii(e,t,r){var n,u,S;if(this._weekdaysParseExact)return ni.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(u=m([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(u,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(u,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(u,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(S="^"+this.weekdays(u,"")+"|^"+this.weekdaysShort(u,"")+"|^"+this.weekdaysMin(u,""),this._weekdaysParse[n]=new RegExp(S.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function si(e){if(!this.isValid())return e!=null?this:NaN;var t=dt(this,"Day");return e!=null?(e=Jn(e,this.localeData()),this.add(e-t,"d")):t}function oi(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function li(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Gn(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ui(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Qn),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ci(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Zn),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function di(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ei),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ia(){function e(at,kt){return kt.length-at.length}var t=[],r=[],n=[],u=[],S,L,ne,pe,je;for(S=0;S<7;S++)L=m([2e3,1]).day(S),ne=ct(this.weekdaysMin(L,"")),pe=ct(this.weekdaysShort(L,"")),je=ct(this.weekdays(L,"")),t.push(ne),r.push(pe),n.push(je),u.push(ne),u.push(pe),u.push(je);t.sort(e),r.sort(e),n.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Fa(){return this.hours()%12||12}function hi(){return this.hours()||24}Z("H",["HH",2],0,"hour"),Z("h",["hh",2],0,Fa),Z("k",["kk",2],0,hi),Z("hmm",0,0,function(){return""+Fa.apply(this)+Q(this.minutes(),2)}),Z("hmmss",0,0,function(){return""+Fa.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),Z("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),Z("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)});function xr(e,t){Z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}xr("a",!0),xr("A",!1);function Sr(e,t){return t._meridiemParse}ae("a",Sr),ae("A",Sr),ae("H",we,it),ae("h",we,ut),ae("k",we,ut),ae("HH",we,Ie),ae("hh",we,Ie),ae("kk",we,Ie),ae("hmm",Ze),ae("hmmss",tt),ae("Hmm",Ze),ae("Hmmss",tt),Ee(["H","HH"],K),Ee(["k","kk"],function(e,t,r){var n=Se(e);t[K]=n===24?0:n}),Ee(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),Ee(["h","hh"],function(e,t,r){t[K]=Se(e),v(r).bigHour=!0}),Ee("hmm",function(e,t,r){var n=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n)),v(r).bigHour=!0}),Ee("hmmss",function(e,t,r){var n=e.length-4,u=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[xe]=Se(e.substr(u)),v(r).bigHour=!0}),Ee("Hmm",function(e,t,r){var n=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n))}),Ee("Hmmss",function(e,t,r){var n=e.length-4,u=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[xe]=Se(e.substr(u))});function fi(e){return(e+"").toLowerCase().charAt(0)==="p"}var mi=/[ap]\.?m?\.?/i,pi=Ke("Hours",!0);function gi(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Dr={calendar:ee,longDateFormat:Re,invalidDate:P,ordinal:W,dayOfMonthOrdinalParse:Y,relativeTime:I,months:Cn,monthsShort:gr,week:Hn,weekdays:Kn,weekdaysMin:Xn,weekdaysShort:Mr,meridiemParse:mi},Ve={},Xt={},Qt;function yi(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function kr(e){return e&&e.toLowerCase().replace("_","-")}function vi(e){for(var t=0,r,n,u,S;t<e.length;){for(S=kr(e[t]).split("-"),r=S.length,n=kr(e[t+1]),n=n?n.split("-"):null;r>0;){if(u=ia(S.slice(0,r).join("-")),u)return u;if(n&&n.length>=r&&yi(S,n)>=r-1)break;r--}t++}return Qt}function bi(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ia(e){var t=null,r;if(Ve[e]===void 0&&f&&f.exports&&bi(e))try{t=Qt._abbr,r=Ca,r("./locale/"+e),Ot(t)}catch{Ve[e]=null}return Ve[e]}function Ot(e,t){var r;return e&&(a(t)?r=Mt(e):r=za(e,t),r?Qt=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Qt._abbr}function za(e,t){if(t!==null){var r,n=Dr;if(t.abbr=e,Ve[e]!=null)H("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ve[e]._config;else if(t.parentLocale!=null)if(Ve[t.parentLocale]!=null)n=Ve[t.parentLocale]._config;else if(r=ia(t.parentLocale),r!=null)n=r._config;else return Xt[t.parentLocale]||(Xt[t.parentLocale]=[]),Xt[t.parentLocale].push({name:e,config:t}),null;return Ve[e]=new J($(n,t)),Xt[e]&&Xt[e].forEach(function(u){za(u.name,u.config)}),Ot(e),Ve[e]}else return delete Ve[e],null}function _i(e,t){if(t!=null){var r,n,u=Dr;Ve[e]!=null&&Ve[e].parentLocale!=null?Ve[e].set($(Ve[e]._config,t)):(n=ia(e),n!=null&&(u=n._config),t=$(u,t),n==null&&(t.abbr=e),r=new J(t),r.parentLocale=Ve[e],Ve[e]=r),Ot(e)}else Ve[e]!=null&&(Ve[e].parentLocale!=null?(Ve[e]=Ve[e].parentLocale,e===Ot()&&Ot(e)):Ve[e]!=null&&delete Ve[e]);return Ve[e]}function Mt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qt;if(!B(e)){if(t=ia(e),t)return t;e=[e]}return vi(e)}function wi(){return re(Ve)}function La(e){var t,r=e._a;return r&&v(e).overflow===-2&&(t=r[w]<0||r[w]>11?w:r[U]<1||r[U]>Aa(r[Xe],r[w])?U:r[K]<0||r[K]>24||r[K]===24&&(r[oe]!==0||r[xe]!==0||r[Oe]!==0)?K:r[oe]<0||r[oe]>59?oe:r[xe]<0||r[xe]>59?xe:r[Oe]<0||r[Oe]>999?Oe:-1,v(e)._overflowDayOfYear&&(t<Xe||t>U)&&(t=U),v(e)._overflowWeeks&&t===-1&&(t=ke),v(e)._overflowWeekday&&t===-1&&(t=De),v(e).overflow=t),e}var Mi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xi=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Si=/Z|[+-]\d\d(?::?\d\d)?/,sa=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Wa=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Di=/^\/?Date\((-?\d+)/i,ki=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Yi={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yr(e){var t,r,n=e._i,u=Mi.exec(n)||xi.exec(n),S,L,ne,pe,je=sa.length,at=Wa.length;if(u){for(v(e).iso=!0,t=0,r=je;t<r;t++)if(sa[t][1].exec(u[1])){L=sa[t][0],S=sa[t][2]!==!1;break}if(L==null){e._isValid=!1;return}if(u[3]){for(t=0,r=at;t<r;t++)if(Wa[t][1].exec(u[3])){ne=(u[2]||" ")+Wa[t][0];break}if(ne==null){e._isValid=!1;return}}if(!S&&ne!=null){e._isValid=!1;return}if(u[4])if(Si.exec(u[4]))pe="Z";else{e._isValid=!1;return}e._f=L+(ne||"")+(pe||""),Ha(e)}else e._isValid=!1}function Oi(e,t,r,n,u,S){var L=[ji(e),gr.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(u,10)];return S&&L.push(parseInt(S,10)),L}function ji(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ti(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ci(e,t,r){if(e){var n=Mr.indexOf(e),u=new Date(t[0],t[1],t[2]).getDay();if(n!==u)return v(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Ni(e,t,r){if(e)return Yi[e];if(t)return 0;var n=parseInt(r,10),u=n%100,S=(n-u)/100;return S*60+u}function Or(e){var t=ki.exec(Ti(e._i)),r;if(t){if(r=Oi(t[4],t[3],t[2],t[5],t[6],t[7]),!Ci(t[1],r,e))return;e._a=r,e._tzm=Ni(t[8],t[9],t[10]),e._d=Gt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),v(e).rfc2822=!0}else e._isValid=!1}function Pi(e){var t=Di.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Yr(e),e._isValid===!1)delete e._isValid;else return;if(Or(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:l.createFromInputFallback(e)}l.createFromInputFallback=M("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Vt(e,t,r){return e??t??r}function Ei(e){var t=new Date(l.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Va(e){var t,r,n=[],u,S,L;if(!e._d){for(u=Ei(e),e._w&&e._a[U]==null&&e._a[w]==null&&Ai(e),e._dayOfYear!=null&&(L=Vt(e._a[Xe],u[Xe]),(e._dayOfYear>qe(L)||e._dayOfYear===0)&&(v(e)._overflowDayOfYear=!0),r=Gt(L,0,e._dayOfYear),e._a[w]=r.getUTCMonth(),e._a[U]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=u[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[K]===24&&e._a[oe]===0&&e._a[xe]===0&&e._a[Oe]===0&&(e._nextDay=!0,e._a[K]=0),e._d=(e._useUTC?Gt:Wn).apply(null,n),S=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[K]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==S&&(v(e).weekdayMismatch=!0)}}function Ai(e){var t,r,n,u,S,L,ne,pe,je;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(S=1,L=4,r=Vt(t.GG,e._a[Xe],Kt(Le(),1,4).year),n=Vt(t.W,1),u=Vt(t.E,1),(u<1||u>7)&&(pe=!0)):(S=e._locale._week.dow,L=e._locale._week.doy,je=Kt(Le(),S,L),r=Vt(t.gg,e._a[Xe],je.year),n=Vt(t.w,je.week),t.d!=null?(u=t.d,(u<0||u>6)&&(pe=!0)):t.e!=null?(u=t.e+S,(t.e<0||t.e>6)&&(pe=!0)):u=S),n<1||n>wt(r,S,L)?v(e)._overflowWeeks=!0:pe!=null?v(e)._overflowWeekday=!0:(ne=wr(r,n,u,S,L),e._a[Xe]=ne.year,e._dayOfYear=ne.dayOfYear)}l.ISO_8601=function(){},l.RFC_2822=function(){};function Ha(e){if(e._f===l.ISO_8601){Yr(e);return}if(e._f===l.RFC_2822){Or(e);return}e._a=[],v(e).empty=!0;var t=""+e._i,r,n,u,S,L,ne=t.length,pe=0,je,at;for(u=Ce(e._f,e._locale).match(ue)||[],at=u.length,r=0;r<at;r++)S=u[r],n=(t.match(Na(S,e))||[])[0],n&&(L=t.substr(0,t.indexOf(n)),L.length>0&&v(e).unusedInput.push(L),t=t.slice(t.indexOf(n)+n.length),pe+=n.length),ce[S]?(n?v(e).empty=!1:v(e).unusedTokens.push(S),Pa(S,n,e)):e._strict&&!n&&v(e).unusedTokens.push(S);v(e).charsLeftOver=ne-pe,t.length>0&&v(e).unusedInput.push(t),e._a[K]<=12&&v(e).bigHour===!0&&e._a[K]>0&&(v(e).bigHour=void 0),v(e).parsedDateParts=e._a.slice(0),v(e).meridiem=e._meridiem,e._a[K]=Ri(e._locale,e._a[K],e._meridiem),je=v(e).era,je!==null&&(e._a[Xe]=e._locale.erasConvertYear(je,e._a[Xe])),Va(e),La(e)}function Ri(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function Ii(e){var t,r,n,u,S,L,ne=!1,pe=e._f.length;if(pe===0){v(e).invalidFormat=!0,e._d=new Date(NaN);return}for(u=0;u<pe;u++)S=0,L=!1,t=k({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[u],Ha(t),O(t)&&(L=!0),S+=v(t).charsLeftOver,S+=v(t).unusedTokens.length*10,v(t).score=S,ne?S<n&&(n=S,r=t):(n==null||S<n||L)&&(n=S,r=t,L&&(ne=!0));p(e,r||t)}function Fi(e){if(!e._d){var t=me(e._i),r=t.day===void 0?t.date:t.day;e._a=d([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Va(e)}}function zi(e){var t=new y(La(jr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function jr(e){var t=e._i,r=e._f;return e._locale=e._locale||Mt(e._l),t===null||r===void 0&&t===""?j({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),C(t)?new y(La(t)):(c(t)?e._d=t:B(r)?Ii(e):r?Ha(e):Li(e),O(e)||(e._d=null),e))}function Li(e){var t=e._i;a(t)?e._d=new Date(l.now()):c(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Pi(e):B(t)?(e._a=d(t.slice(0),function(r){return parseInt(r,10)}),Va(e)):X(t)?Fi(e):o(t)?e._d=new Date(t):l.createFromInputFallback(e)}function Tr(e,t,r,n,u){var S={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(X(e)&&x(e)||B(e)&&e.length===0)&&(e=void 0),S._isAMomentObject=!0,S._useUTC=S._isUTC=u,S._l=r,S._i=e,S._f=t,S._strict=n,zi(S)}function Le(e,t,r,n){return Tr(e,t,r,n,!1)}var Wi=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Le.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:j()}),Vi=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Le.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:j()});function Cr(e,t){var r,n;if(t.length===1&&B(t[0])&&(t=t[0]),!t.length)return Le();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Hi(){var e=[].slice.call(arguments,0);return Cr("isBefore",e)}function $i(){var e=[].slice.call(arguments,0);return Cr("isAfter",e)}var Bi=function(){return Date.now?Date.now():+new Date},Zt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ui(e){var t,r=!1,n,u=Zt.length;for(t in e)if(s(e,t)&&!(He.call(Zt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<u;++n)if(e[Zt[n]]){if(r)return!1;parseFloat(e[Zt[n]])!==Se(e[Zt[n]])&&(r=!0)}return!0}function qi(){return this._isValid}function Ji(){return mt(NaN)}function oa(e){var t=me(e),r=t.year||0,n=t.quarter||0,u=t.month||0,S=t.week||t.isoWeek||0,L=t.day||0,ne=t.hour||0,pe=t.minute||0,je=t.second||0,at=t.millisecond||0;this._isValid=Ui(t),this._milliseconds=+at+je*1e3+pe*6e4+ne*1e3*60*60,this._days=+L+S*7,this._months=+u+n*3+r*12,this._data={},this._locale=Mt(),this._bubble()}function la(e){return e instanceof oa}function $a(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Gi(e,t,r){var n=Math.min(e.length,t.length),u=Math.abs(e.length-t.length),S=0,L;for(L=0;L<n;L++)Se(e[L])!==Se(t[L])&&S++;return S+u}function Nr(e,t){Z(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Q(~~(r/60),2)+t+Q(~~r%60,2)})}Nr("Z",":"),Nr("ZZ",""),ae("Z",Ue),ae("ZZ",Ue),Ee(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Ba(Ue,e)});var Ki=/([\+\-]|\d\d)/gi;function Ba(e,t){var r=(t||"").match(e),n,u,S;return r===null?null:(n=r[r.length-1]||[],u=(n+"").match(Ki)||["-",0,0],S=+(u[1]*60)+Se(u[2]),S===0?0:u[0]==="+"?S:-S)}function Ua(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(C(e)||c(e)?e.valueOf():Le(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),l.updateOffset(r,!1),r):Le(e).local()}function qa(e){return-Math.round(e._d.getTimezoneOffset())}l.updateOffset=function(){};function Xi(e,t,r){var n=this._offset||0,u;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Ba(Ue,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(u=qa(this)),this._offset=e,this._isUTC=!0,u!=null&&this.add(u,"m"),n!==e&&(!t||this._changeInProgress?Rr(this,mt(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,l.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:qa(this)}function Qi(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Zi(e){return this.utcOffset(0,e)}function es(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qa(this),"m")),this}function ts(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Ba(_t,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function as(e){return this.isValid()?(e=e?Le(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function rs(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ns(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={},t;return k(e,this),e=jr(e),e._a?(t=e._isUTC?m(e._a):Le(e._a),this._isDSTShifted=this.isValid()&&Gi(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function is(){return this.isValid()?!this._isUTC:!1}function ss(){return this.isValid()?this._isUTC:!1}function Pr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var os=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ls=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function mt(e,t){var r=e,n=null,u,S,L;return la(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:o(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=os.exec(e))?(u=n[1]==="-"?-1:1,r={y:0,d:Se(n[U])*u,h:Se(n[K])*u,m:Se(n[oe])*u,s:Se(n[xe])*u,ms:Se($a(n[Oe]*1e3))*u}):(n=ls.exec(e))?(u=n[1]==="-"?-1:1,r={y:Et(n[2],u),M:Et(n[3],u),w:Et(n[4],u),d:Et(n[5],u),h:Et(n[6],u),m:Et(n[7],u),s:Et(n[8],u)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(L=us(Le(r.from),Le(r.to)),r={},r.ms=L.milliseconds,r.M=L.months),S=new oa(r),la(e)&&s(e,"_locale")&&(S._locale=e._locale),la(e)&&s(e,"_isValid")&&(S._isValid=e._isValid),S}mt.fn=oa.prototype,mt.invalid=Ji;function Et(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Er(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function us(e,t){var r;return e.isValid()&&t.isValid()?(t=Ua(t,e),e.isBefore(t)?r=Er(e,t):(r=Er(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Ar(e,t){return function(r,n){var u,S;return n!==null&&!isNaN(+n)&&(H(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),S=r,r=n,n=S),u=mt(r,n),Rr(this,u,e),this}}function Rr(e,t,r,n){var u=t._milliseconds,S=$a(t._days),L=$a(t._months);e.isValid()&&(n=n??!0,L&&vr(e,dt(e,"Month")+L*r),S&&yt(e,"Date",dt(e,"Date")+S*r),u&&e._d.setTime(e._d.valueOf()+u*r),n&&l.updateOffset(e,S||L))}var cs=Ar(1,"add"),ds=Ar(-1,"subtract");function Ir(e){return typeof e=="string"||e instanceof String}function hs(e){return C(e)||c(e)||Ir(e)||o(e)||ms(e)||fs(e)||e===null||e===void 0}function fs(e){var t=X(e)&&!x(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u,S,L=n.length;for(u=0;u<L;u+=1)S=n[u],r=r||s(e,S);return t&&r}function ms(e){var t=B(e),r=!1;return t&&(r=e.filter(function(n){return!o(n)&&Ir(e)}).length===0),t&&r}function ps(e){var t=X(e)&&!x(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],u,S;for(u=0;u<n.length;u+=1)S=n[u],r=r||s(e,S);return t&&r}function gs(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function ys(e,t){arguments.length===1&&(arguments[0]?hs(arguments[0])?(e=arguments[0],t=void 0):ps(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Le(),n=Ua(r,this).startOf("day"),u=l.calendarFormat(this,n)||"sameElse",S=t&&(F(t[u])?t[u].call(this,r):t[u]);return this.format(S||this.localeData().calendar(u,this,Le(r)))}function vs(){return new y(this)}function bs(e,t){var r=C(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function _s(e,t){var r=C(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function ws(e,t,r,n){var u=C(e)?e:Le(e),S=C(t)?t:Le(t);return this.isValid()&&u.isValid()&&S.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(u,r):!this.isBefore(u,r))&&(n[1]===")"?this.isBefore(S,r):!this.isAfter(S,r))):!1}function Ms(e,t){var r=C(e)?e:Le(e),n;return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function xs(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Ss(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ds(e,t,r){var n,u,S;if(!this.isValid())return NaN;if(n=Ua(e,this),!n.isValid())return NaN;switch(u=(n.utcOffset()-this.utcOffset())*6e4,t=de(t),t){case"year":S=ua(this,n)/12;break;case"month":S=ua(this,n);break;case"quarter":S=ua(this,n)/3;break;case"second":S=(this-n)/1e3;break;case"minute":S=(this-n)/6e4;break;case"hour":S=(this-n)/36e5;break;case"day":S=(this-n-u)/864e5;break;case"week":S=(this-n-u)/6048e5;break;default:S=this-n}return r?S:st(S)}function ua(e,t){if(e.date()<t.date())return-ua(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),u,S;return t-n<0?(u=e.clone().add(r-1,"months"),S=(t-n)/(n-u)):(u=e.clone().add(r+1,"months"),S=(t-n)/(u-n)),-(r+S)||0}l.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",l.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function ks(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ys(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?be(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):F(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",be(r,"Z")):be(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Os(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,u,S;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",u="-MM-DD[T]HH:mm:ss.SSS",S=t+'[")]',this.format(r+n+u+S)}function js(e){e||(e=this.isUtc()?l.defaultFormatUtc:l.defaultFormat);var t=be(this,e);return this.localeData().postformat(t)}function Ts(e,t){return this.isValid()&&(C(e)&&e.isValid()||Le(e).isValid())?mt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Cs(e){return this.from(Le(),e)}function Ns(e,t){return this.isValid()&&(C(e)&&e.isValid()||Le(e).isValid())?mt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Ps(e){return this.to(Le(),e)}function Fr(e){var t;return e===void 0?this._locale._abbr:(t=Mt(e),t!=null&&(this._locale=t),this)}var zr=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Lr(){return this._locale}var ca=1e3,Ht=60*ca,da=60*Ht,Wr=(365*400+97)*24*da;function $t(e,t){return(e%t+t)%t}function Vr(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Wr:new Date(e,t,r).valueOf()}function Hr(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Wr:Date.UTC(e,t,r)}function Es(e){var t,r;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Hr:Vr,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=$t(t+(this._isUTC?0:this.utcOffset()*Ht),da);break;case"minute":t=this._d.valueOf(),t-=$t(t,Ht);break;case"second":t=this._d.valueOf(),t-=$t(t,ca);break}return this._d.setTime(t),l.updateOffset(this,!0),this}function As(e){var t,r;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Hr:Vr,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=da-$t(t+(this._isUTC?0:this.utcOffset()*Ht),da)-1;break;case"minute":t=this._d.valueOf(),t+=Ht-$t(t,Ht)-1;break;case"second":t=this._d.valueOf(),t+=ca-$t(t,ca)-1;break}return this._d.setTime(t),l.updateOffset(this,!0),this}function Rs(){return this._d.valueOf()-(this._offset||0)*6e4}function Is(){return Math.floor(this.valueOf()/1e3)}function Fs(){return new Date(this.valueOf())}function zs(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ls(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ws(){return this.isValid()?this.toISOString():null}function Vs(){return O(this)}function Hs(){return p({},v(this))}function $s(){return v(this).overflow}function Bs(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Z("N",0,0,"eraAbbr"),Z("NN",0,0,"eraAbbr"),Z("NNN",0,0,"eraAbbr"),Z("NNNN",0,0,"eraName"),Z("NNNNN",0,0,"eraNarrow"),Z("y",["y",1],"yo","eraYear"),Z("y",["yy",2],0,"eraYear"),Z("y",["yyy",3],0,"eraYear"),Z("y",["yyyy",4],0,"eraYear"),ae("N",Ja),ae("NN",Ja),ae("NNN",Ja),ae("NNNN",ao),ae("NNNNN",ro),Ee(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var u=r._locale.erasParse(e,n,r._strict);u?v(r).era=u:v(r).invalidEra=e}),ae("y",lt),ae("yy",lt),ae("yyy",lt),ae("yyyy",lt),ae("yo",no),Ee(["y","yy","yyy","yyyy"],Xe),Ee(["yo"],function(e,t,r,n){var u;r._locale._eraYearOrdinalRegex&&(u=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Xe]=r._locale.eraYearOrdinalParse(e,u):t[Xe]=parseInt(e,10)});function Us(e,t){var r,n,u,S=this._eras||Mt("en")._eras;for(r=0,n=S.length;r<n;++r){switch(typeof S[r].since){case"string":u=l(S[r].since).startOf("day"),S[r].since=u.valueOf();break}switch(typeof S[r].until){case"undefined":S[r].until=1/0;break;case"string":u=l(S[r].until).startOf("day").valueOf(),S[r].until=u.valueOf();break}}return S}function qs(e,t,r){var n,u,S=this.eras(),L,ne,pe;for(e=e.toUpperCase(),n=0,u=S.length;n<u;++n)if(L=S[n].name.toUpperCase(),ne=S[n].abbr.toUpperCase(),pe=S[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(ne===e)return S[n];break;case"NNNN":if(L===e)return S[n];break;case"NNNNN":if(pe===e)return S[n];break}else if([L,ne,pe].indexOf(e)>=0)return S[n]}function Js(e,t){var r=e.since<=e.until?1:-1;return t===void 0?l(e.since).year():l(e.since).year()+(t-e.offset)*r}function Gs(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function Ks(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function Xs(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function Qs(){var e,t,r,n,u=this.localeData().eras();for(e=0,t=u.length;e<t;++e)if(r=u[e].since<=u[e].until?1:-1,n=this.clone().startOf("day").valueOf(),u[e].since<=n&&n<=u[e].until||u[e].until<=n&&n<=u[e].since)return(this.year()-l(u[e].since).year())*r+u[e].offset;return this.year()}function Zs(e){return s(this,"_erasNameRegex")||Ga.call(this),e?this._erasNameRegex:this._erasRegex}function eo(e){return s(this,"_erasAbbrRegex")||Ga.call(this),e?this._erasAbbrRegex:this._erasRegex}function to(e){return s(this,"_erasNarrowRegex")||Ga.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ja(e,t){return t.erasAbbrRegex(e)}function ao(e,t){return t.erasNameRegex(e)}function ro(e,t){return t.erasNarrowRegex(e)}function no(e,t){return t._eraYearOrdinalRegex||lt}function Ga(){var e=[],t=[],r=[],n=[],u,S,L,ne,pe,je=this.eras();for(u=0,S=je.length;u<S;++u)L=ct(je[u].name),ne=ct(je[u].abbr),pe=ct(je[u].narrow),t.push(L),e.push(ne),r.push(pe),n.push(L),n.push(ne),n.push(pe);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}Z(0,["gg",2],0,function(){return this.weekYear()%100}),Z(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ha(e,t){Z(0,[e,e.length],0,t)}ha("gggg","weekYear"),ha("ggggg","weekYear"),ha("GGGG","isoWeekYear"),ha("GGGGG","isoWeekYear"),ae("G",bt),ae("g",bt),ae("GG",we,Ie),ae("gg",we,Ie),ae("GGGG",vt,Qe),ae("gggg",vt,Qe),ae("GGGGG",pt,ge),ae("ggggg",pt,ge),Pt(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=Se(e)}),Pt(["gg","GG"],function(e,t,r,n){t[n]=l.parseTwoDigitYear(e)});function io(e){return $r.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function so(e){return $r.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function oo(){return wt(this.year(),1,4)}function lo(){return wt(this.isoWeekYear(),1,4)}function uo(){var e=this.localeData()._week;return wt(this.year(),e.dow,e.doy)}function co(){var e=this.localeData()._week;return wt(this.weekYear(),e.dow,e.doy)}function $r(e,t,r,n,u){var S;return e==null?Kt(this,n,u).year:(S=wt(e,n,u),t>S&&(t=S),ho.call(this,e,t,r,n,u))}function ho(e,t,r,n,u){var S=wr(e,t,r,n,u),L=Gt(S.year,0,S.dayOfYear);return this.year(L.getUTCFullYear()),this.month(L.getUTCMonth()),this.date(L.getUTCDate()),this}Z("Q",0,"Qo","quarter"),ae("Q",$e),Ee("Q",function(e,t){t[w]=(Se(e)-1)*3});function fo(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Z("D",["DD",2],"Do","date"),ae("D",we,ut),ae("DD",we,Ie),ae("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Ee(["D","DD"],U),Ee("Do",function(e,t){t[U]=Se(e.match(we)[0])});var Br=Ke("Date",!0);Z("DDD",["DDDD",3],"DDDo","dayOfYear"),ae("DDD",ht),ae("DDDD",Ge),Ee(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Se(e)});function mo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Z("m",["mm",2],0,"minute"),ae("m",we,it),ae("mm",we,Ie),Ee(["m","mm"],oe);var po=Ke("Minutes",!1);Z("s",["ss",2],0,"second"),ae("s",we,it),ae("ss",we,Ie),Ee(["s","ss"],xe);var go=Ke("Seconds",!1);Z("S",0,0,function(){return~~(this.millisecond()/100)}),Z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Z(0,["SSS",3],0,"millisecond"),Z(0,["SSSS",4],0,function(){return this.millisecond()*10}),Z(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Z(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Z(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Z(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Z(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ae("S",ht,$e),ae("SS",ht,Ie),ae("SSS",ht,Ge);var jt,Ur;for(jt="SSSS";jt.length<=9;jt+="S")ae(jt,lt);function yo(e,t){t[Oe]=Se(("0."+e)*1e3)}for(jt="S";jt.length<=9;jt+="S")Ee(jt,yo);Ur=Ke("Milliseconds",!1),Z("z",0,0,"zoneAbbr"),Z("zz",0,0,"zoneName");function vo(){return this._isUTC?"UTC":""}function bo(){return this._isUTC?"Coordinated Universal Time":""}var G=y.prototype;G.add=cs,G.calendar=ys,G.clone=vs,G.diff=Ds,G.endOf=As,G.format=js,G.from=Ts,G.fromNow=Cs,G.to=Ns,G.toNow=Ps,G.get=et,G.invalidAt=$s,G.isAfter=bs,G.isBefore=_s,G.isBetween=ws,G.isSame=Ms,G.isSameOrAfter=xs,G.isSameOrBefore=Ss,G.isValid=Vs,G.lang=zr,G.locale=Fr,G.localeData=Lr,G.max=Vi,G.min=Wi,G.parsingFlags=Hs,G.set=Jt,G.startOf=Es,G.subtract=ds,G.toArray=zs,G.toObject=Ls,G.toDate=Fs,G.toISOString=Ys,G.inspect=Os,typeof Symbol<"u"&&Symbol.for!=null&&(G[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),G.toJSON=Ws,G.toString=ks,G.unix=Is,G.valueOf=Rs,G.creationData=Bs,G.eraName=Gs,G.eraNarrow=Ks,G.eraAbbr=Xs,G.eraYear=Qs,G.year=We,G.isLeapYear=Be,G.weekYear=io,G.isoWeekYear=so,G.quarter=G.quarters=fo,G.month=br,G.daysInMonth=Fn,G.week=G.weeks=Un,G.isoWeek=G.isoWeeks=qn,G.weeksInYear=uo,G.weeksInWeekYear=co,G.isoWeeksInYear=oo,G.isoWeeksInISOWeekYear=lo,G.date=Br,G.day=G.days=si,G.weekday=oi,G.isoWeekday=li,G.dayOfYear=mo,G.hour=G.hours=pi,G.minute=G.minutes=po,G.second=G.seconds=go,G.millisecond=G.milliseconds=Ur,G.utcOffset=Xi,G.utc=Zi,G.local=es,G.parseZone=ts,G.hasAlignedHourOffset=as,G.isDST=rs,G.isLocal=is,G.isUtcOffset=ss,G.isUtc=Pr,G.isUTC=Pr,G.zoneAbbr=vo,G.zoneName=bo,G.dates=M("dates accessor is deprecated. Use date instead.",Br),G.months=M("months accessor is deprecated. Use month instead",br),G.years=M("years accessor is deprecated. Use year instead",We),G.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Qi),G.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ns);function _o(e){return Le(e*1e3)}function wo(){return Le.apply(null,arguments).parseZone()}function qr(e){return e}var Pe=J.prototype;Pe.calendar=fe,Pe.longDateFormat=ze,Pe.invalidDate=b,Pe.ordinal=A,Pe.preparse=qr,Pe.postformat=qr,Pe.relativeTime=te,Pe.pastFuture=ie,Pe.set=E,Pe.eras=Us,Pe.erasParse=qs,Pe.erasConvertYear=Js,Pe.erasAbbrRegex=eo,Pe.erasNameRegex=Zs,Pe.erasNarrowRegex=to,Pe.months=En,Pe.monthsShort=An,Pe.monthsParse=In,Pe.monthsRegex=Ln,Pe.monthsShortRegex=zn,Pe.week=Vn,Pe.firstDayOfYear=Bn,Pe.firstDayOfWeek=$n,Pe.weekdays=ti,Pe.weekdaysMin=ri,Pe.weekdaysShort=ai,Pe.weekdaysParse=ii,Pe.weekdaysRegex=ui,Pe.weekdaysShortRegex=ci,Pe.weekdaysMinRegex=di,Pe.isPM=fi,Pe.meridiem=gi;function fa(e,t,r,n){var u=Mt(),S=m().set(n,t);return u[r](S,e)}function Jr(e,t,r){if(o(e)&&(t=e,e=void 0),e=e||"",t!=null)return fa(e,t,r,"month");var n,u=[];for(n=0;n<12;n++)u[n]=fa(e,n,r,"month");return u}function Ka(e,t,r,n){typeof e=="boolean"?(o(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,o(t)&&(r=t,t=void 0),t=t||"");var u=Mt(),S=e?u._week.dow:0,L,ne=[];if(r!=null)return fa(t,(r+S)%7,n,"day");for(L=0;L<7;L++)ne[L]=fa(t,(L+S)%7,n,"day");return ne}function Mo(e,t){return Jr(e,t,"months")}function xo(e,t){return Jr(e,t,"monthsShort")}function So(e,t,r){return Ka(e,t,r,"weekdays")}function Do(e,t,r){return Ka(e,t,r,"weekdaysShort")}function ko(e,t,r){return Ka(e,t,r,"weekdaysMin")}Ot("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Se(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),l.lang=M("moment.lang is deprecated. Use moment.locale instead.",Ot),l.langData=M("moment.langData is deprecated. Use moment.localeData instead.",Mt);var xt=Math.abs;function Yo(){var e=this._data;return this._milliseconds=xt(this._milliseconds),this._days=xt(this._days),this._months=xt(this._months),e.milliseconds=xt(e.milliseconds),e.seconds=xt(e.seconds),e.minutes=xt(e.minutes),e.hours=xt(e.hours),e.months=xt(e.months),e.years=xt(e.years),this}function Gr(e,t,r,n){var u=mt(t,r);return e._milliseconds+=n*u._milliseconds,e._days+=n*u._days,e._months+=n*u._months,e._bubble()}function Oo(e,t){return Gr(this,e,t,1)}function jo(e,t){return Gr(this,e,t,-1)}function Kr(e){return e<0?Math.floor(e):Math.ceil(e)}function To(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,u,S,L,ne,pe;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Kr(Xa(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,u=st(e/1e3),n.seconds=u%60,S=st(u/60),n.minutes=S%60,L=st(S/60),n.hours=L%24,t+=st(L/24),pe=st(Xr(t)),r+=pe,t-=Kr(Xa(pe)),ne=st(r/12),r%=12,n.days=t,n.months=r,n.years=ne,this}function Xr(e){return e*4800/146097}function Xa(e){return e*146097/4800}function Co(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=de(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Xr(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Xa(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function St(e){return function(){return this.as(e)}}var Qr=St("ms"),No=St("s"),Po=St("m"),Eo=St("h"),Ao=St("d"),Ro=St("w"),Io=St("M"),Fo=St("Q"),zo=St("y"),Lo=Qr;function Wo(){return mt(this)}function Vo(e){return e=de(e),this.isValid()?this[e+"s"]():NaN}function At(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ho=At("milliseconds"),$o=At("seconds"),Bo=At("minutes"),Uo=At("hours"),qo=At("days"),Jo=At("months"),Go=At("years");function Ko(){return st(this.days()/7)}var Dt=Math.round,Bt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xo(e,t,r,n,u){return u.relativeTime(t||1,!!r,e,n)}function Qo(e,t,r,n){var u=mt(e).abs(),S=Dt(u.as("s")),L=Dt(u.as("m")),ne=Dt(u.as("h")),pe=Dt(u.as("d")),je=Dt(u.as("M")),at=Dt(u.as("w")),kt=Dt(u.as("y")),Tt=S<=r.ss&&["s",S]||S<r.s&&["ss",S]||L<=1&&["m"]||L<r.m&&["mm",L]||ne<=1&&["h"]||ne<r.h&&["hh",ne]||pe<=1&&["d"]||pe<r.d&&["dd",pe];return r.w!=null&&(Tt=Tt||at<=1&&["w"]||at<r.w&&["ww",at]),Tt=Tt||je<=1&&["M"]||je<r.M&&["MM",je]||kt<=1&&["y"]||["yy",kt],Tt[2]=t,Tt[3]=+e>0,Tt[4]=n,Xo.apply(null,Tt)}function Zo(e){return e===void 0?Dt:typeof e=="function"?(Dt=e,!0):!1}function el(e,t){return Bt[e]===void 0?!1:t===void 0?Bt[e]:(Bt[e]=t,e==="s"&&(Bt.ss=t-1),!0)}function tl(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Bt,u,S;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Bt,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),u=this.localeData(),S=Qo(this,!r,n,u),r&&(S=u.pastFuture(+this,S)),u.postformat(S)}var Qa=Math.abs;function Ut(e){return(e>0)-(e<0)||+e}function ma(){if(!this.isValid())return this.localeData().invalidDate();var e=Qa(this._milliseconds)/1e3,t=Qa(this._days),r=Qa(this._months),n,u,S,L,ne=this.asSeconds(),pe,je,at,kt;return ne?(n=st(e/60),u=st(n/60),e%=60,n%=60,S=st(r/12),r%=12,L=e?e.toFixed(3).replace(/\.?0+$/,""):"",pe=ne<0?"-":"",je=Ut(this._months)!==Ut(ne)?"-":"",at=Ut(this._days)!==Ut(ne)?"-":"",kt=Ut(this._milliseconds)!==Ut(ne)?"-":"",pe+"P"+(S?je+S+"Y":"")+(r?je+r+"M":"")+(t?at+t+"D":"")+(u||n||e?"T":"")+(u?kt+u+"H":"")+(n?kt+n+"M":"")+(e?kt+L+"S":"")):"P0D"}var Te=oa.prototype;Te.isValid=qi,Te.abs=Yo,Te.add=Oo,Te.subtract=jo,Te.as=Co,Te.asMilliseconds=Qr,Te.asSeconds=No,Te.asMinutes=Po,Te.asHours=Eo,Te.asDays=Ao,Te.asWeeks=Ro,Te.asMonths=Io,Te.asQuarters=Fo,Te.asYears=zo,Te.valueOf=Lo,Te._bubble=To,Te.clone=Wo,Te.get=Vo,Te.milliseconds=Ho,Te.seconds=$o,Te.minutes=Bo,Te.hours=Uo,Te.days=qo,Te.weeks=Ko,Te.months=Jo,Te.years=Go,Te.humanize=tl,Te.toISOString=ma,Te.toString=ma,Te.toJSON=ma,Te.locale=Fr,Te.localeData=Lr,Te.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ma),Te.lang=zr,Z("X",0,0,"unix"),Z("x",0,0,"valueOf"),ae("x",bt),ae("X",gt),Ee("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),Ee("x",function(e,t,r){r._d=new Date(Se(e))});//! moment.js
|
|
65
|
-
return
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
function l(B,X,s,x){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[B+" Tage",B+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[B+" Monate",B+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[B+" Jahre",B+" Jahren"]};return X?a[s][0]:a[s][1]}var V=g.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:l,mm:"%d Minuten",h:l,hh:"%d Stunden",d:l,dd:l,w:l,ww:"%d Wochen",M:l,MM:l,y:l,yy:l},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return V}))})()),or.exports}sc();const Nt=f=>{let i="";return f.split(":").forEach(g=>{i+=g}),parseInt(i)},mn=f=>f.toString().padStart(4,"0").match(/.{1,2}/g).join(":"),Za=f=>{const i=f.address;if(f.addresstype==="county"&&i.country)return i.county;if(f.addresstype==="village"&&i.village)return i.village;const g=[];["emergency","historic","military","natural","landuse","place","railway","man_made","aerialway","boundary","amenity","aeroway","club","craft","leisure","office","mountain_pass","shop","tourism","bridge","tunnel","waterway","name"].forEach(B=>{i.hasOwnProperty(B)&&i[B]&&g.push(i[B])}),i.road?g.push(i.road):i.pedestrian?g.push(i.pedestrian):i.suburb?g.push(i.suburb):i.square?g.push(i.square):(i.neighbourhood&&g.push(i.neighbourhood),i.hamlet?g.push(i.hamlet):i.isolated_dwelling?g.push(i.isolated_dwelling):i.locality?g.push(i.locality):i.croft&&g.push(i.croft)),i.house_number&&g.push(i.house_number),i.postcode&&g.push(i.postcode),i.village&&g.push(i.village),i.town?g.push(i.town):i.city&&g.push(i.city);var V=g.join(", ").substr(0,150);return V};function aa(f){let i=window.sessionStorage.getItem(f);if(i!==null){let g=JSON.parse(i);if(new Date(g.expirationDate)>new Date)return g.value;window.sessionStorage.removeItem(f)}return null}function oc(f,i,g){let l=g?new Date(g*1e3):null;if(l){let V={value:i,expirationDate:l.toISOString()};window.sessionStorage.setItem(f,JSON.stringify(V))}}function pn({day:f,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text pl-4",children:[h.jsx("b",{children:f})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}const lc=({component:f,current:i,onChange:g,i18next:l})=>{const[V,B]=q.useState(),[X,s]=q.useState([]),[x,a]=q.useState([]),[o,c]=q.useState(!1),[d,p]=q.useState(null),[m,T]=q.useState(null),[v,D]=q.useState(null),[O,j]=q.useState(null),[R,N]=q.useState({}),[k,y]=q.useState(null),[C,_]=q.useState(!1),[M,z]=q.useState([]),[H,F]=q.useState(!1),E=q.useRef(),$=f.calendarId;he.locale(l.language);const J=Y=>{let A=he(Y).format("YYYY-MM-DD");fetch(Q(A)).then(I=>I.json()).then(I=>{let te=fe(Y||new Date);const ie=I.filter(Ae=>Ae.available==!0);ie.length===0&&P();let de=[];te.forEach(Ae=>{I.some($e=>$e.date===Ae&&$e.available==!0)?de.push({available:!0,date:Ae}):de.push({available:!1,date:Ae})});const me=de.map(Ae=>{if(Ae.available===!1)return he(Ae.date,"YYYY-MM-DD").toDate()});s(me);const Me=ie.length?ie[0].date:Y;re(Me)}).catch(I=>console.error(I))},re=Y=>{j(null),D(null),a([]);let A=he(Y).format("YYYY-MM-DD");fetch(ue(A)).then(I=>I.json()).then(I=>{const te=I.filter(ie=>ie.availability==!0);N(te[0]),te.length>0?(a(I),c(!1),D(he(Y).format("L")),B(he(Y,"YYYY-MM-DD").toDate())):(I.length>0&&B(he(I[0].date,"YYYY-MM-DD").toDate()),a([]),P())})},ee=()=>{if($!==""&&$!=null)if(!i.dataValue)J(new Date);else if(f.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){y(i.dataValue);let Y=[];i.dataValue.map(A=>{Y.push({...A,date:he(A.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),z(Y)}}else if(!f.multiple&&typeof i.dataValue=="object"){const Y={date:i.dataValue.date,slot:i.dataValue.slot},A={...i.dataValue,date:he(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};z([A]),y(Y)}else{let Y=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),A=Y[2].split("#");const I={date:he(Y[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:Y[1]};f.multiple?(g([{date:Y[0],slot:Y[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}]),z([{date:Y[0],slot:Y[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}])):(g({date:Y[0],slot:Y[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}),z([{date:Y[0],slot:Y[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}])),y(I)}};q.useEffect(()=>{var Y;(Y=window.FormioInstance)==null||Y.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const fe=Y=>{let I=he(Y,"YYYY-MM").daysInMonth(),te=[];for(;I;){let ie=he(Y).date(I);te.push(ie.format("YYYY-MM-DD")),I--}return te},Q=(Y,A=!1)=>{let I=f.calendarId,te=f.select_opening_hours,ie=f.select_opening_hours?f.opening_hours:[];window.location.pathname.split("/");let de=`${Fe()}/api/calendars/${I}/availabilities`,me=[`from_time=${he(Y).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(Y).endOf("month").format("YYYY-MM-DD")}`];return A&&me.push(`available=${A}`),te&&ie&&me.push(`opening_hours=${ie.join()}`),`${de}?${me.join("&")}`},ue=(Y,A=!1)=>{let I=f.calendarId,te=f.select_opening_hours,ie=f.select_opening_hours?f.opening_hours:[];window.location.pathname.split("/");const de=he(Y).format("YYYY-MM-DD");let me=`${Fe()}/api/calendars/${I}/availabilities/${de}`,Me=[];return A&&Me.push(`available=${A}`),te&&ie&&Me.push(`opening_hours=${ie.join()}`),Me&&(me=`${me}?${Me.join("&")}`),me},se=Y=>{J(Y)},ye=Y=>{setTimeout(()=>{_(!C)},1e3),re(Y)},ce=Y=>{j(null),setTimeout(()=>{Y&&(T(Y.target.dataset),j(Y.target.id))},300)},Z=Y=>{p(null);let A=`${Fe()}/it/meetings/new-draft`,I={date:m!=null&&m.date?he(m==null?void 0:m.date).format("DD-MM-YYYY"):he(Y.target.dataset.date).format("DD-MM-YYYY"),slot:m!=null&&m.value_start&&(m!=null&&m.value_end)?m.value_start+"-"+m.value_end:Y.target.dataset.slots,calendar:f.calendarId,opening_hour:m!=null&&m.opening_hour?m==null?void 0:m.opening_hour:Y.target.dataset.opening_hour,meeting:d?d.id:"",first_available_date:R.date,first_available_start_time:R.start_time,first_available_end_time:R.end_time,first_availability_updated_at:he().format()};fetch(A,{method:"POST",body:JSON.stringify(I),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(te=>{if(!te.ok)throw new Error(l.t("Intervallo selezionato non disponibile!"));return te.json()}).then(te=>{p(te);const ie={date:I.date,slot:I.slot,calendar_id:I.calendar[0],opening_hour_id:I.opening_hour||I.opening_hour_id,meeting_id:te.id};z([...M,ie])}).catch(te=>{console.log(te),Je.fire({title:"",html:"<p>"+te+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{m&&(Z(),_(!C))},Ne=()=>h.jsx("span",{children:l.t("Tempo prenotazione scaduto!")}),be=({minutes:Y,seconds:A,completed:I})=>I?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[l.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",h.jsxs("b",{children:[Y," ",l.t("minuti")," ",A," ",l.t("secondi")]})]})]})}),Ce=Y=>{const A=Nt(Y.target.value),I=Nt(Y.target.min),te=Nt(Y.target.max);A<I||A>te||A>Nt(m.end)?(Je.fire({title:"",html:`<p>${l.t("l'orario")} <b>${mn(A)}</b> ${l.t("non è valido")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):T({...m,value_start:Y.target.value})},Re=Y=>{const A=Nt(Y.target.value),I=Nt(Y.target.min),te=Nt(Y.target.max);A<I||A>te||A<Nt(m.start)?(Je.fire({title:"",html:`<p>${l.t("l'orario")} <b>${mn(A)}</b> ${l.t("non è valido")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):T({...m,value_end:Y.target.value})},ze=Y=>{if(Y===null||Y==="")g("");else if(Array.isArray(Y)&&Y.length>0){let A=[];M.map(I=>{A.push({date:he(I.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:I.slot,calendar_id:I.calendar_id||I.calendar[0],meeting_id:I.meeting_id,opening_hour_id:I.opening_hour||I.opening_hour_id})}),f.multiple?g(A):g(A[0])}else g("")},P=()=>{c(!0),p(null),D(null),ze(null)},b=()=>{if(l.language==="it")return Yn;if(l.language==="en")return kn;if(l.language==="de")return Dn};q.useEffect(()=>{ze(M)},[M]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&H===!1?(F(!0),setTimeout(()=>{ee()},1e3)):(F(!1),setTimeout(()=>{ee()},1e3))},[]);const W=(Y,A)=>{let I=`${Fe()}/api/meetings/${A.meeting_id}`;fetch(I,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(te=>{if(te&&te.status>400)Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const ie=[...M.slice(0,Y),...M.slice(Y+1)];z(ie),J(new Date)}})};return h.jsxs(h.Fragment,{children:[H&&k?h.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[h.jsxs("b",{children:[Array.isArray(k)&&k.length>1?l.t("Giorni selezionati per la prenotazione"):l.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:Array.isArray(k)?k.map(Y=>h.jsx(pn,{day:he(Y.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:l,slot:Y.slot})):h.jsx(pn,{day:he(k.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:l,slot:k.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[f.multiple?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:l.t(f.label)}),h.jsx(va.DayPicker,{mode:"single",selected:V,locale:b(),disabled:X,onMonthChange:se,onDayClick:ye}),h.jsx("p",{children:l.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")})]})}):M.length!==1?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:l.t(f.label)}),h.jsx(va.DayPicker,{mode:"single",selected:V,locale:b(),disabled:X,onMonthChange:se,onDayClick:ye}),h.jsxs("p",{children:[" ",l.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")]})]})}):null,h.jsx("div",{className:"col-12",children:M.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[M.length>1?l.t("Giorni selezionati per la prenotazione"):l.t("Giorno selezionato per la prenotazione"),":"," "]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:M.map((Y,A)=>h.jsx("li",{children:h.jsx("div",{className:"list-item",children:h.jsxs("div",{className:"it-right-zone",children:[h.jsxs("span",{className:"text pl-4",children:[Y.date," ",m||Y.slot?`${l.t("alle")} ${Y.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>W(A,Y),role:"button"})]})})},"li"+A))})})}),d?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(Mn,{date:d.expiration_time,renderer:be})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:C,toggle:()=>_(!C),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>_(!C),id:"daySelected",children:l.t("Seleziona una fascia oraria")}),o?null:h.jsxs("div",{className:"title-xsmall u-grey-dark px-4",children:[" ",l.t("Seleziona una fascia oraria e, se necessario, utilizza l'apposito controllo per accorciare la durata della prenotazione, Poi clicca su Conferma")]}),h.jsx(le.ModalBody,{children:h.jsxs("div",{className:"row",children:[M.length>=1?h.jsxs("div",{children:[v&&!o?h.jsxs("h6",{children:[l.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]}):null,h.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[h.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:h.jsxs("b",{children:[h.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",l.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:O==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(v,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":M[M.length-1].slot,"data-opening_hour":M[M.length-1].opening_hour_id,"data-start":M[M.length-1].slot.split("-")[0],"data-end":M[M.length-1].slot.split("-")[1],"data-value_start":M[M.length-1].slot.split("-")[0],"data-value_end":M[M.length-1].slot.split("-")[1],disabled:o,children:M[M.length-1].slot})})]})]}):null,h.jsx("div",{children:v&&M.length>=1?h.jsx("h6",{children:l.t("Seleziona altri orari")}):o?null:h.jsxs("h6",{children:[l.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]})}),x.map((Y,A)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+A,onClick:ce,ref:E,className:O==="slot-"+A?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":Y.date,"data-start":Y.start_time,"data-end":Y.end_time,"data-value_start":Y.start_time,"data-value_end":Y.end_time,"data-slots":Y.start_time+"-"+Y.end_time,"data-opening_hour":Y.opening_hour,"data-min_duration":Y.min_duration,disabled:Y.slots_available==0,children:[Y.start_time," - ",Y.end_time]})},"slot-"+A)),o?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),l.t("Attenzione")]}),h.jsxs("p",{children:[" ",l.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null,h.jsx("div",{className:"col-12",children:m!=null&&m.value_start&&O?h.jsxs("div",{className:"row",children:[h.jsx("div",{className:"col-12 mb-3",children:h.jsx("p",{className:"mb-3",children:h.jsx("b",{children:l.t("Se necessario, utilizza il controllo che segue per accorciare la durata della prenotazione")})})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(le.Input,{type:"time",label:l.t("Dalle"),className:"active",defaultValue:m.value_start||m.start,min:m.start,max:m.end,onBlur:Ce})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(le.Input,{type:"time",label:l.t("alle"),className:"active",defaultValue:m.value_end||m.end,onBlur:Re,min:m.start,max:m.end})})]}):null})]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!v||!(m!=null&&m.value_start),children:l.t("Conferma")})})]})]})};var It;let On=(It=class extends ot.ReactComponent{constructor(i,g,l){super(i,g,l)}static get builderInfo(){return{title:"Dynamic Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:It.schema()}}static schema(){return ot.ReactComponent.schema({type:"dynamic_calendar"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(lc,{ref:g,component:this.component,value:this.dataValue,onChange:l=>this.setValue(l),...this,current:this}))}setValue(i){if(i)if(Array.isArray(i))this.selectedNextSlots=i,this.updateValue(i),this.shouldSetValue=!0;else if(typeof i=="object")this.date=i.date,this.slot=i.slot,this.meeting=i.meeting_id,this.meeting_expiration_time=null,this.opening_hour=i.opening_hour_id,this.calendar_id=i.calendar_id,this.updateValue(i),this.shouldSetValue=!0;else{let g=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),l=g[2].split("#");this.date=g[0],this.slot=g[1],this.meeting=l[1],this.meeting_expiration_time=null,this.opening_hour=l.length===3?l[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let i=this.meeting?this.meeting:"",g=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:i,opening_hour_id:g}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}},Ct(It,"editForm",fl),It);const uc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{type:"select",label:"Nome Calendario",key:"calendarId",input:!0,weight:1,placeholder:"Nome Calendario",tooltip:"Inserisci il nome del calendario",dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars?type=time_fixed_slots"},valueProperty:"id",template:"<span>{{ item.title }}</span>",selectValues:"Results"},{type:"checkbox",label:"Seleziona orari di apertura",key:"select_opening_hours",input:!0,weight:1,tooltip:"Abilita per selezionare i singoli orari di apertura",defaultValue:!1},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1},{type:"select",label:"Orari di apertura",key:"opening_hours",input:!0,weight:1,placeholder:"Seleziona gli orari di apertura",tooltip:"Seleziona gli orari di apertura",multiple:!0,dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars/{{data.calendarId}}/opening-hours"},valueProperty:"id",template:"<span>{{ item.name }}</span>",selectValues:"results",conditional:{show:!0,when:"select_opening_hours",eq:"true"}},{label:"Api Url",redrawOn:"data",calculateValue:`if (data.calendarId) {
|
|
61
|
+
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function Ic(...l){return ot.Components.baseEditForm([{key:"display",components:Ac}],...l)}function Ot(l){return(n={})=>{const u=n.width?String(n.width):l.defaultWidth;return l.formats[u]||l.formats[l.defaultWidth]}}function at(l){return(n,u)=>{const s=u!=null&&u.context?String(u.context):"standalone";let x;if(s==="formatting"&&l.formattingValues){const F=l.defaultFormattingWidth||l.defaultWidth,o=u!=null&&u.width?String(u.width):F;x=l.formattingValues[o]||l.formattingValues[F]}else{const F=l.defaultWidth,o=u!=null&&u.width?String(u.width):l.defaultWidth;x=l.values[o]||l.values[F]}const D=l.argumentCallback?l.argumentCallback(n):n;return x[D]}}function nt(l){return(n,u={})=>{const s=u.width,x=s&&l.matchPatterns[s]||l.matchPatterns[l.defaultMatchWidth],D=n.match(x);if(!D)return null;const F=D[0],o=s&&l.parsePatterns[s]||l.parsePatterns[l.defaultParseWidth],y=Array.isArray(o)?zc(o,h=>h.test(F)):Fc(o,h=>h.test(F));let r;r=l.valueCallback?l.valueCallback(y):y,r=u.valueCallback?u.valueCallback(r):r;const c=n.slice(F.length);return{value:r,rest:c}}}function Fc(l,n){for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u)&&n(l[u]))return u}function zc(l,n){for(let u=0;u<l.length;u++)if(n(l[u]))return u}function wn(l){return(n,u={})=>{const s=n.match(l.matchPattern);if(!s)return null;const x=s[0],D=n.match(l.parsePattern);if(!D)return null;let F=l.valueCallback?l.valueCallback(D[0]):D[0];F=u.valueCallback?u.valueCallback(F):F;const o=n.slice(x.length);return{value:F,rest:o}}}const bi=Symbol.for("constructDateFrom");function $s(l,n){return typeof l=="function"?l(n):l&&typeof l=="object"&&bi in l?l[bi](n):l instanceof Date?new l.constructor(n):new Date(n)}function Vc(l,...n){const u=$s.bind(null,l||n.find(s=>typeof s=="object"));return n.map(u)}let Lc={};function Wc(){return Lc}function qc(l,n){return $s(n||l,l)}function wi(l,n){var o,y,r,c;const u=Wc(),s=(n==null?void 0:n.weekStartsOn)??((y=(o=n==null?void 0:n.locale)==null?void 0:o.options)==null?void 0:y.weekStartsOn)??u.weekStartsOn??((c=(r=u.locale)==null?void 0:r.options)==null?void 0:c.weekStartsOn)??0,x=qc(l,n==null?void 0:n.in),D=x.getDay(),F=(D<s?7:0)+D-s;return x.setDate(x.getDate()-F),x.setHours(0,0,0,0),x}function Si(l,n,u){const[s,x]=Vc(u==null?void 0:u.in,l,n);return+wi(s,u)==+wi(x,u)}const Mi={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},Hc=(l,n,u)=>{let s;const x=u!=null&&u.addSuffix?Mi[l].withPreposition:Mi[l].standalone;return typeof x=="string"?s=x:n===1?s=x.one:s=x.other.replace("{{count}}",String(n)),u!=null&&u.addSuffix?u.comparison&&u.comparison>0?"in "+s:"vor "+s:s},$c={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},Bc={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Uc={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Gc={date:Ot({formats:$c,defaultWidth:"full"}),time:Ot({formats:Bc,defaultWidth:"full"}),dateTime:Ot({formats:Uc,defaultWidth:"full"})},Jc={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},Kc=(l,n,u,s)=>Jc[l],Xc={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},Zc={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},fn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},Qc={narrow:fn.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:fn.wide},ed={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},td={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},rd={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},ad=l=>Number(l)+".",nd={ordinalNumber:ad,era:at({values:Xc,defaultWidth:"wide"}),quarter:at({values:Zc,defaultWidth:"wide",argumentCallback:l=>l-1}),month:at({values:fn,formattingValues:Qc,defaultWidth:"wide"}),day:at({values:ed,defaultWidth:"wide"}),dayPeriod:at({values:td,defaultWidth:"wide",formattingValues:rd,defaultFormattingWidth:"wide"})},id=/^(\d+)(\.)?/i,sd=/\d+/i,od={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},ld={any:[/^v/i,/^n/i]},ud={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},cd={any:[/1/i,/2/i,/3/i,/4/i]},dd={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},hd={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},fd={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},md={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},pd={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},gd={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},yd={ordinalNumber:wn({matchPattern:id,parsePattern:sd,valueCallback:l=>parseInt(l)}),era:nt({matchPatterns:od,defaultMatchWidth:"wide",parsePatterns:ld,defaultParseWidth:"any"}),quarter:nt({matchPatterns:ud,defaultMatchWidth:"wide",parsePatterns:cd,defaultParseWidth:"any",valueCallback:l=>l+1}),month:nt({matchPatterns:dd,defaultMatchWidth:"wide",parsePatterns:hd,defaultParseWidth:"any"}),day:nt({matchPatterns:fd,defaultMatchWidth:"wide",parsePatterns:md,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:pd,defaultMatchWidth:"wide",parsePatterns:gd,defaultParseWidth:"any"})},Bs={code:"de",formatDistance:Hc,formatLong:Gc,formatRelative:Kc,localize:nd,match:yd,options:{weekStartsOn:1,firstWeekContainsDate:4}},vd={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_d=(l,n,u)=>{let s;const x=vd[l];return typeof x=="string"?s=x:n===1?s=x.one:s=x.other.replace("{{count}}",n.toString()),u!=null&&u.addSuffix?u.comparison&&u.comparison>0?"in "+s:s+" ago":s},bd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wd=(l,n,u,s)=>bd[l],Sd={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Md={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xd={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Dd={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},kd={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Od={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Yd=(l,n)=>{const u=Number(l),s=u%100;if(s>20||s<10)switch(s%10){case 1:return u+"st";case 2:return u+"nd";case 3:return u+"rd"}return u+"th"},jd={ordinalNumber:Yd,era:at({values:Sd,defaultWidth:"wide"}),quarter:at({values:Md,defaultWidth:"wide",argumentCallback:l=>l-1}),month:at({values:xd,defaultWidth:"wide"}),day:at({values:Dd,defaultWidth:"wide"}),dayPeriod:at({values:kd,defaultWidth:"wide",formattingValues:Od,defaultFormattingWidth:"wide"})},Cd=/^(\d+)(th|st|nd|rd)?/i,Td=/\d+/i,Pd={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Nd={any:[/^b/i,/^(a|c)/i]},Rd={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ed={any:[/1/i,/2/i,/3/i,/4/i]},Ad={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Id={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Fd={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},zd={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Vd={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ld={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Wd={ordinalNumber:wn({matchPattern:Cd,parsePattern:Td,valueCallback:l=>parseInt(l,10)}),era:nt({matchPatterns:Pd,defaultMatchWidth:"wide",parsePatterns:Nd,defaultParseWidth:"any"}),quarter:nt({matchPatterns:Rd,defaultMatchWidth:"wide",parsePatterns:Ed,defaultParseWidth:"any",valueCallback:l=>l+1}),month:nt({matchPatterns:Ad,defaultMatchWidth:"wide",parsePatterns:Id,defaultParseWidth:"any"}),day:nt({matchPatterns:Fd,defaultMatchWidth:"wide",parsePatterns:zd,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:Vd,defaultMatchWidth:"any",parsePatterns:Ld,defaultParseWidth:"any"})},qd={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},Hd={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},$d={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Bd={date:Ot({formats:qd,defaultWidth:"full"}),time:Ot({formats:Hd,defaultWidth:"full"}),dateTime:Ot({formats:$d,defaultWidth:"full"})},Us={code:"en-GB",formatDistance:_d,formatLong:Bd,formatRelative:wd,localize:jd,match:Wd,options:{weekStartsOn:1,firstWeekContainsDate:4}},Ud={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},Gd=(l,n,u)=>{let s;const x=Ud[l];return typeof x=="string"?s=x:n===1?s=x.one:s=x.other.replace("{{count}}",n.toString()),u!=null&&u.addSuffix?u.comparison&&u.comparison>0?"tra "+s:s+" fa":s},Jd={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},Kd={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Xd={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Zd={date:Ot({formats:Jd,defaultWidth:"full"}),time:Ot({formats:Kd,defaultWidth:"full"}),dateTime:Ot({formats:Xd,defaultWidth:"full"})},Sn=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function Qd(l){switch(l){case 0:return"'domenica scorsa alle' p";default:return"'"+Sn[l]+" scorso alle' p"}}function xi(l){return"'"+Sn[l]+" alle' p"}function eh(l){switch(l){case 0:return"'domenica prossima alle' p";default:return"'"+Sn[l]+" prossimo alle' p"}}const th={lastWeek:(l,n,u)=>{const s=l.getDay();return Si(l,n,u)?xi(s):Qd(s)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(l,n,u)=>{const s=l.getDay();return Si(l,n,u)?xi(s):eh(s)},other:"P"},rh=(l,n,u,s)=>{const x=th[l];return typeof x=="function"?x(n,u,s):x},ah={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},nh={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},ih={narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},sh={narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},oh={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},lh={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},uh=(l,n)=>{const u=Number(l);return String(u)},ch={ordinalNumber:uh,era:at({values:ah,defaultWidth:"wide"}),quarter:at({values:nh,defaultWidth:"wide",argumentCallback:l=>l-1}),month:at({values:ih,defaultWidth:"wide"}),day:at({values:sh,defaultWidth:"wide"}),dayPeriod:at({values:oh,defaultWidth:"wide",formattingValues:lh,defaultFormattingWidth:"wide"})},dh=/^(\d+)(º)?/i,hh=/\d+/i,fh={narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},mh={any:[/^a/i,/^(d|e)/i]},ph={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},gh={any:[/1/i,/2/i,/3/i,/4/i]},yh={narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},vh={narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},_h={narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},bh={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},wh={narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},Sh={any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},Mh={ordinalNumber:wn({matchPattern:dh,parsePattern:hh,valueCallback:l=>parseInt(l,10)}),era:nt({matchPatterns:fh,defaultMatchWidth:"wide",parsePatterns:mh,defaultParseWidth:"any"}),quarter:nt({matchPatterns:ph,defaultMatchWidth:"wide",parsePatterns:gh,defaultParseWidth:"any",valueCallback:l=>l+1}),month:nt({matchPatterns:yh,defaultMatchWidth:"wide",parsePatterns:vh,defaultParseWidth:"any"}),day:nt({matchPatterns:_h,defaultMatchWidth:"wide",parsePatterns:bh,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:wh,defaultMatchWidth:"any",parsePatterns:Sh,defaultParseWidth:"any"})},Gs={code:"it",formatDistance:Gd,formatLong:Zd,formatRelative:rh,localize:ch,match:Mh,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Pr(l){throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var mn={exports:{}},yr={exports:{}},xh=yr.exports,Di;function Mn(){return Di||(Di=1,(function(l,n){(function(u,s){l.exports=s()})(xh,(function(){var u;function s(){return u.apply(null,arguments)}function x(e){u=e}function D(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function F(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function y(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(o(e,t))return!1;return!0}function r(e){return e===void 0}function c(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function h(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function f(e,t){var a=[],i,d=e.length;for(i=0;i<d;++i)a.push(t(e[i],i));return a}function g(e,t){for(var a in t)o(t,a)&&(e[a]=t[a]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,a,i){return Bn(e,t,a,i,!0).utc()}function C(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function _(e){return e._pf==null&&(e._pf=C()),e._pf}var O;Array.prototype.some?O=Array.prototype.some:O=function(e){var t=Object(this),a=t.length>>>0,i;for(i=0;i<a;i++)if(i in t&&e.call(this,t[i],i,t))return!0;return!1};function T(e){var t=null,a=!1,i=e._d&&!isNaN(e._d.getTime());if(i&&(t=_(e),a=O.call(t.parsedDateParts,function(d){return d!=null}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&a),e._strict&&(i=i&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=i;else return i;return e._isValid}function P(e){var t=p(NaN);return e!=null?g(_(t),e):_(t).userInvalidated=!0,t}var z=s.momentProperties=[],R=!1;function Y(e,t){var a,i,d,k=z.length;if(r(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),r(t._i)||(e._i=t._i),r(t._f)||(e._f=t._f),r(t._l)||(e._l=t._l),r(t._strict)||(e._strict=t._strict),r(t._tzm)||(e._tzm=t._tzm),r(t._isUTC)||(e._isUTC=t._isUTC),r(t._offset)||(e._offset=t._offset),r(t._pf)||(e._pf=_(t)),r(t._locale)||(e._locale=t._locale),k>0)for(a=0;a<k;a++)i=z[a],d=t[i],r(d)||(e[i]=d);return e}function v(e){Y(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),R===!1&&(R=!0,s.updateOffset(this),R=!1)}function N(e){return e instanceof v||e!=null&&e._isAMomentObject!=null}function w(e){s.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function M(e,t){var a=!0;return g(function(){if(s.deprecationHandler!=null&&s.deprecationHandler(null,e),a){var i=[],d,k,q,ne=arguments.length;for(k=0;k<ne;k++){if(d="",typeof arguments[k]=="object"){d+=`
|
|
62
|
+
[`+k+"] ";for(q in arguments[0])o(arguments[0],q)&&(d+=q+": "+arguments[0][q]+", ");d=d.slice(0,-2)}else d=arguments[k];i.push(d)}w(e+`
|
|
63
|
+
Arguments: `+Array.prototype.slice.call(i).join("")+`
|
|
64
|
+
`+new Error().stack),a=!1}return t.apply(this,arguments)},t)}var W={};function $(e,t){s.deprecationHandler!=null&&s.deprecationHandler(e,t),W[e]||(w(t),W[e]=!0)}s.suppressDeprecationWarnings=!1,s.deprecationHandler=null;function L(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function A(e){var t,a;for(a in e)o(e,a)&&(t=e[a],L(t)?this[a]=t:this["_"+a]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function B(e,t){var a=g({},e),i;for(i in t)o(t,i)&&(F(e[i])&&F(t[i])?(a[i]={},g(a[i],e[i]),g(a[i],t[i])):t[i]!=null?a[i]=t[i]:delete a[i]);for(i in e)o(e,i)&&!o(t,i)&&F(e[i])&&(a[i]=g({},a[i]));return a}function J(e){e!=null&&this.set(e)}var ae;Object.keys?ae=Object.keys:ae=function(e){var t,a=[];for(t in e)o(e,t)&&a.push(t);return a};var ee={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function fe(e,t,a){var i=this._calendar[e]||this._calendar.sameElse;return L(i)?i.call(t,a):i}function Z(e,t,a){var i=""+Math.abs(e),d=t-i.length,k=e>=0;return(k?a?"+":"":"-")+Math.pow(10,Math.max(0,d)).toString().substr(1)+i}var ue=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,se=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ye={},ce={};function Q(e,t,a,i){var d=i;typeof i=="string"&&(d=function(){return this[i]()}),e&&(ce[e]=d),t&&(ce[t[0]]=function(){return Z(d.apply(this,arguments),t[1],t[2])}),a&&(ce[a]=function(){return this.localeData().ordinal(d.apply(this,arguments),e)})}function ve(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Pe(e){var t=e.match(ue),a,i;for(a=0,i=t.length;a<i;a++)ce[t[a]]?t[a]=ce[t[a]]:t[a]=ve(t[a]);return function(d){var k="",q;for(q=0;q<i;q++)k+=L(t[q])?t[q].call(d,e):t[q];return k}}function _e(e,t){return e.isValid()?(t=Te(t,e.localeData()),ye[t]=ye[t]||Pe(t),ye[t](e)):e.localeData().invalidDate()}function Te(e,t){var a=5;function i(d){return t.longDateFormat(d)||d}for(se.lastIndex=0;a>=0&&se.test(e);)e=e.replace(se,i),se.lastIndex=0,a-=1;return e}var Ae={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ze(e){var t=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];return t||!a?t:(this._longDateFormat[e]=a.match(ue).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[e])}var E="Invalid date";function b(){return this._invalidDate}var H="%d",j=/\d{1,2}/;function I(e){return this._ordinal.replace("%d",e)}var V={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function te(e,t,a,i){var d=this._relativeTime[a];return L(d)?d(e,t,a,i):d.replace(/%d/i,e)}function ie(e,t){var a=this._relativeTime[e>0?"future":"past"];return L(a)?a(t):a.replace(/%s/i,t)}var be={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function de(e){return typeof e=="string"?be[e]||be[e.toLowerCase()]:void 0}function me(e){var t={},a,i;for(i in e)o(e,i)&&(a=de(i),a&&(t[a]=e[i]));return t}var Se={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ee(e){var t=[],a;for(a in e)o(e,a)&&t.push({unit:a,priority:Se[a]});return t.sort(function(i,d){return i.priority-d.priority}),t}var He=/\d/,Ie=/\d\d/,Je=/\d{3}/,Ze=/\d{4}/,ge=/[+-]?\d{6}/,we=/\d\d?/,Qe=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,ht=/\d{1,3}/,vt=/\d{1,4}/,pt=/[+-]?\d{1,6}/,lt=/\d+/,_t=/[+-]?\d+/,bt=/Z|[+-]\d\d:?\d\d/gi,Be=/Z|[+-]\d\d(?::?\d\d)?/gi,gt=/[+-]?\d+(\.\d{1,3})?/,ft=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut=/^[1-9]\d?/,it=/^([1-9]\d|\d)/,zt;zt={};function re(e,t,a){zt[e]=L(t)?t:function(i,d){return i&&a?a:t}}function Ar(e,t){return o(zt,e)?zt[e](t._strict,t._locale):new RegExp(ar(e))}function ar(e){return ct(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,a,i,d,k){return a||i||d||k}))}function ct(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function st(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function xe(e){var t=+e,a=0;return t!==0&&isFinite(t)&&(a=st(t)),a}var Vt={};function Re(e,t){var a,i=t,d;for(typeof e=="string"&&(e=[e]),c(t)&&(i=function(k,q){q[t]=xe(k)}),d=e.length,a=0;a<d;a++)Vt[e[a]]=i}function Nt(e,t){Re(e,function(a,i,d,k){d._w=d._w||{},t(a,d._w,d,k)})}function Ir(e,t,a){t!=null&&o(Vt,e)&&Vt[e](t,a._a,a,e)}function Lt(e){return e%4===0&&e%100!==0||e%400===0}var Xe=0,S=1,U=2,X=3,oe=4,Me=5,Ye=6,ke=7,De=8;Q("Y",0,0,function(){var e=this.year();return e<=9999?Z(e,4):"+"+e}),Q(0,["YY",2],0,function(){return this.year()%100}),Q(0,["YYYY",4],0,"year"),Q(0,["YYYYY",5],0,"year"),Q(0,["YYYYYY",6,!0],0,"year"),re("Y",_t),re("YY",we,Ie),re("YYYY",vt,Ze),re("YYYYY",pt,ge),re("YYYYYY",pt,ge),Re(["YYYYY","YYYYYY"],Xe),Re("YYYY",function(e,t){t[Xe]=e.length===2?s.parseTwoDigitYear(e):xe(e)}),Re("YY",function(e,t){t[Xe]=s.parseTwoDigitYear(e)}),Re("Y",function(e,t){t[Xe]=parseInt(e,10)});function Ue(e){return Lt(e)?366:365}s.parseTwoDigitYear=function(e){return xe(e)+(xe(e)>68?1900:2e3)};var Le=Ke("FullYear",!0);function $e(){return Lt(this.year())}function Ke(e,t){return function(a){return a!=null?(yt(this,e,a),s.updateOffset(this,t),this):dt(this,e)}}function dt(e,t){if(!e.isValid())return NaN;var a=e._d,i=e._isUTC;switch(t){case"Milliseconds":return i?a.getUTCMilliseconds():a.getMilliseconds();case"Seconds":return i?a.getUTCSeconds():a.getSeconds();case"Minutes":return i?a.getUTCMinutes():a.getMinutes();case"Hours":return i?a.getUTCHours():a.getHours();case"Date":return i?a.getUTCDate():a.getDate();case"Day":return i?a.getUTCDay():a.getDay();case"Month":return i?a.getUTCMonth():a.getMonth();case"FullYear":return i?a.getUTCFullYear():a.getFullYear();default:return NaN}}function yt(e,t,a){var i,d,k,q,ne;if(!(!e.isValid()||isNaN(a))){switch(i=e._d,d=e._isUTC,t){case"Milliseconds":return void(d?i.setUTCMilliseconds(a):i.setMilliseconds(a));case"Seconds":return void(d?i.setUTCSeconds(a):i.setSeconds(a));case"Minutes":return void(d?i.setUTCMinutes(a):i.setMinutes(a));case"Hours":return void(d?i.setUTCHours(a):i.setHours(a));case"Date":return void(d?i.setUTCDate(a):i.setDate(a));case"FullYear":break;default:return}k=a,q=e.month(),ne=e.date(),ne=ne===29&&q===1&&!Lt(k)?28:ne,d?i.setUTCFullYear(k,q,ne):i.setFullYear(k,q,ne)}}function et(e){return e=de(e),L(this[e])?this[e]():this}function Gt(e,t){if(typeof e=="object"){e=me(e);var a=Ee(e),i,d=a.length;for(i=0;i<d;i++)this[a[i].unit](e[a[i].unit])}else if(e=de(e),L(this[e]))return this[e](t);return this}function Fr(e,t){return(e%t+t)%t}var qe;Array.prototype.indexOf?qe=Array.prototype.indexOf:qe=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function zr(e,t){if(isNaN(e)||isNaN(t))return NaN;var a=Fr(t,12);return e+=(t-a)/12,a===1?Lt(e)?29:28:31-a%7%2}Q("M",["MM",2],"Mo",function(){return this.month()+1}),Q("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Q("MMMM",0,0,function(e){return this.localeData().months(this,e)}),re("M",we,ut),re("MM",we,Ie),re("MMM",function(e,t){return t.monthsShortRegex(e)}),re("MMMM",function(e,t){return t.monthsRegex(e)}),Re(["M","MM"],function(e,t){t[S]=xe(e)-1}),Re(["MMM","MMMM"],function(e,t,a,i){var d=a._locale.monthsParse(e,i,a._strict);d!=null?t[S]=d:_(a).invalidMonth=e});var ro="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Pn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Nn=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ao=ft,no=ft;function io(e,t){return e?D(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Nn).test(t)?"format":"standalone"][e.month()]:D(this._months)?this._months:this._months.standalone}function so(e,t){return e?D(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Nn.test(t)?"format":"standalone"][e.month()]:D(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function oo(e,t,a){var i,d,k,q=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)k=p([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(k,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(k,"").toLocaleLowerCase();return a?t==="MMM"?(d=qe.call(this._shortMonthsParse,q),d!==-1?d:null):(d=qe.call(this._longMonthsParse,q),d!==-1?d:null):t==="MMM"?(d=qe.call(this._shortMonthsParse,q),d!==-1?d:(d=qe.call(this._longMonthsParse,q),d!==-1?d:null)):(d=qe.call(this._longMonthsParse,q),d!==-1?d:(d=qe.call(this._shortMonthsParse,q),d!==-1?d:null))}function lo(e,t,a){var i,d,k;if(this._monthsParseExact)return oo.call(this,e,t,a);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(d=p([2e3,i]),a&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(d,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(d,"").replace(".","")+"$","i")),!a&&!this._monthsParse[i]&&(k="^"+this.months(d,"")+"|^"+this.monthsShort(d,""),this._monthsParse[i]=new RegExp(k.replace(".",""),"i")),a&&t==="MMMM"&&this._longMonthsParse[i].test(e))return i;if(a&&t==="MMM"&&this._shortMonthsParse[i].test(e))return i;if(!a&&this._monthsParse[i].test(e))return i}}function Rn(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=xe(t);else if(t=e.localeData().monthsParse(t),!c(t))return e}var a=t,i=e.date();return i=i<29?i:Math.min(i,zr(e.year(),a)),e._isUTC?e._d.setUTCMonth(a,i):e._d.setMonth(a,i),e}function En(e){return e!=null?(Rn(this,e),s.updateOffset(this,!0),this):dt(this,"Month")}function uo(){return zr(this.year(),this.month())}function co(e){return this._monthsParseExact?(o(this,"_monthsRegex")||An.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=ao),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ho(e){return this._monthsParseExact?(o(this,"_monthsRegex")||An.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=no),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function An(){function e(pe,je){return je.length-pe.length}var t=[],a=[],i=[],d,k,q,ne;for(d=0;d<12;d++)k=p([2e3,d]),q=ct(this.monthsShort(k,"")),ne=ct(this.months(k,"")),t.push(q),a.push(ne),i.push(ne),i.push(q);t.sort(e),a.sort(e),i.sort(e),this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function fo(e,t,a,i,d,k,q){var ne;return e<100&&e>=0?(ne=new Date(e+400,t,a,i,d,k,q),isFinite(ne.getFullYear())&&ne.setFullYear(e)):ne=new Date(e,t,a,i,d,k,q),ne}function Jt(e){var t,a;return e<100&&e>=0?(a=Array.prototype.slice.call(arguments),a[0]=e+400,t=new Date(Date.UTC.apply(null,a)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function nr(e,t,a){var i=7+t-a,d=(7+Jt(e,0,i).getUTCDay()-t)%7;return-d+i-1}function In(e,t,a,i,d){var k=(7+a-i)%7,q=nr(e,i,d),ne=1+7*(t-1)+k+q,pe,je;return ne<=0?(pe=e-1,je=Ue(pe)+ne):ne>Ue(e)?(pe=e+1,je=ne-Ue(e)):(pe=e,je=ne),{year:pe,dayOfYear:je}}function Kt(e,t,a){var i=nr(e.year(),t,a),d=Math.floor((e.dayOfYear()-i-1)/7)+1,k,q;return d<1?(q=e.year()-1,k=d+wt(q,t,a)):d>wt(e.year(),t,a)?(k=d-wt(e.year(),t,a),q=e.year()+1):(q=e.year(),k=d),{week:k,year:q}}function wt(e,t,a){var i=nr(e,t,a),d=nr(e+1,t,a);return(Ue(e)-i+d)/7}Q("w",["ww",2],"wo","week"),Q("W",["WW",2],"Wo","isoWeek"),re("w",we,ut),re("ww",we,Ie),re("W",we,ut),re("WW",we,Ie),Nt(["w","ww","W","WW"],function(e,t,a,i){t[i.substr(0,1)]=xe(e)});function mo(e){return Kt(e,this._week.dow,this._week.doy).week}var po={dow:0,doy:6};function go(){return this._week.dow}function yo(){return this._week.doy}function vo(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function _o(e){var t=Kt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Q("d",0,"do","day"),Q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Q("e",0,0,"weekday"),Q("E",0,0,"isoWeekday"),re("d",we),re("e",we),re("E",we),re("dd",function(e,t){return t.weekdaysMinRegex(e)}),re("ddd",function(e,t){return t.weekdaysShortRegex(e)}),re("dddd",function(e,t){return t.weekdaysRegex(e)}),Nt(["dd","ddd","dddd"],function(e,t,a,i){var d=a._locale.weekdaysParse(e,i,a._strict);d!=null?t.d=d:_(a).invalidWeekday=e}),Nt(["d","e","E"],function(e,t,a,i){t[i]=xe(e)});function bo(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function wo(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Vr(e,t){return e.slice(t,7).concat(e.slice(0,t))}var So="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Mo="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),xo=ft,Do=ft,ko=ft;function Oo(e,t){var a=D(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Vr(a,this._week.dow):e?a[e.day()]:a}function Yo(e){return e===!0?Vr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function jo(e){return e===!0?Vr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Co(e,t,a){var i,d,k,q=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)k=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(k,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(k,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(k,"").toLocaleLowerCase();return a?t==="dddd"?(d=qe.call(this._weekdaysParse,q),d!==-1?d:null):t==="ddd"?(d=qe.call(this._shortWeekdaysParse,q),d!==-1?d:null):(d=qe.call(this._minWeekdaysParse,q),d!==-1?d:null):t==="dddd"?(d=qe.call(this._weekdaysParse,q),d!==-1||(d=qe.call(this._shortWeekdaysParse,q),d!==-1)?d:(d=qe.call(this._minWeekdaysParse,q),d!==-1?d:null)):t==="ddd"?(d=qe.call(this._shortWeekdaysParse,q),d!==-1||(d=qe.call(this._weekdaysParse,q),d!==-1)?d:(d=qe.call(this._minWeekdaysParse,q),d!==-1?d:null)):(d=qe.call(this._minWeekdaysParse,q),d!==-1||(d=qe.call(this._weekdaysParse,q),d!==-1)?d:(d=qe.call(this._shortWeekdaysParse,q),d!==-1?d:null))}function To(e,t,a){var i,d,k;if(this._weekdaysParseExact)return Co.call(this,e,t,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(d=p([2e3,1]).day(i),a&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(d,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(d,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(d,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(k="^"+this.weekdays(d,"")+"|^"+this.weekdaysShort(d,"")+"|^"+this.weekdaysMin(d,""),this._weekdaysParse[i]=new RegExp(k.replace(".",""),"i")),a&&t==="dddd"&&this._fullWeekdaysParse[i].test(e))return i;if(a&&t==="ddd"&&this._shortWeekdaysParse[i].test(e))return i;if(a&&t==="dd"&&this._minWeekdaysParse[i].test(e))return i;if(!a&&this._weekdaysParse[i].test(e))return i}}function Po(e){if(!this.isValid())return e!=null?this:NaN;var t=dt(this,"Day");return e!=null?(e=bo(e,this.localeData()),this.add(e-t,"d")):t}function No(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Ro(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=wo(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Eo(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Lr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=xo),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ao(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Lr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Do),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Io(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Lr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ko),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Lr(){function e(rt,kt){return kt.length-rt.length}var t=[],a=[],i=[],d=[],k,q,ne,pe,je;for(k=0;k<7;k++)q=p([2e3,1]).day(k),ne=ct(this.weekdaysMin(q,"")),pe=ct(this.weekdaysShort(q,"")),je=ct(this.weekdays(q,"")),t.push(ne),a.push(pe),i.push(je),d.push(ne),d.push(pe),d.push(je);t.sort(e),a.sort(e),i.sort(e),d.sort(e),this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Wr(){return this.hours()%12||12}function Fo(){return this.hours()||24}Q("H",["HH",2],0,"hour"),Q("h",["hh",2],0,Wr),Q("k",["kk",2],0,Fo),Q("hmm",0,0,function(){return""+Wr.apply(this)+Z(this.minutes(),2)}),Q("hmmss",0,0,function(){return""+Wr.apply(this)+Z(this.minutes(),2)+Z(this.seconds(),2)}),Q("Hmm",0,0,function(){return""+this.hours()+Z(this.minutes(),2)}),Q("Hmmss",0,0,function(){return""+this.hours()+Z(this.minutes(),2)+Z(this.seconds(),2)});function zn(e,t){Q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}zn("a",!0),zn("A",!1);function Vn(e,t){return t._meridiemParse}re("a",Vn),re("A",Vn),re("H",we,it),re("h",we,ut),re("k",we,ut),re("HH",we,Ie),re("hh",we,Ie),re("kk",we,Ie),re("hmm",Qe),re("hmmss",tt),re("Hmm",Qe),re("Hmmss",tt),Re(["H","HH"],X),Re(["k","kk"],function(e,t,a){var i=xe(e);t[X]=i===24?0:i}),Re(["a","A"],function(e,t,a){a._isPm=a._locale.isPM(e),a._meridiem=e}),Re(["h","hh"],function(e,t,a){t[X]=xe(e),_(a).bigHour=!0}),Re("hmm",function(e,t,a){var i=e.length-2;t[X]=xe(e.substr(0,i)),t[oe]=xe(e.substr(i)),_(a).bigHour=!0}),Re("hmmss",function(e,t,a){var i=e.length-4,d=e.length-2;t[X]=xe(e.substr(0,i)),t[oe]=xe(e.substr(i,2)),t[Me]=xe(e.substr(d)),_(a).bigHour=!0}),Re("Hmm",function(e,t,a){var i=e.length-2;t[X]=xe(e.substr(0,i)),t[oe]=xe(e.substr(i))}),Re("Hmmss",function(e,t,a){var i=e.length-4,d=e.length-2;t[X]=xe(e.substr(0,i)),t[oe]=xe(e.substr(i,2)),t[Me]=xe(e.substr(d))});function zo(e){return(e+"").toLowerCase().charAt(0)==="p"}var Vo=/[ap]\.?m?\.?/i,Lo=Ke("Hours",!0);function Wo(e,t,a){return e>11?a?"pm":"PM":a?"am":"AM"}var Ln={calendar:ee,longDateFormat:Ae,invalidDate:E,ordinal:H,dayOfMonthOrdinalParse:j,relativeTime:V,months:ro,monthsShort:Pn,week:po,weekdays:So,weekdaysMin:Mo,weekdaysShort:Fn,meridiemParse:Vo},We={},Xt={},Zt;function qo(e,t){var a,i=Math.min(e.length,t.length);for(a=0;a<i;a+=1)if(e[a]!==t[a])return a;return i}function Wn(e){return e&&e.toLowerCase().replace("_","-")}function Ho(e){for(var t=0,a,i,d,k;t<e.length;){for(k=Wn(e[t]).split("-"),a=k.length,i=Wn(e[t+1]),i=i?i.split("-"):null;a>0;){if(d=ir(k.slice(0,a).join("-")),d)return d;if(i&&i.length>=a&&qo(k,i)>=a-1)break;a--}t++}return Zt}function $o(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ir(e){var t=null,a;if(We[e]===void 0&&l&&l.exports&&$o(e))try{t=Zt._abbr,a=Pr,a("./locale/"+e),Yt(t)}catch{We[e]=null}return We[e]}function Yt(e,t){var a;return e&&(r(t)?a=St(e):a=qr(e,t),a?Zt=a:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Zt._abbr}function qr(e,t){if(t!==null){var a,i=Ln;if(t.abbr=e,We[e]!=null)$("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=We[e]._config;else if(t.parentLocale!=null)if(We[t.parentLocale]!=null)i=We[t.parentLocale]._config;else if(a=ir(t.parentLocale),a!=null)i=a._config;else return Xt[t.parentLocale]||(Xt[t.parentLocale]=[]),Xt[t.parentLocale].push({name:e,config:t}),null;return We[e]=new J(B(i,t)),Xt[e]&&Xt[e].forEach(function(d){qr(d.name,d.config)}),Yt(e),We[e]}else return delete We[e],null}function Bo(e,t){if(t!=null){var a,i,d=Ln;We[e]!=null&&We[e].parentLocale!=null?We[e].set(B(We[e]._config,t)):(i=ir(e),i!=null&&(d=i._config),t=B(d,t),i==null&&(t.abbr=e),a=new J(t),a.parentLocale=We[e],We[e]=a),Yt(e)}else We[e]!=null&&(We[e].parentLocale!=null?(We[e]=We[e].parentLocale,e===Yt()&&Yt(e)):We[e]!=null&&delete We[e]);return We[e]}function St(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Zt;if(!D(e)){if(t=ir(e),t)return t;e=[e]}return Ho(e)}function Uo(){return ae(We)}function Hr(e){var t,a=e._a;return a&&_(e).overflow===-2&&(t=a[S]<0||a[S]>11?S:a[U]<1||a[U]>zr(a[Xe],a[S])?U:a[X]<0||a[X]>24||a[X]===24&&(a[oe]!==0||a[Me]!==0||a[Ye]!==0)?X:a[oe]<0||a[oe]>59?oe:a[Me]<0||a[Me]>59?Me:a[Ye]<0||a[Ye]>999?Ye:-1,_(e)._overflowDayOfYear&&(t<Xe||t>U)&&(t=U),_(e)._overflowWeeks&&t===-1&&(t=ke),_(e)._overflowWeekday&&t===-1&&(t=De),_(e).overflow=t),e}var Go=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Jo=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ko=/Z|[+-]\d\d(?::?\d\d)?/,sr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],$r=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Xo=/^\/?Date\((-?\d+)/i,Zo=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Qo={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function qn(e){var t,a,i=e._i,d=Go.exec(i)||Jo.exec(i),k,q,ne,pe,je=sr.length,rt=$r.length;if(d){for(_(e).iso=!0,t=0,a=je;t<a;t++)if(sr[t][1].exec(d[1])){q=sr[t][0],k=sr[t][2]!==!1;break}if(q==null){e._isValid=!1;return}if(d[3]){for(t=0,a=rt;t<a;t++)if($r[t][1].exec(d[3])){ne=(d[2]||" ")+$r[t][0];break}if(ne==null){e._isValid=!1;return}}if(!k&&ne!=null){e._isValid=!1;return}if(d[4])if(Ko.exec(d[4]))pe="Z";else{e._isValid=!1;return}e._f=q+(ne||"")+(pe||""),Ur(e)}else e._isValid=!1}function el(e,t,a,i,d,k){var q=[tl(e),Pn.indexOf(t),parseInt(a,10),parseInt(i,10),parseInt(d,10)];return k&&q.push(parseInt(k,10)),q}function tl(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function rl(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function al(e,t,a){if(e){var i=Fn.indexOf(e),d=new Date(t[0],t[1],t[2]).getDay();if(i!==d)return _(a).weekdayMismatch=!0,a._isValid=!1,!1}return!0}function nl(e,t,a){if(e)return Qo[e];if(t)return 0;var i=parseInt(a,10),d=i%100,k=(i-d)/100;return k*60+d}function Hn(e){var t=Zo.exec(rl(e._i)),a;if(t){if(a=el(t[4],t[3],t[2],t[5],t[6],t[7]),!al(t[1],a,e))return;e._a=a,e._tzm=nl(t[8],t[9],t[10]),e._d=Jt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),_(e).rfc2822=!0}else e._isValid=!1}function il(e){var t=Xo.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(qn(e),e._isValid===!1)delete e._isValid;else return;if(Hn(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:s.createFromInputFallback(e)}s.createFromInputFallback=M("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Wt(e,t,a){return e??t??a}function sl(e){var t=new Date(s.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Br(e){var t,a,i=[],d,k,q;if(!e._d){for(d=sl(e),e._w&&e._a[U]==null&&e._a[S]==null&&ol(e),e._dayOfYear!=null&&(q=Wt(e._a[Xe],d[Xe]),(e._dayOfYear>Ue(q)||e._dayOfYear===0)&&(_(e)._overflowDayOfYear=!0),a=Jt(q,0,e._dayOfYear),e._a[S]=a.getUTCMonth(),e._a[U]=a.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=i[t]=d[t];for(;t<7;t++)e._a[t]=i[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[X]===24&&e._a[oe]===0&&e._a[Me]===0&&e._a[Ye]===0&&(e._nextDay=!0,e._a[X]=0),e._d=(e._useUTC?Jt:fo).apply(null,i),k=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[X]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==k&&(_(e).weekdayMismatch=!0)}}function ol(e){var t,a,i,d,k,q,ne,pe,je;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(k=1,q=4,a=Wt(t.GG,e._a[Xe],Kt(Ve(),1,4).year),i=Wt(t.W,1),d=Wt(t.E,1),(d<1||d>7)&&(pe=!0)):(k=e._locale._week.dow,q=e._locale._week.doy,je=Kt(Ve(),k,q),a=Wt(t.gg,e._a[Xe],je.year),i=Wt(t.w,je.week),t.d!=null?(d=t.d,(d<0||d>6)&&(pe=!0)):t.e!=null?(d=t.e+k,(t.e<0||t.e>6)&&(pe=!0)):d=k),i<1||i>wt(a,k,q)?_(e)._overflowWeeks=!0:pe!=null?_(e)._overflowWeekday=!0:(ne=In(a,i,d,k,q),e._a[Xe]=ne.year,e._dayOfYear=ne.dayOfYear)}s.ISO_8601=function(){},s.RFC_2822=function(){};function Ur(e){if(e._f===s.ISO_8601){qn(e);return}if(e._f===s.RFC_2822){Hn(e);return}e._a=[],_(e).empty=!0;var t=""+e._i,a,i,d,k,q,ne=t.length,pe=0,je,rt;for(d=Te(e._f,e._locale).match(ue)||[],rt=d.length,a=0;a<rt;a++)k=d[a],i=(t.match(Ar(k,e))||[])[0],i&&(q=t.substr(0,t.indexOf(i)),q.length>0&&_(e).unusedInput.push(q),t=t.slice(t.indexOf(i)+i.length),pe+=i.length),ce[k]?(i?_(e).empty=!1:_(e).unusedTokens.push(k),Ir(k,i,e)):e._strict&&!i&&_(e).unusedTokens.push(k);_(e).charsLeftOver=ne-pe,t.length>0&&_(e).unusedInput.push(t),e._a[X]<=12&&_(e).bigHour===!0&&e._a[X]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[X]=ll(e._locale,e._a[X],e._meridiem),je=_(e).era,je!==null&&(e._a[Xe]=e._locale.erasConvertYear(je,e._a[Xe])),Br(e),Hr(e)}function ll(e,t,a){var i;return a==null?t:e.meridiemHour!=null?e.meridiemHour(t,a):(e.isPM!=null&&(i=e.isPM(a),i&&t<12&&(t+=12),!i&&t===12&&(t=0)),t)}function ul(e){var t,a,i,d,k,q,ne=!1,pe=e._f.length;if(pe===0){_(e).invalidFormat=!0,e._d=new Date(NaN);return}for(d=0;d<pe;d++)k=0,q=!1,t=Y({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[d],Ur(t),T(t)&&(q=!0),k+=_(t).charsLeftOver,k+=_(t).unusedTokens.length*10,_(t).score=k,ne?k<i&&(i=k,a=t):(i==null||k<i||q)&&(i=k,a=t,q&&(ne=!0));g(e,a||t)}function cl(e){if(!e._d){var t=me(e._i),a=t.day===void 0?t.date:t.day;e._a=f([t.year,t.month,a,t.hour,t.minute,t.second,t.millisecond],function(i){return i&&parseInt(i,10)}),Br(e)}}function dl(e){var t=new v(Hr($n(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function $n(e){var t=e._i,a=e._f;return e._locale=e._locale||St(e._l),t===null||a===void 0&&t===""?P({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),N(t)?new v(Hr(t)):(h(t)?e._d=t:D(a)?ul(e):a?Ur(e):hl(e),T(e)||(e._d=null),e))}function hl(e){var t=e._i;r(t)?e._d=new Date(s.now()):h(t)?e._d=new Date(t.valueOf()):typeof t=="string"?il(e):D(t)?(e._a=f(t.slice(0),function(a){return parseInt(a,10)}),Br(e)):F(t)?cl(e):c(t)?e._d=new Date(t):s.createFromInputFallback(e)}function Bn(e,t,a,i,d){var k={};return(t===!0||t===!1)&&(i=t,t=void 0),(a===!0||a===!1)&&(i=a,a=void 0),(F(e)&&y(e)||D(e)&&e.length===0)&&(e=void 0),k._isAMomentObject=!0,k._useUTC=k._isUTC=d,k._l=a,k._i=e,k._f=t,k._strict=i,dl(k)}function Ve(e,t,a,i){return Bn(e,t,a,i,!1)}var fl=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ve.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:P()}),ml=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ve.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:P()});function Un(e,t){var a,i;if(t.length===1&&D(t[0])&&(t=t[0]),!t.length)return Ve();for(a=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][e](a))&&(a=t[i]);return a}function pl(){var e=[].slice.call(arguments,0);return Un("isBefore",e)}function gl(){var e=[].slice.call(arguments,0);return Un("isAfter",e)}var yl=function(){return Date.now?Date.now():+new Date},Qt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function vl(e){var t,a=!1,i,d=Qt.length;for(t in e)if(o(e,t)&&!(qe.call(Qt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(i=0;i<d;++i)if(e[Qt[i]]){if(a)return!1;parseFloat(e[Qt[i]])!==xe(e[Qt[i]])&&(a=!0)}return!0}function _l(){return this._isValid}function bl(){return mt(NaN)}function or(e){var t=me(e),a=t.year||0,i=t.quarter||0,d=t.month||0,k=t.week||t.isoWeek||0,q=t.day||0,ne=t.hour||0,pe=t.minute||0,je=t.second||0,rt=t.millisecond||0;this._isValid=vl(t),this._milliseconds=+rt+je*1e3+pe*6e4+ne*1e3*60*60,this._days=+q+k*7,this._months=+d+i*3+a*12,this._data={},this._locale=St(),this._bubble()}function lr(e){return e instanceof or}function Gr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function wl(e,t,a){var i=Math.min(e.length,t.length),d=Math.abs(e.length-t.length),k=0,q;for(q=0;q<i;q++)xe(e[q])!==xe(t[q])&&k++;return k+d}function Gn(e,t){Q(e,0,0,function(){var a=this.utcOffset(),i="+";return a<0&&(a=-a,i="-"),i+Z(~~(a/60),2)+t+Z(~~a%60,2)})}Gn("Z",":"),Gn("ZZ",""),re("Z",Be),re("ZZ",Be),Re(["Z","ZZ"],function(e,t,a){a._useUTC=!0,a._tzm=Jr(Be,e)});var Sl=/([\+\-]|\d\d)/gi;function Jr(e,t){var a=(t||"").match(e),i,d,k;return a===null?null:(i=a[a.length-1]||[],d=(i+"").match(Sl)||["-",0,0],k=+(d[1]*60)+xe(d[2]),k===0?0:d[0]==="+"?k:-k)}function Kr(e,t){var a,i;return t._isUTC?(a=t.clone(),i=(N(e)||h(e)?e.valueOf():Ve(e).valueOf())-a.valueOf(),a._d.setTime(a._d.valueOf()+i),s.updateOffset(a,!1),a):Ve(e).local()}function Xr(e){return-Math.round(e._d.getTimezoneOffset())}s.updateOffset=function(){};function Ml(e,t,a){var i=this._offset||0,d;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Jr(Be,e),e===null)return this}else Math.abs(e)<16&&!a&&(e=e*60);return!this._isUTC&&t&&(d=Xr(this)),this._offset=e,this._isUTC=!0,d!=null&&this.add(d,"m"),i!==e&&(!t||this._changeInProgress?Zn(this,mt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:Xr(this)}function xl(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Dl(e){return this.utcOffset(0,e)}function kl(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Xr(this),"m")),this}function Ol(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Jr(bt,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Yl(e){return this.isValid()?(e=e?Ve(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function jl(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Cl(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Y(e,this),e=$n(e),e._a?(t=e._isUTC?p(e._a):Ve(e._a),this._isDSTShifted=this.isValid()&&wl(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Tl(){return this.isValid()?!this._isUTC:!1}function Pl(){return this.isValid()?this._isUTC:!1}function Jn(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Nl=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Rl=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function mt(e,t){var a=e,i=null,d,k,q;return lr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(i=Nl.exec(e))?(d=i[1]==="-"?-1:1,a={y:0,d:xe(i[U])*d,h:xe(i[X])*d,m:xe(i[oe])*d,s:xe(i[Me])*d,ms:xe(Gr(i[Ye]*1e3))*d}):(i=Rl.exec(e))?(d=i[1]==="-"?-1:1,a={y:Rt(i[2],d),M:Rt(i[3],d),w:Rt(i[4],d),d:Rt(i[5],d),h:Rt(i[6],d),m:Rt(i[7],d),s:Rt(i[8],d)}):a==null?a={}:typeof a=="object"&&("from"in a||"to"in a)&&(q=El(Ve(a.from),Ve(a.to)),a={},a.ms=q.milliseconds,a.M=q.months),k=new or(a),lr(e)&&o(e,"_locale")&&(k._locale=e._locale),lr(e)&&o(e,"_isValid")&&(k._isValid=e._isValid),k}mt.fn=or.prototype,mt.invalid=bl;function Rt(e,t){var a=e&&parseFloat(e.replace(",","."));return(isNaN(a)?0:a)*t}function Kn(e,t){var a={};return a.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(a.months,"M").isAfter(t)&&--a.months,a.milliseconds=+t-+e.clone().add(a.months,"M"),a}function El(e,t){var a;return e.isValid()&&t.isValid()?(t=Kr(t,e),e.isBefore(t)?a=Kn(e,t):(a=Kn(t,e),a.milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function Xn(e,t){return function(a,i){var d,k;return i!==null&&!isNaN(+i)&&($(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),k=a,a=i,i=k),d=mt(a,i),Zn(this,d,e),this}}function Zn(e,t,a,i){var d=t._milliseconds,k=Gr(t._days),q=Gr(t._months);e.isValid()&&(i=i??!0,q&&Rn(e,dt(e,"Month")+q*a),k&&yt(e,"Date",dt(e,"Date")+k*a),d&&e._d.setTime(e._d.valueOf()+d*a),i&&s.updateOffset(e,k||q))}var Al=Xn(1,"add"),Il=Xn(-1,"subtract");function Qn(e){return typeof e=="string"||e instanceof String}function Fl(e){return N(e)||h(e)||Qn(e)||c(e)||Vl(e)||zl(e)||e===null||e===void 0}function zl(e){var t=F(e)&&!y(e),a=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],d,k,q=i.length;for(d=0;d<q;d+=1)k=i[d],a=a||o(e,k);return t&&a}function Vl(e){var t=D(e),a=!1;return t&&(a=e.filter(function(i){return!c(i)&&Qn(e)}).length===0),t&&a}function Ll(e){var t=F(e)&&!y(e),a=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],d,k;for(d=0;d<i.length;d+=1)k=i[d],a=a||o(e,k);return t&&a}function Wl(e,t){var a=e.diff(t,"days",!0);return a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse"}function ql(e,t){arguments.length===1&&(arguments[0]?Fl(arguments[0])?(e=arguments[0],t=void 0):Ll(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var a=e||Ve(),i=Kr(a,this).startOf("day"),d=s.calendarFormat(this,i)||"sameElse",k=t&&(L(t[d])?t[d].call(this,a):t[d]);return this.format(k||this.localeData().calendar(d,this,Ve(a)))}function Hl(){return new v(this)}function $l(e,t){var a=N(e)?e:Ve(e);return this.isValid()&&a.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(t).valueOf()):!1}function Bl(e,t){var a=N(e)?e:Ve(e);return this.isValid()&&a.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()<a.valueOf():this.clone().endOf(t).valueOf()<a.valueOf()):!1}function Ul(e,t,a,i){var d=N(e)?e:Ve(e),k=N(t)?t:Ve(t);return this.isValid()&&d.isValid()&&k.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(d,a):!this.isBefore(d,a))&&(i[1]===")"?this.isBefore(k,a):!this.isAfter(k,a))):!1}function Gl(e,t){var a=N(e)?e:Ve(e),i;return this.isValid()&&a.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()===a.valueOf():(i=a.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf())):!1}function Jl(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Kl(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Xl(e,t,a){var i,d,k;if(!this.isValid())return NaN;if(i=Kr(e,this),!i.isValid())return NaN;switch(d=(i.utcOffset()-this.utcOffset())*6e4,t=de(t),t){case"year":k=ur(this,i)/12;break;case"month":k=ur(this,i);break;case"quarter":k=ur(this,i)/3;break;case"second":k=(this-i)/1e3;break;case"minute":k=(this-i)/6e4;break;case"hour":k=(this-i)/36e5;break;case"day":k=(this-i-d)/864e5;break;case"week":k=(this-i-d)/6048e5;break;default:k=this-i}return a?k:st(k)}function ur(e,t){if(e.date()<t.date())return-ur(t,e);var a=(t.year()-e.year())*12+(t.month()-e.month()),i=e.clone().add(a,"months"),d,k;return t-i<0?(d=e.clone().add(a-1,"months"),k=(t-i)/(i-d)):(d=e.clone().add(a+1,"months"),k=(t-i)/(d-i)),-(a+k)||0}s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Zl(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ql(e){if(!this.isValid())return null;var t=e!==!0,a=t?this.clone().utc():this;return a.year()<0||a.year()>9999?_e(a,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",_e(a,"Z")):_e(a,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eu(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",a,i,d,k;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),a="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",d="-MM-DD[T]HH:mm:ss.SSS",k=t+'[")]',this.format(a+i+d+k)}function tu(e){e||(e=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var t=_e(this,e);return this.localeData().postformat(t)}function ru(e,t){return this.isValid()&&(N(e)&&e.isValid()||Ve(e).isValid())?mt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function au(e){return this.from(Ve(),e)}function nu(e,t){return this.isValid()&&(N(e)&&e.isValid()||Ve(e).isValid())?mt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function iu(e){return this.to(Ve(),e)}function ei(e){var t;return e===void 0?this._locale._abbr:(t=St(e),t!=null&&(this._locale=t),this)}var ti=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function ri(){return this._locale}var cr=1e3,qt=60*cr,dr=60*qt,ai=(365*400+97)*24*dr;function Ht(e,t){return(e%t+t)%t}function ni(e,t,a){return e<100&&e>=0?new Date(e+400,t,a)-ai:new Date(e,t,a).valueOf()}function ii(e,t,a){return e<100&&e>=0?Date.UTC(e+400,t,a)-ai:Date.UTC(e,t,a)}function su(e){var t,a;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?ii:ni,e){case"year":t=a(this.year(),0,1);break;case"quarter":t=a(this.year(),this.month()-this.month()%3,1);break;case"month":t=a(this.year(),this.month(),1);break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=a(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ht(t+(this._isUTC?0:this.utcOffset()*qt),dr);break;case"minute":t=this._d.valueOf(),t-=Ht(t,qt);break;case"second":t=this._d.valueOf(),t-=Ht(t,cr);break}return this._d.setTime(t),s.updateOffset(this,!0),this}function ou(e){var t,a;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?ii:ni,e){case"year":t=a(this.year()+1,0,1)-1;break;case"quarter":t=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=a(this.year(),this.month()+1,1)-1;break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=a(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=dr-Ht(t+(this._isUTC?0:this.utcOffset()*qt),dr)-1;break;case"minute":t=this._d.valueOf(),t+=qt-Ht(t,qt)-1;break;case"second":t=this._d.valueOf(),t+=cr-Ht(t,cr)-1;break}return this._d.setTime(t),s.updateOffset(this,!0),this}function lu(){return this._d.valueOf()-(this._offset||0)*6e4}function uu(){return Math.floor(this.valueOf()/1e3)}function cu(){return new Date(this.valueOf())}function du(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function hu(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function fu(){return this.isValid()?this.toISOString():null}function mu(){return T(this)}function pu(){return g({},_(this))}function gu(){return _(this).overflow}function yu(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Q("N",0,0,"eraAbbr"),Q("NN",0,0,"eraAbbr"),Q("NNN",0,0,"eraAbbr"),Q("NNNN",0,0,"eraName"),Q("NNNNN",0,0,"eraNarrow"),Q("y",["y",1],"yo","eraYear"),Q("y",["yy",2],0,"eraYear"),Q("y",["yyy",3],0,"eraYear"),Q("y",["yyyy",4],0,"eraYear"),re("N",Zr),re("NN",Zr),re("NNN",Zr),re("NNNN",Yu),re("NNNNN",ju),Re(["N","NN","NNN","NNNN","NNNNN"],function(e,t,a,i){var d=a._locale.erasParse(e,i,a._strict);d?_(a).era=d:_(a).invalidEra=e}),re("y",lt),re("yy",lt),re("yyy",lt),re("yyyy",lt),re("yo",Cu),Re(["y","yy","yyy","yyyy"],Xe),Re(["yo"],function(e,t,a,i){var d;a._locale._eraYearOrdinalRegex&&(d=e.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?t[Xe]=a._locale.eraYearOrdinalParse(e,d):t[Xe]=parseInt(e,10)});function vu(e,t){var a,i,d,k=this._eras||St("en")._eras;for(a=0,i=k.length;a<i;++a){switch(typeof k[a].since){case"string":d=s(k[a].since).startOf("day"),k[a].since=d.valueOf();break}switch(typeof k[a].until){case"undefined":k[a].until=1/0;break;case"string":d=s(k[a].until).startOf("day").valueOf(),k[a].until=d.valueOf();break}}return k}function _u(e,t,a){var i,d,k=this.eras(),q,ne,pe;for(e=e.toUpperCase(),i=0,d=k.length;i<d;++i)if(q=k[i].name.toUpperCase(),ne=k[i].abbr.toUpperCase(),pe=k[i].narrow.toUpperCase(),a)switch(t){case"N":case"NN":case"NNN":if(ne===e)return k[i];break;case"NNNN":if(q===e)return k[i];break;case"NNNNN":if(pe===e)return k[i];break}else if([q,ne,pe].indexOf(e)>=0)return k[i]}function bu(e,t){var a=e.since<=e.until?1:-1;return t===void 0?s(e.since).year():s(e.since).year()+(t-e.offset)*a}function wu(){var e,t,a,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),i[e].since<=a&&a<=i[e].until||i[e].until<=a&&a<=i[e].since)return i[e].name;return""}function Su(){var e,t,a,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),i[e].since<=a&&a<=i[e].until||i[e].until<=a&&a<=i[e].since)return i[e].narrow;return""}function Mu(){var e,t,a,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),i[e].since<=a&&a<=i[e].until||i[e].until<=a&&a<=i[e].since)return i[e].abbr;return""}function xu(){var e,t,a,i,d=this.localeData().eras();for(e=0,t=d.length;e<t;++e)if(a=d[e].since<=d[e].until?1:-1,i=this.clone().startOf("day").valueOf(),d[e].since<=i&&i<=d[e].until||d[e].until<=i&&i<=d[e].since)return(this.year()-s(d[e].since).year())*a+d[e].offset;return this.year()}function Du(e){return o(this,"_erasNameRegex")||Qr.call(this),e?this._erasNameRegex:this._erasRegex}function ku(e){return o(this,"_erasAbbrRegex")||Qr.call(this),e?this._erasAbbrRegex:this._erasRegex}function Ou(e){return o(this,"_erasNarrowRegex")||Qr.call(this),e?this._erasNarrowRegex:this._erasRegex}function Zr(e,t){return t.erasAbbrRegex(e)}function Yu(e,t){return t.erasNameRegex(e)}function ju(e,t){return t.erasNarrowRegex(e)}function Cu(e,t){return t._eraYearOrdinalRegex||lt}function Qr(){var e=[],t=[],a=[],i=[],d,k,q,ne,pe,je=this.eras();for(d=0,k=je.length;d<k;++d)q=ct(je[d].name),ne=ct(je[d].abbr),pe=ct(je[d].narrow),t.push(q),e.push(ne),a.push(pe),i.push(q),i.push(ne),i.push(pe);this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}Q(0,["gg",2],0,function(){return this.weekYear()%100}),Q(0,["GG",2],0,function(){return this.isoWeekYear()%100});function hr(e,t){Q(0,[e,e.length],0,t)}hr("gggg","weekYear"),hr("ggggg","weekYear"),hr("GGGG","isoWeekYear"),hr("GGGGG","isoWeekYear"),re("G",_t),re("g",_t),re("GG",we,Ie),re("gg",we,Ie),re("GGGG",vt,Ze),re("gggg",vt,Ze),re("GGGGG",pt,ge),re("ggggg",pt,ge),Nt(["gggg","ggggg","GGGG","GGGGG"],function(e,t,a,i){t[i.substr(0,2)]=xe(e)}),Nt(["gg","GG"],function(e,t,a,i){t[i]=s.parseTwoDigitYear(e)});function Tu(e){return si.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Pu(e){return si.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Nu(){return wt(this.year(),1,4)}function Ru(){return wt(this.isoWeekYear(),1,4)}function Eu(){var e=this.localeData()._week;return wt(this.year(),e.dow,e.doy)}function Au(){var e=this.localeData()._week;return wt(this.weekYear(),e.dow,e.doy)}function si(e,t,a,i,d){var k;return e==null?Kt(this,i,d).year:(k=wt(e,i,d),t>k&&(t=k),Iu.call(this,e,t,a,i,d))}function Iu(e,t,a,i,d){var k=In(e,t,a,i,d),q=Jt(k.year,0,k.dayOfYear);return this.year(q.getUTCFullYear()),this.month(q.getUTCMonth()),this.date(q.getUTCDate()),this}Q("Q",0,"Qo","quarter"),re("Q",He),Re("Q",function(e,t){t[S]=(xe(e)-1)*3});function Fu(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Q("D",["DD",2],"Do","date"),re("D",we,ut),re("DD",we,Ie),re("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Re(["D","DD"],U),Re("Do",function(e,t){t[U]=xe(e.match(we)[0])});var oi=Ke("Date",!0);Q("DDD",["DDDD",3],"DDDo","dayOfYear"),re("DDD",ht),re("DDDD",Je),Re(["DDD","DDDD"],function(e,t,a){a._dayOfYear=xe(e)});function zu(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Q("m",["mm",2],0,"minute"),re("m",we,it),re("mm",we,Ie),Re(["m","mm"],oe);var Vu=Ke("Minutes",!1);Q("s",["ss",2],0,"second"),re("s",we,it),re("ss",we,Ie),Re(["s","ss"],Me);var Lu=Ke("Seconds",!1);Q("S",0,0,function(){return~~(this.millisecond()/100)}),Q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Q(0,["SSS",3],0,"millisecond"),Q(0,["SSSS",4],0,function(){return this.millisecond()*10}),Q(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Q(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Q(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Q(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Q(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),re("S",ht,He),re("SS",ht,Ie),re("SSS",ht,Je);var jt,li;for(jt="SSSS";jt.length<=9;jt+="S")re(jt,lt);function Wu(e,t){t[Ye]=xe(("0."+e)*1e3)}for(jt="S";jt.length<=9;jt+="S")Re(jt,Wu);li=Ke("Milliseconds",!1),Q("z",0,0,"zoneAbbr"),Q("zz",0,0,"zoneName");function qu(){return this._isUTC?"UTC":""}function Hu(){return this._isUTC?"Coordinated Universal Time":""}var K=v.prototype;K.add=Al,K.calendar=ql,K.clone=Hl,K.diff=Xl,K.endOf=ou,K.format=tu,K.from=ru,K.fromNow=au,K.to=nu,K.toNow=iu,K.get=et,K.invalidAt=gu,K.isAfter=$l,K.isBefore=Bl,K.isBetween=Ul,K.isSame=Gl,K.isSameOrAfter=Jl,K.isSameOrBefore=Kl,K.isValid=mu,K.lang=ti,K.locale=ei,K.localeData=ri,K.max=ml,K.min=fl,K.parsingFlags=pu,K.set=Gt,K.startOf=su,K.subtract=Il,K.toArray=du,K.toObject=hu,K.toDate=cu,K.toISOString=Ql,K.inspect=eu,typeof Symbol<"u"&&Symbol.for!=null&&(K[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),K.toJSON=fu,K.toString=Zl,K.unix=uu,K.valueOf=lu,K.creationData=yu,K.eraName=wu,K.eraNarrow=Su,K.eraAbbr=Mu,K.eraYear=xu,K.year=Le,K.isLeapYear=$e,K.weekYear=Tu,K.isoWeekYear=Pu,K.quarter=K.quarters=Fu,K.month=En,K.daysInMonth=uo,K.week=K.weeks=vo,K.isoWeek=K.isoWeeks=_o,K.weeksInYear=Eu,K.weeksInWeekYear=Au,K.isoWeeksInYear=Nu,K.isoWeeksInISOWeekYear=Ru,K.date=oi,K.day=K.days=Po,K.weekday=No,K.isoWeekday=Ro,K.dayOfYear=zu,K.hour=K.hours=Lo,K.minute=K.minutes=Vu,K.second=K.seconds=Lu,K.millisecond=K.milliseconds=li,K.utcOffset=Ml,K.utc=Dl,K.local=kl,K.parseZone=Ol,K.hasAlignedHourOffset=Yl,K.isDST=jl,K.isLocal=Tl,K.isUtcOffset=Pl,K.isUtc=Jn,K.isUTC=Jn,K.zoneAbbr=qu,K.zoneName=Hu,K.dates=M("dates accessor is deprecated. Use date instead.",oi),K.months=M("months accessor is deprecated. Use month instead",En),K.years=M("years accessor is deprecated. Use year instead",Le),K.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",xl),K.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Cl);function $u(e){return Ve(e*1e3)}function Bu(){return Ve.apply(null,arguments).parseZone()}function ui(e){return e}var Ne=J.prototype;Ne.calendar=fe,Ne.longDateFormat=ze,Ne.invalidDate=b,Ne.ordinal=I,Ne.preparse=ui,Ne.postformat=ui,Ne.relativeTime=te,Ne.pastFuture=ie,Ne.set=A,Ne.eras=vu,Ne.erasParse=_u,Ne.erasConvertYear=bu,Ne.erasAbbrRegex=ku,Ne.erasNameRegex=Du,Ne.erasNarrowRegex=Ou,Ne.months=io,Ne.monthsShort=so,Ne.monthsParse=lo,Ne.monthsRegex=ho,Ne.monthsShortRegex=co,Ne.week=mo,Ne.firstDayOfYear=yo,Ne.firstDayOfWeek=go,Ne.weekdays=Oo,Ne.weekdaysMin=jo,Ne.weekdaysShort=Yo,Ne.weekdaysParse=To,Ne.weekdaysRegex=Eo,Ne.weekdaysShortRegex=Ao,Ne.weekdaysMinRegex=Io,Ne.isPM=zo,Ne.meridiem=Wo;function fr(e,t,a,i){var d=St(),k=p().set(i,t);return d[a](k,e)}function ci(e,t,a){if(c(e)&&(t=e,e=void 0),e=e||"",t!=null)return fr(e,t,a,"month");var i,d=[];for(i=0;i<12;i++)d[i]=fr(e,i,a,"month");return d}function ea(e,t,a,i){typeof e=="boolean"?(c(t)&&(a=t,t=void 0),t=t||""):(t=e,a=t,e=!1,c(t)&&(a=t,t=void 0),t=t||"");var d=St(),k=e?d._week.dow:0,q,ne=[];if(a!=null)return fr(t,(a+k)%7,i,"day");for(q=0;q<7;q++)ne[q]=fr(t,(q+k)%7,i,"day");return ne}function Uu(e,t){return ci(e,t,"months")}function Gu(e,t){return ci(e,t,"monthsShort")}function Ju(e,t,a){return ea(e,t,a,"weekdays")}function Ku(e,t,a){return ea(e,t,a,"weekdaysShort")}function Xu(e,t,a){return ea(e,t,a,"weekdaysMin")}Yt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,a=xe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+a}}),s.lang=M("moment.lang is deprecated. Use moment.locale instead.",Yt),s.langData=M("moment.langData is deprecated. Use moment.localeData instead.",St);var Mt=Math.abs;function Zu(){var e=this._data;return this._milliseconds=Mt(this._milliseconds),this._days=Mt(this._days),this._months=Mt(this._months),e.milliseconds=Mt(e.milliseconds),e.seconds=Mt(e.seconds),e.minutes=Mt(e.minutes),e.hours=Mt(e.hours),e.months=Mt(e.months),e.years=Mt(e.years),this}function di(e,t,a,i){var d=mt(t,a);return e._milliseconds+=i*d._milliseconds,e._days+=i*d._days,e._months+=i*d._months,e._bubble()}function Qu(e,t){return di(this,e,t,1)}function ec(e,t){return di(this,e,t,-1)}function hi(e){return e<0?Math.floor(e):Math.ceil(e)}function tc(){var e=this._milliseconds,t=this._days,a=this._months,i=this._data,d,k,q,ne,pe;return e>=0&&t>=0&&a>=0||e<=0&&t<=0&&a<=0||(e+=hi(ta(a)+t)*864e5,t=0,a=0),i.milliseconds=e%1e3,d=st(e/1e3),i.seconds=d%60,k=st(d/60),i.minutes=k%60,q=st(k/60),i.hours=q%24,t+=st(q/24),pe=st(fi(t)),a+=pe,t-=hi(ta(pe)),ne=st(a/12),a%=12,i.days=t,i.months=a,i.years=ne,this}function fi(e){return e*4800/146097}function ta(e){return e*146097/4800}function rc(e){if(!this.isValid())return NaN;var t,a,i=this._milliseconds;if(e=de(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+i/864e5,a=this._months+fi(t),e){case"month":return a;case"quarter":return a/3;case"year":return a/12}else switch(t=this._days+Math.round(ta(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return t*24+i/36e5;case"minute":return t*1440+i/6e4;case"second":return t*86400+i/1e3;case"millisecond":return Math.floor(t*864e5)+i;default:throw new Error("Unknown unit "+e)}}function xt(e){return function(){return this.as(e)}}var mi=xt("ms"),ac=xt("s"),nc=xt("m"),ic=xt("h"),sc=xt("d"),oc=xt("w"),lc=xt("M"),uc=xt("Q"),cc=xt("y"),dc=mi;function hc(){return mt(this)}function fc(e){return e=de(e),this.isValid()?this[e+"s"]():NaN}function Et(e){return function(){return this.isValid()?this._data[e]:NaN}}var mc=Et("milliseconds"),pc=Et("seconds"),gc=Et("minutes"),yc=Et("hours"),vc=Et("days"),_c=Et("months"),bc=Et("years");function wc(){return st(this.days()/7)}var Dt=Math.round,$t={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Sc(e,t,a,i,d){return d.relativeTime(t||1,!!a,e,i)}function Mc(e,t,a,i){var d=mt(e).abs(),k=Dt(d.as("s")),q=Dt(d.as("m")),ne=Dt(d.as("h")),pe=Dt(d.as("d")),je=Dt(d.as("M")),rt=Dt(d.as("w")),kt=Dt(d.as("y")),Ct=k<=a.ss&&["s",k]||k<a.s&&["ss",k]||q<=1&&["m"]||q<a.m&&["mm",q]||ne<=1&&["h"]||ne<a.h&&["hh",ne]||pe<=1&&["d"]||pe<a.d&&["dd",pe];return a.w!=null&&(Ct=Ct||rt<=1&&["w"]||rt<a.w&&["ww",rt]),Ct=Ct||je<=1&&["M"]||je<a.M&&["MM",je]||kt<=1&&["y"]||["yy",kt],Ct[2]=t,Ct[3]=+e>0,Ct[4]=i,Sc.apply(null,Ct)}function xc(e){return e===void 0?Dt:typeof e=="function"?(Dt=e,!0):!1}function Dc(e,t){return $t[e]===void 0?!1:t===void 0?$t[e]:($t[e]=t,e==="s"&&($t.ss=t-1),!0)}function kc(e,t){if(!this.isValid())return this.localeData().invalidDate();var a=!1,i=$t,d,k;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(a=e),typeof t=="object"&&(i=Object.assign({},$t,t),t.s!=null&&t.ss==null&&(i.ss=t.s-1)),d=this.localeData(),k=Mc(this,!a,i,d),a&&(k=d.pastFuture(+this,k)),d.postformat(k)}var ra=Math.abs;function Bt(e){return(e>0)-(e<0)||+e}function mr(){if(!this.isValid())return this.localeData().invalidDate();var e=ra(this._milliseconds)/1e3,t=ra(this._days),a=ra(this._months),i,d,k,q,ne=this.asSeconds(),pe,je,rt,kt;return ne?(i=st(e/60),d=st(i/60),e%=60,i%=60,k=st(a/12),a%=12,q=e?e.toFixed(3).replace(/\.?0+$/,""):"",pe=ne<0?"-":"",je=Bt(this._months)!==Bt(ne)?"-":"",rt=Bt(this._days)!==Bt(ne)?"-":"",kt=Bt(this._milliseconds)!==Bt(ne)?"-":"",pe+"P"+(k?je+k+"Y":"")+(a?je+a+"M":"")+(t?rt+t+"D":"")+(d||i||e?"T":"")+(d?kt+d+"H":"")+(i?kt+i+"M":"")+(e?kt+q+"S":"")):"P0D"}var Ce=or.prototype;Ce.isValid=_l,Ce.abs=Zu,Ce.add=Qu,Ce.subtract=ec,Ce.as=rc,Ce.asMilliseconds=mi,Ce.asSeconds=ac,Ce.asMinutes=nc,Ce.asHours=ic,Ce.asDays=sc,Ce.asWeeks=oc,Ce.asMonths=lc,Ce.asQuarters=uc,Ce.asYears=cc,Ce.valueOf=dc,Ce._bubble=tc,Ce.clone=hc,Ce.get=fc,Ce.milliseconds=mc,Ce.seconds=pc,Ce.minutes=gc,Ce.hours=yc,Ce.days=vc,Ce.weeks=wc,Ce.months=_c,Ce.years=bc,Ce.humanize=kc,Ce.toISOString=mr,Ce.toString=mr,Ce.toJSON=mr,Ce.locale=ei,Ce.localeData=ri,Ce.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",mr),Ce.lang=ti,Q("X",0,0,"unix"),Q("x",0,0,"valueOf"),re("x",_t),re("X",gt),Re("X",function(e,t,a){a._d=new Date(parseFloat(e)*1e3)}),Re("x",function(e,t,a){a._d=new Date(xe(e))});//! moment.js
|
|
65
|
+
return s.version="2.30.1",x(Ve),s.fn=K,s.min=pl,s.max=gl,s.now=yl,s.utc=p,s.unix=$u,s.months=Uu,s.isDate=h,s.locale=Yt,s.invalid=P,s.duration=mt,s.isMoment=N,s.weekdays=Ju,s.parseZone=Bu,s.localeData=St,s.isDuration=lr,s.monthsShort=Gu,s.weekdaysMin=Xu,s.defineLocale=qr,s.updateLocale=Bo,s.locales=Uo,s.weekdaysShort=Ku,s.normalizeUnits=de,s.relativeTimeRounding=xc,s.relativeTimeThreshold=Dc,s.calendarFormat=Wl,s.prototype=K,s.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},s}))})(yr)),yr.exports}var Dh=mn.exports,ki;function kh(){return ki||(ki=1,(function(l,n){(function(u,s){s(typeof Pr=="function"?Mn():u.moment)})(Dh,(function(u){//! moment.js locale configuration
|
|
66
|
+
var s=u.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return s}))})()),mn.exports}kh();var pn={exports:{}},Oh=pn.exports,Oi;function Yh(){return Oi||(Oi=1,(function(l,n){(function(u,s){s(typeof Pr=="function"?Mn():u.moment)})(Oh,(function(u){//! moment.js locale configuration
|
|
67
|
+
var s=u.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(x){var D=x%10,F=~~(x%100/10)===1?"th":D===1?"st":D===2?"nd":D===3?"rd":"th";return x+F},week:{dow:1,doy:4}});return s}))})()),pn.exports}Yh();var gn={exports:{}},jh=gn.exports,Yi;function Ch(){return Yi||(Yi=1,(function(l,n){(function(u,s){s(typeof Pr=="function"?Mn():u.moment)})(jh,(function(u){//! moment.js locale configuration
|
|
68
|
+
function s(D,F,o,y){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[D+" Tage",D+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[D+" Monate",D+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[D+" Jahre",D+" Jahren"]};return F?r[o][0]:r[o][1]}var x=u.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:s,mm:"%d Minuten",h:s,hh:"%d Stunden",d:s,dd:s,w:s,ww:"%d Wochen",M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return x}))})()),gn.exports}Ch();const Pt=l=>{let n="";return l.split(":").forEach(u=>{n+=u}),parseInt(n)},ji=l=>l.toString().padStart(4,"0").match(/.{1,2}/g).join(":"),aa=l=>{const n=l.address;if(l.addresstype==="county"&&n.country)return n.county;if(l.addresstype==="village"&&n.village)return n.village;const u=[];["emergency","historic","military","natural","landuse","place","railway","man_made","aerialway","boundary","amenity","aeroway","club","craft","leisure","office","mountain_pass","shop","tourism","bridge","tunnel","waterway","name"].forEach(D=>{n.hasOwnProperty(D)&&n[D]&&u.push(n[D])}),n.road?u.push(n.road):n.pedestrian?u.push(n.pedestrian):n.suburb?u.push(n.suburb):n.square?u.push(n.square):(n.neighbourhood&&u.push(n.neighbourhood),n.hamlet?u.push(n.hamlet):n.isolated_dwelling?u.push(n.isolated_dwelling):n.locality?u.push(n.locality):n.croft&&u.push(n.croft)),n.house_number&&u.push(n.house_number),n.postcode&&u.push(n.postcode),n.village&&u.push(n.village),n.town?u.push(n.town):n.city&&u.push(n.city);var x=u.join(", ").substr(0,150);return x};function rr(l){let n=window.sessionStorage.getItem(l);if(n!==null){let u=JSON.parse(n);if(new Date(u.expirationDate)>new Date)return u.value;window.sessionStorage.removeItem(l)}return null}function Th(l,n,u){let s=u?new Date(u*1e3):null;if(s){let x={value:n,expirationDate:s.toISOString()};window.sessionStorage.setItem(l,JSON.stringify(x))}}function Ci({day:l,slot:n,i18next:u}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text pl-4",children:[m.jsx("b",{children:l})," ",u.t("alle")," ",u.t("ore")," ",m.jsx("b",{children:n})]})})})})}const Ph=({component:l,current:n,onChange:u,i18next:s})=>{const[x,D]=G.useState(),[F,o]=G.useState([]),[y,r]=G.useState([]),[c,h]=G.useState(!1),[f,g]=G.useState(null),[p,C]=G.useState(null),[_,O]=G.useState(null),[T,P]=G.useState(null),[z,R]=G.useState({}),[Y,v]=G.useState(null),[N,w]=G.useState(!1),[M,W]=G.useState([]),[$,L]=G.useState(!1),A=G.useRef(),B=l.calendarId;he.locale(s.language);const J=j=>{let I=he(j).format("YYYY-MM-DD");fetch(Z(I)).then(V=>V.json()).then(V=>{let te=fe(j||new Date);const ie=V.filter(Ee=>Ee.available==!0);ie.length===0&&E();let de=[];te.forEach(Ee=>{V.some(He=>He.date===Ee&&He.available==!0)?de.push({available:!0,date:Ee}):de.push({available:!1,date:Ee})});const me=de.map(Ee=>{if(Ee.available===!1)return he(Ee.date,"YYYY-MM-DD").toDate()});o(me);const Se=ie.length?ie[0].date:j;ae(Se)}).catch(V=>console.error(V))},ae=j=>{P(null),O(null),r([]);let I=he(j).format("YYYY-MM-DD");fetch(ue(I)).then(V=>V.json()).then(V=>{const te=V.filter(ie=>ie.availability==!0);R(te[0]),te.length>0?(r(V),h(!1),O(he(j).format("L")),D(he(j,"YYYY-MM-DD").toDate())):(V.length>0&&D(he(V[0].date,"YYYY-MM-DD").toDate()),r([]),E())})},ee=()=>{if(B!==""&&B!=null)if(!n.dataValue)J(new Date);else if(l.multiple&&Array.isArray(n.dataValue)){if(n.dataValue.length>0){v(n.dataValue);let j=[];n.dataValue.map(I=>{j.push({...I,date:he(I.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),W(j)}}else if(!l.multiple&&typeof n.dataValue=="object"){const j={date:n.dataValue.date,slot:n.dataValue.slot},I={...n.dataValue,date:he(n.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};W([I]),v(j)}else{let j=n.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),I=j[2].split("#");const V={date:he(j[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:j[1]};l.multiple?(u([{date:j[0],slot:j[1],calendar_id:I[0],meeting_id:I[1],opening_hour_id:I.length===3?I[2]:""}]),W([{date:j[0],slot:j[1],calendar_id:I[0],meeting_id:I[1],opening_hour_id:I.length===3?I[2]:""}])):(u({date:j[0],slot:j[1],calendar_id:I[0],meeting_id:I[1],opening_hour_id:I.length===3?I[2]:""}),W([{date:j[0],slot:j[1],calendar_id:I[0],meeting_id:I[1],opening_hour_id:I.length===3?I[2]:""}])),v(V)}};G.useEffect(()=>{var j;(j=window.FormioInstance)==null||j.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const fe=j=>{let V=he(j,"YYYY-MM").daysInMonth(),te=[];for(;V;){let ie=he(j).date(V);te.push(ie.format("YYYY-MM-DD")),V--}return te},Z=(j,I=!1)=>{let V=l.calendarId,te=l.select_opening_hours,ie=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");let de=`${Fe()}/api/calendars/${V}/availabilities`,me=[`from_time=${he(j).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(j).endOf("month").format("YYYY-MM-DD")}`];return I&&me.push(`available=${I}`),te&&ie&&me.push(`opening_hours=${ie.join()}`),`${de}?${me.join("&")}`},ue=(j,I=!1)=>{let V=l.calendarId,te=l.select_opening_hours,ie=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");const de=he(j).format("YYYY-MM-DD");let me=`${Fe()}/api/calendars/${V}/availabilities/${de}`,Se=[];return I&&Se.push(`available=${I}`),te&&ie&&Se.push(`opening_hours=${ie.join()}`),Se&&(me=`${me}?${Se.join("&")}`),me},se=j=>{J(j)},ye=j=>{setTimeout(()=>{w(!N)},1e3),ae(j)},ce=j=>{P(null),setTimeout(()=>{j&&(C(j.target.dataset),P(j.target.id))},300)},Q=j=>{g(null);let I=`${Fe()}/it/meetings/new-draft`,V={date:p!=null&&p.date?he(p==null?void 0:p.date).format("DD-MM-YYYY"):he(j.target.dataset.date).format("DD-MM-YYYY"),slot:p!=null&&p.value_start&&(p!=null&&p.value_end)?p.value_start+"-"+p.value_end:j.target.dataset.slots,calendar:l.calendarId,opening_hour:p!=null&&p.opening_hour?p==null?void 0:p.opening_hour:j.target.dataset.opening_hour,meeting:f?f.id:"",first_available_date:z.date,first_available_start_time:z.start_time,first_available_end_time:z.end_time,first_availability_updated_at:he().format()};fetch(I,{method:"POST",body:JSON.stringify(V),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(te=>{if(!te.ok)throw new Error(s.t("Intervallo selezionato non disponibile!"));return te.json()}).then(te=>{g(te);const ie={date:V.date,slot:V.slot,calendar_id:V.calendar[0],opening_hour_id:V.opening_hour||V.opening_hour_id,meeting_id:te.id};W([...M,ie])}).catch(te=>{console.log(te),Ge.fire({title:"",html:"<p>"+te+"</p>",icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{p&&(Q(),w(!N))},Pe=()=>m.jsx("span",{children:s.t("Tempo prenotazione scaduto!")}),_e=({minutes:j,seconds:I,completed:V})=>V?m.jsx(Pe,{}):m.jsx("div",{children:m.jsxs("div",{children:[" ",m.jsxs("span",{children:[" ",m.jsxs("i",{children:[s.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",m.jsxs("b",{children:[j," ",s.t("minuti")," ",I," ",s.t("secondi")]})]})]})}),Te=j=>{const I=Pt(j.target.value),V=Pt(j.target.min),te=Pt(j.target.max);I<V||I>te||I>Pt(p.end)?(Ge.fire({title:"",html:`<p>${s.t("l'orario")} <b>${ji(I)}</b> ${s.t("non è valido")}</p>`,icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):C({...p,value_start:j.target.value})},Ae=j=>{const I=Pt(j.target.value),V=Pt(j.target.min),te=Pt(j.target.max);I<V||I>te||I<Pt(p.start)?(Ge.fire({title:"",html:`<p>${s.t("l'orario")} <b>${ji(I)}</b> ${s.t("non è valido")}</p>`,icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):C({...p,value_end:j.target.value})},ze=j=>{if(j===null||j==="")u("");else if(Array.isArray(j)&&j.length>0){let I=[];M.map(V=>{I.push({date:he(V.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:V.slot,calendar_id:V.calendar_id||V.calendar[0],meeting_id:V.meeting_id,opening_hour_id:V.opening_hour||V.opening_hour_id})}),l.multiple?u(I):u(I[0])}else u("")},E=()=>{h(!0),g(null),O(null),ze(null)},b=()=>{if(s.language==="it")return Gs;if(s.language==="en")return Us;if(s.language==="de")return Bs};G.useEffect(()=>{ze(M)},[M]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&$===!1?(L(!0),setTimeout(()=>{ee()},1e3)):(L(!1),setTimeout(()=>{ee()},1e3))},[]);const H=(j,I)=>{let V=`${Fe()}/api/meetings/${I.meeting_id}`;fetch(V,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${rr("auth-token")}`},strictErrors:!0}).then(te=>{if(te&&te.status>400)Ge.fire({title:"",html:`<p>${s.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const ie=[...M.slice(0,j),...M.slice(j+1)];W(ie),J(new Date)}})};return m.jsxs(m.Fragment,{children:[$&&Y?m.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[m.jsxs("b",{children:[Array.isArray(Y)&&Y.length>1?s.t("Giorni selezionati per la prenotazione"):s.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:Array.isArray(Y)?Y.map(j=>m.jsx(Ci,{day:he(j.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:s,slot:j.slot})):m.jsx(Ci,{day:he(Y.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:s,slot:Y.slot})})})})]}):m.jsx("div",{className:"slot-calendar ",children:m.jsxs("div",{className:"row",children:[l.multiple?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:s.t(l.label)}),m.jsx(_r.DayPicker,{mode:"single",selected:x,locale:b(),disabled:F,onMonthChange:se,onDayClick:ye}),m.jsx("p",{children:s.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")})]})}):M.length!==1?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:s.t(l.label)}),m.jsx(_r.DayPicker,{mode:"single",selected:x,locale:b(),disabled:F,onMonthChange:se,onDayClick:ye}),m.jsxs("p",{children:[" ",s.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")]})]})}):null,m.jsx("div",{className:"col-12",children:M.length?m.jsx("div",{className:"row m-2",children:m.jsxs("div",{className:"col-12 mb-4",children:[m.jsxs("b",{children:[M.length>1?s.t("Giorni selezionati per la prenotazione"):s.t("Giorno selezionato per la prenotazione"),":"," "]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:M.map((j,I)=>m.jsx("li",{children:m.jsx("div",{className:"list-item",children:m.jsxs("div",{className:"it-right-zone",children:[m.jsxs("span",{className:"text pl-4",children:[j.date," ",p||j.slot?`${s.t("alle")} ${j.slot}`:""]}),m.jsx(le.Icon,{icon:"it-delete",onClick:()=>H(I,j),role:"button"})]})})},"li"+I))})})}),f?m.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:m.jsx(qs,{date:f.expiration_time,renderer:_e})}):null]})}):null})]})}),m.jsxs(le.Modal,{isOpen:N,toggle:()=>w(!N),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[m.jsx(le.ModalHeader,{toggle:()=>w(!N),id:"daySelected",children:s.t("Seleziona una fascia oraria")}),c?null:m.jsxs("div",{className:"title-xsmall u-grey-dark px-4",children:[" ",s.t("Seleziona una fascia oraria e, se necessario, utilizza l'apposito controllo per accorciare la durata della prenotazione, Poi clicca su Conferma")]}),m.jsx(le.ModalBody,{children:m.jsxs("div",{className:"row",children:[M.length>=1?m.jsxs("div",{children:[_&&!c?m.jsxs("h6",{children:[s.t("Orari disponibili del")," ",Oe(_).format("DD/MM/YYYY")]}):null,m.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[m.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:m.jsxs("b",{children:[m.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",s.t("Ultimo orario selezionato")]})}),m.jsx("div",{className:"col-6 px-2",children:m.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:T==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":M[M.length-1].slot,"data-opening_hour":M[M.length-1].opening_hour_id,"data-start":M[M.length-1].slot.split("-")[0],"data-end":M[M.length-1].slot.split("-")[1],"data-value_start":M[M.length-1].slot.split("-")[0],"data-value_end":M[M.length-1].slot.split("-")[1],disabled:c,children:M[M.length-1].slot})})]})]}):null,m.jsx("div",{children:_&&M.length>=1?m.jsx("h6",{children:s.t("Seleziona altri orari")}):c?null:m.jsxs("h6",{children:[s.t("Orari disponibili del")," ",Oe(_).format("DD/MM/YYYY")]})}),y.map((j,I)=>m.jsx("div",{className:"col-6",children:m.jsxs("button",{type:"button",id:"slot-"+I,onClick:ce,ref:A,className:T==="slot-"+I?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":j.date,"data-start":j.start_time,"data-end":j.end_time,"data-value_start":j.start_time,"data-value_end":j.end_time,"data-slots":j.start_time+"-"+j.end_time,"data-opening_hour":j.opening_hour,"data-min_duration":j.min_duration,disabled:j.slots_available==0,children:[j.start_time," - ",j.end_time]})},"slot-"+I)),c?m.jsxs("div",{className:"callout callout-highlight warning",children:[m.jsxs("div",{className:"callout-title",children:[m.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),s.t("Attenzione")]}),m.jsxs("p",{children:[" ",s.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null,m.jsx("div",{className:"col-12",children:p!=null&&p.value_start&&T?m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-12 mb-3",children:m.jsx("p",{className:"mb-3",children:m.jsx("b",{children:s.t("Se necessario, utilizza il controllo che segue per accorciare la durata della prenotazione")})})}),m.jsx("div",{className:"col-12 col-md-6 mb-4",children:m.jsx(le.Input,{type:"time",label:s.t("Dalle"),className:"active",defaultValue:p.value_start||p.start,min:p.start,max:p.end,onBlur:Te})}),m.jsx("div",{className:"col-12 col-md-6 mb-4",children:m.jsx(le.Input,{type:"time",label:s.t("alle"),className:"active",defaultValue:p.value_end||p.end,onBlur:Ae,min:p.start,max:p.end})})]}):null})]})}),m.jsx(le.ModalFooter,{children:m.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!_||!(p!=null&&p.value_start),children:s.t("Conferma")})})]})]})};var It;let Js=(It=class extends ot.ReactComponent{constructor(n,u,s){super(n,u,s)}static get builderInfo(){return{title:"Dynamic Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:It.schema()}}static schema(){return ot.ReactComponent.schema({type:"dynamic_calendar"})}attachReact(n,u){this.rootComponent=Ft.createRoot(n),this.rootComponent.render(m.jsx(Ph,{ref:u,component:this.component,value:this.dataValue,onChange:s=>this.setValue(s),...this,current:this}))}setValue(n){if(n)if(Array.isArray(n))this.selectedNextSlots=n,this.updateValue(n),this.shouldSetValue=!0;else if(typeof n=="object")this.date=n.date,this.slot=n.slot,this.meeting=n.meeting_id,this.meeting_expiration_time=null,this.opening_hour=n.opening_hour_id,this.calendar_id=n.calendar_id,this.updateValue(n),this.shouldSetValue=!0;else{let u=n.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),s=u[2].split("#");this.date=u[0],this.slot=u[1],this.meeting=s[1],this.meeting_expiration_time=null,this.opening_hour=s.length===3?s[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let n=this.meeting?this.meeting:"",u=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:n,opening_hour_id:u}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}},Tt(It,"editForm",Ic),It);const Nh=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{type:"select",label:"Nome Calendario",key:"calendarId",input:!0,weight:1,placeholder:"Nome Calendario",tooltip:"Inserisci il nome del calendario",dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars?type=time_fixed_slots"},valueProperty:"id",template:"<span>{{ item.title }}</span>",selectValues:"Results"},{type:"checkbox",label:"Seleziona orari di apertura",key:"select_opening_hours",input:!0,weight:1,tooltip:"Abilita per selezionare i singoli orari di apertura",defaultValue:!1},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1},{type:"select",label:"Orari di apertura",key:"opening_hours",input:!0,weight:1,placeholder:"Seleziona gli orari di apertura",tooltip:"Seleziona gli orari di apertura",multiple:!0,dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars/{{data.calendarId}}/opening-hours"},valueProperty:"id",template:"<span>{{ item.name }}</span>",selectValues:"results",conditional:{show:!0,when:"select_opening_hours",eq:"true"}},{label:"Api Url",redrawOn:"data",calculateValue:`if (data.calendarId) {
|
|
69
69
|
let url = data.url + '/api/calendars/' + data.calendarId + '/overlaps';
|
|
70
70
|
if (data.select_opening_hours && data.opening_hours.length > 0) {
|
|
71
71
|
let qs = "?opening_hours=" + data.opening_hours.join();
|
|
@@ -96,12 +96,12 @@ if(data.calendarId && data.api_url){
|
|
|
96
96
|
data.overlaps_validation = -1; document.querySelector("input[name^='data[overlaps_validation]']").value = -1;
|
|
97
97
|
}
|
|
98
98
|
);
|
|
99
|
-
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function cc(...f){return ot.Components.baseEditForm([{key:"display",components:uc}],...f)}function gn({day:f,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text pl-4",children:[h.jsx("b",{children:f})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}const dc=({component:f,current:i,onChange:g,i18next:l})=>{const[V,B]=q.useState(),[X,s]=q.useState([]),[x,a]=q.useState([]),[o,c]=q.useState(!1),[d,p]=q.useState(null),[m,T]=q.useState(null),[v,D]=q.useState(null),[O,j]=q.useState(null),[R,N]=q.useState({}),[k,y]=q.useState(null),[C,_]=q.useState(!1),[M,z]=q.useState([]),[H,F]=q.useState(!1),E=q.useRef(),$=f.calendarId;he.locale(l.language);const J=b=>{let W=he(b).format("YYYY-MM-DD");fetch(Q(W)).then(Y=>Y.json()).then(Y=>{let A=fe(b||new Date);const I=Y.filter(me=>me.available==!0);I.length===0&&Re();let ie=[];A.forEach(me=>{Y.some(Me=>Me.date===me&&Me.available==!0)?ie.push({available:!0,date:me}):ie.push({available:!1,date:me})});const _e=ie.map(me=>{if(me.available===!1)return he(me.date,"YYYY-MM-DD").toDate()});s(_e);const de=I.length?I[0].date:b;re(de)}).catch(Y=>console.error(Y))},re=b=>{j(null),D(null),a([]);let W=he(b).format("YYYY-MM-DD");fetch(ue(W)).then(Y=>Y.json()).then(Y=>{const A=Y.filter(I=>I.availability==!0);N(A[0]),A.length>0?(a(Y),c(!1),D(he(b).format("L")),B(he(b,"YYYY-MM-DD").toDate())):(Y.length>0&&B(he(Y[0].date,"YYYY-MM-DD").toDate()),a([]),Re())})},ee=()=>{if($!==""&&$!=null)if(!i.dataValue)J(new Date);else if(f.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){y(i.dataValue);let b=[];i.dataValue.map(W=>{b.push({...W,date:he(W.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),z(b)}}else if(!f.multiple&&typeof i.dataValue=="object"){const b={date:i.dataValue.date,slot:i.dataValue.slot},W={...i.dataValue,date:he(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};z([W]),y(b)}else{let b=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),W=b[2].split("#");const Y={date:he(b[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:b[1]};f.multiple?(g([{date:b[0],slot:b[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}]),z([{date:b[0],slot:b[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])):(g({date:b[0],slot:b[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}),z([{date:b[0],slot:b[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])),y(Y)}};q.useEffect(()=>{var b;(b=window.FormioInstance)==null||b.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const fe=b=>{let Y=he(b,"YYYY-MM").daysInMonth(),A=[];for(;Y;){let I=he(b).date(Y);A.push(I.format("YYYY-MM-DD")),Y--}return A},Q=(b,W=!1)=>{let Y=f.calendarId,A=f.select_opening_hours,I=f.select_opening_hours?f.opening_hours:[];window.location.pathname.split("/");let ie=`${Fe()}/api/calendars/${Y}/availabilities`,_e=[`from_time=${he(b).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(b).endOf("month").format("YYYY-MM-DD")}`];return W&&_e.push(`available=${W}`),A&&I&&_e.push(`opening_hours=${I.join()}`),`${ie}?${_e.join("&")}`},ue=(b,W=!1)=>{let Y=f.calendarId,A=f.select_opening_hours,I=f.select_opening_hours?f.opening_hours:[];window.location.pathname.split("/");const ie=he(b).format("YYYY-MM-DD");let _e=`${Fe()}/api/calendars/${Y}/availabilities/${ie}`,de=[];return W&&de.push(`available=${W}`),A&&I&&de.push(`opening_hours=${I.join()}`),de&&(_e=`${_e}?${de.join("&")}`),_e},se=b=>{J(b)},ye=b=>{setTimeout(()=>{_(!C)},1e3),re(b)},ce=b=>{j(null),setTimeout(()=>{b&&(T(b.target.dataset),j(b.target.id))},300)},Z=b=>{p(null);let W=`${Fe()}/it/meetings/new-draft`,Y={date:m!=null&&m.date?he(m==null?void 0:m.date).format("DD-MM-YYYY"):he(b.target.dataset.date).format("DD-MM-YYYY"),slot:m!=null&&m.value_start&&(m!=null&&m.value_end)?m.value_start+"-"+m.value_end:b.target.dataset.slots,calendar:f.calendarId,opening_hour:m!=null&&m.opening_hour?m==null?void 0:m.opening_hour:b.target.dataset.opening_hour,meeting:d?d.id:"",first_available_date:R.date,first_available_start_time:R.start_time,first_available_end_time:R.end_time,first_availability_updated_at:he().format()};fetch(W,{method:"POST",body:JSON.stringify(Y),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(A=>{if(!A.ok)throw new Error(l.t("Intervallo selezionato non disponibile!"));return A.json()}).then(A=>{p(A);const I={date:Y.date,slot:Y.slot,calendar_id:Y.calendar[0],opening_hour_id:Y.opening_hour||Y.opening_hour_id,meeting_id:A.id};z([...M,I])}).catch(A=>{console.log(A),Je.fire({title:"",html:"<p>"+A+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{m&&(Z(),_(!C))},Ne=()=>h.jsx("span",{children:l.t("Tempo prenotazione scaduto!")}),be=({minutes:b,seconds:W,completed:Y})=>Y?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[l.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",h.jsxs("b",{children:[b," ",l.t("minuti")," ",W," ",l.t("secondi")]})]})]})}),Ce=b=>{if(b===null||b==="")g("");else if(Array.isArray(b)&&b.length>0){let W=[];M.map(Y=>{W.push({date:he(Y.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:Y.slot,calendar_id:Y.calendar_id||Y.calendar[0],meeting_id:Y.meeting_id,opening_hour_id:Y.opening_hour||Y.opening_hour_id})}),f.multiple?g(W):g(W[0])}else g("")},Re=()=>{c(!0),p(null),D(null),Ce(null)},ze=()=>{if(l.language==="it")return Yn;if(l.language==="en")return kn;if(l.language==="de")return Dn};q.useEffect(()=>{Ce(M)},[M]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&H===!1?(F(!0),setTimeout(()=>{ee()},1e3)):(F(!1),setTimeout(()=>{ee()},1e3))},[]);const P=(b,W)=>{let Y=`${Fe()}/api/meetings/${W.meeting_id}`;fetch(Y,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(A=>{if(A&&A.status>400)Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const I=[...M.slice(0,b),...M.slice(b+1)];z(I),J(new Date)}})};return h.jsxs(h.Fragment,{children:[H&&k?h.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[h.jsxs("b",{children:[Array.isArray(k)&&k.length>1?l.t("Giorni selezionati per la prenotazione"):l.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:Array.isArray(k)?k.map(b=>h.jsx(gn,{day:he(b.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:l,slot:b.slot})):h.jsx(gn,{day:Ye(k.date).format("DD/MM/YYYY"),i18next:l,slot:k.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[f.multiple?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:l.t(f.label)}),h.jsx(va.DayPicker,{mode:"single",selected:V,locale:ze(),disabled:X,onMonthChange:se,onDayClick:ye})]})}):M.length!==1?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:l.t(f.label)}),h.jsx(va.DayPicker,{mode:"single",selected:V,locale:ze(),disabled:X,onMonthChange:se,onDayClick:ye})]})}):null,h.jsx("div",{className:"col-12",children:M.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[M.length>1?l.t("Giorni selezionati per la prenotazione"):l.t("Giorno selezionato per la prenotazione"),":"," "]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:M.map((b,W)=>h.jsx("li",{children:h.jsx("div",{className:"list-item",children:h.jsxs("div",{className:"it-right-zone",children:[h.jsxs("span",{className:"text pl-4",children:[b.date," ",m||b.slot?`${l.t("alle")} ${b.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>P(W,b),role:"button"})]})})},"li"+W))})})}),d?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(Mn,{date:d.expiration_time,renderer:be})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:C,toggle:()=>_(!C),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>_(!C),id:"daySelected",children:l.t("Seleziona una fascia oraria")}),h.jsx(le.ModalBody,{children:h.jsxs("div",{className:"row",children:[M.length>=1?h.jsxs("div",{children:[v&&!o?h.jsxs("h6",{children:[l.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]}):null,h.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[h.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:h.jsxs("b",{children:[h.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",l.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:O==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(v,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":M[M.length-1].slot,"data-opening_hour":M[M.length-1].opening_hour_id,"data-start":M[M.length-1].slot.split("-")[0],"data-end":M[M.length-1].slot.split("-")[1],"data-value_start":M[M.length-1].slot.split("-")[0],"data-value_end":M[M.length-1].slot.split("-")[1],disabled:o,children:M[M.length-1].slot})})]})]}):null,h.jsx("div",{children:v&&M.length>=1?h.jsx("h6",{children:l.t("Seleziona altri orari")}):o?null:h.jsxs("h6",{children:[l.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]})}),x.map((b,W)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+W,onClick:ce,ref:E,className:O==="slot-"+W?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":b.date,"data-start":b.start_time,"data-end":b.end_time,"data-value_start":b.start_time,"data-value_end":b.end_time,"data-slots":b.start_time+"-"+b.end_time,"data-opening_hour":b.opening_hour,"data-min_duration":b.min_duration,disabled:b.slots_available==0,children:[b.start_time," - ",b.end_time]})},"slot-"+W)),o?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),l.t("Attenzione")]}),h.jsxs("p",{children:[" ",l.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!v||!(m!=null&&m.value_start),children:l.t("Conferma")})})]})]})},ka=class ka extends ot.ReactComponent{constructor(i,g,l){super(i,g,l)}static get builderInfo(){return{title:"Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:ka.schema()}}static schema(){return ot.ReactComponent.schema({type:"calendar"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(dc,{ref:g,component:this.component,value:this.dataValue,onChange:l=>this.setValue(l),...this,current:this}))}setValue(i){if(i)if(Array.isArray(i))this.selectedNextSlots=i,this.updateValue(i),this.shouldSetValue=!0;else if(typeof i=="object")this.date=i.date,this.slot=i.slot,this.meeting=i.meeting_id,this.meeting_expiration_time=null,this.opening_hour=i.opening_hour_id,this.calendar_id=i.calendar_id,this.updateValue(i),this.shouldSetValue=!0;else{let g=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),l=g[2].split("#");this.date=g[0],this.slot=g[1],this.meeting=l[1],this.meeting_expiration_time=null,this.opening_hour=l.length===3?l[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let i=this.meeting?this.meeting:"",g=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:i,opening_hour_id:g}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(ka,"editForm",cc);let _a=ka;const hc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function fc(...f){return ot.Components.baseEditForm([{key:"display",components:hc}],...f)}function mc({day:f,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text-paragraph pl-4",children:[h.jsx("b",{children:f})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}function pc(f,i){if(!i||i.length===0)return;const g=i.map(X=>{const s=new Date(X.start);return(new Date(X.end)-s)/6e4}),l=Math.min(...g),V=g.reduce((X,s)=>X+s,0)/g.length;let B=0;l<=30&&l>15?B=V*1:l<=15?B=V*24:B=V*4,f.setOption("slotHeight",B),document.documentElement.style.setProperty("--slot-height",`${B}px`)}const jn={AVAILABILITY:{key:"availability_data_cache_",duration:10},SLOTS:{key:"availability_slots_cache_",duration:10},SUBMISSION:{key:"submission_cache_",duration:30}},er=(f,i,g)=>{const l={data:g,timestamp:Ye().toISOString()};sessionStorage.setItem(i,JSON.stringify(l)),console.log(`✅ Cache salvato: ${f}`)},tr=(f,i)=>{try{const g=sessionStorage.getItem(i);if(!g)return null;const l=JSON.parse(g),V=Ye().diff(Ye(l.timestamp),"minutes");return V>jn[f].duration?(sessionStorage.removeItem(i),console.log(`⏰ Cache scaduto: ${f}`),null):(console.log(`✅ Cache letto: ${f} (${V} minuti fa)`),l.data)}catch(g){return console.error(`Errore nel leggere il cache (${f}):`,g),null}},ar=(f,...i)=>jn[f].key+btoa(i),mr="calendar_view_state",pr="calendar_view_date",gc=(f,i)=>{try{sessionStorage.setItem(mr,f),sessionStorage.setItem(pr,i||new Date().toISOString())}catch(g){console.error("Errore nel salvare lo stato della view:",g)}},yc=()=>{try{const f=sessionStorage.getItem(mr),i=sessionStorage.getItem(pr);return{viewType:f||"timeGridWeek",date:i?new Date(i):new Date}}catch(f){return console.error("Errore nel leggere lo stato della view:",f),{viewType:"timeGridWeek",date:new Date}}},Tn=()=>{try{sessionStorage.removeItem(mr),sessionStorage.removeItem(pr)}catch(f){console.error("Errore nel pulire lo stato della view:",f)}},yn=cr.Formio.Components.components.field,vc=({component:f,current:i,onChange:g,i18next:l})=>{var Re,ze;const[V,B]=q.useState(null),[X,s]=q.useState(null),[x,a]=q.useState([]),[o,c]=q.useState(!1),[d,p]=q.useState(!1),[m,T]=q.useState(null),[v,D]=q.useState([]),[O,j]=q.useState([]),[R,N]=q.useState([]),[k,y]=q.useState(null),[C,_]=q.useState(null),[M,z]=q.useState(null),H=q.useRef(null),F=q.useRef(null);l.language,he.locale(l.language),Ye.locale(l.language);function E(P){if(!P||P.length===0)return null;const b=P.map(A=>({start:A.start_time,end:A.end_time})),W=b.reduce((A,I)=>I.start<A?I.start:A,b[0].start),Y=b.reduce((A,I)=>I.end>A?I.end:A,b[0].end);return{earliestStartTime:W,latestEndTime:Y}}function $(P){const b=P.map(A=>he(A.date).isoWeekday()),Y=[1,2,3,4,5,6,7].filter(A=>!b.includes(A));Y.length>0?F.current.setOption("hiddenDays",Y):F.current.setOption("hiddenDays",[])}function J(P,b,W){const Y=new URL(P),I=`${Y.pathname.split("/").slice(0,4).join("/")}/${b}/${W}`;return`${Y.origin}${I}${Y.search}`}function re(P,b,W){const Y=new URL(P),I=`${Y.pathname.split("/").slice(0,4).join("/")}`;return`${Y.origin}${I}${Y.search}&from_to=${b}&to_date=${W}`}function ee(P,b,W){return`${Fe()}/api/availabilities/${P}/${b}?calendar_ids=${W}&available=true`}const fe=P=>{N([]),j([]),g({}),P&&j(V.filter(b=>b.date.startsWith(P)))},Q=async(P,b)=>{const W=JSON.parse(P),Y=ar("SLOTS",W.date,W.calendar_ids);if(b==="manual")N([]),z(null),T(null),g({});else{const A=tr("SLOTS",Y);if(A){N(A);return}}try{const A=await window.FormioHelper.anonymousCall(`availabilities/${W.date}?calendar_ids=${W.calendar_ids}`);er("SLOTS",Y,A.data),N(A.data)}catch(A){console.error("Errore nel caricamento degli slot:",A),Je.fire({icon:"error",title:l.t("Errore"),text:l.t("Errore nel caricamento degli orari")})}},ue=P=>{var Y,A,I,te,ie,_e,de,me;const b=JSON.parse(P),W={status:6,calendar:b.calendar_id,opening_hour:b.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Ye(`${b.date}T${b.start_time}`).toISOString(),to_time:Ye(`${b.date}T${b.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(A=(Y=i==null?void 0:i.data)==null?void 0:Y.service_data)==null?void 0:A.id,calendar_group_office_id:(te=(I=i==null?void 0:i.data)==null?void 0:I.user_group)==null?void 0:te.id,calendar_group_place_id:(_e=(ie=i==null?void 0:i.data)==null?void 0:ie.place)==null?void 0:_e.id};window.FormioHelper.authenticatedRequest((de=i==null?void 0:i.dataValue)!=null&&de.id?"PATCH":"POST",(me=i==null?void 0:i.dataValue)!=null&&me.id?`meetings/${i.dataValue.id}`:"meetings",W).then(Me=>{T({day:Ye(b.date).format("dddd, DD MMMM YYYY"),startDate:b.start_time,endDate:b.end_time}),g(Me!=null&&Me.id?Me:Me?{...Me,id:i.dataValue.id}:i.dataValue.id?{...W,id:i.dataValue.id}:{...W})}).catch(Me=>{var Ae,$e;console.error(Me),Me.status===400&&(($e=(Ae=Me==null?void 0:Me.response)==null?void 0:Ae.data)==null?void 0:$e.type)==="validation_error"?Je.fire({title:"",html:"<p>"+l.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+Me+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},se=P=>{const b=new Set,W=[];return P.forEach(Y=>{const A=Ye(Y.date),I=A.format("YYYY-MM");b.has(I)||(b.add(I),W.push({value:I,label:A.format("MMMM YYYY").replace(/^\w/,te=>te.toUpperCase())}))}),W},ye=async()=>{var ie,_e,de,me,Me,Ae,$e,Ie,Ge,Qe;const P=(de=(_e=(ie=i==null?void 0:i.root)==null?void 0:ie.data)==null?void 0:_e.place)!=null&&de.merge_availabilities?(Ae=(Me=(me=i==null?void 0:i.root)==null?void 0:me.data)==null?void 0:Me.place)==null?void 0:Ae.merged_availabilities_link:null,b=he().format("YYYY-MM-DD"),W=he().add(1,"month").format("YYYY-MM-DD"),Y=((Qe=(Ge=(Ie=($e=i==null?void 0:i.root)==null?void 0:$e.data)==null?void 0:Ie.place)==null?void 0:Ge.calendars[0])==null?void 0:Qe.id)||null,A=P?re(P,b,W):ee(b,W,Y),I=ar("AVAILABILITY",A),te=tr("AVAILABILITY",I);if(te){B(te),D(se(te));return}else g({});c(!0);try{const ge=await window.FormioHelper.fetchAPIUrlLimit(A);if(c(!1),!(ge!=null&&ge.length)){Je.fire({icon:"warning",title:l.t("warning"),html:l.t("no_meetings")});return}er("AVAILABILITY",I,ge),B(ge),D(se(ge))}catch(ge){c(!1),console.error("Errore nel caricamento disponibilità:",ge)}};q.useEffect(()=>{if(V!=null&&V.length){const P=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(P!=null&&P.from_time&&(P!=null&&P.to_time)&&!Ye().isAfter(P==null?void 0:P.draft_expiration)){const b=Ye(P.from_time).format("YYYY-MM");y(b),b&&j&&(j(V.filter(W=>W.date.startsWith(b))),_(Ye(P.from_time).format("YYYY-MM-DD")))}else P!=null&&P.draft_expiration&&Ye().isAfter(P==null?void 0:P.draft_expiration)&&Je.fire({icon:"warning",title:l.t("warning"),html:l.t("expired_meeting")})}},[V]),q.useEffect(()=>{const P=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(!v.length||k||P!=null&&P.from_time||P!=null&&P.to_time)return;const b=v[0];b&&(y(b.value),fe(b.value))},[v,k,i==null?void 0:i.dataValue]),q.useEffect(()=>{if(C&&d===!1){const P=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());Q(JSON.stringify({date:C,calendar_ids:P.calendar.id}))}},[C]);const ce=()=>window.innerWidth>768?"timeGridWeek":"timeGridDay";q.useEffect(()=>{const P=()=>{const b=F.current;if(!b)return;const W=ce(),Y=b.getView().type;W!==Y&&b.setOption("view",W)};return window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)},[]),q.useEffect(()=>{const P=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());R!=null&&R.length&&(P!=null&&P.from_time)&&(z(Ye(P.from_time).format("HH:mm")+" - "+Ye(P.to_time).format("HH:mm")),T({day:Ye(P.from_time).format("dddd D MMM YYYY"),startDate:Ye(P.from_time).format("HH:mm"),endDate:Ye(P.to_time).format("HH:mm")}))},[R]);const Z=()=>{const P=yc();F.current=Zr.createCalendar(H.current,[Zr.TimeGrid],{events:[],buttonText:{today:l.t("Oggi")},allDaySlot:!1,firstDay:1,date:P.date,slotEventOverlap:!1,view:ce(),height:"400px",views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:b=>{gc(b.view.type,b.start)},eventClick({event:b,el:W}){var de,me,Me,Ae,$e,Ie,Ge,Qe;document.querySelectorAll(".ec-event").forEach(ge=>{ge.classList.remove("highlighted-event")}),W.classList.add("highlighted-event");const Y=new Date(b.start),A=new Date(b.end),I=Y.toLocaleDateString("it-IT",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),te=Y.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),ie=A.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),_e={status:6,calendar:b.extendedProps.calendar_id,opening_hour:b.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Y,to_time:A,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(me=(de=i==null?void 0:i.data)==null?void 0:de.service_data)==null?void 0:me.id,calendar_group_office_id:(Ae=(Me=i==null?void 0:i.data)==null?void 0:Me.user_group)==null?void 0:Ae.id,calendar_group_place_id:(Ie=($e=i==null?void 0:i.data)==null?void 0:$e.place)==null?void 0:Ie.id};window.FormioHelper.authenticatedRequest((Ge=i==null?void 0:i.dataValue)!=null&&Ge.id?"PATCH":"POST",(Qe=i==null?void 0:i.dataValue)!=null&&Qe.id?`meetings/${i.dataValue.id}`:"meetings",_e).then(ge=>{var Ze;let we;!ge||ge===""?we={..._e,code:null,id:(Ze=i==null?void 0:i.dataValue)==null?void 0:Ze.id}:typeof ge=="object"&&(we=ge),T({day:I,startDate:te,endDate:ie}),g(we)}).catch(ge=>{var we,Ze;console.error(ge),ge.status===400&&((Ze=(we=ge==null?void 0:ge.response)==null?void 0:we.data)==null?void 0:Ze.type)==="validation_error"?Je.fire({title:"",html:"<p>"+l.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+ge+"</p>",icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:ve,eventDidMount:b=>{const{event:W,el:Y}=b,A=W.extendedProps;Y.setAttribute("data-event-id",W.id+"-"+A.date+"-"+A.start_time)},loading:b=>{c(b)}})},ve=P=>{var b,W;(W=(b=i==null?void 0:i.root)==null?void 0:b.data)!=null&&W.place&&F.current.setOption("eventSources",[{events:Ne}])};async function Ne(P,b,W){var Y,A,I,te,ie,_e;try{F.current.setOption("events",[]);const de=he(P.start).format("YYYY-MM-DD"),me=new Date(P.end);me.setDate(me.getDate()-1);const Me=he(me).format("YYYY-MM-DD"),Ae=null,$e=(I=(A=(Y=i==null?void 0:i.root)==null?void 0:Y.data)==null?void 0:A.place)!=null&&I.merge_availabilities?(_e=(ie=(te=i==null?void 0:i.root)==null?void 0:te.data)==null?void 0:ie.place)==null?void 0:_e.merged_availabilities_link:null,Ie=$e?J($e,de,Me):ee(de,Me,Ae),Ge=ar("AVAILABILITY",Ie),Qe=tr("AVAILABILITY",Ge);let ge;if(Qe?(ge=Qe,c(!1)):(ge=await window.FormioHelper.fetchAPIUrlLimit(Ie),er("AVAILABILITY",Ge,ge)),!(ge!=null&&ge.length)){b([]),Je.fire({icon:"warning",title:l.t("warning"),html:l.t("no_meetings")});return}const we=ge.map(tt=>({id:tt.opening_hour_id,allDay:!1,start:`${tt.date}T${tt.start_time}:00`,end:`${tt.date}T${tt.end_time}:00`,title:`${tt.start_time} - ${tt.end_time}`,editable:!1,display:"auto",color:"#ebeef0",textColor:"#000",className:"event-slot",extendedProps:{...tt}})),Ze=E(ge);F.current.setOption("slotMinTime",Ze.earliestStartTime),F.current.setOption("slotMaxTime",Ze.latestEndTime),$(ge),pc(F.current,we),b(we),setTimeout(()=>{be(we)},500)}catch(de){console.error("Errore nel caricamento disponibilità:",de),W==null||W(de)}}q.useEffect(()=>{let P,b=!1;async function W(){var Y,A,I,te,ie;try{if(await((Y=window.FormioInstance)==null?void 0:Y.formReady),b)return;if(!H.current){console.warn("Elemento calendario non trovato");return}const _e=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());_e&&(_e!=null&&_e.draft_expiration)&&Ye().isAfter(_e.draft_expiration)&&(g({}),Tn()),((I=(A=i==null?void 0:i.data)==null?void 0:A.service_data)==null?void 0:I.view_type)==="calendar"?F!=null&&F.current||Z():((ie=(te=i==null?void 0:i.data)==null?void 0:te.service_data)==null?void 0:ie.view_type)==="select"?ye():alert(l.t("Il componente non è configurato per la visualizzazione a calendario"))}catch(_e){console.error("Errore durante l'inizializzazione del calendario:",_e)}}return P=setTimeout(W,500),()=>{var Y,A;b=!0,P&&clearTimeout(P),F.current&&((A=(Y=H.current)==null?void 0:Y.destroy)==null||A.call(Y),F.current=null)}},[(ze=(Re=i==null?void 0:i.root)==null?void 0:Re.data)==null?void 0:ze.place]);function be(P){const b=i==null?void 0:i.dataValue;if(!(b!=null&&b.from_time))return;const W=Ye(b.from_time).format("DD-MM-YYYY HH:mm"),Y=Ye(b.to_time).format("DD-MM-YYYY HH:mm"),A=P.find(te=>Ye(te.start).format("DD-MM-YYYY HH:mm")===W&&Ye(te.end).format("DD-MM-YYYY HH:mm")===Y);if(!A)return;const I=document.querySelector(`.ec-event[data-event-id="${A.id}-${Ye(b==null?void 0:b.from_time).format("YYYY-MM-DD")}-${Ye(b==null?void 0:b.from_time).format("HH:mm")}"]`);I&&(I.classList.add("highlighted-event"),I.scrollIntoView({behavior:"smooth",block:"center"}),T({day:Ye(b==null?void 0:b.from_time).format("dddd, DD MMMM YYYY"),startDate:Ye(b==null?void 0:b.from_time).format("HH:mm"),endDate:Ye(b==null?void 0:b.to_time).format("HH:mm")}))}const Ce=({day:P,startDate:b,endDate:W})=>h.jsx("div",{className:"mt-3",children:h.jsxs("div",{className:"row align-items-center gy-3",children:[h.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[h.jsx("div",{className:"text-paragraph-small",children:l.t("Data")}),h.jsx("p",{className:"data-text",children:h.jsx("strong",{children:P})})]}),h.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[h.jsx("div",{className:"text-paragraph-small",children:l.t("Ora")}),h.jsx("p",{className:"data-text",children:h.jsxs("strong",{children:[b," - ",W]})})]})]})});return q.useEffect(()=>{var P,b,W,Y;document.querySelector(".formio-read-only")&&d===!1?p(!0):(((b=(P=i==null?void 0:i.data)==null?void 0:P.service_data)==null?void 0:b.view_type)==="select"?ye():((Y=(W=i==null?void 0:i.data)==null?void 0:W.service_data)==null?void 0:Y.view_type)==="calendar"&&Z(),p(!1))},[]),q.useEffect(()=>{d&&setTimeout(()=>{const P=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());console.log("savedValue",P,d),P&&s(P)},500)},[d]),h.jsx(h.Fragment,{children:d&&X?h.jsxs("div",{className:"mx-2",children:[h.jsxs("p",{className:"text-paragraph",children:[l.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:h.jsx(mc,{day:Ye(X.from_time).format("dddd D MMM YYYY"),i18next:l,slot:`${Ye(X.from_time).format("HH:mm")} - ${Ye(X.to_time).format("HH:mm")}`})})})})]}):h.jsxs("div",{className:"",children:[h.jsx("div",{ref:H}),v.length>0?h.jsxs(h.Fragment,{children:[h.jsxs(le.Select,{label:"Mese",id:"selectMonthYear",onChange:fe,children:[h.jsx("option",{value:"",children:l.t("Scegli un'opzione")}),v.map(P=>h.jsx("option",{value:P.value,selected:P.value===k,children:P.label},P.value))]}),h.jsxs(le.Select,{label:"Giorno",id:"selectDay",onChange:P=>Q(P,"manual"),disabled:O.length===0,children:[h.jsx("option",{value:"",children:l.t("Scegli un'opzione")}),O.map(P=>h.jsx("option",{value:JSON.stringify(P),selected:P.date===C,children:Ye(P.date).format("dddd,DD MMMM YYYY")},P.date))]}),h.jsxs(le.Select,{label:"Orario",id:"selectSlot",onChange:ue,disabled:R.length===0,children:[h.jsx("option",{value:"",children:l.t("Scegli un'opzione")}),R.map(P=>h.jsx("option",{value:JSON.stringify(P),selected:P.start_time+" - "+P.end_time===M,children:P.start_time+" - "+P.end_time},P.start_time+" - "+P.end_time))]})]}):null,m?Ce({day:m.day,startDate:m.startDate,endDate:m.endDate}):null,o?h.jsx("div",{className:"d-flex align-items-center justify-content-center position-absolute-center",children:h.jsx(le.Spinner,{active:!0})}):null]})})},Ya=class Ya extends yn{constructor(i,g,l){super(i,g,l)}static get builderInfo(){return{title:"Calendar Advanced",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Ya.schema()}}static schema(){return yn.schema({type:"calendar-advanced"})}attach(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(vc,{ref:g,component:this.component,value:this.dataValue,onChange:l=>this.setValue(l),...this,current:this}))}setValue(i){i&&(this.updateValue(i),this.shouldSetValue=!0)}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(Ya,"editForm",fc);let wa=Ya;const bc=[{key:"defaultValue",ignore:!0}],_c=[{key:"placeholder",ignore:!0},{type:"checkbox",label:"Files Synchronization feature",tooltip:"Enable ability to control files synchronization. Files will be auto synced before submit.",key:"autoSync",input:!0,conditional:{json:{in:[{var:"data.storage"},["s3","azure","googledrive"]]}}}],wc=[{type:"select",input:!0,key:"storage",label:"Storage",placeholder:"Select your file storage provider",weight:0,tooltip:"Which storage to save the files in.",valueProperty:"value",dataSrc:"custom",hidden:!0,data:{custom:function(){return[{label:"url",value:"url"}]}}},{type:"checkbox",input:!0,defaultValue:!0,key:"protocol_required",label:"Richiede protocollazione?",tooltip:"",weight:10},{type:"checkbox",input:!0,defaultValue:!1,key:"check_signature",label:"Effettuare il controllo della firma?",tooltip:"",weight:15},{type:"checkbox",input:!0,key:"useMultipartUpload",label:"Use the S3 Multipart Upload API",tooltip:"The <a href='https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html'>S3 Multipart Upload API</a> is designed to improve the upload experience for larger objects (> 5GB).",conditional:{json:{"===":[{var:"data.storage"},"s3"]}}},{label:"Multipart Upload",tableView:!1,key:"multipart",type:"container",input:!0,components:[{label:"Part Size (MB)",applyMaskOn:"change",mask:!1,tableView:!1,delimiter:!1,requireDecimal:!1,inputFormat:"plain",truncateMultipleSpaces:!1,validate:{min:5,max:5e3},key:"partSize",type:"number",input:!0,defaultValue:500}],conditional:{json:{"===":[{var:"data.useMultipartUpload"},!0]}}},{type:"textfield",input:!0,key:"options.indexeddb",label:"Database",weight:10,placeholder:"Enter the indexeddb database name",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textfield",input:!0,label:"Table",key:"options.indexeddbTable",weight:10,placeholder:"Enter the name for indexeddb table",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textarea",key:"options",label:"Custom request options",tooltip:"Pass your custom xhr options(optional)",rows:5,editor:"ace",input:!0,weight:15,placeholder:`{
|
|
99
|
+
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function Rh(...l){return ot.Components.baseEditForm([{key:"display",components:Nh}],...l)}function Ti({day:l,slot:n,i18next:u}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text pl-4",children:[m.jsx("b",{children:l})," ",u.t("alle")," ",u.t("ore")," ",m.jsx("b",{children:n})]})})})})}const Eh=({component:l,current:n,onChange:u,i18next:s})=>{const[x,D]=G.useState(),[F,o]=G.useState([]),[y,r]=G.useState([]),[c,h]=G.useState(!1),[f,g]=G.useState(null),[p,C]=G.useState(null),[_,O]=G.useState(null),[T,P]=G.useState(null),[z,R]=G.useState({}),[Y,v]=G.useState(null),[N,w]=G.useState(!1),[M,W]=G.useState([]),[$,L]=G.useState(!1),A=G.useRef(),B=l.calendarId;he.locale(s.language);const J=b=>{let H=he(b).format("YYYY-MM-DD");fetch(Z(H)).then(j=>j.json()).then(j=>{let I=fe(b||new Date);const V=j.filter(me=>me.available==!0);V.length===0&&Ae();let ie=[];I.forEach(me=>{j.some(Se=>Se.date===me&&Se.available==!0)?ie.push({available:!0,date:me}):ie.push({available:!1,date:me})});const be=ie.map(me=>{if(me.available===!1)return he(me.date,"YYYY-MM-DD").toDate()});o(be);const de=V.length?V[0].date:b;ae(de)}).catch(j=>console.error(j))},ae=b=>{P(null),O(null),r([]);let H=he(b).format("YYYY-MM-DD");fetch(ue(H)).then(j=>j.json()).then(j=>{const I=j.filter(V=>V.availability==!0);R(I[0]),I.length>0?(r(j),h(!1),O(he(b).format("L")),D(he(b,"YYYY-MM-DD").toDate())):(j.length>0&&D(he(j[0].date,"YYYY-MM-DD").toDate()),r([]),Ae())})},ee=()=>{if(B!==""&&B!=null)if(!n.dataValue)J(new Date);else if(l.multiple&&Array.isArray(n.dataValue)){if(n.dataValue.length>0){v(n.dataValue);let b=[];n.dataValue.map(H=>{b.push({...H,date:he(H.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),W(b)}}else if(!l.multiple&&typeof n.dataValue=="object"){const b={date:n.dataValue.date,slot:n.dataValue.slot},H={...n.dataValue,date:he(n.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};W([H]),v(b)}else{let b=n.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),H=b[2].split("#");const j={date:he(b[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:b[1]};l.multiple?(u([{date:b[0],slot:b[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}]),W([{date:b[0],slot:b[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}])):(u({date:b[0],slot:b[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}),W([{date:b[0],slot:b[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}])),v(j)}};G.useEffect(()=>{var b;(b=window.FormioInstance)==null||b.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const fe=b=>{let j=he(b,"YYYY-MM").daysInMonth(),I=[];for(;j;){let V=he(b).date(j);I.push(V.format("YYYY-MM-DD")),j--}return I},Z=(b,H=!1)=>{let j=l.calendarId,I=l.select_opening_hours,V=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");let ie=`${Fe()}/api/calendars/${j}/availabilities`,be=[`from_time=${he(b).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(b).endOf("month").format("YYYY-MM-DD")}`];return H&&be.push(`available=${H}`),I&&V&&be.push(`opening_hours=${V.join()}`),`${ie}?${be.join("&")}`},ue=(b,H=!1)=>{let j=l.calendarId,I=l.select_opening_hours,V=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");const ie=he(b).format("YYYY-MM-DD");let be=`${Fe()}/api/calendars/${j}/availabilities/${ie}`,de=[];return H&&de.push(`available=${H}`),I&&V&&de.push(`opening_hours=${V.join()}`),de&&(be=`${be}?${de.join("&")}`),be},se=b=>{J(b)},ye=b=>{setTimeout(()=>{w(!N)},1e3),ae(b)},ce=b=>{P(null),setTimeout(()=>{b&&(C(b.target.dataset),P(b.target.id))},300)},Q=b=>{g(null);let H=`${Fe()}/it/meetings/new-draft`,j={date:p!=null&&p.date?he(p==null?void 0:p.date).format("DD-MM-YYYY"):he(b.target.dataset.date).format("DD-MM-YYYY"),slot:p!=null&&p.value_start&&(p!=null&&p.value_end)?p.value_start+"-"+p.value_end:b.target.dataset.slots,calendar:l.calendarId,opening_hour:p!=null&&p.opening_hour?p==null?void 0:p.opening_hour:b.target.dataset.opening_hour,meeting:f?f.id:"",first_available_date:z.date,first_available_start_time:z.start_time,first_available_end_time:z.end_time,first_availability_updated_at:he().format()};fetch(H,{method:"POST",body:JSON.stringify(j),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(I=>{if(!I.ok)throw new Error(s.t("Intervallo selezionato non disponibile!"));return I.json()}).then(I=>{g(I);const V={date:j.date,slot:j.slot,calendar_id:j.calendar[0],opening_hour_id:j.opening_hour||j.opening_hour_id,meeting_id:I.id};W([...M,V])}).catch(I=>{console.log(I),Ge.fire({title:"",html:"<p>"+I+"</p>",icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{p&&(Q(),w(!N))},Pe=()=>m.jsx("span",{children:s.t("Tempo prenotazione scaduto!")}),_e=({minutes:b,seconds:H,completed:j})=>j?m.jsx(Pe,{}):m.jsx("div",{children:m.jsxs("div",{children:[" ",m.jsxs("span",{children:[" ",m.jsxs("i",{children:[s.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",m.jsxs("b",{children:[b," ",s.t("minuti")," ",H," ",s.t("secondi")]})]})]})}),Te=b=>{if(b===null||b==="")u("");else if(Array.isArray(b)&&b.length>0){let H=[];M.map(j=>{H.push({date:he(j.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:j.slot,calendar_id:j.calendar_id||j.calendar[0],meeting_id:j.meeting_id,opening_hour_id:j.opening_hour||j.opening_hour_id})}),l.multiple?u(H):u(H[0])}else u("")},Ae=()=>{h(!0),g(null),O(null),Te(null)},ze=()=>{if(s.language==="it")return Gs;if(s.language==="en")return Us;if(s.language==="de")return Bs};G.useEffect(()=>{Te(M)},[M]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&$===!1?(L(!0),setTimeout(()=>{ee()},1e3)):(L(!1),setTimeout(()=>{ee()},1e3))},[]);const E=(b,H)=>{let j=`${Fe()}/api/meetings/${H.meeting_id}`;fetch(j,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${rr("auth-token")}`},strictErrors:!0}).then(I=>{if(I&&I.status>400)Ge.fire({title:"",html:`<p>${s.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const V=[...M.slice(0,b),...M.slice(b+1)];W(V),J(new Date)}})};return m.jsxs(m.Fragment,{children:[$&&Y?m.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[m.jsxs("b",{children:[Array.isArray(Y)&&Y.length>1?s.t("Giorni selezionati per la prenotazione"):s.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:Array.isArray(Y)?Y.map(b=>m.jsx(Ti,{day:he(b.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:s,slot:b.slot})):m.jsx(Ti,{day:Oe(Y.date).format("DD/MM/YYYY"),i18next:s,slot:Y.slot})})})})]}):m.jsx("div",{className:"slot-calendar ",children:m.jsxs("div",{className:"row",children:[l.multiple?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:s.t(l.label)}),m.jsx(_r.DayPicker,{mode:"single",selected:x,locale:ze(),disabled:F,onMonthChange:se,onDayClick:ye})]})}):M.length!==1?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:s.t(l.label)}),m.jsx(_r.DayPicker,{mode:"single",selected:x,locale:ze(),disabled:F,onMonthChange:se,onDayClick:ye})]})}):null,m.jsx("div",{className:"col-12",children:M.length?m.jsx("div",{className:"row m-2",children:m.jsxs("div",{className:"col-12 mb-4",children:[m.jsxs("b",{children:[M.length>1?s.t("Giorni selezionati per la prenotazione"):s.t("Giorno selezionato per la prenotazione"),":"," "]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:M.map((b,H)=>m.jsx("li",{children:m.jsx("div",{className:"list-item",children:m.jsxs("div",{className:"it-right-zone",children:[m.jsxs("span",{className:"text pl-4",children:[b.date," ",p||b.slot?`${s.t("alle")} ${b.slot}`:""]}),m.jsx(le.Icon,{icon:"it-delete",onClick:()=>E(H,b),role:"button"})]})})},"li"+H))})})}),f?m.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:m.jsx(qs,{date:f.expiration_time,renderer:_e})}):null]})}):null})]})}),m.jsxs(le.Modal,{isOpen:N,toggle:()=>w(!N),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[m.jsx(le.ModalHeader,{toggle:()=>w(!N),id:"daySelected",children:s.t("Seleziona una fascia oraria")}),m.jsx(le.ModalBody,{children:m.jsxs("div",{className:"row",children:[M.length>=1?m.jsxs("div",{children:[_&&!c?m.jsxs("h6",{children:[s.t("Orari disponibili del")," ",Oe(_).format("DD/MM/YYYY")]}):null,m.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[m.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:m.jsxs("b",{children:[m.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",s.t("Ultimo orario selezionato")]})}),m.jsx("div",{className:"col-6 px-2",children:m.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:T==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":M[M.length-1].slot,"data-opening_hour":M[M.length-1].opening_hour_id,"data-start":M[M.length-1].slot.split("-")[0],"data-end":M[M.length-1].slot.split("-")[1],"data-value_start":M[M.length-1].slot.split("-")[0],"data-value_end":M[M.length-1].slot.split("-")[1],disabled:c,children:M[M.length-1].slot})})]})]}):null,m.jsx("div",{children:_&&M.length>=1?m.jsx("h6",{children:s.t("Seleziona altri orari")}):c?null:m.jsxs("h6",{children:[s.t("Orari disponibili del")," ",Oe(_).format("DD/MM/YYYY")]})}),y.map((b,H)=>m.jsx("div",{className:"col-6",children:m.jsxs("button",{type:"button",id:"slot-"+H,onClick:ce,ref:A,className:T==="slot-"+H?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":b.date,"data-start":b.start_time,"data-end":b.end_time,"data-value_start":b.start_time,"data-value_end":b.end_time,"data-slots":b.start_time+"-"+b.end_time,"data-opening_hour":b.opening_hour,"data-min_duration":b.min_duration,disabled:b.slots_available==0,children:[b.start_time," - ",b.end_time]})},"slot-"+H)),c?m.jsxs("div",{className:"callout callout-highlight warning",children:[m.jsxs("div",{className:"callout-title",children:[m.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),s.t("Attenzione")]}),m.jsxs("p",{children:[" ",s.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null]})}),m.jsx(le.ModalFooter,{children:m.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!_||!(p!=null&&p.value_start),children:s.t("Conferma")})})]})]})},Or=class Or extends ot.ReactComponent{constructor(n,u,s){super(n,u,s)}static get builderInfo(){return{title:"Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Or.schema()}}static schema(){return ot.ReactComponent.schema({type:"calendar"})}attachReact(n,u){this.rootComponent=Ft.createRoot(n),this.rootComponent.render(m.jsx(Eh,{ref:u,component:this.component,value:this.dataValue,onChange:s=>this.setValue(s),...this,current:this}))}setValue(n){if(n)if(Array.isArray(n))this.selectedNextSlots=n,this.updateValue(n),this.shouldSetValue=!0;else if(typeof n=="object")this.date=n.date,this.slot=n.slot,this.meeting=n.meeting_id,this.meeting_expiration_time=null,this.opening_hour=n.opening_hour_id,this.calendar_id=n.calendar_id,this.updateValue(n),this.shouldSetValue=!0;else{let u=n.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),s=u[2].split("#");this.date=u[0],this.slot=u[1],this.meeting=s[1],this.meeting_expiration_time=null,this.opening_hour=s.length===3?s[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let n=this.meeting?this.meeting:"",u=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:n,opening_hour_id:u}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Tt(Or,"editForm",Rh);let wr=Or;const Ah=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function Ih(...l){return ot.Components.baseEditForm([{key:"display",components:Ah}],...l)}function Fh({day:l,slot:n,i18next:u}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text-paragraph pl-4",children:[m.jsx("b",{children:l})," ",u.t("alle")," ",u.t("ore")," ",m.jsx("b",{children:n})]})})})})}function zh(l,n){if(!n||n.length===0)return;const u=n.map(F=>{const o=new Date(F.start);return(new Date(F.end)-o)/6e4}),s=Math.min(...u),x=u.reduce((F,o)=>F+o,0)/u.length;let D=0;s<=30&&s>15?D=x*1:s<=15?D=x*24:D=x*4,l.setOption("slotHeight",D),document.documentElement.style.setProperty("--slot-height",`${D}px`)}const Ks={AVAILABILITY:{key:"availability_data_cache_",duration:10},SLOTS:{key:"availability_slots_cache_",duration:10},SUBMISSION:{key:"submission_cache_",duration:30}},na=(l,n,u)=>{const s={data:u,timestamp:Oe().toISOString()};sessionStorage.setItem(n,JSON.stringify(s)),console.log(`✅ Cache salvato: ${l}`)},ia=(l,n)=>{try{const u=sessionStorage.getItem(n);if(!u)return null;const s=JSON.parse(u),x=Oe().diff(Oe(s.timestamp),"minutes");return x>Ks[l].duration?(sessionStorage.removeItem(n),console.log(`⏰ Cache scaduto: ${l}`),null):(console.log(`✅ Cache letto: ${l} (${x} minuti fa)`),s.data)}catch(u){return console.error(`Errore nel leggere il cache (${l}):`,u),null}},sa=(l,...n)=>Ks[l].key+btoa(n),xn="calendar_view_state",Dn="calendar_view_date",Vh=(l,n)=>{try{sessionStorage.setItem(xn,l),sessionStorage.setItem(Dn,n||new Date().toISOString())}catch(u){console.error("Errore nel salvare lo stato della view:",u)}},Lh=()=>{try{const l=sessionStorage.getItem(xn),n=sessionStorage.getItem(Dn);return{viewType:l||"timeGridWeek",date:n?new Date(n):new Date}}catch(l){return console.error("Errore nel leggere lo stato della view:",l),{viewType:"timeGridWeek",date:new Date}}},Xs=()=>{try{sessionStorage.removeItem(xn),sessionStorage.removeItem(Dn)}catch(l){console.error("Errore nel pulire lo stato della view:",l)}},Pi=_n.Formio.Components.components.field,Wh=({component:l,current:n,onChange:u,i18next:s})=>{var Ae,ze;const[x,D]=G.useState(null),[F,o]=G.useState(null),[y,r]=G.useState([]),[c,h]=G.useState(!1),[f,g]=G.useState(!1),[p,C]=G.useState(null),[_,O]=G.useState([]),[T,P]=G.useState([]),[z,R]=G.useState([]),[Y,v]=G.useState(null),[N,w]=G.useState(null),[M,W]=G.useState(null),$=G.useRef(null),L=G.useRef(null);s.language,he.locale(s.language),Oe.locale(s.language);function A(E){if(!E||E.length===0)return null;const b=E.map(I=>({start:I.start_time,end:I.end_time})),H=b.reduce((I,V)=>V.start<I?V.start:I,b[0].start),j=b.reduce((I,V)=>V.end>I?V.end:I,b[0].end);return{earliestStartTime:H,latestEndTime:j}}function B(E){const b=E.map(I=>he(I.date).isoWeekday()),j=[1,2,3,4,5,6,7].filter(I=>!b.includes(I));j.length>0?L.current.setOption("hiddenDays",j):L.current.setOption("hiddenDays",[])}function J(E,b,H){const j=new URL(E),V=`${j.pathname.split("/").slice(0,4).join("/")}/${b}/${H}`;return`${j.origin}${V}${j.search}`}function ae(E,b,H){const j=new URL(E),V=`${j.pathname.split("/").slice(0,4).join("/")}`;return`${j.origin}${V}${j.search}&from_to=${b}&to_date=${H}`}function ee(E,b,H){return`${Fe()}/api/availabilities/${E}/${b}?calendar_ids=${H}&available=true`}const fe=E=>{R([]),P([]),u({}),E&&P(x.filter(b=>b.date.startsWith(E)))},Z=async(E,b)=>{const H=JSON.parse(E),j=sa("SLOTS",H.date,H.calendar_ids);if(b==="manual")R([]),W(null),C(null),u({});else{const I=ia("SLOTS",j);if(I){R(I);return}}try{const I=await window.FormioHelper.anonymousCall(`availabilities/${H.date}?calendar_ids=${H.calendar_ids}`);na("SLOTS",j,I.data),R(I.data)}catch(I){console.error("Errore nel caricamento degli slot:",I),Ge.fire({icon:"error",title:s.t("Errore"),text:s.t("Errore nel caricamento degli orari")})}},ue=E=>{var j,I,V,te,ie,be,de,me;const b=JSON.parse(E),H={status:6,calendar:b.calendar_id,opening_hour:b.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Oe(`${b.date}T${b.start_time}`).toISOString(),to_time:Oe(`${b.date}T${b.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(I=(j=n==null?void 0:n.data)==null?void 0:j.service_data)==null?void 0:I.id,calendar_group_office_id:(te=(V=n==null?void 0:n.data)==null?void 0:V.user_group)==null?void 0:te.id,calendar_group_place_id:(be=(ie=n==null?void 0:n.data)==null?void 0:ie.place)==null?void 0:be.id};window.FormioHelper.authenticatedRequest((de=n==null?void 0:n.dataValue)!=null&&de.id?"PATCH":"POST",(me=n==null?void 0:n.dataValue)!=null&&me.id?`meetings/${n.dataValue.id}`:"meetings",H).then(Se=>{C({day:Oe(b.date).format("dddd, DD MMMM YYYY"),startDate:b.start_time,endDate:b.end_time}),u(Se!=null&&Se.id?Se:Se?{...Se,id:n.dataValue.id}:n.dataValue.id?{...H,id:n.dataValue.id}:{...H})}).catch(Se=>{var Ee,He;console.error(Se),Se.status===400&&((He=(Ee=Se==null?void 0:Se.response)==null?void 0:Ee.data)==null?void 0:He.type)==="validation_error"?Ge.fire({title:"",html:"<p>"+s.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Ge.fire({title:"",html:"<p>"+Se+"</p>",icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},se=E=>{const b=new Set,H=[];return E.forEach(j=>{const I=Oe(j.date),V=I.format("YYYY-MM");b.has(V)||(b.add(V),H.push({value:V,label:I.format("MMMM YYYY").replace(/^\w/,te=>te.toUpperCase())}))}),H},ye=async()=>{var ie,be,de,me,Se,Ee,He,Ie,Je,Ze;const E=(de=(be=(ie=n==null?void 0:n.root)==null?void 0:ie.data)==null?void 0:be.place)!=null&&de.merge_availabilities?(Ee=(Se=(me=n==null?void 0:n.root)==null?void 0:me.data)==null?void 0:Se.place)==null?void 0:Ee.merged_availabilities_link:null,b=he().format("YYYY-MM-DD"),H=he().add(1,"month").format("YYYY-MM-DD"),j=((Ze=(Je=(Ie=(He=n==null?void 0:n.root)==null?void 0:He.data)==null?void 0:Ie.place)==null?void 0:Je.calendars[0])==null?void 0:Ze.id)||null,I=E?ae(E,b,H):ee(b,H,j),V=sa("AVAILABILITY",I),te=ia("AVAILABILITY",V);if(te){D(te),O(se(te));return}else u({});h(!0);try{const ge=await window.FormioHelper.fetchAPIUrlLimit(I);if(h(!1),!(ge!=null&&ge.length)){Ge.fire({icon:"warning",title:s.t("warning"),html:s.t("no_meetings")});return}na("AVAILABILITY",V,ge),D(ge),O(se(ge))}catch(ge){h(!1),console.error("Errore nel caricamento disponibilità:",ge)}};G.useEffect(()=>{if(x!=null&&x.length){const E=(n==null?void 0:n.dataValue)??(n==null?void 0:n.getValue());if(E!=null&&E.from_time&&(E!=null&&E.to_time)&&!Oe().isAfter(E==null?void 0:E.draft_expiration)){const b=Oe(E.from_time).format("YYYY-MM");v(b),b&&P&&(P(x.filter(H=>H.date.startsWith(b))),w(Oe(E.from_time).format("YYYY-MM-DD")))}else E!=null&&E.draft_expiration&&Oe().isAfter(E==null?void 0:E.draft_expiration)&&Ge.fire({icon:"warning",title:s.t("warning"),html:s.t("expired_meeting")})}},[x]),G.useEffect(()=>{const E=(n==null?void 0:n.dataValue)??(n==null?void 0:n.getValue());if(!_.length||Y||E!=null&&E.from_time||E!=null&&E.to_time)return;const b=_[0];b&&(v(b.value),fe(b.value))},[_,Y,n==null?void 0:n.dataValue]),G.useEffect(()=>{if(N&&f===!1){const E=(n==null?void 0:n.dataValue)??(n==null?void 0:n.getValue());Z(JSON.stringify({date:N,calendar_ids:E.calendar.id}))}},[N]);const ce=()=>window.innerWidth>768?"timeGridWeek":"timeGridDay";G.useEffect(()=>{const E=()=>{const b=L.current;if(!b)return;const H=ce(),j=b.getView().type;H!==j&&b.setOption("view",H)};return window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]),G.useEffect(()=>{const E=(n==null?void 0:n.dataValue)??(n==null?void 0:n.getValue());z!=null&&z.length&&(E!=null&&E.from_time)&&(W(Oe(E.from_time).format("HH:mm")+" - "+Oe(E.to_time).format("HH:mm")),C({day:Oe(E.from_time).format("dddd D MMM YYYY"),startDate:Oe(E.from_time).format("HH:mm"),endDate:Oe(E.to_time).format("HH:mm")}))},[z]);const Q=()=>{const E=Lh();L.current=pi.createCalendar($.current,[pi.TimeGrid],{events:[],buttonText:{today:s.t("Oggi")},allDaySlot:!1,firstDay:1,date:E.date,slotEventOverlap:!1,view:ce(),height:"400px",views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:b=>{Vh(b.view.type,b.start)},eventClick({event:b,el:H}){var de,me,Se,Ee,He,Ie,Je,Ze;document.querySelectorAll(".ec-event").forEach(ge=>{ge.classList.remove("highlighted-event")}),H.classList.add("highlighted-event");const j=new Date(b.start),I=new Date(b.end),V=j.toLocaleDateString("it-IT",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),te=j.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),ie=I.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),be={status:6,calendar:b.extendedProps.calendar_id,opening_hour:b.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:j,to_time:I,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(me=(de=n==null?void 0:n.data)==null?void 0:de.service_data)==null?void 0:me.id,calendar_group_office_id:(Ee=(Se=n==null?void 0:n.data)==null?void 0:Se.user_group)==null?void 0:Ee.id,calendar_group_place_id:(Ie=(He=n==null?void 0:n.data)==null?void 0:He.place)==null?void 0:Ie.id};window.FormioHelper.authenticatedRequest((Je=n==null?void 0:n.dataValue)!=null&&Je.id?"PATCH":"POST",(Ze=n==null?void 0:n.dataValue)!=null&&Ze.id?`meetings/${n.dataValue.id}`:"meetings",be).then(ge=>{var Qe;let we;!ge||ge===""?we={...be,code:null,id:(Qe=n==null?void 0:n.dataValue)==null?void 0:Qe.id}:typeof ge=="object"&&(we=ge),C({day:V,startDate:te,endDate:ie}),u(we)}).catch(ge=>{var we,Qe;console.error(ge),ge.status===400&&((Qe=(we=ge==null?void 0:ge.response)==null?void 0:we.data)==null?void 0:Qe.type)==="validation_error"?Ge.fire({title:"",html:"<p>"+s.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Ge.fire({title:"",html:"<p>"+ge+"</p>",icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:ve,eventDidMount:b=>{const{event:H,el:j}=b,I=H.extendedProps;j.setAttribute("data-event-id",H.id+"-"+I.date+"-"+I.start_time)},loading:b=>{h(b)}})},ve=E=>{var b,H;(H=(b=n==null?void 0:n.root)==null?void 0:b.data)!=null&&H.place&&L.current.setOption("eventSources",[{events:Pe}])};async function Pe(E,b,H){var j,I,V,te,ie,be;try{L.current.setOption("events",[]);const de=he(E.start).format("YYYY-MM-DD"),me=new Date(E.end);me.setDate(me.getDate()-1);const Se=he(me).format("YYYY-MM-DD"),Ee=null,He=(V=(I=(j=n==null?void 0:n.root)==null?void 0:j.data)==null?void 0:I.place)!=null&&V.merge_availabilities?(be=(ie=(te=n==null?void 0:n.root)==null?void 0:te.data)==null?void 0:ie.place)==null?void 0:be.merged_availabilities_link:null,Ie=He?J(He,de,Se):ee(de,Se,Ee),Je=sa("AVAILABILITY",Ie),Ze=ia("AVAILABILITY",Je);let ge;if(Ze?(ge=Ze,h(!1)):(ge=await window.FormioHelper.fetchAPIUrlLimit(Ie),na("AVAILABILITY",Je,ge)),!(ge!=null&&ge.length)){b([]),Ge.fire({icon:"warning",title:s.t("warning"),html:s.t("no_meetings")});return}const we=ge.map(tt=>({id:tt.opening_hour_id,allDay:!1,start:`${tt.date}T${tt.start_time}:00`,end:`${tt.date}T${tt.end_time}:00`,title:`${tt.start_time} - ${tt.end_time}`,editable:!1,display:"auto",color:"#ebeef0",textColor:"#000",className:"event-slot",extendedProps:{...tt}})),Qe=A(ge);L.current.setOption("slotMinTime",Qe.earliestStartTime),L.current.setOption("slotMaxTime",Qe.latestEndTime),B(ge),zh(L.current,we),b(we),setTimeout(()=>{_e(we)},500)}catch(de){console.error("Errore nel caricamento disponibilità:",de),H==null||H(de)}}G.useEffect(()=>{let E,b=!1;async function H(){var j,I,V,te,ie;try{if(await((j=window.FormioInstance)==null?void 0:j.formReady),b)return;if(!$.current){console.warn("Elemento calendario non trovato");return}const be=(n==null?void 0:n.dataValue)??(n==null?void 0:n.getValue());be&&(be!=null&&be.draft_expiration)&&Oe().isAfter(be.draft_expiration)&&(u({}),Xs()),((V=(I=n==null?void 0:n.data)==null?void 0:I.service_data)==null?void 0:V.view_type)==="calendar"?L!=null&&L.current||Q():((ie=(te=n==null?void 0:n.data)==null?void 0:te.service_data)==null?void 0:ie.view_type)==="select"?ye():alert(s.t("Il componente non è configurato per la visualizzazione a calendario"))}catch(be){console.error("Errore durante l'inizializzazione del calendario:",be)}}return E=setTimeout(H,500),()=>{var j,I;b=!0,E&&clearTimeout(E),L.current&&((I=(j=$.current)==null?void 0:j.destroy)==null||I.call(j),L.current=null)}},[(ze=(Ae=n==null?void 0:n.root)==null?void 0:Ae.data)==null?void 0:ze.place]);function _e(E){const b=n==null?void 0:n.dataValue;if(!(b!=null&&b.from_time))return;const H=Oe(b.from_time).format("DD-MM-YYYY HH:mm"),j=Oe(b.to_time).format("DD-MM-YYYY HH:mm"),I=E.find(te=>Oe(te.start).format("DD-MM-YYYY HH:mm")===H&&Oe(te.end).format("DD-MM-YYYY HH:mm")===j);if(!I)return;const V=document.querySelector(`.ec-event[data-event-id="${I.id}-${Oe(b==null?void 0:b.from_time).format("YYYY-MM-DD")}-${Oe(b==null?void 0:b.from_time).format("HH:mm")}"]`);V&&(V.classList.add("highlighted-event"),V.scrollIntoView({behavior:"smooth",block:"center"}),C({day:Oe(b==null?void 0:b.from_time).format("dddd, DD MMMM YYYY"),startDate:Oe(b==null?void 0:b.from_time).format("HH:mm"),endDate:Oe(b==null?void 0:b.to_time).format("HH:mm")}))}const Te=({day:E,startDate:b,endDate:H})=>m.jsx("div",{className:"mt-3",children:m.jsxs("div",{className:"row align-items-center gy-3",children:[m.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[m.jsx("div",{className:"text-paragraph-small",children:s.t("Data")}),m.jsx("p",{className:"data-text",children:m.jsx("strong",{children:E})})]}),m.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[m.jsx("div",{className:"text-paragraph-small",children:s.t("Ora")}),m.jsx("p",{className:"data-text",children:m.jsxs("strong",{children:[b," - ",H]})})]})]})});return G.useEffect(()=>{var E,b,H,j;document.querySelector(".formio-read-only")&&f===!1?g(!0):(((b=(E=n==null?void 0:n.data)==null?void 0:E.service_data)==null?void 0:b.view_type)==="select"?ye():((j=(H=n==null?void 0:n.data)==null?void 0:H.service_data)==null?void 0:j.view_type)==="calendar"&&Q(),g(!1))},[]),G.useEffect(()=>{f&&setTimeout(()=>{const E=(n==null?void 0:n.dataValue)??(n==null?void 0:n.getValue());console.log("savedValue",E,f),E&&o(E)},500)},[f]),m.jsx(m.Fragment,{children:f&&F?m.jsxs("div",{className:"mx-2",children:[m.jsxs("p",{className:"text-paragraph",children:[s.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:m.jsx(Fh,{day:Oe(F.from_time).format("dddd D MMM YYYY"),i18next:s,slot:`${Oe(F.from_time).format("HH:mm")} - ${Oe(F.to_time).format("HH:mm")}`})})})})]}):m.jsxs("div",{className:"",children:[m.jsx("div",{ref:$}),_.length>0?m.jsxs(m.Fragment,{children:[m.jsxs(le.Select,{label:"Mese",id:"selectMonthYear",onChange:fe,children:[m.jsx("option",{value:"",children:s.t("Scegli un'opzione")}),_.map(E=>m.jsx("option",{value:E.value,selected:E.value===Y,children:E.label},E.value))]}),m.jsxs(le.Select,{label:"Giorno",id:"selectDay",onChange:E=>Z(E,"manual"),disabled:T.length===0,children:[m.jsx("option",{value:"",children:s.t("Scegli un'opzione")}),T.map(E=>m.jsx("option",{value:JSON.stringify(E),selected:E.date===N,children:Oe(E.date).format("dddd,DD MMMM YYYY")},E.date))]}),m.jsxs(le.Select,{label:"Orario",id:"selectSlot",onChange:ue,disabled:z.length===0,children:[m.jsx("option",{value:"",children:s.t("Scegli un'opzione")}),z.map(E=>m.jsx("option",{value:JSON.stringify(E),selected:E.start_time+" - "+E.end_time===M,children:E.start_time+" - "+E.end_time},E.start_time+" - "+E.end_time))]})]}):null,p?Te({day:p.day,startDate:p.startDate,endDate:p.endDate}):null,c?m.jsx("div",{className:"d-flex align-items-center justify-content-center position-absolute-center",children:m.jsx(le.Spinner,{active:!0})}):null]})})},Yr=class Yr extends Pi{constructor(n,u,s){super(n,u,s)}static get builderInfo(){return{title:"Calendar Advanced",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Yr.schema()}}static schema(){return Pi.schema({type:"calendar-advanced"})}attach(n,u){this.rootComponent=Ft.createRoot(n),this.rootComponent.render(m.jsx(Wh,{ref:u,component:this.component,value:this.dataValue,onChange:s=>this.setValue(s),...this,current:this}))}setValue(n){n&&(this.updateValue(n),this.shouldSetValue=!0)}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Tt(Yr,"editForm",Ih);let Sr=Yr;const qh=[{key:"defaultValue",ignore:!0}],Hh=[{key:"placeholder",ignore:!0},{type:"checkbox",label:"Files Synchronization feature",tooltip:"Enable ability to control files synchronization. Files will be auto synced before submit.",key:"autoSync",input:!0,conditional:{json:{in:[{var:"data.storage"},["s3","azure","googledrive"]]}}}],$h=[{type:"select",input:!0,key:"storage",label:"Storage",placeholder:"Select your file storage provider",weight:0,tooltip:"Which storage to save the files in.",valueProperty:"value",dataSrc:"custom",hidden:!0,data:{custom:function(){return[{label:"url",value:"url"}]}}},{type:"checkbox",input:!0,defaultValue:!0,key:"protocol_required",label:"Richiede protocollazione?",tooltip:"",weight:10},{type:"checkbox",input:!0,defaultValue:!1,key:"check_signature",label:"Effettuare il controllo della firma?",tooltip:"",weight:15},{type:"checkbox",input:!0,key:"useMultipartUpload",label:"Use the S3 Multipart Upload API",tooltip:"The <a href='https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html'>S3 Multipart Upload API</a> is designed to improve the upload experience for larger objects (> 5GB).",conditional:{json:{"===":[{var:"data.storage"},"s3"]}}},{label:"Multipart Upload",tableView:!1,key:"multipart",type:"container",input:!0,components:[{label:"Part Size (MB)",applyMaskOn:"change",mask:!1,tableView:!1,delimiter:!1,requireDecimal:!1,inputFormat:"plain",truncateMultipleSpaces:!1,validate:{min:5,max:5e3},key:"partSize",type:"number",input:!0,defaultValue:500}],conditional:{json:{"===":[{var:"data.useMultipartUpload"},!0]}}},{type:"textfield",input:!0,key:"options.indexeddb",label:"Database",weight:10,placeholder:"Enter the indexeddb database name",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textfield",input:!0,label:"Table",key:"options.indexeddbTable",weight:10,placeholder:"Enter the name for indexeddb table",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textarea",key:"options",label:"Custom request options",tooltip:"Pass your custom xhr options(optional)",rows:5,editor:"ace",input:!0,weight:15,placeholder:`{
|
|
100
100
|
"withCredentials": true,
|
|
101
101
|
"headers": {
|
|
102
102
|
"Authorization": "Basic <key>"
|
|
103
103
|
}
|
|
104
|
-
}`,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"fileKey",label:"File form-data key",weight:17,placeholder:"Enter the key name of a file for form data.",tooltip:"Key name that you would like to modify for the file while calling API request.",conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"dir",label:"Directory",placeholder:"(optional) Enter a directory for the files",tooltip:"This will place all the files uploaded in this field in the directory",weight:20,conditional:{json:{"!==":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"dir",label:"Folder ID",placeholder:"(optional) Enter an ID of the folder for the files",tooltip:"This will place all the files uploaded in this field in the folder",weight:20,conditional:{json:{"===":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"fileNameTemplate",label:"File Name Template",placeholder:'(optional) { {name} }-{ {guid} }"',tooltip:"Specify template for name of uploaded file(s). Regular template variables are available (`data`, `component`, `user`, `value`, `moment` etc.), also `fileName`, `guid` variables are available. `guid` part must be present, if not found in template, will be added at the end.",weight:25},{type:"checkbox",input:!0,key:"image",label:"Display as image(s)",tooltip:"Instead of a list of linked files, images will be rendered in the view.",weight:30},{type:"checkbox",input:!0,key:"uploadOnly",label:"Upload Only",tooltip:"When this is checked, will only allow you to upload file(s) and consequently the download, in this component, will be unavailable.",weight:33},{type:"checkbox",input:!0,key:"privateDownload",label:"Private Download",tooltip:"When this is checked, the file download will send a POST request to the download URL with the x-jwt-token header. This will allow your endpoint to create a Private download system.",weight:31,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"imageSize",label:"Image Size",placeholder:"100",tooltip:"The image size for previewing images.",weight:40,conditional:{json:{"==":[{var:"data.image"},!0]}}},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40},{type:"checkbox",input:!0,key:"webcam",label:"Enable web camera",tooltip:"This will allow using an attached camera to directly take a picture instead of uploading an existing file.",weight:32},{type:"textfield",input:!0,key:"webcamSize",label:"Webcam Width",placeholder:"320",tooltip:"The webcam size for taking pictures.",weight:38,conditional:{json:{"==":[{var:"data.webcam"},!0]}}},{type:"datagrid",input:!0,label:"File Types",key:"fileTypes",tooltip:"Specify file types to classify the uploads. This is useful if you allow multiple types of uploads but want to allow the user to specify which type of file each is.",weight:11,components:[{label:"Label",key:"label",input:!0,type:"textfield"},{label:"Value",key:"value",input:!0,type:"textfield"}]},{type:"textfield",input:!0,key:"filePattern",label:"File Pattern",placeholder:".jpg,video/*,application/pdf",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file patterns.",weight:50},{type:"textfield",input:!0,key:"fileMinSize",label:"File Minimum Size",placeholder:"1MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:60},{type:"textfield",input:!0,key:"fileMaxSize",label:"File Maximum Size",placeholder:"10MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:70},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40}],Mc=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function xc(...f){return ot.Components.baseEditForm([{key:"display",components:_c},{key:"data",components:bc},{label:"File",key:"file",weight:5,components:wc},{key:"validation",components:Mc}],...f)}document.documentElement.lang.toString();class Sc{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=Fe()}async getSessionAuthToken(){let i=this;await qt.get(i.basePath+"/api/session-auth").then(g=>{i.token=g.data.token}).catch(g=>{Je.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let i=this;return new Promise(async(g,l)=>{aa("auth-token")?g({token:aa("auth-token")}):await qt.get(i.basePath+"/api/session-auth?with-cookie=true",{withCredentials:!0,headers:{"Content-Type":"application/json; charset=utf-8"}}).then(V=>{const B=sl.jwtDecode(V.data.token);B.exp&&oc("auth-token",V.data.token,B.exp)}).catch(V=>{console.log(V)})})}getToken(){return this.token}execAuthenticatedCall(i){this.token?i(this.token):this.getSessionAuthTokenPromise().then(g=>{this.token=g.token,i(this.token)})}}const vn=cr.Formio.Components.components.file;let lr=null;document.querySelector("widget-formio")!==null&&(lr=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const Dc=({component:f,current:i,onChange:g,i18next:l})=>{const[V,B]=q.useState([]),[X,s]=q.useState(new Map),[x,a]=q.useState(!1),o=new Sc;q.useEffect(()=>{o.getSessionAuthTokenPromise()},[]);const c=(_,M)=>{s(z=>{const H=new Map(z);return H.set(_,{...M,progress:Number(M==null?void 0:M.progress)||0}),H})};function d(_){return _.size>(y(f.fileMaxSize)||y("1GB"))?{code:"size-files",message:`${l.t("I file non possono superare le dimensioni di")} ${f.fileMaxSize?f.fileMaxSize:"1GB"}`}:V.length>=(f.maxFiles?parseInt(f.maxFiles):f.multiple?100:1)?{code:"too-many-files",message:`${l.t("Puoi caricare massimo ")} ${f.maxFiles||100} ${l.t("file")}`}:_.size<y(f.fileMinSize)?{code:"file-too-small",message:`${l.t("I file devono avare una dimensione superiore a ")} ${f.fileMinSize}`}:null}function p(){if(f.filePattern){const M=f.filePattern.split(",").map(z=>z.trim()).filter(Boolean).reduce((z,H)=>{const F=H.startsWith(".")?H:`.${H}`,E=il.getType(F);return E&&(z[E]||(z[E]=[]),z[E].push(F)),z},{});return Object.keys(M).length?M:void 0}else return!0}const m=_=>{let M={};return M.originalName=_.originalName?_.originalName:_.name,M.name=_.name,M.url=_.url,M.data=_.data,M.signature_validation=_.signature_validation,M.mime_type=_.mime_type,M.storage="url",M.size=_.size,M},{getRootProps:T,getInputProps:v,fileRejections:D,isDragActive:O,open:j}=nl.useDropzone({onDrop:_=>{_.map(M=>{k(M).then(z=>{})})},maxFiles:f.maxFiles?parseInt(f.maxFiles)-V.length:f.multiple?100:1,validator:d,accept:p()}),R=_=>{const M=Fe()+"/api/attachments/"+_.data.id;fetch(M,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(()=>{B(z=>{let H=z.filter(F=>F.data.id!==_.data.id);return g(H),H})}).catch(z=>{Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(z)})},N=()=>{const _=i!=null&&i.dataValue?i.dataValue:null;(_==null?void 0:_.length)>0&&(B(_),setTimeout(()=>{g(_)},100))};q.useEffect(()=>{document.querySelector(".formio-read-only")&&x===!1?(a(!0),setTimeout(()=>{N()},1e3)):(a(!1),setTimeout(()=>{N()},1e3))},[]);async function k(_){let M;const z=Fe()+"/it/upload";let H={mime_type:_.type,name:_.name,original_filename:_.name,protocol_required:f.protocol_required,size:_.size};return await qt.post(z,H,{maxContentLength:1/0,maxBodyLength:1/0}).then(async F=>(M=F.data.id,_.url=Fe()+"/it/allegati/"+M,_.storage="url",_.mime_type=_.type,_.protocol_required=f.protocol_required,_.data={...F.data,baseUrl:Fe()+"/it/allegati/"+M},c(M,_),await qt.put(F.data.uri,_,{onUploadProgress:E=>{let $=Math.round(E.loaded*100/E.total);s(J=>{const re=new Map(J),ee=_;return ee.progress=parseInt($),re.has(M)&&re.set(M,ee),re})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async E=>{const $=/\\|"/gi,J=E.headers.etag.replace($,"")||null;return await qt.put(Fe()+"/it/upload/"+M,{file_hash:J,check_signature:f.check_signature}).then(async re=>{s(Q=>{const ue=new Map(Q);return ue.delete(M),ue});let ee=i.dataValue||[],fe=null;if(B(Q=>{const ue=[...Q,m(_)];return fe=ue.length-1,g(ue),ue}),f.check_signature&&re.data.url&&lr)return await qt.post(lr,{url:re.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(Q=>{_.signature_validation=Q.data.sign,ee[fe].signature_validation=Q.data.sign}).catch(Q=>{ee[fe].signature_validation="File validation error: "+Q});s(Q=>{const ue=new Map(Q);return ue.delete(M),ue})}).catch(re=>{s(ee=>{const fe=new Map(ee);return fe.delete(M),fe}),console.log(re),Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(E=>{s($=>{const J=new Map($);return J.delete(M),J}),console.log(E),Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(F=>{console.log(F),Je.fire({title:"",html:`<p>${l.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:l.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),s(E=>{const $=new Map(E);return $.delete(M),$})})}function y(_){if(typeof _=="string"){if(_.search(/kb/i)===_.length-2)return parseFloat(_.substring(0,_.length-2)*1024);if(_.search(/mb/i)===_.length-2)return parseFloat(_.substring(0,_.length-2)*1024*1024);if(_.search(/gb/i)===_.length-2)return parseFloat(_.substring(0,_.length-2)*1024*1024*1024);if(_.search(/b/i)===_.length-1||_.search(/s/i)===_.length-1)return parseFloat(_.substring(0,_.length-1));if(_.search(/m/i)===_.length-1)return parseFloat(_.substring(0,_.length-1)*60);if(_.search(/h/i)===_.length-1)return parseFloat(_.substring(0,_.length-1)*3600)}return _}function C(_,M=2){if(!+_)return"0 Bytes";const z=1024,H=M<0?0:M,F=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],E=Math.floor(Math.log(_)/Math.log(z));return`${parseFloat((_/Math.pow(z,E)).toFixed(H))} ${F[E]}`}return i.conditionallyHidden()||i.visible===!1?null:h.jsx(h.Fragment,{children:x?h.jsx("div",{children:h.jsxs("ul",{className:"upload-file-list",children:[V.map((_,M)=>h.jsxs("li",{className:"upload-file success mw-100",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:l.t("File caricato:")}),_.name,h.jsx("span",{className:"upload-file-weight",children:C(_.size)})]})]},_.size+M)),V.length<1&&h.jsxs("li",{className:"upload-file text-secondary mw-100",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),h.jsx("p",{children:l.t("Nessun elemento")})]})]})}):h.jsxs(h.Fragment,{children:[f.hideLabel||f.hidden?"":h.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${f.id}-${f.key}`,title:f.tooltip||void 0,children:[f.label,f.validate.required&&h.jsx("span",{className:"text-danger"}),f.tooltip&&h.jsx("i",{tabIndex:0,className:"bi bi-question-circle text-muted ms-1","data-tooltip":f.tooltip,"aria-expanded":"false"})]}),h.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${O?" dragover":""}`,style:{border:"dashed"},...T({onClick:_=>_.stopPropagation()}),children:[h.jsx("input",{id:`${f.id}-${f.key}`,"aria-describedby":`file-uploader-description-${f.id}-${f.key}`,...v()}),h.jsxs("div",{className:`upload-dragdrop${O?" dragover":""}`,children:[h.jsx("div",{className:"ms-1 me-3",children:h.jsx(le.Icon,{color:"secondary",icon:"it-upload",title:l.t("Carica file"),size:"_sm"})}),h.jsxs("div",{className:"upload-dragdrop-text",children:[h.jsx("div",{className:"h5",id:`file-uploader-description-${f.id}-${f.key}`,children:l.t("Trascina il file per caricarlo")}),h.jsxs("p",{className:"d-inline-flex",children:[l.t("oppure"),h.jsx(le.Button,{tag:"input",type:"button",value:l.t("selezionalo dal dispositivo"),onClick:j,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),h.jsx("div",{dangerouslySetInnerHTML:{__html:xn.sanitize(f.description||"")}}),h.jsxs("ul",{className:"upload-file-list my-0",children:[V.map((_,M)=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:l.t("File caricato:")}),_.name,h.jsx("span",{className:"upload-file-weight",children:C(_.size)})]}),h.jsx(le.Button,{className:"px-1",onClick:()=>R(_),children:h.jsx(le.Icon,{title:`${l.t("Elimina file caricato")} ${_.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},_.size+M)),Array.from(X.entries()).map(([_,M])=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:l.t("Caricamento file:")}),M.name,h.jsx("span",{className:"upload-file-weight",children:C(M.size)})]}),h.jsx(le.Progress,{value:Number(M==null?void 0:M.progress)||0})]},_))]}),!!(D&&D.length)&&h.jsx("div",{className:"formio-error-wrapper",children:h.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:D.map(({file:_,errors:M},z)=>h.jsxs("li",{className:"upload-file error",children:[h.jsxs("div",{className:"upload-file-name-error-wrapper",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"error",icon:"it-error",title:"Icona file",size:"sm"}),h.jsxs("p",{className:"text-wrap error",children:[h.jsx("span",{className:"visually-hidden",children:l.t("Errore caricamento file:")}),_.name,h.jsx("span",{className:"upload-file-weight",children:C(_.size)})]})]}),h.jsx("div",{children:M.map(H=>H.code==="file-invalid-type"?h.jsxs("p",{className:"text-wrap ms-0",children:[l.t("I file possono essere di tipo "),f.filePattern]}):H.code==="too-many-files"?h.jsxs("p",{className:"text-wrap ms-0",children:[l.t("Puoi caricare massimo ")," ",f.maxFiles?f.maxFiles:f.multiple?100:1," ",l.t("file")]}):h.jsx("p",{className:"text-wrap ms-0",children:H.message}))})]},_.size+z))})})]})})},Oa=class Oa extends vn{constructor(i,g,l){super({...i,multiple:i.multiple},g,l),this.reactRef=null,this.lastRenderedVisible=void 0}static get builderInfo(){return{title:"File Sdc",group:"basic",icon:"bi bi-file-earmark-text",documentation:"",weight:70,schema:Oa.schema()}}static schema(){return vn.schema({type:"sdcfile"})}renderReact(i=this.reactRef){this.rootComponent&&this.rootComponent.render(h.jsx(Dc,{ref:i,component:this.component,onChange:g=>this.setValue(g),...this,current:this}))}attach(i,g){this.reactRef=g,this.rootComponent=Ft.createRoot(i),this.lastRenderedVisible=this.visible,this.renderReact(g)}setValue(i,g={}){const l=this.updateValue(i,g);return this.shouldSetValue=!0,l}getValue(){return super.getValue()}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}checkCondition(i,g){const l=super.checkCondition(i,g),V=this.visible;return this.lastRenderedVisible!==V&&(this.lastRenderedVisible=V,this.renderReact()),l}validate(i,g,l){return super.validate(i,g,l)}checkValidity(i,g,l){return super.checkValidity(i,g,l),console.log("qui1",this.error.message),this.error&&this.error.message?(console.log("qui",this.error.message),this.error.message==="Campo richiesto"?!1:(this.error.message=null,this.error.messages=null,!0)):!0}};Ct(Oa,"editForm",xc);let Ma=Oa;const kc=[{key:"labelPosition",ignore:!0},{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0}];function Yc(...f){return ot.Components.baseEditForm([{key:"display",components:kc}],...f)}var ya={exports:{}},Oc=ya.exports,bn;function jc(){return bn||(bn=1,(function(f,i){(function(g,l){f.exports=l(q)})(Oc,(function(g){return(function(){var l={680:function(s){s.exports=g},8952:function(s,x,a){var o=a(4328),c=a(36),d=TypeError;s.exports=function(p){if(o(p))return p;throw new d(c(p)+" is not a function")}},2096:function(s,x,a){var o=a(2424),c=String,d=TypeError;s.exports=function(p){if(o(p))return p;throw new d("Can't set "+c(p)+" as a prototype")}},4764:function(s,x,a){var o=a(9764).charAt;s.exports=function(c,d,p){return d+(p?o(c,d).length:1)}},6100:function(s,x,a){var o=a(7e3),c=TypeError;s.exports=function(d,p){if(o(p,d))return d;throw new c("Incorrect invocation")}},3951:function(s,x,a){var o=a(1632),c=String,d=TypeError;s.exports=function(p){if(o(p))return p;throw new d(c(p)+" is not an object")}},2504:function(s,x,a){var o=a(4096),c=a(2495),d=a(3556),p=function(m){return function(T,v,D){var O=o(T),j=d(O);if(j===0)return!m&&-1;var R,N=c(D,j);if(m&&v!=v){for(;j>N;)if((R=O[N++])!=R)return!0}else for(;j>N;N++)if((m||N in O)&&O[N]===v)return m||N||0;return!m&&-1}};s.exports={includes:p(!0),indexOf:p(!1)}},3364:function(s,x,a){var o=a(8992),c=a(1664),d=a(5712),p=a(4356),m=a(3556),T=a(2568),v=c([].push),D=function(O){var j=O===1,R=O===2,N=O===3,k=O===4,y=O===6,C=O===7,_=O===5||y;return function(M,z,H,F){for(var E,$,J=p(M),re=d(J),ee=m(re),fe=o(z,H),Q=0,ue=F||T,se=j?ue(M,ee):R||C?ue(M,0):void 0;ee>Q;Q++)if((_||Q in re)&&($=fe(E=re[Q],Q,J),O))if(j)se[Q]=$;else if($)switch(O){case 3:return!0;case 5:return E;case 6:return Q;case 2:v(se,E)}else switch(O){case 4:return!1;case 7:v(se,E)}return y?-1:N||k?k:se}};s.exports={forEach:D(0),map:D(1),filter:D(2),some:D(3),every:D(4),find:D(5),findIndex:D(6),filterReject:D(7)}},953:function(s,x,a){var o=a(9957),c=a(9972),d=a(8504),p=c("species");s.exports=function(m){return d>=51||!o((function(){var T=[];return(T.constructor={})[p]=function(){return{foo:1}},T[m](Boolean).foo!==1}))}},1496:function(s,x,a){var o=a(9957);s.exports=function(c,d){var p=[][c];return!!p&&o((function(){p.call(null,d||function(){return 1},1)}))}},6728:function(s,x,a){var o=a(3476),c=a(1432),d=TypeError,p=Object.getOwnPropertyDescriptor,m=o&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(T){return T instanceof TypeError}})();s.exports=m?function(T,v){if(c(T)&&!p(T,"length").writable)throw new d("Cannot set read only .length");return T.length=v}:function(T,v){return T.length=v}},6736:function(s,x,a){var o=a(1432),c=a(6072),d=a(1632),p=a(9972)("species"),m=Array;s.exports=function(T){var v;return o(T)&&(v=T.constructor,(c(v)&&(v===m||o(v.prototype))||d(v)&&(v=v[p])===null)&&(v=void 0)),v===void 0?m:v}},2568:function(s,x,a){var o=a(6736);s.exports=function(c,d){return new(o(c))(d===0?0:d)}},8696:function(s,x,a){var o=a(3951),c=a(3112);s.exports=function(d,p,m,T){try{return T?p(o(m)[0],m[1]):p(m)}catch(v){c(d,"throw",v)}}},1888:function(s,x,a){var o=a(1664),c=o({}.toString),d=o("".slice);s.exports=function(p){return d(c(p),8,-1)}},4427:function(s,x,a){var o=a(16),c=a(4328),d=a(1888),p=a(9972)("toStringTag"),m=Object,T=d((function(){return arguments})())==="Arguments";s.exports=o?d:function(v){var D,O,j;return v===void 0?"Undefined":v===null?"Null":typeof(O=(function(R,N){try{return R[N]}catch{}})(D=m(v),p))=="string"?O:T?d(D):(j=d(D))==="Object"&&c(D.callee)?"Arguments":j}},9968:function(s,x,a){var o=a(5152),c=a(9252),d=a(9444),p=a(8352);s.exports=function(m,T,v){for(var D=c(T),O=p.f,j=d.f,R=0;R<D.length;R++){var N=D[R];o(m,N)||v&&o(v,N)||O(m,N,j(T,N))}}},2272:function(s,x,a){var o=a(9957);s.exports=!o((function(){function c(){}return c.prototype.constructor=null,Object.getPrototypeOf(new c)!==c.prototype}))},3336:function(s){s.exports=function(x,a){return{value:x,done:a}}},3440:function(s,x,a){var o=a(3476),c=a(8352),d=a(9728);s.exports=o?function(p,m,T){return c.f(p,m,d(1,T))}:function(p,m,T){return p[m]=T,p}},9728:function(s){s.exports=function(x,a){return{enumerable:!(1&x),configurable:!(2&x),writable:!(4&x),value:a}}},92:function(s,x,a){var o=a(3476),c=a(8352),d=a(9728);s.exports=function(p,m,T){o?c.f(p,m,d(0,T)):p[m]=T}},2544:function(s,x,a){var o=a(5312),c=a(8352);s.exports=function(d,p,m){return m.get&&o(m.get,p,{getter:!0}),m.set&&o(m.set,p,{setter:!0}),c.f(d,p,m)}},6076:function(s,x,a){var o=a(4328),c=a(8352),d=a(5312),p=a(4636);s.exports=function(m,T,v,D){D||(D={});var O=D.enumerable,j=D.name!==void 0?D.name:T;if(o(v)&&d(v,j,D),D.global)O?m[T]=v:p(T,v);else{try{D.unsafe?m[T]&&(O=!0):delete m[T]}catch{}O?m[T]=v:c.f(m,T,{value:v,enumerable:!1,configurable:!D.nonConfigurable,writable:!D.nonWritable})}return m}},4036:function(s,x,a){var o=a(6076);s.exports=function(c,d,p){for(var m in d)o(c,m,d[m],p);return c}},4636:function(s,x,a){var o=a(6420),c=Object.defineProperty;s.exports=function(d,p){try{c(o,d,{value:p,configurable:!0,writable:!0})}catch{o[d]=p}return p}},3476:function(s,x,a){var o=a(9957);s.exports=!o((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(s,x,a){var o=a(6420),c=a(1632),d=o.document,p=c(d)&&c(d.createElement);s.exports=function(m){return p?d.createElement(m):{}}},4316:function(s){var x=TypeError;s.exports=function(a){if(a>9007199254740991)throw x("Maximum allowed index exceeded");return a}},6064:function(s){s.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(s,x,a){var o,c,d=a(6420),p=a(6064),m=d.process,T=d.Deno,v=m&&m.versions||T&&T.version,D=v&&v.v8;D&&(c=(o=D.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1])),!c&&p&&(!(o=p.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=p.match(/Chrome\/(\d+)/))&&(c=+o[1]),s.exports=c},8256:function(s){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(s,x,a){var o=a(1664),c=Error,d=o("".replace),p=String(new c("zxcasd").stack),m=/\n\s*at [^:]*:[^\n]*/,T=m.test(p);s.exports=function(v,D){if(T&&typeof v=="string"&&!c.prepareStackTrace)for(;D--;)v=d(v,m,"");return v}},3696:function(s,x,a){var o=a(3440),c=a(6520),d=a(9184),p=Error.captureStackTrace;s.exports=function(m,T,v,D){d&&(p?p(m,T):o(m,"stack",c(v,D)))}},9184:function(s,x,a){var o=a(9957),c=a(9728);s.exports=!o((function(){var d=new Error("a");return!("stack"in d)||(Object.defineProperty(d,"stack",c(1,7)),d.stack!==7)}))},9160:function(s,x,a){var o=a(6420),c=a(9444).f,d=a(3440),p=a(6076),m=a(4636),T=a(9968),v=a(6704);s.exports=function(D,O){var j,R,N,k,y,C=D.target,_=D.global,M=D.stat;if(j=_?o:M?o[C]||m(C,{}):o[C]&&o[C].prototype)for(R in O){if(k=O[R],N=D.dontCallGetSet?(y=c(j,R))&&y.value:j[R],!v(_?R:C+(M?".":"#")+R,D.forced)&&N!==void 0){if(typeof k==typeof N)continue;T(k,N)}(D.sham||N&&N.sham)&&d(k,"sham",!0),p(j,R,k,D)}}},9957:function(s){s.exports=function(x){try{return!!x()}catch{return!0}}},7176:function(s,x,a){a(880);var o=a(8448),c=a(6076),d=a(7680),p=a(9957),m=a(9972),T=a(3440),v=m("species"),D=RegExp.prototype;s.exports=function(O,j,R,N){var k=m(O),y=!p((function(){var z={};return z[k]=function(){return 7},""[O](z)!==7})),C=y&&!p((function(){var z=!1,H=/a/;return O==="split"&&((H={}).constructor={},H.constructor[v]=function(){return H},H.flags="",H[k]=/./[k]),H.exec=function(){return z=!0,null},H[k](""),!z}));if(!y||!C||R){var _=/./[k],M=j(k,""[O],(function(z,H,F,E,$){var J=H.exec;return J===d||J===D.exec?y&&!$?{done:!0,value:o(_,H,F,E)}:{done:!0,value:o(z,F,H,E)}:{done:!1}}));c(String.prototype,O,M[0]),c(D,k,M[1])}N&&T(D[k],"sham",!0)}},908:function(s,x,a){var o=a(7332),c=Function.prototype,d=c.apply,p=c.call;s.exports=typeof Reflect=="object"&&Reflect.apply||(o?p.bind(d):function(){return p.apply(d,arguments)})},8992:function(s,x,a){var o=a(3180),c=a(8952),d=a(7332),p=o(o.bind);s.exports=function(m,T){return c(m),T===void 0?m:d?p(m,T):function(){return m.apply(T,arguments)}}},7332:function(s,x,a){var o=a(9957);s.exports=!o((function(){var c=(function(){}).bind();return typeof c!="function"||c.hasOwnProperty("prototype")}))},8448:function(s,x,a){var o=a(7332),c=Function.prototype.call;s.exports=o?c.bind(c):function(){return c.apply(c,arguments)}},6208:function(s,x,a){var o=a(3476),c=a(5152),d=Function.prototype,p=o&&Object.getOwnPropertyDescriptor,m=c(d,"name"),T=m&&(function(){}).name==="something",v=m&&(!o||o&&p(d,"name").configurable);s.exports={EXISTS:m,PROPER:T,CONFIGURABLE:v}},5288:function(s,x,a){var o=a(1664),c=a(8952);s.exports=function(d,p,m){try{return o(c(Object.getOwnPropertyDescriptor(d,p)[m]))}catch{}}},3180:function(s,x,a){var o=a(1888),c=a(1664);s.exports=function(d){if(o(d)==="Function")return c(d)}},1664:function(s,x,a){var o=a(7332),c=Function.prototype,d=c.call,p=o&&c.bind.bind(d,d);s.exports=o?p:function(m){return function(){return d.apply(m,arguments)}}},5232:function(s,x,a){var o=a(6420),c=a(4328);s.exports=function(d,p){return arguments.length<2?(m=o[d],c(m)?m:void 0):o[d]&&o[d][p];var m}},6752:function(s){s.exports=function(x){return{iterator:x,next:x.next,done:!1}}},4504:function(s,x,a){var o=a(8952),c=a(9760);s.exports=function(d,p){var m=d[p];return c(m)?void 0:o(m)}},6420:function(s,x,a){var o=function(c){return c&&c.Math===Math&&c};s.exports=o(typeof globalThis=="object"&&globalThis)||o(typeof window=="object"&&window)||o(typeof self=="object"&&self)||o(typeof a.g=="object"&&a.g)||o(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(s,x,a){var o=a(1664),c=a(4356),d=o({}.hasOwnProperty);s.exports=Object.hasOwn||function(p,m){return d(c(p),m)}},2560:function(s){s.exports={}},4168:function(s,x,a){var o=a(5232);s.exports=o("document","documentElement")},9888:function(s,x,a){var o=a(3476),c=a(9957),d=a(8168);s.exports=!o&&!c((function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(s,x,a){var o=a(1664),c=a(9957),d=a(1888),p=Object,m=o("".split);s.exports=c((function(){return!p("z").propertyIsEnumerable(0)}))?function(T){return d(T)==="String"?m(T,""):p(T)}:p},7512:function(s,x,a){var o=a(4328),c=a(1632),d=a(4024);s.exports=function(p,m,T){var v,D;return d&&o(v=m.constructor)&&v!==T&&c(D=v.prototype)&&D!==T.prototype&&d(p,D),p}},9112:function(s,x,a){var o=a(1664),c=a(4328),d=a(3976),p=o(Function.toString);c(d.inspectSource)||(d.inspectSource=function(m){return p(m)}),s.exports=d.inspectSource},3480:function(s,x,a){var o=a(1632),c=a(3440);s.exports=function(d,p){o(p)&&"cause"in p&&c(d,"cause",p.cause)}},9104:function(s,x,a){var o,c,d,p=a(4288),m=a(6420),T=a(1632),v=a(3440),D=a(5152),O=a(3976),j=a(6504),R=a(2560),N="Object already initialized",k=m.TypeError,y=m.WeakMap;if(p||O.state){var C=O.state||(O.state=new y);C.get=C.get,C.has=C.has,C.set=C.set,o=function(M,z){if(C.has(M))throw new k(N);return z.facade=M,C.set(M,z),z},c=function(M){return C.get(M)||{}},d=function(M){return C.has(M)}}else{var _=j("state");R[_]=!0,o=function(M,z){if(D(M,_))throw new k(N);return z.facade=M,v(M,_,z),z},c=function(M){return D(M,_)?M[_]:{}},d=function(M){return D(M,_)}}s.exports={set:o,get:c,has:d,enforce:function(M){return d(M)?c(M):o(M,{})},getterFor:function(M){return function(z){var H;if(!T(z)||(H=c(z)).type!==M)throw new k("Incompatible receiver, "+M+" required");return H}}}},1432:function(s,x,a){var o=a(1888);s.exports=Array.isArray||function(c){return o(c)==="Array"}},4328:function(s){var x=typeof document=="object"&&document.all;s.exports=x===void 0&&x!==void 0?function(a){return typeof a=="function"||a===x}:function(a){return typeof a=="function"}},6072:function(s,x,a){var o=a(1664),c=a(9957),d=a(4328),p=a(4427),m=a(5232),T=a(9112),v=function(){},D=m("Reflect","construct"),O=/^\s*(?:class|function)\b/,j=o(O.exec),R=!O.test(v),N=function(y){if(!d(y))return!1;try{return D(v,[],y),!0}catch{return!1}},k=function(y){if(!d(y))return!1;switch(p(y)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return R||!!j(O,T(y))}catch{return!0}};k.sham=!0,s.exports=!D||c((function(){var y;return N(N.call)||!N(Object)||!N((function(){y=!0}))||y}))?k:N},6704:function(s,x,a){var o=a(9957),c=a(4328),d=/#|\.prototype\./,p=function(O,j){var R=T[m(O)];return R===D||R!==v&&(c(j)?o(j):!!j)},m=p.normalize=function(O){return String(O).replace(d,".").toLowerCase()},T=p.data={},v=p.NATIVE="N",D=p.POLYFILL="P";s.exports=p},9760:function(s){s.exports=function(x){return x==null}},1632:function(s,x,a){var o=a(4328);s.exports=function(c){return typeof c=="object"?c!==null:o(c)}},2424:function(s,x,a){var o=a(1632);s.exports=function(c){return o(c)||c===null}},7048:function(s){s.exports=!1},7728:function(s,x,a){var o=a(5232),c=a(4328),d=a(7e3),p=a(6536),m=Object;s.exports=p?function(T){return typeof T=="symbol"}:function(T){var v=o("Symbol");return c(v)&&d(v.prototype,m(T))}},3112:function(s,x,a){var o=a(8448),c=a(3951),d=a(4504);s.exports=function(p,m,T){var v,D;c(p);try{if(!(v=d(p,"return"))){if(m==="throw")throw T;return T}v=o(v,p)}catch(O){D=!0,v=O}if(m==="throw")throw T;if(D)throw v;return c(v),T}},9724:function(s,x,a){var o=a(8448),c=a(9368),d=a(3440),p=a(4036),m=a(9972),T=a(9104),v=a(4504),D=a(336).IteratorPrototype,O=a(3336),j=a(3112),R=m("toStringTag"),N="IteratorHelper",k="WrapForValidIterator",y=T.set,C=function(z){var H=T.getterFor(z?k:N);return p(c(D),{next:function(){var F=H(this);if(z)return F.nextHandler();try{var E=F.done?void 0:F.nextHandler();return O(E,F.done)}catch($){throw F.done=!0,$}},return:function(){var F=H(this),E=F.iterator;if(F.done=!0,z){var $=v(E,"return");return $?o($,E):O(void 0,!0)}if(F.inner)try{j(F.inner.iterator,"normal")}catch(J){return j(E,"throw",J)}return j(E,"normal"),O(void 0,!0)}})},_=C(!0),M=C(!1);d(M,R,"Iterator Helper"),s.exports=function(z,H){var F=function(E,$){$?($.iterator=E.iterator,$.next=E.next):$=E,$.type=H?k:N,$.nextHandler=z,$.counter=0,$.done=!1,y(this,$)};return F.prototype=H?_:M,F}},5792:function(s,x,a){var o=a(8448),c=a(8952),d=a(3951),p=a(6752),m=a(9724),T=a(8696),v=m((function(){var D=this.iterator,O=d(o(this.next,D));if(!(this.done=!!O.done))return T(D,this.mapper,[O.value,this.counter++],!0)}));s.exports=function(D){return d(this),c(D),new v(p(this),{mapper:D})}},336:function(s,x,a){var o,c,d,p=a(9957),m=a(4328),T=a(1632),v=a(9368),D=a(7796),O=a(6076),j=a(9972),R=a(7048),N=j("iterator"),k=!1;[].keys&&("next"in(d=[].keys())?(c=D(D(d)))!==Object.prototype&&(o=c):k=!0),!T(o)||p((function(){var y={};return o[N].call(y)!==y}))?o={}:R&&(o=v(o)),m(o[N])||O(o,N,(function(){return this})),s.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:k}},3556:function(s,x,a){var o=a(7584);s.exports=function(c){return o(c.length)}},5312:function(s,x,a){var o=a(1664),c=a(9957),d=a(4328),p=a(5152),m=a(3476),T=a(6208).CONFIGURABLE,v=a(9112),D=a(9104),O=D.enforce,j=D.get,R=String,N=Object.defineProperty,k=o("".slice),y=o("".replace),C=o([].join),_=m&&!c((function(){return N((function(){}),"length",{value:8}).length!==8})),M=String(String).split("String"),z=s.exports=function(H,F,E){k(R(F),0,7)==="Symbol("&&(F="["+y(R(F),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),E&&E.getter&&(F="get "+F),E&&E.setter&&(F="set "+F),(!p(H,"name")||T&&H.name!==F)&&(m?N(H,"name",{value:F,configurable:!0}):H.name=F),_&&E&&p(E,"arity")&&H.length!==E.arity&&N(H,"length",{value:E.arity});try{E&&p(E,"constructor")&&E.constructor?m&&N(H,"prototype",{writable:!1}):H.prototype&&(H.prototype=void 0)}catch{}var $=O(H);return p($,"source")||($.source=C(M,typeof F=="string"?F:"")),H};Function.prototype.toString=z((function(){return d(this)&&j(this).source||v(this)}),"toString")},1748:function(s){var x=Math.ceil,a=Math.floor;s.exports=Math.trunc||function(o){var c=+o;return(c>0?a:x)(c)}},8948:function(s,x,a){var o=a(5016);s.exports=function(c,d){return c===void 0?arguments.length<2?"":d:o(c)}},9292:function(s,x,a){var o=a(3476),c=a(1664),d=a(8448),p=a(9957),m=a(1531),T=a(9392),v=a(8912),D=a(4356),O=a(5712),j=Object.assign,R=Object.defineProperty,N=c([].concat);s.exports=!j||p((function(){if(o&&j({b:1},j(R({},"a",{enumerable:!0,get:function(){R(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var k={},y={},C=Symbol("assign detection"),_="abcdefghijklmnopqrst";return k[C]=7,_.split("").forEach((function(M){y[M]=M})),j({},k)[C]!==7||m(j({},y)).join("")!==_}))?function(k,y){for(var C=D(k),_=arguments.length,M=1,z=T.f,H=v.f;_>M;)for(var F,E=O(arguments[M++]),$=z?N(m(E),z(E)):m(E),J=$.length,re=0;J>re;)F=$[re++],o&&!d(H,E,F)||(C[F]=E[F]);return C}:j},9368:function(s,x,a){var o,c=a(3951),d=a(2056),p=a(8256),m=a(2560),T=a(4168),v=a(8168),D=a(6504),O="prototype",j="script",R=D("IE_PROTO"),N=function(){},k=function(_){return"<"+j+">"+_+"</"+j+">"},y=function(_){_.write(k("")),_.close();var M=_.parentWindow.Object;return _=null,M},C=function(){try{o=new ActiveXObject("htmlfile")}catch{}var _,M,z;C=typeof document<"u"?document.domain&&o?y(o):(M=v("iframe"),z="java"+j+":",M.style.display="none",T.appendChild(M),M.src=String(z),(_=M.contentWindow.document).open(),_.write(k("document.F=Object")),_.close(),_.F):y(o);for(var H=p.length;H--;)delete C[O][p[H]];return C()};m[R]=!0,s.exports=Object.create||function(_,M){var z;return _!==null?(N[O]=c(_),z=new N,N[O]=null,z[R]=_):z=C(),M===void 0?z:d.f(z,M)}},2056:function(s,x,a){var o=a(3476),c=a(1576),d=a(8352),p=a(3951),m=a(4096),T=a(1531);x.f=o&&!c?Object.defineProperties:function(v,D){p(v);for(var O,j=m(D),R=T(D),N=R.length,k=0;N>k;)d.f(v,O=R[k++],j[O]);return v}},8352:function(s,x,a){var o=a(3476),c=a(9888),d=a(1576),p=a(3951),m=a(88),T=TypeError,v=Object.defineProperty,D=Object.getOwnPropertyDescriptor,O="enumerable",j="configurable",R="writable";x.f=o?d?function(N,k,y){if(p(N),k=m(k),p(y),typeof N=="function"&&k==="prototype"&&"value"in y&&R in y&&!y[R]){var C=D(N,k);C&&C[R]&&(N[k]=y.value,y={configurable:j in y?y[j]:C[j],enumerable:O in y?y[O]:C[O],writable:!1})}return v(N,k,y)}:v:function(N,k,y){if(p(N),k=m(k),p(y),c)try{return v(N,k,y)}catch{}if("get"in y||"set"in y)throw new T("Accessors not supported");return"value"in y&&(N[k]=y.value),N}},9444:function(s,x,a){var o=a(3476),c=a(8448),d=a(8912),p=a(9728),m=a(4096),T=a(88),v=a(5152),D=a(9888),O=Object.getOwnPropertyDescriptor;x.f=o?O:function(j,R){if(j=m(j),R=T(R),D)try{return O(j,R)}catch{}if(v(j,R))return p(!c(d.f,j,R),j[R])}},5048:function(s,x,a){var o=a(9008),c=a(8256).concat("length","prototype");x.f=Object.getOwnPropertyNames||function(d){return o(d,c)}},9392:function(s,x){x.f=Object.getOwnPropertySymbols},7796:function(s,x,a){var o=a(5152),c=a(4328),d=a(4356),p=a(6504),m=a(2272),T=p("IE_PROTO"),v=Object,D=v.prototype;s.exports=m?v.getPrototypeOf:function(O){var j=d(O);if(o(j,T))return j[T];var R=j.constructor;return c(R)&&j instanceof R?R.prototype:j instanceof v?D:null}},7e3:function(s,x,a){var o=a(1664);s.exports=o({}.isPrototypeOf)},9008:function(s,x,a){var o=a(1664),c=a(5152),d=a(4096),p=a(2504).indexOf,m=a(2560),T=o([].push);s.exports=function(v,D){var O,j=d(v),R=0,N=[];for(O in j)!c(m,O)&&c(j,O)&&T(N,O);for(;D.length>R;)c(j,O=D[R++])&&(~p(N,O)||T(N,O));return N}},1531:function(s,x,a){var o=a(9008),c=a(8256);s.exports=Object.keys||function(d){return o(d,c)}},8912:function(s,x){var a={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,c=o&&!a.call({1:2},1);x.f=c?function(d){var p=o(this,d);return!!p&&p.enumerable}:a},4024:function(s,x,a){var o=a(5288),c=a(3951),d=a(2096);s.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,m=!1,T={};try{(p=o(Object.prototype,"__proto__","set"))(T,[]),m=T instanceof Array}catch{}return function(v,D){return c(v),d(D),m?p(v,D):v.__proto__=D,v}})():void 0)},7032:function(s,x,a){var o=a(16),c=a(4427);s.exports=o?{}.toString:function(){return"[object "+c(this)+"]"}},2104:function(s,x,a){var o=a(8448),c=a(4328),d=a(1632),p=TypeError;s.exports=function(m,T){var v,D;if(T==="string"&&c(v=m.toString)&&!d(D=o(v,m))||c(v=m.valueOf)&&!d(D=o(v,m))||T!=="string"&&c(v=m.toString)&&!d(D=o(v,m)))return D;throw new p("Can't convert object to primitive value")}},9252:function(s,x,a){var o=a(5232),c=a(1664),d=a(5048),p=a(9392),m=a(3951),T=c([].concat);s.exports=o("Reflect","ownKeys")||function(v){var D=d.f(m(v)),O=p.f;return O?T(D,O(v)):D}},584:function(s,x,a){var o=a(8352).f;s.exports=function(c,d,p){p in c||o(c,p,{configurable:!0,get:function(){return d[p]},set:function(m){d[p]=m}})}},9092:function(s,x,a){var o=a(8448),c=a(3951),d=a(4328),p=a(1888),m=a(7680),T=TypeError;s.exports=function(v,D){var O=v.exec;if(d(O)){var j=o(O,v,D);return j!==null&&c(j),j}if(p(v)==="RegExp")return o(m,v,D);throw new T("RegExp#exec called on incompatible receiver")}},7680:function(s,x,a){var o,c,d=a(8448),p=a(1664),m=a(5016),T=a(8872),v=a(3548),D=a(4696),O=a(9368),j=a(9104).get,R=a(8e3),N=a(9124),k=D("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,C=y,_=p("".charAt),M=p("".indexOf),z=p("".replace),H=p("".slice),F=(c=/b*/g,d(y,o=/a/,"a"),d(y,c,"a"),o.lastIndex!==0||c.lastIndex!==0),E=v.BROKEN_CARET,$=/()??/.exec("")[1]!==void 0;(F||$||E||R||N)&&(C=function(J){var re,ee,fe,Q,ue,se,ye,ce=this,Z=j(ce),ve=m(J),Ne=Z.raw;if(Ne)return Ne.lastIndex=ce.lastIndex,re=d(C,Ne,ve),ce.lastIndex=Ne.lastIndex,re;var be=Z.groups,Ce=E&&ce.sticky,Re=d(T,ce),ze=ce.source,P=0,b=ve;if(Ce&&(Re=z(Re,"y",""),M(Re,"g")===-1&&(Re+="g"),b=H(ve,ce.lastIndex),ce.lastIndex>0&&(!ce.multiline||ce.multiline&&_(ve,ce.lastIndex-1)!==`
|
|
105
|
-
`)&&(ze="(?: "+ze+")",b=" "+b,
|
|
106
|
-
`)&&d.flags==="s")}))},9124:function(s,x,a){var o=a(9957),c=a(6420).RegExp;s.exports=o((function(){var d=c("(?<a>b)","g");return d.exec("b").groups.a!=="b"||"b".replace(d,"$<a>c")!=="bc"}))},5436:function(s,x,a){var o=a(9760),c=TypeError;s.exports=function(d){if(o(d))throw new c("Can't call method on "+d);return d}},6504:function(s,x,a){var o=a(4696),c=a(7776),d=o("keys");s.exports=function(p){return d[p]||(d[p]=c(p))}},3976:function(s,x,a){var o=a(7048),c=a(6420),d=a(4636),p="__core-js_shared__",m=s.exports=c[p]||d(p,{});(m.versions||(m.versions=[])).push({version:"3.36.0",mode:o?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:function(s,x,a){var o=a(3976);s.exports=function(c,d){return o[c]||(o[c]=d||{})}},9764:function(s,x,a){var o=a(1664),c=a(6180),d=a(5016),p=a(5436),m=o("".charAt),T=o("".charCodeAt),v=o("".slice),D=function(O){return function(j,R){var N,k,y=d(p(j)),C=c(R),_=y.length;return C<0||C>=_?O?"":void 0:(N=T(y,C))<55296||N>56319||C+1===_||(k=T(y,C+1))<56320||k>57343?O?m(y,C):N:O?v(y,C,C+2):k-56320+(N-55296<<10)+65536}};s.exports={codeAt:D(!1),charAt:D(!0)}},772:function(s,x,a){var o=a(8504),c=a(9957),d=a(6420).String;s.exports=!!Object.getOwnPropertySymbols&&!c((function(){var p=Symbol("symbol detection");return!d(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},2495:function(s,x,a){var o=a(6180),c=Math.max,d=Math.min;s.exports=function(p,m){var T=o(p);return T<0?c(T+m,0):d(T,m)}},4096:function(s,x,a){var o=a(5712),c=a(5436);s.exports=function(d){return o(c(d))}},6180:function(s,x,a){var o=a(1748);s.exports=function(c){var d=+c;return d!=d||d===0?0:o(d)}},7584:function(s,x,a){var o=a(6180),c=Math.min;s.exports=function(d){var p=o(d);return p>0?c(p,9007199254740991):0}},4356:function(s,x,a){var o=a(5436),c=Object;s.exports=function(d){return c(o(d))}},7024:function(s,x,a){var o=a(8448),c=a(1632),d=a(7728),p=a(4504),m=a(2104),T=a(9972),v=TypeError,D=T("toPrimitive");s.exports=function(O,j){if(!c(O)||d(O))return O;var R,N=p(O,D);if(N){if(j===void 0&&(j="default"),R=o(N,O,j),!c(R)||d(R))return R;throw new v("Can't convert object to primitive value")}return j===void 0&&(j="number"),m(O,j)}},88:function(s,x,a){var o=a(7024),c=a(7728);s.exports=function(d){var p=o(d,"string");return c(p)?p:p+""}},16:function(s,x,a){var o={};o[a(9972)("toStringTag")]="z",s.exports=String(o)==="[object z]"},5016:function(s,x,a){var o=a(4427),c=String;s.exports=function(d){if(o(d)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return c(d)}},36:function(s){var x=String;s.exports=function(a){try{return x(a)}catch{return"Object"}}},7776:function(s,x,a){var o=a(1664),c=0,d=Math.random(),p=o(1 .toString);s.exports=function(m){return"Symbol("+(m===void 0?"":m)+")_"+p(++c+d,36)}},6536:function(s,x,a){var o=a(772);s.exports=o&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(s,x,a){var o=a(3476),c=a(9957);s.exports=o&&c((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(s,x,a){var o=a(6420),c=a(4328),d=o.WeakMap;s.exports=c(d)&&/native code/.test(String(d))},9972:function(s,x,a){var o=a(6420),c=a(4696),d=a(5152),p=a(7776),m=a(772),T=a(6536),v=o.Symbol,D=c("wks"),O=T?v.for||v:v&&v.withoutSetter||p;s.exports=function(j){return d(D,j)||(D[j]=m&&d(v,j)?v[j]:O("Symbol."+j)),D[j]}},6488:function(s,x,a){var o=a(5232),c=a(5152),d=a(3440),p=a(7e3),m=a(4024),T=a(9968),v=a(584),D=a(7512),O=a(8948),j=a(3480),R=a(3696),N=a(3476),k=a(7048);s.exports=function(y,C,_,M){var z="stackTraceLimit",H=M?2:1,F=y.split("."),E=F[F.length-1],$=o.apply(null,F);if($){var J=$.prototype;if(!k&&c(J,"cause")&&delete J.cause,!_)return $;var re=o("Error"),ee=C((function(fe,Q){var ue=O(M?Q:fe,void 0),se=M?new $(fe):new $;return ue!==void 0&&d(se,"message",ue),R(se,ee,se.stack,2),this&&p(J,this)&&D(se,this,ee),arguments.length>H&&j(se,arguments[H]),se}));if(ee.prototype=J,E!=="Error"?m?m(ee,re):T(ee,re,{name:!0}):N&&z in $&&(v(ee,$,z),v(ee,$,"prepareStackTrace")),T(ee,$),!k)try{J.name!==E&&d(J,"name",E),J.constructor=ee}catch{}return ee}}},7476:function(s,x,a){var o=a(9160),c=a(9957),d=a(1432),p=a(1632),m=a(4356),T=a(3556),v=a(4316),D=a(92),O=a(2568),j=a(953),R=a(9972),N=a(8504),k=R("isConcatSpreadable"),y=N>=51||!c((function(){var _=[];return _[k]=!1,_.concat()[0]!==_})),C=function(_){if(!p(_))return!1;var M=_[k];return M!==void 0?!!M:d(_)};o({target:"Array",proto:!0,arity:1,forced:!y||!j("concat")},{concat:function(_){var M,z,H,F,E,$=m(this),J=O($,0),re=0;for(M=-1,H=arguments.length;M<H;M++)if(C(E=M===-1?$:arguments[M]))for(F=T(E),v(re+F),z=0;z<F;z++,re++)z in E&&D(J,re,E[z]);else v(re+1),D(J,re++,E);return J.length=re,J}})},6932:function(s,x,a){var o=a(9160),c=a(3364).filter;o({target:"Array",proto:!0,forced:!a(953)("filter")},{filter:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}})},700:function(s,x,a){var o=a(9160),c=a(1664),d=a(5712),p=a(4096),m=a(1496),T=c([].join);o({target:"Array",proto:!0,forced:d!==Object||!m("join",",")},{join:function(v){return T(p(this),v===void 0?",":v)}})},4456:function(s,x,a){var o=a(9160),c=a(3364).map;o({target:"Array",proto:!0,forced:!a(953)("map")},{map:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}})},4728:function(s,x,a){var o=a(9160),c=a(4356),d=a(3556),p=a(6728),m=a(4316);o({target:"Array",proto:!0,arity:1,forced:a(9957)((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!(function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(T){return T instanceof TypeError}})()},{push:function(T){var v=c(this),D=d(v),O=arguments.length;m(D+O);for(var j=0;j<O;j++)v[D]=arguments[j],D++;return p(v,D),D}})},8752:function(s,x,a){var o=a(9160),c=a(6420),d=a(908),p=a(6488),m="WebAssembly",T=c[m],v=new Error("e",{cause:7}).cause!==7,D=function(j,R){var N={};N[j]=p(j,R,v),o({global:!0,constructor:!0,arity:1,forced:v},N)},O=function(j,R){if(T&&T[j]){var N={};N[j]=p(m+"."+j,R,v),o({target:m,stat:!0,constructor:!0,arity:1,forced:v},N)}};D("Error",(function(j){return function(R){return d(j,this,arguments)}})),D("EvalError",(function(j){return function(R){return d(j,this,arguments)}})),D("RangeError",(function(j){return function(R){return d(j,this,arguments)}})),D("ReferenceError",(function(j){return function(R){return d(j,this,arguments)}})),D("SyntaxError",(function(j){return function(R){return d(j,this,arguments)}})),D("TypeError",(function(j){return function(R){return d(j,this,arguments)}})),D("URIError",(function(j){return function(R){return d(j,this,arguments)}})),O("CompileError",(function(j){return function(R){return d(j,this,arguments)}})),O("LinkError",(function(j){return function(R){return d(j,this,arguments)}})),O("RuntimeError",(function(j){return function(R){return d(j,this,arguments)}}))},508:function(s,x,a){var o=a(3476),c=a(6208).EXISTS,d=a(1664),p=a(2544),m=Function.prototype,T=d(m.toString),v=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,D=d(v.exec);o&&!c&&p(m,"name",{configurable:!0,get:function(){try{return D(v,T(this))[1]}catch{return""}}})},232:function(s,x,a){var o=a(9160),c=a(9292);o({target:"Object",stat:!0,arity:2,forced:Object.assign!==c},{assign:c})},5443:function(s,x,a){var o=a(16),c=a(6076),d=a(7032);o||c(Object.prototype,"toString",d,{unsafe:!0})},880:function(s,x,a){var o=a(9160),c=a(7680);o({target:"RegExp",proto:!0,forced:/./.exec!==c},{exec:c})},9836:function(s,x,a){var o=a(8448),c=a(7176),d=a(3951),p=a(9760),m=a(7584),T=a(5016),v=a(5436),D=a(4504),O=a(4764),j=a(9092);c("match",(function(R,N,k){return[function(y){var C=v(this),_=p(y)?void 0:D(y,R);return _?o(_,y,C):new RegExp(y)[R](T(C))},function(y){var C=d(this),_=T(y),M=k(N,C,_);if(M.done)return M.value;if(!C.global)return j(C,_);var z=C.unicode;C.lastIndex=0;for(var H,F=[],E=0;(H=j(C,_))!==null;){var $=T(H[0]);F[E]=$,$===""&&(C.lastIndex=O(_,m(C.lastIndex),z)),E++}return E===0?null:F}]}))},3536:function(s,x,a){var o=a(9160),c=a(6420),d=a(6100),p=a(3951),m=a(4328),T=a(7796),v=a(2544),D=a(92),O=a(9957),j=a(5152),R=a(9972),N=a(336).IteratorPrototype,k=a(3476),y=a(7048),C="constructor",_="Iterator",M=R("toStringTag"),z=TypeError,H=c[_],F=y||!m(H)||H.prototype!==N||!O((function(){H({})})),E=function(){if(d(this,N),T(this)===N)throw new z("Abstract class Iterator not directly constructable")},$=function(J,re){k?v(N,J,{configurable:!0,get:function(){return re},set:function(ee){if(p(this),this===N)throw new z("You can't redefine this property");j(this,J)?this[J]=ee:D(this,J,ee)}}):N[J]=re};j(N,M)||$(M,_),!F&&j(N,C)&&N[C]!==Object||$(C,E),E.prototype=N,o({global:!0,constructor:!0,forced:F},{Iterator:E})},2144:function(s,x,a){var o=a(9160),c=a(8448),d=a(8952),p=a(3951),m=a(6752),T=a(9724),v=a(8696),D=a(7048),O=T((function(){for(var j,R,N=this.iterator,k=this.predicate,y=this.next;;){if(j=p(c(y,N)),this.done=!!j.done)return;if(R=j.value,v(N,k,[R,this.counter++],!0))return R}}));o({target:"Iterator",proto:!0,real:!0,forced:D},{filter:function(j){return p(this),d(j),new O(m(this),{predicate:j})}})},9080:function(s,x,a){var o=a(9160),c=a(5792);o({target:"Iterator",proto:!0,real:!0,forced:a(7048)},{map:c})}},V={};function B(s){var x=V[s];if(x!==void 0)return x.exports;var a=V[s]={exports:{}};return l[s].call(a.exports,a,a.exports,B),a.exports}B.d=function(s,x){for(var a in x)B.o(x,a)&&!B.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:x[a]})},B.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),B.o=function(s,x){return Object.prototype.hasOwnProperty.call(s,x)},B.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var X={};return(function(){B.r(X),B.d(X,{default:function(){return v}}),B(8752),B(6932),B(700),B(4456),B(4728),B(508),B(232),B(5443),B(880),B(9836),B(3536),B(2144),B(9080);var s=B(680);B(7476);function x(D,O){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,R){return j.__proto__=R,j},x(D,O)}var a=(function(D){var O,j;function R(){for(var k,y=arguments.length,C=new Array(y),_=0;_<y;_++)C[_]=arguments[_];return(k=D.call.apply(D,[this].concat(C))||this).state={bump:!1,debounced:!1},k}j=D,(O=R).prototype=Object.create(j.prototype),O.prototype.constructor=O,x(O,j);var N=R.prototype;return N.componentWillMount=function(){var k,y,C,_=this;this.debounceStatusUpdate=(k=function(){if(!_.state.debounced){var M=!_.props.isInFocus||_.props.validChoiceMade;_.setState((function(z){return{bump:!z.bump,debounced:!0,silenced:M}}))}},y=1400,function(){var M=this,z=arguments;clearTimeout(C),C=setTimeout((function(){C=null,k.apply(M,z)}),y)})},N.componentWillReceiveProps=function(k){k.queryLength,this.setState({debounced:!1})},N.render=function(){var k=this.props,y=k.id,C=k.length,_=k.queryLength,M=k.minQueryLength,z=k.selectedOption,H=k.selectedOptionIndex,F=k.tQueryTooShort,E=k.tNoResults,$=k.tSelectedOption,J=k.tResults,re=k.className,ee=this.state,fe=ee.bump,Q=ee.debounced,ue=ee.silenced,se=_<M,ye=C===0,ce=z?$(z,C,H):"",Z=null;return Z=se?F(M):ye?E():J(C,ce),this.debounceStatusUpdate(),(0,s.createElement)("div",{className:re,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,s.createElement)("div",{id:y+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!ue&&Q&&fe?Z:""),(0,s.createElement)("div",{id:y+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},ue||!Q||fe?"":Z))},R})(s.Component);a.defaultProps={tQueryTooShort:function(D){return"Type in "+D+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(D,O,j){return D+" "+(j+1)+" of "+O+" is highlighted"},tResults:function(D,O){return D+" "+(D===1?"result":"results")+" "+(D===1?"is":"are")+" available. "+O}};var o=function(D){var O=D.className;return(0,s.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:O,focusable:"false"},(0,s.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,s.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function c(){return c=Object.assign?Object.assign.bind():function(D){for(var O=1;O<arguments.length;O++){var j=arguments[O];for(var R in j)Object.prototype.hasOwnProperty.call(j,R)&&(D[R]=j[R])}return D},c.apply(this,arguments)}function d(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function p(D,O){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,R){return j.__proto__=R,j},p(D,O)}var m={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function T(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var v=(function(D){var O,j;function R(k){var y;return(y=D.call(this,k)||this).elementReferences={},y.state={focused:null,hovered:null,menuOpen:!1,options:k.defaultValue?[k.defaultValue]:[],query:k.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},y.handleComponentBlur=y.handleComponentBlur.bind(d(y)),y.handleKeyDown=y.handleKeyDown.bind(d(y)),y.handleUpArrow=y.handleUpArrow.bind(d(y)),y.handleDownArrow=y.handleDownArrow.bind(d(y)),y.handleEnter=y.handleEnter.bind(d(y)),y.handlePrintableKey=y.handlePrintableKey.bind(d(y)),y.handleListMouseLeave=y.handleListMouseLeave.bind(d(y)),y.handleOptionBlur=y.handleOptionBlur.bind(d(y)),y.handleOptionClick=y.handleOptionClick.bind(d(y)),y.handleOptionFocus=y.handleOptionFocus.bind(d(y)),y.handleOptionMouseDown=y.handleOptionMouseDown.bind(d(y)),y.handleOptionMouseEnter=y.handleOptionMouseEnter.bind(d(y)),y.handleInputBlur=y.handleInputBlur.bind(d(y)),y.handleInputChange=y.handleInputChange.bind(d(y)),y.handleInputClick=y.handleInputClick.bind(d(y)),y.handleInputFocus=y.handleInputFocus.bind(d(y)),y.pollInputElement=y.pollInputElement.bind(d(y)),y.getDirectInputChanges=y.getDirectInputChanges.bind(d(y)),y}j=D,(O=R).prototype=Object.create(j.prototype),O.prototype.constructor=O,p(O,j);var N=R.prototype;return N.isQueryAnOption=function(k,y){var C=this;return y.map((function(_){return C.templateInputValue(_).toLowerCase()})).indexOf(k.toLowerCase())!==-1},N.componentDidMount=function(){this.pollInputElement()},N.componentWillUnmount=function(){clearTimeout(this.$pollInput)},N.pollInputElement=function(){var k=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){k.pollInputElement()}),100)},N.getDirectInputChanges=function(){var k=this.elementReferences[-1];k&&k.value!==this.state.query&&this.handleInputChange({target:{value:k.value}})},N.componentDidUpdate=function(k,y){var C=this.state.focused,_=C===null,M=y.focused!==C;M&&!_&&this.elementReferences[C].focus();var z=C===-1,H=M&&y.focused===null;if(z&&H){var F=this.elementReferences[C];F.setSelectionRange(0,F.value.length)}},N.hasAutoselect=function(){return!T()&&this.props.autoselect},N.templateInputValue=function(k){var y=this.props.templates&&this.props.templates.inputValue;return y?y(k):k},N.templateSuggestion=function(k){var y=this.props.templates&&this.props.templates.suggestion;return y?y(k):k},N.handleComponentBlur=function(k){var y,C=this.state,_=C.options,M=C.query,z=C.selected;this.props.confirmOnBlur?(y=k.query||M,this.props.onConfirm(_[z])):y=M,this.setState({focused:null,menuOpen:k.menuOpen||!1,query:y,selected:null,validChoiceMade:this.isQueryAnOption(y,_)})},N.handleListMouseLeave=function(k){this.setState({hovered:null})},N.handleOptionBlur=function(k,y){var C=this.state,_=C.focused,M=C.menuOpen,z=C.options,H=C.selected,F=k.relatedTarget===null,E=k.relatedTarget===this.elementReferences[-1],$=_!==y&&_!==-1;if(!$&&F||!($||E)){var J=M&&T();this.handleComponentBlur({menuOpen:J,query:this.templateInputValue(z[H])})}},N.handleInputBlur=function(k){var y=this.state,C=y.focused,_=y.menuOpen,M=y.options,z=y.query,H=y.selected;if(C===-1){var F=_&&T(),E=T()?z:this.templateInputValue(M[H]);this.handleComponentBlur({menuOpen:F,query:E})}},N.handleInputChange=function(k){var y=this,C=this.props,_=C.minLength,M=C.source,z=C.showAllValues,H=this.hasAutoselect(),F=k.target.value,E=F.length===0,$=this.state.query!==F,J=F.length>=_;this.setState({query:F,ariaHint:E}),z||!E&&$&&J?M(F,(function(re){var ee=re.length>0;y.setState({menuOpen:ee,options:re,selected:H&&ee?0:-1,validChoiceMade:!1})})):!E&&J||this.setState({menuOpen:!1,options:[]})},N.handleInputClick=function(k){this.handleInputChange(k)},N.handleInputFocus=function(k){var y=this.state,C=y.query,_=y.validChoiceMade,M=y.options,z=this.props.minLength,H=!_&&C.length>=z&&M.length>0;H?this.setState((function(F){var E=F.menuOpen;return{focused:-1,menuOpen:H||E,selected:-1}})):this.setState({focused:-1})},N.handleOptionFocus=function(k){this.setState({focused:k,hovered:null,selected:k})},N.handleOptionMouseEnter=function(k,y){T()||this.setState({hovered:y})},N.handleOptionClick=function(k,y){var C=this.state.options[y],_=this.templateInputValue(C);this.props.onConfirm(C),this.setState({focused:-1,hovered:null,menuOpen:!1,query:_,selected:-1,validChoiceMade:!0}),this.forceUpdate()},N.handleOptionMouseDown=function(k){k.preventDefault()},N.handleUpArrow=function(k){k.preventDefault();var y=this.state,C=y.menuOpen,_=y.selected;_!==-1&&C&&this.handleOptionFocus(_-1)},N.handleDownArrow=function(k){var y=this;if(k.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)k.preventDefault(),this.props.source("",(function(H){y.setState({menuOpen:!0,options:H,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var C=this.state,_=C.menuOpen,M=C.options,z=C.selected;z!==M.length-1&&_&&this.handleOptionFocus(z+1)}},N.handleSpace=function(k){var y=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(k.preventDefault(),this.props.source("",(function(C){y.setState({menuOpen:!0,options:C})}))),this.state.focused!==-1&&(k.preventDefault(),this.handleOptionClick(k,this.state.focused))},N.handleEnter=function(k){this.state.menuOpen&&(k.preventDefault(),this.state.selected>=0&&this.handleOptionClick(k,this.state.selected))},N.handlePrintableKey=function(k){var y=this.elementReferences[-1];k.target===y||y.focus()},N.handleKeyDown=function(k){switch(m[k.keyCode]){case"up":this.handleUpArrow(k);break;case"down":this.handleDownArrow(k);break;case"space":this.handleSpace(k);break;case"enter":this.handleEnter(k);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((y=k.keyCode)>47&&y<58||y===32||y===8||y>64&&y<91||y>95&&y<112||y>185&&y<193||y>218&&y<223)&&this.handlePrintableKey(k)}var y},N.render=function(){var k,y=this,C=this.props,_=C.cssNamespace,M=C.displayMenu,z=C.id,H=C.minLength,F=C.name,E=C.placeholder,$=C.required,J=C.showAllValues,re=C.tNoResults,ee=C.tStatusQueryTooShort,fe=C.tStatusNoResults,Q=C.tStatusSelectedOption,ue=C.tStatusResults,se=C.tAssistiveHint,ye=C.dropdownArrow,ce=C.menuAttributes,Z=C.inputClasses,ve=C.hintClasses,Ne=C.menuClasses,be=this.state,Ce=be.focused,Re=be.hovered,ze=be.menuOpen,P=be.options,b=be.query,W=be.selected,Y=be.ariaHint,A=be.validChoiceMade,I=this.hasAutoselect(),te=Ce===-1,ie=P.length===0,_e=b.length!==0,de=b.length>=H,me=this.props.showNoOptionsFound&&te&&ie&&_e&&de,Me=_+"__wrapper",Ae=_+"__status",$e=_+"__dropdown-arrow-down",Ie=Ce!==-1&&Ce!==null,Ge=_+"__option",Qe=_+"__hint",ge=this.templateInputValue(P[W]),we=ge&&ge.toLowerCase().indexOf(b.toLowerCase())===0&&I?b+ge.substr(b.length):"",Ze=z+"__assistiveHint",tt={"aria-describedby":Y?Ze:null,"aria-expanded":ze?"true":"false","aria-activedescendant":Ie?z+"__option--"+Ce:null,"aria-controls":z+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};J&&typeof(k=ye({className:$e}))=="string"&&(k=(0,s.createElement)("div",{className:_+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:k}}));var ht=_+"__input",vt=[ht,this.props.showAllValues?ht+"--show-all-values":ht+"--default"];Ce!==null&&vt.push(ht+"--focused"),Z&&vt.push(Z);var pt=_+"__menu",lt=[pt,pt+"--"+M,pt+"--"+(ze||me?"visible":"hidden")];Ne&<.push(Ne),(ce!=null&&ce.class||ce!=null&&ce.className)&<.push((ce==null?void 0:ce.class)||(ce==null?void 0:ce.className));var bt=Object.assign({"aria-labelledby":z},ce,{id:z+"__listbox",role:"listbox",className:lt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete bt.class,(0,s.createElement)("div",{className:Me,onKeyDown:this.handleKeyDown},(0,s.createElement)(a,{id:z,length:P.length,queryLength:b.length,minQueryLength:H,selectedOption:this.templateInputValue(P[W]),selectedOptionIndex:W,validChoiceMade:A,isInFocus:this.state.focused!==null,tQueryTooShort:ee,tNoResults:fe,tSelectedOption:Q,tResults:ue,className:Ae}),we&&(0,s.createElement)("span",null,(0,s.createElement)("input",{className:[Qe,ve===null?Z:ve].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:we})),(0,s.createElement)("input",c({},tt,{autoComplete:"off",className:vt.join(" "),id:z,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:F,placeholder:E,ref:function(_t){y.elementReferences[-1]=_t},type:"text",role:"combobox",required:$,value:b})),k,(0,s.createElement)("ul",bt,P.map((function(_t,Ue){var gt=(Ce===-1?W===Ue:Ce===Ue)&&Re===null?" "+Ge+"--focused":"",ft=Ue%2?" "+Ge+"--odd":"",ut=T()?"<span id="+z+"__option-suffix--"+Ue+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(Ue+1)+" of "+P.length+"</span>":"";return(0,s.createElement)("li",{"aria-selected":Ce===Ue?"true":"false",className:""+Ge+gt+ft,dangerouslySetInnerHTML:{__html:y.templateSuggestion(_t)+ut},id:z+"__option--"+Ue,key:Ue,onBlur:function(it){return y.handleOptionBlur(it,Ue)},onClick:function(it){return y.handleOptionClick(it,Ue)},onMouseDown:y.handleOptionMouseDown,onMouseEnter:function(it){return y.handleOptionMouseEnter(it,Ue)},ref:function(it){y.elementReferences[Ue]=it},role:"option",tabIndex:"-1","aria-posinset":Ue+1,"aria-setsize":P.length})})),me&&(0,s.createElement)("li",{className:Ge+" "+Ge+"--no-results",role:"option","aria-disabled":"true"},re())),(0,s.createElement)("span",{id:Ze,style:{display:"none"}},se()))},R})(s.Component);v.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:o,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),X})()}))})(ya)),ya.exports}var rr,_n;function Tc(){return _n||(_n=1,rr=jc()),rr}var Cc=Tc();const Nc=ol(Cc),Pc=({value:f,defaultValue:i="",onConfirm:g,source:l,disabled:V,onClear:B,tClearInput:X=()=>"Clear input",...s})=>{const x=q.useRef(null),a=p=>{setTimeout(()=>{x.current&&(x.current.elementReferences[-1].value=p)},0)};q.useEffect(()=>{f!==void 0&&a(f)},[f]),q.useEffect(()=>{V?x.current&&(x.current.elementReferences[-1].disabled=!0):x.current&&(x.current.elementReferences[-1].disabled=!1)},[V]);const o=()=>{B&&B()},c=(p,m)=>{x.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&l(p,m)},d=p=>{p?g(p):a(f)};return h.jsxs("div",{style:{position:"relative",width:"100%"},children:[h.jsx(Nc,{ref:x,...s,defaultValue:i,onConfirm:d,source:c}),!!(f&&f.length>0&&!V)&&h.jsx("button",{onClick:o,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":X(),children:h.jsx(le.Icon,{icon:"it-close",size:"sm",title:X()})})]})},Ec="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Ac="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",Rc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Ic=({position:f,areasLayer:i,bounds:g,onMarkedMoved:l})=>{const V=q.useRef(null);let B=null;const[X,s]=q.useState([]),x=Rt.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),a=[41.9,12.5],o=()=>{const c=Rt.map(V.current,{keyboard:!1,minZoom:6,maxZoom:17}).setView(a,10);x.addTo(c),i&&i.map(p=>{p.addTo(c)});const d=f?[`${f.lat}`,`${f.lon}`]:g?g.getCenter():a;if(delete Rt.Icon.Default.prototype._getIconUrl,Rt.Icon.Default.mergeOptions({iconRetinaUrl:Ec,iconUrl:Ac,shadowUrl:Rc}),B=Rt.marker(d,{draggable:!0}).addTo(c),B.on("moveend",function(p){const m=p.target.getLatLng();l(m,B)}),!f&&g)c.fitBounds(g);else{const p=f?[f.lat,f.lon]:a;B&&(B.setLatLng(p).update(),c.setView(p,15))}};return q.useEffect(()=>{V.current&&o()},[V]),h.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:h.jsx("div",{ref:V,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},Fc=({component:f,value:i,current:g,onChange:l,i18next:V})=>{const[B,X]=q.useState(null),[s,x]=q.useState([]),[a,o]=q.useState(),[c,d]=q.useState(),[p,m]=q.useState(!1),[T,v]=q.useState(),[D,O]=q.useState(!1),[j,R]=q.useState(),[N,k]=q.useState(),[y,C]=q.useState(!1),[_,M]=q.useState(""),[z,H]=q.useState(""),[F,E]=q.useState(!1),[$,J]=q.useState(!1),ee=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:fe}=window.OC_SERVICE_DETAILS,Q=q.useRef(),ue=V.language;let se=Rt.latLngBounds();const ye=ee||(fe&&fe.length>0?fe:void 0),ce=(P,b)=>{Q.current=P;const W=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(P)}&countrycodes=it&viewbox=${a}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${ue}`;let Y=[],A=[];O(!0),fetch(W).then(I=>I.json()).then(I=>{if(I.length&&Q.current===P){O(!0);const te=I.map((ie,_e)=>{const{lat:de,lon:me}=ie,Me=`${Fe()}/api/geographic-areas/contains?lat=${de}&lon=${me}&geographic_areas_ids=${T.join(",")}`;return fetch(Me).then(Ae=>Ae.json()).then(Ae=>Ae.result?(ie.label=Za(ie),ie):null)});return Promise.all(te)}else Q.current===P&&(b([]),O(!1))}).then(I=>{I=I?I.filter(te=>te!==null):[],I.length>0?(I.forEach((te,ie)=>{I[ie].label=Za(te)}),I=en.uniqWith(I,(te,ie)=>te.label===ie.label),I.forEach((te,ie)=>{A.push(te.label),Y.push(te)}),Q.current===P&&(b(A),x(Y),O(!1))):Q.current===P&&(b([]),O(!1))}).catch(I=>{console.error("Error fetching locations:",I),O(!1)})},Z=(P,b)=>{ce(P,b)},ve=(P,b)=>{const{lat:W,lng:Y}=P,A=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${W}&lon=${Y}&accept-language=${ue}`;fetch(A).then(I=>I.json()).then(I=>{if(I&&I.display_name)if(I.label=Za(I),I.lat=W,I.lon=Y,b)b.bindPopup(`${I.label}`).openPopup(),k(I);else{k(I);return}}).catch(I=>console.error("Error with reverse geocoding:",I))};function Ne(){navigator.geolocation.getCurrentPosition(P=>{let b=P.coords.latitude,W=P.coords.longitude;if((T||[]).length>0){const A=`${Fe()}/api/geographic-areas/contains?lat=${b}&lon=${W}&geographic_areas_ids=${T.join(",")}`;fetch(A).then(I=>I.json()).then(I=>{I.result&&(X({lat:b,lon:W}),ve({lat:b,lng:W})),J(!$)})}else X({lat:b,lon:W}),ve({lat:b,lng:W}),J(!$)},P=>{(P==null?void 0:P.code)===1?(E(!F),H(V.t("error_message_code_1"))):(P==null?void 0:P.code)===2?(E(!F),H(V.t("error_message_code_2"))):(P==null?void 0:P.code)===3?(E(!F),H(V.t("error_message_code_3"))):(E(!F),H(V.t("error_message_generic")))})}q.useEffect(()=>{i&&X(i),g.valuePosition&&X(g.valuePosition)},[i,g]);const be=()=>{i&&X(i),g.valuePosition&&X(g.valuePosition)};q.useEffect(()=>{var P;(P=window==null?void 0:window.Formio)==null||P.formioReady.then(()=>{setTimeout(()=>{be(),Ce()},1)})},[]);const Ce=()=>{let b=`${Fe()}/api/geographic-areas`,W=[],Y=[];fetch(b).then(A=>A.json()).then(A=>{if(Array.isArray(A)&&A.length>0){A.filter(ie=>ye?Array.isArray(ye)?ye.includes(ie.id):ie.id===ye:!0).forEach(ie=>{W.push(ie.id);const _e=JSON.parse(ie.geofence),de=Rt.geoJSON(_e,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(me){return me.geometry.type==="Polygon"||me.geometry.type==="MultiPolygon"}});se.extend(de.getBounds()),Y.push(de)}),d(Y),v(W),R(se);const I=se.getNorthEast(),te=se.getSouthWest();o([I.lng,I.lat,te.lng,te.lat])}else console.log("No geographic_areas_ids found.")}).catch(A=>{console.error("Error with reverse geocoding:",A)})},Re=()=>{M(B!=null&&B.label?B.label:"")};q.useEffect(()=>{Re(),l(B)},[B]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&y===!1?C(!0):C(!1)},[]);const ze=()=>{if(N){const P=`${Fe()}/api/geographic-areas/contains?lat=${N.lat}&lon=${N.lon}&geographic_areas_ids=${T.join(",")}`;m(!0),fetch(P).then(b=>b.json()).then(b=>{m(!1),b?b.result===!1?Je.fire({title:"",html:"<p>"+V.t("Attenzione: Il luogo selezionato si trova al di fuori dell’area coperta dal servizio. Per favore, scegli un luogo all'interno dell'area evidenziata nella mappa.")+"</p>",icon:"error",cancelButtonText:V.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):b.result===!0&&(J(!$),X(N)):(m(!1),console.log("No geographic-areas/contains ."))}).catch(b=>{console.error("Error with geographic-areas/contains:",b),Je.fire({title:"",html:"<p>"+b+"</p>",icon:"error",cancelButtonText:V.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return h.jsx("div",{children:h.jsxs("div",{id:`address-map-container-${f.key}`,className:"address-map-container",children:[h.jsx("div",{children:h.jsxs(le.Modal,{wrapClassName:"formio-component-address_map",isOpen:$,size:"lg",scrollable:!0,toggle:()=>J(!$),labelledBy:"esempio2",container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>J(!$),id:"esempio2",children:V.t("Individua il luogo sulla mappa")}),h.jsxs(le.ModalBody,{children:[h.jsx("p",{children:h.jsx("small",{children:V.t("Trascina l’icona nel punto preciso in cui si verifica l’evento che vuoi segnalare e fai click su Salva indirizzo")})}),h.jsx(Ic,{position:B,areasLayer:c,bounds:j,onMarkedMoved:(P,b)=>{ve(P,b)}})]}),h.jsxs(le.ModalFooter,{children:[h.jsx(le.Button,{color:"secondary",onClick:()=>J(!$),children:V.t("Chiudi")}),h.jsx(le.Button,{color:"primary",onClick:()=>{ze()},disabled:!N||p,children:V.t("Salva indirizzo")})]})]})}),h.jsx("div",{children:h.jsxs(le.Modal,{isOpen:F,toggle:()=>E(!F),withIcon:!0,labelledBy:"error-modal-message",container:document.body,children:[h.jsx(le.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:V.t("warning")}),h.jsx(le.ModalBody,{children:h.jsx("p",{children:z})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>E(!F),children:V.t("close")})})]})}),h.jsxs("div",{className:"position-relative",children:[h.jsx(Pc,{id:`${f.id}-${f.key}`,inputClasses:"form-control",source:en.debounce(Z,520),onConfirm:P=>{if(O(!1),Q.current="",P){P===""&&X(null);let b=s.find(W=>W.label===P);X(b)}},onClear:()=>{O(!1),Q.current="",X(null)},dropdownArrow:()=>null,minLength:3,disabled:y,confirmOnBlur:!0,showNoOptionsFound:!D,defaultValue:B==null?void 0:B.label,value:_,tNoResults:()=>V.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>V.t("Clear input")}),D&&h.jsx("div",{className:"position-absolute",style:{width:"100%",bottom:"0px"},children:h.jsx(le.Progress,{indeterminate:!0,label:"In elaborazione..."})})]}),!y&&h.jsxs(le.Button,{type:"button",value:V.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Ne():(J(!0),k(!1))},icon:!0,className:"px-0 primary-color",children:[h.jsx(le.Icon,{color:"primary",icon:"it-map-marker-circle",role:"presentation"}),h.jsx("span",{children:V.t("Individua con precisione sulla mappa")})]})]})})},ja=class ja extends ot.ReactComponent{constructor(i,g,l){super(i,g,l)}static get builderInfo(){return{title:"Address Map",group:"basic",icon:"fa fa-map-location-dot",documentation:"",weight:70,schema:ja.schema()}}static schema(){return ot.ReactComponent.schema({type:"address_map"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Fc,{ref:g,component:this.component,value:this.dataValue,onChange:l=>this.setValue(l),...this,current:this},this.dataValue))}setValue(i){this.valuePosition=i,this.updateValue(i)}getValue(){return this.valuePosition}init(){super.init()}render(){return super.render(`<div id="react-${this.id} ref="react-${this.id}"></div>`)}};Ct(ja,"editForm",Yc);let xa=ja;const zc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function Lc(...f){return ot.Components.baseEditForm([{key:"display",components:zc}],...f)}const wn=cr.Formio.Components.components.input,Wc=({component:f,current:i,onChange:g,i18next:l})=>{var H,F;const V="list-services",B="selected-category",[X,s]=q.useState([]),[x,a]=q.useState([]),[o,c]=q.useState(null),[d,p]=q.useState(null),[m,T]=q.useState(""),[v,D]=q.useState(!1),[O,j]=q.useState(!1),R=q.useRef(!1),N=q.useRef(),k=q.useMemo(()=>{if(!o)return null;const E=x.find(J=>J.name===o);return E||X.find(J=>J.name===o)||null},[o,x,X]),y=q.useMemo(()=>(k==null?void 0:k.services)||[],[k]),C=async()=>{var Q,ue;j(!0);const E=sessionStorage.getItem(V),$=sessionStorage.getItem(B);if(E)try{const se=JSON.parse(E);if(Array.isArray(se)&&se.length>0){s(se),a(se);const ye=se.find(ce=>ce.name===$)||se[0];return c((ye==null?void 0:ye.name)||null),j(!1),se}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const J=await window.FormioHelper.getBookingConfig(),re={};J.forEach(se=>{(se.categories??[]).forEach(ye=>{re[ye]||(re[ye]={name:ye,services:[]}),re[ye].services.push(se)})});const ee=Object.fromEntries(Object.entries(re).sort(([se],[ye])=>se.localeCompare(ye,"it",{sensitivity:"base"}))),fe=Object.values(ee).filter(se=>(se.name??"").trim()!=="");return s(fe),a(fe),c(((Q=fe[0])==null?void 0:Q.name)||null),sessionStorage.setItem(V,JSON.stringify(fe)),sessionStorage.setItem(B,((ue=fe[0])==null?void 0:ue.name)||""),j(!1),fe};q.useEffect(()=>{o&&sessionStorage.setItem(B,o)},[o]),q.useEffect(()=>{R.current||(R.current=!0,C())},[]);const _=E=>{var Z;const $=(ve="")=>ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),J=(ve="")=>ve.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),re=(ve="")=>ve.replace(/<[^>]*>/g," "),ee=(ve,Ne)=>new RegExp(`\\b${$(Ne)}`,"i").test(ve),fe=(ve,Ne)=>{const be=J(ve.name),Ce=J((ve.categories??[]).join(" ")),Re=J(re(ve.abstract??""));if(!Ne.every(b=>ee(be,b)||ee(Ce,b)||ee(Re,b)))return-1;let P=0;for(const b of Ne)ee(be,b)?P+=3:ee(Ce,b)?P+=2:ee(Re,b)&&(P+=1);return P},Q=E.target.value;T(Q);const ue=J(Q);if(!ue){a(X),c(ve=>{var Ne;return ve??((Ne=X[0])==null?void 0:Ne.name)??null});return}const se=ue.split(" ").filter(Boolean),ye=X.map(ve=>{const Ne=ve.services.map(be=>({service:be,score:fe(be,se)})).filter(be=>be.score>=0).sort((be,Ce)=>Ce.score-be.score).map(be=>be.service);return Ne.length?{...ve,services:Ne}:null}).filter(Boolean);a(ye);const ce=ye.some(ve=>ve.name===o);c(ce?o:((Z=ye[0])==null?void 0:Z.name)??null)},M=E=>{p(E);const $=X.find(J=>J.services.some(re=>re.id===E.id));$&&c($.name),g({id:E.id,link:E.link,name:E.name,show_howto_in_motivation:E.show_howto_in_motivation,categories:E.categories,offices:E.offices,abstract:E.abstract,view_type:E.view_type}),i.data.user_group=null,Tn()},z=E=>{c(E.name),p(null),T(""),a(X),g({})};return q.useEffect(()=>{const E=!!document.querySelector(".formio-read-only");D(E)},[]),q.useEffect(()=>{const E=setTimeout(()=>{const $=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if($!=null&&$.id&&(p($),X.length>0)){const J=X.find(re=>re.services.some(ee=>ee.id===$.id));J&&c(J.name)}},500);return()=>clearTimeout(E)},[i==null?void 0:i.dataValue,i==null?void 0:i.data,X]),q.useEffect(()=>{const E=window.FormioInstance;if(!E)return;const $=()=>{var re,ee,fe;const J=(fe=(re=E.submission)==null?void 0:re.data)==null?void 0:fe[(ee=i==null?void 0:i.component)==null?void 0:ee.key];if(J!=null&&J.id&&(p(J),X.length>0)){const Q=X.find(ue=>ue.services.some(se=>se.id===J.id));Q&&c(Q.name)}};return E.on("change",$),()=>E.off("change",$)},[X,(H=i==null?void 0:i.component)==null?void 0:H.key]),O?h.jsx("div",{className:"services-booking",ref:N,children:h.jsxs("div",{children:[l.t("Caricamento in corso"),"..."]})}):h.jsx("div",{className:"services-booking",ref:N,children:X&&!v?h.jsxs(le.Container,{children:[h.jsx(le.Row,{className:"mb-3",children:h.jsx(le.Col,{children:h.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:l.t("Seleziona il servizio per cui stai richiedendo un appuntamento")})})}),h.jsx(le.Row,{className:"mb-3",children:h.jsx(le.Col,{children:h.jsx("div",{className:"search-container",children:h.jsx(le.Input,{id:"search",label:l.t("Cerca"),type:"text",value:m,onChange:_,onInput:_,infoText:l.t("Cerca per categoria, servizio o descrizione")})})})}),h.jsxs(le.Row,{className:"mb-3",children:[k?h.jsx(le.Col,{lg:3,md:4,className:"mb-4 mb-lg-0",children:h.jsxs("div",{className:"categories-list",children:[h.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:l.t("Categorie")}),x.length>0&&x.map(E=>{const $=o===E.name;return h.jsxs("button",{onClick:()=>z(E),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${$?"category-active bg-primary text-white":"bg-light text-dark"}`,children:[h.jsx("span",{className:"fw-500 d-block",children:E.name}),h.jsxs("small",{className:`d-block mt-1 ${$?"text-white":"text-muted"}`,children:[E.services.length," ",E.services.length>1?l.t("servizi"):l.t("servizio")]})]},E.name)})]})}):null,h.jsx(le.Col,{lg:k?9:12,md:k?8:12,children:h.jsxs("div",{className:"services-container",children:[y.length>0?h.jsxs("div",{className:"services-header mb-4",children:[h.jsx("h3",{className:"h5 fw-bold text-primary mb-0",children:k==null?void 0:k.name}),h.jsx("div",{className:"border-bottom border-primary mt-3 mb-4"})]}):null,y.length>0?h.jsx("div",{className:"services-list",children:y.map(E=>{const $=(d==null?void 0:d.id)===E.id,J=xn.sanitize(E==null?void 0:E.abstract);return h.jsx("button",{onClick:()=>M(E),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${$?"border-primary border-2 bg-light":"border-light border-1 bg-white"}`,style:{cursor:"pointer"},tabindex:"0",role:"button","aria-label":`${E.name}`,"aria-pressed":$,children:h.jsx("div",{className:"d-flex justify-content-between align-items-start",children:h.jsxs("div",{className:"flex-grow-1",children:[h.jsx("h5",{className:"h6 fw-bold mb-2 text-dark",children:E.name}),(E==null?void 0:E.abstract)&&h.jsx("p",{className:"text-muted small mb-0",dangerouslySetInnerHTML:{__html:J}})]})})},E.id)})}):h.jsx("div",{className:"alert alert-info text-italic",children:l.t("Il servizio che stai cercando non è disponibile per la prenotazione appuntamento")})]})})]})]}):v?h.jsx("fieldset",{className:"it-page-section",children:h.jsx("div",{className:"cmp-card mt-2",children:h.jsxs("div",{className:"card has-bkg-grey shadow-sm p-big",children:[h.jsx("div",{className:"card-header border-0 p-0 mb-lg-30",children:h.jsx("div",{className:"d-flex",children:h.jsx("h2",{className:"title-xxlarge mb-1",children:k==null?void 0:k.name})})}),h.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:(F=i==null?void 0:i.dataValue)!=null&&F.id?h.jsx("div",{className:"services-list",children:h.jsx("div",{className:"service-card p-4 rounded border transition border-light border-1 bg-white",children:h.jsx("div",{className:"d-flex justify-content-between align-items-start",children:h.jsx("div",{className:"flex-grow-1",children:h.jsx("p",{className:"mb-2 text-dark text-paragraph",children:i.dataValue.name})})})},i.dataValue.id)}):null})]})})}):null})},Ta=class Ta extends wn{constructor(i,g,l){super(i,g,l)}static get builderInfo(){return{title:"Lista Servizi",group:"basic",icon:"bi bi-list",documentation:"",weight:70,schema:Ta.schema()}}static schema(){return wn.schema({type:"list-services"})}attach(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Wc,{ref:g,component:this.component,onChange:l=>this.setValue(l),...this,current:this}))}setValue(i){i&&(this.shouldSetValue=!0,this.updateValue(i))}getValue(){return this.dataValue}init(){super.init()}render(){return super.render()}};Ct(Ta,"editForm",Lc);let Sa=Ta;const ur={pagebreak:ba,dynamic_calendar:On,calendar:_a,"calendar-advanced":wa,sdcfile:Ma,address_map:xa,"list-services":Sa};function Vc(f){if(!f||typeof f.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(ur).forEach(([i,g])=>{f.addComponent(i,g)}),ur}exports.Calendar=_a;exports.CalendarAdvanced=wa;exports.FormioAddressMap=xa;exports.FormioDynamicCalendar=On;exports.FormioListServices=Sa;exports.FormioPageBreak=ba;exports.SdcFile=Ma;exports.formioCustomComponents=ur;exports.registerFormioComponents=Vc;
|
|
104
|
+
}`,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"fileKey",label:"File form-data key",weight:17,placeholder:"Enter the key name of a file for form data.",tooltip:"Key name that you would like to modify for the file while calling API request.",conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"dir",label:"Directory",placeholder:"(optional) Enter a directory for the files",tooltip:"This will place all the files uploaded in this field in the directory",weight:20,conditional:{json:{"!==":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"dir",label:"Folder ID",placeholder:"(optional) Enter an ID of the folder for the files",tooltip:"This will place all the files uploaded in this field in the folder",weight:20,conditional:{json:{"===":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"fileNameTemplate",label:"File Name Template",placeholder:'(optional) { {name} }-{ {guid} }"',tooltip:"Specify template for name of uploaded file(s). Regular template variables are available (`data`, `component`, `user`, `value`, `moment` etc.), also `fileName`, `guid` variables are available. `guid` part must be present, if not found in template, will be added at the end.",weight:25},{type:"checkbox",input:!0,key:"image",label:"Display as image(s)",tooltip:"Instead of a list of linked files, images will be rendered in the view.",weight:30},{type:"checkbox",input:!0,key:"uploadOnly",label:"Upload Only",tooltip:"When this is checked, will only allow you to upload file(s) and consequently the download, in this component, will be unavailable.",weight:33},{type:"checkbox",input:!0,key:"privateDownload",label:"Private Download",tooltip:"When this is checked, the file download will send a POST request to the download URL with the x-jwt-token header. This will allow your endpoint to create a Private download system.",weight:31,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"imageSize",label:"Image Size",placeholder:"100",tooltip:"The image size for previewing images.",weight:40,conditional:{json:{"==":[{var:"data.image"},!0]}}},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40},{type:"checkbox",input:!0,key:"webcam",label:"Enable web camera",tooltip:"This will allow using an attached camera to directly take a picture instead of uploading an existing file.",weight:32},{type:"textfield",input:!0,key:"webcamSize",label:"Webcam Width",placeholder:"320",tooltip:"The webcam size for taking pictures.",weight:38,conditional:{json:{"==":[{var:"data.webcam"},!0]}}},{type:"datagrid",input:!0,label:"File Types",key:"fileTypes",tooltip:"Specify file types to classify the uploads. This is useful if you allow multiple types of uploads but want to allow the user to specify which type of file each is.",weight:11,components:[{label:"Label",key:"label",input:!0,type:"textfield"},{label:"Value",key:"value",input:!0,type:"textfield"}]},{type:"textfield",input:!0,key:"filePattern",label:"File Pattern",placeholder:".jpg,video/*,application/pdf",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file patterns.",weight:50},{type:"textfield",input:!0,key:"fileMinSize",label:"File Minimum Size",placeholder:"1MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:60},{type:"textfield",input:!0,key:"fileMaxSize",label:"File Maximum Size",placeholder:"10MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:70},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40}],Bh=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function Uh(...l){return ot.Components.baseEditForm([{key:"display",components:Hh},{key:"data",components:qh},{label:"File",key:"file",weight:5,components:$h},{key:"validation",components:Bh}],...l)}var oa,Ni;function kn(){if(Ni)return oa;Ni=1;var l=Array.isArray;return oa=l,oa}var la,Ri;function Gh(){if(Ri)return la;Ri=1;var l=typeof pr=="object"&&pr&&pr.Object===Object&≺return la=l,la}var ua,Ei;function On(){if(Ei)return ua;Ei=1;var l=Gh(),n=typeof self=="object"&&self&&self.Object===Object&&self,u=l||n||Function("return this")();return ua=u,ua}var ca,Ai;function Yn(){if(Ai)return ca;Ai=1;var l=On(),n=l.Symbol;return ca=n,ca}var da,Ii;function Jh(){if(Ii)return da;Ii=1;var l=Yn(),n=Object.prototype,u=n.hasOwnProperty,s=n.toString,x=l?l.toStringTag:void 0;function D(F){var o=u.call(F,x),y=F[x];try{F[x]=void 0;var r=!0}catch{}var c=s.call(F);return r&&(o?F[x]=y:delete F[x]),c}return da=D,da}var ha,Fi;function Kh(){if(Fi)return ha;Fi=1;var l=Object.prototype,n=l.toString;function u(s){return n.call(s)}return ha=u,ha}var fa,zi;function Zs(){if(zi)return fa;zi=1;var l=Yn(),n=Jh(),u=Kh(),s="[object Null]",x="[object Undefined]",D=l?l.toStringTag:void 0;function F(o){return o==null?o===void 0?x:s:D&&D in Object(o)?n(o):u(o)}return fa=F,fa}var ma,Vi;function Xh(){if(Vi)return ma;Vi=1;function l(n){return n!=null&&typeof n=="object"}return ma=l,ma}var pa,Li;function jn(){if(Li)return pa;Li=1;var l=Zs(),n=Xh(),u="[object Symbol]";function s(x){return typeof x=="symbol"||n(x)&&l(x)==u}return pa=s,pa}var ga,Wi;function Zh(){if(Wi)return ga;Wi=1;var l=kn(),n=jn(),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;function x(D,F){if(l(D))return!1;var o=typeof D;return o=="number"||o=="symbol"||o=="boolean"||D==null||n(D)?!0:s.test(D)||!u.test(D)||F!=null&&D in Object(F)}return ga=x,ga}var ya,qi;function Cn(){if(qi)return ya;qi=1;function l(n){var u=typeof n;return n!=null&&(u=="object"||u=="function")}return ya=l,ya}var va,Hi;function Qh(){if(Hi)return va;Hi=1;var l=Zs(),n=Cn(),u="[object AsyncFunction]",s="[object Function]",x="[object GeneratorFunction]",D="[object Proxy]";function F(o){if(!n(o))return!1;var y=l(o);return y==s||y==x||y==u||y==D}return va=F,va}var _a,$i;function ef(){if($i)return _a;$i=1;var l=On(),n=l["__core-js_shared__"];return _a=n,_a}var ba,Bi;function tf(){if(Bi)return ba;Bi=1;var l=ef(),n=(function(){var s=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})();function u(s){return!!n&&n in s}return ba=u,ba}var wa,Ui;function rf(){if(Ui)return wa;Ui=1;var l=Function.prototype,n=l.toString;function u(s){if(s!=null){try{return n.call(s)}catch{}try{return s+""}catch{}}return""}return wa=u,wa}var Sa,Gi;function af(){if(Gi)return Sa;Gi=1;var l=Qh(),n=tf(),u=Cn(),s=rf(),x=/[\\^$.*+?()[\]{}|]/g,D=/^\[object .+?Constructor\]$/,F=Function.prototype,o=Object.prototype,y=F.toString,r=o.hasOwnProperty,c=RegExp("^"+y.call(r).replace(x,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(f){if(!u(f)||n(f))return!1;var g=l(f)?c:D;return g.test(s(f))}return Sa=h,Sa}var Ma,Ji;function nf(){if(Ji)return Ma;Ji=1;function l(n,u){return n==null?void 0:n[u]}return Ma=l,Ma}var xa,Ki;function Tn(){if(Ki)return xa;Ki=1;var l=af(),n=nf();function u(s,x){var D=n(s,x);return l(D)?D:void 0}return xa=u,xa}var Da,Xi;function Nr(){if(Xi)return Da;Xi=1;var l=Tn(),n=l(Object,"create");return Da=n,Da}var ka,Zi;function sf(){if(Zi)return ka;Zi=1;var l=Nr();function n(){this.__data__=l?l(null):{},this.size=0}return ka=n,ka}var Oa,Qi;function of(){if(Qi)return Oa;Qi=1;function l(n){var u=this.has(n)&&delete this.__data__[n];return this.size-=u?1:0,u}return Oa=l,Oa}var Ya,es;function lf(){if(es)return Ya;es=1;var l=Nr(),n="__lodash_hash_undefined__",u=Object.prototype,s=u.hasOwnProperty;function x(D){var F=this.__data__;if(l){var o=F[D];return o===n?void 0:o}return s.call(F,D)?F[D]:void 0}return Ya=x,Ya}var ja,ts;function uf(){if(ts)return ja;ts=1;var l=Nr(),n=Object.prototype,u=n.hasOwnProperty;function s(x){var D=this.__data__;return l?D[x]!==void 0:u.call(D,x)}return ja=s,ja}var Ca,rs;function cf(){if(rs)return Ca;rs=1;var l=Nr(),n="__lodash_hash_undefined__";function u(s,x){var D=this.__data__;return this.size+=this.has(s)?0:1,D[s]=l&&x===void 0?n:x,this}return Ca=u,Ca}var Ta,as;function df(){if(as)return Ta;as=1;var l=sf(),n=of(),u=lf(),s=uf(),x=cf();function D(F){var o=-1,y=F==null?0:F.length;for(this.clear();++o<y;){var r=F[o];this.set(r[0],r[1])}}return D.prototype.clear=l,D.prototype.delete=n,D.prototype.get=u,D.prototype.has=s,D.prototype.set=x,Ta=D,Ta}var Pa,ns;function hf(){if(ns)return Pa;ns=1;function l(){this.__data__=[],this.size=0}return Pa=l,Pa}var Na,is;function Qs(){if(is)return Na;is=1;function l(n,u){return n===u||n!==n&&u!==u}return Na=l,Na}var Ra,ss;function Rr(){if(ss)return Ra;ss=1;var l=Qs();function n(u,s){for(var x=u.length;x--;)if(l(u[x][0],s))return x;return-1}return Ra=n,Ra}var Ea,os;function ff(){if(os)return Ea;os=1;var l=Rr(),n=Array.prototype,u=n.splice;function s(x){var D=this.__data__,F=l(D,x);if(F<0)return!1;var o=D.length-1;return F==o?D.pop():u.call(D,F,1),--this.size,!0}return Ea=s,Ea}var Aa,ls;function mf(){if(ls)return Aa;ls=1;var l=Rr();function n(u){var s=this.__data__,x=l(s,u);return x<0?void 0:s[x][1]}return Aa=n,Aa}var Ia,us;function pf(){if(us)return Ia;us=1;var l=Rr();function n(u){return l(this.__data__,u)>-1}return Ia=n,Ia}var Fa,cs;function gf(){if(cs)return Fa;cs=1;var l=Rr();function n(u,s){var x=this.__data__,D=l(x,u);return D<0?(++this.size,x.push([u,s])):x[D][1]=s,this}return Fa=n,Fa}var za,ds;function yf(){if(ds)return za;ds=1;var l=hf(),n=ff(),u=mf(),s=pf(),x=gf();function D(F){var o=-1,y=F==null?0:F.length;for(this.clear();++o<y;){var r=F[o];this.set(r[0],r[1])}}return D.prototype.clear=l,D.prototype.delete=n,D.prototype.get=u,D.prototype.has=s,D.prototype.set=x,za=D,za}var Va,hs;function vf(){if(hs)return Va;hs=1;var l=Tn(),n=On(),u=l(n,"Map");return Va=u,Va}var La,fs;function _f(){if(fs)return La;fs=1;var l=df(),n=yf(),u=vf();function s(){this.size=0,this.__data__={hash:new l,map:new(u||n),string:new l}}return La=s,La}var Wa,ms;function bf(){if(ms)return Wa;ms=1;function l(n){var u=typeof n;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?n!=="__proto__":n===null}return Wa=l,Wa}var qa,ps;function Er(){if(ps)return qa;ps=1;var l=bf();function n(u,s){var x=u.__data__;return l(s)?x[typeof s=="string"?"string":"hash"]:x.map}return qa=n,qa}var Ha,gs;function wf(){if(gs)return Ha;gs=1;var l=Er();function n(u){var s=l(this,u).delete(u);return this.size-=s?1:0,s}return Ha=n,Ha}var $a,ys;function Sf(){if(ys)return $a;ys=1;var l=Er();function n(u){return l(this,u).get(u)}return $a=n,$a}var Ba,vs;function Mf(){if(vs)return Ba;vs=1;var l=Er();function n(u){return l(this,u).has(u)}return Ba=n,Ba}var Ua,_s;function xf(){if(_s)return Ua;_s=1;var l=Er();function n(u,s){var x=l(this,u),D=x.size;return x.set(u,s),this.size+=x.size==D?0:1,this}return Ua=n,Ua}var Ga,bs;function Df(){if(bs)return Ga;bs=1;var l=_f(),n=wf(),u=Sf(),s=Mf(),x=xf();function D(F){var o=-1,y=F==null?0:F.length;for(this.clear();++o<y;){var r=F[o];this.set(r[0],r[1])}}return D.prototype.clear=l,D.prototype.delete=n,D.prototype.get=u,D.prototype.has=s,D.prototype.set=x,Ga=D,Ga}var Ja,ws;function kf(){if(ws)return Ja;ws=1;var l=Df(),n="Expected a function";function u(s,x){if(typeof s!="function"||x!=null&&typeof x!="function")throw new TypeError(n);var D=function(){var F=arguments,o=x?x.apply(this,F):F[0],y=D.cache;if(y.has(o))return y.get(o);var r=s.apply(this,F);return D.cache=y.set(o,r)||y,r};return D.cache=new(u.Cache||l),D}return u.Cache=l,Ja=u,Ja}var Ka,Ss;function Of(){if(Ss)return Ka;Ss=1;var l=kf(),n=500;function u(s){var x=l(s,function(F){return D.size===n&&D.clear(),F}),D=x.cache;return x}return Ka=u,Ka}var Xa,Ms;function Yf(){if(Ms)return Xa;Ms=1;var l=Of(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,s=l(function(x){var D=[];return x.charCodeAt(0)===46&&D.push(""),x.replace(n,function(F,o,y,r){D.push(y?r.replace(u,"$1"):o||F)}),D});return Xa=s,Xa}var Za,xs;function jf(){if(xs)return Za;xs=1;function l(n,u){for(var s=-1,x=n==null?0:n.length,D=Array(x);++s<x;)D[s]=u(n[s],s,n);return D}return Za=l,Za}var Qa,Ds;function Cf(){if(Ds)return Qa;Ds=1;var l=Yn(),n=jf(),u=kn(),s=jn(),x=l?l.prototype:void 0,D=x?x.toString:void 0;function F(o){if(typeof o=="string")return o;if(u(o))return n(o,F)+"";if(s(o))return D?D.call(o):"";var y=o+"";return y=="0"&&1/o==-1/0?"-0":y}return Qa=F,Qa}var en,ks;function Tf(){if(ks)return en;ks=1;var l=Cf();function n(u){return u==null?"":l(u)}return en=n,en}var tn,Os;function eo(){if(Os)return tn;Os=1;var l=kn(),n=Zh(),u=Yf(),s=Tf();function x(D,F){return l(D)?D:n(D,F)?[D]:u(s(D))}return tn=x,tn}var rn,Ys;function to(){if(Ys)return rn;Ys=1;var l=jn();function n(u){if(typeof u=="string"||l(u))return u;var s=u+"";return s=="0"&&1/u==-1/0?"-0":s}return rn=n,rn}var an,js;function Pf(){if(js)return an;js=1;var l=eo(),n=to();function u(s,x){x=l(x,s);for(var D=0,F=x.length;s!=null&&D<F;)s=s[n(x[D++])];return D&&D==F?s:void 0}return an=u,an}var nn,Cs;function Nf(){if(Cs)return nn;Cs=1;var l=Pf();function n(u,s,x){var D=u==null?void 0:l(u,s);return D===void 0?x:D}return nn=n,nn}var Rf=Nf();const Ts=bn(Rf);var sn,Ps;function Ef(){if(Ps)return sn;Ps=1;var l=Tn(),n=(function(){try{var u=l(Object,"defineProperty");return u({},"",{}),u}catch{}})();return sn=n,sn}var on,Ns;function Af(){if(Ns)return on;Ns=1;var l=Ef();function n(u,s,x){s=="__proto__"&&l?l(u,s,{configurable:!0,enumerable:!0,value:x,writable:!0}):u[s]=x}return on=n,on}var ln,Rs;function If(){if(Rs)return ln;Rs=1;var l=Af(),n=Qs(),u=Object.prototype,s=u.hasOwnProperty;function x(D,F,o){var y=D[F];(!(s.call(D,F)&&n(y,o))||o===void 0&&!(F in D))&&l(D,F,o)}return ln=x,ln}var un,Es;function Ff(){if(Es)return un;Es=1;var l=9007199254740991,n=/^(?:0|[1-9]\d*)$/;function u(s,x){var D=typeof s;return x=x??l,!!x&&(D=="number"||D!="symbol"&&n.test(s))&&s>-1&&s%1==0&&s<x}return un=u,un}var cn,As;function zf(){if(As)return cn;As=1;var l=If(),n=eo(),u=Ff(),s=Cn(),x=to();function D(F,o,y,r){if(!s(F))return F;o=n(o,F);for(var c=-1,h=o.length,f=h-1,g=F;g!=null&&++c<h;){var p=x(o[c]),C=y;if(p==="__proto__"||p==="constructor"||p==="prototype")return F;if(c!=f){var _=g[p];C=r?r(_,p,g):void 0,C===void 0&&(C=s(_)?_:u(o[c+1])?[]:{})}l(g,p,C),g=g[p]}return F}return cn=D,cn}var dn,Is;function Vf(){if(Is)return dn;Is=1;var l=zf();function n(u,s,x){return u==null?u:l(u,s,x)}return dn=n,dn}var Lf=Vf();const Fs=bn(Lf);document.documentElement.lang.toString();class Wf{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=Fe()}async getSessionAuthToken(){let n=this;await Ut.get(n.basePath+"/api/session-auth").then(u=>{n.token=u.data.token}).catch(u=>{Ge.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let n=this;return new Promise(async(u,s)=>{rr("auth-token")?u({token:rr("auth-token")}):await Ut.get(n.basePath+"/api/session-auth?with-cookie=true",{withCredentials:!0,headers:{"Content-Type":"application/json; charset=utf-8"}}).then(x=>{const D=Tc.jwtDecode(x.data.token);D.exp&&Th("auth-token",x.data.token,D.exp)}).catch(x=>{console.log(x)})})}getToken(){return this.token}execAuthenticatedCall(n){this.token?n(this.token):this.getSessionAuthTokenPromise().then(u=>{this.token=u.token,n(this.token)})}}const zs=_n.Formio.Components.components.file;let yn=null;document.querySelector("widget-formio")!==null&&(yn=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const qf=({component:l,current:n,onChange:u,i18next:s})=>{const[x,D]=G.useState([]),[F,o]=G.useState(new Map),[y,r]=G.useState(!1),c=new Wf;G.useEffect(()=>{c.getSessionAuthTokenPromise()},[]);const h=(w,M)=>{o(W=>{const $=new Map(W);return $.set(w,{...M,progress:Number(M==null?void 0:M.progress)||0}),$})};function f(w){return w.size>(v(l.fileMaxSize)||v("1GB"))?{code:"size-files",message:`${s.t("I file non possono superare le dimensioni di")} ${l.fileMaxSize?l.fileMaxSize:"1GB"}`}:x.length>=(l.maxFiles?parseInt(l.maxFiles):l.multiple?100:1)?{code:"too-many-files",message:`${s.t("Puoi caricare massimo ")} ${l.maxFiles||100} ${s.t("file")}`}:w.size<v(l.fileMinSize)?{code:"file-too-small",message:`${s.t("I file devono avare una dimensione superiore a ")} ${l.fileMinSize}`}:null}function g(){if(l.filePattern){const M=l.filePattern.split(",").map(W=>W.trim()).filter(Boolean).reduce((W,$)=>{const L=$.startsWith(".")?$:`.${$}`,A=Cc.getType(L);return A&&(W[A]||(W[A]=[]),W[A].push(L)),W},{});return Object.keys(M).length?M:void 0}else return!0}const p=w=>{let M={};return M.originalName=w.originalName?w.originalName:w.name,M.name=w.name,M.url=w.url,M.data=w.data,M.signature_validation=w.signature_validation,M.mime_type=w.mime_type,M.storage="url",M.size=w.size,M},{getRootProps:C,getInputProps:_,fileRejections:O,isDragActive:T,open:P}=jc.useDropzone({onDrop:w=>{w.map(M=>{Y(M).then(W=>{})})},maxFiles:l.maxFiles?parseInt(l.maxFiles)-x.length:l.multiple?100:1,validator:f,accept:g()}),z=w=>{const M=Fe()+"/api/attachments/"+w.data.id;fetch(M,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${rr("auth-token")}`},strictErrors:!0}).then(()=>{D(W=>{let $=W.filter(L=>L.data.id!==w.data.id);return u($),$})}).catch(W=>{Ge.fire({title:"",html:`<p>${s.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(W)})},R=()=>{const w=typeof(n==null?void 0:n.getCurrentValue)=="function"?n.getCurrentValue():n==null?void 0:n.dataValue;(w==null?void 0:w.length)>0&&(D(w),setTimeout(()=>{u(w)},100))};G.useEffect(()=>{document.querySelector(".formio-read-only")&&y===!1?(r(!0),setTimeout(()=>{R()},1e3)):(r(!1),setTimeout(()=>{R()},1e3))},[]);async function Y(w){let M;const W=Fe()+"/it/upload";let $={mime_type:w.type,name:w.name,original_filename:w.name,protocol_required:l.protocol_required,size:w.size};return await Ut.post(W,$,{maxContentLength:1/0,maxBodyLength:1/0}).then(async L=>(M=L.data.id,w.url=Fe()+"/it/allegati/"+M,w.storage="url",w.mime_type=w.type,w.protocol_required=l.protocol_required,w.data={...L.data,baseUrl:Fe()+"/it/allegati/"+M},h(M,w),await Ut.put(L.data.uri,w,{onUploadProgress:A=>{let B=Math.round(A.loaded*100/A.total);o(J=>{const ae=new Map(J),ee=w;return ee.progress=parseInt(B),ae.has(M)&&ae.set(M,ee),ae})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async A=>{const B=/\\|"/gi,J=A.headers.etag.replace(B,"")||null;return await Ut.put(Fe()+"/it/upload/"+M,{file_hash:J,check_signature:l.check_signature}).then(async ae=>{o(Z=>{const ue=new Map(Z);return ue.delete(M),ue});let ee=n.dataValue||[],fe=null;if(D(Z=>{const ue=[...Z,p(w)];return fe=ue.length-1,u(ue),ue}),l.check_signature&&ae.data.url&&yn)return await Ut.post(yn,{url:ae.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(Z=>{w.signature_validation=Z.data.sign,ee[fe].signature_validation=Z.data.sign}).catch(Z=>{ee[fe].signature_validation="File validation error: "+Z});o(Z=>{const ue=new Map(Z);return ue.delete(M),ue})}).catch(ae=>{o(ee=>{const fe=new Map(ee);return fe.delete(M),fe}),console.log(ae),Ge.fire({title:"",html:`<p>${s.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(A=>{o(B=>{const J=new Map(B);return J.delete(M),J}),console.log(A),Ge.fire({title:"",html:`<p>${s.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(L=>{console.log(L),Ge.fire({title:"",html:`<p>${s.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:s.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),o(A=>{const B=new Map(A);return B.delete(M),B})})}function v(w){if(typeof w=="string"){if(w.search(/kb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024);if(w.search(/mb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024*1024);if(w.search(/gb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024*1024*1024);if(w.search(/b/i)===w.length-1||w.search(/s/i)===w.length-1)return parseFloat(w.substring(0,w.length-1));if(w.search(/m/i)===w.length-1)return parseFloat(w.substring(0,w.length-1)*60);if(w.search(/h/i)===w.length-1)return parseFloat(w.substring(0,w.length-1)*3600)}return w}function N(w,M=2){if(!+w)return"0 Bytes";const W=1024,$=M<0?0:M,L=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],A=Math.floor(Math.log(w)/Math.log(W));return`${parseFloat((w/Math.pow(W,A)).toFixed($))} ${L[A]}`}return n.conditionallyHidden()||n.visible===!1?null:m.jsx(m.Fragment,{children:y?m.jsx("div",{children:m.jsxs("ul",{className:"upload-file-list",children:[x.map((w,M)=>m.jsxs("li",{className:"upload-file success mw-100",children:[m.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:s.t("File caricato:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:N(w.size)})]})]},w.size+M)),x.length<1&&m.jsxs("li",{className:"upload-file text-secondary mw-100",children:[m.jsx(le.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),m.jsx("p",{children:s.t("Nessun elemento")})]})]})}):m.jsxs(m.Fragment,{children:[l.hideLabel||l.hidden?"":m.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${l.id}-${l.key}`,title:l.tooltip||void 0,children:[l.label,l.validate.required&&m.jsx("span",{className:"text-danger"}),l.tooltip&&m.jsx("i",{tabIndex:0,className:"bi bi-question-circle text-muted ms-1","data-tooltip":l.tooltip,"aria-expanded":"false"})]}),m.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${T?" dragover":""}`,style:{border:"dashed"},...C({onClick:w=>w.stopPropagation()}),children:[m.jsx("input",{id:`${l.id}-${l.key}`,"aria-describedby":`file-uploader-description-${l.id}-${l.key}`,..._()}),m.jsxs("div",{className:`upload-dragdrop${T?" dragover":""}`,children:[m.jsx("div",{className:"ms-1 me-3",children:m.jsx(le.Icon,{color:"secondary",icon:"it-upload",title:s.t("Carica file"),size:"_sm"})}),m.jsxs("div",{className:"upload-dragdrop-text",children:[m.jsx("div",{className:"h5",id:`file-uploader-description-${l.id}-${l.key}`,children:s.t("Trascina il file per caricarlo")}),m.jsxs("p",{className:"d-inline-flex",children:[s.t("oppure"),m.jsx(le.Button,{tag:"input",type:"button",value:s.t("selezionalo dal dispositivo"),onClick:P,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),m.jsx("div",{dangerouslySetInnerHTML:{__html:Hs.sanitize(l.description||"")}}),m.jsxs("ul",{className:"upload-file-list my-0",children:[x.map((w,M)=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:s.t("File caricato:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:N(w.size)})]}),m.jsx(le.Button,{className:"px-1",onClick:()=>z(w),children:m.jsx(le.Icon,{title:`${s.t("Elimina file caricato")} ${w.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},w.size+M)),Array.from(F.entries()).map(([w,M])=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:s.t("Caricamento file:")}),M.name,m.jsx("span",{className:"upload-file-weight",children:N(M.size)})]}),m.jsx(le.Progress,{value:Number(M==null?void 0:M.progress)||0})]},w))]}),!!(O&&O.length)&&m.jsx("div",{className:"formio-error-wrapper",children:m.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:O.map(({file:w,errors:M},W)=>m.jsxs("li",{className:"upload-file error",children:[m.jsxs("div",{className:"upload-file-name-error-wrapper",children:[m.jsx(le.Icon,{"aria-hidden":"true",color:"error",icon:"it-error",title:"Icona file",size:"sm"}),m.jsxs("p",{className:"text-wrap error",children:[m.jsx("span",{className:"visually-hidden",children:s.t("Errore caricamento file:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:N(w.size)})]})]}),m.jsx("div",{children:M.map($=>$.code==="file-invalid-type"?m.jsxs("p",{className:"text-wrap ms-0",children:[s.t("I file possono essere di tipo "),l.filePattern]}):$.code==="too-many-files"?m.jsxs("p",{className:"text-wrap ms-0",children:[s.t("Puoi caricare massimo ")," ",l.maxFiles?l.maxFiles:l.multiple?100:1," ",s.t("file")]}):m.jsx("p",{className:"text-wrap ms-0",children:$.message}))})]},w.size+W))})})]})})},jr=class jr extends zs{constructor(n,u,s){super({...n,clearOnHide:!1},u,s),this.reactRef=null,this.lastRenderedVisible=void 0,this.rootComponent=null}static get builderInfo(){return{title:"File Sdc",group:"basic",icon:"bi bi-file-earmark-text",documentation:"",weight:70,schema:jr.schema()}}get emptyValue(){return[]}init(){var n,u;if(super.init(),(n=this.component)!=null&&n.multiple&&!Array.isArray(this.getCurrentValue())){this.dataValue=[];const s=this.path||((u=this.component)==null?void 0:u.key);s&&this.rootValue&&Fs(this.rootValue,s,[])}}static schema(){return zs.schema({type:"sdcfile",modelType:"array"})}renderReact(){if(this.rootComponent){if(this.builderMode)return super.render(this.renderTemplate("builderComponent",{component:this.component}));this.rootComponent.render(m.jsx(qf,{component:this.component,current:this,onChange:n=>this.setValue(n,{modified:!0}),...this}))}}attach(n,u){return this.reactRef=u,this.rootComponent=Ft.createRoot(n),this.lastRenderedVisible=this.visible,this.renderReact(),super.attach(n)}setValue(n,u={}){var F;const s=this.normalizeValue(n,u),x=super.setValue(s,u),D=this.path||((F=this.component)==null?void 0:F.key);if(D&&this.rootValue){const o=Ts(this.rootValue,D);this.isEqual(o,s)||Fs(this.rootValue,D,s)}return x}normalizeValue(n,u={}){var x;const s=super.normalizeValue(n,u);return!((x=this.component)!=null&&x.multiple)||Array.isArray(s)?s:s==null||s===""?[]:[s]}detach(){return this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),super.detach()}getValue(){return this.getCurrentValue()}get validationValue(){return this.getCurrentValue()}getCurrentValue(){var x,D;const n=super.getValue(),u=this.path||((x=this.component)==null?void 0:x.key),s=u&&this.rootValue?Ts(this.rootValue,u):void 0;return(D=this.component)!=null&&D.multiple?Array.isArray(n)&&n.length>0?n:Array.isArray(s)?s:[]:n??s??null}isEmpty(n=this.validationValue){var u;return(u=this.component)!=null&&u.multiple?!Array.isArray(n)||n.length===0:n==null||n===""}checkCondition(n,u){const s=super.checkCondition(n,u),x=this.visible;return this.lastRenderedVisible!==x&&(this.lastRenderedVisible=x,this.renderReact()),s}render(){const n=`<div ref="react-${this.id}"></div>`;return this.builderMode?super.render(this.renderTemplate("builderComponent",{html:n,component:this.component})):super.render(n)}};Tt(jr,"editForm",Uh);let Mr=jr;const Hf=[{key:"labelPosition",ignore:!0},{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0}];function $f(...l){return ot.Components.baseEditForm([{key:"display",components:Hf}],...l)}var vr={exports:{}},Bf=vr.exports,Vs;function Uf(){return Vs||(Vs=1,(function(l,n){(function(u,s){l.exports=s(G)})(Bf,(function(u){return(function(){var s={680:function(o){o.exports=u},8952:function(o,y,r){var c=r(4328),h=r(36),f=TypeError;o.exports=function(g){if(c(g))return g;throw new f(h(g)+" is not a function")}},2096:function(o,y,r){var c=r(2424),h=String,f=TypeError;o.exports=function(g){if(c(g))return g;throw new f("Can't set "+h(g)+" as a prototype")}},4764:function(o,y,r){var c=r(9764).charAt;o.exports=function(h,f,g){return f+(g?c(h,f).length:1)}},6100:function(o,y,r){var c=r(7e3),h=TypeError;o.exports=function(f,g){if(c(g,f))return f;throw new h("Incorrect invocation")}},3951:function(o,y,r){var c=r(1632),h=String,f=TypeError;o.exports=function(g){if(c(g))return g;throw new f(h(g)+" is not an object")}},2504:function(o,y,r){var c=r(4096),h=r(2495),f=r(3556),g=function(p){return function(C,_,O){var T=c(C),P=f(T);if(P===0)return!p&&-1;var z,R=h(O,P);if(p&&_!=_){for(;P>R;)if((z=T[R++])!=z)return!0}else for(;P>R;R++)if((p||R in T)&&T[R]===_)return p||R||0;return!p&&-1}};o.exports={includes:g(!0),indexOf:g(!1)}},3364:function(o,y,r){var c=r(8992),h=r(1664),f=r(5712),g=r(4356),p=r(3556),C=r(2568),_=h([].push),O=function(T){var P=T===1,z=T===2,R=T===3,Y=T===4,v=T===6,N=T===7,w=T===5||v;return function(M,W,$,L){for(var A,B,J=g(M),ae=f(J),ee=p(ae),fe=c(W,$),Z=0,ue=L||C,se=P?ue(M,ee):z||N?ue(M,0):void 0;ee>Z;Z++)if((w||Z in ae)&&(B=fe(A=ae[Z],Z,J),T))if(P)se[Z]=B;else if(B)switch(T){case 3:return!0;case 5:return A;case 6:return Z;case 2:_(se,A)}else switch(T){case 4:return!1;case 7:_(se,A)}return v?-1:R||Y?Y:se}};o.exports={forEach:O(0),map:O(1),filter:O(2),some:O(3),every:O(4),find:O(5),findIndex:O(6),filterReject:O(7)}},953:function(o,y,r){var c=r(9957),h=r(9972),f=r(8504),g=h("species");o.exports=function(p){return f>=51||!c((function(){var C=[];return(C.constructor={})[g]=function(){return{foo:1}},C[p](Boolean).foo!==1}))}},1496:function(o,y,r){var c=r(9957);o.exports=function(h,f){var g=[][h];return!!g&&c((function(){g.call(null,f||function(){return 1},1)}))}},6728:function(o,y,r){var c=r(3476),h=r(1432),f=TypeError,g=Object.getOwnPropertyDescriptor,p=c&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(C){return C instanceof TypeError}})();o.exports=p?function(C,_){if(h(C)&&!g(C,"length").writable)throw new f("Cannot set read only .length");return C.length=_}:function(C,_){return C.length=_}},6736:function(o,y,r){var c=r(1432),h=r(6072),f=r(1632),g=r(9972)("species"),p=Array;o.exports=function(C){var _;return c(C)&&(_=C.constructor,(h(_)&&(_===p||c(_.prototype))||f(_)&&(_=_[g])===null)&&(_=void 0)),_===void 0?p:_}},2568:function(o,y,r){var c=r(6736);o.exports=function(h,f){return new(c(h))(f===0?0:f)}},8696:function(o,y,r){var c=r(3951),h=r(3112);o.exports=function(f,g,p,C){try{return C?g(c(p)[0],p[1]):g(p)}catch(_){h(f,"throw",_)}}},1888:function(o,y,r){var c=r(1664),h=c({}.toString),f=c("".slice);o.exports=function(g){return f(h(g),8,-1)}},4427:function(o,y,r){var c=r(16),h=r(4328),f=r(1888),g=r(9972)("toStringTag"),p=Object,C=f((function(){return arguments})())==="Arguments";o.exports=c?f:function(_){var O,T,P;return _===void 0?"Undefined":_===null?"Null":typeof(T=(function(z,R){try{return z[R]}catch{}})(O=p(_),g))=="string"?T:C?f(O):(P=f(O))==="Object"&&h(O.callee)?"Arguments":P}},9968:function(o,y,r){var c=r(5152),h=r(9252),f=r(9444),g=r(8352);o.exports=function(p,C,_){for(var O=h(C),T=g.f,P=f.f,z=0;z<O.length;z++){var R=O[z];c(p,R)||_&&c(_,R)||T(p,R,P(C,R))}}},2272:function(o,y,r){var c=r(9957);o.exports=!c((function(){function h(){}return h.prototype.constructor=null,Object.getPrototypeOf(new h)!==h.prototype}))},3336:function(o){o.exports=function(y,r){return{value:y,done:r}}},3440:function(o,y,r){var c=r(3476),h=r(8352),f=r(9728);o.exports=c?function(g,p,C){return h.f(g,p,f(1,C))}:function(g,p,C){return g[p]=C,g}},9728:function(o){o.exports=function(y,r){return{enumerable:!(1&y),configurable:!(2&y),writable:!(4&y),value:r}}},92:function(o,y,r){var c=r(3476),h=r(8352),f=r(9728);o.exports=function(g,p,C){c?h.f(g,p,f(0,C)):g[p]=C}},2544:function(o,y,r){var c=r(5312),h=r(8352);o.exports=function(f,g,p){return p.get&&c(p.get,g,{getter:!0}),p.set&&c(p.set,g,{setter:!0}),h.f(f,g,p)}},6076:function(o,y,r){var c=r(4328),h=r(8352),f=r(5312),g=r(4636);o.exports=function(p,C,_,O){O||(O={});var T=O.enumerable,P=O.name!==void 0?O.name:C;if(c(_)&&f(_,P,O),O.global)T?p[C]=_:g(C,_);else{try{O.unsafe?p[C]&&(T=!0):delete p[C]}catch{}T?p[C]=_:h.f(p,C,{value:_,enumerable:!1,configurable:!O.nonConfigurable,writable:!O.nonWritable})}return p}},4036:function(o,y,r){var c=r(6076);o.exports=function(h,f,g){for(var p in f)c(h,p,f[p],g);return h}},4636:function(o,y,r){var c=r(6420),h=Object.defineProperty;o.exports=function(f,g){try{h(c,f,{value:g,configurable:!0,writable:!0})}catch{c[f]=g}return g}},3476:function(o,y,r){var c=r(9957);o.exports=!c((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(o,y,r){var c=r(6420),h=r(1632),f=c.document,g=h(f)&&h(f.createElement);o.exports=function(p){return g?f.createElement(p):{}}},4316:function(o){var y=TypeError;o.exports=function(r){if(r>9007199254740991)throw y("Maximum allowed index exceeded");return r}},6064:function(o){o.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(o,y,r){var c,h,f=r(6420),g=r(6064),p=f.process,C=f.Deno,_=p&&p.versions||C&&C.version,O=_&&_.v8;O&&(h=(c=O.split("."))[0]>0&&c[0]<4?1:+(c[0]+c[1])),!h&&g&&(!(c=g.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=g.match(/Chrome\/(\d+)/))&&(h=+c[1]),o.exports=h},8256:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(o,y,r){var c=r(1664),h=Error,f=c("".replace),g=String(new h("zxcasd").stack),p=/\n\s*at [^:]*:[^\n]*/,C=p.test(g);o.exports=function(_,O){if(C&&typeof _=="string"&&!h.prepareStackTrace)for(;O--;)_=f(_,p,"");return _}},3696:function(o,y,r){var c=r(3440),h=r(6520),f=r(9184),g=Error.captureStackTrace;o.exports=function(p,C,_,O){f&&(g?g(p,C):c(p,"stack",h(_,O)))}},9184:function(o,y,r){var c=r(9957),h=r(9728);o.exports=!c((function(){var f=new Error("a");return!("stack"in f)||(Object.defineProperty(f,"stack",h(1,7)),f.stack!==7)}))},9160:function(o,y,r){var c=r(6420),h=r(9444).f,f=r(3440),g=r(6076),p=r(4636),C=r(9968),_=r(6704);o.exports=function(O,T){var P,z,R,Y,v,N=O.target,w=O.global,M=O.stat;if(P=w?c:M?c[N]||p(N,{}):c[N]&&c[N].prototype)for(z in T){if(Y=T[z],R=O.dontCallGetSet?(v=h(P,z))&&v.value:P[z],!_(w?z:N+(M?".":"#")+z,O.forced)&&R!==void 0){if(typeof Y==typeof R)continue;C(Y,R)}(O.sham||R&&R.sham)&&f(Y,"sham",!0),g(P,z,Y,O)}}},9957:function(o){o.exports=function(y){try{return!!y()}catch{return!0}}},7176:function(o,y,r){r(880);var c=r(8448),h=r(6076),f=r(7680),g=r(9957),p=r(9972),C=r(3440),_=p("species"),O=RegExp.prototype;o.exports=function(T,P,z,R){var Y=p(T),v=!g((function(){var W={};return W[Y]=function(){return 7},""[T](W)!==7})),N=v&&!g((function(){var W=!1,$=/a/;return T==="split"&&(($={}).constructor={},$.constructor[_]=function(){return $},$.flags="",$[Y]=/./[Y]),$.exec=function(){return W=!0,null},$[Y](""),!W}));if(!v||!N||z){var w=/./[Y],M=P(Y,""[T],(function(W,$,L,A,B){var J=$.exec;return J===f||J===O.exec?v&&!B?{done:!0,value:c(w,$,L,A)}:{done:!0,value:c(W,L,$,A)}:{done:!1}}));h(String.prototype,T,M[0]),h(O,Y,M[1])}R&&C(O[Y],"sham",!0)}},908:function(o,y,r){var c=r(7332),h=Function.prototype,f=h.apply,g=h.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(c?g.bind(f):function(){return g.apply(f,arguments)})},8992:function(o,y,r){var c=r(3180),h=r(8952),f=r(7332),g=c(c.bind);o.exports=function(p,C){return h(p),C===void 0?p:f?g(p,C):function(){return p.apply(C,arguments)}}},7332:function(o,y,r){var c=r(9957);o.exports=!c((function(){var h=(function(){}).bind();return typeof h!="function"||h.hasOwnProperty("prototype")}))},8448:function(o,y,r){var c=r(7332),h=Function.prototype.call;o.exports=c?h.bind(h):function(){return h.apply(h,arguments)}},6208:function(o,y,r){var c=r(3476),h=r(5152),f=Function.prototype,g=c&&Object.getOwnPropertyDescriptor,p=h(f,"name"),C=p&&(function(){}).name==="something",_=p&&(!c||c&&g(f,"name").configurable);o.exports={EXISTS:p,PROPER:C,CONFIGURABLE:_}},5288:function(o,y,r){var c=r(1664),h=r(8952);o.exports=function(f,g,p){try{return c(h(Object.getOwnPropertyDescriptor(f,g)[p]))}catch{}}},3180:function(o,y,r){var c=r(1888),h=r(1664);o.exports=function(f){if(c(f)==="Function")return h(f)}},1664:function(o,y,r){var c=r(7332),h=Function.prototype,f=h.call,g=c&&h.bind.bind(f,f);o.exports=c?g:function(p){return function(){return f.apply(p,arguments)}}},5232:function(o,y,r){var c=r(6420),h=r(4328);o.exports=function(f,g){return arguments.length<2?(p=c[f],h(p)?p:void 0):c[f]&&c[f][g];var p}},6752:function(o){o.exports=function(y){return{iterator:y,next:y.next,done:!1}}},4504:function(o,y,r){var c=r(8952),h=r(9760);o.exports=function(f,g){var p=f[g];return h(p)?void 0:c(p)}},6420:function(o,y,r){var c=function(h){return h&&h.Math===Math&&h};o.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof r.g=="object"&&r.g)||c(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(o,y,r){var c=r(1664),h=r(4356),f=c({}.hasOwnProperty);o.exports=Object.hasOwn||function(g,p){return f(h(g),p)}},2560:function(o){o.exports={}},4168:function(o,y,r){var c=r(5232);o.exports=c("document","documentElement")},9888:function(o,y,r){var c=r(3476),h=r(9957),f=r(8168);o.exports=!c&&!h((function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(o,y,r){var c=r(1664),h=r(9957),f=r(1888),g=Object,p=c("".split);o.exports=h((function(){return!g("z").propertyIsEnumerable(0)}))?function(C){return f(C)==="String"?p(C,""):g(C)}:g},7512:function(o,y,r){var c=r(4328),h=r(1632),f=r(4024);o.exports=function(g,p,C){var _,O;return f&&c(_=p.constructor)&&_!==C&&h(O=_.prototype)&&O!==C.prototype&&f(g,O),g}},9112:function(o,y,r){var c=r(1664),h=r(4328),f=r(3976),g=c(Function.toString);h(f.inspectSource)||(f.inspectSource=function(p){return g(p)}),o.exports=f.inspectSource},3480:function(o,y,r){var c=r(1632),h=r(3440);o.exports=function(f,g){c(g)&&"cause"in g&&h(f,"cause",g.cause)}},9104:function(o,y,r){var c,h,f,g=r(4288),p=r(6420),C=r(1632),_=r(3440),O=r(5152),T=r(3976),P=r(6504),z=r(2560),R="Object already initialized",Y=p.TypeError,v=p.WeakMap;if(g||T.state){var N=T.state||(T.state=new v);N.get=N.get,N.has=N.has,N.set=N.set,c=function(M,W){if(N.has(M))throw new Y(R);return W.facade=M,N.set(M,W),W},h=function(M){return N.get(M)||{}},f=function(M){return N.has(M)}}else{var w=P("state");z[w]=!0,c=function(M,W){if(O(M,w))throw new Y(R);return W.facade=M,_(M,w,W),W},h=function(M){return O(M,w)?M[w]:{}},f=function(M){return O(M,w)}}o.exports={set:c,get:h,has:f,enforce:function(M){return f(M)?h(M):c(M,{})},getterFor:function(M){return function(W){var $;if(!C(W)||($=h(W)).type!==M)throw new Y("Incompatible receiver, "+M+" required");return $}}}},1432:function(o,y,r){var c=r(1888);o.exports=Array.isArray||function(h){return c(h)==="Array"}},4328:function(o){var y=typeof document=="object"&&document.all;o.exports=y===void 0&&y!==void 0?function(r){return typeof r=="function"||r===y}:function(r){return typeof r=="function"}},6072:function(o,y,r){var c=r(1664),h=r(9957),f=r(4328),g=r(4427),p=r(5232),C=r(9112),_=function(){},O=p("Reflect","construct"),T=/^\s*(?:class|function)\b/,P=c(T.exec),z=!T.test(_),R=function(v){if(!f(v))return!1;try{return O(_,[],v),!0}catch{return!1}},Y=function(v){if(!f(v))return!1;switch(g(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return z||!!P(T,C(v))}catch{return!0}};Y.sham=!0,o.exports=!O||h((function(){var v;return R(R.call)||!R(Object)||!R((function(){v=!0}))||v}))?Y:R},6704:function(o,y,r){var c=r(9957),h=r(4328),f=/#|\.prototype\./,g=function(T,P){var z=C[p(T)];return z===O||z!==_&&(h(P)?c(P):!!P)},p=g.normalize=function(T){return String(T).replace(f,".").toLowerCase()},C=g.data={},_=g.NATIVE="N",O=g.POLYFILL="P";o.exports=g},9760:function(o){o.exports=function(y){return y==null}},1632:function(o,y,r){var c=r(4328);o.exports=function(h){return typeof h=="object"?h!==null:c(h)}},2424:function(o,y,r){var c=r(1632);o.exports=function(h){return c(h)||h===null}},7048:function(o){o.exports=!1},7728:function(o,y,r){var c=r(5232),h=r(4328),f=r(7e3),g=r(6536),p=Object;o.exports=g?function(C){return typeof C=="symbol"}:function(C){var _=c("Symbol");return h(_)&&f(_.prototype,p(C))}},3112:function(o,y,r){var c=r(8448),h=r(3951),f=r(4504);o.exports=function(g,p,C){var _,O;h(g);try{if(!(_=f(g,"return"))){if(p==="throw")throw C;return C}_=c(_,g)}catch(T){O=!0,_=T}if(p==="throw")throw C;if(O)throw _;return h(_),C}},9724:function(o,y,r){var c=r(8448),h=r(9368),f=r(3440),g=r(4036),p=r(9972),C=r(9104),_=r(4504),O=r(336).IteratorPrototype,T=r(3336),P=r(3112),z=p("toStringTag"),R="IteratorHelper",Y="WrapForValidIterator",v=C.set,N=function(W){var $=C.getterFor(W?Y:R);return g(h(O),{next:function(){var L=$(this);if(W)return L.nextHandler();try{var A=L.done?void 0:L.nextHandler();return T(A,L.done)}catch(B){throw L.done=!0,B}},return:function(){var L=$(this),A=L.iterator;if(L.done=!0,W){var B=_(A,"return");return B?c(B,A):T(void 0,!0)}if(L.inner)try{P(L.inner.iterator,"normal")}catch(J){return P(A,"throw",J)}return P(A,"normal"),T(void 0,!0)}})},w=N(!0),M=N(!1);f(M,z,"Iterator Helper"),o.exports=function(W,$){var L=function(A,B){B?(B.iterator=A.iterator,B.next=A.next):B=A,B.type=$?Y:R,B.nextHandler=W,B.counter=0,B.done=!1,v(this,B)};return L.prototype=$?w:M,L}},5792:function(o,y,r){var c=r(8448),h=r(8952),f=r(3951),g=r(6752),p=r(9724),C=r(8696),_=p((function(){var O=this.iterator,T=f(c(this.next,O));if(!(this.done=!!T.done))return C(O,this.mapper,[T.value,this.counter++],!0)}));o.exports=function(O){return f(this),h(O),new _(g(this),{mapper:O})}},336:function(o,y,r){var c,h,f,g=r(9957),p=r(4328),C=r(1632),_=r(9368),O=r(7796),T=r(6076),P=r(9972),z=r(7048),R=P("iterator"),Y=!1;[].keys&&("next"in(f=[].keys())?(h=O(O(f)))!==Object.prototype&&(c=h):Y=!0),!C(c)||g((function(){var v={};return c[R].call(v)!==v}))?c={}:z&&(c=_(c)),p(c[R])||T(c,R,(function(){return this})),o.exports={IteratorPrototype:c,BUGGY_SAFARI_ITERATORS:Y}},3556:function(o,y,r){var c=r(7584);o.exports=function(h){return c(h.length)}},5312:function(o,y,r){var c=r(1664),h=r(9957),f=r(4328),g=r(5152),p=r(3476),C=r(6208).CONFIGURABLE,_=r(9112),O=r(9104),T=O.enforce,P=O.get,z=String,R=Object.defineProperty,Y=c("".slice),v=c("".replace),N=c([].join),w=p&&!h((function(){return R((function(){}),"length",{value:8}).length!==8})),M=String(String).split("String"),W=o.exports=function($,L,A){Y(z(L),0,7)==="Symbol("&&(L="["+v(z(L),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),A&&A.getter&&(L="get "+L),A&&A.setter&&(L="set "+L),(!g($,"name")||C&&$.name!==L)&&(p?R($,"name",{value:L,configurable:!0}):$.name=L),w&&A&&g(A,"arity")&&$.length!==A.arity&&R($,"length",{value:A.arity});try{A&&g(A,"constructor")&&A.constructor?p&&R($,"prototype",{writable:!1}):$.prototype&&($.prototype=void 0)}catch{}var B=T($);return g(B,"source")||(B.source=N(M,typeof L=="string"?L:"")),$};Function.prototype.toString=W((function(){return f(this)&&P(this).source||_(this)}),"toString")},1748:function(o){var y=Math.ceil,r=Math.floor;o.exports=Math.trunc||function(c){var h=+c;return(h>0?r:y)(h)}},8948:function(o,y,r){var c=r(5016);o.exports=function(h,f){return h===void 0?arguments.length<2?"":f:c(h)}},9292:function(o,y,r){var c=r(3476),h=r(1664),f=r(8448),g=r(9957),p=r(1531),C=r(9392),_=r(8912),O=r(4356),T=r(5712),P=Object.assign,z=Object.defineProperty,R=h([].concat);o.exports=!P||g((function(){if(c&&P({b:1},P(z({},"a",{enumerable:!0,get:function(){z(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var Y={},v={},N=Symbol("assign detection"),w="abcdefghijklmnopqrst";return Y[N]=7,w.split("").forEach((function(M){v[M]=M})),P({},Y)[N]!==7||p(P({},v)).join("")!==w}))?function(Y,v){for(var N=O(Y),w=arguments.length,M=1,W=C.f,$=_.f;w>M;)for(var L,A=T(arguments[M++]),B=W?R(p(A),W(A)):p(A),J=B.length,ae=0;J>ae;)L=B[ae++],c&&!f($,A,L)||(N[L]=A[L]);return N}:P},9368:function(o,y,r){var c,h=r(3951),f=r(2056),g=r(8256),p=r(2560),C=r(4168),_=r(8168),O=r(6504),T="prototype",P="script",z=O("IE_PROTO"),R=function(){},Y=function(w){return"<"+P+">"+w+"</"+P+">"},v=function(w){w.write(Y("")),w.close();var M=w.parentWindow.Object;return w=null,M},N=function(){try{c=new ActiveXObject("htmlfile")}catch{}var w,M,W;N=typeof document<"u"?document.domain&&c?v(c):(M=_("iframe"),W="java"+P+":",M.style.display="none",C.appendChild(M),M.src=String(W),(w=M.contentWindow.document).open(),w.write(Y("document.F=Object")),w.close(),w.F):v(c);for(var $=g.length;$--;)delete N[T][g[$]];return N()};p[z]=!0,o.exports=Object.create||function(w,M){var W;return w!==null?(R[T]=h(w),W=new R,R[T]=null,W[z]=w):W=N(),M===void 0?W:f.f(W,M)}},2056:function(o,y,r){var c=r(3476),h=r(1576),f=r(8352),g=r(3951),p=r(4096),C=r(1531);y.f=c&&!h?Object.defineProperties:function(_,O){g(_);for(var T,P=p(O),z=C(O),R=z.length,Y=0;R>Y;)f.f(_,T=z[Y++],P[T]);return _}},8352:function(o,y,r){var c=r(3476),h=r(9888),f=r(1576),g=r(3951),p=r(88),C=TypeError,_=Object.defineProperty,O=Object.getOwnPropertyDescriptor,T="enumerable",P="configurable",z="writable";y.f=c?f?function(R,Y,v){if(g(R),Y=p(Y),g(v),typeof R=="function"&&Y==="prototype"&&"value"in v&&z in v&&!v[z]){var N=O(R,Y);N&&N[z]&&(R[Y]=v.value,v={configurable:P in v?v[P]:N[P],enumerable:T in v?v[T]:N[T],writable:!1})}return _(R,Y,v)}:_:function(R,Y,v){if(g(R),Y=p(Y),g(v),h)try{return _(R,Y,v)}catch{}if("get"in v||"set"in v)throw new C("Accessors not supported");return"value"in v&&(R[Y]=v.value),R}},9444:function(o,y,r){var c=r(3476),h=r(8448),f=r(8912),g=r(9728),p=r(4096),C=r(88),_=r(5152),O=r(9888),T=Object.getOwnPropertyDescriptor;y.f=c?T:function(P,z){if(P=p(P),z=C(z),O)try{return T(P,z)}catch{}if(_(P,z))return g(!h(f.f,P,z),P[z])}},5048:function(o,y,r){var c=r(9008),h=r(8256).concat("length","prototype");y.f=Object.getOwnPropertyNames||function(f){return c(f,h)}},9392:function(o,y){y.f=Object.getOwnPropertySymbols},7796:function(o,y,r){var c=r(5152),h=r(4328),f=r(4356),g=r(6504),p=r(2272),C=g("IE_PROTO"),_=Object,O=_.prototype;o.exports=p?_.getPrototypeOf:function(T){var P=f(T);if(c(P,C))return P[C];var z=P.constructor;return h(z)&&P instanceof z?z.prototype:P instanceof _?O:null}},7e3:function(o,y,r){var c=r(1664);o.exports=c({}.isPrototypeOf)},9008:function(o,y,r){var c=r(1664),h=r(5152),f=r(4096),g=r(2504).indexOf,p=r(2560),C=c([].push);o.exports=function(_,O){var T,P=f(_),z=0,R=[];for(T in P)!h(p,T)&&h(P,T)&&C(R,T);for(;O.length>z;)h(P,T=O[z++])&&(~g(R,T)||C(R,T));return R}},1531:function(o,y,r){var c=r(9008),h=r(8256);o.exports=Object.keys||function(f){return c(f,h)}},8912:function(o,y){var r={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,h=c&&!r.call({1:2},1);y.f=h?function(f){var g=c(this,f);return!!g&&g.enumerable}:r},4024:function(o,y,r){var c=r(5288),h=r(3951),f=r(2096);o.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var g,p=!1,C={};try{(g=c(Object.prototype,"__proto__","set"))(C,[]),p=C instanceof Array}catch{}return function(_,O){return h(_),f(O),p?g(_,O):_.__proto__=O,_}})():void 0)},7032:function(o,y,r){var c=r(16),h=r(4427);o.exports=c?{}.toString:function(){return"[object "+h(this)+"]"}},2104:function(o,y,r){var c=r(8448),h=r(4328),f=r(1632),g=TypeError;o.exports=function(p,C){var _,O;if(C==="string"&&h(_=p.toString)&&!f(O=c(_,p))||h(_=p.valueOf)&&!f(O=c(_,p))||C!=="string"&&h(_=p.toString)&&!f(O=c(_,p)))return O;throw new g("Can't convert object to primitive value")}},9252:function(o,y,r){var c=r(5232),h=r(1664),f=r(5048),g=r(9392),p=r(3951),C=h([].concat);o.exports=c("Reflect","ownKeys")||function(_){var O=f.f(p(_)),T=g.f;return T?C(O,T(_)):O}},584:function(o,y,r){var c=r(8352).f;o.exports=function(h,f,g){g in h||c(h,g,{configurable:!0,get:function(){return f[g]},set:function(p){f[g]=p}})}},9092:function(o,y,r){var c=r(8448),h=r(3951),f=r(4328),g=r(1888),p=r(7680),C=TypeError;o.exports=function(_,O){var T=_.exec;if(f(T)){var P=c(T,_,O);return P!==null&&h(P),P}if(g(_)==="RegExp")return c(p,_,O);throw new C("RegExp#exec called on incompatible receiver")}},7680:function(o,y,r){var c,h,f=r(8448),g=r(1664),p=r(5016),C=r(8872),_=r(3548),O=r(4696),T=r(9368),P=r(9104).get,z=r(8e3),R=r(9124),Y=O("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,N=v,w=g("".charAt),M=g("".indexOf),W=g("".replace),$=g("".slice),L=(h=/b*/g,f(v,c=/a/,"a"),f(v,h,"a"),c.lastIndex!==0||h.lastIndex!==0),A=_.BROKEN_CARET,B=/()??/.exec("")[1]!==void 0;(L||B||A||z||R)&&(N=function(J){var ae,ee,fe,Z,ue,se,ye,ce=this,Q=P(ce),ve=p(J),Pe=Q.raw;if(Pe)return Pe.lastIndex=ce.lastIndex,ae=f(N,Pe,ve),ce.lastIndex=Pe.lastIndex,ae;var _e=Q.groups,Te=A&&ce.sticky,Ae=f(C,ce),ze=ce.source,E=0,b=ve;if(Te&&(Ae=W(Ae,"y",""),M(Ae,"g")===-1&&(Ae+="g"),b=$(ve,ce.lastIndex),ce.lastIndex>0&&(!ce.multiline||ce.multiline&&w(ve,ce.lastIndex-1)!==`
|
|
105
|
+
`)&&(ze="(?: "+ze+")",b=" "+b,E++),ee=new RegExp("^(?:"+ze+")",Ae)),B&&(ee=new RegExp("^"+ze+"$(?!\\s)",Ae)),L&&(fe=ce.lastIndex),Z=f(v,Te?ee:ce,b),Te?Z?(Z.input=$(Z.input,E),Z[0]=$(Z[0],E),Z.index=ce.lastIndex,ce.lastIndex+=Z[0].length):ce.lastIndex=0:L&&Z&&(ce.lastIndex=ce.global?Z.index+Z[0].length:fe),B&&Z&&Z.length>1&&f(Y,Z[0],ee,(function(){for(ue=1;ue<arguments.length-2;ue++)arguments[ue]===void 0&&(Z[ue]=void 0)})),Z&&_e)for(Z.groups=se=T(null),ue=0;ue<_e.length;ue++)se[(ye=_e[ue])[0]]=Z[ye[1]];return Z}),o.exports=N},8872:function(o,y,r){var c=r(3951);o.exports=function(){var h=c(this),f="";return h.hasIndices&&(f+="d"),h.global&&(f+="g"),h.ignoreCase&&(f+="i"),h.multiline&&(f+="m"),h.dotAll&&(f+="s"),h.unicode&&(f+="u"),h.unicodeSets&&(f+="v"),h.sticky&&(f+="y"),f}},3548:function(o,y,r){var c=r(9957),h=r(6420).RegExp,f=c((function(){var C=h("a","y");return C.lastIndex=2,C.exec("abcd")!==null})),g=f||c((function(){return!h("a","y").sticky})),p=f||c((function(){var C=h("^r","gy");return C.lastIndex=2,C.exec("str")!==null}));o.exports={BROKEN_CARET:p,MISSED_STICKY:g,UNSUPPORTED_Y:f}},8e3:function(o,y,r){var c=r(9957),h=r(6420).RegExp;o.exports=c((function(){var f=h(".","s");return!(f.dotAll&&f.test(`
|
|
106
|
+
`)&&f.flags==="s")}))},9124:function(o,y,r){var c=r(9957),h=r(6420).RegExp;o.exports=c((function(){var f=h("(?<a>b)","g");return f.exec("b").groups.a!=="b"||"b".replace(f,"$<a>c")!=="bc"}))},5436:function(o,y,r){var c=r(9760),h=TypeError;o.exports=function(f){if(c(f))throw new h("Can't call method on "+f);return f}},6504:function(o,y,r){var c=r(4696),h=r(7776),f=c("keys");o.exports=function(g){return f[g]||(f[g]=h(g))}},3976:function(o,y,r){var c=r(7048),h=r(6420),f=r(4636),g="__core-js_shared__",p=o.exports=h[g]||f(g,{});(p.versions||(p.versions=[])).push({version:"3.36.0",mode:c?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:function(o,y,r){var c=r(3976);o.exports=function(h,f){return c[h]||(c[h]=f||{})}},9764:function(o,y,r){var c=r(1664),h=r(6180),f=r(5016),g=r(5436),p=c("".charAt),C=c("".charCodeAt),_=c("".slice),O=function(T){return function(P,z){var R,Y,v=f(g(P)),N=h(z),w=v.length;return N<0||N>=w?T?"":void 0:(R=C(v,N))<55296||R>56319||N+1===w||(Y=C(v,N+1))<56320||Y>57343?T?p(v,N):R:T?_(v,N,N+2):Y-56320+(R-55296<<10)+65536}};o.exports={codeAt:O(!1),charAt:O(!0)}},772:function(o,y,r){var c=r(8504),h=r(9957),f=r(6420).String;o.exports=!!Object.getOwnPropertySymbols&&!h((function(){var g=Symbol("symbol detection");return!f(g)||!(Object(g)instanceof Symbol)||!Symbol.sham&&c&&c<41}))},2495:function(o,y,r){var c=r(6180),h=Math.max,f=Math.min;o.exports=function(g,p){var C=c(g);return C<0?h(C+p,0):f(C,p)}},4096:function(o,y,r){var c=r(5712),h=r(5436);o.exports=function(f){return c(h(f))}},6180:function(o,y,r){var c=r(1748);o.exports=function(h){var f=+h;return f!=f||f===0?0:c(f)}},7584:function(o,y,r){var c=r(6180),h=Math.min;o.exports=function(f){var g=c(f);return g>0?h(g,9007199254740991):0}},4356:function(o,y,r){var c=r(5436),h=Object;o.exports=function(f){return h(c(f))}},7024:function(o,y,r){var c=r(8448),h=r(1632),f=r(7728),g=r(4504),p=r(2104),C=r(9972),_=TypeError,O=C("toPrimitive");o.exports=function(T,P){if(!h(T)||f(T))return T;var z,R=g(T,O);if(R){if(P===void 0&&(P="default"),z=c(R,T,P),!h(z)||f(z))return z;throw new _("Can't convert object to primitive value")}return P===void 0&&(P="number"),p(T,P)}},88:function(o,y,r){var c=r(7024),h=r(7728);o.exports=function(f){var g=c(f,"string");return h(g)?g:g+""}},16:function(o,y,r){var c={};c[r(9972)("toStringTag")]="z",o.exports=String(c)==="[object z]"},5016:function(o,y,r){var c=r(4427),h=String;o.exports=function(f){if(c(f)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return h(f)}},36:function(o){var y=String;o.exports=function(r){try{return y(r)}catch{return"Object"}}},7776:function(o,y,r){var c=r(1664),h=0,f=Math.random(),g=c(1 .toString);o.exports=function(p){return"Symbol("+(p===void 0?"":p)+")_"+g(++h+f,36)}},6536:function(o,y,r){var c=r(772);o.exports=c&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(o,y,r){var c=r(3476),h=r(9957);o.exports=c&&h((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(o,y,r){var c=r(6420),h=r(4328),f=c.WeakMap;o.exports=h(f)&&/native code/.test(String(f))},9972:function(o,y,r){var c=r(6420),h=r(4696),f=r(5152),g=r(7776),p=r(772),C=r(6536),_=c.Symbol,O=h("wks"),T=C?_.for||_:_&&_.withoutSetter||g;o.exports=function(P){return f(O,P)||(O[P]=p&&f(_,P)?_[P]:T("Symbol."+P)),O[P]}},6488:function(o,y,r){var c=r(5232),h=r(5152),f=r(3440),g=r(7e3),p=r(4024),C=r(9968),_=r(584),O=r(7512),T=r(8948),P=r(3480),z=r(3696),R=r(3476),Y=r(7048);o.exports=function(v,N,w,M){var W="stackTraceLimit",$=M?2:1,L=v.split("."),A=L[L.length-1],B=c.apply(null,L);if(B){var J=B.prototype;if(!Y&&h(J,"cause")&&delete J.cause,!w)return B;var ae=c("Error"),ee=N((function(fe,Z){var ue=T(M?Z:fe,void 0),se=M?new B(fe):new B;return ue!==void 0&&f(se,"message",ue),z(se,ee,se.stack,2),this&&g(J,this)&&O(se,this,ee),arguments.length>$&&P(se,arguments[$]),se}));if(ee.prototype=J,A!=="Error"?p?p(ee,ae):C(ee,ae,{name:!0}):R&&W in B&&(_(ee,B,W),_(ee,B,"prepareStackTrace")),C(ee,B),!Y)try{J.name!==A&&f(J,"name",A),J.constructor=ee}catch{}return ee}}},7476:function(o,y,r){var c=r(9160),h=r(9957),f=r(1432),g=r(1632),p=r(4356),C=r(3556),_=r(4316),O=r(92),T=r(2568),P=r(953),z=r(9972),R=r(8504),Y=z("isConcatSpreadable"),v=R>=51||!h((function(){var w=[];return w[Y]=!1,w.concat()[0]!==w})),N=function(w){if(!g(w))return!1;var M=w[Y];return M!==void 0?!!M:f(w)};c({target:"Array",proto:!0,arity:1,forced:!v||!P("concat")},{concat:function(w){var M,W,$,L,A,B=p(this),J=T(B,0),ae=0;for(M=-1,$=arguments.length;M<$;M++)if(N(A=M===-1?B:arguments[M]))for(L=C(A),_(ae+L),W=0;W<L;W++,ae++)W in A&&O(J,ae,A[W]);else _(ae+1),O(J,ae++,A);return J.length=ae,J}})},6932:function(o,y,r){var c=r(9160),h=r(3364).filter;c({target:"Array",proto:!0,forced:!r(953)("filter")},{filter:function(f){return h(this,f,arguments.length>1?arguments[1]:void 0)}})},700:function(o,y,r){var c=r(9160),h=r(1664),f=r(5712),g=r(4096),p=r(1496),C=h([].join);c({target:"Array",proto:!0,forced:f!==Object||!p("join",",")},{join:function(_){return C(g(this),_===void 0?",":_)}})},4456:function(o,y,r){var c=r(9160),h=r(3364).map;c({target:"Array",proto:!0,forced:!r(953)("map")},{map:function(f){return h(this,f,arguments.length>1?arguments[1]:void 0)}})},4728:function(o,y,r){var c=r(9160),h=r(4356),f=r(3556),g=r(6728),p=r(4316);c({target:"Array",proto:!0,arity:1,forced:r(9957)((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!(function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(C){return C instanceof TypeError}})()},{push:function(C){var _=h(this),O=f(_),T=arguments.length;p(O+T);for(var P=0;P<T;P++)_[O]=arguments[P],O++;return g(_,O),O}})},8752:function(o,y,r){var c=r(9160),h=r(6420),f=r(908),g=r(6488),p="WebAssembly",C=h[p],_=new Error("e",{cause:7}).cause!==7,O=function(P,z){var R={};R[P]=g(P,z,_),c({global:!0,constructor:!0,arity:1,forced:_},R)},T=function(P,z){if(C&&C[P]){var R={};R[P]=g(p+"."+P,z,_),c({target:p,stat:!0,constructor:!0,arity:1,forced:_},R)}};O("Error",(function(P){return function(z){return f(P,this,arguments)}})),O("EvalError",(function(P){return function(z){return f(P,this,arguments)}})),O("RangeError",(function(P){return function(z){return f(P,this,arguments)}})),O("ReferenceError",(function(P){return function(z){return f(P,this,arguments)}})),O("SyntaxError",(function(P){return function(z){return f(P,this,arguments)}})),O("TypeError",(function(P){return function(z){return f(P,this,arguments)}})),O("URIError",(function(P){return function(z){return f(P,this,arguments)}})),T("CompileError",(function(P){return function(z){return f(P,this,arguments)}})),T("LinkError",(function(P){return function(z){return f(P,this,arguments)}})),T("RuntimeError",(function(P){return function(z){return f(P,this,arguments)}}))},508:function(o,y,r){var c=r(3476),h=r(6208).EXISTS,f=r(1664),g=r(2544),p=Function.prototype,C=f(p.toString),_=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,O=f(_.exec);c&&!h&&g(p,"name",{configurable:!0,get:function(){try{return O(_,C(this))[1]}catch{return""}}})},232:function(o,y,r){var c=r(9160),h=r(9292);c({target:"Object",stat:!0,arity:2,forced:Object.assign!==h},{assign:h})},5443:function(o,y,r){var c=r(16),h=r(6076),f=r(7032);c||h(Object.prototype,"toString",f,{unsafe:!0})},880:function(o,y,r){var c=r(9160),h=r(7680);c({target:"RegExp",proto:!0,forced:/./.exec!==h},{exec:h})},9836:function(o,y,r){var c=r(8448),h=r(7176),f=r(3951),g=r(9760),p=r(7584),C=r(5016),_=r(5436),O=r(4504),T=r(4764),P=r(9092);h("match",(function(z,R,Y){return[function(v){var N=_(this),w=g(v)?void 0:O(v,z);return w?c(w,v,N):new RegExp(v)[z](C(N))},function(v){var N=f(this),w=C(v),M=Y(R,N,w);if(M.done)return M.value;if(!N.global)return P(N,w);var W=N.unicode;N.lastIndex=0;for(var $,L=[],A=0;($=P(N,w))!==null;){var B=C($[0]);L[A]=B,B===""&&(N.lastIndex=T(w,p(N.lastIndex),W)),A++}return A===0?null:L}]}))},3536:function(o,y,r){var c=r(9160),h=r(6420),f=r(6100),g=r(3951),p=r(4328),C=r(7796),_=r(2544),O=r(92),T=r(9957),P=r(5152),z=r(9972),R=r(336).IteratorPrototype,Y=r(3476),v=r(7048),N="constructor",w="Iterator",M=z("toStringTag"),W=TypeError,$=h[w],L=v||!p($)||$.prototype!==R||!T((function(){$({})})),A=function(){if(f(this,R),C(this)===R)throw new W("Abstract class Iterator not directly constructable")},B=function(J,ae){Y?_(R,J,{configurable:!0,get:function(){return ae},set:function(ee){if(g(this),this===R)throw new W("You can't redefine this property");P(this,J)?this[J]=ee:O(this,J,ee)}}):R[J]=ae};P(R,M)||B(M,w),!L&&P(R,N)&&R[N]!==Object||B(N,A),A.prototype=R,c({global:!0,constructor:!0,forced:L},{Iterator:A})},2144:function(o,y,r){var c=r(9160),h=r(8448),f=r(8952),g=r(3951),p=r(6752),C=r(9724),_=r(8696),O=r(7048),T=C((function(){for(var P,z,R=this.iterator,Y=this.predicate,v=this.next;;){if(P=g(h(v,R)),this.done=!!P.done)return;if(z=P.value,_(R,Y,[z,this.counter++],!0))return z}}));c({target:"Iterator",proto:!0,real:!0,forced:O},{filter:function(P){return g(this),f(P),new T(p(this),{predicate:P})}})},9080:function(o,y,r){var c=r(9160),h=r(5792);c({target:"Iterator",proto:!0,real:!0,forced:r(7048)},{map:h})}},x={};function D(o){var y=x[o];if(y!==void 0)return y.exports;var r=x[o]={exports:{}};return s[o].call(r.exports,r,r.exports,D),r.exports}D.d=function(o,y){for(var r in y)D.o(y,r)&&!D.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:y[r]})},D.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),D.o=function(o,y){return Object.prototype.hasOwnProperty.call(o,y)},D.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var F={};return(function(){D.r(F),D.d(F,{default:function(){return _}}),D(8752),D(6932),D(700),D(4456),D(4728),D(508),D(232),D(5443),D(880),D(9836),D(3536),D(2144),D(9080);var o=D(680);D(7476);function y(O,T){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(P,z){return P.__proto__=z,P},y(O,T)}var r=(function(O){var T,P;function z(){for(var Y,v=arguments.length,N=new Array(v),w=0;w<v;w++)N[w]=arguments[w];return(Y=O.call.apply(O,[this].concat(N))||this).state={bump:!1,debounced:!1},Y}P=O,(T=z).prototype=Object.create(P.prototype),T.prototype.constructor=T,y(T,P);var R=z.prototype;return R.componentWillMount=function(){var Y,v,N,w=this;this.debounceStatusUpdate=(Y=function(){if(!w.state.debounced){var M=!w.props.isInFocus||w.props.validChoiceMade;w.setState((function(W){return{bump:!W.bump,debounced:!0,silenced:M}}))}},v=1400,function(){var M=this,W=arguments;clearTimeout(N),N=setTimeout((function(){N=null,Y.apply(M,W)}),v)})},R.componentWillReceiveProps=function(Y){Y.queryLength,this.setState({debounced:!1})},R.render=function(){var Y=this.props,v=Y.id,N=Y.length,w=Y.queryLength,M=Y.minQueryLength,W=Y.selectedOption,$=Y.selectedOptionIndex,L=Y.tQueryTooShort,A=Y.tNoResults,B=Y.tSelectedOption,J=Y.tResults,ae=Y.className,ee=this.state,fe=ee.bump,Z=ee.debounced,ue=ee.silenced,se=w<M,ye=N===0,ce=W?B(W,N,$):"",Q=null;return Q=se?L(M):ye?A():J(N,ce),this.debounceStatusUpdate(),(0,o.createElement)("div",{className:ae,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:v+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!ue&&Z&&fe?Q:""),(0,o.createElement)("div",{id:v+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},ue||!Z||fe?"":Q))},z})(o.Component);r.defaultProps={tQueryTooShort:function(O){return"Type in "+O+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(O,T,P){return O+" "+(P+1)+" of "+T+" is highlighted"},tResults:function(O,T){return O+" "+(O===1?"result":"results")+" "+(O===1?"is":"are")+" available. "+T}};var c=function(O){var T=O.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:T,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function h(){return h=Object.assign?Object.assign.bind():function(O){for(var T=1;T<arguments.length;T++){var P=arguments[T];for(var z in P)Object.prototype.hasOwnProperty.call(P,z)&&(O[z]=P[z])}return O},h.apply(this,arguments)}function f(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function g(O,T){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(P,z){return P.__proto__=z,P},g(O,T)}var p={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function C(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var _=(function(O){var T,P;function z(Y){var v;return(v=O.call(this,Y)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:Y.defaultValue?[Y.defaultValue]:[],query:Y.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(f(v)),v.handleKeyDown=v.handleKeyDown.bind(f(v)),v.handleUpArrow=v.handleUpArrow.bind(f(v)),v.handleDownArrow=v.handleDownArrow.bind(f(v)),v.handleEnter=v.handleEnter.bind(f(v)),v.handlePrintableKey=v.handlePrintableKey.bind(f(v)),v.handleListMouseLeave=v.handleListMouseLeave.bind(f(v)),v.handleOptionBlur=v.handleOptionBlur.bind(f(v)),v.handleOptionClick=v.handleOptionClick.bind(f(v)),v.handleOptionFocus=v.handleOptionFocus.bind(f(v)),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(f(v)),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(f(v)),v.handleInputBlur=v.handleInputBlur.bind(f(v)),v.handleInputChange=v.handleInputChange.bind(f(v)),v.handleInputClick=v.handleInputClick.bind(f(v)),v.handleInputFocus=v.handleInputFocus.bind(f(v)),v.pollInputElement=v.pollInputElement.bind(f(v)),v.getDirectInputChanges=v.getDirectInputChanges.bind(f(v)),v}P=O,(T=z).prototype=Object.create(P.prototype),T.prototype.constructor=T,g(T,P);var R=z.prototype;return R.isQueryAnOption=function(Y,v){var N=this;return v.map((function(w){return N.templateInputValue(w).toLowerCase()})).indexOf(Y.toLowerCase())!==-1},R.componentDidMount=function(){this.pollInputElement()},R.componentWillUnmount=function(){clearTimeout(this.$pollInput)},R.pollInputElement=function(){var Y=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){Y.pollInputElement()}),100)},R.getDirectInputChanges=function(){var Y=this.elementReferences[-1];Y&&Y.value!==this.state.query&&this.handleInputChange({target:{value:Y.value}})},R.componentDidUpdate=function(Y,v){var N=this.state.focused,w=N===null,M=v.focused!==N;M&&!w&&this.elementReferences[N].focus();var W=N===-1,$=M&&v.focused===null;if(W&&$){var L=this.elementReferences[N];L.setSelectionRange(0,L.value.length)}},R.hasAutoselect=function(){return!C()&&this.props.autoselect},R.templateInputValue=function(Y){var v=this.props.templates&&this.props.templates.inputValue;return v?v(Y):Y},R.templateSuggestion=function(Y){var v=this.props.templates&&this.props.templates.suggestion;return v?v(Y):Y},R.handleComponentBlur=function(Y){var v,N=this.state,w=N.options,M=N.query,W=N.selected;this.props.confirmOnBlur?(v=Y.query||M,this.props.onConfirm(w[W])):v=M,this.setState({focused:null,menuOpen:Y.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,w)})},R.handleListMouseLeave=function(Y){this.setState({hovered:null})},R.handleOptionBlur=function(Y,v){var N=this.state,w=N.focused,M=N.menuOpen,W=N.options,$=N.selected,L=Y.relatedTarget===null,A=Y.relatedTarget===this.elementReferences[-1],B=w!==v&&w!==-1;if(!B&&L||!(B||A)){var J=M&&C();this.handleComponentBlur({menuOpen:J,query:this.templateInputValue(W[$])})}},R.handleInputBlur=function(Y){var v=this.state,N=v.focused,w=v.menuOpen,M=v.options,W=v.query,$=v.selected;if(N===-1){var L=w&&C(),A=C()?W:this.templateInputValue(M[$]);this.handleComponentBlur({menuOpen:L,query:A})}},R.handleInputChange=function(Y){var v=this,N=this.props,w=N.minLength,M=N.source,W=N.showAllValues,$=this.hasAutoselect(),L=Y.target.value,A=L.length===0,B=this.state.query!==L,J=L.length>=w;this.setState({query:L,ariaHint:A}),W||!A&&B&&J?M(L,(function(ae){var ee=ae.length>0;v.setState({menuOpen:ee,options:ae,selected:$&&ee?0:-1,validChoiceMade:!1})})):!A&&J||this.setState({menuOpen:!1,options:[]})},R.handleInputClick=function(Y){this.handleInputChange(Y)},R.handleInputFocus=function(Y){var v=this.state,N=v.query,w=v.validChoiceMade,M=v.options,W=this.props.minLength,$=!w&&N.length>=W&&M.length>0;$?this.setState((function(L){var A=L.menuOpen;return{focused:-1,menuOpen:$||A,selected:-1}})):this.setState({focused:-1})},R.handleOptionFocus=function(Y){this.setState({focused:Y,hovered:null,selected:Y})},R.handleOptionMouseEnter=function(Y,v){C()||this.setState({hovered:v})},R.handleOptionClick=function(Y,v){var N=this.state.options[v],w=this.templateInputValue(N);this.props.onConfirm(N),this.setState({focused:-1,hovered:null,menuOpen:!1,query:w,selected:-1,validChoiceMade:!0}),this.forceUpdate()},R.handleOptionMouseDown=function(Y){Y.preventDefault()},R.handleUpArrow=function(Y){Y.preventDefault();var v=this.state,N=v.menuOpen,w=v.selected;w!==-1&&N&&this.handleOptionFocus(w-1)},R.handleDownArrow=function(Y){var v=this;if(Y.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)Y.preventDefault(),this.props.source("",(function($){v.setState({menuOpen:!0,options:$,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var N=this.state,w=N.menuOpen,M=N.options,W=N.selected;W!==M.length-1&&w&&this.handleOptionFocus(W+1)}},R.handleSpace=function(Y){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(Y.preventDefault(),this.props.source("",(function(N){v.setState({menuOpen:!0,options:N})}))),this.state.focused!==-1&&(Y.preventDefault(),this.handleOptionClick(Y,this.state.focused))},R.handleEnter=function(Y){this.state.menuOpen&&(Y.preventDefault(),this.state.selected>=0&&this.handleOptionClick(Y,this.state.selected))},R.handlePrintableKey=function(Y){var v=this.elementReferences[-1];Y.target===v||v.focus()},R.handleKeyDown=function(Y){switch(p[Y.keyCode]){case"up":this.handleUpArrow(Y);break;case"down":this.handleDownArrow(Y);break;case"space":this.handleSpace(Y);break;case"enter":this.handleEnter(Y);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((v=Y.keyCode)>47&&v<58||v===32||v===8||v>64&&v<91||v>95&&v<112||v>185&&v<193||v>218&&v<223)&&this.handlePrintableKey(Y)}var v},R.render=function(){var Y,v=this,N=this.props,w=N.cssNamespace,M=N.displayMenu,W=N.id,$=N.minLength,L=N.name,A=N.placeholder,B=N.required,J=N.showAllValues,ae=N.tNoResults,ee=N.tStatusQueryTooShort,fe=N.tStatusNoResults,Z=N.tStatusSelectedOption,ue=N.tStatusResults,se=N.tAssistiveHint,ye=N.dropdownArrow,ce=N.menuAttributes,Q=N.inputClasses,ve=N.hintClasses,Pe=N.menuClasses,_e=this.state,Te=_e.focused,Ae=_e.hovered,ze=_e.menuOpen,E=_e.options,b=_e.query,H=_e.selected,j=_e.ariaHint,I=_e.validChoiceMade,V=this.hasAutoselect(),te=Te===-1,ie=E.length===0,be=b.length!==0,de=b.length>=$,me=this.props.showNoOptionsFound&&te&&ie&&be&&de,Se=w+"__wrapper",Ee=w+"__status",He=w+"__dropdown-arrow-down",Ie=Te!==-1&&Te!==null,Je=w+"__option",Ze=w+"__hint",ge=this.templateInputValue(E[H]),we=ge&&ge.toLowerCase().indexOf(b.toLowerCase())===0&&V?b+ge.substr(b.length):"",Qe=W+"__assistiveHint",tt={"aria-describedby":j?Qe:null,"aria-expanded":ze?"true":"false","aria-activedescendant":Ie?W+"__option--"+Te:null,"aria-controls":W+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};J&&typeof(Y=ye({className:He}))=="string"&&(Y=(0,o.createElement)("div",{className:w+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:Y}}));var ht=w+"__input",vt=[ht,this.props.showAllValues?ht+"--show-all-values":ht+"--default"];Te!==null&&vt.push(ht+"--focused"),Q&&vt.push(Q);var pt=w+"__menu",lt=[pt,pt+"--"+M,pt+"--"+(ze||me?"visible":"hidden")];Pe&<.push(Pe),(ce!=null&&ce.class||ce!=null&&ce.className)&<.push((ce==null?void 0:ce.class)||(ce==null?void 0:ce.className));var _t=Object.assign({"aria-labelledby":W},ce,{id:W+"__listbox",role:"listbox",className:lt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete _t.class,(0,o.createElement)("div",{className:Se,onKeyDown:this.handleKeyDown},(0,o.createElement)(r,{id:W,length:E.length,queryLength:b.length,minQueryLength:$,selectedOption:this.templateInputValue(E[H]),selectedOptionIndex:H,validChoiceMade:I,isInFocus:this.state.focused!==null,tQueryTooShort:ee,tNoResults:fe,tSelectedOption:Z,tResults:ue,className:Ee}),we&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:[Ze,ve===null?Q:ve].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:we})),(0,o.createElement)("input",h({},tt,{autoComplete:"off",className:vt.join(" "),id:W,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:L,placeholder:A,ref:function(bt){v.elementReferences[-1]=bt},type:"text",role:"combobox",required:B,value:b})),Y,(0,o.createElement)("ul",_t,E.map((function(bt,Be){var gt=(Te===-1?H===Be:Te===Be)&&Ae===null?" "+Je+"--focused":"",ft=Be%2?" "+Je+"--odd":"",ut=C()?"<span id="+W+"__option-suffix--"+Be+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(Be+1)+" of "+E.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Te===Be?"true":"false",className:""+Je+gt+ft,dangerouslySetInnerHTML:{__html:v.templateSuggestion(bt)+ut},id:W+"__option--"+Be,key:Be,onBlur:function(it){return v.handleOptionBlur(it,Be)},onClick:function(it){return v.handleOptionClick(it,Be)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(it){return v.handleOptionMouseEnter(it,Be)},ref:function(it){v.elementReferences[Be]=it},role:"option",tabIndex:"-1","aria-posinset":Be+1,"aria-setsize":E.length})})),me&&(0,o.createElement)("li",{className:Je+" "+Je+"--no-results",role:"option","aria-disabled":"true"},ae())),(0,o.createElement)("span",{id:Qe,style:{display:"none"}},se()))},z})(o.Component);_.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:c,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),F})()}))})(vr)),vr.exports}var hn,Ls;function Gf(){return Ls||(Ls=1,hn=Uf()),hn}var Jf=Gf();const Kf=bn(Jf),Xf=({value:l,defaultValue:n="",onConfirm:u,source:s,disabled:x,onClear:D,tClearInput:F=()=>"Clear input",...o})=>{const y=G.useRef(null),r=g=>{setTimeout(()=>{y.current&&(y.current.elementReferences[-1].value=g)},0)};G.useEffect(()=>{l!==void 0&&r(l)},[l]),G.useEffect(()=>{x?y.current&&(y.current.elementReferences[-1].disabled=!0):y.current&&(y.current.elementReferences[-1].disabled=!1)},[x]);const c=()=>{D&&D()},h=(g,p)=>{y.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&s(g,p)},f=g=>{g?u(g):r(l)};return m.jsxs("div",{style:{position:"relative",width:"100%"},children:[m.jsx(Kf,{ref:y,...o,defaultValue:n,onConfirm:f,source:h}),!!(l&&l.length>0&&!x)&&m.jsx("button",{onClick:c,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":F(),children:m.jsx(le.Icon,{icon:"it-close",size:"sm",title:F()})})]})},Zf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Qf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",em="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",tm=({position:l,areasLayer:n,bounds:u,onMarkedMoved:s})=>{const x=G.useRef(null);let D=null;const[F,o]=G.useState([]),y=At.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),r=[41.9,12.5],c=()=>{const h=At.map(x.current,{keyboard:!1,minZoom:6,maxZoom:17}).setView(r,10);y.addTo(h),n&&n.map(g=>{g.addTo(h)});const f=l?[`${l.lat}`,`${l.lon}`]:u?u.getCenter():r;if(delete At.Icon.Default.prototype._getIconUrl,At.Icon.Default.mergeOptions({iconRetinaUrl:Zf,iconUrl:Qf,shadowUrl:em}),D=At.marker(f,{draggable:!0}).addTo(h),D.on("moveend",function(g){const p=g.target.getLatLng();s(p,D)}),!l&&u)h.fitBounds(u);else{const g=l?[l.lat,l.lon]:r;D&&(D.setLatLng(g).update(),h.setView(g,15))}};return G.useEffect(()=>{x.current&&c()},[x]),m.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:m.jsx("div",{ref:x,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},rm=({component:l,value:n,current:u,onChange:s,i18next:x})=>{const[D,F]=G.useState(null),[o,y]=G.useState([]),[r,c]=G.useState(),[h,f]=G.useState(),[g,p]=G.useState(!1),[C,_]=G.useState(),[O,T]=G.useState(!1),[P,z]=G.useState(),[R,Y]=G.useState(),[v,N]=G.useState(!1),[w,M]=G.useState(""),[W,$]=G.useState(""),[L,A]=G.useState(!1),[B,J]=G.useState(!1),ee=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:fe}=window.OC_SERVICE_DETAILS,Z=G.useRef(),ue=x.language;let se=At.latLngBounds();const ye=ee||(fe&&fe.length>0?fe:void 0),ce=(E,b)=>{Z.current=E;const H=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(E)}&countrycodes=it&viewbox=${r}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${ue}`;let j=[],I=[];T(!0),fetch(H).then(V=>V.json()).then(V=>{if(V.length&&Z.current===E){T(!0);const te=V.map((ie,be)=>{const{lat:de,lon:me}=ie,Se=`${Fe()}/api/geographic-areas/contains?lat=${de}&lon=${me}&geographic_areas_ids=${C.join(",")}`;return fetch(Se).then(Ee=>Ee.json()).then(Ee=>Ee.result?(ie.label=aa(ie),ie):null)});return Promise.all(te)}else Z.current===E&&(b([]),T(!1))}).then(V=>{V=V?V.filter(te=>te!==null):[],V.length>0?(V.forEach((te,ie)=>{V[ie].label=aa(te)}),V=gi.uniqWith(V,(te,ie)=>te.label===ie.label),V.forEach((te,ie)=>{I.push(te.label),j.push(te)}),Z.current===E&&(b(I),y(j),T(!1))):Z.current===E&&(b([]),T(!1))}).catch(V=>{console.error("Error fetching locations:",V),T(!1)})},Q=(E,b)=>{ce(E,b)},ve=(E,b)=>{const{lat:H,lng:j}=E,I=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${H}&lon=${j}&accept-language=${ue}`;fetch(I).then(V=>V.json()).then(V=>{if(V&&V.display_name)if(V.label=aa(V),V.lat=H,V.lon=j,b)b.bindPopup(`${V.label}`).openPopup(),Y(V);else{Y(V);return}}).catch(V=>console.error("Error with reverse geocoding:",V))};function Pe(){navigator.geolocation.getCurrentPosition(E=>{let b=E.coords.latitude,H=E.coords.longitude;if((C||[]).length>0){const I=`${Fe()}/api/geographic-areas/contains?lat=${b}&lon=${H}&geographic_areas_ids=${C.join(",")}`;fetch(I).then(V=>V.json()).then(V=>{V.result&&(F({lat:b,lon:H}),ve({lat:b,lng:H})),J(!B)})}else F({lat:b,lon:H}),ve({lat:b,lng:H}),J(!B)},E=>{(E==null?void 0:E.code)===1?(A(!L),$(x.t("error_message_code_1"))):(E==null?void 0:E.code)===2?(A(!L),$(x.t("error_message_code_2"))):(E==null?void 0:E.code)===3?(A(!L),$(x.t("error_message_code_3"))):(A(!L),$(x.t("error_message_generic")))})}G.useEffect(()=>{n&&F(n),u.valuePosition&&F(u.valuePosition)},[n,u]);const _e=()=>{n&&F(n),u.valuePosition&&F(u.valuePosition)};G.useEffect(()=>{var E;(E=window==null?void 0:window.Formio)==null||E.formioReady.then(()=>{setTimeout(()=>{_e(),Te()},1)})},[]);const Te=()=>{let b=`${Fe()}/api/geographic-areas`,H=[],j=[];fetch(b).then(I=>I.json()).then(I=>{if(Array.isArray(I)&&I.length>0){I.filter(ie=>ye?Array.isArray(ye)?ye.includes(ie.id):ie.id===ye:!0).forEach(ie=>{H.push(ie.id);const be=JSON.parse(ie.geofence),de=At.geoJSON(be,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(me){return me.geometry.type==="Polygon"||me.geometry.type==="MultiPolygon"}});se.extend(de.getBounds()),j.push(de)}),f(j),_(H),z(se);const V=se.getNorthEast(),te=se.getSouthWest();c([V.lng,V.lat,te.lng,te.lat])}else console.log("No geographic_areas_ids found.")}).catch(I=>{console.error("Error with reverse geocoding:",I)})},Ae=()=>{M(D!=null&&D.label?D.label:"")};G.useEffect(()=>{Ae(),s(D)},[D]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&v===!1?N(!0):N(!1)},[]);const ze=()=>{if(R){const E=`${Fe()}/api/geographic-areas/contains?lat=${R.lat}&lon=${R.lon}&geographic_areas_ids=${C.join(",")}`;p(!0),fetch(E).then(b=>b.json()).then(b=>{p(!1),b?b.result===!1?Ge.fire({title:"",html:"<p>"+x.t("Attenzione: Il luogo selezionato si trova al di fuori dell’area coperta dal servizio. Per favore, scegli un luogo all'interno dell'area evidenziata nella mappa.")+"</p>",icon:"error",cancelButtonText:x.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):b.result===!0&&(J(!B),F(R)):(p(!1),console.log("No geographic-areas/contains ."))}).catch(b=>{console.error("Error with geographic-areas/contains:",b),Ge.fire({title:"",html:"<p>"+b+"</p>",icon:"error",cancelButtonText:x.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return m.jsx("div",{children:m.jsxs("div",{id:`address-map-container-${l.key}`,className:"address-map-container",children:[m.jsx("div",{children:m.jsxs(le.Modal,{wrapClassName:"formio-component-address_map",isOpen:B,size:"lg",scrollable:!0,toggle:()=>J(!B),labelledBy:"esempio2",container:document.body,children:[m.jsx(le.ModalHeader,{toggle:()=>J(!B),id:"esempio2",children:x.t("Individua il luogo sulla mappa")}),m.jsxs(le.ModalBody,{children:[m.jsx("p",{children:m.jsx("small",{children:x.t("Trascina l’icona nel punto preciso in cui si verifica l’evento che vuoi segnalare e fai click su Salva indirizzo")})}),m.jsx(tm,{position:D,areasLayer:h,bounds:P,onMarkedMoved:(E,b)=>{ve(E,b)}})]}),m.jsxs(le.ModalFooter,{children:[m.jsx(le.Button,{color:"secondary",onClick:()=>J(!B),children:x.t("Chiudi")}),m.jsx(le.Button,{color:"primary",onClick:()=>{ze()},disabled:!R||g,children:x.t("Salva indirizzo")})]})]})}),m.jsx("div",{children:m.jsxs(le.Modal,{isOpen:L,toggle:()=>A(!L),withIcon:!0,labelledBy:"error-modal-message",container:document.body,children:[m.jsx(le.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:x.t("warning")}),m.jsx(le.ModalBody,{children:m.jsx("p",{children:W})}),m.jsx(le.ModalFooter,{children:m.jsx(le.Button,{color:"primary",onClick:()=>A(!L),children:x.t("close")})})]})}),m.jsxs("div",{className:"position-relative",children:[m.jsx(Xf,{id:`${l.id}-${l.key}`,inputClasses:"form-control",source:gi.debounce(Q,520),onConfirm:E=>{if(T(!1),Z.current="",E){E===""&&F(null);let b=o.find(H=>H.label===E);F(b)}},onClear:()=>{T(!1),Z.current="",F(null)},dropdownArrow:()=>null,minLength:3,disabled:v,confirmOnBlur:!0,showNoOptionsFound:!O,defaultValue:D==null?void 0:D.label,value:w,tNoResults:()=>x.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>x.t("Clear input")}),O&&m.jsx("div",{className:"position-absolute",style:{width:"100%",bottom:"0px"},children:m.jsx(le.Progress,{indeterminate:!0,label:"In elaborazione..."})})]}),!v&&m.jsxs(le.Button,{type:"button",value:x.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Pe():(J(!0),Y(!1))},icon:!0,className:"px-0 primary-color",children:[m.jsx(le.Icon,{color:"primary",icon:"it-map-marker-circle",role:"presentation"}),m.jsx("span",{children:x.t("Individua con precisione sulla mappa")})]})]})})},Cr=class Cr extends ot.ReactComponent{constructor(n,u,s){super(n,u,s)}static get builderInfo(){return{title:"Address Map",group:"basic",icon:"fa fa-map-location-dot",documentation:"",weight:70,schema:Cr.schema()}}static schema(){return ot.ReactComponent.schema({type:"address_map"})}attachReact(n,u){this.rootComponent=Ft.createRoot(n),this.rootComponent.render(m.jsx(rm,{ref:u,component:this.component,value:this.dataValue,onChange:s=>this.setValue(s),...this,current:this},this.dataValue))}setValue(n){this.valuePosition=n,this.updateValue(n)}getValue(){return this.valuePosition}init(){super.init()}render(){return super.render(`<div id="react-${this.id} ref="react-${this.id}"></div>`)}};Tt(Cr,"editForm",$f);let xr=Cr;const am=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function nm(...l){return ot.Components.baseEditForm([{key:"display",components:am}],...l)}const Ws=_n.Formio.Components.components.input,im=({component:l,current:n,onChange:u,i18next:s})=>{var $,L;const x="list-services",D="selected-category",[F,o]=G.useState([]),[y,r]=G.useState([]),[c,h]=G.useState(null),[f,g]=G.useState(null),[p,C]=G.useState(""),[_,O]=G.useState(!1),[T,P]=G.useState(!1),z=G.useRef(!1),R=G.useRef(),Y=G.useMemo(()=>{if(!c)return null;const A=y.find(J=>J.name===c);return A||F.find(J=>J.name===c)||null},[c,y,F]),v=G.useMemo(()=>(Y==null?void 0:Y.services)||[],[Y]),N=async()=>{var Z,ue;P(!0);const A=sessionStorage.getItem(x),B=sessionStorage.getItem(D);if(A)try{const se=JSON.parse(A);if(Array.isArray(se)&&se.length>0){o(se),r(se);const ye=se.find(ce=>ce.name===B)||se[0];return h((ye==null?void 0:ye.name)||null),P(!1),se}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const J=await window.FormioHelper.getBookingConfig(),ae={};J.forEach(se=>{(se.categories??[]).forEach(ye=>{ae[ye]||(ae[ye]={name:ye,services:[]}),ae[ye].services.push(se)})});const ee=Object.fromEntries(Object.entries(ae).sort(([se],[ye])=>se.localeCompare(ye,"it",{sensitivity:"base"}))),fe=Object.values(ee).filter(se=>(se.name??"").trim()!=="");return o(fe),r(fe),h(((Z=fe[0])==null?void 0:Z.name)||null),sessionStorage.setItem(x,JSON.stringify(fe)),sessionStorage.setItem(D,((ue=fe[0])==null?void 0:ue.name)||""),P(!1),fe};G.useEffect(()=>{c&&sessionStorage.setItem(D,c)},[c]),G.useEffect(()=>{z.current||(z.current=!0,N())},[]);const w=A=>{var Q;const B=(ve="")=>ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),J=(ve="")=>ve.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),ae=(ve="")=>ve.replace(/<[^>]*>/g," "),ee=(ve,Pe)=>new RegExp(`\\b${B(Pe)}`,"i").test(ve),fe=(ve,Pe)=>{const _e=J(ve.name),Te=J((ve.categories??[]).join(" ")),Ae=J(ae(ve.abstract??""));if(!Pe.every(b=>ee(_e,b)||ee(Te,b)||ee(Ae,b)))return-1;let E=0;for(const b of Pe)ee(_e,b)?E+=3:ee(Te,b)?E+=2:ee(Ae,b)&&(E+=1);return E},Z=A.target.value;C(Z);const ue=J(Z);if(!ue){r(F),h(ve=>{var Pe;return ve??((Pe=F[0])==null?void 0:Pe.name)??null});return}const se=ue.split(" ").filter(Boolean),ye=F.map(ve=>{const Pe=ve.services.map(_e=>({service:_e,score:fe(_e,se)})).filter(_e=>_e.score>=0).sort((_e,Te)=>Te.score-_e.score).map(_e=>_e.service);return Pe.length?{...ve,services:Pe}:null}).filter(Boolean);r(ye);const ce=ye.some(ve=>ve.name===c);h(ce?c:((Q=ye[0])==null?void 0:Q.name)??null)},M=A=>{g(A);const B=F.find(J=>J.services.some(ae=>ae.id===A.id));B&&h(B.name),u({id:A.id,link:A.link,name:A.name,show_howto_in_motivation:A.show_howto_in_motivation,categories:A.categories,offices:A.offices,abstract:A.abstract,view_type:A.view_type}),n.data.user_group=null,Xs()},W=A=>{h(A.name),g(null),C(""),r(F),u({})};return G.useEffect(()=>{const A=!!document.querySelector(".formio-read-only");O(A)},[]),G.useEffect(()=>{const A=setTimeout(()=>{const B=(n==null?void 0:n.dataValue)??(n==null?void 0:n.getValue());if(B!=null&&B.id&&(g(B),F.length>0)){const J=F.find(ae=>ae.services.some(ee=>ee.id===B.id));J&&h(J.name)}},500);return()=>clearTimeout(A)},[n==null?void 0:n.dataValue,n==null?void 0:n.data,F]),G.useEffect(()=>{const A=window.FormioInstance;if(!A)return;const B=()=>{var ae,ee,fe;const J=(fe=(ae=A.submission)==null?void 0:ae.data)==null?void 0:fe[(ee=n==null?void 0:n.component)==null?void 0:ee.key];if(J!=null&&J.id&&(g(J),F.length>0)){const Z=F.find(ue=>ue.services.some(se=>se.id===J.id));Z&&h(Z.name)}};return A.on("change",B),()=>A.off("change",B)},[F,($=n==null?void 0:n.component)==null?void 0:$.key]),T?m.jsx("div",{className:"services-booking",ref:R,children:m.jsxs("div",{children:[s.t("Caricamento in corso"),"..."]})}):m.jsx("div",{className:"services-booking",ref:R,children:F&&!_?m.jsxs(le.Container,{children:[m.jsx(le.Row,{className:"mb-3",children:m.jsx(le.Col,{children:m.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:s.t("Seleziona il servizio per cui stai richiedendo un appuntamento")})})}),m.jsx(le.Row,{className:"mb-3",children:m.jsx(le.Col,{children:m.jsx("div",{className:"search-container",children:m.jsx(le.Input,{id:"search",label:s.t("Cerca"),type:"text",value:p,onChange:w,onInput:w,infoText:s.t("Cerca per categoria, servizio o descrizione")})})})}),m.jsxs(le.Row,{className:"mb-3",children:[Y?m.jsx(le.Col,{lg:3,md:4,className:"mb-4 mb-lg-0",children:m.jsxs("div",{className:"categories-list",children:[m.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:s.t("Categorie")}),y.length>0&&y.map(A=>{const B=c===A.name;return m.jsxs("button",{onClick:()=>W(A),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${B?"category-active bg-primary text-white":"bg-light text-dark"}`,children:[m.jsx("span",{className:"fw-500 d-block",children:A.name}),m.jsxs("small",{className:`d-block mt-1 ${B?"text-white":"text-muted"}`,children:[A.services.length," ",A.services.length>1?s.t("servizi"):s.t("servizio")]})]},A.name)})]})}):null,m.jsx(le.Col,{lg:Y?9:12,md:Y?8:12,children:m.jsxs("div",{className:"services-container",children:[v.length>0?m.jsxs("div",{className:"services-header mb-4",children:[m.jsx("h3",{className:"h5 fw-bold text-primary mb-0",children:Y==null?void 0:Y.name}),m.jsx("div",{className:"border-bottom border-primary mt-3 mb-4"})]}):null,v.length>0?m.jsx("div",{className:"services-list",children:v.map(A=>{const B=(f==null?void 0:f.id)===A.id,J=Hs.sanitize(A==null?void 0:A.abstract);return m.jsx("button",{onClick:()=>M(A),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${B?"border-primary border-2 bg-light":"border-light border-1 bg-white"}`,style:{cursor:"pointer"},tabindex:"0",role:"button","aria-label":`${A.name}`,"aria-pressed":B,children:m.jsx("div",{className:"d-flex justify-content-between align-items-start",children:m.jsxs("div",{className:"flex-grow-1",children:[m.jsx("h5",{className:"h6 fw-bold mb-2 text-dark",children:A.name}),(A==null?void 0:A.abstract)&&m.jsx("p",{className:"text-muted small mb-0",dangerouslySetInnerHTML:{__html:J}})]})})},A.id)})}):m.jsx("div",{className:"alert alert-info text-italic",children:s.t("Il servizio che stai cercando non è disponibile per la prenotazione appuntamento")})]})})]})]}):_?m.jsx("fieldset",{className:"it-page-section",children:m.jsx("div",{className:"cmp-card mt-2",children:m.jsxs("div",{className:"card has-bkg-grey shadow-sm p-big",children:[m.jsx("div",{className:"card-header border-0 p-0 mb-lg-30",children:m.jsx("div",{className:"d-flex",children:m.jsx("h2",{className:"title-xxlarge mb-1",children:Y==null?void 0:Y.name})})}),m.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:(L=n==null?void 0:n.dataValue)!=null&&L.id?m.jsx("div",{className:"services-list",children:m.jsx("div",{className:"service-card p-4 rounded border transition border-light border-1 bg-white",children:m.jsx("div",{className:"d-flex justify-content-between align-items-start",children:m.jsx("div",{className:"flex-grow-1",children:m.jsx("p",{className:"mb-2 text-dark text-paragraph",children:n.dataValue.name})})})},n.dataValue.id)}):null})]})})}):null})},Tr=class Tr extends Ws{constructor(n,u,s){super(n,u,s)}static get builderInfo(){return{title:"Lista Servizi",group:"basic",icon:"bi bi-list",documentation:"",weight:70,schema:Tr.schema()}}static schema(){return Ws.schema({type:"list-services"})}attach(n,u){this.rootComponent=Ft.createRoot(n),this.rootComponent.render(m.jsx(im,{ref:u,component:this.component,onChange:s=>this.setValue(s),...this,current:this}))}setValue(n){n&&(this.shouldSetValue=!0,this.updateValue(n))}getValue(){return this.dataValue}init(){super.init()}render(){return super.render()}};Tt(Tr,"editForm",nm);let Dr=Tr;const vn={pagebreak:br,dynamic_calendar:Js,calendar:wr,"calendar-advanced":Sr,sdcfile:Mr,address_map:xr,"list-services":Dr};function sm(l){if(!l||typeof l.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(vn).forEach(([n,u])=>{l.addComponent(n,u)}),vn}exports.Calendar=wr;exports.CalendarAdvanced=Sr;exports.FormioAddressMap=xr;exports.FormioDynamicCalendar=Js;exports.FormioListServices=Dr;exports.FormioPageBreak=br;exports.SdcFile=Mr;exports.formioCustomComponents=vn;exports.registerFormioComponents=sm;
|
|
107
107
|
//# sourceMappingURL=index.cjs.map
|