@opencitylabs/formio-custom-components 0.2.2 → 0.2.3
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 +20 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2245 -2237
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var tl=Object.defineProperty;var al=(g,i,m)=>i in g?tl(g,i,{enumerable:!0,configurable:!0,writable:!0,value:m}):g[i]=m;var Ct=(g,i,m)=>al(g,typeof i!="symbol"?i+"":i,m);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),ot=require("@formio/react"),Ft=require("react-dom/client"),va=require("react-day-picker"),xn=require("react-countdown"),
|
|
1
|
+
"use strict";var tl=Object.defineProperty;var al=(g,i,m)=>i in g?tl(g,i,{enumerable:!0,configurable:!0,writable:!0,value:m}):g[i]=m;var Ct=(g,i,m)=>al(g,typeof i!="symbol"?i+"":i,m);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),ot=require("@formio/react"),Ft=require("react-dom/client"),va=require("react-day-picker"),xn=require("react-countdown"),me=require("moment"),ue=require("design-react-kit"),Je=require("sweetalert2");require("i18next");const Ye=require("dayjs"),cr=require("@formio/js"),Zr=require("@event-calendar/core"),rl=require("react-dropzone"),qt=require("axios"),nl=require("mime"),il=require("jwt-decode"),Rt=require("leaflet"),en=require("lodash"),sl=require("dompurify");function ol(g){return g&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g}var pa={exports:{}},ea={};/**
|
|
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 tn;function ll(){if(tn)return ea;tn=1;var g=q,i=Symbol.for("react.element"),m=Symbol.for("react.fragment"),
|
|
9
|
+
*/var tn;function ll(){if(tn)return ea;tn=1;var g=q,i=Symbol.for("react.element"),m=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,$=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,F={key:!0,ref:!0,__self:!0,__source:!0};function K(o,x,a){var s,c={},d=null,p=null;a!==void 0&&(d=""+a),x.key!==void 0&&(d=""+x.key),x.ref!==void 0&&(p=x.ref);for(s in x)u.call(x,s)&&!F.hasOwnProperty(s)&&(c[s]=x[s]);if(o&&o.defaultProps)for(s in x=o.defaultProps,x)c[s]===void 0&&(c[s]=x[s]);return{$$typeof:i,type:o,key:d,ref:p,props:c,_owner:$.current}}return ea.Fragment=m,ea.jsx=K,ea.jsxs=K,ea}var ta={};/**
|
|
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 an;function ul(){return an||(an=1,process.env.NODE_ENV!=="production"&&(function(){var g=q,i=Symbol.for("react.element"),m=Symbol.for("react.portal"),
|
|
18
|
-
`+Ne+b}}var Ce=!1,Re;{var ze=typeof WeakMap=="function"?WeakMap:Map;Re=new ze}function
|
|
19
|
-
`),qe=
|
|
17
|
+
*/var an;function ul(){return an||(an=1,process.env.NODE_ENV!=="production"&&(function(){var g=q,i=Symbol.for("react.element"),m=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),K=Symbol.for("react.provider"),o=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),f=Symbol.iterator,j="@@iterator";function v(b){if(b===null||typeof b!="object")return null;var U=f&&b[f]||b[j];return typeof U=="function"?U:null}var D=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(b){{for(var U=arguments.length,X=new Array(U>1?U-1:0),le=1;le<U;le++)X[le-1]=arguments[le];Y("error",b,X)}}function Y(b,U,X){{var le=D.ReactDebugCurrentFrame,Me=le.getStackAddendum();Me!==""&&(U+="%s",X=X.concat([Me]));var Oe=X.map(function(ke){return String(ke)});Oe.unshift("Warning: "+U),Function.prototype.apply.call(console[b],console,Oe)}}var R=!1,E=!1,S=!1,y=!1,C=!1,z;z=Symbol.for("react.module.reference");function N(b){return!!(typeof b=="string"||typeof b=="function"||b===u||b===F||C||b===$||b===a||b===s||y||b===p||R||E||S||typeof b=="object"&&b!==null&&(b.$$typeof===d||b.$$typeof===c||b.$$typeof===K||b.$$typeof===o||b.$$typeof===x||b.$$typeof===z||b.getModuleId!==void 0))}function H(b,U,X){var le=b.displayName;if(le)return le;var Me=U.displayName||U.name||"";return Me!==""?X+"("+Me+")":X}function J(b){return b.displayName||"Context"}function w(b){if(b==null)return null;if(typeof b.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof b=="function")return b.displayName||b.name||null;if(typeof b=="string")return b;switch(b){case u:return"Fragment";case m:return"Portal";case F:return"Profiler";case $:return"StrictMode";case a:return"Suspense";case s:return"SuspenseList"}if(typeof b=="object")switch(b.$$typeof){case o:var U=b;return J(U)+".Consumer";case K:var X=b;return J(X._context)+".Provider";case x:return H(b,b.render,"ForwardRef");case c:var le=b.displayName||null;return le!==null?le:w(b.type)||"Memo";case d:{var Me=b,Oe=Me._payload,ke=Me._init;try{return w(ke(Oe))}catch{return null}}}return null}var T=Object.assign,V=0,B,re,ee,he,Z,ce,ne;function fe(){}fe.__reactDisabledLog=!0;function se(){{if(V===0){B=console.log,re=console.info,ee=console.warn,he=console.error,Z=console.group,ce=console.groupCollapsed,ne=console.groupEnd;var b={configurable:!0,enumerable:!0,value:fe,writable:!0};Object.defineProperties(console,{info:b,log:b,warn:b,error:b,group:b,groupCollapsed:b,groupEnd:b})}V++}}function Q(){{if(V--,V===0){var b={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},b,{value:B}),info:T({},b,{value:re}),warn:T({},b,{value:ee}),error:T({},b,{value:he}),group:T({},b,{value:Z}),groupCollapsed:T({},b,{value:ce}),groupEnd:T({},b,{value:ne})})}V<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ve=D.ReactCurrentDispatcher,Ne;function _e(b,U,X){{if(Ne===void 0)try{throw Error()}catch(Me){var le=Me.stack.trim().match(/\n( *(at )?)/);Ne=le&&le[1]||""}return`
|
|
18
|
+
`+Ne+b}}var Ce=!1,Re;{var ze=typeof WeakMap=="function"?WeakMap:Map;Re=new ze}function P(b,U){if(!b||Ce)return"";{var X=Re.get(b);if(X!==void 0)return X}var le;Ce=!0;var Me=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Oe;Oe=ve.current,ve.current=null,se();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){le=et}Reflect.construct(b,[],ke)}else{try{ke.call()}catch(et){le=et}b.call(ke.prototype)}}else{try{throw Error()}catch(et){le=et}b()}}catch(et){if(et&&le&&typeof et.stack=="string"){for(var De=et.stack.split(`
|
|
19
|
+
`),qe=le.stack.split(`
|
|
20
20
|
`),We=De.length-1,Be=qe.length-1;We>=1&&Be>=0&&De[We]!==qe[Be];)Be--;for(;We>=1&&Be>=0;We--,Be--)if(De[We]!==qe[Be]){if(We!==1||Be!==1)do if(We--,Be--,Be<0||De[We]!==qe[Be]){var Ke=`
|
|
21
|
-
`+De[We].replace(" at new "," at ");return b.displayName&&Ke.includes("<anonymous>")&&(Ke=Ke.replace("<anonymous>",b.displayName)),typeof b=="function"&&Re.set(b,Ke),Ke}while(We>=1&&Be>=0);break}}}finally{Ce=!1,ve.current=Oe,
|
|
21
|
+
`+De[We].replace(" at new "," at ");return b.displayName&&Ke.includes("<anonymous>")&&(Ke=Ke.replace("<anonymous>",b.displayName)),typeof b=="function"&&Re.set(b,Ke),Ke}while(We>=1&&Be>=0);break}}}finally{Ce=!1,ve.current=Oe,Q(),Error.prepareStackTrace=Me}var dt=b?b.displayName||b.name:"",yt=dt?_e(dt):"";return typeof b=="function"&&Re.set(b,yt),yt}function _(b,U,X){return P(b,!1)}function W(b){var U=b.prototype;return!!(U&&U.isReactComponent)}function k(b,U,X){if(b==null)return"";if(typeof b=="function")return P(b,W(b));if(typeof b=="string")return _e(b);switch(b){case a:return _e("Suspense");case s:return _e("SuspenseList")}if(typeof b=="object")switch(b.$$typeof){case x:return _(b.render);case c:return k(b.type,U,X);case d:{var le=b,Me=le._payload,Oe=le._init;try{return k(Oe(Me),U,X)}catch{}}}return""}var A=Object.prototype.hasOwnProperty,I={},te=D.ReactDebugCurrentFrame;function oe(b){if(b){var U=b._owner,X=k(b.type,b._source,U?U.type:null);te.setExtraStackFrame(X)}else te.setExtraStackFrame(null)}function be(b,U,X,le,Me){{var Oe=Function.call.bind(A);for(var ke in b)if(Oe(b,ke)){var De=void 0;try{if(typeof b[ke]!="function"){var qe=Error((le||"React class")+": "+X+" type `"+ke+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof b[ke]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw qe.name="Invariant Violation",qe}De=b[ke](U,ke,le,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(We){De=We}De&&!(De instanceof Error)&&(oe(Me),O("%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).",le||"React class",X,ke,typeof De),oe(null)),De instanceof Error&&!(De.message in I)&&(I[De.message]=!0,oe(Me),O("Failed %s type: %s",X,De.message),oe(null))}}}var de=Array.isArray;function pe(b){return de(b)}function xe(b){{var U=typeof Symbol=="function"&&Symbol.toStringTag,X=U&&b[Symbol.toStringTag]||b.constructor.name||"Object";return X}}function Ae(b){try{return $e(b),!1}catch{return!0}}function $e(b){return""+b}function Ie(b){if(Ae(b))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xe(b)),$e(b)}var Ge=D.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},ye,we;function Ze(b){if(A.call(b,"ref")){var U=Object.getOwnPropertyDescriptor(b,"ref").get;if(U&&U.isReactWarning)return!1}return b.ref!==void 0}function tt(b){if(A.call(b,"key")){var U=Object.getOwnPropertyDescriptor(b,"key").get;if(U&&U.isReactWarning)return!1}return b.key!==void 0}function ht(b,U){typeof b.ref=="string"&&Ge.current}function vt(b,U){{var X=function(){ye||(ye=!0,O("%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(b,"key",{get:X,configurable:!0})}}function pt(b,U){{var X=function(){we||(we=!0,O("%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(b,"ref",{get:X,configurable:!0})}}var lt=function(b,U,X,le,Me,Oe,ke){var De={$$typeof:i,type:b,key:U,ref:X,props:ke,_owner:Oe};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:le}),Object.defineProperty(De,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.freeze&&(Object.freeze(De.props),Object.freeze(De)),De};function _t(b,U,X,le,Me){{var Oe,ke={},De=null,qe=null;X!==void 0&&(Ie(X),De=""+X),tt(U)&&(Ie(U.key),De=""+U.key),Ze(U)&&(qe=U.ref,ht(U,Me));for(Oe in U)A.call(U,Oe)&&!Qe.hasOwnProperty(Oe)&&(ke[Oe]=U[Oe]);if(b&&b.defaultProps){var We=b.defaultProps;for(Oe in We)ke[Oe]===void 0&&(ke[Oe]=We[Oe])}if(De||qe){var Be=typeof b=="function"?b.displayName||b.name||"Unknown":b;De&&vt(ke,Be),qe&&pt(ke,Be)}return lt(b,De,qe,Me,le,Ge.current,ke)}}var bt=D.ReactCurrentOwner,Ue=D.ReactDebugCurrentFrame;function gt(b){if(b){var U=b._owner,X=k(b.type,b._source,U?U.type:null);Ue.setExtraStackFrame(X)}else Ue.setExtraStackFrame(null)}var ft;ft=!1;function ut(b){return typeof b=="object"&&b!==null&&b.$$typeof===i}function it(){{if(bt.current){var b=w(bt.current.type);if(b)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+b+"`."}return""}}function zt(b){return""}var
|
|
23
|
+
Check the render method of \``+b+"`."}return""}}function zt(b){return""}var ae={};function Na(b){{var U=it();if(!U){var X=typeof b=="string"?b:b.displayName||b.name;X&&(U=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+X+">.")}return U}}function ra(b,U){{if(!b._store||b._store.validated||b.key!=null)return;b._store.validated=!0;var X=Na(U);if(
|
|
25
|
+
Check the top-level render call using <`+X+">.")}return U}}function ra(b,U){{if(!b._store||b._store.validated||b.key!=null)return;b._store.validated=!0;var X=Na(U);if(ae[X])return;ae[X]=!0;var le="";b&&b._owner&&b._owner!==bt.current&&(le=" It was passed a child from "+w(b._owner.type)+"."),gt(b),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X,le),gt(null)}}function ct(b,U){{if(typeof b!="object")return;if(pe(b))for(var X=0;X<b.length;X++){var le=b[X];ut(le)&&ra(le,U)}else if(ut(b))b._store&&(b._store.validated=!0);else if(b){var Me=v(b);if(typeof Me=="function"&&Me!==b.entries)for(var Oe=Me.call(b),ke;!(ke=Oe.next()).done;)ut(ke.value)&&ra(ke.value,U)}}}function st(b){{var U=b.type;if(U==null||typeof U=="string")return;var X;if(typeof U=="function")X=U.propTypes;else if(typeof U=="object"&&(U.$$typeof===x||U.$$typeof===c))X=U.propTypes;else return;if(X){var le=w(U);be(X,b.props,"prop",le,b)}else if(U.PropTypes!==void 0&&!ft){ft=!0;var Me=w(U);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Me||"Unknown")}typeof U.getDefaultProps=="function"&&!U.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Se(b){{for(var U=Object.keys(b.props),X=0;X<U.length;X++){var le=U[X];if(le!=="children"&&le!=="key"){gt(b),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",le),gt(null);break}}b.ref!==null&&(gt(b),O("Invalid attribute `ref` supplied to `React.Fragment`."),gt(null))}}var Lt={};function Ee(b,U,X,le,Me,Oe){{var ke=N(b);if(!ke){var De="";(b===void 0||typeof b=="object"&&b!==null&&Object.keys(b).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 qe=zt();qe?De+=qe:De+=it();var We;b===null?We="null":pe(b)?We="array":b!==void 0&&b.$$typeof===i?(We="<"+(w(b.type)||"Unknown")+" />",De=" Did you accidentally export a JSX literal instead of a component?"):We=typeof b,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",We,De)}var Be=_t(b,U,X,Me,Oe);if(Be==null)return Be;if(ke){var Ke=U.children;if(Ke!==void 0)if(le)if(pe(Ke)){for(var dt=0;dt<Ke.length;dt++)ct(Ke[dt],b);Object.freeze&&Object.freeze(Ke)}else O("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,b)}if(A.call(U,"key")){var yt=w(b),et=Object.keys(U).filter(function(He){return He!=="key"}),Jt=et.length>0?"{key: someKey, "+et.join(": ..., ")+": ...}":"{key: someKey}";if(!Lt[yt+Jt]){var Ea=et.length>0?"{"+et.join(": ..., ")+": ...}":"{}";O(`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} />`,Jt,yt,Ea,yt),Lt[yt+Jt]=!0}}return b===
|
|
30
|
+
<%s key={someKey} {...props} />`,Jt,yt,Ea,yt),Lt[yt+Jt]=!0}}return b===u?Se(Be):st(Be),Be}}function Pt(b,U,X){return Ee(b,U,X,!0)}function Pa(b,U,X){return Ee(b,U,X,!1)}var Wt=Pa,Xe=Pt;ta.Fragment=u,ta.jsx=Wt,ta.jsxs=Xe})()),ta}var rn;function cl(){return rn||(rn=1,process.env.NODE_ENV==="production"?pa.exports=ll():pa.exports=ul()),pa.exports}var h=cl();const dl=g=>{const i=q.useRef();return h.jsx("div",{ref:i,className:"row page-break-before pagebreak-container",children:h.jsx("div",{className:"col-12 text-center pagebreak-component",children:"Page break"})})},Da=class Da extends ot.ReactComponent{constructor(i,m,u){super(i,m,u)}static schema(){return ot.ReactComponent.schema({type:"pagebreak"})}render(){return super.render("<div></div>")}attach(i){return super.attach(i)}getValue(){return""}setValue(i){}attachReact(i,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(dl,{ref:m,...this,current:this}))}};Ct(Da,"builderInfo",{title:"PageBreak",group:"basic",icon:"bi bi-file-break",weight:70,schema:Da.schema()});let _a=Da;const Fe=()=>{const g=window.location,i=new RegExp("qa.bugliano.pi.it|localhost|opencity-labs.gitlab.io","g");let m=null;if(i.test(g.hostname))m="https://servizi.comune-qa.bugliano.pi.it/lang";else if(window.BASE_URL)m=window.BASE_URL;else{const u=g.pathname.split("/");m=g.origin+"/"+u[1]}return m},hl=[{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(...g){return ot.Components.baseEditForm([{key:"display",components:hl}],...g)}function Yt(g){return(i={})=>{const m=i.width?String(i.width):g.defaultWidth;return g.formats[m]||g.formats[g.defaultWidth]}}function rt(g){return(i,m)=>{const d=m!=null&&m.context?String(m.context):"standalone";let B;if(d==="formatting"&&g.formattingValues){const K=g.defaultFormattingWidth||g.defaultWidth,o=m!=null&&m.width?String(m.width):K;B=g.formattingValues[o]||g.formattingValues[K]}else{const K=g.defaultWidth,o=m!=null&&m.width?String(m.width):g.defaultWidth;B=g.values[o]||g.values[K]}const L=g.argumentCallback?g.argumentCallback(i):i;return B[L]}}function nt(g){return(i,m={})=>{const d=m.width,B=d&&g.matchPatterns[d]||g.matchPatterns[g.defaultMatchWidth],L=i.match(B);if(!L)return null;const K=L[0],o=d&&g.parsePatterns[d]||g.parsePatterns[g.defaultParseWidth],w=Array.isArray(o)?pl(o,u=>u.test(K)):ml(o,u=>u.test(K));let a;a=g.valueCallback?g.valueCallback(w):w,a=m.valueCallback?m.valueCallback(a):a;const s=i.slice(K.length);return{value:a,rest:s}}}function ml(g,i){for(const m in g)if(Object.prototype.hasOwnProperty.call(g,m)&&i(g[m]))return m}function pl(g,i){for(let m=0;m<g.length;m++)if(i(g[m]))return m}function dr(g){return(i,m={})=>{const d=i.match(g.matchPattern);if(!d)return null;const B=d[0],L=i.match(g.parsePattern);if(!L)return null;let K=g.valueCallback?g.valueCallback(L[0]):L[0];K=m.valueCallback?m.valueCallback(K):K;const o=i.slice(B.length);return{value:K,rest:o}}}const nn=Symbol.for("constructDateFrom");function Mn(g,i){return typeof g=="function"?g(i):g&&typeof g=="object"&&nn in g?g[nn](i):g instanceof Date?new g.constructor(i):new Date(i)}function gl(g,...i){const m=Mn.bind(null,g||i.find(d=>typeof d=="object"));return i.map(m)}let yl={};function vl(){return yl}function _l(g,i){return Mn(i||g,g)}function sn(g,i){var o,w,a,s;const m=vl(),d=(i==null?void 0:i.weekStartsOn)??((w=(o=i==null?void 0:i.locale)==null?void 0:o.options)==null?void 0:w.weekStartsOn)??m.weekStartsOn??((s=(a=m.locale)==null?void 0:a.options)==null?void 0:s.weekStartsOn)??0,B=_l(g,i==null?void 0:i.in),L=B.getDay(),K=(L<d?7:0)+L-d;return B.setDate(B.getDate()-K),B.setHours(0,0,0,0),B}function on(g,i,m){const[d,B]=gl(m==null?void 0:m.in,g,i);return+sn(d,m)==+sn(B,m)}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"}}},bl=(g,i,m)=>{let d;const B=m!=null&&m.addSuffix?ln[g].withPreposition:ln[g].standalone;return typeof B=="string"?d=B:i===1?d=B.one:d=B.other.replace("{{count}}",String(i)),m!=null&&m.addSuffix?m.comparison&&m.comparison>0?"in "+d:"vor "+d:d},wl={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},xl={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Ml={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Sl={date:Yt({formats:wl,defaultWidth:"full"}),time:Yt({formats:xl,defaultWidth:"full"}),dateTime:Yt({formats:Ml,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=(g,i,m,d)=>Dl[g],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=g=>Number(g)+".",El={ordinalNumber:Pl,era:rt({values:Yl,defaultWidth:"wide"}),quarter:rt({values:Ol,defaultWidth:"wide",argumentCallback:g=>g-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:g=>parseInt(g)}),era:nt({matchPatterns:Il,defaultMatchWidth:"wide",parsePatterns:Fl,defaultParseWidth:"any"}),quarter:nt({matchPatterns:zl,defaultMatchWidth:"wide",parsePatterns:Ll,defaultParseWidth:"any",valueCallback:g=>g+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"})},Sn={code:"de",formatDistance:bl,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=(g,i,m)=>{let d;const B=Jl[g];return typeof B=="string"?d=B:i===1?d=B.one:d=B.other.replace("{{count}}",i.toString()),m!=null&&m.addSuffix?m.comparison&&m.comparison>0?"in "+d:d+" ago":d},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=(g,i,m,d)=>Kl[g],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=(g,i)=>{const m=Number(g),d=m%100;if(d>20||d<10)switch(d%10){case 1:return m+"st";case 2:return m+"nd";case 3:return m+"rd"}return m+"th"},iu={ordinalNumber:nu,era:rt({values:Ql,defaultWidth:"wide"}),quarter:rt({values:Zl,defaultWidth:"wide",argumentCallback:g=>g-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:g=>parseInt(g,10)}),era:nt({matchPatterns:lu,defaultMatchWidth:"wide",parsePatterns:uu,defaultParseWidth:"any"}),quarter:nt({matchPatterns:cu,defaultMatchWidth:"wide",parsePatterns:du,defaultParseWidth:"any",valueCallback:g=>g+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"})},_u={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},bu={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}}"},xu={date:Yt({formats:_u,defaultWidth:"full"}),time:Yt({formats:bu,defaultWidth:"full"}),dateTime:Yt({formats:wu,defaultWidth:"full"})},Dn={code:"en-GB",formatDistance:Gl,formatLong:xu,formatRelative:Xl,localize:iu,match:vu,options:{weekStartsOn:1,firstWeekContainsDate:4}},Mu={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=(g,i,m)=>{let d;const B=Mu[g];return typeof B=="string"?d=B:i===1?d=B.one:d=B.other.replace("{{count}}",i.toString()),m!=null&&m.addSuffix?m.comparison&&m.comparison>0?"tra "+d:d+" fa":d},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(g){switch(g){case 0:return"'domenica scorsa alle' p";default:return"'"+hr[g]+" scorso alle' p"}}function un(g){return"'"+hr[g]+" alle' p"}function Tu(g){switch(g){case 0:return"'domenica prossima alle' p";default:return"'"+hr[g]+" prossimo alle' p"}}const Cu={lastWeek:(g,i,m)=>{const d=g.getDay();return on(g,i,m)?un(d):ju(d)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(g,i,m)=>{const d=g.getDay();return on(g,i,m)?un(d):Tu(d)},other:"P"},Nu=(g,i,m,d)=>{const B=Cu[g];return typeof B=="function"?B(i,m,d):B},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=(g,i)=>{const m=Number(g);return String(m)},Lu={ordinalNumber:zu,era:rt({values:Pu,defaultWidth:"wide"}),quarter:rt({values:Eu,defaultWidth:"wide",argumentCallback:g=>g-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:g=>parseInt(g,10)}),era:nt({matchPatterns:Hu,defaultMatchWidth:"wide",parsePatterns:$u,defaultParseWidth:"any"}),quarter:nt({matchPatterns:Bu,defaultMatchWidth:"wide",parsePatterns:Uu,defaultParseWidth:"any",valueCallback:g=>g+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"})},kn={code:"it",formatDistance:Su,formatLong:Ou,formatRelative:Nu,localize:Lu,match:Zu,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Ca(g){throw new Error('Could not dynamically require "'+g+'". 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(g,i){(function(m,d){g.exports=d()})(ec,(function(){var m;function d(){return m.apply(null,arguments)}function B(e){m=e}function L(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function K(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function w(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 a(e){return e===void 0}function s(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function u(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function c(e,t){var r=[],n,l=e.length;for(n=0;n<l;++n)r.push(t(e[n],n));return r}function p(e,t){for(var r in t)o(t,r)&&(e[r]=t[r]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,r,n){return Tr(e,t,r,n,!0).utc()}function j(){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=j()),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(l){return l!=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 Y(e){var t=f(NaN);return e!=null?p(v(t),e):v(t).userInvalidated=!0,t}var F=d.momentProperties=[],P=!1;function S(e,t){var r,n,l,x=F.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),x>0)for(r=0;r<x;r++)n=F[r],l=t[n],a(l)||(e[n]=l);return e}function y(e){S(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),P===!1&&(P=!0,d.updateOffset(this),P=!1)}function T(e){return e instanceof y||e!=null&&e._isAMomentObject!=null}function W(e){d.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function C(e,t){var r=!0;return p(function(){if(d.deprecationHandler!=null&&d.deprecationHandler(null,e),r){var n=[],l,x,V,ie=arguments.length;for(x=0;x<ie;x++){if(l="",typeof arguments[x]=="object"){l+=`
|
|
62
|
-
[`+
|
|
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(...g){return ot.Components.baseEditForm([{key:"display",components:hl}],...g)}function Yt(g){return(i={})=>{const m=i.width?String(i.width):g.defaultWidth;return g.formats[m]||g.formats[g.defaultWidth]}}function rt(g){return(i,m)=>{const u=m!=null&&m.context?String(m.context):"standalone";let $;if(u==="formatting"&&g.formattingValues){const K=g.defaultFormattingWidth||g.defaultWidth,o=m!=null&&m.width?String(m.width):K;$=g.formattingValues[o]||g.formattingValues[K]}else{const K=g.defaultWidth,o=m!=null&&m.width?String(m.width):g.defaultWidth;$=g.values[o]||g.values[K]}const F=g.argumentCallback?g.argumentCallback(i):i;return $[F]}}function nt(g){return(i,m={})=>{const u=m.width,$=u&&g.matchPatterns[u]||g.matchPatterns[g.defaultMatchWidth],F=i.match($);if(!F)return null;const K=F[0],o=u&&g.parsePatterns[u]||g.parsePatterns[g.defaultParseWidth],x=Array.isArray(o)?pl(o,c=>c.test(K)):ml(o,c=>c.test(K));let a;a=g.valueCallback?g.valueCallback(x):x,a=m.valueCallback?m.valueCallback(a):a;const s=i.slice(K.length);return{value:a,rest:s}}}function ml(g,i){for(const m in g)if(Object.prototype.hasOwnProperty.call(g,m)&&i(g[m]))return m}function pl(g,i){for(let m=0;m<g.length;m++)if(i(g[m]))return m}function dr(g){return(i,m={})=>{const u=i.match(g.matchPattern);if(!u)return null;const $=u[0],F=i.match(g.parsePattern);if(!F)return null;let K=g.valueCallback?g.valueCallback(F[0]):F[0];K=m.valueCallback?m.valueCallback(K):K;const o=i.slice($.length);return{value:K,rest:o}}}const nn=Symbol.for("constructDateFrom");function Mn(g,i){return typeof g=="function"?g(i):g&&typeof g=="object"&&nn in g?g[nn](i):g instanceof Date?new g.constructor(i):new Date(i)}function gl(g,...i){const m=Mn.bind(null,g||i.find(u=>typeof u=="object"));return i.map(m)}let yl={};function vl(){return yl}function _l(g,i){return Mn(i||g,g)}function sn(g,i){var o,x,a,s;const m=vl(),u=(i==null?void 0:i.weekStartsOn)??((x=(o=i==null?void 0:i.locale)==null?void 0:o.options)==null?void 0:x.weekStartsOn)??m.weekStartsOn??((s=(a=m.locale)==null?void 0:a.options)==null?void 0:s.weekStartsOn)??0,$=_l(g,i==null?void 0:i.in),F=$.getDay(),K=(F<u?7:0)+F-u;return $.setDate($.getDate()-K),$.setHours(0,0,0,0),$}function on(g,i,m){const[u,$]=gl(m==null?void 0:m.in,g,i);return+sn(u,m)==+sn($,m)}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"}}},bl=(g,i,m)=>{let u;const $=m!=null&&m.addSuffix?ln[g].withPreposition:ln[g].standalone;return typeof $=="string"?u=$:i===1?u=$.one:u=$.other.replace("{{count}}",String(i)),m!=null&&m.addSuffix?m.comparison&&m.comparison>0?"in "+u:"vor "+u:u},wl={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},xl={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Ml={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Sl={date:Yt({formats:wl,defaultWidth:"full"}),time:Yt({formats:xl,defaultWidth:"full"}),dateTime:Yt({formats:Ml,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=(g,i,m,u)=>Dl[g],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=g=>Number(g)+".",El={ordinalNumber:Pl,era:rt({values:Yl,defaultWidth:"wide"}),quarter:rt({values:Ol,defaultWidth:"wide",argumentCallback:g=>g-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:g=>parseInt(g)}),era:nt({matchPatterns:Il,defaultMatchWidth:"wide",parsePatterns:Fl,defaultParseWidth:"any"}),quarter:nt({matchPatterns:zl,defaultMatchWidth:"wide",parsePatterns:Ll,defaultParseWidth:"any",valueCallback:g=>g+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"})},Sn={code:"de",formatDistance:bl,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=(g,i,m)=>{let u;const $=Jl[g];return typeof $=="string"?u=$:i===1?u=$.one:u=$.other.replace("{{count}}",i.toString()),m!=null&&m.addSuffix?m.comparison&&m.comparison>0?"in "+u:u+" ago":u},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=(g,i,m,u)=>Kl[g],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=(g,i)=>{const m=Number(g),u=m%100;if(u>20||u<10)switch(u%10){case 1:return m+"st";case 2:return m+"nd";case 3:return m+"rd"}return m+"th"},iu={ordinalNumber:nu,era:rt({values:Ql,defaultWidth:"wide"}),quarter:rt({values:Zl,defaultWidth:"wide",argumentCallback:g=>g-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:g=>parseInt(g,10)}),era:nt({matchPatterns:lu,defaultMatchWidth:"wide",parsePatterns:uu,defaultParseWidth:"any"}),quarter:nt({matchPatterns:cu,defaultMatchWidth:"wide",parsePatterns:du,defaultParseWidth:"any",valueCallback:g=>g+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"})},_u={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},bu={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}}"},xu={date:Yt({formats:_u,defaultWidth:"full"}),time:Yt({formats:bu,defaultWidth:"full"}),dateTime:Yt({formats:wu,defaultWidth:"full"})},Dn={code:"en-GB",formatDistance:Gl,formatLong:xu,formatRelative:Xl,localize:iu,match:vu,options:{weekStartsOn:1,firstWeekContainsDate:4}},Mu={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=(g,i,m)=>{let u;const $=Mu[g];return typeof $=="string"?u=$:i===1?u=$.one:u=$.other.replace("{{count}}",i.toString()),m!=null&&m.addSuffix?m.comparison&&m.comparison>0?"tra "+u:u+" fa":u},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(g){switch(g){case 0:return"'domenica scorsa alle' p";default:return"'"+hr[g]+" scorso alle' p"}}function un(g){return"'"+hr[g]+" alle' p"}function Tu(g){switch(g){case 0:return"'domenica prossima alle' p";default:return"'"+hr[g]+" prossimo alle' p"}}const Cu={lastWeek:(g,i,m)=>{const u=g.getDay();return on(g,i,m)?un(u):ju(u)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(g,i,m)=>{const u=g.getDay();return on(g,i,m)?un(u):Tu(u)},other:"P"},Nu=(g,i,m,u)=>{const $=Cu[g];return typeof $=="function"?$(i,m,u):$},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=(g,i)=>{const m=Number(g);return String(m)},Lu={ordinalNumber:zu,era:rt({values:Pu,defaultWidth:"wide"}),quarter:rt({values:Eu,defaultWidth:"wide",argumentCallback:g=>g-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:g=>parseInt(g,10)}),era:nt({matchPatterns:Hu,defaultMatchWidth:"wide",parsePatterns:$u,defaultParseWidth:"any"}),quarter:nt({matchPatterns:Bu,defaultMatchWidth:"wide",parsePatterns:Uu,defaultParseWidth:"any",valueCallback:g=>g+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"})},kn={code:"it",formatDistance:Su,formatLong:Ou,formatRelative:Nu,localize:Lu,match:Zu,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Ca(g){throw new Error('Could not dynamically require "'+g+'". 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(g,i){(function(m,u){g.exports=u()})(ec,(function(){var m;function u(){return m.apply(null,arguments)}function $(e){m=e}function F(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function K(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function o(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(o(e,t))return!1;return!0}function a(e){return e===void 0}function s(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,l=e.length;for(n=0;n<l;++n)r.push(t(e[n],n));return r}function p(e,t){for(var r in t)o(t,r)&&(e[r]=t[r]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,r,n){return Tr(e,t,r,n,!0).utc()}function j(){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=j()),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(l){return l!=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 Y(e){var t=f(NaN);return e!=null?p(v(t),e):v(t).userInvalidated=!0,t}var R=u.momentProperties=[],E=!1;function S(e,t){var r,n,l,M=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),M>0)for(r=0;r<M;r++)n=R[r],l=t[n],a(l)||(e[n]=l);return e}function y(e){S(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),E===!1&&(E=!0,u.updateOffset(this),E=!1)}function C(e){return e instanceof y||e!=null&&e._isAMomentObject!=null}function z(e){u.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function N(e,t){var r=!0;return p(function(){if(u.deprecationHandler!=null&&u.deprecationHandler(null,e),r){var n=[],l,M,L,ie=arguments.length;for(M=0;M<ie;M++){if(l="",typeof arguments[M]=="object"){l+=`
|
|
62
|
+
[`+M+"] ";for(L in arguments[0])o(arguments[0],L)&&(l+=L+": "+arguments[0][L]+", ");l=l.slice(0,-2)}else l=arguments[M];n.push(l)}z(e+`
|
|
63
63
|
Arguments: `+Array.prototype.slice.call(n).join("")+`
|
|
64
|
-
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var M={};function R(e,t){d.deprecationHandler!=null&&d.deprecationHandler(e,t),M[e]||(W(t),M[e]=!0)}d.suppressDeprecationWarnings=!1,d.deprecationHandler=null;function I(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)o(e,r)&&(t=e[r],I(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)o(t,n)&&(K(e[n])&&K(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)o(e,n)&&!o(t,n)&&K(e[n])&&(r[n]=p({},r[n]));return r}function J(e){e!=null&&this.set(e)}var ne;Object.keys?ne=Object.keys:ne=function(e){var t,r=[];for(t in e)o(e,t)&&r.push(t);return r};var ae={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function he(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return I(n)?n.call(t,r):n}function Q(e,t,r){var n=""+Math.abs(e),l=t-n.length,x=e>=0;return(x?r?"+":"":"-")+Math.pow(10,Math.max(0,l)).toString().substr(1)+n}var de=/(\[[^\[]*\])|(\\)?([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,ee=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,me={},ue={};function Z(e,t,r,n){var l=n;typeof n=="string"&&(l=function(){return this[n]()}),e&&(ue[e]=l),t&&(ue[t[0]]=function(){return Q(l.apply(this,arguments),t[1],t[2])}),r&&(ue[r]=function(){return this.localeData().ordinal(l.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(de),r,n;for(r=0,n=t.length;r<n;r++)ue[t[r]]?t[r]=ue[t[r]]:t[r]=ve(t[r]);return function(l){var x="",V;for(V=0;V<n;V++)x+=I(t[V])?t[V].call(l,e):t[V];return x}}function _e(e,t){return e.isValid()?(t=Ce(t,e.localeData()),me[t]=me[t]||Ne(t),me[t](e)):e.localeData().invalidDate()}function Ce(e,t){var r=5;function n(l){return t.longDateFormat(l)||l}for(ee.lastIndex=0;r>=0&&ee.test(e);)e=e.replace(ee,n),ee.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(de).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var N="Invalid date";function _(){return this._invalidDate}var H="%d",k=/\d{1,2}/;function A(e){return this._ordinal.replace("%d",e)}var z={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 l=this._relativeTime[r];return I(l)?l(e,t,r,n):l.replace(/%d/i,e)}function se(e,t){var r=this._relativeTime[e>0?"future":"past"];return I(r)?r(t):r.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 ce(e){return typeof e=="string"?be[e]||be[e.toLowerCase()]:void 0}function pe(e){var t={},r,n;for(n in e)o(e,n)&&(r=ce(n),r&&(t[r]=e[n]));return t}var xe={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)o(e,r)&&t.push({unit:r,priority:xe[r]});return t.sort(function(n,l){return n.priority-l.priority}),t}var $e=/\d/,Ie=/\d\d/,Ge=/\d{3}/,Qe=/\d{4}/,ye=/[+-]?\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+/,_t=/[+-]?\d+/,bt=/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 re(e,t,r){zt[e]=I(t)?t:function(n,l){return n&&r?r:t}}function Na(e,t){return o(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,l,x){return r||n||l||x}))}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,l;for(typeof e=="string"&&(e=[e]),s(t)&&(n=function(x,V){V[t]=Se(x)}),l=e.length,r=0;r<l;r++)Lt[e[r]]=n}function Pt(e,t){Ee(e,function(r,n,l,x){l._w=l._w||{},t(r,l._w,l,x)})}function Pa(e,t,r){t!=null&&o(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,b=1,U=2,X=3,oe=4,Me=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"),re("Y",_t),re("YY",we,Ie),re("YYYY",vt,Qe),re("YYYYY",pt,ye),re("YYYYYY",pt,ye),Ee(["YYYYY","YYYYYY"],Xe),Ee("YYYY",function(e,t){t[Xe]=e.length===2?d.parseTwoDigitYear(e):Se(e)}),Ee("YY",function(e,t){t[Xe]=d.parseTwoDigitYear(e)}),Ee("Y",function(e,t){t[Xe]=parseInt(e,10)});function qe(e){return Wt(e)?366:365}d.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),d.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,l,x,V,ie;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,l=e._isUTC,t){case"Milliseconds":return void(l?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(l?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(l?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(l?n.setUTCHours(r):n.setHours(r));case"Date":return void(l?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}x=r,V=e.month(),ie=e.date(),ie=ie===29&&V===1&&!Wt(x)?28:ie,l?n.setUTCFullYear(x,V,ie):n.setFullYear(x,V,ie)}}function et(e){return e=ce(e),I(this[e])?this[e]():this}function Jt(e,t){if(typeof e=="object"){e=pe(e);var r=Ae(e),n,l=r.length;for(n=0;n<l;n++)this[r[n].unit](e[r[n].unit])}else if(e=ce(e),I(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)}),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)}),Ee(["M","MM"],function(e,t){t[b]=Se(e)-1}),Ee(["MMM","MMMM"],function(e,t,r,n){var l=r._locale.monthsParse(e,n,r._strict);l!=null?t[b]=l:v(r).invalidMonth=e});var Tn="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?/,Cn=ft,Nn=ft;function Pn(e,t){return e?L(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||yr).test(t)?"format":"standalone"][e.month()]:L(this._months)?this._months:this._months.standalone}function En(e,t){return e?L(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[yr.test(t)?"format":"standalone"][e.month()]:L(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function An(e,t,r){var n,l,x,V=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)x=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(x,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(x,"").toLocaleLowerCase();return r?t==="MMM"?(l=He.call(this._shortMonthsParse,V),l!==-1?l:null):(l=He.call(this._longMonthsParse,V),l!==-1?l:null):t==="MMM"?(l=He.call(this._shortMonthsParse,V),l!==-1?l:(l=He.call(this._longMonthsParse,V),l!==-1?l:null)):(l=He.call(this._longMonthsParse,V),l!==-1?l:(l=He.call(this._shortMonthsParse,V),l!==-1?l:null))}function Rn(e,t,r){var n,l,x;if(this._monthsParseExact)return An.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(l=f([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(l,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(l,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(x="^"+this.months(l,"")+"|^"+this.monthsShort(l,""),this._monthsParse[n]=new RegExp(x.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),!s(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 _r(e){return e!=null?(vr(this,e),d.updateOffset(this,!0),this):dt(this,"Month")}function In(){return Aa(this.year(),this.month())}function Fn(e){return this._monthsParseExact?(o(this,"_monthsRegex")||br.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Cn),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function zn(e){return this._monthsParseExact?(o(this,"_monthsRegex")||br.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Nn),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function br(){function e(ge,je){return je.length-ge.length}var t=[],r=[],n=[],l,x,V,ie;for(l=0;l<12;l++)x=f([2e3,l]),V=ct(this.monthsShort(x,"")),ie=ct(this.months(x,"")),t.push(V),r.push(ie),n.push(ie),n.push(V);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 Ln(e,t,r,n,l,x,V){var ie;return e<100&&e>=0?(ie=new Date(e+400,t,r,n,l,x,V),isFinite(ie.getFullYear())&&ie.setFullYear(e)):ie=new Date(e,t,r,n,l,x,V),ie}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,l=(7+Gt(e,0,n).getUTCDay()-t)%7;return-l+n-1}function wr(e,t,r,n,l){var x=(7+r-n)%7,V=na(e,n,l),ie=1+7*(t-1)+x+V,ge,je;return ie<=0?(ge=e-1,je=qe(ge)+ie):ie>qe(e)?(ge=e+1,je=ie-qe(e)):(ge=e,je=ie),{year:ge,dayOfYear:je}}function Kt(e,t,r){var n=na(e.year(),t,r),l=Math.floor((e.dayOfYear()-n-1)/7)+1,x,V;return l<1?(V=e.year()-1,x=l+wt(V,t,r)):l>wt(e.year(),t,r)?(x=l-wt(e.year(),t,r),V=e.year()+1):(V=e.year(),x=l),{week:x,year:V}}function wt(e,t,r){var n=na(e,t,r),l=na(e+1,t,r);return(qe(e)-n+l)/7}Z("w",["ww",2],"wo","week"),Z("W",["WW",2],"Wo","isoWeek"),re("w",we,ut),re("ww",we,Ie),re("W",we,ut),re("WW",we,Ie),Pt(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Se(e)});function Wn(e){return Kt(e,this._week.dow,this._week.doy).week}var Vn={dow:0,doy:6};function Hn(){return this._week.dow}function $n(){return this._week.doy}function Bn(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Un(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"),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)}),Pt(["dd","ddd","dddd"],function(e,t,r,n){var l=r._locale.weekdaysParse(e,n,r._strict);l!=null?t.d=l:v(r).invalidWeekday=e}),Pt(["d","e","E"],function(e,t,r,n){t[n]=Se(e)});function qn(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Jn(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 Gn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),xr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Kn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xn=ft,Qn=ft,Zn=ft;function ei(e,t){var r=L(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 ti(e){return e===!0?Ra(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ai(e){return e===!0?Ra(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ri(e,t,r){var n,l,x,V=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)x=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(x,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(x,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(x,"").toLocaleLowerCase();return r?t==="dddd"?(l=He.call(this._weekdaysParse,V),l!==-1?l:null):t==="ddd"?(l=He.call(this._shortWeekdaysParse,V),l!==-1?l:null):(l=He.call(this._minWeekdaysParse,V),l!==-1?l:null):t==="dddd"?(l=He.call(this._weekdaysParse,V),l!==-1||(l=He.call(this._shortWeekdaysParse,V),l!==-1)?l:(l=He.call(this._minWeekdaysParse,V),l!==-1?l:null)):t==="ddd"?(l=He.call(this._shortWeekdaysParse,V),l!==-1||(l=He.call(this._weekdaysParse,V),l!==-1)?l:(l=He.call(this._minWeekdaysParse,V),l!==-1?l:null)):(l=He.call(this._minWeekdaysParse,V),l!==-1||(l=He.call(this._weekdaysParse,V),l!==-1)?l:(l=He.call(this._shortWeekdaysParse,V),l!==-1?l:null))}function ni(e,t,r){var n,l,x;if(this._weekdaysParseExact)return ri.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(l=f([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(l,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(l,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(l,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(x="^"+this.weekdays(l,"")+"|^"+this.weekdaysShort(l,"")+"|^"+this.weekdaysMin(l,""),this._weekdaysParse[n]=new RegExp(x.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 ii(e){if(!this.isValid())return e!=null?this:NaN;var t=dt(this,"Day");return e!=null?(e=qn(e,this.localeData()),this.add(e-t,"d")):t}function si(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 oi(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Jn(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function li(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Xn),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ui(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Qn),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ci(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Zn),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ia(){function e(at,kt){return kt.length-at.length}var t=[],r=[],n=[],l=[],x,V,ie,ge,je;for(x=0;x<7;x++)V=f([2e3,1]).day(x),ie=ct(this.weekdaysMin(V,"")),ge=ct(this.weekdaysShort(V,"")),je=ct(this.weekdays(V,"")),t.push(ie),r.push(ge),n.push(je),l.push(ie),l.push(ge),l.push(je);t.sort(e),r.sort(e),n.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.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 di(){return this.hours()||24}Z("H",["HH",2],0,"hour"),Z("h",["hh",2],0,Fa),Z("k",["kk",2],0,di),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 Mr(e,t){Z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Mr("a",!0),Mr("A",!1);function Sr(e,t){return t._meridiemParse}re("a",Sr),re("A",Sr),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",Ze),re("hmmss",tt),re("Hmm",Ze),re("Hmmss",tt),Ee(["H","HH"],X),Ee(["k","kk"],function(e,t,r){var n=Se(e);t[X]=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[X]=Se(e),v(r).bigHour=!0}),Ee("hmm",function(e,t,r){var n=e.length-2;t[X]=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,l=e.length-2;t[X]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[Me]=Se(e.substr(l)),v(r).bigHour=!0}),Ee("Hmm",function(e,t,r){var n=e.length-2;t[X]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n))}),Ee("Hmmss",function(e,t,r){var n=e.length-4,l=e.length-2;t[X]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[Me]=Se(e.substr(l))});function hi(e){return(e+"").toLowerCase().charAt(0)==="p"}var fi=/[ap]\.?m?\.?/i,mi=Ke("Hours",!0);function pi(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Dr={calendar:ae,longDateFormat:Re,invalidDate:N,ordinal:H,dayOfMonthOrdinalParse:k,relativeTime:z,months:Tn,monthsShort:gr,week:Vn,weekdays:Gn,weekdaysMin:Kn,weekdaysShort:xr,meridiemParse:fi},Ve={},Xt={},Qt;function gi(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 yi(e){for(var t=0,r,n,l,x;t<e.length;){for(x=kr(e[t]).split("-"),r=x.length,n=kr(e[t+1]),n=n?n.split("-"):null;r>0;){if(l=ia(x.slice(0,r).join("-")),l)return l;if(n&&n.length>=r&&gi(x,n)>=r-1)break;r--}t++}return Qt}function vi(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ia(e){var t=null,r;if(Ve[e]===void 0&&g&&g.exports&&vi(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=xt(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)R("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(l){za(l.name,l.config)}),Ot(e),Ve[e]}else return delete Ve[e],null}function _i(e,t){if(t!=null){var r,n,l=Dr;Ve[e]!=null&&Ve[e].parentLocale!=null?Ve[e].set($(Ve[e]._config,t)):(n=ia(e),n!=null&&(l=n._config),t=$(l,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 xt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qt;if(!L(e)){if(t=ia(e),t)return t;e=[e]}return yi(e)}function bi(){return ne(Ve)}function La(e){var t,r=e._a;return r&&v(e).overflow===-2&&(t=r[b]<0||r[b]>11?b:r[U]<1||r[U]>Aa(r[Xe],r[b])?U:r[X]<0||r[X]>24||r[X]===24&&(r[oe]!==0||r[Me]!==0||r[Oe]!==0)?X:r[oe]<0||r[oe]>59?oe:r[Me]<0||r[Me]>59?Me: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 wi=/^\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)?)?$/,Mi=/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/]],Si=/^\/?Date\((-?\d+)/i,Di=/^(?:(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}))$/,ki={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,l=wi.exec(n)||xi.exec(n),x,V,ie,ge,je=sa.length,at=Wa.length;if(l){for(v(e).iso=!0,t=0,r=je;t<r;t++)if(sa[t][1].exec(l[1])){V=sa[t][0],x=sa[t][2]!==!1;break}if(V==null){e._isValid=!1;return}if(l[3]){for(t=0,r=at;t<r;t++)if(Wa[t][1].exec(l[3])){ie=(l[2]||" ")+Wa[t][0];break}if(ie==null){e._isValid=!1;return}}if(!x&&ie!=null){e._isValid=!1;return}if(l[4])if(Mi.exec(l[4]))ge="Z";else{e._isValid=!1;return}e._f=V+(ie||"")+(ge||""),Ha(e)}else e._isValid=!1}function Yi(e,t,r,n,l,x){var V=[Oi(e),gr.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(l,10)];return x&&V.push(parseInt(x,10)),V}function Oi(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function ji(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ti(e,t,r){if(e){var n=xr.indexOf(e),l=new Date(t[0],t[1],t[2]).getDay();if(n!==l)return v(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Ci(e,t,r){if(e)return ki[e];if(t)return 0;var n=parseInt(r,10),l=n%100,x=(n-l)/100;return x*60+l}function Or(e){var t=Di.exec(ji(e._i)),r;if(t){if(r=Yi(t[4],t[3],t[2],t[5],t[6],t[7]),!Ti(t[1],r,e))return;e._a=r,e._tzm=Ci(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 Ni(e){var t=Si.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:d.createFromInputFallback(e)}d.createFromInputFallback=C("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 Pi(e){var t=new Date(d.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Va(e){var t,r,n=[],l,x,V;if(!e._d){for(l=Pi(e),e._w&&e._a[U]==null&&e._a[b]==null&&Ei(e),e._dayOfYear!=null&&(V=Vt(e._a[Xe],l[Xe]),(e._dayOfYear>qe(V)||e._dayOfYear===0)&&(v(e)._overflowDayOfYear=!0),r=Gt(V,0,e._dayOfYear),e._a[b]=r.getUTCMonth(),e._a[U]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=l[t];for(;t<7;t++)e._a[t]=n[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[Oe]===0&&(e._nextDay=!0,e._a[X]=0),e._d=(e._useUTC?Gt:Ln).apply(null,n),x=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!==x&&(v(e).weekdayMismatch=!0)}}function Ei(e){var t,r,n,l,x,V,ie,ge,je;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(x=1,V=4,r=Vt(t.GG,e._a[Xe],Kt(Le(),1,4).year),n=Vt(t.W,1),l=Vt(t.E,1),(l<1||l>7)&&(ge=!0)):(x=e._locale._week.dow,V=e._locale._week.doy,je=Kt(Le(),x,V),r=Vt(t.gg,e._a[Xe],je.year),n=Vt(t.w,je.week),t.d!=null?(l=t.d,(l<0||l>6)&&(ge=!0)):t.e!=null?(l=t.e+x,(t.e<0||t.e>6)&&(ge=!0)):l=x),n<1||n>wt(r,x,V)?v(e)._overflowWeeks=!0:ge!=null?v(e)._overflowWeekday=!0:(ie=wr(r,n,l,x,V),e._a[Xe]=ie.year,e._dayOfYear=ie.dayOfYear)}d.ISO_8601=function(){},d.RFC_2822=function(){};function Ha(e){if(e._f===d.ISO_8601){Yr(e);return}if(e._f===d.RFC_2822){Or(e);return}e._a=[],v(e).empty=!0;var t=""+e._i,r,n,l,x,V,ie=t.length,ge=0,je,at;for(l=Ce(e._f,e._locale).match(de)||[],at=l.length,r=0;r<at;r++)x=l[r],n=(t.match(Na(x,e))||[])[0],n&&(V=t.substr(0,t.indexOf(n)),V.length>0&&v(e).unusedInput.push(V),t=t.slice(t.indexOf(n)+n.length),ge+=n.length),ue[x]?(n?v(e).empty=!1:v(e).unusedTokens.push(x),Pa(x,n,e)):e._strict&&!n&&v(e).unusedTokens.push(x);v(e).charsLeftOver=ie-ge,t.length>0&&v(e).unusedInput.push(t),e._a[X]<=12&&v(e).bigHour===!0&&e._a[X]>0&&(v(e).bigHour=void 0),v(e).parsedDateParts=e._a.slice(0),v(e).meridiem=e._meridiem,e._a[X]=Ai(e._locale,e._a[X],e._meridiem),je=v(e).era,je!==null&&(e._a[Xe]=e._locale.erasConvertYear(je,e._a[Xe])),Va(e),La(e)}function Ai(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 Ri(e){var t,r,n,l,x,V,ie=!1,ge=e._f.length;if(ge===0){v(e).invalidFormat=!0,e._d=new Date(NaN);return}for(l=0;l<ge;l++)x=0,V=!1,t=S({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[l],Ha(t),O(t)&&(V=!0),x+=v(t).charsLeftOver,x+=v(t).unusedTokens.length*10,v(t).score=x,ie?x<n&&(n=x,r=t):(n==null||x<n||V)&&(n=x,r=t,V&&(ie=!0));p(e,r||t)}function Ii(e){if(!e._d){var t=pe(e._i),r=t.day===void 0?t.date:t.day;e._a=c([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Va(e)}}function Fi(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||xt(e._l),t===null||r===void 0&&t===""?Y({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),T(t)?new y(La(t)):(u(t)?e._d=t:L(r)?Ri(e):r?Ha(e):zi(e),O(e)||(e._d=null),e))}function zi(e){var t=e._i;a(t)?e._d=new Date(d.now()):u(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Ni(e):L(t)?(e._a=c(t.slice(0),function(r){return parseInt(r,10)}),Va(e)):K(t)?Ii(e):s(t)?e._d=new Date(t):d.createFromInputFallback(e)}function Tr(e,t,r,n,l){var x={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(K(e)&&w(e)||L(e)&&e.length===0)&&(e=void 0),x._isAMomentObject=!0,x._useUTC=x._isUTC=l,x._l=r,x._i=e,x._f=t,x._strict=n,Fi(x)}function Le(e,t,r,n){return Tr(e,t,r,n,!1)}var Li=C("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:Y()}),Wi=C("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:Y()});function Cr(e,t){var r,n;if(t.length===1&&L(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 Vi(){var e=[].slice.call(arguments,0);return Cr("isBefore",e)}function Hi(){var e=[].slice.call(arguments,0);return Cr("isAfter",e)}var $i=function(){return Date.now?Date.now():+new Date},Zt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Bi(e){var t,r=!1,n,l=Zt.length;for(t in e)if(o(e,t)&&!(He.call(Zt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<l;++n)if(e[Zt[n]]){if(r)return!1;parseFloat(e[Zt[n]])!==Se(e[Zt[n]])&&(r=!0)}return!0}function Ui(){return this._isValid}function qi(){return mt(NaN)}function oa(e){var t=pe(e),r=t.year||0,n=t.quarter||0,l=t.month||0,x=t.week||t.isoWeek||0,V=t.day||0,ie=t.hour||0,ge=t.minute||0,je=t.second||0,at=t.millisecond||0;this._isValid=Bi(t),this._milliseconds=+at+je*1e3+ge*6e4+ie*1e3*60*60,this._days=+V+x*7,this._months=+l+n*3+r*12,this._data={},this._locale=xt(),this._bubble()}function la(e){return e instanceof oa}function $a(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Ji(e,t,r){var n=Math.min(e.length,t.length),l=Math.abs(e.length-t.length),x=0,V;for(V=0;V<n;V++)Se(e[V])!==Se(t[V])&&x++;return x+l}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",""),re("Z",Ue),re("ZZ",Ue),Ee(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Ba(Ue,e)});var Gi=/([\+\-]|\d\d)/gi;function Ba(e,t){var r=(t||"").match(e),n,l,x;return r===null?null:(n=r[r.length-1]||[],l=(n+"").match(Gi)||["-",0,0],x=+(l[1]*60)+Se(l[2]),x===0?0:l[0]==="+"?x:-x)}function Ua(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(T(e)||u(e)?e.valueOf():Le(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),d.updateOffset(r,!1),r):Le(e).local()}function qa(e){return-Math.round(e._d.getTimezoneOffset())}d.updateOffset=function(){};function Ki(e,t,r){var n=this._offset||0,l;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&&(l=qa(this)),this._offset=e,this._isUTC=!0,l!=null&&this.add(l,"m"),n!==e&&(!t||this._changeInProgress?Rr(this,mt(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,d.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:qa(this)}function Xi(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Qi(e){return this.utcOffset(0,e)}function Zi(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qa(this),"m")),this}function es(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Ba(bt,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function ts(e){return this.isValid()?(e=e?Le(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function as(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function rs(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={},t;return S(e,this),e=jr(e),e._a?(t=e._isUTC?f(e._a):Le(e._a),this._isDSTShifted=this.isValid()&&Ji(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ns(){return this.isValid()?!this._isUTC:!1}function is(){return this.isValid()?this._isUTC:!1}function Pr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ss=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,os=/^(-|\+)?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,l,x,V;return la(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:s(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=ss.exec(e))?(l=n[1]==="-"?-1:1,r={y:0,d:Se(n[U])*l,h:Se(n[X])*l,m:Se(n[oe])*l,s:Se(n[Me])*l,ms:Se($a(n[Oe]*1e3))*l}):(n=os.exec(e))?(l=n[1]==="-"?-1:1,r={y:Et(n[2],l),M:Et(n[3],l),w:Et(n[4],l),d:Et(n[5],l),h:Et(n[6],l),m:Et(n[7],l),s:Et(n[8],l)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(V=ls(Le(r.from),Le(r.to)),r={},r.ms=V.milliseconds,r.M=V.months),x=new oa(r),la(e)&&o(e,"_locale")&&(x._locale=e._locale),la(e)&&o(e,"_isValid")&&(x._isValid=e._isValid),x}mt.fn=oa.prototype,mt.invalid=qi;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 ls(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 l,x;return n!==null&&!isNaN(+n)&&(R(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."),x=r,r=n,n=x),l=mt(r,n),Rr(this,l,e),this}}function Rr(e,t,r,n){var l=t._milliseconds,x=$a(t._days),V=$a(t._months);e.isValid()&&(n=n??!0,V&&vr(e,dt(e,"Month")+V*r),x&&yt(e,"Date",dt(e,"Date")+x*r),l&&e._d.setTime(e._d.valueOf()+l*r),n&&d.updateOffset(e,x||V))}var us=Ar(1,"add"),cs=Ar(-1,"subtract");function Ir(e){return typeof e=="string"||e instanceof String}function ds(e){return T(e)||u(e)||Ir(e)||s(e)||fs(e)||hs(e)||e===null||e===void 0}function hs(e){var t=K(e)&&!w(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"],l,x,V=n.length;for(l=0;l<V;l+=1)x=n[l],r=r||o(e,x);return t&&r}function fs(e){var t=L(e),r=!1;return t&&(r=e.filter(function(n){return!s(n)&&Ir(e)}).length===0),t&&r}function ms(e){var t=K(e)&&!w(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],l,x;for(l=0;l<n.length;l+=1)x=n[l],r=r||o(e,x);return t&&r}function ps(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 gs(e,t){arguments.length===1&&(arguments[0]?ds(arguments[0])?(e=arguments[0],t=void 0):ms(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Le(),n=Ua(r,this).startOf("day"),l=d.calendarFormat(this,n)||"sameElse",x=t&&(I(t[l])?t[l].call(this,r):t[l]);return this.format(x||this.localeData().calendar(l,this,Le(r)))}function ys(){return new y(this)}function vs(e,t){var r=T(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=ce(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function _s(e,t){var r=T(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=ce(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function bs(e,t,r,n){var l=T(e)?e:Le(e),x=T(t)?t:Le(t);return this.isValid()&&l.isValid()&&x.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(l,r):!this.isBefore(l,r))&&(n[1]===")"?this.isBefore(x,r):!this.isAfter(x,r))):!1}function ws(e,t){var r=T(e)?e:Le(e),n;return this.isValid()&&r.isValid()?(t=ce(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 Ms(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ss(e,t,r){var n,l,x;if(!this.isValid())return NaN;if(n=Ua(e,this),!n.isValid())return NaN;switch(l=(n.utcOffset()-this.utcOffset())*6e4,t=ce(t),t){case"year":x=ua(this,n)/12;break;case"month":x=ua(this,n);break;case"quarter":x=ua(this,n)/3;break;case"second":x=(this-n)/1e3;break;case"minute":x=(this-n)/6e4;break;case"hour":x=(this-n)/36e5;break;case"day":x=(this-n-l)/864e5;break;case"week":x=(this-n-l)/6048e5;break;default:x=this-n}return r?x:st(x)}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"),l,x;return t-n<0?(l=e.clone().add(r-1,"months"),x=(t-n)/(n-l)):(l=e.clone().add(r+1,"months"),x=(t-n)/(l-n)),-(r+x)||0}d.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",d.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Ds(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ks(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?_e(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):I(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",_e(r,"Z")):_e(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ys(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,l,x;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",l="-MM-DD[T]HH:mm:ss.SSS",x=t+'[")]',this.format(r+n+l+x)}function Os(e){e||(e=this.isUtc()?d.defaultFormatUtc:d.defaultFormat);var t=_e(this,e);return this.localeData().postformat(t)}function js(e,t){return this.isValid()&&(T(e)&&e.isValid()||Le(e).isValid())?mt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Ts(e){return this.from(Le(),e)}function Cs(e,t){return this.isValid()&&(T(e)&&e.isValid()||Le(e).isValid())?mt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Ns(e){return this.to(Le(),e)}function Fr(e){var t;return e===void 0?this._locale._abbr:(t=xt(e),t!=null&&(this._locale=t),this)}var zr=C("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 Ps(e){var t,r;if(e=ce(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),d.updateOffset(this,!0),this}function Es(e){var t,r;if(e=ce(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),d.updateOffset(this,!0),this}function As(){return this._d.valueOf()-(this._offset||0)*6e4}function Rs(){return Math.floor(this.valueOf()/1e3)}function Is(){return new Date(this.valueOf())}function Fs(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zs(){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 Ls(){return this.isValid()?this.toISOString():null}function Ws(){return O(this)}function Vs(){return p({},v(this))}function Hs(){return v(this).overflow}function $s(){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"),re("N",Ja),re("NN",Ja),re("NNN",Ja),re("NNNN",to),re("NNNNN",ao),Ee(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var l=r._locale.erasParse(e,n,r._strict);l?v(r).era=l:v(r).invalidEra=e}),re("y",lt),re("yy",lt),re("yyy",lt),re("yyyy",lt),re("yo",ro),Ee(["y","yy","yyy","yyyy"],Xe),Ee(["yo"],function(e,t,r,n){var l;r._locale._eraYearOrdinalRegex&&(l=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Xe]=r._locale.eraYearOrdinalParse(e,l):t[Xe]=parseInt(e,10)});function Bs(e,t){var r,n,l,x=this._eras||xt("en")._eras;for(r=0,n=x.length;r<n;++r){switch(typeof x[r].since){case"string":l=d(x[r].since).startOf("day"),x[r].since=l.valueOf();break}switch(typeof x[r].until){case"undefined":x[r].until=1/0;break;case"string":l=d(x[r].until).startOf("day").valueOf(),x[r].until=l.valueOf();break}}return x}function Us(e,t,r){var n,l,x=this.eras(),V,ie,ge;for(e=e.toUpperCase(),n=0,l=x.length;n<l;++n)if(V=x[n].name.toUpperCase(),ie=x[n].abbr.toUpperCase(),ge=x[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(ie===e)return x[n];break;case"NNNN":if(V===e)return x[n];break;case"NNNNN":if(ge===e)return x[n];break}else if([V,ie,ge].indexOf(e)>=0)return x[n]}function qs(e,t){var r=e.since<=e.until?1:-1;return t===void 0?d(e.since).year():d(e.since).year()+(t-e.offset)*r}function Js(){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 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].narrow;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].abbr;return""}function Xs(){var e,t,r,n,l=this.localeData().eras();for(e=0,t=l.length;e<t;++e)if(r=l[e].since<=l[e].until?1:-1,n=this.clone().startOf("day").valueOf(),l[e].since<=n&&n<=l[e].until||l[e].until<=n&&n<=l[e].since)return(this.year()-d(l[e].since).year())*r+l[e].offset;return this.year()}function Qs(e){return o(this,"_erasNameRegex")||Ga.call(this),e?this._erasNameRegex:this._erasRegex}function Zs(e){return o(this,"_erasAbbrRegex")||Ga.call(this),e?this._erasAbbrRegex:this._erasRegex}function eo(e){return o(this,"_erasNarrowRegex")||Ga.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ja(e,t){return t.erasAbbrRegex(e)}function to(e,t){return t.erasNameRegex(e)}function ao(e,t){return t.erasNarrowRegex(e)}function ro(e,t){return t._eraYearOrdinalRegex||lt}function Ga(){var e=[],t=[],r=[],n=[],l,x,V,ie,ge,je=this.eras();for(l=0,x=je.length;l<x;++l)V=ct(je[l].name),ie=ct(je[l].abbr),ge=ct(je[l].narrow),t.push(V),e.push(ie),r.push(ge),n.push(V),n.push(ie),n.push(ge);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"),re("G",_t),re("g",_t),re("GG",we,Ie),re("gg",we,Ie),re("GGGG",vt,Qe),re("gggg",vt,Qe),re("GGGGG",pt,ye),re("ggggg",pt,ye),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]=d.parseTwoDigitYear(e)});function no(e){return $r.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function io(e){return $r.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function so(){return wt(this.year(),1,4)}function oo(){return wt(this.isoWeekYear(),1,4)}function lo(){var e=this.localeData()._week;return wt(this.year(),e.dow,e.doy)}function uo(){var e=this.localeData()._week;return wt(this.weekYear(),e.dow,e.doy)}function $r(e,t,r,n,l){var x;return e==null?Kt(this,n,l).year:(x=wt(e,n,l),t>x&&(t=x),co.call(this,e,t,r,n,l))}function co(e,t,r,n,l){var x=wr(e,t,r,n,l),V=Gt(x.year,0,x.dayOfYear);return this.year(V.getUTCFullYear()),this.month(V.getUTCMonth()),this.date(V.getUTCDate()),this}Z("Q",0,"Qo","quarter"),re("Q",$e),Ee("Q",function(e,t){t[b]=(Se(e)-1)*3});function ho(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Z("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}),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"),re("DDD",ht),re("DDDD",Ge),Ee(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Se(e)});function fo(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"),re("m",we,it),re("mm",we,Ie),Ee(["m","mm"],oe);var mo=Ke("Minutes",!1);Z("s",["ss",2],0,"second"),re("s",we,it),re("ss",we,Ie),Ee(["s","ss"],Me);var po=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}),re("S",ht,$e),re("SS",ht,Ie),re("SSS",ht,Ge);var jt,Ur;for(jt="SSSS";jt.length<=9;jt+="S")re(jt,lt);function go(e,t){t[Oe]=Se(("0."+e)*1e3)}for(jt="S";jt.length<=9;jt+="S")Ee(jt,go);Ur=Ke("Milliseconds",!1),Z("z",0,0,"zoneAbbr"),Z("zz",0,0,"zoneName");function yo(){return this._isUTC?"UTC":""}function vo(){return this._isUTC?"Coordinated Universal Time":""}var G=y.prototype;G.add=us,G.calendar=gs,G.clone=ys,G.diff=Ss,G.endOf=Es,G.format=Os,G.from=js,G.fromNow=Ts,G.to=Cs,G.toNow=Ns,G.get=et,G.invalidAt=Hs,G.isAfter=vs,G.isBefore=_s,G.isBetween=bs,G.isSame=ws,G.isSameOrAfter=xs,G.isSameOrBefore=Ms,G.isValid=Ws,G.lang=zr,G.locale=Fr,G.localeData=Lr,G.max=Wi,G.min=Li,G.parsingFlags=Vs,G.set=Jt,G.startOf=Ps,G.subtract=cs,G.toArray=Fs,G.toObject=zs,G.toDate=Is,G.toISOString=ks,G.inspect=Ys,typeof Symbol<"u"&&Symbol.for!=null&&(G[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),G.toJSON=Ls,G.toString=Ds,G.unix=Rs,G.valueOf=As,G.creationData=$s,G.eraName=Js,G.eraNarrow=Gs,G.eraAbbr=Ks,G.eraYear=Xs,G.year=We,G.isLeapYear=Be,G.weekYear=no,G.isoWeekYear=io,G.quarter=G.quarters=ho,G.month=_r,G.daysInMonth=In,G.week=G.weeks=Bn,G.isoWeek=G.isoWeeks=Un,G.weeksInYear=lo,G.weeksInWeekYear=uo,G.isoWeeksInYear=so,G.isoWeeksInISOWeekYear=oo,G.date=Br,G.day=G.days=ii,G.weekday=si,G.isoWeekday=oi,G.dayOfYear=fo,G.hour=G.hours=mi,G.minute=G.minutes=mo,G.second=G.seconds=po,G.millisecond=G.milliseconds=Ur,G.utcOffset=Ki,G.utc=Qi,G.local=Zi,G.parseZone=es,G.hasAlignedHourOffset=ts,G.isDST=as,G.isLocal=ns,G.isUtcOffset=is,G.isUtc=Pr,G.isUTC=Pr,G.zoneAbbr=yo,G.zoneName=vo,G.dates=C("dates accessor is deprecated. Use date instead.",Br),G.months=C("months accessor is deprecated. Use month instead",_r),G.years=C("years accessor is deprecated. Use year instead",We),G.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Xi),G.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",rs);function _o(e){return Le(e*1e3)}function bo(){return Le.apply(null,arguments).parseZone()}function qr(e){return e}var Pe=J.prototype;Pe.calendar=he,Pe.longDateFormat=ze,Pe.invalidDate=_,Pe.ordinal=A,Pe.preparse=qr,Pe.postformat=qr,Pe.relativeTime=te,Pe.pastFuture=se,Pe.set=E,Pe.eras=Bs,Pe.erasParse=Us,Pe.erasConvertYear=qs,Pe.erasAbbrRegex=Zs,Pe.erasNameRegex=Qs,Pe.erasNarrowRegex=eo,Pe.months=Pn,Pe.monthsShort=En,Pe.monthsParse=Rn,Pe.monthsRegex=zn,Pe.monthsShortRegex=Fn,Pe.week=Wn,Pe.firstDayOfYear=$n,Pe.firstDayOfWeek=Hn,Pe.weekdays=ei,Pe.weekdaysMin=ai,Pe.weekdaysShort=ti,Pe.weekdaysParse=ni,Pe.weekdaysRegex=li,Pe.weekdaysShortRegex=ui,Pe.weekdaysMinRegex=ci,Pe.isPM=hi,Pe.meridiem=pi;function fa(e,t,r,n){var l=xt(),x=f().set(n,t);return l[r](x,e)}function Jr(e,t,r){if(s(e)&&(t=e,e=void 0),e=e||"",t!=null)return fa(e,t,r,"month");var n,l=[];for(n=0;n<12;n++)l[n]=fa(e,n,r,"month");return l}function Ka(e,t,r,n){typeof e=="boolean"?(s(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,s(t)&&(r=t,t=void 0),t=t||"");var l=xt(),x=e?l._week.dow:0,V,ie=[];if(r!=null)return fa(t,(r+x)%7,n,"day");for(V=0;V<7;V++)ie[V]=fa(t,(V+x)%7,n,"day");return ie}function wo(e,t){return Jr(e,t,"months")}function xo(e,t){return Jr(e,t,"monthsShort")}function Mo(e,t,r){return Ka(e,t,r,"weekdays")}function So(e,t,r){return Ka(e,t,r,"weekdaysShort")}function Do(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}}),d.lang=C("moment.lang is deprecated. Use moment.locale instead.",Ot),d.langData=C("moment.langData is deprecated. Use moment.localeData instead.",xt);var Mt=Math.abs;function ko(){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 Gr(e,t,r,n){var l=mt(t,r);return e._milliseconds+=n*l._milliseconds,e._days+=n*l._days,e._months+=n*l._months,e._bubble()}function Yo(e,t){return Gr(this,e,t,1)}function Oo(e,t){return Gr(this,e,t,-1)}function Kr(e){return e<0?Math.floor(e):Math.ceil(e)}function jo(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,l,x,V,ie,ge;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,l=st(e/1e3),n.seconds=l%60,x=st(l/60),n.minutes=x%60,V=st(x/60),n.hours=V%24,t+=st(V/24),ge=st(Xr(t)),r+=ge,t-=Kr(Xa(ge)),ie=st(r/12),r%=12,n.days=t,n.months=r,n.years=ie,this}function Xr(e){return e*4800/146097}function Xa(e){return e*146097/4800}function To(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=ce(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"),Co=St("s"),No=St("m"),Po=St("h"),Eo=St("d"),Ao=St("w"),Ro=St("M"),Io=St("Q"),Fo=St("y"),zo=Qr;function Lo(){return mt(this)}function Wo(e){return e=ce(e),this.isValid()?this[e+"s"]():NaN}function At(e){return function(){return this.isValid()?this._data[e]:NaN}}var Vo=At("milliseconds"),Ho=At("seconds"),$o=At("minutes"),Bo=At("hours"),Uo=At("days"),qo=At("months"),Jo=At("years");function Go(){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 Ko(e,t,r,n,l){return l.relativeTime(t||1,!!r,e,n)}function Xo(e,t,r,n){var l=mt(e).abs(),x=Dt(l.as("s")),V=Dt(l.as("m")),ie=Dt(l.as("h")),ge=Dt(l.as("d")),je=Dt(l.as("M")),at=Dt(l.as("w")),kt=Dt(l.as("y")),Tt=x<=r.ss&&["s",x]||x<r.s&&["ss",x]||V<=1&&["m"]||V<r.m&&["mm",V]||ie<=1&&["h"]||ie<r.h&&["hh",ie]||ge<=1&&["d"]||ge<r.d&&["dd",ge];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,Ko.apply(null,Tt)}function Qo(e){return e===void 0?Dt:typeof e=="function"?(Dt=e,!0):!1}function Zo(e,t){return Bt[e]===void 0?!1:t===void 0?Bt[e]:(Bt[e]=t,e==="s"&&(Bt.ss=t-1),!0)}function el(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Bt,l,x;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)),l=this.localeData(),x=Xo(this,!r,n,l),r&&(x=l.pastFuture(+this,x)),l.postformat(x)}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,l,x,V,ie=this.asSeconds(),ge,je,at,kt;return ie?(n=st(e/60),l=st(n/60),e%=60,n%=60,x=st(r/12),r%=12,V=e?e.toFixed(3).replace(/\.?0+$/,""):"",ge=ie<0?"-":"",je=Ut(this._months)!==Ut(ie)?"-":"",at=Ut(this._days)!==Ut(ie)?"-":"",kt=Ut(this._milliseconds)!==Ut(ie)?"-":"",ge+"P"+(x?je+x+"Y":"")+(r?je+r+"M":"")+(t?at+t+"D":"")+(l||n||e?"T":"")+(l?kt+l+"H":"")+(n?kt+n+"M":"")+(e?kt+V+"S":"")):"P0D"}var Te=oa.prototype;Te.isValid=Ui,Te.abs=ko,Te.add=Yo,Te.subtract=Oo,Te.as=To,Te.asMilliseconds=Qr,Te.asSeconds=Co,Te.asMinutes=No,Te.asHours=Po,Te.asDays=Eo,Te.asWeeks=Ao,Te.asMonths=Ro,Te.asQuarters=Io,Te.asYears=Fo,Te.valueOf=zo,Te._bubble=jo,Te.clone=Lo,Te.get=Wo,Te.milliseconds=Vo,Te.seconds=Ho,Te.minutes=$o,Te.hours=Bo,Te.days=Uo,Te.weeks=Go,Te.months=qo,Te.years=Jo,Te.humanize=el,Te.toISOString=ma,Te.toString=ma,Te.toJSON=ma,Te.locale=Fr,Te.localeData=Lr,Te.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ma),Te.lang=zr,Z("X",0,0,"unix"),Z("x",0,0,"valueOf"),re("x",_t),re("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 d(L,K,o,w){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[L+" Tage",L+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[L+" Monate",L+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[L+" Jahre",L+" Jahren"]};return K?a[o][0]:a[o][1]}var B=m.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:d,mm:"%d Minuten",h:d,hh:"%d Stunden",d,dd:d,w:d,ww:"%d Wochen",M:d,MM:d,y:d,yy:d},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return B}))})()),or.exports}sc();const Nt=g=>{let i="";return g.split(":").forEach(m=>{i+=m}),parseInt(i)},mn=g=>g.toString().padStart(4,"0").match(/.{1,2}/g).join(":"),Za=g=>{const i=g.address;if(g.addresstype==="county"&&i.country)return i.county;if(g.addresstype==="village"&&i.village)return i.village;const m=[];["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(L=>{i.hasOwnProperty(L)&&i[L]&&m.push(i[L])}),i.road?m.push(i.road):i.pedestrian?m.push(i.pedestrian):i.suburb?m.push(i.suburb):i.square?m.push(i.square):(i.neighbourhood&&m.push(i.neighbourhood),i.hamlet?m.push(i.hamlet):i.isolated_dwelling?m.push(i.isolated_dwelling):i.locality?m.push(i.locality):i.croft&&m.push(i.croft)),i.house_number&&m.push(i.house_number),i.postcode&&m.push(i.postcode),i.village&&m.push(i.village),i.town?m.push(i.town):i.city&&m.push(i.city);var B=m.join(", ").substr(0,150);return B};function aa(g){let i=window.sessionStorage.getItem(g);if(i!==null){let m=JSON.parse(i);if(new Date(m.expirationDate)>new Date)return m.value;window.sessionStorage.removeItem(g)}return null}function oc(g,i,m){let d=m?new Date(m*1e3):null;if(d){let B={value:i,expirationDate:d.toISOString()};window.sessionStorage.setItem(g,JSON.stringify(B))}}function pn({day:g,slot:i,i18next:m}){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:g})," ",m.t("alle")," ",m.t("ore")," ",h.jsx("b",{children:i})]})})})})}const lc=({component:g,current:i,onChange:m,i18next:d})=>{const[B,L]=q.useState(),[K,o]=q.useState([]),[w,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(null),[f,j]=q.useState(null),[v,D]=q.useState(null),[O,Y]=q.useState(null),[F,P]=q.useState({}),[S,y]=q.useState(null),[T,W]=q.useState(!1),[C,M]=q.useState([]),[R,I]=q.useState(!1),E=q.useRef(),$=g.calendarId;fe.locale(d.language);const J=k=>{let A=fe(k).format("YYYY-MM-DD");fetch(Q(A)).then(z=>z.json()).then(z=>{let te=he(k||new Date);const se=z.filter(Ae=>Ae.available==!0);se.length===0&&N();let ce=[];te.forEach(Ae=>{z.some($e=>$e.date===Ae&&$e.available==!0)?ce.push({available:!0,date:Ae}):ce.push({available:!1,date:Ae})});const pe=ce.map(Ae=>{if(Ae.available===!1)return fe(Ae.date,"YYYY-MM-DD").toDate()});o(pe);const xe=se.length?se[0].date:k;ne(xe)}).catch(z=>console.error(z))},ne=k=>{Y(null),D(null),a([]);let A=fe(k).format("YYYY-MM-DD");fetch(de(A)).then(z=>z.json()).then(z=>{const te=z.filter(se=>se.availability==!0);P(te[0]),te.length>0?(a(z),u(!1),D(fe(k).format("L")),L(fe(k,"YYYY-MM-DD").toDate())):(z.length>0&&L(fe(z[0].date,"YYYY-MM-DD").toDate()),a([]),N())})},ae=()=>{if($!==""&&$!=null)if(!i.dataValue)J(new Date);else if(g.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){y(i.dataValue);let k=[];i.dataValue.map(A=>{k.push({...A,date:fe(A.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),M(k)}}else if(!g.multiple&&typeof i.dataValue=="object"){const k={date:i.dataValue.date,slot:i.dataValue.slot},A={...i.dataValue,date:fe(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};M([A]),y(k)}else{let k=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),A=k[2].split("#");const z={date:fe(k[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:k[1]};g.multiple?(m([{date:k[0],slot:k[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}]),M([{date:k[0],slot:k[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}])):(m({date:k[0],slot:k[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}),M([{date:k[0],slot:k[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}])),y(z)}};q.useEffect(()=>{var k;(k=window.FormioInstance)==null||k.formReady.then(()=>{setTimeout(()=>{ae()},1e3)})},[]);const he=k=>{let z=fe(k,"YYYY-MM").daysInMonth(),te=[];for(;z;){let se=fe(k).date(z);te.push(se.format("YYYY-MM-DD")),z--}return te},Q=(k,A=!1)=>{let z=g.calendarId,te=g.select_opening_hours,se=g.select_opening_hours?g.opening_hours:[];window.location.pathname.split("/");let ce=`${Fe()}/api/calendars/${z}/availabilities`,pe=[`from_time=${fe(k).startOf("month").format("YYYY-MM-DD")}`,`to_time=${fe(k).endOf("month").format("YYYY-MM-DD")}`];return A&&pe.push(`available=${A}`),te&&se&&pe.push(`opening_hours=${se.join()}`),`${ce}?${pe.join("&")}`},de=(k,A=!1)=>{let z=g.calendarId,te=g.select_opening_hours,se=g.select_opening_hours?g.opening_hours:[];window.location.pathname.split("/");const ce=fe(k).format("YYYY-MM-DD");let pe=`${Fe()}/api/calendars/${z}/availabilities/${ce}`,xe=[];return A&&xe.push(`available=${A}`),te&&se&&xe.push(`opening_hours=${se.join()}`),xe&&(pe=`${pe}?${xe.join("&")}`),pe},ee=k=>{J(k)},me=k=>{setTimeout(()=>{W(!T)},1e3),ne(k)},ue=k=>{Y(null),setTimeout(()=>{k&&(j(k.target.dataset),Y(k.target.id))},300)},Z=k=>{p(null);let A=`${Fe()}/it/meetings/new-draft`,z={date:f!=null&&f.date?fe(f==null?void 0:f.date).format("DD-MM-YYYY"):fe(k.target.dataset.date).format("DD-MM-YYYY"),slot:f!=null&&f.value_start&&(f!=null&&f.value_end)?f.value_start+"-"+f.value_end:k.target.dataset.slots,calendar:g.calendarId,opening_hour:f!=null&&f.opening_hour?f==null?void 0:f.opening_hour:k.target.dataset.opening_hour,meeting:c?c.id:"",first_available_date:F.date,first_available_start_time:F.start_time,first_available_end_time:F.end_time,first_availability_updated_at:fe().format()};fetch(A,{method:"POST",body:JSON.stringify(z),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(te=>{if(!te.ok)throw new Error(d.t("Intervallo selezionato non disponibile!"));return te.json()}).then(te=>{p(te);const se={date:z.date,slot:z.slot,calendar_id:z.calendar[0],opening_hour_id:z.opening_hour||z.opening_hour_id,meeting_id:te.id};M([...C,se])}).catch(te=>{console.log(te),Je.fire({title:"",html:"<p>"+te+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{f&&(Z(),W(!T))},Ne=()=>h.jsx("span",{children:d.t("Tempo prenotazione scaduto!")}),_e=({minutes:k,seconds:A,completed:z})=>z?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[d.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:[k," ",d.t("minuti")," ",A," ",d.t("secondi")]})]})]})}),Ce=k=>{const A=Nt(k.target.value),z=Nt(k.target.min),te=Nt(k.target.max);A<z||A>te||A>Nt(f.end)?(Je.fire({title:"",html:`<p>${d.t("l'orario")} <b>${mn(A)}</b> ${d.t("non è valido")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):j({...f,value_start:k.target.value})},Re=k=>{const A=Nt(k.target.value),z=Nt(k.target.min),te=Nt(k.target.max);A<z||A>te||A<Nt(f.start)?(Je.fire({title:"",html:`<p>${d.t("l'orario")} <b>${mn(A)}</b> ${d.t("non è valido")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):j({...f,value_end:k.target.value})},ze=k=>{if(k===null||k==="")m("");else if(Array.isArray(k)&&k.length>0){let A=[];C.map(z=>{A.push({date:fe(z.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:z.slot,calendar_id:z.calendar_id||z.calendar[0],meeting_id:z.meeting_id,opening_hour_id:z.opening_hour||z.opening_hour_id})}),g.multiple?m(A):m(A[0])}else m("")},N=()=>{u(!0),p(null),D(null),ze(null)},_=()=>{if(d.language==="it")return kn;if(d.language==="en")return Dn;if(d.language==="de")return Sn};q.useEffect(()=>{ze(C)},[C]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&R===!1?(I(!0),setTimeout(()=>{ae()},1e3)):(I(!1),setTimeout(()=>{ae()},1e3))},[]);const H=(k,A)=>{let z=`${Fe()}/api/meetings/${A.meeting_id}`;fetch(z,{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>${d.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const se=[...C.slice(0,k),...C.slice(k+1)];M(se),J(new Date)}})};return h.jsxs(h.Fragment,{children:[R&&S?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(S)&&S.length>1?d.t("Giorni selezionati per la prenotazione"):d.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(S)?S.map(k=>h.jsx(pn,{day:fe(k.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:k.slot})):h.jsx(pn,{day:fe(S.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:S.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[g.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:d.t(g.label)}),h.jsx(va.DayPicker,{mode:"single",selected:B,locale:_(),disabled:K,onMonthChange:ee,onDayClick:me}),h.jsx("p",{children:d.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")})]})}):C.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:d.t(g.label)}),h.jsx(va.DayPicker,{mode:"single",selected:B,locale:_(),disabled:K,onMonthChange:ee,onDayClick:me}),h.jsxs("p",{children:[" ",d.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")]})]})}):null,h.jsx("div",{className:"col-12",children:C.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[C.length>1?d.t("Giorni selezionati per la prenotazione"):d.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:C.map((k,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:[k.date," ",f||k.slot?`${d.t("alle")} ${k.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>H(A,k),role:"button"})]})})},"li"+A))})})}),c?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(xn,{date:c.expiration_time,renderer:_e})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:T,toggle:()=>W(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>W(!T),id:"daySelected",children:d.t("Seleziona una fascia oraria")}),s?null:h.jsxs("div",{className:"title-xsmall u-grey-dark px-4",children:[" ",d.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:[C.length>=1?h.jsxs("div",{children:[v&&!s?h.jsxs("h6",{children:[d.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"})," ",d.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ue,tabIndex:"1",className:O==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":fe(v,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":C[C.length-1].slot,"data-opening_hour":C[C.length-1].opening_hour_id,"data-start":C[C.length-1].slot.split("-")[0],"data-end":C[C.length-1].slot.split("-")[1],"data-value_start":C[C.length-1].slot.split("-")[0],"data-value_end":C[C.length-1].slot.split("-")[1],disabled:s,children:C[C.length-1].slot})})]})]}):null,h.jsx("div",{children:v&&C.length>=1?h.jsx("h6",{children:d.t("Seleziona altri orari")}):s?null:h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]})}),w.map((k,A)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+A,onClick:ue,ref:E,className:O==="slot-"+A?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":k.date,"data-start":k.start_time,"data-end":k.end_time,"data-value_start":k.start_time,"data-value_end":k.end_time,"data-slots":k.start_time+"-"+k.end_time,"data-opening_hour":k.opening_hour,"data-min_duration":k.min_duration,disabled:k.slots_available==0,children:[k.start_time," - ",k.end_time]})},"slot-"+A)),s?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"}),d.t("Attenzione")]}),h.jsxs("p",{children:[" ",d.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null,h.jsx("div",{className:"col-12",children:f!=null&&f.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:d.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:d.t("Dalle"),className:"active",defaultValue:f.value_start||f.start,min:f.start,max:f.end,onBlur:Ce})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(le.Input,{type:"time",label:d.t("alle"),className:"active",defaultValue:f.value_end||f.end,onBlur:Re,min:f.start,max:f.end})})]}):null})]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!v||!(f!=null&&f.value_start),children:d.t("Conferma")})})]})]})};var It;let Yn=(It=class extends ot.ReactComponent{constructor(i,m,d){super(i,m,d)}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,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(lc,{ref:m,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...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 m=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),d=m[2].split("#");this.date=m[0],this.slot=m[1],this.meeting=d[1],this.meeting_expiration_time=null,this.opening_hour=d.length===3?d[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:"",m=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:m}}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) {
|
|
64
|
+
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var H={};function J(e,t){u.deprecationHandler!=null&&u.deprecationHandler(e,t),H[e]||(z(t),H[e]=!0)}u.suppressDeprecationWarnings=!1,u.deprecationHandler=null;function w(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function T(e){var t,r;for(r in e)o(e,r)&&(t=e[r],w(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 V(e,t){var r=p({},e),n;for(n in t)o(t,n)&&(K(e[n])&&K(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)o(e,n)&&!o(t,n)&&K(e[n])&&(r[n]=p({},r[n]));return r}function B(e){e!=null&&this.set(e)}var re;Object.keys?re=Object.keys:re=function(e){var t,r=[];for(t in e)o(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 he(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return w(n)?n.call(t,r):n}function Z(e,t,r){var n=""+Math.abs(e),l=t-n.length,M=e>=0;return(M?r?"+":"":"-")+Math.pow(10,Math.max(0,l)).toString().substr(1)+n}var ce=/(\[[^\[]*\])|(\\)?([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,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,fe={},se={};function Q(e,t,r,n){var l=n;typeof n=="string"&&(l=function(){return this[n]()}),e&&(se[e]=l),t&&(se[t[0]]=function(){return Z(l.apply(this,arguments),t[1],t[2])}),r&&(se[r]=function(){return this.localeData().ordinal(l.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(ce),r,n;for(r=0,n=t.length;r<n;r++)se[t[r]]?t[r]=se[t[r]]:t[r]=ve(t[r]);return function(l){var M="",L;for(L=0;L<n;L++)M+=w(t[L])?t[L].call(l,e):t[L];return M}}function _e(e,t){return e.isValid()?(t=Ce(t,e.localeData()),fe[t]=fe[t]||Ne(t),fe[t](e)):e.localeData().invalidDate()}function Ce(e,t){var r=5;function n(l){return t.longDateFormat(l)||l}for(ne.lastIndex=0;r>=0&&ne.test(e);)e=e.replace(ne,n),ne.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(ce).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 _(){return this._invalidDate}var W="%d",k=/\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 l=this._relativeTime[r];return w(l)?l(e,t,r,n):l.replace(/%d/i,e)}function oe(e,t){var r=this._relativeTime[e>0?"future":"past"];return w(r)?r(t):r.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 pe(e){var t={},r,n;for(n in e)o(e,n)&&(r=de(n),r&&(t[r]=e[n]));return t}var xe={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)o(e,r)&&t.push({unit:r,priority:xe[r]});return t.sort(function(n,l){return n.priority-l.priority}),t}var $e=/\d/,Ie=/\d\d/,Ge=/\d{3}/,Qe=/\d{4}/,ye=/[+-]?\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+/,_t=/[+-]?\d+/,bt=/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]=w(t)?t:function(n,l){return n&&r?r:t}}function Na(e,t){return o(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,l,M){return r||n||l||M}))}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,l;for(typeof e=="string"&&(e=[e]),s(t)&&(n=function(M,L){L[t]=Se(M)}),l=e.length,r=0;r<l;r++)Lt[e[r]]=n}function Pt(e,t){Ee(e,function(r,n,l,M){l._w=l._w||{},t(r,l._w,l,M)})}function Pa(e,t,r){t!=null&&o(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,b=1,U=2,X=3,le=4,Me=5,Oe=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"),ae("Y",_t),ae("YY",we,Ie),ae("YYYY",vt,Qe),ae("YYYYY",pt,ye),ae("YYYYYY",pt,ye),Ee(["YYYYY","YYYYYY"],Xe),Ee("YYYY",function(e,t){t[Xe]=e.length===2?u.parseTwoDigitYear(e):Se(e)}),Ee("YY",function(e,t){t[Xe]=u.parseTwoDigitYear(e)}),Ee("Y",function(e,t){t[Xe]=parseInt(e,10)});function qe(e){return Wt(e)?366:365}u.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),u.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,l,M,L,ie;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,l=e._isUTC,t){case"Milliseconds":return void(l?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(l?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(l?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(l?n.setUTCHours(r):n.setHours(r));case"Date":return void(l?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}M=r,L=e.month(),ie=e.date(),ie=ie===29&&L===1&&!Wt(M)?28:ie,l?n.setUTCFullYear(M,L,ie):n.setFullYear(M,L,ie)}}function et(e){return e=de(e),w(this[e])?this[e]():this}function Jt(e,t){if(typeof e=="object"){e=pe(e);var r=Ae(e),n,l=r.length;for(n=0;n<l;n++)this[r[n].unit](e[r[n].unit])}else if(e=de(e),w(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}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)}),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[b]=Se(e)-1}),Ee(["MMM","MMMM"],function(e,t,r,n){var l=r._locale.monthsParse(e,n,r._strict);l!=null?t[b]=l:v(r).invalidMonth=e});var Tn="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?/,Cn=ft,Nn=ft;function Pn(e,t){return e?F(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||yr).test(t)?"format":"standalone"][e.month()]:F(this._months)?this._months:this._months.standalone}function En(e,t){return e?F(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[yr.test(t)?"format":"standalone"][e.month()]:F(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function An(e,t,r){var n,l,M,L=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)M=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(M,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(M,"").toLocaleLowerCase();return r?t==="MMM"?(l=He.call(this._shortMonthsParse,L),l!==-1?l:null):(l=He.call(this._longMonthsParse,L),l!==-1?l:null):t==="MMM"?(l=He.call(this._shortMonthsParse,L),l!==-1?l:(l=He.call(this._longMonthsParse,L),l!==-1?l:null)):(l=He.call(this._longMonthsParse,L),l!==-1?l:(l=He.call(this._shortMonthsParse,L),l!==-1?l:null))}function Rn(e,t,r){var n,l,M;if(this._monthsParseExact)return An.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(l=f([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(l,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(l,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(M="^"+this.months(l,"")+"|^"+this.monthsShort(l,""),this._monthsParse[n]=new RegExp(M.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),!s(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 _r(e){return e!=null?(vr(this,e),u.updateOffset(this,!0),this):dt(this,"Month")}function In(){return Aa(this.year(),this.month())}function Fn(e){return this._monthsParseExact?(o(this,"_monthsRegex")||br.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Cn),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function zn(e){return this._monthsParseExact?(o(this,"_monthsRegex")||br.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Nn),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function br(){function e(ge,je){return je.length-ge.length}var t=[],r=[],n=[],l,M,L,ie;for(l=0;l<12;l++)M=f([2e3,l]),L=ct(this.monthsShort(M,"")),ie=ct(this.months(M,"")),t.push(L),r.push(ie),n.push(ie),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 Ln(e,t,r,n,l,M,L){var ie;return e<100&&e>=0?(ie=new Date(e+400,t,r,n,l,M,L),isFinite(ie.getFullYear())&&ie.setFullYear(e)):ie=new Date(e,t,r,n,l,M,L),ie}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,l=(7+Gt(e,0,n).getUTCDay()-t)%7;return-l+n-1}function wr(e,t,r,n,l){var M=(7+r-n)%7,L=na(e,n,l),ie=1+7*(t-1)+M+L,ge,je;return ie<=0?(ge=e-1,je=qe(ge)+ie):ie>qe(e)?(ge=e+1,je=ie-qe(e)):(ge=e,je=ie),{year:ge,dayOfYear:je}}function Kt(e,t,r){var n=na(e.year(),t,r),l=Math.floor((e.dayOfYear()-n-1)/7)+1,M,L;return l<1?(L=e.year()-1,M=l+wt(L,t,r)):l>wt(e.year(),t,r)?(M=l-wt(e.year(),t,r),L=e.year()+1):(L=e.year(),M=l),{week:M,year:L}}function wt(e,t,r){var n=na(e,t,r),l=na(e+1,t,r);return(qe(e)-n+l)/7}Q("w",["ww",2],"wo","week"),Q("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 Wn(e){return Kt(e,this._week.dow,this._week.doy).week}var Vn={dow:0,doy:6};function Hn(){return this._week.dow}function $n(){return this._week.doy}function Bn(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Un(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"),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 l=r._locale.weekdaysParse(e,n,r._strict);l!=null?t.d=l:v(r).invalidWeekday=e}),Pt(["d","e","E"],function(e,t,r,n){t[n]=Se(e)});function qn(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Jn(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 Gn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),xr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Kn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xn=ft,Qn=ft,Zn=ft;function ei(e,t){var r=F(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 ti(e){return e===!0?Ra(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ai(e){return e===!0?Ra(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ri(e,t,r){var n,l,M,L=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)M=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(M,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(M,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(M,"").toLocaleLowerCase();return r?t==="dddd"?(l=He.call(this._weekdaysParse,L),l!==-1?l:null):t==="ddd"?(l=He.call(this._shortWeekdaysParse,L),l!==-1?l:null):(l=He.call(this._minWeekdaysParse,L),l!==-1?l:null):t==="dddd"?(l=He.call(this._weekdaysParse,L),l!==-1||(l=He.call(this._shortWeekdaysParse,L),l!==-1)?l:(l=He.call(this._minWeekdaysParse,L),l!==-1?l:null)):t==="ddd"?(l=He.call(this._shortWeekdaysParse,L),l!==-1||(l=He.call(this._weekdaysParse,L),l!==-1)?l:(l=He.call(this._minWeekdaysParse,L),l!==-1?l:null)):(l=He.call(this._minWeekdaysParse,L),l!==-1||(l=He.call(this._weekdaysParse,L),l!==-1)?l:(l=He.call(this._shortWeekdaysParse,L),l!==-1?l:null))}function ni(e,t,r){var n,l,M;if(this._weekdaysParseExact)return ri.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(l=f([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(l,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(l,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(l,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(M="^"+this.weekdays(l,"")+"|^"+this.weekdaysShort(l,"")+"|^"+this.weekdaysMin(l,""),this._weekdaysParse[n]=new RegExp(M.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 ii(e){if(!this.isValid())return e!=null?this:NaN;var t=dt(this,"Day");return e!=null?(e=qn(e,this.localeData()),this.add(e-t,"d")):t}function si(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 oi(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Jn(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function li(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Xn),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ui(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Qn),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ci(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Zn),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ia(){function e(at,kt){return kt.length-at.length}var t=[],r=[],n=[],l=[],M,L,ie,ge,je;for(M=0;M<7;M++)L=f([2e3,1]).day(M),ie=ct(this.weekdaysMin(L,"")),ge=ct(this.weekdaysShort(L,"")),je=ct(this.weekdays(L,"")),t.push(ie),r.push(ge),n.push(je),l.push(ie),l.push(ge),l.push(je);t.sort(e),r.sort(e),n.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.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 di(){return this.hours()||24}Q("H",["HH",2],0,"hour"),Q("h",["hh",2],0,Fa),Q("k",["kk",2],0,di),Q("hmm",0,0,function(){return""+Fa.apply(this)+Z(this.minutes(),2)}),Q("hmmss",0,0,function(){return""+Fa.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 Mr(e,t){Q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Mr("a",!0),Mr("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"],X),Ee(["k","kk"],function(e,t,r){var n=Se(e);t[X]=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[X]=Se(e),v(r).bigHour=!0}),Ee("hmm",function(e,t,r){var n=e.length-2;t[X]=Se(e.substr(0,n)),t[le]=Se(e.substr(n)),v(r).bigHour=!0}),Ee("hmmss",function(e,t,r){var n=e.length-4,l=e.length-2;t[X]=Se(e.substr(0,n)),t[le]=Se(e.substr(n,2)),t[Me]=Se(e.substr(l)),v(r).bigHour=!0}),Ee("Hmm",function(e,t,r){var n=e.length-2;t[X]=Se(e.substr(0,n)),t[le]=Se(e.substr(n))}),Ee("Hmmss",function(e,t,r){var n=e.length-4,l=e.length-2;t[X]=Se(e.substr(0,n)),t[le]=Se(e.substr(n,2)),t[Me]=Se(e.substr(l))});function hi(e){return(e+"").toLowerCase().charAt(0)==="p"}var fi=/[ap]\.?m?\.?/i,mi=Ke("Hours",!0);function pi(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Dr={calendar:ee,longDateFormat:Re,invalidDate:P,ordinal:W,dayOfMonthOrdinalParse:k,relativeTime:I,months:Tn,monthsShort:gr,week:Vn,weekdays:Gn,weekdaysMin:Kn,weekdaysShort:xr,meridiemParse:fi},Ve={},Xt={},Qt;function gi(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 yi(e){for(var t=0,r,n,l,M;t<e.length;){for(M=kr(e[t]).split("-"),r=M.length,n=kr(e[t+1]),n=n?n.split("-"):null;r>0;){if(l=ia(M.slice(0,r).join("-")),l)return l;if(n&&n.length>=r&&gi(M,n)>=r-1)break;r--}t++}return Qt}function vi(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ia(e){var t=null,r;if(Ve[e]===void 0&&g&&g.exports&&vi(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=xt(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)J("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 B(V(n,t)),Xt[e]&&Xt[e].forEach(function(l){za(l.name,l.config)}),Ot(e),Ve[e]}else return delete Ve[e],null}function _i(e,t){if(t!=null){var r,n,l=Dr;Ve[e]!=null&&Ve[e].parentLocale!=null?Ve[e].set(V(Ve[e]._config,t)):(n=ia(e),n!=null&&(l=n._config),t=V(l,t),n==null&&(t.abbr=e),r=new B(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 xt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qt;if(!F(e)){if(t=ia(e),t)return t;e=[e]}return yi(e)}function bi(){return re(Ve)}function La(e){var t,r=e._a;return r&&v(e).overflow===-2&&(t=r[b]<0||r[b]>11?b:r[U]<1||r[U]>Aa(r[Xe],r[b])?U:r[X]<0||r[X]>24||r[X]===24&&(r[le]!==0||r[Me]!==0||r[Oe]!==0)?X:r[le]<0||r[le]>59?le:r[Me]<0||r[Me]>59?Me: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 wi=/^\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)?)?$/,Mi=/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/]],Si=/^\/?Date\((-?\d+)/i,Di=/^(?:(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}))$/,ki={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,l=wi.exec(n)||xi.exec(n),M,L,ie,ge,je=sa.length,at=Wa.length;if(l){for(v(e).iso=!0,t=0,r=je;t<r;t++)if(sa[t][1].exec(l[1])){L=sa[t][0],M=sa[t][2]!==!1;break}if(L==null){e._isValid=!1;return}if(l[3]){for(t=0,r=at;t<r;t++)if(Wa[t][1].exec(l[3])){ie=(l[2]||" ")+Wa[t][0];break}if(ie==null){e._isValid=!1;return}}if(!M&&ie!=null){e._isValid=!1;return}if(l[4])if(Mi.exec(l[4]))ge="Z";else{e._isValid=!1;return}e._f=L+(ie||"")+(ge||""),Ha(e)}else e._isValid=!1}function Yi(e,t,r,n,l,M){var L=[Oi(e),gr.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(l,10)];return M&&L.push(parseInt(M,10)),L}function Oi(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function ji(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ti(e,t,r){if(e){var n=xr.indexOf(e),l=new Date(t[0],t[1],t[2]).getDay();if(n!==l)return v(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Ci(e,t,r){if(e)return ki[e];if(t)return 0;var n=parseInt(r,10),l=n%100,M=(n-l)/100;return M*60+l}function Or(e){var t=Di.exec(ji(e._i)),r;if(t){if(r=Yi(t[4],t[3],t[2],t[5],t[6],t[7]),!Ti(t[1],r,e))return;e._a=r,e._tzm=Ci(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 Ni(e){var t=Si.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:u.createFromInputFallback(e)}u.createFromInputFallback=N("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 Pi(e){var t=new Date(u.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Va(e){var t,r,n=[],l,M,L;if(!e._d){for(l=Pi(e),e._w&&e._a[U]==null&&e._a[b]==null&&Ei(e),e._dayOfYear!=null&&(L=Vt(e._a[Xe],l[Xe]),(e._dayOfYear>qe(L)||e._dayOfYear===0)&&(v(e)._overflowDayOfYear=!0),r=Gt(L,0,e._dayOfYear),e._a[b]=r.getUTCMonth(),e._a[U]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=l[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[X]===24&&e._a[le]===0&&e._a[Me]===0&&e._a[Oe]===0&&(e._nextDay=!0,e._a[X]=0),e._d=(e._useUTC?Gt:Ln).apply(null,n),M=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!==M&&(v(e).weekdayMismatch=!0)}}function Ei(e){var t,r,n,l,M,L,ie,ge,je;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(M=1,L=4,r=Vt(t.GG,e._a[Xe],Kt(Le(),1,4).year),n=Vt(t.W,1),l=Vt(t.E,1),(l<1||l>7)&&(ge=!0)):(M=e._locale._week.dow,L=e._locale._week.doy,je=Kt(Le(),M,L),r=Vt(t.gg,e._a[Xe],je.year),n=Vt(t.w,je.week),t.d!=null?(l=t.d,(l<0||l>6)&&(ge=!0)):t.e!=null?(l=t.e+M,(t.e<0||t.e>6)&&(ge=!0)):l=M),n<1||n>wt(r,M,L)?v(e)._overflowWeeks=!0:ge!=null?v(e)._overflowWeekday=!0:(ie=wr(r,n,l,M,L),e._a[Xe]=ie.year,e._dayOfYear=ie.dayOfYear)}u.ISO_8601=function(){},u.RFC_2822=function(){};function Ha(e){if(e._f===u.ISO_8601){Yr(e);return}if(e._f===u.RFC_2822){Or(e);return}e._a=[],v(e).empty=!0;var t=""+e._i,r,n,l,M,L,ie=t.length,ge=0,je,at;for(l=Ce(e._f,e._locale).match(ce)||[],at=l.length,r=0;r<at;r++)M=l[r],n=(t.match(Na(M,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),ge+=n.length),se[M]?(n?v(e).empty=!1:v(e).unusedTokens.push(M),Pa(M,n,e)):e._strict&&!n&&v(e).unusedTokens.push(M);v(e).charsLeftOver=ie-ge,t.length>0&&v(e).unusedInput.push(t),e._a[X]<=12&&v(e).bigHour===!0&&e._a[X]>0&&(v(e).bigHour=void 0),v(e).parsedDateParts=e._a.slice(0),v(e).meridiem=e._meridiem,e._a[X]=Ai(e._locale,e._a[X],e._meridiem),je=v(e).era,je!==null&&(e._a[Xe]=e._locale.erasConvertYear(je,e._a[Xe])),Va(e),La(e)}function Ai(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 Ri(e){var t,r,n,l,M,L,ie=!1,ge=e._f.length;if(ge===0){v(e).invalidFormat=!0,e._d=new Date(NaN);return}for(l=0;l<ge;l++)M=0,L=!1,t=S({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[l],Ha(t),O(t)&&(L=!0),M+=v(t).charsLeftOver,M+=v(t).unusedTokens.length*10,v(t).score=M,ie?M<n&&(n=M,r=t):(n==null||M<n||L)&&(n=M,r=t,L&&(ie=!0));p(e,r||t)}function Ii(e){if(!e._d){var t=pe(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 Fi(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||xt(e._l),t===null||r===void 0&&t===""?Y({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),C(t)?new y(La(t)):(c(t)?e._d=t:F(r)?Ri(e):r?Ha(e):zi(e),O(e)||(e._d=null),e))}function zi(e){var t=e._i;a(t)?e._d=new Date(u.now()):c(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Ni(e):F(t)?(e._a=d(t.slice(0),function(r){return parseInt(r,10)}),Va(e)):K(t)?Ii(e):s(t)?e._d=new Date(t):u.createFromInputFallback(e)}function Tr(e,t,r,n,l){var M={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(K(e)&&x(e)||F(e)&&e.length===0)&&(e=void 0),M._isAMomentObject=!0,M._useUTC=M._isUTC=l,M._l=r,M._i=e,M._f=t,M._strict=n,Fi(M)}function Le(e,t,r,n){return Tr(e,t,r,n,!1)}var Li=N("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:Y()}),Wi=N("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:Y()});function Cr(e,t){var r,n;if(t.length===1&&F(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 Vi(){var e=[].slice.call(arguments,0);return Cr("isBefore",e)}function Hi(){var e=[].slice.call(arguments,0);return Cr("isAfter",e)}var $i=function(){return Date.now?Date.now():+new Date},Zt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Bi(e){var t,r=!1,n,l=Zt.length;for(t in e)if(o(e,t)&&!(He.call(Zt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<l;++n)if(e[Zt[n]]){if(r)return!1;parseFloat(e[Zt[n]])!==Se(e[Zt[n]])&&(r=!0)}return!0}function Ui(){return this._isValid}function qi(){return mt(NaN)}function oa(e){var t=pe(e),r=t.year||0,n=t.quarter||0,l=t.month||0,M=t.week||t.isoWeek||0,L=t.day||0,ie=t.hour||0,ge=t.minute||0,je=t.second||0,at=t.millisecond||0;this._isValid=Bi(t),this._milliseconds=+at+je*1e3+ge*6e4+ie*1e3*60*60,this._days=+L+M*7,this._months=+l+n*3+r*12,this._data={},this._locale=xt(),this._bubble()}function la(e){return e instanceof oa}function $a(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Ji(e,t,r){var n=Math.min(e.length,t.length),l=Math.abs(e.length-t.length),M=0,L;for(L=0;L<n;L++)Se(e[L])!==Se(t[L])&&M++;return M+l}function Nr(e,t){Q(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Z(~~(r/60),2)+t+Z(~~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 Gi=/([\+\-]|\d\d)/gi;function Ba(e,t){var r=(t||"").match(e),n,l,M;return r===null?null:(n=r[r.length-1]||[],l=(n+"").match(Gi)||["-",0,0],M=+(l[1]*60)+Se(l[2]),M===0?0:l[0]==="+"?M:-M)}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),u.updateOffset(r,!1),r):Le(e).local()}function qa(e){return-Math.round(e._d.getTimezoneOffset())}u.updateOffset=function(){};function Ki(e,t,r){var n=this._offset||0,l;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&&(l=qa(this)),this._offset=e,this._isUTC=!0,l!=null&&this.add(l,"m"),n!==e&&(!t||this._changeInProgress?Rr(this,mt(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,u.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:qa(this)}function Xi(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Qi(e){return this.utcOffset(0,e)}function Zi(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qa(this),"m")),this}function es(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Ba(bt,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function ts(e){return this.isValid()?(e=e?Le(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function as(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function rs(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={},t;return S(e,this),e=jr(e),e._a?(t=e._isUTC?f(e._a):Le(e._a),this._isDSTShifted=this.isValid()&&Ji(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ns(){return this.isValid()?!this._isUTC:!1}function is(){return this.isValid()?this._isUTC:!1}function Pr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ss=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,os=/^(-|\+)?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,l,M,L;return la(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:s(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=ss.exec(e))?(l=n[1]==="-"?-1:1,r={y:0,d:Se(n[U])*l,h:Se(n[X])*l,m:Se(n[le])*l,s:Se(n[Me])*l,ms:Se($a(n[Oe]*1e3))*l}):(n=os.exec(e))?(l=n[1]==="-"?-1:1,r={y:Et(n[2],l),M:Et(n[3],l),w:Et(n[4],l),d:Et(n[5],l),h:Et(n[6],l),m:Et(n[7],l),s:Et(n[8],l)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(L=ls(Le(r.from),Le(r.to)),r={},r.ms=L.milliseconds,r.M=L.months),M=new oa(r),la(e)&&o(e,"_locale")&&(M._locale=e._locale),la(e)&&o(e,"_isValid")&&(M._isValid=e._isValid),M}mt.fn=oa.prototype,mt.invalid=qi;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 ls(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 l,M;return n!==null&&!isNaN(+n)&&(J(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."),M=r,r=n,n=M),l=mt(r,n),Rr(this,l,e),this}}function Rr(e,t,r,n){var l=t._milliseconds,M=$a(t._days),L=$a(t._months);e.isValid()&&(n=n??!0,L&&vr(e,dt(e,"Month")+L*r),M&&yt(e,"Date",dt(e,"Date")+M*r),l&&e._d.setTime(e._d.valueOf()+l*r),n&&u.updateOffset(e,M||L))}var us=Ar(1,"add"),cs=Ar(-1,"subtract");function Ir(e){return typeof e=="string"||e instanceof String}function ds(e){return C(e)||c(e)||Ir(e)||s(e)||fs(e)||hs(e)||e===null||e===void 0}function hs(e){var t=K(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"],l,M,L=n.length;for(l=0;l<L;l+=1)M=n[l],r=r||o(e,M);return t&&r}function fs(e){var t=F(e),r=!1;return t&&(r=e.filter(function(n){return!s(n)&&Ir(e)}).length===0),t&&r}function ms(e){var t=K(e)&&!x(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],l,M;for(l=0;l<n.length;l+=1)M=n[l],r=r||o(e,M);return t&&r}function ps(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 gs(e,t){arguments.length===1&&(arguments[0]?ds(arguments[0])?(e=arguments[0],t=void 0):ms(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Le(),n=Ua(r,this).startOf("day"),l=u.calendarFormat(this,n)||"sameElse",M=t&&(w(t[l])?t[l].call(this,r):t[l]);return this.format(M||this.localeData().calendar(l,this,Le(r)))}function ys(){return new y(this)}function vs(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 bs(e,t,r,n){var l=C(e)?e:Le(e),M=C(t)?t:Le(t);return this.isValid()&&l.isValid()&&M.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(l,r):!this.isBefore(l,r))&&(n[1]===")"?this.isBefore(M,r):!this.isAfter(M,r))):!1}function ws(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 Ms(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ss(e,t,r){var n,l,M;if(!this.isValid())return NaN;if(n=Ua(e,this),!n.isValid())return NaN;switch(l=(n.utcOffset()-this.utcOffset())*6e4,t=de(t),t){case"year":M=ua(this,n)/12;break;case"month":M=ua(this,n);break;case"quarter":M=ua(this,n)/3;break;case"second":M=(this-n)/1e3;break;case"minute":M=(this-n)/6e4;break;case"hour":M=(this-n)/36e5;break;case"day":M=(this-n-l)/864e5;break;case"week":M=(this-n-l)/6048e5;break;default:M=this-n}return r?M:st(M)}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"),l,M;return t-n<0?(l=e.clone().add(r-1,"months"),M=(t-n)/(n-l)):(l=e.clone().add(r+1,"months"),M=(t-n)/(l-n)),-(r+M)||0}u.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",u.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Ds(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ks(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?_e(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):w(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",_e(r,"Z")):_e(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ys(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,l,M;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",l="-MM-DD[T]HH:mm:ss.SSS",M=t+'[")]',this.format(r+n+l+M)}function Os(e){e||(e=this.isUtc()?u.defaultFormatUtc:u.defaultFormat);var t=_e(this,e);return this.localeData().postformat(t)}function js(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 Ts(e){return this.from(Le(),e)}function Cs(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 Ns(e){return this.to(Le(),e)}function Fr(e){var t;return e===void 0?this._locale._abbr:(t=xt(e),t!=null&&(this._locale=t),this)}var zr=N("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 Ps(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),u.updateOffset(this,!0),this}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()+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),u.updateOffset(this,!0),this}function As(){return this._d.valueOf()-(this._offset||0)*6e4}function Rs(){return Math.floor(this.valueOf()/1e3)}function Is(){return new Date(this.valueOf())}function Fs(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zs(){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 Ls(){return this.isValid()?this.toISOString():null}function Ws(){return O(this)}function Vs(){return p({},v(this))}function Hs(){return v(this).overflow}function $s(){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"),ae("N",Ja),ae("NN",Ja),ae("NNN",Ja),ae("NNNN",to),ae("NNNNN",ao),Ee(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var l=r._locale.erasParse(e,n,r._strict);l?v(r).era=l:v(r).invalidEra=e}),ae("y",lt),ae("yy",lt),ae("yyy",lt),ae("yyyy",lt),ae("yo",ro),Ee(["y","yy","yyy","yyyy"],Xe),Ee(["yo"],function(e,t,r,n){var l;r._locale._eraYearOrdinalRegex&&(l=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Xe]=r._locale.eraYearOrdinalParse(e,l):t[Xe]=parseInt(e,10)});function Bs(e,t){var r,n,l,M=this._eras||xt("en")._eras;for(r=0,n=M.length;r<n;++r){switch(typeof M[r].since){case"string":l=u(M[r].since).startOf("day"),M[r].since=l.valueOf();break}switch(typeof M[r].until){case"undefined":M[r].until=1/0;break;case"string":l=u(M[r].until).startOf("day").valueOf(),M[r].until=l.valueOf();break}}return M}function Us(e,t,r){var n,l,M=this.eras(),L,ie,ge;for(e=e.toUpperCase(),n=0,l=M.length;n<l;++n)if(L=M[n].name.toUpperCase(),ie=M[n].abbr.toUpperCase(),ge=M[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(ie===e)return M[n];break;case"NNNN":if(L===e)return M[n];break;case"NNNNN":if(ge===e)return M[n];break}else if([L,ie,ge].indexOf(e)>=0)return M[n]}function qs(e,t){var r=e.since<=e.until?1:-1;return t===void 0?u(e.since).year():u(e.since).year()+(t-e.offset)*r}function Js(){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 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].narrow;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].abbr;return""}function Xs(){var e,t,r,n,l=this.localeData().eras();for(e=0,t=l.length;e<t;++e)if(r=l[e].since<=l[e].until?1:-1,n=this.clone().startOf("day").valueOf(),l[e].since<=n&&n<=l[e].until||l[e].until<=n&&n<=l[e].since)return(this.year()-u(l[e].since).year())*r+l[e].offset;return this.year()}function Qs(e){return o(this,"_erasNameRegex")||Ga.call(this),e?this._erasNameRegex:this._erasRegex}function Zs(e){return o(this,"_erasAbbrRegex")||Ga.call(this),e?this._erasAbbrRegex:this._erasRegex}function eo(e){return o(this,"_erasNarrowRegex")||Ga.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ja(e,t){return t.erasAbbrRegex(e)}function to(e,t){return t.erasNameRegex(e)}function ao(e,t){return t.erasNarrowRegex(e)}function ro(e,t){return t._eraYearOrdinalRegex||lt}function Ga(){var e=[],t=[],r=[],n=[],l,M,L,ie,ge,je=this.eras();for(l=0,M=je.length;l<M;++l)L=ct(je[l].name),ie=ct(je[l].abbr),ge=ct(je[l].narrow),t.push(L),e.push(ie),r.push(ge),n.push(L),n.push(ie),n.push(ge);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")}Q(0,["gg",2],0,function(){return this.weekYear()%100}),Q(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ha(e,t){Q(0,[e,e.length],0,t)}ha("gggg","weekYear"),ha("ggggg","weekYear"),ha("GGGG","isoWeekYear"),ha("GGGGG","isoWeekYear"),ae("G",_t),ae("g",_t),ae("GG",we,Ie),ae("gg",we,Ie),ae("GGGG",vt,Qe),ae("gggg",vt,Qe),ae("GGGGG",pt,ye),ae("ggggg",pt,ye),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]=u.parseTwoDigitYear(e)});function no(e){return $r.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function io(e){return $r.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function so(){return wt(this.year(),1,4)}function oo(){return wt(this.isoWeekYear(),1,4)}function lo(){var e=this.localeData()._week;return wt(this.year(),e.dow,e.doy)}function uo(){var e=this.localeData()._week;return wt(this.weekYear(),e.dow,e.doy)}function $r(e,t,r,n,l){var M;return e==null?Kt(this,n,l).year:(M=wt(e,n,l),t>M&&(t=M),co.call(this,e,t,r,n,l))}function co(e,t,r,n,l){var M=wr(e,t,r,n,l),L=Gt(M.year,0,M.dayOfYear);return this.year(L.getUTCFullYear()),this.month(L.getUTCMonth()),this.date(L.getUTCDate()),this}Q("Q",0,"Qo","quarter"),ae("Q",$e),Ee("Q",function(e,t){t[b]=(Se(e)-1)*3});function ho(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Q("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);Q("DDD",["DDDD",3],"DDDo","dayOfYear"),ae("DDD",ht),ae("DDDD",Ge),Ee(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Se(e)});function fo(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"),ae("m",we,it),ae("mm",we,Ie),Ee(["m","mm"],le);var mo=Ke("Minutes",!1);Q("s",["ss",2],0,"second"),ae("s",we,it),ae("ss",we,Ie),Ee(["s","ss"],Me);var po=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}),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 go(e,t){t[Oe]=Se(("0."+e)*1e3)}for(jt="S";jt.length<=9;jt+="S")Ee(jt,go);Ur=Ke("Milliseconds",!1),Q("z",0,0,"zoneAbbr"),Q("zz",0,0,"zoneName");function yo(){return this._isUTC?"UTC":""}function vo(){return this._isUTC?"Coordinated Universal Time":""}var G=y.prototype;G.add=us,G.calendar=gs,G.clone=ys,G.diff=Ss,G.endOf=Es,G.format=Os,G.from=js,G.fromNow=Ts,G.to=Cs,G.toNow=Ns,G.get=et,G.invalidAt=Hs,G.isAfter=vs,G.isBefore=_s,G.isBetween=bs,G.isSame=ws,G.isSameOrAfter=xs,G.isSameOrBefore=Ms,G.isValid=Ws,G.lang=zr,G.locale=Fr,G.localeData=Lr,G.max=Wi,G.min=Li,G.parsingFlags=Vs,G.set=Jt,G.startOf=Ps,G.subtract=cs,G.toArray=Fs,G.toObject=zs,G.toDate=Is,G.toISOString=ks,G.inspect=Ys,typeof Symbol<"u"&&Symbol.for!=null&&(G[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),G.toJSON=Ls,G.toString=Ds,G.unix=Rs,G.valueOf=As,G.creationData=$s,G.eraName=Js,G.eraNarrow=Gs,G.eraAbbr=Ks,G.eraYear=Xs,G.year=We,G.isLeapYear=Be,G.weekYear=no,G.isoWeekYear=io,G.quarter=G.quarters=ho,G.month=_r,G.daysInMonth=In,G.week=G.weeks=Bn,G.isoWeek=G.isoWeeks=Un,G.weeksInYear=lo,G.weeksInWeekYear=uo,G.isoWeeksInYear=so,G.isoWeeksInISOWeekYear=oo,G.date=Br,G.day=G.days=ii,G.weekday=si,G.isoWeekday=oi,G.dayOfYear=fo,G.hour=G.hours=mi,G.minute=G.minutes=mo,G.second=G.seconds=po,G.millisecond=G.milliseconds=Ur,G.utcOffset=Ki,G.utc=Qi,G.local=Zi,G.parseZone=es,G.hasAlignedHourOffset=ts,G.isDST=as,G.isLocal=ns,G.isUtcOffset=is,G.isUtc=Pr,G.isUTC=Pr,G.zoneAbbr=yo,G.zoneName=vo,G.dates=N("dates accessor is deprecated. Use date instead.",Br),G.months=N("months accessor is deprecated. Use month instead",_r),G.years=N("years accessor is deprecated. Use year instead",We),G.zone=N("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Xi),G.isDSTShifted=N("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",rs);function _o(e){return Le(e*1e3)}function bo(){return Le.apply(null,arguments).parseZone()}function qr(e){return e}var Pe=B.prototype;Pe.calendar=he,Pe.longDateFormat=ze,Pe.invalidDate=_,Pe.ordinal=A,Pe.preparse=qr,Pe.postformat=qr,Pe.relativeTime=te,Pe.pastFuture=oe,Pe.set=T,Pe.eras=Bs,Pe.erasParse=Us,Pe.erasConvertYear=qs,Pe.erasAbbrRegex=Zs,Pe.erasNameRegex=Qs,Pe.erasNarrowRegex=eo,Pe.months=Pn,Pe.monthsShort=En,Pe.monthsParse=Rn,Pe.monthsRegex=zn,Pe.monthsShortRegex=Fn,Pe.week=Wn,Pe.firstDayOfYear=$n,Pe.firstDayOfWeek=Hn,Pe.weekdays=ei,Pe.weekdaysMin=ai,Pe.weekdaysShort=ti,Pe.weekdaysParse=ni,Pe.weekdaysRegex=li,Pe.weekdaysShortRegex=ui,Pe.weekdaysMinRegex=ci,Pe.isPM=hi,Pe.meridiem=pi;function fa(e,t,r,n){var l=xt(),M=f().set(n,t);return l[r](M,e)}function Jr(e,t,r){if(s(e)&&(t=e,e=void 0),e=e||"",t!=null)return fa(e,t,r,"month");var n,l=[];for(n=0;n<12;n++)l[n]=fa(e,n,r,"month");return l}function Ka(e,t,r,n){typeof e=="boolean"?(s(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,s(t)&&(r=t,t=void 0),t=t||"");var l=xt(),M=e?l._week.dow:0,L,ie=[];if(r!=null)return fa(t,(r+M)%7,n,"day");for(L=0;L<7;L++)ie[L]=fa(t,(L+M)%7,n,"day");return ie}function wo(e,t){return Jr(e,t,"months")}function xo(e,t){return Jr(e,t,"monthsShort")}function Mo(e,t,r){return Ka(e,t,r,"weekdays")}function So(e,t,r){return Ka(e,t,r,"weekdaysShort")}function Do(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}}),u.lang=N("moment.lang is deprecated. Use moment.locale instead.",Ot),u.langData=N("moment.langData is deprecated. Use moment.localeData instead.",xt);var Mt=Math.abs;function ko(){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 Gr(e,t,r,n){var l=mt(t,r);return e._milliseconds+=n*l._milliseconds,e._days+=n*l._days,e._months+=n*l._months,e._bubble()}function Yo(e,t){return Gr(this,e,t,1)}function Oo(e,t){return Gr(this,e,t,-1)}function Kr(e){return e<0?Math.floor(e):Math.ceil(e)}function jo(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,l,M,L,ie,ge;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,l=st(e/1e3),n.seconds=l%60,M=st(l/60),n.minutes=M%60,L=st(M/60),n.hours=L%24,t+=st(L/24),ge=st(Xr(t)),r+=ge,t-=Kr(Xa(ge)),ie=st(r/12),r%=12,n.days=t,n.months=r,n.years=ie,this}function Xr(e){return e*4800/146097}function Xa(e){return e*146097/4800}function To(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"),Co=St("s"),No=St("m"),Po=St("h"),Eo=St("d"),Ao=St("w"),Ro=St("M"),Io=St("Q"),Fo=St("y"),zo=Qr;function Lo(){return mt(this)}function Wo(e){return e=de(e),this.isValid()?this[e+"s"]():NaN}function At(e){return function(){return this.isValid()?this._data[e]:NaN}}var Vo=At("milliseconds"),Ho=At("seconds"),$o=At("minutes"),Bo=At("hours"),Uo=At("days"),qo=At("months"),Jo=At("years");function Go(){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 Ko(e,t,r,n,l){return l.relativeTime(t||1,!!r,e,n)}function Xo(e,t,r,n){var l=mt(e).abs(),M=Dt(l.as("s")),L=Dt(l.as("m")),ie=Dt(l.as("h")),ge=Dt(l.as("d")),je=Dt(l.as("M")),at=Dt(l.as("w")),kt=Dt(l.as("y")),Tt=M<=r.ss&&["s",M]||M<r.s&&["ss",M]||L<=1&&["m"]||L<r.m&&["mm",L]||ie<=1&&["h"]||ie<r.h&&["hh",ie]||ge<=1&&["d"]||ge<r.d&&["dd",ge];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,Ko.apply(null,Tt)}function Qo(e){return e===void 0?Dt:typeof e=="function"?(Dt=e,!0):!1}function Zo(e,t){return Bt[e]===void 0?!1:t===void 0?Bt[e]:(Bt[e]=t,e==="s"&&(Bt.ss=t-1),!0)}function el(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Bt,l,M;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)),l=this.localeData(),M=Xo(this,!r,n,l),r&&(M=l.pastFuture(+this,M)),l.postformat(M)}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,l,M,L,ie=this.asSeconds(),ge,je,at,kt;return ie?(n=st(e/60),l=st(n/60),e%=60,n%=60,M=st(r/12),r%=12,L=e?e.toFixed(3).replace(/\.?0+$/,""):"",ge=ie<0?"-":"",je=Ut(this._months)!==Ut(ie)?"-":"",at=Ut(this._days)!==Ut(ie)?"-":"",kt=Ut(this._milliseconds)!==Ut(ie)?"-":"",ge+"P"+(M?je+M+"Y":"")+(r?je+r+"M":"")+(t?at+t+"D":"")+(l||n||e?"T":"")+(l?kt+l+"H":"")+(n?kt+n+"M":"")+(e?kt+L+"S":"")):"P0D"}var Te=oa.prototype;Te.isValid=Ui,Te.abs=ko,Te.add=Yo,Te.subtract=Oo,Te.as=To,Te.asMilliseconds=Qr,Te.asSeconds=Co,Te.asMinutes=No,Te.asHours=Po,Te.asDays=Eo,Te.asWeeks=Ao,Te.asMonths=Ro,Te.asQuarters=Io,Te.asYears=Fo,Te.valueOf=zo,Te._bubble=jo,Te.clone=Lo,Te.get=Wo,Te.milliseconds=Vo,Te.seconds=Ho,Te.minutes=$o,Te.hours=Bo,Te.days=Uo,Te.weeks=Go,Te.months=qo,Te.years=Jo,Te.humanize=el,Te.toISOString=ma,Te.toString=ma,Te.toJSON=ma,Te.locale=Fr,Te.localeData=Lr,Te.toIsoString=N("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ma),Te.lang=zr,Q("X",0,0,"unix"),Q("x",0,0,"valueOf"),ae("x",_t),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 u.version="2.30.1",$(Le),u.fn=G,u.min=Vi,u.max=Hi,u.now=$i,u.utc=f,u.unix=_o,u.months=wo,u.isDate=c,u.locale=Ot,u.invalid=Y,u.duration=mt,u.isMoment=C,u.weekdays=Mo,u.parseZone=bo,u.localeData=xt,u.isDuration=la,u.monthsShort=xo,u.weekdaysMin=Do,u.defineLocale=za,u.updateLocale=_i,u.locales=bi,u.weekdaysShort=So,u.normalizeUnits=de,u.relativeTimeRounding=Qo,u.relativeTimeThreshold=Zo,u.calendarFormat=ps,u.prototype=G,u.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"},u}))})(ga)),ga.exports}var tc=ir.exports,dn;function ac(){return dn||(dn=1,(function(g,i){(function(m,u){u(typeof Ca=="function"?fr():m.moment)})(tc,(function(m){//! moment.js locale configuration
|
|
66
|
+
var u=m.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 u}))})()),ir.exports}ac();var sr={exports:{}},rc=sr.exports,hn;function nc(){return hn||(hn=1,(function(g,i){(function(m,u){u(typeof Ca=="function"?fr():m.moment)})(rc,(function(m){//! moment.js locale configuration
|
|
67
|
+
var u=m.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($){var F=$%10,K=~~($%100/10)===1?"th":F===1?"st":F===2?"nd":F===3?"rd":"th";return $+K},week:{dow:1,doy:4}});return u}))})()),sr.exports}nc();var or={exports:{}},ic=or.exports,fn;function sc(){return fn||(fn=1,(function(g,i){(function(m,u){u(typeof Ca=="function"?fr():m.moment)})(ic,(function(m){//! moment.js locale configuration
|
|
68
|
+
function u(F,K,o,x){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[F+" Tage",F+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[F+" Monate",F+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[F+" Jahre",F+" Jahren"]};return K?a[o][0]:a[o][1]}var $=m.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:u,mm:"%d Minuten",h:u,hh:"%d Stunden",d:u,dd:u,w:u,ww:"%d Wochen",M:u,MM:u,y:u,yy:u},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return $}))})()),or.exports}sc();const Nt=g=>{let i="";return g.split(":").forEach(m=>{i+=m}),parseInt(i)},mn=g=>g.toString().padStart(4,"0").match(/.{1,2}/g).join(":"),Za=g=>{const i=g.address;if(g.addresstype==="county"&&i.country)return i.county;if(g.addresstype==="village"&&i.village)return i.village;const m=[];["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(F=>{i.hasOwnProperty(F)&&i[F]&&m.push(i[F])}),i.road?m.push(i.road):i.pedestrian?m.push(i.pedestrian):i.suburb?m.push(i.suburb):i.square?m.push(i.square):(i.neighbourhood&&m.push(i.neighbourhood),i.hamlet?m.push(i.hamlet):i.isolated_dwelling?m.push(i.isolated_dwelling):i.locality?m.push(i.locality):i.croft&&m.push(i.croft)),i.house_number&&m.push(i.house_number),i.postcode&&m.push(i.postcode),i.village&&m.push(i.village),i.town?m.push(i.town):i.city&&m.push(i.city);var $=m.join(", ").substr(0,150);return $};function aa(g){let i=window.sessionStorage.getItem(g);if(i!==null){let m=JSON.parse(i);if(new Date(m.expirationDate)>new Date)return m.value;window.sessionStorage.removeItem(g)}return null}function oc(g,i,m){let u=m?new Date(m*1e3):null;if(u){let $={value:i,expirationDate:u.toISOString()};window.sessionStorage.setItem(g,JSON.stringify($))}}function pn({day:g,slot:i,i18next:m}){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:g})," ",m.t("alle")," ",m.t("ore")," ",h.jsx("b",{children:i})]})})})})}const lc=({component:g,current:i,onChange:m,i18next:u})=>{const[$,F]=q.useState(),[K,o]=q.useState([]),[x,a]=q.useState([]),[s,c]=q.useState(!1),[d,p]=q.useState(null),[f,j]=q.useState(null),[v,D]=q.useState(null),[O,Y]=q.useState(null),[R,E]=q.useState({}),[S,y]=q.useState(null),[C,z]=q.useState(!1),[N,H]=q.useState([]),[J,w]=q.useState(!1),T=q.useRef(),V=g.calendarId;me.locale(u.language);const B=k=>{let A=me(k).format("YYYY-MM-DD");fetch(Z(A)).then(I=>I.json()).then(I=>{let te=he(k||new Date);const oe=I.filter(Ae=>Ae.available==!0);oe.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 pe=de.map(Ae=>{if(Ae.available===!1)return me(Ae.date,"YYYY-MM-DD").toDate()});o(pe);const xe=oe.length?oe[0].date:k;re(xe)}).catch(I=>console.error(I))},re=k=>{Y(null),D(null),a([]);let A=me(k).format("YYYY-MM-DD");fetch(ce(A)).then(I=>I.json()).then(I=>{const te=I.filter(oe=>oe.availability==!0);E(te[0]),te.length>0?(a(I),c(!1),D(me(k).format("L")),F(me(k,"YYYY-MM-DD").toDate())):(I.length>0&&F(me(I[0].date,"YYYY-MM-DD").toDate()),a([]),P())})},ee=()=>{if(V!==""&&V!=null)if(!i.dataValue)B(new Date);else if(g.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){y(i.dataValue);let k=[];i.dataValue.map(A=>{k.push({...A,date:me(A.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),H(k)}}else if(!g.multiple&&typeof i.dataValue=="object"){const k={date:i.dataValue.date,slot:i.dataValue.slot},A={...i.dataValue,date:me(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};H([A]),y(k)}else{let k=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),A=k[2].split("#");const I={date:me(k[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:k[1]};g.multiple?(m([{date:k[0],slot:k[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}]),H([{date:k[0],slot:k[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}])):(m({date:k[0],slot:k[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}),H([{date:k[0],slot:k[1],calendar_id:A[0],meeting_id:A[1],opening_hour_id:A.length===3?A[2]:""}])),y(I)}};q.useEffect(()=>{var k;(k=window.FormioInstance)==null||k.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const he=k=>{let I=me(k,"YYYY-MM").daysInMonth(),te=[];for(;I;){let oe=me(k).date(I);te.push(oe.format("YYYY-MM-DD")),I--}return te},Z=(k,A=!1)=>{let I=g.calendarId,te=g.select_opening_hours,oe=g.select_opening_hours?g.opening_hours:[];window.location.pathname.split("/");let de=`${Fe()}/api/calendars/${I}/availabilities`,pe=[`from_time=${me(k).startOf("month").format("YYYY-MM-DD")}`,`to_time=${me(k).endOf("month").format("YYYY-MM-DD")}`];return A&&pe.push(`available=${A}`),te&&oe&&pe.push(`opening_hours=${oe.join()}`),`${de}?${pe.join("&")}`},ce=(k,A=!1)=>{let I=g.calendarId,te=g.select_opening_hours,oe=g.select_opening_hours?g.opening_hours:[];window.location.pathname.split("/");const de=me(k).format("YYYY-MM-DD");let pe=`${Fe()}/api/calendars/${I}/availabilities/${de}`,xe=[];return A&&xe.push(`available=${A}`),te&&oe&&xe.push(`opening_hours=${oe.join()}`),xe&&(pe=`${pe}?${xe.join("&")}`),pe},ne=k=>{B(k)},fe=k=>{setTimeout(()=>{z(!C)},1e3),re(k)},se=k=>{Y(null),setTimeout(()=>{k&&(j(k.target.dataset),Y(k.target.id))},300)},Q=k=>{p(null);let A=`${Fe()}/it/meetings/new-draft`,I={date:f!=null&&f.date?me(f==null?void 0:f.date).format("DD-MM-YYYY"):me(k.target.dataset.date).format("DD-MM-YYYY"),slot:f!=null&&f.value_start&&(f!=null&&f.value_end)?f.value_start+"-"+f.value_end:k.target.dataset.slots,calendar:g.calendarId,opening_hour:f!=null&&f.opening_hour?f==null?void 0:f.opening_hour:k.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:me().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(u.t("Intervallo selezionato non disponibile!"));return te.json()}).then(te=>{p(te);const oe={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};H([...N,oe])}).catch(te=>{console.log(te),Je.fire({title:"",html:"<p>"+te+"</p>",icon:"error",cancelButtonText:u.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{f&&(Q(),z(!C))},Ne=()=>h.jsx("span",{children:u.t("Tempo prenotazione scaduto!")}),_e=({minutes:k,seconds:A,completed:I})=>I?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[u.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:[k," ",u.t("minuti")," ",A," ",u.t("secondi")]})]})]})}),Ce=k=>{const A=Nt(k.target.value),I=Nt(k.target.min),te=Nt(k.target.max);A<I||A>te||A>Nt(f.end)?(Je.fire({title:"",html:`<p>${u.t("l'orario")} <b>${mn(A)}</b> ${u.t("non è valido")}</p>`,icon:"error",cancelButtonText:u.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):j({...f,value_start:k.target.value})},Re=k=>{const A=Nt(k.target.value),I=Nt(k.target.min),te=Nt(k.target.max);A<I||A>te||A<Nt(f.start)?(Je.fire({title:"",html:`<p>${u.t("l'orario")} <b>${mn(A)}</b> ${u.t("non è valido")}</p>`,icon:"error",cancelButtonText:u.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):j({...f,value_end:k.target.value})},ze=k=>{if(k===null||k==="")m("");else if(Array.isArray(k)&&k.length>0){let A=[];N.map(I=>{A.push({date:me(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})}),g.multiple?m(A):m(A[0])}else m("")},P=()=>{c(!0),p(null),D(null),ze(null)},_=()=>{if(u.language==="it")return kn;if(u.language==="en")return Dn;if(u.language==="de")return Sn};q.useEffect(()=>{ze(N)},[N]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&J===!1?(w(!0),setTimeout(()=>{ee()},1e3)):(w(!1),setTimeout(()=>{ee()},1e3))},[]);const W=(k,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>${u.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:u.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const oe=[...N.slice(0,k),...N.slice(k+1)];H(oe),B(new Date)}})};return h.jsxs(h.Fragment,{children:[J&&S?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(S)&&S.length>1?u.t("Giorni selezionati per la prenotazione"):u.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(S)?S.map(k=>h.jsx(pn,{day:me(k.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:u,slot:k.slot})):h.jsx(pn,{day:me(S.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:u,slot:S.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[g.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:u.t(g.label)}),h.jsx(va.DayPicker,{mode:"single",selected:$,locale:_(),disabled:K,onMonthChange:ne,onDayClick:fe}),h.jsx("p",{children:u.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")})]})}):N.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:u.t(g.label)}),h.jsx(va.DayPicker,{mode:"single",selected:$,locale:_(),disabled:K,onMonthChange:ne,onDayClick:fe}),h.jsxs("p",{children:[" ",u.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")]})]})}):null,h.jsx("div",{className:"col-12",children:N.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[N.length>1?u.t("Giorni selezionati per la prenotazione"):u.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:N.map((k,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:[k.date," ",f||k.slot?`${u.t("alle")} ${k.slot}`:""]}),h.jsx(ue.Icon,{icon:"it-delete",onClick:()=>W(A,k),role:"button"})]})})},"li"+A))})})}),d?h.jsx(ue.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(xn,{date:d.expiration_time,renderer:_e})}):null]})}):null})]})}),h.jsxs(ue.Modal,{isOpen:C,toggle:()=>z(!C),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(ue.ModalHeader,{toggle:()=>z(!C),id:"daySelected",children:u.t("Seleziona una fascia oraria")}),s?null:h.jsxs("div",{className:"title-xsmall u-grey-dark px-4",children:[" ",u.t("Seleziona una fascia oraria e, se necessario, utilizza l'apposito controllo per accorciare la durata della prenotazione, Poi clicca su Conferma")]}),h.jsx(ue.ModalBody,{children:h.jsxs("div",{className:"row",children:[N.length>=1?h.jsxs("div",{children:[v&&!s?h.jsxs("h6",{children:[u.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(ue.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",u.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:se,tabIndex:"1",className:O==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":me(v,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":N[N.length-1].slot,"data-opening_hour":N[N.length-1].opening_hour_id,"data-start":N[N.length-1].slot.split("-")[0],"data-end":N[N.length-1].slot.split("-")[1],"data-value_start":N[N.length-1].slot.split("-")[0],"data-value_end":N[N.length-1].slot.split("-")[1],disabled:s,children:N[N.length-1].slot})})]})]}):null,h.jsx("div",{children:v&&N.length>=1?h.jsx("h6",{children:u.t("Seleziona altri orari")}):s?null:h.jsxs("h6",{children:[u.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]})}),x.map((k,A)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+A,onClick:se,ref:T,className:O==="slot-"+A?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":k.date,"data-start":k.start_time,"data-end":k.end_time,"data-value_start":k.start_time,"data-value_end":k.end_time,"data-slots":k.start_time+"-"+k.end_time,"data-opening_hour":k.opening_hour,"data-min_duration":k.min_duration,disabled:k.slots_available==0,children:[k.start_time," - ",k.end_time]})},"slot-"+A)),s?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(ue.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),u.t("Attenzione")]}),h.jsxs("p",{children:[" ",u.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null,h.jsx("div",{className:"col-12",children:f!=null&&f.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:u.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(ue.Input,{type:"time",label:u.t("Dalle"),className:"active",defaultValue:f.value_start||f.start,min:f.start,max:f.end,onBlur:Ce})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(ue.Input,{type:"time",label:u.t("alle"),className:"active",defaultValue:f.value_end||f.end,onBlur:Re,min:f.start,max:f.end})})]}):null})]})}),h.jsx(ue.ModalFooter,{children:h.jsx(ue.Button,{color:"primary",onClick:()=>ve(),disabled:!v||!(f!=null&&f.value_start),children:u.t("Conferma")})})]})]})};var It;let Yn=(It=class extends ot.ReactComponent{constructor(i,m,u){super(i,m,u)}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,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(lc,{ref:m,component:this.component,value:this.dataValue,onChange:u=>this.setValue(u),...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 m=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),u=m[2].split("#");this.date=m[0],this.slot=m[1],this.meeting=u[1],this.meeting_expiration_time=null,this.opening_hour=u.length===3?u[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:"",m=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:m}}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) {
|
|
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(...g){return ot.Components.baseEditForm([{key:"display",components:uc}],...g)}function gn({day:g,slot:i,i18next:m}){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:g})," ",m.t("alle")," ",m.t("ore")," ",h.jsx("b",{children:i})]})})})})}const dc=({component:g,current:i,onChange:m,i18next:d})=>{const[B,L]=q.useState(),[K,o]=q.useState([]),[w,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(null),[f,j]=q.useState(null),[v,D]=q.useState(null),[O,Y]=q.useState(null),[F,P]=q.useState({}),[S,y]=q.useState(null),[T,W]=q.useState(!1),[C,M]=q.useState([]),[R,I]=q.useState(!1),E=q.useRef(),$=g.calendarId;fe.locale(d.language);const J=_=>{let H=fe(_).format("YYYY-MM-DD");fetch(Q(H)).then(k=>k.json()).then(k=>{let A=he(_||new Date);const z=k.filter(pe=>pe.available==!0);z.length===0&&Re();let se=[];A.forEach(pe=>{k.some(xe=>xe.date===pe&&xe.available==!0)?se.push({available:!0,date:pe}):se.push({available:!1,date:pe})});const be=se.map(pe=>{if(pe.available===!1)return fe(pe.date,"YYYY-MM-DD").toDate()});o(be);const ce=z.length?z[0].date:_;ne(ce)}).catch(k=>console.error(k))},ne=_=>{Y(null),D(null),a([]);let H=fe(_).format("YYYY-MM-DD");fetch(de(H)).then(k=>k.json()).then(k=>{const A=k.filter(z=>z.availability==!0);P(A[0]),A.length>0?(a(k),u(!1),D(fe(_).format("L")),L(fe(_,"YYYY-MM-DD").toDate())):(k.length>0&&L(fe(k[0].date,"YYYY-MM-DD").toDate()),a([]),Re())})},ae=()=>{if($!==""&&$!=null)if(!i.dataValue)J(new Date);else if(g.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){y(i.dataValue);let _=[];i.dataValue.map(H=>{_.push({...H,date:fe(H.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),M(_)}}else if(!g.multiple&&typeof i.dataValue=="object"){const _={date:i.dataValue.date,slot:i.dataValue.slot},H={...i.dataValue,date:fe(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};M([H]),y(_)}else{let _=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),H=_[2].split("#");const k={date:fe(_[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:_[1]};g.multiple?(m([{date:_[0],slot:_[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}]),M([{date:_[0],slot:_[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}])):(m({date:_[0],slot:_[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}),M([{date:_[0],slot:_[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}])),y(k)}};q.useEffect(()=>{var _;(_=window.FormioInstance)==null||_.formReady.then(()=>{setTimeout(()=>{ae()},1e3)})},[]);const he=_=>{let k=fe(_,"YYYY-MM").daysInMonth(),A=[];for(;k;){let z=fe(_).date(k);A.push(z.format("YYYY-MM-DD")),k--}return A},Q=(_,H=!1)=>{let k=g.calendarId,A=g.select_opening_hours,z=g.select_opening_hours?g.opening_hours:[];window.location.pathname.split("/");let se=`${Fe()}/api/calendars/${k}/availabilities`,be=[`from_time=${fe(_).startOf("month").format("YYYY-MM-DD")}`,`to_time=${fe(_).endOf("month").format("YYYY-MM-DD")}`];return H&&be.push(`available=${H}`),A&&z&&be.push(`opening_hours=${z.join()}`),`${se}?${be.join("&")}`},de=(_,H=!1)=>{let k=g.calendarId,A=g.select_opening_hours,z=g.select_opening_hours?g.opening_hours:[];window.location.pathname.split("/");const se=fe(_).format("YYYY-MM-DD");let be=`${Fe()}/api/calendars/${k}/availabilities/${se}`,ce=[];return H&&ce.push(`available=${H}`),A&&z&&ce.push(`opening_hours=${z.join()}`),ce&&(be=`${be}?${ce.join("&")}`),be},ee=_=>{J(_)},me=_=>{setTimeout(()=>{W(!T)},1e3),ne(_)},ue=_=>{Y(null),setTimeout(()=>{_&&(j(_.target.dataset),Y(_.target.id))},300)},Z=_=>{p(null);let H=`${Fe()}/it/meetings/new-draft`,k={date:f!=null&&f.date?fe(f==null?void 0:f.date).format("DD-MM-YYYY"):fe(_.target.dataset.date).format("DD-MM-YYYY"),slot:f!=null&&f.value_start&&(f!=null&&f.value_end)?f.value_start+"-"+f.value_end:_.target.dataset.slots,calendar:g.calendarId,opening_hour:f!=null&&f.opening_hour?f==null?void 0:f.opening_hour:_.target.dataset.opening_hour,meeting:c?c.id:"",first_available_date:F.date,first_available_start_time:F.start_time,first_available_end_time:F.end_time,first_availability_updated_at:fe().format()};fetch(H,{method:"POST",body:JSON.stringify(k),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(A=>{if(!A.ok)throw new Error(d.t("Intervallo selezionato non disponibile!"));return A.json()}).then(A=>{p(A);const z={date:k.date,slot:k.slot,calendar_id:k.calendar[0],opening_hour_id:k.opening_hour||k.opening_hour_id,meeting_id:A.id};M([...C,z])}).catch(A=>{console.log(A),Je.fire({title:"",html:"<p>"+A+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{f&&(Z(),W(!T))},Ne=()=>h.jsx("span",{children:d.t("Tempo prenotazione scaduto!")}),_e=({minutes:_,seconds:H,completed:k})=>k?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[d.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:[_," ",d.t("minuti")," ",H," ",d.t("secondi")]})]})]})}),Ce=_=>{if(_===null||_==="")m("");else if(Array.isArray(_)&&_.length>0){let H=[];C.map(k=>{H.push({date:fe(k.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:k.slot,calendar_id:k.calendar_id||k.calendar[0],meeting_id:k.meeting_id,opening_hour_id:k.opening_hour||k.opening_hour_id})}),g.multiple?m(H):m(H[0])}else m("")},Re=()=>{u(!0),p(null),D(null),Ce(null)},ze=()=>{if(d.language==="it")return kn;if(d.language==="en")return Dn;if(d.language==="de")return Sn};q.useEffect(()=>{Ce(C)},[C]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&R===!1?(I(!0),setTimeout(()=>{ae()},1e3)):(I(!1),setTimeout(()=>{ae()},1e3))},[]);const N=(_,H)=>{let k=`${Fe()}/api/meetings/${H.meeting_id}`;fetch(k,{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>${d.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const z=[...C.slice(0,_),...C.slice(_+1)];M(z),J(new Date)}})};return h.jsxs(h.Fragment,{children:[R&&S?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(S)&&S.length>1?d.t("Giorni selezionati per la prenotazione"):d.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(S)?S.map(_=>h.jsx(gn,{day:fe(_.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:_.slot})):h.jsx(gn,{day:Ye(S.date).format("DD/MM/YYYY"),i18next:d,slot:S.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[g.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:d.t(g.label)}),h.jsx(va.DayPicker,{mode:"single",selected:B,locale:ze(),disabled:K,onMonthChange:ee,onDayClick:me})]})}):C.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:d.t(g.label)}),h.jsx(va.DayPicker,{mode:"single",selected:B,locale:ze(),disabled:K,onMonthChange:ee,onDayClick:me})]})}):null,h.jsx("div",{className:"col-12",children:C.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[C.length>1?d.t("Giorni selezionati per la prenotazione"):d.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:C.map((_,H)=>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:[_.date," ",f||_.slot?`${d.t("alle")} ${_.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>N(H,_),role:"button"})]})})},"li"+H))})})}),c?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(xn,{date:c.expiration_time,renderer:_e})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:T,toggle:()=>W(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>W(!T),id:"daySelected",children:d.t("Seleziona una fascia oraria")}),h.jsx(le.ModalBody,{children:h.jsxs("div",{className:"row",children:[C.length>=1?h.jsxs("div",{children:[v&&!s?h.jsxs("h6",{children:[d.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"})," ",d.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ue,tabIndex:"1",className:O==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":fe(v,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":C[C.length-1].slot,"data-opening_hour":C[C.length-1].opening_hour_id,"data-start":C[C.length-1].slot.split("-")[0],"data-end":C[C.length-1].slot.split("-")[1],"data-value_start":C[C.length-1].slot.split("-")[0],"data-value_end":C[C.length-1].slot.split("-")[1],disabled:s,children:C[C.length-1].slot})})]})]}):null,h.jsx("div",{children:v&&C.length>=1?h.jsx("h6",{children:d.t("Seleziona altri orari")}):s?null:h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]})}),w.map((_,H)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+H,onClick:ue,ref:E,className:O==="slot-"+H?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":_.date,"data-start":_.start_time,"data-end":_.end_time,"data-value_start":_.start_time,"data-value_end":_.end_time,"data-slots":_.start_time+"-"+_.end_time,"data-opening_hour":_.opening_hour,"data-min_duration":_.min_duration,disabled:_.slots_available==0,children:[_.start_time," - ",_.end_time]})},"slot-"+H)),s?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"}),d.t("Attenzione")]}),h.jsxs("p",{children:[" ",d.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!v||!(f!=null&&f.value_start),children:d.t("Conferma")})})]})]})},ka=class ka extends ot.ReactComponent{constructor(i,m,d){super(i,m,d)}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,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(dc,{ref:m,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...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 m=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),d=m[2].split("#");this.date=m[0],this.slot=m[1],this.meeting=d[1],this.meeting_expiration_time=null,this.opening_hour=d.length===3?d[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:"",m=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:m}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(ka,"editForm",cc);let ba=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(...g){return ot.Components.baseEditForm([{key:"display",components:hc}],...g)}function mc({day:g,slot:i,i18next:m}){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:g})," ",m.t("alle")," ",m.t("ore")," ",h.jsx("b",{children:i})]})})})})}function pc(g,i){if(!i||i.length===0)return;const m=i.map(K=>{const o=new Date(K.start);return(new Date(K.end)-o)/6e4}),d=Math.min(...m),B=m.reduce((K,o)=>K+o,0)/m.length;let L=0;d<=30&&d>15?L=B*1:d<=15?L=B*24:L=B*4,g.setOption("slotHeight",L),document.documentElement.style.setProperty("--slot-height",`${L}px`)}const On={AVAILABILITY:{key:"availability_data_cache_",duration:10},SLOTS:{key:"availability_slots_cache_",duration:10},SUBMISSION:{key:"submission_cache_",duration:30}},er=(g,i,m)=>{const d={data:m,timestamp:Ye().toISOString()};sessionStorage.setItem(i,JSON.stringify(d)),console.log(`✅ Cache salvato: ${g}`)},tr=(g,i)=>{try{const m=sessionStorage.getItem(i);if(!m)return null;const d=JSON.parse(m),B=Ye().diff(Ye(d.timestamp),"minutes");return B>On[g].duration?(sessionStorage.removeItem(i),console.log(`⏰ Cache scaduto: ${g}`),null):(console.log(`✅ Cache letto: ${g} (${B} minuti fa)`),d.data)}catch(m){return console.error(`Errore nel leggere il cache (${g}):`,m),null}},ar=(g,...i)=>On[g].key+btoa(i),mr="calendar_view_state",pr="calendar_view_date",gc=(g,i)=>{try{sessionStorage.setItem(mr,g),sessionStorage.setItem(pr,i||new Date().toISOString())}catch(m){console.error("Errore nel salvare lo stato della view:",m)}},yc=()=>{try{const g=sessionStorage.getItem(mr),i=sessionStorage.getItem(pr);return{viewType:g||"timeGridWeek",date:i?new Date(i):new Date}}catch(g){return console.error("Errore nel leggere lo stato della view:",g),{viewType:"timeGridWeek",date:new Date}}},jn=()=>{try{sessionStorage.removeItem(mr),sessionStorage.removeItem(pr)}catch(g){console.error("Errore nel pulire lo stato della view:",g)}},yn=cr.Formio.Components.components.field,vc=({component:g,current:i,onChange:m,i18next:d})=>{var Re,ze;const[B,L]=q.useState(null),[K,o]=q.useState(null),[w,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(!1),[f,j]=q.useState(null),[v,D]=q.useState([]),[O,Y]=q.useState([]),[F,P]=q.useState([]),[S,y]=q.useState(null),[T,W]=q.useState(null),[C,M]=q.useState(null),R=q.useRef(null),I=q.useRef(null);d.language,fe.locale(d.language),Ye.locale(d.language);function E(N){if(!N||N.length===0)return null;const _=N.map(A=>({start:A.start_time,end:A.end_time})),H=_.reduce((A,z)=>z.start<A?z.start:A,_[0].start),k=_.reduce((A,z)=>z.end>A?z.end:A,_[0].end);return{earliestStartTime:H,latestEndTime:k}}function $(N){const _=N.map(A=>fe(A.date).isoWeekday()),k=[1,2,3,4,5,6,7].filter(A=>!_.includes(A));k.length>0?I.current.setOption("hiddenDays",k):I.current.setOption("hiddenDays",[])}function J(N,_,H){const k=new URL(N),z=`${k.pathname.split("/").slice(0,4).join("/")}/${_}/${H}`;return`${k.origin}${z}${k.search}`}function ne(N,_,H){const k=new URL(N),z=`${k.pathname.split("/").slice(0,4).join("/")}`;return`${k.origin}${z}${k.search}&from_to=${_}&to_date=${H}`}function ae(N,_,H){return`${Fe()}/api/availabilities/${N}/${_}?calendar_ids=${H}&available=true`}const he=N=>{P([]),Y([]),m({}),N&&Y(B.filter(_=>_.date.startsWith(N)))},Q=async(N,_)=>{const H=JSON.parse(N),k=ar("SLOTS",H.date,H.calendar_ids);if(_==="manual")P([]),M(null),j(null),m({});else{const A=tr("SLOTS",k);if(A){P(A);return}}try{const A=await window.FormioHelper.anonymousCall(`availabilities/${H.date}?calendar_ids=${H.calendar_ids}`);er("SLOTS",k,A.data),P(A.data)}catch(A){console.error("Errore nel caricamento degli slot:",A),Je.fire({icon:"error",title:d.t("Errore"),text:d.t("Errore nel caricamento degli orari")})}},de=N=>{var k,A,z,te,se,be,ce,pe;const _=JSON.parse(N),H={status:6,calendar:_.calendar_id,opening_hour:_.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Ye(`${_.date}T${_.start_time}`).toISOString(),to_time:Ye(`${_.date}T${_.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(A=(k=i==null?void 0:i.data)==null?void 0:k.service_data)==null?void 0:A.id,calendar_group_office_id:(te=(z=i==null?void 0:i.data)==null?void 0:z.user_group)==null?void 0:te.id,calendar_group_place_id:(be=(se=i==null?void 0:i.data)==null?void 0:se.place)==null?void 0:be.id};window.FormioHelper.authenticatedRequest((ce=i==null?void 0:i.dataValue)!=null&&ce.id?"PATCH":"POST",(pe=i==null?void 0:i.dataValue)!=null&&pe.id?`meetings/${i.dataValue.id}`:"meetings",H).then(xe=>{j({day:Ye(_.date).format("dddd, DD MMMM YYYY"),startDate:_.start_time,endDate:_.end_time}),m(xe!=null&&xe.id?xe:xe?{...xe,id:i.dataValue.id}:i.dataValue.id?{...H,id:i.dataValue.id}:{...H})}).catch(xe=>{var Ae,$e;console.error(xe),xe.status===400&&(($e=(Ae=xe==null?void 0:xe.response)==null?void 0:Ae.data)==null?void 0:$e.type)==="validation_error"?Je.fire({title:"",html:"<p>"+d.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+xe+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ee=N=>{const _=new Set,H=[];return N.forEach(k=>{const A=Ye(k.date),z=A.format("YYYY-MM");_.has(z)||(_.add(z),H.push({value:z,label:A.format("MMMM YYYY").replace(/^\w/,te=>te.toUpperCase())}))}),H},me=async()=>{var se,be,ce,pe,xe,Ae,$e,Ie,Ge,Qe;const N=(ce=(be=(se=i==null?void 0:i.root)==null?void 0:se.data)==null?void 0:be.place)!=null&&ce.merge_availabilities?(Ae=(xe=(pe=i==null?void 0:i.root)==null?void 0:pe.data)==null?void 0:xe.place)==null?void 0:Ae.merged_availabilities_link:null,_=fe().format("YYYY-MM-DD"),H=fe().add(1,"month").format("YYYY-MM-DD"),k=((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=N?ne(N,_,H):ae(_,H,k),z=ar("AVAILABILITY",A),te=tr("AVAILABILITY",z);if(te){L(te),D(ee(te));return}else m({});u(!0);try{const ye=await window.FormioHelper.fetchAPIUrlLimit(A);if(u(!1),!(ye!=null&&ye.length)){Je.fire({icon:"warning",title:d.t("warning"),html:d.t("no_meetings")});return}er("AVAILABILITY",z,ye),L(ye),D(ee(ye))}catch(ye){u(!1),console.error("Errore nel caricamento disponibilità:",ye)}};q.useEffect(()=>{if(B!=null&&B.length){const N=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(N!=null&&N.from_time&&(N!=null&&N.to_time)&&!Ye().isAfter(N==null?void 0:N.draft_expiration)){const _=Ye(N.from_time).format("YYYY-MM");y(_),_&&Y&&(Y(B.filter(H=>H.date.startsWith(_))),W(Ye(N.from_time).format("YYYY-MM-DD")))}else N!=null&&N.draft_expiration&&Ye().isAfter(N==null?void 0:N.draft_expiration)&&Je.fire({icon:"warning",title:d.t("warning"),html:d.t("expired_meeting")})}},[B]),q.useEffect(()=>{const N=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(!v.length||S||N!=null&&N.from_time||N!=null&&N.to_time)return;const _=v[0];_&&(y(_.value),he(_.value))},[v,S,i==null?void 0:i.dataValue]),q.useEffect(()=>{if(T&&c===!1){const N=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());Q(JSON.stringify({date:T,calendar_ids:N.calendar.id}))}},[T]);const ue=()=>window.innerWidth>768?"timeGridWeek":"timeGridDay";q.useEffect(()=>{const N=()=>{const _=I.current;if(!_)return;const H=ue(),k=_.getView().type;H!==k&&_.setOption("view",H)};return window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]),q.useEffect(()=>{const N=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());F!=null&&F.length&&(N!=null&&N.from_time)&&(M(Ye(N.from_time).format("HH:mm")+" - "+Ye(N.to_time).format("HH:mm")),j({day:Ye(N.from_time).format("dddd D MMM YYYY"),startDate:Ye(N.from_time).format("HH:mm"),endDate:Ye(N.to_time).format("HH:mm")}))},[F]);const Z=()=>{const N=yc();I.current=Zr.createCalendar(R.current,[Zr.TimeGrid],{events:[],buttonText:{today:d.t("Oggi")},allDaySlot:!1,firstDay:1,date:N.date,slotEventOverlap:!1,view:ue(),height:"400px",views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:_=>{gc(_.view.type,_.start)},eventClick({event:_,el:H}){var ce,pe,xe,Ae,$e,Ie,Ge,Qe;document.querySelectorAll(".ec-event").forEach(ye=>{ye.classList.remove("highlighted-event")}),H.classList.add("highlighted-event");const k=new Date(_.start),A=new Date(_.end),z=k.toLocaleDateString("it-IT",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),te=k.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),se=A.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),be={status:6,calendar:_.extendedProps.calendar_id,opening_hour:_.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:k,to_time:A,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(pe=(ce=i==null?void 0:i.data)==null?void 0:ce.service_data)==null?void 0:pe.id,calendar_group_office_id:(Ae=(xe=i==null?void 0:i.data)==null?void 0:xe.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",be).then(ye=>{var Ze;let we;!ye||ye===""?we={...be,code:null,id:(Ze=i==null?void 0:i.dataValue)==null?void 0:Ze.id}:typeof ye=="object"&&(we=ye),j({day:z,startDate:te,endDate:se}),m(we)}).catch(ye=>{var we,Ze;console.error(ye),ye.status===400&&((Ze=(we=ye==null?void 0:ye.response)==null?void 0:we.data)==null?void 0:Ze.type)==="validation_error"?Je.fire({title:"",html:"<p>"+d.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+ye+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:ve,eventDidMount:_=>{const{event:H,el:k}=_,A=H.extendedProps;k.setAttribute("data-event-id",H.id+"-"+A.date+"-"+A.start_time)},loading:_=>{u(_)}})},ve=N=>{var _,H;(H=(_=i==null?void 0:i.root)==null?void 0:_.data)!=null&&H.place&&I.current.setOption("eventSources",[{events:Ne}])};async function Ne(N,_,H){var k,A,z,te,se,be;try{I.current.setOption("events",[]);const ce=fe(N.start).format("YYYY-MM-DD"),pe=new Date(N.end);pe.setDate(pe.getDate()-1);const xe=fe(pe).format("YYYY-MM-DD"),Ae=null,$e=(z=(A=(k=i==null?void 0:i.root)==null?void 0:k.data)==null?void 0:A.place)!=null&&z.merge_availabilities?(be=(se=(te=i==null?void 0:i.root)==null?void 0:te.data)==null?void 0:se.place)==null?void 0:be.merged_availabilities_link:null,Ie=$e?J($e,ce,xe):ae(ce,xe,Ae),Ge=ar("AVAILABILITY",Ie),Qe=tr("AVAILABILITY",Ge);let ye;if(Qe?(ye=Qe,u(!1)):(ye=await window.FormioHelper.fetchAPIUrlLimit(Ie),er("AVAILABILITY",Ge,ye)),!(ye!=null&&ye.length)){_([]),Je.fire({icon:"warning",title:d.t("warning"),html:d.t("no_meetings")});return}const we=ye.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(ye);I.current.setOption("slotMinTime",Ze.earliestStartTime),I.current.setOption("slotMaxTime",Ze.latestEndTime),$(ye),pc(I.current,we),_(we),setTimeout(()=>{_e(we)},500)}catch(ce){console.error("Errore nel caricamento disponibilità:",ce),H==null||H(ce)}}q.useEffect(()=>{let N,_=!1;async function H(){var k,A,z,te,se;try{if(await((k=window.FormioInstance)==null?void 0:k.formReady),_)return;if(!R.current){console.warn("Elemento calendario non trovato");return}const be=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());be&&(be!=null&&be.draft_expiration)&&Ye().isAfter(be.draft_expiration)&&(m({}),jn()),((z=(A=i==null?void 0:i.data)==null?void 0:A.service_data)==null?void 0:z.view_type)==="calendar"?I!=null&&I.current||Z():((se=(te=i==null?void 0:i.data)==null?void 0:te.service_data)==null?void 0:se.view_type)==="select"?me():alert(d.t("Il componente non è configurato per la visualizzazione a calendario"))}catch(be){console.error("Errore durante l'inizializzazione del calendario:",be)}}return N=setTimeout(H,500),()=>{var k,A;_=!0,N&&clearTimeout(N),I.current&&((A=(k=R.current)==null?void 0:k.destroy)==null||A.call(k),I.current=null)}},[(ze=(Re=i==null?void 0:i.root)==null?void 0:Re.data)==null?void 0:ze.place]);function _e(N){const _=i==null?void 0:i.dataValue;if(!(_!=null&&_.from_time))return;const H=Ye(_.from_time).format("DD-MM-YYYY HH:mm"),k=Ye(_.to_time).format("DD-MM-YYYY HH:mm"),A=N.find(te=>Ye(te.start).format("DD-MM-YYYY HH:mm")===H&&Ye(te.end).format("DD-MM-YYYY HH:mm")===k);if(!A)return;const z=document.querySelector(`.ec-event[data-event-id="${A.id}-${Ye(_==null?void 0:_.from_time).format("YYYY-MM-DD")}-${Ye(_==null?void 0:_.from_time).format("HH:mm")}"]`);z&&(z.classList.add("highlighted-event"),z.scrollIntoView({behavior:"smooth",block:"center"}),j({day:Ye(_==null?void 0:_.from_time).format("dddd, DD MMMM YYYY"),startDate:Ye(_==null?void 0:_.from_time).format("HH:mm"),endDate:Ye(_==null?void 0:_.to_time).format("HH:mm")}))}const Ce=({day:N,startDate:_,endDate:H})=>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:d.t("Data")}),h.jsx("p",{className:"data-text",children:h.jsx("strong",{children:N})})]}),h.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[h.jsx("div",{className:"text-paragraph-small",children:d.t("Ora")}),h.jsx("p",{className:"data-text",children:h.jsxs("strong",{children:[_," - ",H]})})]})]})});return q.useEffect(()=>{var N,_,H,k;document.querySelector(".formio-read-only")&&c===!1?p(!0):(((_=(N=i==null?void 0:i.data)==null?void 0:N.service_data)==null?void 0:_.view_type)==="select"?me():((k=(H=i==null?void 0:i.data)==null?void 0:H.service_data)==null?void 0:k.view_type)==="calendar"&&Z(),p(!1))},[]),q.useEffect(()=>{c&&setTimeout(()=>{const N=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());console.log("savedValue",N,c),N&&o(N)},500)},[c]),h.jsx(h.Fragment,{children:c&&K?h.jsxs("div",{className:"mx-2",children:[h.jsxs("p",{className:"text-paragraph",children:[d.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(K.from_time).format("dddd D MMM YYYY"),i18next:d,slot:`${Ye(K.from_time).format("HH:mm")} - ${Ye(K.to_time).format("HH:mm")}`})})})})]}):h.jsxs("div",{className:"",children:[h.jsx("div",{ref:R}),v.length>0?h.jsxs(h.Fragment,{children:[h.jsxs(le.Select,{label:"Mese",id:"selectMonthYear",onChange:he,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),v.map(N=>h.jsx("option",{value:N.value,selected:N.value===S,children:N.label},N.value))]}),h.jsxs(le.Select,{label:"Giorno",id:"selectDay",onChange:N=>Q(N,"manual"),disabled:O.length===0,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),O.map(N=>h.jsx("option",{value:JSON.stringify(N),selected:N.date===T,children:Ye(N.date).format("dddd,DD MMMM YYYY")},N.date))]}),h.jsxs(le.Select,{label:"Orario",id:"selectSlot",onChange:de,disabled:F.length===0,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),F.map(N=>h.jsx("option",{value:JSON.stringify(N),selected:N.start_time+" - "+N.end_time===C,children:N.start_time+" - "+N.end_time},N.start_time+" - "+N.end_time))]})]}):null,f?Ce({day:f.day,startDate:f.startDate,endDate:f.endDate}):null,s?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,m,d){super(i,m,d)}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,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(vc,{ref:m,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...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 _c=[{key:"defaultValue",ignore:!0}],bc=[{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 cc(...g){return ot.Components.baseEditForm([{key:"display",components:uc}],...g)}function gn({day:g,slot:i,i18next:m}){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:g})," ",m.t("alle")," ",m.t("ore")," ",h.jsx("b",{children:i})]})})})})}const dc=({component:g,current:i,onChange:m,i18next:u})=>{const[$,F]=q.useState(),[K,o]=q.useState([]),[x,a]=q.useState([]),[s,c]=q.useState(!1),[d,p]=q.useState(null),[f,j]=q.useState(null),[v,D]=q.useState(null),[O,Y]=q.useState(null),[R,E]=q.useState({}),[S,y]=q.useState(null),[C,z]=q.useState(!1),[N,H]=q.useState([]),[J,w]=q.useState(!1),T=q.useRef(),V=g.calendarId;me.locale(u.language);const B=_=>{let W=me(_).format("YYYY-MM-DD");fetch(Z(W)).then(k=>k.json()).then(k=>{let A=he(_||new Date);const I=k.filter(pe=>pe.available==!0);I.length===0&&Re();let oe=[];A.forEach(pe=>{k.some(xe=>xe.date===pe&&xe.available==!0)?oe.push({available:!0,date:pe}):oe.push({available:!1,date:pe})});const be=oe.map(pe=>{if(pe.available===!1)return me(pe.date,"YYYY-MM-DD").toDate()});o(be);const de=I.length?I[0].date:_;re(de)}).catch(k=>console.error(k))},re=_=>{Y(null),D(null),a([]);let W=me(_).format("YYYY-MM-DD");fetch(ce(W)).then(k=>k.json()).then(k=>{const A=k.filter(I=>I.availability==!0);E(A[0]),A.length>0?(a(k),c(!1),D(me(_).format("L")),F(me(_,"YYYY-MM-DD").toDate())):(k.length>0&&F(me(k[0].date,"YYYY-MM-DD").toDate()),a([]),Re())})},ee=()=>{if(V!==""&&V!=null)if(!i.dataValue)B(new Date);else if(g.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){y(i.dataValue);let _=[];i.dataValue.map(W=>{_.push({...W,date:me(W.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),H(_)}}else if(!g.multiple&&typeof i.dataValue=="object"){const _={date:i.dataValue.date,slot:i.dataValue.slot},W={...i.dataValue,date:me(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};H([W]),y(_)}else{let _=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),W=_[2].split("#");const k={date:me(_[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:_[1]};g.multiple?(m([{date:_[0],slot:_[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}]),H([{date:_[0],slot:_[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])):(m({date:_[0],slot:_[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}),H([{date:_[0],slot:_[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])),y(k)}};q.useEffect(()=>{var _;(_=window.FormioInstance)==null||_.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const he=_=>{let k=me(_,"YYYY-MM").daysInMonth(),A=[];for(;k;){let I=me(_).date(k);A.push(I.format("YYYY-MM-DD")),k--}return A},Z=(_,W=!1)=>{let k=g.calendarId,A=g.select_opening_hours,I=g.select_opening_hours?g.opening_hours:[];window.location.pathname.split("/");let oe=`${Fe()}/api/calendars/${k}/availabilities`,be=[`from_time=${me(_).startOf("month").format("YYYY-MM-DD")}`,`to_time=${me(_).endOf("month").format("YYYY-MM-DD")}`];return W&&be.push(`available=${W}`),A&&I&&be.push(`opening_hours=${I.join()}`),`${oe}?${be.join("&")}`},ce=(_,W=!1)=>{let k=g.calendarId,A=g.select_opening_hours,I=g.select_opening_hours?g.opening_hours:[];window.location.pathname.split("/");const oe=me(_).format("YYYY-MM-DD");let be=`${Fe()}/api/calendars/${k}/availabilities/${oe}`,de=[];return W&&de.push(`available=${W}`),A&&I&&de.push(`opening_hours=${I.join()}`),de&&(be=`${be}?${de.join("&")}`),be},ne=_=>{B(_)},fe=_=>{setTimeout(()=>{z(!C)},1e3),re(_)},se=_=>{Y(null),setTimeout(()=>{_&&(j(_.target.dataset),Y(_.target.id))},300)},Q=_=>{p(null);let W=`${Fe()}/it/meetings/new-draft`,k={date:f!=null&&f.date?me(f==null?void 0:f.date).format("DD-MM-YYYY"):me(_.target.dataset.date).format("DD-MM-YYYY"),slot:f!=null&&f.value_start&&(f!=null&&f.value_end)?f.value_start+"-"+f.value_end:_.target.dataset.slots,calendar:g.calendarId,opening_hour:f!=null&&f.opening_hour?f==null?void 0:f.opening_hour:_.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:me().format()};fetch(W,{method:"POST",body:JSON.stringify(k),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(A=>{if(!A.ok)throw new Error(u.t("Intervallo selezionato non disponibile!"));return A.json()}).then(A=>{p(A);const I={date:k.date,slot:k.slot,calendar_id:k.calendar[0],opening_hour_id:k.opening_hour||k.opening_hour_id,meeting_id:A.id};H([...N,I])}).catch(A=>{console.log(A),Je.fire({title:"",html:"<p>"+A+"</p>",icon:"error",cancelButtonText:u.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{f&&(Q(),z(!C))},Ne=()=>h.jsx("span",{children:u.t("Tempo prenotazione scaduto!")}),_e=({minutes:_,seconds:W,completed:k})=>k?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[u.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:[_," ",u.t("minuti")," ",W," ",u.t("secondi")]})]})]})}),Ce=_=>{if(_===null||_==="")m("");else if(Array.isArray(_)&&_.length>0){let W=[];N.map(k=>{W.push({date:me(k.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:k.slot,calendar_id:k.calendar_id||k.calendar[0],meeting_id:k.meeting_id,opening_hour_id:k.opening_hour||k.opening_hour_id})}),g.multiple?m(W):m(W[0])}else m("")},Re=()=>{c(!0),p(null),D(null),Ce(null)},ze=()=>{if(u.language==="it")return kn;if(u.language==="en")return Dn;if(u.language==="de")return Sn};q.useEffect(()=>{Ce(N)},[N]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&J===!1?(w(!0),setTimeout(()=>{ee()},1e3)):(w(!1),setTimeout(()=>{ee()},1e3))},[]);const P=(_,W)=>{let k=`${Fe()}/api/meetings/${W.meeting_id}`;fetch(k,{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>${u.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:u.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const I=[...N.slice(0,_),...N.slice(_+1)];H(I),B(new Date)}})};return h.jsxs(h.Fragment,{children:[J&&S?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(S)&&S.length>1?u.t("Giorni selezionati per la prenotazione"):u.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(S)?S.map(_=>h.jsx(gn,{day:me(_.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:u,slot:_.slot})):h.jsx(gn,{day:Ye(S.date).format("DD/MM/YYYY"),i18next:u,slot:S.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[g.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:u.t(g.label)}),h.jsx(va.DayPicker,{mode:"single",selected:$,locale:ze(),disabled:K,onMonthChange:ne,onDayClick:fe})]})}):N.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:u.t(g.label)}),h.jsx(va.DayPicker,{mode:"single",selected:$,locale:ze(),disabled:K,onMonthChange:ne,onDayClick:fe})]})}):null,h.jsx("div",{className:"col-12",children:N.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[N.length>1?u.t("Giorni selezionati per la prenotazione"):u.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:N.map((_,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:[_.date," ",f||_.slot?`${u.t("alle")} ${_.slot}`:""]}),h.jsx(ue.Icon,{icon:"it-delete",onClick:()=>P(W,_),role:"button"})]})})},"li"+W))})})}),d?h.jsx(ue.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(xn,{date:d.expiration_time,renderer:_e})}):null]})}):null})]})}),h.jsxs(ue.Modal,{isOpen:C,toggle:()=>z(!C),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(ue.ModalHeader,{toggle:()=>z(!C),id:"daySelected",children:u.t("Seleziona una fascia oraria")}),h.jsx(ue.ModalBody,{children:h.jsxs("div",{className:"row",children:[N.length>=1?h.jsxs("div",{children:[v&&!s?h.jsxs("h6",{children:[u.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(ue.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",u.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:se,tabIndex:"1",className:O==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":me(v,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":N[N.length-1].slot,"data-opening_hour":N[N.length-1].opening_hour_id,"data-start":N[N.length-1].slot.split("-")[0],"data-end":N[N.length-1].slot.split("-")[1],"data-value_start":N[N.length-1].slot.split("-")[0],"data-value_end":N[N.length-1].slot.split("-")[1],disabled:s,children:N[N.length-1].slot})})]})]}):null,h.jsx("div",{children:v&&N.length>=1?h.jsx("h6",{children:u.t("Seleziona altri orari")}):s?null:h.jsxs("h6",{children:[u.t("Orari disponibili del")," ",Ye(v).format("DD/MM/YYYY")]})}),x.map((_,W)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+W,onClick:se,ref:T,className:O==="slot-"+W?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":_.date,"data-start":_.start_time,"data-end":_.end_time,"data-value_start":_.start_time,"data-value_end":_.end_time,"data-slots":_.start_time+"-"+_.end_time,"data-opening_hour":_.opening_hour,"data-min_duration":_.min_duration,disabled:_.slots_available==0,children:[_.start_time," - ",_.end_time]})},"slot-"+W)),s?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(ue.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),u.t("Attenzione")]}),h.jsxs("p",{children:[" ",u.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null]})}),h.jsx(ue.ModalFooter,{children:h.jsx(ue.Button,{color:"primary",onClick:()=>ve(),disabled:!v||!(f!=null&&f.value_start),children:u.t("Conferma")})})]})]})},ka=class ka extends ot.ReactComponent{constructor(i,m,u){super(i,m,u)}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,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(dc,{ref:m,component:this.component,value:this.dataValue,onChange:u=>this.setValue(u),...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 m=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),u=m[2].split("#");this.date=m[0],this.slot=m[1],this.meeting=u[1],this.meeting_expiration_time=null,this.opening_hour=u.length===3?u[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:"",m=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:m}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(ka,"editForm",cc);let ba=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(...g){return ot.Components.baseEditForm([{key:"display",components:hc}],...g)}function mc({day:g,slot:i,i18next:m}){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:g})," ",m.t("alle")," ",m.t("ore")," ",h.jsx("b",{children:i})]})})})})}function pc(g,i){if(!i||i.length===0)return;const m=i.map(K=>{const o=new Date(K.start);return(new Date(K.end)-o)/6e4}),u=Math.min(...m),$=m.reduce((K,o)=>K+o,0)/m.length;let F=0;u<=30&&u>15?F=$*1:u<=15?F=$*24:F=$*4,g.setOption("slotHeight",F),document.documentElement.style.setProperty("--slot-height",`${F}px`)}const On={AVAILABILITY:{key:"availability_data_cache_",duration:10},SLOTS:{key:"availability_slots_cache_",duration:10},SUBMISSION:{key:"submission_cache_",duration:30}},er=(g,i,m)=>{const u={data:m,timestamp:Ye().toISOString()};sessionStorage.setItem(i,JSON.stringify(u)),console.log(`✅ Cache salvato: ${g}`)},tr=(g,i)=>{try{const m=sessionStorage.getItem(i);if(!m)return null;const u=JSON.parse(m),$=Ye().diff(Ye(u.timestamp),"minutes");return $>On[g].duration?(sessionStorage.removeItem(i),console.log(`⏰ Cache scaduto: ${g}`),null):(console.log(`✅ Cache letto: ${g} (${$} minuti fa)`),u.data)}catch(m){return console.error(`Errore nel leggere il cache (${g}):`,m),null}},ar=(g,...i)=>On[g].key+btoa(i),mr="calendar_view_state",pr="calendar_view_date",gc=(g,i)=>{try{sessionStorage.setItem(mr,g),sessionStorage.setItem(pr,i||new Date().toISOString())}catch(m){console.error("Errore nel salvare lo stato della view:",m)}},yc=()=>{try{const g=sessionStorage.getItem(mr),i=sessionStorage.getItem(pr);return{viewType:g||"timeGridWeek",date:i?new Date(i):new Date}}catch(g){return console.error("Errore nel leggere lo stato della view:",g),{viewType:"timeGridWeek",date:new Date}}},jn=()=>{try{sessionStorage.removeItem(mr),sessionStorage.removeItem(pr)}catch(g){console.error("Errore nel pulire lo stato della view:",g)}},yn=cr.Formio.Components.components.field,vc=({component:g,current:i,onChange:m,i18next:u})=>{var Re,ze;const[$,F]=q.useState(null),[K,o]=q.useState(null),[x,a]=q.useState([]),[s,c]=q.useState(!1),[d,p]=q.useState(!1),[f,j]=q.useState(null),[v,D]=q.useState([]),[O,Y]=q.useState([]),[R,E]=q.useState([]),[S,y]=q.useState(null),[C,z]=q.useState(null),[N,H]=q.useState(null),J=q.useRef(null),w=q.useRef(null);u.language,me.locale(u.language),Ye.locale(u.language);function T(P){if(!P||P.length===0)return null;const _=P.map(A=>({start:A.start_time,end:A.end_time})),W=_.reduce((A,I)=>I.start<A?I.start:A,_[0].start),k=_.reduce((A,I)=>I.end>A?I.end:A,_[0].end);return{earliestStartTime:W,latestEndTime:k}}function V(P){const _=P.map(A=>me(A.date).isoWeekday()),k=[1,2,3,4,5,6,7].filter(A=>!_.includes(A));k.length>0?w.current.setOption("hiddenDays",k):w.current.setOption("hiddenDays",[])}function B(P,_,W){const k=new URL(P),I=`${k.pathname.split("/").slice(0,4).join("/")}/${_}/${W}`;return`${k.origin}${I}${k.search}`}function re(P,_,W){const k=new URL(P),I=`${k.pathname.split("/").slice(0,4).join("/")}`;return`${k.origin}${I}${k.search}&from_to=${_}&to_date=${W}`}function ee(P,_,W){return`${Fe()}/api/availabilities/${P}/${_}?calendar_ids=${W}&available=true`}const he=P=>{E([]),Y([]),m({}),P&&Y($.filter(_=>_.date.startsWith(P)))},Z=async(P,_)=>{const W=JSON.parse(P),k=ar("SLOTS",W.date,W.calendar_ids);if(_==="manual")E([]),H(null),j(null),m({});else{const A=tr("SLOTS",k);if(A){E(A);return}}try{const A=await window.FormioHelper.anonymousCall(`availabilities/${W.date}?calendar_ids=${W.calendar_ids}`);er("SLOTS",k,A.data),E(A.data)}catch(A){console.error("Errore nel caricamento degli slot:",A),Je.fire({icon:"error",title:u.t("Errore"),text:u.t("Errore nel caricamento degli orari")})}},ce=P=>{var k,A,I,te,oe,be,de,pe;const _=JSON.parse(P),W={status:6,calendar:_.calendar_id,opening_hour:_.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Ye(`${_.date}T${_.start_time}`).toISOString(),to_time:Ye(`${_.date}T${_.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(A=(k=i==null?void 0:i.data)==null?void 0:k.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:(be=(oe=i==null?void 0:i.data)==null?void 0:oe.place)==null?void 0:be.id};window.FormioHelper.authenticatedRequest((de=i==null?void 0:i.dataValue)!=null&&de.id?"PATCH":"POST",(pe=i==null?void 0:i.dataValue)!=null&&pe.id?`meetings/${i.dataValue.id}`:"meetings",W).then(xe=>{j({day:Ye(_.date).format("dddd, DD MMMM YYYY"),startDate:_.start_time,endDate:_.end_time}),m(xe!=null&&xe.id?xe:xe?{...xe,id:i.dataValue.id}:i.dataValue.id?{...W,id:i.dataValue.id}:{...W})}).catch(xe=>{var Ae,$e;console.error(xe),xe.status===400&&(($e=(Ae=xe==null?void 0:xe.response)==null?void 0:Ae.data)==null?void 0:$e.type)==="validation_error"?Je.fire({title:"",html:"<p>"+u.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:u.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+xe+"</p>",icon:"error",cancelButtonText:u.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ne=P=>{const _=new Set,W=[];return P.forEach(k=>{const A=Ye(k.date),I=A.format("YYYY-MM");_.has(I)||(_.add(I),W.push({value:I,label:A.format("MMMM YYYY").replace(/^\w/,te=>te.toUpperCase())}))}),W},fe=async()=>{var oe,be,de,pe,xe,Ae,$e,Ie,Ge,Qe;const P=(de=(be=(oe=i==null?void 0:i.root)==null?void 0:oe.data)==null?void 0:be.place)!=null&&de.merge_availabilities?(Ae=(xe=(pe=i==null?void 0:i.root)==null?void 0:pe.data)==null?void 0:xe.place)==null?void 0:Ae.merged_availabilities_link:null,_=me().format("YYYY-MM-DD"),W=me().add(1,"month").format("YYYY-MM-DD"),k=((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,_,W):ee(_,W,k),I=ar("AVAILABILITY",A),te=tr("AVAILABILITY",I);if(te){F(te),D(ne(te));return}else m({});c(!0);try{const ye=await window.FormioHelper.fetchAPIUrlLimit(A);if(c(!1),!(ye!=null&&ye.length)){Je.fire({icon:"warning",title:u.t("warning"),html:u.t("no_meetings")});return}er("AVAILABILITY",I,ye),F(ye),D(ne(ye))}catch(ye){c(!1),console.error("Errore nel caricamento disponibilità:",ye)}};q.useEffect(()=>{if($!=null&&$.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 _=Ye(P.from_time).format("YYYY-MM");y(_),_&&Y&&(Y($.filter(W=>W.date.startsWith(_))),z(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:u.t("warning"),html:u.t("expired_meeting")})}},[$]),q.useEffect(()=>{const P=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(!v.length||S||P!=null&&P.from_time||P!=null&&P.to_time)return;const _=v[0];_&&(y(_.value),he(_.value))},[v,S,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());Z(JSON.stringify({date:C,calendar_ids:P.calendar.id}))}},[C]);const se=()=>window.innerWidth>768?"timeGridWeek":"timeGridDay";q.useEffect(()=>{const P=()=>{const _=w.current;if(!_)return;const W=se(),k=_.getView().type;W!==k&&_.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)&&(H(Ye(P.from_time).format("HH:mm")+" - "+Ye(P.to_time).format("HH:mm")),j({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 Q=()=>{const P=yc();w.current=Zr.createCalendar(J.current,[Zr.TimeGrid],{events:[],buttonText:{today:u.t("Oggi")},allDaySlot:!1,firstDay:1,date:P.date,slotEventOverlap:!1,view:se(),height:"400px",views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:_=>{gc(_.view.type,_.start)},eventClick({event:_,el:W}){var de,pe,xe,Ae,$e,Ie,Ge,Qe;document.querySelectorAll(".ec-event").forEach(ye=>{ye.classList.remove("highlighted-event")}),W.classList.add("highlighted-event");const k=new Date(_.start),A=new Date(_.end),I=k.toLocaleDateString("it-IT",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),te=k.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),oe=A.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),be={status:6,calendar:_.extendedProps.calendar_id,opening_hour:_.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:k,to_time:A,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(pe=(de=i==null?void 0:i.data)==null?void 0:de.service_data)==null?void 0:pe.id,calendar_group_office_id:(Ae=(xe=i==null?void 0:i.data)==null?void 0:xe.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",be).then(ye=>{var Ze;let we;!ye||ye===""?we={...be,code:null,id:(Ze=i==null?void 0:i.dataValue)==null?void 0:Ze.id}:typeof ye=="object"&&(we=ye),j({day:I,startDate:te,endDate:oe}),m(we)}).catch(ye=>{var we,Ze;console.error(ye),ye.status===400&&((Ze=(we=ye==null?void 0:ye.response)==null?void 0:we.data)==null?void 0:Ze.type)==="validation_error"?Je.fire({title:"",html:"<p>"+u.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:u.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+ye+"</p>",icon:"error",cancelButtonText:u.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:ve,eventDidMount:_=>{const{event:W,el:k}=_,A=W.extendedProps;k.setAttribute("data-event-id",W.id+"-"+A.date+"-"+A.start_time)},loading:_=>{c(_)}})},ve=P=>{var _,W;(W=(_=i==null?void 0:i.root)==null?void 0:_.data)!=null&&W.place&&w.current.setOption("eventSources",[{events:Ne}])};async function Ne(P,_,W){var k,A,I,te,oe,be;try{w.current.setOption("events",[]);const de=me(P.start).format("YYYY-MM-DD"),pe=new Date(P.end);pe.setDate(pe.getDate()-1);const xe=me(pe).format("YYYY-MM-DD"),Ae=null,$e=(I=(A=(k=i==null?void 0:i.root)==null?void 0:k.data)==null?void 0:A.place)!=null&&I.merge_availabilities?(be=(oe=(te=i==null?void 0:i.root)==null?void 0:te.data)==null?void 0:oe.place)==null?void 0:be.merged_availabilities_link:null,Ie=$e?B($e,de,xe):ee(de,xe,Ae),Ge=ar("AVAILABILITY",Ie),Qe=tr("AVAILABILITY",Ge);let ye;if(Qe?(ye=Qe,c(!1)):(ye=await window.FormioHelper.fetchAPIUrlLimit(Ie),er("AVAILABILITY",Ge,ye)),!(ye!=null&&ye.length)){_([]),Je.fire({icon:"warning",title:u.t("warning"),html:u.t("no_meetings")});return}const we=ye.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=T(ye);w.current.setOption("slotMinTime",Ze.earliestStartTime),w.current.setOption("slotMaxTime",Ze.latestEndTime),V(ye),pc(w.current,we),_(we),setTimeout(()=>{_e(we)},500)}catch(de){console.error("Errore nel caricamento disponibilità:",de),W==null||W(de)}}q.useEffect(()=>{let P,_=!1;async function W(){var k,A,I,te,oe;try{if(await((k=window.FormioInstance)==null?void 0:k.formReady),_)return;if(!J.current){console.warn("Elemento calendario non trovato");return}const be=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());be&&(be!=null&&be.draft_expiration)&&Ye().isAfter(be.draft_expiration)&&(m({}),jn()),((I=(A=i==null?void 0:i.data)==null?void 0:A.service_data)==null?void 0:I.view_type)==="calendar"?w!=null&&w.current||Q():((oe=(te=i==null?void 0:i.data)==null?void 0:te.service_data)==null?void 0:oe.view_type)==="select"?fe():alert(u.t("Il componente non è configurato per la visualizzazione a calendario"))}catch(be){console.error("Errore durante l'inizializzazione del calendario:",be)}}return P=setTimeout(W,500),()=>{var k,A;_=!0,P&&clearTimeout(P),w.current&&((A=(k=J.current)==null?void 0:k.destroy)==null||A.call(k),w.current=null)}},[(ze=(Re=i==null?void 0:i.root)==null?void 0:Re.data)==null?void 0:ze.place]);function _e(P){const _=i==null?void 0:i.dataValue;if(!(_!=null&&_.from_time))return;const W=Ye(_.from_time).format("DD-MM-YYYY HH:mm"),k=Ye(_.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")===k);if(!A)return;const I=document.querySelector(`.ec-event[data-event-id="${A.id}-${Ye(_==null?void 0:_.from_time).format("YYYY-MM-DD")}-${Ye(_==null?void 0:_.from_time).format("HH:mm")}"]`);I&&(I.classList.add("highlighted-event"),I.scrollIntoView({behavior:"smooth",block:"center"}),j({day:Ye(_==null?void 0:_.from_time).format("dddd, DD MMMM YYYY"),startDate:Ye(_==null?void 0:_.from_time).format("HH:mm"),endDate:Ye(_==null?void 0:_.to_time).format("HH:mm")}))}const Ce=({day:P,startDate:_,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:u.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:u.t("Ora")}),h.jsx("p",{className:"data-text",children:h.jsxs("strong",{children:[_," - ",W]})})]})]})});return q.useEffect(()=>{var P,_,W,k;document.querySelector(".formio-read-only")&&d===!1?p(!0):(((_=(P=i==null?void 0:i.data)==null?void 0:P.service_data)==null?void 0:_.view_type)==="select"?fe():((k=(W=i==null?void 0:i.data)==null?void 0:W.service_data)==null?void 0:k.view_type)==="calendar"&&Q(),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&&o(P)},500)},[d]),h.jsx(h.Fragment,{children:d&&K?h.jsxs("div",{className:"mx-2",children:[h.jsxs("p",{className:"text-paragraph",children:[u.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(K.from_time).format("dddd D MMM YYYY"),i18next:u,slot:`${Ye(K.from_time).format("HH:mm")} - ${Ye(K.to_time).format("HH:mm")}`})})})})]}):h.jsxs("div",{className:"",children:[h.jsx("div",{ref:J}),v.length>0?h.jsxs(h.Fragment,{children:[h.jsxs(ue.Select,{label:"Mese",id:"selectMonthYear",onChange:he,children:[h.jsx("option",{value:"",children:u.t("Scegli un'opzione")}),v.map(P=>h.jsx("option",{value:P.value,selected:P.value===S,children:P.label},P.value))]}),h.jsxs(ue.Select,{label:"Giorno",id:"selectDay",onChange:P=>Z(P,"manual"),disabled:O.length===0,children:[h.jsx("option",{value:"",children:u.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(ue.Select,{label:"Orario",id:"selectSlot",onChange:ce,disabled:R.length===0,children:[h.jsx("option",{value:"",children:u.t("Scegli un'opzione")}),R.map(P=>h.jsx("option",{value:JSON.stringify(P),selected:P.start_time+" - "+P.end_time===N,children:P.start_time+" - "+P.end_time},P.start_time+" - "+P.end_time))]})]}):null,f?Ce({day:f.day,startDate:f.startDate,endDate:f.endDate}):null,s?h.jsx("div",{className:"d-flex align-items-center justify-content-center position-absolute-center",children:h.jsx(ue.Spinner,{active:!0})}):null]})})},Ya=class Ya extends yn{constructor(i,m,u){super(i,m,u)}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,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(vc,{ref:m,component:this.component,value:this.dataValue,onChange:u=>this.setValue(u),...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 _c=[{key:"defaultValue",ignore:!0}],bc=[{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:`{
|
|
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}],xc=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function Mc(...g){return ot.Components.baseEditForm([{key:"display",components:bc},{key:"data",components:_c},{label:"File",key:"file",weight:5,components:wc},{key:"validation",components:xc}],...g)}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(m=>{i.token=m.data.token}).catch(m=>{Je.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let i=this;return new Promise(async(m,d)=>{aa("auth-token")?m({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(B=>{const L=il.jwtDecode(B.data.token);L.exp&&oc("auth-token",B.data.token,L.exp)}).catch(B=>{console.log(B)})})}getToken(){return this.token}execAuthenticatedCall(i){this.token?i(this.token):this.getSessionAuthTokenPromise().then(m=>{this.token=m.token,i(this.token)})}}const vn=cr.Formio.Components.components.field;let lr=null;document.querySelector("widget-formio")!==null&&(lr=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const Dc=g=>{const{value:i,component:m,current:d,onChange:B,i18next:L}=g,[K,o]=q.useState([]),[w,a]=q.useState(new Map),[s,u]=q.useState(!1),c=new Sc;q.useEffect(()=>{c.getSessionAuthTokenPromise()},[]);const p=(M,R)=>{a(I=>{const E=new Map(I);return E.set(M,R),E})};function f(M){return M.size>(W(m.fileMaxSize)||W("1GB"))?{code:"size-files",message:`${L.t("I file non possono superare le dimensioni di")} ${m.fileMaxSize?m.fileMaxSize:"1GB"}`}:K.length>=(m.maxFiles?parseInt(m.maxFiles):m.multiple?100:1)?{code:"too-many-files",message:`${L.t("Puoi caricare massimo ")} ${m.maxFiles||100} ${L.t("file")}`}:M.size<W(m.fileMinSize)?{code:"file-too-small",message:`${L.t("I file devono avare una dimensione superiore a ")} ${m.fileMinSize}`}:null}function j(){if(m.filePattern){const M=m.filePattern.split(",");let R={};return M.map(I=>{const E=nl.getType(I);R[E]=[],R[E].push(I)}),R}else return!0}const v=M=>{let R={};return R.originalName=M.originalName?M.originalName:M.name,R.name=M.name,R.url=M.url,R.data=M.data,R.signature_validation=M.signature_validation,R.mime_type=M.mime_type,R.storage="url",R.size=M.size,R},{getRootProps:D,getInputProps:O,fileRejections:Y,isDragActive:F,open:P}=rl.useDropzone({onDrop:M=>{M.map(R=>{T(R).then(I=>{})})},maxFiles:m.maxFiles?parseInt(m.maxFiles)-K.length:m.multiple?100:1,validator:f,accept:j()}),S=M=>{const R=Fe()+"/api/attachments/"+M.data.id;fetch(R,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(()=>{o(I=>{let E=I.filter($=>$.data.id!==M.data.id);return B(E),E})}).catch(I=>{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(I)})},y=()=>{const M=i&&i.length>0?i:d.dataValue?d.dataValue:null;(M==null?void 0:M.length)>0&&(o(M),setTimeout(()=>{B(M)},100))};q.useEffect(()=>{document.querySelector(".formio-read-only")&&s===!1?(u(!0),setTimeout(()=>{y()},1e3)):(u(!1),setTimeout(()=>{y()},1e3))},[]);async function T(M){let R;const I=Fe()+"/it/upload";let E={mime_type:M.type,name:M.name,original_filename:M.name,protocol_required:m.protocol_required,size:M.size};return await qt.post(I,E,{maxContentLength:1/0,maxBodyLength:1/0}).then(async $=>(R=$.data.id,M.url=Fe()+"/it/allegati/"+R,M.storage="url",M.mime_type=M.type,M.protocol_required=m.protocol_required,M.data={...$.data,baseUrl:Fe()+"/it/allegati/"+R},p(R,M),await qt.put($.data.uri,M,{onUploadProgress:J=>{let ne=Math.round(J.loaded*100/J.total);a(ae=>{const he=new Map(ae),Q=M;return Q.progress=parseInt(ne),he.has(R)&&he.set(R,Q),he})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async J=>{const ne=/\\|"/gi,ae=J.headers.etag.replace(ne,"")||null;return await qt.put(Fe()+"/it/upload/"+R,{file_hash:ae,check_signature:m.check_signature}).then(async he=>{a(ee=>{const me=new Map(ee);return me.delete(R),me});let Q=i||d.dataValue||[],de=null;if(o(ee=>(de=ee.push(v(M))-1,B(ee),ee)),m.check_signature&&he.data.url&&lr)return await qt.post(lr,{url:he.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(ee=>{M.signature_validation=ee.data.sign,Q[de].signature_validation=ee.data.sign}).catch(ee=>{Q[de].signature_validation="File validation error: "+ee});a(ee=>{const me=new Map(ee);return me.delete(R),me})}).catch(he=>{a(Q=>{const de=new Map(Q);return de.delete(R),de}),console.log(he),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(J=>{a(ne=>{const ae=new Map(ne);return ae.delete(R),ae}),console.log(J),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($=>{console.log($),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}),a(J=>{const ne=new Map(J);return ne.delete(R),ne})})}function W(M){if(typeof M=="string"){if(M.search(/kb/i)===M.length-2)return parseFloat(M.substring(0,M.length-2)*1024);if(M.search(/mb/i)===M.length-2)return parseFloat(M.substring(0,M.length-2)*1024*1024);if(M.search(/gb/i)===M.length-2)return parseFloat(M.substring(0,M.length-2)*1024*1024*1024);if(M.search(/b/i)===M.length-1||M.search(/s/i)===M.length-1)return parseFloat(M.substring(0,M.length-1));if(M.search(/m/i)===M.length-1)return parseFloat(M.substring(0,M.length-1)*60);if(M.search(/h/i)===M.length-1)return parseFloat(M.substring(0,M.length-1)*3600)}return M}function C(M,R=2){if(!+M)return"0 Bytes";const I=1024,E=R<0?0:R,$=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],J=Math.floor(Math.log(M)/Math.log(I));return`${parseFloat((M/Math.pow(I,J)).toFixed(E))} ${$[J]}`}return h.jsx(h.Fragment,{children:s?h.jsx("div",{children:h.jsxs("ul",{className:"upload-file-list",children:[K.map((M,R)=>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:")}),M.name,h.jsx("span",{className:"upload-file-weight",children:C(M.size)})]})]},M.size+R)),K.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:[h.jsxs("label",{className:"floating-label",htmlFor:`${m.id}-${m.key}`,children:[m.hideLabel?"":m.label,m.validate.required&&h.jsx("span",{className:"text-danger field-required"})]}),h.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${F?" dragover":""}`,style:{border:"dashed"},...D({onClick:M=>M.stopPropagation()}),children:[h.jsx("input",{id:`${m.id}-${m.key}`,"aria-describedby":`file-uploader-description-${m.id}-${m.key}`,...O()}),h.jsxs("div",{className:`upload-dragdrop${F?" 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-${m.id}-${m.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:P,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),h.jsxs("ul",{className:"upload-file-list my-0",children:[K.map((M,R)=>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:")}),M.name,h.jsx("span",{className:"upload-file-weight",children:C(M.size)})]}),h.jsx(le.Button,{className:"px-1",onClick:()=>S(M),children:h.jsx(le.Icon,{title:`${L.t("Elimina file caricato")} ${M.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},M.size+R)),Array.from(w.entries()).map(([M,R])=>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:")}),R.name,h.jsx("span",{className:"upload-file-weight",children:C(R.size)})]}),h.jsx(le.Progress,{value:R.progress})]},M))]}),!!(Y&&Y.length)&&h.jsx("div",{className:"formio-error-wrapper",children:h.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:Y.map(({file:M,errors:R},I)=>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:")}),M.name,h.jsx("span",{className:"upload-file-weight",children:C(M.size)})]})]}),h.jsx("div",{children:R.map(E=>E.code==="file-invalid-type"?h.jsxs("p",{className:"text-wrap ms-0",children:[L.t("I file possono essere di tipo "),m.filePattern]}):E.code==="too-many-files"?h.jsxs("p",{className:"text-wrap ms-0",children:[L.t("Puoi caricare massimo ")," ",m.maxFiles?m.maxFiles:m.multiple?100:1," ",L.t("file")]}):h.jsx("p",{className:"text-wrap ms-0",children:E.message}))})]},M.size+I))})})]})})},Oa=class Oa extends vn{constructor(i,m,d){super({...i,multiple:i.multiple},m,d)}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"})}attach(i,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Dc,{ref:m,component:this.component,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){i&&(this.updateValue(i),this.shouldSetValue=!0)}getValue(){return super.getValue()}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(Oa,"editForm",Mc);let xa=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(...g){return ot.Components.baseEditForm([{key:"display",components:kc}],...g)}var ya={exports:{}},Oc=ya.exports,_n;function jc(){return _n||(_n=1,(function(g,i){(function(m,d){g.exports=d(q)})(Oc,(function(m){return(function(){var d={680:function(o){o.exports=m},8952:function(o,w,a){var s=a(4328),u=a(36),c=TypeError;o.exports=function(p){if(s(p))return p;throw new c(u(p)+" is not a function")}},2096:function(o,w,a){var s=a(2424),u=String,c=TypeError;o.exports=function(p){if(s(p))return p;throw new c("Can't set "+u(p)+" as a prototype")}},4764:function(o,w,a){var s=a(9764).charAt;o.exports=function(u,c,p){return c+(p?s(u,c).length:1)}},6100:function(o,w,a){var s=a(7e3),u=TypeError;o.exports=function(c,p){if(s(p,c))return c;throw new u("Incorrect invocation")}},3951:function(o,w,a){var s=a(1632),u=String,c=TypeError;o.exports=function(p){if(s(p))return p;throw new c(u(p)+" is not an object")}},2504:function(o,w,a){var s=a(4096),u=a(2495),c=a(3556),p=function(f){return function(j,v,D){var O=s(j),Y=c(O);if(Y===0)return!f&&-1;var F,P=u(D,Y);if(f&&v!=v){for(;Y>P;)if((F=O[P++])!=F)return!0}else for(;Y>P;P++)if((f||P in O)&&O[P]===v)return f||P||0;return!f&&-1}};o.exports={includes:p(!0),indexOf:p(!1)}},3364:function(o,w,a){var s=a(8992),u=a(1664),c=a(5712),p=a(4356),f=a(3556),j=a(2568),v=u([].push),D=function(O){var Y=O===1,F=O===2,P=O===3,S=O===4,y=O===6,T=O===7,W=O===5||y;return function(C,M,R,I){for(var E,$,J=p(C),ne=c(J),ae=f(ne),he=s(M,R),Q=0,de=I||j,ee=Y?de(C,ae):F||T?de(C,0):void 0;ae>Q;Q++)if((W||Q in ne)&&($=he(E=ne[Q],Q,J),O))if(Y)ee[Q]=$;else if($)switch(O){case 3:return!0;case 5:return E;case 6:return Q;case 2:v(ee,E)}else switch(O){case 4:return!1;case 7:v(ee,E)}return y?-1:P||S?S:ee}};o.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(o,w,a){var s=a(9957),u=a(9972),c=a(8504),p=u("species");o.exports=function(f){return c>=51||!s((function(){var j=[];return(j.constructor={})[p]=function(){return{foo:1}},j[f](Boolean).foo!==1}))}},1496:function(o,w,a){var s=a(9957);o.exports=function(u,c){var p=[][u];return!!p&&s((function(){p.call(null,c||function(){return 1},1)}))}},6728:function(o,w,a){var s=a(3476),u=a(1432),c=TypeError,p=Object.getOwnPropertyDescriptor,f=s&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(j){return j instanceof TypeError}})();o.exports=f?function(j,v){if(u(j)&&!p(j,"length").writable)throw new c("Cannot set read only .length");return j.length=v}:function(j,v){return j.length=v}},6736:function(o,w,a){var s=a(1432),u=a(6072),c=a(1632),p=a(9972)("species"),f=Array;o.exports=function(j){var v;return s(j)&&(v=j.constructor,(u(v)&&(v===f||s(v.prototype))||c(v)&&(v=v[p])===null)&&(v=void 0)),v===void 0?f:v}},2568:function(o,w,a){var s=a(6736);o.exports=function(u,c){return new(s(u))(c===0?0:c)}},8696:function(o,w,a){var s=a(3951),u=a(3112);o.exports=function(c,p,f,j){try{return j?p(s(f)[0],f[1]):p(f)}catch(v){u(c,"throw",v)}}},1888:function(o,w,a){var s=a(1664),u=s({}.toString),c=s("".slice);o.exports=function(p){return c(u(p),8,-1)}},4427:function(o,w,a){var s=a(16),u=a(4328),c=a(1888),p=a(9972)("toStringTag"),f=Object,j=c((function(){return arguments})())==="Arguments";o.exports=s?c:function(v){var D,O,Y;return v===void 0?"Undefined":v===null?"Null":typeof(O=(function(F,P){try{return F[P]}catch{}})(D=f(v),p))=="string"?O:j?c(D):(Y=c(D))==="Object"&&u(D.callee)?"Arguments":Y}},9968:function(o,w,a){var s=a(5152),u=a(9252),c=a(9444),p=a(8352);o.exports=function(f,j,v){for(var D=u(j),O=p.f,Y=c.f,F=0;F<D.length;F++){var P=D[F];s(f,P)||v&&s(v,P)||O(f,P,Y(j,P))}}},2272:function(o,w,a){var s=a(9957);o.exports=!s((function(){function u(){}return u.prototype.constructor=null,Object.getPrototypeOf(new u)!==u.prototype}))},3336:function(o){o.exports=function(w,a){return{value:w,done:a}}},3440:function(o,w,a){var s=a(3476),u=a(8352),c=a(9728);o.exports=s?function(p,f,j){return u.f(p,f,c(1,j))}:function(p,f,j){return p[f]=j,p}},9728:function(o){o.exports=function(w,a){return{enumerable:!(1&w),configurable:!(2&w),writable:!(4&w),value:a}}},92:function(o,w,a){var s=a(3476),u=a(8352),c=a(9728);o.exports=function(p,f,j){s?u.f(p,f,c(0,j)):p[f]=j}},2544:function(o,w,a){var s=a(5312),u=a(8352);o.exports=function(c,p,f){return f.get&&s(f.get,p,{getter:!0}),f.set&&s(f.set,p,{setter:!0}),u.f(c,p,f)}},6076:function(o,w,a){var s=a(4328),u=a(8352),c=a(5312),p=a(4636);o.exports=function(f,j,v,D){D||(D={});var O=D.enumerable,Y=D.name!==void 0?D.name:j;if(s(v)&&c(v,Y,D),D.global)O?f[j]=v:p(j,v);else{try{D.unsafe?f[j]&&(O=!0):delete f[j]}catch{}O?f[j]=v:u.f(f,j,{value:v,enumerable:!1,configurable:!D.nonConfigurable,writable:!D.nonWritable})}return f}},4036:function(o,w,a){var s=a(6076);o.exports=function(u,c,p){for(var f in c)s(u,f,c[f],p);return u}},4636:function(o,w,a){var s=a(6420),u=Object.defineProperty;o.exports=function(c,p){try{u(s,c,{value:p,configurable:!0,writable:!0})}catch{s[c]=p}return p}},3476:function(o,w,a){var s=a(9957);o.exports=!s((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(o,w,a){var s=a(6420),u=a(1632),c=s.document,p=u(c)&&u(c.createElement);o.exports=function(f){return p?c.createElement(f):{}}},4316:function(o){var w=TypeError;o.exports=function(a){if(a>9007199254740991)throw w("Maximum allowed index exceeded");return a}},6064:function(o){o.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(o,w,a){var s,u,c=a(6420),p=a(6064),f=c.process,j=c.Deno,v=f&&f.versions||j&&j.version,D=v&&v.v8;D&&(u=(s=D.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!u&&p&&(!(s=p.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=p.match(/Chrome\/(\d+)/))&&(u=+s[1]),o.exports=u},8256:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(o,w,a){var s=a(1664),u=Error,c=s("".replace),p=String(new u("zxcasd").stack),f=/\n\s*at [^:]*:[^\n]*/,j=f.test(p);o.exports=function(v,D){if(j&&typeof v=="string"&&!u.prepareStackTrace)for(;D--;)v=c(v,f,"");return v}},3696:function(o,w,a){var s=a(3440),u=a(6520),c=a(9184),p=Error.captureStackTrace;o.exports=function(f,j,v,D){c&&(p?p(f,j):s(f,"stack",u(v,D)))}},9184:function(o,w,a){var s=a(9957),u=a(9728);o.exports=!s((function(){var c=new Error("a");return!("stack"in c)||(Object.defineProperty(c,"stack",u(1,7)),c.stack!==7)}))},9160:function(o,w,a){var s=a(6420),u=a(9444).f,c=a(3440),p=a(6076),f=a(4636),j=a(9968),v=a(6704);o.exports=function(D,O){var Y,F,P,S,y,T=D.target,W=D.global,C=D.stat;if(Y=W?s:C?s[T]||f(T,{}):s[T]&&s[T].prototype)for(F in O){if(S=O[F],P=D.dontCallGetSet?(y=u(Y,F))&&y.value:Y[F],!v(W?F:T+(C?".":"#")+F,D.forced)&&P!==void 0){if(typeof S==typeof P)continue;j(S,P)}(D.sham||P&&P.sham)&&c(S,"sham",!0),p(Y,F,S,D)}}},9957:function(o){o.exports=function(w){try{return!!w()}catch{return!0}}},7176:function(o,w,a){a(880);var s=a(8448),u=a(6076),c=a(7680),p=a(9957),f=a(9972),j=a(3440),v=f("species"),D=RegExp.prototype;o.exports=function(O,Y,F,P){var S=f(O),y=!p((function(){var M={};return M[S]=function(){return 7},""[O](M)!==7})),T=y&&!p((function(){var M=!1,R=/a/;return O==="split"&&((R={}).constructor={},R.constructor[v]=function(){return R},R.flags="",R[S]=/./[S]),R.exec=function(){return M=!0,null},R[S](""),!M}));if(!y||!T||F){var W=/./[S],C=Y(S,""[O],(function(M,R,I,E,$){var J=R.exec;return J===c||J===D.exec?y&&!$?{done:!0,value:s(W,R,I,E)}:{done:!0,value:s(M,I,R,E)}:{done:!1}}));u(String.prototype,O,C[0]),u(D,S,C[1])}P&&j(D[S],"sham",!0)}},908:function(o,w,a){var s=a(7332),u=Function.prototype,c=u.apply,p=u.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(s?p.bind(c):function(){return p.apply(c,arguments)})},8992:function(o,w,a){var s=a(3180),u=a(8952),c=a(7332),p=s(s.bind);o.exports=function(f,j){return u(f),j===void 0?f:c?p(f,j):function(){return f.apply(j,arguments)}}},7332:function(o,w,a){var s=a(9957);o.exports=!s((function(){var u=(function(){}).bind();return typeof u!="function"||u.hasOwnProperty("prototype")}))},8448:function(o,w,a){var s=a(7332),u=Function.prototype.call;o.exports=s?u.bind(u):function(){return u.apply(u,arguments)}},6208:function(o,w,a){var s=a(3476),u=a(5152),c=Function.prototype,p=s&&Object.getOwnPropertyDescriptor,f=u(c,"name"),j=f&&(function(){}).name==="something",v=f&&(!s||s&&p(c,"name").configurable);o.exports={EXISTS:f,PROPER:j,CONFIGURABLE:v}},5288:function(o,w,a){var s=a(1664),u=a(8952);o.exports=function(c,p,f){try{return s(u(Object.getOwnPropertyDescriptor(c,p)[f]))}catch{}}},3180:function(o,w,a){var s=a(1888),u=a(1664);o.exports=function(c){if(s(c)==="Function")return u(c)}},1664:function(o,w,a){var s=a(7332),u=Function.prototype,c=u.call,p=s&&u.bind.bind(c,c);o.exports=s?p:function(f){return function(){return c.apply(f,arguments)}}},5232:function(o,w,a){var s=a(6420),u=a(4328);o.exports=function(c,p){return arguments.length<2?(f=s[c],u(f)?f:void 0):s[c]&&s[c][p];var f}},6752:function(o){o.exports=function(w){return{iterator:w,next:w.next,done:!1}}},4504:function(o,w,a){var s=a(8952),u=a(9760);o.exports=function(c,p){var f=c[p];return u(f)?void 0:s(f)}},6420:function(o,w,a){var s=function(u){return u&&u.Math===Math&&u};o.exports=s(typeof globalThis=="object"&&globalThis)||s(typeof window=="object"&&window)||s(typeof self=="object"&&self)||s(typeof a.g=="object"&&a.g)||s(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(o,w,a){var s=a(1664),u=a(4356),c=s({}.hasOwnProperty);o.exports=Object.hasOwn||function(p,f){return c(u(p),f)}},2560:function(o){o.exports={}},4168:function(o,w,a){var s=a(5232);o.exports=s("document","documentElement")},9888:function(o,w,a){var s=a(3476),u=a(9957),c=a(8168);o.exports=!s&&!u((function(){return Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(o,w,a){var s=a(1664),u=a(9957),c=a(1888),p=Object,f=s("".split);o.exports=u((function(){return!p("z").propertyIsEnumerable(0)}))?function(j){return c(j)==="String"?f(j,""):p(j)}:p},7512:function(o,w,a){var s=a(4328),u=a(1632),c=a(4024);o.exports=function(p,f,j){var v,D;return c&&s(v=f.constructor)&&v!==j&&u(D=v.prototype)&&D!==j.prototype&&c(p,D),p}},9112:function(o,w,a){var s=a(1664),u=a(4328),c=a(3976),p=s(Function.toString);u(c.inspectSource)||(c.inspectSource=function(f){return p(f)}),o.exports=c.inspectSource},3480:function(o,w,a){var s=a(1632),u=a(3440);o.exports=function(c,p){s(p)&&"cause"in p&&u(c,"cause",p.cause)}},9104:function(o,w,a){var s,u,c,p=a(4288),f=a(6420),j=a(1632),v=a(3440),D=a(5152),O=a(3976),Y=a(6504),F=a(2560),P="Object already initialized",S=f.TypeError,y=f.WeakMap;if(p||O.state){var T=O.state||(O.state=new y);T.get=T.get,T.has=T.has,T.set=T.set,s=function(C,M){if(T.has(C))throw new S(P);return M.facade=C,T.set(C,M),M},u=function(C){return T.get(C)||{}},c=function(C){return T.has(C)}}else{var W=Y("state");F[W]=!0,s=function(C,M){if(D(C,W))throw new S(P);return M.facade=C,v(C,W,M),M},u=function(C){return D(C,W)?C[W]:{}},c=function(C){return D(C,W)}}o.exports={set:s,get:u,has:c,enforce:function(C){return c(C)?u(C):s(C,{})},getterFor:function(C){return function(M){var R;if(!j(M)||(R=u(M)).type!==C)throw new S("Incompatible receiver, "+C+" required");return R}}}},1432:function(o,w,a){var s=a(1888);o.exports=Array.isArray||function(u){return s(u)==="Array"}},4328:function(o){var w=typeof document=="object"&&document.all;o.exports=w===void 0&&w!==void 0?function(a){return typeof a=="function"||a===w}:function(a){return typeof a=="function"}},6072:function(o,w,a){var s=a(1664),u=a(9957),c=a(4328),p=a(4427),f=a(5232),j=a(9112),v=function(){},D=f("Reflect","construct"),O=/^\s*(?:class|function)\b/,Y=s(O.exec),F=!O.test(v),P=function(y){if(!c(y))return!1;try{return D(v,[],y),!0}catch{return!1}},S=function(y){if(!c(y))return!1;switch(p(y)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return F||!!Y(O,j(y))}catch{return!0}};S.sham=!0,o.exports=!D||u((function(){var y;return P(P.call)||!P(Object)||!P((function(){y=!0}))||y}))?S:P},6704:function(o,w,a){var s=a(9957),u=a(4328),c=/#|\.prototype\./,p=function(O,Y){var F=j[f(O)];return F===D||F!==v&&(u(Y)?s(Y):!!Y)},f=p.normalize=function(O){return String(O).replace(c,".").toLowerCase()},j=p.data={},v=p.NATIVE="N",D=p.POLYFILL="P";o.exports=p},9760:function(o){o.exports=function(w){return w==null}},1632:function(o,w,a){var s=a(4328);o.exports=function(u){return typeof u=="object"?u!==null:s(u)}},2424:function(o,w,a){var s=a(1632);o.exports=function(u){return s(u)||u===null}},7048:function(o){o.exports=!1},7728:function(o,w,a){var s=a(5232),u=a(4328),c=a(7e3),p=a(6536),f=Object;o.exports=p?function(j){return typeof j=="symbol"}:function(j){var v=s("Symbol");return u(v)&&c(v.prototype,f(j))}},3112:function(o,w,a){var s=a(8448),u=a(3951),c=a(4504);o.exports=function(p,f,j){var v,D;u(p);try{if(!(v=c(p,"return"))){if(f==="throw")throw j;return j}v=s(v,p)}catch(O){D=!0,v=O}if(f==="throw")throw j;if(D)throw v;return u(v),j}},9724:function(o,w,a){var s=a(8448),u=a(9368),c=a(3440),p=a(4036),f=a(9972),j=a(9104),v=a(4504),D=a(336).IteratorPrototype,O=a(3336),Y=a(3112),F=f("toStringTag"),P="IteratorHelper",S="WrapForValidIterator",y=j.set,T=function(M){var R=j.getterFor(M?S:P);return p(u(D),{next:function(){var I=R(this);if(M)return I.nextHandler();try{var E=I.done?void 0:I.nextHandler();return O(E,I.done)}catch($){throw I.done=!0,$}},return:function(){var I=R(this),E=I.iterator;if(I.done=!0,M){var $=v(E,"return");return $?s($,E):O(void 0,!0)}if(I.inner)try{Y(I.inner.iterator,"normal")}catch(J){return Y(E,"throw",J)}return Y(E,"normal"),O(void 0,!0)}})},W=T(!0),C=T(!1);c(C,F,"Iterator Helper"),o.exports=function(M,R){var I=function(E,$){$?($.iterator=E.iterator,$.next=E.next):$=E,$.type=R?S:P,$.nextHandler=M,$.counter=0,$.done=!1,y(this,$)};return I.prototype=R?W:C,I}},5792:function(o,w,a){var s=a(8448),u=a(8952),c=a(3951),p=a(6752),f=a(9724),j=a(8696),v=f((function(){var D=this.iterator,O=c(s(this.next,D));if(!(this.done=!!O.done))return j(D,this.mapper,[O.value,this.counter++],!0)}));o.exports=function(D){return c(this),u(D),new v(p(this),{mapper:D})}},336:function(o,w,a){var s,u,c,p=a(9957),f=a(4328),j=a(1632),v=a(9368),D=a(7796),O=a(6076),Y=a(9972),F=a(7048),P=Y("iterator"),S=!1;[].keys&&("next"in(c=[].keys())?(u=D(D(c)))!==Object.prototype&&(s=u):S=!0),!j(s)||p((function(){var y={};return s[P].call(y)!==y}))?s={}:F&&(s=v(s)),f(s[P])||O(s,P,(function(){return this})),o.exports={IteratorPrototype:s,BUGGY_SAFARI_ITERATORS:S}},3556:function(o,w,a){var s=a(7584);o.exports=function(u){return s(u.length)}},5312:function(o,w,a){var s=a(1664),u=a(9957),c=a(4328),p=a(5152),f=a(3476),j=a(6208).CONFIGURABLE,v=a(9112),D=a(9104),O=D.enforce,Y=D.get,F=String,P=Object.defineProperty,S=s("".slice),y=s("".replace),T=s([].join),W=f&&!u((function(){return P((function(){}),"length",{value:8}).length!==8})),C=String(String).split("String"),M=o.exports=function(R,I,E){S(F(I),0,7)==="Symbol("&&(I="["+y(F(I),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),E&&E.getter&&(I="get "+I),E&&E.setter&&(I="set "+I),(!p(R,"name")||j&&R.name!==I)&&(f?P(R,"name",{value:I,configurable:!0}):R.name=I),W&&E&&p(E,"arity")&&R.length!==E.arity&&P(R,"length",{value:E.arity});try{E&&p(E,"constructor")&&E.constructor?f&&P(R,"prototype",{writable:!1}):R.prototype&&(R.prototype=void 0)}catch{}var $=O(R);return p($,"source")||($.source=T(C,typeof I=="string"?I:"")),R};Function.prototype.toString=M((function(){return c(this)&&Y(this).source||v(this)}),"toString")},1748:function(o){var w=Math.ceil,a=Math.floor;o.exports=Math.trunc||function(s){var u=+s;return(u>0?a:w)(u)}},8948:function(o,w,a){var s=a(5016);o.exports=function(u,c){return u===void 0?arguments.length<2?"":c:s(u)}},9292:function(o,w,a){var s=a(3476),u=a(1664),c=a(8448),p=a(9957),f=a(1531),j=a(9392),v=a(8912),D=a(4356),O=a(5712),Y=Object.assign,F=Object.defineProperty,P=u([].concat);o.exports=!Y||p((function(){if(s&&Y({b:1},Y(F({},"a",{enumerable:!0,get:function(){F(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var S={},y={},T=Symbol("assign detection"),W="abcdefghijklmnopqrst";return S[T]=7,W.split("").forEach((function(C){y[C]=C})),Y({},S)[T]!==7||f(Y({},y)).join("")!==W}))?function(S,y){for(var T=D(S),W=arguments.length,C=1,M=j.f,R=v.f;W>C;)for(var I,E=O(arguments[C++]),$=M?P(f(E),M(E)):f(E),J=$.length,ne=0;J>ne;)I=$[ne++],s&&!c(R,E,I)||(T[I]=E[I]);return T}:Y},9368:function(o,w,a){var s,u=a(3951),c=a(2056),p=a(8256),f=a(2560),j=a(4168),v=a(8168),D=a(6504),O="prototype",Y="script",F=D("IE_PROTO"),P=function(){},S=function(W){return"<"+Y+">"+W+"</"+Y+">"},y=function(W){W.write(S("")),W.close();var C=W.parentWindow.Object;return W=null,C},T=function(){try{s=new ActiveXObject("htmlfile")}catch{}var W,C,M;T=typeof document<"u"?document.domain&&s?y(s):(C=v("iframe"),M="java"+Y+":",C.style.display="none",j.appendChild(C),C.src=String(M),(W=C.contentWindow.document).open(),W.write(S("document.F=Object")),W.close(),W.F):y(s);for(var R=p.length;R--;)delete T[O][p[R]];return T()};f[F]=!0,o.exports=Object.create||function(W,C){var M;return W!==null?(P[O]=u(W),M=new P,P[O]=null,M[F]=W):M=T(),C===void 0?M:c.f(M,C)}},2056:function(o,w,a){var s=a(3476),u=a(1576),c=a(8352),p=a(3951),f=a(4096),j=a(1531);w.f=s&&!u?Object.defineProperties:function(v,D){p(v);for(var O,Y=f(D),F=j(D),P=F.length,S=0;P>S;)c.f(v,O=F[S++],Y[O]);return v}},8352:function(o,w,a){var s=a(3476),u=a(9888),c=a(1576),p=a(3951),f=a(88),j=TypeError,v=Object.defineProperty,D=Object.getOwnPropertyDescriptor,O="enumerable",Y="configurable",F="writable";w.f=s?c?function(P,S,y){if(p(P),S=f(S),p(y),typeof P=="function"&&S==="prototype"&&"value"in y&&F in y&&!y[F]){var T=D(P,S);T&&T[F]&&(P[S]=y.value,y={configurable:Y in y?y[Y]:T[Y],enumerable:O in y?y[O]:T[O],writable:!1})}return v(P,S,y)}:v:function(P,S,y){if(p(P),S=f(S),p(y),u)try{return v(P,S,y)}catch{}if("get"in y||"set"in y)throw new j("Accessors not supported");return"value"in y&&(P[S]=y.value),P}},9444:function(o,w,a){var s=a(3476),u=a(8448),c=a(8912),p=a(9728),f=a(4096),j=a(88),v=a(5152),D=a(9888),O=Object.getOwnPropertyDescriptor;w.f=s?O:function(Y,F){if(Y=f(Y),F=j(F),D)try{return O(Y,F)}catch{}if(v(Y,F))return p(!u(c.f,Y,F),Y[F])}},5048:function(o,w,a){var s=a(9008),u=a(8256).concat("length","prototype");w.f=Object.getOwnPropertyNames||function(c){return s(c,u)}},9392:function(o,w){w.f=Object.getOwnPropertySymbols},7796:function(o,w,a){var s=a(5152),u=a(4328),c=a(4356),p=a(6504),f=a(2272),j=p("IE_PROTO"),v=Object,D=v.prototype;o.exports=f?v.getPrototypeOf:function(O){var Y=c(O);if(s(Y,j))return Y[j];var F=Y.constructor;return u(F)&&Y instanceof F?F.prototype:Y instanceof v?D:null}},7e3:function(o,w,a){var s=a(1664);o.exports=s({}.isPrototypeOf)},9008:function(o,w,a){var s=a(1664),u=a(5152),c=a(4096),p=a(2504).indexOf,f=a(2560),j=s([].push);o.exports=function(v,D){var O,Y=c(v),F=0,P=[];for(O in Y)!u(f,O)&&u(Y,O)&&j(P,O);for(;D.length>F;)u(Y,O=D[F++])&&(~p(P,O)||j(P,O));return P}},1531:function(o,w,a){var s=a(9008),u=a(8256);o.exports=Object.keys||function(c){return s(c,u)}},8912:function(o,w){var a={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,u=s&&!a.call({1:2},1);w.f=u?function(c){var p=s(this,c);return!!p&&p.enumerable}:a},4024:function(o,w,a){var s=a(5288),u=a(3951),c=a(2096);o.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,f=!1,j={};try{(p=s(Object.prototype,"__proto__","set"))(j,[]),f=j instanceof Array}catch{}return function(v,D){return u(v),c(D),f?p(v,D):v.__proto__=D,v}})():void 0)},7032:function(o,w,a){var s=a(16),u=a(4427);o.exports=s?{}.toString:function(){return"[object "+u(this)+"]"}},2104:function(o,w,a){var s=a(8448),u=a(4328),c=a(1632),p=TypeError;o.exports=function(f,j){var v,D;if(j==="string"&&u(v=f.toString)&&!c(D=s(v,f))||u(v=f.valueOf)&&!c(D=s(v,f))||j!=="string"&&u(v=f.toString)&&!c(D=s(v,f)))return D;throw new p("Can't convert object to primitive value")}},9252:function(o,w,a){var s=a(5232),u=a(1664),c=a(5048),p=a(9392),f=a(3951),j=u([].concat);o.exports=s("Reflect","ownKeys")||function(v){var D=c.f(f(v)),O=p.f;return O?j(D,O(v)):D}},584:function(o,w,a){var s=a(8352).f;o.exports=function(u,c,p){p in u||s(u,p,{configurable:!0,get:function(){return c[p]},set:function(f){c[p]=f}})}},9092:function(o,w,a){var s=a(8448),u=a(3951),c=a(4328),p=a(1888),f=a(7680),j=TypeError;o.exports=function(v,D){var O=v.exec;if(c(O)){var Y=s(O,v,D);return Y!==null&&u(Y),Y}if(p(v)==="RegExp")return s(f,v,D);throw new j("RegExp#exec called on incompatible receiver")}},7680:function(o,w,a){var s,u,c=a(8448),p=a(1664),f=a(5016),j=a(8872),v=a(3548),D=a(4696),O=a(9368),Y=a(9104).get,F=a(8e3),P=a(9124),S=D("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,T=y,W=p("".charAt),C=p("".indexOf),M=p("".replace),R=p("".slice),I=(u=/b*/g,c(y,s=/a/,"a"),c(y,u,"a"),s.lastIndex!==0||u.lastIndex!==0),E=v.BROKEN_CARET,$=/()??/.exec("")[1]!==void 0;(I||$||E||F||P)&&(T=function(J){var ne,ae,he,Q,de,ee,me,ue=this,Z=Y(ue),ve=f(J),Ne=Z.raw;if(Ne)return Ne.lastIndex=ue.lastIndex,ne=c(T,Ne,ve),ue.lastIndex=Ne.lastIndex,ne;var _e=Z.groups,Ce=E&&ue.sticky,Re=c(j,ue),ze=ue.source,N=0,_=ve;if(Ce&&(Re=M(Re,"y",""),C(Re,"g")===-1&&(Re+="g"),_=R(ve,ue.lastIndex),ue.lastIndex>0&&(!ue.multiline||ue.multiline&&W(ve,ue.lastIndex-1)!==`
|
|
105
|
-
`)&&(ze="(?: "+ze+")",_=" "+_,
|
|
106
|
-
`)&&c.flags==="s")}))},9124:function(o,w,a){var s=a(9957),u=a(6420).RegExp;o.exports=s((function(){var c=u("(?<a>b)","g");return c.exec("b").groups.a!=="b"||"b".replace(c,"$<a>c")!=="bc"}))},5436:function(o,w,a){var s=a(9760),u=TypeError;o.exports=function(c){if(s(c))throw new u("Can't call method on "+c);return c}},6504:function(o,w,a){var s=a(4696),u=a(7776),c=s("keys");o.exports=function(p){return c[p]||(c[p]=u(p))}},3976:function(o,w,a){var s=a(7048),u=a(6420),c=a(4636),p="__core-js_shared__",f=o.exports=u[p]||c(p,{});(f.versions||(f.versions=[])).push({version:"3.36.0",mode:s?"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,w,a){var s=a(3976);o.exports=function(u,c){return s[u]||(s[u]=c||{})}},9764:function(o,w,a){var s=a(1664),u=a(6180),c=a(5016),p=a(5436),f=s("".charAt),j=s("".charCodeAt),v=s("".slice),D=function(O){return function(Y,F){var P,S,y=c(p(Y)),T=u(F),W=y.length;return T<0||T>=W?O?"":void 0:(P=j(y,T))<55296||P>56319||T+1===W||(S=j(y,T+1))<56320||S>57343?O?f(y,T):P:O?v(y,T,T+2):S-56320+(P-55296<<10)+65536}};o.exports={codeAt:D(!1),charAt:D(!0)}},772:function(o,w,a){var s=a(8504),u=a(9957),c=a(6420).String;o.exports=!!Object.getOwnPropertySymbols&&!u((function(){var p=Symbol("symbol detection");return!c(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},2495:function(o,w,a){var s=a(6180),u=Math.max,c=Math.min;o.exports=function(p,f){var j=s(p);return j<0?u(j+f,0):c(j,f)}},4096:function(o,w,a){var s=a(5712),u=a(5436);o.exports=function(c){return s(u(c))}},6180:function(o,w,a){var s=a(1748);o.exports=function(u){var c=+u;return c!=c||c===0?0:s(c)}},7584:function(o,w,a){var s=a(6180),u=Math.min;o.exports=function(c){var p=s(c);return p>0?u(p,9007199254740991):0}},4356:function(o,w,a){var s=a(5436),u=Object;o.exports=function(c){return u(s(c))}},7024:function(o,w,a){var s=a(8448),u=a(1632),c=a(7728),p=a(4504),f=a(2104),j=a(9972),v=TypeError,D=j("toPrimitive");o.exports=function(O,Y){if(!u(O)||c(O))return O;var F,P=p(O,D);if(P){if(Y===void 0&&(Y="default"),F=s(P,O,Y),!u(F)||c(F))return F;throw new v("Can't convert object to primitive value")}return Y===void 0&&(Y="number"),f(O,Y)}},88:function(o,w,a){var s=a(7024),u=a(7728);o.exports=function(c){var p=s(c,"string");return u(p)?p:p+""}},16:function(o,w,a){var s={};s[a(9972)("toStringTag")]="z",o.exports=String(s)==="[object z]"},5016:function(o,w,a){var s=a(4427),u=String;o.exports=function(c){if(s(c)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return u(c)}},36:function(o){var w=String;o.exports=function(a){try{return w(a)}catch{return"Object"}}},7776:function(o,w,a){var s=a(1664),u=0,c=Math.random(),p=s(1 .toString);o.exports=function(f){return"Symbol("+(f===void 0?"":f)+")_"+p(++u+c,36)}},6536:function(o,w,a){var s=a(772);o.exports=s&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(o,w,a){var s=a(3476),u=a(9957);o.exports=s&&u((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(o,w,a){var s=a(6420),u=a(4328),c=s.WeakMap;o.exports=u(c)&&/native code/.test(String(c))},9972:function(o,w,a){var s=a(6420),u=a(4696),c=a(5152),p=a(7776),f=a(772),j=a(6536),v=s.Symbol,D=u("wks"),O=j?v.for||v:v&&v.withoutSetter||p;o.exports=function(Y){return c(D,Y)||(D[Y]=f&&c(v,Y)?v[Y]:O("Symbol."+Y)),D[Y]}},6488:function(o,w,a){var s=a(5232),u=a(5152),c=a(3440),p=a(7e3),f=a(4024),j=a(9968),v=a(584),D=a(7512),O=a(8948),Y=a(3480),F=a(3696),P=a(3476),S=a(7048);o.exports=function(y,T,W,C){var M="stackTraceLimit",R=C?2:1,I=y.split("."),E=I[I.length-1],$=s.apply(null,I);if($){var J=$.prototype;if(!S&&u(J,"cause")&&delete J.cause,!W)return $;var ne=s("Error"),ae=T((function(he,Q){var de=O(C?Q:he,void 0),ee=C?new $(he):new $;return de!==void 0&&c(ee,"message",de),F(ee,ae,ee.stack,2),this&&p(J,this)&&D(ee,this,ae),arguments.length>R&&Y(ee,arguments[R]),ee}));if(ae.prototype=J,E!=="Error"?f?f(ae,ne):j(ae,ne,{name:!0}):P&&M in $&&(v(ae,$,M),v(ae,$,"prepareStackTrace")),j(ae,$),!S)try{J.name!==E&&c(J,"name",E),J.constructor=ae}catch{}return ae}}},7476:function(o,w,a){var s=a(9160),u=a(9957),c=a(1432),p=a(1632),f=a(4356),j=a(3556),v=a(4316),D=a(92),O=a(2568),Y=a(953),F=a(9972),P=a(8504),S=F("isConcatSpreadable"),y=P>=51||!u((function(){var W=[];return W[S]=!1,W.concat()[0]!==W})),T=function(W){if(!p(W))return!1;var C=W[S];return C!==void 0?!!C:c(W)};s({target:"Array",proto:!0,arity:1,forced:!y||!Y("concat")},{concat:function(W){var C,M,R,I,E,$=f(this),J=O($,0),ne=0;for(C=-1,R=arguments.length;C<R;C++)if(T(E=C===-1?$:arguments[C]))for(I=j(E),v(ne+I),M=0;M<I;M++,ne++)M in E&&D(J,ne,E[M]);else v(ne+1),D(J,ne++,E);return J.length=ne,J}})},6932:function(o,w,a){var s=a(9160),u=a(3364).filter;s({target:"Array",proto:!0,forced:!a(953)("filter")},{filter:function(c){return u(this,c,arguments.length>1?arguments[1]:void 0)}})},700:function(o,w,a){var s=a(9160),u=a(1664),c=a(5712),p=a(4096),f=a(1496),j=u([].join);s({target:"Array",proto:!0,forced:c!==Object||!f("join",",")},{join:function(v){return j(p(this),v===void 0?",":v)}})},4456:function(o,w,a){var s=a(9160),u=a(3364).map;s({target:"Array",proto:!0,forced:!a(953)("map")},{map:function(c){return u(this,c,arguments.length>1?arguments[1]:void 0)}})},4728:function(o,w,a){var s=a(9160),u=a(4356),c=a(3556),p=a(6728),f=a(4316);s({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(j){return j instanceof TypeError}})()},{push:function(j){var v=u(this),D=c(v),O=arguments.length;f(D+O);for(var Y=0;Y<O;Y++)v[D]=arguments[Y],D++;return p(v,D),D}})},8752:function(o,w,a){var s=a(9160),u=a(6420),c=a(908),p=a(6488),f="WebAssembly",j=u[f],v=new Error("e",{cause:7}).cause!==7,D=function(Y,F){var P={};P[Y]=p(Y,F,v),s({global:!0,constructor:!0,arity:1,forced:v},P)},O=function(Y,F){if(j&&j[Y]){var P={};P[Y]=p(f+"."+Y,F,v),s({target:f,stat:!0,constructor:!0,arity:1,forced:v},P)}};D("Error",(function(Y){return function(F){return c(Y,this,arguments)}})),D("EvalError",(function(Y){return function(F){return c(Y,this,arguments)}})),D("RangeError",(function(Y){return function(F){return c(Y,this,arguments)}})),D("ReferenceError",(function(Y){return function(F){return c(Y,this,arguments)}})),D("SyntaxError",(function(Y){return function(F){return c(Y,this,arguments)}})),D("TypeError",(function(Y){return function(F){return c(Y,this,arguments)}})),D("URIError",(function(Y){return function(F){return c(Y,this,arguments)}})),O("CompileError",(function(Y){return function(F){return c(Y,this,arguments)}})),O("LinkError",(function(Y){return function(F){return c(Y,this,arguments)}})),O("RuntimeError",(function(Y){return function(F){return c(Y,this,arguments)}}))},508:function(o,w,a){var s=a(3476),u=a(6208).EXISTS,c=a(1664),p=a(2544),f=Function.prototype,j=c(f.toString),v=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,D=c(v.exec);s&&!u&&p(f,"name",{configurable:!0,get:function(){try{return D(v,j(this))[1]}catch{return""}}})},232:function(o,w,a){var s=a(9160),u=a(9292);s({target:"Object",stat:!0,arity:2,forced:Object.assign!==u},{assign:u})},5443:function(o,w,a){var s=a(16),u=a(6076),c=a(7032);s||u(Object.prototype,"toString",c,{unsafe:!0})},880:function(o,w,a){var s=a(9160),u=a(7680);s({target:"RegExp",proto:!0,forced:/./.exec!==u},{exec:u})},9836:function(o,w,a){var s=a(8448),u=a(7176),c=a(3951),p=a(9760),f=a(7584),j=a(5016),v=a(5436),D=a(4504),O=a(4764),Y=a(9092);u("match",(function(F,P,S){return[function(y){var T=v(this),W=p(y)?void 0:D(y,F);return W?s(W,y,T):new RegExp(y)[F](j(T))},function(y){var T=c(this),W=j(y),C=S(P,T,W);if(C.done)return C.value;if(!T.global)return Y(T,W);var M=T.unicode;T.lastIndex=0;for(var R,I=[],E=0;(R=Y(T,W))!==null;){var $=j(R[0]);I[E]=$,$===""&&(T.lastIndex=O(W,f(T.lastIndex),M)),E++}return E===0?null:I}]}))},3536:function(o,w,a){var s=a(9160),u=a(6420),c=a(6100),p=a(3951),f=a(4328),j=a(7796),v=a(2544),D=a(92),O=a(9957),Y=a(5152),F=a(9972),P=a(336).IteratorPrototype,S=a(3476),y=a(7048),T="constructor",W="Iterator",C=F("toStringTag"),M=TypeError,R=u[W],I=y||!f(R)||R.prototype!==P||!O((function(){R({})})),E=function(){if(c(this,P),j(this)===P)throw new M("Abstract class Iterator not directly constructable")},$=function(J,ne){S?v(P,J,{configurable:!0,get:function(){return ne},set:function(ae){if(p(this),this===P)throw new M("You can't redefine this property");Y(this,J)?this[J]=ae:D(this,J,ae)}}):P[J]=ne};Y(P,C)||$(C,W),!I&&Y(P,T)&&P[T]!==Object||$(T,E),E.prototype=P,s({global:!0,constructor:!0,forced:I},{Iterator:E})},2144:function(o,w,a){var s=a(9160),u=a(8448),c=a(8952),p=a(3951),f=a(6752),j=a(9724),v=a(8696),D=a(7048),O=j((function(){for(var Y,F,P=this.iterator,S=this.predicate,y=this.next;;){if(Y=p(u(y,P)),this.done=!!Y.done)return;if(F=Y.value,v(P,S,[F,this.counter++],!0))return F}}));s({target:"Iterator",proto:!0,real:!0,forced:D},{filter:function(Y){return p(this),c(Y),new O(f(this),{predicate:Y})}})},9080:function(o,w,a){var s=a(9160),u=a(5792);s({target:"Iterator",proto:!0,real:!0,forced:a(7048)},{map:u})}},B={};function L(o){var w=B[o];if(w!==void 0)return w.exports;var a=B[o]={exports:{}};return d[o].call(a.exports,a,a.exports,L),a.exports}L.d=function(o,w){for(var a in w)L.o(w,a)&&!L.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:w[a]})},L.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),L.o=function(o,w){return Object.prototype.hasOwnProperty.call(o,w)},L.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var K={};return(function(){L.r(K),L.d(K,{default:function(){return v}}),L(8752),L(6932),L(700),L(4456),L(4728),L(508),L(232),L(5443),L(880),L(9836),L(3536),L(2144),L(9080);var o=L(680);L(7476);function w(D,O){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Y,F){return Y.__proto__=F,Y},w(D,O)}var a=(function(D){var O,Y;function F(){for(var S,y=arguments.length,T=new Array(y),W=0;W<y;W++)T[W]=arguments[W];return(S=D.call.apply(D,[this].concat(T))||this).state={bump:!1,debounced:!1},S}Y=D,(O=F).prototype=Object.create(Y.prototype),O.prototype.constructor=O,w(O,Y);var P=F.prototype;return P.componentWillMount=function(){var S,y,T,W=this;this.debounceStatusUpdate=(S=function(){if(!W.state.debounced){var C=!W.props.isInFocus||W.props.validChoiceMade;W.setState((function(M){return{bump:!M.bump,debounced:!0,silenced:C}}))}},y=1400,function(){var C=this,M=arguments;clearTimeout(T),T=setTimeout((function(){T=null,S.apply(C,M)}),y)})},P.componentWillReceiveProps=function(S){S.queryLength,this.setState({debounced:!1})},P.render=function(){var S=this.props,y=S.id,T=S.length,W=S.queryLength,C=S.minQueryLength,M=S.selectedOption,R=S.selectedOptionIndex,I=S.tQueryTooShort,E=S.tNoResults,$=S.tSelectedOption,J=S.tResults,ne=S.className,ae=this.state,he=ae.bump,Q=ae.debounced,de=ae.silenced,ee=W<C,me=T===0,ue=M?$(M,T,R):"",Z=null;return Z=ee?I(C):me?E():J(T,ue),this.debounceStatusUpdate(),(0,o.createElement)("div",{className:ne,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:y+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!de&&Q&&he?Z:""),(0,o.createElement)("div",{id:y+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},de||!Q||he?"":Z))},F})(o.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,Y){return D+" "+(Y+1)+" of "+O+" is highlighted"},tResults:function(D,O){return D+" "+(D===1?"result":"results")+" "+(D===1?"is":"are")+" available. "+O}};var s=function(D){var O=D.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:O,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 u(){return u=Object.assign?Object.assign.bind():function(D){for(var O=1;O<arguments.length;O++){var Y=arguments[O];for(var F in Y)Object.prototype.hasOwnProperty.call(Y,F)&&(D[F]=Y[F])}return D},u.apply(this,arguments)}function c(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(Y,F){return Y.__proto__=F,Y},p(D,O)}var f={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function j(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var v=(function(D){var O,Y;function F(S){var y;return(y=D.call(this,S)||this).elementReferences={},y.state={focused:null,hovered:null,menuOpen:!1,options:S.defaultValue?[S.defaultValue]:[],query:S.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},y.handleComponentBlur=y.handleComponentBlur.bind(c(y)),y.handleKeyDown=y.handleKeyDown.bind(c(y)),y.handleUpArrow=y.handleUpArrow.bind(c(y)),y.handleDownArrow=y.handleDownArrow.bind(c(y)),y.handleEnter=y.handleEnter.bind(c(y)),y.handlePrintableKey=y.handlePrintableKey.bind(c(y)),y.handleListMouseLeave=y.handleListMouseLeave.bind(c(y)),y.handleOptionBlur=y.handleOptionBlur.bind(c(y)),y.handleOptionClick=y.handleOptionClick.bind(c(y)),y.handleOptionFocus=y.handleOptionFocus.bind(c(y)),y.handleOptionMouseDown=y.handleOptionMouseDown.bind(c(y)),y.handleOptionMouseEnter=y.handleOptionMouseEnter.bind(c(y)),y.handleInputBlur=y.handleInputBlur.bind(c(y)),y.handleInputChange=y.handleInputChange.bind(c(y)),y.handleInputClick=y.handleInputClick.bind(c(y)),y.handleInputFocus=y.handleInputFocus.bind(c(y)),y.pollInputElement=y.pollInputElement.bind(c(y)),y.getDirectInputChanges=y.getDirectInputChanges.bind(c(y)),y}Y=D,(O=F).prototype=Object.create(Y.prototype),O.prototype.constructor=O,p(O,Y);var P=F.prototype;return P.isQueryAnOption=function(S,y){var T=this;return y.map((function(W){return T.templateInputValue(W).toLowerCase()})).indexOf(S.toLowerCase())!==-1},P.componentDidMount=function(){this.pollInputElement()},P.componentWillUnmount=function(){clearTimeout(this.$pollInput)},P.pollInputElement=function(){var S=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){S.pollInputElement()}),100)},P.getDirectInputChanges=function(){var S=this.elementReferences[-1];S&&S.value!==this.state.query&&this.handleInputChange({target:{value:S.value}})},P.componentDidUpdate=function(S,y){var T=this.state.focused,W=T===null,C=y.focused!==T;C&&!W&&this.elementReferences[T].focus();var M=T===-1,R=C&&y.focused===null;if(M&&R){var I=this.elementReferences[T];I.setSelectionRange(0,I.value.length)}},P.hasAutoselect=function(){return!j()&&this.props.autoselect},P.templateInputValue=function(S){var y=this.props.templates&&this.props.templates.inputValue;return y?y(S):S},P.templateSuggestion=function(S){var y=this.props.templates&&this.props.templates.suggestion;return y?y(S):S},P.handleComponentBlur=function(S){var y,T=this.state,W=T.options,C=T.query,M=T.selected;this.props.confirmOnBlur?(y=S.query||C,this.props.onConfirm(W[M])):y=C,this.setState({focused:null,menuOpen:S.menuOpen||!1,query:y,selected:null,validChoiceMade:this.isQueryAnOption(y,W)})},P.handleListMouseLeave=function(S){this.setState({hovered:null})},P.handleOptionBlur=function(S,y){var T=this.state,W=T.focused,C=T.menuOpen,M=T.options,R=T.selected,I=S.relatedTarget===null,E=S.relatedTarget===this.elementReferences[-1],$=W!==y&&W!==-1;if(!$&&I||!($||E)){var J=C&&j();this.handleComponentBlur({menuOpen:J,query:this.templateInputValue(M[R])})}},P.handleInputBlur=function(S){var y=this.state,T=y.focused,W=y.menuOpen,C=y.options,M=y.query,R=y.selected;if(T===-1){var I=W&&j(),E=j()?M:this.templateInputValue(C[R]);this.handleComponentBlur({menuOpen:I,query:E})}},P.handleInputChange=function(S){var y=this,T=this.props,W=T.minLength,C=T.source,M=T.showAllValues,R=this.hasAutoselect(),I=S.target.value,E=I.length===0,$=this.state.query!==I,J=I.length>=W;this.setState({query:I,ariaHint:E}),M||!E&&$&&J?C(I,(function(ne){var ae=ne.length>0;y.setState({menuOpen:ae,options:ne,selected:R&&ae?0:-1,validChoiceMade:!1})})):!E&&J||this.setState({menuOpen:!1,options:[]})},P.handleInputClick=function(S){this.handleInputChange(S)},P.handleInputFocus=function(S){var y=this.state,T=y.query,W=y.validChoiceMade,C=y.options,M=this.props.minLength,R=!W&&T.length>=M&&C.length>0;R?this.setState((function(I){var E=I.menuOpen;return{focused:-1,menuOpen:R||E,selected:-1}})):this.setState({focused:-1})},P.handleOptionFocus=function(S){this.setState({focused:S,hovered:null,selected:S})},P.handleOptionMouseEnter=function(S,y){j()||this.setState({hovered:y})},P.handleOptionClick=function(S,y){var T=this.state.options[y],W=this.templateInputValue(T);this.props.onConfirm(T),this.setState({focused:-1,hovered:null,menuOpen:!1,query:W,selected:-1,validChoiceMade:!0}),this.forceUpdate()},P.handleOptionMouseDown=function(S){S.preventDefault()},P.handleUpArrow=function(S){S.preventDefault();var y=this.state,T=y.menuOpen,W=y.selected;W!==-1&&T&&this.handleOptionFocus(W-1)},P.handleDownArrow=function(S){var y=this;if(S.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)S.preventDefault(),this.props.source("",(function(R){y.setState({menuOpen:!0,options:R,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var T=this.state,W=T.menuOpen,C=T.options,M=T.selected;M!==C.length-1&&W&&this.handleOptionFocus(M+1)}},P.handleSpace=function(S){var y=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(S.preventDefault(),this.props.source("",(function(T){y.setState({menuOpen:!0,options:T})}))),this.state.focused!==-1&&(S.preventDefault(),this.handleOptionClick(S,this.state.focused))},P.handleEnter=function(S){this.state.menuOpen&&(S.preventDefault(),this.state.selected>=0&&this.handleOptionClick(S,this.state.selected))},P.handlePrintableKey=function(S){var y=this.elementReferences[-1];S.target===y||y.focus()},P.handleKeyDown=function(S){switch(f[S.keyCode]){case"up":this.handleUpArrow(S);break;case"down":this.handleDownArrow(S);break;case"space":this.handleSpace(S);break;case"enter":this.handleEnter(S);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((y=S.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(S)}var y},P.render=function(){var S,y=this,T=this.props,W=T.cssNamespace,C=T.displayMenu,M=T.id,R=T.minLength,I=T.name,E=T.placeholder,$=T.required,J=T.showAllValues,ne=T.tNoResults,ae=T.tStatusQueryTooShort,he=T.tStatusNoResults,Q=T.tStatusSelectedOption,de=T.tStatusResults,ee=T.tAssistiveHint,me=T.dropdownArrow,ue=T.menuAttributes,Z=T.inputClasses,ve=T.hintClasses,Ne=T.menuClasses,_e=this.state,Ce=_e.focused,Re=_e.hovered,ze=_e.menuOpen,N=_e.options,_=_e.query,H=_e.selected,k=_e.ariaHint,A=_e.validChoiceMade,z=this.hasAutoselect(),te=Ce===-1,se=N.length===0,be=_.length!==0,ce=_.length>=R,pe=this.props.showNoOptionsFound&&te&&se&&be&&ce,xe=W+"__wrapper",Ae=W+"__status",$e=W+"__dropdown-arrow-down",Ie=Ce!==-1&&Ce!==null,Ge=W+"__option",Qe=W+"__hint",ye=this.templateInputValue(N[H]),we=ye&&ye.toLowerCase().indexOf(_.toLowerCase())===0&&z?_+ye.substr(_.length):"",Ze=M+"__assistiveHint",tt={"aria-describedby":k?Ze:null,"aria-expanded":ze?"true":"false","aria-activedescendant":Ie?M+"__option--"+Ce:null,"aria-controls":M+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};J&&typeof(S=me({className:$e}))=="string"&&(S=(0,o.createElement)("div",{className:W+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:S}}));var ht=W+"__input",vt=[ht,this.props.showAllValues?ht+"--show-all-values":ht+"--default"];Ce!==null&&vt.push(ht+"--focused"),Z&&vt.push(Z);var pt=W+"__menu",lt=[pt,pt+"--"+C,pt+"--"+(ze||pe?"visible":"hidden")];Ne&<.push(Ne),(ue!=null&&ue.class||ue!=null&&ue.className)&<.push((ue==null?void 0:ue.class)||(ue==null?void 0:ue.className));var _t=Object.assign({"aria-labelledby":M},ue,{id:M+"__listbox",role:"listbox",className:lt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete _t.class,(0,o.createElement)("div",{className:xe,onKeyDown:this.handleKeyDown},(0,o.createElement)(a,{id:M,length:N.length,queryLength:_.length,minQueryLength:R,selectedOption:this.templateInputValue(N[H]),selectedOptionIndex:H,validChoiceMade:A,isInFocus:this.state.focused!==null,tQueryTooShort:ae,tNoResults:he,tSelectedOption:Q,tResults:de,className:Ae}),we&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:[Qe,ve===null?Z:ve].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:we})),(0,o.createElement)("input",u({},tt,{autoComplete:"off",className:vt.join(" "),id:M,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:I,placeholder:E,ref:function(bt){y.elementReferences[-1]=bt},type:"text",role:"combobox",required:$,value:_})),S,(0,o.createElement)("ul",_t,N.map((function(bt,Ue){var gt=(Ce===-1?H===Ue:Ce===Ue)&&Re===null?" "+Ge+"--focused":"",ft=Ue%2?" "+Ge+"--odd":"",ut=j()?"<span id="+M+"__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 "+N.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Ce===Ue?"true":"false",className:""+Ge+gt+ft,dangerouslySetInnerHTML:{__html:y.templateSuggestion(bt)+ut},id:M+"__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":N.length})})),pe&&(0,o.createElement)("li",{className:Ge+" "+Ge+"--no-results",role:"option","aria-disabled":"true"},ne())),(0,o.createElement)("span",{id:Ze,style:{display:"none"}},ee()))},F})(o.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:s,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),K})()}))})(ya)),ya.exports}var rr,bn;function Tc(){return bn||(bn=1,rr=jc()),rr}var Cc=Tc();const Nc=ol(Cc),Pc=({value:g,defaultValue:i="",onConfirm:m,source:d,disabled:B,onClear:L,tClearInput:K=()=>"Clear input",...o})=>{const w=q.useRef(null),a=p=>{setTimeout(()=>{w.current&&(w.current.elementReferences[-1].value=p)},0)};q.useEffect(()=>{g!==void 0&&a(g)},[g]),q.useEffect(()=>{B?w.current&&(w.current.elementReferences[-1].disabled=!0):w.current&&(w.current.elementReferences[-1].disabled=!1)},[B]);const s=()=>{L&&L()},u=(p,f)=>{w.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&d(p,f)},c=p=>{p?m(p):a(g)};return h.jsxs("div",{style:{position:"relative",width:"100%"},children:[h.jsx(Nc,{ref:w,...o,defaultValue:i,onConfirm:c,source:u}),!!(g&&g.length>0&&!B)&&h.jsx("button",{onClick:s,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":K(),children:h.jsx(le.Icon,{icon:"it-close",size:"sm",title:K()})})]})},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:g,areasLayer:i,bounds:m,onMarkedMoved:d})=>{const B=q.useRef(null);let L=null;const[K,o]=q.useState([]),w=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],s=()=>{const u=Rt.map(B.current,{keyboard:!1,minZoom:6,maxZoom:17}).setView(a,10);w.addTo(u),i&&i.map(p=>{p.addTo(u)});const c=g?[`${g.lat}`,`${g.lon}`]:m?m.getCenter():a;if(delete Rt.Icon.Default.prototype._getIconUrl,Rt.Icon.Default.mergeOptions({iconRetinaUrl:Ec,iconUrl:Ac,shadowUrl:Rc}),L=Rt.marker(c,{draggable:!0}).addTo(u),L.on("moveend",function(p){const f=p.target.getLatLng();d(f,L)}),!g&&m)u.fitBounds(m);else{const p=g?[g.lat,g.lon]:a;L&&(L.setLatLng(p).update(),u.setView(p,15))}};return q.useEffect(()=>{B.current&&s()},[B]),h.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:h.jsx("div",{ref:B,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},Fc=({component:g,value:i,current:m,onChange:d,i18next:B})=>{const[L,K]=q.useState(null),[o,w]=q.useState([]),[a,s]=q.useState(),[u,c]=q.useState(),[p,f]=q.useState(!1),[j,v]=q.useState(),[D,O]=q.useState(!1),[Y,F]=q.useState(),[P,S]=q.useState(),[y,T]=q.useState(!1),[W,C]=q.useState(""),[M,R]=q.useState(""),[I,E]=q.useState(!1),[$,J]=q.useState(!1),ae=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:he}=window.OC_SERVICE_DETAILS,Q=q.useRef(),de=B.language;let ee=Rt.latLngBounds();const me=ae||(he&&he.length>0?he:void 0),ue=(N,_)=>{Q.current=N;const H=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(N)}&countrycodes=it&viewbox=${a}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${de}`;let k=[],A=[];O(!0),fetch(H).then(z=>z.json()).then(z=>{if(z.length&&Q.current===N){O(!0);const te=z.map((se,be)=>{const{lat:ce,lon:pe}=se,xe=`${Fe()}/api/geographic-areas/contains?lat=${ce}&lon=${pe}&geographic_areas_ids=${j.join(",")}`;return fetch(xe).then(Ae=>Ae.json()).then(Ae=>Ae.result?(se.label=Za(se),se):null)});return Promise.all(te)}else Q.current===N&&(_([]),O(!1))}).then(z=>{z=z?z.filter(te=>te!==null):[],z.length>0?(z.forEach((te,se)=>{z[se].label=Za(te)}),z=en.uniqWith(z,(te,se)=>te.label===se.label),z.forEach((te,se)=>{A.push(te.label),k.push(te)}),Q.current===N&&(_(A),w(k),O(!1))):Q.current===N&&(_([]),O(!1))}).catch(z=>{console.error("Error fetching locations:",z),O(!1)})},Z=(N,_)=>{ue(N,_)},ve=(N,_)=>{const{lat:H,lng:k}=N,A=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${H}&lon=${k}&accept-language=${de}`;fetch(A).then(z=>z.json()).then(z=>{if(z&&z.display_name)if(z.label=Za(z),z.lat=H,z.lon=k,_)_.bindPopup(`${z.label}`).openPopup(),S(z);else{S(z);return}}).catch(z=>console.error("Error with reverse geocoding:",z))};function Ne(){navigator.geolocation.getCurrentPosition(N=>{let _=N.coords.latitude,H=N.coords.longitude;if((j||[]).length>0){const A=`${Fe()}/api/geographic-areas/contains?lat=${_}&lon=${H}&geographic_areas_ids=${j.join(",")}`;fetch(A).then(z=>z.json()).then(z=>{z.result&&(K({lat:_,lon:H}),ve({lat:_,lng:H})),J(!$)})}else K({lat:_,lon:H}),ve({lat:_,lng:H}),J(!$)},N=>{(N==null?void 0:N.code)===1?(E(!I),R(B.t("error_message_code_1"))):(N==null?void 0:N.code)===2?(E(!I),R(B.t("error_message_code_2"))):(N==null?void 0:N.code)===3?(E(!I),R(B.t("error_message_code_3"))):(E(!I),R(B.t("error_message_generic")))})}q.useEffect(()=>{i&&K(i),m.valuePosition&&K(m.valuePosition)},[i,m]);const _e=()=>{i&&K(i),m.valuePosition&&K(m.valuePosition)};q.useEffect(()=>{var N;(N=window==null?void 0:window.Formio)==null||N.formioReady.then(()=>{setTimeout(()=>{_e(),Ce()},1)})},[]);const Ce=()=>{let _=`${Fe()}/api/geographic-areas`,H=[],k=[];fetch(_).then(A=>A.json()).then(A=>{if(Array.isArray(A)&&A.length>0){A.filter(se=>me?Array.isArray(me)?me.includes(se.id):se.id===me:!0).forEach(se=>{H.push(se.id);const be=JSON.parse(se.geofence),ce=Rt.geoJSON(be,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(pe){return pe.geometry.type==="Polygon"||pe.geometry.type==="MultiPolygon"}});ee.extend(ce.getBounds()),k.push(ce)}),c(k),v(H),F(ee);const z=ee.getNorthEast(),te=ee.getSouthWest();s([z.lng,z.lat,te.lng,te.lat])}else console.log("No geographic_areas_ids found.")}).catch(A=>{console.error("Error with reverse geocoding:",A)})},Re=()=>{C(L!=null&&L.label?L.label:"")};q.useEffect(()=>{Re(),d(L)},[L]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&y===!1?T(!0):T(!1)},[]);const ze=()=>{if(P){const N=`${Fe()}/api/geographic-areas/contains?lat=${P.lat}&lon=${P.lon}&geographic_areas_ids=${j.join(",")}`;f(!0),fetch(N).then(_=>_.json()).then(_=>{f(!1),_?_.result===!1?Je.fire({title:"",html:"<p>"+B.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:B.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):_.result===!0&&(J(!$),K(P)):(f(!1),console.log("No geographic-areas/contains ."))}).catch(_=>{console.error("Error with geographic-areas/contains:",_),Je.fire({title:"",html:"<p>"+_+"</p>",icon:"error",cancelButtonText:B.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return h.jsx("div",{children:h.jsxs("div",{id:`address-map-container-${g.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:B.t("Individua il luogo sulla mappa")}),h.jsxs(le.ModalBody,{children:[h.jsx("p",{children:h.jsx("small",{children:B.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:L,areasLayer:u,bounds:Y,onMarkedMoved:(N,_)=>{ve(N,_)}})]}),h.jsxs(le.ModalFooter,{children:[h.jsx(le.Button,{color:"secondary",onClick:()=>J(!$),children:B.t("Chiudi")}),h.jsx(le.Button,{color:"primary",onClick:()=>{ze()},disabled:!P||p,children:B.t("Salva indirizzo")})]})]})}),h.jsx("div",{children:h.jsxs(le.Modal,{isOpen:I,toggle:()=>E(!I),withIcon:!0,labelledBy:"error-modal-message",container:document.body,children:[h.jsx(le.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:B.t("warning")}),h.jsx(le.ModalBody,{children:h.jsx("p",{children:M})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>E(!I),children:B.t("close")})})]})}),h.jsxs("div",{className:"position-relative",children:[h.jsx(Pc,{id:`${g.id}-${g.key}`,inputClasses:"form-control",source:en.debounce(Z,520),onConfirm:N=>{if(O(!1),Q.current="",N){N===""&&K(null);let _=o.find(H=>H.label===N);K(_)}},onClear:()=>{O(!1),Q.current="",K(null)},dropdownArrow:()=>null,minLength:3,disabled:y,confirmOnBlur:!0,showNoOptionsFound:!D,defaultValue:L==null?void 0:L.label,value:W,tNoResults:()=>B.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>B.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:B.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Ne():(J(!0),S(!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:B.t("Individua con precisione sulla mappa")})]})]})})},ja=class ja extends ot.ReactComponent{constructor(i,m,d){super(i,m,d)}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,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Fc,{ref:m,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...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 Ma=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(...g){return ot.Components.baseEditForm([{key:"display",components:zc}],...g)}const wn=cr.Formio.Components.components.input,Wc=({component:g,current:i,onChange:m,i18next:d})=>{var R,I;const B="list-services",L="selected-category",[K,o]=q.useState([]),[w,a]=q.useState([]),[s,u]=q.useState(null),[c,p]=q.useState(null),[f,j]=q.useState(""),[v,D]=q.useState(!1),[O,Y]=q.useState(!1),F=q.useRef(!1),P=q.useRef(),S=q.useMemo(()=>{if(!s)return null;const E=w.find(J=>J.name===s);return E||K.find(J=>J.name===s)||null},[s,w,K]),y=q.useMemo(()=>(S==null?void 0:S.services)||[],[S]),T=async()=>{var Q,de;Y(!0);const E=sessionStorage.getItem(B),$=sessionStorage.getItem(L);if(E)try{const ee=JSON.parse(E);if(Array.isArray(ee)&&ee.length>0){o(ee),a(ee);const me=ee.find(ue=>ue.name===$)||ee[0];return u((me==null?void 0:me.name)||null),Y(!1),ee}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const J=await window.FormioHelper.getBookingConfig(),ne={};J.forEach(ee=>{(ee.categories??[]).forEach(me=>{ne[me]||(ne[me]={name:me,services:[]}),ne[me].services.push(ee)})});const ae=Object.fromEntries(Object.entries(ne).sort(([ee],[me])=>ee.localeCompare(me,"it",{sensitivity:"base"}))),he=Object.values(ae).filter(ee=>(ee.name??"").trim()!=="");return o(he),a(he),u(((Q=he[0])==null?void 0:Q.name)||null),sessionStorage.setItem(B,JSON.stringify(he)),sessionStorage.setItem(L,((de=he[0])==null?void 0:de.name)||""),Y(!1),he};q.useEffect(()=>{s&&sessionStorage.setItem(L,s)},[s]),q.useEffect(()=>{F.current||(F.current=!0,T())},[]);const W=E=>{var Z;const $=(ve="")=>ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),J=(ve="")=>ve.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),ne=(ve="")=>ve.replace(/<[^>]*>/g," "),ae=(ve,Ne)=>new RegExp(`\\b${$(Ne)}`,"i").test(ve),he=(ve,Ne)=>{const _e=J(ve.name),Ce=J((ve.categories??[]).join(" ")),Re=J(ne(ve.abstract??""));if(!Ne.every(_=>ae(_e,_)||ae(Ce,_)||ae(Re,_)))return-1;let N=0;for(const _ of Ne)ae(_e,_)?N+=3:ae(Ce,_)?N+=2:ae(Re,_)&&(N+=1);return N},Q=E.target.value;j(Q);const de=J(Q);if(!de){a(K),u(ve=>{var Ne;return ve??((Ne=K[0])==null?void 0:Ne.name)??null});return}const ee=de.split(" ").filter(Boolean),me=K.map(ve=>{const Ne=ve.services.map(_e=>({service:_e,score:he(_e,ee)})).filter(_e=>_e.score>=0).sort((_e,Ce)=>Ce.score-_e.score).map(_e=>_e.service);return Ne.length?{...ve,services:Ne}:null}).filter(Boolean);a(me);const ue=me.some(ve=>ve.name===s);u(ue?s:((Z=me[0])==null?void 0:Z.name)??null)},C=E=>{p(E);const $=K.find(J=>J.services.some(ne=>ne.id===E.id));$&&u($.name),m({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,jn()},M=E=>{u(E.name),p(null),j(""),a(K),m({})};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($),K.length>0)){const J=K.find(ne=>ne.services.some(ae=>ae.id===$.id));J&&u(J.name)}},500);return()=>clearTimeout(E)},[i==null?void 0:i.dataValue,i==null?void 0:i.data,K]),q.useEffect(()=>{const E=window.FormioInstance;if(!E)return;const $=()=>{var ne,ae,he;const J=(he=(ne=E.submission)==null?void 0:ne.data)==null?void 0:he[(ae=i==null?void 0:i.component)==null?void 0:ae.key];if(J!=null&&J.id&&(p(J),K.length>0)){const Q=K.find(de=>de.services.some(ee=>ee.id===J.id));Q&&u(Q.name)}};return E.on("change",$),()=>E.off("change",$)},[K,(R=i==null?void 0:i.component)==null?void 0:R.key]),O?h.jsx("div",{className:"services-booking",ref:P,children:h.jsxs("div",{children:[d.t("Caricamento in corso"),"..."]})}):h.jsx("div",{className:"services-booking",ref:P,children:K&&!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:d.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:d.t("Cerca"),type:"text",value:f,onChange:W,onInput:W,infoText:d.t("Cerca per categoria, servizio o descrizione")})})})}),h.jsxs(le.Row,{className:"mb-3",children:[S?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:d.t("Categorie")}),w.length>0&&w.map(E=>{const $=s===E.name;return h.jsxs("button",{onClick:()=>M(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?d.t("servizi"):d.t("servizio")]})]},E.name)})]})}):null,h.jsx(le.Col,{lg:S?9:12,md:S?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:S==null?void 0:S.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 $=(c==null?void 0:c.id)===E.id,J=sl.sanitize(E==null?void 0:E.abstract);return h.jsx("button",{onClick:()=>C(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:d.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:S==null?void 0:S.name})})}),h.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:(I=i==null?void 0:i.dataValue)!=null&&I.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,m,d){super(i,m,d)}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,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Wc,{ref:m,component:this.component,onChange:d=>this.setValue(d),...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:_a,dynamic_calendar:Yn,calendar:ba,"calendar-advanced":wa,sdcfile:xa,address_map:Ma,"list-services":Sa};function Vc(g){if(!g||typeof g.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(ur).forEach(([i,m])=>{g.addComponent(i,m)}),ur}exports.Calendar=ba;exports.CalendarAdvanced=wa;exports.FormioAddressMap=Ma;exports.FormioDynamicCalendar=Yn;exports.FormioListServices=Sa;exports.FormioPageBreak=_a;exports.SdcFile=xa;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}],xc=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function Mc(...g){return ot.Components.baseEditForm([{key:"display",components:bc},{key:"data",components:_c},{label:"File",key:"file",weight:5,components:wc},{key:"validation",components:xc}],...g)}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(m=>{i.token=m.data.token}).catch(m=>{Je.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let i=this;return new Promise(async(m,u)=>{aa("auth-token")?m({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($=>{const F=il.jwtDecode($.data.token);F.exp&&oc("auth-token",$.data.token,F.exp)}).catch($=>{console.log($)})})}getToken(){return this.token}execAuthenticatedCall(i){this.token?i(this.token):this.getSessionAuthTokenPromise().then(m=>{this.token=m.token,i(this.token)})}}const vn=cr.Formio.Components.components.field;let lr=null;document.querySelector("widget-formio")!==null&&(lr=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const Dc=g=>{const{value:i,component:m,current:u,onChange:$,i18next:F}=g,[K,o]=q.useState([]),[x,a]=q.useState(new Map),[s,c]=q.useState(!1),d=new Sc;q.useEffect(()=>{d.getSessionAuthTokenPromise()},[]);const p=(w,T)=>{a(V=>{const B=new Map(V);return B.set(w,T),B})};function f(w){return w.size>(z(m.fileMaxSize)||z("1GB"))?{code:"size-files",message:`${F.t("I file non possono superare le dimensioni di")} ${m.fileMaxSize?m.fileMaxSize:"1GB"}`}:K.length>=(m.maxFiles?parseInt(m.maxFiles):m.multiple?100:1)?{code:"too-many-files",message:`${F.t("Puoi caricare massimo ")} ${m.maxFiles||100} ${F.t("file")}`}:w.size<z(m.fileMinSize)?{code:"file-too-small",message:`${F.t("I file devono avare una dimensione superiore a ")} ${m.fileMinSize}`}:null}function j(){if(m.filePattern){const w=m.filePattern.split(",");let T={};return w.map(V=>{const B=nl.getType(V);T[B]=[],T[B].push(V)}),T}else return!0}const v=w=>{let T={};return T.originalName=w.originalName?w.originalName:w.name,T.name=w.name,T.url=w.url,T.data=w.data,T.signature_validation=w.signature_validation,T.mime_type=w.mime_type,T.storage="url",T.size=w.size,T},{getRootProps:D,getInputProps:O,fileRejections:Y,isDragActive:R,open:E}=rl.useDropzone({onDrop:w=>{w.map(T=>{C(T).then(V=>{})})},maxFiles:m.maxFiles?parseInt(m.maxFiles)-K.length:m.multiple?100:1,validator:f,accept:j()}),S=w=>{const T=Fe()+"/api/attachments/"+w.data.id;fetch(T,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(()=>{o(V=>{let B=V.filter(re=>re.data.id!==w.data.id);return $(B),B})}).catch(V=>{Je.fire({title:"",html:`<p>${F.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:F.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(V)})},y=()=>{const w=i&&i.length>0?i:u.dataValue?u.dataValue:null;(w==null?void 0:w.length)>0&&(o(w),setTimeout(()=>{$(w)},100))};q.useEffect(()=>{document.querySelector(".formio-read-only")&&s===!1?(c(!0),setTimeout(()=>{y()},1e3)):(c(!1),setTimeout(()=>{y()},1e3))},[]);async function C(w){let T;const V=Fe()+"/it/upload";let B={mime_type:w.type,name:w.name,original_filename:w.name,protocol_required:m.protocol_required,size:w.size};return await qt.post(V,B,{maxContentLength:1/0,maxBodyLength:1/0}).then(async re=>(T=re.data.id,w.url=Fe()+"/it/allegati/"+T,w.storage="url",w.mime_type=w.type,w.protocol_required=m.protocol_required,w.data={...re.data,baseUrl:Fe()+"/it/allegati/"+T},p(T,w),await qt.put(re.data.uri,w,{onUploadProgress:ee=>{let he=Math.round(ee.loaded*100/ee.total);a(Z=>{const ce=new Map(Z),ne=w;return ne.progress=parseInt(he),ce.has(T)&&ce.set(T,ne),ce})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async ee=>{const he=/\\|"/gi,Z=ee.headers.etag.replace(he,"")||null;return await qt.put(Fe()+"/it/upload/"+T,{file_hash:Z,check_signature:m.check_signature}).then(async ce=>{a(se=>{const Q=new Map(se);return Q.delete(T),Q});let ne=i||u.dataValue||[],fe=null;if(o(se=>(fe=se.push(v(w))-1,$(se),se)),m.check_signature&&ce.data.url&&lr)return await qt.post(lr,{url:ce.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(se=>{w.signature_validation=se.data.sign,ne[fe].signature_validation=se.data.sign}).catch(se=>{ne[fe].signature_validation="File validation error: "+se});a(se=>{const Q=new Map(se);return Q.delete(T),Q})}).catch(ce=>{a(ne=>{const fe=new Map(ne);return fe.delete(T),fe}),console.log(ce),Je.fire({title:"",html:`<p>${F.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:F.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(ee=>{a(he=>{const Z=new Map(he);return Z.delete(T),Z}),console.log(ee),Je.fire({title:"",html:`<p>${F.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:F.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(re=>{console.log(re),Je.fire({title:"",html:`<p>${F.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:F.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),a(ee=>{const he=new Map(ee);return he.delete(T),he})})}function z(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,T=2){if(!+w)return"0 Bytes";const V=1024,B=T<0?0:T,re=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],ee=Math.floor(Math.log(w)/Math.log(V));return`${parseFloat((w/Math.pow(V,ee)).toFixed(B))} ${re[ee]}`}const H=typeof(u==null?void 0:u.conditionallyHidden)=="function"?u.conditionallyHidden():!1;return m.hidden||(u==null?void 0:u.visible)===!1||H?null:h.jsx(h.Fragment,{children:s?h.jsx("div",{children:h.jsxs("ul",{className:"upload-file-list",children:[K.map((w,T)=>h.jsxs("li",{className:"upload-file success mw-100",children:[h.jsx(ue.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:F.t("File caricato:")}),w.name,h.jsx("span",{className:"upload-file-weight",children:N(w.size)})]})]},w.size+T)),K.length<1&&h.jsxs("li",{className:"upload-file text-secondary mw-100",children:[h.jsx(ue.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),h.jsx("p",{children:F.t("Nessun elemento")})]})]})}):h.jsxs(h.Fragment,{children:[m.hideLabel||m.hidden?"":h.jsxs("label",{className:"floating-label",htmlFor:`${m.id}-${m.key}`,children:[m.label,m.validate.required&&h.jsx("span",{className:"text-danger"})]}),h.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${R?" dragover":""}`,style:{border:"dashed"},...D({onClick:w=>w.stopPropagation()}),children:[h.jsx("input",{id:`${m.id}-${m.key}`,"aria-describedby":`file-uploader-description-${m.id}-${m.key}`,...O()}),h.jsxs("div",{className:`upload-dragdrop${R?" dragover":""}`,children:[h.jsx("div",{className:"ms-1 me-3",children:h.jsx(ue.Icon,{color:"secondary",icon:"it-upload",title:F.t("Carica file"),size:"_sm"})}),h.jsxs("div",{className:"upload-dragdrop-text",children:[h.jsx("div",{className:"h5",id:`file-uploader-description-${m.id}-${m.key}`,children:F.t("Trascina il file per caricarlo")}),h.jsxs("p",{className:"d-inline-flex",children:[F.t("oppure"),h.jsx(ue.Button,{tag:"input",type:"button",value:F.t("selezionalo dal dispositivo"),onClick:E,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),h.jsxs("ul",{className:"upload-file-list my-0",children:[K.map((w,T)=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(ue.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:F.t("File caricato:")}),w.name,h.jsx("span",{className:"upload-file-weight",children:N(w.size)})]}),h.jsx(ue.Button,{className:"px-1",onClick:()=>S(w),children:h.jsx(ue.Icon,{title:`${F.t("Elimina file caricato")} ${w.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},w.size+T)),Array.from(x.entries()).map(([w,T])=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(ue.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:F.t("Caricamento file:")}),T.name,h.jsx("span",{className:"upload-file-weight",children:N(T.size)})]}),h.jsx(ue.Progress,{value:T.progress})]},w))]}),!!(Y&&Y.length)&&h.jsx("div",{className:"formio-error-wrapper",children:h.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:Y.map(({file:w,errors:T},V)=>h.jsxs("li",{className:"upload-file error",children:[h.jsxs("div",{className:"upload-file-name-error-wrapper",children:[h.jsx(ue.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:F.t("Errore caricamento file:")}),w.name,h.jsx("span",{className:"upload-file-weight",children:N(w.size)})]})]}),h.jsx("div",{children:T.map(B=>B.code==="file-invalid-type"?h.jsxs("p",{className:"text-wrap ms-0",children:[F.t("I file possono essere di tipo "),m.filePattern]}):B.code==="too-many-files"?h.jsxs("p",{className:"text-wrap ms-0",children:[F.t("Puoi caricare massimo ")," ",m.maxFiles?m.maxFiles:m.multiple?100:1," ",F.t("file")]}):h.jsx("p",{className:"text-wrap ms-0",children:B.message}))})]},w.size+V))})})]})})},Oa=class Oa extends vn{constructor(i,m,u){super({...i,multiple:i.multiple},m,u)}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"})}attach(i,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Dc,{ref:m,component:this.component,onChange:u=>this.setValue(u),...this,current:this}))}setValue(i){i&&(this.updateValue(i),this.shouldSetValue=!0)}getValue(){return super.getValue()}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(Oa,"editForm",Mc);let xa=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(...g){return ot.Components.baseEditForm([{key:"display",components:kc}],...g)}var ya={exports:{}},Oc=ya.exports,_n;function jc(){return _n||(_n=1,(function(g,i){(function(m,u){g.exports=u(q)})(Oc,(function(m){return(function(){var u={680:function(o){o.exports=m},8952:function(o,x,a){var s=a(4328),c=a(36),d=TypeError;o.exports=function(p){if(s(p))return p;throw new d(c(p)+" is not a function")}},2096:function(o,x,a){var s=a(2424),c=String,d=TypeError;o.exports=function(p){if(s(p))return p;throw new d("Can't set "+c(p)+" as a prototype")}},4764:function(o,x,a){var s=a(9764).charAt;o.exports=function(c,d,p){return d+(p?s(c,d).length:1)}},6100:function(o,x,a){var s=a(7e3),c=TypeError;o.exports=function(d,p){if(s(p,d))return d;throw new c("Incorrect invocation")}},3951:function(o,x,a){var s=a(1632),c=String,d=TypeError;o.exports=function(p){if(s(p))return p;throw new d(c(p)+" is not an object")}},2504:function(o,x,a){var s=a(4096),c=a(2495),d=a(3556),p=function(f){return function(j,v,D){var O=s(j),Y=d(O);if(Y===0)return!f&&-1;var R,E=c(D,Y);if(f&&v!=v){for(;Y>E;)if((R=O[E++])!=R)return!0}else for(;Y>E;E++)if((f||E in O)&&O[E]===v)return f||E||0;return!f&&-1}};o.exports={includes:p(!0),indexOf:p(!1)}},3364:function(o,x,a){var s=a(8992),c=a(1664),d=a(5712),p=a(4356),f=a(3556),j=a(2568),v=c([].push),D=function(O){var Y=O===1,R=O===2,E=O===3,S=O===4,y=O===6,C=O===7,z=O===5||y;return function(N,H,J,w){for(var T,V,B=p(N),re=d(B),ee=f(re),he=s(H,J),Z=0,ce=w||j,ne=Y?ce(N,ee):R||C?ce(N,0):void 0;ee>Z;Z++)if((z||Z in re)&&(V=he(T=re[Z],Z,B),O))if(Y)ne[Z]=V;else if(V)switch(O){case 3:return!0;case 5:return T;case 6:return Z;case 2:v(ne,T)}else switch(O){case 4:return!1;case 7:v(ne,T)}return y?-1:E||S?S:ne}};o.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(o,x,a){var s=a(9957),c=a(9972),d=a(8504),p=c("species");o.exports=function(f){return d>=51||!s((function(){var j=[];return(j.constructor={})[p]=function(){return{foo:1}},j[f](Boolean).foo!==1}))}},1496:function(o,x,a){var s=a(9957);o.exports=function(c,d){var p=[][c];return!!p&&s((function(){p.call(null,d||function(){return 1},1)}))}},6728:function(o,x,a){var s=a(3476),c=a(1432),d=TypeError,p=Object.getOwnPropertyDescriptor,f=s&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(j){return j instanceof TypeError}})();o.exports=f?function(j,v){if(c(j)&&!p(j,"length").writable)throw new d("Cannot set read only .length");return j.length=v}:function(j,v){return j.length=v}},6736:function(o,x,a){var s=a(1432),c=a(6072),d=a(1632),p=a(9972)("species"),f=Array;o.exports=function(j){var v;return s(j)&&(v=j.constructor,(c(v)&&(v===f||s(v.prototype))||d(v)&&(v=v[p])===null)&&(v=void 0)),v===void 0?f:v}},2568:function(o,x,a){var s=a(6736);o.exports=function(c,d){return new(s(c))(d===0?0:d)}},8696:function(o,x,a){var s=a(3951),c=a(3112);o.exports=function(d,p,f,j){try{return j?p(s(f)[0],f[1]):p(f)}catch(v){c(d,"throw",v)}}},1888:function(o,x,a){var s=a(1664),c=s({}.toString),d=s("".slice);o.exports=function(p){return d(c(p),8,-1)}},4427:function(o,x,a){var s=a(16),c=a(4328),d=a(1888),p=a(9972)("toStringTag"),f=Object,j=d((function(){return arguments})())==="Arguments";o.exports=s?d:function(v){var D,O,Y;return v===void 0?"Undefined":v===null?"Null":typeof(O=(function(R,E){try{return R[E]}catch{}})(D=f(v),p))=="string"?O:j?d(D):(Y=d(D))==="Object"&&c(D.callee)?"Arguments":Y}},9968:function(o,x,a){var s=a(5152),c=a(9252),d=a(9444),p=a(8352);o.exports=function(f,j,v){for(var D=c(j),O=p.f,Y=d.f,R=0;R<D.length;R++){var E=D[R];s(f,E)||v&&s(v,E)||O(f,E,Y(j,E))}}},2272:function(o,x,a){var s=a(9957);o.exports=!s((function(){function c(){}return c.prototype.constructor=null,Object.getPrototypeOf(new c)!==c.prototype}))},3336:function(o){o.exports=function(x,a){return{value:x,done:a}}},3440:function(o,x,a){var s=a(3476),c=a(8352),d=a(9728);o.exports=s?function(p,f,j){return c.f(p,f,d(1,j))}:function(p,f,j){return p[f]=j,p}},9728:function(o){o.exports=function(x,a){return{enumerable:!(1&x),configurable:!(2&x),writable:!(4&x),value:a}}},92:function(o,x,a){var s=a(3476),c=a(8352),d=a(9728);o.exports=function(p,f,j){s?c.f(p,f,d(0,j)):p[f]=j}},2544:function(o,x,a){var s=a(5312),c=a(8352);o.exports=function(d,p,f){return f.get&&s(f.get,p,{getter:!0}),f.set&&s(f.set,p,{setter:!0}),c.f(d,p,f)}},6076:function(o,x,a){var s=a(4328),c=a(8352),d=a(5312),p=a(4636);o.exports=function(f,j,v,D){D||(D={});var O=D.enumerable,Y=D.name!==void 0?D.name:j;if(s(v)&&d(v,Y,D),D.global)O?f[j]=v:p(j,v);else{try{D.unsafe?f[j]&&(O=!0):delete f[j]}catch{}O?f[j]=v:c.f(f,j,{value:v,enumerable:!1,configurable:!D.nonConfigurable,writable:!D.nonWritable})}return f}},4036:function(o,x,a){var s=a(6076);o.exports=function(c,d,p){for(var f in d)s(c,f,d[f],p);return c}},4636:function(o,x,a){var s=a(6420),c=Object.defineProperty;o.exports=function(d,p){try{c(s,d,{value:p,configurable:!0,writable:!0})}catch{s[d]=p}return p}},3476:function(o,x,a){var s=a(9957);o.exports=!s((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(o,x,a){var s=a(6420),c=a(1632),d=s.document,p=c(d)&&c(d.createElement);o.exports=function(f){return p?d.createElement(f):{}}},4316:function(o){var x=TypeError;o.exports=function(a){if(a>9007199254740991)throw x("Maximum allowed index exceeded");return a}},6064:function(o){o.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(o,x,a){var s,c,d=a(6420),p=a(6064),f=d.process,j=d.Deno,v=f&&f.versions||j&&j.version,D=v&&v.v8;D&&(c=(s=D.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!c&&p&&(!(s=p.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=p.match(/Chrome\/(\d+)/))&&(c=+s[1]),o.exports=c},8256:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(o,x,a){var s=a(1664),c=Error,d=s("".replace),p=String(new c("zxcasd").stack),f=/\n\s*at [^:]*:[^\n]*/,j=f.test(p);o.exports=function(v,D){if(j&&typeof v=="string"&&!c.prepareStackTrace)for(;D--;)v=d(v,f,"");return v}},3696:function(o,x,a){var s=a(3440),c=a(6520),d=a(9184),p=Error.captureStackTrace;o.exports=function(f,j,v,D){d&&(p?p(f,j):s(f,"stack",c(v,D)))}},9184:function(o,x,a){var s=a(9957),c=a(9728);o.exports=!s((function(){var d=new Error("a");return!("stack"in d)||(Object.defineProperty(d,"stack",c(1,7)),d.stack!==7)}))},9160:function(o,x,a){var s=a(6420),c=a(9444).f,d=a(3440),p=a(6076),f=a(4636),j=a(9968),v=a(6704);o.exports=function(D,O){var Y,R,E,S,y,C=D.target,z=D.global,N=D.stat;if(Y=z?s:N?s[C]||f(C,{}):s[C]&&s[C].prototype)for(R in O){if(S=O[R],E=D.dontCallGetSet?(y=c(Y,R))&&y.value:Y[R],!v(z?R:C+(N?".":"#")+R,D.forced)&&E!==void 0){if(typeof S==typeof E)continue;j(S,E)}(D.sham||E&&E.sham)&&d(S,"sham",!0),p(Y,R,S,D)}}},9957:function(o){o.exports=function(x){try{return!!x()}catch{return!0}}},7176:function(o,x,a){a(880);var s=a(8448),c=a(6076),d=a(7680),p=a(9957),f=a(9972),j=a(3440),v=f("species"),D=RegExp.prototype;o.exports=function(O,Y,R,E){var S=f(O),y=!p((function(){var H={};return H[S]=function(){return 7},""[O](H)!==7})),C=y&&!p((function(){var H=!1,J=/a/;return O==="split"&&((J={}).constructor={},J.constructor[v]=function(){return J},J.flags="",J[S]=/./[S]),J.exec=function(){return H=!0,null},J[S](""),!H}));if(!y||!C||R){var z=/./[S],N=Y(S,""[O],(function(H,J,w,T,V){var B=J.exec;return B===d||B===D.exec?y&&!V?{done:!0,value:s(z,J,w,T)}:{done:!0,value:s(H,w,J,T)}:{done:!1}}));c(String.prototype,O,N[0]),c(D,S,N[1])}E&&j(D[S],"sham",!0)}},908:function(o,x,a){var s=a(7332),c=Function.prototype,d=c.apply,p=c.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(s?p.bind(d):function(){return p.apply(d,arguments)})},8992:function(o,x,a){var s=a(3180),c=a(8952),d=a(7332),p=s(s.bind);o.exports=function(f,j){return c(f),j===void 0?f:d?p(f,j):function(){return f.apply(j,arguments)}}},7332:function(o,x,a){var s=a(9957);o.exports=!s((function(){var c=(function(){}).bind();return typeof c!="function"||c.hasOwnProperty("prototype")}))},8448:function(o,x,a){var s=a(7332),c=Function.prototype.call;o.exports=s?c.bind(c):function(){return c.apply(c,arguments)}},6208:function(o,x,a){var s=a(3476),c=a(5152),d=Function.prototype,p=s&&Object.getOwnPropertyDescriptor,f=c(d,"name"),j=f&&(function(){}).name==="something",v=f&&(!s||s&&p(d,"name").configurable);o.exports={EXISTS:f,PROPER:j,CONFIGURABLE:v}},5288:function(o,x,a){var s=a(1664),c=a(8952);o.exports=function(d,p,f){try{return s(c(Object.getOwnPropertyDescriptor(d,p)[f]))}catch{}}},3180:function(o,x,a){var s=a(1888),c=a(1664);o.exports=function(d){if(s(d)==="Function")return c(d)}},1664:function(o,x,a){var s=a(7332),c=Function.prototype,d=c.call,p=s&&c.bind.bind(d,d);o.exports=s?p:function(f){return function(){return d.apply(f,arguments)}}},5232:function(o,x,a){var s=a(6420),c=a(4328);o.exports=function(d,p){return arguments.length<2?(f=s[d],c(f)?f:void 0):s[d]&&s[d][p];var f}},6752:function(o){o.exports=function(x){return{iterator:x,next:x.next,done:!1}}},4504:function(o,x,a){var s=a(8952),c=a(9760);o.exports=function(d,p){var f=d[p];return c(f)?void 0:s(f)}},6420:function(o,x,a){var s=function(c){return c&&c.Math===Math&&c};o.exports=s(typeof globalThis=="object"&&globalThis)||s(typeof window=="object"&&window)||s(typeof self=="object"&&self)||s(typeof a.g=="object"&&a.g)||s(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(o,x,a){var s=a(1664),c=a(4356),d=s({}.hasOwnProperty);o.exports=Object.hasOwn||function(p,f){return d(c(p),f)}},2560:function(o){o.exports={}},4168:function(o,x,a){var s=a(5232);o.exports=s("document","documentElement")},9888:function(o,x,a){var s=a(3476),c=a(9957),d=a(8168);o.exports=!s&&!c((function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(o,x,a){var s=a(1664),c=a(9957),d=a(1888),p=Object,f=s("".split);o.exports=c((function(){return!p("z").propertyIsEnumerable(0)}))?function(j){return d(j)==="String"?f(j,""):p(j)}:p},7512:function(o,x,a){var s=a(4328),c=a(1632),d=a(4024);o.exports=function(p,f,j){var v,D;return d&&s(v=f.constructor)&&v!==j&&c(D=v.prototype)&&D!==j.prototype&&d(p,D),p}},9112:function(o,x,a){var s=a(1664),c=a(4328),d=a(3976),p=s(Function.toString);c(d.inspectSource)||(d.inspectSource=function(f){return p(f)}),o.exports=d.inspectSource},3480:function(o,x,a){var s=a(1632),c=a(3440);o.exports=function(d,p){s(p)&&"cause"in p&&c(d,"cause",p.cause)}},9104:function(o,x,a){var s,c,d,p=a(4288),f=a(6420),j=a(1632),v=a(3440),D=a(5152),O=a(3976),Y=a(6504),R=a(2560),E="Object already initialized",S=f.TypeError,y=f.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,s=function(N,H){if(C.has(N))throw new S(E);return H.facade=N,C.set(N,H),H},c=function(N){return C.get(N)||{}},d=function(N){return C.has(N)}}else{var z=Y("state");R[z]=!0,s=function(N,H){if(D(N,z))throw new S(E);return H.facade=N,v(N,z,H),H},c=function(N){return D(N,z)?N[z]:{}},d=function(N){return D(N,z)}}o.exports={set:s,get:c,has:d,enforce:function(N){return d(N)?c(N):s(N,{})},getterFor:function(N){return function(H){var J;if(!j(H)||(J=c(H)).type!==N)throw new S("Incompatible receiver, "+N+" required");return J}}}},1432:function(o,x,a){var s=a(1888);o.exports=Array.isArray||function(c){return s(c)==="Array"}},4328:function(o){var x=typeof document=="object"&&document.all;o.exports=x===void 0&&x!==void 0?function(a){return typeof a=="function"||a===x}:function(a){return typeof a=="function"}},6072:function(o,x,a){var s=a(1664),c=a(9957),d=a(4328),p=a(4427),f=a(5232),j=a(9112),v=function(){},D=f("Reflect","construct"),O=/^\s*(?:class|function)\b/,Y=s(O.exec),R=!O.test(v),E=function(y){if(!d(y))return!1;try{return D(v,[],y),!0}catch{return!1}},S=function(y){if(!d(y))return!1;switch(p(y)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return R||!!Y(O,j(y))}catch{return!0}};S.sham=!0,o.exports=!D||c((function(){var y;return E(E.call)||!E(Object)||!E((function(){y=!0}))||y}))?S:E},6704:function(o,x,a){var s=a(9957),c=a(4328),d=/#|\.prototype\./,p=function(O,Y){var R=j[f(O)];return R===D||R!==v&&(c(Y)?s(Y):!!Y)},f=p.normalize=function(O){return String(O).replace(d,".").toLowerCase()},j=p.data={},v=p.NATIVE="N",D=p.POLYFILL="P";o.exports=p},9760:function(o){o.exports=function(x){return x==null}},1632:function(o,x,a){var s=a(4328);o.exports=function(c){return typeof c=="object"?c!==null:s(c)}},2424:function(o,x,a){var s=a(1632);o.exports=function(c){return s(c)||c===null}},7048:function(o){o.exports=!1},7728:function(o,x,a){var s=a(5232),c=a(4328),d=a(7e3),p=a(6536),f=Object;o.exports=p?function(j){return typeof j=="symbol"}:function(j){var v=s("Symbol");return c(v)&&d(v.prototype,f(j))}},3112:function(o,x,a){var s=a(8448),c=a(3951),d=a(4504);o.exports=function(p,f,j){var v,D;c(p);try{if(!(v=d(p,"return"))){if(f==="throw")throw j;return j}v=s(v,p)}catch(O){D=!0,v=O}if(f==="throw")throw j;if(D)throw v;return c(v),j}},9724:function(o,x,a){var s=a(8448),c=a(9368),d=a(3440),p=a(4036),f=a(9972),j=a(9104),v=a(4504),D=a(336).IteratorPrototype,O=a(3336),Y=a(3112),R=f("toStringTag"),E="IteratorHelper",S="WrapForValidIterator",y=j.set,C=function(H){var J=j.getterFor(H?S:E);return p(c(D),{next:function(){var w=J(this);if(H)return w.nextHandler();try{var T=w.done?void 0:w.nextHandler();return O(T,w.done)}catch(V){throw w.done=!0,V}},return:function(){var w=J(this),T=w.iterator;if(w.done=!0,H){var V=v(T,"return");return V?s(V,T):O(void 0,!0)}if(w.inner)try{Y(w.inner.iterator,"normal")}catch(B){return Y(T,"throw",B)}return Y(T,"normal"),O(void 0,!0)}})},z=C(!0),N=C(!1);d(N,R,"Iterator Helper"),o.exports=function(H,J){var w=function(T,V){V?(V.iterator=T.iterator,V.next=T.next):V=T,V.type=J?S:E,V.nextHandler=H,V.counter=0,V.done=!1,y(this,V)};return w.prototype=J?z:N,w}},5792:function(o,x,a){var s=a(8448),c=a(8952),d=a(3951),p=a(6752),f=a(9724),j=a(8696),v=f((function(){var D=this.iterator,O=d(s(this.next,D));if(!(this.done=!!O.done))return j(D,this.mapper,[O.value,this.counter++],!0)}));o.exports=function(D){return d(this),c(D),new v(p(this),{mapper:D})}},336:function(o,x,a){var s,c,d,p=a(9957),f=a(4328),j=a(1632),v=a(9368),D=a(7796),O=a(6076),Y=a(9972),R=a(7048),E=Y("iterator"),S=!1;[].keys&&("next"in(d=[].keys())?(c=D(D(d)))!==Object.prototype&&(s=c):S=!0),!j(s)||p((function(){var y={};return s[E].call(y)!==y}))?s={}:R&&(s=v(s)),f(s[E])||O(s,E,(function(){return this})),o.exports={IteratorPrototype:s,BUGGY_SAFARI_ITERATORS:S}},3556:function(o,x,a){var s=a(7584);o.exports=function(c){return s(c.length)}},5312:function(o,x,a){var s=a(1664),c=a(9957),d=a(4328),p=a(5152),f=a(3476),j=a(6208).CONFIGURABLE,v=a(9112),D=a(9104),O=D.enforce,Y=D.get,R=String,E=Object.defineProperty,S=s("".slice),y=s("".replace),C=s([].join),z=f&&!c((function(){return E((function(){}),"length",{value:8}).length!==8})),N=String(String).split("String"),H=o.exports=function(J,w,T){S(R(w),0,7)==="Symbol("&&(w="["+y(R(w),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),T&&T.getter&&(w="get "+w),T&&T.setter&&(w="set "+w),(!p(J,"name")||j&&J.name!==w)&&(f?E(J,"name",{value:w,configurable:!0}):J.name=w),z&&T&&p(T,"arity")&&J.length!==T.arity&&E(J,"length",{value:T.arity});try{T&&p(T,"constructor")&&T.constructor?f&&E(J,"prototype",{writable:!1}):J.prototype&&(J.prototype=void 0)}catch{}var V=O(J);return p(V,"source")||(V.source=C(N,typeof w=="string"?w:"")),J};Function.prototype.toString=H((function(){return d(this)&&Y(this).source||v(this)}),"toString")},1748:function(o){var x=Math.ceil,a=Math.floor;o.exports=Math.trunc||function(s){var c=+s;return(c>0?a:x)(c)}},8948:function(o,x,a){var s=a(5016);o.exports=function(c,d){return c===void 0?arguments.length<2?"":d:s(c)}},9292:function(o,x,a){var s=a(3476),c=a(1664),d=a(8448),p=a(9957),f=a(1531),j=a(9392),v=a(8912),D=a(4356),O=a(5712),Y=Object.assign,R=Object.defineProperty,E=c([].concat);o.exports=!Y||p((function(){if(s&&Y({b:1},Y(R({},"a",{enumerable:!0,get:function(){R(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var S={},y={},C=Symbol("assign detection"),z="abcdefghijklmnopqrst";return S[C]=7,z.split("").forEach((function(N){y[N]=N})),Y({},S)[C]!==7||f(Y({},y)).join("")!==z}))?function(S,y){for(var C=D(S),z=arguments.length,N=1,H=j.f,J=v.f;z>N;)for(var w,T=O(arguments[N++]),V=H?E(f(T),H(T)):f(T),B=V.length,re=0;B>re;)w=V[re++],s&&!d(J,T,w)||(C[w]=T[w]);return C}:Y},9368:function(o,x,a){var s,c=a(3951),d=a(2056),p=a(8256),f=a(2560),j=a(4168),v=a(8168),D=a(6504),O="prototype",Y="script",R=D("IE_PROTO"),E=function(){},S=function(z){return"<"+Y+">"+z+"</"+Y+">"},y=function(z){z.write(S("")),z.close();var N=z.parentWindow.Object;return z=null,N},C=function(){try{s=new ActiveXObject("htmlfile")}catch{}var z,N,H;C=typeof document<"u"?document.domain&&s?y(s):(N=v("iframe"),H="java"+Y+":",N.style.display="none",j.appendChild(N),N.src=String(H),(z=N.contentWindow.document).open(),z.write(S("document.F=Object")),z.close(),z.F):y(s);for(var J=p.length;J--;)delete C[O][p[J]];return C()};f[R]=!0,o.exports=Object.create||function(z,N){var H;return z!==null?(E[O]=c(z),H=new E,E[O]=null,H[R]=z):H=C(),N===void 0?H:d.f(H,N)}},2056:function(o,x,a){var s=a(3476),c=a(1576),d=a(8352),p=a(3951),f=a(4096),j=a(1531);x.f=s&&!c?Object.defineProperties:function(v,D){p(v);for(var O,Y=f(D),R=j(D),E=R.length,S=0;E>S;)d.f(v,O=R[S++],Y[O]);return v}},8352:function(o,x,a){var s=a(3476),c=a(9888),d=a(1576),p=a(3951),f=a(88),j=TypeError,v=Object.defineProperty,D=Object.getOwnPropertyDescriptor,O="enumerable",Y="configurable",R="writable";x.f=s?d?function(E,S,y){if(p(E),S=f(S),p(y),typeof E=="function"&&S==="prototype"&&"value"in y&&R in y&&!y[R]){var C=D(E,S);C&&C[R]&&(E[S]=y.value,y={configurable:Y in y?y[Y]:C[Y],enumerable:O in y?y[O]:C[O],writable:!1})}return v(E,S,y)}:v:function(E,S,y){if(p(E),S=f(S),p(y),c)try{return v(E,S,y)}catch{}if("get"in y||"set"in y)throw new j("Accessors not supported");return"value"in y&&(E[S]=y.value),E}},9444:function(o,x,a){var s=a(3476),c=a(8448),d=a(8912),p=a(9728),f=a(4096),j=a(88),v=a(5152),D=a(9888),O=Object.getOwnPropertyDescriptor;x.f=s?O:function(Y,R){if(Y=f(Y),R=j(R),D)try{return O(Y,R)}catch{}if(v(Y,R))return p(!c(d.f,Y,R),Y[R])}},5048:function(o,x,a){var s=a(9008),c=a(8256).concat("length","prototype");x.f=Object.getOwnPropertyNames||function(d){return s(d,c)}},9392:function(o,x){x.f=Object.getOwnPropertySymbols},7796:function(o,x,a){var s=a(5152),c=a(4328),d=a(4356),p=a(6504),f=a(2272),j=p("IE_PROTO"),v=Object,D=v.prototype;o.exports=f?v.getPrototypeOf:function(O){var Y=d(O);if(s(Y,j))return Y[j];var R=Y.constructor;return c(R)&&Y instanceof R?R.prototype:Y instanceof v?D:null}},7e3:function(o,x,a){var s=a(1664);o.exports=s({}.isPrototypeOf)},9008:function(o,x,a){var s=a(1664),c=a(5152),d=a(4096),p=a(2504).indexOf,f=a(2560),j=s([].push);o.exports=function(v,D){var O,Y=d(v),R=0,E=[];for(O in Y)!c(f,O)&&c(Y,O)&&j(E,O);for(;D.length>R;)c(Y,O=D[R++])&&(~p(E,O)||j(E,O));return E}},1531:function(o,x,a){var s=a(9008),c=a(8256);o.exports=Object.keys||function(d){return s(d,c)}},8912:function(o,x){var a={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,c=s&&!a.call({1:2},1);x.f=c?function(d){var p=s(this,d);return!!p&&p.enumerable}:a},4024:function(o,x,a){var s=a(5288),c=a(3951),d=a(2096);o.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,f=!1,j={};try{(p=s(Object.prototype,"__proto__","set"))(j,[]),f=j instanceof Array}catch{}return function(v,D){return c(v),d(D),f?p(v,D):v.__proto__=D,v}})():void 0)},7032:function(o,x,a){var s=a(16),c=a(4427);o.exports=s?{}.toString:function(){return"[object "+c(this)+"]"}},2104:function(o,x,a){var s=a(8448),c=a(4328),d=a(1632),p=TypeError;o.exports=function(f,j){var v,D;if(j==="string"&&c(v=f.toString)&&!d(D=s(v,f))||c(v=f.valueOf)&&!d(D=s(v,f))||j!=="string"&&c(v=f.toString)&&!d(D=s(v,f)))return D;throw new p("Can't convert object to primitive value")}},9252:function(o,x,a){var s=a(5232),c=a(1664),d=a(5048),p=a(9392),f=a(3951),j=c([].concat);o.exports=s("Reflect","ownKeys")||function(v){var D=d.f(f(v)),O=p.f;return O?j(D,O(v)):D}},584:function(o,x,a){var s=a(8352).f;o.exports=function(c,d,p){p in c||s(c,p,{configurable:!0,get:function(){return d[p]},set:function(f){d[p]=f}})}},9092:function(o,x,a){var s=a(8448),c=a(3951),d=a(4328),p=a(1888),f=a(7680),j=TypeError;o.exports=function(v,D){var O=v.exec;if(d(O)){var Y=s(O,v,D);return Y!==null&&c(Y),Y}if(p(v)==="RegExp")return s(f,v,D);throw new j("RegExp#exec called on incompatible receiver")}},7680:function(o,x,a){var s,c,d=a(8448),p=a(1664),f=a(5016),j=a(8872),v=a(3548),D=a(4696),O=a(9368),Y=a(9104).get,R=a(8e3),E=a(9124),S=D("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,C=y,z=p("".charAt),N=p("".indexOf),H=p("".replace),J=p("".slice),w=(c=/b*/g,d(y,s=/a/,"a"),d(y,c,"a"),s.lastIndex!==0||c.lastIndex!==0),T=v.BROKEN_CARET,V=/()??/.exec("")[1]!==void 0;(w||V||T||R||E)&&(C=function(B){var re,ee,he,Z,ce,ne,fe,se=this,Q=Y(se),ve=f(B),Ne=Q.raw;if(Ne)return Ne.lastIndex=se.lastIndex,re=d(C,Ne,ve),se.lastIndex=Ne.lastIndex,re;var _e=Q.groups,Ce=T&&se.sticky,Re=d(j,se),ze=se.source,P=0,_=ve;if(Ce&&(Re=H(Re,"y",""),N(Re,"g")===-1&&(Re+="g"),_=J(ve,se.lastIndex),se.lastIndex>0&&(!se.multiline||se.multiline&&z(ve,se.lastIndex-1)!==`
|
|
105
|
+
`)&&(ze="(?: "+ze+")",_=" "+_,P++),ee=new RegExp("^(?:"+ze+")",Re)),V&&(ee=new RegExp("^"+ze+"$(?!\\s)",Re)),w&&(he=se.lastIndex),Z=d(y,Ce?ee:se,_),Ce?Z?(Z.input=J(Z.input,P),Z[0]=J(Z[0],P),Z.index=se.lastIndex,se.lastIndex+=Z[0].length):se.lastIndex=0:w&&Z&&(se.lastIndex=se.global?Z.index+Z[0].length:he),V&&Z&&Z.length>1&&d(S,Z[0],ee,(function(){for(ce=1;ce<arguments.length-2;ce++)arguments[ce]===void 0&&(Z[ce]=void 0)})),Z&&_e)for(Z.groups=ne=O(null),ce=0;ce<_e.length;ce++)ne[(fe=_e[ce])[0]]=Z[fe[1]];return Z}),o.exports=C},8872:function(o,x,a){var s=a(3951);o.exports=function(){var c=s(this),d="";return c.hasIndices&&(d+="d"),c.global&&(d+="g"),c.ignoreCase&&(d+="i"),c.multiline&&(d+="m"),c.dotAll&&(d+="s"),c.unicode&&(d+="u"),c.unicodeSets&&(d+="v"),c.sticky&&(d+="y"),d}},3548:function(o,x,a){var s=a(9957),c=a(6420).RegExp,d=s((function(){var j=c("a","y");return j.lastIndex=2,j.exec("abcd")!==null})),p=d||s((function(){return!c("a","y").sticky})),f=d||s((function(){var j=c("^r","gy");return j.lastIndex=2,j.exec("str")!==null}));o.exports={BROKEN_CARET:f,MISSED_STICKY:p,UNSUPPORTED_Y:d}},8e3:function(o,x,a){var s=a(9957),c=a(6420).RegExp;o.exports=s((function(){var d=c(".","s");return!(d.dotAll&&d.test(`
|
|
106
|
+
`)&&d.flags==="s")}))},9124:function(o,x,a){var s=a(9957),c=a(6420).RegExp;o.exports=s((function(){var d=c("(?<a>b)","g");return d.exec("b").groups.a!=="b"||"b".replace(d,"$<a>c")!=="bc"}))},5436:function(o,x,a){var s=a(9760),c=TypeError;o.exports=function(d){if(s(d))throw new c("Can't call method on "+d);return d}},6504:function(o,x,a){var s=a(4696),c=a(7776),d=s("keys");o.exports=function(p){return d[p]||(d[p]=c(p))}},3976:function(o,x,a){var s=a(7048),c=a(6420),d=a(4636),p="__core-js_shared__",f=o.exports=c[p]||d(p,{});(f.versions||(f.versions=[])).push({version:"3.36.0",mode:s?"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,x,a){var s=a(3976);o.exports=function(c,d){return s[c]||(s[c]=d||{})}},9764:function(o,x,a){var s=a(1664),c=a(6180),d=a(5016),p=a(5436),f=s("".charAt),j=s("".charCodeAt),v=s("".slice),D=function(O){return function(Y,R){var E,S,y=d(p(Y)),C=c(R),z=y.length;return C<0||C>=z?O?"":void 0:(E=j(y,C))<55296||E>56319||C+1===z||(S=j(y,C+1))<56320||S>57343?O?f(y,C):E:O?v(y,C,C+2):S-56320+(E-55296<<10)+65536}};o.exports={codeAt:D(!1),charAt:D(!0)}},772:function(o,x,a){var s=a(8504),c=a(9957),d=a(6420).String;o.exports=!!Object.getOwnPropertySymbols&&!c((function(){var p=Symbol("symbol detection");return!d(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},2495:function(o,x,a){var s=a(6180),c=Math.max,d=Math.min;o.exports=function(p,f){var j=s(p);return j<0?c(j+f,0):d(j,f)}},4096:function(o,x,a){var s=a(5712),c=a(5436);o.exports=function(d){return s(c(d))}},6180:function(o,x,a){var s=a(1748);o.exports=function(c){var d=+c;return d!=d||d===0?0:s(d)}},7584:function(o,x,a){var s=a(6180),c=Math.min;o.exports=function(d){var p=s(d);return p>0?c(p,9007199254740991):0}},4356:function(o,x,a){var s=a(5436),c=Object;o.exports=function(d){return c(s(d))}},7024:function(o,x,a){var s=a(8448),c=a(1632),d=a(7728),p=a(4504),f=a(2104),j=a(9972),v=TypeError,D=j("toPrimitive");o.exports=function(O,Y){if(!c(O)||d(O))return O;var R,E=p(O,D);if(E){if(Y===void 0&&(Y="default"),R=s(E,O,Y),!c(R)||d(R))return R;throw new v("Can't convert object to primitive value")}return Y===void 0&&(Y="number"),f(O,Y)}},88:function(o,x,a){var s=a(7024),c=a(7728);o.exports=function(d){var p=s(d,"string");return c(p)?p:p+""}},16:function(o,x,a){var s={};s[a(9972)("toStringTag")]="z",o.exports=String(s)==="[object z]"},5016:function(o,x,a){var s=a(4427),c=String;o.exports=function(d){if(s(d)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return c(d)}},36:function(o){var x=String;o.exports=function(a){try{return x(a)}catch{return"Object"}}},7776:function(o,x,a){var s=a(1664),c=0,d=Math.random(),p=s(1 .toString);o.exports=function(f){return"Symbol("+(f===void 0?"":f)+")_"+p(++c+d,36)}},6536:function(o,x,a){var s=a(772);o.exports=s&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(o,x,a){var s=a(3476),c=a(9957);o.exports=s&&c((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(o,x,a){var s=a(6420),c=a(4328),d=s.WeakMap;o.exports=c(d)&&/native code/.test(String(d))},9972:function(o,x,a){var s=a(6420),c=a(4696),d=a(5152),p=a(7776),f=a(772),j=a(6536),v=s.Symbol,D=c("wks"),O=j?v.for||v:v&&v.withoutSetter||p;o.exports=function(Y){return d(D,Y)||(D[Y]=f&&d(v,Y)?v[Y]:O("Symbol."+Y)),D[Y]}},6488:function(o,x,a){var s=a(5232),c=a(5152),d=a(3440),p=a(7e3),f=a(4024),j=a(9968),v=a(584),D=a(7512),O=a(8948),Y=a(3480),R=a(3696),E=a(3476),S=a(7048);o.exports=function(y,C,z,N){var H="stackTraceLimit",J=N?2:1,w=y.split("."),T=w[w.length-1],V=s.apply(null,w);if(V){var B=V.prototype;if(!S&&c(B,"cause")&&delete B.cause,!z)return V;var re=s("Error"),ee=C((function(he,Z){var ce=O(N?Z:he,void 0),ne=N?new V(he):new V;return ce!==void 0&&d(ne,"message",ce),R(ne,ee,ne.stack,2),this&&p(B,this)&&D(ne,this,ee),arguments.length>J&&Y(ne,arguments[J]),ne}));if(ee.prototype=B,T!=="Error"?f?f(ee,re):j(ee,re,{name:!0}):E&&H in V&&(v(ee,V,H),v(ee,V,"prepareStackTrace")),j(ee,V),!S)try{B.name!==T&&d(B,"name",T),B.constructor=ee}catch{}return ee}}},7476:function(o,x,a){var s=a(9160),c=a(9957),d=a(1432),p=a(1632),f=a(4356),j=a(3556),v=a(4316),D=a(92),O=a(2568),Y=a(953),R=a(9972),E=a(8504),S=R("isConcatSpreadable"),y=E>=51||!c((function(){var z=[];return z[S]=!1,z.concat()[0]!==z})),C=function(z){if(!p(z))return!1;var N=z[S];return N!==void 0?!!N:d(z)};s({target:"Array",proto:!0,arity:1,forced:!y||!Y("concat")},{concat:function(z){var N,H,J,w,T,V=f(this),B=O(V,0),re=0;for(N=-1,J=arguments.length;N<J;N++)if(C(T=N===-1?V:arguments[N]))for(w=j(T),v(re+w),H=0;H<w;H++,re++)H in T&&D(B,re,T[H]);else v(re+1),D(B,re++,T);return B.length=re,B}})},6932:function(o,x,a){var s=a(9160),c=a(3364).filter;s({target:"Array",proto:!0,forced:!a(953)("filter")},{filter:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}})},700:function(o,x,a){var s=a(9160),c=a(1664),d=a(5712),p=a(4096),f=a(1496),j=c([].join);s({target:"Array",proto:!0,forced:d!==Object||!f("join",",")},{join:function(v){return j(p(this),v===void 0?",":v)}})},4456:function(o,x,a){var s=a(9160),c=a(3364).map;s({target:"Array",proto:!0,forced:!a(953)("map")},{map:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}})},4728:function(o,x,a){var s=a(9160),c=a(4356),d=a(3556),p=a(6728),f=a(4316);s({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(j){return j instanceof TypeError}})()},{push:function(j){var v=c(this),D=d(v),O=arguments.length;f(D+O);for(var Y=0;Y<O;Y++)v[D]=arguments[Y],D++;return p(v,D),D}})},8752:function(o,x,a){var s=a(9160),c=a(6420),d=a(908),p=a(6488),f="WebAssembly",j=c[f],v=new Error("e",{cause:7}).cause!==7,D=function(Y,R){var E={};E[Y]=p(Y,R,v),s({global:!0,constructor:!0,arity:1,forced:v},E)},O=function(Y,R){if(j&&j[Y]){var E={};E[Y]=p(f+"."+Y,R,v),s({target:f,stat:!0,constructor:!0,arity:1,forced:v},E)}};D("Error",(function(Y){return function(R){return d(Y,this,arguments)}})),D("EvalError",(function(Y){return function(R){return d(Y,this,arguments)}})),D("RangeError",(function(Y){return function(R){return d(Y,this,arguments)}})),D("ReferenceError",(function(Y){return function(R){return d(Y,this,arguments)}})),D("SyntaxError",(function(Y){return function(R){return d(Y,this,arguments)}})),D("TypeError",(function(Y){return function(R){return d(Y,this,arguments)}})),D("URIError",(function(Y){return function(R){return d(Y,this,arguments)}})),O("CompileError",(function(Y){return function(R){return d(Y,this,arguments)}})),O("LinkError",(function(Y){return function(R){return d(Y,this,arguments)}})),O("RuntimeError",(function(Y){return function(R){return d(Y,this,arguments)}}))},508:function(o,x,a){var s=a(3476),c=a(6208).EXISTS,d=a(1664),p=a(2544),f=Function.prototype,j=d(f.toString),v=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,D=d(v.exec);s&&!c&&p(f,"name",{configurable:!0,get:function(){try{return D(v,j(this))[1]}catch{return""}}})},232:function(o,x,a){var s=a(9160),c=a(9292);s({target:"Object",stat:!0,arity:2,forced:Object.assign!==c},{assign:c})},5443:function(o,x,a){var s=a(16),c=a(6076),d=a(7032);s||c(Object.prototype,"toString",d,{unsafe:!0})},880:function(o,x,a){var s=a(9160),c=a(7680);s({target:"RegExp",proto:!0,forced:/./.exec!==c},{exec:c})},9836:function(o,x,a){var s=a(8448),c=a(7176),d=a(3951),p=a(9760),f=a(7584),j=a(5016),v=a(5436),D=a(4504),O=a(4764),Y=a(9092);c("match",(function(R,E,S){return[function(y){var C=v(this),z=p(y)?void 0:D(y,R);return z?s(z,y,C):new RegExp(y)[R](j(C))},function(y){var C=d(this),z=j(y),N=S(E,C,z);if(N.done)return N.value;if(!C.global)return Y(C,z);var H=C.unicode;C.lastIndex=0;for(var J,w=[],T=0;(J=Y(C,z))!==null;){var V=j(J[0]);w[T]=V,V===""&&(C.lastIndex=O(z,f(C.lastIndex),H)),T++}return T===0?null:w}]}))},3536:function(o,x,a){var s=a(9160),c=a(6420),d=a(6100),p=a(3951),f=a(4328),j=a(7796),v=a(2544),D=a(92),O=a(9957),Y=a(5152),R=a(9972),E=a(336).IteratorPrototype,S=a(3476),y=a(7048),C="constructor",z="Iterator",N=R("toStringTag"),H=TypeError,J=c[z],w=y||!f(J)||J.prototype!==E||!O((function(){J({})})),T=function(){if(d(this,E),j(this)===E)throw new H("Abstract class Iterator not directly constructable")},V=function(B,re){S?v(E,B,{configurable:!0,get:function(){return re},set:function(ee){if(p(this),this===E)throw new H("You can't redefine this property");Y(this,B)?this[B]=ee:D(this,B,ee)}}):E[B]=re};Y(E,N)||V(N,z),!w&&Y(E,C)&&E[C]!==Object||V(C,T),T.prototype=E,s({global:!0,constructor:!0,forced:w},{Iterator:T})},2144:function(o,x,a){var s=a(9160),c=a(8448),d=a(8952),p=a(3951),f=a(6752),j=a(9724),v=a(8696),D=a(7048),O=j((function(){for(var Y,R,E=this.iterator,S=this.predicate,y=this.next;;){if(Y=p(c(y,E)),this.done=!!Y.done)return;if(R=Y.value,v(E,S,[R,this.counter++],!0))return R}}));s({target:"Iterator",proto:!0,real:!0,forced:D},{filter:function(Y){return p(this),d(Y),new O(f(this),{predicate:Y})}})},9080:function(o,x,a){var s=a(9160),c=a(5792);s({target:"Iterator",proto:!0,real:!0,forced:a(7048)},{map:c})}},$={};function F(o){var x=$[o];if(x!==void 0)return x.exports;var a=$[o]={exports:{}};return u[o].call(a.exports,a,a.exports,F),a.exports}F.d=function(o,x){for(var a in x)F.o(x,a)&&!F.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:x[a]})},F.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),F.o=function(o,x){return Object.prototype.hasOwnProperty.call(o,x)},F.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var K={};return(function(){F.r(K),F.d(K,{default:function(){return v}}),F(8752),F(6932),F(700),F(4456),F(4728),F(508),F(232),F(5443),F(880),F(9836),F(3536),F(2144),F(9080);var o=F(680);F(7476);function x(D,O){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Y,R){return Y.__proto__=R,Y},x(D,O)}var a=(function(D){var O,Y;function R(){for(var S,y=arguments.length,C=new Array(y),z=0;z<y;z++)C[z]=arguments[z];return(S=D.call.apply(D,[this].concat(C))||this).state={bump:!1,debounced:!1},S}Y=D,(O=R).prototype=Object.create(Y.prototype),O.prototype.constructor=O,x(O,Y);var E=R.prototype;return E.componentWillMount=function(){var S,y,C,z=this;this.debounceStatusUpdate=(S=function(){if(!z.state.debounced){var N=!z.props.isInFocus||z.props.validChoiceMade;z.setState((function(H){return{bump:!H.bump,debounced:!0,silenced:N}}))}},y=1400,function(){var N=this,H=arguments;clearTimeout(C),C=setTimeout((function(){C=null,S.apply(N,H)}),y)})},E.componentWillReceiveProps=function(S){S.queryLength,this.setState({debounced:!1})},E.render=function(){var S=this.props,y=S.id,C=S.length,z=S.queryLength,N=S.minQueryLength,H=S.selectedOption,J=S.selectedOptionIndex,w=S.tQueryTooShort,T=S.tNoResults,V=S.tSelectedOption,B=S.tResults,re=S.className,ee=this.state,he=ee.bump,Z=ee.debounced,ce=ee.silenced,ne=z<N,fe=C===0,se=H?V(H,C,J):"",Q=null;return Q=ne?w(N):fe?T():B(C,se),this.debounceStatusUpdate(),(0,o.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,o.createElement)("div",{id:y+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!ce&&Z&&he?Q:""),(0,o.createElement)("div",{id:y+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},ce||!Z||he?"":Q))},R})(o.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,Y){return D+" "+(Y+1)+" of "+O+" is highlighted"},tResults:function(D,O){return D+" "+(D===1?"result":"results")+" "+(D===1?"is":"are")+" available. "+O}};var s=function(D){var O=D.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:O,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 c(){return c=Object.assign?Object.assign.bind():function(D){for(var O=1;O<arguments.length;O++){var Y=arguments[O];for(var R in Y)Object.prototype.hasOwnProperty.call(Y,R)&&(D[R]=Y[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(Y,R){return Y.__proto__=R,Y},p(D,O)}var f={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function j(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var v=(function(D){var O,Y;function R(S){var y;return(y=D.call(this,S)||this).elementReferences={},y.state={focused:null,hovered:null,menuOpen:!1,options:S.defaultValue?[S.defaultValue]:[],query:S.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}Y=D,(O=R).prototype=Object.create(Y.prototype),O.prototype.constructor=O,p(O,Y);var E=R.prototype;return E.isQueryAnOption=function(S,y){var C=this;return y.map((function(z){return C.templateInputValue(z).toLowerCase()})).indexOf(S.toLowerCase())!==-1},E.componentDidMount=function(){this.pollInputElement()},E.componentWillUnmount=function(){clearTimeout(this.$pollInput)},E.pollInputElement=function(){var S=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){S.pollInputElement()}),100)},E.getDirectInputChanges=function(){var S=this.elementReferences[-1];S&&S.value!==this.state.query&&this.handleInputChange({target:{value:S.value}})},E.componentDidUpdate=function(S,y){var C=this.state.focused,z=C===null,N=y.focused!==C;N&&!z&&this.elementReferences[C].focus();var H=C===-1,J=N&&y.focused===null;if(H&&J){var w=this.elementReferences[C];w.setSelectionRange(0,w.value.length)}},E.hasAutoselect=function(){return!j()&&this.props.autoselect},E.templateInputValue=function(S){var y=this.props.templates&&this.props.templates.inputValue;return y?y(S):S},E.templateSuggestion=function(S){var y=this.props.templates&&this.props.templates.suggestion;return y?y(S):S},E.handleComponentBlur=function(S){var y,C=this.state,z=C.options,N=C.query,H=C.selected;this.props.confirmOnBlur?(y=S.query||N,this.props.onConfirm(z[H])):y=N,this.setState({focused:null,menuOpen:S.menuOpen||!1,query:y,selected:null,validChoiceMade:this.isQueryAnOption(y,z)})},E.handleListMouseLeave=function(S){this.setState({hovered:null})},E.handleOptionBlur=function(S,y){var C=this.state,z=C.focused,N=C.menuOpen,H=C.options,J=C.selected,w=S.relatedTarget===null,T=S.relatedTarget===this.elementReferences[-1],V=z!==y&&z!==-1;if(!V&&w||!(V||T)){var B=N&&j();this.handleComponentBlur({menuOpen:B,query:this.templateInputValue(H[J])})}},E.handleInputBlur=function(S){var y=this.state,C=y.focused,z=y.menuOpen,N=y.options,H=y.query,J=y.selected;if(C===-1){var w=z&&j(),T=j()?H:this.templateInputValue(N[J]);this.handleComponentBlur({menuOpen:w,query:T})}},E.handleInputChange=function(S){var y=this,C=this.props,z=C.minLength,N=C.source,H=C.showAllValues,J=this.hasAutoselect(),w=S.target.value,T=w.length===0,V=this.state.query!==w,B=w.length>=z;this.setState({query:w,ariaHint:T}),H||!T&&V&&B?N(w,(function(re){var ee=re.length>0;y.setState({menuOpen:ee,options:re,selected:J&&ee?0:-1,validChoiceMade:!1})})):!T&&B||this.setState({menuOpen:!1,options:[]})},E.handleInputClick=function(S){this.handleInputChange(S)},E.handleInputFocus=function(S){var y=this.state,C=y.query,z=y.validChoiceMade,N=y.options,H=this.props.minLength,J=!z&&C.length>=H&&N.length>0;J?this.setState((function(w){var T=w.menuOpen;return{focused:-1,menuOpen:J||T,selected:-1}})):this.setState({focused:-1})},E.handleOptionFocus=function(S){this.setState({focused:S,hovered:null,selected:S})},E.handleOptionMouseEnter=function(S,y){j()||this.setState({hovered:y})},E.handleOptionClick=function(S,y){var C=this.state.options[y],z=this.templateInputValue(C);this.props.onConfirm(C),this.setState({focused:-1,hovered:null,menuOpen:!1,query:z,selected:-1,validChoiceMade:!0}),this.forceUpdate()},E.handleOptionMouseDown=function(S){S.preventDefault()},E.handleUpArrow=function(S){S.preventDefault();var y=this.state,C=y.menuOpen,z=y.selected;z!==-1&&C&&this.handleOptionFocus(z-1)},E.handleDownArrow=function(S){var y=this;if(S.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)S.preventDefault(),this.props.source("",(function(J){y.setState({menuOpen:!0,options:J,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var C=this.state,z=C.menuOpen,N=C.options,H=C.selected;H!==N.length-1&&z&&this.handleOptionFocus(H+1)}},E.handleSpace=function(S){var y=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(S.preventDefault(),this.props.source("",(function(C){y.setState({menuOpen:!0,options:C})}))),this.state.focused!==-1&&(S.preventDefault(),this.handleOptionClick(S,this.state.focused))},E.handleEnter=function(S){this.state.menuOpen&&(S.preventDefault(),this.state.selected>=0&&this.handleOptionClick(S,this.state.selected))},E.handlePrintableKey=function(S){var y=this.elementReferences[-1];S.target===y||y.focus()},E.handleKeyDown=function(S){switch(f[S.keyCode]){case"up":this.handleUpArrow(S);break;case"down":this.handleDownArrow(S);break;case"space":this.handleSpace(S);break;case"enter":this.handleEnter(S);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((y=S.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(S)}var y},E.render=function(){var S,y=this,C=this.props,z=C.cssNamespace,N=C.displayMenu,H=C.id,J=C.minLength,w=C.name,T=C.placeholder,V=C.required,B=C.showAllValues,re=C.tNoResults,ee=C.tStatusQueryTooShort,he=C.tStatusNoResults,Z=C.tStatusSelectedOption,ce=C.tStatusResults,ne=C.tAssistiveHint,fe=C.dropdownArrow,se=C.menuAttributes,Q=C.inputClasses,ve=C.hintClasses,Ne=C.menuClasses,_e=this.state,Ce=_e.focused,Re=_e.hovered,ze=_e.menuOpen,P=_e.options,_=_e.query,W=_e.selected,k=_e.ariaHint,A=_e.validChoiceMade,I=this.hasAutoselect(),te=Ce===-1,oe=P.length===0,be=_.length!==0,de=_.length>=J,pe=this.props.showNoOptionsFound&&te&&oe&&be&&de,xe=z+"__wrapper",Ae=z+"__status",$e=z+"__dropdown-arrow-down",Ie=Ce!==-1&&Ce!==null,Ge=z+"__option",Qe=z+"__hint",ye=this.templateInputValue(P[W]),we=ye&&ye.toLowerCase().indexOf(_.toLowerCase())===0&&I?_+ye.substr(_.length):"",Ze=H+"__assistiveHint",tt={"aria-describedby":k?Ze:null,"aria-expanded":ze?"true":"false","aria-activedescendant":Ie?H+"__option--"+Ce:null,"aria-controls":H+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};B&&typeof(S=fe({className:$e}))=="string"&&(S=(0,o.createElement)("div",{className:z+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:S}}));var ht=z+"__input",vt=[ht,this.props.showAllValues?ht+"--show-all-values":ht+"--default"];Ce!==null&&vt.push(ht+"--focused"),Q&&vt.push(Q);var pt=z+"__menu",lt=[pt,pt+"--"+N,pt+"--"+(ze||pe?"visible":"hidden")];Ne&<.push(Ne),(se!=null&&se.class||se!=null&&se.className)&<.push((se==null?void 0:se.class)||(se==null?void 0:se.className));var _t=Object.assign({"aria-labelledby":H},se,{id:H+"__listbox",role:"listbox",className:lt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete _t.class,(0,o.createElement)("div",{className:xe,onKeyDown:this.handleKeyDown},(0,o.createElement)(a,{id:H,length:P.length,queryLength:_.length,minQueryLength:J,selectedOption:this.templateInputValue(P[W]),selectedOptionIndex:W,validChoiceMade:A,isInFocus:this.state.focused!==null,tQueryTooShort:ee,tNoResults:he,tSelectedOption:Z,tResults:ce,className:Ae}),we&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:[Qe,ve===null?Q:ve].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:we})),(0,o.createElement)("input",c({},tt,{autoComplete:"off",className:vt.join(" "),id:H,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:w,placeholder:T,ref:function(bt){y.elementReferences[-1]=bt},type:"text",role:"combobox",required:V,value:_})),S,(0,o.createElement)("ul",_t,P.map((function(bt,Ue){var gt=(Ce===-1?W===Ue:Ce===Ue)&&Re===null?" "+Ge+"--focused":"",ft=Ue%2?" "+Ge+"--odd":"",ut=j()?"<span id="+H+"__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,o.createElement)("li",{"aria-selected":Ce===Ue?"true":"false",className:""+Ge+gt+ft,dangerouslySetInnerHTML:{__html:y.templateSuggestion(bt)+ut},id:H+"__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})})),pe&&(0,o.createElement)("li",{className:Ge+" "+Ge+"--no-results",role:"option","aria-disabled":"true"},re())),(0,o.createElement)("span",{id:Ze,style:{display:"none"}},ne()))},R})(o.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:s,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),K})()}))})(ya)),ya.exports}var rr,bn;function Tc(){return bn||(bn=1,rr=jc()),rr}var Cc=Tc();const Nc=ol(Cc),Pc=({value:g,defaultValue:i="",onConfirm:m,source:u,disabled:$,onClear:F,tClearInput:K=()=>"Clear input",...o})=>{const x=q.useRef(null),a=p=>{setTimeout(()=>{x.current&&(x.current.elementReferences[-1].value=p)},0)};q.useEffect(()=>{g!==void 0&&a(g)},[g]),q.useEffect(()=>{$?x.current&&(x.current.elementReferences[-1].disabled=!0):x.current&&(x.current.elementReferences[-1].disabled=!1)},[$]);const s=()=>{F&&F()},c=(p,f)=>{x.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&u(p,f)},d=p=>{p?m(p):a(g)};return h.jsxs("div",{style:{position:"relative",width:"100%"},children:[h.jsx(Nc,{ref:x,...o,defaultValue:i,onConfirm:d,source:c}),!!(g&&g.length>0&&!$)&&h.jsx("button",{onClick:s,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":K(),children:h.jsx(ue.Icon,{icon:"it-close",size:"sm",title:K()})})]})},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:g,areasLayer:i,bounds:m,onMarkedMoved:u})=>{const $=q.useRef(null);let F=null;const[K,o]=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],s=()=>{const c=Rt.map($.current,{keyboard:!1,minZoom:6,maxZoom:17}).setView(a,10);x.addTo(c),i&&i.map(p=>{p.addTo(c)});const d=g?[`${g.lat}`,`${g.lon}`]:m?m.getCenter():a;if(delete Rt.Icon.Default.prototype._getIconUrl,Rt.Icon.Default.mergeOptions({iconRetinaUrl:Ec,iconUrl:Ac,shadowUrl:Rc}),F=Rt.marker(d,{draggable:!0}).addTo(c),F.on("moveend",function(p){const f=p.target.getLatLng();u(f,F)}),!g&&m)c.fitBounds(m);else{const p=g?[g.lat,g.lon]:a;F&&(F.setLatLng(p).update(),c.setView(p,15))}};return q.useEffect(()=>{$.current&&s()},[$]),h.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:h.jsx("div",{ref:$,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},Fc=({component:g,value:i,current:m,onChange:u,i18next:$})=>{const[F,K]=q.useState(null),[o,x]=q.useState([]),[a,s]=q.useState(),[c,d]=q.useState(),[p,f]=q.useState(!1),[j,v]=q.useState(),[D,O]=q.useState(!1),[Y,R]=q.useState(),[E,S]=q.useState(),[y,C]=q.useState(!1),[z,N]=q.useState(""),[H,J]=q.useState(""),[w,T]=q.useState(!1),[V,B]=q.useState(!1),ee=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:he}=window.OC_SERVICE_DETAILS,Z=q.useRef(),ce=$.language;let ne=Rt.latLngBounds();const fe=ee||(he&&he.length>0?he:void 0),se=(P,_)=>{Z.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=${ce}`;let k=[],A=[];O(!0),fetch(W).then(I=>I.json()).then(I=>{if(I.length&&Z.current===P){O(!0);const te=I.map((oe,be)=>{const{lat:de,lon:pe}=oe,xe=`${Fe()}/api/geographic-areas/contains?lat=${de}&lon=${pe}&geographic_areas_ids=${j.join(",")}`;return fetch(xe).then(Ae=>Ae.json()).then(Ae=>Ae.result?(oe.label=Za(oe),oe):null)});return Promise.all(te)}else Z.current===P&&(_([]),O(!1))}).then(I=>{I=I?I.filter(te=>te!==null):[],I.length>0?(I.forEach((te,oe)=>{I[oe].label=Za(te)}),I=en.uniqWith(I,(te,oe)=>te.label===oe.label),I.forEach((te,oe)=>{A.push(te.label),k.push(te)}),Z.current===P&&(_(A),x(k),O(!1))):Z.current===P&&(_([]),O(!1))}).catch(I=>{console.error("Error fetching locations:",I),O(!1)})},Q=(P,_)=>{se(P,_)},ve=(P,_)=>{const{lat:W,lng:k}=P,A=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${W}&lon=${k}&accept-language=${ce}`;fetch(A).then(I=>I.json()).then(I=>{if(I&&I.display_name)if(I.label=Za(I),I.lat=W,I.lon=k,_)_.bindPopup(`${I.label}`).openPopup(),S(I);else{S(I);return}}).catch(I=>console.error("Error with reverse geocoding:",I))};function Ne(){navigator.geolocation.getCurrentPosition(P=>{let _=P.coords.latitude,W=P.coords.longitude;if((j||[]).length>0){const A=`${Fe()}/api/geographic-areas/contains?lat=${_}&lon=${W}&geographic_areas_ids=${j.join(",")}`;fetch(A).then(I=>I.json()).then(I=>{I.result&&(K({lat:_,lon:W}),ve({lat:_,lng:W})),B(!V)})}else K({lat:_,lon:W}),ve({lat:_,lng:W}),B(!V)},P=>{(P==null?void 0:P.code)===1?(T(!w),J($.t("error_message_code_1"))):(P==null?void 0:P.code)===2?(T(!w),J($.t("error_message_code_2"))):(P==null?void 0:P.code)===3?(T(!w),J($.t("error_message_code_3"))):(T(!w),J($.t("error_message_generic")))})}q.useEffect(()=>{i&&K(i),m.valuePosition&&K(m.valuePosition)},[i,m]);const _e=()=>{i&&K(i),m.valuePosition&&K(m.valuePosition)};q.useEffect(()=>{var P;(P=window==null?void 0:window.Formio)==null||P.formioReady.then(()=>{setTimeout(()=>{_e(),Ce()},1)})},[]);const Ce=()=>{let _=`${Fe()}/api/geographic-areas`,W=[],k=[];fetch(_).then(A=>A.json()).then(A=>{if(Array.isArray(A)&&A.length>0){A.filter(oe=>fe?Array.isArray(fe)?fe.includes(oe.id):oe.id===fe:!0).forEach(oe=>{W.push(oe.id);const be=JSON.parse(oe.geofence),de=Rt.geoJSON(be,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(pe){return pe.geometry.type==="Polygon"||pe.geometry.type==="MultiPolygon"}});ne.extend(de.getBounds()),k.push(de)}),d(k),v(W),R(ne);const I=ne.getNorthEast(),te=ne.getSouthWest();s([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=()=>{N(F!=null&&F.label?F.label:"")};q.useEffect(()=>{Re(),u(F)},[F]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&y===!1?C(!0):C(!1)},[]);const ze=()=>{if(E){const P=`${Fe()}/api/geographic-areas/contains?lat=${E.lat}&lon=${E.lon}&geographic_areas_ids=${j.join(",")}`;f(!0),fetch(P).then(_=>_.json()).then(_=>{f(!1),_?_.result===!1?Je.fire({title:"",html:"<p>"+$.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:$.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):_.result===!0&&(B(!V),K(E)):(f(!1),console.log("No geographic-areas/contains ."))}).catch(_=>{console.error("Error with geographic-areas/contains:",_),Je.fire({title:"",html:"<p>"+_+"</p>",icon:"error",cancelButtonText:$.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return h.jsx("div",{children:h.jsxs("div",{id:`address-map-container-${g.key}`,className:"address-map-container",children:[h.jsx("div",{children:h.jsxs(ue.Modal,{wrapClassName:"formio-component-address_map",isOpen:V,size:"lg",scrollable:!0,toggle:()=>B(!V),labelledBy:"esempio2",container:document.body,children:[h.jsx(ue.ModalHeader,{toggle:()=>B(!V),id:"esempio2",children:$.t("Individua il luogo sulla mappa")}),h.jsxs(ue.ModalBody,{children:[h.jsx("p",{children:h.jsx("small",{children:$.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:F,areasLayer:c,bounds:Y,onMarkedMoved:(P,_)=>{ve(P,_)}})]}),h.jsxs(ue.ModalFooter,{children:[h.jsx(ue.Button,{color:"secondary",onClick:()=>B(!V),children:$.t("Chiudi")}),h.jsx(ue.Button,{color:"primary",onClick:()=>{ze()},disabled:!E||p,children:$.t("Salva indirizzo")})]})]})}),h.jsx("div",{children:h.jsxs(ue.Modal,{isOpen:w,toggle:()=>T(!w),withIcon:!0,labelledBy:"error-modal-message",container:document.body,children:[h.jsx(ue.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:$.t("warning")}),h.jsx(ue.ModalBody,{children:h.jsx("p",{children:H})}),h.jsx(ue.ModalFooter,{children:h.jsx(ue.Button,{color:"primary",onClick:()=>T(!w),children:$.t("close")})})]})}),h.jsxs("div",{className:"position-relative",children:[h.jsx(Pc,{id:`${g.id}-${g.key}`,inputClasses:"form-control",source:en.debounce(Q,520),onConfirm:P=>{if(O(!1),Z.current="",P){P===""&&K(null);let _=o.find(W=>W.label===P);K(_)}},onClear:()=>{O(!1),Z.current="",K(null)},dropdownArrow:()=>null,minLength:3,disabled:y,confirmOnBlur:!0,showNoOptionsFound:!D,defaultValue:F==null?void 0:F.label,value:z,tNoResults:()=>$.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>$.t("Clear input")}),D&&h.jsx("div",{className:"position-absolute",style:{width:"100%",bottom:"0px"},children:h.jsx(ue.Progress,{indeterminate:!0,label:"In elaborazione..."})})]}),!y&&h.jsxs(ue.Button,{type:"button",value:$.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Ne():(B(!0),S(!1))},icon:!0,className:"px-0 primary-color",children:[h.jsx(ue.Icon,{color:"primary",icon:"it-map-marker-circle",role:"presentation"}),h.jsx("span",{children:$.t("Individua con precisione sulla mappa")})]})]})})},ja=class ja extends ot.ReactComponent{constructor(i,m,u){super(i,m,u)}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,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Fc,{ref:m,component:this.component,value:this.dataValue,onChange:u=>this.setValue(u),...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 Ma=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(...g){return ot.Components.baseEditForm([{key:"display",components:zc}],...g)}const wn=cr.Formio.Components.components.input,Wc=({component:g,current:i,onChange:m,i18next:u})=>{var J,w;const $="list-services",F="selected-category",[K,o]=q.useState([]),[x,a]=q.useState([]),[s,c]=q.useState(null),[d,p]=q.useState(null),[f,j]=q.useState(""),[v,D]=q.useState(!1),[O,Y]=q.useState(!1),R=q.useRef(!1),E=q.useRef(),S=q.useMemo(()=>{if(!s)return null;const T=x.find(B=>B.name===s);return T||K.find(B=>B.name===s)||null},[s,x,K]),y=q.useMemo(()=>(S==null?void 0:S.services)||[],[S]),C=async()=>{var Z,ce;Y(!0);const T=sessionStorage.getItem($),V=sessionStorage.getItem(F);if(T)try{const ne=JSON.parse(T);if(Array.isArray(ne)&&ne.length>0){o(ne),a(ne);const fe=ne.find(se=>se.name===V)||ne[0];return c((fe==null?void 0:fe.name)||null),Y(!1),ne}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const B=await window.FormioHelper.getBookingConfig(),re={};B.forEach(ne=>{(ne.categories??[]).forEach(fe=>{re[fe]||(re[fe]={name:fe,services:[]}),re[fe].services.push(ne)})});const ee=Object.fromEntries(Object.entries(re).sort(([ne],[fe])=>ne.localeCompare(fe,"it",{sensitivity:"base"}))),he=Object.values(ee).filter(ne=>(ne.name??"").trim()!=="");return o(he),a(he),c(((Z=he[0])==null?void 0:Z.name)||null),sessionStorage.setItem($,JSON.stringify(he)),sessionStorage.setItem(F,((ce=he[0])==null?void 0:ce.name)||""),Y(!1),he};q.useEffect(()=>{s&&sessionStorage.setItem(F,s)},[s]),q.useEffect(()=>{R.current||(R.current=!0,C())},[]);const z=T=>{var Q;const V=(ve="")=>ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),B=(ve="")=>ve.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),re=(ve="")=>ve.replace(/<[^>]*>/g," "),ee=(ve,Ne)=>new RegExp(`\\b${V(Ne)}`,"i").test(ve),he=(ve,Ne)=>{const _e=B(ve.name),Ce=B((ve.categories??[]).join(" ")),Re=B(re(ve.abstract??""));if(!Ne.every(_=>ee(_e,_)||ee(Ce,_)||ee(Re,_)))return-1;let P=0;for(const _ of Ne)ee(_e,_)?P+=3:ee(Ce,_)?P+=2:ee(Re,_)&&(P+=1);return P},Z=T.target.value;j(Z);const ce=B(Z);if(!ce){a(K),c(ve=>{var Ne;return ve??((Ne=K[0])==null?void 0:Ne.name)??null});return}const ne=ce.split(" ").filter(Boolean),fe=K.map(ve=>{const Ne=ve.services.map(_e=>({service:_e,score:he(_e,ne)})).filter(_e=>_e.score>=0).sort((_e,Ce)=>Ce.score-_e.score).map(_e=>_e.service);return Ne.length?{...ve,services:Ne}:null}).filter(Boolean);a(fe);const se=fe.some(ve=>ve.name===s);c(se?s:((Q=fe[0])==null?void 0:Q.name)??null)},N=T=>{p(T);const V=K.find(B=>B.services.some(re=>re.id===T.id));V&&c(V.name),m({id:T.id,link:T.link,name:T.name,show_howto_in_motivation:T.show_howto_in_motivation,categories:T.categories,offices:T.offices,abstract:T.abstract,view_type:T.view_type}),i.data.user_group=null,jn()},H=T=>{c(T.name),p(null),j(""),a(K),m({})};return q.useEffect(()=>{const T=!!document.querySelector(".formio-read-only");D(T)},[]),q.useEffect(()=>{const T=setTimeout(()=>{const V=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(V!=null&&V.id&&(p(V),K.length>0)){const B=K.find(re=>re.services.some(ee=>ee.id===V.id));B&&c(B.name)}},500);return()=>clearTimeout(T)},[i==null?void 0:i.dataValue,i==null?void 0:i.data,K]),q.useEffect(()=>{const T=window.FormioInstance;if(!T)return;const V=()=>{var re,ee,he;const B=(he=(re=T.submission)==null?void 0:re.data)==null?void 0:he[(ee=i==null?void 0:i.component)==null?void 0:ee.key];if(B!=null&&B.id&&(p(B),K.length>0)){const Z=K.find(ce=>ce.services.some(ne=>ne.id===B.id));Z&&c(Z.name)}};return T.on("change",V),()=>T.off("change",V)},[K,(J=i==null?void 0:i.component)==null?void 0:J.key]),O?h.jsx("div",{className:"services-booking",ref:E,children:h.jsxs("div",{children:[u.t("Caricamento in corso"),"..."]})}):h.jsx("div",{className:"services-booking",ref:E,children:K&&!v?h.jsxs(ue.Container,{children:[h.jsx(ue.Row,{className:"mb-3",children:h.jsx(ue.Col,{children:h.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:u.t("Seleziona il servizio per cui stai richiedendo un appuntamento")})})}),h.jsx(ue.Row,{className:"mb-3",children:h.jsx(ue.Col,{children:h.jsx("div",{className:"search-container",children:h.jsx(ue.Input,{id:"search",label:u.t("Cerca"),type:"text",value:f,onChange:z,onInput:z,infoText:u.t("Cerca per categoria, servizio o descrizione")})})})}),h.jsxs(ue.Row,{className:"mb-3",children:[S?h.jsx(ue.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:u.t("Categorie")}),x.length>0&&x.map(T=>{const V=s===T.name;return h.jsxs("button",{onClick:()=>H(T),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${V?"category-active bg-primary text-white":"bg-light text-dark"}`,children:[h.jsx("span",{className:"fw-500 d-block",children:T.name}),h.jsxs("small",{className:`d-block mt-1 ${V?"text-white":"text-muted"}`,children:[T.services.length," ",T.services.length>1?u.t("servizi"):u.t("servizio")]})]},T.name)})]})}):null,h.jsx(ue.Col,{lg:S?9:12,md:S?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:S==null?void 0:S.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(T=>{const V=(d==null?void 0:d.id)===T.id,B=sl.sanitize(T==null?void 0:T.abstract);return h.jsx("button",{onClick:()=>N(T),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${V?"border-primary border-2 bg-light":"border-light border-1 bg-white"}`,style:{cursor:"pointer"},tabindex:"0",role:"button","aria-label":`${T.name}`,"aria-pressed":V,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:T.name}),(T==null?void 0:T.abstract)&&h.jsx("p",{className:"text-muted small mb-0",dangerouslySetInnerHTML:{__html:B}})]})})},T.id)})}):h.jsx("div",{className:"alert alert-info text-italic",children:u.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:S==null?void 0:S.name})})}),h.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:(w=i==null?void 0:i.dataValue)!=null&&w.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,m,u){super(i,m,u)}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,m){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Wc,{ref:m,component:this.component,onChange:u=>this.setValue(u),...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:_a,dynamic_calendar:Yn,calendar:ba,"calendar-advanced":wa,sdcfile:xa,address_map:Ma,"list-services":Sa};function Vc(g){if(!g||typeof g.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(ur).forEach(([i,m])=>{g.addComponent(i,m)}),ur}exports.Calendar=ba;exports.CalendarAdvanced=wa;exports.FormioAddressMap=Ma;exports.FormioDynamicCalendar=Yn;exports.FormioListServices=Sa;exports.FormioPageBreak=_a;exports.SdcFile=xa;exports.formioCustomComponents=ur;exports.registerFormioComponents=Vc;
|
|
107
107
|
//# sourceMappingURL=index.cjs.map
|