@opencitylabs/formio-custom-components 0.3.0 → 0.3.1
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 +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +816 -805
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),tt=require("@formio/react"),Et=require("react-dom/client"),vr=require("react-day-picker"),Es=require("react-countdown"),he=require("moment"),ue=require("design-react-kit"),He=require("sweetalert2");require("i18next");const Me=require("dayjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),tt=require("@formio/react"),Et=require("react-dom/client"),vr=require("react-day-picker"),Es=require("react-countdown"),he=require("moment"),ue=require("design-react-kit"),He=require("sweetalert2");require("i18next");const Me=require("dayjs"),hn=require("@formio/js"),li=require("@event-calendar/core"),bc=require("react-dropzone"),$t=require("axios"),wc=require("mime"),As=require("dompurify"),Sc=require("jwt-decode"),Rt=require("leaflet"),ui=require("lodash");var fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fn(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var mr={exports:{}},Zt={};var ci;function Mc(){if(ci)return Zt;ci=1;var l=G,s=Symbol.for("react.element"),c=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,M=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,x={key:!0,ref:!0,__self:!0,__source:!0};function I(o,y,r){var u,h={},f=null,p=null;r!==void 0&&(f=""+r),y.key!==void 0&&(f=""+y.key),y.ref!==void 0&&(p=y.ref);for(u in y)i.call(y,u)&&!x.hasOwnProperty(u)&&(h[u]=y[u]);if(o&&o.defaultProps)for(u in y=o.defaultProps,y)h[u]===void 0&&(h[u]=y[u]);return{$$typeof:s,type:o,key:f,ref:p,props:h,_owner:M.current}}return Zt.Fragment=c,Zt.jsx=I,Zt.jsxs=I,Zt}var Qt={};var di;function xc(){return di||(di=1,process.env.NODE_ENV!=="production"&&(function(){var l=G,s=Symbol.for("react.element"),c=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),o=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),r=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,Y="@@iterator";function _(b){if(b===null||typeof b!="object")return null;var U=g&&b[g]||b[Y];return typeof U=="function"?U:null}var k=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(b){{for(var U=arguments.length,Q=new Array(U>1?U-1:0),le=1;le<U;le++)Q[le-1]=arguments[le];j("error",b,Q)}}function j(b,U,Q){{var le=k.ReactDebugCurrentFrame,ye=le.getStackAddendum();ye!==""&&(U+="%s",Q=Q.concat([ye]));var xe=Q.map(function(Se){return String(Se)});xe.unshift("Warning: "+U),Function.prototype.apply.call(console[b],console,xe)}}var F=!1,R=!1,O=!1,v=!1,T=!1,w;w=Symbol.for("react.module.reference");function S(b){return!!(typeof b=="string"||typeof b=="function"||b===i||b===x||T||b===M||b===r||b===u||v||b===p||F||R||O||typeof b=="object"&&b!==null&&(b.$$typeof===f||b.$$typeof===h||b.$$typeof===I||b.$$typeof===o||b.$$typeof===y||b.$$typeof===w||b.getModuleId!==void 0))}function V(b,U,Q){var le=b.displayName;if(le)return le;var ye=U.displayName||U.name||"";return ye!==""?Q+"("+ye+")":Q}function E(b){return b.displayName||"Context"}function A(b){if(b==null)return null;if(typeof b.tag=="number"&&C("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 i:return"Fragment";case c:return"Portal";case x:return"Profiler";case M:return"StrictMode";case r:return"Suspense";case u:return"SuspenseList"}if(typeof b=="object")switch(b.$$typeof){case o:var U=b;return E(U)+".Consumer";case I:var Q=b;return E(Q._context)+".Provider";case y:return V(b,b.render,"ForwardRef");case h:var le=b.displayName||null;return le!==null?le:A(b.type)||"Memo";case f:{var ye=b,xe=ye._payload,Se=ye._init;try{return A(Se(xe))}catch{return null}}}return null}var z=Object.assign,B=0,ee,ie,re,fe,te,de,ve;function me(){}me.__reactDisabledLog=!0;function oe(){{if(B===0){ee=console.log,ie=console.info,re=console.warn,fe=console.error,te=console.group,de=console.groupCollapsed,ve=console.groupEnd;var b={configurable:!0,enumerable:!0,value:me,writable:!0};Object.defineProperties(console,{info:b,log:b,warn:b,error:b,group:b,groupCollapsed:b,groupEnd:b})}B++}}function Z(){{if(B--,B===0){var b={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},b,{value:ee}),info:z({},b,{value:ie}),warn:z({},b,{value:re}),error:z({},b,{value:fe}),group:z({},b,{value:te}),groupCollapsed:z({},b,{value:de}),groupEnd:z({},b,{value:ve})})}B<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ne=k.ReactCurrentDispatcher,Ie;function Ce(b,U,Q){{if(Ie===void 0)try{throw Error()}catch(ye){var le=ye.stack.trim().match(/\n( *(at )?)/);Ie=le&&le[1]||""}return`
|
|
2
2
|
`+Ie+b}}var Oe=!1,$;{var J=typeof WeakMap=="function"?WeakMap:Map;$=new J}function X(b,U){if(!b||Oe)return"";{var Q=$.get(b);if(Q!==void 0)return Q}var le;Oe=!0;var ye=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var xe;xe=Ne.current,Ne.current=null,oe();try{if(U){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(Je){le=Je}Reflect.construct(b,[],Se)}else{try{Se.call()}catch(Je){le=Je}b.call(Se.prototype)}}else{try{throw Error()}catch(Je){le=Je}b()}}catch(Je){if(Je&&le&&typeof Je.stack=="string"){for(var we=Je.stack.split(`
|
|
3
3
|
`),qe=le.stack.split(`
|
|
4
4
|
`),Fe=we.length-1,Le=qe.length-1;Fe>=1&&Le>=0&&we[Fe]!==qe[Le];)Le--;for(;Fe>=1&&Le>=0;Fe--,Le--)if(we[Fe]!==qe[Le]){if(Fe!==1||Le!==1)do if(Fe--,Le--,Le<0||we[Fe]!==qe[Le]){var Be=`
|
|
@@ -11,7 +11,7 @@ Check the top-level render call using <`+Q+">.")}return U}}function tr(b,U){{if(
|
|
|
11
11
|
<%s {...props} />
|
|
12
12
|
React keys must be passed directly to JSX without using spread:
|
|
13
13
|
let props = %s;
|
|
14
|
-
<%s key={someKey} {...props} />`,Bt,mt,jr,mt),Ft[mt+Bt]=!0}}return b===i?be(Le):et(Le),Le}}function Tt(b,U,Q){return Te(b,U,Q,!0)}function Cr(b,U,Q){return Te(b,U,Q,!1)}var Vt=Cr,Ge=Tt;Qt.Fragment=i,Qt.jsx=Vt,Qt.jsxs=Ge})()),Qt}var
|
|
14
|
+
<%s key={someKey} {...props} />`,Bt,mt,jr,mt),Ft[mt+Bt]=!0}}return b===i?be(Le):et(Le),Le}}function Tt(b,U,Q){return Te(b,U,Q,!0)}function Cr(b,U,Q){return Te(b,U,Q,!1)}var Vt=Cr,Ge=Tt;Qt.Fragment=i,Qt.jsx=Vt,Qt.jsxs=Ge})()),Qt}var hi;function Dc(){return hi||(hi=1,process.env.NODE_ENV==="production"?mr.exports=Mc():mr.exports=xc()),mr.exports}var m=Dc();const kc=l=>{const s=G.useRef();return m.jsx("div",{ref:s,className:"row page-break-before pagebreak-container",children:m.jsx("div",{className:"col-12 text-center pagebreak-component",children:"Page break"})})};class yr extends tt.ReactComponent{constructor(s,c,i){super(s,c,i)}static schema(){return tt.ReactComponent.schema({type:"pagebreak"})}static builderInfo={title:"PageBreak",group:"basic",icon:"bi bi-file-break",weight:70,schema:yr.schema()};render(){return super.render("<div></div>")}attach(s){return super.attach(s)}getValue(){return""}setValue(s){}attachReact(s,c){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(kc,{ref:c,...this,current:this}))}}const Ee=()=>{const l=window.location,s=new RegExp("qa.bugliano.pi.it|localhost|opencity-labs.gitlab.io|form-builder-qa.stanzadelcittadino.it","g");let c=null;if(s.test(l.hostname))c="https://servizi.comune-qa.bugliano.pi.it/lang";else if(window.BASE_URL)c=window.BASE_URL;else{const i=l.pathname.split("/");c=l.origin+"/"+i[1]}return c},Oc=[{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:Ee()+"/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 = '"+Ee()+"'; 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:Ee()+"/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) {
|
|
15
15
|
let url = data.url + '/api/calendars/' + data.calendarId + '/overlaps';
|
|
16
16
|
if (data.select_opening_hours && data.opening_hours.length > 0) {
|
|
17
17
|
let qs = "?opening_hours=" + data.opening_hours.join();
|
|
@@ -42,10 +42,10 @@ if(data.calendarId && data.api_url){
|
|
|
42
42
|
data.overlaps_validation = -1; document.querySelector("input[name^='data[overlaps_validation]']").value = -1;
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
|
-
}`,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 Yc(...l){return tt.Components.baseEditForm([{key:"display",components:Oc}],...l)}function xt(l){return(s={})=>{const c=s.width?String(s.width):l.defaultWidth;return l.formats[c]||l.formats[l.defaultWidth]}}function Xe(l){return(s,c)=>{const i=c?.context?String(c.context):"standalone";let M;if(i==="formatting"&&l.formattingValues){const I=l.defaultFormattingWidth||l.defaultWidth,o=c?.width?String(c.width):I;M=l.formattingValues[o]||l.formattingValues[I]}else{const I=l.defaultWidth,o=c?.width?String(c.width):l.defaultWidth;M=l.values[o]||l.values[I]}const x=l.argumentCallback?l.argumentCallback(s):s;return M[x]}}function Ze(l){return(s,c={})=>{const i=c.width,M=i&&l.matchPatterns[i]||l.matchPatterns[l.defaultMatchWidth],x=s.match(M);if(!x)return null;const I=x[0],o=i&&l.parsePatterns[i]||l.parsePatterns[l.defaultParseWidth],y=Array.isArray(o)?jc(o,h=>h.test(I)):Cc(o,h=>h.test(I));let r;r=l.valueCallback?l.valueCallback(y):y,r=c.valueCallback?c.valueCallback(r):r;const u=s.slice(I.length);return{value:r,rest:u}}}function Cc(l,s){for(const c in l)if(Object.prototype.hasOwnProperty.call(l,c)&&s(l[c]))return c}function jc(l,s){for(let c=0;c<l.length;c++)if(s(l[c]))return c}function fn(l){return(s,c={})=>{const i=s.match(l.matchPattern);if(!i)return null;const M=i[0],x=s.match(l.parsePattern);if(!x)return null;let I=l.valueCallback?l.valueCallback(x[0]):x[0];I=c.valueCallback?c.valueCallback(I):I;const o=s.slice(M.length);return{value:I,rest:o}}}const hi=Symbol.for("constructDateFrom");function Is(l,s){return typeof l=="function"?l(s):l&&typeof l=="object"&&hi in l?l[hi](s):l instanceof Date?new l.constructor(s):new Date(s)}function Tc(l,...s){const c=Is.bind(null,l||s.find(i=>typeof i=="object"));return s.map(c)}let Pc={};function Nc(){return Pc}function Rc(l,s){return Is(s||l,l)}function fi(l,s){const c=Nc(),i=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??c.weekStartsOn??c.locale?.options?.weekStartsOn??0,M=Rc(l,s?.in),x=M.getDay(),I=(x<i?7:0)+x-i;return M.setDate(M.getDate()-I),M.setHours(0,0,0,0),M}function mi(l,s,c){const[i,M]=Tc(c?.in,l,s);return+fi(i,c)==+fi(M,c)}const pi={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"}}},Ec=(l,s,c)=>{let i;const M=c?.addSuffix?pi[l].withPreposition:pi[l].standalone;return typeof M=="string"?i=M:s===1?i=M.one:i=M.other.replace("{{count}}",String(s)),c?.addSuffix?c.comparison&&c.comparison>0?"in "+i:"vor "+i:i},Ac={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},Ic={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Fc={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Vc={date:xt({formats:Ac,defaultWidth:"full"}),time:xt({formats:Ic,defaultWidth:"full"}),dateTime:xt({formats:Fc,defaultWidth:"full"})},zc={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},Lc=(l,s,c,i)=>zc[l],Wc={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},qc={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},nn={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"]},Hc={narrow:nn.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:nn.wide},$c={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"]},Bc={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"}},Uc={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"}},Gc=l=>Number(l)+".",Jc={ordinalNumber:Gc,era:Xe({values:Wc,defaultWidth:"wide"}),quarter:Xe({values:qc,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Xe({values:nn,formattingValues:Hc,defaultWidth:"wide"}),day:Xe({values:$c,defaultWidth:"wide"}),dayPeriod:Xe({values:Bc,defaultWidth:"wide",formattingValues:Uc,defaultFormattingWidth:"wide"})},Kc=/^(\d+)(\.)?/i,Xc=/\d+/i,Zc={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},Qc={any:[/^v/i,/^n/i]},ed={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},td={any:[/1/i,/2/i,/3/i,/4/i]},rd={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},ad={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]},nd={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},id={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},sd={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},od={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}},ld={ordinalNumber:fn({matchPattern:Kc,parsePattern:Xc,valueCallback:l=>parseInt(l)}),era:Ze({matchPatterns:Zc,defaultMatchWidth:"wide",parsePatterns:Qc,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:ed,defaultMatchWidth:"wide",parsePatterns:td,defaultParseWidth:"any",valueCallback:l=>l+1}),month:Ze({matchPatterns:rd,defaultMatchWidth:"wide",parsePatterns:ad,defaultParseWidth:"any"}),day:Ze({matchPatterns:nd,defaultMatchWidth:"wide",parsePatterns:id,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:sd,defaultMatchWidth:"wide",parsePatterns:od,defaultParseWidth:"any"})},Fs={code:"de",formatDistance:Ec,formatLong:Vc,formatRelative:Lc,localize:Jc,match:ld,options:{weekStartsOn:1,firstWeekContainsDate:4}},ud={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"}},cd=(l,s,c)=>{let i;const M=ud[l];return typeof M=="string"?i=M:s===1?i=M.one:i=M.other.replace("{{count}}",s.toString()),c?.addSuffix?c.comparison&&c.comparison>0?"in "+i:i+" ago":i},dd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},hd=(l,s,c,i)=>dd[l],fd={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},md={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pd={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"]},gd={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"]},vd={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"}},yd={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"}},_d=(l,s)=>{const c=Number(l),i=c%100;if(i>20||i<10)switch(i%10){case 1:return c+"st";case 2:return c+"nd";case 3:return c+"rd"}return c+"th"},bd={ordinalNumber:_d,era:Xe({values:fd,defaultWidth:"wide"}),quarter:Xe({values:md,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Xe({values:pd,defaultWidth:"wide"}),day:Xe({values:gd,defaultWidth:"wide"}),dayPeriod:Xe({values:vd,defaultWidth:"wide",formattingValues:yd,defaultFormattingWidth:"wide"})},wd=/^(\d+)(th|st|nd|rd)?/i,Sd=/\d+/i,Md={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},xd={any:[/^b/i,/^(a|c)/i]},Dd={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kd={any:[/1/i,/2/i,/3/i,/4/i]},Od={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},Yd={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]},Cd={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},jd={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]},Td={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},Pd={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}},Nd={ordinalNumber:fn({matchPattern:wd,parsePattern:Sd,valueCallback:l=>parseInt(l,10)}),era:Ze({matchPatterns:Md,defaultMatchWidth:"wide",parsePatterns:xd,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:Dd,defaultMatchWidth:"wide",parsePatterns:kd,defaultParseWidth:"any",valueCallback:l=>l+1}),month:Ze({matchPatterns:Od,defaultMatchWidth:"wide",parsePatterns:Yd,defaultParseWidth:"any"}),day:Ze({matchPatterns:Cd,defaultMatchWidth:"wide",parsePatterns:jd,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:Td,defaultMatchWidth:"any",parsePatterns:Pd,defaultParseWidth:"any"})},Rd={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},Ed={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Ad={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Id={date:xt({formats:Rd,defaultWidth:"full"}),time:xt({formats:Ed,defaultWidth:"full"}),dateTime:xt({formats:Ad,defaultWidth:"full"})},Vs={code:"en-GB",formatDistance:cd,formatLong:Id,formatRelative:hd,localize:bd,match:Nd,options:{weekStartsOn:1,firstWeekContainsDate:4}},Fd={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"}},Vd=(l,s,c)=>{let i;const M=Fd[l];return typeof M=="string"?i=M:s===1?i=M.one:i=M.other.replace("{{count}}",s.toString()),c?.addSuffix?c.comparison&&c.comparison>0?"tra "+i:i+" fa":i},zd={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},Ld={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Wd={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},qd={date:xt({formats:zd,defaultWidth:"full"}),time:xt({formats:Ld,defaultWidth:"full"}),dateTime:xt({formats:Wd,defaultWidth:"full"})},mn=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function Hd(l){return l===0?"'domenica scorsa alle' p":"'"+mn[l]+" scorso alle' p"}function gi(l){return"'"+mn[l]+" alle' p"}function $d(l){return l===0?"'domenica prossima alle' p":"'"+mn[l]+" prossimo alle' p"}const Bd={lastWeek:(l,s,c)=>{const i=l.getDay();return mi(l,s,c)?gi(i):Hd(i)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(l,s,c)=>{const i=l.getDay();return mi(l,s,c)?gi(i):$d(i)},other:"P"},Ud=(l,s,c,i)=>{const M=Bd[l];return typeof M=="function"?M(s,c,i):M},Gd={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},Jd={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Kd={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"]},Xd={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"]},Zd={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"}},Qd={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"}},eh=(l,s)=>{const c=Number(l);return String(c)},th={ordinalNumber:eh,era:Xe({values:Gd,defaultWidth:"wide"}),quarter:Xe({values:Jd,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Xe({values:Kd,defaultWidth:"wide"}),day:Xe({values:Xd,defaultWidth:"wide"}),dayPeriod:Xe({values:Zd,defaultWidth:"wide",formattingValues:Qd,defaultFormattingWidth:"wide"})},rh=/^(\d+)(º)?/i,ah=/\d+/i,nh={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},ih={any:[/^a/i,/^(d|e)/i]},sh={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},oh={any:[/1/i,/2/i,/3/i,/4/i]},lh={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},uh={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]},ch={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},dh={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]},hh={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},fh={any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},mh={ordinalNumber:fn({matchPattern:rh,parsePattern:ah,valueCallback:l=>parseInt(l,10)}),era:Ze({matchPatterns:nh,defaultMatchWidth:"wide",parsePatterns:ih,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:sh,defaultMatchWidth:"wide",parsePatterns:oh,defaultParseWidth:"any",valueCallback:l=>l+1}),month:Ze({matchPatterns:lh,defaultMatchWidth:"wide",parsePatterns:uh,defaultParseWidth:"any"}),day:Ze({matchPatterns:ch,defaultMatchWidth:"wide",parsePatterns:dh,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:hh,defaultMatchWidth:"any",parsePatterns:fh,defaultParseWidth:"any"})},zs={code:"it",formatDistance:Vd,formatLong:qd,formatRelative:Ud,localize:th,match:mh,options:{weekStartsOn:1,firstWeekContainsDate:4}};function _r(l){throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var sn={exports:{}},pr={exports:{}},ph=pr.exports,vi;function pn(){return vi||(vi=1,(function(l,s){(function(c,i){l.exports=i()})(ph,(function(){var c;function i(){return c.apply(null,arguments)}function M(e){c=e}function x(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function I(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function y(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(o(e,t))return!1;return!0}function r(e){return e===void 0}function u(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function h(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function f(e,t){var a=[],n,d=e.length;for(n=0;n<d;++n)a.push(t(e[n],n));return a}function p(e,t){for(var a in t)o(t,a)&&(e[a]=t[a]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function g(e,t,a,n){return Fn(e,t,a,n,!0).utc()}function Y(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function _(e){return e._pf==null&&(e._pf=Y()),e._pf}var k;Array.prototype.some?k=Array.prototype.some:k=function(e){var t=Object(this),a=t.length>>>0,n;for(n=0;n<a;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function C(e){var t=null,a=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=_(e),a=k.call(t.parsedDateParts,function(d){return d!=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&&a),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function j(e){var t=g(NaN);return e!=null?p(_(t),e):_(t).userInvalidated=!0,t}var F=i.momentProperties=[],R=!1;function O(e,t){var a,n,d,D=F.length;if(r(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),r(t._i)||(e._i=t._i),r(t._f)||(e._f=t._f),r(t._l)||(e._l=t._l),r(t._strict)||(e._strict=t._strict),r(t._tzm)||(e._tzm=t._tzm),r(t._isUTC)||(e._isUTC=t._isUTC),r(t._offset)||(e._offset=t._offset),r(t._pf)||(e._pf=_(t)),r(t._locale)||(e._locale=t._locale),D>0)for(a=0;a<D;a++)n=F[a],d=t[n],r(d)||(e[n]=d);return e}function v(e){O(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),R===!1&&(R=!0,i.updateOffset(this),R=!1)}function T(e){return e instanceof v||e!=null&&e._isAMomentObject!=null}function w(e){i.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function S(e,t){var a=!0;return p(function(){if(i.deprecationHandler!=null&&i.deprecationHandler(null,e),a){var n=[],d,D,L,ne=arguments.length;for(D=0;D<ne;D++){if(d="",typeof arguments[D]=="object"){d+=`
|
|
45
|
+
}`,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 Yc(...l){return tt.Components.baseEditForm([{key:"display",components:Oc}],...l)}function xt(l){return(s={})=>{const c=s.width?String(s.width):l.defaultWidth;return l.formats[c]||l.formats[l.defaultWidth]}}function Xe(l){return(s,c)=>{const i=c?.context?String(c.context):"standalone";let M;if(i==="formatting"&&l.formattingValues){const I=l.defaultFormattingWidth||l.defaultWidth,o=c?.width?String(c.width):I;M=l.formattingValues[o]||l.formattingValues[I]}else{const I=l.defaultWidth,o=c?.width?String(c.width):l.defaultWidth;M=l.values[o]||l.values[I]}const x=l.argumentCallback?l.argumentCallback(s):s;return M[x]}}function Ze(l){return(s,c={})=>{const i=c.width,M=i&&l.matchPatterns[i]||l.matchPatterns[l.defaultMatchWidth],x=s.match(M);if(!x)return null;const I=x[0],o=i&&l.parsePatterns[i]||l.parsePatterns[l.defaultParseWidth],y=Array.isArray(o)?jc(o,h=>h.test(I)):Cc(o,h=>h.test(I));let r;r=l.valueCallback?l.valueCallback(y):y,r=c.valueCallback?c.valueCallback(r):r;const u=s.slice(I.length);return{value:r,rest:u}}}function Cc(l,s){for(const c in l)if(Object.prototype.hasOwnProperty.call(l,c)&&s(l[c]))return c}function jc(l,s){for(let c=0;c<l.length;c++)if(s(l[c]))return c}function mn(l){return(s,c={})=>{const i=s.match(l.matchPattern);if(!i)return null;const M=i[0],x=s.match(l.parsePattern);if(!x)return null;let I=l.valueCallback?l.valueCallback(x[0]):x[0];I=c.valueCallback?c.valueCallback(I):I;const o=s.slice(M.length);return{value:I,rest:o}}}const fi=Symbol.for("constructDateFrom");function Is(l,s){return typeof l=="function"?l(s):l&&typeof l=="object"&&fi in l?l[fi](s):l instanceof Date?new l.constructor(s):new Date(s)}function Tc(l,...s){const c=Is.bind(null,l||s.find(i=>typeof i=="object"));return s.map(c)}let Pc={};function Nc(){return Pc}function Rc(l,s){return Is(s||l,l)}function mi(l,s){const c=Nc(),i=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??c.weekStartsOn??c.locale?.options?.weekStartsOn??0,M=Rc(l,s?.in),x=M.getDay(),I=(x<i?7:0)+x-i;return M.setDate(M.getDate()-I),M.setHours(0,0,0,0),M}function pi(l,s,c){const[i,M]=Tc(c?.in,l,s);return+mi(i,c)==+mi(M,c)}const gi={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"}}},Ec=(l,s,c)=>{let i;const M=c?.addSuffix?gi[l].withPreposition:gi[l].standalone;return typeof M=="string"?i=M:s===1?i=M.one:i=M.other.replace("{{count}}",String(s)),c?.addSuffix?c.comparison&&c.comparison>0?"in "+i:"vor "+i:i},Ac={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},Ic={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Fc={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Vc={date:xt({formats:Ac,defaultWidth:"full"}),time:xt({formats:Ic,defaultWidth:"full"}),dateTime:xt({formats:Fc,defaultWidth:"full"})},zc={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},Lc=(l,s,c,i)=>zc[l],Wc={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},qc={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},sn={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"]},Hc={narrow:sn.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:sn.wide},$c={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"]},Bc={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"}},Uc={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"}},Gc=l=>Number(l)+".",Jc={ordinalNumber:Gc,era:Xe({values:Wc,defaultWidth:"wide"}),quarter:Xe({values:qc,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Xe({values:sn,formattingValues:Hc,defaultWidth:"wide"}),day:Xe({values:$c,defaultWidth:"wide"}),dayPeriod:Xe({values:Bc,defaultWidth:"wide",formattingValues:Uc,defaultFormattingWidth:"wide"})},Kc=/^(\d+)(\.)?/i,Xc=/\d+/i,Zc={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},Qc={any:[/^v/i,/^n/i]},ed={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},td={any:[/1/i,/2/i,/3/i,/4/i]},rd={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},ad={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]},nd={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},id={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},sd={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},od={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}},ld={ordinalNumber:mn({matchPattern:Kc,parsePattern:Xc,valueCallback:l=>parseInt(l)}),era:Ze({matchPatterns:Zc,defaultMatchWidth:"wide",parsePatterns:Qc,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:ed,defaultMatchWidth:"wide",parsePatterns:td,defaultParseWidth:"any",valueCallback:l=>l+1}),month:Ze({matchPatterns:rd,defaultMatchWidth:"wide",parsePatterns:ad,defaultParseWidth:"any"}),day:Ze({matchPatterns:nd,defaultMatchWidth:"wide",parsePatterns:id,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:sd,defaultMatchWidth:"wide",parsePatterns:od,defaultParseWidth:"any"})},Fs={code:"de",formatDistance:Ec,formatLong:Vc,formatRelative:Lc,localize:Jc,match:ld,options:{weekStartsOn:1,firstWeekContainsDate:4}},ud={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"}},cd=(l,s,c)=>{let i;const M=ud[l];return typeof M=="string"?i=M:s===1?i=M.one:i=M.other.replace("{{count}}",s.toString()),c?.addSuffix?c.comparison&&c.comparison>0?"in "+i:i+" ago":i},dd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},hd=(l,s,c,i)=>dd[l],fd={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},md={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pd={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"]},gd={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"]},vd={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"}},yd={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"}},_d=(l,s)=>{const c=Number(l),i=c%100;if(i>20||i<10)switch(i%10){case 1:return c+"st";case 2:return c+"nd";case 3:return c+"rd"}return c+"th"},bd={ordinalNumber:_d,era:Xe({values:fd,defaultWidth:"wide"}),quarter:Xe({values:md,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Xe({values:pd,defaultWidth:"wide"}),day:Xe({values:gd,defaultWidth:"wide"}),dayPeriod:Xe({values:vd,defaultWidth:"wide",formattingValues:yd,defaultFormattingWidth:"wide"})},wd=/^(\d+)(th|st|nd|rd)?/i,Sd=/\d+/i,Md={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},xd={any:[/^b/i,/^(a|c)/i]},Dd={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kd={any:[/1/i,/2/i,/3/i,/4/i]},Od={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},Yd={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]},Cd={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},jd={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]},Td={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},Pd={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}},Nd={ordinalNumber:mn({matchPattern:wd,parsePattern:Sd,valueCallback:l=>parseInt(l,10)}),era:Ze({matchPatterns:Md,defaultMatchWidth:"wide",parsePatterns:xd,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:Dd,defaultMatchWidth:"wide",parsePatterns:kd,defaultParseWidth:"any",valueCallback:l=>l+1}),month:Ze({matchPatterns:Od,defaultMatchWidth:"wide",parsePatterns:Yd,defaultParseWidth:"any"}),day:Ze({matchPatterns:Cd,defaultMatchWidth:"wide",parsePatterns:jd,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:Td,defaultMatchWidth:"any",parsePatterns:Pd,defaultParseWidth:"any"})},Rd={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},Ed={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Ad={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Id={date:xt({formats:Rd,defaultWidth:"full"}),time:xt({formats:Ed,defaultWidth:"full"}),dateTime:xt({formats:Ad,defaultWidth:"full"})},Vs={code:"en-GB",formatDistance:cd,formatLong:Id,formatRelative:hd,localize:bd,match:Nd,options:{weekStartsOn:1,firstWeekContainsDate:4}},Fd={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"}},Vd=(l,s,c)=>{let i;const M=Fd[l];return typeof M=="string"?i=M:s===1?i=M.one:i=M.other.replace("{{count}}",s.toString()),c?.addSuffix?c.comparison&&c.comparison>0?"tra "+i:i+" fa":i},zd={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},Ld={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Wd={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},qd={date:xt({formats:zd,defaultWidth:"full"}),time:xt({formats:Ld,defaultWidth:"full"}),dateTime:xt({formats:Wd,defaultWidth:"full"})},pn=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function Hd(l){return l===0?"'domenica scorsa alle' p":"'"+pn[l]+" scorso alle' p"}function vi(l){return"'"+pn[l]+" alle' p"}function $d(l){return l===0?"'domenica prossima alle' p":"'"+pn[l]+" prossimo alle' p"}const Bd={lastWeek:(l,s,c)=>{const i=l.getDay();return pi(l,s,c)?vi(i):Hd(i)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(l,s,c)=>{const i=l.getDay();return pi(l,s,c)?vi(i):$d(i)},other:"P"},Ud=(l,s,c,i)=>{const M=Bd[l];return typeof M=="function"?M(s,c,i):M},Gd={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},Jd={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Kd={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"]},Xd={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"]},Zd={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"}},Qd={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"}},eh=(l,s)=>{const c=Number(l);return String(c)},th={ordinalNumber:eh,era:Xe({values:Gd,defaultWidth:"wide"}),quarter:Xe({values:Jd,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Xe({values:Kd,defaultWidth:"wide"}),day:Xe({values:Xd,defaultWidth:"wide"}),dayPeriod:Xe({values:Zd,defaultWidth:"wide",formattingValues:Qd,defaultFormattingWidth:"wide"})},rh=/^(\d+)(º)?/i,ah=/\d+/i,nh={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},ih={any:[/^a/i,/^(d|e)/i]},sh={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},oh={any:[/1/i,/2/i,/3/i,/4/i]},lh={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},uh={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]},ch={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},dh={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]},hh={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},fh={any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},mh={ordinalNumber:mn({matchPattern:rh,parsePattern:ah,valueCallback:l=>parseInt(l,10)}),era:Ze({matchPatterns:nh,defaultMatchWidth:"wide",parsePatterns:ih,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:sh,defaultMatchWidth:"wide",parsePatterns:oh,defaultParseWidth:"any",valueCallback:l=>l+1}),month:Ze({matchPatterns:lh,defaultMatchWidth:"wide",parsePatterns:uh,defaultParseWidth:"any"}),day:Ze({matchPatterns:ch,defaultMatchWidth:"wide",parsePatterns:dh,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:hh,defaultMatchWidth:"any",parsePatterns:fh,defaultParseWidth:"any"})},zs={code:"it",formatDistance:Vd,formatLong:qd,formatRelative:Ud,localize:th,match:mh,options:{weekStartsOn:1,firstWeekContainsDate:4}};function _r(l){throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var on={exports:{}},pr={exports:{}},ph=pr.exports,yi;function gn(){return yi||(yi=1,(function(l,s){(function(c,i){l.exports=i()})(ph,(function(){var c;function i(){return c.apply(null,arguments)}function M(e){c=e}function x(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function I(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function y(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(o(e,t))return!1;return!0}function r(e){return e===void 0}function u(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function h(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function f(e,t){var a=[],n,d=e.length;for(n=0;n<d;++n)a.push(t(e[n],n));return a}function p(e,t){for(var a in t)o(t,a)&&(e[a]=t[a]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function g(e,t,a,n){return Vn(e,t,a,n,!0).utc()}function Y(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function _(e){return e._pf==null&&(e._pf=Y()),e._pf}var k;Array.prototype.some?k=Array.prototype.some:k=function(e){var t=Object(this),a=t.length>>>0,n;for(n=0;n<a;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function C(e){var t=null,a=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=_(e),a=k.call(t.parsedDateParts,function(d){return d!=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&&a),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function j(e){var t=g(NaN);return e!=null?p(_(t),e):_(t).userInvalidated=!0,t}var F=i.momentProperties=[],R=!1;function O(e,t){var a,n,d,D=F.length;if(r(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),r(t._i)||(e._i=t._i),r(t._f)||(e._f=t._f),r(t._l)||(e._l=t._l),r(t._strict)||(e._strict=t._strict),r(t._tzm)||(e._tzm=t._tzm),r(t._isUTC)||(e._isUTC=t._isUTC),r(t._offset)||(e._offset=t._offset),r(t._pf)||(e._pf=_(t)),r(t._locale)||(e._locale=t._locale),D>0)for(a=0;a<D;a++)n=F[a],d=t[n],r(d)||(e[n]=d);return e}function v(e){O(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),R===!1&&(R=!0,i.updateOffset(this),R=!1)}function T(e){return e instanceof v||e!=null&&e._isAMomentObject!=null}function w(e){i.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function S(e,t){var a=!0;return p(function(){if(i.deprecationHandler!=null&&i.deprecationHandler(null,e),a){var n=[],d,D,L,ne=arguments.length;for(D=0;D<ne;D++){if(d="",typeof arguments[D]=="object"){d+=`
|
|
46
46
|
[`+D+"] ";for(L in arguments[0])o(arguments[0],L)&&(d+=L+": "+arguments[0][L]+", ");d=d.slice(0,-2)}else d=arguments[D];n.push(d)}w(e+`
|
|
47
47
|
Arguments: `+Array.prototype.slice.call(n).join("")+`
|
|
48
|
-
`+new Error().stack),a=!1}return t.apply(this,arguments)},t)}var V={};function E(e,t){i.deprecationHandler!=null&&i.deprecationHandler(e,t),V[e]||(w(t),V[e]=!0)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null;function A(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function z(e){var t,a;for(a in e)o(e,a)&&(t=e[a],A(t)?this[a]=t:this["_"+a]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function B(e,t){var a=p({},e),n;for(n in t)o(t,n)&&(I(e[n])&&I(t[n])?(a[n]={},p(a[n],e[n]),p(a[n],t[n])):t[n]!=null?a[n]=t[n]:delete a[n]);for(n in e)o(e,n)&&!o(t,n)&&I(e[n])&&(a[n]=p({},a[n]));return a}function ee(e){e!=null&&this.set(e)}var ie;Object.keys?ie=Object.keys:ie=function(e){var t,a=[];for(t in e)o(e,t)&&a.push(t);return a};var re={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function fe(e,t,a){var n=this._calendar[e]||this._calendar.sameElse;return A(n)?n.call(t,a):n}function te(e,t,a){var n=""+Math.abs(e),d=t-n.length,D=e>=0;return(D?a?"+":"":"-")+Math.pow(10,Math.max(0,d)).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,ve=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,me={},oe={};function Z(e,t,a,n){var d=n;typeof n=="string"&&(d=function(){return this[n]()}),e&&(oe[e]=d),t&&(oe[t[0]]=function(){return te(d.apply(this,arguments),t[1],t[2])}),a&&(oe[a]=function(){return this.localeData().ordinal(d.apply(this,arguments),e)})}function Ne(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ie(e){var t=e.match(de),a,n;for(a=0,n=t.length;a<n;a++)oe[t[a]]?t[a]=oe[t[a]]:t[a]=Ne(t[a]);return function(d){var D="",L;for(L=0;L<n;L++)D+=A(t[L])?t[L].call(d,e):t[L];return D}}function Ce(e,t){return e.isValid()?(t=Oe(t,e.localeData()),me[t]=me[t]||Ie(t),me[t](e)):e.localeData().invalidDate()}function Oe(e,t){var a=5;function n(d){return t.longDateFormat(d)||d}for(ve.lastIndex=0;a>=0&&ve.test(e);)e=e.replace(ve,n),ve.lastIndex=0,a-=1;return e}var $={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 J(e){var t=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];return t||!a?t:(this._longDateFormat[e]=a.match(de).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var X="Invalid date";function P(){return this._invalidDate}var H="%d",N=/\d{1,2}/;function W(e){return this._ordinal.replace("%d",e)}var q={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 ce(e,t,a,n){var d=this._relativeTime[a];return A(d)?d(e,t,a,n):d.replace(/%d/i,e)}function se(e,t){var a=this._relativeTime[e>0?"future":"past"];return A(a)?a(t):a.replace(/%s/i,t)}var Pe={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 ge(e){return typeof e=="string"?Pe[e]||Pe[e.toLowerCase()]:void 0}function _e(e){var t={},a,n;for(n in e)o(e,n)&&(a=ge(n),a&&(t[a]=e[n]));return t}var $e={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 Re(e){var t=[],a;for(a in e)o(e,a)&&t.push({unit:a,priority:$e[a]});return t.sort(function(n,d){return n.priority-d.priority}),t}var dt=/\d/,Ue=/\d\d/,st=/\d{3}/,Ct=/\d{4}/,ot=/[+-]?\d{6}/,je=/\d\d?/,jt=/\d\d\d\d?/,At=/\d\d\d\d\d\d?/,lt=/\d{1,3}/,pt=/\d{1,4}/,ht=/[+-]?\d{1,6}/,rt=/\d+/,gt=/[+-]?\d+/,vt=/Z|[+-]\d\d:?\d\d/gi,We=/Z|[+-]\d\d(?::?\d\d)?/gi,ft=/[+-]?\d+(\.\d{1,3})?/,ut=/[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,at=/^[1-9]\d?/,Qe=/^([1-9]\d|\d)/,It;It={};function ae(e,t,a){It[e]=A(t)?t:function(n,d){return n&&a?a:t}}function Yr(e,t){return o(It,e)?It[e](t._strict,t._locale):new RegExp(tr(e))}function tr(e){return nt(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,a,n,d,D){return a||n||d||D}))}function nt(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function et(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function be(e){var t=+e,a=0;return t!==0&&isFinite(t)&&(a=et(t)),a}var Ft={};function Te(e,t){var a,n=t,d;for(typeof e=="string"&&(e=[e]),u(t)&&(n=function(D,L){L[t]=be(D)}),d=e.length,a=0;a<d;a++)Ft[e[a]]=n}function Tt(e,t){Te(e,function(a,n,d,D){d._w=d._w||{},t(a,d._w,d,D)})}function Cr(e,t,a){t!=null&&o(Ft,e)&&Ft[e](t,a._a,a,e)}function Vt(e){return e%4===0&&e%100!==0||e%400===0}var Ge=0,b=1,U=2,Q=3,le=4,ye=5,xe=6,Se=7,we=8;Z("Y",0,0,function(){var e=this.year();return e<=9999?te(e,4):"+"+e}),Z(0,["YY",2],0,function(){return this.year()%100}),Z(0,["YYYY",4],0,"year"),Z(0,["YYYYY",5],0,"year"),Z(0,["YYYYYY",6,!0],0,"year"),ae("Y",gt),ae("YY",je,Ue),ae("YYYY",pt,Ct),ae("YYYYY",ht,ot),ae("YYYYYY",ht,ot),Te(["YYYYY","YYYYYY"],Ge),Te("YYYY",function(e,t){t[Ge]=e.length===2?i.parseTwoDigitYear(e):be(e)}),Te("YY",function(e,t){t[Ge]=i.parseTwoDigitYear(e)}),Te("Y",function(e,t){t[Ge]=parseInt(e,10)});function qe(e){return Vt(e)?366:365}i.parseTwoDigitYear=function(e){return be(e)+(be(e)>68?1900:2e3)};var Fe=Be("FullYear",!0);function Le(){return Vt(this.year())}function Be(e,t){return function(a){return a!=null?(mt(this,e,a),i.updateOffset(this,t),this):it(this,e)}}function it(e,t){if(!e.isValid())return NaN;var a=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?a.getUTCMilliseconds():a.getMilliseconds();case"Seconds":return n?a.getUTCSeconds():a.getSeconds();case"Minutes":return n?a.getUTCMinutes():a.getMinutes();case"Hours":return n?a.getUTCHours():a.getHours();case"Date":return n?a.getUTCDate():a.getDate();case"Day":return n?a.getUTCDay():a.getDay();case"Month":return n?a.getUTCMonth():a.getMonth();case"FullYear":return n?a.getUTCFullYear():a.getFullYear();default:return NaN}}function mt(e,t,a){var n,d,D,L,ne;if(!(!e.isValid()||isNaN(a))){switch(n=e._d,d=e._isUTC,t){case"Milliseconds":return void(d?n.setUTCMilliseconds(a):n.setMilliseconds(a));case"Seconds":return void(d?n.setUTCSeconds(a):n.setSeconds(a));case"Minutes":return void(d?n.setUTCMinutes(a):n.setMinutes(a));case"Hours":return void(d?n.setUTCHours(a):n.setHours(a));case"Date":return void(d?n.setUTCDate(a):n.setDate(a));case"FullYear":break;default:return}D=a,L=e.month(),ne=e.date(),ne=ne===29&&L===1&&!Vt(D)?28:ne,d?n.setUTCFullYear(D,L,ne):n.setFullYear(D,L,ne)}}function Je(e){return e=ge(e),A(this[e])?this[e]():this}function Bt(e,t){if(typeof e=="object"){e=_e(e);var a=Re(e),n,d=a.length;for(n=0;n<d;n++)this[a[n].unit](e[a[n].unit])}else if(e=ge(e),A(this[e]))return this[e](t);return this}function jr(e,t){return(e%t+t)%t}var ze;Array.prototype.indexOf?ze=Array.prototype.indexOf:ze=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Tr(e,t){if(isNaN(e)||isNaN(t))return NaN;var a=jr(t,12);return e+=(t-a)/12,a===1?Vt(e)?29:28:31-a%7%2}Z("M",["MM",2],"Mo",function(){return this.month()+1}),Z("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Z("MMMM",0,0,function(e){return this.localeData().months(this,e)}),ae("M",je,at),ae("MM",je,Ue),ae("MMM",function(e,t){return t.monthsShortRegex(e)}),ae("MMMM",function(e,t){return t.monthsRegex(e)}),Te(["M","MM"],function(e,t){t[b]=be(e)-1}),Te(["MMM","MMMM"],function(e,t,a,n){var d=a._locale.monthsParse(e,n,a._strict);d!=null?t[b]=d:_(a).invalidMonth=e});var Js="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),xn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Dn=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ks=ut,Xs=ut;function Zs(e,t){return e?x(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Dn).test(t)?"format":"standalone"][e.month()]:x(this._months)?this._months:this._months.standalone}function Qs(e,t){return e?x(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Dn.test(t)?"format":"standalone"][e.month()]:x(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function eo(e,t,a){var n,d,D,L=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)D=g([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(D,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(D,"").toLocaleLowerCase();return a?t==="MMM"?(d=ze.call(this._shortMonthsParse,L),d!==-1?d:null):(d=ze.call(this._longMonthsParse,L),d!==-1?d:null):t==="MMM"?(d=ze.call(this._shortMonthsParse,L),d!==-1?d:(d=ze.call(this._longMonthsParse,L),d!==-1?d:null)):(d=ze.call(this._longMonthsParse,L),d!==-1?d:(d=ze.call(this._shortMonthsParse,L),d!==-1?d:null))}function to(e,t,a){var n,d,D;if(this._monthsParseExact)return eo.call(this,e,t,a);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(d=g([2e3,n]),a&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(d,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(d,"").replace(".","")+"$","i")),!a&&!this._monthsParse[n]&&(D="^"+this.months(d,"")+"|^"+this.monthsShort(d,""),this._monthsParse[n]=new RegExp(D.replace(".",""),"i")),a&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(a&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!a&&this._monthsParse[n].test(e))return n}}function kn(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=be(t);else if(t=e.localeData().monthsParse(t),!u(t))return e}var a=t,n=e.date();return n=n<29?n:Math.min(n,Tr(e.year(),a)),e._isUTC?e._d.setUTCMonth(a,n):e._d.setMonth(a,n),e}function On(e){return e!=null?(kn(this,e),i.updateOffset(this,!0),this):it(this,"Month")}function ro(){return Tr(this.year(),this.month())}function ao(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Yn.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Ks),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function no(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Yn.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Xs),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Yn(){function e(pe,De){return De.length-pe.length}var t=[],a=[],n=[],d,D,L,ne;for(d=0;d<12;d++)D=g([2e3,d]),L=nt(this.monthsShort(D,"")),ne=nt(this.months(D,"")),t.push(L),a.push(ne),n.push(ne),n.push(L);t.sort(e),a.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function io(e,t,a,n,d,D,L){var ne;return e<100&&e>=0?(ne=new Date(e+400,t,a,n,d,D,L),isFinite(ne.getFullYear())&&ne.setFullYear(e)):ne=new Date(e,t,a,n,d,D,L),ne}function Ut(e){var t,a;return e<100&&e>=0?(a=Array.prototype.slice.call(arguments),a[0]=e+400,t=new Date(Date.UTC.apply(null,a)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function rr(e,t,a){var n=7+t-a,d=(7+Ut(e,0,n).getUTCDay()-t)%7;return-d+n-1}function Cn(e,t,a,n,d){var D=(7+a-n)%7,L=rr(e,n,d),ne=1+7*(t-1)+D+L,pe,De;return ne<=0?(pe=e-1,De=qe(pe)+ne):ne>qe(e)?(pe=e+1,De=ne-qe(e)):(pe=e,De=ne),{year:pe,dayOfYear:De}}function Gt(e,t,a){var n=rr(e.year(),t,a),d=Math.floor((e.dayOfYear()-n-1)/7)+1,D,L;return d<1?(L=e.year()-1,D=d+yt(L,t,a)):d>yt(e.year(),t,a)?(D=d-yt(e.year(),t,a),L=e.year()+1):(L=e.year(),D=d),{week:D,year:L}}function yt(e,t,a){var n=rr(e,t,a),d=rr(e+1,t,a);return(qe(e)-n+d)/7}Z("w",["ww",2],"wo","week"),Z("W",["WW",2],"Wo","isoWeek"),ae("w",je,at),ae("ww",je,Ue),ae("W",je,at),ae("WW",je,Ue),Tt(["w","ww","W","WW"],function(e,t,a,n){t[n.substr(0,1)]=be(e)});function so(e){return Gt(e,this._week.dow,this._week.doy).week}var oo={dow:0,doy:6};function lo(){return this._week.dow}function uo(){return this._week.doy}function co(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function ho(e){var t=Gt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Z("d",0,"do","day"),Z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Z("e",0,0,"weekday"),Z("E",0,0,"isoWeekday"),ae("d",je),ae("e",je),ae("E",je),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)}),Tt(["dd","ddd","dddd"],function(e,t,a,n){var d=a._locale.weekdaysParse(e,n,a._strict);d!=null?t.d=d:_(a).invalidWeekday=e}),Tt(["d","e","E"],function(e,t,a,n){t[n]=be(e)});function fo(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function mo(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pr(e,t){return e.slice(t,7).concat(e.slice(0,t))}var po="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),jn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),go="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),vo=ut,yo=ut,_o=ut;function bo(e,t){var a=x(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Pr(a,this._week.dow):e?a[e.day()]:a}function wo(e){return e===!0?Pr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function So(e){return e===!0?Pr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Mo(e,t,a){var n,d,D,L=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)D=g([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(D,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(D,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(D,"").toLocaleLowerCase();return a?t==="dddd"?(d=ze.call(this._weekdaysParse,L),d!==-1?d:null):t==="ddd"?(d=ze.call(this._shortWeekdaysParse,L),d!==-1?d:null):(d=ze.call(this._minWeekdaysParse,L),d!==-1?d:null):t==="dddd"?(d=ze.call(this._weekdaysParse,L),d!==-1||(d=ze.call(this._shortWeekdaysParse,L),d!==-1)?d:(d=ze.call(this._minWeekdaysParse,L),d!==-1?d:null)):t==="ddd"?(d=ze.call(this._shortWeekdaysParse,L),d!==-1||(d=ze.call(this._weekdaysParse,L),d!==-1)?d:(d=ze.call(this._minWeekdaysParse,L),d!==-1?d:null)):(d=ze.call(this._minWeekdaysParse,L),d!==-1||(d=ze.call(this._weekdaysParse,L),d!==-1)?d:(d=ze.call(this._shortWeekdaysParse,L),d!==-1?d:null))}function xo(e,t,a){var n,d,D;if(this._weekdaysParseExact)return Mo.call(this,e,t,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(d=g([2e3,1]).day(n),a&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(d,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(d,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(d,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(D="^"+this.weekdays(d,"")+"|^"+this.weekdaysShort(d,"")+"|^"+this.weekdaysMin(d,""),this._weekdaysParse[n]=new RegExp(D.replace(".",""),"i")),a&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(a&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(a&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!a&&this._weekdaysParse[n].test(e))return n}}function Do(e){if(!this.isValid())return e!=null?this:NaN;var t=it(this,"Day");return e!=null?(e=fo(e,this.localeData()),this.add(e-t,"d")):t}function ko(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 Oo(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=mo(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Yo(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Nr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=vo),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Co(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Nr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=yo),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function jo(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Nr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=_o),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Nr(){function e(Ke,Mt){return Mt.length-Ke.length}var t=[],a=[],n=[],d=[],D,L,ne,pe,De;for(D=0;D<7;D++)L=g([2e3,1]).day(D),ne=nt(this.weekdaysMin(L,"")),pe=nt(this.weekdaysShort(L,"")),De=nt(this.weekdays(L,"")),t.push(ne),a.push(pe),n.push(De),d.push(ne),d.push(pe),d.push(De);t.sort(e),a.sort(e),n.sort(e),d.sort(e),this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Rr(){return this.hours()%12||12}function To(){return this.hours()||24}Z("H",["HH",2],0,"hour"),Z("h",["hh",2],0,Rr),Z("k",["kk",2],0,To),Z("hmm",0,0,function(){return""+Rr.apply(this)+te(this.minutes(),2)}),Z("hmmss",0,0,function(){return""+Rr.apply(this)+te(this.minutes(),2)+te(this.seconds(),2)}),Z("Hmm",0,0,function(){return""+this.hours()+te(this.minutes(),2)}),Z("Hmmss",0,0,function(){return""+this.hours()+te(this.minutes(),2)+te(this.seconds(),2)});function Tn(e,t){Z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Tn("a",!0),Tn("A",!1);function Pn(e,t){return t._meridiemParse}ae("a",Pn),ae("A",Pn),ae("H",je,Qe),ae("h",je,at),ae("k",je,at),ae("HH",je,Ue),ae("hh",je,Ue),ae("kk",je,Ue),ae("hmm",jt),ae("hmmss",At),ae("Hmm",jt),ae("Hmmss",At),Te(["H","HH"],Q),Te(["k","kk"],function(e,t,a){var n=be(e);t[Q]=n===24?0:n}),Te(["a","A"],function(e,t,a){a._isPm=a._locale.isPM(e),a._meridiem=e}),Te(["h","hh"],function(e,t,a){t[Q]=be(e),_(a).bigHour=!0}),Te("hmm",function(e,t,a){var n=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n)),_(a).bigHour=!0}),Te("hmmss",function(e,t,a){var n=e.length-4,d=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n,2)),t[ye]=be(e.substr(d)),_(a).bigHour=!0}),Te("Hmm",function(e,t,a){var n=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n))}),Te("Hmmss",function(e,t,a){var n=e.length-4,d=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n,2)),t[ye]=be(e.substr(d))});function Po(e){return(e+"").toLowerCase().charAt(0)==="p"}var No=/[ap]\.?m?\.?/i,Ro=Be("Hours",!0);function Eo(e,t,a){return e>11?a?"pm":"PM":a?"am":"AM"}var Nn={calendar:re,longDateFormat:$,invalidDate:X,ordinal:H,dayOfMonthOrdinalParse:N,relativeTime:q,months:Js,monthsShort:xn,week:oo,weekdays:po,weekdaysMin:go,weekdaysShort:jn,meridiemParse:No},Ve={},Jt={},Kt;function Ao(e,t){var a,n=Math.min(e.length,t.length);for(a=0;a<n;a+=1)if(e[a]!==t[a])return a;return n}function Rn(e){return e&&e.toLowerCase().replace("_","-")}function Io(e){for(var t=0,a,n,d,D;t<e.length;){for(D=Rn(e[t]).split("-"),a=D.length,n=Rn(e[t+1]),n=n?n.split("-"):null;a>0;){if(d=ar(D.slice(0,a).join("-")),d)return d;if(n&&n.length>=a&&Ao(D,n)>=a-1)break;a--}t++}return Kt}function Fo(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ar(e){var t=null,a;if(Ve[e]===void 0&&l&&l.exports&&Fo(e))try{t=Kt._abbr,a=_r,a("./locale/"+e),Dt(t)}catch{Ve[e]=null}return Ve[e]}function Dt(e,t){var a;return e&&(r(t)?a=_t(e):a=Er(e,t),a?Kt=a:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Kt._abbr}function Er(e,t){if(t!==null){var a,n=Nn;if(t.abbr=e,Ve[e]!=null)E("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(a=ar(t.parentLocale),a!=null)n=a._config;else return Jt[t.parentLocale]||(Jt[t.parentLocale]=[]),Jt[t.parentLocale].push({name:e,config:t}),null;return Ve[e]=new ee(B(n,t)),Jt[e]&&Jt[e].forEach(function(d){Er(d.name,d.config)}),Dt(e),Ve[e]}else return delete Ve[e],null}function Vo(e,t){if(t!=null){var a,n,d=Nn;Ve[e]!=null&&Ve[e].parentLocale!=null?Ve[e].set(B(Ve[e]._config,t)):(n=ar(e),n!=null&&(d=n._config),t=B(d,t),n==null&&(t.abbr=e),a=new ee(t),a.parentLocale=Ve[e],Ve[e]=a),Dt(e)}else Ve[e]!=null&&(Ve[e].parentLocale!=null?(Ve[e]=Ve[e].parentLocale,e===Dt()&&Dt(e)):Ve[e]!=null&&delete Ve[e]);return Ve[e]}function _t(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Kt;if(!x(e)){if(t=ar(e),t)return t;e=[e]}return Io(e)}function zo(){return ie(Ve)}function Ar(e){var t,a=e._a;return a&&_(e).overflow===-2&&(t=a[b]<0||a[b]>11?b:a[U]<1||a[U]>Tr(a[Ge],a[b])?U:a[Q]<0||a[Q]>24||a[Q]===24&&(a[le]!==0||a[ye]!==0||a[xe]!==0)?Q:a[le]<0||a[le]>59?le:a[ye]<0||a[ye]>59?ye:a[xe]<0||a[xe]>999?xe:-1,_(e)._overflowDayOfYear&&(t<Ge||t>U)&&(t=U),_(e)._overflowWeeks&&t===-1&&(t=Se),_(e)._overflowWeekday&&t===-1&&(t=we),_(e).overflow=t),e}var Lo=/^\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)?)?$/,Wo=/^\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)?)?$/,qo=/Z|[+-]\d\d(?::?\d\d)?/,nr=[["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]],Ir=[["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/]],Ho=/^\/?Date\((-?\d+)/i,$o=/^(?:(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}))$/,Bo={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function En(e){var t,a,n=e._i,d=Lo.exec(n)||Wo.exec(n),D,L,ne,pe,De=nr.length,Ke=Ir.length;if(d){for(_(e).iso=!0,t=0,a=De;t<a;t++)if(nr[t][1].exec(d[1])){L=nr[t][0],D=nr[t][2]!==!1;break}if(L==null){e._isValid=!1;return}if(d[3]){for(t=0,a=Ke;t<a;t++)if(Ir[t][1].exec(d[3])){ne=(d[2]||" ")+Ir[t][0];break}if(ne==null){e._isValid=!1;return}}if(!D&&ne!=null){e._isValid=!1;return}if(d[4])if(qo.exec(d[4]))pe="Z";else{e._isValid=!1;return}e._f=L+(ne||"")+(pe||""),Vr(e)}else e._isValid=!1}function Uo(e,t,a,n,d,D){var L=[Go(e),xn.indexOf(t),parseInt(a,10),parseInt(n,10),parseInt(d,10)];return D&&L.push(parseInt(D,10)),L}function Go(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Jo(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ko(e,t,a){if(e){var n=jn.indexOf(e),d=new Date(t[0],t[1],t[2]).getDay();if(n!==d)return _(a).weekdayMismatch=!0,a._isValid=!1,!1}return!0}function Xo(e,t,a){if(e)return Bo[e];if(t)return 0;var n=parseInt(a,10),d=n%100,D=(n-d)/100;return D*60+d}function An(e){var t=$o.exec(Jo(e._i)),a;if(t){if(a=Uo(t[4],t[3],t[2],t[5],t[6],t[7]),!Ko(t[1],a,e))return;e._a=a,e._tzm=Xo(t[8],t[9],t[10]),e._d=Ut.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),_(e).rfc2822=!0}else e._isValid=!1}function Zo(e){var t=Ho.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(En(e),e._isValid===!1)delete e._isValid;else return;if(An(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:i.createFromInputFallback(e)}i.createFromInputFallback=S("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 zt(e,t,a){return e??t??a}function Qo(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Fr(e){var t,a,n=[],d,D,L;if(!e._d){for(d=Qo(e),e._w&&e._a[U]==null&&e._a[b]==null&&el(e),e._dayOfYear!=null&&(L=zt(e._a[Ge],d[Ge]),(e._dayOfYear>qe(L)||e._dayOfYear===0)&&(_(e)._overflowDayOfYear=!0),a=Ut(L,0,e._dayOfYear),e._a[b]=a.getUTCMonth(),e._a[U]=a.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=d[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Q]===24&&e._a[le]===0&&e._a[ye]===0&&e._a[xe]===0&&(e._nextDay=!0,e._a[Q]=0),e._d=(e._useUTC?Ut:io).apply(null,n),D=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Q]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==D&&(_(e).weekdayMismatch=!0)}}function el(e){var t,a,n,d,D,L,ne,pe,De;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(D=1,L=4,a=zt(t.GG,e._a[Ge],Gt(Ae(),1,4).year),n=zt(t.W,1),d=zt(t.E,1),(d<1||d>7)&&(pe=!0)):(D=e._locale._week.dow,L=e._locale._week.doy,De=Gt(Ae(),D,L),a=zt(t.gg,e._a[Ge],De.year),n=zt(t.w,De.week),t.d!=null?(d=t.d,(d<0||d>6)&&(pe=!0)):t.e!=null?(d=t.e+D,(t.e<0||t.e>6)&&(pe=!0)):d=D),n<1||n>yt(a,D,L)?_(e)._overflowWeeks=!0:pe!=null?_(e)._overflowWeekday=!0:(ne=Cn(a,n,d,D,L),e._a[Ge]=ne.year,e._dayOfYear=ne.dayOfYear)}i.ISO_8601=function(){},i.RFC_2822=function(){};function Vr(e){if(e._f===i.ISO_8601){En(e);return}if(e._f===i.RFC_2822){An(e);return}e._a=[],_(e).empty=!0;var t=""+e._i,a,n,d,D,L,ne=t.length,pe=0,De,Ke;for(d=Oe(e._f,e._locale).match(de)||[],Ke=d.length,a=0;a<Ke;a++)D=d[a],n=(t.match(Yr(D,e))||[])[0],n&&(L=t.substr(0,t.indexOf(n)),L.length>0&&_(e).unusedInput.push(L),t=t.slice(t.indexOf(n)+n.length),pe+=n.length),oe[D]?(n?_(e).empty=!1:_(e).unusedTokens.push(D),Cr(D,n,e)):e._strict&&!n&&_(e).unusedTokens.push(D);_(e).charsLeftOver=ne-pe,t.length>0&&_(e).unusedInput.push(t),e._a[Q]<=12&&_(e).bigHour===!0&&e._a[Q]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[Q]=tl(e._locale,e._a[Q],e._meridiem),De=_(e).era,De!==null&&(e._a[Ge]=e._locale.erasConvertYear(De,e._a[Ge])),Fr(e),Ar(e)}function tl(e,t,a){var n;return a==null?t:e.meridiemHour!=null?e.meridiemHour(t,a):(e.isPM!=null&&(n=e.isPM(a),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function rl(e){var t,a,n,d,D,L,ne=!1,pe=e._f.length;if(pe===0){_(e).invalidFormat=!0,e._d=new Date(NaN);return}for(d=0;d<pe;d++)D=0,L=!1,t=O({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[d],Vr(t),C(t)&&(L=!0),D+=_(t).charsLeftOver,D+=_(t).unusedTokens.length*10,_(t).score=D,ne?D<n&&(n=D,a=t):(n==null||D<n||L)&&(n=D,a=t,L&&(ne=!0));p(e,a||t)}function al(e){if(!e._d){var t=_e(e._i),a=t.day===void 0?t.date:t.day;e._a=f([t.year,t.month,a,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Fr(e)}}function nl(e){var t=new v(Ar(In(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function In(e){var t=e._i,a=e._f;return e._locale=e._locale||_t(e._l),t===null||a===void 0&&t===""?j({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),T(t)?new v(Ar(t)):(h(t)?e._d=t:x(a)?rl(e):a?Vr(e):il(e),C(e)||(e._d=null),e))}function il(e){var t=e._i;r(t)?e._d=new Date(i.now()):h(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Zo(e):x(t)?(e._a=f(t.slice(0),function(a){return parseInt(a,10)}),Fr(e)):I(t)?al(e):u(t)?e._d=new Date(t):i.createFromInputFallback(e)}function Fn(e,t,a,n,d){var D={};return(t===!0||t===!1)&&(n=t,t=void 0),(a===!0||a===!1)&&(n=a,a=void 0),(I(e)&&y(e)||x(e)&&e.length===0)&&(e=void 0),D._isAMomentObject=!0,D._useUTC=D._isUTC=d,D._l=a,D._i=e,D._f=t,D._strict=n,nl(D)}function Ae(e,t,a,n){return Fn(e,t,a,n,!1)}var sl=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ae.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:j()}),ol=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ae.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:j()});function Vn(e,t){var a,n;if(t.length===1&&x(t[0])&&(t=t[0]),!t.length)return Ae();for(a=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](a))&&(a=t[n]);return a}function ll(){var e=[].slice.call(arguments,0);return Vn("isBefore",e)}function ul(){var e=[].slice.call(arguments,0);return Vn("isAfter",e)}var cl=function(){return Date.now?Date.now():+new Date},Xt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function dl(e){var t,a=!1,n,d=Xt.length;for(t in e)if(o(e,t)&&!(ze.call(Xt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<d;++n)if(e[Xt[n]]){if(a)return!1;parseFloat(e[Xt[n]])!==be(e[Xt[n]])&&(a=!0)}return!0}function hl(){return this._isValid}function fl(){return ct(NaN)}function ir(e){var t=_e(e),a=t.year||0,n=t.quarter||0,d=t.month||0,D=t.week||t.isoWeek||0,L=t.day||0,ne=t.hour||0,pe=t.minute||0,De=t.second||0,Ke=t.millisecond||0;this._isValid=dl(t),this._milliseconds=+Ke+De*1e3+pe*6e4+ne*1e3*60*60,this._days=+L+D*7,this._months=+d+n*3+a*12,this._data={},this._locale=_t(),this._bubble()}function sr(e){return e instanceof ir}function zr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function ml(e,t,a){var n=Math.min(e.length,t.length),d=Math.abs(e.length-t.length),D=0,L;for(L=0;L<n;L++)be(e[L])!==be(t[L])&&D++;return D+d}function zn(e,t){Z(e,0,0,function(){var a=this.utcOffset(),n="+";return a<0&&(a=-a,n="-"),n+te(~~(a/60),2)+t+te(~~a%60,2)})}zn("Z",":"),zn("ZZ",""),ae("Z",We),ae("ZZ",We),Te(["Z","ZZ"],function(e,t,a){a._useUTC=!0,a._tzm=Lr(We,e)});var pl=/([\+\-]|\d\d)/gi;function Lr(e,t){var a=(t||"").match(e),n,d,D;return a===null?null:(n=a[a.length-1]||[],d=(n+"").match(pl)||["-",0,0],D=+(d[1]*60)+be(d[2]),D===0?0:d[0]==="+"?D:-D)}function Wr(e,t){var a,n;return t._isUTC?(a=t.clone(),n=(T(e)||h(e)?e.valueOf():Ae(e).valueOf())-a.valueOf(),a._d.setTime(a._d.valueOf()+n),i.updateOffset(a,!1),a):Ae(e).local()}function qr(e){return-Math.round(e._d.getTimezoneOffset())}i.updateOffset=function(){};function gl(e,t,a){var n=this._offset||0,d;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Lr(We,e),e===null)return this}else Math.abs(e)<16&&!a&&(e=e*60);return!this._isUTC&&t&&(d=qr(this)),this._offset=e,this._isUTC=!0,d!=null&&this.add(d,"m"),n!==e&&(!t||this._changeInProgress?Hn(this,ct(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:qr(this)}function vl(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function yl(e){return this.utcOffset(0,e)}function _l(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qr(this),"m")),this}function bl(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Lr(vt,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function wl(e){return this.isValid()?(e=e?Ae(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function Sl(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ml(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e={},t;return O(e,this),e=In(e),e._a?(t=e._isUTC?g(e._a):Ae(e._a),this._isDSTShifted=this.isValid()&&ml(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function xl(){return this.isValid()?!this._isUTC:!1}function Dl(){return this.isValid()?this._isUTC:!1}function Ln(){return this.isValid()?this._isUTC&&this._offset===0:!1}var kl=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ol=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ct(e,t){var a=e,n=null,d,D,L;return sr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(n=kl.exec(e))?(d=n[1]==="-"?-1:1,a={y:0,d:be(n[U])*d,h:be(n[Q])*d,m:be(n[le])*d,s:be(n[ye])*d,ms:be(zr(n[xe]*1e3))*d}):(n=Ol.exec(e))?(d=n[1]==="-"?-1:1,a={y:Pt(n[2],d),M:Pt(n[3],d),w:Pt(n[4],d),d:Pt(n[5],d),h:Pt(n[6],d),m:Pt(n[7],d),s:Pt(n[8],d)}):a==null?a={}:typeof a=="object"&&("from"in a||"to"in a)&&(L=Yl(Ae(a.from),Ae(a.to)),a={},a.ms=L.milliseconds,a.M=L.months),D=new ir(a),sr(e)&&o(e,"_locale")&&(D._locale=e._locale),sr(e)&&o(e,"_isValid")&&(D._isValid=e._isValid),D}ct.fn=ir.prototype,ct.invalid=fl;function Pt(e,t){var a=e&&parseFloat(e.replace(",","."));return(isNaN(a)?0:a)*t}function Wn(e,t){var a={};return a.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(a.months,"M").isAfter(t)&&--a.months,a.milliseconds=+t-+e.clone().add(a.months,"M"),a}function Yl(e,t){var a;return e.isValid()&&t.isValid()?(t=Wr(t,e),e.isBefore(t)?a=Wn(e,t):(a=Wn(t,e),a.milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function qn(e,t){return function(a,n){var d,D;return n!==null&&!isNaN(+n)&&(E(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."),D=a,a=n,n=D),d=ct(a,n),Hn(this,d,e),this}}function Hn(e,t,a,n){var d=t._milliseconds,D=zr(t._days),L=zr(t._months);e.isValid()&&(n=n??!0,L&&kn(e,it(e,"Month")+L*a),D&&mt(e,"Date",it(e,"Date")+D*a),d&&e._d.setTime(e._d.valueOf()+d*a),n&&i.updateOffset(e,D||L))}var Cl=qn(1,"add"),jl=qn(-1,"subtract");function $n(e){return typeof e=="string"||e instanceof String}function Tl(e){return T(e)||h(e)||$n(e)||u(e)||Nl(e)||Pl(e)||e===null||e===void 0}function Pl(e){var t=I(e)&&!y(e),a=!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"],d,D,L=n.length;for(d=0;d<L;d+=1)D=n[d],a=a||o(e,D);return t&&a}function Nl(e){var t=x(e),a=!1;return t&&(a=e.filter(function(n){return!u(n)&&$n(e)}).length===0),t&&a}function Rl(e){var t=I(e)&&!y(e),a=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],d,D;for(d=0;d<n.length;d+=1)D=n[d],a=a||o(e,D);return t&&a}function El(e,t){var a=e.diff(t,"days",!0);return a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse"}function Al(e,t){arguments.length===1&&(arguments[0]?Tl(arguments[0])?(e=arguments[0],t=void 0):Rl(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var a=e||Ae(),n=Wr(a,this).startOf("day"),d=i.calendarFormat(this,n)||"sameElse",D=t&&(A(t[d])?t[d].call(this,a):t[d]);return this.format(D||this.localeData().calendar(d,this,Ae(a)))}function Il(){return new v(this)}function Fl(e,t){var a=T(e)?e:Ae(e);return this.isValid()&&a.isValid()?(t=ge(t)||"millisecond",t==="millisecond"?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(t).valueOf()):!1}function Vl(e,t){var a=T(e)?e:Ae(e);return this.isValid()&&a.isValid()?(t=ge(t)||"millisecond",t==="millisecond"?this.valueOf()<a.valueOf():this.clone().endOf(t).valueOf()<a.valueOf()):!1}function zl(e,t,a,n){var d=T(e)?e:Ae(e),D=T(t)?t:Ae(t);return this.isValid()&&d.isValid()&&D.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(d,a):!this.isBefore(d,a))&&(n[1]===")"?this.isBefore(D,a):!this.isAfter(D,a))):!1}function Ll(e,t){var a=T(e)?e:Ae(e),n;return this.isValid()&&a.isValid()?(t=ge(t)||"millisecond",t==="millisecond"?this.valueOf()===a.valueOf():(n=a.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Wl(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function ql(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Hl(e,t,a){var n,d,D;if(!this.isValid())return NaN;if(n=Wr(e,this),!n.isValid())return NaN;switch(d=(n.utcOffset()-this.utcOffset())*6e4,t=ge(t),t){case"year":D=or(this,n)/12;break;case"month":D=or(this,n);break;case"quarter":D=or(this,n)/3;break;case"second":D=(this-n)/1e3;break;case"minute":D=(this-n)/6e4;break;case"hour":D=(this-n)/36e5;break;case"day":D=(this-n-d)/864e5;break;case"week":D=(this-n-d)/6048e5;break;default:D=this-n}return a?D:et(D)}function or(e,t){if(e.date()<t.date())return-or(t,e);var a=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(a,"months"),d,D;return t-n<0?(d=e.clone().add(a-1,"months"),D=(t-n)/(n-d)):(d=e.clone().add(a+1,"months"),D=(t-n)/(d-n)),-(a+D)||0}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function $l(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Bl(e){if(!this.isValid())return null;var t=e!==!0,a=t?this.clone().utc():this;return a.year()<0||a.year()>9999?Ce(a,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ce(a,"Z")):Ce(a,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ul(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",a,n,d,D;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),a="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",d="-MM-DD[T]HH:mm:ss.SSS",D=t+'[")]',this.format(a+n+d+D)}function Gl(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=Ce(this,e);return this.localeData().postformat(t)}function Jl(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ae(e).isValid())?ct({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Kl(e){return this.from(Ae(),e)}function Xl(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ae(e).isValid())?ct({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Zl(e){return this.to(Ae(),e)}function Bn(e){var t;return e===void 0?this._locale._abbr:(t=_t(e),t!=null&&(this._locale=t),this)}var Un=S("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 Gn(){return this._locale}var lr=1e3,Lt=60*lr,ur=60*Lt,Jn=(365*400+97)*24*ur;function Wt(e,t){return(e%t+t)%t}function Kn(e,t,a){return e<100&&e>=0?new Date(e+400,t,a)-Jn:new Date(e,t,a).valueOf()}function Xn(e,t,a){return e<100&&e>=0?Date.UTC(e+400,t,a)-Jn:Date.UTC(e,t,a)}function Ql(e){var t,a;if(e=ge(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?Xn:Kn,e){case"year":t=a(this.year(),0,1);break;case"quarter":t=a(this.year(),this.month()-this.month()%3,1);break;case"month":t=a(this.year(),this.month(),1);break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=a(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Wt(t+(this._isUTC?0:this.utcOffset()*Lt),ur);break;case"minute":t=this._d.valueOf(),t-=Wt(t,Lt);break;case"second":t=this._d.valueOf(),t-=Wt(t,lr);break}return this._d.setTime(t),i.updateOffset(this,!0),this}function eu(e){var t,a;if(e=ge(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?Xn:Kn,e){case"year":t=a(this.year()+1,0,1)-1;break;case"quarter":t=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=a(this.year(),this.month()+1,1)-1;break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=a(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ur-Wt(t+(this._isUTC?0:this.utcOffset()*Lt),ur)-1;break;case"minute":t=this._d.valueOf(),t+=Lt-Wt(t,Lt)-1;break;case"second":t=this._d.valueOf(),t+=lr-Wt(t,lr)-1;break}return this._d.setTime(t),i.updateOffset(this,!0),this}function tu(){return this._d.valueOf()-(this._offset||0)*6e4}function ru(){return Math.floor(this.valueOf()/1e3)}function au(){return new Date(this.valueOf())}function nu(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function iu(){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 su(){return this.isValid()?this.toISOString():null}function ou(){return C(this)}function lu(){return p({},_(this))}function uu(){return _(this).overflow}function cu(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Z("N",0,0,"eraAbbr"),Z("NN",0,0,"eraAbbr"),Z("NNN",0,0,"eraAbbr"),Z("NNNN",0,0,"eraName"),Z("NNNNN",0,0,"eraNarrow"),Z("y",["y",1],"yo","eraYear"),Z("y",["yy",2],0,"eraYear"),Z("y",["yyy",3],0,"eraYear"),Z("y",["yyyy",4],0,"eraYear"),ae("N",Hr),ae("NN",Hr),ae("NNN",Hr),ae("NNNN",wu),ae("NNNNN",Su),Te(["N","NN","NNN","NNNN","NNNNN"],function(e,t,a,n){var d=a._locale.erasParse(e,n,a._strict);d?_(a).era=d:_(a).invalidEra=e}),ae("y",rt),ae("yy",rt),ae("yyy",rt),ae("yyyy",rt),ae("yo",Mu),Te(["y","yy","yyy","yyyy"],Ge),Te(["yo"],function(e,t,a,n){var d;a._locale._eraYearOrdinalRegex&&(d=e.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?t[Ge]=a._locale.eraYearOrdinalParse(e,d):t[Ge]=parseInt(e,10)});function du(e,t){var a,n,d,D=this._eras||_t("en")._eras;for(a=0,n=D.length;a<n;++a)switch(typeof D[a].since==="string"&&(d=i(D[a].since).startOf("day"),D[a].since=d.valueOf()),typeof D[a].until){case"undefined":D[a].until=1/0;break;case"string":d=i(D[a].until).startOf("day").valueOf(),D[a].until=d.valueOf();break}return D}function hu(e,t,a){var n,d,D=this.eras(),L,ne,pe;for(e=e.toUpperCase(),n=0,d=D.length;n<d;++n)if(L=D[n].name.toUpperCase(),ne=D[n].abbr.toUpperCase(),pe=D[n].narrow.toUpperCase(),a)switch(t){case"N":case"NN":case"NNN":if(ne===e)return D[n];break;case"NNNN":if(L===e)return D[n];break;case"NNNNN":if(pe===e)return D[n];break}else if([L,ne,pe].indexOf(e)>=0)return D[n]}function fu(e,t){var a=e.since<=e.until?1:-1;return t===void 0?i(e.since).year():i(e.since).year()+(t-e.offset)*a}function mu(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until||n[e].until<=a&&a<=n[e].since)return n[e].name;return""}function pu(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until||n[e].until<=a&&a<=n[e].since)return n[e].narrow;return""}function gu(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until||n[e].until<=a&&a<=n[e].since)return n[e].abbr;return""}function vu(){var e,t,a,n,d=this.localeData().eras();for(e=0,t=d.length;e<t;++e)if(a=d[e].since<=d[e].until?1:-1,n=this.clone().startOf("day").valueOf(),d[e].since<=n&&n<=d[e].until||d[e].until<=n&&n<=d[e].since)return(this.year()-i(d[e].since).year())*a+d[e].offset;return this.year()}function yu(e){return o(this,"_erasNameRegex")||$r.call(this),e?this._erasNameRegex:this._erasRegex}function _u(e){return o(this,"_erasAbbrRegex")||$r.call(this),e?this._erasAbbrRegex:this._erasRegex}function bu(e){return o(this,"_erasNarrowRegex")||$r.call(this),e?this._erasNarrowRegex:this._erasRegex}function Hr(e,t){return t.erasAbbrRegex(e)}function wu(e,t){return t.erasNameRegex(e)}function Su(e,t){return t.erasNarrowRegex(e)}function Mu(e,t){return t._eraYearOrdinalRegex||rt}function $r(){var e=[],t=[],a=[],n=[],d,D,L,ne,pe,De=this.eras();for(d=0,D=De.length;d<D;++d)L=nt(De[d].name),ne=nt(De[d].abbr),pe=nt(De[d].narrow),t.push(L),e.push(ne),a.push(pe),n.push(L),n.push(ne),n.push(pe);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}Z(0,["gg",2],0,function(){return this.weekYear()%100}),Z(0,["GG",2],0,function(){return this.isoWeekYear()%100});function cr(e,t){Z(0,[e,e.length],0,t)}cr("gggg","weekYear"),cr("ggggg","weekYear"),cr("GGGG","isoWeekYear"),cr("GGGGG","isoWeekYear"),ae("G",gt),ae("g",gt),ae("GG",je,Ue),ae("gg",je,Ue),ae("GGGG",pt,Ct),ae("gggg",pt,Ct),ae("GGGGG",ht,ot),ae("ggggg",ht,ot),Tt(["gggg","ggggg","GGGG","GGGGG"],function(e,t,a,n){t[n.substr(0,2)]=be(e)}),Tt(["gg","GG"],function(e,t,a,n){t[n]=i.parseTwoDigitYear(e)});function xu(e){return Zn.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Du(e){return Zn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function ku(){return yt(this.year(),1,4)}function Ou(){return yt(this.isoWeekYear(),1,4)}function Yu(){var e=this.localeData()._week;return yt(this.year(),e.dow,e.doy)}function Cu(){var e=this.localeData()._week;return yt(this.weekYear(),e.dow,e.doy)}function Zn(e,t,a,n,d){var D;return e==null?Gt(this,n,d).year:(D=yt(e,n,d),t>D&&(t=D),ju.call(this,e,t,a,n,d))}function ju(e,t,a,n,d){var D=Cn(e,t,a,n,d),L=Ut(D.year,0,D.dayOfYear);return this.year(L.getUTCFullYear()),this.month(L.getUTCMonth()),this.date(L.getUTCDate()),this}Z("Q",0,"Qo","quarter"),ae("Q",dt),Te("Q",function(e,t){t[b]=(be(e)-1)*3});function Tu(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Z("D",["DD",2],"Do","date"),ae("D",je,at),ae("DD",je,Ue),ae("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Te(["D","DD"],U),Te("Do",function(e,t){t[U]=be(e.match(je)[0])});var Qn=Be("Date",!0);Z("DDD",["DDDD",3],"DDDo","dayOfYear"),ae("DDD",lt),ae("DDDD",st),Te(["DDD","DDDD"],function(e,t,a){a._dayOfYear=be(e)});function Pu(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Z("m",["mm",2],0,"minute"),ae("m",je,Qe),ae("mm",je,Ue),Te(["m","mm"],le);var Nu=Be("Minutes",!1);Z("s",["ss",2],0,"second"),ae("s",je,Qe),ae("ss",je,Ue),Te(["s","ss"],ye);var Ru=Be("Seconds",!1);Z("S",0,0,function(){return~~(this.millisecond()/100)}),Z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Z(0,["SSS",3],0,"millisecond"),Z(0,["SSSS",4],0,function(){return this.millisecond()*10}),Z(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Z(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Z(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Z(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Z(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ae("S",lt,dt),ae("SS",lt,Ue),ae("SSS",lt,st);var kt,ei;for(kt="SSSS";kt.length<=9;kt+="S")ae(kt,rt);function Eu(e,t){t[xe]=be(("0."+e)*1e3)}for(kt="S";kt.length<=9;kt+="S")Te(kt,Eu);ei=Be("Milliseconds",!1),Z("z",0,0,"zoneAbbr"),Z("zz",0,0,"zoneName");function Au(){return this._isUTC?"UTC":""}function Iu(){return this._isUTC?"Coordinated Universal Time":""}var K=v.prototype;K.add=Cl,K.calendar=Al,K.clone=Il,K.diff=Hl,K.endOf=eu,K.format=Gl,K.from=Jl,K.fromNow=Kl,K.to=Xl,K.toNow=Zl,K.get=Je,K.invalidAt=uu,K.isAfter=Fl,K.isBefore=Vl,K.isBetween=zl,K.isSame=Ll,K.isSameOrAfter=Wl,K.isSameOrBefore=ql,K.isValid=ou,K.lang=Un,K.locale=Bn,K.localeData=Gn,K.max=ol,K.min=sl,K.parsingFlags=lu,K.set=Bt,K.startOf=Ql,K.subtract=jl,K.toArray=nu,K.toObject=iu,K.toDate=au,K.toISOString=Bl,K.inspect=Ul,typeof Symbol<"u"&&Symbol.for!=null&&(K[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),K.toJSON=su,K.toString=$l,K.unix=ru,K.valueOf=tu,K.creationData=cu,K.eraName=mu,K.eraNarrow=pu,K.eraAbbr=gu,K.eraYear=vu,K.year=Fe,K.isLeapYear=Le,K.weekYear=xu,K.isoWeekYear=Du,K.quarter=K.quarters=Tu,K.month=On,K.daysInMonth=ro,K.week=K.weeks=co,K.isoWeek=K.isoWeeks=ho,K.weeksInYear=Yu,K.weeksInWeekYear=Cu,K.isoWeeksInYear=ku,K.isoWeeksInISOWeekYear=Ou,K.date=Qn,K.day=K.days=Do,K.weekday=ko,K.isoWeekday=Oo,K.dayOfYear=Pu,K.hour=K.hours=Ro,K.minute=K.minutes=Nu,K.second=K.seconds=Ru,K.millisecond=K.milliseconds=ei,K.utcOffset=gl,K.utc=yl,K.local=_l,K.parseZone=bl,K.hasAlignedHourOffset=wl,K.isDST=Sl,K.isLocal=xl,K.isUtcOffset=Dl,K.isUtc=Ln,K.isUTC=Ln,K.zoneAbbr=Au,K.zoneName=Iu,K.dates=S("dates accessor is deprecated. Use date instead.",Qn),K.months=S("months accessor is deprecated. Use month instead",On),K.years=S("years accessor is deprecated. Use year instead",Fe),K.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vl),K.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ml);function Fu(e){return Ae(e*1e3)}function Vu(){return Ae.apply(null,arguments).parseZone()}function ti(e){return e}var Ye=ee.prototype;Ye.calendar=fe,Ye.longDateFormat=J,Ye.invalidDate=P,Ye.ordinal=W,Ye.preparse=ti,Ye.postformat=ti,Ye.relativeTime=ce,Ye.pastFuture=se,Ye.set=z,Ye.eras=du,Ye.erasParse=hu,Ye.erasConvertYear=fu,Ye.erasAbbrRegex=_u,Ye.erasNameRegex=yu,Ye.erasNarrowRegex=bu,Ye.months=Zs,Ye.monthsShort=Qs,Ye.monthsParse=to,Ye.monthsRegex=no,Ye.monthsShortRegex=ao,Ye.week=so,Ye.firstDayOfYear=uo,Ye.firstDayOfWeek=lo,Ye.weekdays=bo,Ye.weekdaysMin=So,Ye.weekdaysShort=wo,Ye.weekdaysParse=xo,Ye.weekdaysRegex=Yo,Ye.weekdaysShortRegex=Co,Ye.weekdaysMinRegex=jo,Ye.isPM=Po,Ye.meridiem=Eo;function dr(e,t,a,n){var d=_t(),D=g().set(n,t);return d[a](D,e)}function ri(e,t,a){if(u(e)&&(t=e,e=void 0),e=e||"",t!=null)return dr(e,t,a,"month");var n,d=[];for(n=0;n<12;n++)d[n]=dr(e,n,a,"month");return d}function Br(e,t,a,n){typeof e=="boolean"?(u(t)&&(a=t,t=void 0),t=t||""):(t=e,a=t,e=!1,u(t)&&(a=t,t=void 0),t=t||"");var d=_t(),D=e?d._week.dow:0,L,ne=[];if(a!=null)return dr(t,(a+D)%7,n,"day");for(L=0;L<7;L++)ne[L]=dr(t,(L+D)%7,n,"day");return ne}function zu(e,t){return ri(e,t,"months")}function Lu(e,t){return ri(e,t,"monthsShort")}function Wu(e,t,a){return Br(e,t,a,"weekdays")}function qu(e,t,a){return Br(e,t,a,"weekdaysShort")}function Hu(e,t,a){return Br(e,t,a,"weekdaysMin")}Dt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,a=be(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+a}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",Dt),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",_t);var bt=Math.abs;function $u(){var e=this._data;return this._milliseconds=bt(this._milliseconds),this._days=bt(this._days),this._months=bt(this._months),e.milliseconds=bt(e.milliseconds),e.seconds=bt(e.seconds),e.minutes=bt(e.minutes),e.hours=bt(e.hours),e.months=bt(e.months),e.years=bt(e.years),this}function ai(e,t,a,n){var d=ct(t,a);return e._milliseconds+=n*d._milliseconds,e._days+=n*d._days,e._months+=n*d._months,e._bubble()}function Bu(e,t){return ai(this,e,t,1)}function Uu(e,t){return ai(this,e,t,-1)}function ni(e){return e<0?Math.floor(e):Math.ceil(e)}function Gu(){var e=this._milliseconds,t=this._days,a=this._months,n=this._data,d,D,L,ne,pe;return e>=0&&t>=0&&a>=0||e<=0&&t<=0&&a<=0||(e+=ni(Ur(a)+t)*864e5,t=0,a=0),n.milliseconds=e%1e3,d=et(e/1e3),n.seconds=d%60,D=et(d/60),n.minutes=D%60,L=et(D/60),n.hours=L%24,t+=et(L/24),pe=et(ii(t)),a+=pe,t-=ni(Ur(pe)),ne=et(a/12),a%=12,n.days=t,n.months=a,n.years=ne,this}function ii(e){return e*4800/146097}function Ur(e){return e*146097/4800}function Ju(e){if(!this.isValid())return NaN;var t,a,n=this._milliseconds;if(e=ge(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,a=this._months+ii(t),e){case"month":return a;case"quarter":return a/3;case"year":return a/12}else switch(t=this._days+Math.round(Ur(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 wt(e){return function(){return this.as(e)}}var si=wt("ms"),Ku=wt("s"),Xu=wt("m"),Zu=wt("h"),Qu=wt("d"),ec=wt("w"),tc=wt("M"),rc=wt("Q"),ac=wt("y"),nc=si;function ic(){return ct(this)}function sc(e){return e=ge(e),this.isValid()?this[e+"s"]():NaN}function Nt(e){return function(){return this.isValid()?this._data[e]:NaN}}var oc=Nt("milliseconds"),lc=Nt("seconds"),uc=Nt("minutes"),cc=Nt("hours"),dc=Nt("days"),hc=Nt("months"),fc=Nt("years");function mc(){return et(this.days()/7)}var St=Math.round,qt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function pc(e,t,a,n,d){return d.relativeTime(t||1,!!a,e,n)}function gc(e,t,a,n){var d=ct(e).abs(),D=St(d.as("s")),L=St(d.as("m")),ne=St(d.as("h")),pe=St(d.as("d")),De=St(d.as("M")),Ke=St(d.as("w")),Mt=St(d.as("y")),Ot=D<=a.ss&&["s",D]||D<a.s&&["ss",D]||L<=1&&["m"]||L<a.m&&["mm",L]||ne<=1&&["h"]||ne<a.h&&["hh",ne]||pe<=1&&["d"]||pe<a.d&&["dd",pe];return a.w!=null&&(Ot=Ot||Ke<=1&&["w"]||Ke<a.w&&["ww",Ke]),Ot=Ot||De<=1&&["M"]||De<a.M&&["MM",De]||Mt<=1&&["y"]||["yy",Mt],Ot[2]=t,Ot[3]=+e>0,Ot[4]=n,pc.apply(null,Ot)}function vc(e){return e===void 0?St:typeof e=="function"?(St=e,!0):!1}function yc(e,t){return qt[e]===void 0?!1:t===void 0?qt[e]:(qt[e]=t,e==="s"&&(qt.ss=t-1),!0)}function _c(e,t){if(!this.isValid())return this.localeData().invalidDate();var a=!1,n=qt,d,D;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(a=e),typeof t=="object"&&(n=Object.assign({},qt,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),d=this.localeData(),D=gc(this,!a,n,d),a&&(D=d.pastFuture(+this,D)),d.postformat(D)}var Gr=Math.abs;function Ht(e){return(e>0)-(e<0)||+e}function hr(){if(!this.isValid())return this.localeData().invalidDate();var e=Gr(this._milliseconds)/1e3,t=Gr(this._days),a=Gr(this._months),n,d,D,L,ne=this.asSeconds(),pe,De,Ke,Mt;return ne?(n=et(e/60),d=et(n/60),e%=60,n%=60,D=et(a/12),a%=12,L=e?e.toFixed(3).replace(/\.?0+$/,""):"",pe=ne<0?"-":"",De=Ht(this._months)!==Ht(ne)?"-":"",Ke=Ht(this._days)!==Ht(ne)?"-":"",Mt=Ht(this._milliseconds)!==Ht(ne)?"-":"",pe+"P"+(D?De+D+"Y":"")+(a?De+a+"M":"")+(t?Ke+t+"D":"")+(d||n||e?"T":"")+(d?Mt+d+"H":"")+(n?Mt+n+"M":"")+(e?Mt+L+"S":"")):"P0D"}var ke=ir.prototype;ke.isValid=hl,ke.abs=$u,ke.add=Bu,ke.subtract=Uu,ke.as=Ju,ke.asMilliseconds=si,ke.asSeconds=Ku,ke.asMinutes=Xu,ke.asHours=Zu,ke.asDays=Qu,ke.asWeeks=ec,ke.asMonths=tc,ke.asQuarters=rc,ke.asYears=ac,ke.valueOf=nc,ke._bubble=Gu,ke.clone=ic,ke.get=sc,ke.milliseconds=oc,ke.seconds=lc,ke.minutes=uc,ke.hours=cc,ke.days=dc,ke.weeks=mc,ke.months=hc,ke.years=fc,ke.humanize=_c,ke.toISOString=hr,ke.toString=hr,ke.toJSON=hr,ke.locale=Bn,ke.localeData=Gn,ke.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",hr),ke.lang=Un,Z("X",0,0,"unix"),Z("x",0,0,"valueOf"),ae("x",gt),ae("X",ft),Te("X",function(e,t,a){a._d=new Date(parseFloat(e)*1e3)}),Te("x",function(e,t,a){a._d=new Date(be(e))});return i.version="2.30.1",M(Ae),i.fn=K,i.min=ll,i.max=ul,i.now=cl,i.utc=g,i.unix=Fu,i.months=zu,i.isDate=h,i.locale=Dt,i.invalid=j,i.duration=ct,i.isMoment=T,i.weekdays=Wu,i.parseZone=Vu,i.localeData=_t,i.isDuration=sr,i.monthsShort=Lu,i.weekdaysMin=Hu,i.defineLocale=Er,i.updateLocale=Vo,i.locales=zo,i.weekdaysShort=qu,i.normalizeUnits=ge,i.relativeTimeRounding=vc,i.relativeTimeThreshold=yc,i.calendarFormat=El,i.prototype=K,i.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"},i}))})(pr)),pr.exports}var gh=sn.exports,yi;function vh(){return yi||(yi=1,(function(l,s){(function(c,i){i(typeof _r=="function"?pn():c.moment)})(gh,(function(c){var i=c.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(){return this.day()===0?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT":"[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 i}))})()),sn.exports}vh();var on={exports:{}},yh=on.exports,_i;function _h(){return _i||(_i=1,(function(l,s){(function(c,i){i(typeof _r=="function"?pn():c.moment)})(yh,(function(c){var i=c.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(M){var x=M%10,I=~~(M%100/10)===1?"th":x===1?"st":x===2?"nd":x===3?"rd":"th";return M+I},week:{dow:1,doy:4}});return i}))})()),on.exports}_h();var ln={exports:{}},bh=ln.exports,bi;function wh(){return bi||(bi=1,(function(l,s){(function(c,i){i(typeof _r=="function"?pn():c.moment)})(bh,(function(c){function i(x,I,o,y){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[x+" Tage",x+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[x+" Monate",x+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[x+" Jahre",x+" Jahren"]};return I?r[o][0]:r[o][1]}var M=c.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:i,mm:"%d Minuten",h:i,hh:"%d Stunden",d:i,dd:i,w:i,ww:"%d Wochen",M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return M}))})()),ln.exports}wh();const Yt=l=>{let s="";return l.split(":").forEach(c=>{s+=c}),parseInt(s)},wi=l=>l.toString().padStart(4,"0").match(/.{1,2}/g).join(":"),Jr=l=>{const s=l.address;if(l.addresstype==="county"&&s.country)return s.county;if(l.addresstype==="village"&&s.village)return s.village;const c=[];["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(x=>{s.hasOwnProperty(x)&&s[x]&&c.push(s[x])}),s.road?c.push(s.road):s.pedestrian?c.push(s.pedestrian):s.suburb?c.push(s.suburb):s.square?c.push(s.square):(s.neighbourhood&&c.push(s.neighbourhood),s.hamlet?c.push(s.hamlet):s.isolated_dwelling?c.push(s.isolated_dwelling):s.locality?c.push(s.locality):s.croft&&c.push(s.croft)),s.house_number&&c.push(s.house_number),s.postcode&&c.push(s.postcode),s.village&&c.push(s.village),s.town?c.push(s.town):s.city&&c.push(s.city);var M=c.join(", ").substr(0,150);return M};function er(l){let s=window.sessionStorage.getItem(l);if(s!==null){let c=JSON.parse(s);if(new Date(c.expirationDate)>new Date)return c.value;window.sessionStorage.removeItem(l)}return null}function Sh(l,s,c){let i=c?new Date(c*1e3):null;if(i){let M={value:s,expirationDate:i.toISOString()};window.sessionStorage.setItem(l,JSON.stringify(M))}}function Si({day:l,slot:s,i18next:c}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text pl-4",children:[m.jsx("b",{children:l})," ",c.t("alle")," ",c.t("ore")," ",m.jsx("b",{children:s})]})})})})}const Mh=({component:l,current:s,onChange:c,i18next:i})=>{const[M,x]=G.useState(),[I,o]=G.useState([]),[y,r]=G.useState([]),[u,h]=G.useState(!1),[f,p]=G.useState(null),[g,Y]=G.useState(null),[_,k]=G.useState(null),[C,j]=G.useState(null),[F,R]=G.useState({}),[O,v]=G.useState(null),[T,w]=G.useState(!1),[S,V]=G.useState([]),[E,A]=G.useState(!1),z=G.useRef(),B=l.calendarId;he.locale(i.language);const ee=N=>{let W=he(N).format("YYYY-MM-DD");fetch(te(W)).then(q=>q.json()).then(q=>{let ce=fe(N||new Date);const se=q.filter(Re=>Re.available==!0);se.length===0&&X();let ge=[];ce.forEach(Re=>{q.some(dt=>dt.date===Re&&dt.available==!0)?ge.push({available:!0,date:Re}):ge.push({available:!1,date:Re})});const _e=ge.map(Re=>{if(Re.available===!1)return he(Re.date,"YYYY-MM-DD").toDate()});o(_e);const $e=se.length?se[0].date:N;ie($e)}).catch(q=>console.error(q))},ie=N=>{j(null),k(null),r([]);let W=he(N).format("YYYY-MM-DD");fetch(de(W)).then(q=>q.json()).then(q=>{const ce=q.filter(se=>se.availability==!0);R(ce[0]),ce.length>0?(r(q),h(!1),k(he(N).format("L")),x(he(N,"YYYY-MM-DD").toDate())):(q.length>0&&x(he(q[0].date,"YYYY-MM-DD").toDate()),r([]),X())})},re=()=>{if(B!==""&&B!=null)if(!s.dataValue)ee(new Date);else if(l.multiple&&Array.isArray(s.dataValue)){if(s.dataValue.length>0){v(s.dataValue);let N=[];s.dataValue.map(W=>{N.push({...W,date:he(W.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),V(N)}}else if(!l.multiple&&typeof s.dataValue=="object"){const N={date:s.dataValue.date,slot:s.dataValue.slot},W={...s.dataValue,date:he(s.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};V([W]),v(N)}else{let N=s.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),W=N[2].split("#");const q={date:he(N[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:N[1]};l.multiple?(c([{date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}]),V([{date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])):(c({date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}),V([{date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])),v(q)}};G.useEffect(()=>{window.FormioInstance?.formReady.then(()=>{setTimeout(()=>{re()},1e3)})},[]);const fe=N=>{let q=he(N,"YYYY-MM").daysInMonth(),ce=[];for(;q;){let se=he(N).date(q);ce.push(se.format("YYYY-MM-DD")),q--}return ce},te=(N,W=!1)=>{let q=l.calendarId,ce=l.select_opening_hours,se=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");let ge=`${Ee()}/api/calendars/${q}/availabilities`,_e=[`from_time=${he(N).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(N).endOf("month").format("YYYY-MM-DD")}`];return W&&_e.push(`available=${W}`),ce&&se&&_e.push(`opening_hours=${se.join()}`),`${ge}?${_e.join("&")}`},de=(N,W=!1)=>{let q=l.calendarId,ce=l.select_opening_hours,se=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");const ge=he(N).format("YYYY-MM-DD");let _e=`${Ee()}/api/calendars/${q}/availabilities/${ge}`,$e=[];return W&&$e.push(`available=${W}`),ce&&se&&$e.push(`opening_hours=${se.join()}`),$e&&(_e=`${_e}?${$e.join("&")}`),_e},ve=N=>{ee(N)},me=N=>{setTimeout(()=>{w(!T)},1e3),ie(N)},oe=N=>{j(null),setTimeout(()=>{N&&(Y(N.target.dataset),j(N.target.id))},300)},Z=N=>{p(null);let W=`${Ee()}/it/meetings/new-draft`,q={date:g?.date?he(g?.date).format("DD-MM-YYYY"):he(N.target.dataset.date).format("DD-MM-YYYY"),slot:g?.value_start&&g?.value_end?g.value_start+"-"+g.value_end:N.target.dataset.slots,calendar:l.calendarId,opening_hour:g?.opening_hour?g?.opening_hour:N.target.dataset.opening_hour,meeting:f?f.id:"",first_available_date:F.date,first_available_start_time:F.start_time,first_available_end_time:F.end_time,first_availability_updated_at:he().format()};fetch(W,{method:"POST",body:JSON.stringify(q),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(ce=>{if(!ce.ok)throw new Error(i.t("Intervallo selezionato non disponibile!"));return ce.json()}).then(ce=>{p(ce);const se={date:q.date,slot:q.slot,calendar_id:q.calendar[0],opening_hour_id:q.opening_hour||q.opening_hour_id,meeting_id:ce.id};V([...S,se])}).catch(ce=>{console.log(ce),He.fire({title:"",html:"<p>"+ce+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},Ne=()=>{g&&(Z(),w(!T))},Ie=()=>m.jsx("span",{children:i.t("Tempo prenotazione scaduto!")}),Ce=({minutes:N,seconds:W,completed:q})=>q?m.jsx(Ie,{}):m.jsx("div",{children:m.jsxs("div",{children:[" ",m.jsxs("span",{children:[" ",m.jsxs("i",{children:[i.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",m.jsxs("b",{children:[N," ",i.t("minuti")," ",W," ",i.t("secondi")]})]})]})}),Oe=N=>{const W=Yt(N.target.value),q=Yt(N.target.min),ce=Yt(N.target.max);W<q||W>ce||W>Yt(g.end)?(He.fire({title:"",html:`<p>${i.t("l'orario")} <b>${wi(W)}</b> ${i.t("non è valido")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),J("")):Y({...g,value_start:N.target.value})},$=N=>{const W=Yt(N.target.value),q=Yt(N.target.min),ce=Yt(N.target.max);W<q||W>ce||W<Yt(g.start)?(He.fire({title:"",html:`<p>${i.t("l'orario")} <b>${wi(W)}</b> ${i.t("non è valido")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),J("")):Y({...g,value_end:N.target.value})},J=N=>{if(N===null||N==="")c("");else if(Array.isArray(N)&&N.length>0){let W=[];S.map(q=>{W.push({date:he(q.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:q.slot,calendar_id:q.calendar_id||q.calendar[0],meeting_id:q.meeting_id,opening_hour_id:q.opening_hour||q.opening_hour_id})}),l.multiple?c(W):c(W[0])}else c("")},X=()=>{h(!0),p(null),k(null),J(null)},P=()=>{if(i.language==="it")return zs;if(i.language==="en")return Vs;if(i.language==="de")return Fs};G.useEffect(()=>{J(S)},[S]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&E===!1?(A(!0),setTimeout(()=>{re()},1e3)):(A(!1),setTimeout(()=>{re()},1e3))},[]);const H=(N,W)=>{let q=`${Ee()}/api/meetings/${W.meeting_id}`;fetch(q,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${er("auth-token")}`},strictErrors:!0}).then(ce=>{if(ce&&ce.status>400)He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const se=[...S.slice(0,N),...S.slice(N+1)];V(se),ee(new Date)}})};return m.jsxs(m.Fragment,{children:[E&&O?m.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[m.jsxs("b",{children:[Array.isArray(O)&&O.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:Array.isArray(O)?O.map(N=>m.jsx(Si,{day:he(N.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:i,slot:N.slot})):m.jsx(Si,{day:he(O.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:i,slot:O.slot})})})})]}):m.jsx("div",{className:"slot-calendar ",children:m.jsxs("div",{className:"row",children:[l.multiple?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(l.label)}),m.jsx(vr.DayPicker,{mode:"single",selected:M,locale:P(),disabled:I,onMonthChange:ve,onDayClick:me}),m.jsx("p",{children:i.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")})]})}):S.length!==1?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(l.label)}),m.jsx(vr.DayPicker,{mode:"single",selected:M,locale:P(),disabled:I,onMonthChange:ve,onDayClick:me}),m.jsxs("p",{children:[" ",i.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")]})]})}):null,m.jsx("div",{className:"col-12",children:S.length?m.jsx("div",{className:"row m-2",children:m.jsxs("div",{className:"col-12 mb-4",children:[m.jsxs("b",{children:[S.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"," "]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:S.map((N,W)=>m.jsx("li",{children:m.jsx("div",{className:"list-item",children:m.jsxs("div",{className:"it-right-zone",children:[m.jsxs("span",{className:"text pl-4",children:[N.date," ",g||N.slot?`${i.t("alle")} ${N.slot}`:""]}),m.jsx(ue.Icon,{icon:"it-delete",onClick:()=>H(W,N),role:"button"})]})})},"li"+W))})})}),f?m.jsx(ue.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:m.jsx(Es,{date:f.expiration_time,renderer:Ce})}):null]})}):null})]})}),m.jsxs(ue.Modal,{isOpen:T,toggle:()=>w(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[m.jsx(ue.ModalHeader,{toggle:()=>w(!T),id:"daySelected",children:i.t("Seleziona una fascia oraria")}),u?null:m.jsxs("div",{className:"title-xsmall u-grey-dark px-4",children:[" ",i.t("Seleziona una fascia oraria e, se necessario, utilizza l'apposito controllo per accorciare la durata della prenotazione, Poi clicca su Conferma")]}),m.jsx(ue.ModalBody,{children:m.jsxs("div",{className:"row",children:[S.length>=1?m.jsxs("div",{children:[_&&!u?m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Me(_).format("DD/MM/YYYY")]}):null,m.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[m.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:m.jsxs("b",{children:[m.jsx(ue.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",i.t("Ultimo orario selezionato")]})}),m.jsx("div",{className:"col-6 px-2",children:m.jsx("button",{type:"button",id:"slot-last-selection",onClick:oe,tabIndex:"1",className:C==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":S[S.length-1].slot,"data-opening_hour":S[S.length-1].opening_hour_id,"data-start":S[S.length-1].slot.split("-")[0],"data-end":S[S.length-1].slot.split("-")[1],"data-value_start":S[S.length-1].slot.split("-")[0],"data-value_end":S[S.length-1].slot.split("-")[1],disabled:u,children:S[S.length-1].slot})})]})]}):null,m.jsx("div",{children:_&&S.length>=1?m.jsx("h6",{children:i.t("Seleziona altri orari")}):u?null:m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Me(_).format("DD/MM/YYYY")]})}),y.map((N,W)=>m.jsx("div",{className:"col-6",children:m.jsxs("button",{type:"button",id:"slot-"+W,onClick:oe,ref:z,className:C==="slot-"+W?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":N.date,"data-start":N.start_time,"data-end":N.end_time,"data-value_start":N.start_time,"data-value_end":N.end_time,"data-slots":N.start_time+"-"+N.end_time,"data-opening_hour":N.opening_hour,"data-min_duration":N.min_duration,disabled:N.slots_available==0,children:[N.start_time," - ",N.end_time]})},"slot-"+W)),u?m.jsxs("div",{className:"callout callout-highlight warning",children:[m.jsxs("div",{className:"callout-title",children:[m.jsx(ue.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),i.t("Attenzione")]}),m.jsxs("p",{children:[" ",i.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null,m.jsx("div",{className:"col-12",children:g?.value_start&&C?m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-12 mb-3",children:m.jsx("p",{className:"mb-3",children:m.jsx("b",{children:i.t("Se necessario, utilizza il controllo che segue per accorciare la durata della prenotazione")})})}),m.jsx("div",{className:"col-12 col-md-6 mb-4",children:m.jsx(ue.Input,{type:"time",label:i.t("Dalle"),className:"active",defaultValue:g.value_start||g.start,min:g.start,max:g.end,onBlur:Oe})}),m.jsx("div",{className:"col-12 col-md-6 mb-4",children:m.jsx(ue.Input,{type:"time",label:i.t("alle"),className:"active",defaultValue:g.value_end||g.end,onBlur:$,min:g.start,max:g.end})})]}):null})]})}),m.jsx(ue.ModalFooter,{children:m.jsx(ue.Button,{color:"primary",onClick:()=>Ne(),disabled:!_||!g?.value_start,children:i.t("Conferma")})})]})]})};let Ls=class Ws extends tt.ReactComponent{constructor(s,c,i){super(s,c,i)}static get builderInfo(){return{title:"Dynamic Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Ws.schema()}}static schema(){return tt.ReactComponent.schema({type:"dynamic_calendar"})}static editForm=Yc;attachReact(s,c){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(Mh,{ref:c,component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this}))}setValue(s){if(s)if(Array.isArray(s))this.selectedNextSlots=s,this.updateValue(s),this.shouldSetValue=!0;else if(typeof s=="object")this.date=s.date,this.slot=s.slot,this.meeting=s.meeting_id,this.meeting_expiration_time=null,this.opening_hour=s.opening_hour_id,this.calendar_id=s.calendar_id,this.updateValue(s),this.shouldSetValue=!0;else{let c=s.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),i=c[2].split("#");this.date=c[0],this.slot=c[1],this.meeting=i[1],this.meeting_expiration_time=null,this.opening_hour=i.length===3?i[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 s=this.meeting?this.meeting:"",c=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:s,opening_hour_id:c}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};const xh=[{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:Ee()+"/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 = '"+Ee()+"'; 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:Ee()+"/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) {
|
|
48
|
+
`+new Error().stack),a=!1}return t.apply(this,arguments)},t)}var V={};function E(e,t){i.deprecationHandler!=null&&i.deprecationHandler(e,t),V[e]||(w(t),V[e]=!0)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null;function A(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function z(e){var t,a;for(a in e)o(e,a)&&(t=e[a],A(t)?this[a]=t:this["_"+a]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function B(e,t){var a=p({},e),n;for(n in t)o(t,n)&&(I(e[n])&&I(t[n])?(a[n]={},p(a[n],e[n]),p(a[n],t[n])):t[n]!=null?a[n]=t[n]:delete a[n]);for(n in e)o(e,n)&&!o(t,n)&&I(e[n])&&(a[n]=p({},a[n]));return a}function ee(e){e!=null&&this.set(e)}var ie;Object.keys?ie=Object.keys:ie=function(e){var t,a=[];for(t in e)o(e,t)&&a.push(t);return a};var re={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function fe(e,t,a){var n=this._calendar[e]||this._calendar.sameElse;return A(n)?n.call(t,a):n}function te(e,t,a){var n=""+Math.abs(e),d=t-n.length,D=e>=0;return(D?a?"+":"":"-")+Math.pow(10,Math.max(0,d)).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,ve=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,me={},oe={};function Z(e,t,a,n){var d=n;typeof n=="string"&&(d=function(){return this[n]()}),e&&(oe[e]=d),t&&(oe[t[0]]=function(){return te(d.apply(this,arguments),t[1],t[2])}),a&&(oe[a]=function(){return this.localeData().ordinal(d.apply(this,arguments),e)})}function Ne(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ie(e){var t=e.match(de),a,n;for(a=0,n=t.length;a<n;a++)oe[t[a]]?t[a]=oe[t[a]]:t[a]=Ne(t[a]);return function(d){var D="",L;for(L=0;L<n;L++)D+=A(t[L])?t[L].call(d,e):t[L];return D}}function Ce(e,t){return e.isValid()?(t=Oe(t,e.localeData()),me[t]=me[t]||Ie(t),me[t](e)):e.localeData().invalidDate()}function Oe(e,t){var a=5;function n(d){return t.longDateFormat(d)||d}for(ve.lastIndex=0;a>=0&&ve.test(e);)e=e.replace(ve,n),ve.lastIndex=0,a-=1;return e}var $={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 J(e){var t=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];return t||!a?t:(this._longDateFormat[e]=a.match(de).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var X="Invalid date";function P(){return this._invalidDate}var H="%d",N=/\d{1,2}/;function W(e){return this._ordinal.replace("%d",e)}var q={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 ce(e,t,a,n){var d=this._relativeTime[a];return A(d)?d(e,t,a,n):d.replace(/%d/i,e)}function se(e,t){var a=this._relativeTime[e>0?"future":"past"];return A(a)?a(t):a.replace(/%s/i,t)}var Pe={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 ge(e){return typeof e=="string"?Pe[e]||Pe[e.toLowerCase()]:void 0}function _e(e){var t={},a,n;for(n in e)o(e,n)&&(a=ge(n),a&&(t[a]=e[n]));return t}var $e={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 Re(e){var t=[],a;for(a in e)o(e,a)&&t.push({unit:a,priority:$e[a]});return t.sort(function(n,d){return n.priority-d.priority}),t}var dt=/\d/,Ue=/\d\d/,st=/\d{3}/,Ct=/\d{4}/,ot=/[+-]?\d{6}/,je=/\d\d?/,jt=/\d\d\d\d?/,At=/\d\d\d\d\d\d?/,lt=/\d{1,3}/,pt=/\d{1,4}/,ht=/[+-]?\d{1,6}/,rt=/\d+/,gt=/[+-]?\d+/,vt=/Z|[+-]\d\d:?\d\d/gi,We=/Z|[+-]\d\d(?::?\d\d)?/gi,ft=/[+-]?\d+(\.\d{1,3})?/,ut=/[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,at=/^[1-9]\d?/,Qe=/^([1-9]\d|\d)/,It;It={};function ae(e,t,a){It[e]=A(t)?t:function(n,d){return n&&a?a:t}}function Yr(e,t){return o(It,e)?It[e](t._strict,t._locale):new RegExp(tr(e))}function tr(e){return nt(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,a,n,d,D){return a||n||d||D}))}function nt(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function et(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function be(e){var t=+e,a=0;return t!==0&&isFinite(t)&&(a=et(t)),a}var Ft={};function Te(e,t){var a,n=t,d;for(typeof e=="string"&&(e=[e]),u(t)&&(n=function(D,L){L[t]=be(D)}),d=e.length,a=0;a<d;a++)Ft[e[a]]=n}function Tt(e,t){Te(e,function(a,n,d,D){d._w=d._w||{},t(a,d._w,d,D)})}function Cr(e,t,a){t!=null&&o(Ft,e)&&Ft[e](t,a._a,a,e)}function Vt(e){return e%4===0&&e%100!==0||e%400===0}var Ge=0,b=1,U=2,Q=3,le=4,ye=5,xe=6,Se=7,we=8;Z("Y",0,0,function(){var e=this.year();return e<=9999?te(e,4):"+"+e}),Z(0,["YY",2],0,function(){return this.year()%100}),Z(0,["YYYY",4],0,"year"),Z(0,["YYYYY",5],0,"year"),Z(0,["YYYYYY",6,!0],0,"year"),ae("Y",gt),ae("YY",je,Ue),ae("YYYY",pt,Ct),ae("YYYYY",ht,ot),ae("YYYYYY",ht,ot),Te(["YYYYY","YYYYYY"],Ge),Te("YYYY",function(e,t){t[Ge]=e.length===2?i.parseTwoDigitYear(e):be(e)}),Te("YY",function(e,t){t[Ge]=i.parseTwoDigitYear(e)}),Te("Y",function(e,t){t[Ge]=parseInt(e,10)});function qe(e){return Vt(e)?366:365}i.parseTwoDigitYear=function(e){return be(e)+(be(e)>68?1900:2e3)};var Fe=Be("FullYear",!0);function Le(){return Vt(this.year())}function Be(e,t){return function(a){return a!=null?(mt(this,e,a),i.updateOffset(this,t),this):it(this,e)}}function it(e,t){if(!e.isValid())return NaN;var a=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?a.getUTCMilliseconds():a.getMilliseconds();case"Seconds":return n?a.getUTCSeconds():a.getSeconds();case"Minutes":return n?a.getUTCMinutes():a.getMinutes();case"Hours":return n?a.getUTCHours():a.getHours();case"Date":return n?a.getUTCDate():a.getDate();case"Day":return n?a.getUTCDay():a.getDay();case"Month":return n?a.getUTCMonth():a.getMonth();case"FullYear":return n?a.getUTCFullYear():a.getFullYear();default:return NaN}}function mt(e,t,a){var n,d,D,L,ne;if(!(!e.isValid()||isNaN(a))){switch(n=e._d,d=e._isUTC,t){case"Milliseconds":return void(d?n.setUTCMilliseconds(a):n.setMilliseconds(a));case"Seconds":return void(d?n.setUTCSeconds(a):n.setSeconds(a));case"Minutes":return void(d?n.setUTCMinutes(a):n.setMinutes(a));case"Hours":return void(d?n.setUTCHours(a):n.setHours(a));case"Date":return void(d?n.setUTCDate(a):n.setDate(a));case"FullYear":break;default:return}D=a,L=e.month(),ne=e.date(),ne=ne===29&&L===1&&!Vt(D)?28:ne,d?n.setUTCFullYear(D,L,ne):n.setFullYear(D,L,ne)}}function Je(e){return e=ge(e),A(this[e])?this[e]():this}function Bt(e,t){if(typeof e=="object"){e=_e(e);var a=Re(e),n,d=a.length;for(n=0;n<d;n++)this[a[n].unit](e[a[n].unit])}else if(e=ge(e),A(this[e]))return this[e](t);return this}function jr(e,t){return(e%t+t)%t}var ze;Array.prototype.indexOf?ze=Array.prototype.indexOf:ze=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Tr(e,t){if(isNaN(e)||isNaN(t))return NaN;var a=jr(t,12);return e+=(t-a)/12,a===1?Vt(e)?29:28:31-a%7%2}Z("M",["MM",2],"Mo",function(){return this.month()+1}),Z("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Z("MMMM",0,0,function(e){return this.localeData().months(this,e)}),ae("M",je,at),ae("MM",je,Ue),ae("MMM",function(e,t){return t.monthsShortRegex(e)}),ae("MMMM",function(e,t){return t.monthsRegex(e)}),Te(["M","MM"],function(e,t){t[b]=be(e)-1}),Te(["MMM","MMMM"],function(e,t,a,n){var d=a._locale.monthsParse(e,n,a._strict);d!=null?t[b]=d:_(a).invalidMonth=e});var Js="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Dn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),kn=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ks=ut,Xs=ut;function Zs(e,t){return e?x(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||kn).test(t)?"format":"standalone"][e.month()]:x(this._months)?this._months:this._months.standalone}function Qs(e,t){return e?x(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[kn.test(t)?"format":"standalone"][e.month()]:x(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function eo(e,t,a){var n,d,D,L=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)D=g([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(D,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(D,"").toLocaleLowerCase();return a?t==="MMM"?(d=ze.call(this._shortMonthsParse,L),d!==-1?d:null):(d=ze.call(this._longMonthsParse,L),d!==-1?d:null):t==="MMM"?(d=ze.call(this._shortMonthsParse,L),d!==-1?d:(d=ze.call(this._longMonthsParse,L),d!==-1?d:null)):(d=ze.call(this._longMonthsParse,L),d!==-1?d:(d=ze.call(this._shortMonthsParse,L),d!==-1?d:null))}function to(e,t,a){var n,d,D;if(this._monthsParseExact)return eo.call(this,e,t,a);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(d=g([2e3,n]),a&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(d,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(d,"").replace(".","")+"$","i")),!a&&!this._monthsParse[n]&&(D="^"+this.months(d,"")+"|^"+this.monthsShort(d,""),this._monthsParse[n]=new RegExp(D.replace(".",""),"i")),a&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(a&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!a&&this._monthsParse[n].test(e))return n}}function On(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=be(t);else if(t=e.localeData().monthsParse(t),!u(t))return e}var a=t,n=e.date();return n=n<29?n:Math.min(n,Tr(e.year(),a)),e._isUTC?e._d.setUTCMonth(a,n):e._d.setMonth(a,n),e}function Yn(e){return e!=null?(On(this,e),i.updateOffset(this,!0),this):it(this,"Month")}function ro(){return Tr(this.year(),this.month())}function ao(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Cn.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Ks),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function no(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Cn.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Xs),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Cn(){function e(pe,De){return De.length-pe.length}var t=[],a=[],n=[],d,D,L,ne;for(d=0;d<12;d++)D=g([2e3,d]),L=nt(this.monthsShort(D,"")),ne=nt(this.months(D,"")),t.push(L),a.push(ne),n.push(ne),n.push(L);t.sort(e),a.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function io(e,t,a,n,d,D,L){var ne;return e<100&&e>=0?(ne=new Date(e+400,t,a,n,d,D,L),isFinite(ne.getFullYear())&&ne.setFullYear(e)):ne=new Date(e,t,a,n,d,D,L),ne}function Ut(e){var t,a;return e<100&&e>=0?(a=Array.prototype.slice.call(arguments),a[0]=e+400,t=new Date(Date.UTC.apply(null,a)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function rr(e,t,a){var n=7+t-a,d=(7+Ut(e,0,n).getUTCDay()-t)%7;return-d+n-1}function jn(e,t,a,n,d){var D=(7+a-n)%7,L=rr(e,n,d),ne=1+7*(t-1)+D+L,pe,De;return ne<=0?(pe=e-1,De=qe(pe)+ne):ne>qe(e)?(pe=e+1,De=ne-qe(e)):(pe=e,De=ne),{year:pe,dayOfYear:De}}function Gt(e,t,a){var n=rr(e.year(),t,a),d=Math.floor((e.dayOfYear()-n-1)/7)+1,D,L;return d<1?(L=e.year()-1,D=d+yt(L,t,a)):d>yt(e.year(),t,a)?(D=d-yt(e.year(),t,a),L=e.year()+1):(L=e.year(),D=d),{week:D,year:L}}function yt(e,t,a){var n=rr(e,t,a),d=rr(e+1,t,a);return(qe(e)-n+d)/7}Z("w",["ww",2],"wo","week"),Z("W",["WW",2],"Wo","isoWeek"),ae("w",je,at),ae("ww",je,Ue),ae("W",je,at),ae("WW",je,Ue),Tt(["w","ww","W","WW"],function(e,t,a,n){t[n.substr(0,1)]=be(e)});function so(e){return Gt(e,this._week.dow,this._week.doy).week}var oo={dow:0,doy:6};function lo(){return this._week.dow}function uo(){return this._week.doy}function co(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function ho(e){var t=Gt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Z("d",0,"do","day"),Z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Z("e",0,0,"weekday"),Z("E",0,0,"isoWeekday"),ae("d",je),ae("e",je),ae("E",je),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)}),Tt(["dd","ddd","dddd"],function(e,t,a,n){var d=a._locale.weekdaysParse(e,n,a._strict);d!=null?t.d=d:_(a).invalidWeekday=e}),Tt(["d","e","E"],function(e,t,a,n){t[n]=be(e)});function fo(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function mo(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pr(e,t){return e.slice(t,7).concat(e.slice(0,t))}var po="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Tn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),go="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),vo=ut,yo=ut,_o=ut;function bo(e,t){var a=x(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Pr(a,this._week.dow):e?a[e.day()]:a}function wo(e){return e===!0?Pr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function So(e){return e===!0?Pr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Mo(e,t,a){var n,d,D,L=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)D=g([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(D,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(D,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(D,"").toLocaleLowerCase();return a?t==="dddd"?(d=ze.call(this._weekdaysParse,L),d!==-1?d:null):t==="ddd"?(d=ze.call(this._shortWeekdaysParse,L),d!==-1?d:null):(d=ze.call(this._minWeekdaysParse,L),d!==-1?d:null):t==="dddd"?(d=ze.call(this._weekdaysParse,L),d!==-1||(d=ze.call(this._shortWeekdaysParse,L),d!==-1)?d:(d=ze.call(this._minWeekdaysParse,L),d!==-1?d:null)):t==="ddd"?(d=ze.call(this._shortWeekdaysParse,L),d!==-1||(d=ze.call(this._weekdaysParse,L),d!==-1)?d:(d=ze.call(this._minWeekdaysParse,L),d!==-1?d:null)):(d=ze.call(this._minWeekdaysParse,L),d!==-1||(d=ze.call(this._weekdaysParse,L),d!==-1)?d:(d=ze.call(this._shortWeekdaysParse,L),d!==-1?d:null))}function xo(e,t,a){var n,d,D;if(this._weekdaysParseExact)return Mo.call(this,e,t,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(d=g([2e3,1]).day(n),a&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(d,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(d,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(d,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(D="^"+this.weekdays(d,"")+"|^"+this.weekdaysShort(d,"")+"|^"+this.weekdaysMin(d,""),this._weekdaysParse[n]=new RegExp(D.replace(".",""),"i")),a&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(a&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(a&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!a&&this._weekdaysParse[n].test(e))return n}}function Do(e){if(!this.isValid())return e!=null?this:NaN;var t=it(this,"Day");return e!=null?(e=fo(e,this.localeData()),this.add(e-t,"d")):t}function ko(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 Oo(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=mo(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Yo(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Nr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=vo),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Co(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Nr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=yo),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function jo(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Nr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=_o),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Nr(){function e(Ke,Mt){return Mt.length-Ke.length}var t=[],a=[],n=[],d=[],D,L,ne,pe,De;for(D=0;D<7;D++)L=g([2e3,1]).day(D),ne=nt(this.weekdaysMin(L,"")),pe=nt(this.weekdaysShort(L,"")),De=nt(this.weekdays(L,"")),t.push(ne),a.push(pe),n.push(De),d.push(ne),d.push(pe),d.push(De);t.sort(e),a.sort(e),n.sort(e),d.sort(e),this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Rr(){return this.hours()%12||12}function To(){return this.hours()||24}Z("H",["HH",2],0,"hour"),Z("h",["hh",2],0,Rr),Z("k",["kk",2],0,To),Z("hmm",0,0,function(){return""+Rr.apply(this)+te(this.minutes(),2)}),Z("hmmss",0,0,function(){return""+Rr.apply(this)+te(this.minutes(),2)+te(this.seconds(),2)}),Z("Hmm",0,0,function(){return""+this.hours()+te(this.minutes(),2)}),Z("Hmmss",0,0,function(){return""+this.hours()+te(this.minutes(),2)+te(this.seconds(),2)});function Pn(e,t){Z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Pn("a",!0),Pn("A",!1);function Nn(e,t){return t._meridiemParse}ae("a",Nn),ae("A",Nn),ae("H",je,Qe),ae("h",je,at),ae("k",je,at),ae("HH",je,Ue),ae("hh",je,Ue),ae("kk",je,Ue),ae("hmm",jt),ae("hmmss",At),ae("Hmm",jt),ae("Hmmss",At),Te(["H","HH"],Q),Te(["k","kk"],function(e,t,a){var n=be(e);t[Q]=n===24?0:n}),Te(["a","A"],function(e,t,a){a._isPm=a._locale.isPM(e),a._meridiem=e}),Te(["h","hh"],function(e,t,a){t[Q]=be(e),_(a).bigHour=!0}),Te("hmm",function(e,t,a){var n=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n)),_(a).bigHour=!0}),Te("hmmss",function(e,t,a){var n=e.length-4,d=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n,2)),t[ye]=be(e.substr(d)),_(a).bigHour=!0}),Te("Hmm",function(e,t,a){var n=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n))}),Te("Hmmss",function(e,t,a){var n=e.length-4,d=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n,2)),t[ye]=be(e.substr(d))});function Po(e){return(e+"").toLowerCase().charAt(0)==="p"}var No=/[ap]\.?m?\.?/i,Ro=Be("Hours",!0);function Eo(e,t,a){return e>11?a?"pm":"PM":a?"am":"AM"}var Rn={calendar:re,longDateFormat:$,invalidDate:X,ordinal:H,dayOfMonthOrdinalParse:N,relativeTime:q,months:Js,monthsShort:Dn,week:oo,weekdays:po,weekdaysMin:go,weekdaysShort:Tn,meridiemParse:No},Ve={},Jt={},Kt;function Ao(e,t){var a,n=Math.min(e.length,t.length);for(a=0;a<n;a+=1)if(e[a]!==t[a])return a;return n}function En(e){return e&&e.toLowerCase().replace("_","-")}function Io(e){for(var t=0,a,n,d,D;t<e.length;){for(D=En(e[t]).split("-"),a=D.length,n=En(e[t+1]),n=n?n.split("-"):null;a>0;){if(d=ar(D.slice(0,a).join("-")),d)return d;if(n&&n.length>=a&&Ao(D,n)>=a-1)break;a--}t++}return Kt}function Fo(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ar(e){var t=null,a;if(Ve[e]===void 0&&l&&l.exports&&Fo(e))try{t=Kt._abbr,a=_r,a("./locale/"+e),Dt(t)}catch{Ve[e]=null}return Ve[e]}function Dt(e,t){var a;return e&&(r(t)?a=_t(e):a=Er(e,t),a?Kt=a:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Kt._abbr}function Er(e,t){if(t!==null){var a,n=Rn;if(t.abbr=e,Ve[e]!=null)E("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(a=ar(t.parentLocale),a!=null)n=a._config;else return Jt[t.parentLocale]||(Jt[t.parentLocale]=[]),Jt[t.parentLocale].push({name:e,config:t}),null;return Ve[e]=new ee(B(n,t)),Jt[e]&&Jt[e].forEach(function(d){Er(d.name,d.config)}),Dt(e),Ve[e]}else return delete Ve[e],null}function Vo(e,t){if(t!=null){var a,n,d=Rn;Ve[e]!=null&&Ve[e].parentLocale!=null?Ve[e].set(B(Ve[e]._config,t)):(n=ar(e),n!=null&&(d=n._config),t=B(d,t),n==null&&(t.abbr=e),a=new ee(t),a.parentLocale=Ve[e],Ve[e]=a),Dt(e)}else Ve[e]!=null&&(Ve[e].parentLocale!=null?(Ve[e]=Ve[e].parentLocale,e===Dt()&&Dt(e)):Ve[e]!=null&&delete Ve[e]);return Ve[e]}function _t(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Kt;if(!x(e)){if(t=ar(e),t)return t;e=[e]}return Io(e)}function zo(){return ie(Ve)}function Ar(e){var t,a=e._a;return a&&_(e).overflow===-2&&(t=a[b]<0||a[b]>11?b:a[U]<1||a[U]>Tr(a[Ge],a[b])?U:a[Q]<0||a[Q]>24||a[Q]===24&&(a[le]!==0||a[ye]!==0||a[xe]!==0)?Q:a[le]<0||a[le]>59?le:a[ye]<0||a[ye]>59?ye:a[xe]<0||a[xe]>999?xe:-1,_(e)._overflowDayOfYear&&(t<Ge||t>U)&&(t=U),_(e)._overflowWeeks&&t===-1&&(t=Se),_(e)._overflowWeekday&&t===-1&&(t=we),_(e).overflow=t),e}var Lo=/^\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)?)?$/,Wo=/^\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)?)?$/,qo=/Z|[+-]\d\d(?::?\d\d)?/,nr=[["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]],Ir=[["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/]],Ho=/^\/?Date\((-?\d+)/i,$o=/^(?:(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}))$/,Bo={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function An(e){var t,a,n=e._i,d=Lo.exec(n)||Wo.exec(n),D,L,ne,pe,De=nr.length,Ke=Ir.length;if(d){for(_(e).iso=!0,t=0,a=De;t<a;t++)if(nr[t][1].exec(d[1])){L=nr[t][0],D=nr[t][2]!==!1;break}if(L==null){e._isValid=!1;return}if(d[3]){for(t=0,a=Ke;t<a;t++)if(Ir[t][1].exec(d[3])){ne=(d[2]||" ")+Ir[t][0];break}if(ne==null){e._isValid=!1;return}}if(!D&&ne!=null){e._isValid=!1;return}if(d[4])if(qo.exec(d[4]))pe="Z";else{e._isValid=!1;return}e._f=L+(ne||"")+(pe||""),Vr(e)}else e._isValid=!1}function Uo(e,t,a,n,d,D){var L=[Go(e),Dn.indexOf(t),parseInt(a,10),parseInt(n,10),parseInt(d,10)];return D&&L.push(parseInt(D,10)),L}function Go(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Jo(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ko(e,t,a){if(e){var n=Tn.indexOf(e),d=new Date(t[0],t[1],t[2]).getDay();if(n!==d)return _(a).weekdayMismatch=!0,a._isValid=!1,!1}return!0}function Xo(e,t,a){if(e)return Bo[e];if(t)return 0;var n=parseInt(a,10),d=n%100,D=(n-d)/100;return D*60+d}function In(e){var t=$o.exec(Jo(e._i)),a;if(t){if(a=Uo(t[4],t[3],t[2],t[5],t[6],t[7]),!Ko(t[1],a,e))return;e._a=a,e._tzm=Xo(t[8],t[9],t[10]),e._d=Ut.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),_(e).rfc2822=!0}else e._isValid=!1}function Zo(e){var t=Ho.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(An(e),e._isValid===!1)delete e._isValid;else return;if(In(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:i.createFromInputFallback(e)}i.createFromInputFallback=S("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 zt(e,t,a){return e??t??a}function Qo(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Fr(e){var t,a,n=[],d,D,L;if(!e._d){for(d=Qo(e),e._w&&e._a[U]==null&&e._a[b]==null&&el(e),e._dayOfYear!=null&&(L=zt(e._a[Ge],d[Ge]),(e._dayOfYear>qe(L)||e._dayOfYear===0)&&(_(e)._overflowDayOfYear=!0),a=Ut(L,0,e._dayOfYear),e._a[b]=a.getUTCMonth(),e._a[U]=a.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=d[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Q]===24&&e._a[le]===0&&e._a[ye]===0&&e._a[xe]===0&&(e._nextDay=!0,e._a[Q]=0),e._d=(e._useUTC?Ut:io).apply(null,n),D=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Q]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==D&&(_(e).weekdayMismatch=!0)}}function el(e){var t,a,n,d,D,L,ne,pe,De;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(D=1,L=4,a=zt(t.GG,e._a[Ge],Gt(Ae(),1,4).year),n=zt(t.W,1),d=zt(t.E,1),(d<1||d>7)&&(pe=!0)):(D=e._locale._week.dow,L=e._locale._week.doy,De=Gt(Ae(),D,L),a=zt(t.gg,e._a[Ge],De.year),n=zt(t.w,De.week),t.d!=null?(d=t.d,(d<0||d>6)&&(pe=!0)):t.e!=null?(d=t.e+D,(t.e<0||t.e>6)&&(pe=!0)):d=D),n<1||n>yt(a,D,L)?_(e)._overflowWeeks=!0:pe!=null?_(e)._overflowWeekday=!0:(ne=jn(a,n,d,D,L),e._a[Ge]=ne.year,e._dayOfYear=ne.dayOfYear)}i.ISO_8601=function(){},i.RFC_2822=function(){};function Vr(e){if(e._f===i.ISO_8601){An(e);return}if(e._f===i.RFC_2822){In(e);return}e._a=[],_(e).empty=!0;var t=""+e._i,a,n,d,D,L,ne=t.length,pe=0,De,Ke;for(d=Oe(e._f,e._locale).match(de)||[],Ke=d.length,a=0;a<Ke;a++)D=d[a],n=(t.match(Yr(D,e))||[])[0],n&&(L=t.substr(0,t.indexOf(n)),L.length>0&&_(e).unusedInput.push(L),t=t.slice(t.indexOf(n)+n.length),pe+=n.length),oe[D]?(n?_(e).empty=!1:_(e).unusedTokens.push(D),Cr(D,n,e)):e._strict&&!n&&_(e).unusedTokens.push(D);_(e).charsLeftOver=ne-pe,t.length>0&&_(e).unusedInput.push(t),e._a[Q]<=12&&_(e).bigHour===!0&&e._a[Q]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[Q]=tl(e._locale,e._a[Q],e._meridiem),De=_(e).era,De!==null&&(e._a[Ge]=e._locale.erasConvertYear(De,e._a[Ge])),Fr(e),Ar(e)}function tl(e,t,a){var n;return a==null?t:e.meridiemHour!=null?e.meridiemHour(t,a):(e.isPM!=null&&(n=e.isPM(a),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function rl(e){var t,a,n,d,D,L,ne=!1,pe=e._f.length;if(pe===0){_(e).invalidFormat=!0,e._d=new Date(NaN);return}for(d=0;d<pe;d++)D=0,L=!1,t=O({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[d],Vr(t),C(t)&&(L=!0),D+=_(t).charsLeftOver,D+=_(t).unusedTokens.length*10,_(t).score=D,ne?D<n&&(n=D,a=t):(n==null||D<n||L)&&(n=D,a=t,L&&(ne=!0));p(e,a||t)}function al(e){if(!e._d){var t=_e(e._i),a=t.day===void 0?t.date:t.day;e._a=f([t.year,t.month,a,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Fr(e)}}function nl(e){var t=new v(Ar(Fn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Fn(e){var t=e._i,a=e._f;return e._locale=e._locale||_t(e._l),t===null||a===void 0&&t===""?j({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),T(t)?new v(Ar(t)):(h(t)?e._d=t:x(a)?rl(e):a?Vr(e):il(e),C(e)||(e._d=null),e))}function il(e){var t=e._i;r(t)?e._d=new Date(i.now()):h(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Zo(e):x(t)?(e._a=f(t.slice(0),function(a){return parseInt(a,10)}),Fr(e)):I(t)?al(e):u(t)?e._d=new Date(t):i.createFromInputFallback(e)}function Vn(e,t,a,n,d){var D={};return(t===!0||t===!1)&&(n=t,t=void 0),(a===!0||a===!1)&&(n=a,a=void 0),(I(e)&&y(e)||x(e)&&e.length===0)&&(e=void 0),D._isAMomentObject=!0,D._useUTC=D._isUTC=d,D._l=a,D._i=e,D._f=t,D._strict=n,nl(D)}function Ae(e,t,a,n){return Vn(e,t,a,n,!1)}var sl=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ae.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:j()}),ol=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ae.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:j()});function zn(e,t){var a,n;if(t.length===1&&x(t[0])&&(t=t[0]),!t.length)return Ae();for(a=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](a))&&(a=t[n]);return a}function ll(){var e=[].slice.call(arguments,0);return zn("isBefore",e)}function ul(){var e=[].slice.call(arguments,0);return zn("isAfter",e)}var cl=function(){return Date.now?Date.now():+new Date},Xt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function dl(e){var t,a=!1,n,d=Xt.length;for(t in e)if(o(e,t)&&!(ze.call(Xt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<d;++n)if(e[Xt[n]]){if(a)return!1;parseFloat(e[Xt[n]])!==be(e[Xt[n]])&&(a=!0)}return!0}function hl(){return this._isValid}function fl(){return ct(NaN)}function ir(e){var t=_e(e),a=t.year||0,n=t.quarter||0,d=t.month||0,D=t.week||t.isoWeek||0,L=t.day||0,ne=t.hour||0,pe=t.minute||0,De=t.second||0,Ke=t.millisecond||0;this._isValid=dl(t),this._milliseconds=+Ke+De*1e3+pe*6e4+ne*1e3*60*60,this._days=+L+D*7,this._months=+d+n*3+a*12,this._data={},this._locale=_t(),this._bubble()}function sr(e){return e instanceof ir}function zr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function ml(e,t,a){var n=Math.min(e.length,t.length),d=Math.abs(e.length-t.length),D=0,L;for(L=0;L<n;L++)be(e[L])!==be(t[L])&&D++;return D+d}function Ln(e,t){Z(e,0,0,function(){var a=this.utcOffset(),n="+";return a<0&&(a=-a,n="-"),n+te(~~(a/60),2)+t+te(~~a%60,2)})}Ln("Z",":"),Ln("ZZ",""),ae("Z",We),ae("ZZ",We),Te(["Z","ZZ"],function(e,t,a){a._useUTC=!0,a._tzm=Lr(We,e)});var pl=/([\+\-]|\d\d)/gi;function Lr(e,t){var a=(t||"").match(e),n,d,D;return a===null?null:(n=a[a.length-1]||[],d=(n+"").match(pl)||["-",0,0],D=+(d[1]*60)+be(d[2]),D===0?0:d[0]==="+"?D:-D)}function Wr(e,t){var a,n;return t._isUTC?(a=t.clone(),n=(T(e)||h(e)?e.valueOf():Ae(e).valueOf())-a.valueOf(),a._d.setTime(a._d.valueOf()+n),i.updateOffset(a,!1),a):Ae(e).local()}function qr(e){return-Math.round(e._d.getTimezoneOffset())}i.updateOffset=function(){};function gl(e,t,a){var n=this._offset||0,d;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Lr(We,e),e===null)return this}else Math.abs(e)<16&&!a&&(e=e*60);return!this._isUTC&&t&&(d=qr(this)),this._offset=e,this._isUTC=!0,d!=null&&this.add(d,"m"),n!==e&&(!t||this._changeInProgress?$n(this,ct(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:qr(this)}function vl(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function yl(e){return this.utcOffset(0,e)}function _l(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qr(this),"m")),this}function bl(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Lr(vt,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function wl(e){return this.isValid()?(e=e?Ae(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function Sl(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ml(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e={},t;return O(e,this),e=Fn(e),e._a?(t=e._isUTC?g(e._a):Ae(e._a),this._isDSTShifted=this.isValid()&&ml(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function xl(){return this.isValid()?!this._isUTC:!1}function Dl(){return this.isValid()?this._isUTC:!1}function Wn(){return this.isValid()?this._isUTC&&this._offset===0:!1}var kl=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ol=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ct(e,t){var a=e,n=null,d,D,L;return sr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(n=kl.exec(e))?(d=n[1]==="-"?-1:1,a={y:0,d:be(n[U])*d,h:be(n[Q])*d,m:be(n[le])*d,s:be(n[ye])*d,ms:be(zr(n[xe]*1e3))*d}):(n=Ol.exec(e))?(d=n[1]==="-"?-1:1,a={y:Pt(n[2],d),M:Pt(n[3],d),w:Pt(n[4],d),d:Pt(n[5],d),h:Pt(n[6],d),m:Pt(n[7],d),s:Pt(n[8],d)}):a==null?a={}:typeof a=="object"&&("from"in a||"to"in a)&&(L=Yl(Ae(a.from),Ae(a.to)),a={},a.ms=L.milliseconds,a.M=L.months),D=new ir(a),sr(e)&&o(e,"_locale")&&(D._locale=e._locale),sr(e)&&o(e,"_isValid")&&(D._isValid=e._isValid),D}ct.fn=ir.prototype,ct.invalid=fl;function Pt(e,t){var a=e&&parseFloat(e.replace(",","."));return(isNaN(a)?0:a)*t}function qn(e,t){var a={};return a.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(a.months,"M").isAfter(t)&&--a.months,a.milliseconds=+t-+e.clone().add(a.months,"M"),a}function Yl(e,t){var a;return e.isValid()&&t.isValid()?(t=Wr(t,e),e.isBefore(t)?a=qn(e,t):(a=qn(t,e),a.milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function Hn(e,t){return function(a,n){var d,D;return n!==null&&!isNaN(+n)&&(E(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."),D=a,a=n,n=D),d=ct(a,n),$n(this,d,e),this}}function $n(e,t,a,n){var d=t._milliseconds,D=zr(t._days),L=zr(t._months);e.isValid()&&(n=n??!0,L&&On(e,it(e,"Month")+L*a),D&&mt(e,"Date",it(e,"Date")+D*a),d&&e._d.setTime(e._d.valueOf()+d*a),n&&i.updateOffset(e,D||L))}var Cl=Hn(1,"add"),jl=Hn(-1,"subtract");function Bn(e){return typeof e=="string"||e instanceof String}function Tl(e){return T(e)||h(e)||Bn(e)||u(e)||Nl(e)||Pl(e)||e===null||e===void 0}function Pl(e){var t=I(e)&&!y(e),a=!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"],d,D,L=n.length;for(d=0;d<L;d+=1)D=n[d],a=a||o(e,D);return t&&a}function Nl(e){var t=x(e),a=!1;return t&&(a=e.filter(function(n){return!u(n)&&Bn(e)}).length===0),t&&a}function Rl(e){var t=I(e)&&!y(e),a=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],d,D;for(d=0;d<n.length;d+=1)D=n[d],a=a||o(e,D);return t&&a}function El(e,t){var a=e.diff(t,"days",!0);return a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse"}function Al(e,t){arguments.length===1&&(arguments[0]?Tl(arguments[0])?(e=arguments[0],t=void 0):Rl(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var a=e||Ae(),n=Wr(a,this).startOf("day"),d=i.calendarFormat(this,n)||"sameElse",D=t&&(A(t[d])?t[d].call(this,a):t[d]);return this.format(D||this.localeData().calendar(d,this,Ae(a)))}function Il(){return new v(this)}function Fl(e,t){var a=T(e)?e:Ae(e);return this.isValid()&&a.isValid()?(t=ge(t)||"millisecond",t==="millisecond"?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(t).valueOf()):!1}function Vl(e,t){var a=T(e)?e:Ae(e);return this.isValid()&&a.isValid()?(t=ge(t)||"millisecond",t==="millisecond"?this.valueOf()<a.valueOf():this.clone().endOf(t).valueOf()<a.valueOf()):!1}function zl(e,t,a,n){var d=T(e)?e:Ae(e),D=T(t)?t:Ae(t);return this.isValid()&&d.isValid()&&D.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(d,a):!this.isBefore(d,a))&&(n[1]===")"?this.isBefore(D,a):!this.isAfter(D,a))):!1}function Ll(e,t){var a=T(e)?e:Ae(e),n;return this.isValid()&&a.isValid()?(t=ge(t)||"millisecond",t==="millisecond"?this.valueOf()===a.valueOf():(n=a.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Wl(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function ql(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Hl(e,t,a){var n,d,D;if(!this.isValid())return NaN;if(n=Wr(e,this),!n.isValid())return NaN;switch(d=(n.utcOffset()-this.utcOffset())*6e4,t=ge(t),t){case"year":D=or(this,n)/12;break;case"month":D=or(this,n);break;case"quarter":D=or(this,n)/3;break;case"second":D=(this-n)/1e3;break;case"minute":D=(this-n)/6e4;break;case"hour":D=(this-n)/36e5;break;case"day":D=(this-n-d)/864e5;break;case"week":D=(this-n-d)/6048e5;break;default:D=this-n}return a?D:et(D)}function or(e,t){if(e.date()<t.date())return-or(t,e);var a=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(a,"months"),d,D;return t-n<0?(d=e.clone().add(a-1,"months"),D=(t-n)/(n-d)):(d=e.clone().add(a+1,"months"),D=(t-n)/(d-n)),-(a+D)||0}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function $l(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Bl(e){if(!this.isValid())return null;var t=e!==!0,a=t?this.clone().utc():this;return a.year()<0||a.year()>9999?Ce(a,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ce(a,"Z")):Ce(a,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ul(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",a,n,d,D;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),a="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",d="-MM-DD[T]HH:mm:ss.SSS",D=t+'[")]',this.format(a+n+d+D)}function Gl(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=Ce(this,e);return this.localeData().postformat(t)}function Jl(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ae(e).isValid())?ct({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Kl(e){return this.from(Ae(),e)}function Xl(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ae(e).isValid())?ct({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Zl(e){return this.to(Ae(),e)}function Un(e){var t;return e===void 0?this._locale._abbr:(t=_t(e),t!=null&&(this._locale=t),this)}var Gn=S("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 Jn(){return this._locale}var lr=1e3,Lt=60*lr,ur=60*Lt,Kn=(365*400+97)*24*ur;function Wt(e,t){return(e%t+t)%t}function Xn(e,t,a){return e<100&&e>=0?new Date(e+400,t,a)-Kn:new Date(e,t,a).valueOf()}function Zn(e,t,a){return e<100&&e>=0?Date.UTC(e+400,t,a)-Kn:Date.UTC(e,t,a)}function Ql(e){var t,a;if(e=ge(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?Zn:Xn,e){case"year":t=a(this.year(),0,1);break;case"quarter":t=a(this.year(),this.month()-this.month()%3,1);break;case"month":t=a(this.year(),this.month(),1);break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=a(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Wt(t+(this._isUTC?0:this.utcOffset()*Lt),ur);break;case"minute":t=this._d.valueOf(),t-=Wt(t,Lt);break;case"second":t=this._d.valueOf(),t-=Wt(t,lr);break}return this._d.setTime(t),i.updateOffset(this,!0),this}function eu(e){var t,a;if(e=ge(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?Zn:Xn,e){case"year":t=a(this.year()+1,0,1)-1;break;case"quarter":t=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=a(this.year(),this.month()+1,1)-1;break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=a(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ur-Wt(t+(this._isUTC?0:this.utcOffset()*Lt),ur)-1;break;case"minute":t=this._d.valueOf(),t+=Lt-Wt(t,Lt)-1;break;case"second":t=this._d.valueOf(),t+=lr-Wt(t,lr)-1;break}return this._d.setTime(t),i.updateOffset(this,!0),this}function tu(){return this._d.valueOf()-(this._offset||0)*6e4}function ru(){return Math.floor(this.valueOf()/1e3)}function au(){return new Date(this.valueOf())}function nu(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function iu(){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 su(){return this.isValid()?this.toISOString():null}function ou(){return C(this)}function lu(){return p({},_(this))}function uu(){return _(this).overflow}function cu(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Z("N",0,0,"eraAbbr"),Z("NN",0,0,"eraAbbr"),Z("NNN",0,0,"eraAbbr"),Z("NNNN",0,0,"eraName"),Z("NNNNN",0,0,"eraNarrow"),Z("y",["y",1],"yo","eraYear"),Z("y",["yy",2],0,"eraYear"),Z("y",["yyy",3],0,"eraYear"),Z("y",["yyyy",4],0,"eraYear"),ae("N",Hr),ae("NN",Hr),ae("NNN",Hr),ae("NNNN",wu),ae("NNNNN",Su),Te(["N","NN","NNN","NNNN","NNNNN"],function(e,t,a,n){var d=a._locale.erasParse(e,n,a._strict);d?_(a).era=d:_(a).invalidEra=e}),ae("y",rt),ae("yy",rt),ae("yyy",rt),ae("yyyy",rt),ae("yo",Mu),Te(["y","yy","yyy","yyyy"],Ge),Te(["yo"],function(e,t,a,n){var d;a._locale._eraYearOrdinalRegex&&(d=e.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?t[Ge]=a._locale.eraYearOrdinalParse(e,d):t[Ge]=parseInt(e,10)});function du(e,t){var a,n,d,D=this._eras||_t("en")._eras;for(a=0,n=D.length;a<n;++a)switch(typeof D[a].since==="string"&&(d=i(D[a].since).startOf("day"),D[a].since=d.valueOf()),typeof D[a].until){case"undefined":D[a].until=1/0;break;case"string":d=i(D[a].until).startOf("day").valueOf(),D[a].until=d.valueOf();break}return D}function hu(e,t,a){var n,d,D=this.eras(),L,ne,pe;for(e=e.toUpperCase(),n=0,d=D.length;n<d;++n)if(L=D[n].name.toUpperCase(),ne=D[n].abbr.toUpperCase(),pe=D[n].narrow.toUpperCase(),a)switch(t){case"N":case"NN":case"NNN":if(ne===e)return D[n];break;case"NNNN":if(L===e)return D[n];break;case"NNNNN":if(pe===e)return D[n];break}else if([L,ne,pe].indexOf(e)>=0)return D[n]}function fu(e,t){var a=e.since<=e.until?1:-1;return t===void 0?i(e.since).year():i(e.since).year()+(t-e.offset)*a}function mu(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until||n[e].until<=a&&a<=n[e].since)return n[e].name;return""}function pu(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until||n[e].until<=a&&a<=n[e].since)return n[e].narrow;return""}function gu(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until||n[e].until<=a&&a<=n[e].since)return n[e].abbr;return""}function vu(){var e,t,a,n,d=this.localeData().eras();for(e=0,t=d.length;e<t;++e)if(a=d[e].since<=d[e].until?1:-1,n=this.clone().startOf("day").valueOf(),d[e].since<=n&&n<=d[e].until||d[e].until<=n&&n<=d[e].since)return(this.year()-i(d[e].since).year())*a+d[e].offset;return this.year()}function yu(e){return o(this,"_erasNameRegex")||$r.call(this),e?this._erasNameRegex:this._erasRegex}function _u(e){return o(this,"_erasAbbrRegex")||$r.call(this),e?this._erasAbbrRegex:this._erasRegex}function bu(e){return o(this,"_erasNarrowRegex")||$r.call(this),e?this._erasNarrowRegex:this._erasRegex}function Hr(e,t){return t.erasAbbrRegex(e)}function wu(e,t){return t.erasNameRegex(e)}function Su(e,t){return t.erasNarrowRegex(e)}function Mu(e,t){return t._eraYearOrdinalRegex||rt}function $r(){var e=[],t=[],a=[],n=[],d,D,L,ne,pe,De=this.eras();for(d=0,D=De.length;d<D;++d)L=nt(De[d].name),ne=nt(De[d].abbr),pe=nt(De[d].narrow),t.push(L),e.push(ne),a.push(pe),n.push(L),n.push(ne),n.push(pe);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}Z(0,["gg",2],0,function(){return this.weekYear()%100}),Z(0,["GG",2],0,function(){return this.isoWeekYear()%100});function cr(e,t){Z(0,[e,e.length],0,t)}cr("gggg","weekYear"),cr("ggggg","weekYear"),cr("GGGG","isoWeekYear"),cr("GGGGG","isoWeekYear"),ae("G",gt),ae("g",gt),ae("GG",je,Ue),ae("gg",je,Ue),ae("GGGG",pt,Ct),ae("gggg",pt,Ct),ae("GGGGG",ht,ot),ae("ggggg",ht,ot),Tt(["gggg","ggggg","GGGG","GGGGG"],function(e,t,a,n){t[n.substr(0,2)]=be(e)}),Tt(["gg","GG"],function(e,t,a,n){t[n]=i.parseTwoDigitYear(e)});function xu(e){return Qn.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Du(e){return Qn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function ku(){return yt(this.year(),1,4)}function Ou(){return yt(this.isoWeekYear(),1,4)}function Yu(){var e=this.localeData()._week;return yt(this.year(),e.dow,e.doy)}function Cu(){var e=this.localeData()._week;return yt(this.weekYear(),e.dow,e.doy)}function Qn(e,t,a,n,d){var D;return e==null?Gt(this,n,d).year:(D=yt(e,n,d),t>D&&(t=D),ju.call(this,e,t,a,n,d))}function ju(e,t,a,n,d){var D=jn(e,t,a,n,d),L=Ut(D.year,0,D.dayOfYear);return this.year(L.getUTCFullYear()),this.month(L.getUTCMonth()),this.date(L.getUTCDate()),this}Z("Q",0,"Qo","quarter"),ae("Q",dt),Te("Q",function(e,t){t[b]=(be(e)-1)*3});function Tu(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Z("D",["DD",2],"Do","date"),ae("D",je,at),ae("DD",je,Ue),ae("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Te(["D","DD"],U),Te("Do",function(e,t){t[U]=be(e.match(je)[0])});var ei=Be("Date",!0);Z("DDD",["DDDD",3],"DDDo","dayOfYear"),ae("DDD",lt),ae("DDDD",st),Te(["DDD","DDDD"],function(e,t,a){a._dayOfYear=be(e)});function Pu(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Z("m",["mm",2],0,"minute"),ae("m",je,Qe),ae("mm",je,Ue),Te(["m","mm"],le);var Nu=Be("Minutes",!1);Z("s",["ss",2],0,"second"),ae("s",je,Qe),ae("ss",je,Ue),Te(["s","ss"],ye);var Ru=Be("Seconds",!1);Z("S",0,0,function(){return~~(this.millisecond()/100)}),Z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Z(0,["SSS",3],0,"millisecond"),Z(0,["SSSS",4],0,function(){return this.millisecond()*10}),Z(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Z(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Z(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Z(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Z(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ae("S",lt,dt),ae("SS",lt,Ue),ae("SSS",lt,st);var kt,ti;for(kt="SSSS";kt.length<=9;kt+="S")ae(kt,rt);function Eu(e,t){t[xe]=be(("0."+e)*1e3)}for(kt="S";kt.length<=9;kt+="S")Te(kt,Eu);ti=Be("Milliseconds",!1),Z("z",0,0,"zoneAbbr"),Z("zz",0,0,"zoneName");function Au(){return this._isUTC?"UTC":""}function Iu(){return this._isUTC?"Coordinated Universal Time":""}var K=v.prototype;K.add=Cl,K.calendar=Al,K.clone=Il,K.diff=Hl,K.endOf=eu,K.format=Gl,K.from=Jl,K.fromNow=Kl,K.to=Xl,K.toNow=Zl,K.get=Je,K.invalidAt=uu,K.isAfter=Fl,K.isBefore=Vl,K.isBetween=zl,K.isSame=Ll,K.isSameOrAfter=Wl,K.isSameOrBefore=ql,K.isValid=ou,K.lang=Gn,K.locale=Un,K.localeData=Jn,K.max=ol,K.min=sl,K.parsingFlags=lu,K.set=Bt,K.startOf=Ql,K.subtract=jl,K.toArray=nu,K.toObject=iu,K.toDate=au,K.toISOString=Bl,K.inspect=Ul,typeof Symbol<"u"&&Symbol.for!=null&&(K[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),K.toJSON=su,K.toString=$l,K.unix=ru,K.valueOf=tu,K.creationData=cu,K.eraName=mu,K.eraNarrow=pu,K.eraAbbr=gu,K.eraYear=vu,K.year=Fe,K.isLeapYear=Le,K.weekYear=xu,K.isoWeekYear=Du,K.quarter=K.quarters=Tu,K.month=Yn,K.daysInMonth=ro,K.week=K.weeks=co,K.isoWeek=K.isoWeeks=ho,K.weeksInYear=Yu,K.weeksInWeekYear=Cu,K.isoWeeksInYear=ku,K.isoWeeksInISOWeekYear=Ou,K.date=ei,K.day=K.days=Do,K.weekday=ko,K.isoWeekday=Oo,K.dayOfYear=Pu,K.hour=K.hours=Ro,K.minute=K.minutes=Nu,K.second=K.seconds=Ru,K.millisecond=K.milliseconds=ti,K.utcOffset=gl,K.utc=yl,K.local=_l,K.parseZone=bl,K.hasAlignedHourOffset=wl,K.isDST=Sl,K.isLocal=xl,K.isUtcOffset=Dl,K.isUtc=Wn,K.isUTC=Wn,K.zoneAbbr=Au,K.zoneName=Iu,K.dates=S("dates accessor is deprecated. Use date instead.",ei),K.months=S("months accessor is deprecated. Use month instead",Yn),K.years=S("years accessor is deprecated. Use year instead",Fe),K.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vl),K.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ml);function Fu(e){return Ae(e*1e3)}function Vu(){return Ae.apply(null,arguments).parseZone()}function ri(e){return e}var Ye=ee.prototype;Ye.calendar=fe,Ye.longDateFormat=J,Ye.invalidDate=P,Ye.ordinal=W,Ye.preparse=ri,Ye.postformat=ri,Ye.relativeTime=ce,Ye.pastFuture=se,Ye.set=z,Ye.eras=du,Ye.erasParse=hu,Ye.erasConvertYear=fu,Ye.erasAbbrRegex=_u,Ye.erasNameRegex=yu,Ye.erasNarrowRegex=bu,Ye.months=Zs,Ye.monthsShort=Qs,Ye.monthsParse=to,Ye.monthsRegex=no,Ye.monthsShortRegex=ao,Ye.week=so,Ye.firstDayOfYear=uo,Ye.firstDayOfWeek=lo,Ye.weekdays=bo,Ye.weekdaysMin=So,Ye.weekdaysShort=wo,Ye.weekdaysParse=xo,Ye.weekdaysRegex=Yo,Ye.weekdaysShortRegex=Co,Ye.weekdaysMinRegex=jo,Ye.isPM=Po,Ye.meridiem=Eo;function dr(e,t,a,n){var d=_t(),D=g().set(n,t);return d[a](D,e)}function ai(e,t,a){if(u(e)&&(t=e,e=void 0),e=e||"",t!=null)return dr(e,t,a,"month");var n,d=[];for(n=0;n<12;n++)d[n]=dr(e,n,a,"month");return d}function Br(e,t,a,n){typeof e=="boolean"?(u(t)&&(a=t,t=void 0),t=t||""):(t=e,a=t,e=!1,u(t)&&(a=t,t=void 0),t=t||"");var d=_t(),D=e?d._week.dow:0,L,ne=[];if(a!=null)return dr(t,(a+D)%7,n,"day");for(L=0;L<7;L++)ne[L]=dr(t,(L+D)%7,n,"day");return ne}function zu(e,t){return ai(e,t,"months")}function Lu(e,t){return ai(e,t,"monthsShort")}function Wu(e,t,a){return Br(e,t,a,"weekdays")}function qu(e,t,a){return Br(e,t,a,"weekdaysShort")}function Hu(e,t,a){return Br(e,t,a,"weekdaysMin")}Dt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,a=be(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+a}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",Dt),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",_t);var bt=Math.abs;function $u(){var e=this._data;return this._milliseconds=bt(this._milliseconds),this._days=bt(this._days),this._months=bt(this._months),e.milliseconds=bt(e.milliseconds),e.seconds=bt(e.seconds),e.minutes=bt(e.minutes),e.hours=bt(e.hours),e.months=bt(e.months),e.years=bt(e.years),this}function ni(e,t,a,n){var d=ct(t,a);return e._milliseconds+=n*d._milliseconds,e._days+=n*d._days,e._months+=n*d._months,e._bubble()}function Bu(e,t){return ni(this,e,t,1)}function Uu(e,t){return ni(this,e,t,-1)}function ii(e){return e<0?Math.floor(e):Math.ceil(e)}function Gu(){var e=this._milliseconds,t=this._days,a=this._months,n=this._data,d,D,L,ne,pe;return e>=0&&t>=0&&a>=0||e<=0&&t<=0&&a<=0||(e+=ii(Ur(a)+t)*864e5,t=0,a=0),n.milliseconds=e%1e3,d=et(e/1e3),n.seconds=d%60,D=et(d/60),n.minutes=D%60,L=et(D/60),n.hours=L%24,t+=et(L/24),pe=et(si(t)),a+=pe,t-=ii(Ur(pe)),ne=et(a/12),a%=12,n.days=t,n.months=a,n.years=ne,this}function si(e){return e*4800/146097}function Ur(e){return e*146097/4800}function Ju(e){if(!this.isValid())return NaN;var t,a,n=this._milliseconds;if(e=ge(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,a=this._months+si(t),e){case"month":return a;case"quarter":return a/3;case"year":return a/12}else switch(t=this._days+Math.round(Ur(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 wt(e){return function(){return this.as(e)}}var oi=wt("ms"),Ku=wt("s"),Xu=wt("m"),Zu=wt("h"),Qu=wt("d"),ec=wt("w"),tc=wt("M"),rc=wt("Q"),ac=wt("y"),nc=oi;function ic(){return ct(this)}function sc(e){return e=ge(e),this.isValid()?this[e+"s"]():NaN}function Nt(e){return function(){return this.isValid()?this._data[e]:NaN}}var oc=Nt("milliseconds"),lc=Nt("seconds"),uc=Nt("minutes"),cc=Nt("hours"),dc=Nt("days"),hc=Nt("months"),fc=Nt("years");function mc(){return et(this.days()/7)}var St=Math.round,qt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function pc(e,t,a,n,d){return d.relativeTime(t||1,!!a,e,n)}function gc(e,t,a,n){var d=ct(e).abs(),D=St(d.as("s")),L=St(d.as("m")),ne=St(d.as("h")),pe=St(d.as("d")),De=St(d.as("M")),Ke=St(d.as("w")),Mt=St(d.as("y")),Ot=D<=a.ss&&["s",D]||D<a.s&&["ss",D]||L<=1&&["m"]||L<a.m&&["mm",L]||ne<=1&&["h"]||ne<a.h&&["hh",ne]||pe<=1&&["d"]||pe<a.d&&["dd",pe];return a.w!=null&&(Ot=Ot||Ke<=1&&["w"]||Ke<a.w&&["ww",Ke]),Ot=Ot||De<=1&&["M"]||De<a.M&&["MM",De]||Mt<=1&&["y"]||["yy",Mt],Ot[2]=t,Ot[3]=+e>0,Ot[4]=n,pc.apply(null,Ot)}function vc(e){return e===void 0?St:typeof e=="function"?(St=e,!0):!1}function yc(e,t){return qt[e]===void 0?!1:t===void 0?qt[e]:(qt[e]=t,e==="s"&&(qt.ss=t-1),!0)}function _c(e,t){if(!this.isValid())return this.localeData().invalidDate();var a=!1,n=qt,d,D;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(a=e),typeof t=="object"&&(n=Object.assign({},qt,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),d=this.localeData(),D=gc(this,!a,n,d),a&&(D=d.pastFuture(+this,D)),d.postformat(D)}var Gr=Math.abs;function Ht(e){return(e>0)-(e<0)||+e}function hr(){if(!this.isValid())return this.localeData().invalidDate();var e=Gr(this._milliseconds)/1e3,t=Gr(this._days),a=Gr(this._months),n,d,D,L,ne=this.asSeconds(),pe,De,Ke,Mt;return ne?(n=et(e/60),d=et(n/60),e%=60,n%=60,D=et(a/12),a%=12,L=e?e.toFixed(3).replace(/\.?0+$/,""):"",pe=ne<0?"-":"",De=Ht(this._months)!==Ht(ne)?"-":"",Ke=Ht(this._days)!==Ht(ne)?"-":"",Mt=Ht(this._milliseconds)!==Ht(ne)?"-":"",pe+"P"+(D?De+D+"Y":"")+(a?De+a+"M":"")+(t?Ke+t+"D":"")+(d||n||e?"T":"")+(d?Mt+d+"H":"")+(n?Mt+n+"M":"")+(e?Mt+L+"S":"")):"P0D"}var ke=ir.prototype;ke.isValid=hl,ke.abs=$u,ke.add=Bu,ke.subtract=Uu,ke.as=Ju,ke.asMilliseconds=oi,ke.asSeconds=Ku,ke.asMinutes=Xu,ke.asHours=Zu,ke.asDays=Qu,ke.asWeeks=ec,ke.asMonths=tc,ke.asQuarters=rc,ke.asYears=ac,ke.valueOf=nc,ke._bubble=Gu,ke.clone=ic,ke.get=sc,ke.milliseconds=oc,ke.seconds=lc,ke.minutes=uc,ke.hours=cc,ke.days=dc,ke.weeks=mc,ke.months=hc,ke.years=fc,ke.humanize=_c,ke.toISOString=hr,ke.toString=hr,ke.toJSON=hr,ke.locale=Un,ke.localeData=Jn,ke.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",hr),ke.lang=Gn,Z("X",0,0,"unix"),Z("x",0,0,"valueOf"),ae("x",gt),ae("X",ft),Te("X",function(e,t,a){a._d=new Date(parseFloat(e)*1e3)}),Te("x",function(e,t,a){a._d=new Date(be(e))});return i.version="2.30.1",M(Ae),i.fn=K,i.min=ll,i.max=ul,i.now=cl,i.utc=g,i.unix=Fu,i.months=zu,i.isDate=h,i.locale=Dt,i.invalid=j,i.duration=ct,i.isMoment=T,i.weekdays=Wu,i.parseZone=Vu,i.localeData=_t,i.isDuration=sr,i.monthsShort=Lu,i.weekdaysMin=Hu,i.defineLocale=Er,i.updateLocale=Vo,i.locales=zo,i.weekdaysShort=qu,i.normalizeUnits=ge,i.relativeTimeRounding=vc,i.relativeTimeThreshold=yc,i.calendarFormat=El,i.prototype=K,i.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"},i}))})(pr)),pr.exports}var gh=on.exports,_i;function vh(){return _i||(_i=1,(function(l,s){(function(c,i){i(typeof _r=="function"?gn():c.moment)})(gh,(function(c){var i=c.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(){return this.day()===0?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT":"[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 i}))})()),on.exports}vh();var ln={exports:{}},yh=ln.exports,bi;function _h(){return bi||(bi=1,(function(l,s){(function(c,i){i(typeof _r=="function"?gn():c.moment)})(yh,(function(c){var i=c.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(M){var x=M%10,I=~~(M%100/10)===1?"th":x===1?"st":x===2?"nd":x===3?"rd":"th";return M+I},week:{dow:1,doy:4}});return i}))})()),ln.exports}_h();var un={exports:{}},bh=un.exports,wi;function wh(){return wi||(wi=1,(function(l,s){(function(c,i){i(typeof _r=="function"?gn():c.moment)})(bh,(function(c){function i(x,I,o,y){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[x+" Tage",x+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[x+" Monate",x+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[x+" Jahre",x+" Jahren"]};return I?r[o][0]:r[o][1]}var M=c.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:i,mm:"%d Minuten",h:i,hh:"%d Stunden",d:i,dd:i,w:i,ww:"%d Wochen",M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return M}))})()),un.exports}wh();const Yt=l=>{let s="";return l.split(":").forEach(c=>{s+=c}),parseInt(s)},Si=l=>l.toString().padStart(4,"0").match(/.{1,2}/g).join(":"),Jr=l=>{const s=l.address;if(l.addresstype==="county"&&s.country)return s.county;if(l.addresstype==="village"&&s.village)return s.village;const c=[];["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(x=>{s.hasOwnProperty(x)&&s[x]&&c.push(s[x])}),s.road?c.push(s.road):s.pedestrian?c.push(s.pedestrian):s.suburb?c.push(s.suburb):s.square?c.push(s.square):(s.neighbourhood&&c.push(s.neighbourhood),s.hamlet?c.push(s.hamlet):s.isolated_dwelling?c.push(s.isolated_dwelling):s.locality?c.push(s.locality):s.croft&&c.push(s.croft)),s.house_number&&c.push(s.house_number),s.postcode&&c.push(s.postcode),s.village&&c.push(s.village),s.town?c.push(s.town):s.city&&c.push(s.city);var M=c.join(", ").substr(0,150);return M};function er(l){let s=window.sessionStorage.getItem(l);if(s!==null){let c=JSON.parse(s);if(new Date(c.expirationDate)>new Date)return c.value;window.sessionStorage.removeItem(l)}return null}function Sh(l,s,c){let i=c?new Date(c*1e3):null;if(i){let M={value:s,expirationDate:i.toISOString()};window.sessionStorage.setItem(l,JSON.stringify(M))}}function Mi({day:l,slot:s,i18next:c}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text pl-4",children:[m.jsx("b",{children:l})," ",c.t("alle")," ",c.t("ore")," ",m.jsx("b",{children:s})]})})})})}const Mh=({component:l,current:s,onChange:c,i18next:i})=>{const[M,x]=G.useState(),[I,o]=G.useState([]),[y,r]=G.useState([]),[u,h]=G.useState(!1),[f,p]=G.useState(null),[g,Y]=G.useState(null),[_,k]=G.useState(null),[C,j]=G.useState(null),[F,R]=G.useState({}),[O,v]=G.useState(null),[T,w]=G.useState(!1),[S,V]=G.useState([]),[E,A]=G.useState(!1),z=G.useRef(),B=l.calendarId;he.locale(i.language);const ee=N=>{let W=he(N).format("YYYY-MM-DD");fetch(te(W)).then(q=>q.json()).then(q=>{let ce=fe(N||new Date);const se=q.filter(Re=>Re.available==!0);se.length===0&&X();let ge=[];ce.forEach(Re=>{q.some(dt=>dt.date===Re&&dt.available==!0)?ge.push({available:!0,date:Re}):ge.push({available:!1,date:Re})});const _e=ge.map(Re=>{if(Re.available===!1)return he(Re.date,"YYYY-MM-DD").toDate()});o(_e);const $e=se.length?se[0].date:N;ie($e)}).catch(q=>console.error(q))},ie=N=>{j(null),k(null),r([]);let W=he(N).format("YYYY-MM-DD");fetch(de(W)).then(q=>q.json()).then(q=>{const ce=q.filter(se=>se.availability==!0);R(ce[0]),ce.length>0?(r(q),h(!1),k(he(N).format("L")),x(he(N,"YYYY-MM-DD").toDate())):(q.length>0&&x(he(q[0].date,"YYYY-MM-DD").toDate()),r([]),X())})},re=()=>{if(B!==""&&B!=null)if(!s.dataValue)ee(new Date);else if(l.multiple&&Array.isArray(s.dataValue)){if(s.dataValue.length>0){v(s.dataValue);let N=[];s.dataValue.map(W=>{N.push({...W,date:he(W.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),V(N)}}else if(!l.multiple&&typeof s.dataValue=="object"){const N={date:s.dataValue.date,slot:s.dataValue.slot},W={...s.dataValue,date:he(s.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};V([W]),v(N)}else{let N=s.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),W=N[2].split("#");const q={date:he(N[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:N[1]};l.multiple?(c([{date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}]),V([{date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])):(c({date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}),V([{date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])),v(q)}};G.useEffect(()=>{window.FormioInstance?.formReady.then(()=>{setTimeout(()=>{re()},1e3)})},[]);const fe=N=>{let q=he(N,"YYYY-MM").daysInMonth(),ce=[];for(;q;){let se=he(N).date(q);ce.push(se.format("YYYY-MM-DD")),q--}return ce},te=(N,W=!1)=>{let q=l.calendarId,ce=l.select_opening_hours,se=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");let ge=`${Ee()}/api/calendars/${q}/availabilities`,_e=[`from_time=${he(N).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(N).endOf("month").format("YYYY-MM-DD")}`];return W&&_e.push(`available=${W}`),ce&&se&&_e.push(`opening_hours=${se.join()}`),`${ge}?${_e.join("&")}`},de=(N,W=!1)=>{let q=l.calendarId,ce=l.select_opening_hours,se=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");const ge=he(N).format("YYYY-MM-DD");let _e=`${Ee()}/api/calendars/${q}/availabilities/${ge}`,$e=[];return W&&$e.push(`available=${W}`),ce&&se&&$e.push(`opening_hours=${se.join()}`),$e&&(_e=`${_e}?${$e.join("&")}`),_e},ve=N=>{ee(N)},me=N=>{setTimeout(()=>{w(!T)},1e3),ie(N)},oe=N=>{j(null),setTimeout(()=>{N&&(Y(N.target.dataset),j(N.target.id))},300)},Z=N=>{p(null);let W=`${Ee()}/it/meetings/new-draft`,q={date:g?.date?he(g?.date).format("DD-MM-YYYY"):he(N.target.dataset.date).format("DD-MM-YYYY"),slot:g?.value_start&&g?.value_end?g.value_start+"-"+g.value_end:N.target.dataset.slots,calendar:l.calendarId,opening_hour:g?.opening_hour?g?.opening_hour:N.target.dataset.opening_hour,meeting:f?f.id:"",first_available_date:F.date,first_available_start_time:F.start_time,first_available_end_time:F.end_time,first_availability_updated_at:he().format()};fetch(W,{method:"POST",body:JSON.stringify(q),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(ce=>{if(!ce.ok)throw new Error(i.t("Intervallo selezionato non disponibile!"));return ce.json()}).then(ce=>{p(ce);const se={date:q.date,slot:q.slot,calendar_id:q.calendar[0],opening_hour_id:q.opening_hour||q.opening_hour_id,meeting_id:ce.id};V([...S,se])}).catch(ce=>{console.log(ce),He.fire({title:"",html:"<p>"+ce+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},Ne=()=>{g&&(Z(),w(!T))},Ie=()=>m.jsx("span",{children:i.t("Tempo prenotazione scaduto!")}),Ce=({minutes:N,seconds:W,completed:q})=>q?m.jsx(Ie,{}):m.jsx("div",{children:m.jsxs("div",{children:[" ",m.jsxs("span",{children:[" ",m.jsxs("i",{children:[i.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",m.jsxs("b",{children:[N," ",i.t("minuti")," ",W," ",i.t("secondi")]})]})]})}),Oe=N=>{const W=Yt(N.target.value),q=Yt(N.target.min),ce=Yt(N.target.max);W<q||W>ce||W>Yt(g.end)?(He.fire({title:"",html:`<p>${i.t("l'orario")} <b>${Si(W)}</b> ${i.t("non è valido")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),J("")):Y({...g,value_start:N.target.value})},$=N=>{const W=Yt(N.target.value),q=Yt(N.target.min),ce=Yt(N.target.max);W<q||W>ce||W<Yt(g.start)?(He.fire({title:"",html:`<p>${i.t("l'orario")} <b>${Si(W)}</b> ${i.t("non è valido")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),J("")):Y({...g,value_end:N.target.value})},J=N=>{if(N===null||N==="")c("");else if(Array.isArray(N)&&N.length>0){let W=[];S.map(q=>{W.push({date:he(q.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:q.slot,calendar_id:q.calendar_id||q.calendar[0],meeting_id:q.meeting_id,opening_hour_id:q.opening_hour||q.opening_hour_id})}),l.multiple?c(W):c(W[0])}else c("")},X=()=>{h(!0),p(null),k(null),J(null)},P=()=>{if(i.language==="it")return zs;if(i.language==="en")return Vs;if(i.language==="de")return Fs};G.useEffect(()=>{J(S)},[S]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&E===!1?(A(!0),setTimeout(()=>{re()},1e3)):(A(!1),setTimeout(()=>{re()},1e3))},[]);const H=(N,W)=>{let q=`${Ee()}/api/meetings/${W.meeting_id}`;fetch(q,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${er("auth-token")}`},strictErrors:!0}).then(ce=>{if(ce&&ce.status>400)He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const se=[...S.slice(0,N),...S.slice(N+1)];V(se),ee(new Date)}})};return m.jsxs(m.Fragment,{children:[E&&O?m.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[m.jsxs("b",{children:[Array.isArray(O)&&O.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:Array.isArray(O)?O.map(N=>m.jsx(Mi,{day:he(N.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:i,slot:N.slot})):m.jsx(Mi,{day:he(O.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:i,slot:O.slot})})})})]}):m.jsx("div",{className:"slot-calendar ",children:m.jsxs("div",{className:"row",children:[l.multiple?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(l.label)}),m.jsx(vr.DayPicker,{mode:"single",selected:M,locale:P(),disabled:I,onMonthChange:ve,onDayClick:me}),m.jsx("p",{children:i.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")})]})}):S.length!==1?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(l.label)}),m.jsx(vr.DayPicker,{mode:"single",selected:M,locale:P(),disabled:I,onMonthChange:ve,onDayClick:me}),m.jsxs("p",{children:[" ",i.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")]})]})}):null,m.jsx("div",{className:"col-12",children:S.length?m.jsx("div",{className:"row m-2",children:m.jsxs("div",{className:"col-12 mb-4",children:[m.jsxs("b",{children:[S.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"," "]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:S.map((N,W)=>m.jsx("li",{children:m.jsx("div",{className:"list-item",children:m.jsxs("div",{className:"it-right-zone",children:[m.jsxs("span",{className:"text pl-4",children:[N.date," ",g||N.slot?`${i.t("alle")} ${N.slot}`:""]}),m.jsx(ue.Icon,{icon:"it-delete",onClick:()=>H(W,N),role:"button"})]})})},"li"+W))})})}),f?m.jsx(ue.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:m.jsx(Es,{date:f.expiration_time,renderer:Ce})}):null]})}):null})]})}),m.jsxs(ue.Modal,{isOpen:T,toggle:()=>w(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[m.jsx(ue.ModalHeader,{toggle:()=>w(!T),id:"daySelected",children:i.t("Seleziona una fascia oraria")}),u?null:m.jsxs("div",{className:"title-xsmall u-grey-dark px-4",children:[" ",i.t("Seleziona una fascia oraria e, se necessario, utilizza l'apposito controllo per accorciare la durata della prenotazione, Poi clicca su Conferma")]}),m.jsx(ue.ModalBody,{children:m.jsxs("div",{className:"row",children:[S.length>=1?m.jsxs("div",{children:[_&&!u?m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Me(_).format("DD/MM/YYYY")]}):null,m.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[m.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:m.jsxs("b",{children:[m.jsx(ue.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",i.t("Ultimo orario selezionato")]})}),m.jsx("div",{className:"col-6 px-2",children:m.jsx("button",{type:"button",id:"slot-last-selection",onClick:oe,tabIndex:"1",className:C==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":S[S.length-1].slot,"data-opening_hour":S[S.length-1].opening_hour_id,"data-start":S[S.length-1].slot.split("-")[0],"data-end":S[S.length-1].slot.split("-")[1],"data-value_start":S[S.length-1].slot.split("-")[0],"data-value_end":S[S.length-1].slot.split("-")[1],disabled:u,children:S[S.length-1].slot})})]})]}):null,m.jsx("div",{children:_&&S.length>=1?m.jsx("h6",{children:i.t("Seleziona altri orari")}):u?null:m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Me(_).format("DD/MM/YYYY")]})}),y.map((N,W)=>m.jsx("div",{className:"col-6",children:m.jsxs("button",{type:"button",id:"slot-"+W,onClick:oe,ref:z,className:C==="slot-"+W?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":N.date,"data-start":N.start_time,"data-end":N.end_time,"data-value_start":N.start_time,"data-value_end":N.end_time,"data-slots":N.start_time+"-"+N.end_time,"data-opening_hour":N.opening_hour,"data-min_duration":N.min_duration,disabled:N.slots_available==0,children:[N.start_time," - ",N.end_time]})},"slot-"+W)),u?m.jsxs("div",{className:"callout callout-highlight warning",children:[m.jsxs("div",{className:"callout-title",children:[m.jsx(ue.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),i.t("Attenzione")]}),m.jsxs("p",{children:[" ",i.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null,m.jsx("div",{className:"col-12",children:g?.value_start&&C?m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-12 mb-3",children:m.jsx("p",{className:"mb-3",children:m.jsx("b",{children:i.t("Se necessario, utilizza il controllo che segue per accorciare la durata della prenotazione")})})}),m.jsx("div",{className:"col-12 col-md-6 mb-4",children:m.jsx(ue.Input,{type:"time",label:i.t("Dalle"),className:"active",defaultValue:g.value_start||g.start,min:g.start,max:g.end,onBlur:Oe})}),m.jsx("div",{className:"col-12 col-md-6 mb-4",children:m.jsx(ue.Input,{type:"time",label:i.t("alle"),className:"active",defaultValue:g.value_end||g.end,onBlur:$,min:g.start,max:g.end})})]}):null})]})}),m.jsx(ue.ModalFooter,{children:m.jsx(ue.Button,{color:"primary",onClick:()=>Ne(),disabled:!_||!g?.value_start,children:i.t("Conferma")})})]})]})};let Ls=class Ws extends tt.ReactComponent{constructor(s,c,i){super(s,c,i)}static get builderInfo(){return{title:"Dynamic Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Ws.schema()}}static schema(){return tt.ReactComponent.schema({type:"dynamic_calendar"})}static editForm=Yc;attachReact(s,c){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(Mh,{ref:c,component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this}))}setValue(s){if(s)if(Array.isArray(s))this.selectedNextSlots=s,this.updateValue(s),this.shouldSetValue=!0;else if(typeof s=="object")this.date=s.date,this.slot=s.slot,this.meeting=s.meeting_id,this.meeting_expiration_time=null,this.opening_hour=s.opening_hour_id,this.calendar_id=s.calendar_id,this.updateValue(s),this.shouldSetValue=!0;else{let c=s.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),i=c[2].split("#");this.date=c[0],this.slot=c[1],this.meeting=i[1],this.meeting_expiration_time=null,this.opening_hour=i.length===3?i[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 s=this.meeting?this.meeting:"",c=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:s,opening_hour_id:c}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};const xh=[{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:Ee()+"/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 = '"+Ee()+"'; 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:Ee()+"/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) {
|
|
49
49
|
let url = data.url + '/api/calendars/' + data.calendarId + '/overlaps';
|
|
50
50
|
if (data.select_opening_hours && data.opening_hours.length > 0) {
|
|
51
51
|
let qs = "?opening_hours=" + data.opening_hours.join();
|
|
@@ -76,12 +76,12 @@ if(data.calendarId && data.api_url){
|
|
|
76
76
|
data.overlaps_validation = -1; document.querySelector("input[name^='data[overlaps_validation]']").value = -1;
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
|
-
}`,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 Dh(...l){return tt.Components.baseEditForm([{key:"display",components:xh}],...l)}function Mi({day:l,slot:s,i18next:c}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text pl-4",children:[m.jsx("b",{children:l})," ",c.t("alle")," ",c.t("ore")," ",m.jsx("b",{children:s})]})})})})}const kh=({component:l,current:s,onChange:c,i18next:i})=>{const[M,x]=G.useState(),[I,o]=G.useState([]),[y,r]=G.useState([]),[u,h]=G.useState(!1),[f,p]=G.useState(null),[g,Y]=G.useState(null),[_,k]=G.useState(null),[C,j]=G.useState(null),[F,R]=G.useState({}),[O,v]=G.useState(null),[T,w]=G.useState(!1),[S,V]=G.useState([]),[E,A]=G.useState(!1),z=G.useRef(),B=l.calendarId;he.locale(i.language);const ee=P=>{let H=he(P).format("YYYY-MM-DD");fetch(te(H)).then(N=>N.json()).then(N=>{let W=fe(P||new Date);const q=N.filter(_e=>_e.available==!0);q.length===0&&$();let se=[];W.forEach(_e=>{N.some($e=>$e.date===_e&&$e.available==!0)?se.push({available:!0,date:_e}):se.push({available:!1,date:_e})});const Pe=se.map(_e=>{if(_e.available===!1)return he(_e.date,"YYYY-MM-DD").toDate()});o(Pe);const ge=q.length?q[0].date:P;ie(ge)}).catch(N=>console.error(N))},ie=P=>{j(null),k(null),r([]);let H=he(P).format("YYYY-MM-DD");fetch(de(H)).then(N=>N.json()).then(N=>{const W=N.filter(q=>q.availability==!0);R(W[0]),W.length>0?(r(N),h(!1),k(he(P).format("L")),x(he(P,"YYYY-MM-DD").toDate())):(N.length>0&&x(he(N[0].date,"YYYY-MM-DD").toDate()),r([]),$())})},re=()=>{if(B!==""&&B!=null)if(!s.dataValue)ee(new Date);else if(l.multiple&&Array.isArray(s.dataValue)){if(s.dataValue.length>0){v(s.dataValue);let P=[];s.dataValue.map(H=>{P.push({...H,date:he(H.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),V(P)}}else if(!l.multiple&&typeof s.dataValue=="object"){const P={date:s.dataValue.date,slot:s.dataValue.slot},H={...s.dataValue,date:he(s.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};V([H]),v(P)}else{let P=s.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),H=P[2].split("#");const N={date:he(P[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:P[1]};l.multiple?(c([{date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}]),V([{date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}])):(c({date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}),V([{date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}])),v(N)}};G.useEffect(()=>{window.FormioInstance?.formReady.then(()=>{setTimeout(()=>{re()},1e3)})},[]);const fe=P=>{let N=he(P,"YYYY-MM").daysInMonth(),W=[];for(;N;){let q=he(P).date(N);W.push(q.format("YYYY-MM-DD")),N--}return W},te=(P,H=!1)=>{let N=l.calendarId,W=l.select_opening_hours,q=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");let se=`${Ee()}/api/calendars/${N}/availabilities`,Pe=[`from_time=${he(P).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(P).endOf("month").format("YYYY-MM-DD")}`];return H&&Pe.push(`available=${H}`),W&&q&&Pe.push(`opening_hours=${q.join()}`),`${se}?${Pe.join("&")}`},de=(P,H=!1)=>{let N=l.calendarId,W=l.select_opening_hours,q=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");const se=he(P).format("YYYY-MM-DD");let Pe=`${Ee()}/api/calendars/${N}/availabilities/${se}`,ge=[];return H&&ge.push(`available=${H}`),W&&q&&ge.push(`opening_hours=${q.join()}`),ge&&(Pe=`${Pe}?${ge.join("&")}`),Pe},ve=P=>{ee(P)},me=P=>{setTimeout(()=>{w(!T)},1e3),ie(P)},oe=P=>{j(null),setTimeout(()=>{P&&(Y(P.target.dataset),j(P.target.id))},300)},Z=P=>{p(null);let H=`${Ee()}/it/meetings/new-draft`,N={date:g?.date?he(g?.date).format("DD-MM-YYYY"):he(P.target.dataset.date).format("DD-MM-YYYY"),slot:g?.value_start&&g?.value_end?g.value_start+"-"+g.value_end:P.target.dataset.slots,calendar:l.calendarId,opening_hour:g?.opening_hour?g?.opening_hour:P.target.dataset.opening_hour,meeting:f?f.id:"",first_available_date:F.date,first_available_start_time:F.start_time,first_available_end_time:F.end_time,first_availability_updated_at:he().format()};fetch(H,{method:"POST",body:JSON.stringify(N),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(W=>{if(!W.ok)throw new Error(i.t("Intervallo selezionato non disponibile!"));return W.json()}).then(W=>{p(W);const q={date:N.date,slot:N.slot,calendar_id:N.calendar[0],opening_hour_id:N.opening_hour||N.opening_hour_id,meeting_id:W.id};V([...S,q])}).catch(W=>{console.log(W),He.fire({title:"",html:"<p>"+W+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},Ne=()=>{g&&(Z(),w(!T))},Ie=()=>m.jsx("span",{children:i.t("Tempo prenotazione scaduto!")}),Ce=({minutes:P,seconds:H,completed:N})=>N?m.jsx(Ie,{}):m.jsx("div",{children:m.jsxs("div",{children:[" ",m.jsxs("span",{children:[" ",m.jsxs("i",{children:[i.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",m.jsxs("b",{children:[P," ",i.t("minuti")," ",H," ",i.t("secondi")]})]})]})}),Oe=P=>{if(P===null||P==="")c("");else if(Array.isArray(P)&&P.length>0){let H=[];S.map(N=>{H.push({date:he(N.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:N.slot,calendar_id:N.calendar_id||N.calendar[0],meeting_id:N.meeting_id,opening_hour_id:N.opening_hour||N.opening_hour_id})}),l.multiple?c(H):c(H[0])}else c("")},$=()=>{h(!0),p(null),k(null),Oe(null)},J=()=>{if(i.language==="it")return zs;if(i.language==="en")return Vs;if(i.language==="de")return Fs};G.useEffect(()=>{Oe(S)},[S]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&E===!1?(A(!0),setTimeout(()=>{re()},1e3)):(A(!1),setTimeout(()=>{re()},1e3))},[]);const X=(P,H)=>{let N=`${Ee()}/api/meetings/${H.meeting_id}`;fetch(N,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${er("auth-token")}`},strictErrors:!0}).then(W=>{if(W&&W.status>400)He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const q=[...S.slice(0,P),...S.slice(P+1)];V(q),ee(new Date)}})};return m.jsxs(m.Fragment,{children:[E&&O?m.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[m.jsxs("b",{children:[Array.isArray(O)&&O.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:Array.isArray(O)?O.map(P=>m.jsx(Mi,{day:he(P.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:i,slot:P.slot})):m.jsx(Mi,{day:Me(O.date).format("DD/MM/YYYY"),i18next:i,slot:O.slot})})})})]}):m.jsx("div",{className:"slot-calendar ",children:m.jsxs("div",{className:"row",children:[l.multiple?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(l.label)}),m.jsx(vr.DayPicker,{mode:"single",selected:M,locale:J(),disabled:I,onMonthChange:ve,onDayClick:me})]})}):S.length!==1?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(l.label)}),m.jsx(vr.DayPicker,{mode:"single",selected:M,locale:J(),disabled:I,onMonthChange:ve,onDayClick:me})]})}):null,m.jsx("div",{className:"col-12",children:S.length?m.jsx("div",{className:"row m-2",children:m.jsxs("div",{className:"col-12 mb-4",children:[m.jsxs("b",{children:[S.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"," "]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:S.map((P,H)=>m.jsx("li",{children:m.jsx("div",{className:"list-item",children:m.jsxs("div",{className:"it-right-zone",children:[m.jsxs("span",{className:"text pl-4",children:[P.date," ",g||P.slot?`${i.t("alle")} ${P.slot}`:""]}),m.jsx(ue.Icon,{icon:"it-delete",onClick:()=>X(H,P),role:"button"})]})})},"li"+H))})})}),f?m.jsx(ue.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:m.jsx(Es,{date:f.expiration_time,renderer:Ce})}):null]})}):null})]})}),m.jsxs(ue.Modal,{isOpen:T,toggle:()=>w(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[m.jsx(ue.ModalHeader,{toggle:()=>w(!T),id:"daySelected",children:i.t("Seleziona una fascia oraria")}),m.jsx(ue.ModalBody,{children:m.jsxs("div",{className:"row",children:[S.length>=1?m.jsxs("div",{children:[_&&!u?m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Me(_).format("DD/MM/YYYY")]}):null,m.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[m.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:m.jsxs("b",{children:[m.jsx(ue.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",i.t("Ultimo orario selezionato")]})}),m.jsx("div",{className:"col-6 px-2",children:m.jsx("button",{type:"button",id:"slot-last-selection",onClick:oe,tabIndex:"1",className:C==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":S[S.length-1].slot,"data-opening_hour":S[S.length-1].opening_hour_id,"data-start":S[S.length-1].slot.split("-")[0],"data-end":S[S.length-1].slot.split("-")[1],"data-value_start":S[S.length-1].slot.split("-")[0],"data-value_end":S[S.length-1].slot.split("-")[1],disabled:u,children:S[S.length-1].slot})})]})]}):null,m.jsx("div",{children:_&&S.length>=1?m.jsx("h6",{children:i.t("Seleziona altri orari")}):u?null:m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Me(_).format("DD/MM/YYYY")]})}),y.map((P,H)=>m.jsx("div",{className:"col-6",children:m.jsxs("button",{type:"button",id:"slot-"+H,onClick:oe,ref:z,className:C==="slot-"+H?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":P.date,"data-start":P.start_time,"data-end":P.end_time,"data-value_start":P.start_time,"data-value_end":P.end_time,"data-slots":P.start_time+"-"+P.end_time,"data-opening_hour":P.opening_hour,"data-min_duration":P.min_duration,disabled:P.slots_available==0,children:[P.start_time," - ",P.end_time]})},"slot-"+H)),u?m.jsxs("div",{className:"callout callout-highlight warning",children:[m.jsxs("div",{className:"callout-title",children:[m.jsx(ue.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),i.t("Attenzione")]}),m.jsxs("p",{children:[" ",i.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null]})}),m.jsx(ue.ModalFooter,{children:m.jsx(ue.Button,{color:"primary",onClick:()=>Ne(),disabled:!_||!g?.value_start,children:i.t("Conferma")})})]})]})};class br extends tt.ReactComponent{constructor(s,c,i){super(s,c,i)}static get builderInfo(){return{title:"Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:br.schema()}}static schema(){return tt.ReactComponent.schema({type:"calendar"})}static editForm=Dh;attachReact(s,c){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(kh,{ref:c,component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this}))}setValue(s){if(s)if(Array.isArray(s))this.selectedNextSlots=s,this.updateValue(s),this.shouldSetValue=!0;else if(typeof s=="object")this.date=s.date,this.slot=s.slot,this.meeting=s.meeting_id,this.meeting_expiration_time=null,this.opening_hour=s.opening_hour_id,this.calendar_id=s.calendar_id,this.updateValue(s),this.shouldSetValue=!0;else{let c=s.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),i=c[2].split("#");this.date=c[0],this.slot=c[1],this.meeting=i[1],this.meeting_expiration_time=null,this.opening_hour=i.length===3?i[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 s=this.meeting?this.meeting:"",c=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:s,opening_hour_id:c}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}}const Oh=[{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 = '"+Ee()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function Yh(...l){return tt.Components.baseEditForm([{key:"display",components:Oh}],...l)}function Ch({day:l,slot:s,i18next:c}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text-paragraph pl-4",children:[m.jsx("b",{children:l})," ",c.t("alle")," ",c.t("ore")," ",m.jsx("b",{children:s})]})})})})}function jh(l,s){if(!s||s.length===0)return;const c=s.map(I=>{const o=new Date(I.start);return(new Date(I.end)-o)/6e4}),i=Math.min(...c),M=c.reduce((I,o)=>I+o,0)/c.length;let x=0;i<=30&&i>15?x=M*1:i<=15?x=M*24:x=M*4,l.setOption("slotHeight",x),document.documentElement.style.setProperty("--slot-height",`${x}px`)}const qs={AVAILABILITY:{key:"availability_data_cache_",duration:10},SLOTS:{key:"availability_slots_cache_",duration:10},SUBMISSION:{key:"submission_cache_",duration:30}},Kr=(l,s,c)=>{const i={data:c,timestamp:Me().toISOString()};sessionStorage.setItem(s,JSON.stringify(i)),console.log(`✅ Cache salvato: ${l}`)},Xr=(l,s)=>{try{const c=sessionStorage.getItem(s);if(!c)return null;const i=JSON.parse(c),M=Me().diff(Me(i.timestamp),"minutes");return M>qs[l].duration?(sessionStorage.removeItem(s),console.log(`⏰ Cache scaduto: ${l}`),null):(console.log(`✅ Cache letto: ${l} (${M} minuti fa)`),i.data)}catch(c){return console.error(`Errore nel leggere il cache (${l}):`,c),null}},Zr=(l,...s)=>qs[l].key+btoa(s),gn="calendar_view_state",vn="calendar_view_date",Th=(l,s)=>{try{sessionStorage.setItem(gn,l),sessionStorage.setItem(vn,s||new Date().toISOString())}catch(c){console.error("Errore nel salvare lo stato della view:",c)}},Ph=()=>{try{const l=sessionStorage.getItem(gn),s=sessionStorage.getItem(vn);return{viewType:l||"timeGridWeek",date:s?new Date(s):new Date}}catch(l){return console.error("Errore nel leggere lo stato della view:",l),{viewType:"timeGridWeek",date:new Date}}},Hs=()=>{try{sessionStorage.removeItem(gn),sessionStorage.removeItem(vn)}catch(l){console.error("Errore nel pulire lo stato della view:",l)}},xi=dn.Formio.Components.components.field,Nh=({component:l,current:s,onChange:c,i18next:i})=>{const[M,x]=G.useState(null),[I,o]=G.useState(null),[y,r]=G.useState([]),[u,h]=G.useState(!1),[f,p]=G.useState(!1),[g,Y]=G.useState(null),[_,k]=G.useState([]),[C,j]=G.useState([]),[F,R]=G.useState([]),[O,v]=G.useState(null),[T,w]=G.useState(null),[S,V]=G.useState(null),E=G.useRef(null),A=G.useRef(null);i.language,he.locale(i.language),Me.locale(i.language);function z($){if(!$||$.length===0)return null;const J=$.map(H=>({start:H.start_time,end:H.end_time})),X=J.reduce((H,N)=>N.start<H?N.start:H,J[0].start),P=J.reduce((H,N)=>N.end>H?N.end:H,J[0].end);return{earliestStartTime:X,latestEndTime:P}}function B($){const J=$.map(H=>he(H.date).isoWeekday()),P=[1,2,3,4,5,6,7].filter(H=>!J.includes(H));P.length>0?A.current.setOption("hiddenDays",P):A.current.setOption("hiddenDays",[])}function ee($,J,X){const P=new URL($),N=`${P.pathname.split("/").slice(0,4).join("/")}/${J}/${X}`;return`${P.origin}${N}${P.search}`}function ie($,J,X){const P=new URL($),N=`${P.pathname.split("/").slice(0,4).join("/")}`;return`${P.origin}${N}${P.search}&from_to=${J}&to_date=${X}`}function re($,J,X){return`${Ee()}/api/availabilities/${$}/${J}?calendar_ids=${X}&available=true`}const fe=$=>{R([]),j([]),c({}),$&&j(M.filter(J=>J.date.startsWith($)))},te=async($,J)=>{const X=JSON.parse($),P=Zr("SLOTS",X.date,X.calendar_ids);if(J==="manual")R([]),V(null),Y(null),c({});else{const H=Xr("SLOTS",P);if(H){R(H);return}}try{const H=await window.FormioHelper.anonymousCall(`availabilities/${X.date}?calendar_ids=${X.calendar_ids}`);Kr("SLOTS",P,H.data),R(H.data)}catch(H){console.error("Errore nel caricamento degli slot:",H),He.fire({icon:"error",title:i.t("Errore"),text:i.t("Errore nel caricamento degli orari")})}},de=$=>{const J=JSON.parse($),X={status:6,calendar:J.calendar_id,opening_hour:J.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Me(`${J.date}T${J.start_time}`).toISOString(),to_time:Me(`${J.date}T${J.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:s?.data?.service_data?.id,calendar_group_office_id:s?.data?.user_group?.id,calendar_group_place_id:s?.data?.place?.id};window.FormioHelper.authenticatedRequest(s?.dataValue?.id?"PATCH":"POST",s?.dataValue?.id?`meetings/${s.dataValue.id}`:"meetings",X).then(P=>{Y({day:Me(J.date).format("dddd, DD MMMM YYYY"),startDate:J.start_time,endDate:J.end_time}),c(P?.id?P:P?{...P,id:s.dataValue.id}:s.dataValue.id?{...X,id:s.dataValue.id}:{...X})}).catch(P=>{console.error(P),P.status===400&&P?.response?.data?.type==="validation_error"?He.fire({title:"",html:"<p>"+i.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):He.fire({title:"",html:"<p>"+P+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=$=>{const J=new Set,X=[];return $.forEach(P=>{const H=Me(P.date),N=H.format("YYYY-MM");J.has(N)||(J.add(N),X.push({value:N,label:H.format("MMMM YYYY").replace(/^\w/,W=>W.toUpperCase())}))}),X},me=async()=>{const $=s?.root?.data?.place?.merge_availabilities?s?.root?.data?.place?.merged_availabilities_link:null,J=he().format("YYYY-MM-DD"),X=he().add(1,"month").format("YYYY-MM-DD"),P=s?.root?.data?.place?.calendars[0]?.id||null,H=$?ie($,J,X):re(J,X,P),N=Zr("AVAILABILITY",H),W=Xr("AVAILABILITY",N);if(W){x(W),k(ve(W));return}else c({});h(!0);try{const q=await window.FormioHelper.fetchAPIUrlLimit(H);if(h(!1),!q?.length){He.fire({icon:"warning",title:i.t("warning"),html:i.t("no_meetings")});return}Kr("AVAILABILITY",N,q),x(q),k(ve(q))}catch(q){h(!1),console.error("Errore nel caricamento disponibilità:",q)}};G.useEffect(()=>{if(M?.length){const $=s?.dataValue??s?.getValue();if($?.from_time&&$?.to_time&&!Me().isAfter($?.draft_expiration)){const J=Me($.from_time).format("YYYY-MM");v(J),J&&j&&(j(M.filter(X=>X.date.startsWith(J))),w(Me($.from_time).format("YYYY-MM-DD")))}else $?.draft_expiration&&Me().isAfter($?.draft_expiration)&&He.fire({icon:"warning",title:i.t("warning"),html:i.t("expired_meeting")})}},[M]),G.useEffect(()=>{const $=s?.dataValue??s?.getValue();if(!_.length||O||$?.from_time||$?.to_time)return;const J=_[0];J&&(v(J.value),fe(J.value))},[_,O,s?.dataValue]),G.useEffect(()=>{if(T&&f===!1){const $=s?.dataValue??s?.getValue();te(JSON.stringify({date:T,calendar_ids:$.calendar.id}))}},[T]);const oe=()=>window.innerWidth>768?"timeGridWeek":"timeGridDay";G.useEffect(()=>{const $=()=>{const J=A.current;if(!J)return;const X=oe(),P=J.getView().type;X!==P&&J.setOption("view",X)};return window.addEventListener("resize",$),()=>window.removeEventListener("resize",$)},[]),G.useEffect(()=>{const $=s?.dataValue??s?.getValue();F?.length&&$?.from_time&&(V(Me($.from_time).format("HH:mm")+" - "+Me($.to_time).format("HH:mm")),Y({day:Me($.from_time).format("dddd D MMM YYYY"),startDate:Me($.from_time).format("HH:mm"),endDate:Me($.to_time).format("HH:mm")}))},[F]);const Z=()=>{const $=Ph();A.current=oi.createCalendar(E.current,[oi.TimeGrid],{events:[],buttonText:{today:i.t("Oggi")},allDaySlot:!1,firstDay:1,date:$.date,slotEventOverlap:!1,view:oe(),height:"400px",views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:J=>{Th(J.view.type,J.start)},eventClick({event:J,el:X}){document.querySelectorAll(".ec-event").forEach(se=>{se.classList.remove("highlighted-event")}),X.classList.add("highlighted-event");const P=new Date(J.start),H=new Date(J.end),N=P.toLocaleDateString("it-IT",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),W=P.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),q=H.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),ce={status:6,calendar:J.extendedProps.calendar_id,opening_hour:J.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:P,to_time:H,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:s?.data?.service_data?.id,calendar_group_office_id:s?.data?.user_group?.id,calendar_group_place_id:s?.data?.place?.id};window.FormioHelper.authenticatedRequest(s?.dataValue?.id?"PATCH":"POST",s?.dataValue?.id?`meetings/${s.dataValue.id}`:"meetings",ce).then(se=>{let Pe;!se||se===""?Pe={...ce,code:null,id:s?.dataValue?.id}:typeof se=="object"&&(Pe=se),Y({day:N,startDate:W,endDate:q}),c(Pe)}).catch(se=>{console.error(se),se.status===400&&se?.response?.data?.type==="validation_error"?He.fire({title:"",html:"<p>"+i.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):He.fire({title:"",html:"<p>"+se+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:Ne,eventDidMount:J=>{const{event:X,el:P}=J,H=X.extendedProps;P.setAttribute("data-event-id",X.id+"-"+H.date+"-"+H.start_time)},loading:J=>{h(J)}})},Ne=$=>{s?.root?.data?.place&&A.current.setOption("eventSources",[{events:Ie}])};async function Ie($,J,X){try{A.current.setOption("events",[]);const P=he($.start).format("YYYY-MM-DD"),H=new Date($.end);H.setDate(H.getDate()-1);const N=he(H).format("YYYY-MM-DD"),W=null,q=s?.root?.data?.place?.merge_availabilities?s?.root?.data?.place?.merged_availabilities_link:null,ce=q?ee(q,P,N):re(P,N,W),se=Zr("AVAILABILITY",ce),Pe=Xr("AVAILABILITY",se);let ge;if(Pe?(ge=Pe,h(!1)):(ge=await window.FormioHelper.fetchAPIUrlLimit(ce),Kr("AVAILABILITY",se,ge)),!ge?.length){J([]),He.fire({icon:"warning",title:i.t("warning"),html:i.t("no_meetings")});return}const _e=ge.map(Re=>({id:Re.opening_hour_id,allDay:!1,start:`${Re.date}T${Re.start_time}:00`,end:`${Re.date}T${Re.end_time}:00`,title:`${Re.start_time} - ${Re.end_time}`,editable:!1,display:"auto",color:"#ebeef0",textColor:"#000",className:"event-slot",extendedProps:{...Re}})),$e=z(ge);A.current.setOption("slotMinTime",$e.earliestStartTime),A.current.setOption("slotMaxTime",$e.latestEndTime),B(ge),jh(A.current,_e),J(_e),setTimeout(()=>{Ce(_e)},500)}catch(P){console.error("Errore nel caricamento disponibilità:",P),X?.(P)}}G.useEffect(()=>{let $,J=!1;async function X(){try{if(await window.FormioInstance?.formReady,J)return;if(!E.current){console.warn("Elemento calendario non trovato");return}const P=s?.dataValue??s?.getValue();P&&P?.draft_expiration&&Me().isAfter(P.draft_expiration)&&(c({}),Hs()),s?.data?.service_data?.view_type==="calendar"?A?.current||Z():s?.data?.service_data?.view_type==="select"?me():alert(i.t("Il componente non è configurato per la visualizzazione a calendario"))}catch(P){console.error("Errore durante l'inizializzazione del calendario:",P)}}return $=setTimeout(X,500),()=>{J=!0,$&&clearTimeout($),A.current&&(E.current?.destroy?.(),A.current=null)}},[s?.root?.data?.place]);function Ce($){const J=s?.dataValue;if(!J?.from_time)return;const X=Me(J.from_time).format("DD-MM-YYYY HH:mm"),P=Me(J.to_time).format("DD-MM-YYYY HH:mm"),H=$.find(W=>Me(W.start).format("DD-MM-YYYY HH:mm")===X&&Me(W.end).format("DD-MM-YYYY HH:mm")===P);if(!H)return;const N=document.querySelector(`.ec-event[data-event-id="${H.id}-${Me(J?.from_time).format("YYYY-MM-DD")}-${Me(J?.from_time).format("HH:mm")}"]`);N&&(N.classList.add("highlighted-event"),N.scrollIntoView({behavior:"smooth",block:"center"}),Y({day:Me(J?.from_time).format("dddd, DD MMMM YYYY"),startDate:Me(J?.from_time).format("HH:mm"),endDate:Me(J?.to_time).format("HH:mm")}))}const Oe=({day:$,startDate:J,endDate:X})=>m.jsx("div",{className:"mt-3",children:m.jsxs("div",{className:"row align-items-center gy-3",children:[m.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[m.jsx("div",{className:"text-paragraph-small",children:i.t("Data")}),m.jsx("p",{className:"data-text",children:m.jsx("strong",{children:$})})]}),m.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[m.jsx("div",{className:"text-paragraph-small",children:i.t("Ora")}),m.jsx("p",{className:"data-text",children:m.jsxs("strong",{children:[J," - ",X]})})]})]})});return G.useEffect(()=>{document.querySelector(".formio-read-only")&&f===!1?p(!0):(s?.data?.service_data?.view_type==="select"?me():s?.data?.service_data?.view_type==="calendar"&&Z(),p(!1))},[]),G.useEffect(()=>{f&&setTimeout(()=>{const $=s?.dataValue??s?.getValue();console.log("savedValue",$,f),$&&o($)},500)},[f]),m.jsx(m.Fragment,{children:f&&I?m.jsxs("div",{className:"mx-2",children:[m.jsxs("p",{className:"text-paragraph",children:[i.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:m.jsx(Ch,{day:Me(I.from_time).format("dddd D MMM YYYY"),i18next:i,slot:`${Me(I.from_time).format("HH:mm")} - ${Me(I.to_time).format("HH:mm")}`})})})})]}):m.jsxs("div",{className:"",children:[m.jsx("div",{ref:E}),_.length>0?m.jsxs(m.Fragment,{children:[m.jsxs(ue.Select,{label:"Mese",id:"selectMonthYear",onChange:fe,children:[m.jsx("option",{value:"",children:i.t("Scegli un'opzione")}),_.map($=>m.jsx("option",{value:$.value,selected:$.value===O,children:$.label},$.value))]}),m.jsxs(ue.Select,{label:"Giorno",id:"selectDay",onChange:$=>te($,"manual"),disabled:C.length===0,children:[m.jsx("option",{value:"",children:i.t("Scegli un'opzione")}),C.map($=>m.jsx("option",{value:JSON.stringify($),selected:$.date===T,children:Me($.date).format("dddd,DD MMMM YYYY")},$.date))]}),m.jsxs(ue.Select,{label:"Orario",id:"selectSlot",onChange:de,disabled:F.length===0,children:[m.jsx("option",{value:"",children:i.t("Scegli un'opzione")}),F.map($=>m.jsx("option",{value:JSON.stringify($),selected:$.start_time+" - "+$.end_time===S,children:$.start_time+" - "+$.end_time},$.start_time+" - "+$.end_time))]})]}):null,g?Oe({day:g.day,startDate:g.startDate,endDate:g.endDate}):null,u?m.jsx("div",{className:"d-flex align-items-center justify-content-center position-absolute-center",children:m.jsx(ue.Spinner,{active:!0})}):null]})})};class wr extends xi{constructor(s,c,i){super(s,c,i)}static get builderInfo(){return{title:"Calendar Advanced",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:wr.schema()}}static schema(){return xi.schema({type:"calendar-advanced"})}static editForm=Yh;attach(s,c){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(Nh,{ref:c,component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this}))}setValue(s){s&&(this.updateValue(s),this.shouldSetValue=!0)}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}}const Rh=[{key:"defaultValue",ignore:!0}],Eh=[{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"]]}}}],Ah=[{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:`{
|
|
79
|
+
}`,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 Dh(...l){return tt.Components.baseEditForm([{key:"display",components:xh}],...l)}function xi({day:l,slot:s,i18next:c}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text pl-4",children:[m.jsx("b",{children:l})," ",c.t("alle")," ",c.t("ore")," ",m.jsx("b",{children:s})]})})})})}const kh=({component:l,current:s,onChange:c,i18next:i})=>{const[M,x]=G.useState(),[I,o]=G.useState([]),[y,r]=G.useState([]),[u,h]=G.useState(!1),[f,p]=G.useState(null),[g,Y]=G.useState(null),[_,k]=G.useState(null),[C,j]=G.useState(null),[F,R]=G.useState({}),[O,v]=G.useState(null),[T,w]=G.useState(!1),[S,V]=G.useState([]),[E,A]=G.useState(!1),z=G.useRef(),B=l.calendarId;he.locale(i.language);const ee=P=>{let H=he(P).format("YYYY-MM-DD");fetch(te(H)).then(N=>N.json()).then(N=>{let W=fe(P||new Date);const q=N.filter(_e=>_e.available==!0);q.length===0&&$();let se=[];W.forEach(_e=>{N.some($e=>$e.date===_e&&$e.available==!0)?se.push({available:!0,date:_e}):se.push({available:!1,date:_e})});const Pe=se.map(_e=>{if(_e.available===!1)return he(_e.date,"YYYY-MM-DD").toDate()});o(Pe);const ge=q.length?q[0].date:P;ie(ge)}).catch(N=>console.error(N))},ie=P=>{j(null),k(null),r([]);let H=he(P).format("YYYY-MM-DD");fetch(de(H)).then(N=>N.json()).then(N=>{const W=N.filter(q=>q.availability==!0);R(W[0]),W.length>0?(r(N),h(!1),k(he(P).format("L")),x(he(P,"YYYY-MM-DD").toDate())):(N.length>0&&x(he(N[0].date,"YYYY-MM-DD").toDate()),r([]),$())})},re=()=>{if(B!==""&&B!=null)if(!s.dataValue)ee(new Date);else if(l.multiple&&Array.isArray(s.dataValue)){if(s.dataValue.length>0){v(s.dataValue);let P=[];s.dataValue.map(H=>{P.push({...H,date:he(H.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),V(P)}}else if(!l.multiple&&typeof s.dataValue=="object"){const P={date:s.dataValue.date,slot:s.dataValue.slot},H={...s.dataValue,date:he(s.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};V([H]),v(P)}else{let P=s.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),H=P[2].split("#");const N={date:he(P[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:P[1]};l.multiple?(c([{date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}]),V([{date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}])):(c({date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}),V([{date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}])),v(N)}};G.useEffect(()=>{window.FormioInstance?.formReady.then(()=>{setTimeout(()=>{re()},1e3)})},[]);const fe=P=>{let N=he(P,"YYYY-MM").daysInMonth(),W=[];for(;N;){let q=he(P).date(N);W.push(q.format("YYYY-MM-DD")),N--}return W},te=(P,H=!1)=>{let N=l.calendarId,W=l.select_opening_hours,q=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");let se=`${Ee()}/api/calendars/${N}/availabilities`,Pe=[`from_time=${he(P).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(P).endOf("month").format("YYYY-MM-DD")}`];return H&&Pe.push(`available=${H}`),W&&q&&Pe.push(`opening_hours=${q.join()}`),`${se}?${Pe.join("&")}`},de=(P,H=!1)=>{let N=l.calendarId,W=l.select_opening_hours,q=l.select_opening_hours?l.opening_hours:[];window.location.pathname.split("/");const se=he(P).format("YYYY-MM-DD");let Pe=`${Ee()}/api/calendars/${N}/availabilities/${se}`,ge=[];return H&&ge.push(`available=${H}`),W&&q&&ge.push(`opening_hours=${q.join()}`),ge&&(Pe=`${Pe}?${ge.join("&")}`),Pe},ve=P=>{ee(P)},me=P=>{setTimeout(()=>{w(!T)},1e3),ie(P)},oe=P=>{j(null),setTimeout(()=>{P&&(Y(P.target.dataset),j(P.target.id))},300)},Z=P=>{p(null);let H=`${Ee()}/it/meetings/new-draft`,N={date:g?.date?he(g?.date).format("DD-MM-YYYY"):he(P.target.dataset.date).format("DD-MM-YYYY"),slot:g?.value_start&&g?.value_end?g.value_start+"-"+g.value_end:P.target.dataset.slots,calendar:l.calendarId,opening_hour:g?.opening_hour?g?.opening_hour:P.target.dataset.opening_hour,meeting:f?f.id:"",first_available_date:F.date,first_available_start_time:F.start_time,first_available_end_time:F.end_time,first_availability_updated_at:he().format()};fetch(H,{method:"POST",body:JSON.stringify(N),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(W=>{if(!W.ok)throw new Error(i.t("Intervallo selezionato non disponibile!"));return W.json()}).then(W=>{p(W);const q={date:N.date,slot:N.slot,calendar_id:N.calendar[0],opening_hour_id:N.opening_hour||N.opening_hour_id,meeting_id:W.id};V([...S,q])}).catch(W=>{console.log(W),He.fire({title:"",html:"<p>"+W+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},Ne=()=>{g&&(Z(),w(!T))},Ie=()=>m.jsx("span",{children:i.t("Tempo prenotazione scaduto!")}),Ce=({minutes:P,seconds:H,completed:N})=>N?m.jsx(Ie,{}):m.jsx("div",{children:m.jsxs("div",{children:[" ",m.jsxs("span",{children:[" ",m.jsxs("i",{children:[i.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",m.jsxs("b",{children:[P," ",i.t("minuti")," ",H," ",i.t("secondi")]})]})]})}),Oe=P=>{if(P===null||P==="")c("");else if(Array.isArray(P)&&P.length>0){let H=[];S.map(N=>{H.push({date:he(N.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:N.slot,calendar_id:N.calendar_id||N.calendar[0],meeting_id:N.meeting_id,opening_hour_id:N.opening_hour||N.opening_hour_id})}),l.multiple?c(H):c(H[0])}else c("")},$=()=>{h(!0),p(null),k(null),Oe(null)},J=()=>{if(i.language==="it")return zs;if(i.language==="en")return Vs;if(i.language==="de")return Fs};G.useEffect(()=>{Oe(S)},[S]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&E===!1?(A(!0),setTimeout(()=>{re()},1e3)):(A(!1),setTimeout(()=>{re()},1e3))},[]);const X=(P,H)=>{let N=`${Ee()}/api/meetings/${H.meeting_id}`;fetch(N,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${er("auth-token")}`},strictErrors:!0}).then(W=>{if(W&&W.status>400)He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const q=[...S.slice(0,P),...S.slice(P+1)];V(q),ee(new Date)}})};return m.jsxs(m.Fragment,{children:[E&&O?m.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[m.jsxs("b",{children:[Array.isArray(O)&&O.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:Array.isArray(O)?O.map(P=>m.jsx(xi,{day:he(P.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:i,slot:P.slot})):m.jsx(xi,{day:Me(O.date).format("DD/MM/YYYY"),i18next:i,slot:O.slot})})})})]}):m.jsx("div",{className:"slot-calendar ",children:m.jsxs("div",{className:"row",children:[l.multiple?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(l.label)}),m.jsx(vr.DayPicker,{mode:"single",selected:M,locale:J(),disabled:I,onMonthChange:ve,onDayClick:me})]})}):S.length!==1?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(l.label)}),m.jsx(vr.DayPicker,{mode:"single",selected:M,locale:J(),disabled:I,onMonthChange:ve,onDayClick:me})]})}):null,m.jsx("div",{className:"col-12",children:S.length?m.jsx("div",{className:"row m-2",children:m.jsxs("div",{className:"col-12 mb-4",children:[m.jsxs("b",{children:[S.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"," "]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:S.map((P,H)=>m.jsx("li",{children:m.jsx("div",{className:"list-item",children:m.jsxs("div",{className:"it-right-zone",children:[m.jsxs("span",{className:"text pl-4",children:[P.date," ",g||P.slot?`${i.t("alle")} ${P.slot}`:""]}),m.jsx(ue.Icon,{icon:"it-delete",onClick:()=>X(H,P),role:"button"})]})})},"li"+H))})})}),f?m.jsx(ue.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:m.jsx(Es,{date:f.expiration_time,renderer:Ce})}):null]})}):null})]})}),m.jsxs(ue.Modal,{isOpen:T,toggle:()=>w(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[m.jsx(ue.ModalHeader,{toggle:()=>w(!T),id:"daySelected",children:i.t("Seleziona una fascia oraria")}),m.jsx(ue.ModalBody,{children:m.jsxs("div",{className:"row",children:[S.length>=1?m.jsxs("div",{children:[_&&!u?m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Me(_).format("DD/MM/YYYY")]}):null,m.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[m.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:m.jsxs("b",{children:[m.jsx(ue.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",i.t("Ultimo orario selezionato")]})}),m.jsx("div",{className:"col-6 px-2",children:m.jsx("button",{type:"button",id:"slot-last-selection",onClick:oe,tabIndex:"1",className:C==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":S[S.length-1].slot,"data-opening_hour":S[S.length-1].opening_hour_id,"data-start":S[S.length-1].slot.split("-")[0],"data-end":S[S.length-1].slot.split("-")[1],"data-value_start":S[S.length-1].slot.split("-")[0],"data-value_end":S[S.length-1].slot.split("-")[1],disabled:u,children:S[S.length-1].slot})})]})]}):null,m.jsx("div",{children:_&&S.length>=1?m.jsx("h6",{children:i.t("Seleziona altri orari")}):u?null:m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Me(_).format("DD/MM/YYYY")]})}),y.map((P,H)=>m.jsx("div",{className:"col-6",children:m.jsxs("button",{type:"button",id:"slot-"+H,onClick:oe,ref:z,className:C==="slot-"+H?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":P.date,"data-start":P.start_time,"data-end":P.end_time,"data-value_start":P.start_time,"data-value_end":P.end_time,"data-slots":P.start_time+"-"+P.end_time,"data-opening_hour":P.opening_hour,"data-min_duration":P.min_duration,disabled:P.slots_available==0,children:[P.start_time," - ",P.end_time]})},"slot-"+H)),u?m.jsxs("div",{className:"callout callout-highlight warning",children:[m.jsxs("div",{className:"callout-title",children:[m.jsx(ue.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),i.t("Attenzione")]}),m.jsxs("p",{children:[" ",i.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null]})}),m.jsx(ue.ModalFooter,{children:m.jsx(ue.Button,{color:"primary",onClick:()=>Ne(),disabled:!_||!g?.value_start,children:i.t("Conferma")})})]})]})};class br extends tt.ReactComponent{constructor(s,c,i){super(s,c,i)}static get builderInfo(){return{title:"Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:br.schema()}}static schema(){return tt.ReactComponent.schema({type:"calendar"})}static editForm=Dh;attachReact(s,c){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(kh,{ref:c,component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this}))}setValue(s){if(s)if(Array.isArray(s))this.selectedNextSlots=s,this.updateValue(s),this.shouldSetValue=!0;else if(typeof s=="object")this.date=s.date,this.slot=s.slot,this.meeting=s.meeting_id,this.meeting_expiration_time=null,this.opening_hour=s.opening_hour_id,this.calendar_id=s.calendar_id,this.updateValue(s),this.shouldSetValue=!0;else{let c=s.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),i=c[2].split("#");this.date=c[0],this.slot=c[1],this.meeting=i[1],this.meeting_expiration_time=null,this.opening_hour=i.length===3?i[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 s=this.meeting?this.meeting:"",c=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:s,opening_hour_id:c}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}}const Oh=[{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 = '"+Ee()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function Yh(...l){return tt.Components.baseEditForm([{key:"display",components:Oh}],...l)}function Ch({day:l,slot:s,i18next:c}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text-paragraph pl-4",children:[m.jsx("b",{children:l})," ",c.t("alle")," ",c.t("ore")," ",m.jsx("b",{children:s})]})})})})}function jh(l,s){if(!s||s.length===0)return;const c=s.map(I=>{const o=new Date(I.start);return(new Date(I.end)-o)/6e4}),i=Math.min(...c),M=c.reduce((I,o)=>I+o,0)/c.length;let x=0;i<=30&&i>15?x=M*1:i<=15?x=M*24:x=M*4,l.setOption("slotHeight",x),document.documentElement.style.setProperty("--slot-height",`${x}px`)}const qs={AVAILABILITY:{key:"availability_data_cache_",duration:10},SLOTS:{key:"availability_slots_cache_",duration:10},SUBMISSION:{key:"submission_cache_",duration:30}},Kr=(l,s,c)=>{const i={data:c,timestamp:Me().toISOString()};sessionStorage.setItem(s,JSON.stringify(i)),console.log(`✅ Cache salvato: ${l}`)},Xr=(l,s)=>{try{const c=sessionStorage.getItem(s);if(!c)return null;const i=JSON.parse(c),M=Me().diff(Me(i.timestamp),"minutes");return M>qs[l].duration?(sessionStorage.removeItem(s),console.log(`⏰ Cache scaduto: ${l}`),null):(console.log(`✅ Cache letto: ${l} (${M} minuti fa)`),i.data)}catch(c){return console.error(`Errore nel leggere il cache (${l}):`,c),null}},Zr=(l,...s)=>qs[l].key+btoa(s),vn="calendar_view_state",yn="calendar_view_date",Th=(l,s)=>{try{sessionStorage.setItem(vn,l),sessionStorage.setItem(yn,s||new Date().toISOString())}catch(c){console.error("Errore nel salvare lo stato della view:",c)}},Ph=()=>{try{const l=sessionStorage.getItem(vn),s=sessionStorage.getItem(yn);return{viewType:l||"timeGridWeek",date:s?new Date(s):new Date}}catch(l){return console.error("Errore nel leggere lo stato della view:",l),{viewType:"timeGridWeek",date:new Date}}},Hs=()=>{try{sessionStorage.removeItem(vn),sessionStorage.removeItem(yn)}catch(l){console.error("Errore nel pulire lo stato della view:",l)}},Di=hn.Formio.Components.components.field,Nh=({component:l,current:s,onChange:c,i18next:i})=>{const[M,x]=G.useState(null),[I,o]=G.useState(null),[y,r]=G.useState([]),[u,h]=G.useState(!1),[f,p]=G.useState(!1),[g,Y]=G.useState(null),[_,k]=G.useState([]),[C,j]=G.useState([]),[F,R]=G.useState([]),[O,v]=G.useState(null),[T,w]=G.useState(null),[S,V]=G.useState(null),E=G.useRef(null),A=G.useRef(null);i.language,he.locale(i.language),Me.locale(i.language);function z($){if(!$||$.length===0)return null;const J=$.map(H=>({start:H.start_time,end:H.end_time})),X=J.reduce((H,N)=>N.start<H?N.start:H,J[0].start),P=J.reduce((H,N)=>N.end>H?N.end:H,J[0].end);return{earliestStartTime:X,latestEndTime:P}}function B($){const J=$.map(H=>he(H.date).isoWeekday()),P=[1,2,3,4,5,6,7].filter(H=>!J.includes(H));P.length>0?A.current.setOption("hiddenDays",P):A.current.setOption("hiddenDays",[])}function ee($,J,X){const P=new URL($),N=`${P.pathname.split("/").slice(0,4).join("/")}/${J}/${X}`;return`${P.origin}${N}${P.search}`}function ie($,J,X){const P=new URL($),N=`${P.pathname.split("/").slice(0,4).join("/")}`;return`${P.origin}${N}${P.search}&from_to=${J}&to_date=${X}`}function re($,J,X){return`${Ee()}/api/availabilities/${$}/${J}?calendar_ids=${X}&available=true`}const fe=$=>{R([]),j([]),c({}),$&&j(M.filter(J=>J.date.startsWith($)))},te=async($,J)=>{const X=JSON.parse($),P=Zr("SLOTS",X.date,X.calendar_ids);if(J==="manual")R([]),V(null),Y(null),c({});else{const H=Xr("SLOTS",P);if(H){R(H);return}}try{const H=await window.FormioHelper.anonymousCall(`availabilities/${X.date}?calendar_ids=${X.calendar_ids}`);Kr("SLOTS",P,H.data),R(H.data)}catch(H){console.error("Errore nel caricamento degli slot:",H),He.fire({icon:"error",title:i.t("Errore"),text:i.t("Errore nel caricamento degli orari")})}},de=$=>{const J=JSON.parse($),X={status:6,calendar:J.calendar_id,opening_hour:J.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Me(`${J.date}T${J.start_time}`).toISOString(),to_time:Me(`${J.date}T${J.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:s?.data?.service_data?.id,calendar_group_office_id:s?.data?.user_group?.id,calendar_group_place_id:s?.data?.place?.id};window.FormioHelper.authenticatedRequest(s?.dataValue?.id?"PATCH":"POST",s?.dataValue?.id?`meetings/${s.dataValue.id}`:"meetings",X).then(P=>{Y({day:Me(J.date).format("dddd, DD MMMM YYYY"),startDate:J.start_time,endDate:J.end_time}),c(P?.id?P:P?{...P,id:s.dataValue.id}:s.dataValue.id?{...X,id:s.dataValue.id}:{...X})}).catch(P=>{console.error(P),P.status===400&&P?.response?.data?.type==="validation_error"?He.fire({title:"",html:"<p>"+i.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):He.fire({title:"",html:"<p>"+P+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=$=>{const J=new Set,X=[];return $.forEach(P=>{const H=Me(P.date),N=H.format("YYYY-MM");J.has(N)||(J.add(N),X.push({value:N,label:H.format("MMMM YYYY").replace(/^\w/,W=>W.toUpperCase())}))}),X},me=async()=>{const $=s?.root?.data?.place?.merge_availabilities?s?.root?.data?.place?.merged_availabilities_link:null,J=he().format("YYYY-MM-DD"),X=he().add(1,"month").format("YYYY-MM-DD"),P=s?.root?.data?.place?.calendars[0]?.id||null,H=$?ie($,J,X):re(J,X,P),N=Zr("AVAILABILITY",H),W=Xr("AVAILABILITY",N);if(W){x(W),k(ve(W));return}else c({});h(!0);try{const q=await window.FormioHelper.fetchAPIUrlLimit(H);if(h(!1),!q?.length){He.fire({icon:"warning",title:i.t("warning"),html:i.t("no_meetings")});return}Kr("AVAILABILITY",N,q),x(q),k(ve(q))}catch(q){h(!1),console.error("Errore nel caricamento disponibilità:",q)}};G.useEffect(()=>{if(M?.length){const $=s?.dataValue??s?.getValue();if($?.from_time&&$?.to_time&&!Me().isAfter($?.draft_expiration)){const J=Me($.from_time).format("YYYY-MM");v(J),J&&j&&(j(M.filter(X=>X.date.startsWith(J))),w(Me($.from_time).format("YYYY-MM-DD")))}else $?.draft_expiration&&Me().isAfter($?.draft_expiration)&&He.fire({icon:"warning",title:i.t("warning"),html:i.t("expired_meeting")})}},[M]),G.useEffect(()=>{const $=s?.dataValue??s?.getValue();if(!_.length||O||$?.from_time||$?.to_time)return;const J=_[0];J&&(v(J.value),fe(J.value))},[_,O,s?.dataValue]),G.useEffect(()=>{if(T&&f===!1){const $=s?.dataValue??s?.getValue();te(JSON.stringify({date:T,calendar_ids:$.calendar.id}))}},[T]);const oe=()=>window.innerWidth>768?"timeGridWeek":"timeGridDay";G.useEffect(()=>{const $=()=>{const J=A.current;if(!J)return;const X=oe(),P=J.getView().type;X!==P&&J.setOption("view",X)};return window.addEventListener("resize",$),()=>window.removeEventListener("resize",$)},[]),G.useEffect(()=>{const $=s?.dataValue??s?.getValue();F?.length&&$?.from_time&&(V(Me($.from_time).format("HH:mm")+" - "+Me($.to_time).format("HH:mm")),Y({day:Me($.from_time).format("dddd D MMM YYYY"),startDate:Me($.from_time).format("HH:mm"),endDate:Me($.to_time).format("HH:mm")}))},[F]);const Z=()=>{const $=Ph();A.current=li.createCalendar(E.current,[li.TimeGrid],{events:[],buttonText:{today:i.t("Oggi")},allDaySlot:!1,firstDay:1,date:$.date,slotEventOverlap:!1,view:oe(),height:"400px",views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:J=>{Th(J.view.type,J.start)},eventClick({event:J,el:X}){document.querySelectorAll(".ec-event").forEach(se=>{se.classList.remove("highlighted-event")}),X.classList.add("highlighted-event");const P=new Date(J.start),H=new Date(J.end),N=P.toLocaleDateString("it-IT",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),W=P.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),q=H.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),ce={status:6,calendar:J.extendedProps.calendar_id,opening_hour:J.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:P,to_time:H,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:s?.data?.service_data?.id,calendar_group_office_id:s?.data?.user_group?.id,calendar_group_place_id:s?.data?.place?.id};window.FormioHelper.authenticatedRequest(s?.dataValue?.id?"PATCH":"POST",s?.dataValue?.id?`meetings/${s.dataValue.id}`:"meetings",ce).then(se=>{let Pe;!se||se===""?Pe={...ce,code:null,id:s?.dataValue?.id}:typeof se=="object"&&(Pe=se),Y({day:N,startDate:W,endDate:q}),c(Pe)}).catch(se=>{console.error(se),se.status===400&&se?.response?.data?.type==="validation_error"?He.fire({title:"",html:"<p>"+i.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):He.fire({title:"",html:"<p>"+se+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:Ne,eventDidMount:J=>{const{event:X,el:P}=J,H=X.extendedProps;P.setAttribute("data-event-id",X.id+"-"+H.date+"-"+H.start_time)},loading:J=>{h(J)}})},Ne=$=>{s?.root?.data?.place&&A.current.setOption("eventSources",[{events:Ie}])};async function Ie($,J,X){try{A.current.setOption("events",[]);const P=he($.start).format("YYYY-MM-DD"),H=new Date($.end);H.setDate(H.getDate()-1);const N=he(H).format("YYYY-MM-DD"),W=null,q=s?.root?.data?.place?.merge_availabilities?s?.root?.data?.place?.merged_availabilities_link:null,ce=q?ee(q,P,N):re(P,N,W),se=Zr("AVAILABILITY",ce),Pe=Xr("AVAILABILITY",se);let ge;if(Pe?(ge=Pe,h(!1)):(ge=await window.FormioHelper.fetchAPIUrlLimit(ce),Kr("AVAILABILITY",se,ge)),!ge?.length){J([]),He.fire({icon:"warning",title:i.t("warning"),html:i.t("no_meetings")});return}const _e=ge.map(Re=>({id:Re.opening_hour_id,allDay:!1,start:`${Re.date}T${Re.start_time}:00`,end:`${Re.date}T${Re.end_time}:00`,title:`${Re.start_time} - ${Re.end_time}`,editable:!1,display:"auto",color:"#ebeef0",textColor:"#000",className:"event-slot",extendedProps:{...Re}})),$e=z(ge);A.current.setOption("slotMinTime",$e.earliestStartTime),A.current.setOption("slotMaxTime",$e.latestEndTime),B(ge),jh(A.current,_e),J(_e),setTimeout(()=>{Ce(_e)},500)}catch(P){console.error("Errore nel caricamento disponibilità:",P),X?.(P)}}G.useEffect(()=>{let $,J=!1;async function X(){try{if(await window.FormioInstance?.formReady,J)return;if(!E.current){console.warn("Elemento calendario non trovato");return}const P=s?.dataValue??s?.getValue();P&&P?.draft_expiration&&Me().isAfter(P.draft_expiration)&&(c({}),Hs()),s?.data?.service_data?.view_type==="calendar"?A?.current||Z():s?.data?.service_data?.view_type==="select"?me():alert(i.t("Il componente non è configurato per la visualizzazione a calendario"))}catch(P){console.error("Errore durante l'inizializzazione del calendario:",P)}}return $=setTimeout(X,500),()=>{J=!0,$&&clearTimeout($),A.current&&(E.current?.destroy?.(),A.current=null)}},[s?.root?.data?.place]);function Ce($){const J=s?.dataValue;if(!J?.from_time)return;const X=Me(J.from_time).format("DD-MM-YYYY HH:mm"),P=Me(J.to_time).format("DD-MM-YYYY HH:mm"),H=$.find(W=>Me(W.start).format("DD-MM-YYYY HH:mm")===X&&Me(W.end).format("DD-MM-YYYY HH:mm")===P);if(!H)return;const N=document.querySelector(`.ec-event[data-event-id="${H.id}-${Me(J?.from_time).format("YYYY-MM-DD")}-${Me(J?.from_time).format("HH:mm")}"]`);N&&(N.classList.add("highlighted-event"),N.scrollIntoView({behavior:"smooth",block:"center"}),Y({day:Me(J?.from_time).format("dddd, DD MMMM YYYY"),startDate:Me(J?.from_time).format("HH:mm"),endDate:Me(J?.to_time).format("HH:mm")}))}const Oe=({day:$,startDate:J,endDate:X})=>m.jsx("div",{className:"mt-3",children:m.jsxs("div",{className:"row align-items-center gy-3",children:[m.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[m.jsx("div",{className:"text-paragraph-small",children:i.t("Data")}),m.jsx("p",{className:"data-text",children:m.jsx("strong",{children:$})})]}),m.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[m.jsx("div",{className:"text-paragraph-small",children:i.t("Ora")}),m.jsx("p",{className:"data-text",children:m.jsxs("strong",{children:[J," - ",X]})})]})]})});return G.useEffect(()=>{document.querySelector(".formio-read-only")&&f===!1?p(!0):(s?.data?.service_data?.view_type==="select"?me():s?.data?.service_data?.view_type==="calendar"&&Z(),p(!1))},[]),G.useEffect(()=>{f&&setTimeout(()=>{const $=s?.dataValue??s?.getValue();console.log("savedValue",$,f),$&&o($)},500)},[f]),m.jsx(m.Fragment,{children:f&&I?m.jsxs("div",{className:"mx-2",children:[m.jsxs("p",{className:"text-paragraph",children:[i.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:m.jsx(Ch,{day:Me(I.from_time).format("dddd D MMM YYYY"),i18next:i,slot:`${Me(I.from_time).format("HH:mm")} - ${Me(I.to_time).format("HH:mm")}`})})})})]}):m.jsxs("div",{className:"",children:[m.jsx("div",{ref:E}),_.length>0?m.jsxs(m.Fragment,{children:[m.jsxs(ue.Select,{label:"Mese",id:"selectMonthYear",onChange:fe,children:[m.jsx("option",{value:"",children:i.t("Scegli un'opzione")}),_.map($=>m.jsx("option",{value:$.value,selected:$.value===O,children:$.label},$.value))]}),m.jsxs(ue.Select,{label:"Giorno",id:"selectDay",onChange:$=>te($,"manual"),disabled:C.length===0,children:[m.jsx("option",{value:"",children:i.t("Scegli un'opzione")}),C.map($=>m.jsx("option",{value:JSON.stringify($),selected:$.date===T,children:Me($.date).format("dddd,DD MMMM YYYY")},$.date))]}),m.jsxs(ue.Select,{label:"Orario",id:"selectSlot",onChange:de,disabled:F.length===0,children:[m.jsx("option",{value:"",children:i.t("Scegli un'opzione")}),F.map($=>m.jsx("option",{value:JSON.stringify($),selected:$.start_time+" - "+$.end_time===S,children:$.start_time+" - "+$.end_time},$.start_time+" - "+$.end_time))]})]}):null,g?Oe({day:g.day,startDate:g.startDate,endDate:g.endDate}):null,u?m.jsx("div",{className:"d-flex align-items-center justify-content-center position-absolute-center",children:m.jsx(ue.Spinner,{active:!0})}):null]})})};class wr extends Di{constructor(s,c,i){super(s,c,i)}static get builderInfo(){return{title:"Calendar Advanced",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:wr.schema()}}static schema(){return Di.schema({type:"calendar-advanced"})}static editForm=Yh;attach(s,c){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(Nh,{ref:c,component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this}))}setValue(s){s&&(this.updateValue(s),this.shouldSetValue=!0)}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}}const Rh=[{key:"defaultValue",ignore:!0}],Eh=[{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"]]}}}],Ah=[{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:`{
|
|
80
80
|
"withCredentials": true,
|
|
81
81
|
"headers": {
|
|
82
82
|
"Authorization": "Basic <key>"
|
|
83
83
|
}
|
|
84
|
-
}`,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}],Ih=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function Fh(...l){return tt.Components.baseEditForm([{key:"display",components:Eh},{key:"data",components:Rh},{label:"File",key:"file",weight:5,components:Ah},{key:"validation",components:Ih}],...l)}var Qr,Di;function yn(){if(Di)return Qr;Di=1;var l=Array.isArray;return Qr=l,Qr}var ea,ki;function Vh(){if(ki)return ea;ki=1;var l=typeof fr=="object"&&fr&&fr.Object===Object&&fr;return ea=l,ea}var ta,Oi;function _n(){if(Oi)return ta;Oi=1;var l=Vh(),s=typeof self=="object"&&self&&self.Object===Object&&self,c=l||s||Function("return this")();return ta=c,ta}var ra,Yi;function bn(){if(Yi)return ra;Yi=1;var l=_n(),s=l.Symbol;return ra=s,ra}var aa,Ci;function zh(){if(Ci)return aa;Ci=1;var l=bn(),s=Object.prototype,c=s.hasOwnProperty,i=s.toString,M=l?l.toStringTag:void 0;function x(I){var o=c.call(I,M),y=I[M];try{I[M]=void 0;var r=!0}catch{}var u=i.call(I);return r&&(o?I[M]=y:delete I[M]),u}return aa=x,aa}var na,ji;function Lh(){if(ji)return na;ji=1;var l=Object.prototype,s=l.toString;function c(i){return s.call(i)}return na=c,na}var ia,Ti;function $s(){if(Ti)return ia;Ti=1;var l=bn(),s=zh(),c=Lh(),i="[object Null]",M="[object Undefined]",x=l?l.toStringTag:void 0;function I(o){return o==null?o===void 0?M:i:x&&x in Object(o)?s(o):c(o)}return ia=I,ia}var sa,Pi;function Wh(){if(Pi)return sa;Pi=1;function l(s){return s!=null&&typeof s=="object"}return sa=l,sa}var oa,Ni;function wn(){if(Ni)return oa;Ni=1;var l=$s(),s=Wh(),c="[object Symbol]";function i(M){return typeof M=="symbol"||s(M)&&l(M)==c}return oa=i,oa}var la,Ri;function qh(){if(Ri)return la;Ri=1;var l=yn(),s=wn(),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function M(x,I){if(l(x))return!1;var o=typeof x;return o=="number"||o=="symbol"||o=="boolean"||x==null||s(x)?!0:i.test(x)||!c.test(x)||I!=null&&x in Object(I)}return la=M,la}var ua,Ei;function Sn(){if(Ei)return ua;Ei=1;function l(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}return ua=l,ua}var ca,Ai;function Hh(){if(Ai)return ca;Ai=1;var l=$s(),s=Sn(),c="[object AsyncFunction]",i="[object Function]",M="[object GeneratorFunction]",x="[object Proxy]";function I(o){if(!s(o))return!1;var y=l(o);return y==i||y==M||y==c||y==x}return ca=I,ca}var da,Ii;function $h(){if(Ii)return da;Ii=1;var l=_n(),s=l["__core-js_shared__"];return da=s,da}var ha,Fi;function Bh(){if(Fi)return ha;Fi=1;var l=$h(),s=(function(){var i=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function c(i){return!!s&&s in i}return ha=c,ha}var fa,Vi;function Uh(){if(Vi)return fa;Vi=1;var l=Function.prototype,s=l.toString;function c(i){if(i!=null){try{return s.call(i)}catch{}try{return i+""}catch{}}return""}return fa=c,fa}var ma,zi;function Gh(){if(zi)return ma;zi=1;var l=Hh(),s=Bh(),c=Sn(),i=Uh(),M=/[\\^$.*+?()[\]{}|]/g,x=/^\[object .+?Constructor\]$/,I=Function.prototype,o=Object.prototype,y=I.toString,r=o.hasOwnProperty,u=RegExp("^"+y.call(r).replace(M,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(f){if(!c(f)||s(f))return!1;var p=l(f)?u:x;return p.test(i(f))}return ma=h,ma}var pa,Li;function Jh(){if(Li)return pa;Li=1;function l(s,c){return s?.[c]}return pa=l,pa}var ga,Wi;function Mn(){if(Wi)return ga;Wi=1;var l=Gh(),s=Jh();function c(i,M){var x=s(i,M);return l(x)?x:void 0}return ga=c,ga}var va,qi;function Sr(){if(qi)return va;qi=1;var l=Mn(),s=l(Object,"create");return va=s,va}var ya,Hi;function Kh(){if(Hi)return ya;Hi=1;var l=Sr();function s(){this.__data__=l?l(null):{},this.size=0}return ya=s,ya}var _a,$i;function Xh(){if($i)return _a;$i=1;function l(s){var c=this.has(s)&&delete this.__data__[s];return this.size-=c?1:0,c}return _a=l,_a}var ba,Bi;function Zh(){if(Bi)return ba;Bi=1;var l=Sr(),s="__lodash_hash_undefined__",c=Object.prototype,i=c.hasOwnProperty;function M(x){var I=this.__data__;if(l){var o=I[x];return o===s?void 0:o}return i.call(I,x)?I[x]:void 0}return ba=M,ba}var wa,Ui;function Qh(){if(Ui)return wa;Ui=1;var l=Sr(),s=Object.prototype,c=s.hasOwnProperty;function i(M){var x=this.__data__;return l?x[M]!==void 0:c.call(x,M)}return wa=i,wa}var Sa,Gi;function ef(){if(Gi)return Sa;Gi=1;var l=Sr(),s="__lodash_hash_undefined__";function c(i,M){var x=this.__data__;return this.size+=this.has(i)?0:1,x[i]=l&&M===void 0?s:M,this}return Sa=c,Sa}var Ma,Ji;function tf(){if(Ji)return Ma;Ji=1;var l=Kh(),s=Xh(),c=Zh(),i=Qh(),M=ef();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=c,x.prototype.has=i,x.prototype.set=M,Ma=x,Ma}var xa,Ki;function rf(){if(Ki)return xa;Ki=1;function l(){this.__data__=[],this.size=0}return xa=l,xa}var Da,Xi;function Bs(){if(Xi)return Da;Xi=1;function l(s,c){return s===c||s!==s&&c!==c}return Da=l,Da}var ka,Zi;function Mr(){if(Zi)return ka;Zi=1;var l=Bs();function s(c,i){for(var M=c.length;M--;)if(l(c[M][0],i))return M;return-1}return ka=s,ka}var Oa,Qi;function af(){if(Qi)return Oa;Qi=1;var l=Mr(),s=Array.prototype,c=s.splice;function i(M){var x=this.__data__,I=l(x,M);if(I<0)return!1;var o=x.length-1;return I==o?x.pop():c.call(x,I,1),--this.size,!0}return Oa=i,Oa}var Ya,es;function nf(){if(es)return Ya;es=1;var l=Mr();function s(c){var i=this.__data__,M=l(i,c);return M<0?void 0:i[M][1]}return Ya=s,Ya}var Ca,ts;function sf(){if(ts)return Ca;ts=1;var l=Mr();function s(c){return l(this.__data__,c)>-1}return Ca=s,Ca}var ja,rs;function of(){if(rs)return ja;rs=1;var l=Mr();function s(c,i){var M=this.__data__,x=l(M,c);return x<0?(++this.size,M.push([c,i])):M[x][1]=i,this}return ja=s,ja}var Ta,as;function lf(){if(as)return Ta;as=1;var l=rf(),s=af(),c=nf(),i=sf(),M=of();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=c,x.prototype.has=i,x.prototype.set=M,Ta=x,Ta}var Pa,ns;function uf(){if(ns)return Pa;ns=1;var l=Mn(),s=_n(),c=l(s,"Map");return Pa=c,Pa}var Na,is;function cf(){if(is)return Na;is=1;var l=tf(),s=lf(),c=uf();function i(){this.size=0,this.__data__={hash:new l,map:new(c||s),string:new l}}return Na=i,Na}var Ra,ss;function df(){if(ss)return Ra;ss=1;function l(s){var c=typeof s;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?s!=="__proto__":s===null}return Ra=l,Ra}var Ea,os;function xr(){if(os)return Ea;os=1;var l=df();function s(c,i){var M=c.__data__;return l(i)?M[typeof i=="string"?"string":"hash"]:M.map}return Ea=s,Ea}var Aa,ls;function hf(){if(ls)return Aa;ls=1;var l=xr();function s(c){var i=l(this,c).delete(c);return this.size-=i?1:0,i}return Aa=s,Aa}var Ia,us;function ff(){if(us)return Ia;us=1;var l=xr();function s(c){return l(this,c).get(c)}return Ia=s,Ia}var Fa,cs;function mf(){if(cs)return Fa;cs=1;var l=xr();function s(c){return l(this,c).has(c)}return Fa=s,Fa}var Va,ds;function pf(){if(ds)return Va;ds=1;var l=xr();function s(c,i){var M=l(this,c),x=M.size;return M.set(c,i),this.size+=M.size==x?0:1,this}return Va=s,Va}var za,hs;function gf(){if(hs)return za;hs=1;var l=cf(),s=hf(),c=ff(),i=mf(),M=pf();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=c,x.prototype.has=i,x.prototype.set=M,za=x,za}var La,fs;function vf(){if(fs)return La;fs=1;var l=gf(),s="Expected a function";function c(i,M){if(typeof i!="function"||M!=null&&typeof M!="function")throw new TypeError(s);var x=function(){var I=arguments,o=M?M.apply(this,I):I[0],y=x.cache;if(y.has(o))return y.get(o);var r=i.apply(this,I);return x.cache=y.set(o,r)||y,r};return x.cache=new(c.Cache||l),x}return c.Cache=l,La=c,La}var Wa,ms;function yf(){if(ms)return Wa;ms=1;var l=vf(),s=500;function c(i){var M=l(i,function(I){return x.size===s&&x.clear(),I}),x=M.cache;return M}return Wa=c,Wa}var qa,ps;function _f(){if(ps)return qa;ps=1;var l=yf(),s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,i=l(function(M){var x=[];return M.charCodeAt(0)===46&&x.push(""),M.replace(s,function(I,o,y,r){x.push(y?r.replace(c,"$1"):o||I)}),x});return qa=i,qa}var Ha,gs;function bf(){if(gs)return Ha;gs=1;function l(s,c){for(var i=-1,M=s==null?0:s.length,x=Array(M);++i<M;)x[i]=c(s[i],i,s);return x}return Ha=l,Ha}var $a,vs;function wf(){if(vs)return $a;vs=1;var l=bn(),s=bf(),c=yn(),i=wn(),M=l?l.prototype:void 0,x=M?M.toString:void 0;function I(o){if(typeof o=="string")return o;if(c(o))return s(o,I)+"";if(i(o))return x?x.call(o):"";var y=o+"";return y=="0"&&1/o==-1/0?"-0":y}return $a=I,$a}var Ba,ys;function Sf(){if(ys)return Ba;ys=1;var l=wf();function s(c){return c==null?"":l(c)}return Ba=s,Ba}var Ua,_s;function Us(){if(_s)return Ua;_s=1;var l=yn(),s=qh(),c=_f(),i=Sf();function M(x,I){return l(x)?x:s(x,I)?[x]:c(i(x))}return Ua=M,Ua}var Ga,bs;function Gs(){if(bs)return Ga;bs=1;var l=wn();function s(c){if(typeof c=="string"||l(c))return c;var i=c+"";return i=="0"&&1/c==-1/0?"-0":i}return Ga=s,Ga}var Ja,ws;function Mf(){if(ws)return Ja;ws=1;var l=Us(),s=Gs();function c(i,M){M=l(M,i);for(var x=0,I=M.length;i!=null&&x<I;)i=i[s(M[x++])];return x&&x==I?i:void 0}return Ja=c,Ja}var Ka,Ss;function xf(){if(Ss)return Ka;Ss=1;var l=Mf();function s(c,i,M){var x=c==null?void 0:l(c,i);return x===void 0?M:x}return Ka=s,Ka}var Df=xf();const Ms=hn(Df);var Xa,xs;function kf(){if(xs)return Xa;xs=1;var l=Mn(),s=(function(){try{var c=l(Object,"defineProperty");return c({},"",{}),c}catch{}})();return Xa=s,Xa}var Za,Ds;function Of(){if(Ds)return Za;Ds=1;var l=kf();function s(c,i,M){i=="__proto__"&&l?l(c,i,{configurable:!0,enumerable:!0,value:M,writable:!0}):c[i]=M}return Za=s,Za}var Qa,ks;function Yf(){if(ks)return Qa;ks=1;var l=Of(),s=Bs(),c=Object.prototype,i=c.hasOwnProperty;function M(x,I,o){var y=x[I];(!(i.call(x,I)&&s(y,o))||o===void 0&&!(I in x))&&l(x,I,o)}return Qa=M,Qa}var en,Os;function Cf(){if(Os)return en;Os=1;var l=9007199254740991,s=/^(?:0|[1-9]\d*)$/;function c(i,M){var x=typeof i;return M=M??l,!!M&&(x=="number"||x!="symbol"&&s.test(i))&&i>-1&&i%1==0&&i<M}return en=c,en}var tn,Ys;function jf(){if(Ys)return tn;Ys=1;var l=Yf(),s=Us(),c=Cf(),i=Sn(),M=Gs();function x(I,o,y,r){if(!i(I))return I;o=s(o,I);for(var u=-1,h=o.length,f=h-1,p=I;p!=null&&++u<h;){var g=M(o[u]),Y=y;if(g==="__proto__"||g==="constructor"||g==="prototype")return I;if(u!=f){var _=p[g];Y=r?r(_,g,p):void 0,Y===void 0&&(Y=i(_)?_:c(o[u+1])?[]:{})}l(p,g,Y),p=p[g]}return I}return tn=x,tn}var rn,Cs;function Tf(){if(Cs)return rn;Cs=1;var l=jf();function s(c,i,M){return c==null?c:l(c,i,M)}return rn=s,rn}var Pf=Tf();const js=hn(Pf);document.documentElement.lang.toString();class Nf{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=Ee()}async getSessionAuthToken(){let s=this;await $t.get(s.basePath+"/api/session-auth").then(c=>{s.token=c.data.token}).catch(c=>{He.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let s=this;return new Promise(async(c,i)=>{er("auth-token")?c({token:er("auth-token")}):await $t.get(s.basePath+"/api/session-auth?with-cookie=true",{withCredentials:!0,headers:{"Content-Type":"application/json; charset=utf-8"}}).then(M=>{const x=Sc.jwtDecode(M.data.token);x.exp&&Sh("auth-token",M.data.token,x.exp)}).catch(M=>{console.log(M)})})}getToken(){return this.token}execAuthenticatedCall(s){this.token?s(this.token):this.getSessionAuthTokenPromise().then(c=>{this.token=c.token,s(this.token)})}}const Ts=dn.Formio.Components.components.file;let un=null;document.querySelector("widget-formio")!==null&&(un=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const Rf=({component:l,current:s,onChange:c,i18next:i})=>{const[M,x]=G.useState([]),[I,o]=G.useState(new Map),[y,r]=G.useState(!1),u=new Nf;G.useEffect(()=>{u.getSessionAuthTokenPromise()},[]);const h=(w,S)=>{o(V=>{const E=new Map(V);return E.set(w,{...S,progress:Number(S?.progress)||0}),E})};function f(w){return w.size>(v(l.fileMaxSize)||v("1GB"))?{code:"size-files",message:`${i.t("I file non possono superare le dimensioni di")} ${l.fileMaxSize?l.fileMaxSize:"1GB"}`}:M.length>=(l.maxFiles?parseInt(l.maxFiles):l.multiple?100:1)?{code:"too-many-files",message:`${i.t("Puoi caricare massimo ")} ${l.maxFiles||100} ${i.t("file")}`}:w.size<v(l.fileMinSize)?{code:"file-too-small",message:`${i.t("I file devono avare una dimensione superiore a ")} ${l.fileMinSize}`}:null}function p(){if(l.filePattern){const S=l.filePattern.split(",").map(V=>V.trim()).filter(Boolean).reduce((V,E)=>{const A=E.startsWith(".")?E:`.${E}`,z=wc.getType(A);return z&&(V[z]||(V[z]=[]),V[z].push(A)),V},{});return Object.keys(S).length?S:void 0}else return!0}const g=w=>{let S={};return S.originalName=w.originalName?w.originalName:w.name,S.name=w.name,S.url=w.url,S.data=w.data,S.signature_validation=w.signature_validation,S.mime_type=w.mime_type,S.storage="url",S.size=w.size,S},{getRootProps:Y,getInputProps:_,fileRejections:k,isDragActive:C,open:j}=bc.useDropzone({onDrop:w=>{w.map(S=>{O(S).then(V=>{})})},maxFiles:l.maxFiles?parseInt(l.maxFiles)-M.length:l.multiple?100:1,validator:f,accept:p()}),F=w=>{const S=Ee()+"/api/attachments/"+w.data.id;fetch(S,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${er("auth-token")}`},strictErrors:!0}).then(()=>{x(V=>{let E=V.filter(A=>A.data.id!==w.data.id);return c(E),E})}).catch(V=>{He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(V)})},R=()=>{const w=typeof s?.getCurrentValue=="function"?s.getCurrentValue():s?.dataValue;w?.length>0&&(x(w),setTimeout(()=>{c(w)},100))};G.useEffect(()=>{document.querySelector(".formio-read-only")&&y===!1?(r(!0),setTimeout(()=>{R()},1e3)):(r(!1),setTimeout(()=>{R()},1e3))},[]);async function O(w){let S;const V=Ee()+"/it/upload";let E={mime_type:w.type,name:w.name,original_filename:w.name,protocol_required:l.protocol_required,size:w.size};return await $t.post(V,E,{maxContentLength:1/0,maxBodyLength:1/0}).then(async A=>(S=A.data.id,w.url=Ee()+"/it/allegati/"+S,w.storage="url",w.mime_type=w.type,w.protocol_required=l.protocol_required,w.data={...A.data,baseUrl:Ee()+"/it/allegati/"+S},h(S,w),await $t.put(A.data.uri,w,{onUploadProgress:z=>{let B=Math.round(z.loaded*100/z.total);o(ee=>{const ie=new Map(ee),re=w;return re.progress=parseInt(B),ie.has(S)&&ie.set(S,re),ie})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async z=>{const B=/\\|"/gi,ee=z.headers.etag.replace(B,"")||null;return await $t.put(Ee()+"/it/upload/"+S,{file_hash:ee,check_signature:l.check_signature}).then(async ie=>{o(te=>{const de=new Map(te);return de.delete(S),de});let re=s.dataValue||[],fe=null;if(x(te=>{const de=[...te,g(w)];return fe=de.length-1,c(de),de}),l.check_signature&&ie.data.url&&un)return await $t.post(un,{url:ie.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(te=>{w.signature_validation=te.data.sign,re[fe].signature_validation=te.data.sign}).catch(te=>{re[fe].signature_validation="File validation error: "+te});o(te=>{const de=new Map(te);return de.delete(S),de})}).catch(ie=>{o(re=>{const fe=new Map(re);return fe.delete(S),fe}),console.log(ie),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(z=>{o(B=>{const ee=new Map(B);return ee.delete(S),ee}),console.log(z),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(A=>{console.log(A),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),o(z=>{const B=new Map(z);return B.delete(S),B})})}function v(w){if(typeof w=="string"){if(w.search(/kb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024);if(w.search(/mb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024*1024);if(w.search(/gb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024*1024*1024);if(w.search(/b/i)===w.length-1||w.search(/s/i)===w.length-1)return parseFloat(w.substring(0,w.length-1));if(w.search(/m/i)===w.length-1)return parseFloat(w.substring(0,w.length-1)*60);if(w.search(/h/i)===w.length-1)return parseFloat(w.substring(0,w.length-1)*3600)}return w}function T(w,S=2){if(!+w)return"0 Bytes";const V=1024,E=S<0?0:S,A=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],z=Math.floor(Math.log(w)/Math.log(V));return`${parseFloat((w/Math.pow(V,z)).toFixed(E))} ${A[z]}`}return s.conditionallyHidden()||s.visible===!1?null:m.jsx(m.Fragment,{children:y?m.jsx("div",{children:m.jsxs("ul",{className:"upload-file-list",children:[M.map((w,S)=>m.jsxs("li",{className:"upload-file success mw-100",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("File caricato:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]})]},w.size+S)),M.length<1&&m.jsxs("li",{className:"upload-file text-secondary mw-100",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),m.jsx("p",{children:i.t("Nessun elemento")})]})]})}):m.jsxs(m.Fragment,{children:[l.hideLabel||l.hidden?"":m.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${l.id}-${l.key}`,title:l.tooltip||void 0,children:[l.label,l.validate.required&&m.jsx("span",{className:"text-danger"}),l.tooltip&&m.jsx("i",{tabIndex:0,className:"bi bi-question-circle text-muted ms-1","data-tooltip":l.tooltip,"aria-expanded":"false"})]}),m.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${C?" dragover":""}`,style:{border:"dashed"},...Y({onClick:w=>w.stopPropagation()}),children:[m.jsx("input",{id:`${l.id}-${l.key}`,"aria-describedby":`file-uploader-description-${l.id}-${l.key}`,..._()}),m.jsxs("div",{className:`upload-dragdrop${C?" dragover":""}`,children:[m.jsx("div",{className:"ms-1 me-3",children:m.jsx(ue.Icon,{color:"secondary",icon:"it-upload",title:i.t("Carica file"),size:"_sm"})}),m.jsxs("div",{className:"upload-dragdrop-text",children:[m.jsx("div",{className:"h5",id:`file-uploader-description-${l.id}-${l.key}`,children:i.t("Trascina il file per caricarlo")}),m.jsxs("p",{className:"d-inline-flex",children:[i.t("oppure"),m.jsx(ue.Button,{tag:"input",type:"button",value:i.t("selezionalo dal dispositivo"),onClick:j,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),m.jsx("div",{dangerouslySetInnerHTML:{__html:As.sanitize(l.description||"")}}),m.jsxs("ul",{className:"upload-file-list my-0",children:[M.map((w,S)=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("File caricato:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]}),m.jsx(ue.Button,{className:"px-1",onClick:()=>F(w),children:m.jsx(ue.Icon,{title:`${i.t("Elimina file caricato")} ${w.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},w.size+S)),Array.from(I.entries()).map(([w,S])=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("Caricamento file:")}),S.name,m.jsx("span",{className:"upload-file-weight",children:T(S.size)})]}),m.jsx(ue.Progress,{value:Number(S?.progress)||0})]},w))]}),!!(k&&k.length)&&m.jsx("div",{className:"formio-error-wrapper",children:m.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:k.map(({file:w,errors:S},V)=>m.jsxs("li",{className:"upload-file error",children:[m.jsxs("div",{className:"upload-file-name-error-wrapper",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"error",icon:"it-error",title:"Icona file",size:"sm"}),m.jsxs("p",{className:"text-wrap error",children:[m.jsx("span",{className:"visually-hidden",children:i.t("Errore caricamento file:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]})]}),m.jsx("div",{children:S.map(E=>E.code==="file-invalid-type"?m.jsxs("p",{className:"text-wrap ms-0",children:[i.t("I file possono essere di tipo "),l.filePattern]}):E.code==="too-many-files"?m.jsxs("p",{className:"text-wrap ms-0",children:[i.t("Puoi caricare massimo ")," ",l.maxFiles?l.maxFiles:l.multiple?100:1," ",i.t("file")]}):m.jsx("p",{className:"text-wrap ms-0",children:E.message}))})]},w.size+V))})})]})})};class Dr extends Ts{constructor(s,c,i){super({...s,clearOnHide:!1},c,i),this.reactRef=null,this.lastRenderedVisible=void 0,this.rootComponent=null}static get builderInfo(){return{title:"File Sdc",group:"basic",icon:"bi bi-file-earmark-text",documentation:"",weight:70,schema:Dr.schema()}}get emptyValue(){return[]}init(){if(super.init(),this.component?.multiple&&!Array.isArray(this.getCurrentValue())){this.dataValue=[];const s=this.path||this.component?.key;s&&this.rootValue&&js(this.rootValue,s,[])}}static schema(){return Ts.schema({type:"sdcfile",modelType:"array"})}static editForm=Fh;renderReact(){if(this.rootComponent){if(this.builderMode)return super.render(this.renderTemplate("builderComponent",{component:this.component}));this.rootComponent.render(m.jsx(Rf,{component:this.component,current:this,onChange:s=>this.setValue(s,{modified:!0}),...this}))}}attach(s,c){return this.reactRef=c,this.rootComponent=Et.createRoot(s),this.lastRenderedVisible=this.visible,this.renderReact(),super.attach(s)}setValue(s,c={}){const i=this.normalizeValue(s,c),M=super.setValue(i,c),x=this.path||this.component?.key;if(x&&this.rootValue){const I=Ms(this.rootValue,x);this.isEqual(I,i)||js(this.rootValue,x,i)}return M}normalizeValue(s,c={}){const i=super.normalizeValue(s,c);return!this.component?.multiple||Array.isArray(i)?i:i==null||i===""?[]:[i]}detach(){return this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),super.detach()}getValue(){return this.getCurrentValue()}get validationValue(){return this.getCurrentValue()}getCurrentValue(){const s=super.getValue(),c=this.path||this.component?.key,i=c&&this.rootValue?Ms(this.rootValue,c):void 0;return this.component?.multiple?Array.isArray(s)&&s.length>0?s:Array.isArray(i)?i:[]:s??i??null}isEmpty(s=this.validationValue){return this.component?.multiple?!Array.isArray(s)||s.length===0:s==null||s===""}checkCondition(s,c){const i=super.checkCondition(s,c),M=this.visible;return this.lastRenderedVisible!==M&&(this.lastRenderedVisible=M,this.renderReact()),i}render(){const s=`<div ref="react-${this.id}"></div>`;return this.builderMode?super.render(this.renderTemplate("builderComponent",{html:s,component:this.component})):super.render(s)}}const Ef=[{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 Af(...l){return tt.Components.baseEditForm([{key:"display",components:Ef}],...l)}var gr={exports:{}},If=gr.exports,Ps;function Ff(){return Ps||(Ps=1,(function(l,s){(function(c,i){l.exports=i(G)})(If,(function(c){return(function(){var i={680:function(o){o.exports=c},8952:function(o,y,r){var u=r(4328),h=r(36),f=TypeError;o.exports=function(p){if(u(p))return p;throw new f(h(p)+" is not a function")}},2096:function(o,y,r){var u=r(2424),h=String,f=TypeError;o.exports=function(p){if(u(p))return p;throw new f("Can't set "+h(p)+" as a prototype")}},4764:function(o,y,r){var u=r(9764).charAt;o.exports=function(h,f,p){return f+(p?u(h,f).length:1)}},6100:function(o,y,r){var u=r(7e3),h=TypeError;o.exports=function(f,p){if(u(p,f))return f;throw new h("Incorrect invocation")}},3951:function(o,y,r){var u=r(1632),h=String,f=TypeError;o.exports=function(p){if(u(p))return p;throw new f(h(p)+" is not an object")}},2504:function(o,y,r){var u=r(4096),h=r(2495),f=r(3556),p=function(g){return function(Y,_,k){var C=u(Y),j=f(C);if(j===0)return!g&&-1;var F,R=h(k,j);if(g&&_!=_){for(;j>R;)if((F=C[R++])!=F)return!0}else for(;j>R;R++)if((g||R in C)&&C[R]===_)return g||R||0;return!g&&-1}};o.exports={includes:p(!0),indexOf:p(!1)}},3364:function(o,y,r){var u=r(8992),h=r(1664),f=r(5712),p=r(4356),g=r(3556),Y=r(2568),_=h([].push),k=function(C){var j=C===1,F=C===2,R=C===3,O=C===4,v=C===6,T=C===7,w=C===5||v;return function(S,V,E,A){for(var z,B,ee=p(S),ie=f(ee),re=g(ie),fe=u(V,E),te=0,de=A||Y,ve=j?de(S,re):F||T?de(S,0):void 0;re>te;te++)if((w||te in ie)&&(B=fe(z=ie[te],te,ee),C))if(j)ve[te]=B;else if(B)switch(C){case 3:return!0;case 5:return z;case 6:return te;case 2:_(ve,z)}else switch(C){case 4:return!1;case 7:_(ve,z)}return v?-1:R||O?O:ve}};o.exports={forEach:k(0),map:k(1),filter:k(2),some:k(3),every:k(4),find:k(5),findIndex:k(6),filterReject:k(7)}},953:function(o,y,r){var u=r(9957),h=r(9972),f=r(8504),p=h("species");o.exports=function(g){return f>=51||!u((function(){var Y=[];return(Y.constructor={})[p]=function(){return{foo:1}},Y[g](Boolean).foo!==1}))}},1496:function(o,y,r){var u=r(9957);o.exports=function(h,f){var p=[][h];return!!p&&u((function(){p.call(null,f||function(){return 1},1)}))}},6728:function(o,y,r){var u=r(3476),h=r(1432),f=TypeError,p=Object.getOwnPropertyDescriptor,g=u&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(Y){return Y instanceof TypeError}})();o.exports=g?function(Y,_){if(h(Y)&&!p(Y,"length").writable)throw new f("Cannot set read only .length");return Y.length=_}:function(Y,_){return Y.length=_}},6736:function(o,y,r){var u=r(1432),h=r(6072),f=r(1632),p=r(9972)("species"),g=Array;o.exports=function(Y){var _;return u(Y)&&(_=Y.constructor,(h(_)&&(_===g||u(_.prototype))||f(_)&&(_=_[p])===null)&&(_=void 0)),_===void 0?g:_}},2568:function(o,y,r){var u=r(6736);o.exports=function(h,f){return new(u(h))(f===0?0:f)}},8696:function(o,y,r){var u=r(3951),h=r(3112);o.exports=function(f,p,g,Y){try{return Y?p(u(g)[0],g[1]):p(g)}catch(_){h(f,"throw",_)}}},1888:function(o,y,r){var u=r(1664),h=u({}.toString),f=u("".slice);o.exports=function(p){return f(h(p),8,-1)}},4427:function(o,y,r){var u=r(16),h=r(4328),f=r(1888),p=r(9972)("toStringTag"),g=Object,Y=f((function(){return arguments})())==="Arguments";o.exports=u?f:function(_){var k,C,j;return _===void 0?"Undefined":_===null?"Null":typeof(C=(function(F,R){try{return F[R]}catch{}})(k=g(_),p))=="string"?C:Y?f(k):(j=f(k))==="Object"&&h(k.callee)?"Arguments":j}},9968:function(o,y,r){var u=r(5152),h=r(9252),f=r(9444),p=r(8352);o.exports=function(g,Y,_){for(var k=h(Y),C=p.f,j=f.f,F=0;F<k.length;F++){var R=k[F];u(g,R)||_&&u(_,R)||C(g,R,j(Y,R))}}},2272:function(o,y,r){var u=r(9957);o.exports=!u((function(){function h(){}return h.prototype.constructor=null,Object.getPrototypeOf(new h)!==h.prototype}))},3336:function(o){o.exports=function(y,r){return{value:y,done:r}}},3440:function(o,y,r){var u=r(3476),h=r(8352),f=r(9728);o.exports=u?function(p,g,Y){return h.f(p,g,f(1,Y))}:function(p,g,Y){return p[g]=Y,p}},9728:function(o){o.exports=function(y,r){return{enumerable:!(1&y),configurable:!(2&y),writable:!(4&y),value:r}}},92:function(o,y,r){var u=r(3476),h=r(8352),f=r(9728);o.exports=function(p,g,Y){u?h.f(p,g,f(0,Y)):p[g]=Y}},2544:function(o,y,r){var u=r(5312),h=r(8352);o.exports=function(f,p,g){return g.get&&u(g.get,p,{getter:!0}),g.set&&u(g.set,p,{setter:!0}),h.f(f,p,g)}},6076:function(o,y,r){var u=r(4328),h=r(8352),f=r(5312),p=r(4636);o.exports=function(g,Y,_,k){k||(k={});var C=k.enumerable,j=k.name!==void 0?k.name:Y;if(u(_)&&f(_,j,k),k.global)C?g[Y]=_:p(Y,_);else{try{k.unsafe?g[Y]&&(C=!0):delete g[Y]}catch{}C?g[Y]=_:h.f(g,Y,{value:_,enumerable:!1,configurable:!k.nonConfigurable,writable:!k.nonWritable})}return g}},4036:function(o,y,r){var u=r(6076);o.exports=function(h,f,p){for(var g in f)u(h,g,f[g],p);return h}},4636:function(o,y,r){var u=r(6420),h=Object.defineProperty;o.exports=function(f,p){try{h(u,f,{value:p,configurable:!0,writable:!0})}catch{u[f]=p}return p}},3476:function(o,y,r){var u=r(9957);o.exports=!u((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(o,y,r){var u=r(6420),h=r(1632),f=u.document,p=h(f)&&h(f.createElement);o.exports=function(g){return p?f.createElement(g):{}}},4316:function(o){var y=TypeError;o.exports=function(r){if(r>9007199254740991)throw y("Maximum allowed index exceeded");return r}},6064:function(o){o.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(o,y,r){var u,h,f=r(6420),p=r(6064),g=f.process,Y=f.Deno,_=g&&g.versions||Y&&Y.version,k=_&&_.v8;k&&(h=(u=k.split("."))[0]>0&&u[0]<4?1:+(u[0]+u[1])),!h&&p&&(!(u=p.match(/Edge\/(\d+)/))||u[1]>=74)&&(u=p.match(/Chrome\/(\d+)/))&&(h=+u[1]),o.exports=h},8256:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(o,y,r){var u=r(1664),h=Error,f=u("".replace),p=String(new h("zxcasd").stack),g=/\n\s*at [^:]*:[^\n]*/,Y=g.test(p);o.exports=function(_,k){if(Y&&typeof _=="string"&&!h.prepareStackTrace)for(;k--;)_=f(_,g,"");return _}},3696:function(o,y,r){var u=r(3440),h=r(6520),f=r(9184),p=Error.captureStackTrace;o.exports=function(g,Y,_,k){f&&(p?p(g,Y):u(g,"stack",h(_,k)))}},9184:function(o,y,r){var u=r(9957),h=r(9728);o.exports=!u((function(){var f=new Error("a");return!("stack"in f)||(Object.defineProperty(f,"stack",h(1,7)),f.stack!==7)}))},9160:function(o,y,r){var u=r(6420),h=r(9444).f,f=r(3440),p=r(6076),g=r(4636),Y=r(9968),_=r(6704);o.exports=function(k,C){var j,F,R,O,v,T=k.target,w=k.global,S=k.stat;if(j=w?u:S?u[T]||g(T,{}):u[T]&&u[T].prototype)for(F in C){if(O=C[F],R=k.dontCallGetSet?(v=h(j,F))&&v.value:j[F],!_(w?F:T+(S?".":"#")+F,k.forced)&&R!==void 0){if(typeof O==typeof R)continue;Y(O,R)}(k.sham||R&&R.sham)&&f(O,"sham",!0),p(j,F,O,k)}}},9957:function(o){o.exports=function(y){try{return!!y()}catch{return!0}}},7176:function(o,y,r){r(880);var u=r(8448),h=r(6076),f=r(7680),p=r(9957),g=r(9972),Y=r(3440),_=g("species"),k=RegExp.prototype;o.exports=function(C,j,F,R){var O=g(C),v=!p((function(){var V={};return V[O]=function(){return 7},""[C](V)!==7})),T=v&&!p((function(){var V=!1,E=/a/;return C==="split"&&((E={}).constructor={},E.constructor[_]=function(){return E},E.flags="",E[O]=/./[O]),E.exec=function(){return V=!0,null},E[O](""),!V}));if(!v||!T||F){var w=/./[O],S=j(O,""[C],(function(V,E,A,z,B){var ee=E.exec;return ee===f||ee===k.exec?v&&!B?{done:!0,value:u(w,E,A,z)}:{done:!0,value:u(V,A,E,z)}:{done:!1}}));h(String.prototype,C,S[0]),h(k,O,S[1])}R&&Y(k[O],"sham",!0)}},908:function(o,y,r){var u=r(7332),h=Function.prototype,f=h.apply,p=h.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(u?p.bind(f):function(){return p.apply(f,arguments)})},8992:function(o,y,r){var u=r(3180),h=r(8952),f=r(7332),p=u(u.bind);o.exports=function(g,Y){return h(g),Y===void 0?g:f?p(g,Y):function(){return g.apply(Y,arguments)}}},7332:function(o,y,r){var u=r(9957);o.exports=!u((function(){var h=(function(){}).bind();return typeof h!="function"||h.hasOwnProperty("prototype")}))},8448:function(o,y,r){var u=r(7332),h=Function.prototype.call;o.exports=u?h.bind(h):function(){return h.apply(h,arguments)}},6208:function(o,y,r){var u=r(3476),h=r(5152),f=Function.prototype,p=u&&Object.getOwnPropertyDescriptor,g=h(f,"name"),Y=g&&(function(){}).name==="something",_=g&&(!u||u&&p(f,"name").configurable);o.exports={EXISTS:g,PROPER:Y,CONFIGURABLE:_}},5288:function(o,y,r){var u=r(1664),h=r(8952);o.exports=function(f,p,g){try{return u(h(Object.getOwnPropertyDescriptor(f,p)[g]))}catch{}}},3180:function(o,y,r){var u=r(1888),h=r(1664);o.exports=function(f){if(u(f)==="Function")return h(f)}},1664:function(o,y,r){var u=r(7332),h=Function.prototype,f=h.call,p=u&&h.bind.bind(f,f);o.exports=u?p:function(g){return function(){return f.apply(g,arguments)}}},5232:function(o,y,r){var u=r(6420),h=r(4328);o.exports=function(f,p){return arguments.length<2?(g=u[f],h(g)?g:void 0):u[f]&&u[f][p];var g}},6752:function(o){o.exports=function(y){return{iterator:y,next:y.next,done:!1}}},4504:function(o,y,r){var u=r(8952),h=r(9760);o.exports=function(f,p){var g=f[p];return h(g)?void 0:u(g)}},6420:function(o,y,r){var u=function(h){return h&&h.Math===Math&&h};o.exports=u(typeof globalThis=="object"&&globalThis)||u(typeof window=="object"&&window)||u(typeof self=="object"&&self)||u(typeof r.g=="object"&&r.g)||u(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(o,y,r){var u=r(1664),h=r(4356),f=u({}.hasOwnProperty);o.exports=Object.hasOwn||function(p,g){return f(h(p),g)}},2560:function(o){o.exports={}},4168:function(o,y,r){var u=r(5232);o.exports=u("document","documentElement")},9888:function(o,y,r){var u=r(3476),h=r(9957),f=r(8168);o.exports=!u&&!h((function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(o,y,r){var u=r(1664),h=r(9957),f=r(1888),p=Object,g=u("".split);o.exports=h((function(){return!p("z").propertyIsEnumerable(0)}))?function(Y){return f(Y)==="String"?g(Y,""):p(Y)}:p},7512:function(o,y,r){var u=r(4328),h=r(1632),f=r(4024);o.exports=function(p,g,Y){var _,k;return f&&u(_=g.constructor)&&_!==Y&&h(k=_.prototype)&&k!==Y.prototype&&f(p,k),p}},9112:function(o,y,r){var u=r(1664),h=r(4328),f=r(3976),p=u(Function.toString);h(f.inspectSource)||(f.inspectSource=function(g){return p(g)}),o.exports=f.inspectSource},3480:function(o,y,r){var u=r(1632),h=r(3440);o.exports=function(f,p){u(p)&&"cause"in p&&h(f,"cause",p.cause)}},9104:function(o,y,r){var u,h,f,p=r(4288),g=r(6420),Y=r(1632),_=r(3440),k=r(5152),C=r(3976),j=r(6504),F=r(2560),R="Object already initialized",O=g.TypeError,v=g.WeakMap;if(p||C.state){var T=C.state||(C.state=new v);T.get=T.get,T.has=T.has,T.set=T.set,u=function(S,V){if(T.has(S))throw new O(R);return V.facade=S,T.set(S,V),V},h=function(S){return T.get(S)||{}},f=function(S){return T.has(S)}}else{var w=j("state");F[w]=!0,u=function(S,V){if(k(S,w))throw new O(R);return V.facade=S,_(S,w,V),V},h=function(S){return k(S,w)?S[w]:{}},f=function(S){return k(S,w)}}o.exports={set:u,get:h,has:f,enforce:function(S){return f(S)?h(S):u(S,{})},getterFor:function(S){return function(V){var E;if(!Y(V)||(E=h(V)).type!==S)throw new O("Incompatible receiver, "+S+" required");return E}}}},1432:function(o,y,r){var u=r(1888);o.exports=Array.isArray||function(h){return u(h)==="Array"}},4328:function(o){var y=typeof document=="object"&&document.all;o.exports=y===void 0&&y!==void 0?function(r){return typeof r=="function"||r===y}:function(r){return typeof r=="function"}},6072:function(o,y,r){var u=r(1664),h=r(9957),f=r(4328),p=r(4427),g=r(5232),Y=r(9112),_=function(){},k=g("Reflect","construct"),C=/^\s*(?:class|function)\b/,j=u(C.exec),F=!C.test(_),R=function(v){if(!f(v))return!1;try{return k(_,[],v),!0}catch{return!1}},O=function(v){if(!f(v))return!1;switch(p(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return F||!!j(C,Y(v))}catch{return!0}};O.sham=!0,o.exports=!k||h((function(){var v;return R(R.call)||!R(Object)||!R((function(){v=!0}))||v}))?O:R},6704:function(o,y,r){var u=r(9957),h=r(4328),f=/#|\.prototype\./,p=function(C,j){var F=Y[g(C)];return F===k||F!==_&&(h(j)?u(j):!!j)},g=p.normalize=function(C){return String(C).replace(f,".").toLowerCase()},Y=p.data={},_=p.NATIVE="N",k=p.POLYFILL="P";o.exports=p},9760:function(o){o.exports=function(y){return y==null}},1632:function(o,y,r){var u=r(4328);o.exports=function(h){return typeof h=="object"?h!==null:u(h)}},2424:function(o,y,r){var u=r(1632);o.exports=function(h){return u(h)||h===null}},7048:function(o){o.exports=!1},7728:function(o,y,r){var u=r(5232),h=r(4328),f=r(7e3),p=r(6536),g=Object;o.exports=p?function(Y){return typeof Y=="symbol"}:function(Y){var _=u("Symbol");return h(_)&&f(_.prototype,g(Y))}},3112:function(o,y,r){var u=r(8448),h=r(3951),f=r(4504);o.exports=function(p,g,Y){var _,k;h(p);try{if(!(_=f(p,"return"))){if(g==="throw")throw Y;return Y}_=u(_,p)}catch(C){k=!0,_=C}if(g==="throw")throw Y;if(k)throw _;return h(_),Y}},9724:function(o,y,r){var u=r(8448),h=r(9368),f=r(3440),p=r(4036),g=r(9972),Y=r(9104),_=r(4504),k=r(336).IteratorPrototype,C=r(3336),j=r(3112),F=g("toStringTag"),R="IteratorHelper",O="WrapForValidIterator",v=Y.set,T=function(V){var E=Y.getterFor(V?O:R);return p(h(k),{next:function(){var A=E(this);if(V)return A.nextHandler();try{var z=A.done?void 0:A.nextHandler();return C(z,A.done)}catch(B){throw A.done=!0,B}},return:function(){var A=E(this),z=A.iterator;if(A.done=!0,V){var B=_(z,"return");return B?u(B,z):C(void 0,!0)}if(A.inner)try{j(A.inner.iterator,"normal")}catch(ee){return j(z,"throw",ee)}return j(z,"normal"),C(void 0,!0)}})},w=T(!0),S=T(!1);f(S,F,"Iterator Helper"),o.exports=function(V,E){var A=function(z,B){B?(B.iterator=z.iterator,B.next=z.next):B=z,B.type=E?O:R,B.nextHandler=V,B.counter=0,B.done=!1,v(this,B)};return A.prototype=E?w:S,A}},5792:function(o,y,r){var u=r(8448),h=r(8952),f=r(3951),p=r(6752),g=r(9724),Y=r(8696),_=g((function(){var k=this.iterator,C=f(u(this.next,k));if(!(this.done=!!C.done))return Y(k,this.mapper,[C.value,this.counter++],!0)}));o.exports=function(k){return f(this),h(k),new _(p(this),{mapper:k})}},336:function(o,y,r){var u,h,f,p=r(9957),g=r(4328),Y=r(1632),_=r(9368),k=r(7796),C=r(6076),j=r(9972),F=r(7048),R=j("iterator"),O=!1;[].keys&&("next"in(f=[].keys())?(h=k(k(f)))!==Object.prototype&&(u=h):O=!0),!Y(u)||p((function(){var v={};return u[R].call(v)!==v}))?u={}:F&&(u=_(u)),g(u[R])||C(u,R,(function(){return this})),o.exports={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:O}},3556:function(o,y,r){var u=r(7584);o.exports=function(h){return u(h.length)}},5312:function(o,y,r){var u=r(1664),h=r(9957),f=r(4328),p=r(5152),g=r(3476),Y=r(6208).CONFIGURABLE,_=r(9112),k=r(9104),C=k.enforce,j=k.get,F=String,R=Object.defineProperty,O=u("".slice),v=u("".replace),T=u([].join),w=g&&!h((function(){return R((function(){}),"length",{value:8}).length!==8})),S=String(String).split("String"),V=o.exports=function(E,A,z){O(F(A),0,7)==="Symbol("&&(A="["+v(F(A),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),z&&z.getter&&(A="get "+A),z&&z.setter&&(A="set "+A),(!p(E,"name")||Y&&E.name!==A)&&(g?R(E,"name",{value:A,configurable:!0}):E.name=A),w&&z&&p(z,"arity")&&E.length!==z.arity&&R(E,"length",{value:z.arity});try{z&&p(z,"constructor")&&z.constructor?g&&R(E,"prototype",{writable:!1}):E.prototype&&(E.prototype=void 0)}catch{}var B=C(E);return p(B,"source")||(B.source=T(S,typeof A=="string"?A:"")),E};Function.prototype.toString=V((function(){return f(this)&&j(this).source||_(this)}),"toString")},1748:function(o){var y=Math.ceil,r=Math.floor;o.exports=Math.trunc||function(u){var h=+u;return(h>0?r:y)(h)}},8948:function(o,y,r){var u=r(5016);o.exports=function(h,f){return h===void 0?arguments.length<2?"":f:u(h)}},9292:function(o,y,r){var u=r(3476),h=r(1664),f=r(8448),p=r(9957),g=r(1531),Y=r(9392),_=r(8912),k=r(4356),C=r(5712),j=Object.assign,F=Object.defineProperty,R=h([].concat);o.exports=!j||p((function(){if(u&&j({b:1},j(F({},"a",{enumerable:!0,get:function(){F(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var O={},v={},T=Symbol("assign detection"),w="abcdefghijklmnopqrst";return O[T]=7,w.split("").forEach((function(S){v[S]=S})),j({},O)[T]!==7||g(j({},v)).join("")!==w}))?function(O,v){for(var T=k(O),w=arguments.length,S=1,V=Y.f,E=_.f;w>S;)for(var A,z=C(arguments[S++]),B=V?R(g(z),V(z)):g(z),ee=B.length,ie=0;ee>ie;)A=B[ie++],u&&!f(E,z,A)||(T[A]=z[A]);return T}:j},9368:function(o,y,r){var u,h=r(3951),f=r(2056),p=r(8256),g=r(2560),Y=r(4168),_=r(8168),k=r(6504),C="prototype",j="script",F=k("IE_PROTO"),R=function(){},O=function(w){return"<"+j+">"+w+"</"+j+">"},v=function(w){w.write(O("")),w.close();var S=w.parentWindow.Object;return w=null,S},T=function(){try{u=new ActiveXObject("htmlfile")}catch{}var w,S,V;T=typeof document<"u"?document.domain&&u?v(u):(S=_("iframe"),V="java"+j+":",S.style.display="none",Y.appendChild(S),S.src=String(V),(w=S.contentWindow.document).open(),w.write(O("document.F=Object")),w.close(),w.F):v(u);for(var E=p.length;E--;)delete T[C][p[E]];return T()};g[F]=!0,o.exports=Object.create||function(w,S){var V;return w!==null?(R[C]=h(w),V=new R,R[C]=null,V[F]=w):V=T(),S===void 0?V:f.f(V,S)}},2056:function(o,y,r){var u=r(3476),h=r(1576),f=r(8352),p=r(3951),g=r(4096),Y=r(1531);y.f=u&&!h?Object.defineProperties:function(_,k){p(_);for(var C,j=g(k),F=Y(k),R=F.length,O=0;R>O;)f.f(_,C=F[O++],j[C]);return _}},8352:function(o,y,r){var u=r(3476),h=r(9888),f=r(1576),p=r(3951),g=r(88),Y=TypeError,_=Object.defineProperty,k=Object.getOwnPropertyDescriptor,C="enumerable",j="configurable",F="writable";y.f=u?f?function(R,O,v){if(p(R),O=g(O),p(v),typeof R=="function"&&O==="prototype"&&"value"in v&&F in v&&!v[F]){var T=k(R,O);T&&T[F]&&(R[O]=v.value,v={configurable:j in v?v[j]:T[j],enumerable:C in v?v[C]:T[C],writable:!1})}return _(R,O,v)}:_:function(R,O,v){if(p(R),O=g(O),p(v),h)try{return _(R,O,v)}catch{}if("get"in v||"set"in v)throw new Y("Accessors not supported");return"value"in v&&(R[O]=v.value),R}},9444:function(o,y,r){var u=r(3476),h=r(8448),f=r(8912),p=r(9728),g=r(4096),Y=r(88),_=r(5152),k=r(9888),C=Object.getOwnPropertyDescriptor;y.f=u?C:function(j,F){if(j=g(j),F=Y(F),k)try{return C(j,F)}catch{}if(_(j,F))return p(!h(f.f,j,F),j[F])}},5048:function(o,y,r){var u=r(9008),h=r(8256).concat("length","prototype");y.f=Object.getOwnPropertyNames||function(f){return u(f,h)}},9392:function(o,y){y.f=Object.getOwnPropertySymbols},7796:function(o,y,r){var u=r(5152),h=r(4328),f=r(4356),p=r(6504),g=r(2272),Y=p("IE_PROTO"),_=Object,k=_.prototype;o.exports=g?_.getPrototypeOf:function(C){var j=f(C);if(u(j,Y))return j[Y];var F=j.constructor;return h(F)&&j instanceof F?F.prototype:j instanceof _?k:null}},7e3:function(o,y,r){var u=r(1664);o.exports=u({}.isPrototypeOf)},9008:function(o,y,r){var u=r(1664),h=r(5152),f=r(4096),p=r(2504).indexOf,g=r(2560),Y=u([].push);o.exports=function(_,k){var C,j=f(_),F=0,R=[];for(C in j)!h(g,C)&&h(j,C)&&Y(R,C);for(;k.length>F;)h(j,C=k[F++])&&(~p(R,C)||Y(R,C));return R}},1531:function(o,y,r){var u=r(9008),h=r(8256);o.exports=Object.keys||function(f){return u(f,h)}},8912:function(o,y){var r={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,h=u&&!r.call({1:2},1);y.f=h?function(f){var p=u(this,f);return!!p&&p.enumerable}:r},4024:function(o,y,r){var u=r(5288),h=r(3951),f=r(2096);o.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,g=!1,Y={};try{(p=u(Object.prototype,"__proto__","set"))(Y,[]),g=Y instanceof Array}catch{}return function(_,k){return h(_),f(k),g?p(_,k):_.__proto__=k,_}})():void 0)},7032:function(o,y,r){var u=r(16),h=r(4427);o.exports=u?{}.toString:function(){return"[object "+h(this)+"]"}},2104:function(o,y,r){var u=r(8448),h=r(4328),f=r(1632),p=TypeError;o.exports=function(g,Y){var _,k;if(Y==="string"&&h(_=g.toString)&&!f(k=u(_,g))||h(_=g.valueOf)&&!f(k=u(_,g))||Y!=="string"&&h(_=g.toString)&&!f(k=u(_,g)))return k;throw new p("Can't convert object to primitive value")}},9252:function(o,y,r){var u=r(5232),h=r(1664),f=r(5048),p=r(9392),g=r(3951),Y=h([].concat);o.exports=u("Reflect","ownKeys")||function(_){var k=f.f(g(_)),C=p.f;return C?Y(k,C(_)):k}},584:function(o,y,r){var u=r(8352).f;o.exports=function(h,f,p){p in h||u(h,p,{configurable:!0,get:function(){return f[p]},set:function(g){f[p]=g}})}},9092:function(o,y,r){var u=r(8448),h=r(3951),f=r(4328),p=r(1888),g=r(7680),Y=TypeError;o.exports=function(_,k){var C=_.exec;if(f(C)){var j=u(C,_,k);return j!==null&&h(j),j}if(p(_)==="RegExp")return u(g,_,k);throw new Y("RegExp#exec called on incompatible receiver")}},7680:function(o,y,r){var u,h,f=r(8448),p=r(1664),g=r(5016),Y=r(8872),_=r(3548),k=r(4696),C=r(9368),j=r(9104).get,F=r(8e3),R=r(9124),O=k("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,T=v,w=p("".charAt),S=p("".indexOf),V=p("".replace),E=p("".slice),A=(h=/b*/g,f(v,u=/a/,"a"),f(v,h,"a"),u.lastIndex!==0||h.lastIndex!==0),z=_.BROKEN_CARET,B=/()??/.exec("")[1]!==void 0;(A||B||z||F||R)&&(T=function(ee){var ie,re,fe,te,de,ve,me,oe=this,Z=j(oe),Ne=g(ee),Ie=Z.raw;if(Ie)return Ie.lastIndex=oe.lastIndex,ie=f(T,Ie,Ne),oe.lastIndex=Ie.lastIndex,ie;var Ce=Z.groups,Oe=z&&oe.sticky,$=f(Y,oe),J=oe.source,X=0,P=Ne;if(Oe&&($=V($,"y",""),S($,"g")===-1&&($+="g"),P=E(Ne,oe.lastIndex),oe.lastIndex>0&&(!oe.multiline||oe.multiline&&w(Ne,oe.lastIndex-1)!==`
|
|
84
|
+
}`,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}],Ih=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function Fh(...l){return tt.Components.baseEditForm([{key:"display",components:Eh},{key:"data",components:Rh},{label:"File",key:"file",weight:5,components:Ah},{key:"validation",components:Ih}],...l)}var Qr,ki;function _n(){if(ki)return Qr;ki=1;var l=Array.isArray;return Qr=l,Qr}var ea,Oi;function Vh(){if(Oi)return ea;Oi=1;var l=typeof fr=="object"&&fr&&fr.Object===Object&&fr;return ea=l,ea}var ta,Yi;function bn(){if(Yi)return ta;Yi=1;var l=Vh(),s=typeof self=="object"&&self&&self.Object===Object&&self,c=l||s||Function("return this")();return ta=c,ta}var ra,Ci;function wn(){if(Ci)return ra;Ci=1;var l=bn(),s=l.Symbol;return ra=s,ra}var aa,ji;function zh(){if(ji)return aa;ji=1;var l=wn(),s=Object.prototype,c=s.hasOwnProperty,i=s.toString,M=l?l.toStringTag:void 0;function x(I){var o=c.call(I,M),y=I[M];try{I[M]=void 0;var r=!0}catch{}var u=i.call(I);return r&&(o?I[M]=y:delete I[M]),u}return aa=x,aa}var na,Ti;function Lh(){if(Ti)return na;Ti=1;var l=Object.prototype,s=l.toString;function c(i){return s.call(i)}return na=c,na}var ia,Pi;function $s(){if(Pi)return ia;Pi=1;var l=wn(),s=zh(),c=Lh(),i="[object Null]",M="[object Undefined]",x=l?l.toStringTag:void 0;function I(o){return o==null?o===void 0?M:i:x&&x in Object(o)?s(o):c(o)}return ia=I,ia}var sa,Ni;function Wh(){if(Ni)return sa;Ni=1;function l(s){return s!=null&&typeof s=="object"}return sa=l,sa}var oa,Ri;function Sn(){if(Ri)return oa;Ri=1;var l=$s(),s=Wh(),c="[object Symbol]";function i(M){return typeof M=="symbol"||s(M)&&l(M)==c}return oa=i,oa}var la,Ei;function qh(){if(Ei)return la;Ei=1;var l=_n(),s=Sn(),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function M(x,I){if(l(x))return!1;var o=typeof x;return o=="number"||o=="symbol"||o=="boolean"||x==null||s(x)?!0:i.test(x)||!c.test(x)||I!=null&&x in Object(I)}return la=M,la}var ua,Ai;function Mn(){if(Ai)return ua;Ai=1;function l(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}return ua=l,ua}var ca,Ii;function Hh(){if(Ii)return ca;Ii=1;var l=$s(),s=Mn(),c="[object AsyncFunction]",i="[object Function]",M="[object GeneratorFunction]",x="[object Proxy]";function I(o){if(!s(o))return!1;var y=l(o);return y==i||y==M||y==c||y==x}return ca=I,ca}var da,Fi;function $h(){if(Fi)return da;Fi=1;var l=bn(),s=l["__core-js_shared__"];return da=s,da}var ha,Vi;function Bh(){if(Vi)return ha;Vi=1;var l=$h(),s=(function(){var i=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function c(i){return!!s&&s in i}return ha=c,ha}var fa,zi;function Uh(){if(zi)return fa;zi=1;var l=Function.prototype,s=l.toString;function c(i){if(i!=null){try{return s.call(i)}catch{}try{return i+""}catch{}}return""}return fa=c,fa}var ma,Li;function Gh(){if(Li)return ma;Li=1;var l=Hh(),s=Bh(),c=Mn(),i=Uh(),M=/[\\^$.*+?()[\]{}|]/g,x=/^\[object .+?Constructor\]$/,I=Function.prototype,o=Object.prototype,y=I.toString,r=o.hasOwnProperty,u=RegExp("^"+y.call(r).replace(M,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(f){if(!c(f)||s(f))return!1;var p=l(f)?u:x;return p.test(i(f))}return ma=h,ma}var pa,Wi;function Jh(){if(Wi)return pa;Wi=1;function l(s,c){return s?.[c]}return pa=l,pa}var ga,qi;function xn(){if(qi)return ga;qi=1;var l=Gh(),s=Jh();function c(i,M){var x=s(i,M);return l(x)?x:void 0}return ga=c,ga}var va,Hi;function Sr(){if(Hi)return va;Hi=1;var l=xn(),s=l(Object,"create");return va=s,va}var ya,$i;function Kh(){if($i)return ya;$i=1;var l=Sr();function s(){this.__data__=l?l(null):{},this.size=0}return ya=s,ya}var _a,Bi;function Xh(){if(Bi)return _a;Bi=1;function l(s){var c=this.has(s)&&delete this.__data__[s];return this.size-=c?1:0,c}return _a=l,_a}var ba,Ui;function Zh(){if(Ui)return ba;Ui=1;var l=Sr(),s="__lodash_hash_undefined__",c=Object.prototype,i=c.hasOwnProperty;function M(x){var I=this.__data__;if(l){var o=I[x];return o===s?void 0:o}return i.call(I,x)?I[x]:void 0}return ba=M,ba}var wa,Gi;function Qh(){if(Gi)return wa;Gi=1;var l=Sr(),s=Object.prototype,c=s.hasOwnProperty;function i(M){var x=this.__data__;return l?x[M]!==void 0:c.call(x,M)}return wa=i,wa}var Sa,Ji;function ef(){if(Ji)return Sa;Ji=1;var l=Sr(),s="__lodash_hash_undefined__";function c(i,M){var x=this.__data__;return this.size+=this.has(i)?0:1,x[i]=l&&M===void 0?s:M,this}return Sa=c,Sa}var Ma,Ki;function tf(){if(Ki)return Ma;Ki=1;var l=Kh(),s=Xh(),c=Zh(),i=Qh(),M=ef();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=c,x.prototype.has=i,x.prototype.set=M,Ma=x,Ma}var xa,Xi;function rf(){if(Xi)return xa;Xi=1;function l(){this.__data__=[],this.size=0}return xa=l,xa}var Da,Zi;function Bs(){if(Zi)return Da;Zi=1;function l(s,c){return s===c||s!==s&&c!==c}return Da=l,Da}var ka,Qi;function Mr(){if(Qi)return ka;Qi=1;var l=Bs();function s(c,i){for(var M=c.length;M--;)if(l(c[M][0],i))return M;return-1}return ka=s,ka}var Oa,es;function af(){if(es)return Oa;es=1;var l=Mr(),s=Array.prototype,c=s.splice;function i(M){var x=this.__data__,I=l(x,M);if(I<0)return!1;var o=x.length-1;return I==o?x.pop():c.call(x,I,1),--this.size,!0}return Oa=i,Oa}var Ya,ts;function nf(){if(ts)return Ya;ts=1;var l=Mr();function s(c){var i=this.__data__,M=l(i,c);return M<0?void 0:i[M][1]}return Ya=s,Ya}var Ca,rs;function sf(){if(rs)return Ca;rs=1;var l=Mr();function s(c){return l(this.__data__,c)>-1}return Ca=s,Ca}var ja,as;function of(){if(as)return ja;as=1;var l=Mr();function s(c,i){var M=this.__data__,x=l(M,c);return x<0?(++this.size,M.push([c,i])):M[x][1]=i,this}return ja=s,ja}var Ta,ns;function lf(){if(ns)return Ta;ns=1;var l=rf(),s=af(),c=nf(),i=sf(),M=of();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=c,x.prototype.has=i,x.prototype.set=M,Ta=x,Ta}var Pa,is;function uf(){if(is)return Pa;is=1;var l=xn(),s=bn(),c=l(s,"Map");return Pa=c,Pa}var Na,ss;function cf(){if(ss)return Na;ss=1;var l=tf(),s=lf(),c=uf();function i(){this.size=0,this.__data__={hash:new l,map:new(c||s),string:new l}}return Na=i,Na}var Ra,os;function df(){if(os)return Ra;os=1;function l(s){var c=typeof s;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?s!=="__proto__":s===null}return Ra=l,Ra}var Ea,ls;function xr(){if(ls)return Ea;ls=1;var l=df();function s(c,i){var M=c.__data__;return l(i)?M[typeof i=="string"?"string":"hash"]:M.map}return Ea=s,Ea}var Aa,us;function hf(){if(us)return Aa;us=1;var l=xr();function s(c){var i=l(this,c).delete(c);return this.size-=i?1:0,i}return Aa=s,Aa}var Ia,cs;function ff(){if(cs)return Ia;cs=1;var l=xr();function s(c){return l(this,c).get(c)}return Ia=s,Ia}var Fa,ds;function mf(){if(ds)return Fa;ds=1;var l=xr();function s(c){return l(this,c).has(c)}return Fa=s,Fa}var Va,hs;function pf(){if(hs)return Va;hs=1;var l=xr();function s(c,i){var M=l(this,c),x=M.size;return M.set(c,i),this.size+=M.size==x?0:1,this}return Va=s,Va}var za,fs;function gf(){if(fs)return za;fs=1;var l=cf(),s=hf(),c=ff(),i=mf(),M=pf();function x(I){var o=-1,y=I==null?0:I.length;for(this.clear();++o<y;){var r=I[o];this.set(r[0],r[1])}}return x.prototype.clear=l,x.prototype.delete=s,x.prototype.get=c,x.prototype.has=i,x.prototype.set=M,za=x,za}var La,ms;function vf(){if(ms)return La;ms=1;var l=gf(),s="Expected a function";function c(i,M){if(typeof i!="function"||M!=null&&typeof M!="function")throw new TypeError(s);var x=function(){var I=arguments,o=M?M.apply(this,I):I[0],y=x.cache;if(y.has(o))return y.get(o);var r=i.apply(this,I);return x.cache=y.set(o,r)||y,r};return x.cache=new(c.Cache||l),x}return c.Cache=l,La=c,La}var Wa,ps;function yf(){if(ps)return Wa;ps=1;var l=vf(),s=500;function c(i){var M=l(i,function(I){return x.size===s&&x.clear(),I}),x=M.cache;return M}return Wa=c,Wa}var qa,gs;function _f(){if(gs)return qa;gs=1;var l=yf(),s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,i=l(function(M){var x=[];return M.charCodeAt(0)===46&&x.push(""),M.replace(s,function(I,o,y,r){x.push(y?r.replace(c,"$1"):o||I)}),x});return qa=i,qa}var Ha,vs;function bf(){if(vs)return Ha;vs=1;function l(s,c){for(var i=-1,M=s==null?0:s.length,x=Array(M);++i<M;)x[i]=c(s[i],i,s);return x}return Ha=l,Ha}var $a,ys;function wf(){if(ys)return $a;ys=1;var l=wn(),s=bf(),c=_n(),i=Sn(),M=l?l.prototype:void 0,x=M?M.toString:void 0;function I(o){if(typeof o=="string")return o;if(c(o))return s(o,I)+"";if(i(o))return x?x.call(o):"";var y=o+"";return y=="0"&&1/o==-1/0?"-0":y}return $a=I,$a}var Ba,_s;function Sf(){if(_s)return Ba;_s=1;var l=wf();function s(c){return c==null?"":l(c)}return Ba=s,Ba}var Ua,bs;function Us(){if(bs)return Ua;bs=1;var l=_n(),s=qh(),c=_f(),i=Sf();function M(x,I){return l(x)?x:s(x,I)?[x]:c(i(x))}return Ua=M,Ua}var Ga,ws;function Gs(){if(ws)return Ga;ws=1;var l=Sn();function s(c){if(typeof c=="string"||l(c))return c;var i=c+"";return i=="0"&&1/c==-1/0?"-0":i}return Ga=s,Ga}var Ja,Ss;function Mf(){if(Ss)return Ja;Ss=1;var l=Us(),s=Gs();function c(i,M){M=l(M,i);for(var x=0,I=M.length;i!=null&&x<I;)i=i[s(M[x++])];return x&&x==I?i:void 0}return Ja=c,Ja}var Ka,Ms;function xf(){if(Ms)return Ka;Ms=1;var l=Mf();function s(c,i,M){var x=c==null?void 0:l(c,i);return x===void 0?M:x}return Ka=s,Ka}var Df=xf();const xs=fn(Df);var Xa,Ds;function kf(){if(Ds)return Xa;Ds=1;var l=xn(),s=(function(){try{var c=l(Object,"defineProperty");return c({},"",{}),c}catch{}})();return Xa=s,Xa}var Za,ks;function Of(){if(ks)return Za;ks=1;var l=kf();function s(c,i,M){i=="__proto__"&&l?l(c,i,{configurable:!0,enumerable:!0,value:M,writable:!0}):c[i]=M}return Za=s,Za}var Qa,Os;function Yf(){if(Os)return Qa;Os=1;var l=Of(),s=Bs(),c=Object.prototype,i=c.hasOwnProperty;function M(x,I,o){var y=x[I];(!(i.call(x,I)&&s(y,o))||o===void 0&&!(I in x))&&l(x,I,o)}return Qa=M,Qa}var en,Ys;function Cf(){if(Ys)return en;Ys=1;var l=9007199254740991,s=/^(?:0|[1-9]\d*)$/;function c(i,M){var x=typeof i;return M=M??l,!!M&&(x=="number"||x!="symbol"&&s.test(i))&&i>-1&&i%1==0&&i<M}return en=c,en}var tn,Cs;function jf(){if(Cs)return tn;Cs=1;var l=Yf(),s=Us(),c=Cf(),i=Mn(),M=Gs();function x(I,o,y,r){if(!i(I))return I;o=s(o,I);for(var u=-1,h=o.length,f=h-1,p=I;p!=null&&++u<h;){var g=M(o[u]),Y=y;if(g==="__proto__"||g==="constructor"||g==="prototype")return I;if(u!=f){var _=p[g];Y=r?r(_,g,p):void 0,Y===void 0&&(Y=i(_)?_:c(o[u+1])?[]:{})}l(p,g,Y),p=p[g]}return I}return tn=x,tn}var rn,js;function Tf(){if(js)return rn;js=1;var l=jf();function s(c,i,M){return c==null?c:l(c,i,M)}return rn=s,rn}var Pf=Tf();const Ts=fn(Pf);document.documentElement.lang.toString();class Nf{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=Ee()}async getSessionAuthToken(){let s=this;await $t.get(s.basePath+"/api/session-auth").then(c=>{s.token=c.data.token}).catch(c=>{He.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let s=this;return new Promise(async(c,i)=>{er("auth-token")?c({token:er("auth-token")}):await $t.get(s.basePath+"/api/session-auth?with-cookie=true",{withCredentials:!0,headers:{"Content-Type":"application/json; charset=utf-8"}}).then(M=>{const x=Sc.jwtDecode(M.data.token);x.exp&&Sh("auth-token",M.data.token,x.exp)}).catch(M=>{console.log(M)})})}getToken(){return this.token}execAuthenticatedCall(s){this.token?s(this.token):this.getSessionAuthTokenPromise().then(c=>{this.token=c.token,s(this.token)})}}const an=hn.Formio.Components.components.file;let cn=null;document.querySelector("widget-formio")!==null&&(cn=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const Rf=({component:l,current:s,onChange:c,i18next:i})=>{const[M,x]=G.useState([]),[I,o]=G.useState(new Map),[y,r]=G.useState(!1),u=new Nf;G.useEffect(()=>{u.getSessionAuthTokenPromise()},[]);const h=(w,S)=>{o(V=>{const E=new Map(V);return E.set(w,{...S,progress:Number(S?.progress)||0}),E})};function f(w){return w.size>(v(l.fileMaxSize)||v("1GB"))?{code:"size-files",message:`${i.t("I file non possono superare le dimensioni di")} ${l.fileMaxSize?l.fileMaxSize:"1GB"}`}:M.length>=(l.maxFiles?parseInt(l.maxFiles):l.multiple?100:1)?{code:"too-many-files",message:`${i.t("Puoi caricare massimo ")} ${l.maxFiles||100} ${i.t("file")}`}:w.size<v(l.fileMinSize)?{code:"file-too-small",message:`${i.t("I file devono avare una dimensione superiore a ")} ${l.fileMinSize}`}:null}function p(){if(l.filePattern){const S=l.filePattern.split(",").map(V=>V.trim()).filter(Boolean).reduce((V,E)=>{const A=E.startsWith(".")?E:`.${E}`,z=wc.getType(A);return z&&(V[z]||(V[z]=[]),V[z].push(A)),V},{});return Object.keys(S).length?S:void 0}else return!0}const g=w=>{let S={};return S.originalName=w.originalName?w.originalName:w.name,S.name=w.name,S.url=w.url,S.data=w.data,S.signature_validation=w.signature_validation,S.mime_type=w.mime_type,S.storage="url",S.size=w.size,S},{getRootProps:Y,getInputProps:_,fileRejections:k,isDragActive:C,open:j}=bc.useDropzone({onDrop:w=>{w.map(S=>{O(S).then(V=>{})})},maxFiles:l.maxFiles?parseInt(l.maxFiles)-M.length:l.multiple?100:1,validator:f,accept:p()}),F=w=>{const S=Ee()+"/api/attachments/"+w.data.id;fetch(S,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${er("auth-token")}`},strictErrors:!0}).then(()=>{x(V=>{let E=V.filter(A=>A.data.id!==w.data.id);return c(E),E})}).catch(V=>{He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(V)})},R=()=>{const w=typeof s?.getCurrentValue=="function"?s.getCurrentValue():s?.dataValue;w?.length>0&&(x(w),setTimeout(()=>{c(w)},100))};G.useEffect(()=>{document.querySelector(".formio-read-only")&&y===!1?(r(!0),setTimeout(()=>{R()},1e3)):(r(!1),setTimeout(()=>{R()},1e3))},[]);async function O(w){let S;const V=Ee()+"/it/upload";let E={mime_type:w.type,name:w.name,original_filename:w.name,protocol_required:l.protocol_required,size:w.size};return await $t.post(V,E,{maxContentLength:1/0,maxBodyLength:1/0}).then(async A=>(S=A.data.id,w.url=Ee()+"/it/allegati/"+S,w.storage="url",w.mime_type=w.type,w.protocol_required=l.protocol_required,w.data={...A.data,baseUrl:Ee()+"/it/allegati/"+S},h(S,w),await $t.put(A.data.uri,w,{onUploadProgress:z=>{let B=Math.round(z.loaded*100/z.total);o(ee=>{const ie=new Map(ee),re=w;return re.progress=parseInt(B),ie.has(S)&&ie.set(S,re),ie})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async z=>{const B=/\\|"/gi,ee=z.headers.etag.replace(B,"")||null;return await $t.put(Ee()+"/it/upload/"+S,{file_hash:ee,check_signature:l.check_signature}).then(async ie=>{o(te=>{const de=new Map(te);return de.delete(S),de});let re=s.dataValue||[],fe=null;if(x(te=>{const de=[...te,g(w)];return fe=de.length-1,c(de),de}),l.check_signature&&ie.data.url&&cn)return await $t.post(cn,{url:ie.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(te=>{w.signature_validation=te.data.sign,re[fe].signature_validation=te.data.sign}).catch(te=>{re[fe].signature_validation="File validation error: "+te});o(te=>{const de=new Map(te);return de.delete(S),de})}).catch(ie=>{o(re=>{const fe=new Map(re);return fe.delete(S),fe}),console.log(ie),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(z=>{o(B=>{const ee=new Map(B);return ee.delete(S),ee}),console.log(z),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(A=>{console.log(A),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),o(z=>{const B=new Map(z);return B.delete(S),B})})}function v(w){if(typeof w=="string"){if(w.search(/kb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024);if(w.search(/mb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024*1024);if(w.search(/gb/i)===w.length-2)return parseFloat(w.substring(0,w.length-2)*1024*1024*1024);if(w.search(/b/i)===w.length-1||w.search(/s/i)===w.length-1)return parseFloat(w.substring(0,w.length-1));if(w.search(/m/i)===w.length-1)return parseFloat(w.substring(0,w.length-1)*60);if(w.search(/h/i)===w.length-1)return parseFloat(w.substring(0,w.length-1)*3600)}return w}function T(w,S=2){if(!+w)return"0 Bytes";const V=1024,E=S<0?0:S,A=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],z=Math.floor(Math.log(w)/Math.log(V));return`${parseFloat((w/Math.pow(V,z)).toFixed(E))} ${A[z]}`}return s.conditionallyHidden()||s.visible===!1?null:m.jsx(m.Fragment,{children:y?m.jsx("div",{children:m.jsxs("ul",{className:"upload-file-list",children:[M.map((w,S)=>m.jsxs("li",{className:"upload-file success mw-100",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("File caricato:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]})]},w.size+S)),M.length<1&&m.jsxs("li",{className:"upload-file text-secondary mw-100",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),m.jsx("p",{children:i.t("Nessun elemento")})]})]})}):m.jsxs(m.Fragment,{children:[l.hideLabel||l.hidden?"":m.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${l.id}-${l.key}`,title:l.tooltip||void 0,children:[l.label,l.validate.required&&m.jsx("span",{className:"text-danger"}),l.tooltip&&m.jsx("i",{tabIndex:0,className:"bi bi-question-circle text-muted ms-1","data-tooltip":l.tooltip,"aria-expanded":"false"})]}),m.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${C?" dragover":""}`,style:{border:"dashed"},...Y({onClick:w=>w.stopPropagation()}),children:[m.jsx("input",{id:`${l.id}-${l.key}`,"aria-describedby":`file-uploader-description-${l.id}-${l.key}`,..._()}),m.jsxs("div",{className:`upload-dragdrop${C?" dragover":""}`,children:[m.jsx("div",{className:"ms-1 me-3",children:m.jsx(ue.Icon,{color:"secondary",icon:"it-upload",title:i.t("Carica file"),size:"_sm"})}),m.jsxs("div",{className:"upload-dragdrop-text",children:[m.jsx("div",{className:"h5",id:`file-uploader-description-${l.id}-${l.key}`,children:i.t("Trascina il file per caricarlo")}),m.jsxs("p",{className:"d-inline-flex",children:[i.t("oppure"),m.jsx(ue.Button,{tag:"input",type:"button",value:i.t("selezionalo dal dispositivo"),onClick:j,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),m.jsx("div",{dangerouslySetInnerHTML:{__html:As.sanitize(l.description||"")}}),m.jsxs("ul",{className:"upload-file-list my-0",children:[M.map((w,S)=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("File caricato:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]}),m.jsx(ue.Button,{className:"px-1",onClick:()=>F(w),children:m.jsx(ue.Icon,{title:`${i.t("Elimina file caricato")} ${w.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},w.size+S)),Array.from(I.entries()).map(([w,S])=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("Caricamento file:")}),S.name,m.jsx("span",{className:"upload-file-weight",children:T(S.size)})]}),m.jsx(ue.Progress,{value:Number(S?.progress)||0})]},w))]}),!!(k&&k.length)&&m.jsx("div",{className:"formio-error-wrapper",children:m.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:k.map(({file:w,errors:S},V)=>m.jsxs("li",{className:"upload-file error",children:[m.jsxs("div",{className:"upload-file-name-error-wrapper",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"error",icon:"it-error",title:"Icona file",size:"sm"}),m.jsxs("p",{className:"text-wrap error",children:[m.jsx("span",{className:"visually-hidden",children:i.t("Errore caricamento file:")}),w.name,m.jsx("span",{className:"upload-file-weight",children:T(w.size)})]})]}),m.jsx("div",{children:S.map(E=>E.code==="file-invalid-type"?m.jsxs("p",{className:"text-wrap ms-0",children:[i.t("I file possono essere di tipo "),l.filePattern]}):E.code==="too-many-files"?m.jsxs("p",{className:"text-wrap ms-0",children:[i.t("Puoi caricare massimo ")," ",l.maxFiles?l.maxFiles:l.multiple?100:1," ",i.t("file")]}):m.jsx("p",{className:"text-wrap ms-0",children:E.message}))})]},w.size+V))})})]})})};class Dr extends an{constructor(s,c,i){super({...s,clearOnHide:!1},c,i),this.reactRef=null,this.lastRenderedVisible=void 0,this.rootComponent=null}static get builderInfo(){return{title:"File Sdc",group:"basic",icon:"bi bi-file-earmark-text",documentation:"",weight:70,schema:Dr.schema()}}get emptyValue(){return[]}init(){if(super.init(),this.component?.multiple&&!Array.isArray(this.getCurrentValue())){this.dataValue=[];const s=this.path||this.component?.key;s&&this.rootValue&&Ts(this.rootValue,s,[])}}static schema(){return an.schema({type:"sdcfile",modelType:"array"})}static editForm=Fh;getI18next(){return this.i18next&&typeof this.i18next.t=="function"?this.i18next:{language:this.options?.language||document?.documentElement?.lang||"it",t:(s,c)=>this.t(s,c)}}hideFileProcessingLoader(){this.refs?.fileProcessingLoader&&(this.refs.fileProcessingLoader.style.display="none")}renderReact(){if(this.rootComponent){if(this.builderMode){this.rootComponent.render(m.jsx("div",{className:"my-1 border border-2 border-light file-uploader-box rounded p-3 text-secondary",children:m.jsx("div",{className:"upload-dragdrop",children:m.jsx("div",{className:"upload-dragdrop-text",children:m.jsx("div",{className:"h6 mb-0",children:this.component?.label||"File Sdc"})})})}));return}this.rootComponent.render(m.jsx(Rf,{component:this.component,current:this,i18next:this.getI18next(),onChange:s=>this.setValue(s,{modified:!0})}))}}attach(s){const c=super.attach(s);this.hideFileProcessingLoader();const i=`react-${this.id}`;this.loadRefs(s,{[i]:"single"});const M=this.refs[i];return M&&(this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),this.rootComponent=Et.createRoot(M),this.lastRenderedVisible=this.visible,this.renderReact()),c}setValue(s,c={}){const i=this.normalizeValue(s,c),M=super.setValue(i,c),x=this.path||this.component?.key;if(x&&this.rootValue){const I=xs(this.rootValue,x);this.isEqual(I,i)||Ts(this.rootValue,x,i)}return M}normalizeValue(s,c={}){const i=super.normalizeValue(s,c);return!this.component?.multiple||Array.isArray(i)?i:i==null||i===""?[]:[i]}detach(){return this.hideFileProcessingLoader(),this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),super.detach()}getValue(){return this.getCurrentValue()}get validationValue(){return this.getCurrentValue()}getCurrentValue(){const s=super.getValue(),c=this.path||this.component?.key,i=c&&this.rootValue?xs(this.rootValue,c):void 0;return this.component?.multiple?Array.isArray(s)&&s.length>0?s:Array.isArray(i)?i:[]:s??i??null}isEmpty(s=this.validationValue){return this.component?.multiple?!Array.isArray(s)||s.length===0:s==null||s===""}checkCondition(s,c){const i=super.checkCondition(s,c),M=this.visible;return this.lastRenderedVisible!==M&&(this.lastRenderedVisible=M,this.renderReact()),i}render(){const s=`<div ref="react-${this.id}"></div>`;return Object.getPrototypeOf(Object.getPrototypeOf(an.prototype)).render.call(this,s)}}const Ef=[{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 Af(...l){return tt.Components.baseEditForm([{key:"display",components:Ef}],...l)}var gr={exports:{}},If=gr.exports,Ps;function Ff(){return Ps||(Ps=1,(function(l,s){(function(c,i){l.exports=i(G)})(If,(function(c){return(function(){var i={680:function(o){o.exports=c},8952:function(o,y,r){var u=r(4328),h=r(36),f=TypeError;o.exports=function(p){if(u(p))return p;throw new f(h(p)+" is not a function")}},2096:function(o,y,r){var u=r(2424),h=String,f=TypeError;o.exports=function(p){if(u(p))return p;throw new f("Can't set "+h(p)+" as a prototype")}},4764:function(o,y,r){var u=r(9764).charAt;o.exports=function(h,f,p){return f+(p?u(h,f).length:1)}},6100:function(o,y,r){var u=r(7e3),h=TypeError;o.exports=function(f,p){if(u(p,f))return f;throw new h("Incorrect invocation")}},3951:function(o,y,r){var u=r(1632),h=String,f=TypeError;o.exports=function(p){if(u(p))return p;throw new f(h(p)+" is not an object")}},2504:function(o,y,r){var u=r(4096),h=r(2495),f=r(3556),p=function(g){return function(Y,_,k){var C=u(Y),j=f(C);if(j===0)return!g&&-1;var F,R=h(k,j);if(g&&_!=_){for(;j>R;)if((F=C[R++])!=F)return!0}else for(;j>R;R++)if((g||R in C)&&C[R]===_)return g||R||0;return!g&&-1}};o.exports={includes:p(!0),indexOf:p(!1)}},3364:function(o,y,r){var u=r(8992),h=r(1664),f=r(5712),p=r(4356),g=r(3556),Y=r(2568),_=h([].push),k=function(C){var j=C===1,F=C===2,R=C===3,O=C===4,v=C===6,T=C===7,w=C===5||v;return function(S,V,E,A){for(var z,B,ee=p(S),ie=f(ee),re=g(ie),fe=u(V,E),te=0,de=A||Y,ve=j?de(S,re):F||T?de(S,0):void 0;re>te;te++)if((w||te in ie)&&(B=fe(z=ie[te],te,ee),C))if(j)ve[te]=B;else if(B)switch(C){case 3:return!0;case 5:return z;case 6:return te;case 2:_(ve,z)}else switch(C){case 4:return!1;case 7:_(ve,z)}return v?-1:R||O?O:ve}};o.exports={forEach:k(0),map:k(1),filter:k(2),some:k(3),every:k(4),find:k(5),findIndex:k(6),filterReject:k(7)}},953:function(o,y,r){var u=r(9957),h=r(9972),f=r(8504),p=h("species");o.exports=function(g){return f>=51||!u((function(){var Y=[];return(Y.constructor={})[p]=function(){return{foo:1}},Y[g](Boolean).foo!==1}))}},1496:function(o,y,r){var u=r(9957);o.exports=function(h,f){var p=[][h];return!!p&&u((function(){p.call(null,f||function(){return 1},1)}))}},6728:function(o,y,r){var u=r(3476),h=r(1432),f=TypeError,p=Object.getOwnPropertyDescriptor,g=u&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(Y){return Y instanceof TypeError}})();o.exports=g?function(Y,_){if(h(Y)&&!p(Y,"length").writable)throw new f("Cannot set read only .length");return Y.length=_}:function(Y,_){return Y.length=_}},6736:function(o,y,r){var u=r(1432),h=r(6072),f=r(1632),p=r(9972)("species"),g=Array;o.exports=function(Y){var _;return u(Y)&&(_=Y.constructor,(h(_)&&(_===g||u(_.prototype))||f(_)&&(_=_[p])===null)&&(_=void 0)),_===void 0?g:_}},2568:function(o,y,r){var u=r(6736);o.exports=function(h,f){return new(u(h))(f===0?0:f)}},8696:function(o,y,r){var u=r(3951),h=r(3112);o.exports=function(f,p,g,Y){try{return Y?p(u(g)[0],g[1]):p(g)}catch(_){h(f,"throw",_)}}},1888:function(o,y,r){var u=r(1664),h=u({}.toString),f=u("".slice);o.exports=function(p){return f(h(p),8,-1)}},4427:function(o,y,r){var u=r(16),h=r(4328),f=r(1888),p=r(9972)("toStringTag"),g=Object,Y=f((function(){return arguments})())==="Arguments";o.exports=u?f:function(_){var k,C,j;return _===void 0?"Undefined":_===null?"Null":typeof(C=(function(F,R){try{return F[R]}catch{}})(k=g(_),p))=="string"?C:Y?f(k):(j=f(k))==="Object"&&h(k.callee)?"Arguments":j}},9968:function(o,y,r){var u=r(5152),h=r(9252),f=r(9444),p=r(8352);o.exports=function(g,Y,_){for(var k=h(Y),C=p.f,j=f.f,F=0;F<k.length;F++){var R=k[F];u(g,R)||_&&u(_,R)||C(g,R,j(Y,R))}}},2272:function(o,y,r){var u=r(9957);o.exports=!u((function(){function h(){}return h.prototype.constructor=null,Object.getPrototypeOf(new h)!==h.prototype}))},3336:function(o){o.exports=function(y,r){return{value:y,done:r}}},3440:function(o,y,r){var u=r(3476),h=r(8352),f=r(9728);o.exports=u?function(p,g,Y){return h.f(p,g,f(1,Y))}:function(p,g,Y){return p[g]=Y,p}},9728:function(o){o.exports=function(y,r){return{enumerable:!(1&y),configurable:!(2&y),writable:!(4&y),value:r}}},92:function(o,y,r){var u=r(3476),h=r(8352),f=r(9728);o.exports=function(p,g,Y){u?h.f(p,g,f(0,Y)):p[g]=Y}},2544:function(o,y,r){var u=r(5312),h=r(8352);o.exports=function(f,p,g){return g.get&&u(g.get,p,{getter:!0}),g.set&&u(g.set,p,{setter:!0}),h.f(f,p,g)}},6076:function(o,y,r){var u=r(4328),h=r(8352),f=r(5312),p=r(4636);o.exports=function(g,Y,_,k){k||(k={});var C=k.enumerable,j=k.name!==void 0?k.name:Y;if(u(_)&&f(_,j,k),k.global)C?g[Y]=_:p(Y,_);else{try{k.unsafe?g[Y]&&(C=!0):delete g[Y]}catch{}C?g[Y]=_:h.f(g,Y,{value:_,enumerable:!1,configurable:!k.nonConfigurable,writable:!k.nonWritable})}return g}},4036:function(o,y,r){var u=r(6076);o.exports=function(h,f,p){for(var g in f)u(h,g,f[g],p);return h}},4636:function(o,y,r){var u=r(6420),h=Object.defineProperty;o.exports=function(f,p){try{h(u,f,{value:p,configurable:!0,writable:!0})}catch{u[f]=p}return p}},3476:function(o,y,r){var u=r(9957);o.exports=!u((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(o,y,r){var u=r(6420),h=r(1632),f=u.document,p=h(f)&&h(f.createElement);o.exports=function(g){return p?f.createElement(g):{}}},4316:function(o){var y=TypeError;o.exports=function(r){if(r>9007199254740991)throw y("Maximum allowed index exceeded");return r}},6064:function(o){o.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(o,y,r){var u,h,f=r(6420),p=r(6064),g=f.process,Y=f.Deno,_=g&&g.versions||Y&&Y.version,k=_&&_.v8;k&&(h=(u=k.split("."))[0]>0&&u[0]<4?1:+(u[0]+u[1])),!h&&p&&(!(u=p.match(/Edge\/(\d+)/))||u[1]>=74)&&(u=p.match(/Chrome\/(\d+)/))&&(h=+u[1]),o.exports=h},8256:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(o,y,r){var u=r(1664),h=Error,f=u("".replace),p=String(new h("zxcasd").stack),g=/\n\s*at [^:]*:[^\n]*/,Y=g.test(p);o.exports=function(_,k){if(Y&&typeof _=="string"&&!h.prepareStackTrace)for(;k--;)_=f(_,g,"");return _}},3696:function(o,y,r){var u=r(3440),h=r(6520),f=r(9184),p=Error.captureStackTrace;o.exports=function(g,Y,_,k){f&&(p?p(g,Y):u(g,"stack",h(_,k)))}},9184:function(o,y,r){var u=r(9957),h=r(9728);o.exports=!u((function(){var f=new Error("a");return!("stack"in f)||(Object.defineProperty(f,"stack",h(1,7)),f.stack!==7)}))},9160:function(o,y,r){var u=r(6420),h=r(9444).f,f=r(3440),p=r(6076),g=r(4636),Y=r(9968),_=r(6704);o.exports=function(k,C){var j,F,R,O,v,T=k.target,w=k.global,S=k.stat;if(j=w?u:S?u[T]||g(T,{}):u[T]&&u[T].prototype)for(F in C){if(O=C[F],R=k.dontCallGetSet?(v=h(j,F))&&v.value:j[F],!_(w?F:T+(S?".":"#")+F,k.forced)&&R!==void 0){if(typeof O==typeof R)continue;Y(O,R)}(k.sham||R&&R.sham)&&f(O,"sham",!0),p(j,F,O,k)}}},9957:function(o){o.exports=function(y){try{return!!y()}catch{return!0}}},7176:function(o,y,r){r(880);var u=r(8448),h=r(6076),f=r(7680),p=r(9957),g=r(9972),Y=r(3440),_=g("species"),k=RegExp.prototype;o.exports=function(C,j,F,R){var O=g(C),v=!p((function(){var V={};return V[O]=function(){return 7},""[C](V)!==7})),T=v&&!p((function(){var V=!1,E=/a/;return C==="split"&&((E={}).constructor={},E.constructor[_]=function(){return E},E.flags="",E[O]=/./[O]),E.exec=function(){return V=!0,null},E[O](""),!V}));if(!v||!T||F){var w=/./[O],S=j(O,""[C],(function(V,E,A,z,B){var ee=E.exec;return ee===f||ee===k.exec?v&&!B?{done:!0,value:u(w,E,A,z)}:{done:!0,value:u(V,A,E,z)}:{done:!1}}));h(String.prototype,C,S[0]),h(k,O,S[1])}R&&Y(k[O],"sham",!0)}},908:function(o,y,r){var u=r(7332),h=Function.prototype,f=h.apply,p=h.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(u?p.bind(f):function(){return p.apply(f,arguments)})},8992:function(o,y,r){var u=r(3180),h=r(8952),f=r(7332),p=u(u.bind);o.exports=function(g,Y){return h(g),Y===void 0?g:f?p(g,Y):function(){return g.apply(Y,arguments)}}},7332:function(o,y,r){var u=r(9957);o.exports=!u((function(){var h=(function(){}).bind();return typeof h!="function"||h.hasOwnProperty("prototype")}))},8448:function(o,y,r){var u=r(7332),h=Function.prototype.call;o.exports=u?h.bind(h):function(){return h.apply(h,arguments)}},6208:function(o,y,r){var u=r(3476),h=r(5152),f=Function.prototype,p=u&&Object.getOwnPropertyDescriptor,g=h(f,"name"),Y=g&&(function(){}).name==="something",_=g&&(!u||u&&p(f,"name").configurable);o.exports={EXISTS:g,PROPER:Y,CONFIGURABLE:_}},5288:function(o,y,r){var u=r(1664),h=r(8952);o.exports=function(f,p,g){try{return u(h(Object.getOwnPropertyDescriptor(f,p)[g]))}catch{}}},3180:function(o,y,r){var u=r(1888),h=r(1664);o.exports=function(f){if(u(f)==="Function")return h(f)}},1664:function(o,y,r){var u=r(7332),h=Function.prototype,f=h.call,p=u&&h.bind.bind(f,f);o.exports=u?p:function(g){return function(){return f.apply(g,arguments)}}},5232:function(o,y,r){var u=r(6420),h=r(4328);o.exports=function(f,p){return arguments.length<2?(g=u[f],h(g)?g:void 0):u[f]&&u[f][p];var g}},6752:function(o){o.exports=function(y){return{iterator:y,next:y.next,done:!1}}},4504:function(o,y,r){var u=r(8952),h=r(9760);o.exports=function(f,p){var g=f[p];return h(g)?void 0:u(g)}},6420:function(o,y,r){var u=function(h){return h&&h.Math===Math&&h};o.exports=u(typeof globalThis=="object"&&globalThis)||u(typeof window=="object"&&window)||u(typeof self=="object"&&self)||u(typeof r.g=="object"&&r.g)||u(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(o,y,r){var u=r(1664),h=r(4356),f=u({}.hasOwnProperty);o.exports=Object.hasOwn||function(p,g){return f(h(p),g)}},2560:function(o){o.exports={}},4168:function(o,y,r){var u=r(5232);o.exports=u("document","documentElement")},9888:function(o,y,r){var u=r(3476),h=r(9957),f=r(8168);o.exports=!u&&!h((function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(o,y,r){var u=r(1664),h=r(9957),f=r(1888),p=Object,g=u("".split);o.exports=h((function(){return!p("z").propertyIsEnumerable(0)}))?function(Y){return f(Y)==="String"?g(Y,""):p(Y)}:p},7512:function(o,y,r){var u=r(4328),h=r(1632),f=r(4024);o.exports=function(p,g,Y){var _,k;return f&&u(_=g.constructor)&&_!==Y&&h(k=_.prototype)&&k!==Y.prototype&&f(p,k),p}},9112:function(o,y,r){var u=r(1664),h=r(4328),f=r(3976),p=u(Function.toString);h(f.inspectSource)||(f.inspectSource=function(g){return p(g)}),o.exports=f.inspectSource},3480:function(o,y,r){var u=r(1632),h=r(3440);o.exports=function(f,p){u(p)&&"cause"in p&&h(f,"cause",p.cause)}},9104:function(o,y,r){var u,h,f,p=r(4288),g=r(6420),Y=r(1632),_=r(3440),k=r(5152),C=r(3976),j=r(6504),F=r(2560),R="Object already initialized",O=g.TypeError,v=g.WeakMap;if(p||C.state){var T=C.state||(C.state=new v);T.get=T.get,T.has=T.has,T.set=T.set,u=function(S,V){if(T.has(S))throw new O(R);return V.facade=S,T.set(S,V),V},h=function(S){return T.get(S)||{}},f=function(S){return T.has(S)}}else{var w=j("state");F[w]=!0,u=function(S,V){if(k(S,w))throw new O(R);return V.facade=S,_(S,w,V),V},h=function(S){return k(S,w)?S[w]:{}},f=function(S){return k(S,w)}}o.exports={set:u,get:h,has:f,enforce:function(S){return f(S)?h(S):u(S,{})},getterFor:function(S){return function(V){var E;if(!Y(V)||(E=h(V)).type!==S)throw new O("Incompatible receiver, "+S+" required");return E}}}},1432:function(o,y,r){var u=r(1888);o.exports=Array.isArray||function(h){return u(h)==="Array"}},4328:function(o){var y=typeof document=="object"&&document.all;o.exports=y===void 0&&y!==void 0?function(r){return typeof r=="function"||r===y}:function(r){return typeof r=="function"}},6072:function(o,y,r){var u=r(1664),h=r(9957),f=r(4328),p=r(4427),g=r(5232),Y=r(9112),_=function(){},k=g("Reflect","construct"),C=/^\s*(?:class|function)\b/,j=u(C.exec),F=!C.test(_),R=function(v){if(!f(v))return!1;try{return k(_,[],v),!0}catch{return!1}},O=function(v){if(!f(v))return!1;switch(p(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return F||!!j(C,Y(v))}catch{return!0}};O.sham=!0,o.exports=!k||h((function(){var v;return R(R.call)||!R(Object)||!R((function(){v=!0}))||v}))?O:R},6704:function(o,y,r){var u=r(9957),h=r(4328),f=/#|\.prototype\./,p=function(C,j){var F=Y[g(C)];return F===k||F!==_&&(h(j)?u(j):!!j)},g=p.normalize=function(C){return String(C).replace(f,".").toLowerCase()},Y=p.data={},_=p.NATIVE="N",k=p.POLYFILL="P";o.exports=p},9760:function(o){o.exports=function(y){return y==null}},1632:function(o,y,r){var u=r(4328);o.exports=function(h){return typeof h=="object"?h!==null:u(h)}},2424:function(o,y,r){var u=r(1632);o.exports=function(h){return u(h)||h===null}},7048:function(o){o.exports=!1},7728:function(o,y,r){var u=r(5232),h=r(4328),f=r(7e3),p=r(6536),g=Object;o.exports=p?function(Y){return typeof Y=="symbol"}:function(Y){var _=u("Symbol");return h(_)&&f(_.prototype,g(Y))}},3112:function(o,y,r){var u=r(8448),h=r(3951),f=r(4504);o.exports=function(p,g,Y){var _,k;h(p);try{if(!(_=f(p,"return"))){if(g==="throw")throw Y;return Y}_=u(_,p)}catch(C){k=!0,_=C}if(g==="throw")throw Y;if(k)throw _;return h(_),Y}},9724:function(o,y,r){var u=r(8448),h=r(9368),f=r(3440),p=r(4036),g=r(9972),Y=r(9104),_=r(4504),k=r(336).IteratorPrototype,C=r(3336),j=r(3112),F=g("toStringTag"),R="IteratorHelper",O="WrapForValidIterator",v=Y.set,T=function(V){var E=Y.getterFor(V?O:R);return p(h(k),{next:function(){var A=E(this);if(V)return A.nextHandler();try{var z=A.done?void 0:A.nextHandler();return C(z,A.done)}catch(B){throw A.done=!0,B}},return:function(){var A=E(this),z=A.iterator;if(A.done=!0,V){var B=_(z,"return");return B?u(B,z):C(void 0,!0)}if(A.inner)try{j(A.inner.iterator,"normal")}catch(ee){return j(z,"throw",ee)}return j(z,"normal"),C(void 0,!0)}})},w=T(!0),S=T(!1);f(S,F,"Iterator Helper"),o.exports=function(V,E){var A=function(z,B){B?(B.iterator=z.iterator,B.next=z.next):B=z,B.type=E?O:R,B.nextHandler=V,B.counter=0,B.done=!1,v(this,B)};return A.prototype=E?w:S,A}},5792:function(o,y,r){var u=r(8448),h=r(8952),f=r(3951),p=r(6752),g=r(9724),Y=r(8696),_=g((function(){var k=this.iterator,C=f(u(this.next,k));if(!(this.done=!!C.done))return Y(k,this.mapper,[C.value,this.counter++],!0)}));o.exports=function(k){return f(this),h(k),new _(p(this),{mapper:k})}},336:function(o,y,r){var u,h,f,p=r(9957),g=r(4328),Y=r(1632),_=r(9368),k=r(7796),C=r(6076),j=r(9972),F=r(7048),R=j("iterator"),O=!1;[].keys&&("next"in(f=[].keys())?(h=k(k(f)))!==Object.prototype&&(u=h):O=!0),!Y(u)||p((function(){var v={};return u[R].call(v)!==v}))?u={}:F&&(u=_(u)),g(u[R])||C(u,R,(function(){return this})),o.exports={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:O}},3556:function(o,y,r){var u=r(7584);o.exports=function(h){return u(h.length)}},5312:function(o,y,r){var u=r(1664),h=r(9957),f=r(4328),p=r(5152),g=r(3476),Y=r(6208).CONFIGURABLE,_=r(9112),k=r(9104),C=k.enforce,j=k.get,F=String,R=Object.defineProperty,O=u("".slice),v=u("".replace),T=u([].join),w=g&&!h((function(){return R((function(){}),"length",{value:8}).length!==8})),S=String(String).split("String"),V=o.exports=function(E,A,z){O(F(A),0,7)==="Symbol("&&(A="["+v(F(A),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),z&&z.getter&&(A="get "+A),z&&z.setter&&(A="set "+A),(!p(E,"name")||Y&&E.name!==A)&&(g?R(E,"name",{value:A,configurable:!0}):E.name=A),w&&z&&p(z,"arity")&&E.length!==z.arity&&R(E,"length",{value:z.arity});try{z&&p(z,"constructor")&&z.constructor?g&&R(E,"prototype",{writable:!1}):E.prototype&&(E.prototype=void 0)}catch{}var B=C(E);return p(B,"source")||(B.source=T(S,typeof A=="string"?A:"")),E};Function.prototype.toString=V((function(){return f(this)&&j(this).source||_(this)}),"toString")},1748:function(o){var y=Math.ceil,r=Math.floor;o.exports=Math.trunc||function(u){var h=+u;return(h>0?r:y)(h)}},8948:function(o,y,r){var u=r(5016);o.exports=function(h,f){return h===void 0?arguments.length<2?"":f:u(h)}},9292:function(o,y,r){var u=r(3476),h=r(1664),f=r(8448),p=r(9957),g=r(1531),Y=r(9392),_=r(8912),k=r(4356),C=r(5712),j=Object.assign,F=Object.defineProperty,R=h([].concat);o.exports=!j||p((function(){if(u&&j({b:1},j(F({},"a",{enumerable:!0,get:function(){F(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var O={},v={},T=Symbol("assign detection"),w="abcdefghijklmnopqrst";return O[T]=7,w.split("").forEach((function(S){v[S]=S})),j({},O)[T]!==7||g(j({},v)).join("")!==w}))?function(O,v){for(var T=k(O),w=arguments.length,S=1,V=Y.f,E=_.f;w>S;)for(var A,z=C(arguments[S++]),B=V?R(g(z),V(z)):g(z),ee=B.length,ie=0;ee>ie;)A=B[ie++],u&&!f(E,z,A)||(T[A]=z[A]);return T}:j},9368:function(o,y,r){var u,h=r(3951),f=r(2056),p=r(8256),g=r(2560),Y=r(4168),_=r(8168),k=r(6504),C="prototype",j="script",F=k("IE_PROTO"),R=function(){},O=function(w){return"<"+j+">"+w+"</"+j+">"},v=function(w){w.write(O("")),w.close();var S=w.parentWindow.Object;return w=null,S},T=function(){try{u=new ActiveXObject("htmlfile")}catch{}var w,S,V;T=typeof document<"u"?document.domain&&u?v(u):(S=_("iframe"),V="java"+j+":",S.style.display="none",Y.appendChild(S),S.src=String(V),(w=S.contentWindow.document).open(),w.write(O("document.F=Object")),w.close(),w.F):v(u);for(var E=p.length;E--;)delete T[C][p[E]];return T()};g[F]=!0,o.exports=Object.create||function(w,S){var V;return w!==null?(R[C]=h(w),V=new R,R[C]=null,V[F]=w):V=T(),S===void 0?V:f.f(V,S)}},2056:function(o,y,r){var u=r(3476),h=r(1576),f=r(8352),p=r(3951),g=r(4096),Y=r(1531);y.f=u&&!h?Object.defineProperties:function(_,k){p(_);for(var C,j=g(k),F=Y(k),R=F.length,O=0;R>O;)f.f(_,C=F[O++],j[C]);return _}},8352:function(o,y,r){var u=r(3476),h=r(9888),f=r(1576),p=r(3951),g=r(88),Y=TypeError,_=Object.defineProperty,k=Object.getOwnPropertyDescriptor,C="enumerable",j="configurable",F="writable";y.f=u?f?function(R,O,v){if(p(R),O=g(O),p(v),typeof R=="function"&&O==="prototype"&&"value"in v&&F in v&&!v[F]){var T=k(R,O);T&&T[F]&&(R[O]=v.value,v={configurable:j in v?v[j]:T[j],enumerable:C in v?v[C]:T[C],writable:!1})}return _(R,O,v)}:_:function(R,O,v){if(p(R),O=g(O),p(v),h)try{return _(R,O,v)}catch{}if("get"in v||"set"in v)throw new Y("Accessors not supported");return"value"in v&&(R[O]=v.value),R}},9444:function(o,y,r){var u=r(3476),h=r(8448),f=r(8912),p=r(9728),g=r(4096),Y=r(88),_=r(5152),k=r(9888),C=Object.getOwnPropertyDescriptor;y.f=u?C:function(j,F){if(j=g(j),F=Y(F),k)try{return C(j,F)}catch{}if(_(j,F))return p(!h(f.f,j,F),j[F])}},5048:function(o,y,r){var u=r(9008),h=r(8256).concat("length","prototype");y.f=Object.getOwnPropertyNames||function(f){return u(f,h)}},9392:function(o,y){y.f=Object.getOwnPropertySymbols},7796:function(o,y,r){var u=r(5152),h=r(4328),f=r(4356),p=r(6504),g=r(2272),Y=p("IE_PROTO"),_=Object,k=_.prototype;o.exports=g?_.getPrototypeOf:function(C){var j=f(C);if(u(j,Y))return j[Y];var F=j.constructor;return h(F)&&j instanceof F?F.prototype:j instanceof _?k:null}},7e3:function(o,y,r){var u=r(1664);o.exports=u({}.isPrototypeOf)},9008:function(o,y,r){var u=r(1664),h=r(5152),f=r(4096),p=r(2504).indexOf,g=r(2560),Y=u([].push);o.exports=function(_,k){var C,j=f(_),F=0,R=[];for(C in j)!h(g,C)&&h(j,C)&&Y(R,C);for(;k.length>F;)h(j,C=k[F++])&&(~p(R,C)||Y(R,C));return R}},1531:function(o,y,r){var u=r(9008),h=r(8256);o.exports=Object.keys||function(f){return u(f,h)}},8912:function(o,y){var r={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,h=u&&!r.call({1:2},1);y.f=h?function(f){var p=u(this,f);return!!p&&p.enumerable}:r},4024:function(o,y,r){var u=r(5288),h=r(3951),f=r(2096);o.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,g=!1,Y={};try{(p=u(Object.prototype,"__proto__","set"))(Y,[]),g=Y instanceof Array}catch{}return function(_,k){return h(_),f(k),g?p(_,k):_.__proto__=k,_}})():void 0)},7032:function(o,y,r){var u=r(16),h=r(4427);o.exports=u?{}.toString:function(){return"[object "+h(this)+"]"}},2104:function(o,y,r){var u=r(8448),h=r(4328),f=r(1632),p=TypeError;o.exports=function(g,Y){var _,k;if(Y==="string"&&h(_=g.toString)&&!f(k=u(_,g))||h(_=g.valueOf)&&!f(k=u(_,g))||Y!=="string"&&h(_=g.toString)&&!f(k=u(_,g)))return k;throw new p("Can't convert object to primitive value")}},9252:function(o,y,r){var u=r(5232),h=r(1664),f=r(5048),p=r(9392),g=r(3951),Y=h([].concat);o.exports=u("Reflect","ownKeys")||function(_){var k=f.f(g(_)),C=p.f;return C?Y(k,C(_)):k}},584:function(o,y,r){var u=r(8352).f;o.exports=function(h,f,p){p in h||u(h,p,{configurable:!0,get:function(){return f[p]},set:function(g){f[p]=g}})}},9092:function(o,y,r){var u=r(8448),h=r(3951),f=r(4328),p=r(1888),g=r(7680),Y=TypeError;o.exports=function(_,k){var C=_.exec;if(f(C)){var j=u(C,_,k);return j!==null&&h(j),j}if(p(_)==="RegExp")return u(g,_,k);throw new Y("RegExp#exec called on incompatible receiver")}},7680:function(o,y,r){var u,h,f=r(8448),p=r(1664),g=r(5016),Y=r(8872),_=r(3548),k=r(4696),C=r(9368),j=r(9104).get,F=r(8e3),R=r(9124),O=k("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,T=v,w=p("".charAt),S=p("".indexOf),V=p("".replace),E=p("".slice),A=(h=/b*/g,f(v,u=/a/,"a"),f(v,h,"a"),u.lastIndex!==0||h.lastIndex!==0),z=_.BROKEN_CARET,B=/()??/.exec("")[1]!==void 0;(A||B||z||F||R)&&(T=function(ee){var ie,re,fe,te,de,ve,me,oe=this,Z=j(oe),Ne=g(ee),Ie=Z.raw;if(Ie)return Ie.lastIndex=oe.lastIndex,ie=f(T,Ie,Ne),oe.lastIndex=Ie.lastIndex,ie;var Ce=Z.groups,Oe=z&&oe.sticky,$=f(Y,oe),J=oe.source,X=0,P=Ne;if(Oe&&($=V($,"y",""),S($,"g")===-1&&($+="g"),P=E(Ne,oe.lastIndex),oe.lastIndex>0&&(!oe.multiline||oe.multiline&&w(Ne,oe.lastIndex-1)!==`
|
|
85
85
|
`)&&(J="(?: "+J+")",P=" "+P,X++),re=new RegExp("^(?:"+J+")",$)),B&&(re=new RegExp("^"+J+"$(?!\\s)",$)),A&&(fe=oe.lastIndex),te=f(v,Oe?re:oe,P),Oe?te?(te.input=E(te.input,X),te[0]=E(te[0],X),te.index=oe.lastIndex,oe.lastIndex+=te[0].length):oe.lastIndex=0:A&&te&&(oe.lastIndex=oe.global?te.index+te[0].length:fe),B&&te&&te.length>1&&f(O,te[0],re,(function(){for(de=1;de<arguments.length-2;de++)arguments[de]===void 0&&(te[de]=void 0)})),te&&Ce)for(te.groups=ve=C(null),de=0;de<Ce.length;de++)ve[(me=Ce[de])[0]]=te[me[1]];return te}),o.exports=T},8872:function(o,y,r){var u=r(3951);o.exports=function(){var h=u(this),f="";return h.hasIndices&&(f+="d"),h.global&&(f+="g"),h.ignoreCase&&(f+="i"),h.multiline&&(f+="m"),h.dotAll&&(f+="s"),h.unicode&&(f+="u"),h.unicodeSets&&(f+="v"),h.sticky&&(f+="y"),f}},3548:function(o,y,r){var u=r(9957),h=r(6420).RegExp,f=u((function(){var Y=h("a","y");return Y.lastIndex=2,Y.exec("abcd")!==null})),p=f||u((function(){return!h("a","y").sticky})),g=f||u((function(){var Y=h("^r","gy");return Y.lastIndex=2,Y.exec("str")!==null}));o.exports={BROKEN_CARET:g,MISSED_STICKY:p,UNSUPPORTED_Y:f}},8e3:function(o,y,r){var u=r(9957),h=r(6420).RegExp;o.exports=u((function(){var f=h(".","s");return!(f.dotAll&&f.test(`
|
|
86
|
-
`)&&f.flags==="s")}))},9124:function(o,y,r){var u=r(9957),h=r(6420).RegExp;o.exports=u((function(){var f=h("(?<a>b)","g");return f.exec("b").groups.a!=="b"||"b".replace(f,"$<a>c")!=="bc"}))},5436:function(o,y,r){var u=r(9760),h=TypeError;o.exports=function(f){if(u(f))throw new h("Can't call method on "+f);return f}},6504:function(o,y,r){var u=r(4696),h=r(7776),f=u("keys");o.exports=function(p){return f[p]||(f[p]=h(p))}},3976:function(o,y,r){var u=r(7048),h=r(6420),f=r(4636),p="__core-js_shared__",g=o.exports=h[p]||f(p,{});(g.versions||(g.versions=[])).push({version:"3.36.0",mode:u?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:function(o,y,r){var u=r(3976);o.exports=function(h,f){return u[h]||(u[h]=f||{})}},9764:function(o,y,r){var u=r(1664),h=r(6180),f=r(5016),p=r(5436),g=u("".charAt),Y=u("".charCodeAt),_=u("".slice),k=function(C){return function(j,F){var R,O,v=f(p(j)),T=h(F),w=v.length;return T<0||T>=w?C?"":void 0:(R=Y(v,T))<55296||R>56319||T+1===w||(O=Y(v,T+1))<56320||O>57343?C?g(v,T):R:C?_(v,T,T+2):O-56320+(R-55296<<10)+65536}};o.exports={codeAt:k(!1),charAt:k(!0)}},772:function(o,y,r){var u=r(8504),h=r(9957),f=r(6420).String;o.exports=!!Object.getOwnPropertySymbols&&!h((function(){var p=Symbol("symbol detection");return!f(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&u&&u<41}))},2495:function(o,y,r){var u=r(6180),h=Math.max,f=Math.min;o.exports=function(p,g){var Y=u(p);return Y<0?h(Y+g,0):f(Y,g)}},4096:function(o,y,r){var u=r(5712),h=r(5436);o.exports=function(f){return u(h(f))}},6180:function(o,y,r){var u=r(1748);o.exports=function(h){var f=+h;return f!=f||f===0?0:u(f)}},7584:function(o,y,r){var u=r(6180),h=Math.min;o.exports=function(f){var p=u(f);return p>0?h(p,9007199254740991):0}},4356:function(o,y,r){var u=r(5436),h=Object;o.exports=function(f){return h(u(f))}},7024:function(o,y,r){var u=r(8448),h=r(1632),f=r(7728),p=r(4504),g=r(2104),Y=r(9972),_=TypeError,k=Y("toPrimitive");o.exports=function(C,j){if(!h(C)||f(C))return C;var F,R=p(C,k);if(R){if(j===void 0&&(j="default"),F=u(R,C,j),!h(F)||f(F))return F;throw new _("Can't convert object to primitive value")}return j===void 0&&(j="number"),g(C,j)}},88:function(o,y,r){var u=r(7024),h=r(7728);o.exports=function(f){var p=u(f,"string");return h(p)?p:p+""}},16:function(o,y,r){var u={};u[r(9972)("toStringTag")]="z",o.exports=String(u)==="[object z]"},5016:function(o,y,r){var u=r(4427),h=String;o.exports=function(f){if(u(f)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return h(f)}},36:function(o){var y=String;o.exports=function(r){try{return y(r)}catch{return"Object"}}},7776:function(o,y,r){var u=r(1664),h=0,f=Math.random(),p=u(1 .toString);o.exports=function(g){return"Symbol("+(g===void 0?"":g)+")_"+p(++h+f,36)}},6536:function(o,y,r){var u=r(772);o.exports=u&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(o,y,r){var u=r(3476),h=r(9957);o.exports=u&&h((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(o,y,r){var u=r(6420),h=r(4328),f=u.WeakMap;o.exports=h(f)&&/native code/.test(String(f))},9972:function(o,y,r){var u=r(6420),h=r(4696),f=r(5152),p=r(7776),g=r(772),Y=r(6536),_=u.Symbol,k=h("wks"),C=Y?_.for||_:_&&_.withoutSetter||p;o.exports=function(j){return f(k,j)||(k[j]=g&&f(_,j)?_[j]:C("Symbol."+j)),k[j]}},6488:function(o,y,r){var u=r(5232),h=r(5152),f=r(3440),p=r(7e3),g=r(4024),Y=r(9968),_=r(584),k=r(7512),C=r(8948),j=r(3480),F=r(3696),R=r(3476),O=r(7048);o.exports=function(v,T,w,S){var V="stackTraceLimit",E=S?2:1,A=v.split("."),z=A[A.length-1],B=u.apply(null,A);if(B){var ee=B.prototype;if(!O&&h(ee,"cause")&&delete ee.cause,!w)return B;var ie=u("Error"),re=T((function(fe,te){var de=C(S?te:fe,void 0),ve=S?new B(fe):new B;return de!==void 0&&f(ve,"message",de),F(ve,re,ve.stack,2),this&&p(ee,this)&&k(ve,this,re),arguments.length>E&&j(ve,arguments[E]),ve}));if(re.prototype=ee,z!=="Error"?g?g(re,ie):Y(re,ie,{name:!0}):R&&V in B&&(_(re,B,V),_(re,B,"prepareStackTrace")),Y(re,B),!O)try{ee.name!==z&&f(ee,"name",z),ee.constructor=re}catch{}return re}}},7476:function(o,y,r){var u=r(9160),h=r(9957),f=r(1432),p=r(1632),g=r(4356),Y=r(3556),_=r(4316),k=r(92),C=r(2568),j=r(953),F=r(9972),R=r(8504),O=F("isConcatSpreadable"),v=R>=51||!h((function(){var w=[];return w[O]=!1,w.concat()[0]!==w})),T=function(w){if(!p(w))return!1;var S=w[O];return S!==void 0?!!S:f(w)};u({target:"Array",proto:!0,arity:1,forced:!v||!j("concat")},{concat:function(w){var S,V,E,A,z,B=g(this),ee=C(B,0),ie=0;for(S=-1,E=arguments.length;S<E;S++)if(T(z=S===-1?B:arguments[S]))for(A=Y(z),_(ie+A),V=0;V<A;V++,ie++)V in z&&k(ee,ie,z[V]);else _(ie+1),k(ee,ie++,z);return ee.length=ie,ee}})},6932:function(o,y,r){var u=r(9160),h=r(3364).filter;u({target:"Array",proto:!0,forced:!r(953)("filter")},{filter:function(f){return h(this,f,arguments.length>1?arguments[1]:void 0)}})},700:function(o,y,r){var u=r(9160),h=r(1664),f=r(5712),p=r(4096),g=r(1496),Y=h([].join);u({target:"Array",proto:!0,forced:f!==Object||!g("join",",")},{join:function(_){return Y(p(this),_===void 0?",":_)}})},4456:function(o,y,r){var u=r(9160),h=r(3364).map;u({target:"Array",proto:!0,forced:!r(953)("map")},{map:function(f){return h(this,f,arguments.length>1?arguments[1]:void 0)}})},4728:function(o,y,r){var u=r(9160),h=r(4356),f=r(3556),p=r(6728),g=r(4316);u({target:"Array",proto:!0,arity:1,forced:r(9957)((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!(function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(Y){return Y instanceof TypeError}})()},{push:function(Y){var _=h(this),k=f(_),C=arguments.length;g(k+C);for(var j=0;j<C;j++)_[k]=arguments[j],k++;return p(_,k),k}})},8752:function(o,y,r){var u=r(9160),h=r(6420),f=r(908),p=r(6488),g="WebAssembly",Y=h[g],_=new Error("e",{cause:7}).cause!==7,k=function(j,F){var R={};R[j]=p(j,F,_),u({global:!0,constructor:!0,arity:1,forced:_},R)},C=function(j,F){if(Y&&Y[j]){var R={};R[j]=p(g+"."+j,F,_),u({target:g,stat:!0,constructor:!0,arity:1,forced:_},R)}};k("Error",(function(j){return function(F){return f(j,this,arguments)}})),k("EvalError",(function(j){return function(F){return f(j,this,arguments)}})),k("RangeError",(function(j){return function(F){return f(j,this,arguments)}})),k("ReferenceError",(function(j){return function(F){return f(j,this,arguments)}})),k("SyntaxError",(function(j){return function(F){return f(j,this,arguments)}})),k("TypeError",(function(j){return function(F){return f(j,this,arguments)}})),k("URIError",(function(j){return function(F){return f(j,this,arguments)}})),C("CompileError",(function(j){return function(F){return f(j,this,arguments)}})),C("LinkError",(function(j){return function(F){return f(j,this,arguments)}})),C("RuntimeError",(function(j){return function(F){return f(j,this,arguments)}}))},508:function(o,y,r){var u=r(3476),h=r(6208).EXISTS,f=r(1664),p=r(2544),g=Function.prototype,Y=f(g.toString),_=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,k=f(_.exec);u&&!h&&p(g,"name",{configurable:!0,get:function(){try{return k(_,Y(this))[1]}catch{return""}}})},232:function(o,y,r){var u=r(9160),h=r(9292);u({target:"Object",stat:!0,arity:2,forced:Object.assign!==h},{assign:h})},5443:function(o,y,r){var u=r(16),h=r(6076),f=r(7032);u||h(Object.prototype,"toString",f,{unsafe:!0})},880:function(o,y,r){var u=r(9160),h=r(7680);u({target:"RegExp",proto:!0,forced:/./.exec!==h},{exec:h})},9836:function(o,y,r){var u=r(8448),h=r(7176),f=r(3951),p=r(9760),g=r(7584),Y=r(5016),_=r(5436),k=r(4504),C=r(4764),j=r(9092);h("match",(function(F,R,O){return[function(v){var T=_(this),w=p(v)?void 0:k(v,F);return w?u(w,v,T):new RegExp(v)[F](Y(T))},function(v){var T=f(this),w=Y(v),S=O(R,T,w);if(S.done)return S.value;if(!T.global)return j(T,w);var V=T.unicode;T.lastIndex=0;for(var E,A=[],z=0;(E=j(T,w))!==null;){var B=Y(E[0]);A[z]=B,B===""&&(T.lastIndex=C(w,g(T.lastIndex),V)),z++}return z===0?null:A}]}))},3536:function(o,y,r){var u=r(9160),h=r(6420),f=r(6100),p=r(3951),g=r(4328),Y=r(7796),_=r(2544),k=r(92),C=r(9957),j=r(5152),F=r(9972),R=r(336).IteratorPrototype,O=r(3476),v=r(7048),T="constructor",w="Iterator",S=F("toStringTag"),V=TypeError,E=h[w],A=v||!g(E)||E.prototype!==R||!C((function(){E({})})),z=function(){if(f(this,R),Y(this)===R)throw new V("Abstract class Iterator not directly constructable")},B=function(ee,ie){O?_(R,ee,{configurable:!0,get:function(){return ie},set:function(re){if(p(this),this===R)throw new V("You can't redefine this property");j(this,ee)?this[ee]=re:k(this,ee,re)}}):R[ee]=ie};j(R,S)||B(S,w),!A&&j(R,T)&&R[T]!==Object||B(T,z),z.prototype=R,u({global:!0,constructor:!0,forced:A},{Iterator:z})},2144:function(o,y,r){var u=r(9160),h=r(8448),f=r(8952),p=r(3951),g=r(6752),Y=r(9724),_=r(8696),k=r(7048),C=Y((function(){for(var j,F,R=this.iterator,O=this.predicate,v=this.next;;){if(j=p(h(v,R)),this.done=!!j.done)return;if(F=j.value,_(R,O,[F,this.counter++],!0))return F}}));u({target:"Iterator",proto:!0,real:!0,forced:k},{filter:function(j){return p(this),f(j),new C(g(this),{predicate:j})}})},9080:function(o,y,r){var u=r(9160),h=r(5792);u({target:"Iterator",proto:!0,real:!0,forced:r(7048)},{map:h})}},M={};function x(o){var y=M[o];if(y!==void 0)return y.exports;var r=M[o]={exports:{}};return i[o].call(r.exports,r,r.exports,x),r.exports}x.d=function(o,y){for(var r in y)x.o(y,r)&&!x.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:y[r]})},x.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),x.o=function(o,y){return Object.prototype.hasOwnProperty.call(o,y)},x.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var I={};return(function(){x.r(I),x.d(I,{default:function(){return _}}),x(8752),x(6932),x(700),x(4456),x(4728),x(508),x(232),x(5443),x(880),x(9836),x(3536),x(2144),x(9080);var o=x(680);x(7476);function y(k,C){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,F){return j.__proto__=F,j},y(k,C)}var r=(function(k){var C,j;function F(){for(var O,v=arguments.length,T=new Array(v),w=0;w<v;w++)T[w]=arguments[w];return(O=k.call.apply(k,[this].concat(T))||this).state={bump:!1,debounced:!1},O}j=k,(C=F).prototype=Object.create(j.prototype),C.prototype.constructor=C,y(C,j);var R=F.prototype;return R.componentWillMount=function(){var O,v,T,w=this;this.debounceStatusUpdate=(O=function(){if(!w.state.debounced){var S=!w.props.isInFocus||w.props.validChoiceMade;w.setState((function(V){return{bump:!V.bump,debounced:!0,silenced:S}}))}},v=1400,function(){var S=this,V=arguments;clearTimeout(T),T=setTimeout((function(){T=null,O.apply(S,V)}),v)})},R.componentWillReceiveProps=function(O){O.queryLength,this.setState({debounced:!1})},R.render=function(){var O=this.props,v=O.id,T=O.length,w=O.queryLength,S=O.minQueryLength,V=O.selectedOption,E=O.selectedOptionIndex,A=O.tQueryTooShort,z=O.tNoResults,B=O.tSelectedOption,ee=O.tResults,ie=O.className,re=this.state,fe=re.bump,te=re.debounced,de=re.silenced,ve=w<S,me=T===0,oe=V?B(V,T,E):"",Z=null;return Z=ve?A(S):me?z():ee(T,oe),this.debounceStatusUpdate(),(0,o.createElement)("div",{className:ie,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:v+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!de&&te&&fe?Z:""),(0,o.createElement)("div",{id:v+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},de||!te||fe?"":Z))},F})(o.Component);r.defaultProps={tQueryTooShort:function(k){return"Type in "+k+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(k,C,j){return k+" "+(j+1)+" of "+C+" is highlighted"},tResults:function(k,C){return k+" "+(k===1?"result":"results")+" "+(k===1?"is":"are")+" available. "+C}};var u=function(k){var C=k.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:C,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function h(){return h=Object.assign?Object.assign.bind():function(k){for(var C=1;C<arguments.length;C++){var j=arguments[C];for(var F in j)Object.prototype.hasOwnProperty.call(j,F)&&(k[F]=j[F])}return k},h.apply(this,arguments)}function f(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function p(k,C){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,F){return j.__proto__=F,j},p(k,C)}var g={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function Y(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var _=(function(k){var C,j;function F(O){var v;return(v=k.call(this,O)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:O.defaultValue?[O.defaultValue]:[],query:O.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(f(v)),v.handleKeyDown=v.handleKeyDown.bind(f(v)),v.handleUpArrow=v.handleUpArrow.bind(f(v)),v.handleDownArrow=v.handleDownArrow.bind(f(v)),v.handleEnter=v.handleEnter.bind(f(v)),v.handlePrintableKey=v.handlePrintableKey.bind(f(v)),v.handleListMouseLeave=v.handleListMouseLeave.bind(f(v)),v.handleOptionBlur=v.handleOptionBlur.bind(f(v)),v.handleOptionClick=v.handleOptionClick.bind(f(v)),v.handleOptionFocus=v.handleOptionFocus.bind(f(v)),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(f(v)),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(f(v)),v.handleInputBlur=v.handleInputBlur.bind(f(v)),v.handleInputChange=v.handleInputChange.bind(f(v)),v.handleInputClick=v.handleInputClick.bind(f(v)),v.handleInputFocus=v.handleInputFocus.bind(f(v)),v.pollInputElement=v.pollInputElement.bind(f(v)),v.getDirectInputChanges=v.getDirectInputChanges.bind(f(v)),v}j=k,(C=F).prototype=Object.create(j.prototype),C.prototype.constructor=C,p(C,j);var R=F.prototype;return R.isQueryAnOption=function(O,v){var T=this;return v.map((function(w){return T.templateInputValue(w).toLowerCase()})).indexOf(O.toLowerCase())!==-1},R.componentDidMount=function(){this.pollInputElement()},R.componentWillUnmount=function(){clearTimeout(this.$pollInput)},R.pollInputElement=function(){var O=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){O.pollInputElement()}),100)},R.getDirectInputChanges=function(){var O=this.elementReferences[-1];O&&O.value!==this.state.query&&this.handleInputChange({target:{value:O.value}})},R.componentDidUpdate=function(O,v){var T=this.state.focused,w=T===null,S=v.focused!==T;S&&!w&&this.elementReferences[T].focus();var V=T===-1,E=S&&v.focused===null;if(V&&E){var A=this.elementReferences[T];A.setSelectionRange(0,A.value.length)}},R.hasAutoselect=function(){return!Y()&&this.props.autoselect},R.templateInputValue=function(O){var v=this.props.templates&&this.props.templates.inputValue;return v?v(O):O},R.templateSuggestion=function(O){var v=this.props.templates&&this.props.templates.suggestion;return v?v(O):O},R.handleComponentBlur=function(O){var v,T=this.state,w=T.options,S=T.query,V=T.selected;this.props.confirmOnBlur?(v=O.query||S,this.props.onConfirm(w[V])):v=S,this.setState({focused:null,menuOpen:O.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,w)})},R.handleListMouseLeave=function(O){this.setState({hovered:null})},R.handleOptionBlur=function(O,v){var T=this.state,w=T.focused,S=T.menuOpen,V=T.options,E=T.selected,A=O.relatedTarget===null,z=O.relatedTarget===this.elementReferences[-1],B=w!==v&&w!==-1;if(!B&&A||!(B||z)){var ee=S&&Y();this.handleComponentBlur({menuOpen:ee,query:this.templateInputValue(V[E])})}},R.handleInputBlur=function(O){var v=this.state,T=v.focused,w=v.menuOpen,S=v.options,V=v.query,E=v.selected;if(T===-1){var A=w&&Y(),z=Y()?V:this.templateInputValue(S[E]);this.handleComponentBlur({menuOpen:A,query:z})}},R.handleInputChange=function(O){var v=this,T=this.props,w=T.minLength,S=T.source,V=T.showAllValues,E=this.hasAutoselect(),A=O.target.value,z=A.length===0,B=this.state.query!==A,ee=A.length>=w;this.setState({query:A,ariaHint:z}),V||!z&&B&&ee?S(A,(function(ie){var re=ie.length>0;v.setState({menuOpen:re,options:ie,selected:E&&re?0:-1,validChoiceMade:!1})})):!z&&ee||this.setState({menuOpen:!1,options:[]})},R.handleInputClick=function(O){this.handleInputChange(O)},R.handleInputFocus=function(O){var v=this.state,T=v.query,w=v.validChoiceMade,S=v.options,V=this.props.minLength,E=!w&&T.length>=V&&S.length>0;E?this.setState((function(A){var z=A.menuOpen;return{focused:-1,menuOpen:E||z,selected:-1}})):this.setState({focused:-1})},R.handleOptionFocus=function(O){this.setState({focused:O,hovered:null,selected:O})},R.handleOptionMouseEnter=function(O,v){Y()||this.setState({hovered:v})},R.handleOptionClick=function(O,v){var T=this.state.options[v],w=this.templateInputValue(T);this.props.onConfirm(T),this.setState({focused:-1,hovered:null,menuOpen:!1,query:w,selected:-1,validChoiceMade:!0}),this.forceUpdate()},R.handleOptionMouseDown=function(O){O.preventDefault()},R.handleUpArrow=function(O){O.preventDefault();var v=this.state,T=v.menuOpen,w=v.selected;w!==-1&&T&&this.handleOptionFocus(w-1)},R.handleDownArrow=function(O){var v=this;if(O.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)O.preventDefault(),this.props.source("",(function(E){v.setState({menuOpen:!0,options:E,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var T=this.state,w=T.menuOpen,S=T.options,V=T.selected;V!==S.length-1&&w&&this.handleOptionFocus(V+1)}},R.handleSpace=function(O){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(O.preventDefault(),this.props.source("",(function(T){v.setState({menuOpen:!0,options:T})}))),this.state.focused!==-1&&(O.preventDefault(),this.handleOptionClick(O,this.state.focused))},R.handleEnter=function(O){this.state.menuOpen&&(O.preventDefault(),this.state.selected>=0&&this.handleOptionClick(O,this.state.selected))},R.handlePrintableKey=function(O){var v=this.elementReferences[-1];O.target===v||v.focus()},R.handleKeyDown=function(O){switch(g[O.keyCode]){case"up":this.handleUpArrow(O);break;case"down":this.handleDownArrow(O);break;case"space":this.handleSpace(O);break;case"enter":this.handleEnter(O);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((v=O.keyCode)>47&&v<58||v===32||v===8||v>64&&v<91||v>95&&v<112||v>185&&v<193||v>218&&v<223)&&this.handlePrintableKey(O)}var v},R.render=function(){var O,v=this,T=this.props,w=T.cssNamespace,S=T.displayMenu,V=T.id,E=T.minLength,A=T.name,z=T.placeholder,B=T.required,ee=T.showAllValues,ie=T.tNoResults,re=T.tStatusQueryTooShort,fe=T.tStatusNoResults,te=T.tStatusSelectedOption,de=T.tStatusResults,ve=T.tAssistiveHint,me=T.dropdownArrow,oe=T.menuAttributes,Z=T.inputClasses,Ne=T.hintClasses,Ie=T.menuClasses,Ce=this.state,Oe=Ce.focused,$=Ce.hovered,J=Ce.menuOpen,X=Ce.options,P=Ce.query,H=Ce.selected,N=Ce.ariaHint,W=Ce.validChoiceMade,q=this.hasAutoselect(),ce=Oe===-1,se=X.length===0,Pe=P.length!==0,ge=P.length>=E,_e=this.props.showNoOptionsFound&&ce&&se&&Pe&&ge,$e=w+"__wrapper",Re=w+"__status",dt=w+"__dropdown-arrow-down",Ue=Oe!==-1&&Oe!==null,st=w+"__option",Ct=w+"__hint",ot=this.templateInputValue(X[H]),je=ot&&ot.toLowerCase().indexOf(P.toLowerCase())===0&&q?P+ot.substr(P.length):"",jt=V+"__assistiveHint",At={"aria-describedby":N?jt:null,"aria-expanded":J?"true":"false","aria-activedescendant":Ue?V+"__option--"+Oe:null,"aria-controls":V+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};ee&&typeof(O=me({className:dt}))=="string"&&(O=(0,o.createElement)("div",{className:w+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:O}}));var lt=w+"__input",pt=[lt,this.props.showAllValues?lt+"--show-all-values":lt+"--default"];Oe!==null&&pt.push(lt+"--focused"),Z&&pt.push(Z);var ht=w+"__menu",rt=[ht,ht+"--"+S,ht+"--"+(J||_e?"visible":"hidden")];Ie&&rt.push(Ie),(oe!=null&&oe.class||oe!=null&&oe.className)&&rt.push(oe?.class||oe?.className);var gt=Object.assign({"aria-labelledby":V},oe,{id:V+"__listbox",role:"listbox",className:rt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete gt.class,(0,o.createElement)("div",{className:$e,onKeyDown:this.handleKeyDown},(0,o.createElement)(r,{id:V,length:X.length,queryLength:P.length,minQueryLength:E,selectedOption:this.templateInputValue(X[H]),selectedOptionIndex:H,validChoiceMade:W,isInFocus:this.state.focused!==null,tQueryTooShort:re,tNoResults:fe,tSelectedOption:te,tResults:de,className:Re}),je&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:[Ct,Ne===null?Z:Ne].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:je})),(0,o.createElement)("input",h({},At,{autoComplete:"off",className:pt.join(" "),id:V,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:A,placeholder:z,ref:function(vt){v.elementReferences[-1]=vt},type:"text",role:"combobox",required:B,value:P})),O,(0,o.createElement)("ul",gt,X.map((function(vt,We){var ft=(Oe===-1?H===We:Oe===We)&&$===null?" "+st+"--focused":"",ut=We%2?" "+st+"--odd":"",at=Y()?"<span id="+V+"__option-suffix--"+We+' 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"> '+(We+1)+" of "+X.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Oe===We?"true":"false",className:""+st+ft+ut,dangerouslySetInnerHTML:{__html:v.templateSuggestion(vt)+at},id:V+"__option--"+We,key:We,onBlur:function(Qe){return v.handleOptionBlur(Qe,We)},onClick:function(Qe){return v.handleOptionClick(Qe,We)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(Qe){return v.handleOptionMouseEnter(Qe,We)},ref:function(Qe){v.elementReferences[We]=Qe},role:"option",tabIndex:"-1","aria-posinset":We+1,"aria-setsize":X.length})})),_e&&(0,o.createElement)("li",{className:st+" "+st+"--no-results",role:"option","aria-disabled":"true"},ie())),(0,o.createElement)("span",{id:jt,style:{display:"none"}},ve()))},F})(o.Component);_.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:u,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),I})()}))})(gr)),gr.exports}var an,Ns;function Vf(){return Ns||(Ns=1,an=Ff()),an}var zf=Vf();const Lf=hn(zf),Wf=({value:l,defaultValue:s="",onConfirm:c,source:i,disabled:M,onClear:x,tClearInput:I=()=>"Clear input",...o})=>{const y=G.useRef(null),r=p=>{setTimeout(()=>{y.current&&(y.current.elementReferences[-1].value=p)},0)};G.useEffect(()=>{l!==void 0&&r(l)},[l]),G.useEffect(()=>{M?y.current&&(y.current.elementReferences[-1].disabled=!0):y.current&&(y.current.elementReferences[-1].disabled=!1)},[M]);const u=()=>{x&&x()},h=(p,g)=>{y.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&i(p,g)},f=p=>{p?c(p):r(l)};return m.jsxs("div",{style:{position:"relative",width:"100%"},children:[m.jsx(Lf,{ref:y,...o,defaultValue:s,onConfirm:f,source:h}),!!(l&&l.length>0&&!M)&&m.jsx("button",{onClick:u,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":I(),children:m.jsx(ue.Icon,{icon:"it-close",size:"sm",title:I()})})]})},qf="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==",Hf="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=",$f="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Bf=({position:l,areasLayer:s,bounds:c,onMarkedMoved:i})=>{const M=G.useRef(null);let x=null;const[I,o]=G.useState([]),y=Rt.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),r=[41.9,12.5],u=()=>{const h=Rt.map(M.current,{keyboard:!1,minZoom:6,maxZoom:17}).setView(r,10);y.addTo(h),s&&s.map(p=>{p.addTo(h)});const f=l?[`${l.lat}`,`${l.lon}`]:c?c.getCenter():r;if(delete Rt.Icon.Default.prototype._getIconUrl,Rt.Icon.Default.mergeOptions({iconRetinaUrl:qf,iconUrl:Hf,shadowUrl:$f}),x=Rt.marker(f,{draggable:!0}).addTo(h),x.on("moveend",function(p){const g=p.target.getLatLng();i(g,x)}),!l&&c)h.fitBounds(c);else{const p=l?[l.lat,l.lon]:r;x&&(x.setLatLng(p).update(),h.setView(p,15))}};return G.useEffect(()=>{M.current&&u()},[M]),m.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:m.jsx("div",{ref:M,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},Uf=({component:l,value:s,current:c,onChange:i,i18next:M})=>{const[x,I]=G.useState(null),[o,y]=G.useState([]),[r,u]=G.useState(),[h,f]=G.useState(),[p,g]=G.useState(!1),[Y,_]=G.useState(),[k,C]=G.useState(!1),[j,F]=G.useState(),[R,O]=G.useState(),[v,T]=G.useState(!1),[w,S]=G.useState(""),[V,E]=G.useState(""),[A,z]=G.useState(!1),[B,ee]=G.useState(!1),re=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:fe}=window.OC_SERVICE_DETAILS,te=G.useRef(),de=M.language;let ve=Rt.latLngBounds();const me=re||(fe&&fe.length>0?fe:void 0),oe=(X,P)=>{te.current=X;const H=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(X)}&countrycodes=it&viewbox=${r}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${de}`;let N=[],W=[];C(!0),fetch(H).then(q=>q.json()).then(q=>{if(q.length&&te.current===X){C(!0);const ce=q.map((se,Pe)=>{const{lat:ge,lon:_e}=se,$e=`${Ee()}/api/geographic-areas/contains?lat=${ge}&lon=${_e}&geographic_areas_ids=${Y.join(",")}`;return fetch($e).then(Re=>Re.json()).then(Re=>Re.result?(se.label=Jr(se),se):null)});return Promise.all(ce)}else te.current===X&&(P([]),C(!1))}).then(q=>{q=q?q.filter(ce=>ce!==null):[],q.length>0?(q.forEach((ce,se)=>{q[se].label=Jr(ce)}),q=li.uniqWith(q,(ce,se)=>ce.label===se.label),q.forEach((ce,se)=>{W.push(ce.label),N.push(ce)}),te.current===X&&(P(W),y(N),C(!1))):te.current===X&&(P([]),C(!1))}).catch(q=>{console.error("Error fetching locations:",q),C(!1)})},Z=(X,P)=>{oe(X,P)},Ne=(X,P)=>{const{lat:H,lng:N}=X,W=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${H}&lon=${N}&accept-language=${de}`;fetch(W).then(q=>q.json()).then(q=>{if(q&&q.display_name)if(q.label=Jr(q),q.lat=H,q.lon=N,P)P.bindPopup(`${q.label}`).openPopup(),O(q);else{O(q);return}}).catch(q=>console.error("Error with reverse geocoding:",q))};function Ie(){navigator.geolocation.getCurrentPosition(X=>{let P=X.coords.latitude,H=X.coords.longitude;if((Y||[]).length>0){const W=`${Ee()}/api/geographic-areas/contains?lat=${P}&lon=${H}&geographic_areas_ids=${Y.join(",")}`;fetch(W).then(q=>q.json()).then(q=>{q.result&&(I({lat:P,lon:H}),Ne({lat:P,lng:H})),ee(!B)})}else I({lat:P,lon:H}),Ne({lat:P,lng:H}),ee(!B)},X=>{X?.code===1?(z(!A),E(M.t("error_message_code_1"))):X?.code===2?(z(!A),E(M.t("error_message_code_2"))):X?.code===3?(z(!A),E(M.t("error_message_code_3"))):(z(!A),E(M.t("error_message_generic")))})}G.useEffect(()=>{s&&I(s),c.valuePosition&&I(c.valuePosition)},[s,c]);const Ce=()=>{s&&I(s),c.valuePosition&&I(c.valuePosition)};G.useEffect(()=>{window?.Formio?.formioReady.then(()=>{setTimeout(()=>{Ce(),Oe()},1)})},[]);const Oe=()=>{let P=`${Ee()}/api/geographic-areas`,H=[],N=[];fetch(P).then(W=>W.json()).then(W=>{if(Array.isArray(W)&&W.length>0){W.filter(se=>me?Array.isArray(me)?me.includes(se.id):se.id===me:!0).forEach(se=>{H.push(se.id);const Pe=JSON.parse(se.geofence),ge=Rt.geoJSON(Pe,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(_e){return _e.geometry.type==="Polygon"||_e.geometry.type==="MultiPolygon"}});ve.extend(ge.getBounds()),N.push(ge)}),f(N),_(H),F(ve);const q=ve.getNorthEast(),ce=ve.getSouthWest();u([q.lng,q.lat,ce.lng,ce.lat])}else console.log("No geographic_areas_ids found.")}).catch(W=>{console.error("Error with reverse geocoding:",W)})},$=()=>{S(x?.label?x.label:"")};G.useEffect(()=>{$(),i(x)},[x]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&v===!1?T(!0):T(!1)},[]);const J=()=>{if(R){const X=`${Ee()}/api/geographic-areas/contains?lat=${R.lat}&lon=${R.lon}&geographic_areas_ids=${Y.join(",")}`;g(!0),fetch(X).then(P=>P.json()).then(P=>{g(!1),P?P.result===!1?He.fire({title:"",html:"<p>"+M.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:M.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):P.result===!0&&(ee(!B),I(R)):(g(!1),console.log("No geographic-areas/contains ."))}).catch(P=>{console.error("Error with geographic-areas/contains:",P),He.fire({title:"",html:"<p>"+P+"</p>",icon:"error",cancelButtonText:M.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return m.jsx("div",{children:m.jsxs("div",{id:`address-map-container-${l.key}`,className:"address-map-container",children:[m.jsx("div",{children:m.jsxs(ue.Modal,{wrapClassName:"formio-component-address_map",isOpen:B,size:"lg",scrollable:!0,toggle:()=>ee(!B),labelledBy:"esempio2",container:document.body,children:[m.jsx(ue.ModalHeader,{toggle:()=>ee(!B),id:"esempio2",children:M.t("Individua il luogo sulla mappa")}),m.jsxs(ue.ModalBody,{children:[m.jsx("p",{children:m.jsx("small",{children:M.t("Trascina l’icona nel punto preciso in cui si verifica l’evento che vuoi segnalare e fai click su Salva indirizzo")})}),m.jsx(Bf,{position:x,areasLayer:h,bounds:j,onMarkedMoved:(X,P)=>{Ne(X,P)}})]}),m.jsxs(ue.ModalFooter,{children:[m.jsx(ue.Button,{color:"secondary",onClick:()=>ee(!B),children:M.t("Chiudi")}),m.jsx(ue.Button,{color:"primary",onClick:()=>{J()},disabled:!R||p,children:M.t("Salva indirizzo")})]})]})}),m.jsx("div",{children:m.jsxs(ue.Modal,{isOpen:A,toggle:()=>z(!A),withIcon:!0,labelledBy:"error-modal-message",container:document.body,children:[m.jsx(ue.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:M.t("warning")}),m.jsx(ue.ModalBody,{children:m.jsx("p",{children:V})}),m.jsx(ue.ModalFooter,{children:m.jsx(ue.Button,{color:"primary",onClick:()=>z(!A),children:M.t("close")})})]})}),m.jsxs("div",{className:"position-relative",children:[m.jsx(Wf,{id:`${l.id}-${l.key}`,inputClasses:"form-control",source:li.debounce(Z,520),onConfirm:X=>{if(C(!1),te.current="",X){X===""&&I(null);let P=o.find(H=>H.label===X);I(P)}},onClear:()=>{C(!1),te.current="",I(null)},dropdownArrow:()=>null,minLength:3,disabled:v,confirmOnBlur:!0,showNoOptionsFound:!k,defaultValue:x?.label,value:w,tNoResults:()=>M.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>M.t("Clear input")}),k&&m.jsx("div",{className:"position-absolute",style:{width:"100%",bottom:"0px"},children:m.jsx(ue.Progress,{indeterminate:!0,label:"In elaborazione..."})})]}),!v&&m.jsxs(ue.Button,{type:"button",value:M.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Ie():(ee(!0),O(!1))},icon:!0,className:"px-0 primary-color",children:[m.jsx(ue.Icon,{color:"primary",icon:"it-map-marker-circle",role:"presentation"}),m.jsx("span",{children:M.t("Individua con precisione sulla mappa")})]})]})})};class kr extends tt.ReactComponent{constructor(s,c,i){super(s,c,i)}static get builderInfo(){return{title:"Address Map",group:"basic",icon:"fa fa-map-location-dot",documentation:"",weight:70,schema:kr.schema()}}static schema(){return tt.ReactComponent.schema({type:"address_map"})}static editForm=Af;attachReact(s,c){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(Uf,{ref:c,component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this},this.dataValue))}setValue(s){this.valuePosition=s,this.updateValue(s)}getValue(){return this.valuePosition}init(){super.init()}render(){return super.render(`<div id="react-${this.id} ref="react-${this.id}"></div>`)}}const Gf=[{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 = '"+Ee()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function Jf(...l){return tt.Components.baseEditForm([{key:"display",components:Gf}],...l)}const Rs=dn.Formio.Components.components.input,Kf=({component:l,current:s,onChange:c,i18next:i})=>{const M="list-services",x="selected-category",[I,o]=G.useState([]),[y,r]=G.useState([]),[u,h]=G.useState(null),[f,p]=G.useState(null),[g,Y]=G.useState(""),[_,k]=G.useState(!1),[C,j]=G.useState(!1),F=G.useRef(!1),R=G.useRef(),O=G.useMemo(()=>{if(!u)return null;const E=y.find(z=>z.name===u);return E||I.find(z=>z.name===u)||null},[u,y,I]),v=G.useMemo(()=>O?.services||[],[O]),T=async()=>{j(!0);const E=sessionStorage.getItem(M),A=sessionStorage.getItem(x);if(E)try{const re=JSON.parse(E);if(Array.isArray(re)&&re.length>0){o(re),r(re);const fe=re.find(te=>te.name===A)||re[0];return h(fe?.name||null),j(!1),re}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const z=await window.FormioHelper.getBookingConfig(),B={};z.forEach(re=>{(re.categories??[]).forEach(fe=>{B[fe]||(B[fe]={name:fe,services:[]}),B[fe].services.push(re)})});const ee=Object.fromEntries(Object.entries(B).sort(([re],[fe])=>re.localeCompare(fe,"it",{sensitivity:"base"}))),ie=Object.values(ee).filter(re=>(re.name??"").trim()!=="");return o(ie),r(ie),h(ie[0]?.name||null),sessionStorage.setItem(M,JSON.stringify(ie)),sessionStorage.setItem(x,ie[0]?.name||""),j(!1),ie};G.useEffect(()=>{u&&sessionStorage.setItem(x,u)},[u]),G.useEffect(()=>{F.current||(F.current=!0,T())},[]);const w=E=>{const A=(me="")=>me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),z=(me="")=>me.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),B=(me="")=>me.replace(/<[^>]*>/g," "),ee=(me,oe)=>new RegExp(`\\b${A(oe)}`,"i").test(me),ie=(me,oe)=>{const Z=z(me.name),Ne=z((me.categories??[]).join(" ")),Ie=z(B(me.abstract??""));if(!oe.every($=>ee(Z,$)||ee(Ne,$)||ee(Ie,$)))return-1;let Oe=0;for(const $ of oe)ee(Z,$)?Oe+=3:ee(Ne,$)?Oe+=2:ee(Ie,$)&&(Oe+=1);return Oe},re=E.target.value;Y(re);const fe=z(re);if(!fe){r(I),h(me=>me??I[0]?.name??null);return}const te=fe.split(" ").filter(Boolean),de=I.map(me=>{const oe=me.services.map(Z=>({service:Z,score:ie(Z,te)})).filter(Z=>Z.score>=0).sort((Z,Ne)=>Ne.score-Z.score).map(Z=>Z.service);return oe.length?{...me,services:oe}:null}).filter(Boolean);r(de);const ve=de.some(me=>me.name===u);h(ve?u:de[0]?.name??null)},S=E=>{p(E);const A=I.find(z=>z.services.some(B=>B.id===E.id));A&&h(A.name),c({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}),s.data.user_group=null,Hs()},V=E=>{h(E.name),p(null),Y(""),r(I),c({})};return G.useEffect(()=>{const E=!!document.querySelector(".formio-read-only");k(E)},[]),G.useEffect(()=>{const E=setTimeout(()=>{const A=s?.dataValue??s?.getValue();if(A?.id&&(p(A),I.length>0)){const z=I.find(B=>B.services.some(ee=>ee.id===A.id));z&&h(z.name)}},500);return()=>clearTimeout(E)},[s?.dataValue,s?.data,I]),G.useEffect(()=>{const E=window.FormioInstance;if(!E)return;const A=()=>{const z=E.submission?.data?.[s?.component?.key];if(z?.id&&(p(z),I.length>0)){const B=I.find(ee=>ee.services.some(ie=>ie.id===z.id));B&&h(B.name)}};return E.on("change",A),()=>E.off("change",A)},[I,s?.component?.key]),C?m.jsx("div",{className:"services-booking",ref:R,children:m.jsxs("div",{children:[i.t("Caricamento in corso"),"..."]})}):m.jsx("div",{className:"services-booking",ref:R,children:I&&!_?m.jsxs(ue.Container,{children:[m.jsx(ue.Row,{className:"mb-3",children:m.jsx(ue.Col,{children:m.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:i.t("Seleziona il servizio per cui stai richiedendo un appuntamento")})})}),m.jsx(ue.Row,{className:"mb-3",children:m.jsx(ue.Col,{children:m.jsx("div",{className:"search-container",children:m.jsx(ue.Input,{id:"search",label:i.t("Cerca"),type:"text",value:g,onChange:w,onInput:w,infoText:i.t("Cerca per categoria, servizio o descrizione")})})})}),m.jsxs(ue.Row,{className:"mb-3",children:[O?m.jsx(ue.Col,{lg:3,md:4,className:"mb-4 mb-lg-0",children:m.jsxs("div",{className:"categories-list",children:[m.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:i.t("Categorie")}),y.length>0&&y.map(E=>{const A=u===E.name;return m.jsxs("button",{onClick:()=>V(E),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${A?"category-active bg-primary text-white":"bg-light text-dark"}`,children:[m.jsx("span",{className:"fw-500 d-block",children:E.name}),m.jsxs("small",{className:`d-block mt-1 ${A?"text-white":"text-muted"}`,children:[E.services.length," ",E.services.length>1?i.t("servizi"):i.t("servizio")]})]},E.name)})]})}):null,m.jsx(ue.Col,{lg:O?9:12,md:O?8:12,children:m.jsxs("div",{className:"services-container",children:[v.length>0?m.jsxs("div",{className:"services-header mb-4",children:[m.jsx("h3",{className:"h5 fw-bold text-primary mb-0",children:O?.name}),m.jsx("div",{className:"border-bottom border-primary mt-3 mb-4"})]}):null,v.length>0?m.jsx("div",{className:"services-list",children:v.map(E=>{const A=f?.id===E.id,z=As.sanitize(E?.abstract);return m.jsx("button",{onClick:()=>S(E),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${A?"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":A,children:m.jsx("div",{className:"d-flex justify-content-between align-items-start",children:m.jsxs("div",{className:"flex-grow-1",children:[m.jsx("h5",{className:"h6 fw-bold mb-2 text-dark",children:E.name}),E?.abstract&&m.jsx("p",{className:"text-muted small mb-0",dangerouslySetInnerHTML:{__html:z}})]})})},E.id)})}):m.jsx("div",{className:"alert alert-info text-italic",children:i.t("Il servizio che stai cercando non è disponibile per la prenotazione appuntamento")})]})})]})]}):_?m.jsx("fieldset",{className:"it-page-section",children:m.jsx("div",{className:"cmp-card mt-2",children:m.jsxs("div",{className:"card has-bkg-grey shadow-sm p-big",children:[m.jsx("div",{className:"card-header border-0 p-0 mb-lg-30",children:m.jsx("div",{className:"d-flex",children:m.jsx("h2",{className:"title-xxlarge mb-1",children:O?.name})})}),m.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:s?.dataValue?.id?m.jsx("div",{className:"services-list",children:m.jsx("div",{className:"service-card p-4 rounded border transition border-light border-1 bg-white",children:m.jsx("div",{className:"d-flex justify-content-between align-items-start",children:m.jsx("div",{className:"flex-grow-1",children:m.jsx("p",{className:"mb-2 text-dark text-paragraph",children:s.dataValue.name})})})},s.dataValue.id)}):null})]})})}):null})};class Or extends Rs{constructor(s,c,i){super(s,c,i)}static get builderInfo(){return{title:"Lista Servizi",group:"basic",icon:"bi bi-list",documentation:"",weight:70,schema:Or.schema()}}static schema(){return Rs.schema({type:"list-services"})}static editForm=Jf;attach(s,c){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(Kf,{ref:c,component:this.component,onChange:i=>this.setValue(i),...this,current:this}))}setValue(s){s&&(this.shouldSetValue=!0,this.updateValue(s))}getValue(){return this.dataValue}init(){super.init()}render(){return super.render()}}const cn={pagebreak:yr,dynamic_calendar:Ls,calendar:br,"calendar-advanced":wr,sdcfile:Dr,address_map:kr,"list-services":Or};function Xf(l){if(!l||typeof l.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(cn).forEach(([s,c])=>{l.addComponent(s,c)}),cn}exports.Calendar=br;exports.CalendarAdvanced=wr;exports.FormioAddressMap=kr;exports.FormioDynamicCalendar=Ls;exports.FormioListServices=Or;exports.FormioPageBreak=yr;exports.SdcFile=Dr;exports.formioCustomComponents=cn;exports.registerFormioComponents=Xf;
|
|
86
|
+
`)&&f.flags==="s")}))},9124:function(o,y,r){var u=r(9957),h=r(6420).RegExp;o.exports=u((function(){var f=h("(?<a>b)","g");return f.exec("b").groups.a!=="b"||"b".replace(f,"$<a>c")!=="bc"}))},5436:function(o,y,r){var u=r(9760),h=TypeError;o.exports=function(f){if(u(f))throw new h("Can't call method on "+f);return f}},6504:function(o,y,r){var u=r(4696),h=r(7776),f=u("keys");o.exports=function(p){return f[p]||(f[p]=h(p))}},3976:function(o,y,r){var u=r(7048),h=r(6420),f=r(4636),p="__core-js_shared__",g=o.exports=h[p]||f(p,{});(g.versions||(g.versions=[])).push({version:"3.36.0",mode:u?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:function(o,y,r){var u=r(3976);o.exports=function(h,f){return u[h]||(u[h]=f||{})}},9764:function(o,y,r){var u=r(1664),h=r(6180),f=r(5016),p=r(5436),g=u("".charAt),Y=u("".charCodeAt),_=u("".slice),k=function(C){return function(j,F){var R,O,v=f(p(j)),T=h(F),w=v.length;return T<0||T>=w?C?"":void 0:(R=Y(v,T))<55296||R>56319||T+1===w||(O=Y(v,T+1))<56320||O>57343?C?g(v,T):R:C?_(v,T,T+2):O-56320+(R-55296<<10)+65536}};o.exports={codeAt:k(!1),charAt:k(!0)}},772:function(o,y,r){var u=r(8504),h=r(9957),f=r(6420).String;o.exports=!!Object.getOwnPropertySymbols&&!h((function(){var p=Symbol("symbol detection");return!f(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&u&&u<41}))},2495:function(o,y,r){var u=r(6180),h=Math.max,f=Math.min;o.exports=function(p,g){var Y=u(p);return Y<0?h(Y+g,0):f(Y,g)}},4096:function(o,y,r){var u=r(5712),h=r(5436);o.exports=function(f){return u(h(f))}},6180:function(o,y,r){var u=r(1748);o.exports=function(h){var f=+h;return f!=f||f===0?0:u(f)}},7584:function(o,y,r){var u=r(6180),h=Math.min;o.exports=function(f){var p=u(f);return p>0?h(p,9007199254740991):0}},4356:function(o,y,r){var u=r(5436),h=Object;o.exports=function(f){return h(u(f))}},7024:function(o,y,r){var u=r(8448),h=r(1632),f=r(7728),p=r(4504),g=r(2104),Y=r(9972),_=TypeError,k=Y("toPrimitive");o.exports=function(C,j){if(!h(C)||f(C))return C;var F,R=p(C,k);if(R){if(j===void 0&&(j="default"),F=u(R,C,j),!h(F)||f(F))return F;throw new _("Can't convert object to primitive value")}return j===void 0&&(j="number"),g(C,j)}},88:function(o,y,r){var u=r(7024),h=r(7728);o.exports=function(f){var p=u(f,"string");return h(p)?p:p+""}},16:function(o,y,r){var u={};u[r(9972)("toStringTag")]="z",o.exports=String(u)==="[object z]"},5016:function(o,y,r){var u=r(4427),h=String;o.exports=function(f){if(u(f)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return h(f)}},36:function(o){var y=String;o.exports=function(r){try{return y(r)}catch{return"Object"}}},7776:function(o,y,r){var u=r(1664),h=0,f=Math.random(),p=u(1 .toString);o.exports=function(g){return"Symbol("+(g===void 0?"":g)+")_"+p(++h+f,36)}},6536:function(o,y,r){var u=r(772);o.exports=u&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(o,y,r){var u=r(3476),h=r(9957);o.exports=u&&h((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(o,y,r){var u=r(6420),h=r(4328),f=u.WeakMap;o.exports=h(f)&&/native code/.test(String(f))},9972:function(o,y,r){var u=r(6420),h=r(4696),f=r(5152),p=r(7776),g=r(772),Y=r(6536),_=u.Symbol,k=h("wks"),C=Y?_.for||_:_&&_.withoutSetter||p;o.exports=function(j){return f(k,j)||(k[j]=g&&f(_,j)?_[j]:C("Symbol."+j)),k[j]}},6488:function(o,y,r){var u=r(5232),h=r(5152),f=r(3440),p=r(7e3),g=r(4024),Y=r(9968),_=r(584),k=r(7512),C=r(8948),j=r(3480),F=r(3696),R=r(3476),O=r(7048);o.exports=function(v,T,w,S){var V="stackTraceLimit",E=S?2:1,A=v.split("."),z=A[A.length-1],B=u.apply(null,A);if(B){var ee=B.prototype;if(!O&&h(ee,"cause")&&delete ee.cause,!w)return B;var ie=u("Error"),re=T((function(fe,te){var de=C(S?te:fe,void 0),ve=S?new B(fe):new B;return de!==void 0&&f(ve,"message",de),F(ve,re,ve.stack,2),this&&p(ee,this)&&k(ve,this,re),arguments.length>E&&j(ve,arguments[E]),ve}));if(re.prototype=ee,z!=="Error"?g?g(re,ie):Y(re,ie,{name:!0}):R&&V in B&&(_(re,B,V),_(re,B,"prepareStackTrace")),Y(re,B),!O)try{ee.name!==z&&f(ee,"name",z),ee.constructor=re}catch{}return re}}},7476:function(o,y,r){var u=r(9160),h=r(9957),f=r(1432),p=r(1632),g=r(4356),Y=r(3556),_=r(4316),k=r(92),C=r(2568),j=r(953),F=r(9972),R=r(8504),O=F("isConcatSpreadable"),v=R>=51||!h((function(){var w=[];return w[O]=!1,w.concat()[0]!==w})),T=function(w){if(!p(w))return!1;var S=w[O];return S!==void 0?!!S:f(w)};u({target:"Array",proto:!0,arity:1,forced:!v||!j("concat")},{concat:function(w){var S,V,E,A,z,B=g(this),ee=C(B,0),ie=0;for(S=-1,E=arguments.length;S<E;S++)if(T(z=S===-1?B:arguments[S]))for(A=Y(z),_(ie+A),V=0;V<A;V++,ie++)V in z&&k(ee,ie,z[V]);else _(ie+1),k(ee,ie++,z);return ee.length=ie,ee}})},6932:function(o,y,r){var u=r(9160),h=r(3364).filter;u({target:"Array",proto:!0,forced:!r(953)("filter")},{filter:function(f){return h(this,f,arguments.length>1?arguments[1]:void 0)}})},700:function(o,y,r){var u=r(9160),h=r(1664),f=r(5712),p=r(4096),g=r(1496),Y=h([].join);u({target:"Array",proto:!0,forced:f!==Object||!g("join",",")},{join:function(_){return Y(p(this),_===void 0?",":_)}})},4456:function(o,y,r){var u=r(9160),h=r(3364).map;u({target:"Array",proto:!0,forced:!r(953)("map")},{map:function(f){return h(this,f,arguments.length>1?arguments[1]:void 0)}})},4728:function(o,y,r){var u=r(9160),h=r(4356),f=r(3556),p=r(6728),g=r(4316);u({target:"Array",proto:!0,arity:1,forced:r(9957)((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!(function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(Y){return Y instanceof TypeError}})()},{push:function(Y){var _=h(this),k=f(_),C=arguments.length;g(k+C);for(var j=0;j<C;j++)_[k]=arguments[j],k++;return p(_,k),k}})},8752:function(o,y,r){var u=r(9160),h=r(6420),f=r(908),p=r(6488),g="WebAssembly",Y=h[g],_=new Error("e",{cause:7}).cause!==7,k=function(j,F){var R={};R[j]=p(j,F,_),u({global:!0,constructor:!0,arity:1,forced:_},R)},C=function(j,F){if(Y&&Y[j]){var R={};R[j]=p(g+"."+j,F,_),u({target:g,stat:!0,constructor:!0,arity:1,forced:_},R)}};k("Error",(function(j){return function(F){return f(j,this,arguments)}})),k("EvalError",(function(j){return function(F){return f(j,this,arguments)}})),k("RangeError",(function(j){return function(F){return f(j,this,arguments)}})),k("ReferenceError",(function(j){return function(F){return f(j,this,arguments)}})),k("SyntaxError",(function(j){return function(F){return f(j,this,arguments)}})),k("TypeError",(function(j){return function(F){return f(j,this,arguments)}})),k("URIError",(function(j){return function(F){return f(j,this,arguments)}})),C("CompileError",(function(j){return function(F){return f(j,this,arguments)}})),C("LinkError",(function(j){return function(F){return f(j,this,arguments)}})),C("RuntimeError",(function(j){return function(F){return f(j,this,arguments)}}))},508:function(o,y,r){var u=r(3476),h=r(6208).EXISTS,f=r(1664),p=r(2544),g=Function.prototype,Y=f(g.toString),_=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,k=f(_.exec);u&&!h&&p(g,"name",{configurable:!0,get:function(){try{return k(_,Y(this))[1]}catch{return""}}})},232:function(o,y,r){var u=r(9160),h=r(9292);u({target:"Object",stat:!0,arity:2,forced:Object.assign!==h},{assign:h})},5443:function(o,y,r){var u=r(16),h=r(6076),f=r(7032);u||h(Object.prototype,"toString",f,{unsafe:!0})},880:function(o,y,r){var u=r(9160),h=r(7680);u({target:"RegExp",proto:!0,forced:/./.exec!==h},{exec:h})},9836:function(o,y,r){var u=r(8448),h=r(7176),f=r(3951),p=r(9760),g=r(7584),Y=r(5016),_=r(5436),k=r(4504),C=r(4764),j=r(9092);h("match",(function(F,R,O){return[function(v){var T=_(this),w=p(v)?void 0:k(v,F);return w?u(w,v,T):new RegExp(v)[F](Y(T))},function(v){var T=f(this),w=Y(v),S=O(R,T,w);if(S.done)return S.value;if(!T.global)return j(T,w);var V=T.unicode;T.lastIndex=0;for(var E,A=[],z=0;(E=j(T,w))!==null;){var B=Y(E[0]);A[z]=B,B===""&&(T.lastIndex=C(w,g(T.lastIndex),V)),z++}return z===0?null:A}]}))},3536:function(o,y,r){var u=r(9160),h=r(6420),f=r(6100),p=r(3951),g=r(4328),Y=r(7796),_=r(2544),k=r(92),C=r(9957),j=r(5152),F=r(9972),R=r(336).IteratorPrototype,O=r(3476),v=r(7048),T="constructor",w="Iterator",S=F("toStringTag"),V=TypeError,E=h[w],A=v||!g(E)||E.prototype!==R||!C((function(){E({})})),z=function(){if(f(this,R),Y(this)===R)throw new V("Abstract class Iterator not directly constructable")},B=function(ee,ie){O?_(R,ee,{configurable:!0,get:function(){return ie},set:function(re){if(p(this),this===R)throw new V("You can't redefine this property");j(this,ee)?this[ee]=re:k(this,ee,re)}}):R[ee]=ie};j(R,S)||B(S,w),!A&&j(R,T)&&R[T]!==Object||B(T,z),z.prototype=R,u({global:!0,constructor:!0,forced:A},{Iterator:z})},2144:function(o,y,r){var u=r(9160),h=r(8448),f=r(8952),p=r(3951),g=r(6752),Y=r(9724),_=r(8696),k=r(7048),C=Y((function(){for(var j,F,R=this.iterator,O=this.predicate,v=this.next;;){if(j=p(h(v,R)),this.done=!!j.done)return;if(F=j.value,_(R,O,[F,this.counter++],!0))return F}}));u({target:"Iterator",proto:!0,real:!0,forced:k},{filter:function(j){return p(this),f(j),new C(g(this),{predicate:j})}})},9080:function(o,y,r){var u=r(9160),h=r(5792);u({target:"Iterator",proto:!0,real:!0,forced:r(7048)},{map:h})}},M={};function x(o){var y=M[o];if(y!==void 0)return y.exports;var r=M[o]={exports:{}};return i[o].call(r.exports,r,r.exports,x),r.exports}x.d=function(o,y){for(var r in y)x.o(y,r)&&!x.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:y[r]})},x.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),x.o=function(o,y){return Object.prototype.hasOwnProperty.call(o,y)},x.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var I={};return(function(){x.r(I),x.d(I,{default:function(){return _}}),x(8752),x(6932),x(700),x(4456),x(4728),x(508),x(232),x(5443),x(880),x(9836),x(3536),x(2144),x(9080);var o=x(680);x(7476);function y(k,C){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,F){return j.__proto__=F,j},y(k,C)}var r=(function(k){var C,j;function F(){for(var O,v=arguments.length,T=new Array(v),w=0;w<v;w++)T[w]=arguments[w];return(O=k.call.apply(k,[this].concat(T))||this).state={bump:!1,debounced:!1},O}j=k,(C=F).prototype=Object.create(j.prototype),C.prototype.constructor=C,y(C,j);var R=F.prototype;return R.componentWillMount=function(){var O,v,T,w=this;this.debounceStatusUpdate=(O=function(){if(!w.state.debounced){var S=!w.props.isInFocus||w.props.validChoiceMade;w.setState((function(V){return{bump:!V.bump,debounced:!0,silenced:S}}))}},v=1400,function(){var S=this,V=arguments;clearTimeout(T),T=setTimeout((function(){T=null,O.apply(S,V)}),v)})},R.componentWillReceiveProps=function(O){O.queryLength,this.setState({debounced:!1})},R.render=function(){var O=this.props,v=O.id,T=O.length,w=O.queryLength,S=O.minQueryLength,V=O.selectedOption,E=O.selectedOptionIndex,A=O.tQueryTooShort,z=O.tNoResults,B=O.tSelectedOption,ee=O.tResults,ie=O.className,re=this.state,fe=re.bump,te=re.debounced,de=re.silenced,ve=w<S,me=T===0,oe=V?B(V,T,E):"",Z=null;return Z=ve?A(S):me?z():ee(T,oe),this.debounceStatusUpdate(),(0,o.createElement)("div",{className:ie,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:v+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!de&&te&&fe?Z:""),(0,o.createElement)("div",{id:v+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},de||!te||fe?"":Z))},F})(o.Component);r.defaultProps={tQueryTooShort:function(k){return"Type in "+k+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(k,C,j){return k+" "+(j+1)+" of "+C+" is highlighted"},tResults:function(k,C){return k+" "+(k===1?"result":"results")+" "+(k===1?"is":"are")+" available. "+C}};var u=function(k){var C=k.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:C,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function h(){return h=Object.assign?Object.assign.bind():function(k){for(var C=1;C<arguments.length;C++){var j=arguments[C];for(var F in j)Object.prototype.hasOwnProperty.call(j,F)&&(k[F]=j[F])}return k},h.apply(this,arguments)}function f(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function p(k,C){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,F){return j.__proto__=F,j},p(k,C)}var g={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function Y(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var _=(function(k){var C,j;function F(O){var v;return(v=k.call(this,O)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:O.defaultValue?[O.defaultValue]:[],query:O.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(f(v)),v.handleKeyDown=v.handleKeyDown.bind(f(v)),v.handleUpArrow=v.handleUpArrow.bind(f(v)),v.handleDownArrow=v.handleDownArrow.bind(f(v)),v.handleEnter=v.handleEnter.bind(f(v)),v.handlePrintableKey=v.handlePrintableKey.bind(f(v)),v.handleListMouseLeave=v.handleListMouseLeave.bind(f(v)),v.handleOptionBlur=v.handleOptionBlur.bind(f(v)),v.handleOptionClick=v.handleOptionClick.bind(f(v)),v.handleOptionFocus=v.handleOptionFocus.bind(f(v)),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(f(v)),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(f(v)),v.handleInputBlur=v.handleInputBlur.bind(f(v)),v.handleInputChange=v.handleInputChange.bind(f(v)),v.handleInputClick=v.handleInputClick.bind(f(v)),v.handleInputFocus=v.handleInputFocus.bind(f(v)),v.pollInputElement=v.pollInputElement.bind(f(v)),v.getDirectInputChanges=v.getDirectInputChanges.bind(f(v)),v}j=k,(C=F).prototype=Object.create(j.prototype),C.prototype.constructor=C,p(C,j);var R=F.prototype;return R.isQueryAnOption=function(O,v){var T=this;return v.map((function(w){return T.templateInputValue(w).toLowerCase()})).indexOf(O.toLowerCase())!==-1},R.componentDidMount=function(){this.pollInputElement()},R.componentWillUnmount=function(){clearTimeout(this.$pollInput)},R.pollInputElement=function(){var O=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){O.pollInputElement()}),100)},R.getDirectInputChanges=function(){var O=this.elementReferences[-1];O&&O.value!==this.state.query&&this.handleInputChange({target:{value:O.value}})},R.componentDidUpdate=function(O,v){var T=this.state.focused,w=T===null,S=v.focused!==T;S&&!w&&this.elementReferences[T].focus();var V=T===-1,E=S&&v.focused===null;if(V&&E){var A=this.elementReferences[T];A.setSelectionRange(0,A.value.length)}},R.hasAutoselect=function(){return!Y()&&this.props.autoselect},R.templateInputValue=function(O){var v=this.props.templates&&this.props.templates.inputValue;return v?v(O):O},R.templateSuggestion=function(O){var v=this.props.templates&&this.props.templates.suggestion;return v?v(O):O},R.handleComponentBlur=function(O){var v,T=this.state,w=T.options,S=T.query,V=T.selected;this.props.confirmOnBlur?(v=O.query||S,this.props.onConfirm(w[V])):v=S,this.setState({focused:null,menuOpen:O.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,w)})},R.handleListMouseLeave=function(O){this.setState({hovered:null})},R.handleOptionBlur=function(O,v){var T=this.state,w=T.focused,S=T.menuOpen,V=T.options,E=T.selected,A=O.relatedTarget===null,z=O.relatedTarget===this.elementReferences[-1],B=w!==v&&w!==-1;if(!B&&A||!(B||z)){var ee=S&&Y();this.handleComponentBlur({menuOpen:ee,query:this.templateInputValue(V[E])})}},R.handleInputBlur=function(O){var v=this.state,T=v.focused,w=v.menuOpen,S=v.options,V=v.query,E=v.selected;if(T===-1){var A=w&&Y(),z=Y()?V:this.templateInputValue(S[E]);this.handleComponentBlur({menuOpen:A,query:z})}},R.handleInputChange=function(O){var v=this,T=this.props,w=T.minLength,S=T.source,V=T.showAllValues,E=this.hasAutoselect(),A=O.target.value,z=A.length===0,B=this.state.query!==A,ee=A.length>=w;this.setState({query:A,ariaHint:z}),V||!z&&B&&ee?S(A,(function(ie){var re=ie.length>0;v.setState({menuOpen:re,options:ie,selected:E&&re?0:-1,validChoiceMade:!1})})):!z&&ee||this.setState({menuOpen:!1,options:[]})},R.handleInputClick=function(O){this.handleInputChange(O)},R.handleInputFocus=function(O){var v=this.state,T=v.query,w=v.validChoiceMade,S=v.options,V=this.props.minLength,E=!w&&T.length>=V&&S.length>0;E?this.setState((function(A){var z=A.menuOpen;return{focused:-1,menuOpen:E||z,selected:-1}})):this.setState({focused:-1})},R.handleOptionFocus=function(O){this.setState({focused:O,hovered:null,selected:O})},R.handleOptionMouseEnter=function(O,v){Y()||this.setState({hovered:v})},R.handleOptionClick=function(O,v){var T=this.state.options[v],w=this.templateInputValue(T);this.props.onConfirm(T),this.setState({focused:-1,hovered:null,menuOpen:!1,query:w,selected:-1,validChoiceMade:!0}),this.forceUpdate()},R.handleOptionMouseDown=function(O){O.preventDefault()},R.handleUpArrow=function(O){O.preventDefault();var v=this.state,T=v.menuOpen,w=v.selected;w!==-1&&T&&this.handleOptionFocus(w-1)},R.handleDownArrow=function(O){var v=this;if(O.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)O.preventDefault(),this.props.source("",(function(E){v.setState({menuOpen:!0,options:E,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var T=this.state,w=T.menuOpen,S=T.options,V=T.selected;V!==S.length-1&&w&&this.handleOptionFocus(V+1)}},R.handleSpace=function(O){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(O.preventDefault(),this.props.source("",(function(T){v.setState({menuOpen:!0,options:T})}))),this.state.focused!==-1&&(O.preventDefault(),this.handleOptionClick(O,this.state.focused))},R.handleEnter=function(O){this.state.menuOpen&&(O.preventDefault(),this.state.selected>=0&&this.handleOptionClick(O,this.state.selected))},R.handlePrintableKey=function(O){var v=this.elementReferences[-1];O.target===v||v.focus()},R.handleKeyDown=function(O){switch(g[O.keyCode]){case"up":this.handleUpArrow(O);break;case"down":this.handleDownArrow(O);break;case"space":this.handleSpace(O);break;case"enter":this.handleEnter(O);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((v=O.keyCode)>47&&v<58||v===32||v===8||v>64&&v<91||v>95&&v<112||v>185&&v<193||v>218&&v<223)&&this.handlePrintableKey(O)}var v},R.render=function(){var O,v=this,T=this.props,w=T.cssNamespace,S=T.displayMenu,V=T.id,E=T.minLength,A=T.name,z=T.placeholder,B=T.required,ee=T.showAllValues,ie=T.tNoResults,re=T.tStatusQueryTooShort,fe=T.tStatusNoResults,te=T.tStatusSelectedOption,de=T.tStatusResults,ve=T.tAssistiveHint,me=T.dropdownArrow,oe=T.menuAttributes,Z=T.inputClasses,Ne=T.hintClasses,Ie=T.menuClasses,Ce=this.state,Oe=Ce.focused,$=Ce.hovered,J=Ce.menuOpen,X=Ce.options,P=Ce.query,H=Ce.selected,N=Ce.ariaHint,W=Ce.validChoiceMade,q=this.hasAutoselect(),ce=Oe===-1,se=X.length===0,Pe=P.length!==0,ge=P.length>=E,_e=this.props.showNoOptionsFound&&ce&&se&&Pe&&ge,$e=w+"__wrapper",Re=w+"__status",dt=w+"__dropdown-arrow-down",Ue=Oe!==-1&&Oe!==null,st=w+"__option",Ct=w+"__hint",ot=this.templateInputValue(X[H]),je=ot&&ot.toLowerCase().indexOf(P.toLowerCase())===0&&q?P+ot.substr(P.length):"",jt=V+"__assistiveHint",At={"aria-describedby":N?jt:null,"aria-expanded":J?"true":"false","aria-activedescendant":Ue?V+"__option--"+Oe:null,"aria-controls":V+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};ee&&typeof(O=me({className:dt}))=="string"&&(O=(0,o.createElement)("div",{className:w+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:O}}));var lt=w+"__input",pt=[lt,this.props.showAllValues?lt+"--show-all-values":lt+"--default"];Oe!==null&&pt.push(lt+"--focused"),Z&&pt.push(Z);var ht=w+"__menu",rt=[ht,ht+"--"+S,ht+"--"+(J||_e?"visible":"hidden")];Ie&&rt.push(Ie),(oe!=null&&oe.class||oe!=null&&oe.className)&&rt.push(oe?.class||oe?.className);var gt=Object.assign({"aria-labelledby":V},oe,{id:V+"__listbox",role:"listbox",className:rt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete gt.class,(0,o.createElement)("div",{className:$e,onKeyDown:this.handleKeyDown},(0,o.createElement)(r,{id:V,length:X.length,queryLength:P.length,minQueryLength:E,selectedOption:this.templateInputValue(X[H]),selectedOptionIndex:H,validChoiceMade:W,isInFocus:this.state.focused!==null,tQueryTooShort:re,tNoResults:fe,tSelectedOption:te,tResults:de,className:Re}),je&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:[Ct,Ne===null?Z:Ne].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:je})),(0,o.createElement)("input",h({},At,{autoComplete:"off",className:pt.join(" "),id:V,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:A,placeholder:z,ref:function(vt){v.elementReferences[-1]=vt},type:"text",role:"combobox",required:B,value:P})),O,(0,o.createElement)("ul",gt,X.map((function(vt,We){var ft=(Oe===-1?H===We:Oe===We)&&$===null?" "+st+"--focused":"",ut=We%2?" "+st+"--odd":"",at=Y()?"<span id="+V+"__option-suffix--"+We+' 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"> '+(We+1)+" of "+X.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Oe===We?"true":"false",className:""+st+ft+ut,dangerouslySetInnerHTML:{__html:v.templateSuggestion(vt)+at},id:V+"__option--"+We,key:We,onBlur:function(Qe){return v.handleOptionBlur(Qe,We)},onClick:function(Qe){return v.handleOptionClick(Qe,We)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(Qe){return v.handleOptionMouseEnter(Qe,We)},ref:function(Qe){v.elementReferences[We]=Qe},role:"option",tabIndex:"-1","aria-posinset":We+1,"aria-setsize":X.length})})),_e&&(0,o.createElement)("li",{className:st+" "+st+"--no-results",role:"option","aria-disabled":"true"},ie())),(0,o.createElement)("span",{id:jt,style:{display:"none"}},ve()))},F})(o.Component);_.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:u,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),I})()}))})(gr)),gr.exports}var nn,Ns;function Vf(){return Ns||(Ns=1,nn=Ff()),nn}var zf=Vf();const Lf=fn(zf),Wf=({value:l,defaultValue:s="",onConfirm:c,source:i,disabled:M,onClear:x,tClearInput:I=()=>"Clear input",...o})=>{const y=G.useRef(null),r=p=>{setTimeout(()=>{y.current&&(y.current.elementReferences[-1].value=p)},0)};G.useEffect(()=>{l!==void 0&&r(l)},[l]),G.useEffect(()=>{M?y.current&&(y.current.elementReferences[-1].disabled=!0):y.current&&(y.current.elementReferences[-1].disabled=!1)},[M]);const u=()=>{x&&x()},h=(p,g)=>{y.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&i(p,g)},f=p=>{p?c(p):r(l)};return m.jsxs("div",{style:{position:"relative",width:"100%"},children:[m.jsx(Lf,{ref:y,...o,defaultValue:s,onConfirm:f,source:h}),!!(l&&l.length>0&&!M)&&m.jsx("button",{onClick:u,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":I(),children:m.jsx(ue.Icon,{icon:"it-close",size:"sm",title:I()})})]})},qf="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==",Hf="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=",$f="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Bf=({position:l,areasLayer:s,bounds:c,onMarkedMoved:i})=>{const M=G.useRef(null);let x=null;const[I,o]=G.useState([]),y=Rt.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),r=[41.9,12.5],u=()=>{const h=Rt.map(M.current,{keyboard:!1,minZoom:6,maxZoom:17}).setView(r,10);y.addTo(h),s&&s.map(p=>{p.addTo(h)});const f=l?[`${l.lat}`,`${l.lon}`]:c?c.getCenter():r;if(delete Rt.Icon.Default.prototype._getIconUrl,Rt.Icon.Default.mergeOptions({iconRetinaUrl:qf,iconUrl:Hf,shadowUrl:$f}),x=Rt.marker(f,{draggable:!0}).addTo(h),x.on("moveend",function(p){const g=p.target.getLatLng();i(g,x)}),!l&&c)h.fitBounds(c);else{const p=l?[l.lat,l.lon]:r;x&&(x.setLatLng(p).update(),h.setView(p,15))}};return G.useEffect(()=>{M.current&&u()},[M]),m.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:m.jsx("div",{ref:M,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},Uf=({component:l,value:s,current:c,onChange:i,i18next:M})=>{const[x,I]=G.useState(null),[o,y]=G.useState([]),[r,u]=G.useState(),[h,f]=G.useState(),[p,g]=G.useState(!1),[Y,_]=G.useState(),[k,C]=G.useState(!1),[j,F]=G.useState(),[R,O]=G.useState(),[v,T]=G.useState(!1),[w,S]=G.useState(""),[V,E]=G.useState(""),[A,z]=G.useState(!1),[B,ee]=G.useState(!1),re=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:fe}=window.OC_SERVICE_DETAILS,te=G.useRef(),de=M.language;let ve=Rt.latLngBounds();const me=re||(fe&&fe.length>0?fe:void 0),oe=(X,P)=>{te.current=X;const H=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(X)}&countrycodes=it&viewbox=${r}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${de}`;let N=[],W=[];C(!0),fetch(H).then(q=>q.json()).then(q=>{if(q.length&&te.current===X){C(!0);const ce=q.map((se,Pe)=>{const{lat:ge,lon:_e}=se,$e=`${Ee()}/api/geographic-areas/contains?lat=${ge}&lon=${_e}&geographic_areas_ids=${Y.join(",")}`;return fetch($e).then(Re=>Re.json()).then(Re=>Re.result?(se.label=Jr(se),se):null)});return Promise.all(ce)}else te.current===X&&(P([]),C(!1))}).then(q=>{q=q?q.filter(ce=>ce!==null):[],q.length>0?(q.forEach((ce,se)=>{q[se].label=Jr(ce)}),q=ui.uniqWith(q,(ce,se)=>ce.label===se.label),q.forEach((ce,se)=>{W.push(ce.label),N.push(ce)}),te.current===X&&(P(W),y(N),C(!1))):te.current===X&&(P([]),C(!1))}).catch(q=>{console.error("Error fetching locations:",q),C(!1)})},Z=(X,P)=>{oe(X,P)},Ne=(X,P)=>{const{lat:H,lng:N}=X,W=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${H}&lon=${N}&accept-language=${de}`;fetch(W).then(q=>q.json()).then(q=>{if(q&&q.display_name)if(q.label=Jr(q),q.lat=H,q.lon=N,P)P.bindPopup(`${q.label}`).openPopup(),O(q);else{O(q);return}}).catch(q=>console.error("Error with reverse geocoding:",q))};function Ie(){navigator.geolocation.getCurrentPosition(X=>{let P=X.coords.latitude,H=X.coords.longitude;if((Y||[]).length>0){const W=`${Ee()}/api/geographic-areas/contains?lat=${P}&lon=${H}&geographic_areas_ids=${Y.join(",")}`;fetch(W).then(q=>q.json()).then(q=>{q.result&&(I({lat:P,lon:H}),Ne({lat:P,lng:H})),ee(!B)})}else I({lat:P,lon:H}),Ne({lat:P,lng:H}),ee(!B)},X=>{X?.code===1?(z(!A),E(M.t("error_message_code_1"))):X?.code===2?(z(!A),E(M.t("error_message_code_2"))):X?.code===3?(z(!A),E(M.t("error_message_code_3"))):(z(!A),E(M.t("error_message_generic")))})}G.useEffect(()=>{s&&I(s),c.valuePosition&&I(c.valuePosition)},[s,c]);const Ce=()=>{s&&I(s),c.valuePosition&&I(c.valuePosition)};G.useEffect(()=>{window?.Formio?.formioReady.then(()=>{setTimeout(()=>{Ce(),Oe()},1)})},[]);const Oe=()=>{let P=`${Ee()}/api/geographic-areas`,H=[],N=[];fetch(P).then(W=>W.json()).then(W=>{if(Array.isArray(W)&&W.length>0){W.filter(se=>me?Array.isArray(me)?me.includes(se.id):se.id===me:!0).forEach(se=>{H.push(se.id);const Pe=JSON.parse(se.geofence),ge=Rt.geoJSON(Pe,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(_e){return _e.geometry.type==="Polygon"||_e.geometry.type==="MultiPolygon"}});ve.extend(ge.getBounds()),N.push(ge)}),f(N),_(H),F(ve);const q=ve.getNorthEast(),ce=ve.getSouthWest();u([q.lng,q.lat,ce.lng,ce.lat])}else console.log("No geographic_areas_ids found.")}).catch(W=>{console.error("Error with reverse geocoding:",W)})},$=()=>{S(x?.label?x.label:"")};G.useEffect(()=>{$(),i(x)},[x]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&v===!1?T(!0):T(!1)},[]);const J=()=>{if(R){const X=`${Ee()}/api/geographic-areas/contains?lat=${R.lat}&lon=${R.lon}&geographic_areas_ids=${Y.join(",")}`;g(!0),fetch(X).then(P=>P.json()).then(P=>{g(!1),P?P.result===!1?He.fire({title:"",html:"<p>"+M.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:M.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):P.result===!0&&(ee(!B),I(R)):(g(!1),console.log("No geographic-areas/contains ."))}).catch(P=>{console.error("Error with geographic-areas/contains:",P),He.fire({title:"",html:"<p>"+P+"</p>",icon:"error",cancelButtonText:M.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return m.jsx("div",{children:m.jsxs("div",{id:`address-map-container-${l.key}`,className:"address-map-container",children:[m.jsx("div",{children:m.jsxs(ue.Modal,{wrapClassName:"formio-component-address_map",isOpen:B,size:"lg",scrollable:!0,toggle:()=>ee(!B),labelledBy:"esempio2",container:document.body,children:[m.jsx(ue.ModalHeader,{toggle:()=>ee(!B),id:"esempio2",children:M.t("Individua il luogo sulla mappa")}),m.jsxs(ue.ModalBody,{children:[m.jsx("p",{children:m.jsx("small",{children:M.t("Trascina l’icona nel punto preciso in cui si verifica l’evento che vuoi segnalare e fai click su Salva indirizzo")})}),m.jsx(Bf,{position:x,areasLayer:h,bounds:j,onMarkedMoved:(X,P)=>{Ne(X,P)}})]}),m.jsxs(ue.ModalFooter,{children:[m.jsx(ue.Button,{color:"secondary",onClick:()=>ee(!B),children:M.t("Chiudi")}),m.jsx(ue.Button,{color:"primary",onClick:()=>{J()},disabled:!R||p,children:M.t("Salva indirizzo")})]})]})}),m.jsx("div",{children:m.jsxs(ue.Modal,{isOpen:A,toggle:()=>z(!A),withIcon:!0,labelledBy:"error-modal-message",container:document.body,children:[m.jsx(ue.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:M.t("warning")}),m.jsx(ue.ModalBody,{children:m.jsx("p",{children:V})}),m.jsx(ue.ModalFooter,{children:m.jsx(ue.Button,{color:"primary",onClick:()=>z(!A),children:M.t("close")})})]})}),m.jsxs("div",{className:"position-relative",children:[m.jsx(Wf,{id:`${l.id}-${l.key}`,inputClasses:"form-control",source:ui.debounce(Z,520),onConfirm:X=>{if(C(!1),te.current="",X){X===""&&I(null);let P=o.find(H=>H.label===X);I(P)}},onClear:()=>{C(!1),te.current="",I(null)},dropdownArrow:()=>null,minLength:3,disabled:v,confirmOnBlur:!0,showNoOptionsFound:!k,defaultValue:x?.label,value:w,tNoResults:()=>M.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>M.t("Clear input")}),k&&m.jsx("div",{className:"position-absolute",style:{width:"100%",bottom:"0px"},children:m.jsx(ue.Progress,{indeterminate:!0,label:"In elaborazione..."})})]}),!v&&m.jsxs(ue.Button,{type:"button",value:M.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Ie():(ee(!0),O(!1))},icon:!0,className:"px-0 primary-color",children:[m.jsx(ue.Icon,{color:"primary",icon:"it-map-marker-circle",role:"presentation"}),m.jsx("span",{children:M.t("Individua con precisione sulla mappa")})]})]})})};class kr extends tt.ReactComponent{constructor(s,c,i){super(s,c,i)}static get builderInfo(){return{title:"Address Map",group:"basic",icon:"fa fa-map-location-dot",documentation:"",weight:70,schema:kr.schema()}}static schema(){return tt.ReactComponent.schema({type:"address_map"})}static editForm=Af;attachReact(s,c){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(Uf,{ref:c,component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this},this.dataValue))}setValue(s){this.valuePosition=s,this.updateValue(s)}getValue(){return this.valuePosition}init(){super.init()}render(){return super.render(`<div id="react-${this.id} ref="react-${this.id}"></div>`)}}const Gf=[{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 = '"+Ee()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function Jf(...l){return tt.Components.baseEditForm([{key:"display",components:Gf}],...l)}const Rs=hn.Formio.Components.components.input,Kf=({component:l,current:s,onChange:c,i18next:i})=>{const M="list-services",x="selected-category",[I,o]=G.useState([]),[y,r]=G.useState([]),[u,h]=G.useState(null),[f,p]=G.useState(null),[g,Y]=G.useState(""),[_,k]=G.useState(!1),[C,j]=G.useState(!1),F=G.useRef(!1),R=G.useRef(),O=G.useMemo(()=>{if(!u)return null;const E=y.find(z=>z.name===u);return E||I.find(z=>z.name===u)||null},[u,y,I]),v=G.useMemo(()=>O?.services||[],[O]),T=async()=>{j(!0);const E=sessionStorage.getItem(M),A=sessionStorage.getItem(x);if(E)try{const re=JSON.parse(E);if(Array.isArray(re)&&re.length>0){o(re),r(re);const fe=re.find(te=>te.name===A)||re[0];return h(fe?.name||null),j(!1),re}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const z=await window.FormioHelper.getBookingConfig(),B={};z.forEach(re=>{(re.categories??[]).forEach(fe=>{B[fe]||(B[fe]={name:fe,services:[]}),B[fe].services.push(re)})});const ee=Object.fromEntries(Object.entries(B).sort(([re],[fe])=>re.localeCompare(fe,"it",{sensitivity:"base"}))),ie=Object.values(ee).filter(re=>(re.name??"").trim()!=="");return o(ie),r(ie),h(ie[0]?.name||null),sessionStorage.setItem(M,JSON.stringify(ie)),sessionStorage.setItem(x,ie[0]?.name||""),j(!1),ie};G.useEffect(()=>{u&&sessionStorage.setItem(x,u)},[u]),G.useEffect(()=>{F.current||(F.current=!0,T())},[]);const w=E=>{const A=(me="")=>me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),z=(me="")=>me.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),B=(me="")=>me.replace(/<[^>]*>/g," "),ee=(me,oe)=>new RegExp(`\\b${A(oe)}`,"i").test(me),ie=(me,oe)=>{const Z=z(me.name),Ne=z((me.categories??[]).join(" ")),Ie=z(B(me.abstract??""));if(!oe.every($=>ee(Z,$)||ee(Ne,$)||ee(Ie,$)))return-1;let Oe=0;for(const $ of oe)ee(Z,$)?Oe+=3:ee(Ne,$)?Oe+=2:ee(Ie,$)&&(Oe+=1);return Oe},re=E.target.value;Y(re);const fe=z(re);if(!fe){r(I),h(me=>me??I[0]?.name??null);return}const te=fe.split(" ").filter(Boolean),de=I.map(me=>{const oe=me.services.map(Z=>({service:Z,score:ie(Z,te)})).filter(Z=>Z.score>=0).sort((Z,Ne)=>Ne.score-Z.score).map(Z=>Z.service);return oe.length?{...me,services:oe}:null}).filter(Boolean);r(de);const ve=de.some(me=>me.name===u);h(ve?u:de[0]?.name??null)},S=E=>{p(E);const A=I.find(z=>z.services.some(B=>B.id===E.id));A&&h(A.name),c({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}),s.data.user_group=null,Hs()},V=E=>{h(E.name),p(null),Y(""),r(I),c({})};return G.useEffect(()=>{const E=!!document.querySelector(".formio-read-only");k(E)},[]),G.useEffect(()=>{const E=setTimeout(()=>{const A=s?.dataValue??s?.getValue();if(A?.id&&(p(A),I.length>0)){const z=I.find(B=>B.services.some(ee=>ee.id===A.id));z&&h(z.name)}},500);return()=>clearTimeout(E)},[s?.dataValue,s?.data,I]),G.useEffect(()=>{const E=window.FormioInstance;if(!E)return;const A=()=>{const z=E.submission?.data?.[s?.component?.key];if(z?.id&&(p(z),I.length>0)){const B=I.find(ee=>ee.services.some(ie=>ie.id===z.id));B&&h(B.name)}};return E.on("change",A),()=>E.off("change",A)},[I,s?.component?.key]),C?m.jsx("div",{className:"services-booking",ref:R,children:m.jsxs("div",{children:[i.t("Caricamento in corso"),"..."]})}):m.jsx("div",{className:"services-booking",ref:R,children:I&&!_?m.jsxs(ue.Container,{children:[m.jsx(ue.Row,{className:"mb-3",children:m.jsx(ue.Col,{children:m.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:i.t("Seleziona il servizio per cui stai richiedendo un appuntamento")})})}),m.jsx(ue.Row,{className:"mb-3",children:m.jsx(ue.Col,{children:m.jsx("div",{className:"search-container",children:m.jsx(ue.Input,{id:"search",label:i.t("Cerca"),type:"text",value:g,onChange:w,onInput:w,infoText:i.t("Cerca per categoria, servizio o descrizione")})})})}),m.jsxs(ue.Row,{className:"mb-3",children:[O?m.jsx(ue.Col,{lg:3,md:4,className:"mb-4 mb-lg-0",children:m.jsxs("div",{className:"categories-list",children:[m.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:i.t("Categorie")}),y.length>0&&y.map(E=>{const A=u===E.name;return m.jsxs("button",{onClick:()=>V(E),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${A?"category-active bg-primary text-white":"bg-light text-dark"}`,children:[m.jsx("span",{className:"fw-500 d-block",children:E.name}),m.jsxs("small",{className:`d-block mt-1 ${A?"text-white":"text-muted"}`,children:[E.services.length," ",E.services.length>1?i.t("servizi"):i.t("servizio")]})]},E.name)})]})}):null,m.jsx(ue.Col,{lg:O?9:12,md:O?8:12,children:m.jsxs("div",{className:"services-container",children:[v.length>0?m.jsxs("div",{className:"services-header mb-4",children:[m.jsx("h3",{className:"h5 fw-bold text-primary mb-0",children:O?.name}),m.jsx("div",{className:"border-bottom border-primary mt-3 mb-4"})]}):null,v.length>0?m.jsx("div",{className:"services-list",children:v.map(E=>{const A=f?.id===E.id,z=As.sanitize(E?.abstract);return m.jsx("button",{onClick:()=>S(E),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${A?"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":A,children:m.jsx("div",{className:"d-flex justify-content-between align-items-start",children:m.jsxs("div",{className:"flex-grow-1",children:[m.jsx("h5",{className:"h6 fw-bold mb-2 text-dark",children:E.name}),E?.abstract&&m.jsx("p",{className:"text-muted small mb-0",dangerouslySetInnerHTML:{__html:z}})]})})},E.id)})}):m.jsx("div",{className:"alert alert-info text-italic",children:i.t("Il servizio che stai cercando non è disponibile per la prenotazione appuntamento")})]})})]})]}):_?m.jsx("fieldset",{className:"it-page-section",children:m.jsx("div",{className:"cmp-card mt-2",children:m.jsxs("div",{className:"card has-bkg-grey shadow-sm p-big",children:[m.jsx("div",{className:"card-header border-0 p-0 mb-lg-30",children:m.jsx("div",{className:"d-flex",children:m.jsx("h2",{className:"title-xxlarge mb-1",children:O?.name})})}),m.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:s?.dataValue?.id?m.jsx("div",{className:"services-list",children:m.jsx("div",{className:"service-card p-4 rounded border transition border-light border-1 bg-white",children:m.jsx("div",{className:"d-flex justify-content-between align-items-start",children:m.jsx("div",{className:"flex-grow-1",children:m.jsx("p",{className:"mb-2 text-dark text-paragraph",children:s.dataValue.name})})})},s.dataValue.id)}):null})]})})}):null})};class Or extends Rs{constructor(s,c,i){super(s,c,i)}static get builderInfo(){return{title:"Lista Servizi",group:"basic",icon:"bi bi-list",documentation:"",weight:70,schema:Or.schema()}}static schema(){return Rs.schema({type:"list-services"})}static editForm=Jf;attach(s,c){this.rootComponent=Et.createRoot(s),this.rootComponent.render(m.jsx(Kf,{ref:c,component:this.component,onChange:i=>this.setValue(i),...this,current:this}))}setValue(s){s&&(this.shouldSetValue=!0,this.updateValue(s))}getValue(){return this.dataValue}init(){super.init()}render(){return super.render()}}const dn={pagebreak:yr,dynamic_calendar:Ls,calendar:br,"calendar-advanced":wr,sdcfile:Dr,address_map:kr,"list-services":Or};function Xf(l){if(!l||typeof l.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(dn).forEach(([s,c])=>{l.addComponent(s,c)}),dn}exports.Calendar=br;exports.CalendarAdvanced=wr;exports.FormioAddressMap=kr;exports.FormioDynamicCalendar=Ls;exports.FormioListServices=Or;exports.FormioPageBreak=yr;exports.SdcFile=Dr;exports.formioCustomComponents=dn;exports.registerFormioComponents=Xf;
|
|
87
87
|
//# sourceMappingURL=index.cjs.map
|