1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3430],{73579:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=r.default,i=(null==t?void 0:t.suspense)?{}:{loading:function(e){e.error,e.isLoading;return e.pastDelay,null}};e instanceof Promise?i.loader=function(){return e}:"function"===typeof e?i.loader=e:"object"===typeof e&&(i=a({},i,e));if((i=a({},i,t)).suspense)throw new Error("Invalid suspense option usage in next/dynamic. Read more: https://nextjs.org/docs/messages/invalid-dynamic-suspense");i.suspense&&(delete i.ssr,delete i.loading);i.loadableGenerated&&delete(i=a({},i,i.loadableGenerated)).loadableGenerated;if("boolean"===typeof i.ssr&&!i.suspense){if(!i.ssr)return delete i.ssr,o(n,i);delete i.ssr}return n(i)},t.noSSR=o;var a=n(6495).Z,i=n(92648).Z,r=(i(n(67294)),i(n(23668)));function o(e,t){return delete t.webpack,delete t.modules,e(t)}("function"===typeof t.default||"object"===typeof t.default&&null!==t.default)&&"undefined"===typeof t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3982:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoadableContext=void 0;var a=(0,n(92648).Z)(n(67294)).default.createContext(null);t.LoadableContext=a},23668:function(e,t,n){"use strict";var a=n(33227),i=n(88361);function r(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw r}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=n(6495).Z,u=(0,n(92648).Z)(n(67294)),s=n(3982),c=n(61688).useSyncExternalStore,d=[],f=[],p=!1;function _(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}var v=function(){function e(t,n){a(this,e),this._loadFn=t,this._opts=n,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}return i(e,[{key:"promise",value:function(){return this._res.promise}},{key:"retry",value:function(){var e=this;this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};var t=this._res,n=this._opts;t.loading&&("number"===typeof n.delay&&(0===n.delay?this._state.pastDelay=!0:this._delay=setTimeout((function(){e._update({pastDelay:!0})}),n.delay)),"number"===typeof n.timeout&&(this._timeout=setTimeout((function(){e._update({timedOut:!0})}),n.timeout))),this._res.promise.then((function(){e._update({}),e._clearTimeouts()})).catch((function(t){e._update({}),e._clearTimeouts()})),this._update({})}},{key:"_update",value:function(e){this._state=l({},this._state,{error:this._res.error,loaded:this._res.loaded,loading:this._res.loading},e),this._callbacks.forEach((function(e){return e()}))}},{key:"_clearTimeouts",value:function(){clearTimeout(this._delay),clearTimeout(this._timeout)}},{key:"getCurrentValue",value:function(){return this._state}},{key:"subscribe",value:function(e){var t=this;return this._callbacks.add(e),function(){t._callbacks.delete(e)}}}]),e}();function y(e){return function(e,t){var n=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null,suspense:!1},t);n.suspense&&(n.lazy=u.default.lazy(n.loader));var a=null;function i(){if(!a){var t=new v(e,n);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!p){var o=n.webpack?n.webpack():n.modules;o&&f.push((function(e){var t,n=r(o);try{for(n.s();!(t=n.n()).done;){var a=t.value;if(-1!==e.indexOf(a))return i()}}catch(l){n.e(l)}finally{n.f()}}))}function d(){i();var e=u.default.useContext(s.LoadableContext);
1e&&Array.isArray(n.modules)&&n.modules.forEach((function(t){e(t)}))}var _=n.suspense?function(e,t){return d(),u.default.createElement(n.lazy,l({},e,{ref:t}))}:function(e,t){d();var i=c(a.subscribe,a.getCurrentValue,a.getCurrentValue);return u.default.useImperativeHandle(t,(function(){return{retry:a.retry}}),[]),u.default.useMemo((function(){return i.loading||i.error?u.default.createElement(n.loading,{isLoading:i.loading,pastDelay:i.pastDelay,timedOut:i.timedOut,error:i.error,retry:a.retry}):i.loaded?u.default.createElement((t=i.loaded)&&t.__esModule?t.default:t,e):null;var t}),[e,i])};return _.preload=function(){return i()},_.displayName="LoadableComponent",u.default.forwardRef(_)}(_,e)}function m(e,t){for(var n=[];e.length;){var a=e.pop();n.push(a(t))}return Promise.all(n).then((function(){if(e.length)return m(e,t)}))}y.preloadAll=function(){return new Promise((function(e,t){m(d).then(e,t)}))},y.preloadReady=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new Promise((function(t){var n=function(){return p=!0,t()};m(f,e).then(n,n)}))},window.__NEXT_PRELOADREADY=y.preloadReady;var h=y;t.default=h},21043:function(e,t,n){"use strict";var a=n(55210),i=n.n(a),r=n(85893);t.Z=function(){return(0,r.jsx)("div",{className:i().loadingSpinner,children:(0,r.jsx)("div",{className:i().loadingSpinner__container,children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:i().loadingSpinner__loader,children:[(0,r.jsx)("div",{className:i().loadingSpinner__dot}),(0,r.jsx)("div",{className:i().loadingSpinner__dot}),(0,r.jsx)("div",{className:i().loadingSpinner__dot}),(0,r.jsx)("div",{className:i().loadingSpinner__dot}),(0,r.jsx)("div",{className:i().loadingSpinner__dot}),(0,r.jsx)("div",{className:i().loadingSpinner__dot}),(0,r.jsx)("div",{className:i().loadingSpinner__dot}),(0,r.jsx)("div",{className:i().loadingSpinner__dot}),(0,r.jsx)("div",{className:i().loadingSpinner__loading})]})})})})}},42723:function(e,t,n){"use strict";n.r(t),n.d(t,{ClientAvailabilityPage:function(){return w},__N_SSP:function(){return A},default:function(){return j}});var a=n(50029),i=n(87794),r=n.n(i),o=n(67294),l=n(97950),u=n(32354),s=n(92777),c=n(82262),d=n(59499),f=n(38463),p=n(64107),_=function(){function e(){(0,s.Z)(this,e),(0,d.Z)(this,"parseAvailability",(function(e){return e.map((function(e){return{start:(0,p.parseDayAndTime)(e.day,e.from),end:(0,p.parseDayAndTime)(e.day,e.to)}}))}))}return(0,c.Z)(e,[{key:"getClientAvailability",value:function(){var e=(0,a.Z)(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.fetchAPI({url:"/legalCase/client-availability-time/".concat(t)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"sendClientAvailability",value:function(){var e=(0,a.Z)(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.fetchAPI({method:"PUT",url:"/legalCase/client-availability-time/".concat(t),body:{availabilityTime:n}});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"groupByAvailabilityDay",value:function(e){return e.reduce((function(e,t){var n,a=(0,p.formatDateDMY)(t.start);return e[a]=null!==(n=e[a])&&void 0!==n?n:[],e[a].push(t),e}),{})}},{key:"formatAvailability",value:function(e){return e.map((function(e){return{day:(0,p.formatDateDMY)(e.start),from:(0,p.formatTime12h)(e.start),to:(0,p.formatTime12h)(e.end)}}))}}]),e}(),v=n(62405),y=n.n(v),m=n(21043),h=n(11163),b=n(68232),g=n(5152),x=n.n(g),S=n(85893),A=!0,w=function(e){var t=e.data,i=e.token,s=(0,o.useState)(!1),c=s[0],d=s[1],f=(0,o.useState)(!1),p=f[0],v=f[1],g=(0,o.useState)(!1),A=g[0],w=g[1],j=(0,h.useRouter)(),k=new _,N=[];t&&t.length&&(N=k.parseAvailability(t));var T=(0,o.useState)(N),C=T[0],E=T[1],O=function(){var e=(0,a.Z)(r().mark((function e(t){var n,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t||!t.length){e.next=14;break}return w(!0),n=k.formatAvailability(t),e.prev=3,e.next=6,k.sendClientAvailability(i,n);case 6:a=e.sent,w(!1),a&&a.ClientSlots&&j.push({pathname:"/thank-you",query:{page:b.g.THANK_YOU_PAGES.AVAILABILITY}},"thank-you"),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),w(!1);case 14:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t){return e.apply(this,arguments)}}(),P=x()((function(){return Promise.all([n.e(4885),n.e(9870)]).then(n.bind(n,9870))}),{ssr:!1,loadableGenerated:{webpack:function(){return[9870]}}});return(0,S.jsxs)(l.Z,{title:"Seleziona la tua disponibilit\xe0 | AvvocatoFlash",description:"Con Avvocato Flash puoi organizzare videochiamata con i nostri avvocati.",canonical:"".concat(u.N.sitBase,"/cl
1ient/").concat(i),sitBase:"".concat(u.N.sitBase,"/client/").concat(i),setOpenedFormModel:d,openedFormModel:c,openedWhatsappModal:p,setOpenedWhatsappModal:v,imageContent:{url:"".concat(u.N.sitBase,"/assets/bg-home.png"),w:"1668",h:"1284"},children:[A&&(0,S.jsx)(m.Z,{}),(0,S.jsxs)("div",{className:y().clientAvailability,children:[(0,S.jsxs)("div",{className:"".concat(y().clientAvailability__header," col-xs-12"),children:[(0,S.jsx)("h1",{className:y().clientAvailability__title,children:"Pernota il tuo appuntamento ONLINE"}),(0,S.jsx)("p",{className:y().clientAvailability__subTitle,children:"Indica le tue disponibilit\xe0 e attendi la email di conferma"})]}),(0,S.jsx)("div",{className:y().clientAvailability__calendar,children:(0,S.jsx)("div",{children:(0,S.jsx)(P,{availability:C,setAvailability:function(e){E(e),O(e)},primaryColor:"#303f9f",secondaryColor:"#ffb300",primaryFontColor:"#000",fontFamily:"Open Sans",fontSize:14,saveButtonText:"Conferma e invia richiesta",selectedMultipleButtonText:"Selezione pi\xf9 date e orari di disponibilit\xe0",doneText:"fatto",currentMonthText:"Vai al mese corrente",locale:"it"})})})]})]})},j=w},15689:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/client/[token]",function(){return n(42723)}])},55210:function(e){e.exports={loadingSpinner:"loading-spinner_loadingSpinner__g6sDz",loadingSpinner__loader:"loading-spinner_loadingSpinner__loader__CuBo8",loadingSpinner__dot:"loading-spinner_loadingSpinner__dot__rZKix",load:"loading-spinner_load__KkSgj",loadingSpinner__loading:"loading-spinner_loadingSpinner__loading__jwZPT"}},62405:function(e){e.exports={clientAvailability__title:"client-availability_clientAvailability__title__7aTEl",clientAvailability__subTitle:"client-availability_clientAvailability__subTitle__tYsIE",clientAvailability__header:"client-availability_clientAvailability__header__j7Unr",clientAvailability__calendar:"client-availability_clientAvailability__calendar__A_Kxw"}},5152:function(e,t,n){e.exports=n(73579)},53250:function(e,t,n){"use strict";var a=n(67294);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},r=a.useState,o=a.useEffect,l=a.useLayoutEffect,u=a.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(a){return!0}}var c="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),a=r({inst:{value:n,getSnapshot:t}}),i=a[0].inst,c=a[1];return l((function(){i.value=n,i.getSnapshot=t,s(i)&&c({inst:i})}),[e,n,t]),o((function(){return s(i)&&c({inst:i}),e((function(){s(i)&&c({inst:i})}))}),[e]),u(n),n};t.useSyncExternalStore=void 0!==a.useSyncExternalStore?a.useSyncExternalStore:c},61688:function(e,t,n){"use strict";e.exports=n(53250)}},function(e){e.O(0,[9967,5463,7950,9774,2888,179],(function(){return t=15689,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.