https://cfixe.com/_next/static/chunks/pages/my-account/appointment/[[...id]]-c25c27a4e79bdfacd9c7.js
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5995],{67222:function(e,t,n){"use strict";n(67294);var o=n(7725),r=n(11163),s=n(85893);t.Z=function(e){var t=e.onClick,n=e.className,i=void 0===n?"":n,l=(0,r.useRouter)();return(0,s.jsxs)("div",{onClick:function(){t?t():l.back()},className:"relative h-12 w-12 cursor-pointer "+i,children:[(0,s.jsx)(o.e0j,{viewBox:"0 0 52.828 52.828",className:"absolute text-gray-blue h-12"}),(0,s.jsx)(o.bAV,{viewBox:"0 0 52.828 52.828",className:"text-green-med absolute h-12 rotate-0 hover:rotate-90 duration-200"})]})}},92167:function(e,t,n){"use strict";var o=n(53848);t.default=void 0;var r,s=(r=n(67294))&&r.__esModule?r:{default:r},i=n(21063),l=n(34651),a=n(7426);var c={};function u(e,t,n,o){if(e&&i.isLocalURL(t)){e.prefetch(t,n,o).catch((function(e){0}));var r=o&&"undefined"!==typeof o.locale?o.locale:e&&e.locale;c[t+"%"+n+(r?"%"+r:"")]=!0}}var d=function(e){var t,n=!1!==e.prefetch,r=l.useRouter(),d=s.default.useMemo((function(){var t=i.resolveHref(r,e.href,!0),n=o(t,2),s=n[0],l=n[1];return{href:s,as:e.as?i.resolveHref(r,e.as):l||s}}),[r,e.href,e.as]),h=d.href,f=d.as,p=e.children,m=e.replace,v=e.shallow,g=e.scroll,x=e.locale;"string"===typeof p&&(p=s.default.createElement("a",null,p));var T=(t=s.default.Children.only(p))&&"object"===typeof t&&t.ref,y=a.useIntersection({rootMargin:"200px"}),E=o(y,2),b=E[0],w=E[1],_=s.default.useCallback((function(e){b(e),T&&("function"===typeof T?T(e):"object"===typeof T&&(T.current=e))}),[T,b]);s.default.useEffect((function(){var e=w&&n&&i.isLocalURL(h),t="undefined"!==typeof x?x:r&&r.locale,o=c[h+"%"+f+(t?"%"+t:"")];e&&!o&&u(r,h,f,{locale:t})}),[f,h,w,x,n,r]);var N={ref:_,onClick:function(e){t.props&&"function"===typeof t.props.onClick&&t.props.onClick(e),e.defaultPrevented||function(e,t,n,o,r,s,l,a){("A"!==e.currentTarget.nodeName||!function(e){var t=e.currentTarget.target;return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)&&i.isLocalURL(n))&&(e.preventDefault(),null==l&&o.indexOf("#")>=0&&(l=!1),t[r?"replace":"push"](n,o,{shallow:s,locale:a,scroll:l}))}(e,r,h,f,m,v,g,x)},onMouseEnter:function(e){i.isLocalURL(h)&&(t.props&&"function"===typeof t.props.onMouseEnter&&t.props.onMouseEnter(e),u(r,h,f,{priority:!0}))}};if(e.passHref||"a"===t.type&&!("href"in t.props)){var S="undefined"!==typeof x?x:r&&r.locale,j=r&&r.isLocaleDomain&&i.getDomainLocale(f,S,r&&r.locales,r&&r.domainLocales);N.href=j||i.addBasePath(i.addLocale(f,S,r&&r.defaultLocale))}return s.default.cloneElement(t,N)};t.default=d},7426:function(e,t,n){"use strict";var o=n(53848);Object.defineProperty(t,"__esModule",{value:!0}),t.useIntersection=function(e){var t=e.rootMargin,n=e.disabled||!i,a=r.useRef(),c=r.useState(!1),u=o(c,2),d=u[0],h=u[1],f=r.useCallback((function(e){a.current&&(a.current(),a.current=void 0),n||d||e&&e.tagName&&(a.current=function(e,t,n){var o=function(e){var t=e.rootMargin||"",n=l.get(t);if(n)return n;var o=new Map,r=new IntersectionObserver((function(e){e.forEach((function(e){var t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)}))}),e);return l.set(t,n={id:t,observer:r,elements:o}),n}(n),r=o.id,s=o.observer,i=o.elements;return i.set(e,t),s.observe(e),function(){i.delete(e),s.unobserve(e),0===i.size&&(s.disconnect(),l.delete(r))}}(e,(function(e){return e&&h(e)}),{rootMargin:t}))}),[n,t,d]);return r.useEffect((function(){if(!i&&!d){var e=s.requestIdleCallback((function(){return h(!0)}));return function(){return s.cancelIdleCallback(e)}}}),[d]),[f,d]};var r=n(67294),s=n(73447),i="undefined"!==typeof IntersectionObserver;var l=new Map},11717:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return P},noSelectedStyle:function(){return C},selectedStyle:function(){return O}});var o=n(67294),r=n(11163),s=n(97037),i=n(22531),l=n(16811),a=n(7466),c=n(90753),u=n(83789),d=n(55170),h=n(39704),f=n(80338),p=n(40005),m=n(54741),v=n(85893),g=function(e){var t=e.appointment,n=e.onClick,o=e.isSelected;return(0,v.jsxs)("div",{className:"w-full flex items-center my-3 scale-[85%] sm:scale-100 hover:opacity-30 curs
1or "+(o?"opacity-30":""),onClick:n,children:[(0,v.jsxs)("div",{className:"w-24 bg-blue-xLight flex flex-col text-blue-dark rounded-2xl items-center py-1 max-h-20",children:[(0,v.jsx)("span",{children:t.day_text}),(0,v.jsx)("span",{className:"text-xl font-bold -my-1",children:t.date_text}),(0,v.jsx)("span",{className:"text-lg",children:t.month_text})]}),(0,v.jsxs)("div",{className:"flex-1 flex flex-col ml-3 justify-center ".concat((0,s.HN)(t)&&"line-through"),children:[(0,v.jsxs)("div",{children:[t.pro_name,t.status===p.g.WAITING_CONFIRMATION&&(0,v.jsxs)("span",{className:"ml-2 text-salmon font-bold",children:["- ",m.oc.t("GLOBAL_WAITING_CONFIRMATION")]})]}),(0,v.jsx)("div",{className:"flex flex-col italic",children:t.prestation.map((function(e,t){return(0,v.jsx)("span",{children:e.name},t)}))}),(0,v.jsx)("span",{className:"font-bold",children:t.time_start})]}),(0,v.jsx)("div",{className:"w-20 ml-5 items-center justify-center flex",children:(0,v.jsx)("img",{className:"rounded-full w-14 h-14 object-cover",src:f.Z.imageBucketBasePath+t.prestation[0].member_picture,alt:t.prestation[0].member_name})})]})},x=n(7725),T=n(56767),y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var E=function(){return(E=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};var b="Pixel",w="Percent",_={unit:w,value:.8};function N(e){return"number"===typeof e?{unit:w,value:100*e}:"string"===typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:b,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:w,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),_):(console.warn("scrollThreshold should be string or number"),_)}var S=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"===typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame((function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")}))},n.onScrollListener=function(e){"function"===typeof n.props.onScroll&&setTimeout((function(){return n.props.onScroll&&n.props.onScroll(e)}),0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,o){var r,s=!1,i=0;function l(){r&&clearTimeout(r)}function a(){var a=this,c=Date.now()-i,u=arguments;function d(){i=Date.now(),n.apply(a,u)}function h(){r=void 0}s||(o&&!r&&d(),l(),void 0===o&&c>e?d():!0!==t&&(r=setTimeout(o?h:d,void 0===o?e-c:e)))}return"boolean"!==typeof t&&(o=n,n=t,t=void 0),a.cancel=function(){l(),s=!0},a}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if("undefined"===typeof this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');
1if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"===typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!==typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?E(E({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,o=N(t);return o.unit===b?e.scrollTop<=o.value+n-e.scrollHeight+1:e.scrollTop<=o.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,o=N(t);return o.unit===b?e.scrollTop+n>=e.scrollHeight-o.value:e.scrollTop+n>=o.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=E({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),r=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return o.createElement("div",{style:r,className:"infinite-scroll-component__outerdiv"},o.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&o.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},o.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(o.Component),j=n(55678),L=function(e){var t=e.type,n=e.onAppointmentClick,r=e.selectedBookingId,s=(0,o.useState)([]),i=s[0],l=s[1],a=(0,o.useState)(!1),c=a[0],f=a[1],p=(0,o.useState)(!1),y=p[0],E=p[1],b=(0,h.v9)((function(e){return e.customer.jwt})),w=(0,o.useRef)(0),_=function(){f(!0),(0,d.By)(t,b,w.current,8).then((function(e){e.data.length<8&&E(!0),l((function(t){return(0,u.Z)(new Set([].concat((0,u.Z)(t),(0,u.Z)(e.data))))})),w.current+=1})).catch((function(e){j.Am.error(m.oc.t("GLOBAL_UNKNOWN_ERROR"))})).finally((function(){f(!1)}))};return(0,o.useEffect)((function(){b&&_()}),[b]),(0,v.jsxs)("div",{className:"h-160 overflow-auto",children:[(0,v.jsx)(S,{dataLength:i.length,next:_,hasMore:!y,loader:(0,v.jsx)(T.Z,{className:"w-6 h-6 animate-spin block text-blue-dark mt-10 mx-auto"}),children:i.map((function(e,t){return(0,v.jsx)(g,{onClick:function(){return n(e)},appointment:e,isSelected:r===e.booking_id},t)}))}),0===i.length&&!c&&(0,v.jsxs)("div",{className:"items-center flex flex-col",children:[(0,v.jsx)(x.QWR,{viewBox:"0 0 853.11745 565",className:"ml-8 w-52 h-48"}),(0,v.jsx)("div",{className:"text-gray-blue text-lg font-semibold mb-2",children:m.oc.t("CUSTOMER_APPOINTMENTS_EMPTY")}),(0,v.jsx)("div",{className:"text-gray-blue text-center",children:m.oc.t("CUSTOMER_APPOINTMENTS_EMPTY_LINE2")})]})]})},M=n(67612),k=n(67222),R=n(70943),O="bg-blue-dark w-full rounded-2xl items-center justify-center flex text-white mx-1 cursor-pointer",C="w-full rounded-2xl items-center justify-center flex text-blue-dark cursor-pointer",P=function(){var e=(0,i.CG)((function(e){return e.customer.infos})),t=(0,o.useState)(),n=t[0],u=t[1],h=(0,o.useState)("FUTURE"),f=h[0],p=h[1],g=(0,i.CG)((function(e){return e.customer.jwt})),T=(0,r.useRouter)();(0,o.useEffect)((function(){T.isReady&&void 0===e&&T.push("/signin?redirect=/my-account/appointment/"+T.query.id)}),[e]),(0,o.useEffect)((function(){if(T.isReady)if(T.query.id&&g){var e=T.query.id;(null===n||void 0===n?void 0:n.booking_id)!==e&&(0,d.Ey)(e+"",g).then((function(e){u(e.data)})).catch((function(e){console.error(e)}))}else n&&u(void 0)}),[T]);return void 0===e?(0,v.jsx)(v.Fragment,{}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(R.Z,{title:m.oc.t("MENU_APPOINTMENT_TITLE"),longTitle:m.oc.t("MENU_APPOINTMENT_TITLE"),description:"",image:"main.jpg",indexable:!1}),(0,v.jsx)(l.Z,{proMode:!1}),(0,v.jsxs)("div",{className:"flex flex-col md:flex-row mt-8 mx-5 xl:w-320 xl:mx-auto",children:[(0,v.jsxs)("div",{className:"flex flex-1 flex-col sm:ml-10 max-w-lg mt-5 md:mt-0",children:[(0,v.jsx)("h1",{className:"font-bold mb-2 text-xl text-gray-blue",children:m.oc.t("MENU_APPOINTMENT_TITLE")}),(0,v.jsx)(c.Z,{}),(0,v.jsxs)("div",{className:"mt-2 h-14 bg-blue-xLight rounded-2xl w-80 flex mx-auto py-1 mb-3",children:[(0,v.jsx)("div",{className:"FUTURE"===f?O:C,onClick:function(){return p("FUTURE")},children:m.oc.t("CUSTOMER_APPOINTMENTS_FUTURE")}),(0,v.jsx)("div",{className:"PAST"===f?O:C,onClick:function(){return p("PAST")},children:m.oc.t("CUSTOMER_APPOINTMENTS_PAST")})]}),(0,v.jsx)("div",{children:(0,v.jsx)(L,{type:f,onAppointmentClick:function(e){return function(e){u(e),T.push("/my-account/appointment/".concat(e.booking_id))}(e)},selectedBookingId:null===n||void 0===n?void 0:n.booking_id},f)})]}),n&&(0,v.jsxs)("div",{className:"fixed bg-white w-full top-0 left-0 right-0 bottom-0 p-7 overflow-auto md:relative md:w-full md:flex md:flex-1 md:mt-16 md:ml-10 md:h-full",children:[(0,v.jsx)("div",{className:"-ml-3 md:hidden",children:(0,v.jsx)(k.Z,{onClick:function(){return u(void 0),void T.push("/my-account/appointment")}})}),(0,v.jsx)(M.Z,{appointment:n},n.booking_id)]}),(0,s.xb)(n)&&(0,v.jsxs)("div",{className:"hidden md:flex flex-col items-center justify-center flex-1",children:[(0,v.jsx)(x.rE0,{viewBox:"0 0 860.36652 608.83997",className:"w-52 h-52"}),(0,v.jsx)("div",{className:"text-gray-blue",children:m.oc.t("CUSTOMER_APPOINTMENTS_ASK_SELECT")})]})]}),(0,v.jsx)(a.Z,{})]})}},8725:function(e,t,n){"use strict";var o=n(7725);t.Z={52:o.v5l,19:o.nas,77:o.nas,55:o.dtK,33:o.gc3,60:o.xUy,47:o.sEg,45:o.ZEE,44:o.Wtm,43:o.mDV,31:o.JhY,32:o.JhY,62:o.b0u,46:o.Drk,53:o.JlS,59:o.Ji7,17:o.iUk,35:o.a3s,56:o.Jq6,54:o.P17,34:o.auD,20:o.lj5,22:o.O2K,38:o.ExF,37:o.P3l,36:o.pse,57:o.$KW,58:o.LcK,21:o.O2K,48:o.noT,49:o.noT,39:o.ulF,40:o.ci0,41:o.e2D,42:o.e2D,66:o.Ajk,65:o.DbQ,73:o.xwO,74:o.uH2,63:o.r3_,71:o.zYi,64:o.HaA,70:o.KG8,68:o.Rol,51:o.x7l,67:o.kYc,72:o.kYc,76:o.kYc,50:o.Oic,69:o.Oic,30:o.GP0,79:o.dRg,78:o.ZJo}},99185:function(e,t,n){"use strict";n.d(t,{_3:function(){return i},UU:function(){return l}});var o=n(69713),r=n.n(o),s=n(80338),i=function(e){return r().post(s.Z.baseUrl+"professional/presearch",e)},l=function(e,t,n){return r().get(s.Z.baseUrl+"professional/search/fr/"+e+"/"+t+"/"+n)}},38598:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-account/appointment/[[...id]]",function(){return n(11717)}])},41664:function(e,t,n){e.exports=n(92167)}},function(e){e.O(0,[9774,3662,7856,7168,5015,2260,5270,8996,2888,179],(function(){return t=38598,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.