1"use strict";(globalThis.webpackChunkgroovio=globalThis.webpackChunkgroovio||[]).push([[1838],{Ijiu(e,l,t){t.d(l,{A:()=>q});var n=t("nKUr"),i=t("q1tI"),s=t("V4z/"),a=t("SOjZ"),d=t("g02y"),o=t("CbZc"),r=t("nnFG"),c=t("OTb+"),u=t("UdV1"),m=t("vvQw"),v=t("xaWN"),h=t("C0In"),p=t("GJ4e"),x=t("BbnY"),f=t("9zW4"),g=t("00ih"),b=t("wd/R"),_=t.n(b),j=t("PSD3"),y=t.n(j),k=t("DcvE"),N=t("vj2F"),w=t("5S9M"),S=t("b1Ll"),C=function(){return C=Object.assign||function(e){for(var l,t=1,n=arguments.length;t<n;t++)for(var i in l=arguments[t])Object.prototype.hasOwnProperty.call(l,i)&&(e[i]=l[i]);return e},C.apply(this,arguments)},D=function(e,l,t,n){return new(t||(t=Promise))(function(i,s){function a(e){try{o(n.next(e))}catch(e){s(e)}}function d(e){try{o(n.throw(e))}catch(e){s(e)}}function o(e){var l;e.done?i(e.value):(l=e.value,l instanceof t?l:new t(function(e){e(l)})).then(a,d)}o((n=n.apply(e,l||[])).next())})},A=function(e,l){var t,n,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=d(0),a.throw=d(1),a.return=d(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(d){return function(o){return function(d){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(s=0)),s;)try{if(t=1,n&&(i=2&d[0]?n.return:d[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,d[1])).done)return i;switch(n=0,i&&(d=[2&d[0],i.value]),d[0]){case 0:case 1:i=d;break;case 4:return s.label++,{value:d[1],done:!1};case 5:s.label++,n=d[1],d=[0];continue;case 7:d=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==d[0]&&2!==d[0])){s=0;continue}if(3===d[0]&&(!i||d[1]>i[0]&&d[1]<i[3])){s.label=d[1];break}if(6===d[0]&&s.label<i[1]){s.label=i[1],i=d;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(d);break}i[2]&&s.ops.pop(),s.trys.pop();continue}d=l.call(e,s)}catch(e){d=[6,e],n=0}finally{t=i=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([d,o])}}},I=[{label:"Upcoming",value:"upcoming"},{label:"Achieved",value:"achieved"},{label:"In Progress",value:"in progress"}],T=[{value:"upcoming",label:"Upcoming",cls:"is-upcoming"},{value:"in progress",label:"In Progress",cls:"is-inprogress"},{value:"achieved",label:"Achieved",cls:"is-achieved"}],E="#9ca3af",L="var(--violet)",Y="#16a34a";const M=function(e){var l,t,a,r,c,u,h,p=(0,s.g)(),x=p.id,b=p.date,j="".concat((0,o.kI)(x),"/?date=").concat((0,o.LG)(b)),M=(0,m.wA)(),P=(0,m.d4)(function(e){return e.ScheduleTrickUpdateState}),B=(0,m.d4)(function(e){return e.ScheduleGetState}).schedule_get_data,U=(0,m.d4)(function(e){return e.ScheduleTrickListAssignState}).schedule_trick_list_data,F=(0,m.d4)(function(e){return e.ScheduleTrickListRemoveState}).schedule_trick_list_remove_data,H=(0,m.d4)(function(e){return e.ScheduleSkillStudentListState}),G=H.schedule_skill_student_list_data,W=H.schedule_skill_student_list_loading,z=(0,m.d4)(function(e){return e.ScheduleSubTrickListState}),O=z.schedule_sub_trick_list_details_data,R=z.schedule_sub_trick_list_details_loading,K=(0,m.d4)(function(e){return e.GetStudioProfileState}).studio_profile_data,Z=(0,k.V2)((null===(l=null==K?void 0:K.data)||void 0===l?void 0:l.terminologies)||[]),V=(0,m.d4)(function(e){return e.GetAllStudioTrickState}).all_trick_data,q=(0,i.useState)(null),Q=q[0],J=q[1],X=(0,i.useState)({}),$=X[0],ee=X[1],le=(0,i.useState)(null),te=le[0],ne=le[1],ie=(0,i.useState)("achieved"),se=ie[0],ae=ie[1],de=(0,i.useState)(!1),oe=de[0],re=de[1],ce=(0,i.useState)(null),ue=ce[0],me=ce[1],ve=(0,i.useState)(!1),he=ve[0],pe=ve[1],xe=(0,i.useRef)(void 0),fe=(0,i.useRef)(null);xe.current=null==G?void 0:G.data;var ge=(0,i.useMemo)(function(){var e;return null!==(e=null!=Q?Q:null==G?void 0:G.data)&&void 0!==e?e:[]},[Q,null==G?void 0:G.data]),be=function(e,l,t,n,i,s){var a=(0,o.kI)(l);fe.current={studentUuid:i,trickListId:t,subTrickId:n,status:e,scheduleIdDecoded:a};var d={user_id:i,uuid:i,schedule_id:a,trick_list_id:t,sub_trick_id:n,status:e,class_purchase_id:s};M((0,v.K_)(d))},_e=function(e){null!=e&&ee(function(l){var t;return C(C({},l),((t={})[e]=!l[e],t))})},je=function(e,l,t,n,i,s){var a={};return null==e||e.map(function(e){var i;(null==e?void 0:e.uuid)==n&&(null==e?void 0:e.sub_trick_id)==t&&(null==e?void 0:e.trick_list_id)==l&&(null===(i=null==e?void 0:e.sc
1hedule_array)||void 0===i?void 0:i.includes(s))&&(a=null==I?void 0:I.filter(function(l){return(null==l?void 0:l.value)==(null==e?void 0:e.status)}))}),a.length>0?a:I[0]};(0,i.useEffect)(function(){if("Skills"==(null==e?void 0:e.tabType)){var l={schedule_id:(0,o.kI)(x),schedule_date:(0,o.LG)(b)};M((0,v.Gx)(l));var t={schedule_id:(0,o.kI)(x)};M((0,v.lT)(t))}},[null==e?void 0:e.tabType,b]),(0,i.useEffect)(function(){J(null)},[G]),(0,i.useEffect)(function(){"Skills"==(null==e?void 0:e.tabType)&&M((0,g.Fi)({}))},[null==e?void 0:e.tabType,b]),(0,i.useEffect)(function(){if(((null==U?void 0:U.status)||(null==F?void 0:F.status))&&j){var e={schedule_id:(0,o.kI)(x)};M((0,v.lT)(e));var l={schedule_id:(0,o.kI)(x),schedule_date:(0,o.LG)(b)};M((0,v.Gx)(l))}},[U,F,b]),(0,i.useEffect)(function(){var e;if(!1===(null==P?void 0:P.loading)&&!0===(null==P?void 0:P.status)&&!0===(null===(e=null==P?void 0:P.schedule_trick_update_data)||void 0===e?void 0:e.status)&&fe.current){var l=fe.current;fe.current=null,J(function(e){var t;return(null!==(t=null!=e?e:xe.current)&&void 0!==t?t:[]).map(function(e){var t;if((null==e?void 0:e.uuid)!=l.studentUuid)return e;var n=l.scheduleIdDecoded,i=(null!==(t=e.applied_tricks)&&void 0!==t?t:[]).map(function(e){var t,i=null!==(t=null==e?void 0:e.schedule_array)&&void 0!==t?t:[],s=i.includes(n)||i.includes(String(n))||i.map(Number).includes(Number(n));return(null==e?void 0:e.uuid)==l.studentUuid&&(null==e?void 0:e.sub_trick_id)==l.subTrickId&&(null==e?void 0:e.trick_list_id)==l.trickListId&&s?C(C({},e),{status:l.status}):e});return C(C({},e),{applied_tricks:i})})}),M({type:N.Z0V,data:[]})}else!1===(null==P?void 0:P.loading)&&!1===(null==P?void 0:P.status)&&(fe.current=null)},[null==P?void 0:P.loading,null==P?void 0:P.status,null==P?void 0:P.schedule_trick_update_data,M]);var ye=function(e){var l,t=null==V?void 0:V.data;if((null===(l=null==e?void 0:e.applied_tricks)||void 0===l?void 0:l.length)>0){var n=null==t?void 0:t.filter(function(l){var t;return!(null===(t=null==e?void 0:e.trick_already_assign)||void 0===t?void 0:t.includes(parseInt(l.value)))});return n||t}return t||[]},ke="Skills"===(null==e?void 0:e.tabType)&&(!0===W||!0===R),Ne=_()(null==B?void 0:B.created_date).isBefore(_()(d.Ml)),we=null!==(t=null==O?void 0:O.data)&&void 0!==t?t:[],Se=(0,i.useMemo)(function(){for(var e=new Map,l=0,t=null!=ge?ge:[];l<t.length;l++){var n=t[l];e.has(null==n?void 0:n.id)||e.set(null==n?void 0:n.id,n)}return Array.from(e.values())},[ge]),Ce=function(e){return we.filter(function(l){return!0!==(null==l?void 0:l.is_student_wise)||(null==l?void 0:l.student)==(null==e?void 0:e.id)})},De=function(e,l,t){var n,i,s=(null!==(n=null==e?void 0:e.applied_tricks)&&void 0!==n?n:[]).find(function(n){var i;return(null==n?void 0:n.uuid)==(null==e?void 0:e.uuid)&&(null==n?void 0:n.sub_trick_id)==t&&(null==n?void 0:n.trick_list_id)==l&&(null===(i=null==n?void 0:n.schedule_array)||void 0===i?void 0:i.includes(null==e?void 0:e.schedule_id))});return null!==(i=null==s?void 0:s.status)&&void 0!==i?i:"upcoming"},Ae=(0,i.useMemo)(function(){for(var e,l=new Map,t=0,n=Se;t<n.length;t++)for(var i=n[t],s=0,a=Ce(i);s<a.length;s++){var d=a[s];if(null!=(null==d?void 0:d.trick))for(var o=0,r=null!==(e=null==d?void 0:d.trick_list)&&void 0!==e?e:[];o<r.length;o++){var c=r[o];if(null!=(null==c?void 0:c.sub_trick)){var u="".concat(d.trick,":").concat(c.sub_trick);l.has(u)||l.set(u,{value:u,label:null==c?void 0:c.name,listName:null==d?void 0:d.name,trickId:d.trick,subTrickId:c.sub_trick})}}}return Array.from(l.values())},[Se,we]),Ie=(0,i.useMemo)(function(){for(var e=new Map,l=0,t=Ae;l<t.length;l++){var n=t[l];e.has(n.listName)||e.set(n.listName,[]),e.get(n.listName).push(n)}return Array.from(e.entries()).map(function(e){return{label:e[0],options:e[1]}})},[Ae]),Te=(0,i.useMemo)(function(){return te?Se.flatMap(function(e){var l,t=Ce(e).find(function(e){return(null==e?void 0:e.trick)==te.trickId}),n=(null!==(l=null==t?void 0:t.trick_list)&&void 0!==l?l:[]).find(function(e){return(null==e?void 0:e.sub_trick)==te.subTrickId});return t&&n?[{student:e,trick:t,skill:n,status:De(e,null==t?void 0:t.id,null==n?void 0:n.id)}]:[]}):[]},[te,Se,we,ge]),Ee=te?Se.length-Te.length:0,Le=Te.filter(function(e){return e.status!==se}),Ye=null!==(a=null==V?void 0:V.data)&&void 0!==a?a:[],Me=(0,i.useMemo)(function(){return ue?Se.filter(function(e){return!Ce(e).some(function(e){return(null==e?void 0:e.trick)==ue.value})}):[]},[ue,Se,we]),Pe=function(e){var l,t="".concat((null==e?void 0:e.first_name)||""," ").concat((null==e?void 0:e.last_name)||"").trim();return(null===(l=null==e?void 0:e.child_first_name)||void 0===l?void 0:l.length)>0?"".concat(t," (").concat(e.child_first_name,")"):"".concat(t," (Self)")};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:Ne?"d-flex align-items-start HWE_Trick_List table-responsive same-table":"HWE_Trick_List",children:ke?(0,n.jsxs)("div",{className:"w-100 d-flex flex-column align-items-center justify-content-center py-5 px-3",children:[(0,n.jsx)("div",{className:"spinner-border text-secondary",role:"status",style:{width:"2.5rem",height:"2.5rem"},children:(0,n.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),(0,n.jsx)("p",{className:"text-muted mt-3 mb-0 small",children:"Loading skillsâ¦"})]}
1):Ne?(0,n.jsxs)(i.Fragment,{children:[(null==ge?void 0:ge.length)&&(null===(r=null==O?void 0:O.data)||void 0===r?void 0:r.length)?(0,n.jsxs)("table",{className:"table tableFix tableFix2 table-bordered mb-0 border-end",cellSpacing:0,cellPadding:0,children:[(0,n.jsx)("thead",{children:(0,n.jsx)("tr",{children:(0,n.jsxs)("th",{className:"trick-table-schedule-second",colSpan:null==ge?void 0:ge.length,children:["Name of ",Z("student",!0)]})})}),(0,n.jsxs)("tbody",{children:[(0,n.jsx)("tr",{children:(0,n.jsx)("td",{className:"trick-table-schedule-second",children:"Â "})}),(null==ge?void 0:ge.length)?null==ge?void 0:ge.map(function(e,l){var t;return(0,n.jsx)("tr",{children:(0,n.jsx)("td",{className:"studentName trick-table-schedule-third",children:(null===(t=null==e?void 0:e.child_first_name)||void 0===t?void 0:t.length)>0?"".concat(null==e?void 0:e.first_name," (").concat(null==e?void 0:e.child_first_name,")"):"".concat(null==e?void 0:e.first_name," (Self)")})},l)}):"-"]})]}):"",(0,n.jsx)("div",{className:"scrollY width-to-fixed",children:(0,n.jsx)("table",{className:"table TrickList table-bordered mb-0",cellSpacing:0,cellPadding:0,children:(null==ge?void 0:ge.length)&&(null===(c=null==O?void 0:O.data)||void 0===c?void 0:c.length)?(0,n.jsx)("tbody",{children:(0,n.jsx)("tr",{children:null===(u=null==O?void 0:O.data)||void 0===u?void 0:u.map(function(e,l){var t,i;return(0,n.jsx)("td",{colSpan:null==e?void 0:e.length,children:(0,n.jsxs)("table",{className:"table",cellSpacing:0,cellPadding:0,children:[(0,n.jsx)("thead",{children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{className:"text-center trick-table-schedule-second",colSpan:null===(t=null==e?void 0:e.trick_list)||void 0===t?void 0:t.length,children:null==e?void 0:e.name})})}),(0,n.jsxs)("tbody",{children:[(0,n.jsx)("tr",{children:null===(i=null==e?void 0:e.trick_list)||void 0===i?void 0:i.map(function(e,l){return(0,n.jsx)("td",{className:"text-center trick-table-schedule",children:(0,n.jsx)("p",{className:"text-truncut",children:null==e?void 0:e.name})},l)})}),(null==ge?void 0:ge.length)?null==ge?void 0:ge.map(function(l,t){var i;return(0,n.jsx)("tr",{children:null===(i=null==e?void 0:e.trick_list)||void 0===i?void 0:i.map(function(t,i){return(0,n.jsx)("td",{children:(0,n.jsx)("div",{className:"customSELECT",children:(0,n.jsx)(f.Ay,{menuPlacement:"top",isMulti:!1,options:I,value:je(null==l?void 0:l.applied_tricks,null==e?void 0:e.id,null==t?void 0:t.id,l.uuid,l.class_purchase_id,null==l?void 0:l.schedule_id),onChange:function(n){be(null==n?void 0:n.value,x,null==e?void 0:e.id,null==t?void 0:t.id,l.uuid,l.class_purchase_id)},onKeyDown:function(e){e.preventDefault()},isSearchable:!1,styles:{singleValue:function(n){var i,s,a;return C(C({},n),{color:(null===(i=je(null==l?void 0:l.applied_tricks,null==e?void 0:e.id,null==t?void 0:t.id,l.uuid,l.class_purchase_id,null==l?void 0:l.schedule_id))||void 0===i?void 0:i.value)||"upcoming"==(null===(s=je(null==l?void 0:l.applied_tricks,null==e?void 0:e.id,null==t?void 0:t.id,l.uuid,l.class_purchase_id,null==l?void 0:l.schedule_id)[0])||void 0===s?void 0:s.value)?"gray":"achieved"==(null===(a=je(null==l?void 0:l.applied_tricks,null==e?void 0:e.id,null==t?void 0:t.id,l.uuid,l.class_purchase_id,null==l?void 0:l.schedule_id)[0])||void 0===a?void 0:a.value)?"green":"orange",fontSize:"16px",fontWeight:"bold"})}}})})},i)})},t)}):(0,n.jsx)("tr",{})]})]})},l)})})}):(0,n.jsx)("p",{className:"text-center mt-4 d-flex justify-content-center",children:"No record found"})})})]}):(0,n.jsx)(i.Fragment,{children:(0,n.jsxs)("div",{className:"w-100",children:[Se.length>1&&(Ye.length||Ae.length)?(0,n.jsxs)("div",{className:"detail-card skill-bulk",children:[Ye.length?(0,n.jsxs)("div",{className:"skill-bulk__section",children:[(0,n.jsx)("div",{className:"detail-section-title mb-0",children:"Assign a skill list to the whole class"}),(0,n.jsxs)("div",{className:"skill-bulk__controls",children:[(0,n.jsx)("div",{className:"skill-bulk__picker",children:(0,n.jsx)(f.Ay,{menuPortalTarget:document.body,placeholder:"Choose a skill list",isClearable:!0,classNamePrefix:"dropDown",isSearchable:!0,isMulti:!1,value:ue,onChange:function(e){return me(e)},options:Ye})}),(0,n.jsx)("button",{type:"button",className:"btn text-white skill-bulk__apply",disabled:!ue||0===Me.length||he,onClick:function(){if(ue&&0!==Me.length){var e=Me.length;y().fire({title:"Give the class ".concat(ue.label,"?"),text:"".concat(e," ").concat(1===e?Z("student"):"".concat(Z("student"),"s")," will be given this skill list, every skill starting as Upcoming. Anyone who already has it keeps the progress they have."),icon:"warning",showCancelButton:!0,confirmButtonColor:"rgb(2
16, 26, 58)",cancelButtonColor:"#d33",confirmButtonText:"Yes, assign"}).then(function(e){return D(void 0,void 0,void 0,function(){var l,t,n;return A(this,function(i){switch(i.label){case 0:return e.isConfirmed?(pe(!0),l=(0,o.kI)(x),[4,Promise.allSettled(Me.map(function(e){return(0,w.P1)(S.dM.studio_assign_tricklist_student,{user_id:null==e?void 0:e.uuid,uuid:null==e?void 0:e.uuid,schedule_id:l,trick_list_id:ue.value,status:"upcoming",class_purchase_id:null==e?void 0:e.class_purchase_id},!1)}))]):[2];case 1:return t=i.sent(),n=t.filter(function(e){var l;return"rejected"===e.status||!0!==(null===(l=e.value)||void 0===l?void 0:l.status)}).length,J(null),M((0,v.lT)({schedule_id:l})),M((0,v.Gx)({schedule_id:l,schedule_date:(0,o.LG)(b)})),pe(!1),me(null),n>0&&y().fire({title:"Some assignments did not save",text:"".concat(t.length-n," of ").concat(t.length," saved. The list below shows what is stored."),icon:"error",confirmButtonColor:"rgb(26, 26, 58)"}),[2]}})})})}},children:he?"Assigningâ¦":ue&&Me.length?"Assign to ".concat(Me.length):"Assign"})]}),(0,n.jsx)("p",{className:"skill-bulk__hint",children:ue?0===Me.length?"Everyone in this class already has this list.":"".concat(Me.length," of ").concat(Se.length," don't have this list yet."):"Give everyone in this class the same skill list. Anyone who already has it is left alone."})]}):null,Ae.length?(0,n.jsxs)("div",{className:"skill-bulk__section",children:[(0,n.jsx)("div",{className:"detail-section-title mb-0",children:"Mark a skill for the whole class"}),(0,n.jsxs)("div",{className:"skill-bulk__controls",children:[(0,n.jsx)("div",{className:"skill-bulk__picker",children:(0,n.jsx)(f.Ay,{menuPortalTarget:document.body,placeholder:"Choose a skill",isClearable:!0,classNamePrefix:"dropDown",isSearchable:!0,isMulti:!1,value:te,onChange:function(e){return ne(e)},options:Ie})}),(0,n.jsx)("div",{className:"skill-toggle",role:"group","aria-label":"Status to apply",children:T.map(function(e){return(0,n.jsx)("button",{type:"button",className:"skill-toggle__seg ".concat(e.cls),"aria-pressed":se===e.value,onClick:function(){return ae(e.value)},children:e.label},e.value)})}),(0,n.jsx)("button",{type:"button",className:"btn text-white skill-bulk__apply",disabled:!te||0===Le.length||oe,onClick:function(){var e,l;if(te&&0!==Le.length){var t=null!==(l=null===(e=T.find(function(e){return e.value===se}))||void 0===e?void 0:e.label)&&void 0!==l?l:se;y().fire({title:"Mark ".concat(te.label," as ").concat(t,"?"),text:"This updates ".concat(Le.length," ").concat(1===Le.length?Z("student"):"".concat(Z("student"),"s")," in this class."),icon:"warning",showCancelButton:!0,confirmButtonColor:"rgb(26, 26, 58)",cancelButtonColor:"#d33",confirmButtonText:"Yes, mark ".concat(t)}).then(function(e){return D(void 0,void 0,void 0,function(){var l,t,n;return A(this,function(i){switch(i.label){case 0:return e.isConfirmed?(re(!0),l=(0,o.kI)(x),[4,Promise.allSettled(Le.map(function(e){var t,n,i,s,a;return(0,w.P1)(S.dM.studio_student_trick_update,{user_id:null===(t=e.student)||void 0===t?void 0:t.uuid,uuid:null===(n=e.student)||void 0===n?void 0:n.uuid,schedule_id:l,trick_list_id:null===(i=e.trick)||void 0===i?void 0:i.id,sub_trick_id:null===(s=e.skill)||void 0===s?void 0:s.id,status:se,class_purchase_id:null===(a=e.student)||void 0===a?void 0:a.class_purchase_id},!1)}))]):[2];case 1:return t=i.sent(),n=t.filter(function(e){var l;return"rejected"===e.status||!0!==(null===(l=e.value)||void 0===l?void 0:l.status)}).length,J(null),M((0,v.lT)({schedule_id:l})),M((0,v.Gx)({schedule_id:l,schedule_date:(0,o.LG)(b)})),re(!1),n>0&&y().fire({title:"Some updates did not save",text:"".concat(Le.length-n," of ").concat(Le.length," saved. The list below shows what is stored."),icon:"error",confirmButtonColor:"rgb(26, 26, 58)"}),[2]}})})})}},children:oe?"Applyingâ¦":"Apply"})]}),(0,n.jsx)("p",{className:"skill-bulk__hint",children:te?0===Te.length?"No one in this class has the ".concat(te.listName," list. Assign it above first."):0===Le.length?"All ".concat(Te.length," already marked ").concat(null===(h=T.find(function(e){return e.value===se}))||void 0===h?void 0:h.label,"."):"Applies to ".concat(Le.length," of ").concat(Se.length).concat(Te.length!==Le.length?" · ".concat(Te.length-Le.length," already marked"):"").concat(Ee?" · ".concat(Ee," don't have the ").concat(te.listName," list"):"","."):"Choose a skill to mark it for everyone in this class at once."})]}):(0,n.jsx)("p",{className:"skill-bulk__hint skill-bulk__section",children:"Assign a list first â then you can mark a skill for everyone at once."})]}):null,Se.length?Se.map(function(e,l){var t,s=Ce(e),a=function(e,l){return l.reduce(function(l,t){var n,i=null!==(n=null==t?void 0:t.trick_list)&&void 0!==n?n:[],s=i.map(function(l){return De(e,null==t?void 0:t.id,null==l?void 0:l.id)});return{total:l.total+i.length,achieved:l.achieved+s.filter(function(e){return"achieved"===e}).length,inProgress:l.inProgress+s.filter(function(e){return"in progress"===e}).length}},{achieved:0,inProgress:0,total:0})}(e,s),d=a.achieved,r=a.inProgress,c=a.total,u=function(e,l,t){return t>0&&e===t?{label:"Achieved",cls:"is-achieved",stripe:Y}:l>0||e>0?{label:"In Progress",cls:"is-inprogress",stripe:L}:{label:"Upcoming",cls:"is-upcoming",stripe:E}}(d,r,c),m=!!$[null==e?void 0:e.id];return(0,n.jsxs)("div",{className:"detail-card has-stripe",style:{"--stripe":u.stripe,padding:"16px 20px"},children:[(0,n.jsx)("div",{className:"d-flex align-items-center justify-content-between gap-3",role:"button",tabIndex:0,"aria-expanded":m,onClick:function(){return _e(null==e?void 0:e.id)},onKeyDown:function(l){"Enter"!==l.key&&" "!==l.key||(l.preventDefault(),_e(null==e?void 0:e.id))},style:{cursor:"pointer"},children:(0,n.jsxs)("div",{className:"d-flex align-items-center gap-3",style:{minWidth:0}
1,children:[(0,n.jsx)("span",{"aria-hidden":!0,className:"skill-caret ".concat(m?"is-open":""),children:"â¼"}),(0,n.jsxs)("div",{style:{minWidth:0},children:[(0,n.jsx)("div",{className:"fw-bold text-truncate",style:{fontSize:"1.05rem"},title:Pe(e),children:Pe(e)}),(0,n.jsx)("div",{className:"text-muted small mt-1",children:c>0?(0,n.jsxs)(i.Fragment,{children:[d," of ",c," skills · ",(0,n.jsx)("span",{className:"status-pill ".concat(u.cls),children:u.label})]}):"No skill lists assigned"})]})]})}),m&&(0,n.jsxs)("div",{className:"mt-3 pt-3",style:{borderTop:"1px solid rgba(0,0,0,0.08)"},children:[s.length?s.map(function(l,t){var i,s,a=null!==(i=null==l?void 0:l.trick_list)&&void 0!==i?i:[],d=a.filter(function(t){return"achieved"===De(e,null==l?void 0:l.id,null==t?void 0:t.id)}).length;return(0,n.jsxs)("div",{className:"skill-group",children:[(0,n.jsxs)("div",{className:"skill-group__head",children:[(0,n.jsx)("span",{className:"skill-group__name",title:null==l?void 0:l.name,children:null==l?void 0:l.name}),(0,n.jsxs)("span",{className:"skill-group__meta",children:[(0,n.jsxs)("span",{className:"skill-group__count",children:[d," of ",a.length]}),!0===(null==l?void 0:l.is_student_wise)?(0,n.jsx)("button",{type:"button",className:"btn btn-link p-0 text-danger skill-group__remove",title:"Remove skill list","aria-label":"Remove ".concat(null==l?void 0:l.name),onClick:function(){return function(e,l){y().fire({title:"Remove ".concat(null==l?void 0:l.name,"?"),text:"This removes the skill list from ".concat(Pe(e)," in every class, along with any progress already marked against it."),icon:"warning",showCancelButton:!0,confirmButtonColor:"rgb(26, 26, 58)",cancelButtonColor:"#d33",confirmButtonText:"Yes, remove"}).then(function(t){t.isConfirmed&&M((0,v.Hn)({user_id:null==e?void 0:e.uuid,uuid:null==e?void 0:e.uuid,trick_list_id:null==l?void 0:l.id}))})}(e,l)},children:(0,n.jsx)("i",{className:"icon-trash"})}):null]})]}),a.map(function(t,i){var s,a=De(e,null==l?void 0:l.id,null==t?void 0:t.id);return(0,n.jsxs)("div",{className:"skill-row",children:[(0,n.jsx)("span",{className:"skill-row__name",title:null==t?void 0:t.name,children:null==t?void 0:t.name}),(0,n.jsx)("div",{className:"skill-toggle",role:"group","aria-label":"Status for ".concat(null==t?void 0:t.name),children:T.map(function(i){var s=a===i.value;return(0,n.jsx)("button",{type:"button",className:"skill-toggle__seg ".concat(i.cls),"aria-pressed":s,onClick:function(){s||be(i.value,x,null==l?void 0:l.id,null==t?void 0:t.id,null==e?void 0:e.uuid,null==e?void 0:e.class_purchase_id)},children:i.label},i.value)})})]},null!==(s=null==t?void 0:t.id)&&void 0!==s?s:i)})]},null!==(s=null==l?void 0:l.id)&&void 0!==s?s:t)}):(0,n.jsxs)("p",{className:"text-muted small mb-3",children:["No skill lists assigned to this ",Z("student")," yet."]}),(0,n.jsx)("div",{className:"mt-3",style:{maxWidth:320},children:(0,n.jsx)(f.Ay,{menuPortalTarget:document.body,placeholder:"Assign skill list",isClearable:!0,onChange:function(l){var t,n,i,s;t=l,n=null==e?void 0:e.uuid,i=null==e?void 0:e.class_purchase_id,s={user_id:n,uuid:n,schedule_id:(0,o.kI)(x),trick_list_id:null==t?void 0:t.value,status:"upcoming",class_purchase_id:i},y().fire({title:"Are you sure?",icon:"warning",showCancelButton:!0,confirmButtonColor:"rgb(26, 26, 58)",cancelButtonColor:"#d33",confirmButtonText:"Yes, Confirm"}).then(function(e){return D(void 0,void 0,void 0,function(){return A(this,function(l){return e.isConfirmed&&M((0,v.k9)(s)),[2]})})})},classNamePrefix:"dropDown",isSearchable:!0,isMulti:!1,value:null,options:ye(e)})})]})]},null!==(t=null==e?void 0:e.id)&&void 0!==t?t:l)}):(0,n.jsx)("div",{className:"detail-card text-muted text-center",children:"No one is booked into this class yet."})]})})})})};var P=t("tYjL"),B=t("g+/w"),U=t("09SS"),F=t("653b"),H=t("i3Io"),G=t("ulkv"),W=t("gNpi"),z=t("y2R7"),O=t("qpAw"),R=t("sFi+"),K=t("f0Wu");if("undefined"!=typeof document){var Z="update-schedule-nav-styles";if(!document.getElementById(Z)){var V=document.createElement("style");V.id=Z,V.textContent="\n @media (max-width: 1599px) {\n .desktop-nav {\n display: none !important;\n }\n }\n @media (min-width: 1600px) {\n .intermediate-nav {\n display: none !important;\n }\n .desktop-nav {\n display: flex !important;\n }\n }\n ",document.head.appendChild(V)}}const q=function(){var e,l,t,f,g,b,j,w,S,C,D,A,I,T,E,L,Y,Z,V,q,Q,J,X,$,ee,le,te=(0,s.g)(),ne=te.id,ie=te.date,
1se=(te.deleteStatus,(0,s.Zp)()),ae=(0,m.wA)(),de=(0,s.zy)(),oe=de.search,re=de.state;(0,i.useEffect)(function(){ae({type:"TERM_UPDATE_FAIL",termData:null}),ae({type:"SCHEDULE_UPDATE_FAIL",schedule_update_data:null}),ae({type:"CAPACITY_CHECK_FAIL",data:null}),ae({type:"INSTRUCTOR_CHECK_FAIL",data:null})},[]),(0,i.useEffect)(function(){return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual"),window.scrollTo({top:0,left:0,behavior:"auto"}),function(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),y().close()}},[ae]);var ce=null===(t=null===(l=null===(e=null==oe?void 0:oe.split("?"))||void 0===e?void 0:e.pop())||void 0===l?void 0:l.split("="))||void 0===t?void 0:t.pop(),ue="".concat((0,o.kI)(ne),"/?date=").concat((0,o.LG)(ie)),me=(0,m.d4)(function(e){return e.GetStudioProfileState}).studio_profile_data,ve=(0,k.V2)((null===(f=null==me?void 0:me.data)||void 0===f?void 0:f.terminologies)||[]),he=(0,m.d4)(function(e){return e.ScheduleGetState}),pe=he.schedule_get_data,xe=he.loading,fe=(0,m.d4)(function(e){return e.PermissionGetState}),ge=(0,m.d4)(function(e){return e.ScheduleDeleteState}),be=(0,m.d4)(function(e){return e.ScheduleUnCancelState}),_e=(0,m.d4)(function(e){return e.ScheduleBulkDeleteState}),je=(0,m.d4)(function(e){return e.BulkDeleteDropScheduleState}),ye=(0,m.d4)(function(e){return e.ScheduleStudentListState}),ke=(0,m.d4)(function(e){return e.ScheduleListState}).schedule_list_data,Ne=(0,i.useState)([]),we=Ne[0],Se=Ne[1],Ce=(0,i.useRef)(null),De=(0,i.useState)([]),Ae=De[0],Ie=De[1],Te=(0,i.useState)([]),Ee=Te[0],Le=Te[1],Ye=(0,i.useState)(!1),Me=Ye[0],Pe=Ye[1],Be=(0,i.useState)(0),Ue=Be[0],Fe=Be[1],He=(0,i.useState)(0),Ge=He[0],We=He[1],ze=(0,i.useState)(""),Oe=ze[0],Re=ze[1],Ke=(0,i.useState)([]),Ze=Ke[0],Ve=Ke[1],qe=(0,i.useState)("Attendants"),Qe=qe[0],Je=qe[1],Xe="";if((0,W.Ml)({key:k.qD})){var $e=(0,W.Ml)({key:k.qD});void 0!==$e&&("Staff"==(null===(g=null==(Xe=$e)?void 0:Xe.data)||void 0===g?void 0:g.usertype)?Number(null===(b=null==Xe?void 0:Xe.data)||void 0===b?void 0:b.studio_id):Number(null===(j=null==Xe?void 0:Xe.data)||void 0===j?void 0:j.id))}(0,i.useEffect)(function(){var e=null==pe?void 0:pe.trick_lists;Ie(pe),Le(e);var l=(0,o.K5)((0,G.IP)((null==pe?void 0:pe.start_date)+" "+(null==pe?void 0:pe.start_time)),(0,G.IP)((null==pe?void 0:pe.end_date)+" "+(null==pe?void 0:pe.start_time)),[_()((0,G.IP)((null==pe?void 0:pe.start_date)+" "+(null==pe?void 0:pe.start_time))).format("dddd")],null==pe?void 0:pe.start_time);Fe(null==l?void 0:l.length);var t=l&&(null==l?void 0:l.findIndex(function(e){return _()(e).format("YYYY-MM-DD")==_()(ie).format("YYYY-MM-DD")}));We(t+1)},[pe,ie]),(0,i.useEffect)(function(){var e,l,t;if(null==fe?void 0:fe.status){var n=(null===(l=null===(e=null==fe?void 0:fe.permission_get_data)||void 0===e?void 0:e.permission)||void 0===l?void 0:l.length)?null===(t=null==fe?void 0:fe.permission_get_data)||void 0===t?void 0:t.permission:[];Ve(n)}},[fe]),(0,i.useEffect)(function(){var e,l,t,n,i;if(null==me?void 0:me.status){var s=null==me?void 0:me.data,a="";if(!(null==s?void 0:s.freetrial_status)||null!=(null==s?void 0:s.plan_id)||null!=(null===(e=null==s?void 0:s.subscription_plan)||void 0===e?void 0:e.name)&&""!=(null===(l=null==s?void 0:s.subscription_plan)||void 0===l?void 0:l.name)){var d=null===(n=null===(t=null==s?void 0:s.subscription_plan)||void 0===t?void 0:t.name)||void 0===n?void 0:n.toLowerCase();a=null==d?void 0:d.replace(/^./,null===(i=d[0])||void 0===i?void 0:i.toUpperCase())}else a="Premium";Re(a)}},[me]),(0,i.useEffect)(function(){ue&&ae((0,v.Qc)(ue))},[ue]);var el=Array.isArray(null==re?void 0:re.dayClasses)?re.dayClasses:[];(0,i.useEffect)(function(){var e;if(!(el.length>1)){var l=null==Ae?void 0:Ae.branch;if(l&&ie){var t=_()(ie).format("YYYY-MM-DD"),n="".concat(l,"_").concat(_()(ie).format("YYYY-MM"));if(Ce.current!==n)Ce.current=n,ae((0,v.Ms)({branch_id:l,current_month:t,current_view:"month"}));else{var i=null==ke?void 0:ke.data,s=!!(null==i?void 0:i.length)&&String(l)===String(null===(e=i[0])||void 0===e?void 0:e.branch);Se(s?(0,h.A)(i,t):[])}}}},[null==Ae?void 0:Ae.branch,ie,ke,ae,el.length]),(0,i.useEffect)(function(){((null==ge?void 0:ge.status)||(null==_e?void 0:_e.
1status))&&(se("schedule-detail"==ce?d.OZ+"/schedule-detail-list":d.OZ+"/schedule-list"),ae({type:N._cr,scheduleData:null}))},[ge,_e]),(0,i.useEffect)(function(){(null==be?void 0:be.status)&&(ue&&ae((0,v.Qc)(ue)),ae({type:N.rFZ,data:[]}))},[be]);var ll=function(){var e="Term"==(null==Ae?void 0:Ae.class_type)?"You won't be able to revert this!":"Any ".concat(ve("student"),"s already booked into this class will be refunded in the manner they paid. Eg. Card payment will receive back onto card, memberships and packages will receive back with original expiry.");y().fire({title:"Are you sure?",text:e,icon:"warning",showCancelButton:!0,confirmButtonColor:"rgb(26, 26, 58)",cancelButtonColor:"#d33",confirmButtonText:"Yes, Confirm"}).then(function(e){if(e.isConfirmed){var l={schedule_id:(0,o.kI)(ne)};ae((0,v.tk)(l))}})},tl=function(){ae({type:"SCHEDULE_UPDATE_FAIL",schedule_update_data:null}),ae({type:"SCHEDULE_ADD_FAIL",schedule_add_data:null}),ae({type:"SCHEDULE_GET_FAIL",scheduleData:null}),ae({type:"SCHEDULE_LESSON_PLAN_FAIL",schedule_lesson_data:null}),ae({type:"SCHEDULE_DELETE_FAIL",schedule_delete_data:null}),ae({type:"SCHEDULE_STUDENT_LIST_FAIL",schedule_student_list:[]}),ae({type:"SCHEDULE_STUDENT_LIST_FOR_MAIL_FAIL",data:[]}),ae({type:"BULK_SCHEDULE_DELETE_FAIL",schedule_bulk_delete_data:null}),ae({type:"SCHEDULE_LESSON_PLAN_UPDATE_FAIL",schedule_lesson_update_data:null}),ae({type:"GET_WAITING_STUDENT_LIST_FAIL",data:null}),ae({type:"SCHEDULE_STUDENT_EMAIL_FAIL",schedule_student_email_data:null})},nl=function(e){Ie([]),tl();var l=(0,o.GC)(null==Ae?void 0:Ae.start_date,(0,F.xO)(null==Ae?void 0:Ae.start_time),"date"),t=(0,o.GC)(null==Ae?void 0:Ae.end_date,(0,F.xO)(null==Ae?void 0:Ae.start_time),"date"),n="0"==(null==Ae?void 0:Ae.cancel_type);if("prev"==e){var i=_()(_()(ie).subtract(7,"days")).toDate();_()(i).format("YYYY-MM-DD")>=l&&se(d.OZ+"/schedule-list/details/".concat(ne,"/").concat(i,"/").concat(n,"/?isScheduleDelete=").concat(ce))}else{i=_()(ie).add(7,"days");_()(i).format("YYYY-MM-DD")<=t&&se(d.OZ+"/schedule-list/details/".concat(ne,"/").concat(i,"/").concat(n,"/?isScheduleDelete=").concat(ce))}},il=el.length>1?el:we,sl=il.findIndex(function(e){try{return String((0,o.kI)(null==e?void 0:e.id))===String((0,o.kI)(ne))&&_()(null==e?void 0:e.date).format("YYYY-MM-DD HH:mm")===_()(ie).format("YYYY-MM-DD HH:mm")}catch(e){return!1}}),al=sl>0?il[sl-1]:null,dl=sl>-1&&sl<il.length-1?il[sl+1]:null,ol=function(e){e&&(Ie([]),tl(),se(d.OZ+"/schedule-list/details/".concat(e.id,"/").concat(e.date,"/").concat(e.check),{state:{dayClasses:il}}))},rl=function(e){Je(e)};return(0,n.jsxs)(n.Fragment,{children:[(null==ge?void 0:ge.loading)||(null==je?void 0:je.loading)||xe||(null==_e?void 0:_e.loading)?(0,n.jsx)(P.A,{}):"",(0,n.jsxs)("div",{className:"main-right schedule-main-right w-100",children:[(0,n.jsx)(R.A,{title:"Session"}),(0,n.jsx)("div",{className:"right-side-main ScheduleDetails",children:(0,n.jsxs)("div",{className:"row gy-4 align-items-stretch",children:[(0,n.jsx)("div",{className:"col-12 col-md-6 col-lg-4 ".concat(Me?"d-none":""),children:xe?(0,n.jsx)(z.A,{}):(0,n.jsxs)("div",{className:"p-3 rounded-4 shadow-lg border-0 position-relative",style:{background:"linear-gradient(270deg, rgba(219, 109, 97, 0.1) 0%, rgba(176, 62, 199, 0.1) 49%, rgba(91, 28, 220, 0.1) 100%)",overflow:"visible",zIndex:1},children:[(0,n.jsxs)("div",{className:"p-2 border-bottom",style:{background:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.2) !important"},children:[(0,n.jsxs)("div",{className:"d-flex d-lg-none flex-column gap-2 align-items-stretch",children:[Ge>0&&(0,n.jsx)("div",{className:"w-100 d-flex justify-content-center",children:(0,n.jsxs)("span",{className:"badge d-flex align-items-center justify-content-center rounded-pill shadow-sm text-white px-3 py-2",style:{background:"linear-gradient(270deg, rgba(219, 109, 97, 0.8) 0%, rgba(176, 62, 199, 0.8) 49%, rgba(91, 28, 220, 0.8) 100%)",width:"100%",maxWidth:"200px",height:"36px",fontSize:"0.85rem"},children:[(0,n.jsx)("i",{className:"icon-calendar me-1"}),(0,n.jsxs)("span",{className:"text-nowrap",children:["Class ",Ge,"/",Ue]})]})}),(0,n.jsxs)("div",{className:"d-flex flex-column w-100 gap-2",children:[(0,H.cL)(ie,Ae)?(0,n.jsxs)("button",{title:"previous",className:"btn btn-light btn-sm d-flex align-items-center justify-content-center gap-1 rounded-pill shadow-sm w-100",style:{height:"36px",fontSize:"0.85rem"},onClick:function(){return nl("prev")},children:[(0,n.jsx)("i",{className:"icon-arrow-left-bold"}),(0,n.jsx)("span",{children:"Previous"})]}):(0,n.jsx)("div",{className:"w-100",style:{height:"36px"}}),(0,H.Sc)(ie,Ae)?(0,n.jsxs)("button",{title:"next",className:"btn btn-light btn-sm d-flex align-items-center justify-content-center gap-1 rounded-pill shadow-sm w-100",style:{height:"36px",fontSize:"0.85rem"},onClick:function(){return nl("next")},children:[(0,n.jsx)("span",{children:"Next"}),(0,n.jsx)("i",{className:"icon-arrow-right-bold"})]}):(0,n.jsx)("div",{className:"w-100",style:{height:"36px"}})]})]}),(0,n.jsxs)("div",{className:"d-none d-lg-flex w-100 justify-content-between align-items-center position-relative intermediate-nav",style:{minHeight:"40px"},children:[(0,n.jsx)("div",{style:{minWidth:"40px",flexShrink:0,flexBasis:"40px"},children:(0,H.cL)(ie,Ae)?(0,n.jsx)("button",{title:"previous",className:"btn btn-light btn-sm d-flex align-items-center justify-content-center rounded-pill shadow-sm",style:{width:"40px",height:"40px",padding:0},onClick:function(){return nl("prev")},children:(0,n.jsx)("i",{className:"icon-arrow-left-bold"})}):(0,n.jsx)("div",{style:{minWidth:"40px"}})}),Ge>0&&"Term"==(null==Ae?void 0:Ae.class_type)&&(0,n.jsx)("div",{className:"position-absolute start-50 translate-middle-x",style:{zIndex:1,pointerEvents:"none"},children:(0,n.jsxs)("span",{className:"badge d-flex align-items-center justify-content-center rounded-pill shadow-sm text-white px-2 py-2",style:{background:"linear-gradient(270deg, rgba(219, 109, 97, 0.8) 0%, rgba(176, 62, 199, 0.8) 49%, rgba(91, 28, 220, 0.8) 100%)",minWidth:"auto",height:"40px",fontSize:"0.85rem",whiteSpace:"nowrap",gap:"4px"},children:[(0,n.jsx)("i",{className:"icon-calendar"}),(0,n.jsxs)("span",{className:"text-nowrap",children:[Ge,"/",Ue]})]})}),(0,n.jsx)("div",{className:"d-flex justify-content-end",style:{minWidth:"40px",flexShrink:0,flexBasis:"40px"},children:(0,H.Sc)(ie,Ae)?(0,n.jsx)("button",{title:"next",className:"btn btn-light btn-sm d-flex align-items-center justify-content-center rounded-pill shadow-sm",style:{width:"40px",height:"40px",padding:0},onClick:function(){return nl("next")},children:(0,n.jsx)("i",{className:"icon-arrow-right-bold"})}):(0,n.jsx)("div",{style:{minWidth:"40px"}})})]}),(0,n.jsxs)("div",{className:"d-none desktop-nav w-100 justify-content-between align-items-center position-relative",style:{minHeight:"40px"},children:[(0,n.jsx)("div",{style:{minWidth:"110px",flexShrink:0,flexBasis:"110px"},children:(0,H.cL)(ie,Ae)?(0,n.jsxs)("button",{title:"previous",className:"btn btn-light btn-sm d-flex align-items-center gap-2 rounded-pill shadow-sm",style:{minWidth:"110px",height:"40px"},onClick:function(){return nl("prev")},children:[(0,n.jsx)("i",{className:"icon-arrow-left-bold"}),(0,n.jsx)("span",{children:"Previous"})]}):(0,n.jsx)("div",{style:{minWidth:"110px"}})}),Ge>0&&(0,n.jsx)("div",{className:"position-absolute start-50 translate-middle-x",style:{zIndex:1,pointerEvents:"none"},children:(0,n.jsxs)("span",{className:"badge d-flex align-items-center justify-content-center rounded-pill shadow-sm text-white px-3 py-2",style:{background:"linear-gradient(270deg, rgba(219, 109, 97, 0.8) 0%, rgba(176, 62, 199, 0.8) 49%, rgba(91, 28, 220, 0.8) 100%)",minWidth:"110px",maxWidth:"150px",height:"40px",fontSize:"0.85rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[(0,n.jsx)("i",{className:"icon-calendar me-1"}),(0,n.jsxs)("span",{className:"text-nowrap",children:["Class ",Ge,"/",Ue]})]})}),(0,n.jsx)("div",{className:"d-flex justify-content-end",style:{minWidth:"110px",flexShrink:0,flexBasis:"110px"},children:(0,H.Sc)(ie,Ae)?(0,n.jsxs)("button",{title:"next",className:"btn btn-light btn-sm d-flex align-items-center gap-2 rounded-pill shadow-sm",style:{minWidth:"110px",height:"40px"},onClick:function(){return nl("next")},children:[(0,n.jsx)("span",{children:"Next"}),(0,n.jsx)("i",{className:"icon-arrow-right-bold"})]}):(0,n.jsx)("div",{style:{minWidth:"110px"}})})]})]}),sl>-1&&il.length>1&&(0,n.jsxs)("div",{className:"p-2 border-bottom d-flex align-items-center justify-content-between gap-2",style:{background:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.2) !important"},children:[(0,n.jsxs)("button",{title:"Previous class on this day",className:"btn btn-light btn-sm d-flex align-items-center gap-1 rounded-pill shadow-sm",style:{height:"36px",fontSize:"0.85rem"},disabled:!al,onClick:function(){return ol(al)},children:[(0,n.jsx)("i",{className:"icon-arrow-left-bold"}),(0,n.jsx)("span",{className:"d-none d-sm-inline",children:"Prev class"})]}),(0,n.jsxs)("span",{className:"text-muted small text-truncate text-center",style:{maxWidth:"50%"},children:[(0,n.jsx)("i",{className:"icon-calendar me-1"}),"Class ",sl+1," of ",il.length," today"]}),(0,n.jsxs)("button",{title:"Next class on this day",className:"btn btn-light btn-sm d-flex align-items-center gap-1 rounded-pill shadow-sm",style:{height:"36px",fontSize:"0.85rem"},disabled:!dl,onClick:function(){return ol(dl)},children:[(0,n.jsx)("span",{className:"d-none d-sm-inline",children:"Next class"}),(0,n.jsx)("i",{className:"icon-arrow-right-bold"})]})]}),(0,n.jsxs)("div",{className:"p-2 p-md-3 p-lg-4 bg-light",children:[(0,n.jsxs)("div",{className:"mb-3 mb-md-4",children:[(0,n.jsxs)("h4",{className:"mb-2 fw-bold text-dark fs-5 fs-md-4 text-break",children:[(0,n.jsx)("i",{className:"icon-calendar me-2"}),(null===(w=null==Ae?void 0:Ae.class_name)||void 0===w?void 0:w.name)||"Loading..."]}),(0,n.jsxs)("p",{className:"text-muted mb-2 small text-break",children:[(0,n.jsx)("i",{className:"icon-clock me-1"}),(0,n.jsx)("span",{className:"d-block d-sm-inline",children:(null==Ae?void 0:Ae.start_date)?(0,o.BG)(ie,!0):""}),(null==Ae?void 0:Ae.start_date)&&((null===(S=null==Ae?void 0:Ae.sc_dt_update)||void 0===S?void 0:S.length)?(0,o.Wk)((null===(C=null==Ae?void 0:Ae.sc_dt_update[0])||void 0===C?void 0:C.local_start_time)||(0,o.GC)(null===(D=null==Ae?void 0:Ae.sc_dt_update[0])||void 0===D?void 0:D.start_date,null===(A=null==Ae?void 0:Ae.sc_dt_update[0])||void 0===A?void 0:A.start_time,"time")):(null==Ae?void 0:Ae.local_start_time)?(0,o.Wk)(null==Ae?void 0:Ae.local_start_time):(null==Ae?void 0:Ae.start_time)?(0,o.Wk)((0,o.GC)(null==Ae?void 0:Ae.start_date,null==Ae?void 0:Ae.start_time,"time")):"")&&(0,n.jsx)("span",{className:"d-none d-sm-inline",children:" ⢠"}),(0,n.jsx)("span",{className:"d-block d-sm-inline",children:(null===(I=null==Ae?void 0:Ae.sc_dt_update)||void 0===I?void 0:I.length)?(0,o.Wk)((null===(T=null==Ae?void 0:Ae.sc_dt_update[0])||void 0===T?void 0:T.local_start_time)||(0,o.GC)(null===(E=null==Ae?void 0:Ae.sc_dt_update[0])||void 0===E?void 0:E.start_date,null===(L=null==Ae?void 0:Ae.sc_dt_update[0])||void 0===L?void 0:L.start_time,"time")):(null==Ae?void 0:Ae.local_start_time)?(0,o.Wk)(null==Ae?void 0:Ae.local_start_time):(null==Ae?void 0:Ae.start_time)?(0,o.Wk)((0,o.GC)(null==Ae?void 0:Ae.start_date,null==Ae?void 0:Ae.start_time,"time")):""})]}
1),"1"==(null==Ae?void 0:Ae.is_auto_cancel)||"2"==(null==Ae?void 0:Ae.cancel_type)?(0,n.jsxs)("div",{className:"alert alert-danger mb-3 rounded-3 border-0",children:[(0,n.jsx)("i",{className:"icon-warning me-2"}),"Class auto cancelled as minimum number of ",ve("student"),"s not registered."]}):""]}),(0,n.jsx)("div",{className:"d-flex justify-content-between flex-lg-row flex-wrap gap-2 mb-3 mb-md-4",children:"Staff"==(null===(Y=null==Xe?void 0:Xe.data)||void 0===Y?void 0:Y.usertype)?(0,B.Bk)("schedule-edit",Oe,Ze)&&(0,n.jsxs)(n.Fragment,{children:["0"==(null==Ae?void 0:Ae.cancel_type)||"3"==(null==Ae?void 0:Ae.cancel_type)?"":(0,n.jsxs)(a.N_,{className:"btn btn-light btn-sm align-items-center justify-content-center gap-1 gap-md-2 rounded-pill shadow-sm w-100 flex-lg-grow-0",to:d.OZ+"/schedule-list/update/".concat(ne,"/").concat(ie),children:[(0,n.jsx)("i",{className:"icon-edit"}),(0,n.jsx)("span",{className:"text-nowrap",children:"Edit Schedule"})]}),(0,H.Kb)(Ae,ie)?"":(0,n.jsxs)("button",{className:"btn btn-danger btn-sm align-items-center justify-content-center gap-1 gap-md-2 rounded-pill shadow-sm w-100 flex-lg-grow-0","data-bs-toggle":"modal","data-bs-target":"#deleteClass",children:[(0,n.jsx)("i",{className:"icon-trash"}),(0,n.jsx)("span",{className:"text-nowrap",children:"Cancel/Delete class"})]}),"Drop"==(null==Ae?void 0:Ae.class_type)||(0,H.Kb)(Ae,ie)||(0,H.Hp)(Ae)||(null==Ae?void 0:Ae.has_active_booking)?"":(0,n.jsxs)("button",{className:"btn btn-danger btn-sm align-items-center justify-content-center gap-1 gap-md-2 rounded-pill shadow-sm w-100 flex-lg-grow-0",onClick:function(){ll()},children:[(0,n.jsx)("i",{className:"icon-trash"}),(0,n.jsx)("span",{className:"text-nowrap",children:"Delete complete schedule"})]})]}):(0,n.jsxs)(n.Fragment,{children:["0"==(null==Ae?void 0:Ae.cancel_type)||"3"==(null==Ae?void 0:Ae.cancel_type)?"":(0,n.jsxs)(a.N_,{className:"btn btn-light btn-sm align-items-center justify-content-center gap-1 gap-md-2 rounded-pill shadow-sm w-100 flex-lg-grow-0",to:d.OZ+"/schedule-list/update/".concat(ne,"/").concat(ie),children:[(0,n.jsx)("i",{className:"icon-edit"}),(0,n.jsx)("span",{className:"text-nowrap",children:"Edit Schedule"})]}),(0,H.Kb)(Ae,ie)?"":(0,n.jsxs)("button",{className:"btn btn-danger btn-sm align-items-center justify-content-center gap-1 gap-md-2 rounded-pill shadow-sm w-100 flex-lg-grow-0","data-bs-toggle":"modal","data-bs-target":"#deleteClass",children:[(0,n.jsx)("i",{className:"icon-trash"}),(0,n.jsx)("span",{className:"text-nowrap",children:"Cancel/Delete class/es"})]}),"Drop"==(null==Ae?void 0:Ae.class_type)||(0,H.Kb)(Ae,ie)||(0,H.Hp)(Ae)||(null==Ae?void 0:Ae.has_active_booking)?"":(0,n.jsxs)("button",{className:"btn btn-danger btn-sm align-items-center justify-content-center gap-1 gap-md-2 rounded-pill shadow-sm w-100 flex-lg-grow-0",onClick:function(){ll()},children:[(0,n.jsx)("i",{className:"icon-trash"}),(0,n.jsx)("span",{className:"text-nowrap",children:"Delete complete schedule"})]})]})}),(0,n.jsxs)("div",{className:"details",children:[(0,n.jsxs)("h6",{className:"fw-bold text-dark mb-3 fs-6 fs-md-5",children:[(0,n.jsx)("i",{className:"icon-info-circle me-2"}),"Class Information"]}),(0,n.jsxs)("div",{className:"row g-2 g-md-3",children:["Term"==(null==Ae?void 0:Ae.class_type)?(0,n.jsxs)(i.Fragment,{children:[(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex p-2 justify-content-between rounded-3 bg-light gap-2",children:[(0,n.jsxs)("div",{className:"align-items-center",children:[(0,n.jsx)("i",{className:"icon-calendar text-dark me-2"}),(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Term"})]}),(0,n.jsxs)("div",{className:"align-items-center flex-wrap gap-1",children:[(0,n.jsx)("span",{className:"text-muted text-break",children:null===(Z=null==Ae?void 0:Ae.terms)||void 0===Z?void 0:Z.label}),(0,n.jsx)("i",{style:{color:"#610091"},onClick:function(){var e,l;return se(d.OZ+"/term-list/update/".concat((0,o.AU)(null===(e=null==Ae?void 0:Ae.terms)||void 0===e?void 0:e.id)),{state:{day:null===(l=null==pe?void 0:pe.day)||void 0===l?void 0:l[0],id:(0,o.kI)(ne),date:ie,is_schedule_purchased:null==Ae?void 0:Ae.is_schedule_purchase}})},className:"icon-edit ms-2 cursor-pointer"})]})]})}),(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex p-2 justify-content-between rounded-3 bg-light gap-2",children:[(0,n.jsxs)("div",{className:"align-items-center",children:[(0,n.jsx)("i",{className:"icon-calendar text-dark me-2"}),(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Date Range"})]}),(0,n.jsxs)("div",{className:"align-items-center flex-wrap gap-1",children:[(0,n.jsx)("span",{className:"badge bg-dark text-light",children:null===(V=null==Ae?void 0:Ae.terms)||void 0===V?void 0:V.start_date}),(0,n.jsx)("span",{className:"text-muted",children:" to "}),(0,n.jsx)("span",{className:"badge bg-dark text-light",children:null===(q=null==Ae?void 0:Ae.terms)||void 0===q?void 0:q.end_date})]})]})}),(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex p-2 justify-content-between rounded-3 bg-light gap-2",children:[(0,n.jsx)("div",{className:"align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Publish Date"})}),(0,n.jsx)("span",{className:"badge bg-dark text-light",children:null===(Q=null==Ae?void 0:Ae.terms)||void 0===Q?void 0:Q.publish_date})]})})]}):"",(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex flex-column flex-lg-row align-items-start align-items-lg-center justify-content-lg-between p-2 rounded-3 bg-light gap-2",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Capacity"})}),(0,n.jsx)("div",{className:"text-muted d-flex flex-column align-items-lg-end",children:function(){var e,l=null==ye?void 0:ye.schedule_student_list,t=Array.isArray(null==l?void 0:l.capacity_splits)?l.capacity_splits:[];if((null==Ae?void 0:Ae.capacity_split_enabled)&&t.length){var i=Array.isArray(null===(e=null==l?void 0:l.data)||void 0===e?void 0:e.results)?l.data.results:[],s=Array.isArray(null==l?void 0:l.pending_guest_invites)?l.pending_guest_invites:[];return t.map(function(e,l){var t=i.filter(function(l){var t;return!(0,u.X)(l)&&(null===(t=null==l?void 0:l.capacity_split)||void 0===t?void 0:t.uuid)===e.uuid}).length,a=s.filter(function(l){var t;return(null===(t=null==l?void 0:l.slot)||void 0===t?void 0:t.uuid)===e.uuid}).length;return(0,n.jsx)("span",{className:"text-nowrap",children:"".concat(e.name,": ").concat(t+a,"/").concat(e.slot_capacity)},e.uuid||l)})}return(0,n.jsx)("span",{className:"text-nowrap",children:(0,r.V3)(Ae)||((null==Ae?void 0:Ae.max_students)?"".concat(null==Ae?void 0:Ae.class_join_count," / ").concat(null==Ae?void 0:Ae.max_students):"")})}()})]})}),(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex flex-column flex-lg-row align-items-start align-items-lg-center justify-content-lg-between p-2 rounded-3 bg-light gap-2",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Duration"})}),(0,n.jsx)("span",{className:"text-muted text-nowrap",children:(null===(J=null==Ae?void 0:Ae.class_name)||void 0===J?void 0:J.duration_minutes)?(null===(X=null==Ae?void 0:Ae.class_name)||void 0===X?void 0:X.duration_minutes)+" min":"N/A"})]})}),(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex flex-column flex-lg-row align-items-start align-items-lg-center justify-content-lg-between p-2 rounded-3 bg-light gap-2",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Room"})}),(0,n.jsx)("span",{className:"text-muted text-break text-lg-end",children:(null===($=null==Ae?void 0:Ae.room)||void 0===$?void 0:$.label)||"-"})]})}),(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex flex-column flex-lg-row align-items-start align-items-lg-center justify-content-lg-between p-2 rounded-3 bg-light gap-2",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Instructor"})}),(0,n.jsx)("div",{className:"d-flex align-items-center flex-wrap gap-1 justify-content-lg-end",children:(null===(ee=null==Ae?void 0:Ae.instructors)||void 0===ee?void 0:ee.length)?null==Ae?void 0:Ae.instructors.map(function(e,l){return(0,n.jsx)("span",{className:"badge bg-dark",children:null==e?void 0:e.label},l)}):(0,n.jsx)("span",{className:"text-muted",children:"-"})})]})}),(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex flex-column flex-lg-row align-items-start align-items-lg-center justify-content-lg-between p-2 rounded-3 bg-light gap-2",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Location"})}),(0,n.jsx)("span",{className:"badge bg-dark text-break",children:(null==Ae?void 0:Ae.branch_name)?null==Ae?void 0:Ae.branch_name:"-"})]})})]})]})]})]})}),(0,n.jsx)("div",{className:"col-12 ".concat(Me?"col-lg-12":"col-md-6 col-lg-8"),children:(0,c.xK)(null==Ae?void 0:Ae.cancel_type)&&!ce?(0,n.jsxs)("div",{className:"main-right inner-main-right w-100 h-100 d-flex flex-column justify-content-center align-items-center gap-3",children:[(0,n.jsx)("h3",{className:"m-0 text-center",children:"Class Cancelled"}),("Staff"!=(null===(le=null==Xe?void 0:Xe.data)||void 0===le?void 0:le.usertype)||(0,B.Bk)("schedule-edit",Oe,Ze))&&(0,n.jsxs)("button",{className:"btn btn-success btn-sm align-items-center justify-content-center gap-1 gap-md-2 rounded-pill shadow-sm",onClick:function(){var e;e="2"==(null==Ae?void 0:Ae.cancel_type)||"1"==(null==Ae?void 0:Ae.is_auto_cancel)||!0===(null==Ae?void 0:Ae.is_auto_cancel),y().fire({title:"Un-cancel this class?",text:e?"This class was auto-cancelled because too few ".concat(ve("student"),"s enrolled. Anyone refunded at cancel will need to be re-added manually."):"Any drop-in ".concat(ve("student"),"s who were refunded when this class was cancelled will need to be re-added manually."),icon:"warning",showCancelButton:!0,confirmButtonColor:"rgb(2
16, 26, 58)",cancelButtonColor:"#d33",confirmButtonText:"Yes, un-cancel"}).then(function(e){var l,t;if(e.isConfirmed){var n={schedule_id:(0,o.kI)(ne),local_date:K(ie).tz(null===(l=null==me?void 0:me.data)||void 0===l?void 0:l.studio_timezone).format("YYYY-MM-DD"),utc_date:K(ie).tz(null===(t=null==me?void 0:me.data)||void 0===t?void 0:t.studio_timezone).utc().format("YYYY-MM-DD")};ae((0,v.hN)(n))}})},children:[(0,n.jsx)("i",{className:"icon-refresh"}),(0,n.jsx)("span",{className:"text-nowrap",children:"Un-cancel this class"})]})]}):(0,n.jsxs)("div",{className:"main-right inner-main-right w-100 h-100",children:[(0,n.jsxs)("div",{className:"d-flex align-items-center border-bottom pb-2 mb-3",children:[ce?"":(0,n.jsx)(a.N_,{className:"btn btn-outline-secondary p-2 ms-2 ms-md-3 d-none d-lg-flex align-items-center justify-content-center",to:"#",onClick:function(){return Pe(!Me)},children:Me?(0,n.jsx)("span",{className:"icon-arrow-right-bold"}):(0,n.jsx)("span",{className:"icon-arrow-left-bold"})}),(0,n.jsxs)("div",{className:"nav nav-tabs border-0 w-100 flex-wrap gap-2",id:"myTab",role:"tablist",style:{background:"linear-gradient(270deg, rgba(219, 109, 97, 0.1) 0%, rgba(176, 62, 199, 0.1) 49%, rgba(91, 28, 220, 0.1) 100%)",borderRadius:"15px",padding:"8px"},children:[(0,n.jsx)("div",{className:"nav-item",role:"presentation",children:(0,n.jsx)("button",{className:"nav-link d-flex align-items-center gap-2 rounded-pill me-2 mb-2 mb-md-0 ".concat("Attendants"===Qe?"active bg-white shadow-sm":"bg-white bg-opacity-60"),id:"attendants-tab","data-bs-toggle":"tab","data-bs-target":"#attendants-tab-pane",type:"button",role:"tab","aria-controls":"attendants-tab-pane","aria-selected":"Attendants"===Qe,onClick:function(){rl("Attendants")},style:{color:"Attendants"===Qe?"#333":"#666",padding:"8px 14px",border:"none"},children:(0,n.jsx)("span",{className:"text-nowrap",children:"Attendants"})})}),"0"!==(null==Ae?void 0:Ae.cancel_type)?(0,n.jsxs)(i.Fragment,{children:[(0,n.jsx)("div",{className:"nav-item",role:"presentation",children:(0,n.jsx)("button",{className:"nav-link d-flex align-items-center gap-2 rounded-pill me-2 mb-2 mb-md-0 ".concat("Lesson plan"===Qe?"active bg-white shadow-sm":"bg-white bg-opacity-60"),id:"lesson-tab","data-bs-toggle":"tab","data-bs-target":"#lesson-tab-pane",type:"button",role:"tab","aria-controls":"lesson-tab-pane","aria-selected":"Lesson plan"===Qe,onClick:function(){rl("Lesson plan")},style:{color:"Lesson plan"===Qe?"#333":"#666",padding:"8px 14px",border:"none"},children:(0,n.jsx)("span",{className:"text-nowrap",children:"Lesson plan"})})}),(0,n.jsx)("div",{className:"nav-item",role:"presentation",children:(0,n.jsx)("button",{className:"nav-link d-flex align-items-center gap-2 rounded-pill me-2 mb-2 mb-md-0 ".concat("Skills"===Qe?"active bg-white shadow-sm":"bg-white bg-opacity-60"),id:"notes-tab","data-bs-toggle":"tab","data-bs-target":"#notes-tab-pane",type:"button",role:"tab","aria-controls":"notes-tab-pane","aria-selected":"Skills"===Qe,onClick:function(){rl("Skills")},style:{color:"Skills"===Qe?"#333":"#666",padding:"8px 14px",border:"none"},children:(0,n.jsx)("span",{className:"text-nowrap",children:"Skills"})})}),(0,n.jsx)("div",{className:"nav-item",role:"presentation",children:(0,n.jsx)("button",{className:"nav-link d-flex align-items-center gap-2 rounded-pill me-2 mb-2 mb-md-0 ".concat("Homework"===Qe?"active bg-white shadow-sm":"bg-white bg-opacity-60"),id:"suppliers-tab","data-bs-toggle":"".concat("Premium"===Oe?"tab":"modal"),"data-bs-target":"".concat("Premium"===Oe?"#suppliers-tab-pane":"#planModal"),type:"button",role:"tab","aria-controls":"suppliers-tab-pane","aria-selected":"Homework"===Qe,onClick:function(){rl("Homework")},style:{color:"Homework"===Qe?"#333":"#666",padding:"8px 14px",border:"none"},children:(0,n.jsx)("span",{className:"text-nowrap",children:"Homework"})})})]}):""]})]}),(0,n.jsx)("div",{className:"right-side-main",children:(0,n.jsxs)("div",{className:"tab-content",id:"myTabContent",children:[(0,n.jsx)("div",{className:"tab-pane fade show active",id:"attendants-tab-pane",role:"tabpanel","aria-labelledby":"attendants-tab",tabIndex:0,children:(0,n.jsx)(u.A,{tabType:Qe,classType:null==Ae?void 0:Ae.class_type,isDeleted:null==Ae?void 0:Ae.cancel_type})}),(0,n.jsx)("div",{className:"tab-pane fade",id:"lesson-tab-pane",role:"tabpanel","aria-labelledby":"lesson-tab",tabIndex:0,children:(0,n.jsx)(p.A,{tabType:Qe,data:null==Ae?void 0:Ae.lesson_plan,start_date:null==Ae?void 0:Ae.start_date,local_start_date:null==Ae?void 0:Ae.local_start_date,isDeleted:null==Ae?void 0:Ae.cancel_type})}),(0,n.jsx)("div",{className:"tab-pane fade",id:"notes-tab-pane",role:"tabpanel","aria-labelledby":"notes-tab",tabIndex:0,children:"Premium"==Oe?(0,n.jsx)(M,{tabType:Qe,trickList:Ee,students:null==Ae?void 0:Ae.students,isDeleted:null==Ae?void 0:Ae.cancel_type}):""}),(0,n.jsx)("div",{className:"tab-pane fade",id:"suppliers-tab-pane",role:"tabpanel","aria-labelledby":"suppliers-tab",tabIndex:0,children:(0,n.jsx)("div",{className:"table-responsive same-table",children:"Premium"==Oe?(0,n.jsx)(x.A,{tabType:Qe,start_date:null==Ae?void 0:Ae.start_date,local_start_date:null==Ae?void 0:Ae.local_start_date,isDeleted:null==Ae?void 0:Ae.cancel_type}):""})}),(0,n.jsx)("div",{className:"tab-pane fade show",id:"partial-tab-pane",role:"tabpanel","aria-labelledby":"partial-tab",tabIndex:0,children:(0,n.jsx)("div",{className:"table-responsive same-table",children:(0,n.jsx)(U.A,{partialList:null==Ae?void 0:Ae.partial_payment_students,isDeleted:null==Ae?void 0:Ae.cancel_type})})})]})})]})})]})}),(0,n.jsx)(O.A,{modalId:"deleteClass",scheduleData:Ae,handleDelete:function(){var e="Term"==(null==Ae?void 0:Ae.class_type)?"If this is a course class ".concat(ve("student"),"s will not be refunded for this class, unless they booked as a drop in space for this specific class."):"Any ".concat(ve("student"),"s already booked into this class will be refunded in the manner they paid. Eg. Card payment will receive back onto card, memberships and packages will receive back with original expiry.");y().fire({title:"Are you sure?",text:e,icon:"warning",showCancelButton:!0,confirmButtonColor:"rgb(2
16, 26, 58)",cancelButtonColor:"#d33",confirmButtonText:"Yes, Confirm"}).then(function(e){var l,t,n;if(e.isConfirmed){var i={schedule_id:(0,o.kI)(ne),local_date:K(ie).tz(null===(l=null==me?void 0:me.data)||void 0===l?void 0:l.studio_timezone).format("YYYY-MM-DD"),utc_date:K(ie).tz(null===(t=null==me?void 0:me.data)||void 0===t?void 0:t.studio_timezone).utc().format("YYYY-MM-DD"),utc_date_time:K(ie).tz(null===(n=null==me?void 0:me.data)||void 0===n?void 0:n.studio_timezone).utc().format("YYYY-MM-DD HH:mm:ss")};ae((0,v.Pv)(i))}})}})]})]})}},w4nD(e,l,t){t.d(l,{H5:()=>o,_6:()=>d,lj:()=>a});var n=function(){return n=Object.assign||function(e){for(var l,t=1,n=arguments.length;t<n;t++)for(var i in l=arguments[t])Object.prototype.hasOwnProperty.call(l,i)&&(e[i]=l[i]);return e},n.apply(this,arguments)},i=0;function s(){return"li_".concat(Date.now(),"_").concat(++i)}function a(){return{_key:s(),uuid:null,name:"",cost:"",symbol:"",is_mandatory:!1}}function d(e){var l,t,n;return{_key:s(),uuid:null!==(l=e.uuid)&&void 0!==l?l:null,name:null!==(t=e.name)&&void 0!==t?t:"",cost:null!=e.cost?String(e.cost):"",symbol:null!==(n=e.symbol)&&void 0!==n?n:"",is_mandatory:!!e.is_mandatory,sort_order:e.sort_order}}function o(e){return e.filter(function(e){return(e.name||"").trim()&&(e.symbol||"").trim()}).map(function(e,l){var t={};return e.uuid&&(t.uuid=e.uuid),n(n({},t),{name:e.name.trim(),cost:parseFloat(e.cost||"0").toFixed(2),symbol:e.symbol.trim(),is_mandatory:!!e.is_mandatory,sort_order:l})})}}}]);
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.