(self.webpackChunkroot=self.webpackChunkroot||[]).push([[346],{0:(e,t,n)=>{"use strict";e.exports=n.p+"img/asoLogo-eb0c34a967f39c0e7e3a.jpg"},384:(e,t,n)=>{"use strict";e.exports=n.p+"img/avatarGroup-faca1e69e2c224b7eebe.png"},409:(e,t,n)=>{"use strict";var i=n(4848);function o(...e){console.log(...e)}n(8630);var a,s,r=n(6540),d=n(3345),l=n(2347);(s=a||(a={})).Development="development",s.Production="production",s.Test="test";const c=(e,t=null,n={})=>(Object.entries(e).forEach(([e,i])=>{const o=t?`${t}.${e}`:e;"object"!=typeof i||null===i||Array.isArray(i)?n[o]=i:c(i,o,n)}),n);function u(e){return function(e){if(Array.isArray(e))return!0;if("object"!=typeof e||null===e)return!1;{const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}}(e)&&!Object.isFrozen(e)&&(Object.freeze(e),Object.values(e).forEach(u)),e}const m=u([]);function g(e){return null==e?[]:Array.isArray(e)?e:[e]}function h(e){return Array.isArray(e)&&e.length>0}function p(e){return!h(e)}function f(e,t,n){const i=new Set(e);return n?i.add(t):i.delete(t),Array.from(i)}function I(e,t){return e.filter((e,n)=>n!==t)}function _(e){return(0,l.A)(e.normalize("NFD").replace(/\p{Diacritic}/gu,""))}function y(e){return(0,l.A)((e||"").trim().toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu,""))}var x;function S(e,t={}){const n=t.replacer??x.Dash,i=_(e).trim().toLowerCase().replace(/['"]+/gi,"");let o;return o=n===x.Dash?i.replace(/[^a-z0-9\\-]+/gu,"-").replace(/-+$/,"").replace(/^-+/,""):n===x.Underscore?i.replace(/[^a-z0-9_]+/gu,"_").replace(/_+$/,"").replace(/^_+/,""):i.replace(/[^a-z0-9]+/gu,"").trim(),t?.replaceStartingNumber?o.replace(/^(\d)/,"_$1"):o}function v(e){return Array.isArray(e)&&"production"!==a.Production&&console.warn("Array passed to `isNonEmptyString()`, did you mean to use `isNonEmptyArray()` instead?"),"string"==typeof e&&e.trim().length>0}function b(e){return!v(e)}!function(e){e[e.Dash=0]="Dash",e[e.Empty=1]="Empty",e[e.Underscore=2]="Underscore"}(x||(x={}));const j=["hm","hrh","him","hih","hh","hsh","hgdh","kg","lg","kt","lt","sm","sar","sai","sas","sagd"],A=e=>v(e)?e[0].toUpperCase()+e.slice(1):"";function C(e){return(e??"").trim().toLowerCase().replace(/\s+/g," ").split(" ").map(e=>j.includes(e.toLowerCase())?e.toUpperCase():A(e.trim())).join(" ").split("-").map(e=>j.includes(e.toLowerCase())?e.toUpperCase():A(e.trim())).join("-")}function E(e,t){const n=(e,t,n,i,o)=>en?n+1:e+1:i===o?t:t+1;if(e===t)return 0;if(e.length>t.length){const n=e;e=t,t=n}let i=e.length,o=t.length;for(;i>0&&e.charCodeAt(i-1)===t.charCodeAt(o-1);)i--,o--;let a=0;for(;a{let t="$gray200",n="$2",i="$xs";if(v(e)){const o=function(e){if(e){const[t,n,i]=e.split(" ");return{borderColor:t,borderRadius:n,boxShadow:i}}return{}}(e);o.borderColor&&(t=`$${o.borderColor}`),o.borderRadius&&(n=`$${o.borderRadius}`),i=o.boxShadow?`$${o.boxShadow}`:void 0}return{borderColor:t,borderRadius:n,borderStyle:"solid",borderWidth:"1px",boxShadow:i}},clamp:e=>({display:"-webkit-box",overflow:"hidden","-webkit-line-clamp":e.toString(10),"-webkit-box-orient":"vertical"}),ellipsis:()=>({overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}),px:e=>({paddingLeft:e,paddingRight:e}),py:e=>({paddingBottom:e,paddingTop:e})}});$("weezcrew-theme",{});var z,L=n(8542);function F(e){return"string"==typeof e?e:"number"==typeof e?e<=1?100*e+"%":`${e}px`:void 0}function U(e){return(0,L.A)(e,["direction","align","justify","wrap","gap","css","height","width"])}!function(e){e.Nav="nav",e.Header="header",e.Footer="footer",e.Main="main",e.Section="section"}(z||(z={}));const B=R("div",{display:"flex",variants:{direction:{row:{flexDirection:"row"},column:{flexDirection:"column"},rowReverse:{flexDirection:"row-reverse"},columnReverse:{flexDirection:"column-reverse"}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"},stretch:{alignItems:"stretch"},baseline:{alignItems:"baseline"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},between:{justifyContent:"space-between"},evenly:{justifyContent:"space-evenly"}},wrap:{noWrap:{flexWrap:"nowrap"},wrap:{flexWrap:"wrap"},wrapReverse:{flexWrap:"wrap-reverse"}},gap:{1:{gap:"$1"},2:{gap:"$2"},3:{gap:"$3"},4:{gap:"$4"},5:{gap:"$5"},6:{gap:"$6"},7:{gap:"$7"},8:{gap:"$8"},9:{gap:"$9"},10:{gap:"$10"},11:{gap:"$11"},12:{gap:"$12"},13:{gap:"$13"}}},defaultVariants:{direction:"row",align:"stretch",justify:"start",wrap:"noWrap"}}),G=r.forwardRef(({onClick:e,...t},n)=>{const o={};return t.height&&(o.height=F(t.height)),t.width&&(o.width=F(t.width)),(0,i.jsx)(B,{...t,ref:n,css:{...o,...t.css},onClick:e})});G.displayName="Flex";const V=R("p",{fontStyle:"normal",padding:"unset",margin:"unset",lineHeight:"1.42857143","& > *:not(ul)":{display:"inline"},variants:{textStyle:{inherit:{color:"inherit",fontSize:"inherit",fontWeight:"inherit",lineHeight:"inherit"},heading:{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium",lineHeight:"1.55556"},smallcapsheading:{color:"$gray500",fontSize:"10px",lineHeigh:"24px",textTransform:"uppercase"},subheading:{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium",lineHeight:"1.5"},subtitle:{color:"$gray500",fontSize:"$textSm",fontWeight:"$regular",lineHeight:"1.42857"},bodyText:{color:"$gray800",fontSize:"$textSm"},abbreviation:{color:"$gray500",fontVariant:"small-caps",fontSize:"$textSm"}}},defaultVariants:{textStyle:"bodyText"}}),W=r.forwardRef(({children:e,...t},n)=>(0,i.jsx)(V,{ref:n,...t,children:e}));W.displayName="Text";var q,Y,H,Z,K,Q,X,J,ee,te,ne,ie,oe,ae,se,re,de,le,ce,ue,me,ge,he,pe,fe,Ie,_e,ye,xe,Se,ve,be,je,Ae,Ce,Ee,Te,Oe,Re,Me,De,we,$e,Pe,Ne,ke,ze,Le,Fe,Ue,Be,Ge,Ve,We,qe,Ye,He,Ze,Ke,Qe,Xe,Je,et,tt,nt,it,ot,at,st,rt,dt,lt,ct,ut,mt,gt,ht,pt,ft,It,_t,yt,xt,St,vt,bt,jt,At,Ct,Et,Tt,Ot,Rt,Mt,Dt,wt,$t,Pt,Nt,kt,zt,Lt,Ft,Ut,Bt,Gt,Vt,Wt,qt,Yt,Ht,Zt,Kt,Qt,Xt,Jt,en,tn,nn,on,an,sn,rn,dn,ln,cn,un,mn,gn,hn,pn,fn,In,_n,yn,xn,Sn,vn,bn,jn,An,Cn,En=n(1519);!function(e){e.Delegation="Delegation",e.DelegationCategory="DelegationCategory",e.Event="Event",e.Organization="Organization",e.Position="Position",e.PositionCategory="PositionCategory"}(q||(q={})),function(e){e.Calendar="Calendar",e.List="List",e.Radio="Radio"}(Y||(Y={})),(Cn=H||(H={})).Acronym="Acronym",Cn.Address="Address",Cn.AutoAccredit="AutoAccredit",Cn.Category="Category",Cn.Color="Color",Cn.Description="Description",Cn.Icon="Icon",Cn.Index="Index",Cn.Latitude="Latitude",Cn.Longitude="Longitude",Cn.Name="Name",Cn.Tag="Tag",Cn.WeezeventIsSynchronized="WeezeventIsSynchronized",function(e){e.Accredited="Accredited",e.Everyone="Everyone",e.Members="Members",e.Refused="Refused",e.Segments="Segments"}(Z||(Z={})),function(e){e.Done="Done",e.Waiting="Waiting"}(K||(K={})),(An=Q||(Q={})).Acronym="Acronym",An.Category="Category",An.Color="Color",An.Description="Description",An.Icon="Icon",An.Name="Name",function(e){e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(X||(X={})),function(e){e.Accreditation="Accreditation",e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Date="Date",e.Id="Id",e.Name="Name"}(J||(J={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Index="Index",e.Name="Name"}(ee||(ee={})),function(e){e.Accredited="Accredited",e.AutoAccredited="AutoAccredited",e.NotApplicable="NotApplicable",e.Refused="Refused",e.WaitingAccreditation="WaitingAccreditation"}(te||(te={})),function(e){e.Car="Car",e.Moto="Moto"}(ne||(ne={})),function(e){e.Assigned="Assigned",e.Everyone="Everyone",e.Members="Members",e.Refused="Refused",e.Segments="Segments"}(ie||(ie={})),function(e){e.EventStart="EventStart",e.EventEnd="EventEnd"}(oe||(oe={})),function(e){e.Before="Before",e.After="After"}(ae||(ae={})),function(e){e.NoSchedule="NoSchedule",e.Datetime="Datetime",e.Anchor="Anchor"}(se||(se={})),function(e){e.InsertedAt="InsertedAt",e.Name="Name",e.State="State",e.Type="Type"}(re||(re={})),function(e){e.Done="Done",e.Draft="Draft",e.InProgress="InProgress",e.Scheduled="Scheduled",e.Template="Template"}(de||(de={})),function(e){e.Email="Email",e.Sms="Sms"}(le||(le={})),function(e){e.C10012713_1K="C10012713_1K",e.C10012713_2K="C10012713_2K",e.C10012713_3K="C10012713_3K",e.C10012713_4K="C10012713_4K",e.C10012713_5K="C10012713_5K",e.C10012713_6K="C10012713_6K",e.C10012713_7K="C10012713_7K",e.C10012713_1="C10012713_1",e.C10012713_2="C10012713_2",e.C10012713_3="C10012713_3",e.C10012713_4="C10012713_4",e.C10012713_5="C10012713_5",e.C10012713_6="C10012713_6",e.C10012713_7="C10012713_7",e.C10012717_1K="C10012717_1K",e.C10012717_2K="C10012717_2K",e.C10012717_3K="C10012717_3K",e.C10012717_4K="C10012717_4K",e.C10012717_5K="C10012717_5K",e.C10012717_6K="C10012717_6K",e.C10012717_7K="C10012717_7K",e.C10012717_1="C10012717_1",e.C10012717_2="C10012717_2",e.C10012717_3="C10012717_3",e.C10012717_4="C10012717_4",e.C10012717_5="C10012717_5",e.C10012717_6="C10012717_6",e.C10012717_7="C10012717_7",e.C10006995K="C10006995K",e.C10006995_1K="C10006995_1K",e.C10006995_2K="C10006995_2K",e.C10006995_3K="C10006995_3K",e.C10006995_4K="C10006995_4K",e.C10006995_5K="C10006995_5K",e.C10006995_6K="C10006995_6K",e.C10006995_7K="C10006995_7K",e.C10006995="C10006995",e.C10006995_1="C10006995_1",e.C10006995_2="C10006995_2",e.C10006995_3="C10006995_3",e.C10006995_4="C10006995_4",e.C10006995_5="C10006995_5",e.C10006995_6="C10006995_6",e.C10006995_7="C10006995_7",e.C10010951K="C10010951K",e.C10010951_1K="C10010951_1K",e.C10010951_2K="C10010951_2K",e.C10010951_3K="C10010951_3K",e.C10010951_4K="C10010951_4K",e.C10010951_5K="C10010951_5K",e.C10010951_6K="C10010951_6K",e.C10010951_7K="C10010951_7K",e.C10010951="C10010951",e.C10010951_1="C10010951_1",e.C10010951_2="C10010951_2",e.C10010951_3="C10010951_3",e.C10010951_4="C10010951_4",e.C10010951_5="C10010951_5",e.C10010951_6="C10010951_6",e.C10010951_7="C10010951_7",e.C10006999="C10006999",e.C10006999_1="C10006999_1",e.C10006999_2="C10006999_2",e.C10006999_3="C10006999_3",e.C10006999_4="C10006999_4",e.C10006999_5="C10006999_5",e.C10006999_6="C10006999_6",e.C10006999_7="C10006999_7",e.C10006999K="C10006999K",e.C10006999_1K="C10006999_1K",e.C10006999_2K="C10006999_2K",e.C10006999_3K="C10006999_3K",e.C10006999_4K="C10006999_4K",e.C10006999_5K="C10006999_5K",e.C10006999_6K="C10006999_6K",e.C10006999_7K="C10006999_7K",e.C10015355K="C10015355K",e.C10015355_1K="C10015355_1K",e.C10015355_2K="C10015355_2K",e.C10015355_3K="C10015355_3K",e.C10015355_4K="C10015355_4K",e.C10015355_5K="C10015355_5K",e.C10015355_6K="C10015355_6K",e.C10015355_7K="C10015355_7K",e.C10015355="C10015355",e.C10015355_1="C10015355_1",e.C10015355_2="C10015355_2",e.C10015355_3="C10015355_3",e.C10015355_4="C10015355_4",e.C10015355_5="C10015355_5",e.C10015355_6="C10015355_6",e.C10015355_7="C10015355_7"}(ce||(ce={})),(jn=ue||(ue={})).Waiting="Waiting",jn.CheckedIn="CheckedIn",jn.CheckedOut="CheckedOut",function(e){e.BreakTime="BreakTime",e.CheckIn="CheckIn",e.CheckInOut="CheckInOut",e.CheckOut="CheckOut",e.Reset="Reset"}(me||(me={})),function(e){e.And="And",e.Or="Or"}(ge||(ge={})),(bn=he||(he={})).Animajeconvention="Animajeconvention",bn.Asoassignment="Asoassignment",bn.Hbcldc="Hbcldc",bn.Hbclnh="Hbclnh",bn.P2nassignment="P2nassignment",bn.P2nassignmentmontagedemontage="P2nassignmentmontagedemontage",bn.Paris20km="Paris20km",bn.Paris20kmassignment="Paris20kmassignment",bn.Paris20kmcontremarque="Paris20kmcontremarque",bn.Playground="Playground",bn.T24assignment="T24assignment",function(e){e.All="All",e.Public="Public",e.Private="Private"}(pe||(pe={})),(vn=fe||(fe={})).Category="Category",vn.Label="Label",vn.Name="Name",vn.Privacy="Privacy",function(e){e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Label="Label",e.Name="Name",e.Status="Status",e.Type="Type"}(Ie||(Ie={})),(Sn=_e||(_e={})).Accreditation="Accreditation",Sn.Delegation="Delegation",Sn.Event="Event",Sn.Position="Position",Sn.UserInfo="UserInfo",(xn=ye||(ye={})).Campaigns="Campaigns",xn.CanLeadersAddMembers="CanLeadersAddMembers",xn.CanLeadersDeleteMembers="CanLeadersDeleteMembers",xn.CanLeadersDuplicateMembers="CanLeadersDuplicateMembers",xn.CanLeadersEditColumns="CanLeadersEditColumns",xn.CanLeadersEditCustomFields="CanLeadersEditCustomFields",xn.CanLeadersEditMembers="CanLeadersEditMembers",xn.CanLeadersImportMembers="CanLeadersImportMembers",xn.CanLeadersSeeHiddenAccreditationsSlots="CanLeadersSeeHiddenAccreditationsSlots",xn.Category="Category",xn.Columns="Columns",xn.DeadlineDate="DeadlineDate",xn.DelegationsSpaceLayout="DelegationsSpaceLayout",xn.Description="Description",xn.Documents="Documents",xn.Form="Form",xn.IsLocked="IsLocked",xn.MaxResources="MaxResources",xn.Name="Name",xn.Parent="Parent",xn.ShowAllAccreditations="ShowAllAccreditations",xn.ShowFormLinkInDelegationSpace="ShowFormLinkInDelegationSpace",xn.ShowInDelegationSpace="ShowInDelegationSpace",xn.Tag="Tag",function(e){e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(xe||(xe={})),function(e){e.Done="Done",e.Waiting="Waiting"}(Se||(Se={})),function(e){e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.MaxResources="MaxResources",e.Name="Name"}(ve||(ve={})),(yn=be||(be={})).Expired="Expired",yn.Full="Full",yn.Locked="Locked",yn.Ongoing="Ongoing",function(e){e.Failed="FAILED",e.Pending="PENDING",e.Success="SUCCESS"}(je||(je={})),function(e){e.OnePerPage="OnePerPage",e.GroupedA4="GroupedA4"}(Ae||(Ae={})),function(e){e.Name="Name"}(Ce||(Ce={})),function(e){e.AsoPaxManifest="AsoPaxManifest",e.Assignments="Assignments",e.Badge="Badge",e.Certificate="Certificate",e.CustomBadge="CustomBadge",e.DelegationCalendar="DelegationCalendar",e.Planning="Planning",e.Position="Position",e.PositionPlanning="PositionPlanning",e.PositionsVolunteersPlanning="PositionsVolunteersPlanning",e.UserCustomDocument="UserCustomDocument",e.UserHours="UserHours",e.UserPlanning="UserPlanning",e.UserPlanningDays="UserPlanningDays",e.UserPlanningList="UserPlanningList",e.UsersPictures="UsersPictures",e.VolunteersListing="VolunteersListing"}(Ee||(Ee={})),function(e){e.Bounced="Bounced",e.Delivered="Delivered",e.Opened="Opened",e.Queued="Queued",e.Sent="Sent",e.Waiting="Waiting"}(Te||(Te={})),function(e){e.DoesNotExist="DoesNotExist",e.NotVerified="NotVerified",e.Verified="Verified"}(Oe||(Oe={})),(_n=Re||(Re={})).Accreditations="Accreditations",_n.AccreditationsImport="AccreditationsImport",_n.AccreditationsProfilesImport="AccreditationsProfilesImport",_n.AccreditationsRefused="AccreditationsRefused",_n.Assignments="Assignments",_n.Campaign="Campaign",_n.Code="Code",_n.DelegationCategoryLeaderAssign="DelegationCategoryLeaderAssign",_n.DelegationFormInvite="DelegationFormInvite",_n.DelegationLeaderAssign="DelegationLeaderAssign",_n.DelegationsImport="DelegationsImport",_n.Documents="Documents",_n.EventInvite="EventInvite",_n.EventsImport="EventsImport",_n.Export="Export",_n.FilesImport="FilesImport",_n.FormInvite="FormInvite",_n.FormSubmit="FormSubmit",_n.MembersImport="MembersImport",_n.NewMember="NewMember",_n.NotifyLeaders="NotifyLeaders",_n.OrganizationInvite="OrganizationInvite",_n.PositionCategoryLeaderAssign="PositionCategoryLeaderAssign",_n.PositionLeaderAssign="PositionLeaderAssign",_n.PositionsImport="PositionsImport",_n.Refused="Refused",_n.VolunteerRegistration="VolunteerRegistration",function(e){e.Description="Description",e.EndAt="EndAt",e.Name="Name",e.StartAt="StartAt",e.Tag="Tag"}(Me||(Me={})),function(e){e.Done="Done",e.Waiting="Waiting"}(De||(De={})),function(e){e.CreatedAt="CreatedAt",e.EndAt="EndAt",e.Id="Id",e.Name="Name",e.StartAt="StartAt"}(we||(we={})),(In=$e||($e={})).Archived="Archived",In.Done="Done",In.Ongoing="Ongoing",In.Upcoming="Upcoming",function(e){e.Excel="Excel",e.Csv="CSV"}(Pe||(Pe={})),function(e){e.Done="Done",e.Waiting="Waiting"}(Ne||(Ne={})),function(e){e.Accreditation="Accreditation",e.Api="Api",e.Beta="Beta",e.Community="Community",e.Criblage="Criblage",e.CustomDocument="CustomDocument",e.Delegation="Delegation",e.Documents="Documents",e.Eid="Eid",e.KmlImport="KmlImport",e.Languages="Languages",e.Multiform="Multiform",e.Skidata="Skidata",e.Sms="Sms",e.Weezevent="Weezevent",e.Zapier="Zapier"}(ke||(ke={})),(fn=ze||(ze={})).BirthCity="birthCity",fn.BirthCountry="birthCountry",fn.BirthPostalCode="birthPostalCode",fn.City="city",fn.Country="country",fn.Custom="custom",fn.DateOfBirth="dateOfBirth",fn.Eid="eid",fn.FirstName="firstName",fn.Language="language",fn.LastName="lastName",fn.Nationality="nationality",fn.Phone="phone",fn.Picture="picture",fn.Population="population",fn.PostalCode="postalCode",fn.Sex="sex",fn.Street="street",function(e){e.Freeform="Freeform",e.Iban="Iban",e.Avs="Avs",e.Eid="Eid"}(Le||(Le={})),(pn=Fe||(Fe={})).Address="Address",pn.Checkbox="Checkbox",pn.Country="Country",pn.Date="Date",pn.Datetime="Datetime",pn.File="File",pn.Language="Language",pn.Nationality="Nationality",pn.Number="Number",pn.Phone="Phone",pn.Select="Select",pn.Sex="Sex",pn.Text="Text",pn.Textarea="Textarea",pn.Time="Time",pn.Validation="Validation",function(e){e.Done="Done",e.Waiting="Waiting"}(Ue||(Ue={})),function(e){e.Default="Default",e.Picture="Picture"}(Be||(Be={})),function(e){e.Address="Address",e.Campaign="Campaign",e.Checkbox="Checkbox",e.Country="Country",e.Date="Date",e.DateTimeRange="DateTimeRange",e.Datetime="Datetime",e.File="File",e.Language="Language",e.Nationality="Nationality",e.Number="Number",e.Phone="Phone",e.Select="Select",e.Sex="Sex",e.Text="Text",e.Textarea="Textarea",e.Time="Time",e.Validation="Validation"}(Ge||(Ge={})),(hn=Ve||(Ve={})).Field="Field",hn.Section="Section",hn.Text="Text",function(e){e.Ranked="Ranked",e.Unranked="Unranked"}(We||(We={})),function(e){e.Admin="Admin",e.DelegationsSpace="DelegationsSpace",e.Form="Form"}(qe||(qe={})),function(e){e.CloseWhenEventDone="CloseWhenEventDone",e.Closed="Closed",e.ClosedAt="ClosedAt",e.Open="Open"}(Ye||(Ye={})),function(e){e.Backpack="Backpack",e.BadgeCheck="BadgeCheck",e.BagShopping="BagShopping",e.Bed="Bed",e.BedBunk="BedBunk",e.Bicycle="Bicycle",e.BriefcaseMedical="BriefcaseMedical",e.BurgerSoda="BurgerSoda",e.CakeCandles="CakeCandles",e.Camera="Camera",e.Car="Car",e.CircleParking="CircleParking",e.CircleQuestion="CircleQuestion",e.Computer="Computer",e.Droplet="Droplet",e.ForkKnife="ForkKnife",e.HatCowboy="HatCowboy",e.House="House",e.LocationDot="LocationDot",e.MartiniGlass="MartiniGlass",e.Megaphone="Megaphone",e.Motorcycle="Motorcycle",e.PersonBiking="PersonBiking",e.PersonHiking="PersonHiking",e.Phone="Phone",e.ScrewdriverWrench="ScrewdriverWrench",e.Shirt="Shirt",e.SignsPost="SignsPost",e.Star="Star",e.Ticket="Ticket",e.UserPolice="UserPolice",e.WalkieTalkie="WalkieTalkie"}(He||(He={})),function(e){e.Create="Create",e.Upsert="Upsert",e.Update="Update"}(Ze||(Ze={})),function(e){e.Overdue="Overdue",e.Paid="Paid",e.Refunded="Refunded",e.Waiting="Waiting",e.WrittenOff="WrittenOff"}(Ke||(Ke={})),function(e){e.Mandarin="Mandarin",e.Spanish="Spanish",e.English="English",e.Hindi="Hindi",e.Bengali="Bengali",e.Portuguese="Portuguese",e.Russian="Russian",e.Japanese="Japanese",e.Punjabi="Punjabi",e.Turkish="Turkish",e.Korean="Korean",e.French="French",e.German="German",e.Vietnamese="Vietnamese",e.Tamil="Tamil",e.Urdu="Urdu",e.Javanese="Javanese",e.Italian="Italian",e.Persian="Persian",e.Polish="Polish",e.Ukrainian="Ukrainian",e.Romanian="Romanian",e.Dutch="Dutch"}(Qe||(Qe={})),function(e){e.Default="Default",e.Dot="Dot",e.Badge="Badge"}(Xe||(Xe={})),function(e){e.App="App",e.DelegationsSpace="DelegationsSpace",e.MembersSpace="MembersSpace",e.VolunteerAssignments="VolunteerAssignments",e.VolunteerRegister="VolunteerRegister"}(Je||(Je={})),function(e){e.Google="Google",e.GoogleSatellite="GoogleSatellite",e.IgnPlan="IgnPlan"}(et||(et={})),function(e){e.Add="Add",e.Delete="Delete",e.Replace="Replace"}(tt||(tt={})),function(e){e.Add="Add",e.Replace="Replace",e.Reset="Reset"}(nt||(nt={})),function(e){e.Categories="Categories",e.Positions="Positions"}(it||(it={})),(gn=ot||(ot={})).Both="Both",gn.Event="Event",gn.Organization="Organization",function(e){e.Id="Id",e.InsertedAt="InsertedAt",e.PeriodEndAt="PeriodEndAt",e.WeezeventOrganizationId="WeezeventOrganizationId"}(at||(at={})),function(e){e.A4Portrait="A4Portrait",e.A4Landscape="A4Landscape",e.A5Portrait="A5Portrait",e.A6Portrait="A6Portrait"}(st||(st={})),function(e){e.List="List",e.Radio="Radio"}(rt||(rt={})),(mn=dt||(dt={})).Acronym="Acronym",mn.Address="Address",mn.Category="Category",mn.Color="Color",mn.Description="Description",mn.Icon="Icon",mn.Latitude="Latitude",mn.Layer="Layer",mn.Longitude="Longitude",mn.Name="Name",mn.Tag="Tag",mn.Traces="Traces",mn.WeezeventIsSynchronized="WeezeventIsSynchronized",mn.Zoom="Zoom",function(e){e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(lt||(lt={})),function(e){e.Done="Done",e.Waiting="Waiting"}(ct||(ct={})),function(e){e.EndDate="EndDate",e.EndTime="EndTime",e.Resources="Resources",e.StartDate="StartDate",e.StartTime="StartTime"}(ut||(ut={})),function(e){e.Add="Add",e.Replace="Replace",e.Subtract="Subtract"}(mt||(mt={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name",e.Position="Position",e.Range="Range"}(gt||(gt={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name",e.Slot="Slot"}(ht||(ht={})),function(e){e.Empty="Empty",e.Partial="Partial",e.Full="Full"}(pt||(pt={})),function(e){e.Between="between",e.Contains="contains",e.EndsWith="endsWith",e.EngulfedBy="engulfedBy",e.Engulfs="engulfs",e.GreaterThan="greaterThan",e.GreaterThanEqual="greaterThanEqual",e.Is="is",e.IsAfter="isAfter",e.IsBefore="isBefore",e.IsEmpty="isEmpty",e.IsInLast="isInLast",e.IsInNext="isInNext",e.IsMoreThanAgo="isMoreThanAgo",e.IsMoreThanAhead="isMoreThanAhead",e.IsNot="isNot",e.IsNotEmpty="isNotEmpty",e.IsNotValid="isNotValid",e.IsValid="isValid",e.LessThan="lessThan",e.LessThanEqual="lessThanEqual",e.NotContains="notContains",e.NotEngulfedBy="notEngulfedBy",e.NotEngulfs="notEngulfs",e.NotOverlaps="notOverlaps",e.Overlaps="overlaps",e.StartsWith="startsWith",e.ThisDayMonth="thisDayMonth",e.Today="today"}(ft||(ft={})),function(e){e.And="and",e.Or="or"}(It||(It={})),function(e){e.EventNotLinked="EventNotLinked",e.GroupsUnreachable="GroupsUnreachable",e.GroupNotFound="GroupNotFound",e.Unexpected="Unexpected"}(_t||(_t={})),function(e){e.Paper="Paper",e.Ticket="Ticket",e.Wristband="Wristband"}(yt||(yt={})),function(e){e.OrganizationNotLinked="OrganizationNotLinked",e.PartnersUnreachable="PartnersUnreachable",e.PartnerNotFound="PartnerNotFound",e.EventNotLinked="EventNotLinked",e.GroupsUnreachable="GroupsUnreachable",e.GroupNotFound="GroupNotFound",e.DocumentNotFound="DocumentNotFound"}(xt||(xt={})),function(e){e.ActivationRange="ActivationRange",e.CreatedAt="CreatedAt",e.Document="Document",e.Id="Id",e.MediaType="MediaType",e.PrinterGroup="PrinterGroup",e.Status="Status",e.WeezaccessPartner="WeezaccessPartner"}(St||(St={})),function(e){e.Active="Active",e.Past="Past",e.Upcoming="Upcoming"}(vt||(vt={})),function(e){e.Accreditation="Accreditation",e.None="None"}(bt||(bt={})),function(e){e.AllDays="AllDays",e.DaysWithSlots="DaysWithSlots"}(jt||(jt={})),function(e){e.Category="Category",e.Position="Position",e.Slot="Slot",e.None="None"}(At||(At={})),function(e){e.FilterWithSlots="FilterWithSlots",e.None="None"}(Ct||(Ct={})),(un=Et||(Et={})).Calendar="Calendar",un.Custom="Custom",un.Display="Display",un.DisplayDays="DisplayDays",un.Hide="Hide",(cn=Tt||(Tt={})).DelegationCategory="DelegationCategory",cn.Event="Event",cn.Organization="Organization",cn.Position="Position",function(e){e.Custom="Custom",e.DelegationCategoryLeader="DelegationCategoryLeader",e.EventAdmin="EventAdmin",e.EventReader="EventReader",e.OrganizationAdmin="OrganizationAdmin",e.OrganizationReader="OrganizationReader",e.PositionEditor="PositionEditor",e.PositionReader="PositionReader"}(Ot||(Ot={})),function(e){e.Accreditations="Accreditations",e.AccreditationsProfiles="AccreditationsProfiles",e.Campaigns="Campaigns",e.CustomFields="CustomFields",e.Delegations="Delegations",e.Events="Events",e.Positions="Positions",e.Volunteers="Volunteers",e.Workflows="Workflows"}(Rt||(Rt={})),function(e){e.Female="Female",e.Male="Male",e.Nonbinary="Nonbinary",e.Notsay="Notsay",e.Other="Other"}(Mt||(Mt={})),function(e){e.Asc="Asc",e.Desc="Desc"}(Dt||(Dt={})),function(e){e.DelegationSpace="DelegationSpace",e.EventsShowcase="EventsShowcase",e.MembersSpace="MembersSpace"}(wt||(wt={})),(ln=$t||($t={})).De="De",ln.En="En",ln.Es="Es",ln.Fr="Fr",ln.Keys="Keys",ln.Nl="Nl",function(e){e.Accreditations="Accreditations",e.Delegations="Delegations",e.Events="Events",e.Positions="Positions",e.UsersInfos="UsersInfos"}(Pt||(Pt={})),function(e){e.WithReplies="WithReplies",e.WithUnreadReplies="WithUnreadReplies",e.WithoutReplies="WithoutReplies"}(Nt||(Nt={})),function(e){e.Delivered="Delivered",e.InvalidNumber="InvalidNumber",e.Other="Other",e.Refused="Refused",e.Sent="Sent",e.Undelivered="Undelivered",e.Waiting="Waiting"}(kt||(kt={})),function(e){e.None="None",e.Backward="Backward",e.Forward="Forward"}(zt||(zt={})),function(e){e.Accreditation="Accreditation",e.CustomField="CustomField",e.CustomSlot="CustomSlot",e.Delegation="Delegation",e.Document="Document",e.Email="Email",e.Event="Event",e.Form="Form",e.Other="Other",e.Position="Position"}(Lt||(Lt={})),function(e){e.NotTranslated="NotTranslated",e.Translated="Translated",e.TranslatedAndNotTranslated="TranslatedAndNotTranslated"}(Ft||(Ft={})),function(e){e.String="String",e.StringArray="StringArray",e.RichText="RichText"}(Ut||(Ut={})),function(e){e.Admin="Admin",e.Leader="Leader"}(Bt||(Bt={})),function(e){e.Email="Email",e.FirstName="FirstName",e.Id="Id",e.InsertedAt="InsertedAt",e.LastName="LastName",e.LastSeenAt="LastSeenAt",e.LocalId="LocalId",e.Name="Name",e.UpdatedAt="UpdatedAt"}(Gt||(Gt={})),(dn=Vt||(Vt={})).Assigned="Assigned",dn.NotApplicable="NotApplicable",dn.PreAssigned="PreAssigned",dn.Refused="Refused",dn.WaitingAssignment="WaitingAssignment",function(e){e.Done="Done",e.Waiting="Waiting"}(Wt||(Wt={})),function(e){e.AccreditationState="AccreditationState",e.Delegation="Delegation",e.Email="Email",e.FirstName="FirstName",e.Id="Id",e.InsertedAt="InsertedAt",e.LastName="LastName",e.LocalId="LocalId",e.Name="Name",e.OrganizationLocalId="OrganizationLocalId",e.PairedAt="PairedAt",e.State="State",e.TeamCode="TeamCode",e.UpdatedAt="UpdatedAt"}(qt||(qt={})),function(e){e.OrganizationNotLinked="OrganizationNotLinked",e.PartnersUnreachable="PartnersUnreachable",e.PartnerNotFound="PartnerNotFound",e.Unexpected="Unexpected"}(Yt||(Yt={})),(rn=Ht||(Ht={})).AddAccreditations="AddAccreditations",rn.AddDelegationPermissions="AddDelegationPermissions",rn.AddEvent="AddEvent",rn.AddPositions="AddPositions",rn.CreateDelegation="CreateDelegation",rn.DeleteAccreditations="DeleteAccreditations",rn.DeleteDelegationPermissions="DeleteDelegationPermissions",rn.DeletePositions="DeletePositions",rn.DuplicateMember="DuplicateMember",rn.LockDelegation="LockDelegation",rn.SendCampaign="SendCampaign",rn.SetCustomField="SetCustomField",rn.UnlockDelegation="UnlockDelegation",(sn=Zt||(Zt={})).EveryMinute="EveryMinute",sn.Every2Minutes="Every2Minutes",sn.Every5Minutes="Every5Minutes",sn.Every10Minutes="Every10Minutes",function(e){e.Revert="Revert",e.Keep="Keep"}(Kt||(Kt={})),(an=Qt||(Qt={})).Frequency="Frequency",an.Name="Name",an.State="State",function(e){e.DelegationsLeaders="DelegationsLeaders",e.PositionsLeaders="PositionsLeaders",e.UsersInfosIds="UsersInfosIds",e.View="View"}(Xt||(Xt={})),function(e){e.CreatedAt="CreatedAt",e.ExecutedAt="ExecutedAt",e.Id="Id",e.Name="Name",e.VolunteersSegment="VolunteersSegment"}(Jt||(Jt={})),(on=en||(en={})).Active="Active",on.Error="Error",on.Paused="Paused",(nn=tn||(tn={})).Assigned="Assigned",nn.DelegationsSegment="DelegationsSegment",nn.FormSubmit="FormSubmit",nn.VolunteersSegment="VolunteersSegment",Object.keys(q);const Tn=Object.keys(Y),On=(Object.keys(H),Object.keys(Z),Object.keys(K),Object.keys(Q),Object.keys(X),Object.keys(J),Object.keys(ee),Object.keys(te)),Rn=(Object.keys(ne),Object.keys(ie),Object.keys(oe)),Mn=Object.keys(ae),Dn=(Object.keys(se),Object.keys(re),Object.keys(de)),wn=Object.keys(le),$n=(Object.keys(ce),Object.keys(ue)),Pn=(Object.keys(me),Object.keys(ge),Object.keys(he)),Nn=(Object.keys(pe),Object.keys(fe),Object.keys(Ie),Object.keys(_e)),kn=(Object.keys(ye),Object.keys(xe),Object.keys(Se),Object.keys(ve),Object.keys(be)),zn=(Object.keys(je),Object.keys(Ae),Object.keys(Ce),Object.keys(Ee),Object.keys(Te)),Ln=(Object.keys(Oe),Object.keys(Re)),Fn=(Object.keys(Me),Object.keys(De),Object.keys(we),Object.keys($e),Object.keys(Pe),Object.keys(Ne),Object.keys(ke)),Un=(Object.keys(ze),Object.keys(Le)),Bn=Object.keys(Fe),Gn=(Object.keys(Ue),Object.keys(Be)),Vn=(Object.keys(Ge),Object.keys(Ve),Object.keys(We)),Wn=(Object.keys(qe),Object.keys(Ye)),qn=Object.keys(He),Yn=Object.keys(Ze),Hn=(Object.keys(Ke),Object.keys(Qe)),Zn=Object.keys(Xe),Kn=(Object.keys(Je),Object.keys(et)),Qn=Object.keys(tt),Xn=Object.keys(nt),Jn=Object.keys(it),ei=(Object.keys(ot),Object.keys(at),Object.keys(st),Object.keys(rt)),ti=(Object.keys(dt),Object.keys(lt),Object.keys(ct),Object.keys(ut)),ni=Object.keys(mt),ii=(Object.keys(gt),Object.keys(ht),Object.keys(pt)),oi=(Object.keys(ft),Object.keys(It),Object.keys(_t),Object.keys(yt),Object.keys(xt),Object.keys(St),Object.keys(vt),Object.keys(bt)),ai=Object.keys(jt),si=Object.keys(At),ri=Object.keys(Ct),di=Object.keys(Et),li=Object.keys(Tt),ci=(Object.keys(Ot),Object.keys(Rt),Object.keys(Mt)),ui=(Object.keys(Dt),Object.keys(wt),Object.keys($t),Object.keys(Pt),Object.keys(Nt),Object.keys(kt)),mi=(Object.keys(zt),Object.keys(Lt),Object.keys(Ft),Object.keys(Ut),Object.keys(Bt),Object.keys(Gt),Object.keys(Vt)),gi=(Object.keys(Wt),Object.keys(qt),Object.keys(Yt),Object.keys(Ht)),hi=Object.keys(Zt),pi=Object.keys(Kt),fi=(Object.keys(Qt),Object.keys(Xt)),Ii=(Object.keys(Jt),Object.keys(en)),_i=Object.keys(tn),yi=["insertedAt","updatedAt","checkInAt","date","sentAt","scheduledAt","deletedAt","lockedAt","bouncedAt","complaintAt","deliveredAt","rejectedAt","openedAt","clickedAt","queuedAt","closedAt","periodEndAt","checkOutAt","validatedAt","receptionDate","startAt","termsAcceptedAt","lastSeenAt","registrationDate","pairedAt","executedAt"],xi=["date","calendarInviteStartDate","calendarInviteEndDate","startDate","endDate","deadlineDate","minAccreditationSlotDate","startAt","endAt","paidAt"],Si=["range","ranges","activationRange"],vi=["assignedDuration","duration"];var bi,ji;let Ai=class{language;translations;constructor(e,t){this.language=e,this.translations=t}translate(e,...t){if("production"!==a.Test||process.env.JEST_WORKER_ID){let n=this.translations[e]||e;const i=this.translations[`${e}_plural`];return i&&"number"==typeof t[0]&&t[0]>1&&(n=i),Array.isArray(t)&&t.length>0&&(n=t.reduce((e,t,n)=>e.replaceAll(`{${n+1}}`,t),n)),n}return`${e} - ${JSON.stringify(t)}`}*interpolateWithComponents(e,...t){let n=0;for(const[o,a]of e.split(/{\d+}/).entries())n>0&&(yield(0,i.jsx)(r.Fragment,{children:t[o-1]},n)),n++,yield a}formatListValues(e,t="disjunction"){return new Intl.ListFormat(this.language.toLowerCase(),{style:"long",type:t}).format(e)}};Ai=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(bi=void 0!==$t&&$t)?bi:Object,"function"==typeof(ji="undefined"!=typeof Record&&Record)?ji:Object])],Ai);const Ci=(0,r.createContext)({}),Ei=Ci.Consumer;function Ti(e){return(0,r.useContext)(Ci).container.get(e)}function Oi(){const e=(0,r.useContext)(Ci).container.get(Ai);return e.translate.bind(e)}function Ri(){const e=(0,r.useContext)(Ci).container.get(Ai);return e.interpolateWithComponents.bind(e)}function Mi(e,t,n=[]){const i="production"!==a.Test?e:e.loc.source.body;return(0,r.useContext)(Ci).useQuery(i,t,n)}function Di(e,t={}){return(0,r.useContext)(Ci).useMutation(e,t)}function wi(){return(0,r.useContext)(Ci).useParams()}function $i(){return(0,r.useContext)(Ci).useHistory()}function Pi(){return(0,r.useContext)(Ci).useLocalStorage()}var Ni=n(7251);function ki(e){if(e){const[t,n,i]=e.split(" ");return{color:t,fontSize:n,fontWeight:i}}return{}}const zi=R("div",{variants:{color:{inherit:{color:"inherit"},cyan:{color:"$cyan"},gray25:{color:"$gray25"},gray50:{color:"$gray50"},grayCustom50:{color:"$grayCustom50"},gray100:{color:"$gray100"},gray200:{color:"$gray200"},gray300:{color:"$gray300"},gray400:{color:"$gray400"},gray500:{color:"$gray500"},grayCustom500:{color:"$grayCustom500"},gray600:{color:"$gray600"},gray700:{color:"$gray700"},grayCustom700:{color:"$grayCustom700"},gray800:{color:"$gray800"},grayCustom800:{color:"$grayCustom800"},gray900:{color:"$gray900"},grayCustom900:{color:"$grayCustom900"},grayDark50:{color:"$grayDark50"},grayDark100:{color:"$grayDark100"},grayDark500:{color:"$grayDark500"},grayDark700:{color:"$grayDark700"},primary25:{color:"$primary25"},primary50:{color:"$primary50"},primary100:{color:"$primary100"},primary200:{color:"$primary200"},primary300:{color:"$primary300"},primary400:{color:"$primary400"},primary500:{color:"$primary500"},primaryCustom500:{color:"$primaryCustom500"},primary600:{color:"$primary600"},primaryCustom600:{color:"$primaryCustom600"},primary700:{color:"$primary700"},primary800:{color:"$primary800"},primary900:{color:"$primary900"},primary950:{color:"$primary950"},error25:{color:"$error25"},error50:{color:"$error50"},error100:{color:"$error100"},error200:{color:"$error200"},error300:{color:"$error300"},error400:{color:"$error400"},error500:{color:"$error500"},error600:{color:"$error600"},error700:{color:"$error700"},error800:{color:"$error800"},error900:{color:"$error900"},warning25:{color:"$warning25"},warning50:{color:"$warning50"},warning100:{color:"$warning100"},warning200:{color:"$warning200"},warning300:{color:"$warning300"},warning400:{color:"$warning400"},warning500:{color:"$warning500"},warning600:{color:"$warning600"},warning700:{color:"$warning700"},warning800:{color:"$warning800"},warning900:{color:"$warning900"},success25:{color:"$success25"},success50:{color:"$success50"},success100:{color:"$success100"},success200:{color:"$success200"},success300:{color:"$success300"},success400:{color:"$success400"},success500:{color:"$success500"},success600:{color:"$success600"},success700:{color:"$success700"},success800:{color:"$success800"},success900:{color:"$success900"},blue25:{color:"$blue25"},blue50:{color:"$blue50"},blue100:{color:"$blue100"},blue200:{color:"$blue200"},blue300:{color:"$blue300"},blue400:{color:"$blue400"},blue500:{color:"$blue500"},blue600:{color:"$blue600"},blue700:{color:"$blue700"},blue800:{color:"$blue800"},blue900:{color:"$blue900"},blueGray25:{color:"$blueGray25"},blueGray50:{color:"$blueGray50"},blueGray100:{color:"$blueGray100"},blueGray200:{color:"$blueGray200"},blueGray300:{color:"$blueGray300"},blueGray400:{color:"$blueGray400"},blueGray500:{color:"$blueGray500"},blueGray600:{color:"$blueGray600"},blueGray700:{color:"$blueGray700"},blueGray800:{color:"$blueGray800"},blueGray900:{color:"$blueGray900"},blueLight50:{color:"$blueLight50"},blueLight100:{color:"$blueLight100"},blueLight400:{color:"$blueLight400"},blueLight500:{color:"$blueLight500"},blueLight600:{color:"$blueLight600"},blueLight700:{color:"$blueLight700"},blueLight900:{color:"$blueLight900"},purple25:{color:"$purple25"},purple50:{color:"$purple50"},purple100:{color:"$purple100"},purple200:{color:"$purple200"},purple300:{color:"$purple300"},purple400:{color:"$purple400"},purple500:{color:"$purple500"},purple600:{color:"$purple600"},purple700:{color:"$purple700"},purple800:{color:"$purple800"},purple900:{color:"$purple900"},purpleLight50:{color:"$purpleLight50"},purpleLight100:{color:"$purpleLight100"},purpleLight500:{color:"$purpleLight500"},purpleLight700:{color:"$purpleLight700"},purpleDark50:{color:"$purpleDark50"},purpleDark100:{color:"$purpleDark100"},purpleDark500:{color:"$purpleDark500"},purpleDark700:{color:"$purpleDark700"},pink25:{color:"$pink25"},pink50:{color:"$pink50"},pink100:{color:"$pink100"},pink200:{color:"$pink200"},pink300:{color:"$pink300"},pink400:{color:"$pink400"},pink500:{color:"$pink500"},pink600:{color:"$pink600"},pink700:{color:"$pink700"},pink800:{color:"$pink800"},pink900:{color:"$pink900"},orange50:{color:"$orange50"},orange100:{color:"$orange100"},orange400:{color:"$orange400"},orange500:{color:"$orange500"},orange600:{color:"$orange600"},orange700:{color:"$orange700"},redLight50:{color:"$redLight50"},redLight100:{color:"$redLight100"},redLight500:{color:"$redLight500"},redLight700:{color:"$redLight700"},redDark50:{color:"$redDark50"},redDark100:{color:"$redDark100"},redDark500:{color:"$redDark500"},redDark700:{color:"$redDark700"},green50:{color:"$green50"},green100:{color:"$green100"},green500:{color:"$green500"},green700:{color:"$green700"},greenDark50:{color:"$greenDark50"},greenDark100:{color:"$greenDark100"},greenDark500:{color:"$greenDark500"},greenDark700:{color:"$greenDark700"},brown50:{color:"$brown50"},brown100:{color:"$brown100"},brown500:{color:"$brown500"},brown700:{color:"$brown700"},indigo100:{color:"$indigo100"},indigo600:{color:"$indigo600"},white:{color:"white"}},fontSize:{inherit:{fontSize:"inherit"},textXs:{fontSize:"$textXs"},textSm:{fontSize:"$textSm"},textMd:{fontSize:"$textMd"},textLg:{fontSize:"$textLg"},textXl:{fontSize:"$textXl"},displayXs:{fontSize:"$displayXs"},displaySm:{fontSize:"$displaySm"},displayMd:{fontSize:"$displayMd"},displayLg:{fontSize:"$displayLg"},displayXl:{fontSize:"$displayXl"},display2Xl:{fontSize:"$display2Xl"}},fontWeight:{inherit:{fontWeight:"inherit"},regular:{fontWeight:"$regular"},medium:{fontWeight:"$medium"},semiBold:{fontWeight:"$semiBold"},bold:{fontWeight:"$bold"}},textAlign:{start:{textAlign:"start"},end:{textAlign:"end"},center:{textAlign:"center"},justify:{textAlign:"justify"}},ellipsis:{true:{ellipsis:""}}},defaultVariants:{color:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start"}}),Li=r.forwardRef((e,t)=>{const n={};return e.height&&(n.height=F(e.height)),e.width&&(n.width=F(e.width)),(0,i.jsx)(zi,{...(0,Ni.A)(e,"font"),...ki(e.font),ref:t,css:{...n,...e.css}})});Li.displayName="Box";var Fi=n(8174),Ui=n(4625),Bi=n(9191);function Gi(e){try{return Buffer.from(e,"base64").toString()}catch{try{return atob(e)}catch{return""}}}class Vi extends URL{subdomain;basename;constructor(e,t,n,i){if(n&&("string"==typeof e?e=`${n}.${e}`:"object"==typeof e&&(e.host=`${n}.${e.host}`)),i&&("string"==typeof e?e=`${e}/${i}`:"object"==typeof e&&(e.pathname=`/${i}`)),!URL.canParse(e)&&(e=`https://${e}`,!URL.canParse(e)))throw new Error(`Invalid URL ${e}`);super(e,t),this.subdomain=n,this.basename=i}set pathname(e){super.pathname=`${this.basename?this.basename:""}${e}`}get pathname(){return"/"!==super.pathname?super.pathname:""}get pathnameOptional(){return"/"!==super.pathname?super.pathname:void 0}get href(){return"/"!==super.pathname?super.href:super.href.substring(0,super.href.length-1)}toString(){return this.href}}const Wi="undefined"!=typeof process&&v(process?.env?.SECRETS_PATH)?process.env.SECRETS_PATH:null,qi="undefined"!=typeof process?(0,Bi.existsSync)(`${Wi}/HEAVENT_SECRETS`)?JSON.parse(Gi((0,Bi.readFileSync)(`${Wi}/HEAVENT_SECRETS`,"utf-8"))):v(process?.env?.HEAVENT_SECRETS)?JSON.parse(Gi(process.env.HEAVENT_SECRETS)):null:null,Yi=globalThis.window,Hi=e=>{if("object"==typeof Yi&&void 0!==Yi[e])return Yi[e];if(void 0!==qi?.[e])return qi[e];throw new Error(`Missing env. var. ${e}`)},Zi=e=>"object"==typeof Yi&&void 0!==Yi[e]?Yi[e]:void 0!==qi?.[e]?qi[e]:void 0,Ki=e=>{const t=Hi(e);return"boolean"==typeof t?t:"true"===t},Qi=Hi("HEAVENT_APPLICATION_DOMAIN"),Xi=Zi("HEAVENT_RESOURCES_DOMAIN")??Qi,Ji=Zi("HEAVENT_ASSETS_DOMAIN")??Xi,eo=Zi("HEAVENT_APP_SUBDOMAIN")??"admin",to=Zi("HEAVENT_API_SUBDOMAIN")??"api",no=Zi("HEAVENT_PUBLIC_SUBDOMAIN")??"widget",io=Zi("HEAVENT_INVOICES_SUBDOMAIN")??"invoices",oo=Zi("HEAVENT_ASSETS_SUBDOMAIN")??"assets",ao=Zi("HEAVENT_UPLOADS_SUBDOMAIN")??"uploads",so=Zi("HEAVENT_APPLICATION_BASENAME")??"crew",ro=Zi("HEAVENT_RESOURCES_BASENAME")??"",lo={ADMINS:Hi("HEAVENT_ADMINS"),EMAIL_FROM:Hi("HEAVENT_EMAIL_FROM"),EMAIL_FROM_NAME:Hi("HEAVENT_EMAIL_FROM_NAME"),EMAIL_PICTURE_LINK:Hi("HEAVENT_EMAIL_PICTURE_LINK"),HEAVENT_APPLICATION_DOMAIN:Qi,HEAVENT_RESOURCES_DOMAIN:Xi,HEAVENT_ASSETS_DOMAIN:Ji,HEAVENT_APPLICATION_BASENAME:so,HEAVENT_APP_URL:new Vi(Zi("HEAVENT_APP_DOMAIN")??Qi,void 0,eo,Zi("HEAVENT_APP_BASENAME")??so),HEAVENT_API_URL:new Vi(Zi("HEAVENT_API_DOMAIN")??Qi,void 0,to,Zi("HEAVENT_API_BASENAME")??so),HEAVENT_PUBLIC_URL:new Vi(Zi("HEAVENT_PUBLIC_DOMAIN")??Qi,void 0,no,Zi("HEAVENT_PUBLIC_BASENAME")??so),HEAVENT_ASSETS_URL:new Vi(Ji,void 0,oo,Zi("HEAVENT_ASSETS_BASENAME")??ro),HEAVENT_INVOICES_URL:new Vi(Zi("HEAVENT_INVOICES_DOMAIN")??Xi,void 0,io,Zi("HEAVENT_INVOICES_BASENAME")??ro),HEAVENT_UPLOADS_URL:new Vi(Zi("HEAVENT_UPLOADS_DOMAIN")??Xi,void 0,ao,Zi("HEAVENT_UPLOADS_BASENAME")??ro),USE_HUBSPOT:Ki("HEAVENT_USE_HUBSPOT"),USE_INTERCOM:Ki("HEAVENT_USE_INTERCOM"),FORCE_WHITE_LABEL_FOR_ORGANIZATION_ID:Zi("HEAVENT_FORCE_WHITE_LABEL_FOR_ORGANIZATION_ID"),HIGHLIGHT_CUSTOM_COLOURS:(()=>{const e=Zi("HEAVENT_HIGHLIGHT_CUSTOM_COLOURS");return void 0!==e?"boolean"==typeof e?e:"true"===e:void 0})(),COGNITO_USER_POOL_ID:Hi("HEAVENT_COGNITO_USER_POOL_ID"),COGNITO_USER_POOL_CLIENT_ID:Hi("HEAVENT_COGNITO_USER_POOL_CLIENT_ID"),COGNITO_DOMAIN_URL:Hi("HEAVENT_COGNITO_DOMAIN_URL"),COGNITO_CLIENT_CALLBACK_URL:Hi("HEAVENT_COGNITO_CLIENT_CALLBACK_URL")[0],USE_MIXPANEL:Ki("HEAVENT_USE_MIXPANEL"),MIXPANEL_TOKEN:Ki("HEAVENT_MIXPANEL_TOKEN"),HEAVENT_AWS_UPLOADS_BUCKET:Hi("HEAVENT_AWS_UPLOADS_BUCKET"),LOG_TOKEN:Hi("HEAVENT_LOG_TOKEN"),WEEZEVENT_DOMAIN:Hi("HEAVENT_WEEZEVENT_DOMAIN")},co=["access","ticket","pay"],uo=/^(con|prn|aux|nul|com[1-9]|lpt[1-9]|conin\$|conout\$|clock\$)$/i,mo=/[\u0000-\u001F\u007F-\u009F\u061C\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF\uFFF9-\uFFFB]/g,go=/[<>:"/\\|?*]/g,ho=e=>(new TextEncoder).encode(e).length;function po(e,t="download",n=200){let i=e.normalize("NFC").replace(mo,"").replace(go,"-").replace(/\s+/g," ").replace(/^[.\s-]+/,"").replace(/[.\s]+$/,"");return uo.test(i.split(".")[0])&&(i=`_${i}`),i=function(e,t){if(ho(e)<=t)return e;let n="";for(const i of e){if(ho(n+i)>t)break;n+=i}return n}(i,n).replace(/[.\s]+$/,""),i||t}const fo=({children:e,height:t,replace:n,style:o,to:a,width:s,...r})=>{const d=new URL(a.toString(),location.origin),l={};t&&(l.height=F(t)),s&&(l.width=F(s));const c={alignItems:"inherit",color:"inherit",cursor:"pointer",display:"inherit",flexDirection:"inherit",flexWrap:"inherit",gap:"inherit",justifyContent:"inherit",textDecoration:"none",...l,...o};return d.origin!==location.origin||co.includes(d.pathname.split("/")[1])?(0,i.jsx)("a",{href:d.href,rel:"noreferrer",style:c,target:"_blank",...r,children:e}):(0,i.jsx)(Ui.N_,{replace:n,style:c,to:{pathname:v(lo.HEAVENT_APPLICATION_BASENAME)?d.pathname.replace(new RegExp(`^/${lo.HEAVENT_APPLICATION_BASENAME}`,"gm"),""):d.pathname,hash:d.hash,search:d.search},...r,children:e})};function Io(e){return(0,Fi.A)(e)}fo.displayName="LinkWrapper";const _o=e=>{const t=e.iconStyle??"regular",n={};e.primaryColor&&(n["--fa-primary-color"]=e.primaryColor),e.secondaryColor&&(n["--fa-secondary-color"]=e.secondaryColor,n["--fa-secondary-opacity"]="1");const o=()=>(0,i.jsx)("i",{"aria-hidden":e["aria-hidden"]??!0,className:`fa-${t} fa-${e.icon} ${e.className||""}`,role:e.role,style:{...n,cursor:e.title?"help":"inherit"},title:e.title,onClick:e.to?void 0:e.onClick});return e.to?(0,i.jsx)(fo,{target:e.target,to:e.to,onClick:e.onClick,children:o()}):o()},yo=e=>(0,r.createElement)("svg",{width:e.width,height:e.height,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",className:"lds-rolling","data-testid":"loader",style:{background:"none"}},(0,r.createElement)("circle",{cx:"50",cy:"50",fill:"none",stroke:e.color,strokeWidth:e.strokeWidth,r:"16",strokeDasharray:"75.39822368615503 27.132741228718345",transform:"rotate(120 50 50)"},(0,r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 50 50;360 50 50",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))),xo=(0,r.memo)(function(){return(0,i.jsx)(G,{align:"center",height:1,justify:"center",width:1,children:(0,i.jsx)(yo,{color:"#162131",height:"200px",strokeWidth:"2",width:"200px"})})}),So={alignItems:"center",borderRadius:"$1",cursor:"pointer",display:"flex",fontWeight:"$semiBold",gap:"$2",padding:"$1 $4",userSelect:"none","& .loader":{borderRadius:"$1"},variants:{color:{primary:{background:"$primaryCustom500",border:"1px solid $primaryCustom500",color:"white","&:hover":{background:"$primaryCustom600",border:"1px solid $primaryCustom600"},"& .loader":{background:"$primaryCustom500",border:"1px solid $primaryCustom500"},"& .loader:hover":{background:"$primary600",border:"1px solid $primary600"}},gray:{background:"$gray100",border:"1px solid $gray100",color:"$gray800","&:hover":{background:"$gray100",border:"1px solid $gray100"},"& .loader":{background:"$gray100",border:"1px solid $gray100"},"& .loader:hover":{background:"$gray100",border:"1px solid $gray100"}},white:{background:"white",border:"1px solid $gray300",color:"$grayCustom700","&:hover":{background:"$grayCustom50",color:"$grayCustom800"},"& .loader":{background:"white",border:"1px solid $gray300"},"& .loader:hover":{background:"$gray50",color:"$gray800"}},error:{background:"$error600",border:"1px solid $error600",color:"white","&:hover":{background:"$error700",border:"1px solid $error600"},"& .loader":{background:"$error600",border:"1px solid $error600"},"& .loader:hover":{background:"$error700",border:"1px solid $error600"}},invisible:{background:"none",border:"none",color:"$primaryCustom500",fontSize:"$textSm",fontWeight:"$medium",padding:"$1 $2","&:hover":{color:"$primaryCustom600"},"& .h-button-content:has( + .loader)":{color:"transparent"}},"invisible-gray":{background:"none",border:"none",color:"$gray700",fontSize:"$textSm",fontWeight:"$medium",padding:"$1 $2","&:hover":{color:"$gray900"},"& .h-button-content:has( + .loader)":{color:"transparent"}}},disabled:{true:{cursor:"not-allowed"}},size:{sm:{height:"32px",fontSize:"$textSm"},md:{height:"40px",fontSize:"$textSm"},lg:{height:"44px",fontSize:"$textMd"},xl:{height:"48px",fontSize:"$textMd"},"2xl":{height:"60px",fontSize:"$textLg"}},iconOnly:{true:{justifyContent:"center",px:"0"}}},compoundVariants:[{color:"primary",disabled:!0,css:{color:"$gray400",background:"$gray100",border:"1px solid $gray100","&:hover":{background:"$gray100",border:"1px solid $gray100"},"& .loader":{background:"$gray100",border:"1px solid $gray100"},"& .loader:hover":{background:"$gray100",border:"1px solid $gray100"}}},{color:"gray",disabled:!0,css:{background:"$gray50",border:"1px solid $gray50",color:"$gray400","&:hover":{background:"$gray50",border:"1px solid $gray50"},"& .loader":{background:"$gray50",border:"1px solid $gray50"},"& .loader:hover":{background:"$gray50",border:"1px solid $gray50"}}},{color:"transparent",disabled:!0,css:{color:"$gray400",background:"$primary100",border:"1px solid $primary100","&:hover":{color:"$gray400",background:"$primary100",border:"1px solid $primary100"},"& .loader":{background:"$primary100",border:"1px solid $primary100"},"& .loader:hover":{background:"$primary100",border:"1px solid $primary100"}}},{color:"invisible",disabled:!0,css:{color:"$gray400","&:hover":{color:"$gray400"}}},{color:"invisible-gray",disabled:!0,css:{color:"$gray400","&:hover":{color:"$gray400"}}},{color:"error",disabled:!0,css:{background:"$error200",border:"1px solid $error200","&:hover":{background:"$error200",border:"1px solid $error200"},"& .loader":{background:"$error200",border:"1px solid $error200"},"& .loader:hover":{background:"$error200",border:"1px solid $error200"}}},{size:"sm",iconOnly:!0,css:{width:"32px"}},{size:"md",iconOnly:!0,css:{width:"40px"}},{size:"lg",iconOnly:!0,css:{width:"44px"}},{size:"xl",iconOnly:!0,css:{width:"48px"}},{size:"2xl",iconOnly:!0,css:{width:"56px"}}],defaultVariants:{color:"primary",size:"md"}},vo=R("button",So),bo=R("div",So),jo=r.forwardRef(({children:e,className:t,color:n,css:o,disabled:a,featureFlags:s,isLoading:r,leftIcon:d,onClick:l,to:c,rightIcon:u,size:m,textAlign:g=(s?.isV4?"center":void 0),title:h,...p},f)=>{const I=!!d&&!e&&!u||!d&&!e&&!!u,_={className:`button ${t||""}`,color:n,css:{width:s?.isV4?"100%":void 0,...o,position:"relative"},disabled:a,iconOnly:I,size:m,title:h},y={children:e,color:n,leftIcon:d,isLoading:r,rightIcon:u,textAlign:g};return c&&!a?(0,i.jsx)(fo,{style:s?.isV4?{flex:"1"}:void 0,title:h,to:c,onClick:e=>{a||r||l&&l(e)},...p,children:(0,i.jsx)(bo,{..._,ref:f,children:(0,i.jsx)(Ao,{...y})})}):(0,i.jsx)(vo,{..._,ref:f,type:"button",onClick:e=>{a||r||l&&l(e)},...p,children:(0,i.jsx)(Ao,{...y})})});jo.displayName="Button",jo.toString=()=>".button";const Ao=({children:e,color:t,isLoading:n,leftIcon:o,rightIcon:a,textAlign:s})=>(0,i.jsxs)(i.Fragment,{children:[o&&(0,i.jsx)(G,{children:(0,i.jsx)(_o,{icon:o})}),e&&(0,i.jsx)(Li,{className:"h-button-content",css:{flex:"1"},textAlign:s,children:e}),a&&(0,i.jsx)(G,{children:(0,i.jsx)(_o,{icon:a})}),n&&(0,i.jsx)(G,{align:"center",className:"loader",css:{height:"calc(100% + 2px)",left:"-1px",position:"absolute",top:"-1px",width:"calc(100% + 2px)",zIndex:10},justify:"center",children:(0,i.jsx)(yo,{color:t&&"primary"!==t&&"error"!==t?M.colors.gray800.value:"white",height:"40px",strokeWidth:"3",width:"40px"})})]}),Co=r.createContext({});function Eo(){return r.useContext(Co)}const To=(e,t=!0)=>{t&&e?.preventDefault(),e?.nativeEvent?.stopImmediatePropagation(),e?.stopPropagation()};var Oo=n(961);function Ro(e){const t=(0,r.useCallback)(t=>{"Esc"!==t.key&&"Escape"!==t.key||e()},[]);(0,r.useEffect)(()=>(document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}),[])}function Mo(e,t){"production"!==a.Production&&console.warn(`Component ${e} is deprecated, use ${t} instead.`)}const Do=R("dialog",{background:"white",border:"none",display:"flex",flexDirection:"column",overflowY:"auto",padding:"0",variants:{mobile:{true:{height:"100%",width:"100%"},false:{borderRadius:"12px",maxHeight:"calc(100% - 80px)",width:"688px"}}},defaultVariants:{mobile:!1}}),wo=e=>{const t=Oi(),{onClose:n}=Eo();return(0,i.jsxs)(G,{css:{borderTop:e.hideBorder?void 0:"1px solid $gray200",padding:"$6 $7"},gap:"3",justify:"end",children:[!e.hideCancelButton&&(0,i.jsx)(jo,{color:"white",onClick:n,children:t("annuler_48254")}),"function"==typeof e.children?e.children(n):e.children]})},$o=e=>(0,i.jsx)(G,{direction:"column",...U(e),css:{borderTop:e.hideBorder?void 0:"1px solid $gray200",padding:"$5 $7 $7 $7",...e.css},children:e.children}),Po=({icon:e,iconColor:t,children:n,subtitle:o,onClose:a})=>(0,i.jsxs)(G,{children:[(0,i.jsxs)(G,{align:"center",css:{flexGrow:"1",padding:"$6 $7 $5 $7"},gap:"4",children:[(0,i.jsx)(G,{align:"center",css:{border:"1px solid $gray200",borderRadius:"10px",boxShadow:"$xs",color:t||"$gray700",fontSize:"textMd",padding:"$3"},height:48,justify:"center",width:48,children:(0,i.jsx)(_o,{className:"fa-xl",icon:e})}),(0,i.jsxs)(G,{direction:"column",children:[(0,i.jsx)(Li,{font:"gray900 textLg medium",children:n}),v(o)&&(0,i.jsx)(Li,{color:"gray500",children:o})]})]}),a&&(0,i.jsx)(G,{align:"center",css:{color:"$gray500",cursor:"pointer",fontSize:"textMd",padding:"$2",margin:"$3 $3"},height:24,justify:"center",width:24,onClick:a,children:(0,i.jsx)(_o,{className:"fa-xl",icon:"xmark"})})]}),No=({children:e})=>{const{isOpen:t,onClose:n}=Eo();return Ro(n),Mo("common-front/src/designSystem/components/modals/__deprecated/modal/modal.tsx","common-front/src/designSystem/components/modals/base/modal.tsx"),t?(0,Oo.createPortal)((0,i.jsx)(G,{align:"center",css:{background:"rgba(52, 64, 84, 0.7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:"300"},justify:"center",onClick:n,children:(0,i.jsx)(Do,{onClick:e=>To(e,!1),children:e})}),document.body):null},ko=e=>{const[t,n]=r.useState(e.isOpen??!1),o=r.useCallback(()=>{n(!1),e.onClose?.()},[n,e.onClose]);return r.useEffect(()=>{"boolean"==typeof e.isOpen&&n(e.isOpen)},[e.isOpen]),(0,i.jsx)(Co.Provider,{value:{isOpen:t,onClose:o,setIsOpen:n},children:e.children})},zo=e=>{const{setIsOpen:t}=Eo(),n=e.children,o=r.useCallback(e=>{To(e),t(!0),n.props.onClick?.(e)},[t,n]),a=r.useMemo(()=>r.cloneElement(r.Children.only(n),{onClick:o,onKeyPress:o,tabIndex:0}),[n,o]);return(0,i.jsx)(i.Fragment,{children:a})},Lo=e=>{const t=Oi(),n=v(e.content?.[0])?t(e.content[0]):t("ooops_on_a_un_p_56888"),o=((e,t)=>"accreditation_limit_reached"===t?.[0]?[e("_ditez_l_accr_d_66820")]:"delegation_slots_limit_reached"===t?.[0]?[e("la_limite_sur_l_75773")]:"delegation_accreditations_limit_reached"===t?.[0]?[e("la_limite_sur_l_43036")]:"delegation_categories_limit_reached"===t?.[0]?[e("la_limite_sur_l_49480")]:"delegation_profiles_limit_reached"===t?.[0]?[e("la_limite_sur_l_56747")]:"can_not_delete_paired"===t?.[0]?[e("ce_membre_est_d_53903")]:h(t)?t.map(e):[e("une_erreur_est_92333")])(t,e.content);return(0,i.jsx)(ko,{isOpen:!0,onClose:e.onClose,children:(0,i.jsxs)(No,{children:[(0,i.jsx)(Po,{icon:"triangle-exclamation",iconColor:"$error700",children:n}),(0,i.jsx)($o,{css:{color:"$gray500"},hideBorder:!0,children:(0,i.jsxs)(G,{direction:"column",gap:"3",children:[e.content?o.join(" "):e.children,v(e.requestUuid)&&(0,i.jsx)(W,{css:{color:"$gray400",fontSize:"$textXs",userSelect:"text",wordBreak:"break-all"},children:t("r_f_rence_1_92505",e.requestUuid)})]})}),(0,i.jsx)(wo,{hideBorder:!0,hideCancelButton:!0,children:(0,i.jsx)(jo,{color:"error",onClick:e.onClose,children:t("fermer_62479")})})]})})},Fo="heaventRequestUuid";function Uo(e,t){return"object"==typeof e&&null!==e&&Object.defineProperty(e,Fo,{value:t}),e}const Bo=(0,r.createContext)({}),Go=e=>{const[t,n]=(0,r.useState)(!1),[a,s]=(0,r.useState)([]),[d,l]=(0,r.useState)(void 0),c=(0,r.useCallback)((e,t)=>{e&&void 0!==t&&o(t),n(e),s((Array.isArray(t)?t:[]).flatMap(e=>e.isHeaventError?e.message.split("\n"):e.message?.startsWith("db::")?[e.message.substring(4).split(" ")[0]]:[])),l(function(e){const t=e?.[Fo];return"string"==typeof t?t:void 0}(t))},[n,s,l]),u=(0,r.useCallback)(()=>{n(!1),s([]),l(void 0)},[n,s,l]);return(0,i.jsxs)(Bo.Provider,{value:{isError:t,setIsError:c},children:[e.children,t&&(0,i.jsx)(Lo,{content:a,requestUuid:d,onClose:u})]})};var Vo=n(8097);function Wo(e){return new Promise((t,n)=>{!function(e,n,i){const o=document.createElement("script");o.onload=()=>{t(!0)},o.onerror=()=>{i&&i()},o.src=e,document.body.appendChild(o)}(e,0,()=>{n(new Error(`Could not load ${e}`))})})}var qo=n(1343);const Yo={AccreditationChartFragment:{code:"fragment AccreditationChart on Accreditation {\n id\n name\n hasSlots\n willAutoAccredit\n\n slots(includeHidden: true) {\n date\n name\n assignedResources\n delegationsTotalResources\n maxResources\n scannedResources\n wishedResources\n }\n}\n",fragments:[]},AccreditationEmailFragment:{code:"fragment AccreditationEmail on AccreditationsUsersInfo {\n accreditationCategory {\n id\n name\n }\n\n accreditation {\n id\n eventId\n name\n acronym\n description\n icon\n color\n address\n latitude\n longitude\n fields\n }\n\n accreditationSlot {\n id\n name\n date\n }\n}\n",fragments:[]},AccreditationImportFragment:{code:"fragment AccreditationImport on Accreditation {\n id\n name\n\n slots(includeHidden: true) {\n id\n name\n date\n }\n}\n",fragments:[]},AccreditationProfileFragment:{code:"fragment AccreditationProfile on AccreditationsProfile {\n id\n accreditationProfileCategoryId\n name\n description\n acronym\n color\n icon\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationProfileEmailFragment:{code:"fragment AccreditationProfileEmail on AccreditationsProfile {\n id\n name\n\n accreditationProfileCategory {\n name\n }\n}\n",fragments:[]},AccreditationProfileImportFragment:{code:"fragment AccreditationProfileImport on AccreditationsProfile {\n id\n name\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationProfileMatrixFragment:{code:"fragment AccreditationProfileMatrix on AccreditationsProfile {\n id\n name\n color\n assignedResources\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationProfileVolunteerRegistrationFragment:{code:"fragment AccreditationProfileVolunteerRegistration on AccreditationsProfile {\n id\n name\n acronym\n color\n icon\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationSlotMatrixFragment:{code:"fragment AccreditationSlotMatrix on AccreditationsSlot {\n id\n name\n date\n assignedResources\n maxResources\n isBlocked\n\n accreditation {\n id\n accreditationCategoryName\n accreditationDisplay\n acronym\n color\n index\n name\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationSlotStatsFragment:{code:"fragment AccreditationSlotStats on AccreditationsSlot {\n assignedResources\n maxResources\n scannedResources\n wishedResources\n}\n",fragments:[]},AccreditationSlotVolunteerRegistrationFragment:{code:"fragment AccreditationSlotVolunteerRegistration on AccreditationsSlot {\n id\n accreditationId\n name\n date\n isBlocked\n\n accreditation {\n id\n accreditationCategoryId\n acronym\n name\n color\n icon\n hiddenSlotId\n hasSlots\n index\n fields\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationsAccreditationFragment:{code:"fragment AccreditationsAccreditation on Accreditation {\n id\n accreditationCategoryId\n index\n name\n description @include(if: $includeDescription)\n address\n latitude\n longitude\n acronym\n icon\n color\n fillingRate\n maxResources\n assignedResources\n willAutoAccredit\n weezeventIsSynchronized\n fields\n index\n hasDateSlots\n insertedAt\n numberOfSlots\n\n accreditationCategory {\n id\n name\n }\n\n accreditationsCustomFields @include(if: $includeConditions) {\n ...AccreditationsAccreditationCustomField\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n}\n",fragments:["AccreditationsAccreditationCustomFieldFragment"]},AccreditationsAccreditationCustomFieldFragment:{code:"fragment AccreditationsAccreditationCustomField on AccreditationsCustomField {\n conditionValue\n\n customField {\n name\n fieldType\n\n values {\n id\n value\n }\n }\n}\n",fragments:[]},AccreditationsAccreditationSlotFragment:{code:"fragment AccreditationsAccreditationSlot on AccreditationsSlot {\n id\n accreditationCategoryId\n accreditationId\n name\n date\n assignedResources\n fillingRate\n insertedAt\n isHidden\n maxResources\n resourcesByFields(slugs: $customFieldsSlugs) @include(if: $includeResources)\n scannedResources @include(if: $includeResources)\n weezeventChecklistId\n wishedResources @include(if: $includeResources)\n\n accreditation {\n ...AccreditationsAccreditation\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:["AccreditationsAccreditationFragment"]},AccreditationsProfilesProfileFragment:{code:"fragment AccreditationsProfilesProfile on AccreditationsProfile {\n id\n name\n description @include(if: $includeDescription)\n acronym\n color\n icon\n insertedAt\n\n accreditationsSlots @include(if: $includeAccreditations) {\n ...AccreditationSlotVolunteerRegistration\n }\n\n accreditationProfileCategory {\n id\n name\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n}\n",fragments:["AccreditationSlotVolunteerRegistrationFragment"]},AccreditationsSlotFragment:{code:"fragment AccreditationsSlot on AccreditationsSlot {\n id\n accreditationCategoryId\n accreditationId\n eventId\n name\n date\n assignedResources\n maxResources\n isBlocked\n isFull\n\n accreditation {\n id\n accreditationCategoryId\n eventId\n acronym\n name\n color\n icon\n hasSlots\n accreditationDisplay\n hiddenSlotId\n index\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:[]},AssigmentEmailFragment:{code:"fragment AssigmentEmail on PositionsSlotsUsersInfo {\n id\n\n position {\n id\n eventId\n name\n description\n acronym\n color\n address\n latitude\n longitude\n zoom\n range\n layer\n fields\n\n leaders {\n ...LeaderAssignment\n }\n\n category {\n id\n name\n\n leaders {\n ...LeaderAssignment\n }\n }\n\n tags {\n name\n }\n }\n\n positionSlot {\n id\n name\n range\n timeDifferenceMinutes\n }\n}\n",fragments:["LeaderAssignmentFragment"]},AttachCustomFieldFragment:{code:"fragment AttachCustomField on CustomField {\n ...CustomFieldWithCondition\n\n category {\n id\n name\n }\n}\n",fragments:["CustomFieldWithConditionFragment"]},CampaignEditFragment:{code:"fragment CampaignEdit on Campaign {\n name\n state\n campaignType\n sender\n text\n subject\n html\n replyTo\n sendToEveryone\n states\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n tagsIds\n accreditationsCategoriesIds\n accreditationsIds\n accreditationsSlotsIds\n usersInfosIds\n segmentsIds\n scheduledAt\n emailSenderId\n attachments\n includeDuplicateMembersAttachments\n hasCalendarInvite\n calendarInviteName\n calendarInviteStartDate\n calendarInviteStartTime\n calendarInviteEndDate\n calendarInviteEndTime\n scheduleType\n scheduleAnchor\n scheduleOffsetDays\n scheduleBeforeAfter\n scheduleSendTime\n\n documents {\n acl\n key\n name\n size\n }\n}\n",fragments:[]},CampaignEmailRendererFragment:{code:"fragment CampaignEmailRenderer on Campaign {\n subject\n text\n html\n replyTo\n attachments\n includeDuplicateMembersAttachments\n hasCalendarInvite\n calendarInviteName\n calendarInviteStartDate\n calendarInviteStartTime\n calendarInviteEndDate\n calendarInviteEndTime\n\n documents {\n name\n key\n }\n}\n",fragments:[]},CampaignListFragment:{code:"fragment CampaignList on Campaign {\n id\n name\n campaignType\n state\n numberOfRecipients\n cost\n sentAt\n scheduledAt\n\n createdBy {\n nameOrEmail\n }\n}\n",fragments:[]},CampaignUserInfoFragment:{code:'fragment CampaignUserInfo on UsersInfo {\n id\n name\n email\n picture {\n url\n }\n phone: fieldValue(slug: "phone")\n}\n',fragments:[]},CommentFragment:{code:"fragment Comment on Comment {\n id\n content\n insertedAt\n\n event {\n name\n }\n\n writtenBy {\n id\n email\n\n userInfo(organizationId: $organizationId) {\n ...UserInfoNameAndPicture\n nameOrEmail\n }\n }\n}\n",fragments:["UserInfoNameAndPictureFragment"]},ConditionCustomFieldFragment:{code:"fragment ConditionCustomField on CustomField {\n id\n name\n slug\n fieldType\n fileType\n canSelectMultiple\n\n values {\n id\n value\n }\n}\n",fragments:[]},ConditionsCustomFieldsFragment:{code:"fragment ConditionsCustomFields on Organization {\n conditionsCustomFields: customFields(\n eventId: $eventId\n variety: UserInfo\n privacy: All\n fieldTypes: [Checkbox, Select]\n sort: { attribute: Name, direction: Asc }\n ) {\n nodes {\n ...ConditionCustomField\n }\n }\n}\n",fragments:["ConditionCustomFieldFragment"]},CreateAccreditationEventFragment:{code:"fragment CreateAccreditationEvent on Event {\n startAt\n endAt\n layer\n isWeezeventConnected\n\n accreditationsCategories {\n id\n name\n }\n}\n",fragments:[]},CreateAccreditationProfileEventFragment:{code:"fragment CreateAccreditationProfileEvent on Event {\n accreditationsCategories {\n id\n name\n\n accreditations {\n id\n name\n acronym\n accreditationDisplay\n index\n color\n icon\n hasSlots\n\n slots(includeHidden: true) {\n id\n name\n date\n }\n }\n }\n\n accreditationsProfilesCategories {\n id\n name\n }\n}\n",fragments:[]},CreateCampaignEmailSenderFragment:{code:"fragment CreateCampaignEmailSender on EmailsSender {\n id\n name\n isValidToSendEmail\n}\n",fragments:[]},CreateCustomFieldInfosFragment:{code:"fragment CreateCustomFieldInfos on Organization {\n # the fields a condition can depend on, of every variety: the form keeps those of its own\n customFields(\n eventId: $eventId\n privacy: All\n fieldTypes: [Checkbox, Country, Language, Nationality, Select]\n ) {\n nodes {\n id\n organizationId\n eventId\n variety\n name\n label\n fieldProperty\n fieldType\n listType\n\n values {\n id\n value\n color\n }\n }\n }\n\n # the fields an Address field can fill, of every variety: the form keeps those of its own\n addressLinksCustomFields: customFields(\n eventId: $eventId\n privacy: All\n fieldTypes: [Text, Country]\n ) {\n nodes {\n id\n organizationId\n eventId\n name\n label\n variety\n fieldType\n }\n }\n\n customFieldsCategories {\n nodes {\n id\n name\n }\n }\n}\n",fragments:[]},CreateDelegationEventFragment:{code:"fragment CreateDelegationEvent on Event {\n campaigns(states: [Template]) {\n nodes {\n id\n name\n }\n }\n\n customDocuments {\n slug\n name\n }\n\n delegationsSpaceLayouts {\n id\n name\n }\n\n forms {\n nodes {\n ...CreateDelegationForm\n }\n }\n\n accreditationsProfilesCategories {\n id\n name\n\n accreditationsProfiles {\n id\n name\n color\n icon\n }\n }\n\n ...EventAccreditations\n}\n",fragments:["CreateDelegationFormFragment","EventAccreditationsFragment"]},CreateDelegationFormFragment:{code:"fragment CreateDelegationForm on Form {\n id\n name\n}\n",fragments:[]},CreatePositionEventFragment:{code:"fragment CreatePositionEvent on Event {\n startAt\n endAt\n layer\n latitude\n longitude\n isWeezeventConnected\n\n positionsCategories(scoped: true) {\n id\n name\n }\n\n traces {\n ...Trace\n }\n}\n",fragments:["TraceFragment"]},CreatePositionTagsFragment:{code:"fragment CreatePositionTags on Organization {\n tags {\n nodes {\n id\n name\n }\n }\n}\n",fragments:[]},CreateUpdateEventInfosFragment:{code:"fragment CreateUpdateEventInfos on Organization {\n name\n weezeventOrganizationId\n\n eventCustomFields: customFields(variety: Event) {\n nodes {\n ...AttachCustomField\n }\n }\n\n emailsSenders(isValidToSendEmail: true) {\n id\n name\n }\n\n tags {\n nodes {\n id\n name\n }\n }\n\n groups {\n nodes {\n id\n name\n }\n }\n}\n",fragments:["AttachCustomFieldFragment"]},CreateUpdateMemberFormFragment:{code:"fragment CreateUpdateMemberForm on Form {\n id\n name\n isEditableInMemberSpace\n description\n positionTitle\n positionSubtitle\n accreditationTitle\n accreditationSubtitle\n informationTitle\n registerButtonText\n\n ...FormSlotsOptions\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n elements {\n ...FormElementDisplay\n }\n\n customSlotsPeriods {\n ...FormRegisterCustomSlotPeriod\n }\n}\n",fragments:["FormSlotsOptionsFragment","FormMissionsOptionsFragment","FormAccreditationsOptionsFragment","FormElementDisplayFragment","FormRegisterCustomSlotPeriodFragment"]},CreatedByFragment:{code:"fragment CreatedBy on UsersInfo {\n ...UserInfoContactInformation\n}\n",fragments:["UserInfoContactInformationFragment"]},CustomBadgeVolunteerRegistrationFragment:{code:"fragment CustomBadgeVolunteerRegistration on VolunteersRegistration {\n localId\n state\n isLeader\n utid\n ticketId\n weezevent\n segmentsIds(usedInCustomDocument: true)\n\n userInfo {\n id\n localId\n email\n name\n fields(expand: true)\n registrationDate(eventId: $eventId)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n\n formsUsersInfos(eventId: $eventId, level: Event) {\n formId\n\n slots {\n range\n }\n }\n }\n\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n\n accreditationsUsersInfos {\n ...AccreditationEmail\n }\n\n positionsSlotsUsersInfos {\n ...AssigmentEmail\n }\n}\n",fragments:["UserInfoLinksFragment","AccreditationProfileEmailFragment","DelegationEmailFragment","AccreditationEmailFragment","AssigmentEmailFragment"]},CustomDocumentPopulationFragment:{code:"fragment CustomDocumentPopulation on CustomDocument {\n id\n slug\n name\n populationsIds\n shouldRegenerateTicketIdOnDownload\n}\n",fragments:[]},CustomFieldFragment:{code:"fragment CustomField on CustomField {\n id\n slug\n name\n label\n variety\n fieldProperty\n fieldType\n isPrivate\n isEncrypted\n hasCondition\n conditionCustomFieldId\n dependencies\n numberOfTimesUsed\n canDelete\n isSelectV2\n insertedAt\n\n category {\n id\n name\n }\n\n conditionCustomField {\n name\n }\n\n createdBy {\n id\n ...CreatedBy\n }\n\n values {\n id\n value\n }\n}\n",fragments:["CreatedByFragment"]},CustomFieldImportFragment:{code:"fragment CustomFieldImport on CustomField {\n id\n name\n slug\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n canSelectMultiple\n validationRules\n\n category {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},CustomFieldWithConditionFragment:{code:"fragment CustomFieldWithCondition on CustomField {\n id\n name\n label\n description\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n isPrivate\n hasCondition\n conditionValue\n canSelectMultiple\n slug\n isSelectV2\n canBeUpdatedByUrl\n validationRules\n\n conditionCustomField {\n id\n name\n fieldType\n fieldProperty\n canSelectMultiple\n slug\n }\n\n addressPostalCodeCustomField {\n id\n slug\n }\n\n addressCityCustomField {\n id\n slug\n }\n\n addressCountryCustomField {\n id\n slug\n }\n\n document {\n url\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},DelegationAccreditationProfileFragment:{code:"fragment DelegationAccreditationProfile on DelegationAccreditationProfile {\n accreditationProfileId\n assignedResources\n isFull\n maxResources\n}\n",fragments:[]},DelegationAccreditationProfileStatsFragment:{code:"fragment DelegationAccreditationProfileStats on DelegationAccreditationProfile {\n accreditationProfileId\n assignedResources\n maxResources\n wishedResources\n}\n",fragments:[]},DelegationAccreditationSlotFragment:{code:"fragment DelegationAccreditationSlot on DelegationAccreditationSlot {\n accreditationCategoryId\n accreditationId\n accreditationSlotId\n isDefault\n isFull\n isVisible\n assignedResources\n maxResources\n willAutoAccredit\n\n accreditationSlot {\n date\n isBlocked\n isFull\n }\n}\n",fragments:[]},DelegationAccreditationSlotStatsFragment:{code:"fragment DelegationAccreditationSlotStats on DelegationAccreditationSlot {\n accreditationCategoryId\n accreditationSlotId\n accreditationId\n assignedResources\n maxResources\n resourcesByFields\n scannedResources\n wishedResources\n}\n",fragments:[]},DelegationAccreditationsSlotsFragment:{code:"fragment DelegationAccreditationsSlots on Delegation {\n accreditationsProfiles {\n ...DelegationAccreditationProfile\n }\n\n accreditationsSlots {\n ...DelegationAccreditationSlot\n }\n}\n",fragments:["DelegationAccreditationProfileFragment","DelegationAccreditationSlotFragment"]},DelegationEmailFragment:{code:'fragment DelegationEmail on Delegation {\n id\n organizationId\n eventId\n formId\n name\n fields\n\n category: delegationCategory {\n id\n name\n }\n\n leaders {\n email\n name\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n phone: fieldValue(slug: "phone")\n }\n}\n',fragments:[]},DelegationUserProfileFragment:{code:"fragment DelegationUserProfile on Delegation {\n id\n name\n event {\n id\n name\n }\n}\n",fragments:[]},DelegationsDelegationFragment:{code:"fragment DelegationsDelegation on Delegation {\n id\n organizationId\n eventId\n name\n description @include(if: $includeDescription)\n state\n deadlineDate\n numberOfResources @include(if: $includeResources)\n maxResources\n fillingRate @include(if: $includeResources)\n showInDelegationSpace\n fields\n canLeadersAddMembers\n canLeadersEditMembers\n canLeadersDeleteMembers\n canLeadersDuplicateMembers\n canLeadersEditColumns\n canLeadersEditCustomFields\n canLeadersImportMembers\n canLeadersSeeHiddenAccreditationsSlots\n showFormLinkInDelegationSpace\n showAllAccreditations\n lockedAt\n usedCustomFieldsFilled @include(if: $includeUsedCustomFieldsFilled)\n insertedAt\n\n accreditationsSlots @include(if: $includeAccreditations) {\n accreditationSlot {\n ...AccreditationSlotVolunteerRegistration\n }\n }\n\n accreditationsProfiles @include(if: $includeAccreditationsProfiles) {\n ...DelegationAccreditationProfileStats\n\n accreditationProfile {\n ...AccreditationProfileVolunteerRegistration\n }\n }\n\n campaigns @include(if: $includeCampaigns) {\n id\n name\n }\n\n children @include(if: $includeChildren) {\n event {\n id\n name\n }\n }\n\n parent @include(if: $includeParent) {\n id\n name\n }\n\n customDocuments @include(if: $includeDocuments) {\n slug\n name\n }\n\n delegationCategory {\n id\n name\n\n leaders @include(if: $includeLeaders) {\n userInfo {\n id\n email\n name\n nameOrEmail\n }\n }\n }\n\n delegationsSpaceLayout @include(if: $includeLayout) {\n id\n name\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n form {\n id\n name\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n\n leaders @include(if: $includeLeaders) {\n id\n email\n name\n nameOrEmail\n }\n\n allAccreditationsSlots @include(if: $includeAccreditationsSlots) {\n ...DelegationAccreditationSlotStats\n }\n}\n",fragments:["AccreditationSlotVolunteerRegistrationFragment","DelegationAccreditationProfileStatsFragment","AccreditationProfileVolunteerRegistrationFragment","DelegationAccreditationSlotStatsFragment"]},DelegationsSpaceLayoutTabFragment:{code:"fragment DelegationsSpaceLayoutTab on DelegationsSpaceLayoutsTab {\n id\n name\n description\n slug\n isVisible\n isPinned\n segmentType\n rendering\n infos\n}\n",fragments:[]},DesignColorsFragment:{code:"fragment DesignColors on Design {\n colors {\n grayCustom50\n grayCustom500\n grayCustom700\n grayCustom800\n grayCustom900\n primaryCustom500\n primaryCustom600\n }\n}\n",fragments:[]},DocumentAsoPaxManifestFragment:{code:"fragment DocumentAsoPaxManifest on Query {\n event(id: $eventId) {\n name\n\n accreditationSlot(id: $accreditationSlotId) {\n id\n name\n date\n maxResources\n\n accreditation {\n id\n name\n }\n\n links {\n asoPaxManifestLink\n }\n\n volunteersRegistrations {\n id\n\n userInfo {\n id\n fields(expand: true)\n }\n }\n }\n }\n}\n",fragments:[]},DocumentDelegationCalendarFragment:{code:"fragment DocumentDelegationCalendar on Event {\n startAt\n endAt\n\n document(documentType: DelegationCalendar) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n delegation(id: $delegationId) {\n ...DelegationEmail\n\n allAccreditationsSlots(onlyVisible: $onlyVisible) {\n assignedResources\n\n accreditationSlot {\n id\n date\n name\n }\n\n accreditation {\n name\n color\n index\n }\n }\n\n links {\n delegationCalendarLink\n }\n }\n}\n",fragments:["DelegationEmailFragment"]},DocumentEmailPreviewFragment:{code:"fragment DocumentEmailPreview on Document {\n id\n acl\n key\n name\n size\n url\n}\n",fragments:[]},DocumentPositionPlanningFragment:{code:'fragment DocumentPositionPlanning on Event {\n startAt\n endAt\n dayStartTime\n\n document(documentType: PositionPlanning) {\n id\n options\n }\n\n position(id: $positionId) {\n name\n range\n color\n\n links {\n positionPlanningLink\n }\n\n slots {\n id\n name\n range\n }\n }\n\n volunteersRegistrations(positionId: $positionId, sort: { attribute: "Name", direction: Asc }) {\n nodes {\n id\n\n userInfo {\n name\n\n phone {\n internationalFormat\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlotId\n }\n }\n }\n}\n',fragments:[]},DocumentPositionSheetFragment:{code:"fragment DocumentPositionSheet on Query {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n }\n\n event(id: $eventId) {\n document(documentType: Position) {\n id\n options\n }\n\n position(id: $positionId) {\n ...PositionPdfInfos\n\n links {\n positionSheetLink\n }\n\n slots {\n id\n name\n range\n }\n }\n\n volunteersRegistrations(states: [Assigned], positionId: $positionId) {\n nodes {\n ...VolunteerPdf\n\n positionsSlotsUsersInfos {\n positionSlotId\n }\n }\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment","PositionPdfInfosFragment","VolunteerPdfFragment"]},DocumentPositionsPlanningFragment:{code:"fragment DocumentPositionsPlanning on Event {\n name\n\n positionsSlots(segmentId: $segmentId, date: $date) {\n nodes {\n id\n positionId\n name\n range\n\n position {\n id\n name\n color\n }\n }\n }\n\n segment(id: $segmentId) {\n name\n }\n}\n",fragments:[]},DocumentPositionsVolunteersPlanningFragment:{code:"fragment DocumentPositionsVolunteersPlanning on Event {\n name\n\n positionsSlots(segmentId: $segmentId) {\n nodes {\n id\n range\n\n position {\n id\n name\n acronym\n }\n }\n }\n\n segment(id: $segmentId) {\n name\n }\n\n volunteersRegistrations(states: [Assigned]) {\n nodes {\n id\n\n userInfo {\n ...UserInfoContactInformation\n }\n\n positionsSlotsUsersInfos {\n positionSlotId\n }\n }\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},DocumentUserAssignmentsFragment:{code:"fragment DocumentUserAssignments on Query {\n organization(id: $organizationId) {\n id\n\n customFields(eventId: $eventId, variety: Position, privacy: Public) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n\n userInfo(id: $userInfoId) {\n ...UserInfoDocument\n }\n }\n\n event(id: $eventId) {\n id\n name\n\n document(documentType: Assignments) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n id\n localId\n ticketId\n weezevent\n\n # For the {user.profile} and {user.delegation.*} of the texts.\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n\n preassignPositions {\n name\n }\n\n preassignPositionsCategories {\n name\n }\n\n positionsSlotsUsersInfos {\n ...AssigmentEmail\n }\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment","UserInfoDocumentFragment","AccreditationProfileEmailFragment","DelegationEmailFragment","AssigmentEmailFragment"]},DocumentUserBadgeFragment:{code:'fragment DocumentUserBadge on Event {\n document(documentType: Badge) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n ...UserInfoContactInformation\n nameOrEmail\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userBadgeLink\n }\n }\n\n positionsSlotsUsersInfos {\n position {\n name\n }\n\n positionSlot {\n range\n }\n }\n }\n}\n',fragments:["UserInfoContactInformationFragment"]},DocumentUserCertificateFragment:{code:'fragment DocumentUserCertificate on Event {\n document(documentType: Certificate) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n nameOrEmail\n name\n dateOfBirth: fieldValue(slug: "dateOfBirth")\n street: fieldValue(slug: "street")\n city: fieldValue(slug: "city")\n postalCode: fieldValue(slug: "postalCode")\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userCertificateLink\n }\n }\n\n positionsSlotsUsersInfos {\n position {\n name\n }\n\n positionSlot {\n range\n }\n }\n }\n}\n',fragments:[]},DocumentUserCustomBadgeFragment:{code:"fragment DocumentUserCustomBadge on Event {\n id\n name\n startAt\n weezevent\n\n tags {\n name\n }\n\n document(documentType: CustomBadge, customBadge: $customBadge) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n ...CustomBadgeVolunteerRegistration\n }\n}\n",fragments:["CustomBadgeVolunteerRegistrationFragment"]},DocumentUserCustomBadgesFragment:{code:"fragment DocumentUserCustomBadges on Event {\n id\n name\n startAt\n weezevent\n fields\n\n tags {\n name\n }\n\n document(documentType: CustomBadge, customBadge: $customBadge) {\n id\n options\n }\n\n volunteersRegistrations(segmentId: $segmentId) {\n nodes {\n ...CustomBadgeVolunteerRegistration\n }\n }\n}\n",fragments:["CustomBadgeVolunteerRegistrationFragment"]},DocumentUserPlanningFragment:{code:"fragment DocumentUserPlanning on Event {\n startAt\n endAt\n dayStartTime\n\n document(documentType: UserPlanning) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n id\n localId\n ticketId\n weezevent\n\n # For the {user.profile} and {user.delegation.*} of the texts.\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n\n userInfo {\n ...UserInfoDocument\n }\n\n positionsSlotsUsersInfos {\n ...PsuiUserPlanning\n }\n }\n}\n",fragments:["AccreditationProfileEmailFragment","DelegationEmailFragment","UserInfoDocumentFragment","PsuiUserPlanningFragment"]},DocumentUserPlanningDaysFragment:{code:'fragment DocumentUserPlanningDays on Event {\n document(documentType: UserPlanningDays) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n nameOrEmail\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userPlanningDaysLink\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlot {\n range\n }\n\n position {\n id\n organizationId\n name\n address\n }\n }\n }\n}\n',fragments:[]},DocumentUserPlanningListFragment:{code:'fragment DocumentUserPlanningList on Event {\n document(documentType: UserPlanningList) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n nameOrEmail\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userPlanningListLink\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlot {\n name\n range\n }\n\n position {\n name\n }\n }\n }\n}\n',fragments:[]},DocumentUsersHoursFragment:{code:"fragment DocumentUsersHours on Event {\n timeZone\n\n document(documentType: UserHours) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n positionsSlotsUsersInfos {\n ...PsuiUserHours\n }\n\n userInfo {\n ...UserInfoDocument\n }\n }\n}\n",fragments:["PsuiUserHoursFragment","UserInfoDocumentFragment"]},DocumentUsersListingFragment:{code:"fragment DocumentUsersListing on Query {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n }\n\n event(id: $eventId) {\n document(documentType: VolunteersListing) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n segment(id: $segmentId) {\n name\n\n links {\n usersListingLink\n }\n }\n\n volunteersRegistrations(segmentId: $segmentId) {\n nodes {\n ...VolunteerPdf\n }\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment","VolunteerPdfFragment"]},DocumentUsersPicturesFragment:{code:'fragment DocumentUsersPictures on Query {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n }\n\n event(id: $eventId) {\n document(documentType: UsersPictures) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n segment(id: $segmentId) {\n name\n\n links {\n usersPicturesLink\n }\n }\n\n volunteersRegistrations(\n segmentId: $segmentId\n sort: { attribute: "Name", direction: Asc }\n ) {\n nodes {\n userInfo {\n id\n ...UserInfoContactInformation\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n fields\n }\n }\n }\n }\n}\n',fragments:["CustomFieldWithConditionFragment","UserInfoContactInformationFragment"]},DocumentUsersPlanningFragment:{code:"fragment DocumentUsersPlanning on VolunteersRegistration {\n id\n state\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n\n positionsSlotsUsersInfos(positionId: $positionId) {\n positionCategory {\n name\n }\n\n positionSlot {\n id\n name\n range\n }\n\n position {\n id\n name\n color\n icon\n }\n }\n\n slots {\n range\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},EmailRecipientFragment:{code:"fragment EmailRecipient on Email {\n id\n state\n sentAt\n infos\n\n userInfo {\n ...CampaignUserInfo\n }\n}\n",fragments:["CampaignUserInfoFragment"]},EmailSenderEmailRendererFragment:{code:"fragment EmailSenderEmailRenderer on EmailsSender {\n fromName\n fromEmail\n replyTo\n signature\n\n header {\n key\n }\n\n picture {\n key\n }\n\n footer {\n key\n }\n}\n",fragments:[]},EmailTemplateEmailRendererFragment:{code:"fragment EmailTemplateEmailRenderer on EmailsTemplate {\n useDefault\n subject\n content\n attachments\n hasCalendarInvite\n calendarInviteName\n calendarInviteStartDate\n calendarInviteStartTime\n calendarInviteEndDate\n calendarInviteEndTime\n}\n",fragments:[]},EventAccreditationsFragment:{code:"fragment EventAccreditations on Event {\n accreditationsCategories {\n id\n name\n\n accreditations {\n id\n accreditationCategoryId\n name\n color\n icon\n accreditationCategoryName\n accreditationDisplay\n hasSlots\n hiddenSlotId\n index\n\n slots(includeHidden: true) {\n id\n accreditationId\n name\n date\n }\n }\n }\n}\n",fragments:[]},EventCreateUpdateMemberFragment:{code:"fragment EventCreateUpdateMember on Event {\n id\n name\n startAt\n endAt\n dayStartTime\n ranges(formId: $formId, delegationId: $delegationId)\n country\n fields\n\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n\n accreditationsProfilesCategories {\n ...FormRegisterAccreditationProfileCategory\n }\n\n positionsCategories {\n ...FormRegisterCategory\n }\n}\n",fragments:["FormRegisterAccreditationCategoryFragment","FormRegisterAccreditationProfileCategoryFragment","FormRegisterCategoryFragment"]},EventDelegationsExportFragment:{code:"fragment EventDelegationsExport on Event {\n languages\n\n segmentsFolders(segmentType: Delegations) {\n id\n name\n\n segments {\n id\n name\n }\n }\n}\n",fragments:[]},EventEmailRendererFragment:{code:"fragment EventEmailRenderer on Event {\n id\n organizationId\n name\n languages\n timeZone\n startAt\n endAt\n fields\n\n customDocuments {\n slug\n }\n}\n",fragments:[]},EventPositionsExportFragment:{code:"fragment EventPositionsExport on Event {\n languages\n\n segmentsFolders(segmentType: Positions) {\n id\n name\n\n segments {\n id\n name\n }\n }\n}\n",fragments:[]},EventVolunteersExportFragment:{code:"fragment EventVolunteersExport on Event {\n languages\n\n segmentsFolders(segmentType: Volunteers) {\n id\n name\n\n segments {\n id\n name\n }\n }\n}\n",fragments:[]},EventsEventFragment:{code:"fragment EventsEvent on Event {\n id\n name\n description @include(if: $includeDescription)\n state\n startAt\n endAt\n fields\n insertedAt\n numberOfMembers @include(if: $includeNumberOfMembers)\n numberOfMembersAccredited @include(if: $includeNumberOfMembers)\n numberOfMembersAssigned @include(if: $includeNumberOfMembers)\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n tags {\n id\n name\n }\n}\n",fragments:[]},ExistingVolunteerFragment:{code:"fragment ExistingVolunteer on UsersInfo {\n id\n ...UserInfoContactInformation\n nameOrEmail\n}\n",fragments:["UserInfoContactInformationFragment"]},FormAccreditationsOptionsFragment:{code:"fragment FormAccreditationsOptions on Form {\n accreditationDisplay\n accreditationFilter\n showFullAccreditation\n hiddenAccreditationsCategoriesIds\n hiddenAccreditationsIds\n hiddenAccreditationsSlotsIds\n displayedAccreditationsCategoriesIds\n displayedAccreditationsIds\n displayedAccreditationsSlotsIds\n showAccreditationDescription\n slotDisplay\n\n accreditationsFormCustomFields {\n accreditationsSlotsIds\n isMandatory\n\n customField {\n ...CustomFieldWithCondition\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment"]},FormCustomFieldFragment:{code:"fragment FormCustomField on CustomField {\n id\n slug\n eventId\n name\n label\n fieldType\n listType\n fieldProperty\n\n category {\n id\n name\n }\n\n conditionCustomField {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},FormCustomFieldsFragment:{code:"fragment FormCustomFields on Organization {\n formCustomFields: customFields(\n eventId: $eventId\n variety: UserInfo\n privacy: Public\n sort: { attribute: Name, direction: Asc }\n ) {\n nodes {\n ...FormCustomField\n }\n }\n}\n",fragments:["FormCustomFieldFragment"]},FormElementDisplayFragment:{code:"fragment FormElementDisplay on FormsElement {\n id\n elementType\n isMandatory\n section\n text\n hasCondition\n conditionValue\n\n conditionCustomField {\n ...CustomFieldWithCondition\n }\n\n customField {\n ...CustomFieldWithCondition\n }\n}\n",fragments:["CustomFieldWithConditionFragment"]},FormElementsElementFragment:{code:"fragment FormElementsElement on FormsElement {\n id\n elementType\n customFieldId\n section\n text\n isMandatory\n hasCondition\n conditionCustomFieldId\n conditionValue\n}\n",fragments:[]},FormEmailFragment:{code:"fragment FormEmail on FormsUsersInfo {\n teamCode\n\n form {\n id\n areTeamsAllowed\n }\n\n ...WishesEmail\n}\n",fragments:["WishesEmailFragment"]},FormListFragment:{code:"fragment FormList on Form {\n id\n name\n numberOfCustomFields\n}\n",fragments:[]},FormMemberRegistrationFragment:{code:"fragment FormMemberRegistration on Form {\n id\n name\n isEditableInMemberSpace\n\n elements {\n id\n ...FormElementDisplay\n }\n\n ...FormSlotsOptions\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n customSlotsPeriods {\n ...FormRegisterCustomSlotPeriod\n }\n}\n",fragments:["FormElementDisplayFragment","FormSlotsOptionsFragment","FormMissionsOptionsFragment","FormAccreditationsOptionsFragment","FormRegisterCustomSlotPeriodFragment"]},FormMissionsOptionsFragment:{code:"fragment FormMissionsOptions on Form {\n positionDisplay\n positionFilter\n positionRanking\n positionLimit\n showFullPosition\n hiddenPositionsCategoriesIds\n hiddenPositionsIds\n hiddenPositionsSlotsIds\n hiddenPositionsTagsIds\n displayedPositionsCategoriesIds\n displayedPositionsIds\n displayedPositionsSlotsIds\n displayedPositionsTagsIds\n showPositionCategoryDescription\n showPositionDescription\n slotDisplay\n willAutoAssign\n}\n",fragments:[]},FormRegisterAccreditationFragment:{code:"fragment FormRegisterAccreditation on IAccreditation {\n id\n accreditationCategoryId\n name\n description\n color\n icon\n hiddenSlotId\n hasSlots\n accreditationDisplay\n conditionsOperator\n index\n\n slots(includeHidden: true) {\n ...FormRegisterAccreditationSlot\n }\n\n conditionsCustomFields: accreditationsCustomFields {\n conditionValue\n\n customField {\n slug\n fieldType\n canSelectMultiple\n }\n }\n\n formCustomFields {\n isMandatory\n\n customField {\n ...CustomFieldWithCondition\n }\n }\n}\n",fragments:["FormRegisterAccreditationSlotFragment","CustomFieldWithConditionFragment"]},FormRegisterAccreditationCategoryFragment:{code:"fragment FormRegisterAccreditationCategory on IAccreditationsCategory {\n id\n name\n\n accreditations {\n ...FormRegisterAccreditation\n }\n}\n",fragments:["FormRegisterAccreditationFragment"]},FormRegisterAccreditationProfileFragment:{code:"fragment FormRegisterAccreditationProfile on AccreditationsProfile{\n id\n name\n description\n color\n icon\n}\n",fragments:[]},FormRegisterAccreditationProfileCategoryFragment:{code:"fragment FormRegisterAccreditationProfileCategory on AccreditationsProfilesCategory {\n id\n name\n\n accreditationsProfiles {\n ...FormRegisterAccreditationProfile\n }\n}\n",fragments:["FormRegisterAccreditationProfileFragment"]},FormRegisterAccreditationSlotFragment:{code:"fragment FormRegisterAccreditationSlot on IAccreditationsSlot {\n id\n accreditationId\n name\n date\n isBlocked\n isFull\n}\n",fragments:[]},FormRegisterCategoryFragment:{code:"fragment FormRegisterCategory on IPositionsCategory {\n id\n name\n description\n\n positions {\n ...FormRegisterPosition\n }\n}\n",fragments:["FormRegisterPositionFragment"]},FormRegisterCustomSlotFragment:{code:"fragment FormRegisterCustomSlot on CustomSlot {\n name\n startTime\n endTime\n}\n",fragments:[]},FormRegisterCustomSlotPeriodFragment:{code:"fragment FormRegisterCustomSlotPeriod on CustomSlotsPeriod {\n id\n name\n startDate\n endDate\n hideNameDates\n displayAsCalendar\n hasCondition\n conditionCustomFieldId\n conditionValue\n\n conditionCustomField {\n ...CustomFieldWithCondition\n }\n\n customSlots {\n ...FormRegisterCustomSlot\n }\n}\n",fragments:["CustomFieldWithConditionFragment","FormRegisterCustomSlotFragment"]},FormRegisterPositionFragment:{code:"fragment FormRegisterPosition on IPosition {\n id\n positionCategoryId\n name\n description\n acronym\n isVisible\n conditionsOperator\n positionDisplay\n tagsIds\n\n slots {\n ...FormRegisterSlot\n }\n\n conditionsCustomFields: positionsCustomFields {\n conditionValue\n\n customField {\n slug\n fieldType\n canSelectMultiple\n }\n }\n}\n",fragments:["FormRegisterSlotFragment"]},FormRegisterSlotFragment:{code:"fragment FormRegisterSlot on IPositionsSlot {\n id\n positionId\n name\n range\n nameOrRange\n isFull\n}\n",fragments:[]},FormSlotsOptionsFragment:{code:"fragment FormSlotsOptions on Form {\n slotDisplay\n minNumberOfSlots\n daysDisplay\n slotTitle\n slotSubtitle\n}\n",fragments:[]},FormUserInfoUserProfileFragment:{code:"fragment FormUserInfoUserProfile on FormsUsersInfo {\n organizationId\n eventId\n formId\n insertedAt\n teamCode\n\n teamMembers {\n ...UserInfoTeamMember\n }\n}\n",fragments:["UserInfoTeamMemberFragment"]},FormUserInfoWishedFragment:{code:"fragment FormUserInfoWished on UsersInfo {\n formUserInfo(formId: $formId) {\n insertedAt\n formId\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n accreditationsSlotsIds\n\n form {\n ...FormMemberRegistration\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n }\n }\n\n positionsSlots {\n nameOrRange\n\n position {\n id\n name\n }\n }\n\n positions {\n id\n name\n range\n }\n\n positionsCategories {\n id\n name\n range\n }\n\n slots {\n startDate\n startTime\n endDate\n endTime\n }\n }\n}\n",fragments:["FormMemberRegistrationFragment"]},FormUserOverlayFragment:{code:"fragment FormUserOverlay on Form {\n id\n name\n\n elements {\n ...FormElementDisplay\n }\n}\n",fragments:["FormElementDisplayFragment"]},FormsUsersInfosWishedFragment:{code:"fragment FormsUsersInfosWished on UsersInfo {\n formsUsersInfos(eventId: $eventId, level: Both) {\n insertedAt\n formId\n eventId\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n accreditationProfileId\n accreditationsSlotsIds\n\n form {\n ...FormMemberRegistration\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n index\n }\n\n accreditationCategory {\n name\n }\n }\n\n positionsSlots {\n nameOrRange\n\n position {\n id\n name\n }\n\n positionCategory {\n name\n }\n }\n\n positions {\n id\n name\n range\n\n category {\n name\n }\n }\n\n positionsCategories {\n id\n name\n range\n }\n\n slots {\n startDate\n startTime\n endDate\n endTime\n range\n }\n }\n}\n",fragments:["FormMemberRegistrationFragment"]},FullPageInfoFragment:{code:"fragment FullPageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n}\n",fragments:[]},HistoryRowFragment:{code:"fragment HistoryRow on History {\n id\n action\n executedBy\n data\n details\n insertedAt\n\n user {\n id\n name\n email\n picture {\n url\n }\n }\n}\n",fragments:[]},LeaderAssignmentFragment:{code:'fragment LeaderAssignment on Leader {\n userInfo {\n id\n name\n email\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n phone: fieldValue(slug: "phone")\n }\n}\n',fragments:[]},LeaderInfosFragment:{code:"fragment LeaderInfos on Leader {\n role {\n id\n name\n }\n\n userInfo {\n ...LeaderUserInfo\n }\n}\n",fragments:["LeaderUserInfoFragment"]},LeaderUserInfoFragment:{code:"fragment LeaderUserInfo on UsersInfo {\n id\n userId\n ...UserInfoContactInformation\n nameOrEmail\n}\n",fragments:["UserInfoContactInformationFragment"]},MassEditCustomFieldFragment:{code:"fragment MassEditCustomField on CustomField {\n id\n name\n label\n slug\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n canSelectMultiple\n validationRules\n\n category {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},MemberAccreditationFragment:{code:"fragment MemberAccreditation on AccreditationsUsersInfo {\n accreditationSlot {\n name\n date\n }\n\n accreditation {\n name\n description\n acronym\n hasSlots\n }\n\n accreditationCategory {\n name\n }\n}\n",fragments:[]},MemberAssignmentFragment:{code:"fragment MemberAssignment on PositionsSlotsUsersInfo {\n position {\n name\n description\n address\n latitude\n longitude\n zoom\n layer\n\n leaders {\n ...LeaderAssignment\n }\n\n category {\n name\n\n leaders {\n ...LeaderAssignment\n }\n }\n\n traces {\n ...Trace\n }\n }\n\n positionSlot {\n range\n }\n}\n",fragments:["LeaderAssignmentFragment","TraceFragment"]},MemberRegistrationUserInfoFragment:{code:"fragment MemberRegistrationUserInfo on UsersInfo {\n id\n userId\n ...UserInfoContactInformation\n nameOrEmail\n fields\n}\n",fragments:["UserInfoContactInformationFragment"]},OrganizationAdminInfosFragment:{code:"fragment OrganizationAdminInfos on Organization {\n name\n adminName\n adminEmail\n street\n postalCode\n city\n country\n timeZone\n emailSenderId\n dateFormat\n datetimeFormat\n timeFormat\n\n emailsSenders(isValidToSendEmail: true) {\n id\n name\n }\n}\n",fragments:[]},OrganizationBackofficeFragment:{code:"fragment OrganizationBackoffice on Organization {\n customBadges\n features\n id\n insertedAt\n isBlocked\n name\n numberOfEvents\n periodEndAt\n weezeventOrganizationId\n useOldBilling\n membersLimit\n pricePerMember\n billingComment\n\n membersStats {\n numberOfMembers\n }\n\n membersStats2024: membersStats(year: 2024) {\n numberOfMembers\n }\n\n users {\n id\n email\n }\n}\n",fragments:[]},OrganizationCertificateDefaultFragment:{code:"fragment OrganizationCertificateDefault on Organization {\n name\n adminName\n street\n city\n postalCode\n country\n}\n",fragments:[]},OrganizationCustomFieldsFragment:{code:"fragment OrganizationCustomFields on Organization {\n customFields(eventId: $eventId, variety: UserInfo, privacy: All) {\n nodes {\n ...SegmentCustomField\n }\n }\n}\n",fragments:["SegmentCustomFieldFragment"]},OrganizationDelegationsSpaceFragment:{code:"fragment OrganizationDelegationsSpace on IOrganization {\n name\n allowDelegationSpaceDownload\n delegationsSpaceCustomBadges\n\n delegationsSpaceDesign: spaceDesign(spaceType: DelegationSpace) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n}\n",fragments:["DesignColorsFragment"]},OrganizationEmailRendererFragment:{code:"fragment OrganizationEmailRenderer on Organization {\n id\n name\n dateFormat\n datetimeFormat\n timeFormat\n timeZone\n customBadges\n}\n",fragments:[]},OrganizationEventsShowcaseFragment:{code:"fragment OrganizationEventsShowcase on OrganizationPublic {\n eventsShowcaseDesign: spaceDesign(spaceType: EventsShowcase) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n}\n",fragments:["DesignColorsFragment"]},OrganizationMemberFragment:{code:"fragment OrganizationMember on VolunteersRegistration {\n id\n ticketId\n exportedCustomDocumentsSlugs @include(if: $includeCustomDocuments)\n\n delegation {\n name\n }\n\n event {\n id\n name\n }\n\n positionsSlotsUsersInfos{\n positionSlot {\n name\n range\n }\n\n position {\n name\n }\n }\n\n userInfo {\n id\n name\n email\n fields\n\n picture {\n url\n }\n }\n}\n",fragments:[]},OrganizationMemberCustomDocumentFragment:{code:"fragment OrganizationMemberCustomDocument on CustomDocument {\n id\n eventId\n slug\n name\n populationsIds\n shouldRegenerateTicketIdOnDownload\n}\n",fragments:[]},OrganizationMembersSpaceFragment:{code:"fragment OrganizationMembersSpace on Organization {\n name\n\n membersSpaceDesign: spaceDesign(spaceType: MembersSpace) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n\n hideAssignmentsUntilConfirmationEmailSent\n hideAccreditationsUntilConfirmationEmailSent\n membersSpaceExcludeAccreditations\n showMembersSpaceCommunity\n}\n",fragments:["DesignColorsFragment"]},PositionCategoryPositionFragment:{code:"fragment PositionCategoryPosition on Position {\n id\n assignedResources\n name\n range\n resources\n numberOfSlots\n}\n",fragments:[]},PositionPdfInfosFragment:{code:"fragment PositionPdfInfos on Position {\n id\n eventId\n name\n description\n range\n address\n latitude\n longitude\n zoom\n layer\n numberOfSlots\n assignedResources\n acronym\n\n leaders {\n ...LeaderAssignment\n }\n\n category {\n name\n\n leaders {\n ...LeaderAssignment\n }\n }\n}\n",fragments:["LeaderAssignmentFragment"]},PositionPlanningFragment:{code:"fragment PositionPlanning on Position {\n id\n name\n acronym\n color\n icon\n\n category {\n name\n }\n\n slots {\n id\n name\n range\n fillingRate\n assignedResources\n resources\n }\n}\n",fragments:[]},PositionPositionSlotFragment:{code:"fragment PositionPositionSlot on PositionsSlot {\n id\n positionCategoryId\n positionId\n assignedResources\n name\n range\n nameOrRange\n resources\n startDate\n startTime\n endDate\n endTime\n}\n",fragments:[]},PositionPositionsCustomFieldsFragment:{code:"fragment PositionPositionsCustomFields on Position {\n conditionsOperator\n\n conditionsCustomFields: positionsCustomFields {\n conditionValue\n\n customField {\n slug\n fieldType\n canSelectMultiple\n }\n }\n}\n",fragments:[]},PositionPositionsMapFragment:{code:"fragment PositionPositionsMap on Position {\n acronym\n color\n icon\n latitude\n longitude\n}\n",fragments:[]},PositionsPositionFragment:{code:"fragment PositionsPosition on Position {\n id\n name\n description @include(if: $includeDescription)\n range\n resources\n assignedResources\n address\n layer\n zoom\n latitude\n longitude\n acronym\n color\n icon\n isVisible\n state\n fillingRate\n numberOfSlots\n fields\n weezeventIsSynchronized\n insertedAt\n\n checkedInRate @include(if: $includeCheckedInRate)\n checkedOutRate @include(if: $includeCheckedOutRate)\n\n category {\n id\n name\n\n leaders @include(if: $includeLeaders) {\n userInfo {\n id\n name\n email\n nameOrEmail\n }\n }\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n leaders @include(if: $includeLeaders) {\n userInfo {\n id\n name\n email\n nameOrEmail\n }\n }\n\n positionsCustomFields @include(if: $includeConditions) {\n ...PositionsPositionCustomField\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n\n traces @include(if: $includePositionTraces) {\n id\n name\n color\n }\n}\n",fragments:["PositionsPositionCustomFieldFragment"]},PositionsPositionCustomFieldFragment:{code:"fragment PositionsPositionCustomField on PositionsCustomField {\n conditionValue\n\n customField {\n name\n fieldType\n\n values {\n id\n value\n }\n }\n}\n",fragments:[]},PositionsPositionSlotFragment:{code:"fragment PositionsPositionSlot on PositionsSlot {\n id\n name\n startDate\n startTime\n endDate\n endTime\n range\n assignedResources\n resources\n fillingRate\n state\n weezeventChecklistId\n insertedAt\n\n checkedInRate @include(if: $includeCheckedInRate)\n checkedOutRate @include(if: $includeCheckedOutRate)\n\n position {\n ...PositionsPosition\n }\n\n positionCategory {\n id\n name\n }\n}\n",fragments:["PositionsPositionFragment"]},PrintTriggerFormEventFragment:{code:"fragment PrintTriggerFormEvent on Event {\n printerGroups {\n __typename\n\n ... on PrinterGroupList {\n nodes {\n id\n name\n }\n }\n\n ... on PrinterGroupError {\n message\n }\n }\n\n zplDocuments {\n nodes {\n id\n name\n }\n }\n}\n",fragments:[]},PrintTriggerFormOrganizationFragment:{code:"fragment PrintTriggerFormOrganization on Organization {\n weezaccessPartners {\n __typename\n\n ... on WeezaccessPartnerList {\n nodes {\n id\n name\n }\n }\n\n ... on WeezaccessPartnerError {\n message\n }\n }\n}\n",fragments:[]},PrintTriggersPrintTriggerFragment:{code:"fragment PrintTriggersPrintTrigger on PrintTrigger {\n id\n insertedAt\n activationRange\n status\n\n createdBy {\n email\n name\n }\n\n weezaccessPartner {\n __typename\n ... on WeezaccessPartner {\n id\n name\n url\n }\n ... on WeezaccessPartnerError {\n message\n }\n }\n\n printerGroup {\n __typename\n ... on PrinterGroup {\n id\n name\n }\n ... on PrinterGroupError {\n message\n }\n }\n\n document {\n __typename\n ... on CustomDocument {\n name\n }\n ... on EventsDocument {\n documentType\n }\n ... on ZplDocument {\n name\n }\n }\n}\n",fragments:[]},PsuiUserHoursFragment:{code:"fragment PsuiUserHours on PositionsSlotsUsersInfo {\n breakTime\n checkInAt\n checkOutAt\n timeDifferenceMinutes\n\n positionSlot {\n range\n }\n\n position {\n name\n }\n}\n",fragments:[]},PsuiUserPlanningFragment:{code:"fragment PsuiUserPlanning on PositionsSlotsUsersInfo {\n id\n\n positionSlot {\n name\n range\n }\n\n position {\n name\n color\n }\n}\n",fragments:[]},SegmentCampaignFragment:{code:"fragment SegmentCampaign on Campaign {\n id\n name\n campaignType\n}\n",fragments:[]},SegmentCustomFieldFragment:{code:"fragment SegmentCustomField on CustomField {\n id\n slug\n name\n label\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n canSelectMultiple\n isSelectV2\n isEncrypted\n validationRules\n\n category {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},SegmentEventFragment:{code:"fragment SegmentEvent on Event {\n id\n name\n}\n",fragments:[]},SegmentFormFragment:{code:"fragment SegmentForm on Form {\n id\n name\n}\n",fragments:[]},SegmentsFoldersSegmentsFragment:{code:"fragment SegmentsFoldersSegments on SegmentsFolder {\n id\n name\n\n segments {\n id\n segmentFolderId\n name\n predicatesGroups\n columns\n columnsExport\n columnsSearch\n sort\n count\n rendering\n description\n isUsedInWorkflow\n infos\n }\n}\n",fragments:[]},SpaceDesignFragment:{code:"fragment SpaceDesign on Design {\n banner {\n acl\n name\n key\n }\n\n logo {\n acl\n name\n key\n }\n\n ...DesignColors\n}\n",fragments:["DesignColorsFragment"]},TraceFragment:{code:"fragment Trace on Trace {\n id\n name\n color\n points\n direction\n startAt\n firstRunnerPace\n lastRunnerPace\n}\n",fragments:[]},TranslationFragment:{code:"fragment Translation on Translation {\n id\n translationType\n module\n fr\n en\n es\n de\n nl\n isFrTranslated\n isEnTranslated\n isEsTranslated\n isDeTranslated\n isNlTranslated\n frString\n enString\n esString\n deString\n nlString\n}\n",fragments:[]},UpdateUserFormFragment:{code:"fragment UpdateUserForm on Form {\n id\n name\n areTeamsAllowed\n delegationsIds\n\n elements {\n ...FormElementDisplay\n }\n}\n",fragments:["FormElementDisplayFragment"]},UserAllPermissionsFragment:{code:"fragment UserAllPermissions on UsersInfo {\n usersOrganizations {\n id\n sendNotifications\n\n group {\n id\n name\n }\n\n role {\n id\n name\n type\n }\n }\n\n usersEvents(eventId: $eventId) {\n id\n\n group {\n id\n name\n }\n\n event {\n id\n name\n }\n\n role {\n id\n name\n type\n }\n }\n\n usersDelegations(eventId: $eventId) {\n id\n eventId\n userInfoId\n\n delegation {\n name\n }\n }\n\n usersDelegationsCategories(eventId: $eventId) {\n id\n eventId\n\n group {\n id\n name\n }\n\n delegationCategory {\n name\n }\n\n role {\n id\n name\n }\n }\n\n usersPositionsCategories(eventId: $eventId) {\n id\n eventId\n\n group {\n id\n name\n }\n\n positionCategory {\n name\n }\n\n role {\n id\n name\n }\n }\n\n usersPositions(eventId: $eventId) {\n id\n eventId\n\n group {\n id\n name\n }\n\n position {\n name\n }\n\n role {\n id\n name\n }\n }\n}\n",fragments:[]},UserInfoCommunityFragment:{code:'fragment UserInfoCommunity on UsersInfo {\n id\n localId\n name\n email\n nameOrEmail\n fields\n lastSeenAt\n insertedAt\n phone: fieldValue(slug: "phone")\n\n ...UserAllPermissions @include(if: $includeRoles)\n\n picture {\n url\n }\n\n comments @include(if: $includeComments) {\n content\n }\n\n events @include(if: $includeEvents) {\n id\n name\n }\n\n duplicatedFrom @include(if: $includeDuplicatedFrom) {\n id\n email\n name\n\n picture {\n url\n }\n }\n\n delegations(level: Organization) @include(if: $includeDelegations) {\n id\n name\n\n delegationCategory {\n id\n name\n }\n }\n\n emails(emailTypes: [Campaign], level: Organization) @include(if: $includeEmails) {\n id\n state\n\n campaign {\n name\n }\n }\n\n formsUsersInfos(level: Organization) @include(if: $includeForms) {\n id\n insertedAt\n\n form {\n id\n name\n }\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n}\n',fragments:["UserAllPermissionsFragment"]},UserInfoContactInformationFragment:{code:"fragment UserInfoContactInformation on UsersInfo {\n ...UserInfoNameAndPicture\n email\n phone {\n internationalFormat\n }\n}\n",fragments:["UserInfoNameAndPictureFragment"]},UserInfoDocumentFragment:{code:'fragment UserInfoDocument on UsersInfo {\n id\n localId\n ...UserInfoContactInformation\n nameOrEmail\n language: fieldValue(slug: "language")\n fields(expand: true)\n registrationDate(eventId: $eventId)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n}\n',fragments:["UserInfoContactInformationFragment","UserInfoLinksFragment"]},UserInfoEmailRendererFragment:{code:"fragment UserInfoEmailRenderer on UsersInfo {\n id\n localId\n email\n fields\n registrationDate(eventId: $eventId)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n\n user {\n id\n language\n }\n}\n",fragments:["UserInfoLinksFragment"]},UserInfoFormFragment:{code:"fragment UserInfoForm on UsersInfo {\n id\n localId\n email\n nameOrEmail\n fields\n registrationDate(eventId: $eventId)\n canAccess(formId: $formId)\n}\n",fragments:[]},UserInfoLinksFragment:{code:"fragment UserInfoLinks on UserInfoDocumentLink {\n userAssignmentsLink\n userBadgeLink\n userCertificateLink\n userCustomBadgeLinks\n userCustomDocumentLinks\n userHoursLink\n userPlanningLink\n userPlanningDaysLink\n userPlanningListLink\n}\n",fragments:[]},UserInfoNameAndPictureFragment:{code:"fragment UserInfoNameAndPicture on UsersInfo {\n name\n picture {\n url\n }\n}\n",fragments:[]},UserInfoOrganizationFragment:{code:"fragment UserInfoOrganization on UsersInfo {\n id\n userId\n name\n email\n nameOrEmail\n\n ...UserAllPermissions\n\n groups {\n id\n name\n }\n\n picture {\n url\n }\n}\n",fragments:["UserAllPermissionsFragment"]},UserInfoOverlayFragment:{code:'fragment UserInfoOverlay on UsersInfo {\n id\n name\n email\n nameOrEmail\n fields\n phone: fieldValue(slug: "phone")\n population: fieldValue(slug: "population")\n language: fieldValue(slug: "language")\n\n picture {\n url\n }\n}\n',fragments:[]},UserInfoTeamMemberFragment:{code:"fragment UserInfoTeamMember on UsersInfo {\n id\n ...UserInfoContactInformation\n}\n",fragments:["UserInfoContactInformationFragment"]},UserInfoTeamRightPanelFragment:{code:"fragment UserInfoTeamRightPanel on VolunteersRegistration {\n positionsCategories {\n positions {\n id\n name\n icon\n color\n\n slots {\n id\n name\n range\n }\n }\n }\n\n positions {\n id\n name\n icon\n color\n\n slots {\n id\n name\n range\n }\n }\n\n positionsSlots {\n id\n name\n range\n\n position {\n id\n name\n icon\n color\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlot {\n id\n name\n range\n }\n\n position {\n id\n name\n icon\n color\n }\n }\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},UserInfoUpdateMemberFragment:{code:"fragment UserInfoUpdateMember on UsersInfo {\n id\n email\n name\n fields\n userId\n\n picture {\n url\n }\n\n formUserInfo(formId: $formId) {\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n accreditationProfileId\n accreditationsSlotsIds\n\n slots {\n startDate\n startTime\n endDate\n endTime\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n }\n }\n\n positionsSlots {\n nameOrRange\n\n position {\n id\n name\n }\n }\n\n positions {\n id\n name\n range\n }\n\n positionsCategories {\n id\n name\n range\n }\n\n form {\n ...CreateUpdateMemberForm\n }\n }\n\n volunteerRegistration(eventId: $eventId) {\n accreditationsUsersInfos {\n accreditationSlotId\n checkInAt\n }\n }\n}\n",fragments:["CreateUpdateMemberFormFragment"]},UserPanelAccreditationSlotUserInfoFragment:{code:"fragment UserPanelAccreditationSlotUserInfo on AccreditationsUsersInfo {\n id\n eventId\n isAutoAccredit\n isWorkflow\n checkInAt\n insertedAt\n checkInAt\n state\n\n accreditationCategory {\n name\n }\n\n accreditation {\n id\n name\n color\n icon\n index\n }\n\n accreditationSlot {\n id\n name\n date\n }\n\n accreditationProfile {\n id\n name\n }\n\n createdBy {\n email\n name\n }\n}\n",fragments:[]},UserPermissionsFragment:{code:"fragment UserPermissions on User {\n roles(organizationId: $organizationId, eventId: $eventId) {\n id\n accessLevel\n type\n permissions\n }\n\n usersDelegationsCategories(eventId: $eventId) {\n delegationCategoryId\n roleId\n }\n\n usersEvents(eventId: $eventId) {\n eventId\n roleId\n }\n\n usersPositionsCategories(eventId: $eventId) {\n positionCategoryId\n roleId\n }\n\n usersPositions(eventId: $eventId) {\n positionId\n roleId\n }\n}\n",fragments:[]},UserPositionSlotUserInfoFragment:{code:"fragment UserPositionSlotUserInfo on PositionsSlotsUsersInfo {\n breakTime\n checkInAt\n checkOutAt\n eventId\n id\n insertedAt\n isAutoAssign\n isWorkflow\n organizationId\n positionCategoryId\n positionSlotId\n state\n timeDifferenceMinutes\n userInfoId\n\n createdBy {\n email\n name\n }\n\n position {\n id\n acronym\n color\n icon\n name\n }\n\n positionSlot {\n id\n name\n range\n }\n\n positionCategory {\n id\n name\n }\n}\n",fragments:[]},VolunteerInfosFragment:{code:'fragment VolunteerInfos on VolunteersRegistration {\n delegation {\n id\n name\n }\n\n userInfo {\n id\n name\n email\n phone: fieldValue(slug: "phone")\n picture {\n url\n }\n }\n}\n',fragments:[]},VolunteerPdfFragment:{code:"fragment VolunteerPdf on VolunteersRegistration {\n delegation {\n name\n }\n\n teams {\n teamCode\n }\n\n userInfo {\n id\n ...UserInfoContactInformation\n fields\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationFragment:{code:"fragment VolunteerRegistration on VolunteersRegistration {\n id\n localId\n ticketId\n ticketIdVersion\n state\n accreditationState\n insertedAt\n canDelete\n canRegistrationStateUpdate @include(if: $includeCanRegistrationStateUpdate)\n numberOfAccreditations @include(if: $includeNumberOfAccreditations)\n numberOfAssignments @include(if: $includeNumberOfAssignments)\n numberOfAssignmentsDays @include(if: $includeNumberOfAssignmentsDays)\n numberOfAvailableDays @include(if: $includeNumberOfAvailableDays)\n shortTag\n pairedAt\n volunteerMinutes @include(if: $includeVolunteerMinutes)\n weezeventPayUrl @include(if: $includeWeezeventUrls)\n weezeventTicketUrl @include(if: $includeWeezeventUrls)\n delegationBannerNumber @include(if: $includeDelegation)\n exportedCustomDocumentsSlugs @include(if: $includeCustomDocuments)\n accreditationProfileId\n wishedAccreditationProfileId @include(if: $includeAccreditationsMatrix)\n\n delegation @include(if: $includeDelegation) {\n id\n name\n\n delegationCategory {\n id\n name\n }\n }\n\n userInfo {\n id\n localId\n userId\n organizationId\n email\n name\n nameOrEmail\n fields\n isEditable @include(if: $includeIsEditable)\n insertedAt\n\n picture @include(if: $includePicture) {\n url\n }\n\n ...UserAllPermissions @include(if: $includeRoles)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n\n comments @include(if: $includeComments) {\n content\n }\n\n emails(\n emailTypes: [Campaign]\n level: Event\n eventId: $eventId\n delegationId: $delegationId\n ) @include(if: $includeEmails) {\n id\n state\n\n campaign {\n name\n }\n }\n\n formsUsersInfos(level: Event, eventId: $eventId) @include(if: $includeFormsUsersInfos) {\n id\n insertedAt\n\n accreditationProfile @include(if: $includeAccreditationProfile) {\n ...AccreditationProfileVolunteerRegistration\n }\n\n form @include(if: $includeForms) {\n id\n name\n slotDisplay\n }\n\n slots @include(if: $includeAvailability) {\n id\n range\n }\n\n teamMembers @include(if: $includeTeam) {\n ...UserInfoTeamMember\n }\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n }\n\n accreditationProfile @include(if: $includeAccreditationProfile) {\n ...AccreditationProfileVolunteerRegistration\n }\n\n accreditationsUsersInfos(\n delegationId: $delegationId\n onlyVisible: $onlyVisibleAccreditationsSlots\n ) @include(if: $includeAccreditations) {\n checkInAt\n\n accreditationSlot {\n ...AccreditationSlotVolunteerRegistration\n }\n }\n\n matrixAuis: accreditationsUsersInfos(\n delegationId: $delegationId\n onlyVisible: $onlyVisibleAccreditationsSlots\n ) @include(if: $includeAccreditationsMatrix) {\n accreditationSlotId\n isAutoAccredit\n accreditationProfileId\n checkInAt\n }\n\n accreditationsSlots(delegationId: $delegationId, onlyVisible: $onlyVisibleAccreditationsSlots)\n @include(if: $includeAccreditations) {\n ...AccreditationSlotVolunteerRegistration\n }\n\n matrixWishedSlots: accreditationsSlots @include(if: $includeAccreditationsMatrix) {\n id\n }\n\n duplicatedFrom @include(if: $includeDuplicatedFrom) {\n userInfo {\n id\n email\n name\n\n picture {\n url\n }\n }\n }\n\n positionsSlotsUsersInfos @include(if: $includePositions) {\n ...UserPositionSlotUserInfo\n }\n\n positionsCategories @include(if: $includeWishedPositions) {\n id\n name\n }\n\n positions @include(if: $includeWishedPositions) {\n id\n acronym\n color\n icon\n name\n }\n\n positionsSlots @include(if: $includeWishedPositions) {\n id\n name\n range\n\n position {\n acronym\n color\n icon\n name\n }\n }\n\n preassignPositionsCategories @include(if: $includePreassignedPositions) {\n id\n name\n }\n\n preassignPositions @include(if: $includePreassignedPositions) {\n id\n name\n }\n\n teams @include(if: $includeTeam) {\n teamCode\n }\n\n weezaccessChecklists @include(if: $includeWeezeventChecklists) {\n id\n name\n }\n}\n",fragments:["UserAllPermissionsFragment","UserInfoLinksFragment","AccreditationProfileVolunteerRegistrationFragment","UserInfoTeamMemberFragment","AccreditationSlotVolunteerRegistrationFragment","UserPositionSlotUserInfoFragment"]},VolunteerRegistrationDelegationAccreditationProfileFragment:{code:"fragment VolunteerRegistrationDelegationAccreditationProfile on VolunteersRegistration {\n id\n accreditationProfileId\n wishedAccreditationProfileId\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationDelegationAccreditationSlotFragment:{code:"fragment VolunteerRegistrationDelegationAccreditationSlot on VolunteersRegistration {\n id\n\n accreditationsSlots {\n id\n }\n\n accreditationsUsersInfos {\n accreditationSlotId\n }\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationEmailRendererFragment:{code:"fragment VolunteerRegistrationEmailRenderer on VolunteersRegistration {\n localId\n ticketId\n weezevent\n\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n}\n",fragments:["AccreditationProfileEmailFragment","DelegationEmailFragment"]},VolunteerRegistrationWaitingAssignmentFragment:{code:"fragment VolunteerRegistrationWaitingAssignment on VolunteersRegistration {\n insertedAt\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationWeezeventFragment:{code:"fragment VolunteerRegistrationWeezevent on VolunteersRegistration {\n id\n localId\n state\n accreditationState\n ticketId\n weezevent\n\n accreditationProfile {\n name\n\n accreditationProfileCategory {\n name\n }\n }\n\n accreditationsUsersInfos {\n accreditationSlotId\n accreditationCategoryId\n\n accreditationCategory {\n id\n name\n }\n\n accreditation {\n id\n name\n fields\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlotId\n\n positionCategory {\n id\n name\n }\n\n position {\n id\n name\n }\n }\n\n delegation {\n name\n\n delegationCategory {\n name\n }\n }\n\n userInfo {\n id\n localId\n ...UserInfoContactInformation\n fieldsExpanded: fields(expand: true)\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationZplRendererFragment:{code:"fragment VolunteerRegistrationZplRenderer on VolunteersRegistration {\n localId\n ticketId\n weezevent\n\n accreditationsUsersInfos {\n accreditation {\n id\n }\n accreditationSlot {\n id\n }\n }\n\n delegation {\n ...DelegationEmail\n }\n\n userInfo {\n id\n localId\n email\n fields\n registrationDate\n }\n}\n",fragments:["DelegationEmailFragment"]},WishesEmailFragment:{code:"fragment WishesEmail on FormsUsersInfo {\n form {\n slotDisplay\n }\n\n positionsCategories {\n name\n }\n\n positions {\n name\n }\n\n positionsSlots {\n name\n range\n\n position {\n name\n }\n }\n\n slots {\n range\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n name\n }\n }\n}\n",fragments:[]},WorkflowsWorkflowFragment:{code:"fragment WorkflowsWorkflow on Workflow {\n id\n name\n state\n trigger\n action\n frequency\n executedAt\n insertedAt\n\n createdBy {\n email\n name\n }\n\n data {\n errorMessage\n }\n\n accreditationsSlots @include(if: $includeAccreditations) {\n ...AccreditationSlotVolunteerRegistration\n }\n\n campaign @include(if: $includeCampaign) {\n id\n name\n }\n\n customField @include(if: $includeCustomField) {\n id\n name\n }\n\n positionsSlots @include(if: $includePositions) {\n id\n name\n range\n\n position {\n acronym\n color\n icon\n name\n }\n }\n\n segment {\n id\n name\n segmentType\n }\n}\n",fragments:["AccreditationSlotVolunteerRegistrationFragment"]},ZapierMemberFragment:{code:"fragment ZapierMember on UsersInfo {\n id\n fields(expand: true)\n email\n insertedAt\n updatedAt\n deletedAt\n}\n",fragments:[]}};function Ho(e){return e.flatMap(e=>[e.code].concat(Ho(e.fragments.map(e=>Yo[e]))))}function Zo(e){return(0,qo.A)(Ho(e)).join(" ")}const Ko="yyyy-MM-dd",Qo="yyyy-MM-dd'T'HH:mm",Xo="yyyy-MM-dd'T'HH:mm:ss";function Jo(e){const[t,n]=JSON.parse(e);return Vo.IX.fromDateTimes(Vo.c9.fromISO(t,{zone:"UTC"}),Vo.c9.fromISO(n,{zone:"UTC"}))}function ea({startDate:e,startTime:t,endDate:n,endTime:i}){try{const[o,a]=t.split(":"),[s,r]=i.split(":");return Vo.IX.fromDateTimes(e.set({hour:parseInt(o,10),minute:parseInt(a,10)}),n.set({hour:parseInt(s,10),minute:parseInt(r,10)}))}catch{return Vo.IX.invalid("Invalid")}}function ta(e){return Vo.IX.isInterval(e)?e:ea(e)}function na(e){return{startDate:e.start.set({hour:0,minute:0,second:0}),startTime:e.start.toFormat("HH:mm:ss"),endDate:e.end.set({hour:0,minute:0,second:0}),endTime:e.end.toFormat("HH:mm:ss")}}const ia=(e,t)=>e.contains(t)||e.start.startOf("day").toMillis()===t.startOf("day").toMillis()||e.end.minus({minute:1}).startOf("day").toMillis()===t.startOf("day").toMillis(),oa=u({DateOnly:{Numeric:{year:"numeric",month:"2-digit",day:"2-digit"},MonthLong:{year:"numeric",month:"long",day:"numeric"},MonthShort:{year:"numeric",month:"short",day:"numeric"},WeekdayLongMonthLong:{year:"numeric",month:"long",day:"numeric",weekday:"long"},WeekdayShortMonthLong:{year:"numeric",month:"long",day:"numeric",weekday:"short"},WeekdayShortMonthShort:{year:"numeric",month:"short",day:"numeric",weekday:"short"},MonthLongYear:{year:"numeric",month:"long"}},TimeOnly:{hour:"2-digit",minute:"2-digit"},DateTime:{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"},FullDateTime:{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"},ShortDateTime:{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}});function aa(e){return"string"==typeof e?Vo.c9.fromISO(e,{setZone:!0}):e}function sa(){return Vo.c9.utc().toLocal().zoneName}function ra(e){return"string"==typeof e&&e.startsWith("[")}function da(e){if(!0===Array.isArray(e))return e.map(e=>null!=e&&"object"==typeof e?da(e):e);if("boolean"==typeof e||"number"==typeof e||"string"==typeof e||null===e)return e;{const t={};return Object.keys(e).forEach(n=>{const i=e[n];xi.includes(n)||yi.includes(n)?t[n]=i&&Vo.c9.fromISO(i,{zone:"UTC"}):Si.includes(n)?Array.isArray(i)?t[n]=i.map(e=>ra(e)?Jo(e):e):t[n]=ra(i)?Jo(i):i:vi.includes(n)?t[n]=i&&Vo.dw.fromISO(i):t[n]=null!=i&&"object"==typeof i?da(i):i}),t}}const la="cab30128a67ecd38396399d43d85154edb776bfe\n".trim(),ca="x-heavent-commit-sha",ua="x-heavent-request-uuid",ma="x-user-token";function ga(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}var ha=n(7405),pa=n(5002);const fa="heavent-user-session-key",Ia="heavent-user-email",_a="UserNotFoundException";let ya=null;const xa=()=>(null===ya&&(ya=new pa.NE({UserPoolId:lo.COGNITO_USER_POOL_ID,ClientId:lo.COGNITO_USER_POOL_CLIENT_ID})),ya);function Sa(){return new Promise((e,t)=>{const n=xa().getCurrentUser();null!==n?n.getSession((i,o)=>{i||!1===o?.isValid()?t(new Error("Could not get current user")):e({user:n,token:o.getIdToken().getJwtToken()})}):t(new Error("Could not get current user"))})}async function va(){try{const e=localStorage.getItem("heavent-test-token");return v(e)?e:(await Sa()).token}catch{return}}function ba(){Sa().then(({user:e})=>{e.signOut(),location.reload()}).catch(()=>{alert("Something wrong happened ")})}function ja(){return Sa().then(({user:e})=>{e.signOut()})}function Aa(e,t,n){return new Promise((i,o)=>{const a=new pa.TU({Username:e,Pool:xa()}),s=new pa.By({Username:e}),r={onSuccess(e){t(e.getIdToken().getJwtToken())},onFailure(e){e.code===_a?o(_a):n(e)},customChallenge(){localStorage.setItem(Ia,e),localStorage.setItem(fa,a.Session),i({user:a,callbacks:r})}};a.setAuthenticationFlowType("CUSTOM_AUTH"),a.initiateAuth(s,r)})}async function Ca(e,t,n){try{return await Aa(e,t,n)}catch(i){if(i!==_a)throw i;try{return await function(e,t){const n=e.trim().toLowerCase();return new Promise((e,i)=>{const o=[new pa.HB({Name:"email",Value:n})];xa().signUp(n,t,o,[],(t,n)=>{t?i(t):e(n.user)})})}(e,ga().toString()),await Aa(e,t,n)}catch{throw new Error("Auth failure")}}}function Ea({code:e,user:t,callbacks:n}){return new Promise((i,o)=>{t.sendCustomChallengeAnswer(e,{...n,onSuccess:(...e)=>{n.onSuccess(...e),i(e)},onFailure:e=>{n.onFailure(e),o({type:"FAILED",error:e})},customChallenge:(...e)=>{n.customChallenge&&n.customChallenge(...e),o({type:"RETRY"})}})}).then(([e])=>e.getIdToken().getJwtToken())}function Ta(e,t,n){!async function(e){await fetch(`${lo.HEAVENT_API_URL}/log/report`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}({message:"Could not auth",errorMessage:e,email:t,location:location.href,diff:Math.round((Date.now()-n)/1e3),userAgent:navigator.userAgent})}async function Oa(e,t={}){let n=lo.HEAVENT_API_URL.href;const i=new URL(location.href).searchParams,o=`${e} ${h(t.fragments)?Zo(t.fragments):""}`,a=ga(),s={"Content-Type":"application/json",[ca]:la,[ua]:a};i.has("lang")&&(n=`${n}?lang=${i.get("lang")}`),t.token&&(s[ma]=t.token);const r=await fetch(n,{method:"post",headers:s,body:JSON.stringify({query:o,variables:t.variables||{}})});if(r.ok){t.reloadOnNewVersion&&"true"===r.headers.get("x-heavent-new-version")&&document.body.dispatchEvent(new CustomEvent("h-new-version",{bubbles:!0}));const e=await r.json();if(e.errors){const t=e.errors[0]?.message??"";if("You need to be logged-in"===t)return localStorage.clear(),location.href="/crew",{};if(t.startsWith("You do not have access to this"))return location.href="/crew",{};throw Uo(e.errors,a)}{const t=(0,ha.A)(e.data),n={};return t.forEach(t=>{n[t]=da(e.data[t])}),n}}throw Uo(new Error(r.statusText),a)}function Ra(e,t,n){const i=Object.keys(t).sort().map(e=>{const n=t[e];return`"${e}":${JSON.stringify(n)}`}).join(",");return(0,r.useMemo)(()=>va().then(i=>Oa(e,{variables:t,token:i||void 0,fragments:n})),[e,i])}const Ma="mutation UserCreate {\n userCreate {\n id\n email\n }\n}\n";function Da(e={}){return Di("mutation VolunteersRegistrationsMassAccredit(\n $eventId: EventId!\n $massAccredit: MassAccreditInput!\n) {\n numberOfMembers: volunteersRegistrationsMassAccredit(\n eventId: $eventId\n massAccredit: $massAccredit\n )\n}\n",e)}function wa(e={}){return Di("mutation UsersInfosMassDelegationDelete(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $selecteds: MassActionSelectedsInput!\n $deleteFromEvent: Boolean\n) {\n usersInfosMassDelegationDelete(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n deleteFromEvent: $deleteFromEvent\n )\n}\n",e)}function $a(e){return Mi("query OrganizationParametersInfos($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n ...OrganizationAdminInfos\n }\n}\n",e,[Yo.OrganizationAdminInfosFragment])}function Pa(e={}){return Di("mutation PositionsSlotsUsersInfosCheckIn($eventId: EventId!, $checkIn: PositionSlotCheckInInput!) {\n numberOfMembers: positionsSlotsUsersInfosCheckIn(eventId: $eventId, checkIn: $checkIn)\n}\n",e)}function Na(e){return Mi("query UserPositions(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n hideAssignmentsUntilConfirmationEmailSent\n\n userInfo(id: $userInfoId) {\n ...FormsUsersInfosWished\n }\n }\n\n event(id: $eventId) {\n name\n startAt\n endAt\n dayStartTime\n hasFormWithPositionDisplay\n hasFormWithSlotDisplay\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n id\n volunteerMinutes\n isAssignmentsEmailSent\n\n positionsSlotsUsersInfos {\n ...UserPositionSlotUserInfo\n }\n\n preassignPositions {\n id\n name\n range\n }\n\n preassignPositionsCategories {\n id\n name\n range\n }\n }\n }\n}\n",e,[Yo.FormsUsersInfosWishedFragment,Yo.UserPositionSlotUserInfoFragment])}function ka(e,t){return Oa("query ConditionsCustomFields(\n $organizationId: OrganizationId!\n $eventId: EventId\n $fieldTypes: [FieldType!]\n) {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo, privacy: All, fieldTypes: $fieldTypes) {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}function za(e={}){return Di("mutation FormRegister(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $formId: FormId!\n $email: UserEmail!\n $formRegister: FormRegisterInput!\n) {\n formRegister(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n formId: $formId\n email: $email\n formRegister: $formRegister\n ) {\n teamCode\n }\n}\n",e)}function La(e,t){return Oa("query User(\n $organizationId: OrganizationId!\n $eventId: EventId\n $id: UsersInfoId!\n $includeComments: Boolean!\n $includeDelegations: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeEvents: Boolean!\n $includeForms: Boolean!\n $includeTags: Boolean!\n $includeRoles: Boolean!\n) {\n data: organization(id: $organizationId) {\n row: userInfo(id: $id) {\n ...UserInfoCommunity\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[Yo.UserInfoCommunityFragment]})}function Fa(e,t){return Oa("query Users(\n $organizationId: OrganizationId!\n $eventId: EventId\n $predicatesGroups: PredicatesGroups!\n $name: String\n $columnsSearch: [String!]\n $limit: Int\n $offset: Int\n $sort: UsersInfosSort\n $delegationCategoryId: DelegationsCategoryId\n $delegationId: DelegationId\n $includeComments: Boolean!\n $includeDelegations: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeEvents: Boolean!\n $includeForms: Boolean!\n $includeTags: Boolean!\n $includeRoles: Boolean!\n) {\n data: organization(id: $organizationId) {\n rows: usersInfos(\n predicatesGroups: $predicatesGroups\n name: $name\n columnsSearch: $columnsSearch\n delegationCategoryId: $delegationCategoryId\n delegationId: $delegationId\n limit: $limit\n offset: $offset\n sort: $sort\n ) {\n nodes {\n ...UserInfoCommunity\n }\n\n numberOfPages\n totalCount\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[Yo.UserInfoCommunityFragment]})}function Ua(e={}){return Di("mutation EmailUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $email: UserEmail!\n) {\n emailUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n userInfoId: $userInfoId\n email: $email\n )\n}\n",e)}function Ba(e,t){return Oa("query EventAccreditationsSlots($eventId: EventId!, $loadIsBlocked: Boolean!) {\n event(id: $eventId) {\n accreditationsCategories {\n id\n name\n\n accreditations {\n id\n name\n acronym\n accreditationDisplay\n index\n\n slots(includeHidden: true) {\n id\n name\n date\n isBlocked @include(if: $loadIsBlocked)\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}function Ga(e,t){return Oa("query EventPositionsSlots($eventId: EventId!) {\n event(id: $eventId) {\n positionsCategories {\n id\n name\n\n positions {\n id\n name\n acronym\n positionDisplay\n\n slots {\n id\n name\n range\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}function Va(e={}){return Di("mutation LoginCodeEmailCreate($loginCodeEmail: LoginCodesEmailInput!) {\n loginCodeEmailCreate(loginCodeEmail: $loginCodeEmail) {\n insertedAt\n }\n}\n",e)}function Wa(e={}){return Di("mutation VolunteersRegistrationsAccreditationsValidate(\n $eventId: EventId!\n $delegationId: DelegationId\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: volunteersRegistrationsAccreditationsValidate(\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n )\n}\n",e)}function qa(e={}){return Di("mutation VolunteersRegistrationsMassAssign($eventId: EventId!, $massAssign: MassAssignInput!) {\n numberOfMembers: volunteersRegistrationsMassAssign(eventId: $eventId, massAssign: $massAssign)\n}\n",e)}function Ya(e={}){return Di("mutation VolunteersRegistrationsMassDelegationAdd(\n $eventId: EventId!\n $delegationId: DelegationId!\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: volunteersRegistrationsMassDelegationAdd(\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n )\n}\n",e)}function Ha(e={}){return Di("mutation VolunteerRegistrationUpdateField(\n $eventId: EventId!\n $volunteerRegistrationId: VolunteersRegistrationId!\n $slug: String!\n $value: JSON!\n) {\n volunteerRegistrationUpdateField(\n eventId: $eventId\n volunteerRegistrationId: $volunteerRegistrationId\n slug: $slug\n value: $value\n ) {\n id\n }\n}\n",e)}function Za(e,t){return Oa("query Volunteer(\n $eventId: EventId!\n $id: VolunteersRegistrationId!\n $delegationId: DelegationId\n $includeAccreditationProfile: Boolean!\n $onlyVisibleAccreditationsSlots: Boolean\n $includeAccreditations: Boolean!\n $includeAccreditationsMatrix: Boolean!\n $includeAvailability: Boolean!\n $includeCanRegistrationStateUpdate: Boolean!\n $includeComments: Boolean!\n $includeCustomDocuments: Boolean!\n $includeDelegation: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeFormsUsersInfos: Boolean!\n $includeForms: Boolean!\n $includeIsEditable: Boolean!\n $includeNumberOfAccreditations: Boolean!\n $includeNumberOfAssignments: Boolean!\n $includeNumberOfAssignmentsDays: Boolean!\n $includeNumberOfAvailableDays: Boolean!\n $includePicture: Boolean!\n $includePositions: Boolean!\n $includeRoles: Boolean!\n $includeTags: Boolean!\n $includeTeam: Boolean!\n $includeVolunteerMinutes: Boolean!\n $includeWishedPositions: Boolean!\n $includePreassignedPositions: Boolean!\n $includeWeezeventChecklists: Boolean!\n $includeWeezeventUrls: Boolean!\n) {\n data: event(id: $eventId) {\n row: volunteerRegistration(id: $id) {\n ...VolunteerRegistration\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[Yo.VolunteerRegistrationFragment]})}function Ka(e,t){return Oa("query Volunteers(\n $eventId: EventId!\n $predicatesGroups: PredicatesGroups!\n $limit: Int\n $offset: Int\n $sort: VolunteersRegistrationsSort\n $name: String\n $columnsSearch: [String!]\n $positionCategoryId: PositionsCategoryId\n $positionId: PositionId\n $preassignedPositionCategoryId: PositionsCategoryId\n $preassignedPositionId: PositionId\n $accreditationsCategoriesIds: [AccreditationsCategoryId!]\n $accreditationsIds: [AccreditationId!]\n $accreditationsSlotsIds: [AccreditationsSlotId!]\n $accreditationsProfilesCategoriesIds: [AccreditationsProfilesCategoryId!]\n $accreditationsProfilesIds: [AccreditationsProfileId!]\n $delegationCategoryId: DelegationsCategoryId\n $delegationId: DelegationId\n $hasCoordinates: Boolean\n $includeAccreditationProfile: Boolean!\n $onlyVisibleAccreditationsSlots: Boolean\n $includeAccreditations: Boolean!\n $includeAccreditationsMatrix: Boolean!\n $includeAvailability: Boolean!\n $includeCanRegistrationStateUpdate: Boolean!\n $includeComments: Boolean!\n $includeCustomDocuments: Boolean!\n $includeDelegation: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeFormsUsersInfos: Boolean!\n $includeForms: Boolean!\n $includeIsEditable: Boolean!\n $includeNumberOfAccreditations: Boolean!\n $includeNumberOfAssignments: Boolean!\n $includeNumberOfAssignmentsDays: Boolean!\n $includeNumberOfAvailableDays: Boolean!\n $includePicture: Boolean!\n $includePositions: Boolean!\n $includeRoles: Boolean!\n $includeTags: Boolean!\n $includeTeam: Boolean!\n $includeTraces: Boolean!\n $includeVolunteerMinutes: Boolean!\n $includeWishedPositions: Boolean!\n $includePreassignedPositions: Boolean!\n $includeWeezeventChecklists: Boolean!\n $includeWeezeventUrls: Boolean!\n) {\n data: event(id: $eventId) {\n layer\n latitude\n longitude\n\n rows: volunteersRegistrations(\n predicatesGroups: $predicatesGroups\n name: $name\n columnsSearch: $columnsSearch\n positionCategoryId: $positionCategoryId\n positionId: $positionId\n preassignedPositionCategoryId: $preassignedPositionCategoryId\n preassignedPositionId: $preassignedPositionId\n accreditationsCategoriesIds: $accreditationsCategoriesIds\n accreditationsIds: $accreditationsIds\n accreditationsSlotsIds: $accreditationsSlotsIds\n accreditationsProfilesCategoriesIds: $accreditationsProfilesCategoriesIds\n accreditationsProfilesIds: $accreditationsProfilesIds\n delegationCategoryId: $delegationCategoryId\n delegationId: $delegationId\n hasCoordinates: $hasCoordinates\n limit: $limit\n offset: $offset\n sort: $sort\n ) {\n nodes {\n ...VolunteerRegistration\n }\n\n numberOfPages\n totalCount\n }\n\n traces @include(if: $includeTraces) {\n ...Trace\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[Yo.VolunteerRegistrationFragment,Yo.TraceFragment]})}function Qa(e={}){return Di("mutation VolunteersRegistrationsMassWishedAccreditationsUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $massAccredit: MassAccreditInput!\n) {\n volunteersRegistrationsMassWishedAccreditationsUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n massAccredit: $massAccredit\n )\n}\n",e)}function Xa(e={}){return Di("mutation VolunteersRegistrationsMassWishedProfileUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $massProfileUpdate: MassAccreditationProfileUpdateInput!\n) {\n volunteersRegistrationsMassWishedProfileUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n massProfileUpdate: $massProfileUpdate\n )\n}\n",e)}const Ja=async()=>{const{user:e}=await(async()=>{try{const e=await async function(){const e=await va();if(v(e)){const{user:t}=await function(e,t){return Oa("query CurrentUser {\n user {\n id\n email\n hubspotToken\n insertedAt\n language\n profile\n termsAcceptedAt\n }\n}\n",{variables:{},token:t||void 0,fragments:[]})}(0,e);return{user:t}}throw new Error("No token")}();return Vo.wB.defaultLocale=e.user.language.toLowerCase(),e}catch{return{user:null}}})();return await(e=>{const t=new URL(location.href).searchParams.get("lang");let n=null;return e&&(n=e.language.toLowerCase()),v(t)&&(n=t),Wo(`${lo.HEAVENT_API_URL}/translation/language.js?${n?`lang=${n}`:""}`)})(e),{user:e}},es=window.matchMedia("(max-width: 1200px)"),ts=r.createContext({isMobile:!1}),ns=e=>{const[t,n]=r.useState(!1);return r.useEffect(()=>{n(es.matches),es.addListener(e=>{n(e.matches)})},[]),(0,i.jsx)(ts.Provider,{value:{isMobile:t},children:e.children})},is="old",os="new2025",as=(0,r.createContext)({});function ss(){return(0,r.useContext)(as)}const rs=e=>{const t=(0,r.useRef)(null),n=(0,r.useCallback)(e=>{e&&(t.current=e,setTimeout(()=>{e.style.right=M.space[6].value},100))},[]),o=(0,r.useCallback)(()=>{t.current.style.right="-400px",e.onClose()},[e.onClose]);return(0,Oo.createPortal)((0,i.jsxs)(G,{ref:n,align:"center",className:"h-notification",css:{background:"black"===e.color?"$gray900":"error"===e.color?"$error400":"$success500",borderRadius:"$2",boxShadow:"$lg",maxHeight:"120px",padding:"$2 $4",position:"absolute",right:"-400px",top:"$6",transition:"0.5s right ease-in-out",zIndex:"1000"},gap:"3",role:"status",width:400,children:[(0,i.jsx)(G,{align:"center",css:{color:"white"},justify:"center",children:(0,i.jsx)(_o,{icon:"black"===e.color?"circle-exclamation":"error"===e.color?"circle-xmark":"circle-check",iconStyle:"solid"})}),(0,i.jsx)(Li,{color:"white",css:{flex:"1","& a":{color:"white",textDecoration:"underline"}},dangerouslySetInnerHTML:{__html:e.text},fontWeight:"medium"}),(0,i.jsx)(G,{align:"center",css:{color:"white",cursor:"pointer",fontSize:"$textMd"},height:32,justify:"center",width:32,onClick:o,children:(0,i.jsx)(_o,{icon:"xmark"})})]}),document.body)},ds=2e3,ls=(0,r.createContext)({}),cs=e=>{const t=Oi(),[n,o]=(0,r.useState)(!1),[a,s]=(0,r.useState)({color:"success",text:""}),d=(0,r.useCallback)(()=>{setTimeout(()=>{o(!1)},1200)},[o]),l=(0,r.useCallback)(e=>{o(!0),s("string"==typeof e?{text:e}:e),setTimeout(d,Vo.dw.fromObject({seconds:5}).toMillis())},[o,s,d]),{mutate:c}=function(e={}){return Di("mutation AccreditationsImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n accreditationsImportResult(organizationId: $organizationId, eventId: $eventId, jobId: $jobId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),u=(0,r.useRef)(null),m=(0,r.useCallback)((e,n,i)=>{u.current=window.setInterval(async()=>{const{accreditationsImportResult:{state:o}}=await c({jobId:e,organizationId:n,eventId:i});o===K.Done&&(clearInterval(u.current),l({color:"success",text:t("votre_import_es_60265")}))},ds)},[]),{mutate:g}=function(e={}){return Di("mutation AccreditationsProfilesImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n accreditationsProfilesImportResult(\n organizationId: $organizationId\n eventId: $eventId\n jobId: $jobId\n ) {\n state\n event {\n name\n }\n }\n}\n",e)}(),h=(0,r.useRef)(null),p=(0,r.useCallback)((e,n,i)=>{h.current=window.setInterval(async()=>{const{accreditationsProfilesImportResult:{state:o}}=await g({jobId:e,organizationId:n,eventId:i});o===K.Done&&(clearInterval(h.current),l({color:"success",text:t("votre_import_es_60265")}))},ds)},[]),{mutate:f}=function(e={}){return Di("mutation DelegationsImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n delegationsImportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),I=(0,r.useRef)(null),_=(0,r.useCallback)((e,n,i)=>{I.current=window.setInterval(async()=>{const{delegationsImportResult:{state:o,event:a}}=await f({jobId:e,organizationId:n,eventId:i});o===Se.Done&&(clearInterval(I.current),l({color:"success",text:t("votre_import_es_98992",a.name)}))},ds)},[]),{mutate:y}=function(e={}){return Di("mutation EventDocumentsExportResult(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId\n $jobId: JobId!\n) {\n eventDocumentsExportResult(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n jobId: $jobId\n ) {\n state\n url\n }\n}\n",e)}(),x=(0,r.useRef)(null),S=(0,r.useCallback)((e,n,i)=>{x.current=window.setInterval(async()=>{const{eventDocumentsExportResult:o}=await y({jobId:e,organizationId:n,eventId:i});o.state===Ne.Done&&(clearInterval(x.current),l({color:"success",text:t("l_export_de_vos_38257",o.url)}))},ds)},[]),{mutate:v}=function(e={}){return Di("mutation EventsImportResult($jobId: JobId!, $organizationId: OrganizationId!) {\n eventsImportResult(jobId: $jobId, organizationId: $organizationId) {\n state\n }\n}\n",e)}(),b=(0,r.useRef)(null),j=(0,r.useCallback)((e,n)=>{b.current=window.setInterval(async()=>{const{eventsImportResult:{state:i}}=await v({jobId:e,organizationId:n});i===De.Done&&(clearInterval(b.current),l({color:"success",text:t("votre_import_es_60265")}))},ds)},[]),{mutate:A}=function(e={}){return Di("mutation ExportResult($jobId: JobId!, $organizationId: OrganizationId!, $eventId: EventId) {\n exportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n url\n }\n}\n",e)}(),C=(0,r.useRef)(null),E=(0,r.useCallback)((e,n,i)=>{C.current=window.setInterval(async()=>{const{exportResult:o}=await A({jobId:e,organizationId:n,eventId:i});o.state===Ne.Done&&(clearInterval(C.current),l({color:"success",text:t("votre_export_es_96069",o.url)}))},ds)},[]),{mutate:T}=function(e={}){return Di("mutation FilesImportResult($jobId: JobId!, $organizationId: OrganizationId!, $eventId: EventId) {\n filesImportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),O=(0,r.useRef)(null),R=(0,r.useCallback)((e,n,i)=>{O.current=window.setInterval(async()=>{const{filesImportResult:{state:o,event:a}}=await T({jobId:e,organizationId:n,eventId:i});o===Ue.Done&&(clearInterval(O.current),l({color:"success",text:a?t("votre_import_es_11791",a.name):t("votre_import_es_10672")}))},ds)},[]),{mutate:M}=function(e={}){return Di("mutation PositionsImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n positionsImportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),D=(0,r.useRef)(null),w=(0,r.useCallback)((e,n,i)=>{D.current=window.setInterval(async()=>{const{positionsImportResult:{state:o,event:a}}=await M({jobId:e,organizationId:n,eventId:i});o===ct.Done&&(clearInterval(D.current),l({color:"success",text:t("votre_import_es_11848",a.name)}))},ds)},[]),{mutate:$}=function(e={}){return Di("mutation VolunteersImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n) {\n volunteersImportResult(\n jobId: $jobId\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n ) {\n state\n event {\n name\n }\n }\n}\n",e)}(),P=(0,r.useRef)(null),N=(0,r.useCallback)((e,n,i,o)=>{P.current=window.setInterval(async()=>{const{volunteersImportResult:{state:a,event:s}}=await $({jobId:e,organizationId:n,eventId:i,delegationId:o});a===Wt.Done&&(clearInterval(P.current),l({color:"success",text:s?t("votre_import_es_37822",s.name):t("votre_import_es_14145")}))},ds)},[]);return(0,i.jsx)(ls.Provider,{value:{checkAccreditationsImport:m,checkAccreditationsProfilesImport:p,checkDelegationsImport:_,checkDocumentsExport:S,checkEventsImport:j,checkExport:E,checkFilesImport:R,checkPositionsImport:w,checkVolunteersImport:N,showNotification:l},children:(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsx)(rs,{color:a.color??"success",text:a.text,onClose:d}),e.children]})})},us=(0,r.createContext)({user:null});function ms(){return(0,r.useContext)(us)}const gs=(0,i.jsx)(xo,{});function hs(e,{redirectOnSuccess:t}={}){const[n,i]=(0,r.useState)(!1),{setIsError:o}=(0,r.useContext)(Bo);let a=null;return n&&(a=gs),{isLoading:n,loader:a,mutate:async(n,a)=>{i(!0);try{const s=await va(),r=await((e,t,n)=>Oa(e,{variables:t,token:n||void 0}))(e,n,a||s);return!0!==t&&(i(!1),o(!1)),r}catch(e){throw o(!0,e),i(!1),e}}}}const ps=(0,i.jsx)(xo,{});function fs(e,t,n){const[i,o]=(0,r.useState)(!0),[a,s]=(0,r.useState)({}),[d,l]=(0,r.useState)(0),{setIsError:c}=(0,r.useContext)(Bo),u=Object.keys(t).sort().map(e=>{const n=t[e];return`"${e}":${JSON.stringify(n)}`}).join(",");(0,r.useEffect)(()=>{let i=!1;var a;return o(!0),a=u,va().then(i=>Oa(e,{reloadOnNewVersion:!0,variables:t,token:i,fragments:n})).then(e=>{i||a!==u||(s(e),c(!1),o(!1))},e=>{i||a!==u||c(!0,e)}),()=>{i=!0}},[e,u,d]);let m=null;return i&&(m=ps),{data:a,isLoading:i,loader:m,reload(){l(d+1)}}}var Is=n(6347);function _s(){return function(e,t={}){return Object.fromEntries(Object.entries(e).map(([e,n])=>e.endsWith("Id")||"id"===e?[e,parseInt(n,10)]:t[e]?[e,t[e](n)]:[e,n]))}((0,Is.g)())}function ys(){const e=(0,Is.W6)();return{...e,goBack:t=>{"POP"===e.action&&e.length<=2?e.push(t):e.goBack()}}}function xs(){return(0,Is.zy)()}function Ss(){return(0,r.useMemo)(()=>{try{return{clear:window.localStorage.clear.bind(window.localStorage),setItem:window.localStorage.setItem.bind(window.localStorage),getItem:window.localStorage.getItem.bind(window.localStorage),removeItem:window.localStorage.removeItem.bind(window.localStorage),key:window.localStorage.key.bind(window.localStorage),get length(){return window.localStorage.length},getItemInt(e){const t=parseInt(window.window.localStorage.getItem(e),10);return isNaN(t)?null:t}}}catch{return{clear(){},setItem(){},getItem:()=>null,removeItem(){},key:()=>null,get length(){return 0},getItemInt:()=>null}}},[])}var vs=n(2499),bs=n(9241),js=n(2664);function As(e){return"number"==typeof e&&!isNaN(e)}function Cs(e){return"number"==typeof e&&Number.isInteger(e)&&e>0}function Es(e){return e?{lat:e.latitude,lng:e.longitude}:null}const Ts=Es({latitude:43.6087733,longitude:3.87963579999996});function Os(e){return As(e.latitude)&&As(e.longitude)?(0,L.A)(e,["latitude","longitude"]):void 0}function Rs(e){return e===et.GoogleSatellite?"satellite":e===et.Google?"roadmap":e??et.Google}var Ms;let Ds=class{translationService;constructor(e){this.translationService=e}t(e,...t){return this.translationService.translate(e,...t)}};Ds=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Ms=void 0!==Ai&&Ai)?Ms:Object])],Ds);var ws;let $s=class extends Ds{translationService;constructor(e){super(e),this.translationService=e}oneOfMessage(e,t){return this.t("_1_doit_tre_70659",e,this.translationService.formatListValues(t.map(e=>this.t(e))))}};$s=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(ws=void 0!==Ai&&Ai)?ws:Object])],$s);var Ps;let Ns=class extends $s{constructor(e){super(e)}accreditationsCustomFieldInputSchema(){return js.Ik().shape({customFieldId:js.ai().required(this.t("le_champ_person_80074")),conditionValue:js.gl().required(this.t("la_condition_es_66568"))})}};Ns=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Ps=void 0!==Ai&&Ai)?Ps:Object])],Ns);const ks=js.gl(e=>e&&Vo.c9.fromISO(e).isValid);var zs;let Ls=class extends $s{constructor(e){super(e)}accreditationsSlotInputDefault(){return{name:""}}createAccreditationSlotSchema(){return js.Ik().shape({slot:this.accreditationsSlotInputSchema()})}accreditationsSlotInputSchema(){return js.Ik().shape({name:js.Yj(),maxResources:js.ai().nullable(),date:ks.typeError(this.t("la_date_est_inv_22002")).nullable()})}};Ls=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(zs=void 0!==Ai&&Ai)?zs:Object])],Ls);var Fs,Us,Bs;let Gs=class extends $s{accreditationsCustomFieldInput;accreditationsSlotInput;constructor(e,t,n){super(e),this.accreditationsCustomFieldInput=t,this.accreditationsSlotInput=n}createUpdateAccreditationValuesDefault(e,t,n){const i=this.accreditationInputDefault(e,t,n);return{accreditation:i,hasNumberOfDaysLimit:"number"==typeof i.numberOfDaysLimit}}accreditationInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_de_l_acc_82676")),accreditationCategoryId:js.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),description:js.Yj(),privateNote:js.Yj(),acronym:js.Yj(),color:js.Yj().required(this.t("la_couleur_est_95740")),icon:js.Yj().required(this.t("l_ic_ne_est_req_15843")).oneOf(qn,this.t("l_ic_ne_est_req_15843")),weezeventIsSynchronized:js.zM().required(),address:js.Yj().nullable(),latitude:js.ai().nullable().typeError(this.t("la_latitude_doi_43118")),longitude:js.ai().nullable().typeError(this.t("la_longitude_do_35170")),zoom:js.ai().required(this.t("le_niveau_de_zo_52687")).min(0,this.t("le_niveau_de_zo_38516")).max(23,this.t("le_niveau_de_zo_38516")),layer:js.Yj().required(this.t("le_fond_de_cart_48524")).oneOf(Kn,this.t("le_fond_de_cart_48524")),slots:js.YO().of(this.accreditationsSlotInput.accreditationsSlotInputSchema()),accreditationDisplay:js.Yj().required(this.t("le_type_d_affic_60154")).oneOf(Tn,this.t("le_type_d_affic_60154")).test("calendar-slots",this.t("tous_les_cr_nea_42033"),(e,t)=>e!==Y.Calendar||h(t.parent.slots)&&t.parent.slots.every(e=>e.date?.isValid)),numberOfDaysLimit:js.ai().notRequired(),accreditationsCustomFields:js.YO().of(this.accreditationsCustomFieldInput.accreditationsCustomFieldInputSchema()),formCustomFields:js.YO(),tagsIds:js.YO().of(js.ai())})}createUpdateAccreditationSchema(e){const t=this.accreditationInputSchema();return js.Ik().shape({accreditation:e?t.shape({fields:e}):t})}accreditationInputDefault(e,t,n){let i=t?.accreditationCategoryId??n;return Number.isInteger(i)||(i=null),{accreditationCategoryId:i,name:t?.name??"",description:t?.description??"",privateNote:t?.privateNote??"",acronym:t?.acronym??"",color:t?.color??M.colors.primary500.value,icon:t?.icon??He.BadgeCheck,weezeventIsSynchronized:t?.weezeventIsSynchronized??!0,willAutoAccredit:t?.willAutoAccredit??!1,address:t?.address??null,latitude:t?.latitude??null,longitude:t?.longitude??null,zoom:t?.zoom??13,layer:t?.layer??e,accreditationDisplay:t?.accreditationDisplay??Y.List,numberOfDaysLimit:t?.numberOfDaysLimit??null,slots:(0,vs.A)(t?.slots??[],e=>(0,bs.A)([e.date?.toMillis(),e.name])),conditionsOperator:t?.conditionsOperator??ge.And,accreditationsCustomFields:t?.accreditationsCustomFields??[],tagsIds:t?.tagsIds??[],fields:t?.fields??{},formCustomFields:t?.formCustomFields??[]}}};Gs=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Fs=void 0!==Ai&&Ai)?Fs:Object,"function"==typeof(Us=void 0!==Ns&&Ns)?Us:Object,"function"==typeof(Bs=void 0!==Ls&&Ls)?Bs:Object])],Gs);var Vs;let Ws=class extends $s{constructor(e){super(e)}createUpdateAccreditationProfileValuesDefault(e,t){return{accreditationProfile:this.accreditationProfileInputDefault(e,t)}}accreditationProfileInputSchema(){return js.Ik().shape({accreditationProfileCategoryId:js.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),name:js.Yj().required(this.t("le_nom_de_l_acc_82676")),description:js.Yj(),acronym:js.Yj().nullable(),color:js.Yj().required(this.t("la_couleur_est_95740")),icon:js.Yj().required(this.t("l_ic_ne_est_req_15843")).oneOf(qn,this.t("l_ic_ne_est_req_15843")),accreditationsSlotsIds:js.YO().of(js.ai()).min(1,this.t("vous_devez_s_le_34381"))})}createUpdateAccreditationProfileSchema(){return js.Ik().shape({accreditationProfile:this.accreditationProfileInputSchema()})}accreditationProfileInputDefault(e,t){let n=e?.accreditationProfileCategoryId??t;return Number.isInteger(n)||(n=null),{accreditationProfileCategoryId:n,name:e?.name??"",description:e?.description??"",acronym:e?.acronym??"",color:e?.color??M.colors.primary500.value,icon:e?.icon??He.BadgeCheck,accreditationsSlotsIds:e?.accreditationsSlotsIds??[]}}};Ws=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Vs=void 0!==Ai&&Ai)?Vs:Object])],Ws);var qs=n(4809);const Ys=5e9,Hs=2e7;function Zs(e){let t=e;try{t=new URL(e).pathname}catch{}if(v(t)){const e=t.split(/[\\/]/).pop(),n=e.lastIndexOf(".");let i=e,o="";return n>=0&&(i=e.substring(0,n),o=e.substring(n+1).toLowerCase()),{path:t,name:i,extension:o}}return{path:"",name:"",extension:""}}var Ks;!function(e){e.Csv="text/csv",e.Default="application/octet-stream",e.Excel="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.Gif="image/gif",e.Jpeg="image/jpeg",e.Pdf="application/pdf",e.Png="image/png",e.Zip="application/zip"}(Ks||(Ks={}));const Qs=e=>{switch(e.toLowerCase()){case"csv":return Ks.Csv;case"xls":case"xlsx":return Ks.Excel;case"gif":return Ks.Gif;case"jpg":case"jpeg":return Ks.Jpeg;case"pdf":return Ks.Pdf;case"png":return Ks.Png;case"zip":return Ks.Zip;default:return Ks.Default}};var Xs;let Js=class extends $s{constructor(e){super(e)}csvDocumentInputDefault(e){return{key:"",name:"",acl:"",formats:{timeFormat:"HH:mm",dateFormat:Ko,datetimeFormat:"yyyy-MM-dd HH:mm",...e}}}schema(){const e=this.t("le_document_est_86403");return js.Ik().shape({acl:js.Yj().required(e),delimiter:js.Yj().optional().test("is-valid-value",this.t("delimiter_value_52108"),e=>!e||!qs.BAD_DELIMITERS.includes(e)),key:js.Yj().required(e).test("is-a-csv",this.t("le_fichier_n_es_33134"),e=>Qs(Zs(e).extension)===Ks.Csv),name:js.Yj().required(e),newline:js.Yj().optional().test("is-valid-value",this.t("newline_charact_88066"),e=>!e||["\r","\n","\r\n"].includes(e)),quoteChar:js.Yj().optional(),formats:js.Ik().shape({timeFormat:js.Yj().optional(),dateFormat:js.Yj().optional(),datetimeFormat:js.Yj().optional()}),file:js.gl().test("is-not-empty",this.t("the_file_is_emp_77243"),e=>!e||e.size>0).test("is-not-too-big",this.t("le_fichier_est_17522"),e=>!e||e.size=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Xs=void 0!==Ai&&Ai)?Xs:Object])],Js);var er,tr,nr;let ir=class extends $s{static{er=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={Id:"id"};static IMPORT_COLUMNS_REQUIRED=e=>e===Ze.Update?[er.IMPORT_COLUMNS_DEFAULT.Id]:[];constructor(e,t){super(t),this.csvInputService=e}default(e){return{input:{csv:this.csvInputService.csvDocumentInputDefault(e),mode:Ze.Upsert}}}schema(){return js.Ik().shape({input:js.Ik().shape({csv:this.csvInputService.schema(),mode:js.Yj().oneOf(Yn,this.t("le_mode_d_impor_75706"))})})}};ir=er=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(tr=void 0!==Js&&Js)?tr:Object,"function"==typeof(nr=void 0!==Ai&&Ai)?nr:Object])],ir);var or,ar;let sr=class extends ir{csvInputService;default(e){return{input:{csv:this.csvInputService.csvDocumentInputDefault(e),mappings:[],presets:[],mode:Ze.Upsert,tag:""}}}schema(){return js.Ik().shape({input:js.Ik().shape({csv:this.csvInputService.schema(),mappings:js.YO().of(js.Yj().nullable()),presets:js.YO().of(js.Ik().shape({customFieldId:js.ai().positive(this.t("le_choix_du_typ_07079")),value:js.gl().when("customFieldId",{is:e=>e>-1,then:e=>e.required(this.t("la_valeur_du_ch_65599"))})})),mode:js.Yj().oneOf(Yn,this.t("le_mode_d_impor_75706")),tag:js.Yj().required("a_tag_must_be_s_23274")})})}settingsStepSchema(){return js.Ik().shape({input:js.Ik().shape({csv:this.csvInputService.schema()})})}mappingStepSchema(){return js.Ik().shape({input:js.Ik().shape({mappings:js.YO().of(js.Yj().nullable()),presets:js.YO().of(js.Ik().shape({customFieldId:js.ai().positive(this.t("le_choix_du_typ_07079")),value:js.gl().when("customFieldId",{is:e=>e>-1,then:e=>e.required(this.t("la_valeur_du_ch_65599"))})})),mode:js.Yj().oneOf(Yn,this.t("le_mode_d_impor_75706")),tag:js.Yj().required("a_tag_must_be_s_23274")})})}constructor(e,t){super(e,t),this.csvInputService=e}};sr=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(or=void 0!==Js&&Js)?or:Object,"function"==typeof(ar=void 0!==Ai&&Ai)?ar:Object])],sr);var rr,dr,lr;let cr=class extends sr{static{rr=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...sr.IMPORT_COLUMNS_DEFAULT,AccreditationName:"accreditationName",AccreditationCategoryName:"accreditationCategoryName",SlotName:"slotName",SlotDate:"slotDate",MaxResources:"slotMaxResources",Acronym:"acronym",Color:"color",Icon:"icon",Description:"description",ConditionsOperator:"conditionsOperator",Address:"address",Latitude:"latitude",Longitude:"longitude",MapLayer:"mapLayer",MapZoom:"mapZoom",PrivateNote:"privateNote",Tags:"tags"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ze.Update?[rr.IMPORT_COLUMNS_DEFAULT.Id]:[],rr.IMPORT_COLUMNS_DEFAULT.AccreditationName,rr.IMPORT_COLUMNS_DEFAULT.AccreditationCategoryName];constructor(e,t){super(e,t),this.csvInputService=e}};cr=rr=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(dr=void 0!==Js&&Js)?dr:Object,"function"==typeof(lr=void 0!==Ai&&Ai)?lr:Object])],cr);var ur,mr,gr;let hr=class extends sr{static{ur=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...sr.IMPORT_COLUMNS_DEFAULT,AccreditationProfileCategoryName:"accreditationProfileCategoryName",AccreditationProfileName:"accreditationProfileName",Acronym:"acronym",Color:"color",Icon:"icon",Description:"description"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ze.Update?[ur.IMPORT_COLUMNS_DEFAULT.Id]:[],ur.IMPORT_COLUMNS_DEFAULT.AccreditationProfileCategoryName,ur.IMPORT_COLUMNS_DEFAULT.AccreditationProfileName];constructor(e,t){super(e,t),this.csvInputService=e}};hr=ur=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(mr=void 0!==Js&&Js)?mr:Object,"function"==typeof(gr=void 0!==Ai&&Ai)?gr:Object])],hr);var pr;let fr=class extends $s{constructor(e){super(e)}schema(){const e=this.t("le_document_est_86403");return js.Ik().shape({acl:js.Yj().required(e),key:js.Yj().required(e).test("is-a-zip",this.t("le_fichier_n_es_91526"),e=>Qs(Zs(e).extension)===Ks.Zip),name:js.Yj().required(e),file:js.gl().test("is-not-too-big",this.t("le_fichier_est_17522"),e=>!e||e.size=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(pr=void 0!==Ai&&Ai)?pr:Object])],fr);var Ir;let _r=class extends $s{constructor(e){super(e)}signInSchema(){return js.Ik().shape({email:this.email()})}signInPasswordSchema(){return js.Ik().shape({email:this.email(),password:this.password()})}codeSchema(){return js.Ik().shape({code:this.code()})}emailSchema(){return js.Ik().shape({email:this.email()})}emailConfirmSchema(){return js.Ik().shape({email:this.email(),emailConfirm:this.emailConfirm()})}emailCodeSchema(){return js.Ik().shape({email:this.email(),code:this.code()})}email(){return js.Yj().required(this.t("l_e_mail_est_re_04856")).email(this.t("l_e_mail_est_re_04856"))}emailConfirm(){return js.Yj().required(this.t("la_confirmation_53449")).email(this.t("la_confirmation_53449")).test("same-as-email",this.t("l_e_mail_et_la_57164"),function(){return this.parent.email===this.parent.emailConfirm})}code(){return js.Yj().required(this.t("le_code_est_req_77618")).length(6,this.t("le_code_doit_co_37160"))}password(){return js.Yj().required(this.t("le_mot_de_passe_14773"))}passwordRules(){return js.Yj().required(this.t("le_mot_de_passe_24842")).test("valid-password",this.t("le_mot_de_passe_24842"),function(){return"string"==typeof(e=this.parent.password)&&e.length>=16&&function(e){return"string"==typeof e&&null!==e.match(/\d/)}(this.parent.password)&&function(e){return"string"==typeof e&&null!==e.match(/[A-Z]/)&&null!==e.match(/[a-z]/)}(this.parent.password)&&function(e){return"string"==typeof e&&null!==e.match(/[^A-Za-z0-9]/)}(this.parent.password);var e})}};_r=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Ir=void 0!==Ai&&Ai)?Ir:Object])],_r);var yr;let xr=class extends $s{constructor(e){super(e)}organizationInputDefault(e){return{name:e.name,features:e.features,customBadges:e.customBadges,periodEndAt:e.periodEndAt,usersIds:e.users.map(({id:e})=>e),isBlocked:e.isBlocked,weezeventOrganizationId:e.weezeventOrganizationId,useOldBilling:e.useOldBilling,membersLimit:e.membersLimit,pricePerMember:e.pricePerMember,billingComment:e.billingComment}}organizationInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_de_l_org_60618")),periodEndAt:ks.required(this.t("la_date_de_fin_04076")).typeError(this.t("la_date_de_fin_04076")).test("min-period-end-at",this.t("la_date_de_fin_63806"),function(){return Vo.c9.isDateTime(this.parent.periodEndAt)&&this.parent.periodEndAt.isValid&&this.parent.periodEndAt>Vo.c9.fromObject({year:2016})}),features:js.YO().of(js.Yj().oneOf(Fn,this.t("les_fonctionnal_36778"))),usersIds:js.YO().of(js.ai()),isBlocked:js.zM().required()})}updateOrganizationSchema(){return js.Ik().shape({organization:this.organizationInputSchema()})}};xr=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(yr=void 0!==Ai&&Ai)?yr:Object])],xr);var Sr=n(5526);function vr(e){return"string"!=typeof e||""===e.trim()||_(e.toLowerCase())===e}const br=[" ","@","£","$","¥","è","é","ù","ì","ò","Ç","Ø","ø","Å","å","Æ","æ","ß","É","!",'"',"#","¤","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","¡","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","Ä","Ö","Ñ","Ü","§","¿","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","ä","ö","ñ","ü","à"].concat(["^","{","}","\\","|","[","]","~","€","\n"]);var jr;const Ar=/^[a-z][a-z0-9]{2,10}$/i;var Cr;!function(e){e.Accreditations="accreditations",e.Everyone="everyone",e.Positions="positions",e.Segments="segments",e.States="states",e.Users="users"}(Cr||(Cr={}));let Er=class extends $s{constructor(e){super(e)}createUpdateCampaignValuesDefault(e,t,n,i){const o=this.campaignInputDefault(e,t,n,i);return{campaign:o,recipients:o.sendToEveryone?Cr.Everyone:h(o.states)?Cr.States:h(o.segmentsIds)?Cr.Segments:h(o.accreditationsCategoriesIds)||h(o.accreditationsIds)||h(o.accreditationsSlotsIds)?Cr.Accreditations:h(o.positionsCategoriesIds)||h(o.positionsIds)||h(o.positionsSlotsIds)?Cr.Positions:Cr.Users,customSender:v(n?.sender),textOrHtml:v(n?.html)?"html":"text"}}campaignStep1Fields(){return{name:js.Yj().required(this.t("le_nom_de_la_ca_63405")),campaignType:js.Yj().required(this.t("le_type_de_camp_96559")).oneOf(wn,this.t("le_type_de_camp_56467"))}}campaignStep1Schema(){return js.Ik().shape({campaign:js.Ik().shape({...this.campaignStep1Fields()})})}campaignStep2Fields(){const e=this;return{sender:js.Yj().test("is-valid",this.t("l_metteur_ne_r_16421"),function(){return!v(this.parent.sender)||Ar.test(this.parent.sender)}),text:js.Yj().test("non-empty-text",this.t("le_contenu_est_45048"),function(){return v(this.parent.text)||v(this.parent.html)}).test("only-valid-characters","",function(){if(this.parent.campaignType===le.Email)return!0;{const n=(t=this.parent.text,new Set(Array.from(t??"").filter(e=>!br.includes(e))));return!(n.size>0)||this.createError({message:e.translationService.translate("les_caract_res_84839",Array.from(n).join(", "))})}var t}).test("max-length",this.t("le_contenu_ne_p_25416"),function(){return this.parent.campaignType===le.Email||this.parent.text.length<1e3}).test("no-percent-encoded-variables",this.t("le_texte_de_l_e_71717"),function(){return!this.parent.text.includes("%7B")&&!this.parent.text.includes("%7D")}),subject:js.Yj().when("campaignType",{is:le.Email,then:e=>e.required(this.t("le_sujet_est_re_18923"))}),html:js.Yj().test("non-empty-text",this.t(this.t("le_code_html_es_52280")),function(){return v(this.parent.text)||v(this.parent.html)}),replyTo:js.Yj().email(this.t("l_adresse_de_r_53879")).test("clean-reply-to",this.t("l_adresse_de_r_53879"),function(){return vr(this.parent.replyTo)}),documents:js.YO().test("max-size",this.t("l_ensemble_des_32797"),function(){return this.parent.campaignType!==le.Email||!h(this.parent.documents)||(0,Sr.A)(this.parent.documents,e=>e.size)<2e7}),emailSenderId:js.ai().nullable(),attachments:js.YO().of(js.Yj()),includeDuplicateMembersAttachments:js.zM().required(),hasCalendarInvite:js.zM().required(),calendarInviteName:js.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("nom_de_l_v_nem_58512")),otherwise:e=>e.nullable()}),calendarInviteStartDate:ks.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")),otherwise:e=>e.nullable()}),calendarInviteStartTime:js.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("heure_de_d_but_90785")),otherwise:e=>e.nullable()}),calendarInviteEndDate:ks.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")),otherwise:e=>e.nullable()}),calendarInviteEndTime:js.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("l_heure_de_fin_78626")),otherwise:e=>e.nullable()})}}campaignStep2Schema(){return js.Ik().shape({campaign:js.Ik().shape({...this.campaignStep2Fields()})})}campaignStep3Fields(){const e=this,t=function(){return this.parent.state!==de.Draft&&this.parent.state!==de.Scheduled||!1!==this.parent.sendToEveryone||0!==this.parent.states.length||0!==this.parent.positionsCategoriesIds.length||0!==this.parent.positionsIds.length||0!==this.parent.positionsSlotsIds.length||0!==this.parent.tagsIds.length||0!==this.parent.accreditationsCategoriesIds.length||0!==this.parent.accreditationsIds.length||0!==this.parent.accreditationsSlotsIds.length||0!==this.parent.usersInfosIds.length||0!==this.parent.segmentsIds.length||this.createError({message:e.translationService.translate("vous_devez_s_le_80552")})};return{sendToEveryone:js.zM().required(this.t("requis_75853")),states:js.YO().of(js.Yj()).test("non-empty","",t),positionsCategoriesIds:js.YO().of(js.ai()).test("non-empty","",t),positionsIds:js.YO().of(js.ai()).test("non-empty","",t),positionsSlotsIds:js.YO().of(js.ai()).test("non-empty","",t),tagsIds:js.YO().of(js.ai()).test("non-empty","",t),accreditationsCategoriesIds:js.YO().of(js.ai()).test("non-empty","",t),accreditationsIds:js.YO().of(js.ai()).test("non-empty","",t),accreditationsSlotsIds:js.YO().of(js.ai()).test("non-empty","",t),usersInfosIds:js.YO().of(js.ai()).test("non-empty","",t),segmentsIds:js.YO().of(js.ai()).test("non-empty","",t)}}campaignStep3Schema(){return js.Ik().shape({campaign:js.Ik().shape({...this.campaignStep3Fields()})})}campaignStep4Fields(){return{scheduledAtDate:ks.when("scheduleType",{is:se.Datetime,then:e=>e.required(this.t("la_date_d_envoi_17792")).typeError(this.t("la_date_d_envoi_17792"))}),scheduledAtTime:js.Yj().when("scheduleType",{is:se.Datetime,then:e=>e.required(this.t("l_heure_d_envoi_53643")).matches(/\d{2}:\d{2}/,this.t("l_heure_d_envoi_53643"))}),scheduleAnchor:js.Yj().when("scheduleType",{is:se.Anchor,then:e=>e.required(this.t("d_but_fin_est_r_67120")).oneOf(Rn,this.t("d_but_fin_est_r_67120"))}),scheduleOffsetDays:js.ai().when("scheduleType",{is:se.Anchor,then:e=>e.required(this.t("le_nombre_de_jo_27562")).min(0,this.t("le_nombre_de_jo_62798"))}),scheduleBeforeAfter:js.Yj().when("scheduleType",{is:se.Anchor,then:e=>e.required(this.t("avant_apr_s_est_31173")).oneOf(Mn,this.t("avant_apr_s_est_31173"))}),scheduleSendTime:js.Yj().when("scheduleType",{is:se.Anchor,then:e=>e.required(this.t("l_heure_d_envoi_53643")).matches(/\d{2}:\d{2}/,this.t("l_heure_d_envoi_53643"))})}}campaignStep4Schema(){return js.Ik().shape({campaign:js.Ik().shape({...this.campaignStep4Fields()})})}campaignInputSchema(){return js.Ik().shape({...this.campaignStep1Fields(),...this.campaignStep2Fields(),...this.campaignStep3Fields(),...this.campaignStep4Fields()})}createUpdateCampaignSchema(){return js.Ik().shape({campaign:this.campaignInputSchema()})}campaignInputDefault(e,t,n,i){let o=n?.segmentsIds??[],a=n?.usersInfosIds??[];if(v(i))try{const e=JSON.parse(Gi(i));e.segmentId&&(o=[e.segmentId]),h(e.usersInfosIds)&&(a=e.usersInfosIds)}catch{}const s=!h(o)&&!h(a)&&(n?.sendToEveryone??!1);return{name:n?.name??"",state:n?n.scheduleType!==se.NoSchedule&&n.state===de.Draft?de.Scheduled:n.state:e?de.Template:de.Draft,campaignType:n?.campaignType??le.Email,sender:n?.sender??"",text:n?.text??"",subject:n?.subject??"",html:n?.html??"",replyTo:n?.replyTo??"",sendToEveryone:s,states:n?.states??[],positionsCategoriesIds:n?.positionsCategoriesIds??[],positionsIds:n?.positionsIds??[],positionsSlotsIds:n?.positionsSlotsIds??[],tagsIds:n?.tagsIds??[],accreditationsCategoriesIds:n?.accreditationsCategoriesIds??[],accreditationsIds:n?.accreditationsIds??[],accreditationsSlotsIds:n?.accreditationsSlotsIds??[],usersInfosIds:a,segmentsIds:o,scheduledAtDate:n?.scheduledAt??void 0,scheduledAtTime:n?.scheduledAt?.toFormat("HH:mm")??void 0,documents:n?.documents??[],emailSenderId:n?.emailSenderId??t,attachments:n?.attachments??[],includeDuplicateMembersAttachments:n?.includeDuplicateMembersAttachments??!1,hasCalendarInvite:n?.hasCalendarInvite??!1,calendarInviteName:n?.calendarInviteName??null,calendarInviteStartDate:n?.calendarInviteStartDate??null,calendarInviteStartTime:n?.calendarInviteStartTime??null,calendarInviteEndDate:n?.calendarInviteEndDate??null,calendarInviteEndTime:n?.calendarInviteEndTime??null,scheduleType:n?.scheduleType??se.NoSchedule,scheduleAnchor:n?.scheduleAnchor??oe.EventStart,scheduleOffsetDays:n?.scheduleOffsetDays??0,scheduleBeforeAfter:n?.scheduleBeforeAfter??ae.Before,scheduleSendTime:n?.scheduleSendTime??"00:00"}}};Er=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(jr=void 0!==Ai&&Ai)?jr:Object])],Er);var Tr;let Or=class extends $s{constructor(e){super(e)}commentInputDefault(){return{content:""}}commentInputSchema(){return js.Ik().shape({content:js.Yj().required(this.t("le_commentaire_33393"))})}createCommentSchema(){return js.Ik().shape({comment:this.commentInputSchema()})}};Or=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Tr=void 0!==Ai&&Ai)?Tr:Object])],Or),u({"96dpi":{height:1587,width:1123}});const Rr=u({"96dpi":{height:1122,width:793}});u({"96dpi":{height:559,width:396}}),u({"96dpi":{height:323,width:204}}),u({A4:{height:"297mm",width:"210mm"},A5:{height:"210mm",width:"148mm"},A6:{height:"148mm",width:"105mm"},CB:{height:"53.98mm",width:"85.6mm"}});var Mr;let Dr=class extends $s{constructor(e){super(e)}customDocumentInputDefault(e){return{name:e?.name??"",slug:e?.slug??"",populationsIds:e?.populationsIds??[],configuration:e?.configuration??this.getConfigurationDefault(),shouldRegenerateTicketIdOnDownload:e?.shouldRegenerateTicketIdOnDownload??!1}}customDocumentInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_est_requ_61536")),slug:js.Yj().required(this.t("le_nom_de_la_va_15472")).test("is-valid",this.t("le_nom_de_la_va_15472"),e=>null!==e.match(/^[a-z][a-z0-9]*$/))})}getConfigurationDefault(){return{bleed:!1,height:Rr["96dpi"].height,pages:[this.getPageDefault()],width:Rr["96dpi"].width}}getPageDefault(){return{id:ga(),accreditationsSlotsIds:[],accreditationAcronym:"",conditionsCustomFields:[],elements:[],hasConditions:!1,positionsSlotsIds:[],segmentsIds:[]}}getContainerElementDefault(e,t,n){return{type:"container",id:e,inContainer:!!t,inGrid:"grid"===t?.type,backgroundColor:"",accreditationsSlotsIds:[],accreditationAcronym:"",align:"start",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,conditionsCustomFields:[],direction:"row",elements:[],gap:0,hasBackground:!1,hasConditions:!1,hasRotate:!1,height:100,isRatioLocked:!1,justify:"start",left:0,name:this.t("conteneur_1_03989",n+1),positionsSlotsIds:[],px:0,py:0,rotateDegree:0,segmentsIds:[],top:0,width:100,zIndex:1}}getGridElementDefault(e,t,n){return{type:"grid",id:e,inContainer:!!t,inGrid:"grid"===t?.type,backgroundColor:"",accreditationsSlotsIds:[],accreditationAcronym:"",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,columnGap:0,columns:2,conditionsCustomFields:[],elements:[],hasBackground:!1,hasConditions:!1,hasRotate:!1,height:100,isRatioLocked:!1,left:0,name:this.t("grille_1_66496",n+1),positionsSlotsIds:[],px:0,py:0,rotateDegree:0,rowGap:0,rows:2,segmentsIds:[],top:0,width:100,zIndex:1}}getImageElementDefault(e,t,n){return{type:"image",id:e,inContainer:!!t,inGrid:"grid"===t?.type,accreditationsSlotsIds:[],accreditationAcronym:"",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,conditionsCustomFields:[],hasConditions:!1,hasRotate:!1,height:100,isRatioLocked:!1,left:0,name:this.t("image_1_30956",n+1),positionsSlotsIds:[],px:0,py:0,rotateDegree:0,segmentsIds:[],top:0,width:100,zIndex:1}}getTextElementDefault(e,t,n){return{type:"text",id:e,inContainer:!!t,inGrid:"grid"===t?.type,accreditationsSlotsIds:[],accreditationAcronym:"",align:"start",hasBackground:!1,backgroundColor:"",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,conditionsCustomFields:[],hasConditions:!1,hasRotate:!1,height:20,isRatioLocked:!1,left:0,name:this.t("texte_1_59540",n+1),text:"",color:"#1d2939",fontFamily:"Open Sans",fontSize:14,fontWeight:400,justify:"start",lineHeight:1.4,positionsSlotsIds:[],px:0,py:0,rotateDegree:0,segmentsIds:[],textTransform:"none",top:0,width:100,zIndex:1}}};function wr(e){throw new Error("Didn't expect to get here")}Dr=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Mr=void 0!==Ai&&Ai)?Mr:Object])],Dr);const $r=/^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$/,Pr={AD:24,AE:23,AL:28,AO:25,AT:20,AX:18,AZ:28,BA:20,BE:16,BF:28,BG:22,BH:22,BI:27,BJ:28,BL:27,BR:29,BY:28,CF:27,CG:27,CH:21,CI:28,CM:27,CR:22,CV:25,CY:28,CZ:24,DE:22,DJ:27,DK:18,DO:28,DZ:26,EA:24,EE:20,EG:29,ES:24,FI:18,FK:18,FO:18,FR:27,GA:27,GB:22,GE:22,GF:27,GG:22,GI:23,GL:18,GP:27,GQ:27,GR:27,GT:28,GW:25,HN:28,HR:21,HU:28,IC:24,IE:22,IL:23,IM:22,IQ:23,IR:26,IS:26,IT:27,JE:22,JO:30,KM:27,KW:30,KZ:20,LB:28,LC:32,LI:21,LT:20,LU:20,LV:21,LY:25,MA:28,MC:27,MD:24,ME:22,MF:27,MG:27,MK:19,ML:28,MN:20,MQ:27,MR:27,MT:31,MU:30,MZ:25,NC:27,NE:28,NI:28,NL:18,NO:15,OM:23,PF:27,PK:24,PL:28,PM:27,PS:29,PT:25,QA:29,RE:27,RO:24,RS:22,RU:33,SA:24,SC:31,SD:18,SE:24,SI:19,SK:24,SM:27,SN:28,SO:23,ST:25,SV:28,TD:27,TF:27,TG:28,TL:23,TN:24,TR:26,UA:29,VA:22,VG:24,WF:27,XK:20,YE:30,YT:27};function Nr(e,t){switch(t){case _e.Accreditation:return e("accr_ditations_39450");case _e.Delegation:return e("d_l_gations_78318");case _e.Event:return e("Event");case _e.Position:return e("missions_63972");case _e.UserInfo:return e("membres_11310");default:return wr()}}u([Fe.Checkbox,Fe.Select,Fe.Validation]);const kr=["default","regex"],zr=["all","numbers","noSymbols","uppercase","lowercase"],Lr=["any","past","between"];function Fr(e){switch(e.fieldType){case Fe.Text:return e.fieldSubtype===Le.Freeform?"text":null;case Fe.Textarea:return"text";case Fe.Number:return"number";case Fe.Date:case Fe.Datetime:return e.fieldProperty===ze.DateOfBirth?null:"date";default:return null}}function Ur(e){switch(e){case"text":return{mode:"default",allowedCharacters:"all"};case"date":return{range:"any"};default:return{}}}Fe.Text,Fe.Text,Fe.Country,Fe.Checkbox,Fe.Country,Fe.Language,Fe.Nationality,Fe.Select;var Br;const Gr=["key","name","acl"];let Vr=class extends $s{constructor(e){super(e)}documentInputDefault(){return{key:"",name:"",acl:""}}documentInputSchema(e){const t=v(e)?this.t("_1_est_requis_99856",e):this.t("le_document_est_86403");return js.Ik().shape({key:js.Yj().required(t),name:js.Yj().required(t),acl:js.Yj().required(t)})}documentInputSchemaNotRequired(){return js.Ik().shape({key:js.Yj(),name:js.Yj(),acl:js.Yj()})}};Vr=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Br=void 0!==Ai&&Ai)?Br:Object])],Vr);var Wr,qr;let Yr=class extends $s{documentInputService;constructor(e,t){super(t),this.documentInputService=e}customFieldInputDefault(e,t){const n=e?.fieldType??Fe.Text,i=e?.fieldSubtype??Le.Freeform;return{name:e?.name??"",label:e?.label??"",customFieldCategoryId:e?.customFieldCategoryId??t[0].id,description:e?.description??"",variety:e?.variety??_e.UserInfo,fieldType:n,fieldSubtype:i,listType:e?.listType??Xe.Default,fileType:e?.fileType??Be.Default,isPrivate:e?.isPrivate??!1,values:h(e?.values)?e.values:[],hasCondition:e?.hasCondition??!1,conditionCustomFieldId:e?.conditionCustomFieldId??null,conditionValue:e?.conditionValue??!1,canSelectMultiple:e?.canSelectMultiple??!1,document:e?.document||this.documentInputService.documentInputDefault(),isEncrypted:e?.isEncrypted??!1,canBeUpdatedByUrl:e?.canBeUpdatedByUrl??!1,validationRules:{...Ur(Fr({fieldType:n,fieldSubtype:i,fieldProperty:e?.fieldProperty})),...e?.validationRules},addressPostalCodeCustomFieldId:e?.addressPostalCodeCustomFieldId??null,addressCityCustomFieldId:e?.addressCityCustomFieldId??null,addressCountryCustomFieldId:e?.addressCountryCustomFieldId??null}}customFieldInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_du_champ_17959")),label:js.Yj(),customFieldCategoryId:js.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),fieldType:js.Yj().required(this.t("le_type_est_req_41180")).oneOf(Bn,this.t("le_type_est_req_41180")),fieldSubtype:js.Yj().required(this.t("le_sous_type_es_85221")).oneOf(Un,this.t("le_sous_type_es_85221")),listType:js.Yj().required(this.t("le_style_des_op_46016")).oneOf(Zn,this.t("le_style_des_op_46016")),fileType:js.Yj().required(this.t("l_affichage_du_11344")).oneOf(Gn,this.t("l_affichage_du_11344")),isPrivate:js.zM().nullable(),hasCondition:js.zM().nullable(),values:js.YO().when("fieldType",{is:Fe.Select,then:e=>e.of(js.Ik().shape({id:js.ai(),value:js.Yj().required(this.t("la_valeur_est_r_70136"))})).required(this.t("vous_devez_s_le_95641")).min(1,this.t("vous_devez_s_le_95641"))}),conditionCustomFieldId:js.ai().when("hasCondition",{is:!0,then:e=>e.required(),otherwise:e=>e.nullable()}),conditionValue:js.gl(),canSelectMultiple:js.zM().nullable(),document:this.documentInputService.documentInputSchemaNotRequired(),isEncrypted:js.zM().required(),canBeUpdatedByUrl:js.zM().required(),validationRules:js.Ik().required().when(["fieldType","fieldSubtype"],([e,t])=>this.validationRulesSchema(e,t)),addressPostalCodeCustomFieldId:js.ai().nullable(),addressCityCustomFieldId:js.ai().nullable(),addressCountryCustomFieldId:js.ai().nullable()})}validationRulesSchema(e,t){const n=()=>js.ai().nullable().integer(this.t("ce_nombre_doit_35487")),i=e=>n().min(e,this.t("ce_nombre_doit_66066",e)),o=(e,t)=>e.when(t,([e],t)=>"number"==typeof e?t.min(e,this.t("le_maximum_doit_04562")):t);switch(Fr({fieldType:e,fieldSubtype:t})){case"text":return js.Ik().shape({mode:js.Yj().oneOf([...kr]),minLength:i(0),maxLength:o(i(1),"minLength"),allowedCharacters:js.Yj().oneOf([...zr]),regex:js.Yj().when("mode",{is:"regex",then:e=>e.required(this.t("l_expression_r_88693")).test("valid-regex",this.t("l_expression_r_68347"),e=>function(e){try{return new RegExp(e??""),!0}catch{return!1}}(e))}),regexMessage:js.Yj().when("mode",{is:"regex",then:e=>e.required(this.t("le_message_d_er_84907"))})});case"number":return js.Ik().shape({min:n(),max:o(n(),"min")});case"date":return js.Ik().shape({range:js.Yj().oneOf([...Lr]),start:ks.nullable().when("range",{is:"between",then:e=>e.required(this.t("la_date_de_d_bu_05030"))}),end:ks.nullable().when("range",{is:"between",then:e=>e.required(this.t("la_date_de_fin_32246"))}).test("end-after-start",this.t("la_date_de_fin_21930"),function(e){const t=this.parent.start;return!t||!e||aa(e)>=aa(t)})});default:return js.Ik()}}createUpdateCustomFieldSchema(){return js.Ik().shape({customField:this.customFieldInputSchema()})}};Yr=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Wr=void 0!==Vr&&Vr)?Wr:Object,"function"==typeof(qr=void 0!==Ai&&Ai)?qr:Object])],Yr);class Hr extends $s{constructor(e){super(e)}customSlotInputDefault(){return{name:"",startTime:"",endTime:""}}customSlotInputSchema(){return js.Ik().shape({name:js.Yj().nullable(),startTime:js.Yj().required(this.t("le_d_but_du_cr_40745")),endTime:js.Yj().required(this.t("la_fin_du_cr_ne_90351"))})}}var Zr,Kr;let Qr=class extends $s{customSlotInputService;constructor(e,t){super(e),this.customSlotInputService=t}customSlotPeriodInputDefault(){return{name:"",customSlots:[this.customSlotInputService.customSlotInputDefault()],hideNameDates:!1,displayAsCalendar:!1,hasCondition:!1,conditionCustomFieldId:null,conditionValue:!1}}customSlotPeriodInputSchema(){return js.Ik().shape({customSlotPeriod:js.Ik().shape({name:js.Yj(),customSlots:js.YO().of(this.customSlotInputService.customSlotInputSchema()).required("").min(1,"")})})}};Qr=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Zr=void 0!==Ai&&Ai)?Zr:Object,"function"==typeof(Kr=void 0!==Hr&&Hr)?Kr:Object])],Qr);var Xr;let Jr=class extends $s{constructor(e){super(e)}delegationCategoryBannerInputDefault(){return{bannerType:-1,bannerVehicleType:ne.Car,min:1,max:10}}};Jr=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Xr=void 0!==Ai&&Ai)?Xr:Object])],Jr);var ed;let td=class extends $s{constructor(e){super(e)}delegationCategoryInputDefault(e){return{name:e.name,banners:e.banners}}};td=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(ed=void 0!==Ai&&Ai)?ed:Object])],td);var nd;let id=class extends $s{constructor(e){super(e)}delegationFormInviteValuesDefault(){return{usersInfos:[{email:"",fields:{firstName:"",lastName:""}}]}}delegationFormInviteValuesSchema(){return js.Ik().shape({usersInfos:js.YO().of(js.Ik().shape({email:js.Yj().email(this.t("l_e_mail_est_re_04856")).required(this.t("l_e_mail_est_re_04856")),fields:js.gl()})).min(1,"Vous devez invité au moins une personne.")})}};id=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(nd=void 0!==Ai&&Ai)?nd:Object])],id);var od=n(5582);function ad(e){return 3145===e||3360===e?{connectionTitle:"Connexion à votre espace personnel d’invitations",connectionSubtitle:"Connectez-vous à votre espace personnel d’invitations afin de gérer vos invités",delegationsListTitle:"Quel espace personnel d’invitations souhaitez-vous voir ?",delegationsListButton:"Voir cet espace personnel d’invitations",delegationHeader:"Gérer votre espace personnel d’invitations.",delegationHeaderEvent:"Gérer votre espace personnel d’invitations.",addMemberButton:"Ajouter un invité",tabMembers:"Invités ({1})",tabAccreditations:"Invitations",dashboardLeaders:"Exposants"}:3136===e?{connectionTitle:"connexion_mon_88378",connectionSubtitle:"connectez_vous_01298",delegationsListTitle:"quelle_d_l_gati_13930",delegationsListButton:"voir_cette_d_l_96190",delegationHeader:"g_rer_votre_d_l_49654",delegationHeaderEvent:"g_rer_votre_d_l_04420",addMemberButton:"ajouter_un_memb_33261",tabMembers:"membres_125561",tabAccreditations:"accr_ditations_39450",dashboardLeaders:"reponsable_82458_plural"}:{connectionTitle:"connexion_l_e_31965",connectionSubtitle:"connectez_vous_37685",delegationsListTitle:"quelle_d_l_gati_13930",delegationsListButton:"voir_cette_d_l_96190",delegationHeader:"g_rer_votre_d_l_49654",delegationHeaderEvent:"g_rer_votre_d_l_04420",addMemberButton:"ajouter_un_memb_33261",tabMembers:"membres_125561",tabAccreditations:"accr_ditations_39450",dashboardLeaders:"reponsable_82458_plural"}}var sd;let rd=class extends $s{constructor(e){super(e)}createUpdateDelegationValuesDefault(e,t){return{delegation:this.delegationInputDefault(e,t),selectedAccreditationsSlotsIds:[]}}delegationInputDefault(e,t){const n=t?.forms&&t?.parentDelegation?t.forms.find(e=>e.name===t.parentDelegation?.form.name):null,i=e?.formId??n?.id??null,o=h(t?.delegationsCategories)&&t?.parentDelegation?t.delegationsCategories.find(e=>e.name===t.parentDelegation?.delegationCategory.name):null;let a=e?.delegationCategoryId??o?.id??t?.delegationCategoryId;return Number.isInteger(a)||(a=null),{...this.getDefaultAccreditations(e),delegationCategoryId:a,parentId:e?.parentId??t?.parentId??null,name:e?.name??"",description:e?.description??"",leadersIds:e?.leadersIds??t?.parentDelegation?.leadersIds??[],formId:i,deadlineDate:e?.deadlineDate??null,maxResources:e?.maxResources??null,showInDelegationSpace:e?.showInDelegationSpace??!0,showFormLinkInDelegationSpace:e?.showFormLinkInDelegationSpace??!0,delegationsSpaceLayoutId:e?.delegationsSpaceLayoutId??null,columns:e?.columns??t?.parentDelegation?.columns??["name","accreditations","accreditation_state"],canLeadersAddMembers:e?.canLeadersAddMembers??!0,canLeadersDeleteMembers:e?.canLeadersDeleteMembers??!0,canLeadersDuplicateMembers:e?.canLeadersDuplicateMembers??!1,canLeadersEditColumns:e?.canLeadersEditColumns??!0,canLeadersEditCustomFields:e?.canLeadersEditCustomFields??!0,canLeadersEditMembers:e?.canLeadersEditMembers??!0,canLeadersImportMembers:e?.canLeadersImportMembers??!1,canLeadersSeeHiddenAccreditationsSlots:e?.canLeadersSeeHiddenAccreditationsSlots??!1,privateNote:e?.privateNote??t?.parentDelegation?.privateNote??"",addDefaultAccreditationsByAvailability:e?.addDefaultAccreditationsByAvailability??!1,showAllAccreditations:e?.showAllAccreditations??!1,tagsIds:e?.tagsIds??t?.parentDelegation?.tagsIds??[],customFields:e?.customFields||[],fields:e?.fields??{},campaignsIds:e?.campaignsIds??[],customDocumentsSlugs:e?.customDocumentsSlugs??[],usedCustomFieldsIds:e?.usedCustomFieldsIds??[],accreditationsProfiles:e?.accreditationsProfiles??[]}}delegationInputSchema(){return js.Ik().shape({parentId:js.ai().nullable(),name:js.Yj().when("parentId",{is:null,then:e=>e.required(this.t("le_nom_de_la_d_10042"))}),description:js.Yj(),delegationCategoryId:js.ai().required(this.t("la_cat_gorie_es_14008")).positive(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")),leadersIds:js.YO().of(js.ai()),formId:js.ai().required(this.t("le_formulaire_e_77404")).typeError(this.t("le_formulaire_e_77404")).test("form-id-valid",this.t("le_formulaire_e_77404"),e=>"number"==typeof e&&e>0),deadlineDate:ks.typeError(this.t("la_date_limite_91708")).nullable(),maxResources:js.ai().min(0).nullable(),showInDelegationSpace:js.zM().required(),showFormLinkInDelegationSpace:js.zM().required(),columns:js.YO().of(js.Yj()).required(this.t("vous_devez_choi_82605")).min(1,this.t("vous_devez_choi_82605")),canLeadersAddMembers:js.zM().required(),canLeadersDeleteMembers:js.zM().required(),canLeadersEditColumns:js.zM().required(),canLeadersEditMembers:js.zM().required(),canLeadersEditCustomFields:js.zM().required(),canLeadersImportMembers:js.zM().required(),canLeadersSeeHiddenAccreditationsSlots:js.zM().required(),privateNote:js.Yj(),accreditations:js.YO().of(js.Ik().shape({accreditationCategoryId:js.ai().required(),accreditationId:js.ai().required(),maxResources:js.gl().nullable(),willAutoAccredit:js.zM().required()})),accreditationsSlots:js.YO().of(js.Ik().shape({accreditationCategoryId:js.ai().required(),accreditationId:js.ai().required(),accreditationSlotId:js.ai().required(),isDefault:js.zM().required(),maxResources:js.gl().nullable()})),accreditationsProfiles:js.YO().of(js.Ik().shape({accreditationProfileId:js.ai().required(),maxResources:js.gl().nullable(),willAutoAccredit:js.zM().required()})),campaignsIds:js.YO().of(js.ai()),customDocumentsSlugs:js.YO().of(js.gl()),usedCustomFieldsIds:js.YO().of(js.ai())})}delegationUpdateFieldsSchema(e){return js.Ik().shape({fields:e})}createUpdateDelegationSchema(e){const t=this.delegationInputSchema();return js.Ik().shape({delegation:e?t.shape({fields:e}):t})}adminAddSchema(){return js.Ik().shape({usersInfosIds:js.YO().of(js.ai())})}getDefaultAccreditations(e){let t=e?.accreditationsCategories||[],n=e?.accreditations||[];const i=e?.accreditationsSlots||[];return h(i)&&(t=(0,od.A)(t.concat(i.map(e=>({accreditationCategoryId:e.accreditationCategoryId,maxResources:null}))),e=>e.accreditationCategoryId)),h(i)&&(n=(0,od.A)(n.concat(i.map(e=>({accreditationCategoryId:e.accreditationCategoryId,accreditationId:e.accreditationId,maxResources:null,willAutoAccredit:!1}))),e=>e.accreditationId)),{accreditationsCategories:t,accreditations:n,accreditationsSlots:i}}};rd=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(sd=void 0!==Ai&&Ai)?sd:Object])],rd);var dd,ld,cd;let ud=class extends sr{static{dd=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...sr.IMPORT_COLUMNS_DEFAULT,Name:"name",CategoryName:"categoryName",FormId:"formId",Deadline:"deadline",MaxResources:"maxResources",LeadersEmails:"leadersEmails",LeadersFirstNames:"leadersFirstnames",LeadersLastNames:"leadersLastnames",PrivateNote:"privateNote",Tags:"tags"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ze.Update?[dd.IMPORT_COLUMNS_DEFAULT.Id]:[],dd.IMPORT_COLUMNS_DEFAULT.Name,dd.IMPORT_COLUMNS_DEFAULT.CategoryName,dd.IMPORT_COLUMNS_DEFAULT.FormId];default(e){const t=super.default(e);return t.input={...t.input},t}constructor(e,t){super(e,t),this.csvInputService=e}};ud=dd=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(ld=void 0!==Js&&Js)?ld:Object,"function"==typeof(cd=void 0!==Ai&&Ai)?cd:Object])],ud);const md=e=>e.join("/"),gd=lo.HEAVENT_APPLICATION_BASENAME,hd={FIELDS:{PLURAL:"fields",SINGLE:"field"}},pd={AUTH:"auth",EDIT:"edit",CREATE:"create",EXPORT:"export",EXPORT_BASIC:"export/basic",EXPORT_API:"export/api",IMPORT:"import",INVITE:"invite"},fd={INFORMATION:"information",DASHBOARD:"dashboard",HISTORY:"history",REGISTRATION:"registration",DOCUMENTS:"documents",PROFILE:"profile",REPORTING:"reporting",FORMS:"forms",FORM:"form",MEMBER:"member",MEMBERS:"members",PREVIEW:"preview"},Id={LIST:"list"},_d=e=>md([e,pd.AUTH]),yd=e=>md([e,Id.LIST]),xd=e=>md([e,pd.CREATE]),Sd=e=>md([e,pd.EDIT]);var vd,bd,jd,Ad,Cd,Ed,Td,Od,Rd;function Md(e){switch(e){case jd.AccreditationsMatrix:case Ed.AccreditationsMatrix:return"table-cells";case Cd.Calendar:case Ed.Calendar:return"chart-gantt";case Ad.Card:return"rectangle-list";case bd.List:case jd.List:case Ad.List:case Cd.List:case Ed.List:return"table";case Cd.Map:case Ed.Map:return"map-location";case bd.SlotsList:case Cd.SlotsList:return"table";case bd.Table:return"table-cells";case bd.WeeklyCalendar:return"calendar";default:return wr()}}function Dd(e,t){switch(t){case jd.AccreditationsMatrix:case Ed.AccreditationsMatrix:return e("matrice_des_acc_84939");case Cd.Calendar:case Ed.Calendar:return e("vue_planning_91663");case Ad.Card:return e("vue_grille_37962");case bd.List:case jd.List:case Ad.List:case Cd.List:case Ed.List:return e("vue_liste_56882");case Cd.Map:case Ed.Map:return e("vue_carte_79064");case bd.SlotsList:case Cd.SlotsList:return e("vue_liste_cr_n_47406");case bd.Table:return e("vue_tableau_18026");case bd.WeeklyCalendar:return e("vue_calendrier_58086");default:return wr()}}!function(e){e.Category="Category",e.Date="Date"}(vd||(vd={})),(Rd=bd||(bd={})).List="List",Rd.SlotsList="SlotsList",Rd.Table="Table",Rd.WeeklyCalendar="WeeklyCalendar",(Od=jd||(jd={})).AccreditationsMatrix="AccreditationsMatrix",Od.List="List",function(e){e.Card="Card",e.List="List"}(Ad||(Ad={})),(Td=Cd||(Cd={})).Calendar="Calendar",Td.List="List",Td.Map="Map",Td.SlotsList="SlotsList",function(e){e.AccreditationsMatrix="AccreditationsMatrix",e.Calendar="Calendar",e.List="List",e.Map="Map"}(Ed||(Ed={}));var wd;let $d=class extends $s{constructor(e){super(e)}delegationsSpaceLayoutTabInputDefault(){return{name:this.t("tab_sans_nom_50048"),description:"",slug:"",canDelete:!0,isVisible:!0,isPinned:!1,segmentType:Rt.Volunteers,rendering:Ed.List,infos:{matrixShowAccreditations:!0,matrixShowProfiles:!0}}}defaultDashboardTab(){return{name:this.t("tableau_de_bord_24627"),description:"",slug:fd.DASHBOARD,canDelete:!1,isVisible:!0,isPinned:!0,segmentType:Rt.Volunteers,rendering:Ed.List,infos:{}}}defaultDocumentsTab(){return{name:this.t("Documents"),description:"",slug:fd.DOCUMENTS,canDelete:!1,isVisible:!0,isPinned:!1,segmentType:Rt.Volunteers,rendering:Ed.List,infos:{}}}tabInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_est_requ_61536")),description:js.Yj(),slug:js.Yj().required(this.t("l_url_est_requi_99475")).test("is-valid-slug",this.t("le_slug_ne_doit_10047"),e=>S(e)===e),canDelete:js.zM().required(),isVisible:js.zM().required(),isPinned:js.zM().required(),segmentType:js.Yj().oneOf([Rt.Accreditations,Rt.Volunteers],this.t("le_type_de_vue_62720")).required(this.t("le_type_de_vue_62720")),rendering:js.Yj().required(this.t("le_type_de_visu_51393"))})}};$d=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(wd=void 0!==Ai&&Ai)?wd:Object])],$d);var Pd,Nd;let kd=class extends $s{tabInput;constructor(e,t){super(e),this.tabInput=t}delegationSpaceLayoutInputDefault(e){return{name:e?.name??"",tabs:e?.tabs??[this.tabInput.defaultDashboardTab(),this.tabInput.defaultDocumentsTab()]}}delegationSpaceLayoutInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_du_layou_34851")),tabs:js.YO().of(this.tabInput.tabInputSchema())})}createUpdateDelegationSpaceLayout(){return js.Ik().shape({delegationsSpaceLayout:this.delegationSpaceLayoutInputSchema()})}};kd=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Pd=void 0!==Ai&&Ai)?Pd:Object,"function"==typeof(Nd=void 0!==$d&&$d)?Nd:Object])],kd);var zd,Ld;function Fd(e){return"production"===a.Development&&lo.HIGHLIGHT_CUSTOM_COLOURS?{grayCustom50:"#fabbf6",grayCustom500:"#fa5aef",grayCustom700:"#ff3df2",grayCustom800:"#fc23ee",grayCustom900:"#ff03ee",primaryCustom500:"#9cff66",primaryCustom600:"#61fc0d"}:{grayCustom50:e?.grayCustom50??M.colors.gray50.value,grayCustom500:e?.grayCustom500??M.colors.gray500.value,grayCustom700:e?.grayCustom700??M.colors.gray700.value,grayCustom800:e?.grayCustom800??M.colors.gray800.value,grayCustom900:e?.grayCustom900??M.colors.gray900.value,primaryCustom500:e?.primaryCustom500??M.colors.primary500.value,primaryCustom600:e?.primaryCustom600??M.colors.primary600.value}}let Ud=class extends $s{documentInputService;constructor(e,t){super(t),this.documentInputService=e}designInputDefault(e,t){return{banner:t?.banner??e?.banner??this.documentInputService.documentInputDefault(),logo:t?.logo??e?.logo??this.documentInputService.documentInputDefault(),colors:Fd(t?.colors??e?.colors)}}formParametersDesignInputDefault(e){return{banner:e?.banner??this.documentInputService.documentInputDefault(),colors:Fd(e?.colors)}}};Ud=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(zd=void 0!==Vr&&Vr)?zd:Object,"function"==typeof(Ld=void 0!==Ai&&Ai)?Ld:Object])],Ud);var Bd,Gd;let Vd=class extends $s{documentInputService;constructor(e,t){super(e),this.documentInputService=t}emailSenderInputDefault(e){return{header:e?.header??this.documentInputService.documentInputDefault(),picture:e?.picture??this.documentInputService.documentInputDefault(),footer:e?.footer??this.documentInputService.documentInputDefault(),signature:e?.signature??"",name:e?.name??"",fromEmail:e?.fromEmail??"",fromName:e?.fromName??"",replyTo:e?.replyTo??"",eventsIds:e?.eventsIds??[],isOrganizationDefault:e?.isOrganizationDefault??!1}}emailSenderInputSchema(){return js.Ik().shape({header:this.documentInputService.documentInputSchemaNotRequired(),picture:this.documentInputService.documentInputSchemaNotRequired(),signature:js.Yj(),name:js.Yj().required(this.t("le_label_est_re_86986")),fromEmail:js.Yj().required(this.t("l_e_mail_de_l_56279")),fromName:js.Yj().required(this.t("le_nom_de_l_me_01331")),replyTo:js.Yj()})}createUpdateEmailSenderSchema(){return js.Ik().shape({emailSender:this.emailSenderInputSchema()})}};Vd=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Bd=void 0!==Ai&&Ai)?Bd:Object,"function"==typeof(Gd=void 0!==Vr&&Vr)?Gd:Object])],Vd);const Wd=lo.EMAIL_FROM_NAME;var qd;let Yd=class extends $s{constructor(e){super(e)}emailTemplateDefault(e,t,n,i,o){const a=this.emailTypeToDefault(e,t,i,o);return n&&(a.subject=n.subject,a.content=n.content),{useDefault:n?.useDefault??!0,emailType:e,emailSenderId:n?.emailSenderId,attachments:n?.attachments??[],hasCalendarInvite:n?.hasCalendarInvite??!1,calendarInviteName:n?.calendarInviteName??null,calendarInviteStartDate:n?.calendarInviteStartDate??null,calendarInviteStartTime:n?.calendarInviteStartTime??null,calendarInviteEndDate:n?.calendarInviteEndDate??null,calendarInviteEndTime:n?.calendarInviteEndTime??null,...a}}emailTemplateSchema(){return js.Ik().shape({useDefault:js.zM().required(""),emailType:js.Yj().required(this.t("le_type_d_e_mai_84281")).oneOf(Ln,this.t("le_type_d_e_mai_84281")),subject:js.Yj().when("useDefault",{is:!1,then:e=>e.required(this.t("le_sujet_est_re_18923"))}),content:js.Yj().when("useDefault",{is:!1,then:e=>e.required(this.t("le_contenu_est_45048")).test("contains-code",this.t("le_contenu_doit_64437"),function(){return!(!this.parent.useDefault&&this.parent.emailType===Re.Code)||this.parent.content.includes("{code}")})}),attachments:js.YO().of(js.Yj()),hasCalendarInvite:js.zM().required(),calendarInviteName:js.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("nom_de_l_v_nem_58512")),otherwise:e=>e.nullable()}),calendarInviteStartDate:ks.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")),otherwise:e=>e.nullable()}),calendarInviteStartTime:js.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("heure_de_d_but_90785")),otherwise:e=>e.nullable()}),calendarInviteEndDate:ks.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")),otherwise:e=>e.nullable()}),calendarInviteEndTime:js.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("l_heure_de_fin_78626")),otherwise:e=>e.nullable()})})}updateEmailTemplateSchema(){return js.Ik().shape({emailTemplate:this.emailTemplateSchema()})}emailTypeToDefault(e,t,n,i){switch(e){case Re.Accreditations:return this.accreditationsDefault();case Re.AccreditationsRefused:return this.accreditationsRefusedDefault();case Re.Assignments:return this.assignmentsDefault();case Re.Code:return this.codeDefault(n,i);case Re.FormInvite:return this.formInviteDefault();case Re.FormSubmit:return this.formSubmitDefault(n);case Re.NotifyLeaders:return this.notifyLeadersDefault(t);case Re.DelegationCategoryLeaderAssign:return this.delegationCategoryLeaderAssign(t);case Re.DelegationFormInvite:return this.delegationFormInviteDefault();case Re.DelegationLeaderAssign:return this.delegationLeaderAssign();case Re.PositionCategoryLeaderAssign:return this.positionCategoryLeaderAssignDefault(t);case Re.PositionLeaderAssign:return this.positionLeaderAssign(t);case Re.Refused:return this.refusedDefault();case Re.VolunteerRegistration:return this.volunteerRegistrationDefault();case Re.Campaign:case Re.AccreditationsImport:case Re.AccreditationsProfilesImport:case Re.DelegationsImport:case Re.EventsImport:case Re.FilesImport:case Re.Documents:case Re.EventInvite:case Re.Export:case Re.MembersImport:case Re.NewMember:case Re.OrganizationInvite:case Re.PositionsImport:throw new Error("Impossible to change this email");default:return wr()}}accreditationsDefault(){return{subject:this.t("_event_name_49280"),content:this.t("accreditations_default")}}accreditationsRefusedDefault(){return{subject:this.t("_event_name_01805"),content:this.t("accreditations_refused_default")}}assignmentsDefault(){return{subject:this.t("_event_name_72063"),content:this.t("assignments_default")}}codeDefault(e,t){return{subject:e&&!t?this.t("code_de_v_rific_41117"):this.t("code_de_connexi_57121"),content:this.t("code_default")}}formInviteDefault(){return{subject:this.t("form_invite_subject"),content:this.t("form_invite_content")}}formSubmitDefault(e){return e?{subject:this.t("_event_name_12686"),content:this.t("form_submit_event_default")}:{subject:this.t("_organization_n_21926"),content:this.t("form_submit_organization_default")}}notifyLeadersDefault(e){return{subject:this.t("_event_name_95901"),content:this.t("notify_leaders_default_1",e.href,Wd)}}delegationCategoryLeaderAssign(e){return{subject:this.t("_event_name_69973"),content:this.t("_p_bonjour_use_97817",Wd,e.href,Wd)}}delegationLeaderAssign(){return{subject:this.t("_event_name_92886"),content:this.t("_p_bonjour_use_96380")}}delegationFormInviteDefault(){return{subject:this.t("invitation_re_29033"),content:this.t("_p_bonjour_use_29618")}}positionCategoryLeaderAssignDefault(e){return{subject:this.t("_event_name_63708"),content:this.t("category_leader_assign_default_1",Wd,e.href,Wd)}}positionLeaderAssign(e){return{subject:this.t("_event_name_60486"),content:this.t("leader_assign_default_1",Wd,e.href,Wd)}}refusedDefault(){return{subject:this.t("_event_name_59248"),content:this.t("refused_default")}}volunteerRegistrationDefault(){return{subject:this.t("_event_name_12686"),content:this.t("volunteer_registration_default")}}};Yd=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(qd=void 0!==Ai&&Ai)?qd:Object])],Yd);var Hd;let Zd=class extends $s{constructor(e){super(e)}eventDuplicateInputDefault(e){return{name:this.t("copie_de_1_62900",e.name),startAt:e.startAt,endAt:e.endAt,eventId:null,includeAccreditations:!0,includeCustomDocuments:!0,includeCustomFields:!0,includeDelegations:!0,includeEmailsTemplates:!0,includeForms:!0,includePositions:!0,includeSegments:!0,includeTemplates:!0,includeWorkflows:!0}}eventDuplicateSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_est_requ_61536")),startAt:ks.required(this.t("la_date_d_but_d_30022")).typeError(this.t("la_date_d_but_d_30022")),endAt:ks.required(this.t("la_date_de_fin_45068")).typeError(this.t("la_date_de_fin_45068")).test("after-start-at",this.t("la_date_de_fin_00429"),function(){return Vo.c9.isDateTime(this.parent.startAt)&&this.parent.startAt.isValid&&Vo.c9.isDateTime(this.parent.endAt)&&this.parent.endAt.isValid&&this.parent.endAt>=this.parent.startAt}),includeAccreditations:js.zM(),includeCustomDocuments:js.zM(),includeCustomFields:js.zM(),includeDelegations:js.zM(),includeEmailsTemplates:js.zM(),includeForms:js.zM(),includePositions:js.zM(),includeSegments:js.zM(),includeTemplates:js.zM(),includeWorkflows:js.zM()})}};Zd=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Hd=void 0!==Ai&&Ai)?Hd:Object])],Zd);var Kd;let Qd=class{countries;countriesCodes;phoneCodes;constructor(e){const t=e.translate.bind(e);this.countries=(0,vs.A)([{phoneCode:"+93",code:"AF",name:t("afghanistan_59344"),nationality:t("afghan_10143"),emoji:"🇦🇫",language:["ps","ps-AR"],smsPrice:.27},{phoneCode:"+35818",code:"AX",name:t("_land_islands_92853"),nationality:t("_land_island_62794"),emoji:"🇦🇽"},{phoneCode:"+355",code:"AL",name:t("albania_07621"),nationality:t("albanian_82021"),emoji:"🇦🇱",language:["sq","sq-AL"],smsPrice:.12},{phoneCode:"+213",code:"DZ",name:t("algeria_37723"),nationality:t("algerian_97855"),emoji:"🇩🇿",language:"ar-DZ",smsPrice:.285},{phoneCode:"+1684",code:"AS",name:t("american_samoa_95023"),nationality:t("american_samoan_76272"),emoji:"🇦🇸"},{phoneCode:"+376",code:"AD",name:t("andorra_45150"),nationality:t("andorran_97838"),emoji:"🇦🇩",smsPrice:.52},{phoneCode:"+244",code:"AO",name:t("angola_15815"),nationality:t("angolan_91942"),emoji:"🇦🇴",smsPrice:.17},{phoneCode:"+1264",code:"AI",name:t("anguilla_53408"),nationality:t("anguillan_92612"),emoji:"🇦🇮"},{phoneCode:"+1268",code:"AG",name:t("antigua_and_bar_05164"),nationality:t("antiguan_or_bar_26833"),emoji:"🇦🇬"},{phoneCode:"+54",code:"AR",name:t("argentina_92219"),nationality:t("argentine_14780"),emoji:"🇦🇷",language:"es-AR",smsPrice:.11},{phoneCode:"+374",code:"AM",name:t("armenia_90330"),nationality:t("armenian_87788"),language:["hy","hy-AM"],emoji:"🇦🇲"},{phoneCode:"+297",code:"AW",name:t("aruba_62942"),nationality:t("aruban_18515"),emoji:"🇦🇼",smsPrice:.33},{phoneCode:"+61",code:"AU",name:t("australia_84647"),nationality:t("australian_83553"),emoji:"🇦🇺",language:"en-AU",smsPrice:.093},{phoneCode:"+43",code:"AT",name:t("austria_67457"),nationality:t("austrian_39761"),emoji:"🇦🇹",language:"de-AT",smsPrice:.066},{phoneCode:"+994",code:"AZ",name:t("azerbaijan_14476"),nationality:t("azerbaijani_az_92428"),emoji:"🇦🇿",language:"az-AZ",smsPrice:.39},{phoneCode:"+1242",code:"BS",name:t("bahamas_33701"),nationality:t("bahamian_86817"),emoji:"🇧🇸"},{phoneCode:"+973",code:"BH",name:t("bahrain_43417"),nationality:t("bahraini_76209"),emoji:"🇧🇭",language:"ar-BH",smsPrice:.12},{phoneCode:"+880",code:"BD",name:t("bangladesh_48531"),nationality:t("bangladeshi_66399"),emoji:"🇧🇩",smsPrice:.425},{phoneCode:"+1246",code:"BB",name:t("barbados_57235"),nationality:t("barbadian_02319"),emoji:"🇧🇧"},{phoneCode:"+375",code:"BY",name:t("belarus_97102"),nationality:t("belarusian_60742"),emoji:"🇧🇾",language:["be","be-BY"],smsPrice:.31},{phoneCode:"+32",code:"BE",name:t("belgium_21048"),nationality:t("belgian_00407"),emoji:"🇧🇪",language:["fr-BE","nl-BE"],smsPrice:.094},{phoneCode:"+501",code:"BZ",name:t("belize_94460"),nationality:t("belizean_90827"),emoji:"🇧🇿",language:"en-BZ",smsPrice:0},{phoneCode:"+229",code:"BJ",name:t("benin_88614"),nationality:t("beninese_benin_55987"),emoji:"🇧🇯",smsPrice:.04},{phoneCode:"+1441",code:"BM",name:t("bermuda_84448"),nationality:t("bermudian_berm_58878"),emoji:"🇧🇲"},{phoneCode:"+975",code:"BT",name:t("bhutan_12608"),nationality:t("bhutanese_34101"),emoji:"🇧🇹",smsPrice:.39},{phoneCode:"+591",code:"BO",name:t("bolivia_plurin_43912"),nationality:t("bolivian_98429"),emoji:"🇧🇴",language:["es-BO","qu-BO"],smsPrice:.38},{phoneCode:"+5997",code:"BQ",name:t("bonaire_sint_e_69605"),nationality:t("bonaire_07340"),emoji:"🇧🇶"},{phoneCode:"+387",code:"BA",name:t("bosnia_and_herz_91990"),nationality:t("bosnian_or_herz_88694"),emoji:"🇧🇦",language:["bs-BA","hr-BA","sr-BA"],smsPrice:.46},{phoneCode:"+267",code:"BW",name:t("botswana_49258"),nationality:t("motswana_botsw_32461"),emoji:"🇧🇼",smsPrice:.13},{phoneCode:"+55",code:"BR",name:t("brazil_03275"),nationality:t("brazilian_74116"),emoji:"🇧🇷",language:"pt-BR",smsPrice:.051},{phoneCode:"+246",code:"IO",name:t("british_indian_92949"),nationality:t("british_indian_08875"),emoji:"🇮🇴"},{phoneCode:"+673",code:"BN",name:t("brunei_darussal_84695"),nationality:t("bruneian_06218"),emoji:"🇧🇳",language:"ms-BN",smsPrice:.05},{phoneCode:"+359",code:"BG",name:t("bulgaria_97045"),nationality:t("bulgarian_79288"),emoji:"🇧🇬",language:["bg","bg-BG"],smsPrice:.16},{phoneCode:"+226",code:"BF",name:t("burkina_faso_55299"),nationality:t("burkinab_02690"),emoji:"🇧🇫",smsPrice:.032},{phoneCode:"+257",code:"BI",name:t("burundi_85561"),nationality:t("burundian_35605"),emoji:"🇧🇮",smsPrice:.05},{phoneCode:"+238",code:"CV",name:t("cabo_verde_28261"),nationality:t("cabo_verdean_88842"),emoji:"🇨🇻",smsPrice:.2},{phoneCode:"+855",code:"KH",name:t("cambodia_77971"),nationality:t("cambodian_19577"),emoji:"🇰🇭",smsPrice:.52},{phoneCode:"+237",code:"CM",name:t("cameroon_44200"),nationality:t("cameroonian_12953"),emoji:"🇨🇲",smsPrice:.024},{phoneCode:"+1",code:"CA",name:t("canada_52584"),nationality:t("canadian_90836"),emoji:"🇨🇦",language:["en-CA","fr-CA"],smsPrice:.03},{phoneCode:"+1345",code:"KY",name:t("cayman_islands_80923"),nationality:t("caymanian_07521"),emoji:"🇰🇾"},{phoneCode:"+236",code:"CF",name:t("central_african_74182"),nationality:t("central_african_89873"),emoji:"🇨🇫",smsPrice:.053},{phoneCode:"+235",code:"TD",name:t("chad_58721"),nationality:t("chadian_55061"),emoji:"🇹🇩",smsPrice:.035},{phoneCode:"+56",code:"CL",name:t("chile_06923"),nationality:t("chilean_69498"),emoji:"🇨🇱",language:"es-CL",smsPrice:.13},{phoneCode:"+86",code:"CN",name:t("china_40708"),nationality:t("chinese_12117"),emoji:"🇨🇳",language:["zh","zh-CN"],smsPrice:.055},{phoneCode:"+6189164",code:"CX",name:t("christmas_islan_46649"),nationality:t("christmas_islan_46649"),emoji:"🇨🇽"},{phoneCode:"+6189162",code:"CC",name:t("cocos_keeling_98180"),nationality:t("cocos_island_82627"),emoji:"🇨🇨"},{phoneCode:"+57",code:"CO",name:t("colombia_37632"),nationality:t("colombian_28222"),emoji:"🇨🇴",language:"es-CO",smsPrice:.033},{phoneCode:"+269",code:"KM",name:t("comoros_35439"),nationality:t("comoran_comori_49754"),emoji:"🇰🇲",smsPrice:.42},{phoneCode:"+242",code:"CG",name:t("congo_republic_97304"),nationality:t("congolese_04965"),emoji:"🇨🇬",smsPrice:.045},{phoneCode:"+243",code:"CD",name:t("congo_democrat_80102"),nationality:t("congolese_04965"),emoji:"🇨🇩",smsPrice:.2},{phoneCode:"+682",code:"CK",name:t("cook_islands_51542"),nationality:t("cook_island_99158"),emoji:"🇨🇰",smsPrice:.12},{phoneCode:"+506",code:"CR",name:t("costa_rica_57058"),nationality:t("costa_rican_17127"),emoji:"🇨🇷",language:"es-CR",smsPrice:.061},{phoneCode:"+225",code:"CI",name:t("c_te_d_ivoire_55380"),nationality:t("ivorian_01729"),emoji:"🇨🇮",smsPrice:.055},{phoneCode:"+385",code:"HR",name:t("croatia_52101"),nationality:t("croatian_62900"),emoji:"🇭🇷",language:["hr","hr-HR"],smsPrice:.13},{phoneCode:"+53",code:"CU",name:t("cuba_11922"),nationality:t("cuban_00956"),emoji:"🇨🇺",smsPrice:.08},{phoneCode:"+5999",code:"CW",name:t("cura_ao_46587"),nationality:t("cura_aoan_65055"),emoji:"🇨🇼"},{phoneCode:"+357",code:"CY",name:t("cyprus_86967"),nationality:t("cypriot_85282"),emoji:"🇨🇾",smsPrice:.083},{phoneCode:"+420",code:"CZ",name:t("czech_republic_57570"),nationality:t("czech_42120"),emoji:"🇨🇿",language:["cs","cs-CZ"],smsPrice:.08},{phoneCode:"+45",code:"DK",name:t("denmark_28356"),nationality:t("danish_44544"),emoji:"🇩🇰",language:["da","da-DK"],smsPrice:.06},{phoneCode:"+253",code:"DJ",name:t("djibouti_38156"),nationality:t("djiboutian_72034"),emoji:"🇩🇯",smsPrice:.12},{phoneCode:"+1767",code:"DM",name:t("dominica_13395"),nationality:t("dominican_54004"),emoji:"🇩🇲"},{phoneCode:["+1809","+1829","+1849"],code:"DO",name:t("dominican_repub_08891"),nationality:t("dominican_54004"),emoji:"🇩🇴",language:"es-DO"},{phoneCode:"+593",code:"EC",name:t("ecuador_25933"),nationality:t("ecuadorian_50591"),emoji:"🇪🇨",language:["es-EC","qu-EC"],smsPrice:.48},{phoneCode:"+20",code:"EG",name:t("egypt_61058"),nationality:t("egyptian_75798"),emoji:"🇪🇬",language:"ar-EG",smsPrice:.45},{phoneCode:"+503",code:"SV",name:t("el_salvador_37036"),nationality:t("salvadoran_02475"),emoji:"🇸🇻",language:"es-SV",smsPrice:.34},{phoneCode:"+240",code:"GQ",name:t("equatorial_guin_39570"),nationality:t("equatorial_guin_44537"),emoji:"🇬🇶",smsPrice:.21},{phoneCode:"+291",code:"ER",name:t("eritrea_67366"),nationality:t("eritrean_20355"),emoji:"🇪🇷",smsPrice:.045},{phoneCode:"+372",code:"EE",name:t("estonia_58256"),nationality:t("estonian_46354"),emoji:"🇪🇪",language:["et","et-EE"],smsPrice:.08},{phoneCode:"+251",code:"ET",name:t("ethiopia_72971"),nationality:t("ethiopian_03019"),emoji:"🇪🇹",smsPrice:.08},{phoneCode:"+500",code:"FK",name:t("falkland_island_59316"),nationality:t("falkland_island_15848"),emoji:"🇫🇰"},{phoneCode:"+298",code:"FO",name:t("faroe_islands_71549"),nationality:t("faroese_32806"),emoji:"🇫🇴",language:["fo","fo-FO"],smsPrice:.046},{phoneCode:"+679",code:"FJ",name:t("fiji_36369"),nationality:t("fijian_39649"),emoji:"🇫🇯",smsPrice:.21},{phoneCode:"+358",code:"FI",name:t("finland_07531"),nationality:t("finnish_24918"),emoji:"🇫🇮",language:["fi","fi-FI","se-FI","sv-FI"],smsPrice:.083},{phoneCode:"+33",code:"FR",name:t("france_26614"),nationality:t("french_86034"),emoji:"🇫🇷",language:["fr","fr-FR"],smsPrice:.045},{phoneCode:"+594",code:"GF",name:t("french_guiana_80598"),nationality:t("french_guianese_02041"),emoji:"🇬🇫",smsPrice:.17},{phoneCode:"+689",code:"PF",name:t("french_polynesi_50842"),nationality:t("french_polynesi_47751"),emoji:"🇵🇫",smsPrice:.18},{phoneCode:"+241",code:"GA",name:t("gabon_58286"),nationality:t("gabonese_62984"),emoji:"🇬🇦",smsPrice:.045},{phoneCode:"+220",code:"GM",name:t("gambia_93575"),nationality:t("gambian_30767"),emoji:"🇬🇲",smsPrice:.19},{phoneCode:"+995",code:"GE",name:t("georgia_93003"),nationality:t("georgian_79366"),emoji:"🇬🇪",language:["ka","ka-GE"]},{phoneCode:"+49",code:"DE",name:t("germany_31193"),nationality:t("german_36386"),emoji:"🇩🇪",language:["de","de-DE"],smsPrice:.089},{phoneCode:"+233",code:"GH",name:t("ghana_32464"),nationality:t("ghanaian_99745"),emoji:"🇬🇭",smsPrice:.033},{phoneCode:"+350",code:"GI",name:t("gibraltar_24360"),nationality:t("gibraltar_24360"),emoji:"🇬🇮",smsPrice:.076},{phoneCode:"+30",code:"GR",name:t("greece_28837"),nationality:t("greek_hellenic_39006"),emoji:"🇬🇷",language:["el","el-GR"],smsPrice:.061},{phoneCode:"+299",code:"GL",name:t("greenland_80916"),nationality:t("greenlandic_67508"),emoji:"🇬🇱",smsPrice:.036},{phoneCode:"+1473",code:"GD",name:t("grenada_04221"),nationality:t("grenadian_25686"),emoji:"🇬🇩"},{phoneCode:"+590",code:"GP",name:t("guadeloupe_95839"),nationality:t("guadeloupe_95839"),emoji:"🇬🇵"},{phoneCode:"+1671",code:"GU",name:t("guam_76384"),nationality:t("guamanian_guam_01132"),emoji:"🇬🇺"},{phoneCode:"+502",code:"GT",name:t("guatemala_49597"),nationality:t("guatemalan_60946"),emoji:"🇬🇹",language:"es-GT",smsPrice:.3},{phoneCode:["+441481","+447781","+447839","+447911"],code:"GG",name:t("guernsey_87507"),nationality:t("channel_island_53762"),emoji:"🇬🇬"},{phoneCode:"+224",code:"GN",name:t("guinea_20770"),nationality:t("guinean_42564"),emoji:"🇬🇳",smsPrice:.056},{phoneCode:"+245",code:"GW",name:t("guinea_bissau_80728"),nationality:t("bissau_guinean_66742"),emoji:"🇬🇼",smsPrice:.09},{phoneCode:"+592",code:"GY",name:t("guyana_92443"),nationality:t("guyanese_56902"),emoji:"🇬🇾",smsPrice:.3},{phoneCode:"+509",code:"HT",name:t("haiti_99471"),nationality:t("haitian_50142"),emoji:"🇭🇹",smsPrice:.3},{phoneCode:"+379",code:"VA",name:t("vatican_city_st_63732"),nationality:t("vatican_36370"),emoji:"🇻🇦"},{phoneCode:"+504",code:"HN",name:t("honduras_79402"),nationality:t("honduran_35392"),emoji:"🇭🇳",language:"es-HN",smsPrice:.267},{phoneCode:"+852",code:"HK",name:t("hong_kong_96239"),nationality:t("hong_kong_hong_64846"),emoji:"🇭🇰",language:"zh-HK",smsPrice:.079},{phoneCode:"+36",code:"HU",name:t("hungary_57981"),nationality:t("hungarian_magy_62212"),emoji:"🇭🇺",language:["hu","hu-HU"],smsPrice:.106},{phoneCode:"+354",code:"IS",name:t("iceland_79438"),nationality:t("icelandic_17689"),emoji:"🇮🇸",language:["is","is-IS"],smsPrice:.085},{phoneCode:"+91",code:"IN",name:t("india_39466"),nationality:t("indian_25592"),emoji:"🇮🇳",language:["gu","gu-IN","hi","hi-IN","kn","kn-IN","kok","kok-IN","mr","mr-IN","pa","pa-IN","sa","sa-IN","ta","ta-IN","te","te-IN"],smsPrice:.078},{phoneCode:"+62",code:"ID",name:t("indonesia_65003"),nationality:t("indonesian_29723"),emoji:"🇮🇩",language:["id","id-ID"],smsPrice:.464},{phoneCode:"+98",code:"IR",name:t("iran_76293"),nationality:t("iranian_persia_76791"),emoji:"🇮🇷",language:["fa","fa-IR"],smsPrice:.38},{phoneCode:"+964",code:"IQ",name:t("iraq_82027"),nationality:t("iraqi_31025"),emoji:"🇮🇶",language:"ar-IQ",smsPrice:.33},{phoneCode:"+353",code:"IE",name:t("ireland_62034"),nationality:t("irish_35774"),emoji:"🇮🇪",language:"en-IE",smsPrice:.065},{phoneCode:["+441624","+447524","+447624","+447924"],code:"IM",name:t("isle_of_man_64982"),nationality:t("manx_86314"),emoji:"🇮🇲"},{phoneCode:"+972",code:"IL",name:t("israel_20033"),nationality:t("israeli_69936"),emoji:"🇮🇱",language:["he","he-IL"],smsPrice:.3},{phoneCode:"+39",code:"IT",name:t("italy_14828"),nationality:t("italian_56623"),emoji:"🇮🇹",language:["it","it-IT"],smsPrice:.038},{phoneCode:"+1876",code:"JM",name:t("jamaica_55090"),nationality:t("jamaican_58881"),emoji:"🇯🇲",language:"en-JM"},{phoneCode:"+81",code:"JP",name:t("japan_61810"),nationality:t("japanese_82636"),emoji:"🇯🇵",language:["ja","ja-JP"],smsPrice:.08},{phoneCode:"+441534",code:"JE",name:t("jersey_78898"),nationality:t("channel_island_53762"),emoji:"🇯🇪"},{phoneCode:"+962",code:"JO",name:t("jordan_36280"),nationality:t("jordanian_41310"),emoji:"🇯🇴",language:"ar-JO",smsPrice:.39},{phoneCode:["+76","+77"],code:"KZ",name:t("kazakhstan_30541"),nationality:t("kazakhstani_ka_27277"),emoji:"🇰🇿",language:["kk","kk-KZ"]},{phoneCode:"+254",code:"KE",name:t("kenya_67944"),nationality:t("kenyan_92311"),emoji:"🇰🇪",language:["sw","sw-KE"],smsPrice:.3},{phoneCode:"+686",code:"KI",name:t("kiribati_25369"),nationality:t("i_kiribati_66745"),emoji:"🇰🇮",smsPrice:.036},{phoneCode:"+383",code:"XK",name:t("kosovo_44440"),nationality:t("kosovare_35920"),emoji:"🇽🇰",smsPrice:.12},{phoneCode:"+850",code:"KP",name:t("korea_democrat_48584"),nationality:t("north_korean_16553"),emoji:"🇰🇵",smsPrice:.045},{phoneCode:"+82",code:"KR",name:t("korea_republic_72269"),nationality:t("south_korean_89943"),emoji:"🇰🇷",language:["ko","ko-KR"],smsPrice:.029},{phoneCode:"+965",code:"KW",name:t("kuwait_22026"),nationality:t("kuwaiti_76148"),emoji:"🇰🇼",language:"ar-KW",smsPrice:.327},{phoneCode:"+996",code:"KG",name:t("kyrgyzstan_84406"),nationality:t("kyrgyzstani_ky_19120"),emoji:"🇰🇬",language:["ky","ky-KG"],smsPrice:.34},{phoneCode:"+856",code:"LA",name:t("lao_people_s_de_31069"),nationality:t("lao_laotian_28318"),emoji:"🇱🇦",smsPrice:.273},{phoneCode:"+371",code:"LV",name:t("latvia_73526"),nationality:t("latvian_53651"),emoji:"🇱🇻",language:["lv","lv-LV"],smsPrice:.057},{phoneCode:"+961",code:"LB",name:t("lebanon_49493"),nationality:t("lebanese_43182"),emoji:"🇱🇧",language:"ar-LB",smsPrice:.32},{phoneCode:"+266",code:"LS",name:t("lesotho_91086"),nationality:t("basotho_52532"),emoji:"🇱🇸",smsPrice:.35},{phoneCode:"+231",code:"LR",name:t("liberia_12077"),nationality:t("liberian_64388"),emoji:"🇱🇷",smsPrice:.3},{phoneCode:"+218",code:"LY",name:t("libya_26741"),nationality:t("libyan_35337"),emoji:"🇱🇾",language:"ar-LY",smsPrice:.38},{phoneCode:"+424",code:"LI",name:t("liechtenstein_56974"),nationality:t("liechtenstein_56974"),emoji:"🇱🇮",language:"de-LI"},{phoneCode:"+370",code:"LT",name:t("lithuania_95793"),nationality:t("lithuanian_94145"),emoji:"🇱🇹",language:["lt","lt-LT"],smsPrice:.06},{phoneCode:"+352",code:"LU",name:t("luxembourg_15613"),nationality:t("luxembourg_lux_47318"),emoji:"🇱🇺",language:["de-LU","fr-LU"],smsPrice:.1},{phoneCode:"+853",code:"MO",name:t("macao_74812"),nationality:t("macanese_chine_74224"),emoji:"🇲🇴",language:"zh-MO",smsPrice:.038},{phoneCode:"+389",code:"MK",name:t("macedonia_the_19021"),nationality:t("macedonian_20446"),emoji:"🇲🇰",language:["mk","mk-MK"],smsPrice:.095},{phoneCode:"+261",code:"MG",name:t("madagascar_57052"),nationality:t("malagasy_02353"),emoji:"🇲🇬",smsPrice:.029},{phoneCode:"+265",code:"MW",name:t("malawi_27143"),nationality:t("malawian_10093"),emoji:"🇲🇼",smsPrice:.3},{phoneCode:"+60",code:"MY",name:t("malaysia_54920"),nationality:t("malaysian_81474"),emoji:"🇲🇾",language:["ms","ms-MY"],smsPrice:.29},{phoneCode:"+960",code:"MV",name:t("maldives_67432"),nationality:t("maldivian_67878"),emoji:"🇲🇻",language:["dv","dv-MV"],smsPrice:.34},{phoneCode:"+223",code:"ML",name:t("mali_95091"),nationality:t("malian_malines_66005"),emoji:"🇲🇱",smsPrice:.055},{phoneCode:"+356",code:"MT",name:t("malta_73993"),nationality:t("maltese_52729"),emoji:"🇲🇹",language:["mt","mt-MT"],smsPrice:.08},{phoneCode:"+692",code:"MH",name:t("marshall_island_92726"),nationality:t("marshallese_30337"),emoji:"🇲🇭",smsPrice:.045},{phoneCode:"+596",code:"MQ",name:t("martinique_79541"),nationality:t("martiniquais_m_01923"),emoji:"🇲🇶"},{phoneCode:"+222",code:"MR",name:t("mauritania_77906"),nationality:t("mauritanian_68205"),emoji:"🇲🇷",smsPrice:.055},{phoneCode:"+230",code:"MU",name:t("mauritius_10801"),nationality:t("mauritian_09142"),emoji:"🇲🇺",smsPrice:.184},{phoneCode:["+262269","+262639"],code:"YT",name:t("mayotte_91167"),nationality:t("mahoran_45424"),emoji:"🇾🇹"},{phoneCode:"+52",code:"MX",name:t("mexico_21962"),nationality:t("mexican_80494"),emoji:"🇲🇽",language:"es-MX",smsPrice:.92},{phoneCode:"+691",code:"FM",name:t("micronesia_fed_39555"),nationality:t("micronesian_97912"),emoji:"🇫🇲",smsPrice:.045},{phoneCode:"+373",code:"MD",name:t("moldova_republ_08796"),nationality:t("moldovan_76486"),emoji:"🇲🇩"},{phoneCode:"+377",code:"MC",name:t("monaco_72117"),nationality:t("mon_gasque_mon_17281"),emoji:"🇲🇨",language:"fr-MC",smsPrice:.1},{phoneCode:"+976",code:"MN",name:t("mongolia_36757"),nationality:t("mongolian_33711"),emoji:"🇲🇳",language:["mn","mn-MN"],smsPrice:.33},{phoneCode:"+382",code:"ME",name:t("montenegro_78236"),nationality:t("montenegrin_68334"),emoji:"🇲🇪",smsPrice:.15},{phoneCode:"+1664",code:"MS",name:t("montserrat_38432"),nationality:t("montserratian_13585"),emoji:"🇲🇸"},{phoneCode:"+212",code:"MA",name:t("morocco_52420"),nationality:t("moroccan_14305"),emoji:"🇲🇦",language:"ar-MA"},{phoneCode:"+258",code:"MZ",name:t("mozambique_60988"),nationality:t("mozambican_68300"),emoji:"🇲🇿",smsPrice:.32},{phoneCode:"+95",code:"MM",name:t("myanmar_78678"),nationality:t("burmese_66869"),emoji:"🇲🇲",smsPrice:1.1},{phoneCode:"+264",code:"NA",name:t("namibia_19026"),nationality:t("namibian_01490"),emoji:"🇳🇦",smsPrice:.048},{phoneCode:"+674",code:"NR",name:t("nauru_16303"),nationality:t("nauruan_52578"),emoji:"🇳🇷",smsPrice:.21},{phoneCode:"+977",code:"NP",name:t("nepal_49088"),nationality:t("nepali_nepales_64761"),emoji:"🇳🇵",smsPrice:.35},{phoneCode:"+31",code:"NL",name:t("netherlands_38005"),nationality:t("dutch_netherla_42451"),emoji:"🇳🇱",language:["nl","nl-NL"],smsPrice:.095},{phoneCode:"+687",code:"NC",name:t("new_caledonia_14574"),nationality:t("new_caledonian_12113"),emoji:"🇳🇨",smsPrice:.1},{phoneCode:"+64",code:"NZ",name:t("new_zealand_61929"),nationality:t("new_zealander_71823"),emoji:"🇳🇿",language:["en-NZ","mi","mi-NZ"],smsPrice:.14},{phoneCode:"+505",code:"NI",name:t("nicaragua_14531"),nationality:t("nicaraguan_06649"),emoji:"🇳🇮",language:"es-NI",smsPrice:.17},{phoneCode:"+227",code:"NE",name:t("niger_59137"),nationality:t("nigerien_06144"),emoji:"🇳🇪",smsPrice:.067},{phoneCode:"+234",code:"NG",name:t("nigeria_77810"),nationality:t("nigerian_43407"),emoji:"🇳🇬",smsPrice:.47},{phoneCode:"+683",code:"NU",name:t("niue_97570"),nationality:t("niuean_70518"),emoji:"🇳🇺",smsPrice:.045},{phoneCode:"+6723",code:"NF",name:t("norfolk_island_62377"),nationality:t("norfolk_island_62377"),emoji:"🇳🇫"},{phoneCode:"+1670",code:"MP",name:t("northern_marian_94262"),nationality:t("northern_marian_82360"),emoji:"🇲🇵"},{phoneCode:"+47",code:"NO",name:t("norway_14236"),nationality:t("norwegian_50751"),emoji:"🇳🇴",language:["nb","nb-NO","nn-NO","se-NO"],smsPrice:.064},{phoneCode:"+968",code:"OM",name:t("oman_20900"),nationality:t("omani_15042"),emoji:"🇴🇲",language:"ar-OM",smsPrice:.21},{phoneCode:"+92",code:"PK",name:t("pakistan_59697"),nationality:t("pakistani_12622"),emoji:"🇵🇰",language:["ur","ur-PK"],smsPrice:.5},{phoneCode:"+680",code:"PW",name:t("palau_46088"),nationality:t("palauan_73033"),emoji:"🇵🇼",smsPrice:.1},{phoneCode:"+970",code:"PS",name:t("palestine_stat_33253"),nationality:t("palestinian_06829"),emoji:"🇵🇸",smsPrice:.35},{phoneCode:"+507",code:"PA",name:t("panama_16821"),nationality:t("panamanian_07882"),emoji:"🇵🇦",language:"es-PA",smsPrice:.17},{phoneCode:"+675",code:"PG",name:t("papua_new_guine_56959"),nationality:t("papua_new_guine_50302"),emoji:"🇵🇬",smsPrice:.2},{phoneCode:"+595",code:"PY",name:t("paraguay_66859"),nationality:t("paraguayan_50310"),emoji:"🇵🇾",language:"es-PY",smsPrice:.124},{phoneCode:"+51",code:"PE",name:t("peru_23048"),nationality:t("peruvian_85045"),emoji:"🇵🇪",language:["es-PE","qu-PE"],smsPrice:.31},{phoneCode:"+63",code:"PH",name:t("philippines_65361"),nationality:t("philippine_fil_40400"),emoji:"🇵🇭",language:["en-PH","tl","tl-PH"],smsPrice:.243},{phoneCode:"+64",code:"PN",name:t("pitcairn_59104"),nationality:t("pitcairn_island_58961"),emoji:"🇵🇳"},{phoneCode:"+48",code:"PL",name:t("poland_13527"),nationality:t("polish_26779"),emoji:"🇵🇱",language:["pl","pl-PL"],smsPrice:.036},{phoneCode:"+351",code:"PT",name:t("portugal_19698"),nationality:t("portuguese_08463"),emoji:"🇵🇹",language:["pt","pt-PT"],smsPrice:.025},{phoneCode:["+1787","+1939"],code:"PR",name:t("puerto_rico_88176"),nationality:t("puerto_rican_10401"),emoji:"🇵🇷",language:"es-PR"},{phoneCode:"+974",code:"QA",name:t("qatar_70548"),nationality:t("qatari_58016"),emoji:"🇶🇦",language:"ar-QA",smsPrice:.3},{phoneCode:"+262",code:"RE",name:t("r_union_34094"),nationality:t("r_unionese_r_u_86871"),emoji:"🇷🇪",smsPrice:.055},{phoneCode:"+40",code:"RO",name:t("romania_41618"),nationality:t("romanian_49647"),emoji:"🇷🇴",language:["ro","ro-RO"],smsPrice:.09},{phoneCode:"+7",code:"RU",name:t("russian_federat_68392"),nationality:t("russian_12506"),emoji:"🇷🇺",language:["ru","ru-RU","tt","tt-RU"],smsPrice:2.63},{phoneCode:"+250",code:"RW",name:t("rwanda_84901"),nationality:t("rwandan_47719"),emoji:"🇷🇼",smsPrice:.1},{phoneCode:"+590",code:"BL",name:t("saint_barth_lem_80830"),nationality:t("barth_lemois_35003"),emoji:"🇧🇱",smsPrice:.09},{phoneCode:"+290",code:"SH",name:t("saint_helena_a_39384"),nationality:t("saint_helenian_19012"),emoji:"🇸🇭",smsPrice:.1},{phoneCode:"+1869",code:"KN",name:t("saint_kitts_and_74455"),nationality:t("kittitian_or_ne_99867"),emoji:"🇰🇳"},{phoneCode:"+1758",code:"LC",name:t("saint_lucia_60679"),nationality:t("saint_lucian_97267"),emoji:"🇱🇨"},{phoneCode:"+590",code:"MF",name:t("saint_martin_f_87295"),nationality:t("saint_martinois_75974"),emoji:"🇸🇽"},{phoneCode:"+508",code:"PM",name:t("saint_pierre_an_55649"),nationality:t("saint_pierrais_60177"),emoji:"🇵🇲",smsPrice:.13},{phoneCode:"+1784",code:"VC",name:t("saint_vincent_a_23833"),nationality:t("saint_vincentia_81882"),emoji:"🇻🇨"},{phoneCode:"+685",code:"WS",name:t("samoa_25648"),nationality:t("samoan_97653"),emoji:"🇼🇸",smsPrice:.21},{phoneCode:"+378",code:"SM",name:t("san_marino_47437"),nationality:t("sammarinese_71553"),emoji:"🇸🇲",smsPrice:.045},{phoneCode:"+239",code:"ST",name:t("sao_tome_and_pr_10491"),nationality:t("s_o_tom_an_21489"),emoji:"🇸🇹",smsPrice:.045},{phoneCode:"+966",code:"SA",name:t("saudi_arabia_06433"),nationality:t("saudi_saudi_ar_22967"),emoji:"🇸🇦",language:"ar-SA",smsPrice:.215},{phoneCode:"+221",code:"SN",name:t("senegal_38099"),nationality:t("senegalese_64680"),emoji:"🇸🇳",smsPrice:.034},{phoneCode:"+381",code:"RS",name:t("serbia_45061"),nationality:t("serbian_68735"),emoji:"🇷🇸",smsPrice:.46},{phoneCode:"+248",code:"SC",name:t("seychelles_67712"),nationality:t("seychellois_69858"),emoji:"🇸🇨",smsPrice:.3},{phoneCode:"+232",code:"SL",name:t("sierra_leone_02995"),nationality:t("sierra_leonean_86179"),emoji:"🇸🇱",smsPrice:.4},{phoneCode:"+65",code:"SG",name:t("singapore_37928"),nationality:t("singaporean_41916"),emoji:"🇸🇬",language:"zh-SG",smsPrice:.064},{phoneCode:"+1721",code:"SX",name:t("sint_maarten_d_57391"),nationality:t("sint_maarten_82241"),emoji:"🇸🇽"},{phoneCode:"+421",code:"SK",name:t("slovakia_10924"),nationality:t("slovak_69840"),emoji:"🇸🇰",language:["sk","sk-SK"],smsPrice:.068},{phoneCode:"+386",code:"SI",name:t("slovenia_75447"),nationality:t("slovenian_slov_38562"),emoji:"🇸🇮",language:["sl","sl-SI"],smsPrice:.18},{phoneCode:"+677",code:"SB",name:t("solomon_islands_05259"),nationality:t("solomon_island_59052"),emoji:"🇸🇧",smsPrice:.155},{phoneCode:"+252",code:"SO",name:t("somalia_56358"),nationality:t("somali_somalia_97997"),emoji:"🇸🇴",smsPrice:.35},{phoneCode:"+27",code:"ZA",name:t("south_africa_61184"),nationality:t("south_african_82152"),emoji:"🇿🇦",language:["af-ZA","en-ZA","ns","ns-ZA","tn","tn-ZA","xh","xh-ZA","zu","zu-ZA"],smsPrice:.13},{phoneCode:"+500",code:"GS",name:t("south_georgia_a_39555"),nationality:t("south_georgia_o_65055"),emoji:"🇬🇸",smsPrice:.12},{phoneCode:"+211",code:"SS",name:t("south_sudan_88232"),nationality:t("south_sudanese_69140"),emoji:"🇸🇸"},{phoneCode:"+34",code:"ES",name:t("spain_40048"),nationality:t("spanish_74199"),emoji:"🇪🇸",language:["ca","ca-ES","es","es-ES","eu-ES","gl-ES"],smsPrice:.044},{phoneCode:"+94",code:"LK",name:t("sri_lanka_51563"),nationality:t("sri_lankan_09436"),emoji:"🇱🇰",smsPrice:.4},{phoneCode:"+249",code:"SD",name:t("sudan_18427"),nationality:t("sudanese_42330"),emoji:"🇸🇩",smsPrice:.322},{phoneCode:"+597",code:"SR",name:t("suriname_78561"),nationality:t("surinamese_38193"),emoji:"🇸🇷",smsPrice:.3},{phoneCode:"+4779",code:"SJ",name:t("svalbard_and_ja_38511"),nationality:t("svalbard_26353"),emoji:"🇸🇯"},{phoneCode:"+268",code:"SZ",name:t("swaziland_91614"),nationality:t("swazi_88825"),emoji:"🇸🇿",smsPrice:.3},{phoneCode:"+46",code:"SE",name:t("sweden_85663"),nationality:t("swedish_90836"),emoji:"🇸🇪",language:["se-SE","sv","sv-SE"],smsPrice:.098},{phoneCode:"+41",code:"CH",name:t("switzerland_07889"),nationality:t("swiss_23240"),emoji:"🇨🇭",language:["de-CH","fr-CH","it-CH"],smsPrice:.098},{phoneCode:"+963",code:"SY",name:t("syrian_arab_rep_72539"),nationality:t("syrian_06992"),emoji:"🇸🇾",language:["ar-SY","syr","syr-SY"],smsPrice:.37},{phoneCode:"+886",code:"TW",name:t("taiwan_provinc_87264"),nationality:t("chinese_taiwan_24003"),emoji:"🇹🇼",language:"zh-TW",smsPrice:.105},{phoneCode:"+992",code:"TJ",name:t("tajikistan_97104"),nationality:t("tajikistani_21375"),emoji:"🇹🇯",smsPrice:.38},{phoneCode:"+255",code:"TZ",name:t("tanzania_unite_52757"),nationality:t("tanzanian_71935"),emoji:"🇹🇿",smsPrice:.38},{phoneCode:"+66",code:"TH",name:t("thailand_97396"),nationality:t("thai_51972"),emoji:"🇹🇭",language:["th","th-TH"],smsPrice:.066},{phoneCode:"+670",code:"TL",name:t("timor_leste_95604"),nationality:t("timorese_87542"),emoji:"🇹🇱",smsPrice:.22},{phoneCode:"+228",code:"TG",name:t("togo_60267"),nationality:t("togolese_55079"),emoji:"🇹🇬",smsPrice:.03},{phoneCode:"+690",code:"TK",name:t("tokelau_79536"),nationality:t("tokelauan_89444"),emoji:"🇹🇰",smsPrice:.045},{phoneCode:"+676",code:"TO",name:t("tonga_96982"),nationality:t("tongan_52630"),emoji:"🇹🇴",smsPrice:.2},{phoneCode:"+1868",code:"TT",name:t("trinidad_and_to_31939"),nationality:t("trinidadian_or_65515"),emoji:"🇹🇹",language:"en-TT"},{phoneCode:"+216",code:"TN",name:t("tunisia_36732"),nationality:t("tunisian_19451"),emoji:"🇹🇳",language:"ar-TN",smsPrice:.35},{phoneCode:"+90",code:"TR",name:t("turkey_65699"),nationality:t("turkish_85889"),emoji:"🇹🇷",language:["tr","tr-TR"],smsPrice:.033},{phoneCode:"+993",code:"TM",name:t("turkmenistan_86069"),nationality:t("turkmen_63945"),emoji:"🇹🇲"},{phoneCode:"+1649",code:"TC",name:t("turks_and_caico_34033"),nationality:t("turks_and_caico_41685"),emoji:"🇹🇨"},{phoneCode:"+688",code:"TV",name:t("tuvalu_52410"),nationality:t("tuvaluan_49403"),emoji:"🇹🇻",smsPrice:.12},{phoneCode:"+256",code:"UG",name:t("uganda_42928"),nationality:t("ugandan_07085"),emoji:"🇺🇬",smsPrice:.3},{phoneCode:"+380",code:"UA",name:t("ukraine_86632"),nationality:t("ukrainian_77624"),emoji:"🇺🇦",language:["uk","uk-UA"],smsPrice:.26},{phoneCode:"+971",code:"AE",name:t("united_arab_emi_58689"),nationality:t("emirati_emiria_12413"),emoji:"🇦🇪",language:"ar-AE",smsPrice:.12},{phoneCode:"+44",code:"GB",name:t("united_kingdom_16783"),nationality:t("british_43680"),emoji:"🇬🇧",language:["cy","cy-GB","en","en-GB"],smsPrice:.078},{phoneCode:"+1",code:"US",name:t("united_states_o_43878"),nationality:t("american_36800"),emoji:"🇺🇸",language:"en-US",smsPrice:.03},{phoneCode:"+598",code:"UY",name:t("uruguay_21979"),nationality:t("uruguayan_28212"),emoji:"🇺🇾",language:"es-UY",smsPrice:.1},{phoneCode:"+998",code:"UZ",name:t("uzbekistan_27729"),nationality:t("uzbekistani_uz_10593"),emoji:"🇺🇿",language:["uz","uz-UZ"],smsPrice:.39},{phoneCode:"+678",code:"VU",name:t("vanuatu_82756"),nationality:t("ni_vanuatu_van_02924"),emoji:"🇻🇺",smsPrice:.21},{phoneCode:"+58",code:"VE",name:t("venezuela_boli_00470"),nationality:t("venezuelan_52634"),emoji:"🇻🇪",language:"es-VE",smsPrice:.31},{phoneCode:"+84",code:"VN",name:t("vietnam_82968"),nationality:t("vietnamese_55360"),emoji:"🇻🇳",language:["vi","vi-VN"],smsPrice:.27},{phoneCode:"+1284",code:"VG",name:t("virgin_islands_14222"),nationality:t("british_virgin_42963"),emoji:"🇻🇬"},{phoneCode:"+1340",code:"VI",name:t("virgin_islands_12516"),nationality:t("american_virgi_98088"),emoji:"🇻🇮"},{phoneCode:"+681",code:"WF",name:t("wallis_and_futu_93206"),nationality:t("wallisian_or_fu_60327"),emoji:"🇼🇫",smsPrice:.09},{phoneCode:"+212",code:"EH",name:t("western_sahara_02173"),nationality:t("sahrawi_sahraw_96671"),emoji:"🇪🇭",smsPrice:.053},{phoneCode:"+967",code:"YE",name:t("yemen_76340"),nationality:t("yemeni_26632"),emoji:"🇾🇪",language:"ar-YE",smsPrice:.23},{phoneCode:"+260",code:"ZM",name:t("zambia_50513"),nationality:t("zambian_85114"),emoji:"🇿🇲",smsPrice:.324},{phoneCode:"+263",code:"ZW",name:t("zimbabwe_70209"),nationality:t("zimbabwean_42291"),emoji:"🇿🇼",language:"en-ZW",smsPrice:.35}],({name:e})=>y(e)),this.countriesCodes=this.countries.map(({code:e})=>e),this.phoneCodes=this.countries.flatMap(({phoneCode:e})=>g(e))}countryCodeExists(e){return!!e&&void 0!==this.countries.find(t=>t.code===e)}getCountriesIdName(e){const t=this.getDefaultCountryValues(e).user.country;return(0,vs.A)(this.countries.map(({code:e,name:t})=>({id:e,name:t})),({id:e,name:n})=>[e===t?1:2,y(n)])}getNationalitiesIdName(e){const t=this.getDefaultCountryValues(e).user.nationality;return(0,vs.A)(this.countries.map(({code:e,nationality:t})=>({id:e,name:t})),({id:e,name:n})=>[e===t?1:2,y(n)])}getNationality(e){return this.countries.find(t=>t.code===e)?.nationality}getName(e){return this.countries.find(t=>t.code===e)?.name}getDefaultCountryValues(e){let t=this.countries.find(({code:t})=>t===e);if(!t){try{t=this.countries.find(e=>g(e.language||[]).map(e=>e.toLowerCase()).includes(navigator.language.toLowerCase()))}catch{}t||(t=this.countries.find(({code:e})=>"FR"===e))}const n=g(t.language||[]);return{user:{language:n.some(e=>e.toLowerCase().startsWith("fr"))?$t.Fr:n.some(e=>e.toLowerCase().startsWith("es"))?$t.Es:n.some(e=>e.toLowerCase().startsWith("de"))?$t.De:n.some(e=>e.toLowerCase().startsWith("nl"))?$t.Nl:$t.En,country:t.code,nationality:t.code},phone:{country:t.code,code:g(t.phoneCode)[0]}}}getSmsPriceByPhone(e){return this.countries.find(t=>g(t.phoneCode).some(t=>e.startsWith(t)))?.smsPrice}};Qd=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Kd=void 0!==Ai&&Ai)?Kd:Object])],Qd);var Xd=n(7480);const Jd=u([$t.De,$t.En,$t.Es,$t.Fr,$t.Nl]);function el(e){return e===$t.En?"en-gb":e.toString().toLowerCase()}function tl(e){if(v(e)){const t=(0,Xd.A)(e.trim().substring(0,2));return Jd.includes(t)?t:null}return null}$t.En.toLowerCase(),$t.Fr.toLowerCase(),$t.De.toLowerCase(),$t.Es.toLowerCase(),$t.Nl.toLowerCase();const nl=["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/North","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/East","Brazil/West","Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","Chile/Continental","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Mexico/General","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap"];var il,ol;const al=["country","code","number"];let sl=class extends $s{countriesService;constructor(e,t){super(e),this.countriesService=t}basePhoneInputDefault(){return{country:"",code:"",number:""}}phoneInputDefault(e){return{...this.basePhoneInputDefault(),...e.phone}}phoneInputSchema(){return js.Ik().shape({country:js.Yj().required(this.t("le_num_ro_de_t_76885")).oneOf(this.countriesService.countriesCodes,this.t("le_num_ro_de_t_76885")),code:js.Yj().required(this.t("le_num_ro_de_t_76885")).oneOf(this.countriesService.phoneCodes,this.t("le_num_ro_de_t_76885")),number:js.Yj().required(this.t("le_num_ro_de_t_76885"))})}phoneInputSchemaNotRequired(){return js.Ik().nullable().shape({country:js.Yj(),code:js.Yj(),number:js.Yj()})}};sl=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(il=void 0!==Ai&&Ai)?il:Object,"function"==typeof(ol=void 0!==Qd&&Qd)?ol:Object])],sl);var rl,dl,ll;let cl=class extends $s{countriesService;phoneInputService;constructor(e,t,n){super(n),this.countriesService=e,this.phoneInputService=t}organizationInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{name:"",adminFirstName:"",adminLastName:"",adminPhone:this.phoneInputService.phoneInputDefault(t),weezeventOrganizationId:e}}organizationInputSchema(e){let t=js.Ik().shape({name:js.Yj().required(this.t("le_nom_de_l_org_60618")),adminFirstName:js.Yj().required(this.t("le_pr_nom_est_r_10935")),adminLastName:js.Yj().required(this.t("le_nom_est_requ_61536")),adminPhone:this.phoneInputService.phoneInputSchema()});return e||(t=t.shape({termsAccepted:js.zM().oneOf([!0],this.t("il_est_n_cessai_83896")).required(this.t("il_est_n_cessai_83896"))})),t}createOrganizationSchema(e){return js.Ik().shape({organization:this.organizationInputSchema(e)})}organizationInfosInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{name:e.name??"",adminName:e.adminName??"",adminEmail:e.adminEmail??"",street:e.street??"",postalCode:e.postalCode??"",city:e.city??"",country:e.country??t.user.country,timeZone:e.timeZone??Vo.c9.local().zoneName,emailSenderId:e.emailSenderId,dateFormat:e.dateFormat,datetimeFormat:e.datetimeFormat,timeFormat:e.timeFormat}}organizationInfosInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_de_l_org_60618")),adminName:js.Yj().required(this.t("le_nom_du_respo_43823")),adminEmail:js.Yj().required(this.t("l_e_mail_du_rep_90871")).email(this.t("l_e_mail_du_rep_90871")).test("clean-admin-email",this.t("l_e_mail_du_rep_90871"),function(){return vr(this.parent.adminEmail)}),street:js.Yj().required(this.t("l_adresse_est_r_40489")),postalCode:js.Yj().required(this.t("le_code_postal_43189")),city:js.Yj().required(this.t("la_ville_est_re_35239")),country:js.Yj().oneOf(this.countriesService.countriesCodes).required(this.t("le_pays_est_req_33749")),emailSenderId:js.ai().nullable(),dateFormat:js.Yj().required(this.t("le_format_est_r_17097")),datetimeFormat:js.Yj().required(this.t("le_format_est_r_17097")),timeFormat:js.Yj().required(this.t("le_format_est_r_17097"))})}updateOrganizationGeneralSchema(){return js.Ik().shape({organization:this.organizationInfosInputSchema()})}};cl=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(rl=void 0!==Qd&&Qd)?rl:Object,"function"==typeof(dl=void 0!==sl&&sl)?dl:Object,"function"==typeof(ll=void 0!==Ai&&Ai)?ll:Object])],cl);var ul,ml,gl;let hl=class extends Ds{countriesService;organizationInputService;translationService;constructor(e,t,n){super(n),this.countriesService=e,this.organizationInputService=t,this.translationService=n}eventInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{name:e?.name??"",description:e?.description??"",startAt:e?.startAt??Vo.c9.invalid("Invalid"),endAt:e?.endAt??Vo.c9.invalid("Invalid"),languages:e?.languages??[t.user.language],timeZone:e?.timeZone??Vo.c9.local().zoneName??"utc",country:e?.country??t.user.country,layer:e?.layer??et.Google,latitude:e?.latitude??43.6087733,longitude:e?.longitude??3.87963579999996,emailSenderId:e?.emailSenderId,dayStartTime:e?.dayStartTime??"00:00",tagsIds:e?.tagsIds??[],fields:e?.fields??{},isWeezeventSynchronized:e?.isWeezeventSynchronized??!0,useAccreditations:e?.useAccreditations??!0,useCampaigns:e?.useCampaigns??!0,useDelegations:e?.useDelegations??!0,useDocuments:e?.useDocuments??!0,useForms:e?.useForms??!0,usePositions:e?.usePositions??!0,useWorkflows:e?.useWorkflows??!0,delegationsSpaceLayoutId:e?.delegationsSpaceLayoutId??null,groupsAccesses:(e?.groupsAccesses??[]).map(({groupId:e,roleId:t})=>({groupId:e,roleId:t}))}}eventGroupAccessDefault(){return{groupId:null,roleId:null}}eventInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("nom_de_l_v_nem_58512")),description:js.Yj(),startAt:ks.required(this.t("la_date_d_but_d_30022")).typeError(this.t("la_date_d_but_d_30022")),endAt:ks.required(this.t("la_date_de_fin_45068")).typeError(this.t("la_date_de_fin_45068")).test("after-start-at",this.t("la_date_de_fin_00429"),function(){return Vo.c9.isDateTime(this.parent.startAt)&&this.parent.startAt.isValid&&Vo.c9.isDateTime(this.parent.endAt)&&this.parent.endAt.isValid&&this.parent.endAt>=this.parent.startAt}),languages:js.YO().of(js.Yj().oneOf(Jd,this.t("les_langues_doi_27712"))).required(this.t("les_langues_son_53717")).min(1,this.t("vous_devez_s_le_16610")),timeZone:js.Yj().required(this.t("le_fuseau_horai_37109")).oneOf(nl,this.t("le_fuseau_horai_37109")),latitude:js.ai().nullable().typeError(this.t("la_latitude_doi_17800")).min(-90,this.t("la_latitude_doi_17800")).max(90,this.t("la_latitude_doi_17800")),longitude:js.ai().nullable().typeError(this.t("la_longitude_do_28762")).min(-180,this.t("la_longitude_do_28762")).max(180,this.t("la_longitude_do_28762")),emailSenderId:js.ai().nullable(),dayStartTime:js.Yj().required(this.t("l_heure_laque_87748")),isWeezeventSynchronized:js.zM().required(),usePositions:js.zM().required(),useAccreditations:js.zM().required(),useDelegations:js.zM().required(),useForms:js.zM().required(),useDocuments:js.zM().required(),useWorkflows:js.zM().required(),groupsAccesses:js.YO().of(js.Ik().shape({groupId:js.ai().nullable().required(this.t("vous_devez_s_le_78671")),roleId:js.ai().nullable().required(this.t("vous_devez_s_le_18837"))}))})}eventOrganizationInputSchema(e){return js.Ik().shape({event:this.eventInputSchema(),organization:this.organizationInputService.organizationInputSchema(e)})}createUpdateEventSchema(e){const t=this.eventInputSchema();return js.Ik().shape({event:e?t.shape({fields:e}):t})}};hl=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(ul=void 0!==Qd&&Qd)?ul:Object,"function"==typeof(ml=void 0!==cl&&cl)?ml:Object,"function"==typeof(gl=void 0!==Ai&&Ai)?gl:Object])],hl);var pl,fl,Il;let _l=class extends sr{static{pl=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...sr.IMPORT_COLUMNS_DEFAULT,Name:"name",StartAt:"startAt",EndAt:"endAt",Country:"country",DayStartTime:"dayStartTime",Description:"description",Languages:"languages",Latitude:"latitude",Layer:"layer",Longitude:"longitude",Tags:"tags",TimeZone:"timeZone",IsWeezeventSynchronized:"isWeezeventSynchronized",UseAccreditations:"useAccreditations",UseCampaigns:"useCampaigns",UseDelegations:"useDelegations",UseDocuments:"useDocuments",UseForms:"useForms",UsePositions:"usePositions",UseWorkflows:"useWorkflows"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ze.Update?[pl.IMPORT_COLUMNS_DEFAULT.Id]:[],pl.IMPORT_COLUMNS_DEFAULT.Name,pl.IMPORT_COLUMNS_DEFAULT.StartAt,pl.IMPORT_COLUMNS_DEFAULT.EndAt];constructor(e,t){super(e,t),this.csvInputService=e}};_l=pl=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(fl=void 0!==Js&&Js)?fl:Object,"function"==typeof(Il=void 0!==Ai&&Ai)?Il:Object])],_l);var yl;let xl=class extends $s{constructor(e){super(e)}settingsDesignInputSchema(){return js.Ik().shape({title:js.Yj().required(),intro:js.Yj()})}settingsInputSchema(){return js.Ik().shape({events:js.YO().of(js.Ik().shape({buttonText:js.Yj().required(),descriptionText:js.Yj().max(70,this.t("the_maximum_len_30779",70)),eventId:js.ai().required(),formId:js.ai().nullable()}))})}};xl=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(yl=void 0!==Ai&&Ai)?yl:Object])],xl);var Sl,vl=n(6996),bl=n(7231);let jl=class{translationService;constructor(e){this.translationService=e}now(){return Vo.c9.utc()}invalid(){return Vo.c9.invalid("Invalid")}toLocaleString(e,t){return e.toLocaleString(t,{locale:el(this.translationService.language)})}};jl=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Sl=void 0!==Ai&&Ai)?Sl:Object])],jl);const Al=Vo.c9.fromObject({year:1920,month:1,day:1}),Cl=Vo.c9.now();function El(e){if(Vo.c9.isDateTime(e)&&e?.isValid)return e;if(v(e)){const t=Vo.c9.fromISO(e);return t.isValid?t:null}return null}var Tl=n(2662);const Ol=/^[0-9]{11}$/i,Rl=Vo.c9.now().year-2e3;function Ml(e){if(v(e)&&Ol.test(e)){const t=(0,Tl.A)(e.substring(0,2),10);let n=(0,Tl.A)(e.substring(0,9),10);const i=(0,Tl.A)(e.substring(9),10);return t<=Rl&&(n=2e9+n),i===97-n%97}return!1}var Dl,wl,$l;let Pl=class{countriesService;dateTimeService;translationService;constructor(e,t,n){this.countriesService=e,this.dateTimeService=t,this.translationService=n}getValueString(e,t,n={}){switch(e.fieldType){case Fe.Text:return this.getTextValue(e,t);case Fe.Textarea:case Fe.Time:case Fe.Address:return t[e.slug]||"";case Fe.Sex:return this.getSexValue(e,t);case Fe.Language:return this.getLanguageValue(e,t);case Fe.Nationality:return this.getNationalityValue(e,t);case Fe.Country:return this.getCountryValue(e,t);case Fe.Select:return this.getSelectValue(e,t);case Fe.Checkbox:case Fe.Validation:return this.getBooleanValue(e,t);case Fe.Date:return this.getDateValue(e,t,n.dateFormat);case Fe.Datetime:return this.getDatetimeValue(e,t,n.datetimeFormat);case Fe.File:return"name"===n.fileReturnValue?t[e.slug]?.name||"":t[e.slug]?.url||"";case Fe.Phone:return this.getPhoneValue(e,t);case Fe.Number:return this.getIntValue(e,t);default:return wr(e.fieldType)}}getValue(e,t){return t[e.slug]}getSelectValues(e,t){const n=g(this.getValue(e,t)??[]);return(0,bs.A)(n.map(t=>e.values.find(e=>e.id===t)?.value))}getSelectCustomFieldValues(e,t){const n=g(this.getValue(e,t)??[]);return(0,bs.A)(n.map(t=>e.values.find(e=>e.id===t)))}getTextValue(e,t){const n=this.getValue(e,t);return v(n)?function(e,t){return"firstName"===e.slug||"lastName"===e.slug?C(t):e.fieldSubtype===Le.Avs?function(e){const t=e.replace(/\D/g,"");return 13===t.length&&t.startsWith("756")?`756.${t.substring(3,7)}.${t.substring(7,11)}.${t.substring(11)}`:e}(t):e.fieldSubtype===Le.Iban?function(e){const t=e.toUpperCase().trim().replace(/\s+/g,"");return $r.test(t)&&t.length===Pr[t.substring(0,2)]?t.match(/.{1,4}/g).join(" "):e}(t):t}(e,n):n||""}getSexValue(e,t){return this.translationService.translate(this.getValue(e,t)??"")}getLanguageValue(e,t){return this.translationService.translate(this.getValue(e,t)??"")}getNationalityValue(e,t){return this.countriesService.getNationality(this.getValue(e,t)??"")??""}getCountryValue(e,t){return this.countriesService.getName(this.getValue(e,t)??"")??""}getBooleanValue(e,t){const n=this.getValue(e,t);return!0===n?this.translationService.translate("oui_54361"):!1===n?this.translationService.translate("non_33516"):""}getDateValue(e,t,n){let i=this.getValue(e,t);return v(i)&&(i=Vo.c9.fromISO(i,{zone:"utc"})),Vo.c9.isDateTime(i)&&i.isValid?v(n)?i.toFormat(n):this.dateTimeService.toLocaleString(i,oa.DateOnly.MonthLong):""}getDatetimeValue(e,t,n){let i=this.getValue(e,t);return v(i)&&(i=Vo.c9.fromISO(i,{zone:"utc"})),Vo.c9.isDateTime(i)&&i.isValid?v(n)?i.toFormat(n):this.dateTimeService.toLocaleString(i,oa.DateTime):""}getPhoneValue(e,t){return this.getValue(e,t)?.internationalFormat??""}getIntValue(e,t){return this.getValue(e,t)?.toString()??""}getSelectValue(e,t){const n=g(this.getValue(e,t)??[]);return(0,bs.A)(n.map(t=>e.values.find(e=>e.id===t)?.value)).join(", ")}};Pl=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Dl=void 0!==Qd&&Qd)?Dl:Object,"function"==typeof(wl=void 0!==jl&&jl)?wl:Object,"function"==typeof($l=void 0!==Ai&&Ai)?$l:Object])],Pl);const Nl=u([Fe.Country,Fe.Language,Fe.Nationality,Fe.Select]);function kl(e,t,n){if(e.hasCondition&&e.conditionCustomField){const i=n.find(t=>t.id===e.conditionCustomField.id);if(i){if(kl(i,t,n)){const n=t[e.conditionCustomField.slug];return"boolean"==typeof n&&e.conditionCustomField.fieldType===Fe.Checkbox?n===e.conditionValue:!(!Nl.includes(e.conditionCustomField.fieldType)||!h(e.conditionValue))&&(0,bl.A)(g(n),e.conditionValue).length>0}return!1}return!1}return!0}var zl,Ll,Fl,Ul,Bl;const Gl=oa.DateOnly.Numeric,Vl=Jd.concat(Hn);let Wl=class extends $s{countriesService;dateTimeService;documentInputService;phoneInputService;translationService;constructor(e,t,n,i,o){super(o),this.countriesService=e,this.dateTimeService=t,this.documentInputService=n,this.phoneInputService=i,this.translationService=o}fieldsUpdateInputDefault(e,t,n,i){return Object.fromEntries(t.map(t=>{const o=this.getFieldValue(e,t);return[t.slug,o??this.fieldUpdateInputDefault(t,n,i)]}))}getValidationRuleError(e,t,n){switch(Fr(e)){case"text":return v(t)?this.textValidationRuleError(e.name,e.validationRules,t):null;case"number":return"number"==typeof t?this.numberValidationRuleError(e.name,e.validationRules,t):null;case"date":{const i=v(t)||Vo.c9.isDateTime(t)?aa(t):null;return i?.isValid?this.dateValidationRuleError(e.name,e.validationRules,i,n):null}default:return null}}changedFieldsSchema(e,t,n){return js.Ik().shape(Object.fromEntries(e.filter(({slug:e})=>!(0,vl.A)(n[e],t[e])).map(e=>[e.slug,this.fieldSchema(e,!1)])))}fieldSchema(e,t){const n=t=>t.test("validation-rules","",(t,n)=>{const i=this.getValidationRuleError(e,t);return!i||n.createError({message:i})}),i=(i,o)=>{const a=()=>n(i()),s=()=>n(o());if(e.conditionCustomField)return js.Ik().when(e.conditionCustomField.slug,([n])=>t&&(e.conditionCustomField.fieldType===Fe.Checkbox&&n===e.conditionValue||Nl.includes(e.conditionCustomField.fieldType)&&h(e.conditionValue)&&(0,bl.A)(g(n),e.conditionValue).length>0)?a():s());{let e;return e=t?a():s(),e}};switch(e.fieldType){case Fe.File:return i(()=>this.documentInputService.documentInputSchema(e.name),()=>this.documentInputService.documentInputSchemaNotRequired());case Fe.Phone:return i(()=>this.phoneInputService.phoneInputSchema(),()=>this.phoneInputService.phoneInputSchemaNotRequired());case Fe.Text:case Fe.Textarea:case Fe.Time:case Fe.Address:return e.fieldProperty===ze.Eid?i(()=>js.Yj().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)).test("valid-eid",this.t("le_num_ro_de_re_71488"),e=>!(!v(e)||12!==e.length||!e.startsWith("********"))||Ml(e)),()=>js.Yj()):e.fieldSubtype!==Le.Freeform?i(()=>js.Yj().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)).test("valid-eid",this.t("_1_n_est_pas_a_14932",e.name),t=>{if(v(t)&&12===t.length&&t.startsWith("********"))return!0;switch(e.fieldSubtype){case Le.Eid:return Ml(t);case Le.Avs:return function(e){if(v(e)){const t=e.replace(/\D/g,"");if(13===t.length&&t.startsWith("756")){const e=t.substring(0,12).split("").reduce((e,t,n)=>n%2==0?e+Number(t):e+3*Number(t),0)%10;return(0===e?0:10-e)===Number(t[12])}return!1}return!1}(t);case Le.Iban:return function(e){if(v(e)){const t=e.toUpperCase().trim().replace(/\s+/g,"");if($r.test(t)){const e=t.substring(0,2);if(t.length===Pr[e]){const e=`${t.substring(4)}${t.substring(0,4)}`;let n="";for(const t of e)n=/[A-Z]/.test(t)?`${n}${t.charCodeAt(0)-55}`:`${n}${t}`;return BigInt(n)%97n==1n}return!1}return!1}return!1}(t);case Le.Freeform:return!0;default:return wr(e.fieldSubtype)}}),()=>js.Yj()):i(()=>js.Yj().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>js.Yj());case Fe.Number:return i(()=>js.ai().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>js.ai().nullable());case Fe.Checkbox:return i(()=>js.zM().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>js.zM());case Fe.Validation:return i(()=>js.zM().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)).oneOf([!0],this.t("_1_doit_obliga_82862",e.name)),()=>js.zM());case Fe.Select:return e.canSelectMultiple?i(()=>js.YO().of(js.ai().required()).required(this.t("_1_est_requis_99856",e.name)).min(1,this.t("vous_devez_s_le_55757",e.name)),()=>js.YO().of(js.ai())):i(()=>js.ai().oneOf(e.values.map(({id:e})=>e),this.oneOfMessage(e.name,e.values.map(({value:e})=>e))).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>js.ai().oneOf(e.values.map(({id:e})=>e),this.oneOfMessage(e.name,e.values.map(({value:e})=>e))));case Fe.Date:case Fe.Datetime:return e.fieldProperty===ze.DateOfBirth?i(()=>ks.required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("la_date_est_inv_22002",e.name)).test("valid-date-of-birth",this.t("la_date_de_nais_19129"),e=>!(!Vo.c9.isDateTime(e)||!e.isValid)&&e>=Al&&e<=Cl),()=>js.gl().nullable().test("valid-date-of-birth",this.t("la_date_de_nais_19129"),e=>!Vo.c9.isDateTime(e)||!e.isValid||e>=Al&&e<=Cl)):i(()=>ks.required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("la_date_est_inv_22002",e.name)),()=>js.gl().nullable());case Fe.Sex:return i(()=>js.Yj().oneOf(ci,this.oneOfMessage(e.name,ci)).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>js.Yj().oneOf(ci,this.oneOfMessage(e.name,ci)));case Fe.Language:return i(()=>js.Yj().oneOf(Vl,this.oneOfMessage(e.name,Vl)).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>js.Yj().oneOf(Vl,this.oneOfMessage(e.name,Vl)));case Fe.Nationality:case Fe.Country:return i(()=>js.Yj().oneOf(this.countriesService.countriesCodes,this.oneOfMessage(e.name,this.countriesService.countriesCodes)).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>js.Yj().oneOf(this.countriesService.countriesCodes,this.oneOfMessage(e.name,this.countriesService.countriesCodes)));default:return wr(e.fieldType)}}textValidationRuleError(e,t,n){if("regex"===t.mode)return v(t.regex)&&!new RegExp(t.regex).test(n)?t.regexMessage||this.t("_1_n_a_pas_le_68593",e):null;if(t.noLeadingTrailingSpaces&&n!==n.trim())return this.t("_1_ne_doit_pas_16247",e);if(t.noSpaces&&/\s/.test(n))return this.t("_1_ne_doit_pas_30149",e);if("number"==typeof t.minLength&&n.lengtht.maxLength)return this.t("_1_doit_conten_24426",e,t.maxLength);switch(t.allowedCharacters){case"numbers":return/^[0-9.,]*$/.test(n)?null:this.t("_1_ne_doit_con_32219",e);case"noSymbols":return/^[\p{L}\p{N}\s]*$/u.test(n)?null:this.t("_1_ne_doit_con_83191",e);case"uppercase":return n===n.toLocaleUpperCase()?null:this.t("_1_ne_doit_con_44580",e);case"lowercase":return n===n.toLocaleLowerCase()?null:this.t("_1_ne_doit_con_13605",e);default:return null}}numberValidationRuleError(e,t,n){return"number"==typeof t.min&&nt.max?this.t("_1_doit_tre_i_05381",e,t.max):null}dateValidationRuleError(e,t,n,i){const o=n.toISODate();if("past"===t.range)return o>Vo.c9.now().setZone(i??n.zone).toISODate()?this.t("_1_doit_tre_u_03177",e):null;if("between"===t.range){const n=t.start?aa(t.start):null,i=t.end?aa(t.end):null;return n?.isValid&&oi.toISODate()?this.t("_1_doit_tre_c_56697",e,n?this.dateTimeService.toLocaleString(n,Gl):"",i?this.dateTimeService.toLocaleString(i,Gl):""):null}return null}fieldUpdateInputDefault(e,t,n){switch(e.fieldType){case Fe.Checkbox:case Fe.Validation:return!!n&&void 0;case Fe.File:return this.documentInputService.documentInputDefault();case Fe.Phone:return this.phoneInputService.phoneInputDefault(t);case Fe.Select:return e.canSelectMultiple?[]:void 0;case Fe.Address:case Fe.Date:case Fe.Datetime:case Fe.Language:case Fe.Number:case Fe.Sex:case Fe.Text:case Fe.Textarea:case Fe.Time:return;case Fe.Country:return t.user.country;case Fe.Nationality:return t.user.nationality;default:return wr(e.fieldType)}}getFieldValue(e,t){const n=e[t.slug];return t.fieldType===Fe.Phone&&n?(0,L.A)(n,al):t.fieldType===Fe.File?(0,L.A)(n,Gr):t.fieldType===Fe.Date&&n?Vo.c9.fromISO(n,{zone:"UTC"}):n}};Wl=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(zl=void 0!==Qd&&Qd)?zl:Object,"function"==typeof(Ll=void 0!==jl&&jl)?Ll:Object,"function"==typeof(Fl=void 0!==Vr&&Vr)?Fl:Object,"function"==typeof(Ul=void 0!==sl&&sl)?Ul:Object,"function"==typeof(Bl=void 0!==Ai&&Ai)?Bl:Object])],Wl);var ql,Yl,Hl;let Zl=class extends $s{documentInputService;archiveInputService;constructor(e,t,n){super(n),this.documentInputService=e,this.archiveInputService=t}default(){return{input:{archive:this.documentInputService.documentInputDefault(),fieldId:-1}}}schema(){return js.Ik().shape({input:js.Ik().shape({archive:this.archiveInputService.schema(),fieldId:js.Yj().required(this.t("le_champ_person_80074")).typeError(this.t("le_champ_person_80074"))})})}};Zl=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(ql=void 0!==Vr&&Vr)?ql:Object,"function"==typeof(Yl=void 0!==fr&&fr)?Yl:Object,"function"==typeof(Hl=void 0!==Ai&&Ai)?Hl:Object])],Zl);var Kl;let Ql=class extends _r{constructor(e){super(e)}step1Schema(){return js.Ik().shape({email:this.email()})}step2Schema(){return js.Ik().shape({email:this.email(),code:this.code(),password:this.passwordRules()})}};Ql=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Kl=void 0!==Ai&&Ai)?Kl:Object])],Ql);var Xl;let Jl=class extends $s{constructor(e){super(e)}formInputDefault(){return{name:""}}formInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_est_requ_61536"))})}createFormSchema(){return js.Ik().shape({form:this.formInputSchema()})}};Jl=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Xl=void 0!==Ai&&Ai)?Xl:Object])],Jl);var ec;let tc=class extends $s{constructor(e){super(e)}formParametersAccreditationsInputDefault(e){return{accreditationDisplay:e?.accreditationDisplay||bt.None,accreditationFilter:e?.accreditationFilter||Ct.None,hiddenAccreditationsCategoriesIds:e?.hiddenAccreditationsCategoriesIds||[],hiddenAccreditationsIds:e?.hiddenAccreditationsIds||[],hiddenAccreditationsSlotsIds:e?.hiddenAccreditationsSlotsIds||[],displayedAccreditationsCategoriesIds:e?.displayedAccreditationsCategoriesIds||[],displayedAccreditationsIds:e?.displayedAccreditationsIds||[],displayedAccreditationsSlotsIds:e?.displayedAccreditationsSlotsIds||[],showFullAccreditation:e?.showFullAccreditation??!0,showAccreditationDescription:e?.showAccreditationDescription??!1,accreditationTitle:e?.accreditationTitle||"",accreditationSubtitle:e?.accreditationSubtitle||""}}formParametersAccreditationsInputSchema(){return js.Ik().shape({accreditationDisplay:js.Yj().required(this.t("la_strat_gie_d_70458")).oneOf(oi,this.t("la_strat_gie_d_70458")),accreditationFilter:js.Yj().required(this.t("la_strat_gie_de_28051")).oneOf(ri,this.t("la_strat_gie_de_28051")),hiddenAccreditationsIds:js.YO().of(js.ai()),showFullAccreditation:js.zM().required(),showAccreditationDescription:js.zM().required(),accreditationTitle:js.Yj(),accreditationSubtitle:js.Yj()})}updateFormParametersAccreditationsSchema(){return js.Ik().shape({form:this.formParametersAccreditationsInputSchema()})}};tc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(ec=void 0!==Ai&&Ai)?ec:Object])],tc);var nc;let ic=class extends $s{constructor(e){super(e)}formParametersAvailabilitiesInputDefault(e){return{slotDisplay:e?.slotDisplay||Et.Hide,minNumberOfSlots:e?.minNumberOfSlots??1,daysDisplay:e?.daysDisplay||jt.AllDays,customSlotsPeriods:(e?.customSlotsPeriods??[]).map(e=>(0,Ni.A)(e,["id","conditionCustomField"])),slotTitle:e?.slotTitle||"",slotSubtitle:e?.slotSubtitle||""}}formParametersAvailabilitiesInputSchema(){return js.Ik().shape({slotDisplay:js.Yj().required(this.t("la_strat_gie_d_34961")).oneOf(di,this.t("la_strat_gie_d_34961")),daysDisplay:js.Yj().required(this.t("la_strat_gie_de_56435")).oneOf(ai,this.t("la_strat_gie_de_56435"))})}updateFormParametersAvailabilitiesSchema(){return js.Ik().shape({form:this.formParametersAvailabilitiesInputSchema()})}};ic=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(nc=void 0!==Ai&&Ai)?nc:Object])],ic);var oc;let ac=class extends $s{constructor(e){super(e)}formParametersBroadcastInputDefault(e){return{segmentsIds:(e?.segments??[]).map(e=>e.segmentId),noAccessTitle:e?.noAccessTitle||"",noAccessMessage:e?.noAccessMessage||""}}formParametersBroadcastInputSchema(){return js.Ik().shape({segmentsIds:js.YO().of(js.ai())})}updateFormParametersBroadcastSchema(){return js.Ik().shape({form:this.formParametersBroadcastInputSchema()})}};ac=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(oc=void 0!==Ai&&Ai)?oc:Object])],ac);var sc;let rc=class extends $s{constructor(e){super(e)}formParametersGeneralInputDefault(e){return{name:e?.name??"",setAssignmentStateToWaiting:e?.setAssignmentStateToWaiting??!1,setAccreditationStateToWaiting:e?.setAccreditationStateToWaiting??!1,allowMultiProfiles:e?.allowMultiProfiles??!1,canRefill:e?.canRefill??!1,description:e?.description||"",successTitle:e?.successTitle||"",successMessage:e?.successMessage||"",customFields:e?.customFields||[],areTeamsAllowed:e?.areTeamsAllowed??!1,maxTeamMembers:e?.maxTeamMembers,teamMemberFillFullForm:e?.teamMemberFillFullForm??!0,emailTitle:e?.emailTitle||"",informationTitle:e?.informationTitle||"",registerButtonText:e?.registerButtonText||"",isEditableInMemberSpace:e?.isEditableInMemberSpace??!0,ticketUrl:e?.ticketUrl||""}}formParametersGeneralInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_est_requ_61536")),allowMultiProfiles:js.zM().required(),setAssignmentStateToWaiting:js.zM().required(),setAccreditationStateToWaiting:js.zM().required(),description:js.Yj(),successTitle:js.Yj(),successMessage:js.Yj(),areTeamsAllowed:js.zM().required(),maxTeamMembers:js.ai().nullable(),teamMemberFillFullForm:js.zM().required(),informationTitle:js.Yj(),registerButtonText:js.Yj(),ticketUrl:js.Yj().test("valid-ticket-url",this.t("le_lien_doit_co_30275"),e=>!v(e)||e.startsWith("https://"))})}updateFormParametersGeneralSchema(){return js.Ik().shape({form:this.formParametersGeneralInputSchema()})}};rc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(sc=void 0!==Ai&&Ai)?sc:Object])],rc);var dc;let lc=class extends $s{constructor(e){super(e)}formParametersMissionsInputDefault(e){return{positionDisplay:e?.positionDisplay||At.None,positionFilter:e?.positionFilter||Ct.FilterWithSlots,positionRanking:e?.positionRanking||We.Unranked,positionLimit:e?.positionLimit||3,hiddenPositionsCategoriesIds:e?.hiddenPositionsCategoriesIds||[],hiddenPositionsIds:e?.hiddenPositionsIds||[],hiddenPositionsSlotsIds:e?.hiddenPositionsSlotsIds||[],hiddenPositionsTagsIds:e?.hiddenPositionsTagsIds||[],displayedPositionsCategoriesIds:e?.displayedPositionsCategoriesIds||[],displayedPositionsIds:e?.displayedPositionsIds||[],displayedPositionsSlotsIds:e?.displayedPositionsSlotsIds||[],displayedPositionsTagsIds:e?.displayedPositionsTagsIds||[],showFullPosition:e?.showFullPosition??!0,showPositionCategoryDescription:e?.showPositionCategoryDescription??!1,showPositionDescription:e?.showPositionDescription??!1,positionTitle:e?.positionTitle||"",positionSubtitle:e?.positionSubtitle||"",willAutoAssign:e?.willAutoAssign??!1}}formParametersMissionsInputSchema(){return js.Ik().shape({positionDisplay:js.Yj().required(this.t("la_strat_gie_d_44170")).oneOf(si,this.t("la_strat_gie_d_44170")),positionFilter:js.Yj().required(this.t("la_strat_gie_de_13294")).oneOf(ri,this.t("la_strat_gie_de_13294")),positionRanking:js.Yj().required(this.t("le_type_de_clas_66819")).oneOf(Vn,this.t("le_type_de_clas_66819")),positionLimit:js.ai().required(this.t("le_nombre_maxim_38249")).min(1,this.t("le_nombre_de_ch_27910")),hiddenPositionsCategoriesIds:js.YO().of(js.ai()),hiddenPositionsIds:js.YO().of(js.ai()),hiddenPositionsSlotsIds:js.YO().of(js.ai()),hiddenPositionsTagsIds:js.YO().of(js.ai()),displayedPositionsCategoriesIds:js.YO().of(js.ai()),displayedPositionsIds:js.YO().of(js.ai()),displayedPositionsSlotsIds:js.YO().of(js.ai()),displayedPositionsTagsIds:js.YO().of(js.ai()),showFullPosition:js.zM().required(),showPositionCategoryDescription:js.zM().required(),showPositionDescription:js.zM().required(),positionTitle:js.Yj(),positionSubtitle:js.Yj(),willAutoAssign:js.zM().required()})}updateFormParametersMissionsSchema(){return js.Ik().shape({form:this.formParametersMissionsInputSchema()})}};lc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(dc=void 0!==Ai&&Ai)?dc:Object])],lc);var cc;let uc=class extends $s{constructor(e){super(e)}formParametersStateInputDefault(e){return{state:e?.state||Ye.Open,closedTitle:e?.closedTitle||"",closedMessage:e?.closedMessage||"",closedAt:e?.closedAt||null}}formParametersStateInputSchema(){return js.Ik().shape({state:js.Yj().required(this.t("cl_turer_le_for_10541")).oneOf(Wn,this.t("cl_turer_le_for_10541")),closedMessage:js.Yj(),closedAt:ks.when("state",{is:Ye.ClosedAt,then:e=>e.required(this.t("la_date_de_cl_t_63358")).typeError(this.t("la_date_de_cl_t_63358")),otherwise:e=>e.nullable()})})}updateFormParametersStateSchema(){return js.Ik().shape({form:this.formParametersStateInputSchema()})}};uc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(cc=void 0!==Ai&&Ai)?cc:Object])],uc);var mc,gc,hc,pc,fc;let Ic=class extends $s{countriesService;documentInputService;fieldInputService;phoneInputService;constructor(e,t,n,i,o){super(e),this.countriesService=t,this.documentInputService=n,this.fieldInputService=i,this.phoneInputService=o}userInfoUpdateInputDefault(e,t,n={}){const i=this.countriesService.getDefaultCountryValues(n.countryCode);return{id:e?.id??null,fields:this.fieldInputService.fieldsUpdateInputDefault(e?.fields||{},t,i,n.checkboxDefaultEmpty)}}updateUserInfoChangedFieldsSchema(e,t,n){return js.Ik().shape({userInfo:js.Ik().shape({fields:this.fieldInputService.changedFieldsSchema(e,t,n)})})}formUserInfoInputSchema(e){return js.Ik().shape({fields:js.Ik().shape(Object.fromEntries(e.map(({isMandatory:e,customField:t})=>[t.slug,this.fieldInputService.fieldSchema(t,e)])))})}userInfoProfileInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{email:e.email,fields:{firstName:e.userInfo?.fields?.firstName??"",lastName:e.userInfo?.fields?.lastName??"",language:e.language??e.userInfo?.fields?.language??t.user.language??$t.En,picture:e.userInfo.fields.picture?(0,L.A)(e.userInfo.fields.picture,Gr):this.documentInputService.documentInputDefault(),phone:e.userInfo.fields.phone?(0,L.A)(e.userInfo.fields.phone,al):this.phoneInputService.phoneInputDefault(t)}}}userInfoFields(){return{fields:js.Ik().shape({firstName:js.Yj().nullable(),lastName:js.Yj().nullable(),picture:this.documentInputService.documentInputSchemaNotRequired(),language:js.Yj().required(this.t("les_langues_doi_27712")).oneOf(Jd,this.t("les_langues_doi_27712")),phone:this.phoneInputService.phoneInputSchemaNotRequired()})}}userInfoProfileInputSchema(){return js.Ik().shape({email:js.Yj().email(this.t("l_e_mail_est_re_04856")).required(this.t("l_e_mail_est_re_04856")),...this.userInfoFields()})}updateProfileSchema(){return js.Ik().shape({userInfo:this.userInfoProfileInputSchema()})}userInfoAndTermsInputDefault(e){return{...(0,Ni.A)(e.userInfo,["id"]),termsAccepted:!1}}userInfoAndTermsInputSchema(){return js.Ik().shape({firstName:js.Yj().nullable(),lastName:js.Yj().nullable(),phone:this.phoneInputService.phoneInputSchemaNotRequired(),termsAccepted:js.zM().oneOf([!0],this.t("il_est_n_cessai_83896")).required(this.t("il_est_n_cessai_83896"))})}updateUserInfoAndTermsSchema(){return js.Ik().shape({userInfoAndTerms:this.userInfoAndTermsInputSchema()})}};Ic=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(mc=void 0!==Ai&&Ai)?mc:Object,"function"==typeof(gc=void 0!==Qd&&Qd)?gc:Object,"function"==typeof(hc=void 0!==Vr&&Vr)?hc:Object,"function"==typeof(pc=void 0!==Wl&&Wl)?pc:Object,"function"==typeof(fc=void 0!==sl&&sl)?fc:Object])],Ic);var _c;let yc=class extends $s{constructor(e){super(e)}volunteersRegistrationsSlotInputDefault(e){return{startDate:e||Vo.c9.invalid("Invalid"),startTime:"",endDate:e||Vo.c9.invalid("Invalid"),endTime:""}}volunteersRegistrationsSlotInputSchema(e,t){const n=t.plus({day:1}).endOf("day");return js.Ik().shape({startDate:ks.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")).test("after-event-start-date",this.t("la_date_de_d_bu_68630",e.toLocaleString()),t=>t>=e),startTime:js.Yj().required(this.t("heure_de_d_but_90785")),endDate:ks.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")).test("after-start-date",this.t("la_date_de_fin_00429"),(e,t)=>Vo.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid&&Vo.c9.isDateTime(t.parent.endDate)&&t.parent.endDate.isValid&&t.parent.endDate>=t.parent.startDate).test("before-event-end-date",this.t("la_date_de_fin_49125",t.toLocaleString()),e=>e<=n),endTime:js.Yj().required(this.t("l_heure_de_fin_78626"))})}};yc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(_c=void 0!==Ai&&Ai)?_c:Object])],yc);var xc,Sc;let vc=class extends $s{translationService;volunteerRegistrationSlotInputService;constructor(e,t){super(e),this.translationService=e,this.volunteerRegistrationSlotInputService=t}slotsFields(e,t,n,i,o){switch(e){case Et.Display:case Et.DisplayDays:case Et.Calendar:case Et.Custom:return{slots:js.YO().of(this.volunteerRegistrationSlotInputService.volunteersRegistrationsSlotInputSchema(n,i)).min(o?0:t,this.t("vous_devez_ajou_68961",t))};case Et.Hide:return{};default:return wr()}}volunteersRegistrationsSlotsUpdateInputDefault(e){return h(e)?e.map(e=>({startDate:e.startDate,startTime:e.startTime,endDate:e.endDate,endTime:e.endTime})):[]}volunteersRegistrationsWishedPositionsInputDefault(){return{positionsCategoriesIds:[],positionsIds:[],positionsSlotsIds:[]}}volunteersRegistrationsWishedPositionsUpdateInputDefault(e){return e?{positionsCategoriesIds:e?.positionsCategoriesIds,positionsIds:e?.positionsIds,positionsSlotsIds:e?.positionsSlotsIds}:this.volunteersRegistrationsWishedPositionsInputDefault()}wishedPositionsFields(e,t,n){if(e===We.Ranked){if(t===At.Category)return{positionsCategoriesIds:js.YO().of(js.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_32044")).test("different",this.t("les_missions_so_04441"),e=>{const t=(0,bs.A)((e||[]).filter(e=>-1!==e));return h(t)&&(0,qo.A)(t).length===t.length})};if(t===At.Position)return{positionsIds:js.YO().of(js.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_89603")).test("different",this.t("les_missions_so_04441"),e=>{const t=(0,bs.A)((e||[]).filter(e=>-1!==e));return h(t)&&(0,qo.A)(t).length===t.length})};if(t===At.Slot)return{positionsSlotsIds:js.YO().of(js.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_89603")).test("different",this.t("les_missions_so_04441"),e=>{const t=(0,bs.A)((e||[]).filter(e=>-1!==e));return h(t)&&(0,qo.A)(t).length===t.length})};throw new Error("Should not happen")}switch(t){case At.Category:return{positionsCategoriesIds:js.YO().of(js.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_32044"))};case At.Position:return{positionsIds:js.YO().of(js.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_89603"))};case At.Slot:return{positionsSlotsIds:js.YO().of(js.ai()).min(n?0:1,this.t("vous_devez_s_le_89603"))};case At.None:return{};default:return wr()}}volunteersRegistrationsWishedAccreditationsInputDefault(){return{accreditationsSlotsIds:[]}}volunteersRegistrationsWishedAccreditationsUpdateInputDefault(e){return e?{accreditationProfileId:e.accreditationProfileId,accreditationsSlotsIds:e.accreditationsSlotsIds}:this.volunteersRegistrationsWishedAccreditationsInputDefault()}accreditationProfileFields(e,t){return e&&h(t)?{accreditationProfileId:js.ai().required(this.t("vous_devez_s_le_07918"))}:{}}accreditationsFields(e,t,n){if(t)return{};switch(e){case bt.Accreditation:return{accreditationsSlotsIds:js.YO().of(js.ai().typeError(this.t("s_lectionner_un_96571"))).min(n?0:1,this.t("vous_devez_s_le_72138"))};case bt.None:return{};default:return wr()}}userInfoAccreditationsSchema(e){return js.Ik().shape({userInfo:js.Ik().shape({accreditations:js.YO().of(js.Ik().shape({formId:js.ai().required(),...this.accreditationsFields(e,null)}))})})}adminAddSchema(){return js.Ik().shape({usersInfosIds:js.YO().of(js.ai()).min(1,this.t("vous_devez_s_le_83608")),sendVolunteerRegistrationEmail:js.zM().required()})}};vc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(xc=void 0!==Ai&&Ai)?xc:Object,"function"==typeof(Sc=void 0!==yc&&yc)?Sc:Object])],vc);var bc,jc,Ac,Cc,Ec;let Tc=class extends $s{fieldInputService;userInfoInputService;volunteerRegistrationInputService;volunteerRegistrationSlotInputService;constructor(e,t,n,i,o){super(e),this.fieldInputService=t,this.userInfoInputService=n,this.volunteerRegistrationInputService=i,this.volunteerRegistrationSlotInputService=o}formRegisterInputDefault(e,t,n,i){return{autoAccredit:!1,forOther:i.forOther,positionsSlotsIds:i.team?.positionsSlotsIds??[],positionsIds:i.team?.positionsIds??[],positionsCategoriesIds:i.team?.positionsCategoriesIds??[],accreditationProfileId:null,accreditationsSlotsIds:(i.delegationAccreditationsSlots??[]).filter(e=>e.isDefault).map(e=>e.accreditationSlotId),userInfo:this.userInfoInputService.userInfoUpdateInputDefault(t,n,{countryCode:i.countryCode}),sendNotificationEmail:i.sendNotificationEmail,slots:i.team?.slots??(i.slotDisplay===Et.Display?[this.volunteerRegistrationSlotInputService.volunteersRegistrationsSlotInputDefault(i.eventStartDate)]:[]),source:e}}formRegisterInformationsSchema(e){return js.Ik().shape({formRegister:js.Ik().shape({userInfo:this.userInfoInputService.formUserInfoInputSchema(e)})})}formRegisterSlotsSchema(e,t,n,i){return js.Ik().shape({formRegister:js.Ik().shape({...this.volunteerRegistrationInputService.slotsFields(e,t,n,i)})})}formRegisterPositionsSchema(e,t){return js.Ik().shape({formRegister:js.Ik().shape({...this.volunteerRegistrationInputService.wishedPositionsFields(e,t)})})}formRegisterAccreditationsSchema(e,t,n,i){const o=function(e){return Object.values(e.reduce((e,t)=>{if(e[t.customField.slug]){const n=e[t.customField.slug];return{...e,[t.customField.slug]:{accreditationsSlotsIds:n.accreditationsSlotsIds.concat(t.accreditationsSlotsIds),customField:t.customField,isMandatory:n.isMandatory||t.isMandatory}}}return{...e,[t.customField.slug]:{accreditationsSlotsIds:t.accreditationsSlotsIds,customField:t.customField,isMandatory:t.isMandatory}}},{}))}(n);return js.Ik().shape({formRegister:js.Ik().shape({...this.volunteerRegistrationInputService.accreditationsFields(e,i),userInfo:js.Ik().shape({fields:js.Ik().shape(Object.fromEntries(o.map(e=>{const n=e.isMandatory&&h((0,bl.A)(e.accreditationsSlotsIds,t));return[e.customField.slug,this.fieldInputService.fieldSchema(e.customField,n)]})))})})})}formRegisterSchema(e,{accreditationDisplay:t,areSectionsDisabled:n,delegationAccreditationsProfiles:i,delegationId:o,eventEndDate:a,eventStartDate:s,minNumberOfSlots:r,positionDisplay:d,positionRanking:l,slotDisplay:c}){return js.Ik().shape({email:js.Yj().required(this.t("l_e_mail_est_re_04856")).email(this.t("l_e_mail_est_re_04856")),formRegister:js.Ik().shape({userInfo:this.userInfoInputService.formUserInfoInputSchema(e),...this.volunteerRegistrationInputService.slotsFields(c,r,s,a,n?.isWishedAssignmentsDisabled),...this.volunteerRegistrationInputService.wishedPositionsFields(l,d,n?.isWishedAssignmentsDisabled),...this.volunteerRegistrationInputService.accreditationsFields(t,o,n?.isWishedAccreditationsDisabled),...this.volunteerRegistrationInputService.accreditationProfileFields(o,i)})})}};Tc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(bc=void 0!==Ai&&Ai)?bc:Object,"function"==typeof(jc=void 0!==Wl&&Wl)?jc:Object,"function"==typeof(Ac=void 0!==Ic&&Ic)?Ac:Object,"function"==typeof(Cc=void 0!==vc&&vc)?Cc:Object,"function"==typeof(Ec=void 0!==yc&&yc)?Ec:Object])],Tc);var Oc;let Rc=class extends $s{constructor(e){super(e)}default(e){return{name:e?.name??"",description:e?.description??"",usersInfosIds:(e?.members??[]).map(({id:e})=>e),eventsAccesses:(e?.accesses??[]).filter(e=>e.scope===Tt.Event&&e.eventId).map(e=>({eventId:e.eventId,roleId:e.roleId})),isWeezaccessSynchronized:e?.isWeezaccessSynchronized??!1}}eventAccessDefault(){return{eventId:null,roleId:null}}schema(){return js.Ik().shape({group:js.Ik().shape({name:js.Yj().required(this.t("le_nom_est_requ_61536")),description:js.Yj(),usersInfosIds:js.YO().of(js.ai()).required(),eventsAccesses:js.YO().of(js.Ik().shape({eventId:js.ai().nullable().required(this.t("vous_devez_s_le_61092")),roleId:js.ai().nullable().required(this.t("vous_devez_s_le_18837"))})).required(),isWeezaccessSynchronized:js.zM()}).required()}).required()}};Rc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Oc=void 0!==Ai&&Ai)?Oc:Object])],Rc);var Mc;let Dc=class extends $s{translationService;constructor(e){super(e),this.translationService=e}step1Schema(){return js.Ik().shape({[this.inputName]:js.Ik().shape(this.step1Fields())})}step2Schema(){return js.Ik().shape({[this.inputName]:js.Ik().shape(this.step2Fields())})}schema(){return js.Ik().shape({...this.step1Fields(),...this.step2Fields()})}strategyField(e=Qn){return js.Yj().required(this.t("la_strat_gie_es_82287")).oneOf(e,this.t("la_strat_gie_es_82287"))}};Dc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Mc=void 0!==Ai&&Ai)?Mc:Object])],Dc);var wc;let $c=class extends Dc{translationService;inputName="massAccredit";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{accreditationsSlotsIds:js.YO().of(js.ai()).required(this.t("vous_devez_s_le_72138")).when("accreditationProfile",{is:e=>!e,then:e=>e.min(1,this.t("vous_devez_s_le_72138"))})}}};$c=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(wc=void 0!==Ai&&Ai)?wc:Object])],$c);var Pc;let Nc=class extends $s{constructor(e){super(e)}massAddEventInputSchema(){return js.Ik().shape({massAddEvent:js.Ik().shape({eventId:js.ai().required(this.t("l_v_nement_est_88155")).typeError(this.t("l_v_nement_est_88155"))})})}massAddEventSchema(){return js.Ik().shape({eventId:js.ai().required(this.t("l_v_nement_est_88155")).typeError(this.t("l_v_nement_est_88155"))})}};Nc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Pc=void 0!==Ai&&Ai)?Pc:Object])],Nc);var kc;let zc=class extends Dc{translationService;inputName="massAssign";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{positionsSlotsIds:js.YO().of(js.ai()).required(this.t("vous_devez_s_le_28976")).min(1,this.t("vous_devez_s_le_28976"))}}};zc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(kc=void 0!==Ai&&Ai)?kc:Object])],zc);var Lc;let Fc=class extends Dc{translationService;inputName="massAvailabilitiesUpdate";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField(),formId:js.ai().required(this.t("le_formulaire_e_77404"))}}step2Fields(){return{slots:js.YO().of(js.Ik()).required(this.t("vous_devez_ajou_68961")).min(1,this.t("vous_devez_ajou_68961"))}}};Fc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Lc=void 0!==Ai&&Ai)?Lc:Object])],Fc);var Uc;let Bc=class extends Dc{translationService;inputName="massConditions";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField(Xn)}}step2Fields(){return{customFieldId:js.ai().required(this.t("le_champ_person_80074")),value:js.gl().required(this.t("la_valeur_est_r_70136"))}}};Bc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Uc=void 0!==Ai&&Ai)?Uc:Object])],Bc);var Gc;let Vc=class extends Dc{translationService;inputName="massAccreditationsProfiles";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{accreditationsProfiles:js.YO().of(js.Ik().shape({accreditationProfileId:js.ai().required(),maxResources:js.gl().nullable(),willAutoAccredit:js.zM().required()})).required(this.t("vous_devez_s_le_98277")).min(1,this.t("vous_devez_s_le_98277"))}}};Vc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Gc=void 0!==Ai&&Ai)?Gc:Object])],Vc);var Wc;let qc=class extends Dc{translationService;inputName="massAccreditationsSlots";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{accreditationsSlots:js.YO().of(js.Ik().shape({accreditationCategoryId:js.ai().required(),accreditationId:js.ai().required(),accreditationSlotId:js.ai().required(),isDefault:js.zM().required(),isVisible:js.zM().required(),maxResources:js.gl().nullable()})).required(this.t("vous_devez_s_le_72138")).min(1,this.t("vous_devez_s_le_72138"))}}};qc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Wc=void 0!==Ai&&Ai)?Wc:Object])],qc);var Yc;let Hc=class extends Dc{translationService;inputName="massPreAssign";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField(),level:js.Yj().required(this.t("le_niveau_est_r_81100")).oneOf(Jn,this.t("le_niveau_est_r_81100"))}}step2Fields(){return{positionsCategoriesIds:js.YO().of(js.ai()).test("non-empty-categories",this.t("vous_devez_s_le_32044"),function(){return this.parent.level!==it.Categories||this.parent.positionsCategoriesIds.length>0}),positionsIds:js.YO().of(js.ai()).test("non-empty-positions",this.t("vous_devez_s_le_89603"),function(){return this.parent.level!==it.Positions||this.parent.positionsIds.length>0})}}};Hc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Yc=void 0!==Ai&&Ai)?Yc:Object])],Hc);var Zc;let Kc=class extends $s{translationService;constructor(e){super(e),this.translationService=e}default(e){return{...e,groupId:void 0,customDocumentId:void 0,eventDocumentId:void 0,zplDocumentId:void 0}}schema(){const e=this;return js.Ik().shape({input:js.Ik().shape({groupId:js.Yj().required(this.t("le_lieu_d_impre_60407")),customDocumentId:js.ai().nullable(),eventDocumentId:js.ai().nullable(),zplDocumentId:js.ai().nullable()}).test({name:"exactly-one-document",test:({customDocumentId:t,eventDocumentId:n,zplDocumentId:i},o)=>1===[t,n,i].filter(Boolean).length||o.createError({message:e.t("a_wristband_to_25340"),path:"input.zplDocumentId"})})})}};Kc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Zc=void 0!==Ai&&Ai)?Zc:Object])],Kc);var Qc;let Xc=class extends $s{translationService;constructor(e){super(e),this.translationService=e}massStateUpdateSchema(){return js.Ik().shape({state:js.Yj().required(this.t("le_statut_est_r_13164")).oneOf([Vt.NotApplicable,Vt.PreAssigned,Vt.Refused,Vt.WaitingAssignment],this.t("le_statut_est_r_13164"))})}massAccreditationStateUpdateSchema(){return js.Ik().shape({state:js.Yj().required(this.t("le_statut_est_r_13164")).oneOf([te.NotApplicable,te.Refused,te.WaitingAccreditation],this.t("le_statut_est_r_13164"))})}};Xc=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Qc=void 0!==Ai&&Ai)?Qc:Object])],Xc);var Jc;let eu=class extends Dc{translationService;inputName="massProfileUpdate";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField([tt.Replace,tt.Delete])}}step2Fields(){return{accreditationProfileId:js.ai().nullable().when("strategy",{is:e=>e!==tt.Delete,then:e=>e.required(this.t("vous_devez_s_le_07918"))})}}};eu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Jc=void 0!==Ai&&Ai)?Jc:Object])],eu);let tu=class{positionsCustomFieldInputSchema(){return js.Ik().shape({customFieldId:js.ai().required(),conditionValue:js.gl().required()})}};tu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)()],tu);const nu=/^\d{1,2}:\d{2}$/,iu=/^\d{1,2}:\d{2}:\d{2}$/;function ou(e){return v(e)&&(null!==e.match(nu)||null!==e.match(iu))}function au(e){if(ou(e)){const[t,n]=e.split(":");return[parseInt(t,10),parseInt(n,10)]}return null}var su;let ru=class extends $s{constructor(e){super(e)}positionsSlotInputDefault(e,t){return{id:t?.id,name:t?.name??"",startDate:t?.startDate??e,startTime:t?.startTime??e.toFormat("HH:mm"),endDate:t?.endDate??e,endTime:t?.endTime??e.plus({hour:1}).toFormat("HH:mm"),resources:t?.resources??1,assignedResources:t?.assignedResources}}createPositionSlotSchema(){return js.Ik().shape({slot:this.positionsSlotInputSchema()})}positionsSlotInputSchema(){return js.Ik().shape({name:js.Yj(),startDate:ks.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")),startTime:js.Yj().required(this.t("heure_de_d_but_90785")),endDate:ks.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")).test("after-start-date",this.t("la_date_de_fin_00429"),(e,t)=>Vo.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid&&Vo.c9.isDateTime(t.parent.endDate)&&t.parent.endDate.isValid&&t.parent.endDate>=t.parent.startDate),endTime:js.Yj().required(this.t("l_heure_de_fin_78626")).test("after-start-time",this.t("la_date_de_fin_00429"),(e,t)=>{const n=Vo.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid,i=ou(t.parent.startTime),o=Vo.c9.isDateTime(t.parent.endDate)&&t.parent.endDate.isValid,a=ou(t.parent.endTime);if(n&&i&&o&&a){const[e,n]=au(t.parent.startTime),[i,o]=au(t.parent.endTime);return t.parent.startDate.set({hours:e,minutes:n})=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(su=void 0!==Ai&&Ai)?su:Object])],ru);var du,lu,cu;let uu=class extends $s{positionsCustomFieldInputService;positionsSlotInputService;constructor(e,t,n){super(n),this.positionsCustomFieldInputService=e,this.positionsSlotInputService=t}positionInputDefault(e,{positionCategoryId:t,layer:n,latitude:i,longitude:o,startAt:a}){let s=e?.category.id??t;return Number.isInteger(s)||(s=null),{positionCategoryId:s,name:e?.name??"",description:e?.description??"",privateNote:e?.privateNote??"",acronym:e?.acronym??"",color:e?.color??M.colors.primary500.value,icon:e?.icon??He.LocationDot,weezeventIsSynchronized:e?.weezeventIsSynchronized??!1,address:e?.address??null,latitude:e?.latitude??i??null,longitude:e?.longitude??o??null,zoom:e?.zoom??13,layer:e?.layer??n,tracesIds:e?.tracesIds??[],slots:e?.slots??[this.positionsSlotInputService.positionsSlotInputDefault(a)],positionDisplay:e?.positionDisplay??rt.List,conditionsOperator:e?.conditionsOperator??ge.And,positionsCustomFields:e?.positionsCustomFields??[],tagsIds:e?.tagsIds??[],fields:e?.fields??{},leadersIds:e?.fields??[]}}createUpdatePositionSchema(e){const t=this.positionInputSchema();return js.Ik().shape({position:e?t.shape({fields:e}):t})}positionInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_de_la_mi_74207")),positionCategoryId:js.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),acronym:js.Yj(),color:js.Yj().required(this.t("la_couleur_est_95740")),icon:js.Yj().required(this.t("l_ic_ne_est_req_15843")).oneOf(qn,this.t("l_ic_ne_est_req_15843")),description:js.Yj(),privateNote:js.Yj(),address:js.Yj().nullable(),latitude:js.ai().nullable().typeError(this.t("la_latitude_doi_43118")),longitude:js.ai().nullable().typeError(this.t("la_longitude_do_35170")),traces:js.YO().of(js.ai()),slots:js.YO().of(this.positionsSlotInputService.positionsSlotInputSchema()).required(this.t("vous_devez_avoi_26563")).min(1,this.t("vous_devez_avoi_26563")),positionDisplay:js.Yj().required(this.t("le_type_d_affic_60154")).oneOf(ei,this.t("le_type_d_affic_60154")),positionsCustomFields:js.YO().of(this.positionsCustomFieldInputService.positionsCustomFieldInputSchema()),tagsIds:js.YO().of(js.ai())})}};uu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(du=void 0!==tu&&tu)?du:Object,"function"==typeof(lu=void 0!==ru&&ru)?lu:Object,"function"==typeof(cu=void 0!==Ai&&Ai)?cu:Object])],uu);var mu,gu,hu;let pu=class extends sr{static{mu=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...sr.IMPORT_COLUMNS_DEFAULT,PositionName:"positionName",PositionCategoryName:"positionCategoryName",SlotStart:"slotStart",SlotEnd:"slotEnd",MaxResources:"slotMaxResources",SlotName:"slotName",Acronym:"acronym",Color:"color",Icon:"icon",Description:"description",ConditionsOperator:"conditionsOperator",Address:"address",Latitude:"latitude",Longitude:"longitude",MapLayer:"mapLayer",MapZoom:"mapZoom",LeadersEmails:"leadersEmails",LeadersFirstNames:"leadersFirstnames",LeadersLastNames:"leadersLastnames",PrivateNote:"privateNote",Tags:"tags"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ze.Update?[mu.IMPORT_COLUMNS_DEFAULT.Id]:[],mu.IMPORT_COLUMNS_DEFAULT.SlotStart,mu.IMPORT_COLUMNS_DEFAULT.SlotEnd,mu.IMPORT_COLUMNS_DEFAULT.MaxResources,mu.IMPORT_COLUMNS_DEFAULT.PositionName,mu.IMPORT_COLUMNS_DEFAULT.PositionCategoryName];constructor(e,t){super(e,t),this.csvInputService=e}};pu=mu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(gu=void 0!==Js&&Js)?gu:Object,"function"==typeof(hu=void 0!==Ai&&Ai)?hu:Object])],pu);var fu;function Iu(e){return e===ut.StartDate||e===ut.EndDate}function _u(e){return e===ut.StartTime||e===ut.EndTime}let yu=class extends $s{constructor(e){super(e)}positionsSlotsMassEditSchema(){return js.Ik().shape({massEdit:this.positionsSlotsMassEditInputSchema()})}positionsSlotsMassEditInputSchema(){return js.Ik().shape({selecteds:js.Ik().required(),property:js.Yj().required().oneOf(ti),strategy:js.Yj().required().oneOf(ni).when("property",{is:Iu,then:e=>e.oneOf([mt.Replace])}),value:js.gl().test("valid-value",(e,t)=>{const{property:n,strategy:i}=t.parent;return Iu(n)?Vo.c9.isDateTime(e)&&e.isValid||"string"==typeof e&&Vo.c9.fromISO(e).isValid||t.createError({message:this.t("la_date_est_req_98470")}):_u(n)&&i===mt.Replace?ou(e)||t.createError({message:this.t("l_heure_est_req_51396")}):_u(n)?Cs(e)||t.createError({message:this.t("le_nombre_de_mi_02803")}):Cs(e)||t.createError({message:this.t("le_nombre_de_me_04870")})})})}};yu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(fu=void 0!==Ai&&Ai)?fu:Object])],yu);var xu;function Su(e){switch(e){case xt.OrganizationNotLinked:case xt.PartnersUnreachable:case xt.PartnerNotFound:return"weezaccessPartnerId";case xt.EventNotLinked:case xt.GroupsUnreachable:case xt.GroupNotFound:return"printerGroupId";case xt.DocumentNotFound:return"zplDocumentId";default:return wr()}}function vu(e){return Vo.c9.isDateTime(e)&&e.isValid}let bu=class extends $s{constructor(e){super(e)}default(e){const t=e?.activationRange;return{weezaccessPartnerId:e?.weezaccessPartnerId??null,printerGroupId:e?.printerGroupId??null,zplDocumentId:e?.zplDocumentId??null,activationStart:t?.start?.toLocal()??null,activationEnd:t?.end?.toLocal()??null}}toInput({weezaccessPartnerId:e,printerGroupId:t,zplDocumentId:n,...i}){if(null===e||null===t||null===n)throw new Error("PrintTriggerInputService.toInput: the schema requires the partner, the printer group and the ZPL document.");return{...i,weezaccessPartnerId:e,printerGroupId:t,zplDocumentId:n,activationStart:vu(i.activationStart)?i.activationStart:null,activationEnd:vu(i.activationEnd)?i.activationEnd:null}}toSubmitErrors(e){return{printTrigger:Object.fromEntries(e.map(({code:e,message:t})=>[Su(e),t]))}}schema(){return js.Ik().shape({printTrigger:this.printTriggerInputSchema().required()}).required()}printTriggerInputSchema(){return js.Ik().shape({weezaccessPartnerId:js.ai().typeError(this.t("l_op_rateur_wee_26038")).required(this.t("l_op_rateur_wee_26038")),printerGroupId:js.Yj().typeError(this.t("le_point_d_impr_71946")).required(this.t("le_point_d_impr_71946")),zplDocumentId:js.ai().typeError(this.t("le_document_est_86403")).required(this.t("le_document_est_86403")),activationStart:js.gl().nullable().test("required-with-end",this.t("la_date_de_d_bu_05030"),(e,{parent:t})=>vu(e)||!vu(t.activationEnd)),activationEnd:js.gl().nullable().test("required-with-start",this.t("la_date_de_fin_32246"),(e,{parent:t})=>vu(e)||!vu(t.activationStart)).test("after-start",this.t("la_date_de_fin_00429"),(e,{parent:t})=>!vu(e)||!vu(t.activationStart)||e>t.activationStart)})}};var ju;bu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(xu=void 0!==Ai&&Ai)?xu:Object])],bu),function(e){e[e.POSITION_READ=0]="POSITION_READ",e[e.POSITION_EDIT=1]="POSITION_EDIT",e[e.MEMBER_EDIT=2]="MEMBER_EDIT",e[e.MEMBER_ASSIGNMENT_STATE_EDIT=3]="MEMBER_ASSIGNMENT_STATE_EDIT",e[e.COMMENT_READ=4]="COMMENT_READ",e[e.COMMENT_ADD=5]="COMMENT_ADD",e[e.MEMBER_AVAILABILITIES_EDIT=6]="MEMBER_AVAILABILITIES_EDIT",e[e.MEMBER_ASSIGN=7]="MEMBER_ASSIGN",e[e.CAMPAIGN_SEND=8]="CAMPAIGN_SEND",e[e.ACCREDITATION_READ=9]="ACCREDITATION_READ",e[e.ACCREDITATION_EDIT=10]="ACCREDITATION_EDIT",e[e.MEMBER_ACCREDIT=11]="MEMBER_ACCREDIT",e[e.DELEGATION_READ=12]="DELEGATION_READ",e[e.DELEGATION_EDIT=13]="DELEGATION_EDIT",e[e.FORM_READ=14]="FORM_READ",e[e.FORM_EDIT=15]="FORM_EDIT",e[e.EMAIL_EDIT=16]="EMAIL_EDIT",e[e.CAMPAIGN_READ=17]="CAMPAIGN_READ",e[e.DOCUMENT_READ=18]="DOCUMENT_READ",e[e.DOCUMENT_EDIT=19]="DOCUMENT_EDIT",e[e.WORKFLOW_READ=20]="WORKFLOW_READ",e[e.WORKFLOW_EDIT=21]="WORKFLOW_EDIT",e[e.CUSTOM_FIELD_READ=22]="CUSTOM_FIELD_READ",e[e.CUSTOM_FIELD_EDIT=23]="CUSTOM_FIELD_EDIT",e[e.SEGMENT_EDIT=24]="SEGMENT_EDIT",e[e.MEMBER_CREATE=25]="MEMBER_CREATE",e[e.MEMBER_DELETE=26]="MEMBER_DELETE",e[e.EVENT_EDIT=27]="EVENT_EDIT",e[e.ORGANIZATION_PARAM_READ=28]="ORGANIZATION_PARAM_READ",e[e.ORGANIZATION_PARAM_EDIT=29]="ORGANIZATION_PARAM_EDIT",e[e.ORGANIZATION_USER_READ=30]="ORGANIZATION_USER_READ",e[e.ORGANIZATION_USER_EDIT=31]="ORGANIZATION_USER_EDIT",e[e.CUSTOM_FIELD_DECRYPT=32]="CUSTOM_FIELD_DECRYPT",e[e.WEEZEVENT_READ=33]="WEEZEVENT_READ",e[e.WEEZEVENT_EDIT=34]="WEEZEVENT_EDIT",e[e.DELEGATIONS_SPACE_PARAM_READ=35]="DELEGATIONS_SPACE_PARAM_READ",e[e.DELEGATIONS_SPACE_PARAM_EDIT=36]="DELEGATIONS_SPACE_PARAM_EDIT",e[e.PRINT_CONFIG_READ=37]="PRINT_CONFIG_READ",e[e.PRINT_CONFIG_EDIT=38]="PRINT_CONFIG_EDIT",e[e.PRINT=39]="PRINT",e[e.TICKET_ID_REGENERATE=40]="TICKET_ID_REGENERATE"}(ju||(ju={}));const Au=Object.keys(ju).length/2;function Cu(e){return new Array(Au).fill("0").map((t,n)=>e.includes(n)?"1":"0").join("")}const Eu=Cu([ju.POSITION_READ,ju.POSITION_EDIT,ju.MEMBER_EDIT,ju.MEMBER_ASSIGNMENT_STATE_EDIT,ju.COMMENT_READ,ju.COMMENT_ADD,ju.MEMBER_AVAILABILITIES_EDIT,ju.MEMBER_ASSIGN,ju.CAMPAIGN_SEND,ju.ACCREDITATION_READ,ju.ACCREDITATION_EDIT,ju.MEMBER_ACCREDIT,ju.DELEGATION_READ,ju.DELEGATION_EDIT,ju.FORM_READ,ju.FORM_EDIT,ju.EMAIL_EDIT,ju.CAMPAIGN_READ,ju.DOCUMENT_READ,ju.DOCUMENT_EDIT,ju.WORKFLOW_READ,ju.WORKFLOW_EDIT,ju.CUSTOM_FIELD_READ,ju.CUSTOM_FIELD_EDIT,ju.SEGMENT_EDIT,ju.MEMBER_CREATE,ju.MEMBER_DELETE,ju.EVENT_EDIT,ju.ORGANIZATION_PARAM_READ,ju.ORGANIZATION_PARAM_EDIT,ju.ORGANIZATION_USER_READ,ju.ORGANIZATION_USER_EDIT,ju.WEEZEVENT_READ,ju.WEEZEVENT_EDIT,ju.DELEGATIONS_SPACE_PARAM_READ,ju.DELEGATIONS_SPACE_PARAM_EDIT,ju.PRINT_CONFIG_READ,ju.PRINT_CONFIG_EDIT,ju.PRINT,ju.TICKET_ID_REGENERATE]),Tu=Cu([ju.POSITION_READ,ju.COMMENT_READ,ju.ACCREDITATION_READ,ju.DELEGATION_READ,ju.FORM_READ,ju.CAMPAIGN_READ,ju.DOCUMENT_READ,ju.WORKFLOW_READ,ju.CUSTOM_FIELD_READ,ju.ORGANIZATION_PARAM_READ,ju.ORGANIZATION_USER_READ,ju.WEEZEVENT_READ,ju.DELEGATIONS_SPACE_PARAM_READ,ju.PRINT_CONFIG_READ]),Ou=Cu([ju.POSITION_READ,ju.POSITION_EDIT,ju.MEMBER_EDIT,ju.MEMBER_ASSIGNMENT_STATE_EDIT,ju.COMMENT_READ,ju.COMMENT_ADD,ju.MEMBER_AVAILABILITIES_EDIT,ju.MEMBER_ASSIGN,ju.CAMPAIGN_SEND,ju.ACCREDITATION_READ,ju.ACCREDITATION_EDIT,ju.MEMBER_ACCREDIT,ju.DELEGATION_READ,ju.DELEGATION_EDIT,ju.FORM_READ,ju.FORM_EDIT,ju.EMAIL_EDIT,ju.CAMPAIGN_READ,ju.DOCUMENT_READ,ju.DOCUMENT_EDIT,ju.WORKFLOW_READ,ju.WORKFLOW_EDIT,ju.CUSTOM_FIELD_READ,ju.CUSTOM_FIELD_EDIT,ju.SEGMENT_EDIT,ju.MEMBER_CREATE,ju.MEMBER_DELETE,ju.WEEZEVENT_READ,ju.WEEZEVENT_EDIT,ju.DELEGATIONS_SPACE_PARAM_READ,ju.DELEGATIONS_SPACE_PARAM_EDIT,ju.PRINT_CONFIG_READ,ju.PRINT_CONFIG_EDIT,ju.PRINT,ju.TICKET_ID_REGENERATE]),Ru=Cu([ju.POSITION_READ,ju.COMMENT_READ,ju.ACCREDITATION_READ,ju.DELEGATION_READ,ju.FORM_READ,ju.CAMPAIGN_READ,ju.DOCUMENT_READ,ju.WORKFLOW_READ,ju.WEEZEVENT_READ,ju.DELEGATIONS_SPACE_PARAM_READ,ju.PRINT_CONFIG_READ]),Mu=Cu([ju.POSITION_READ,ju.POSITION_EDIT,ju.COMMENT_READ,ju.MEMBER_ASSIGN,ju.CAMPAIGN_SEND,ju.CAMPAIGN_READ]),Du=Cu([ju.POSITION_READ,ju.COMMENT_READ]),wu=Cu([ju.DELEGATION_READ]);var $u;let Pu=class extends $s{constructor(e){super(e)}default(e){return{name:e?.name??"",description:e?.description??"",accessLevel:e?.accessLevel??Tt.Position,permissions:e?.permissions??Mu}}schema(){return js.Ik().shape({role:js.Ik().shape({name:js.Yj().required(this.t("le_nom_est_requ_61536")),description:js.Yj().required(this.t("la_description_46559")),accessLevel:js.Yj().required(this.t("le_niveau_d_acc_94726")).oneOf(li,this.t("le_niveau_d_acc_94726")),permissions:js.Yj().matches(new RegExp(`^[01]{${Au}}$`),this.t("le_format_des_p_68818")).required(this.t("le_format_des_p_68818"))}).required()}).required()}};Pu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof($u=void 0!==Ai&&Ai)?$u:Object])],Pu);var Nu;let ku=class extends $s{translationService;constructor(e){super(e),this.translationService=e}segmentFolderInputDefault(e,t){return{name:t?.name??"",segmentType:e}}};ku=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Nu=void 0!==Ai&&Ai)?Nu:Object])],ku);var zu;let Lu=class extends $s{translationService;constructor(e){super(e),this.translationService=e}};Lu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(zu=void 0!==Ai&&Ai)?zu:Object])],Lu);var Fu;let Uu=class extends _r{constructor(e){super(e)}step1Schema(){return js.Ik().shape({email:this.email()})}step2Schema(){return js.Ik().shape({email:this.email(),code:this.code()})}};Uu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Fu=void 0!==Ai&&Ai)?Fu:Object])],Uu);var Bu;let Gu=class extends _r{constructor(e){super(e)}step1Schema(){return js.Ik().shape({email:this.email(),password:this.passwordRules()})}step2Schema(){return js.Ik().shape({email:this.email(),code:this.code(),password:this.passwordRules()})}};Gu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Bu=void 0!==Ai&&Ai)?Bu:Object])],Gu);var Vu;let Wu=class extends $s{constructor(e){super(e)}connectionInfosInputDefault(e){return{url:e?.url??"",issuer:e?.issuer??"",receiver:e?.receiver??"",synchronizedEventsIds:e?.synchronizedEventsIds??[],seasonEventsIds:e?.seasonEventsIds??[],place:e?.place??""}}};Wu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Vu=void 0!==Ai&&Ai)?Vu:Object])],Wu);var qu;let Yu=class extends $s{constructor(e){super(e)}associateTagsIdsSchema(){return js.Ik().shape({tagsIds:js.YO().of(js.ai())})}};Yu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(qu=void 0!==Ai&&Ai)?qu:Object])],Yu);var Hu;let Zu=class extends $s{constructor(e){super(e)}traceInputDefault(e){return{name:e?.name??"",color:e?.color??M.colors.primary500.value,points:e?.points??[],direction:e?.direction??zt.None,startAt:e?.startAt??null,firstRunnerPace:e?.firstRunnerPace??null,lastRunnerPace:e?.lastRunnerPace??null}}traceInputSchema(e){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_du_trac_39859")),color:js.Yj().required(this.t("la_couleur_du_t_36646")),points:js.YO().required(this.t("le_trac_doit_c_20895")).min(2,this.t("le_trac_doit_c_20895")),startAt:js.gl().nullable().test("start-at-during-event",this.t("l_heure_de_d_pa_04968"),t=>!Vo.c9.isDateTime(t)||!t.isValid||t>=e.startAt&&t<=e.endAt.endOf("day")),firstRunnerPace:this.paceSchema(),lastRunnerPace:this.paceSchema()})}paceSchema(){return js.ai().nullable().typeError(this.t("l_allure_doit_06495")).integer(this.t("l_allure_doit_06495")).positive(this.t("l_allure_doit_06495"))}createTraceSchema(e){return js.Ik().shape({trace:this.traceInputSchema(e)})}updateNameSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_du_trac_39859"))})}};Zu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Hu=void 0!==Ai&&Ai)?Hu:Object])],Zu);let Ku=class{translationInputDefault(e){return{fr:this.default(e.translationType,e.fr),en:this.default(e.translationType,e.en),es:this.default(e.translationType,e.es),de:this.default(e.translationType,e.de),nl:this.default(e.translationType,e.nl)}}default(e,t){switch(e){case Ut.String:return v(t)?t:"";case Ut.StringArray:return Array.isArray(t)?t:[];case Ut.RichText:return v(t)?t:"";default:return wr()}}};Ku=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)()],Ku);var Qu,Xu,Ju;let em=class extends sr{static{Qu=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...sr.IMPORT_COLUMNS_DEFAULT,Email:"email",TicketId:"ticketId"};static IMPORT_COLUMNS_REQUIRED=e=>e===Ze.Update?[Qu.IMPORT_COLUMNS_DEFAULT.Id]:[Qu.IMPORT_COLUMNS_DEFAULT.Email];constructor(e,t){super(e,t),this.csvInputService=e}};em=Qu=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Xu=void 0!==Js&&Js)?Xu:Object,"function"==typeof(Ju=void 0!==Ai&&Ai)?Ju:Object])],em);var tm=n(8923);const nm=[ye.CanLeadersAddMembers,ye.CanLeadersDeleteMembers,ye.CanLeadersDuplicateMembers,ye.CanLeadersEditColumns,ye.CanLeadersEditCustomFields,ye.CanLeadersEditMembers,ye.CanLeadersImportMembers,ye.CanLeadersSeeHiddenAccreditationsSlots];var im;let om=class extends $s{constructor(e){super(e)}workflowInputDefault(e){return{name:e?.name??"",state:e?.state??en.Active,frequency:e?.frequency??Zt.Every10Minutes,trigger:e?.trigger??tn.VolunteersSegment,action:e?.action??Ht.SetCustomField,data:(0,tm.A)({recipients:Xt.View},e?.data??{}),onExit:e?.onExit??Kt.Revert}}workflowInputSchema(){return js.Ik().shape({name:js.Yj().required(this.t("le_nom_est_requ_61536")),state:js.Yj().required(this.t("le_statut_est_r_13164")).oneOf(Ii,this.t("le_statut_est_r_13164")),action:js.Yj().required(this.t("l_action_est_re_08934")).oneOf(gi,this.t("l_action_est_re_08934")),trigger:js.Yj().required(this.t("le_d_clencheur_32555")).oneOf(_i,this.t("le_d_clencheur_32555")),data:js.gl().required().test("positions-valid",this.t("les_missions_so_67594"),function(){return this.parent.trigger!==tn.Assigned||h(this.parent.data.positionsCategoriesIds)||h(this.parent.data.positionsIds)||h(this.parent.data.positionsSlotsIds)||h(this.parent.data.positionsSegmentsIds)}).test("volunteers-segment-id-valid",this.t("la_vue_est_requ_65480"),function(){return this.parent.trigger!==tn.VolunteersSegment||Number.isInteger(this.parent.data.volunteersSegmentId)}).test("delegations-segment-id-valid",this.t("la_vue_est_requ_65480"),function(){return this.parent.trigger!==tn.DelegationsSegment||Number.isInteger(this.parent.data.delegationsSegmentId)}).test("form-id-valid",this.t("le_formulaire_e_77404"),function(){return this.parent.trigger!==tn.FormSubmit||Number.isInteger(this.parent.data.formId)}).test("campaign-id-valid",this.t("la_campagne_est_06708"),function(){return this.parent.trigger!==tn.VolunteersSegment||this.parent.action!==Ht.SendCampaign||Number.isInteger(this.parent.data.campaignId)}).test("campaign-recipients-valid",this.t(this.t("les_destinatair_82420")),function(){return this.parent.trigger!==tn.VolunteersSegment||this.parent.action!==Ht.SendCampaign||fi.includes(this.parent.data.recipients)}).test("campaign-recipients-users-infos",this.t("la_liste_des_me_55886"),function(){return this.parent.trigger!==tn.VolunteersSegment||this.parent.action!==Ht.SendCampaign||this.parent.data.recipients!==Xt.UsersInfosIds||h(this.parent.data.usersInfosIds)}).test("custom-field-id-valid",this.t("le_champ_person_80074"),function(){return(this.parent.trigger!==tn.VolunteersSegment&&this.parent.trigger!==tn.DelegationsSegment||this.parent.action!==Ht.SetCustomField)&&(this.parent.trigger!==tn.FormSubmit||this.parent.action!==Ht.CreateDelegation)||Number.isInteger(this.parent.data.customFieldId)}).test("duplicate-member-custom-fields-valid",this.t("le_champ_lier_69891"),function(){return this.parent.action!==Ht.DuplicateMember||(this.parent.data.customFields||[]).every(e=>!0!==e.fromField||v(e.value))}).test("accreditations-valid",this.t("les_accr_ditati_27943"),function(){return this.parent.trigger===tn.Assigned?h(this.parent.data.accreditationsSlotsIds):this.parent.trigger!==tn.VolunteersSegment||this.parent.action!==Ht.AddAccreditations&&this.parent.action!==Ht.DeleteAccreditations||h(this.parent.data.accreditationsSlotsIds)||"number"==typeof this.parent.data.accreditationProfileId}).test("positions-slots-valid",this.t("les_missions_so_67594"),function(){return this.parent.trigger!==tn.VolunteersSegment||this.parent.action!==Ht.AddPositions&&this.parent.action!==Ht.DeletePositions||h(this.parent.data.positionsSlotsIds)}).test("delegation-id-valid",this.t("la_d_l_gation_c_71684"),function(){return this.parent.trigger!==tn.FormSubmit||this.parent.action!==Ht.CreateDelegation||Number.isInteger(this.parent.data.delegationId)}).test("event-id-valid",this.t("l_v_nement_est_88155"),function(){return this.parent.trigger!==tn.VolunteersSegment||this.parent.action!==Ht.AddEvent||Number.isInteger(this.parent.data.eventId)}).test("permissions-valid",this.t("les_permissions_82998"),function(){return this.parent.trigger!==tn.DelegationsSegment||this.parent.action!==Ht.AddDelegationPermissions&&this.parent.action!==Ht.DeleteDelegationPermissions||h(this.parent.data.permissions)&&this.parent.data.permissions.every(e=>nm.includes(e))}),onExit:js.Yj().required(this.t("l_action_de_fin_64764")).oneOf(pi,this.t("l_action_de_fin_64764"))})}};om=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(im=void 0!==Ai&&Ai)?im:Object])],om);let am=class{get(){return{[Ot.OrganizationAdmin]:{accessLevel:Tt.Organization,permissions:Eu,nameKey:"administrateur_11083",descriptionKey:"a_acc_s_toute_73520"},[Ot.OrganizationReader]:{accessLevel:Tt.Organization,permissions:Tu,nameKey:"acc_s_en_lectur_30252",descriptionKey:"a_acc_s_l_org_94388"},[Ot.EventAdmin]:{accessLevel:Tt.Event,permissions:Ou,nameKey:"administrateur_24785",descriptionKey:"a_acc_s_toute_25473"},[Ot.EventReader]:{accessLevel:Tt.Event,permissions:Ru,nameKey:"acc_s_en_lectur_33482",descriptionKey:"a_acc_s_l_v_17476"},[Ot.PositionEditor]:{accessLevel:Tt.Position,permissions:Mu,nameKey:"responsable_de_95683",descriptionKey:"peut_modifier_s_82832"},[Ot.PositionReader]:{accessLevel:Tt.Position,permissions:Du,nameKey:"responsable_de_72569",descriptionKey:"a_acc_s_ses_m_09741"},[Ot.DelegationCategoryLeader]:{accessLevel:Tt.DelegationCategory,permissions:wu,nameKey:"responsable_de_32820",descriptionKey:"a_acc_s_aux_d_l_87634"}}}};am=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)()],am);var sm;let rm=class{translationService;constructor(e){this.translationService=e}minutesToHoursMinutesString(e){const t=Vo.dw.fromObject({minutes:e},{locale:el(this.translationService.language)}).shiftTo("hours","minutes");return 0===t.minutes?t.shiftTo("hours").toHuman({unitDisplay:"narrow"}):0===t.hours?t.shiftTo("minutes").toHuman({unitDisplay:"narrow"}):t.toHuman({unitDisplay:"narrow"})}};rm=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(sm=void 0!==Ai&&Ai)?sm:Object])],rm);var dm=n(7773),lm=n(6666);const cm=({children:e,dateTime:t,...n})=>{const o=v(t)?t:t.toISO();return(0,i.jsx)(W,{as:"time",dateTime:o,textStyle:"inherit",...n,children:e})};function um(e,t){const n={...t.formats?.localeFormat||oa.DateOnly.MonthLong,...t.formats?.displayWeekday?{weekday:"long"}:{}},i=oa.TimeOnly,o=t.language?{locale:el(t.language)}:{},a=e.start,s=e.end;return{startDateString:v(t.formats?.dateFormat)?a.toFormat(t.formats.dateFormat):a.toLocaleString(n,o),startTimeString:v(t.formats?.timeFormat)?a.toFormat(t.formats.timeFormat):a.toLocaleString(i,o),endDateString:v(t.formats?.dateFormat)?s.toFormat(t.formats.dateFormat):s.toLocaleString(n,o),endTimeString:v(t.formats?.timeFormat)?s.toFormat(t.formats.timeFormat):s.toLocaleString(i,o)}}function mm(e){const t=e.filter(e=>e.isValid);if(h(t)){const e=(0,vs.A)(t,e=>e.start.toMillis()),n=[e[0]];for(let t=1;t=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(gm=void 0!==Ai&&Ai)?gm:Object])],hm);var pm;let fm=class{translationService;constructor(e){this.translationService=e}getFormatter(e={}){return Intl.NumberFormat(el(this.translationService.language),{notation:e.notation||"compact",style:e.style||"unit",unit:e.unit||"byte",unitDisplay:e.unitDisplay||"narrow"})}toNumberOrEmpty(e,{prefix:t}={}){return"number"==typeof e?`${t??""}${e.toLocaleString()}`:""}toNumberOrInfinity(e,{prefix:t}={}){return`${t??""}${"number"==typeof e&&e!==1/0?e.toLocaleString():"∞"}`}static bytesToMegabytes(e){return`${parseFloat((e/1e6).toPrecision(1))} MB`}static bytesToGigabytes(e){return`${parseFloat((e/1e9).toPrecision(1))} GB`}};fm=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(pm=void 0!==Ai&&Ai)?pm:Object])],fm);var Im=n(141),_m=n(7431),ym=n(6618),xm=n(9669),Sm=n(9385);const vm="dashboard",bm="users",jm={COMMUNITY:e=>md([Km.ORGANIZATION(e),"community"]),COMMUNITY_DASHBOARD:e=>md([jm.COMMUNITY(e),vm]),COMMUNITY_USERS:e=>md([jm.COMMUNITY(e),bm])},Am={PLURAL:"events",SINGLE:"event"},Cm={PLURAL:"teams",SINGLE:"team"},Em={EVENTS:Am.PLURAL,EVENT:e=>md([Am.SINGLE,e]),TEAM:e=>md([Cm.SINGLE,e])},Tm={EVENTS_IMPORT:e=>md([Km.ORGANIZATION(e),Em.EVENTS,pd.IMPORT]),EVENTS:e=>md([Km.ORGANIZATION(e),Em.EVENTS]),EVENT:({eventId:e,...t})=>md([Km.ORGANIZATION(t),Em.EVENT(e)]),EVENT_FORM:e=>md([Gm.FORM(e)]),EVENT_TEAM_FORM:({teamCode:e,...t})=>md([Tm.EVENT_FORM(t),Em.TEAM(e)])},Om={PLURAL:"forms",SINGLE:"form"},Rm="elements",Mm="emails",Dm="integration",wm="parameters",$m="preview",Pm="general",Nm="design",km="availabilities",zm="missions",Lm="accreditations",Fm="broadcast",Um="state",Bm={FORMS:Om.PLURAL,FORM:e=>md([Om.SINGLE,e])},Gm={FORMS:({eventId:e,...t})=>md([e?Tm.EVENT({...t,eventId:e}):jm.COMMUNITY(t),Bm.FORMS]),FORM:({formId:e,...t})=>md(["eventId"in t&&t.eventId?Tm.EVENT(t):jm.COMMUNITY(t),Bm.FORM(e)]),CREATE:e=>xd(Gm.FORMS(e)),FORM_ELEMENTS:e=>md([Gm.FORM(e),Rm]),FORM_INTEGRATION:e=>md([Gm.FORM(e),Dm]),FORM_EMAILS:e=>md([Gm.FORM(e),Mm]),FORM_PREVIEW:e=>md([Gm.FORM(e),$m]),FORM_PARAMETERS:e=>md([Gm.FORM(e),wm]),FORM_PARAMETERS_GENERAL:e=>md([Gm.FORM_PARAMETERS(e),Pm]),FORM_PARAMETERS_DESIGN:e=>md([Gm.FORM_PARAMETERS(e),Nm]),FORM_PARAMETERS_AVAILABILITIES:e=>md([Gm.FORM_PARAMETERS(e),km]),FORM_PARAMETERS_MISSIONS:e=>md([Gm.FORM_PARAMETERS(e),zm]),FORM_PARAMETERS_ACCREDITATIONS:e=>md([Gm.FORM_PARAMETERS(e),Lm]),FORM_PARAMETERS_BROADCAST:e=>md([Gm.FORM_PARAMETERS(e),Fm]),FORM_PARAMETERS_STATE:e=>md([Gm.FORM_PARAMETERS(e),Um])},Vm={PLURAL:"/organizations",SINGLE:"/organization"},Wm="delegations",qm={_BASE:"parameters",COMMON:{DESIGN:"design",INTEGRATION:"integration",EMAIL_TEMPLATES:"emails",SETTINGS:"settings"},EVENTS_SHOWCASE:{_BASE:"events-showcase"},MEMBERS_SPACE:{_BASE:"members-space"},DELEGATION_SPACE:{_BASE:"delegation-space"}},Ym="blocked",Hm="expired",Zm={ORGANIZATIONS:Vm.PLURAL,ORGANIZATION:e=>md([Vm.SINGLE,e])},Km={ORGANIZATIONS:Zm.ORGANIZATIONS,ORGANIZATION:({organizationId:e})=>Zm.ORGANIZATION(e),ORGANIZATION_SETTINGS:e=>md([Km.ORGANIZATION(e),qm._BASE]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE:e=>md([Km.ORGANIZATION_SETTINGS(e),qm.EVENTS_SHOWCASE._BASE]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE_DESIGN:e=>md([Km.ORGANIZATION_SETTINGS_EVENTS_SHOWCASE(e),qm.COMMON.DESIGN]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE_INTEGRATION:e=>md([Km.ORGANIZATION_SETTINGS_EVENTS_SHOWCASE(e),qm.COMMON.INTEGRATION]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE_SETTINGS:e=>md([Km.ORGANIZATION_SETTINGS_EVENTS_SHOWCASE(e),qm.COMMON.SETTINGS]),ORGANIZATION_SETTINGS_MEMBERS_SPACE:e=>md([Km.ORGANIZATION_SETTINGS(e),qm.MEMBERS_SPACE._BASE]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_DESIGN:e=>md([Km.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),qm.COMMON.DESIGN]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_INTEGRATION:e=>md([Km.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),qm.COMMON.INTEGRATION]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_EMAIL_TEMPLATES:e=>md([Km.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),qm.COMMON.EMAIL_TEMPLATES]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_SETTINGS:e=>md([Km.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),qm.COMMON.SETTINGS]),ORGANIZATION_SETTINGS_DELEGATION_SPACE:e=>md([Km.ORGANIZATION_SETTINGS(e),qm.DELEGATION_SPACE._BASE]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_DESIGN:e=>md([Km.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),qm.COMMON.DESIGN]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_INTEGRATION:e=>md([Km.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),qm.COMMON.INTEGRATION]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_EMAIL_TEMPLATES:e=>md([Km.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),qm.COMMON.EMAIL_TEMPLATES]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_SETTINGS:e=>md([Km.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),qm.COMMON.SETTINGS]),ORGANIZATION_DELEGATIONS:e=>md([Km.ORGANIZATION(e),Wm]),IS_BLOCKED:e=>md([e,Ym]),IS_EXPIRED:e=>md([e,Hm]),ORGANIZATION_FORM:e=>Gm.FORM(e)},Qm="evenements.handicap-international.fr",Xm="www.partagetapassion.com",Jm="communaute.rncb.fr",eg="mariage.ravey.fr",tg="registering.aso.fr",ng="billets.onepiecemarket.fr",ig=[Qm,Xm,Jm,eg,tg,ng],og={[Qm]:1792,[Xm]:858,[Jm]:1773,[eg]:3306,[tg]:3136,[ng]:3469},ag=new Map([[1792,Qm],[858,Xm],[1773,Jm],[3306,eg],[3136,tg],[3469,ng]]),sg={PLURAL:"delegations-categories",SINGLE:"delegation-category"},rg={PLURAL:"delegations",SINGLE:"delegation"},dg="accreditations",lg="availabilities",cg="positions",ug={DELEGATIONS_CATEGORIES:sg.PLURAL,DELEGATION_CATEGORY:e=>md([sg.SINGLE,e]),DELEGATIONS:rg.PLURAL,DELEGATION:e=>md([rg.SINGLE,e])},mg={DELEGATION_CATEGORY:({delegationCategoryId:e,...t})=>md(["eventId"in t&&t.eventId?Tm.EVENT(t):jm.COMMUNITY(t),ug.DELEGATION_CATEGORY(e)]),DELEGATION_CATEGORY_DASHBOARD:e=>md([mg.DELEGATION_CATEGORY(e),fd.DASHBOARD]),DELEGATION_CATEGORY_MEMBERS:e=>md([mg.DELEGATION_CATEGORY(e),fd.MEMBERS]),DELEGATION_CATEGORY_UPDATE:e=>Sd(mg.DELEGATION_CATEGORY(e))},gg={DELEGATIONS:e=>md(["eventId"in e&&e.eventId?Tm.EVENT(e):jm.COMMUNITY(e),ug.DELEGATIONS]),DELEGATION:({delegationId:e,...t})=>md(["eventId"in t&&t.eventId?Tm.EVENT(t):jm.COMMUNITY(t),ug.DELEGATION(e)]),DELEGATION_DASHBOARD:e=>md([gg.DELEGATION(e),fd.DASHBOARD]),DELEGATION_MEMBERS:e=>md([gg.DELEGATION(e),fd.MEMBERS]),DELEGATION_ACCREDITATIONS:e=>md([gg.DELEGATION(e),dg]),DELEGATION_REPORTING:e=>md([gg.DELEGATION(e),fd.REPORTING]),DELEGATION_DOCUMENTS:e=>md([gg.DELEGATION(e),fd.DOCUMENTS]),DELEGATION_TAB:e=>md([gg.DELEGATION(e),e.slug]),DELEGATION_MEMBERS_IMPORT:e=>md([gg.DELEGATION(e),pd.IMPORT]),DELEGATION_MEMBER:({userInfoId:e,slug:t,...n})=>md([v(t)?gg.DELEGATION_TAB({...n,slug:t}):gg.DELEGATION_MEMBERS(n),fd.MEMBER,e]),DELEGATION_MEMBER_INFORMATION:e=>md([gg.DELEGATION_MEMBER(e),fd.INFORMATION]),DELEGATION_MEMBER_ACCREDITATIONS:e=>md([gg.DELEGATION_MEMBER(e),dg]),DELEGATION_MEMBER_AVAILABILITIES:e=>md([gg.DELEGATION_MEMBER(e),lg]),DELEGATION_MEMBER_POSITIONS:e=>md([gg.DELEGATION_MEMBER(e),cg]),MEMBERS_INVITE:e=>md([gg.DELEGATION(e),fd.MEMBERS,pd.INVITE]),MEMBER_CREATE:({formId:e,...t})=>xd(md([gg.DELEGATION(t),fd.MEMBER,fd.FORM,e])),MEMBER_EDIT:({formId:e,...t})=>Sd(md([gg.DELEGATION_MEMBER(t),fd.FORM,e])),DELEGATION_PROFILE:e=>md([gg.DELEGATION(e),fd.PROFILE]),FIELDS_EDIT:e=>Sd(md([gg.DELEGATION(e),hd.FIELDS.PLURAL])),DELEGATION_FORM:({delegationId:e,...t})=>md([Gm.FORM(t),ug.DELEGATION(e)])},hg={...mg,...gg},pg=(e,t)=>{t?.startsWith("/")||(console.warn(`Path '${t}' missing leading slash`),t="/"+t);const n=new Vi(lo.HEAVENT_PUBLIC_URL);return ag.has(e)&&(n.host=ag.get(e)),n.pathname+=t,n.href},fg=({organizationId:e,eventId:t,delegationId:n,formId:i,teamCode:o,query:a})=>{const s=new Vi(lo.HEAVENT_PUBLIC_URL);return ag.has(e)&&(s.host=ag.get(e)),s.pathname+=`${(()=>{if(n)return"number"==typeof t?hg.DELEGATION_FORM({organizationId:e,delegationId:n,eventId:t,formId:i}):hg.DELEGATION_FORM({organizationId:e,delegationId:n,formId:i});{const n="number"==typeof t?Tm.EVENT_FORM({organizationId:e,eventId:t,formId:i}):Km.ORGANIZATION_FORM({organizationId:e,formId:i});return v(o)?`${n}/team/${o}`:n}})()}`,v(a?.email)&&s.searchParams.set("email",a.email),a?.preview&&s.searchParams.set("preview",a?.preview?.toString()),a?.previewState&&s.searchParams.set("state",a?.previewState?.toString()),s.href};var Ig;!function(e){e.QR="qr",e.Code39="code39"}(Ig||(Ig={}));const _g=(e,t)=>{const n=new Vi(lo.HEAVENT_API_URL);return n.pathname+=`/barcode/${t?.barcodeType??Ig.QR}`,n.searchParams.set("text",e),n.searchParams.set("color",t?.color??"000000"),t?.height&&n.searchParams.set("height",t?.height?.toString()),t?.width&&n.searchParams.set("width",t?.width?.toString()),n.href};function yg(e,t,n={}){const i=new Vi(lo.HEAVENT_API_URL);i.pathname+=`/documents/${e}.${t}`;const o=new URLSearchParams(Object.entries(n).filter(([e,t])=>v(t)));for(const[e,t]of o)i.searchParams.set(e,t);return i.href}var xg=n(8389),Sg=n(8047),vg=n(4757),bg=n(6452);function jg(e,t,n,i={}){const o=v(t.name)?t.name:"",a=e.toDisplayString(t.range,i.interval?.options),s=(0,bs.A)([i.position?.includeName?n:"",o,i.slot?.includeRange||b(o)?a:"",i.position?.includeNameAtEnd?n:""]).join(" - ");return v(s)?s:n}function Ag(e){return`${e.name}${v(e.acronym)?` (${e.acronym})`:""}`}function Cg(e,t){const n=t[e.customField.slug];return"boolean"==typeof n&&e.customField.fieldType===Fe.Checkbox?n===e.conditionValue:e.customField.fieldType===Fe.Select&&e.customField.canSelectMultiple&&h(n)?(0,bl.A)(e.conditionValue,n??[]).length>0:e.customField.fieldType===Fe.Select&&"number"==typeof n&&e.conditionValue.includes(n)}function Eg(e,t){if(!h(e?.conditionsCustomFields))return!0;switch(e.conditionsOperator){case ge.Or:return e.conditionsCustomFields.some(e=>Cg(e,t));case ge.And:return e.conditionsCustomFields.every(e=>Cg(e,t));default:return wr(e.conditionsOperator)}}function Tg(e){return v(e.address)}function Og(e){return As(e.latitude)&&As(e.longitude)}function Rg(e){return Tg(e)||Og(e)}function Mg(e){return(0,vs.A)(Object.values((0,ym.A)(e,e=>e.position.name)).map(e=>{const t=e[0].positionCategory,n=e[0].position,i=e.map(e=>e.positionSlot.range.start.toMillis());return{id:n.id,category:t.name,text:v(n.acronym)?n.acronym:n.name,minDate:(0,bg.A)(i),color:n.color,count:e.length,icon:n.icon}}),({category:e,text:t,minDate:n})=>[e.toLowerCase(),t.toLowerCase(),n])}function Dg(e,t,n,i={}){const o=v(t.name)?t.name:"",a=t.date?v(i?.date?.format)?t.date.toFormat(i?.date?.format??""):e.toLocaleString(t.date,i?.date?.localeFormat||oa.DateOnly.Numeric):"",s=(0,bs.A)([i?.accreditation?.includeName?n:"",o,a,i?.accreditation?.includeNameAtEnd?n:""]).join(" - ");return v(s)?s:v(i?.defaultName)?i?.defaultName:n}function wg(e){return(0,vs.A)(e,e=>[e.date?.toMillis()??1,e.name.toLowerCase()])}function $g(e){return"production"===a.Development?1===e:3136===e}function Pg(e={}){const t=C(e.firstName||"").trim();return`${C(e.lastName||"").trim().toUpperCase()} ${t}`.trim()}const Ng=(e,t)=>e.split(t).map(e=>e.trim().length>0?e.trim()[0]:"").join("").substring(0,3),kg=[M.colors.success600.value,M.colors.blueGray600.value,M.colors.blueLight600.value,M.colors.purple600.value,M.colors.pink600.value,M.colors.warning600.value];function zg(e){const t=e.charCodeAt(0);return kg[t%kg.length]}var Lg,Fg,Ug;const Bg=/(\{([\w\.]+)\})/g,Gg=/^user\.(accreditations|accreditationsSlots|firstAccreditationSlot|lastAccreditationSlot|positions|assignments|firstAssignment|lastAssignment)\./,Vg=/^\d+$/,Wg="nodate",qg=Number.MAX_SAFE_INTEGER;let Yg=class{fieldService;dateTimeService;intervalService;constructor(e,t,n){this.fieldService=e,this.dateTimeService=t,this.intervalService=n}renderText(e,t={},n="HTML"){const i=t.separator??"
",o=t.delegation?this.getDelegation(t.delegation,t):t.volunteerRegistration?.delegation?this.getDelegation(t.volunteerRegistration.delegation,t):void 0,a=this.getFormats(t),s=t.assignments?this.getAssignments(t.assignments,a):void 0,r=t.accreditations?this.getAccreditations(t.accreditations,a,t):void 0,d={organization:t.organization||void 0,event:t.event?this.getEvent(t.event,t):void 0,delegation:o,team:o,invitedBy:t?.invitedBy?this.getUser(t.invitedBy,null,t):void 0,recipient:t?.recipient?this.getUser(t.recipient,null,t):void 0,user:t.userInfo?{...this.getUser(t.userInfo,o,t),...this.getUserAccreditations(r??[]),...this.getUserAssignments(s??[])}:void 0,...s?this.getAssignmentsVariables(s,i):{},...r?this.getAccreditationsVariables(r,i,t):{},...t.extraInfos},l=("HTML"===n?this.replaceVariables(e,c(d)):(0,Im.A)(e,{interpolate:/{([\s\S]+?)}/g})(d)).replace(Bg,(e,n,i)=>{if(Gg.test(i))return"";const[o,a,s,r]=i.split("."),d=t?.userInfo?{lang:this.getLanguage(t.userInfo)}:{};if(8===r?.length?d.date=r:16===r?.length&&(d.date=r.substring(0,8),d.endDate=r.substring(8)),t.userInfo?.links){const e=t.userInfo.links;return i.includes("planningDays")?yg(e.userPlanningDaysLink,"pdf",d):i.includes("planningList")?yg(e.userPlanningListLink,"pdf",d):i.includes("planning")?yg(e.userPlanningLink,"pdf",d):i.includes("assignments")?yg(e.userAssignmentsLink,"pdf",d):i.includes("paris20kmassignment")&&e?.userCustomBadgeLinks[he.Paris20kmassignment]?yg(e.userCustomBadgeLinks[he.Paris20kmassignment],"pdf",d):""}return""});return l}replaceVariables(e,t){return e.replace(Bg,(e,n,i)=>{const o=Object.hasOwn(t,i)?t[i]:void 0;return void 0===o||Array.isArray(o)?e:String(o)})}getDelegation(e,t){const n=t.customFields||[],i=this.getFields(e.fields,n);return{...e,...i,leader:{email:e.leaders?.[0]?.email??"",firstName:e.leaders?.[0]?.firstName??"",lastName:e.leaders?.[0]?.lastName??"",phone:e.leaders?.[0]?.phone?.internationalFormat??""},formLink:fg({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.id,formId:e.formId}),spaceLink:pg(e.organizationId,_d(Km.ORGANIZATION_DELEGATIONS({organizationId:e.organizationId})))}}getEvent(e,t){const n=t.customFields||[],i=this.getFields(e.fields,n),o=t.organization?.dateFormat??"yyyy-MM-dd";return{id:e.id,name:e.name,...i,startDate:e.startAt?.toFormat(o)??"",endDate:e.endAt?.toFormat(o)??""}}getFormats(e){return{date:e.organization?.dateFormat||"yyyy-MM-dd",datetime:e.organization?.datetimeFormat||"yyyy-MM-dd HH:mm",time:e.organization?.timeFormat||"HH:mm"}}getAssignments(e,t){return(0,vs.A)(e,e=>e.positionSlot.range.start.toMillis()).map(({id:e,position:n,positionSlot:i})=>{const o=i.range.start,a=i.range.end,s={id:n.category.id,name:n.category.name};return{acronym:n.acronym??"",category:s,date:o.toFormat(t.date),dateKey:o.toFormat("yyyyMMdd"),dateLong:this.dateTimeService.toLocaleString(o,oa.DateOnly.WeekdayLongMonthLong),endDate:a.toFormat(t.date),endDatetime:a.toFormat(t.datetime),id:e,leaders:this.getLeaders((0,od.A)(n.category.leaders.concat(n.leaders),e=>e.userInfo.id)),name:n.name,position:{acronym:n.acronym??"",address:n.address??"",category:s,color:n.color,description:n.description,id:n.id,name:n.name},range:this.intervalService.toDisplayString(i.range,{formats:{displayWeekday:!0}}),slot:{durationHours:(0,_m.A)(i.timeDifferenceMinutes/60,1),durationMinutes:i.timeDifferenceMinutes,endTime:a.toFormat(t.time),id:i.id,name:i.name,startTime:o.toFormat(t.time)},startDate:o.toFormat(t.date),startDatetime:o.toFormat(t.datetime)}})}getAssignmentsVariables(e,t){const n=Object.fromEntries(Object.values((0,ym.A)(e,e=>e.dateKey)).map(e=>[`positions.${e[0].dateKey}`,(0,vs.A)((0,qo.A)(e.map(({position:e})=>e.name))).join(t)])),i=(0,Sr.A)(e,({slot:e})=>e.durationMinutes);return{assignmentsDays:(0,od.A)(e,({dateKey:e})=>e).map(({dateLong:e})=>e).join(", "),positionsCategories:(0,vs.A)((0,qo.A)(e.map(({position:e})=>e.category.name))).join(", "),positions:(0,vs.A)((0,qo.A)(e.map(({position:e})=>e.name))).join(", "),volunteerMinutes:i,volunteerHours:(0,_m.A)(i/60,1),...n}}getAccreditations(e,t,n){const i=!!n.organization&&$g(n.organization.id);return(0,vs.A)(e,e=>e.accreditationSlot.date?.isValid?e.accreditationSlot.date.toMillis():qg).map(({accreditation:e,accreditationCategory:n,accreditationSlot:o})=>{const a=o.date?.isValid??!1,s=t=>Dg(this.dateTimeService,o,e.name,{accreditation:{includeName:t},date:{localeFormat:oa.DateOnly.WeekdayLongMonthLong}});return{accreditation:{acronym:e.acronym??"",address:e.address??"",color:e.color,description:e.description,icon:e.icon,id:e.id,name:e.name},acronym:e.acronym??"",category:{id:n.id,name:n.name},date:a?o.date.toFormat(t.date):"",dateKey:a?o.date.toFormat("yyyyMMdd"):Wg,dateLong:a?this.dateTimeService.toLocaleString(o.date,oa.DateOnly.WeekdayLongMonthLong):"",displayName:s(!i),fullName:s(!0),hasDate:a,name:e.name,slot:{id:o.id,name:o.name}}})}getAccreditationsVariables(e,t,n){const[i,o]=(0,xm.A)(e,({hasDate:e})=>e),a=Object.values((0,ym.A)(i,({dateKey:e})=>e)),s=Object.fromEntries(a.map(e=>[`accreditations.${e[0].dateKey}`,(0,vs.A)((0,qo.A)(e.map(({name:e})=>e))).join(t)])),r=Object.fromEntries(a.map(e=>[`accreditationsSlots.${e[0].dateKey}`,e.map(({fullName:e})=>e).join(t)]));return{accreditationsCategories:(0,vs.A)((0,qo.A)(e.map(({category:e})=>e.name))).join(t),accreditationsDates:(0,od.A)(i,({dateKey:e})=>e).map(({dateLong:e})=>e).join(t),accreditationsText:(0,vs.A)((0,qo.A)(e.map(({name:e})=>e))).join(t),accreditationsSlots:(0,vs.A)(e.map(({displayName:e})=>e)).join(t),[`accreditations.${Wg}`]:(0,vs.A)((0,qo.A)(o.map(({name:e})=>e))).join(t),[`accreditationsSlots.${Wg}`]:(0,vs.A)((0,qo.A)(o.map(({fullName:e})=>e))).join(t),omFonction:this.getOmFonction(n),...s,...r}}getUserAccreditations(e){const t=this.getDistinct(e,e=>e.accreditation.id,(e,t,n)=>({...e.accreditation,category:e.category,firstSlot:t,lastSlot:n}),e=>this.getLastAccreditationSlot(e));return{accreditations:this.toKeyedItems(t,({acronym:e})=>e),accreditationsSlots:this.toKeyedItems(e),firstAccreditationSlot:e[0],lastAccreditationSlot:this.getLastAccreditationSlot(e)}}getUserAssignments(e){const t=this.getDistinct(e,e=>e.position.id,(e,t,n)=>({...e.position,firstSlot:t,lastSlot:n}),lm.A);return{positions:this.toKeyedItems(t,({acronym:e})=>e),assignments:this.toKeyedItems(e),firstAssignment:e[0],lastAssignment:(0,lm.A)(e)}}getDistinct(e,t,n,i){return(0,od.A)(e,t).map(o=>{const a=e.filter(e=>t(e)===t(o));return n(o,a[0],i(a))})}getLastAccreditationSlot(e){return(0,Sm.A)(e,({hasDate:e})=>e)??(0,lm.A)(e)}toKeyedItems(e,t){const n={};if(t)for(const i of e){const e=S(t(i),{replacer:x.Underscore});!v(e)||Vg.test(e)||Object.hasOwn(n,e)||(n[e]=i)}return{...n,...Object.fromEntries(e.map((e,t)=>[`${t+1}`,e]))}}getOmFonction(e){return e.organization&&3953===e.organization.id?(e.accreditations??[]).find(e=>50851===e.accreditation.fields.cf74460)?.accreditation.name??e.userInfo?.fields?.cf73819?.value??"":""}getLeaders(e){return e.map(({userInfo:e})=>({email:e.email,firstName:e.firstName??"",lastName:e.lastName??"",name:e.name,phone:e.phone?.internationalFormat??""}))}getUser(e,t,n){const i=n.customFields||[],o=this.getFields(e.fields,i),a=this.getLanguage(e),s=a?{lang:a.toString()}:{},r=e.links?yg(e.links.userAssignmentsLink,"pdf",s):"",d=e.links?yg(e.links.userPlanningLink,"pdf",s):"",l=e.links?yg(e.links.userPlanningListLink,"pdf",s):"",c=e.links?yg(e.links.userPlanningDaysLink,"pdf",s):"",u=e.links?{assignments:r,badge:yg(e.links.userBadgeLink,"pdf",s),certificate:yg(e.links.userCertificateLink,"pdf",s),planning:d,planningList:l,planningDays:c,...Object.fromEntries(Object.entries(e.links.userCustomBadgeLinks).map(([e,t])=>[e.toLowerCase(),yg(t,"pdf",s)])),...Object.fromEntries(Object.entries(e.links.userCustomDocumentLinks).map(([e,t])=>[e,yg(t,"pdf",s)]))}:{},m=n.volunteerRegistration?.ticketId??"",g=(e.fields.isExpanded?e.fields?.firstName?.value:e.fields.firstName)||"",h=(e.fields.isExpanded?e.fields?.lastName?.value:e.fields.lastName)||"",p=`
\n \n
`;return{id:e.id,organizationLocalId:e.localId,localId:n.volunteerRegistration?.localId||"",email:e.email,...o,firstName:g,lastName:h,ticketId:m,qrcode:p,memberCode:n.volunteerRegistration?.weezevent?.memberCode||"",name:Pg({firstName:g,lastName:h}),registrationDate:e.registrationDate?.toFormat(n.organization?.dateFormat??"yyyy-MM-dd")??"",registrationDatetime:e.registrationDate?.toFormat(n.organization?.datetimeFormat??"yyyy-MM-dd HH:mm")??"",assignmentSheet:n.event?r:"",documents:u,team:t,delegation:{...t,name:t?.name??"",leader:{email:t?.leader?.email??"",firstName:t?.leader?.firstName??"",lastName:t?.leader?.lastName??"",phone:t?.leader?.phone??""},spaceLink:t?.spaceLink??""},weezevent:{barcode:m,qrcode:p,identificationNumber:""},profile:n.volunteerRegistration?.accreditationProfile?.name??"",profileCategory:n.volunteerRegistration?.accreditationProfile?.accreditationProfileCategory.name??""}}getFields(e,t){return e.isExpanded?Object.fromEntries(Object.entries(e).flatMap(([e,{label:t,value:n}])=>{const i=h(n)?n.join(", "):v(n)?n:"";return(0,bs.A)([[e,i],v(t)?[S(t,{replacer:x.Underscore}),i]:null])})):Object.fromEntries(t.flatMap(t=>{const n=this.fieldService.getValueString(t,e);return(0,bs.A)([[t.slug,n],v(t.label)?[S(t.label,{replacer:x.Underscore}),n]:null])}))}getLanguage(e){return e.fields.isExpanded?e.fields?.language?.rawValue:e.fields?.language}};Yg=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Lg=void 0!==Pl&&Pl)?Lg:Object,"function"==typeof(Fg=void 0!==jl&&jl)?Fg:Object,"function"==typeof(Ug=void 0!==hm&&hm)?Ug:Object])],Yg);var Hg=n(7356);let Zg=class{validate(e){return async t=>{try{return await e.validate(t,{abortEarly:!1,strict:!0}),{}}catch(e){return this.errorToObject(e)}}}validateSync(e,t){try{return e.validateSync(t,{abortEarly:!1,strict:!0}),{}}catch(e){return this.errorToObject(e)}}isValidSync(e,t){return 0===Object.keys(this.validateSync(e,t)).length}validateForForm(e){return async t=>{try{return await e.validate(t,{abortEarly:!1,strict:!0}),{}}catch(e){if(!(e instanceof js.yI))throw e;return e.inner.reduce((e,t)=>(0,Hg.Oe)(e,t.path,t.message),{})}}}errorToObject(e){return e.inner.reduce((e,t)=>({...e,[t.path]:t.message}),{})}};function Kg(e){return function(e){return!!e&&!Array.isArray(e)}(e)?e:Array.isArray(e)&&e.length>0?{operator:It.And,groups:[{operator:It.And,predicates:e}]}:{operator:It.And,groups:[]}}function Qg(e,t,n){return{...e,groups:e.groups.map((e,i)=>i===t?n(e):e)}}function Xg(e,t,n){const i=e.groups[t];return i&&1===i.predicates.length&&0===n?Jg(e,t):Qg(e,t,e=>({...e,predicates:e.predicates.filter((e,t)=>t!==n)}))}function Jg(e,t){return{...e,groups:e.groups.filter((e,n)=>n!==t)}}Zg=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)()],Zg);const eh=["formsInsertedAt","campaignSentAt"];function th(e){return eh.includes(e)}function nh(e){return th(e.slug)?{...e,value:e.value2,value2:e.value3,value3:e.value}:e}function ih(e){return th(e.slug)?{...e,value:e.value3,value2:e.value,value3:e.value2}:e}var oh,ah,sh;const rh=[Fe.Date,Fe.Number,Fe.Text,Fe.Textarea],dh=u([Fe.Phone,Fe.Select,Fe.Text,Fe.Textarea]);function lh(e,t){const n=new Map(t.map(e=>[e.slug,e]));return{operator:e.operator,groups:e.groups.map((e,t)=>({operator:e.operator,groupIndex:t,filtersPredicates:e.predicates.flatMap((e,i)=>{const o=n.get(e.slug);return o?[{filter:o,predicate:e,groupIndex:t,predicateIndex:i}]:[]})})).filter(e=>e.filtersPredicates.length>0)}}function ch(e){return e.groups.flatMap(e=>e.filtersPredicates)}function uh(e,t){return h(e.values)?e.values.map(({id:e,name:n})=>(0,i.jsx)("option",{value:e,children:t(n)},e)):h(e.valuesGroups)?e.valuesGroups.map(({name:e,values:t},n)=>(0,i.jsx)("optgroup",{label:e,children:t.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},n)):[]}let mh=class extends Ds{countriesService;dateTimeService;constructor(e,t,n){super(n),this.countriesService=e,this.dateTimeService=t}filterPredicateToText(e){const{filter:t}=e,n=e.predicate&&nh(e.predicate);if(!n)return"";{const i=Vo.c9.isDateTime(n.value)?n.value:v(n.value)?Vo.c9.fromISO(n.value,{zone:"utc",setZone:!0}):Vo.c9.invalid("Not valid predicate.value"),o=!i.isValid||t.fieldType!==Ge.DateTimeRange&&t.fieldType!==Ge.Datetime?i.isValid&&t.fieldType===Ge.Date?this.dateTimeService.toLocaleString(i,oa.DateOnly.MonthLong):n.value:this.dateTimeService.toLocaleString(i,oa.DateTime),a=Vo.c9.isDateTime(n.value2)?n.value2:v(n.value2)?Vo.c9.fromISO(n.value2,{zone:"utc",setZone:!0}):Vo.c9.invalid("Not valid predicate.value2"),s=!a.isValid||t.fieldType!==Ge.DateTimeRange&&t.fieldType!==Ge.Datetime?a.isValid&&t.fieldType===Ge.Date?this.dateTimeService.toLocaleString(a,oa.DateOnly.MonthLong):n.value2:this.dateTimeService.toLocaleString(a,oa.DateTime),r=n.value3;switch(n.operator){case ft.Contains:return"condition"===t.slug?this.conditionFilterToString(e):"wishedPositions"===t.slug?this.t("mission_souhait_38008",s,this.valueToString(t,o)):"wishedPositionsCategories"===t.slug?this.t("cat_gorie_souha_24744",s,this.valueToString(t,o)):"isDelegationLeader"===t.slug?this.t("est_responsable_13012",this.valueToString(t,o)):this.t("_1_contient_2_40552",t.name,o);case ft.NotContains:return this.t("_1_ne_contient_14612",t.name,o);case ft.Is:if("isLeader"===t.slug)return this.t("est_responsable_19679");if("isPositionLeader"===t.slug)return this.t("est_responsable_27270");if("isPositionCategoryLeader"===t.slug)return this.t("est_responsable_72923");if("isDelegationLeader"===t.slug)return this.t("est_responsable_87662");if("privacy"===t.slug)return this.t("visibilit_est_12738");if("campaign"===t.slug)return this.campaignFilterToString(e);if("campaignReply"===t.slug)return this.campaignReplyFilterToString(e);if("condition"===t.slug)return this.t("champ_dont_un_a_44854");if("numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug)return this.t("_1_pour_la_jou_73174",t.name,this.dateTimeService.toLocaleString(i,oa.DateOnly.MonthLong),s);if(t.fieldType===Ge.Date)return this.t("_1_est_gal_43375",t.name,this.valueDateToString(n.valueDate));if(t.fieldType===Ge.Datetime||t.fieldType===Ge.DateTimeRange){const e=i?.isValid?this.dateTimeService.toLocaleString(i,oa.DateOnly.MonthLong):n.value;return this.t("_1_est_gal_43375",t.name,e)}return this.t("_1_est_gal_43375",t.name,this.valueToString(t,o));case ft.IsNot:if("isLeader"===t.slug)return this.t("n_est_pas_respo_55625");if("isPositionLeader"===t.slug)return this.t("n_est_pas_respo_35508");if("isPositionCategoryLeader"===t.slug)return this.t("n_est_pas_respo_07811");if("isDelegationLeader"===t.slug)return this.t("n_est_pas_respo_91275");if("privacy"===t.slug)return this.t("visibilit_est_55411");if("condition"===t.slug)return this.t("champ_d_pendant_33676");if("numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug)return this.t("_1_pour_la_jou_61197",t.name,this.dateTimeService.toLocaleString(i,oa.DateOnly.MonthLong),s);if(t.fieldType===Ge.Date)return this.t("_1_n_est_pas_38478",t.name,this.valueDateToString(n.valueDate));if(t.fieldType===Ge.Datetime||t.fieldType===Ge.DateTimeRange){const e=i?.isValid?this.dateTimeService.toLocaleString(i,oa.DateOnly.MonthLong):n.value;return this.t("_1_n_est_pas_38478",t.name,e)}return this.t("_1_n_est_pas_38478",t.name,this.valueToString(t,o));case ft.IsEmpty:return this.t("_1_est_vide_08225",t.name);case ft.IsNotEmpty:return this.t("_1_n_est_pas_v_31530",t.name);case ft.IsValid:return this.t("_1_est_valide_45209",t.name);case ft.IsNotValid:return this.t("_1_n_est_pas_v_05077",t.name);case ft.GreaterThan:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_91055",t.name,this.dateTimeService.toLocaleString(i,oa.DateOnly.MonthLong),s):this.t("_1_est_plus_gr_93527",t.name,n.value);case ft.GreaterThanEqual:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_41388",t.name,this.dateTimeService.toLocaleString(i,oa.DateOnly.MonthLong),s):this.t("_1_est_gal_ou_95771",t.name,n.value);case ft.LessThan:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_99548",t.name,this.dateTimeService.toLocaleString(i,oa.DateOnly.MonthLong),s):this.t("_1_est_plus_pe_18306",t.name,n.value);case ft.LessThanEqual:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_37455",t.name,this.dateTimeService.toLocaleString(i,oa.DateOnly.MonthLong),s):this.t("_1_est_gal_ou_39305",t.name,n.value);case ft.Overlaps:return this.t("_1_chevauche_45834",t.name,o,s);case ft.NotOverlaps:return this.t("_1_ne_chevauch_01846",t.name,o,s);case ft.Engulfs:return this.t("_1_engloutis_32228",t.name,o,s);case ft.NotEngulfs:return this.t("_1_n_engloutis_52951",t.name,o,s);case ft.EngulfedBy:return this.t("_1_est_englout_36064",t.name,o,s);case ft.NotEngulfedBy:return this.t("_1_n_est_pas_e_89161",t.name,o,s);case ft.IsBefore:return this.t("_1_est_avant_l_83271",t.name,o);case ft.IsAfter:return this.t("_1_est_apr_s_l_63712",t.name,o);case ft.Between:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_66546",t.name,this.dateTimeService.toLocaleString(i,oa.DateOnly.MonthLong),s,r):this.t("_1_est_entre_39871",t.name,o,s);case ft.StartsWith:return this.t("_1_commence_pa_47720",t.name,o);case ft.EndsWith:return this.t("_1_finit_par_65840",t.name,o);case ft.ThisDayMonth:return this.t("_1_est_aujourd_09227",t.name);case ft.Today:return this.t("_1_est_aujourd_42954",t.name);case ft.IsInLast:return this.t("_1_est_dans_le_96995",t.name,o);case ft.IsMoreThanAgo:return this.t("_1_est_il_y_a_01320",t.name,o);case ft.IsInNext:return this.t("_1_est_dans_le_19106",t.name,o);case ft.IsMoreThanAhead:return this.t("_1_est_dans_pl_88491",t.name,o);default:return wr(n.operator)}}}getValues(e){return e.fieldType===Fe.Sex?ci.map(e=>({id:e,name:this.t(e)})):e.fieldType===Fe.Language?e.fieldProperty===ze.Language?Jd.map(e=>({id:e,name:this.t(e)})):Hn.map(e=>({id:e,name:this.t(e)})):e.fieldType===Fe.Nationality?this.countriesService.getNationalitiesIdName():e.fieldType===Fe.Country?this.countriesService.getCountriesIdName():e.fieldType===Fe.Select&&h(e.values)?e.values.map(({id:e,value:t})=>({id:e,name:t})):[]}valueToString(e,t){const n=function(e){return h(e.values)?e.values:h(e.valuesGroups)?e.valuesGroups.flatMap(e=>e.values):[]}(e);return h(n)?g(t).map(e=>this.t(n.find(({id:t})=>t===e)?.name??e)).join(` ${this.t("ou_67404")} `):this.t(t)}valueDateToString(e){const t=[];return"number"==typeof e?.day&&-1!==e.day&&t.push(e.day),"number"==typeof e?.month&&-1!==e.month&&t.push(this.dateTimeService.toLocaleString(Vo.c9.now().set({month:e.month}),{month:"long"})),"number"==typeof e?.year&&-1!==e.year&&t.push(e.year),t.join(" ")}conditionFilterToString(e){if(e.predicate){const t=e.predicate.value.map(t=>e.filter.values?.find(e=>e.id===t)?.name??"");return 1===t.length?this.t("d_pend_du_champ_43516",t[0]):this.t("d_pend_des_cham_85348",t.join(", "))}return""}campaignFilterToString(e){if(e.predicate){const t=e.predicate.value.map(t=>e.filter.campaigns?.find(e=>e.id===t)?.name??"").join(", "),n=e.predicate.value2.map(e=>this.t(e)).join(", ");return this.t("a_re_u_un_messa_76546",t,n)}return""}campaignReplyFilterToString(e){if(e.predicate){const t=e.predicate.value.map(t=>e.filter.campaigns?.find(e=>e.id===t)?.name??"").join(", ");return this.t("la_r_ponse_des_14160",t,e.predicate.value2)}return""}customFieldsToFilters(e){return e.filter(({fieldType:e})=>[Ge.Address,Ge.Checkbox,Ge.Country,Ge.Date,Ge.Datetime,Ge.File,Ge.Language,Ge.Nationality,Ge.Number,Ge.Phone,Ge.Select,Ge.Sex,Ge.Text,Ge.Textarea,Ge.Validation].includes(e)).map(e=>({...e,category:this.t("champs_de_formu_64126"),fieldType:e.fieldType,values:this.getValues(e),color:"warning",isEncrypted:e.isEncrypted}))}customFieldsToPossibleColumns(e){return e.map(e=>({slug:e.slug,name:e.name,label:e.label,customField:e,isSearchable:dh.includes(e.fieldType),isSortable:!!rh.includes(e.fieldType)||e.fieldType===Fe.Select&&e.isSelectV2&&!e.canSelectMultiple,sortAttribute:e.slug,width:e.fileType===Be.Picture?80:void 0,minWidth:e.fileType===Be.Picture?void 0:180}))}};mh=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(oh=void 0!==Qd&&Qd)?oh:Object,"function"==typeof(ah=void 0!==jl&&jl)?ah:Object,"function"==typeof(sh=void 0!==Ai&&Ai)?sh:Object])],mh);var gh,hh,ph,fh;!function(e){e.Acronym="acronym",e.Address="address",e.AutoAccredit="autoAccredit",e.Category="category",e.Color="color",e.Conditions="conditions",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.FillingRate="fillingRate",e.Icon="icon",e.IconColor="iconColor",e.Id="id",e.Index="index",e.Latitude="latitude",e.Longitude="longitude",e.Name="name",e.PrivateNote="privateNote",e.MaxResources="maxResources",e.AssignedResources="resources",e.Slot="slot",e.SlotDate="slotDate",e.SlotName="slotName",e.ScannedResources="scannedResources",e.WishedResources="wishedResources",e.Tags="tags",e.WeezeventChecklistId="weezeventChecklistId",e.WeezeventIsSynchronized="weezeventIsSynchronized"}(fh||(fh={}));let Ih=class extends mh{constructor(e,t,n){super(e,t,n)}getAccreditationsFilters(e,t){return(0,bs.A)([{slug:"name",name:this.t("AccreditationName"),category:this.t("accr_ditations_39450"),fieldType:Ge.Text,hideEmpty:!0},{slug:"accreditation",name:this.t("Accreditation"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:fh.Description,name:this.t("Description"),category:this.t("accr_ditations_39450"),fieldType:Ge.Text},{slug:fh.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("accr_ditations_39450"),fieldType:Ge.Text},h(e.accreditationsCategories)?{slug:"accreditationCategory",name:this.t("cat_gorie_00291"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,values:(0,vs.A)(e.accreditationsCategories,e=>y(e.name)),hideEmpty:!0}:null,{slug:"slotName",name:this.t("nom_du_cr_neau_54351"),category:this.t("accr_ditations_39450"),fieldType:Ge.Text},{slug:"slotDate",name:this.t("Date"),category:this.t("accr_ditations_39450"),fieldType:Ge.Date},{slug:"tag",name:"Tag",category:this.t("accr_ditations_39450"),fieldType:Ge.Select,needLoading:!0,organizationId:e.organizationId,eventId:e.id,tagContext:Pt.Accreditations},{slug:"accreditationCustomField",name:this.t("condition_61066"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,needLoading:!0,organizationId:e.organizationId},{slug:"acronym",name:this.t("Acronym"),category:this.t("accr_ditations_39450"),fieldType:Ge.Text},{slug:"color",name:this.t("Color"),category:this.t("accr_ditations_39450"),fieldType:Ge.Text,hideEmpty:!0},{slug:"icon",name:this.t("ic_ne_55554"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,values:qn.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"address",name:this.t("Address"),category:this.t("accr_ditations_39450"),fieldType:Ge.Text},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("accr_ditations_39450"),fieldType:Ge.Number,hideEmpty:!0},{slug:fh.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e.organizationId,eventId:e.id},{slug:fh.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("accr_ditations_39450"),fieldType:Ge.Datetime,hideEmpty:!0},e.isWeezeventConnected?{slug:fh.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),category:this.t("accr_ditations_39450"),fieldType:Ge.Number}:null,...this.customFieldsToFilters(t)])}getAccreditationsPossibleColumns(e,{isWeezeventConnected:t}){const n=[{slug:fh.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:ee.Id,width:100},{slug:fh.Name,name:this.t("AccreditationName"),isSearchable:!0,isSortable:!0,sortAttribute:ee.Name,minWidth:240},{slug:fh.Description,name:this.t("Description"),minWidth:320},{slug:fh.Category,name:this.t("nom_de_la_cat_g_03860"),isSearchable:!0,isSortable:!0,sortAttribute:ee.Category,minWidth:240},{slug:fh.SlotName,name:this.t("nom_du_cr_neau_54351"),isSearchable:!0,minWidth:240},{slug:fh.SlotDate,name:this.t("Date"),minWidth:180,isSortable:!0,sortAttribute:J.Date},{slug:fh.AssignedResources,name:this.t("membres_11310"),minWidth:320},{slug:fh.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:240},{slug:fh.Conditions,name:this.t("conditions_77756"),minWidth:320},{slug:fh.Address,name:this.t("Address"),isSearchable:!0,minWidth:240},{slug:fh.Latitude,name:this.t("latitude_46176"),isSearchable:!0,minWidth:180},{slug:fh.Longitude,name:this.t("longitude_01695"),isSearchable:!0,minWidth:180},{slug:fh.Acronym,name:this.t("Acronym"),isSearchable:!0,isSortable:!0,sortAttribute:ee.Acronym,minWidth:180},{slug:fh.Color,name:this.t("Color"),isSearchable:!0,width:80},{slug:fh.Icon,name:this.t("ic_ne_55554"),width:80},{slug:fh.IconColor,name:this.t("ic_ne_et_couleu_54485"),width:80},{slug:fh.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:fh.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:fh.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:ee.CreatedAt,minWidth:180},{slug:fh.AutoAccredit,name:this.t("AutoAccredit"),minWidth:180},{slug:fh.Index,name:this.t("Index"),isSortable:!0,sortAttribute:ee.Index,width:200}];return t&&n.push({slug:fh.WeezeventIsSynchronized,name:this.t("WeezeventIsSynchronized"),minWidth:180},{slug:fh.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),minWidth:180}),n.concat(this.customFieldsToPossibleColumns(e))}};Ih=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(gh=void 0!==Qd&&Qd)?gh:Object,"function"==typeof(hh=void 0!==jl&&jl)?hh:Object,"function"==typeof(ph=void 0!==Ai&&Ai)?ph:Object])],Ih);var _h,yh,xh,Sh;!function(e){e.Accreditation="accreditation",e.Accreditations="accreditations",e.AccreditationProfile="accreditation_profile",e.AccreditationSlot="accreditationSlotId",e.Acronym="acronym",e.Category="category",e.Color="color",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.Icon="icon",e.IconColor="iconColor",e.Id="id",e.Name="name"}(Sh||(Sh={}));let vh=class extends mh{constructor(e,t,n){super(e,t,n)}getAccreditationsProfilesFilters(e){const t=this.t("profils_d_accr_27825");return[{slug:Sh.Name,name:this.t("nom_08311"),category:t,fieldType:Ge.Text,hideEmpty:!0},{slug:Sh.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),category:t,fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},...h(e.accreditationsProfilesCategories)?[{slug:Sh.Category,name:this.t("cat_gorie_00291"),category:t,fieldType:Ge.Select,values:(0,vs.A)(e.accreditationsProfilesCategories,e=>y(e.name)),hideEmpty:!0}]:[],{slug:Sh.Description,name:this.t("Description"),category:t,fieldType:Ge.Text},{slug:Sh.Accreditation,name:this.t("Accreditation"),category:t,fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:Sh.AccreditationSlot,name:this.t("cr_neaux_accr_d_70934"),category:t,fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:Sh.Acronym,name:this.t("Acronym"),category:t,fieldType:Ge.Text},{slug:Sh.Color,name:this.t("Color"),category:t,fieldType:Ge.Text,hideEmpty:!0},{slug:Sh.Icon,name:this.t("ic_ne_55554"),category:t,fieldType:Ge.Select,values:qn.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:Sh.CreatedBy,name:this.t("cr_e_par_30622"),category:t,fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e.organizationId,eventId:e.id},{slug:Sh.CreatedAt,name:this.t("cr_e_le_02658"),category:t,fieldType:Ge.Datetime,hideEmpty:!0}]}getAccreditationsProfilesPossibleColumns(){return[{slug:Sh.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,width:100,sortAttribute:X.Id},{slug:Sh.Name,name:this.t("nom_08311"),isSearchable:!0,isSortable:!0,sortAttribute:X.Name,minWidth:240},{slug:Sh.Description,name:this.t("Description"),minWidth:320},{slug:Sh.Category,name:this.t("cat_gorie_00291"),isSearchable:!0,isSortable:!0,sortAttribute:X.Category,minWidth:200},{slug:Sh.Accreditations,name:this.t("accr_ditations_39450"),minWidth:320},{slug:Sh.Acronym,name:this.t("Acronym"),isSearchable:!0,minWidth:160},{slug:fh.Color,name:this.t("Color"),isSearchable:!0,width:80},{slug:fh.Icon,name:this.t("ic_ne_55554"),width:80},{slug:fh.IconColor,name:this.t("ic_ne_et_couleu_54485"),width:80},{slug:Sh.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:Sh.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:X.CreatedAt,minWidth:180}]}};vh=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(_h=void 0!==Qd&&Qd)?_h:Object,"function"==typeof(yh=void 0!==jl&&jl)?yh:Object,"function"==typeof(xh=void 0!==Ai&&Ai)?xh:Object])],vh);var bh,jh,Ah,Ch;!function(e){e.Features="features",e.Id="id",e.InsertedAt="insertedAt",e.MembersLimit="membersLimit",e.Name="name",e.NumberOfEvents="numberOfEvents",e.NumberOfMembers="numberOfMembers",e.PeriodEndAt="periodEndAt",e.PricePerMember="pricePerMember",e.WeezeventOrganizationId="weezeventOrganizationId"}(Ch||(Ch={}));let Eh=class extends mh{constructor(e,t,n){super(e,t,n)}getFilters(){return[{slug:"features",name:this.t("fonctionnalit_s_47714"),category:this.t("organisation_71863"),fieldType:Ge.Select,values:Fn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"isAdmin",name:this.t("est_admin_98471"),category:this.t("organisation_71863"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:"isActive",name:this.t("est_active_05309"),category:this.t("organisation_71863"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:"useOldBilling",name:this.t("utilise_l_ancie_27299"),category:this.t("organisation_71863"),fieldType:Ge.Checkbox},{slug:"isOverLimit",name:this.t("d_passe_la_limi_27046"),category:this.t("organisation_71863"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:Ch.MembersLimit,name:this.t("nombre_de_membr_16400"),category:this.t("organisation_71863"),fieldType:Ge.Number},{slug:Ch.PricePerMember,name:this.t("prix_par_membre_20633"),category:this.t("organisation_71863"),fieldType:Ge.Number}]}getPossibleColumns(){return[{slug:Ch.Id,name:this.t("id_51738"),isSortable:!0,sortAttribute:at.Id,width:100},{slug:Ch.Name,name:this.t("nom_de_l_organi_49583"),minWidth:240},{slug:Ch.InsertedAt,name:this.t("date_de_cr_atio_00749"),isSortable:!0,sortAttribute:at.InsertedAt,width:200},{slug:Ch.PeriodEndAt,name:this.t("date_de_fin_de_17750"),isSortable:!0,sortAttribute:at.PeriodEndAt,width:200},{slug:Ch.Features,name:this.t("fonctionnalit_s_47714"),minWidth:320},{slug:Ch.NumberOfEvents,name:this.t("nombre_d_v_nem_14214"),minWidth:180},{slug:Ch.NumberOfMembers,name:this.t("nombre_de_membr_49522"),minWidth:180},{slug:Ch.MembersLimit,name:this.t("nombre_de_membr_16400"),minWidth:180},{slug:Ch.PricePerMember,name:this.t("prix_par_membre_20633"),minWidth:180},{slug:Ch.WeezeventOrganizationId,name:this.t("id_de_l_organis_67465"),isSortable:!0,sortAttribute:at.WeezeventOrganizationId,width:100}]}};Eh=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(bh=void 0!==Qd&&Qd)?bh:Object,"function"==typeof(jh=void 0!==jl&&jl)?jh:Object,"function"==typeof(Ah=void 0!==Ai&&Ai)?Ah:Object])],Eh);var Th,Oh,Rh;let Mh=class extends mh{constructor(e,t,n){super(e,t,n)}getCampaignsFilters(e){return[{slug:"state",name:this.t("State"),category:this.t("Campaigns"),fieldType:Ge.Select,values:Dn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"campaign_type",name:this.t("type_35427"),category:this.t("Campaigns"),fieldType:Ge.Select,values:wn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"created_by",name:this.t("cr_e_par_30622"),category:this.t("Campaigns"),fieldType:Ge.Select,values:e.map(e=>({id:e.userId,name:e.nameOrEmail})),hideEmpty:!0},{slug:"sent_at",name:this.t("envoy_le_60398"),category:this.t("Campaigns"),fieldType:Ge.Date,hideEmpty:!0}]}};Mh=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Th=void 0!==Qd&&Qd)?Th:Object,"function"==typeof(Oh=void 0!==jl&&jl)?Oh:Object,"function"==typeof(Rh=void 0!==Ai&&Ai)?Rh:Object])],Mh);var Dh,wh,$h;let Ph=class extends mh{constructor(e,t,n){super(e,t,n)}getCustomFieldsFilters(e,t,n){return[{slug:"name",name:this.t("nom_du_champ_48329"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Text,hideEmpty:!0},{slug:"label",name:this.t("label_08243"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Text},{slug:"customFieldCategory",name:this.t("cat_gorie_00291"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Select,values:(0,vs.A)(n.customFieldsCategories.nodes,e=>y(e.name)),hideEmpty:!0},{slug:"fieldType",name:this.t("type_35427"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Select,values:Bn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"variety",name:this.t("typologie_34041"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Select,values:(0,vs.A)(Nn.filter(e=>!t||e!==_e.Event).map(e=>({id:e,name:Nr(this.t.bind(this),e)})),({name:e})=>e),hideEmpty:!0},{slug:"privacy",name:this.t("Privacy"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:"condition",name:this.t("condition_61066"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Select,values:n.customFields.nodes},{slug:"isEncrypted",name:this.t("est_chiffr_99072"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:"hasValidationRules",name:this.t("r_gles_de_valid_33082"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:"createdBy",name:this.t("cr_e_par_30622"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"createdAt",name:this.t("cr_e_le_02658"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Datetime,hideEmpty:!0}]}getCustomFieldsPossibleColumns(){return[{slug:"id",name:this.t("id_51738"),isSortable:!0,sortAttribute:Ie.Id,width:100},{slug:"name",name:this.t("nom_du_champ_48329"),isSortable:!0,sortAttribute:Ie.Name,minWidth:240},{slug:"label",name:this.t("label_08243"),isSortable:!0,sortAttribute:Ie.Label,minWidth:180},{slug:"category",name:this.t("Category"),isSortable:!0,sortAttribute:Ie.Category,minWidth:240},{slug:"variety",name:this.t("typologie_34041"),minWidth:180},{slug:"fieldType",name:this.t("type_35427"),isSortable:!0,sortAttribute:Ie.Type,width:250},{slug:"numberOfTimesUsed",name:this.t("nombre_d_utilis_58389"),width:200},{slug:"state",name:this.t("Privacy"),isSortable:!0,sortAttribute:Ie.Status,width:200},{slug:"values",name:this.t("valeurs_34314"),minWidth:240},{slug:"variable",name:this.t("variable_pour_l_45711"),minWidth:180},{slug:"isEncrypted",name:this.t("est_chiffr_99072"),width:200},{slug:"createdBy",name:this.t("cr_par_41994"),minWidth:180},{slug:"createdAt",name:this.t("cr_le_85046"),isSortable:!0,sortAttribute:Ie.CreatedAt,minWidth:180}]}};Ph=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Dh=void 0!==Qd&&Qd)?Dh:Object,"function"==typeof(wh=void 0!==jl&&jl)?wh:Object,"function"==typeof($h=void 0!==Ai&&Ai)?$h:Object])],Ph);var Nh,kh,zh,Lh;!function(e){e.Accreditation="accreditation",e.AccreditationProfile="accreditation_profile",e.Accreditations="accreditations",e.AccreditationSlot="accreditationSlotId",e.AccreditationsProfiles="accreditationsProfiles",e.AssignedResources="resources",e.Campaigns="campaigns",e.CanLeadersAddMembers="canLeadersAddMembers",e.CanLeadersDeleteMembers="canLeadersDeleteMembers",e.CanLeadersDuplicateMembers="canLeadersDuplicateMembers",e.CanLeadersEditColumns="canLeadersEditColumns",e.CanLeadersEditCustomFields="canLeadersEditCustomFields",e.CanLeadersEditMembers="canLeadersEditMembers",e.CanLeadersImportMembers="canLeadersImportMembers",e.CanLeadersSeeHiddenAccreditationsSlots="canLeadersSeeHiddenAccreditationsSlots",e.CategoryLeaders="categoryLeaders",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.DeadlineDate="deadlineDate",e.DelegationCategory="delegationCategory",e.DelegationSpaceLink="delegationSpaceLink",e.DelegationsSpaceLayout="delegationsSpaceLayout",e.Description="description",e.Documents="documents",e.Events="events",e.FillingRate="fillingRate",e.Form="form",e.FormLink="formLink",e.Id="id",e.IsLocked="isLocked",e.Leaders="leaders",e.MaxResources="maxResources",e.Name="name",e.Parent="parent",e.PrivateNote="privateNote",e.ShowAllAccreditations="showAllAccreditations",e.ShowFormLinkInDelegationSpace="showFormLinkInDelegationSpace",e.ShowInDelegation="showInDelegation",e.State="delegationState",e.Tags="tags",e.UsedCustomFieldsFilled="usedCustomFieldsFilled"}(Lh||(Lh={}));let Fh=class extends mh{constructor(e,t,n){super(e,t,n)}getDelegationsFilters(e,t,n,i){return(0,bs.A)([{slug:Lh.Name,name:this.t("nom_de_la_d_l_g_28087"),category:this.t("d_l_gations_78318"),fieldType:Ge.Text,hideEmpty:!0},{slug:Lh.Description,name:this.t("Description"),category:this.t("d_l_gations_78318"),fieldType:Ge.Text},{slug:Lh.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("d_l_gations_78318"),fieldType:Ge.Text},h(i)?{slug:Lh.DelegationCategory,name:this.t("cat_gorie_00291"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,values:(0,vs.A)(i,e=>y(e.name)),hideEmpty:!0}:null,{slug:"delegationState",name:this.t("State"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,values:kn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:Lh.CategoryLeaders,name:this.t("responsables_de_22220"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,needLoading:!0,organizationId:e,eventId:t},{slug:Lh.Leaders,name:this.t("responsables_de_03381"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,needLoading:!0,organizationId:e,eventId:t},{slug:"leadersEmailSend",name:this.t("les_responsable_08257"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:"form",name:this.t("Form"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:"deadlineDate",name:this.t("date_limite_d_i_79779"),category:this.t("d_l_gations_78318"),fieldType:Ge.Date},{slug:Lh.MaxResources,name:this.t("MaxResources"),category:this.t("d_l_gations_78318"),fieldType:Ge.Number},{slug:"tag",name:this.t("Tag"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,needLoading:!0,organizationId:e,eventId:t,tagContext:Pt.Delegations},{slug:"resources",name:this.t("nombre_de_membr_08851"),category:this.t("d_l_gations_78318"),fieldType:Ge.Number,hideEmpty:!0},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("d_l_gations_78318"),fieldType:Ge.Number,hideEmpty:!0},{slug:Lh.ShowInDelegation,name:this.t("ShowInDelegationSpace"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:Lh.CanLeadersAddMembers,name:this.t("CanLeadersAddMembers"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:Lh.CanLeadersDeleteMembers,name:this.t("CanLeadersDeleteMembers"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:Lh.CanLeadersDuplicateMembers,name:this.t("CanLeadersDuplicateMembers"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:Lh.CanLeadersEditMembers,name:this.t("CanLeadersEditMembers"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:Lh.CanLeadersEditColumns,name:this.t("CanLeadersEditColumns"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:Lh.CanLeadersEditCustomFields,name:this.t("CanLeadersEditCustomFields"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:Lh.CanLeadersImportMembers,name:this.t("CanLeadersImportMembers"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:Lh.CanLeadersSeeHiddenAccreditationsSlots,name:this.t("CanLeadersSeeHiddenAccreditationsSlots"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:Lh.ShowFormLinkInDelegationSpace,name:this.t("afficher_le_lie_05841"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:Lh.ShowAllAccreditations,name:this.t("ShowAllAccreditations"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},t?{slug:Lh.DelegationsSpaceLayout,name:this.t("DelegationsSpaceLayout"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,needLoading:!0,eventId:t}:null,t?{slug:Lh.Accreditation,name:this.t("accr_ditations_39450"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,needLoading:!0,eventId:t}:null,t?{slug:Lh.AccreditationSlot,name:this.t("cr_neaux_accr_d_70934"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,needLoading:!0,eventId:t}:null,t?{slug:Lh.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,needLoading:!0,eventId:t}:null,{slug:Lh.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:Lh.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("d_l_gations_78318"),fieldType:Ge.Datetime,hideEmpty:!0},t?{slug:"parent",name:this.t("est_li_e_une_48471"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0}:{slug:"event",name:this.t("_v_nement_22345"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:Lh.UsedCustomFieldsFilled,name:this.t("champs_personna_27238"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0},...this.customFieldsToFilters(n)])}getDelegationsPossibleColumns(e,t){return[{slug:Lh.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:ve.Id,width:100},{slug:Lh.Name,name:this.t("nom_de_la_d_l_g_28087"),isSearchable:!0,isSortable:!0,sortAttribute:ve.Name,minWidth:240},{slug:Lh.Description,name:this.t("Description"),minWidth:320},{slug:Lh.DelegationCategory,name:this.t("cat_gorie_00291"),isSearchable:!0,isSortable:!0,sortAttribute:ve.Category,minWidth:240},{slug:Lh.State,name:this.t("State"),minWidth:180},{slug:Lh.CategoryLeaders,name:this.t("responsables_de_22220"),isSearchable:!0,minWidth:320},{slug:Lh.Leaders,name:this.t("responsables_de_03381"),isSearchable:!0,minWidth:320},{slug:Lh.Form,name:this.t("Form"),isSearchable:!0,minWidth:180},{slug:Lh.FormLink,name:this.t("FormLink"),minWidth:240},{slug:Lh.DelegationSpaceLink,name:this.t("DelegationSpaceLink"),minWidth:240},{slug:Lh.DelegationsSpaceLayout,name:this.t("DelegationsSpaceLayout"),minWidth:240},{slug:Lh.DeadlineDate,name:this.t("date_limite_d_i_79779"),minWidth:180},{slug:Lh.MaxResources,name:this.t("MaxResources"),minWidth:180,isSortable:!0,sortAttribute:ve.MaxResources},{slug:Lh.AssignedResources,name:this.t("membres_11310"),minWidth:240},{slug:Lh.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:240},{slug:Lh.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:Lh.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:Lh.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:ve.CreatedAt,minWidth:180},{slug:Lh.ShowInDelegation,name:this.t("ShowInDelegationSpace"),minWidth:180},{slug:Lh.CanLeadersAddMembers,name:this.t("CanLeadersAddMembers"),minWidth:180},{slug:Lh.CanLeadersEditMembers,name:this.t("CanLeadersEditMembers"),minWidth:180},{slug:Lh.CanLeadersDeleteMembers,name:this.t("CanLeadersDeleteMembers"),minWidth:180},{slug:Lh.CanLeadersDuplicateMembers,name:this.t("CanLeadersDuplicateMembers"),minWidth:180},{slug:Lh.CanLeadersEditColumns,name:this.t("CanLeadersEditColumns"),minWidth:180},{slug:Lh.CanLeadersEditCustomFields,name:this.t("CanLeadersEditCustomFields"),minWidth:180},{slug:Lh.CanLeadersImportMembers,name:this.t("CanLeadersImportMembers"),minWidth:180},{slug:Lh.CanLeadersSeeHiddenAccreditationsSlots,name:this.t("CanLeadersSeeHiddenAccreditationsSlots"),minWidth:180},{slug:Lh.ShowFormLinkInDelegationSpace,name:this.t("afficher_le_lie_05841"),minWidth:180},{slug:Lh.ShowAllAccreditations,name:this.t("ShowAllAccreditations"),minWidth:180},{slug:Lh.IsLocked,name:this.t("IsLocked"),minWidth:180},e?{slug:Lh.Parent,name:this.t("d_l_gation_de_l_86100"),minWidth:320}:{slug:Lh.Events,name:this.t("_v_nements_53672"),minWidth:320},...e?[{slug:Lh.Accreditations,name:this.t("accr_ditations_39450"),minWidth:320},{slug:Lh.AccreditationsProfiles,name:this.t("profils_d_accr_27825"),minWidth:320}]:[],{slug:Lh.Campaigns,name:this.t("campagnes_que_l_81468"),minWidth:320},{slug:Lh.Documents,name:this.t("documents_que_l_18755"),minWidth:320},{slug:Lh.UsedCustomFieldsFilled,name:this.t("champs_personna_27238"),minWidth:180},...this.customFieldsToPossibleColumns(t)]}};Fh=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Nh=void 0!==Qd&&Qd)?Nh:Object,"function"==typeof(kh=void 0!==jl&&jl)?kh:Object,"function"==typeof(zh=void 0!==Ai&&Ai)?zh:Object])],Fh);var Uh,Bh,Gh,Vh;!function(e){e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.EndAt="endAt",e.Id="id",e.Name="name",e.NumberOfMembers="numberOfMembers",e.NumberOfMembersAccredited="numberOfMembersAccredited",e.NumberOfMembersAssigned="numberOfMembersAssigned",e.StartAt="startAt",e.State="state",e.Tags="tags"}(Vh||(Vh={}));let Wh=class extends mh{constructor(e,t,n){super(e,t,n)}getEventsFilters(e,t){return[{slug:"name",name:this.t("nom_de_l_v_nem_08711"),category:this.t("Event"),fieldType:Ge.Text,hideEmpty:!0},{slug:Vh.Description,name:this.t("Description"),category:this.t("Event"),fieldType:Ge.Text},{slug:"startAt",name:this.t("date_de_d_but_43380"),category:this.t("Event"),fieldType:Ge.Date,hideEmpty:!0},{slug:"endAt",name:this.t("date_de_fin_86920"),category:this.t("Event"),fieldType:Ge.Date,hideEmpty:!0},{slug:"state",name:this.t("State"),category:this.t("Event"),fieldType:Ge.Select,values:[{id:$e.Ongoing,name:this.t($e.Ongoing)},{id:$e.Upcoming,name:this.t($e.Upcoming)},{id:$e.Done,name:this.t($e.Done)}],hideEmpty:!0},{slug:"tag",name:this.t("Tag"),category:this.t("Event"),fieldType:Ge.Select,needLoading:!0,organizationId:e,tagContext:Pt.Events},{slug:Vh.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("Event"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:Vh.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("Event"),fieldType:Ge.Datetime,hideEmpty:!0},...this.customFieldsToFilters(t)]}getEventPossibleColumns(e){return[{slug:Vh.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:we.Id,width:100},{slug:Vh.Name,name:this.t("nom_de_l_v_nem_08711"),isSearchable:!0,isSortable:!0,sortAttribute:we.Name,minWidth:240},{slug:Vh.Description,name:this.t("Description"),minWidth:320},{slug:Vh.StartAt,name:this.t("date_de_d_but_43380"),isSortable:!0,sortAttribute:we.StartAt,minWidth:180},{slug:Vh.EndAt,name:this.t("date_de_fin_86920"),isSortable:!0,sortAttribute:we.EndAt,minWidth:180},{slug:Vh.State,name:this.t("State"),minWidth:180},{slug:Vh.Tags,name:this.t("tags_79499"),minWidth:320},{slug:Vh.NumberOfMembers,name:this.t("nombre_de_membr_08851"),minWidth:180},{slug:Vh.NumberOfMembersAssigned,name:this.t("nombre_de_membr_87779_plural"),minWidth:180},{slug:Vh.NumberOfMembersAccredited,name:this.t("nombre_de_membr_25913"),minWidth:180},{slug:Vh.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:Vh.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:we.CreatedAt,minWidth:180}].concat(this.customFieldsToPossibleColumns(e))}};Wh=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Uh=void 0!==Qd&&Qd)?Uh:Object,"function"==typeof(Bh=void 0!==jl&&jl)?Bh:Object,"function"==typeof(Gh=void 0!==Ai&&Ai)?Gh:Object])],Wh);const qh="custom_document_";function Yh(e){return`${qh}${e}`}function Hh(e){return e.startsWith(qh)}function Zh(e,t){return 0===e.length||h((0,bl.A)(e,g(t)))}var Kh,Qh,Xh,Jh;!function(e){e.Delegation="delegation",e.Event="event",e.Id="id",e.Name="name",e.TicketId="ticket_id"}(Jh||(Jh={}));const ep=[{slug:"cf80691",valueId:61410},{slug:"cf80691",valueId:61409}];function tp({slug:e,valueId:t}){return`custom_field_value_${e}_${t}`}let np=class extends mh{constructor(e,t,n){super(e,t,n)}getPossibleColumns(e,t){return[{slug:Jh.Id,name:this.t("id_51738"),isSortable:!0,sortAttribute:qt.Id,width:100},{slug:Jh.Name,name:this.t("nom_08311"),isSortable:!0,sortAttribute:qt.Name,minWidth:280},{slug:Jh.Event,name:this.t("_v_nement_22345"),minWidth:240},{slug:Jh.TicketId,name:this.t("TicketId"),width:200},...this.getCustomDocumentsColumns(t),...this.getCustomFieldsValuesColumns(e),...this.customFieldsToPossibleColumns(e)]}getCustomFieldsValuesColumns(e){return ep.flatMap(({slug:t,valueId:n})=>{const i=e.find(e=>e.slug===t),o=i?.values.find(e=>e.id===n);return i&&o?[{slug:tp({slug:t,valueId:n}),name:o.value,label:i.name,customField:i,width:200}]:[]})}getCustomDocumentsColumns(e){return(0,vs.A)(Object.entries((0,ym.A)(e,e=>e.slug)).map(([e,t])=>({slug:Yh(e),name:this.t("imprimer_1_75795",(0,Sg.A)(t,e=>e.id).name),label:e,minWidth:240})),e=>y(e.name))}};np=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(Kh=void 0!==Qd&&Qd)?Kh:Object,"function"==typeof(Qh=void 0!==jl&&jl)?Qh:Object,"function"==typeof(Xh=void 0!==Ai&&Ai)?Xh:Object])],np);var ip,op,ap,sp;!function(e){e.Acronym="acronym",e.Address="address",e.Category="category",e.CategoryLeaders="categoryLeaders",e.CheckedInRate="checkedInRate",e.CheckedOutRate="checkedOutRate",e.Color="color",e.Conditions="conditions",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.FillingRate="fillingRate",e.Icon="icon",e.IconColor="iconColor",e.Id="id",e.Latitude="latitude",e.Layer="layer",e.Leaders="leaders",e.Longitude="longitude",e.Name="name",e.PrivateNote="privateNote",e.MaxResources="resources",e.AssignedResources="assignedResources",e.Slot="slot",e.SlotName="slotName",e.State="state",e.Tags="tags",e.Traces="traces",e.WeezeventChecklistId="weezeventChecklistId",e.WeezeventIsSynchronized="weezeventIsSynchronized",e.Zoom="zoom"}(sp||(sp={}));let rp=class extends mh{constructor(e,t,n){super(e,t,n)}getPositionsFilters(e,t){return(0,bs.A)([{slug:sp.Name,name:this.t("nom_de_la_missi_64605"),category:this.t("missions_63972"),fieldType:Ge.Text,hideEmpty:!0},{slug:"position",name:this.t("Position"),category:this.t("missions_63972"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:sp.Description,name:this.t("Description"),category:this.t("missions_63972"),fieldType:Ge.Text},{slug:sp.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("missions_63972"),fieldType:Ge.Text},h(e.positionsCategories)?{slug:"positionCategory",name:this.t("cat_gorie_00291"),category:this.t("missions_63972"),fieldType:Ge.Select,values:(0,vs.A)(e.positionsCategories,e=>y(e.name)),hideEmpty:!0}:null,{slug:"positionSlot",name:this.t("cr_neau_11117"),category:this.t("missions_63972"),fieldType:Ge.DateTimeRange,startAt:e.startAt,endAt:e.endAt},{slug:"positionSlotName",name:this.t("nom_du_cr_neau_54351"),category:this.t("missions_63972"),fieldType:Ge.Text},{slug:"tag",name:this.t("Tag"),category:this.t("missions_63972"),fieldType:Ge.Select,needLoading:!0,organizationId:e.organizationId,eventId:e.id,tagContext:Pt.Positions},{slug:"positionCustomField",name:this.t("condition_61066"),category:this.t("missions_63972"),fieldType:Ge.Select,needLoading:!0,organizationId:e.organizationId},h(e.traces)?{slug:sp.Traces,name:this.t("Traces"),category:this.t("missions_63972"),fieldType:Ge.Select,values:(0,vs.A)(e.traces,e=>y(e.name))}:null,{slug:"acronym",name:this.t("Acronym"),category:this.t("missions_63972"),fieldType:Ge.Text},{slug:"color",name:this.t("Color"),category:this.t("missions_63972"),fieldType:Ge.Text,hideEmpty:!0},{slug:"icon",name:this.t("ic_ne_55554"),category:this.t("missions_63972"),fieldType:Ge.Select,values:qn.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"address",name:this.t("Address"),category:this.t("missions_63972"),fieldType:Ge.Text},{slug:"latitude",name:this.t("Latitude"),category:this.t("missions_63972"),fieldType:Ge.Number},{slug:"longitude",name:this.t("Longitude"),category:this.t("missions_63972"),fieldType:Ge.Number},{slug:"state",name:this.t("statut_des_ress_73550"),category:this.t("missions_63972"),fieldType:Ge.Select,hideEmpty:!0,values:ii.map(e=>({id:e,name:this.t(e)}))},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0},{slug:sp.CheckedInRate,name:this.t("taux_de_pointag_87285"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0},{slug:sp.CheckedOutRate,name:this.t("taux_de_d_point_88315"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0},{slug:sp.Leaders,name:this.t("nombre_de_respo_19772"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0},{slug:sp.CategoryLeaders,name:this.t("nombre_de_respo_01994"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0},{slug:sp.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("missions_63972"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e.organizationId,eventId:e.id},{slug:sp.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("missions_63972"),fieldType:Ge.Datetime,hideEmpty:!0},e.isWeezeventConnected?{slug:sp.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),category:this.t("missions_63972"),fieldType:Ge.Number}:null,...this.customFieldsToFilters(t)])}getPositionsPossibleColumns(e,{isWeezeventConnected:t}){const n=[{slug:sp.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:ht.Id,width:100},{slug:sp.Name,name:this.t("nom_de_la_missi_64605"),isSearchable:!0,isSortable:!0,sortAttribute:ht.Name,minWidth:120},{slug:sp.Acronym,name:this.t("acronymes_11499"),isSearchable:!0,isSortable:!0,sortAttribute:ht.Acronym,minWidth:120},{slug:sp.Description,name:this.t("Description"),minWidth:320},{slug:sp.Category,name:this.t("cat_gorie_00291"),isSearchable:!0,isSortable:!0,sortAttribute:ht.Category,minWidth:240},{slug:sp.SlotName,name:this.t("nom_du_cr_neau_54351"),isSearchable:!0,minWidth:180},{slug:sp.Slot,name:this.t("cr_neau_11117"),isSortable:!0,sortAttribute:ht.Slot,minWidth:240},{slug:sp.MaxResources,name:this.t("membres_n_cessa_55227"),minWidth:320},{slug:sp.AssignedResources,name:this.t("membres_11310"),minWidth:320},{slug:"numberOfMinutesRequired",name:this.t("nombre_de_membr_60320_plural"),minWidth:320},{slug:"numberOfMinutesAssigned",name:this.t("nombre_de_membr_87779_plural"),minWidth:320},{slug:sp.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:320},{slug:sp.Conditions,name:this.t("conditions_77756"),minWidth:320},{slug:sp.Address,name:this.t("Address"),isSearchable:!0,minWidth:240},{slug:sp.Layer,name:this.t("Layer"),minWidth:180},{slug:sp.Traces,name:this.t("Traces"),minWidth:240},{slug:sp.Zoom,name:this.t("Zoom"),isSearchable:!0,minWidth:180},{slug:sp.Latitude,name:this.t("latitude_46176"),isSearchable:!0,minWidth:180},{slug:sp.Longitude,name:this.t("longitude_01695"),isSearchable:!0,minWidth:180},{slug:sp.Color,name:this.t("Color"),isSearchable:!0,width:80},{slug:sp.Icon,name:this.t("ic_ne_55554"),width:80},{slug:sp.IconColor,name:this.t("ic_ne_et_couleu_54485"),width:80},{slug:sp.State,name:this.t("statut_des_ress_73550"),minWidth:240},{slug:sp.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:sp.CheckedInRate,name:this.t("taux_de_pointag_87285"),minWidth:240},{slug:sp.CheckedOutRate,name:this.t("taux_de_d_point_88315"),minWidth:240},{slug:sp.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:sp.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:ht.CreatedAt,minWidth:180},{slug:sp.Leaders,name:this.t("responsables_de_54941"),isSearchable:!0,minWidth:320},{slug:sp.CategoryLeaders,name:this.t("responsables_de_22220"),isSearchable:!0,minWidth:320}];return t&&n.push({slug:sp.WeezeventIsSynchronized,name:this.t("WeezeventIsSynchronized"),minWidth:180},{slug:sp.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),minWidth:180}),n.concat(this.customFieldsToPossibleColumns(e))}};var dp;rp=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(ip=void 0!==Qd&&Qd)?ip:Object,"function"==typeof(op=void 0!==jl&&jl)?op:Object,"function"==typeof(ap=void 0!==Ai&&Ai)?ap:Object])],rp),function(e){e.Id="id",e.WeezaccessPartner="weezaccessPartner",e.PrinterGroup="printerGroup",e.MediaType="mediaType",e.Document="document",e.CreatedBy="createdBy",e.CreatedAt="createdAt",e.ActivationRange="activationRange",e.Status="status"}(dp||(dp={}));class lp extends mh{constructor(e,t,n){super(e,t,n)}getPrintTriggersPossibleColumns(){return[{slug:dp.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:St.Id,width:100},{slug:dp.WeezaccessPartner,name:this.t("op_rateur_weeza_31732"),isSearchable:!0,isSortable:!0,sortAttribute:St.WeezaccessPartner,minWidth:280},{slug:dp.PrinterGroup,name:this.t("printing_locati_10729"),isSearchable:!0,isSortable:!0,sortAttribute:St.PrinterGroup,minWidth:200},{slug:dp.MediaType,name:this.t("type_d_impressi_00431"),isSortable:!0,sortAttribute:St.MediaType,minWidth:160},{slug:dp.Document,name:this.t("document_87149"),isSearchable:!0,isSortable:!0,sortAttribute:St.Document,minWidth:200},{slug:dp.CreatedBy,name:this.t("cr_par_41994"),minWidth:220},{slug:dp.CreatedAt,name:this.t("cr_le_85046"),isSortable:!0,minWidth:180,sortAttribute:St.CreatedAt},{slug:dp.ActivationRange,name:this.t("p_riode_d_activ_48213"),isSortable:!0,sortAttribute:St.ActivationRange,minWidth:280},{slug:dp.Status,name:this.t("State"),isSortable:!0,sortAttribute:St.Status,minWidth:140}]}}var cp,up,mp;function gp(e){return{includeComments:e.includes("comments"),includeDelegations:e.includes("delegations")||e.includes("delegations_categories"),includeDuplicatedFrom:e.includes("duplicatedFrom"),includeEmails:e.includes("campaigns_states"),includeEvents:e.includes("events")||e.includes("number_of_events"),includeForms:e.includes("forms")||e.includes("forms_inserted_at"),includeTags:e.includes("tags"),includeRoles:e.includes("roles")}}let hp=class extends mh{constructor(e,t,n){super(e,t,n)}getOrganizationUsersFilters(e,t,n){return[...this.getBaseFilters(n.customFields.nodes),...this.getEventsFilters(e),...this.getFormsFilters(e),...this.getPositionsFilters(),...this.getDelegationsFilters(e),...this.getEmailsFilters(e),...this.getCommentsFilters(e),{slug:"tag",name:this.t("Tag"),category:this.t("autres_99130"),fieldType:Ge.Select,needLoading:!0,organizationId:e,tagContext:Pt.UsersInfos},{slug:"sameEmail",name:this.t("nombre_de_profi_42316"),category:this.t("autres_99130"),fieldType:Ge.Number,hideEmpty:!0},{slug:"segments",name:this.t("fait_partie_de_44650"),category:this.t("autres_99130"),fieldType:Ge.Select,values:n.segmentsFolders.flatMap(e=>e.segments).filter(e=>e.id!==t),hideEmpty:!0},{slug:"isAdmin",name:this.t("est_administrat_15766"),category:this.t("autres_99130"),fieldType:Ge.Checkbox},{slug:"isLeader",name:this.t("est_responsable_27270"),category:this.t("autres_99130"),fieldType:Ge.Checkbox},{slug:"roles",name:this.t("r_les_61679"),category:this.t("autres_99130"),fieldType:Ge.Select,needLoading:!0,organizationId:e}]}getDelegationMembersFilters(e){return this.getBaseFilters(e)}getOrganizationUsersPossibleColumns(e){return[...this.getBaseColumns(),{slug:"duplicatedFrom",name:this.t("dupliqu_de_28582"),minWidth:240},{slug:"events",name:this.t("_v_nements_53672"),minWidth:320},{slug:"number_of_events",name:this.t("nombre_d_v_nem_14214"),width:230},{slug:"forms",name:this.t("formulaires_rem_62495"),minWidth:320},{slug:"forms_inserted_at",name:this.t("dates_de_rempli_65075"),minWidth:320},{slug:"delegations",name:this.t("d_l_gations_78318"),isSearchable:!0,minWidth:320},{slug:"delegations_categories",name:this.t("cat_gories_de_d_45259"),minWidth:320},{slug:"inserted_at",name:this.t("date_d_inscript_31369"),isSortable:!0,sortAttribute:Gt.InsertedAt,width:230},{slug:"last_seen_at",name:this.t("date_de_derni_r_38795"),isSortable:!0,sortAttribute:Gt.LastSeenAt,width:230},{slug:"campaigns_states",name:this.t("statut_des_camp_25280"),minWidth:320},{slug:"tags",name:this.t("tags_79499"),isSearchable:!0,minWidth:320},{slug:"comments",name:this.t("commentaires_96492"),isSearchable:!0,minWidth:320},{slug:"roles",name:this.t("r_les_61679"),minWidth:320},...this.customFieldsToPossibleColumns(e)]}getDelegationMembersPossibleColumns(e){return[...this.getBaseColumns(),...this.customFieldsToPossibleColumns(e)]}getBaseColumns(){return[{slug:"name",name:this.t("full_name"),isSearchable:!0,isSortable:!0,sortAttribute:Gt.Name,minWidth:240},{slug:"email",name:this.t("e_mail_du_membr_69509"),isSearchable:!0,isSortable:!0,sortAttribute:Gt.Email,minWidth:180},{slug:"id",name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:Gt.Id,width:100},{slug:"local_id",name:this.t("id_sur_l_organi_45566"),isSearchable:!0,isSortable:!0,sortAttribute:Gt.LocalId,width:100}]}getBaseFilters(e){return[{slug:"email",name:this.t("Email"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Text,hideEmpty:!0},{slug:"registrationDate",name:this.t("date_d_inscript_31369"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Date,hideEmpty:!0},{slug:"id",name:this.t("id_51738"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Number,hideEmpty:!0},{slug:"local_id",name:this.t("id_sur_l_organi_45566"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Number,hideEmpty:!0},{slug:"lastSeenAt",name:this.t("date_de_derni_r_38795"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Datetime},{slug:"duplicatedFrom",name:this.t("est_dupliqu_62764"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Checkbox,hideEmpty:!0},...this.customFieldsToFilters(e)]}getEventsFilters(e){return[{slug:"event",name:this.t("_v_nement_22345"),category:this.t("Event"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"numberOfEvents",name:this.t("nombre_d_v_nem_14214"),category:this.t("Event"),fieldType:Ge.Number,hideEmpty:!0}]}getFormsFilters(e){return[{slug:"forms",name:this.t("formulaires_rem_62495"),category:this.t("Form_plural"),fieldType:Ge.Select,needLoading:!0,organizationId:e},{slug:"formsInsertedAt",name:this.t("dates_de_rempli_65075"),category:this.t("Form_plural"),fieldType:Ge.Date,hideEmpty:!0,needLoading:!0,organizationId:e}]}getPositionsFilters(){return[{slug:"positionName",name:this.t("nom_de_la_missi_80169"),category:this.t("missions_63972"),fieldType:Ge.Text,hideEmpty:!0},{slug:"positionCategoryName",name:this.t("nom_de_la_cat_g_57279"),category:this.t("missions_63972"),fieldType:Ge.Text,hideEmpty:!0},{slug:"numberOfAssignments",name:this.t("nombre_d_affect_31455"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0}]}getDelegationsFilters(e){return[{slug:"delegation",name:this.t("fait_partie_de_32196"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,needLoading:!0,organizationId:e},{slug:"delegationCategory",name:this.t("inscrit_via_la_12241"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,needLoading:!0,organizationId:e},{slug:"isDelegationLeader",name:this.t("est_responsable_87662"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox}]}getEmailsFilters(e){return[{slug:"campaign",name:this.t("campagne_97871"),category:this.t("e_mails_09850"),fieldType:Ge.Campaign,needLoading:!0,organizationId:e},{slug:"emailBlacklist",name:this.t("ne_souhaite_plu_08853"),category:this.t("e_mails_09850"),fieldType:Ge.Checkbox,hideEmpty:!0}]}getCommentsFilters(e){return[{slug:"comments",name:this.t("commentaires_96492"),category:this.t("commentaires_96492"),fieldType:Ge.Text},{slug:"lastCommentAt",name:this.t("date_du_dernier_73554"),category:this.t("commentaires_96492"),fieldType:Ge.Date,hideEmpty:!0},{slug:"commentWrittenBy",name:this.t("commentaire_cr_96610"),category:this.t("commentaires_96492"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e}]}};function pp(e){return"production"===a.Development?1===e:2676===e}hp=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(cp=void 0!==Qd&&Qd)?cp:Object,"function"==typeof(up=void 0!==jl&&jl)?up:Object,"function"==typeof(mp=void 0!==Ai&&Ai)?mp:Object])],hp);var fp,Ip,_p,yp;function xp(e,t,n){return t===Ed.AccreditationsMatrix?{includeAccreditationProfile:!1,includeAccreditations:!1,includeAccreditationsMatrix:!0,includeAvailability:!1,includeComments:!1,includeCustomDocuments:!1,includeDelegation:!1,includeDuplicatedFrom:!1,includeEmails:!1,includeForms:!1,includeFormsUsersInfos:!1,includeNumberOfAccreditations:!1,includeNumberOfAssignments:!1,includeNumberOfAssignmentsDays:!1,includeNumberOfAvailableDays:!1,includePicture:!0,includePositions:!1,includePreassignedPositions:!1,includeRoles:!1,includeTags:!1,includeTeam:!1,includeTraces:!1,includeVolunteerMinutes:!1,includeWeezeventChecklists:!1,includeWeezeventUrls:!1,includeWishedPositions:!1}:t===Ed.Map?{includeAccreditationProfile:!1,includeAccreditations:!1,includeAccreditationsMatrix:!1,includeAvailability:!1,includeComments:!1,includeCustomDocuments:!1,includeDelegation:!1,includeDuplicatedFrom:!1,includeEmails:!1,includeForms:!1,includeFormsUsersInfos:!1,includeNumberOfAccreditations:!1,includeNumberOfAssignments:!1,includeNumberOfAssignmentsDays:!1,includeNumberOfAvailableDays:!1,includePicture:!1,includePositions:!1,includePreassignedPositions:!1,includeRoles:!1,includeTags:!1,includeTeam:!1,includeTraces:!0,includeVolunteerMinutes:!1,includeWeezeventChecklists:!1,includeWeezeventUrls:!1,includeWishedPositions:!1}:{includeAccreditationProfile:e.includes(yp.AccreditationProfile)||e.includes(yp.WishedAccreditationProfile),includeAccreditations:e.includes(yp.Accreditations)||e.includes(yp.AccreditationsCategories)||e.includes(yp.AccreditationsSlots)||e.includes(yp.WishedAccreditationSlots)||e.includes(yp.ScannedAccreditations)||e.includes("bracelet_a_delivrer"),includeAccreditationsMatrix:!1,includeAvailability:e.includes(yp.Availability),includeComments:e.includes(yp.Comments),includeCustomDocuments:e.some(Hh),includeDelegation:e.includes(yp.Delegations)||e.includes(yp.DelegationCategory)||e.includes(yp.DelegationBannerNumber),includeDuplicatedFrom:e.includes(yp.DuplicatedFrom),includeEmails:e.includes(yp.CampaignsStates),includeFormsUsersInfos:e.includes(yp.CompletedForms)||e.includes(yp.FormsInsertedAt)||e.some(e=>e.startsWith("form_inserted_at_"))||e.includes(yp.Availability)||e.includes(yp.TeamCode)||e.includes(yp.TeamMembers)||e.includes(yp.WishedAccreditationProfile),includeForms:e.includes(yp.CompletedForms)||e.includes(yp.FormsInsertedAt)||e.some(e=>e.startsWith("form_inserted_at_"))||e.includes(yp.Availability),includeNumberOfAccreditations:e.includes(yp.NumberOfAccreditations),includeNumberOfAssignments:e.includes(yp.NumberOfAssignments),includeNumberOfAssignmentsDays:e.includes(yp.NumberOfAssignmentsDays),includeNumberOfAvailableDays:e.includes(yp.NumberOfAvailableDays),includePicture:e.includes(yp.Name),includePositions:e.includes(yp.Positions)||e.includes(yp.PositionsCategories)||e.includes(yp.WishedPositions)||e.includes(yp.CheckedInPositions),includeRoles:e.includes(yp.Roles),includeTags:e.includes(yp.Tags),includeTeam:e.includes(yp.TeamCode)||e.includes(yp.TeamMembers),includeTraces:!1,includeVolunteerMinutes:e.includes(yp.VolunteerMinutes),includeWishedPositions:e.includes(yp.WishedPositions),includePreassignedPositions:e.includes(yp.PreassignedPositionsCategories)||e.includes(yp.PreassignedPositions),includeWeezeventChecklists:e.includes(yp.WeezaccessChecklists),includeWeezeventUrls:!0===n?.includeWeezeventUrls&&(e.includes(yp.WeezeventBarcodeId)||e.includes(yp.WeezeventShortTag))}}!function(e){e.AccreditationProfile="accreditation_profile",e.AccreditationState="accreditation_state",e.Accreditations="accreditations",e.AccreditationsCategories="accreditations_categories",e.AccreditationsSlots="accreditations_slots",e.Availability="availability",e.CampaignsStates="campaigns_states",e.CheckedInPositions="checed_in_positions",e.Comments="comments",e.CompletedForms="forms",e.DelegationBannerNumber="delegation_banner_number",e.DelegationCategory="delegation_category",e.Delegations="delegations",e.DuplicatedFrom="duplicatedFrom",e.Email="email",e.FormsInsertedAt="forms_inserted_at",e.Id="id",e.InsertedAt="inserted_at",e.LocalId="local_id",e.Name="name",e.NumberOfAccreditations="number_of_accreditations",e.NumberOfAssignments="number_of_assignments",e.NumberOfAssignmentsDays="number_of_assignments_days",e.NumberOfAvailableDays="number_of_available_days",e.OrganizationLocalId="organization_local_id",e.Positions="positions",e.PositionsCategories="positions_categories",e.PreassignedPositions="preassigned_positions",e.PreassignedPositionsCategories="preassigned_positions_categories",e.Roles="roles",e.ScannedAccreditations="scanned_accreditations",e.Tags="tags",e.TeamCode="teamCode",e.TeamMembers="teamMembers",e.VolunteerMinutes="volunteer_minutes",e.VolunteerRegistrationState="volunteer_registration_state",e.WeezaccessChecklists="weezevent_checklists",e.WeezeventBarcodeId="weezevent_barcode_id",e.WeezeventBarcodeVersion="weezevent_barcode_version",e.WeezeventPairedAt="weezevent_paired_at",e.WeezeventShortTag="weezevent_short_tag",e.WishedAccreditationProfile="wished_accreditation_profile",e.WishedAccreditationSlots="wished_accreditation_slots",e.WishedPositions="wished_positions"}(yp||(yp={}));let Sp=class extends mh{constructor(e,t,n){super(e,t,n)}getVolunteersFilters(e,t,n,i,o,{hasAccreditations:a,hasCampaigns:s,hasDelegations:r,hasForms:d,hasPositions:l,isWeezeventConnected:c}){return[...this.getBaseFilters(i),...this.getBarcodeFilters(),...this.getAvailabilitiesFilters(t,o),...l?this.getPositionsFilters(e,t,o):[],...a?this.getAccreditationsFilters(e,t,o):[],...r?this.getDelegationsFilters(e,t):[],...this.getSegmentsFilters(e,t,n,o),...d?this.getFormsFilters(t):[],...d?this.getTeamsFilters():[],...c?this.getWeezeventFilters(t):[],...this.getEmailsFilters(t,s),...this.getCommentsFilter(e,t),{slug:"tag",name:this.t("Tags"),category:this.t("autres_99130"),fieldType:Ge.Select,needLoading:!0,organizationId:e,eventId:t,tagContext:Pt.UsersInfos},{slug:"sameEmail",name:this.t("nombre_de_profi_42316"),category:this.t("autres_99130"),fieldType:Ge.Number,hideEmpty:!0},{slug:"possibleDuplicates",name:this.t("potentiel_doubl_87672"),category:this.t("autres_99130"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:"isLeader",name:this.t("est_responsable_19679"),category:this.t("autres_99130"),fieldType:Ge.Checkbox},{slug:"isPositionLeader",name:this.t("est_responsable_27270"),category:this.t("autres_99130"),fieldType:Ge.Checkbox},{slug:"isPositionCategoryLeader",name:this.t("est_responsable_91796"),category:this.t("autres_99130"),fieldType:Ge.Checkbox}]}getPositionMembersFilters(e,t,n,i){return[...this.getBaseFilters(n),...this.getAvailabilitiesFilters(t,i),...this.getPositionsFilters(e,t,i)]}getAccreditationMembersFilters(e,t,n,i,{hasDelegations:o}){return[...this.getBaseFilters(n),...this.getAccreditationsFilters(e,t,i),...o?this.getDelegationsFilters(e,t):[]]}getDelegationCategoryMembersFilters(e,t,n,i,o){return[...this.getBaseFilters(n),...this.getAccreditationsFilters(e,t,i),...o?this.getWeezeventFilters(t):[]]}getDelegationMembersFilters(e,t,n,i,o,a){return[...this.getBaseFilters(n),...o.slotDisplay===Et.Hide?[]:this.getAvailabilitiesFilters(t,i),...this.getAccreditationsFilters(e,t,i),...o.positionDisplay===At.None?[]:this.getPositionMembersFilters(e,t,n,i),...a?this.getWeezeventFilters(t):[]]}getVolunteersPossibleColumns(e,t,n,i,{hasAccreditations:o,hasCampaigns:a,hasCustomDocuments:s,hasDelegations:r,hasForms:d,hasPositions:l,isWeezeventConnected:c}){return[...this.getBaseColumns(t,{forDelegationsSpace:!1}),...s?this.getCustomDocumentsColumns(i):[],...d?this.getFormsColumns(n):[],...l?this.getPositionsColumns():[],...c?this.getWeezeventColumns():[],...o?this.getAccreditationsColumns(e):[],...this.getAvailabilitiesColumns(),...r?this.getDelegationsColumns(e):[],...a?[{slug:yp.CampaignsStates,name:this.t("statut_des_camp_25280"),minWidth:320}]:[],{slug:yp.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:320},{slug:yp.Comments,name:this.t("commentaires_96492"),isSearchable:!0,minWidth:320},{slug:yp.Roles,name:this.t("r_les_61679"),minWidth:320}]}getPositionMembersPossibleColumns(e){return[...this.getBaseColumns(e,{forDelegationsSpace:!1}),...this.getPositionsColumns()]}getAccreditationMembersPossibleColumns(e,t){return[...this.getBaseColumns(t,{forDelegationsSpace:!1}),...this.getAccreditationsColumns(e),...this.getDelegationsColumns(e)]}getDelegationCategoryMembersPossibleColumns(e,t,n,{hasCustomDocuments:i,isWeezeventConnected:o}){return[...this.getBaseColumns(t,{forDelegationsSpace:!1}),...i?this.getCustomDocumentsColumns(n):[],...this.getAccreditationsColumns(e),...this.getDelegationsColumns(e),...o?this.getWeezeventColumns():[],{slug:yp.CampaignsStates,name:this.t("statut_des_camp_25280")},{slug:yp.Delegations,name:this.t("Delegation"),isSearchable:!0}]}getDelegationMembersPossibleColumns(e,t,{customDocuments:n,forDelegationsSpace:i,isWeezeventConnected:o,positionDisplay:a,slotDisplay:s}){return[...this.getBaseColumns(t,{forDelegationsSpace:i}),...this.getCustomDocumentsColumns(n??[]),...this.getAccreditationsColumns(e),...a===At.None?[]:this.getPositionsColumns(),...s===Et.Hide?[]:this.getAvailabilitiesColumns(),...o?this.getWeezeventColumns():[],{slug:yp.CampaignsStates,name:this.t("statut_des_camp_25280")}]}getBaseColumns(e,{forDelegationsSpace:t}){return(0,bs.A)([{slug:yp.Email,name:this.t("e_mail_du_membr_69509"),isSearchable:!0,isSortable:!0,sortAttribute:qt.Email,minWidth:180},t?null:{slug:yp.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:qt.Id,width:100},t?null:{slug:yp.LocalId,name:this.t("id_sur_l_v_nem_01171"),isSearchable:!0,isSortable:!0,sortAttribute:qt.LocalId,width:100},t?null:{slug:yp.OrganizationLocalId,name:this.t("id_sur_l_organi_45566"),isSearchable:!0,isSortable:!0,sortAttribute:qt.OrganizationLocalId,width:100},t?null:{slug:yp.WeezeventBarcodeId,name:this.t("TicketId"),isSearchable:!0,minWidth:240},t?null:{slug:yp.WeezeventBarcodeVersion,name:this.t("version_du_code_15471"),minWidth:100},{slug:yp.Name,name:this.t("full_name"),isSearchable:!0,isSortable:!0,sortAttribute:qt.Name,minWidth:240},{slug:yp.InsertedAt,name:this.t("date_d_inscript_31369"),isSortable:!0,sortAttribute:qt.InsertedAt,width:240},t?null:{slug:yp.DuplicatedFrom,name:this.t("dupliqu_de_28582"),minWidth:240},...this.customFieldsToPossibleColumns(e)])}getAvailabilitiesColumns(){return[{slug:yp.Availability,name:this.t("disponibilit_s_49923"),minWidth:320}]}getCustomDocumentsColumns(e){return(0,vs.A)(e,e=>y(e.name)).map(e=>({slug:Yh(e.id),name:this.t("imprimer_1_75795",e.name),customDocument:e,minWidth:240}))}getFormsColumns(e){return[{slug:yp.CompletedForms,name:this.t("formulaires_rem_62495"),minWidth:320},{slug:yp.FormsInsertedAt,name:this.t("dates_de_rempli_65075"),minWidth:320},...(0,vs.A)(e,e=>y(e.name)).map(e=>({slug:`form_inserted_at_${e.id}`,name:this.t("date_de_remplis_00881",e.name),isSortable:!0,sortAttribute:`form_inserted_at_${e.id}`,minWidth:240})),{slug:yp.TeamCode,name:this.t("code_quipe_14296"),isSearchable:!0,isSortable:!0,sortAttribute:qt.TeamCode,minWidth:180},{slug:yp.TeamMembers,name:this.t("membres_de_l_q_00891"),minWidth:240}]}getPositionsColumns(){return[{slug:yp.NumberOfAssignments,name:this.t("nombre_d_affect_31455"),width:240},{slug:yp.NumberOfAssignmentsDays,name:this.t("nombre_de_jours_86280"),width:240},{slug:yp.NumberOfAvailableDays,name:this.t("nombre_de_jours_07962"),width:240},{slug:yp.Positions,name:this.t("missions_affect_97811"),minWidth:320},{slug:yp.PositionsCategories,name:this.t("cat_gories_de_m_93035"),minWidth:320},{slug:yp.VolunteerMinutes,name:this.t("nombre_de_minut_50497"),width:240},{slug:yp.VolunteerRegistrationState,name:this.t("status_d_affect_75769"),isSortable:!0,sortAttribute:qt.State,width:240},{slug:yp.WishedPositions,name:this.t("missions_souhai_23225"),minWidth:320},{slug:yp.PreassignedPositions,name:this.t("missions_pr_af_02950"),minWidth:320},{slug:yp.PreassignedPositionsCategories,name:this.t("cat_gories_pr_83825"),minWidth:320},{slug:yp.CheckedInPositions,name:this.t("missions_point_05292"),minWidth:320}]}getAccreditationsColumns(e){return(0,bs.A)([{slug:yp.Accreditations,name:this.t("accr_ditations_33155"),minWidth:320},{slug:yp.AccreditationsCategories,name:this.t("cat_gories_d_ac_37678"),minWidth:320},{slug:yp.AccreditationState,name:this.t("statut_d_accr_d_75527"),isSortable:!0,sortAttribute:qt.AccreditationState,width:240},{slug:yp.NumberOfAccreditations,name:this.t("nombre_d_accr_d_02452"),width:240},{slug:yp.WishedAccreditationSlots,name:this.t("accr_ditations_74375"),minWidth:320},{slug:yp.ScannedAccreditations,name:this.t("accr_ditations_52153"),minWidth:320},{slug:yp.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),minWidth:240},{slug:yp.WishedAccreditationProfile,name:this.t("profil_d_accr_d_63000"),minWidth:240},pp(e)?{slug:"bracelet_a_delivrer",name:this.t("bracelet_d_li_50372")}:null])}getWeezeventColumns(){return[{slug:yp.WeezeventShortTag,name:this.t("puce_50504"),isSearchable:!0,minWidth:180},{slug:yp.WeezeventPairedAt,name:this.t("appair_le_70213"),isSortable:!0,sortAttribute:qt.PairedAt,minWidth:180},{slug:yp.WeezaccessChecklists,name:this.t("listes_de_contr_55120"),minWidth:320}]}getDelegationsColumns(e){return(0,bs.A)([{slug:yp.Delegations,name:this.t("Delegation"),isSearchable:!0,isSortable:!0,sortAttribute:qt.Delegation,minWidth:240},{slug:yp.DelegationCategory,name:this.t("cat_gorie_de_d_18027"),minWidth:240},$g(e)?{slug:yp.DelegationBannerNumber,name:this.t("num_ro_de_bande_16203"),isSearchable:!0,width:100}:null])}getBaseFilters(e){return[{slug:"email",name:this.t("Email"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Text,hideEmpty:!0},{slug:"insertedAt",name:this.t("date_d_inscript_31369"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Date,hideEmpty:!0},{slug:yp.LocalId,name:this.t("id_sur_l_v_nem_01171"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Number,hideEmpty:!0},{slug:yp.OrganizationLocalId,name:this.t("id_sur_l_organi_45566"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Number,hideEmpty:!0},{slug:yp.DuplicatedFrom,name:this.t("est_dupliqu_62764"),category:this.t("champs_de_formu_64126"),fieldType:Ge.Checkbox,hideEmpty:!0},...this.customFieldsToFilters(e)]}getBarcodeFilters(){return[{slug:yp.WeezeventBarcodeId,name:this.t("TicketId"),category:"Weezevent",fieldType:Ge.Text,hideEmpty:!0},{slug:yp.WeezeventBarcodeVersion,name:this.t("version_du_code_15471"),category:"Weezevent",fieldType:Ge.Number,hideEmpty:!0}]}getAvailabilitiesFilters(e,t){return[{slug:"numberOfAvailableDays",name:this.t("nombre_de_jours_07962"),category:this.t("disponibilit_s_49923"),fieldType:Ge.Number,hideEmpty:!0},{slug:"wishedSlots",name:this.t("disponibilit_s_49923"),category:this.t("disponibilit_s_49923"),fieldType:Ge.DateTimeRange,startAt:t.startAt,endAt:t.endAt},{slug:"wishedSlotsCustom",name:this.t("disponibilit_s_26280"),category:this.t("disponibilit_s_49923"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:e},{slug:"numberOfWishedSlots",name:this.t("nombre_de_dispo_26405"),category:this.t("disponibilit_s_49923"),fieldType:Ge.Number,hideEmpty:!0}]}getPositionsFilters(e,t,n){return[{slug:"volunteerRegistrationState",name:this.t("statut_d_affect_57444"),category:this.t("missions_63972"),fieldType:Ge.Select,values:mi.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"position",name:this.t("missions_affect_97811"),category:this.t("missions_63972"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"hasOtherEventPosition",name:this.t("has_shift_on_ot_92375"),category:this.t("missions_63972"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:"positionSlotId",name:this.t("cr_neau_affect_50400_plural"),category:this.t("missions_63972"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"positionSlot",name:this.t("date_d_affectat_98566"),category:this.t("missions_63972"),fieldType:Ge.DateTimeRange,startAt:n.startAt,endAt:n.endAt},{slug:"positionCategory",name:this.t("cat_gories_de_m_93035"),category:this.t("missions_63972"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"numberOfAssignments",name:this.t("nombre_d_affect_31455"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"numberOfAssignmentsPerDay",name:this.t("nombre_d_affect_22087"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"numberOfAssignmentsDays",name:this.t("nombre_de_jours_86280"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"preassignedPosition",name:this.t("missions_pr_af_02950"),category:this.t("missions_63972"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"numberOfPreAssignments",name:this.t("nombre_de_pr_a_86516"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0},{slug:"preassignedPositionCategory",name:this.t("cat_gories_pr_83825"),category:this.t("missions_63972"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"wishedPositionsCategories",name:this.t("cat_gories_souh_80851"),category:this.t("missions_63972"),fieldType:Ge.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositionsCategories",name:this.t("nombre_de_cat_g_05961"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0},{slug:"wishedPositions",name:this.t("missions_souhai_23225"),category:this.t("missions_63972"),fieldType:Ge.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositions",name:this.t("nombre_de_missi_52579"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0},{slug:"wishedPositionsSlots",name:this.t("cr_neaux_souhai_90108"),category:this.t("missions_63972"),fieldType:Ge.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositionsSlots",name:this.t("nombre_de_cr_ne_28370"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0},{slug:"volunteersMinutes",name:this.t("nombre_de_minut_50497"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0},{slug:"volunteersMinutesDays",name:this.t("nombre_de_minut_89574"),category:this.t("missions_63972"),fieldType:Ge.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"checkInAt",name:this.t("point_le_93167"),category:this.t("missions_63972"),fieldType:Ge.Datetime,useLocalZone:!0},{slug:"checkOutAt",name:this.t("d_point_le_29289"),category:this.t("missions_63972"),fieldType:Ge.Datetime,useLocalZone:!0},{slug:"checkInState",name:this.t("statut_de_point_44328"),category:this.t("missions_63972"),fieldType:Ge.Select,values:$n.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"checkInAtPositionSlot",name:this.t("cr_neaux_point_71408"),category:this.t("missions_63972"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"checkOutAtPositionSlot",name:this.t("cr_neaux_d_poin_45477"),category:this.t("missions_63972"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"overlappingAssignments",name:this.t("affectations_se_49339"),category:this.t("missions_63972"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:"differentPositions",name:this.t("les_missions_af_61709"),category:this.t("missions_63972"),fieldType:Ge.Checkbox,hideEmpty:!0}]}getAccreditationsFilters(e,t,n){return(0,bs.A)([{slug:"accreditationState",name:this.t("statut_d_accr_d_75527"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,values:On.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"numberOfAccreditations",name:this.t("nombre_d_accr_d_02452"),category:this.t("accr_ditations_39450"),fieldType:Ge.Number,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"accreditation",name:this.t("accr_ditations_33155"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"hasOtherEventAccreditation",name:this.t("has_accreditati_31831"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:"accreditationCategory",name:this.t("cat_gories_d_ac_37678"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"wishedAccreditationsSlots",name:this.t("accr_ditations_74375"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedAccreditationsSlots",name:this.t("nombre_d_accr_d_92021"),category:this.t("accr_ditations_39450"),fieldType:Ge.Number,hideEmpty:!0},{slug:"accreditationSlotId",name:this.t("cr_neaux_accr_d_70934"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"accreditationSlot",name:this.t("date_d_accr_dit_26214"),category:this.t("accr_ditations_39450"),fieldType:Ge.Date,startAt:n.startAt,endAt:n.endAt,hideEmpty:!0},{slug:"scannedAccreditationsSlots",name:this.t("accr_ditations_52153"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"differentAccreditations",name:this.t("les_accr_ditati_88638"),category:this.t("accr_ditations_39450"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:yp.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,needLoading:!0,eventId:t},{slug:yp.WishedAccreditationProfile,name:this.t("profil_d_accr_d_63000"),category:this.t("accr_ditations_39450"),fieldType:Ge.Select,needLoading:!0,eventId:t}])}getDelegationsFilters(e,t){return(0,bs.A)([{slug:"delegation",name:this.t("inscrit_via_la_86398"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,needLoading:!0,eventId:t},{slug:"delegationCategory",name:this.t("inscrit_via_la_12241"),category:this.t("d_l_gations_78318"),fieldType:Ge.Select,needLoading:!0,organizationId:e,eventId:t},{slug:"isDelegationCategoryLeader",name:this.t("est_responsable_36610"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox},{slug:"isDelegationLeader",name:this.t("est_responsable_87662"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,needLoading:!0,eventId:t},$g(e)?{slug:yp.DelegationBannerNumber,name:this.t("num_ro_de_bande_16203"),category:this.t("d_l_gations_78318"),fieldType:Ge.Number}:null,{slug:"hasBeenInvitedToDelegation",name:this.t("a_re_u_le_lien_34327"),category:this.t("d_l_gations_78318"),fieldType:Ge.Checkbox,hideEmpty:!0}])}getSegmentsFilters(e,t,n,i){return[{slug:"segments",name:this.t("fait_partie_de_44650"),category:this.t("vues_personnali_80652"),fieldType:Ge.Select,values:i.segmentsFolders.flatMap(e=>e.segments).filter(e=>e.id!==n),hideEmpty:!0},{slug:"usersSegments",name:this.t("fait_partie_de_44893"),category:this.t("vues_personnali_80652"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"positionsSegments",name:this.t("affecter_une_10657"),category:this.t("vues_personnali_80652"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"accreditationsSegments",name:this.t("affecter_une_91431"),category:this.t("vues_personnali_80652"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"delegationsSegments",name:this.t("affecter_une_45240"),category:this.t("vues_personnali_80652"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,eventId:t}]}getFormsFilters(e){return[{slug:"forms",name:this.t("formulaires_rem_62495"),category:this.t("Form_plural"),fieldType:Ge.Select,needLoading:!0,eventId:e},{slug:"formsInsertedAt",name:this.t("dates_de_rempli_65075"),category:this.t("Form_plural"),fieldType:Ge.Date,hideEmpty:!0,needLoading:!0,eventId:e}]}getTeamsFilters(){return[{slug:"isTeam",name:this.t("est_inscrit_en_86193"),category:this.t("_quipes_18817"),fieldType:Ge.Checkbox,hideEmpty:!0},{slug:"teamCode",name:this.t("code_quipe_14296"),category:this.t("_quipes_18817"),fieldType:Ge.Text},{slug:"numberOfTeamMembers",name:this.t("nombre_de_membr_82302"),category:this.t("_quipes_18817"),fieldType:Ge.Number,hideEmpty:!0},{slug:"isTeamLeader",name:this.t("est_chef_d_qui_73792"),category:this.t("_quipes_18817"),fieldType:Ge.Checkbox,hideEmpty:!0}]}getWeezeventFilters(e){return[{slug:yp.WeezeventShortTag,name:this.t("puce_50504"),category:"Weezevent",fieldType:Ge.Text},{slug:yp.WeezeventPairedAt,name:this.t("appair_le_70213"),category:"Weezevent",fieldType:Ge.Datetime,useLocalZone:!0},{slug:yp.WeezaccessChecklists,name:this.t("listes_de_contr_55120"),category:"Weezevent",fieldType:Ge.Select,needLoading:!0,eventId:e}]}getEmailsFilters(e,t){return(0,bs.A)([t?{slug:"campaign",name:this.t("campagne_97871"),category:this.t("e_mails_09850"),fieldType:Ge.Campaign,needLoading:!0,eventId:e}:null,t?{slug:"campaignSentAt",name:this.t("date_d_envoi_de_84374"),category:this.t("e_mails_09850"),fieldType:Ge.Date,hideEmpty:!0,needLoading:!0,eventId:e}:null,{slug:"assignmentEmailSentAt",name:this.t("date_d_envoi_de_01614"),category:this.t("e_mails_09850"),fieldType:Ge.Date},{slug:"assignmentEmailState",name:this.t("statut_de_de_l_36346"),category:this.t("e_mails_09850"),fieldType:Ge.Select,values:zn.filter(e=>e!==Te.Queued).map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"accreditationEmailSentAt",name:this.t("date_d_envoi_de_74383"),category:this.t("e_mails_09850"),fieldType:Ge.Date},{slug:"accreditationEmailState",name:this.t("statut_de_l_e_m_97776"),category:this.t("e_mails_09850"),fieldType:Ge.Select,values:zn.filter(e=>e!==Te.Queued).map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"emailBlacklist",name:this.t("ne_souhaite_plu_08853"),category:this.t("e_mails_09850"),fieldType:Ge.Checkbox,hideEmpty:!0},t?{slug:"campaignReply",name:this.t("r_ponse_une_c_32448"),category:this.t("e_mails_09850"),fieldType:Ge.Text,needLoading:!0,eventId:e}:null])}getCommentsFilter(e,t){return[{slug:"comments",name:this.t("commentaires_96492"),category:this.t("commentaires_96492"),fieldType:Ge.Text},{slug:"lastCommentAt",name:this.t("date_du_dernier_73554"),category:this.t("commentaires_96492"),fieldType:Ge.Date,hideEmpty:!0},{slug:"commentWrittenBy",name:this.t("commentaire_cr_96610"),category:this.t("commentaires_96492"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t}]}};var vp;Sp=function(e,t,n,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}([(0,En._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",["function"==typeof(fp=void 0!==Qd&&Qd)?fp:Object,"function"==typeof(Ip=void 0!==jl&&jl)?Ip:Object,"function"==typeof(_p=void 0!==Ai&&Ai)?_p:Object])],Sp),function(e){e.AccreditationSlot="accreditationSlotId",e.Accreditations="accreditations",e.Action="Action",e.Campaign="campaign",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.CustomField="customField",e.ExecutedAt="executedAt",e.Frequency="frequency",e.Id="id",e.Name="name",e.PositionSlot="positionSlotId",e.Positions="positions",e.State="state",e.Trigger="trigger",e.VolunteersSegment="volunteersSegment"}(vp||(vp={}));class bp extends mh{constructor(e,t,n){super(e,t,n)}getWorkflowsFilters(e,t){return[{slug:vp.State,name:this.t("State"),category:this.t("automatisations_60045"),fieldType:Ge.Select,hideEmpty:!0,values:Ii.map(e=>({id:e,name:this.t(e)}))},{slug:vp.Trigger,name:this.t("d_clencheur_73493"),category:this.t("automatisations_60045"),fieldType:Ge.Select,hideEmpty:!0,values:_i.map(e=>({id:e,name:this.t(e)}))},{slug:vp.Action,name:this.t("action_44224"),category:this.t("automatisations_60045"),fieldType:Ge.Select,hideEmpty:!0,values:gi.map(e=>({id:e,name:this.t(e)}))},{slug:vp.Frequency,name:this.t("Frequency"),category:this.t("automatisations_60045"),fieldType:Ge.Select,hideEmpty:!0,values:hi.map(e=>({id:e,name:this.t(e)}))},{slug:vp.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("automatisations_60045"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:vp.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("automatisations_60045"),fieldType:Ge.Datetime,hideEmpty:!0},...t?[{slug:vp.AccreditationSlot,name:this.t("cr_neaux_accr_d_70934"),category:this.t("automatisations_60045"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:vp.PositionSlot,name:this.t("cr_neau_affect_50400_plural"),category:this.t("automatisations_60045"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t}]:[],{slug:vp.Campaign,name:this.t("campagne_97871"),category:this.t("automatisations_60045"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:vp.CustomField,name:this.t("CustomField"),category:this.t("automatisations_60045"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:vp.VolunteersSegment,name:this.t("vue_s_lectionn_21556"),category:this.t("automatisations_60045"),fieldType:Ge.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t}]}getWorkflowsPossibleColumns(){return[{slug:vp.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,width:100,sortAttribute:Jt.Id},{slug:vp.Name,name:this.t("nom_de_l_automa_04883"),isSearchable:!0,isSortable:!0,sortAttribute:Jt.Name,minWidth:240},{slug:vp.State,name:this.t("State"),minWidth:180},{slug:vp.Trigger,name:this.t("d_clencheur_73493"),minWidth:180},{slug:vp.Action,name:this.t("action_44224"),minWidth:180},{slug:vp.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:vp.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:Jt.CreatedAt,minWidth:180},{slug:vp.VolunteersSegment,name:this.t("vue_s_lectionn_21556"),isSortable:!0,sortAttribute:Jt.VolunteersSegment,minWidth:320},{slug:vp.ExecutedAt,name:this.t("ex_cut_e_le_99019"),isSortable:!0,sortAttribute:Jt.ExecutedAt,minWidth:180},{slug:vp.Accreditations,name:this.t("accr_ditations_39450"),minWidth:320},{slug:vp.Positions,name:this.t("missions_63972"),minWidth:320},{slug:vp.Campaign,name:this.t("campagne_97871"),minWidth:240},{slug:vp.CustomField,name:this.t("CustomField"),minWidth:240},{slug:vp.Frequency,name:this.t("Frequency"),minWidth:180}]}}const jp=new En.i0(e=>{e(am).toSelf().inSingletonScope(),e(Qd).toSelf().inSingletonScope(),e(jl).toSelf().inSingletonScope(),e(rm).toSelf().inSingletonScope(),e(hm).toSelf().inSingletonScope(),e(fm).toSelf().inSingletonScope(),e(Yg).toSelf().inSingletonScope(),e(Zg).toSelf().inSingletonScope()}),Ap=new En.i0(e=>{e(Gs).toSelf().inSingletonScope(),e(Ws).toSelf().inSingletonScope(),e(cr).toSelf().inSingletonScope(),e(hr).toSelf().inSingletonScope(),e(Ns).toSelf().inSingletonScope(),e(Ls).toSelf().inSingletonScope(),e(fr).toSelf().inSingletonScope(),e(_r).toSelf().inSingletonScope(),e(xr).toSelf().inSingletonScope(),e(Er).toSelf().inSingletonScope(),e(Or).toSelf().inSingletonScope(),e(Js).toSelf().inSingletonScope(),e(Dr).toSelf().inSingletonScope(),e(Yr).toSelf().inSingletonScope(),e(Hr).toSelf().inSingletonScope(),e(Qr).toSelf().inSingletonScope(),e(Jr).toSelf().inSingletonScope(),e(td).toSelf().inSingletonScope(),e(id).toSelf().inSingletonScope(),e(Ud).toSelf().inSingletonScope(),e(ud).toSelf().inSingletonScope(),e(kd).toSelf().inSingletonScope(),e($d).toSelf().inSingletonScope(),e(rd).toSelf().inSingletonScope(),e(Vr).toSelf().inSingletonScope(),e(Vd).toSelf().inSingletonScope(),e(Yd).toSelf().inSingletonScope(),e(Zd).toSelf().inSingletonScope(),e(_l).toSelf().inSingletonScope(),e(hl).toSelf().inSingletonScope(),e(xl).toSelf().inSingletonScope(),e(Wl).toSelf().inSingletonScope(),e(Zl).toSelf().inSingletonScope(),e(Ql).toSelf().inSingletonScope(),e(Jl).toSelf().inSingletonScope(),e(tc).toSelf().inSingletonScope(),e(ic).toSelf().inSingletonScope(),e(ac).toSelf().inSingletonScope(),e(rc).toSelf().inSingletonScope(),e(lc).toSelf().inSingletonScope(),e(uc).toSelf().inSingletonScope(),e(Tc).toSelf().inSingletonScope(),e(ir).toSelf().inSingletonScope(),e(sr).toSelf().inSingletonScope(),e($c).toSelf().inSingletonScope(),e(Nc).toSelf().inSingletonScope(),e(zc).toSelf().inSingletonScope(),e(Fc).toSelf().inSingletonScope(),e(Bc).toSelf().inSingletonScope(),e(Vc).toSelf().inSingletonScope(),e(qc).toSelf().inSingletonScope(),e(Kc).toSelf().inSingletonScope(),e(Hc).toSelf().inSingletonScope(),e(Xc).toSelf().inSingletonScope(),e(eu).toSelf().inSingletonScope(),e(cl).toSelf().inSingletonScope(),e(Rc).toSelf().inSingletonScope(),e(sl).toSelf().inSingletonScope(),e(uu).toSelf().inSingletonScope(),e(pu).toSelf().inSingletonScope(),e(tu).toSelf().inSingletonScope(),e(ru).toSelf().inSingletonScope(),e(yu).toSelf().inSingletonScope(),e(bu).toSelf().inSingletonScope(),e(Pu).toSelf().inSingletonScope(),e(ku).toSelf().inSingletonScope(),e(Lu).toSelf().inSingletonScope(),e(Uu).toSelf().inSingletonScope(),e(Gu).toSelf().inSingletonScope(),e(Wu).toSelf().inSingletonScope(),e(Yu).toSelf().inSingletonScope(),e(Zu).toSelf().inSingletonScope(),e(Ku).toSelf().inSingletonScope(),e(Ic).toSelf().inSingletonScope(),e(vc).toSelf().inSingletonScope(),e(yc).toSelf().inSingletonScope(),e(em).toSelf().inSingletonScope(),e(om).toSelf().inSingletonScope()}),Cp=new En.i0(e=>{e(Pl).toSelf().inSingletonScope(),e(mh).toSelf().inSingletonScope(),e(vh).toSelf().inSingletonScope(),e(Ih).toSelf().inSingletonScope(),e(Eh).toSelf().inSingletonScope(),e(Mh).toSelf().inSingletonScope(),e(Ph).toSelf().inSingletonScope(),e(Fh).toSelf().inSingletonScope(),e(Wh).toSelf().inSingletonScope(),e(np).toSelf().inSingletonScope(),e(hp).toSelf().inSingletonScope(),e(rp).toSelf().inSingletonScope(),e(lp).toSelf().inSingletonScope(),e(Sp).toSelf().inSingletonScope(),e(bp).toSelf().inSingletonScope()});function Ep(){const e=new En.mc,t=window.HEAVENT_TRANSLATIONS||{},n=window.HEAVENT_LANGUAGE;if(0===Object.keys(t).length)throw new Error("window.HEAVENT_TRANSLATIONS does not exist");if(!tl(n))throw new Error("window.HEAVENT_LANGUAGE is not valid");return e.bind(Ai).toConstantValue(new Ai(tl(n),t)),e.load(jp,Ap,Cp),e}const Tp=e=>(0,i.jsx)(Ci.Provider,{value:{container:Ep(),useQuery:fs,useMutation:hs,useExecuteQuery:Ra,useParams:_s,useHistory:ys,useLocation:xs,useLocalStorage:Ss},children:e.children}),Op=()=>((0,r.useEffect)(()=>{va().then(e=>{"true"===lo.LOG_TOKEN&&console.log(`"${ma}": "${e||""}"`)})},[]),null);var Rp=n(5338);const Mp=e=>{const t=wi(),n=$i();return(0,r.useEffect)(()=>{v(e.path)&&(e.replace?n.replace(e.path,e.state):n.push(e.path,e.state)),e.push&&n.push(e.push(t),e.state),e.onLoad&&e.onLoad()},[]),(0,i.jsx)("div",{})},Dp=e=>{const t=wi(),{user:n}=ms();return n&&e.shouldHaveUser||!n&&!e.shouldHaveUser?(0,i.jsx)(i.Fragment,{children:e.children}):(0,i.jsx)(Mp,{path:e.getRedirectPath(t),replace:!0})},wp={PLURAL:"accreditation-categories",SINGLE:"accreditation-category"},$p={PLURAL:"accreditations",SINGLE:"accreditation"},Pp={PLURAL:"slots",SINGLE:"slot"},Np="dashboard",kp="member",zp="members",Lp={ACCREDITATION_CATEGORIES:wp.PLURAL,ACCREDITATION_CATEGORY:e=>md([wp.SINGLE,e]),ACCREDITATIONS:$p.PLURAL,ACCREDITATION:e=>md([$p.SINGLE,e]),ACCREDITATION_SLOTS:Pp.PLURAL,ACCREDITATION_SLOT:e=>md([Pp.SINGLE,e])},Fp={ACCREDITATION_CATEGORY:({accreditationCategoryId:e,...t})=>md([Tm.EVENT(t),Lp.ACCREDITATION_CATEGORY(e)]),ACCREDITATION_CATEGORY_DASHBOARD:e=>md([Fp.ACCREDITATION_CATEGORY(e),Np]),ACCREDITATION_CATEGORY_MEMBERS:e=>md([Fp.ACCREDITATION_CATEGORY(e),zp])},Up={ACCREDITATIONS_IMPORT:e=>md([Tm.EVENT(e),Lp.ACCREDITATIONS,pd.IMPORT]),ACCREDITATIONS:e=>md([Tm.EVENT(e),Lp.ACCREDITATIONS]),ACCREDITATION:({accreditationId:e,...t})=>md([Tm.EVENT(t),Lp.ACCREDITATION(e)]),ACCREDITATION_DASHBOARD:e=>md([Up.ACCREDITATION(e),Np]),ACCREDITATION_MEMBERS:e=>md([Up.ACCREDITATION(e),zp]),ACCREDITATION_MEMBER:({userInfoId:e,...t})=>md([Up.ACCREDITATION_MEMBERS(t),kp,e]),ACCREDITATION_MEMBER_INFORMATION:e=>md([Up.ACCREDITATION_MEMBER(e),fd.INFORMATION])},Bp={ACCREDITATION_SLOT:({accreditationSlotId:e,...t})=>md([Gp.ACCREDITATION(t),Lp.ACCREDITATION_SLOT(e)]),ACCREDITATION_SLOT_DASHBOARD:e=>md([Bp.ACCREDITATION_SLOT(e),Np]),ACCREDITATION_SLOT_MEMBERS:e=>md([Bp.ACCREDITATION_SLOT(e),zp])},Gp={...Fp,...Up,...Bp},Vp={ITEMS:{POSITIONS_CATEGORIES:{PLURAL:"position-categories",SINGLE:"position-category"},POSITIONS:{PLURAL:"positions",SINGLE:"position"},POSITION_SLOTS:{PLURAL:"slots",SINGLE:"slot"}},ACTIONS:{IMPORT:{CSV:`${pd.IMPORT}/csv`}},SECTIONS:{PREASSIGNED_MEMBERS:"preassigned-members",PLANNING:"planning"}},Wp={POSITION_CATEGORIES:Vp.ITEMS.POSITIONS_CATEGORIES.PLURAL,POSITION_CATEGORY:e=>md([Vp.ITEMS.POSITIONS_CATEGORIES.SINGLE,e]),POSITIONS:Vp.ITEMS.POSITIONS.PLURAL,POSITION:e=>md([Vp.ITEMS.POSITIONS.SINGLE,e]),POSITION_SLOTS:Vp.ITEMS.POSITION_SLOTS.PLURAL,POSITION_SLOT:e=>md([Vp.ITEMS.POSITION_SLOTS.SINGLE,e])},qp={POSITION_CATEGORY:({positionCategoryId:e,...t})=>md([Tm.EVENT(t),Wp.POSITION_CATEGORY(e)]),POSITION_CATEGORY_DASHBOARD:e=>md([qp.POSITION_CATEGORY(e),fd.DASHBOARD]),POSITION_CATEGORY_MEMBERS:e=>md([qp.POSITION_CATEGORY(e),fd.MEMBERS]),POSITION_CATEGORY_PREASSIGNED_MEMBERS:e=>md([qp.POSITION_CATEGORY(e),Vp.SECTIONS.PREASSIGNED_MEMBERS])},Yp={POSITIONS:e=>md([Tm.EVENT(e),Wp.POSITIONS]),POSITION:({positionId:e,positionCategoryId:t,...n})=>md(t?[qp.POSITION_CATEGORY({positionCategoryId:t,...n}),Wp.POSITION(e)]:[Tm.EVENT(n),Wp.POSITION(e)]),POSITION_DASHBOARD:e=>md([Yp.POSITION(e),fd.DASHBOARD]),POSITION_MEMBERS:e=>md([Yp.POSITION(e),fd.MEMBERS]),POSITION_PREASSIGNED_MEMBERS:e=>md([Yp.POSITION(e),Vp.SECTIONS.PREASSIGNED_MEMBERS]),POSITION_PLANNING:e=>md([Yp.POSITION(e),Vp.SECTIONS.PLANNING]),POSITION_MEMBER:({userInfoId:e,...t})=>md([Yp.POSITION_MEMBERS(t),fd.MEMBER,e]),POSITION_MEMBER_INFORMATION:e=>md([Yp.POSITION_MEMBER(e),fd.INFORMATION]),POSITION_IMPORT_CSV:e=>md([Tm.EVENT(e),Vp.ACTIONS.IMPORT.CSV])},Hp={POSITION_SLOTS:e=>md([Yp.POSITION(e),Wp.POSITION_SLOTS]),POSITION_SLOT:({positionSlotId:e,...t})=>md([Yp.POSITION(t),Wp.POSITION_SLOT(e)])},Zp={...qp,...Yp,...Hp},Kp="/auth",Qp=`${Kp}/sign-in`,Xp=`${Kp}/sign-up`,Jp="/backoffice",ef=e=>`${Km.ORGANIZATION({organizationId:e})}/parameters`,tf=(e,t,n,i)=>`${Zp.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/check-members`,nf=(e,t,n,i)=>`${Zp.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/members`,of=(e,t)=>`${Tm.EVENT({organizationId:e,eventId:t})}/volunteers`,af=(e,t)=>`${of(e,t)}/search`,sf=(e,t,n)=>`${af(e,t)}/volunteer/${n}`,rf=(e,t,n)=>`${of(e,t)}/${n}`,df=(e,t,n,i)=>`${rf(e,t,n)}/volunteer/${i}`,lf=(e,t,n,i)=>`${rf(e,t,n)}/volunteer-panel/${i}`,cf=(e,t)=>`${Tm.EVENT({organizationId:e,eventId:t})}/emails`,uf=(e,t)=>`${Tm.EVENT({organizationId:e,eventId:t})}/options`,mf=(e,t)=>`${Tm.EVENT({organizationId:e,eventId:t})}/dashboard`,gf={HOME:`/${gd}`,UNSUBSCRIBE_EMAIL:"/unsubscribe-email",USER_UPDATE_BY_TICKET_ID:(e,t)=>`/organization/${e}/update-by-ticket-id/field/${t}`,USER_FIELD_UPDATE:(e,t,n,i)=>`/organization/${e}/user/${t}/field/${n}/update/${i}`,USER_EVENT_UNREGISTER:(e,t,n)=>`/organization/${e}/user/${t}/event/${n}/unregister`,USER_CHECK_IN:(e,t)=>`/organization/${e}/user/${t}/check-in`,USER_CHECK_OUT:(e,t)=>`/organization/${e}/user/${t}/check-out`,AUTH:Kp,AUTH_FORGOT_PASSWORD:`${Kp}/forgot-password`,AUTH_SIGN_IN:Qp,AUTH_SIGN_UP:Xp,AUTH_SIGN_IN_EMAIL:`${Qp}/email`,AUTH_SIGN_IN_CODE:`${Qp}/code`,AUTH_SIGN_UP_CREDENTIALS:`${Xp}/credentials`,AUTH_SIGN_UP_CODE:`${Xp}/code`,COGNITO_CALLBACK:"/cognito-callback",MAGIC_LINK:(e,t)=>`/magic-link/${e}/${t}`,ACCEPT_TERMS_AND_CONDITIONS:e=>`${Km.ORGANIZATION({organizationId:e})}/accept-terms-and-conditions`,BACKOFFICE:Jp,BACKOFFICE_ORGANIZATIONS:`${Jp}/organizations`,EDIT_BACKOFFICE_ORGANIZATION:e=>`${Jp}/organization/${e}/edit`,BACKOFFICE_INVOICES:`${Jp}/invoices`,ORGANIZATION_PARAMETERS:ef,ORGANIZATION_PARAMETERS_PROFILE:e=>`${ef(e)}/profile`,ORGANIZATION_PARAMETERS_INFOS:e=>`${ef(e)}/general`,ORGANIZATION_PARAMETERS_TEAM:e=>`${ef(e)}/team`,ORGANIZATION_PARAMETERS_GROUPS:e=>`${ef(e)}/groups`,CREATE_ORGANIZATION_PARAMETERS_GROUP:e=>`${ef(e)}/groups/create`,EDIT_ORGANIZATION_PARAMETERS_GROUP:(e,t)=>`${ef(e)}/groups/group/${t}/edit`,ORGANIZATION_PARAMETERS_ROLES:e=>`${ef(e)}/roles`,CREATE_ORGANIZATION_PARAMETERS_ROLE:e=>`${ef(e)}/roles/create`,EDIT_ORGANIZATION_PARAMETERS_ROLE:(e,t)=>`${ef(e)}/roles/role/${t}/edit`,ORGANIZATION_PARAMETERS_EMAILS:e=>`${ef(e)}/emails`,CREATE_ORGANIZATION_PARAMETERS_EMAILS_SENDERS:e=>`${ef(e)}/emails/senders/create`,EDIT_ORGANIZATION_PARAMETERS_EMAILS_SENDERS:(e,t)=>`${ef(e)}/emails/senders/${t}/edit`,ORGANIZATION_PARAMETERS_EMAILS_SENDERS:e=>`${ef(e)}/emails/senders`,ORGANIZATION_PARAMETERS_EMAILS_SENDERS_PREVIEW:(e,t)=>`${ef(e)}/emails/senders/${t}/preview`,ORGANIZATION_PARAMETERS_EMAILS_DNS:e=>`${ef(e)}/emails/dns`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE:e=>`${ef(e)}/delegations-space`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_DESIGN:e=>`${ef(e)}/delegations-space/design`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_INTEGRATION:e=>`${ef(e)}/delegations-space/integration`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_EMAILS:e=>`${ef(e)}/delegations-space/emails`,ORGANIZATION_PARAMETERS_CATEGORIES:e=>`${ef(e)}/categories`,ORGANIZATION_PARAMETERS_CATEGORIES_CUSTOM_FIELDS:e=>`${ef(e)}/categories/custom-fields`,ORGANIZATION_PARAMETERS_CATEGORIES_POSITIONS:e=>`${ef(e)}/categories/positions`,ORGANIZATION_PARAMETERS_CATEGORIES_ACCREDITATIONS:e=>`${ef(e)}/categories/accreditations`,ORGANIZATION_PARAMETERS_CATEGORIES_ACCREDITATIONS_PROFILES:e=>`${ef(e)}/categories/accreditation-profiles`,ORGANIZATION_PARAMETERS_CATEGORIES_DELEGATIONS:e=>`${ef(e)}/categories/delegations`,ORGANIZATION_PARAMETERS_TAGS:e=>`${ef(e)}/tags`,ORGANIZATION_PARAMETERS_TRANSLATIONS:e=>`${ef(e)}/translations`,ORGANIZATION_PARAMETERS_INVOICES:e=>`${ef(e)}/invoices`,ORGANIZATION_PARAMETERS_ACTIVITY:e=>`${ef(e)}/activity`,ORGANIZATION_PARAMETERS_SKIDATA:e=>`${ef(e)}/skidata`,ORGANIZATION_PARAMETERS_ORGANIZATION_SWITCH:e=>`${ef(e)}/organization-switch`,ORGANIZATION_PARAMETERS_DELETE_ACCOUNT:e=>`${ef(e)}/delete-account`,COMMUNITY_USERS_SEGMENT:(e,t)=>`${Km.ORGANIZATION({organizationId:e})}/community/users/${t}`,COMMUNITY_USERS_USER:(e,t,n)=>`${Km.ORGANIZATION({organizationId:e})}/community/users/${t}/user/${n}`,COMMUNITY_USERS_USER_INFORMATIONS:(e,t,n)=>`${Km.ORGANIZATION({organizationId:e})}/community/users/${t}/user/${n}/${fd.INFORMATION}`,COMMUNITY_USERS_DUPLICATES:e=>`${Km.ORGANIZATION({organizationId:e})}/community/users-duplicates`,COMMUNITY_EDIT_USER:(e,t)=>`${Km.ORGANIZATION({organizationId:e})}/community/user/${t}/edit`,COMMUNITY_EDIT_USER_FORM:(e,t,n)=>`${Km.ORGANIZATION({organizationId:e})}/community/user/${t}/edit/form/${n}`,COMMUNITY_VOLUNTEERS_IMPORT:e=>`${Km.ORGANIZATION({organizationId:e})}/community/import`,COMMUNITY_FILES_IMPORT:e=>`${Km.ORGANIZATION({organizationId:e})}/community/documents-import`,COMMUNITY_DELEGATIONS:e=>`${Km.ORGANIZATION({organizationId:e})}/community/delegations`,COMMUNITY_DELEGATIONS_SEGMENT:(e,t)=>`${Km.ORGANIZATION({organizationId:e})}/community/delegations/${t}`,COMMUNITY_DELEGATION:(e,t)=>`${Km.ORGANIZATION({organizationId:e})}/community/delegation/${t}`,COMMUNITY_CREATE_DELEGATION(e,t){let n=`${Km.ORGANIZATION({organizationId:e})}/community/create-delegation`;return t&&(n=`${n}/${t}`),n},COMMUNITY_EDIT_DELEGATION:(e,t)=>`${Km.ORGANIZATION({organizationId:e})}/community/delegation/${t}/edit`,CREATE_EVENT_WITH_ORGANIZATION(e){let t="/create-event";return e&&(t=`${t}/${e}`),t},CREATE_EVENT:e=>`${Km.ORGANIZATION({organizationId:e})}/create-event`,EVENTS_SEGMENT:(e,t)=>`${Km.ORGANIZATION({organizationId:e})}/events/${t}`,EVENT_DELEGATIONS_IMPORT:(e,t)=>`${Tm.EVENT({organizationId:e,eventId:t})}/delegations-import`,EVENT_VOLUNTEERS_IMPORT:(e,t)=>`${Tm.EVENT({organizationId:e,eventId:t})}/members-import`,EVENT_FILES_IMPORT:(e,t)=>`${Tm.EVENT({organizationId:e,eventId:t})}/documents-import`,EDIT_EVENT:(e,t)=>`${Tm.EVENT({organizationId:e,eventId:t})}/edit`,DASHBOARD:mf,DASHBOARD_EVENT_SWITCH:(e,t)=>`${mf(e,t)}/event-switch`,POSITION_MEMBERS_USER:(e,t,n,i,o)=>`${Zp.POSITION_MEMBERS({organizationId:e,eventId:t,positionCategoryId:n,positionId:i})}/${o}`,POSITION_MEMBERS_USER_INFORMATIONS:(e,t,n,i,o)=>`${Zp.POSITION_MEMBERS({organizationId:e,eventId:t,positionCategoryId:n,positionId:i})}/${o}/${fd.INFORMATION}`,EXPORT_POSITIONS_MAP:(e,t)=>`/export/event/${e}/positions/${t}/map`,POSITIONS_SEARCH:(e,t)=>`${Zp.POSITIONS({organizationId:e,eventId:t})}/search`,POSITIONS_SEGMENT:(e,t,n)=>`${Zp.POSITIONS({organizationId:e,eventId:t})}/${n}`,CREATE_POSITION(e,t,n){let i=`${Tm.EVENT({organizationId:e,eventId:t})}/create-position`;return n&&(i=`${i}/${n}`),i},POSITION_MAP:(e,t)=>`/position/${e}-${t}/map`,POSITION_SETTINGS:(e,t,n)=>`${Zp.POSITION({organizationId:e,eventId:t,positionId:n})}/settings`,EDIT_POSITION:(e,t,n)=>`${Zp.POSITION({organizationId:e,eventId:t,positionId:n})}/edit`,POSITION_SLOT_ASSIGN_VOLUNTEERS:(e,t,n,i)=>`${Zp.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/assign-volunteers`,POSITION_SLOT_MEMBERS:nf,POSITION_SLOT_MEMBERS_USER:(e,t,n,i,o)=>`${nf(e,t,n,i)}/${o}`,POSITION_SLOT_MEMBERS_USER_INFORMATIONS:(e,t,n,i,o)=>`${nf(e,t,n,i)}/${o}/${fd.INFORMATION}`,POSITION_SLOT_MEMBERS_CHECK_OPTIONS:(e,t,n,i)=>`${nf(e,t,n,i)}/check-options`,POSITION_SLOT_CHECK_MEMBERS_CHECK_IN:(e,t,n,i)=>`${tf(e,t,n,i)}/check-in`,POSITION_SLOT_CHECK_MEMBERS_CHECK_OUT:(e,t,n,i)=>`${tf(e,t,n,i)}/check-out`,POSITION_SLOT_CHECK_MEMBERS_RESET:(e,t,n,i)=>`${tf(e,t,n,i)}/reset`,VOLUNTEERS:of,VOLUNTEERS_SEARCH:af,VOLUNTEERS_SEARCH_USER:sf,VOLUNTEERS_SEARCH_USER_INFORMATIONS:(e,t,n)=>`${sf(e,t,n)}/${fd.INFORMATION}`,VOLUNTEERS_SEGMENT:(e,t,n)=>`${of(e,t)}/${n}`,VOLUNTEERS_LIST_USER:df,VOLUNTEERS_LIST_USER_INFORMATIONS:(e,t,n,i)=>`${df(e,t,n,i)}/${fd.INFORMATION}`,VOLUNTEERS_LIST_USER_PANEL:lf,VOLUNTEERS_LIST_USER_PANEL_ACCREDITATIONS:(e,t,n,i)=>`${lf(e,t,n,i)}/accreditations`,VOLUNTEERS_LIST_USER_PANEL_AVAILABILITIES:(e,t,n,i)=>`${lf(e,t,n,i)}/availabilities`,VOLUNTEERS_LIST_USER_PANEL_POSITIONS:(e,t,n,i)=>`${lf(e,t,n,i)}/positions`,VOLUNTEERS_LIST_USER_PANEL_TEAM:(e,t,n,i,o)=>`${lf(e,t,n,i)}/team/${o}`,EDIT_USER:(e,t,n)=>`${Tm.EVENT({organizationId:e,eventId:t})}/user/${n}/edit`,EDIT_USER_FORM:(e,t,n,i)=>`${Tm.EVENT({organizationId:e,eventId:t})}/user/${n}/edit/form/${i}`,EDIT_USER_MISSIONS:(e,t,n)=>`${Tm.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-missions`,EDIT_USER_MISSIONS_FORM:(e,t,n,i)=>`${Tm.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-missions/form/${i}`,EDIT_USER_SLOTS:(e,t,n)=>`${Tm.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-slots`,EDIT_USER_SLOTS_FORM:(e,t,n,i)=>`${Tm.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-slots/form/${i}`,EDIT_USER_ACCREDITATIONS:(e,t,n)=>`${Tm.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-accreditations`,EDIT_USER_ACCREDITATIONS_FORM:(e,t,n,i)=>`${Tm.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-accreditations/form/${i}`,ASSIGNMENTS:(e,t)=>`${Tm.EVENT({organizationId:e,eventId:t})}/assignments`,ASSIGNMENT:(e,t,n)=>`${Tm.EVENT({organizationId:e,eventId:t})}/assignment/${n}`,EDIT_ASSIGNMENT:(e,t,n)=>`${Tm.EVENT({organizationId:e,eventId:t})}/edit-assignment/${n}`,TEAM_ASSIGNMENT:(e,t,n)=>`${Tm.EVENT({organizationId:e,eventId:t})}/team-assignment/${n}`,PRE_ASSIGNMENT:(e,t,n)=>`${Tm.EVENT({organizationId:e,eventId:t})}/pre-assignment/${n}`,ACCREDITATIONS_ASSIGNMENTS:(e,t)=>`${Tm.EVENT({organizationId:e,eventId:t})}/accreditations-assignments`,ACCREDIT:(e,t,n)=>`${Tm.EVENT({organizationId:e,eventId:t})}/accredit/${n}`,EDIT_ACCREDIT:(e,t,n)=>`${Tm.EVENT({organizationId:e,eventId:t})}/edit-accredit/${n}`,EVENT_EMAILS:cf,EVENT_EMAILS_PARAMETERS:(e,t)=>`${cf(e,t)}/parameters`,OPTIONS:uf,OPTIONS_API:(e,t)=>`${uf(e,t)}/api`,OPTIONS_WEEZEVENT:(e,t)=>`${uf(e,t)}/weezevent`,ACCREDITATIONS_SEGMENT:(e,t,n)=>`${Gp.ACCREDITATIONS({organizationId:e,eventId:t})}/${n}`,CREATE_ACCREDITATION(e,t,n){let i=`${Tm.EVENT({organizationId:e,eventId:t})}/create-accreditation`;return n&&(i=`${i}/${n}`),i},EDIT_ACCREDITATION:(e,t,n)=>`${Gp.ACCREDITATION({organizationId:e,eventId:t,accreditationId:n})}/edit`,ACCREDITATION_MAP:(e,t)=>`/accreditation/${e}-${t}/map`,DELEGATIONS_SEGMENT:(e,t,n)=>`${hg.DELEGATIONS({organizationId:e,eventId:t})}/${n}`,CREATE_DELEGATION(e,t,n){let i=`${Tm.EVENT({organizationId:e,eventId:t})}/create-delegation`;return n&&(i=`${i}/${n}`),i},EDIT_DELEGATION:(e,t,n)=>`${hg.DELEGATION({organizationId:e,eventId:t,delegationId:n})}/edit`},hf=(e,t)=>`/volunteers/${e}-${t}`,pf=(e,t)=>`${hf(e,t)}/assignments`,ff=(e,t)=>`${hf(e,t)}/auth`,If=(e,t,n,i)=>`/magic-link/${e}/${t}/${n}/${i}`,_f=(e,t)=>`${hf(e,t)}/register`,yf=pf;function xf(e,t){return e&&!t.startsWith("/embed")?`/embed${t}`:t}const Sf=()=>{const{code:e,source:t,organizationId:n,eventId:i}=wi();return(0,r.useEffect)(()=>{const a=localStorage.getItem(Ia),s=localStorage.getItem(fa);if(v(a)&&v(s)&&v(e)&&v(t)){localStorage.removeItem(Ia),localStorage.removeItem(fa);const r=new pa.TU({Username:a,Pool:xa()});r.Session=s,r.setAuthenticationFlowType("CUSTOM_AUTH"),r.sendCustomChallengeAnswer(e,{async onSuccess(e){const o=e.getIdToken().getJwtToken();await Oa(Ma,{token:o}),n&&i&&t===Je.VolunteerRegister?location.href=_f(n,i):n&&i&&t===Je.VolunteerAssignments?location.href=yf(n,i):t===Je.App?location.href=gf.HOME:location.href="/"},onFailure(e){o("Could not sendCustomChallengeAnswer",e),location.href="/"}})}else location.href="/"},[]),null},vf=n.p+"img/asoFavicon-54a1d8b7694af9631875.png",bf=n.p+"img/faviconWeezcrew-d996db40808b25d12473.png",jf=n.p+"img/netflixFavicon-a36aceec7edf22da5a10.png",Af=n.p+"img/partageTaPassionFavicon-b06b908163009e73794c.png";function Cf(e){(0,r.useEffect)(()=>{const t=document.title;return document.title=(n=location.host,`${v(i=e)?`${i} | `:""}${function(e){return e===Xm?"Partage Ta Passion":e===ng?"One Piece":e===tg?"A.S.O.":Wd}(n)}`),()=>{document.title=t};var n,i},[e])}const Ef={PLURAL:"members",SINGLE:"member"},Tf={PLURAL:"profiles",SINGLE:"profile"},Of="accreditations",Rf="actions",Mf="availabilities",Df="campaigns",wf="changes",$f="comments",Pf="documents",Nf="events",kf="form",zf="forms",Lf="history",Ff="informations",Uf="messages",Bf="positions",Gf="scans",Vf="segments",Wf=e=>md([Ef.SINGLE,e]),qf=e=>md([Tf.SINGLE,e]),Yf={USER_PROFILE:({userInfoId:e,...t})=>md([Km.ORGANIZATION(t),qf(e)]),USER_PROFILES:e=>md([Km.ORGANIZATION(e),Tf.PLURAL]),ORGANIZATION_MEMBERS:e=>md([Km.ORGANIZATION(e),Ef.PLURAL]),MEMBERS:e=>md(["delegationId"in e?hg.DELEGATION(e):"eventId"in e&&e.eventId?Tm.EVENT(e):jm.COMMUNITY(e),Ef.PLURAL]),MEMBER:({userInfoId:e,...t})=>md(["eventId"in t&&t.eventId?Tm.EVENT(t):jm.COMMUNITY(t),Wf(e)]),MEMBER_INFORMATION:e=>md([Yf.MEMBER(e),Ff]),MEMBER_ACTIONS:e=>md([Yf.MEMBER(e),Rf]),MEMBER_AVAILABILITIES:e=>md([Yf.MEMBER(e),Mf]),MEMBER_COMMENTS:e=>md([Yf.MEMBER(e),$f]),MEMBER_HISTORY:e=>md([Yf.MEMBER(e),Lf]),MEMBER_HISTORY_CHANGES:e=>md([Yf.MEMBER(e),Lf,wf]),MEMBER_HISTORY_CAMPAIGNS:e=>md([Yf.MEMBER(e),Lf,Df]),MEMBER_HISTORY_EVENTS:e=>md([Yf.MEMBER(e),Lf,Nf]),MEMBER_HISTORY_FORMS:e=>md([Yf.MEMBER(e),Lf,zf]),MEMBER_HISTORY_SCANS:e=>md([Yf.MEMBER(e),Lf,Gf]),MEMBER_HISTORY_SEGMENTS:e=>md([Yf.MEMBER(e),Lf,Vf]),MEMBER_POSITIONS:e=>md([Yf.MEMBER(e),Bf]),MEMBER_ACCREDITATIONS:e=>md([Yf.MEMBER(e),Of]),MEMBER_FORMS:e=>md([Yf.MEMBER(e),zf]),MEMBER_FORM:e=>md([Yf.MEMBER(e),kf,e.formId]),MEMBER_FORM_EDIT:e=>Sd(Yf.MEMBER_FORM(e)),MEMBER_MESSAGES:e=>md([Yf.MEMBER(e),Uf]),MEMBER_DOCUMENTS:e=>md([Yf.MEMBER(e),Pf]),CREATE:e=>xd(Yf.MEMBERS(e))};function Hf(){return{history:$i(),params:wi(),translate:Oi()}}function Zf(e){try{return location.host===Xm&&e===og[Xm]}catch{return!1}}function Kf(e){try{return location.host===tg&&e===og[tg]}catch{return!1}}function Qf(e){return e?new Promise((t,n)=>{const i=new Image;i.onload=()=>{t(i)},i.onerror=()=>{n(new Error("Could not load image"))},i.src=e}):Promise.resolve(null)}function Xf(e){const t=$({colors:{...Fd(e)}});document.getElementById("heavent-react-hook")?.classList.add(t.toString())}const Jf=r.createContext({}),eI=e=>{const{data:t,isLoading:n}=Mi("query OrganizationPublic(\n $organizationId: OrganizationId!\n $loadDelegationsSpace: Boolean!\n $loadMembersSpace: Boolean!\n) {\n organization: organizationPublic(id: $organizationId) {\n delegationsSpaceDesign: spaceDesign(spaceType: DelegationSpace)\n @include(if: $loadDelegationsSpace) {\n ...DesignColors\n\n banner {\n url\n }\n\n logo {\n url\n }\n }\n\n membersSpaceDesign: spaceDesign(spaceType: MembersSpace) @include(if: $loadMembersSpace) {\n ...DesignColors\n\n banner {\n url\n }\n\n logo {\n url\n }\n }\n }\n}\n",{organizationId:e.organizationId,loadDelegationsSpace:e.loadDelegationsSpace,loadMembersSpace:e.loadMembersSpace},[Yo.DesignColorsFragment]);const[o,a]=r.useState(void 0),[s,d]=r.useState(void 0),[l,c]=r.useState(!0);return r.useEffect(()=>{t.organization&&(Xf(t.organization?.delegationsSpaceDesign?.colors??t.organization.membersSpaceDesign?.colors??{}),(async()=>{t.organization.delegationsSpaceDesign?(await Promise.all([Qf(t.organization.delegationsSpaceDesign?.banner?.url),Qf(t.organization.delegationsSpaceDesign?.logo?.url)]),a(t.organization.delegationsSpaceDesign?.banner?.url),d(t.organization.delegationsSpaceDesign?.logo?.url),c(!1)):t.organization.membersSpaceDesign?(await Promise.all([Qf(t.organization.membersSpaceDesign?.banner?.url),Qf(t.organization.membersSpaceDesign?.logo?.url)]),a(t.organization.membersSpaceDesign?.banner?.url),d(t.organization.membersSpaceDesign?.logo?.url),c(!1)):c(!1)})())},[t.organization]),(0,i.jsx)(Jf.Provider,{value:{bannerUrl:o,logoUrl:s},children:n||l||!0===e.isLoading?e.skeleton:e.children})};var tI=n(924),nI=n(952);const iI=(0,r.createContext)({}),oI=R("div",{variants:{height:{default:{height:"100%"},1:{minHeight:"$space$1"},2:{minHeight:"$space$2"},3:{minHeight:"$space$3"},4:{minHeight:"$space$4"},5:{minHeight:"$space$5"},6:{minHeight:"$space$6"},7:{minHeight:"$space$7"},8:{minHeight:"$space$8"},9:{minHeight:"$space$9"},10:{minHeight:"$space$10"},11:{minHeight:"$space$11"},12:{minHeight:"$space$12"},13:{minHeight:"$space$13"}},width:{default:{width:"100%"},1:{minWidth:"$space$1"},2:{minWidth:"$space$2"},3:{minWidth:"$space$3"},4:{minWidth:"$space$4"},5:{minWidth:"$space$5"},6:{minWidth:"$space$6"},7:{minWidth:"$space$7"},8:{minWidth:"$space$8"},9:{minWidth:"$space$9"},10:{minWidth:"$space$10"},11:{minWidth:"$space$11"},12:{minWidth:"$space$12"},13:{minWidth:"$space$13"}}},defaultVariants:{height:"default",width:"default"}});var aI=n(2695);const sI=e=>{const t={iconStyle:"solid"};switch(e.iconStyle){case"error":return(0,i.jsx)(_o,{className:"h-alert-icon",icon:"circle-exclamation",...t});case"warning":return(0,i.jsx)(_o,{className:"h-alert-icon",icon:"triangle-exclamation",...t});case"success":return(0,i.jsx)(_o,{className:"h-alert-icon",icon:"circle-check",...t});case"primary":case"gray":return(0,i.jsx)(_o,{className:"h-alert-icon",icon:"circle-info",...t});default:wr(e.iconStyle)}},rI=R(G,{borderRadius:"$1",alignItems:"flex-start",gap:"$2",padding:"$4","& i":{fontSize:"$textMd"},variants:{alertStyle:{error:{background:"$error50",border:"1px solid $error500",color:"$gray800","& i.h-alert-icon":{color:"$error500"}},warning:{background:"$warning50",border:"1px solid $warning500",color:"$gray800","& i.h-alert-icon":{color:"$warning500"}},success:{background:"$success50",border:"1px solid $success500",color:"$gray800","& i.h-alert-icon":{color:"$success500"}},primary:{background:"$primary50",border:"1px solid $primary500",color:"$gray800","& i.h-alert-icon":{color:"$primary500"}},gray:{background:"$gray50",border:"1px solid $gray500",color:"$gray800","& i.h-alert-icon":{color:"$gray500"}}}},defaultVariants:{alertStyle:"error"}}),dI=({min:e=2,max:t=6,textStyle:n="heading",children:o,...a})=>{t{const i=e?.parentElement;if(!i||n===t)return n;for(const e of Array(i.children))if(e[0]instanceof HTMLHeadingElement)return c(i,++n);return c(i,n)},[t]);return r.useEffect(()=>l(`h${c(s.current?.parentElement,e)}`),[e,t]),(0,i.jsx)(W,{ref:s,as:d,...a,textStyle:n,children:o})},lI=e=>{const{translate:t}=Hf();return(0,i.jsxs)(rI,{alertStyle:e.alertStyle,"aria-live":e["aria-live"]??"polite",role:"alert",width:e.width,children:[(0,i.jsx)(G,{align:"start",children:(0,i.jsx)(Li,{height:"20px",width:"20px",children:(0,i.jsx)(sI,{iconStyle:e.alertStyle})})}),(0,i.jsx)(G,{align:"start",css:{flex:"1",gap:"2px"},direction:"column",children:e.children}),e.onClose&&(0,i.jsx)(jo,{"aria-label":t("fermer_62479"),color:"invisible",css:{height:"20px",padding:0,width:"20px","& i":{color:"$gray500"}},textAlign:"center",onClick:e.onClose,children:(0,i.jsx)(_o,{icon:"xmark"})})]})},cI=({children:e})=>(0,i.jsx)(dI,{css:{color:"$gray900",fontWeight:"$medium",fontSize:"$textSm",lineHeight:"1.42857"},children:e}),uI=({children:e})=>(0,i.jsx)(i.Fragment,{children:e}),mI=e=>(0,i.jsxs)(lI,{alertStyle:"error","aria-live":"assertive",children:[(0,i.jsx)(cI,{children:e.title}),(0,i.jsx)(uI,{children:e.children})]});function gI(e){return e?(0,qo.A)(Object.values(e).map(e=>"string"==typeof e?e:Array.isArray(e)?(0,bs.A)(e).map(e=>gI(e)).flat():gI(e)).flat()):[]}const hI=e=>{const{translate:t}=Hf(),{formRenderProps:{errors:n,submitErrors:o},showErrors:a}=(0,r.useContext)(iI),s=gI((0,aI.A)({},n,o));return a&&h(s)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(mI,{title:t("form_has_errors_14074"),children:(0,i.jsx)("ul",{style:{margin:"0",paddingInlineStart:"var(--space-4)"},children:s.map((e,t)=>(0,i.jsx)("li",{children:e},t))})}),!0!==e.hideSpacer&&(0,i.jsx)(oI,{height:"6"})]}):null};function pI(e,t){Object.values(t.fields).forEach(e=>{e.data={...e.data,forceDisplayError:!0}})}const fI=e=>{const t=r.useRef(null),{setShowErrors:n}=r.useContext(iI),o=()=>{const t=e.formRenderProps.handleSubmit();return t?.catch(e=>{console.debug("Form submission failed:",e)}),t},a=i=>(i?.preventDefault?.(),e.formRenderProps.invalid?(n(!0),e.formRenderProps.form.mutators.forceErrors(),setTimeout(()=>{e.customErrorRef&&e.customErrorRef.current?(e.customErrorRef.current.scrollIntoView(),e.customErrorRef.current.scrollTop=0):!e.hideDefaultErrors&&t.current&&(t.current.scrollIntoView(),t.current.scrollTop=0)},100),!e.formRenderProps.hasValidationErrors&&e.formRenderProps.hasSubmitErrors?o():void 0):o());return(0,i.jsxs)(G,{ref:t,as:"form",onSubmit:a,...U(e),children:[!e.hideDefaultErrors&&!e.customErrorRef&&(0,i.jsx)(hI,{}),(0,i.jsx)("input",{style:{display:"none"},type:"submit",value:"Submit"}),e.render({...e.formRenderProps,handleSubmit:a})]})},II=e=>{const t=Ti(Zg),[n,o]=r.useState(!1);return(0,i.jsx)(nI.lV,{initialValues:e.initialValues,initialValuesEqual:e.initialValuesEqual??vl.A,mutators:{...e.mutators,...tI.A,forceErrors:pI},render:t=>(0,i.jsx)(iI.Provider,{value:{formRenderProps:t,showErrors:n,setShowErrors:o},children:(0,i.jsx)(fI,{...(0,L.A)(e,["direction","align","justify","wrap","gap","css","height","width"]),customErrorRef:e.customErrorRef,formRenderProps:t,hideDefaultErrors:e.hideDefaultErrors,render:e.render})}),validate:n=>e.schema?t.validateForForm(e.schema)(n):"function"==typeof e.validate?e.validate(n):{},onSubmit:async(t,n,i)=>{o(!1);const a=await e.onSubmit(t,n,i);return Object.keys(a||{}).length>0&&o(!0),a}})};var _I=n(9008);function yI(e){return e.data?.forceDisplayError&&e.invalid||e.touched&&!e.pristine&&e.invalid||!1}var xI=n(5664);function SI(){const[e]=(0,r.useState)(()=>(0,xI.A)("forminput-")),[t]=(0,r.useState)(()=>(0,xI.A)("forminputlabel-")),[n]=(0,r.useState)(()=>(0,xI.A)("forminputdesc-")),[i]=(0,r.useState)(()=>(0,xI.A)("forminputerror-"));return{inputId:e,labelId:t,descId:n,errorId:i}}const vI=({children:e,id:t})=>e?(0,i.jsx)(Li,{color:"gray500",fontSize:"textXs",id:t,children:e}):null,bI=e=>e.children?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{color:"error"===e.state?"error500":"gray500",fontSize:"textXs",id:e.id,role:"error"===e.state?"alert":void 0,children:e.children})]}):null,jI=({id:e,children:t,htmlFor:n,isClickable:o=!0})=>t?(0,i.jsx)("label",{htmlFor:n,id:e,style:{display:"block",cursor:"inherit",fontWeight:"$medium",marginBlockEnd:0},onClick:e=>{o||e.preventDefault()},children:(0,i.jsx)(Li,{color:"gray700",fontWeight:"medium",children:t})}):null,AI=R("div",{alignItems:"center",borderRadius:"$1",display:"flex",gap:"$space$2",padding:"0 $space$3",position:"relative",width:"100%","& input::placeholder":{color:"$gray500"},"&:focus-within":{border:"2px solid $primaryCustom500"},variants:{state:{active:{backgroundColor:"white",border:"1px solid $gray300",color:"$gray900"},disabled:{background:"$gray50",border:"1px solid $gray300",color:"$gray500"},error:{backgroundColor:"white",border:"1px solid $error500"},search:{backgroundColor:"$gray100",border:"1px solid $gray300",color:"$gray500"}},cursor:{default:{cursor:"default"},text:{cursor:"text"},pointer:{cursor:"pointer"}},height:{fixed:{height:"40px"},fluid:{minHeight:"40px"}}},defaultVariants:{state:"active",height:"fixed"}}),CI=r.forwardRef(({height:e,cursor:t,css:n,icon:o,children:a,state:s,onClick:r,rightIcon:d,rightText:l,onRightIconClick:c,...u},m)=>(0,i.jsxs)(AI,{ref:m,className:"h-styled-input-container",css:n,cursor:t,height:e,state:s,onClick:e=>{r?.(e)},...u,children:[o&&(0,i.jsx)(G,{css:{color:"$gray500"},role:"presentation",children:(0,i.jsx)(_o,{icon:o})}),a,"error"===s&&(0,i.jsx)(G,{className:"styled-input-container-circle-exclamation",css:{color:"$error500"},children:(0,i.jsx)(_o,{icon:"circle-exclamation"})}),d&&(0,i.jsx)(G,{css:{color:"$gray500",cursor:"function"==typeof c?"pointer":"inherit"},role:"presentation",onClick:e=>{c?.(e)},children:(0,i.jsx)(_o,{icon:d})}),v(l)&&(0,i.jsx)(Li,{css:{userSelect:"none"},font:"gray500 textSm regular",children:l})]}));CI.displayName="StyledInputContainer";const EI=r.forwardRef(({autoComplete:e,isEmail:t,shouldParseAsInt:n,css:o,label:a,description:s,hint:d,onRightIconClick:l,state:c,type:u,onChange:m,rightIcon:g,rightText:h,icon:p,treatIntNaNAsNull:f,...I},_)=>{const y=r.useRef(),x=r.useRef(),S=_??x,{inputId:b,descId:j,errorId:A}=SI();return(0,i.jsxs)(G,{ref:y,css:o,direction:"column",width:1,children:[(0,i.jsx)(jI,{htmlFor:b,children:a}),(0,i.jsx)(vI,{id:j,children:s}),(a||s)&&(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(CI,{cursor:"text",icon:p,rightIcon:g,rightText:h,state:c,onClick:()=>S.current?.focus(),onRightIconClick:e=>{To(e),l?.(e)},children:(0,i.jsx)(Li,{color:"inherit",css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%","&:disabled":{color:"$gray500"}},"& input::placeholder":{color:"search"===c?"$gray400":"$gray500",opacity:1},"& input::-ms-input-placeholder ":{color:"search"===c?"$gray400":"$gray500",opacity:1}},children:(0,i.jsx)("input",{ref:S,"aria-describedby":s?j:void 0,"aria-errormessage":"error"===c?A:void 0,"aria-invalid":"error"===c,autoComplete:e??"off",disabled:"disabled"===c,id:b,type:u??(t?"email":n?"number":"text"),onChange:e=>{if(t&&v(e.target.value))m(e.target.value.toLowerCase());else if(!0===n){const t=parseInt(e.target.value,10);isNaN(t)?m(f?null:0):m(t)}else m(e.target.value)},...I})})}),(0,i.jsx)(bI,{id:A,state:c,children:d})]})});EI.displayName="TextInput";const TI=({autoComplete:e,hint:t,shouldParseAsInt:n,name:o,state:a,...s})=>{const d=(0,r.useCallback)(e=>{switch(e){case ze.City:return"address-level1";case ze.DateOfBirth:return"bday";case ze.FirstName:return"given-name";case ze.LastName:return"family-name";case ze.PostalCode:return"postal-code";case ze.Street:return"street-address";case ze.Country:case ze.Language:case ze.Nationality:case ze.Phone:case ze.Picture:case ze.Sex:default:return}},[]),l=(0,r.useMemo)(()=>o.startsWith("formRegister.userInfo.fields.")?d(o.split(".").pop())??e:e,[o,e,d]),c=(0,r.useCallback)(e=>{const o=yI(e.meta);return(0,i.jsx)(EI,{autoComplete:l,hint:o?e.meta.error||e.meta.submitError:t,shouldParseAsInt:n??!1,state:o?"error":a,value:e.input.value,onBlur:e.input.onBlur,onChange:t=>{e.input.onChange(t)},onFocus:e.input.onFocus,...s})},[t,n,a,l,s]);return(0,i.jsx)(nI.D0,{name:o,parse:_I.A,render:c})},OI={AUTH_EMAIL:"heavent-auth-email",BACKOFFICE_INVOICES_COLUMNS:"heavent-backoffice-invoices-columns",BACKOFFICE_COLUMNS:"heavent-backoffice-columns",BACKOFFICE_LIMIT:"heavent-backoffice-limit",BACKOFFICE_PREDICATES:"heavent-backoffice-predicates",BACKOFFICE_SEARCH:"heavent-backoffice-search",BACKOFFICE_SORT:"heavent-backoffice-sort",CURRENT_EVENT_ID:"heavent-current-event-id",CURRENT_EVENT_NAME:"heavent-current-event-name",CURRENT_ORGANIZATION_ID:"heavent-current-organization-id",DELEGATIONS_SPACE_TAB:"heavent-delegations-space-tab",EVENT_ID:"heavent-event-id",HIDE_HUBSPOT:"hide-hubspot",ORGANIZATION_ID:"heavent-organization-id",ACCREDITATIONS_IMPORT_FORMATS:"heavent-accreditations-import-formats",ACCREDITATIONS_IMPORT_MAPPINGS:"heavent-accreditations-import-mappings",ACCREDITATIONS_IMPORT_MODE:"heavent-accreditations-import-mode",ACCREDITATIONS_IMPORT_PRESETS:e=>`heavent-accreditations-import-presets-${e}`,ACCREDITATIONS_PROFILES_IMPORT_FORMATS:"heavent-accreditations-profiles-import-formats",ACCREDITATIONS_PROFILES_IMPORT_MAPPINGS:"heavent-accreditations-profiles-import-mappings",ACCREDITATIONS_PROFILES_IMPORT_MODE:"heavent-accreditations-profiles-import-mode",ACCREDITATIONS_PROFILES_IMPORT_PRESETS:e=>`heavent-accreditations-profiles-import-presets-${e}`,EVENTS_IMPORT_FORMATS:"heavent-events-import-formats",EVENTS_IMPORT_MAPPINGS:"heavent-events-import-mappings",EVENTS_IMPORT_MODE:"heavent-events-import-mode",EVENTS_IMPORT_PRESETS:e=>`heavent-events-import-presets-${e}`,POSITIONS_IMPORT_FORMATS:"heavent-positions-import-formats",POSITIONS_IMPORT_MAPPINGS:"heavent-positions-import-mappings",POSITIONS_IMPORT_MODE:"heavent-positions-import-mode",POSITIONS_IMPORT_PRESETS:e=>`heavent-positions-import-presets-${e}`,VOLUNTEERS_IMPORT_FORMATS:"heavent-volunteers-import-formats",VOLUNTEERS_IMPORT_MAPPINGS:"heavent-volunteers-import-mappings",VOLUNTEERS_IMPORT_MODE:"heavent-volunteers-import-mode",VOLUNTEERS_IMPORT_PRESETS:e=>`heavent-volunteers-import-presets-${e}`,DELEGATIONS_IMPORT_FORMATS:"heavent-delegations-import-formats",DELEGATIONS_IMPORT_MAPPINGS:"heavent-delegations-import-mappings",DELEGATIONS_IMPORT_PRESETS:e=>`heavent-delegations-import-presets-${e}`,DELEGATIONS_IMPORT_MODE:"heavent-delegations-import-mode",DELEGATION_MEMBERS_IMPORT_FORMATS:"heavent-delegation-members-import-formats",DELEGATION_MEMBERS_IMPORT_MAPPINGS:"heavent-delegation-members-import-mappings",DELEGATION_MEMBERS_IMPORT_PRESETS:e=>`heavent-delegation-members-import-presets-${e}`,DELEGATION_MEMBERS_IMPORT_MODE:"heavent-delegation-members-import-mode"};var RI=n(2302);const MI=e=>{const t=Oi(),n=Pi(),o=Ti(Zg),a=Ti(_r),{mutate:s}=Va(),[d,l]=(0,r.useState)(0),[c,u]=(0,r.useState)(null),m=location.pathname.includes("/delegations")||Kf(e.organizationId),g=(0,r.useCallback)(async t=>{await Oa(Ma,{token:t}),m?(n.removeItem(OI.DELEGATIONS_SPACE_TAB),location.pathname=`${lo.HEAVENT_PUBLIC_URL.pathname}${yd(Km.ORGANIZATION_DELEGATIONS({organizationId:e.organizationId}))}`):location.pathname=`${lo.HEAVENT_PUBLIC_URL.pathname}${yd(Yf.USER_PROFILES({organizationId:e.organizationId}))}`},[m]),[h,p]=(0,r.useState)(0),[f,I]=(0,r.useState)(!1),[_,y]=(0,r.useState)(Date.now()),x=()=>{location.reload()},{connectionTitle:S,connectionSubtitle:v}=ad(e.organizationId);return(0,i.jsx)(II,{css:{...e.css},direction:"column",initialValues:{email:"",code:""},render:({handleSubmit:e,submitting:n})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Li,{color:"gray900",fontSize:{"@initial":"textXl","@tablet":"displaySm"},fontWeight:"semiBold",textAlign:{"@initial":"center","@desktop":"start"},children:t(m?S:"connexion_mon_39916")}),(0,i.jsx)(oI,{height:"3"}),(0,i.jsx)(Li,{color:"gray500",textAlign:{"@initial":"center","@desktop":"start"},children:t(m?v:"connecter_vous_19749")}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(TI,{autoComplete:"email",isEmail:!0,label:t("adresse_e_mail_60930"),name:"email",placeholder:t("entrez_votre_ad_42451"),state:1===d||f?"disabled":"active"}),1===d&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(TI,{autoComplete:"one-time-code",inputMode:"numeric",label:t("code_re_u_par_e_75150"),name:"code",pattern:"\\d*",placeholder:t("code_re_u_par_e_75150"),state:f?"disabled":void 0})]}),(0,i.jsx)(oI,{height:"6"}),f?(0,i.jsx)(jo,{textAlign:"center",onClick:x,children:t("recommencer_14712")}):(0,i.jsx)(jo,{isLoading:n,textAlign:"center",onClick:e,children:t(0===d?"recevoir_un_cod_82139":"se_connecter_63820")})]}),validate:o.validateForForm(a.signInSchema()),onSubmit:async n=>{if(0!==d){const{user:e,callbacks:i}=c;return Ea({code:n.code,user:e,callbacks:i}).then(g,e=>{if("RETRY"===e.type)return p(h+1),{code:t("le_code_n_est_p_95065",3-(h+1))};{let i;return Ta(e.message,n.email,_),I(!0),i=Vo.dw.fromMillis(Date.now()-_).as("minutes")>3?t("le_code_a_expir_45975"):t("le_code_n_est_p_12317"),{FORM_ERROR:i}}})}{await s({loginCodeEmail:{email:n.email,organizationId:e.organizationId,source:m?Je.DelegationsSpace:Je.MembersSpace}}),y(Date.now());const t=await Ca(n.email,RI.A,RI.A);u(t),l(1)}}})};function DI(e){const t=window.matchMedia(e),[n,i]=(0,r.useState)(t.matches);return(0,r.useEffect)(()=>{const e=()=>i(t.matches);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},[n,e]),n}function wI(){return DI(T.desktop)}function $I(){return DI(T.tablet)}const PI={Aso:{Aso:n(8301),HomeBackground:n(8144),Logo:n(0)},Blanks:{Accreditation:n(7008),Member:n(5594)},Maps:{GooglePlan:n(1416),GoogleSatellite:n(6954),IgnPlan:n(4025)},AvatarGroup:n(384),Background404:n(4236),FormPositionRanked:n(4628),FormPositionUnranked:n(1205),Google:n(1931),GoogleMaps:n(1446),Ign:n(9882),Login:n(2647),Login2x:n(2281),LogoWeezeventSquare:n(6041),NetflixWood:n(5095),UserProfile:n(8264),WeezConstruction:n(6400)},NI={Alert:n(2630),Check:n(3780),DnsBlank:n(1037),DnsWrongDomain:n(8184),Done:n(8652),Done2:n(3574),FileBlank:n(7619),FileCSV:n(9625),FileJPG:n(6751),FilePDF:n(9848),FilePNG:n(6959),FileZIP:n(539),RecrewteerMarker:n(8798),Sad:n(5376),WeezeventBlankHandGlobe:n(2599),WeezeventBlankMessages:n(6687),WeezeventBlankPerson:n(7648),WeezeventBlankSwissArmyKnife:n(4362)},kI=R("div",{display:"grid",variants:{align:{start:{alignItems:"start"},center:{alignItems:"center"},end:{alignItems:"end"}},gap:{1:{gap:"$1"},2:{gap:"$2"},3:{gap:"$3"},4:{gap:"$4"},5:{gap:"$5"},6:{gap:"$6"},7:{gap:"$7"},8:{gap:"$8"},9:{gap:"$9"},10:{gap:"$10"},11:{gap:"$11"},12:{gap:"$12"},13:{gap:"$13"}},columnGap:{1:{columnGap:"$1"},2:{columnGap:"$2"},3:{columnGap:"$3"},4:{columnGap:"$4"},5:{columnGap:"$5"},6:{columnGap:"$6"},7:{columnGap:"$7"},8:{columnGap:"$8"},9:{columnGap:"$9"},10:{columnGap:"$10"},11:{columnGap:"$11"},12:{columnGap:"$12"},13:{columnGap:"$13"}},rowGap:{1:{rowGap:"$1"},2:{rowGap:"$2"},3:{rowGap:"$3"},4:{rowGap:"$4"},5:{rowGap:"$5"},6:{rowGap:"$6"},7:{rowGap:"$7"},8:{rowGap:"$8"},9:{rowGap:"$9"},10:{rowGap:"$10"},11:{rowGap:"$11"},12:{rowGap:"$12"},13:{rowGap:"$13"}}}}),zI=r.forwardRef((e,t)=>{const n={gridTemplate:e.gridtemplate,gridTemplateColumns:e.gridtemplatecolumns,gridTemplateRows:e.gridtemplaterows};return e.height&&(n.height=F(e.height)),e.width&&(n.width=F(e.width)),(0,i.jsx)(kI,{role:"grid",...e,ref:t,css:{...n,...e.css}})});zI.displayName="Grid";const LI=e=>{const t=wI(),n=$I(),o=t?"720px 1fr":"1fr";return(0,i.jsxs)(zI,{gridtemplatecolumns:o,gridtemplaterows:"1fr",height:1,width:1,children:[t&&(0,i.jsx)(Li,{css:{background:`url(${PI.Aso.HomeBackground}) no-repeat`,backgroundSize:"cover",backgroundPosition:"center"}}),(0,i.jsxs)(G,{align:"center",css:{overflow:"hidden"},direction:"column",children:[(0,i.jsx)(oI,{height:"12"}),(0,i.jsx)(Li,{height:t?160:n?133:96,width:t?383:n?272:231,children:(0,i.jsx)("img",{height:"100%",src:PI.Aso.Logo,width:"100%"})}),(0,i.jsx)(oI,{height:{"@initial":"10","@tablet":"13"}}),e.children]})]})},FI=N({"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}),UI=r.memo(function(e){const t="circular"===e.variant?e.size:e.height,n="circular"===e.variant?e.size:e.width;return(0,i.jsx)(Li,{css:{animation:`${FI} 1.5s ease-in-out 0.5s infinite`,background:"$gray200",borderRadius:"circular"===e.variant?"50%":e.borderRadius,color:"transparent",...e.css},height:t,width:n,children:e.children})}),BI=()=>(0,i.jsx)(LI,{children:(0,i.jsxs)(G,{direction:"column",width:"$modalMd",children:[(0,i.jsx)(UI,{borderRadius:"$1",height:28,width:1}),(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(UI,{borderRadius:"$1",height:42,width:1}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(UI,{borderRadius:"$1",height:38,width:1}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(UI,{borderRadius:"$1",height:40,width:1})]})}),GI=()=>{const{organizationId:e}=wi();return(0,i.jsx)(eI,{loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:e,skeleton:(0,i.jsx)(BI,{}),children:(0,i.jsx)(LI,{children:(0,i.jsx)(MI,{css:{width:"100%",px:"$6","@tablet":{maxWidth:"100%",px:"$12"},"@desktop":{width:"$modalMd",px:"$3"}},organizationId:e})})})};function VI(e,t){return t.has("lang")?tl(t.get("lang"))||$t.En:e||tl(navigator.language)||$t.En}const WI=({css:e,children:t,hideIcon:n,to:o,...a})=>{const s=new URL(o.toString(),location.origin),r=n?void 0:["http:","https:"].includes(s.protocol)&&s.origin!==location.origin?"arrow-up-right-from-square":a.download?"arrow-down-to-bracket":void 0;return(0,i.jsx)(G,{align:"center",as:"span",css:{cursor:"pointer",fontWeight:"$medium","&:hover":{textDecoration:"underline"},...e},gap:"2",children:(0,i.jsxs)(fo,{to:s,...a,children:[t,r&&(0,i.jsx)(Li,{as:"span",css:{marginInlineStart:"$1"},children:(0,i.jsx)(_o,{icon:r})})]})})};WI.displayName="LinkText";const qI=e=>{const{translate:t}=Hf(),{user:n}=ms(),o=VI(n?.language,new URL(location.href).searchParams),a=(0,r.useMemo)(()=>o===$t.Fr?`${lo.HEAVENT_ASSETS_URL}/aso/cgus/cgu_fr.pdf`:o===$t.Es?`${lo.HEAVENT_ASSETS_URL}/aso/cgus/cgu_es.pdf`:`${lo.HEAVENT_ASSETS_URL}/aso/cgus/cgu_en.pdf`,[o]),s=(0,r.useMemo)(()=>o===$t.Fr?`${lo.HEAVENT_ASSETS_URL}/aso/cgus/confidentialite_fr.pdf`:o===$t.Es?`${lo.HEAVENT_ASSETS_URL}/aso/cgus/confidentialite_es.pdf`:`${lo.HEAVENT_ASSETS_URL}/aso/cgus/confidentialite_en.pdf`,[o]);return(0,i.jsxs)(G,{css:{alignItems:"center",background:"auth"===e.source?"#e20613":"transparent",color:"auth"===e.source?"white":"$gray500 ",fontWeight:"500",gap:"$4",py:"$4","& .h-dot":{display:"none"},"@tablet":{gap:"$7",justifyContent:"center",py:"10px","& .h-dot":{display:"block"}}},direction:{"@initial":"column","@tablet":"row"},width:1,children:[(0,i.jsx)(Li,{children:(0,i.jsx)(WI,{hideIcon:!0,to:a,children:t("aso_cgu")})}),(0,i.jsx)(Li,{className:"h-dot",children:"•"}),(0,i.jsx)(Li,{children:(0,i.jsx)(WI,{hideIcon:!0,to:s,children:t("aso_confidentialite")})})]})},YI=e=>(0,i.jsxs)(G,{align:"center",css:{background:"white",paddingTop:"64px","@desktop":{paddingTop:"80px"}},direction:"column",height:1,width:1,children:[(0,i.jsx)(Li,{height:68,width:185,children:(0,i.jsx)("img",{height:"100%",src:PI.Aso.Aso,width:"100%"})}),(0,i.jsx)(Li,{css:{minHeight:"148px","@desktop":{minHeight:"98px"}}}),(0,i.jsx)(G,{css:{width:"100%",px:"$6","@tablet":{px:"0",width:"360px"},"@desktop":{px:"0",width:"640px"}},children:e.children}),(0,i.jsx)(Li,{css:{flex:"1"}}),(0,i.jsx)(qI,{source:"auth"})]}),HI=()=>{const{params:{organizationId:e}}=Hf();return(0,i.jsx)(eI,{loadDelegationsSpace:!0,loadMembersSpace:!1,organizationId:e,skeleton:(0,i.jsx)(xo,{}),children:(0,i.jsx)(YI,{children:(0,i.jsx)(MI,{css:{width:"100%"},organizationId:e})})})},ZI=()=>{const{params:{organizationId:e}}=Hf(),{logoUrl:t}=r.useContext(Jf);return t?(0,i.jsx)(Li,{css:{background:`url(${t})`,backgroundSize:"cover"},height:$g(e)?68:120,width:$g(e)?185:120}):null},KI=()=>(0,i.jsx)(G,{css:{marginBottom:"$9","@tablet":{marginBottom:"$10"}},justify:"center",width:1,children:(0,i.jsx)(UI,{borderRadius:"$1",height:140,width:140})}),QI=R("div",{alignItems:"center",background:"$grayCustom50",display:"flex",flexDirection:"column",height:"100%",overflowY:"auto",padding:"$4",gap:"$7",paddingTop:"$10",width:"100%","@tablet":{padding:"$10"}}),XI={bd:!0,background:"white",padding:"$7 $4",width:"100%","@tablet":{padding:"$7"},"@desktop":{width:"$modalMd"}},JI=()=>(0,i.jsxs)(QI,{children:[(0,i.jsx)(KI,{}),(0,i.jsxs)(G,{css:XI,direction:"column",children:[(0,i.jsx)(UI,{borderRadius:"$1",height:28,width:1}),(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(UI,{borderRadius:"$1",height:42,width:1}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(UI,{borderRadius:"$1",height:38,width:1}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(UI,{borderRadius:"$1",height:40,width:1})]})]}),e_=e=>{const{organizationId:t}=wi();return(0,i.jsx)(eI,{loadDelegationsSpace:e.loadDelegationsSpace,loadMembersSpace:e.loadMembersSpace,organizationId:t,skeleton:(0,i.jsx)(JI,{}),children:(0,i.jsxs)(QI,{children:[(0,i.jsx)(ZI,{}),(0,i.jsx)(MI,{css:XI,organizationId:t})]})})},t_=e=>{const{params:{organizationId:t}}=Hf();return Zf(t)?(0,i.jsx)(GI,{}):Kf(t)?(0,i.jsx)(HI,{}):(0,i.jsx)(e_,{loadDelegationsSpace:e.loadDelegationsSpace,loadMembersSpace:e.loadMembersSpace})},n_=e=>`/v2/organization/${e}`,i_=(e,t)=>`${n_(e)}/member/${t}`,o_=({organizationId:e,userInfoId:t,eventId:n})=>n?`${i_(e,t)}/event/${n}`:`${i_(e,t)}/community`,a_=e=>n_(e),s_=e=>`${n_(e)}/profiles`,r_=(e,t)=>`${i_(e,t)}/campaigns`,d_=(e,t)=>`${i_(e,t)}/documents`,l_=o_,c_=(e,t,n)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/edit`,u_=(e,t,n)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/information`,m_=(e,t,n)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/availability`,g_=(e,t,n)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/positions`,h_=(e,t,n)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/assignments`,p_=(e,t,n)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations`,f_=(e,t,n)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/accreditations`,I_=(e,t,n)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/information/edit`,__=(e,t,n,i)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/information/edit/${i}`,y_=(e,t,n)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/availability/edit`,x_=(e,t,n,i)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/availability/edit/${i}`,S_=(e,t,n)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/positions/edit`,v_=(e,t,n,i)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/positions/edit/${i}`,b_=(e,t,n)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations/edit`,j_=(e,t,n,i)=>`${o_({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations/edit/${i}`,A_=(e,t,n)=>`${n_(e)}/event/${t}/form/${n}`,C_=(e,t)=>`${n_(e)}/form/${t}`,E_=(e,t,n,i)=>t?`${n_(e)}/event/${t}/form/${i}/delegation/${n}`:`${n_(e)}/form/${i}/delegation/${n}`,T_=(e,t,n,i)=>`${n_(e)}/event/${t}/form/${n}/team/${i}`,O_=()=>{const e=Yf.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"}),t=Yf.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId",formId:":formId"}),n=[l_({organizationId:":organizationId",userInfoId:":userInfoId"}),l_({organizationId:":organizationId",userInfoId:":userInfoId"}),l_({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"}),c_(":organizationId",":userInfoId",null),c_(":organizationId",":userInfoId",":eventId"),u_(":organizationId",":userInfoId",null),u_(":organizationId",":userInfoId",":eventId"),I_(":organizationId",":userInfoId",null),I_(":organizationId",":userInfoId",":eventId"),m_(":organizationId",":userInfoId",":eventId"),y_(":organizationId",":userInfoId",":eventId"),g_(":organizationId",":userInfoId",":eventId"),S_(":organizationId",":userInfoId",":eventId"),p_(":organizationId",":userInfoId",":eventId"),b_(":organizationId",":userInfoId",":eventId")],o=[__(":organizationId",":userInfoId",null,":formId"),__(":organizationId",":userInfoId",":eventId",":formId"),x_(":organizationId",":userInfoId",":eventId",":formId"),v_(":organizationId",":userInfoId",":eventId",":formId"),j_(":organizationId",":userInfoId",":eventId",":formId")];return(0,i.jsxs)(Is.dO,{children:[(0,i.jsx)(Is.rd,{exact:!0,from:"/v2/organization/:organizationId/event/:eventId/form/:formId/delegation/:delegationId",to:hg.DELEGATION_FORM({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(Is.rd,{exact:!0,from:"/v2/organization/:organizationId/form/:formId/delegation/:delegationId",to:hg.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(Is.rd,{exact:!0,from:"/v2/organization/:organizationId/event/:eventId/form/:formId",to:Tm.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"})}),(0,i.jsx)(Is.rd,{exact:!0,from:"/v2/organization/:organizationId/form/:formId",to:Km.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"})}),(0,i.jsx)(Is.rd,{exact:!0,from:"/v2/organization/:organizationId/delegations/auth",to:_d(Km.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))}),(0,i.jsx)(Is.rd,{exact:!0,from:s_(":organizationId"),to:yd(Yf.USER_PROFILES({organizationId:":organizationId"}))}),n.map(t=>(0,i.jsx)(Is.rd,{exact:!0,from:t,to:e},t)),o.map(e=>(0,i.jsx)(Is.rd,{exact:!0,from:e,to:t},e)),(0,i.jsx)(Is.rd,{exact:!0,from:h_(":organizationId",":userInfoId",":eventId"),to:Yf.MEMBER_POSITIONS({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"})}),(0,i.jsx)(Is.rd,{exact:!0,from:f_(":organizationId",":userInfoId",":eventId"),to:Yf.MEMBER_ACCREDITATIONS({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"})}),(0,i.jsx)(Is.rd,{exact:!0,from:r_(":organizationId",":userInfoId"),to:Yf.MEMBER_MESSAGES({organizationId:":organizationId",userInfoId:":userInfoId"})}),(0,i.jsx)(Is.rd,{exact:!0,from:d_(":organizationId",":userInfoId"),to:Yf.MEMBER_DOCUMENTS({organizationId:":organizationId",userInfoId:":userInfoId"})}),(0,i.jsx)(Is.rd,{exact:!0,from:C_(":organizationId",":formId"),to:Km.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"})}),(0,i.jsx)(Is.rd,{exact:!0,from:A_(":organizationId",":eventId",":formId"),to:Tm.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"})}),(0,i.jsx)(Is.rd,{exact:!0,from:T_(":organizationId",":eventId",":formId",":teamCode"),to:Tm.EVENT_TEAM_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId",teamCode:":teamCode"})}),(0,i.jsx)(Is.rd,{exact:!0,from:E_(":organizationId",null,":delegationId",":formId"),to:hg.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(Is.rd,{exact:!0,from:E_(":organizationId",":eventId",":delegationId",":formId"),to:hg.DELEGATION_FORM({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(Is.rd,{from:a_(":organizationId"),to:Km.ORGANIZATION({organizationId:":organizationId"})})]})},R_=({acceptCustomColours:e,css:t,footer:n,header:o,heading:a,subtitle:s,children:r,...d})=>(0,i.jsxs)(G,{as:z.Section,className:"card",css:{padding:"unset !important",bd:!0,inlineSize:"100%",backgroundColor:"$white","& .card":{backgroundColor:"$gray50","& .card__body":{padding:"$4 $5"}},...t},direction:"column",...d,children:[o||(a||s)&&(0,i.jsx)(G,{align:"center",as:z.Header,css:{borderBlockEnd:"1px solid $gray200",padding:"$6 $7 $5 $7"},gap:"3",children:(0,i.jsxs)(Li,{css:{flex:"1"},children:[a&&(0,i.jsx)(dI,{css:e?{color:"$grayCustom900"}:void 0,children:a}),s&&(0,i.jsx)(W,{css:e?{color:"$grayCustom500"}:void 0,textStyle:"subtitle",children:s})]})}),(0,i.jsx)(G,{className:"card__body",css:{gap:"$6",padding:"$6 $7","&:empty":{display:"none"}},direction:"column",children:r}),n&&(0,i.jsx)(G,{as:z.Footer,css:{borderBlockStart:"1px solid $gray200",padding:"$6","&:empty":{display:"none"}},gap:"3",children:n})]}),M_=e=>(0,i.jsx)(G,{css:{bd:!0,alignSelf:"stretch",alignItems:"flex-start",padding:"$4",background:"$gray50"},direction:"column",gap:"3",children:e.children});function D_(e){return{[`${e} p.h-small`]:{fontSize:"12px"},[`${e} h2`]:{fontSize:"20px",fontWeight:"$semiBold"},[`${e} h3`]:{fontSize:"18px",fontWeight:"$semiBold"},[`${e} h4`]:{fontSize:"16px",fontWeight:"$semiBold"},[`${e} a`]:{color:"$primary500"},[`${e} blockquote`]:{borderLeft:"3px solid $gray200",fontStyle:"italic",marginLeft:0,marginRight:0,px:"$4","& p":{margin:0,paddingBottom:"$2",paddingTop:"$2"}}}}const w_=e=>(0,i.jsx)(Li,{className:"h-rich-text",css:{...D_("&"),"& > p:first-child":{marginTop:0},"& > p:last-child":{marginBottom:0},"& figure":{margin:"auto","& img":{width:"100%"}},...e.css},dangerouslySetInnerHTML:{__html:e.text},width:1,onClick:e=>{const t=e.target;if(t){const n=t.closest("a");n&&(e.preventDefault(),window.open(n.getAttribute("href"),"_blank"))}}});function $_(){return DI(T.mobile)}const P_=e=>{const t=$_();return(0,i.jsxs)(G,{css:{bd:!0,alignSelf:"stretch",alignItems:"stretch",justifyContent:"space-between",padding:"$3 $4",background:"$white","@tablet":{alignItems:"center"}},direction:t?"column":"row",gap:"3",children:[(0,i.jsxs)(G,{direction:"column",gap:"4",children:[(0,i.jsxs)(G,{css:{flex:"1"},direction:t?"column":"row",gap:t?"1":"4",children:[(0,i.jsxs)(G,{direction:"column",children:[(0,i.jsx)(Li,{fontWeight:"medium",children:e.title}),e.subtitle&&(0,i.jsx)(w_,{css:{color:"$gray500"},text:e.subtitle.toString()})]}),!t&&(0,i.jsx)(Li,{css:{blockSize:"fit-content",inlineSize:"fit-content"},children:e.badge})]}),e.children&&(0,i.jsx)(G,{css:{flex:"1",overflow:"hidden"},gap:"8",children:e.children})]}),(0,i.jsx)(G,{gap:"3",children:e.button})]})},N_=({bannerUrl:e,featureFlags:t,isLoading:n})=>{const[o,a]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{(async()=>{v(e)&&(a(!0),await Qf(e),a(!1))})()},[e]),n||v(e)?o?(0,i.jsx)(UI,{css:{minHeight:"115px",width:"100%","@tablet":{borderRadius:"$2",minHeight:"230px"},"@desktop":{marginLeft:"auto",marginRight:"auto",minHeight:"360px",width:"$container"}}}):(0,i.jsx)(Li,{css:{background:`url(${e}) no-repeat center`,backgroundSize:"cover",minHeight:"115px",width:"100%","@tablet":{borderRadius:"$2",margin:t?.isV4?"$6 0":void 0,minHeight:"230px"},"@desktop":{marginLeft:"auto",marginRight:"auto",minHeight:"360px",width:"$container"}}}):null},k_="h-dropdown-open";function z_(e,t){e.dispatchEvent(new CustomEvent(k_,{bubbles:!0,detail:{uuid:t??""}}))}const L_=r.createContext({}),F_=e=>{const t=r.useRef(ga()),[n,o]=r.useState(e.isOpen??!1),[a,s]=r.useState(null),[d,l]=r.useState(null),c=r.useCallback(n=>{e.disabled||(o(n),e.onStateChange&&e.onStateChange(n),!0===n&&a&&z_(a,t.current))},[e.disabled,a,o,e.onStateChange]),u=r.useCallback(n=>{n.detail.uuid!==t.current&&!0!==e.doNotCloseOnOtherOpen&&c(!1)},[c]);return r.useEffect(()=>{e.isOpen!==n&&o(e.isOpen??!1)},[e.isOpen]),r.useEffect(()=>(document.addEventListener(k_,u),()=>{document.removeEventListener(k_,u)}),[u]),Ro(()=>{c(!1)}),function(){const e=r.useCallback(()=>{c(!1)},[]);r.useEffect(()=>(document.addEventListener("click",e,!1),()=>{document.removeEventListener("click",e,!1)}),[])}(),(0,i.jsx)(L_.Provider,{value:{isOpen:n,referenceElement:a,popperElement:d,setIsOpen:c,setReferenceElement:s,setPopperElement:l},children:e.children})};function U_(){return r.useContext(L_)}const B_=e=>(0,i.jsx)(Li,{css:{padding:"$2 $3"},font:"gray500 textXs semiBold",children:e.children}),G_=R("div",{display:"flex",flexDirection:"column","& + &":{borderTop:"1px solid $gray100"}}),V_=e=>r.Children.toArray(e).some(e=>(0,r.isValidElement)(e)&&e.type===r.Fragment?V_(e.props.children):Boolean(e)),W_=e=>V_(e.children)?(0,i.jsxs)(G_,{"aria-label":e.title,role:"group",children:[v(e.title)&&(0,i.jsx)(B_,{children:e.title}),e.children]}):null,q_=R("div",{alignItems:"center",display:"flex",fontSize:"$textSm",fontWeight:"$regular",minHeight:"40px",px:"$4",py:"$2",userSelect:"none",width:"100%",ellipsis:"",variants:{color:{default:{cursor:"pointer",color:"$gray700","&:hover":{background:"$primary50",color:"$primary500"}},disabled:{color:"$gray400",cursor:"not-allowed"},heading:{color:"$gray500",fontSize:"$textXs",fontWeight:"$semiBold",cursor:"default"},red:{cursor:"pointer",color:"$error700","&:hover":{background:"$error50"}}}},defaultVariants:{color:"default"}}),Y_=({children:e,color:t,css:n,download:o,to:a,onClick:s,target:r,role:d})=>"disabled"!==t&&a?(0,i.jsx)(fo,{download:o,target:r,to:a,onClick:e=>s?.(e),children:(0,i.jsx)(q_,{color:t||"default",css:n,children:e})}):(0,i.jsx)(q_,{color:t||"default",css:n,role:d??"menuitem",tabIndex:a?void 0:"presentation"!==d?0:void 0,onClick:e=>s?.(e),children:e}),H_=({css:e,children:t,color:n,download:o,icon:a,isDisabled:s=!1,onClick:r,to:d,target:l})=>(0,i.jsx)(Y_,{color:n,css:{cursor:s?"not-allowed":"pointer",opacity:s?"0.6":"inherit",...e},download:o,target:l,to:d,onClick:e=>{s||(z_(e.target),r?.(e))},children:(0,i.jsxs)(G,{align:"center",gap:"3",height:1,width:1,children:[(0,i.jsx)(G,{align:"center",height:1,justify:"start",width:16,children:(0,i.jsx)(_o,{icon:a})}),(0,i.jsx)(Li,{css:{flex:"1",ellipsis:""},children:t})]})});var Z_=n(832);const K_=e=>{const{isOpen:t,referenceElement:n,popperElement:o,setPopperElement:a}=U_(),{styles:s,attributes:d,update:l}=(0,Z_.E)(n,o,{placement:e.placement,modifiers:[{name:"offset",options:{offset:[0,e.offset??8]}}]}),c="match"===e.width?`${n?.getBoundingClientRect().width??240}px`:"number"==typeof e.width?`${e.width}px`:"fit-content";r.useEffect(()=>{l?.()},[l,t,n]),r.useEffect(()=>{if(n){const e=new ResizeObserver(()=>{l?.()});return e.observe(n),()=>{e.disconnect()}}return RI.A},[l,n]);const u=(0,i.jsx)(G,{ref:a,"aria-hidden":!t,"aria-orientation":e["aria-orientation"],css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$lg",display:t?"flex":"none",maxHeight:e.maxHeight?`${e.maxHeight}px`:void 0,overflowX:"hidden",overflowY:"auto",py:"$2",width:c,zIndex:"400",...e.css,...s.popper,"&:empty":{opacity:0}},direction:"column",id:e.id,role:"menu",onClick:e=>To(e,!1),...d.popper,tabIndex:-1,children:e.children});return t?e.renderOnPortal?(0,Oo.createPortal)(u,document.body):u:null},Q_=e=>{const{isOpen:t,setIsOpen:n,setReferenceElement:o}=U_(),a=e.children,s=e=>{To(e),n(!t),a.props.onClick?.(e)},d=r.cloneElement(r.Children.only(a),{ref(e){o(e)},onClick(e){e.preventDefault(),s(e)},onKeyPress(e){s(e)},tabIndex:0});return(0,i.jsx)(i.Fragment,{children:d})},X_=e=>{switch(e){case 16:return 7;case 24:return 10;case 32:return 14;case 40:return 16;case 48:return 18;case 56:return 20;case 64:return 24;case 88:return 30;case 96:return 36;case 110:return 40;case 160:return 48;case 310:return 120}},J_=e=>{const[t,n]=(0,r.useState)(v(e.image)?e.image:void 0);if((0,r.useEffect)(()=>{v(e.image)&&n(e.image)},[e.image]),v(t))return(0,i.jsx)("div",{style:{border:e.border,borderRadius:e.size+"px",height:`${e.size}px`,overflow:"hidden",width:`${e.size}px`},children:(0,i.jsx)("img",{alt:"Avatar",src:t,style:{height:`${e.size}px`,width:`${e.size}px`,verticalAlign:"baseline"}})});{const t=function(e,t){if(v(e))return Ng(e," ");if(v(t)){const[e]=t.split("@");return Ng(e,".")}return""}(e.name,e.email);return(0,i.jsx)("div",{style:{borderRadius:e.size+"px",height:e.size+"px",overflow:"hidden",width:e.size+"px"},children:(0,i.jsx)("div",{className:"h-avatar-initials",style:{alignItems:"center",background:zg(t),color:"white",display:"flex",fontSize:`${X_(e.size)}px`,height:"100%",justifyContent:"center",textTransform:"uppercase",width:"100%"},children:t})})}},ey=e=>{const{params:{organizationId:t,eventId:n,delegationId:o,userInfoId:a},translate:s}=Hf(),{data:d,loader:l}=Mi('query SpaceHeader($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n id\n name\n showMembersSpaceCommunity\n }\n\n user {\n userInfo(organizationId: $organizationId) {\n ...MemberRegistrationUserInfo\n firstName: fieldValue(slug: "firstName")\n\n events {\n id\n name\n }\n }\n }\n}\n',{organizationId:t},[Yo.MemberRegistrationUserInfoFragment]),c=$_(),u=Pi(),[m,g]=r.useState(!1),h=r.useMemo(()=>d.user?.userInfo,[d.user?.userInfo]);return l||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Li,{css:{flex:"1"}}),(0,i.jsxs)(F_,{"aria-label":s("menu_utilisateu_40033"),"aria-orientation":"vertical",isOpen:m,onStateChange:g,children:[(0,i.jsx)(Q_,{children:(0,i.jsxs)(G,{align:"center","aria-expanded":m,"aria-label":s("ouvrir_le_menu_47803"),css:{fontWeight:"$medium",color:"$gray800",fontSize:"$textSm",cursor:"pointer"},gap:"3",justify:"end",width:300,onClick:()=>document.getElementById("user-menu")?.focus(),children:[(0,i.jsx)(J_,{email:h?.email,image:h?.picture?.url,name:h?.name,size:32}),!c&&(0,i.jsx)(Li,{css:{maxWidth:"calc(100% - 66px)"},children:(0,i.jsx)(Li,{css:{ellipsis:!0},children:h?.name||h?.email})}),(0,i.jsx)("div",{children:m?(0,i.jsx)("i",{className:"far fa-angle-up"}):(0,i.jsx)("i",{className:"far fa-angle-down"})})]})}),(0,i.jsxs)(K_,{"aria-orientation":"vertical",id:"user-menu",maxHeight:500,placement:"bottom-end",width:300,children:[(0,i.jsx)(W_,{children:(0,i.jsx)(Y_,{children:(0,i.jsxs)(G,{align:"center",as:z.Nav,css:{cursor:"default"},gap:"3",width:1,children:[(0,i.jsx)(J_,{email:h?.email,image:h?.picture?.url,name:h?.name,size:32}),(0,i.jsxs)(Li,{css:{width:"calc(100% - 44px)"},children:[(0,i.jsx)(Li,{css:{ellipsis:!0},fontWeight:"semiBold",children:h?.name||h?.email}),v(h?.name)&&(0,i.jsx)(Li,{color:"gray500",css:{ellipsis:!0},children:h?.email})]})]})})}),(0,i.jsx)(W_,{children:d.organization.showMembersSpaceCommunity&&!o&&(0,i.jsx)(Y_,{children:(0,i.jsx)(fo,{to:o?hg.DELEGATION({organizationId:d.organization.id,delegationId:o}):Yf.MEMBER({organizationId:d.organization.id,userInfoId:a}),width:1,children:(0,i.jsx)(W,{css:{fontWeight:void 0===n&&d.organization.id===t?"bold":"inherit"},children:d.organization.name})})})}),(0,i.jsx)(W_,{children:!o&&d.user.userInfo.events.map(e=>(0,i.jsx)(Y_,{children:(0,i.jsx)(fo,{to:o?hg.DELEGATION({organizationId:d.organization.id,eventId:e.id,delegationId:o}):Yf.MEMBER({organizationId:t,eventId:e.id,userInfoId:a}),width:1,children:(0,i.jsx)(W,{css:{fontWeight:void 0!==n&&n===e.id?"bold":"inherit"},children:e.name})})},e.id))}),e.extraItems,(0,i.jsx)(W_,{children:(0,i.jsx)(Y_,{color:"red",onClick:()=>{u.removeItem(OI.DELEGATIONS_SPACE_TAB),ba()},children:s("se_d_connecter_74151")})})]})]})]})},ty=({additionalComponents:e,logoSrc:t,...n})=>{const{params:{organizationId:o,delegationId:a,userInfoId:s}}=Hf();return(0,i.jsxs)(G,{align:"center",as:"header",css:{backgroundColor:"white",px:"$6",position:"relative",borderBottom:"1px solid $gray200",justifyContent:"center"},height:65,width:1,children:[(0,i.jsxs)(G,{align:"center",css:{cursor:t?"pointer":"default",margin:"inherit",padding:"$4","& svg":{height:"50%"}},gap:"7",height:1,children:[t&&(0,i.jsx)(fo,{height:1,to:a?yd(Km.ORGANIZATION_DELEGATIONS({organizationId:o})):Yf.USER_PROFILE({organizationId:o,userInfoId:s}),children:t&&(0,i.jsx)("img",{height:"100%",src:t,width:"auto"})}),e]}),(0,i.jsx)(Is.qh,{path:[hg.DELEGATION({delegationId:":delegationId",organizationId:":organizationId"}),hg.DELEGATION({delegationId:":delegationId",eventId:":eventId",organizationId:":organizationId"}),Yf.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId"}),Yf.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"})],children:(0,i.jsx)(ey,{...n})})]})},ny=({children:e,extraItems:t,featureFlags:n,isLoading:o,organization:a,spaceDesign:s})=>{const{params:{organizationId:d}}=Hf();return(0,r.useEffect)(()=>{a&&Xf(s.themeColors??{})},[a,s.themeColors]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ty,{extraItems:t,logoSrc:s.logoSrc}),(0,i.jsxs)(G,{align:"center",as:"main",css:{height:"fit-content",...n?.isV4?{padding:"$7 $4 $12 $4","@desktop":{padding:"$7 0 $12 0"}}:{maxWidth:"1170px",marginLeft:"auto",marginRight:"auto","@tablet":{marginTop:"$6",borderRadius:"$2"},"@desktop":{backgroundColor:"$white",border:"1px solid $gray200",marginBottom:"$8"}}},direction:"column",gap:n?.isV4?"4":void 0,height:1,width:1,children:["edit"!==window.location.pathname.split("/").at(-1)&&"edit"!==window.location.pathname.split("/").at(-2)&&(0,i.jsx)(N_,{bannerUrl:s.bannerSrc,featureFlags:n,isLoading:o}),(0,i.jsx)(Li,{css:{width:"100%",...n?.isV4?{}:{height:"100%",position:"relative",padding:"$4","@tablet":{padding:"$5 $7"},"@desktop":{paddingBottom:"$7",marginLeft:"auto",marginRight:"auto"}},"@desktop":{width:"$container"}},children:e})]}),Kf(d)&&(0,i.jsx)(qI,{source:"delegation"})]})},iy=()=>{const{params:{organizationId:e}}=Hf(),{data:t,isLoading:n,loader:o}=Mi("query OrganizationEventsShowcase($organizationId: OrganizationId!) {\n organization: organizationPublic(id: $organizationId) {\n ...OrganizationEventsShowcase\n\n eventsShowcaseSettings {\n title\n intro\n events {\n event {\n id\n name\n }\n descriptionText\n buttonText\n form {\n id\n name\n }\n }\n }\n }\n}\n",{organizationId:e},[Yo.OrganizationEventsShowcaseFragment]);return o||(0,i.jsx)(ny,{featureFlags:{isV4:!0},isLoading:n,organization:t.organization,spaceDesign:{themeColors:t.organization?.eventsShowcaseDesign?.colors,bannerSrc:t.organization?.eventsShowcaseDesign?.banner?.url,logoSrc:t.organization?.eventsShowcaseDesign?.logo?.url},children:(0,i.jsx)(R_,{heading:t.organization.eventsShowcaseSettings.title,subtitle:t.organization.eventsShowcaseSettings.intro,children:(0,i.jsx)(M_,{children:t.organization.eventsShowcaseSettings.events.map(t=>(0,i.jsx)(P_,{button:t.form?(0,i.jsx)(jo,{to:fg({organizationId:e,eventId:t.event.id,formId:t.form.id}),children:t.buttonText}):(0,i.jsx)(jo,{disabled:!0,children:t.buttonText}),subtitle:t.descriptionText,title:t.event.name},t.event.id))})})})};function oy(e){return`${e.name}${v(e.acronym)?` (${e.acronym})`:""}`}function ay(e){return sy(e.map(({accreditationSlot:e})=>e))}function sy(e){return(0,vs.A)(Object.values((0,ym.A)(e,e=>e.accreditation.id)).map(e=>{const t=e[0].accreditationCategory,n=e[0].accreditation,i=e.map(e=>e.date?.toMillis()??1);return{id:n.id,category:t.name,index:n.index,text:v(n.acronym)?n.acronym:n.name,minDate:(0,bg.A)(i),color:n.color,count:e.length,icon:n.icon}}),({category:e,index:t,text:n,minDate:i})=>[y(e),ry(t),y(n),i])}function ry(e){return"number"!=typeof e||isNaN(e)?"9999":e.toString(10).padStart(4,"0")}function dy(e){return(0,vs.A)(e,e=>[y(e.accreditationCategoryName||""),ry(e.index),y(e.name)])}function ly(e){return(0,vs.A)(e.map(e=>({id:e.id,category:e.accreditationProfileCategory.name,text:v(e.acronym)?e.acronym:e.name,color:e.color,icon:e.icon})),({category:e,text:t})=>[y(e),y(t)])}var cy=n(9116),uy=n(5315);const my=[0,50,100,200,300,400,500,600,700,800,900,950,1e3],gy=Object.fromEntries(["gray","grayDark","primary","error","warning","success","blue","blueGray","blueLight","purple","purpleLight","purpleDark","pink","orange","redLight","redDark","green","greenDark","brown"].flatMap(e=>{const t={50:M.colors[`${e}50`].value,100:M.colors[`${e}100`].value,500:M.colors[`${e}500`].value,700:M.colors[`${e}700`].value};return[[e,t],[t[700],t]]}));function hy(e,t=700){const n=gy[e.toLowerCase()];if(n)return n;{const n=(0,uy.KI)(e),i=((e,t=700)=>my.map(n=>{if(0===n)return{stop:n,tweak:100};if(1e3===n)return{stop:n,tweak:0};if(n===t)return{stop:n,tweak:e};{const i=Math.abs((n-t)/100),o=n[e,n.copy({l:t/100}).formatHex()]))}}const py={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function fy(e){return v(e)&&(function(e){return/^#(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/g.test(e)}(e)||function(e){return Object.keys(py).includes(e)}(e))}function Iy(e,{higherIsBetter:t}={higherIsBetter:!0}){return e<=.2?t?M.colors.error500.value:M.colors.success500.value:e<=.7?M.colors.warning500.value:e<=1?t?M.colors.success500.value:M.colors.error500.value:M.colors.blueGray500.value}const _y=R(G,{borderRadius:"$2",fontSize:"$textSm",height:"32px",width:"32px",variants:{size:{sm:{},md:{borderRadius:"$3",fontSize:"$textMd",height:"40px",width:"40px"},responsive:{"@tablet":{borderRadius:"$3",fontSize:"$textMd",height:"40px",width:"40px"}}}},defaultVariants:{size:"responsive"}}),yy=e=>{const t=(0,r.useMemo)(()=>hy(e.color??""),[e.color]),n=(0,r.useMemo)(()=>qn.includes(e.icon)?Io(e.icon):e.icon,[e.icon]);return(0,i.jsx)(_y,{align:"center",css:{background:t[100],color:t[700],...e.css},justify:"center",role:"presentation",size:e.size,children:(0,i.jsx)(_o,{icon:n})})},xy=e=>{const{translate:t}=Hf(),n=(0,r.useMemo)(()=>oy(e.accreditation),[e.accreditation]),[o,a]=(0,r.useState)(!0),s=e.displaySlots||"function"==typeof e.renderCheckbox;return(0,i.jsxs)(G,{css:{background:"white",bd:!0,overflow:"hidden",userSelect:"none"},direction:"column",children:[(0,i.jsxs)(G,{align:"center",css:{cursor:s?"pointer":"default",padding:"$3 $4"},gap:"2",onClick:()=>{a(!o),e.onClick?.()},children:[e.displaySlots&&(0,i.jsx)(G,{align:"center",css:{fontSize:"$textXs"},height:20,justify:"center",width:20,children:(0,i.jsx)(_o,{icon:o?"chevron-down":"chevron-right"})}),e.renderCheckbox?.(),(0,i.jsx)(yy,{color:e.accreditation.color,icon:e.accreditation.icon}),(0,i.jsxs)(G,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsxs)(G,{align:"center",gap:"2",children:[(0,i.jsx)(Li,{font:"gray800 textSm semiBold",children:n}),e.badge]}),e.displayNumberOfSlots&&(0,i.jsx)(Li,{color:"gray500",children:t("creneau",e.numberOfSlots)})]}),e.renderActions?.()]}),(e.displayFormCustomFields||e.displaySlots&&o)&&(0,i.jsx)(G,{css:{borderTop:"1px solid $gray200"},direction:"column",children:e.children})]})},Sy=R("div",{background:"white",alignItems:"center",cursor:"pointer",display:"flex",justifyContent:"center",variants:{size:{sm:{borderRadius:"16px",height:"16px",width:"16px"},md:{borderRadius:"20px",height:"20px",width:"20px"}},state:{unchecked:{border:"1px solid $gray300","&:hover":{border:"1px solid $primary600"}},checked:{border:"1px solid $primary600"}},disabled:{true:{cursor:"not-allowed"}}},compoundVariants:[{size:"sm",state:"checked",css:{"& > div":{background:"$primary600",borderRadius:"6px",height:"6px",width:"6px"}}},{size:"md",state:"checked",css:{"& > div":{background:"$primary600",borderRadius:"8px",height:"8px",width:"8px"}}},{state:"unchecked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200","&:hover":{borderColor:"$gray200"}}},{state:"checked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200","& > div":{background:"$gray300 !important"}}}],defaultVariants:{size:"sm",state:"unchecked"}}),vy=({shouldPreventDefault:e=!0,...t})=>{Mo("common-front/src/designSystem/components/radio.tsx","common-front/src/designSystem/components/radioCard.tsx for card-style radio buttons, or create a new component following that pattern for other styles of radio button");const n=n=>{e&&To(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked"):t.onClick("checked"))};return(0,i.jsx)(Sy,{"aria-describedby":t.descId,"aria-labelledby":t.labelId,disabled:t.disabled,id:t.inputId,role:"radio",size:t.size,state:t.state,tabIndex:t.tabIndex??0,onClick:n,onKeyDown:e=>{"Space"===e.key&&n(e)},children:"checked"===t.state&&(0,i.jsx)("div",{})})},by=({shouldPreventDefault:e=!0,...t})=>{Mo("common-front/src/designSystem/components/radio.tsx","common-front/src/designSystem/components/radioCard.tsx for card-style radio buttons, or create a new component following that pattern for other styles of radio button");const{inputId:n,descId:o,labelId:a}=SI(),s="string"==typeof t.subtext&&t.subtext.length>0,r=n=>{e&&To(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked"):t.onClick("checked"))};return(0,i.jsxs)(G,{css:{...t.css,cursor:t.disabled?"not-allowed":"pointer",userSelect:"none"},tabIndex:0,onClick:e=>{r(e)},onKeyDown:e=>{"Space"===e.key&&r(e)},children:[(0,i.jsx)(G,{css:{alignItems:"center",height:"md"===t.size?"23px":"20px"},children:(0,i.jsx)(vy,{descId:o,disabled:t.disabled,inputId:n,labelId:a,shouldPreventDefault:!1,size:t.size,state:t.state,tabIndex:-1,onClick:RI.A})}),(0,i.jsx)(oI,{width:"2"}),(0,i.jsxs)(G,{css:{flexDirection:"column",fontSize:"md"===t.size?"$3":"$2","& div":{cursor:"pointer !important"}},children:[(0,i.jsx)(jI,{htmlFor:n,id:a,children:(0,i.jsx)(Li,{css:{color:t.disabled&&!s?"$gray300":"$gray800"},fontWeight:"medium",children:t.children})}),t.subtext&&(0,i.jsx)(Li,{color:"gray500",id:o,children:t.subtext})]})]})},jy=e=>(0,i.jsx)(G,{align:"center",css:{background:`$${e.color}50`,borderRadius:"48px",color:`$${e.color}700`,...e.css},height:48,justify:"center",width:48,children:(0,i.jsx)(G,{align:"center",css:{background:`$${e.color}100`,borderRadius:"32px"},height:32,justify:"center",width:32,children:(0,i.jsx)(_o,{icon:e.icon})})}),Ay=R("dialog",{background:"white",border:"none",display:"flex",flexDirection:"column",variants:{mobile:{true:{height:"100%",paddingBottom:"$6",paddingTop:"$8",width:"100%"},false:{borderRadius:"12px",maxHeight:"calc(100% - 80px)",py:"$7"}},size:{sm:{},md:{},lg:{}}},compoundVariants:[{mobile:!1,size:"sm",css:{width:"$modalSm"}},{mobile:!1,size:"md",css:{width:"$modalMd"}},{mobile:!1,size:"lg",css:{width:"$modalLg"}}],defaultVariants:{mobile:!1}}),Cy=R("div",{display:"flex",flexDirection:"column",overflow:"auto",width:"100%",variants:{mobile:{true:{flex:"1",px:"$4"},false:{px:"$8"}}}}),Ey=R("div",{display:"flex",gap:"$3",variants:{mobile:{true:{boxShadow:"0px -1px 3px rgba(16, 24, 40, 0.1), 0px -1px 2px rgba(16, 24, 40, 0.06)",flexDirection:"column",padding:"$6 $4 0 $4","& .h-button-content":{textAlign:"center"}},false:{flexDirection:"row",justifyContent:"flex-end",px:"$8"}}}}),Ty=({buttons:e,children:t,onClose:n,role:o,size:a})=>{const s=$_();return Ro(n),Mo("../../../../../components/modals/__deprecated/modal/modal.tsx","../../../../../components/modals/base/modal.tsx"),(0,Oo.createPortal)((0,i.jsx)(G,{align:"center",css:{background:"rgba(52, 64, 84, 0.7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:"300"},"data-testid":"modal-backdrop",justify:"center",role:"presentation",onMouseDown:n,children:(0,i.jsxs)(Ay,{mobile:s,open:!0,role:o,size:a,onClick:e=>To(e,!1),onMouseDown:e=>To(e,!1),children:[(0,i.jsx)(Cy,{mobile:s,children:t}),e&&(0,i.jsx)(Ey,{mobile:s,children:e})]})}),document.body)},Oy=e=>{const t=Oi();return(0,i.jsxs)(Ty,{buttons:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(jo,{onClick:e.onClose,children:t("fermer_62479")})}),size:"md",onClose:e.onClose,children:[(0,i.jsx)(G,{justify:"center",width:1,children:(0,i.jsx)(jy,{color:"primary",icon:"circle-info"})}),(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(Li,{font:"gray900 textLg medium",textAlign:"center",width:1,children:t("informations_su_86120",e.name)}),(0,i.jsx)(oI,{height:"7"}),v(e.description)&&(0,i.jsxs)(G,{css:{overflowY:"auto"},direction:"column",gap:"2",children:[(0,i.jsx)(Li,{font:"gray900 textMd semiBold",children:t("description_58935")}),(0,i.jsx)(w_,{text:e.description})]}),(0,i.jsx)(oI,{height:"4"})]})},Ry=R("div",{alignItems:"center",borderRadius:"$1",display:"flex",fontWeight:"$medium",gap:"$1",px:"$2",userSelect:"none",height:"fit-content","&:has(.h-badge-count)":{paddingRight:"$1"},"& > .h-badge-count":{borderRadius:"3px",height:"calc(100% - 8px)",marginLeft:"$1",px:"6px"},variants:{size:{sm:{height:"22px",fontSize:"12px","& > .h-badge-count":{fontSize:"10px"}},md:{height:"24px",fontSize:"12px","& > .h-badge-count":{fontSize:"10px"}},lg:{height:"28px",fontSize:"14px","& > .h-badge-count":{fontSize:"12px"}}},cursor:{default:{cursor:"default"},pointer:{cursor:"pointer"},text:{cursor:"text"}},ellipsis:{true:{maxWidth:"80%","& .h-badge-content":{ellipsis:!0,flex:"1"}}}},defaultVariants:{size:"sm",cursor:"default"}}),My=r.forwardRef((e,t)=>{const n=r.useMemo(()=>{const t=e.color||"gray",n=hy(t);return"gray"===t?{background:"$gray100",color:"$gray700","& > .h-badge-left-icon":{color:"$gray500"},"& > .h-badge-count":{background:"$gray200"}}:"white"===t?{background:"white",border:"1px solid $gray300","& > .h-badge-count":{background:"$gray100"}}:"white-with-green-icon"===t?{background:"white",border:"1px solid $gray300","& > .h-badge-left-icon":{color:"$success500"}}:"orange"===t?{background:"$orange50",color:"$orange700","& > .h-badge-left-icon":{color:"$orange500"}}:{background:n[50],color:n[700],"& > .h-badge-left-icon":{color:n[500]},"& > .h-badge-count":{background:n[100]}}},[e.color]);return(0,i.jsxs)(Ry,{ref:t,color:e.color,css:{maxWidth:"100%",...n,...e.css},cursor:e.cursor,ellipsis:e.ellipsis,size:e.size,onClick:e.onClick,children:[e.leftIcon&&(0,i.jsx)(G,{className:"h-badge-left-icon",css:{cursor:e.onLeftIconClick?"pointer":"inherit"},onClick:t=>{e.onLeftIconClick?.(t)},children:(0,i.jsx)(_o,{icon:e.leftIcon,iconStyle:e.leftIconStyle})}),e.children&&(0,i.jsx)(Li,{className:"h-badge-content",css:{flex:"1",overflow:"hidden"},title:e.title,onClick:t=>{e.onContentClick?.(t)},children:(0,i.jsx)(Li,{css:{ellipsis:!0},title:"string"==typeof e.children?e.children:"",children:e.children})}),e.rightIcon&&(0,i.jsx)(G,{css:{cursor:e.onRightIconClick?"pointer":"inherit"},onClick:t=>{e.onRightIconClick?.(t)},children:(0,i.jsx)(_o,{icon:e.rightIcon})}),("number"==typeof e.count||v(e.count))&&(0,i.jsx)(G,{align:"center",className:"h-badge-count",children:e.count})]})});function Dy(e,t,n){const i=n-t;return i<=0?e("quota_atteint_12838"):e("quota_1_2_23970",t,n,i)}My.displayName="Badge";const wy=e=>{const{translate:t}=Hf();return(0,r.useMemo)(()=>{const n=e.getAssignedMaxRemaining(e.slotId);return n?n.remaining<=0?(0,i.jsx)(My,{color:"error",leftIcon:"circle-xmark",size:"sm",children:Dy(t,n.assignedResources,n.maxResources)}):(0,i.jsx)(My,{color:"white",size:"sm",children:Dy(t,n.assignedResources,n.maxResources)}):null},[e.slotId,e.getAssignedMaxRemaining,t])},$y=e=>{const{translate:t}=Hf(),[n,o]=(0,r.useState)(!1),a=(0,r.useMemo)(()=>v(e.profile.description)&&e.showDescription,[e.profile,e.showDescription]),s=(0,r.useMemo)(()=>(e.delegationAccreditationsProfiles||[]).find(({accreditationProfileId:t})=>t===e.profile.id),[e.delegationAccreditationsProfiles,e.profile]),d=(0,r.useCallback)(()=>"number"==typeof s?.maxResources?{assignedResources:s.assignedResources,maxResources:s.maxResources,remaining:s.maxResources-s.assignedResources}:null,[s]),l=(0,r.useMemo)(()=>!!s&&s.isFull&&e.alreadyAssignedProfileId!==e.profile.id,[e.alreadyAssignedProfileId,s,e.profile]),c=(0,r.useMemo)(()=>(0,i.jsx)(wy,{getAssignedMaxRemaining:d,slotId:e.profile.id}),[d,e.profile]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(xy,{accreditation:e.profile,badge:c,displayNumberOfSlots:!1,displaySlots:!1,numberOfSlots:0,renderActions:()=>a&&(0,i.jsx)(jo,{color:"white",onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),o(!0)},children:t("voir_la_descrip_62304")}),renderCheckbox:()=>(0,i.jsx)(vy,{disabled:l,shouldPreventDefault:!1,state:e.profile.id===e.accreditationProfileId?"checked":"unchecked",onClick:RI.A}),onClick:()=>{l||e.setAccreditationProfileId(e.profile.id===e.accreditationProfileId?null:e.profile.id)}}),n&&(0,i.jsx)(Oy,{description:e.profile.description,name:e.profile.name,onClose:()=>o(!1)})]})},Py=e=>{const{translate:t}=Hf(),n=(0,r.useCallback)(t=>{e.change(`${e.prefix}accreditationProfileId`,t)},[e.prefix,e.change]);return(0,i.jsxs)(G,{direction:"column",gap:"3",children:[(0,i.jsx)(Li,{font:"gray800 textMd semiBold",children:t("quel_profil_vou_78626")}),(0,i.jsx)(G,{css:{background:"$gray50",bd:"gray200 2",padding:"$6"},direction:"column",gap:"3",children:e.accreditationsProfiles.map(t=>(0,i.jsx)($y,{accreditationProfileId:e.accreditationProfileId,alreadyAssignedProfileId:e.alreadyAssignedProfileId,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,profile:t,setAccreditationProfileId:n,showDescription:e.options.showAccreditationDescription},t.id))})]})},Ny=e=>(0,i.jsx)(G,{css:{background:"$gray50",overflowX:"auto",padding:"$6",...e.css},direction:"column",gap:"4",height:1,width:1,children:e.children}),ky=e=>(0,i.jsxs)(G,{align:"center",css:e.css,direction:"column",height:1,justify:"center",width:1,children:[(0,i.jsx)(Li,{css:{inlineSize:"70%","@tablet":{inlineSize:"50%",blockSize:"auto",maxInlineSize:"100px"}},children:(0,i.jsx)("img",{alt:"Blank image",className:"blank-image",height:"100%",src:e.imageSrc??NI.WeezeventBlankPerson,width:"100%"})}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(Li,{css:{color:"$gray800",fontSize:"$textMd",fontWeight:"$semiBold","@tablet":{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium"}},textAlign:"center",children:e.title}),v(e.subtitle)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"2"}),(0,i.jsx)(Li,{color:"gray500",fontSize:"textSm",textAlign:"center",children:e.subtitle})]}),e.button&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(G,{justify:"center",children:e.button})]})]}),zy=R("div",{alignItems:"center",borderRadius:"12px",cursor:"pointer",display:"flex",position:"relative",padding:"$1","&:hover":{background:"$gray300"},"& > div":{background:"white",boxShadow:"$sm",position:"absolute",transition:"left 200ms ease-in"},"& > i":{color:"white"},"&:focus":{outline:"none"},"&:focus-visible":{border:"1px solid $success500",boxShadow:"0 0 0 4px rgba(16, 167, 77, 0.16)"},variants:{disabled:{true:{cursor:"not-allowed",background:"$gray100","&:hover":{background:"$gray100"},"&:focus-visible":{border:"1px solid $gray300",boxShadow:"0 0 0 4px rgba(206, 206, 206, 0.4)"},"& > i":{color:"$gray400"}}},size:{sm:{blockSize:"16px",inlineSize:"30px","& > div":{borderRadius:"12px",blockSize:"12px",inlineSize:"12px"},"& > i":{fontSize:"8px"}},md:{blockSize:"24px",inlineSize:"44px","& > div":{borderRadius:"20px",blockSize:"20px",inlineSize:"20px"},"& > i":{fontSize:"12px",paddingInlineStart:"2px"}}},state:{unchecked:{background:"$gray200","& > div":{left:"2px"}},checked:{background:"$success500","&:hover":{background:"$success600"}}}},compoundVariants:[{size:"sm",state:"checked",css:{"& > div":{left:"calc(100% - 2px - 12px)"}}},{size:"md",state:"checked",css:{"& > div":{left:"calc(100% - 2px - 20px)"}}},{disabled:!0,state:"checked",css:{background:"$gray100","&:hover":{background:"$gray100"}}}],defaultVariants:{size:"sm"}}),Ly=e=>(0,i.jsxs)(zy,{"aria-checked":e.value,"aria-describedby":e.descId,"aria-label":e.label,"aria-labelledby":e.labelId,disabled:e.disabled,id:e.inputId,role:"checkbox",size:e.size,state:e.value?"checked":"unchecked",tabIndex:e.tabIndex??0,onClick:()=>{e.disabled||e.onChange(!e.value)},onKeyDown:t=>{e.disabled||"Space"!==t.code||(t.preventDefault(),e.onChange(!e.value))},children:[(0,i.jsx)(_o,{height:"8",icon:"check",width:"8"}),(0,i.jsx)("div",{})]}),Fy=e=>{const{inputId:t,descId:n,labelId:o}=SI(),a=v(e.subtext);return(0,i.jsxs)(G,{align:"center","aria-keyshortcuts":e["aria-keyshortcuts"],css:{cursor:e.disabled?"auto":"pointer",userSelect:"none",...e.css},onClick:()=>{e.disabled||e.onChange(!e.value)},onKeyDown:t=>{e.disabled||"Space"!==t.code||(t.preventDefault(),e.onChange(!e.value))},children:[(0,i.jsx)(Ly,{descId:n,disabled:e.disabled,inputId:t,labelId:o,size:e.size,value:e.value,onChange:RI.A}),(0,i.jsx)(oI,{width:"2"}),(0,i.jsxs)(G,{css:{flex:"1",fontSize:"md"===e.size?"$3":"$2"},direction:"column",children:[(0,i.jsx)(jI,{htmlFor:t,id:o,children:(0,i.jsx)(Li,{color:"gray800",fontWeight:"medium",children:e.children})}),a&&(0,i.jsx)(Li,{color:"gray500",id:n,children:e.subtext})]})]})},Uy=e=>(0,i.jsx)(nI.D0,{name:e.name,render:t=>(0,i.jsx)(Fy,{disabled:e.disabled,size:e.size,subtext:e.subtext,value:t.input.value,onChange:t.input.onChange,children:e.children})}),By=e=>(0,i.jsxs)(G,{direction:"column",gap:"2",children:[(0,i.jsx)(G,{align:"center",css:{color:"$gray800",fontSize:"$textMd",fontWeight:"$medium"},gap:"3",children:e.category}),(0,i.jsx)(G,{direction:"column",gap:"3",children:e.children})]}),Gy=e=>{const t=Oi();return(0,i.jsxs)(G,{align:"center",gap:"1",children:[e.children,(0,i.jsxs)(Li,{color:"gray500",fontSize:"textXs",fontWeight:"regular",children:["(",t("facultatif_76747"),")"]})]})},Vy=e=>{if(0===e.names.length)return e.render(e.fields);{const[t,...n]=e.names;return(0,i.jsx)(nI.D0,{name:t,render:o=>(0,i.jsx)(Vy,{fields:{...e.fields||{},[t]:o},names:n,render:e.render,subscription:e.subscription}),subscription:e.subscription})}},Wy=({formattedAddressProps:e,getAddress:t,hint:n,latitudeProps:o,longitudeProps:a,onPlaceChange:s,state:d,...l})=>{const c=Oi(),u=(0,r.useRef)(null),m=(0,r.useRef)({getAddress:t,onPlaceChange:s});m.current={getAddress:t,onPlaceChange:s};const g=yI(e.meta);return(0,r.useEffect)(()=>{const t=new google.maps.places.Autocomplete(u.current,{types:["geocode"]});t.addListener("place_changed",()=>{const n=t.getPlace();if(n.geometry?.location){const t=n.geometry.location.lat(),i=n.geometry.location.lng();e.input.onChange(m.current.getAddress?.(n)??n.formatted_address),o?.input.onChange(t),a?.input.onChange(i),m.current.onPlaceChange?.(n)}})},[]),(0,i.jsx)(EI,{ref:u,hint:g?e.meta.error||e.meta.submitError:n,placeholder:c("indiquez_un_lie_85634"),state:g?"error":d,value:e.input.value,onBlur:e.input.onBlur,onChange:e.input.onChange,onFocus:e.input.onFocus,...l})},qy=({addressName:e,latitudeName:t,longitudeName:n,...o})=>{const a=[e];return t&&a.push(t),n&&a.push(n),(0,i.jsx)(Vy,{names:a,render:a=>(0,i.jsx)(Wy,{formattedAddressProps:a[e],latitudeProps:t?a[t]:void 0,longitudeProps:n?a[n]:void 0,...o})})},Yy=(0,r.createContext)({});function Hy(){return(0,r.useContext)(Yy)}const Zy=R("div",{alignItems:"center",border:"1px solid $gray300",cursor:"pointer",display:"flex",fontSize:"10px",fontWeight:"$semiBold",justifyContent:"center","& > i":{fontSize:"10px",fontWeight:"$semiBold"},variants:{size:{sm:{borderRadius:"4px",height:"16px",width:"16px"},md:{borderRadius:"6px",height:"20px",width:"20px"}},state:{unchecked:{background:"white","&:hover":{border:"1px solid $primaryCustom600"}},checked:{background:"$primaryCustom600",border:"none",color:"white"},indeterminate:{background:"$primaryCustom600",border:"none",color:"white",padding:"$1","& > div":{borderTop:"2px solid white",width:"100%"}}},disabled:{true:{}}},compoundVariants:[{state:"unchecked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200","&:hover":{borderColor:"$gray200"}}},{state:"checked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200",color:"$gray300"}},{state:"indeterminate",disabled:!0,css:{background:"$gray100",borderColor:"$gray200",color:"$gray300","& > div":{borderTopColor:"$gray300"}}}],defaultVariants:{size:"sm",state:"unchecked"}}),Ky=({shouldPreventDefault:e=!0,...t})=>{Mo("common-front/src/designSystem/components/checkbox.tsx","a new component following the pattern of common-front/src/designSystem/components/radioCard.tsx");const n=n=>{e&&To(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked",n):t.onClick("checked",n))};return(0,i.jsxs)(Zy,{"aria-describedby":t.descId,"aria-labelledby":t.labelId,disabled:t.disabled,id:t.inputId,role:"checkbox",size:t.size,state:t.state,tabIndex:t.tabIndex??0,onClick:e=>n(e),onKeyDown:e=>{"Space"===e.code&&n(e)},onMouseDown:e=>{e.shiftKey&&To(e)},children:["checked"===t.state&&(0,i.jsx)("i",{className:"far fa-check"}),"indeterminate"===t.state&&(0,i.jsx)("div",{})]})},Qy=({shouldPreventDefault:e=!0,...t})=>{Mo("common-front/src/designSystem/components/checkbox.tsx","a new component following the pattern of common-front/src/designSystem/components/radioCard.tsx");const{descId:n,inputId:o,labelId:a}=SI(),s=void 0!==t.subtext&&null!==t.subtext,r=n=>{e&&n.preventDefault(),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked",n):t.onClick("checked",n))};return(0,i.jsxs)(G,{css:{cursor:t.disabled?"not-allowed":"pointer",userSelect:"none",...t.css},tabIndex:0,onClick:r,onKeyDown:e=>{"Space"===e.code&&r(e)},children:[(0,i.jsx)(G,{css:{alignItems:"center",height:"md"===t.size?"23px":"20px"},children:(0,i.jsx)(Ky,{descId:n,disabled:t.disabled,inputId:o,labelId:a,shouldPreventDefault:!1,size:t.size,state:t.state,tabIndex:-1,onClick:RI.A})}),(0,i.jsx)(oI,{width:"2"}),(0,i.jsxs)(G,{css:{flexDirection:"column",fontSize:"md"===t.size?"$3":"$2"},children:[(0,i.jsx)(jI,{htmlFor:o,id:a,children:(0,i.jsx)(Li,{css:{color:t.disabled&&!s?"$gray300":"$gray800"},fontWeight:"medium",children:t.children})}),s&&(0,i.jsx)(Li,{color:"gray500",id:n,children:t.subtext})]})]})},Xy=({name:e,children:t,...n})=>{const{isDisabled:o}=Hy();return(0,i.jsx)(nI.D0,{name:e,render:e=>{const a=!0===e.input.checked?"checked":"unchecked";return(0,i.jsx)(Qy,{...n,disabled:o??n.disabled,state:a,onClick:()=>{e.input.onChange(!e.input.checked)},children:t})},type:"checkbox"})},Jy=({value:e,css:t,label:n,description:o,hint:a,icon:s,min:r,onChange:d,max:l,state:c,rightIcon:u,onRightIconClick:m,zone:g,...h})=>{const p=e?El(e):null,f=p?.isValid?p.toFormat(Ko):"",{inputId:I,descId:_,errorId:y}=SI();return(0,i.jsxs)(G,{css:t,direction:"column",width:1,children:[(0,i.jsx)(jI,{htmlFor:I,children:n}),(0,i.jsx)(vI,{id:_,children:o}),(n||o)&&(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(CI,{cursor:"default",icon:s,rightIcon:u,state:c,onRightIconClick:m,children:(0,i.jsx)(Li,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray500",fontSize:"$textSm",height:"100%",lineHeight:"20px",outline:"none",width:"100%"}},children:(0,i.jsx)("input",{"aria-describedby":o?_:void 0,"aria-errormessage":"error"===c?y:void 0,"aria-invalid":"error"===c,disabled:"disabled"===c,id:I,max:l?.toFormat(Ko),min:r?.toFormat(Ko),type:"date",value:f,onChange:e=>{v(e.target.value)?d(Vo.c9.fromFormat(e.target.value,Ko,{zone:g||"UTC"})):d(Vo.c9.invalid("Invalid"))},...h})})}),(0,i.jsx)(bI,{id:y,state:c,children:a})]})},ex=(0,r.memo)(function({name:e,hint:t,state:n,...o}){return(0,i.jsx)(nI.D0,{name:e,render:({input:a,meta:s})=>{const r=s.data?.forceDisplayError&&s.invalid||s.touched&&s.invalid;return(0,i.jsx)(Jy,{hint:r?s.error:t,name:e,state:r?"error":n,value:a.value,onBlur:a.onBlur,onChange:a.onChange,onFocus:a.onFocus,...o})}})}),tx=({value:e,css:t,label:n,description:o,hint:a,icon:s,min:r,onChange:d,max:l,rightIcon:c,onRightIconClick:u,state:m,zone:g,...h})=>{const p=e?v(e)?Vo.c9.fromISO(e,{zone:"utc"}):e:null,f=p?.isValid?p.toFormat(Qo):"",{inputId:I,descId:_,errorId:y}=SI();return(0,i.jsxs)(G,{css:t,direction:"column",width:1,children:[(0,i.jsx)(jI,{htmlFor:I,children:n}),(0,i.jsx)(vI,{id:_,children:o}),(n||o)&&(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(CI,{cursor:"default",icon:s,rightIcon:c,state:m,onRightIconClick:u,children:(0,i.jsx)(Li,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},children:(0,i.jsx)("input",{"aria-describedby":o?_:void 0,"aria-errormessage":"error"===m?y:void 0,"aria-invalid":"error"===m,disabled:"disabled"===m,id:I,max:l?.toFormat(Qo),min:r?.toFormat(Qo),type:"datetime-local",value:f,onChange:e=>{v(e.target.value)?d(Vo.c9.fromFormat(e.target.value,Qo,{zone:g||"UTC"})):d(Vo.c9.invalid("Invalid"))},...h})})}),(0,i.jsx)(bI,{id:y,state:m,children:a})]})},nx=({name:e,hint:t,state:n,...o})=>(0,i.jsx)(nI.D0,{name:e,render:a=>{const s=a.meta.data?.forceDisplayError&&a.meta.invalid||a.meta.touched&&a.meta.invalid;return(0,i.jsx)(tx,{hint:s?a.meta.error:t,name:e,state:s?"error":n,value:a.input.value,onBlur:a.input.onBlur,onChange:a.input.onChange,onFocus:a.input.onFocus,...o})}}),ix=({value:e,css:t,label:n,description:o,hint:a,icon:s,onChange:r,state:d,...l})=>{const c=v(e)&&e.length>5?e.substring(0,5):e,{inputId:u,descId:m,errorId:g}=SI();return(0,i.jsxs)(G,{css:t,direction:"column",width:1,children:[(0,i.jsx)(jI,{htmlFor:u,children:n}),(0,i.jsx)(vI,{id:m,children:o}),(n||o)&&(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(CI,{cursor:"default",icon:s,state:d,children:(0,i.jsx)(Li,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},children:(0,i.jsx)("input",{"aria-describedby":o?m:void 0,"aria-errormessage":"error"===d?g:void 0,"aria-invalid":"error"===d,disabled:"disabled"===d,id:u,type:"time",value:c,onChange:e=>{r(e.target.value)},...l})})}),(0,i.jsx)(bI,{id:g,state:d,children:a})]})},ox=({name:e,hint:t,state:n,...o})=>(0,i.jsx)(nI.D0,{name:e,render:a=>{const s=yI(a.meta);return(0,i.jsx)(ix,{hint:s?a.meta.error:t,name:e,state:s?"error":n,value:a.input.value,onBlur:a.input.onBlur,onChange:a.input.onChange,onFocus:a.input.onFocus,...o})}});var ax;function sx(e){return g(e).flatMap(e=>{switch(e){case ax.Archives:return["zip"];case ax.Csv:return["csv"];case ax.Gpx:return["gpx"];case ax.Images:return["jpg","png","jpeg","gif"];case ax.Kml:return["kml"];case ax.Pdf:return["pdf"];case ax.SmallImages:return["jpg","png","jpeg"];case ax.Videos:return["mp4","mov","webm","mkv"];default:return wr()}})}function rx(e){return Math.min(...g(e).flatMap(e=>{switch(e){case ax.Archives:return Ys;case ax.Csv:return Hs;case ax.Images:case ax.Pdf:return 2e7;case ax.Kml:case ax.Gpx:return 1/0;case ax.SmallImages:return 2e6;case ax.Videos:return 5e7;default:return wr()}}))}function dx(e){return g(e).flatMap(e=>e===ax.Images?"image/*":sx(e).map(e=>`.${e}`)).join(",")}async function lx(e,t,n,i){const a=await va(),{name:s,extension:r}=Zs(t.name),d=`organization/${e}/${ga()}/${S(s)}.${r}`,{awsS3PostCredentials:{endpointUrl:l,policy:c,amzCredential:u,amzSignature:m,amzDate:g,amzSecurityToken:h}}=await function(e,t){return Oa("query AwsS3PostCredentials($organizationId: OrganizationId!, $acl: String!, $key: String!) {\n awsS3PostCredentials(organizationId: $organizationId, acl: $acl, key: $key) {\n endpointUrl\n policy\n amzSignature\n amzCredential\n amzDate\n amzSecurityToken\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:e,acl:n,key:d},a),p=new FormData;return p.append("key",d),p.append("acl",n),p.append("success_action_status","201"),p.append("X-Amz-Credential",u),p.append("X-Amz-Algorithm","AWS4-HMAC-SHA256"),p.append("X-Amz-Date",g),h&&p.append("X-Amz-Security-Token",h),p.append("Policy",c),p.append("X-Amz-Signature",m),p.append("Content-Type",Qs(r)),p.append("file",t),new Promise((e,a)=>{const s=new XMLHttpRequest;s.upload.onprogress=e=>{if(e.lengthComputable){const t=Math.round(e.loaded/e.total*100);i?.(t)}},s.onerror=()=>{a(new Error("Could not upload file to S3"))},s.onreadystatechange=()=>{if(4===s.readyState){const i=s.responseXML?.querySelector("Error Code");null!==i?(o("Could not upload file to S3",{code:i?.textContent??"",message:s.responseXML?.querySelector("Error Message")?.textContent??""}),a(new Error("Could not upload file to S3"))):e({acl:n,key:d,name:t.name,size:t.size})}},s.open("POST",l,!0),s.send(p)})}!function(e){e[e.Archives=0]="Archives",e[e.Csv=1]="Csv",e[e.Gpx=2]="Gpx",e[e.Images=3]="Images",e[e.Kml=4]="Kml",e[e.Pdf=5]="Pdf",e[e.SmallImages=6]="SmallImages",e[e.Videos=7]="Videos"}(ax||(ax={}));const cx=e=>{switch(e.split(".").at(-1)){case"csv":return NI.FileCSV;case"jpeg":case"jpg":return NI.FileJPG;case"pdf":return NI.FilePDF;case"png":return NI.FilePNG;case"zip":return NI.FileZIP;default:return NI.FileBlank}};function ux(e,t){return`https://${t}.s3-eu-west-1.amazonaws.com/${e.key}`}var mx=n(4741);function gx(e,t,n){return 25===e?{transform:`translateX(${t}px) rotate(0.25turn)`,transformOrigin:"top left"}:50===e?{transform:"rotate(0.5turn)"}:75===e?{transform:`translateY(${n}px) rotate(0.75turn)`,transformOrigin:"top left"}:{}}const hx=R("div",{alignItems:"center",background:"#434c5e",borderRadius:"$1",color:"white",cursor:"pointer",display:"flex",variants:{controls:{true:{height:"calc(100% - 10px)",paddingLeft:"10px",paddingRight:"10px",width:"200px"}},rotate:{true:{height:"40px",justifyContent:"center",marginLeft:"10px",width:"40px"}}}}),px=R("input",{"-webkit-appearance":"none",background:"transparent",marginLeft:"10px",marginRight:"10px",width:"100%","&::-webkit-slider-thumb":{"-webkit-appearance":"none",background:"white",borderRadius:"16px",cursor:"pointer",height:"16px",marginTop:"-7px",width:"16px"},"&::-webkit-slider-runnable-track":{background:"white",borderRadius:"2px",cursor:"pointer",height:"2px",width:"100%"},"&:focus::-webkit-slider-runnable-track":{background:"white"},"&::-moz-range-thumb":{background:"white",borderRadius:"16px",cursor:"pointer",height:"16px",width:"16px"},"&::-moz-range-track":{background:"white",borderRadius:"2px",cursor:"pointer",height:"2px",width:"100%"},"&::-ms-thumb":{background:"white",borderRadius:"16px",cursor:"pointer",height:"16px",width:"16px"},"&:focus":{ouline:"none"}});var fx;!function(e){e[e.EmptyFile=0]="EmptyFile",e[e.Pdf=1]="Pdf",e[e.Image=2]="Image"}(fx||(fx={}));class Ix extends r.Component{contentRef;renderPagesDebounced;constructor(e){super(e);let t=fx.Image;"string"!=typeof this.props.fileUrl||0===this.props.fileUrl.trim().length?t=fx.EmptyFile:"pdf"===Zs(this.props.fileUrl).extension&&(t=fx.Pdf),this.state={image:null,isLoading:!0,fileType:t,pdf:null,rotate:0,zoomLevel:100},this.renderPagesDebounced=(0,mx.A)(()=>{this.renderPdfPages()},200),this.contentRef=r.createRef()}componentDidMount(){var e;this.state.fileType===fx.Pdf?(e=this.props.fileUrl,(void 0===window.pdfjsLib?Wo("https://cdn.jsdelivr.net/npm/pdfjs-dist@2.0.943/build/pdf.min.js"):Promise.resolve(!0)).then(()=>window.pdfjsLib.getDocument(e))).then(e=>{this.setState({pdf:e}),this.renderPdfPages()}):this.state.fileType===fx.Image&&this.loaderImage()}renderPdfPages(){this.state.fileType===fx.Pdf&&async function(e,t,n,i){Array.from(t.childNodes).forEach(e=>{t.removeChild(e)});for(let o=1;o<=e.numPages;o++){const a=await e.getPage(o),s=a.getViewport(n),r=document.createElement("div"),d=document.createElement("canvas"),l=d.getContext("2d"),c=gx(i,s.height,s.width);25===i||75===i?(r.style.height=`${s.width}px`,r.style.width=`${s.height}px`):(r.style.height=`${s.height}px`,r.style.width=`${s.width}px`),d.height=s.height,d.width=s.width,d.style.transform=c.transform||"",d.style.transformOrigin=c.transformOrigin||"",r.appendChild(d),t.appendChild(r),a.render({canvasContext:l,viewport:s})}}(this.state.pdf,this.contentRef.current,this.state.zoomLevel/100,this.state.rotate).then(()=>{this.setState({isLoading:!1})})}loaderImage(){if(this.state.fileType===fx.Image){const e=new Image;e.onload=()=>{const t=this.contentRef.current.getBoundingClientRect(),n=t.height/e.height,i=t.width/e.width,o=Math.min(n,i);let a=100;o<1&&(a=100*(o-.1*o)),this.setState({image:e,isLoading:!1,zoomLevel:a})},e.onerror=()=>{this.setState({isLoading:!1,fileType:fx.EmptyFile})},e.src=this.props.fileUrl}}imageHeight(){return this.state.image.height*(this.state.zoomLevel/100)}imageWidth(){return this.state.image.width*(this.state.zoomLevel/100)}zoomMinus(){this.setState({zoomLevel:Math.max(1,10*Math.floor((this.state.zoomLevel-10)/10))}),this.renderPagesDebounced()}zoomPlus(){this.setState({zoomLevel:10*Math.ceil((this.state.zoomLevel+10)/10)}),this.renderPagesDebounced()}rangeChange(e){this.setState({zoomLevel:parseInt(e.target.value,10)}),this.renderPagesDebounced()}rotate(){this.setState(e=>{const t=e.rotate+25;return{rotate:t>=100?0:t}}),this.renderPagesDebounced()}render(){return(0,i.jsx)(Ei,{children:({container:e})=>{const t=e.get(Ai);return(0,i.jsxs)(G,{css:{position:"relative"},direction:"column",height:1,width:1,children:[(0,i.jsx)(Li,{ref:this.contentRef,css:{height:"calc(100% - 50px)",overflow:"auto",padding:"10px",width:"100%",zIndex:"1","& > div":{margin:"auto",marginBottom:"20px"},"& > div:last-child":{marginBottom:"0"}}}),this.state.fileType===fx.Image&&!1===this.state.isLoading&&(0,i.jsx)(Li,{css:{background:"white",height:"calc(100% - 50px)",left:"0",overflow:"auto",padding:"10px",position:"absolute",top:"0",width:"100%",zIndex:"5","& > div:last-child":{marginBottom:"0"}},children:(0,i.jsx)("img",{src:this.state.image.src,style:{height:`${this.imageHeight()}px`,width:`${this.imageWidth()}px`,...gx(this.state.rotate,this.imageHeight(),this.imageWidth())}})}),!0===this.state.isLoading&&(0,i.jsx)(Li,{css:{background:"white",height:"calc(100% - 50px)",left:"0",position:"absolute",top:"0",width:"100%",zIndex:"10"},children:(0,i.jsx)(xo,{})}),this.state.fileType===fx.EmptyFile&&(0,i.jsx)(G,{align:"center",css:{background:"white",fontSize:"22px",height:"calc(100% - 50px)",left:"0",position:"absolute",top:"0",width:"100%",zIndex:"20"},justify:"center",children:t.translate("aucun_fichier_77247")}),(0,i.jsxs)(G,{align:"center",css:{height:"50px",width:"100%"},justify:"center",children:[(0,i.jsxs)(hx,{controls:!0,children:[(0,i.jsx)("i",{className:"fas fa-minus",onClick:this.zoomMinus.bind(this)}),(0,i.jsx)(px,{max:"200",min:"1",step:"1",type:"range",value:this.state.zoomLevel,onChange:this.rangeChange.bind(this)}),(0,i.jsx)("i",{className:"fas fa-plus",onClick:this.zoomPlus.bind(this)})]}),(0,i.jsx)(hx,{rotate:!0,onClick:this.rotate.bind(this),children:(0,i.jsx)("i",{className:"far fa-undo"})})]})]})}})}}const _x=R("div",{display:"flex",flexDirection:"column",height:"100%",width:"100%",zIndex:"10","& .fsp-header":{px:"$7"},"& .fsp-category":{fontSize:"11px",fontWeight:"$semiBold",textTransform:"uppercase"},"& .fsp-title":{fontSize:"$textMd",fontWeight:"$semiBold"},variants:{color:{white:{"& .fsp-header":{background:"white",borderBottom:"1px solid $gray200"},"& .fsp-category":{color:"$gray600"},"& .fsp-title":{color:"$gray900"}},dark:{"& .fsp-header":{background:"$gray900"},"& .fsp-category":{color:"white"},"& .fsp-title":{color:"white"}}}},defaultVariants:{color:"white"}}),yx=e=>{const t=$i();return(0,i.jsxs)(_x,{color:e.color,children:[(0,i.jsxs)(G,{align:"center",className:"fsp-header",gap:"4",height:65,width:1,children:[(0,i.jsx)(Li,{css:{flexShrink:3},width:300}),(0,i.jsxs)(G,{align:"center",css:{flex:"1"},direction:"column",children:[e.category&&(0,i.jsx)(Li,{className:"fsp-category",children:e.category}),(0,i.jsx)(Li,{className:"fsp-title",css:{maxWidth:"100%"},ellipsis:!0,children:e.heading})]}),(0,i.jsxs)(G,{gap:"4",justify:"end",width:300,children:[e.button,(0,i.jsx)(jo,{color:"dark"===e.color?"gray":"white",css:{flexShrink:0},leftIcon:"xmark",onClick:()=>{"function"==typeof e.onClose?e.onClose():t.goBack(e.fallbackClosePath||gf.HOME)}})]})]}),(0,i.jsx)(Li,{css:{height:"calc(100% - 65px)"},width:1,children:e.children})]})},xx=({acl:e,document:t,onDelete:n,...o})=>{const{translate:a}=Hf(),[s,d]=(0,r.useState)(!1),l=$_(),c="public-read"===e||v(t.url),u=v(t.url)?t.url:ux(t,lo.HEAVENT_AWS_UPLOADS_BUCKET),{designSystem:m}=ss();return(0,i.jsxs)(G,{align:"center",css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",fontSize:"$textSm",overflow:"hidden",minHeight:"72px","@tablet":{border:"1px solid $gray300",borderRadius:"$2",fontSize:"$textMd"},...(()=>{switch(m){case is:return{padding:"$3","@tablet":{padding:"$3"}};case os:return{padding:"$4 $6"};default:wr()}})()},justify:"between",width:1,...l&&{onClick:()=>{!function(e,t){const n=document.createElement("a");n.href=e,n.target="_blank",n.download=t,n.click()}(u,t.name)}},...o,children:[(0,i.jsxs)(G,{align:"center",css:{maxInlineSize:"80%"},gap:"4",children:[(0,i.jsx)("img",{src:cx(t.name),style:{color:"black"}}),(0,i.jsx)(W,{css:{ellipsis:!0,wordBreak:"break-all",...(()=>{if(m===os)return{fontWeight:"$medium"}})()},children:t.name})]}),(0,i.jsx)(Li,{css:{flex:"1"}}),(0,i.jsxs)(G,{gap:"2",children:[c&&(0,i.jsxs)(i.Fragment,{children:[!1===l&&(0,i.jsx)(jo,{"aria-label":a("view_48132"),color:"white",leftIcon:"eye",onClick:()=>{d(!0)}}),(0,i.jsx)(jo,{"aria-label":a("download_47607"),color:"white",download:t.name,leftIcon:"download",target:"_blank",to:u})]}),n&&(0,i.jsx)(jo,{"aria-label":a("delete_file_40417"),color:"white",leftIcon:"trash-can",onClick:n})]}),s&&(0,Oo.createPortal)((0,i.jsx)(G,{css:{background:"white",left:"0",position:"absolute",top:"0",zIndex:"250"},height:1,width:1,children:(0,i.jsx)(yx,{heading:t.name,onClose:()=>d(!1),children:(0,i.jsx)(Ix,{fileUrl:u})})}),document.body)]})},Sx=R("progress",{}),vx=e=>(0,i.jsx)(Sx,{...e,children:e.children}),bx=({name:e,progress:t,...n})=>{const o=Math.min(100,Math.max(0,t)),{inputId:a}=SI();return(0,i.jsxs)(G,{css:{border:"1px solid $gray300",borderRadius:"$2",padding:"$4"},direction:"column",width:1,gap:"2",...n,children:[(0,i.jsx)(jI,{htmlFor:a,children:e}),(0,i.jsxs)(vx,{id:a,max:"100",value:o,children:[o,"%"]})]})};var jx=n(3112),Ax=(n(8181),n(9618));const Cx=({allowCrop:e,onChange:t,hint:n,label:o,...a})=>{const s=Oi(),{isDisabled:d}=Hy(),l=(0,r.useRef)(null),[c,u]=(0,r.useState)(!1),[m,g]=(0,r.useState)(null),[h,p]=(0,r.useState)(!1),f=sx(ax.Images),I=e=>{if(e&&e[0]){const t=URL.createObjectURL(e[0]),n=e[0].type,i=new FileReader;i.onload=i=>{g({src:t,type:(0,jx.h)(i.target?.result,n),name:e[0].name})},i.readAsArrayBuffer(e[0])}p(!0)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{gap:"4",width:1,children:[(0,i.jsx)(G,{align:"center",css:{background:c?"$primary50":"$gray50",border:c?"1px solid $primary300":"1px solid $gray200",borderRadius:"$1",cursor:d?"not-allowed":"pointer"},disabled:d,height:126,justify:"center",width:126,onClick:()=>{l.current?.click()},onDragEnter:e=>{To(e),u(!0)},onDragLeave:e=>{To(e),u(!1)},onDragOver:e=>{To(e),c||u(!0)},onDrop:n=>{To(n),u(!1);const i=n.dataTransfer.files.item(0);i&&f.includes(Zs(i.name).extension)&&(e?I(n.dataTransfer.files):t(i))},children:(0,i.jsx)(G,{align:"center",css:{background:c?"$primary100":"$gray100",borderRadius:"36px",color:c?"$primary600":"$gray600"},height:c?48:32,justify:"center",width:c?48:32,children:(0,i.jsx)(_o,{icon:"plus"})})}),(0,i.jsxs)(G,{css:{flex:"1"},direction:"column",children:[(0,i.jsx)(Li,{color:"gray700",fontWeight:"medium",children:o}),n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{color:"gray400",children:n})]}),(0,i.jsx)(oI,{height:"3"}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{onClick:()=>{l.current?.click()},children:s("s_lectionner_un_50712")})})]}),(0,i.jsx)(Li,{css:{display:"none"},children:(0,i.jsx)("input",{ref:l,accept:dx(ax.Images),type:"file",onChange:n=>{n.target.files?.[0]&&(e?I(n.target.files):t(n.target.files[0]))},...a})})]}),e&&h&&m&&(0,i.jsx)(Ex,{image:m,onChange:t,onClose:()=>p(!1)})]})},Ex=({image:e,onChange:t,onClose:n})=>{const o=Oi(),a=(0,r.useRef)(null);return(0,r.useEffect)(()=>()=>{e&&e.src&&URL.revokeObjectURL(e.src)},[e]),(0,i.jsx)(Ty,{size:"md",onClose:n,children:(0,i.jsxs)(G,{css:{overflow:"auto"},direction:"column",gap:"3",children:[(0,i.jsx)(Ax.IOb,{ref:a,className:"cropper",defaultSize:({imageSize:e,visibleArea:t})=>({width:(t||e).width,height:(t||e).height}),src:e.src,stencilProps:{aspectRatio:1}}),(0,i.jsx)(jo,{size:"lg",textAlign:"center",onClick:()=>{const i=a.current?.getCanvas();i&&i.toBlob(n=>{if(n){const i=new File([n],e.name,{lastModified:(new Date).getTime(),type:e.type});t(i)}},e.type,.95),n()},children:o("submit_21373")})]})})},Tx="dragover",Ox=({accept:e,allowCrop:t,"aria-describedby":n,capture:o,onChange:a,...s})=>{const{translate:d}=Hf(),l=Ri(),{isDisabled:c}=Hy(),u=(0,xI.A)(),m=(0,r.useRef)(null),[g,p]=(0,r.useState)(void 0),[f,I]=(0,r.useState)(null),[_,y]=(0,r.useState)(!1),x=sx(e||[]),S=rx(e||[]),v=e=>{if(e&&e[0]){const t=URL.createObjectURL(e[0]),n=e[0].type,i=new FileReader;i.onload=i=>{I({src:t,type:(0,jx.h)(i.target?.result,n),name:e[0].name})},i.readAsArrayBuffer(e[0])}y(!0)},{designSystem:b}=(0,r.useContext)(as);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("input",{ref:m,accept:e?dx(e):void 0,"aria-describedby":[n,u].join(" "),capture:o,style:{display:"none"},type:"file",onChange:n=>{if(n.target.files?.[0])if(t){if(e!==ax.Images)throw new Error("Crop enabled on non-image file uploader");v(n.target.files)}else a(n.target.files[0])},...s}),(0,i.jsxs)(G,{align:"center",className:g,css:{background:"$gray50",borderWidth:"1px",borderColor:"$gray200",borderRadius:"$2",cursor:c?"not-allowed":"pointer",padding:"$4",[`&.${Tx}`]:{background:"$primary50",borderColor:"$gray200"},...(()=>{switch(b){case is:return{borderStyle:"solid"};case os:return{borderStyle:"dashed",[`&:hover, &:has( input:focus), &.${Tx}`]:{borderStyle:"solid",borderColor:"$primary500"}};default:wr()}})()},direction:"column",disabled:c,gap:"2",width:1,onClick:()=>m.current?.click(),onDragLeave:()=>{p(void 0)},onDragOver:e=>{To(e),p(Tx)},onDrop:n=>{To(n),p(void 0);const i=n.dataTransfer.files.item(0);if(i&&(0===x.length||x.includes(Zs(i.name).extension)))if(t){if(e!==ax.Images&&e!=ax.SmallImages)throw new Error("Crop enabled on non-image file uploader");v(n.dataTransfer.files)}else a(i)},children:[(0,i.jsx)(G,{align:"center","aria-hidden":!0,css:{color:"$gray600",...(()=>{switch(b){case is:return{background:"$gray100",borderRadius:"36px"};case os:return;default:wr()}})()},height:32,justify:"center",width:32,children:(0,i.jsx)(_o,{icon:"cloud-arrow-down"})}),(0,i.jsxs)(G,{css:{textAlign:"center"},direction:"column",justify:"center",wrap:"wrap",children:[(0,i.jsx)(W,{textStyle:"subtitle",children:[...l(d("_1_ou_glisser_61813","{1}"),(0,i.jsx)(jo,{color:"invisible",css:{height:"auto",padding:0},id:"clickHereLink",type:"button",children:d("cliquez_ici_98447")}))]}),(0,i.jsx)(W,{id:u,textStyle:"subtitle",children:[...l(d("_1_accept_2_30390","{1}","{2}"),h(x)?x.map((e,t,{length:n})=>(0,i.jsxs)(r.Fragment,{children:[t>0?n-1!==t?", ":" & ":"",(0,i.jsxs)("code",{children:[".",e]})]},e)):d("all_file_format_50211"),S!==1/0?fm.bytesToMegabytes(S):d("no_55268"))]})]})]}),t&&_&&f&&(0,i.jsx)(Ex,{image:f,onChange:a,onClose:()=>y(!1)})]})};var Rx;!function(e){e[e.File=0]="File",e[e.Uploader=1]="Uploader",e[e.Uploading=2]="Uploading"}(Rx||(Rx={}));const Mx=({acl:e,css:t,descId:n,description:o,errorId:a,inputId:s,label:d,labelId:l,hint:c,onChange:u,organizationId:m,state:g,value:h,...p})=>{const{translate:f}=Hf(),[I,_]=(0,r.useState)(h?Rx.File:Rx.Uploader),[y,x]=(0,r.useState)(""),[S,v]=(0,r.useState)(0);return(0,i.jsxs)(G,{"aria-live":"polite",css:t,direction:"column",gap:"1",width:1,children:[(d||o)&&(0,i.jsxs)(G,{direction:"column",children:[(0,i.jsx)(jI,{htmlFor:s,id:l,children:d}),(0,i.jsx)(vI,{id:n,children:o})]}),I===Rx.File&&h?(0,i.jsx)(xx,{acl:e,"aria-label":f("delete_uploaded_14711"),document:h,id:s,role:"button",onDelete:()=>{u(null),_(Rx.Uploader)}}):I===Rx.Uploading?(0,i.jsx)(bx,{"aria-busy":!0,"aria-describedby":n,"aria-label":f("uploading_file_46483"),id:s,name:y,progress:S}):(0,i.jsx)(Ox,{"aria-describedby":n,"aria-errormessage":a,"aria-invalid":"error"===g,"aria-label":f("upload_file_97740"),id:s,onChange:async t=>{_(Rx.Uploading),x(t.name),v(0);try{if(t.size>rx(p.accept||[]))throw x(""),alert(f("file_is_too_lar_57859")),new Error;const n=await lx(m,t,e,v);u({...n,file:t}),_(Rx.File)}catch{_(Rx.Uploader)}},...p}),(0,i.jsx)(bI,{state:g,children:c})]})},Dx=({onChange:e,prefix:t,state:n,withFileField:o,...a})=>{const s=`${t}key`,r=`${t}name`,d=`${t}acl`,l=[s,r,d];let c;return o&&(c=`${t}file`,l.push(c)),(0,i.jsx)(Vy,{names:l,render:t=>{let l=null;v(t[s].input.value)&&v(t[r].input.value)&&v(t[d].input.value)&&(l={key:t[s].input.value,name:t[r].input.value,acl:t[d].input.value});const{invalid:u,hint:m}=Object.values(t).reduce((e,t)=>e.invalid?e:yI(t.meta)?{invalid:!0,hint:t.meta.error||t.meta.submitError}:e,{invalid:!1,hint:void 0});return(0,i.jsx)(Mx,{hint:m,state:u?"error":n,value:l,onChange:n=>{t[s].input.onChange(n?.key??""),t[s].input.onBlur(),t[r].input.onChange(n?.name??""),t[r].input.onBlur(),t[d].input.onChange(n?.acl??""),t[d].input.onBlur(),o&&(t[c].input.onChange(n?.file),t[c].input.onBlur(),n?.file&&e?.(n.file))},...a})}})},wx=e=>{const t=Oi(),[n,o]=(0,r.useState)(!1);return(0,i.jsxs)(G,{gap:"4",width:1,children:[(0,i.jsx)(Li,{css:{border:"1px solid $gray200",borderRadius:"$1",overflow:"hidden",cursor:e.allowCrop?"pointer":void 0},height:126,width:126,onClick:e.allowCrop?()=>o(!0):void 0,children:(0,i.jsx)("img",{src:e.url,style:{objectFit:"cover",inlineSize:"100%",blockSize:"100%"}})}),(0,i.jsxs)(G,{direction:"column",children:[(0,i.jsx)(Li,{color:"gray700",fontWeight:"medium",children:e.label}),e.hint&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{color:"gray400",children:e.hint})]}),(0,i.jsx)(oI,{height:"3"}),(0,i.jsx)(Li,{color:"error700",css:{cursor:"pointer"},fontWeight:"medium",onClick:e.onDelete,children:t("supprimer_43083")})]}),e.allowCrop&&n&&(0,i.jsx)(Ex,{image:{name:e.url.split("/").pop().split(".").join("-cropped."),src:`${e.url}?cacheblock=true`},onChange:e.onChange,onClose:()=>o(!1)})]})},$x=e=>(0,i.jsxs)(G,{gap:"4",width:1,children:[(0,i.jsx)(G,{align:"center",css:{background:"$gray50",border:"1px solid $gray200",borderRadius:"$1",cursor:"pointer"},height:126,justify:"center",width:126,children:(0,i.jsx)(G,{height:64,width:64,children:(0,i.jsx)(yo,{color:M.colors.gray900.value,height:"64px",strokeWidth:"4",width:"64px"})})}),(0,i.jsxs)(G,{direction:"column",children:[(0,i.jsx)(Li,{color:"gray700",fontWeight:"medium",children:e.label}),e.hint&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{color:"gray400",children:e.hint})]})]})]}),Px=({allowCrop:e,value:t,onChange:n,label:o,hint:a,organizationId:s,...d})=>{const[l,c]=(0,r.useState)(t?Rx.File:Rx.Uploader),u=async e=>{c(Rx.Uploading);try{const t=await lx(s,e,"public-read");n(t),c(Rx.File)}catch{c(Rx.Uploader)}};return l===Rx.File&&t?(0,i.jsx)(wx,{allowCrop:e,hint:a,label:o,url:ux(t,lo.HEAVENT_AWS_UPLOADS_BUCKET),onChange:u,onDelete:()=>{n(null),c(Rx.Uploader)}}):l===Rx.Uploading?(0,i.jsx)($x,{hint:a,label:o}):(0,i.jsx)(Cx,{allowCrop:e,hint:a,label:o,onChange:u,...d})},Nx=({prefix:e,...t})=>{const n=`${e}key`,o=`${e}name`,a=`${e}acl`;return(0,i.jsx)(Vy,{names:[n,o,a],render:e=>{let s=null;return v(e[n].input.value)&&v(e[o].input.value)&&v(e[a].input.value)&&(s={key:e[n].input.value,name:e[o].input.value,acl:e[a].input.value}),(0,i.jsx)(Px,{value:s,onChange:t=>{e[n].input.onChange(t?.key??""),e[o].input.onChange(t?.name??""),e[a].input.onChange(t?.acl??"")},...t})}})},kx=R("div",{variants:{direction:{horizontal:{width:"100%"},vertical:{height:"100%"}},color:{gray100:{},gray200:{}}},compoundVariants:[{direction:"horizontal",color:"gray100",css:{borderTop:"1px solid $gray100"}},{direction:"vertical",color:"gray100",css:{borderRight:"1px solid $gray100"}},{direction:"horizontal",color:"gray200",css:{borderTop:"1px solid $gray200"}},{direction:"vertical",color:"gray200",css:{borderRight:"1px solid $gray200"}}],defaultVariants:{color:"gray200"}}),zx=e=>(0,i.jsx)(kx,{"aria-orientation":e.direction,color:e.color,css:e.css,direction:e.direction,role:"separator"}),Lx=({value:e,onChange:t,css:n,label:o,state:a,description:s,hint:d,...l})=>{const c=Oi(),u=(0,r.useCallback)(e=>{e&&p(e.getBoundingClientRect().width)},[]),m=(0,r.useCallback)(e=>e?.focus({preventScroll:!0}),[]),[h,p]=(0,r.useState)(200),[f,I]=(0,r.useState)(!1),[y,x]=(0,r.useState)(""),S=Ti(Qd),b=(0,r.useMemo)(()=>(0,vs.A)(S.countries.flatMap(e=>g(e.phoneCode).map(t=>({...e,phoneCode:t}))),({name:e})=>_(e)),[]),j=(0,r.useMemo)(()=>b.find(({code:t,phoneCode:n})=>t===e.country&&n===e.code),[e.country,e.code]),A=(0,r.useMemo)(()=>b.filter(e=>!v(y)||e.name.toLowerCase().includes(y.trim().toLowerCase())||e.phoneCode.includes(y.trim())),[b,y]),C=(0,r.useMemo)(()=>A.map((n,o)=>(0,i.jsx)(Y_,{onClick:()=>{t({...e,country:n.code,code:n.phoneCode}),x(""),I(!1)},children:(0,i.jsxs)(G,{gap:"2",width:1,children:[(0,i.jsx)(Li,{children:n.emoji}),(0,i.jsx)(Li,{css:{ellipsis:!0},children:n.name}),(0,i.jsx)(Li,{color:"gray500",children:n.phoneCode})]})},o)),[A,e,t]),{inputId:E,descId:T,errorId:O}=SI();return(0,i.jsxs)(G,{ref:u,css:n,direction:"column",width:1,children:[(0,i.jsx)(jI,{htmlFor:E,children:o}),(0,i.jsx)(vI,{id:T,children:s}),(o||s)&&(0,i.jsx)(oI,{height:"1"}),(0,i.jsxs)(G,{children:[(0,i.jsxs)(F_,{disabled:"disabled"===a,isOpen:f,onStateChange:e=>I(e),children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(CI,{css:{borderRight:"none",borderBottomRightRadius:"0",borderTopRightRadius:"0",userSelect:"none",width:"100px","& .styled-input-container-circle-exclamation":{display:"none"},cursor:"disabled"===a?"not-allowed !important":void 0},cursor:"pointer",rightIcon:f?"chevron-up":"chevron-down",state:a,children:j&&(0,i.jsxs)(Li,{width:1,children:[j.emoji," ",j.phoneCode]})})}),(0,i.jsx)(K_,{placement:"bottom-start",renderOnPortal:!0,width:h,children:(0,i.jsxs)(G,{direction:"column",height:Math.min(201,40*A.length+41),width:1,children:[(0,i.jsx)(Li,{css:{padding:"$2 $4","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"},"& input::placeholder":{color:"$gray500",opacity:1},"& input::-ms-input-placeholder ":{color:"$gray500",opacity:1}},height:40,children:(0,i.jsx)("input",{ref:m,"aria-label":c("indicatif_t_l_p_02025"),placeholder:c("rechercher_un_p_04678"),type:"text",value:y,onChange:e=>{x(e.target.value)}})}),(0,i.jsx)(zx,{color:"gray100",direction:"horizontal"}),(0,i.jsx)(G,{css:{height:"calc(100% - 41px)",overflowY:"auto"},direction:"column",children:C})]})})]}),(0,i.jsx)(CI,{css:{borderBottomLeftRadius:"0",borderTopLeftRadius:"0",flex:"1"},cursor:"text",state:a,children:(0,i.jsx)(Li,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"},"& input::placeholder":{color:"$gray500",opacity:1},"& input::-ms-input-placeholder ":{color:"$gray500",opacity:1}},children:(0,i.jsx)("input",{"aria-describedby":s?T:void 0,"aria-errormessage":"error"===a?O:void 0,"aria-invalid":"error"===a,autoComplete:"tel-national",disabled:"disabled"===a,id:E,type:"tel",value:e.number,onChange:n=>{t({...e,number:n.target.value})},...l})})})]}),(0,i.jsx)(bI,{id:O,state:a,children:d})]})},Fx=(0,r.memo)(function({prefix:e,hint:t,state:n,...o}){const{isDisabled:a}=Hy(),s=`${e}country`,r=`${e}code`,d=`${e}number`;return(0,i.jsx)(Vy,{names:[s,r,d],render:e=>{const l=yI(e[r].meta)||yI(e[d].meta);return(0,i.jsx)(Lx,{hint:l?e[r].meta.error||e[d].meta.error:t,state:l?"error":a?"disabled":n,value:{country:e[s].input.value,code:e[r].input.value,number:e[d].input.value},onChange:t=>{e[s].input.onChange(t.country),e[r].input.onChange(t.code),e[d].input.onChange(t.number)},...o})}})});var Ux=n(7456);const Bx=e=>(0,i.jsx)(G,{css:{background:"$gray50",boxShadow:"0px -1px 3px rgba(16, 24, 40, 0.1), 0px -1px 2px rgba(16, 24, 40, 0.06)",color:"$primary500",cursor:"pointer",padding:"$3 $4",userSelect:"none"},width:1,onClick:e.onClick,children:e.children}),Gx=({children:e,index:t,state:n,onToggle:o,...a})=>(0,i.jsxs)(i.Fragment,{children:[0!==t&&(0,i.jsx)(oI,{height:"6"}),(0,i.jsxs)(G,{align:"center",css:o?{cursor:"pointer",userSelect:"none"}:void 0,gap:"2",width:1,onClick:o,children:[o&&(0,i.jsx)(Ky,{shouldPreventDefault:!1,state:n??"unchecked",onClick:RI.A}),(0,i.jsx)(Li,{"aria-label":e?.toString(),css:{flex:"1"},font:"gray600 textXs semiBold",role:"group",...a,children:e})]}),(0,i.jsx)(oI,{height:"2"})]});function Vx(e){return r.Children.toArray(e).flatMap(e=>(0,r.isValidElement)(e)&&e.type===r.Fragment?Vx(e.props.children):e)}function Wx(e){return"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(Wx).join(""):(0,r.isValidElement)(e)?Wx(e.props.children):""}const qx=({badge:e,children:t,color:n,css:o,disabled:a,isCheckbox:s,isRadio:d,isSelected:l,onClick:c,subtext:u,value:m,...g})=>{const h=(0,r.useCallback)(()=>{a||c?.()},[a,c]),p=(0,r.useCallback)(e=>{"Enter"===e.key&&h?.()},[h]),f=(0,r.useMemo)(()=>Wx(t),[t]);return(0,i.jsxs)(G,{align:"center","aria-checked":s?l:void 0,"aria-label":f,"aria-selected":l,css:{cursor:a?"default":"pointer",minHeight:"40px",padding:"$2 $3",userSelect:"none","&:hover":{background:"$gray100",borderRadius:"$1"},...o},gap:"3",role:"option",tabIndex:0,width:1,onClick:h,onKeyDown:p,...g,children:[s&&(0,i.jsx)(Ky,{disabled:a,shouldPreventDefault:!1,state:l?"checked":"unchecked",onClick:RI.A}),d&&(0,i.jsx)(vy,{shouldPreventDefault:!1,state:l?"checked":"unchecked",onClick:RI.A}),(0,i.jsxs)(G,{align:"center",css:{flex:"1",overflow:"hidden"},gap:"2",children:[fy(n)&&!e&&(0,i.jsx)(Li,{css:{background:n,borderRadius:"16px",overflow:"hidden"},height:16,width:16}),fy(n)&&e?(0,i.jsx)(G,{css:{flex:"1",overflow:"hidden"},children:(0,i.jsx)(My,{color:n,children:t})}):(0,i.jsxs)(G,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)(Li,{color:"gray800",css:{ellipsis:!0},title:f,width:1,children:t}),v(u)&&(0,i.jsx)(Li,{color:"gray500",css:{ellipsis:!0},title:u,width:1,children:u})]})]}),!s&&!d&&l&&(0,i.jsx)(Li,{color:"primary500",children:(0,i.jsx)(_o,{icon:"check"})})]})};function Yx(e,t){if(0===e.length)return"unchecked";{const n=(0,bl.A)(e,t).length;return 0===n?"unchecked":n>=e.length?"checked":"indeterminate"}}function Hx(e,t,n){return"checked"===n?(0,vg.A)(e,t):(0,qo.A)(e.concat(t))}function Zx(e){return r.Children.toArray(e).map(t=>{if("optgroup"===t.type)return[{id:(0,xI.A)(),type:"group",text:t.props.label}].concat(Zx(t.props.children));if("option"===t.type)return{id:(0,xI.A)(),type:"option",text:t.props.children,value:t.props.value,badge:!0===t.props["data-badge"]||"true"===t.props["data-badge"],color:t.props["data-color"],disabled:t.props.disabled,radio:t.props["data-radio"],selected:t.props.selected,style:t.props.style,subtext:t.props["data-subtext"]};if(t.type===Symbol.for("react.fragment"))return Zx(t.props.children);throw o("Unexpected child type",t,e),new Error("Unexpected child type")}).flat()}function Kx(e){return Object.fromEntries(e.filter(e=>"option"===e.type).map(e=>[e.value,e.text]))}const Qx=({children:e,createText:t,css:n,description:o,hint:a,icon:s,isCreateVisible:d,isSearchLoading:l,isSearchVisible:c,isSelectAllVisible:u,label:m,menuWidth:g,multiple:p,onChange:f,onClick:I,onCreateClick:_,placeholder:x,renderOnPortal:S,renderValue:j,searchElement:A,searchPlaceholder:C,state:E,triggerElem:T,values:O})=>{const{translate:R}=Hf(),M=(0,r.useCallback)(e=>e?.focus({preventScroll:!0}),[]),[D,w]=(0,r.useState)(!1),[$,P]=(0,r.useState)(""),{inputId:N,descId:k}=SI(),{displayedChildren:z,allValues:L,valuesByGroup:F,childrenByRadio:U,valueToName:B,valueToText:V}=function(e,t){const n=(0,r.useMemo)(()=>Zx(e),[e]),i=(0,r.useMemo)(()=>{const e=y(t||"");return n.filter(t=>""===e||"group"===t.type||y(Wx(t.text)).includes(e)).filter((e,t,n)=>{const i=n[t+1];return"option"===e.type||"option"===i?.type})},[n,t]),o=(0,r.useMemo)(()=>i.flatMap(e=>"option"===e.type?[e.value]:[]),[i]),a=(0,r.useMemo)(()=>{const e={};let t=null;for(const n of i)"group"===n.type?(t=n.id,e[t]=[]):t&&!n.disabled&&b(n.radio)&&e[t].push(n.value);return e},[i]),s=(0,r.useMemo)(()=>(0,cy.A)((0,ym.A)(i.filter(e=>"option"===e.type&&v(e.radio)),e=>e.radio),e=>e.map(e=>e.value)),[i]),d=(0,r.useMemo)(()=>Kx(n),[n]),l=(0,r.useMemo)(()=>(0,cy.A)(d,Wx),[d]);return{displayedChildren:i,allValues:o,valuesByGroup:a,childrenByRadio:s,valueToName:d,valueToText:l}}(e,$),W=Yx(L,O),q=(0,r.useMemo)(()=>j?j(O[0],B[O[0]]):B[O[0]],[j,O,B]);return(0,r.useEffect)(()=>{D||P("")},[D]),(0,i.jsxs)(G,{css:n,direction:"column",width:1,children:[m&&(0,i.jsx)(jI,{htmlFor:N,children:m}),o&&(0,i.jsx)(vI,{id:k,children:o}),(m||o)&&(0,i.jsx)(oI,{height:"1"}),(0,i.jsxs)(F_,{disabled:"disabled"===E,isOpen:D,onStateChange:e=>w(e),children:[(0,i.jsx)(Q_,{children:T||(0,i.jsx)(CI,{"aria-describedby":k,"aria-label":(m??x)+(V[O[0]]?` (currently: ${V[O[0]]})`:""),"aria-multiselectable":p,"aria-owns":z.map(e=>e.id).join(" "),"aria-placeholder":x,css:{maxHeight:"200px",overflowY:"auto",padding:"$2 $3",userSelect:"none",cursor:"disabled"===E?"not-allowed":void 0},cursor:"disabled"===E?"default":"pointer",height:"fluid",icon:s,id:N,rightIcon:D?"chevron-up":"chevron-down",role:"listbox",state:E,children:h(O)?p?(0,i.jsx)(G,{css:{flex:"1",overflowY:"auto"},gap:"2",height:1,role:"presentation",wrap:"wrap",children:O.map((e,t)=>(0,i.jsx)(My,{ellipsis:!0,rightIcon:"xmark",onRightIconClick:t=>{To(t),f((0,Ux.A)(O,e))},children:B[e]},t))}):(0,i.jsx)(Li,{color:"gray800",css:{flex:"1",overflow:"hidden"},role:"presentation",children:(0,i.jsx)(Li,{css:{ellipsis:!0},title:V[O[0]],children:q})}):(0,i.jsx)(Li,{color:"gray500",css:{flex:"1"},role:"presentation",children:x})})}),(0,i.jsx)(K_,{css:{padding:"0"},placement:"bottom-start",renderOnPortal:S,width:g??"match",children:(0,i.jsxs)(G,{direction:"column",width:1,children:[(0,i.jsxs)(G,{css:{padding:"$3"},direction:"column",width:1,children:[c&&(0,i.jsxs)(i.Fragment,{children:[A||(0,i.jsx)(EI,{ref:M,icon:"magnifying-glass",placeholder:C||R("rechercher_50038"),state:"search",value:$,onChange:P}),(0,i.jsx)(oI,{height:"3"})]}),(0,i.jsx)(Li,{css:{maxHeight:"250px",overflowY:"auto"},children:l?(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(UI,{borderRadius:"$1",height:40}),(0,i.jsx)(UI,{borderRadius:"$1",height:40}),(0,i.jsx)(UI,{borderRadius:"$1",height:40})]}):z.map((e,t)=>{if("group"===e.type){const n=F[e.id]??[],o=!0===p&&h(n),a=Yx(n,O);return(0,i.jsx)(Gx,{id:e.id,index:t,state:o?a:void 0,onToggle:o?()=>{f(Hx(O,n,a))}:void 0,children:e.text},e.id)}{const n=e.value,o=e.selected??O.includes(n),a=e.radio,s=!0===p&&b(a),r=!0===p&&v(a);return(0,i.jsx)(qx,{badge:e.badge,color:e.color,css:e.style,disabled:e.disabled,id:e.id,isCheckbox:s,isRadio:r,isSelected:o,subtext:e.subtext,value:e.value,onClick:()=>{if(I)I(n,o);else if(p&&s)f(o?(0,Ux.A)(O,n):O.concat(n));else if(p&&r){const e=(0,vg.A)(O,U[a]).concat(o?[]:[n]);f(e)}else f(o?[]:[n]),w(!1)},children:e.text},t)}})})]}),d&&(0,i.jsxs)(Bx,{onClick:()=>{_?.(),w(!1)},children:["+ ",t||R("cr_er_82895")]}),u&&(0,i.jsx)(Bx,{onClick:()=>{f(Hx(O,L,W))},children:R("checked"===W?"tout_d_s_lectio_37372":"tout_s_lectionn_48027")})]})})]}),(0,i.jsx)(bI,{state:E,children:a})]})},Xx=({name:e,hint:t,state:n,multiple:o,...a})=>{const{isDisabled:s}=Hy();return(0,i.jsx)(nI.D0,{name:e,render:r=>{const d=yI(r.meta);return(0,i.jsx)(Qx,{hint:d?r.meta.error:t,multiple:o,name:e,state:d?"error":s?"disabled":n,values:o?Array.isArray(r.input.value)?r.input.value:[]:"number"==typeof r.input.value||v(r.input.value)?[r.input.value]:[],onChange:e=>{o?r.input.onChange(e):h(e)?r.input.onChange(e[0]):r.input.onChange(null)},...a})}})},Jx=R("select",{backgroundColor:"$white",height:"100%",left:0,opacity:0,position:"absolute",top:0,width:"100%"}),eS=R("div",{ellipsis:""}),tS=({autoComplete:e,children:t,css:n,label:o,description:a,shouldParseAsInt:s,shouldParseAsBoolean:d,onChange:l,hint:c,icon:u,state:m,value:g="",...h})=>{const p=r.useMemo(()=>Kx(Zx(t)),[t]),{inputId:f,descId:I,errorId:_}=SI();return(0,i.jsxs)(G,{css:n,direction:"column",width:1,children:[(0,i.jsx)(jI,{htmlFor:f,children:o}),(0,i.jsx)(vI,{id:I,children:a}),(o||a)&&(0,i.jsx)(oI,{height:"1"}),(0,i.jsxs)(CI,{cursor:"default",icon:u,state:m,children:[(0,i.jsx)(G,{align:"center",css:{flex:"1",overflow:"hidden"},height:1,width:1,children:(0,i.jsx)(eS,{children:p[g.toString()]})}),(0,i.jsx)(G,{css:{color:"$gray500"},children:(0,i.jsx)(_o,{icon:"chevron-down"})}),(0,i.jsx)(Jx,{"aria-describedby":a?I:void 0,"aria-errormessage":"error"===m?_:void 0,"aria-invalid":"error"===m,autoComplete:e??"off",css:{cursor:"disabled"===m?"not-allowed":"pointer"},disabled:"disabled"===m,id:f,value:g.toString(),onChange:e=>{l(s?parseInt(e.target.value,10):d?"true"===e.target.value:e.target.value)},...h,children:t})]}),(0,i.jsx)(bI,{id:_,state:m,children:c})]})},nS=({name:e,hint:t,state:n,...o})=>(0,i.jsx)(nI.D0,{name:e,render:a=>{const s=yI(a.meta);return(0,i.jsx)(tS,{hint:s?a.meta.error:t,name:e,state:s?"error":n,value:a.input.value,onBlur:a.input.onBlur,onChange:e=>{a.input.onChange(e)},onFocus:a.input.onFocus,...o})}}),iS=({css:e,label:t,description:n,state:o,icon:a,hint:s,rightIcon:r,rightText:d,onChange:l,value:c,...u})=>{const{inputId:m,descId:g,errorId:h}=SI();return(0,i.jsxs)(G,{css:e,direction:"column",width:1,children:[(0,i.jsx)(jI,{htmlFor:m,children:t}),(0,i.jsx)(vI,{id:g,children:n}),(t||n)&&(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(CI,{cursor:"text",height:"fluid",icon:a,rightIcon:r,rightText:d,state:o,children:(0,i.jsxs)(zI,{css:{flex:"1",minHeight:"100px",py:"$3","& .replicated-text":{whiteSpace:"pre-wrap",visibility:"hidden"},"& textarea":{outline:"none",overflow:"hidden",resize:"none"},"& .replicated-text, & textarea":{background:"transparent",border:"none",gridArea:"1 / 1 / 2 / 2",width:"100%"},"& textarea::placeholder":{color:"$gray500",opacity:1},"& input::-ms-input-placeholder":{color:"$gray500",opacity:1}},children:[(0,i.jsx)("textarea",{"aria-describedby":n?g:void 0,"aria-errormessage":"error"===o?h:void 0,"aria-invalid":"error"===o,disabled:"disabled"===o,id:m,value:c,onChange:e=>{l(e.target.value)},...u}),(0,i.jsxs)(Li,{className:"replicated-text",children:[c," "]})]})}),(0,i.jsx)(bI,{id:h,state:o,children:s})]})},oS=({name:e,hint:t,state:n,...o})=>(0,i.jsx)(nI.D0,{name:e,render:a=>{const s=yI(a.meta);return(0,i.jsx)(iS,{hint:s?a.meta.error:t,name:e,state:s?"error":n,value:a.input.value,onBlur:a.input.onBlur,onChange:e=>{a.input.onChange(e)},onFocus:a.input.onFocus,...o})}});function aS(){const e=Oi();return t=>(0,vs.A)(t.map(t=>({value:t,translation:e(t)})),({translation:e})=>y(e)).map(({value:e,translation:t},n)=>(0,i.jsx)("option",{value:e,children:t},n))}function sS(e,t){const n=Ti(Qd),o=aS();return(0,r.useMemo)(()=>e?e.fieldType===Fe.Country?n.getCountriesIdName(t).map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e)):e.fieldType===Fe.Language?e.fieldProperty===ze.Language?o(Jd):o(Hn):e.fieldType===Fe.Nationality?n.getNationalitiesIdName(t).map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e)):e.fieldType===Fe.Sex?o(ci):e.values.map(({id:t,value:n,color:o})=>(0,i.jsx)("option",{"data-badge":e.listType===Xe.Badge,"data-color":e.listType===Xe.Default?void 0:o,value:t,children:n},t)):(0,i.jsx)(i.Fragment,{}),[e,t])}function rS(e,t){const n=t=>e.address_components?.find(({types:e})=>e.includes(t)),i=n("country")?.short_name;return{street:e.name,postalCode:n("postal_code")?.long_name,city:n("locality")?.long_name,countryCode:t.countryCodeExists(i)?i:void 0}}const dS=e=>{const{translate:t}=Hf(),n=Ti(Qd),o=Ti(Wl),a=sS(e.field,e.countryCode),s=e.isMandatory?e.field.name:(0,i.jsx)(Gy,{children:e.field.name}),d=`${e.prefix}${e.field.slug}`,l=e.field.description,c=(0,r.useMemo)(()=>d.startsWith("formRegister.userInfo.fields."),[d]),u=function({change:e,field:t,prefix:n}){const i=Ti(Qd),o=(0,nI.mN)();return(0,r.useMemo)(()=>{const a=function(e){return e.fieldProperty===ze.Street?{isCity:!1,postalCode:"postalCode",city:"city",country:"country",latitude:"latitude",longitude:"longitude"}:e.fieldProperty===ze.BirthCity?{isCity:!0,postalCode:"birthPostalCode",city:null,country:"birthCountry",latitude:null,longitude:null}:e.addressPostalCodeCustomField||e.addressCityCustomField||e.addressCountryCustomField?{isCity:!1,postalCode:e.addressPostalCodeCustomField?.slug??null,city:e.addressCityCustomField?.slug??null,country:e.addressCountryCustomField?.slug??null,latitude:null,longitude:null}:null}(t);if(a){const t=(t,i,a=!1)=>{if(t&&void 0!==i){const s=`${n}${t}`;(a||o.getFieldState(s))&&e(s,i)}};return{getAddress(e){const t=rS(e,i);return(a.isCity?t.city:t.street)??e.formatted_address??""},onPlaceChange(e){const n=rS(e,i);t(a.postalCode,n.postalCode),t(a.city,n.city),t(a.country,n.countryCode),t(a.latitude,e.geometry?.location?.lat(),!0),t(a.longitude,e.geometry?.location?.lng(),!0)}}}return{}},[e,i,t,o,n])}(e);if((0,r.useEffect)(()=>{e.display||e.change(d,o.fieldUpdateInputDefault(e.field,n.getDefaultCountryValues()))},[e.display,e.field,e.change]),!e.display)return null;switch(e.field.fieldType){case Fe.Text:return(0,i.jsx)(TI,{description:l,disabled:e.disabled,label:s,name:d});case Fe.Textarea:return(0,i.jsx)(oS,{description:l,disabled:e.disabled,label:s,name:d});case Fe.Checkbox:return(0,i.jsx)(Xy,{disabled:e.disabled,name:d,subtext:l,children:s});case Fe.Validation:return(0,i.jsx)(Xy,{disabled:e.disabled,name:d,subtext:(0,i.jsxs)(i.Fragment,{children:[v(l)&&(0,i.jsx)("span",{children:l}),v(l)&&e.field.document&&(0,i.jsx)("br",{}),e.field.document&&(0,i.jsx)(WI,{css:{color:"$primary500"},download:e.field.document.name,to:e.field.document.url,onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},children:t("consulter_le_do_69928")})]}),children:s});case Fe.Select:return e.field.canSelectMultiple?(0,i.jsx)(Xx,{description:l,disabled:e.disabled,isSearchVisible:!0,isSelectAllVisible:!0,label:s,multiple:!0,name:d,children:a}):(0,i.jsx)(Xx,{description:l,disabled:e.disabled,isSearchVisible:!0,label:s,name:d,placeholder:t("choisir_une_val_00277"),children:a});case Fe.Date:return"dateOfBirth"===e.field.slug?(0,i.jsx)(ex,{autoComplete:c?"bday":void 0,description:l,disabled:e.disabled,label:s,max:Cl,min:Al,name:d}):(0,i.jsx)(ex,{description:l,disabled:e.disabled,label:s,name:d});case Fe.Datetime:return(0,i.jsx)(nx,{description:l,disabled:e.disabled,label:s,name:d});case Fe.Time:return(0,i.jsx)(ox,{description:l,disabled:e.disabled,label:s,name:d});case Fe.Phone:return(0,i.jsx)(Fx,{description:l,disabled:e.disabled,label:s,prefix:`${d}.`});case Fe.Number:return(0,i.jsx)(TI,{description:l,disabled:e.disabled,label:s,name:d,shouldParseAsInt:!0});case Fe.Sex:return(0,i.jsxs)(nS,{autoComplete:c?"sex":void 0,description:l,disabled:e.disabled,label:s,name:d,children:[(0,i.jsx)("option",{disabled:!0,value:"",children:t("choisir_une_val_00277")}),a]});case Fe.Language:return(0,i.jsx)(Xx,{autoComplete:c?"language":void 0,description:l,disabled:e.disabled,isSearchVisible:!0,label:s,name:d,placeholder:t("choisir_une_val_00277"),children:a});case Fe.Nationality:return(0,i.jsx)(Xx,{description:l,disabled:e.disabled,isSearchVisible:!0,label:s,name:d,placeholder:t("choisir_une_val_00277"),children:a});case Fe.Address:return(0,i.jsx)(qy,{addressName:d,autoComplete:c?"street-address":void 0,description:l,disabled:e.disabled,label:s,...u});case Fe.Country:return(0,i.jsx)(Xx,{autoComplete:c?"country":void 0,description:l,disabled:e.disabled,isSearchVisible:!0,label:s,name:d,placeholder:t("choisir_une_val_00277"),children:a});case Fe.File:return e.field.fileType===Be.Picture?(0,i.jsx)(Nx,{allowCrop:!0,disabled:e.disabled,hint:l,label:s,organizationId:e.organizationId,prefix:`${d}.`}):(0,i.jsx)(Dx,{accept:[ax.Images,ax.Pdf,ax.Videos],acl:e.fileAcl??"private",description:l,disabled:e.disabled,label:s,organizationId:e.organizationId,prefix:`${d}.`});default:return wr(e.field.fieldType)}};var lS=n(9120);const cS=e=>(0,vs.A)(e,e=>e.toMillis()),uS=R("div",{alignItems:"center",borderRadius:"$2",color:"$gray400",display:"flex",fontWeight:"$medium",height:"32px",justifyContent:"center",userSelect:"none",width:"32px",variants:{isSelectable:{true:{color:"$gray800",cursor:"pointer","&:hover":{background:"$primary500",color:"white"}}},isSelected:{true:{background:"$primary500",color:"white",cursor:"pointer"}}},compoundVariants:[{isSelectable:!0,isSelected:!0,css:{background:"$primary500",color:"white",cursor:"pointer"}}]}),mS=({datesToTitle:e,disabledDates:t,firstDayOfMonth:n,max:o,min:a,onChange:s,startHour:d,values:l})=>{const c=Oi(),u=Ti(jl),m=(0,r.useMemo)(()=>n.minus({day:n.weekday-1}),[n]),g=(0,r.useMemo)(()=>n.endOf("month"),[n]),p=(0,r.useMemo)(()=>{const e=g.plus({day:7-g.weekday});return Math.ceil(e.diff(m,"days").days)},[g]),f=(0,r.useMemo)(()=>(0,dm.A)(0,p).map(e=>{const i=m.plus({day:e}).set({hour:d||0}),s=i.toMillis(),r=l.some(e=>e.toMillis()===s),c=!!h(t)&&t.some(e=>e.toMillis()===s);return{day:i,isSelected:r,isDisabled:c,isSelectable:!c&&i.month===n.month&&i>=a&&i<=o}}),[m,p,l,t,d]),I=(0,r.useMemo)(()=>!f.some(({isSelectable:e,isSelected:t})=>e&&!t),[f]),_=(0,r.useCallback)(()=>{s(I?[]:f.flatMap(({day:e,isSelectable:t,isSelected:n})=>t||n?[e]:[]))},[f,I,s]);return(0,i.jsxs)(G,{css:{background:"white",bd:!0,padding:"$5 $4"},direction:"column",children:[(0,i.jsx)(Li,{css:{textTransform:"capitalize"},font:"gray800 textXl semiBold",textAlign:"center",width:1,children:u.toLocaleString(n,{month:"long",year:"numeric"})}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(zI,{gap:"2",gridtemplatecolumns:"repeat(7, 32px)",gridtemplaterows:"auto",children:(0,dm.A)(0,7).map(e=>{const t=m.plus({day:e});return(0,i.jsx)(Li,{css:{textTransform:"capitalize"},font:"gray500 textXs medium",width:32,children:u.toLocaleString(t,{weekday:"short"})},e)})}),(0,i.jsx)(oI,{height:"5"}),(0,i.jsx)(zI,{gap:"2",gridtemplatecolumns:"repeat(7, 32px)",gridtemplaterows:"auto",children:f.map(({day:t,isSelected:n,isSelectable:o},a)=>(0,i.jsx)(uS,{isSelectable:o,isSelected:n,title:e?.[t.toMillis()],onClick:e=>{if(o&&n)s(cS((0,lS.A)(l,[t],e=>e.toMillis())));else if(o&&!n){const n=l.findLast(e=>en.plus({day:e+1}));s(cS([...l,...i]))}else s(cS([...l,t]))}},children:t.day},a))}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(jo,{color:"white",textAlign:"center",onClick:_,children:c(I?"tout_d_s_lectio_37372":"tout_s_lectionn_48027")})]})},gS=e=>{const{translate:t}=Hf(),{minDate:n,maxDate:o,numberOfMonths:a,totalDaysDiff:s}=(0,r.useMemo)(()=>function(e){const t=e.filter(e=>e.date?.isValid),n=(0,xg.A)(t.map(e=>e.date),e=>e.toMillis()),i=(0,Sg.A)(t.map(e=>e.date),e=>e.toMillis()),o=Math.ceil(i.endOf("month").diff(n.startOf("month"),"months").months),a=Math.ceil(i.diff(n,"days").days);return{minDate:n,maxDate:i,numberOfMonths:o,totalDaysDiff:a}}(e.slots),[e.slots]),d=(0,r.useMemo)(()=>e.slots.flatMap(t=>t.date?.isValid&&e.accreditationsSlotsIds.includes(t.id)?[t.date]:[]),[e.slots,e.accreditationsSlotsIds]),l=(0,r.useMemo)(()=>(0,dm.A)(0,s).flatMap(t=>{const i=n.plus({day:t});return e.slots.some(e=>e.date?.isValid&&e.date.toMillis()===i.toMillis())?[]:[i]}),[n,s,e.slots]),c=(0,r.useMemo)(()=>Object.fromEntries(e.slots.flatMap(n=>{const i=e.slotIdToDas?.[n.id];return n.date?.isValid&&"number"==typeof i?.maxResources?[[n.date.toMillis(),Dy(t,i.assignedResources,i.maxResources)]]:[]})),[e.slotIdToDas,e.slots,t]);return(0,i.jsx)(G,{gap:"4",wrap:"wrap",children:(0,dm.A)(0,a).map(t=>{const s=n.plus({month:t}).startOf("month"),r=0===t?n:s,u=t===a-1?o:s.endOf("month"),m=d.filter(e=>e.startOf("month").equals(s));return(0,i.jsx)(mS,{datesToTitle:c,disabledDates:l,firstDayOfMonth:s,max:u,min:r,values:m,onChange:t=>{e.onChange(function(e,t,n,i){const o=(0,vg.A)(e,t.flatMap(e=>e.date?.isValid&&n.equals(e.date.startOf("month"))?[e.id]:[]));return t.flatMap(e=>i.some(t=>e.date?.isValid&&t.startOf("day").equals(e.date.startOf("day")))?[e.id]:[]).concat(o)}(e.accreditationsSlotsIds,e.slots,s,t))}},t)})})},hS=e=>{const{translate:t}=Hf(),n=(0,r.useMemo)(()=>e.slots.filter(e=>e.date?.isValid),[e.slots]);return h(n)?(0,i.jsx)(gS,{...e,slots:n}):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})},pS=e=>{const{translate:t}=Hf(),n=Ti(jl);return(0,i.jsx)(i.Fragment,{children:h(e.slots)?e.slots.map(t=>(0,i.jsx)(Qy,{disabled:e.getDisabled(t.id),state:e.accreditationsSlotsIds.includes(t.id)?"checked":"unchecked",onClick:n=>{e.onChange(f(e.accreditationsSlotsIds,t.id,"checked"===n))},children:(0,i.jsxs)(G,{align:"center",gap:"1",children:[(0,i.jsx)(Li,{css:{textTransform:"capitalize"},children:Dg(n,t,e.accreditation.name,{date:{localeFormat:oa.DateOnly.WeekdayLongMonthLong}})}),(0,i.jsx)(wy,{getAssignedMaxRemaining:e.getAssignedMaxRemaining,slotId:t.id})]})},t.id)):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},fS=e=>{const{translate:t}=Hf(),n=Ti(jl),o=(0,r.useMemo)(()=>e.slots.map(e=>e.id),[e.slots]);return(0,i.jsx)(i.Fragment,{children:h(e.slots)?e.slots.map(t=>(0,i.jsx)(by,{disabled:e.getDisabled(t.id),state:e.accreditationsSlotsIds.includes(t.id)?"checked":"unchecked",onClick:n=>{const i=[...e.accreditationsSlotsIds.filter(e=>!o.includes(e)),..."checked"===n?[t.id]:[]];e.onChange(i)},children:(0,i.jsxs)(G,{align:"center",gap:"1",children:[(0,i.jsx)(Li,{css:{textTransform:"capitalize"},children:Dg(n,t,e.accreditation.name,{date:{localeFormat:oa.DateOnly.WeekdayLongMonthLong}})}),(0,i.jsx)(wy,{getAssignedMaxRemaining:e.getAssignedMaxRemaining,slotId:t.id})]})},t.id)):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},IS=e=>{const{translate:t}=Hf(),n=(0,r.useMemo)(()=>e.slots.map(e=>e.id),[e.slots]),o=(0,r.useMemo)(()=>e.accreditation.accreditationDisplay===Y.List&&e.slots.every(t=>e.accreditationsSlotsIds.includes(t.id)),[e.accreditation,e.accreditationsSlotsIds,e.slots]),a=(0,r.useCallback)(()=>{o?e.onChange((0,vg.A)(e.accreditationsSlotsIds,n)):e.onChange((0,qo.A)(e.accreditationsSlotsIds.concat(n)))},[o,e.accreditationsSlotsIds,e.onChange,n]);return e.accreditation.accreditationDisplay===Y.List?(0,i.jsx)(G,{css:{borderTop:"1px solid $gray200",padding:"$4"},children:(0,i.jsx)(Li,{css:{cursor:"pointer"},font:"primary500 textSm medium",onClick:a,children:t(o?"tout_d_s_lectio_37372":"tout_s_lectionn_48027")})}):null},_S=e=>{const{params:{organizationId:t},translate:n}=Hf(),[o,a]=(0,r.useState)(!1),s=(0,r.useMemo)(()=>v(e.accreditation.description)&&e.options.showAccreditationDescription,[e.accreditation,e.options]),d=(0,r.useMemo)(()=>{const t=e.accreditation.hasSlots?e.slots.map(e=>e.id):[e.accreditation.hiddenSlotId];return e.displayFormCustomFields&&h(e.accreditation.formCustomFields)&&h((0,bl.A)(t,e.accreditationsSlotsIds))},[e.accreditation,e.accreditationsSlotsIds,e.displayFormCustomFields,e.slots]),l=(0,r.useMemo)(()=>Object.fromEntries(e.delegationAccreditationsSlots.map(e=>[e.accreditationSlotId,e])),[e.delegationAccreditationsSlots]),c=(0,r.useCallback)(e=>{const t=l[e];return"number"==typeof t?.maxResources?{assignedResources:t.assignedResources,maxResources:t.maxResources,remaining:t.maxResources-t.assignedResources}:null},[l]),u=(0,r.useCallback)(t=>{const n=l[t];return!!n&&n.isFull&&n.willAutoAccredit&&!e.alreadyAssignedSlotsIds.includes(t)},[e.alreadyAssignedSlotsIds,l]),m=(0,r.useMemo)(()=>e.accreditation.hasSlots?null:(0,i.jsx)(wy,{getAssignedMaxRemaining:c,slotId:e.accreditation.hiddenSlotId}),[c,e.accreditation]),g=(0,r.useCallback)(t=>{e.change(`${e.prefix}accreditationsSlotsIds`,t)},[e.prefix,e.change]),p=e.accreditationsSlotsIds.includes(e.accreditation.hiddenSlotId)?"checked":"unchecked";return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(xy,{accreditation:e.accreditation,badge:m,displayFormCustomFields:d,displayNumberOfSlots:!1,displaySlots:e.accreditation.hasSlots,numberOfSlots:0,renderActions:()=>s&&(0,i.jsx)(jo,{color:"white",onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),a(!0)},children:n("voir_la_descrip_62304")}),renderCheckbox:()=>!e.accreditation.hasSlots&&(0,i.jsx)(Ky,{disabled:u(e.accreditation.hiddenSlotId),shouldPreventDefault:!1,state:p,onClick:RI.A}),onClick:()=>{e.accreditation.hasSlots||u(e.accreditation.hiddenSlotId)||e.change(`${e.prefix}accreditationsSlotsIds`,f(e.accreditationsSlotsIds,e.accreditation.hiddenSlotId,"unchecked"===p))},children:(0,i.jsxs)(G,{css:{background:"white",padding:"$4"},direction:"column",gap:"3",children:[e.accreditation.hasSlots?e.accreditation.accreditationDisplay===Y.Calendar?(0,i.jsx)(hS,{accreditationsSlotsIds:e.accreditationsSlotsIds,slotIdToDas:l,slots:e.slots,onChange:g}):(0,i.jsxs)(G,{css:{background:"white",bd:!0},direction:"column",width:1,children:[(0,i.jsx)(G,{css:{padding:"$4"},direction:"column",gap:"3",children:e.accreditation.accreditationDisplay===Y.Radio?(0,i.jsx)(fS,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,getAssignedMaxRemaining:c,getDisabled:u,slots:e.slots,onChange:g}):(0,i.jsx)(pS,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,getAssignedMaxRemaining:c,getDisabled:u,slots:e.slots,onChange:g})}),(0,i.jsx)(IS,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,slots:e.slots,onChange:g})]}):null,d&&(0,i.jsx)(G,{css:{background:"white",bd:!0,padding:"$4"},direction:"column",gap:"3",width:1,children:e.accreditation.formCustomFields.map(({customField:n,isMandatory:o})=>(0,i.jsx)(dS,{change:e.change,display:!0,field:n,isMandatory:o,organizationId:t,prefix:`${e.prefix}userInfo.fields.`},n.id))})]})}),o&&(0,i.jsx)(Oy,{description:e.accreditation.description,name:e.accreditation.name,onClose:()=>a(!1)})]})},yS=e=>{const{translate:t}=Hf();return(0,i.jsx)(By,{category:e.category.name,children:h(e.accreditations)?e.accreditations.map(t=>(0,i.jsx)(_S,{accreditation:t,accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,change:e.change,delegationAccreditationsSlots:e.delegationAccreditationsSlots,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix,slots:e.accreditationIdToSelectableSlots[t.id]},t.id)):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},xS=e=>{const{translate:t}=Hf();return(0,i.jsx)(Ny,{css:{background:"transparent",padding:"0"},children:h(e.categories)?(0,i.jsxs)(i.Fragment,{children:[e.categories.map(t=>(0,i.jsx)(yS,{accreditationIdToSelectableSlots:e.accreditationIdToSelectableSlots,accreditations:e.categoryIdToSelectableAccreditations[t.id],accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,category:t,change:e.change,delegationAccreditationsSlots:e.delegationAccreditationsSlots,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix},t.id)),e.showAutoAccredit&&(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(Li,{font:"gray900 textSm medium",children:t("attribution_des_59896")}),(0,i.jsx)(Uy,{name:`${e.prefix}autoAccredit`,children:t("attribuer_les_a_75431")})]})]}):h(e.delegationAccreditationsProfiles)?null:(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},SS=(0,r.memo)(e=>{const{accreditationIdToSelectableSlots:t,categoryIdToSelectableAccreditations:n,selectableCategories:o,selectableProfiles:a}=(0,r.useMemo)(()=>{const t=mm(e.slots.map(ta)),n=e.event.accreditationsProfilesCategories.flatMap(t=>t.accreditationsProfiles.filter(t=>function(e,t,n){return t.some(t=>t.accreditationProfileId===e.id&&(n===t.accreditationProfileId||!t.isFull))}(t,e.delegationAccreditationsProfiles,e.alreadyAssignedProfileId))),i=e.event.accreditationsCategories.flatMap(n=>n.accreditations.flatMap(n=>n.slots.filter(n=>function(e,t,n,i,o,a){const s=n.slotDisplay===Et.Hide||n.accreditationFilter===Ct.None||!e.date||t.some(t=>ia(t,e.date)),r=n.showFullAccreditation||a.includes(e.id),d=n.accreditationDisplay!==bt.None&&!n.hiddenAccreditationsSlotsIds.includes(e.id)&&(0===n.displayedAccreditationsSlotsIds.length||n.displayedAccreditationsSlotsIds.includes(e.id))&&(r||!e.isFull),l=i.some(t=>t.accreditationSlotId===e.id&&(r||!t.isFull&&!e.isFull));return!o.includes(e.id)&&!e.isBlocked&&s&&(d||l)}(n,t,e.options,e.delegationAccreditationsSlots,e.scannedSlotsIds,e.alreadyAssignedSlotsIds)))),o=i.map(e=>e.id),a=(0,cy.A)((0,ym.A)(i,e=>e.accreditationId),e=>(0,vs.A)(e,e=>(0,bs.A)([e.date?.toMillis(),y(e.name)]))),s=e.event.accreditationsCategories.flatMap(t=>t.accreditations.filter(t=>function(e,t,n,i,o){return i.accreditationDisplay!==bt.None&&!i.hiddenAccreditationsIds.includes(e.id)&&(0===i.displayedAccreditationsIds.length||i.displayedAccreditationsIds.includes(e.id))&&Eg(e,n)&&e.slots.some(e=>t.includes(e.id))||o.some(i=>i.accreditationId===e.id&&Eg(e,n)&&e.slots.some(e=>t.includes(e.id)))}(t,o,e.userInfosFields,e.options,e.delegationAccreditationsSlots))),r=s.map(e=>e.id),d=(0,cy.A)((0,ym.A)(s,e=>e.accreditationCategoryId),e=>dy(e)),l=(0,vs.A)(e.event.accreditationsCategories.filter(t=>function(e,t,n,i){return n.accreditationDisplay!==bt.None&&!n.hiddenAccreditationsCategoriesIds.includes(e.id)&&(0===n.displayedAccreditationsCategoriesIds.length||n.displayedAccreditationsCategoriesIds.includes(e.id))&&e.accreditations.some(e=>t.includes(e.id))||i.some(n=>n.accreditationCategoryId===e.id&&e.accreditations.some(e=>t.includes(e.id)))}(t,r,e.options,e.delegationAccreditationsSlots)),e=>y(e.name));return{selectableCategories:l,selectableProfiles:n,categoryIdToSelectableAccreditations:d,accreditationIdToSelectableSlots:a}},[e.alreadyAssignedProfileId,e.alreadyAssignedSlotsIds,e.delegationAccreditationsProfiles,e.delegationAccreditationsSlots,e.event.accreditationsCategories,e.event.accreditationsProfilesCategories,e.options,e.scannedSlotsIds,e.slots,e.userInfosFields]);return(0,r.useEffect)(()=>{const t=e.event.accreditationsCategories.flatMap(t=>t.accreditations.filter(t=>!Eg(t,e.userInfosFields)).flatMap(e=>e.slots.map(e=>e.id))),n=e.accreditationsSlotsIds.filter(n=>!t.includes(n)||e.alreadyAssignedSlotsIds.includes(n));n.length!==e.accreditationsSlotsIds.length&&e.change(`${e.prefix}accreditationsSlotsIds`,n)},[e.accreditationsSlotsIds,e.alreadyAssignedSlotsIds,e.event.accreditationsCategories,e.userInfosFields]),h(a)||h(e.delegationAccreditationsSlots)||e.options.accreditationDisplay===bt.Accreditation?(0,i.jsxs)(G,{direction:"column",gap:"9",children:[h(e.delegationAccreditationsProfiles)&&(0,i.jsx)(Py,{accreditationProfileId:e.accreditationProfileId,accreditationsProfiles:a,alreadyAssignedProfileId:e.alreadyAssignedProfileId,change:e.change,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,options:e.options,prefix:e.prefix}),(0,i.jsx)(xS,{accreditationIdToSelectableSlots:t,accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,categories:o,categoryIdToSelectableAccreditations:n,change:e.change,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix,showAutoAccredit:e.showAutoAccredit})]}):null}),vS=e=>{const t=Oi(),{data:n,loader:o}=Mi("query FormAccreditations($eventId: EventId!) {\n event: eventPublic(id: $eventId) {\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n\n accreditationsProfilesCategories {\n ...FormRegisterAccreditationProfileCategory\n }\n }\n}\n",{eventId:e.eventId},[Yo.FormRegisterAccreditationCategoryFragment,Yo.FormRegisterAccreditationProfileCategoryFragment]);return o||(0,i.jsxs)(i.Fragment,{children:[v(e.form.accreditationSubtitle)?(0,i.jsx)(w_,{text:e.renderText(e.form.accreditationSubtitle,e.userInfoFields)}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Li,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_91873")}),(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{color:"gray500",children:t("s_lectionnez_le_63924")})]}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(hI,{}),(0,i.jsx)(SS,{accreditationProfileId:null,accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedProfileId:null,alreadyAssignedSlotsIds:m,change:e.change,delegationAccreditationsProfiles:m,delegationAccreditationsSlots:m,displayFormCustomFields:!0,event:n.event,options:e.form,prefix:"formRegister.",scannedSlotsIds:m,showAutoAccredit:!1,slots:e.slots,userInfosFields:e.userInfoFields}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{onClick:e.handleSubmit,children:e.registerButtonText})})]})},bS=r.forwardRef((e,t)=>(0,i.jsxs)(G,{ref:t,css:{background:"white",bd:"white 1 sm",width:"100%","@tablet":{width:"$containerTablet"},"@desktop":{width:"$container"}},direction:"column",children:[(0,i.jsxs)(G,{align:"center",css:{borderBottom:e.isOpen?"1px solid $gray200":"",cursor:e.canSelect?"pointer":"default",padding:"$4","@tablet":{padding:"$4 $6"}},gap:"4",onClick:()=>{e.canSelect&&e.onSelect()},children:[(0,i.jsx)(G,{align:"center",css:{background:e.isCompleted?"$success100":"white",border:e.isCompleted?"none":"1px solid $gray200",borderRadius:"32px",color:e.isCompleted?"$success700":"$gray800",fontSize:"$textMd",fontWeight:"$semiBold"},height:32,justify:"center",width:32,children:e.isCompleted?(0,i.jsx)(_o,{icon:"check"}):e.number}),(0,i.jsx)(Li,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:e.title})]}),e.isOpen&&(0,i.jsx)(G,{css:{padding:"$6 $4","@tablet":{padding:"$6"},"@desktop":{padding:"$6 70px"}},direction:"column",children:e.children})]}));bS.displayName="FormBox";const jS=[79151,64083,79017,64084,79152,71228];u(["INTER. COMMISSAIRE TECHNIQUE COURSE D'ACCELERATION DRAGSTER","INTERNATIONALE CHRONOMETREUR A AUTO","INTERNATIONALE CHRONOMETREUR B AUTO","INTERNATIONALE CHRONOMETREUR C CIRCUIT AUTO","INTERNATIONALE CHRONOMETREUR C ROUTE AUTO","INTERNATIONALE CHRONOMETREUR KARTING","INTERNATIONALE COMMISSAIRE A CHEF DE POSTE CIRCUIT","INTERNATIONALE COMMISSAIRE A CHEF DE POSTE ROUTE AUTO","INTERNATIONALE COMMISSAIRE B","INTERNATIONALE COMMISSAIRE SPORTIF AUTO","INTERNATIONALE COMMISSAIRE SPORTIF KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE A AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE A KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE B AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE B KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE C AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE C KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE D'ACCELERATION DRAGSTER","INTERNATIONALE COMMISSAIRE TECHNIQUE STAGIAIRE AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE STAGIAIRE KARTING","INTERNATIONALE DIRECTEUR DE COURSE CIRCUIT ASPHALTE","INTERNATIONALE DIRECTEUR DE COURSE CIRCUIT TERRE","INTERNATIONALE DIRECTEUR DE COURSE DRAGSTER","INTERNATIONALE DIRECTEUR DE COURSE KARTING","INTERNATIONALE DIRECTEUR DE COURSE ROUTE AUTO","INTERNATIONALE DIRECTEUR DE COURSE TRIAL 4X4","INTERNATIONALE DIRIGEANT","INTERNATIONALE MEDICALE","INTERNATIONALE PERSONNE SATELLITE","INTERNATIONALE RESPONSABLE DE ZONE TRIAL 4X4","INTERNATIONALE VOLONTAIRE","NATIONALE CHRONOMETREUR STAGIAIRE","NATIONALE COMMISSAIRE C","NATIONALE COMMISSAIRE SPORTIF KARTING GRADE C","NATIONALE COMMISSAIRE SPORTIF KARTING","NATIONALE DIRECTEUR DE COURSE DRIFT","NATIONALE DIRECTEUR DE COURSE KARTING GRADE C","NATIONALE DIRECTEUR DE COURSE KARTING","NATIONALE DIRECTEUR DE COURSE TRIAL 4X4","NATIONALE JUGE DRIFT","NATIONALE MEDIA","NATIONALE MEDICALE","NATIONALE STAGIAIRE OPTION COMMISSAIRE SPORTIF","NATIONALE STAGIAIRE OPTION DIRECTEUR DE COURSE","NATIONALE STAGIAIRE OPTION JUGE DRIFT"]).map(e=>function(e){return y(e).replace(/[\u2018\u2019]/g,"'")}(e));const AS=e=>{const t=(0,r.useMemo)(()=>e.elements.flatMap(e=>e.elementType===Ve.Field?(0,bs.A)([e.customField,e.conditionCustomField]):e.hasCondition&&e.conditionCustomField?[e.conditionCustomField]:[]).map(t=>$g(e.organizationId)&&("production"===a.Development?[14]:[66919,68131,68598,70260,74864,74866,74868]).includes(t.id)&&h(e.asoBannersColors)?{...t,values:t.values.filter(({id:t})=>e.asoBannersColors?.includes(t))}:t),[e.elements]),n=(0,r.useMemo)(()=>Object.fromEntries(t.map(e=>[e.id,e])),[t]);return(0,i.jsx)(Li,{children:e.elements.map((o,a)=>{switch(o.elementType){case Ve.Field:{const s=n[o.customField.id],d=kl(s,e.values,t);return(0,i.jsxs)(r.Fragment,{children:[d&&0!==a&&(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(dS,{change:e.change,countryCode:e.countryCode,disabled:jS.includes(s.id),display:d,field:s,isMandatory:!0===o.isMandatory,organizationId:e.organizationId,prefix:e.prefix},a)]},a)}case Ve.Section:return kl(o,e.values,t)?(0,i.jsx)(r.Fragment,{children:"function"==typeof e.renderSection?e.renderSection(o.section,a):(0,i.jsxs)(i.Fragment,{children:[e.featureFlags?.isV4?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"5"}),(0,i.jsx)(zx,{direction:"horizontal"}),(0,i.jsx)(oI,{height:"5"})]}):0!==a&&(0,i.jsx)(oI,{height:"8"}),(0,i.jsx)(Li,{font:"grayCustom900 textMd semiBold",children:"function"==typeof e.renderText?e.renderText(o.section):o.section})]})},a):null;case Ve.Text:return kl(o,e.values,t)?(0,i.jsx)(r.Fragment,{children:(0,i.jsxs)(i.Fragment,{children:[0!==a&&(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(w_,{text:"function"==typeof e.renderText?e.renderText(o.text):o.text})]})},a):null;default:return wr(o.elementType)}})})},CS=e=>{const{translate:t,params:{organizationId:n}}=Hf();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hI,{}),(0,i.jsx)(AS,{change:e.change,countryCode:e.countryCode,elements:e.elements,organizationId:n,prefix:"formRegister.userInfo.fields.",renderText:t=>e.renderText(t,e.values),values:e.values}),(0,i.jsx)(oI,{height:{"@initial":"6","@tablet":"7"}}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})},ES=e=>{const[t,n]=(0,r.useState)(!1),o=v(e.category.description)&&e.options.showPositionCategoryDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Qy,{css:{alignItems:"center"},state:e.positionsCategoriesIds.includes(e.category.id)?"checked":"unchecked",onClick:t=>{e.change(`${e.prefix}positionsCategoriesIds`,f(e.positionsCategoriesIds,e.category.id,"checked"===t))},children:(0,i.jsxs)(G,{align:"center",gap:"2",children:[(0,i.jsx)(Li,{children:e.category.name}),o&&(0,i.jsx)(Li,{onClick:e=>{To(e),n(!0)},children:(0,i.jsx)(_o,{icon:"circle-info"})})]})}),t&&(0,i.jsx)(Oy,{description:e.category.description,name:e.category.name,onClose:()=>{n(!1)}})]})},TS=e=>{const{translate:t}=Hf();return(0,i.jsx)(i.Fragment,{children:h(e.categories)?e.categories.map((t,n)=>(0,i.jsxs)(r.Fragment,{children:[0!==n&&(0,i.jsx)(oI,{height:"3"}),(0,i.jsx)(ES,{category:t,change:e.change,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix})]},t.id)):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},OS=e=>{const[t,n]=(0,r.useState)(!1),o=v(e.position.description)&&e.options.showPositionDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Qy,{css:{alignItems:"center"},state:e.positionsIds.includes(e.position.id)?"checked":"unchecked",onClick:t=>{e.change(`${e.prefix}positionsIds`,f(e.positionsIds,e.position.id,"checked"===t))},children:(0,i.jsxs)(G,{align:"center",gap:"2",children:[(0,i.jsx)(Li,{children:e.position.name}),o&&(0,i.jsx)(Li,{onClick:e=>{To(e),n(!0)},children:(0,i.jsx)(_o,{icon:"circle-info"})})]})}),t&&(0,i.jsx)(Oy,{description:e.position.description,name:e.position.name,onClose:()=>{n(!1)}})]})},RS=e=>{const{translate:t}=Hf(),[n,o]=(0,r.useState)(!1),a=v(e.category.description)&&e.options.showPositionCategoryDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{align:"center",gap:"2",children:[(0,i.jsx)(Li,{color:"gray900",fontWeight:"semiBold",children:e.category.name}),a&&(0,i.jsx)(Li,{color:"gray700",onClick:()=>{o(!0)},children:(0,i.jsx)(_o,{icon:"circle-info"})})]}),(0,i.jsx)(oI,{height:"2"}),h(e.positions)?e.positions.map((t,n)=>(0,i.jsxs)(r.Fragment,{children:[0!==n&&(0,i.jsx)(oI,{height:"3"}),(0,i.jsx)(OS,{change:e.change,options:e.options,position:t,positionsIds:e.positionsIds,prefix:e.prefix})]},t.id)):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),n&&(0,i.jsx)(Oy,{description:e.category.description,name:e.category.name,onClose:()=>{o(!1)}})]})},MS=e=>{const{translate:t}=Hf();return(0,i.jsx)(i.Fragment,{children:h(e.categories)?e.categories.map((t,n)=>(0,i.jsxs)(r.Fragment,{children:[0!==n&&(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(RS,{category:t,change:e.change,options:e.options,positions:e.categoryIdToSelectablePositions[t.id],positionsIds:e.positionsIds,prefix:e.prefix})]},t.id)):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},DS=e=>{const t=Oi(),n=wI(),o=(0,r.useMemo)(()=>e.categories.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id)),[e.categories]);return(0,i.jsxs)(i.Fragment,{children:[h(o)?n?(0,i.jsxs)(Qx,{isSearchVisible:!0,label:t("souhait_n_1_47211",e.index+1),values:[e.positionsCategoriesIds?.[e.index]??-1],onChange:t=>{h(t)&&e.change(`${e.prefix}positionsCategoriesIds[${e.index}]`,t[0])},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),o]}):(0,i.jsxs)(tS,{label:t("souhait_n_1_47211",e.index+1),shouldParseAsInt:!0,value:e.positionsCategoriesIds?.[e.index]??-1,onChange:t=>{e.change(`${e.prefix}positionsCategoriesIds[${e.index}]`,t)},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),o]}):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),e.index!==e.options.positionLimit-1&&(0,i.jsx)(oI,{height:"4"})]})},wS=e=>{const{translate:t}=Hf(),n=wI(),o=(0,r.useMemo)(()=>e.categories.map(t=>{const n=e.categoryIdToSelectablePositions[t.id];return(0,i.jsx)("optgroup",{label:t.name,children:n.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},t.id)}),[e.categories]);return(0,i.jsxs)(i.Fragment,{children:[h(o)?n?(0,i.jsxs)(Qx,{isSearchVisible:!0,label:t("souhait_n_1_47211",e.index+1),values:[e.positionsIds?.[e.index]??-1],onChange:t=>{h(t)&&e.change(`${e.prefix}positionsIds[${e.index}]`,t[0])},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),o]}):(0,i.jsxs)(tS,{label:t("souhait_n_1_47211",e.index+1),shouldParseAsInt:!0,value:e.positionsIds?.[e.index]??-1,onChange:t=>{e.change(`${e.prefix}positionsIds[${e.index}]`,t)},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),o]}):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),e.index!==e.options.positionLimit-1&&(0,i.jsx)(oI,{height:"4"})]})};function $S(e,t,n={}){return(0,vs.A)(t,e=>y(e.name)).flatMap(t=>(0,vs.A)(t.positions,e=>y(e.name)).map(o=>{const a=n.usePositionDisplay&&o.positionDisplay===rt.Radio?`position-${o.id}`:void 0;return(0,i.jsx)("optgroup",{label:`${t.name} - ${Ag(o)}`,children:(0,vs.A)(o.slots,e=>[e.range.start.toMillis(),e.name]).map(t=>{const n=jg(e,t,Ag(o),{position:{includeNameAtEnd:!0},slot:{includeRange:!0}});return(0,i.jsx)("option",{"data-radio":a,value:t.id,children:n},t.id)})},o.id)}))}const PS=e=>{const{translate:t}=Hf(),n=Ti(hm),o=wI(),a=(0,r.useMemo)(()=>{const t=e.categories.map(t=>{const n=e.categoryIdToSelectablePositions[t.id];return{...t,positions:n.map(t=>{const n=e.positionIdToSelectableSlots[t.id];return{...t,slots:n}})}});return $S(n,t)},[e.categories]);return(0,i.jsxs)(i.Fragment,{children:[h(a)?o?(0,i.jsxs)(Qx,{isSearchVisible:!0,label:t("souhait_n_1_47211",e.index+1),values:[e.positionsSlotsIds?.[e.index]??-1],onChange:t=>{h(t)&&e.change(`${e.prefix}positionsSlotsIds[${e.index}]`,t[0])},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),a]}):(0,i.jsxs)(tS,{label:t("souhait_n_1_47211",e.index+1),shouldParseAsInt:!0,value:e.positionsSlotsIds?.[e.index]??-1,onChange:t=>{e.change(`${e.prefix}positionsSlotsIds[${e.index}]`,t)},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),a]}):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),e.index!==e.options.positionLimit-1&&(0,i.jsx)(oI,{height:"4"})]})},NS=e=>{const{translate:t}=Hf();return(0,i.jsx)(i.Fragment,{children:h(e.categories)?(0,dm.A)(0,e.options.positionLimit).map(t=>e.options.positionDisplay===At.Category?(0,i.jsx)(DS,{categories:e.categories,change:e.change,index:t,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix},t):e.options.positionDisplay===At.Position?(0,i.jsx)(wS,{categories:e.categories,categoryIdToSelectablePositions:e.categoryIdToSelectablePositions,change:e.change,index:t,options:e.options,positionsIds:e.positionsIds,prefix:e.prefix},t):e.options.positionDisplay===At.Slot?(0,i.jsx)(PS,{categories:e.categories,categoryIdToSelectablePositions:e.categoryIdToSelectablePositions,change:e.change,index:t,options:e.options,positionIdToSelectableSlots:e.positionIdToSelectableSlots,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix},t):null):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},kS=r.createContext({}),zS=e=>{const[t,n]=r.useState(!1),[o,a]=r.useState(null),[s,d]=r.useState(null),[l]=r.useState(()=>(0,xI.A)("tooltip-")),c=r.useMemo(()=>({isVisible:t,referenceElement:o,popperElement:s,tooltipId:l,setIsVisible:n,setReferenceElement:a,setPopperElement:d}),[t,o,s,l]);return(0,i.jsx)(kS.Provider,{value:c,children:e.children})};function LS(){return r.useContext(kS)}const FS=e=>{const{isVisible:t,tooltipId:n}=LS();if(t)return(0,i.jsx)(US,{...e});{const t=(0,i.jsx)("div",{hidden:!0,id:n,role:"tooltip",children:e.children});return e.renderOnPortal?(0,Oo.createPortal)(t,document.body):t}},US=e=>{const{popperElement:t,referenceElement:n,setPopperElement:o,tooltipId:a}=LS(),{styles:s,attributes:d,update:l}=(0,Z_.E)(n,t,{placement:e.placement,modifiers:[{name:"offset",options:{offset:[0,4]}}]});r.useEffect(()=>{l?.()},[n]);const c=(0,i.jsx)(G,{ref:o,align:"center",css:{background:"$grayCustom900",borderRadius:"$1",color:location.origin===lo.HEAVENT_PUBLIC_URL.origin?"contrast-color(var(--colors-grayCustom900))":"white",display:"flex",px:"$3",py:"6px",zIndex:1e3,...s.popper},id:a,justify:"center",role:"tooltip",...d.popper,children:e.children});return e.renderOnPortal?(0,Oo.createPortal)(c,document.body):c},BS=e=>{const{setIsVisible:t,setReferenceElement:n,tooltipId:o}=LS(),a=r.cloneElement(r.Children.only(e.children),{ref:n,"aria-labelledby":o,"aria-describedby":o,onMouseEnter(){t(!0)},onMouseLeave(){t(!1)},onFocus(){t(!0)},onBlur(){t(!1)}});return(0,i.jsx)(Li,{css:e.css,children:a})},GS=e=>{const{translate:t}=Hf(),{rangeString:n,finalName:o,isRenamed:a}=function(e){const t=Ti(hm),n=(0,r.useMemo)(()=>t.toDisplayString(e.range,{formats:{displayWeekday:!0}}),[e]),i=v(e.name);return{isRenamed:i,finalName:i?e.name:n,rangeString:n}}(e.slot),s=e.position.positionDisplay===rt.Radio,d=s?by:Qy,l=(0,r.useMemo)(()=>e.position.slots.map(e=>e.id),[e.position.slots]),c=(0,r.useMemo)(()=>{if(e.options.willAutoAssign){const t=e.allSlots.filter(t=>e.positionsSlotsIds.includes(t.id)&&(!s||!l.includes(t.id)));return function(e,t){return t.some(({id:t,range:n})=>e.id!==t&&n.overlaps(e.range))}(e.slot,t)}return!1},[e.options.willAutoAssign,e.allSlots,e.positionsSlotsIds,s,l]);return(0,i.jsxs)(r.Fragment,{children:[0!==e.index&&(0,i.jsx)(oI,{height:"3"}),c?(0,i.jsxs)(zS,{children:[(0,i.jsx)(BS,{children:(0,i.jsx)(Li,{children:(0,i.jsx)(d,{disabled:!0,shouldPreventDefault:!1,state:e.positionsSlotsIds.includes(e.slot.id)?"checked":"unchecked",subtext:a?n:void 0,onClick:RI.A,children:o})})}),(0,i.jsx)(FS,{placement:"top-start",children:t("ce_cr_neau_en_c_55775")})]}):(0,i.jsx)(d,{state:e.positionsSlotsIds.includes(e.slot.id)?"checked":"unchecked",subtext:a?n:void 0,onClick:t=>{const n="checked"===t;s?e.change(`${e.prefix}positionsSlotsIds`,[...e.positionsSlotsIds.filter(e=>!l.includes(e)),...n?[e.slot.id]:[]]):e.change(`${e.prefix}positionsSlotsIds`,f(e.positionsSlotsIds,e.slot.id,n))},children:o})]},e.slot.id)},VS=e=>{const{translate:t}=Hf(),[n,o]=(0,r.useState)(!1),a=v(e.position.description)&&e.options.showPositionDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"2"}),(0,i.jsxs)(G,{align:"center",gap:"2",children:[(0,i.jsx)(Li,{color:"gray900",fontWeight:"semiBold",children:e.position.name}),a&&(0,i.jsx)(Li,{color:"gray700",onClick:()=>{o(!0)},children:(0,i.jsx)(_o,{icon:"circle-info"})})]}),(0,i.jsx)(oI,{height:"2"}),h(e.slots)?e.slots.map((t,n)=>(0,i.jsx)(GS,{allSlots:e.allSlots,change:e.change,index:n,options:e.options,position:e.position,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix,slot:t},t.id)):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),n&&(0,i.jsx)(Oy,{description:e.position.description,name:e.position.name,onClose:()=>{o(!1)}})]})},WS=e=>{const{translate:t}=Hf(),[n,o]=(0,r.useState)(!1),a=v(e.category.description)&&e.options.showPositionCategoryDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{align:"center",gap:"2",children:[(0,i.jsx)(Li,{color:"gray500",css:{textTransform:"uppercase"},fontSize:"textXs",fontWeight:"semiBold",children:e.category.name}),a&&(0,i.jsx)(Li,{color:"gray700",onClick:()=>{o(!0)},children:(0,i.jsx)(_o,{icon:"circle-info"})})]}),h(e.positions)?e.positions.map(t=>(0,i.jsx)(VS,{allSlots:e.allSlots,change:e.change,options:e.options,position:t,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix,slots:e.positionIdToSelectableSlots[t.id]},t.id)):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),n&&(0,i.jsx)(Oy,{description:e.category.description,name:e.category.name,onClose:()=>{o(!1)}})]})},qS=e=>{const{translate:t}=Hf();return(0,i.jsx)(i.Fragment,{children:h(e.categories)?e.categories.map((t,n)=>(0,i.jsxs)(r.Fragment,{children:[0!==n&&(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(WS,{allSlots:e.allSlots,category:t,change:e.change,options:e.options,positionIdToSelectableSlots:e.positionIdToSelectableSlots,positions:e.categoryIdToSelectablePositions[t.id],positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix},t.id)]},t.id)):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},YS=(0,r.memo)(e=>{const{categoryIdToSelectablePositions:t,positionIdToSelectableSlots:n,selectableCategories:o,selectableSlots:a}=(0,r.useMemo)(()=>{const t=mm(e.slots.map(ta)),n=e.event.positionsCategories.flatMap(n=>n.positions.flatMap(n=>n.slots.filter(n=>function(e,t,n){return!n.hiddenPositionsSlotsIds.includes(e.id)&&(0===n.displayedPositionsSlotsIds.length||n.displayedPositionsSlotsIds.includes(e.id))&&(n.showFullPosition||!e.isFull)&&(n.slotDisplay===Et.Hide||n.positionFilter===Ct.None||t.some(t=>t.engulfs(e.range)))}(n,t,e.options)))),i=n.map(e=>e.id),o=(0,cy.A)((0,ym.A)(n,e=>e.positionId),e=>(0,vs.A)(e,e=>[e.range.start.toMillis(),e.nameOrRange])),a=e.event.positionsCategories.flatMap(t=>t.positions.filter(t=>function(e,t,n,i){return!i.hiddenPositionsIds.includes(e.id)&&(0===i.displayedPositionsIds.length||i.displayedPositionsIds.includes(e.id))&&(0===i.hiddenPositionsTagsIds.length||p((0,bl.A)(i.hiddenPositionsTagsIds,e.tagsIds)))&&(0===i.displayedPositionsTagsIds.length||h((0,bl.A)(i.displayedPositionsTagsIds,e.tagsIds)))&&Eg(e,n)&&e.slots.some(e=>t.includes(e.id))}(t,i,e.userInfoFields,e.options))),s=a.map(e=>e.id),r=(0,cy.A)((0,ym.A)(a,e=>e.positionCategoryId),e=>(0,vs.A)(e,e=>y(e.name))),d=(0,vs.A)(e.event.positionsCategories.filter(t=>function(e,t,n){return!n.hiddenPositionsCategoriesIds.includes(e.id)&&(0===n.displayedPositionsCategoriesIds.length||n.displayedPositionsCategoriesIds.includes(e.id))&&e.positions.some(e=>t.includes(e.id))}(t,s,e.options)),e=>y(e.name));return{selectableCategories:d,selectableSlots:n,categoryIdToSelectablePositions:r,positionIdToSelectableSlots:o}},[e.event.positionsCategories,e.options,e.slots,e.userInfoFields]);if((0,r.useEffect)(()=>{const t=e.event.positionsCategories.flatMap(t=>t.positions.filter(t=>!Eg(t,e.userInfoFields)).map(e=>e.id));if(h(t)){const n=e.event.positionsCategories.flatMap(e=>e.positions.filter(e=>t.includes(e.id)).flatMap(e=>e.slots.map(e=>e.id))),i=e.positionsIds.filter(e=>!t.includes(e)),o=e.positionsSlotsIds.filter(e=>!n.includes(e));i.length!==e.positionsIds.length&&e.change(`${e.prefix}positionsIds`,i),o.length!==e.positionsSlotsIds.length&&e.change(`${e.prefix}positionsSlotsIds`,o)}},[e.event.positionsCategories,e.positionsIds,e.positionsSlotsIds,e.userInfoFields]),e.options.positionRanking===We.Ranked)return(0,i.jsx)(NS,{categories:o,categoryIdToSelectablePositions:t,change:e.change,options:e.options,positionIdToSelectableSlots:n,positionsCategoriesIds:e.positionsCategoriesIds,positionsIds:e.positionsIds,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix});switch(e.options.positionDisplay){case At.Category:return(0,i.jsx)(TS,{categories:o,change:e.change,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix});case At.Position:return(0,i.jsx)(MS,{categories:o,categoryIdToSelectablePositions:t,change:e.change,options:e.options,positionsIds:e.positionsIds,prefix:e.prefix,slots:e.slots,userInfoFields:e.userInfoFields});case At.Slot:return(0,i.jsx)(qS,{allSlots:a,categories:o,categoryIdToSelectablePositions:t,change:e.change,options:e.options,positionIdToSelectableSlots:n,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix});case At.None:return null;default:return wr(e.options.positionDisplay)}}),HS=e=>{const t=Oi(),{data:n,loader:o}=Mi("query FormMissions($eventId: EventId!) {\n event: eventPublic(id: $eventId) {\n positionsCategories {\n ...FormRegisterCategory\n }\n }\n}\n",{eventId:e.eventId},[Yo.FormRegisterCategoryFragment]);return o||(0,i.jsxs)(i.Fragment,{children:[v(e.form.positionSubtitle)?(0,i.jsx)(w_,{text:e.renderText(e.form.positionSubtitle,e.userInfoFields)}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Li,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_83925")}),(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{color:"gray500",children:t("s_lectionnez_le_37648")})]}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(hI,{}),(0,i.jsx)(YS,{change:e.change,event:n.event,options:e.form,positionsCategoriesIds:e.positionsCategoriesIds,positionsIds:e.positionsIds,positionsSlotsIds:e.positionsSlotsIds,prefix:"formRegister.",slots:e.slots,userInfoFields:e.userInfoFields}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})};function ZS(e,t,n,i,o){const a=t.diff(e,"days").days;return(0,xm.A)((0,dm.A)(0,a+1).map(t=>e.plus({days:t}).set({hour:o})),e=>i===jt.AllDays||n.some(t=>t.contains(e)||t.start.startOf("day").equals(e.startOf("day"))||t.end.startOf("day").equals(e.startOf("day"))))}function KS(e,t,n,i,o){const a=t.diff(e,"days").days;return(0,dm.A)(0,a+1).flatMap(t=>{const i=e.plus({days:t});return n.map(e=>{const[t,n]=e.startTime.split(":").map(e=>parseInt(e,10)),[o,a]=e.endTime.split(":").map(e=>parseInt(e,10)),s=i.set({hour:t,minute:n});let r=i.set({hour:o,minute:a});return(oo===jt.AllDays||i.some(t=>t.overlaps(e.interval)))}function QS(e,t){return v(e)?`${e} (${t.toFormat("HH:mm")})`:t.toFormat("HH:mm")}function XS(e,t,n){const i=e.filter(e=>!t.equals(ea(e)));return i.length===e.length&&n?[...e,na(t)]:i.length===e.length||n?e:i}const JS=e=>{const t=(0,r.useMemo)(()=>au(e.dayStartTime)?.[0]??0,[e.dayStartTime]),[n,o]=(0,r.useMemo)(()=>ZS(e.startAt,e.endAt,e.ranges,e.daysDisplay,t),[e.startAt,e.endAt,e.ranges,e.daysDisplay,t]),a=(0,r.useMemo)(()=>(0,xg.A)(n,e=>e.toMillis()),[n]),s=(0,r.useMemo)(()=>(0,Sg.A)(n,e=>e.toMillis()),[n]),d=(0,r.useMemo)(()=>a?.isValid&&s?.isValid?Math.ceil(s.endOf("month").diff(a.startOf("month"),"months").months):0,[a,s]),l=(0,r.useCallback)((t,n)=>{const i=e.currentSlots.filter(e=>e.startDate.year!==t.year||e.startDate.month!==t.month).concat(n.map(e=>na(Vo.IX.fromDateTimes(e,e.plus({day:1})))));e.change(`${e.prefix}slots`,i)},[e.currentSlots,e.prefix,e.change]);return a?.isValid&&s?.isValid&&d>0?(0,i.jsx)(G,{gap:"6",wrap:"wrap",children:(0,dm.A)(0,d).map(n=>{const r=a.plus({month:n}).startOf("month"),c=0===n?a:r,u=n===d-1?s:r.endOf("month"),m=e.currentSlots.flatMap(e=>e.startDate.year===r.year&&e.startDate.month===r.month?[e.startDate.startOf("day").set({hour:t||0})]:[]);return(0,i.jsx)(mS,{disabledDates:o,firstDayOfMonth:r,max:u,min:c,startHour:t,values:m,onChange:e=>{l(r,e)}},n)})}):null},ev=e=>{const{intervals:t,minDate:n,maxDate:o,numberOfMonths:a}=(0,r.useMemo)(()=>{const t=e.intervalsGrouped.flatMap(([e,t])=>t.map(({interval:e})=>e)),n=(0,xg.A)(t,e=>e.start.toMillis()).start.startOf("day"),i=(0,Sg.A)(t,e=>e.end.toMillis()).end.endOf("day"),o=Math.ceil(i.endOf("month").diff(n.startOf("month"),"months").months);return{intervals:t,minDate:n,maxDate:i,numberOfMonths:o}},[e.intervalsGrouped]),s=t.flatMap(t=>e.isSelected(t)?[t.start.startOf("day")]:[]);return(0,i.jsx)(G,{gap:"6",wrap:"wrap",children:(0,dm.A)(0,a).map(r=>{const d=n.plus({month:r}).startOf("month"),l=0===r?n:d,c=r===a-1?o:d.endOf("month"),u=s.filter(e=>e.month===d.month&&e.year===d.year);return(0,i.jsx)(mS,{firstDayOfMonth:d,max:c,min:l,values:u,onChange:n=>{((n,i)=>{e.setSelectedBatch(t.flatMap(e=>{if(e.start.startOf("month").equals(n)){const t=i.some(t=>t.equals(e.start.startOf("day")));return[{interval:e,isSelected:t}]}return[]}))})(d,n)}},r)})})},tv=e=>{const[t,n]=(0,r.useState)(e.intervals.some(({interval:t})=>e.isSelected(t))?"checked":"unchecked"),o=(0,r.useCallback)(()=>{const i="checked"===t?"unchecked":"checked";n(i),"unchecked"===i&&e.intervals.forEach(({interval:t})=>{e.setSelected(t,!1)})},[e.intervals,t,n,e.setSelected]);return(0,i.jsxs)(G,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs"},direction:"column",children:[(0,i.jsxs)(G,{align:"center",css:{cursor:"pointer",padding:"$4 $5"},gap:"2",onClick:o,children:[(0,i.jsx)(Li,{color:"gray900",fontSize:"textXs",children:(0,i.jsx)(_o,{icon:"checked"===t?"chevron-down":"chevron-right"})}),(0,i.jsx)(Li,{font:"gray800 textSm medium",children:e.day})]}),"checked"===t&&(0,i.jsx)(G,{css:{borderTop:"1px solid $gray200",padding:"$4 $5"},direction:"column",gap:"3",children:e.intervals.map(({name:t,interval:n},o)=>(0,i.jsx)(Qy,{state:e.isSelected(n)?"checked":"unchecked",onClick:t=>{e.setSelected(n,"checked"===t)},children:QS(t,n)},o))})]})},nv=e=>(0,i.jsx)(G,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",padding:"$4 $5"},direction:"column",gap:"3",children:e.intervalsGrouped.map(([t,[{name:n,interval:o}]],a)=>{const s=`${n} ${o.toFormat("HH:mm")}`.trim(),r=`${t} ${e.hideNameDates?"":`(${s})`}`.trim();return(0,i.jsx)(Qy,{state:e.isSelected(o)?"checked":"unchecked",onClick:t=>{e.setSelected(o,"checked"===t)},children:r},a)})}),iv=({customSlotPeriod:e,daysDisplay:t,event:n,isSelected:o,setSelected:a,setSelectedBatch:s})=>{const d=Ti(jl),l=(0,r.useMemo)(()=>KS(e.startDate??n.startAt,e.endDate??n.endAt,e.customSlots,n.ranges,t),[e,n,t]),c=(0,r.useMemo)(()=>(0,vs.A)(Object.entries((0,ym.A)(l,({interval:e})=>d.toLocaleString(e.start.startOf("day"),oa.DateOnly.WeekdayLongMonthLong))),([e,[{interval:t}]])=>t.start.startOf("day").toMillis()),[l]);return(0,i.jsxs)(G,{direction:"column",gap:"2",width:1,children:[v(e.name)&&(0,i.jsx)(Li,{font:"gray900 textSm semiBold",children:e.name}),1===e.customSlots.length?0===c.length?null:e.displayAsCalendar?(0,i.jsx)(ev,{intervalsGrouped:c,isSelected:o,setSelectedBatch:s}):(0,i.jsx)(nv,{hideNameDates:e.hideNameDates,intervalsGrouped:c,isSelected:o,setSelected:a}):c.map(([e,t],n)=>(0,i.jsx)(tv,{day:e,intervals:t,isSelected:o,setSelected:a},n))]})},ov=e=>{const t=(0,r.useMemo)(()=>e.customSlotsPeriods.flatMap(t=>KS(t.startDate??e.event.startAt,t.endDate??e.event.endAt,t.customSlots,e.event.ranges,e.daysDisplay)).map(({interval:e})=>e),[e.customSlotsPeriods,e.event,e.daysDisplay]),[n,o]=(0,r.useState)(Object.fromEntries(t.map(t=>{const n=e.currentSlots.some(e=>ea(e).equals(t));return[t.toISO(),n]}))),a=(0,r.useCallback)(e=>n[e.toISO()],[n]),s=(0,r.useCallback)((t,n)=>{const i=t.toISO();o(e=>({...e,[i]:n})),e.change(`${e.prefix}slots`,XS(e.currentSlots,t,n))},[e.currentSlots,o]),d=(0,r.useCallback)(t=>{const n=t.reduce((e,{interval:t,isSelected:n})=>{const i=t.toISO();return o(e=>({...e,[i]:n})),XS(e,t,n)},e.currentSlots);e.change(`${e.prefix}slots`,n)},[e.currentSlots,o]),l=(0,r.useMemo)(()=>e.elements.flatMap(e=>e.elementType===Ve.Field?(0,bs.A)([e.customField,e.conditionCustomField]):e.hasCondition&&e.conditionCustomField?[e.conditionCustomField]:[]),[e.elements]);return(0,i.jsx)(G,{direction:"column",gap:"6",children:e.customSlotsPeriods.map(t=>kl(t,e.userInfoFields,l)?(0,i.jsx)(iv,{customSlotPeriod:t,daysDisplay:e.daysDisplay,event:e.event,isSelected:a,setSelected:s,setSelectedBatch:d},t.id):null)})},av=e=>{const{translate:t}=Hf(),[n]=(0,r.useMemo)(()=>ZS(e.startAt,e.endAt,e.ranges,e.daysDisplay,au(e.dayStartTime)?.[0]??0),[e.startAt,e.endAt,e.ranges,e.daysDisplay,e.dayStartTime]),o=(0,r.useMemo)(()=>n.filter(t=>(e.blockedSlots??[]).some(e=>ia(e,t))),[e.blockedSlots,n]),a=Ti(jl),[s,d]=(0,r.useState)(Object.fromEntries(n.map((t,n)=>{const i=Vo.IX.fromDateTimes(t,t.plus({day:1}));return[`day${n}`,void 0!==e.currentSlots.find(e=>ea(e).equals(i))]})));return(0,i.jsx)(i.Fragment,{children:n.map((n,l)=>{const c=o.includes(n);return(0,i.jsxs)(r.Fragment,{children:[0!==l&&(0,i.jsx)(oI,{height:"3"}),(0,i.jsx)(Qy,{disabled:c,state:s[`day${l}`]?"checked":"unchecked",onClick:t=>{d({...s,[`day${l}`]:"checked"===t}),e.change(`${e.prefix}slots`,XS(e.currentSlots,Vo.IX.fromDateTimes(n,n.plus({day:1})),"checked"===t))},children:c?(0,i.jsxs)(zS,{children:[(0,i.jsx)(BS,{children:(0,i.jsx)(W,{children:a.toLocaleString(n,oa.DateOnly.WeekdayLongMonthLong)})}),(0,i.jsx)(FS,{placement:"right",children:t("vous_avez_d_j_92810")})]}):a.toLocaleString(n,oa.DateOnly.WeekdayLongMonthLong)})]},l)})})};var sv=n(3088);const rv=e=>(0,i.jsxs)(R_,{children:[(0,i.jsxs)(G,{align:"center",gap:"4",children:[(0,i.jsx)(dI,{css:{flex:"1",textTransform:"uppercase"},textStyle:"smallcapsheading",children:e.title}),e.buttons]}),e.children]}),dv=e=>{const t=Oi();return(0,i.jsx)(rv,{buttons:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(Li,{children:(0,i.jsx)(jo,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.remove})})}),title:t("disponibilit_n_50484",e.index+1),children:(0,i.jsxs)(G,{direction:{"@initial":"column","@desktop":"row"},gap:"4",children:[(0,i.jsx)(ex,{label:t("date_de_d_but_43380"),max:e.max,min:e.min,name:`${e.prefix}startDate`}),(0,i.jsx)(ox,{label:t("heure_de_d_but_27566"),name:`${e.prefix}startTime`}),(0,i.jsx)(ex,{label:t("date_de_fin_86920"),max:e.max,min:e.min,name:`${e.prefix}endDate`}),(0,i.jsx)(ox,{label:t("heure_de_fin_95071"),name:`${e.prefix}endTime`})]})})},lv=e=>{const t=Oi(),n=Ti(yc),o=(0,r.useMemo)(()=>e.max.endOf("day"),[e.max]);return(0,i.jsx)(sv.ED,{name:`${e.prefix}slots`,children:({fields:a})=>(0,i.jsxs)(i.Fragment,{children:[a.map((t,n)=>(0,i.jsxs)(r.Fragment,{children:[0!==n&&(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(dv,{index:n,max:o,min:e.min,prefix:`${t}.`,remove:()=>{a.remove(n)}})]},n)),(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(jo,{color:"invisible",leftIcon:"plus",onClick:()=>{a.push(n.volunteersRegistrationsSlotInputDefault(e.min))},children:t("ajouter_une_dis_96540")})]})})},cv=(0,r.memo)(e=>{switch(e.slotDisplay){case Et.Display:return(0,i.jsx)(lv,{max:e.event.endAt,min:e.event.startAt,prefix:e.prefix});case Et.DisplayDays:return(0,i.jsx)(av,{blockedSlots:e.blockedSlots,change:e.change,currentSlots:e.currentSlots,dayStartTime:e.event.dayStartTime,daysDisplay:e.daysDisplay,endAt:e.event.endAt,prefix:e.prefix,ranges:e.event.ranges,startAt:e.event.startAt});case Et.Calendar:return(0,i.jsx)(JS,{change:e.change,currentSlots:e.currentSlots,dayStartTime:e.event.dayStartTime,daysDisplay:e.daysDisplay,endAt:e.event.endAt,prefix:e.prefix,ranges:e.event.ranges,startAt:e.event.startAt});case Et.Custom:return(0,i.jsx)(ov,{change:e.change,currentSlots:e.currentSlots,customSlotsPeriods:e.customSlotsPeriods,daysDisplay:e.daysDisplay,elements:e.elements,event:e.event,prefix:e.prefix,userInfoFields:e.userInfoFields});case Et.Hide:return null;default:return wr(e.slotDisplay)}}),uv=e=>{const t=Oi(),{data:n,loader:o}=Mi("query FormSlots(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $formId: FormId!\n $delegationId: DelegationId\n) {\n organization: organizationPublic(id: $organizationId) {\n form(id: $formId, eventId: $eventId) {\n customSlotsPeriods {\n ...FormRegisterCustomSlotPeriod\n }\n }\n }\n\n event: eventPublic(id: $eventId) {\n startAt\n endAt\n dayStartTime\n ranges(formId: $formId, delegationId: $delegationId)\n }\n}\n",{organizationId:e.organizationId,eventId:e.eventId,formId:e.formId,delegationId:e.delegationId},[Yo.FormRegisterCustomSlotPeriodFragment]);return o||(0,i.jsxs)(i.Fragment,{children:[v(e.form.slotSubtitle)?(0,i.jsx)(w_,{text:e.renderText(e.form.slotSubtitle,e.userInfoFields)}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Li,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_77037")}),(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{color:"gray500",children:t("vos_disponibili_52929")})]}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(hI,{}),(0,i.jsx)(cv,{change:e.change,currentSlots:e.currentSlots,customSlotsPeriods:n.organization.form.customSlotsPeriods,daysDisplay:e.form.daysDisplay,elements:e.form.elements,event:n.event,prefix:"formRegister.",slotDisplay:e.form.slotDisplay,userInfoFields:e.userInfoFields}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})};function mv(e){navigator.clipboard.writeText(e)}function gv(){const[e,t]=(0,r.useState)(!1);return{isLoading:e,copy:(0,r.useCallback)(e=>{t(!0),mv(e),setTimeout(()=>t(!1),500)},[])}}var hv=n(1932);const pv=e=>{const t=Oi();return(0,i.jsxs)(G,{direction:"column",gap:"2",children:[(0,i.jsx)(Li,{css:{textTransform:"uppercase"},font:"gray800 textSm semiBold",children:t("invitation_n_1_64964",e.index+1)}),(0,i.jsx)(EI,{isEmail:!0,label:t("adresse_e_mail_60930"),value:e.email,onChange:e.onChange})]})},fv=({eventId:e,form:t,formId:n,formRegisterResult:o,organizationId:a})=>{const s=Oi(),{mutate:d,isLoading:l}=function(e={}){return Di("mutation EmailFormInviteSend(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $formId: FormId!\n $invitedById: UsersInfoId\n $teamCode: TeamCode!\n $emails: [UserEmail!]!\n) {\n emailFormInviteSend(\n organizationId: $organizationId\n eventId: $eventId\n formId: $formId\n invitedById: $invitedById\n teamCode: $teamCode\n emails: $emails\n )\n}\n",e)}(),{isLoading:c,copy:u}=gv(),m=fg({organizationId:a,eventId:e,formId:n,teamCode:o?.teamCode}),[g,p]=(0,r.useState)([""]),[f,I]=(0,r.useState)(void 0),_=t.maxTeamMembers&&g.length>=t.maxTeamMembers-1,y=wI(),x=(0,r.useCallback)(async()=>{await d({organizationId:a,eventId:e,formId:n,invitedById:o?.userInfo?.id,teamCode:o?.teamCode??"",emails:g})&&I(!0)},[g,d,o]);return(0,i.jsxs)(G,{css:{background:"$gray50",bd:!0,padding:"$6"},direction:{"@initial":"column","@desktop":"row"},gap:"3",children:[(0,i.jsx)(Li,{color:"gray800",fontSize:"textXl",children:(0,i.jsx)(_o,{icon:"circle-exclamation"})}),(0,i.jsxs)(G,{direction:"column",width:1,children:[(0,i.jsx)(Li,{font:"gray800 textMd semiBold",children:s("vous_souhaitez_73288")}),(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{color:"gray800",children:s("inviter_vos_qu_82288")}),(0,i.jsx)(oI,{height:"5"}),(0,i.jsx)(Li,{font:"gray800 textSm semiBold",children:s("FormLink")}),(0,i.jsx)(oI,{height:"2"}),(0,i.jsxs)(G,{direction:{"@initial":"column","@desktop":"row"},gap:"2",width:1,children:[(0,i.jsx)(G,{align:"center",css:{background:"white",border:"1px solid $gray300",borderRadius:"$1",color:"$gray800",flex:y?"1":void 0,px:"$3"},height:40,children:(0,i.jsx)(Li,{css:{ellipsis:!0},width:1,children:m})}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{isLoading:c,leftIcon:"copy",onClick:()=>{u(m)},children:s("copier_le_lien_54974")})})]}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(Li,{font:"gray800 textSm semiBold",children:s("invitations_32350")}),(0,i.jsx)(oI,{height:"2"}),(0,i.jsx)(G,{css:{background:"white",bd:!0,padding:"$6"},direction:"column",gap:"4",children:f?(0,i.jsxs)(G,{align:"center",direction:"column",gap:"2",children:[(0,i.jsx)(yy,{color:"success",css:{borderRadius:"50%"},icon:"check"}),(0,i.jsx)(W,{css:{textAlign:"center",color:"$gray800",fontSize:"$textMd",fontWeight:"$semiBold","@tablet":{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium"}},children:s("les_invitations_24485")})]}):(0,i.jsxs)(i.Fragment,{children:[g.map((e,t)=>(0,i.jsx)(pv,{email:e,index:t,onChange:e=>{p((0,hv.jM)(n=>{n[t]=e}))}},t)),!_&&(0,i.jsx)(G,{children:(0,i.jsxs)(jo,{color:"primary",onClick:()=>{p(g.concat([""]))},children:["+ ",s("ajouter_une_inv_21322")]})})]})}),(0,i.jsx)(oI,{height:"3"}),!f&&(0,i.jsx)(G,{children:(0,i.jsx)(jo,{disabled:!h(g)||1===g.length&&""===g[0],isLoading:l,onClick:x,children:s("envoyer_les_inv_50560")})})]})]})},Iv=e=>{const t=Oi();return(0,i.jsxs)(i.Fragment,{children:[v(e.form.successMessage)?(0,i.jsx)(w_,{text:e.renderText(e.form.successMessage,e.userInfoFields)}):(0,i.jsx)(Li,{height:250,width:1,children:(0,i.jsx)(ky,{imageSrc:NI.Done,title:t("merci_70020")})}),e.form.areTeamsAllowed&&(0,i.jsx)(fv,{eventId:e.eventId,form:e.form,formId:e.formId,formRegisterResult:e.formRegisterResult,organizationId:e.organizationId}),v(e.form.ticketUrl)&&(0,i.jsx)("div",{style:{height:"600px"},children:(0,i.jsx)("a",{className:"weezevent-widget-integration","data-height":"600","data-id":"1707621","data-nopb":"0","data-noscroll":"0","data-resize":"1","data-src":e.form.ticketUrl,"data-type":"neo","data-width":"650","data-width_auto":"1",href:`https://www.${lo.WEEZEVENT_DOMAIN}?c=sys_widget`,rel:"noreferrer",target:"_blank",title:"Logiciel billetterie en ligne",children:"Billetterie Weezevent"})})]})};function _v(e,t){return{flex:t?"1 1 0":e?"0 0 0":"1",minWidth:t?`${t}px`:e?`${e}px`:void 0}}const yv=r.forwardRef((e,t)=>(0,i.jsx)(G,{ref:t,align:"center",className:"table-cell",css:{..._v(e.width,e.minWidth),color:"$gray800",overflow:"hidden",px:"$3",...e.css},height:1,role:"gridcell",onClick:t=>{e.onClick&&e.onClick(t)},...(0,L.A)(e,["direction","align","justify","wrap","gap"]),children:e.children}));yv.displayName="Cell";const xv=e=>(0,i.jsx)(G,{align:"center",className:"table-header-cell",css:{..._v(e.width,e.minWidth),color:"$gray500",overflow:"hidden",px:"$3",...e.css},height:1,role:"columnheader",tabIndex:0,onClick:()=>{e.onClick?.()},...(0,L.A)(e,["aria-label","direction","align","justify","wrap","gap"]),children:e.children}),Sv=e=>(0,i.jsx)(G,{align:"center",className:"table-header-row",css:{background:"$gray50",border:"1px solid $gray200",fontSize:"$textXs",fontWeight:"$medium",height:"44px",width:"100%",...e.css},role:"row",children:e.children}),vv=r.createContext({}),bv=e=>{const[t,n]=r.useState(null);return(0,i.jsx)(vv.Provider,{value:{clickedRowIndex:t,setClickedRowIndex:n},children:e.children})},jv=e=>{const{setClickedRowIndex:t}=r.useContext(vv);return(0,i.jsx)(G,{align:"center",className:"table-row",css:{background:"white",borderBottom:"1px solid $gray200",borderLeft:"1px solid $gray200",borderRight:"1px solid $gray200",height:"64px",width:"100%",...e.css,"&:hover .dot-dot-dot":{display:"block"},"&:hover .h-controls":{display:"flex"}},role:"row",onClick:()=>{e.onClick?.()},onMouseLeave:n=>{t?.(null),e.onMouseLeave?.(n)},children:e.children})},Av=({children:e,css:t,hideBorder:n,...o})=>(0,i.jsx)(bv,{children:(0,i.jsx)(G,{className:!0===n?"table-no-border":"table",css:{width:"100%","&.table > div:first-child":{borderTopLeftRadius:"$1",borderTopRightRadius:"$1"},"&.table > div:last-child":{borderBottomLeftRadius:"$1",borderBottomRightRadius:"$1"},"&.table-no-border .table-header-row":{borderLeft:"none",borderRight:"none",borderTop:"none"},"&.table-no-border .table-row":{borderLeft:"none",borderRight:"none"},"&.table-no-border .table-row:last-child":{borderBottom:"none"},...t},direction:"column",...o,children:e})}),Cv=e=>{const t=Oi(),n=Ti(jl),o=Ti(hm),a=(0,r.useMemo)(()=>e.team.positionsCategories.map(e=>({name:e.name})).concat(e.team.positions.map(e=>({name:e.name}))).concat(e.team.positionsSlots.map(e=>({name:e.nameOrRange}))),[e.team]),s=(0,r.useCallback)(t=>{switch(e.slotDisplay){case Et.Calendar:case Et.DisplayDays:return n.toLocaleString(t.start,oa.DateOnly.WeekdayLongMonthLong);case Et.Custom:case Et.Display:return o.toDisplayString(t,{formats:{displayWeekday:!0}});case Et.Hide:return null;default:return wr(e.slotDisplay)}},[e.slotDisplay]);return(0,i.jsxs)(i.Fragment,{children:[h(e.team.slots)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(G,{css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$5 $6"},children:(0,i.jsx)(Li,{font:"gray900 textMd medium",children:t("disponibilit_s_49923")})}),(0,i.jsxs)(Av,{children:[(0,i.jsx)(Sv,{css:{borderRadius:"0 !important"},children:(0,i.jsx)(xv,{children:t("Date")})}),e.team.slots.map((e,t)=>(0,i.jsx)(jv,{children:(0,i.jsx)(yv,{css:{textTransform:"capitalize"},children:s(e.range)})},t))]}),(0,i.jsx)(oI,{height:"6"})]}),h(a)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(G,{css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$5 $6"},children:(0,i.jsx)(Li,{font:"gray900 textMd medium",children:t("missions_souhai_23225")})}),(0,i.jsxs)(Av,{children:[(0,i.jsx)(Sv,{css:{borderRadius:"0 !important"},children:(0,i.jsx)(xv,{children:t("Position")})}),a.map((e,t)=>(0,i.jsx)(jv,{children:(0,i.jsx)(yv,{children:e.name})},t))]}),(0,i.jsx)(oI,{height:"6"})]}),(0,i.jsx)(oS,{label:(0,i.jsx)(Gy,{children:t("commentaire_r_12290")}),name:`formRegister.userInfo.fields.form${e.formId}`})]})},Ev=e=>{const{data:t,loader:n}=Mi("query FormTeamSummary($eventId: EventId!, $teamCode: TeamCode!) {\n event: eventPublic(id: $eventId) {\n team(teamCode: $teamCode) {\n positionsCategories {\n name\n }\n\n positions {\n name\n }\n\n positionsSlots {\n nameOrRange\n }\n\n slots {\n range\n }\n }\n }\n}\n",{eventId:e.eventId,teamCode:e.teamCode},[]);return n||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Cv,{formId:e.formId,slotDisplay:e.slotDisplay,team:t.event.team}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{onClick:e.handleSummit,children:e.registerButtonText})})]})},Tv=r.forwardRef((e,t)=>{const n=wI(),o=Math.min(Math.round(360*window.screen.width/1170),360);return(0,i.jsx)(Li,{ref:t,css:{background:"$grayCustom50",overflowY:"auto"},height:1,width:1,children:(0,i.jsxs)(G,{align:"center",direction:"column",width:1,children:[n&&(0,i.jsx)(oI,{height:"10"}),e.bannerUrl&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Li,{css:{background:`url(${e.bannerUrl}) no-repeat`,backgroundSize:"cover",height:`${o}px`,width:"100%","@desktop":{borderRadius:"$1",boxShadow:"$xs",width:"$container"}}}),(0,i.jsx)(oI,{height:{"@initial":"6","@tablet":"7","@desktop":"9"}})]}),e.children]})})});Tv.displayName="FormContainer";const Ov=e=>{const t=Oi();return(0,i.jsxs)(Tv,{bannerUrl:e.bannerUrl,children:[(0,i.jsx)(bS,{canSelect:!1,isCompleted:!1,isOpen:!0,number:1,title:v(e.closedTitle)?e.closedTitle:t("formulaire_cl_t_92617"),onSelect:RI.A,children:v(e.closedMessage)?(0,i.jsx)(w_,{text:e.closedMessage}):(0,i.jsx)(Li,{height:250,width:1,children:(0,i.jsx)(ky,{imageSrc:NI.Done,title:t("ce_formulaire_a_73045")})})}),(0,i.jsx)(oI,{height:"9"})]})},Rv=e=>{const{translate:t,params:{organizationId:n,eventId:o,formId:a}}=Hf(),s=Ti(Zg),d=Ti(_r),{user:l}=ms(),{mutate:c}=Va(),u=(0,r.useCallback)(async t=>{if(!e.isPreview){const{userCreate:n}=await Oa(Ma,{token:t});await e.onSuccess(n.email,t)}},[e.onSuccess]),[m,g]=(0,r.useState)(null),[h,p]=(0,r.useState)(!1),[f,I]=(0,r.useState)(0),[_,y]=(0,r.useState)(!1),[x,S]=(0,r.useState)(Date.now()),b=(0,r.useMemo)(()=>{const e=new URL(location.href).searchParams,t=v(l?.email)?l.email:v(e.get("email"))?e.get("email"):"";return{email:t,emailConfirm:t,code:""}},[l]),j=()=>{location.reload()};return(0,i.jsx)(II,{align:"center",direction:"column",hideDefaultErrors:!0,initialValues:b,render:({handleSubmit:n,submitting:o,values:a})=>(0,i.jsxs)(bS,{canSelect:!1,isCompleted:!e.isOpen,isOpen:e.isOpen,number:"1",title:v(e.emailTitle)?e.emailTitle:t("Email"),onSelect:RI.A,children:[(0,i.jsx)(hI,{}),v(e.description)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(w_,{text:e.description}),(0,i.jsx)(oI,{height:"4"})]}),(0,i.jsx)(TI,{autoComplete:"email",isEmail:!0,label:t("Email"),name:"email",state:h||_?"disabled":void 0}),(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(TI,{autoComplete:"email",isEmail:!0,label:t("confirmation_de_51185"),name:"emailConfirm",state:h||_?"disabled":void 0}),h&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"7"}),(0,i.jsxs)(lI,{alertStyle:"gray",children:[(0,i.jsx)(cI,{children:t("un_code_6_chi_33026",a.email)}),(0,i.jsx)(uI,{children:(0,i.jsx)(Li,{css:{fontStyle:"italic"},children:t("attention_ne_16312")})})]}),(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(TI,{autoComplete:"one-time-code",inputMode:"numeric",label:t("code_20843"),name:"code",pattern:"\\d*",state:_?"disabled":void 0})]}),(0,i.jsx)(oI,{height:{"@initial":"6","@tablet":"7"}}),(0,i.jsx)(G,{children:_?(0,i.jsx)(jo,{onClick:j,children:t("recommencer_14712")}):(0,i.jsx)(jo,{isLoading:o,onClick:n,children:t("suivant_62774")})})]}),validate:e=>h?s.validateForForm(d.emailCodeSchema())(e):s.validateForForm(d.emailConfirmSchema())(e),width:1,onSubmit:async i=>{if(!e.isPreview){if(v(i.code)){const{user:e,callbacks:n}=m;return Ea({code:i.code,user:e,callbacks:n}).then(u,e=>{if("RETRY"===e.type)return I(f+1),{code:t("le_code_n_est_p_95065",3-(f+1))};{let n;return Ta(e.message,i.email,x),y(!0),n=Vo.dw.fromMillis(Date.now()-x).as("minutes")>3?t("le_code_a_expir_45975"):t("le_code_n_est_p_12317"),{FORM_ERROR:n}}})}if(l?.email===i.email)await u(await va());else{await ja().catch(()=>!0);const{userExists:t}=await(s={email:i.email},Oa("query UserExists($email: UserEmail!) {\n userExists(email: $email)\n}\n",{variables:s,token:void 0,fragments:[]}));if(t){await c({loginCodeEmail:{email:i.email,organizationId:n,eventId:o,formId:a,source:Je.VolunteerRegister}}),S(Date.now());const e=await Ca(i.email,RI.A,RI.A);g(e),p(!0)}else await e.onSuccess(i.email)}}var s}})};function Mv(e){const t=new URL(location.href);t.searchParams.set("lang",e.toLowerCase()),location.href=t.toString()}const Dv=e=>{const t=Oi();return(0,i.jsxs)(G,{align:{"@initial":"start","@tablet":"center"},css:{background:"white",bd:"white 1 sm",padding:"$4 $6",width:"100%","@tablet":{padding:"$6",width:"$containerTablet"},"@desktop":{width:"$container"}},direction:{"@initial":"column","@tablet":"row"},gap:"4",children:[(0,i.jsx)(Li,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:t("langue_du_formu_66193")}),(0,i.jsx)(Li,{css:{"@mobile":{width:"100%"},"@tablet":{flex:"1"}},children:(0,i.jsx)(tS,{value:e.language,onChange:Mv,children:e.languages.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))})})]})},wv=e=>{const t=Oi();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(bS,{canSelect:!1,isCompleted:!1,isOpen:!0,number:2,title:v(e.noAccessTitle)?e.noAccessTitle:t("acc_s_limit_69177"),onSelect:RI.A,children:v(e.noAccessMessage)?(0,i.jsx)(w_,{text:e.noAccessMessage}):(0,i.jsx)(Li,{font:"gray800 textMd semiBold",textAlign:"center",width:1,children:t("vous_n_avez_pas_58193")})})]})},$v=e=>{const t=Oi(),[n,o]=(0,r.useState)(e.userInfoId),[a,s]=(0,r.useState)(!e.userInfoId);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Li,{font:"gray800 textSm semiBold",children:t("avec_quel_profi_89563")}),(0,i.jsx)(oI,{height:"4"}),(0,i.jsxs)(G,{direction:"column",gap:"3",width:1,children:[e.usersInfos.map(e=>(0,i.jsx)(by,{state:n===e.id?"checked":"unchecked",onClick:t=>{"checked"===t&&(o(e.id),s(!1))},children:e.nameOrEmail},e.id)),(0,i.jsx)(by,{state:a?"checked":"unchecked",onClick:e=>{"checked"===e&&(o(null),s(!0))},children:t("s_inscrire_avec_00521")})]}),(0,i.jsx)(oI,{height:{"@initial":"6","@tablet":"7"}}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{onClick:()=>{e.onSuccess(n,a)},children:t("suivant_62774")})})]})},Pv=e=>{const{translate:t,params:{organizationId:n,eventId:o,delegationId:a,formId:s}}=Hf(),{mutate:d}=za(),l=Ti(Zg),c=Ti(Tc),u=Ti(Yg),m=function(e,{isOrganization:t}){const{user:n}=ms();return(0,r.useMemo)(()=>{const i=new URL(location.href),o=VI(n?.language,i.searchParams);return t||e.includes(o)?o:(Mv(e[0]),e[0])},[t,e,n])}(e.languages,{isOrganization:"number"!=typeof o}),g=(0,r.useRef)(null),h=(0,r.useCallback)(()=>{g.current&&(g.current.scrollTop=0)},[g]),p=(0,r.useMemo)(()=>e.form.elements.filter(e=>e.elementType===Ve.Field),[e.form]),f=(0,r.useMemo)(()=>p.flatMap(e=>(0,bs.A)([e.customField,e.conditionCustomField])),[p]),[I,_]=(0,r.useState)(void 0),[y,x]=(0,r.useState)(void 0),[S,b]=(0,r.useState)(0===e.form.segments.length),[j,A]=(0,r.useState)({formRegister:c.formRegisterInputDefault(qe.Form,null,f,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:!1,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}),[C,E]=(0,r.useState)(0),[T,O]=(0,r.useState)(null),[R,M]=(0,r.useState)([]),[D,w]=(0,r.useState)(null),$=(0,r.useCallback)((t,n)=>u.renderText(t,{userInfo:T?{...T,fields:{...T.fields,...n}}:{id:-1,localId:-1,email:I,fields:n,registrationDate:Vo.c9.now()},event:e.event,organization:e.organization,customFields:f}),[e.event,I,T,f,e.organization]),P=(0,r.useMemo)(()=>v(e.form.description)?u.renderText(e.form.description,{event:e.event,organization:e.organization}):"",[e.event,e.form.description,e.organization]),N=(0,r.useCallback)(async(t,i)=>{if(!e.isPreview){if(i){const{user:t}=await function(e,t){return Oa("query UsersInfos($organizationId: OrganizationId!, $eventId: EventId, $formId: FormId!) {\n user {\n userInfo(organizationId: $organizationId) {\n ...UserInfoForm\n }\n\n usersInfos(organizationId: $organizationId) {\n ...UserInfoForm\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[Yo.UserInfoFormFragment]})}({organizationId:n,eventId:o,formId:s},i);e.form.allowMultiProfiles?(O(t.userInfo),M(t.usersInfos)):(O(t.userInfo),b(t.userInfo.canAccess),A({formRegister:c.formRegisterInputDefault(qe.Form,t.userInfo,f,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:!1,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}))}_(t),x(i),setTimeout(()=>{E(C+1),h()},100)}},[C,f,e.form,e.countryCode,e.team,h]),k=(0,r.useCallback)((t,n)=>{if(!e.isPreview){const i=R.find(e=>e.id===t);O(i),b(i?.canAccess??0===e.form.segments.length),A({formRegister:c.formRegisterInputDefault(qe.Form,i,f,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:n,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}),setTimeout(()=>{E(C+1),h()},100)}},[C,f,e.form,e.countryCode,e.team,h]),z=(0,r.useCallback)(async t=>{if(!e.isPreview){if(C===W-2){const i=await d({organizationId:n,eventId:o,delegationId:a,formId:s,email:I,formRegister:{...t.formRegister,teamCode:e.team?.teamCode}},y);w(i.formRegister)}E(C+1),h()}},[I,y,C,E,h]),L=(0,r.useMemo)(()=>e.form.areTeamsAllowed&&v(e.team?.teamCode),[e.form,e.team]),F=(0,r.useMemo)(()=>o&&L&&!e.form.teamMemberFillFullForm,[o,L,e.form]),U=(0,r.useMemo)(()=>e.form.allowMultiProfiles&&R.length>0,[e.form,R]),B=(0,r.useMemo)(()=>e.form.slotDisplay!==Et.Hide&&o&&!F,[e.form,o,F]),G=(0,r.useMemo)(()=>e.form.positionDisplay!==At.None&&o&&!F,[e.form,o,F]),V=(0,r.useMemo)(()=>e.form.accreditationDisplay!==bt.None&&o&&!F,[e.form,o,F]),W=(0,r.useMemo)(()=>3+(U?1:0)+(B?1:0)+(G?1:0)+(V?1:0)+(F?1:0),[U,B,G,V,F]),q=U?2:1,Y=B?q+1:q,H=G?Y+1:Y,Z=V?H+1:H,K=q+1,Q=(0,r.useMemo)(()=>c.formRegisterInformationsSchema(p),[p,c]),X=(0,r.useMemo)(()=>c.formRegisterSlotsSchema(e.form.slotDisplay,e.form.minNumberOfSlots,e.event?.startAt??Vo.c9.now(),e.event?.endAt??Vo.c9.now()),[c,e.event,e.form]),J=(0,r.useMemo)(()=>c.formRegisterPositionsSchema(e.form.positionRanking,e.form.positionDisplay),[c,e.form]),ee=(0,r.useCallback)(t=>C===q?l.validateForForm(Q)(t):B&&C===Y?l.validateForForm(X)(t):G&&C===H?l.validateForForm(J)(t):V&&C===Z?l.validateForForm(c.formRegisterAccreditationsSchema(e.form.accreditationDisplay,t.formRegister.accreditationsSlotsIds,e.form.accreditationsFormCustomFields,a))(t):{},[Z,a,c,Q,q,J,H,e.form,V,G,B,X,Y,C,l]),te=(0,r.useMemo)(()=>v(e.form.registerButtonText)?e.form.registerButtonText:t("s_inscrire_20304"),[e.form]),ne=(0,r.useMemo)(()=>!e.hideFormLanguages&&e.languages.length>1,[e.hideFormLanguages,e.languages]),ie=e.isPreview?"opened"===e.formPreviewState:S,oe=e.isPreview?"blocked"===e.formPreviewState:!(S||0===C||1===C&&U);return(0,i.jsxs)(Tv,{ref:g,bannerUrl:e.form.design?.banner?.url,children:[ne&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Dv,{language:m,languages:e.languages}),(0,i.jsx)(oI,{height:"4"})]}),(0,i.jsx)(Rv,{description:P,emailTitle:e.form.emailTitle,isOpen:e.isPreview||0===C,isPreview:e.isPreview,onSuccess:N}),U&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(bS,{canSelect:C>=1&&C!==W-1,isCompleted:C>=1,isOpen:e.isPreview||1===C,number:"2",title:t("choix_du_profil_50142"),onSelect:()=>E(1),children:(0,i.jsx)($v,{userInfoId:T?.id,usersInfos:R,onSuccess:k})})]}),ie&&(0,i.jsx)(II,{align:"center",customErrorRef:g,direction:"column",initialValues:j,render:({form:r,handleSubmit:d,values:l})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(bS,{canSelect:C>=q&&C!==W-1,isCompleted:C>=q+1,isOpen:e.isPreview||C===q,number:q+1,title:v(e.form.informationTitle)?e.form.informationTitle:t("informations_pe_37892"),onSelect:()=>E(q),children:(0,i.jsx)(CS,{change:r.change,countryCode:e.countryCode,elements:e.form.elements,handleSubmit:d,isFinalStep:!(B||G||V||F),registerButtonText:te,renderText:$,values:l.formRegister.userInfo.fields})}),(0,i.jsx)(oI,{height:"4"}),B&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(bS,{canSelect:C>=Y&&C!==W-1,isCompleted:C>=Y+1,isOpen:e.isPreview||C===Y,number:Y+1,title:v(e.form.slotTitle)?e.form.slotTitle:t("disponibilit_s_49923"),onSelect:()=>E(Y),children:(0,i.jsx)(uv,{change:r.change,currentSlots:l.formRegister.slots,delegationId:a,eventId:o,form:e.form,formId:s,handleSubmit:d,isFinalStep:!G&&!V,organizationId:n,registerButtonText:te,renderText:$,userInfoFields:l.formRegister.userInfo.fields})}),(0,i.jsx)(oI,{height:"4"})]}),G&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(bS,{canSelect:C>=H&&C!==W-1,isCompleted:C>=H+1,isOpen:e.isPreview||C===H,number:H+1,title:v(e.form.positionTitle)?e.form.positionTitle:t("missions_souhai_23225"),onSelect:()=>E(H),children:(0,i.jsx)(HS,{change:r.change,eventId:o,form:e.form,handleSubmit:d,isFinalStep:!V,positionsCategoriesIds:l.formRegister.positionsCategoriesIds,positionsIds:l.formRegister.positionsIds,positionsSlotsIds:l.formRegister.positionsSlotsIds,registerButtonText:te,renderText:$,slots:l.formRegister.slots,userInfoFields:l.formRegister.userInfo.fields})}),(0,i.jsx)(oI,{height:"4"})]}),V&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(bS,{canSelect:C>=Z&&C!==W-1,isCompleted:C>=Z+1,isOpen:e.isPreview||C===Z,number:Z+1,title:v(e.form.accreditationTitle)?e.form.accreditationTitle:t("accr_ditations_74375"),onSelect:()=>E(Z),children:(0,i.jsx)(vS,{accreditationsSlotsIds:l.formRegister.accreditationsSlotsIds,change:r.change,eventId:o,form:e.form,handleSubmit:d,registerButtonText:te,renderText:$,slots:l.formRegister.slots,userInfoFields:l.formRegister.userInfo.fields})}),(0,i.jsx)(oI,{height:"4"})]}),F&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(bS,{canSelect:C>=K&&C!==W-1,isCompleted:C>=W-1,isOpen:e.isPreview||C===K,number:K+1,title:t("r_capitulatif_d_48468"),onSelect:()=>E(K),children:(0,i.jsx)(Ev,{eventId:o,formId:s,handleSummit:d,registerButtonText:te,slotDisplay:e.form.slotDisplay,teamCode:e.team.teamCode})}),(0,i.jsx)(oI,{height:"4"})]}),(0,i.jsx)(bS,{canSelect:!1,isCompleted:!1,isOpen:e.isPreview||C===W-1,number:W,title:v(e.form.successTitle)?e.form.successTitle:t("confirmation_95122"),onSelect:()=>E(W-1),children:(0,i.jsx)(Iv,{eventId:o,form:e.form,formId:s,formRegisterResult:D,organizationId:n,renderText:$,userInfoFields:l.formRegister.userInfo.fields})}),(0,i.jsx)(oI,{height:"9"})]}),validate:ee,width:1,onSubmit:z}),oe&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(wv,{noAccessMessage:e.form.noAccessMessage,noAccessTitle:e.form.noAccessTitle}),(0,i.jsx)(oI,{height:"9"})]})]})},Nv=()=>{const{organizationId:e,eventId:t,formId:n,delegationId:o,teamCode:a}=wi(),{data:s,loader:d}=Mi("query FormInfos(\n $organizationId: OrganizationId!\n $eventId: EventId\n $formId: FormId!\n $delegationId: DelegationId\n $teamCode: TeamCode\n) {\n organization: organizationPublic(id: $organizationId) {\n id\n name\n country\n dateFormat\n datetimeFormat\n timeFormat\n\n event(id: $eventId) {\n id\n name\n country\n languages\n startAt\n endAt\n fields\n\n team(teamCode: $teamCode) {\n teamCode\n accreditationsSlotsIds\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n\n slots {\n startDate\n startTime\n endDate\n endTime\n }\n }\n }\n\n delegation: delegationMaybe(id: $delegationId) {\n state\n }\n\n form(id: $formId, eventId: $eventId) {\n allowMultiProfiles\n description\n successTitle\n successMessage\n isOpen\n closedTitle\n closedMessage\n noAccessTitle\n noAccessMessage\n positionTitle\n positionSubtitle\n accreditationTitle\n accreditationSubtitle\n areTeamsAllowed\n maxTeamMembers\n teamMemberFillFullForm\n emailTitle\n informationTitle\n registerButtonText\n ticketUrl\n\n ...FormSlotsOptions\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n design {\n ...DesignColors\n\n banner {\n url\n }\n }\n\n elements {\n ...FormElementDisplay\n }\n\n segments {\n segmentId\n }\n }\n }\n}\n",{organizationId:e,eventId:t,formId:n,delegationId:o,teamCode:a},[Yo.FormSlotsOptionsFragment,Yo.FormMissionsOptionsFragment,Yo.FormAccreditationsOptionsFragment,Yo.DesignColorsFragment,Yo.FormElementDisplayFragment]),{isPreview:l,formPreviewState:c,hideFormLanguages:u}=(0,r.useMemo)(()=>{const e=new URLSearchParams(location.search);return{isPreview:"true"===e.get("preview"),formPreviewState:e.get("state"),hideFormLanguages:"true"===e.get("hideFormLanguages")}},[]),g=(0,r.useMemo)(()=>{if(l)return"closed"===c;{const e=s.organization?.form.isOpen??!0,t=!s.organization?.delegation||s.organization?.delegation.state===be.Ongoing;return!e||!t}},[s.organization,c,l]);return(0,r.useEffect)(()=>{s.organization&&Xf(s.organization.form.design?.colors)},[s.organization]),d||(g?(0,i.jsx)(Ov,{bannerUrl:s.organization.form.design?.banner?.url,closedMessage:s.organization.form.closedMessage,closedTitle:s.organization.form.closedTitle}):(0,i.jsx)(Pv,{countryCode:s.organization.event?.country??s.organization.country,event:s.organization.event,form:s.organization.form,formPreviewState:c,hideFormLanguages:u,isPreview:l,languages:s.organization.event?.languages??m,organization:s.organization,team:s.organization?.event?.team}))};var kv;!function(e){e.AUTO_RESIZE_SYN="piglet-widget-auto-resize-syn",e.AUTO_RESIZE_ACK="piglet-widget-auto-resize-ack",e.AUTO_RESIZE_CHANGE_DIMENSIONS="piglet-widget-auto-resize-change-dimensions"}(kv||(kv={}));const zv=`\n .UICta {\n padding: 12px 24px;\n overflow: hidden;\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 16px;\n align-items: start;\n color: #d8b26a;\n border: 0;\n background: none;\n}\n.UICta:hover .UICta-bg-hover,\n.UICta:active .UICta-bg-hover,\n.UICta:focus .UICta-bg-hover {\n opacity: 1;\n}\n.UICta-gradient {\n position: absolute;\n inset: 0;\n border-radius: 10px;\n background: linear-gradient(180deg, #D8B26A 0%, #6E460C 100%);\n transition: all 400ms ease-out;\n}\n.UICta-bg {\n position: absolute;\n inset: 1.5px;\n border-radius: 10px;\n background-image: url('${lo.HEAVENT_ASSETS_URL}/img/bg-cta.jpg');\n background-size: cover;\n transition: all 300ms ease-out;\n}\n.UICta-bg-hover {\n position: absolute;\n inset: 1.5px;\n border-radius: 10px;\n background-image: url('${lo.HEAVENT_ASSETS_URL}/img/bg-cta-hover.jpg');\n background-size: cover;\n opacity: 0;\n transition: all 300ms ease-out;\n}\n.UICta-label {\n position: relative;\n width: 100%;\n font-size: 16px;\n letter-spacing: 1px;\n font-family: 'Netflix Sans Serif', serif;\n text-align: center;\n}\n`,Lv=e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{children:zv}),(0,i.jsxs)("button",{className:"UICta",type:"button",onClick:e.onClick,children:[(0,i.jsx)("div",{className:"UICta-gradient"}),(0,i.jsx)("div",{className:"UICta-bg"}),(0,i.jsx)("div",{className:"UICta-bg-hover"}),(0,i.jsx)("div",{className:"UICta-label",children:"CONFIRMER MA PRÉSENCE"})]})]}),Fv=()=>{const{params:{userInfoId:e,customFieldSlug:t,value:n}}=Hf(),[o,a]=(0,r.useState)(!1),s=`${lo.HEAVENT_API_URL}/users/${e}/field/${t}/update/${n}`,d=Vo.c9.now()>Vo.c9.fromISO("2026-02-27T10:00:00.000+01:00");return(0,i.jsx)(G,{align:"center",className:"netflix",css:{background:`url(${PI.NetflixWood})`,fontFamily:"$FKRomanStandard",py:"40px"},direction:"column",height:1,width:1,children:d?(0,i.jsx)(G,{css:{gap:"32px",px:"50px",width:"100%","@desktop":{width:"738px"}},direction:"column",children:(0,i.jsxs)(G,{align:"center",css:{fontSize:"22px",textTransform:"uppercase","@desktop":{fontSize:"32px"}},direction:"column",children:[(0,i.jsx)(Li,{css:{color:"white"},textAlign:"center",children:"L'équipage a levé l'ancre et l'embarquement est maintenant complet"}),(0,i.jsxs)(Li,{css:{color:"rgb(216, 178, 106)"},textAlign:"center",children:["Le délai pour confirmer ta venue dans l'équipage One Piece Market est dépassé. Ta place n’a malheureusement pas pu être confirmée.",(0,i.jsx)("br",{}),"Pas d'inquiétude ! Il est également possible de venir sans réservation pour explorer le One Piece Market. Cependant, cela ne permettra pas d’accéder au visionnage de l’épisode en avant-première. À votre arrivée, suivez l’entrée VOGUE MERRY.",(0,i.jsx)("br",{}),"Rendez-vous le 10 mars sur Netflix pour la saison 2 de One Piece, en route pour Grand Line ! La quête continue."]})]})}):(0,i.jsxs)(G,{css:{gap:"32px",px:"50px",width:"100%","@desktop":{width:"738px"}},direction:"column",children:[(0,i.jsxs)(G,{align:"center",css:{fontSize:"22px",textTransform:"uppercase","@desktop":{fontSize:"32px"}},direction:"column",children:[(0,i.jsx)(Li,{css:{color:"white"},textAlign:"center",children:"LE 28 FÉVRIER ET 1ER MARS CENTQUATRE-PARIS"}),(0,i.jsx)(Li,{css:{color:"rgb(216, 178, 106)"},textAlign:"center",children:"VOTRE DERNIÈRE ESCALE AVANT GRAND LINE"})]}),o?(0,i.jsxs)(G,{align:"center",css:{fontSize:"22px",textTransform:"uppercase","@desktop":{fontSize:"32px"}},direction:"column",children:[(0,i.jsx)(Li,{css:{color:"white"},textAlign:"center",children:"Réponse enregistrée"}),(0,i.jsx)(Li,{css:{color:"rgb(216, 178, 106)"},textAlign:"center",children:"Vous allez recevoir vos billets par emails dans quelques minutes"})]}):(0,i.jsx)(Lv,{onClick:async()=>{await fetch(s),a(!0)}})]})})},Uv=r.createContext({}),Bv=e=>(0,i.jsx)(Uv.Provider,{value:{},children:e.children}),Gv=R("div",{alignItems:"center",background:"$grayCustom50",display:"flex",flexDirection:"column",gap:"$10",height:"100%",overflowY:"auto",padding:"$4",paddingTop:"$10",width:"100%","@tablet":{padding:"$10"}}),Vv=()=>(Mo("volunteers/src/v2/profiles/list/profilesListSkeleton.tsx","volunteers/src/v2/common/landingSkeleton.tsx"),(0,i.jsxs)(Gv,{children:[(0,i.jsx)(KI,{}),(0,i.jsxs)(G,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)(UI,{borderRadius:"$1",height:23,width:1}),(0,i.jsx)(UI,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(UI,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(UI,{borderRadius:"$2",height:74,width:1})]})]})),Wv=({delegation:e})=>{const{params:{organizationId:t},translate:n}=Hf(),o=$I(),{delegationsListButton:a}=ad(t);return(0,i.jsx)(fo,{to:hg.DELEGATION({delegationId:e.id,eventId:e.eventId||void 0,organizationId:t}),children:(0,i.jsxs)(G,{align:"center",css:{background:"white",bd:!0,padding:"$4 $6"},gap:"3",children:[(0,i.jsx)(Li,{css:{flex:"1"},font:"gray800 textSm medium",children:e.name}),o?(0,i.jsx)(jo,{color:"white",size:"sm",children:n(a)}):(0,i.jsx)(jo,{color:"white",leftIcon:"arrow-right",size:"sm"})]})})},qv=()=>{const{history:e,translate:t,params:{organizationId:n}}=Hf(),{data:o,isLoading:a}=Mi("query DelegationsList($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n name\n\n events(sort: { attribute: StartAt, direction: Desc }) {\n nodes {\n id\n name\n startAt\n }\n }\n\n delegations(level: Both, onlyVisibleInDelegation: true) {\n nodes {\n id\n name\n eventId\n }\n }\n }\n}\n",{organizationId:n},[]),s=(0,r.useMemo)(()=>o.organization?.events.nodes??[],[o.organization]),{eventDelegationsGroupedByEvent:d,organizationDelegations:l}=(0,r.useMemo)(()=>{const e=(0,vs.A)((o.organization?.delegations.nodes??[]).filter(e=>!e.eventId),e=>e.name.toLowerCase());return{eventDelegationsGroupedByEvent:(0,cy.A)((0,ym.A)((o.organization?.delegations.nodes??[]).filter(e=>e.eventId),e=>e.eventId),e=>(0,vs.A)(e,e=>e.name.toLowerCase())),organizationDelegations:e}},[o.organization]);(0,r.useEffect)(()=>{if(1===o.organization?.delegations.nodes.length){const t=o.organization.delegations.nodes[0];e.replace(hg.DELEGATION({organizationId:n,eventId:t.eventId||void 0,delegationId:t.id}))}},[o.organization]);const{delegationsListTitle:c}=ad(n);return(0,r.useEffect)(()=>{document.title=o.organization?.name??Wd},[o.organization]),(0,i.jsx)(eI,{isLoading:a,loadDelegationsSpace:!0,loadMembersSpace:!1,organizationId:n,skeleton:(0,i.jsx)(Vv,{}),children:(0,i.jsxs)(Gv,{children:[(0,i.jsx)(ZI,{}),(0,i.jsx)(G,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:h(o.organization?.delegations.nodes)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Li,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:t(c)}),(0,i.jsx)(oI,{width:"6"}),h(l)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Li,{color:"gray800",fontSize:"textSm",fontWeight:"semiBold",children:o.organization?.name}),l.map(e=>(0,i.jsx)(Wv,{delegation:e},e.id))]}),h(Object.values(d))&&(0,i.jsxs)(i.Fragment,{children:[h(l)&&(0,i.jsx)(zx,{direction:"horizontal"}),(0,i.jsx)(Li,{font:"gray800 textSm semiBold",children:t("_v_nements_53672")}),s.map(e=>{const t=d[e.id];return h(t)?(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(Li,{font:"gray500 textXs semiBold",children:e.name}),t.map(e=>(0,i.jsx)(Wv,{delegation:e},e.id))]},e.id):null})]})]}):(0,i.jsxs)(G,{align:"center",direction:"column",children:[(0,i.jsx)(ky,{title:t("aucune_d_l_gati_85273")}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{color:"white",onClick:ba,children:t("se_d_connecter_74151")})})]})})]})})};function Yv(e,t,n){if("positionCategoryId"in n){const i=e.usersPositionsCategories.some(e=>"ANY"===n.positionCategoryId?t===e.roleId:t===e.roleId&&e.positionCategoryId===n.positionCategoryId);if("positionId"in n){const o=e.usersPositions.some(e=>t===e.roleId&&e.positionId===n.positionId);return i||o}return i}return"delegationCategoryId"in n?e.usersDelegationsCategories.some(e=>"ANY"===n.delegationCategoryId?t===e.roleId:t===e.roleId&&e.delegationCategoryId===n.delegationCategoryId):"eventId"in n&&e.usersEvents.some(e=>"ANY"===n.eventId?t===e.roleId:t===e.roleId&&e.eventId===n.eventId)}function Hv(e,t,n){const i=n?e.roles.filter(t=>"positionCategoryId"in n||"positionId"in n?t.accessLevel===Tt.Position?Yv(e,t.id,n):t.accessLevel===Tt.Organization||t.accessLevel===Tt.Event:"delegationCategoryId"in n?t.accessLevel===Tt.DelegationCategory?Yv(e,t.id,n):t.accessLevel===Tt.Organization||t.accessLevel===Tt.Event:"eventId"in n&&(t.accessLevel===Tt.Event?Yv(e,t.id,n):t.accessLevel===Tt.Organization)):e.roles;return t.map(e=>i.some(t=>"1"===t.permissions[e]))}const Zv=r.createContext({}),Kv=e=>{const{params:{eventId:t}}=Hf(),n=r.useMemo(()=>e.userPermissions.roles.some(e=>e.accessLevel===Tt.Organization||e.accessLevel===Tt.Event),[e.userPermissions]);return t?(0,i.jsx)(Zv.Provider,{value:{hasEventRole:n,userPermissions:e.userPermissions,hasPermission:(t,n)=>function(e,t,n){return Hv(e,[t],n)[0]}(e.userPermissions,t,n),hasPermissions:(t,n)=>Hv(e.userPermissions,t,n)},children:e.children}):(0,i.jsx)(i.Fragment,{children:e.children})};function Qv(){return r.useContext(Zv)}const Xv=e=>{const{translate:t,params:{organizationId:n,eventId:o,delegationId:a}}=Hf(),[s,d]=(0,r.useMemo)(()=>(0,xm.A)(e.delegations,e=>"number"==typeof e.event?.id),[e.delegations]),l=(0,r.useMemo)(()=>(0,vs.A)(Object.values((0,ym.A)(s,e=>e.event.id)),([e])=>e.event.name.toLowerCase()),[s]);return e.delegations.length>1?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(W_,{title:t("communaut_20896"),children:d.map(e=>(0,i.jsx)(Y_,{to:hg.DELEGATION({organizationId:n,delegationId:e.id}),children:e.name},e.id))}),l.map((e,t)=>{const o=e[0],a=(0,vs.A)(e,e=>e.name.toLowerCase());return(0,i.jsx)(W_,{title:o.event.name,children:a.map(e=>(0,i.jsx)(Y_,{to:hg.DELEGATION({organizationId:n,eventId:e.event?.id,delegationId:e.id}),children:e.name},e.id))},t)}),(0,i.jsx)(W_,{children:(0,i.jsx)(Y_,{to:yd(Km.ORGANIZATION_DELEGATIONS({organizationId:n})),children:t("voir_toutes_les_79250")})}),(0,i.jsx)(W_,{children:(0,i.jsx)(Y_,{to:hg.DELEGATION_PROFILE({organizationId:n,eventId:o,delegationId:a}),children:t("mon_profil_48224")})})]}):(0,i.jsx)(W_,{children:(0,i.jsx)(Y_,{to:hg.DELEGATION_PROFILE({organizationId:n,eventId:o,delegationId:a}),children:t("mon_profil_48224")})})},Jv=e=>{const{history:t,translate:n,params:{organizationId:o,eventId:a,delegationId:s}}=Hf(),d=Ti(rd),l=Ti(Wl),c=Ti(Zg),{mutate:u}=function(e={}){return Di("mutation DelegationUpdateFields(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $fields: JSON!\n) {\n delegationUpdateFields(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n fields: $fields\n )\n}\n",e)}(),m=(0,r.useMemo)(()=>({fields:e.delegation.fields}),[e.delegation]),g=(0,r.useCallback)(t=>c.validateForForm(d.delegationUpdateFieldsSchema(l.changedFieldsSchema(e.delegation.usedCustomFields,m.fields,t.fields)))(t),[e.delegation,m]),h=(e=!1)=>e?t.goBack(hg.DELEGATION_DASHBOARD({organizationId:o,eventId:a,delegationId:s})):t.push(hg.DELEGATION_DASHBOARD({organizationId:o,eventId:a,delegationId:s}));return(0,i.jsx)(II,{direction:"column",initialValues:m,render:({form:t,handleSubmit:a,submitting:s,values:r})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(jo,{color:"invisible",leftIcon:"arrow-left",onClick:()=>h(!0),children:n("retour_92202")}),(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(G,{direction:"column",gap:"4",children:e.delegation.usedCustomFields.map(n=>(0,i.jsx)(dS,{change:t.change,display:kl(n,r.fields,e.delegation.usedCustomFields),field:n,fileAcl:"public-read",isMandatory:!1,organizationId:o,prefix:"fields."},n.id))}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsxs)(G,{gap:"4",children:[(0,i.jsx)(jo,{isLoading:s,onClick:a,children:n("mettre_jour_85141")}),(0,i.jsx)(jo,{color:"white",onClick:()=>h(!0),children:n("annuler_48254")})]})]}),validate:g,width:1,onSubmit:async e=>{await u({organizationId:o,eventId:a,delegationId:s,fields:e.fields}),h()}})},eb=()=>{const{params:{organizationId:e,delegationId:t}}=Hf(),{data:n,loader:o}=Mi("query DelegationUpdateFieldsInfos($organizationId: OrganizationId!, $delegationId: DelegationId!) {\n organization(id: $organizationId) {\n delegation(id: $delegationId) {\n fields\n\n usedCustomFields {\n ...CustomFieldWithCondition\n }\n }\n }\n}\n",{organizationId:e,delegationId:t},[Yo.CustomFieldWithConditionFragment]);return o||(0,i.jsx)(Jv,{delegation:n.organization.delegation})},tb=e=>{const{params:{organizationId:t,eventId:n,delegationId:o}}=Hf(),a=Pi(),s=e.delegationsSpaceLayoutTabs.find(e=>e.isPinned)?.slug;return v(s)?(0,i.jsx)(Mp,{path:hg.DELEGATION_TAB({organizationId:t,eventId:n,delegationId:o,slug:s}),replace:!0}):"members"===a.getItem(OI.DELEGATIONS_SPACE_TAB)?(0,i.jsx)(Mp,{path:hg.DELEGATION_MEMBERS({organizationId:t,eventId:n,delegationId:o}),replace:!0}):(0,i.jsx)(Mp,{path:hg.DELEGATION_DASHBOARD({organizationId:t,eventId:n,delegationId:o}),replace:!0})},nb=e=>{const t=(0,r.useContext)(Ci).useLocation().pathname.includes(e.basePath||e.path);return(0,i.jsxs)(i.Fragment,{children:[e.disabled?(0,i.jsxs)(zS,{children:[(0,i.jsx)(BS,{children:(0,i.jsx)(Li,{color:"grayCustom500",css:{borderBottom:"unset",paddingBlock:"$3",fontWeight:"$medium"},children:e.children})}),(0,i.jsx)(FS,{placement:"top",children:e.disabledMessage})]}):(0,i.jsx)(fo,{replace:!0,to:e.path,children:(0,i.jsx)(Li,{color:t?"primaryCustom500":"grayCustom500",css:{borderBottom:t?"2px solid $primaryCustom500":"unset",cursor:t?"inherit":"pointer",paddingBlock:"$3","&:hover":{color:t?"$primaryCustom600":"$grayCustom800"},fontWeight:"$medium"},children:e.children})}),(0,i.jsx)(Li,{width:24})]})},ib=e=>(0,i.jsxs)(G,{"aria-orientation":"horizontal",as:z.Nav,css:{borderBottom:"1px solid $gray200",...e.css},width:1,children:[e.center&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(Li,{css:{flex:"1"}})}),e.children,(0,i.jsx)(Li,{css:{flex:"1"}})]}),ob=e=>(0,i.jsx)(i.Fragment,{children:e.children});ob.displayName="TabPanel";const ab=e=>{const[t,n]=(0,xm.A)(r.Children.toArray(e.children),e=>r.isValidElement(e)&&e.type===ob);return(0,i.jsxs)(G,{direction:"column",width:1,...U(e),children:[n,(0,i.jsx)(Is.dO,{children:t.map((e,t)=>(0,i.jsx)(Is.qh,{path:e.props.path,children:e},t))})]})},sb=e=>{const{history:t}=Hf(),n=Vx(e.children),o=wI(),a=$I(),s=o||a&&e.tabsOnTablet,r=(e,t)=>{const n=e(t);return v(n)?n:n[0]};return(0,i.jsx)(i.Fragment,{children:s?(0,i.jsxs)(ab,{height:1,children:[(0,i.jsx)(ib,{css:e.featureFlags?.isV4?{background:"$white",padding:"$2",borderRadius:"$2"}:void 0,children:n.map((e,t)=>(0,i.jsx)(nb,{path:r(e.props.getPath),children:e.props.title},t))}),(0,i.jsx)(oI,{height:"7"}),n.map((e,t)=>(0,i.jsx)(ob,{path:e.props.getPath(!0),children:e.props.featureFlags?.isV4?(0,i.jsx)(R_,{heading:e.props.title,subtitle:e.props.subtitle,children:e.props.children}):e.props.children},t))]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tS,{css:{marginTop:"$4"},value:v(lo.HEAVENT_APPLICATION_BASENAME)?location.pathname.replace(new RegExp(`^/${lo.HEAVENT_APPLICATION_BASENAME}`,"gm"),""):location.pathname,onChange:e=>t.replace(e),children:n.map((e,t)=>(0,i.jsx)("option",{value:r(e.props.getPath),children:e.props.title},t))}),(0,i.jsx)(oI,{height:"5"}),(0,i.jsx)(Is.dO,{children:n.map((e,t)=>(0,i.jsx)(Is.qh,{path:e.props.getPath(!0),children:e.props.featureFlags?.isV4?(0,i.jsx)(R_,{heading:e.props.title,subtitle:e.props.subtitle,children:e.props.children}):e.props.children},t))})]})})},rb=e=>(0,i.jsx)(i.Fragment,{children:e.children}),db=u([25,50,100]);const lb=(0,r.createContext)({});function cb(){return(0,r.useContext)(lb)}function ub(e,t,n={}){return(0,vs.A)(t,e=>y(e.name)).flatMap(t=>dy(t.accreditations).map(o=>{const a=n.useAccreditationDisplay&&o.accreditationDisplay===Y.Radio?o.name:void 0,s=wg(o.slots);return(0,i.jsx)("optgroup",{label:`${t.name} - ${oy(o)}`,children:s.map(t=>{const s=Dg(e,t,oy(o),{accreditation:{includeNameAtEnd:!0}});return(0,i.jsx)("option",{"data-radio":a,disabled:!(!n.useIsBlocked||!t.isBlocked),value:t.id,children:s},t.id)})},o.id)}))}const mb=new WeakMap,gb=(e,t,n,i)=>{let o=mb.get(i);return o||(o=(async(e,t,n,i)=>{const o=await va();if("createdBy"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return Oa("query Admins($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n usersInfos(isResourceCreator: true) {\n nodes {\n userId\n email\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId},o);i.values=e.usersInfos.nodes.map(({userId:e,email:t,name:n})=>({id:e,name:`${v(n)?n:"-"} - ${t}`})),i.needLoading=!1}else if("categoryLeaders"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return Oa('query DelegationsSegmentsCategoryLeaders($organizationId: OrganizationId!, $eventId: EventId) {\n organization(id: $organizationId) {\n usersInfos(\n eventId: $eventId\n isDelegationCategoryLeader: true\n sort: { attribute: "Name", direction: Asc }\n ) {\n nodes {\n id\n name\n }\n }\n }\n}\n',{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},o);i.values=e.usersInfos.nodes,i.needLoading=!1}else if("leaders"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return Oa('query DelegationsSegmentsLeaders($organizationId: OrganizationId!, $eventId: EventId) {\n organization(id: $organizationId) {\n usersInfos(\n eventId: $eventId\n isDelegationLeader: true\n sort: { attribute: "Name", direction: Asc }\n ) {\n nodes {\n id\n name\n }\n }\n }\n}\n',{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},o);i.values=e.usersInfos.nodes,i.needLoading=!1}else if("delegationCategory"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return Oa("query VolunteersSegmentsDelegationsCategories(\n $organizationId: OrganizationId!\n $level: OrganizationEventLevel!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n delegationsCategories(level: $level, eventId: $eventId) {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,level:i.eventId?ot.Event:ot.Organization,eventId:i.eventId},o);i.values=(0,vs.A)(e.delegationsCategories.nodes,e=>y(e.name)),i.needLoading=!1}else if("roles"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return Oa("query UsersSegmentsRoles($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n roles {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId},o);i.values=(0,vs.A)(e.roles,e=>y(e.name)),i.needLoading=!1}else if("tag"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return Oa("query Tags($organizationId: OrganizationId!, $eventId: EventId, $context: TagContext) {\n organization(id: $organizationId) {\n tags(eventId: $eventId, context: $context) {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId,context:i.tagContext},o);i.values=(0,vs.A)(e.tags.nodes,e=>y(e.name)),i.needLoading=!1}else if(i.slug===vp.CustomField&&i.organizationId){const{organization:e}=await ka({organizationId:i.organizationId,eventId:i.eventId},o);i.values=(0,vs.A)(e.customFields.nodes,e=>y(e.name)),i.needLoading=!1}else if(i.slug===vp.VolunteersSegment&&i.organizationId){const{organization:e}=await function(e,t){return Oa("query WorkflowsSegmentsSegments(\n $organizationId: OrganizationId!\n $level: OrganizationEventLevel!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n volunteersSegmentsFolders: segmentsFolders(\n level: $level\n eventId: $eventId\n segmentType: Volunteers\n ) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n\n delegationsSegmentsFolders: segmentsFolders(\n level: $level\n eventId: $eventId\n segmentType: Delegations\n ) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,level:i.eventId?ot.Event:ot.Organization,eventId:i.eventId},o),t=(e,t)=>(0,vs.A)(t,e=>e.index).map(t=>({name:`${e} - ${t.name}`,values:(0,vs.A)(t.segments,e=>e.index)}));i.valuesGroups=t(n.translate("membres_11310"),e.volunteersSegmentsFolders).concat(t(n.translate("d_l_gations_78318"),e.delegationsSegmentsFolders)),i.needLoading=!1}else if(i.eventId){if(["preassignedPosition","position","wishedPositions"].includes(i.slug)){const{event:e}=await function(e,t){return Oa("query VolunteersSegmentsPositions($eventId: EventId!) {\n event(id: $eventId) {\n positions {\n nodes {\n id\n name\n acronym\n positionCategoryName\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.valuesGroups=(0,vs.A)(Object.entries((0,ym.A)(e.positions.nodes,e=>e.positionCategoryName)).map(([e,t])=>({name:t[0].positionCategoryName,values:(0,vs.A)(t.map(e=>({id:e.id,name:`${Ag(e)} - ${e.positionCategoryName}`})),e=>y(e.name))})),({name:e})=>y(e)),i.needLoading=!1}else if("hasOtherEventPosition"===i.slug&&i.organizationId){const{organization:{positions:e}}=await function(e,t){return Oa("query VolunteersSegmentsOtherPositions($organizationId: OrganizationId!, $eventId: EventId!) {\n organization(id: $organizationId) {\n positions(excludedEventId: $eventId) {\n nodes {\n id\n name\n positionCategoryName\n event {\n id\n name\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},o);i.valuesGroups=(0,vs.A)(Object.entries((0,ym.A)(e.nodes,e=>[e.event.id,e.positionCategoryName])).map(([e,t])=>({name:`${t[0].event.name}: ${t[0].positionCategoryName}`,values:(0,vs.A)(t,e=>y(e.name))})),({name:e})=>y(e)),i.needLoading=!1}else if(["numberOfAssignments","positionSlotId","wishedPositionsSlots","checkInAtPositionSlot","checkOutAtPositionSlot"].includes(i.slug)){const{event:e}=await Ga({eventId:i.eventId},o);i.valuesGroups=function(e,t){return(0,vs.A)(t,e=>y(e.name)).flatMap(t=>(0,vs.A)(t.positions,e=>y(e.name)).map(n=>({id:n.id,name:`${t.name} - ${Ag(n)}`,values:(0,vs.A)(n.slots,e=>[e.range.start.toMillis(),e.name]).map(t=>{const i=jg(e,t,Ag(n),{position:{includeNameAtEnd:!0}});return{id:t.id,name:i}})})))}(t,e.positionsCategories),i.needLoading=!1}else if(["positionCategory","preassignedPositionCategory","wishedPositionsCategories"].includes(i.slug)){const{event:e}=await function(e,t){return Oa("query VolunteersSegmentsPositionsCategories($eventId: EventId!) {\n event(id: $eventId) {\n positionsCategories {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.values=(0,vs.A)(e.positionsCategories,e=>y(e.name)),i.needLoading=!1}else if("wishedSlotsCustom"===i.slug){const{event:t}=await function(e,t){return Oa("query VolunteeersSegmentsCustomSlotsPeriods($eventId: EventId!) {\n event(id: $eventId) {\n startAt\n endAt\n ranges\n\n customSlotsPeriods {\n name\n startDate\n endDate\n\n customSlots {\n name\n startTime\n endTime\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.valuesGroups=((e,t)=>{const n=t.customSlotsPeriods.flatMap(e=>KS(e.startDate??t.startAt,e.endDate??t.endAt,e.customSlots,t.ranges,jt.AllDays));return(0,vs.A)(Object.values((0,ym.A)(n,({interval:e})=>e.start.startOf("day").toMillis())),e=>e[0].interval.start.startOf("day").toMillis()).map(t=>{const n=t[0].interval;return{name:e.toLocaleString(n.start.startOf("day"),oa.DateOnly.WeekdayLongMonthLong),values:t.map(({name:e,interval:t})=>({id:t.toISO(),name:QS(e,t)}))}})})(e,t),i.needLoading=!1}else if(i.slug==yp.AccreditationProfile||i.slug===yp.WishedAccreditationProfile){const{event:e}=await function(e,t){return Oa("query VolunteersSegmentsAccreditationsProfiles($eventId: EventId!) {\n event(id: $eventId) {\n accreditationsProfilesCategories {\n id\n name\n\n accreditationsProfiles {\n id\n name\n acronym\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.valuesGroups=(0,vs.A)(e.accreditationsProfilesCategories,e=>y(e.name)).map(e=>({name:e.name,values:(0,vs.A)(e.accreditationsProfiles,e=>y(e.name)).map(t=>({id:t.id,name:`${oy(t)} - ${e.name}`}))})),i.needLoading=!1}else if("accreditation"===i.slug){const{event:e}=await function(e,t){return Oa("query VolunteersSegmentsAccreditations($eventId: EventId!) {\n event(id: $eventId) {\n accreditations {\n nodes {\n id\n name\n acronym\n accreditationCategoryName\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.valuesGroups=(0,vs.A)(Object.entries((0,ym.A)(e.accreditations.nodes,e=>e.accreditationCategoryName)).map(([e,t])=>({name:t[0].accreditationCategoryName,values:(0,vs.A)(t.map(e=>({id:e.id,name:`${oy(e)} - ${e.accreditationCategoryName}`})),e=>y(e.name))})),({name:e})=>y(e)),i.needLoading=!1}else if("hasOtherEventAccreditation"===i.slug&&i.organizationId){const{organization:{accreditations:e}}=await function(e,t){return Oa("query VolunteersSegmentsOtherAccreditations($organizationId: OrganizationId!, $eventId: EventId!) {\n organization(id: $organizationId) {\n accreditations(excludedEventId: $eventId) {\n nodes {\n id\n name\n accreditationCategoryName\n event {\n id\n name\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},o);i.valuesGroups=(0,vs.A)(Object.entries((0,ym.A)(e.nodes,e=>e.accreditationCategoryName)).map(([e,t])=>({name:`${t[0].event.name}: ${t[0].accreditationCategoryName}`,values:(0,vs.A)(t,e=>y(e.name))})),({name:e})=>y(e)),i.needLoading=!1}else if("accreditationCategory"===i.slug){const{event:e}=await function(e,t){return Oa("query VolunteersSegmentsAccreditationsCategories($eventId: EventId!) {\n event(id: $eventId) {\n accreditationsCategories {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.values=(0,vs.A)(e.accreditationsCategories,e=>y(e.name)),i.needLoading=!1}else if("positionsSegments"===i.slug){const{event:e}=await function(e,t){return Oa("query VolunteersSegmentsPositionsSegments($eventId: EventId!) {\n event(id: $eventId) {\n segmentsFolders(segmentType: Positions) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.valuesGroups=(0,vs.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,vs.A)(e.segments,e=>e.index)})),i.needLoading=!1}else if("accreditationsSegments"===i.slug){const{event:e}=await function(e,t){return Oa("query VolunteersSegmentsAccreditationsSegments($eventId: EventId!) {\n event(id: $eventId) {\n segmentsFolders(segmentType: Accreditations) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.valuesGroups=(0,vs.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,vs.A)(e.segments,e=>e.index)})),i.needLoading=!1}else if("delegationsSegments"===i.slug||"isDelegationLeader"===i.slug){const{event:e}=await function(e,t){return Oa("query VolunteersSegmentsDelegationsSegments($eventId: EventId!) {\n event(id: $eventId) {\n segmentsFolders(segmentType: Delegations) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.valuesGroups=(0,vs.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,vs.A)(e.segments,e=>e.index)})),i.needLoading=!1}else if("forms"===i.slug||"form"===i.slug||"formsInsertedAt"===i.slug){const{event:e}=await function(e,t){return Oa("query VolunteersSegmentsForms($eventId: EventId!) {\n event(id: $eventId) {\n forms {\n nodes {\n ...SegmentForm\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[Yo.SegmentFormFragment]})}({eventId:i.eventId},o);i.values=(0,vs.A)(e.forms.nodes,e=>y(e.name)),i.needLoading=!1}else if("campaign"===i.slug||"campaignReply"===i.slug||"campaignSentAt"===i.slug){const{event:e}=await function(e,t){return Oa("query VolunteersSegmentsCampaigns($eventId: EventId!) {\n event(id: $eventId) {\n campaigns(states: [Done, Scheduled, Template]) {\n nodes {\n ...SegmentCampaign\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[Yo.SegmentCampaignFragment]})}({eventId:i.eventId},o);i.campaigns=(0,vs.A)(e.campaigns.nodes,e=>y(e.name)),i.values=i.campaigns,i.needLoading=!1}else if("delegation"===i.slug){const{event:e}=await function(e,t){return Oa("query VolunteersSegmentsDelegations($eventId: EventId!) {\n event(id: $eventId) {\n delegations {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.values=(0,vs.A)(e.delegations.nodes,e=>y(e.name)),i.needLoading=!1}else if(["numberOfAccreditations","accreditationSlotId","scannedAccreditationsSlots","wishedAccreditationsSlots"].includes(i.slug)){const{event:t}=await Ba({eventId:i.eventId,loadIsBlocked:!1},o);i.valuesGroups=function(e,t){return(0,vs.A)(t,e=>y(e.name)).flatMap(t=>dy(t.accreditations).map(n=>{const i=wg(n.slots);return{id:n.id,name:`${t.name} - ${oy(n)}`,values:i.map(t=>{const i=Dg(e,t,oy(n),{accreditation:{includeNameAtEnd:!0}});return{id:t.id,name:i}})}}))}(e,t.accreditationsCategories),i.needLoading=!1}else if(i.slug===yp.WeezaccessChecklists){const{event:e}=await function(e,t){return Oa("query VolunteersWeezaccessChecklists($eventId: EventId!) {\n event(id: $eventId) {\n weezaccessChecklists {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.values=(0,vs.A)(e.weezaccessChecklists,e=>y(e.name)),i.needLoading=!1}else if("commentWrittenBy"===i.slug){const{organization:e}=await function(e,t){return Oa("query VolunteersSegmentsLeaders($organizationId: OrganizationId!, $eventId: EventId) {\n organization(id: $organizationId) {\n admins: usersInfos(isResourceCreator: true) {\n nodes {\n id\n nameOrEmail\n }\n }\n\n usersInfos(eventId: $eventId, hasRole: true) {\n nodes {\n id\n nameOrEmail\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},o);i.values=(0,vs.A)((0,od.A)(e.admins.nodes.concat(e.usersInfos.nodes),e=>e.id),e=>y(e.nameOrEmail)).map(({id:e,nameOrEmail:t})=>({id:e,name:t})),i.needLoading=!1}else if(i.slug===Lh.DelegationsSpaceLayout){const{event:e}=await function(e,t){return Oa("query DelegationsSegmentsLayouts($eventId: EventId!) {\n event(id: $eventId) {\n delegationsSpaceLayouts {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},o);i.values=(0,vs.A)(e.delegationsSpaceLayouts,e=>y(e.name)),i.needLoading=!1}}else if(i.organizationId)if("event"===i.slug){const{organization:e}=await function(e,t){return Oa("query UsersSegmentsEvents($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n events {\n nodes {\n ...SegmentEvent\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[Yo.SegmentEventFragment]})}({organizationId:i.organizationId},o);i.values=(0,vs.A)(e.events.nodes,e=>y(e.name)),i.needLoading=!1}else if("forms"===i.slug||"formsInsertedAt"===i.slug){const{organization:e}=await function(e,t){return Oa("query UsersSegmentsForms($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n forms(level: Organization) {\n nodes {\n ...SegmentForm\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[Yo.SegmentFormFragment]})}({organizationId:i.organizationId},o);i.values=(0,vs.A)(e.forms.nodes,e=>y(e.name)),i.needLoading=!1}else if("campaign"===i.slug){const{organization:e}=await function(e,t){return Oa("query UsersSegmentsCampaigns($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n campaigns(level: Organization, states: [Done, Scheduled, Template]) {\n nodes {\n ...SegmentCampaign\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[Yo.SegmentCampaignFragment]})}({organizationId:i.organizationId},o);i.campaigns=(0,vs.A)(e.campaigns.nodes,e=>y(e.name)),i.values=i.campaigns,i.needLoading=!1}else if("positionCustomField"===i.slug||"accreditationCustomField"===i.slug){const{organization:e}=await ka({organizationId:i.organizationId,eventId:i.eventId,fieldTypes:[Fe.Checkbox,Fe.Select]},o);i.values=(0,vs.A)(e.customFields.nodes,e=>y(e.name)),i.needLoading=!1}else if("delegation"===i.slug){const{organization:e}=await function(e,t){return Oa("query UsersSegmentsDelegations($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n name\n\n delegations(level: Both) {\n nodes {\n id\n name\n\n event {\n id\n name\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId},o);i.valuesGroups=(0,vs.A)(Object.entries((0,ym.A)(e.delegations.nodes,e=>e.event?.id||-1)).map(([t,n])=>({name:n[0].event?.name??e.name,values:(0,vs.A)(n,e=>y(e.name))})),({name:e})=>y(e)),i.needLoading=!1}else if("usersSegments"===i.slug){const{organization:e}=await function(e,t){return Oa("query VolunteersSegmentsUsersSegments(\n $organizationId: OrganizationId!\n $level: OrganizationEventLevel!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n segmentsFolders(level: $level, eventId: $eventId, segmentType: Volunteers) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,level:ot.Organization},o);i.valuesGroups=(0,vs.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,vs.A)(e.segments,e=>e.index)})),i.needLoading=!1}})(e,t,n,i).finally(()=>{mb.delete(i)}),mb.set(i,o)),o},hb={boxShadow:"$xs",color:"$gray800"},pb=e=>{const t=Ti(mh);return e.filterPredicate.filter.needLoading?(0,i.jsx)(My,{color:"white",css:hb,leftIcon:"loader"}):e.isReadOnly?(0,i.jsx)(My,{color:"white",css:hb,cursor:"default",ellipsis:!0,children:t.filterPredicateToText(e.filterPredicate)}):(0,i.jsx)(My,{color:"white",css:hb,cursor:"pointer",ellipsis:!0,rightIcon:"xmark",onContentClick:()=>e.onClick(e.filterPredicate),onRightIconClick:()=>e.onRemove(e.filterPredicate),children:t.filterPredicateToText(e.filterPredicate)})},fb=e=>{const t=Oi();return(0,i.jsx)(Li,{color:"gray800",css:{textTransform:"uppercase",whiteSpace:"nowrap"},fontSize:"textXs",fontWeight:"medium",children:e.operator===It.Or?t("Or"):t("And")})},Ib=e=>(0,i.jsx)(G,{align:"center",css:{background:"$gray100",borderRadius:"$1",maxWidth:"100%",minWidth:0,padding:"$1 $2"},gap:"2",wrap:"wrap",children:e.group.filtersPredicates.map((t,n)=>(0,i.jsxs)(r.Fragment,{children:[n>0&&(0,i.jsx)(fb,{operator:e.group.operator}),(0,i.jsx)(pb,{filterPredicate:t,isReadOnly:e.isReadOnly,onClick:e.onClick,onRemove:e.onRemove})]},t.predicateIndex))}),_b=e=>{const t=Oi(),{filtersPredicates:n,clearNameCursors:o,setPredicates:a,setIsFilterOpen:s,setSelectedFilterPredicate:d,predicates:l}=cb(),c=(0,r.useMemo)(()=>ch(n),[n]),u=(0,r.useMemo)(()=>(0,od.A)(c,({filter:e})=>e.slug),[c]),m=(0,r.useCallback)(()=>{o(),a({operator:It.And,groups:[]})},[o,a]),g=(0,r.useCallback)(({groupIndex:e,predicateIndex:t})=>{d({groupIndex:e,predicateIndex:t}),s(!0)},[s,d]),p=(0,r.useCallback)(({groupIndex:e,predicateIndex:t})=>{o(),a(Xg(l,e,t))},[l,o,a]);return function(e){const t=Ti(jl),n=Ti(hm),i=Ti(Ai),[o,a]=(0,r.useState)(!1);(0,r.useEffect)(()=>{const o=e.filter(({filter:e})=>e.needLoading);h(o)&&(a(!0),Promise.all(o.map(({filter:e})=>gb(t,n,i,e))).then(()=>{a(!1)}))},[e])}(u),h(c)?(0,i.jsxs)(G,{align:"center",gap:"2",width:1,wrap:"wrap",children:[n.groups.map((t,o)=>(0,i.jsxs)(r.Fragment,{children:[o>0&&(0,i.jsx)(fb,{operator:n.operator}),(0,i.jsx)(Ib,{group:t,isReadOnly:e.isReadOnly,onClick:g,onRemove:p})]},t.groupIndex)),!e.isReadOnly&&(0,i.jsx)(Li,{color:"gray700",css:{cursor:"pointer",marginLeft:"$1"},fontWeight:"medium",onClick:m,children:t("r_initialiser_l_66835")})]}):null};function yb(){return(0,r.useMemo)(()=>navigator.platform.toLowerCase().startsWith("mac"),[])}const xb=e=>{const{translate:t}=Hf(),{columnsSearch:n,setColumnsSearch:o}=cb(),[a,s]=(0,r.useState)(""),d=(0,r.useMemo)(()=>v(a)?e.searchableColumns.filter(e=>y(e.name).includes(y(a))):e.searchableColumns,[e.searchableColumns,a]);return(0,i.jsxs)(F_,{children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(jo,{color:"white",css:{borderLeft:"none",borderBottomLeftRadius:"0",borderTopLeftRadius:"0"},leftIcon:"bars-filter"})}),(0,i.jsx)(K_,{css:{padding:"0"},maxHeight:350,placement:"bottom-end",width:320,children:(0,i.jsxs)(G,{css:{padding:"$4 $6"},direction:"column",gap:"3",children:[(0,i.jsx)(Li,{font:"gray800 textMd medium",children:t("rechercher_sur_85243")}),(0,i.jsx)(EI,{icon:"magnifying-glass",placeholder:t("filtrer_78031"),state:"search",value:a,onChange:s}),(0,i.jsx)(G,{direction:"column",gap:"3",children:d.map(({slug:e,name:t})=>(0,i.jsx)(Qy,{state:n.includes(e)?"checked":"unchecked",onClick:t=>{o(f(n,e,"checked"===t))},children:t},e))})]})})]})},Sb=e=>{const t=Oi(),{isEditMode:n,massActions:o,name:a,possibleColumns:s,possibleRenderings:d,rendering:l,setAreColumnsOpen:c,setIsEditMode:u,setIsFilterOpen:m,setName:g,setNameDebounced:p,setRendering:f,setSelectedFilterPredicate:I}=cb(),_=yb(),y=e.showActions&&!!e.actions&&o.numberOfSelected>0,x=(0,r.useMemo)(()=>(0,vs.A)(s.filter(e=>e.isSearchable),e=>e.name),[s]),S=(0,r.useMemo)(()=>e.showSearchColumns?{"& .h-styled-input-container":{borderBottomRightRadius:"0",borderTopRightRadius:"0"}}:{},[e.showSearchColumns]);return function(e,t){const n=yb(),i=(0,r.useCallback)(e=>{"e"===e.key&&(n&&e.metaKey||!n&&e.ctrlKey)&&t(e)},["e",t]);(0,r.useEffect)(()=>(document.addEventListener("keydown",i,!1),()=>{document.removeEventListener("keydown",i,!1)}),["e",t,i])}(0,(0,r.useCallback)(()=>{e.showEditMode&&u(!n)},[n,e.showEditMode,u])),(0,i.jsxs)(G,{align:"center",gap:"4",children:[(0,i.jsxs)(G,{width:320,children:[(0,i.jsx)(EI,{autoFocus:!0,css:S,icon:"magnifying-glass",placeholder:e.searchPlaceholder??t("rechercher_50038"),value:a,onChange:e=>{g(e),p(e)}}),e.showSearchColumns&&(0,i.jsx)(xb,{searchableColumns:x})]}),y?(0,i.jsx)(G,{css:{flex:"1",justifyContent:"right"},gap:"4",children:e.actions}):(0,i.jsxs)(G,{css:{flex:"1"},gap:"4",children:[e.showFilters&&(0,i.jsx)(jo,{color:"gray",leftIcon:"bars-filter",onClick:()=>{I(null),m(!0)},children:t("filtres_64574")}),(0,i.jsx)(Li,{css:{flex:"1"}}),e.controls,h(d)&&(0,i.jsxs)(F_,{children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(jo,{color:"white",leftIcon:Md(l),children:Dd(t,l)})}),(0,i.jsx)(K_,{placement:"bottom-end",children:d.map(e=>(0,i.jsx)(H_,{icon:Md(e),onClick:()=>f(e),children:Dd(t,e)},e))})]}),e.showEditColumns&&(0,i.jsx)(jo,{color:"white",leftIcon:"gear",onClick:()=>{c(!0)},children:t("_diter_les_colo_39630")}),e.showEditMode&&(0,i.jsx)(Fy,{"aria-keyshortcuts":(_?"Meta":"Control")+"+E",value:n,onChange:u,children:t("mode_dition_93778")})]})]})},vb=e=>{const t=Oi(),{massActions:n}=cb(),o=(0,r.useCallback)(()=>{n.toggleSelectAll("unchecked"),n.setIsAllSelected(!1)},[n]),a=(0,r.useCallback)(()=>{n.setIsAllSelected(!0)},[n]);return(0,i.jsxs)(G,{align:"center",css:{background:"$gray50",borderRadius:"$1",padding:"$3 $4"},gap:"3",children:[(0,i.jsx)(Li,{fontSize:"textMd",fontWeight:"medium",children:(0,i.jsx)(_o,{icon:"circle-exclamation"})}),(0,i.jsx)(Li,{color:"gray700",css:{flex:"1"},fontWeight:"medium",children:n.isAllSelected?e.allSelectedText:e.pageSelectedText}),n.isAllSelected?(0,i.jsx)(Li,{color:"primary500",css:{cursor:"pointer"},fontWeight:"medium",onClick:o,children:t("effacer_la_s_le_85095")}):(0,i.jsx)(Li,{color:"primary500",css:{cursor:"pointer"},fontWeight:"medium",onClick:a,children:e.selectAllText})]})},bb=e=>{const{limit:t,massActions:n,reload:o,showMassActions:a,totalCount:s}=cb(),r=a&&e.showSelectAll&&n.numberOfSelected===t&&s>t;return(0,i.jsxs)(G,{css:{border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$1",borderTopRightRadius:"$1",padding:"$3 $4"},direction:"column",gap:"4",width:1,children:[(0,i.jsx)(Sb,{actions:e.renderActions?.(n,s,o),controls:e.renderControls?.(),showActions:a,showEditColumns:e.showEditColumns??!1,showEditMode:e.showEditMode??!1,showFilters:e.showFilters??!1,showSearchColumns:e.showSearchColumns??!1}),e.showPredicatesBadges&&(0,i.jsx)(_b,{isReadOnly:!e.showFilters}),r&&(0,i.jsx)(vb,{allSelectedText:e.renderAllSelectedText?.(s)??"",pageSelectedText:e.renderPageSelectedText?.(t)??"",selectAllText:e.renderSelectAllText?.(s)??""})]})};var jb=n(3627),Ab=n(4979);const Cb=e=>{const{setNodeRef:t,style:n,handleProps:o}=function(e){const{attributes:t,isDragging:n,listeners:i,setActivatorNodeRef:o,setNodeRef:a,transform:s,transition:d}=(0,jb.gl)({id:e,data:void 0}),l=Ab.Ks.Translate.toString(s),c=(0,r.useMemo)(()=>({position:"relative",transform:l,transition:d,zIndex:n?1:void 0}),[l,d,n]);return{handleProps:(0,r.useMemo)(()=>({ref:o,...t,...i}),[o,t,i]),isDragging:n,setNodeRef:a,style:c}}(e.column.slug);return(0,i.jsxs)(G,{ref:t,css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",padding:"$4"},gap:"4",style:n,children:[(0,i.jsx)(Li,{color:"gray300",css:{cursor:"grab"},...o,children:(0,i.jsx)(_o,{icon:"grip-vertical",iconStyle:"solid"})}),(0,i.jsxs)(G,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)(Li,{color:"gray800",css:{ellipsis:!0},title:e.column.name,width:1,children:e.column.name}),v(e.column.label)&&(0,i.jsx)(Li,{color:"gray500",css:{ellipsis:!0},title:e.column.label,width:1,children:e.column.label})]}),(0,i.jsx)(Ly,{value:e.column.isSelected,onChange:e.onToggle})]})},Eb=({children:e,css:t,onClose:n,returnToFallback:o,size:a})=>{const s=$i(),r=()=>{n?n():s.goBack(o??gf.HOME)};return Ro(r),Mo("common-front/src/designSystem/components/rightPanels/__deprecated/rightPanel.tsx","common-front/src/designSystem/components/rightPanels/base/rightPanel.tsx"),(0,Oo.createPortal)((0,i.jsx)(G,{css:{background:"rgba(52, 64, 84, 0.7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:"100",...t},"data-testid":"right-panel-backdrop",onClick:r,children:(0,i.jsxs)(G,{css:{background:"white",height:"100%",position:"absolute",right:"0",top:"0",width:"sm"===a?"480px":"650px"},"data-testid":"right-panel-body",direction:"column",onClick:e=>To(e,!1),children:[(0,i.jsx)(Li,{color:"gray500",css:{cursor:"pointer",fontSize:"$textMd",position:"absolute",right:"$space$6",top:"$space$6"},onClick:r,children:(0,i.jsx)("i",{className:"far fa-xmark"})}),e]})}),document.body)},Tb=r.forwardRef((e,t)=>(0,i.jsx)(G,{ref:t,css:{flex:"1",overflowY:"auto",px:"$6",...e.css},direction:"column",children:e.children}));Tb.displayName="RightPanelBody";const Ob=e=>(0,i.jsx)(Li,{color:"gray800",css:{borderTop:"1px solid $gray200",px:"$6",py:"$4"},children:e.children});var Rb=n(3375),Mb=n(8831);const Db=[Mb.FN,Mb.Mk],wb=e=>{const t=(0,Rb.FR)((0,Rb.MS)(Rb.AN,{activationConstraint:{distance:4}}),(0,Rb.MS)(Rb.uN,{coordinateGetter:jb.JR})),n=(0,r.useCallback)(({active:t,over:n})=>{if(n&&t.id!==n.id){const i=e.ids.indexOf(t.id),o=e.ids.indexOf(n.id);-1!==i&&-1!==o&&e.onReorder(i,o)}},[e.ids,e.onReorder]);return(0,i.jsx)(Rb.Mp,{collisionDetection:Rb.fp,modifiers:Db,sensors:t,onDragEnd:n,children:(0,i.jsx)(jb.gB,{items:e.ids,strategy:jb._G,children:e.children})})},$b=e=>{const t=Oi(),[n,o]=(0,r.useState)(""),[a,s]=(0,r.useState)((0,vs.A)(e.columns.map(t=>({...t,isSelected:e.initialSelectedColumns.includes(t.slug)})),[({slug:t})=>{const n=e.initialSelectedColumns.indexOf(t);return-1===n?e.columns.length:n},({name:e})=>e])),d=e=>{if(v(n)){const t=y(n);return y(e.name).includes(t)||v(e.label)&&y(e.label).includes(t)}return!0},l=a.filter(d).map(e=>e.slug);return(0,i.jsxs)(Eb,{css:e.css,size:"sm",onClose:e.onClose,children:[(0,i.jsxs)(Tb,{children:[(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(Li,{color:"gray900",fontSize:"textXl",children:e.title}),(0,i.jsx)(Li,{color:"gray500",children:e.subtitle}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(EI,{icon:"magnifying-glass",placeholder:e.searchPlaceholder,value:n,onChange:o}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(Li,{color:"gray900",fontSize:"textMd",fontWeight:"semiBold",children:t("liste_des_champ_00325")}),(0,i.jsx)(oI,{height:"2"}),(0,i.jsx)(wb,{ids:l,onReorder:(e,t)=>{const n=a.map(e=>e.slug);s(function(e,t,n){const i=[...e],[o]=i.splice(t,1);return i.splice(n,0,o),i}(a,n.indexOf(l[e]),n.indexOf(l[t])))},children:(0,i.jsx)(G,{direction:"column",gap:"2",children:a.map((e,t)=>d(e)?(0,i.jsx)(Cb,{column:e,onToggle:()=>{((e,t)=>{s((0,hv.jM)(n=>{n[t].isSelected=!e.isSelected}))})(e,t)}},e.slug):null)})}),(0,i.jsx)(oI,{height:"6"})]}),(0,i.jsx)(Ob,{children:(0,i.jsxs)(G,{gap:"3",justify:"end",children:[(0,i.jsx)(jo,{onClick:()=>{e.onSave(a.filter(e=>e.isSelected).map(e=>e.slug)),e.onClose()},children:e.saveButtonText}),(0,i.jsx)(jo,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})})]})},Pb=["isLeader","isPositionLeader","isPositionCategoryLeader","isDelegationLeader"],Nb=u([ft.IsInLast,ft.IsMoreThanAgo,ft.IsInNext,ft.IsMoreThanAhead]),kb=[ft.Is,ft.IsNot,ft.GreaterThan,ft.GreaterThanEqual,ft.LessThan,ft.LessThanEqual];function zb(e){const{slug:t,fieldType:n}=e;if("condition"===t)return"condition";if(Pb.includes(t))return"leader";if("isAdmin"===t)return"admin";if("privacy"===t)return"privacy";if("isTeam"===t)return"team";if("wishedPositions"===t||"wishedPositionsCategories"===t)return"wishedPositions";if("numberOfAssignmentsPerDay"===t||"volunteersMinutesDays"===t)return"numberPerDay";if("campaignReply"===t)return"campaignReply";switch(n){case Ge.Address:case Ge.Text:case Ge.Textarea:return"text";case Ge.Country:case Ge.Language:case Ge.Nationality:case Ge.Select:case Ge.Sex:return"select";case Ge.Checkbox:case Ge.Validation:return"checkbox";case Ge.Phone:return"phone";case Ge.Number:return"number";case Ge.DateTimeRange:return"dateTimeRange";case Ge.Date:return"date";case Ge.Datetime:return"datetime";case Ge.File:return"file";case Ge.Campaign:return"campaign";default:return"unknown"}}function Lb(e){return"numberOfAccreditations"===e||"numberOfAssignments"===e}function Fb(e){const t=e.slug,n=(e,n)=>({slug:t,operator:e,...n});switch(zb(e)){case"condition":case"leader":case"select":return n(ft.Is,{value:[]});case"admin":case"privacy":case"team":case"unknown":return n(ft.Is,{value:""});case"file":return n(ft.IsEmpty,{value:""});case"wishedPositions":return n(ft.Is,{value:[],value2:1});case"numberPerDay":return n(ft.Is,{value:"",value2:"",value3:""});case"campaignReply":return n(ft.Contains,{value:[],value2:""});case"campaign":return n(ft.Is,{value:[],value2:[]});case"text":case"phone":return n(e.isEncrypted?ft.IsEmpty:ft.Contains,{value:""});case"checkbox":return n(ft.Is,{value:!0});case"number":return n(ft.Is,{value:"",value2:"",value3:Lb(t)?[]:"",value4:""});case"dateTimeRange":return n(ft.Contains,{value:"",value2:""});case"date":return ih(n(ft.Is,{value:"",value2:"",value3:th(t)?[]:void 0,valueDate:{day:-1,month:-1,year:-1}}));case"datetime":return n(ft.Is,{value:"",value2:""})}}function Ub(e){return null!==El(e)}function Bb(e){return Number.isInteger(e)&&e>=0}function Gb(e){return"number"==typeof e}function Vb(e){return null==e||""===e}function Wb(e,t,n){return kb.includes(e.operator)?Gb(t):e.operator!==ft.Between||Gb(t)&&Gb(n)}function qb(e,t){const{operator:n,value:i,value2:o,value3:a,value4:s}=t;switch(zb(e)){case"condition":return n===ft.Is||n===ft.IsNot||h(i);case"leader":return n!==ft.Contains||h(i);case"select":return n!==ft.Is&&n!==ft.IsNot||h(i);case"admin":case"privacy":case"team":case"file":case"checkbox":return!0;case"wishedPositions":return h(i)||n===ft.IsEmpty||n===ft.IsNotEmpty;case"numberPerDay":return Ub(i)&&(kb.includes(n)||n===ft.Between)&&Wb(t,o,a);case"campaignReply":return h(i)&&(n===ft.Contains&&v(o)||n===ft.IsEmpty||n===ft.IsNotEmpty);case"campaign":return h(i)&&h(o);case"text":case"phone":return n!==ft.Contains&&n!==ft.NotContains||v(i);case"number":return(Lb(e.slug)||Vb(a)&&Vb(s)||Ub(a)&&Ub(s))&&Wb(t,i,o);case"dateTimeRange":return Ub(i)&&([ft.Contains,ft.NotContains,ft.Is].includes(n)||Ub(o));case"date":{const n=nh(t);return function(e){const{operator:t,value:n,value2:i,valueDate:o}=e;return t===ft.Is||t===ft.IsNot?[o?.day,o?.month,o?.year].some(e=>"number"==typeof e&&-1!==e):t===ft.IsBefore||t===ft.IsAfter?Ub(n):t===ft.Between?Ub(n)&&Ub(i):!Nb.includes(t)||Bb(n)}(n)&&(!th(e.slug)||h(n.value3))}case"datetime":return function(e){const{operator:t,value:n,value2:i}=e;return[ft.Is,ft.IsNot,ft.IsBefore,ft.IsAfter].includes(t)?Ub(n):t===ft.Between?Ub(n)&&Ub(i):!Nb.includes(t)||Bb(n)}(t);case"unknown":return!1}}const Yb=r.forwardRef(({shouldLightDismiss:e=!0,initialOpen:t=!1,isOpen:n,setIsOpen:o,onClose:a,children:s,...d},l)=>{const[c,u]=r.useState(t),m=r.useRef(null),g=n??c,h=o??u;return r.useEffect(()=>{const e=m.current;return g?function(e){e&&!e.open&&e.showModal()}(e):e?.close(),()=>{e?.close()}},[g]),r.useEffect(()=>{const t=m.current;function n(e){e.preventDefault(),e.stopPropagation(),d.onClose?.(),h(!1)}function i(e){const{target:t}=e;t instanceof Element&&"DIALOG"===t.nodeName&&n(e)}function o(e){"Escape"===e.code&&n(e)}return e&&t?.addEventListener("click",i),t?.addEventListener("keydown",o),()=>{e&&t?.removeEventListener("click",i),t?.removeEventListener("keydown",o)}},[e,h]),r.useImperativeHandle(l,()=>({close(){h(!1)},showModal(){h(!0)},isOpen:()=>g,addEventListener(e,t,n){m.current?.addEventListener(e,t,n)},removeEventListener(e,t,n){m.current?.removeEventListener(e,t,n)}}),[g,h]),(0,i.jsxs)(i.Fragment,{children:[false,(0,i.jsx)("dialog",{ref:m,"aria-describedby":d["aria-describedby"],"aria-label":d["aria-label"],"aria-labelledby":d["aria-labelledby"],style:d.style,onClose:a,...d["aria-description"]?{"aria-description":d["aria-description"]}:{},children:s})]})});Yb.displayName="Dialog";const Hb=({children:e,labelId:t,isOpen:n,size:o,setIsOpen:a,...s})=>{const r=wI();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n dialog::backdrop {\n background: rgba(52, 64, 84, 0.7)\n }\n "}}),(0,i.jsx)(Yb,{"aria-labelledby":t,"data-testid":"right-panel-body",isOpen:n,setIsOpen:a,style:{maxHeight:"none",maxWidth:"none",margin:"0 0 0 0",marginInlineStart:r?"auto":"0",height:"100%",border:"none",inlineSize:r?"sm"===o?"480px":"690px":"100%",top:0,padding:0},onClose:s.onClose,children:(0,i.jsx)(G,{align:"center",css:{background:"$gray50",boxShadow:"$shadowsXl",blockSize:"100%",flex:1},direction:"column",...s,children:e})})]})},Zb=({heading:e,id:t,leftIcon:n,leftIconColor:o,leftIconBorder:a,setIsOpen:s,...r})=>(0,i.jsxs)(G,{as:"header",css:{alignItems:"flex-start",alignSelf:"stretch",background:"$white",borderBlockEnd:"1px solid $gray200"},direction:"column",gap:"4",...r,children:[(0,i.jsxs)(G,{css:{alignItems:"center",alignSelf:"stretch",padding:"$6 $7 $5 $7"},gap:"4",children:[n&&(0,i.jsx)(G,{align:"center",css:{border:a},justify:"center",children:(0,i.jsx)(yy,{color:o,icon:n})}),(0,i.jsx)(G,{css:{alignItems:"flex-start",flex:1},direction:"column",id:t,justify:"center",children:e})]}),(0,i.jsx)(G,{align:"center",css:{padding:"$2",height:"$space$9",width:"$space$9",position:"absolute",right:"$space$4",top:"$space$4"},justify:"center",children:(0,i.jsx)(jo,{color:"invisible",css:{color:"$gray500",width:"$space$6",height:"$space$6",padding:0},textAlign:"center",onClick:()=>s(!1),children:(0,i.jsx)("i",{className:"far fa-xmark"})})}),r.children]}),Kb=e=>(0,i.jsx)(G,{css:{alignSelf:"stretch",alignItems:"start",padding:"$6",overflowY:"auto",...e.css},direction:"column",gap:"6",children:e.children}),Qb=e=>(0,i.jsx)(G,{as:"footer",css:{alignSelf:"stretch",background:"$white",borderBlockStart:"1px solid $gray200",marginBlockStart:"auto",padding:"$4 $6"},gap:"3",justify:"end",children:e.children});function Xb(e){return{...e,groups:e.groups.map(e=>({...e,key:e.key??ga(),predicates:e.predicates.map(e=>({...e,key:e.key??ga()}))}))}}function Jb(e){return e.key}const ej=e=>{const{setIsOpen:t}=U_();return(0,i.jsxs)(qx,{isCheckbox:!1,isRadio:!1,isSelected:!1,value:e.filter.slug,onClick:()=>{e.onSelect(e.filter),t(!1)},children:[e.filter.name,v(e.filter.label)&&(0,i.jsxs)(Li,{as:"span",color:"gray500",css:{marginLeft:"$1"},fontSize:"textXs",children:["(",e.filter.label,")"]})]})},tj=e=>{const t=Oi(),[n,o]=(0,r.useState)(""),a=(0,r.useMemo)(()=>{const t=y(n),i=v(n)?e.filters.filter(e=>y(e.name).includes(t)||v(e.label)&&y(e.label).includes(t)):e.filters;return Object.entries((0,ym.A)(i,e=>e.category))},[e.filters,n]);return(0,i.jsxs)(F_,{children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(jo,{color:"invisible",css:{paddingInline:0},leftIcon:"plus",children:e.text})}),(0,i.jsx)(K_,{css:{padding:0},placement:e.placement??"bottom-start",width:560,children:(0,i.jsxs)(G,{css:{padding:"$2"},direction:"column",gap:"3",width:1,children:[(0,i.jsx)(EI,{autoFocus:!0,icon:"magnifying-glass",placeholder:t("rechercher_un_f_22061"),value:n,onChange:o}),(0,i.jsx)(Li,{css:{maxHeight:"360px",overflowY:"auto"},children:a.map(([t,n],a)=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(Gx,{index:a,children:t}),n.map(t=>(0,i.jsx)(ej,{filter:t,onSelect:t=>{o(""),e.onSelect(t)}},t.slug))]},t))})]})})]})},nj=e=>{const t=Oi(),n=e.filter.campaigns??[],o=Array.isArray(e.predicate.value)?e.predicate.value:[],a=Array.isArray(e.predicate.value2)?e.predicate.value2:[],s=(0,qo.A)(n.filter(({id:e})=>o.includes(e)).map(({campaignType:e})=>e)),r=(0,qo.A)(["NotSent",...s.includes(le.Email)?zn.filter(e=>e!==Te.Queued):[],...s.includes(le.Sms)?ui:[]]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Qx,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_28439"),values:o,onChange:t=>{e.onChange({...e.predicate,value:t})},children:n.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),o.length>0&&(0,i.jsx)(Qx,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_62901"),values:a,onChange:t=>{e.onChange({...e.predicate,value2:t})},children:r.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))})]})},ij=e=>(0,i.jsx)(tS,{value:e.value,onChange:t=>{e.onChange(t)},children:e.operators.map(({operator:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e))}),oj=e=>{const t=Oi(),n=e.filter.campaigns??[],{operator:o,value2:a}=e.predicate,s=Array.isArray(e.predicate.value)?e.predicate.value:[],d=(0,r.useMemo)(()=>[{operator:ft.Contains,name:t("contient_34012")},{operator:ft.IsEmpty,name:t("est_vide_96759")},{operator:ft.IsNotEmpty,name:t("n_est_pas_vide_45804")}],[t]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Qx,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_28439"),values:s,onChange:t=>{e.onChange({...e.predicate,value:t})},children:n.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),s.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ij,{operators:d,value:o,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),o===ft.Contains&&(0,i.jsx)(EI,{value:a??"",onChange:t=>{e.onChange({...e.predicate,value2:t})}})]})]})},aj=[ft.Is,ft.IsNot],sj=e=>{const t=Oi(),n=(0,r.useMemo)(()=>(0,bs.A)([{operator:ft.Is,name:t("est_25967")},{operator:ft.IsNot,name:t("n_est_pas_97826")},!0!==e.filter.hideEmpty&&{operator:ft.IsEmpty,name:t("est_vide_96759")},!0!==e.filter.hideEmpty&&{operator:ft.IsNotEmpty,name:t("n_est_pas_vide_45804")}]),[e.filter,t]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ij,{operators:n,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),aj.includes(e.predicate.operator)&&(0,i.jsxs)(tS,{shouldParseAsBoolean:!0,value:e.predicate.value??!0,onChange:t=>{e.onChange({...e.predicate,value:t})},children:[(0,i.jsx)("option",{value:"true",children:t("true")}),(0,i.jsx)("option",{value:"false",children:t("false")})]})]})},rj=e=>{const t=Oi(),n=e.filter.values??[],o=(0,r.useMemo)(()=>(0,bs.A)([{operator:ft.Is,name:t("champ_dont_un_a_44854")},{operator:ft.IsNot,name:t("champ_d_pendant_33676")},h(e.filter.values)&&{operator:ft.Contains,name:t("d_pends_du_cham_39787")}]),[e.filter,t]),a=Array.isArray(e.predicate.value)?e.predicate.value:[];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ij,{operators:o,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),e.predicate.operator===ft.Contains&&(0,i.jsx)(Qx,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:a,onChange:t=>{e.onChange({...e.predicate,value:t})},children:n.map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e))})]})};var dj=n(3551);const lj=e=>{const t=Oi(),n=Ti(jl),o=(0,r.useMemo)(()=>Vo.c9.now().startOf("year"),[]);return(0,i.jsxs)(G,{gap:"3",children:[(0,i.jsxs)(tS,{shouldParseAsInt:!0,value:e.value.day??-1,onChange:t=>{e.onChange({...e.value,day:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("jour_74089")}),(0,dm.A)(1,32).map(e=>(0,i.jsx)("option",{value:e,children:e},e))]}),(0,i.jsxs)(tS,{shouldParseAsInt:!0,value:e.value.month??-1,onChange:t=>{e.onChange({...e.value,month:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("mois_10165")}),(0,dm.A)(1,13).map(e=>(0,i.jsx)("option",{value:e,children:n.toLocaleString(o.set({month:e}),{month:"long"})},e))]}),(0,i.jsxs)(tS,{shouldParseAsInt:!0,value:e.value.year??-1,onChange:t=>{e.onChange({...e.value,year:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("ann_e_38546")}),(0,dj.A)(1900,o.year+2).map(e=>(0,i.jsx)("option",{value:e,children:e},e))]})]})};function cj(e){return Nb.includes(e)}function uj(e,t){return cj(e)===cj(t)?{operator:t}:{operator:t,value:"",value2:""}}function mj(e){return[{operator:ft.IsInLast,name:e("est_dans_les_n_05750")},{operator:ft.IsMoreThanAgo,name:e("est_il_y_a_plus_04600")},{operator:ft.IsInNext,name:e("est_dans_les_n_72234")},{operator:ft.IsMoreThanAhead,name:e("est_dans_plus_d_94311")}]}const gj=u({day:-1,month:-1,year:-1}),hj=e=>{const t=Oi(),n=th(e.filter.slug),o=nh(e.predicate),{operator:a,value:s,value2:d,value3:l,valueDate:c}=o,u=n&&Array.isArray(l)?l:[],m=(0,r.useMemo)(()=>(0,bs.A)([{operator:ft.Is,name:t("est_25967")},{operator:ft.IsNot,name:t("n_est_pas_97826")},{operator:ft.IsBefore,name:t("est_avant_le_16689")},{operator:ft.IsAfter,name:t("est_apr_s_le_79703")},{operator:ft.Between,name:t("est_entre_born_59665")},...mj(t),{operator:ft.Today,name:t("est_aujourd_hui_82571")},{operator:ft.ThisDayMonth,name:t("est_aujourd_hui_70881")},!0!==e.filter.hideEmpty&&{operator:ft.IsEmpty,name:t("est_vide_96759")},!0!==e.filter.hideEmpty&&{operator:ft.IsNotEmpty,name:t("n_est_pas_vide_45804")}]),[e.filter,t]),g=t=>{e.onChange(ih({...o,...t}))};return(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsx)(Qx,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:"campaignSentAt"===e.filter.slug?t("s_lectionner_un_28439"):t("s_lectionner_un_13356"),values:u,onChange:e=>{g({value3:e})},children:(e.filter.values||[]).map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e))}),(!n||u.length>0)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ij,{operators:m,value:a,onChange:e=>{g(uj(a,e))}}),(a===ft.Is||a===ft.IsNot)&&(0,i.jsx)(lj,{value:c??gj,onChange:e=>{g({valueDate:e})}}),(a===ft.IsBefore||a===ft.IsAfter)&&(0,i.jsx)(Jy,{max:e.filter.endAt,min:e.filter.startAt,value:s??"",onChange:e=>{g({value:e})}}),a===ft.Between&&(0,i.jsxs)(G,{gap:"3",children:[(0,i.jsx)(Jy,{max:e.filter.endAt,min:e.filter.startAt,value:s??"",onChange:e=>{g({value:e})}}),(0,i.jsx)(Jy,{max:e.filter.endAt,min:e.filter.startAt,value:d??"",onChange:e=>{g({value2:e})}})]}),cj(a)&&(0,i.jsx)(EI,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:s??"",onChange:e=>{g({value:e})}})]})]})},pj=e=>{const t=Oi(),{operator:n,value:o,value2:a}=e.predicate,s=(0,r.useMemo)(()=>e.filter.useLocalZone?sa():void 0,[e.filter]),d=e=>v(e)?Vo.c9.fromISO(e,{zone:s||"UTC"}):e??"",l=(0,r.useMemo)(()=>(0,bs.A)([{operator:ft.Is,name:t("est_25967")},{operator:ft.IsNot,name:t("n_est_pas_97826")},{operator:ft.IsBefore,name:t("est_avant_le_16689")},{operator:ft.IsAfter,name:t("est_apr_s_le_79703")},{operator:ft.Between,name:t("est_entre_born_59665")},...mj(t),{operator:ft.Today,name:t("est_aujourd_hui_82571")},!0!==e.filter.hideEmpty&&{operator:ft.IsEmpty,name:t("est_vide_96759")},!0!==e.filter.hideEmpty&&{operator:ft.IsNotEmpty,name:t("n_est_pas_vide_45804")}]),[e.filter,t]),c=t=>{e.onChange({...e.predicate,...t})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ij,{operators:l,value:n,onChange:e=>{c(uj(n,e))}}),(n===ft.Is||n===ft.IsNot)&&(0,i.jsx)(Jy,{max:e.filter.endAt,min:e.filter.startAt,value:o??"",onChange:e=>{c({value:e})}}),(n===ft.IsBefore||n===ft.IsAfter)&&(0,i.jsx)(tx,{value:d(o),zone:s,onChange:e=>{c({value:e})}}),n===ft.Between&&(0,i.jsxs)(G,{direction:"column",gap:"3",children:[(0,i.jsx)(tx,{value:d(o),zone:s,onChange:e=>{c({value:e})}}),(0,i.jsx)(tx,{value:d(a),zone:s,onChange:e=>{c({value2:e})}})]}),cj(n)&&(0,i.jsx)(EI,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:o??"",onChange:e=>{c({value:e})}})]})},fj=[ft.Contains,ft.NotContains],Ij=[ft.Overlaps,ft.NotOverlaps,ft.Engulfs,ft.NotEngulfs,ft.EngulfedBy,ft.NotEngulfedBy],_j=e=>{const t=Oi(),{operator:n,value:o,value2:a}=e.predicate,s=(0,r.useMemo)(()=>[{operator:ft.Contains,name:t("contient_34012")},{operator:ft.Is,name:t("contient_date_89885")},{operator:ft.NotContains,name:t("ne_contient_pas_85399")},{operator:ft.Overlaps,name:t("chevauche_49445")},{operator:ft.NotOverlaps,name:t("ne_chevauche_pa_17307")},{operator:ft.Engulfs,name:t("engloutis_42346")},{operator:ft.NotEngulfs,name:t("n_engloutis_pas_42363")},{operator:ft.EngulfedBy,name:t("est_englouti_pa_47852")},{operator:ft.NotEngulfedBy,name:t("n_est_pas_englo_08733")}],[t]),d=t=>{e.onChange({...e.predicate,...t})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ij,{operators:s,value:n,onChange:e=>{d({operator:e})}}),fj.includes(n)&&(0,i.jsx)(tx,{max:e.filter.endAt,min:e.filter.startAt,value:o??"",onChange:e=>{d({value:e})}}),n===ft.Is&&(0,i.jsx)(Jy,{max:e.filter.endAt,min:e.filter.startAt,value:o??"",onChange:e=>{d({value:e})}}),Ij.includes(n)&&(0,i.jsxs)(G,{direction:"column",gap:"3",children:[(0,i.jsx)(tx,{max:e.filter.endAt,min:e.filter.startAt,placeholder:t("d_but_41840"),value:o??"",onChange:e=>{d({value:e})}}),(0,i.jsx)(tx,{max:e.filter.endAt,min:e.filter.startAt,placeholder:t("fin_60104"),value:a??"",onChange:e=>{d({value2:e})}})]})]})},yj=e=>{const t=Oi(),n=(0,r.useMemo)(()=>(0,bs.A)([{operator:ft.Is,name:t("est_responsable_47377")},"isDelegationLeader"===e.filter.slug&&{operator:ft.Contains,name:t("est_responsable_00281")},{operator:ft.IsNot,name:t("n_est_pas_respo_55625")}]),[e.filter,t]),o=(0,r.useMemo)(()=>uh(e.filter,t),[e.filter,t]),a=Array.isArray(e.predicate.value)?e.predicate.value:[];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ij,{operators:n,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),e.predicate.operator===ft.Contains&&(0,i.jsx)(Qx,{hint:t("_1_s_lectionn_51286",a.length),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:a,onChange:t=>{e.onChange({...e.predicate,value:t})},children:o})]})},xj=e=>{const t=Oi(),[n,o]=(0,r.useState)(!h(e.value)),a=(0,r.useMemo)(()=>uh(e.filter,t),[e.filter,t]);return(0,i.jsxs)(G,{css:{border:"1px solid $gray200",borderRadius:"$2",background:"$white",padding:"$4"},direction:"column",gap:"2",children:[(0,i.jsx)(Li,{color:"gray900",fontSize:"textSm",fontWeight:"medium",children:t("le_filtre_se_ba_92445")}),(0,i.jsxs)(G,{direction:"column",gap:"3",children:[(0,i.jsx)(by,{state:n?"checked":"unchecked",onClick:()=>{o(!0),e.onChange([])},children:e.allText}),(0,i.jsxs)(G,{direction:"column",gap:"2",children:[(0,i.jsx)(by,{state:n?"unchecked":"checked",onClick:()=>o(!1),children:e.someText}),!n&&(0,i.jsx)(G,{css:{paddingLeft:"$6"},children:(0,i.jsx)(Qx,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,values:e.value,onChange:e.onChange,children:a})})]})]})]})},Sj=[ft.Is,ft.IsNot,ft.GreaterThan,ft.GreaterThanEqual,ft.LessThan,ft.LessThanEqual],vj=e=>null!==El(e),bj=e=>{const t=Oi(),{slug:n}=e.filter,{operator:o,value:a,value2:s,value3:d,value4:l}=e.predicate,c=(0,r.useMemo)(()=>(0,bs.A)([{operator:ft.Is,name:t("est_25967")},{operator:ft.IsNot,name:t("n_est_pas_97826")},{operator:ft.GreaterThan,name:t("plus_grand_que_28412")},{operator:ft.GreaterThanEqual,name:t("_gal_ou_plus_gr_76897")},{operator:ft.LessThan,name:t("plus_petit_que_35846")},{operator:ft.LessThanEqual,name:t("_gal_ou_plus_pe_38400")},{operator:ft.Between,name:t("est_entre_born_59665")},!0!==e.filter.hideEmpty&&{operator:ft.IsEmpty,name:t("est_vide_96759")},!0!==e.filter.hideEmpty&&{operator:ft.IsNotEmpty,name:t("n_est_pas_vide_45804")}]),[e.filter,t]),[u,m]=(0,r.useState)(vj(d)&&vj(l)),g=t=>{e.onChange({...e.predicate,...t})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ij,{operators:c,value:o,onChange:e=>{g({operator:e})}}),Sj.includes(o)&&(0,i.jsx)(EI,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:a??"",onChange:e=>{g({value:e})}}),o===ft.Between&&(0,i.jsxs)(G,{gap:"3",children:[(0,i.jsx)(EI,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:a??"",onChange:e=>{g({value:e})}}),(0,i.jsx)(EI,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:s??"",onChange:e=>{g({value2:e})}})]}),"numberOfAssignmentsDays"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Qy,{state:u?"checked":"unchecked",onClick:e=>{m("checked"===e),"checked"!==e&&g({value3:"",value4:""})},children:t("filtrer_sur_une_06420")}),u&&(0,i.jsxs)(G,{gap:"3",children:[(0,i.jsx)(Jy,{max:e.filter.endAt,min:e.filter.startAt,value:d??"",onChange:e=>{g({value3:e})}}),(0,i.jsx)(Jy,{max:e.filter.endAt,min:e.filter.startAt,value:l??"",onChange:e=>{g({value4:e})}})]})]}),"numberOfAccreditations"===n&&(0,i.jsx)(xj,{allText:t("sur_toutes_les_40684"),filter:e.filter,someText:t("sur_certaines_a_13180"),value:Array.isArray(d)?d:[],onChange:e=>{g({value3:e})}}),"numberOfAssignments"===n&&(0,i.jsx)(xj,{allText:t("sur_toutes_les_97037"),filter:e.filter,someText:t("sur_certaines_m_74733"),value:Array.isArray(d)?d:[],onChange:e=>{g({value3:e})}})]})},jj=e=>{const t=Oi(),{operator:n,value:o,value2:a,value3:s}=e.predicate,d=(0,r.useMemo)(()=>[{operator:ft.Is,name:t("est_25967")},{operator:ft.IsNot,name:t("n_est_pas_97826")},{operator:ft.GreaterThan,name:t("plus_grand_que_28412")},{operator:ft.GreaterThanEqual,name:t("_gal_ou_plus_gr_76897")},{operator:ft.LessThan,name:t("plus_petit_que_35846")},{operator:ft.LessThanEqual,name:t("_gal_ou_plus_pe_38400")},{operator:ft.Between,name:t("est_entre_born_59665")}],[t]),l=t=>{e.onChange({...e.predicate,...t})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Jy,{label:t("jour_d_affectat_27334"),max:e.filter.endAt,min:e.filter.startAt,value:o??"",onChange:e=>{l({value:e})}}),(0,i.jsx)(ij,{operators:d,value:n,onChange:e=>{l({operator:e})}}),(0,i.jsxs)(G,{gap:"3",children:[(0,i.jsx)(EI,{min:0,shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:a??"",onChange:e=>{l({value2:e})}}),n===ft.Between&&(0,i.jsx)(EI,{min:0,shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:s??"",onChange:e=>{l({value3:e})}})]})]})},Aj=e=>{const t=Oi(),n=(0,r.useMemo)(()=>{switch(e.kind){case"admin":return[{operator:ft.Is,name:t("est_administrat_15766")},{operator:ft.IsNot,name:t("n_est_pas_admin_58612")}];case"privacy":return[{operator:ft.Is,name:t("Public")},{operator:ft.IsNot,name:t("Private")}];case"team":return[{operator:ft.Is,name:t("est_inscrit_en_86193")},{operator:ft.IsNot,name:t("n_est_pas_inscr_25311")}];case"file":return[{operator:ft.IsEmpty,name:t("est_vide_96759")},{operator:ft.IsNotEmpty,name:t("n_est_pas_vide_45804")}]}},[e.kind,t]);return(0,i.jsx)(ij,{operators:n,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}})},Cj=[ft.Is,ft.IsNot],Ej=e=>{const t=Oi(),n=(0,r.useMemo)(()=>(0,bs.A)([{operator:ft.Is,name:t("est_25967")},{operator:ft.IsNot,name:t("n_est_pas_97826")},!0!==e.filter.hideEmpty&&{operator:ft.IsEmpty,name:t("est_vide_96759")},!0!==e.filter.hideEmpty&&{operator:ft.IsNotEmpty,name:t("n_est_pas_vide_45804")}]),[e.filter,t]),o=(0,r.useMemo)(()=>uh(e.filter,t),[e.filter,t]),a=Array.isArray(e.predicate.value)?e.predicate.value:[];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ij,{operators:n,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),Cj.includes(e.predicate.operator)&&(0,i.jsx)(Qx,{hint:t("_1_s_lectionn_51286",a.length),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:a,onChange:t=>{e.onChange({...e.predicate,value:t})},children:o})]})},Tj=[ft.Contains,ft.NotContains,ft.StartsWith,ft.EndsWith],Oj=e=>{const t=Oi(),n=(0,r.useMemo)(()=>{const n=!0===e.filter.isEncrypted,i=!0!==e.filter.hideEmpty;return(0,bs.A)([!n&&{operator:ft.Contains,name:t("contient_34012")},!n&&{operator:ft.NotContains,name:t("ne_contient_pas_85399")},!n&&{operator:ft.StartsWith,name:t("commence_par_11056")},!n&&{operator:ft.EndsWith,name:t("finit_par_79657")},i&&{operator:ft.IsEmpty,name:t("est_vide_96759")},i&&{operator:ft.IsNotEmpty,name:t("n_est_pas_vide_45804")},e.showIsValid&&{operator:ft.IsValid,name:t("est_valide_72630")},e.showIsValid&&{operator:ft.IsNotValid,name:t("n_est_pas_valid_75405")}])},[e.filter,e.showIsValid,t]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ij,{operators:n,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),Tj.includes(e.predicate.operator)&&(0,i.jsx)(EI,{value:e.predicate.value??"",onChange:t=>{e.onChange({...e.predicate,value:t})}})]})},Rj=[ft.Is,ft.IsNot,ft.Contains],Mj=e=>{const t=Oi(),n=(0,r.useMemo)(()=>[{operator:ft.Is,name:t("est_25967")},{operator:ft.IsNot,name:t("n_est_pas_97826")},{operator:ft.Contains,name:t("est_le_choix_07450")},{operator:ft.IsEmpty,name:t("est_vide_96759")},{operator:ft.IsNotEmpty,name:t("n_est_pas_vide_45804")}],[t]),o=(0,r.useMemo)(()=>uh(e.filter,t),[e.filter,t]),{operator:a,value2:s}=e.predicate,d=Array.isArray(e.predicate.value)?e.predicate.value:[];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ij,{operators:n,value:a,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),a===ft.Contains&&(0,i.jsx)(EI,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:s??"",onChange:t=>{e.onChange({...e.predicate,value2:t})}}),Rj.includes(a)&&(0,i.jsx)(Qx,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:d,onChange:t=>{e.onChange({...e.predicate,value:t})},children:o})]})},Dj=({filter:e,predicate:t,onChange:n})=>{const o=zb(e);switch(o){case"text":case"phone":return(0,i.jsx)(Oj,{filter:e,predicate:t,showIsValid:"phone"===o,onChange:n});case"select":return(0,i.jsx)(Ej,{filter:e,predicate:t,onChange:n});case"checkbox":return(0,i.jsx)(sj,{filter:e,predicate:t,onChange:n});case"number":return(0,i.jsx)(bj,{filter:e,predicate:t,onChange:n});case"date":return(0,i.jsx)(hj,{filter:e,predicate:t,onChange:n});case"datetime":return(0,i.jsx)(pj,{filter:e,predicate:t,onChange:n});case"dateTimeRange":return(0,i.jsx)(_j,{filter:e,predicate:t,onChange:n});case"condition":return(0,i.jsx)(rj,{filter:e,predicate:t,onChange:n});case"leader":return(0,i.jsx)(yj,{filter:e,predicate:t,onChange:n});case"admin":case"file":case"privacy":case"team":return(0,i.jsx)(Aj,{kind:o,predicate:t,onChange:n});case"wishedPositions":return(0,i.jsx)(Mj,{filter:e,predicate:t,onChange:n});case"numberPerDay":return(0,i.jsx)(jj,{filter:e,predicate:t,onChange:n});case"campaign":return(0,i.jsx)(nj,{filter:e,predicate:t,onChange:n});case"campaignReply":return(0,i.jsx)(oj,{filter:e,predicate:t,onChange:n});case"unknown":return null}},wj=e=>{const t=Oi(),n=function(e){const t=Ti(jl),n=Ti(hm),i=Ti(Ai),[o,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{e.needLoading&&(a(!0),gb(t,n,i,e).then(()=>{a(!1)}))},[e.needLoading]),o}(e.filter),o=qb(e.filter,e.predicate),a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(e.isSelected&&!n){const e=requestAnimationFrame(()=>{a.current?.scrollIntoView({block:"center"})});return()=>{cancelAnimationFrame(e)}}return RI.A},[n]),(0,i.jsxs)(G,{ref:a,css:{background:"$white",border:"1px solid "+(o?"$gray200":"$error500"),borderRadius:"$2",boxShadow:"$xs",overflow:"hidden"},direction:"column",width:1,children:[(0,i.jsxs)(G,{align:"center",css:{borderBottom:"1px solid $gray200",padding:"$4"},gap:"4",width:1,children:[(0,i.jsx)(Li,{color:"gray900",css:{flex:"1"},fontSize:"textSm",fontWeight:"semiBold",children:e.filter.name}),(0,i.jsx)(jo,{"aria-label":t("Supprimer le filtre"),color:"white",leftIcon:"trash-can",size:"sm",onClick:e.onDelete})]}),(0,i.jsx)(G,{css:{background:"$gray50",padding:"$3 $4"},direction:"column",gap:"4",width:1,children:n?(0,i.jsx)(xo,{}):(0,i.jsx)(Dj,{filter:e.filter,predicate:e.predicate,onChange:e.onChange})})]})},$j=e=>{const t=Oi();return e.isFirst?(0,i.jsxs)(tS,{css:{width:"fit-content"},value:e.operator,onChange:e.onChange,children:[(0,i.jsx)("option",{value:It.And,children:t("And")}),(0,i.jsx)("option",{value:It.Or,children:t("Or")})]}):(0,i.jsx)(Li,{color:"gray800",fontSize:"textSm",fontWeight:"medium",children:e.operator===It.Or?t("Or"):t("And")})},Pj=e=>{const t=Oi();return(0,i.jsxs)(G,{css:{background:"$white",border:"1px solid $gray200",borderRadius:"$2",boxShadow:"$xs"},direction:"column",width:1,children:[(0,i.jsxs)(G,{align:"center",css:{borderBottom:"1px solid $gray200",padding:"$4 $6"},gap:"4",width:1,children:[(0,i.jsxs)(Li,{color:"gray900",css:{flex:"1"},fontSize:"textSm",fontWeight:"semiBold",children:[t("groupe_74342")," ",e.index+1]}),(0,i.jsx)(jo,{"aria-label":t("Supprimer le groupe"),color:"white",leftIcon:"trash-can",size:"sm",onClick:e.onDelete})]}),(0,i.jsxs)(G,{align:"start",css:{padding:"$4 $6"},direction:"column",gap:"4",width:1,children:[e.group.filtersPredicates.map(({filter:t,predicate:n,predicateIndex:o},a)=>(0,i.jsxs)(r.Fragment,{children:[a>0&&(0,i.jsx)($j,{isFirst:1===a,operator:e.group.operator,onChange:e.onOperatorChange}),(0,i.jsx)(wj,{filter:t,isSelected:e.selectedFilterPredicate?.groupIndex===e.group.groupIndex&&e.selectedFilterPredicate.predicateIndex===o,predicate:n,onChange:t=>e.onChange(o,t),onDelete:()=>e.onDeletePredicate(o)})]},Jb(n)??o)),(0,i.jsx)(tj,{filters:e.filters,text:t("ajouter_un_filt_56907"),onSelect:e.onAdd})]})]})},Nj="filters-heading",kj=e=>{const t=Oi(),[n,o]=(0,r.useState)(()=>Xb(e.predicates)),a=e=>o(t=>Xb(e(t))),s=(0,r.useMemo)(()=>lh(n,e.possibleFilters),[n,e.possibleFilters]),d=(0,r.useMemo)(()=>ch(s).every(({filter:e,predicate:t})=>qb(e,t)),[s]),l=e=>a(t=>{return n=t,i=Fb(e),{...n,groups:[...n.groups,{operator:It.And,predicates:[i]}]};var n,i});return(0,i.jsxs)(Hb,{isOpen:!0,labelId:Nj,setIsOpen:t=>{t||e.onClose()},size:"md",children:[(0,i.jsx)(Zb,{heading:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Li,{color:"gray900",fontSize:"textLg",fontWeight:"semiBold",children:t("filtres_64574")}),v(e.subtitle)&&(0,i.jsx)(Li,{color:"gray500",fontSize:"textSm",children:e.subtitle})]}),id:Nj,leftIcon:"sliders",leftIconColor:"gray",setIsOpen:()=>e.onClose()}),(0,i.jsx)(Kb,{css:{alignItems:"stretch",flex:"1"},children:0===s.groups.length?(0,i.jsxs)(G,{align:"center",css:{background:"$white",border:"1px solid $gray200",borderRadius:"$2",boxShadow:"$xs",flex:"1",padding:"$6"},direction:"column",gap:"4",justify:"center",children:[(0,i.jsx)(Li,{color:"gray800",fontSize:"textSm",children:t("personnaliser_v_62048")}),(0,i.jsx)(tj,{filters:e.possibleFilters,placement:"bottom",text:t("ajouter_un_filt_56907"),onSelect:l})]}):(0,i.jsxs)(G,{align:"start",direction:"column",gap:"4",children:[s.groups.map((t,o)=>(0,i.jsxs)(r.Fragment,{children:[o>0&&(0,i.jsx)($j,{isFirst:1===o,operator:n.operator,onChange:e=>a(t=>function(e,t){return{...e,operator:t}}(t,e))}),(0,i.jsx)(Pj,{filters:e.possibleFilters,group:t,index:o,selectedFilterPredicate:e.selectedFilterPredicate,onAdd:e=>a(n=>{return i=n,o=t.groupIndex,a=Fb(e),Qg(i,o,e=>({...e,predicates:[...e.predicates,a]}));var i,o,a}),onChange:(e,n)=>a(i=>function(e,t,n,i){return Qg(e,t,e=>({...e,predicates:e.predicates.map((e,t)=>t===n?i:e)}))}(i,t.groupIndex,e,n)),onDelete:()=>a(e=>Jg(e,t.groupIndex)),onDeletePredicate:e=>a(n=>Xg(n,t.groupIndex,e)),onOperatorChange:e=>a(n=>function(e,t,n){return Qg(e,t,e=>({...e,operator:n}))}(n,t.groupIndex,e))})]},Jb(n.groups[t.groupIndex])??t.groupIndex)),(0,i.jsx)(tj,{filters:e.possibleFilters,text:t("ajouter_un_grou_76251"),onSelect:l})]})}),(0,i.jsxs)(Qb,{children:[(0,i.jsx)(jo,{color:"white",onClick:e.onClose,children:t("annuler_48254")}),(0,i.jsx)(jo,{disabled:!d,onClick:()=>{var t;e.onFilter((t=n,{...t,groups:t.groups.map(e=>({...(0,Ni.A)(e,"key"),predicates:e.predicates.map(e=>(0,Ni.A)(e,"key"))}))})),e.onClose()},children:e.buttonText||t("filtrer_78031")})]})]})},zj=e=>{const t=Oi(),{areColumnsOpen:n,clearNameCursors:o,columns:a,isFilterOpen:s,possibleColumns:r,predicates:d,selectedFilterPredicate:l,setAreColumnsOpen:c,setColumns:u,setIsFilterOpen:m,setPredicates:g}=cb();return(0,i.jsxs)(i.Fragment,{children:[s&&(0,i.jsx)(kj,{buttonText:e.filtersButtonText,possibleFilters:e.filters,predicates:d,selectedFilterPredicate:l,subtitle:e.filtersSubtitle,onClose:()=>{m(!1)},onFilter:e=>{o(),g(e)}}),n&&(0,i.jsx)($b,{columns:r,initialSelectedColumns:a,saveButtonText:t("_diter_les_colo_39630"),searchPlaceholder:t("rechercher_un_c_86475"),subtitle:t("personnaliser_l_03763"),title:t("_dition_des_col_70300"),onClose:()=>{c(!1)},onSave:u})]})};function Lj(e){return{numberOfPages:(0,r.useMemo)(()=>e?.numberOfPages??1,[e]),totalCount:(0,r.useMemo)(()=>e?.totalCount??0,[e])}}const Fj=u([]);function Uj(e,t=500){return(0,r.useCallback)((0,mx.A)(e,t),[])}const Bj=e=>{const{isGridDirty:t,...n}=function(e){const{filters:t,initial:n,onChange:i}=e,[o,a]=(0,r.useState)(n.predicates),[s,d]=(0,r.useState)(n.columns),[l,c]=(0,r.useState)(n.columnsSearch),[u,m]=(0,r.useState)(n.rendering),[g,h]=(0,r.useState)(n.sort),[p,f]=(0,r.useState)(n.name||""),[I,_]=(0,r.useState)(n.name||""),[y,x]=(0,r.useState)(n.limit),[S,v]=(0,r.useState)(0),[b,j]=(0,r.useState)(!1),[A,C]=(0,r.useState)(!1),[E,T]=(0,r.useState)(!1),[O,R]=(0,r.useState)(null),M=(0,r.useCallback)(()=>{v(0)},[v]),D=Uj(e=>{_(e),M()}),w=(0,r.useCallback)(e=>{i?.setName?.(e),f(e)},[i?.setName,f]),$=(0,r.useCallback)(()=>{w(""),_(""),M()},[w,_,M]),P=(0,r.useCallback)(e=>{i?.setPredicates?.(e),a(e)},[i?.setPredicates,a]),N=(0,r.useCallback)(e=>{i?.setColumns?.(e),d(e)},[i?.setColumns,d]),k=(0,r.useCallback)(e=>{i?.setColumnsSearch?.(e),c(e)},[i?.setColumnsSearch,c]),z=(0,r.useCallback)(e=>{i?.setRendering?.(e),m(e)},[i?.setRendering,m]),L=(0,r.useCallback)(e=>{i?.setLimit?.(e),x(e),M()},[i?.setLimit,x,M]),F=(0,r.useCallback)(e=>{i?.setSort?.(e),h(e),v(0)},[i?.setSort,h,v]),U=(0,r.useMemo)(()=>lh(o,t),[o,t]),B=(0,r.useMemo)(()=>JSON.stringify(n.predicates),[n.predicates]),G=(0,r.useMemo)(()=>JSON.stringify(n.columns),[n.columns]),V=(0,r.useMemo)(()=>JSON.stringify(n.columnsSearch),[n.columnsSearch]),W=(0,r.useMemo)(()=>JSON.stringify(n.rendering),[n.rendering]),q=(0,r.useMemo)(()=>JSON.stringify(n.sort),[n.sort]),Y=(0,r.useMemo)(()=>JSON.stringify(o)!==B||JSON.stringify(s)!==G||JSON.stringify(l)!==V||JSON.stringify(u)!==W||JSON.stringify(g)!==q,[B,o,G,s,V,l,W,u,q,g]);return{areColumnsOpen:E,clearNameCursors:$,columns:s,columnsSearch:l,filtersPredicates:U,isEditMode:b,isFilterOpen:A,isGridDirty:Y,limit:y,name:p,nameDebounced:I,offset:S,predicates:o,rendering:u,selectedFilterPredicate:O,setAreColumnsOpen:T,setColumns:N,setColumnsSearch:k,setIsEditMode:j,setIsFilterOpen:C,setLimit:L,setName:w,setNameDebounced:D,setOffset:v,setPredicates:P,setRendering:z,setSelectedFilterPredicate:R,setSort:F,sort:g}}({filters:e.filters,initial:{columns:e.columns,columnsSearch:e.columnsSearch,limit:e.limit,name:e.name,predicates:e.predicates,rendering:e.rendering,sort:e.sort},onChange:{setColumns:e.setColumns,setColumnsSearch:e.setColumnsSearch,setLimit:e.setLimit,setName:e.setName,setPredicates:e.setPredicates,setRendering:e.setRendering,setSort:e.setSort}}),o=function(e){const[t,n]=(0,r.useState)(e),[i,o]=(0,r.useState)(!1),a=(0,r.useMemo)(()=>{const e=Object.values(t).filter(e=>!0!==e.disabled),n=e.filter(e=>"checked"===e.state),i=n.map(e=>e.id),o=(0,qo.A)(e.map(({state:e})=>e)),a=2===o.length?"indeterminate":"checked"===o[0]?"checked":"unchecked";return{numberOfSelected:n.length,selectAllState:a,selecteds:n,selectedsIds:i}},[t]),s=(0,r.useRef)(null),d=(0,r.useCallback)((e,t,i)=>{const a=s.current;n(n=>{const o=i&&a?function(e,t,n){const i=Object.keys(e),o=i.indexOf(t),a=i.indexOf(n);return-1===o||-1===a?[n]:i.slice(Math.min(o,a),Math.max(o,a)+1)}(n,a,e):[e];return{...n,...Object.fromEntries(o.filter(e=>!0!==n[e]?.disabled).map(e=>[e,{...n[e],state:t}]))}}),s.current=e,"unchecked"===t&&o(!1)},[n,o]),l=(0,r.useCallback)(e=>{s.current=null,n(Object.fromEntries(Object.entries(t).filter(([e,t])=>!0!==t.disabled).map(([t,n])=>[t,{...n,state:e}]))),"unchecked"===e&&o(!1)},[t,n,o]);return{getSelectedsInput:(0,r.useCallback)((e,t)=>i?{ids:null,predicatesGroups:e??null,scope:t??null}:{ids:a.selectedsIds,predicatesGroups:null,scope:null},[i,a]),isAllSelected:i,numberOfSelected:a.numberOfSelected,selectAllState:a.selectAllState,selecteds:a.selecteds,selectedsIds:a.selectedsIds,setIsAllSelected:o,setStates:n,states:t,toggleRow:d,toggleSelectAll:l}}({}),a=function(e){const{massActions:t}=e,{columns:n,columnsSearch:i,limit:o,nameDebounced:a,offset:s,predicates:d,rendering:l,sort:c}=e.state,u=(0,r.useMemo)(()=>{const t=e.renderingLoaders?.(l);return null===t?{}:{columnsToIncludes:e.columnsToIncludes,getMassActionId:e.getMassActionId,loadDataList:e.loadDataList,loadDataListParams:e.loadDataListParams,loadRow:e.loadRow,loadRowParams:e.loadRowParams,...t}},[l,e.columnsToIncludes,e.getMassActionId,e.loadDataList,e.loadDataListParams,e.loadRow,e.loadRowParams,e.renderingLoaders]),m=(0,r.useMemo)(()=>u.columnsToIncludes?.(n,l)??{},[n,l,u.columnsToIncludes]),g=(0,r.useMemo)(()=>e.renderingParams?.(l)??{},[l,e.renderingParams]),[p,f]=(0,r.useState)(null),[I,_]=(0,r.useState)(!1),{setIsError:y}=(0,r.useContext)(Bo),x=(0,r.useRef)(0),S=(0,r.useCallback)(async()=>{const t=u.loadDataList;if(!t)return;const n=++x.current;_(!0);try{const r=await t({...m,...u.loadDataListParams||{},organizationId:e.organizationId||void 0,eventId:e.eventId||void 0,name:v(a)?a:null,columnsSearch:h(i)?i:null,predicatesGroups:d,limit:o,offset:s,sort:c,...g},await va());n===x.current&&(f({loadDataList:t,rendering:l,result:r.data}),y(!1),_(!1))}catch(e){n===x.current&&y(!0,e)}},[i,m,o,a,s,d,l,g,y,_,f,c,e.organizationId,e.eventId,u.loadDataList,u.loadDataListParams]),b=!!u.loadDataList&&p?.loadDataList===u.loadDataList&&p.rendering===l,j=b?p.result:null,[A,C]=(0,r.useState)([]),E=b?A:Fj,{numberOfPages:T,totalCount:O}=Lj(j?.rows),[R,M]=(0,r.useState)({}),D=(0,r.useRef)(0),w=(0,r.useCallback)(async t=>{const n=u.loadRow;if(!n)return;const i=D.current,o=()=>i!==D.current;M(e=>({...e,[t]:!0}));try{const i=(await n({...m,...u.loadRowParams||{},organizationId:e.organizationId||void 0,eventId:e.eventId||void 0,id:t},await va())).data.row;if(o())return;C(e=>e.map(e=>e.id===t?i:e))}catch(e){if(o())return;y(!0,e)}M(e=>({...e,[t]:!1}))},[m,M,y,e.organizationId,e.eventId,u.loadRow,u.loadRowParams]),$=(0,r.useCallback)(e=>u.getMassActionId?.(e)??e.id,[u.getMassActionId]);return(0,r.useEffect)(()=>(S(),()=>{x.current++,_(!1)}),[i,m,o,a,s,d,l,g,c,e.organizationId,e.eventId,u.loadDataList]),(0,r.useEffect)(()=>{C(p?.result.rows?.nodes??[])},[p]),(0,r.useEffect)(()=>(M({}),()=>{D.current++}),[p,l,u.loadRow]),(0,r.useEffect)(()=>{u.loadDataList&&(t.setStates(Object.fromEntries(E.map(e=>[`r${$(e)}`,{id:$(e),state:"unchecked"}]))),t.setIsAllSelected(!1))},[E,t.setStates,t.setIsAllSelected]),{data:E,getMassActionId:$,idToLoading:R,isLoading:I||!!u.loadDataList&&!b,loadDataResult:j,numberOfPages:T,reload:S,reloadRow:w,totalCount:O}}({columnsToIncludes:e.columnsToIncludes,eventId:e.eventId,getMassActionId:e.getMassActionId,loadDataList:e.loadDataList,loadDataListParams:e.loadDataListParams,loadRow:e.loadRow,loadRowParams:e.loadRowParams,massActions:o,organizationId:e.organizationId,renderingLoaders:e.renderingLoaders,renderingParams:e.renderingParams,state:n});return(0,i.jsxs)(lb.Provider,{value:{...n,...a,isSaveVisible:t,massActions:o,possibleColumns:e.possibleColumns,possibleRenderings:e.possibleRenderings,showMassActions:e.showMassActions??!1,showRowDropdown:e.showRowDropdown??!1,showRowEdit:e.showRowEdit??!1},children:[!1===e.showHeader?e.children:(0,i.jsxs)(G,{css:{background:"white"},direction:"column",height:1,width:1,children:[(0,i.jsx)(bb,{renderActions:e.renderActions,renderAllSelectedText:e.renderAllSelectedText,renderControls:e.renderControls,renderPageSelectedText:e.renderPageSelectedText,renderSelectAllText:e.renderSelectAllText,showEditColumns:e.showEditColumns,showEditMode:e.showEditMode,showFilters:e.showFilters,showPredicatesBadges:e.showPredicatesBadges,showSearchColumns:e.showSearchColumns,showSelectAll:e.showSelectAll}),e.children]}),(0,i.jsx)(zj,{filters:e.filters,filtersButtonText:e.filtersButtonText,filtersSubtitle:e.filtersSubtitle})]})};var Gj=n(5830);class Vj extends Gj.Ay{events;forms;organizations;segmentsFolders;constructor(){super("recrewteer"),this.version(6).stores({events:"id",forms:"id",organizations:"id",segmentsFolders:"id"})}}const Wj=new Vj;function qj(e,t,n,i){const{getLocalOrganization:o,updateLocalOrganization:a}=function(e){const t=(0,r.useCallback)(async()=>{let t=await Wj.organizations.get(e);return t||(t={id:e},await Wj.organizations.put(t)),t},[e]),n=(0,r.useCallback)(async n=>{const i=await t(),o=(0,tm.A)(i,{id:e},n);return await Wj.organizations.put(o),o},[e,t]);return{getLocalOrganization:t,updateLocalOrganization:n}}(e),[s,d]=(0,r.useState)(n),[l,c]=(0,r.useState)(!0),u=(0,r.useCallback)(async e=>{d(e),await a({[t]:e})},[t,d,a]);return(0,r.useEffect)(()=>{(async()=>{const e=await o();e[t]&&(i?.includes(e[t])??1)&&d(e[t]),c(!1)})()},[e,i,o,d,c]),[s,u,l]}function Yj(e,t,n,i,o,a){const s=qj(n,i,o,a);return(0,r.useMemo)(()=>e?[t(e),RI.A,!1]:s,[e,s])}function Hj(e){return(0,r.useMemo)(()=>new Map(e.map(e=>[e.slug,e])),[e])}const Zj=e=>{return(0,i.jsxs)(xv,{css:{cursor:"pointer",userSelect:"none",...e.css||{}},minWidth:e.minWidth,width:e.width,onClick:()=>{var t,n;e.setSort((t=e.sort,n=e.attribute,null===t||t.attribute!==n?{attribute:n,direction:Dt.Asc}:t.direction===Dt.Asc?{attribute:n,direction:Dt.Desc}:null))},children:[e.children,(0,i.jsx)(oI,{width:"2"}),(0,i.jsx)(_o,{icon:(t=e.sort,n=e.attribute,null===t||t.attribute!==n?"arrow-down-arrow-up":t.direction===Dt.Asc?"arrow-up":"arrow-down")})]});var t,n},Kj=e=>(0,i.jsx)(G,{align:"center",css:{borderBottom:"1px solid $gray200",borderLeft:e.bx?"1px solid $gray200":void 0,borderRight:e.bx?"1px solid $gray200":void 0,padding:"$3",...e.css},height:72,width:1,children:(0,i.jsx)(UI,{borderRadius:"$1",height:1,width:1})}),Qj=e=>{const t=!!e.paginationRow;return(0,i.jsx)(bv,{children:(0,i.jsxs)(G,{direction:"column",width:1,children:[(0,i.jsxs)(zI,{css:{borderLeft:"1px solid $gray200",borderRight:"1px solid $gray200",height:"100%",overflow:"auto hidden",width:"100%","& > div:first-child":{borderStartStartRadius:e.featureFlags?.isV4?"$radii$2":void 0,borderStartEndRadius:e.featureFlags?.isV4?"$radii$2":void 0},"& > div:last-child":{borderEndEndRadius:t?void 0:"$radii$2",borderEndStartRadius:t?void 0:"$radii$2"},"& .table-header-row, & .table-row":{borderLeft:"none",borderRight:"none"},...e.css},gridtemplaterows:"44px 1fr",children:[e.headerRow,(0,i.jsx)(Li,{css:{overflow:"auto"},children:e.children})]}),e.paginationRow]})})},Xj=e=>(0,i.jsx)(jo,{color:"white",css:{background:e.active?"$gray100":"white",border:0,borderInlineStart:"1px solid $gray300",color:e.disabled?"$gray400":"$gray700",cursor:e.disabled?"not-allowed":e.cursor,fontWeight:"$medium",inlineSize:"40px",blockSize:"32px",alignItems:"center",justifyContent:"center",borderRadius:"unset"},disabled:e.disabled,textAlign:"center",onClick:()=>{e.onClick()},children:e.children}),Jj=e=>{const{translate:t}=Hf(),n=$_(),o=e.limit??25,a=Ri(),s=e.offset/o,r=(0,dm.A)(Math.max(0,s-2),Math.min(e.numberOfPages,s+3)),d=0===s,l=s===e.numberOfPages-1,c=Math.min(e.totalCount,(s+1)*o);return(0,i.jsxs)(yv,{css:{gap:"$6","@tablet":{justifyContent:"space-between"}},children:[(0,i.jsx)(Li,{css:{order:1,display:n?"none":void 0},width:150,children:!n&&e.showLimits&&(0,i.jsxs)(G,{align:"center",css:{inlineSize:"fit-content",overflow:"hidden"},gap:"4",children:[(0,i.jsx)(G,{css:{border:"1px solid $gray300",inlineSize:"fit-content",overflow:"hidden",borderRadius:"$1","& > button:first-child":{borderInlineStart:"none"}},children:db.map((t,n)=>(0,i.jsx)(Xj,{active:o===t,cursor:"pointer",disabled:!1,onClick:()=>{e.setLimit?.(t)},children:t},n))}),e.itemName&&(0,i.jsx)(W,{css:{width:150},children:t("_1_per_page_06128",e.itemName)})]})}),!n&&(e.totalCount>o?(0,i.jsxs)(G,{css:{border:"1px solid $gray300",borderRadius:"$1",overflow:"hidden",order:3,"& > button:first-child":{borderInlineStart:"none"}},children:[(0,i.jsx)(Xj,{active:!1,cursor:d?"default":"pointer",disabled:d,onClick:()=>e.setOffset(e.offset-o),children:(0,i.jsx)(_o,{icon:"arrow-left"})}),e.numberOfPages<=7?(0,dm.A)(0,e.numberOfPages).map(t=>(0,i.jsx)(Xj,{active:s===t,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(t*o),children:t+1},t)):(0,i.jsxs)(i.Fragment,{children:[!r.includes(0)&&(0,i.jsx)(Xj,{active:!1,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(0),children:"1"}),!r.includes(1)&&(0,i.jsx)(Xj,{active:!1,cursor:"default",disabled:!1,onClick:RI.A,children:(0,i.jsx)(_o,{icon:"ellipsis"})}),r.map(t=>(0,i.jsx)(Xj,{active:s===t,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(t*o),children:t+1},t)),!r.includes(e.numberOfPages-2)&&(0,i.jsx)(Xj,{active:!1,cursor:"default",disabled:!1,onClick:RI.A,children:(0,i.jsx)(_o,{icon:"ellipsis"})}),!r.includes(e.numberOfPages-1)&&(0,i.jsx)(Xj,{active:!1,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset((e.numberOfPages-1)*o),children:e.numberOfPages})]}),(0,i.jsx)(Xj,{active:!1,cursor:l?"default":"pointer",disabled:l,onClick:()=>e.setOffset(e.offset+o),children:(0,i.jsx)(_o,{icon:"arrow-right"})})]}):(0,i.jsx)(Li,{css:{order:3}})),n&&(0,i.jsx)(G,{css:{border:"1px solid $gray300",borderRadius:"$1",overflow:"hidden",order:1,inlineSize:"fit-content","& > button:first-child":{borderInlineStart:"none"}},children:(0,i.jsx)(Xj,{active:!1,cursor:d?"default":"pointer",disabled:d,onClick:()=>e.setOffset(e.offset-o),children:(0,i.jsx)(_o,{icon:"arrow-left"})})}),(0,i.jsx)(Li,{css:{order:2,flex:"1","@tablet":{order:3,flex:"unset"}},textAlign:n?"center":"end",width:150,children:n?[...a(t("page_1_of_2_92409"),(0,i.jsx)("b",{children:s+1}),(0,i.jsx)("b",{children:e.numberOfPages}))]:[...a(t(e.itemName?"_1_of_2_3_03566":"x_to_y_of_x","{1}",e.totalCount,e.itemName),(0,i.jsxs)("b",{children:[s*o+1,"–",c]}))]}),n&&(0,i.jsx)(G,{css:{border:"1px solid $gray300",order:3,borderRadius:"$1",overflow:"hidden",inlineSize:"fit-content","& > button:first-child":{borderInlineStart:"none"}},children:(0,i.jsx)(Xj,{active:!1,cursor:l?"default":"pointer",disabled:l,onClick:()=>e.setOffset(e.offset+o),children:(0,i.jsx)(_o,{icon:"arrow-right"})})})]})},eA=e=>(0,i.jsx)(jv,{css:{borderBottomLeftRadius:"$2",borderBottomRightRadius:"$2",height:"56px",...e.css},children:e.children}),tA=({children:e,css:t,gap:n,justify:o,width:a})=>(0,i.jsx)(yv,{width:a??100,children:(0,i.jsx)(G,{align:"center",className:"h-controls",css:{cursor:"pointer",display:"none",...t},gap:n??"6",height:1,justify:o,width:1,onClick:To,children:e})}),nA=e=>{const{translate:t}=Hf(),{getMassActionId:n,massActions:o,reload:a,reloadRow:s}=cb(),{showMassActions:d,showRowDropdown:l,showRowEdit:c}=e,u=o.states[`r${n(e.row)}`]?.state??"unchecked",m=r.useCallback(()=>{s(e.row.id)},[e.row.id,s]),g=l||c;return(0,i.jsxs)(jv,{css:{background:"checked"===u?"$primary100":"white","&:hover":{background:"checked"===u?"$primary100":"$gray100"}},onMouseLeave:e=>{z_(e.target)},children:[d&&(0,i.jsx)(yv,{justify:"center",width:48,children:(0,i.jsx)(Ky,{state:u,onClick:(t,i)=>{o.toggleRow(`r${n(e.row)}`,t,i.shiftKey)}})}),e.selectedColumns.map(t=>(0,i.jsx)(r.Fragment,{children:e.renderCell(t,e.row,m)},t.slug)),g&&(0,i.jsxs)(tA,{justify:"center",children:[c&&e.getEditPath&&(0,i.jsxs)(zS,{children:[(0,i.jsx)(BS,{children:(0,i.jsx)(Li,{children:(0,i.jsx)(_o,{icon:"pen",to:e.getEditPath(e.row)})})}),(0,i.jsx)(FS,{placement:"top",children:t("_diter_62574")})]}),l&&e.renderRowDropdown?.(e.row,a)]}),e.renderRowPanels?.(e.row,m)]})},iA=e=>{const{columns:t,data:n,idToLoading:o,isLoading:a,limit:s,massActions:d,numberOfPages:l,offset:c,possibleColumns:u,setLimit:m,setOffset:g,setSort:h,sort:p,totalCount:f,...I}=cb(),_=e.showMassActions??I.showMassActions,y=e.showRowDropdown??I.showRowDropdown,x=e.showRowEdit??I.showRowEdit,S=r.useMemo(()=>t.flatMap(e=>(0,bs.A)([u.find(t=>t.slug===e)])),[t,u]);return(0,i.jsx)(G,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(Qj,{"aria-busy":a,headerRow:(0,i.jsxs)(Sv,{children:[_&&(0,i.jsx)(xv,{justify:"center",width:48,children:(0,i.jsx)(Ky,{state:d.selectAllState,onClick:d.toggleSelectAll})}),S.map(e=>e.isSortable?(0,i.jsx)(Zj,{attribute:e.sortAttribute,minWidth:e.minWidth,setSort:h,sort:p,width:e.width,children:(0,i.jsx)(Li,{css:{ellipsis:!0},title:e.name,children:e.name})},e.slug):(0,i.jsx)(xv,{minWidth:e.minWidth,width:e.width,children:(0,i.jsx)(Li,{css:{ellipsis:!0},title:e.name,children:e.name})},e.slug)),(y||x)&&(0,i.jsx)(xv,{width:100})]}),paginationRow:(0,i.jsx)(eA,{children:(0,i.jsx)(Jj,{limit:s,numberOfPages:l,offset:c,setLimit:m,setOffset:g,showLimits:!0,totalCount:f})}),children:a?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Kj,{}),(0,i.jsx)(Kj,{}),(0,i.jsx)(Kj,{})]}):n.map(t=>o[t.id]?(0,i.jsx)(Kj,{},t.id):(0,i.jsx)(nA,{getEditPath:e.getEditPath,renderCell:e.renderCell,renderRowDropdown:e.renderRowDropdown,renderRowPanels:e.renderRowPanels,row:t,selectedColumns:S,showMassActions:_,showRowDropdown:y,showRowEdit:x},t.id))})})};function oA(e,t,n){if(t.startsWith("form_inserted_at")){const i=parseInt(t.substring(17),10);if(isNaN(i))return"";{const t=n.find(({form:e})=>e?.id===i);return t?e.toLocaleString(t.insertedAt.toLocal(),oa.DateTime):""}}return""}const aA=R(G,{gap:"$3",variants:{avatarOnTop:{true:{flexDirection:"column",gap:"$2"},false:{alignItems:"center",flexDirection:"row"}}}}),sA=e=>{const{params:{organizationId:t,eventId:n}}=Hf(),o=r.useMemo(()=>v(e.userInfo.name)?e.userInfo.name:"-",[e.userInfo.name]),a=()=>(0,i.jsx)(Li,{color:e.disabled?"gray300":"gray800",css:{ellipsis:""},disabled:e.disabled,fontWeight:"medium",title:o,children:o});return(0,i.jsxs)(aA,{avatarOnTop:{"@initial":!!e.badge,"@tablet":!1},width:1,children:[(0,i.jsx)(J_,{email:e.userInfo.email,image:e.userInfo.picture?.url,name:e.userInfo.name,size:e.size||40}),(0,i.jsxs)(G,{css:{flex:"1",overflow:"hidden"},direction:"column",justify:"center",children:[(0,i.jsxs)(G,{align:"center",gap:"2",children:[e.isClickDisabled?a():(0,i.jsx)(WI,{to:e.clickPath??Yf.MEMBER_INFORMATION({organizationId:t,eventId:n,userInfoId:e.userInfo.id}),children:a()}),(0,i.jsx)(Li,{css:{flexShrink:0},children:e.badge})]}),(0,i.jsx)(Li,{color:e.disabled?"gray300":"gray500",css:{ellipsis:""},fontSize:"textSm",title:e.userInfo.email,children:e.areContactLinksEnabled?(0,i.jsx)(WI,{css:{fontWeight:"normal"},to:`mailto:${e.userInfo.email}`,children:e.userInfo.email}):(0,i.jsx)(i.Fragment,{children:e.userInfo.email})}),e.showPhoneNumber&&(0,i.jsx)(Li,{color:e.disabled?"gray300":"gray500",css:{ellipsis:""},fontSize:"textSm",title:e.userInfo.phone?.internationalFormat,children:e.areContactLinksEnabled?(0,i.jsx)(WI,{css:{fontWeight:"normal"},to:`tel:${e.userInfo.phone?.internationalFormat}`,children:e.userInfo.phone?.internationalFormat}):(0,i.jsx)(i.Fragment,{children:e.userInfo.phone?.internationalFormat})})]})]})},rA=e=>{const t=Ti(Pl),{isEditMode:n}=cb(),o=t.getValue(e.customField,e.fields),a=t.getValueString(e.customField,e.fields),s=!0===o?"checked":!1===o?"unchecked":"indeterminate";return n&&e.updatable?(0,i.jsxs)(yv,{css:{border:"2px solid transparent","& > .h-checkbox-cell-hover":{display:"none"},"&:hover":{border:"2px solid $primary500"},"&:hover > .h-checkbox-cell-default":{display:"none"},"&:hover > .h-checkbox-cell-hover":{display:"block"}},minWidth:e.column.minWidth,width:e.column.width,onClick:To,children:[(0,i.jsx)(Li,{className:"h-checkbox-cell-default",children:a}),(0,i.jsx)(Li,{className:"h-checkbox-cell-hover",children:(0,i.jsx)(Ky,{state:s,onClick:async t=>{await e.mutate("checked"===t,e.customField.slug),e.reload()}})})]}):(0,i.jsx)(yv,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:a})};class dA extends Error{}function lA(e,t){const n=Ti(Wl);return(0,r.useCallback)(i=>{const o=n.getValidationRuleError(e,i);return o?Promise.reject(new dA(o)):t(i,e.slug)},[e,t])}const cA="h-update-cell-open",uA=e=>{const t=Oi(),n=(0,r.useRef)(ga()),[o,a]=(0,r.useState)(!1),[s,d]=(0,r.useState)(e.initialValue),[l,c]=(0,r.useState)(!1),[u,m]=(0,r.useState)(null),g=(0,r.useCallback)(e=>{d(e),m(null)},[]),h=(0,r.useCallback)(t=>{a(t),document.body.dispatchEvent(new CustomEvent(cA,{bubbles:!0,detail:{uuid:n.current}})),e.onStateChange?.(t)},[a,e.onStateChange]),p=(0,r.useCallback)(e=>{e.detail.uuid!==n.current&&a(!1)},[a]),f=(0,r.useCallback)(()=>{h(!1),g(e.initialValue)},[e.initialValue,h,g]),I=(0,r.useCallback)(async()=>{c(!0);try{await e.onSave(s)}catch(e){if(!(e instanceof dA))throw e;m(e.message)}finally{c(!1)}},[e.onSave,s]);return(0,r.useEffect)(()=>(document.addEventListener(cA,p),()=>{document.removeEventListener(cA,p)}),[p]),(0,i.jsxs)(F_,{doNotCloseOnOtherOpen:!0,isOpen:o,onStateChange:h,children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(yv,{css:{...e.css,border:"2px solid transparent",cursor:"text","&:hover":{border:"2px solid $primary700"}},minWidth:e.column.minWidth,width:e.column.width,onClick:To,children:"function"==typeof e.renderValue?e.renderValue():e.renderValue})}),(0,i.jsxs)(K_,{css:{padding:"0",overflowBlock:"auto",maxBlockSize:"50vh"},placement:"bottom-start",width:380,children:[(0,i.jsx)(G,{css:{padding:"$4 $6"},onKeyDown:e=>{"Enter"===e.key&&I()},children:e.renderInput(s,d,u)}),(0,i.jsxs)(G,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$4 $6"},gap:"4",justify:"end",children:[(0,i.jsx)(Li,{css:{cursor:"pointer"},font:"gray700 textSm medium",onClick:f,children:t("annuler_48254")}),(0,i.jsx)(jo,{isLoading:l,size:"sm",onClick:I,children:t("appliquer_05753")})]})]})]})},mA=e=>{const{isEditMode:t}=cb();return t&&e.updatable?(0,i.jsx)(uA,{column:e.column,initialValue:e.initialValue,renderInput:e.renderInput,renderValue:e.renderValue,onSave:async t=>{await e.mutate(t),e.reload()}}):(0,i.jsx)(yv,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:"function"==typeof e.renderValue?e.renderValue():e.renderValue})},gA=e=>{const t=Ti(Pl),n=t.getValueString(e.customField,e.fields),o=(0,r.useMemo)(()=>{const n=t.getValue(e.customField,e.fields);return v(n)?Vo.c9.fromISO(n,{zone:"utc"}):n},[]),a=lA(e.customField,e.mutate);return(0,i.jsx)(mA,{column:e.column,initialValue:o,mutate:a,reload:e.reload,renderInput:(t,n,o)=>(0,i.jsx)(Jy,{hint:o,label:e.customField.name,state:v(o)?"error":"active",value:t,onChange:n}),renderValue:n,updatable:e.updatable})},hA=e=>{const t=Ti(Pl),n=t.getValueString(e.customField,e.fields),o=(0,r.useMemo)(()=>{const n=t.getValue(e.customField,e.fields);return v(n)?Vo.c9.fromISO(n,{zone:"utc"}):n},[]),a=lA(e.customField,e.mutate);return(0,i.jsx)(mA,{column:e.column,initialValue:o,mutate:a,reload:e.reload,renderInput:(t,n,o)=>(0,i.jsx)(tx,{hint:o,label:e.customField.name,state:v(o)?"error":"active",value:t,onChange:n}),renderValue:n,updatable:e.updatable})},pA=e=>{const{params:{organizationId:t}}=Hf(),n=Ti(Pl),o=n.getValueString(e.customField,e.fields,{fileReturnValue:"name"}),a=n.getValueString(e.customField,e.fields,{fileReturnValue:"url"}),s=(0,r.useMemo)(()=>n.getValue(e.customField,e.fields),[e.customField,e.fields]),d=lA(e.customField,e.mutate),l=e.customField.fileType===Be.Picture,c=e.customField.fieldProperty===ze.Picture?e.avatarUser:void 0;return(0,i.jsx)(mA,{column:e.column,initialValue:s,mutate:d,reload:e.reload,renderInput:(n,o)=>l?(0,i.jsx)(Px,{allowCrop:!0,label:e.customField.name,organizationId:t,value:n,onChange:o}):(0,i.jsx)(Mx,{accept:[ax.Images,ax.Pdf],acl:"private",label:e.customField.name,organizationId:t,value:n,onChange:o}),renderValue:()=>l?(v(a)||c)&&(0,i.jsx)(J_,{email:c?.email,image:a,name:c?.name,size:32}):(0,i.jsx)(WI,{css:{fontWeight:"$regular"},to:a,children:o}),updatable:e.updatable})},fA=e=>{const t=Ti(Pl),n=t.getValueString(e.customField,e.fields),o=(0,r.useMemo)(()=>t.getValue(e.customField,e.fields)||0,[e.customField,e.fields]),a=lA(e.customField,e.mutate);return(0,i.jsx)(mA,{column:e.column,initialValue:o,mutate:a,reload:e.reload,renderInput:(t,n,o)=>(0,i.jsx)(EI,{hint:o,label:e.customField.name,shouldParseAsInt:!0,state:v(o)?"error":"active",value:t,onChange:n}),renderValue:n,updatable:e.updatable})},IA=e=>{const t=Ti(Pl),n=Ti(sl),o=t.getValueString(e.customField,e.fields),a=(0,r.useMemo)(()=>{const i=t.getValue(e.customField,e.fields),o=n.basePhoneInputDefault();return{country:i?.country||o.country,code:i?.code||o.code,number:i?.number||o.number}},[e.fields]),s=lA(e.customField,e.mutate);return(0,i.jsx)(mA,{column:e.column,initialValue:a,mutate:s,reload:e.reload,renderInput:(t,n)=>(0,i.jsx)(Lx,{label:e.customField.name,value:t,onChange:n}),renderValue:o,updatable:e.updatable})},_A=e=>(0,i.jsxs)(G,{align:"center",gap:"2",children:[(0,i.jsx)(Li,{css:{background:e.color,borderRadius:"16px",flex:"0 0 auto",overflow:"hidden"},height:16,width:16}),(0,i.jsx)(Li,{css:{clamp:2,minWidth:0,wordBreak:"break-word"},title:e.children,children:e.children})]});let yA=null;function xA(e,{fontSize:t,fontWeight:n}={}){yA||=document.createElement("canvas");const i=yA.getContext("2d");return i.font=`${n||"400"} ${t||"14px"} 'Open Sans`,i.measureText(e).width}const SA=({badge:e})=>(0,i.jsx)(My,{color:e.color,count:e.count,css:{cursor:e.onClick?"pointer":"inherit"},leftIcon:e.icon?qn.includes(e.icon)?Io(e.icon):e.icon:void 0,size:"md",onClick:e.onClick,children:e.text}),vA=({badges:e})=>(0,i.jsxs)(F_,{children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(My,{cursor:"pointer",size:"md",children:`+${e.length}`})}),(0,i.jsx)(K_,{css:{flexWrap:"wrap",gap:"$2",overflow:"auto",padding:"$4",zIndex:100},maxHeight:300,placement:"top-end",width:400,children:e.map(e=>(0,i.jsx)(G,{children:(0,i.jsx)(SA,{badge:e})},e.id))})]}),bA=e=>{const[t,n]=(0,r.useState)(0),o=(0,r.useCallback)(e=>{e&&n(e.getBoundingClientRect().width)},[]),a=(0,r.useMemo)(()=>e.badges.some(e=>"number"==typeof e.count||"string"==typeof e.count),[e.badges]),s=(0,r.useMemo)(()=>e.badges.some(e=>!!e.icon),[e.badges]),d=(0,r.useMemo)(()=>(a?28:0)+(s?12:0)+20,[a,s]),l=(0,r.useMemo)(()=>{const t=e.badges.map(e=>({...e,textWidth:Math.floor(xA(e.text,{fontSize:"12px"}))+d}));return!0===e.doNotSort?t:(0,vs.A)(t,({textWidth:e})=>e)},[d,e.badges,e.doNotSort]),[c,u]=(0,r.useMemo)(()=>{let e=37;const n=[],i=[];for(const o of l)e+=o.textWidth+8,eh(u),[u]);return(0,i.jsxs)(G,{ref:o,align:"center",css:{cursor:e.onClick?"pointer":"inherit","&:hover":{color:"black"}},gap:"2",height:1,width:1,onClick:t=>{e.onClick&&h(l)&&(To(t),e.onClick())},children:[c.map(e=>(0,i.jsx)(SA,{badge:e},e.id)),m&&(e.onClick?(0,i.jsx)(My,{css:{cursor:"pointer"},size:"md",children:"+"+(l.length-c.length)}):(0,i.jsx)(vA,{badges:u}))]})},jA=e=>{const t=Oi(),n=Ti(Pl),o=(0,r.useMemo)(()=>{if(e.customField.canSelectMultiple){const t=n.getSelectCustomFieldValues(e.customField,e.fields);if(e.customField.listType==Xe.Dot)return(0,i.jsx)(G,{align:"center",gap:"3",wrap:"wrap",children:t.map(({value:e,color:t},n)=>(0,i.jsx)(_A,{color:t||"",children:e},n))});{const n=t.map(({value:t,color:n})=>({id:t,color:e.customField.listType===Xe.Badge?n||"":"gray",icon:null,text:t}));return(0,i.jsx)(bA,{badges:n})}}{const t=n.getValueString(e.customField,e.fields);if(v(t)){if(e.customField.listType===Xe.Default)return t;{const o=n.getValue(e.customField,e.fields),a=e.customField.values.find(({id:e})=>e===o)?.color??"";return e.customField.listType===Xe.Dot?(0,i.jsx)(_A,{color:a,children:t}):(0,i.jsx)(My,{color:a,children:t})}}return""}},[n,e.customField,e.fields]),a=(0,r.useMemo)(()=>{const t=n.getValue(e.customField,e.fields);return e.customField.canSelectMultiple?h(t)?t:[]:t||""},[n,e.customField,e.fields]),s=sS(e.customField),d=lA(e.customField,e.mutate);return(0,i.jsx)(mA,{column:e.column,initialValue:a,mutate:d,reload:e.reload,renderInput:(n,o)=>e.customField.canSelectMultiple?(0,i.jsx)(Qx,{isSearchVisible:!0,isSelectAllVisible:!0,label:e.customField.name,multiple:!0,renderOnPortal:!0,values:n,onChange:o,children:s}):(0,i.jsx)(Qx,{isSearchVisible:!0,label:e.customField.name,multiple:!1,placeholder:t("choisir_une_val_00277"),renderOnPortal:!0,values:[n],onChange:e=>{h(e)&&o(e[0])},children:s}),renderValue:o,updatable:e.updatable})},AA=e=>{const t=Ti(Pl).getValueString(e.customField,e.fields),n=lA(e.customField,e.mutate);return(0,i.jsx)(mA,{column:e.column,initialValue:t,mutate:n,reload:e.reload,renderInput:(t,n,o)=>(0,i.jsx)(iS,{hint:o,label:e.customField.name,state:v(o)?"error":"active",value:t,onChange:n,onKeyDown:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),renderValue:t,updatable:e.updatable})},CA=e=>{const t=Ti(Pl).getValueString(e.customField,e.fields),n=lA(e.customField,e.mutate),{isEditMode:o}=cb(),a="string"==typeof e.clickPath&&(e.column.slug===ze.FirstName||e.column.slug===ze.LastName),s=a&&!o;return(0,i.jsx)(mA,{column:e.column,initialValue:t,mutate:n,reload:e.reload,renderInput:(t,n,o)=>(0,i.jsx)(EI,{autoFocus:!0,hint:o,label:e.customField.name,state:v(o)?"error":"active",value:t,onChange:n}),renderValue:()=>s?(0,i.jsx)(WI,{to:e.clickPath,children:t}):(0,i.jsx)(Li,{fontWeight:a?"medium":"inherit",children:t}),updatable:e.updatable})},EA=e=>{const t=Ti(Pl),n=t.getValueString(e.customField,e.fields),o=(0,r.useMemo)(()=>t.getValueString(e.customField,e.fields),[]),a=lA(e.customField,e.mutate);return(0,i.jsx)(mA,{column:e.column,initialValue:o,mutate:a,reload:e.reload,renderInput:(t,n)=>(0,i.jsx)(ix,{label:e.customField.name,value:t,onChange:n}),renderValue:n,updatable:e.updatable})},TA=e=>{const t=Ti(Pl);return e.customField?.fieldType===Fe.Checkbox?(0,i.jsx)(rA,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Fe.Date?(0,i.jsx)(gA,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Fe.Phone?(0,i.jsx)(IA,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Fe.Select||e.customField?.fieldType===Fe.Country||e.customField?.fieldType===Fe.Language||e.customField?.fieldType===Fe.Sex||e.customField?.fieldType===Fe.Nationality?(0,i.jsx)(jA,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Fe.Text?(0,i.jsx)(CA,{clickPath:e.clickPath,column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Fe.Textarea?(0,i.jsx)(AA,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Fe.Number?(0,i.jsx)(fA,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Fe.File?(0,i.jsx)(pA,{avatarUser:e.avatarUser,column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Fe.Datetime?(0,i.jsx)(hA,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===Fe.Time?(0,i.jsx)(EA,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):(0,i.jsx)(yv,{children:e.customField?t.getValueString(e.customField,e.fields,{fileReturnValue:"name"}):""})},OA=e=>{const{params:{organizationId:t,eventId:n}}=Hf(),{isEditMode:o}=cb(),{mutate:a}=Ua(),s=(0,r.useCallback)(i=>a({organizationId:t,eventId:n,userInfoId:e.userInfo.id,email:i}),[e.userInfo,a]);return(0,i.jsx)(mA,{column:e.column,initialValue:e.userInfo.email,mutate:s,reload:e.reload,renderInput:(t,n)=>(0,i.jsx)(EI,{isEmail:!0,label:e.column.name,value:t,onChange:n}),renderValue:()=>"string"!=typeof e.clickPath||o?(0,i.jsx)(Li,{fontWeight:"medium",children:e.userInfo.email}):(0,i.jsx)(WI,{to:e.clickPath,children:e.userInfo.email}),updatable:e.updatable})},RA=e=>{const{translate:t}=Hf(),{isEditMode:n}=cb(),o=(0,r.useMemo)(()=>({firstName:e.userInfo.fields.firstName||"",lastName:e.userInfo.fields.lastName||""}),[e.userInfo]),a=(0,r.useCallback)(async t=>{await e.mutate(t.firstName,"firstName"),await e.mutate(t.lastName,"lastName"),e.reload()},[e.mutate,e.reload]);return n&&e.updatable?(0,i.jsx)(uA,{column:e.column,initialValue:o,renderInput:(e,n)=>(0,i.jsxs)(G,{direction:"column",gap:"2",width:1,children:[(0,i.jsx)(EI,{label:t("pr_nom_66988"),value:e.firstName,onChange:t=>{n({...e,firstName:t})}}),(0,i.jsx)(EI,{label:t("last_name"),value:e.lastName,onChange:t=>{n({...e,lastName:t})}})]}),renderValue:()=>(0,i.jsx)(sA,{clickPath:e.clickPath,isClickDisabled:!0,size:32,userInfo:e.userInfo}),onSave:a}):(0,i.jsx)(yv,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(sA,{clickPath:e.clickPath,size:32,userInfo:e.userInfo})})},MA=e=>{const t=Oi(),n=(0,r.useMemo)(()=>function(e,t){if(e){const n=(e.usersOrganizations||[]).map(e=>({id:`uo-${e.id}`,color:"gray",icon:e.role.type===Ot.OrganizationAdmin?"gem":"glasses-round",text:`${e.role.name}`})).concat((e.usersEvents||[]).map(e=>({id:`ue-${e.id}`,color:"gray",icon:e.role.type===Ot.EventAdmin?"gem":"glasses-round",text:`${e.event.name} - ${e.role.name}`}))).concat((e.usersDelegations||[]).map(e=>({id:`ud-${e.id}`,color:"gray",icon:"user-group",text:`${e.delegation.name} - ${t("responsable_de_70462")}`}))).concat((e.usersDelegationsCategories||[]).map(e=>({id:`udc-${e.id}`,color:"gray",icon:"user-group",text:`${e.delegationCategory.name} - ${e.role.name}`}))).concat((e.usersPositions||[]).map(e=>({id:`up-${e.id}`,color:"gray",icon:"sitemap",text:`${e.position.name} - ${e.role.name}`}))).concat((e.usersPositionsCategories||[]).map(e=>({id:`upc-${e.id}`,color:"gray",icon:"sitemap",text:`${e.positionCategory.name} - ${e.role.name}`})));return(0,od.A)(n,({text:e})=>e)}return[]}(e.userPermissions,t),[e.userPermissions]);return(0,i.jsx)(yv,{minWidth:e.minWidth,width:e.width,children:(0,i.jsx)(bA,{badges:n,doNotSort:!0})})};function DA(e){return(0,vs.A)(e,e=>y(e.name)).filter(e=>h(e.accreditationsProfiles)).map(e=>(0,i.jsx)("optgroup",{label:e.name,children:(0,vs.A)(e.accreditationsProfiles,e=>y(e.name)).map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},e.id))}const wA=e=>{const{translate:t}=Hf(),{mutate:n}=function(e={}){return Di("mutation VolunteersRegistrationsMassAccreditationProfileUpdate(\n $eventId: EventId!\n $massProfileUpdate: MassAccreditationProfileUpdateInput!\n) {\n numberOfMembers: volunteersRegistrationsMassAccreditationProfileUpdate(\n eventId: $eventId\n massProfileUpdate: $massProfileUpdate\n )\n}\n",e)}(),{isEditMode:o}=cb(),a=(0,r.useMemo)(()=>(0,bs.A)([e.volunteerRegistration.accreditationProfile?.id]),[e.volunteerRegistration]),[s,d]=(0,r.useState)(!0),[l,c]=(0,r.useState)(null),u=(0,r.useMemo)(()=>ly((0,bs.A)([e.volunteerRegistration.accreditationProfile])),[e.volunteerRegistration.accreditationProfile]),m=(0,r.useCallback)(async t=>{if(t&&s){const{event:t}=await(n={eventId:e.eventId},i=await va(),Oa("query EventAccreditationsProfiles($eventId: EventId!) {\n event(id: $eventId) {\n accreditationsProfilesCategories {\n id\n name\n\n accreditationsProfiles {\n id\n name\n color\n icon\n }\n }\n }\n}\n",{variables:n,token:i||void 0,fragments:[]})),o=DA(t.accreditationsProfilesCategories);c(o),d(!1)}var n,i},[e.eventId,s]),g=(0,r.useCallback)(async t=>{p(t)?await n({eventId:e.eventId,massProfileUpdate:{selecteds:{ids:[e.volunteerRegistration.userInfo.id]},strategy:tt.Delete}}):await n({eventId:e.eventId,massProfileUpdate:{accreditationProfileId:t[0],selecteds:{ids:[e.volunteerRegistration.userInfo.id]},strategy:tt.Replace}}),e.reload()},[n,e.eventId,e.volunteerRegistration,e.reload]);return o&&e.updatable?(0,i.jsx)(uA,{column:e.column,css:{gap:"$2"},initialValue:a,renderInput:(e,n)=>s?(0,i.jsxs)(G,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(UI,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(UI,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(Qx,{isSearchVisible:!0,label:t("profil_d_accr_d_02274"),multiple:!1,renderOnPortal:!0,values:e,onChange:n,children:l}),renderValue:()=>(0,i.jsx)(bA,{badges:u}),onSave:g,onStateChange:m}):(0,i.jsx)(yv,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:u})})},$A=({column:e,eventId:t,onClick:n,reload:o,updatable:a,volunteerRegistration:s})=>{const d=Oi(),{mutate:l}=Da(),{mutate:c}=function(e={}){return Di("mutation VolunteersRegistrationsMassAccreditationStateUpdate(\n $eventId: EventId!\n $massStateUpdate: MassAccreditationStateUpdateInput!\n) {\n numberOfMembers: volunteersRegistrationsMassAccreditationStateUpdate(\n eventId: $eventId\n massStateUpdate: $massStateUpdate\n )\n}\n",e)}(),u=Ti(jl),{isEditMode:m}=cb(),[g,p]=(0,r.useState)(!0),[f,I]=(0,r.useState)(null),_=(0,r.useMemo)(()=>s?.accreditationsUsersInfos||[],[s]),y=(0,r.useMemo)(()=>ay(_),[_]),x=(0,r.useMemo)(()=>_.map(e=>e.accreditationSlot.id),[_]),S=(0,r.useCallback)(async e=>{if(e&&g){const{event:e}=await Ba({eventId:t,loadIsBlocked:!0},await va()),n=ub(u,e.accreditationsCategories,{useAccreditationDisplay:!0,useIsBlocked:!0});I(n),p(!1)}},[u,t,g]),v=(0,r.useCallback)(async e=>{h(e)?await l({eventId:t,massAccredit:{accreditationsSlotsIds:e,selecteds:{ids:[s.userInfo.id]},strategy:tt.Replace}}):await c({eventId:t,massStateUpdate:{selecteds:{ids:[s.userInfo.id]},state:te.WaitingAccreditation}}),o()},[t,s,l,o]);return m&&a?(0,i.jsx)(uA,{column:e,css:{gap:"$2"},initialValue:x,renderInput:(e,t)=>g?(0,i.jsxs)(G,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(UI,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(UI,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(Qx,{isSearchVisible:!0,label:d("accr_ditations_39450"),multiple:!0,renderOnPortal:!0,values:e,onChange:t,children:f}),renderValue:()=>(0,i.jsx)(bA,{badges:y,doNotSort:!0}),onSave:v,onStateChange:S}):(0,i.jsx)(yv,{css:{border:"2px solid transparent"},minWidth:e.minWidth,width:e.width,children:(0,i.jsx)(bA,{badges:y,doNotSort:!0,onClick:n})})},PA=e=>{const t=(0,r.useMemo)(()=>(0,od.A)(e.volunteerRegistration?.accreditationsUsersInfos??[],e=>e.accreditationSlot.accreditationCategory.id).map(e=>({id:e.accreditationSlot.accreditationCategory.id,color:"gray",icon:null,text:e.accreditationSlot.accreditationCategory.name})),[e.volunteerRegistration]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:t})})};function NA(e){switch(e){case Vt.Assigned:return{color:"success",leftIcon:"check"};case Vt.Refused:return{color:"error",leftIcon:"xmark"};case Vt.PreAssigned:return{color:"pink",leftIcon:"wand-magic-sparkles"};case Vt.WaitingAssignment:return{color:"warning",leftIcon:"hourglass-empty"};case Vt.NotApplicable:return{color:"gray",leftIcon:"infinity"};default:return wr()}}function kA(e){switch(e){case te.Accredited:return{color:"success",leftIcon:"check"};case te.AutoAccredited:return{color:"success",leftIcon:"bolt-auto"};case te.Refused:return{color:"error",leftIcon:"xmark"};case te.WaitingAccreditation:return{color:"warning",leftIcon:"hourglass-empty"};case te.NotApplicable:return{color:"gray",leftIcon:"infinity"};default:return wr()}}const zA=e=>{const t=Oi(),{mutate:n}=Ha();return(0,i.jsx)(G,{css:{cursor:"pointer",padding:"$3","&:hover":{background:"$gray100"}},onClick:async()=>{await n({eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistrationId,slug:"accreditation_state",value:e.state}),e.reload(),e.close()},children:(0,i.jsx)(My,{...kA(e.state),children:t(e.state)})})},LA=e=>{const t=Oi(),{isEditMode:n}=cb(),[o,a]=(0,r.useState)(!1),s=(0,r.useCallback)(e=>{n&&a(e)},[n,a]),d=(0,r.useCallback)(()=>{s(!1)},[s]);return n&&e.updatable?(0,i.jsx)(yv,{css:{border:"2px solid transparent","&:hover":{border:"2px solid $primary500"}},minWidth:e.column.minWidth,width:e.column.width,onClick:To,children:(0,i.jsxs)(F_,{isOpen:o,onStateChange:s,children:[(0,i.jsx)(Q_,{children:(0,i.jsxs)(G,{align:"center",gap:"3",height:1,justify:"between",width:1,children:[(0,i.jsx)(My,{...kA(e.state),cursor:"text",children:t(e.state)}),o&&(0,i.jsx)(Li,{children:(0,i.jsx)(_o,{icon:"chevron-down"})})]})}),(0,i.jsxs)(K_,{offset:2,placement:"bottom",width:240,children:[e.state!==te.WaitingAccreditation&&(0,i.jsx)(zA,{close:d,eventId:e.eventId,reload:e.reload,state:te.WaitingAccreditation,volunteerRegistrationId:e.volunteerRegistrationId}),e.state!==te.NotApplicable&&(0,i.jsx)(zA,{close:d,eventId:e.eventId,reload:e.reload,state:te.NotApplicable,volunteerRegistrationId:e.volunteerRegistrationId})]})]})}):(0,i.jsx)(yv,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(My,{...kA(e.state),children:t(e.state)})})},FA=e=>{const t=Ti(jl),n=Ti(hm),o=(0,r.useMemo)(()=>function(e,t,n){return(0,vs.A)((n||[]).flatMap(e=>(e.slots||[]).map(t=>({range:t.range,display:e.form.slotDisplay}))),({range:e})=>e.start.toMillis()).map(n=>n.display===Et.Calendar||n.display===Et.DisplayDays?e.toLocaleString(n.range.start,oa.DateOnly.Numeric):t.toDisplayString(n.range,{formats:{localeFormat:oa.DateOnly.Numeric}}))}(t,n,e.volunteerRegistration.userInfo.formsUsersInfos).map((e,t)=>({id:t,color:"gray",icon:null,text:e})),[e.volunteerRegistration.userInfo.formsUsersInfos]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:o,doNotSort:!0,onClick:e.onClick})})},UA=e=>{const{translate:t}=Hf(),n=(0,r.useMemo)(()=>e.volunteerRegistration.delegationBannerNumber||0,[e.volunteerRegistration]),o=e.volunteerRegistration.delegationBannerNumber?.toString(10)||"",a=(0,r.useCallback)(t=>e.mutate(t,"banner_number"),[e.mutate]);return(0,i.jsx)(mA,{column:e.column,initialValue:n,mutate:a,reload:e.reload,renderInput:(e,n)=>(0,i.jsx)(EI,{label:t("num_ro_de_bande_16203"),shouldParseAsInt:!0,value:e,onChange:n}),renderValue:o,updatable:e.updatable})},BA=e=>{const{translate:t}=Hf();return(0,i.jsxs)(ko,{children:[(0,i.jsx)(zo,{children:(0,i.jsx)(Li,{css:{cursor:"pointer"},height:e.size,width:e.size,children:(0,i.jsx)("img",{height:"100%",src:_g(e.value,{height:e.size,width:e.size}),width:"100%"})})}),(0,i.jsxs)(No,{children:[(0,i.jsx)(Po,{icon:"qrcode",children:t("code_barres_1_82428",e.name)}),(0,i.jsxs)($o,{align:"center",css:{padding:"$4"},gap:"3",justify:"center",children:[(0,i.jsx)(Li,{height:100,width:100,children:(0,i.jsx)("img",{height:"100%",src:_g(e.value,{height:100,width:100}),width:"100%"})}),(0,i.jsx)(Li,{children:e.value})]}),(0,i.jsx)(wo,{})]})]})},GA=e=>{const t=e.volunteerRegistration.ticketId;return(0,i.jsxs)(yv,{align:"center",gap:"2",minWidth:e.column.minWidth,width:e.column.width,children:[(0,i.jsx)(BA,{name:e.volunteerRegistration.userInfo.nameOrEmail,size:30,value:e.volunteerRegistration.ticketId}),v(e.volunteerRegistration.weezeventTicketUrl)?(0,i.jsx)(WI,{css:{fontWeight:"normal"},to:e.volunteerRegistration.weezeventTicketUrl,children:t}):t]})};function VA(e){switch(e){case Te.Waiting:case Te.Queued:return{color:"warning",leftIcon:"hourglass-empty"};case Te.Bounced:return{color:"error",leftIcon:"circle-exclamation"};default:return{color:"success",leftIcon:"check"}}}const WA=e=>{const{translate:t}=Hf(),n=(0,r.useMemo)(()=>(e.volunteerRegistration.userInfo.emails??[]).map(e=>{const{color:n,leftIcon:i}=VA(e.state);return{id:e.id,color:n,icon:i,text:`${e.campaign?.name??""} - ${t(e.state)}`}}),[e.volunteerRegistration]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:n})})},qA=e=>{const t=(0,r.useMemo)(()=>(e.volunteerRegistration.positionsSlotsUsersInfos||[]).filter(e=>e.state!==ue.Waiting),[e.volunteerRegistration]),n=(0,r.useMemo)(()=>Mg(t),[t]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:n,doNotSort:!0,onClick:e.onClick})})},YA=e=>{const{translate:t}=Hf(),[n,o]=(0,r.useState)("");return(0,i.jsx)(ko,{isOpen:e.isOpen,onClose:e.onClose,children:(0,i.jsxs)(No,{children:[(0,i.jsx)(Po,{icon:"print",children:t("impression_du_d_03836",e.customDocumentName)}),(0,i.jsxs)($o,{gap:"6",children:[(0,i.jsxs)(lI,{alertStyle:"warning",children:[(0,i.jsx)(cI,{children:t("le_document_a_d_84754")}),(0,i.jsx)(uI,{children:t("afin_de_r_dite_85227")})]}),(0,i.jsx)(iS,{label:t("raison_de_l_imp_75064"),value:n,onChange:o})]}),(0,i.jsx)(wo,{children:(0,i.jsx)(jo,{disabled:b(n),onClick:()=>e.onPrint(n),children:t("imprimer_le_doc_75788")})})]})})},HA=e=>{const{mutate:t}=function(e={}){return Di("mutation VolunteerRegistrationCustomDocumentPrint(\n $eventId: EventId!\n $volunteerRegistrationId: VolunteersRegistrationId!\n $customDocumentSlug: String!\n $reason: String!\n) {\n link: volunteerRegistrationCustomDocumentPrint(\n eventId: $eventId\n volunteerRegistrationId: $volunteerRegistrationId\n customDocumentSlug: $customDocumentSlug\n reason: $reason\n )\n}\n",e)}(),n=(0,r.useMemo)(()=>!!e.customDocument&&Zh(e.customDocument.populationsIds??[],e.volunteerRegistration.userInfo.fields?.population),[e.customDocument,e.volunteerRegistration]),o=(0,r.useMemo)(()=>(e.volunteerRegistration.exportedCustomDocumentsSlugs??[]).includes(e.customDocument?.slug??"")&&(e.customDocument?.shouldRegenerateTicketIdOnDownload??!1),[e.customDocument,e.volunteerRegistration]),[a,s]=(0,r.useState)(!1),[d,l]=(0,r.useState)(!1),{name:c,clearName:u}=e.search,m=(0,r.useCallback)(()=>{c.startsWith("185")&&u()},[c,u]),g=(0,r.useCallback)(async(n="")=>{l(!0),s(!1);try{await async function(i,o){const a=window.open("about:blank","_blank");if(!a)throw new Error("Could not open print window, it has probably been blocked");try{const i=await(async()=>{const{link:i}=await t({eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistration.id,customDocumentSlug:e.customDocument?.slug??"",reason:n});return yg(i,"html",{lang:e.volunteerRegistration.userInfo.fields?.language})})(),s=await fetch(i,{method:"GET"});if(!s.ok)throw new Error(`Could not load document to print: ${s.status}`);const r=await s.text();a.document.write(r),a.document.close(),await Promise.all(Array.from(a.document.images).map(e=>new Promise(t=>{e.complete?t():(e.addEventListener("load",()=>t(),{once:!0}),e.addEventListener("error",()=>t(),{once:!0}))}))),await(a.document.fonts?.ready),a.addEventListener("afterprint",()=>{o?.(),a.close()},{once:!0}),a.focus(),a.print()}catch(e){throw a.close(),e}}(0,m)}catch(e){console.error(`Could not print custom document: ${String(e)}`)}finally{l(!1),e.reload()}},[t,m,e.customDocument,e.eventId,e.volunteerRegistration,e.reload]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:n&&(0,i.jsx)(jo,{color:"white",css:{overflow:"hidden","& .h-button-content":{overflow:"hidden"}},isLoading:d,leftIcon:"print",size:"sm",onClick:()=>o?s(!0):g(),children:(0,i.jsx)(Li,{css:{ellipsis:!0},title:e.column.name,width:1,children:e.column.name})})}),a&&(0,i.jsx)(YA,{customDocumentName:e.customDocument?.name??"",isOpen:a,onClose:()=>s(!1),onPrint:g})]})},ZA=e=>{const{clearNameCursors:t,name:n}=cb();return(0,i.jsx)(HA,{column:e.column,customDocument:e.column.customDocument,eventId:e.eventId,reload:e.reload,search:{name:n,clearName:t},volunteerRegistration:e.volunteerRegistration})},KA=e=>{const{translate:t,params:{organizationId:n,eventId:o}}=Hf(),{mutate:a}=Ya(),{mutate:s}=wa(),{isEditMode:d}=cb(),l=(0,r.useMemo)(()=>e.volunteerRegistration.delegation,[e.volunteerRegistration.delegation]),c=(0,r.useMemo)(()=>l?[l.id]:[],[l]),[u,m]=(0,r.useState)(!0),[g,p]=(0,r.useState)([]),f=(0,r.useCallback)(async e=>{if(e&&u){const{event:{delegations:e}}=await(t={eventId:o},n=await va(),Oa("query UpdateCellDelegations($eventId: EventId!) {\n event(id: $eventId) {\n delegations {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:t,token:n||void 0,fragments:[]}));p(e.nodes),m(!1)}var t,n},[u]),I=(0,r.useCallback)(async t=>{h(t)?await a({eventId:o,delegationId:t[0],selecteds:{ids:[e.volunteerRegistration.userInfo.id]}}):l&&await s({organizationId:n,eventId:o,delegationId:l.id,selecteds:{ids:[e.volunteerRegistration.userInfo.id]},deleteFromEvent:!1}),e.reload()},[o,e.volunteerRegistration]);return d&&e.updatable?(0,i.jsx)(uA,{column:e.column,css:{gap:"$2"},initialValue:c,renderInput:(e,n)=>u?(0,i.jsxs)(G,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(UI,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(UI,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(Qx,{isSearchVisible:!0,label:t("Delegation"),renderOnPortal:!0,values:e,onChange:n,children:g.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),renderValue:()=>l?(0,i.jsx)(My,{cursor:"pointer",ellipsis:!0,title:l.name,children:l.name}):null,onSave:I,onStateChange:f}):(0,i.jsx)(yv,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:l&&(0,i.jsx)(My,{cursor:"pointer",ellipsis:!0,title:l.name,children:(0,i.jsx)(fo,{to:hg.DELEGATION({organizationId:n,eventId:o,delegationId:l.id}),children:l.name})})})},QA=e=>{const{params:{organizationId:t,eventId:n}}=Hf(),o=e.volunteerRegistration.delegation?.delegationCategory;return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:o&&(0,i.jsx)(My,{cursor:"pointer",ellipsis:!0,title:o.name,children:(0,i.jsx)(fo,{to:hg.DELEGATION_CATEGORY({organizationId:t,eventId:n,delegationCategoryId:o.id}),children:o.name})})})},XA=e=>{const{history:t,params:{organizationId:n,eventId:o}}=Hf(),a=(0,r.useMemo)(()=>(e.volunteerRegistration.userInfo?.formsUsersInfos??[]).flatMap(e=>e.form?[{id:e.form.id,color:"gray",icon:null,text:e.form.name,onClick(){t.push(Gm.FORM_ELEMENTS({organizationId:n,eventId:o,formId:e.form.id}))}}]:[]),[e.volunteerRegistration.userInfo]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:a})})},JA=e=>{const t=(0,r.useMemo)(()=>function(e,t){const n=(0,vs.A)((0,od.A)(e.filter(e=>t.includes(e.accreditationCategoryId)),e=>e.accreditation.id),e=>e.accreditation.fields.cf50732).map(e=>e.accreditation.name.substring(9));return n[0]||""}((e.volunteerRegistration.accreditationsUsersInfos||[]).map(e=>({accreditationCategoryId:e.accreditationSlot.accreditationCategory.id,accreditation:e.accreditationSlot.accreditation})),[6870,5709]),[e.volunteerRegistration.accreditationsUsersInfos]);return(0,i.jsx)(yv,{align:"center",gap:"2",minWidth:e.column.minWidth,width:e.column.width,children:t})},eC=e=>{const t=Oi(),{mutate:n}=qa(),{mutate:o}=function(e={}){return Di("mutation VolunteersRegistrationsMassStateUpdate(\n $eventId: EventId!\n $massStateUpdate: MassStateUpdateInput!\n) {\n numberOfMembers: volunteersRegistrationsMassStateUpdate(\n eventId: $eventId\n massStateUpdate: $massStateUpdate\n )\n}\n",e)}(),a=Ti(hm),{isEditMode:s}=cb(),d=(0,r.useMemo)(()=>e.volunteerRegistration?.positionsSlotsUsersInfos||[],[e.volunteerRegistration]),l=(0,r.useMemo)(()=>Mg(d),[d]),c=(0,r.useMemo)(()=>d.map(e=>e.positionSlot.id),[d]),[u,m]=(0,r.useState)(!0),[g,p]=(0,r.useState)([]),f=(0,r.useCallback)(async t=>{if(t&&u){const{event:t}=await Ga({eventId:e.eventId},await va());p($S(a,t.positionsCategories,{usePositionDisplay:!0})),m(!1)}},[u]),I=(0,r.useCallback)(async t=>{h(t)?await n({eventId:e.eventId,massAssign:{positionsSlotsIds:t,selecteds:{ids:[e.volunteerRegistration.userInfo.id]},strategy:tt.Replace}}):await o({eventId:e.eventId,massStateUpdate:{selecteds:{ids:[e.volunteerRegistration.userInfo.id]},state:Vt.WaitingAssignment}}),e.reload()},[e.eventId,e.volunteerRegistration,n,e.reload]);return s&&e.updatable?(0,i.jsx)(uA,{column:e.column,css:{gap:"$2"},initialValue:c,renderInput:(e,n)=>u?(0,i.jsxs)(G,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(UI,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(UI,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(Qx,{isSearchVisible:!0,label:t("missions_63972"),multiple:!0,renderOnPortal:!0,values:e,onChange:n,children:g}),renderValue:()=>(0,i.jsx)(bA,{badges:l,doNotSort:!0}),onSave:I,onStateChange:f}):(0,i.jsx)(yv,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:l,doNotSort:!0,onClick:e.onClick})})},tC=e=>{const t=(0,r.useMemo)(()=>(0,od.A)(e.volunteerRegistration?.positionsSlotsUsersInfos??[],e=>e.positionCategory.id).map(e=>({id:e.positionCategory.id,color:"gray",icon:null,text:e.positionCategory.name})),[e.volunteerRegistration]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:t})})},nC=e=>{const t=(0,r.useMemo)(()=>(e.volunteerRegistration?.preassignPositions||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.volunteerRegistration]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:t})})},iC=e=>{const t=(0,r.useMemo)(()=>(e.volunteerRegistration?.preassignPositionsCategories||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.volunteerRegistration]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:t})})},oC=e=>{const t=(0,r.useMemo)(()=>(e.volunteerRegistration.accreditationsUsersInfos||[]).filter(e=>e.checkInAt?.isValid),[e.volunteerRegistration]),n=(0,r.useMemo)(()=>ay(t),[t]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:n,doNotSort:!0,onClick:e.onClick})})},aC=e=>(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:v(e.volunteerRegistration.shortTag)&&v(e.volunteerRegistration.weezeventPayUrl)?(0,i.jsx)(WI,{css:{fontWeight:"normal"},to:e.volunteerRegistration.weezeventPayUrl,children:e.volunteerRegistration.shortTag}):e.volunteerRegistration.shortTag||""}),sC=(...e)=>({name:"canRegistrationStateUpdateFn",args:e});async function rC(e){try{const t=await va(),n=await function(e,t){return Oa("query UserPermission($checks: [PermissionCheck!]!) {\n user {\n permission(checks: $checks)\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}(e,t);return n.user.permission}catch{return e.checks.map(e=>!1)}}const dC=new Map;function lC({checks:e}){const t=e.map(e=>[e,JSON.stringify(e)]),n=t.filter(([e,t])=>!dC.has(t));if(n.length>0){const e=rC({checks:n.map(([e,t])=>e)});n.forEach(([t,n],i)=>{dC.set(n,e.then(e=>e[i]))})}return Promise.all(t.map(([e,t])=>dC.get(t)))}function cC({withCaching:e,checks:t}){const[{isLoading:n,permissions:i},o]=(0,r.useState)({isLoading:!0,permissions:new Array(t.length).fill(!1)}),a=e?lC:rC;return(0,r.useEffect)(()=>{a({checks:t}).then(e=>{o({isLoading:!1,permissions:e})},()=>{o({isLoading:!1,permissions:i})})},[]),{isLoading:n,permissions:i}}const uC=e=>{const t=Oi(),{mutate:n}=Ha();return(0,i.jsx)(G,{css:{cursor:"pointer",padding:"$3","&:hover":{background:"$gray100"}},onClick:async()=>{await n({eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistrationId,slug:"volunteer_registration_state",value:e.state}),e.reload(),e.close()},children:(0,i.jsx)(My,{cursor:"pointer",...NA(e.state),children:t(e.state)})})},mC=e=>{const{permissions:[t,n],isLoading:o}=function(...e){return cC({withCaching:!1,checks:e})}(sC(e.eventId,Vt.PreAssigned,e.volunteerRegistrationId),sC(e.eventId,Vt.Assigned,e.volunteerRegistrationId));return o?null:(0,i.jsxs)(i.Fragment,{children:[n&&e.state!==Vt.WaitingAssignment&&(0,i.jsx)(uC,{close:e.close,eventId:e.eventId,reload:e.reload,state:Vt.WaitingAssignment,volunteerRegistrationId:e.volunteerRegistrationId}),t&&(0,i.jsx)(uC,{close:e.close,eventId:e.eventId,reload:e.reload,state:Vt.PreAssigned,volunteerRegistrationId:e.volunteerRegistrationId}),n&&e.state!==Vt.Refused&&(0,i.jsx)(uC,{close:e.close,eventId:e.eventId,reload:e.reload,state:Vt.Refused,volunteerRegistrationId:e.volunteerRegistrationId}),n&&e.state!==Vt.NotApplicable&&(0,i.jsx)(uC,{close:e.close,eventId:e.eventId,reload:e.reload,state:Vt.NotApplicable,volunteerRegistrationId:e.volunteerRegistrationId})]})},gC=e=>{const t=Oi(),{isEditMode:n}=cb(),[o,a]=(0,r.useState)(!1),s=(0,r.useCallback)(e=>{n&&a(e)},[n,a]),d=(0,r.useCallback)(()=>{s(!1)},[s]);return n&&e.updatable?(0,i.jsx)(yv,{css:{border:"2px solid transparent","&:hover":{border:"2px solid $primary500"}},minWidth:e.column.minWidth,width:e.column.width,onClick:To,children:(0,i.jsxs)(F_,{isOpen:o,onStateChange:s,children:[(0,i.jsx)(Q_,{children:(0,i.jsxs)(G,{align:"center",gap:"3",height:1,justify:"between",width:1,children:[(0,i.jsx)(My,{...NA(e.state),cursor:"text",ellipsis:!0,children:t(e.state)}),o&&(0,i.jsx)(Li,{children:(0,i.jsx)(_o,{icon:"chevron-down"})})]})}),(0,i.jsx)(K_,{offset:2,placement:"bottom",width:230,children:(0,i.jsx)(mC,{close:d,...e})})]})}):(0,i.jsx)(yv,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(My,{...NA(e.state),children:t(e.state)})})},hC=e=>{const t=(0,r.useMemo)(()=>e.volunteerRegistration.userInfo.tags||[],[e.volunteerRegistration]),n=(0,r.useMemo)(()=>t.map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:n})})},pC=e=>{const{history:t,translate:n,params:{organizationId:o,eventId:a,segmentId:s}}=Hf(),{isEditMode:d}=cb(),{mutate:l}=Ha(),c=(0,r.useMemo)(()=>e.volunteerRegistration.teams||[],[e.volunteerRegistration]),u=(0,r.useMemo)(()=>c.map(({teamCode:n})=>({id:n,color:"gray",icon:null,text:n,onClick:d?void 0:()=>{t.push(gf.VOLUNTEERS_LIST_USER_PANEL_TEAM(o,a,s,e.volunteerRegistration.userInfo.id,n))}})),[c,d]);return 1===c.length&&d?(0,i.jsx)(uA,{column:e.column,css:{gap:"$2"},initialValue:c[0].teamCode,renderInput:(e,t)=>(0,i.jsx)(EI,{label:n("code_quipe_14296"),value:e,onChange:t}),renderValue:()=>(0,i.jsx)(bA,{badges:u}),onSave:async t=>{await l({eventId:a,volunteerRegistrationId:e.volunteerRegistration.id,slug:"team_code",value:t}),e.reload()}}):(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:u})})},fC=e=>{const{params:{organizationId:t,eventId:n}}=Hf(),o=(0,r.useMemo)(()=>(0,vs.A)(e.teamMembers,e=>y(e.name)),[e.teamMembers]);return(0,i.jsx)(G,{children:o.map((e,o)=>(0,i.jsxs)(zS,{children:[(0,i.jsx)(BS,{children:(0,i.jsx)(Li,{css:{cursor:"pointer",position:"relative",left:-4*o+"px"},children:(0,i.jsx)(fo,{to:Yf.MEMBER_INFORMATION({organizationId:t,eventId:n,userInfoId:e.id}),children:(0,i.jsx)(J_,{email:e.email,image:e.picture?.url,name:e.name,size:24})})})}),(0,i.jsx)(FS,{placement:"top",children:e.name})]},e.id))})},IC=e=>{const t=(0,r.useMemo)(()=>(e.volunteerRegistration.userInfo.formsUsersInfos||[]).flatMap(e=>e.teamMembers||[]),[e.volunteerRegistration]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(fC,{teamMembers:t})})},_C=e=>{const t=(0,r.useMemo)(()=>(e.volunteerRegistration.weezaccessChecklists||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.volunteerRegistration]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:t})})},yC=e=>{const t=(0,r.useMemo)(()=>ly((e.volunteerRegistration.userInfo.formsUsersInfos??[]).flatMap(e=>e.accreditationProfile?[e.accreditationProfile]:[])),[e.volunteerRegistration]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:t,doNotSort:!0})})},xC=e=>{const t=(0,r.useMemo)(()=>sy(e.volunteerRegistration?.accreditationsSlots||[]),[e.volunteerRegistration]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:t,doNotSort:!0,onClick:e.onClick})})},SC=e=>{const t=Ti(hm),n=(0,r.useMemo)(()=>function(e,t,n,i){return(0,od.A)(t,e=>e.id).map(e=>({id:`c-${e.id}`,color:"gray",icon:null,text:e.name})).concat((0,od.A)(n,e=>e.id).map(e=>({id:`p-${e.id}`,color:e.color,icon:e.icon,text:v(e.acronym)?e.acronym:e.name}))).concat((0,od.A)(i,e=>e.id).map(t=>{const n=v(t.position.acronym)?t.position.acronym:t.position.name,i=jg(e,t,n,{interval:{options:{formats:{localeFormat:oa.DateOnly.Numeric}}}});return{id:`s-${t.id}`,color:t.position.color,icon:t.position.icon,text:`${n} | ${i}`}}))}(t,e.volunteerRegistration?.positionsCategories||[],e.volunteerRegistration?.positions||[],e.volunteerRegistration?.positionsSlots||[]),[e.volunteerRegistration]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:n,onClick:e.onClick})})},vC=e=>{const{history:t,params:{organizationId:n,eventId:o}}=Hf(),a=Ti(jl),s=Ti(rm),d=(0,r.useMemo)(()=>function(e,t){return t.flatMap(t=>t.form?[`${t.form.name} : ${e.toLocaleString(t.insertedAt.toLocal(),oa.DateTime)}`]:[]).join(", ")}(a,e.row.userInfo.formsUsersInfos||[]),[e.row]),{mutate:l}=Ha(),c=(0,r.useCallback)((t,n)=>l({eventId:e.eventId,volunteerRegistrationId:e.row.id,slug:n,value:t}),[e.eventId,e.row,l]),u=e.row.userInfo;switch(e.column.slug){case yp.AccreditationProfile:return(0,i.jsx)(wA,{column:e.column,eventId:e.eventId,reload:e.reloadRow,updatable:e.canMemberAccredit,volunteerRegistration:e.row});case yp.Accreditations:return(0,i.jsx)($A,{column:e.column,eventId:e.eventId,reload:e.reloadRow,updatable:e.canMemberAccredit,volunteerRegistration:e.row,onClick:v(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/assigned`)}:void 0});case yp.AccreditationsCategories:return(0,i.jsx)(PA,{column:e.column,volunteerRegistration:e.row});case yp.AccreditationState:return(0,i.jsx)(LA,{column:e.column,eventId:e.eventId,field:e.column,reload:e.reloadRow,state:e.row.accreditationState,updatable:e.canMemberAccredit,volunteerRegistrationId:e.row.id});case yp.ScannedAccreditations:return(0,i.jsx)(oC,{column:e.column,volunteerRegistration:e.row,onClick:v(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/scanned`)}:void 0});case"bracelet_a_delivrer":return(0,i.jsx)(JA,{column:e.column,volunteerRegistration:e.row});case yp.Availability:return(0,i.jsx)(FA,{column:e.column,volunteerRegistration:e.row,onClick:v(e.availabilitiesPanelPath)?()=>{t.push(e.availabilitiesPanelPath)}:void 0});case yp.Comments:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:h(u.comments)?u.comments.map(e=>e.content).join("; "):""});case yp.CampaignsStates:return(0,i.jsx)(WA,{column:e.column,volunteerRegistration:e.row});case yp.CheckedInPositions:return(0,i.jsx)(qA,{column:e.column,volunteerRegistration:e.row,onClick:v(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/assigned`)}:void 0});case yp.CompletedForms:return(0,i.jsx)(XA,{column:e.column,volunteerRegistration:e.row});case yp.FormsInsertedAt:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Li,{css:{ellipsis:!0},title:d,children:d})});case yp.Delegations:return(0,i.jsx)(KA,{column:e.column,reload:e.reloadRow,updatable:e.canChangeDelegation,volunteerRegistration:e.row});case yp.DelegationBannerNumber:return(0,i.jsx)(UA,{column:e.column,mutate:c,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0,volunteerRegistration:e.row});case yp.DuplicatedFrom:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.duplicatedFrom?(0,i.jsx)(sA,{size:32,userInfo:e.row.duplicatedFrom.userInfo}):null});case yp.DelegationCategory:return(0,i.jsx)(QA,{column:e.column,volunteerRegistration:e.row});case yp.Email:return(0,i.jsx)(OA,{clickPath:e.informationPanelPath??Yf.MEMBER_INFORMATION({organizationId:n,eventId:o,userInfoId:e.row.userInfo.id}),column:e.column,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0,userInfo:u});case yp.Id:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:u.id});case yp.LocalId:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.localId});case yp.OrganizationLocalId:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:u.localId});case yp.InsertedAt:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:a.toLocaleString(e.row.insertedAt.toLocal(),oa.DateTime)});case yp.Name:return(0,i.jsx)(RA,{clickPath:e.informationPanelPath,column:e.column,mutate:c,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0,userInfo:e.row.userInfo});case yp.NumberOfAccreditations:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAccreditations});case yp.NumberOfAssignments:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAssignments});case yp.NumberOfAssignmentsDays:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAssignmentsDays});case yp.NumberOfAvailableDays:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAvailableDays});case yp.Positions:return(0,i.jsx)(eC,{column:e.column,eventId:e.eventId,reload:e.reloadRow,updatable:e.canMemberAssign,volunteerRegistration:e.row,onClick:v(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/assigned`)}:void 0});case yp.PositionsCategories:return(0,i.jsx)(tC,{column:e.column,volunteerRegistration:e.row});case yp.PreassignedPositions:return(0,i.jsx)(nC,{column:e.column,volunteerRegistration:e.row});case yp.PreassignedPositionsCategories:return(0,i.jsx)(iC,{column:e.column,volunteerRegistration:e.row});case yp.Roles:return(0,i.jsx)(MA,{minWidth:e.column.minWidth,userPermissions:e.row.userInfo,width:e.column.width});case yp.Tags:return(0,i.jsx)(hC,{column:e.column,volunteerRegistration:e.row});case yp.TeamCode:return(0,i.jsx)(pC,{column:e.column,reload:e.reloadRow,volunteerRegistration:e.row});case yp.TeamMembers:return(0,i.jsx)(IC,{column:e.column,volunteerRegistration:e.row});case yp.VolunteerMinutes:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:s.minutesToHoursMinutesString(e.row.volunteerMinutes)});case yp.VolunteerRegistrationState:return(0,i.jsx)(gC,{column:e.column,eventId:e.eventId,field:e.column,reload:e.reloadRow,state:e.row.state,updatable:e.row.canRegistrationStateUpdate??!0,volunteerRegistrationId:e.row.id});case yp.WishedAccreditationProfile:return(0,i.jsx)(yC,{column:e.column,volunteerRegistration:e.row});case yp.WishedAccreditationSlots:return(0,i.jsx)(xC,{column:e.column,volunteerRegistration:e.row,onClick:v(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/wished`)}:void 0});case yp.WishedPositions:return(0,i.jsx)(SC,{column:e.column,volunteerRegistration:e.row,onClick:v(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/wished`)}:void 0});case yp.WeezaccessChecklists:return(0,i.jsx)(_C,{column:e.column,volunteerRegistration:e.row});case yp.WeezeventBarcodeId:return(0,i.jsx)(GA,{column:e.column,volunteerRegistration:e.row});case yp.WeezeventBarcodeVersion:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.ticketIdVersion});case yp.WeezeventPairedAt:return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.pairedAt?.isValid?a.toLocaleString(e.row.pairedAt.toLocal(),oa.DateTime):""});case yp.WeezeventShortTag:return(0,i.jsx)(aC,{column:e.column,volunteerRegistration:e.row});default:return Object.values(yp).includes(e.column.slug)?(console.error(`003: Unhandled default column ${e.column.slug}`),(0,i.jsx)(yv,{children:"ERR"})):e.column.slug.startsWith("form_inserted_at")?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:oA(a,e.column.slug,e.row.userInfo.formsUsersInfos||[])}):Hh(e.column.slug)?(0,i.jsx)(ZA,{column:e.column,eventId:e.eventId,reload:e.reloadRow,volunteerRegistration:e.row}):(0,i.jsx)(TA,{avatarUser:e.row.userInfo,clickPath:e.informationPanelPath??Yf.MEMBER_INFORMATION({organizationId:n,eventId:o,userInfoId:e.row.userInfo.id}),column:e.column,customField:e.customField,fields:e.row.userInfo.fields,mutate:c,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0})}},bC=e=>(0,i.jsx)(Li,{color:"gray800",css:{borderBottom:"1px solid $gray200",padding:"$6"},fontSize:"textXl",fontWeight:"medium",children:e.children}),jC=({title:e,subtitle:t})=>(0,i.jsx)(jv,{css:{height:"fit-content"},children:(0,i.jsx)(yv,{children:(0,i.jsxs)(G,{align:"center",css:{padding:"$8 0"},direction:"column",justify:"center",width:1,children:[(0,i.jsx)(jy,{color:"primary",icon:"magnifying-glass"}),(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(Li,{color:"gray900",fontSize:"textMd",fontWeight:"medium",children:e}),(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{color:"gray500",children:t})]})})}),AC=(0,r.createContext)({}),CC=e=>{const{mutate:t}=Da(),{mutate:n}=Qa(),[o,a]=(0,r.useState)(e.volunteerRegistration.accreditationsUsersInfos.map(e=>e.accreditationSlot)),s=(0,r.useMemo)(()=>o.map(({id:e})=>e),[o]),[d,l]=(0,r.useState)(e.volunteerRegistration.accreditationsUsersInfos.flatMap(e=>e.checkInAt?.isValid?[e.accreditationSlot]:[])),[c,u]=(0,r.useState)(e.volunteerRegistration.accreditationsSlots),m=(0,r.useMemo)(()=>(0,vs.A)((0,od.A)(o.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[o]),g=(0,r.useMemo)(()=>(0,vs.A)((0,od.A)(d.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[d]),h=(0,r.useMemo)(()=>(0,vs.A)((0,od.A)(c.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[c]),p=(0,r.useMemo)(()=>(0,od.A)(o.map(e=>e.accreditation),e=>e.id),[o]),f=(0,r.useMemo)(()=>(0,od.A)(d.map(e=>e.accreditation),e=>e.id),[d]),I=(0,r.useMemo)(()=>(0,od.A)(c.map(e=>e.accreditation),e=>e.id),[c]),_=(0,r.useCallback)(async n=>{await t({eventId:e.eventId,massAccredit:{accreditationsSlotsIds:[n],selecteds:{ids:[e.userInfoId]},strategy:tt.Delete}}),a(e=>e.filter(e=>e.id!==n)),l(e=>e.filter(e=>e.id!==n))},[e.eventId,e.userInfoId,a,l]),y=(0,r.useCallback)(async t=>{await n({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,massAccredit:{accreditationsSlotsIds:[t],selecteds:{ids:[e.userInfoId]},strategy:tt.Delete}}),u(e=>e.filter(e=>e.id!==t))},[e.eventId,e.delegationId,e.userInfoId]),x=(0,r.useCallback)(async n=>{await t({eventId:e.eventId,massAccredit:{accreditationsSlotsIds:[n],selecteds:{ids:[e.userInfoId]},strategy:tt.Add}});const i=c.find(e=>e.id===n);a(e=>[...e,i])},[e.eventId,e.volunteerRegistration,c,a]),S=(0,r.useCallback)(t=>e.volunteerRegistration.accreditationsUsersInfos.find(e=>e.accreditationSlot.id===t).checkInAt,[e.volunteerRegistration]);return(0,i.jsx)(AC.Provider,{value:{assignSlot:x,assignedAccreditations:p,assignedCategories:m,assignedSlots:o,assignedSlotsIds:s,canDeleteCheckedIn:e.canDeleteCheckedIn,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:e.canWishedAccreditationsEdit,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,deleteAssignedSlot:_,deleteWishedSlot:y,scannedAccreditations:f,scannedCategories:g,scannedSlots:d,wishedAccreditations:I,wishedCategories:h,wishedSlots:c,getScannedAt:S},children:e.children})};function EC(){return(0,r.useContext)(AC)}const TC=e=>{const{translate:t}=Hf(),n=Ti(jl),{assignSlot:o,assignedSlotsIds:a,canMemberAccredit:s,canWishedAccreditationsEdit:d,defaultHiddenAccreditationsSlotsIds:l,deleteAssignedSlot:c,deleteWishedSlot:u,getScannedAt:m}=EC(),[g,h]=(0,r.useState)(!1);return"assigned"===e.state&&!e.isBlocked&&s?(0,i.jsx)(G,{css:{flex:"1",px:"$4"},justify:"end",children:g?(0,i.jsx)(UI,{borderRadius:"$1",height:20,children:t("retirer_05155")}):(0,i.jsx)(Li,{css:{cursor:"pointer"},font:"error700 textSm medium",onClick:async()=>{h(!0),await c(e.accreditationSlotId)},children:t("retirer_05155")})}):"wished"===e.state&&s?(0,i.jsx)(G,{css:{flex:"1",px:"$4"},justify:"end",children:a.includes(e.accreditationSlotId)?(0,i.jsxs)(G,{align:"center",gap:"1",children:[(0,i.jsx)(Li,{color:"success500",children:(0,i.jsx)(_o,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)(Li,{font:"gray800 textXs medium",children:t("d_j_attribu_e_06450")})]}):e.isBlocked?null:(0,i.jsx)(jo,{isLoading:g,size:"sm",onClick:async()=>{h(!0),await o(e.accreditationSlotId),h(!1)},children:t("ajouter_97327")})}):"wished"!==e.state||!d||e.isBlocked||l.includes(e.accreditationSlotId)?"scanned"===e.state?(0,i.jsx)(G,{css:{flex:"1",px:"$4"},children:(0,i.jsx)(Li,{css:{ellipsis:!0},children:n.toLocaleString(m(e.accreditationSlotId),oa.DateTime)})}):(0,i.jsx)(G,{css:{flex:"1",px:"$4"}}):(0,i.jsx)(G,{css:{flex:"1",px:"$4"},justify:"end",children:g?(0,i.jsx)(UI,{borderRadius:"$1",height:20,children:t("retirer_05155")}):(0,i.jsx)(Li,{css:{cursor:"pointer"},font:"error700 textSm medium",onClick:async()=>{h(!0),await u(e.accreditationSlotId)},children:t("retirer_05155")})})},OC=e=>{const t=Ti(jl),{canDeleteCheckedIn:n,canMemberAccredit:o,canWishedAccreditationsEdit:a,scannedSlots:s}=EC(),d="assigned"===e.state&&o||"scanned"===e.state||"wished"===e.state&&(o||a),l=v(e.slot.name)?e.slot.name:"-",c=(0,r.useMemo)(()=>e.slot.isBlocked?e.slot.isBlocked:!n&&s.some(t=>t.id===e.slot.id),[n,e.slot,s]);return(0,i.jsxs)(jv,{children:[(0,i.jsx)(yv,{css:{textTransform:"capitalize"},children:e.slot.date?t.toLocaleString(e.slot.date,oa.DateOnly.WeekdayShortMonthShort):"-"}),(0,i.jsx)(yv,{children:(0,i.jsx)(Li,{css:{ellipsis:!0},title:l,width:1,children:l})}),d&&(0,i.jsx)(TC,{accreditationSlotId:e.slot.id,isBlocked:c,state:e.state})]})},RC=e=>{const{translate:t}=Hf(),{assignedSlots:n,canDeleteCheckedIn:o,canMemberAccredit:a,canWishedAccreditationsEdit:s,scannedSlots:d,wishedSlots:l}=EC(),c=(0,r.useMemo)(()=>(0,vs.A)(("assigned"===e.state?n:"scanned"===e.state?d:l).filter(t=>t.accreditationId===e.accreditation.id),e=>[e.date?.toMillis()??1,e.name?.toLowerCase()||""]),[n,d,l,e.accreditation,e.state]),u=(0,r.useMemo)(()=>!o&&d.some(t=>t.id===e.accreditation.hiddenSlotId),[o,e.accreditation,d]),m="assigned"===e.state&&a||"scanned"===e.state||"wished"===e.state&&(a||s);return(0,i.jsx)(xy,{accreditation:e.accreditation,displayNumberOfSlots:!0,displaySlots:e.accreditation.hasSlots,numberOfSlots:c.length,renderActions:!e.accreditation.hasSlots&&m?()=>(0,i.jsx)(TC,{accreditationSlotId:e.accreditation.hiddenSlotId,isBlocked:u,state:e.state}):void 0,children:(0,i.jsxs)(Av,{hideBorder:!0,children:[(0,i.jsxs)(Sv,{children:[(0,i.jsx)(xv,{children:t("date_du_cr_neau_82295")}),(0,i.jsx)(xv,{children:t("nom_du_cr_neau_54351")}),m&&(0,i.jsx)(xv,{children:"scanned"===e.state&&t("scann_e_le_27812")})]}),c.map(t=>(0,i.jsx)(OC,{slot:t,state:e.state},t.id))]})})},MC=e=>{const{assignedAccreditations:t,scannedAccreditations:n,wishedAccreditations:o}=EC(),a=(0,r.useMemo)(()=>dy(("assigned"===e.state?t:"scanned"===e.state?n:o).filter(t=>t.accreditationCategoryId===e.category.id)),[t,o,e.category,e.state]);return(0,i.jsx)(By,{category:e.category.name,children:a.map(t=>(0,i.jsx)(RC,{accreditation:t,state:e.state},t.id))})},DC=e=>{const t=Oi(),{assignedCategories:n,scannedCategories:o,wishedCategories:a}=EC(),s="assigned"===e.state?n:"scanned"===e.state?o:a;return(0,i.jsx)(Ny,{children:h(s)?s.map(t=>(0,i.jsx)(MC,{category:t,state:e.state},t.id)):(0,i.jsx)(jC,{title:t("no_accreditations")})})},wC=e=>{const{translate:t}=Hf();return(0,i.jsx)(CC,{canDeleteCheckedIn:e.canDeleteCheckedIn,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:e.canWishedAccreditationsEdit,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,delegationId:e.delegationId,eventId:e.eventId,organizationId:e.organizationId,userInfoId:e.volunteerRegistration.userInfo.id,volunteerRegistration:e.volunteerRegistration,children:(0,i.jsxs)(Eb,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(bC,{children:t("accr_ditations_04710",e.volunteerRegistration.userInfo.name)}),(0,i.jsx)(Tb,{css:{padding:"0"},children:(0,i.jsxs)(ab,{height:1,children:[(0,i.jsxs)(ib,{center:!0,children:[(0,i.jsx)(nb,{path:`${e.basePath}/assigned`,children:t("attribu_es_48167")}),(0,i.jsx)(nb,{path:`${e.basePath}/wished`,children:t("souhait_es_78101")}),(0,i.jsx)(nb,{path:`${e.basePath}/scanned`,children:t("scann_es_13169")})]}),(0,i.jsx)(ob,{path:`${e.basePath}/assigned`,children:(0,i.jsx)(DC,{state:"assigned"})}),(0,i.jsx)(ob,{path:`${e.basePath}/wished`,children:(0,i.jsx)(DC,{state:"wished"})}),(0,i.jsx)(ob,{path:`${e.basePath}/scanned`,children:(0,i.jsx)(DC,{state:"scanned"})})]})})]})})},$C=R(Li,{overflow:"hidden",textOverflow:"ellipsis",color:"$gray500",fontSize:"$textSm",fontWeight:"$regular","@tablet":{fontSize:"$textSm"}}),PC=e=>{const t=Ti(Pl);switch(e.field.fieldType){case Fe.File:{const n=t.getValue(e.field,e.fields);return n?(0,i.jsx)(xx,{acl:"public-read",document:n}):(0,i.jsx)($C,{children:"-"})}case Fe.Phone:{const n=t.getValueString(e.field,e.fields);return(0,i.jsx)($C,{children:v(n)?(0,i.jsx)(WI,{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},hideIcon:!0,to:`tel:${n}`,children:n}):"-"})}case Fe.Select:{const n=t.getSelectCustomFieldValues(e.field,e.fields);return(0,i.jsx)(G,{align:"center",gap:"3",wrap:"wrap",children:n.map(({value:t,color:n},o)=>e.field.listType===Xe.Dot?(0,i.jsx)(_A,{color:n||"",children:t},o):(0,i.jsx)(My,{color:e.field.listType===Xe.Badge?n||"":"gray",children:t},o))})}default:{const n=t.getValueString(e.field,e.fields);return(0,i.jsx)($C,{children:v(n)?URL.canParse(n)?(0,i.jsx)(WI,{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},hideIcon:!0,to:n,children:n}):n:"-"})}}},NC=e=>(0,i.jsx)(Li,{color:"gray800",css:{overflow:"hidden",textOverflow:"ellipsis",...e.css},fontSize:"textSm",fontWeight:"medium",children:e.children}),kC=e=>(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(NC,{children:e.field.name}),(0,i.jsx)(PC,{field:e.field,fields:e.fields})]}),zC=e=>{const{translate:t}=Hf(),n=(0,r.useMemo)(()=>e.form.elements.flatMap(e=>e.elementType===Ve.Field?[e.customField]:e.hasCondition&&e.conditionCustomField?[e.conditionCustomField]:[]),[e.form]),o=(0,r.useMemo)(()=>e.form.elements.filter(t=>t.elementType===Ve.Field?kl(t.customField,e.userInfo.fields,n):t.elementType===Ve.Section&&kl(t,e.userInfo.fields,n)),[n,e.form.elements,e.userInfo.fields]),a="all"!==e.form.id?(s=e.form.id,{name:t("commentaire_r_12290"),slug:`form${s}`,fieldType:Fe.Textarea,listType:Xe.Default,values:[]}):null;var s;return(0,i.jsxs)(G,{css:e.css,direction:"column",children:[o.map((t,n)=>{switch(t.elementType){case Ve.Field:return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(kC,{field:t.customField,fields:e.userInfo.fields}),n!==o.length-1&&(0,i.jsx)(oI,{height:"6"})]},t.id);case Ve.Section:return(0,i.jsxs)(r.Fragment,{children:[0!==n&&(0,i.jsx)(oI,{height:"2"}),(0,i.jsx)(Li,{color:"gray800",fontWeight:"semiBold",children:t.section}),n!==o.length-1&&(0,i.jsx)(oI,{height:"4"})]},t.id);case Ve.Text:return null;default:return wr(t.elementType)}}),a&&v(e.userInfo.fields[a.slug])&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(Li,{color:"gray800",fontWeight:"semiBold",children:t("inscription_en_49989")}),(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(kC,{field:a,fields:e.userInfo.fields})]})]})},LC=e=>{const{data:t,loader:n}=Mi("query DelegationMemberRightPanel(\n $organizationId: OrganizationId!\n $userInfoId: UsersInfoId!\n $formId: FormId!\n) {\n organization(id: $organizationId) {\n userInfo(id: $userInfoId) {\n id\n name\n email\n fields\n picture {\n url\n }\n\n formUserInfo(formId: $formId) {\n insertedAt\n form {\n ...FormMemberRegistration\n }\n }\n }\n }\n}\n",{organizationId:e.organizationId,userInfoId:e.userInfoId,formId:e.delegation.form.id},[Yo.FormMemberRegistrationFragment]);return(0,i.jsx)(Eb,{returnToFallback:e.returnPathFallback,size:"md",children:n||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(bC,{children:(0,i.jsx)(sA,{areContactLinksEnabled:!0,isClickDisabled:!0,size:48,userInfo:t.organization.userInfo})}),(0,i.jsx)(Tb,{css:{background:"$gray50",py:"$6"},children:(0,i.jsx)(R_,{children:(0,i.jsx)(zC,{form:t.organization.userInfo.formUserInfo.form,userInfo:t.organization.userInfo})})})]})})},FC=e=>(0,i.jsxs)(F_,{isOpen:e.isOpen,onStateChange:e.onStateChange,children:[(0,i.jsx)(Q_,{children:e.triggerElem||(0,i.jsx)(G,{align:"center",css:{cursor:"pointer"},height:20,justify:"center",width:20,children:(0,i.jsx)(_o,{icon:"ellipsis-vertical"})})}),(0,i.jsx)(K_,{placement:"bottom-end",children:e.children})]}),UC=e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(by,{state:e.isChecked?"checked":"unchecked",onClick:e.onClick,children:e.text}),e.isChecked&&e.children&&(0,i.jsx)(G,{css:{paddingBottom:"$3",paddingLeft:"$6"},gap:"4",children:e.children})]}),BC=e=>{const{translate:t}=Hf(),{mutate:n}=Pa(),[o,a]=(0,r.useState)(me.CheckInOut),[s,d]=(0,r.useState)(e.positionSlotUserInfo.checkInAt?.toLocal()),[l,c]=(0,r.useState)(e.positionSlotUserInfo.checkOutAt?.toLocal()),[u,m]=(0,r.useState)(e.positionSlotUserInfo.breakTime),[g,h]=(0,r.useState)(!1),p=(0,r.useMemo)(()=>sa(),[]),f=o===me.Reset||s?.isValid&&l?.isValid&&l>s||s?.isValid&&!l?.isValid;return(0,i.jsx)(ko,{isOpen:e.isOpen,onClose:e.onClose,children:(0,i.jsxs)(No,{children:[(0,i.jsx)(Po,{icon:"sliders",children:t("mise_jour_du_76261")}),(0,i.jsxs)($o,{gap:"2",children:[(0,i.jsx)(Li,{font:"gray700 textSm medium",children:t("que_souhaitez_v_87607")}),(0,i.jsxs)(UC,{isChecked:o===me.CheckInOut,text:t("mettre_jour_l_00128"),onClick:()=>{a(me.CheckInOut)},children:[(0,i.jsx)(tx,{hint:t("date_et_heure_d_93417"),rightIcon:"xmark",value:s,zone:p,onChange:d,onRightIconClick:()=>d(null)}),(0,i.jsx)(tx,{hint:t("date_et_heure_d_65738"),rightIcon:"xmark",value:l,zone:p,onChange:c,onRightIconClick:()=>c(null)}),(0,i.jsx)(EI,{hint:t("temps_de_pause_00051"),shouldParseAsInt:!0,value:u,onChange:m})]}),(0,i.jsx)(UC,{isChecked:o===me.Reset,text:t("remettre_z_ro_11572"),onClick:()=>{a(me.Reset)}})]}),(0,i.jsx)(wo,{children:a=>(0,i.jsx)(jo,{disabled:!f,isLoading:g,onClick:async()=>{h(!0),await n({eventId:e.positionSlotUserInfo.eventId,checkIn:{breakTime:u,checkInAt:s?.toUTC(),checkOutAt:l?.toUTC(),strategy:o,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),a()},children:t("mettre_jour_85141")})})]})})},GC=e=>{const{translate:t}=Hf(),{mutate:n}=Pa(),{mutate:o}=qa(),[a,s]=(0,r.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(FC,{triggerElem:e.triggerElem,children:[e.canCheckIn&&(0,i.jsx)(H_,{icon:"circle-check",onClick:()=>s(!0),children:t("mettre_jour_l_00128")}),e.canCheckIn&&e.psui.state!==ue.Waiting&&(0,i.jsx)(H_,{icon:"arrows-rotate",onClick:async()=>{await n({eventId:e.psui.eventId,checkIn:{strategy:me.Reset,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reloadCheckIn(e.psui.id)},children:t("remettre_z_ro_11572")}),e.canDelete&&(0,i.jsx)(H_,{color:"red",icon:"user-xmark",onClick:async()=>{await o({eventId:e.psui.eventId,massAssign:{positionsSlotsIds:[e.psui.positionSlotId],selecteds:{ids:[e.psui.userInfoId]},strategy:tt.Delete}}),e.onDelete(e.psui.id)},children:t("d_saffecter_du_47122")})]}),(0,i.jsx)(BC,{isOpen:a,positionSlotUserInfo:e.psui,onClose:()=>{e.reloadCheckIn(e.psui.id),s(!1)}})]})},VC=e=>{const{translate:t}=Hf(),n=Ti(jl),o=Ti(rm),a=Ti(hm),{mutate:s}=Pa(),d=$_(),l=(0,r.useMemo)(()=>{const t=e.positionSlotUserInfo.positionSlot;return v(t.name)?`${t.name} - ${a.toDisplayString(t.range)}`:a.toDisplayString(t.range)},[e.positionSlotUserInfo.positionSlot]),c=()=>(0,i.jsxs)(G,{align:"center",css:{padding:"$3","@tablet":{padding:"$3 $4"}},gap:"3",width:1,wrap:"wrap",children:[(0,i.jsx)(yy,{color:e.positionSlotUserInfo.position.color,icon:e.positionSlotUserInfo.position.icon}),(0,i.jsxs)(G,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)(Li,{color:"gray800",css:{fontWeight:"$medium",overflow:"hidden",textOverflow:"ellipsis","@tablet":{fontWeight:"$semiBold"}},children:e.positionSlotUserInfo.position.name}),(0,i.jsx)(Li,{color:"gray500",fontSize:"textSm",children:l})]})]});return(0,i.jsxs)(G,{css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs","@tablet":{borderRadius:"$2"}},direction:"column",width:1,children:[e.canCheckIn?(0,i.jsx)(fo,{to:Zp.POSITION({organizationId:e.positionSlotUserInfo.organizationId,eventId:e.positionSlotUserInfo.eventId,positionId:e.positionSlotUserInfo.position.id}),children:c()}):c(),(e.canCheckIn||e.canDelete)&&(0,i.jsxs)(G,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$3","@tablet":{padding:"$3 $4"}},justify:"between",width:1,children:[e.positionSlotUserInfo.state===ue.CheckedOut?(0,i.jsx)(My,{leftIcon:"clock",children:t("temps_total_79448",o.minutesToHoursMinutesString(e.positionSlotUserInfo.timeDifferenceMinutes))}):e.positionSlotUserInfo.state===ue.CheckedIn?(0,i.jsx)(My,{color:"success",leftIcon:"circle",leftIconStyle:"solid",children:t("point_le_1_63576",n.toLocaleString(e.positionSlotUserInfo.checkInAt.toLocal(),d?oa.ShortDateTime:oa.DateTime))}):(0,i.jsx)(My,{color:"warning",leftIcon:"circle",leftIconStyle:"solid",children:t("non_point_42145")}),(0,i.jsxs)(G,{gap:"3",children:[e.canCheckIn&&e.positionSlotUserInfo.state===ue.Waiting&&(0,i.jsx)(jo,{size:"sm",onClick:async()=>{await s({eventId:e.positionSlotUserInfo.eventId,checkIn:{strategy:me.CheckIn,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),e.reloadCheckIn(e.positionSlotUserInfo.id)},children:t("pointer_80927")}),e.canCheckIn&&e.positionSlotUserInfo.state===ue.CheckedIn&&(0,i.jsx)(jo,{color:"white",size:"sm",onClick:async()=>{await s({eventId:e.positionSlotUserInfo.eventId,checkIn:{strategy:me.CheckOut,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),e.reloadCheckIn(e.positionSlotUserInfo.id)},children:t("d_pointer_25328")}),(0,i.jsx)(GC,{canCheckIn:e.canCheckIn,canDelete:e.canDelete,psui:e.positionSlotUserInfo,reloadCheckIn:e.reloadCheckIn,triggerElem:(0,i.jsx)(Li,{children:(0,i.jsx)(jo,{color:"white",rightIcon:"ellipsis-vertical",size:"sm"})}),onDelete:e.onDelete})]})]})]})},WC=(0,r.createContext)({}),qC=e=>{const{data:t}=Na({organizationId:e.organizationId,eventId:e.eventId,userInfoId:e.volunteerRegistration.userInfo.id}),[n,o]=(0,r.useState)(e.volunteerRegistration.positionsSlotsUsersInfos),a=(0,r.useMemo)(()=>(0,vs.A)((0,od.A)(n.map(e=>e.positionCategory),e=>e.id),e=>e.name.toLowerCase()),[n]),s=(0,r.useCallback)(e=>{o(t=>t.filter(t=>t.id!==e))},[o]),d=(0,r.useCallback)(async t=>{const i=n.find(e=>e.id===t),{event:{volunteerRegistration:{positionSlotUserInfo:a}}}=await(s={eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistration.id,positionSlotId:i.positionSlot.id},r=await va(),Oa("query PositionSlotUserInfo(\n $eventId: EventId!\n $volunteerRegistrationId: VolunteersRegistrationId!\n $positionSlotId: PositionsSlotId!\n) {\n event(id: $eventId) {\n volunteerRegistration(id: $volunteerRegistrationId) {\n positionSlotUserInfo(positionSlotId: $positionSlotId) {\n ...UserPositionSlotUserInfo\n }\n }\n }\n}\n",{variables:s,token:r||void 0,fragments:[Yo.UserPositionSlotUserInfoFragment]}));var s,r;o(e=>e.map(e=>e.id===t?a:e))},[e.eventId,e.volunteerRegistration,n,o]);return(0,i.jsx)(WC.Provider,{value:{assignedCategories:a,assignedPsuis:n,canCheckIn:e.canCheckIn,canDelete:e.canDelete,formsUsersInfos:t.organization?.userInfo.formsUsersInfos??[],onAssignedPsuiDelete:s,reloadCheckIn:d},children:e.children})};function YC(){return(0,r.useContext)(WC)}const HC=()=>{const{assignedCategories:e,assignedPsuis:t,canCheckIn:n,canDelete:o,onAssignedPsuiDelete:a,reloadCheckIn:s}=YC(),d=(0,r.useMemo)(()=>(0,ym.A)(t,e=>e.positionCategory.id),[t]);return(0,i.jsx)(Ny,{children:e.map(e=>{const t=d[e.id];return(0,i.jsx)(By,{category:e.name,children:t.map(e=>(0,i.jsx)(VC,{canCheckIn:"function"==typeof n?n(e.positionCategoryId,e.position.id):n,canDelete:o(e.positionCategoryId,e.position.id),positionSlotUserInfo:e,reloadCheckIn:s,onDelete:a},e.id))},e.id)})})},ZC=({css:e,filters:t,headerCells:n,limit:o,numberOfPages:a,offset:s,rows:r,setLimit:d,setOffset:l,showLimits:c=!1,showPagination:u=!0,title:m,totalCount:g})=>{const{designSystem:h}=ss(),p=(c||u)&&"number"==typeof a&&"number"==typeof s&&"function"==typeof l&&(g??0)>0;return(0,i.jsxs)(Li,{css:{...e},children:[(0,i.jsxs)(G,{align:"center",css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$3 $6"},gap:"3",children:[m&&(0,i.jsx)(Li,{color:"gray900",css:{flex:"1"},fontSize:h===os?"textMd":"textLg",fontWeight:"medium",children:m}),t]}),(0,i.jsxs)(Av,{role:"grid",children:[(0,i.jsx)(Sv,{css:{borderRadius:"0 !important",borderTop:"1px solid $gray200"},children:n}),r,p&&(0,i.jsx)(eA,{children:(0,i.jsx)(Jj,{limit:o,numberOfPages:a,offset:s,setLimit:d,setOffset:l,showLimits:c,totalCount:g??0})})]})]})},KC=({message:e,title:t})=>(0,i.jsxs)(lI,{alertStyle:"warning",children:[(0,i.jsx)(cI,{children:t}),(0,i.jsx)(uI,{children:e})]}),QC=({editDisabled:e,eventId:t,form:n,organizationId:o})=>{const a=$i();return(0,i.jsx)(My,{color:"primary",cursor:e?"default":"pointer",onContentClick:()=>{e||a.push(Gm.FORM_ELEMENTS({organizationId:o,eventId:t??void 0,formId:n.id}))},children:n.name})},XC=({canMemberAssign:e,editPath:t,formsUsersInfos:n,isEditDisabled:o=!1})=>{const{history:a,params:{organizationId:s,eventId:d},translate:l}=Hf(),c=Ti(hm),u=(0,r.useMemo)(()=>function(e,t,n,i){return(0,vs.A)(e.map(e=>{const o=e.positions.map((o,a)=>({name:o.name,category:o.category.name,range:o.range?t.toDisplayString(o.range):"-",path:Zp.POSITION({organizationId:n,eventId:i,positionId:o.id}),form:e.form,rank:a+1})),a=e.positionsCategories.map((o,a)=>({name:o.name,category:"",range:o.range?t.toDisplayString(o.range):"-",path:Zp.POSITION_CATEGORY({organizationId:n,eventId:i,positionCategoryId:o.id}),form:e.form,rank:a+1})),s=e.positionsSlots.map((t,o)=>({name:t.position.name,category:t.positionCategory.name,range:t.nameOrRange,path:Zp.POSITION({organizationId:n,eventId:i,positionId:t.position.id}),form:e.form,rank:o+1}));return o.concat(a).concat(s)}).flat(),[e=>e.form.name,(e,t)=>t])}(n,c,s,d),[n]),m=$_();return(0,i.jsxs)(G,{direction:"column",gap:"6",width:1,children:[o&&(0,i.jsx)(KC,{message:l("you_are_already_assigned_to_missions"),title:l("wished_positions_can_no_longer_be_changed")}),(0,i.jsx)(ZC,{filters:e&&v(t)&&(0,i.jsx)(jo,{color:"white",disabled:o,size:"sm",to:t,children:l("_diter_62574")}),headerCells:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(xv,{children:l("nom_de_la_missi_64605")}),!m&&(0,i.jsx)(xv,{children:l("Date")}),!m&&(0,i.jsx)(xv,{children:l("Form")})]}),numberOfPages:0,offset:0,rows:(0,i.jsx)(i.Fragment,{children:h(u)?u.map((e,t)=>(0,i.jsxs)(jv,{children:[(0,i.jsxs)(yv,{align:"start",direction:"column",gap:"1",justify:"center",children:[v(e.category)&&(0,i.jsx)(Li,{color:"gray500",css:{fontSize:"11px",textTransform:"uppercase"},fontWeight:"medium",children:e.category}),(0,i.jsx)(Li,{css:{cursor:"pointer"},font:"gray900 textSm medium",onClick:()=>{a.push(e.path)},children:e.name}),e.form.positionRanking===We.Ranked&&(0,i.jsx)(Li,{color:"gray500",children:l("choix_n_1_00613",e.rank)}),m&&(0,i.jsx)(Li,{color:"gray500",children:e.range})]}),!m&&(0,i.jsx)(yv,{children:e.range}),!m&&(0,i.jsx)(yv,{children:(0,i.jsx)(QC,{editDisabled:o,eventId:d,form:e.form,organizationId:s})})]},t)):(0,i.jsx)(jv,{css:{height:"200px"},children:(0,i.jsx)(yv,{children:(0,i.jsx)(ky,{title:l("aucune_mission_61179")})})})}),setOffset:RI.A,title:l("missions_souhai_23225"),totalCount:0})]})},JC=()=>{const{formsUsersInfos:e}=YC();return(0,i.jsx)(G,{css:{background:"$gray50",padding:"$6"},height:1,width:1,children:(0,i.jsx)(XC,{canMemberAssign:!1,formsUsersInfos:e})})},eE=e=>{const{translate:t}=Hf();return(0,i.jsx)(qC,{canCheckIn:e.canCheckIn,canDelete:e.canDelete,eventId:e.eventId,organizationId:e.organizationId,volunteerRegistration:e.volunteerRegistration,children:(0,i.jsxs)(Eb,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(bC,{children:t("missions_de_1_99317",e.volunteerRegistration.userInfo.name)}),(0,i.jsx)(Tb,{css:{padding:"0"},children:(0,i.jsxs)(ab,{height:1,children:[(0,i.jsxs)(ib,{center:!0,children:[(0,i.jsx)(nb,{path:`${e.basePath}/assigned`,children:t("attribu_es_48167")}),(0,i.jsx)(nb,{path:`${e.basePath}/wished`,children:t("souhait_es_78101")})]}),(0,i.jsx)(ob,{path:`${e.basePath}/assigned`,children:(0,i.jsx)(HC,{})}),(0,i.jsx)(ob,{path:`${e.basePath}/wished`,children:(0,i.jsx)(JC,{})})]})})]})})},tE=r.createContext({}),nE=e=>{const{data:t,loader:n}=Mi("query TeamRightPanel($eventId: EventId!, $teamCode: TeamCode!) {\n event(id: $eventId) {\n team(teamCode: $teamCode) {\n form {\n name\n }\n\n members {\n ...UserInfoTeamRightPanel\n }\n }\n }\n}\n",{eventId:e.eventId,teamCode:e.teamCode},[Yo.UserInfoTeamRightPanelFragment]);const{mutate:o}=qa(),[a,s]=r.useState([]),d=r.useMemo(()=>{const e=a.flatMap(e=>e.positionsCategories.flatMap(e=>e.positions.flatMap(e=>e.slots.map(t=>({...t,position:(0,L.A)(e,["id","name","icon","color"])}))))),t=a.flatMap(e=>e.positions.flatMap(e=>e.slots.map(t=>({...t,position:(0,L.A)(e,["id","name","icon","color"])})))),n=a.flatMap(e=>e.positionsSlots);return(0,od.A)(e.concat(t).concat(n),e=>e.id)},[a]),l=r.useMemo(()=>(0,od.A)(a.flatMap(e=>e.positionsSlotsUsersInfos.map(e=>({...e.positionSlot,position:e.position}))),e=>e.id),[a]),c=r.useMemo(()=>(0,vs.A)((0,od.A)(d.concat(l),e=>e.id),e=>[e.position.name.toLowerCase(),e.range.start.toMillis()]),[d,l]),u=r.useMemo(()=>Object.fromEntries(a.map(e=>{const t=(0,qo.A)(e.positionsCategories.flatMap(e=>e.positions.flatMap(e=>e.slots.map(e=>e.id))).concat(e.positions.flatMap(e=>e.slots.map(e=>e.id))).concat(e.positionsSlots.map(e=>e.id)));return[e.userInfo.id,t]})),[a]),m=r.useMemo(()=>Object.fromEntries(a.map(e=>{const t=e.positionsSlotsUsersInfos.map(e=>e.positionSlot.id);return[e.userInfo.id,t]})),[a]),g=r.useCallback(async(t,n)=>{await o({eventId:e.eventId,massAssign:{positionsSlotsIds:[n],selecteds:{ids:[t]},strategy:tt.Add}});const{event:i}=await function(e,t){return Oa("query TeamRightPanelMember($eventId: EventId!, $userInfoId: UsersInfoId!) {\n event(id: $eventId) {\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n ...UserInfoTeamRightPanel\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[Yo.UserInfoTeamRightPanelFragment]})}({eventId:e.eventId,userInfoId:t},await va());s(e=>e.map(e=>e.userInfo.id===t?i.volunteerRegistration:e))},[e.eventId,s]);return r.useEffect(()=>{s(t.event?.team?.members??[])},[t.event,s]),(0,i.jsx)(tE.Provider,{value:{allSlots:c,form:t.event?.team?.form,loader:n,memberIdToAssignedSlotsIds:m,memberIdToWishedSlotsIds:u,members:a,assign:g},children:e.children})};function iE(){return r.useContext(tE)}const oE=e=>{const{translate:t}=Hf(),{assign:n,memberIdToAssignedSlotsIds:o,memberIdToWishedSlotsIds:a}=iE(),[s,d]=(0,r.useState)(!1),l=o[e.member.userInfo.id].includes(e.slot.id),c=a[e.member.userInfo.id].includes(e.slot.id);return(0,i.jsxs)(jv,{children:[(0,i.jsx)(yv,{children:(0,i.jsx)(sA,{size:32,userInfo:e.member.userInfo})}),(0,i.jsx)(yv,{justify:"end",children:l?(0,i.jsxs)(G,{align:"center",gap:"1",children:[(0,i.jsx)(Li,{color:"success500",children:(0,i.jsx)(_o,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)(Li,{font:"gray800 textXs medium",children:t("d_j_affect_71706")})]}):c?(0,i.jsx)(jo,{isLoading:s,size:"sm",onClick:()=>{d(!0),n(e.member.userInfo.id,e.slot.id)},children:t("affecter_94255")}):(0,i.jsxs)(G,{align:"center",gap:"1",children:[(0,i.jsx)(Li,{color:"error500",children:(0,i.jsx)(_o,{icon:"circle-xmark",iconStyle:"solid"})}),(0,i.jsx)(Li,{font:"gray800 textXs medium",children:t("non_souhait_46147")})]})})]})},aE=e=>{const{translate:t}=Hf(),{members:n}=iE(),o=Ti(hm),a=(0,r.useMemo)(()=>jg(o,e.slot,e.slot.position.name,{slot:{includeRange:!0}}),[e.slot]);return(0,i.jsxs)(G,{css:{background:"white",bd:!0,overflow:"hidden"},direction:"column",children:[(0,i.jsxs)(G,{css:{padding:"$3 $4"},gap:"3",children:[(0,i.jsx)(yy,{color:e.slot.position.color,icon:e.slot.position.icon}),(0,i.jsxs)(G,{direction:"column",children:[(0,i.jsx)(Li,{font:"gray800 textSm semiBold",children:e.slot.position.name}),(0,i.jsx)(Li,{color:"gray500",children:a})]})]}),(0,i.jsxs)(Av,{hideBorder:!0,children:[(0,i.jsxs)(Sv,{children:[(0,i.jsx)(xv,{children:t("full_name")}),(0,i.jsx)(xv,{})]}),n.map(t=>(0,i.jsx)(oE,{member:t,slot:e.slot},t.userInfo.id))]})]})},sE=()=>{const{allSlots:e}=iE();return(0,i.jsx)(G,{direction:"column",gap:"3",width:1,children:e.map(e=>(0,i.jsx)(aE,{slot:e},e.id))})},rE=e=>{const{translate:t}=Hf(),{form:n,loader:o}=iE();return(0,i.jsxs)(Eb,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(bC,{children:(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(Li,{children:t("_quipe_1_19590",e.teamCode)}),(0,i.jsx)(Li,{color:"gray500",fontSize:"textSm",children:t("formulaire_1_39637",n?.name)})]})}),(0,i.jsx)(Tb,{css:{background:"$gray50",py:"$6"},children:o||(0,i.jsx)(sE,{})})]})},dE=e=>(0,i.jsx)(nE,{eventId:e.eventId,teamCode:e.teamCode,children:(0,i.jsx)(rE,{...e})}),lE=({editPath:e,eventId:t,organizationId:n,formsUsersInfos:o,showEditButton:a,isEditDisabled:s=!1})=>{const{translate:d}=Hf(),l=Ti(jl),c=Ti(hm),u=(0,r.useMemo)(()=>(0,vs.A)(o.flatMap(e=>e.slots.map(t=>({range:t.range,display:e.form.slotDisplay,form:e.form}))),({range:e})=>e.start.toMillis()),[o]),m=$_(),g=(0,r.useCallback)((e,t)=>{switch(t){case Et.Calendar:case Et.DisplayDays:return(0,i.jsx)(Li,{children:l.toLocaleString(e.start,oa.DateOnly.MonthLong)});case Et.Display:case Et.Custom:return(0,i.jsxs)(G,{direction:"column",children:[(0,i.jsx)(Li,{css:{lineHeight:"20px"},children:c.toDisplayString(e,{hideTime:!0})}),(0,i.jsx)(Li,{color:"gray500",css:{fontWeight:400,lineHeight:"20px"},fontSize:"textSm",children:c.toDisplayString(e,{hideDate:!0})})]});case Et.Hide:return null;default:return wr()}},[]);return(0,i.jsxs)(G,{direction:"column",gap:"6",children:[s&&(0,i.jsx)(KC,{message:d("you_are_already_assigned_to_missions"),title:d("availabilities_can_no_longer_be_changed")}),(0,i.jsx)(ZC,{filters:a&&(0,i.jsx)(jo,{color:"white",disabled:s,size:"sm",to:e,children:d("_diter_62574")}),headerCells:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(xv,{children:d("Date")}),!m&&(0,i.jsx)(xv,{children:d("Form")})]}),numberOfPages:0,offset:0,rows:(0,i.jsx)(i.Fragment,{children:h(u)?u.map((e,o)=>(0,i.jsxs)(jv,{children:[(0,i.jsx)(yv,{children:g(e.range,e.display)}),!m&&(0,i.jsx)(yv,{children:(0,i.jsx)(QC,{editDisabled:s,eventId:t,form:e.form,organizationId:n})})]},o)):(0,i.jsx)(jv,{css:{height:"200px"},children:(0,i.jsx)(yv,{children:(0,i.jsx)(ky,{title:d("aucune_disponib_15602")})})})}),setOffset:RI.A,title:d("disponibilit_s_49923"),totalCount:0})]})},cE=e=>{const t=Oi(),{data:n,loader:o}=Mi("query UserOverlaySlots(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n userInfo(id: $userInfoId) {\n ...FormsUsersInfosWished\n }\n }\n\n event(id: $eventId) {\n hasFormWithSlotDisplay\n }\n}\n",{organizationId:e.organizationId,eventId:e.eventId,userInfoId:e.userInfoId},[Yo.FormsUsersInfosWishedFragment]);const{permissions:[a],isLoading:s}=function(...e){return cC({withCaching:!0,checks:e})}(((...e)=>({name:"canUserInfoSlotsUpdateFn",args:e}))({eventId:e.eventId,userInfoId:e.userInfoId}));return(0,i.jsxs)(Eb,{returnToFallback:e.returnPathFallback,size:"md",children:[(0,i.jsx)(bC,{children:t("disponibilit_s_49923")}),(0,i.jsx)(Tb,{children:o||s?o:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(lE,{editPath:gf.EDIT_USER_SLOTS(e.organizationId,e.eventId,e.userInfoId),eventId:e.eventId,formsUsersInfos:n.organization.userInfo.formsUsersInfos,organizationId:e.organizationId,showEditButton:a}),(0,i.jsx)(oI,{height:"6"})]})})]})},uE=e=>{const{history:t,params:{organizationId:n}}=Hf();return(0,i.jsxs)(Is.dO,{children:[(0,i.jsx)(Is.qh,{path:e.accreditationsPanelPath,children:(0,i.jsx)(wC,{basePath:e.accreditationsPanelPath,canDeleteCheckedIn:e.canDeleteCheckedIn,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:e.canWishedAccreditationsEdit,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,delegationId:e.delegation?.id,eventId:e.eventId,organizationId:e.organizationId,volunteerRegistration:e.volunteerRegistration,onClose:()=>{e.reloadRow(),t.goBack(e.returnPathFallback)}})}),(0,i.jsx)(Is.qh,{path:e.availabilitiesPanelPath,children:(0,i.jsx)(cE,{delegationId:e.delegation?.id,eventId:e.eventId,organizationId:e.organizationId,returnPathFallback:e.availabilitiesPanelPath,userInfoId:e.volunteerRegistration.userInfo.id})}),e.informationPanelPath&&e.delegation&&(0,i.jsx)(Is.qh,{path:e.informationPanelPath,children:(0,i.jsx)(LC,{delegation:e.delegation,organizationId:n,returnPathFallback:e.informationPanelPath,userInfoId:e.volunteerRegistration.userInfo.id})}),(0,i.jsx)(Is.qh,{path:e.positionsPanelPath,children:(0,i.jsx)(eE,{basePath:e.positionsPanelPath,canCheckIn:e.canCheckIn,canDelete:e.canDeletePosition,eventId:e.eventId,organizationId:e.organizationId,volunteerRegistration:e.volunteerRegistration,onClose:()=>{e.reloadRow(),t.goBack(e.returnPathFallback)}})}),(e.teamsPanelsPath||[]).map((n,o)=>(0,i.jsx)(Is.qh,{path:n,children:(0,i.jsx)(dE,{eventId:e.eventId,teamCode:(e.volunteerRegistration.teams||[])[o].teamCode,onClose:()=>{e.reloadRow(),t.goBack(e.returnPathFallback)}})},o))]})},mE=R("span",{variants:{color:{inherit:{color:"inherit"},cyan:{color:"$cyan"},gray25:{color:"$gray25"},gray50:{color:"$gray50"},grayCustom50:{color:"$grayCustom50"},gray100:{color:"$gray100"},gray200:{color:"$gray200"},gray300:{color:"$gray300"},gray400:{color:"$gray400"},gray500:{color:"$gray500"},grayCustom500:{color:"$grayCustom500"},gray600:{color:"$gray600"},gray700:{color:"$gray700"},grayCustom700:{color:"$grayCustom700"},gray800:{color:"$gray800"},grayCustom800:{color:"$grayCustom800"},gray900:{color:"$gray900"},grayCustom900:{color:"$grayCustom900"},grayDark50:{color:"$grayDark50"},grayDark100:{color:"$grayDark100"},grayDark500:{color:"$grayDark500"},grayDark700:{color:"$grayDark700"},primary25:{color:"$primary25"},primary50:{color:"$primary50"},primary100:{color:"$primary100"},primary200:{color:"$primary200"},primary300:{color:"$primary300"},primary400:{color:"$primary400"},primary500:{color:"$primary500"},primaryCustom500:{color:"$primaryCustom500"},primary600:{color:"$primary600"},primaryCustom600:{color:"$primaryCustom600"},primary700:{color:"$primary700"},primary800:{color:"$primary800"},primary900:{color:"$primary900"},primary950:{color:"$primary950"},error25:{color:"$error25"},error50:{color:"$error50"},error100:{color:"$error100"},error200:{color:"$error200"},error300:{color:"$error300"},error400:{color:"$error400"},error500:{color:"$error500"},error600:{color:"$error600"},error700:{color:"$error700"},error800:{color:"$error800"},error900:{color:"$error900"},warning25:{color:"$warning25"},warning50:{color:"$warning50"},warning100:{color:"$warning100"},warning200:{color:"$warning200"},warning300:{color:"$warning300"},warning400:{color:"$warning400"},warning500:{color:"$warning500"},warning600:{color:"$warning600"},warning700:{color:"$warning700"},warning800:{color:"$warning800"},warning900:{color:"$warning900"},success25:{color:"$success25"},success50:{color:"$success50"},success100:{color:"$success100"},success200:{color:"$success200"},success300:{color:"$success300"},success400:{color:"$success400"},success500:{color:"$success500"},success600:{color:"$success600"},success700:{color:"$success700"},success800:{color:"$success800"},success900:{color:"$success900"},blue25:{color:"$blue25"},blue50:{color:"$blue50"},blue100:{color:"$blue100"},blue200:{color:"$blue200"},blue300:{color:"$blue300"},blue400:{color:"$blue400"},blue500:{color:"$blue500"},blue600:{color:"$blue600"},blue700:{color:"$blue700"},blue800:{color:"$blue800"},blue900:{color:"$blue900"},blueGray25:{color:"$blueGray25"},blueGray50:{color:"$blueGray50"},blueGray100:{color:"$blueGray100"},blueGray200:{color:"$blueGray200"},blueGray300:{color:"$blueGray300"},blueGray400:{color:"$blueGray400"},blueGray500:{color:"$blueGray500"},blueGray600:{color:"$blueGray600"},blueGray700:{color:"$blueGray700"},blueGray800:{color:"$blueGray800"},blueGray900:{color:"$blueGray900"},blueLight50:{color:"$blueLight50"},blueLight100:{color:"$blueLight100"},blueLight400:{color:"$blueLight400"},blueLight500:{color:"$blueLight500"},blueLight600:{color:"$blueLight600"},blueLight700:{color:"$blueLight700"},blueLight900:{color:"$blueLight900"},purple25:{color:"$purple25"},purple50:{color:"$purple50"},purple100:{color:"$purple100"},purple200:{color:"$purple200"},purple300:{color:"$purple300"},purple400:{color:"$purple400"},purple500:{color:"$purple500"},purple600:{color:"$purple600"},purple700:{color:"$purple700"},purple800:{color:"$purple800"},purple900:{color:"$purple900"},purpleLight50:{color:"$purpleLight50"},purpleLight100:{color:"$purpleLight100"},purpleLight500:{color:"$purpleLight500"},purpleLight700:{color:"$purpleLight700"},purpleDark50:{color:"$purpleDark50"},purpleDark100:{color:"$purpleDark100"},purpleDark500:{color:"$purpleDark500"},purpleDark700:{color:"$purpleDark700"},pink25:{color:"$pink25"},pink50:{color:"$pink50"},pink100:{color:"$pink100"},pink200:{color:"$pink200"},pink300:{color:"$pink300"},pink400:{color:"$pink400"},pink500:{color:"$pink500"},pink600:{color:"$pink600"},pink700:{color:"$pink700"},pink800:{color:"$pink800"},pink900:{color:"$pink900"},orange50:{color:"$orange50"},orange100:{color:"$orange100"},orange400:{color:"$orange400"},orange500:{color:"$orange500"},orange600:{color:"$orange600"},orange700:{color:"$orange700"},redLight50:{color:"$redLight50"},redLight100:{color:"$redLight100"},redLight500:{color:"$redLight500"},redLight700:{color:"$redLight700"},redDark50:{color:"$redDark50"},redDark100:{color:"$redDark100"},redDark500:{color:"$redDark500"},redDark700:{color:"$redDark700"},green50:{color:"$green50"},green100:{color:"$green100"},green500:{color:"$green500"},green700:{color:"$green700"},greenDark50:{color:"$greenDark50"},greenDark100:{color:"$greenDark100"},greenDark500:{color:"$greenDark500"},greenDark700:{color:"$greenDark700"},brown50:{color:"$brown50"},brown100:{color:"$brown100"},brown500:{color:"$brown500"},brown700:{color:"$brown700"},indigo100:{color:"$indigo100"},indigo600:{color:"$indigo600"},white:{color:"white"}},fontSize:{inherit:{fontSize:"inherit"},textXs:{fontSize:"$textXs"},textSm:{fontSize:"$textSm"},textMd:{fontSize:"$textMd"},textLg:{fontSize:"$textLg"},textXl:{fontSize:"$textXl"},displayXs:{fontSize:"$displayXs"},displaySm:{fontSize:"$displaySm"},displayMd:{fontSize:"$displayMd"},displayLg:{fontSize:"$displayLg"},displayXl:{fontSize:"$displayXl"},display2Xl:{fontSize:"$display2Xl"}},fontWeight:{inherit:{fontWeight:"inherit"},regular:{fontWeight:"$regular"},medium:{fontWeight:"$medium"},semiBold:{fontWeight:"$semiBold"},bold:{fontWeight:"$bold"}}},defaultVariants:{color:"inherit",fontSize:"inherit",fontWeight:"inherit"}}),gE=r.forwardRef((e,t)=>(0,i.jsx)(mE,{...(0,Ni.A)(e,"font"),...ki(e.font),ref:t,css:e.css}));gE.displayName="Span",Vo.IX.fromDateTimes(Vo.c9.fromObject({year:2026,month:5,day:22}).startOf("day"),Vo.c9.fromObject({year:2026,month:5,day:24}).endOf("day"));function hE(e){switch(e){case he.Animajeconvention:return"Animaje Convention";case he.Asoassignment:return"Fiche d'affectation ASO";case he.Hbcldc:return"Badge HBC Ligue des Champions";case he.Hbclnh:return"Badge HBC LNH";case he.P2nassignment:return"Fiche d'affectation P2N (Exploit)";case he.P2nassignmentmontagedemontage:return"Fiche d'affectation P2N (Montage/Démontage)";case he.Paris20km:return"Badge 20km de Paris";case he.Paris20kmassignment:return"Fiche d'affectation 20km de Paris";case he.Paris20kmcontremarque:return"Contremarque 20km de Paris";case he.Playground:return"Fiche d'affectation Playground";case he.T24assignment:return"Fiche d'affectation T24";default:return wr()}}Object.keys({cf25078:"Parcours",cf25079:"Plan village",cf25080:"Poste vélo",cf25511:"Poste course à pied",cf25512:"Plan d'accès"});const pE=e=>{const t=Oi(),[n,o]=r.useState(!1),a=r.useCallback(async()=>{let t=!0;return o(!0),await e.onDelete(),t&&o(!1),()=>{t=!1}},[e.onDelete,n,o]);return(0,i.jsxs)(Ty,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(G,{justify:"center",children:(0,i.jsx)(G,{align:"center",css:{background:"$error100",borderRadius:"48px",color:"$error600",height:"48px",fontSize:"20px",width:"48px"},justify:"center",children:(0,i.jsx)(_o,{icon:"circle-exclamation",iconStyle:"light"})})}),(0,i.jsx)(oI,{height:"5"}),(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray900 textLg regular",textAlign:"center",title:e.text,children:e.text}),"subtext"in e&&g(e.subtext).map((e,t)=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(oI,{height:"2"}),(0,i.jsx)(Li,{color:"gray500",textAlign:"center",children:e})]},t)),"children"in e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"2"}),(0,i.jsx)(Li,{color:"gray500",css:{alignSelf:"center"},children:e.children})]}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsxs)(G,{gap:"3",justify:"end",children:[(0,i.jsx)(jo,{color:"error",isLoading:n,onClick:a,children:e.buttonText}),(0,i.jsx)(jo,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]})},fE=e=>{const{translate:t,params:{eventId:n,delegationId:o}}=Hf(),{mutate:a}=function(e={}){return Di("mutation VolunteersRegistrationsMassDuplicate(\n $eventId: EventId!\n $delegationId: DelegationId\n $selecteds: MassActionSelectedsInput!\n $numberOfCopies: Int!\n) {\n numberOfCreatedMembers: volunteersRegistrationsMassDuplicate(\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n numberOfCopies: $numberOfCopies\n )\n}\n",e)}(),[s,d]=(0,r.useState)(1),[l,c]=(0,r.useState)(!1);return(0,i.jsx)(ko,{isOpen:!0,onClose:e.onClose,children:(0,i.jsxs)(No,{children:[(0,i.jsx)(Po,{icon:"clone",children:t("dupliquer_un_me_90016")}),(0,i.jsx)($o,{children:(0,i.jsx)(EI,{label:t("nombre_de_copie_37518"),min:1,shouldParseAsInt:!0,value:s,onChange:d})}),(0,i.jsx)(wo,{children:(0,i.jsx)(jo,{isLoading:l,onClick:async()=>{c(!0),await a({eventId:n,delegationId:o,selecteds:{ids:[e.userInfoId]},numberOfCopies:s}),e.onClose(),e.reload()},children:t("dupliquer_1_94438",e.name)})})]})})},IE=e=>{const{translate:t,params:{organizationId:n,eventId:o,delegationId:a}}=Hf(),{user:s}=ms(),{mutate:d}=Wa(),{mutate:l}=wa(),{mutate:c}=function(e={}){return Di("mutation VolunteersRegistrationsMassDelete(\n $eventId: EventId!\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: volunteersRegistrationsMassDelete(eventId: $eventId, selecteds: $selecteds)\n}\n",e)}(),[u,m]=(0,r.useState)(!1),[g,p]=(0,r.useState)(!1),[f,I]=(0,r.useState)(!1),_=(0,r.useMemo)(()=>e.customDocuments.filter(t=>Zh(t.populationsIds,e.member.fields.population)),[e.customDocuments,e.member]),y=o&&e.canMemberAccredit&&e.accreditationState===te.WaitingAccreditation,x=o&&e.showDocumentsDownload&&void 0!==e.member.links&&h(e.allowedCustomDocuments),S=x?e.allowedCustomDocuments.map((n,o)=>{const a=_.find(e=>e.slug===n);return a?(0,i.jsx)(H_,{download:`${e.member.nameOrEmail}-${a.name}`,icon:"arrow-down-to-bracket",target:"_blank",to:yg(e.member.links?.userCustomDocumentLinks[n],"pdf",{lang:s?.language}),children:t("t_l_charger_1_80752",a.name)},o):Pn.includes(n)?(0,i.jsx)(H_,{download:`${e.member.nameOrEmail}-custom-badge`,icon:"arrow-down-to-bracket",target:"_blank",to:yg(e.member.links?.userCustomBadgeLinks[n],"pdf",{lang:s?.language}),children:t("t_l_charger_1_80752",hE(n))},o):null}):[];return y||x||e.canDuplicate||e.canDelete||e.showDeleteFromEvent?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(FC,{children:[(0,i.jsx)(W_,{children:y?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(H_,{icon:"check",onClick:async()=>{await d({eventId:o,delegationId:a,selecteds:{ids:[e.member.id]}}),e.reload()},children:t("valider_les_acc_80801")}),(0,i.jsx)(H_,{icon:"badge-check",to:gf.ACCREDIT(n,o,e.member.id),children:t("accr_diter_70543")})]}):null}),(0,i.jsx)(W_,{children:S}),(0,i.jsxs)(W_,{children:[e.canDuplicate&&(0,i.jsx)(H_,{icon:"clone",onClick:()=>m(!0),children:t("dupliquer_28256")}),e.canDelete&&(0,i.jsx)(H_,{color:"red",icon:"user-xmark",onClick:()=>p(!0),children:t("retirer_de_la_d_64963")})]}),(0,i.jsx)(W_,{children:e.showDeleteFromEvent&&(0,i.jsx)(H_,{color:"red",icon:"trash-can",onClick:()=>I(!0),children:t("delete_from_eve_69290")})})]}),g&&(0,i.jsx)(pE,{buttonText:t("supprimer_43083"),subtext:[t("_tes_vous_sur_d_88752")],text:t("suppression_de_73669",e.member.nameOrEmail),onClose:()=>p(!1),onDelete:async()=>{await l({organizationId:n,eventId:o,delegationId:a,selecteds:{ids:[e.member.id]},deleteFromEvent:e.deleteFromEvent}),e.reload()}}),e.canDuplicate&&u&&(0,i.jsx)(fE,{name:e.member.nameOrEmail,reload:e.reload,userInfoId:e.member.id,onClose:()=>m(!1)}),f&&e.volunteerRegistrationId&&(0,i.jsx)(pE,{buttonText:t("supprimer_43083"),subtext:[t("are_you_sure_yo_46668")],text:t("suppression_de_73669",e.member.nameOrEmail),onClose:()=>I(!1),onDelete:async()=>{await c({eventId:o,selecteds:{ids:[e.member.id]}}),e.reload()}})]}):null},_E=(0,r.forwardRef)(({borderRadius:e,size:t,value:n,onChange:o,...a},s)=>{const d=(0,r.useMemo)(()=>e??4,[e]),l=(0,r.useMemo)(()=>t??24,[t]),c=(0,r.useMemo)(()=>(0,mx.A)(e=>{o(e)},500),[o]);return(0,i.jsx)(Li,{css:{background:n,borderRadius:`${d}px`,height:`${l}px`,overflow:"hidden",width:`${l}px`,"& input":{background:"transparent",border:"none",borderRadius:"$1",cursor:"pointer",height:`${l}px`,padding:"0",width:`${l}px`,"&::-webkit-color-swatch-wrapper":{padding:0},"&::-webkit-color-swatch":{borderRadius:"$1",border:"none"},"&::-moz-color-swatch":{border:"none"}}},children:(0,i.jsx)("input",{ref:s,type:"color",value:n,onChange:e=>{c(e.target.value)},...a})})});_E.displayName="ColorPicker";const yE=({onChange:e,css:t,label:n,description:o,value:a,hint:s,state:d,initialValue:l,icon:c,...u})=>{const m=Oi(),g=(0,r.useRef)(null),{inputId:h,descId:p,errorId:f}=SI();return(0,i.jsxs)(G,{css:t,direction:"column",width:1,children:[(0,i.jsx)(jI,{htmlFor:h,isClickable:!1,children:n}),(0,i.jsx)(vI,{id:p,children:o}),(n||o)&&(0,i.jsx)(oI,{height:"1"}),(0,i.jsxs)(CI,{cursor:"default",icon:c,state:d,onClick:()=>{g.current?.click()},children:[(0,i.jsxs)(G,{align:"center",css:{flex:"1"},height:1,children:[(0,i.jsx)(_E,{ref:g,"aria-describedby":o?p:void 0,"aria-errormessage":"error"===d?f:void 0,"aria-invalid":"error"===d,id:h,value:a,onChange:e,...u}),(0,i.jsx)(oI,{width:"3"}),(0,i.jsx)(Li,{"aria-hidden":!0,color:"gray800",css:{flex:"1","& input[type=text]":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},height:1,onClick:To,children:(0,i.jsx)("input",{disabled:"disabled"===d,id:h,type:"text",value:a,onChange:t=>{e(t.target.value)},...u})})]}),l&&a!==l&&(0,i.jsx)(jo,{color:"invisible",css:{color:"$primary500"},onClick:t=>{To(t),e(l)},children:m("remettre_sa_v_90478")})]}),(0,i.jsx)(bI,{id:f,state:d,children:s})]})},xE=({name:e,hint:t,state:n,...o})=>(0,i.jsx)(nI.D0,{name:e,render:a=>{const s=yI(a.meta);return(0,i.jsx)(yE,{hint:s?a.meta.error:t,name:e,state:s?"error":n,value:a.input.value,onChange:e=>{a.input.onChange(e)},...o})}}),SE=({value:e,onChange:t,...n})=>{const[o,a]=(0,r.useState)(e?.toString()??""),[s,d]=(0,r.useState)(e);return s!==e&&(a(e?.toString()??""),d(e)),(0,i.jsx)(EI,{value:o,onChange:e=>{const n=parseFloat(e);a(e),d(isNaN(n)?null:n),t(isNaN(n)?null:n)},...n})},vE=({name:e,hint:t,state:n,...o})=>(0,i.jsx)(nI.D0,{name:e,render:a=>{const s=yI(a.meta);return(0,i.jsx)(SE,{hint:s?a.meta.error:t,name:e,state:s?"error":n,value:a.input.value,onBlur:a.input.onBlur,onChange:a.input.onChange,onFocus:a.input.onFocus,...o})}}),bE=R("div",{alignItems:"center",borderRadius:"$1",color:"$gray600",cursor:"pointer",display:"flex",height:"40px",justifyContent:"center",width:"40px",variants:{active:{true:{background:"$primary100",color:"$primary500"},false:{"&:hover":{background:"$gray200",color:"$gray800"}}}}}),jE=({css:e,label:t,description:n,value:o,height:a,renderOnPortal:s,onChange:d,...l})=>{const c=Oi(),[u,m]=(0,r.useState)(!1),g=(0,r.useMemo)(()=>(0,vs.A)(qn.map(e=>({value:e,name:c(e)})),e=>e.name),[]);return(0,i.jsxs)(G,{css:e,direction:"column",width:1,children:[(0,i.jsx)(jI,{children:t}),(0,i.jsx)(vI,{children:n}),(t||n)&&(0,i.jsx)(oI,{height:"1"}),(0,i.jsxs)(F_,{isOpen:u,onStateChange:m,children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(CI,{cursor:"pointer",icon:Io(o),rightIcon:u?"chevron-up":"chevron-down",...l,children:(0,i.jsx)(Li,{css:{flex:"1"},children:c(o)})})}),(0,i.jsx)(K_,{maxHeight:300,placement:"bottom",renderOnPortal:s,width:"match",children:(0,i.jsx)(G,{css:{px:"$2"},gap:"2",width:1,wrap:"wrap",children:g.map(e=>(0,i.jsx)(bE,{active:o===e.value,onClick:()=>{m(!1),d(e.value)},children:(0,i.jsx)(_o,{icon:Io(e.value)})},e.value))})})]})]})},AE=({name:e,hint:t,state:n,...o})=>(0,i.jsx)(nI.D0,{name:e,render:a=>{const s=yI(a.meta);return(0,i.jsx)(jE,{hint:s?a.meta.error:t,name:e,state:s?"error":n,value:a.input.value,onBlur:a.input.onBlur,onChange:e=>{a.input.onChange(e)},onFocus:a.input.onFocus,...o})}});var CE=n(7785),EE=n(8790),TE=(n(1036),n(6585)),OE=n(2230),RE=n(2910),ME=n(456);u(["user","userRegistration","userDelegation","userDocuments","event","organization","delegation","recipient","invitedBy","assignments","accreditations"]);const DE=(e,t)=>{const n=document.createElement("span");return n.className=e,void 0!==t&&(n.textContent=t),n};class wE extends EE.k_1{static get pluginName(){return"VariablesMention"}static get requires(){return[EE.PXQ]}init(){const e=this.editor,t=e.commands.get("mention");this.listenTo(t,"execute",(t,n)=>{const i=n[0];if("{"!==i.marker)return;t.stop();const o=e.model,a=o.document.selection,s="string"==typeof i.mention?i.mention:i.mention.id;o.change(e=>{const t=new Map(a.getAttributes());t.delete("mention"),o.insertContent(e.createText(s,t),i.range??a.getFirstRange())})},{priority:"high"})}}const $E=P({".ck.ck-mentions":{maxWidth:"420px"},".ck.ck-mentions .ck-button.rich-editor-variable-item":{alignItems:"stretch",background:"transparent !important",borderRadius:"0 !important",boxShadow:"none !important",color:"$gray800 !important",cursor:"pointer",display:"flex",flexDirection:"column",padding:"0 !important",width:"100%"},".ck.ck-mentions .rich-editor-variable-item-group":{borderTop:"1px solid $gray100",color:"$gray500",cursor:"default",fontSize:"$textXs",fontWeight:"$semiBold",padding:"$2 $3 $1"},".ck.ck-mentions .ck-list__item:first-child .rich-editor-variable-item-group":{borderTop:"none"},".ck.ck-mentions .rich-editor-variable-item-row":{alignItems:"baseline",display:"flex",gap:"$4",justifyContent:"space-between",padding:"$2 $3"},".ck.ck-mentions .rich-editor-variable-item:hover .rich-editor-variable-item-row":{background:"$gray100"},".ck.ck-mentions .ck-mentions__item_focused .rich-editor-variable-item-row":{background:"$primary100",color:"$primary700"},".ck.ck-mentions .rich-editor-variable-item-label":{fontSize:"$textSm",whiteSpace:"nowrap"},".ck.ck-mentions .rich-editor-variable-item-key":{color:"$gray500",fontSize:"$textXs",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}),PE=({css:e,label:t,description:n,state:o,initialValue:a,onChange:s,onBlur:d,onFocus:l,hint:c,placeholder:u,value:m,variables:g,...h})=>{const{translate:p,params:{organizationId:f}}=Hf(),{language:I}=Ti(Ai),_=(0,r.useRef)(g),[x]=(0,r.useState)(void 0!==g);(0,r.useEffect)(()=>{_.current=g},[g]),x&&$E();const S=(0,r.useMemo)(()=>[{color:"white",label:p("blanc_36425")},{color:M.colors.gray800.value,label:p("gris_fonc_51159")},{color:M.colors.gray400.value,label:p("gris_clair_52465")},{color:M.colors.primary900.value,label:p("bleu_fonc_40491")},{color:M.colors.primary500.value,label:p("bleu_41949")},{color:M.colors.error700.value,label:p("rouge_fonc_45023")},{color:M.colors.error500.value,label:p("rouge_75079")},{color:M.colors.warning300.value,label:p("jaune_53503")},{color:M.colors.warning600.value,label:p("orange_64132")},{color:M.colors.success700.value,label:p("vert_fonc_37265")},{color:M.colors.success500.value,label:p("vert_27018")},{color:M.colors.purple700.value,label:p("violet_fonc_77270")},{color:M.colors.purple500.value,label:p("violet_54005")},{color:M.colors.pink700.value,label:p("rose_fonc_98996")},{color:M.colors.pink500.value,label:p("rose_49360")}],[]);return(0,i.jsxs)(G,{css:e,direction:"column",width:1,children:[(0,i.jsx)(jI,{children:t}),(0,i.jsx)(vI,{children:n}),(t||n)&&(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{css:{"--ck-border-radius":"$radii$1","--ck-color-toolbar-background":"$colors$gray100","& .ck.ck-toolbar":{borderColor:"error"===o?"$error500":"$gray300",borderBottom:"none","& .ck.ck-toolbar__separator":{background:"$gray200"},"& .ck.ck-button":{color:"$gray600","&:hover":{background:"$gray200",color:"$gray800",cursor:"pointer"},"&.ck-on, &.ck-on:hover:not(.ck-disabled)":{background:"$primary100",color:"$primary500"}}},"& .ck.ck-content":{borderColor:"error"===o?"$error500 !important":"$gray300 !important",borderStyle:"solid",borderWidth:"1px",borderTop:"none !important",color:"$gray800",minHeight:"100px",px:"$3","&.ck-editor__editable.ck-focused":{boxShadow:"none"},"& p.h-small":{fontSize:"12px"}},"& .ck.ck-editor__editable > .ck-placeholder::before":{color:"$gray500"},...D_("& .ck.ck-content")},width:1,children:(0,i.jsx)(CE.aF,{config:{licenseKey:"GPL",plugins:[EE.C1k,EE.Y0,EE.yN4,EE.uwK,EE.LcX,EE.rwA,EE.DZT,EE._V3,EE.uXn,EE.BRX,EE.J20,EE.N_E,EE.B8B,EE.PXQ,EE.fzL,EE.fTX,EE.z2z,...x?[wE]:[]],mention:x?{feeds:[{marker:"{",dropdownLimit:Number.MAX_SAFE_INTEGER,feed:e=>function(e){return e.map((t,n)=>({id:`{${t.key}}`,text:`{${t.key}}`,variable:t,isFirstOfGroup:0===n||e[n-1].group!==t.group}))}(function(e,t){const n=y(t).split(/\s+/).filter(e=>e.length>0);return t.includes("}")?[]:0===n.length?e:e.filter(e=>{const t=y(`${e.label} ${e.groupLabel} ${e.key}`);return n.every(e=>t.includes(e))})}(_.current??[],e)),itemRenderer:e=>function(e){const t=DE("rich-editor-variable-item"),n=DE("rich-editor-variable-item-row");return e.isFirstOfGroup&&t.append(DE("rich-editor-variable-item-group",e.variable.groupLabel)),n.append(DE("rich-editor-variable-item-label",e.variable.label),DE("rich-editor-variable-item-key",e.variable.key)),t.append(n),t}(e)}]}:void 0,translations:[TE.A,OE.A,RE.A,ME.A],placeholder:u,fontColor:{colors:S},fontBackgroundColor:{colors:S},language:I.toString().toLowerCase(),simpleUpload:{uploadUrl:`${lo.HEAVENT_API_URL}/image/upload?organizationId=${f}`},heading:{options:[{model:"headingParagraphSmall",view:{name:"p",classes:"h-small"},title:p("paragraphe_pet_01073"),class:"ck-heading_paragraph_small",converterPriority:"high"},{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading2"}]},toolbar:{items:["bold","italic","underline","|","heading","fontColor","fontBackgroundColor","alignment","|","blockQuote","bulletedList","numberedList","|","link","imageUpload","|","undo","redo"],shouldNotGroupWhenFull:!0}},data:a,editor:EE.aRV,onBlur:()=>{d?.()},onChange:(e,t)=>{s(t.getData())},onFocus:()=>{l?.()},...h})}),(0,i.jsx)(bI,{state:o,children:c})]})},NE=({name:e,hint:t,state:n,...o})=>(0,i.jsx)(nI.D0,{name:e,parse:_I.A,render:a=>{const s=yI(a.meta);return(0,i.jsx)(PE,{hint:s?a.meta.error:t,initialValue:a.input.value,name:e,state:s?"error":n,onChange:e=>{a.input.onChange(e)},...o})}}),kE=e=>{const{translate:t,params:{organizationId:n}}=Hf(),o=Ti(Vr),a=Ti(sl),s=sS(e.customField),d=(0,r.useMemo)(()=>Ii.filter(e=>e!==en.Error),[]);if((0,r.useEffect)(()=>{e.slug===H.Acronym||e.slug===H.Address||e.slug===H.Color||e.slug===H.Description||e.slug===H.Icon||e.slug===H.Name||e.slug===dt.Acronym||e.slug===dt.Address||e.slug===dt.Color||e.slug===dt.Description||e.slug===dt.Icon||e.slug===dt.Name||e.slug===ye.Description||e.slug===ye.Name||e.customField?.fieldType===Fe.Address||e.customField?.fieldType===Fe.Country||e.customField?.fieldType===Fe.Language||e.customField?.fieldType===Fe.Nationality||e.customField?.fieldType===Fe.Sex||e.customField?.fieldType===Fe.Text||e.customField?.fieldType===Fe.Textarea||e.customField?.fieldType===Fe.Time?"string"!=typeof e.value&&e.change(e.name,""):e.slug===H.AutoAccredit||e.slug===H.WeezeventIsSynchronized||e.slug===fe.Privacy||e.slug===ye.IsLocked||e.slug===ye.ShowInDelegationSpace||e.slug===ye.CanLeadersAddMembers||e.slug===ye.CanLeadersEditCustomFields||e.slug===ye.CanLeadersEditMembers||e.slug===ye.CanLeadersDeleteMembers||e.slug===ye.CanLeadersDuplicateMembers||e.slug===ye.CanLeadersEditColumns||e.slug===ye.CanLeadersImportMembers||e.slug===ye.CanLeadersSeeHiddenAccreditationsSlots||e.slug===ye.ShowAllAccreditations||e.slug===ye.ShowFormLinkInDelegationSpace||e.slug===dt.WeezeventIsSynchronized||e.customField?.fieldType===Fe.Checkbox||e.customField?.fieldType===Fe.Validation?"boolean"!=typeof e.value&&e.change(e.name,!1):e.slug===H.Category||e.slug===ye.Category||e.slug===dt.Category?"number"!=typeof e.value&&e.change(e.name,e.categories[0]?.id):e.slug===H.Index||e.slug===H.Latitude||e.slug===H.Longitude||e.slug===dt.Latitude||e.slug===dt.Longitude||e.slug===dt.Zoom||e.slug===ye.MaxResources||e.customField?.fieldType===Fe.Number?"number"!=typeof e.value&&e.change(e.name,0):e.slug===H.Tag||e.slug===dt.Tag||e.slug===ye.Campaigns||e.slug===ye.Documents||e.slug===ye.Tag||e.slug===dt.Traces?Array.isArray(e.value)||e.change(e.name,[]):e.slug===ye.DeadlineDate||e.customField?.fieldType===Fe.Date||e.customField?.fieldType===Fe.Datetime?Vo.c9.isDateTime(e.value)||v(e.value)||e.change(e.name,Vo.c9.invalid("Invalid")):e.customField?.fieldType===Fe.File?null!==e.value&&"object"==typeof e.value||e.change(e.name,o.documentInputDefault()):e.customField?.fieldType===Fe.Phone?null!==e.value&&"object"==typeof e.value||e.change(e.name,a.basePhoneInputDefault()):e.customField?.fieldType===Fe.Select?e.customField.canSelectMultiple&&!Array.isArray(e.value)?e.change(e.name,[]):e.customField.canSelectMultiple||"number"==typeof e.value||e.change(e.name,""):e.slug===ye.Form?"number"!=typeof e.value&&e.change("massEdit.value",e.forms[0].id):e.slug===ye.DelegationsSpaceLayout?"number"!=typeof e.value&&h(e.delegationsSpaceLayouts)&&e.change("massEdit.value",e.delegationsSpaceLayouts[0].id):e.slug===dt.Layer?Kn.includes(e.value)||e.change("massEdit.value",et.Google):e.slug===Qt.State?d.includes(e.value)||e.change("massEdit.value",d[0]):e.slug===Qt.Frequency&&(hi.includes(e.value)||e.change("massEdit.value",Zt.Every10Minutes))},[e.customField,e.slug]),e.slug===H.Acronym||e.slug===dt.Acronym||e.slug===H.Address||e.slug===dt.Address||e.customField?.fieldType===Fe.Address||e.customField?.fieldType===Fe.Text)return(0,i.jsx)(TI,{name:e.name});if(e.slug===H.AutoAccredit||e.slug===H.WeezeventIsSynchronized||e.slug===ye.IsLocked||e.slug===ye.ShowFormLinkInDelegationSpace||e.slug===ye.ShowInDelegationSpace||e.slug===ye.CanLeadersAddMembers||e.slug===ye.CanLeadersEditCustomFields||e.slug===ye.CanLeadersEditMembers||e.slug===ye.CanLeadersDeleteMembers||e.slug===ye.CanLeadersDuplicateMembers||e.slug===ye.CanLeadersEditColumns||e.slug===ye.CanLeadersImportMembers||e.slug===ye.CanLeadersSeeHiddenAccreditationsSlots||e.slug===ye.ShowAllAccreditations||e.slug===dt.WeezeventIsSynchronized||e.customField?.fieldType===Fe.Checkbox||e.customField?.fieldType===Fe.Validation)return(0,i.jsxs)(nS,{name:e.name,shouldParseAsBoolean:!0,children:[(0,i.jsx)("option",{value:"true",children:t("oui_54361")}),(0,i.jsx)("option",{value:"false",children:t("non_33516")})]});if(e.slug===fe.Privacy)return(0,i.jsxs)(nS,{name:e.name,shouldParseAsBoolean:!0,children:[(0,i.jsx)("option",{value:"true",children:t("Private")}),(0,i.jsx)("option",{value:"false",children:t("Public")})]});if(e.slug===H.Category||e.slug===ye.Category||e.slug===dt.Category)return(0,i.jsx)(Xx,{isSearchVisible:!0,name:e.name,children:e.categories.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))});if(e.slug===H.Color||e.slug===dt.Color)return(0,i.jsx)(xE,{name:e.name});if(e.slug===H.Description||e.slug===ye.Description||e.slug===dt.Description)return(0,i.jsx)(Li,{css:{overflow:"hidden auto"},width:1,children:(0,i.jsx)(NE,{name:e.name})});if(e.slug===H.Icon||e.slug===dt.Icon)return(0,i.jsx)(AE,{name:e.name});if(e.slug===H.Latitude||e.slug===dt.Latitude)return(0,i.jsx)(vE,{name:e.name});if(e.slug===H.Longitude||e.slug===dt.Longitude)return(0,i.jsx)(vE,{name:e.name});if(e.slug===H.Name||e.slug===dt.Name||e.slug===Qt.Name)throw new Error("Should not happen");return e.slug===Qt.State?(0,i.jsx)(nS,{name:e.name,children:d.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))}):e.slug===Qt.Frequency?(0,i.jsx)(nS,{name:e.name,children:hi.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))}):e.slug===ye.Campaigns?(0,i.jsx)(Xx,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.campaigns.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===ye.Documents?(0,i.jsx)(Xx,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.customDocuments.map(e=>(0,i.jsx)("option",{value:e.slug,children:e.name},e.slug))}):e.slug===H.Tag||e.slug===dt.Tag||e.slug===ye.Tag?(0,i.jsx)(Xx,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.tags.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===dt.Traces?(0,i.jsx)(Xx,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.traces.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===H.Index||e.slug===ye.MaxResources||e.slug===dt.Zoom||e.customField?.fieldType===Fe.Number?(0,i.jsx)(TI,{name:e.name,shouldParseAsInt:!0}):e.customField?.fieldType===Fe.Country?(0,i.jsx)(Xx,{isSearchVisible:!0,name:e.name,children:s}):e.slug===ye.DeadlineDate||e.customField?.fieldType===Fe.Date?(0,i.jsx)(ex,{name:e.name}):e.customField?.fieldType===Fe.Datetime?(0,i.jsx)(nx,{name:e.name}):e.customField?.fieldType===Fe.File?e.customField.fileType===Be.Picture?(0,i.jsx)(Nx,{allowCrop:!0,organizationId:n,prefix:`${e.name}.`}):(0,i.jsx)(Dx,{accept:[ax.Images,ax.Pdf],acl:"private",organizationId:n,prefix:`${e.name}.`}):e.customField?.fieldType===Fe.Language?(0,i.jsxs)(nS,{name:e.name,children:[(0,i.jsx)("option",{value:"",children:t("s_lectionnez_un_31086")}),s]}):e.customField?.fieldType===Fe.Nationality?(0,i.jsx)(Xx,{isSearchVisible:!0,name:e.name,children:s}):e.customField?.fieldType===Fe.Phone?(0,i.jsx)(Fx,{prefix:`${e.name}.`}):e.customField?.fieldType===Fe.Select?e.customField.canSelectMultiple?(0,i.jsx)(Xx,{isSearchVisible:!0,multiple:!0,name:e.name,children:s}):(0,i.jsx)(Xx,{isSearchVisible:!0,name:e.name,placeholder:t("s_lectionnez_un_44130"),children:s}):e.customField?.fieldType===Fe.Sex?(0,i.jsxs)(nS,{name:e.name,children:[(0,i.jsx)("option",{value:"",children:t("s_lectionnez_un_43620")}),s]}):e.customField?.fieldType===Fe.Textarea?(0,i.jsx)(oS,{name:e.name}):e.customField?.fieldType===Fe.Time?(0,i.jsx)(ox,{name:e.name}):e.slug===ye.Form?(0,i.jsx)(Xx,{isSearchVisible:!0,multiple:!1,name:"massEdit.value",children:e.forms.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===ye.DelegationsSpaceLayout?(0,i.jsx)(Xx,{isSearchVisible:!0,multiple:!1,name:"massEdit.value",children:e.delegationsSpaceLayouts.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===dt.Layer?(0,i.jsxs)(nS,{name:e.name,children:[(0,i.jsx)("option",{value:et.Google,children:"Plan"}),(0,i.jsx)("option",{value:et.GoogleSatellite,children:"Satellite"}),(0,i.jsx)("option",{value:et.IgnPlan,children:"IGN Plan"})]}):null},zE=({displayName:e,isAddDeleteVisible:t,isResetVisible:n,massEditFieldInput:o,reset:a,strategy:s,change:r})=>{const{translate:d}=Hf();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(Li,{font:"gray700 textSm medium",children:d("que_souhaitez_v_87607")}),(0,i.jsx)(oI,{height:"2"}),(0,i.jsx)(by,{state:a||s!==tt.Replace?"unchecked":"checked",onClick:()=>{r("massEdit.reset",!1),r("massEdit.strategy",tt.Replace)},children:d("remplacer_les_v_78885")}),!a&&s===tt.Replace&&o,(0,i.jsx)(oI,{height:"3"}),t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(by,{state:a||s!==tt.Add?"unchecked":"checked",onClick:()=>{r("massEdit.reset",!1),r("massEdit.strategy",tt.Add)},children:d("ajouter_des_val_80159")}),!a&&s===tt.Add&&o,(0,i.jsx)(oI,{height:"3"}),(0,i.jsx)(by,{state:a||s!==tt.Delete?"unchecked":"checked",onClick:()=>{r("massEdit.reset",!1),r("massEdit.strategy",tt.Delete)},children:d("supprimer_des_v_96120")}),!a&&s===tt.Delete&&o,(0,i.jsx)(oI,{height:"3"})]}),n&&(0,i.jsx)(by,{state:a?"checked":"unchecked",onClick:()=>r("massEdit.reset",!0),children:d("r_initialiser_42983",e)})]})},LE=e=>{const t=Oi(),n=Ti(Wl),o=(0,r.useMemo)(()=>(0,vs.A)(e.customFields??[],e=>e.name.toLowerCase()),[e.customFields]),a=(0,r.useMemo)(()=>(0,vs.A)([...o.map(e=>({slug:e.slug,name:e.name,label:e.label})),...e.properties.map(e=>({slug:e,name:t(e),label:null}))],e=>e.name.toLowerCase()),[o,e.properties]);return(0,i.jsx)(Ty,{size:"md",onClose:e.onClose,children:(0,i.jsx)(nI.lV,{initialValues:{massEdit:{reset:!1,selecteds:e.selecteds,slug:"",value:"",strategy:tt.Replace}},initialValuesEqual:vl.A,render:({form:n,handleSubmit:s,submitting:r,values:d})=>{const{reset:l,slug:c,strategy:u}=d.massEdit,m=a.find(e=>e.slug===c),g=o.find(e=>e.slug===c),h=v(c)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{css:{paddingLeft:"$6"},children:(0,i.jsx)(kE,{campaigns:e.campaigns,categories:e.categories,change:n.change,customDocuments:e.customDocuments,customField:g,delegationsSpaceLayouts:e.delegationsSpaceLayouts,forms:e.forms,name:"massEdit.value",slug:c,tags:e.tags,traces:e.traces,value:d.massEdit.value})})]}):null,p=c===H.Tag||c===ye.Campaigns||c===ye.Documents||!0===g?.canSelectMultiple,f=c!==H.Category&&c!==fe.Category&&c!==ye.Category&&c!==dt.Category&&c!==dt.Layer&&c!==dt.Zoom&&c!==H.WeezeventIsSynchronized&&c!==fe.Privacy&&c!==ye.Form&&c!==ye.IsLocked&&c!==ye.ShowFormLinkInDelegationSpace&&c!==ye.ShowInDelegationSpace&&c!==ye.CanLeadersAddMembers&&c!==ye.CanLeadersEditCustomFields&&c!==ye.CanLeadersEditMembers&&c!==ye.CanLeadersDeleteMembers&&c!==ye.CanLeadersDuplicateMembers&&c!==ye.CanLeadersEditColumns&&c!==ye.CanLeadersImportMembers&&c!==ye.CanLeadersSeeHiddenAccreditationsSlots&&c!==ye.ShowAllAccreditations&&c!==dt.WeezeventIsSynchronized&&c!==Qt.Frequency&&c!==Qt.State;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(G,{justify:"center",children:(0,i.jsx)(jy,{color:"primary",icon:"sliders"})}),(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(Li,{color:"gray900",fontSize:"textLg",fontWeight:"medium",textAlign:"center",children:t("_dition_de_la_v_67585")}),(0,i.jsx)(oI,{height:"7"}),e.isLoading?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(UI,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(UI,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(Xx,{isSearchVisible:!0,label:t("quel_est_le_cha_81138"),name:"massEdit.slug",placeholder:t("s_lectionnez_un_82446"),children:a.map(e=>{return(0,i.jsx)("option",{value:e.slug,children:(t=e,v(t.label)?`${t.name} (${t.label})`:t.name)},e.slug);var t})}),m&&(0,i.jsx)(zE,{change:n.change,displayName:m.name,isAddDeleteVisible:p,isResetVisible:f,massEditFieldInput:h,reset:l,strategy:u}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsxs)(G,{gap:"3",justify:"end",children:[(0,i.jsx)(jo,{disabled:(I=d.massEdit,_=g,!(I.reset||!_||_.fieldType!==Fe.Select||_.canSelectMultiple||"number"==typeof I.value&&!isNaN(I.value))),isLoading:r,onClick:s,children:t("modifier_la_val_07602")}),(0,i.jsx)(jo,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]});var I,_},validate:e=>{const t=o.find(t=>t.slug===e.massEdit.slug),i=t&&!e.massEdit.reset?n.getValidationRuleError(t,e.massEdit.value):null;return i?{massEdit:{value:i}}:{}},onSubmit:async t=>{const n=(await e.mutate(t.massEdit)).numberOfEdited;e.onSuccess(n),e.onClose()}})})},FE=e=>(0,i.jsx)(LE,{campaigns:[],categories:[],customDocuments:[],customFields:e.customFields,delegationsSpaceLayouts:[],forms:[],isLoading:!1,mutate:e.mutate,properties:m,selecteds:e.selecteds,tags:[],traces:[],onClose:e.onClose,onSuccess:e.onSuccess}),UE=R("div",{margin:"auto",width:"$containerTablet","@desktop":{width:"$container"}}),BE=r.forwardRef((e,t)=>(0,i.jsx)(Li,{ref:t,css:{background:"$gray50",overflowX:"hidden",overflowY:"auto",py:"$10",...e.css},height:1,width:1,children:(0,i.jsx)(UE,{children:e.children})}));BE.displayName="CenteredContainer";const GE=e=>(0,i.jsx)(G,{as:"legend",css:{position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",width:"1px",height:"1px",whiteSpace:"nowrap"},direction:"column",children:e.heading});var VE;!function(e){e.Dark="dark",e.Normal="normal"}(VE||(VE={}));const WE=({canSelect:e,centerHeader:t,children:n,disabled:o,footerActions:a,heading:s,header:d,headerStyle:l=VE.Normal,headerActions:c,hideHeader:u,initialIsOpen:m,isCompleted:g,isOpen:h,isToggleable:p,onSelect:f,onToggle:I,stepNumber:_,subtitle:y,...x})=>{const S=Oi(),{descId:v}=SI(),[b,j]=r.useState(m??!0),A=p?b:h,C=l===VE.Dark;return(0,i.jsx)(Yy.Provider,{value:{isDisabled:o},children:(0,i.jsx)(R_,{"aria-describedby":v,as:"fieldset",css:{borderRadius:C?"$1":void 0,overflow:"hidden","&:disabled :is(input, select, textarea, datalist, button)":{cursor:"not-allowed !important"},...x.css},direction:"column",disabled:o,footer:!1!==A&&a,header:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(GE,{heading:s}),!u&&(0,i.jsxs)(G,{align:"center",as:"header",css:C?{background:A?"$gray900":"white",blockSize:"64px",cursor:e&&!A?"pointer":"default",padding:"$6 $6 $5 $6"}:t?{padding:"$7 $7 0 $7",textAlign:"center"}:!1!==A?{borderBlockEnd:"1px solid $gray200",padding:"$6 $7 $5 $7"}:{padding:"$6 $7"},gap:"3",onClick:f,children:[C&&(0,i.jsx)(G,{align:"center",css:{background:g?"$success200":"white",border:g?"none":"1px solid $gray200",borderRadius:"32px",color:g?"$success700":"$gray800",fontWeight:"$medium"},height:32,justify:"center",width:32,children:g?(0,i.jsx)(_o,{icon:"check"}):_}),(0,i.jsxs)(Li,{css:{flex:"1"},children:[s&&(0,i.jsx)(dI,{"aria-hidden":"true",css:C?A?{color:"white"}:void 0:{fontWeight:"$semiBold"},children:s}),y&&(0,i.jsx)(W,{color:C?A?"white":"gray800":void 0,id:v,textStyle:"subtitle",children:y})]}),c&&(0,i.jsx)(G,{gap:"4",justify:"end",children:c}),p&&(0,i.jsx)(Ly,{label:S("toggle_section_92160"),size:"md",value:b,onChange:e=>{j(e),I?.(e)}})]})]}),...x,children:!1!==A&&(0,i.jsx)(G,{css:{"&:has(> fieldset.fieldset--column)":{gap:"$9"}},direction:"column",children:n})})})},qE=e=>(0,i.jsx)(fI,{direction:"column",formRenderProps:e.formRenderProps,render:e.render}),YE=e=>{const{translate:t}=Hf(),[n,o]=r.useState(!1),[a,s]=r.useState(0),d=Ti(Zg),l=r.Children.toArray(e.children),[c,u]=r.useState(!1);return c?(0,i.jsx)(WE,{heading:t("r_capitulaif_76565"),children:e.summaryStep}):(0,i.jsx)(nI.lV,{initialValues:e.initialValues,initialValuesEqual:vl.A,mutators:{...tI.A,forceErrors:pI},render:t=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(nI.Pc,{subscription:{dirtyFields:!0},children:({dirtyFields:e})=>Object.keys(e).map((e,t)=>(0,i.jsx)(nI.D0,{name:e,render:()=>null,subscription:{}},t))}),l.map((d,l)=>{const c=a>=l||e.isEdit&&t.valid;if("string"==typeof d||"number"==typeof d||"boolean"==typeof d||!("props"in d))throw new Error("Invalid step passed to wizard");return(0,i.jsxs)(iI.Provider,{value:{formRenderProps:t,showErrors:n,setShowErrors:o},children:[(0,i.jsx)(WE,{canSelect:c,footerActions:d.props.actions?.(t),headerStyle:VE.Dark,heading:d.props.heading,isCompleted:a>l,isOpen:a===l,stepNumber:l+1,onSelect:()=>{c&&(o(!1),s(l))},children:r.cloneElement(d,{formRenderProps:t})}),(0,i.jsx)(oI,{height:"6"})]},l)})]}),validate:e=>d.validateForForm(l[a].props.schema)(e),onSubmit:async(t,n)=>{if(a===l.length-1){const i=await e.onSubmit(t,n);return i?(o(!0),e.containerRef&&e.containerRef.current&&(e.containerRef.current.scrollIntoView(),e.containerRef.current.scrollTop=0),i):void u(!0)}return o(!1),void s(a+1)}})},HE=e=>(0,Oo.createPortal)((0,i.jsx)(Li,{css:{background:"white",left:"0",position:"absolute",top:"0",zIndex:"50",...e.css},height:1,width:1,children:e.children}),document.body),ZE=e=>(0,i.jsx)(nI.D0,{name:e.name,render:t=>{const n=t.input.checked?"checked":"unchecked";return(0,i.jsx)(by,{disabled:e.disabled,size:e.size,state:n,subtext:e.subtext,onClick:()=>{t.input.onChange(e.value)},children:e.children})},type:"radio",value:e.value}),KE=({children:e,handleSubmit:t,nextText:n,prefix:o,strategies:a})=>{const s=Oi();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Li,{font:"gray900 textSm medium",children:s("que_souhaitez_v_87607")}),a.map(({label:e,value:t})=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(oI,{height:"3"}),(0,i.jsx)(ZE,{name:`${o}strategy`,value:t,children:e})]},t)),e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"6"}),e]}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{onClick:t,children:n})})]})},QE=e=>{const t=Oi();return(0,i.jsx)(KE,{handleSubmit:e.handleSubmit,nextText:t("suivant_accr_25709"),prefix:"massAccredit.",strategies:[{label:t("ajouter_des_acc_17744"),value:tt.Add},{label:t("remplacer_les_a_92733"),value:tt.Replace},{label:t("supprimer_des_a_04246"),value:tt.Delete}]})};function XE(e,t=500){const[n,i]=(0,r.useState)(e),[o,a]=(0,r.useState)(e),s=Uj(e=>{a(e)},t);return[n,o,e=>{i(e),s(e)}]}const JE=e=>{const{translate:t}=Hf(),n=Ti(fm),o=(0,r.useMemo)(()=>oy(e.accreditation),[e.accreditation]),a=(0,r.useMemo)(()=>e.das?.assignedResources??e.slot.assignedResources,[e.das,e.slot]),s=(0,r.useMemo)(()=>e.das?.maxResources??e.slot.maxResources,[e.das,e.slot]),d=e.accreditationsSlotsIds.includes(e.slot.id)?"checked":"unchecked";return(0,i.jsxs)(G,{align:"center",css:{background:"white",bd:!0,cursor:"pointer",px:"$4",userSelect:"none"},gap:"2",height:64,onClick:()=>{e.onClick(e.slot.id,"unchecked"===d)},children:[(0,i.jsx)(Ky,{shouldPreventDefault:!1,state:d,onClick:RI.A}),(0,i.jsx)(yy,{color:e.accreditation.color,icon:e.accreditation.icon}),(0,i.jsx)(Li,{css:{flex:"1"},font:"gray800 textSm semiBold",children:o}),(0,i.jsx)(G,{css:{px:"$3"},width:310,children:(0,i.jsx)(My,{color:a>=(s||1/0)?"success":"warning",leftIcon:"user-group",children:t("_1_2_membres_04485",a,n.toNumberOrInfinity(s))})})]})},eT=e=>{const t=Oi(),n=Ti(jl),o=Ti(fm),a=(0,r.useMemo)(()=>e.das?.assignedResources??e.slot.assignedResources,[e.das,e.slot]),s=(0,r.useMemo)(()=>e.das?.maxResources??e.slot.maxResources,[e.das,e.slot]),d=e.accreditationsSlotsIds.includes(e.slot.id)?"checked":"unchecked";return(0,i.jsxs)(jv,{css:{cursor:"pointer"},onClick:()=>{e.onClick(e.slot.id,"unchecked"===d)},children:[(0,i.jsx)(yv,{justify:"center",width:48,children:e.shouldDisplayList?(0,i.jsx)(Ky,{shouldPreventDefault:!1,state:d,onClick:RI.A}):(0,i.jsx)(vy,{shouldPreventDefault:!1,state:d,onClick:RI.A})}),(0,i.jsx)(yv,{children:v(e.slot.name)?e.slot.name:"-"}),(0,i.jsx)(yv,{children:e.slot.date?.isValid?n.toLocaleString(e.slot.date,oa.DateOnly.WeekdayLongMonthLong):"-"}),(0,i.jsx)(yv,{children:(0,i.jsx)(My,{color:a>=(s||1/0)?"success":"warning",leftIcon:"user-group",children:t("_1_2_membres_04485",a,o.toNumberOrInfinity(s))})})]})},tT=e=>{const t=Oi(),n=(0,r.useMemo)(()=>(0,vs.A)(e.slots.filter(t=>t.accreditation.id===e.accreditation.id),e=>(0,bs.A)([e.date?.toMillis(),e.name.toLowerCase()])),[e.slots,e.accreditation]),o=(0,r.useMemo)(()=>n.map(e=>e.id),[n]),a=(0,r.useMemo)(()=>Object.fromEntries(e.delegationAccreditationsSlots.map(e=>[e.accreditationSlotId,e])),[e.delegationAccreditationsSlots]),s=(0,r.useMemo)(()=>{const t=(0,bl.A)(e.accreditationsSlotsIds,o);return t.length===o.length?"checked":0===t.length?"unchecked":"indeterminate"},[o,e.accreditationsSlotsIds]),d=(0,r.useCallback)((t,n)=>{if(e.accreditation.accreditationDisplay===Y.Radio){const i=(0,vg.A)(e.accreditationsSlotsIds,o).concat(n?[t]:[]);e.change("massAccredit.accreditationsSlotsIds",i)}else e.change("massAccredit.accreditationsSlotsIds",f(e.accreditationsSlotsIds,t,n))},[e.accreditation,e.accreditationsSlotsIds,e.change,o]),l=(0,r.useCallback)(t=>{e.change("massAccredit.accreditationsSlotsIds",t)},[e.change]),c=e.accreditation.accreditationDisplay===Y.List||e.strategy===tt.Delete;return e.accreditation.hasSlots?(0,i.jsx)(xy,{accreditation:e.accreditation,displayNumberOfSlots:!0,displaySlots:!0,numberOfSlots:n.length,children:e.accreditation.accreditationDisplay===Y.Calendar?(0,i.jsx)(G,{css:{background:"$gray50",padding:"$4"},children:(0,i.jsx)(hS,{accreditationsSlotsIds:e.accreditationsSlotsIds,slots:n,onChange:l})}):(0,i.jsxs)(Av,{hideBorder:!0,children:[(0,i.jsxs)(Sv,{children:[(0,i.jsx)(xv,{justify:"center",width:48,children:c&&(0,i.jsx)(Ky,{state:s,onClick:t=>{"checked"===t?e.change("massAccredit.accreditationsSlotsIds",(0,qo.A)(e.accreditationsSlotsIds.concat(o))):e.change("massAccredit.accreditationsSlotsIds",(0,vg.A)(e.accreditationsSlotsIds,o))}})}),(0,i.jsx)(xv,{children:t("nom_du_cr_neau_54351")}),(0,i.jsx)(xv,{children:t("date_du_cr_neau_82295")}),(0,i.jsx)(xv,{})]}),n.map(t=>(0,i.jsx)(eT,{accreditationsSlotsIds:e.accreditationsSlotsIds,das:a[t.id]??null,shouldDisplayList:c,slot:t,onClick:d},t.id))]})}):(0,i.jsx)(JE,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,das:a[n[0].id]??null,slot:n[0],onClick:d})},nT=e=>{const t=(0,r.useMemo)(()=>dy(e.accreditations.filter(t=>t.accreditationCategoryId===e.category.id)),[e.accreditations,e.category]);return(0,i.jsx)(By,{category:e.category.name,children:t.map(t=>(0,i.jsx)(tT,{accreditation:t,accreditationsSlotsIds:e.accreditationsSlotsIds,change:e.change,delegationAccreditationsSlots:e.delegationAccreditationsSlots,slots:e.slots,strategy:e.strategy},t.id))})},iT=e=>{const t=Oi();return(0,i.jsxs)(F_,{doNotCloseOnOtherOpen:!0,isOpen:e.isOpen,onStateChange:e.onStateChange,children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(Li,{children:(0,i.jsxs)(jo,{color:e.color,leftIcon:"bars-filter",children:[t("filtres_64574")," ",(e.numberOfAppliedFilters||0)>0?`(${e.numberOfAppliedFilters})`:""]})})}),(0,i.jsx)(K_,{placement:"bottom-end",width:385,children:(0,i.jsxs)(G,{direction:"column",onChange:To,children:[(0,i.jsxs)(G,{css:{padding:"$2 $6 $4 $6"},direction:"column",gap:"4",children:[(0,i.jsx)(Li,{font:"gray800 textMd medium",children:t("liste_des_filtr_75605")}),e.children]}),e.showButtons&&(0,i.jsxs)(G,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$4 $6 $2 $6"},gap:"4",justify:"end",children:[(0,i.jsx)(Li,{css:{cursor:"pointer"},font:"gray700 textSm medium",onClick:e.reinit,children:t("r_initialiser_77538")}),(0,i.jsx)(jo,{size:"sm",onClick:e.apply,children:t("appliquer_05753")})]})]})})]})},oT=e=>{const t=Oi(),[n,o]=(0,r.useState)(!1),[a,s]=(0,r.useState)(e.excludeEmpty?"checked":"unchecked"),[d,l]=(0,r.useState)(e.excludeFull?"checked":"unchecked"),[c,u]=(0,r.useState)(e.excludePast?"checked":"unchecked"),m=(e.excludeEmpty?1:0)+(e.excludeFull?1:0)+(e.excludePast?1:0);return(0,i.jsxs)(G,{css:{background:"$gray100",borderRadius:"$2",padding:"$4"},gap:"3",children:[(0,i.jsx)(Li,{css:{flex:"1"},children:(0,i.jsx)(EI,{icon:"magnifying-glass",placeholder:t("rechercher_une_65646"),value:e.name,onChange:t=>{e.setName(t)}})}),(0,i.jsxs)(iT,{apply:()=>{e.setExcludeEmpty("checked"===a),e.setExcludeFull("checked"===d),e.setExcludePast("checked"===c),o(!1)},color:"white",isOpen:n,numberOfAppliedFilters:m,reinit:()=>{e.setExcludeEmpty(!1),s("unchecked"),e.setExcludeFull(!1),l("unchecked"),e.setExcludePast(!1),u("unchecked"),e.setName(""),o(!1)},showButtons:!0,onStateChange:o,children:[(0,i.jsx)(Qy,{state:a,onClick:s,children:t("cacher_les_cr_n_76382")}),(0,i.jsx)(Qy,{state:d,onClick:l,children:t("cacher_les_cr_n_31908")}),(0,i.jsx)(Qy,{state:c,onClick:u,children:t("masquer_les_cr_05336")})]})]})},aT=e=>{const t=Oi(),[n,o,a]=XE(""),[s,d]=(0,r.useState)(!1),[l,c]=(0,r.useState)(!1),[u,m]=(0,r.useState)(!1),{data:g,loader:h}=Mi("query MassAccreditSlots(\n $eventId: EventId!\n $delegationId: DelegationId\n $accreditationName: String\n $excludeFull: Boolean\n $excludeEmpty: Boolean\n $excludePast: Boolean\n) {\n event(id: $eventId) {\n delegation: delegationMaybe(id: $delegationId) {\n accreditationsSlots {\n accreditationSlotId\n assignedResources\n maxResources\n }\n }\n\n accreditationsSlots(\n delegationId: $delegationId\n accreditationName: $accreditationName\n includeHidden: true\n excludeFull: $excludeFull\n excludeEmpty: $excludeEmpty\n excludePast: $excludePast\n ) {\n nodes {\n id\n accreditationId\n name\n assignedResources\n maxResources\n date\n isBlocked\n isFull\n\n accreditation {\n id\n accreditationCategoryId\n accreditationCategoryName\n name\n accreditationDisplay\n hasSlots\n color\n icon\n index\n }\n\n accreditationCategory {\n id\n name\n }\n }\n }\n }\n}\n",{eventId:e.eventId,delegationId:e.delegationId,accreditationName:v(o)?o:void 0,excludeEmpty:s,excludeFull:l,excludePast:u},[]);const p=(0,r.useMemo)(()=>(g.event?.accreditationsSlots.nodes??[]).filter(e=>!e.isBlocked),[g.event]),f=(0,r.useMemo)(()=>(0,vs.A)((0,od.A)(p.map(e=>e.accreditationCategory),e=>e.id),e=>y(e.name)),[p]),I=(0,r.useMemo)(()=>(0,od.A)(p.map(e=>e.accreditation),e=>e.id),[p]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oT,{excludeEmpty:s,excludeFull:l,excludePast:u,name:n,setExcludeEmpty:d,setExcludeFull:c,setExcludePast:m,setName:a}),(0,i.jsx)(oI,{height:"6"}),h||(0,i.jsx)(Ny,{css:{border:"1px solid $gray100",borderRadius:"$1"},children:f.map(t=>(0,i.jsx)(nT,{accreditations:I,accreditationsSlotsIds:e.values.massAccredit.accreditationsSlotsIds,category:t,change:e.change,delegationAccreditationsSlots:g.event.delegation?.accreditationsSlots??[],slots:p,strategy:e.values.massAccredit.strategy},t.id))}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{isLoading:e.submitting,onClick:e.handleSubmit,children:v(e.buttonText)?e.buttonText:t(e.values.massAccredit.strategy===tt.Add?"accr_diter_les_78545":e.values.massAccredit.strategy===tt.Replace?"r_accr_diter_le_34059":"d_saccr_diter_l_28590",e.numberOfSelected)})})]})},sT=({eventId:e,numberOfSelected:t,onClose:n,onSuccess:o,selecteds:a})=>{const s=Oi(),r=Ti($c),{mutate:d}=Da();return(0,i.jsx)(HE,{children:(0,i.jsx)(yx,{category:s("Accreditation"),heading:s("accr_diter_les_48281"),onClose:n,children:(0,i.jsx)(BE,{children:(0,i.jsxs)(YE,{initialValues:{massAccredit:{selecteds:a,strategy:tt.Add,accreditationsSlotsIds:[]}},isEdit:!1,onSubmit:async t=>{const i=(await d({eventId:e,massAccredit:t.massAccredit})).numberOfMembers;o(s("_1_membres_ont_05068",i)),n()},children:[(0,i.jsx)(qE,{heading:s("initialisation_38640"),render:({handleSubmit:e})=>(0,i.jsx)(QE,{handleSubmit:e}),schema:r.step1Schema()}),(0,i.jsx)(qE,{heading:s("accr_ditations_39450"),render:({form:n,handleSubmit:o,submitting:a,values:s})=>(0,i.jsx)(aT,{change:n.change,delegationId:null,eventId:e,handleSubmit:o,numberOfSelected:t,submitting:a,values:s}),schema:r.step2Schema()})]})})})})},rT={PLURAL:"campaigns",SINGLE:"campaign"},dT={CAMPAIGNS:rT.PLURAL,CAMPAIGN:e=>md([rT.SINGLE,e])},lT={CAMPAIGNS:({organizationId:e,eventId:t})=>md([t?Tm.EVENT({organizationId:e,eventId:t}):jm.COMMUNITY({organizationId:e}),dT.CAMPAIGNS]),CAMPAIGNS_SEGMENT:({organizationId:e,segmentId:t})=>md([lT.CAMPAIGNS({organizationId:e}),t]),CAMPAIGN:({organizationId:e,eventId:t,campaignId:n})=>md([t?Tm.EVENT({organizationId:e,eventId:t}):jm.COMMUNITY({organizationId:e}),dT.CAMPAIGN(n)]),CAMPAIGN_DASHBOARD:e=>md([lT.CAMPAIGN(e),fd.DASHBOARD]),CAMPAIGN_PREVIEW:({userInfoId:e,...t})=>md([lT.CAMPAIGN(t),fd.PREVIEW,e]),CREATE(e){const t=xd(lT.CAMPAIGNS(e));return e.options?`${t}/${e.options}`:t},CREATE_TEMPLATE:e=>md([xd(lT.CAMPAIGNS(e)),"template"]),UPDATE:e=>Sd(lT.CAMPAIGN(e))},cT=e=>{const{history:t,translate:n}=Hf(),{mutate:o,isLoading:a}=function(e={}){return Di("mutation UsersInfosMassCampaignSend(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $campaignId: CampaignId!\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: usersInfosMassCampaignSend(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n campaignId: $campaignId\n selecteds: $selecteds\n )\n}\n",e)}(),[s,d]=(0,r.useState)([]),l=h(s);return(0,i.jsxs)(Ty,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(G,{justify:"center",children:(0,i.jsx)(jy,{color:"primary",icon:"people-group"})}),(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(Li,{font:"gray900 textLg medium",textAlign:"center",children:n("SendCampaign")}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsx)(Qx,{isSearchVisible:!0,label:n("campagne_97871"),values:s,onChange:d,children:e.campaigns.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),e.canCreate&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oI,{height:"2"}),(0,i.jsx)(jo,{color:"invisible",leftIcon:"plus",onClick:()=>{const n=function(e){try{return Buffer.from(e).toString("base64")}catch{try{return btoa(e)}catch{return""}}}(JSON.stringify({usersInfosIds:e.selecteds.ids}));t.push(lT.CREATE({organizationId:e.organizationId,eventId:e.eventId||void 0,options:n}))},children:n("cr_er_une_nouve_86635")})]}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsxs)(G,{gap:"3",justify:"end",children:[(0,i.jsx)(jo,{disabled:!l,isLoading:a,onClick:async()=>{if(h(s)){const t=e.campaigns.find(e=>e.id===s[0]),i=(await o({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,selecteds:e.selecteds,campaignId:s[0]})).numberOfMembers;e.onSuccess(n("la_campagne_1_62015",t.name,i)),e.onClose()}},children:n("envoyer_26609")}),(0,i.jsx)(jo,{color:"white",onClick:e.onClose,children:n("annuler_48254")})]})]})},uT=e=>(0,i.jsx)(G,{css:{alignSelf:"stretch",alignItems:"start",padding:"$6",overflowY:"auto",...e.css},direction:"column",gap:"6",children:e.children}),mT=({handleSubmit:e,isLoading:t=!1,isSubmitDisabled:n=!1,setIsOpen:o,submitStyle:a,submitText:s,...r})=>{const{translate:d}=Hf();return(0,i.jsxs)(G,{as:"footer",css:{alignItems:"flex-end",alignSelf:"stretch",background:"$white",borderBlockStart:"1px solid $gray200",padding:"$6"},direction:"column",gap:"4",...r,children:[(0,i.jsxs)(G,{align:"center",gap:"4",justify:"end",children:[(0,i.jsx)(jo,{color:"white",onClick:()=>o(!1),children:d("annuler_48254")}),(0,i.jsx)(jo,{color:a,disabled:n,isLoading:t,onClick:()=>e(),children:s??d("submit_21373")})]}),r.children]})},gT=({heading:e,leftIcon:t,leftIconColor:n,leftIconBorder:o,leftIconCss:a,setIsOpen:s,...r})=>{const{translate:d}=Hf();return(0,i.jsxs)(G,{as:"header",css:{alignItems:"flex-start",alignSelf:"stretch",background:"$white",borderBlockEnd:"1px solid $gray200"},direction:"column",gap:"4",...r,children:[(0,i.jsxs)(G,{css:{alignItems:"center",alignSelf:"stretch",padding:"$6 $7 $5 $7"},gap:"4",children:[t&&(0,i.jsx)(G,{align:"center",css:{padding:"$3",bd:!0,border:o,...a},justify:"center",children:(0,i.jsx)(G,{align:"center",height:24,justify:"center",width:24,children:(0,i.jsx)(_o,{className:"fa-xl",color:n,icon:t})})}),(0,i.jsx)(G,{css:{alignItems:"flex-start",flex:1},direction:"column",justify:"center",children:e})]}),(0,i.jsx)(G,{align:"center",css:{padding:"$2",height:"$space$9",width:"$space$9",position:"absolute",right:"$space$4",top:"$space$4"},justify:"center",children:(0,i.jsx)(jo,{"aria-label":d("close_dialog_50926"),color:"invisible",css:{color:"$gray500",width:"$space$6",height:"$space$6",padding:0},textAlign:"center",onClick:()=>s(!1),children:(0,i.jsx)("i",{className:"far fa-xmark"})})}),r.children]})},hT=({children:e,descId:t,labelId:n,isOpen:o,size:a,setIsOpen:s,...r})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n dialog::backdrop {\n background: rgba(52, 64, 84, 0.7)\n }\n "}}),(0,i.jsx)(Yb,{"aria-describedby":t,"aria-labelledby":n,"data-testid":"modal-body",isOpen:o,setIsOpen:s,style:{border:"none",borderRadius:"var(--radii-3)",padding:0,inlineSize:"70vw",blockSize:"fit-content",maxWidth:"688px"},onClose:r.onClose,children:(0,i.jsx)(G,{align:"center",direction:"column",...r,children:e})})]}),pT=({eventId:e,selecteds:t,sort:n,isOpen:o,setIsOpen:a})=>{const{translate:s}=Hf(),d=Ti(Kc),{data:l,isLoading:c}=Mi("query MassPrintGroupsAndDocuments($eventId: EventId!) {\n event(id: $eventId) {\n printerGroups {\n __typename\n\n ... on PrinterGroupList {\n nodes {\n id\n name\n }\n }\n\n ... on PrinterGroupError {\n message\n }\n }\n zplDocuments {\n nodes {\n id\n name\n }\n }\n }\n}\n",{eventId:e},[]),{mutate:u}=function(e={}){return Di("mutation VolunteersRegistrationsMassPrint($eventId: EventId!, $input: MassPrintInput!) {\n count: volunteersRegistrationsMassPrint(eventId: $eventId, input: $input)\n}\n",e)}(),m=SI(),g=(0,r.useRef)(null),h=c?null:l.event.printerGroups,p="PrinterGroupError"===h?.__typename,f="PrinterGroupError"===h?.__typename?h.message:0===h?.nodes.length?s("no_printing_loc_73059"):void 0;return(0,i.jsx)(II,{css:{dialog:{overflow:"visible"},footer:{borderBottomLeftRadius:"$3",borderBottomRightRadius:"$3"},header:{borderTopLeftRadius:"$3",borderTopRightRadius:"$3"}},customErrorRef:g,initialValues:{input:d.default({selecteds:t,sort:n})},render:({handleSubmit:e,submitting:t})=>(0,i.jsx)(fT,{disabled:c||t||p,ids:m,isOpen:o,setIsOpen:a,onSubmit:()=>{c||t||p||e()},children:c?(0,i.jsxs)(G,{direction:"column",gap:"6",width:"100%",children:[(0,i.jsx)(UI,{borderRadius:"$1",css:{marginTop:"$6"},height:40,width:1}),(0,i.jsx)(UI,{borderRadius:"$1",css:{marginTop:"$6"},height:40,width:1})]}):(0,i.jsxs)(Li,{width:"100%",children:[(0,i.jsx)(Li,{ref:g,children:(0,i.jsx)(as.Provider,{value:{designSystem:os},children:(0,i.jsx)(hI,{})})}),(0,i.jsxs)(G,{direction:"column",gap:"6",children:[f&&(0,i.jsxs)(lI,{alertStyle:"warning",children:[(0,i.jsx)(cI,{children:s("incomplete_prin_64421")}),(0,i.jsx)(uI,{children:f})]}),(0,i.jsx)(Xx,{label:s("wristband_to_pr_39675"),name:"input.zplDocumentId",children:l.event.zplDocuments.nodes.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),(0,i.jsx)(Xx,{label:s("printing_locati_10729"),name:"input.groupId",state:p?"disabled":void 0,children:("PrinterGroupList"===h?.__typename?h.nodes:[]).map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))})]})]})}),schema:d.schema(),onSubmit:async({input:t},n)=>{if(!n.getState().invalid)try{await u({eventId:e,input:t})}finally{a(!1)}}})},fT=({children:e,disabled:t,ids:n,isOpen:o,onSubmit:a,setIsOpen:s})=>{const{translate:r}=Hf();return(0,i.jsxs)(hT,{descId:n.descId,isOpen:o,labelId:n.labelId,role:"dialog",setIsOpen:s,size:"md",onClose:()=>{s(!1)},children:[(0,i.jsx)(gT,{heading:(0,i.jsx)(dI,{id:n.labelId,children:r("imprimer_un_bra_94539")}),id:n.labelId,leftIcon:"hand-back-fist",leftIconColor:"gray800",setIsOpen:s}),(0,i.jsx)(uT,{css:{backgroundColor:"white"},id:n.descId,children:e}),(0,i.jsx)(mT,{handleSubmit:a,isSubmitDisabled:t,setIsOpen:s,submitText:r("print_37582")})]})},IT=e=>{const{translate:t}=Hf(),n=Ti($c),{mutate:o}=Qa();return(0,i.jsx)(HE,{children:(0,i.jsx)(yx,{category:t("Accreditation"),heading:t("update_desired_accreditations"),onClose:e.onClose,children:(0,i.jsx)(BE,{css:{py:"$7"},children:(0,i.jsxs)(YE,{initialValues:{massAccredit:{selecteds:e.selecteds,strategy:tt.Add,accreditationsSlotsIds:[]}},isEdit:!1,onSubmit:async t=>{await o({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,massAccredit:t.massAccredit}),e.onSuccess(),e.onClose()},children:[(0,i.jsx)(qE,{heading:t("initialisation_38640"),render:({handleSubmit:e})=>(0,i.jsx)(QE,{handleSubmit:e}),schema:n.step1Schema()}),(0,i.jsx)(qE,{heading:t("accr_ditations_39450"),render:({form:n,handleSubmit:o,values:a,submitting:s})=>(0,i.jsx)(aT,{buttonText:a.massAccredit.strategy===tt.Delete?t("supprimer_les_a_93519"):t("update_desired_accreditations"),change:n.change,delegationId:e.delegationId,eventId:e.eventId,handleSubmit:o,numberOfSelected:e.numberOfSelected,submitting:s,values:a}),schema:n.step2Schema()})]})})})})},_T=e=>{const t=Oi();return(0,i.jsx)(KE,{handleSubmit:e.handleSubmit,nextText:t("suivant_62774"),prefix:"massProfileUpdate.",strategies:[{label:t("remplacer_le_pr_39873"),value:tt.Replace},{label:t("supprimer_le_pr_54358"),value:tt.Delete}]})},yT=e=>{const t=Oi(),{data:n,loader:o}=Mi("query MassWishedProfileUpdateProfiles($eventId: EventId!, $delegationId: DelegationId!) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationsProfiles {\n accreditationProfile {\n id\n name\n\n accreditationProfileCategory {\n id\n name\n }\n }\n }\n }\n }\n}\n",{eventId:e.eventId,delegationId:e.delegationId},[]);const{accreditationProfileId:a,strategy:s}=e.values.massProfileUpdate,d=s===tt.Delete,l=(0,r.useMemo)(()=>(n.event?.delegation.accreditationsProfiles??[]).map(e=>e.accreditationProfile),[n.event]),c=(0,r.useMemo)(()=>Object.values((0,ym.A)(l,e=>e.accreditationProfileCategory.id)).map(e=>({...e[0].accreditationProfileCategory,accreditationsProfiles:e})),[l]),u=(0,r.useMemo)(()=>DA(c),[c]);return o||(0,i.jsxs)(i.Fragment,{children:[!d&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Qx,{isSearchVisible:!0,label:t("profil_d_accr_d_63000"),multiple:!1,placeholder:t("s_lectionner_un_45763"),values:(0,bs.A)([a]),onChange:t=>{e.change("massProfileUpdate.accreditationProfileId",t[0]??null)},children:u}),(0,i.jsx)(oI,{height:"7"})]}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{isLoading:e.submitting,onClick:e.handleSubmit,children:t(d?"supprimer_le_pr_87965":"mettre_jour_l_05683",e.numberOfSelected)})})]})},xT=e=>{const{translate:t}=Hf(),n=Ti(eu),{mutate:o}=Xa();return(0,i.jsx)(HE,{children:(0,i.jsx)(yx,{category:t("Accreditation"),heading:t("mettre_jour_l_03244"),onClose:e.onClose,children:(0,i.jsx)(BE,{css:{py:"$7"},children:(0,i.jsxs)(YE,{initialValues:{massProfileUpdate:{accreditationProfileId:null,selecteds:e.selecteds,strategy:tt.Replace}},isEdit:!1,onSubmit:async t=>{await o({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,massProfileUpdate:t.massProfileUpdate}),e.onSuccess(),e.onClose()},children:[(0,i.jsx)(qE,{heading:t("initialisation_38640"),render:({handleSubmit:e})=>(0,i.jsx)(_T,{handleSubmit:e}),schema:n.step1Schema()}),(0,i.jsx)(qE,{heading:t("profil_d_accr_d_02274"),render:({form:t,handleSubmit:n,submitting:o,values:a})=>(0,i.jsx)(yT,{change:t.change,delegationId:e.delegationId,eventId:e.eventId,handleSubmit:n,numberOfSelected:e.numberOfSelected,submitting:o,values:a}),schema:n.step2Schema()})]})})})})},ST=e=>{const{translate:t,params:{organizationId:n,eventId:o,delegationId:a}}=Hf(),{mutate:s}=function(e={}){return Di("mutation UsersInfosMassEdit(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $massEdit: MassEditInput!\n) {\n numberOfEdited: usersInfosMassEdit(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n massEdit: $massEdit\n )\n}\n",e)}(),{mutate:d}=Wa(),{mutate:l}=wa(),[c,u]=(0,r.useState)(!1),[m,g]=(0,r.useState)(!1),[p,f]=(0,r.useState)(!1),[I,_]=(0,r.useState)(!1),[y,x]=(0,r.useState)(!1),[S,v]=(0,r.useState)(!1),[b,j]=(0,r.useState)(!1),A=e.massActions.getSelectedsInput(e.predicates,e.scope),C=e.massActions.isAllSelected?e.totalCount:e.massActions.numberOfSelected,E=e.showAccreditationsValidate||h(e.campaigns)||e.showDelete;return(0,i.jsxs)(i.Fragment,{children:[e.canMemberEdit&&(0,i.jsx)(jo,{color:"invisible-gray",leftIcon:"pen",onClick:()=>u(!0),children:t("_diter_un_champ_64621")}),e.showWishedAccreditationsEdit&&(0,i.jsx)(jo,{color:"invisible-gray",leftIcon:"wand-magic-sparkles",onClick:()=>g(!0),children:t("_diter_les_accr_41957")}),e.showWishedProfileEdit&&(0,i.jsx)(jo,{color:"invisible-gray",leftIcon:"wand-magic-sparkles",onClick:()=>f(!0),children:t("_diter_le_profi_54032")}),e.showAccreditationsEdit&&(0,i.jsx)(jo,{color:"invisible-gray",leftIcon:"wand-magic-sparkles",onClick:()=>_(!0),children:t("_diter_les_accr_86042")}),E&&(0,i.jsxs)(F_,{children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(jo,{color:"invisible-gray",rightIcon:"chevron-down",children:t("plus_77692")})}),(0,i.jsxs)(K_,{placement:"bottom-end",children:[e.showAccreditationsValidate&&(0,i.jsx)(H_,{icon:"check",onClick:async()=>{await d({eventId:o,delegationId:a,selecteds:A}),e.onMassEditSuccess()},children:t("valider_les_acc_80801")}),e.showPrint&&(0,i.jsx)(H_,{icon:"hand-back-fist",onClick:()=>j(!0),children:t("imprimer_un_bra_94539")}),h(e.campaigns)&&(0,i.jsx)(H_,{icon:"paper-plane",onClick:()=>x(!0),children:t("SendCampaign")}),e.showDelete&&(0,i.jsx)(H_,{color:"red",icon:"user-xmark",onClick:()=>v(!0),children:t("retirer_de_la_d_64963")})]})]}),c&&(0,i.jsx)(FE,{customFields:e.customFields,mutate:e=>s({organizationId:n,eventId:o,delegationId:a,massEdit:e}),selecteds:A,onClose:()=>u(!1),onSuccess:e.onMassEditSuccess}),m&&(0,i.jsx)(IT,{delegationId:a,eventId:o,numberOfSelected:C,organizationId:n,selecteds:A,onClose:()=>g(!1),onSuccess:e.onMassEditSuccess}),p&&(0,i.jsx)(xT,{delegationId:a,eventId:o,numberOfSelected:C,organizationId:n,selecteds:A,onClose:()=>f(!1),onSuccess:e.onMassEditSuccess}),I&&(0,i.jsx)(sT,{eventId:o,numberOfSelected:C,selecteds:A,onClose:()=>_(!1),onSuccess:e.onMassEditSuccess}),y&&(0,i.jsx)(cT,{campaigns:e.campaigns,canCreate:!1,delegationId:a,eventId:o,organizationId:n,selecteds:A,onClose:()=>x(!1),onSuccess:e.onMassEditSuccess}),S&&(0,i.jsx)(pE,{buttonText:t("supprimer_43083"),subtext:t("_tes_vous_sur_d_29974"),text:t("suppression_de_57689",C),onClose:()=>v(!1),onDelete:async()=>{await l({organizationId:n,eventId:o,delegationId:a,selecteds:A,deleteFromEvent:e.deleteFromEvent}),e.onMassEditSuccess()}}),b&&(0,i.jsx)(pT,{eventId:o,isOpen:b,selecteds:A,setIsOpen:j,sort:e.sort})]})},vT=e=>{const{translate:t}=Hf(),[n,o]=(0,r.useState)(e.selectedSlotsIds),[a,s]=(0,r.useState)(e.selectedProfilesIds),[d,l]=(0,r.useState)(e.rendering),[c,u]=(0,r.useState)(e.showAccreditations),[m,g]=(0,r.useState)(e.showProfiles),[h,p]=(0,r.useState)(e.showQuota);return(0,i.jsxs)(G,{direction:"column",onChange:To,children:[(0,i.jsxs)(G,{css:{padding:"$2 $6 $4 $6"},direction:"column",gap:"4",children:[(0,i.jsx)(Fy,{value:c,onChange:u,children:t("afficher_les_ac_56952")}),c&&(0,i.jsx)(Qx,{isSearchVisible:!0,isSelectAllVisible:!0,label:t("accr_ditations_39450"),multiple:!0,renderOnPortal:!0,values:n,onChange:o,children:e.accreditationsOptions}),e.accreditationsProfilesOptions&&(0,i.jsx)(Fy,{value:m,onChange:g,children:t("afficher_les_pr_62371")}),e.accreditationsProfilesOptions&&m&&(0,i.jsx)(Qx,{isSearchVisible:!0,isSelectAllVisible:!0,label:t("profils_d_accr_27825"),multiple:!0,renderOnPortal:!0,values:a,onChange:s,children:e.accreditationsProfilesOptions}),(0,i.jsxs)(tS,{label:t("grouper_les_acc_40252"),value:d,onChange:l,children:[(0,i.jsx)("option",{value:vd.Category,children:t("cat_gorie_00291")}),(0,i.jsx)("option",{value:vd.Date,children:t("Date")})]}),!e.hideQuotaOption&&(0,i.jsx)(Fy,{value:h,onChange:p,children:t("afficher_les_qu_20761")})]}),(0,i.jsxs)(G,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$4 $6 $2 $6"},gap:"4",justify:"end",children:[(0,i.jsx)(Li,{css:{cursor:"pointer"},font:"gray700 textSm medium",onClick:()=>{e.reset(),e.close()},children:t("r_initialiser_77538")}),(0,i.jsx)(jo,{size:"sm",onClick:()=>{e.setShowAccreditations(c),e.setSelectedSlotsIds(n),e.setShowProfiles(m),e.setSelectedProfilesIds(a),e.setRendering(d),e.hideQuotaOption||e.setShowQuota(h),e.close()},children:t("appliquer_05753")})]})]})};function bT(e){return dy((0,od.A)(e,e=>e.accreditation.id).map(t=>({...t.accreditation,accreditationCategory:t.accreditationCategory,slots:wg(e.filter(e=>e.accreditation.id===t.accreditation.id))})))}const jT=e=>{const{translate:t}=Hf(),n=r.useRef(null),o=Ti(jl),a=Ti(fm),s=(0,r.useMemo)(()=>(0,od.A)((0,vs.A)(e.slots.flatMap(e=>e.date?.isValid?[e.date]:[]),e=>e.toMillis()),e=>e.toMillis()),[e.filteredAccreditations]),d=(0,r.useMemo)(()=>(0,cy.A)((0,ym.A)(e.slots,e=>e.date?.isValid?e.date.toMillis():"nodate"),e=>e.length),[e.slots]),l=(0,r.useMemo)(()=>ub(o,e.allCategories),[o,e.allCategories]),c=(0,r.useMemo)(()=>{return h(e.allAccreditationsProfiles)?(t=e.allAccreditationsProfiles,(0,vs.A)((0,od.A)(t.map(e=>e.accreditationProfileCategory),e=>e.id),e=>y(e.name)).map(e=>(0,i.jsx)("optgroup",{label:e.name,children:(0,vs.A)(t.filter(t=>t.accreditationProfileCategory.id===e.id),e=>y(e.name)).map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},e.id))):null;var t},[e.allAccreditationsProfiles]),[u,m]=(0,r.useState)(!1),g=(0,r.useCallback)(()=>{e.setShowAccreditations(!0),e.setSelectedSlotsIds([]),e.setShowProfiles(!0),e.setSelectedProfilesIds([]),e.setRendering(vd.Category),e.hideQuotaOption||e.setShowQuota(!1)},[e.hideQuotaOption,e.setRendering,e.setSelectedProfilesIds,e.setSelectedSlotsIds,e.setShowAccreditations,e.setShowProfiles,e.setShowQuota]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{ref:n,css:{background:"white",border:"1px solid $gray200"},children:[(0,i.jsxs)(G,{css:{width:"calc(2 * $cellWidth)"},direction:"column",children:[(0,i.jsx)(G,{align:"center",css:{borderBottom:"1px solid $gray200",borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},gap:"3",width:1,children:!e.hideOptions&&(0,i.jsxs)(F_,{doNotCloseOnOtherOpen:!0,isOpen:u,onStateChange:m,children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(Li,{children:(0,i.jsx)(jo,{color:"white",leftIcon:"bars-filter",size:"sm",children:t("filtres_64574")})})}),(0,i.jsx)(K_,{placement:"bottom-start",width:385,children:(0,i.jsx)(vT,{accreditationsOptions:l,accreditationsProfilesOptions:c,close:()=>m(!1),hideQuotaOption:e.hideQuotaOption,rendering:e.rendering,reset:g,selectedProfilesIds:e.selectedProfilesIds,selectedSlotsIds:e.selectedSlotsIds,setRendering:e.setRendering,setSelectedProfilesIds:e.setSelectedProfilesIds,setSelectedSlotsIds:e.setSelectedSlotsIds,setShowAccreditations:e.setShowAccreditations,setShowProfiles:e.setShowProfiles,setShowQuota:e.setShowQuota,showAccreditations:e.showAccreditations,showProfiles:e.showProfiles,showQuota:e.showQuota})})]})}),(0,i.jsx)(G,{css:{borderRight:"1px solid $gray200",height:"$cellHeightSm"},width:1,onClick:()=>{n.current?.requestFullscreen()}}),e.showQuota&&(0,i.jsx)(G,{css:{borderRight:"1px solid $gray200",height:"32px"},width:1}),e.data.map(t=>e.renderLeftColumn(t))]}),(0,i.jsx)(G,{css:{flex:"1",overflowX:"auto"},children:(0,i.jsxs)(G,{direction:"column",children:[(0,i.jsxs)(G,{css:{borderBottom:"1px solid $gray200",height:"$cellHeightSm"},children:[h(e.accreditationsProfiles)&&(0,i.jsx)(G,{css:{background:"$gray700",borderRight:"1px solid $gray200",color:"white",fontSize:"$textSm",fontWeight:"$medium",px:"$4",textAlign:"center",textTransform:"uppercase",width:`calc(${e.accreditationsProfiles.length} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:t("profils_09110")}),e.rendering===vd.Category&&e.filteredAccreditations.map(t=>{const n=v(t.acronym)?t.acronym:t.name;return(0,i.jsxs)(G,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`calc(${t.numberOfSlots} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:[(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:n,width:1,children:n}),(0,i.jsx)(Li,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:t.accreditationCategory.name,width:1,children:t.accreditationCategory.name})]},t.id)}),e.rendering===vd.Date&&s.map(t=>{const n=t.toMillis(),a=d[n],s=o.toLocaleString(t,oa.DateOnly.MonthLong);return(0,i.jsx)(G,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`calc(${a} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:s,width:1,children:s})},n)}),e.rendering===vd.Date&&(d.nodate??0)>0&&(0,i.jsx)(G,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`calc(${d.nodate} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",width:1,children:"-"})})]}),(0,i.jsxs)(G,{css:{height:"$cellHeightSm"},children:[e.accreditationsProfiles.map(t=>(0,i.jsxs)(G,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`${e.cellWidth}px`},direction:"column",height:1,justify:"center",children:[(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:t.name,width:1,children:t.name}),(0,i.jsx)(Li,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:t.accreditationProfileCategory.name,width:1,children:t.accreditationProfileCategory.name})]},t.id)),e.slots.map(t=>{const n=e.rendering===vd.Category?t.name||"-":v(t.accreditation.acronym)?t.accreditation.acronym:t.accreditation.name,a=t.date?.isValid?o.toLocaleString(t.date,oa.DateOnly.Numeric):"-";return(0,i.jsxs)(G,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`${e.cellWidth}px`},direction:"column",height:1,justify:"center",children:[(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:n,width:1,children:n}),e.rendering===vd.Category&&(0,i.jsx)(Li,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:a,width:1,children:a}),e.rendering===vd.Date&&(0,i.jsx)(Li,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:t.accreditationCategory.name,width:1,children:t.accreditationCategory.name})]},t.id)})]}),e.showQuota&&(0,i.jsxs)(G,{height:32,children:[e.accreditationsProfiles.map(n=>{const o=n.maxResources??Number.POSITIVE_INFINITY,s=n.assignedResources/o;return(0,i.jsx)(G,{align:"center",css:{borderRight:"1px solid $gray200",width:`${e.cellWidth}px`},height:1,justify:"center",children:(0,i.jsx)(My,{color:Iy(s,{higherIsBetter:!1}),size:"sm",children:t("_1_2_membres_04485",n.assignedResources,a.toNumberOrInfinity(o))})},n.id)}),e.slots.map(n=>{const o=n.maxResources??Number.POSITIVE_INFINITY,s=n.assignedResources/o;return(0,i.jsx)(G,{align:"center",css:{borderRight:"1px solid $gray200",width:`${e.cellWidth}px`},height:1,justify:"center",children:(0,i.jsx)(My,{color:Iy(s,{higherIsBetter:!1}),size:"sm",children:t("_1_2_membres_04485",n.assignedResources,a.toNumberOrInfinity(o))})},n.id)})]}),e.data.map(t=>e.renderRow(t))]})})]}),(0,i.jsx)(eA,{children:(0,i.jsx)(Jj,{limit:e.limit,numberOfPages:e.numberOfPages,offset:e.offset,setLimit:e.setLimit,setOffset:e.setOffset,showLimits:!0,totalCount:e.totalCount})})]})},AT=e=>{const{translate:t}=Hf(),n=(0,r.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.isAutoAccredit?[e.accreditationSlotId]:[]),[e.vr]),o=(0,r.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.isAutoAccredit?[]:[e.accreditationSlotId]),[e.vr]),a=(0,r.useMemo)(()=>(e.vr.matrixWishedSlots||[]).map(e=>e.id),[e.vr]),s=(0,r.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.checkInAt?.isValid?[e.accreditationSlotId]:[]),[e.vr]),d=(0,r.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.accreditationProfileId?[e.accreditationSlotId]:[]),[e.vr]);return(0,i.jsxs)(G,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[e.accreditationsProfiles.map(n=>{const o=e.vr.accreditationProfileId===n.id,a=e.vr.wishedAccreditationProfileId===n.id,s=e.isEditMode&&("assigned"===e.editMode&&o||"wished"===e.editMode&&a),r=e.isEditMode&&("assigned"===e.editMode&&!o||"wished"===e.editMode&&!a);return(0,i.jsxs)(G,{align:"center",css:{borderRight:"1px solid $gray200",padding:"$3 $4",width:"$cellWidth","& > .h-accreditations-matrix-cell":{display:"flex"},"&:hover > .h-accreditations-matrix-cell":{display:"none"},"& > .h-accreditations-matrix-edit-cell":{display:"none"},"&:hover > .h-accreditations-matrix-edit-cell":{display:"flex"}},height:1,children:[s&&(0,i.jsx)(G,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$error200",bd:"error500 1",color:"$error700",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.deleteAccreditationProfile(e.vr.userInfo.id,n.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(_o,{icon:"trash-can"})}),r&&(0,i.jsx)(G,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$primary100",bd:"primary500 1",color:"$primary500",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.addAccreditationProfile(e.vr.userInfo.id,n.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(_o,{icon:"plus"})}),o?(0,i.jsx)(G,{align:"center",className:r||s?"h-accreditations-matrix-cell":"",css:{background:"$success200",bd:"success500 1",color:"$success700",fontSize:"$textMd"},height:1,justify:"center",width:1,children:(0,i.jsx)(_o,{icon:"check"})}):a?(0,i.jsx)(G,{align:"center",className:e.isEditMode?"h-accreditations-matrix-cell":"",css:{background:"white",bd:"gray300 1",borderStyle:"dashed"},height:1,justify:"center",width:1,children:(0,i.jsx)(Li,{font:"gray800 textXs medium",children:t("souhait_19593")})}):null]},n.id)}),e.slots.map(r=>{const l=n.includes(r.id),c=o.includes(r.id),u=a.includes(r.id),m=d.includes(r.id),g=e.isEditMode&&!r.isBlocked&&!m&&(e.canDeleteCheckedIn||!s.includes(r.id))&&("assigned"===e.editMode&&(l||c)||"wished"===e.editMode&&u),h=e.isEditMode&&!r.isBlocked&&("assigned"===e.editMode&&!l&&!c||"wished"===e.editMode&&!u);return(0,i.jsxs)(G,{align:"center",css:{borderRight:"1px solid $gray200",padding:"$3 $4",width:"$cellWidth","& > .h-accreditations-matrix-cell":{display:"flex"},"&:hover > .h-accreditations-matrix-cell":{display:"none"},"& > .h-accreditations-matrix-edit-cell":{display:"none"},"&:hover > .h-accreditations-matrix-edit-cell":{display:"flex"}},height:1,children:[g&&(0,i.jsx)(G,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$error200",bd:"error500 1",color:"$error700",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.deleteAccreditationSlot(e.vr.userInfo.id,r.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(_o,{icon:"trash-can"})}),h&&(0,i.jsx)(G,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$primary100",bd:"primary500 1",color:"$primary500",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.addAccreditationSlot(e.vr.userInfo.id,r.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(_o,{icon:"plus"})}),l||c?(0,i.jsx)(G,{align:"center",className:h||g?"h-accreditations-matrix-cell":"",css:{background:"$success200",bd:"success500 1",color:"$success700",fontSize:"$textMd"},height:1,justify:"center",width:1,children:(0,i.jsx)(_o,{icon:m?"layer-group":l?"bolt-auto":"check"})}):u?(0,i.jsx)(G,{align:"center",className:e.isEditMode?"h-accreditations-matrix-cell":"",css:{background:"white",bd:"gray300 1",borderStyle:"dashed"},height:1,justify:"center",width:1,children:(0,i.jsx)(Li,{font:"gray800 textXs medium",children:t("souhait_e_52100")})}):null]},r.id)})]})},CT=e=>{const{translate:t}=Hf(),n=(0,r.useMemo)(()=>function(e){const t=bT(e);return(0,vs.A)((0,od.A)(e,e=>e.accreditationCategory.id).map(e=>({...e.accreditationCategory,accreditations:t.filter(t=>t.accreditationCategory.id===e.accreditationCategory.id)})),e=>y(e.name))}(e.allAccreditationsSlots),[e.allAccreditationsSlots]),o=(0,r.useMemo)(()=>bT(e.allAccreditationsSlots),[e.allAccreditationsSlots]),a=(0,r.useMemo)(()=>e.showAccreditations?function(e,t){return e.flatMap(e=>{const n=e.slots.map(e=>e.id),i=p(t)?e.slots.length:(0,bl.A)(n,t).length;return 0===i?[]:[{...e,numberOfSlots:i}]})}(o,e.selectedSlotsIds):[],[o,e.selectedSlotsIds,e.showAccreditations]),s=(0,r.useMemo)(()=>function(e,t,n){const i=e.flatMap(e=>e.slots.filter(e=>p(t)||t.includes(e.id)));return n===vd.Category?i:(0,vs.A)(i,e=>e.date?.isValid?e.date.toMillis():Number.POSITIVE_INFINITY)}(a,e.selectedSlotsIds,e.rendering),[a,e.selectedSlotsIds,e.rendering]),d=(0,r.useMemo)(()=>(0,vs.A)(e.allAccreditationsProfiles.filter(t=>e.showProfiles&&(p(e.selectedProfilesIds)||e.selectedProfilesIds.includes(t.id))),e=>[y(e.accreditationProfileCategory.name),y(e.name)]),[e.allAccreditationsProfiles,e.selectedProfilesIds,e.showProfiles]),l=(0,r.useCallback)(t=>e.isRowLoading(t.id)?(0,i.jsx)(Kj,{css:{border:"none",borderTop:"1px solid $gray200",height:"$cellHeightSm"}},t.userInfo.id):(0,i.jsx)(AT,{accreditationsProfiles:d,addAccreditationProfile:e.addAccreditationProfile,addAccreditationSlot:e.addAccreditationSlot,canDeleteCheckedIn:e.canDeleteCheckedIn,deleteAccreditationProfile:e.deleteAccreditationProfile,deleteAccreditationSlot:e.deleteAccreditationSlot,editMode:e.editMode,isEditMode:e.isEditMode,reloadRow:e.reloadRow,slots:s,vr:t},t.userInfo.id),[e.addAccreditationProfile,e.addAccreditationSlot,e.deleteAccreditationProfile,e.deleteAccreditationSlot,e.editMode,e.isEditMode,e.isRowLoading,e.reloadRow,d,s]);return(0,i.jsx)(G,{direction:"column",width:1,children:e.isLoading?(0,i.jsx)(xo,{}):p(e.members)||p(a)&&p(d)?(0,i.jsx)(G,{css:{background:"white",border:"1px solid $gray200"},height:400,children:p(e.members)?(0,i.jsx)(ky,{imageSrc:PI.Blanks.Member,title:t("aucun_membre_ne_07054")}):h(e.selectedSlotsIds)||h(e.selectedProfilesIds)||!e.showAccreditations||!e.showProfiles?(0,i.jsx)(G,{align:"center",height:1,justify:"center",width:1,children:(0,i.jsx)(jo,{color:"white",leftIcon:"broom-wide",onClick:()=>{e.setShowAccreditations(!0),e.setSelectedSlotsIds([]),e.setShowProfiles(!0),e.setSelectedProfilesIds([])},children:t("remettre_les_fi_83263")})}):(0,i.jsx)(ky,{imageSrc:PI.Blanks.Accreditation,title:t("aucune_accr_dit_97505")})}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(jT,{accreditationsProfiles:d,allAccreditations:o,allAccreditationsProfiles:e.allAccreditationsProfiles,allCategories:n,cellWidth:120,data:e.members,filteredAccreditations:a,hideOptions:e.hideOptions,limit:e.limit,numberOfPages:e.numberOfPages,offset:e.offset,renderLeftColumn:t=>(0,i.jsx)(G,{css:{borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},width:1,children:(0,i.jsx)(sA,{isClickDisabled:!!e.getInformationPanelPath,size:32,userInfo:t.userInfo})},t.userInfo.id),renderRow:l,rendering:e.rendering,selectedProfilesIds:e.selectedProfilesIds,selectedSlotsIds:e.selectedSlotsIds,setLimit:e.setLimit,setOffset:e.setOffset,setRendering:e.setRendering,setSelectedProfilesIds:e.setSelectedProfilesIds,setSelectedSlotsIds:e.setSelectedSlotsIds,setShowAccreditations:e.setShowAccreditations,setShowProfiles:e.setShowProfiles,setShowQuota:e.setShowQuota,showAccreditations:e.showAccreditations,showProfiles:e.showProfiles,showQuota:e.showQuota,slots:s,totalCount:e.totalCount})})})},ET=e=>{const{params:{organizationId:t,eventId:n,delegationId:o}}=Hf(),{data:a,idToLoading:s,isEditMode:d,isLoading:l,limit:c,numberOfPages:u,offset:m,reloadRow:g,setLimit:h,setOffset:p,totalCount:f}=cb(),{mutate:I}=Qa(),{mutate:_}=Xa(),{data:y,isLoading:x,reload:S}=Mi("query DelegationMembersAccreditationsMatrix($eventId: EventId!, $delegationId: DelegationId!) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationsProfiles {\n assignedResources\n maxResources\n\n accreditationProfile {\n ...AccreditationProfileMatrix\n }\n }\n\n allAccreditationsSlots(onlyVisible: true) {\n assignedResources\n maxResources\n\n accreditationSlot {\n ...AccreditationSlotMatrix\n }\n }\n }\n }\n}\n",{eventId:n,delegationId:o},[Yo.AccreditationProfileMatrixFragment,Yo.AccreditationSlotMatrixFragment]),v=(0,r.useMemo)(()=>(y.event?.delegation.allAccreditationsSlots??[]).map(e=>({...e.accreditationSlot,assignedResources:e.assignedResources,maxResources:e.maxResources})),[y]),b=(0,r.useMemo)(()=>(y.event?.delegation.accreditationsProfiles??[]).map(e=>({...e.accreditationProfile,assignedResources:e.assignedResources,maxResources:e.maxResources})),[y]),j=(0,r.useCallback)(e=>s[e]??!1,[s]),A=(0,r.useCallback)(async(i,a)=>{await _({organizationId:t,eventId:n,delegationId:o,massProfileUpdate:{accreditationProfileId:a,selecteds:{ids:[i]},strategy:tt.Replace}}),e.matrixShowQuota&&S()},[S,o,n,_,t,e.matrixShowQuota]),C=(0,r.useCallback)(async(i,a)=>{await I({organizationId:t,eventId:n,delegationId:o,massAccredit:{accreditationsSlotsIds:[a],selecteds:{ids:[i]},strategy:tt.Add}}),e.matrixShowQuota&&S()},[S,o,n,I,t,e.matrixShowQuota]),E=(0,r.useCallback)(async(i,a)=>{await _({organizationId:t,eventId:n,delegationId:o,massProfileUpdate:{accreditationProfileId:a,selecteds:{ids:[i]},strategy:tt.Delete}}),e.matrixShowQuota&&S()},[S,o,n,_,t,e.matrixShowQuota]),T=(0,r.useCallback)(async(i,a)=>{await I({organizationId:t,eventId:n,delegationId:o,massAccredit:{accreditationsSlotsIds:[a],selecteds:{ids:[i]},strategy:tt.Delete}}),e.matrixShowQuota&&S()},[S,o,n,I,t,e.matrixShowQuota]);return(0,i.jsx)(CT,{addAccreditationProfile:A,addAccreditationSlot:C,allAccreditationsProfiles:b,allAccreditationsSlots:v,canDeleteCheckedIn:!1,deleteAccreditationProfile:E,deleteAccreditationSlot:T,editMode:"wished",getInformationPanelPath:e.getInformationPanelPath,hideOptions:e.hideOptions,isEditMode:d,isLoading:l||x,isRowLoading:j,limit:c,members:a,numberOfPages:u,offset:m,reloadRow:g,rendering:e.matrixRendering,selectedProfilesIds:e.selectedProfilesIds,selectedSlotsIds:e.selectedSlotsIds,setLimit:h,setOffset:p,setRendering:e.setMatrixRendering,setSelectedProfilesIds:e.setSelectedProfilesIds,setSelectedSlotsIds:e.setSelectedSlotsIds,setShowAccreditations:e.setMatrixShowAccreditations,setShowProfiles:e.setMatrixShowProfiles,setShowQuota:e.setMatrixShowQuota,showAccreditations:e.matrixShowAccreditations,showProfiles:e.matrixShowProfiles,showQuota:e.matrixShowQuota,totalCount:f})},TT=e=>{const{translate:t,params:{organizationId:n,eventId:o,delegationId:a}}=Hf(),s=Ti(Sp),d=Pi(),[l,c,u]=Yj(e.delegationsSpaceLayoutTab,e=>e.infos?.columns??[],n,"eventDelegationMembers.columns",e.columns),g=(0,r.useMemo)(()=>e.canEditColumns||e.delegationsSpaceLayoutTab?l:e.columns,[l,e.canEditColumns,e.columns,e.delegationsSpaceLayoutTab]),[f,I,_]=qj(n,"eventDelegationMembers.limit",25),[y,x,S]=qj(n,"eventDelegationMembers.predicates",[]),v=(0,r.useMemo)(()=>Kg(y),[y]),b=(0,r.useMemo)(()=>e.delegationsSpaceLayoutTab?.rendering===Ed.List&&h(e.delegationsSpaceLayoutTab?.infos?.accreditationsSlotsIds)?Kg([{slug:"accreditationSlotId",operator:ft.Is,value:e.delegationsSpaceLayoutTab.infos.accreditationsSlotsIds}]):v,[e.delegationsSpaceLayoutTab,v]),[j,A,C]=Yj(e.delegationsSpaceLayoutTab,e=>e.rendering,n,"eventDelegationMembers.rendering",Ed.List),[E,T,O]=Yj(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixRendering||vd.Category,n,"eventDelegationMembers.matrixRendering",vd.Category),[R,M,D]=Yj(e.delegationsSpaceLayoutTab,e=>e.infos?.accreditationsSlotsIds||[],n,"eventDelegationMembers.selectedSlotsIds",[]),[w,$,P]=Yj(e.delegationsSpaceLayoutTab,e=>e.infos?.accreditationsProfilesIds||[],n,"eventDelegationMembers.selectedProfilesIds",[]),[N,k,z]=Yj(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixShowAccreditations??!0,n,"eventDelegationMembers.matrixShowAccreditations",!0),[L,F,U]=Yj(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixShowProfiles??!0,n,"eventDelegationMembers.matrixShowProfiles",!0),[B,G,V]=Yj(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixShowQuota??!1,n,"eventDelegationMembers.matrixShowQuota",!1),[W,q,Y]=qj(n,"eventDelegationMembers.sort",null),{data:H,isLoading:Z}=Mi("query EventDelegationMembersInfos(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $privacy: CustomFieldPrivacy!\n) {\n organization(id: $organizationId) {\n weezeventOrganizationId\n\n customFields(eventId: $eventId, variety: UserInfo, privacy: $privacy) {\n nodes {\n ...SegmentCustomField\n }\n }\n }\n\n event(id: $eventId) {\n startAt\n endAt\n isWeezeventConnected\n\n customDocuments {\n ...CustomDocumentPopulation\n }\n\n delegation(id: $delegationId) {\n id\n numberOfDelegationsAccreditationsSlots\n numberOfDelegationsAccreditationsProfiles\n\n accreditationsSlots(onlyDefault: true, onlyHidden: true) {\n accreditationSlotId\n }\n\n columnsCustomFields {\n ...SegmentCustomField\n }\n\n form {\n id\n positionDisplay\n slotDisplay\n\n elements {\n customField {\n ...SegmentCustomField\n }\n }\n }\n }\n }\n}\n",{organizationId:n,eventId:o,delegationId:a,privacy:e.customFieldsPrivacy},[Yo.SegmentCustomFieldFragment,Yo.CustomDocumentPopulationFragment]);const K=u||_||S||C||O||D||P||z||U||V||Y||Z,Q=(0,r.useMemo)(()=>e.customFieldsPrivacy===pe.All?H.organization?.customFields.nodes??[]:(0,od.A)((0,bs.A)((H.event?.delegation.form.elements.map(e=>e.customField)||[]).concat(H.event?.delegation.columnsCustomFields||[])),e=>e.slug),[e.customFieldsPrivacy,H.organization,H.event]),X=Hj(Q),J=(0,r.useMemo)(()=>H.event?s.getDelegationMembersFilters(n,o,Q,H.event,H.event.delegation.form,H.event.isWeezeventConnected):[],[o,Q,H.event]),ee=(0,r.useMemo)(()=>H.event?s.getDelegationMembersPossibleColumns(n,Q,{customDocuments:e.showCustomDocumentsColumns?H.event.customDocuments:[],forDelegationsSpace:e.forDelegationsSpace,isWeezeventConnected:H.event.isWeezeventConnected,positionDisplay:H.event.delegation.form.positionDisplay,slotDisplay:H.event.delegation.form.slotDisplay}):[],[e.forDelegationsSpace,e.showCustomDocumentsColumns,n,Q,H.event]),te=(0,r.useMemo)(()=>(H.event?.delegation.accreditationsSlots??[]).map(e=>e.accreditationSlotId),[H.event]),ne=(0,r.useMemo)(()=>"function"==typeof e.showEditMode?e.showEditMode(j):e.showEditMode,[e.showEditMode,j]),ie=(0,r.useMemo)(()=>p(e.delegationsSpaceLayoutTab?.infos?.accreditationsSlotsIds||[]),[e.delegationsSpaceLayoutTab]),oe=(0,r.useMemo)(()=>p(e.delegationsSpaceLayoutTab?.infos?.accreditationsSlotsIds||[]),[e.delegationsSpaceLayoutTab]),ae=(0,r.useMemo)(()=>e.delegationsSpaceLayoutTab?void 0:[Ed.List,Ed.AccreditationsMatrix],[e.delegationsSpaceLayoutTab]),se=3695!==n&&(H.event?.delegation.numberOfDelegationsAccreditationsSlots??0)>0,re=(H.event?.delegation.numberOfDelegationsAccreditationsProfiles??0)>0,de=window.location.origin===lo.HEAVENT_PUBLIC_URL.origin?t=>`${window.location.origin}${hg.DELEGATION_MEMBER_INFORMATION({organizationId:n,eventId:o,delegationId:a,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id})}`:void 0;return(0,r.useEffect)(()=>{d.setItem(OI.DELEGATIONS_SPACE_TAB,"members")},[]),K?(0,i.jsx)(xo,{}):(0,i.jsx)(Bj,{columns:g,columnsSearch:[],columnsToIncludes:xp,eventId:o,filters:J,getMassActionId:e=>e.userInfo.id,limit:f,loadDataList:Ka,loadDataListParams:{delegationId:a,onlyVisibleAccreditationsSlots:e.onlyVisibleAccreditationsSlots,includeCanRegistrationStateUpdate:!1,includeIsEditable:!1},loadRow:Za,loadRowParams:{delegationId:a,onlyVisibleAccreditationsSlots:e.onlyVisibleAccreditationsSlots,includeCanRegistrationStateUpdate:!1,includeIsEditable:!1},organizationId:n,possibleColumns:ee,possibleRenderings:ae,predicates:b,renderActions:(t,n,o)=>(0,i.jsx)(ST,{campaigns:e.campaigns,canMemberEdit:e.canMemberEdit,customFields:Q,deleteFromEvent:e.deleteFromEvent,massActions:t,predicates:b,scope:{delegationId:a},showAccreditationsEdit:e.showAccreditationsEdit,showAccreditationsValidate:e.showAccreditationsValidate,showDelete:e.canMemberDelete,showPrint:e.showPrint,showWishedAccreditationsEdit:se,showWishedProfileEdit:re,sort:W,totalCount:n,onMassEditSuccess:o}),renderAllSelectedText:e=>t("les_1_membres_71180",e),renderPageSelectedText:e=>t("les_1_membres_00895",e),renderSelectAllText:e=>t("s_lectionner_le_45277",e),rendering:j,setColumns:c,setLimit:I,setPredicates:x,setRendering:A,setSort:q,showEditColumns:j===Ed.List&&e.canEditColumns,showEditMode:ne,showFilters:ie,showMassActions:e.canMemberEdit||e.canMemberAccredit,showPredicatesBadges:oe,showRowDropdown:!0,showRowEdit:e.canMemberEdit,showSearchColumns:!1,showSelectAll:!0,sort:W,children:j===Ed.AccreditationsMatrix?(0,i.jsx)(ET,{getInformationPanelPath:de,hideOptions:!!e.delegationsSpaceLayoutTab,matrixRendering:E,matrixShowAccreditations:N,matrixShowProfiles:L,matrixShowQuota:B,selectedProfilesIds:w,selectedSlotsIds:R,setMatrixRendering:T,setMatrixShowAccreditations:k,setMatrixShowProfiles:F,setMatrixShowQuota:G,setSelectedProfilesIds:$,setSelectedSlotsIds:M}):(0,i.jsx)(iA,{getEditPath:e.getEditPath,renderCell:(t,s,r)=>(0,i.jsx)(vC,{accreditationsPanelPath:hg.DELEGATION_MEMBER_ACCREDITATIONS({organizationId:n,eventId:o,delegationId:a,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:s.userInfo.id}),availabilitiesPanelPath:hg.DELEGATION_MEMBER_AVAILABILITIES({organizationId:n,eventId:o,delegationId:a,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:s.userInfo.id}),canChangeDelegation:!1,canMemberAccredit:e.canMemberAccredit,canMemberAssign:!1,column:t,customField:X.get(t.slug),eventId:o,informationPanelPath:de?.(s),positionsPanelPath:hg.DELEGATION_MEMBER_POSITIONS({organizationId:n,eventId:o,delegationId:a,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:s.userInfo.id}),reloadRow:r,row:s}),renderRowDropdown:(t,n)=>(0,i.jsx)(IE,{accreditationState:t.accreditationState,allowedCustomDocuments:e.customBadges,canDelete:e.canMemberDelete&&t.canDelete,canDuplicate:e.canDuplicateMembers,canMemberAccredit:e.canMemberAccredit,customDocuments:H.event?.customDocuments??m,deleteFromEvent:e.deleteFromEvent,member:t.userInfo,reload:n,showDeleteFromEvent:e.showDeleteFromEvent,showDocumentsDownload:e.showDocumentsDownload,volunteerRegistrationId:t.id}),renderRowPanels:(t,s)=>(0,i.jsx)(uE,{accreditationsPanelPath:hg.DELEGATION_MEMBER_ACCREDITATIONS({organizationId:n,eventId:o,delegationId:a,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),availabilitiesPanelPath:hg.DELEGATION_MEMBER_AVAILABILITIES({organizationId:n,eventId:o,delegationId:a,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),canCheckIn:!1,canDeleteCheckedIn:!1,canDeletePosition:()=>!1,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:!0,defaultHiddenAccreditationsSlotsIds:te,delegation:H.event.delegation,eventId:o,informationPanelPath:hg.DELEGATION_MEMBER_INFORMATION({organizationId:n,eventId:o,delegationId:a,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),organizationId:n,positionsPanelPath:hg.DELEGATION_MEMBER_POSITIONS({organizationId:n,eventId:o,delegationId:a,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),reloadRow:s,returnPathFallback:e.delegationsSpaceLayoutTab?hg.DELEGATION_TAB({organizationId:n,eventId:o,slug:e.delegationsSpaceLayoutTab?.slug,delegationId:a}):hg.DELEGATION_MEMBERS({organizationId:n,eventId:o,delegationId:a}),volunteerRegistration:t})})})},OT=e=>{const{history:t,params:{organizationId:n}}=Hf(),o=(0,r.useMemo)(()=>(e.user.events||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name,onClick(){t.push(Tm.EVENT({organizationId:n,eventId:e.id}))}})),[e.user]);return(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:o})})},RT=e=>{const{translate:t,params:{organizationId:n}}=Hf(),o=Ti(jl),{mutate:a}=function(e={}){return Di("mutation UserInfoUpdateField(\n $organizationId: OrganizationId!\n $userInfoId: UsersInfoId!\n $slug: String!\n $value: JSON!\n) {\n userInfoUpdateField(\n organizationId: $organizationId\n userInfoId: $userInfoId\n slug: $slug\n value: $value\n ) {\n id\n }\n}\n",e)}(),s=(0,r.useCallback)((t,i)=>a({organizationId:n,userInfoId:e.row.id,slug:i,value:t}),[e.row,a]),d=(0,r.useMemo)(()=>(e.row.formsUsersInfos||[]).flatMap(e=>e.form?[{id:e.form.id,color:"gray",icon:null,text:e.form.name}]:[]),[e.row.formsUsersInfos]),l=(0,r.useMemo)(()=>(e.row.formsUsersInfos||[]).flatMap(e=>e.form?[`${e.form.name} : ${o.toLocaleString(e.insertedAt.toLocal(),oa.DateTime)}`]:[]).join(", "),[e.row.formsUsersInfos]),c=(0,r.useMemo)(()=>(e.row.delegations||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.row.delegations]),u=(0,r.useMemo)(()=>(0,od.A)(e.row.delegations||[],e=>e.delegationCategory.id).map(e=>({id:e.delegationCategory.id,color:"gray",icon:null,text:e.delegationCategory.name})),[e.row.delegations]),m=(0,r.useMemo)(()=>(e.row.emails??[]).map(e=>{const{color:n,leftIcon:i}=VA(e.state);return{id:e.id,color:n,icon:i,text:`${e.campaign?.name??""} - ${t(e.state)}`}}),[e.row.emails]),g=(0,r.useMemo)(()=>(e.row.tags||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.row.tags]);return"name"===e.column.slug?(0,i.jsx)(RA,{clickPath:e.informationPanelPath,column:e.column,mutate:s,reload:e.reloadRow,updatable:e.updatable,userInfo:e.row}):"id"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.id}):"local_id"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.localId}):"duplicatedFrom"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.duplicatedFrom?(0,i.jsx)(sA,{size:32,userInfo:e.row.duplicatedFrom}):null}):"email"===e.column.slug?(0,i.jsx)(OA,{clickPath:e.informationPanelPath??Yf.MEMBER_INFORMATION({organizationId:n,userInfoId:e.row.id}),column:e.column,reload:e.reloadRow,updatable:e.updatable,userInfo:e.row}):"events"===e.column.slug?(0,i.jsx)(OT,{column:e.column,user:e.row}):"number_of_events"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.events?.length??0}):"forms"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:d})}):"forms_inserted_at"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Li,{css:{ellipsis:!0},title:l,children:l})}):"delegations"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:c})}):"delegations_categories"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:u})}):"inserted_at"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:o.toLocaleString(e.row.insertedAt.toLocal(),oa.DateTime)}):"last_seen_at"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.lastSeenAt?.isValid?o.toLocaleString(e.row.lastSeenAt.toLocal(),oa.DateTime):""}):"campaigns_states"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:m})}):"tags"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(bA,{badges:g})}):"comments"===e.column.slug?(0,i.jsx)(yv,{minWidth:e.column.minWidth,width:e.column.width,children:h(e.row.comments)?e.row.comments.map(e=>e.content).join("; "):""}):"roles"===e.column.slug?(0,i.jsx)(MA,{minWidth:e.column.minWidth,userPermissions:e.row,width:e.column.width}):(0,i.jsx)(TA,{avatarUser:e.row,clickPath:e.informationPanelPath??Yf.MEMBER_INFORMATION({organizationId:n,userInfoId:e.row.id}),column:e.column,customField:e.customField,fields:e.row.fields,mutate:s,reload:e.reloadRow,updatable:e.updatable})},MT=e=>{const{params:{organizationId:t}}=Hf();return(0,i.jsx)(Is.dO,{children:e.informationPanelPath&&e.delegation&&(0,i.jsx)(Is.qh,{path:e.informationPanelPath,children:(0,i.jsx)(LC,{organizationId:t,delegation:e.delegation,userInfoId:e.userInfo.id,returnPathFallback:e.informationPanelPath})})})},DT=e=>{const{translate:t,params:{organizationId:n,delegationId:o}}=Hf(),a=Ti(hp),s=Pi(),[d,l,c]=qj(n,"organizationDelegationMembers.columns",e.columns),[u,g,h]=qj(n,"organizationDelegationMembers.limit",25),[p,f,I]=qj(n,"organizationDelegationMembers.predicates",[]),_=(0,r.useMemo)(()=>Kg(p),[p]),[y,x,S]=qj(n,"organizationDelegationMembers.sort",null),{data:v,isLoading:b}=Mi("query OrganizationDelegationMembersInfos(\n $organizationId: OrganizationId!\n $delegationId: DelegationId!\n $privacy: CustomFieldPrivacy!\n) {\n organization(id: $organizationId) {\n customFields(variety: UserInfo, privacy: $privacy) {\n nodes {\n ...SegmentCustomField\n }\n }\n\n delegation(id: $delegationId) {\n id\n columnsCustomFields {\n ...SegmentCustomField\n }\n\n form {\n id\n elements {\n customField {\n ...SegmentCustomField\n }\n }\n }\n }\n }\n}\n",{organizationId:n,privacy:e.canCustomFieldRead?pe.All:pe.Public,delegationId:o},[Yo.SegmentCustomFieldFragment]);const j=c||h||I||S||b,A=(0,r.useMemo)(()=>e.canCustomFieldRead?v.organization?.customFields.nodes??[]:(0,bs.A)((v.organization?.delegation.form.elements.map(e=>e.customField)||[]).concat(v.organization?.delegation.columnsCustomFields??[])),[v.organization]),C=Hj(A),E=(0,r.useMemo)(()=>a.getDelegationMembersFilters(A),[A]),T=(0,r.useMemo)(()=>a.getDelegationMembersPossibleColumns(A),[A]);return(0,r.useEffect)(()=>{s.setItem(OI.DELEGATIONS_SPACE_TAB,"members")},[]),j?(0,i.jsx)(xo,{}):(0,i.jsx)(Bj,{columns:e.canEditColumns?d:e.columns,columnsSearch:[],columnsToIncludes:gp,eventId:null,filters:E,limit:u,loadDataList:Fa,loadDataListParams:{delegationId:o},loadRow:La,organizationId:n,possibleColumns:T,predicates:_,renderActions:(t,n,a)=>(0,i.jsx)(ST,{campaigns:e.campaigns,canMemberEdit:e.canMemberEdit,customFields:A,deleteFromEvent:!1,massActions:t,predicates:_,scope:{delegationId:o},showAccreditationsEdit:!1,showAccreditationsValidate:!1,showDelete:e.canMemberDelete,showPrint:!1,showWishedAccreditationsEdit:!1,showWishedProfileEdit:!1,sort:y,totalCount:n,onMassEditSuccess:a}),renderAllSelectedText:e=>t("les_1_membres_71180",e),renderPageSelectedText:e=>t("les_1_membres_00895",e),renderSelectAllText:e=>t("s_lectionner_le_45277",e),rendering:Ed.List,setColumns:l,setLimit:g,setPredicates:f,setSort:x,showEditColumns:e.canEditColumns,showEditMode:e.showEditMode,showFilters:!0,showMassActions:!0,showPredicatesBadges:!0,showRowDropdown:!0,showRowEdit:e.canMemberEdit,showSearchColumns:!1,showSelectAll:!0,sort:y,children:(0,i.jsx)(iA,{getEditPath:e.getEditPath,renderCell:(t,a,s)=>(0,i.jsx)(RT,{column:t,customField:C.get(t.slug),informationPanelPath:o?`${window.location.origin}${hg.DELEGATION_MEMBER_INFORMATION({organizationId:n,delegationId:o,userInfoId:a.id})}`:void 0,reloadRow:s,row:a,updatable:e.canMemberEdit}),renderRowDropdown:(t,n)=>(0,i.jsx)(IE,{accreditationState:null,allowedCustomDocuments:e.customBadges,canDelete:e.canMemberDelete,canDuplicate:!1,canMemberAccredit:!1,customDocuments:m,deleteFromEvent:!1,member:t,reload:n,showDeleteFromEvent:!1,showDocumentsDownload:e.showDocumentsDownload,volunteerRegistrationId:null}),renderRowPanels:e=>(0,i.jsx)(MT,{delegation:v.organization.delegation,informationPanelPath:hg.DELEGATION_MEMBER_INFORMATION({organizationId:n,delegationId:o,userInfoId:e.id}),userInfo:e})})})},wT=e=>(0,i.jsx)(G,{align:"end",css:{background:"gray"===e.background?"$gray50":"none",borderRight:"1px solid $gray200",overflow:"hidden",px:"$4"},direction:"column",height:1,justify:"center",width:1,children:e.children}),$T=(0,r.createContext)({});function PT(){return(0,r.useContext)($T)}const NT=e=>{const{translate:t}=Hf(),n=Ti(fm),{accreditationIdToOpen:o,accreditationIdToValues:a,accreditationKeyToStats:s,accreditationValueKeyToStats:d,dates:l,hasNoDate:c,hasScanned:u,showTotal:m}=PT(),g=s[`a${e.accreditation.id}__no_date`],p=a[e.accreditation.id]||[],f=h(p),I=o[e.accreditation.id]??!0,{assignedTotal:_,scannedTotal:y}=(0,r.useMemo)(()=>{const t=(0,bs.A)(l.map(t=>s[`a${e.accreditation.id}__${t.toSQLDate()}`]));return{assignedTotal:(0,Sr.A)(t,e=>e.assigned??0)+(c?g?.assigned??0:0),scannedTotal:(0,Sr.A)(t,e=>e.scanned??0)+(c?g?.scanned??0:0)}},[s,g,l,c,e.accreditation]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[l.map(o=>{const a=`a${e.accreditation.id}__${o.toSQLDate()}`,r=s[a];return e.accreditation.hasDateSlots?(0,i.jsxs)(wT,{background:"none",children:[(0,i.jsxs)(Li,{children:[r?.assigned??0,n.toNumberOrInfinity(r?.max,{prefix:"/"})]}),u&&(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:r?.scanned?t("_1_scann_e_19753",r.scanned):"-"})]},o.toISO()):(0,i.jsx)(wT,{background:"none"},o.toISO())}),c&&(e.accreditation.hasDateSlots?(0,i.jsx)(wT,{background:"none"}):(0,i.jsxs)(wT,{background:"none",children:[(0,i.jsxs)(Li,{children:[g?.assigned??0,n.toNumberOrInfinity(g?.max,{prefix:"/"})]}),u&&(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:g?.scanned?t("_1_scann_e_19753",g.scanned):"-"})]})),m&&(0,i.jsxs)(wT,{background:"none",children:[(0,i.jsxs)(Li,{children:[_,n.toNumberOrEmpty(e.accreditation.maxResources,{prefix:"/"})]}),u&&(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:y>0?t("_1_scann_e_19753",y):"-"})]})]}),I&&f&&p.map(({id:n})=>{const o=d[`a${e.accreditation.id}__${n}__no_date`];return(0,i.jsxs)(G,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[l.map(o=>{const a=`a${e.accreditation.id}__${n}__${o.toSQLDate()}`,s=d[a];return e.accreditation.hasDateSlots?(0,i.jsxs)(wT,{background:"none",children:[(0,i.jsx)(Li,{children:s?.assigned??0}),u&&(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:s?.scanned?t("_1_scann_e_19753",s.scanned):"-"})]},o.toISO()):(0,i.jsx)(wT,{background:"none"},o.toISO())}),c&&(e.accreditation.hasDateSlots?(0,i.jsx)(wT,{background:"none"}):(0,i.jsxs)(wT,{background:"none",children:[(0,i.jsx)(Li,{children:o?.assigned??0}),u&&(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:o?.scanned?t("_1_scann_e_19753",o.scanned):"-"})]})),m&&(0,i.jsx)(wT,{background:"none"})]},n)})]})},kT=e=>{const{translate:t}=Hf(),n=Ti(fm),{categoryIdToAccreditations:o,categoryIdToOpen:a,categoryKeyToStats:s,dates:d,hasNoDate:l,hasScanned:c,showTotal:u}=PT(),m=(0,r.useMemo)(()=>o[e.category.id],[o,e.category.id]),g=a[e.category.id]??!0,h=s[`c${e.category.id}__no_date`],{assignedTotal:p,scannedTotal:f}=(0,r.useMemo)(()=>{const t=(0,bs.A)(d.map(t=>s[`c${e.category.id}__${t.toSQLDate()}`]));return{assignedTotal:(0,Sr.A)(t,e=>e.assigned??0)+(l?h?.assigned??0:0),scannedTotal:(0,Sr.A)(t,e=>e.scanned??0)+(l?h?.scanned??0:0)}},[s,d,l,h,e.category]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[d.map(n=>{const o=`c${e.category.id}__${n.toSQLDate()}`,a=s[o];return(0,i.jsxs)(wT,{background:"gray",children:[(0,i.jsx)(Li,{children:a?.assigned??0}),c&&(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:a?.scanned?t("_1_scann_e_19753",a.scanned):"-"})]},n.toISO())}),l&&(0,i.jsxs)(wT,{background:"gray",children:[(0,i.jsx)(Li,{children:h?.assigned??0}),c&&(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:h?.scanned?t("_1_scann_e_19753",h.scanned):"-"})]}),u&&(0,i.jsxs)(wT,{background:"gray",children:[(0,i.jsxs)(Li,{children:[p,n.toNumberOrEmpty(e.category.maxResources,{prefix:"/"})]}),c&&(0,i.jsx)(Li,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:f>0?t("_1_scann_e_19753",f):"-"})]})]}),g?m.map(e=>(0,i.jsx)(NT,{accreditation:e},e.id)):null]})},zT=e=>{const{translate:t}=Hf(),{categories:n,categoryIdToAccreditations:o,customFields:a,links:s,setLinks:d}=PT(),[l,c]=(0,r.useState)(s),u=(0,r.useMemo)(()=>(0,vs.A)(a,e=>y(e.name)).filter(e=>!e.canSelectMultiple).map(e=>(0,i.jsx)("option",{value:e.slug,children:e.name},e.id)),[a]),m=(0,r.useCallback)((e,t)=>{c((0,hv.jM)(n=>{n[e].customFieldSlug=t}))},[c]),g=(0,r.useCallback)((e,t)=>{c((0,hv.jM)(n=>{n[e].accreditationsIds=t}))},[c]),p=l.every(e=>""!==e.customFieldSlug&&h(e.accreditationsIds));return(0,i.jsxs)(Eb,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(bC,{children:t("ventiler_les_st_00770")}),(0,i.jsx)(Tb,{css:{padding:"$6"},children:(0,i.jsxs)(G,{direction:"column",gap:"3",children:[l.map((e,a)=>(0,i.jsxs)(G,{css:{bd:!0},direction:"column",children:[(0,i.jsxs)(G,{align:"center",css:{borderBottom:"1px solid $gray200",padding:"$5 $6 $4 $6"},gap:"4",children:[(0,i.jsx)(Li,{css:{flex:"1"},font:"gray800 textMd medium",children:t("liaison_n_1_48160",a+1)}),(0,i.jsx)(jo,{color:"white",leftIcon:"trash-can",size:"sm",onClick:()=>c(I(l,a))})]}),(0,i.jsxs)(G,{css:{padding:"$4 $6 $6 $6"},direction:"column",gap:"4",children:[(0,i.jsx)(Qx,{isSearchVisible:!0,label:t("CustomField"),values:[e.customFieldSlug],onChange:e=>{h(e)&&m(a,e[0])},children:u}),(0,i.jsx)(Qx,{isSearchVisible:!0,label:t("accr_ditations_39450"),multiple:!0,values:e.accreditationsIds,onChange:e=>g(a,e),children:n.map(e=>{const t=o[e.id];return(0,i.jsx)("optgroup",{label:e.name,children:t.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},e.id)})})]})]},a)),(0,i.jsx)(jo,{color:"invisible",leftIcon:"plus",onClick:()=>c([...l,{accreditationsIds:[],customFieldSlug:""}]),children:t("ajouter_une_lia_43639")})]})}),(0,i.jsx)(Ob,{children:(0,i.jsxs)(G,{gap:"3",justify:"end",width:1,children:[(0,i.jsx)(jo,{color:"white",onClick:e.onClose,children:t("annuler_48254")}),(0,i.jsx)(jo,{disabled:!p,onClick:()=>{d(l),e.onClose()},children:t("ventiler_10014")})]})})]})},LT=e=>{const{accreditationIdToOpen:t,accreditationIdToValues:n,setAccreditationIdToOpen:o}=PT(),a=n[e.accreditation.id]||[],s=h(a),r=t[e.accreditation.id]??!0;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{align:"center",css:{borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",cursor:s?"pointer":"default",height:"$cellHeightSm",paddingLeft:"$6",paddingRight:"$4",userSelect:"none"},gap:"2",onClick:()=>{s&&o(t=>({...t,[e.accreditation.id]:!(t[e.accreditation.id]??1)}))},children:[(0,i.jsx)(Li,{css:{visibility:s?"visible":"hidden"},children:(0,i.jsx)(_o,{icon:r?"chevron-up":"chevron-right"})}),(0,i.jsx)(yy,{color:e.accreditation.color,icon:e.accreditation.icon,size:"sm"}),(0,i.jsx)(G,{align:"center",css:{flex:"1",overflow:"hidden"},height:1,wrap:"wrap",children:(0,i.jsx)(Li,{color:"gray800",title:e.accreditation.name,children:e.accreditation.name})})]}),r&&s&&a.map(({id:e,value:t})=>(0,i.jsx)(G,{align:"center",css:{borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",height:"$cellHeightSm",paddingLeft:"88px",paddingRight:"$4",userSelect:"none"},gap:"2",children:t},e))]})},FT=e=>{const{categoryIdToAccreditations:t,categoryIdToOpen:n,setCategoryIdToOpen:o}=PT(),a=(0,r.useMemo)(()=>t[e.category.id],[t,e.category.id]),s=n[e.category.id]??!0;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{align:"center",css:{background:"$gray50",borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",cursor:"pointer",height:"$cellHeightSm",px:"$4",userSelect:"none"},gap:"2",onClick:()=>o(t=>({...t,[e.category.id]:!(t[e.category.id]??1)})),children:[(0,i.jsx)(Li,{children:(0,i.jsx)(_o,{icon:s?"chevron-up":"chevron-right"})}),(0,i.jsx)(Li,{css:{textTransform:"uppercase"},font:"gray800 textXs medium",children:e.category.name})]}),s?a.map(e=>(0,i.jsx)(LT,{accreditation:e},e.id)):null]})},UT=()=>{const{translate:e}=Hf(),{categories:t,links:n,hideOptions:o}=PT(),[a,s]=(0,r.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{css:{width:"calc(2 * $cellWidth)"},direction:"column",children:[(0,i.jsx)(G,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},width:1,children:!o&&(0,i.jsx)(jo,{color:"white",size:"sm",onClick:()=>s(!0),children:`${e("ventiler_par_ch_78972")} (${n.length})`})}),t.map(e=>(0,i.jsx)(FT,{category:e},e.id))]}),a&&(0,i.jsx)(zT,{onClose:()=>s(!1)})]})},BT=e=>{const{translate:t}=Hf(),n=Ti(jl),o=(0,r.useMemo)(()=>(0,vs.A)((0,od.A)(e.slots.flatMap(e=>e.date?.isValid?[e.date.startOf("day")]:[]),e=>e.toMillis()),e=>e.toMillis()),[e.slots]),a=(0,r.useMemo)(()=>e.slots.some(e=>!e.date?.isValid),[e.slots]),s=(0,r.useMemo)(()=>e.slots.some(e=>(e.scannedResources??0)>0),[e.slots]),d=(0,r.useMemo)(()=>e.showTotal&&(h(o)||e.categories.some(e=>"number"==typeof e.maxResources)||e.accreditations.some(e=>"number"==typeof e.maxResources)),[o,e.accreditations,e.categories,e.showTotal]),l=(0,r.useMemo)(()=>(0,vs.A)(e.categories,e=>y(e.name)),[e.categories]),[c,u]=(0,r.useState)({}),[m,g]=(0,r.useState)({}),p=(0,r.useMemo)(()=>(0,ym.A)(dy(e.accreditations),e=>e.accreditationCategoryId),[e.accreditations]),f=(0,r.useMemo)(()=>Object.fromEntries(e.accreditations.map(t=>{const n=e.links.find(e=>e.accreditationsIds.includes(t.id));if(n){const i=(0,vs.A)(e.customFields.find(e=>e.slug===n.customFieldSlug)?.values??[],e=>y(e.value));return[t.id,i]}return[t.id,[]]})),[e.accreditations,e.customFields,e.links]),I=(0,r.useMemo)(()=>(0,cy.A)((0,ym.A)(e.slots,e=>{const t=e.date?.isValid?e.date.startOf("day").toSQLDate():"no_date";return`c${e.accreditationCategoryId}__${t}`}),e=>({assigned:(0,Sr.A)(e,e=>e.assignedResources),scanned:(0,Sr.A)(e,e=>e.scannedResources??0)})),[e.slots]),_=(0,r.useMemo)(()=>Object.fromEntries(e.slots.map(e=>{const t=e.date?.isValid?e.date.startOf("day").toSQLDate():"no_date";return[`a${e.accreditationId}__${t}`,{assigned:e.assignedResources,max:e.maxResources,scanned:e.scannedResources??0}]})),[e.slots]),x=(0,r.useMemo)(()=>Object.fromEntries(e.slots.flatMap(e=>Object.entries(e.resourcesByFields).flatMap(([t,n])=>{const i=e.date?.isValid?e.date.startOf("day").toSQLDate():"no_date";return n.map(({customFieldValueId:t,assignedResources:n,scannedResources:o})=>[`a${e.accreditationId}__${t}__${i}`,{assigned:n,scanned:o}])}))),[e.slots]);return(0,i.jsx)($T.Provider,{value:{accreditationKeyToStats:_,accreditationValueKeyToStats:x,accreditationIdToOpen:m,accreditationIdToValues:f,categories:l,categoryIdToAccreditations:p,categoryIdToOpen:c,categoryKeyToStats:I,customFields:e.customFields,dates:o,hasNoDate:a,hasScanned:s,hideOptions:e.hideOptions,links:e.links,showTotal:d,setAccreditationIdToOpen:g,setCategoryIdToOpen:u,setLinks:e.setLinks},children:(0,i.jsxs)(G,{css:{background:"white",border:"1px solid $gray200"},children:[(0,i.jsx)(UT,{}),(0,i.jsx)(G,{css:{flex:"1",overflowX:"auto"},children:(0,i.jsxs)(G,{direction:"column",children:[(0,i.jsxs)(G,{css:{height:"$cellHeightSm"},children:[o.map(e=>(0,i.jsx)(G,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},justify:"center",width:120,children:(0,i.jsx)(Li,{font:"gray800 textSm medium",children:n.toLocaleString(e,oa.DateOnly.MonthShort)})},e.toISO())),a&&(0,i.jsx)(G,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},justify:"center",width:120,children:(0,i.jsx)(Li,{font:"gray800 textSm medium",textAlign:"center",children:t("tout_l_v_nemen_70929")})}),d&&(0,i.jsx)(G,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},justify:"center",width:120,children:(0,i.jsx)(Li,{font:"gray800 textSm medium",children:t("total_07173")})})]}),l.map(e=>(0,i.jsx)(kT,{category:e},e.id))]})})]})})},GT=e=>{const t=wI(),n=(0,r.useMemo)(()=>e.min.startOf("week").equals(e.value.startOf("week")),[e.min,e.value]),o=(0,r.useMemo)(()=>e.max.endOf("week").equals(e.value.endOf("week")),[e.max,e.value]);return(0,i.jsxs)(G,{gap:"2",children:[(0,i.jsx)(jo,{color:"white",disabled:n,leftIcon:"chevron-left",onClick:()=>{e.onChange(e.value.minus(t?{week:1}:{day:1}))}}),(0,i.jsx)(Li,{width:160,children:(0,i.jsx)(Jy,{...e})}),(0,i.jsx)(jo,{color:"white",disabled:o,leftIcon:"chevron-right",onClick:()=>{e.onChange(e.value.plus(t?{week:1}:{day:1}))}})]})},VT=(0,r.createContext)({}),WT=e=>{const{days:t,interval:n}=(0,r.useContext)(VT),o=t[0],a=t[6]??t[0],s=(0,r.useMemo)(()=>(e.startAt??Vo.c9.max(o,n.start)).startOf("day"),[e.startAt,o,n]),d=(0,r.useMemo)(()=>(e.endAt??Vo.c9.min(a,n.end)).endOf("day"),[e.endAt,a,n]),l=(0,r.useMemo)(()=>"number"==typeof e.startHour&&e.startHour>0&&e.startAt?.isValid&&e.startAt.hour{const e=Math.max(s.diff(o,"days").days+1,1);return l?e-1:e},[l,s,o]),u=(0,r.useMemo)(()=>{const e=Math.min(Math.ceil(d.diff(o,"days").days)+1,8);return l?e-1:e},[l,d,o]);return s>a||d{const t=(0,r.useMemo)(()=>{if("week"===e.display){const t=e.date.startOf("week");return(0,dm.A)(0,7).map(e=>t.plus({day:e}))}return[e.date]},[e.date]),n=(0,r.useMemo)(()=>Vo.IX.fromDateTimes(e.minDate.startOf("day"),e.maxDate.endOf("day")),[e.minDate,e.maxDate]),[o,a]=(0,r.useState)(300),s=(0,r.useCallback)(e=>{if(e){const t=Math.max(Math.ceil(e.getBoundingClientRect().height),300);a(t)}},[e.date,a]),d=e.showBorder?{bd:!0,overflow:"hidden"}:{};return(0,i.jsx)(VT.Provider,{value:{days:t,interval:n},children:(0,i.jsxs)(G,{css:{...d,...e.css},direction:"column",children:[(0,i.jsx)(G,{css:{borderBottom:"1px solid $gray200"},height:60,width:1,children:t.map(e=>(0,i.jsxs)(G,{align:"center",css:{background:"$gray50"},direction:"column",height:1,justify:"center",width:1,children:[(0,i.jsx)(Li,{css:{textTransform:"capitalize"},font:"gray500 textXs medium",children:e.toLocaleString({weekday:"long"})}),(0,i.jsx)(Li,{font:"gray800 textXl semiBold",children:e.day})]},e.toISO()))}),(0,i.jsxs)(G,{className:"h-calendar-events-container",css:{position:"relative"},direction:"column",height:o,width:1,children:[(0,i.jsx)(zI,{css:{flex:"1","& > div:last-child":{borderRight:"none"}},gridtemplatecolumns:"week"===e.display?"repeat(7, minmax(0, 1fr))":"1",gridtemplaterows:"1fr",width:1,children:t.map((e,t)=>(0,i.jsx)(G,{css:{background:n.contains(e)?"white":"$primary50",borderRight:"1px solid $gray200",gridColumn:`${t+1} / ${t+2}`,gridRow:"1 / 2"}},e.toISO()))}),(0,i.jsx)(zI,{ref:s,css:{gridAutoFlow:"column",rowGap:"$2",position:"absolute",top:"0",py:"$2"},gridtemplatecolumns:"week"===e.display?"repeat(7, minmax(0, 1fr))":"1",width:1,children:e.children})]})]})})},YT=e=>(0,i.jsxs)(G,{align:"center",gap:"2",width:1,children:[(0,i.jsx)(Li,{children:(0,i.jsx)(_o,{icon:e.icon})}),(0,i.jsx)(Li,{css:{flex:"1"},fontSize:"textXs",children:e.text}),(0,i.jsx)(G,{align:"center",css:{background:e.background,borderRadius:"$1",fontSize:"$textXs",fontWeight:"$medium",padding:"2px 8px",minWidth:"30px"},justify:"center",children:e.count})]}),HT=n.p+"img/unavailableCell-148d1ec075614a0e294d.png",ZT=R(Li,{alignItems:"center",color:"$gray900",display:"flex",height:"40px",justifyContent:"center",variants:{border:{gray100:{borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100"},gray200:{borderBottom:"1px solid $gray200",borderRight:"1px solid $gray200"}}},defaultVariants:{border:"gray100"}}),KT=(R(Li,{alignItems:"center",borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100",color:"$gray700",display:"flex",gap:"$2",height:"48px",px:"$4",width:"200px"}),R(Li,{alignItems:"center",borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100",color:"$gray800",display:"flex",height:"48px",padding:"$2",width:"100px","& > div":{alignItems:"center",background:"$success400",borderRadius:"$1",display:"flex",height:"100%",justifyContent:"center",width:"100%","& svg":{height:"50%"}}}),R(Li,{background:`url(${HT}) no-repeat`,borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100",color:"$gray700",height:"48px",width:"100px"}),e=>{const{translate:t}=Hf();return(0,i.jsx)(jv,{children:(0,i.jsxs)(yv,{children:[(0,i.jsx)(Li,{css:{flex:"1"},children:(0,i.jsx)(sA,{userInfo:e.userInfo})}),(0,i.jsx)(G,{align:"center",gap:"3",children:e.isAssigned?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{align:"center",gap:"1",children:[(0,i.jsx)(Li,{color:"success500",children:(0,i.jsx)(_o,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)(Li,{font:"gray800 textXs medium",children:e.assignedText})]}),(0,i.jsxs)(F_,{children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(jo,{color:"white",leftIcon:"ellipsis-vertical",size:"sm"})}),(0,i.jsx)(K_,{placement:"bottom-end",children:(0,i.jsx)(H_,{color:"red",icon:"trash-can",onClick:e.onDelete,children:e.deleteText})})]})]}):(0,i.jsx)(jo,{size:"sm",onClick:e.onAdd,children:t("ajouter_97327")})})]})})}),QT=e=>{const{translate:t}=Hf();return(0,i.jsx)(G,{css:{background:"white",bd:!0,padding:"$4 $6"},direction:"column",gap:"2",children:e.isLoading?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(UI,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(UI,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(UI,{borderRadius:"$1",height:20,width:1})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,i.jsx)(Li,{children:(0,i.jsx)(_o,{icon:"badge-check"})}),(0,i.jsx)(Li,{css:{flex:"1"},children:t("attribu_es_48167")}),(0,i.jsx)(Li,{children:e.stats.assignedResources})]}),(0,i.jsxs)(G,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,i.jsx)(Li,{children:(0,i.jsx)(_o,{icon:"hand-holding-heart"})}),(0,i.jsx)(Li,{css:{flex:"1"},children:t("souhait_es_78101")}),(0,i.jsx)(Li,{children:e.stats.wishedResources})]}),void 0!==e.stats.scannedResources&&(0,i.jsxs)(G,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,i.jsx)(Li,{children:(0,i.jsx)(_o,{icon:"scanner-gun"})}),(0,i.jsx)(Li,{css:{flex:"1"},children:t("scann_es_13169")}),(0,i.jsx)(Li,{children:e.stats.scannedResources})]})]})})},XT=e=>{const{translate:t}=Hf(),[n,o]=(0,r.useState)(!1),[a,s]=(0,r.useState)(e.stats),[d,l]=(0,r.useState)((0,vs.A)(e.members,e=>y(e.userInfo.name))),[c,u]=(0,r.useState)({}),m=(0,r.useCallback)(async t=>{o(!0),u(e=>({...e,[t]:!0}));const{member:n,stats:i}=await e.reloadMember(t);l(e=>e.flatMap(e=>e.userInfo.id===t?n?[n]:[]:[e])),s(i),u(e=>({...e,[t]:!1})),o(!1)},[e.reloadMember,o,s,u,l]),g=(0,r.useCallback)(async t=>{u(e=>({...e,[t]:!0})),await e.add(t),await m(t)},[e.add,m,u]),h=(0,r.useCallback)(async t=>{u(e=>({...e,[t]:!0})),await e.delete(t),await m(t)},[e.delete,m,u]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(bC,{children:e.name}),(0,i.jsxs)(Tb,{css:{background:"$gray50",gap:"$6",padding:"$6"},children:[(0,i.jsx)(QT,{isLoading:n,stats:a}),(0,i.jsxs)(Av,{children:[(0,i.jsx)(Sv,{children:(0,i.jsx)(ZT,{children:t("nom_du_membre_69353")})}),d.map(t=>c[t.userInfo.id]?(0,i.jsx)(Kj,{bx:!0},t.id):(0,i.jsx)(KT,{assignedText:e.assignedText,deleteText:e.deleteText,isAssigned:e.isAssigned(t),userInfo:t.userInfo,onAdd:()=>g(t.userInfo.id),onDelete:()=>h(t.userInfo.id)},t.id))]})]})]})},JT=e=>{const{params:{eventId:t,delegationId:n},translate:o}=Hf(),{mutate:a}=Da(),s=(0,r.useMemo)(()=>`${e.accreditation.name}${v(e.accreditationSlot.name)?` - ${e.accreditationSlot.name}`:""}`,[e.accreditation,e.accreditationSlot]),d=(0,r.useCallback)(t=>t.accreditationsUsersInfos.some(t=>t.accreditationSlotId===e.accreditationSlotId),[e.accreditationSlotId]),l=(0,r.useCallback)(async i=>{const{event:o}=await(a={eventId:t,delegationId:n,accreditationSlotId:e.accreditationSlotId,userInfoId:i},s=await va(),Oa("query CalendarAccreditationSlotMember(\n $eventId: EventId!\n $delegationId: DelegationId\n $accreditationSlotId: AccreditationsSlotId!\n $userInfoId: UsersInfoId!\n) {\n event(id: $eventId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...AccreditationSlotStats\n }\n\n delegationMaybe(id: $delegationId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...DelegationAccreditationSlotStats\n }\n }\n\n member: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n ...VolunteerRegistrationDelegationAccreditationSlot\n }\n }\n}\n",{variables:a,token:s||void 0,fragments:[Yo.AccreditationSlotStatsFragment,Yo.DelegationAccreditationSlotStatsFragment,Yo.VolunteerRegistrationDelegationAccreditationSlotFragment]}));var a,s;const r=o.member.accreditationsSlots.some(t=>t.id===e.accreditationSlotId);return{member:d(o.member)||r?o.member:null,stats:o.delegationMaybe?.accreditationSlot??o.accreditationSlot}},[e.accreditationSlotId,n,t,d]),c=(0,r.useCallback)((n,i)=>a({eventId:t,massAccredit:{accreditationsSlotsIds:[e.accreditationSlotId],selecteds:{ids:[n]},strategy:i}}),[t,a,e.accreditationSlotId]),u=(0,r.useCallback)(e=>c(e,tt.Add),[c]),m=(0,r.useCallback)(e=>c(e,tt.Delete),[c]);return(0,i.jsx)(XT,{add:u,assignedText:o("d_j_attribu_e_06450"),delete:m,deleteText:o("retirer_l_accr_62187"),isAssigned:d,members:e.volunteersRegistrations,name:s,reloadMember:l,stats:e.stats})},eO=e=>{const{data:t,loader:n}=Mi("query AccreditationSlotMembers($eventId: EventId!, $accreditationSlotId: AccreditationsSlotId!) {\n event(id: $eventId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...AccreditationSlotStats\n date\n name\n\n accreditation {\n name\n }\n\n volunteersRegistrations {\n ...VolunteerRegistrationDelegationAccreditationSlot\n }\n }\n }\n}\n",{eventId:e.eventId,accreditationSlotId:e.accreditationSlotId},[Yo.AccreditationSlotStatsFragment,Yo.VolunteerRegistrationDelegationAccreditationSlotFragment]);return(0,i.jsx)(Eb,{size:"md",onClose:e.onClose,children:n||(0,i.jsx)(JT,{accreditation:t.event.accreditationSlot.accreditation,accreditationSlot:t.event.accreditationSlot,accreditationSlotId:e.accreditationSlotId,stats:t.event.accreditationSlot,volunteersRegistrations:t.event.accreditationSlot.volunteersRegistrations})})},tO=e=>{const{data:t,loader:n}=Mi("query DelegationAccreditationSlotMembers(\n $eventId: EventId!\n $delegationId: DelegationId!\n $accreditationSlotId: AccreditationsSlotId!\n) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...DelegationAccreditationSlotStats\n\n accreditationSlot {\n date\n name\n }\n\n accreditation {\n name\n }\n\n volunteersRegistrations {\n ...VolunteerRegistrationDelegationAccreditationSlot\n }\n }\n }\n }\n}\n",{eventId:e.eventId,delegationId:e.delegationId,accreditationSlotId:e.accreditationSlotId},[Yo.DelegationAccreditationSlotStatsFragment,Yo.VolunteerRegistrationDelegationAccreditationSlotFragment]);return(0,i.jsx)(Eb,{size:"md",onClose:e.onClose,children:n||(0,i.jsx)(JT,{accreditation:t.event.delegation.accreditationSlot.accreditation,accreditationSlot:t.event.delegation.accreditationSlot.accreditationSlot,accreditationSlotId:e.accreditationSlotId,stats:t.event.delegation.accreditationSlot,volunteersRegistrations:t.event.delegation.accreditationSlot.volunteersRegistrations})})},nO=e=>{const{translate:t,params:{eventId:n,delegationId:o}}=Hf(),[a,s]=(0,r.useState)(e.stats),d=(0,r.useMemo)(()=>hy(e.accreditation.color),[e.accreditation]),l=(0,r.useMemo)(()=>({background:d[50],border:`1px solid ${d[500]}`,color:d[700]}),[d]),c=(0,r.useMemo)(()=>`${e.accreditation.name}${v(e.accreditationSlot.name)?` - ${e.accreditationSlot.name}`:""}`,[e.accreditation,e.accreditationSlot]),u=(0,r.useCallback)(async()=>{if(o){const{event:{delegation:a}}=await(t={eventId:n,delegationId:o,accreditationSlotId:e.accreditationSlot.id},i=await va(),Oa("query DelegationAccreditationSlotStats(\n $eventId: EventId!\n $delegationId: DelegationId!\n $accreditationSlotId: AccreditationsSlotId!\n) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...DelegationAccreditationSlotStats\n }\n }\n }\n}\n",{variables:t,token:i||void 0,fragments:[Yo.DelegationAccreditationSlotStatsFragment]}));s(a.accreditationSlot)}else{const{event:{accreditationSlot:t}}=await function(e,t){return Oa("query AccreditationSlotStats($eventId: EventId!, $accreditationSlotId: AccreditationsSlotId!) {\n event(id: $eventId) {\n accreditationSlot(id: $accreditationSlotId) {\n assignedResources\n maxResources\n scannedResources\n wishedResources\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:n,accreditationSlotId:e.accreditationSlot.id},await va());s(t)}var t,i},[e.accreditationSlot,s]),[m,g]=(0,r.useState)(!1),h=a.maxResources?`/${a.maxResources}`:"",p=`${a.assignedResources}${h}`;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{align:"start",css:{...l,borderRadius:"$1",cursor:e.canMemberAccredit?"pointer":"default",minHeight:"32px",padding:"$2"},direction:"column",gap:"2",width:1,onClick:()=>{e.canMemberAccredit&&g(!0)},children:[(0,i.jsx)(Li,{css:{flex:"1"},fontSize:"textXs",fontWeight:"medium",children:c}),(0,i.jsx)(YT,{background:d[100],count:p,icon:"badge-check",text:t("attribu_es_48167")}),e.showWished&&"number"==typeof a.wishedResources&&(0,i.jsx)(YT,{background:d[100],count:a.wishedResources,icon:"hand-holding-heart",text:t("souhait_es_78101")}),"number"==typeof a.scannedResources&&(0,i.jsx)(YT,{background:d[100],count:a.scannedResources,icon:"scanner-gun",text:t("scann_es_13169")})]}),e.canMemberAccredit&&m?o?(0,i.jsx)(tO,{accreditationSlotId:e.accreditationSlot.id,delegationId:o,eventId:n,onClose:()=>(g(!1),u())}):(0,i.jsx)(eO,{accreditationSlotId:e.accreditationSlot.id,eventId:n,onClose:()=>(g(!1),u())}):null]})},iO=e=>{const t=wI(),n=(0,r.useMemo)(()=>(0,vs.A)(e.accreditationsSlots.filter(e=>!e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name,ry(e.accreditation.index),e.accreditation.name.toLowerCase()]),[e.accreditationsSlots]),o=(0,r.useMemo)(()=>(0,vs.A)(e.accreditationsSlots.filter(e=>e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name,ry(e.accreditation.index),e.accreditation.name.toLowerCase()]),[e.accreditationsSlots]),a=(0,r.useMemo)(()=>Object.fromEntries(e.accreditations.map(e=>[e.accreditationId,e.willAutoAccredit||e.accreditation.willAutoAccredit])),[e.accreditations]);return(0,i.jsxs)(qT,{css:{borderTop:"1px solid $gray200"},date:e.selectedDay,display:t?"week":"day",maxDate:e.event.endAt,minDate:e.event.startAt,children:[n.map(t=>(0,i.jsx)(WT,{children:(0,i.jsx)(nO,{accreditation:t.accreditation,accreditationSlot:t.accreditationSlot,canMemberAccredit:e.canMemberAccredit,showWished:!a[t.accreditationId],stats:t})},t.accreditationSlot.id)),o.map(t=>(0,i.jsx)(WT,{endAt:t.accreditationSlot.date,startAt:t.accreditationSlot.date,children:(0,i.jsx)(nO,{accreditation:t.accreditation,accreditationSlot:t.accreditationSlot,canMemberAccredit:e.canMemberAccredit,showWished:!a[t.accreditationId],stats:t})},t.accreditationSlot.id))]})},oO=e=>{const{translate:t,params:{organizationId:n}}=Hf(),[o,a]=(0,r.useState)(""),[s,d]=Yj(e.delegationsSpaceLayoutTab,e=>e.rendering,n,"eventDelegationAccreditations.rendering",bd.WeeklyCalendar,[bd.Table,bd.WeeklyCalendar]),[l,c]=(0,r.useState)(e.event.delegation.minAccreditationSlotDate),u=(0,r.useMemo)(()=>l?.isValid?l:e.event.startAt,[e.event,l]),[m,g]=(0,r.useState)(null),p=(0,r.useMemo)(()=>{const t=y(o||""),n=e.delegationsSpaceLayoutTab?.infos.accreditationsSlotsIds;return e.event.delegation.allAccreditationsSlots.filter(e=>{const i=!v(t)||y(e.accreditation.name).includes(t)||y(e.accreditationSlot.name).includes(t)||s===bd.Table&&y(e.accreditationCategory.name).includes(t),o=!m?.isValid||!!e.accreditationSlot.date?.isValid&&m.toSQLDate()===e.accreditationSlot.date.toSQLDate(),a=!h(n)||n.includes(e.accreditationSlotId);return i&&o&&a})},[e.delegationsSpaceLayoutTab,e.event,o,s,m]),f=(0,r.useMemo)(()=>p.map(e=>({accreditationCategoryId:e.accreditationCategory.id,accreditationId:e.accreditationSlot.accreditationId,date:e.accreditationSlot.date,assignedResources:e.assignedResources,maxResources:e.maxResources,resourcesByFields:e.resourcesByFields,scannedResources:e.scannedResources})),[p]),I=(0,r.useMemo)(()=>{const t=p.map(e=>e.accreditationId);return e.event.delegation.allAccreditations.filter(e=>t.includes(e.accreditationId))},[e.event,p]),_=(0,r.useMemo)(()=>I.map(e=>({id:e.accreditation.id,accreditationCategoryId:e.accreditation.accreditationCategoryId,index:e.accreditation.index,name:e.accreditation.name,color:e.accreditation.color,icon:e.accreditation.icon,hasDateSlots:e.accreditation.hasDateSlots,maxResources:e.maxResources})),[I]),x=(0,r.useMemo)(()=>{const t=p.map(e=>e.accreditationCategoryId);return e.event.delegation.allAccreditationsCategories.filter(e=>t.includes(e.accreditationCategoryId)).map(e=>({id:e.accreditationCategory.id,name:e.accreditationCategory.name,maxResources:e.maxResources}))},[p,e.event]),S=(0,r.useMemo)(()=>!e.delegationsSpaceLayoutTab,[e.delegationsSpaceLayoutTab]),b=(0,r.useMemo)(()=>v(e.delegationsSpaceLayoutTab?.infos.customFieldSlug)&&h(_)?[{accreditationsIds:_.map(e=>e.id),customFieldSlug:e.delegationsSpaceLayoutTab.infos.customFieldSlug}]:[],[e.delegationsSpaceLayoutTab,_]);return(0,i.jsxs)(G,{css:{background:"white",bd:!0,overflow:"hidden"},direction:"column",children:[(0,i.jsxs)(G,{css:{background:"white",padding:"$5 $5"},gap:"3",children:[(0,i.jsx)(Li,{width:320,children:(0,i.jsx)(EI,{icon:"magnifying-glass",placeholder:t("rechercher_une_65646"),value:o,onChange:a})}),(0,i.jsx)(Li,{css:{flex:"1"}}),s===bd.WeeklyCalendar&&(0,i.jsx)(GT,{max:e.event.endAt,min:e.event.startAt,value:u,onChange:c}),s===bd.Table&&(0,i.jsx)(Li,{width:160,children:(0,i.jsx)(Jy,{max:e.event.endAt,min:e.event.startAt,value:m,onChange:g})}),S&&(0,i.jsxs)(F_,{children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(jo,{color:"white",leftIcon:Md(s),children:Dd(t,s)})}),(0,i.jsxs)(K_,{placement:"bottom-end",children:[(0,i.jsx)(H_,{icon:Md(bd.WeeklyCalendar),onClick:()=>d(bd.WeeklyCalendar),children:Dd(t,bd.WeeklyCalendar)}),(0,i.jsx)(H_,{icon:Md(bd.Table),onClick:()=>d(bd.Table),children:Dd(t,bd.Table)})]})]})]}),s===bd.Table?(0,i.jsx)(BT,{accreditations:_,categories:x,customFields:e.organization.customFields.nodes,hideOptions:!0,links:b,setLinks:RI.A,showTotal:!0,slots:f}):(0,i.jsx)(iO,{accreditations:I,accreditationsSlots:p,canMemberAccredit:e.canMemberAccredit,event:e.event,selectedDay:u})]})},aO=()=>{const e=Oi();return(0,i.jsx)(G,{align:"center",css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs"},height:1,justify:"center",width:1,children:(0,i.jsx)(Li,{height:250,width:1,children:(0,i.jsx)(ky,{title:e("aucune_accr_dit_27643")})})})},sO=e=>{const{params:{organizationId:t,eventId:n,delegationId:o}}=Hf(),{data:a,loader:s}=Mi("query DelegationAccreditations(\n $organizationId : OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $onlyVisible: Boolean!\n) {\n organization(id: $organizationId){\n customFields(eventId: $eventId, fieldTypes: [Select], variety: UserInfo, privacy: Public){\n nodes {\n ...ConditionCustomField\n }\n }\n }\n\n event(id: $eventId) {\n startAt\n endAt\n\n delegation(id: $delegationId) {\n minAccreditationSlotDate\n\n allAccreditationsCategories {\n accreditationCategoryId\n maxResources\n\n accreditationCategory {\n id\n name\n }\n }\n\n allAccreditations {\n accreditationId\n accreditationCategoryId\n willAutoAccredit\n maxResources\n\n accreditation {\n id\n accreditationCategoryId\n name\n color\n icon\n hasSlots\n index\n willAutoAccredit\n hasDateSlots\n }\n }\n\n allAccreditationsSlots(onlyVisible: $onlyVisible) {\n ...DelegationAccreditationSlotStats\n\n accreditationSlot {\n id\n accreditationId\n date\n name\n }\n\n accreditation {\n name\n color\n index\n }\n\n accreditationCategory {\n id\n name\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,delegationId:o,onlyVisible:e.onlyVisible},[Yo.ConditionCustomFieldFragment,Yo.DelegationAccreditationSlotStatsFragment]);return s||(p(a.event?.delegation.allAccreditationsSlots)?(0,i.jsx)(aO,{}):(0,i.jsx)(oO,{canMemberAccredit:e.canMemberAccredit,delegationsSpaceLayoutTab:e.delegationsSpaceLayoutTab,event:a.event,organization:a.organization}))},rO=e=>{const{params:{organizationId:t,eventId:n,delegationId:o},translate:a}=Hf(),{mutate:s,isLoading:d}=function(e={}){return Di("mutation EventDocumentsExport(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId\n $documentsExport: DocumentsExportInput!\n) {\n jobId: eventDocumentsExport(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n documentsExport: $documentsExport\n )\n}\n",e)}(),l=(0,r.useMemo)(()=>e.customDocuments.filter(t=>t.slug===e.slug),[e.customDocuments,e.slug]),c=(0,r.useMemo)(()=>h(l)?l.map(e=>e.name).join(", "):Pn.includes(e.slug)?hE(e.slug):null,[l,e.slug]),u=h(l);return c?(0,i.jsxs)(G,{align:"center",css:{borderBottom:"1px solid $gray200",padding:"$4 $6","&:last-child":{borderBottom:"none"}},gap:"3",children:[(0,i.jsx)(G,{align:"center",css:{background:"$blueGray100",borderRadius:"12px",color:"$blueGray700"},height:40,justify:"center",width:40,children:(0,i.jsx)(_o,{icon:"file-lines"})}),(0,i.jsx)(Li,{css:{flex:"1"},font:"gray900 textSm medium",children:c}),(0,i.jsxs)(zS,{children:[(0,i.jsx)(BS,{children:(0,i.jsx)(Li,{children:(0,i.jsx)(jo,{color:"white",isLoading:d,leftIcon:"download",onClick:()=>s({organizationId:t,eventId:n,delegationId:o,documentsExport:{badgeType:u?null:e.slug,customDocumentSlug:u?e.slug:null,documentType:u?Ee.UserCustomDocument:Ee.CustomBadge,language:$t.Fr,oneFile:!1,segmentsIds:[],strategy:Ae.OnePerPage}})})})}),(0,i.jsx)(FS,{placement:"top",children:a("recevoir_les_do_31669")})]})]}):null},dO=e=>{const{translate:t}=Hf();return(0,i.jsxs)(G,{direction:"column",gap:"2",children:[(0,i.jsx)(Li,{font:"gray900 textMd medium",children:t("documents_dispo_46996")}),(0,i.jsx)(G,{css:{background:"white",border:"1px solid $gray200",borderRadius:"$2",flex:"1",overflow:"hidden"},direction:"column",children:e.delegationsSpaceCustomBadges.map(t=>(0,i.jsx)(rO,{customDocuments:e.customDocuments,slug:t},t))})]})},lO=e=>{const{designSystem:t}=ss(),n=t===os?({children:e})=>(0,i.jsx)(G,{className:"h-detail-box-content",css:{flex:"1",padding:"$6"},width:1,children:e}):({children:e})=>(0,i.jsx)(Li,{className:"h-detail-box-content",css:{flex:"1",padding:"$6"},width:1,children:e});return(0,i.jsx)(G,{css:{background:"white",bd:!0,...e.css},direction:"column",width:1,children:(0,i.jsxs)(G,{direction:"column",height:1,width:1,children:[(0,i.jsxs)(G,{css:{borderBottom:e.hideTitleBorder?void 0:"1px solid $gray200",paddingBottom:e.hideTitleBorder?"0":"$5",paddingTop:"$5",px:"$6"},gap:"3",width:1,children:[(0,i.jsx)(dI,{css:{flex:"1",alignContent:"center"},children:e.title}),e.rightIcon&&(0,i.jsx)(Li,{color:"gray900",css:{cursor:"pointer"},fontSize:"textMd",fontWeight:"semiBold",textAlign:"center",width:20,onClick:t=>{e.rightIconClick?.(t)},children:(0,i.jsx)(_o,{icon:e.rightIcon})}),e.select]}),(0,i.jsx)(n,{children:e.children})]})})},cO=({css:e,title:t,children:n})=>(0,i.jsxs)(G,{direction:"column",gap:"3",children:[(0,i.jsx)(Li,{color:"gray900",fontSize:"textLg",fontWeight:"semiBold",children:t}),(0,i.jsx)(G,{css:{bd:!0,padding:"$4",...e},direction:"column",children:n})]}),uO=({children:e,...t})=>$_()?(0,i.jsx)(cO,{...t,children:e}):(0,i.jsx)(lO,{...t,children:e}),mO=e=>(0,i.jsx)(G,{direction:"column",gap:"4",width:1,children:e.customFields.map((t,n)=>(0,i.jsxs)(r.Fragment,{children:[0!==n&&(0,i.jsx)(zx,{direction:"horizontal"}),(0,i.jsx)(kC,{field:t,fields:e.delegation.fields})]},t.id))}),gO=({percent:e,prospectivePercent:t})=>(0,i.jsxs)(Li,{css:{background:"$gray100",borderRadius:"$1",position:"relative"},height:8,width:1,children:[(0,i.jsx)(Li,{css:{background:Iy(e),borderRadius:"$1",left:0,maxWidth:"100%",position:"absolute",top:0,width:100*e+"%"},height:1}),void 0!==t&&(0,i.jsx)(Li,{css:{background:Iy(t),borderRadius:"$1",left:0,opacity:.4,maxWidth:"100%",position:"absolute",top:0,width:100*t+"%"},height:1})]}),hO=e=>(0,i.jsx)(G,{align:"center",css:{bd:!0,fontSize:"$textMd"},height:48,justify:"center",width:48,children:(0,i.jsx)(_o,{icon:e.icon})}),pO=({delegation:e})=>{const{translate:t,params:{organizationId:n}}=Hf(),o=Ti(jl),a=Ti(fm),{dashboardLeaders:s}=ad(n);return(0,i.jsxs)(G,{direction:"column",gap:"4",width:1,children:[e.deadlineDate&&(0,i.jsxs)(G,{align:"center",gap:"4",children:[(0,i.jsx)(hO,{icon:"calendar"}),(0,i.jsxs)(G,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)(Li,{font:"gray800 textSm medium",children:t("date_butoir_dinscription")}),(0,i.jsx)(Li,{color:"gray500",children:o.toLocaleString(e.deadlineDate,oa.DateOnly.MonthLong)})]})]}),(0,i.jsxs)(G,{align:"center",gap:"4",children:[(0,i.jsx)(hO,{icon:"gem"}),(0,i.jsxs)(G,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)(Li,{font:"gray800 textSm medium",children:t(s)}),(0,i.jsx)(G,{gap:"3",wrap:"wrap",children:e.leaders.map(e=>(0,i.jsxs)(G,{align:"center",css:{bd:"gray300 1 xs",px:"$1"},gap:"1",height:22,children:[(0,i.jsx)(J_,{email:e.email,image:e.picture?.url,name:e.name,size:16}),(0,i.jsx)(Li,{font:"gray800 textXs medium",children:e.nameOrEmail})]},e.id))})]})]}),(0,i.jsxs)(G,{align:"center",gap:"4",children:[(0,i.jsx)(hO,{icon:"users"}),(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(Li,{font:"gray800 textSm medium",children:t("quota_00069")}),(0,i.jsxs)(G,{align:"center",css:{flex:"1"},gap:"3",children:[(0,i.jsx)(Li,{width:100,children:(0,i.jsx)(gO,{percent:e.maxResources?e.numberOfResources/e.maxResources:1})}),(0,i.jsxs)(Li,{color:"gray500",children:[e.numberOfResources,"/",a.toNumberOrInfinity(e.maxResources)]})]})]})]})]})},fO=()=>{const{translate:e,params:{organizationId:t}}=Hf(),{dashboardLeaders:n}=ad(t);return(0,i.jsxs)(G,{direction:"column",gap:"4",width:1,children:[(0,i.jsxs)(G,{align:"center",gap:"4",children:[(0,i.jsx)(hO,{icon:"gem"}),(0,i.jsxs)(G,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)(Li,{font:"gray800 textSm medium",children:e(n)}),(0,i.jsx)(UI,{borderRadius:"$1",height:20,width:1})]})]}),(0,i.jsxs)(G,{align:"center",gap:"4",children:[(0,i.jsx)(hO,{icon:"users"}),(0,i.jsxs)(G,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)(Li,{font:"gray800 textSm medium",children:e("quota_00069")}),(0,i.jsx)(UI,{borderRadius:"$1",height:20,width:1})]})]})]})},IO=e=>{const{params:{organizationId:t,eventId:n,delegationId:o},translate:a}=Hf(),s=(0,r.useMemo)(()=>fg({organizationId:e.delegation.organizationId,eventId:e.delegation.eventId,delegationId:e.delegation.id,formId:e.delegation.form.id}),[e.delegation]);return(0,i.jsx)(uO,{css:{height:"fit-content"},hideTitleBorder:!0,title:a("Form"),children:(0,i.jsxs)(G,{direction:"column",gap:"4",width:1,children:[(0,i.jsx)(Li,{color:"gray800",children:a("envoyez_le_lien_23853")}),(0,i.jsxs)(G,{gap:"3",width:1,children:[(0,i.jsx)(G,{css:{flex:"1"},children:(0,i.jsx)(jo,{css:{width:"100%"},textAlign:"center",to:hg.MEMBERS_INVITE({organizationId:t,eventId:n,delegationId:o}),children:a("envoyer_par_e_m_11240")})}),(0,i.jsxs)(zS,{children:[(0,i.jsx)(BS,{children:(0,i.jsx)(jo,{color:"white",leftIcon:"arrow-up-right-from-square",target:"_blank",to:s})}),(0,i.jsx)(FS,{placement:"top",children:a("ouvrir_40131")})]}),(0,i.jsxs)(zS,{children:[(0,i.jsx)(BS,{children:(0,i.jsx)(jo,{color:"white",leftIcon:"copy",onClick:()=>mv(s)})}),(0,i.jsx)(FS,{placement:"top",children:a("copier_75889")})]})]})]})})},_O=e=>{const{translate:t}=Hf();return(0,i.jsx)(uO,{css:{"& .h-detail-box-content":{padding:"0","& :last-child":{borderBottom:"none"}}},title:(0,i.jsx)(G,{gap:"2",children:(0,i.jsx)(Li,{children:t("invitations_32350")})}),children:e.delegation.usersInfosInvitations.nodes.map(({userInfo:e})=>(0,i.jsx)(G,{css:{borderBottom:"1px solid $gray200",padding:"$3 $6"},children:(0,i.jsx)(sA,{isClickDisabled:!0,userInfo:e})},e.id))})},yO=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:o,delegationId:a}}=Hf(),s=Ti(Yg),{data:d,isLoading:l}=Mi('query DelegationSpaceDashboard($organizationId: OrganizationId!, $delegationId: DelegationId!) {\n organization(id: $organizationId) {\n allowDelegationSpaceDownload\n\n delegation(id: $delegationId) {\n id\n name\n description\n organizationId\n eventId\n formId\n deadlineDate\n numberOfResources\n maxResources\n columns\n state\n showFormLinkInDelegationSpace\n fields\n canLeadersEditCustomFields\n usedCustomFieldsFilled\n\n category: delegationCategory {\n id\n name\n }\n\n form {\n id\n name\n }\n\n leaders {\n id\n email\n name\n nameOrEmail\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n phone: fieldValue(slug: "phone")\n\n picture {\n url\n }\n }\n\n usedCustomFields {\n ...CustomFieldWithCondition\n }\n\n usersInfosInvitations(limit: 5, offset: 0) {\n nodes {\n userInfo {\n id\n email\n name\n\n picture {\n url\n }\n }\n }\n\n pageInfo {\n hasNextPage\n }\n }\n }\n }\n}\n',{organizationId:n,delegationId:a},[Yo.CustomFieldWithConditionFragment]),c=(0,r.useMemo)(()=>d.organization?.delegation.canLeadersEditCustomFields??!1,[d.organization]),u=(0,r.useMemo)(()=>d.organization?.delegation.usedCustomFields??[],[d.organization]),m=(0,r.useCallback)(()=>e.push(hg.FIELDS_EDIT({organizationId:n,eventId:o,delegationId:a})),[n,o,a]),g=(0,r.useMemo)(()=>!(d.organization?.delegation.usedCustomFieldsFilled??1),[d.organization]),p=(0,r.useMemo)(()=>{if(v(d.organization?.delegation.description)){const e=d.organization.delegation;return s.renderText(e.description,{delegation:e})}return""},[d.organization]);return(0,i.jsxs)(G,{direction:"column",gap:"4",width:1,children:[g&&c&&(0,i.jsxs)(lI,{alertStyle:"warning",children:[(0,i.jsx)(cI,{children:t("informations_im_33187")}),(0,i.jsx)(uI,{children:(0,i.jsxs)(G,{direction:"column",gap:"2",children:[t("des_information_10949"),(0,i.jsx)(G,{width:1,children:(0,i.jsx)(jo,{color:"invisible",css:{color:"inherit",px:"0","&:hover":{color:"inherit"}},rightIcon:"arrow-right",onClick:m,children:t("_diter_les_info_35201")})})]})})]}),(0,i.jsxs)(G,{gap:"4",width:1,children:[(0,i.jsxs)(G,{css:{flex:"1"},direction:"column",gap:"4",children:[v(p)&&(0,i.jsx)(G,{children:(0,i.jsx)(uO,{hideTitleBorder:!0,title:t("description_58935"),children:(0,i.jsx)(w_,{text:p})})}),(0,i.jsx)(uO,{hideTitleBorder:!0,title:t("informations_g_79325"),children:l?(0,i.jsx)(fO,{}):(0,i.jsx)(pO,{delegation:d.organization.delegation})}),h(u)&&(0,i.jsx)(G,{children:(0,i.jsx)(uO,{hideTitleBorder:!0,rightIcon:c?"pen":void 0,rightIconClick:m,title:t("informations_co_28407"),children:l?(0,i.jsx)(fO,{}):(0,i.jsx)(mO,{customFields:u,delegation:d.organization.delegation})})})]}),!0===d.organization?.delegation.showFormLinkInDelegationSpace&&(0,i.jsxs)(G,{direction:"column",gap:"4",width:450,children:[(0,i.jsx)(IO,{delegation:d.organization.delegation}),h(d.organization.delegation.usersInfosInvitations.nodes)&&(0,i.jsx)(_O,{delegation:d.organization.delegation})]})]})]})},xO=e=>{switch(e){case SO.Event:return{color:"success",leftIcon:"calendar"};case SO.ParentDelegation:return{color:"pink",leftIcon:"people-group"};default:return wr()}};var SO;!function(e){e.Event="event",e.ParentDelegation="parent-delegation"}(SO||(SO={}));const vO=({state:e,userInfo:t,onClick:n})=>{const o=Oi(),a=v(t.name);return(0,i.jsxs)(G,{align:"center",css:{borderBottom:"1px solid $gray200",cursor:"pointer",py:"$3",userSelect:"none",width:"100%","&:last-child":{border:"none"}},onClick:n,children:[(0,i.jsx)(Ky,{shouldPreventDefault:!1,state:e,onClick:RI.A}),(0,i.jsx)(oI,{width:"3"}),(0,i.jsx)(J_,{email:t.email,image:t.picture?.url,name:t.name,size:40}),(0,i.jsx)(oI,{width:"4"}),(0,i.jsxs)(G,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)(Li,{ellipsis:!0,color:"gray700",children:a?t.name:t.email}),a&&(0,i.jsx)(Li,{ellipsis:!0,color:"gray500",children:t.email})]}),t.source&&(0,i.jsx)(Li,{children:(0,i.jsx)(My,{...xO(t.source),leftIconStyle:"solid",children:t.source===SO.Event?o("_v_nement_22345"):o("d_l_gation_pare_68507")})})]})},bO=()=>(0,i.jsxs)(G,{align:"center",css:{borderBottom:"1px solid $gray200",cursor:"pointer",py:"$3",userSelect:"none",width:"100%","&:last-child":{border:"none"}},children:[(0,i.jsx)(Ky,{shouldPreventDefault:!1,state:"unchecked",onClick:RI.A}),(0,i.jsx)(oI,{width:"3"}),(0,i.jsx)(UI,{size:40,variant:"circular"}),(0,i.jsx)(oI,{width:"4"}),(0,i.jsxs)(G,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)(UI,{borderRadius:"$1",height:12,width:1}),(0,i.jsx)(UI,{borderRadius:"$1",height:12,width:1})]})]}),jO=e=>{const{translate:t,params:{organizationId:n,eventId:o,delegationId:a}}=Hf(),{mutate:s,isLoading:d}=Ya(),[l,c,u]=XE(""),{data:m,isLoading:g}=Mi("query ParentUsersInfos(\n $organizationId: OrganizationId!\n $delegationId: DelegationId!\n $name: String\n) {\n organization(id: $organizationId) {\n delegation(id: $delegationId) {\n parentUsersInfos(name: $name) {\n ...ExistingVolunteer\n }\n }\n }\n}\n",{organizationId:n,delegationId:a,name:v(c)?c:void 0},[Yo.ExistingVolunteerFragment]);const[p,I]=(0,r.useState)([]);return(0,i.jsxs)(Ty,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(Li,{color:"gray800",css:{height:"56px",textAlign:"center"},children:(0,i.jsx)("img",{alt:"Avatars",height:"100%",src:PI.AvatarGroup})}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(Li,{color:"gray800",fontSize:"textLg",fontWeight:"medium",textAlign:"center",children:t("ajouter_un_memb_33261")}),(0,i.jsx)(oI,{height:"1"}),(0,i.jsx)(Li,{color:"gray500",textAlign:"center",children:t("ajouter_un_ou_d_21477")}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(EI,{icon:"magnifying-glass",placeholder:t("rechercher_un_m_05904"),value:l,onChange:u}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(G,{css:{flex:"1",overflowY:"auto"},direction:"column",children:g?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(bO,{}),(0,i.jsx)(bO,{}),(0,i.jsx)(bO,{})]}):m.organization.delegation.parentUsersInfos.map(e=>{const t=p.includes(e.id)?"checked":"unchecked";return(0,i.jsx)(vO,{state:t,userInfo:e,onClick:()=>{I(f(p,e.id,"unchecked"===t))}},e.id)})}),(0,i.jsx)(oI,{height:"7"}),(0,i.jsxs)(G,{align:"center",gap:"3",justify:"end",children:[(0,i.jsx)(jo,{disabled:!h(p),isLoading:d,onClick:async()=>{await s({eventId:o,delegationId:a,selecteds:{ids:p}}),location.reload()},children:t("ajouter_97327")}),(0,i.jsx)(jo,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]})},AO=({delegation:e,name:t})=>{const{translate:n,params:{organizationId:o,delegationId:a}}=Hf(),[s,d]=(0,r.useState)(!1),l=e.canLeadersAddMembers&&e.state===be.Ongoing,c=l&&(!!e.eventId&&!!e.parentId||e.canLeadersImportMembers),{delegationHeader:u,delegationHeaderEvent:m,addMemberButton:g}=ad(o);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{gap:"3",children:[(0,i.jsxs)(G,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)(Li,{font:"grayCustom900 displayXs semiBold",children:n("bienvenue_1_42255",t||"")}),(0,i.jsx)(Li,{color:"grayCustom500",children:e.event?n(m,e.name,e.event.name):n(u,e.name)})]}),c?(0,i.jsxs)(F_,{children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(jo,{children:n(g)})}),(0,i.jsxs)(K_,{placement:"bottom-end",children:[e.eventId&&e.parentId&&(0,i.jsx)(H_,{icon:"user-group",onClick:()=>{d(!0)},children:n("ajouter_des_mem_06922")}),(0,i.jsx)(H_,{icon:"user-plus",to:hg.MEMBER_CREATE({organizationId:o,eventId:e.eventId||void 0,delegationId:a,formId:e.formId}),children:n("ajouter_un_nouv_29283")}),e.canLeadersImportMembers&&(0,i.jsx)(H_,{icon:"file-import",to:hg.DELEGATION_MEMBERS_IMPORT({organizationId:o,eventId:e.eventId||void 0,delegationId:a}),onClick:e=>z_(e.target),children:n("importer_via_un_61623")})]})]}):l?(0,i.jsx)(jo,{to:hg.MEMBER_CREATE({organizationId:o,eventId:e.eventId||void 0,delegationId:a,formId:e.formId}),children:n(g)}):null]}),s&&(0,i.jsx)(jO,{onClose:()=>{d(!1)}})]})},CO=e=>{const{translate:t,params:{organizationId:n,eventId:o,delegationId:a}}=Hf(),s=(0,r.useMemo)(()=>e.user?$g(n)?`${e.user.userInfo.firstName||""} ${e.user.userInfo.lastName||""}`.trim():e.user.userInfo.firstName||"":"",[e.user]),d=(0,r.useMemo)(()=>e.delegation.canLeadersDeleteMembers&&e.delegation.state!==be.Locked,[e.delegation]),l=(0,r.useMemo)(()=>e.delegation.canLeadersDuplicateMembers&&e.delegation.state!==be.Locked,[e.delegation]),c=(0,r.useMemo)(()=>e.delegation.canLeadersEditMembers&&e.delegation.state!==be.Locked,[e.delegation]),u=(0,r.useCallback)(e=>e===Ed.AccreditationsMatrix&&c,[c]),m=(0,r.useMemo)(()=>(e.delegation.numberOfDelegationsAccreditationsSlots??0)>0,[e.delegation]),g=(0,r.useMemo)(()=>e.delegationsSpaceLayoutTabs.find(e=>e.slug===fd.DOCUMENTS),[e.delegationsSpaceLayoutTabs]),p=(0,r.useMemo)(()=>g?g.isVisible&&h(g?.infos.customDocumentsSlugs??[]):e.allowDelegationSpaceDownload||h(e.delegation.customDocuments??[]),[e.allowDelegationSpaceDownload,e.delegation,g]),f=(0,r.useMemo)(()=>(e.delegationsSpaceCustomBadges??[]).concat(e.delegation.customDocuments.map(e=>e.slug)??[]).concat(g?.infos.customDocumentsSlugs??[]),[e.delegation,e.delegationsSpaceCustomBadges,g]),I=(0,r.useMemo)(()=>e.delegation.event?.customDocuments??[],[e.delegation]),_=e=>({organizationId:e?":organizationId":n,eventId:o?e?":eventId":o:void 0,delegationId:e?":delegationId":a}),{tabMembers:y,tabAccreditations:x}=ad(n),S=!e.delegation.canLeadersSeeHiddenAccreditationsSlots,v=(0,r.useMemo)(()=>{const n=e.delegationsSpaceLayoutTabs.find(e=>e.slug===fd.DASHBOARD),o=n?.name.trim();return n?.isVisible??1?(0,i.jsx)(rb,{getPath:(e=!1)=>hg.DELEGATION_DASHBOARD(_(e)),title:o||t("tableau_de_bord_24627"),children:(0,i.jsx)(yO,{})},fd.DASHBOARD):null},[e.delegationsSpaceLayoutTabs,_]),b=(0,r.useMemo)(()=>{const e=g?.name.trim();return o&&p?(0,i.jsx)(rb,{getPath:(e=!1)=>hg.DELEGATION_DOCUMENTS(_(e)),title:e||t("Documents"),children:(0,i.jsx)(dO,{customDocuments:I,delegationsSpaceCustomBadges:f})},fd.DOCUMENTS):null},[g,I,e.delegationsSpaceLayoutTabs,f,o,_,p]);return(0,i.jsxs)(G,{direction:"column",gap:"6",children:[(0,i.jsx)(AO,{delegation:e.delegation,name:s}),(0,i.jsx)(G,{direction:"column",children:(0,i.jsx)(sb,{children:h(e.delegationsSpaceLayoutTabs)?e.delegationsSpaceLayoutTabs.map(t=>t.slug===fd.DASHBOARD?v:t.slug===fd.DOCUMENTS?b:(0,i.jsx)(rb,{getPath:(e=!1)=>hg.DELEGATION_TAB({..._(e),slug:t.slug}),title:t.name,children:t.segmentType===Rt.Volunteers?(0,i.jsx)(TT,{campaigns:e.delegation.campaigns,canDuplicateMembers:l,canEditColumns:e.delegation.canLeadersEditColumns,canMemberAccredit:!1,canMemberDelete:d,canMemberEdit:c,columns:e.delegation.columns,customBadges:f,customFieldsPrivacy:pe.Public,delegationsSpaceLayoutTab:t,deleteFromEvent:!0,forDelegationsSpace:!0,getEditPath:t=>hg.MEMBER_EDIT({delegationId:a,eventId:o,organizationId:n,userInfoId:t.userInfo.id,formId:e.delegation.formId}),onlyVisibleAccreditationsSlots:!e.delegation.canLeadersSeeHiddenAccreditationsSlots,showAccreditationsEdit:!1,showAccreditationsValidate:!1,showCustomDocumentsColumns:!1,showDeleteFromEvent:!1,showDocumentsDownload:p,showEditMode:u,showPrint:!1}):(0,i.jsx)(sO,{canMemberAccredit:!1,delegationsSpaceLayoutTab:t,onlyVisible:S})},t.id)):(0,i.jsxs)(i.Fragment,{children:[v,(0,i.jsx)(rb,{getPath:(e=!1)=>hg.DELEGATION_MEMBERS(_(e)),title:t(y,e.delegation.numberOfResources),children:o?(0,i.jsx)(TT,{campaigns:e.delegation.campaigns,canDuplicateMembers:l,canEditColumns:e.delegation.canLeadersEditColumns,canMemberAccredit:!1,canMemberDelete:d,canMemberEdit:c,columns:e.delegation.columns,customBadges:f,customFieldsPrivacy:pe.Public,deleteFromEvent:!0,forDelegationsSpace:!0,getEditPath:t=>hg.MEMBER_EDIT({delegationId:a,eventId:o,organizationId:n,userInfoId:t.userInfo.id,formId:e.delegation.formId}),onlyVisibleAccreditationsSlots:!e.delegation.canLeadersSeeHiddenAccreditationsSlots,showAccreditationsEdit:!1,showAccreditationsValidate:!1,showCustomDocumentsColumns:!1,showDeleteFromEvent:!1,showDocumentsDownload:p,showEditMode:u,showPrint:!1}):(0,i.jsx)(DT,{campaigns:e.delegation.campaigns,canCustomFieldRead:!1,canEditColumns:e.delegation.canLeadersEditColumns,canMemberDelete:d,canMemberEdit:c,columns:e.delegation.columns,customBadges:f,getEditPath:t=>hg.MEMBER_EDIT({delegationId:a,organizationId:n,userInfoId:t.id,formId:e.delegation.formId}),showDocumentsDownload:p,showEditMode:!1})}),o&&m&&(0,i.jsx)(rb,{getPath:(e=!1)=>hg.DELEGATION_ACCREDITATIONS(_(e)),title:t(x),children:(0,i.jsx)(sO,{canMemberAccredit:!1,onlyVisible:S})}),b]})})})]})},EO=(0,r.createContext)({}),TO=({children:e,...t})=>(0,i.jsx)(EO.Provider,{value:{shouldShowModeSelection:Boolean(t.createCard||t.upsertCard||t.updateCard),...t},children:e});function OO(){return(0,r.useContext)(EO)}const RO=e=>{const t=(0,r.useRef)(null);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("details",{ref:t,open:e.showSection,onToggle:t=>{const n=t.currentTarget.open;n!==e.showSection&&(e.setShowSection(n),e.onToggle?.(n))},children:[(0,i.jsx)("summary",{style:{cursor:"pointer"},children:(0,i.jsxs)(G,{align:"center",gap:"2",children:[(0,i.jsx)(Ly,{tabIndex:-1,value:e.showSection,onChange:RI.A}),(0,i.jsx)(W,{css:{fontWeight:"$medium"},children:e.toggle})]})}),(0,i.jsx)(G,{css:{marginBlockStart:"$5",borderBlockStart:"1px solid $gray200",paddingBlockStart:"$6","&:has(> .card)":{borderBlockStart:"unset",marginBlockStart:"$4",paddingBlockStart:"unset"}},direction:"column",gap:"3",children:e.children})]})})},MO=({css:e,disabled:t,hideHeading:n,isOpen:o,isOpenToggleLabel:s,onToggle:d,...l})=>{const{descId:c}=SI(),[u,m]=r.useState(o??!1);return"production"!==a.Production&&r.Children.toArray(l.children).filter(e=>["RadioText","Radio"].includes(e.type.name)).length>=2&&"radiogroup"!==l.role&&console.warn('This `` element contains multiple `` components, but does not have `role="radiogroup"` set; this may result in incorrect styling (i.e., too much vertical spacing).'),(0,i.jsx)(Yy.Provider,{value:{isDisabled:t},children:(0,i.jsxs)(G,{"aria-describedby":c,as:"fieldset",className:"fieldset--column",css:{border:"unset",padding:"unset",margin:"unset",'&[role="radiogroup"]':{gap:"$2","& header":{borderBlockEnd:"unset",paddingBlockEnd:"unset","& > h2":{fontSize:"$textSm",color:"$gray700"},"& + div":{gap:"$3"}}},"&:disabled :is(input, select, textarea, datalist, button)":{cursor:"not-allowed !important"},...e},direction:"column",disabled:s?!u:void 0,gap:s?"5":"6",...l,children:[(0,i.jsx)(GE,{heading:l.heading}),!n&&(0,i.jsxs)(G,{as:z.Header,css:{paddingBlockEnd:s?void 0:"$5",borderBlockEnd:s?void 0:"1px solid $gray200"},direction:"column",gap:"1",children:[(0,i.jsxs)(G,{gap:"1",children:[(0,i.jsx)(dI,{"aria-hidden":"true",color:"gray800",textStyle:"heading",children:l.heading}),l.tooltip]}),l.subtitle&&(0,i.jsx)(W,{id:c,textStyle:"subtitle",children:l.subtitle})]}),s?(0,i.jsx)(RO,{setShowSection:m,showSection:u,toggle:s,onToggle:d,children:l.children}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(G,{css:{gap:"$6",'&:not(role="radiogroup"):has(> fieldset.fieldset--column + fieldset.fieldset--column)':{gap:"$9"},"&:has(> fieldset.fieldset--row)":{gap:"unset"}},direction:"column",children:l.children})})]})})},DO=({disabled:e,...t})=>{const{descId:n}=SI();return(0,i.jsx)(Yy.Provider,{value:{isDisabled:e},children:(0,i.jsxs)(G,{"aria-describedby":n,as:"fieldset",className:"fieldset--row",css:{border:"unset",padding:"unset",margin:"unset","&:disabled :is(input, select, button)":{cursor:"not-allowed !important"},"& + &":{borderBlockStart:"1px solid $gray200",marginBlockStart:"$5",paddingBlockStart:"$5"},"& fieldset.fieldset--column":{gap:"$2","& header":{paddingBlockEnd:"unset",borderBlockEnd:"unset !important","& > div > :is(h1, h2, h3, h4, h5, h6)":{fontSize:"$textSm !important",fontWeight:"$medium !important"}}}},direction:"row",gap:"7",...t,children:[(0,i.jsx)(GE,{heading:t.heading}),(0,i.jsxs)(G,{as:z.Header,direction:"row",gap:"1",width:280,children:[(0,i.jsx)(dI,{"aria-hidden":"true",color:"gray800",css:{fontSize:"$textSm"},textStyle:"subheading",children:t.heading}),(0,i.jsx)(W,{id:n,textStyle:"subtitle",children:t.subtitle})]}),(0,i.jsx)(G,{css:{flex:"1"},direction:"column",gap:"4",children:t.children})]})})},wO=e=>{const{params:{organizationId:t},translate:n}=Hf(),{data:o,loader:a}=$a({organizationId:t}),s=SI(),d=(0,r.useMemo)(()=>e.formRenderProps.values.input.csv.file,[e.formRenderProps.values.input.csv]),l=(0,r.useMemo)(()=>{const t=localStorage.getItem(OI[`${e.localStorageKeyPrefix}_FORMATS`]);return t?JSON.parse(t):t},[e.localStorageKeyPrefix]),c=(0,r.useMemo)(()=>{const t=t=>e.formRenderProps.values.input.csv.formats?.[t]===o.organization?.[t]?(0,i.jsx)(My,{css:{textTransform:"uppercase"},children:n("from_organisati_25675")}):l?.[t]===e.formRenderProps.values.input.csv.formats?.[t]&&(0,i.jsx)(My,{css:{textTransform:"uppercase"},children:n("from_saved_22150")});return{datetime:t("datetimeFormat"),date:t("dateFormat"),timeBadge:t("timeFormat")}},[o.organization,l,e.formRenderProps.values.input.csv.formats]),u=Ri(),m=[e.ImportInputService.IMPORT_COLUMNS_DEFAULT.Id];window.location.origin===lo.HEAVENT_PUBLIC_URL.origin&&m.push(em.IMPORT_COLUMNS_DEFAULT.TicketId);const g=Object.values(e.ImportInputService.IMPORT_COLUMNS_DEFAULT).filter(e=>!m.includes(e));let p=[...g,...e.customFields.map(e=>e.slug.startsWith("cf")?`${e.name} [${e.slug}]`:e.name)],f=0;if(h(e.additionalCategories))for(const t of e.additionalCategories){if(t.fields.some(e=>!e.slug.startsWith("accreditation_slot_")&&!e.slug.startsWith("accreditation_profile_")))throw new Error("Unhandled category type");p=[...p,...t.fields.map(e=>`${e.name} [${e.slug}]`)],f+=t.fields.length}const I=[p,new Array(g.length+e.customFields.length+f)].map(e=>e.map(e=>{return`${t=e,t.includes(",")||t.includes('"')||t.includes("\n")||t.includes(" ")?'"'+t.replace(/"/g,'""')+'"':t}`;var t}).join(",")).join("\n"),_=`data:text/csv;charset=utf-8,${encodeURIComponent(I)}`;return a||(0,i.jsxs)(G,{direction:"column",gap:"8",children:[(0,i.jsx)(MO,{css:{"& header":{borderBlockEnd:"unset",paddingBlockEnd:"unset"}},heading:n("choix_du_fichie_30517"),subtitle:[...u(n("s_lectionnez_vo_53506","{1}"),(0,i.jsx)(WI,{css:{color:"$primary600"},download:`export-${e.sampleFilename?po(e.sampleFilename):"sample-file"}.csv`,to:_,children:n("t_l_charger_un_46976")}))],children:(0,i.jsx)(Dx,{...s,accept:ax.Csv,acl:"private",organizationId:t,prefix:"input.csv.",withFileField:!0,onChange:t=>e.onChange(t,e.formRenderProps)})}),(0,i.jsxs)(MO,{heading:n("param_tres_du_f_01675"),isOpenToggleLabel:n("afficher_les_pa_96893"),subtitle:n("personnaliser_s_29361"),children:[(0,i.jsxs)(DO,{heading:n("type_de_carat_r_62356"),children:[(0,i.jsx)(TI,{hint:n("laissez_ce_cham_07837"),label:n("d_limitateur_77701"),name:"input.csv.delimiter",state:d?"disabled":void 0}),(0,i.jsx)(TI,{hint:n("leave_blank_if_02058"),label:n("caract_re_d_ch_56847"),name:"input.csv.quoteChar",state:d?"disabled":void 0}),(0,i.jsxs)(nS,{hint:n("leave_blank_if_02058"),label:n("caract_re_de_re_71491"),name:"input.csv.newline",state:d?"disabled":void 0,children:[(0,i.jsx)("option",{value:void 0,children:"Auto-detect"}),(0,i.jsx)("option",{value:"\r",children:"\\r"}),(0,i.jsx)("option",{value:"\n",children:"\\n"}),(0,i.jsx)("option",{value:"\r\n",children:"\\r\\n"})]})]}),(0,i.jsxs)(DO,{heading:n("type_de_format_68432"),children:[(0,i.jsx)(TI,{label:(0,i.jsxs)(G,{align:"center",gap:"2",children:[n("format_d_heure_46798"),c.timeBadge]}),name:"input.csv.formats.timeFormat",state:d?"disabled":void 0}),(0,i.jsx)(TI,{label:(0,i.jsxs)(G,{align:"center",gap:"2",children:[n("format_de_date_82059"),c.date]}),name:"input.csv.formats.dateFormat",state:d?"disabled":void 0}),(0,i.jsx)(TI,{label:(0,i.jsxs)(G,{align:"center",gap:"2",children:[n("format_de_date_24474"),c.datetime]}),name:"input.csv.formats.datetimeFormat",state:d?"disabled":void 0})]})]})]})},$O=R("input",{blockSize:"fit-content",inlineSize:"fit-content"}),PO=(0,r.forwardRef)((e,t)=>(0,i.jsx)($O,{ref:t,type:"radio",...e}));PO.displayName="Radio";const NO=({children:e,css:t,icon:n,subtext:o,...a})=>{const{inputId:s,descId:d,labelId:l}=SI(),c=(0,r.useRef)(null);return(0,i.jsx)(G,{css:{bd:!0,flexGrow:"1",margin:"-1px",cursor:"pointer",'&:has( input[type="radio"]:checked)':{border:"2px solid $primary500"},...t},onClick:()=>c.current?.click(),children:(0,i.jsx)(G,{css:{border:"1px solid transparent",padding:"$4",'&:has( input[type="radio"]:checked)':{border:"none"}},children:(0,i.jsxs)(G,{gap:"1",children:[(0,i.jsxs)(G,{direction:"column",gap:"3",children:[(0,i.jsx)(G,{css:{bd:!0,border:"1px solid $gray200",inlineSize:"fit-content"},justify:"start",children:(0,i.jsx)(yy,{css:{color:"$gray800",background:"unset"},icon:n})}),(0,i.jsxs)(G,{direction:"column",children:[(0,i.jsx)(jI,{htmlFor:s,id:l,children:(0,i.jsx)(W,{css:{fontSize:"$textSm",fontWeight:"$medium"},children:e})}),o&&(0,i.jsx)(W,{id:d,children:o})]}),(0,i.jsx)(G,{css:{flex:"1"}})]}),(0,i.jsx)(PO,{ref:c,"aria-describedby":d,"aria-labelledby":l,id:s,...a})]})})})},kO=({name:e,value:t,...n})=>(0,i.jsx)(nI.D0,{name:e,render:({input:e})=>(0,i.jsx)(NO,{checked:e.checked,name:e.name,value:t,onChange:e.onChange,...n,children:n.children}),type:"radio",value:t});function zO(e){const t=(0,ym.A)(e,e=>e.category.id);return(n=(0,od.A)(e.map(e=>e.category),e=>e.id),(0,vs.A)(n,e=>y(e.name))).map(e=>({category:e,items:(0,vs.A)(t[e.id],e=>y(e.name))}));var n}const LO=e=>{const{translate:t}=Hf(),n=(0,r.useMemo)(()=>[{id:-1,name:t("default_fields_04920"),fields:Object.entries(e.defaultFields).map(([e,n])=>({name:v(t(e))?t(e):e,slug:n,id:parseInt((0,xI.A)())}))},...e.categories].map(t=>({...t,fields:(0,vs.A)(t.fields,t=>{const n=t.name.toLowerCase(),i=t.slug.toLowerCase(),o=e.column.name.toLowerCase(),a=Math.min(E(n,o),E(i,o));return a{const o=Object.values(e.defaultFields).find(e=>e===t);return o&&e.requiredFieldSlugs.includes(o)?(0,i.jsx)("strong",{children:n}):n},[e.defaultFields,e.requiredFieldSlugs]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(EI,{state:"disabled",value:e.column.name,onChange:()=>{}}),(0,i.jsx)(_o,{icon:"arrow-right"}),(0,i.jsx)(Xx,{isSearchVisible:!0,multiple:!1,name:`input.mappings.${e.column.index}`,placeholder:t("s_lectionnez_un_12007"),renderValue:o,children:n.map(t=>(0,i.jsx)("optgroup",{label:t.name,children:t.fields.map(t=>(0,i.jsx)("option",{style:{fontWeight:e.requiredFieldSlugs.includes(t.slug)?"bold":"inherit",opacity:e.values.includes(t.slug)?.5:1},value:t.slug,children:t.name},t.id))},t.id))})]})},FO=R("div",{display:"grid",gridTemplateColumns:"[column] 1fr auto [field] 1fr",gap:"$4 $5",alignItems:"center"}),UO=R("div",{color:"$gray800",gridColumn:"column",fontWeight:"$medium"}),BO=R("div",{color:"$gray800",gridColumn:"field",fontWeight:"$medium"}),GO=e=>{const{translate:t}=Hf();return(0,i.jsxs)(FO,{children:[(0,i.jsx)(UO,{children:t("titres_de_vos_c_31388")}),(0,i.jsx)(BO,{children:t("champs_de_formu_64126")}),e.columns.map((t,n)=>(0,i.jsx)(LO,{categories:e.categories,column:{name:t,index:n},defaultFields:e.defaultFields,requiredFieldSlugs:e.requiredFieldSlugs,values:e.values},n))]})},VO=e=>{const{translate:t}=Hf(),{alertDescriptionKey:n}=OO(),{formRenderProps:{values:{input:{mappings:o}}}}=(0,r.useContext)(iI),a=(0,r.useMemo)(()=>Object.entries(e.defaultFields).filter(([t,n])=>e.requiredFieldSlugs.includes(n)&&!o.includes(n)).map(([e,n])=>v(t(e))?t(e):e),[e.defaultFields,e.requiredFieldSlugs,o]),s=Ri();return(0,i.jsxs)(MO,{css:{"& > header":{borderBlockEnd:"unset",paddingBlockEnd:"unset"}},gap:"5",heading:t("donn_es_de_mapp_98874"),subtitle:t("s_lectionnez_le_13978"),children:[h(a)&&(0,i.jsxs)(lI,{alertStyle:"warning",children:[(0,i.jsx)(cI,{children:t("required_field_46113",a.length)}),(0,i.jsx)(uI,{children:[...s(t(n,"{1}"),(0,i.jsx)("ul",{style:{margin:"0",paddingInlineStart:"var(--space-4)"},children:a.map(e=>(0,i.jsx)("li",{children:e},e))}))]})]}),(0,i.jsx)(GO,{...e})]})};function WO(e,t=e=>e.id){return zO(e).map(({category:e,items:n})=>(0,i.jsx)("optgroup",{label:e.name,children:n.map(e=>(0,i.jsx)("option",{"data-subtext":e.label,value:t(e),children:e.name},e.id))},e.id))}const qO=/^\{user\.(.+)\}$/,YO=e=>{const{translate:t}=Hf(),n=e.customFields.find(t=>t.id===e.customFieldValues.customFieldId),o=!0===e.canLinkToField&&n?.fieldType!==Fe.Select,a=o&&(e.customFieldValues.fromField??(v(e.customFieldValues.value)&&qO.test(e.customFieldValues.value.trim()))),s=(0,r.useMemo)(()=>n?e.customFields.filter(e=>e.fieldType===n.fieldType&&e.id!==n.id):[],[e.customFields,n]),d=(0,r.useMemo)(()=>WO(e.customFields),[e.customFields]),l=(0,r.useMemo)(()=>WO(s,e=>`{user.${e.slug}}`),[s]),c=n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(kE,{campaigns:[],categories:[],change:e.change,customDocuments:[],customField:n,delegationsSpaceLayouts:[],forms:[],name:`${e.field}.value`,slug:n.slug,tags:[],traces:[],value:e.customFieldValues.value}),(u=n,u.fieldType===Fe.Select&&u.canSelectMultiple&&(0,i.jsx)(Xy,{name:`${e.field}.addValues`,children:t("ajouter_les_val_22996")}))]});var u;const m=t=>{t!==a&&(e.change(`${e.field}.fromField`,t),e.change(`${e.field}.value`,void 0),e.change(`${e.field}.addValues`,!1))};return(0,i.jsx)(rv,{buttons:(0,i.jsxs)(zS,{children:[(0,i.jsx)(BS,{children:(0,i.jsx)(Li,{children:(0,i.jsx)(jo,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.remove})})}),(0,i.jsx)(FS,{placement:"top",children:t("supprimer_43083")})]}),title:t("champ_de_formul_73221",e.index+1),children:(0,i.jsxs)(G,{direction:"column",gap:"4",children:[(0,i.jsxs)(Xx,{isSearchVisible:!0,label:t("CustomField"),name:`${e.field}.customFieldId`,children:[(0,i.jsx)("option",{value:"-1",children:t("s_lectionner_un_48159")}),d]}),n&&(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(Li,{font:"gray700 textSm medium",children:t("nouvelle_valeur_39039",n.name)}),o?(0,i.jsxs)(G,{direction:"column",gap:"3",children:[(0,i.jsx)(by,{state:a?"unchecked":"checked",onClick:()=>m(!1),children:t("saisir_une_nouv_92931")}),!a&&(0,i.jsx)(G,{css:{paddingLeft:"$6"},direction:"column",gap:"1",children:c}),(0,i.jsx)(by,{state:a?"checked":"unchecked",onClick:()=>m(!0),children:t("lier_un_autre_51509")}),a&&(0,i.jsx)(Li,{css:{paddingLeft:"$6"},children:(0,i.jsx)(Xx,{isSearchVisible:!0,name:`${e.field}.value`,placeholder:t("choisir_un_cham_67587"),children:l})})]}):c]})]})})},HO=e=>{const t=Oi();return(0,i.jsx)(G,{direction:"column",gap:"3",children:h(e.values)?(0,i.jsxs)(i.Fragment,{children:[e.values.map((t,n)=>{const o=`${e.name}[${n}]`;return(0,i.jsx)(G,{direction:"column",children:(0,i.jsx)(G,{gap:"3",children:(0,i.jsx)(YO,{canLinkToField:e.canLinkToField,change:e.change,customFieldValues:e.values[n],customFields:e.customFields,field:o,index:n,remove:()=>{e.change(e.name,I(e.values,n))}})})},n)}),(0,i.jsx)(jo,{color:"invisible",css:{"::before":{content:"+",marginInlineEnd:"$1"}},onClick:()=>{e.change(e.name,e.values.concat([{customFieldId:-1,addValues:!1}]))},children:t("ajouter_un_nouv_22370")})]}):(0,i.jsx)(R_,{align:"center",css:{background:"$gray50",textAlign:"center"},gap:"2",children:(0,i.jsxs)(G,{align:"center",css:{textAlign:"center"},direction:"column",gap:"2",children:[(0,i.jsx)(W,{css:{fontWeight:"$medium"},children:t("aucun_champ_est_98607")}),(0,i.jsx)(jo,{color:"invisible",css:{inlineSize:"fit-content","::before":{content:"+",marginInlineEnd:"$1"}},onClick:()=>{e.change(e.name,e.values.concat([{customFieldId:-1,addValues:!1}]))},children:t("_lier_un_champ_52842")})]})})})},ZO=({file:e,onToggle:t,...n})=>{const o=Oi();return(0,i.jsx)(MO,{heading:o("attribution_d_u_50979"),isOpen:h(n.values)??!1,isOpenToggleLabel:o("attribuer_autom_74319"),subtitle:o("d_finissez_dire_31742"),onToggle:t,children:(0,i.jsx)(DO,{heading:o("liste_des_champ_94862"),children:(0,i.jsx)(HO,{name:"input.presets",...n})})})},KO=(e,t)=>{switch(t.type){case"LOADING":return{isLoading:!0,columns:void 0,errors:void 0};case"SUCCESS":return{isLoading:!1,columns:t.columns,errors:void 0};case"ERROR":return{isLoading:!1,columns:void 0,errors:t.errors}}};function QO(e){const{translate:t}=Hf(),{isLoading:n,columns:o,errors:a}=((e,t)=>{const[n,i]=(0,r.useReducer)(KO,{isLoading:!0,columns:void 0,errors:void 0});return(0,r.useEffect)(()=>{i({type:"LOADING"}),(0,qs.parse)(e,{preview:1,...t,complete:({data:e,errors:t})=>{t.filter(e=>"UndetectableDelimiter"!==e.code).length?i({type:"ERROR",errors:t}):i({type:"SUCCESS",columns:e[0]})}})},[e]),n})(e.file,{delimiter:e.values.input.csv.delimiter??void 0,quoteChar:e.values.input.csv.quoteChar??void 0,newline:e.values.input.csv.newline??void 0}),s=(0,r.useMemo)(()=>{const t=zO(e.customFields).map(({category:e,items:t})=>({id:e.id,name:e.name,fields:t.map(e=>e.fieldType===Fe.File?{...e,name:`${e.name} (URL)`}:e)}));return e.additionalCategories?t.concat(e.additionalCategories):t},[e.additionalCategories,e.customFields]);return n||a?null:(0,i.jsxs)(i.Fragment,{children:[e.additionalOptions&&(0,i.jsx)(MO,{heading:t("param_tres_d_im_18876"),children:e.additionalOptions}),(0,i.jsx)(VO,{categories:s,columns:o,defaultFields:e.defaultFields,modeSelection:e.modeSelection,requiredFieldSlugs:e.requiredFieldSlugs,values:e.values.input.mappings}),h(e.customFields)&&(0,i.jsx)(ZO,{change:e.form.change,customFields:e.customFields,file:e.file,values:e.values.input.presets,onToggle:e.onToggle})]})}const XO=e=>{const{params:{organizationId:t},translate:n}=Hf(),{createCard:o,upsertCard:a,updateCard:s,shouldShowModeSelection:r}=OO();return(0,i.jsxs)(G,{direction:"column",gap:"8",children:[r&&(0,i.jsx)(MO,{heading:n("type_d_action_d_35533"),name:"input.mode",role:"radiogroup",subtitle:n("s_lectionnez_la_32551"),children:(0,i.jsxs)(G,{gap:"4",justify:"evenly",children:[o&&(0,i.jsx)(G,{css:{flex:"1"},direction:"column",children:(0,i.jsx)(kO,{icon:"user-plus",name:"input.mode",subtext:o.description,value:Ze.Create,children:o.heading})}),a&&(0,i.jsx)(G,{css:{flex:"1"},direction:"column",children:(0,i.jsx)(kO,{icon:"user-pen",name:"input.mode",subtext:a.description,value:Ze.Upsert,children:a.heading})}),s&&(0,i.jsx)(G,{css:{flex:"1"},direction:"column",children:(0,i.jsx)(kO,{icon:"arrows-rotate",name:"input.mode",subtext:s.description,value:Ze.Update,children:s.heading})})]})}),e.formRenderProps.values.input.csv?.file&&eR(e.formRenderProps.form)&&(0,i.jsx)(QO,{additionalCategories:e.additionalCategories,additionalOptions:e.additionalOptions,customFields:e.customFields,defaultFields:e.ImportInputService.IMPORT_COLUMNS_DEFAULT,file:e.formRenderProps.values.input.csv.file,form:e.formRenderProps.form,requiredFieldSlugs:e.ImportInputService.IMPORT_COLUMNS_REQUIRED(e.formRenderProps.values.input.mode),values:e.formRenderProps.values,onToggle:n=>{if(!e.formRenderProps.values.input.csv.file)throw new Error("No file in input!");try{n?e.formRenderProps.form.change("input.presets",JSON.parse(localStorage.getItem(OI[`${e.localStorageKeyPrefix}_PRESETS`](t))??"[]")):e.formRenderProps.form.change("input.presets",[])}catch(e){console.debug(`LocalStorage not available: ${String(e)}`)}}}),(0,i.jsxs)(MO,{heading:n("identify_your_i_87636"),subtitle:n("by_default_you_75833"),children:[(0,i.jsx)(TI,{label:n("your_import_tag_41852"),name:"input.tag",state:"disabled"}),!e.isTagInputDisabled&&(0,i.jsx)(EI,{label:n("specify_an_impo_41868"),onChange:t=>{v(t)?e.formRenderProps.form.change("input.tag",`${e.importTagPrefix}-csv-${t}`):e.formRenderProps.form.change("input.tag",`${e.importTagPrefix}-csv-${Vo.c9.now().toFormat(Xo)}`)}})]})]})},JO=e=>{const{translate:t}=Hf();return(0,i.jsxs)(G,{align:"center",css:{alignSelf:"center",maxInlineSize:"640px"},direction:"column",gap:"8",children:[(0,i.jsxs)(G,{align:"center",direction:"column",gap:"4",children:[(0,i.jsx)(G,{css:{bd:!0,border:"1px solid $gray200",inlineSize:"fit-content"},justify:"start",children:(0,i.jsx)(yy,{css:{color:"$gray800",background:"unset"},icon:"party-horn"})}),(0,i.jsxs)(G,{css:{textAlign:"center"},direction:"column",gap:"1",children:[(0,i.jsx)(dI,{children:t("l_importation_e_12369")}),(0,i.jsx)(W,{textStyle:"subtitle",children:t("_la_fin_du_pro_00757")})]})]}),(0,i.jsxs)(G,{gap:"3",children:[(0,i.jsx)(jo,{onClick:()=>window.location.reload(),children:t("nouvel_import_48306")}),e.returnLink]})]})},eR=e=>!!e.getFieldState("input.csv.key")?.valid&&!!e.getFieldState("input.csv.file")?.valid,tR=/\[(cf[0-9]+|accreditation_slot_[0-9]+)\]$/,nR=/\[accreditation_slot_([0-9]+)\]$/,iR=(e,t)=>Math.abs(e.length-t.length)<=1&&(0===e.length||0===t.length||e.charCodeAt(0)===t.charCodeAt(0)||e.charCodeAt(e.length-1)===t.charCodeAt(t.length-1)),oR=(e,t)=>e.IMPORT_COLUMNS_REQUIRED(t.mode).every(e=>t.mappings.includes(e)),aR=(e,t,n)=>t.formatListValues(e.IMPORT_COLUMNS_REQUIRED(n.mode).filter(e=>!n.mappings.includes(e)),"conjunction"),sR=e=>{const{params:{organizationId:t,eventId:n,delegationId:o},translate:a}=Hf(),{shouldShowModeSelection:s}=OO();Cf(e.heading);const d=Ti(Ai),{data:l}=$a({organizationId:t}),c=Pi(),u=Ti(e.ImportInputService),m=(0,r.useRef)(null),g=(0,r.useMemo)(()=>((e,t,n)=>{let i;const o=()=>i??=((e,t,n)=>{const i=e.IMPORT_COLUMNS_DEFAULT,o=new Map,a=new Map;for(const[e,t]of Object.entries(i)){const n=e.toLowerCase(),s=String(t).toLowerCase();a.has(n)||a.set(n,i[e]),o.has(s)||o.set(s,i[t])}const s=new Map,r=new Map;for(const e of t){const t=e.slug.toLowerCase(),n=e.name.toLowerCase();s.has(t)||s.set(t,e.slug),r.has(n)||r.set(n,e.slug)}const d=new Map,l=new Map,c=[];let u=0;for(let e=0;e<(n?.length??0);e++){const t=[];c.push(t);for(const i of n[e].fields){const n={slug:i.slug,name:i.name,categoryIndex:e,order:u++};t.push(n);const o=String(i.id);d.has(o)||d.set(o,n);const a=l.get(i.name.length);a?a.push(n):l.set(i.name.length,[n])}}return{defaultBySlug:o,defaultByName:a,customFieldBySlug:s,customFieldByName:r,accreditationsById:d,accreditationsByLength:l,accreditationsByCategory:c,hasAccreditations:c.length>0}})(e,t,n),a=e=>{const t=o(),n=(e=>tR.exec(e)?.[1])(e);if(n){const i=n.toLowerCase();return t.defaultBySlug.has(i)?t.defaultBySlug.get(i)??null:n.startsWith("accreditation_slot_")&&t.hasAccreditations?(e=>{const t=o(),n=nR.exec(e)?.[1];if(void 0===n)return null;const i=t.accreditationsById.get(n);if(i)return i.slug;const a=e.split(" [accreditation_slot_").at(0)??e,s=t.accreditationsByLength.get(a.length)?.find(e=>e.name===a);if(s)return s.slug;let r;for(let e=a.length-1;e<=a.length+1;e++){const n=t.accreditationsByLength.get(e);if(n)for(const e of n)r&&e.order>r.order||iR(e.name,a)&&E(e.name,a)<2&&(r=e)}return r?.slug??null})(e):t.customFieldBySlug.has(i)?t.customFieldBySlug.get(i)??null:t.customFieldByName.get(e.toLowerCase())??null}const i=e.toLowerCase();return t.defaultByName.has(i)?t.defaultByName.get(i)??null:t.customFieldByName.get(i)??null};let s=null,r=[];return{matchColumn:a,getAutomaticMappings(e){const t=e.join("\0");return t===s||(s=t,r=e.map(a)),r}}})(e.ImportInputService,e.customFields,e.additionalCategories),[e.ImportInputService,e.customFields,e.additionalCategories]),[h,p]=(0,r.useState)(!1),f=(0,r.useMemo)(()=>{try{const t={dateFormat:l.organization.dateFormat,datetimeFormat:l.organization.datetimeFormat,timeFormat:l.organization.timeFormat},n=JSON.parse(c.getItem(OI[`${e.localStorageKeyPrefix}_FORMATS`])??"{}");return{...t,...n}}catch{return null}},[l.organization]),I=(0,r.useMemo)(()=>{const t=c.getItem(OI[`${e.localStorageKeyPrefix}_FORMATS`]);return t?JSON.parse(t):t},[e.localStorageKeyPrefix]),_=(0,r.useMemo)(()=>{const t=u.default(f).input;let n=t.mode;if(s)try{n=c.getItem(OI[`${e.localStorageKeyPrefix}_MODE`])??Ze.Upsert}catch(e){console.debug(`LocalStorage not available: ${String(e)}`)}return{input:{...t,mode:n,tag:`${e.importTagPrefix}-csv-${Vo.c9.now().toFormat(Xo)}`}}},[u,f,s,e.localStorageKeyPrefix,e.importTagPrefix]),y=Ti(sr),x=(0,r.useCallback)((n,i)=>{(0,qs.parse)(n,{delimiter:i.values.input.csv.delimiter,preview:1,newline:i.values.input.csv.newline,quoteChar:i.values.input.csv.quoteChar,complete:({data:t,errors:n})=>{if(!n.length||1===n.length&&"UndetectableDelimiter"===n[0].code){const n=t[0],o=g.getAutomaticMappings(n);let a={};try{a=JSON.parse(c.getItem(OI[`${e.localStorageKeyPrefix}_MAPPINGS`])??"{}")}catch(e){console.debug(`LocalStorage not available: ${String(e)}`)}const s=n.map((e,t)=>void 0!==a[e]?a[e]:o[t]??null);if(i.form.change("input.mappings",s),e.skipMappingIfAllColumnsMatch){const t=new Set([...Object.values(e.ImportInputService.IMPORT_COLUMNS_DEFAULT),...e.customFields.map(e=>e.slug),...(e.additionalCategories??[]).flatMap(e=>e.fields.map(e=>e.slug))]);p(s.every(e=>v(e)&&t.has(e))&&oR(e.ImportInputService,{mode:i.values.input.mode,mappings:s.filter(v)}))}}}});try{i.form.change("input.presets",JSON.parse(c.getItem(OI[`${e.localStorageKeyPrefix}_PRESETS`](t))??"[]"))}catch(e){console.debug(`LocalStorage not available: ${String(e)}`)}},[g,c,t,s,e.ImportInputService,e.importTagPrefix,e.localStorageKeyPrefix,e.skipMappingIfAllColumnsMatch]);return(0,i.jsx)(as.Provider,{value:{designSystem:os},children:(0,i.jsx)(yx,{category:a("nouvel_import_48306"),color:"dark",fallbackClosePath:e.closePath,heading:e.heading,children:(0,i.jsx)(BE,{ref:m,children:(0,i.jsxs)(YE,{containerRef:m,initialValues:_,isEdit:!1,summaryStep:(0,i.jsx)(JO,{returnLink:e.returnLink}),onSubmit:async({input:i})=>{if(!oR(e.ImportInputService,i))return{[Hg.Ym]:a("you_have_not_ma_46806",aR(e.ImportInputService,d,i))};(n=>{const i=n.csv.file;if(!i)throw new Error("No file in input!");(0,qs.parse)(i,{delimiter:n.csv.delimiter,preview:1,newline:n.csv.newline,quoteChar:n.csv.quoteChar,complete:({data:t,errors:i})=>{if(!i.length)try{const i=t[0],o=g.getAutomaticMappings(i),a=JSON.parse(c.getItem(OI[`${e.localStorageKeyPrefix}_MAPPINGS`])??"{}"),s={};for(const[e,t]of n.mappings.entries()){const n=i[e];t?s[n]=t:delete a[n],v(o[e])&&!s[n]&&(s[n]=null)}c.setItem(OI[`${e.localStorageKeyPrefix}_MAPPINGS`],JSON.stringify({...a,...s}))}catch(e){console.debug(`LocalStorage not available: ${String(e)}`)}}});try{const i=JSON.parse(c.getItem(OI[`${e.localStorageKeyPrefix}_PRESETS`](t))??"[]");c.setItem(OI[`${e.localStorageKeyPrefix}_PRESETS`](t),JSON.stringify([...new Map([...i,...n.presets].map(e=>[e.customFieldId,e])).values()])),c.setItem(OI[`${e.localStorageKeyPrefix}_FORMATS`],JSON.stringify(n.csv.formats?Object.fromEntries(Object.entries(n.csv.formats).filter(([e,t])=>v(t))):{})),s&&c.setItem(OI[`${e.localStorageKeyPrefix}_MODE`],n.mode)}catch(e){console.debug(`LocalStorage not available: ${String(e)}`)}})(i);const r=(e=>{const t={...e.csv};return delete t.file,{...e,csv:t}})(i);try{const{jobId:i}=await e.mutate({organizationId:t,eventId:n,delegationId:o,input:r});e.checkImport(i,t,n)}catch{}},children:[(0,i.jsx)(qE,{actions:t=>(0,i.jsxs)(G,{gap:"3",children:[(0,i.jsx)(jo,{disabled:!eR(t.form),onClick:t.handleSubmit,children:a("suivant_donn_08625")}),I&&(0,i.jsx)(jo,{color:"invisible-gray",onClick:()=>{c.removeItem(OI[`${e.localStorageKeyPrefix}_FORMATS`]),window.location.reload()},children:a("clear_saved_set_61259")})]}),heading:a("choix_du_fichie_30517"),render:t=>(0,i.jsx)(wO,{ImportInputService:e.ImportInputService,additionalCategories:e.additionalCategories,customFields:e.customFields,formRenderProps:t,localStorageKeyPrefix:e.localStorageKeyPrefix,sampleFilename:e.sampleFilename,onChange:x}),schema:y.settingsStepSchema()}),!h&&(0,i.jsx)(qE,{actions:e=>(0,i.jsx)(jo,{type:"submit",onClick:e.handleSubmit,children:a("importer_90688")}),heading:a("donn_es_impor_12371"),render:t=>(0,i.jsx)(XO,{ImportInputService:e.ImportInputService,additionalCategories:e.additionalCategories,additionalOptions:e.additionalOptions,customFields:e.customFields,formRenderProps:t,importTagPrefix:e.importTagPrefix,isTagInputDisabled:e.isTagInputDisabled,localStorageKeyPrefix:e.localStorageKeyPrefix}),schema:u.mappingStepSchema()})]})})})})},rR=()=>{const{params:{organizationId:e,eventId:t,delegationId:n},translate:o}=Hf(),a=Ti(jl),{data:s,loader:d}=Mi("query DelegationImportInfos($organizationId: OrganizationId!, $delegationId: DelegationId!) {\n organization: organizationPublic(id: $organizationId) {\n delegation(id: $delegationId) {\n name\n form {\n elements {\n elementType\n customField {\n ...CustomFieldImport\n }\n }\n }\n\n accreditationsProfiles {\n accreditationProfile {\n ...AccreditationProfileImport\n }\n }\n\n accreditationsSlots(onlyVisible: true) {\n accreditationSlot {\n id\n name\n date\n isBlocked\n accreditation {\n id\n name\n }\n }\n }\n }\n }\n}\n",{organizationId:e,delegationId:n},[Yo.CustomFieldImportFragment,Yo.AccreditationProfileImportFragment]),{mutate:l}=function(e={}){return Di("mutation VolunteersImport(\n $eventId: EventId\n $organizationId: OrganizationId!\n $delegationId: DelegationId\n $input: MappableImportInput!\n) {\n jobId: volunteersImport(\n eventId: $eventId\n organizationId: $organizationId\n delegationId: $delegationId\n input: $input\n )\n}\n",e)}(),{checkVolunteersImport:c}=(0,r.useContext)(ls),u=(0,r.useCallback)((e,t,i)=>c(e,t,i,n),[c,n]),m=(0,r.useMemo)(()=>{const e=new Map;return(0,vs.A)((s.organization?.delegation.accreditationsSlots??[]).filter(e=>!e.accreditationSlot.isBlocked),e=>e.accreditationSlot.date?.toMillis()??0).forEach(({accreditationSlot:{accreditation:t,id:n,name:i,date:o}})=>{const a={id:n,name:i,date:o},s=e.get(t.id);s?s.slots.push(a):e.set(t.id,{...t,slots:[a]})}),((e,t)=>t.map(t=>({id:t.id,name:t.name,fields:t.slots.map(n=>({id:n.id,slug:`accreditation_slot_${n.id}`,name:Dg(e,n,t.name,{accreditation:{includeNameAtEnd:!0}})}))})))(a,[...e.values()]).concat((t=(s.organization?.delegation.accreditationsProfiles??[]).map(e=>e.accreditationProfile),Object.values((0,ym.A)(t,e=>e.accreditationProfileCategory.id)).map(e=>({id:e[0].accreditationProfileCategory.id,name:e[0].accreditationProfileCategory.name,fields:e.map(e=>({id:e.id,slug:`accreditation_profile_${e.id}`,name:e.name}))}))));var t},[s.organization,a]),g=(0,r.useMemo)(()=>(s.organization?.delegation.form.elements??[]).flatMap(e=>e.elementType===Ve.Field?[e.customField]:[]),[s.organization]);return d||(0,i.jsx)(TO,{alertDescriptionKey:"to_add_a_member_56912",children:(0,i.jsx)(sR,{ImportInputService:em,additionalCategories:m,checkImport:u,closePath:hg.DELEGATION_MEMBERS({organizationId:e,eventId:t,delegationId:n}),customFields:g,heading:o("import_de_membr_48618"),importTagPrefix:`delegation-${n}`,isTagInputDisabled:!0,localStorageKeyPrefix:"DELEGATION_MEMBERS_IMPORT",mutate:l,returnLink:(0,i.jsx)(WI,{to:hg.DELEGATION({organizationId:e,eventId:t,delegationId:n}),children:o("revenir_aux_d_l_04236")}),sampleFilename:s.organization.delegation.name,skipMappingIfAllColumnsMatch:!0})})},dR=e=>(0,i.jsx)(WE,{disabled:e.disabled,heading:e.heading,hideHeader:e.hideHeader,children:(0,i.jsx)(G,{direction:"column",children:e.children})}),lR=e=>{const{translate:t}=Hf();return(0,i.jsx)(dR,{heading:(0,i.jsxs)(G,{justify:"between",width:1,css:{display:"flex !important"},children:[(0,i.jsx)(Li,{children:t("invit_n_1_57041",e.index+1)}),e.showRemove&&(0,i.jsx)(jo,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.onRemove})]}),children:(0,i.jsxs)(G,{direction:"column",gap:"4",width:1,children:[(0,i.jsx)(TI,{isEmail:!0,label:t("Email"),name:`${e.prefix}email`}),(0,i.jsxs)(G,{gap:"4",children:[(0,i.jsx)(TI,{label:(0,i.jsx)(Gy,{children:t("pr_nom_66988")}),name:`${e.prefix}fields.firstName`}),(0,i.jsx)(TI,{label:(0,i.jsx)(Gy,{children:t("last_name")}),name:`${e.prefix}fields.lastName`})]})]})})},cR=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:o,delegationId:a}}=Hf(),s=Ti(id),{mutate:r}=function(e={}){return Di("mutation DelegationFormInvite(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $usersInfos: [UsersInfoEmailInput!]!\n) {\n delegationFormInvite(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n usersInfos: $usersInfos\n )\n}\n",e)}(),d=()=>{e.goBack(hg.DELEGATION_DASHBOARD({organizationId:n,eventId:o,delegationId:a}))};return(0,i.jsxs)(G,{direction:"column",gap:"7",children:[(0,i.jsx)(jo,{color:"invisible",leftIcon:"arrow-left",onClick:d,children:t("retour_92202")}),(0,i.jsx)(Li,{font:"gray800 textLg bold",children:t("envoyer_le_lien_38138")}),(0,i.jsx)(II,{direction:"column",gap:"6",hideDefaultErrors:!0,initialValues:s.delegationFormInviteValuesDefault(),render:({handleSubmit:e,submitting:n})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hI,{hideSpacer:!0}),(0,i.jsx)(sv.ED,{name:"usersInfos",children:({fields:e})=>(0,i.jsxs)(i.Fragment,{children:[e.map((t,n)=>(0,i.jsx)(lR,{index:n,prefix:`${t}.`,showRemove:(e?.length??0)>1,onRemove:()=>e.remove(n)},n)),(0,i.jsx)(jo,{color:"invisible",leftIcon:"plus",onClick:()=>{e.push({email:"",fields:{firstName:"",lastName:""}})},children:t("ajouter_un_invi_90855")})]})}),(0,i.jsx)(G,{children:(0,i.jsx)(jo,{isLoading:n,onClick:e,children:t("envoyer_le_lien_38138")})})]}),schema:s.delegationFormInviteValuesSchema(),onSubmit:async e=>{await r({organizationId:n,eventId:o,delegationId:a,usersInfos:e.usersInfos}),d()}})]})},uR=e=>{const{translate:t,params:{organizationId:n,eventId:o}}=Hf(),a=Ti(Yg),s=(0,r.useMemo)(()=>v(e.form.description)?a.renderText(e.form.description,{event:e.event,organization:e.organization}):"",[e.event,e.form.description,e.organization]),d=(0,r.useMemo)(()=>o&&e.form.slotDisplay!==Et.Hide,[e.form,o]),l=(0,r.useMemo)(()=>o&&e.form.positionDisplay!==At.None,[e.form,o]),c=(0,r.useMemo)(()=>o&&(e.form.accreditationDisplay!==bt.None||h(e.delegationAccreditationsSlots)||h(e.delegationAccreditationsProfiles)),[e.delegationAccreditationsProfiles,e.delegationAccreditationsSlots,e.form,o]),u=(0,r.useMemo)(()=>e.userInfo?.volunteerRegistration?.accreditationsUsersInfos.flatMap(e=>e.checkInAt?.isValid?[e.accreditationSlotId]:[])??[],[e.userInfo]),g=function(e,t=300){const[n,i]=(0,r.useState)(e),o=Uj(i,t);return(0,r.useEffect)(()=>{o(e)},[e]),n}(e.values.formRegister.userInfo.fields);return(0,i.jsxs)(i.Fragment,{children:[e.showEmail&&(0,i.jsxs)(dR,{hideHeader:!0,children:[v(s)&&(0,i.jsx)(w_,{text:s}),(0,i.jsx)(TI,{isEmail:!0,label:t("Email"),name:"email"})]}),(0,i.jsx)(dR,{heading:v(e.form.informationTitle)?e.form.informationTitle:t("informations_pe_37892"),children:e.disabled?(0,i.jsx)(zC,{form:e.form,userInfo:e.userInfo}):(0,i.jsx)(AS,{asoBannersColors:e.asoBannersColors,change:e.change,elements:e.form.elements,organizationId:n,prefix:"formRegister.userInfo.fields.",values:e.values.formRegister.userInfo.fields})}),d&&e.event&&(0,i.jsxs)(dR,{heading:v(e.form.slotTitle)?e.form.slotTitle:t("disponibilit_s_49923"),children:[v(e.form.slotSubtitle)&&(0,i.jsx)(w_,{text:e.form.slotSubtitle}),e.areSectionsDisabled?.isWishedAssignmentsDisabled?(0,i.jsxs)(lI,{alertStyle:"warning",children:[(0,i.jsx)(cI,{children:t("no_longer_modif_99663")}),(0,i.jsx)(uI,{children:t("you_are_already_assigned_to_missions")})]}):(0,i.jsx)(cv,{blockedSlots:e.blockedSlots,change:e.change,currentSlots:e.values.formRegister.slots,customSlotsPeriods:e.form.customSlotsPeriods,daysDisplay:e.form.daysDisplay,elements:e.form.elements,event:e.event,prefix:"formRegister.",slotDisplay:e.form.slotDisplay,userInfoFields:g})]}),l&&e.event&&(0,i.jsxs)(dR,{heading:v(e.form.positionTitle)?e.form.positionTitle:t("missions_souhai_23225"),children:[v(e.form.positionSubtitle)&&(0,i.jsx)(w_,{text:e.form.positionSubtitle}),e.areSectionsDisabled?.isWishedAssignmentsDisabled?(0,i.jsxs)(lI,{alertStyle:"warning",children:[(0,i.jsx)(cI,{children:t("no_longer_modif_99663")}),(0,i.jsx)(uI,{children:t("you_are_already_assigned_to_missions")})]}):(0,i.jsx)(YS,{change:e.change,event:e.event,options:e.form,positionsCategoriesIds:e.values.formRegister.positionsCategoriesIds,positionsIds:e.values.formRegister.positionsIds,positionsSlotsIds:e.values.formRegister.positionsSlotsIds,prefix:"formRegister.",slots:e.values.formRegister.slots,userInfoFields:g})]}),c&&e.event&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(dR,{heading:v(e.form.accreditationTitle)?e.form.accreditationTitle:t("accr_ditations_74375"),children:[v(e.form.accreditationSubtitle)&&(0,i.jsx)(w_,{text:e.form.accreditationSubtitle}),e.areSectionsDisabled?.isWishedAccreditationsDisabled?(0,i.jsxs)(lI,{alertStyle:"warning",children:[(0,i.jsx)(cI,{children:t("no_longer_modif_99663")}),(0,i.jsx)(uI,{children:t("you_are_already_assigned_to_accreditations")})]}):(0,i.jsx)(SS,{accreditationProfileId:e.values.formRegister.accreditationProfileId,accreditationsSlotsIds:e.values.formRegister.accreditationsSlotsIds,alreadyAssignedProfileId:e.alreadyAssignedProfileId,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,change:e.change,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles??m,delegationAccreditationsSlots:e.delegationAccreditationsSlots??m,displayFormCustomFields:!0,event:e.event,options:e.form,prefix:"formRegister.",scannedSlotsIds:u,showAutoAccredit:e.showAutoAccredit,slots:e.values.formRegister.slots,userInfosFields:g})]})})]})},mR=e=>{const{params:{delegationId:t},translate:n}=Hf(),o=Ti(Zg),a=Ti(Tc),s=(0,r.useRef)(null),d=e.form,l=(0,r.useMemo)(()=>d.elements.filter(e=>e.elementType===Ve.Field),[d.elements]),c=(0,r.useMemo)(()=>a.formRegisterSchema(l,{...d,eventStartDate:e.event?.startAt??Vo.c9.now(),eventEndDate:e.event?.endAt??Vo.c9.now(),delegationId:t,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles||[],areSectionsDisabled:e.areSectionsDisabled}),[t,l,d,e.areSectionsDisabled,e.delegationAccreditationsProfiles,e.event]),u=(0,r.useCallback)(e=>o.validateForForm(c)(e),[c]);return(0,i.jsxs)(G,{ref:s,direction:"column",gap:"7",children:[(0,i.jsx)(jo,{color:"invisible",leftIcon:"arrow-left",onClick:e.handleRedirect,children:n("retour_92202")}),e.header,(0,i.jsx)(II,{customErrorRef:s,direction:"column",gap:"6",initialValues:e.initialValues,render:({form:{change:t},submitting:o,values:a,handleSubmit:s})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hI,{featureFlags:e.featureFlags,hideSpacer:!0}),(0,i.jsx)(uR,{alreadyAssignedProfileId:e.alreadyAssignedProfileId,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,areSectionsDisabled:e.areSectionsDisabled,asoBannersColors:e.asoBannersColors,blockedSlots:e.blockedSlots,change:t,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,disabled:e.disabled,event:e.event,form:e.form,organization:e.organization,showAutoAccredit:!1,showEmail:e.showEmail,userInfo:e.userInfo,values:a}),(0,i.jsxs)(G,{gap:"4",children:[(0,i.jsx)(jo,{isLoading:o,onClick:s,children:e.isUpdate?n("enregistrer_06519"):n("cr_er_le_membre_78743")}),(0,i.jsx)(jo,{color:"white",onClick:e.handleRedirect,children:n("annuler_48254")})]})]}),validate:u,width:1,onSubmit:async t=>{await e.mutate(t.email,t.formRegister),e.reload(),e.handleRedirect()}})]})},gR=e=>{const{params:{organizationId:t,delegationId:n},translate:o}=Hf(),a=Ti(Tc),{mutate:s}=za(),d=(0,r.useMemo)(()=>({email:"",formRegister:a.formRegisterInputDefault(qe.DelegationsSpace,null,e.customFields,{countryCode:e.country,delegationAccreditationsSlots:e.delegationAccreditationsSlots,eventStartDate:e.event?.startAt,forOther:!0,sendNotificationEmail:!1,slotDisplay:e.form.slotDisplay,team:null})}),[e.customFields]),l=(0,r.useCallback)((i,o)=>s({organizationId:t,eventId:e.eventId,delegationId:n,formId:e.form.id,email:i,formRegister:o}),[]);return(0,i.jsx)(mR,{alreadyAssignedProfileId:null,alreadyAssignedSlotsIds:m,asoBannersColors:e.asoBannersColors,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,event:e.event,form:e.form,handleRedirect:e.handleRedirect,header:(0,i.jsx)(Li,{font:"gray800 textLg bold",children:o("cr_ation_d_un_m_98624")}),initialValues:d,isUpdate:!1,mutate:l,organization:e.organization,reload:e.reload,showEmail:e.showEmail})},hR=e=>{const{params:{organizationId:t,eventId:n,delegationId:o,formId:a,userInfoId:s},translate:d}=Hf(),l=Ti(Tc),{mutate:c}=Ua(),{mutate:u}=function(e={}){return Di("mutation UserInfoUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $userId: UserId!\n $userInfo: UsersInfoInput!\n $filledFormsIds: [FormId!]\n $memberSpaceFormId: FormId\n $formKeyToTeamCode: JSON\n) {\n userInfoUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n userId: $userId\n userInfo: $userInfo\n filledFormsIds: $filledFormsIds\n formKeyToTeamCode: $formKeyToTeamCode\n memberSpaceFormId: $memberSpaceFormId\n ) {\n id\n }\n}\n",e)}(),{mutate:m}=function(e={}){return Di("mutation UserInfoSlotsUpdate(\n $eventId: EventId!\n $userId: UserId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $userInfoSlots: [UserInfoSlotsInput!]!\n) {\n userInfoSlotsUpdate(\n eventId: $eventId\n userId: $userId\n delegationId: $delegationId\n userInfoId: $userInfoId\n userInfoSlots: $userInfoSlots\n )\n}\n",e)}(),{mutate:g}=function(e={}){return Di("mutation UserInfoPositionsUpdate(\n $eventId: EventId!\n $userId: UserId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $userInfoPositions: [UserInfoPositionsInput!]!\n) {\n userInfoPositionsUpdate(\n eventId: $eventId\n userId: $userId\n delegationId: $delegationId\n userInfoId: $userInfoId\n userInfoPositions: $userInfoPositions\n )\n}\n",e)}(),{mutate:h}=function(e={}){return Di("mutation UserInfoAccreditationsUpdate(\n $eventId: EventId!\n $userId: UserId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $userInfoAccreditations: [UserInfoAccreditationsInput!]!\n) {\n userInfoAccreditationsUpdate(\n eventId: $eventId\n userId: $userId\n delegationId: $delegationId\n userInfoId: $userInfoId\n userInfoAccreditations: $userInfoAccreditations\n )\n}\n",e)}(),p=(0,r.useMemo)(()=>{const t=(e.form.elements??[]).flatMap(e=>e.elementType===Ve.Field?[e.customField]:[]),n=(e.event?.accreditationsCategories??[]).flatMap(e=>e.accreditations.flatMap(e=>e.formCustomFields.map(({customField:e})=>e)));return t.concat(n)},[e.form,e.event]),f=(0,r.useMemo)(()=>({email:e.userInfo.email,formRegister:{...l.formRegisterInputDefault(qe.DelegationsSpace,e.userInfo,p,{countryCode:e.country,eventStartDate:e.event?.startAt,forOther:!0,sendNotificationEmail:!1,slotDisplay:e.form.slotDisplay,team:null}),positionsSlotsIds:e.userInfo.formUserInfo.positionsSlotsIds,positionsIds:e.userInfo.formUserInfo.positionsIds,positionsCategoriesIds:e.userInfo.formUserInfo.positionsCategoriesIds,accreditationProfileId:e.userInfo.formUserInfo.accreditationProfileId,accreditationsSlotsIds:e.userInfo.formUserInfo.accreditationsSlotsIds.concat(e.delegationAccreditationsSlots?.filter(e=>e.isDefault).map(e=>e.accreditationSlotId)??[]),slots:e.userInfo.formUserInfo.slots.map(e=>({startDate:e.startDate,startTime:e.startTime,endDate:e.endDate,endTime:e.endTime}))}}),[e.userInfo,e.country,e.form,e.event,p]),I=(0,r.useCallback)(async(i,r)=>(i!==e.userInfo.email&&await c({organizationId:t,eventId:n,delegationId:o,userInfoId:s,email:i}),e.disabled||await u({organizationId:t,eventId:n,delegationId:o,userId:e.userInfo.userId,userInfo:r.userInfo}),n&&e.form.slotDisplay!==Et.Hide&&await m({eventId:n,delegationId:o,userId:e.userInfo.userId,userInfoId:s,userInfoSlots:[{formId:a,slots:r.slots}]}),n&&e.form.positionDisplay!==At.None&&await g({eventId:n,delegationId:o,userId:e.userInfo.userId,userInfoId:s,userInfoPositions:[{formId:a,positionsCategoriesIds:r.positionsCategoriesIds,positionsIds:r.positionsIds,positionsSlotsIds:r.positionsSlotsIds}]}),n&&await h({eventId:n,delegationId:o,userId:e.userInfo.userId,userInfoId:s,userInfoAccreditations:[{formId:a,accreditationProfileId:r.accreditationProfileId,accreditationsSlotsIds:r.accreditationsSlotsIds}]}),!0),[e.userInfo,e.form]);return(0,i.jsx)(mR,{alreadyAssignedProfileId:e.userInfo.formUserInfo.accreditationProfileId,alreadyAssignedSlotsIds:e.userInfo.formUserInfo.accreditationsSlotsIds,areSectionsDisabled:e.areSectionsDisabled,asoBannersColors:e.asoBannersColors,blockedSlots:e.blockedSlots,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,disabled:e.disabled,event:e.event,featureFlags:e.featureFlags,form:e.form,handleRedirect:e.handleRedirect,header:(0,i.jsx)(dR,{hideHeader:!0,children:(0,i.jsxs)(G,{align:"center",gap:"3",children:[(0,i.jsx)(J_,{email:e.userInfo.email,image:e.userInfo.picture?.url,name:e.userInfo.name,size:64}),(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(Li,{font:"gray500 textXs medium",children:d("mise_jour_des_00596")}),(0,i.jsx)(Li,{font:"gray800 textXl bold",children:e.userInfo.name})]})]})}),initialValues:f,isUpdate:!0,mutate:I,organization:e.organization,reload:e.reload,showEmail:e.showEmail,userInfo:e.userInfo})},pR=e=>{const{history:t,params:{organizationId:n,eventId:o,delegationId:a,formId:s}}=Hf(),{data:d,loader:l}=Mi("query DelegationsSpaceCreateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $formId: FormId!\n) {\n organization(id: $organizationId) {\n id\n name\n dateFormat\n datetimeFormat\n\n ...OrganizationDelegationsSpace\n\n delegation(id: $delegationId) {\n eventId\n\n delegationCategory {\n banners(excludeFull: true) {\n bannerType\n }\n }\n\n accreditationsProfiles {\n ...DelegationAccreditationProfile\n }\n\n accreditationsSlots(onlyVisible: true) {\n ...DelegationAccreditationSlot\n }\n\n form {\n ...CreateUpdateMemberForm\n }\n }\n\n event: eventMaybe(id: $eventId) {\n ...EventCreateUpdateMember\n }\n }\n}\n",{organizationId:n,eventId:o,delegationId:a,formId:s},[Yo.OrganizationDelegationsSpaceFragment,Yo.DelegationAccreditationProfileFragment,Yo.DelegationAccreditationSlotFragment,Yo.CreateUpdateMemberFormFragment,Yo.EventCreateUpdateMemberFragment]),c=(0,r.useMemo)(()=>(d.organization?.delegation.form.elements??[]).flatMap(e=>e.elementType===Ve.Field?[e.customField]:[]),[d.organization]),u=(0,r.useMemo)(()=>(d.organization?.delegation.delegationCategory.banners??[]).flatMap(e=>"number"==typeof e.bannerType?[e.bannerType]:[]),[d.organization]);return l||(0,i.jsx)(gR,{asoBannersColors:u,country:d.organization.event?.country,customFields:c,delegationAccreditationsProfiles:d.organization.delegation.accreditationsProfiles,delegationAccreditationsSlots:d.organization.delegation.accreditationsSlots,event:d.organization.event,eventId:d.organization.delegation.eventId,form:d.organization.delegation.form,organization:d.organization,handleRedirect:()=>t.goBack(hg.DELEGATION({organizationId:n,eventId:o,delegationId:a})),reload:e.reload,showEmail:!0})},fR=e=>{const{history:t,params:{organizationId:n,eventId:o,delegationId:a,formId:s,userInfoId:d}}=Hf(),{data:l,loader:c}=Mi("query DelegationsSpaceUpdateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $formId: FormId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n id\n name\n dateFormat\n datetimeFormat\n\n ...OrganizationDelegationsSpace\n country\n\n delegation(id: $delegationId) {\n eventId\n\n delegationCategory {\n banners(excludeFull: true) {\n bannerType\n }\n }\n\n accreditationsProfiles {\n ...DelegationAccreditationProfile\n }\n\n accreditationsSlots(onlyVisible: true) {\n ...DelegationAccreditationSlot\n }\n\n form {\n ...CreateUpdateMemberForm\n }\n }\n\n event: eventMaybe(id: $eventId) {\n ...EventCreateUpdateMember\n }\n\n userInfo(id: $userInfoId) {\n ...UserInfoUpdateMember\n }\n }\n}\n",{organizationId:n,eventId:o,delegationId:a,formId:s,userInfoId:d},[Yo.OrganizationDelegationsSpaceFragment,Yo.DelegationAccreditationProfileFragment,Yo.DelegationAccreditationSlotFragment,Yo.CreateUpdateMemberFormFragment,Yo.EventCreateUpdateMemberFragment,Yo.UserInfoUpdateMemberFragment]),u=(0,r.useMemo)(()=>(l.organization?.delegation.delegationCategory.banners??[]).flatMap(e=>"number"==typeof e.bannerType?[e.bannerType]:[]),[l.organization]);return c||(0,i.jsx)(hR,{asoBannersColors:u,country:l.organization.event?.country??l.organization.country,delegationAccreditationsProfiles:l.organization.delegation.accreditationsProfiles,delegationAccreditationsSlots:l.organization.delegation.accreditationsSlots,event:l.organization.event,form:l.organization.delegation.form,organization:l.organization,handleRedirect:()=>t.goBack(hg.DELEGATION({organizationId:n,eventId:o,delegationId:a})),reload:e.reload,showEmail:!0,userInfo:l.organization.userInfo})},IR=({inputName:e})=>{const t=Oi(),n=aS();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{css:{gap:"$6","@tablet":{gap:"$4","> *":{flexGrow:1,width:"auto"}}},wrap:"wrap",children:[(0,i.jsx)(TI,{autoComplete:"given-name",label:t("pr_nom_66988"),name:`${e}fields.firstName`}),(0,i.jsx)(TI,{autoComplete:"family-name",label:t("last_name"),name:`${e}fields.lastName`})]}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(TI,{autoComplete:"email",isEmail:!0,label:t("e_mail_13869"),name:`${e}email`}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(nS,{autoComplete:"language",label:t("Language"),name:`${e}fields.language`,children:n(Jd)}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(Fx,{label:t("Phone"),prefix:`${e}fields.phone.`})]})},_R=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:o,delegationId:a}}=Hf(),{data:s,loader:r}=Mi("query Profile($organizationId: OrganizationId!) {\n user {\n email\n language\n\n userInfo(organizationId: $organizationId) {\n id\n fields\n }\n }\n}\n",{organizationId:n},[]),d=Ti(Ic),l=Ti(Zg),{mutate:c,isLoading:u}=function(e={}){return Di("mutation UserProfileUpdate(\n $userId: UserId!\n $userInfoId: UsersInfoId!\n $userInfo: UsersInfoEmailInput!\n) {\n userProfileUpdate(userId: $userId, userInfoId: $userInfoId, userInfo: $userInfo) {\n email\n language\n }\n}\n",e)}(),{user:m}=ms(),g=hg.DELEGATION({organizationId:n,eventId:o,delegationId:a}),h=(t=!1)=>t?e.goBack(g):e.push(g);return r||(0,i.jsx)(II,{direction:"column",height:1,initialValues:{userInfo:d.userInfoProfileInputDefault(s.user)},render:({handleSubmit:e})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(jo,{color:"invisible",leftIcon:"arrow-left",onClick:()=>h(!0),children:t("retour_92202")}),(0,i.jsx)(oI,{height:"4"}),(0,i.jsx)(Li,{font:"gray800 textLg bold",children:t("mise_jour_du_49930")}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(hI,{}),(0,i.jsx)(Dx,{accept:ax.Images,acl:"public-read",allowCrop:!0,label:t("photo_de_profil_08618"),organizationId:n,prefix:"userInfo.fields.picture."}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsx)(IR,{inputName:"userInfo."}),(0,i.jsx)(oI,{height:"6"}),(0,i.jsxs)(G,{gap:"4",children:[(0,i.jsx)(jo,{isLoading:u,onClick:e,children:t("enregistrer_les_30411")}),(0,i.jsx)(jo,{color:"white",onClick:()=>h(!0),children:t("annuler_48254")})]})]}),validate:l.validateForForm(d.updateProfileSchema()),width:1,onSubmit:async e=>{const{userProfileUpdate:{email:t,language:n}}=await c({userId:m.id,userInfoId:s.user.userInfo.id,userInfo:e.userInfo});m.email!==t||m.language!==n?ba():h()}})},yR=()=>{const{params:{organizationId:e,eventId:t,delegationId:n}}=Hf(),{data:o,loader:a,reload:s}=Mi('query DelegationsSpaceDelegation(\n $delegationId: DelegationId!\n $organizationId: OrganizationId!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n ...OrganizationDelegationsSpace\n\n event: eventMaybe(id: $eventId) {\n defaultDelegationsSpaceLayout {\n tabs {\n ...DelegationsSpaceLayoutTab\n }\n }\n\n delegationsSpaceDesign: spaceDesign(spaceType: DelegationSpace) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n }\n\n delegations(level: Both, onlyVisibleInDelegation: true) {\n nodes {\n id\n name\n\n event {\n id\n name\n }\n }\n }\n\n delegation(id: $delegationId) {\n eventId\n formId\n parentId\n numberOfDelegationsAccreditationsSlots\n numberOfResources\n name\n columns\n state\n canLeadersAddMembers\n canLeadersEditMembers\n canLeadersDeleteMembers\n canLeadersDuplicateMembers\n canLeadersEditColumns\n canLeadersImportMembers\n canLeadersSeeHiddenAccreditationsSlots\n\n campaigns {\n id\n name\n }\n\n customDocuments {\n slug\n name\n }\n\n delegationsSpaceLayout {\n tabs {\n ...DelegationsSpaceLayoutTab\n }\n }\n\n event {\n name\n\n customDocuments {\n slug\n name\n }\n }\n }\n }\n\n user {\n ...UserPermissions\n\n userInfo(organizationId: $organizationId) {\n ...MemberRegistrationUserInfo\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n }\n }\n}\n',{delegationId:n,organizationId:e,eventId:t},[Yo.OrganizationDelegationsSpaceFragment,Yo.DelegationsSpaceLayoutTabFragment,Yo.DesignColorsFragment,Yo.UserPermissionsFragment,Yo.MemberRegistrationUserInfoFragment]),d=(0,r.useMemo)(()=>{const e=o.organization?.delegations.nodes??[];return(0,i.jsx)(Xv,{delegations:e})},[o.organization]),l=(0,r.useMemo)(()=>o.organization?.delegation?.delegationsSpaceLayout?.tabs??o.organization?.event?.defaultDelegationsSpaceLayout?.tabs??m,[o.organization]);return(0,r.useEffect)(()=>{const e=o.organization?.delegation?.event?.name??o.organization?.name??"Recrewteer";document.title=(0,bs.A)([e,o.organization?.delegation?.name]).join(" - ")},[o.organization]),a||(0,i.jsx)(Kv,{userPermissions:o.user,children:(0,i.jsxs)(Is.dO,{children:[(0,i.jsx)(Is.qh,{path:[hg.DELEGATION_MEMBERS_IMPORT({organizationId:":organizationId",delegationId:":delegationId",eventId:":eventId"}),hg.DELEGATION_MEMBERS_IMPORT({organizationId:":organizationId",delegationId:":delegationId"})],children:(0,i.jsx)(rR,{})}),(0,i.jsx)(Is.qh,{children:(0,i.jsx)(ny,{extraItems:d,isLoading:!1,organization:o.organization,spaceDesign:{themeColors:o.organization?.event?.delegationsSpaceDesign?.colors??o.organization?.delegationsSpaceDesign?.colors,bannerSrc:o.organization?.event?.delegationsSpaceDesign?.banner?.url??o.organization?.delegationsSpaceDesign?.banner?.url,logoSrc:o.organization?.event?.delegationsSpaceDesign?.logo?.url??o.organization?.delegationsSpaceDesign?.logo?.url},children:(0,i.jsxs)(Is.dO,{children:[(0,i.jsx)(Is.qh,{exact:!0,path:[hg.DELEGATION({organizationId:":organizationId",delegationId:":delegationId"}),hg.DELEGATION({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(tb,{delegationsSpaceLayoutTabs:l})}),(0,i.jsx)(Is.qh,{path:[hg.MEMBERS_INVITE({organizationId:":organizationId",delegationId:":delegationId"}),hg.MEMBERS_INVITE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(cR,{})}),(0,i.jsx)(Is.qh,{path:[hg.MEMBER_EDIT({organizationId:":organizationId",delegationId:":delegationId",userInfoId:":userInfoId",formId:":formId"}),hg.MEMBER_EDIT({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",userInfoId:":userInfoId",formId:":formId"})],children:(0,i.jsx)(fR,{reload:s})}),(0,i.jsx)(Is.qh,{path:[hg.MEMBER_CREATE({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"}),hg.MEMBER_CREATE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})],children:(0,i.jsx)(pR,{reload:s})}),(0,i.jsx)(Is.qh,{path:[hg.DELEGATION_PROFILE({organizationId:":organizationId",delegationId:":delegationId"}),hg.DELEGATION_PROFILE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(_R,{})}),(0,i.jsx)(Is.qh,{path:[hg.FIELDS_EDIT({organizationId:":organizationId",delegationId:":delegationId"}),hg.FIELDS_EDIT({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(eb,{})}),(0,i.jsx)(Is.qh,{children:(0,i.jsx)(CO,{allowDelegationSpaceDownload:o.organization.allowDelegationSpaceDownload,delegation:o.organization.delegation,delegationsSpaceCustomBadges:o.organization.delegationsSpaceCustomBadges,delegationsSpaceLayoutTabs:l,user:o.user})})]})})})]})})},xR=()=>(0,i.jsxs)(Is.dO,{children:[(0,i.jsx)(Is.qh,{path:[hg.DELEGATION({delegationId:":delegationId",organizationId:":organizationId"}),hg.DELEGATION({delegationId:":delegationId",eventId:":eventId",organizationId:":organizationId"})],children:(0,i.jsx)(yR,{})}),(0,i.jsx)(Is.rd,{from:"/v2/organization/:organizationId/delegations",to:_d(Km.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))})]}),SR=()=>(0,i.jsx)(Bv,{children:(0,i.jsx)(xR,{})}),vR=()=>(0,i.jsxs)(Is.dO,{children:[(0,i.jsx)(Is.rd,{exact:!0,from:Km.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}),to:yd(Km.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))}),(0,i.jsx)(Is.qh,{path:yd(Km.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"})),children:(0,i.jsx)(qv,{})}),(0,i.jsx)(Is.qh,{path:[hg.DELEGATION({delegationId:":delegationId",organizationId:":organizationId"}),hg.DELEGATION({delegationId:":delegationId",eventId:":eventId",organizationId:":organizationId"})],children:(0,i.jsx)(SR,{})})]}),bR=()=>(0,i.jsx)(Bv,{children:(0,i.jsx)(vR,{})});function jR(e,t,n){const i=oa.DateOnly.MonthLong;return t.equals(n)?e.toLocaleString(t,i):[e.toLocaleString(t,oa.DateOnly.MonthShort),e.toLocaleString(n,oa.DateOnly.MonthShort)].join(" - ")}function AR(e){switch(e){case $e.Archived:case $e.Done:return"error";case $e.Ongoing:return"success";case $e.Upcoming:return"purple";default:return wr()}}function CR(e,t){const n=Vo.c9.now().setZone("utc",{keepLocalTime:!0}).startOf("day");return Vo.IX.fromDateTimes(e.startOf("day"),t.endOf("day")).contains(n)?n:e}const ER=e=>{const t=Oi(),n=Ti(jl);return(0,i.jsxs)(G,{direction:"column",gap:"1",width:200,children:[(0,i.jsx)(Li,{font:"gray500 textXs regular",children:t("date_de_l_v_ne_69973")}),(0,i.jsx)(Li,{font:"gray800 textSm medium",children:jR(n,e.event.startAt,e.event.endAt)})]})},TR=e=>{const t=Oi();return(0,i.jsxs)(G,{direction:"column",gap:"1",width:100,children:[(0,i.jsx)(Li,{font:"gray500 textXs regular",children:t("State")}),(0,i.jsx)(G,{children:(0,i.jsx)(My,{color:AR(e.event.state),children:t(e.event.state)})})]})},OR=e=>(0,i.jsxs)(G,{css:{alignItems:"center",padding:"$4",inlineSize:"100%",background:"$grayCustom50","@tablet":{maxInlineSize:"$containerTablet"},"@desktop":{maxInlineSize:"$container"}},direction:"column",gap:"7",children:[(0,i.jsx)(ZI,{}),(0,i.jsx)(G,{css:{alignItems:"flex-start",alignSelf:"stretch"},direction:"column",gap:"6",children:e.children})]}),RR=R("div",{display:"flex",justifyContent:"center",alignItems:"center",background:"$grayCustom50",padding:"$10 $4 0 $4"}),MR=()=>(0,i.jsx)(RR,{children:(0,i.jsxs)(OR,{children:[(0,i.jsx)(KI,{}),(0,i.jsxs)(G,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)(UI,{borderRadius:"$1",height:23,width:1}),(0,i.jsx)(UI,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(UI,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(UI,{borderRadius:"$2",height:74,width:1})]})]})}),DR=()=>{const{params:{organizationId:e,userInfoId:t},translate:n}=Hf(),o=$_(),{data:a,isLoading:s,loader:d}=Mi('query MemberRegistrations($organizationId: OrganizationId!, $userInfoId: UsersInfoId!) {\n organization(id: $organizationId) {\n ...OrganizationMembersSpace\n }\n\n userInfo(id: $userInfoId) {\n email\n name\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n\n picture {\n url\n }\n\n volunteersRegistrations {\n id\n isAccreditationsEmailSent\n isAssignmentsEmailSent\n\n event {\n id\n name\n range\n startAt\n endAt\n description\n state\n }\n\n positionsSlotsUsersInfos {\n id\n\n position {\n name\n }\n\n positionSlot {\n range\n }\n }\n\n accreditationsUsersInfos {\n id\n\n accreditationSlot {\n name\n date\n }\n\n accreditation {\n name\n acronym\n }\n\n accreditationCategory {\n name\n }\n }\n }\n }\n}\n',{organizationId:e,userInfoId:t},[Yo.OrganizationMembersSpaceFragment]),l=(0,r.useMemo)(()=>a.userInfo?$g(e)?`${a.userInfo.firstName||""} ${a.userInfo.lastName||""}`.trim():a.userInfo.firstName||"":"",[a.userInfo]),c=Ri(),u=(0,r.useMemo)(()=>{const e=(a.userInfo?.volunteersRegistrations??[]).map(e=>({...e,accreditationsUsersInfos:a.organization?.hideAccreditationsUntilConfirmationEmailSent&&!e.isAccreditationsEmailSent?[]:e.accreditationsUsersInfos,positionsSlotsUsersInfos:a.organization?.hideAssignmentsUntilConfirmationEmailSent&&!e.isAssignmentsEmailSent?[]:e.positionsSlotsUsersInfos}));return(0,vs.A)(e,e=>-(e.event.range?.start?.toMillis()??e.event.startAt.toMillis()))},[a.userInfo,a.organization]);return d||(0,i.jsx)(eI,{isLoading:s,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:e,skeleton:(0,i.jsx)(MR,{}),children:(0,i.jsx)(RR,{children:(0,i.jsxs)(OR,{children:[(0,i.jsx)(R_,{acceptCustomColours:!0,heading:(0,i.jsx)(Li,{fontSize:"displayXs",fontWeight:"semiBold",children:n("bonjour_1_97713",l)}),subtitle:[...c(n("g_rer_et_visual_89310","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-grayCustom800)"},children:a.organization.name}))]}),(0,i.jsx)(R_,{heading:n("listes_des_v_n_07148"),subtitle:n("visualisez_tous_48942"),children:(0,i.jsxs)(G,{direction:"column",gap:"8",children:[a.organization.showMembersSpaceCommunity&&(0,i.jsx)(M_,{children:(0,i.jsx)(P_,{button:(0,i.jsx)(jo,{featureFlags:{isV4:!0},to:Yf.MEMBER({organizationId:e,userInfoId:t}),children:n("voir_les_inform_25921")}),title:a.organization.name})}),h(u)&&(0,i.jsx)(M_,{children:u.map(a=>(0,i.jsxs)(P_,{button:(0,i.jsx)(jo,{featureFlags:{isV4:!0},to:Yf.MEMBER({organizationId:e,userInfoId:t,eventId:a.event.id}),children:n("voir_l_v_nemen_72358")}),subtitle:a.event.description,title:a.event.name,children:[(0,i.jsx)(ER,{event:a.event}),!o&&(0,i.jsx)(TR,{event:a.event})]},a.id))})]})})]})})})},wR=r.createContext({}),$R=e=>(0,i.jsx)(wR.Provider,{value:{},children:e.children}),PR=e=>{const{history:t,params:{organizationId:n,eventId:o,formId:a,userInfoId:s}}=Hf(),{data:d,loader:l}=Mi("query MemberSpaceUpdateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $formId: FormId!\n $delegationId: DelegationId # EventCreateUpdateMember expects $delegationId, so we have to add it to the params even if it's null and we don't use it\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n id\n name\n dateFormat\n datetimeFormat\n\n event: eventMaybe(id: $eventId) {\n ...EventCreateUpdateMember\n }\n\n userInfo(id: $userInfoId) {\n ...UserInfoUpdateMember\n\n volunteerRegistration(eventId: $eventId) {\n numberOfAssignments\n numberOfAccreditations\n\n positionsSlotsUsersInfos {\n positionSlot {\n range\n }\n }\n }\n }\n }\n\n organizationPublic(id: $organizationId) {\n ...OrganizationDelegationsSpace\n country\n }\n}\n",{organizationId:n,eventId:o,formId:a,userInfoId:s},[Yo.EventCreateUpdateMemberFragment,Yo.UserInfoUpdateMemberFragment,Yo.OrganizationDelegationsSpaceFragment]),c=(0,r.useMemo)(()=>(d.organization?.userInfo.volunteerRegistration?.positionsSlotsUsersInfos??[]).map(e=>e.positionSlot.range),[d.organization?.userInfo.volunteerRegistration]);return l||(0,i.jsx)(hR,{areSectionsDisabled:{isWishedAccreditationsDisabled:d.organization.userInfo.volunteerRegistration?d.organization.userInfo.volunteerRegistration?.numberOfAccreditations>0:void 0,isWishedAssignmentsDisabled:d.organization.userInfo.volunteerRegistration?d.organization.userInfo.volunteerRegistration?.numberOfAssignments>0:void 0},blockedSlots:c,country:d.organization.event?.country??d.organizationPublic.country,disabled:!1===d.organization.userInfo.formUserInfo.form.isEditableInMemberSpace,event:d.organization.event,featureFlags:{isV4:!0},form:d.organization.userInfo.formUserInfo.form,organization:d.organization,handleRedirect:()=>t.goBack(Yf.MEMBER_FORMS({organizationId:n,eventId:o,userInfoId:s})),reload:e.reload,showEmail:!1,userInfo:d.organization.userInfo})},NR=e=>{const t=Ti(jl),n=r.useMemo(()=>{const t=hy(e.aui.accreditation.color);return{background:t[50],color:t[700]}},[e.aui]);return(0,i.jsx)(i.Fragment,{children:e.renderAccreditation((0,i.jsxs)(G,{css:{...n,borderRadius:"$1",padding:"$1 $2"},direction:"column",gap:"1",justify:"center",width:1,children:[(0,i.jsxs)(G,{align:"center",css:{fontSize:"10px"},gap:"1",children:[(0,i.jsx)(Li,{children:Dg(t,e.aui.accreditationSlot,"")}),e.aui.isAutoAccredit&&(0,i.jsx)(Li,{fontSize:"textXs",children:(0,i.jsx)(_o,{icon:"bolt-auto"})})]}),(0,i.jsx)(Li,{fontSize:"textXs",fontWeight:"medium",children:e.aui.accreditation.name})]}),e.aui.accreditation.id)})},kR=e=>{const t=wI(),n=r.useMemo(()=>(0,vs.A)(e.event.volunteerRegistration.accreditationsUsersInfos.filter(e=>!e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name.toLowerCase(),ry(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.name.toLowerCase()]),[e.event]),o=r.useMemo(()=>(0,vs.A)(e.event.volunteerRegistration.accreditationsUsersInfos.filter(e=>e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name.toLowerCase(),ry(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.name.toLowerCase()]),[e.event]);return(0,i.jsxs)(qT,{css:e.featureFlags?.isV4?{bd:!0,overflow:"auto"}:{borderTop:"1px solid $gray200"},date:e.selectedDay,display:t?"week":"day",maxDate:e.event.endAt,minDate:e.event.startAt,children:[n.map(t=>(0,i.jsx)(WT,{children:(0,i.jsx)(NR,{aui:t,renderAccreditation:e.renderAccreditation})},t.id)),o.map(t=>(0,i.jsx)(WT,{endAt:t.accreditationSlot.date,startAt:t.accreditationSlot.date,children:(0,i.jsx)(NR,{aui:t,renderAccreditation:e.renderAccreditation})},t.id))]})},zR=e=>{const{translate:t,params:{organizationId:n,eventId:o,userInfoId:a}}=Hf(),s=Ti(jl),{mutate:d}=Da(),{mutate:l}=function(e={}){return Di("mutation AccreditationsSlotsUsersInfosCheckIn(\n $eventId: EventId!\n $checkIn: AccreditationSlotCheckInInput!\n) {\n accreditationsSlotsUsersInfosCheckIn(eventId: $eventId, checkIn: $checkIn)\n}\n",e)}(),c=(0,r.useMemo)(()=>Dg(s,e.aui.accreditationSlot,e.aui.accreditation.name),[e.aui]);return(0,i.jsxs)(jv,{children:[(0,i.jsxs)(yv,{align:"center",gap:"3",children:[(0,i.jsx)(yy,{color:e.aui.accreditation.color,icon:e.aui.accreditation.icon}),(0,i.jsxs)(G,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)(Li,{color:"gray500",css:{fontSize:"11px",textTransform:"uppercase"},fontWeight:"medium",children:e.aui.accreditationCategory.name}),(0,i.jsx)(WI,{css:{overflow:"hidden",width:"100%","& > a":{width:"100%"}},to:Gp.ACCREDITATION({organizationId:n,eventId:o,accreditationId:e.aui.accreditation.id}),children:(0,i.jsx)(Li,{css:{ellipsis:!0},title:e.aui.accreditation.name,width:1,children:e.aui.accreditation.name})}),c!==e.aui.accreditation.name&&(0,i.jsx)(Li,{color:"gray500",css:{ellipsis:!0},title:c,width:1,children:c})]})]}),(0,i.jsxs)(yv,{align:"start",direction:"column",justify:"center",children:[e.aui.state===ue.Waiting&&(0,i.jsxs)(G,{align:"center",gap:"1",children:[(0,i.jsx)(Li,{color:"warning500",children:(0,i.jsx)(_o,{icon:"hourglass-empty",iconStyle:"solid"})}),(0,i.jsx)(Li,{font:"gray800 textXs medium",children:t("pas_encore_scan_88057")})]}),e.aui.state===ue.CheckedIn&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{align:"center",gap:"1",children:[(0,i.jsx)(Li,{color:"success500",children:(0,i.jsx)(_o,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)(Li,{font:"gray800 textXs medium",children:t("scann_e_01567")})]}),(0,i.jsx)(Li,{font:"gray500 textXs regular",children:e.aui.checkInAt?.isValid?s.toLocaleString(e.aui.checkInAt.toLocal(),oa.DateTime):""})]})]}),(0,i.jsx)(yv,{children:e.aui.isAutoAccredit&&(0,i.jsx)(Li,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(_o,{icon:"check"})})}),(0,i.jsx)(yv,{children:e.aui.isWorkflow&&(0,i.jsx)(Li,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(_o,{icon:"check"})})}),(0,i.jsx)(yv,{children:e.aui.accreditationProfile?e.aui.accreditationProfile.name:"-"}),(0,i.jsxs)(yv,{align:"start",direction:"column",justify:"center",children:[(0,i.jsx)(Li,{children:e.aui.createdBy?.name||e.aui.createdBy?.email||"-"}),(0,i.jsx)(Li,{color:"gray500",children:s.toLocaleString(e.aui.insertedAt.toLocal(),oa.DateTime)})]}),e.canMemberAccredit&&(0,i.jsxs)(tA,{justify:"end",width:200,children:[e.aui.state===ue.Waiting&&(0,i.jsx)(jo,{color:"white",size:"sm",onClick:async()=>{await l({eventId:e.aui.eventId,checkIn:{strategy:me.CheckIn,accreditationsSlotsUsersInfosIds:[e.aui.id]}}),e.reload()},children:"Scanner"}),(0,i.jsx)(FC,{children:(0,i.jsx)(H_,{color:"red",icon:"trash-can",onClick:async()=>{await d({eventId:o,massAccredit:{accreditationsSlotsIds:[e.aui.accreditationSlot.id],selecteds:{ids:[a]},strategy:tt.Delete}}),e.reload()},children:t("d_saffecter_du_47122")})})]})]})},LR=e=>{const{translate:t}=Hf(),n=(0,r.useMemo)(()=>(0,vs.A)(e.event.volunteerRegistration.accreditationsUsersInfos.filter(t=>!e.selectedDay?.isValid||!!t.accreditationSlot.date?.isValid&&t.accreditationSlot.date.startOf("day").toMillis()===e.selectedDay.startOf("day").toMillis()),e=>[e.accreditationCategory.name.toLowerCase(),ry(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.date?.toMillis()??1,e.accreditationSlot.name.toLowerCase()]),[e.event,e.selectedDay]);return(0,i.jsxs)(Av,{css:{borderTop:"1px solid $gray200"},hideBorder:!0,children:[(0,i.jsxs)(Sv,{children:[(0,i.jsx)(xv,{children:t("Accreditation")}),(0,i.jsx)(xv,{children:t("scann_e_le_27812")}),(0,i.jsx)(xv,{children:t("affect_e_automa_74071")}),(0,i.jsx)(xv,{children:t("ajout_via_une_69544")}),(0,i.jsx)(xv,{children:t("ajout_via_un_p_85925")}),(0,i.jsx)(xv,{children:t("ajout_e_par_71330")}),e.canMemberAccredit&&(0,i.jsx)(xv,{width:200})]}),n.map(t=>(0,i.jsx)(zR,{aui:t,canMemberAccredit:e.canMemberAccredit,reload:e.reload},t.id))]})},FR=e=>{const{translate:t}=Hf(),[n,o]=r.useState(CR(e.event.startAt,e.event.endAt)),[a,s]=r.useState(null);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(G,{as:"section",css:{background:"white",bd:!0,overflow:"hidden",padding:e.featureFlags?.isV4?"$6 $7 $7 $7":void 0},direction:"column",gap:e.featureFlags?.isV4?"6":void 0,justify:"center",children:[(0,i.jsxs)(G,{align:"center",as:"header",css:{padding:e.featureFlags?.isV4?void 0:"$5 $6"},gap:"4",children:[(0,i.jsxs)(Li,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(dI,{children:e.title}),e.subtitle&&(0,i.jsx)(W,{textStyle:"subtitle",children:e.subtitle})]}),(0,i.jsxs)(G,{as:"nav",gap:"3",children:["calendar"===e.accreditationsDisplay&&(0,i.jsx)(GT,{max:e.event.endAt,min:e.event.startAt,value:n,onChange:o}),"list"===e.accreditationsDisplay&&!e.hideListView&&(0,i.jsx)(Li,{width:160,children:(0,i.jsx)(Jy,{rightIcon:"xmark",value:a,onChange:s,onRightIconClick:()=>s(null)})}),!e.hideListView&&e.setAccreditationsDisplay&&(0,i.jsx)(Li,{width:200,children:(0,i.jsxs)(tS,{value:e.accreditationsDisplay,onChange:e.setAccreditationsDisplay,children:[(0,i.jsx)("option",{value:"calendar",children:t("Calendar")}),(0,i.jsx)("option",{value:"list",children:t("List")})]})}),e.actions]})]}),"calendar"===e.accreditationsDisplay?(0,i.jsx)(kR,{event:e.event,featureFlags:e.featureFlags,renderAccreditation:e.renderAccreditation,selectedDay:n}):(0,i.jsx)(LR,{canMemberAccredit:e.canMemberAccredit,event:e.event,reload:e.reload,selectedDay:a})]})})},UR=e=>{const t=(0,r.useRef)(e.value);return(0,r.useLayoutEffect)(()=>{if(e.value!==t.current){const n=t.current;t.current=e.value,e.onChange(e.value,n)}}),null},BR=e=>(0,i.jsx)(nI.D0,{allowNull:!0,name:e.name,render:({input:t})=>(0,i.jsx)(UR,{value:t.value,onChange:e.onChange}),subscription:{value:!0}});const GR=(0,r.memo)(e=>{const t=(0,r.useCallback)(t=>{t&&(n.current&&(o.current?.setMap(null),n.current=null),n.current=new google.maps.Map(t,{zoom:e.coordinatesFieldsProps?.zoomProps.input.value??e.initialZoom??13,center:Es(e.center)||Ts,gestureHandling:"cooperative",mapTypeControl:!1,streetViewControl:!1,mapTypeId:Rs(e.layer),...e.mapOptions||{}}),n.current.mapTypes.set(et.IgnPlan,new google.maps.ImageMapType({getTileUrl:(e,t)=>((e,t)=>`https://data.geopf.fr/wmts?${["REQUEST=GetTile","SERVICE=WMTS","VERSION=1.0.0","STYLE=normal","TILEMATRIXSET=PM",`FORMAT=${encodeURIComponent("image/png")}`,"LAYER=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2",`TILEMATRIX=${t}`,`TILEROW=${e.y}`,`TILECOL=${e.x}`].join("&")}`)(e,t),tileSize:new google.maps.Size(256,256),name:et.IgnPlan,maxZoom:18})),n.current.addListener("zoom_changed",()=>{e.coordinatesFieldsProps&&e.coordinatesFieldsProps.zoomProps.input.onChange(n.current.getZoom())}),n.current.addListener("tilesloaded",()=>{e.onTilesloaded?.()}),s())},[]),n=(0,r.useRef)(null),o=(0,r.useRef)(null),a=(0,r.useRef)([]),s=()=>{a.current.forEach(e=>e.setMap(null)),h(e.traces)?a.current=e.traces.map(e=>{const t=e.points.map(([e,t])=>({lat:e,lng:t})),i=e.direction===zt.None?[]:[{icon:{path:e.direction===zt.Backward?google.maps.SymbolPath.BACKWARD_OPEN_ARROW:google.maps.SymbolPath.FORWARD_OPEN_ARROW,scale:4,strokeColor:e.color},offset:"0%",repeat:"200px"}],o=new google.maps.Polyline({path:t,geodesic:!0,strokeColor:e.color,strokeOpacity:1,strokeWeight:4,icons:i});return o.setMap(n.current),o}):a.current=[]};return(0,r.useEffect)(()=>{(()=>{if(o.current&&o.current.setMap(null),e.point&&n.current){const t=Es(e.point);n.current.setCenter(t),o.current=new google.maps.Marker({position:t,map:n.current,draggable:"object"==typeof e.coordinatesFieldsProps&&null!==e.coordinatesFieldsProps}),e.coordinatesFieldsProps&&o.current.addListener("dragend",t=>{e.coordinatesFieldsProps?.latitudeProps.input.onChange(t.latLng.lat()),e.coordinatesFieldsProps?.longitudeProps.input.onChange(t.latLng.lng())})}})()},[JSON.stringify(e.point)]),(0,r.useEffect)(()=>{n.current?.setMapTypeId(Rs(e.layer))},[e.layer]),(0,r.useEffect)(()=>{s()},[JSON.stringify(e.traces||[])]),(0,i.jsx)(Li,{ref:t,height:1,width:1,children:e.coordinatesFieldsProps?.zoomProps&&(0,i.jsx)(BR,{name:e.coordinatesFieldsProps.zoomProps.input.name,onChange:e=>{n.current?.setZoom(e)}})})},vl.A);GR.displayName="Map";const VR=({children:e,...t})=>(0,i.jsx)(W,{as:"address",textStyle:"inherit",...t,children:e}),WR=e=>{const{params:{organizationId:t,eventId:n},translate:o}=Hf(),{data:a,loader:s}=Mi("query AccreditationRightPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $accreditationId: AccreditationId!\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n accreditation(id: $accreditationId) {\n id\n name\n acronym\n color\n icon\n description\n address\n latitude\n longitude\n zoom\n layer\n }\n }\n }\n}\n",{organizationId:t,eventId:n,accreditationId:e.accreditationId},[]);return s||(a.organization.event?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Zb,{heading:(0,i.jsx)(dI,{children:a.organization.event.accreditation.name}),id:e.labelId,leftIcon:Io(a.organization.event.accreditation.icon),leftIconColor:a.organization.event.accreditation.color,setIsOpen:e.setIsOpen}),(0,i.jsx)(Kb,{children:(0,i.jsx)(R_,{children:(0,i.jsx)(G,{direction:"column",gap:"6",children:a.organization.event.accreditation.description||Rg(a.organization.event.accreditation)?(0,i.jsxs)(i.Fragment,{children:[a.organization.event.accreditation.description&&(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(dI,{textStyle:"subheading",children:o("description_58935")}),(0,i.jsx)(w_,{text:a.organization.event.accreditation.description})]}),Rg(a.organization.event.accreditation)&&(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(dI,{textStyle:"subheading",children:o("localisation_38416")}),Tg(a.organization.event.accreditation)&&(0,i.jsx)(VR,{children:a.organization.event.accreditation.address}),Og(a.organization.event.accreditation)&&(0,i.jsx)(Li,{height:380,width:1,children:(0,i.jsx)(GR,{initialZoom:a.organization.event.accreditation.zoom,layer:a.organization.event.accreditation.layer,point:Os(a.organization.event.accreditation)})})]})]}):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,title:o("il_n_y_a_aucun_10373")})})})})]}):(0,i.jsx)(Mp,{}))},qR=e=>{const[t,n]=(0,r.useState)(!1),o=(0,xI.A)("rightpanel-");return(0,r.useEffect)(()=>(e.accreditationId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.accreditationId]),(0,i.jsx)(Hb,{isOpen:t,labelId:o,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedAccreditationId(null),children:e.accreditationId&&(0,i.jsx)(WR,{accreditationId:e.accreditationId,labelId:o,setIsOpen:n})})},YR=e=>{const{params:{organizationId:t,eventId:n,userInfoId:o},translate:a}=Hf(),{data:s,loader:d,reload:l}=Mi("query UserProfileAccreditations(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $userInfoId: UsersInfoId!\n $excludeAccreditations: [AccreditationId!]\n) {\n organization(id: $organizationId) {\n hideAccreditationsUntilConfirmationEmailSent\n\n userInfo(id: $userInfoId) {\n formsUsersInfos(eventId: $eventId, level: Event) {\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n index\n }\n\n accreditationCategory {\n name\n }\n }\n\n form {\n id\n name\n }\n }\n }\n }\n\n event(id: $eventId) {\n name\n dayStartTime\n startAt\n endAt\n hasFormWithAccreditationDisplay\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n isAccreditationsEmailSent\n\n accreditationsUsersInfos(excludeAccreditations: $excludeAccreditations) {\n ...UserPanelAccreditationSlotUserInfo\n }\n }\n }\n}\n",{organizationId:t,eventId:n,userInfoId:o,excludeAccreditations:e.excludeAccreditations},[Yo.UserPanelAccreditationSlotUserInfoFragment]);const[c,u]=(0,r.useState)(null),m=Ri(),g=(0,r.useMemo)(()=>(0,vs.A)(!s.organization?.hideAccreditationsUntilConfirmationEmailSent||s.organization?.hideAccreditationsUntilConfirmationEmailSent&&s.event?.volunteerRegistration.isAccreditationsEmailSent?s.event?.volunteerRegistration.accreditationsUsersInfos:[],e=>e.accreditationSlot.date?.toMillis()??0),[s.event,s.organization]),p=a("planning_de_vos_42899"),f=[...m(a("visualiser_l_in_46133","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:s.event?.name}))];return d||(0,i.jsxs)(i.Fragment,{children:[h(g)?(0,i.jsx)(FR,{accreditationsDisplay:"calendar",canMemberAccredit:!1,event:s.event,featureFlags:{isV4:!0},hideListView:!0,reload:()=>{l(),g.length<=1&&e.reloadHeader()},renderAccreditation:(e,t)=>(0,i.jsx)(jo,{color:"invisible",style:{width:"100%",padding:"unset"},onClick:()=>u(t),children:e}),subtitle:f,title:p}):(0,i.jsxs)(G,{as:"section",css:{background:"white",bd:!0,padding:"$6 $7 $7 $7"},direction:"column",gap:"6",justify:"center",children:[(0,i.jsx)(G,{align:"center",as:"header",gap:"4",children:(0,i.jsxs)(Li,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(dI,{children:p}),f&&(0,i.jsx)(W,{textStyle:"subtitle",children:f})]})}),(0,i.jsx)(G,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankHandGlobe,subtitle:a("ici_seront_affi_51536"),title:a("encore_un_peu_d_88675")})})]}),(0,i.jsx)(qR,{accreditationId:c,setDisplayedAccreditationId:u})]})},HR=e=>{const{translate:t,params:{eventId:n}}=Hf(),o=Ti(hm),{mutate:a}=Pa(),s=(0,r.useMemo)(()=>sa(),[]),[d,l]=(0,r.useState)(e.assignments.map(e=>({...e,checkInAt:e.checkInAt?.toLocal(),checkOutAt:e.checkOutAt?.toLocal()}))),c=(0,r.useMemo)(()=>d.every(e=>e.checkInAt?.isValid&&e.checkOutAt?.isValid&&e.checkOutAt>e.checkInAt||e.checkInAt?.isValid&&!e.checkOutAt?.isValid||!e.checkInAt?.isValid&&!e.checkOutAt?.isValid),[d]),u=(0,r.useCallback)((e,t,n)=>{l((0,hv.jM)(i=>{i.forEach(i=>{i.id===e&&(i[t]=n||void 0)})}))},[d,l]);return(0,i.jsx)(ko,{isOpen:e.isOpen,onClose:e.onClose,children:(0,i.jsxs)(No,{children:[(0,i.jsx)(Po,{icon:"sliders",children:t("mettre_jour_d_54198")}),(0,i.jsx)($o,{gap:"4",children:d.map(e=>(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsxs)(Li,{font:"gray800 textSm medium",children:[e.position.name," -"," ",(0,i.jsx)(gE,{fontWeight:"regular",children:jg(o,e.positionSlot,"",{slot:{includeRange:!0}})})]}),(0,i.jsxs)(G,{gap:"6",children:[(0,i.jsx)(tx,{rightIcon:"xmark",value:e.checkInAt,zone:s,onChange:t=>{u(e.id,"checkInAt",t)},onRightIconClick:()=>{u(e.id,"checkInAt",null)}}),(0,i.jsx)(tx,{rightIcon:"xmark",value:e.checkOutAt,zone:s,onChange:t=>{u(e.id,"checkOutAt",t)},onRightIconClick:()=>{u(e.id,"checkOutAt",null)}}),(0,i.jsx)(EI,{shouldParseAsInt:!0,value:e.breakTime,onChange:t=>{u(e.id,"breakTime",t)}})]})]},e.id))}),(0,i.jsx)(wo,{children:(0,i.jsx)(jo,{disabled:!c,onClick:async()=>{await Promise.all(d.map(e=>a({eventId:n,checkIn:{strategy:me.CheckInOut,breakTime:e.breakTime,checkInAt:e.checkInAt,checkOutAt:e.checkOutAt,positionsSlotsUsersInfosIds:[e.id]}}))),e.onClose(),e.onSuccess()},children:t("mettre_jour_85141")})})]})})},ZR=e=>{const{translate:t}=Hf(),n=Ti(hm),o=(0,r.useMemo)(()=>{const t=hy(e.psui.position.color);return{background:t[50],color:t[700]}},[e.psui]);return(0,i.jsx)(i.Fragment,{children:e.renderPosition((0,i.jsxs)(G,{css:{...o,borderRadius:"$1",padding:"$1 $2"},direction:"column",gap:"1",justify:"center",width:1,children:[(0,i.jsxs)(G,{align:"center",css:{fontSize:"10px"},gap:"1",children:[(0,i.jsxs)(G,{direction:"column",gap:"1",children:[e.psui.positionSlot.name&&(0,i.jsx)(Li,{children:e.psui.positionSlot.name}),(0,i.jsx)(Li,{children:n.toDisplayString(e.psui.positionSlot.range,{hideDate:!0})})]}),e.psui.state===ue.CheckedOut&&(0,i.jsx)(_o,{icon:"stopwatch",title:t("d_pointer_25328")}),e.psui.state===ue.CheckedIn&&(0,i.jsx)(_o,{icon:"timer",title:t("pointer_80927")})]}),(0,i.jsx)(Li,{fontSize:"textXs",fontWeight:"medium",children:e.psui.position.name})]}),e.psui.position.id)})},KR=e=>{const t=wI(),[n]=au(e.dayStartTime),o=(0,r.useMemo)(()=>function(e,t,n,i){const o=Math.ceil(n.endOf("day").diff(t.startOf("day"),"days").days),a=(0,dm.A)(0,o).map(e=>t.startOf("day").set({hour:i}).plus({day:e}));return e.flatMap(e=>{const{start:t,end:n}=e.range,i=a.filter(e=>e>t&&e({...e,range:t}))})}(e.assignments.map(e=>({...e,range:e.positionSlot.range})),e.startAt,e.endAt,n),[e.assignments,e.startAt,e.endAt,n]);return(0,i.jsx)(qT,{css:e.featureFlags?.isV4?{bd:!0,overflow:"auto"}:{borderTop:"1px solid $gray200"},date:e.selectedDay,display:t?"week":"day",maxDate:e.endAt,minDate:e.startAt,children:o.map((t,o)=>(0,i.jsx)(WT,{endAt:t.range.start,startAt:t.range.start,startHour:n,children:(0,i.jsx)(ZR,{psui:t,renderPosition:e.renderPosition,startHour:n})},o))})},QR=e=>{const{translate:t,params:{organizationId:n,eventId:o}}=Hf(),{hasPermission:a}=Qv(),s=Ti(jl),d=Ti(rm),l=Ti(hm),{mutate:c}=Pa(),u=(0,r.useMemo)(()=>jg(l,e.psui.positionSlot,"",{slot:{includeRange:!0}}),[e.psui]),m=a(ju.MEMBER_ASSIGN),g=a(ju.POSITION_READ,{positionCategoryId:e.psui.positionCategoryId,positionId:e.psui.position.id});return(0,i.jsxs)(jv,{children:[(0,i.jsxs)(yv,{align:"center",gap:"3",children:[(0,i.jsx)(yy,{color:e.psui.position.color,icon:e.psui.position.icon}),(0,i.jsxs)(G,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)(Li,{color:"gray500",css:{fontSize:"11px",textTransform:"uppercase"},fontWeight:"medium",children:e.psui.positionCategory.name}),(0,i.jsx)(WI,{css:{overflow:"hidden",width:"100%","& > a":{width:"100%"}},to:Zp.POSITION({organizationId:n,eventId:o,positionId:e.psui.position.id}),children:(0,i.jsx)(Li,{css:{ellipsis:!0},title:e.psui.position.name,width:1,children:e.psui.position.name})}),(0,i.jsx)(Li,{color:"gray500",css:{ellipsis:!0},title:u,width:1,children:u})]})]}),(0,i.jsx)(yv,{children:e.psui.state===ue.CheckedOut?(0,i.jsx)(My,{leftIcon:"clock",children:t("temps_total_79448",d.minutesToHoursMinutesString(e.psui.timeDifferenceMinutes))}):e.psui.state===ue.CheckedIn?(0,i.jsx)(My,{color:"success",leftIcon:"circle",leftIconStyle:"solid",children:t("point_le_1_63576",s.toLocaleString(e.psui.checkInAt.toLocal(),oa.DateTime))}):(0,i.jsx)(My,{color:"warning",leftIcon:"circle",leftIconStyle:"solid",children:t("non_point_42145")})}),(0,i.jsx)(yv,{children:e.psui.isAutoAssign&&(0,i.jsx)(Li,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(_o,{icon:"check"})})}),(0,i.jsx)(yv,{children:e.psui.isWorkflow&&(0,i.jsx)(Li,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(_o,{icon:"check"})})}),(0,i.jsxs)(yv,{align:"start",direction:"column",justify:"center",children:[(0,i.jsx)(Li,{children:e.psui.createdBy?.name||e.psui.createdBy?.email||"-"}),(0,i.jsx)(Li,{color:"gray500",children:s.toLocaleString(e.psui.insertedAt.toLocal(),oa.DateTime)})]}),(0,i.jsxs)(tA,{justify:"end",width:200,children:[g&&(e.psui.state===ue.Waiting?(0,i.jsx)(jo,{color:"white",size:"sm",onClick:async()=>{await c({eventId:e.psui.eventId,checkIn:{strategy:me.CheckIn,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reload()},children:t("pointer_80927")}):e.psui.state===ue.CheckedIn?(0,i.jsx)(jo,{color:"white",size:"sm",onClick:async()=>{await c({eventId:e.psui.eventId,checkIn:{strategy:me.CheckOut,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reload()},children:t("d_pointer_25328")}):null),(0,i.jsx)(GC,{canCheckIn:g,canDelete:m,psui:e.psui,reloadCheckIn:e.reload,onDelete:e.reload})]})]})},XR=e=>{const{translate:t}=Hf(),{hasPermission:n}=Qv(),o=n(ju.POSITION_READ),a=(0,r.useMemo)(()=>e.assignments.filter(t=>!e.selectedDay?.isValid||t.positionSlot.range.contains(e.selectedDay)||t.positionSlot.range.start.startOf("day").toMillis()===e.selectedDay.startOf("day").toMillis()||t.positionSlot.range.end.startOf("day").toMillis()===e.selectedDay.startOf("day").toMillis()),[e.assignments,e.selectedDay]);return(0,i.jsxs)(Av,{css:{borderTop:"1px solid $gray200"},hideBorder:!0,children:[(0,i.jsxs)(Sv,{children:[(0,i.jsx)(xv,{children:t("Position")}),(0,i.jsx)(xv,{children:t("statut_du_point_52451")}),(0,i.jsx)(xv,{children:t("affect_e_automa_74071")}),(0,i.jsx)(xv,{children:t("ajout_via_une_69544")}),(0,i.jsx)(xv,{children:t("ajout_e_par_71330")}),o&&(0,i.jsx)(xv,{width:200})]}),a.map(t=>(0,i.jsx)(QR,{psui:t,reload:e.reload},t.id))]})},JR=e=>{const{params:{organizationId:t,eventId:n,userInfoId:o},translate:a}=Hf(),[s,d]=(0,r.useState)(CR(e.event.startAt,e.event.endAt)),[l,c]=(0,r.useState)(null),[u,m]=(0,r.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(G,{as:"section",css:{background:"white",bd:!0,overflow:"hidden",padding:e.featureFlags?.isV4?"$6 $7 $7 $7":void 0},direction:"column",gap:e.featureFlags?.isV4?"6":void 0,justify:"center",children:[(0,i.jsxs)(G,{align:"center",as:"header",css:{padding:e.featureFlags?.isV4?void 0:"$5 $6"},gap:"4",children:[(0,i.jsxs)(Li,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(dI,{children:e.title}),e.subtitle&&(0,i.jsx)(W,{textStyle:"subtitle",children:e.subtitle})]}),(0,i.jsxs)(G,{as:"nav",gap:"3",children:["calendar"===e.positionsDisplay&&(0,i.jsx)(GT,{max:e.event.endAt,min:e.event.startAt,value:s,onChange:d}),"list"===e.positionsDisplay&&!e.hideListView&&(0,i.jsx)(Li,{width:160,children:(0,i.jsx)(Jy,{rightIcon:"xmark",value:l,onChange:c,onRightIconClick:()=>c(null)})}),!e.hideListView&&e.setPositionsDisplay&&(0,i.jsx)(Li,{width:200,children:(0,i.jsxs)(tS,{value:e.positionsDisplay,onChange:e.setPositionsDisplay,children:[(0,i.jsx)("option",{value:"calendar",children:a("Calendar")}),(0,i.jsx)("option",{value:"list",children:a("List")})]})}),e.canMemberAssign&&(0,i.jsx)(jo,{to:gf.EDIT_ASSIGNMENT(t,n,o),children:a("_diter_les_affe_42283")}),e.canMemberAssign&&(0,i.jsxs)(F_,{children:[(0,i.jsx)(Q_,{children:(0,i.jsx)(jo,{color:"white",leftIcon:"ellipsis-vertical"})}),(0,i.jsx)(K_,{placement:"bottom-end",children:(0,i.jsx)(H_,{icon:"circle-check",onClick:()=>m(!0),children:a("mettre_jour_d_54198")})})]})]})]}),"calendar"===e.positionsDisplay?(0,i.jsx)(KR,{assignments:e.assignments,dayStartTime:e.event.dayStartTime,endAt:e.event.endAt,featureFlags:e.featureFlags,renderPosition:e.renderPosition,selectedDay:s,startAt:e.event.startAt}):!e.hideListView&&(0,i.jsx)(XR,{assignments:e.assignments,reload:e.reload,selectedDay:l})]}),HR&&(0,i.jsx)(HR,{assignments:e.assignments,isOpen:u,onClose:()=>m(!1),onSuccess:()=>e.reload()})]})},eM=r.createContext({});function tM(){return r.useContext(eM)}const nM=e=>(0,i.jsx)(i.Fragment,{children:e.children});nM.displayName="TabPanel";const iM=R(jo,{height:"auto",borderRadius:"initial",fontWeight:"$medium",paddingBlock:"$3",alignItems:"center",justifyContent:"center",flex:"1 0 0",variants:{selected:{true:{cursor:"inherit",color:"$primary500",borderBlockEnd:"2px solid $primary500"},false:{color:"$gray500",borderBlockEnd:"2px solid transparent","&:hover, &:focus-visible":{color:"$gray800"},"&:hover":{borderBlockEnd:"2px solid $gray200"}}}}}),oM={Root:({children:e,...t})=>{const[n,o]=r.useState(0);return(0,i.jsx)(eM.Provider,{value:{currentTab:n,setCurrentTab:o},children:(0,i.jsx)(Hb,{...t,children:e})})},Header:({children:e,...t})=>{const[n,o]=r.useMemo(()=>(0,xm.A)(r.Children.toArray(e),e=>r.isValidElement(e)&&e.type===oM.Tabs),[e]);return(0,i.jsxs)(Zb,{...t,children:[o,n]})},Body:({children:e,...t})=>{const{currentTab:n}=tM(),o=r.useMemo(()=>r.Children.toArray(e).filter(e=>r.isValidElement(e)&&e.type===nM),[e]);return(0,i.jsx)(Kb,{...t,children:o[n]})},Tabs:({children:e,...t})=>{const{currentTab:n,setCurrentTab:o}=tM(),a=r.useMemo(()=>r.Children.toArray(e).filter(e=>r.isValidElement(e)&&e.type===oM.Tab),[e]);return(0,i.jsx)(G,{direction:"column",width:1,...U(t),children:(0,i.jsx)(oM.TabList,{children:a.map((e,t)=>(0,i.jsx)(iM,{color:"invisible",role:"tab",selected:n===t,onClick:()=>{o(t)},children:e},t))})})},Tab:e=>(0,i.jsx)(G,{align:"center",css:{paddingBlock:"$4"},gap:"2",justify:"center",children:e.children}),TabList:e=>(0,i.jsx)(G,{"aria-orientation":"horizontal",as:z.Nav,css:{borderBottom:"1px solid $gray200",alignItems:"stretch",alignContent:"center",justifyContent:"center",padding:"0 $6",gap:"$6",...e.css},role:"tablist",width:1,children:e.children}),TabPanel:nM},aM=({children:e,...t})=>(0,i.jsx)(W,{as:"abbr",textStyle:"abbreviation",...t,children:e}),sM=e=>(0,i.jsx)(Li,{"aria-atomic":!0,"aria-live":"polite",css:{background:"white",borderBottom:"1px solid $gray200",borderLeft:"1px solid $gray200",borderRight:"1px solid $gray200",width:"100%",paddingBlock:"$6",...e.css},children:(0,i.jsx)(ky,{...e})}),rM=e=>(0,i.jsx)(Li,{"aria-atomic":!0,"aria-live":"polite",children:e.children}),dM=()=>(0,i.jsxs)(Li,{"aria-busy":!0,children:[(0,i.jsx)(Kj,{}),(0,i.jsx)(Kj,{}),(0,i.jsx)(Kj,{})]}),lM=e=>{const{params:{organizationId:t,eventId:n},translate:o}=Hf(),[a,s,d]=XE(""),[l,c]=r.useState(null),[u,m]=r.useState(0),{data:g,isLoading:p}=Mi("query PositionAssignedMembersTabPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $positionId: PositionId!\n $name: String\n $limit: Int\n $offset: Int\n $sort: UsersInfosSort\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n position(id: $positionId) {\n assignedMembers(name: $name, limit: $limit, offset: $offset, sort: $sort) {\n nodes {\n id\n ...UserInfoNameAndPicture\n }\n numberOfPages\n totalCount\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,positionId:e.positionId,name:v(s)?s:void 0,offset:u,sort:l},[Yo.UserInfoNameAndPictureFragment]);const{numberOfPages:f,totalCount:I}=Lj(g.organization?.event?.position.assignedMembers),_=g.organization?.event;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(G,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(ZC,{css:{width:"100%"},filters:(0,i.jsx)(Li,{role:"search",width:320,children:(0,i.jsx)(EI,{icon:"magnifying-glass",placeholder:o("rechercher_un_m_05904"),type:"search",value:a,onChange:d})}),headerCells:(0,i.jsx)(Sv,{children:(0,i.jsx)(Zj,{attribute:Gt.Name,setSort:c,sort:l,children:o("nom_complet_du_71872")})}),numberOfPages:f,offset:u,rows:p?(0,i.jsx)(dM,{}):h(_.position.assignedMembers.nodes)?(0,i.jsx)(rM,{children:_.position.assignedMembers.nodes.map(e=>(0,i.jsx)(jv,{children:(0,i.jsx)(yv,{role:"gridcell",children:(0,i.jsx)(sA,{userInfo:{...e,email:""}})})},e.id))}):(0,i.jsx)(sM,{imageSrc:NI.WeezeventBlankPerson,title:o("il_n_y_a_aucun_10373")}),setOffset:m,totalCount:I})})})},cM=e=>{const{params:{organizationId:t,eventId:n},translate:o}=Hf(),{data:a,loader:s}=Mi("query PositionInformationTabPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $positionId: PositionId!\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n position(id: $positionId) {\n description\n range\n leaders {\n ...LeaderInfos\n }\n address\n latitude\n longitude\n zoom\n layer\n traces {\n ...Trace\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,positionId:e.positionId},[Yo.LeaderInfosFragment,Yo.TraceFragment]);const r=Ti(hm),d=a.organization?.event;return(0,i.jsx)(R_,{children:s||!d||(d.position.description||d.position.range||h(d.position.leaders)||d.position.range||Rg(d.position)?(0,i.jsxs)(G,{direction:"column",gap:"6",children:[d.position.description&&(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(dI,{textStyle:"subheading",children:o("description_du_95106")}),(0,i.jsx)(w_,{text:d.position.description})]}),d.position.range&&(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(dI,{textStyle:"subheading",children:o("Date")}),(0,i.jsx)(W,{children:r.toComponents(d.position.range)})]}),h(d.position.leaders)&&(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(dI,{textStyle:"subheading",children:o("reponsable_82458_plural")}),d.position.leaders.map(e=>(0,i.jsx)(Li,{children:(0,i.jsx)(sA,{areContactLinksEnabled:!0,showPhoneNumber:!0,size:40,userInfo:e.userInfo})},e.userInfo.id))]}),Rg(d.position)&&(0,i.jsxs)(G,{direction:"column",gap:"1",children:[(0,i.jsx)(dI,{textStyle:"subheading",children:o("localisation_38416")}),Tg(d.position)&&(0,i.jsx)(VR,{children:d.position.address}),Og(d.position)&&(0,i.jsx)(Li,{height:380,width:1,children:(0,i.jsx)(GR,{initialZoom:d.position.zoom,layer:d.position.layer,point:Os(d.position),traces:d.position.traces})})]})]}):(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,title:o("il_n_y_a_aucun_10373")}))})},uM=e=>{const{params:{organizationId:t,eventId:n},translate:o}=Hf(),{data:a,loader:s}=Mi("query PositionRightPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $positionId: PositionId!\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n position(id: $positionId) {\n id\n name\n acronym\n color\n icon\n assignedMembers {\n totalCount\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,positionId:e.positionId},[]);return s||(a.organization.event?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oM.Header,{heading:(0,i.jsxs)(dI,{children:[a.organization.event.position.name,v(a.organization.event.position.acronym)&&(0,i.jsx)(aM,{css:{marginInlineStart:"$2"},children:a.organization.event.position.acronym})]}),id:e.labelId,leftIcon:Io(a.organization.event.position.icon),leftIconColor:a.organization.event.position.color,setIsOpen:e.setIsOpen,children:(0,i.jsxs)(oM.Tabs,{css:{},height:1,children:[(0,i.jsx)(oM.Tab,{children:o("informations_22954")}),(0,i.jsx)(oM.Tab,{children:o("membres_affect_76655",a.organization.event.position.assignedMembers.totalCount)})]})}),(0,i.jsxs)(oM.Body,{children:[(0,i.jsx)(oM.TabPanel,{children:(0,i.jsx)(cM,{positionId:e.positionId})}),(0,i.jsx)(oM.TabPanel,{children:(0,i.jsx)(lM,{positionId:e.positionId})})]})]}):(0,i.jsx)(Mp,{}))},mM=e=>{const[t,n]=(0,r.useState)(!1),o=(0,xI.A)("rightpanel-");return(0,r.useEffect)(()=>(e.positionId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.positionId]),(0,i.jsx)(oM.Root,{isOpen:t,labelId:o,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedPositionId(null),children:e.positionId&&(0,i.jsx)(uM,{labelId:o,positionId:e.positionId,setIsOpen:n})})},gM=e=>{const{params:{organizationId:t,eventId:n,userInfoId:o},translate:a}=Hf(),{data:s,loader:d,reload:l}=Na({organizationId:t,eventId:n,userInfoId:o}),[c,u]=(0,r.useState)(null),m=Ri(),g=(0,r.useMemo)(()=>(0,vs.A)(!s.organization?.hideAssignmentsUntilConfirmationEmailSent||s.organization?.hideAssignmentsUntilConfirmationEmailSent&&s.event?.volunteerRegistration.isAssignmentsEmailSent?s.event?.volunteerRegistration.positionsSlotsUsersInfos:[],e=>e.positionSlot.range.start.toMillis()),[s.event,s.organization]),p=a("planning_de_vos_51737"),f=[...m(a("visualisez_l_in_88697","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:s.event?.name}))];return d||(0,i.jsxs)(i.Fragment,{children:[h(g)?(0,i.jsx)(JR,{assignments:g,canMemberAssign:!1,event:s.event,featureFlags:{isV4:!0},hideListView:!0,positionsDisplay:"calendar",reload:()=>{l(),g.length<=1&&e.reloadHeader()},renderPosition:(e,t)=>(0,i.jsx)(jo,{color:"invisible",style:{width:"100%",padding:"unset",blockSize:"fit-content"},onClick:()=>u(t),children:e}),subtitle:f,title:p}):(0,i.jsxs)(G,{as:"section",css:{background:"white",bd:!0,padding:"$6 $7 $7 $7"},direction:"column",gap:"6",justify:"center",children:[(0,i.jsx)(G,{align:"center",as:"header",gap:"4",children:(0,i.jsxs)(Li,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(dI,{children:p}),f&&(0,i.jsx)(W,{textStyle:"subtitle",children:f})]})}),(0,i.jsx)(G,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:a("ici_seront_affi_69159"),title:a("encore_un_peu_d_88675")})})]}),c&&(0,i.jsx)(mM,{positionId:c,setDisplayedPositionId:u})]})},hM=e=>{const t=Oi(),n=$_(),o=$I(),a=Ti(fm),s=r.useMemo(()=>{try{return a.getFormatter()}catch{return null}},[]);return(0,i.jsxs)(G,{align:"center",css:{boxShadow:"$xs",padding:"$4",flex:"1",blockSize:"100%"},gap:"4",children:[!n&&(0,i.jsx)(G,{align:"center",css:{background:"$gray100",borderRadius:"$2",color:"$gray700"},height:40,justify:"center",width:40,children:(0,i.jsx)(_o,{icon:"file-lines"})}),(0,i.jsxs)(G,{css:{flex:"1"},direction:"column",children:[(0,i.jsx)(dI,{css:{lineBreak:"anywhere",whiteSpace:"normal"},textStyle:"subheading",children:e.document.name}),(0,i.jsxs)(G,{css:{ellipsis:!0},direction:n?"column":"row",gap:n?void 0:"1",children:[e.subtitle&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(W,{textStyle:"subtitle",children:[e.subtitle,!n&&" | "]})}),(0,i.jsx)(W,{textStyle:"subtitle",children:s&&"number"==typeof e.document.size&&e.document.size>0&&s.format(e.document.size).replace(/^([\d,.]+)/,"$1 ")})]})]}),(0,i.jsx)(jo,{color:"white",download:!0,leftIcon:"arrow-down-to-bracket",target:"_blank",to:e.document.url,children:o&&t("t_l_charger_03283")})]})},pM=e=>{const{params:{organizationId:t,userInfoId:n},translate:o}=Hf(),a=Ti(jl),s=(0,r.useCallback)(e=>{e&&(e.onload=()=>{const t=e.contentDocument?.body;if(t){const n=t.scrollHeight;e.style.height=`${n}px`,t.style.margin="0",t.style.overflow="hidden",e.parentElement&&(e.parentElement.style.height=`${n+64}px`)}})},[]),d=Ri(),{data:l,loader:c}=Mi("query CampaignRightPanel(\n $organizationId: OrganizationId!\n $userInfoId: UsersInfoId!\n $campaignId: CampaignId!\n) {\n organization(id: $organizationId) {\n userInfo(id: $userInfoId) {\n campaign(id: $campaignId) {\n id\n name\n sentAt\n campaignType\n subject\n text\n preview(userInfoId: $userInfoId)\n\n documents {\n ...DocumentEmailPreview\n }\n\n emailSender {\n fromEmail\n fromName\n }\n createdBy {\n email\n name\n nameOrEmail\n }\n }\n }\n }\n}\n",{organizationId:t,userInfoId:n,campaignId:e.campaignId},[Yo.DocumentEmailPreviewFragment]);const u=l.organization?.userInfo.campaign.sentAt?.setZone(Vo.c9.local().zone);return c||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Zb,{heading:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(dI,{children:l.organization.userInfo.campaign.name}),(0,i.jsx)(W,{textStyle:"subtitle",children:[...d(o("envoy_e_le_1_90336","{1}","{2}"),(0,i.jsx)(cm,{dateTime:u,children:a.toLocaleString(u,oa.DateTime)}),(0,i.jsx)(WI,{to:`mailto:${l.organization.userInfo.campaign.createdBy.email}?subject=${encodeURIComponent(o("re_1_84422",l.organization.userInfo.campaign.subject))}`,children:l.organization.userInfo.campaign.createdBy?.nameOrEmail}))]})]}),id:e.labelId,leftIcon:l.organization.userInfo.campaign.campaignType===le.Email?"at":"message",leftIconColor:"black",setIsOpen:e.setIsOpen}),(0,i.jsx)(Kb,{css:{blockSize:"100%",backgroundColor:"$gray100"},children:(0,i.jsx)(G,{css:{background:"white",borderRadius:"$2",boxShadow:"$md",inlineSize:"100%"},direction:"column",gap:"3",children:(0,i.jsxs)(G,{css:{background:"$gray200",borderRadius:"$2",padding:"$7"},direction:"column",gap:"6",children:[(0,i.jsx)(Li,{css:{padding:0,minBlockSize:"300px",marginBlockStart:"$3",blockSize:"fit-content !important","& iframe":{background:"white",border:"none",borderRadius:"$2",overflow:"hidden",inlineSize:"100%"}},children:(0,i.jsx)("iframe",{ref:s,srcDoc:l.organization.userInfo.campaign.preview})}),h(l.organization.userInfo.campaign.documents)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(dI,{textStyle:"subheading",children:o("pi_ces_jointes_36761")}),(0,i.jsx)(R_,{css:{padding:0},children:(0,i.jsx)(G,{direction:"column",children:l.organization.userInfo.campaign.documents.map(e=>(0,i.jsx)(hM,{document:e},e.id))})})]})]})})})]})},fM=e=>{const[t,n]=(0,r.useState)(!1),o=(0,xI.A)("rightpanel-");return(0,r.useEffect)(()=>(e.campaignId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.campaignId]),(0,i.jsx)(Hb,{isOpen:t,labelId:o,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedCampaignId(null),children:e.campaignId&&(0,i.jsx)(pM,{campaignId:e.campaignId,labelId:o,setIsOpen:n})})},IM=e=>{const{translate:t}=Hf(),n=$_(),o=Ri(),a=Ti(jl),s=e.campaign.email?.sentAt??e.campaign.sentAt?.setZone(Vo.c9.local().zone)??Vo.c9.now();return(0,i.jsxs)(jv,{css:{"&:hover":{background:"$gray100"}},onMouseLeave:e=>{z_(e.target)},children:[(0,i.jsx)(yv,{css:{flex:"1"},children:(0,i.jsxs)(G,{direction:"column",width:1,children:[(0,i.jsx)(dI,{css:{ellipsis:!0,fontSize:"$textSm"},textStyle:"subheading",children:e.campaign.name}),(0,i.jsx)(W,{css:{ellipsis:!0},textStyle:"subtitle",children:[...o(t("envoy_e_le_1_90336","{1}","{2}"),(0,i.jsx)(cm,{dateTime:s,children:a.toLocaleString(s,n?oa.ShortDateTime:oa.DateTime)}),(0,i.jsx)(WI,{to:`mailto:${e.campaign.createdBy.email}?subject=${encodeURIComponent(t("re_1_84422",e.campaign.subject))}`,children:e.campaign.createdBy.nameOrEmail}))]})]})}),(0,i.jsxs)(yv,{css:{flex:n?"0 50px":"0 150px"},children:[(0,i.jsx)(Li,{width:22,children:e.campaign.campaignType===le.Email?(0,i.jsx)(_o,{icon:"at"}):(0,i.jsx)(_o,{icon:"message"})}),!n&&e.campaign.campaignType]}),(0,i.jsx)(yv,{css:{flex:"0 200px"},justify:"end",children:(0,i.jsx)(jo,{color:"white",textAlign:"center",onClick:()=>e.setDisplayedCampaignId(e.campaign.id),children:t("lire_le_message_68344")})})]})},_M=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:o}=Hf(),a=$_(),[s,d]=(0,r.useState)(null),[l,c]=(0,r.useState)(25),[u,m]=(0,r.useState)(0),g=(0,r.useCallback)(()=>{m(0)},[m]),p=(0,r.useCallback)(e=>{c(e),g()},[c,g]),{data:f,isLoading:I,loader:_}=Mi("query UserCampaigns(\n $organizationId: OrganizationId!\n $eventId: EventId\n $userInfoId: UsersInfoId!\n $limit: Int\n $offset: Int\n $sort: CampaignsSort\n) {\n organization(id: $organizationId) {\n name\n\n event: eventMaybe(id: $eventId) {\n name\n }\n }\n\n userInfo(id: $userInfoId) {\n campaigns(\n eventId: $eventId\n states: [Done, Template]\n limit: $limit\n offset: $offset\n sort: $sort\n ) {\n nodes {\n id\n name\n campaignType\n state\n subject\n sentAt\n\n email(userInfoId: $userInfoId) {\n sentAt\n }\n\n createdBy {\n id\n email\n nameOrEmail\n }\n }\n\n numberOfPages\n totalCount\n }\n }\n}\n",{organizationId:e,eventId:t??null,userInfoId:n,limit:l,offset:u,sort:s},[]),{numberOfPages:y,totalCount:x}=Lj(f.userInfo?.campaigns),[S,v]=(0,r.useState)(null);return _||(0,i.jsxs)(i.Fragment,{children:[h(f.userInfo.campaigns.nodes)?(0,i.jsx)(G,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(Qj,{css:{borderStartStartRadius:"$radii$2",borderStartEndRadius:"$radii$2",blockSize:"fit-content"},featureFlags:{isV4:!0},headerRow:(0,i.jsxs)(Sv,{children:[(0,i.jsx)(Zj,{attribute:re.Name,setSort:d,sort:s,children:o("titre_de_la_cam_20463")}),(0,i.jsx)(Zj,{attribute:re.Type,css:{flex:a?"0 50px":"0 150px"},setSort:d,sort:s,children:o("type_35427")}),(0,i.jsx)(xv,{width:200})]}),paginationRow:(0,i.jsx)(eA,{children:(0,i.jsx)(Jj,{limit:l,numberOfPages:y,offset:u,setLimit:p,setOffset:m,showLimits:!0,totalCount:x})}),children:I?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Kj,{}),(0,i.jsx)(Kj,{}),(0,i.jsx)(Kj,{})]}):f.userInfo.campaigns.nodes.map(e=>(0,i.jsx)(IM,{campaign:e,setDisplayedCampaignId:v},e.id))})}):(0,i.jsx)(G,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankSwissArmyKnife,subtitle:o("ici_seront_affi_69159"),title:o("ici_seront_affi_06596")})}),(0,i.jsx)(fM,{campaignId:S,setDisplayedCampaignId:v})]})},yM=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:o}=Hf(),a=$_(),[s,d]=(0,r.useState)(null),[l,c]=(0,r.useState)(2),[u,m]=(0,r.useState)(0),g=(0,r.useCallback)(()=>{m(0)},[m]),p=(0,r.useCallback)(e=>{c(e),g()},[c,g]),{data:f,loader:I,isLoading:_}=Mi('query UserDocuments(\n $organizationId: OrganizationId!\n $eventId: EventId\n $isEvent: Boolean!\n $userInfoId: UsersInfoId!\n $limit: Int\n $offset: Int\n $sort: DocumentsSort\n) {\n organization(id: $organizationId) {\n ...OrganizationMembersSpace\n country\n customBadges\n hideAssignmentsUntilConfirmationEmailSent\n\n event: eventMaybe(id: $eventId) {\n name\n country\n usePositions\n }\n\n userInfo(id: $userInfoId) {\n name\n nameOrEmail\n fields\n language: fieldValue(slug: "language")\n\n volunteerRegistration(eventId: $eventId) {\n state\n isAssignmentsEmailSent\n\n customDocuments(sent: true) {\n ...CustomDocumentPopulation\n }\n }\n\n links(eventId: $eventId) @include(if: $isEvent) {\n ...UserInfoLinks\n }\n\n documents(eventId: $eventId, limit: $limit, offset: $offset, sort: $sort) {\n nodes {\n ...DocumentEmailPreview\n\n campaigns {\n id\n name\n sentAt\n\n emailSender {\n fromEmail\n fromName\n }\n\n createdBy {\n email\n name\n nameOrEmail\n }\n }\n }\n\n numberOfPages\n totalCount\n }\n }\n }\n}\n',{organizationId:e,eventId:t??null,isEvent:!!t,userInfoId:n,limit:l,offset:u,sort:s},[Yo.OrganizationMembersSpaceFragment,Yo.CustomDocumentPopulationFragment,Yo.UserInfoLinksFragment,Yo.DocumentEmailPreviewFragment]),y=(0,r.useMemo)(()=>f.organization?.userInfo,[f.organization?.userInfo]),x=(0,r.useMemo)(()=>(0,vs.A)(y?.volunteerRegistration?.customDocuments.filter(e=>Zh(e.populationsIds,y.fields.population)),e=>e.name),[y?.volunteerRegistration?.customDocuments,y]),S=!!f.organization?.event?.usePositions&&y?.volunteerRegistration?.state===Vt.Assigned&&(!f.organization.hideAssignmentsUntilConfirmationEmailSent||y.volunteerRegistration.isAssignmentsEmailSent),v=(0,r.useMemo)(()=>y?.links&&(S||h(f.organization.customBadges)||h(x))||h(y?.documents.nodes),[x,f.organization?.customBadges,S,y]),{numberOfPages:b,totalCount:j}=Lj(y?.documents),A=Ti(jl),C=Ri(),E={lang:y?.language};return I||(0,i.jsx)(i.Fragment,{children:v?(0,i.jsxs)(i.Fragment,{children:[y.links&&(0,i.jsxs)(G,{direction:"column",gap:"3",children:[S&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(jo,{color:"white",download:`${y.nameOrEmail}-assignments`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:yg(y.links.userAssignmentsLink,"pdf"),children:o("t_l_charger_la_82882")}),(0,i.jsx)(jo,{color:"white",download:`${y.nameOrEmail}-planning`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:yg(y.links.userPlanningLink,"pdf"),children:o("t_l_charger_le_74660")}),(0,i.jsx)(jo,{color:"white",download:`${y.nameOrEmail}-planning-days`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:yg(y.links.userPlanningDaysLink,"pdf"),children:o("t_l_charger_le_43587")}),(0,i.jsx)(jo,{color:"white",download:`${y.nameOrEmail}-planning-list`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:yg(y.links.userPlanningListLink,"pdf"),children:o("t_l_charger_le_58518")})]}),f.organization.customBadges.map(e=>(0,i.jsx)(jo,{color:"white",download:`${y.nameOrEmail}-custom-badge`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:yg(y.links.userCustomBadgeLinks[e],"pdf",E),children:o("t_l_charger_1_80752",hE(e))},e)),x.map((e,t)=>(0,i.jsx)(jo,{color:"white",download:`${y.nameOrEmail}-custom-document`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:yg(y.links.userCustomDocumentLinks[e.slug],"pdf",E),children:o("t_l_charger_1_80752",e.name)},t))]}),h(y.documents.nodes)&&(0,i.jsx)(G,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(Qj,{css:{borderStartStartRadius:"$radii$2",borderStartEndRadius:"$radii$2",blockSize:"fit-content"},featureFlags:{isV4:!0},headerRow:(0,i.jsxs)(Sv,{children:[(0,i.jsx)(Zj,{attribute:Ce.Name,setSort:d,sort:s,children:o("nom_du_document_73868")}),(0,i.jsx)(xv,{width:200})]}),paginationRow:(0,i.jsx)(eA,{children:(0,i.jsx)(Jj,{limit:l,numberOfPages:b,offset:u,setLimit:p,setOffset:m,showLimits:!0,totalCount:j})}),children:_?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Kj,{}),(0,i.jsx)(Kj,{}),(0,i.jsx)(Kj,{})]}):y.documents.nodes.map(e=>(0,i.jsx)(jv,{children:(0,i.jsx)(hM,{document:e,subtitle:h(e.campaigns)?1===e.campaigns.length?[...C(o("envoy_e_le_1_90336","{1}","{2}"),(0,i.jsx)(cm,{dateTime:e.campaigns[0].sentAt,children:A.toLocaleString(e.campaigns[0].sentAt,a?oa.ShortDateTime:oa.DateTime)}),(0,i.jsx)(WI,{to:`mailto:${e.campaigns[0].createdBy.email}?subject=${encodeURIComponent(o("re_1_84422",e.name))}`,children:e.campaigns[0].createdBy?.nameOrEmail}))]:o("sent_multiple_t_40457"):void 0})},e.id))})})]}):(0,i.jsx)(G,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankSwissArmyKnife,subtitle:o("ici_seront_affi_73099"),title:o("pour_le_moment_62758")})})})},xM=e=>{const t=Oi(),n=Ti(jl),o=Ri();return(0,i.jsx)(My,{color:"white-with-green-icon",leftIcon:"circle-check",leftIconStyle:"solid",children:[...o(t("rempli_le_1_29292","{1}"),(0,i.jsx)(cm,{dateTime:e.formUserInfo.insertedAt,children:n.toLocaleString(e.formUserInfo.insertedAt,oa.DateOnly.MonthLong)}))]})},SM=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:o}=Hf(),a=$_(),{data:s,loader:d}=Mi("query MemberRegistrationForms($eventId: EventId, $userInfoId: UsersInfoId!) {\n userInfo(id: $userInfoId) {\n ...MemberRegistrationUserInfo\n\n ...FormsUsersInfosWished\n\n volunteerRegistration(eventId: $eventId) {\n state\n accreditationState\n volunteerMinutes\n isAccreditationsEmailSent\n isAssignmentsEmailSent\n\n positionsSlotsUsersInfos {\n ...MemberAssignment\n }\n\n accreditationsUsersInfos {\n ...MemberAccreditation\n }\n }\n }\n}\n",{eventId:t,userInfoId:n},[Yo.MemberRegistrationUserInfoFragment,Yo.FormsUsersInfosWishedFragment,Yo.MemberAssignmentFragment,Yo.MemberAccreditationFragment]),l=(0,r.useMemo)(()=>{const e=s.userInfo?.formsUsersInfos.filter(e=>t?null!==e.eventId:null===e.eventId);return h(e)?e.flatMap(e=>e.form.elements.length>0?[e]:[]):[]},[s.userInfo?.formsUsersInfos,t]);return d||(0,i.jsx)(i.Fragment,{children:h(l)?(0,i.jsx)(M_,{children:l.map(s=>(0,i.jsx)(P_,{badge:(0,i.jsx)(xM,{formUserInfo:s}),button:(0,i.jsx)(jo,{to:Yf.MEMBER_FORM_EDIT({organizationId:e,userInfoId:n,eventId:t,formId:s.formId}),children:a?(0,i.jsx)(_o,{icon:"eye"}):o("view_48132")}),title:s.form.name},s.form.id))}):(0,i.jsx)(G,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(ky,{imageSrc:NI.WeezeventBlankPerson,subtitle:o("ici_seront_affi_54352"),title:o("encore_un_peu_d_88675")})})})},vM=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:o}=Hf(),{data:a,loader:s,reload:r}=Mi("query MemberRegistration($organizationId: OrganizationId!, $eventId: EventId, $isEvent: Boolean!) {\n organization(id: $organizationId) {\n ...OrganizationMembersSpace\n country\n\n event: eventMaybe(id: $eventId) @include(if: $isEvent) {\n name\n country\n usePositions\n useAccreditations\n useForms\n useCampaigns\n useDocuments\n }\n }\n\n user {\n ...UserPermissions\n }\n}\n",{organizationId:e,eventId:t,isEvent:!!t},[Yo.OrganizationMembersSpaceFragment,Yo.UserPermissionsFragment]),d=Ri(),l=a.organization?.event,c=!!l?.usePositions,u=!!l?.useAccreditations,m=!t||!!l?.useCampaigns,g=!t||!!l?.useDocuments,h=!(t&&!l?.useForms&&(c||u||m||g)),p=c?Yf.MEMBER_POSITIONS({organizationId:e,userInfoId:n,eventId:t}):u?Yf.MEMBER_ACCREDITATIONS({organizationId:e,userInfoId:n,eventId:t}):h?Yf.MEMBER_FORMS({organizationId:e,userInfoId:n,eventId:t}):m?Yf.MEMBER_MESSAGES({organizationId:e,userInfoId:n,eventId:t}):Yf.MEMBER_DOCUMENTS({organizationId:e,userInfoId:n,eventId:t});return s||(0,i.jsx)(Kv,{userPermissions:a.user,children:(0,i.jsx)(ny,{featureFlags:{isV4:!0},isLoading:!1,organization:a.organization,spaceDesign:{themeColors:a.organization?.membersSpaceDesign?.colors,bannerSrc:a.organization?.membersSpaceDesign?.banner?.url,logoSrc:a.organization?.membersSpaceDesign?.logo?.url},children:(0,i.jsxs)(Is.dO,{children:[(0,i.jsx)(Is.rd,{exact:!0,from:Yf.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId"}),to:Yf.MEMBER_FORMS({organizationId:e,userInfoId:n})}),(0,i.jsx)(Is.rd,{exact:!0,from:Yf.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"}),to:p}),(0,i.jsx)(Is.qh,{path:[Yf.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",formId:":formId"}),Yf.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId",formId:":formId"})],children:(0,i.jsx)(PR,{reload:r})}),(0,i.jsx)(Is.qh,{children:(0,i.jsxs)(sb,{featureFlags:{isV4:!0},children:[h&&(0,i.jsx)(rb,{featureFlags:{isV4:!0},getPath:(i=!1)=>Yf.MEMBER_FORMS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...d(o(t?"pr_visualiser_e_41845":"pr_visualiser_e_26744","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?a.organization.event?.name:a.organization.name}))],title:o("formulaires_rem_62495"),children:(0,i.jsx)(SM,{})}),t&&c&&(0,i.jsx)(rb,{featureFlags:{isV4:!1},getPath:(i=!1)=>Yf.MEMBER_POSITIONS({organizationId:i?":organizationId":e,eventId:i?":eventId":t,userInfoId:i?":userInfoId":n}),title:o("planning_de_vos_51737"),children:(0,i.jsx)(gM,{reloadHeader:r})}),t&&u&&(0,i.jsx)(rb,{featureFlags:{isV4:!1},getPath:(i=!1)=>Yf.MEMBER_ACCREDITATIONS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?":eventId":t}),title:o("accr_ditations_39450"),children:(0,i.jsx)(YR,{excludeAccreditations:a.organization.membersSpaceExcludeAccreditations,reloadHeader:r})}),m&&(0,i.jsx)(rb,{featureFlags:{isV4:!0},getPath:(i=!1)=>Yf.MEMBER_MESSAGES({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...d(o(t?"visualiser_l_en_66953":"visualiser_l_en_48128","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?a.organization.event?.name:a.organization.name}))],title:o("messages_37744"),children:(0,i.jsx)(_M,{})}),g&&(0,i.jsx)(rb,{featureFlags:{isV4:!0},getPath:(i=!1)=>Yf.MEMBER_DOCUMENTS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...d(o(t?"visualiser_l_en_48475":"visualiser_l_en_47798","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?a.organization.event?.name:a.organization.name}))],title:o("Documents"),children:(0,i.jsx)(yM,{})})]})})]})})})},bM=()=>(0,i.jsx)($R,{children:(0,i.jsx)(vM,{})}),jM=e=>{const{params:{organizationId:t},translate:n}=Hf(),o=$I();return(0,i.jsxs)(G,{align:"center",css:{padding:"$4 $6",borderBlockEnd:"1px solid $gray200","&:last-of-type":{borderBlockEnd:"none"}},gap:"3",children:[(0,i.jsx)(J_,{email:e.userInfo.email,image:e.userInfo.picture?.url,name:e.userInfo.name,size:40}),(0,i.jsxs)(G,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)(Li,{color:"gray800",css:{ellipsis:!0},fontWeight:"medium",children:v(e.userInfo.name)?e.userInfo.name:"-"}),(0,i.jsx)(Li,{color:"gray500",css:{ellipsis:!0},children:e.userInfo.email})]}),(0,i.jsx)(G,{children:o?(0,i.jsx)(jo,{color:"white",size:"sm",to:Yf.USER_PROFILE({organizationId:t,userInfoId:e.userInfo.id}),children:n("voir_son_profil_99428")}):(0,i.jsx)(jo,{color:"white",leftIcon:"arrow-right",size:"sm",to:Yf.USER_PROFILE({organizationId:t,userInfoId:e.userInfo.id})})})]})};function AM(){const{history:e,params:{organizationId:t}}=Hf(),{data:n,isLoading:i}=Mi("query Profiles($organizationId: OrganizationId!) {\n user {\n usersInfos(organizationId: $organizationId) {\n id\n name\n email\n picture {\n url\n }\n }\n }\n}\n",{organizationId:t},[]);return(0,r.useEffect)(()=>{1===n.user?.usersInfos.length&&e.replace(Yf.USER_PROFILE({organizationId:t,userInfoId:n.user.usersInfos[0].id}))},[n.user]),{isLoading:i,usersInfos:n.user?.usersInfos}}const CM=()=>(0,i.jsx)(LI,{children:(0,i.jsxs)(G,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)(UI,{borderRadius:"$1",height:23,width:1}),(0,i.jsx)(UI,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(UI,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(UI,{borderRadius:"$2",height:74,width:1})]})}),EM=()=>{const e=Oi(),{organizationId:t}=wi(),{usersInfos:n,isLoading:o}=AM();return(0,i.jsx)(eI,{isLoading:o,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:t,skeleton:(0,i.jsx)(CM,{}),children:(0,i.jsx)(LI,{children:(0,i.jsxs)(G,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)(Li,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:e("_quel_profil_s_67307")}),(n??[]).map(e=>(0,i.jsx)(jM,{userInfo:e},e.id))]})})})},TM=()=>{const e=Oi(),{organizationId:t}=wi(),{usersInfos:n,isLoading:o}=AM();return(0,i.jsx)(eI,{isLoading:o,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:t,skeleton:(0,i.jsx)(MR,{}),children:(0,i.jsx)(RR,{children:(0,i.jsx)(OR,{children:(0,i.jsx)(R_,{heading:e("s_lectionnez_le_89411"),subtitle:h(n)?[e("listes_des_prof_08757",n[0].email)]:void 0,children:(0,i.jsx)(G,{css:{bd:!0},direction:"column",children:(n??[]).map(e=>(0,i.jsx)(jM,{userInfo:e},e.id))})})})})})},OM=()=>{const{params:{organizationId:e}}=Hf();return(0,i.jsxs)(Is.dO,{children:[(0,i.jsx)(Is.rd,{exact:!0,from:Yf.USER_PROFILES({organizationId:":organizationId"}),to:yd(Yf.USER_PROFILES({organizationId:":organizationId"}))}),(0,i.jsx)(Is.qh,{children:Zf(e)?(0,i.jsx)(EM,{}):(0,i.jsx)(TM,{})})]})},RM=()=>(0,i.jsxs)(Is.dO,{children:[(0,i.jsx)(Is.qh,{path:Yf.USER_PROFILES({organizationId:":organizationId"}),children:(0,i.jsx)(OM,{})}),(0,i.jsx)(Is.qh,{path:Yf.USER_PROFILE({organizationId:":organizationId",userInfoId:":userInfoId"}),children:(0,i.jsx)(DR,{})}),(0,i.jsx)(Is.qh,{path:[Km.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}),hg.DELEGATIONS({organizationId:":organizationId"}),hg.DELEGATIONS({organizationId:":organizationId",eventId:":eventId"}),hg.DELEGATION({organizationId:":organizationId",delegationId:":delegationId"}),hg.DELEGATION({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(bR,{})}),(0,i.jsx)(Is.qh,{path:[Yf.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId"}),Yf.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"})],children:(0,i.jsx)(bM,{})}),(0,i.jsx)(Is.rd,{to:_d(Km.ORGANIZATION({organizationId:":organizationId"}))})]});var MM,DM,wM;function $M(){return $M=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const e=Oi(),{user:t}=ms(),n=Pi();let o=null,a=null;try{o=n.getItemInt(OI.ORGANIZATION_ID),a=n.getItemInt(OI.EVENT_ID)}catch{}return ig.includes(location.host)?(o=og[window.location.host],(0,i.jsx)(Mp,{path:`/v2/organization/${o}/auth`})):o&&a?t?(0,i.jsx)(Mp,{path:yf(o,a)}):(0,i.jsx)(Mp,{path:ff(o,a)}):(0,i.jsxs)(G,{align:"center",css:{backgroundImage:`url(${PI.Background404})`,backgroundSize:"cover",height:"100%",width:"100%"},direction:"column",justify:"center",children:[(0,i.jsx)(Li,{css:{marginBottom:"100px",width:"300px"},children:(0,i.jsx)(PM,{})}),(0,i.jsx)(Li,{css:{color:"white",fontSize:"24px"},children:e("il_n_y_a_rien_33749")})]})},kM=e=>(0,i.jsx)(Dp,{getRedirectPath:({organizationId:t,eventId:n,userInfoId:i,delegationId:o})=>"number"!=typeof t||"number"!=typeof n||i||o?location.pathname.includes("delegation")&&"number"==typeof t?_d(Km.ORGANIZATION_DELEGATIONS({organizationId:t})):location.pathname.startsWith(`${lo.HEAVENT_PUBLIC_URL.pathname}/organization`)&&"number"==typeof t?_d(Km.ORGANIZATION({organizationId:t})):gf.HOME:xf(e.isEmbed,ff(t,n)),shouldHaveUser:!0,children:e.children}),zM=e=>(0,i.jsx)(Dp,{getRedirectPath:({organizationId:t,eventId:n})=>"number"==typeof t&&"number"==typeof n?xf(e.isEmbed,yf(t,n)):location.pathname.includes("delegations")&&"number"==typeof t?yd(Km.ORGANIZATION_DELEGATIONS({organizationId:t})):location.pathname.startsWith(`${lo.HEAVENT_PUBLIC_URL.pathname}/organization`)&&"number"==typeof t?yd(Yf.USER_PROFILES({organizationId:t})):gf.HOME,shouldHaveUser:!1,children:e.children}),LM=e=>(0,i.jsxs)(Is.dO,{children:[(0,i.jsx)(Is.qh,{path:"/v2",children:(0,i.jsx)(O_,{})}),(0,i.jsx)(Is.rd,{from:xf(e.isEmbed,ff(":organizationId",":eventId")),to:_d(Km.ORGANIZATION({organizationId:":organizationId"}))}),(0,i.jsx)(Is.rd,{from:xf(e.isEmbed,_f(":organizationId",":eventId")),to:_d(Km.ORGANIZATION({organizationId:":organizationId"}))}),(0,i.jsx)(Is.qh,{exact:!0,path:[Km.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"}),Tm.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"}),Tm.EVENT_TEAM_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId",teamCode:":teamCode"}),hg.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"}),hg.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",eventId:":eventId",formId:":formId"})],children:(0,i.jsx)(Nv,{})}),(0,i.jsx)(Is.qh,{exact:!0,path:Tm.EVENTS({organizationId:":organizationId"}),children:(0,i.jsx)(iy,{})}),(0,i.jsx)(Is.qh,{path:gf.USER_FIELD_UPDATE(":organizationId",":userInfoId",":customFieldSlug",":value"),children:(0,i.jsx)(Fv,{})}),(0,i.jsx)(Is.qh,{path:_d(Km.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"})),children:(0,i.jsx)(zM,{isEmbed:!1,children:(0,i.jsx)(t_,{loadDelegationsSpace:!0,loadMembersSpace:!1})})}),(0,i.jsx)(Is.qh,{path:_d(Km.ORGANIZATION({organizationId:":organizationId"})),children:(0,i.jsx)(zM,{isEmbed:!1,children:(0,i.jsx)(t_,{loadDelegationsSpace:!1,loadMembersSpace:!0})})}),(0,i.jsx)(Is.qh,{path:Km.ORGANIZATION({organizationId:":organizationId"}),children:(0,i.jsx)(kM,{isEmbed:!1,children:(0,i.jsx)(RM,{})})}),(0,i.jsx)(Is.qh,{children:(0,i.jsx)(NM,{})})]}),FM=()=>(Cf(""),(0,r.useEffect)(()=>{const e=document.querySelector("link[rel~='icon']");var t;e&&(e.href=(t=location.host)===Xm?Af:t===ng?jf:t===tg?vf:bf)}),function(){const[e,t]=(0,r.useState)(null),n=({data:e})=>{const{type:n,...i}=e||{};n===kv.AUTO_RESIZE_ACK&&(t(i),window.parent.postMessage({id:window.name,type:kv.AUTO_RESIZE_CHANGE_DIMENSIONS,blockSize:window.outerHeight,inlineSize:743},i.page??"*"))};(0,r.useEffect)(()=>null===e?(window.addEventListener("message",n),window.parent.postMessage({id:window.name,type:kv.AUTO_RESIZE_SYN},"*"),()=>window.removeEventListener("message",n)):void 0,[e])}(),(0,i.jsx)(Li,{css:{color:"$gray800",height:"100%",overflow:"auto",position:"relative",width:"100%",backgroundColor:"$grayCustom50"},children:(0,i.jsx)(Ui.Kd,{basename:lo.HEAVENT_PUBLIC_URL.pathnameOptional,children:(0,i.jsxs)(Is.dO,{children:[(0,i.jsx)(Is.qh,{path:If(":code",":source",":organizationId",":eventId"),children:(0,i.jsx)(Sf,{})}),(0,i.jsx)(Is.qh,{path:"/embed",children:(0,i.jsx)(LM,{isEmbed:!0})}),(0,i.jsx)(Is.qh,{children:(0,i.jsx)(LM,{isEmbed:!1})})]})})}));(0,Rp.H)(document.getElementById("heavent-react-hook")).render((0,i.jsx)(r.StrictMode,{children:(0,i.jsx)(e=>{const[t,n]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=!0;return Ja().then(t=>{e&&n(t)}).catch(()=>{alert("Could not load application, please try again.")}),()=>{e=!1}},[]),t?e.render(t):(0,i.jsx)(xo,{})},{render:e=>(0,i.jsx)(us.Provider,{value:e,children:(0,i.jsx)(Tp,{children:(0,i.jsx)(ns,{children:(0,i.jsx)(Go,{children:(0,i.jsx)(cs,{children:(0,i.jsxs)(as.Provider,{value:{designSystem:is},children:[(0,i.jsx)(Op,{}),(0,i.jsx)(FM,{})]})})})})})})})}))},477:()=>{},539:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileZIP-8e94803f540ec1fbe349.svg"},911:e=>{"use strict";e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IldoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQwMCA0MDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQwMCA0MDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDojRkZGRkZGO308L3N0eWxlPjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MDAsMjAwYzAsMTEwLjUtODkuNSwyMDAtMjAwLDIwMFMwLDMxMC41LDAsMjAwUzg5LjUsMCwyMDAsMFM0MDAsODkuNSw0MDAsMjAweiBNMTYzLjQsMzA1LjVjODguNywwLDEzNy4yLTczLjUsMTM3LjItMTM3LjJjMC0yLjEsMC00LjItMC4xLTYuMmM5LjQtNi44LDE3LjYtMTUuMywyNC4xLTI1Yy04LjYsMy44LTE3LjksNi40LTI3LjcsNy42YzEwLTYsMTcuNi0xNS40LDIxLjItMjYuN2MtOS4zLDUuNS0xOS42LDkuNS0zMC42LDExLjdjLTguOC05LjQtMjEuMy0xNS4yLTM1LjItMTUuMmMtMjYuNiwwLTQ4LjIsMjEuNi00OC4yLDQ4LjJjMCwzLjgsMC40LDcuNSwxLjMsMTFjLTQwLjEtMi03NS42LTIxLjItOTkuNC01MC40Yy00LjEsNy4xLTYuNSwxNS40LTYuNSwyNC4yYzAsMTYuNyw4LjUsMzEuNSwyMS41LDQwLjFjLTcuOS0wLjItMTUuMy0yLjQtMjEuOC02YzAsMC4yLDAsMC40LDAsMC42YzAsMjMuNCwxNi42LDQyLjgsMzguNyw0Ny4zYy00LDEuMS04LjMsMS43LTEyLjcsMS43Yy0zLjEsMC02LjEtMC4zLTkuMS0wLjljNi4xLDE5LjIsMjMuOSwzMy4xLDQ1LDMzLjVjLTE2LjUsMTIuOS0zNy4zLDIwLjYtNTkuOSwyMC42Yy0zLjksMC03LjctMC4yLTExLjUtMC43QzExMC44LDI5Ny41LDEzNi4yLDMwNS41LDE2My40LDMwNS41Ii8+PC9zdmc+"},1037:(e,t,n)=>{"use strict";e.exports=n.p+"svg/dnsBlank-d9b5a36b6d641e2b1cd9.svg"},1205:(e,t,n)=>{"use strict";e.exports=n.p+"img/formPositionUnranked-8efe2960cfc090ba51df.png"},1416:(e,t,n)=>{"use strict";e.exports=n.p+"img/googlePlan-b18cf281f99a8608e7a9.png"},1446:(e,t,n)=>{"use strict";e.exports=n.p+"img/googleMaps-093b110e04f11e43e677.png"},1931:(e,t,n)=>{"use strict";e.exports=n.p+"img/google-3994b2066e10d4d349a4.png"},2248:e=>{"use strict";e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxMDI0cHgiIGhlaWdodD0iMTAyNHB4IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPiAgICAgICAgPHRpdGxlPkZpbGwgMTwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9ImZMb2dvX1doaXRlIiBmaWxsPSIjRkZGRkZFIj4gICAgICAgICAgICA8cGF0aCBkPSJNOTY3LjQ4NCwwIEw1Ni41MTcsMCBDMjUuMzA0LDAgMCwyNS4zMDQgMCw1Ni41MTcgTDAsOTY3LjQ4MyBDMCw5OTguNjk0IDI1LjI5NywxMDI0IDU2LjUyMiwxMDI0IEw1NDcsMTAyNCBMNTQ3LDYyOCBMNDE0LDYyOCBMNDE0LDQ3MyBMNTQ3LDQ3MyBMNTQ3LDM1OS4wMjkgQzU0NywyMjYuNzY3IDYyNy43NzMsMTU0Ljc0NyA3NDUuNzU2LDE1NC43NDcgQzgwMi4yNjksMTU0Ljc0NyA4NTAuODQyLDE1OC45NTUgODY1LDE2MC44MzYgTDg2NSwyOTkgTDc4My4zODQsMjk5LjAzNyBDNzE5LjM5MSwyOTkuMDM3IDcwNywzMjkuNTI5IDcwNywzNzQuMjczIEw3MDcsNDczIEw4NjAuNDg3LDQ3MyBMODQwLjUwMSw2MjggTDcwNyw2MjggTDcwNywxMDI0IEw5NjcuNDg0LDEwMjQgQzk5OC42OTcsMTAyNCAxMDI0LDk5OC42OTcgMTAyNCw5NjcuNDg0IEwxMDI0LDU2LjUxNSBDMTAyNCwyNS4zMDMgOTk4LjY5NywwIDk2Ny40ODQsMCIgaWQ9IkZpbGwtMSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+"},2281:(e,t,n)=>{"use strict";e.exports=n.p+"img/login2x-a7058a62cb4dc68d53e5.png"},2599:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankHandGlobe-724d35d1342815318f84.svg"},2630:(e,t,n)=>{"use strict";e.exports=n.p+"svg/alert-c575e88c07bbcb08605f.svg"},2647:(e,t,n)=>{"use strict";e.exports=n.p+"img/login-ba738216a561ebc04664.png"},3574:(e,t,n)=>{"use strict";e.exports=n.p+"svg/done2-fe55d02679b93e21cc5f.svg"},3691:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMCAwIDMuNzggMS42MWg0OS42MjFjMS42OTQgMCAzLjE5LS43OTggNC4xNDYtMi4wMzd6IiBmaWxsPSIjNWM4OGM1Ii8+PHBhdGggZD0iTTIyNi43NDIgMjIyLjk4OGMtOS4yNjYgMC0xNi43NzcgNy4xNy0xNi43NzcgMTYuMDE0LjAwNyAyLjc2Mi42NjMgNS40NzQgMi4wOTMgNy44NzUuNDMuNzAzLjgzIDEuNDA4IDEuMTkgMi4xMDcuMzMzLjUwMi42NSAxLjAwNS45NSAxLjUwOC4zNDMuNDc3LjY3My45NTcuOTg4IDEuNDQgMS4zMSAxLjc2OSAyLjUgMy41MDIgMy42MzcgNS4xNjguNzkzIDEuMjc1IDEuNjgzIDIuNjQgMi40NjYgMy45OSAyLjM2MyA0LjA5NCA0LjAwNyA4LjA5MiA0LjYgMTMuOTE0di4wMTJjLjE4Mi40MTIuNTE2LjY2Ni44NzkuNjY3LjQwMy0uMDAxLjc2OC0uMzE0LjkzLS43OTkuNjAzLTUuNzU2IDIuMjM4LTkuNzI5IDQuNTg1LTEzLjc5NC43ODItMS4zNSAxLjY3My0yLjcxNSAyLjQ2NS0zLjk5IDEuMTM3LTEuNjY2IDIuMzI4LTMuNCAzLjYzOC01LjE2OS4zMTUtLjQ4Mi42NDUtLjk2Mi45ODgtMS40MzkuMy0uNTAzLjYxNy0xLjAwNi45NS0xLjUwOC4zNTktLjcuNzYtMS40MDQgMS4xOS0yLjEwNyAxLjQyNi0yLjQwMiAyLTUuMTE0IDIuMDA0LTcuODc1IDAtOC44NDQtNy41MTEtMTYuMDE0LTE2Ljc3Ni0xNi4wMTR6IiBmaWxsPSIjZGQ0YjNlIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxlbGxpcHNlIHJ5PSI1LjU2NCIgcng9IjUuODI4IiBjeT0iMjM5LjAwMiIgY3g9IjIyNi43NDIiIGZpbGw9IiM4MDJkMjciIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTE5MC4zMDEgMjM3LjI4M2MtNC42NyAwLTguNDU3IDMuODUzLTguNDU3IDguNjA2czMuNzg2IDguNjA3IDguNDU3IDguNjA3YzMuMDQzIDAgNC44MDYtLjk1OCA2LjMzNy0yLjUxNiAxLjUzLTEuNTU3IDIuMDg3LTMuOTEzIDIuMDg3LTYuMjkgMC0uMzYyLS4wMjMtLjcyMi0uMDY0LTEuMDc5aC04LjI1N3YzLjA0M2g0Ljg1Yy0uMTk3Ljc1OS0uNTMxIDEuNDUtMS4wNTggMS45ODYtLjk0Mi45NTgtMi4wMjggMS41NDgtMy45MDEgMS41NDgtMi44NzYgMC01LjIwOC0yLjM3Mi01LjIwOC01LjI5OSAwLTIuOTI2IDIuMzMyLTUuMjk5IDUuMjA4LTUuMjk5IDEuMzk5IDAgMi42MTguNDA3IDMuNTg0IDEuMjkzbDIuMzgxLTIuMzhjMC0uMDAyLS4wMDMtLjAwNC0uMDA0LS4wMDUtMS41ODgtMS41MjQtMy42Mi0yLjIxNS01Ljk1NS0yLjIxNXptNC40MyA1LjY2bC4wMDMuMDA2di0uMDAzeiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjE1LjE4NCAyNTEuOTI5bC03Ljk4IDcuOTc5IDI4LjQ3NyAyOC40NzVjLjI4Ny0uNjQ5LjQ0OS0xLjM2Ni40NDktMi4xMjN2LTMxLjE2NWMtLjQ2OS42NzUtLjkzNCAxLjM0OS0xLjM4MiAyLjAwNS0uNzkyIDEuMjc1LTEuNjgyIDIuNjQtMi40NjUgMy45OS0yLjM0NyA0LjA2NS0zLjk4MiA4LjAzOC00LjU4NSAxMy43OTQtLjE2Mi40ODUtLjUyNy43OTgtLjkzLjc5OS0uMzYzLS4wMDEtLjY5Ny0uMjU1LS44NzktLjY2N3YtLjAxMmMtLjU5My01LjgyMi0yLjIzNy05LjgyLTQuNi0xMy45MTQtLjc4My0xLjM1LTEuNjczLTIuNzE1LTIuNDY2LTMuOTktMS4xMzctMS42NjYtMi4zMjctMy40LTMuNjM3LTUuMTY5bC0uMDAyLS4wMDN6IiBmaWxsPSIjYzNjM2MzIi8+PHBhdGggZD0iTTIxMi45ODMgMjQ4LjQ5NWwtMzYuOTUyIDM2Ljk1M3YuODEyYTUuMjI3IDUuMjI3IDAgMCAwIDUuMjM4IDUuMjM4aDEuMDE1bDM1LjY2Ni0zNS42NjZhMTM2LjI3NSAxMzYuMjc1IDAgMCAwLTIuNzY0LTMuOSAzNy41NzUgMzcuNTc1IDAgMCAwLS45ODktMS40NGMtLjI5OS0uNTAzLS42MTYtMS4wMDYtLjk1LTEuNTA4LS4wODMtLjE2Mi0uMTc2LS4zMjYtLjI2NC0uNDg5eiIgZmlsbD0iI2ZkZGM0ZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjExLjk5OCAyNjEuMDgzbC02LjE1MiA2LjE1MSAyNC4yNjQgMjQuMjY0aC43ODFhNS4yMjcgNS4yMjcgMCAwIDAgNS4yMzktNS4yMzh2LTEuMDQ1eiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48L2c+PC9zdmc+"},3780:(e,t,n)=>{"use strict";e.exports=n.p+"svg/check-b496988ef222b46ee39a.svg"},4025:(e,t,n)=>{"use strict";e.exports=n.p+"img/ignPlan-d4659acd351e7c1a33e4.png"},4225:e=>{"use strict";e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1MDRweCIgaGVpZ2h0PSI1MDRweCIgdmlld0JveD0iMCAwIDUwNCA1MDQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+Z2x5cGgtbG9nb19NYXkyMDE2PC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPiAgICAgICAgPHBvbHlnb24gaWQ9InBhdGgtMSIgcG9pbnRzPSIwIDAuMTU5IDUwMy44NDEgMC4xNTkgNTAzLjg0MSA1MDMuOTQgMCA1MDMuOTQiPjwvcG9seWdvbj4gICAgPC9kZWZzPiAgICA8ZyBpZD0iZ2x5cGgtbG9nb19NYXkyMDE2IiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJHcm91cC0zIj4gICAgICAgICAgICA8bWFzayBpZD0ibWFzay0yIiBmaWxsPSJ3aGl0ZSI+ICAgICAgICAgICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+ICAgICAgICAgICAgPC9tYXNrPiAgICAgICAgICAgIDxnIGlkPSJDbGlwLTIiPjwvZz4gICAgICAgICAgICA8cGF0aCBkPSJNMjUxLjkyMSwwLjE1OSBDMTgzLjUwMywwLjE1OSAxNzQuOTI0LDAuNDQ5IDE0OC4wNTQsMS42NzUgQzEyMS4yNCwyLjg5OCAxMDIuOTI3LDcuMTU3IDg2LjkwMywxMy4zODUgQzcwLjMzNywxOS44MjIgNTYuMjg4LDI4LjQzNiA0Mi4yODIsNDIuNDQxIEMyOC4yNzcsNTYuNDQ3IDE5LjY2Myw3MC40OTYgMTMuMjI2LDg3LjA2MiBDNi45OTgsMTAzLjA4NiAyLjczOSwxMjEuMzk5IDEuNTE2LDE0OC4yMTMgQzAuMjksMTc1LjA4MyAwLDE4My42NjIgMCwyNTIuMDggQzAsMzIwLjQ5NyAwLjI5LDMyOS4wNzYgMS41MTYsMzU1Ljk0NiBDMi43MzksMzgyLjc2IDYuOTk4LDQwMS4wNzMgMTMuMjI2LDQxNy4wOTcgQzE5LjY2Myw0MzMuNjYzIDI4LjI3Nyw0NDcuNzEyIDQyLjI4Miw0NjEuNzE4IEM1Ni4yODgsNDc1LjcyMyA3MC4zMzcsNDg0LjMzNyA4Ni45MDMsNDkwLjc3NSBDMTAyLjkyNyw0OTcuMDAyIDEyMS4yNCw1MDEuMjYxIDE0OC4wNTQsNTAyLjQ4NCBDMTc0LjkyNCw1MDMuNzEgMTgzLjUwMyw1MDQgMjUxLjkyMSw1MDQgQzMyMC4zMzgsNTA0IDMyOC45MTcsNTAzLjcxIDM1NS43ODcsNTAyLjQ4NCBDMzgyLjYwMSw1MDEuMjYxIDQwMC45MTQsNDk3LjAwMiA0MTYuOTM4LDQ5MC43NzUgQzQzMy41MDQsNDg0LjMzNyA0NDcuNTUzLDQ3NS43MjMgNDYxLjU1OSw0NjEuNzE4IEM0NzUuNTY0LDQ0Ny43MTIgNDg0LjE3OCw0MzMuNjYzIDQ5MC42MTYsNDE3LjA5NyBDNDk2Ljg0Myw0MDEuMDczIDUwMS4xMDIsMzgyLjc2IDUwMi4zMjUsMzU1Ljk0NiBDNTAzLjU1MSwzMjkuMDc2IDUwMy44NDEsMzIwLjQ5NyA1MDMuODQxLDI1Mi4wOCBDNTAzLjg0MSwxODMuNjYyIDUwMy41NTEsMTc1LjA4MyA1MDIuMzI1LDE0OC4yMTMgQzUwMS4xMDIsMTIxLjM5OSA0OTYuODQzLDEwMy4wODYgNDkwLjYxNiw4Ny4wNjIgQzQ4NC4xNzgsNzAuNDk2IDQ3NS41NjQsNTYuNDQ3IDQ2MS41NTksNDIuNDQxIEM0NDcuNTUzLDI4LjQzNiA0MzMuNTA0LDE5LjgyMiA0MTYuOTM4LDEzLjM4NSBDNDAwLjkxNCw3LjE1NyAzODIuNjAxLDIuODk4IDM1NS43ODcsMS42NzUgQzMyOC45MTcsMC40NDkgMzIwLjMzOCwwLjE1OSAyNTEuOTIxLDAuMTU5IFogTTI1MS45MjEsNDUuNTUgQzMxOS4xODYsNDUuNTUgMzI3LjE1NCw0NS44MDcgMzUzLjcxOCw0Ny4wMTkgQzM3OC4yOCw0OC4xMzkgMzkxLjYxOSw1Mi4yNDMgNDAwLjQ5Niw1NS42OTMgQzQxMi4yNTUsNjAuMjYzIDQyMC42NDcsNjUuNzIyIDQyOS40NjIsNzQuNTM4IEM0MzguMjc4LDgzLjM1MyA0NDMuNzM3LDkxLjc0NSA0NDguMzA3LDEwMy41MDQgQzQ1MS43NTcsMTEyLjM4MSA0NTUuODYxLDEyNS43MiA0NTYuOTgxLDE1MC4yODIgQzQ1OC4xOTMsMTc2Ljg0NiA0NTguNDUsMTg0LjgxNCA0NTguNDUsMjUyLjA4IEM0NTguNDUsMzE5LjM0NSA0NTguMTkzLDMyNy4zMTMgNDU2Ljk4MSwzNTMuODc3IEM0NTUuODYxLDM3OC40MzkgNDUxLjc1NywzOTEuNzc4IDQ0OC4zMDcsNDAwLjY1NSBDNDQzLjczNyw0MTIuNDE0IDQzOC4yNzgsNDIwLjgwNiA0MjkuNDYyLDQyOS42MjEgQzQyMC42NDcsNDM4LjQzNyA0MTIuMjU1LDQ0My44OTYgNDAwLjQ5Niw0NDguNDY2IEMzOTEuNjE5LDQ1MS45MTYgMzc4LjI4LDQ1Ni4wMiAzNTMuNzE4LDQ1Ny4xNCBDMzI3LjE1OCw0NTguMzUyIDMxOS4xOTEsNDU4LjYwOSAyNTEuOTIxLDQ1OC42MDkgQzE4NC42NSw0NTguNjA5IDE3Ni42ODQsNDU4LjM1MiAxNTAuMTIzLDQ1Ny4xNCBDMTI1LjU2MSw0NTYuMDIgMTEyLjIyMiw0NTEuOTE2IDEwMy4zNDUsNDQ4LjQ2NiBDOTEuNTg2LDQ0My44OTYgODMuMTk0LDQzOC40MzcgNzQuMzc5LDQyOS42MjEgQzY1LjU2NCw0MjAuODA2IDYwLjEwNCw0MTIuNDE0IDU1LjUzNCw0MDAuNjU1IEM1Mi4wODQsMzkxLjc3OCA0Ny45OCwzNzguNDM5IDQ2Ljg2LDM1My44NzcgQzQ1LjY0OCwzMjcuMzEzIDQ1LjM5MSwzMTkuMzQ1IDQ1LjM5MSwyNTIuMDggQzQ1LjM5MSwxODQuODE0IDQ1LjY0OCwxNzYuODQ2IDQ2Ljg2LDE1MC4yODIgQzQ3Ljk4LDEyNS43MiA1Mi4wODQsMTEyLjM4MSA1NS41MzQsMTAzLjUwNCBDNjAuMTA0LDkxLjc0NSA2NS41NjMsODMuMzUzIDc0LjM3OSw3NC41MzggQzgzLjE5NCw2NS43MjIgOTEuNTg2LDYwLjI2MyAxMDMuMzQ1LDU1LjY5MyBDMTEyLjIyMiw1Mi4yNDMgMTI1LjU2MSw0OC4xMzkgMTUwLjEyMyw0Ny4wMTkgQzE3Ni42ODcsNDUuODA3IDE4NC42NTUsNDUuNTUgMjUxLjkyMSw0NS41NSBaIiBpZD0iRmlsbC0xIiBmaWxsPSIjRkZGRkZGIiBtYXNrPSJ1cmwoI21hc2stMikiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgICAgIDxwYXRoIGQ9Ik0yNTEuOTIxLDMzNi4wNTMgQzIwNS41NDMsMzM2LjA1MyAxNjcuOTQ3LDI5OC40NTcgMTY3Ljk0NywyNTIuMDggQzE2Ny45NDcsMjA1LjcwMiAyMDUuNTQzLDE2OC4xMDYgMjUxLjkyMSwxNjguMTA2IEMyOTguMjk4LDE2OC4xMDYgMzM1Ljg5NCwyMDUuNzAyIDMzNS44OTQsMjUyLjA4IEMzMzUuODk0LDI5OC40NTcgMjk4LjI5OCwzMzYuMDUzIDI1MS45MjEsMzM2LjA1MyBaIE0yNTEuOTIxLDEyMi43MTUgQzE4MC40NzQsMTIyLjcxNSAxMjIuNTU2LDE4MC42MzMgMTIyLjU1NiwyNTIuMDggQzEyMi41NTYsMzIzLjUyNiAxODAuNDc0LDM4MS40NDQgMjUxLjkyMSwzODEuNDQ0IEMzMjMuMzY3LDM4MS40NDQgMzgxLjI4NSwzMjMuNTI2IDM4MS4yODUsMjUyLjA4IEMzODEuMjg1LDE4MC42MzMgMzIzLjM2NywxMjIuNzE1IDI1MS45MjEsMTIyLjcxNSBaIiBpZD0iRmlsbC00IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICA8cGF0aCBkPSJNNDE2LjYyNywxMTcuNjA0IEM0MTYuNjI3LDEzNC4zIDQwMy4wOTIsMTQ3LjgzNCAzODYuMzk2LDE0Ny44MzQgQzM2OS43MDEsMTQ3LjgzNCAzNTYuMTY2LDEzNC4zIDM1Ni4xNjYsMTE3LjYwNCBDMzU2LjE2NiwxMDAuOTA4IDM2OS43MDEsODcuMzczIDM4Ni4zOTYsODcuMzczIEM0MDMuMDkyLDg3LjM3MyA0MTYuNjI3LDEwMC45MDggNDE2LjYyNywxMTcuNjA0IiBpZD0iRmlsbC01IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgIDwvZz48L3N2Zz4="},4236:(e,t,n)=>{"use strict";e.exports=n.p+"img/background404-7cbee4be29173b045b3e.jpg"},4362:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankSwissArmyKnife-1600d89a247ad1dab4a9.svg"},4628:(e,t,n)=>{"use strict";e.exports=n.p+"img/formPositionRanked-376168a7e3c71ed7defd.png"},5095:(e,t,n)=>{"use strict";e.exports=n.p+"img/netflixWood-fa60c8d3bb65881cf071.jpg"},5376:(e,t,n)=>{"use strict";e.exports=n.p+"svg/sad-cbf74279d944b2baac65.svg"},5594:(e,t,n)=>{"use strict";e.exports=n.p+"img/member-7b0dc9a7cc229b5ba65b.png"},5682:()=>{},6041:(e,t,n)=>{"use strict";e.exports=n.p+"img/logoWeezeventSquare-9184b02c60dbc8695435.png"},6400:(e,t,n)=>{"use strict";e.exports=n.p+"img/weezConstruction-fb73dc7a26ba038c44b3.png"},6687:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankMessages-76d6e6c79babc98388e9.svg"},6751:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileJPG-aed94d931a32b62e488d.svg"},6954:(e,t,n)=>{"use strict";e.exports=n.p+"img/googleSatellite-0706bcb1678d6e9f219c.png"},6959:(e,t,n)=>{"use strict";e.exports=n.p+"svg/filePNG-c7dc0a7230035611ad34.svg"},7008:(e,t,n)=>{"use strict";e.exports=n.p+"img/accreditation-7f66e46aebab965fa566.png"},7619:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileBlank-8285380bb91a4d9e73d7.svg"},7648:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankPerson-e5c7b9cf3fcac68f3df8.svg"},8144:(e,t,n)=>{"use strict";e.exports=n.p+"img/asoHomeBackground-e46035697a28c8d248e6.jpg"},8184:(e,t,n)=>{"use strict";e.exports=n.p+"svg/dnsWrongDomain-3954cd8d9805c779a7bc.svg"},8242:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+"},8264:(e,t,n)=>{"use strict";e.exports=n.p+"img/userProfile-37c0493d81fa861def54.png"},8301:(e,t,n)=>{"use strict";e.exports=n.p+"img/aso-897aab2a976d58ba485d.png"},8652:(e,t,n)=>{"use strict";e.exports=n.p+"svg/done-d3eb25606e0846af3988.svg"},8798:(e,t,n)=>{"use strict";e.exports=n.p+"svg/recrewteerMarker-a76de3956f8adec5ded2.svg"},9191:()=>{},9625:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileCSV-6ea65d2431d3a4293aad.svg"},9848:(e,t,n)=>{"use strict";e.exports=n.p+"svg/filePDF-37cadc96dae9bc3a10ef.svg"},9882:(e,t,n)=>{"use strict";e.exports=n.p+"img/ign-3cfd31ba578060a32efa.png"}},e=>{e.O(0,[121],()=>e(e.s=409)),e.O()}]); //# sourceMappingURL=volunteers-97fa43f4059531758414.cjs.map